/**
* plotly.js (strict - minified) v3.0.0-rc.2
* Copyright 2012-2024, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
(
 function(root, factory) {
  if (typeof module === "object" && module.exports) {
   module.exports = factory();
  } else {
   root.moduleName = factory();
  }
} (typeof self !== "undefined" ? self : this, () => {
"use strict";var Plotly=(()=>{var $C=Object.defineProperty,bet=Object.defineProperties,wet=Object.getOwnPropertyDescriptor,Tet=Object.getOwnPropertyDescriptors,Aet=Object.getOwnPropertyNames,nee=Object.getOwnPropertySymbols;var oee=Object.prototype.hasOwnProperty,Met=Object.prototype.propertyIsEnumerable;var aee=(e,t,r)=>t in e?$C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,see=(e,t)=>{for(var r in t||(t={}))oee.call(t,r)&&aee(e,r,t[r]);if(nee)for(var r of nee(t))Met.call(t,r)&&aee(e,r,t[r]);return e},lee=(e,t)=>bet(e,Tet(t));var Qf=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Eet=(e,t)=>{for(var r in t)$C(e,r,{get:t[r],enumerable:!0})},ket=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Aet(t))!oee.call(e,i)&&i!==r&&$C(e,i,{get:()=>t[i],enumerable:!(n=wet(t,i))||n.enumerable});return e};var ab=e=>ket($C({},"__esModule",{value:!0}),e);var QC=Se(uee=>{"use strict";uee.version="3.0.0-rc.2"});var cee=Se((fee,eL)=>{(function(t,r,n){r[t]=r[t]||n(),typeof eL!="undefined"&&eL.exports?eL.exports=r[t]:typeof define=="function"&&define.amd&&define(function(){return r[t]})})("Promise",typeof window!="undefined"?window:fee,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,A,L){return Object.defineProperty(k,E,{value:A,writable:!0,configurable:L!==!1})}}catch(y){t=function(E,A,L){return E[A]=L,E}}n=function(){var k,E,A;function L(_,C){this.fn=_,this.self=C,this.next=void 0}return{add:function(C,M){A=new L(C,M),E?E.next=A:k=A,E=A,A=void 0},drain:function(){var C=k;for(k=E=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(y,k){n.add(y,k),r||(r=a(n.drain))}function s(y){var k,E=typeof y;return y!=null&&(E=="object"||E=="function")&&(k=y.then),typeof k=="function"?k:!1}function u(){for(var y=0;y<this.chain.length;y++)l(this,this.state===1?this.chain[y].success:this.chain[y].failure,this.chain[y]);this.chain.length=0}function l(y,k,E){var A,L;try{k===!1?E.reject(y.msg):(k===!0?A=y.msg:A=k.call(void 0,y.msg),A===E.promise?E.reject(TypeError("Promise-chain cycle")):(L=s(A))?L.call(A,E.resolve,E.reject):E.resolve(A))}catch(_){E.reject(_)}}function f(y){var k,E=this;if(!E.triggered){E.triggered=!0,E.def&&(E=E.def);try{(k=s(y))?o(function(){var A=new d(E);try{k.call(y,function(){f.apply(A,arguments)},function(){c.apply(A,arguments)})}catch(L){c.call(A,L)}}):(E.msg=y,E.state=1,E.chain.length>0&&o(u,E))}catch(A){c.call(new d(E),A)}}}function c(y){var k=this;k.triggered||(k.triggered=!0,k.def&&(k=k.def),k.msg=y,k.state=2,k.chain.length>0&&o(u,k))}function h(y,k,E,A){for(var L=0;L<k.length;L++)(function(C){y.resolve(k[C]).then(function(v){E(C,v)},A)})(L)}function d(y){this.def=y,this.triggered=!1}function p(y){this.promise=y,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function x(y){if(typeof y!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var k=new p(this);this.then=function(A,L){var _={success:typeof A=="function"?A:!0,failure:typeof L=="function"?L:!1};return _.promise=new this.constructor(function(M,v){if(typeof M!="function"||typeof v!="function")throw TypeError("Not a function");_.resolve=M,_.reject=v}),k.chain.push(_),k.state!==0&&o(u,k),_.promise},this.catch=function(A){return this.then(void 0,A)};try{y.call(void 0,function(A){f.call(k,A)},function(A){c.call(k,A)})}catch(E){c.call(k,E)}}var b=t({},"constructor",x,!1);return x.prototype=b,t(b,"__NPO__",0,!1),t(x,"resolve",function(k){var E=this;return k&&typeof k=="object"&&k.__NPO__===1?k:new E(function(L,_){if(typeof L!="function"||typeof _!="function")throw TypeError("Not a function");L(k)})}),t(x,"reject",function(k){return new this(function(A,L){if(typeof A!="function"||typeof L!="function")throw TypeError("Not a function");L(k)})}),t(x,"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,_){if(typeof L!="function"||typeof _!="function")throw TypeError("Not a function");var C=k.length,M=Array(C),v=0;h(E,k,function(T,F){M[T]=F,++v===C&&L(M)},_)})}),t(x,"race",function(k){var E=this;return i.call(k)!="[object Array]"?E.reject(TypeError("Not an array")):new E(function(L,_){if(typeof L!="function"||typeof _!="function")throw TypeError("Not a function");h(E,k,function(M,v){L(v)},_)})}),x})});var Nl=Se((Qer,tL)=>{(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 Le=se.length,We=new Array(Le);Le--;)We[Le]=se[Le];return We}}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,u=o.setAttributeNS,l=this.CSSStyleDeclaration.prototype,f=l.setProperty;o.setAttribute=function(se,Le){s.call(this,se,Le+"")},o.setAttributeNS=function(se,Le,We){u.call(this,se,Le,We+"")},l.setProperty=function(se,Le,We){f.call(this,se,Le+"",We)}}e.ascending=c;function c(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 Le=-1,We=X.length,Ye,it;if(arguments.length===1){for(;++Le<We;)if((it=X[Le])!=null&&it>=it){Ye=it;break}for(;++Le<We;)(it=X[Le])!=null&&Ye>it&&(Ye=it)}else{for(;++Le<We;)if((it=se.call(X,X[Le],Le))!=null&&it>=it){Ye=it;break}for(;++Le<We;)(it=se.call(X,X[Le],Le))!=null&&Ye>it&&(Ye=it)}return Ye},e.max=function(X,se){var Le=-1,We=X.length,Ye,it;if(arguments.length===1){for(;++Le<We;)if((it=X[Le])!=null&&it>=it){Ye=it;break}for(;++Le<We;)(it=X[Le])!=null&&it>Ye&&(Ye=it)}else{for(;++Le<We;)if((it=se.call(X,X[Le],Le))!=null&&it>=it){Ye=it;break}for(;++Le<We;)(it=se.call(X,X[Le],Le))!=null&&it>Ye&&(Ye=it)}return Ye},e.extent=function(X,se){var Le=-1,We=X.length,Ye,it,Nt;if(arguments.length===1){for(;++Le<We;)if((it=X[Le])!=null&&it>=it){Ye=Nt=it;break}for(;++Le<We;)(it=X[Le])!=null&&(Ye>it&&(Ye=it),Nt<it&&(Nt=it))}else{for(;++Le<We;)if((it=se.call(X,X[Le],Le))!=null&&it>=it){Ye=Nt=it;break}for(;++Le<We;)(it=se.call(X,X[Le],Le))!=null&&(Ye>it&&(Ye=it),Nt<it&&(Nt=it))}return[Ye,Nt]};function h(X){return X===null?NaN:+X}function d(X){return!isNaN(X)}e.sum=function(X,se){var Le=0,We=X.length,Ye,it=-1;if(arguments.length===1)for(;++it<We;)d(Ye=+X[it])&&(Le+=Ye);else for(;++it<We;)d(Ye=+se.call(X,X[it],it))&&(Le+=Ye);return Le},e.mean=function(X,se){var Le=0,We=X.length,Ye,it=-1,Nt=We;if(arguments.length===1)for(;++it<We;)d(Ye=h(X[it]))?Le+=Ye:--Nt;else for(;++it<We;)d(Ye=h(se.call(X,X[it],it)))?Le+=Ye:--Nt;if(Nt)return Le/Nt},e.quantile=function(X,se){var Le=(X.length-1)*se+1,We=Math.floor(Le),Ye=+X[We-1],it=Le-We;return it?Ye+it*(X[We]-Ye):Ye},e.median=function(X,se){var Le=[],We=X.length,Ye,it=-1;if(arguments.length===1)for(;++it<We;)d(Ye=h(X[it]))&&Le.push(Ye);else for(;++it<We;)d(Ye=h(se.call(X,X[it],it)))&&Le.push(Ye);if(Le.length)return e.quantile(Le.sort(c),.5)},e.variance=function(X,se){var Le=X.length,We=0,Ye,it,Nt=0,mt=-1,er=0;if(arguments.length===1)for(;++mt<Le;)d(Ye=h(X[mt]))&&(it=Ye-We,We+=it/++er,Nt+=it*(Ye-We));else for(;++mt<Le;)d(Ye=h(se.call(X,X[mt],mt)))&&(it=Ye-We,We+=it/++er,Nt+=it*(Ye-We));if(er>1)return Nt/(er-1)},e.deviation=function(){var X=e.variance.apply(this,arguments);return X&&Math.sqrt(X)};function p(X){return{left:function(se,Le,We,Ye){for(arguments.length<3&&(We=0),arguments.length<4&&(Ye=se.length);We<Ye;){var it=We+Ye>>>1;X(se[it],Le)<0?We=it+1:Ye=it}return We},right:function(se,Le,We,Ye){for(arguments.length<3&&(We=0),arguments.length<4&&(Ye=se.length);We<Ye;){var it=We+Ye>>>1;X(se[it],Le)>0?Ye=it:We=it+1}return We}}}var x=p(c);e.bisectLeft=x.left,e.bisect=e.bisectRight=x.right,e.bisector=function(X){return p(X.length===1?function(se,Le){return c(X(se),Le)}:X)},e.shuffle=function(X,se,Le){(We=arguments.length)<3&&(Le=X.length,We<2&&(se=0));for(var We=Le-se,Ye,it;We;)it=Math.random()*We--|0,Ye=X[We+se],X[We+se]=X[it+se],X[it+se]=Ye;return X},e.permute=function(X,se){for(var Le=se.length,We=new Array(Le);Le--;)We[Le]=X[se[Le]];return We},e.pairs=function(X){for(var se=0,Le=X.length-1,We,Ye=X[0],it=new Array(Le<0?0:Le);se<Le;)it[se]=[We=Ye,Ye=X[++se]];return it},e.transpose=function(X){if(!(it=X.length))return[];for(var se=-1,Le=e.min(X,b),We=new Array(Le);++se<Le;)for(var Ye=-1,it,Nt=We[se]=new Array(it);++Ye<it;)Nt[Ye]=X[Ye][se];return We};function b(X){return X.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(X){var se=[];for(var Le in X)se.push(Le);return se},e.values=function(X){var se=[];for(var Le in X)se.push(X[Le]);return se},e.entries=function(X){var se=[];for(var Le in X)se.push({key:Le,value:X[Le]});return se},e.merge=function(X){for(var se=X.length,Le,We=-1,Ye=0,it,Nt;++We<se;)Ye+=X[We].length;for(it=new Array(Ye);--se>=0;)for(Nt=X[se],Le=Nt.length;--Le>=0;)it[--Ye]=Nt[Le];return it};var y=Math.abs;e.range=function(X,se,Le){if(arguments.length<3&&(Le=1,arguments.length<2&&(se=X,X=0)),(se-X)/Le===1/0)throw new Error("infinite range");var We=[],Ye=k(y(Le)),it=-1,Nt;if(X*=Ye,se*=Ye,Le*=Ye,Le<0)for(;(Nt=X+Le*++it)>se;)We.push(Nt/Ye);else for(;(Nt=X+Le*++it)<se;)We.push(Nt/Ye);return We};function k(X){for(var se=1;X*se%1;)se*=10;return se}function E(X,se){for(var Le in se)Object.defineProperty(X.prototype,Le,{value:se[Le],enumerable:!1})}e.map=function(X,se){var Le=new A;if(X instanceof A)X.forEach(function(mt,er){Le.set(mt,er)});else if(Array.isArray(X)){var We=-1,Ye=X.length,it;if(arguments.length===1)for(;++We<Ye;)Le.set(We,X[We]);else for(;++We<Ye;)Le.set(se.call(X,it=X[We],We),it)}else for(var Nt in X)Le.set(Nt,X[Nt]);return Le};function A(){this._=Object.create(null)}var L="__proto__",_="\0";E(A,{has:v,get:function(X){return this._[C(X)]},set:function(X,se){return this._[C(X)]=se},remove:z,keys:T,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:F,empty:q,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}function M(X){return(X+="")[0]===_?X.slice(1):X}function v(X){return C(X)in this._}function z(X){return(X=C(X))in this._&&delete this._[X]}function T(){var X=[];for(var se in this._)X.push(M(se));return X}function F(){var X=0;for(var se in this._)++X;return X}function q(){for(var X in this._)return!1;return!0}e.nest=function(){var X={},se=[],Le=[],We,Ye;function it(mt,er,_r){if(_r>=se.length)return Ye?Ye.call(X,er):We?er.sort(We):er;for(var wr=-1,ni=er.length,Wr=se[_r++],Ci,Ji,ai,Ti=new A,Bi;++wr<ni;)(Bi=Ti.get(Ci=Wr(Ji=er[wr])))?Bi.push(Ji):Ti.set(Ci,[Ji]);return mt?(Ji=mt(),ai=function(en,Wi){Ji.set(en,it(mt,Wi,_r))}):(Ji={},ai=function(en,Wi){Ji[en]=it(mt,Wi,_r)}),Ti.forEach(ai),Ji}function Nt(mt,er){if(er>=se.length)return mt;var _r=[],wr=Le[er++];return mt.forEach(function(ni,Wr){_r.push({key:ni,values:Nt(Wr,er)})}),wr?_r.sort(function(ni,Wr){return wr(ni.key,Wr.key)}):_r}return X.map=function(mt,er){return it(er,mt,0)},X.entries=function(mt){return Nt(it(e.map,mt,0),0)},X.key=function(mt){return se.push(mt),X},X.sortKeys=function(mt){return Le[se.length-1]=mt,X},X.sortValues=function(mt){return We=mt,X},X.rollup=function(mt){return Ye=mt,X},X},e.set=function(X){var se=new U;if(X)for(var Le=0,We=X.length;Le<We;++Le)se.add(X[Le]);return se};function U(){this._=Object.create(null)}E(U,{has:v,add:function(X){return this._[C(X+="")]=!0,X},remove:z,values:T,size:F,empty:q,forEach:function(X){for(var se in this._)X.call(this,M(se))}}),e.behavior={};function H(X){return X}e.rebind=function(X,se){for(var Le=1,We=arguments.length,Ye;++Le<We;)X[Ye=arguments[Le]]=j(X,se,se[Ye]);return X};function j(X,se,Le){return function(){var We=Le.apply(se,arguments);return We===se?X:We}}function G(X,se){if(se in X)return se;se=se.charAt(0).toUpperCase()+se.slice(1);for(var Le=0,We=O.length;Le<We;++Le){var Ye=O[Le]+se;if(Ye in X)return Ye}}var O=["webkit","ms","moz","Moz","o","O"];function W(){}e.dispatch=function(){for(var X=new re,se=-1,Le=arguments.length;++se<Le;)X[arguments[se]]=ne(X);return X};function re(){}re.prototype.on=function(X,se){var Le=X.indexOf("."),We="";if(Le>=0&&(We=X.slice(Le+1),X=X.slice(0,Le)),X)return arguments.length<2?this[X].on(We):this[X].on(We,se);if(arguments.length===2){if(se==null)for(X in this)this.hasOwnProperty(X)&&this[X].on(We,null);return this}};function ne(X){var se=[],Le=new A;function We(){for(var Ye=se,it=-1,Nt=Ye.length,mt;++it<Nt;)(mt=Ye[it].on)&&mt.apply(this,arguments);return X}return We.on=function(Ye,it){var Nt=Le.get(Ye),mt;return arguments.length<2?Nt&&Nt.on:(Nt&&(Nt.on=null,se=se.slice(0,mt=se.indexOf(Nt)).concat(se.slice(mt+1)),Le.remove(Ye)),it&&se.push(Le.set(Ye,{on:it})),X)},We}e.event=null;function be(){e.event.preventDefault()}function ze(){for(var X=e.event,se;se=X.sourceEvent;)X=se;return X}function Ce(X){for(var se=new re,Le=0,We=arguments.length;++Le<We;)se[arguments[Le]]=ne(se);return se.of=function(Ye,it){return function(Nt){try{var mt=Nt.sourceEvent=e.event;Nt.target=X,e.event=Nt,se[Nt.type].apply(Ye,it)}finally{e.event=mt}}},se}e.requote=function(X){return X.replace(he,"\\$&")};var he=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,te={}.__proto__?function(X,se){X.__proto__=se}:function(X,se){for(var Le in se)X[Le]=se[Le]};function ke(X){return te(X,Re),X}var Ee=function(X,se){return se.querySelector(X)},Me=function(X,se){return se.querySelectorAll(X)},Oe=function(X,se){var Le=X.matches||X[G(X,"matchesSelector")];return Oe=function(We,Ye){return Le.call(We,Ye)},Oe(X,se)};typeof Sizzle=="function"&&(Ee=function(X,se){return Sizzle(X,se)[0]||null},Me=Sizzle,Oe=Sizzle.matchesSelector),e.selection=function(){return e.select(n.documentElement)};var Re=e.selection.prototype=[];Re.select=function(X){var se=[],Le,We,Ye,it;X=me(X);for(var Nt=-1,mt=this.length;++Nt<mt;){se.push(Le=[]),Le.parentNode=(Ye=this[Nt]).parentNode;for(var er=-1,_r=Ye.length;++er<_r;)(it=Ye[er])?(Le.push(We=X.call(it,it.__data__,er,Nt)),We&&"__data__"in it&&(We.__data__=it.__data__)):Le.push(null)}return ke(se)};function me(X){return typeof X=="function"?X:function(){return Ee(X,this)}}Re.selectAll=function(X){var se=[],Le,We;X=Be(X);for(var Ye=-1,it=this.length;++Ye<it;)for(var Nt=this[Ye],mt=-1,er=Nt.length;++mt<er;)(We=Nt[mt])&&(se.push(Le=r(X.call(We,We.__data__,mt,Ye))),Le.parentNode=We);return ke(se)};function Be(X){return typeof X=="function"?X:function(){return Me(X,this)}}var fe="http://www.w3.org/1999/xhtml",Ze={svg:"http://www.w3.org/2000/svg",xhtml:fe,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:Ze,qualify:function(X){var se=X.indexOf(":"),Le=X;return se>=0&&(Le=X.slice(0,se))!=="xmlns"&&(X=X.slice(se+1)),Ze.hasOwnProperty(Le)?{space:Ze[Le],local:X}:X}},Re.attr=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Le=this.node();return X=e.ns.qualify(X),X.local?Le.getAttributeNS(X.space,X.local):Le.getAttribute(X)}for(se in X)this.each(et(se,X[se]));return this}return this.each(et(X,se))};function et(X,se){X=e.ns.qualify(X);function Le(){this.removeAttribute(X)}function We(){this.removeAttributeNS(X.space,X.local)}function Ye(){this.setAttribute(X,se)}function it(){this.setAttributeNS(X.space,X.local,se)}function Nt(){var er=se.apply(this,arguments);er==null?this.removeAttribute(X):this.setAttribute(X,er)}function mt(){var er=se.apply(this,arguments);er==null?this.removeAttributeNS(X.space,X.local):this.setAttributeNS(X.space,X.local,er)}return se==null?X.local?We:Le:typeof se=="function"?X.local?mt:Nt:X.local?it:Ye}function gt(X){return X.trim().replace(/\s+/g," ")}Re.classed=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Le=this.node(),We=(X=Qe(X)).length,Ye=-1;if(se=Le.classList){for(;++Ye<We;)if(!se.contains(X[Ye]))return!1}else for(se=Le.getAttribute("class");++Ye<We;)if(!Pt(X[Ye]).test(se))return!1;return!0}for(se in X)this.each(Xe(se,X[se]));return this}return this.each(Xe(X,se))};function Pt(X){return new RegExp("(?:^|\\s+)"+e.requote(X)+"(?:\\s+|$)","g")}function Qe(X){return(X+"").trim().split(/^|\s+/)}function Xe(X,se){X=Qe(X).map(Tt);var Le=X.length;function We(){for(var it=-1;++it<Le;)X[it](this,se)}function Ye(){for(var it=-1,Nt=se.apply(this,arguments);++it<Le;)X[it](this,Nt)}return typeof se=="function"?Ye:We}function Tt(X){var se=Pt(X);return function(Le,We){if(Ye=Le.classList)return We?Ye.add(X):Ye.remove(X);var Ye=Le.getAttribute("class")||"";We?(se.lastIndex=0,se.test(Ye)||Le.setAttribute("class",gt(Ye+" "+X))):Le.setAttribute("class",gt(Ye.replace(se," ")))}}Re.style=function(X,se,Le){var We=arguments.length;if(We<3){if(typeof X!="string"){We<2&&(se="");for(Le in X)this.each(xt(Le,X[Le],se));return this}if(We<2){var Ye=this.node();return a(Ye).getComputedStyle(Ye,null).getPropertyValue(X)}Le=""}return this.each(xt(X,se,Le))};function xt(X,se,Le){function We(){this.style.removeProperty(X)}function Ye(){this.style.setProperty(X,se,Le)}function it(){var Nt=se.apply(this,arguments);Nt==null?this.style.removeProperty(X):this.style.setProperty(X,Nt,Le)}return se==null?We:typeof se=="function"?it:Ye}Re.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 Le(){delete this[X]}function We(){this[X]=se}function Ye(){var it=se.apply(this,arguments);it==null?delete this[X]:this[X]=it}return se==null?Le:typeof se=="function"?Ye:We}Re.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},Re.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},Re.append=function(X){return X=Ct(X),this.select(function(){return this.appendChild(X.apply(this,arguments))})};function Ct(X){function se(){var We=this.ownerDocument,Ye=this.namespaceURI;return Ye===fe&&We.documentElement.namespaceURI===fe?We.createElement(X):We.createElementNS(Ye,X)}function Le(){return this.ownerDocument.createElementNS(X.space,X.local)}return typeof X=="function"?X:(X=e.ns.qualify(X)).local?Le:se}Re.insert=function(X,se){return X=Ct(X),se=me(se),this.select(function(){return this.insertBefore(X.apply(this,arguments),se.apply(this,arguments)||null)})},Re.remove=function(){return this.each(jt)};function jt(){var X=this.parentNode;X&&X.removeChild(this)}Re.data=function(X,se){var Le=-1,We=this.length,Ye,it;if(!arguments.length){for(X=new Array(We=(Ye=this[0]).length);++Le<We;)(it=Ye[Le])&&(X[Le]=it.__data__);return X}function Nt(wr,ni){var Wr,Ci=wr.length,Ji=ni.length,ai=Math.min(Ci,Ji),Ti=new Array(Ji),Bi=new Array(Ji),en=new Array(Ci),Wi,bi;if(se){var ao=new A,yo=new Array(Ci),Ko;for(Wr=-1;++Wr<Ci;)(Wi=wr[Wr])&&(ao.has(Ko=se.call(Wi,Wi.__data__,Wr))?en[Wr]=Wi:ao.set(Ko,Wi),yo[Wr]=Ko);for(Wr=-1;++Wr<Ji;)(Wi=ao.get(Ko=se.call(ni,bi=ni[Wr],Wr)))?Wi!==!0&&(Ti[Wr]=Wi,Wi.__data__=bi):Bi[Wr]=At(bi),ao.set(Ko,!0);for(Wr=-1;++Wr<Ci;)Wr in yo&&ao.get(yo[Wr])!==!0&&(en[Wr]=wr[Wr])}else{for(Wr=-1;++Wr<ai;)Wi=wr[Wr],bi=ni[Wr],Wi?(Wi.__data__=bi,Ti[Wr]=Wi):Bi[Wr]=At(bi);for(;Wr<Ji;++Wr)Bi[Wr]=At(ni[Wr]);for(;Wr<Ci;++Wr)en[Wr]=wr[Wr]}Bi.update=Ti,Bi.parentNode=Ti.parentNode=en.parentNode=wr.parentNode,mt.push(Bi),er.push(Ti),_r.push(en)}var mt=ct([]),er=ke([]),_r=ke([]);if(typeof X=="function")for(;++Le<We;)Nt(Ye=this[Le],X.call(Ye,Ye.parentNode.__data__,Le));else for(;++Le<We;)Nt(Ye=this[Le],X);return er.enter=function(){return mt},er.exit=function(){return _r},er};function At(X){return{__data__:X}}Re.datum=function(X){return arguments.length?this.property("__data__",X):this.property("__data__")},Re.filter=function(X){var se=[],Le,We,Ye;typeof X!="function"&&(X=Te(X));for(var it=0,Nt=this.length;it<Nt;it++){se.push(Le=[]),Le.parentNode=(We=this[it]).parentNode;for(var mt=0,er=We.length;mt<er;mt++)(Ye=We[mt])&&X.call(Ye,Ye.__data__,mt,it)&&Le.push(Ye)}return ke(se)};function Te(X){return function(){return Oe(this,X)}}Re.order=function(){for(var X=-1,se=this.length;++X<se;)for(var Le=this[X],We=Le.length-1,Ye=Le[We],it;--We>=0;)(it=Le[We])&&(Ye&&Ye!==it.nextSibling&&Ye.parentNode.insertBefore(it,Ye),Ye=it);return this},Re.sort=function(X){X=nt.apply(this,arguments);for(var se=-1,Le=this.length;++se<Le;)this[se].sort(X);return this.order()};function nt(X){return arguments.length||(X=c),function(se,Le){return se&&Le?X(se.__data__,Le.__data__):!se-!Le}}Re.each=function(X){return ut(this,function(se,Le,We){X.call(se,se.__data__,Le,We)})};function ut(X,se){for(var Le=0,We=X.length;Le<We;Le++)for(var Ye=X[Le],it=0,Nt=Ye.length,mt;it<Nt;it++)(mt=Ye[it])&&se(mt,it,Le);return X}Re.call=function(X){var se=r(arguments);return X.apply(se[0]=this,se),this},Re.empty=function(){return!this.node()},Re.node=function(){for(var X=0,se=this.length;X<se;X++)for(var Le=this[X],We=0,Ye=Le.length;We<Ye;We++){var it=Le[We];if(it)return it}return null},Re.size=function(){var X=0;return ut(this,function(){++X}),X};function ct(X){return te(X,rt),X}var rt=[];e.selection.enter=ct,e.selection.enter.prototype=rt,rt.append=Re.append,rt.empty=Re.empty,rt.node=Re.node,rt.call=Re.call,rt.size=Re.size,rt.select=function(X){for(var se=[],Le,We,Ye,it,Nt,mt=-1,er=this.length;++mt<er;){Ye=(it=this[mt]).update,se.push(Le=[]),Le.parentNode=it.parentNode;for(var _r=-1,wr=it.length;++_r<wr;)(Nt=it[_r])?(Le.push(Ye[_r]=We=X.call(it.parentNode,Nt.__data__,_r,mt)),We.__data__=Nt.__data__):Le.push(null)}return ke(se)},rt.insert=function(X,se){return arguments.length<2&&(se=je(this)),Re.insert.call(this,X,se)};function je(X){var se,Le;return function(We,Ye,it){var Nt=X[it].update,mt=Nt.length,er;for(it!=Le&&(Le=it,se=0),Ye>=se&&(se=Ye+1);!(er=Nt[se])&&++se<mt;);return er}}e.select=function(X){var se;return typeof X=="string"?(se=[Ee(X,n)],se.parentNode=n.documentElement):(se=[X],se.parentNode=i(X)),ke([se])},e.selectAll=function(X){var se;return typeof X=="string"?(se=r(Me(X,n)),se.parentNode=n.documentElement):(se=r(X),se.parentNode=null),ke([se])},Re.on=function(X,se,Le){var We=arguments.length;if(We<3){if(typeof X!="string"){We<2&&(se=!1);for(Le in X)this.each(tt(Le,X[Le],se));return this}if(We<2)return(We=this.node()["__on"+X])&&We._;Le=!1}return this.each(tt(X,se,Le))};function tt(X,se,Le){var We="__on"+X,Ye=X.indexOf("."),it=Mt;Ye>0&&(X=X.slice(0,Ye));var Nt=Je.get(X);Nt&&(X=Nt,it=Vt);function mt(){var wr=this[We];wr&&(this.removeEventListener(X,wr,wr.$),delete this[We])}function er(){var wr=it(se,r(arguments));mt.call(this),this.addEventListener(X,this[We]=wr,wr.$=Le),wr._=se}function _r(){var wr=new RegExp("^__on([^.]+)"+e.requote(X)+"$"),ni;for(var Wr in this)if(ni=Wr.match(wr)){var Ci=this[Wr];this.removeEventListener(ni[1],Ci,Ci.$),delete this[Wr]}}return Ye?se?er:mt:se?W:_r}var Je=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&Je.forEach(function(X){"on"+X in n&&Je.remove(X)});function Mt(X,se){return function(Le){var We=e.event;e.event=Le,se[0]=this.__data__;try{X.apply(this,se)}finally{e.event=We}}}function Vt(X,se){var Le=Mt(X,se);return function(We){var Ye=this,it=We.relatedTarget;(!it||it!==Ye&&!(it.compareDocumentPosition(Ye)&8))&&Le.call(Ye,We)}}var Kt,ir=0;function fr(X){var se=".dragsuppress-"+ ++ir,Le="click"+se,We=e.select(a(X)).on("touchmove"+se,be).on("dragstart"+se,be).on("selectstart"+se,be);if(Kt==null&&(Kt="onselectstart"in X?!1:G(X.style,"userSelect")),Kt){var Ye=i(X).style,it=Ye[Kt];Ye[Kt]="none"}return function(Nt){if(We.on(se,null),Kt&&(Ye[Kt]=it),Nt){var mt=function(){We.on(Le,null)};We.on(Le,function(){be(),mt()},!0),setTimeout(mt,0)}}}e.mouse=function(X){return De(X,ze())};var Ot=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function De(X,se){se.changedTouches&&(se=se.changedTouches[0]);var Le=X.ownerSVGElement||X;if(Le.createSVGPoint){var We=Le.createSVGPoint();if(Ot<0){var Ye=a(X);if(Ye.scrollX||Ye.scrollY){Le=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var it=Le[0][0].getScreenCTM();Ot=!(it.f||it.e),Le.remove()}}return Ot?(We.x=se.pageX,We.y=se.pageY):(We.x=se.clientX,We.y=se.clientY),We=We.matrixTransform(X.getScreenCTM().inverse()),[We.x,We.y]}var Nt=X.getBoundingClientRect();return[se.clientX-Nt.left-X.clientLeft,se.clientY-Nt.top-X.clientTop]}e.touch=function(X,se,Le){if(arguments.length<3&&(Le=se,se=ze().changedTouches),se){for(var We=0,Ye=se.length,it;We<Ye;++We)if((it=se[We]).identifier===Le)return De(X,it)}},e.behavior.drag=function(){var X=Ce(Ye,"drag","dragstart","dragend"),se=null,Le=it(W,e.mouse,a,"mousemove","mouseup"),We=it(_e,e.touch,H,"touchmove","touchend");function Ye(){this.on("mousedown.drag",Le).on("touchstart.drag",We)}function it(Nt,mt,er,_r,wr){return function(){var ni=this,Wr=e.event.target.correspondingElement||e.event.target,Ci=ni.parentNode,Ji=X.of(ni,arguments),ai=0,Ti=Nt(),Bi=".drag"+(Ti==null?"":"-"+Ti),en,Wi=e.select(er(Wr)).on(_r+Bi,yo).on(wr+Bi,Ko),bi=fr(Wr),ao=mt(Ci,Ti);se?(en=se.apply(ni,arguments),en=[en.x-ao[0],en.y-ao[1]]):en=[0,0],Ji({type:"dragstart"});function yo(){var Ms=mt(Ci,Ti),vl,wl;Ms&&(vl=Ms[0]-ao[0],wl=Ms[1]-ao[1],ai|=vl|wl,ao=Ms,Ji({type:"drag",x:Ms[0]+en[0],y:Ms[1]+en[1],dx:vl,dy:wl}))}function Ko(){mt(Ci,Ti)&&(Wi.on(_r+Bi,null).on(wr+Bi,null),bi(ai),Ji({type:"dragend"}))}}}return Ye.origin=function(Nt){return arguments.length?(se=Nt,Ye):se},e.rebind(Ye,X,"on")};function _e(){return e.event.changedTouches[0].identifier}e.touches=function(X,se){return arguments.length<2&&(se=ze().touches),se?r(se).map(function(Le){var We=De(X,Le);return We.identifier=Le.identifier,We}):[]};var Fe=1e-6,Pe=Fe*Fe,Ie=Math.PI,lt=2*Ie,ye=lt-Fe,ue=Ie/2,de=Ie/180,ht=180/Ie;function Et(X){return X>0?1:X<0?-1:0}function St(X,se,Le){return(se[0]-X[0])*(Le[1]-X[1])-(se[1]-X[1])*(Le[0]-X[0])}function Zt(X){return X>1?0:X<-1?Ie:Math.acos(X)}function qr(X){return X>1?ue:X<-1?-ue:Math.asin(X)}function Lr(X){return((X=Math.exp(X))-1/X)/2}function vr(X){return((X=Math.exp(X))+1/X)/2}function Er(X){return((X=Math.exp(2*X))-1)/(X+1)}function si(X){return(X=Math.sin(X/2))*X}var Ei=Math.SQRT2,Si=2,xi=4;e.interpolateZoom=function(X,se){var Le=X[0],We=X[1],Ye=X[2],it=se[0],Nt=se[1],mt=se[2],er=it-Le,_r=Nt-We,wr=er*er+_r*_r,ni,Wr;if(wr<Pe)Wr=Math.log(mt/Ye)/Ei,ni=function(en){return[Le+en*er,We+en*_r,Ye*Math.exp(Ei*en*Wr)]};else{var Ci=Math.sqrt(wr),Ji=(mt*mt-Ye*Ye+xi*wr)/(2*Ye*Si*Ci),ai=(mt*mt-Ye*Ye-xi*wr)/(2*mt*Si*Ci),Ti=Math.log(Math.sqrt(Ji*Ji+1)-Ji),Bi=Math.log(Math.sqrt(ai*ai+1)-ai);Wr=(Bi-Ti)/Ei,ni=function(en){var Wi=en*Wr,bi=vr(Ti),ao=Ye/(Si*Ci)*(bi*Er(Ei*Wi+Ti)-Lr(Ti));return[Le+ao*er,We+ao*_r,Ye*bi/vr(Ei*Wi+Ti)]}}return ni.duration=Wr*1e3,ni},e.behavior.zoom=function(){var X={x:0,y:0,k:1},se,Le,We,Ye=[960,500],it=Hi,Nt=250,mt=0,er="mousedown.zoom",_r="mousemove.zoom",wr="mouseup.zoom",ni,Wr="touchstart.zoom",Ci,Ji=Ce(Wi,"zoomstart","zoom","zoomend"),ai,Ti,Bi,en;ci||(ci="onwheel"in n?(Jr=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in n?(Jr=function(){return e.event.wheelDelta},"mousewheel"):(Jr=function(){return-e.event.detail},"MozMousePixelScroll"));function Wi(qo){qo.on(er,nu).on(ci+".zoom",qu).on("dblclick.zoom",Ju).on(Wr,Bu)}Wi.event=function(qo){qo.each(function(){var Rl=Ji.of(this,arguments),pu=X;Ll?e.select(this).transition().each("start.zoom",function(){X=this.__chart__||{x:0,y:0,k:1},wl(Rl)}).tween("zoom:zoom",function(){var xu=Ye[0],of=Ye[1],ff=Le?Le[0]:xu/2,xf=Le?Le[1]:of/2,hf=e.interpolateZoom([(ff-X.x)/X.k,(xf-X.y)/X.k,xu/X.k],[(ff-pu.x)/pu.k,(xf-pu.y)/pu.k,xu/pu.k]);return function(dc){var Gt=hf(dc),jr=xu/Gt[2];this.__chart__=X={x:ff-Gt[0]*jr,y:xf-Gt[1]*jr,k:jr},au(Rl)}}).each("interrupt.zoom",function(){Al(Rl)}).each("end.zoom",function(){Al(Rl)}):(this.__chart__=X,wl(Rl),au(Rl),Al(Rl))})},Wi.translate=function(qo){return arguments.length?(X={x:+qo[0],y:+qo[1],k:X.k},vl(),Wi):[X.x,X.y]},Wi.scale=function(qo){return arguments.length?(X={x:X.x,y:X.y,k:null},yo(+qo),vl(),Wi):X.k},Wi.scaleExtent=function(qo){return arguments.length?(it=qo==null?Hi:[+qo[0],+qo[1]],Wi):it},Wi.center=function(qo){return arguments.length?(We=qo&&[+qo[0],+qo[1]],Wi):We},Wi.size=function(qo){return arguments.length?(Ye=qo&&[+qo[0],+qo[1]],Wi):Ye},Wi.duration=function(qo){return arguments.length?(Nt=+qo,Wi):Nt},Wi.x=function(qo){return arguments.length?(Ti=qo,ai=qo.copy(),X={x:0,y:0,k:1},Wi):Ti},Wi.y=function(qo){return arguments.length?(en=qo,Bi=qo.copy(),X={x:0,y:0,k:1},Wi):en};function bi(qo){return[(qo[0]-X.x)/X.k,(qo[1]-X.y)/X.k]}function ao(qo){return[qo[0]*X.k+X.x,qo[1]*X.k+X.y]}function yo(qo){X.k=Math.max(it[0],Math.min(it[1],qo))}function Ko(qo,Rl){Rl=ao(Rl),X.x+=qo[0]-Rl[0],X.y+=qo[1]-Rl[1]}function Ms(qo,Rl,pu,xu){qo.__chart__={x:X.x,y:X.y,k:X.k},yo(Math.pow(2,xu)),Ko(Le=Rl,pu),qo=e.select(qo),Nt>0&&(qo=qo.transition().duration(Nt)),qo.call(Wi.event)}function vl(){Ti&&Ti.domain(ai.range().map(function(qo){return(qo-X.x)/X.k}).map(ai.invert)),en&&en.domain(Bi.range().map(function(qo){return(qo-X.y)/X.k}).map(Bi.invert))}function wl(qo){mt++||qo({type:"zoomstart"})}function au(qo){vl(),qo({type:"zoom",scale:X.k,translate:[X.x,X.y]})}function Al(qo){--mt||(qo({type:"zoomend"}),Le=null)}function nu(){var qo=this,Rl=Ji.of(qo,arguments),pu=0,xu=e.select(a(qo)).on(_r,xf).on(wr,hf),of=bi(e.mouse(qo)),ff=fr(qo);ys.call(qo),wl(Rl);function xf(){pu=1,Ko(e.mouse(qo),of),au(Rl)}function hf(){xu.on(_r,null).on(wr,null),ff(pu),Al(Rl)}}function Bu(){var qo=this,Rl=Ji.of(qo,arguments),pu={},xu=0,of,ff=".zoom-"+e.event.changedTouches[0].identifier,xf="touchmove"+ff,hf="touchend"+ff,dc=[],Gt=e.select(qo),jr=fr(qo);Mn(),wl(Rl),Gt.on(er,null).on(Wr,Mn);function _i(){var ha=e.touches(qo);return of=X.k,ha.forEach(function(Io){Io.identifier in pu&&(pu[Io.identifier]=bi(Io))}),ha}function Mn(){var ha=e.event.target;e.select(ha).on(xf,Ta).on(hf,fa),dc.push(ha);for(var Io=e.event.changedTouches,Vs=0,Hs=Io.length;Vs<Hs;++Vs)pu[Io[Vs].identifier]=null;var is=_i(),su=Date.now();if(is.length===1){if(su-Ci<500){var Ps=is[0];Ms(qo,Ps,pu[Ps.identifier],Math.floor(Math.log(X.k)/Math.LN2)+1),be()}Ci=su}else if(is.length>1){var Ps=is[0],qs=is[1],Do=Ps[0]-qs[0],kn=Ps[1]-qs[1];xu=Do*Do+kn*kn}}function Ta(){var ha=e.touches(qo),Io,Vs,Hs,is;ys.call(qo);for(var su=0,Ps=ha.length;su<Ps;++su,is=null)if(Hs=ha[su],is=pu[Hs.identifier]){if(Vs)break;Io=Hs,Vs=is}if(is){var qs=(qs=Hs[0]-Io[0])*qs+(qs=Hs[1]-Io[1])*qs,Do=xu&&Math.sqrt(qs/xu);Io=[(Io[0]+Hs[0])/2,(Io[1]+Hs[1])/2],Vs=[(Vs[0]+is[0])/2,(Vs[1]+is[1])/2],yo(Do*of)}Ci=null,Ko(Io,Vs),au(Rl)}function fa(){if(e.event.touches.length){for(var ha=e.event.changedTouches,Io=0,Vs=ha.length;Io<Vs;++Io)delete pu[ha[Io].identifier];for(var Hs in pu)return void _i()}e.selectAll(dc).on(ff,null),Gt.on(er,nu).on(Wr,Bu),jr(),Al(Rl)}}function qu(){var qo=Ji.of(this,arguments);ni?clearTimeout(ni):(ys.call(this),se=bi(Le=We||e.mouse(this)),wl(qo)),ni=setTimeout(function(){ni=null,Al(qo)},50),be(),yo(Math.pow(2,Jr()*.002)*X.k),Ko(Le,se),au(qo)}function Ju(){var qo=e.mouse(this),Rl=Math.log(X.k)/Math.LN2;Ms(this,qo,bi(qo),e.event.shiftKey?Math.ceil(Rl)-1:Math.floor(Rl)+1)}return e.rebind(Wi,Ji,"on")};var Hi=[0,1/0],Jr,ci;e.color=Di;function Di(){}Di.prototype.toString=function(){return this.rgb()+""},e.hsl=Lt;function Lt(X,se,Le){return this instanceof Lt?(this.h=+X,this.s=+se,void(this.l=+Le)):arguments.length<2?X instanceof Lt?new Lt(X.h,X.s,X.l):sn(""+X,fi,Lt):new Lt(X,se,Le)}var vt=Lt.prototype=new Di;vt.brighter=function(X){return X=Math.pow(.7,arguments.length?X:1),new Lt(this.h,this.s,this.l/X)},vt.darker=function(X){return X=Math.pow(.7,arguments.length?X:1),new Lt(this.h,this.s,X*this.l)},vt.rgb=function(){return Dt(this.h,this.s,this.l)};function Dt(X,se,Le){var We,Ye;X=isNaN(X)?0:(X%=360)<0?X+360:X,se=isNaN(se)||se<0?0:se>1?1:se,Le=Le<0?0:Le>1?1:Le,Ye=Le<=.5?Le*(1+se):Le+se-Le*se,We=2*Le-Ye;function it(mt){return mt>360?mt-=360:mt<0&&(mt+=360),mt<60?We+(Ye-We)*mt/60:mt<180?Ye:mt<240?We+(Ye-We)*(240-mt)/60:We}function Nt(mt){return Math.round(it(mt)*255)}return new ki(Nt(X+120),Nt(X),Nt(X-120))}e.hcl=Bt;function Bt(X,se,Le){return this instanceof Bt?(this.h=+X,this.c=+se,void(this.l=+Le)):arguments.length<2?X instanceof Bt?new Bt(X.h,X.c,X.l):X instanceof zr?Yr(X.l,X.a,X.b):Yr((X=Or((X=e.rgb(X)).r,X.g,X.b)).l,X.a,X.b):new Bt(X,se,Le)}var sr=Bt.prototype=new Di;sr.brighter=function(X){return new Bt(this.h,this.c,Math.min(100,this.l+Tr*(arguments.length?X:1)))},sr.darker=function(X){return new Bt(this.h,this.c,Math.max(0,this.l-Tr*(arguments.length?X:1)))},sr.rgb=function(){return br(this.h,this.c,this.l).rgb()};function br(X,se,Le){return isNaN(X)&&(X=0),isNaN(se)&&(se=0),new zr(Le,Math.cos(X*=de)*se,Math.sin(X)*se)}e.lab=zr;function zr(X,se,Le){return this instanceof zr?(this.l=+X,this.a=+se,void(this.b=+Le)):arguments.length<2?X instanceof zr?new zr(X.l,X.a,X.b):X instanceof Bt?br(X.h,X.c,X.l):Or((X=ki(X)).r,X.g,X.b):new zr(X,se,Le)}var Tr=18,Rr=.95047,Br=1,oi=1.08883,vi=zr.prototype=new Di;vi.brighter=function(X){return new zr(Math.min(100,this.l+Tr*(arguments.length?X:1)),this.a,this.b)},vi.darker=function(X){return new zr(Math.max(0,this.l-Tr*(arguments.length?X:1)),this.a,this.b)},vi.rgb=function(){return Pi(this.l,this.a,this.b)};function Pi(X,se,Le){var We=(X+16)/116,Ye=We+se/500,it=We-Le/200;return Ye=Ni(Ye)*Rr,We=Ni(We)*Br,it=Ni(it)*oi,new ki(ti(3.2404542*Ye-1.5371385*We-.4985314*it),ti(-.969266*Ye+1.8760108*We+.041556*it),ti(.0556434*Ye-.2040259*We+1.0572252*it))}function Yr(X,se,Le){return X>0?new Bt(Math.atan2(Le,se)*ht,Math.sqrt(se*se+Le*Le),X):new Bt(NaN,NaN,X)}function Ni(X){return X>.206893034?X*X*X:(X-4/29)/7.787037}function Ur(X){return X>.008856?Math.pow(X,1/3):7.787037*X+4/29}function ti(X){return Math.round(255*(X<=.00304?12.92*X:1.055*Math.pow(X,1/2.4)-.055))}e.rgb=ki;function ki(X,se,Le){return this instanceof ki?(this.r=~~X,this.g=~~se,void(this.b=~~Le)):arguments.length<2?X instanceof ki?new ki(X.r,X.g,X.b):sn(""+X,ki,Dt):new ki(X,se,Le)}function ji(X){return new ki(X>>16,X>>8&255,X&255)}function Vi(X){return ji(X)+""}var zi=ki.prototype=new Di;zi.brighter=function(X){X=Math.pow(.7,arguments.length?X:1);var se=this.r,Le=this.g,We=this.b,Ye=30;return!se&&!Le&&!We?new ki(Ye,Ye,Ye):(se&&se<Ye&&(se=Ye),Le&&Le<Ye&&(Le=Ye),We&&We<Ye&&(We=Ye),new ki(Math.min(255,se/X),Math.min(255,Le/X),Math.min(255,We/X)))},zi.darker=function(X){return X=Math.pow(.7,arguments.length?X:1),new ki(X*this.r,X*this.g,X*this.b)},zi.hsl=function(){return fi(this.r,this.g,this.b)},zi.toString=function(){return"#"+Mi(this.r)+Mi(this.g)+Mi(this.b)};function Mi(X){return X<16?"0"+Math.max(0,X).toString(16):Math.min(255,X).toString(16)}function sn(X,se,Le){var We=0,Ye=0,it=0,Nt,mt,er;if(Nt=/([a-z]+)\((.*)\)/.exec(X=X.toLowerCase()),Nt)switch(mt=Nt[2].split(","),Nt[1]){case"hsl":return Le(parseFloat(mt[0]),parseFloat(mt[1])/100,parseFloat(mt[2])/100);case"rgb":return se(Wt(mt[0]),Wt(mt[1]),Wt(mt[2]))}return(er=tr.get(X))?se(er.r,er.g,er.b):(X!=null&&X.charAt(0)==="#"&&!isNaN(er=parseInt(X.slice(1),16))&&(X.length===4?(We=(er&3840)>>4,We=We>>4|We,Ye=er&240,Ye=Ye>>4|Ye,it=er&15,it=it<<4|it):X.length===7&&(We=(er&16711680)>>16,Ye=(er&65280)>>8,it=er&255)),se(We,Ye,it))}function fi(X,se,Le){var We=Math.min(X/=255,se/=255,Le/=255),Ye=Math.max(X,se,Le),it=Ye-We,Nt,mt,er=(Ye+We)/2;return it?(mt=er<.5?it/(Ye+We):it/(2-Ye-We),X==Ye?Nt=(se-Le)/it+(se<Le?6:0):se==Ye?Nt=(Le-X)/it+2:Nt=(X-se)/it+4,Nt*=60):(Nt=NaN,mt=er>0&&er<1?0:Nt),new Lt(Nt,mt,er)}function Or(X,se,Le){X=st(X),se=st(se),Le=st(Le);var We=Ur((.4124564*X+.3575761*se+.1804375*Le)/Rr),Ye=Ur((.2126729*X+.7151522*se+.072175*Le)/Br),it=Ur((.0193339*X+.119192*se+.9503041*Le)/oi);return zr(116*Ye-16,500*(We-Ye),200*(Ye-it))}function st(X){return(X/=255)<=.04045?X/12.92:Math.pow((X+.055)/1.055,2.4)}function Wt(X){var se=parseFloat(X);return X.charAt(X.length-1)==="%"?Math.round(se*2.55):se}var tr=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});tr.forEach(function(X,se){tr.set(X,ji(se))});function or(X){return typeof X=="function"?X:function(){return X}}e.functor=or,e.xhr=Nr(H);function Nr(X){return function(se,Le,We){return arguments.length===2&&typeof Le=="function"&&(We=Le,Le=null),hi(se,Le,X,We)}}function hi(X,se,Le,We){var Ye={},it=e.dispatch("beforesend","progress","load","error"),Nt={},mt=new XMLHttpRequest,er=null;self.XDomainRequest&&!("withCredentials"in mt)&&/^(http(s)?:)?\/\//.test(X)&&(mt=new XDomainRequest),"onload"in mt?mt.onload=mt.onerror=_r:mt.onreadystatechange=function(){mt.readyState>3&&_r()};function _r(){var wr=mt.status,ni;if(!wr&&Qr(mt)||wr>=200&&wr<300||wr===304){try{ni=Le.call(Ye,mt)}catch(Wr){it.error.call(Ye,Wr);return}it.load.call(Ye,ni)}else it.error.call(Ye,mt)}return mt.onprogress=function(wr){var ni=e.event;e.event=wr;try{it.progress.call(Ye,mt)}finally{e.event=ni}},Ye.header=function(wr,ni){return wr=(wr+"").toLowerCase(),arguments.length<2?Nt[wr]:(ni==null?delete Nt[wr]:Nt[wr]=ni+"",Ye)},Ye.mimeType=function(wr){return arguments.length?(se=wr==null?null:wr+"",Ye):se},Ye.responseType=function(wr){return arguments.length?(er=wr,Ye):er},Ye.response=function(wr){return Le=wr,Ye},["get","post"].forEach(function(wr){Ye[wr]=function(){return Ye.send.apply(Ye,[wr].concat(r(arguments)))}}),Ye.send=function(wr,ni,Wr){if(arguments.length===2&&typeof ni=="function"&&(Wr=ni,ni=null),mt.open(wr,X,!0),se!=null&&!("accept"in Nt)&&(Nt.accept=se+",*/*"),mt.setRequestHeader)for(var Ci in Nt)mt.setRequestHeader(Ci,Nt[Ci]);return se!=null&&mt.overrideMimeType&&mt.overrideMimeType(se),er!=null&&(mt.responseType=er),Wr!=null&&Ye.on("error",Wr).on("load",function(Ji){Wr(null,Ji)}),it.beforesend.call(Ye,mt),mt.send(ni==null?null:ni),Ye},Ye.abort=function(){return mt.abort(),Ye},e.rebind(Ye,it,"on"),We==null?Ye:Ye.get(Gi(We))}function Gi(X){return X.length===1?function(se,Le){X(se==null?Le:null)}:X}function Qr(X){var se=X.responseType;return se&&se!=="text"?X.response:X.responseText}e.dsv=function(X,se){var Le=new RegExp('["'+X+`
]`),We=X.charCodeAt(0);function Ye(_r,wr,ni){arguments.length<3&&(ni=wr,wr=null);var Wr=hi(_r,se,wr==null?it:Nt(wr),ni);return Wr.row=function(Ci){return arguments.length?Wr.response((wr=Ci)==null?it:Nt(Ci)):wr},Wr}function it(_r){return Ye.parse(_r.responseText)}function Nt(_r){return function(wr){return Ye.parse(wr.responseText,_r)}}Ye.parse=function(_r,wr){var ni;return Ye.parseRows(_r,function(Wr,Ci){if(ni)return ni(Wr,Ci-1);var Ji=function(ai){for(var Ti={},Bi=Wr.length,en=0;en<Bi;++en)Ti[Wr[en]]=ai[en];return Ti};ni=wr?function(ai,Ti){return wr(Ji(ai),Ti)}:Ji})},Ye.parseRows=function(_r,wr){var ni={},Wr={},Ci=[],Ji=_r.length,ai=0,Ti=0,Bi,en;function Wi(){if(ai>=Ji)return Wr;if(en)return en=!1,ni;var ao=ai;if(_r.charCodeAt(ao)===34){for(var yo=ao;yo++<Ji;)if(_r.charCodeAt(yo)===34){if(_r.charCodeAt(yo+1)!==34)break;++yo}ai=yo+2;var Ko=_r.charCodeAt(yo+1);return Ko===13?(en=!0,_r.charCodeAt(yo+2)===10&&++ai):Ko===10&&(en=!0),_r.slice(ao+1,yo).replace(/""/g,'"')}for(;ai<Ji;){var Ko=_r.charCodeAt(ai++),Ms=1;if(Ko===10)en=!0;else if(Ko===13)en=!0,_r.charCodeAt(ai)===10&&(++ai,++Ms);else if(Ko!==We)continue;return _r.slice(ao,ai-Ms)}return _r.slice(ao)}for(;(Bi=Wi())!==Wr;){for(var bi=[];Bi!==ni&&Bi!==Wr;)bi.push(Bi),Bi=Wi();wr&&(bi=wr(bi,Ti++))==null||Ci.push(bi)}return Ci},Ye.format=function(_r){if(Array.isArray(_r[0]))return Ye.formatRows(_r);var wr=new U,ni=[];return _r.forEach(function(Wr){for(var Ci in Wr)wr.has(Ci)||ni.push(wr.add(Ci))}),[ni.map(er).join(X)].concat(_r.map(function(Wr){return ni.map(function(Ci){return er(Wr[Ci])}).join(X)})).join(`
`)},Ye.formatRows=function(_r){return _r.map(mt).join(`
`)};function mt(_r){return _r.map(er).join(X)}function er(_r){return Le.test(_r)?'"'+_r.replace(/\"/g,'""')+'"':_r}return Ye},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv("	","text/tab-separated-values");var Ui,zn,fn,xn,_a=this[G(this,"requestAnimationFrame")]||function(X){setTimeout(X,17)};e.timer=function(){Wn.apply(this,arguments)};function Wn(X,se,Le){var We=arguments.length;We<2&&(se=0),We<3&&(Le=Date.now());var Ye=Le+se,it={c:X,t:Ye,n:null};return zn?zn.n=it:Ui=it,zn=it,fn||(xn=clearTimeout(xn),fn=1,_a(Fn)),it}function Fn(){var X=ia(),se=za()-X;se>24?(isFinite(se)&&(clearTimeout(xn),xn=setTimeout(Fn,se)),fn=0):(fn=1,_a(Fn))}e.timer.flush=function(){ia(),za()};function ia(){for(var X=Date.now(),se=Ui;se;)X>=se.t&&se.c(X-se.t)&&(se.c=null),se=se.n;return X}function za(){for(var X,se=Ui,Le=1/0;se;)se.c?(se.t<Le&&(Le=se.t),se=(X=se).n):se=X?X.n=se.n:Ui=se.n;return zn=X,Le}e.round=function(X,se){return se?Math.round(X*(se=Math.pow(10,se)))/se:Math.round(X)},e.geom={};function Hr(X){return X[0]}function na(X){return X[1]}e.geom.hull=function(X){var se=Hr,Le=na;if(arguments.length)return We(X);function We(Ye){if(Ye.length<3)return[];var it=or(se),Nt=or(Le),mt,er=Ye.length,_r=[],wr=[];for(mt=0;mt<er;mt++)_r.push([+it.call(this,Ye[mt],mt),+Nt.call(this,Ye[mt],mt),mt]);for(_r.sort(Dn),mt=0;mt<er;mt++)wr.push([_r[mt][0],-_r[mt][1]]);var ni=go(_r),Wr=go(wr),Ci=Wr[0]===ni[0],Ji=Wr[Wr.length-1]===ni[ni.length-1],ai=[];for(mt=ni.length-1;mt>=0;--mt)ai.push(Ye[_r[ni[mt]][2]]);for(mt=+Ci;mt<Wr.length-Ji;++mt)ai.push(Ye[_r[Wr[mt]][2]]);return ai}return We.x=function(Ye){return arguments.length?(se=Ye,We):se},We.y=function(Ye){return arguments.length?(Le=Ye,We):Le},We};function go(X){for(var se=X.length,Le=[0,1],We=2,Ye=2;Ye<se;Ye++){for(;We>1&&St(X[Le[We-2]],X[Le[We-1]],X[Ye])<=0;)--We;Le[We++]=Ye}return Le.slice(0,We)}function Dn(X,se){return X[0]-se[0]||X[1]-se[1]}e.geom.polygon=function(X){return te(X,un),X};var un=e.geom.polygon.prototype=[];un.area=function(){for(var X=-1,se=this.length,Le,We=this[se-1],Ye=0;++X<se;)Le=We,We=this[X],Ye+=Le[1]*We[0]-Le[0]*We[1];return Ye*.5},un.centroid=function(X){var se=-1,Le=this.length,We=0,Ye=0,it,Nt=this[Le-1],mt;for(arguments.length||(X=-1/(6*this.area()));++se<Le;)it=Nt,Nt=this[se],mt=it[0]*Nt[1]-Nt[0]*it[1],We+=(it[0]+Nt[0])*mt,Ye+=(it[1]+Nt[1])*mt;return[We*X,Ye*X]},un.clip=function(X){for(var se,Le=Ba(X),We=-1,Ye=this.length-Ba(this),it,Nt,mt=this[Ye-1],er,_r,wr;++We<Ye;){for(se=X.slice(),X.length=0,er=this[We],_r=se[(Nt=se.length-Le)-1],it=-1;++it<Nt;)wr=se[it],Zn(wr,mt,er)?(Zn(_r,mt,er)||X.push(Wo(_r,wr,mt,er)),X.push(wr)):Zn(_r,mt,er)&&X.push(Wo(_r,wr,mt,er)),_r=wr;Le&&X.push(X[0]),mt=er}return X};function Zn(X,se,Le){return(Le[0]-se[0])*(X[1]-se[1])<(Le[1]-se[1])*(X[0]-se[0])}function Wo(X,se,Le,We){var Ye=X[0],it=Le[0],Nt=se[0]-Ye,mt=We[0]-it,er=X[1],_r=Le[1],wr=se[1]-er,ni=We[1]-_r,Wr=(mt*(er-_r)-ni*(Ye-it))/(ni*Nt-mt*wr);return[Ye+Wr*Nt,er+Wr*wr]}function Ba(X){var se=X[0],Le=X[X.length-1];return!(se[0]-Le[0]||se[1]-Le[1])}var Bo,Ea,Ha,tn=[],Cn,Xn,ts=[];function Ja(){co(this),this.edge=this.site=this.circle=null}function to(X){var se=tn.pop()||new Ja;return se.site=X,se}function Ri(X){Yn(X),Ha.remove(X),tn.push(X),co(X)}function an(X){var se=X.circle,Le=se.x,We=se.cy,Ye={x:Le,y:We},it=X.P,Nt=X.N,mt=[X];Ri(X);for(var er=it;er.circle&&y(Le-er.circle.x)<Fe&&y(We-er.circle.cy)<Fe;)it=er.P,mt.unshift(er),Ri(er),er=it;mt.unshift(er),Yn(er);for(var _r=Nt;_r.circle&&y(Le-_r.circle.x)<Fe&&y(We-_r.circle.cy)<Fe;)Nt=_r.N,mt.push(_r),Ri(_r),_r=Nt;mt.push(_r),Yn(_r);var wr=mt.length,ni;for(ni=1;ni<wr;++ni)_r=mt[ni],er=mt[ni-1],Vo(_r.edge,er.site,_r.site,Ye);er=mt[0],_r=mt[wr-1],_r.edge=qa(er.site,_r.site,null,Ye),Fi(er),Fi(_r)}function cs(X){for(var se=X.x,Le=X.y,We,Ye,it,Nt,mt=Ha._;mt;)if(it=pa(mt,Le)-se,it>Fe)mt=mt.L;else if(Nt=se-ln(mt,Le),Nt>Fe){if(!mt.R){We=mt;break}mt=mt.R}else{it>-Fe?(We=mt.P,Ye=mt):Nt>-Fe?(We=mt,Ye=mt.N):We=Ye=mt;break}var er=to(X);if(Ha.insert(We,er),!(!We&&!Ye)){if(We===Ye){Yn(We),Ye=to(We.site),Ha.insert(er,Ye),er.edge=Ye.edge=qa(We.site,er.site),Fi(We),Fi(Ye);return}if(!Ye){er.edge=qa(We.site,er.site);return}Yn(We),Yn(Ye);var _r=We.site,wr=_r.x,ni=_r.y,Wr=X.x-wr,Ci=X.y-ni,Ji=Ye.site,ai=Ji.x-wr,Ti=Ji.y-ni,Bi=2*(Wr*Ti-Ci*ai),en=Wr*Wr+Ci*Ci,Wi=ai*ai+Ti*Ti,bi={x:(Ti*en-Ci*Wi)/Bi+wr,y:(Wr*Wi-ai*en)/Bi+ni};Vo(Ye.edge,_r,Ji,bi),er.edge=qa(_r,X,null,bi),Ye.edge=qa(X,Ji,null,bi),Fi(We),Fi(Ye)}}function pa(X,se){var Le=X.site,We=Le.x,Ye=Le.y,it=Ye-se;if(!it)return We;var Nt=X.P;if(!Nt)return-1/0;Le=Nt.site;var mt=Le.x,er=Le.y,_r=er-se;if(!_r)return mt;var wr=mt-We,ni=1/it-1/_r,Wr=wr/_r;return ni?(-Wr+Math.sqrt(Wr*Wr-2*ni*(wr*wr/(-2*_r)-er+_r/2+Ye-it/2)))/ni+We:(We+mt)/2}function ln(X,se){var Le=X.N;if(Le)return pa(Le,se);var We=X.site;return We.y===se?We.x:1/0}function ka(X){this.site=X,this.edges=[]}ka.prototype.prepare=function(){for(var X=this.edges,se=X.length,Le;se--;)Le=X[se].edge,(!Le.b||!Le.a)&&X.splice(se,1);return X.sort(bo),X.length};function va(X){for(var se=X[0][0],Le=X[1][0],We=X[0][1],Ye=X[1][1],it,Nt,mt,er,_r=Ea,wr=_r.length,ni,Wr,Ci,Ji,ai,Ti;wr--;)if(ni=_r[wr],!(!ni||!ni.prepare()))for(Ci=ni.edges,Ji=Ci.length,Wr=0;Wr<Ji;)Ti=Ci[Wr].end(),mt=Ti.x,er=Ti.y,ai=Ci[++Wr%Ji].start(),it=ai.x,Nt=ai.y,(y(mt-it)>Fe||y(er-Nt)>Fe)&&(Ci.splice(Wr,0,new Pa(jo(ni.site,Ti,y(mt-se)<Fe&&Ye-er>Fe?{x:se,y:y(it-se)<Fe?Nt:Ye}:y(er-Ye)<Fe&&Le-mt>Fe?{x:y(Nt-Ye)<Fe?it:Le,y:Ye}:y(mt-Le)<Fe&&er-We>Fe?{x:Le,y:y(it-Le)<Fe?Nt:We}:y(er-We)<Fe&&mt-se>Fe?{x:y(Nt-We)<Fe?it:se,y:We}:null),ni.site,null)),++Ji)}function bo(X,se){return se.angle-X.angle}function Co(){co(this),this.x=this.y=this.arc=this.site=this.cy=null}function Fi(X){var se=X.P,Le=X.N;if(!(!se||!Le)){var We=se.site,Ye=X.site,it=Le.site;if(We!==it){var Nt=Ye.x,mt=Ye.y,er=We.x-Nt,_r=We.y-mt,wr=it.x-Nt,Ti=it.y-mt,ni=2*(er*Ti-_r*wr);if(!(ni>=-Pe)){var Wr=er*er+_r*_r,Ci=wr*wr+Ti*Ti,Ji=(Ti*Wr-_r*Ci)/ni,ai=(er*Ci-wr*Wr)/ni,Ti=ai+mt,Bi=ts.pop()||new Co;Bi.arc=X,Bi.site=Ye,Bi.x=Ji+Nt,Bi.y=Ti+Math.sqrt(Ji*Ji+ai*ai),Bi.cy=Ti,X.circle=Bi;for(var en=null,Wi=Xn._;Wi;)if(Bi.y<Wi.y||Bi.y===Wi.y&&Bi.x<=Wi.x)if(Wi.L)Wi=Wi.L;else{en=Wi.P;break}else if(Wi.R)Wi=Wi.R;else{en=Wi;break}Xn.insert(en,Bi),en||(Cn=Bi)}}}}function Yn(X){var se=X.circle;se&&(se.P||(Cn=se.N),Xn.remove(se),ts.push(se),co(se),X.circle=null)}function xa(X,se,Le,We){return function(Ye){var it=Ye.a,Nt=Ye.b,mt=it.x,er=it.y,_r=Nt.x,wr=Nt.y,ni=0,Wr=1,Ci=_r-mt,Ji=wr-er,ai;if(ai=X-mt,!(!Ci&&ai>0)){if(ai/=Ci,Ci<0){if(ai<ni)return;ai<Wr&&(Wr=ai)}else if(Ci>0){if(ai>Wr)return;ai>ni&&(ni=ai)}if(ai=Le-mt,!(!Ci&&ai<0)){if(ai/=Ci,Ci<0){if(ai>Wr)return;ai>ni&&(ni=ai)}else if(Ci>0){if(ai<ni)return;ai<Wr&&(Wr=ai)}if(ai=se-er,!(!Ji&&ai>0)){if(ai/=Ji,Ji<0){if(ai<ni)return;ai<Wr&&(Wr=ai)}else if(Ji>0){if(ai>Wr)return;ai>ni&&(ni=ai)}if(ai=We-er,!(!Ji&&ai<0)){if(ai/=Ji,Ji<0){if(ai>Wr)return;ai>ni&&(ni=ai)}else if(Ji>0){if(ai<ni)return;ai<Wr&&(Wr=ai)}return ni>0&&(Ye.a={x:mt+ni*Ci,y:er+ni*Ji}),Wr<1&&(Ye.b={x:mt+Wr*Ci,y:er+Wr*Ji}),Ye}}}}}}function Qi(X){for(var se=Bo,Le=xa(X[0][0],X[0][1],X[1][0],X[1][1]),We=se.length,Ye;We--;)Ye=se[We],(!Nn(Ye,X)||!Le(Ye)||y(Ye.a.x-Ye.b.x)<Fe&&y(Ye.a.y-Ye.b.y)<Fe)&&(Ye.a=Ye.b=null,se.splice(We,1))}function Nn(X,se){var Le=X.b;if(Le)return!0;var We=X.a,Ye=se[0][0],it=se[1][0],Nt=se[0][1],mt=se[1][1],er=X.l,_r=X.r,wr=er.x,ni=er.y,Wr=_r.x,Ci=_r.y,Ji=(wr+Wr)/2,ai=(ni+Ci)/2,Ti,Bi;if(Ci===ni){if(Ji<Ye||Ji>=it)return;if(wr>Wr){if(!We)We={x:Ji,y:Nt};else if(We.y>=mt)return;Le={x:Ji,y:mt}}else{if(!We)We={x:Ji,y:mt};else if(We.y<Nt)return;Le={x:Ji,y:Nt}}}else if(Ti=(wr-Wr)/(Ci-ni),Bi=ai-Ti*Ji,Ti<-1||Ti>1)if(wr>Wr){if(!We)We={x:(Nt-Bi)/Ti,y:Nt};else if(We.y>=mt)return;Le={x:(mt-Bi)/Ti,y:mt}}else{if(!We)We={x:(mt-Bi)/Ti,y:mt};else if(We.y<Nt)return;Le={x:(Nt-Bi)/Ti,y:Nt}}else if(ni<Ci){if(!We)We={x:Ye,y:Ti*Ye+Bi};else if(We.x>=it)return;Le={x:it,y:Ti*it+Bi}}else{if(!We)We={x:it,y:Ti*it+Bi};else if(We.x<Ye)return;Le={x:Ye,y:Ti*Ye+Bi}}return X.a=We,X.b=Le,!0}function Pn(X,se){this.l=X,this.r=se,this.a=this.b=null}function qa(X,se,Le,We){var Ye=new Pn(X,se);return Bo.push(Ye),Le&&Vo(Ye,X,se,Le),We&&Vo(Ye,se,X,We),Ea[X.i].edges.push(new Pa(Ye,X,se)),Ea[se.i].edges.push(new Pa(Ye,se,X)),Ye}function jo(X,se,Le){var We=new Pn(X,null);return We.a=se,We.b=Le,Bo.push(We),We}function Vo(X,se,Le,We){!X.a&&!X.b?(X.a=We,X.l=se,X.r=Le):X.l===Le?X.b=We:X.a=We}function Pa(X,se,Le){var We=X.a,Ye=X.b;this.edge=X,this.site=se,this.angle=Le?Math.atan2(Le.y-se.y,Le.x-se.x):X.l===se?Math.atan2(Ye.x-We.x,We.y-Ye.y):Math.atan2(We.x-Ye.x,Ye.y-We.y)}Pa.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 Oa(){this._=null}function co(X){X.U=X.C=X.L=X.R=X.P=X.N=null}Oa.prototype={insert:function(X,se){var Le,We,Ye;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;Le=X}else this._?(X=ks(this._),se.P=null,se.N=X,X.P=X.L=se,Le=X):(se.P=se.N=null,this._=se,Le=null);for(se.L=se.R=null,se.U=Le,se.C=!0,X=se;Le&&Le.C;)We=Le.U,Le===We.L?(Ye=We.R,Ye&&Ye.C?(Le.C=Ye.C=!1,We.C=!0,X=We):(X===Le.R&&(An(this,Le),X=Le,Le=X.U),Le.C=!1,We.C=!0,_o(this,We))):(Ye=We.L,Ye&&Ye.C?(Le.C=Ye.C=!1,We.C=!0,X=We):(X===Le.L&&(_o(this,Le),X=Le,Le=X.U),Le.C=!1,We.C=!0,An(this,We))),Le=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,Le,We=X.L,Ye=X.R,it,Nt;if(We?Ye?it=ks(Ye):it=We:it=Ye,se?se.L===X?se.L=it:se.R=it:this._=it,We&&Ye?(Nt=it.C,it.C=X.C,it.L=We,We.U=it,it!==Ye?(se=it.U,it.U=X.U,X=it.R,se.L=X,it.R=Ye,Ye.U=it):(it.U=se,se=it,X=it.R)):(Nt=X.C,X=it),X&&(X.U=se),!Nt){if(X&&X.C){X.C=!1;return}do{if(X===this._)break;if(X===se.L){if(Le=se.R,Le.C&&(Le.C=!1,se.C=!0,An(this,se),Le=se.R),Le.L&&Le.L.C||Le.R&&Le.R.C){(!Le.R||!Le.R.C)&&(Le.L.C=!1,Le.C=!0,_o(this,Le),Le=se.R),Le.C=se.C,se.C=Le.R.C=!1,An(this,se),X=this._;break}}else if(Le=se.L,Le.C&&(Le.C=!1,se.C=!0,_o(this,se),Le=se.L),Le.L&&Le.L.C||Le.R&&Le.R.C){(!Le.L||!Le.L.C)&&(Le.R.C=!1,Le.C=!0,An(this,Le),Le=se.L),Le.C=se.C,se.C=Le.L.C=!1,_o(this,se),X=this._;break}Le.C=!0,X=se,se=se.U}while(!X.C);X&&(X.C=!1)}}};function An(X,se){var Le=se,We=se.R,Ye=Le.U;Ye?Ye.L===Le?Ye.L=We:Ye.R=We:X._=We,We.U=Ye,Le.U=We,Le.R=We.L,Le.R&&(Le.R.U=Le),We.L=Le}function _o(X,se){var Le=se,We=se.L,Ye=Le.U;Ye?Ye.L===Le?Ye.L=We:Ye.R=We:X._=We,We.U=Ye,Le.U=We,Le.L=We.R,Le.L&&(Le.L.U=Le),We.R=Le}function ks(X){for(;X.L;)X=X.L;return X}function bs(X,se){var Le=X.sort(ps).pop(),We,Ye,it;for(Bo=[],Ea=new Array(X.length),Ha=new Oa,Xn=new Oa;;)if(it=Cn,Le&&(!it||Le.y<it.y||Le.y===it.y&&Le.x<it.x))(Le.x!==We||Le.y!==Ye)&&(Ea[Le.i]=new ka(Le),cs(Le),We=Le.x,Ye=Le.y),Le=X.pop();else if(it)an(it.arc);else break;se&&(Qi(se),va(se));var Nt={cells:Ea,edges:Bo};return Ha=Xn=Bo=Ea=null,Nt}function ps(X,se){return se.y-X.y||se.x-X.x}e.geom.voronoi=function(X){var se=Hr,Le=na,We=se,Ye=Le,it=sa;if(X)return Nt(X);function Nt(er){var _r=new Array(er.length),wr=it[0][0],ni=it[0][1],Wr=it[1][0],Ci=it[1][1];return bs(mt(er),it).cells.forEach(function(Ji,ai){var Ti=Ji.edges,Bi=Ji.site,en=_r[ai]=Ti.length?Ti.map(function(Wi){var bi=Wi.start();return[bi.x,bi.y]}):Bi.x>=wr&&Bi.x<=Wr&&Bi.y>=ni&&Bi.y<=Ci?[[wr,Ci],[Wr,Ci],[Wr,ni],[wr,ni]]:[];en.point=er[ai]}),_r}function mt(er){return er.map(function(_r,wr){return{x:Math.round(We(_r,wr)/Fe)*Fe,y:Math.round(Ye(_r,wr)/Fe)*Fe,i:wr}})}return Nt.links=function(er){return bs(mt(er)).edges.filter(function(_r){return _r.l&&_r.r}).map(function(_r){return{source:er[_r.l.i],target:er[_r.r.i]}})},Nt.triangles=function(er){var _r=[];return bs(mt(er)).cells.forEach(function(wr,ni){for(var Wr=wr.site,Ci=wr.edges.sort(bo),Ji=-1,ai=Ci.length,Ti,Bi,en=Ci[ai-1].edge,Wi=en.l===Wr?en.r:en.l;++Ji<ai;)Ti=en,Bi=Wi,en=Ci[Ji].edge,Wi=en.l===Wr?en.r:en.l,ni<Bi.i&&ni<Wi.i&&Bn(Wr,Bi,Wi)<0&&_r.push([er[ni],er[Bi.i],er[Wi.i]])}),_r},Nt.x=function(er){return arguments.length?(We=or(se=er),Nt):se},Nt.y=function(er){return arguments.length?(Ye=or(Le=er),Nt):Le},Nt.clipExtent=function(er){return arguments.length?(it=er==null?sa:er,Nt):it===sa?null:it},Nt.size=function(er){return arguments.length?Nt.clipExtent(er&&[[0,0],er]):it===sa?null:it&&it[1]},Nt};var sa=[[-1e6,-1e6],[1e6,1e6]];function Bn(X,se,Le){return(X.x-Le.x)*(se.y-X.y)-(X.x-se.x)*(Le.y-X.y)}e.geom.delaunay=function(X){return e.geom.voronoi().triangles(X)},e.geom.quadtree=function(X,se,Le,We,Ye){var it=Hr,Nt=na,mt;if(mt=arguments.length)return it=ms,Nt=ya,mt===3&&(Ye=Le,We=se,Le=se=0),er(X);function er(_r){var wr,ni=or(it),Wr=or(Nt),Ci,Ji,ai,Ti,Bi,en,Wi,bi;if(se!=null)Bi=se,en=Le,Wi=We,bi=Ye;else if(Wi=bi=-(Bi=en=1/0),Ci=[],Ji=[],Ti=_r.length,mt)for(ai=0;ai<Ti;++ai)wr=_r[ai],wr.x<Bi&&(Bi=wr.x),wr.y<en&&(en=wr.y),wr.x>Wi&&(Wi=wr.x),wr.y>bi&&(bi=wr.y),Ci.push(wr.x),Ji.push(wr.y);else for(ai=0;ai<Ti;++ai){var ao=+ni(wr=_r[ai],ai),yo=+Wr(wr,ai);ao<Bi&&(Bi=ao),yo<en&&(en=yo),ao>Wi&&(Wi=ao),yo>bi&&(bi=yo),Ci.push(ao),Ji.push(yo)}var Ko=Wi-Bi,Ms=bi-en;Ko>Ms?bi=en+Ko:Wi=Bi+Ms;function vl(Al,nu,Bu,qu,Ju,qo,Rl,pu){if(!(isNaN(Bu)||isNaN(qu)))if(Al.leaf){var xu=Al.x,of=Al.y;if(xu!=null)if(y(xu-Bu)+y(of-qu)<.01)wl(Al,nu,Bu,qu,Ju,qo,Rl,pu);else{var ff=Al.point;Al.x=Al.y=Al.point=null,wl(Al,ff,xu,of,Ju,qo,Rl,pu),wl(Al,nu,Bu,qu,Ju,qo,Rl,pu)}else Al.x=Bu,Al.y=qu,Al.point=nu}else wl(Al,nu,Bu,qu,Ju,qo,Rl,pu)}function wl(Al,nu,Bu,qu,Ju,qo,Rl,pu){var xu=(Ju+Rl)*.5,of=(qo+pu)*.5,ff=Bu>=xu,xf=qu>=of,hf=xf<<1|ff;Al.leaf=!1,Al=Al.nodes[hf]||(Al.nodes[hf]=on()),ff?Ju=xu:Rl=xu,xf?qo=of:pu=of,vl(Al,nu,Bu,qu,Ju,qo,Rl,pu)}var au=on();if(au.add=function(Al){vl(au,Al,+ni(Al,++ai),+Wr(Al,ai),Bi,en,Wi,bi)},au.visit=function(Al){mn(Al,au,Bi,en,Wi,bi)},au.find=function(Al){return Ga(au,Al[0],Al[1],Bi,en,Wi,bi)},ai=-1,se==null){for(;++ai<Ti;)vl(au,_r[ai],Ci[ai],Ji[ai],Bi,en,Wi,bi);--ai}else _r.forEach(au.add);return Ci=Ji=_r=wr=null,au}return er.x=function(_r){return arguments.length?(it=_r,er):it},er.y=function(_r){return arguments.length?(Nt=_r,er):Nt},er.extent=function(_r){return arguments.length?(_r==null?se=Le=We=Ye=null:(se=+_r[0][0],Le=+_r[0][1],We=+_r[1][0],Ye=+_r[1][1]),er):se==null?null:[[se,Le],[We,Ye]]},er.size=function(_r){return arguments.length?(_r==null?se=Le=We=Ye=null:(se=Le=0,We=+_r[0],Ye=+_r[1]),er):se==null?null:[We-se,Ye-Le]},er};function ms(X){return X.x}function ya(X){return X.y}function on(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function mn(X,se,Le,We,Ye,it){if(!X(se,Le,We,Ye,it)){var Nt=(Le+Ye)*.5,mt=(We+it)*.5,er=se.nodes;er[0]&&mn(X,er[0],Le,We,Nt,mt),er[1]&&mn(X,er[1],Nt,We,Ye,mt),er[2]&&mn(X,er[2],Le,mt,Nt,it),er[3]&&mn(X,er[3],Nt,mt,Ye,it)}}function Ga(X,se,Le,We,Ye,it,Nt){var mt=1/0,er;return function _r(wr,ni,Wr,Ci,Ji){if(!(ni>it||Wr>Nt||Ci<We||Ji<Ye)){if(ai=wr.point){var ai,Ti=se-wr.x,Bi=Le-wr.y,en=Ti*Ti+Bi*Bi;if(en<mt){var Wi=Math.sqrt(mt=en);We=se-Wi,Ye=Le-Wi,it=se+Wi,Nt=Le+Wi,er=ai}}for(var bi=wr.nodes,ao=(ni+Ci)*.5,yo=(Wr+Ji)*.5,Ko=se>=ao,Ms=Le>=yo,vl=Ms<<1|Ko,wl=vl+4;vl<wl;++vl)if(wr=bi[vl&3])switch(vl&3){case 0:_r(wr,ni,Wr,ao,yo);break;case 1:_r(wr,ao,Wr,Ci,yo);break;case 2:_r(wr,ni,yo,ao,Ji);break;case 3:_r(wr,ao,yo,Ci,Ji);break}}}(X,We,Ye,it,Nt),er}e.interpolateRgb=ca;function ca(X,se){X=e.rgb(X),se=e.rgb(se);var Le=X.r,We=X.g,Ye=X.b,it=se.r-Le,Nt=se.g-We,mt=se.b-Ye;return function(er){return"#"+Mi(Math.round(Le+it*er))+Mi(Math.round(We+Nt*er))+Mi(Math.round(Ye+mt*er))}}e.interpolateObject=bn;function bn(X,se){var Le={},We={},Ye;for(Ye in X)Ye in se?Le[Ye]=Ya(X[Ye],se[Ye]):We[Ye]=X[Ye];for(Ye in se)Ye in X||(We[Ye]=se[Ye]);return function(it){for(Ye in Le)We[Ye]=Le[Ye](it);return We}}e.interpolateNumber=Xi;function Xi(X,se){return X=+X,se=+se,function(Le){return X*(1-Le)+se*Le}}e.interpolateString=qn;function qn(X,se){var Le=Ia.lastIndex=yn.lastIndex=0,We,Ye,it,Nt=-1,mt=[],er=[];for(X=X+"",se=se+"";(We=Ia.exec(X))&&(Ye=yn.exec(se));)(it=Ye.index)>Le&&(it=se.slice(Le,it),mt[Nt]?mt[Nt]+=it:mt[++Nt]=it),(We=We[0])===(Ye=Ye[0])?mt[Nt]?mt[Nt]+=Ye:mt[++Nt]=Ye:(mt[++Nt]=null,er.push({i:Nt,x:Xi(We,Ye)})),Le=yn.lastIndex;return Le<se.length&&(it=se.slice(Le),mt[Nt]?mt[Nt]+=it:mt[++Nt]=it),mt.length<2?er[0]?(se=er[0].x,function(_r){return se(_r)+""}):function(){return se}:(se=er.length,function(_r){for(var wr=0,ni;wr<se;++wr)mt[(ni=er[wr]).i]=ni.x(_r);return mt.join("")})}var Ia=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yn=new RegExp(Ia.source,"g");e.interpolate=Ya;function Ya(X,se){for(var Le=e.interpolators.length,We;--Le>=0&&!(We=e.interpolators[Le](X,se)););return We}e.interpolators=[function(X,se){var Le=typeof se;return(Le==="string"?tr.has(se.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(se)?ca:qn:se instanceof Di?ca:Array.isArray(se)?ba:Le==="object"&&isNaN(se)?bn:Xi)(X,se)}],e.interpolateArray=ba;function ba(X,se){var Le=[],We=[],Ye=X.length,it=se.length,Nt=Math.min(X.length,se.length),mt;for(mt=0;mt<Nt;++mt)Le.push(Ya(X[mt],se[mt]));for(;mt<Ye;++mt)We[mt]=X[mt];for(;mt<it;++mt)We[mt]=se[mt];return function(er){for(mt=0;mt<Nt;++mt)We[mt]=Le[mt](er);return We}}var Da=function(){return H},Aa=e.map({linear:Da,poly:xo,quad:function(){return ea},cubic:function(){return Sa},sin:function(){return Wa},exp:function(){return hn},circle:function(){return Un},elastic:Ss,back:Kn,bounce:function(){return ns}}),Ln=e.map({in:H,out:wa,"in-out":$i,"out-in":function(X){return $i(wa(X))}});e.ease=function(X){var se=X.indexOf("-"),Le=se>=0?X.slice(0,se):X,We=se>=0?X.slice(se+1):"in";return Le=Aa.get(Le)||Da,We=Ln.get(We)||H,wo(We(Le.apply(null,t.call(arguments,1))))};function wo(X){return function(se){return se<=0?0:se>=1?1:X(se)}}function wa(X){return function(se){return 1-X(1-se)}}function $i(X){return function(se){return .5*(se<.5?X(2*se):2-X(2-2*se))}}function ea(X){return X*X}function Sa(X){return X*X*X}function Za(X){if(X<=0)return 0;if(X>=1)return 1;var se=X*X,Le=se*X;return 4*(X<.5?Le:3*(X-se)+Le-.75)}function xo(X){return function(se){return Math.pow(se,X)}}function Wa(X){return 1-Math.cos(X*ue)}function hn(X){return Math.pow(2,10*(X-1))}function Un(X){return 1-Math.sqrt(1-X*X)}function Ss(X,se){var Le;return arguments.length<2&&(se=.45),arguments.length?Le=se/lt*Math.asin(1/X):(X=1,Le=se/4),function(We){return 1+X*Math.pow(2,-10*We)*Math.sin((We-Le)*lt/se)}}function Kn(X){return X||(X=1.70158),function(se){return se*se*((X+1)*se-X)}}function ns(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=Jo;function Jo(X,se){X=e.hcl(X),se=e.hcl(se);var Le=X.h,We=X.c,Ye=X.l,it=se.h-Le,Nt=se.c-We,mt=se.l-Ye;return isNaN(Nt)&&(Nt=0,We=isNaN(We)?se.c:We),isNaN(it)?(it=0,Le=isNaN(Le)?se.h:Le):it>180?it-=360:it<-180&&(it+=360),function(er){return br(Le+it*er,We+Nt*er,Ye+mt*er)+""}}e.interpolateHsl=vo;function vo(X,se){X=e.hsl(X),se=e.hsl(se);var Le=X.h,We=X.s,Ye=X.l,it=se.h-Le,Nt=se.s-We,mt=se.l-Ye;return isNaN(Nt)&&(Nt=0,We=isNaN(We)?se.s:We),isNaN(it)?(it=0,Le=isNaN(Le)?se.h:Le):it>180?it-=360:it<-180&&(it+=360),function(er){return Dt(Le+it*er,We+Nt*er,Ye+mt*er)+""}}e.interpolateLab=ma;function ma(X,se){X=e.lab(X),se=e.lab(se);var Le=X.l,We=X.a,Ye=X.b,it=se.l-Le,Nt=se.a-We,mt=se.b-Ye;return function(er){return Pi(Le+it*er,We+Nt*er,Ye+mt*er)+""}}e.interpolateRound=ja;function ja(X,se){return se-=X,function(Le){return Math.round(X+se*Le)}}e.transform=function(X){var se=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(Le){if(Le!=null){se.setAttribute("transform",Le);var We=se.transform.baseVal.consolidate()}return new To(We?We.matrix:ho)})(X)};function To(X){var se=[X.a,X.b],Le=[X.c,X.d],We=la(se),Ye=Ao(se,Le),it=la(Ki(Le,se,-Ye))||0;se[0]*Le[1]<Le[0]*se[1]&&(se[0]*=-1,se[1]*=-1,We*=-1,Ye*=-1),this.rotate=(We?Math.atan2(se[1],se[0]):Math.atan2(-Le[0],Le[1]))*ht,this.translate=[X.e,X.f],this.scale=[We,it],this.skew=it?Math.atan2(Ye,it)*ht:0}To.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function Ao(X,se){return X[0]*se[0]+X[1]*se[1]}function la(X){var se=Math.sqrt(Ao(X,X));return se&&(X[0]/=se,X[1]/=se),se}function Ki(X,se,Le){return X[0]+=Le*se[0],X[1]+=Le*se[1],X}var ho={a:1,b:0,c:0,d:1,e:0,f:0};e.interpolateTransform=Ds;function Ka(X){return X.length?X.pop()+",":""}function Ca(X,se,Le,We){if(X[0]!==se[0]||X[1]!==se[1]){var Ye=Le.push("translate(",null,",",null,")");We.push({i:Ye-4,x:Xi(X[0],se[0])},{i:Ye-2,x:Xi(X[1],se[1])})}else(se[0]||se[1])&&Le.push("translate("+se+")")}function ta(X,se,Le,We){X!==se?(X-se>180?se+=360:se-X>180&&(X+=360),We.push({i:Le.push(Ka(Le)+"rotate(",null,")")-2,x:Xi(X,se)})):se&&Le.push(Ka(Le)+"rotate("+se+")")}function En(X,se,Le,We){X!==se?We.push({i:Le.push(Ka(Le)+"skewX(",null,")")-2,x:Xi(X,se)}):se&&Le.push(Ka(Le)+"skewX("+se+")")}function Mo(X,se,Le,We){if(X[0]!==se[0]||X[1]!==se[1]){var Ye=Le.push(Ka(Le)+"scale(",null,",",null,")");We.push({i:Ye-4,x:Xi(X[0],se[0])},{i:Ye-2,x:Xi(X[1],se[1])})}else(se[0]!==1||se[1]!==1)&&Le.push(Ka(Le)+"scale("+se+")")}function Ds(X,se){var Le=[],We=[];return X=e.transform(X),se=e.transform(se),Ca(X.translate,se.translate,Le,We),ta(X.rotate,se.rotate,Le,We),En(X.skew,se.skew,Le,We),Mo(X.scale,se.scale,Le,We),X=se=null,function(Ye){for(var it=-1,Nt=We.length,mt;++it<Nt;)Le[(mt=We[it]).i]=mt.x(Ye);return Le.join("")}}function Ro(X,se){return se=(se-=X=+X)||1/se,function(Le){return(Le-X)/se}}function vs(X,se){return se=(se-=X=+X)||1/se,function(Le){return Math.max(0,Math.min(1,(Le-X)/se))}}e.layout={},e.layout.bundle=function(){return function(X){for(var se=[],Le=-1,We=X.length;++Le<We;)se.push(Ks(X[Le]));return se}};function Ks(X){for(var se=X.source,Le=X.target,We=Jn(se,Le),Ye=[se];se!==We;)se=se.parent,Ye.push(se);for(var it=Ye.length;Le!==We;)Ye.splice(it,0,Le),Le=Le.parent;return Ye}function as(X){for(var se=[],Le=X.parent;Le!=null;)se.push(X),X=Le,Le=Le.parent;return se.push(X),se}function Jn(X,se){if(X===se)return X;for(var Le=as(X),We=as(se),Ye=Le.pop(),it=We.pop(),Nt=null;Ye===it;)Nt=Ye,Ye=Le.pop(),it=We.pop();return Nt}e.layout.chord=function(){var X={},se,Le,We,Ye,it=0,Nt,mt,er;function _r(){var ni={},Wr=[],Ci=e.range(Ye),Ji=[],ai,Ti,Bi,en,Wi;for(se=[],Le=[],ai=0,en=-1;++en<Ye;){for(Ti=0,Wi=-1;++Wi<Ye;)Ti+=We[en][Wi];Wr.push(Ti),Ji.push(e.range(Ye)),ai+=Ti}for(Nt&&Ci.sort(function(au,Al){return Nt(Wr[au],Wr[Al])}),mt&&Ji.forEach(function(au,Al){au.sort(function(nu,Bu){return mt(We[Al][nu],We[Al][Bu])})}),ai=(lt-it*Ye)/ai,Ti=0,en=-1;++en<Ye;){for(Bi=Ti,Wi=-1;++Wi<Ye;){var bi=Ci[en],ao=Ji[bi][Wi],yo=We[bi][ao],Ko=Ti,Ms=Ti+=yo*ai;ni[bi+"-"+ao]={index:bi,subindex:ao,startAngle:Ko,endAngle:Ms,value:yo}}Le[bi]={index:bi,startAngle:Bi,endAngle:Ti,value:Wr[bi]},Ti+=it}for(en=-1;++en<Ye;)for(Wi=en-1;++Wi<Ye;){var vl=ni[en+"-"+Wi],wl=ni[Wi+"-"+en];(vl.value||wl.value)&&se.push(vl.value<wl.value?{source:wl,target:vl}:{source:vl,target:wl})}er&&wr()}function wr(){se.sort(function(ni,Wr){return er((ni.source.value+ni.target.value)/2,(Wr.source.value+Wr.target.value)/2)})}return X.matrix=function(ni){return arguments.length?(Ye=(We=ni)&&We.length,se=Le=null,X):We},X.padding=function(ni){return arguments.length?(it=ni,se=Le=null,X):it},X.sortGroups=function(ni){return arguments.length?(Nt=ni,se=Le=null,X):Nt},X.sortSubgroups=function(ni){return arguments.length?(mt=ni,se=null,X):mt},X.sortChords=function(ni){return arguments.length?(er=ni,se&&wr(),X):er},X.chords=function(){return se||_r(),se},X.groups=function(){return Le||_r(),Le},X},e.layout.force=function(){var X={},se=e.dispatch("start","tick","end"),Le,We=[1,1],Ye,it,Nt=.9,mt=$a,er=Xo,_r=-30,wr=rs,ni=.1,Wr=.64,Ci=[],Ji=[],ai,Ti,Bi;function en(bi){return function(ao,yo,Ko,Ms){if(ao.point!==bi){var vl=ao.cx-bi.x,wl=ao.cy-bi.y,au=Ms-yo,Al=vl*vl+wl*wl;if(au*au/Wr<Al){if(Al<wr){var nu=ao.charge/Al;bi.px-=vl*nu,bi.py-=wl*nu}return!0}if(ao.point&&Al&&Al<wr){var nu=ao.pointCharge/Al;bi.px-=vl*nu,bi.py-=wl*nu}}return!ao.charge}}X.tick=function(){if((it*=.99)<.005)return Le=null,se.end({type:"end",alpha:it=0}),!0;var bi=Ci.length,ao=Ji.length,yo,Ko,Ms,vl,wl,au,Al,nu,Bu;for(Ko=0;Ko<ao;++Ko)Ms=Ji[Ko],vl=Ms.source,wl=Ms.target,nu=wl.x-vl.x,Bu=wl.y-vl.y,(au=nu*nu+Bu*Bu)&&(au=it*Ti[Ko]*((au=Math.sqrt(au))-ai[Ko])/au,nu*=au,Bu*=au,wl.x-=nu*(Al=vl.weight+wl.weight?vl.weight/(vl.weight+wl.weight):.5),wl.y-=Bu*Al,vl.x+=nu*(Al=1-Al),vl.y+=Bu*Al);if((Al=it*ni)&&(nu=We[0]/2,Bu=We[1]/2,Ko=-1,Al))for(;++Ko<bi;)Ms=Ci[Ko],Ms.x+=(nu-Ms.x)*Al,Ms.y+=(Bu-Ms.y)*Al;if(_r)for(lo(yo=e.geom.quadtree(Ci),it,Bi),Ko=-1;++Ko<bi;)(Ms=Ci[Ko]).fixed||yo.visit(en(Ms));for(Ko=-1;++Ko<bi;)Ms=Ci[Ko],Ms.fixed?(Ms.x=Ms.px,Ms.y=Ms.py):(Ms.x-=(Ms.px-(Ms.px=Ms.x))*Nt,Ms.y-=(Ms.py-(Ms.py=Ms.y))*Nt);se.tick({type:"tick",alpha:it})},X.nodes=function(bi){return arguments.length?(Ci=bi,X):Ci},X.links=function(bi){return arguments.length?(Ji=bi,X):Ji},X.size=function(bi){return arguments.length?(We=bi,X):We},X.linkDistance=function(bi){return arguments.length?(mt=typeof bi=="function"?bi:+bi,X):mt},X.distance=X.linkDistance,X.linkStrength=function(bi){return arguments.length?(er=typeof bi=="function"?bi:+bi,X):er},X.friction=function(bi){return arguments.length?(Nt=+bi,X):Nt},X.charge=function(bi){return arguments.length?(_r=typeof bi=="function"?bi:+bi,X):_r},X.chargeDistance=function(bi){return arguments.length?(wr=bi*bi,X):Math.sqrt(wr)},X.gravity=function(bi){return arguments.length?(ni=+bi,X):ni},X.theta=function(bi){return arguments.length?(Wr=bi*bi,X):Math.sqrt(Wr)},X.alpha=function(bi){return arguments.length?(bi=+bi,it?bi>0?it=bi:(Le.c=null,Le.t=NaN,Le=null,se.end({type:"end",alpha:it=0})):bi>0&&(se.start({type:"start",alpha:it=bi}),Le=Wn(X.tick)),X):it},X.start=function(){var bi,ao=Ci.length,yo=Ji.length,Ko=We[0],Ms=We[1],vl,wl;for(bi=0;bi<ao;++bi)(wl=Ci[bi]).index=bi,wl.weight=0;for(bi=0;bi<yo;++bi)wl=Ji[bi],typeof wl.source=="number"&&(wl.source=Ci[wl.source]),typeof wl.target=="number"&&(wl.target=Ci[wl.target]),++wl.source.weight,++wl.target.weight;for(bi=0;bi<ao;++bi)wl=Ci[bi],isNaN(wl.x)&&(wl.x=au("x",Ko)),isNaN(wl.y)&&(wl.y=au("y",Ms)),isNaN(wl.px)&&(wl.px=wl.x),isNaN(wl.py)&&(wl.py=wl.y);if(ai=[],typeof mt=="function")for(bi=0;bi<yo;++bi)ai[bi]=+mt.call(this,Ji[bi],bi);else for(bi=0;bi<yo;++bi)ai[bi]=mt;if(Ti=[],typeof er=="function")for(bi=0;bi<yo;++bi)Ti[bi]=+er.call(this,Ji[bi],bi);else for(bi=0;bi<yo;++bi)Ti[bi]=er;if(Bi=[],typeof _r=="function")for(bi=0;bi<ao;++bi)Bi[bi]=+_r.call(this,Ci[bi],bi);else for(bi=0;bi<ao;++bi)Bi[bi]=_r;function au(Al,nu){if(!vl){for(vl=new Array(ao),Ju=0;Ju<ao;++Ju)vl[Ju]=[];for(Ju=0;Ju<yo;++Ju){var Bu=Ji[Ju];vl[Bu.source.index].push(Bu.target),vl[Bu.target.index].push(Bu.source)}}for(var qu=vl[bi],Ju=-1,qo=qu.length,Rl;++Ju<qo;)if(!isNaN(Rl=qu[Ju][Al]))return Rl;return Math.random()*nu}return X.resume()},X.resume=function(){return X.alpha(.1)},X.stop=function(){return X.alpha(0)},X.drag=function(){if(Ye||(Ye=e.behavior.drag().origin(H).on("dragstart.force",Cs).on("drag.force",Wi).on("dragend.force",Xa)),!arguments.length)return Ye;this.on("mouseover.force",Zo).on("mouseout.force",Eo).call(Ye)};function Wi(bi){bi.px=e.event.x,bi.py=e.event.y,X.resume()}return e.rebind(X,se,"on")};function Cs(X){X.fixed|=2}function Xa(X){X.fixed&=-7}function Zo(X){X.fixed|=4,X.px=X.x,X.py=X.y}function Eo(X){X.fixed&=-5}function lo(X,se,Le){var We=0,Ye=0;if(X.charge=0,!X.leaf)for(var it=X.nodes,Nt=it.length,mt=-1,er;++mt<Nt;)er=it[mt],er!=null&&(lo(er,se,Le),X.charge+=er.charge,We+=er.charge*er.cx,Ye+=er.charge*er.cy);if(X.point){X.leaf||(X.point.x+=Math.random()-.5,X.point.y+=Math.random()-.5);var _r=se*Le[X.point.index];X.charge+=X.pointCharge=_r,We+=_r*X.point.x,Ye+=_r*X.point.y}X.cx=We/X.charge,X.cy=Ye/X.charge}var $a=20,Xo=1,rs=1/0;e.layout.hierarchy=function(){var X=Go,se=Rs,Le=xs;function We(Ye){var it=[Ye],Nt=[],mt;for(Ye.depth=0;(mt=it.pop())!=null;)if(Nt.push(mt),(_r=se.call(We,mt,mt.depth))&&(er=_r.length)){for(var er,_r,wr;--er>=0;)it.push(wr=_r[er]),wr.parent=mt,wr.depth=mt.depth+1;Le&&(mt.value=0),mt.children=_r}else Le&&(mt.value=+Le.call(We,mt,mt.depth)||0),delete mt.children;return uo(Ye,function(ni){var Wr,Ci;X&&(Wr=ni.children)&&Wr.sort(X),Le&&(Ci=ni.parent)&&(Ci.value+=ni.value)}),Nt}return We.sort=function(Ye){return arguments.length?(X=Ye,We):X},We.children=function(Ye){return arguments.length?(se=Ye,We):se},We.value=function(Ye){return arguments.length?(Le=Ye,We):Le},We.revalue=function(Ye){return Le&&(Sn(Ye,function(it){it.children&&(it.value=0)}),uo(Ye,function(it){var Nt;it.children||(it.value=+Le.call(We,it,it.depth)||0),(Nt=it.parent)&&(Nt.value+=it.value)})),Ye},We};function $n(X,se){return e.rebind(X,se,"sort","children","value"),X.nodes=X,X.links=os,X}function Sn(X,se){for(var Le=[X];(X=Le.pop())!=null;)if(se(X),(Ye=X.children)&&(We=Ye.length))for(var We,Ye;--We>=0;)Le.push(Ye[We])}function uo(X,se){for(var Le=[X],We=[];(X=Le.pop())!=null;)if(We.push(X),(Nt=X.children)&&(it=Nt.length))for(var Ye=-1,it,Nt;++Ye<it;)Le.push(Nt[Ye]);for(;(X=We.pop())!=null;)se(X)}function Rs(X){return X.children}function xs(X){return X.value}function Go(X,se){return se.value-X.value}function os(X){return e.merge(X.map(function(se){return(se.children||[]).map(function(Le){return{source:se,target:Le}})}))}e.layout.partition=function(){var X=e.layout.hierarchy(),se=[1,1];function Le(it,Nt,mt,er){var _r=it.children;if(it.x=Nt,it.y=it.depth*er,it.dx=mt,it.dy=er,_r&&(ni=_r.length)){var wr=-1,ni,Wr,Ci;for(mt=it.value?mt/it.value:0;++wr<ni;)Le(Wr=_r[wr],Nt,Ci=Wr.value*mt,er),Nt+=Ci}}function We(it){var Nt=it.children,mt=0;if(Nt&&(_r=Nt.length))for(var er=-1,_r;++er<_r;)mt=Math.max(mt,We(Nt[er]));return 1+mt}function Ye(it,Nt){var mt=X.call(this,it,Nt);return Le(mt[0],0,se[0],se[1]/We(mt[0])),mt}return Ye.size=function(it){return arguments.length?(se=it,Ye):se},$n(Ye,X)},e.layout.pie=function(){var X=Number,se=So,Le=0,We=lt,Ye=0;function it(Nt){var mt=Nt.length,er=Nt.map(function(en,Wi){return+X.call(it,en,Wi)}),_r=+(typeof Le=="function"?Le.apply(this,arguments):Le),wr=(typeof We=="function"?We.apply(this,arguments):We)-_r,ni=Math.min(Math.abs(wr)/mt,+(typeof Ye=="function"?Ye.apply(this,arguments):Ye)),Wr=ni*(wr<0?-1:1),Ci=e.sum(er),Ji=Ci?(wr-mt*Wr)/Ci:0,ai=e.range(mt),Ti=[],Bi;return se!=null&&ai.sort(se===So?function(en,Wi){return er[Wi]-er[en]}:function(en,Wi){return se(Nt[en],Nt[Wi])}),ai.forEach(function(en){Ti[en]={data:Nt[en],value:Bi=er[en],startAngle:_r,endAngle:_r+=Bi*Ji+Wr,padAngle:ni}}),Ti}return it.value=function(Nt){return arguments.length?(X=Nt,it):X},it.sort=function(Nt){return arguments.length?(se=Nt,it):se},it.startAngle=function(Nt){return arguments.length?(Le=Nt,it):Le},it.endAngle=function(Nt){return arguments.length?(We=Nt,it):We},it.padAngle=function(Nt){return arguments.length?(Ye=Nt,it):Ye},it};var So={};e.layout.stack=function(){var X=H,se=Ua,Le=Po,We=rl,Ye=Qn,it=zo;function Nt(mt,er){if(!(Ji=mt.length))return mt;var _r=mt.map(function(en,Wi){return X.call(Nt,en,Wi)}),wr=_r.map(function(en){return en.map(function(Wi,bi){return[Ye.call(Nt,Wi,bi),it.call(Nt,Wi,bi)]})}),ni=se.call(Nt,wr,er);_r=e.permute(_r,ni),wr=e.permute(wr,ni);var Wr=Le.call(Nt,wr,er),Ci=_r[0].length,Ji,ai,Ti,Bi;for(Ti=0;Ti<Ci;++Ti)for(We.call(Nt,_r[0][Ti],Bi=Wr[Ti],wr[0][Ti][1]),ai=1;ai<Ji;++ai)We.call(Nt,_r[ai][Ti],Bi+=wr[ai-1][Ti][1],wr[ai][Ti][1]);return mt}return Nt.values=function(mt){return arguments.length?(X=mt,Nt):X},Nt.order=function(mt){return arguments.length?(se=typeof mt=="function"?mt:$o.get(mt)||Ua,Nt):se},Nt.offset=function(mt){return arguments.length?(Le=typeof mt=="function"?mt:Na.get(mt)||Po,Nt):Le},Nt.x=function(mt){return arguments.length?(Ye=mt,Nt):Ye},Nt.y=function(mt){return arguments.length?(it=mt,Nt):it},Nt.out=function(mt){return arguments.length?(We=mt,Nt):We},Nt};function Qn(X){return X.x}function zo(X){return X.y}function rl(X,se,Le){X.y0=se,X.y=Le}var $o=e.map({"inside-out":function(X){var se=X.length,Le,We,Ye=X.map(fo),it=X.map(ro),Nt=e.range(se).sort(function(ni,Wr){return Ye[ni]-Ye[Wr]}),mt=0,er=0,_r=[],wr=[];for(Le=0;Le<se;++Le)We=Nt[Le],mt<er?(mt+=it[We],_r.push(We)):(er+=it[We],wr.push(We));return wr.reverse().concat(_r)},reverse:function(X){return e.range(X.length).reverse()},default:Ua}),Na=e.map({silhouette:function(X){var se=X.length,Le=X[0].length,We=[],Ye=0,it,Nt,mt,er=[];for(Nt=0;Nt<Le;++Nt){for(it=0,mt=0;it<se;it++)mt+=X[it][Nt][1];mt>Ye&&(Ye=mt),We.push(mt)}for(Nt=0;Nt<Le;++Nt)er[Nt]=(Ye-We[Nt])/2;return er},wiggle:function(X){var se=X.length,Le=X[0],We=Le.length,Ye,it,Nt,mt,er,_r,wr,ni,Wr,Ci=[];for(Ci[0]=ni=Wr=0,it=1;it<We;++it){for(Ye=0,mt=0;Ye<se;++Ye)mt+=X[Ye][it][1];for(Ye=0,er=0,wr=Le[it][0]-Le[it-1][0];Ye<se;++Ye){for(Nt=0,_r=(X[Ye][it][1]-X[Ye][it-1][1])/(2*wr);Nt<Ye;++Nt)_r+=(X[Nt][it][1]-X[Nt][it-1][1])/wr;er+=_r*X[Ye][it][1]}Ci[it]=ni-=mt?er/mt*wr:0,ni<Wr&&(Wr=ni)}for(it=0;it<We;++it)Ci[it]-=Wr;return Ci},expand:function(X){var se=X.length,Le=X[0].length,We=1/se,Ye,it,Nt,mt=[];for(it=0;it<Le;++it){for(Ye=0,Nt=0;Ye<se;Ye++)Nt+=X[Ye][it][1];if(Nt)for(Ye=0;Ye<se;Ye++)X[Ye][it][1]/=Nt;else for(Ye=0;Ye<se;Ye++)X[Ye][it][1]=We}for(it=0;it<Le;++it)mt[it]=0;return mt},zero:Po});function Ua(X){return e.range(X.length)}function Po(X){for(var se=-1,Le=X[0].length,We=[];++se<Le;)We[se]=0;return We}function fo(X){for(var se=1,Le=0,We=X[0][1],Ye,it=X.length;se<it;++se)(Ye=X[se][1])>We&&(Le=se,We=Ye);return Le}function ro(X){return X.reduce(Ma,0)}function Ma(X,se){return X+se[1]}e.layout.histogram=function(){var X=!0,se=Number,Le=Oo,We=io;function Ye(it,Wr){for(var mt=[],er=it.map(se,this),_r=Le.call(this,er,Wr),wr=We.call(this,_r,er,Wr),ni,Wr=-1,Ci=er.length,Ji=wr.length-1,ai=X?1:1/Ci,Ti;++Wr<Ji;)ni=mt[Wr]=[],ni.dx=wr[Wr+1]-(ni.x=wr[Wr]),ni.y=0;if(Ji>0)for(Wr=-1;++Wr<Ci;)Ti=er[Wr],Ti>=_r[0]&&Ti<=_r[1]&&(ni=mt[e.bisect(wr,Ti,1,Ji)-1],ni.y+=ai,ni.push(it[Wr]));return mt}return Ye.value=function(it){return arguments.length?(se=it,Ye):se},Ye.range=function(it){return arguments.length?(Le=or(it),Ye):Le},Ye.bins=function(it){return arguments.length?(We=typeof it=="number"?function(Nt){return aa(Nt,it)}:or(it),Ye):We},Ye.frequency=function(it){return arguments.length?(X=!!it,Ye):X},Ye};function io(X,se){return aa(X,Math.ceil(Math.log(se.length)/Math.LN2+1))}function aa(X,se){for(var Le=-1,We=+X[0],Ye=(X[1]-We)/se,it=[];++Le<=se;)it[Le]=Ye*Le+We;return it}function Oo(X){return[e.min(X),e.max(X)]}e.layout.pack=function(){var X=e.layout.hierarchy().sort(No),se=0,Le=[1,1],We;function Ye(it,Nt){var mt=X.call(this,it,Nt),er=mt[0],_r=Le[0],wr=Le[1],ni=We==null?Math.sqrt:typeof We=="function"?We:function(){return We};if(er.x=er.y=0,uo(er,function(Ci){Ci.r=+ni(Ci.value)}),uo(er,no),se){var Wr=se*(We?1:Math.max(2*er.r/_r,2*er.r/wr))/2;uo(er,function(Ci){Ci.r+=Wr}),uo(er,no),uo(er,function(Ci){Ci.r-=Wr})}return Xs(er,_r/2,wr/2,We?1:1/Math.max(2*er.r/_r,2*er.r/wr)),mt}return Ye.size=function(it){return arguments.length?(Le=it,Ye):Le},Ye.radius=function(it){return arguments.length?(We=it==null||typeof it=="function"?it:+it,Ye):We},Ye.padding=function(it){return arguments.length?(se=+it,Ye):se},$n(Ye,X)};function No(X,se){return X.value-se.value}function Zs(X,se){var Le=X._pack_next;X._pack_next=se,se._pack_prev=X,se._pack_next=Le,Le._pack_prev=se}function Fs(X,se){X._pack_next=se,se._pack_prev=X}function ws(X,se){var Le=se.x-X.x,We=se.y-X.y,Ye=X.r+se.r;return .999*Ye*Ye>Le*Le+We*We}function no(X){if(!(se=X.children)||!(Wr=se.length))return;var se,Le=1/0,We=-1/0,Ye=1/0,it=-1/0,Nt,mt,er,_r,wr,ni,Wr;function Ci(bi){Le=Math.min(bi.x-bi.r,Le),We=Math.max(bi.x+bi.r,We),Ye=Math.min(bi.y-bi.r,Ye),it=Math.max(bi.y+bi.r,it)}if(se.forEach(Ls),Nt=se[0],Nt.x=-Nt.r,Nt.y=0,Ci(Nt),Wr>1&&(mt=se[1],mt.x=mt.r,mt.y=0,Ci(mt),Wr>2))for(er=se[2],oa(Nt,mt,er),Ci(er),Zs(Nt,er),Nt._pack_prev=er,Zs(er,mt),mt=Nt._pack_next,_r=3;_r<Wr;_r++){oa(Nt,mt,er=se[_r]);var Ji=0,ai=1,Ti=1;for(wr=mt._pack_next;wr!==mt;wr=wr._pack_next,ai++)if(ws(wr,er)){Ji=1;break}if(Ji==1)for(ni=Nt._pack_prev;ni!==wr._pack_prev&&!ws(ni,er);ni=ni._pack_prev,Ti++);Ji?(ai<Ti||ai==Ti&&mt.r<Nt.r?Fs(Nt,mt=wr):Fs(Nt=ni,mt),_r--):(Zs(Nt,er),mt=er,Ci(er))}var Bi=(Le+We)/2,en=(Ye+it)/2,Wi=0;for(_r=0;_r<Wr;_r++)er=se[_r],er.x-=Bi,er.y-=en,Wi=Math.max(Wi,er.r+Math.sqrt(er.x*er.x+er.y*er.y));X.r=Wi,se.forEach(ds)}function Ls(X){X._pack_next=X._pack_prev=X}function ds(X){delete X._pack_next,delete X._pack_prev}function Xs(X,se,Le,We){var Ye=X.children;if(X.x=se+=We*X.x,X.y=Le+=We*X.y,X.r*=We,Ye)for(var it=-1,Nt=Ye.length;++it<Nt;)Xs(Ye[it],se,Le,We)}function oa(X,se,Le){var We=X.r+Le.r,Ye=se.x-X.x,it=se.y-X.y;if(We&&(Ye||it)){var Nt=se.r+Le.r,mt=Ye*Ye+it*it;Nt*=Nt,We*=We;var er=.5+(We-Nt)/(2*mt),_r=Math.sqrt(Math.max(0,2*Nt*(We+mt)-(We-=mt)*We-Nt*Nt))/(2*mt);Le.x=X.x+er*Ye+_r*it,Le.y=X.y+er*it-_r*Ye}else Le.x=X.x+We,Le.y=X.y}e.layout.tree=function(){var X=e.layout.hierarchy().sort(null).value(null),se=Yo,Le=[1,1],We=null;function Ye(wr,ni){var Wr=X.call(this,wr,ni),Ci=Wr[0],Ji=it(Ci);if(uo(Ji,Nt),Ji.parent.m=-Ji.z,Sn(Ji,mt),We)Sn(Ci,_r);else{var ai=Ci,Ti=Ci,Bi=Ci;Sn(Ci,function(ao){ao.x<ai.x&&(ai=ao),ao.x>Ti.x&&(Ti=ao),ao.depth>Bi.depth&&(Bi=ao)});var en=se(ai,Ti)/2-ai.x,Wi=Le[0]/(Ti.x+se(Ti,ai)/2+en),bi=Le[1]/(Bi.depth||1);Sn(Ci,function(ao){ao.x=(ao.x+en)*Wi,ao.y=ao.depth*bi})}return Wr}function it(wr){for(var ni={A:null,children:[wr]},Wr=[ni],Ci;(Ci=Wr.pop())!=null;)for(var Ji=Ci.children,ai,Ti=0,Bi=Ji.length;Ti<Bi;++Ti)Wr.push((Ji[Ti]=ai={_:Ji[Ti],parent:Ci,children:(ai=Ji[Ti].children)&&ai.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:Ti}).a=ai);return ni.children[0]}function Nt(wr){var ni=wr.children,Wr=wr.parent.children,Ci=wr.i?Wr[wr.i-1]:null;if(ni.length){gs(wr);var Ji=(ni[0].z+ni[ni.length-1].z)/2;Ci?(wr.z=Ci.z+se(wr._,Ci._),wr.m=wr.z-Ji):wr.z=Ji}else Ci&&(wr.z=Ci.z+se(wr._,Ci._));wr.parent.A=er(wr,Ci,wr.parent.A||Wr[0])}function mt(wr){wr._.x=wr.z+wr.parent.m,wr.m+=wr.parent.m}function er(wr,ni,Wr){if(ni){for(var Ci=wr,Ji=wr,ai=ni,Ti=Ci.parent.children[0],Bi=Ci.m,en=Ji.m,Wi=ai.m,bi=Ti.m,ao;ai=ss(ai),Ci=po(Ci),ai&&Ci;)Ti=po(Ti),Ji=ss(Ji),Ji.a=wr,ao=ai.z+Wi-Ci.z-Bi+se(ai._,Ci._),ao>0&&(ls(bt(ai,wr,Wr),wr,ao),Bi+=ao,en+=ao),Wi+=ai.m,Bi+=Ci.m,bi+=Ti.m,en+=Ji.m;ai&&!ss(Ji)&&(Ji.t=ai,Ji.m+=Wi-en),Ci&&!po(Ti)&&(Ti.t=Ci,Ti.m+=Bi-bi,Wr=wr)}return Wr}function _r(wr){wr.x*=Le[0],wr.y=wr.depth*Le[1]}return Ye.separation=function(wr){return arguments.length?(se=wr,Ye):se},Ye.size=function(wr){return arguments.length?(We=(Le=wr)==null?_r:null,Ye):We?null:Le},Ye.nodeSize=function(wr){return arguments.length?(We=(Le=wr)==null?null:_r,Ye):We?Le:null},$n(Ye,X)};function Yo(X,se){return X.parent==se.parent?1:2}function po(X){var se=X.children;return se.length?se[0]:X.t}function ss(X){var se=X.children,Le;return(Le=se.length)?se[Le-1]:X.t}function ls(X,se,Le){var We=Le/(se.i-X.i);se.c-=We,se.s+=Le,X.c+=We,se.z+=Le,se.m+=Le}function gs(X){for(var se=0,Le=0,We=X.children,Ye=We.length,it;--Ye>=0;)it=We[Ye],it.z+=se,it.m+=se,se+=it.s+(Le+=it.c)}function bt(X,se,Le){return X.a.parent===se.parent?X.a:Le}e.layout.cluster=function(){var X=e.layout.hierarchy().sort(null).value(null),se=Yo,Le=[1,1],We=!1;function Ye(it,Nt){var mt=X.call(this,it,Nt),er=mt[0],_r,wr=0;uo(er,function(ai){var Ti=ai.children;Ti&&Ti.length?(ai.x=hr(Ti),ai.y=Ft(Ti)):(ai.x=_r?wr+=se(ai,_r):0,ai.y=0,_r=ai)});var ni=nr(er),Wr=Sr(er),Ci=ni.x-se(ni,Wr)/2,Ji=Wr.x+se(Wr,ni)/2;return uo(er,We?function(ai){ai.x=(ai.x-er.x)*Le[0],ai.y=(er.y-ai.y)*Le[1]}:function(ai){ai.x=(ai.x-Ci)/(Ji-Ci)*Le[0],ai.y=(1-(er.y?ai.y/er.y:1))*Le[1]}),mt}return Ye.separation=function(it){return arguments.length?(se=it,Ye):se},Ye.size=function(it){return arguments.length?(We=(Le=it)==null,Ye):We?null:Le},Ye.nodeSize=function(it){return arguments.length?(We=(Le=it)!=null,Ye):We?Le:null},$n(Ye,X)};function Ft(X){return 1+e.max(X,function(se){return se.y})}function hr(X){return X.reduce(function(se,Le){return se+Le.x},0)/X.length}function nr(X){var se=X.children;return se&&se.length?nr(se[0]):X}function Sr(X){var se=X.children,Le;return se&&(Le=se.length)?Sr(se[Le-1]):X}e.layout.treemap=function(){var X=e.layout.hierarchy(),se=Math.round,Le=[1,1],We=null,Ye=li,it=!1,Nt,mt="squarify",er=.5*(1+Math.sqrt(5));function _r(ai,Ti){for(var Bi=-1,en=ai.length,Wi,bi;++Bi<en;)bi=(Wi=ai[Bi]).value*(Ti<0?0:Ti),Wi.area=isNaN(bi)||bi<=0?0:bi}function wr(ai){var Ti=ai.children;if(Ti&&Ti.length){var Bi=Ye(ai),en=[],Wi=Ti.slice(),bi,ao=1/0,yo,Ko=mt==="slice"?Bi.dx:mt==="dice"?Bi.dy:mt==="slice-dice"?ai.depth&1?Bi.dy:Bi.dx:Math.min(Bi.dx,Bi.dy),Ms;for(_r(Wi,Bi.dx*Bi.dy/ai.value),en.area=0;(Ms=Wi.length)>0;)en.push(bi=Wi[Ms-1]),en.area+=bi.area,mt!=="squarify"||(yo=Wr(en,Ko))<=ao?(Wi.pop(),ao=yo):(en.area-=en.pop().area,Ci(en,Ko,Bi,!1),Ko=Math.min(Bi.dx,Bi.dy),en.length=en.area=0,ao=1/0);en.length&&(Ci(en,Ko,Bi,!0),en.length=en.area=0),Ti.forEach(wr)}}function ni(ai){var Ti=ai.children;if(Ti&&Ti.length){var Bi=Ye(ai),en=Ti.slice(),Wi,bi=[];for(_r(en,Bi.dx*Bi.dy/ai.value),bi.area=0;Wi=en.pop();)bi.push(Wi),bi.area+=Wi.area,Wi.z!=null&&(Ci(bi,Wi.z?Bi.dx:Bi.dy,Bi,!en.length),bi.length=bi.area=0);Ti.forEach(ni)}}function Wr(ai,Ti){for(var Bi=ai.area,en,Wi=0,bi=1/0,ao=-1,yo=ai.length;++ao<yo;)(en=ai[ao].area)&&(en<bi&&(bi=en),en>Wi&&(Wi=en));return Bi*=Bi,Ti*=Ti,Bi?Math.max(Ti*Wi*er/Bi,Bi/(Ti*bi*er)):1/0}function Ci(ai,Ti,Bi,en){var Wi=-1,bi=ai.length,ao=Bi.x,yo=Bi.y,Ko=Ti?se(ai.area/Ti):0,Ms;if(Ti==Bi.dx){for((en||Ko>Bi.dy)&&(Ko=Bi.dy);++Wi<bi;)Ms=ai[Wi],Ms.x=ao,Ms.y=yo,Ms.dy=Ko,ao+=Ms.dx=Math.min(Bi.x+Bi.dx-ao,Ko?se(Ms.area/Ko):0);Ms.z=!0,Ms.dx+=Bi.x+Bi.dx-ao,Bi.y+=Ko,Bi.dy-=Ko}else{for((en||Ko>Bi.dx)&&(Ko=Bi.dx);++Wi<bi;)Ms=ai[Wi],Ms.x=ao,Ms.y=yo,Ms.dx=Ko,yo+=Ms.dy=Math.min(Bi.y+Bi.dy-yo,Ko?se(Ms.area/Ko):0);Ms.z=!1,Ms.dy+=Bi.y+Bi.dy-yo,Bi.x+=Ko,Bi.dx-=Ko}}function Ji(ai){var Ti=Nt||X(ai),Bi=Ti[0];return Bi.x=Bi.y=0,Bi.value?(Bi.dx=Le[0],Bi.dy=Le[1]):Bi.dx=Bi.dy=0,Nt&&X.revalue(Bi),_r([Bi],Bi.dx*Bi.dy/Bi.value),(Nt?ni:wr)(Bi),it&&(Nt=Ti),Ti}return Ji.size=function(ai){return arguments.length?(Le=ai,Ji):Le},Ji.padding=function(ai){if(!arguments.length)return We;function Ti(Wi){var bi=ai.call(Ji,Wi,Wi.depth);return bi==null?li(Wi):di(Wi,typeof bi=="number"?[bi,bi,bi,bi]:bi)}function Bi(Wi){return di(Wi,ai)}var en;return Ye=(We=ai)==null?li:(en=typeof ai)=="function"?Ti:(en==="number"&&(ai=[ai,ai,ai,ai]),Bi),Ji},Ji.round=function(ai){return arguments.length?(se=ai?Math.round:Number,Ji):se!=Number},Ji.sticky=function(ai){return arguments.length?(it=ai,Nt=null,Ji):it},Ji.ratio=function(ai){return arguments.length?(er=ai,Ji):er},Ji.mode=function(ai){return arguments.length?(mt=ai+"",Ji):mt},$n(Ji,X)};function li(X){return{x:X.x,y:X.y,dx:X.dx,dy:X.dy}}function di(X,se){var Le=X.x+se[3],We=X.y+se[0],Ye=X.dx-se[1]-se[3],it=X.dy-se[0]-se[2];return Ye<0&&(Le+=Ye/2,Ye=0),it<0&&(We+=it/2,it=0),{x:Le,y:We,dx:Ye,dy:it}}e.random={normal:function(X,se){var Le=arguments.length;return Le<2&&(se=1),Le<1&&(X=0),function(){var We,Ye,it;do We=Math.random()*2-1,Ye=Math.random()*2-1,it=We*We+Ye*Ye;while(!it||it>1);return X+se*We*Math.sqrt(-2*Math.log(it)/it)}},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,Le=0;Le<X;Le++)se+=Math.random();return se}}},e.scale={};function mi(X){var se=X[0],Le=X[X.length-1];return se<Le?[se,Le]:[Le,se]}function Oi(X){return X.rangeExtent?X.rangeExtent():mi(X.range())}function dn(X,se,Le,We){var Ye=Le(X[0],X[1]),it=We(se[0],se[1]);return function(Nt){return it(Ye(Nt))}}function wi(X,se){var Le=0,We=X.length-1,Ye=X[Le],it=X[We],Nt;return it<Ye&&(Nt=Le,Le=We,We=Nt,Nt=Ye,Ye=it,it=Nt),X[Le]=se.floor(Ye),X[We]=se.ceil(it),X}function ui(X){return X?{floor:function(se){return Math.floor(se/X)*X},ceil:function(se){return Math.ceil(se/X)*X}}:Ai}var Ai={floor:H,ceil:H};function gi(X,se,Le,We){var Ye=[],it=[],Nt=0,mt=Math.min(X.length,se.length)-1;for(X[mt]<X[0]&&(X=X.slice().reverse(),se=se.slice().reverse());++Nt<=mt;)Ye.push(Le(X[Nt-1],X[Nt])),it.push(We(se[Nt-1],se[Nt]));return function(er){var _r=e.bisect(X,er,1,mt)-1;return it[_r](Ye[_r](er))}}e.scale.linear=function(){return gn([0,1],[0,1],Ya,!1)};function gn(X,se,Le,We){var Ye,it;function Nt(){var er=Math.min(X.length,se.length)>2?gi:dn,_r=We?vs:Ro;return Ye=er(X,se,_r,Le),it=er(se,X,_r,Ya),mt}function mt(er){return Ye(er)}return mt.invert=function(er){return it(er)},mt.domain=function(er){return arguments.length?(X=er.map(Number),Nt()):X},mt.range=function(er){return arguments.length?(se=er,Nt()):se},mt.rangeRound=function(er){return mt.range(er).interpolate(ja)},mt.clamp=function(er){return arguments.length?(We=er,Nt()):We},mt.interpolate=function(er){return arguments.length?(Le=er,Nt()):Le},mt.ticks=function(er){return Hn(X,er)},mt.tickFormat=function(er,_r){return d3_scale_linearTickFormat(X,er,_r)},mt.nice=function(er){return Vn(X,er),Nt()},mt.copy=function(){return gn(X,se,Le,We)},Nt()}function In(X,se){return e.rebind(X,se,"range","rangeRound","interpolate","clamp")}function Vn(X,se){return wi(X,ui(Rn(X,se)[2])),wi(X,ui(Rn(X,se)[2])),X}function Rn(X,se){se==null&&(se=10);var Le=mi(X),We=Le[1]-Le[0],Ye=Math.pow(10,Math.floor(Math.log(We/se)/Math.LN10)),it=se/We*Ye;return it<=.15?Ye*=10:it<=.35?Ye*=5:it<=.75&&(Ye*=2),Le[0]=Math.ceil(Le[0]/Ye)*Ye,Le[1]=Math.floor(Le[1]/Ye)*Ye+Ye*.5,Le[2]=Ye,Le}function Hn(X,se){return e.range.apply(e,Rn(X,se))}var Gn={s:1,g:1,p:1,r:1,e:1};function pn(X){return-Math.floor(Math.log(X)/Math.LN10+.01)}function Lo(X,se){var Le=pn(se[2]);return X in Gn?Math.abs(Le-pn(Math.max(y(se[0]),y(se[1]))))+ +(X!=="e"):Le-(X==="%")*2}e.scale.log=function(){return us(e.scale.linear().domain([0,1]),10,!0,[1,10])};function us(X,se,Le,We){function Ye(mt){return(Le?Math.log(mt<0?0:mt):-Math.log(mt>0?0:-mt))/Math.log(se)}function it(mt){return Le?Math.pow(se,mt):-Math.pow(se,-mt)}function Nt(mt){return X(Ye(mt))}return Nt.invert=function(mt){return it(X.invert(mt))},Nt.domain=function(mt){return arguments.length?(Le=mt[0]>=0,X.domain((We=mt.map(Number)).map(Ye)),Nt):We},Nt.base=function(mt){return arguments.length?(se=+mt,X.domain(We.map(Ye)),Nt):se},Nt.nice=function(){var mt=wi(We.map(Ye),Le?Math:Bs);return X.domain(mt),We=mt.map(it),Nt},Nt.ticks=function(){var mt=mi(We),er=[],_r=mt[0],wr=mt[1],ni=Math.floor(Ye(_r)),Wr=Math.ceil(Ye(wr)),Ci=se%1?2:se;if(isFinite(Wr-ni)){if(Le){for(;ni<Wr;ni++)for(var Ji=1;Ji<Ci;Ji++)er.push(it(ni)*Ji);er.push(it(ni))}else for(er.push(it(ni));ni++<Wr;)for(var Ji=Ci-1;Ji>0;Ji--)er.push(it(ni)*Ji);for(ni=0;er[ni]<_r;ni++);for(Wr=er.length;er[Wr-1]>wr;Wr--);er=er.slice(ni,Wr)}return er},Nt.copy=function(){return us(X.copy(),se,Le,We)},In(Nt,X)}var Bs={floor:function(X){return-Math.ceil(-X)},ceil:function(X){return-Math.floor(-X)}};e.scale.pow=function(){return Js(e.scale.linear(),1,[0,1])};function Js(X,se,Le){var We=ol(se),Ye=ol(1/se);function it(Nt){return X(We(Nt))}return it.invert=function(Nt){return Ye(X.invert(Nt))},it.domain=function(Nt){return arguments.length?(X.domain((Le=Nt.map(Number)).map(We)),it):Le},it.ticks=function(Nt){return Hn(Le,Nt)},it.tickFormat=function(Nt,mt){return d3_scale_linearTickFormat(Le,Nt,mt)},it.nice=function(Nt){return it.domain(Vn(Le,Nt))},it.exponent=function(Nt){return arguments.length?(We=ol(se=Nt),Ye=ol(1/se),X.domain(Le.map(We)),it):se},it.copy=function(){return Js(X.copy(),se,Le)},In(it,X)}function ol(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 Cl([],{t:"range",a:[[]]})};function Cl(X,se){var Le,We,Ye;function it(mt){return We[((Le.get(mt)||(se.t==="range"?Le.set(mt,X.push(mt)):NaN))-1)%We.length]}function Nt(mt,er){return e.range(X.length).map(function(_r){return mt+er*_r})}return it.domain=function(mt){if(!arguments.length)return X;X=[],Le=new A;for(var er=-1,_r=mt.length,wr;++er<_r;)Le.has(wr=mt[er])||Le.set(wr,X.push(wr));return it[se.t].apply(it,se.a)},it.range=function(mt){return arguments.length?(We=mt,Ye=0,se={t:"range",a:arguments},it):We},it.rangePoints=function(mt,er){arguments.length<2&&(er=0);var _r=mt[0],wr=mt[1],ni=X.length<2?(_r=(_r+wr)/2,0):(wr-_r)/(X.length-1+er);return We=Nt(_r+ni*er/2,ni),Ye=0,se={t:"rangePoints",a:arguments},it},it.rangeRoundPoints=function(mt,er){arguments.length<2&&(er=0);var _r=mt[0],wr=mt[1],ni=X.length<2?(_r=wr=Math.round((_r+wr)/2),0):(wr-_r)/(X.length-1+er)|0;return We=Nt(_r+Math.round(ni*er/2+(wr-_r-(X.length-1+er)*ni)/2),ni),Ye=0,se={t:"rangeRoundPoints",a:arguments},it},it.rangeBands=function(mt,er,_r){arguments.length<2&&(er=0),arguments.length<3&&(_r=er);var wr=mt[1]<mt[0],ni=mt[wr-0],Wr=mt[1-wr],Ci=(Wr-ni)/(X.length-er+2*_r);return We=Nt(ni+Ci*_r,Ci),wr&&We.reverse(),Ye=Ci*(1-er),se={t:"rangeBands",a:arguments},it},it.rangeRoundBands=function(mt,er,_r){arguments.length<2&&(er=0),arguments.length<3&&(_r=er);var wr=mt[1]<mt[0],ni=mt[wr-0],Wr=mt[1-wr],Ci=Math.floor((Wr-ni)/(X.length-er+2*_r));return We=Nt(ni+Math.round((Wr-ni-(X.length-er)*Ci)/2),Ci),wr&&We.reverse(),Ye=Math.round(Ci*(1-er)),se={t:"rangeRoundBands",a:arguments},it},it.rangeBand=function(){return Ye},it.rangeExtent=function(){return mi(se.a[0])},it.copy=function(){return Cl(X,se)},it.domain(X)}e.scale.category10=function(){return e.scale.ordinal().range(ul)},e.scale.category20=function(){return e.scale.ordinal().range(Gl)},e.scale.category20b=function(){return e.scale.ordinal().range(Vl)},e.scale.category20c=function(){return e.scale.ordinal().range(Fl)};var ul=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Vi),Gl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Vi),Vl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Vi),Fl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Vi);e.scale.quantile=function(){return ga([],[])};function ga(X,se){var Le;function We(){var it=0,Nt=se.length;for(Le=[];++it<Nt;)Le[it-1]=e.quantile(X,it/Nt);return Ye}function Ye(it){if(!isNaN(it=+it))return se[e.bisect(Le,it)]}return Ye.domain=function(it){return arguments.length?(X=it.map(h).filter(d).sort(c),We()):X},Ye.range=function(it){return arguments.length?(se=it,We()):se},Ye.quantiles=function(){return Le},Ye.invertExtent=function(it){return it=se.indexOf(it),it<0?[NaN,NaN]:[it>0?Le[it-1]:X[0],it<Le.length?Le[it]:X[X.length-1]]},Ye.copy=function(){return ga(X,se)},We()}e.scale.quantize=function(){return ko(0,1,[0,1])};function ko(X,se,Le){var We,Ye;function it(mt){return Le[Math.max(0,Math.min(Ye,Math.floor(We*(mt-X))))]}function Nt(){return We=Le.length/(se-X),Ye=Le.length-1,it}return it.domain=function(mt){return arguments.length?(X=+mt[0],se=+mt[mt.length-1],Nt()):[X,se]},it.range=function(mt){return arguments.length?(Le=mt,Nt()):Le},it.invertExtent=function(mt){return mt=Le.indexOf(mt),mt=mt<0?NaN:mt/We+X,[mt,mt+1/We]},it.copy=function(){return ko(X,se,Le)},Nt()}e.scale.threshold=function(){return zs([.5],[0,1])};function zs(X,se){function Le(We){if(We<=We)return se[e.bisect(X,We)]}return Le.domain=function(We){return arguments.length?(X=We,Le):X},Le.range=function(We){return arguments.length?(se=We,Le):se},Le.invertExtent=function(We){return We=se.indexOf(We),[X[We-1],X[We]]},Le.copy=function(){return zs(X,se)},Le}e.scale.identity=function(){return Fo([0,1])};function Fo(X){function se(Le){return+Le}return se.invert=se,se.domain=se.range=function(Le){return arguments.length?(X=Le.map(se),se):X},se.ticks=function(Le){return Hn(X,Le)},se.tickFormat=function(Le,We){return d3_scale_linearTickFormat(X,Le,We)},se.copy=function(){return Fo(X)},se}e.svg={};function Ys(){return 0}e.svg.arc=function(){var X=Us,se=Sl,Le=Ys,We=Gs,Ye=_l,it=kl,Nt=cl;function mt(){var _r=Math.max(0,+X.apply(this,arguments)),wr=Math.max(0,+se.apply(this,arguments)),ni=Ye.apply(this,arguments)-ue,Wr=it.apply(this,arguments)-ue,Ci=Math.abs(Wr-ni),Ji=ni>Wr?0:1;if(wr<_r&&(ai=wr,wr=_r,_r=ai),Ci>=ye)return er(wr,Ji)+(_r?er(_r,1-Ji):"")+"Z";var ai,Ti,Bi,en,Wi=0,bi=0,ao,yo,Ko,Ms,vl,wl,au,Al,nu=[];if((en=(+Nt.apply(this,arguments)||0)/2)&&(Bi=We===Gs?Math.sqrt(_r*_r+wr*wr):+We.apply(this,arguments),Ji||(bi*=-1),wr&&(bi=qr(Bi/wr*Math.sin(en))),_r&&(Wi=qr(Bi/_r*Math.sin(en)))),wr){ao=wr*Math.cos(ni+bi),yo=wr*Math.sin(ni+bi),Ko=wr*Math.cos(Wr-bi),Ms=wr*Math.sin(Wr-bi);var Bu=Math.abs(Wr-ni-2*bi)<=Ie?0:1;if(bi&&xl(ao,yo,Ko,Ms)===Ji^Bu){var qu=(ni+Wr)/2;ao=wr*Math.cos(qu),yo=wr*Math.sin(qu),Ko=Ms=null}}else ao=yo=0;if(_r){vl=_r*Math.cos(Wr-Wi),wl=_r*Math.sin(Wr-Wi),au=_r*Math.cos(ni+Wi),Al=_r*Math.sin(ni+Wi);var Ju=Math.abs(ni-Wr+2*Wi)<=Ie?0:1;if(Wi&&xl(vl,wl,au,Al)===1-Ji^Ju){var qo=(ni+Wr)/2;vl=_r*Math.cos(qo),wl=_r*Math.sin(qo),au=Al=null}}else vl=wl=0;if(Ci>Fe&&(ai=Math.min(Math.abs(wr-_r)/2,+Le.apply(this,arguments)))>.001){Ti=_r<wr^Ji?0:1;var Rl=ai,pu=ai;if(Ci<Ie){var xu=au==null?[vl,wl]:Ko==null?[ao,yo]:Wo([ao,yo],[au,Al],[Ko,Ms],[vl,wl]),of=ao-xu[0],ff=yo-xu[1],xf=Ko-xu[0],hf=Ms-xu[1],dc=1/Math.sin(Math.acos((of*xf+ff*hf)/(Math.sqrt(of*of+ff*ff)*Math.sqrt(xf*xf+hf*hf)))/2),Gt=Math.sqrt(xu[0]*xu[0]+xu[1]*xu[1]);pu=Math.min(ai,(_r-Gt)/(dc-1)),Rl=Math.min(ai,(wr-Gt)/(dc+1))}if(Ko!=null){var jr=Uo(au==null?[vl,wl]:[au,Al],[ao,yo],wr,Rl,Ji),_i=Uo([Ko,Ms],[vl,wl],wr,Rl,Ji);ai===Rl?nu.push("M",jr[0],"A",Rl,",",Rl," 0 0,",Ti," ",jr[1],"A",wr,",",wr," 0 ",1-Ji^xl(jr[1][0],jr[1][1],_i[1][0],_i[1][1]),",",Ji," ",_i[1],"A",Rl,",",Rl," 0 0,",Ti," ",_i[0]):nu.push("M",jr[0],"A",Rl,",",Rl," 0 1,",Ti," ",_i[0])}else nu.push("M",ao,",",yo);if(au!=null){var Mn=Uo([ao,yo],[au,Al],_r,-pu,Ji),Ta=Uo([vl,wl],Ko==null?[ao,yo]:[Ko,Ms],_r,-pu,Ji);ai===pu?nu.push("L",Ta[0],"A",pu,",",pu," 0 0,",Ti," ",Ta[1],"A",_r,",",_r," 0 ",Ji^xl(Ta[1][0],Ta[1][1],Mn[1][0],Mn[1][1]),",",1-Ji," ",Mn[1],"A",pu,",",pu," 0 0,",Ti," ",Mn[0]):nu.push("L",Ta[0],"A",pu,",",pu," 0 0,",Ti," ",Mn[0])}else nu.push("L",vl,",",wl)}else nu.push("M",ao,",",yo),Ko!=null&&nu.push("A",wr,",",wr," 0 ",Bu,",",Ji," ",Ko,",",Ms),nu.push("L",vl,",",wl),au!=null&&nu.push("A",_r,",",_r," 0 ",Ju,",",1-Ji," ",au,",",Al);return nu.push("Z"),nu.join("")}function er(_r,wr){return"M0,"+_r+"A"+_r+","+_r+" 0 1,"+wr+" 0,"+-_r+"A"+_r+","+_r+" 0 1,"+wr+" 0,"+_r}return mt.innerRadius=function(_r){return arguments.length?(X=or(_r),mt):X},mt.outerRadius=function(_r){return arguments.length?(se=or(_r),mt):se},mt.cornerRadius=function(_r){return arguments.length?(Le=or(_r),mt):Le},mt.padRadius=function(_r){return arguments.length?(We=_r==Gs?Gs:or(_r),mt):We},mt.startAngle=function(_r){return arguments.length?(Ye=or(_r),mt):Ye},mt.endAngle=function(_r){return arguments.length?(it=or(_r),mt):it},mt.padAngle=function(_r){return arguments.length?(Nt=or(_r),mt):Nt},mt.centroid=function(){var _r=(+X.apply(this,arguments)+ +se.apply(this,arguments))/2,wr=(+Ye.apply(this,arguments)+ +it.apply(this,arguments))/2-ue;return[Math.cos(wr)*_r,Math.sin(wr)*_r]},mt};var Gs="auto";function Us(X){return X.innerRadius}function Sl(X){return X.outerRadius}function _l(X){return X.startAngle}function kl(X){return X.endAngle}function cl(X){return X&&X.padAngle}function xl(X,se,Le,We){return(X-Le)*se-(se-We)*X>0?0:1}function Uo(X,se,Le,We,Ye){var it=X[0]-se[0],Nt=X[1]-se[1],mt=(Ye?We:-We)/Math.sqrt(it*it+Nt*Nt),er=mt*Nt,_r=-mt*it,wr=X[0]+er,ni=X[1]+_r,Wr=se[0]+er,Ci=se[1]+_r,Ji=(wr+Wr)/2,ai=(ni+Ci)/2,Ti=Wr-wr,Bi=Ci-ni,en=Ti*Ti+Bi*Bi,Wi=Le-We,bi=wr*Ci-Wr*ni,ao=(Bi<0?-1:1)*Math.sqrt(Math.max(0,Wi*Wi*en-bi*bi)),yo=(bi*Bi-Ti*ao)/en,Ko=(-bi*Ti-Bi*ao)/en,Ms=(bi*Bi+Ti*ao)/en,vl=(-bi*Ti+Bi*ao)/en,wl=yo-Ji,au=Ko-ai,Al=Ms-Ji,nu=vl-ai;return wl*wl+au*au>Al*Al+nu*nu&&(yo=Ms,Ko=vl),[[yo-er,Ko-_r],[yo*Le/Wi,Ko*Le/Wi]]}function _s(){return!0}function Bl(X){var se=Hr,Le=na,We=_s,Ye=Dl,it=Ye.key,Nt=.7;function mt(er){var _r=[],wr=[],ni=-1,Wr=er.length,Ci,Ji=or(se),ai=or(Le);function Ti(){_r.push("M",Ye(X(wr),Nt))}for(;++ni<Wr;)We.call(this,Ci=er[ni],ni)?wr.push([+Ji.call(this,Ci,ni),+ai.call(this,Ci,ni)]):wr.length&&(Ti(),wr=[]);return wr.length&&Ti(),_r.length?_r.join(""):null}return mt.x=function(er){return arguments.length?(se=er,mt):se},mt.y=function(er){return arguments.length?(Le=er,mt):Le},mt.defined=function(er){return arguments.length?(We=er,mt):We},mt.interpolate=function(er){return arguments.length?(typeof er=="function"?it=Ye=er:it=(Ye=Il.get(er)||Dl).key,mt):it},mt.tension=function(er){return arguments.length?(Nt=er,mt):Nt},mt}e.svg.line=function(){return Bl(H)};var Il=e.map({linear:Dl,"linear-closed":oe,step:w,"step-before":B,"step-after":Q,basis:zt,"basis-open":Yt,"basis-closed":Jt,bundle:yr,cardinal:Ne,"cardinal-open":ee,"cardinal-closed":le,monotone:qt});Il.forEach(function(X,se){se.key=X,se.closed=/-closed$/.test(X)});function Dl(X){return X.length>1?X.join("L"):X+"Z"}function oe(X){return X.join("L")+"Z"}function w(X){for(var se=0,Le=X.length,We=X[0],Ye=[We[0],",",We[1]];++se<Le;)Ye.push("H",(We[0]+(We=X[se])[0])/2,"V",We[1]);return Le>1&&Ye.push("H",We[0]),Ye.join("")}function B(X){for(var se=0,Le=X.length,We=X[0],Ye=[We[0],",",We[1]];++se<Le;)Ye.push("V",(We=X[se])[1],"H",We[0]);return Ye.join("")}function Q(X){for(var se=0,Le=X.length,We=X[0],Ye=[We[0],",",We[1]];++se<Le;)Ye.push("H",(We=X[se])[0],"V",We[1]);return Ye.join("")}function ee(X,se){return X.length<4?Dl(X):X[1]+$e(X.slice(1,-1),pt(X,se))}function le(X,se){return X.length<3?oe(X):X[0]+$e((X.push(X[0]),X),pt([X[X.length-2]].concat(X,[X[1]]),se))}function Ne(X,se){return X.length<3?Dl(X):X[0]+$e(X,pt(X,se))}function $e(X,se){if(se.length<1||X.length!=se.length&&X.length!=se.length+2)return Dl(X);var Le=X.length!=se.length,We="",Ye=X[0],it=X[1],Nt=se[0],mt=Nt,er=1;if(Le&&(We+="Q"+(it[0]-Nt[0]*2/3)+","+(it[1]-Nt[1]*2/3)+","+it[0]+","+it[1],Ye=X[1],er=2),se.length>1){mt=se[1],it=X[er],er++,We+="C"+(Ye[0]+Nt[0])+","+(Ye[1]+Nt[1])+","+(it[0]-mt[0])+","+(it[1]-mt[1])+","+it[0]+","+it[1];for(var _r=2;_r<se.length;_r++,er++)it=X[er],mt=se[_r],We+="S"+(it[0]-mt[0])+","+(it[1]-mt[1])+","+it[0]+","+it[1]}if(Le){var wr=X[er];We+="Q"+(it[0]+mt[0]*2/3)+","+(it[1]+mt[1]*2/3)+","+wr[0]+","+wr[1]}return We}function pt(X,se){for(var Le=[],We=(1-se)/2,Ye,it=X[0],Nt=X[1],mt=1,er=X.length;++mt<er;)Ye=it,it=Nt,Nt=X[mt],Le.push([We*(Nt[0]-Ye[0]),We*(Nt[1]-Ye[1])]);return Le}function zt(X){if(X.length<3)return Dl(X);var se=1,Le=X.length,We=X[0],Ye=We[0],it=We[1],Nt=[Ye,Ye,Ye,(We=X[1])[0]],mt=[it,it,it,We[1]],er=[Ye,",",it,"L",Ir(qe,Nt),",",Ir(qe,mt)];for(X.push(X[Le-1]);++se<=Le;)We=X[se],Nt.shift(),Nt.push(We[0]),mt.shift(),mt.push(We[1]),Ve(er,Nt,mt);return X.pop(),er.push("L",We),er.join("")}function Yt(X){if(X.length<4)return Dl(X);for(var se=[],Le=-1,We=X.length,Ye,it=[0],Nt=[0];++Le<3;)Ye=X[Le],it.push(Ye[0]),Nt.push(Ye[1]);for(se.push(Ir(qe,it)+","+Ir(qe,Nt)),--Le;++Le<We;)Ye=X[Le],it.shift(),it.push(Ye[0]),Nt.shift(),Nt.push(Ye[1]),Ve(se,it,Nt);return se.join("")}function Jt(X){for(var se,Le=-1,We=X.length,Ye=We+4,it,Nt=[],mt=[];++Le<4;)it=X[Le%We],Nt.push(it[0]),mt.push(it[1]);for(se=[Ir(qe,Nt),",",Ir(qe,mt)],--Le;++Le<Ye;)it=X[Le%We],Nt.shift(),Nt.push(it[0]),mt.shift(),mt.push(it[1]),Ve(se,Nt,mt);return se.join("")}function yr(X,se){var Le=X.length-1;if(Le)for(var We=X[0][0],Ye=X[0][1],it=X[Le][0]-We,Nt=X[Le][1]-Ye,mt=-1,er,_r;++mt<=Le;)er=X[mt],_r=mt/Le,er[0]=se*er[0]+(1-se)*(We+_r*it),er[1]=se*er[1]+(1-se)*(Ye+_r*Nt);return zt(X)}function Ir(X,se){return X[0]*se[0]+X[1]*se[1]+X[2]*se[2]+X[3]*se[3]}var ce=[0,2/3,1/3,0],Ae=[0,1/3,2/3,0],qe=[0,1/6,2/3,1/6];function Ve(X,se,Le){X.push("C",Ir(ce,se),",",Ir(ce,Le),",",Ir(Ae,se),",",Ir(Ae,Le),",",Ir(qe,se),",",Ir(qe,Le))}function ot(X,se){return(se[1]-X[1])/(se[0]-X[0])}function Ke(X){for(var se=0,Le=X.length-1,We=[],Ye=X[0],it=X[1],Nt=We[0]=ot(Ye,it);++se<Le;)We[se]=(Nt+(Nt=ot(Ye=it,it=X[se+1])))/2;return We[se]=Nt,We}function ft(X){for(var se=[],Le,We,Ye,it,Nt=Ke(X),mt=-1,er=X.length-1;++mt<er;)Le=ot(X[mt],X[mt+1]),y(Le)<Fe?Nt[mt]=Nt[mt+1]=0:(We=Nt[mt]/Le,Ye=Nt[mt+1]/Le,it=We*We+Ye*Ye,it>9&&(it=Le*3/Math.sqrt(it),Nt[mt]=it*We,Nt[mt+1]=it*Ye));for(mt=-1;++mt<=er;)it=(X[Math.min(er,mt+1)][0]-X[Math.max(0,mt-1)][0])/(6*(1+Nt[mt]*Nt[mt])),se.push([it||0,Nt[mt]*it||0]);return se}function qt(X){return X.length<3?Dl(X):X[0]+$e(X,ft(X))}e.svg.line.radial=function(){var X=Bl(Xt);return X.radius=X.x,delete X.x,X.angle=X.y,delete X.y,X};function Xt(X){for(var se,Le=-1,We=X.length,Ye,it;++Le<We;)se=X[Le],Ye=se[0],it=se[1]-ue,se[0]=Ye*Math.cos(it),se[1]=Ye*Math.sin(it);return X}function $t(X){var se=Hr,Le=Hr,We=0,Ye=na,it=_s,Nt=Dl,mt=Nt.key,er=Nt,_r="L",wr=.7;function ni(Wr){var Ci=[],Ji=[],ai=[],Ti=-1,Bi=Wr.length,en,Wi=or(se),bi=or(We),ao=se===Le?function(){return Ko}:or(Le),yo=We===Ye?function(){return Ms}:or(Ye),Ko,Ms;function vl(){Ci.push("M",Nt(X(ai),wr),_r,er(X(Ji.reverse()),wr),"Z")}for(;++Ti<Bi;)it.call(this,en=Wr[Ti],Ti)?(Ji.push([Ko=+Wi.call(this,en,Ti),Ms=+bi.call(this,en,Ti)]),ai.push([+ao.call(this,en,Ti),+yo.call(this,en,Ti)])):Ji.length&&(vl(),Ji=[],ai=[]);return Ji.length&&vl(),Ci.length?Ci.join(""):null}return ni.x=function(Wr){return arguments.length?(se=Le=Wr,ni):Le},ni.x0=function(Wr){return arguments.length?(se=Wr,ni):se},ni.x1=function(Wr){return arguments.length?(Le=Wr,ni):Le},ni.y=function(Wr){return arguments.length?(We=Ye=Wr,ni):Ye},ni.y0=function(Wr){return arguments.length?(We=Wr,ni):We},ni.y1=function(Wr){return arguments.length?(Ye=Wr,ni):Ye},ni.defined=function(Wr){return arguments.length?(it=Wr,ni):it},ni.interpolate=function(Wr){return arguments.length?(typeof Wr=="function"?mt=Nt=Wr:mt=(Nt=Il.get(Wr)||Dl).key,er=Nt.reverse||Nt,_r=Nt.closed?"M":"L",ni):mt},ni.tension=function(Wr){return arguments.length?(wr=Wr,ni):wr},ni}B.reverse=Q,Q.reverse=B,e.svg.area=function(){return $t(H)},e.svg.area.radial=function(){var X=$t(Xt);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 Mr(X){return X.target}e.svg.chord=function(){var X=dr,se=Mr,Le=$r,We=_l,Ye=kl;function it(wr,ni){var Wr=Nt(this,X,wr,ni),Ci=Nt(this,se,wr,ni);return"M"+Wr.p0+er(Wr.r,Wr.p1,Wr.a1-Wr.a0)+(mt(Wr,Ci)?_r(Wr.r,Wr.p1,Wr.r,Wr.p0):_r(Wr.r,Wr.p1,Ci.r,Ci.p0)+er(Ci.r,Ci.p1,Ci.a1-Ci.a0)+_r(Ci.r,Ci.p1,Wr.r,Wr.p0))+"Z"}function Nt(wr,ni,Wr,Ci){var Ji=ni.call(wr,Wr,Ci),ai=Le.call(wr,Ji,Ci),Ti=We.call(wr,Ji,Ci)-ue,Bi=Ye.call(wr,Ji,Ci)-ue;return{r:ai,a0:Ti,a1:Bi,p0:[ai*Math.cos(Ti),ai*Math.sin(Ti)],p1:[ai*Math.cos(Bi),ai*Math.sin(Bi)]}}function mt(wr,ni){return wr.a0==ni.a0&&wr.a1==ni.a1}function er(wr,ni,Wr){return"A"+wr+","+wr+" 0 "+ +(Wr>Ie)+",1 "+ni}function _r(wr,ni,Wr,Ci){return"Q 0,0 "+Ci}return it.radius=function(wr){return arguments.length?(Le=or(wr),it):Le},it.source=function(wr){return arguments.length?(X=or(wr),it):X},it.target=function(wr){return arguments.length?(se=or(wr),it):se},it.startAngle=function(wr){return arguments.length?(We=or(wr),it):We},it.endAngle=function(wr){return arguments.length?(Ye=or(wr),it):Ye},it};function $r(X){return X.radius}e.svg.diagonal=function(){var X=dr,se=Mr,Le=ii;function We(Ye,it){var Nt=X.call(this,Ye,it),mt=se.call(this,Ye,it),er=(Nt.y+mt.y)/2,_r=[Nt,{x:Nt.x,y:er},{x:mt.x,y:er},mt];return _r=_r.map(Le),"M"+_r[0]+"C"+_r[1]+" "+_r[2]+" "+_r[3]}return We.source=function(Ye){return arguments.length?(X=or(Ye),We):X},We.target=function(Ye){return arguments.length?(se=or(Ye),We):se},We.projection=function(Ye){return arguments.length?(Le=Ye,We):Le},We};function ii(X){return[X.x,X.y]}e.svg.diagonal.radial=function(){var X=e.svg.diagonal(),se=ii,Le=X.projection;return X.projection=function(We){return arguments.length?Le(pi(se=We)):se},X};function pi(X){return function(){var se=X.apply(this,arguments),Le=se[0],We=se[1]-ue;return[Le*Math.cos(We),Le*Math.sin(We)]}}e.svg.symbol=function(){var X=wn,se=Yi;function Le(We,Ye){return(ua.get(X.call(this,We,Ye))||Tn)(se.call(this,We,Ye))}return Le.type=function(We){return arguments.length?(X=or(We),Le):X},Le.size=function(We){return arguments.length?(se=or(We),Le):se},Le};function Yi(){return 64}function wn(){return"circle"}function Tn(X){var se=Math.sqrt(X/Ie);return"M0,"+se+"A"+se+","+se+" 0 1,1 0,"+-se+"A"+se+","+se+" 0 1,1 0,"+se+"Z"}var ua=e.map({circle:Tn,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*el)),Le=se*el;return"M0,"+-se+"L"+Le+",0 0,"+se+" "+-Le+",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/oo),Le=se*oo/2;return"M0,"+Le+"L"+se+","+-Le+" "+-se+","+-Le+"Z"},"triangle-up":function(X){var se=Math.sqrt(X/oo),Le=se*oo/2;return"M0,"+-Le+"L"+se+","+Le+" "+-se+","+Le+"Z"}});e.svg.symbolTypes=ua.keys();var oo=Math.sqrt(3),el=Math.tan(30*de);Re.transition=function(X){for(var se=Ll||++Hl,Le=Kl(X),We=[],Ye,it,Nt=Ql||{time:Date.now(),ease:Za,delay:0,duration:250},mt=-1,er=this.length;++mt<er;){We.push(Ye=[]);for(var _r=this[mt],wr=-1,ni=_r.length;++wr<ni;)(it=_r[wr])&&Hu(it,wr,Le,se,Nt),Ye.push(it)}return $l(We,Le,se)},Re.interrupt=function(X){return this.each(X==null?ys:il(Kl(X)))};var ys=il(Kl());function il(X){return function(){var se,Le,We;(se=this[X])&&(We=se[Le=se.active])&&(We.timer.c=null,We.timer.t=NaN,--se.count?delete se[Le]:delete this[X],se.active+=.5,We.event&&We.event.interrupt.call(this,this.__data__,We.index))}}function $l(X,se,Le){return te(X,pl),X.namespace=se,X.id=Le,X}var pl=[],Hl=0,Ll,Ql;pl.call=Re.call,pl.empty=Re.empty,pl.node=Re.node,pl.size=Re.size,e.transition=function(X,se){return X&&X.transition?Ll?X.transition(se):X:e.selection().transition(X)},e.transition.prototype=pl,pl.select=function(X){var se=this.id,Le=this.namespace,We=[],Ye,it,Nt;X=me(X);for(var mt=-1,er=this.length;++mt<er;){We.push(Ye=[]);for(var _r=this[mt],wr=-1,ni=_r.length;++wr<ni;)(Nt=_r[wr])&&(it=X.call(Nt,Nt.__data__,wr,mt))?("__data__"in Nt&&(it.__data__=Nt.__data__),Hu(it,wr,Le,se,Nt[Le][se]),Ye.push(it)):Ye.push(null)}return $l(We,Le,se)},pl.selectAll=function(X){var se=this.id,Le=this.namespace,We=[],Ye,it,Nt,mt,er;X=Be(X);for(var _r=-1,wr=this.length;++_r<wr;)for(var ni=this[_r],Wr=-1,Ci=ni.length;++Wr<Ci;)if(Nt=ni[Wr]){er=Nt[Le][se],it=X.call(Nt,Nt.__data__,Wr,_r),We.push(Ye=[]);for(var Ji=-1,ai=it.length;++Ji<ai;)(mt=it[Ji])&&Hu(mt,Ji,Le,se,er),Ye.push(mt)}return $l(We,Le,se)},pl.filter=function(X){var se=[],Le,We,Ye;typeof X!="function"&&(X=Te(X));for(var it=0,Nt=this.length;it<Nt;it++){se.push(Le=[]);for(var We=this[it],mt=0,er=We.length;mt<er;mt++)(Ye=We[mt])&&X.call(Ye,Ye.__data__,mt,it)&&Le.push(Ye)}return $l(se,this.namespace,this.id)},pl.tween=function(X,se){var Le=this.id,We=this.namespace;return arguments.length<2?this.node()[We][Le].tween.get(X):ut(this,se==null?function(Ye){Ye[We][Le].tween.remove(X)}:function(Ye){Ye[We][Le].tween.set(X,se)})};function ku(X,se,Le,We){var Ye=X.id,it=X.namespace;return ut(X,typeof Le=="function"?function(Nt,mt,er){Nt[it][Ye].tween.set(se,We(Le.call(Nt,Nt.__data__,mt,er)))}:(Le=We(Le),function(Nt){Nt[it][Ye].tween.set(se,Le)}))}pl.attr=function(X,se){if(arguments.length<2){for(se in X)this.attr(se,X[se]);return this}var Le=X=="transform"?Ds:Ya,We=e.ns.qualify(X);function Ye(){this.removeAttribute(We)}function it(){this.removeAttributeNS(We.space,We.local)}function Nt(er){return er==null?Ye:(er+="",function(){var _r=this.getAttribute(We),wr;return _r!==er&&(wr=Le(_r,er),function(ni){this.setAttribute(We,wr(ni))})})}function mt(er){return er==null?it:(er+="",function(){var _r=this.getAttributeNS(We.space,We.local),wr;return _r!==er&&(wr=Le(_r,er),function(ni){this.setAttributeNS(We.space,We.local,wr(ni))})})}return ku(this,"attr."+X,se,We.local?mt:Nt)},pl.attrTween=function(X,se){var Le=e.ns.qualify(X);function We(it,Nt){var mt=se.call(this,it,Nt,this.getAttribute(Le));return mt&&function(er){this.setAttribute(Le,mt(er))}}function Ye(it,Nt){var mt=se.call(this,it,Nt,this.getAttributeNS(Le.space,Le.local));return mt&&function(er){this.setAttributeNS(Le.space,Le.local,mt(er))}}return this.tween("attr."+X,Le.local?Ye:We)},pl.style=function(X,se,Le){var We=arguments.length;if(We<3){if(typeof X!="string"){We<2&&(se="");for(Le in X)this.style(Le,X[Le],se);return this}Le=""}function Ye(){this.style.removeProperty(X)}function it(Nt){return Nt==null?Ye:(Nt+="",function(){var mt=a(this).getComputedStyle(this,null).getPropertyValue(X),er;return mt!==Nt&&(er=Ya(mt,Nt),function(_r){this.style.setProperty(X,er(_r),Le)})})}return ku(this,"style."+X,se,it)},pl.styleTween=function(X,se,Le){arguments.length<3&&(Le="");function We(Ye,it){var Nt=se.call(this,Ye,it,a(this).getComputedStyle(this,null).getPropertyValue(X));return Nt&&function(mt){this.style.setProperty(X,Nt(mt),Le)}}return this.tween("style."+X,We)},pl.text=function(X){return ku(this,"text",X,Jl)};function Jl(X){return X==null&&(X=""),function(){this.textContent=X}}pl.remove=function(){var X=this.namespace;return this.each("end.transition",function(){var se;this[X].count<2&&(se=this.parentNode)&&se.removeChild(this)})},pl.ease=function(X){var se=this.id,Le=this.namespace;return arguments.length<1?this.node()[Le][se].ease:(typeof X!="function"&&(X=e.ease.apply(e,arguments)),ut(this,function(We){We[Le][se].ease=X}))},pl.delay=function(X){var se=this.id,Le=this.namespace;return arguments.length<1?this.node()[Le][se].delay:ut(this,typeof X=="function"?function(We,Ye,it){We[Le][se].delay=+X.call(We,We.__data__,Ye,it)}:(X=+X,function(We){We[Le][se].delay=X}))},pl.duration=function(X){var se=this.id,Le=this.namespace;return arguments.length<1?this.node()[Le][se].duration:ut(this,typeof X=="function"?function(We,Ye,it){We[Le][se].duration=Math.max(1,X.call(We,We.__data__,Ye,it))}:(X=Math.max(1,X),function(We){We[Le][se].duration=X}))},pl.each=function(X,se){var Le=this.id,We=this.namespace;if(arguments.length<2){var Ye=Ql,it=Ll;try{Ll=Le,ut(this,function(Nt,mt,er){Ql=Nt[We][Le],X.call(Nt,Nt.__data__,mt,er)})}finally{Ql=Ye,Ll=it}}else ut(this,function(Nt){var mt=Nt[We][Le];(mt.event||(mt.event=e.dispatch("start","end","interrupt"))).on(X,se)});return this},pl.transition=function(){for(var X=this.id,se=++Hl,Le=this.namespace,We=[],Ye,it,Nt,mt,er=0,_r=this.length;er<_r;er++){We.push(Ye=[]);for(var it=this[er],wr=0,ni=it.length;wr<ni;wr++)(Nt=it[wr])&&(mt=Nt[Le][X],Hu(Nt,wr,Le,se,{time:mt.time,ease:mt.ease,delay:mt.delay+mt.duration,duration:mt.duration})),Ye.push(Nt)}return $l(We,Le,se)};function Kl(X){return X==null?"__transition__":"__transition_"+X+"__"}function Hu(X,se,Le,We,Ye){var it=X[Le]||(X[Le]={active:0,count:0}),Nt=it[We],mt,er,_r,wr,ni;function Wr(ai){var Ti=Nt.delay;if(er.t=Ti+mt,Ti<=ai)return Ci(ai-Ti);er.c=Ci}function Ci(ai){var Ti=it.active,Bi=it[Ti];Bi&&(Bi.timer.c=null,Bi.timer.t=NaN,--it.count,delete it[Ti],Bi.event&&Bi.event.interrupt.call(X,X.__data__,Bi.index));for(var en in it)if(+en<We){var Wi=it[en];Wi.timer.c=null,Wi.timer.t=NaN,--it.count,delete it[en]}er.c=Ji,Wn(function(){return er.c&&Ji(ai||1)&&(er.c=null,er.t=NaN),1},0,mt),it.active=We,Nt.event&&Nt.event.start.call(X,X.__data__,se),ni=[],Nt.tween.forEach(function(bi,ao){(ao=ao.call(X,X.__data__,se))&&ni.push(ao)}),wr=Nt.ease,_r=Nt.duration}function Ji(ai){for(var Ti=ai/_r,Bi=wr(Ti),en=ni.length;en>0;)ni[--en].call(X,Bi);if(Ti>=1)return Nt.event&&Nt.event.end.call(X,X.__data__,se),--it.count?delete it[We]:delete X[Le],1}Nt||(mt=Ye.time,er=Wn(Wr,0,mt),Nt=it[We]={tween:new A,time:mt,timer:er,delay:Ye.delay,duration:Ye.duration,ease:Ye.ease,index:se},Ye=null,++it.count)}e.svg.axis=function(){var X=e.scale.linear(),se=tf,Le=6,We=6,Ye=3,it=[10],Nt=null,mt;function er(_r){_r.each(function(){var wr=e.select(this),ni=this.__chart__||X,Wr=this.__chart__=X.copy(),Ci=Nt==null?Wr.ticks?Wr.ticks.apply(Wr,it):Wr.domain():Nt,Ji=mt==null?Wr.tickFormat?Wr.tickFormat.apply(Wr,it):H:mt,ai=wr.selectAll(".tick").data(Ci,Wr),Ti=ai.enter().insert("g",".domain").attr("class","tick").style("opacity",Fe),Bi=e.transition(ai.exit()).style("opacity",Fe).remove(),en=e.transition(ai.order()).style("opacity",1),Wi=Math.max(Le,0)+Ye,bi,ao=Oi(Wr),yo=wr.selectAll(".domain").data([0]),Ko=(yo.enter().append("path").attr("class","domain"),e.transition(yo));Ti.append("line"),Ti.append("text");var Ms=Ti.select("line"),vl=en.select("line"),wl=ai.select("text").text(Ji),au=Ti.select("text"),Al=en.select("text"),nu=se==="top"||se==="left"?-1:1,Bu,qu,Ju,qo;if(se==="bottom"||se==="top"?(bi=Gu,Bu="x",Ju="y",qu="x2",qo="y2",wl.attr("dy",nu<0?"0em":".71em").style("text-anchor","middle"),Ko.attr("d","M"+ao[0]+","+nu*We+"V0H"+ao[1]+"V"+nu*We)):(bi=Wu,Bu="y",Ju="x",qu="y2",qo="x2",wl.attr("dy",".32em").style("text-anchor",nu<0?"end":"start"),Ko.attr("d","M"+nu*We+","+ao[0]+"H0V"+ao[1]+"H"+nu*We)),Ms.attr(qo,nu*Le),au.attr(Ju,nu*Wi),vl.attr(qu,0).attr(qo,nu*Le),Al.attr(Bu,0).attr(Ju,nu*Wi),Wr.rangeBand){var Rl=Wr,pu=Rl.rangeBand()/2;ni=Wr=function(xu){return Rl(xu)+pu}}else ni.rangeBand?ni=Wr:Bi.call(bi,Wr,ni);Ti.call(bi,ni,Wr),en.call(bi,Wr,Wr)})}return er.scale=function(_r){return arguments.length?(X=_r,er):X},er.orient=function(_r){return arguments.length?(se=_r in Ku?_r+"":tf,er):se},er.ticks=function(){return arguments.length?(it=r(arguments),er):it},er.tickValues=function(_r){return arguments.length?(Nt=_r,er):Nt},er.tickFormat=function(_r){return arguments.length?(mt=_r,er):mt},er.tickSize=function(_r){var wr=arguments.length;return wr?(Le=+_r,We=+arguments[wr-1],er):Le},er.innerTickSize=function(_r){return arguments.length?(Le=+_r,er):Le},er.outerTickSize=function(_r){return arguments.length?(We=+_r,er):We},er.tickPadding=function(_r){return arguments.length?(Ye=+_r,er):Ye},er.tickSubdivide=function(){return arguments.length&&er},er};var tf="bottom",Ku={top:1,right:1,bottom:1,left:1};function Gu(X,se,Le){X.attr("transform",function(We){var Ye=se(We);return"translate("+(isFinite(Ye)?Ye:Le(We))+",0)"})}function Wu(X,se,Le){X.attr("transform",function(We){var Ye=se(We);return"translate(0,"+(isFinite(Ye)?Ye:Le(We))+")"})}e.svg.brush=function(){var X=Ce(wr,"brushstart","brush","brushend"),se=null,Le=null,We=[0,0],Ye=[0,0],it,Nt,mt=!0,er=!0,_r=gf[0];function wr(ai){ai.each(function(){var Ti=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Ji).on("touchstart.brush",Ji),Bi=Ti.selectAll(".background").data([0]);Bi.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Ti.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var en=Ti.selectAll(".resize").data(_r,H);en.exit().remove(),en.enter().append("g").attr("class",function(yo){return"resize "+yo}).style("cursor",function(yo){return sf[yo]}).append("rect").attr("x",function(yo){return/[ew]$/.test(yo)?-3:null}).attr("y",function(yo){return/^[ns]/.test(yo)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),en.style("display",wr.empty()?"none":null);var Wi=e.transition(Ti),bi=e.transition(Bi),ao;se&&(ao=Oi(se),bi.attr("x",ao[0]).attr("width",ao[1]-ao[0]),Wr(Wi)),Le&&(ao=Oi(Le),bi.attr("y",ao[0]).attr("height",ao[1]-ao[0]),Ci(Wi)),ni(Wi)})}wr.event=function(ai){ai.each(function(){var Ti=X.of(this,arguments),Bi={x:We,y:Ye,i:it,j:Nt},en=this.__chart__||Bi;this.__chart__=Bi,Ll?e.select(this).transition().each("start.brush",function(){it=en.i,Nt=en.j,We=en.x,Ye=en.y,Ti({type:"brushstart"})}).tween("brush:brush",function(){var Wi=ba(We,Bi.x),bi=ba(Ye,Bi.y);return it=Nt=null,function(ao){We=Bi.x=Wi(ao),Ye=Bi.y=bi(ao),Ti({type:"brush",mode:"resize"})}}).each("end.brush",function(){it=Bi.i,Nt=Bi.j,Ti({type:"brush",mode:"resize"}),Ti({type:"brushend"})}):(Ti({type:"brushstart"}),Ti({type:"brush",mode:"resize"}),Ti({type:"brushend"}))})};function ni(ai){ai.selectAll(".resize").attr("transform",function(Ti){return"translate("+We[+/e$/.test(Ti)]+","+Ye[+/^s/.test(Ti)]+")"})}function Wr(ai){ai.select(".extent").attr("x",We[0]),ai.selectAll(".extent,.n>rect,.s>rect").attr("width",We[1]-We[0])}function Ci(ai){ai.select(".extent").attr("y",Ye[0]),ai.selectAll(".extent,.e>rect,.w>rect").attr("height",Ye[1]-Ye[0])}function Ji(){var ai=this,Ti=e.select(e.event.target),Bi=X.of(ai,arguments),en=e.select(ai),Wi=Ti.datum(),bi=!/^(n|s)$/.test(Wi)&&se,ao=!/^(e|w)$/.test(Wi)&&Le,yo=Ti.classed("extent"),Ko=fr(ai),Ms,vl=e.mouse(ai),wl,au=e.select(a(ai)).on("keydown.brush",Bu).on("keyup.brush",qu);if(e.event.changedTouches?au.on("touchmove.brush",Ju).on("touchend.brush",Rl):au.on("mousemove.brush",Ju).on("mouseup.brush",Rl),en.interrupt().selectAll("*").interrupt(),yo)vl[0]=We[0]-vl[0],vl[1]=Ye[0]-vl[1];else if(Wi){var Al=+/w$/.test(Wi),nu=+/^n/.test(Wi);wl=[We[1-Al]-vl[0],Ye[1-nu]-vl[1]],vl[0]=We[Al],vl[1]=Ye[nu]}else e.event.altKey&&(Ms=vl.slice());en.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Ti.style("cursor")),Bi({type:"brushstart"}),Ju();function Bu(){e.event.keyCode==32&&(yo||(Ms=null,vl[0]-=We[1],vl[1]-=Ye[1],yo=2),be())}function qu(){e.event.keyCode==32&&yo==2&&(vl[0]+=We[1],vl[1]+=Ye[1],yo=0,be())}function Ju(){var pu=e.mouse(ai),xu=!1;wl&&(pu[0]+=wl[0],pu[1]+=wl[1]),yo||(e.event.altKey?(Ms||(Ms=[(We[0]+We[1])/2,(Ye[0]+Ye[1])/2]),vl[0]=We[+(pu[0]<Ms[0])],vl[1]=Ye[+(pu[1]<Ms[1])]):Ms=null),bi&&qo(pu,se,0)&&(Wr(en),xu=!0),ao&&qo(pu,Le,1)&&(Ci(en),xu=!0),xu&&(ni(en),Bi({type:"brush",mode:yo?"move":"resize"}))}function qo(pu,xu,of){var ff=Oi(xu),xf=ff[0],hf=ff[1],dc=vl[of],Gt=of?Ye:We,jr=Gt[1]-Gt[0],_i,Mn;if(yo&&(xf-=dc,hf-=jr+dc),_i=(of?er:mt)?Math.max(xf,Math.min(hf,pu[of])):pu[of],yo?Mn=(_i+=dc)+jr:(Ms&&(dc=Math.max(xf,Math.min(hf,2*Ms[of]-_i))),dc<_i?(Mn=_i,_i=dc):Mn=dc),Gt[0]!=_i||Gt[1]!=Mn)return of?Nt=null:it=null,Gt[0]=_i,Gt[1]=Mn,!0}function Rl(){Ju(),en.style("pointer-events","all").selectAll(".resize").style("display",wr.empty()?"none":null),e.select("body").style("cursor",null),au.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),Ko(),Bi({type:"brushend"})}}return wr.x=function(ai){return arguments.length?(se=ai,_r=gf[!se<<1|!Le],wr):se},wr.y=function(ai){return arguments.length?(Le=ai,_r=gf[!se<<1|!Le],wr):Le},wr.clamp=function(ai){return arguments.length?(se&&Le?(mt=!!ai[0],er=!!ai[1]):se?mt=!!ai:Le&&(er=!!ai),wr):se&&Le?[mt,er]:se?mt:Le?er:null},wr.extent=function(ai){var Ti,Bi,en,Wi,bi;return arguments.length?(se&&(Ti=ai[0],Bi=ai[1],Le&&(Ti=Ti[0],Bi=Bi[0]),it=[Ti,Bi],se.invert&&(Ti=se(Ti),Bi=se(Bi)),Bi<Ti&&(bi=Ti,Ti=Bi,Bi=bi),(Ti!=We[0]||Bi!=We[1])&&(We=[Ti,Bi])),Le&&(en=ai[0],Wi=ai[1],se&&(en=en[1],Wi=Wi[1]),Nt=[en,Wi],Le.invert&&(en=Le(en),Wi=Le(Wi)),Wi<en&&(bi=en,en=Wi,Wi=bi),(en!=Ye[0]||Wi!=Ye[1])&&(Ye=[en,Wi])),wr):(se&&(it?(Ti=it[0],Bi=it[1]):(Ti=We[0],Bi=We[1],se.invert&&(Ti=se.invert(Ti),Bi=se.invert(Bi)),Bi<Ti&&(bi=Ti,Ti=Bi,Bi=bi))),Le&&(Nt?(en=Nt[0],Wi=Nt[1]):(en=Ye[0],Wi=Ye[1],Le.invert&&(en=Le.invert(en),Wi=Le.invert(Wi)),Wi<en&&(bi=en,en=Wi,Wi=bi))),se&&Le?[[Ti,en],[Bi,Wi]]:se?[Ti,Bi]:Le&&[en,Wi])},wr.clear=function(){return wr.empty()||(We=[0,0],Ye=[0,0],it=Nt=null),wr},wr.empty=function(){return!!se&&We[0]==We[1]||!!Le&&Ye[0]==Ye[1]},e.rebind(wr,X,"on")};var sf={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},gf=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];e.text=Nr(function(X){return X.responseText}),e.json=function(X,se){return hi(X,"application/json",nf,se)};function nf(X){return JSON.parse(X.responseText)}e.html=function(X,se){return hi(X,"text/html",af,se)};function af(X){var se=n.createRange();return se.selectNode(n.body),se.createContextualFragment(X.responseText)}e.xml=Nr(function(X){return X.responseXML}),typeof define=="function"&&define.amd?define(e):typeof tL=="object"&&tL.exports?tL.exports=e:this.d3=e}).apply(self)});var wB=Se((rL,hee)=>{(function(e,t){typeof rL=="object"&&typeof hee!="undefined"?t(rL):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(rL,function(e){"use strict";var t=new Date,r=new Date;function n(Te,nt,ut,ct){function rt(je){return Te(je=arguments.length===0?new Date:new Date(+je)),je}return rt.floor=function(je){return Te(je=new Date(+je)),je},rt.ceil=function(je){return Te(je=new Date(je-1)),nt(je,1),Te(je),je},rt.round=function(je){var tt=rt(je),Je=rt.ceil(je);return je-tt<Je-je?tt:Je},rt.offset=function(je,tt){return nt(je=new Date(+je),tt==null?1:Math.floor(tt)),je},rt.range=function(je,tt,Je){var Mt=[],Vt;if(je=rt.ceil(je),Je=Je==null?1:Math.floor(Je),!(je<tt)||!(Je>0))return Mt;do Mt.push(Vt=new Date(+je)),nt(je,Je),Te(je);while(Vt<je&&je<tt);return Mt},rt.filter=function(je){return n(function(tt){if(tt>=tt)for(;Te(tt),!je(tt);)tt.setTime(tt-1)},function(tt,Je){if(tt>=tt)if(Je<0)for(;++Je<=0;)for(;nt(tt,-1),!je(tt););else for(;--Je>=0;)for(;nt(tt,1),!je(tt););})},ut&&(rt.count=function(je,tt){return t.setTime(+je),r.setTime(+tt),Te(t),Te(r),Math.floor(ut(t,r))},rt.every=function(je){return je=Math.floor(je),!isFinite(je)||!(je>0)?null:je>1?rt.filter(ct?function(tt){return ct(tt)%je===0}:function(tt){return rt.count(0,tt)%je===0}):rt}),rt}var i=n(function(){},function(Te,nt){Te.setTime(+Te+nt)},function(Te,nt){return nt-Te});i.every=function(Te){return Te=Math.floor(Te),!isFinite(Te)||!(Te>0)?null:Te>1?n(function(nt){nt.setTime(Math.floor(nt/Te)*Te)},function(nt,ut){nt.setTime(+nt+ut*Te)},function(nt,ut){return(ut-nt)/Te}):i};var a=i.range,o=1e3,s=6e4,u=36e5,l=864e5,f=6048e5,c=n(function(Te){Te.setTime(Te-Te.getMilliseconds())},function(Te,nt){Te.setTime(+Te+nt*o)},function(Te,nt){return(nt-Te)/o},function(Te){return Te.getUTCSeconds()}),h=c.range,d=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o)},function(Te,nt){Te.setTime(+Te+nt*s)},function(Te,nt){return(nt-Te)/s},function(Te){return Te.getMinutes()}),p=d.range,x=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o-Te.getMinutes()*s)},function(Te,nt){Te.setTime(+Te+nt*u)},function(Te,nt){return(nt-Te)/u},function(Te){return Te.getHours()}),b=x.range,y=n(function(Te){Te.setHours(0,0,0,0)},function(Te,nt){Te.setDate(Te.getDate()+nt)},function(Te,nt){return(nt-Te-(nt.getTimezoneOffset()-Te.getTimezoneOffset())*s)/l},function(Te){return Te.getDate()-1}),k=y.range;function E(Te){return n(function(nt){nt.setDate(nt.getDate()-(nt.getDay()+7-Te)%7),nt.setHours(0,0,0,0)},function(nt,ut){nt.setDate(nt.getDate()+ut*7)},function(nt,ut){return(ut-nt-(ut.getTimezoneOffset()-nt.getTimezoneOffset())*s)/f})}var A=E(0),L=E(1),_=E(2),C=E(3),M=E(4),v=E(5),z=E(6),T=A.range,F=L.range,q=_.range,U=C.range,H=M.range,j=v.range,G=z.range,O=n(function(Te){Te.setDate(1),Te.setHours(0,0,0,0)},function(Te,nt){Te.setMonth(Te.getMonth()+nt)},function(Te,nt){return nt.getMonth()-Te.getMonth()+(nt.getFullYear()-Te.getFullYear())*12},function(Te){return Te.getMonth()}),W=O.range,re=n(function(Te){Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,nt){Te.setFullYear(Te.getFullYear()+nt)},function(Te,nt){return nt.getFullYear()-Te.getFullYear()},function(Te){return Te.getFullYear()});re.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(nt){nt.setFullYear(Math.floor(nt.getFullYear()/Te)*Te),nt.setMonth(0,1),nt.setHours(0,0,0,0)},function(nt,ut){nt.setFullYear(nt.getFullYear()+ut*Te)})};var ne=re.range,be=n(function(Te){Te.setUTCSeconds(0,0)},function(Te,nt){Te.setTime(+Te+nt*s)},function(Te,nt){return(nt-Te)/s},function(Te){return Te.getUTCMinutes()}),ze=be.range,Ce=n(function(Te){Te.setUTCMinutes(0,0,0)},function(Te,nt){Te.setTime(+Te+nt*u)},function(Te,nt){return(nt-Te)/u},function(Te){return Te.getUTCHours()}),he=Ce.range,te=n(function(Te){Te.setUTCHours(0,0,0,0)},function(Te,nt){Te.setUTCDate(Te.getUTCDate()+nt)},function(Te,nt){return(nt-Te)/l},function(Te){return Te.getUTCDate()-1}),ke=te.range;function Ee(Te){return n(function(nt){nt.setUTCDate(nt.getUTCDate()-(nt.getUTCDay()+7-Te)%7),nt.setUTCHours(0,0,0,0)},function(nt,ut){nt.setUTCDate(nt.getUTCDate()+ut*7)},function(nt,ut){return(ut-nt)/f})}var Me=Ee(0),Oe=Ee(1),Re=Ee(2),me=Ee(3),Be=Ee(4),fe=Ee(5),Ze=Ee(6),et=Me.range,gt=Oe.range,Pt=Re.range,Qe=me.range,Xe=Be.range,Tt=fe.range,xt=Ze.range,_t=n(function(Te){Te.setUTCDate(1),Te.setUTCHours(0,0,0,0)},function(Te,nt){Te.setUTCMonth(Te.getUTCMonth()+nt)},function(Te,nt){return nt.getUTCMonth()-Te.getUTCMonth()+(nt.getUTCFullYear()-Te.getUTCFullYear())*12},function(Te){return Te.getUTCMonth()}),Ct=_t.range,jt=n(function(Te){Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,nt){Te.setUTCFullYear(Te.getUTCFullYear()+nt)},function(Te,nt){return nt.getUTCFullYear()-Te.getUTCFullYear()},function(Te){return Te.getUTCFullYear()});jt.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(nt){nt.setUTCFullYear(Math.floor(nt.getUTCFullYear()/Te)*Te),nt.setUTCMonth(0,1),nt.setUTCHours(0,0,0,0)},function(nt,ut){nt.setUTCFullYear(nt.getUTCFullYear()+ut*Te)})};var At=jt.range;e.timeDay=y,e.timeDays=k,e.timeFriday=v,e.timeFridays=j,e.timeHour=x,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=p,e.timeMonday=L,e.timeMondays=F,e.timeMonth=O,e.timeMonths=W,e.timeSaturday=z,e.timeSaturdays=G,e.timeSecond=c,e.timeSeconds=h,e.timeSunday=A,e.timeSundays=T,e.timeThursday=M,e.timeThursdays=H,e.timeTuesday=_,e.timeTuesdays=q,e.timeWednesday=C,e.timeWednesdays=U,e.timeWeek=A,e.timeWeeks=T,e.timeYear=re,e.timeYears=ne,e.utcDay=te,e.utcDays=ke,e.utcFriday=fe,e.utcFridays=Tt,e.utcHour=Ce,e.utcHours=he,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=be,e.utcMinutes=ze,e.utcMonday=Oe,e.utcMondays=gt,e.utcMonth=_t,e.utcMonths=Ct,e.utcSaturday=Ze,e.utcSaturdays=xt,e.utcSecond=c,e.utcSeconds=h,e.utcSunday=Me,e.utcSundays=et,e.utcThursday=Be,e.utcThursdays=Xe,e.utcTuesday=Re,e.utcTuesdays=Pt,e.utcWednesday=me,e.utcWednesdays=Qe,e.utcWeek=Me,e.utcWeeks=et,e.utcYear=jt,e.utcYears=At,Object.defineProperty(e,"__esModule",{value:!0})})});var e3=Se((iL,dee)=>{(function(e,t){typeof iL=="object"&&typeof dee!="undefined"?t(iL,wB()):typeof define=="function"&&define.amd?define(["exports","d3-time"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(iL,function(e,t){"use strict";function r(_e){if(0<=_e.y&&_e.y<100){var Fe=new Date(-1,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L);return Fe.setFullYear(_e.y),Fe}return new Date(_e.y,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L)}function n(_e){if(0<=_e.y&&_e.y<100){var Fe=new Date(Date.UTC(-1,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L));return Fe.setUTCFullYear(_e.y),Fe}return new Date(Date.UTC(_e.y,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L))}function i(_e,Fe,Pe){return{y:_e,m:Fe,d:Pe,H:0,M:0,S:0,L:0}}function a(_e){var Fe=_e.dateTime,Pe=_e.date,Ie=_e.time,lt=_e.periods,ye=_e.days,ue=_e.shortDays,de=_e.months,ht=_e.shortMonths,Et=h(lt),St=d(lt),Zt=h(ye),qr=d(ye),Lr=h(ue),vr=d(ue),Er=h(de),si=d(de),Ei=h(ht),Si=d(ht),xi={a:Br,A:oi,b:vi,B:Pi,c:null,d:O,e:O,f:ze,H:W,I:re,j:ne,L:be,m:Ce,M:he,p:Yr,q:Ni,Q:tt,s:Je,S:te,u:ke,U:Ee,V:Me,w:Oe,W:Re,x:null,X:null,y:me,Y:Be,Z:fe,"%":je},Hi={a:Ur,A:ti,b:ki,B:ji,c:null,d:Ze,e:Ze,f:Xe,H:et,I:gt,j:Pt,L:Qe,m:Tt,M:xt,p:Vi,q:zi,Q:tt,s:Je,S:_t,u:Ct,U:jt,V:At,w:Te,W:nt,x:null,X:null,y:ut,Y:ct,Z:rt,"%":je},Jr={a:Dt,A:Bt,b:sr,B:br,c:zr,d:M,e:M,f:U,H:z,I:z,j:v,L:q,m:C,M:T,p:vt,q:_,Q:j,s:G,S:F,u:x,U:b,V:y,w:p,W:k,x:Tr,X:Rr,y:A,Y:E,Z:L,"%":H};xi.x=ci(Pe,xi),xi.X=ci(Ie,xi),xi.c=ci(Fe,xi),Hi.x=ci(Pe,Hi),Hi.X=ci(Ie,Hi),Hi.c=ci(Fe,Hi);function ci(Mi,sn){return function(fi){var Or=[],st=-1,Wt=0,tr=Mi.length,or,Nr,hi;for(fi instanceof Date||(fi=new Date(+fi));++st<tr;)Mi.charCodeAt(st)===37&&(Or.push(Mi.slice(Wt,st)),(Nr=o[or=Mi.charAt(++st)])!=null?or=Mi.charAt(++st):Nr=or==="e"?" ":"0",(hi=sn[or])&&(or=hi(fi,Nr)),Or.push(or),Wt=st+1);return Or.push(Mi.slice(Wt,st)),Or.join("")}}function Di(Mi,sn){return function(fi){var Or=i(1900,void 0,1),st=Lt(Or,Mi,fi+="",0),Wt,tr;if(st!=fi.length)return null;if("Q"in Or)return new Date(Or.Q);if("s"in Or)return new Date(Or.s*1e3+("L"in Or?Or.L:0));if(sn&&!("Z"in Or)&&(Or.Z=0),"p"in Or&&(Or.H=Or.H%12+Or.p*12),Or.m===void 0&&(Or.m="q"in Or?Or.q:0),"V"in Or){if(Or.V<1||Or.V>53)return null;"w"in Or||(Or.w=1),"Z"in Or?(Wt=n(i(Or.y,0,1)),tr=Wt.getUTCDay(),Wt=tr>4||tr===0?t.utcMonday.ceil(Wt):t.utcMonday(Wt),Wt=t.utcDay.offset(Wt,(Or.V-1)*7),Or.y=Wt.getUTCFullYear(),Or.m=Wt.getUTCMonth(),Or.d=Wt.getUTCDate()+(Or.w+6)%7):(Wt=r(i(Or.y,0,1)),tr=Wt.getDay(),Wt=tr>4||tr===0?t.timeMonday.ceil(Wt):t.timeMonday(Wt),Wt=t.timeDay.offset(Wt,(Or.V-1)*7),Or.y=Wt.getFullYear(),Or.m=Wt.getMonth(),Or.d=Wt.getDate()+(Or.w+6)%7)}else("W"in Or||"U"in Or)&&("w"in Or||(Or.w="u"in Or?Or.u%7:"W"in Or?1:0),tr="Z"in Or?n(i(Or.y,0,1)).getUTCDay():r(i(Or.y,0,1)).getDay(),Or.m=0,Or.d="W"in Or?(Or.w+6)%7+Or.W*7-(tr+5)%7:Or.w+Or.U*7-(tr+6)%7);return"Z"in Or?(Or.H+=Or.Z/100|0,Or.M+=Or.Z%100,n(Or)):r(Or)}}function Lt(Mi,sn,fi,Or){for(var st=0,Wt=sn.length,tr=fi.length,or,Nr;st<Wt;){if(Or>=tr)return-1;if(or=sn.charCodeAt(st++),or===37){if(or=sn.charAt(st++),Nr=Jr[or in o?sn.charAt(st++):or],!Nr||(Or=Nr(Mi,fi,Or))<0)return-1}else if(or!=fi.charCodeAt(Or++))return-1}return Or}function vt(Mi,sn,fi){var Or=Et.exec(sn.slice(fi));return Or?(Mi.p=St[Or[0].toLowerCase()],fi+Or[0].length):-1}function Dt(Mi,sn,fi){var Or=Lr.exec(sn.slice(fi));return Or?(Mi.w=vr[Or[0].toLowerCase()],fi+Or[0].length):-1}function Bt(Mi,sn,fi){var Or=Zt.exec(sn.slice(fi));return Or?(Mi.w=qr[Or[0].toLowerCase()],fi+Or[0].length):-1}function sr(Mi,sn,fi){var Or=Ei.exec(sn.slice(fi));return Or?(Mi.m=Si[Or[0].toLowerCase()],fi+Or[0].length):-1}function br(Mi,sn,fi){var Or=Er.exec(sn.slice(fi));return Or?(Mi.m=si[Or[0].toLowerCase()],fi+Or[0].length):-1}function zr(Mi,sn,fi){return Lt(Mi,Fe,sn,fi)}function Tr(Mi,sn,fi){return Lt(Mi,Pe,sn,fi)}function Rr(Mi,sn,fi){return Lt(Mi,Ie,sn,fi)}function Br(Mi){return ue[Mi.getDay()]}function oi(Mi){return ye[Mi.getDay()]}function vi(Mi){return ht[Mi.getMonth()]}function Pi(Mi){return de[Mi.getMonth()]}function Yr(Mi){return lt[+(Mi.getHours()>=12)]}function Ni(Mi){return 1+~~(Mi.getMonth()/3)}function Ur(Mi){return ue[Mi.getUTCDay()]}function ti(Mi){return ye[Mi.getUTCDay()]}function ki(Mi){return ht[Mi.getUTCMonth()]}function ji(Mi){return de[Mi.getUTCMonth()]}function Vi(Mi){return lt[+(Mi.getUTCHours()>=12)]}function zi(Mi){return 1+~~(Mi.getUTCMonth()/3)}return{format:function(Mi){var sn=ci(Mi+="",xi);return sn.toString=function(){return Mi},sn},parse:function(Mi){var sn=Di(Mi+="",!1);return sn.toString=function(){return Mi},sn},utcFormat:function(Mi){var sn=ci(Mi+="",Hi);return sn.toString=function(){return Mi},sn},utcParse:function(Mi){var sn=Di(Mi+="",!0);return sn.toString=function(){return Mi},sn}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,u=/^%/,l=/[\\^$*+?|[\]().{}]/g;function f(_e,Fe,Pe){var Ie=_e<0?"-":"",lt=(Ie?-_e:_e)+"",ye=lt.length;return Ie+(ye<Pe?new Array(Pe-ye+1).join(Fe)+lt:lt)}function c(_e){return _e.replace(l,"\\$&")}function h(_e){return new RegExp("^(?:"+_e.map(c).join("|")+")","i")}function d(_e){for(var Fe={},Pe=-1,Ie=_e.length;++Pe<Ie;)Fe[_e[Pe].toLowerCase()]=Pe;return Fe}function p(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+1));return Ie?(_e.w=+Ie[0],Pe+Ie[0].length):-1}function x(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+1));return Ie?(_e.u=+Ie[0],Pe+Ie[0].length):-1}function b(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.U=+Ie[0],Pe+Ie[0].length):-1}function y(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.V=+Ie[0],Pe+Ie[0].length):-1}function k(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.W=+Ie[0],Pe+Ie[0].length):-1}function E(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+4));return Ie?(_e.y=+Ie[0],Pe+Ie[0].length):-1}function A(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.y=+Ie[0]+(+Ie[0]>68?1900:2e3),Pe+Ie[0].length):-1}function L(_e,Fe,Pe){var Ie=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Fe.slice(Pe,Pe+6));return Ie?(_e.Z=Ie[1]?0:-(Ie[2]+(Ie[3]||"00")),Pe+Ie[0].length):-1}function _(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+1));return Ie?(_e.q=Ie[0]*3-3,Pe+Ie[0].length):-1}function C(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.m=Ie[0]-1,Pe+Ie[0].length):-1}function M(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.d=+Ie[0],Pe+Ie[0].length):-1}function v(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+3));return Ie?(_e.m=0,_e.d=+Ie[0],Pe+Ie[0].length):-1}function z(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.H=+Ie[0],Pe+Ie[0].length):-1}function T(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.M=+Ie[0],Pe+Ie[0].length):-1}function F(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.S=+Ie[0],Pe+Ie[0].length):-1}function q(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+3));return Ie?(_e.L=+Ie[0],Pe+Ie[0].length):-1}function U(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+6));return Ie?(_e.L=Math.floor(Ie[0]/1e3),Pe+Ie[0].length):-1}function H(_e,Fe,Pe){var Ie=u.exec(Fe.slice(Pe,Pe+1));return Ie?Pe+Ie[0].length:-1}function j(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe));return Ie?(_e.Q=+Ie[0],Pe+Ie[0].length):-1}function G(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe));return Ie?(_e.s=+Ie[0],Pe+Ie[0].length):-1}function O(_e,Fe){return f(_e.getDate(),Fe,2)}function W(_e,Fe){return f(_e.getHours(),Fe,2)}function re(_e,Fe){return f(_e.getHours()%12||12,Fe,2)}function ne(_e,Fe){return f(1+t.timeDay.count(t.timeYear(_e),_e),Fe,3)}function be(_e,Fe){return f(_e.getMilliseconds(),Fe,3)}function ze(_e,Fe){return be(_e,Fe)+"000"}function Ce(_e,Fe){return f(_e.getMonth()+1,Fe,2)}function he(_e,Fe){return f(_e.getMinutes(),Fe,2)}function te(_e,Fe){return f(_e.getSeconds(),Fe,2)}function ke(_e){var Fe=_e.getDay();return Fe===0?7:Fe}function Ee(_e,Fe){return f(t.timeSunday.count(t.timeYear(_e)-1,_e),Fe,2)}function Me(_e,Fe){var Pe=_e.getDay();return _e=Pe>=4||Pe===0?t.timeThursday(_e):t.timeThursday.ceil(_e),f(t.timeThursday.count(t.timeYear(_e),_e)+(t.timeYear(_e).getDay()===4),Fe,2)}function Oe(_e){return _e.getDay()}function Re(_e,Fe){return f(t.timeMonday.count(t.timeYear(_e)-1,_e),Fe,2)}function me(_e,Fe){return f(_e.getFullYear()%100,Fe,2)}function Be(_e,Fe){return f(_e.getFullYear()%1e4,Fe,4)}function fe(_e){var Fe=_e.getTimezoneOffset();return(Fe>0?"-":(Fe*=-1,"+"))+f(Fe/60|0,"0",2)+f(Fe%60,"0",2)}function Ze(_e,Fe){return f(_e.getUTCDate(),Fe,2)}function et(_e,Fe){return f(_e.getUTCHours(),Fe,2)}function gt(_e,Fe){return f(_e.getUTCHours()%12||12,Fe,2)}function Pt(_e,Fe){return f(1+t.utcDay.count(t.utcYear(_e),_e),Fe,3)}function Qe(_e,Fe){return f(_e.getUTCMilliseconds(),Fe,3)}function Xe(_e,Fe){return Qe(_e,Fe)+"000"}function Tt(_e,Fe){return f(_e.getUTCMonth()+1,Fe,2)}function xt(_e,Fe){return f(_e.getUTCMinutes(),Fe,2)}function _t(_e,Fe){return f(_e.getUTCSeconds(),Fe,2)}function Ct(_e){var Fe=_e.getUTCDay();return Fe===0?7:Fe}function jt(_e,Fe){return f(t.utcSunday.count(t.utcYear(_e)-1,_e),Fe,2)}function At(_e,Fe){var Pe=_e.getUTCDay();return _e=Pe>=4||Pe===0?t.utcThursday(_e):t.utcThursday.ceil(_e),f(t.utcThursday.count(t.utcYear(_e),_e)+(t.utcYear(_e).getUTCDay()===4),Fe,2)}function Te(_e){return _e.getUTCDay()}function nt(_e,Fe){return f(t.utcMonday.count(t.utcYear(_e)-1,_e),Fe,2)}function ut(_e,Fe){return f(_e.getUTCFullYear()%100,Fe,2)}function ct(_e,Fe){return f(_e.getUTCFullYear()%1e4,Fe,4)}function rt(){return"+0000"}function je(){return"%"}function tt(_e){return+_e}function Je(_e){return Math.floor(+_e/1e3)}var Mt;Vt({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 Vt(_e){return Mt=a(_e),e.timeFormat=Mt.format,e.timeParse=Mt.parse,e.utcFormat=Mt.utcFormat,e.utcParse=Mt.utcParse,Mt}var Kt="%Y-%m-%dT%H:%M:%S.%LZ";function ir(_e){return _e.toISOString()}var fr=Date.prototype.toISOString?ir:e.utcFormat(Kt);function Ot(_e){var Fe=new Date(_e);return isNaN(Fe)?null:Fe}var De=+new Date("2000-01-01T00:00:00.000Z")?Ot:e.utcParse(Kt);e.isoFormat=fr,e.isoParse=De,e.timeFormatDefaultLocale=Vt,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var TB=Se((nL,pee)=>{(function(e,t){typeof nL=="object"&&typeof pee!="undefined"?t(nL):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(nL,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((v=(C=M?C.toExponential(M-1):C.toExponential()).indexOf("e"))<0)return null;var v,z=C.slice(0,v);return[z.length>1?z[0]+z.slice(2):z,+C.slice(v+1)]}function n(C){return C=r(Math.abs(C)),C?C[1]:NaN}function i(C,M){return function(v,z){for(var T=v.length,F=[],q=0,U=C[0],H=0;T>0&&U>0&&(H+U+1>z&&(U=Math.max(1,z-H)),F.push(v.substring(T-=U,T+U)),!((H+=U+1)>z));)U=C[q=(q+1)%C.length];return F.reverse().join(M)}}function a(C){return function(M){return M.replace(/[0-9]/g,function(v){return C[+v]})}}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 u({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=u.prototype;function u(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+""}u.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 l(C){e:for(var M=C.length,v=1,z=-1,T;v<M;++v)switch(C[v]){case".":z=T=v;break;case"0":z===0&&(z=v),T=v;break;default:if(!+C[v])break e;z>0&&(z=0);break}return z>0?C.slice(0,z)+C.slice(T+1):C}var f;function c(C,M){var v=r(C,M);if(!v)return C+"";var z=v[0],T=v[1],F=T-(f=Math.max(-8,Math.min(8,Math.floor(T/3)))*3)+1,q=z.length;return F===q?z:F>q?z+new Array(F-q+1).join("0"):F>0?z.slice(0,F)+"."+z.slice(F):"0."+new Array(1-F).join("0")+r(C,Math.max(0,M+F-1))[0]}function h(C,M){var v=r(C,M);if(!v)return C+"";var z=v[0],T=v[1];return T<0?"0."+new Array(-T).join("0")+z:z.length>T+1?z.slice(0,T+1)+"."+z.slice(T+1):z+new Array(T-z.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:c,X:function(C){return Math.round(C).toString(16).toUpperCase()},x:function(C){return Math.round(C).toString(16)}};function p(C){return C}var x=Array.prototype.map,b=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function y(C){var M=C.grouping===void 0||C.thousands===void 0?p:i(x.call(C.grouping,Number),C.thousands+""),v=C.currency===void 0?"":C.currency[0]+"",z=C.currency===void 0?"":C.currency[1]+"",T=C.decimal===void 0?".":C.decimal+"",F=C.numerals===void 0?p:a(x.call(C.numerals,String)),q=C.percent===void 0?"%":C.percent+"",U=C.minus===void 0?"-":C.minus+"",H=C.nan===void 0?"NaN":C.nan+"";function j(O){O=s(O);var W=O.fill,re=O.align,ne=O.sign,be=O.symbol,ze=O.zero,Ce=O.width,he=O.comma,te=O.precision,ke=O.trim,Ee=O.type;Ee==="n"?(he=!0,Ee="g"):d[Ee]||(te===void 0&&(te=12),ke=!0,Ee="g"),(ze||W==="0"&&re==="=")&&(ze=!0,W="0",re="=");var Me=be==="$"?v:be==="#"&&/[boxX]/.test(Ee)?"0"+Ee.toLowerCase():"",Oe=be==="$"?z:/[%p]/.test(Ee)?q:"",Re=d[Ee],me=/[defgprs%]/.test(Ee);te=te===void 0?6:/[gprs]/.test(Ee)?Math.max(1,Math.min(21,te)):Math.max(0,Math.min(20,te));function Be(fe){var Ze=Me,et=Oe,gt,Pt,Qe;if(Ee==="c")et=Re(fe)+et,fe="";else{fe=+fe;var Xe=fe<0||1/fe<0;if(fe=isNaN(fe)?H:Re(Math.abs(fe),te),ke&&(fe=l(fe)),Xe&&+fe==0&&ne!=="+"&&(Xe=!1),Ze=(Xe?ne==="("?ne:U:ne==="-"||ne==="("?"":ne)+Ze,et=(Ee==="s"?b[8+f/3]:"")+et+(Xe&&ne==="("?")":""),me){for(gt=-1,Pt=fe.length;++gt<Pt;)if(Qe=fe.charCodeAt(gt),48>Qe||Qe>57){et=(Qe===46?T+fe.slice(gt+1):fe.slice(gt))+et,fe=fe.slice(0,gt);break}}}he&&!ze&&(fe=M(fe,1/0));var Tt=Ze.length+fe.length+et.length,xt=Tt<Ce?new Array(Ce-Tt+1).join(W):"";switch(he&&ze&&(fe=M(xt+fe,xt.length?Ce-et.length:1/0),xt=""),re){case"<":fe=Ze+fe+et+xt;break;case"=":fe=Ze+xt+fe+et;break;case"^":fe=xt.slice(0,Tt=xt.length>>1)+Ze+fe+et+xt.slice(Tt);break;default:fe=xt+Ze+fe+et;break}return F(fe)}return Be.toString=function(){return O+""},Be}function G(O,W){var re=j((O=s(O),O.type="f",O)),ne=Math.max(-8,Math.min(8,Math.floor(n(W)/3)))*3,be=Math.pow(10,-ne),ze=b[8+ne/3];return function(Ce){return re(be*Ce)+ze}}return{format:j,formatPrefix:G}}var k;E({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function E(C){return k=y(C),e.format=k.format,e.formatPrefix=k.formatPrefix,k}function A(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 _(C,M){return C=Math.abs(C),M=Math.abs(M)-C,Math.max(0,n(M)-n(C))+1}e.FormatSpecifier=u,e.formatDefaultLocale=E,e.formatLocale=y,e.formatSpecifier=s,e.precisionFixed=A,e.precisionPrefix=L,e.precisionRound=_,Object.defineProperty(e,"__esModule",{value:!0})})});var yee=Se((etr,vee)=>{"use strict";vee.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 _u=Se((ttr,mee)=>{"use strict";var Cet=yee();mee.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&Cet(r))return!1}else if(t!=="number")return!1;return e-e<1}});var ju=Se((rtr,gee)=>{"use strict";gee.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 AB=Se((aL,_ee)=>{(function(e,t){typeof aL=="object"&&typeof _ee!="undefined"?t(aL):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(aL,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),u,l=s.length,f="";for(u=0;u<l;u+=3)f+=t[s[u]>>2],f+=t[(s[u]&3)<<4|s[u+1]>>4],f+=t[(s[u+1]&15)<<2|s[u+2]>>6],f+=t[s[u+2]&63];return l%3===2?f=f.substring(0,f.length-1)+"=":l%3===1&&(f=f.substring(0,f.length-2)+"=="),f},a=function(o){var s=o.length*.75,u=o.length,l,f=0,c,h,d,p;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var x=new ArrayBuffer(s),b=new Uint8Array(x);for(l=0;l<u;l+=4)c=r[o.charCodeAt(l)],h=r[o.charCodeAt(l+1)],d=r[o.charCodeAt(l+2)],p=r[o.charCodeAt(l+3)],b[f++]=c<<2|h>>4,b[f++]=(h&15)<<4|d>>2,b[f++]=(d&3)<<6|p&63;return x};e.decode=a,e.encode=i,Object.defineProperty(e,"__esModule",{value:!0})})});var yg=Se((itr,xee)=>{"use strict";xee.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 yp=Se(my=>{"use strict";var Let=AB().decode,zet=yg(),SB=Array.isArray,Pet=ArrayBuffer,Iet=DataView;function bee(e){return Pet.isView(e)&&!(e instanceof Iet)}my.isTypedArray=bee;function oL(e){return SB(e)||bee(e)}my.isArrayOrTypedArray=oL;function Det(e){return!oL(e[0])}my.isArray1D=Det;my.ensureArray=function(e,t){return SB(e)||(e=[]),e.length=t,e};var Pd={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};Pd.uint8c=Pd.u1c;Pd.uint8=Pd.u1;Pd.int8=Pd.i1;Pd.uint16=Pd.u2;Pd.int16=Pd.i2;Pd.uint32=Pd.u4;Pd.int32=Pd.i4;Pd.float32=Pd.f4;Pd.float64=Pd.f8;function MB(e){return e.constructor===ArrayBuffer}my.isArrayBuffer=MB;my.decodeTypedArraySpec=function(e){var t=[],r=Ret(e),n=r.dtype,i=Pd[n];if(!i)throw new Error('Error in dtype: "'+n+'"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;MB(o)||(o=Let(o));var s=r.shape===void 0?[o.byteLength/a]:(""+r.shape).split(",");s.reverse();var u=s.length,l,f,c=+s[0],h=a*c,d=0;if(u===1)t=new i(o);else if(u===2)for(l=+s[1],f=0;f<l;f++)t[f]=new i(o,d,c),d+=h;else if(u===3){l=+s[1];for(var p=+s[2],x=0;x<p;x++)for(t[x]=[],f=0;f<l;f++)t[x][f]=new i(o,d,c),d+=h}else throw new Error("ndim: "+u+'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};my.isTypedArraySpec=function(e){return zet(e)&&e.hasOwnProperty("dtype")&&typeof e.dtype=="string"&&e.hasOwnProperty("bdata")&&(typeof e.bdata=="string"||MB(e.bdata))&&(e.shape===void 0||e.hasOwnProperty("shape")&&(typeof e.shape=="string"||typeof e.shape=="number"))};function Ret(e){return{bdata:e.bdata,dtype:e.dtype,shape:e.shape}}my.concat=function(){var e=[],t=!0,r=0,n,i,a,o,s,u,l,f;for(a=0;a<arguments.length;a++)o=arguments[a],u=o.length,u&&(i?e.push(o):(i=o,s=u),SB(o)?n=!1:(t=!1,r?n!==o.constructor&&(n=!1):n=o.constructor),r+=u);if(!r)return[];if(!e.length)return i;if(t)return i.concat.apply(i,e);if(n){for(l=new n(r),l.set(i),a=0;a<e.length;a++)o=e[a],l.set(o,s),s+=o.length;return l}for(l=new Array(r),f=0;f<i.length;f++)l[f]=i[f];for(a=0;a<e.length;a++){for(o=e[a],f=0;f<o.length;f++)l[s+f]=o[f];s+=f}return l};my.maxRowLength=function(e){return wee(e,Math.max,0)};my.minRowLength=function(e){return wee(e,Math.min,1/0)};function wee(e,t,r){if(oL(e))if(oL(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 EM=Se((atr,Eee)=>{"use strict";var Tee=_u(),kB=yp().isArrayOrTypedArray;Eee.exports=function(t,r){if(Tee(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-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].substr(1,i[2].length-2).split("]["),o=0;o<a.length;o++)s++,n.splice(s,0,Number(a[o]))}s++}return typeof t!="object"?Oet(t,r,n):{set:See(t,n,r),get:Aee(t,n),astr:r,parts:n,obj:t}};function Aee(e,t){return function(){var r=e,n,i,a,o,s;for(o=0;o<t.length-1;o++){if(n=t[o],n===-1){for(i=!0,a=[],s=0;s<r.length;s++)a[s]=Aee(r[s],t.slice(o+1))(),a[s]!==a[0]&&(i=!1);return i?a[0]:a}if(typeof n=="number"&&!kB(r)||(r=r[n],typeof r!="object"||r===null))return}if(!(typeof r!="object"||r===null)&&(a=r[t[o]],a!==null))return a}}var Fet=/(^|\.)args\[/;function EB(e,t){return e===void 0||e===null&&!t.match(Fet)}function See(e,t,r){return function(n){var i=e,a="",o=[[e,a]],s=EB(n,r),u,l;for(l=0;l<t.length-1;l++){if(u=t[l],typeof u=="number"&&!kB(i))throw"array index but container is not an array";if(u===-1){if(s=!Bet(i,t.slice(l+1),n,r),s)break;return}if(!Mee(i,u,t[l+1],s))break;if(i=i[u],typeof i!="object"||i===null)throw"container is not an object";a=qet(a,u),o.push([i,a])}if(s){if(l===t.length-1&&(delete i[t[l]],Array.isArray(i)&&+t[l]===i.length-1))for(;i.length&&i[i.length-1]===void 0;)i.pop()}else i[t[l]]=n}}function qet(e,t){var r=t;return Tee(t)?r="["+t+"]":e&&(r="."+t),e+r}function Bet(e,t,r,n){var i=kB(r),a=!0,o=r,s=n.replace("-1",0),u=i?!1:EB(r,s),l=t[0],f;for(f=0;f<e.length;f++)s=n.replace("-1",f),i&&(o=r[f%r.length],u=EB(o,s)),u&&(a=!1),Mee(e,f,l,u)&&See(e[f],t,n.replace("-1",f))(o);return a}function Mee(e,t,r,n){if(e[t]===void 0){if(n)return!1;typeof r=="number"?e[t]=[]:e[t]={}}return!0}function Oet(e,t,r){return{set:function(){throw"bad container"},get:function(){},astr:t,parts:r,obj:e}}});var zee=Se((otr,Lee)=>{"use strict";var t3=EM(),Net=/^\w*$/,Uet=0,kee=1,sL=2,Cee=3,ob=4;Lee.exports=function(t,r,n,i){n=n||"name",i=i||"value";var a,o,s,u={};r&&r.length?(s=t3(t,r),o=s.get()):o=t,r=r||"";var l={};if(o)for(a=0;a<o.length;a++)l[o[a][n]]=a;var f=Net.test(i),c={set:function(h,d){var p=d===null?ob:Uet;if(!o){if(!s||p===ob)return;o=[],s.set(o)}var x=l[h];if(x===void 0){if(p===ob)return;p=p|Cee,x=o.length,l[h]=x}else d!==(f?o[x][i]:t3(o[x],i).get())&&(p=p|sL);var b=o[x]=o[x]||{};return b[n]=h,f?b[i]=d:t3(b,i).set(d),d!==null&&(p=p&~ob),u[x]=u[x]|p,c},get:function(h){if(o){var d=l[h];if(d!==void 0)return f?o[d][i]:t3(o[d],i).get()}},rename:function(h,d){var p=l[h];return p===void 0||(u[p]=u[p]|kee,l[d]=p,delete l[h],o[p][n]=d),c},remove:function(h){var d=l[h];if(d===void 0)return c;var p=o[d];if(Object.keys(p).length>2)return u[d]=u[d]|sL,c.set(h,null);if(f){for(a=d;a<o.length;a++)u[a]=u[a]|Cee;for(a=d;a<o.length;a++)l[o[a][n]]--;o.splice(d,1),delete l[h]}else t3(p,i).set(null),u[d]=u[d]|sL|ob;return c},constructUpdate:function(){for(var h,d,p={},x=Object.keys(u),b=0;b<x.length;b++)d=x[b],h=r+"["+d+"]",o[d]?(u[d]&kee&&(p[h+"."+n]=o[d][n]),u[d]&sL&&(f?p[h+"."+i]=u[d]&ob?null:o[d][i]:p[h+"."+i]=u[d]&ob?null:t3(o[d],i).get())):p[h]=null;return p}};return c}});var Iee=Se((str,Pee)=>{"use strict";var Vet=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Het=/^[^\.\[\]]+$/;Pee.exports=function(e,t){for(;t;){var r=e.match(Vet);if(r)e=r[1];else if(e.match(Het))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 lL=Se((ltr,Dee)=>{"use strict";var Get=_u();Dee.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 Get(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var qee=Se((utr,Fee)=>{"use strict";var Ree=yp().isArrayOrTypedArray,kM=yg();Fee.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(Ree(i)&&Ree(a)&&kM(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]&&kM(i[s])&&kM(a[s])&&e(a[s],i[s])}else kM(i)&&kM(a)&&(e(a,i),Object.keys(a).length||delete t[n])}}});var r3=Se((ftr,Bee)=>{"use strict";function Wet(e,t){var r=e%t;return r<0?r+t:r}function jet(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Bee.exports={mod:Wet,modHalf:jet}});var cd=Se((ctr,uL)=>{(function(e){var t=/^\s+/,r=/\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function u(me,Be){if(me=me||"",Be=Be||{},me instanceof u)return me;if(!(this instanceof u))return new u(me,Be);var fe=l(me);this._originalInput=me,this._r=fe.r,this._g=fe.g,this._b=fe.b,this._a=fe.a,this._roundA=i(100*this._a)/100,this._format=Be.format||fe.format,this._gradientType=Be.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=fe.ok,this._tc_id=n++}u.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(),Be,fe,Ze,et,gt,Pt;return Be=me.r/255,fe=me.g/255,Ze=me.b/255,Be<=.03928?et=Be/12.92:et=e.pow((Be+.055)/1.055,2.4),fe<=.03928?gt=fe/12.92:gt=e.pow((fe+.055)/1.055,2.4),Ze<=.03928?Pt=Ze/12.92:Pt=e.pow((Ze+.055)/1.055,2.4),.2126*et+.7152*gt+.0722*Pt},setAlpha:function(me){return this._a=O(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),Be=i(me.h*360),fe=i(me.s*100),Ze=i(me.v*100);return this._a==1?"hsv("+Be+", "+fe+"%, "+Ze+"%)":"hsva("+Be+", "+fe+"%, "+Ze+"%, "+this._roundA+")"},toHsl:function(){var me=c(this._r,this._g,this._b);return{h:me.h*360,s:me.s,l:me.l,a:this._a}},toHslString:function(){var me=c(this._r,this._g,this._b),Be=i(me.h*360),fe=i(me.s*100),Ze=i(me.l*100);return this._a==1?"hsl("+Be+", "+fe+"%, "+Ze+"%)":"hsla("+Be+", "+fe+"%, "+Ze+"%, "+this._roundA+")"},toHex:function(me){return x(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(W(this._r,255)*100)+"%",g:i(W(this._g,255)*100)+"%",b:i(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(W(this._r,255)*100)+"%, "+i(W(this._g,255)*100)+"%, "+i(W(this._b,255)*100)+"%)":"rgba("+i(W(this._r,255)*100)+"%, "+i(W(this._g,255)*100)+"%, "+i(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:j[x(this._r,this._g,this._b,!0)]||!1},toFilter:function(me){var Be="#"+y(this._r,this._g,this._b,this._a),fe=Be,Ze=this._gradientType?"GradientType = 1, ":"";if(me){var et=u(me);fe="#"+y(et._r,et._g,et._b,et._a)}return"progid:DXImageTransform.Microsoft.gradient("+Ze+"startColorstr="+Be+",endColorstr="+fe+")"},toString:function(me){var Be=!!me;me=me||this._format;var fe=!1,Ze=this._a<1&&this._a>=0,et=!Be&&Ze&&(me==="hex"||me==="hex6"||me==="hex3"||me==="hex4"||me==="hex8"||me==="name");return et?me==="name"&&this._a===0?this.toName():this.toRgbString():(me==="rgb"&&(fe=this.toRgbString()),me==="prgb"&&(fe=this.toPercentageRgbString()),(me==="hex"||me==="hex6")&&(fe=this.toHexString()),me==="hex3"&&(fe=this.toHexString(!0)),me==="hex4"&&(fe=this.toHex8String(!0)),me==="hex8"&&(fe=this.toHex8String()),me==="name"&&(fe=this.toName()),me==="hsl"&&(fe=this.toHslString()),me==="hsv"&&(fe=this.toHsvString()),fe||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function(me,Be){var fe=me.apply(null,[this].concat([].slice.call(Be)));return this._r=fe._r,this._g=fe._g,this._b=fe._b,this.setAlpha(fe._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(_,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(A,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(me,Be){return me.apply(null,[this].concat([].slice.call(Be)))},analogous:function(){return this._applyCombination(q,arguments)},complement:function(){return this._applyCombination(v,arguments)},monochromatic:function(){return this._applyCombination(U,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(z,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},u.fromRatio=function(me,Be){if(typeof me=="object"){var fe={};for(var Ze in me)me.hasOwnProperty(Ze)&&(Ze==="a"?fe[Ze]=me[Ze]:fe[Ze]=he(me[Ze]));me=fe}return u(me,Be)};function l(me){var Be={r:0,g:0,b:0},fe=1,Ze=null,et=null,gt=null,Pt=!1,Qe=!1;return typeof me=="string"&&(me=Oe(me)),typeof me=="object"&&(Me(me.r)&&Me(me.g)&&Me(me.b)?(Be=f(me.r,me.g,me.b),Pt=!0,Qe=String(me.r).substr(-1)==="%"?"prgb":"rgb"):Me(me.h)&&Me(me.s)&&Me(me.v)?(Ze=he(me.s),et=he(me.v),Be=p(me.h,Ze,et),Pt=!0,Qe="hsv"):Me(me.h)&&Me(me.s)&&Me(me.l)&&(Ze=he(me.s),gt=he(me.l),Be=h(me.h,Ze,gt),Pt=!0,Qe="hsl"),me.hasOwnProperty("a")&&(fe=me.a)),fe=O(fe),{ok:Pt,format:me.format||Qe,r:a(255,o(Be.r,0)),g:a(255,o(Be.g,0)),b:a(255,o(Be.b,0)),a:fe}}function f(me,Be,fe){return{r:W(me,255)*255,g:W(Be,255)*255,b:W(fe,255)*255}}function c(me,Be,fe){me=W(me,255),Be=W(Be,255),fe=W(fe,255);var Ze=o(me,Be,fe),et=a(me,Be,fe),gt,Pt,Qe=(Ze+et)/2;if(Ze==et)gt=Pt=0;else{var Xe=Ze-et;switch(Pt=Qe>.5?Xe/(2-Ze-et):Xe/(Ze+et),Ze){case me:gt=(Be-fe)/Xe+(Be<fe?6:0);break;case Be:gt=(fe-me)/Xe+2;break;case fe:gt=(me-Be)/Xe+4;break}gt/=6}return{h:gt,s:Pt,l:Qe}}function h(me,Be,fe){var Ze,et,gt;me=W(me,360),Be=W(Be,100),fe=W(fe,100);function Pt(Tt,xt,_t){return _t<0&&(_t+=1),_t>1&&(_t-=1),_t<1/6?Tt+(xt-Tt)*6*_t:_t<1/2?xt:_t<2/3?Tt+(xt-Tt)*(2/3-_t)*6:Tt}if(Be===0)Ze=et=gt=fe;else{var Qe=fe<.5?fe*(1+Be):fe+Be-fe*Be,Xe=2*fe-Qe;Ze=Pt(Xe,Qe,me+1/3),et=Pt(Xe,Qe,me),gt=Pt(Xe,Qe,me-1/3)}return{r:Ze*255,g:et*255,b:gt*255}}function d(me,Be,fe){me=W(me,255),Be=W(Be,255),fe=W(fe,255);var Ze=o(me,Be,fe),et=a(me,Be,fe),gt,Pt,Qe=Ze,Xe=Ze-et;if(Pt=Ze===0?0:Xe/Ze,Ze==et)gt=0;else{switch(Ze){case me:gt=(Be-fe)/Xe+(Be<fe?6:0);break;case Be:gt=(fe-me)/Xe+2;break;case fe:gt=(me-Be)/Xe+4;break}gt/=6}return{h:gt,s:Pt,v:Qe}}function p(me,Be,fe){me=W(me,360)*6,Be=W(Be,100),fe=W(fe,100);var Ze=e.floor(me),et=me-Ze,gt=fe*(1-Be),Pt=fe*(1-et*Be),Qe=fe*(1-(1-et)*Be),Xe=Ze%6,Tt=[fe,Pt,gt,gt,Qe,fe][Xe],xt=[Qe,fe,fe,Pt,gt,gt][Xe],_t=[gt,gt,Qe,fe,fe,Pt][Xe];return{r:Tt*255,g:xt*255,b:_t*255}}function x(me,Be,fe,Ze){var et=[Ce(i(me).toString(16)),Ce(i(Be).toString(16)),Ce(i(fe).toString(16))];return Ze&&et[0].charAt(0)==et[0].charAt(1)&&et[1].charAt(0)==et[1].charAt(1)&&et[2].charAt(0)==et[2].charAt(1)?et[0].charAt(0)+et[1].charAt(0)+et[2].charAt(0):et.join("")}function b(me,Be,fe,Ze,et){var gt=[Ce(i(me).toString(16)),Ce(i(Be).toString(16)),Ce(i(fe).toString(16)),Ce(te(Ze))];return et&&gt[0].charAt(0)==gt[0].charAt(1)&&gt[1].charAt(0)==gt[1].charAt(1)&&gt[2].charAt(0)==gt[2].charAt(1)&&gt[3].charAt(0)==gt[3].charAt(1)?gt[0].charAt(0)+gt[1].charAt(0)+gt[2].charAt(0)+gt[3].charAt(0):gt.join("")}function y(me,Be,fe,Ze){var et=[Ce(te(Ze)),Ce(i(me).toString(16)),Ce(i(Be).toString(16)),Ce(i(fe).toString(16))];return et.join("")}u.equals=function(me,Be){return!me||!Be?!1:u(me).toRgbString()==u(Be).toRgbString()},u.random=function(){return u.fromRatio({r:s(),g:s(),b:s()})};function k(me,Be){Be=Be===0?0:Be||10;var fe=u(me).toHsl();return fe.s-=Be/100,fe.s=re(fe.s),u(fe)}function E(me,Be){Be=Be===0?0:Be||10;var fe=u(me).toHsl();return fe.s+=Be/100,fe.s=re(fe.s),u(fe)}function A(me){return u(me).desaturate(100)}function L(me,Be){Be=Be===0?0:Be||10;var fe=u(me).toHsl();return fe.l+=Be/100,fe.l=re(fe.l),u(fe)}function _(me,Be){Be=Be===0?0:Be||10;var fe=u(me).toRgb();return fe.r=o(0,a(255,fe.r-i(255*-(Be/100)))),fe.g=o(0,a(255,fe.g-i(255*-(Be/100)))),fe.b=o(0,a(255,fe.b-i(255*-(Be/100)))),u(fe)}function C(me,Be){Be=Be===0?0:Be||10;var fe=u(me).toHsl();return fe.l-=Be/100,fe.l=re(fe.l),u(fe)}function M(me,Be){var fe=u(me).toHsl(),Ze=(fe.h+Be)%360;return fe.h=Ze<0?360+Ze:Ze,u(fe)}function v(me){var Be=u(me).toHsl();return Be.h=(Be.h+180)%360,u(Be)}function z(me){var Be=u(me).toHsl(),fe=Be.h;return[u(me),u({h:(fe+120)%360,s:Be.s,l:Be.l}),u({h:(fe+240)%360,s:Be.s,l:Be.l})]}function T(me){var Be=u(me).toHsl(),fe=Be.h;return[u(me),u({h:(fe+90)%360,s:Be.s,l:Be.l}),u({h:(fe+180)%360,s:Be.s,l:Be.l}),u({h:(fe+270)%360,s:Be.s,l:Be.l})]}function F(me){var Be=u(me).toHsl(),fe=Be.h;return[u(me),u({h:(fe+72)%360,s:Be.s,l:Be.l}),u({h:(fe+216)%360,s:Be.s,l:Be.l})]}function q(me,Be,fe){Be=Be||6,fe=fe||30;var Ze=u(me).toHsl(),et=360/fe,gt=[u(me)];for(Ze.h=(Ze.h-(et*Be>>1)+720)%360;--Be;)Ze.h=(Ze.h+et)%360,gt.push(u(Ze));return gt}function U(me,Be){Be=Be||6;for(var fe=u(me).toHsv(),Ze=fe.h,et=fe.s,gt=fe.v,Pt=[],Qe=1/Be;Be--;)Pt.push(u({h:Ze,s:et,v:gt})),gt=(gt+Qe)%1;return Pt}u.mix=function(me,Be,fe){fe=fe===0?0:fe||50;var Ze=u(me).toRgb(),et=u(Be).toRgb(),gt=fe/100,Pt={r:(et.r-Ze.r)*gt+Ze.r,g:(et.g-Ze.g)*gt+Ze.g,b:(et.b-Ze.b)*gt+Ze.b,a:(et.a-Ze.a)*gt+Ze.a};return u(Pt)},u.readability=function(me,Be){var fe=u(me),Ze=u(Be);return(e.max(fe.getLuminance(),Ze.getLuminance())+.05)/(e.min(fe.getLuminance(),Ze.getLuminance())+.05)},u.isReadable=function(me,Be,fe){var Ze=u.readability(me,Be),et,gt;switch(gt=!1,et=Re(fe),et.level+et.size){case"AAsmall":case"AAAlarge":gt=Ze>=4.5;break;case"AAlarge":gt=Ze>=3;break;case"AAAsmall":gt=Ze>=7;break}return gt},u.mostReadable=function(me,Be,fe){var Ze=null,et=0,gt,Pt,Qe,Xe;fe=fe||{},Pt=fe.includeFallbackColors,Qe=fe.level,Xe=fe.size;for(var Tt=0;Tt<Be.length;Tt++)gt=u.readability(me,Be[Tt]),gt>et&&(et=gt,Ze=u(Be[Tt]));return u.isReadable(me,Ze,{level:Qe,size:Xe})||!Pt?Ze:(fe.includeFallbackColors=!1,u.mostReadable(me,["#fff","#000"],fe))};var H=u.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"},j=u.hexNames=G(H);function G(me){var Be={};for(var fe in me)me.hasOwnProperty(fe)&&(Be[me[fe]]=fe);return Be}function O(me){return me=parseFloat(me),(isNaN(me)||me<0||me>1)&&(me=1),me}function W(me,Be){be(me)&&(me="100%");var fe=ze(me);return me=a(Be,o(0,parseFloat(me))),fe&&(me=parseInt(me*Be,10)/100),e.abs(me-Be)<1e-6?1:me%Be/parseFloat(Be)}function re(me){return a(1,o(0,me))}function ne(me){return parseInt(me,16)}function be(me){return typeof me=="string"&&me.indexOf(".")!=-1&&parseFloat(me)===1}function ze(me){return typeof me=="string"&&me.indexOf("%")!=-1}function Ce(me){return me.length==1?"0"+me:""+me}function he(me){return me<=1&&(me=me*100+"%"),me}function te(me){return e.round(parseFloat(me)*255).toString(16)}function ke(me){return ne(me)/255}var Ee=function(){var me="[-\\+]?\\d+%?",Be="[-\\+]?\\d*\\.\\d+%?",fe="(?:"+Be+")|(?:"+me+")",Ze="[\\s|\\(]+("+fe+")[,|\\s]+("+fe+")[,|\\s]+("+fe+")\\s*\\)?",et="[\\s|\\(]+("+fe+")[,|\\s]+("+fe+")[,|\\s]+("+fe+")[,|\\s]+("+fe+")\\s*\\)?";return{CSS_UNIT:new RegExp(fe),rgb:new RegExp("rgb"+Ze),rgba:new RegExp("rgba"+et),hsl:new RegExp("hsl"+Ze),hsla:new RegExp("hsla"+et),hsv:new RegExp("hsv"+Ze),hsva:new RegExp("hsva"+et),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 Me(me){return!!Ee.CSS_UNIT.exec(me)}function Oe(me){me=me.replace(t,"").replace(r,"").toLowerCase();var Be=!1;if(H[me])me=H[me],Be=!0;else if(me=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var fe;return(fe=Ee.rgb.exec(me))?{r:fe[1],g:fe[2],b:fe[3]}:(fe=Ee.rgba.exec(me))?{r:fe[1],g:fe[2],b:fe[3],a:fe[4]}:(fe=Ee.hsl.exec(me))?{h:fe[1],s:fe[2],l:fe[3]}:(fe=Ee.hsla.exec(me))?{h:fe[1],s:fe[2],l:fe[3],a:fe[4]}:(fe=Ee.hsv.exec(me))?{h:fe[1],s:fe[2],v:fe[3]}:(fe=Ee.hsva.exec(me))?{h:fe[1],s:fe[2],v:fe[3],a:fe[4]}:(fe=Ee.hex8.exec(me))?{r:ne(fe[1]),g:ne(fe[2]),b:ne(fe[3]),a:ke(fe[4]),format:Be?"name":"hex8"}:(fe=Ee.hex6.exec(me))?{r:ne(fe[1]),g:ne(fe[2]),b:ne(fe[3]),format:Be?"name":"hex"}:(fe=Ee.hex4.exec(me))?{r:ne(fe[1]+""+fe[1]),g:ne(fe[2]+""+fe[2]),b:ne(fe[3]+""+fe[3]),a:ke(fe[4]+""+fe[4]),format:Be?"name":"hex8"}:(fe=Ee.hex3.exec(me))?{r:ne(fe[1]+""+fe[1]),g:ne(fe[2]+""+fe[2]),b:ne(fe[3]+""+fe[3]),format:Be?"name":"hex"}:!1}function Re(me){var Be,fe;return me=me||{level:"AA",size:"small"},Be=(me.level||"AA").toUpperCase(),fe=(me.size||"small").toLowerCase(),Be!=="AA"&&Be!=="AAA"&&(Be="AA"),fe!=="small"&&fe!=="large"&&(fe="small"),{level:Be,size:fe}}typeof uL!="undefined"&&uL.exports?uL.exports=u:typeof define=="function"&&define.amd?define(function(){return u}):window.tinycolor=u})(Math)});var vu=Se(zM=>{"use strict";var Oee=yg(),CM=Array.isArray;function Zet(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}zM.extendFlat=function(){return LM(arguments,!1,!1,!1)};zM.extendDeep=function(){return LM(arguments,!0,!1,!1)};zM.extendDeepAll=function(){return LM(arguments,!0,!0,!1)};zM.extendDeepNoArrays=function(){return LM(arguments,!0,!1,!0)};function LM(e,t,r,n){var i=e[0],a=e.length,o,s,u,l,f,c,h;if(a===2&&CM(i)&&CM(e[1])&&i.length===0){if(h=Zet(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)u=i[s],l=o[s],n&&CM(l)?i[s]=l:t&&l&&(Oee(l)||(f=CM(l)))?(f?(f=!1,c=u&&CM(u)?u:[]):c=u&&Oee(u)?u:{},i[s]=LM([c,l],t,r,n)):(typeof l!="undefined"||r)&&(i[s]=l)}return i}});var uc=Se((dtr,Nee)=>{"use strict";Nee.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 PM=Se((ptr,Uee)=>{"use strict";Uee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var O1=Se((vtr,Gee)=>{"use strict";var Vee=PM(),Hee=uc(),CB=Hee({editType:"none"});CB.family.dflt=Vee.HOVERFONT;CB.size.dflt=Vee.HOVERFONTSIZE;Gee.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:CB,grouptitlefont:Hee({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var i3=Se((ytr,Wee)=>{"use strict";var Xet=uc(),fL=O1().hoverlabel,cL=vu().extendFlat;Wee.exports={hoverlabel:{bgcolor:cL({},fL.bgcolor,{arrayOk:!0}),bordercolor:cL({},fL.bordercolor,{arrayOk:!0}),font:Xet({arrayOk:!0,editType:"none"}),align:cL({},fL.align,{arrayOk:!0}),namelength:cL({},fL.namelength,{arrayOk:!0}),editType:"none"}}});var zf=Se((mtr,jee)=>{"use strict";var Yet=uc(),Ket=i3();jee.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:Yet({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:Ket.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 sb=Se((gtr,Yee)=>{"use strict";var Jet=cd(),hL={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)"]]},Zee=hL.RdBu;function $et(e,t){if(t||(t=Zee),!e)return t;function r(){try{e=hL[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),Xee(e)?e:t}function Xee(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||!Jet(n[1]).isValid())return!1;t=+n[0]}return!0}function Qet(e){return hL[e]!==void 0?!0:Xee(e)}Yee.exports={scales:hL,defaultScale:Zee,get:$et,isValid:Qet}});var Ih=Se(lb=>{"use strict";lb.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];lb.defaultLine="#444";lb.lightLine="#eee";lb.background="#fff";lb.borderLine="#BEC8D9";lb.lightFraction=100*10/11});var Pl=Se((xtr,Kee)=>{"use strict";var xv=cd(),ett=_u(),ttt=yp().isTypedArray,hd=Kee.exports={},dL=Ih();hd.defaults=dL.defaults;var rtt=hd.defaultLine=dL.defaultLine;hd.lightLine=dL.lightLine;var zB=hd.background=dL.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(xv(e))};hd.opacity=function(e){return e?xv(e).getAlpha():0};hd.addOpacity=function(e,t){var r=xv(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};hd.combine=function(e,t){var r=xv(e).toRgb();if(r.a===1)return xv(e).toRgbString();var n=xv(t||zB).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 xv(a).toRgbString()};hd.interpolate=function(e,t,r){var n=xv(e).toRgb(),i=xv(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 xv(a).toRgbString()};hd.contrast=function(e,t,r){var n=xv(e);n.getAlpha()!==1&&(n=xv(hd.combine(e,zB)));var i=n.isDark()?t?n.lighten(t):zB:r?n.darken(r):rtt;return i.toString()};hd.stroke=function(e,t){var r=xv(t);e.style({stroke:hd.tinyRGB(r),"stroke-opacity":r.getAlpha()})};hd.fill=function(e,t){var r=xv(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.substr(i.length-5)==="color")if(Array.isArray(a))for(n=0;n<a.length;n++)a[n]=LB(a[n]);else e[i]=LB(a);else if(i.substr(i.length-10)==="colorscale"&&Array.isArray(a))for(n=0;n<a.length;n++)Array.isArray(a[n])&&(a[n][1]=LB(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"&&!ttt(a)&&hd.clean(a)}};function LB(e){if(ett(e)||typeof e!="string")return e;var t=e.trim();if(t.substr(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 N1=Se((btr,Jee)=>{"use strict";Jee.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var n3=Se($ee=>{"use strict";$ee.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 rte=Se(bv=>{"use strict";var PB=_u(),Qee=cd(),ete=vu().extendFlat,itt=zf(),ntt=sb(),att=Pl(),ott=N1().DESELECTDIM,a3=EM(),tte=n3().counter,stt=r3().modHalf,dm=yp().isArrayOrTypedArray,U1=yp().isTypedArraySpec,V1=yp().decodeTypedArraySpec;bv.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(dm(e)?e:U1(e)?V1(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.substr(1,i.length-2));if(a.test(e))return!0}else if(e===r[n])return!0}return!1}},boolean:{coerceFunction:function(e,t,r){e===!0||e===!1?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){U1(e)&&(e=V1(e)),!PB(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}U1(e)&&(e=V1(e)),e%1||!PB(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){U1(e)&&(e=V1(e)),Qee(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return Qee(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(ntt.get(e,r))}},angle:{coerceFunction:function(e,t,r){U1(e)&&(e=V1(e)),e==="auto"?t.set("auto"):PB(e)?t.set(stt(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||tte(r);if(typeof e=="string"&&i.test(e)){t.set(e);return}t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!tte(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(U1(e)?V1(e):e)}},info_array:{coerceFunction:function(e,t,r,n){function i(k,E,A){var L,_={set:function(C){L=C}};return A===void 0&&(A=E.dflt),bv.valObjectMeta[E.valType].coerceFunction(k,_,A,E),L}if(U1(e)&&(e=V1(e)),!dm(e)){t.set(r);return}var a=n.dimensions===2||n.dimensions==="1-2"&&Array.isArray(e)&&dm(e[0]),o=n.items,s=[],u=Array.isArray(o),l=u&&a&&dm(o[0]),f=a&&u&&!l,c=u&&!f?o.length:e.length,h,d,p,x,b,y;if(r=Array.isArray(r)?r:[],a)for(h=0;h<c;h++)for(s[h]=[],p=dm(e[h])?e[h]:[],f?b=o.length:u?b=o[h].length:b=p.length,d=0;d<b;d++)f?x=o[d]:u?x=o[h][d]:x=o,y=i(p[d],x,(r[h]||[])[d]),y!==void 0&&(s[h][d]=y);else for(h=0;h<c;h++)y=i(e[h],u?o[h]:o,r[h]),y!==void 0&&(s[h]=y);t.set(s)},validateFunction:function(e,t){if(!dm(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(!dm(e[a])||!t.freeLength&&e[a].length!==r[a].length)return!1;for(var o=0;o<e[a].length;o++)if(!pL(e[a][o],n?r[a][o]:r))return!1}else if(!pL(e[a],n?r[a]:r))return!1;return!0}}};bv.coerce=function(e,t,r,n,i){var a=a3(r,n).get(),o=a3(e,n),s=a3(t,n),u=o.get(),l=t._template;if(u===void 0&&l&&(u=a3(l,n).get(),l=0),i===void 0&&(i=a.dflt),a.arrayOk){if(dm(u))return s.set(u),u;if(U1(u))return u=V1(u),s.set(u),u}var f=bv.valObjectMeta[a.valType].coerceFunction;f(u,s,i,a);var c=s.get();return l&&c===i&&!pL(u,a)&&(u=a3(l,n).get(),f(u,s,i,a),c=s.get()),c};bv.coerce2=function(e,t,r,n,i){var a=a3(e,n),o=bv.coerce(e,t,r,n,i),s=a.get();return s!=null?o:!1};bv.coerceFont=function(e,t,r,n){n||(n={}),r=ete({},r),r=ete(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};bv.coercePattern=function(e,t,r,n){var i=e(t+".shape");if(i){e(t+".solidity"),e(t+".size");var a=e(t+".fillmode"),o=a==="overlay";if(!n){var s=e(t+".bgcolor",o?r:void 0);e(t+".fgcolor",o?att.contrast(s):r)}e(t+".fgopacity",o?.5:1)}};bv.coerceHoverinfo=function(e,t,r){var n=t._module.attributes,i=n.hoverinfo?n:itt,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 bv.coerce(e,t,i,"hoverinfo",o)};bv.coerceSelectionMarkerOpacity=function(e,t){if(e.marker){var r=e.marker.opacity;if(r!==void 0){var n,i;!dm(r)&&!e.selected&&!e.unselected&&(n=r,i=ott*r),t("selected.marker.opacity",n),t("unselected.marker.opacity",i)}}};function pL(e,t){var r=bv.valObjectMeta[t.valType];if(t.arrayOk&&dm(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}bv.validate=pL});var ub=Se((Atr,ote)=>{"use strict";var ite={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/"},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:{}}},nte={};function ate(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),ate(n,t[r]))}}ate(ite,nte);ote.exports={configAttributes:ite,dfltConfig:nte}});var DB=Se((Str,ste)=>{"use strict";var IB=Nl(),ltt=_u(),IM=[];ste.exports=function(e,t){if(IM.indexOf(e)!==-1)return;IM.push(e);var r=1e3;ltt(t)?r=t:t==="long"&&(r=3e3);var n=IB.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var i=n.selectAll(".notifier-note").data(IM);function a(o){o.duration(700).style("opacity",0).each("end",function(s){var u=IM.indexOf(s);u!==-1&&IM.splice(u,1),IB.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var s=IB.select(this);s.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){s.transition().call(a)});for(var u=s.append("p"),l=o.split(/<br\s*\/?>/g),f=0;f<l.length;f++)f&&u.append("br"),u.append("span").text(l[f]);t==="stick"?s.transition().duration(350).style("opacity",1):s.transition().duration(700).style("opacity",1).transition().delay(r).call(a)})}});var H1=Se((Mtr,lte)=>{"use strict";var o3=ub().dfltConfig,RB=DB(),FB=lte.exports={};FB.log=function(){var e;if(o3.logging>1){var t=["LOG:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(o3.notifyOnLogging>1){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);RB(r.join("<br>"),"long")}};FB.warn=function(){var e;if(o3.logging>0){var t=["WARN:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(o3.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);RB(r.join("<br>"),"stick")}};FB.error=function(){var e;if(o3.logging>0){var t=["ERROR:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.error.apply(console,t)}if(o3.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);RB(r.join("<br>"),"stick")}}});var vL=Se((Etr,ute)=>{"use strict";ute.exports=function(){}});var qB=Se((ktr,fte)=>{"use strict";fte.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 hte=Se((Ctr,cte)=>{cte.exports=utt;function utt(){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 pte=Se((Ltr,dte)=>{dte.exports=ftt;function ftt(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 yte=Se((ztr,vte)=>{vte.exports=ctt;function ctt(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 BB=Se((Ptr,mte)=>{mte.exports=htt;function htt(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 _te=Se((Itr,gte)=>{gte.exports=dtt;function dtt(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 bte=Se((Dtr,xte)=>{xte.exports=ptt;function ptt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],f=t[8],c=t[9],h=t[10],d=t[11],p=t[12],x=t[13],b=t[14],y=t[15],k=r*s-n*o,E=r*u-i*o,A=r*l-a*o,L=n*u-i*s,_=n*l-a*s,C=i*l-a*u,M=f*x-c*p,v=f*b-h*p,z=f*y-d*p,T=c*b-h*x,F=c*y-d*x,q=h*y-d*b,U=k*q-E*F+A*T+L*z-_*v+C*M;return U?(U=1/U,e[0]=(s*q-u*F+l*T)*U,e[1]=(i*F-n*q-a*T)*U,e[2]=(x*C-b*_+y*L)*U,e[3]=(h*_-c*C-d*L)*U,e[4]=(u*z-o*q-l*v)*U,e[5]=(r*q-i*z+a*v)*U,e[6]=(b*A-p*C-y*E)*U,e[7]=(f*C-h*A+d*E)*U,e[8]=(o*F-s*z+l*M)*U,e[9]=(n*z-r*F-a*M)*U,e[10]=(p*_-x*A+y*k)*U,e[11]=(c*A-f*_-d*k)*U,e[12]=(s*v-o*T-u*M)*U,e[13]=(r*T-n*v+i*M)*U,e[14]=(x*E-p*L-b*k)*U,e[15]=(f*L-c*E+h*k)*U,e):null}});var Tte=Se((Rtr,wte)=>{wte.exports=vtt;function vtt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],f=t[8],c=t[9],h=t[10],d=t[11],p=t[12],x=t[13],b=t[14],y=t[15];return e[0]=s*(h*y-d*b)-c*(u*y-l*b)+x*(u*d-l*h),e[1]=-(n*(h*y-d*b)-c*(i*y-a*b)+x*(i*d-a*h)),e[2]=n*(u*y-l*b)-s*(i*y-a*b)+x*(i*l-a*u),e[3]=-(n*(u*d-l*h)-s*(i*d-a*h)+c*(i*l-a*u)),e[4]=-(o*(h*y-d*b)-f*(u*y-l*b)+p*(u*d-l*h)),e[5]=r*(h*y-d*b)-f*(i*y-a*b)+p*(i*d-a*h),e[6]=-(r*(u*y-l*b)-o*(i*y-a*b)+p*(i*l-a*u)),e[7]=r*(u*d-l*h)-o*(i*d-a*h)+f*(i*l-a*u),e[8]=o*(c*y-d*x)-f*(s*y-l*x)+p*(s*d-l*c),e[9]=-(r*(c*y-d*x)-f*(n*y-a*x)+p*(n*d-a*c)),e[10]=r*(s*y-l*x)-o*(n*y-a*x)+p*(n*l-a*s),e[11]=-(r*(s*d-l*c)-o*(n*d-a*c)+f*(n*l-a*s)),e[12]=-(o*(c*b-h*x)-f*(s*b-u*x)+p*(s*h-u*c)),e[13]=r*(c*b-h*x)-f*(n*b-i*x)+p*(n*h-i*c),e[14]=-(r*(s*b-u*x)-o*(n*b-i*x)+p*(n*u-i*s)),e[15]=r*(s*h-u*c)-o*(n*h-i*c)+f*(n*u-i*s),e}});var Ste=Se((Ftr,Ate)=>{Ate.exports=ytt;function ytt(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],f=e[9],c=e[10],h=e[11],d=e[12],p=e[13],x=e[14],b=e[15],y=t*o-r*a,k=t*s-n*a,E=t*u-i*a,A=r*s-n*o,L=r*u-i*o,_=n*u-i*s,C=l*p-f*d,M=l*x-c*d,v=l*b-h*d,z=f*x-c*p,T=f*b-h*p,F=c*b-h*x;return y*F-k*T+E*z+A*v-L*M+_*C}});var Ete=Se((qtr,Mte)=>{Mte.exports=mtt;function mtt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],f=t[7],c=t[8],h=t[9],d=t[10],p=t[11],x=t[12],b=t[13],y=t[14],k=t[15],E=r[0],A=r[1],L=r[2],_=r[3];return e[0]=E*n+A*s+L*c+_*x,e[1]=E*i+A*u+L*h+_*b,e[2]=E*a+A*l+L*d+_*y,e[3]=E*o+A*f+L*p+_*k,E=r[4],A=r[5],L=r[6],_=r[7],e[4]=E*n+A*s+L*c+_*x,e[5]=E*i+A*u+L*h+_*b,e[6]=E*a+A*l+L*d+_*y,e[7]=E*o+A*f+L*p+_*k,E=r[8],A=r[9],L=r[10],_=r[11],e[8]=E*n+A*s+L*c+_*x,e[9]=E*i+A*u+L*h+_*b,e[10]=E*a+A*l+L*d+_*y,e[11]=E*o+A*f+L*p+_*k,E=r[12],A=r[13],L=r[14],_=r[15],e[12]=E*n+A*s+L*c+_*x,e[13]=E*i+A*u+L*h+_*b,e[14]=E*a+A*l+L*d+_*y,e[15]=E*o+A*f+L*p+_*k,e}});var Cte=Se((Btr,kte)=>{kte.exports=gtt;function gtt(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,u,l,f,c,h,d,p,x,b,y;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],u=t[2],l=t[3],f=t[4],c=t[5],h=t[6],d=t[7],p=t[8],x=t[9],b=t[10],y=t[11],e[0]=o,e[1]=s,e[2]=u,e[3]=l,e[4]=f,e[5]=c,e[6]=h,e[7]=d,e[8]=p,e[9]=x,e[10]=b,e[11]=y,e[12]=o*n+f*i+p*a+t[12],e[13]=s*n+c*i+x*a+t[13],e[14]=u*n+h*i+b*a+t[14],e[15]=l*n+d*i+y*a+t[15]),e}});var zte=Se((Otr,Lte)=>{Lte.exports=_tt;function _tt(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 Ite=Se((Ntr,Pte)=>{Pte.exports=xtt;function xtt(e,t,r,n){var i=n[0],a=n[1],o=n[2],s=Math.sqrt(i*i+a*a+o*o),u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H;return Math.abs(s)<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,u=Math.sin(r),l=Math.cos(r),f=1-l,c=t[0],h=t[1],d=t[2],p=t[3],x=t[4],b=t[5],y=t[6],k=t[7],E=t[8],A=t[9],L=t[10],_=t[11],C=i*i*f+l,M=a*i*f+o*u,v=o*i*f-a*u,z=i*a*f-o*u,T=a*a*f+l,F=o*a*f+i*u,q=i*o*f+a*u,U=a*o*f-i*u,H=o*o*f+l,e[0]=c*C+x*M+E*v,e[1]=h*C+b*M+A*v,e[2]=d*C+y*M+L*v,e[3]=p*C+k*M+_*v,e[4]=c*z+x*T+E*F,e[5]=h*z+b*T+A*F,e[6]=d*z+y*T+L*F,e[7]=p*z+k*T+_*F,e[8]=c*q+x*U+E*H,e[9]=h*q+b*U+A*H,e[10]=d*q+y*U+L*H,e[11]=p*q+k*U+_*H,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var Rte=Se((Utr,Dte)=>{Dte.exports=btt;function btt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],u=t[7],l=t[8],f=t[9],c=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+l*n,e[5]=o*i+f*n,e[6]=s*i+c*n,e[7]=u*i+h*n,e[8]=l*i-a*n,e[9]=f*i-o*n,e[10]=c*i-s*n,e[11]=h*i-u*n,e}});var qte=Se((Vtr,Fte)=>{Fte.exports=wtt;function wtt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],l=t[8],f=t[9],c=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-l*n,e[1]=o*i-f*n,e[2]=s*i-c*n,e[3]=u*i-h*n,e[8]=a*n+l*i,e[9]=o*n+f*i,e[10]=s*n+c*i,e[11]=u*n+h*i,e}});var Ote=Se((Htr,Bte)=>{Bte.exports=Ttt;function Ttt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],l=t[4],f=t[5],c=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+l*n,e[1]=o*i+f*n,e[2]=s*i+c*n,e[3]=u*i+h*n,e[4]=l*i-a*n,e[5]=f*i-o*n,e[6]=c*i-s*n,e[7]=h*i-u*n,e}});var Ute=Se((Gtr,Nte)=>{Nte.exports=Att;function Att(e,t,r){var n,i,a,o=r[0],s=r[1],u=r[2],l=Math.sqrt(o*o+s*s+u*u);return Math.abs(l)<1e-6?null:(l=1/l,o*=l,s*=l,u*=l,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+u*n,e[2]=u*o*a-s*n,e[3]=0,e[4]=o*s*a-u*n,e[5]=s*s*a+i,e[6]=u*s*a+o*n,e[7]=0,e[8]=o*u*a+s*n,e[9]=s*u*a-o*n,e[10]=u*u*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Hte=Se((Wtr,Vte)=>{Vte.exports=Stt;function Stt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,u=i+i,l=a+a,f=n*s,c=n*u,h=n*l,d=i*u,p=i*l,x=a*l,b=o*s,y=o*u,k=o*l;return e[0]=1-(d+x),e[1]=c+k,e[2]=h-y,e[3]=0,e[4]=c-k,e[5]=1-(f+x),e[6]=p+b,e[7]=0,e[8]=h+y,e[9]=p-b,e[10]=1-(f+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Wte=Se((jtr,Gte)=>{Gte.exports=Mtt;function Mtt(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 Zte=Se((Ztr,jte)=>{jte.exports=Ett;function Ett(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 Yte=Se((Xtr,Xte)=>{Xte.exports=ktt;function ktt(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 Jte=Se((Ytr,Kte)=>{Kte.exports=Ctt;function Ctt(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 Qte=Se((Ktr,$te)=>{$te.exports=Ltt;function Ltt(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 OB=Se((Jtr,ere)=>{ere.exports=ztt;function ztt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,l=r*o,f=n*o,c=n*s,h=i*o,d=i*s,p=i*u,x=a*o,b=a*s,y=a*u;return e[0]=1-c-p,e[1]=f+y,e[2]=h-b,e[3]=0,e[4]=f-y,e[5]=1-l-p,e[6]=d+x,e[7]=0,e[8]=h+b,e[9]=d-x,e[10]=1-l-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var rre=Se(($tr,tre)=>{tre.exports=Ptt;function Ptt(e,t,r,n,i,a,o){var s=1/(r-t),u=1/(i-n),l=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*u,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*u,e[10]=(o+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*l,e[15]=0,e}});var nre=Se((Qtr,ire)=>{ire.exports=Itt;function Itt(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 ore=Se((err,are)=>{are.exports=Dtt;function Dtt(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),u=2/(o+s),l=2/(i+a);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-((o-s)*u*.5),e[9]=(i-a)*l*.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 lre=Se((trr,sre)=>{sre.exports=Rtt;function Rtt(e,t,r,n,i,a,o){var s=1/(t-r),u=1/(n-i),l=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*l,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*u,e[14]=(o+a)*l,e[15]=1,e}});var fre=Se((rrr,ure)=>{var Ftt=BB();ure.exports=qtt;function qtt(e,t,r,n){var i,a,o,s,u,l,f,c,h,d,p=t[0],x=t[1],b=t[2],y=n[0],k=n[1],E=n[2],A=r[0],L=r[1],_=r[2];return Math.abs(p-A)<1e-6&&Math.abs(x-L)<1e-6&&Math.abs(b-_)<1e-6?Ftt(e):(f=p-A,c=x-L,h=b-_,d=1/Math.sqrt(f*f+c*c+h*h),f*=d,c*=d,h*=d,i=k*h-E*c,a=E*f-y*h,o=y*c-k*f,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=c*o-h*a,u=h*i-f*o,l=f*a-c*i,d=Math.sqrt(s*s+u*u+l*l),d?(d=1/d,s*=d,u*=d,l*=d):(s=0,u=0,l=0),e[0]=i,e[1]=s,e[2]=f,e[3]=0,e[4]=a,e[5]=u,e[6]=c,e[7]=0,e[8]=o,e[9]=l,e[10]=h,e[11]=0,e[12]=-(i*p+a*x+o*b),e[13]=-(s*p+u*x+l*b),e[14]=-(f*p+c*x+h*b),e[15]=1,e)}});var hre=Se((irr,cre)=>{cre.exports=Btt;function Btt(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 NB=Se((nrr,dre)=>{dre.exports={create:hte(),clone:pte(),copy:yte(),identity:BB(),transpose:_te(),invert:bte(),adjoint:Tte(),determinant:Ste(),multiply:Ete(),translate:Cte(),scale:zte(),rotate:Ite(),rotateX:Rte(),rotateY:qte(),rotateZ:Ote(),fromRotation:Ute(),fromRotationTranslation:Hte(),fromScaling:Wte(),fromTranslation:Zte(),fromXRotation:Yte(),fromYRotation:Jte(),fromZRotation:Qte(),fromQuat:OB(),frustum:rre(),perspective:nre(),perspectiveFromFieldOfView:ore(),ortho:lre(),lookAt:fre(),str:hre()}});var yL=Se(xh=>{"use strict";var Ott=NB();xh.init2dArray=function(e,t){for(var r=new Array(e),n=0;n<e;n++)r[n]=new Array(t);return r};xh.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};xh.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]=xh.dot(e[i],t);else if(t[0].length){var a=xh.transposeRagged(t);for(n=new Array(a.length),i=0;i<a.length;i++)n[i]=xh.dot(e,a[i])}else for(n=0,i=0;i<r;i++)n+=e[i]*t[i];return n};xh.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]};xh.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]]};xh.rotationXYMatrix=function(e,t,r){return xh.dot(xh.dot(xh.translationMatrix(t,r),xh.rotationMatrix(e)),xh.translationMatrix(-t,-r))};xh.apply3DTransform=function(e){return function(){var t=arguments,r=arguments.length===1?t[0]:[t[0],t[1],t[2]||0];return xh.dot(e,[r[0],r[1],r[2],1]).slice(0,3)}};xh.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 xh.dot(e,[r[0],r[1],1]).slice(0,2)}};xh.apply2DTransform2=function(e){var t=xh.apply2DTransform(e);return function(r){return t(r.slice(0,2)).concat(t(r.slice(2,4)))}};xh.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]};xh.inverseTransformMatrix=function(e){var t=[];return Ott.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 DM=Se((orr,_re)=>{"use strict";var Ntt=Nl(),pre=H1(),Utt=yL(),Vtt=NB();function Htt(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 Gtt(e){var t=Ntt.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function vre(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function Wtt(e,t){yre("global",e,t)}function yre(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):pre.warn("addStyleRule failed"):pre.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function jtt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&vre(r)}function Ztt(e,t,r,n,i){var a=n.split(":"),o=i.split(":"),s="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(u){u.getAttribute(s)||(u.addEventListener("mouseenter",function(){var l=this.querySelector(r);l&&(l.style[a[0]]=a[1])}),u.addEventListener("mouseleave",function(){var l=this.querySelector(r);l&&(t&&this.matches(t)?l.style[a[0]]=a[1]:l.style[o[0]]=o[1])}),u.setAttribute(s,!0))})}function Xtt(e){var t=gre(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=mre(n);if(i){var a=Utt.convertCssMatrix(i);r=Vtt.multiply(r,r,a)}}),r}function mre(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 gre(e){for(var t=[];Ytt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function Ytt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Ktt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}_re.exports={getGraphDiv:Htt,isPlotDiv:Gtt,removeElement:vre,addStyleRule:Wtt,addRelatedStyleRule:yre,deleteRelatedStyleRule:jtt,setStyleOnHover:Ztt,getFullTransformMatrix:Xtt,getElementTransformMatrix:mre,getElementAndAncestors:gre,equalDomRects:Ktt}});var RM=Se((srr,xre)=>{"use strict";xre.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 _c=Se((lrr,Ere)=>{"use strict";var wre=vu().extendFlat,Jtt=yg(),Tre={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},Are={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},$tt=Tre.flags.slice().concat(["fullReplot"]),Qtt=Are.flags.slice().concat("layoutReplot");Ere.exports={traces:Tre,layout:Are,traceFlags:function(){return bre($tt)},layoutFlags:function(){return bre(Qtt)},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:Sre};function bre(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!1;return t}function Sre(e,t,r){var n=wre({},e);for(var i in n){var a=n[i];Jtt(a)&&(n[i]=Mre(a,t,r,i))}return r==="from-root"&&(n.editType=t),n}function Mre(e,t,r,n){if(e.valType){var i=wre({},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]=Mre(e.items[a],t,"from-root")}return i}else return Sre(e,t,n.charAt(0)==="_"?"nested":"from-root")}});var Id=Se(UB=>{"use strict";UB.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};UB.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 VB=Se((frr,kre)=>{"use strict";kre.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 Du=Se(mL=>{"use strict";var Cre=VB(),crr=Cre.FORMAT_LINK,hrr=Cre.DATE_FORMAT_LINK;function HB(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var n=[],i=0;i<r.length;i++)n[i]="`"+r[i]+"`";t=t+"Finally, the template string has access to ",r.length===1?t=t+"variable "+n[0]:t=t+"variables "+n.slice(0,-1).join(", ")+" and "+n.slice(-1)+"."}return t}mL.hovertemplateAttrs=function(e,t){e=e||{},t=t||{};var r=HB(t),n={valType:"string",dflt:"",editType:e.editType||"none"};return e.arrayOk!==!1&&(n.arrayOk=!0),n};mL.texttemplateAttrs=function(e,t){e=e||{},t=t||{};var r=HB(t),n={valType:"string",dflt:"",editType:e.editType||"calc"};return e.arrayOk!==!1&&(n.arrayOk=!0),n};mL.shapeTexttemplateAttrs=function(e,t){e=e||{},t=t||{};var r=e.newshape?"new ":"",n=HB(t),i={valType:"string",dflt:"",editType:e.editType||"arraydraw"};return i}});var xL=Se((prr,Rre)=>{"use strict";function G1(e,t){return t?t.d2l(e):e}function Lre(e,t){return t?t.l2d(e):e}function ert(e){return e.x0}function trt(e){return e.x1}function rrt(e){return e.y0}function irt(e){return e.y1}function zre(e){return e.x0shift||0}function Pre(e){return e.x1shift||0}function Ire(e){return e.y0shift||0}function Dre(e){return e.y1shift||0}function gL(e,t){return G1(e.x1,t)+Pre(e)-G1(e.x0,t)-zre(e)}function _L(e,t,r){return G1(e.y1,r)+Dre(e)-G1(e.y0,r)-Ire(e)}function nrt(e,t){return Math.abs(gL(e,t))}function art(e,t,r){return Math.abs(_L(e,t,r))}function ort(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(gL(e,t),2)+Math.pow(_L(e,t,r),2))}function srt(e,t){return Lre((G1(e.x1,t)+Pre(e)+G1(e.x0,t)+zre(e))/2,t)}function lrt(e,t,r){return Lre((G1(e.y1,r)+Dre(e)+G1(e.y0,r)+Ire(e))/2,r)}function urt(e,t,r){return e.type!=="line"?void 0:_L(e,t,r)/gL(e,t)}Rre.exports={x0:ert,x1:trt,y0:rrt,y1:irt,slope:urt,dx:gL,dy:_L,width:nrt,height:art,length:ort,xcenter:srt,ycenter:lrt}});var Bre=Se((vrr,qre)=>{"use strict";var frt=_c().overrideAll,fb=zf(),Fre=uc(),crt=Id().dash,W1=vu().extendFlat,hrt=Du().shapeTexttemplateAttrs,drt=xL();qre.exports=frt({newshape:{visible:W1({},fb.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:W1({},fb.legend,{}),legendgroup:W1({},fb.legendgroup,{}),legendgrouptitle:{text:W1({},fb.legendgrouptitle.text,{}),font:Fre({})},legendrank:W1({},fb.legendrank,{}),legendwidth:W1({},fb.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:W1({},crt,{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:W1({},fb.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:hrt({newshape:!0},{keys:Object.keys(drt)}),font:Fre({}),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)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var Nre=Se((yrr,Ore)=>{"use strict";var prt=Id().dash,vrt=vu().extendFlat;Ore.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:vrt({},prt,{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 bL=Se((mrr,Ure)=>{"use strict";Ure.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 s3=Se((grr,Wre)=>{"use strict";var GB=uc(),yrt=RM(),wL=Ih(),Vre=Bre(),Hre=Nre(),mrt=bL(),Gre=vu().extendFlat,TL=GB({editType:"calc"});TL.family.dflt='"Open Sans", verdana, arial, sans-serif';TL.size.dflt=12;TL.color.dflt=wL.defaultLine;Wre.exports={font:TL,title:{text:{valType:"string",editType:"layoutstyle"},font:GB({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:GB({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:Gre(mrt({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:wL.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:wL.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:wL.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:Vre.newshape,activeshape:Vre.activeshape,newselection:Hre.newselection,activeselection:Hre.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Gre({},yrt.transition,{editType:"none"})}});var jre=Qf(()=>{});var grt={};var Zre=Qf(()=>{jre()});var Ul=Se(df=>{"use strict";var l3=H1(),Xre=vL(),Yre=qB(),_rt=yg(),xrt=DM().addStyleRule,Kre=vu(),brt=zf(),wrt=s3(),Trt=Kre.extendFlat,WB=Kre.extendDeepAll;df.modules={};df.allCategories={};df.allTypes=[];df.subplotsRegistry={};df.componentsRegistry={};df.layoutArrayContainers=[];df.layoutArrayRegexes=[];df.traceLayoutAttributes={};df.localeRegistry={};df.apiMethodRegistry={};df.collectableSubplotTypes=null;df.register=function(t){if(df.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":Art(n);break;case"transform":Ert(n);break;case"component":Mrt(n);break;case"locale":krt(n);break;case"apiMethod":var i=n.name;df.apiMethodRegistry[i]=n.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}};df.getModule=function(e){var t=df.modules[eie(e)];return t?t._module:!1};df.traceIs=function(e,t){if(e=eie(e),e==="various")return!1;var r=df.modules[e];return r||(e&&l3.log("Unrecognized trace type "+e+"."),r=df.modules[brt.type.dflt]),!!r.categories[t]};df.getComponentMethod=function(e,t){var r=df.componentsRegistry[e];return r&&r[t]||Xre};df.call=function(){var e=arguments[0],t=[].slice.call(arguments,1);return df.apiMethodRegistry[e].apply(null,t)};function Art(e){var t=e.name,r=e.categories,n=e.meta;if(df.modules[t]){l3.log("Type "+t+" already registered");return}df.subplotsRegistry[e.basePlotModule.name]||Srt(e.basePlotModule);for(var i={},a=0;a<r.length;a++)i[r[a]]=!0,df.allCategories[r[a]]=!0;df.modules[t]={_module:e,categories:i},n&&Object.keys(n).length&&(df.modules[t].meta=n),df.allTypes.push(t);for(var o in df.componentsRegistry)$re(o,t);e.layoutAttributes&&Trt(df.traceLayoutAttributes,e.layoutAttributes);var s=e.basePlotModule,u=s.name;if(u==="mapbox"){var l=s.constants.styleRules;for(var f in l)xrt(".js-plotly-plot .plotly .mapboxgl-"+f,l[f])}u==="map"&&(Zre(),ab(grt)),(u==="geo"||u==="mapbox"||u==="map")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function Srt(e){var t=e.name;if(df.subplotsRegistry[t]){l3.log("Plot type "+t+" already registered.");return}Jre(e),df.subplotsRegistry[t]=e;for(var r in df.componentsRegistry)Qre(r,e.name)}function Mrt(e){if(typeof e.name!="string")throw new Error("Component module *name* must be a string.");var t=e.name;df.componentsRegistry[t]=e,e.layoutAttributes&&(e.layoutAttributes._isLinkedToArray&&Yre(df.layoutArrayContainers,t),Jre(e));for(var r in df.modules)$re(t,r);for(var n in df.subplotsRegistry)Qre(t,n);e.schema&&e.schema.layout&&WB(wrt,e.schema.layout)}function Ert(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&&l3.log([t+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),_rt(e.attributes)||l3.log(t+" registered without an *attributes* object."),typeof e.supplyDefaults!="function"&&l3.log(t+" registered without a *supplyDefaults* method.")}function krt(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=df.localeRegistry,u=s[t];if(u||(s[t]=u={}),r!==t){var l=s[r];l||(s[r]=l={}),a&&l.dictionary===u.dictionary&&(l.dictionary=n),o&&l.format===u.format&&(l.format=i)}a&&(u.dictionary=n),o&&(u.format=i)}function Jre(e){if(e.layoutAttributes){var t=e.layoutAttributes._arrayAttrRegexps;if(t)for(var r=0;r<t.length;r++)Yre(df.layoutArrayRegexes,t[r])}}function $re(e,t){var r=df.componentsRegistry[e].schema;if(!(!r||!r.traces)){var n=r.traces[t];n&&WB(df.modules[t]._module.attributes,n)}}function Qre(e,t){var r=df.componentsRegistry[e].schema;if(!(!r||!r.subplots)){var n=df.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&&WB(i,o)}}function eie(e){return typeof e=="object"&&(e=e.type),e}});var uie=Se(bh=>{"use strict";var Crt=e3().timeFormat,sie=_u(),jB=H1(),Z1=r3().mod,c3=ju(),_0=c3.BADNUM,wv=c3.ONEDAY,FM=c3.ONEHOUR,j1=c3.ONEMIN,f3=c3.ONESEC,qM=c3.EPOCHJD,mg=Ul(),tie=e3().utcFormat,Lrt=/^\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,zrt=/^\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,rie=new Date().getFullYear()-70;function gg(e){return e&&mg.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}bh.dateTick0=function(e,t){var r=Prt(e,!!t);if(t<2)return r;var n=bh.dateTime2ms(r,e);return n+=wv*(t-1),bh.ms2DateTime(n,0,e)};function Prt(e,t){return gg(e)?t?mg.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:mg.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}bh.dfltRange=function(e){return gg(e)?mg.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};bh.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var SL,ML;bh.dateTime2ms=function(e,t){if(bh.isJSDate(e)){var r=e.getTimezoneOffset()*j1,n=(e.getUTCMinutes()-e.getMinutes())*j1+(e.getUTCSeconds()-e.getSeconds())*f3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*j1;r=r-i/2+Z1(n-r+i/2,i)}return e=Number(e)-r,e>=SL&&e<=ML?e:_0}if(typeof e!="string"&&typeof e!="number")return _0;e=String(e);var a=gg(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.substr(1),t="");var s=a&&t.substr(0,7)==="chinese",u=e.match(s?zrt:Lrt);if(!u)return _0;var l=u[1],f=u[3]||"1",c=Number(u[5]||1),h=Number(u[7]||0),d=Number(u[9]||0),p=Number(u[11]||0);if(a){if(l.length===2)return _0;l=Number(l);var x;try{var b=mg.getComponentMethod("calendars","getCal")(t);if(s){var y=f.charAt(f.length-1)==="i";f=parseInt(f,10),x=b.newDate(l,b.toMonthIndex(l,f,y),c)}else x=b.newDate(l,Number(f),c)}catch(E){return _0}return x?(x.toJD()-qM)*wv+h*FM+d*j1+p*f3:_0}l.length===2?l=(Number(l)+2e3-rie)%100+rie:l=Number(l),f-=1;var k=new Date(Date.UTC(2e3,f,c,h,d));return k.setUTCFullYear(l),k.getUTCMonth()!==f||k.getUTCDate()!==c?_0:k.getTime()+p*f3};SL=bh.MIN_MS=bh.dateTime2ms("-9999");ML=bh.MAX_MS=bh.dateTime2ms("9999-12-31 23:59:59.9999");bh.isDateTime=function(e,t){return bh.dateTime2ms(e,t)!==_0};function u3(e,t){return String(e+Math.pow(10,t)).substr(1)}var AL=90*wv,iie=3*FM,nie=5*j1;bh.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=SL&&e<=ML))return _0;t||(t=0);var n=Math.floor(Z1(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,u,l,f;if(gg(r)){var c=Math.floor(i/wv)+qM,h=Math.floor(Z1(e,wv));try{a=mg.getComponentMethod("calendars","getCal")(r).fromJD(c).formatDate("yyyy-mm-dd")}catch(d){a=tie("G%Y-%m-%d")(new Date(i))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=t<AL?Math.floor(h/FM):0,s=t<AL?Math.floor(h%FM/j1):0,u=t<iie?Math.floor(h%j1/f3):0,l=t<nie?h%f3*10+n:0}else f=new Date(i),a=tie("%Y-%m-%d")(f),o=t<AL?f.getUTCHours():0,s=t<AL?f.getUTCMinutes():0,u=t<iie?f.getUTCSeconds():0,l=t<nie?f.getUTCMilliseconds()*10+n:0;return lie(a,o,s,u,l)};bh.ms2DateTimeLocal=function(e){if(!(e>=SL+wv&&e<=ML-wv))return _0;var t=Math.floor(Z1(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Crt("%Y-%m-%d")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return lie(n,i,a,o,s)};function lie(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+u3(t,2)+":"+u3(r,2),(n||i)&&(e+=":"+u3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+u3(i,a)}return e}bh.cleanDate=function(e,t,r){if(e===_0)return t;if(bh.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(gg(r))return jB.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=bh.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!bh.isDateTime(e,r))return jB.error("unrecognized date",e),t;return e};var Irt=/%\d?f/g,Drt=/%h/g,Rrt={1:"1",2:"1",3:"2",4:"2"};function aie(e,t,r,n){e=e.replace(Irt,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,"")||"0";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(Drt,function(){return Rrt[r("%q")(i)]}),gg(n))try{e=mg.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var Frt=[59,59.9,59.99,59.999,59.9999];function qrt(e,t){var r=Z1(e+.05,wv),n=u3(Math.floor(r/FM),2)+":"+u3(Z1(Math.floor(r/j1),60),2);if(t!=="M"){sie(t)||(t=0);var i=Math.min(Z1(e/f3,60),Frt[t]),a=(100+i).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}bh.formatDate=function(e,t,r,n,i,a){if(i=gg(i)&&i,!t)if(r==="y")t=a.year;else if(r==="m")t=a.month;else if(r==="d")t=a.dayMonth+`
`+a.year;else return qrt(e,r)+`
`+aie(a.dayMonthYear,e,n,i);return aie(t,e,n,i)};var oie=3*wv;bh.incrementMonth=function(e,t,r){r=gg(r)&&r;var n=Z1(e,wv);if(e=Math.round(e-n),r)try{var i=Math.round(e/wv)+qM,a=mg.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-qM)*wv+n}catch(u){jB.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+oie);return s.setUTCMonth(s.getUTCMonth()+t)+n-oie};bh.findExactDates=function(e,t){for(var r=0,n=0,i=0,a=0,o,s,u=gg(t)&&mg.getComponentMethod("calendars","getCal")(t),l=0;l<e.length;l++){if(s=e[l],!sie(s)){a++;continue}if(!(s%wv))if(u)try{o=u.fromJD(s/wv+qM),o.day()===1?o.month()===1?r++:n++:i++}catch(c){}else o=new Date(s),o.getUTCDate()===1?o.getUTCMonth()===0?r++:n++:i++}n+=r,i+=n;var f=e.length-a;return{exactYears:r/f,exactMonths:n/f,exactDays:i/f}}});var BM=Se((Arr,fie)=>{"use strict";fie.exports=function(t){return t}});var EL=Se(_g=>{"use strict";var Brt=_u(),Ort=H1(),Nrt=BM(),Urt=ju().BADNUM,ZB=1e-9;_g.findBin=function(e,t,r){if(Brt(t.start))return r?Math.ceil((e-t.start)/t.size-ZB)-1:Math.floor((e-t.start)/t.size+ZB);var n=0,i=t.length,a=0,o=i>1?(t[i-1]-t[0])/(i-1):1,s,u;for(o>=0?u=r?Vrt:Hrt:u=r?Wrt:Grt,e+=o*ZB*(r?-1:1)*(o>=0?1:-1);n<i&&a++<100;)s=Math.floor((n+i)/2),u(t[s],e)?n=s+1:i=s;return a>90&&Ort.log("Long binary search..."),n-1};function Vrt(e,t){return e<t}function Hrt(e,t){return e<=t}function Grt(e,t){return e>t}function Wrt(e,t){return e>=t}_g.sorterAsc=function(e,t){return e-t};_g.sorterDes=function(e,t){return t-e};_g.distinctVals=function(e){var t=e.slice();t.sort(_g.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===Urt;r--);for(var n=t[r]-t[0]||1,i=n/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var u=t[s],l=u-o;o===void 0?(a.push(u),o=u):l>i&&(n=Math.min(n,l),a.push(u),o=u)}return{vals:a,minDiff:n}};_g.roundUp=function(e,t,r){for(var n=0,i=t.length-1,a,o=0,s=r?0:1,u=r?1:0,l=r?Math.ceil:Math.floor;n<i&&o++<100;)a=l((n+i)/2),t[a]<=e?n=a+s:i=a-u;return t[n]};_g.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()};_g.findIndexOfMin=function(e,t){t=t||Nrt;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 X1=Se((Mrr,cie)=>{"use strict";cie.exports=function(t){return Object.keys(t).sort()}});var hie=Se(wh=>{"use strict";var OM=_u(),jrt=yp().isArrayOrTypedArray;wh.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),OM(t)||(t=!1),jrt(r[0])){for(a=new Array(n),i=0;i<n;i++)a[i]=wh.aggNums(e,t,r[i]);r=a}for(i=0;i<n;i++)OM(t)?OM(r[i])&&(t=e(+t,+r[i])):t=r[i];return t};wh.len=function(e){return wh.aggNums(function(t){return t+1},0,e)};wh.mean=function(e,t){return t||(t=wh.len(e)),wh.aggNums(function(r,n){return r+n},0,e)/t};wh.geometricMean=function(e,t){return t||(t=wh.len(e)),Math.pow(wh.aggNums(function(r,n){return r*n},1,e),1/t)};wh.midRange=function(e){if(!(e===void 0||e.length===0))return(wh.aggNums(Math.max,null,e)+wh.aggNums(Math.min,null,e))/2};wh.variance=function(e,t,r){return t||(t=wh.len(e)),OM(r)||(r=wh.mean(e,t)),wh.aggNums(function(n,i){return n+Math.pow(i-r,2)},0,e)/t};wh.stdev=function(e,t,r){return Math.sqrt(wh.variance(e,t,r))};wh.median=function(e){var t=e.slice().sort();return wh.interp(t,.5)};wh.interp=function(e,t){if(!OM(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=Se((krr,yie)=>{"use strict";var die=r3(),XB=die.mod,Zrt=die.modHalf,NM=Math.PI,Y1=2*NM;function Xrt(e){return e/180*NM}function Yrt(e){return e/NM*180}function YB(e){return Math.abs(e[1]-e[0])>Y1-1e-14}function pie(e,t){return Zrt(t-e,Y1)}function Krt(e,t){return Math.abs(pie(e,t))}function vie(e,t){if(YB(t))return!0;var r,n;t[0]<t[1]?(r=t[0],n=t[1]):(r=t[1],n=t[0]),r=XB(r,Y1),n=XB(n,Y1),r>n&&(n+=Y1);var i=XB(e,Y1),a=i+Y1;return i>=r&&i<=n||a>=r&&a<=n}function Jrt(e,t,r,n){if(!vie(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 KB(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=YB([r,n]),u,l,f,c,h;s?(u=0,l=NM,f=Y1):r<n?(u=r,f=n):(u=n,f=r),e<t?(c=e,h=t):(c=t,h=e);function d(y,k){return[y*Math.cos(k)+i,a-y*Math.sin(k)]}var p=Math.abs(f-u)<=NM?0:1;function x(y,k,E){return"A"+[y,y]+" "+[0,p,E]+" "+d(y,k)}var b;return s?c===null?b="M"+d(h,u)+x(h,l,0)+x(h,f,0)+"Z":b="M"+d(c,u)+x(c,l,0)+x(c,f,0)+"ZM"+d(h,u)+x(h,l,1)+x(h,f,1)+"Z":c===null?(b="M"+d(h,u)+x(h,f,0),o&&(b+="L0,0Z")):b="M"+d(c,u)+"L"+d(h,u)+x(h,f,0)+"L"+d(c,f)+x(c,u,1)+"Z",b}function $rt(e,t,r,n,i){return KB(null,e,t,r,n,i,0)}function Qrt(e,t,r,n,i){return KB(null,e,t,r,n,i,1)}function eit(e,t,r,n,i,a){return KB(e,t,r,n,i,a,1)}yie.exports={deg2rad:Xrt,rad2deg:Yrt,angleDelta:pie,angleDist:Krt,isFullCircle:YB,isAngleInsideSector:vie,isPtInsideSector:Jrt,pathArc:$rt,pathSector:Qrt,pathAnnulus:eit}});var gie=Se(cb=>{"use strict";cb.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};cb.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};cb.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};cb.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};cb.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};cb.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var bie=Se(hb=>{"use strict";var JB=r3().mod;hb.segmentsIntersect=xie;function xie(e,t,r,n,i,a,o,s){var u=r-e,l=i-e,f=o-i,c=n-t,h=a-t,d=s-a,p=u*d-f*c;if(p===0)return null;var x=(l*d-f*h)/p,b=(l*c-u*h)/p;return b<0||b>1||x<0||x>1?null:{x:e+u*x,y:t+c*x}}hb.segmentDistance=function(t,r,n,i,a,o,s,u){if(xie(t,r,n,i,a,o,s,u))return 0;var l=n-t,f=i-r,c=s-a,h=u-o,d=l*l+f*f,p=c*c+h*h,x=Math.min(kL(l,f,d,a-t,o-r),kL(l,f,d,s-t,u-r),kL(c,h,p,t-a,r-o),kL(c,h,p,n-a,i-o));return Math.sqrt(x)};function kL(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 u=n*t-i*e;return u*u/r}}var CL,$B,_ie;hb.getTextLocation=function(t,r,n,i){if((t!==$B||i!==_ie)&&(CL={},$B=t,_ie=i),CL[n])return CL[n];var a=t.getPointAtLength(JB(n-i/2,r)),o=t.getPointAtLength(JB(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),u=t.getPointAtLength(JB(n,r)),l=(u.x*4+a.x+o.x)/6,f=(u.y*4+a.y+o.y)/6,c={x:l,y:f,theta:s};return CL[n]=c,c};hb.clearLocationCache=function(){$B=null};hb.getVisibleSegment=function(t,r,n){var i=r.left,a=r.right,o=r.top,s=r.bottom,u=0,l=t.getTotalLength(),f=l,c,h;function d(x){var b=t.getPointAtLength(x);x===0?c=b:x===l&&(h=b);var y=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(y*y+k*k)}for(var p=d(u);p;){if(u+=p+n,u>f)return;p=d(u)}for(p=d(f);p;){if(f-=p+n,u>f)return;p=d(f)}return{min:u,max:f,len:f-u,total:l,isClosed:u===0&&f===l&&Math.abs(c.x-h.x)<.1&&Math.abs(c.y-h.y)<.1}};hb.findPointOnPath=function(t,r,n,i){i=i||{};for(var a=i.pathLength||t.getTotalLength(),o=i.tolerance||.001,s=i.iterationLimit||30,u=t.getPointAtLength(0)[n]>t.getPointAtLength(a)[n]?-1:1,l=0,f=0,c=a,h,d,p;l<s;){if(h=(f+c)/2,d=t.getPointAtLength(h),p=d[n]-r,Math.abs(p)<o)return d;u*p>0?c=h:f=h,l++}return d}});var LL=Se(UM=>{"use strict";var xg={};UM.throttle=function(t,r,n){var i=xg[t],a=Date.now();if(!i){for(var o in xg)xg[o].ts<a-6e4&&delete xg[o];i=xg[t]={ts:0,timer:null}}wie(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)};UM.done=function(e){var t=xg[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};UM.clear=function(e){if(e)wie(xg[e]),delete xg[e];else for(var t in xg)UM.clear(t)};function wie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Aie=Se((Prr,Tie)=>{"use strict";Tie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Sie=Se((Irr,zL)=>{"use strict";zL.exports=QB;zL.exports.isMobile=QB;zL.exports.default=QB;var tit=/(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,rit=/CrOS/,iit=/android|ipad|playbook|silk/i;function QB(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=tit.test(t)&&!rit.test(t)||!!e.tablet&&iit.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var Eie=Se((Drr,Mie)=>{"use strict";var nit=_u(),ait=Sie();Mie.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=oit(),typeof r!="string")return!0;var n=ait({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 u=i[s];if(u.substr(0,8)==="Version/"){var l=u.substr(8).split(".")[0];if(nit(l)&&(l=+l),l>=13)return!0}}}return n};function oit(){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 Cie=Se((Rrr,kie)=>{"use strict";var sit=Nl();kie.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]=sit.select(this)}),i}});var zie=Se((Frr,Lie)=>{"use strict";var lit=Ul();Lie.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 u=s[r];if(u)return u}a=lit.localeRegistry}var l=n.split("-")[0];if(l===n)break;n=l}return r}});var eO=Se((qrr,Pie)=>{"use strict";Pie.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 Die=Se((Brr,Iie)=>{"use strict";Iie.exports=function(t){for(var r=cit(t)?fit:uit,n=[],i=0;i<t.length;i++){var a=t[i];r(a)&&n.push(a)}return n};function uit(e){return e.visible===!0}function fit(e){var t=e[0].trace;return t.visible===!0&&t._length!==0}function cit(e){return Array.isArray(e)&&Array.isArray(e[0])&&e[0][0]&&e[0][0].trace}});var Fie=Se((Orr,Rie)=>{"use strict";Rie.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 u=parseFloat(i).toPrecision(12);u.indexOf("e+")===-1&&(i=+u)}}return i}});var Bie=Se((Nrr,qie)=>{"use strict";var hit=_u(),dit=ju().BADNUM,pit=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;qie.exports=function(t){return typeof t=="string"&&(t=t.replace(pit,"")),hit(t)?Number(t):dit}});var Zr=Se((Urr,Jie)=>{"use strict";var VM=Nl(),vit=e3().utcFormat,yit=TB().format,Gie=_u(),Wie=ju(),jie=Wie.FP_SAFE,mit=-jie,Oie=Wie.BADNUM,nn=Jie.exports={};nn.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 Nie={};nn.warnBadFormat=function(e){var t=String(e);Nie[t]||(Nie[t]=1,nn.warn('encountered bad format: "'+t+'"'))};nn.noFormat=function(e){return String(e)};nn.numberFormat=function(e){var t;try{t=yit(nn.adjustFormat(e))}catch(r){return nn.warnBadFormat(e),nn.noFormat}return t};nn.nestedProperty=EM();nn.keyedContainer=zee();nn.relativeAttr=Iee();nn.isPlainObject=yg();nn.toLogRange=lL();nn.relinkPrivateKeys=qee();var K1=yp();nn.isArrayBuffer=K1.isArrayBuffer;nn.isTypedArray=K1.isTypedArray;nn.isArrayOrTypedArray=K1.isArrayOrTypedArray;nn.isArray1D=K1.isArray1D;nn.ensureArray=K1.ensureArray;nn.concat=K1.concat;nn.maxRowLength=K1.maxRowLength;nn.minRowLength=K1.minRowLength;var Zie=r3();nn.mod=Zie.mod;nn.modHalf=Zie.modHalf;var J1=rte();nn.valObjectMeta=J1.valObjectMeta;nn.coerce=J1.coerce;nn.coerce2=J1.coerce2;nn.coerceFont=J1.coerceFont;nn.coercePattern=J1.coercePattern;nn.coerceHoverinfo=J1.coerceHoverinfo;nn.coerceSelectionMarkerOpacity=J1.coerceSelectionMarkerOpacity;nn.validate=J1.validate;var jv=uie();nn.dateTime2ms=jv.dateTime2ms;nn.isDateTime=jv.isDateTime;nn.ms2DateTime=jv.ms2DateTime;nn.ms2DateTimeLocal=jv.ms2DateTimeLocal;nn.cleanDate=jv.cleanDate;nn.isJSDate=jv.isJSDate;nn.formatDate=jv.formatDate;nn.incrementMonth=jv.incrementMonth;nn.dateTick0=jv.dateTick0;nn.dfltRange=jv.dfltRange;nn.findExactDates=jv.findExactDates;nn.MIN_MS=jv.MIN_MS;nn.MAX_MS=jv.MAX_MS;var db=EL();nn.findBin=db.findBin;nn.sorterAsc=db.sorterAsc;nn.sorterDes=db.sorterDes;nn.distinctVals=db.distinctVals;nn.roundUp=db.roundUp;nn.sort=db.sort;nn.findIndexOfMin=db.findIndexOfMin;nn.sortObjectKeys=X1();var bg=hie();nn.aggNums=bg.aggNums;nn.len=bg.len;nn.mean=bg.mean;nn.geometricMean=bg.geometricMean;nn.median=bg.median;nn.midRange=bg.midRange;nn.variance=bg.variance;nn.stdev=bg.stdev;nn.interp=bg.interp;var gy=yL();nn.init2dArray=gy.init2dArray;nn.transposeRagged=gy.transposeRagged;nn.dot=gy.dot;nn.translationMatrix=gy.translationMatrix;nn.rotationMatrix=gy.rotationMatrix;nn.rotationXYMatrix=gy.rotationXYMatrix;nn.apply3DTransform=gy.apply3DTransform;nn.apply2DTransform=gy.apply2DTransform;nn.apply2DTransform2=gy.apply2DTransform2;nn.convertCssMatrix=gy.convertCssMatrix;nn.inverseTransformMatrix=gy.inverseTransformMatrix;var pm=mie();nn.deg2rad=pm.deg2rad;nn.rad2deg=pm.rad2deg;nn.angleDelta=pm.angleDelta;nn.angleDist=pm.angleDist;nn.isFullCircle=pm.isFullCircle;nn.isAngleInsideSector=pm.isAngleInsideSector;nn.isPtInsideSector=pm.isPtInsideSector;nn.pathArc=pm.pathArc;nn.pathSector=pm.pathSector;nn.pathAnnulus=pm.pathAnnulus;var d3=gie();nn.isLeftAnchor=d3.isLeftAnchor;nn.isCenterAnchor=d3.isCenterAnchor;nn.isRightAnchor=d3.isRightAnchor;nn.isTopAnchor=d3.isTopAnchor;nn.isMiddleAnchor=d3.isMiddleAnchor;nn.isBottomAnchor=d3.isBottomAnchor;var p3=bie();nn.segmentsIntersect=p3.segmentsIntersect;nn.segmentDistance=p3.segmentDistance;nn.getTextLocation=p3.getTextLocation;nn.clearLocationCache=p3.clearLocationCache;nn.getVisibleSegment=p3.getVisibleSegment;nn.findPointOnPath=p3.findPointOnPath;var DL=vu();nn.extendFlat=DL.extendFlat;nn.extendDeep=DL.extendDeep;nn.extendDeepAll=DL.extendDeepAll;nn.extendDeepNoArrays=DL.extendDeepNoArrays;var tO=H1();nn.log=tO.log;nn.warn=tO.warn;nn.error=tO.error;var git=n3();nn.counterRegex=git.counter;var rO=LL();nn.throttle=rO.throttle;nn.throttleDone=rO.done;nn.clearThrottle=rO.clear;var _y=DM();nn.getGraphDiv=_y.getGraphDiv;nn.isPlotDiv=_y.isPlotDiv;nn.removeElement=_y.removeElement;nn.addStyleRule=_y.addStyleRule;nn.addRelatedStyleRule=_y.addRelatedStyleRule;nn.deleteRelatedStyleRule=_y.deleteRelatedStyleRule;nn.setStyleOnHover=_y.setStyleOnHover;nn.getFullTransformMatrix=_y.getFullTransformMatrix;nn.getElementTransformMatrix=_y.getElementTransformMatrix;nn.getElementAndAncestors=_y.getElementAndAncestors;nn.equalDomRects=_y.equalDomRects;nn.clearResponsive=Aie();nn.preserveDrawingBuffer=Eie();nn.makeTraceGroups=Cie();nn._=zie();nn.notifier=DB();nn.filterUnique=eO();nn.filterVisible=Die();nn.pushUnique=qB();nn.increment=Fie();nn.cleanNumber=Bie();nn.ensureNumber=function(t){return Gie(t)?(t=Number(t),t>jie||t<mit?Oie:t):Oie};nn.isIndex=function(e,t){return t!==void 0&&e>=t?!1:Gie(e)&&e>=0&&e%1===0};nn.noop=vL();nn.identity=BM();nn.repeat=function(e,t){for(var r=new Array(t),n=0;n<t;n++)r[n]=e;return r};nn.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=nn.nestedProperty(e,a.replace("?",r)),s=nn.nestedProperty(e,a.replace("?",n)),u=o.get();o.set(s.get()),s.set(u)}};nn.raiseToTop=function(t){t.parentNode.appendChild(t)};nn.cancelTransition=function(e){return e.transition().duration(0)};nn.constrain=function(e,t,r){return t>r?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};nn.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};nn.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};nn.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,u,l;for(s=2;a===1/0;s*=2)a=Math.log(Math.pow(2,r/s))/Math.log(n)*s;var f=a-Math.floor(a);for(s=0;s<Math.floor(a);s++)l=Math.floor(Math.random()*n).toString(n),o=l+o;f&&(u=Math.pow(n,f),l=Math.floor(Math.random()*u).toString(n),o=l+o);var c=parseInt(o,n);return t&&t[o]||c!==1/0&&c>=Math.pow(2,r)?i>10?(nn.warn("randstr failed uniqueness"),o):e(t,r,n,(i||0)+1):o};nn.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};nn.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,u,l,f;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(f=0,u=0;u<i;u++)l=s+u+1-t,l<-r?l-=n*Math.round(l/n):l>=n&&(l-=n*Math.floor(l/n)),l<0?l=-1-l:l>=r&&(l=n-1-l),f+=e[l]*a[u];o[s]=f}return o};nn.syncOrAsync=function(e,t,r){var n,i;function a(){return nn.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)};nn.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};nn.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]]}};nn.mergeArray=function(e,t,r,n){var i=typeof n=="function";if(nn.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}};nn.mergeArrayCastPositive=function(e,t,r){return nn.mergeArray(e,t,r,function(n){var i=+n;return isFinite(i)&&i>0?i:0})};nn.fillArray=function(e,t,r,n){if(n=n||nn.identity,nn.isArrayOrTypedArray(e))for(var i=0;i<t.length;i++)t[i][r]=n(e[i])};nn.castOption=function(e,t,r,n){n=n||nn.identity;var i=nn.nestedProperty(e,r).get();return nn.isArrayOrTypedArray(i)?Array.isArray(t)&&nn.isArrayOrTypedArray(i[t[0]])?n(i[t[0]][t[1]]):n(i[t]):i};nn.extractOption=function(e,t,r,n){if(r in e)return e[r];var i=nn.nestedProperty(t,n).get();if(!Array.isArray(i))return i};function Xie(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}nn.tagSelected=function(e,t,r){var n=t.selectedpoints,i=t._indexToPoints,a;i&&(a=Xie(i));function o(c){return c!==void 0&&c<e.length}for(var s=0;s<n.length;s++){var u=n[s];if(nn.isIndex(u)||nn.isArrayOrTypedArray(u)&&nn.isIndex(u[0])&&nn.isIndex(u[1])){var l=a?a[u]:u,f=r?r[l]:l;o(f)&&(e[f].selected=1)}}};nn.selIndices2selPoints=function(e){var t=e.selectedpoints,r=e._indexToPoints;if(r){for(var n=Xie(r),i=[],a=0;a<t.length;a++){var o=t[a];if(nn.isIndex(o)){var s=n[o];nn.isIndex(s)&&i.push(s)}}return i}else return t};nn.getTargetArray=function(e,t){var r=t.target;if(typeof r=="string"&&r){var n=nn.nestedProperty(e,r).get();return nn.isArrayOrTypedArray(n)?n:!1}else if(nn.isArrayOrTypedArray(r))return r;return!1};function Yie(e,t,r){var n={};typeof t!="object"&&(t={});var i=r==="pieLike"?-1:3,a=Object.keys(e),o,s,u;for(o=0;o<a.length;o++)s=a[o],u=e[s],!(s.charAt(0)==="_"||typeof u=="function")&&(s==="module"?n[s]=u:Array.isArray(u)?s==="colorscale"||i===-1?n[s]=u.slice():n[s]=u.slice(0,i):nn.isTypedArray(u)?i===-1?n[s]=u.subarray():n[s]=u.subarray(0,i):u&&typeof u=="object"?n[s]=Yie(e[s],t[s],r):n[s]=u);for(a=Object.keys(t),o=0;o<a.length;o++)s=a[o],u=t[s],(typeof u!="object"||!(s in n)||typeof n[s]!="object")&&(n[s]=u);return n}nn.minExtend=Yie;nn.titleCase=function(e){return e.charAt(0).toUpperCase()+e.substr(1)};nn.containsAny=function(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])!==-1)return!0;return!1};var _it=/Version\/[\d\.]+.*Safari/;nn.isSafari=function(){return _it.test(window.navigator.userAgent)};var xit=/iPad|iPhone|iPod/;nn.isIOS=function(){return xit.test(window.navigator.userAgent)};var bit=/Firefox\/(\d+)\.\d+/;nn.getFirefoxVersion=function(){var e=bit.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};nn.isD3Selection=function(e){return e instanceof VM.selection};nn.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};nn.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};nn.objectFromPath=function(e,t){for(var r=e.split("."),n,i=n={},a=0;a<r.length;a++){var o=r[a],s=null,u=r[a].match(/(.*)\[([0-9]+)\]/);u?(o=u[1],s=u[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 wit=/^([^\[\.]+)\.(.+)?/,Tit=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function PL(e){return e.slice(0,2)==="__"}nn.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(wit)){if(i=e[r],n=t[1],PL(n))continue;delete e[r],e[n]=nn.extendDeepNoArrays(e[n]||{},nn.objectFromPath(r,nn.expandObjectPaths(i))[n])}else if(t=r.match(Tit)){if(i=e[r],n=t[1],PL(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]||{},nn.extendDeepNoArrays(o,nn.objectFromPath(s,nn.expandObjectPaths(i)));else{if(PL(n))continue;e[n][a]=nn.expandObjectPaths(i)}}else{if(PL(r))continue;e[r]=nn.expandObjectPaths(e[r])}}return e};nn.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],u=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+u};nn.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Kie=/^\w*$/;nn.templateString=function(e,t){var r={};return e.replace(nn.TEMPLATE_STRING_REGEX,function(n,i){var a;return Kie.test(i)?a=t[i]:(r[i]=r[i]||nn.nestedProperty(t,i).get,a=r[i]()),nn.isValidTextValue(a)?a:""})};var Ait={max:10,count:0,name:"hovertemplate"};nn.hovertemplateString=function(){return iO.apply(Ait,arguments)};var Sit={max:10,count:0,name:"texttemplate"};nn.texttemplateString=function(){return iO.apply(Sit,arguments)};var Mit=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Eit(e){var t=e.match(Mit);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var kit={max:10,count:0,name:"texttemplate",parseMultDiv:!0};nn.texttemplateStringForShapes=function(){return iO.apply(kit,arguments)};var Uie=/^[:|\|]/;function iO(e,t,r){var n=this,i=arguments;t||(t={});var a={};return e.replace(nn.TEMPLATE_STRING_REGEX,function(o,s,u){var l=s==="xother"||s==="yother",f=s==="_xother"||s==="_yother",c=s==="_xother_"||s==="_yother_",h=s==="xother_"||s==="yother_",d=l||f||h||c,p=s;(f||c)&&(p=p.substring(1)),(h||c)&&(p=p.substring(0,p.length-1));var x=null,b=null;if(n.parseMultDiv){var y=Eit(p);p=y.key,x=y.op,b=y.number}var k;if(d){if(k=t[p],k===void 0)return""}else{var E,A;for(A=3;A<i.length;A++)if(E=i[A],!!E){if(E.hasOwnProperty(p)){k=E[p];break}if(Kie.test(p)||(k=nn.nestedProperty(E,p).get(),k=a[p]||nn.nestedProperty(E,p).get(),k&&(a[p]=k)),k!==void 0)break}}if(k!==void 0&&(x==="*"&&(k*=b),x==="/"&&(k/=b)),k===void 0&&n)return n.count<n.max&&(nn.warn("Variable '"+p+"' in "+n.name+" could not be found!"),k=o),n.count===n.max&&nn.warn("Too many "+n.name+" warnings - additional warnings will be suppressed"),n.count++,o;if(u){var L;if(u[0]===":"&&(L=r?r.numberFormat:nn.numberFormat,k!==""&&(k=L(u.replace(Uie,""))(k))),u[0]==="|"){L=r?r.timeFormat:vit;var _=nn.dateTime2ms(k);k=nn.formatDate(_,u.replace(Uie,""),!1,L)}}else{var C=p+"Label";t.hasOwnProperty(C)&&(k=t[C])}return d&&(k="("+k+")",(f||c)&&(k=" "+k),(h||c)&&(k=k+" ")),k})}var IL=48,Vie=57;nn.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,u=o>=IL&&o<=Vie,l=s>=IL&&s<=Vie;if(u&&(n=10*n+o-IL),l&&(i=10*i+s-IL),!u||!l){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var h3=2e9;nn.seedPseudoRandom=function(){h3=2e9};nn.pseudoRandom=function(){var e=h3;return h3=(69069*h3+1)%4294967296,Math.abs(h3-e)<429496729?nn.pseudoRandom():h3/4294967296};nn.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=nn.extractOption(e,t,"htx","hovertext");if(nn.isValidTextValue(i))return n(i);var a=nn.extractOption(e,t,"tx","text");if(nn.isValidTextValue(a))return n(a)};nn.isValidTextValue=function(e){return e||e===0};nn.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};nn.isHidden=function(e){var t=window.getComputedStyle(e).display;return!t||t==="none"};nn.strTranslate=function(e,t){return e||t?"translate("+e+","+t+")":""};nn.strRotate=function(e){return e?"rotate("+e+")":""};nn.strScale=function(e){return e!==1?"scale("+e+")":""};nn.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,u=e.rotate,l=e.scale;return l?l>1&&(l=1):l=0,nn.strTranslate(i-l*(r+o),a-l*(n+s))+nn.strScale(l)+(u?"rotate("+u+(t?"":" "+r+" "+n)+")":"")};nn.setTransormAndDisplay=function(e,t){e.attr("transform",nn.getTextTransform(t)),e.style("display",t.scale?null:"none")};nn.ensureUniformFontSize=function(e,t){var r=nn.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};nn.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)};nn.bigFont=function(e){return Math.round(1.2*e)};var Hie=nn.getFirefoxVersion(),Cit=Hie!==null&&Hie<86;nn.getPositionFromD3Event=function(){return Cit?[VM.event.layerX,VM.event.layerY]:[VM.event.offsetX,VM.event.offsetY]}});var ene=Se(()=>{"use strict";var Lit=Zr(),$ie={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding: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 .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(nO in $ie)Qie=nO.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Lit.addStyleRule(Qie,$ie[nO]);var Qie,nO});var aO=Se((Grr,tne)=>{tne.exports=!0});var sO=Se((Wrr,rne)=>{"use strict";var zit=aO(),oO;typeof window.matchMedia=="function"?oO=!window.matchMedia("(hover: none)").matches:oO=zit;rne.exports=oO});var pb=Se((jrr,lO)=>{"use strict";var v3=typeof Reflect=="object"?Reflect:null,ine=v3&&typeof v3.apply=="function"?v3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},RL;v3&&typeof v3.ownKeys=="function"?RL=v3.ownKeys:Object.getOwnPropertySymbols?RL=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:RL=function(t){return Object.getOwnPropertyNames(t)};function Pit(e){console&&console.warn&&console.warn(e)}var ane=Number.isNaN||function(t){return t!==t};function Oc(){Oc.init.call(this)}lO.exports=Oc;lO.exports.once=Fit;Oc.EventEmitter=Oc;Oc.prototype._events=void 0;Oc.prototype._eventsCount=0;Oc.prototype._maxListeners=void 0;var nne=10;function FL(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Oc,"defaultMaxListeners",{enumerable:!0,get:function(){return nne},set:function(e){if(typeof e!="number"||e<0||ane(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");nne=e}});Oc.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};Oc.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||ane(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 one(e){return e._maxListeners===void 0?Oc.defaultMaxListeners:e._maxListeners}Oc.prototype.getMaxListeners=function(){return one(this)};Oc.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 u=a[t];if(u===void 0)return!1;if(typeof u=="function")ine(u,this,r);else for(var l=u.length,f=cne(u,l),n=0;n<l;++n)ine(f[n],this,r);return!0};function sne(e,t,r,n){var i,a,o;if(FL(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=one(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,Pit(s)}return e}Oc.prototype.addListener=function(t,r){return sne(this,t,r,!1)};Oc.prototype.on=Oc.prototype.addListener;Oc.prototype.prependListener=function(t,r){return sne(this,t,r,!0)};function Iit(){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 lne(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=Iit.bind(n);return i.listener=r,n.wrapFn=i,i}Oc.prototype.once=function(t,r){return FL(r),this.on(t,lne(this,t,r)),this};Oc.prototype.prependOnceListener=function(t,r){return FL(r),this.prependListener(t,lne(this,t,r)),this};Oc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(FL(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():Dit(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Oc.prototype.off=Oc.prototype.removeListener;Oc.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 une(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?Rit(i):cne(i,i.length)}Oc.prototype.listeners=function(t){return une(this,t,!0)};Oc.prototype.rawListeners=function(t){return une(this,t,!1)};Oc.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):fne.call(e,t)};Oc.prototype.listenerCount=fne;function fne(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}Oc.prototype.eventNames=function(){return this._eventsCount>0?RL(this._events):[]};function cne(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function Dit(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function Rit(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function Fit(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))}hne(e,t,a,{once:!0}),t!=="error"&&qit(e,i,{once:!0})})}function qit(e,t,r){typeof e.on=="function"&&hne(e,"error",t,r)}function hne(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 y3=Se((Zrr,dne)=>{"use strict";var uO=pb().EventEmitter,Bit={init:function(e){if(e._ev instanceof uO)return e;var t=new uO,r=new uO;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)},e},triggerHandler:function(e,t,r){var n,i=e._ev;if(!i)return;var a=i._events[t];if(!a)return;function o(u){if(u.listener){if(i.removeListener(t,u.listener),!u.fired)return u.fired=!0,u.listener.apply(i,[r])}else return u.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}};dne.exports=Bit});var yne=Se((Xrr,vne)=>{"use strict";var pne=Zr(),Oit=ub().dfltConfig;function Nit(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)?pne.extendDeep([],n):pne.extendDeepAll({},n):r[i]=n;return r}var wg={};wg.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>Oit.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};wg.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};wg.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};wg.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++)wg.plotDo(t,r.undo.calls[n],r.undo.args[n]);t.undoQueue.inSequence=!1,t.autoplay=!1}};wg.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++)wg.plotDo(t,r.redo.calls[n],r.redo.args[n]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}};wg.plotDo=function(e,t,r){e.autoplay=!0,r=Nit(e,r),t.apply(null,r)};vne.exports=wg});var fO=Se((Yrr,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 _3=Se($h=>{"use strict";var x0=Ul(),HM=Zr(),BL=zf(),cO=s3(),Uit=fO(),Vit=RM(),Hit=ub().configAttributes,gne=_c(),xy=HM.extendDeepAll,m3=HM.isPlainObject,Git=HM.isArrayOrTypedArray,OL=HM.nestedProperty,Wit=HM.valObjectMeta,hO="_isSubplotObj",NL="_isLinkedToArray",jit="_arrayAttrRegexps",xne="_deprecated",dO=[hO,NL,jit,xne];$h.IS_SUBPLOT_OBJ=hO;$h.IS_LINKED_TO_ARRAY=NL;$h.DEPRECATED=xne;$h.UNDERSCORE_ATTRS=dO;$h.get=function(){var e={};return x0.allTypes.forEach(function(t){e[t]=Xit(t)}),{defs:{valObjects:Wit,metaKeys:dO.concat(["description","role","editType","impliedEdits"]),editType:{traces:gne.traces,layout:gne.layout},impliedEdits:{}},traces:e,layout:Yit(),frames:Kit(),animation:g3(Vit),config:g3(Hit)}};$h.crawl=function(e,t,r,n){var i=r||0;n=n||"",Object.keys(e).forEach(function(a){var o=e[a];if(dO.indexOf(a)===-1){var s=(n?n+".":"")+a;t(o,a,e,i,s),!$h.isValObject(o)&&m3(o)&&a!=="impliedEdits"&&$h.crawl(o,t,i+1,s)}})};$h.isValObject=function(e){return e&&e.valType!==void 0};$h.findArrayAttributes=function(e){var t=[],r=[],n=[],i,a;function o(u,l,f,c){r=r.slice(0,c).concat([l]),n=n.slice(0,c).concat([u&&u._isLinkedToArray]);var h=u&&(u.valType==="data_array"||u.arrayOk===!0)&&!(r[c-1]==="colorbar"&&(l==="ticktext"||l==="tickvals"));h&&s(i,0,"")}function s(u,l,f){var c=u[r[l]],h=f+r[l];if(l===r.length-1)Git(c)&&t.push(a+h);else if(n[l]){if(Array.isArray(c))for(var d=0;d<c.length;d++)m3(c[d])&&s(c[d],l+1,h+"["+d+"].")}else m3(c)&&s(c,l+1,h+".")}return i=e,a="",$h.crawl(BL,o),e._module&&e._module.attributes&&$h.crawl(e._module.attributes,o),t};$h.getTraceValObject=function(e,t){var r=t[0],n=1,i,a,o=e._module;if(o||(o=(x0.modules[e.type||BL.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=BL[r]),bne(a,t,n)};$h.getLayoutValObject=function(e,t){var r=Zit(e,t[0]);return bne(r,t,1)};function Zit(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 u=i.baseLayoutAttrOverrides;if(u&&t in u)return u[t]}if(s)return s}var l=e._modules;if(l){for(r=0;r<l.length;r++)if(a=l[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 cO?cO[t]:!1}function bne(e,t,r){if(!e)return!1;if(e._isLinkedToArray){if(qL(t[r]))r++;else if(r<t.length)return!1}for(;r<t.length;r++){var n=e[t[r]];if(m3(n))e=n;else break;if(r===t.length-1)break;if(e._isLinkedToArray){if(r++,!qL(t[r]))return!1}else if(e.valType==="info_array"){r++;var i=t[r];if(!qL(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(!qL(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function qL(e){return e===Math.round(e)&&e>=0}function Xit(e){var t,r;t=x0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=xy({},BL),a=xy({},t.attributes);$h.crawl(a,function(u,l,f,c,h){OL(i,h).set(void 0),u===void 0&&OL(a,h).set(void 0)}),xy(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,xy(n,a),r.attributes&&xy(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:g3(n)};if(t.layoutAttributes){var s={};xy(s,t.layoutAttributes),o.layoutAttributes=g3(s)}return t.animatable||$h.crawl(o,function(u){$h.isValObject(u)&&"anim"in u&&delete u.anim}),o}function Yit(){var e={},t,r;xy(e,cO);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++)_ne(e,r,r.attr[n]);else{var i=r.attr==="subplot"?r.name:r.attr;_ne(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"?xy(e,r.layoutAttributes):r.layoutAttributes&&ent(e,r.layoutAttributes,r.name)}return{layoutAttributes:g3(e)}}function Kit(){var e={frames:xy({},Uit)};return g3(e),e.frames}function g3(e){return Jit(e),$it(e),Qit(e),e}function Jit(e){function t(n){return{valType:"string",editType:"none"}}function r(n,i,a){$h.isValObject(n)?(n.arrayOk===!0||n.valType==="data_array")&&(a[i+"src"]=t(i)):m3(n)&&(n.role="object")}$h.crawl(e,r)}function $it(e){function t(r,n,i){if(r){var a=r[NL];a&&(delete r[NL],i[n]={items:{}},i[n].items[a]=r,i[n].role="object")}}$h.crawl(e,t)}function Qit(e){function t(r){for(var n in r)if(m3(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 _ne(e,t,r){var n=OL(e,r),i=xy({},t.layoutAttributes);i[hO]=!0,n.set(i)}function ent(e,t,r){var n=OL(e,r);n.set(xy(n.get()||{},t))}});var _f=Se(vb=>{"use strict";var x3=Zr(),tnt=zf(),$1="templateitemname",pO={name:{valType:"string",editType:"none"}};pO[$1]={valType:"string",editType:"calc"};vb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=pO.name,t[$1]=pO[$1],t};vb.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=x3.coerce(a,{},tnt,"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}};vb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);x3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};vb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[Tne(t)],a=n&&n[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(l){var f={name:l.name,_input:l},c=f[$1]=l[$1];if(!wne(c))return f._template=i,f;for(var h=0;h<a.length;h++){var d=a[h];if(d.name===c)return o[c]=1,f._template=d,f}return f[r]=l[r]||!1,f._template=!1,f}function u(){for(var l=[],f=0;f<a.length;f++){var c=a[f],h=c.name;if(wne(h)&&!o[h]){var d={_template:c,name:h,_input:{_templateitemname:h}};d[$1]=c[$1],l.push(d),o[h]=1}}return l}return{newItem:s,defaultItems:u}};function wne(e){return e&&typeof e=="string"}function Tne(e){var t=e.length-1;return e.charAt(t)!=="s"&&x3.warn("bad argument to arrayDefaultKey: "+e),e.substr(0,e.length-1)+"defaults"}vb.arrayDefaultKey=Tne;vb.arrayEditor=function(e,t,r){var n=(x3.nestedProperty(e,t).get()||[]).length,i=r._index,a=i>=n&&(r._input||{})._templateitemname;a&&(i=n);var o=t+"["+i+"]",s;function u(){s={},a&&(s[o]={},s[o][$1]=a)}u();function l(d,p){s[d]=p}function f(d,p){a?x3.nestedProperty(s[o],d).set(p):s[o+"."+d]=p}function c(){var d=s;return u(),d}function h(d,p){d&&f(d,p);var x=c();for(var b in x)x3.nestedProperty(e,b).set(x[b])}return{modifyBase:l,modifyItem:f,getUpdateObj:c,applyUpdate:h}}});var dd=Se(($rr,Ane)=>{"use strict";var GM=n3().counter;Ane.exports={idRegex:{x:GM("x","( domain)?"),y:GM("y","( domain)?")},attrRegex:GM("[xy]axis"),xAxisMatch:GM("xaxis"),yAxisMatch:GM("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 $c=Se(Tv=>{"use strict";var rnt=Ul(),vO=dd();Tv.id2name=function(t){if(!(typeof t!="string"||!t.match(vO.AX_ID_PATTERN))){var r=t.split(" ")[0].substr(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Tv.name2id=function(t){if(t.match(vO.AX_NAME_PATTERN)){var r=t.substr(5);return r==="1"&&(r=""),t.charAt(0)+r}};Tv.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(vO.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(" ")[0].substr(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(i&&n?" domain":"")}};Tv.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=Tv.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.substr(1)]}if(!r){var u=n._subplots.gl3d||[];for(o=0;o<u.length;o++){var l=n[u[o]];t?a.push(l[t+"axis"]):a.push(l.xaxis,l.yaxis,l.zaxis)}}return a};Tv.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)};Tv.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[Tv.id2name(t)]};Tv.getFromTrace=function(e,t,r){var n=e._fullLayout,i=null;if(rnt.traceIs(t,"gl3d")){var a=t.scene;a.substr(0,5)==="scene"&&(i=n[a][r+"axis"])}else i=Tv.getFromId(e,t[r+"axis"]||r);return i};Tv.idSort=function(e,t){var r=e.charAt(0),n=t.charAt(0);return r!==n?r>n?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)};Tv.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Sne(e,t){if(t&&t.length){for(var r=0;r<t.length;r++)if(t[r][e])return!0}return!1}Tv.isLinked=function(e,t){return Sne(t,e._axisMatchGroups)||Sne(t,e._axisConstraintGroups)}});var Q1=Se((eir,Mne)=>{"use strict";function int(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function nnt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}Mne.exports={clearOutlineControllers:int,clearOutline:nnt}});var UL=Se((tir,Ene)=>{"use strict";Ene.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var Dd=Se(HL=>{"use strict";var VL=Ul(),rir=dd().SUBPLOT_PATTERN;HL.getSubplotCalcData=function(e,t,r){var n=VL.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o<e.length;o++){var s=e[o],u=s[0].trace;u[i]===r&&a.push(s)}return a};HL.getModuleCalcData=function(e,t,r){var n=[],i=[],a;if(typeof t=="string"?a=VL.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 u=e[s],l=u[0].trace,f=l.zorder!==void 0;l.visible!==!0||l._length===0||(l._module&&l._module.plot===a&&(!f||l.zorder===o)?n.push(u):i.push(u))}return[n,i]};HL.getSubplotData=function(t,r,n){if(!VL.subplotsRegistry[r])return[];for(var i=VL.subplotsRegistry[r].attr,a=[],o,s,u,l=0;l<t.length;l++)o=t[l],o[i]===n&&a.push(o);return a}});var zne=Se(yb=>{"use strict";var ant=Ul(),b3=Zr();yb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=yb.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){kne(e,o,i.cache),i.check=function(){if(a){var f=kne(e,o,i.cache);return f.changed&&n&&i.lookupTable[f.value]!==void 0&&(i.disable(),Promise.resolve(n({value:f.value,type:o.type,prop:o.prop,traces:o.traces,index:i.lookupTable[f.value]})).then(i.enable,i.enable)),f.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],u=0;u<s.length;u++)e._internalOn(s[u],i.check);i.remove=function(){for(var l=0;l<s.length;l++)e._removeInternalListener(s[l],i.check)}}else b3.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};yb.hasSimpleAPICommandBindings=function(e,t,r){var n,i=t.length,a;for(n=0;n<i;n++){var o,s=t[n],u=s.method,l=s.args;if(Array.isArray(l)||(l=[]),!u)return!1;var f=yb.computeAPICommandBindings(e,u,l);if(f.length!==1)return!1;if(!a)a=f[0],Array.isArray(a.traces)&&a.traces.sort();else{if(o=f[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 c=0;c<a.traces.length;c++)if(a.traces[c]!==o.traces[c])return!1}else return!1;else if(o.prop!==a.prop)return!1}o=f[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 kne(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=b3.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}}yb.executeAPICommand=function(e,t,r){if(t==="skip")return Promise.resolve();var n=ant.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 b3.warn("API call to Plotly."+t+" rejected.",o),Promise.reject(o)})};yb.computeAPICommandBindings=function(e,t,r){var n;switch(Array.isArray(r)||(r=[]),t){case"restyle":n=Lne(e,r);break;case"relayout":n=Cne(e,r);break;case"update":n=Lne(e,[r[0],r[2]]).concat(Cne(e,[r[1]]));break;case"animate":n=ont(e,r);break;default:n=[]}return n};function ont(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 Cne(e,t){var r=[],n=t[0],i={};if(typeof n=="string")i[n]=t[1];else if(b3.isPlainObject(n))i=n;else return r;return yO(i,function(a,o,s){r.push({type:"layout",prop:a,value:s})},"",0),r}function Lne(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(b3.isPlainObject(n))a=n,r===void 0&&(r=i);else return o;return r===void 0&&(r=null),yO(a,function(s,u,l){var f,c;if(Array.isArray(l)){c=l.slice();var h=Math.min(c.length,e.data.length);r&&(h=Math.min(h,r.length)),f=[];for(var d=0;d<h;d++)f[d]=r?r[d]:d}else c=l,f=r?r.slice():null;if(f===null)Array.isArray(c)&&(c=c[0]);else if(Array.isArray(f)){if(!Array.isArray(c)){var p=c;c=[];for(var x=0;x<f.length;x++)c[x]=p}c.length=Math.min(f.length,c.length)}o.push({type:"data",prop:s,traces:f,value:c})},"",0),o}function yO(e,t,r,n){Object.keys(e).forEach(function(i){var a=e[i];if(i[0]!=="_"){var o=r+(n>0?".":"")+i;b3.isPlainObject(a)?yO(a,t,o,n+1):t(o,i,a)}})}});var Ac=Se((air,Wne)=>{"use strict";var Bne=Nl(),snt=e3().timeFormatLocale,lnt=TB().formatLocale,WM=_u(),unt=AB(),Df=Ul(),One=_3(),fnt=_f(),Wl=Zr(),Nne=Pl(),Pne=ju().BADNUM,Av=$c(),cnt=Q1().clearOutline,hnt=UL(),mO=RM(),dnt=fO(),pnt=Dd().getModuleCalcData,Ine=Wl.relinkPrivateKeys,mb=Wl._,El=Wne.exports={};Wl.extendFlat(El,Df);El.attributes=zf();El.attributes.type.values=El.allTypes;El.fontAttrs=uc();El.layoutAttributes=s3();var WL=zne();El.executeAPICommand=WL.executeAPICommand;El.computeAPICommandBindings=WL.computeAPICommandBindings;El.manageCommandObserver=WL.manageCommandObserver;El.hasSimpleAPICommandBindings=WL.hasSimpleAPICommandBindings;El.redrawText=function(e){return e=Wl.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Df.getComponentMethod("annotations","draw")(e),Df.getComponentMethod("legend","draw")(e),Df.getComponentMethod("colorbar","draw")(e),t(El.previousPromises(e)))},300)})};El.resize=function(e){e=Wl.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||Wl.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||Wl.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Df.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};El.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};El.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Wl.ensureSingle(t._paper,"text","js-plot-link-container",function(u){u.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Nne.defaultLine,"pointer-events":"all"}).each(function(){var l=Bne.select(this);l.append("tspan").classed("js-link-to-tool",!0),l.append("tspan").classed("js-link-spacer",!0),l.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&&vnt(e,a),o.text(a.text()&&s.text()?" - ":"")}};function vnt(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(){El.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})}}El.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Bne.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=El.graphJson(e,!1,"keepdata"),n.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var ynt=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],mnt=["year","month","dayMonth","dayMonthYear"];El.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=[],u=e.data||[],l=e.calcdata||[],f=e._context||{},c;e._transitionData||El.createTransitionData(e),i._dfltTitle={plot:mb(e,"Click to enter Plot title"),subtitle:mb(e,"Click to enter Plot subtitle"),x:mb(e,"Click to enter X axis title"),y:mb(e,"Click to enter Y axis title"),colorbar:mb(e,"Click to enter Colorscale title"),annotation:mb(e,"new text")},i._traceWord=mb(e,"trace");var h=Dne(e,ynt);if(i._mapboxAccessToken=f.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,p=n.height;El.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=p),El.sanitizeMargins(i)}else{El.supplyLayoutGlobalDefaults(a,i,h);var x=!a.width||!a.height,b=i.autosize,y=f.autosizable,k=x&&(b||y);k?El.plotAutoSize(e,a,i):x&&El.sanitizeMargins(i),!b&&x&&(a.width=i.width,a.height=i.height)}i._d3locale=xnt(h,i.separators),i._extraFormat=Dne(e,mnt),i._initialAutoSizeIsDone=!0,i._dataLength=u.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var E=i._subplots=_nt(),A=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=gnt(o,u),El.supplyDataDefaults(u,s,a,i);var _=Object.keys(A.x),C=Object.keys(A.y);if(_.length>1&&C.length>1){for(Df.getComponentMethod("grid","sizeDefaults")(a,i),c=0;c<_.length;c++)Wl.pushUnique(E.xaxis,_[c]);for(c=0;c<C.length;c++)Wl.pushUnique(E.yaxis,C[c]);for(var M in L)Wl.pushUnique(E.cartesian,M)}if(i._has=El._hasPlotType.bind(i),o.length===s.length)for(c=0;c<s.length;c++)Ine(s[c],o[c]);El.supplyLayoutModuleDefaults(a,i,s,e._transitionData);var v=i._visibleModules,z=[];for(c=0;c<v.length;c++){var T=v[c].crossTraceDefaults;T&&Wl.pushUnique(z,T)}for(c=0;c<z.length;c++)z[c](s,i);i._hasOnlyLargeSploms=i._basePlotModules.length===1&&i._basePlotModules[0].name==="splom"&&_.length>15&&C.length>15&&i.shapes.length===0&&i.images.length===0,El.linkSubplots(s,i,o,n),El.cleanPlot(s,i,o,n);var F=!!(n._has&&n._has("cartesian")),q=!!(i._has&&i._has("cartesian")),U=F,H=q;U&&!H?n._bgLayer.remove():H&&!U&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&cnt({_fullLayout:n}),bnt(s,i),Ine(i,n),Df.getComponentMethod("colorscale","crossTraceDefaults")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var j=i._tracePreGUI,G={},O;for(O in j)G[O]="old";for(c=0;c<s.length;c++)O=s[c]._fullInput.uid,G[O]||(j[O]={}),G[O]="new";for(O in G)G[O]==="old"&&delete j[O];Une(i),Df.getComponentMethod("rangeslider","makeData")(i),!r&&l.length===s.length&&El.supplyDefaultsUpdateCalc(l,s)};El.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,u,l;for(s=0;s<o.length;s++)u=o[s],l=Wl.nestedProperty(a,u).get().slice(),Wl.nestedProperty(n,u).set(l)}i.trace=n}}};function gnt(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,u=new Array(r),l={};function f(d,p){u[p]=d,l[d]=1}function c(d,p){if(d&&typeof d=="string"&&!l[d])return f(d,p),!0}for(i=0;i<r;i++){var h=t[i].uid;typeof h=="number"&&(h=String(h)),!c(h,i)&&(i<s&&c(n[i].uid,i)||f(Wl.randstr(l),i))}return u}function _nt(){var e=Df.collectableSubplotTypes,t={},r,n;if(!e){e=[];var i=Df.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++)Wl.pushUnique(e,s[n])}}for(r=0;r<e.length;r++)t[e[r]]=[];return t}function Dne(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,i={};function a(c){for(var h=!0,d=0;d<t.length;d++){var p=t[d];i[p]||(c[p]?i[p]=c[p]:h=!1)}h&&(n=!0)}for(var o=0;o<2;o++){for(var s=e._context.locales,u=0;u<2;u++){var l=(s[r]||{}).format;if(l&&(a(l),n))break;s=Df.localeRegistry}var f=r.split("-")[0];if(n||f===r)break;r=f}return n||a(Df.localeRegistry.en.format),i}function xnt(e,t){return e.decimal=t.charAt(0),e.thousands=t.charAt(1),{numberFormat:function(r){try{r=lnt(e).format(Wl.adjustFormat(r))}catch(n){return Wl.warnBadFormat(r),Wl.noFormat}return r},timeFormat:snt(e).utcFormat}}function bnt(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)}El.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=[])};El._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=Df.modules[i];if(a&&a.categories[e])return!0}return!1};El.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 u=n._has&&n._has("gl"),l=t._has&&t._has("gl");u&&!l&&n._glcontainer!==void 0&&(n._glcontainer.selectAll(".gl-canvas").remove(),n._glcontainer.selectAll(".no-webgl").remove(),n._glcanvas=null);var f=!!n._infolayer;e:for(i=0;i<r.length;i++){var c=r[i],h=c.uid;for(a=0;a<e.length;a++){var d=e[a];if(h===d.uid)continue e}f&&n._infolayer.select(".cb"+h).remove()}};El.linkSubplots=function(e,t,r,n){var i,a,o=n._plots||{},s=t._plots={},u=t._subplots,l={_fullData:e,_fullLayout:t},f=u.cartesian||[];for(i=0;i<f.length;i++){var c=f[i],h=o[c],d=Av.getFromId(l,c,"x"),p=Av.getFromId(l,c,"y"),x;for(h?x=s[c]=h:(x=s[c]={},x.id=c),d._counterAxes.push(p._id),p._counterAxes.push(d._id),d._subplotsWith.push(c),p._subplotsWith.push(c),x.xaxis=d,x.yaxis=p,x._hasClipOnAxisFalse=!1,a=0;a<e.length;a++){var b=e[a];if(b.xaxis===x.xaxis._id&&b.yaxis===x.yaxis._id&&b.cliponaxis===!1){x._hasClipOnAxisFalse=!0;break}}}var y=Av.list(l,null,!0),k;for(i=0;i<y.length;i++){k=y[i];var E=null;k.overlaying&&(E=Av.getFromId(l,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:Av.getFromId(l,k.anchor)}for(i=0;i<y.length;i++)if(k=y[i],k._counterAxes.sort(Av.idSort),k._subplotsWith.sort(Wl.subplotSort),k._mainSubplot=wnt(k,t),k._counterAxes.length&&(k.spikemode&&k.spikemode.indexOf("across")!==-1||k.automargin&&k.mirror&&k.anchor!=="free"||Df.getComponentMethod("rangeslider","isVisible")(k))){var A=1,L=0;for(a=0;a<k._counterAxes.length;a++){var _=Av.getFromId(l,k._counterAxes[a]);A=Math.min(A,_.domain[0]),L=Math.max(L,_.domain[1])}A<L&&(k._counterDomainMin=A,k._counterDomainMax=L)}};function wnt(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 u=e._counterAxes,l=0;l<u.length;l++){var f=u[l],c=n?e._id+f:f+e._id;o||(o=c);var h=Av.getFromId(r,f);if(s&&h.overlaying===s){a=c;break}}}return a||o}El.clearExpandedTraceDefaultColors=function(e){var t,r,n;function i(o,s,u,l){r[l]=s,r.length=l+1,o.valType==="color"&&o.dflt===void 0&&t.push(r.join("."))}for(r=[],t=e._module._colorAttrs,t||(e._module._colorAttrs=t=[],One.crawl(e._module.attributes,i)),n=0;n<t.length;n++){var a=Wl.nestedProperty(e,"_input."+t[n]);a.get()||Wl.nestedProperty(e,t[n]).set(null)}};El.supplyDataDefaults=function(e,t,r,n){var i=n._modules,a=n._visibleModules,o=n._basePlotModules,s=0,u=0,l,f,c;n._transformModules=[];function h(k){t.push(k);var E=k._module;E&&(Wl.pushUnique(i,E),k.visible===!0&&Wl.pushUnique(a,E),Wl.pushUnique(o,k._module.basePlotModule),s++,k._input.visible!==!1&&u++)}var d={},p=[],x=(r.template||{}).data||{},b=fnt.traceTemplater(x);for(l=0;l<e.length;l++)c=e[l],f=b.newTrace(c),f.uid=n._traceUids[l],El.supplyTraceDefaults(c,f,u,n,l),f.index=l,f._input=c,f._fullInput=f,h(f),Df.traceIs(f,"carpetAxis")&&(d[f.carpet]=f),Df.traceIs(f,"carpetDependent")&&p.push(l);for(l=0;l<p.length;l++)if(f=t[p[l]],!!f.visible){var y=d[f.carpet];if(f._carpet=y,!y||!y.visible){f.visible=!1;continue}f.xaxis=y.xaxis,f.yaxis=y.yaxis}};El.supplyAnimationDefaults=function(e){e=e||{};var t,r={};function n(i,a){return Wl.coerce(e||{},r,mO,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]=El.supplyAnimationFrameDefaults(e.frame[t]||{});else r.frame=El.supplyAnimationFrameDefaults(e.frame||{});if(Array.isArray(e.transition))for(r.transition=[],t=0;t<e.transition.length;t++)r.transition[t]=El.supplyAnimationTransitionDefaults(e.transition[t]||{});else r.transition=El.supplyAnimationTransitionDefaults(e.transition||{});return r};El.supplyAnimationFrameDefaults=function(e){var t={};function r(n,i){return Wl.coerce(e||{},t,mO.frame,n,i)}return r("duration"),r("redraw"),t};El.supplyAnimationTransitionDefaults=function(e){var t={};function r(n,i){return Wl.coerce(e||{},t,mO.transition,n,i)}return r("duration"),r("easing"),t};El.supplyFrameDefaults=function(e){var t={};function r(n,i){return Wl.coerce(e,t,dnt,n,i)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),t};El.supplyTraceDefaults=function(e,t,r,n,i){var a=n.colorway||Nne.defaults,o=a[r%a.length],s;function u(E,A){return Wl.coerce(e,t,El.attributes,E,A)}var l=u("visible");u("type"),u("name",n._traceWord+" "+i),u("uirevision",n.uirevision);var f=El.getModule(t);if(t._module=f,f){var c=f.basePlotModule,h=c.attr,d=c.attributes;if(h&&d){var p=n._subplots,x="";if(Array.isArray(h))for(s=0;s<h.length;s++){var b=h[s],y=Wl.coerce(e,t,d,b);p[b]&&Wl.pushUnique(p[b],y),x+=y}else x=Wl.coerce(e,t,d,h);p[c.name]&&Wl.pushUnique(p[c.name],x)}}if(l&&(u("customdata"),u("ids"),u("meta"),Df.traceIs(t,"showLegend")?(Wl.coerce(e,t,f.attributes.showlegend?f.attributes:El.attributes,"showlegend"),u("legend"),u("legendwidth"),u("legendgroup"),u("legendgrouptitle.text"),u("legendrank"),t._dfltShowLegend=!0):t._dfltShowLegend=!1,f&&f.supplyDefaults(e,t,o,n),Df.traceIs(t,"noOpacity")||u("opacity"),Df.traceIs(t,"notLegendIsolatable")&&(t.visible=!!t.visible),Df.traceIs(t,"noHover")||(t.hovertemplate||Wl.coerceHoverinfo(e,t,n),t.type!=="parcats"&&Df.getComponentMethod("fx","supplyDefaults")(e,t,o,n)),f&&f.selectPoints)){var k=u("selectedpoints");Wl.isTypedArray(k)&&(t.selectedpoints=Array.from(k))}return t};El.supplyLayoutGlobalDefaults=function(e,t,r){function n(c,h){return Wl.coerce(e,t,El.layoutAttributes,c,h)}var i=e.template;Wl.isPlainObject(i)&&(t.template=i,t._template=i.layout,t._dataTemplate=i.data),n("autotypenumbers");var a=Wl.coerceFont(n,"font"),o=a.size;Wl.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 u=n("title.automargin");n("title.x"),n("title.xanchor"),n("title.y"),n("title.yanchor"),n("title.subtitle.text",t._dfltTitle.subtitle),Wl.coerceFont(n,"title.subtitle.font",a,{overrideDflt:{size:Math.round(t.title.font.size*.7)}}),u&&(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 l=n("uniformtext.mode");l&&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&&El.sanitizeMargins(t),Df.getComponentMethod("grid","sizeDefaults")(e,t),n("paper_bgcolor"),n("separators",r.decimal+r.thousands),n("hidesources"),n("colorway"),n("datarevision");var f=n("uirevision");n("editrevision",f),n("selectionrevision",f),Df.getComponentMethod("modebar","supplyLayoutDefaults")(e,t),Df.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(e,t,n),Df.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(e,t,n),n("meta"),Wl.isPlainObject(e.transition)&&(n("transition.duration"),n("transition.easing"),n("transition.ordering")),Df.getComponentMethod("calendars","handleDefaults")(e,t,"calendar"),Df.getComponentMethod("fx","supplyLayoutGlobalDefaults")(e,t,n),Wl.coerce(e,t,hnt,"scattermode")};function GL(e){return typeof e=="string"&&e.substr(e.length-2)==="px"&&parseFloat(e)}El.plotAutoSize=function(t,r,n){var i=t._context||{},a=i.frameMargins,o,s,u=Wl.isPlotDiv(t);if(u&&t.emit("plotly_autosize"),i.fillFrame)o=window.innerWidth,s=window.innerHeight,document.body.style.overflow="hidden";else{var l=u?window.getComputedStyle(t):{};if(o=GL(l.width)||GL(l.maxWidth)||n.width,s=GL(l.height)||GL(l.maxHeight)||n.height,WM(a)&&a>0){var f=1-2*a;o=Math.round(f*o),s=Math.round(f*s)}}var c=El.layoutAttributes.width.min,h=El.layoutAttributes.height.min;o<c&&(o=c),s<h&&(s=h);var d=!r.width&&Math.abs(n.width-o)>1,p=!r.height&&Math.abs(n.height-s)>1;(p||d)&&(d&&(n.width=o),p&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),El.sanitizeMargins(n)};El.supplyLayoutModuleDefaults=function(e,t,r,n){var i=Df.componentsRegistry,a=t._basePlotModules,o,s,u,l=Df.subplotsRegistry.cartesian;for(o in i)u=i[o],u.includeBasePlot&&u.includeBasePlot(e,t);a.length||a.push(l),t._has("cartesian")&&(Df.getComponentMethod("grid","contentDefaults")(e,t),l.finalizeSubplots(e,t));for(var f in t._subplots)t._subplots[f].sort(Wl.subplotSort);for(s=0;s<a.length;s++)u=a[s],u.supplyLayoutDefaults&&u.supplyLayoutDefaults(e,t,r);var c=t._modules;for(s=0;s<c.length;s++)u=c[s],u.supplyLayoutDefaults&&u.supplyLayoutDefaults(e,t,r);var h=t._transformModules;for(s=0;s<h.length;s++)u=h[s],u.supplyLayoutDefaults&&u.supplyLayoutDefaults(e,t,r,n);for(o in i)u=i[o],u.supplyLayoutDefaults&&u.supplyLayoutDefaults(e,t,r)};El.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)),Wl.clearThrottle(),Wl.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()};El.style=function(e){var t=e._fullLayout._visibleModules,r=[],n;for(n=0;n<t.length;n++){var i=t[n];i.style&&Wl.pushUnique(r,i.style)}for(n=0;n<r.length;n++)r[n](e)};El.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))}};El.clearAutoMarginIds=function(e){e._fullLayout._pushmarginIds={}};El.allowAutoMargin=function(e,t){e._fullLayout._pushmarginIds[t]=1};function Une(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 Vne=2,Hne=2;El.autoMargin=function(e,t,r){var n=e._fullLayout,i=n.width,a=n.height,o=n.margin,s=n.minreducedwidth,u=n.minreducedheight,l=Wl.constrain(i-o.l-o.r,Vne,s),f=Wl.constrain(a-o.t-o.b,Hne,u),c=Math.max(0,i-l),h=Math.max(0,a-f),d=n._pushmargin,p=n._pushmarginIds;if(o.autoexpand!==!1){if(!r)delete d[t],delete p[t];else{var x=r.pad;if(x===void 0&&(x=Math.min(12,o.l,o.r,o.t,o.b)),c){var b=(r.l+r.r)/c;b>1&&(r.l/=b,r.r/=b)}if(h){var y=(r.t+r.b)/h;y>1&&(r.t/=y,r.b/=y)}var k=r.xl!==void 0?r.xl:r.x,E=r.xr!==void 0?r.xr:r.x,A=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+x},r:{val:E,size:r.r+x},b:{val:L,size:r.b+x},t:{val:A,size:r.t+x}},p[t]=1}if(!n._replotting)return El.doAutoMargin(e)}};function Tnt(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Av.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}El.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Une(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Wl.extendFlat({},i),u=a.l,l=a.r,f=a.t,c=a.b,h=t._pushmargin,d=t._pushmarginIds,p=t.minreducedwidth,x=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var y=e._fullLayout._reservedMargin;for(var k in y)for(var E in y[k]){var A=y[k][E];o[E]=Math.max(o[E],A)}h.base={l:{val:0,size:u},r:{val:1,size:l},t:{val:1,size:f},b:{val:0,size:c}};for(var L in o){var _=0;for(var C in h)C!=="base"&&WM(h[C][L].size)&&(_=h[C][L].size>_?h[C][L].size:_);var M=Math.max(0,a[L]-_);o[L]=Math.max(0,o[L]-M)}for(var v in h){var z=h[v].l||{},T=h[v].b||{},F=z.val,q=z.size,U=T.val,H=T.size,j=r-o.r-o.l,G=n-o.t-o.b;for(var O in h){if(WM(q)&&h[O].r){var W=h[O].r.val,re=h[O].r.size;if(W>F){var ne=(q*W+(re-j)*F)/(W-F),be=(re*(1-F)+(q-j)*(1-W))/(W-F);ne+be>u+l&&(u=ne,l=be)}}if(WM(H)&&h[O].t){var ze=h[O].t.val,Ce=h[O].t.size;if(ze>U){var he=(H*ze+(Ce-G)*U)/(ze-U),te=(Ce*(1-U)+(H-G)*(1-ze))/(ze-U);he+te>c+f&&(c=he,f=te)}}}}}var ke=Wl.constrain(r-a.l-a.r,Vne,p),Ee=Wl.constrain(n-a.t-a.b,Hne,x),Me=Math.max(0,r-ke),Oe=Math.max(0,n-Ee);if(Me){var Re=(u+l)/Me;Re>1&&(u/=Re,l/=Re)}if(Oe){var me=(c+f)/Oe;me>1&&(c/=me,f/=me)}if(i.l=Math.round(u)+o.l,i.r=Math.round(l)+o.r,i.t=Math.round(f)+o.t,i.b=Math.round(c)+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&&(El.didMarginChange(s,i)||Tnt(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Be=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount<Be)return Df.call("_doPlot",e);t._size=s,Wl.warn("Too many auto-margin redraws.")}Ant(e)};function Ant(e){var t=Av.list(e,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var n=0;n<t.length;n++){var i=t[n][r];i&&i()}})}var Rne=["l","r","t","b","p","w","h"];El.didMarginChange=function(e,t){for(var r=0;r<Rne.length;r++){var n=Rne[r],i=e[n],a=t[n];if(!WM(i)||Math.abs(a-i)>1)return!0}return!1};El.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&El.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,u=(e._transitionData||{})._frames;function l(h,d){if(typeof h=="function")return d?"_function_":null;if(Wl.isPlainObject(h)){var p={},x;return Object.keys(h).sort().forEach(function(E){if(["_","["].indexOf(E.charAt(0))===-1){if(typeof h[E]=="function"){d&&(p[E]="_function");return}if(r==="keepdata"){if(E.substr(E.length-3)==="src")return}else if(r==="keepstream"){if(x=h[E+"src"],typeof x=="string"&&x.indexOf(":")>0&&!Wl.isPlainObject(h.stream))return}else if(r!=="keepall"&&(x=h[E+"src"],typeof x=="string"&&x.indexOf(":")>0))return;p[E]=l(h[E],d)}}),p}var b=Array.isArray(h),y=Wl.isTypedArray(h);if((b||y)&&h.dtype&&h.shape){var k=h.bdata;return l({dtype:h.dtype,shape:h.shape,bdata:Wl.isArrayBuffer(k)?unt.encode(k):k},d)}return b?h.map(function(E){return l(E,d)}):y?Wl.simpleMap(h,Wl.identity):Wl.isJSDate(h)?Wl.ms2DateTimeLocal(+h):h}var f={data:(o||[]).map(function(h){var d=l(h);return t&&delete d.fit,d})};if(!t&&(f.layout=l(s),i)){var c=s._size;f.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return u&&(f.frames=l(u)),a&&(f.config=l(e._context,!0)),n==="object"?f:JSON.stringify(f)};El.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,u=i.name;a[n.index]=o[u]=i,u!==s&&(delete o[s],o[u]=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()};El.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 u=[s],l=[s.name];s.baseframe&&(s=r[s.baseframe.toString()])&&l.indexOf(s.name)===-1;)u.push(s),l.push(s.name);for(var f={};s=u.pop();)if(s.layout&&(f.layout=El.extendLayout(f.layout,s.layout)),s.data){if(f.data||(f.data=[]),i=s.traces,!i)for(i=[],n=0;n<s.data.length;n++)i[n]=n;for(f.traces||(f.traces=[]),n=0;n<s.data.length;n++)a=i[n],a!=null&&(o=f.traces.indexOf(a),o===-1&&(o=f.data.length,f.traces[o]=a),f.data[o]=El.extendTrace(f.data[o],s.data[n]))}return f};El.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)}};El.extendObjectWithContainers=function(e,t,r){var n,i,a,o,s,u,l,f,c=Wl.extendDeepNoArrays({},t||{}),h=Wl.expandObjectPaths(c),d={};if(r&&r.length)for(a=0;a<r.length;a++)n=Wl.nestedProperty(h,r[a]),i=n.get(),i===void 0?Wl.nestedProperty(d,r[a]).set(null):(n.set(null),Wl.nestedProperty(d,r[a]).set(i));if(e=Wl.extendDeepNoArrays(e||{},h),r&&r.length){for(a=0;a<r.length;a++)if(s=Wl.nestedProperty(d,r[a]),l=s.get(),!!l){for(u=Wl.nestedProperty(e,r[a]),f=u.get(),Array.isArray(f)||(f=[],u.set(f)),o=0;o<l.length;o++){var p=l[o];p===null?f[o]=null:f[o]=El.extendObjectWithContainers(f[o],p)}u.set(f)}}return e};El.dataArrayContainers=["transforms","dimensions"];El.layoutArrayContainers=Df.layoutArrayContainers;El.extendTrace=function(e,t){return El.extendObjectWithContainers(e,t,El.dataArrayContainers)};El.extendLayout=function(e,t){return El.extendObjectWithContainers(e,t,El.layoutArrayContainers)};El.transition=function(e,t,r,n,i,a){var o={redraw:i.redraw},s={},u=[];return o.prepareFn=function(){for(var l=Array.isArray(t)?t.length:0,f=n.slice(0,l),c=0;c<f.length;c++){var h=f[c],d=e._fullData[h],p=d._module;if(p){if(p.animatable){var x=p.basePlotModule.name;s[x]||(s[x]=[]),s[x].push(h)}e.data[f[c]]=El.extendTrace(e.data[f[c]],t[c])}}var b=Wl.expandObjectPaths(Wl.extendDeepNoArrays({},r)),y=/^[xy]axis[0-9]*$/;for(var k in b)y.test(k)&&delete b[k].range;El.extendLayout(e.layout,b),delete e.calcdata,El.supplyDefaults(e),El.doCalcdata(e);var E=Wl.expandObjectPaths(r);if(E){var A=e._fullLayout._plots;for(var L in A){var _=A[L],C=_.xaxis,M=_.yaxis,v=C.range.slice(),z=M.range.slice(),T=null,F=null,q=null,U=null;Array.isArray(E[C._name+".range"])?T=E[C._name+".range"].slice():Array.isArray((E[C._name]||{}).range)&&(T=E[C._name].range.slice()),Array.isArray(E[M._name+".range"])?F=E[M._name+".range"].slice():Array.isArray((E[M._name]||{}).range)&&(F=E[M._name].range.slice()),v&&T&&(C.r2l(v[0])!==C.r2l(T[0])||C.r2l(v[1])!==C.r2l(T[1]))&&(q={xr0:v,xr1:T}),z&&F&&(M.r2l(z[0])!==M.r2l(F[0])||M.r2l(z[1])!==M.r2l(F[1]))&&(U={yr0:z,yr1:F}),(q||U)&&u.push(Wl.extendFlat({plotinfo:_},q,U))}}return Promise.resolve()},o.runFn=function(l){var f,c=e._fullLayout._basePlotModules,h=u.length,d;if(r)for(d=0;d<c.length;d++)c[d].transitionAxes&&c[d].transitionAxes(e,u,a,l);h?(f=Wl.extendFlat({},a),f.duration=0,delete s.cartesian):f=a;for(var p in s){var x=s[p],b=e._fullData[x[0]]._module;b.basePlotModule.plot(e,x,f,l)}},Gne(e,a,o)};El.transitionFromReact=function(e,t,r,n){var i=e._fullLayout,a=i.transition,o={},s=[];return o.prepareFn=function(){var u=i._plots;o.redraw=!1,t.anim==="some"&&(o.redraw=!0),r.anim==="some"&&(o.redraw=!0);for(var l in u){var f=u[l],c=f.xaxis,h=f.yaxis,d=n[c._name].range.slice(),p=n[h._name].range.slice(),x=c.range.slice(),b=h.range.slice();c.setScale(),h.setScale();var y=null,k=null;(c.r2l(d[0])!==c.r2l(x[0])||c.r2l(d[1])!==c.r2l(x[1]))&&(y={xr0:d,xr1:x}),(h.r2l(p[0])!==h.r2l(b[0])||h.r2l(p[1])!==h.r2l(b[1]))&&(k={yr0:p,yr1:b}),(y||k)&&s.push(Wl.extendFlat({plotinfo:f},y,k))}return Promise.resolve()},o.runFn=function(u){for(var l=e._fullData,f=e._fullLayout,c=f._basePlotModules,h,d,p,x=[],b=0;b<l.length;b++)x.push(b);function y(){if(e._fullLayout)for(var E=0;E<c.length;E++)c[E].transitionAxes&&c[E].transitionAxes(e,s,h,u)}function k(){if(e._fullLayout)for(var E=0;E<c.length;E++)c[E].plot(e,p,d,u)}s.length&&t.anim?a.ordering==="traces first"?(h=Wl.extendFlat({},a,{duration:0}),p=x,d=a,setTimeout(y,a.duration),k()):(h=a,p=null,d=Wl.extendFlat({},a,{duration:0}),setTimeout(k,h.duration),y()):s.length?(h=a,y()):t.anim&&(p=x,d=a,k())},Gne(e,a,o)};function Gne(e,t,r){var n=!1;function i(c){var h=Promise.resolve();if(!c)return h;for(;c.length;)h=h.then(c.shift());return h}function a(c){if(c)for(;c.length;)c.shift()}function o(){return e.emit("plotly_transitioning",[]),new Promise(function(c){e._transitioning=!0,t.duration>0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return Df.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function p(){return h++,function(){d++,!n&&d===h&&s(c)}}r.runFn(p),setTimeout(p())})}function s(c){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Df.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(c)}function u(){if(e._transitionData)return e._transitioning=!1,i(e._transitionData._interruptCallbacks)}var l=[El.previousPromises,u,r.prepareFn,El.rehover,El.reselect,o],f=Wl.syncOrAsync(l,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}El.doCalcdata=function(e,t){var r=Av.list(e),n=e._fullData,i=e._fullLayout,a,o,s,u,l=new Array(n.length),f=(e.calcdata||[]).slice();for(e.calcdata=l,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){l[s]=f[s];continue}for(s=0;s<n.length;s++)a=n[s],a._arrayAttrs=One.findArrayAttributes(a),a._extremes={};var c=i._subplots.polar||[];for(s=0;s<c.length;s++)r.push(i[c[s]].radialaxis,i[c[s]].angularaxis);for(var h in i._colorAxes){var d=i[h];d.cauto!==!1&&(delete d.cmin,delete d.cmax)}var p=!1;function x(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(u=0;u<a.transforms.length;u++){var A=a.transforms[u];o=transformsRegistry[A.type],o&&o.calcTransform&&(a._hasCalcTransform=!0,p=!0,o.calcTransform(e,a,A))}}}function b(k,E){if(a=n[k],o=a._module,!!o.isContainer===E){var A=[];if(a.visible===!0&&a._length!==0){delete a._indexToPoints;var L=a.transforms||[];for(u=L.length-1;u>=0;u--)if(L[u].enabled){a._indexToPoints=L[u]._indexToPoints;break}o&&o.calc&&(A=o.calc(e,a))}(!Array.isArray(A)||!A[0])&&(A=[{x:Pne,y:Pne}]),A[0].t||(A[0].t={}),A[0].trace=a,l[k]=A}}for(Fne(r,n,i),s=0;s<n.length;s++)b(s,!0);for(s=0;s<n.length;s++)x(s);for(p&&Fne(r,n,i),s=0;s<n.length;s++)b(s,!0);for(s=0;s<n.length;s++)b(s,!1);qne(e);var y=Mnt(r,e);if(y.length){for(i._numBoxes=0,i._numViolins=0,s=0;s<y.length;s++)b(y[s],!0);for(s=0;s<y.length;s++)b(y[s],!1);qne(e)}Df.getComponentMethod("fx","calc")(e),Df.getComponentMethod("errorbars","calc")(e)};var Snt=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function Mnt(e,t){var r=[],n,i,a,o,s;function u(O,W,re){var ne=W._id.charAt(0);if(O==="histogram2dcontour"){var be=W._counterAxes[0],ze=Av.getFromId(t,be),Ce=ne==="x"||be==="x"&&ze.type==="category",he=ne==="y"||be==="y"&&ze.type==="category";return function(te,ke){return te===0||ke===0||Ce&&te===re[ke].length-1||he&&ke===re.length-1?-1:(ne==="y"?ke:te)-1}}else return function(te,ke){return ne==="y"?ke:te}}var l={min:function(O){return Wl.aggNums(Math.min,null,O)},max:function(O){return Wl.aggNums(Math.max,null,O)},sum:function(O){return Wl.aggNums(function(W,re){return W+re},null,O)},total:function(O){return Wl.aggNums(function(W,re){return W+re},null,O)},mean:function(O){return Wl.mean(O)},"geometric mean":function(O){return Wl.geometricMean(O)},median:function(O){return Wl.median(O)}};function f(O,W){return O[1]-W[1]}function c(O,W){return W[1]-O[1]}for(n=0;n<e.length;n++){var h=e[n];if(h.type==="category"){var d=h.categoryorder.match(Snt);if(d){var p=d[1],x=d[2],b=h._id.charAt(0),y=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],A=t._fullData[E];if(A.visible===!0){var L=A.type;Df.traceIs(A,"histogram")&&(delete A._xautoBinFinished,delete A._yautoBinFinished);var _=L==="splom",C=L==="scattergl",M=t.calcdata[E];for(a=0;a<M.length;a++){var v=M[a],z,T;if(_){var F=A._axesDim[h._id];if(!y){var q=A._diag[F][0];q&&(h=t._fullLayout[Av.id2name(q)])}var U=v.trace.dimensions[F].values;for(o=0;o<U.length;o++)for(z=h._categoriesMap[U[o]],s=0;s<v.trace.dimensions.length;s++)if(s!==F){var H=v.trace.dimensions[s];k[z][1].push(H.values[o])}}else if(C){for(o=0;o<v.t.x.length;o++)y?(z=v.t.x[o],T=v.t.y[o]):(z=v.t.y[o],T=v.t.x[o]),k[z][1].push(T);v.t&&v.t._scene&&delete v.t._scene.dirty}else if(v.hasOwnProperty("z")){T=v.z;var j=u(A.type,h,T);for(o=0;o<T.length;o++)for(s=0;s<T[o].length;s++)z=j(s,o),z+1&&k[z][1].push(T[o][s])}else for(z=v.p,z===void 0&&(z=v[b]),T=v.s,T===void 0&&(T=v.v),T===void 0&&(T=y?v.y:v.x),Array.isArray(T)||(T===void 0?T=[]:T=[T]),o=0;o<T.length;o++)k[z][1].push(T[o])}}}h._categoriesValue=k;var G=[];for(i=0;i<k.length;i++)G.push([k[i][0],l[p](k[i][1])]);G.sort(x==="descending"?c:f),h._categoriesAggregatedValue=G,h._initialCategories=G.map(function(O){return O[0]}),r=r.concat(h.sortByInitialCategories())}}}return r}function Fne(e,t,r){var n={};function i(u){u.clearCalc(),u.type==="multicategory"&&u.setupMultiCategory(t),n[u._id]=1}Wl.simpleMap(e,i);for(var a=r._axisMatchGroups||[],o=0;o<a.length;o++)for(var s in a[o])n[s]||i(r[Av.id2name(s)])}function qne(e){var t=e._fullLayout,r=t._visibleModules,n={},i,a,o;for(a=0;a<r.length;a++){var s=r[a],u=s.crossTraceCalc;if(u){var l=s.basePlotModule.name;n[l]?Wl.pushUnique(n[l],u):n[l]=[u]}}for(o in n){var f=n[o],c=t._subplots[o];if(Array.isArray(c))for(i=0;i<c.length;i++){var h=c[i],d=o==="cartesian"?t._plots[h]:t[h];for(a=0;a<f.length;a++)f[a](e,d,h)}else for(a=0;a<f.length;a++)f[a](e)}}El.rehover=function(e){e._fullLayout._rehover&&e._fullLayout._rehover()};El.redrag=function(e){e._fullLayout._redrag&&e._fullLayout._redrag()};El.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);Df.getComponentMethod("selections","reselect")(e,i)};El.generalUpdatePerTraceModule=function(e,t,r,n){var i=t.traceHash,a={},o;for(o=0;o<r.length;o++){var s=r[o],u=s[0].trace;u.visible&&(a[u.type]=a[u.type]||[],a[u.type].push(s))}for(var l in i)if(!a[l]){var f=i[l][0],c=f[0].trace;c.visible=!1,a[l]=[f]}for(var h in a){var d=a[h],p=d[0][0].trace._module;p.plot(e,t,Wl.filterVisible(d),n)}t.traceHash=a};El.plotBasePlot=function(e,t,r,n,i){var a=Df.getModule(e),o=pnt(t.calcdata,a)[0];a.plot(t,o,n,i)};El.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 Zv=Se(gb=>{"use strict";gb.xmlns="http://www.w3.org/2000/xmlns/";gb.svg="http://www.w3.org/2000/svg";gb.xlink="http://www.w3.org/1999/xlink";gb.svgAttrs={xmlns:gb.svg,"xmlns:xlink":gb.xlink}});var Qh=Se((sir,jne)=>{"use strict";jne.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 Bf=Se(b0=>{"use strict";var Dh=Nl(),Tg=Zr(),Ent=Tg.strTranslate,gO=Zv(),knt=Qh().LINE_SPACING,Cnt=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;b0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&n.match(Cnt),a=Dh.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 u=Vnt(e.node(),n);u&&e.style("pointer-events","all"),b0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(u){e.style("display","none");var l=parseInt(e.node().style.fontSize,10),f={fontSize:l};Int(i[2],f,function(c,h,d){a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove();var p=c&&c.select("svg");if(!p||!p.node()){s(),u();return}var x=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});x.node().appendChild(p.node()),h&&h.node()&&p.node().insertBefore(h.node().cloneNode(!0),p.node().firstChild);var b=d.width,y=d.height;p.attr({class:o,height:y,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var k=e.node().style.fill||"black",E=p.select("g");E.attr({fill:k,stroke:k});var A=E.node().getBoundingClientRect(),L=A.width,_=A.height;(L>b||_>y)&&(p.style("overflow","hidden"),A=p.node().getBoundingClientRect(),L=A.width,_=A.height);var C=+e.attr("x"),M=+e.attr("y"),v=l||e.node().getBoundingClientRect().height,z=-v/4;if(o[0]==="y")x.attr({transform:"rotate("+[-90,C,M]+")"+Ent(-L/2,z-_/2)});else if(o[0]==="l")M=z-_/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)C=0,M=z;else{var T=e.attr("text-anchor");C=C-L*(T==="middle"?.5:T==="end"?1:0),M=M+z-_/2}p.attr({x:C,y:M}),r&&r.call(e,x),u(x)})})):s(),e};var Lnt=/(<|&lt;|&#60;)/g,znt=/(>|&gt;|&#62;)/g;function Pnt(e){return e.replace(Lnt,"\\lt ").replace(znt,"\\gt ")}var Zne=[["$","$"],["\\(","\\)"]];function Int(e,t,r){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){Tg.warn("No MathJax version:",MathJax.version);return}var i,a,o,s,u=function(){return a=Tg.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:Zne},displayAlign:"left"})},l=function(){a=Tg.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=Zne},f=function(){if(i=MathJax.Hub.config.menuSettings.renderer,i!=="SVG")return MathJax.Hub.setRenderer("SVG")},c=function(){i=MathJax.config.startup.output,i!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var k="math-output-"+Tg.randstr({},64);s=Dh.select("body").append("div").attr({id:k}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(Pnt(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)Tg.log("There was an error in the tex syntax.",e),r();else{var A=E.getBoundingClientRect(),L;n===2?L=Dh.select("body").select("#MathJax_SVG_glyphs"):L=k.select("defs"),r(k,L,A)}s.remove()},p=function(){if(i!=="SVG")return MathJax.Hub.setRenderer(i)},x=function(){i!=="svg"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},y=function(){MathJax.config=a};n===2?MathJax.Hub.Queue(u,f,h,d,p,b):n===3&&(l(),c(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),x(),y()}))}var Jne={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"},Dnt={sub:"0.3em",sup:"-0.6em"},Rnt={sub:"-0.21em",sup:"0.42em"},Xne="\u200B",Yne=["http:","https:","mailto:","",void 0,":"],$ne=b0.NEWLINES=/(\r\n?|\n)/g,xO=/(<[^<>]*>)/,bO=/<(\/?)([^ >]*)(\s+(.*))?>/i,Fnt=/<br(\s+.*)?>/i;b0.BR_TAG_ALL=/<br(\s+.*)?>/gi;var Qne=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,eae=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,tae=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,qnt=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function _b(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&jL(n)}var Bnt=/(^|;)\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(xO),s=[],u="",l=0,f=0;f<o.length;f++){var c=o[f],h=c.match(bO),d=h&&h[2].toLowerCase();if(d)n.indexOf(d)!==-1&&(s.push(c),u=d);else{var p=c.length;if(l+p<r)s.push(c),l+=p;else if(l<r){var x=r-l;u&&(u!=="br"||x<=a||p<=a)&&s.pop(),r>a?s.push(c.substr(0,x-a)+i):s.push(c.substr(0,x));break}u=""}}return s.join("")};var Ont={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},Nnt=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function jL(e){return e.replace(Nnt,function(t,r){var n;return r.charAt(0)==="#"?n=Unt(r.charAt(1)==="x"?parseInt(r.substr(2),16):parseInt(r.substr(1),10)):n=Ont[r],n||t})}b0.convertEntities=jL;function Unt(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 Vnt(e,t){t=t.replace($ne," ");var r=!1,n=[],i,a=-1;function o(){a++;var _=document.createElementNS(gO.svg,"tspan");Dh.select(_).attr({class:"line",dy:a*knt+"em"}),e.appendChild(_),i=_;var C=n;if(n=[{node:_}],C.length>1)for(var M=1;M<C.length;M++)s(C[M])}function s(_){var C=_.type,M={},v;if(C==="a"){v="a";var z=_.target,T=_.href,F=_.popup;T&&(M={"xlink:xlink:show":z==="_blank"||z.charAt(0)!=="_"?"new":"replace",target:z,"xlink:xlink:href":T},F&&(M.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+F+'");return false;'))}else v="tspan";_.style&&(M.style=_.style);var q=document.createElementNS(gO.svg,v);if(C==="sup"||C==="sub"){u(i,Xne),i.appendChild(q);var U=document.createElementNS(gO.svg,"tspan");u(U,Xne),Dh.select(U).attr("dy",Rnt[C]),M.dy=Dnt[C],i.appendChild(q),i.appendChild(U)}else i.appendChild(q);Dh.select(q).attr(M),i=_.node=q,n.push(_)}function u(_,C){_.appendChild(document.createTextNode(C))}function l(_){if(n.length===1){Tg.log("Ignoring unexpected end tag </"+_+">.",t);return}var C=n.pop();_!==C.type&&Tg.log("Start tag <"+C.type+"> doesnt match end tag <"+_+">. Pretending it did match.",t),i=n[n.length-1].node}var f=Fnt.test(t);f?o():(i=e,n=[{node:e}]);for(var c=t.split(xO),h=0;h<c.length;h++){var d=c[h],p=d.match(bO),x=p&&p[2].toLowerCase(),b=Jne[x];if(x==="br")o();else if(b===void 0)u(i,jL(d));else if(p[1])l(x);else{var y=p[4],k={type:x},E=_b(y,Qne);if(E?(E=E.replace(Bnt,"$1 fill:"),b&&(E+=";"+b)):b&&(E=b),E&&(k.style=E),x==="a"){r=!0;var A=_b(y,eae);if(A){var L=rae(A);L&&(k.href=L,k.target=_b(y,tae)||"_blank",k.popup=_b(y,qnt))}}s(k)}}return r}function rae(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 Yne.indexOf(i)!==-1&&Yne.indexOf(a)!==-1?t:""}b0.sanitizeHTML=function(t){t=t.replace($ne," ");for(var r=document.createElement("p"),n=r,i=[],a=t.split(xO),o=0;o<a.length;o++){var s=a[o],u=s.match(bO),l=u&&u[2].toLowerCase();if(l in Jne)if(u[1])i.length&&(n=i.pop());else{var f=u[4],c=_b(f,Qne),h=c?{style:c}:{};if(l==="a"){var d=_b(f,eae);if(d){var p=rae(d);if(p){h.href=p;var x=_b(f,tae);x&&(h.target=x)}}}var b=document.createElement(l);n.appendChild(b),Dh.select(b).attr(h),n=b,i.push(b)}else n.appendChild(document.createTextNode(jL(s)))}var y="innerHTML";return r[y]};b0.lineCount=function(t){return t.selectAll("tspan.line").size()||1};b0.positionText=function(t,r,n){return t.each(function(){var i=Dh.select(this);function a(u,l){return l===void 0?(l=i.attr(u),l===null&&(i.attr(u,0),l=0)):i.attr(u,l),l}var o=a("x",r),s=a("y",n);this.nodeName==="text"&&i.selectAll("tspan.line").attr({x:o,y:s})})};function Kne(e,t,r){var n=r.horizontalAlign,i=r.verticalAlign||"top",a=e.node().getBoundingClientRect(),o=t.node().getBoundingClientRect(),s,u,l;return i==="bottom"?u=function(){return a.bottom-s.height}:i==="middle"?u=function(){return a.top+(a.height-s.height)/2}:u=function(){return a.top},n==="right"?l=function(){return a.right-s.width}:n==="center"?l=function(){return a.left+(a.width-s.width)/2}:l=function(){return a.left},function(){s=this.node().getBoundingClientRect();var f=l()-o.left,c=u()-o.top,h=r.gd||{};if(r.gd){h._fullLayout._calcInverseTransform(h);var d=Tg.apply3DTransform(h._fullLayout._invTransform)(f,c);f=d[0],c=d[1]}return this.style({top:c+"px",left:f+"px","z-index":1e3}),this}}var _O="1px ";b0.makeTextShadow=function(e){var t=_O,r=_O,n=_O;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=Dh.dispatch("edit","input","cancel"),a=n||e;if(e.style({"pointer-events":n?"none":"all"}),e.size()!==1)throw new Error("boo");function o(){u(),e.style({opacity:0});var l=a.attr("class"),f;l?f="."+l.split(" ")[0]+"-math-group":f="[class*=-math-group]",f&&Dh.select(e.node().parentNode).select(f).style({opacity:0})}function s(l){var f=l.node(),c=document.createRange();c.selectNodeContents(f);var h=window.getSelection();h.removeAllRanges(),h.addRange(c),f.focus()}function u(){var l=Dh.select(r),f=l.select(".svg-container"),c=f.append("div"),h=e.node().style,d=parseFloat(h.fontSize||12),p=t.text;p===void 0&&(p=e.attr("data-unformatted")),c.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(p).call(Kne(e,f,t)).on("blur",function(){r._editing=!1,e.text(this.textContent).style({opacity:1});var x=Dh.select(this).attr("class"),b;x?b="."+x.split(" ")[0]+"-math-group":b="[class*=-math-group]",b&&Dh.select(e.node().parentNode).select(b).style({opacity:0});var y=this.textContent;Dh.select(this).transition().duration(0).remove(),Dh.select(document).on("mouseup",null),i.edit.call(e,y)}).on("focus",function(){var x=this;r._editing=!0,Dh.select(document).on("mouseup",function(){if(Dh.event.target===x)return!1;document.activeElement===c.node()&&c.node().blur()})}).on("keyup",function(){Dh.event.which===27?(r._editing=!1,e.style({opacity:1}),Dh.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),i.cancel.call(e,this.textContent)):(i.input.call(e,this.textContent),Dh.select(this).call(Kne(e,f,t)))}).on("keydown",function(){Dh.event.which===13&&this.blur()}).call(s)}return t.immediate?o():a.on("click",o),Dh.rebind(e,i,"on")}});var Dp=Se((uir,fae)=>{"use strict";var Hnt=Nl(),XL=cd(),ZM=_u(),ZL=Zr(),iae=Pl(),Gnt=sb().isValid;function Wnt(e,t,r){var n=t?ZL.nestedProperty(e,t).get()||{}:e,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(ZL.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(ZM(i[o])){a=!0;break}}return ZL.isPlainObject(n)&&(a||n.showscale===!0||ZM(n.cmin)&&ZM(n.cmax)||Gnt(n.colorscale)||ZL.isPlainObject(n.colorbar))}var nae=["showscale","autocolorscale","colorscale","reversescale","colorbar"],jM=["min","max","mid","auto"];function oae(e){var t=e._colorAx,r=t||e,n={},i,a,o;for(a=0;a<nae.length;a++)o=nae[a],n[o]=r[o];if(t)for(i="c",a=0;a<jM.length;a++)o=jM[a],n[o]=r["c"+o];else{var s;for(a=0;a<jM.length;a++){if(o=jM[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(u,l){var f=jM.indexOf(u)!==-1?i+u:u;r[f]=r["_"+f]=l},n}function sae(e){for(var t=oae(e),r=t.min,n=t.max,i=t.reversescale?lae(t.colorscale):t.colorscale,a=i.length,o=new Array(a),s=new Array(a),u=0;u<a;u++){var l=i[u];o[u]=r+l[0]*(n-r),s[u]=l[1]}return{domain:o,range:s}}function lae(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 uae(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=XL(n[o]).toRgb();a[o]=[s.r,s.g,s.b,s.a]}var u=Hnt.scale.linear().domain(r).range(a).clamp(!0),l=t.noNumericCheck,f=t.returnArray,c;return l&&f?c=u:l?c=function(h){return aae(u(h))}:f?c=function(h){return ZM(h)?u(h):XL(h).isValid()?h:iae.defaultLine}:c=function(h){return ZM(h)?aae(u(h)):XL(h).isValid()?h:iae.defaultLine},c.domain=u.domain,c.range=function(){return n},c}function jnt(e,t){return uae(sae(e),t)}function aae(e){var t={r:e[0],g:e[1],b:e[2],a:e[3]};return XL(t).toRgbString()}fae.exports={hasColorscale:Wnt,extractOpts:oae,extractScale:sae,flipScale:lae,makeColorScaleFunc:uae,makeColorScaleFuncFromTrace:jnt}});var Gc=Se((fir,dae)=>{"use strict";var cae=VB(),Znt=cae.FORMAT_LINK,Xnt=cae.DATE_FORMAT_LINK;function Ynt(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?wO:hae)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function wO(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: "+Znt+"."].join(" ")}function hae(e,t){return wO(e,t)+[" And for dates see: "+Xnt+".","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(" ")}dae.exports={axisHoverFormat:Ynt,descriptionOnlyNumbers:wO,descriptionWithDates:hae}});var Rd=Se((cir,Lae)=>{"use strict";var pae=uc(),w3=Ih(),Cae=Id().dash,AO=vu().extendFlat,vae=_f().templatedArray,yae=Gc().descriptionWithDates,Knt=ju().ONEDAY,vm=dd(),Jnt=vm.HOUR_PATTERN,$nt=vm.WEEKDAY_PATTERN,TO={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},Qnt=AO({},TO,{values:TO.values.slice().concat(["sync"])});function mae(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var gae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},_ae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},xae={valType:"data_array",editType:"ticks"},bae={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function wae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Tae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Aae={valType:"color",dflt:w3.defaultLine,editType:"ticks"},Sae={valType:"color",dflt:w3.lightLine,editType:"ticks"};function Mae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Eae=AO({},Cae,{editType:"ticks"}),kae={valType:"boolean",editType:"ticks"};Lae.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:pae({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[vm.idRegex.x.toString(),vm.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:[vm.idRegex.x.toString(),vm.idRegex.y.toString()],editType:"calc"},rangebreaks:vae("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:[$nt,Jnt,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:Knt},editType:"calc"}),tickmode:Qnt,nticks:mae(),tick0:gae,dtick:_ae,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:xae,ticktext:{valType:"data_array",editType:"ticks"},ticks:bae,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:wae(),tickwidth:Tae(),tickcolor:Aae,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:AO({},Cae,{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:pae({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"],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:yae("tick label")},tickformatstops:vae("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:yae("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:w3.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:kae,gridcolor:Sae,gridwidth:Mae(),griddash:Eae,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",vm.idRegex.x.toString(),vm.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",vm.idRegex.x.toString(),vm.idRegex.y.toString()],editType:"plot"},minor:{tickmode:TO,nticks:mae("minor"),tick0:gae,dtick:_ae,tickvals:xae,ticks:bae,ticklen:wae("minor"),tickwidth:Tae("minor"),tickcolor:Aae,gridcolor:Sae,gridwidth:Mae("minor"),griddash:Eae,showgrid:kae,editType:"ticks"},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 YL=Se((hir,Iae)=>{"use strict";var Nc=Rd(),zae=uc(),Pae=vu().extendFlat,eat=_c().overrideAll;Iae.exports=eat({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:Nc.linecolor,outlinewidth:Nc.linewidth,bordercolor:Nc.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Nc.minor.tickmode,nticks:Nc.nticks,tick0:Nc.tick0,dtick:Nc.dtick,tickvals:Nc.tickvals,ticktext:Nc.ticktext,ticks:Pae({},Nc.ticks,{dflt:""}),ticklabeloverflow:Pae({},Nc.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:Nc.ticklen,tickwidth:Nc.tickwidth,tickcolor:Nc.tickcolor,ticklabelstep:Nc.ticklabelstep,showticklabels:Nc.showticklabels,labelalias:Nc.labelalias,tickfont:zae({}),tickangle:Nc.tickangle,tickformat:Nc.tickformat,tickformatstops:Nc.tickformatstops,tickprefix:Nc.tickprefix,showtickprefix:Nc.showtickprefix,ticksuffix:Nc.ticksuffix,showticksuffix:Nc.showticksuffix,separatethousands:Nc.separatethousands,exponentformat:Nc.exponentformat,minexponent:Nc.minexponent,showexponent:Nc.showexponent,title:{text:{valType:"string"},font:zae({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Xf=Se((pir,Rae)=>{"use strict";var tat=YL(),rat=n3().counter,iat=X1(),Dae=sb().scales,dir=iat(Dae);function KL(e){return"`"+e+"`"}Rae.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"?Dae[r.colorscaleDflt]:null,u=r.editTypeOverride||"",l=t?t+".":"",f,c;"colorAttr"in r?(f=r.colorAttr,c=r.colorAttr):(f={z:"z",c:"color"}[n],c="in "+KL(l+f));var h=i?" Has an effect only if "+c+" is set to a numerical array.":"",d=n+"auto",p=n+"min",x=n+"max",b=n+"mid",y=KL(l+d),k=KL(l+p),E=KL(l+x),A=k+" and "+E,L={};L[p]=L[x]=void 0;var _={};_[d]=!1;var C={};return f==="color"&&(C.color={valType:"color",arrayOk:!0,editType:u||"style"},r.anim&&(C.color.anim=!0)),C[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},C[p]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:_},C[x]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:_},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=tat),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:rat("coloraxis"),dflt:null,editType:"calc"}),C}});var MO=Se((vir,Fae)=>{"use strict";var nat=vu().extendFlat,aat=Xf(),SO=sb().scales;Fae.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:SO.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:SO.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:SO.RdBu,editType:"calc"}},coloraxis:nat({_isSubplotObj:!0,editType:"calc"},aat("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var EO=Se((yir,qae)=>{"use strict";var oat=Zr();qae.exports=function(t){return oat.isPlainObject(t.colorbar)}});var LO=Se(CO=>{"use strict";var kO=_u(),Bae=Zr(),Oae=ju(),sat=Oae.ONEDAY,lat=Oae.ONEWEEK;CO.dtick=function(e,t){var r=t==="log",n=t==="date",i=t==="category",a=n?sat:1;if(!e)return a;if(kO(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.substr(1);return s=kO(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};CO.tick0=function(e,t,r,n){if(t==="date")return Bae.cleanDate(e,Bae.dateTick0(r,n%lat===0?1:0));if(!(n==="D1"||n==="D2"))return kO(e)?Number(e):0}});var xb=Se((gir,Uae)=>{"use strict";var Nae=LO(),uat=Zr().isArrayOrTypedArray,fat=yp().isTypedArraySpec,cat=yp().decodeTypedArraySpec;Uae.exports=function(t,r,n,i,a){a||(a={});var o=a.isMinor,s=o?t.minor||{}:t,u=o?r.minor:r,l=o?"minor.":"";function f(k){var E=s[k];return fat(E)&&(E=cat(E)),E!==void 0?E:(u._template||{})[k]}var c=f("tick0"),h=f("dtick"),d=f("tickvals"),p=uat(d)?"array":h?"linear":"auto",x=n(l+"tickmode",p);if(x==="auto"||x==="sync")n(l+"nticks");else if(x==="linear"){var b=u.dtick=Nae.dtick(h,i);u.tick0=Nae.tick0(c,i,r.calendar,b)}else if(i!=="multicategory"){var y=n(l+"tickvals");y===void 0?u.tickmode="auto":o||n("ticktext")}}});var T3=Se((_ir,Hae)=>{"use strict";var zO=Zr(),Vae=Rd();Hae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,u=a?Vae.minor:Vae,l=a?"minor.":"",f=zO.coerce2(o,s,u,"ticklen",a?(r.ticklen||5)*.6:void 0),c=zO.coerce2(o,s,u,"tickwidth",a?r.tickwidth||1:void 0),h=zO.coerce2(o,s,u,"tickcolor",(a?r.tickcolor:void 0)||s.color),d=n(l+"ticks",!a&&i.outerTicks||f||c||h?"outside":"");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var PO=Se((xir,Gae)=>{"use strict";Gae.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 Jd=Se((bir,Wae)=>{"use strict";var JL=Zr(),hat=_f();Wae.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||"visible",o=r[i],s=JL.isArrayOrTypedArray(t[i])?t[i]:[],u=r[i]=[],l=hat.arrayTemplater(r,i,a),f,c;for(f=0;f<s.length;f++){var h=s[f];JL.isPlainObject(h)?c=l.newItem(h):(c=l.newItem({}),c[a]=!1),c._index=f,c[a]!==!1&&n.handleItemDefaults(h,c,r,n),u.push(c)}var d=l.defaultItems();for(f=0;f<d.length;f++)c=d[f],c._index=u.length,n.handleItemDefaults({},c,r,n,{}),u.push(c);if(JL.isArrayOrTypedArray(o)){var p=Math.min(o.length,u.length);for(f=0;f<p;f++)JL.relinkPrivateKeys(u[f],o[f])}return u}});var e_=Se((wir,Zae)=>{"use strict";var IO=Zr(),dat=Pl().contrast,jae=Rd(),pat=PO(),vat=Jd();Zae.exports=function(t,r,n,i,a){a||(a={});var o=n("labelalias");IO.isPlainObject(o)||delete r.labelalias;var s=pat(t),u=n("showticklabels");if(u){a.noTicklabelshift||n("ticklabelshift"),a.noTicklabelstandoff||n("ticklabelstandoff");var l=a.font||{},f=r.color,c=r.ticklabelposition||"",h=c.indexOf("inside")!==-1?dat(a.bgColor):f&&f!==jae.color.dflt?f:l.color;if(IO.coerceFont(n,"tickfont",l,{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 p=n("tickformat");vat(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:yat}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!p&&i!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}}};function yat(e,t){function r(i,a){return IO.coerce(e,t,jae.tickformatstops,i,a)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var t_=Se((Tir,Xae)=>{"use strict";var mat=PO();Xae.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=mat(t),u=n("tickprefix");u&&n("showtickprefix",s);var l=n("ticksuffix",o);l&&n("showticksuffix",s)}});var DO=Se((Air,Yae)=>{"use strict";var r_=Zr(),gat=_f(),_at=xb(),xat=T3(),bat=e_(),wat=t_(),Tat=YL();Yae.exports=function(t,r,n){var i=gat.newContainer(r,"colorbar"),a=t.colorbar||{};function o(T,F){return r_.coerce(a,i,Tat,T,F)}var s=n.margin||{t:0,b:0,l:0,r:0},u=n.width-s.l-s.r,l=n.height-s.t-s.b,f=o("orientation"),c=f==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(c?u:l):30);var d=o("lenmode");o("len",d==="fraction"?1:c?l:u);var p=o("yref"),x=o("xref"),b=p==="paper",y=x==="paper",k,E,A,L="left";c?(A="middle",L=y?"left":"right",k=y?1.02:1,E=.5):(A=b?"bottom":"top",L="center",k=.5,E=b?1.02:1),r_.coerce(a,i,{x:{valType:"number",min:y?-2:0,max:y?3:1,dflt:k}},"x"),r_.coerce(a,i,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:E}},"y"),o("xanchor",L),o("xpad"),o("yanchor",A),o("ypad"),r_.noneOrAll(a,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var _=r_.coerce(a,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:c?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",_.indexOf("inside")!==-1?"hide past domain":"hide past div"),_at(a,i,o,"linear");var C=n.font,M={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};_.indexOf("inside")!==-1&&(M.bgColor="black"),wat(a,i,o,"linear",M),bat(a,i,o,"linear",M),xat(a,i,o,"linear",M),o("title.text",n._dfltTitle.colorbar);var v=i.showticklabels?i.tickfont:C,z=r_.extendFlat({},C,{family:v.family,size:r_.bigFont(v.size)});r_.coerceFont(o,"title.font",z),o("title.side",c?"top":"right")}});var ed=Se((Sir,$ae)=>{"use strict";var Kae=_u(),FO=Zr(),Aat=EO(),Sat=DO(),Jae=sb().isValid,Mat=Ul().traceIs;function RO(e,t){var r=t.slice(0,t.length-1);return t?FO.nestedProperty(e,r).get()||{}:e}$ae.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,u="_module"in r,l=RO(t,o),f=RO(r,o),c=RO(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,i,a)};if(u){var d=n._colorAxes||{},p=i(o+"coloraxis");if(p){var x=Mat(r,"contour")&&FO.nestedProperty(r,"contours.coloring").get()||"heatmap",b=d[p];b?(b[2].push(h),b[0]!==x&&(b[0]=!1,FO.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[p]=[x,r,[h]];return}}var y=l[s+"min"],k=l[s+"max"],E=Kae(y)&&Kae(k)&&y<k,A=i(o+s+"auto",!E);A?i(o+s+"mid"):(i(o+s+"min"),i(o+s+"max"));var L=l.colorscale,_=c.colorscale,C;if(L!==void 0&&(C=!Jae(L)),_!==void 0&&(C=!Jae(_)),i(o+"autocolorscale",C),i(o+"colorscale"),i(o+"reversescale"),o!=="marker.line."){var M;o&&u&&(M=Aat(l));var v=i(o+"showscale",M);v&&(o&&c&&(f._template=c),Sat(l,f,n))}}});var roe=Se((Mir,toe)=>{"use strict";var Qae=Zr(),Eat=_f(),eoe=MO(),kat=ed();toe.exports=function(t,r){function n(c,h){return Qae.coerce(t,r,eoe,c,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var i=r._colorAxes,a,o;function s(c,h){return Qae.coerce(a,o,eoe.coloraxis,c,h)}for(var u in i){var l=i[u];if(l[0])a=t[u]||{},o=Eat.newContainer(r,u,"coloraxis"),o._name=u,kat(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var f=0;f<l[2].length;f++)l[2][f]();delete r._colorAxes[u]}}}});var noe=Se((Eir,ioe)=>{"use strict";var Cat=Zr(),Lat=Dp().hasColorscale,zat=Dp().extractOpts;ioe.exports=function(t,r){function n(f,c){var h=f["_"+c];h!==void 0&&(f[c]=h)}function i(f,c){var h=c.container?Cat.nestedProperty(f,c.container).get():f;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=zat(h),p=d.auto;(p||d.min===void 0)&&n(h,c.min),(p||d.max===void 0)&&n(h,c.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 u=0;u<s.length;u++)i(o,s[u]);else i(o,s);Lat(o,"marker.line")&&i(o,{container:"marker.line",min:"cmin",max:"cmax"})}for(var l in r._colorAxes)i(r[l],{min:"cmin",max:"cmax"})}});var Rp=Se((kir,ooe)=>{"use strict";var aoe=_u(),qO=Zr(),Pat=Dp().extractOpts;ooe.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?qO.nestedProperty(r,o).get():r,u=Pat(s),l=u.auto!==!1,f=u.min,c=u.max,h=u.mid,d=function(){return qO.aggNums(Math.min,null,a)},p=function(){return qO.aggNums(Math.max,null,a)};if(f===void 0?f=d():l&&(s._colorAx&&aoe(f)?f=Math.min(f,d()):f=d()),c===void 0?c=p():l&&(s._colorAx&&aoe(c)?c=Math.max(c,p()):c=p()),l&&h!==void 0&&(c-h>h-f?f=h-(c-h):c-h<h-f&&(c=h+(h-f))),f===c&&(f-=.5,c+=.5),u._sync("min",f),u._sync("max",c),u.autocolorscale){var x;f*c<0?x=i.colorscale.diverging:f>=0?x=i.colorscale.sequential:x=i.colorscale.sequentialminus,u._sync("colorscale",x)}}});var fc=Se((Cir,soe)=>{"use strict";var $L=sb(),A3=Dp();soe.exports={moduleType:"component",name:"colorscale",attributes:Xf(),layoutAttributes:MO(),supplyLayoutDefaults:roe(),handleDefaults:ed(),crossTraceDefaults:noe(),calc:Rp(),scales:$L.scales,defaultScale:$L.defaultScale,getScale:$L.get,isValidScale:$L.isValid,hasColorscale:A3.hasColorscale,extractOpts:A3.extractOpts,extractScale:A3.extractScale,flipScale:A3.flipScale,makeColorScaleFunc:A3.makeColorScaleFunc,makeColorScaleFuncFromTrace:A3.makeColorScaleFuncFromTrace}});var ec=Se((Lir,uoe)=>{"use strict";var loe=Zr(),Iat=yp().isTypedArraySpec;uoe.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 loe.isPlainObject(t)&&(loe.isArrayOrTypedArray(t.size)||Iat(t.size))}}});var S3=Se((zir,foe)=>{"use strict";var Dat=_u();foe.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 u=o(s/r);return Dat(u)&&u>0?Math.max(u,a):0}}});var rv=Se(mp=>{"use strict";var coe=Zr();mp.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};mp.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(mp.getSubplot(e))!==-1};mp.flat=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=t;return r};mp.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};mp.getDistanceFunction=function(e,t,r,n){return e==="closest"?n||mp.quadrature(t,r):e.charAt(0)==="x"?t:r};mp.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};mp.inbox=function(e,t,r){return e*t<0||e===0?r:1/0};mp.quadrature=function(e,t){return function(r){var n=e(r),i=t(r);return Math.sqrt(n*n+i*i)}};mp.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)),mp.appendArrayPointValue(i,t,n),i};mp.appendArrayPointValue=function(e,t,r){var n=t._arrayAttrs;if(n)for(var i=0;i<n.length;i++){var a=n[i],o=hoe(a);if(e[o]===void 0){var s=coe.nestedProperty(t,a).get(),u=doe(s,r);u!==void 0&&(e[o]=u)}}};mp.appendArrayMultiPointValues=function(e,t,r){var n=t._arrayAttrs;if(n)for(var i=0;i<n.length;i++){var a=n[i],o=hoe(a);if(e[o]===void 0){for(var s=coe.nestedProperty(t,a).get(),u=new Array(r.length),l=0;l<r.length;l++)u[l]=doe(s,r[l]);e[o]=u}}};var Rat={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function hoe(e){return Rat[e]||e}function doe(e,t){if(Array.isArray(t)){if(Array.isArray(e)&&Array.isArray(e[t[0]]))return e[t[0]][t[1]]}else return e[t]}var Fat={x:!0,y:!0},qat={"x unified":!0,"y unified":!0};mp.isUnifiedHover=function(e){return typeof e!="string"?!1:!!qat[e]};mp.isXYhover=function(e){return typeof e!="string"?!1:!!Fat[e]}});var XM=Se((Iir,poe)=>{poe.exports=Oat;var BO={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Bat=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function Oat(e){var t=[];return e.replace(Bat,function(r,n,i){var a=n.toLowerCase();for(i=Uat(i),a=="m"&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a="l",n=n=="m"?"l":"L");;){if(i.length==BO[a])return i.unshift(n),t.push(i);if(i.length<BO[a])throw new Error("malformed path data");t.push([n].concat(i.splice(0,BO[a])))}}),t}var Nat=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function Uat(e){var t=e.match(Nat);return t?t.map(Number):[]}});var boe=Se((Dir,xoe)=>{"use strict";var Vat=XM(),ll=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},Zu="M0,0Z",voe=Math.sqrt(2),i_=Math.sqrt(3),OO=Math.PI,NO=Math.cos,UO=Math.sin;xoe.exports={circle:{n:0,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?Yu(t,r,i):i}},square:{n:1,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*1.3,2);return Yu(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.4,2),i=ll(e*1.2,2);return Yu(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(Xu(t))return Zu;var n=ll(e*.8/voe,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return Yu(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(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M-"+n+","+i+"H"+n+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M-"+n+",-"+i+"H"+n+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M"+i+",-"+n+"V"+n+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M-"+i+",-"+n+"V"+n+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.951,2),i=ll(e*.588,2),a=ll(-e,2),o=ll(e*-.309,2),s=ll(e*.809,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e/2,2),a=ll(e*i_/2,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e/2,2),a=ll(e*i_/2,2);return Yu(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(Xu(t))return Zu;var n=ll(e*.924,2),i=ll(e*.383,2);return Yu(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(Xu(t))return Zu;var n=e*1.4,i=ll(n*.225,2),a=ll(n*.951,2),o=ll(n*.363,2),s=ll(n*.588,2),u=ll(-n,2),l=ll(n*-.309,2),f=ll(n*.118,2),c=ll(n*.809,2),h=ll(n*.382,2);return Yu(t,r,"M"+i+","+l+"H"+a+"L"+o+","+f+"L"+s+","+c+"L0,"+h+"L-"+s+","+c+"L-"+o+","+f+"L-"+a+","+l+"H-"+i+"L0,"+u+"Z")}},hexagram:{n:18,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.66,2),i=ll(e*.38,2),a=ll(e*.76,2);return Yu(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(Xu(t))return Zu;var n=ll(e*i_*.8,2),i=ll(e*.8,2),a=ll(e*1.6,2),o=ll(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*i_*.8,2),i=ll(e*.8,2),a=ll(e*1.6,2),o=ll(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*1.1,2),i=ll(e*2,2),a="A "+i+","+i+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*1.4,2),i=ll(e*1.9,2),a="A "+i+","+i+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*.7,2),i=ll(e*1.4,2);return Yu(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*1.4,2),i=ll(e*.7,2);return Yu(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e/voe,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.3,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.3,2),i=ll(e*.65,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.4,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*.85,2);return Yu(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(Xu(t))return Zu;var n=ll(e/2,2),i=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.4,2);return Yu(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*1.4,2);return Yu(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(t,r,"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(t,r,"M0,0L-"+n+",-"+i+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(t,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(t,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(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(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(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(Xu(t))return Zu;var n=OO/2.5,i=2*e*NO(n),a=2*e*UO(n);return Yu(t,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(Xu(t))return Zu;var n=OO/4,i=2*e*NO(n),a=2*e*UO(n);return Yu(t,r,"M0,0L"+-i+","+a+"A "+2*e+","+2*e+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}};function Xu(e){return e===null}var yoe,moe,goe,_oe;function Yu(e,t,r){if((!e||e%360===0)&&!t)return r;if(goe===e&&_oe===t&&yoe===r)return moe;goe=e,_oe=t,yoe=r;function n(b,y){var k=NO(b),E=UO(b),A=y[0],L=y[1]+(t||0);return[A*k-L*E,A*E+L*k]}for(var i=e/180*OO,a=0,o=0,s=Vat(r),u="",l=0;l<s.length;l++){var f=s[l],c=f[0],h=a,d=o;if(c==="M"||c==="L")a=+f[1],o=+f[2];else if(c==="m"||c==="l")a+=+f[1],o+=+f[2];else if(c==="H")a=+f[1];else if(c==="h")a+=+f[1];else if(c==="V")o=+f[1];else if(c==="v")o+=+f[1];else if(c==="A"){a=+f[1],o=+f[2];var p=n(i,[+f[6],+f[7]]);f[6]=p[0],f[7]=p[1],f[3]=+f[3]+e}(c==="H"||c==="V")&&(c="L"),(c==="h"||c==="v")&&(c="l"),(c==="m"||c==="l")&&(a-=h,o-=d);var x=n(i,[a,o]);(c==="H"||c==="V")&&(c="L"),(c==="M"||c==="L"||c==="m"||c==="l")&&(f[1]=x[0],f[2]=x[1]),f[0]=c,u+=f[0]+f.slice(1).join(",")}return moe=u,u}});var yu=Se((Rir,Uoe)=>{"use strict";var pd=Nl(),rc=Zr(),Hat=rc.numberFormat,Ab=_u(),ZO=cd(),ez=Ul(),$d=Pl(),Gat=fc(),KM=rc.strTranslate,tz=Bf(),Wat=Zv(),jat=Qh(),Zat=jat.LINE_SPACING,zoe=N1().DESELECTDIM,Xat=ec(),Yat=S3(),Kat=rv().appendArrayPointValue,ml=Uoe.exports={};ml.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,u=t.shadow,l=t.lineposition,f=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call($d.fill,a),i&&e.style("font-weight",i),n&&e.style("font-style",n),r&&e.style("font-variant",r),f&&e.style("text-transform",VO($at(f))),u&&e.style("text-shadow",u==="auto"?tz.makeTextShadow($d.contrast(a)):VO(u)),l&&e.style("text-decoration-line",VO(Qat(l)))};function VO(e){return e==="none"?void 0:e}var Jat={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function $at(e){return Jat[e]}function Qat(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}ml.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};ml.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};ml.setRect=function(e,t,r,n,i){e.call(ml.setPosition,t,r).call(ml.setSize,n,i)};ml.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Ab(i)&&Ab(a)&&t.node())t.node().nodeName==="text"?t.attr("x",i).attr("y",a):t.attr("transform",KM(i,a));else return!1;return!0};ml.translatePoints=function(e,t,r){e.each(function(n){var i=pd.select(this);ml.translatePoint(n,i,t,r)})};ml.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")};ml.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,u=ez.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(u).each(function(l){ml.hideOutsideRangePoint(l,pd.select(this),r,n,o,s)})})}};ml.crispRound=function(e,t,r){return!t||!Ab(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};ml.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||"";$d.stroke(t,n||a.color),ml.dashLine(t,s,o)};ml.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||"";pd.select(this).call($d.stroke,r||a.color).call(ml.dashLine,s,o)})};ml.dashLine=function(e,t,r){r=+r||0,t=ml.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};ml.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 Poe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=i&&ml.getPatternAttr(i.shape,0,"");if(o){var s=ml.getPatternAttr(i.bgcolor,0,null),u=ml.getPatternAttr(i.fgcolor,0,null),l=i.fgopacity,f=ml.getPatternAttr(i.size,0,8),c=ml.getPatternAttr(i.solidity,0,.3),h=t.uid;ml.pattern(e,"point",r,h,o,f,c,void 0,i.fillmode,s,u,l)}else if(a&&a.type!=="none"){var d=a.type,p="scatterfill-"+t.uid;if(n&&(p="legendfill-"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var x,b;d==="horizontal"?(x={x:a.start,y:0},b={x:a.stop,y:0}):d==="vertical"&&(x={x:0,y:a.start},b={x:0,y:a.stop}),x.x=t._xA.c2p(x.x===void 0?t._extremes.x.min[0].val:x.x,!0),x.y=t._yA.c2p(x.y===void 0?t._extremes.y.min[0].val:x.y,!0),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.max[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.max[0].val:b.y,!0),e.call(Roe,r,p,"linear",a.colorscale,"fill",x,b,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(ml.gradient,r,p,d,a.colorscale,"fill")}else t.fillcolor&&e.call($d.fill,t.fillcolor)}ml.singleFillStyle=function(e,t){var r=pd.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};Poe(e,i,t,!1)};ml.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var i=pd.select(this);n[0].trace&&Poe(i,n[0].trace,t,r)})};var woe=boe();ml.symbolNames=[];ml.symbolFuncs=[];ml.symbolBackOffs=[];ml.symbolNeedLines={};ml.symbolNoDot={};ml.symbolNoFill={};ml.symbolList=[];Object.keys(woe).forEach(function(e){var t=woe[e],r=t.n;ml.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),ml.symbolNames[r]=e,ml.symbolFuncs[r]=t.f,ml.symbolBackOffs[r]=t.backoff||0,t.needLine&&(ml.symbolNeedLines[r]=!0),t.noDot?ml.symbolNoDot[r]=!0:ml.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(ml.symbolNoFill[r]=!0)});var eot=ml.symbolNames.length,tot="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";ml.symbolNumber=function(e){if(Ab(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=ml.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=eot||e>=400?0:Math.floor(Math.max(e,0))};function Ioe(e,t,r,n){var i=e%100;return ml.symbolFuncs[i](t,r,n)+(e>=200?tot:"")}var Toe=Hat("~f"),Doe={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}};ml.gradient=function(e,t,r,n,i,a){var o=Doe[n];return Roe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function Roe(e,t,r,n,i,a,o,s,u,l){var f=i.length,c;n==="linear"?c={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:u?"userSpaceOnUse":"objectBoundingBox"},reversed:l}:n==="radial"&&(c={node:"radialGradient",reversed:l});for(var h=new Array(f),d=0;d<f;d++)c.reversed?h[f-1-d]=[Toe((1-i[d][0])*100),i[d][1]]:h[d]=[Toe(i[d][0]*100),i[d][1]];var p=t._fullLayout,x="g"+p._uid+"-"+r,b=p._defs.select(".gradients").selectAll("#"+x).data([n+h.join(";")],rc.identity);b.exit().remove(),b.enter().append(c.node).each(function(){var y=pd.select(this);c.attrs&&y.attr(c.attrs),y.attr("id",x);var k=y.selectAll("stop").data(h);k.exit().remove(),k.enter().append("stop"),k.each(function(E){var A=ZO(E[1]);pd.select(this).attr({offset:E[0]+"%","stop-color":$d.tinyRGB(A),"stop-opacity":A.getAlpha()})})}),e.style(a,XO(x,t)).style(a+"-opacity",null),e.classed("gradient_filled",!0)}ml.pattern=function(e,t,r,n,i,a,o,s,u,l,f,c){var h=t==="legend";s&&(u==="overlay"?(l=s,f=$d.contrast(l)):(l=void 0,f=s));var d=r._fullLayout,p="p"+d._uid+"-"+n,x,b,y=function(q,U,H,j,G){return j+(G-j)*(q-U)/(H-U)},k,E,A,L,_={},C=ZO(f),M=$d.tinyRGB(C),v=C.getAlpha(),z=c*v;switch(i){case"/":x=a*Math.sqrt(2),b=a*Math.sqrt(2),k="M-"+x/4+","+b/4+"l"+x/2+",-"+b/2+"M0,"+b+"L"+x+",0M"+x/4*3+","+b/4*5+"l"+x/2+",-"+b/2,E=o*a,L="path",_={d:k,opacity:z,stroke:M,"stroke-width":E+"px"};break;case"\\":x=a*Math.sqrt(2),b=a*Math.sqrt(2),k="M"+x/4*3+",-"+b/4+"l"+x/2+","+b/2+"M0,0L"+x+","+b+"M-"+x/4+","+b/4*3+"l"+x/2+","+b/2,E=o*a,L="path",_={d:k,opacity:z,stroke:M,"stroke-width":E+"px"};break;case"x":x=a*Math.sqrt(2),b=a*Math.sqrt(2),k="M-"+x/4+","+b/4+"l"+x/2+",-"+b/2+"M0,"+b+"L"+x+",0M"+x/4*3+","+b/4*5+"l"+x/2+",-"+b/2+"M"+x/4*3+",-"+b/4+"l"+x/2+","+b/2+"M0,0L"+x+","+b+"M-"+x/4+","+b/4*3+"l"+x/2+","+b/2,E=a-a*Math.sqrt(1-o),L="path",_={d:k,opacity:z,stroke:M,"stroke-width":E+"px"};break;case"|":x=a,b=a,L="path",k="M"+x/2+",0L"+x/2+","+b,E=o*a,L="path",_={d:k,opacity:z,stroke:M,"stroke-width":E+"px"};break;case"-":x=a,b=a,L="path",k="M0,"+b/2+"L"+x+","+b/2,E=o*a,L="path",_={d:k,opacity:z,stroke:M,"stroke-width":E+"px"};break;case"+":x=a,b=a,L="path",k="M"+x/2+",0L"+x/2+","+b+"M0,"+b/2+"L"+x+","+b/2,E=a-a*Math.sqrt(1-o),L="path",_={d:k,opacity:z,stroke:M,"stroke-width":E+"px"};break;case".":x=a,b=a,o<Math.PI/4?A=Math.sqrt(o*a*a/Math.PI):A=y(o,Math.PI/4,1,a/2,a/Math.sqrt(2)),L="circle",_={cx:x/2,cy:b/2,r:A,opacity:z,fill:M};break}var T=[i||"noSh",l||"noBg",f||"noFg",a,o].join(";"),F=d._defs.select(".patterns").selectAll("#"+p).data([T],rc.identity);F.exit().remove(),F.enter().append("pattern").each(function(){var q=pd.select(this);if(q.attr({id:p,width:x+"px",height:b+"px",patternUnits:"userSpaceOnUse",patternTransform:h?"scale(0.8)":""}),l){var U=ZO(l),H=$d.tinyRGB(U),j=U.getAlpha(),G=q.selectAll("rect").data([0]);G.exit().remove(),G.enter().append("rect").attr({width:x+"px",height:b+"px",fill:H,"fill-opacity":j})}var O=q.selectAll(L).data([0]);O.exit().remove(),O.enter().append(L).attr(_)}),e.style("fill",XO(p,r)).style("fill-opacity",null),e.classed("pattern_filled",!0)};ml.initGradients=function(e){var t=e._fullLayout,r=rc.ensureSingle(t._defs,"g","gradients");r.selectAll("linearGradient,radialGradient").remove(),pd.select(e).selectAll(".gradient_filled").classed("gradient_filled",!1)};ml.initPatterns=function(e){var t=e._fullLayout,r=rc.ensureSingle(t._defs,"g","patterns");r.selectAll("pattern").remove(),pd.select(e).selectAll(".pattern_filled").classed("pattern_filled",!1)};ml.getPatternAttr=function(e,t,r){return e&&rc.isArrayOrTypedArray(e)?t<e.length?e[t]:r:e};ml.pointStyle=function(e,t,r,n){if(e.size()){var i=ml.makePointStyleFns(t);e.each(function(a){ml.singlePointStyle(a,pd.select(this),t,i,r,n)})}};ml.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 u;e.ms==="various"||o.size==="various"?u=3:u=n.ms2mrc(e.ms),e.mrc=u,n.selectedSizeFn&&(u=e.mrc=n.selectedSizeFn(e));var l=ml.symbolNumber(e.mx||o.symbol)||0;e.om=l%200>=100;var f=KO(e,r),c=YO(e,r);t.attr("d",Ioe(l,u,f,c))}var h=!1,d,p,x;if(e.so)x=s.outlierwidth,p=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;x=(e.mlw+1||b+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=n.lineScale(e.mlc):rc.isArrayOrTypedArray(s.color)?p=$d.defaultLine:p=s.color,rc.isArrayOrTypedArray(o.color)&&(d=$d.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))}if(e.om)t.call($d.stroke,d).style({"stroke-width":(x||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:x)+"px");var y=o.gradient,k=e.mgt;k?h=!0:k=y&&y.type,rc.isArrayOrTypedArray(k)&&(k=k[0],Doe[k]||(k=0));var E=o.pattern,A=E&&ml.getPatternAttr(E.shape,e.i,"");if(k&&k!=="none"){var L=e.mgc;L?h=!0:L=y.color;var _=r.uid;h&&(_+="-"+e.i),ml.gradient(t,i,_,k,[[0,L],[1,d]],"fill")}else if(A){var C=!1,M=E.fgcolor;!M&&a&&a.color&&(M=a.color,C=!0);var v=ml.getPatternAttr(M,e.i,a&&a.color||null),z=ml.getPatternAttr(E.bgcolor,e.i,null),T=E.fgopacity,F=ml.getPatternAttr(E.size,e.i,8),q=ml.getPatternAttr(E.solidity,e.i,.3);C=C||e.mcc||rc.isArrayOrTypedArray(E.shape)||rc.isArrayOrTypedArray(E.bgcolor)||rc.isArrayOrTypedArray(E.fgcolor)||rc.isArrayOrTypedArray(E.size)||rc.isArrayOrTypedArray(E.solidity);var U=r.uid;C&&(U+="-"+e.i),ml.pattern(t,"point",i,U,A,F,q,e.mcc,E.fillmode,z,v,T)}else rc.isArrayOrTypedArray(d)?$d.fill(t,d[e.i]):$d.fill(t,d);x&&$d.stroke(t,p)}};ml.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=ml.tryColorscale(r,""),t.lineScale=ml.tryColorscale(r,"line"),ez.traceIs(e,"symbols")&&(t.ms2mrc=Xat.isBubble(e)?Yat(e):function(){return(r.size||6)/2}),e.selectedpoints&&rc.extendFlat(t,ml.makeSelectedPointStyleFns(e)),t};ml.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,u=a.opacity,l=o.opacity,f=u!==void 0,c=l!==void 0;(rc.isArrayOrTypedArray(s)||f||c)&&(t.selectedOpacityFn=function(A){var L=A.mo===void 0?i.opacity:A.mo;return A.selected?f?u:L:c?l:zoe*L});var h=i.color,d=a.color,p=o.color;(d||p)&&(t.selectedColorFn=function(A){var L=A.mcc||h;return A.selected?d||L:p||L});var x=i.size,b=a.size,y=o.size,k=b!==void 0,E=y!==void 0;return ez.traceIs(e,"symbols")&&(k||E)&&(t.selectedSizeFn=function(A){var L=A.mrc||x/2;return A.selected?k?b/2:L:E?y/2:L}),t};ml.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,u=a.color,l=o.color;return t.selectedTextColorFn=function(f){var c=f.tc||s;return f.selected?u||c:l||(u?c:$d.addOpacity(c,zoe))},t};ml.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ml.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){$d.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(a,o){var s=o.mx||n.symbol||0,u=r.selectedSizeFn(o);a.attr("d",Ioe(ml.symbolNumber(s),u,KO(o,t),YO(o,t))),o.mrc2=u}),i.length&&e.each(function(a){for(var o=pd.select(this),s=0;s<i.length;s++)i[s](o,a)})}};ml.tryColorscale=function(e,t){var r=t?rc.nestedProperty(e,t).get():e;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&rc.isArrayOrTypedArray(n))return Gat.makeColorScaleFuncFromTrace(r)}return rc.identity};var HO={start:1,end:-1,middle:0,bottom:1,top:-1};function Foe(e,t,r,n,i){var a=pd.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",u=n?n/.8+1:0,l=(tz.lineCount(e)-1)*Zat+1,f=HO[s]*u,c=r*.75+HO[o]*u+(HO[o]-1)*l*r/2;e.attr("text-anchor",s),i||a.attr("transform",KM(f,c))}function qoe(e,t){var r=e.ts||t.textfont.size;return Ab(r)&&r>0?r:0}ml.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=ml.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var u=pd.select(this),l=a?rc.extractOption(s,t,"txt","texttemplate"):rc.extractOption(s,t,"tx","text");if(!l&&l!==0){u.remove();return}if(a){var f=t._module.formatLabels,c=f?f(s,t,o):{},h={};Kat(h,t,s.i);var d=t._meta||{};l=rc.texttemplateString(l,c,o._d3locale,h,s,d)}var p=s.tp||t.textposition,x=qoe(s,t),b=n?n(s):s.tc||t.textfont.color;u.call(ml.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:x,color:b}).text(l).call(tz.convertToTspans,r).call(Foe,p,x,s.mrc)})}};ml.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ml.makeSelectedTextStyleFns(t);e.each(function(n){var i=pd.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=qoe(n,t);$d.fill(i,a);var u=ez.traceIs(t,"bar-like");Foe(i,o,s,n.mrc2||n.mrc,u)})}};var Aoe=.5;ml.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(QL(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};ml.smoothclosed=function(e,t){if(e.length<3)return"M"+e.join("L")+"Z";var r="M"+e[0],n=e.length-1,i=[QL(e[n],e[0],e[1],t)],a;for(a=1;a<n;a++)i.push(QL(e[a-1],e[a],e[a+1],t));for(i.push(QL(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 Boe,Ooe;function M3(e,t,r){return r&&(e=Noe(e)),t?Tb(e[1]):wb(e[0])}function wb(e){var t=pd.round(e,2);return Boe=t,t}function Tb(e){var t=pd.round(e,2);return Ooe=t,t}function QL(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],u=Math.pow(i*i+a*a,Aoe/2),l=Math.pow(o*o+s*s,Aoe/2),f=(l*l*i-u*u*o)*n,c=(l*l*a-u*u*s)*n,h=3*l*(u+l),d=3*u*(u+l);return[[wb(t[0]+(h&&f/h)),Tb(t[1]+(h&&c/h))],[wb(t[0]-(d&&f/d)),Tb(t[1]-(d&&c/d))]]}var rot={hv:function(e,t,r){return"H"+wb(t[0])+"V"+M3(t,1,r)},vh:function(e,t,r){return"V"+Tb(t[1])+"H"+M3(t,0,r)},hvh:function(e,t,r){return"H"+wb((e[0]+t[0])/2)+"V"+Tb(t[1])+"H"+M3(t,0,r)},vhv:function(e,t,r){return"V"+Tb((e[1]+t[1])/2)+"H"+wb(t[0])+"V"+M3(t,1,r)}},iot=function(e,t,r){return"L"+M3(t,0,r)+","+M3(t,1,r)};ml.steps=function(e){var t=rot[e]||iot;return function(r){for(var n="M"+wb(r[0][0])+","+Tb(r[0][1]),i=r.length,a=1;a<i;a++)n+=t(r[a-1],r[a],a===i-1);return n}};function Noe(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=rc.isArrayOrTypedArray(r),s=e,u=t?t[0]:Boe||0,l=t?t[1]:Ooe||0,f=s[0],c=s[1],h=f-u,d=c-l,p=Math.atan2(d,h),x=o?r[a]:r;if(x==="auto"){var b=s.i;n.type==="scatter"&&b--;var y=s.marker,k=y.symbol;rc.isArrayOrTypedArray(k)&&(k=k[b]);var E=y.size;rc.isArrayOrTypedArray(E)&&(E=E[b]),x=y?ml.symbolBackOffs[ml.symbolNumber(k)]*E:0,x+=ml.getMarkerStandoff(i[b],n)||0}var A=f-x*Math.cos(p),L=c-x*Math.sin(p);(A<=f&&A>=u||A>=f&&A<=u)&&(L<=c&&L>=l||L>=c&&L<=l)&&(e=[A,L])}return e}ml.applyBackoff=Noe;ml.makeTester=function(){var e=rc.ensureSingleById(pd.select("body"),"svg","js-plotly-tester",function(r){r.attr(Wat.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=rc.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});ml.tester=e,ml.testref=t};ml.savedBBoxes={};var GO=0,not=1e4;ml.bBox=function(e,t,r){r||(r=Soe(e));var n;if(r){if(n=ml.savedBBoxes[r],n)return rc.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=Soe(i),r){var a=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,s=i.getAttribute("transform");if(!s){var u=ml.bBox(i,!1,r);return a&&(u.left+=a,u.right+=a),o&&(u.top+=o,u.bottom+=o),u}if(r+="~"+a+"~"+o+"~"+s,n=ml.savedBBoxes[r],n)return rc.extendFlat({},n)}}var l,f;t?l=e:(f=ml.tester.node(),l=e.cloneNode(!0),f.appendChild(l)),pd.select(l).attr("transform",null).call(tz.positionText,0,0);var c=l.getBoundingClientRect(),h=ml.testref.node().getBoundingClientRect();t||f.removeChild(l);var d={height:c.height,width:c.width,left:c.left-h.left,top:c.top-h.top,right:c.right-h.left,bottom:c.bottom-h.top};return GO>=not&&(ml.savedBBoxes={},GO=0),r&&(ml.savedBBoxes[r]=d),GO++,rc.extendFlat({},d)};function Soe(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}ml.setClipUrl=function(e,t,r){e.attr("clip-path",XO(t,r))};function XO(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}ml.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}};ml.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+=KM(t,r),o=o.trim(),e[a]("transform",o),o};ml.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}};ml.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 aot=/\s*sc.*/;ml.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(aot,"");i+=n,i=i.trim(),this.setAttribute("transform",i)})}};var oot=/translate\([^)]*\)\s*$/;ml.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=pd.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),u=(i.attr("transform")||"").match(oot);t===1&&r===1?n=[]:n=[KM(o,s),"scale("+t+","+r+")",KM(-o,-s)],u&&n.push(u),i.attr("transform",n.join(""))}})};function YO(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}ml.getMarkerStandoff=YO;var YM=Math.atan2,bb=Math.cos,E3=Math.sin;function Moe(e,t){var r=t[0],n=t[1];return[r*bb(e)-n*E3(e),r*E3(e)+n*bb(e)]}var Eoe,koe,Coe,Loe,WO,jO;function KO(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||rc.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,u=t._yA;if(s&&u)n=s.c2p(e.x),i=u.c2p(e.y);else return 90}if(t._geo){var l=e.lonlat[0],f=e.lonlat[1],c=t._geo.project([l,f+1e-5]),h=t._geo.project([l+1e-5,f]),d=YM(h[1]-i,h[0]-n),p=YM(c[1]-i,c[0]-n),x;if(a==="north")x=r/180*Math.PI;else if(a==="previous"){var b=l/180*Math.PI,y=f/180*Math.PI,k=Eoe/180*Math.PI,E=koe/180*Math.PI,A=k-b,L=bb(E)*E3(A),_=E3(E)*bb(y)-bb(E)*E3(y)*bb(A);x=-YM(L,_)-Math.PI,Eoe=l,koe=f}var C=Moe(d,[bb(x),0]),M=Moe(p,[E3(x),0]);r=YM(C[1]+M[1],C[0]+M[0])/Math.PI*180,a==="previous"&&!(jO===t.uid&&e.i===WO+1)&&(r=null)}if(a==="previous"&&!t._geo)if(jO===t.uid&&e.i===WO+1&&Ab(n)&&Ab(i)){var v=n-Coe,z=i-Loe,T=t.line&&t.line.shape||"",F=T.slice(T.length-1);F==="h"&&(z=0),F==="v"&&(v=0),r+=YM(z,v)/Math.PI*180+90}else r=null}return Coe=n,Loe=i,WO=e.i,jO=t.uid,r}ml.getMarkerAngle=KO});var Mb=Se((Fir,Woe)=>{"use strict";var k3=Nl(),sot=_u(),lot=Ac(),JO=Ul(),Sb=Zr(),Voe=Sb.strTranslate,rz=yu(),iz=Pl(),C3=Bf(),Hoe=N1(),uot=Qh().OPPOSITE_SIDE,Goe=/ [XY][0-9]* /,$O=1.6,QO=1.6;function fot(e,t,r){var n=e._fullLayout,i=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,u=r.avoid||{},l=r.attributes,f=r.transform,c=r.containerGroup,h=1,d=i.title,p=(d&&d.text?d.text:"").trim(),x=!1,b=d&&d.font?d.font:{},y=b.family,k=b.size,E=b.color,A=b.weight,L=b.style,_=b.variant,C=b.textcase,M=b.lineposition,v=b.shadow,z=r.subtitlePropName,T=!!z,F=r.subtitlePlaceholder,q=(i.title||{}).subtitle||{text:"",font:{}},U=q.text.trim(),H=!1,j=1,G=q.font,O=G.family,W=G.size,re=G.color,ne=G.weight,be=G.style,ze=G.variant,Ce=G.textcase,he=G.lineposition,te=G.shadow,ke;a==="title.text"?ke="titleText":a.indexOf("axis")!==-1?ke="axisTitleText":a.indexOf("colorbar"!==-1)&&(ke="colorbarTitleText");var Ee=e._context.edits[ke];function Me(xt,_t){return xt===void 0||_t===void 0?!1:xt.replace(Goe," % ")===_t.replace(Goe," % ")}p===""?h=0:Me(p,o)&&(Ee||(p=""),h=.2,x=!0),T&&(U===""?j=0:Me(U,F)&&(Ee||(U=""),j=.2,H=!0)),r._meta?p=Sb.templateString(p,r._meta):n._meta&&(p=Sb.templateString(p,n._meta));var Oe=p||U||Ee,Re;c||(c=Sb.ensureSingle(n._infolayer,"g","g-"+t),Re=n._hColorbarMoveTitle);var me=c.selectAll("text."+t).data(Oe?[0]:[]);me.enter().append("text"),me.text(p).attr("class",t),me.exit().remove();var Be=null,fe=t+"-subtitle",Ze=U||Ee;if(T&&Ze&&(Be=c.selectAll("text."+fe).data(Ze?[0]:[]),Be.enter().append("text"),Be.text(U).attr("class",fe),Be.exit().remove()),!Oe)return c;function et(xt,_t){Sb.syncOrAsync([gt,Pt],{title:xt,subtitle:_t})}function gt(xt){var _t=xt.title,Ct=xt.subtitle,jt;!f&&Re&&(f={}),f?(jt="",f.rotate&&(jt+="rotate("+[f.rotate,l.x,l.y]+")"),(f.offset||Re)&&(jt+=Voe(0,(f.offset||0)-(Re||0)))):jt=null,_t.attr("transform",jt);function At(je){if(je){var tt=k3.select(je.node().parentNode).select("."+fe);if(!tt.empty()){var Je=je.node().getBBox();if(Je.height){var Mt=Je.y+Je.height+$O*W;tt.attr("y",Mt)}}}}if(_t.style("opacity",h*iz.opacity(E)).call(rz.font,{color:iz.rgb(E),size:k3.round(k,2),family:y,weight:A,style:L,variant:_,textcase:C,shadow:v,lineposition:M}).attr(l).call(C3.convertToTspans,e,At),Ct){var Te=c.select("."+t+"-math-group"),nt=_t.node().getBBox(),ut=Te.node()?Te.node().getBBox():void 0,ct=ut?ut.y+ut.height+$O*W:nt.y+nt.height+QO*W,rt=Sb.extendFlat({},l,{y:ct});Ct.attr("transform",jt),Ct.style("opacity",j*iz.opacity(re)).call(rz.font,{color:iz.rgb(re),size:k3.round(W,2),family:O,weight:ne,style:be,variant:ze,textcase:Ce,shadow:te,lineposition:he}).attr(rt).call(C3.convertToTspans,e)}return lot.previousPromises(e)}function Pt(xt){var _t=xt.title,Ct=k3.select(_t.node().parentNode);if(u&&u.selection&&u.side&&p){Ct.attr("transform",null);var jt=uot[u.side],At=u.side==="left"||u.side==="top"?-1:1,Te=sot(u.pad)?u.pad:2,nt=rz.bBox(Ct.node()),ut={t:0,b:0,l:0,r:0},ct=e._fullLayout._reservedMargin;for(var rt in ct)for(var je in ct[rt]){var tt=ct[rt][je];ut[je]=Math.max(ut[je],tt)}var Je={left:ut.l,top:ut.t,right:n.width-ut.r,bottom:n.height-ut.b},Mt=u.maxShift||At*(Je[u.side]-nt[u.side]),Vt=0;if(Mt<0)Vt=Mt;else{var Kt=u.offsetLeft||0,ir=u.offsetTop||0;nt.left-=Kt,nt.right-=Kt,nt.top-=ir,nt.bottom-=ir,u.selection.each(function(){var Ot=rz.bBox(this);Sb.bBoxIntersect(nt,Ot,Te)&&(Vt=Math.max(Vt,At*(Ot[u.side]-nt[jt])+Te))}),Vt=Math.min(Mt,Vt),i._titleScoot=Math.abs(Vt)}if(Vt>0||Mt<0){var fr={left:[-Vt,0],right:[Vt,0],top:[0,-Vt],bottom:[0,Vt]}[u.side];Ct.attr("transform",Voe(fr[0],fr[1]))}}}me.call(et,Be);function Qe(xt,_t){xt.text(_t).on("mouseover.opacity",function(){k3.select(this).transition().duration(Hoe.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){k3.select(this).transition().duration(Hoe.HIDE_PLACEHOLDER).style("opacity",0)})}if(Ee&&(p?me.on(".opacity",null):(Qe(me,o),x=!0),me.call(C3.makeEditable,{gd:e}).on("edit",function(xt){s!==void 0?JO.call("_guiRestyle",e,a,xt,s):JO.call("_guiRelayout",e,a,xt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(et)}).on("input",function(xt){this.text(xt||" ").call(C3.positionText,l.x,l.y)}),T)){if(T&&!p){var Xe=me.node().getBBox(),Tt=Xe.y+Xe.height+QO*W;Be.attr("y",Tt)}U?Be.on(".opacity",null):(Qe(Be,F),H=!0),Be.call(C3.makeEditable,{gd:e}).on("edit",function(xt){JO.call("_guiRelayout",e,"title.subtitle.text",xt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(et)}).on("input",function(xt){this.text(xt||" ").call(C3.positionText,Be.attr("x"),Be.attr("y"))})}return me.classed("js-placeholder",x),Be&&Be.classed("js-placeholder",H),c}Woe.exports={draw:fot,SUBTITLE_PADDING_EM:QO,SUBTITLE_PADDING_MATHJAX_EM:$O}});var gm=Se((qir,Koe)=>{"use strict";var cot=Nl(),hot=e3().utcFormat,xc=Zr(),dot=xc.numberFormat,ym=_u(),n_=xc.cleanNumber,pot=xc.ms2DateTime,joe=xc.dateTime2ms,mm=xc.ensureNumber,Zoe=xc.isArrayOrTypedArray,a_=ju(),nz=a_.FP_SAFE,by=a_.BADNUM,vot=a_.LOG_CLIP,yot=a_.ONEWEEK,az=a_.ONEDAY,oz=a_.ONEHOUR,Xoe=a_.ONEMIN,Yoe=a_.ONESEC,sz=$c(),fz=dd(),lz=fz.HOUR_PATTERN,uz=fz.WEEKDAY_PATTERN;function JM(e){return Math.pow(10,e)}function eN(e){return e!=null}Koe.exports=function(t,r){r=r||{};var n=t._id||"x",i=n.charAt(0);function a(A,L){if(A>0)return Math.log(A)/Math.LN10;if(A<=0&&L&&t.range&&t.range.length===2){var _=t.range[0],C=t.range[1];return .5*(_+C-2*vot*Math.abs(_-C))}else return by}function o(A,L,_,C){if((C||{}).msUTC&&ym(A))return+A;var M=joe(A,_||t.calendar);if(M===by)if(ym(A)){A=+A;var v=Math.floor(xc.mod(A+.05,1)*10),z=Math.round(A-v/10);M=joe(new Date(z))+v/10}else return by;return M}function s(A,L,_){return pot(A,L,_||t.calendar)}function u(A){return t._categories[Math.round(A)]}function l(A){if(eN(A)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[A]!==void 0)return t._categoriesMap[A];t._categories.push(typeof A=="number"?String(A):A);var L=t._categories.length-1;return t._categoriesMap[A]=L,L}return by}function f(A,L){for(var _=new Array(L),C=0;C<L;C++){var M=(A[0]||[])[C],v=(A[1]||[])[C];_[C]=c([M,v])}return _}function c(A){if(t._categoriesMap)return t._categoriesMap[A]}function h(A){var L=c(A);if(L!==void 0)return L;if(ym(A))return+A}function d(A){return ym(A)?+A:c(A)}function p(A,L,_){return cot.round(_+L*A,2)}function x(A,L,_){return(A-_)/L}var b=function(L){return ym(L)?p(L,t._m,t._b):by},y=function(A){return x(A,t._m,t._b)};if(t.rangebreaks){var k=i==="y";b=function(A){if(!ym(A))return by;var L=t._rangebreaks.length;if(!L)return p(A,t._m,t._b);var _=k;t.range[0]>t.range[1]&&(_=!_);for(var C=_?-1:1,M=C*A,v=0,z=0;z<L;z++){var T=C*t._rangebreaks[z].min,F=C*t._rangebreaks[z].max;if(M<T)break;if(M>F)v=z+1;else{v=M<(T+F)/2?z:z+1;break}}var q=t._B[v]||0;return isFinite(q)?p(A,t._m2,q):0},y=function(A){var L=t._rangebreaks.length;if(!L)return x(A,t._m,t._b);for(var _=0,C=0;C<L&&!(A<t._rangebreaks[C].pmin);C++)A>t._rangebreaks[C].pmax&&(_=C+1);return x(A,t._m2,t._B[_])}}t.c2l=t.type==="log"?a:mm,t.l2c=t.type==="log"?JM:mm,t.l2p=b,t.p2l=y,t.c2p=t.type==="log"?function(A,L){return b(a(A,L))}:b,t.p2c=t.type==="log"?function(A){return JM(y(A))}:y,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=n_,t.c2d=t.c2r=t.l2d=t.l2r=mm,t.d2p=t.r2p=function(A){return t.l2p(n_(A))},t.p2d=t.p2r=y,t.cleanPos=mm):t.type==="log"?(t.d2r=t.d2l=function(A,L){return a(n_(A),L)},t.r2d=t.r2c=function(A){return JM(n_(A))},t.d2c=t.r2l=n_,t.c2d=t.l2r=mm,t.c2r=a,t.l2d=JM,t.d2p=function(A,L){return t.l2p(t.d2r(A,L))},t.p2d=function(A){return JM(y(A))},t.r2p=function(A){return t.l2p(n_(A))},t.p2r=y,t.cleanPos=mm):t.type==="date"?(t.d2r=t.r2d=xc.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(A,L,_){return t.l2p(o(A,0,_))},t.p2d=t.p2r=function(A,L,_){return s(y(A),L,_)},t.cleanPos=function(A){return xc.cleanDate(A,by,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=l,t.r2d=t.c2d=t.l2d=u,t.d2r=t.d2l_noadd=h,t.r2c=function(A){var L=d(A);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=mm,t.r2l=d,t.d2p=function(A){return t.l2p(t.r2c(A))},t.p2d=function(A){return u(y(A))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(A){return typeof A=="string"&&A!==""?A:mm(A)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=u,t.d2r=t.d2l_noadd=h,t.r2c=function(A){var L=h(A);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=c,t.l2r=t.c2r=mm,t.r2l=h,t.d2p=function(A){return t.l2p(t.r2c(A))},t.p2d=function(A){return u(y(A))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(A){return Array.isArray(A)||typeof A=="string"&&A!==""?A:mm(A)},t.setupMultiCategory=function(A){var L=t._traceIndices,_,C,M=t._matchGroup;if(M&&t._categories.length===0){for(var v in M)if(v!==n){var z=r[sz.id2name(v)];L=L.concat(z._traceIndices)}}var T=[[0,{}],[0,{}]],F=[];for(_=0;_<L.length;_++){var q=A[L[_]];if(i in q){var U=q[i],H=q._length||xc.minRowLength(U);if(Zoe(U[0])&&Zoe(U[1]))for(C=0;C<H;C++){var j=U[0][C],G=U[1][C];eN(j)&&eN(G)&&(F.push([j,G]),j in T[0][1]||(T[0][1][j]=T[0][0]++),G in T[1][1]||(T[1][1][G]=T[1][0]++))}}}for(F.sort(function(O,W){var re=T[0][1],ne=re[O[0]]-re[W[0]];if(ne)return ne;var be=T[1][1];return be[O[1]]-be[W[1]]}),_=0;_<F.length;_++)l(F[_])}),t.fraction2r=function(A){var L=t.r2l(t.range[0]),_=t.r2l(t.range[1]);return t.l2r(L+A*(_-L))},t.r2fraction=function(A){var L=t.r2l(t.range[0]),_=t.r2l(t.range[1]);return(t.r2l(A)-L)/(_-L)},t.limitRange=function(A){var L=t.minallowed,_=t.maxallowed;if(!(L===void 0&&_===void 0)){A||(A="range");var C=xc.nestedProperty(t,A).get(),M=xc.simpleMap(C,t.r2l),v=M[1]<M[0];v&&M.reverse();var z=xc.simpleMap([L,_],t.r2l);if(L!==void 0&&M[0]<z[0]&&(C[v?1:0]=L),_!==void 0&&M[1]>z[1]&&(C[v?0:1]=_),C[0]===C[1]){var T=t.l2r(L),F=t.l2r(_);if(L!==void 0){var q=T+1;_!==void 0&&(q=Math.min(q,F)),C[v?1:0]=q}if(_!==void 0){var U=F+1;L!==void 0&&(U=Math.max(U,T)),C[v?0:1]=U}}}},t.cleanRange=function(A,L){t._cleanRange(A,L),t.limitRange(A)},t._cleanRange=function(A,L){L||(L={}),A||(A="range");var _=xc.nestedProperty(t,A).get(),C,M;if(t.type==="date"?M=xc.dfltRange(t.calendar):i==="y"?M=fz.DFLTRANGEY:t._name==="realaxis"?M=[0,1]:M=L.dfltRange||fz.DFLTRANGEX,M=M.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(M[0]=0),!_||_.length!==2){xc.nestedProperty(t,A).set(M);return}var v=_[0]===null,z=_[1]===null;for(t.type==="date"&&!t.autorange&&(_[0]=xc.cleanDate(_[0],by,t.calendar),_[1]=xc.cleanDate(_[1],by,t.calendar)),C=0;C<2;C++)if(t.type==="date"){if(!xc.isDateTime(_[C],t.calendar)){t[A]=M;break}if(t.r2l(_[0])===t.r2l(_[1])){var T=xc.constrain(t.r2l(_[0]),xc.MIN_MS+1e3,xc.MAX_MS-1e3);_[0]=t.l2r(T-1e3),_[1]=t.l2r(T+1e3);break}}else{if(!ym(_[C]))if(!(v||z)&&ym(_[1-C]))_[C]=_[1-C]*(C?10:.1);else{t[A]=M;break}if(_[C]<-nz?_[C]=-nz:_[C]>nz&&(_[C]=nz),_[0]===_[1]){var F=Math.max(1,Math.abs(_[0]*1e-6));_[0]-=F,_[1]+=F}}},t.setScale=function(A){var L=r._size;if(t.overlaying){var _=sz.getFromId({_fullLayout:r},t.overlaying);t.domain=_.domain}var C=A&&t._r?"_r":"range",M=t.calendar;t.cleanRange(C);var v=t.r2l(t[C][0],M),z=t.r2l(t[C][1],M),T=i==="y";if(T?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(v-z),t._b=-t._m*z):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(z-v),t._b=-t._m*v),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var F,q;if(t._rangebreaks=t.locateBreaks(Math.min(v,z),Math.max(v,z)),t._rangebreaks.length){for(F=0;F<t._rangebreaks.length;F++)q=t._rangebreaks[F],t._lBreaks+=Math.abs(q.max-q.min);var U=T;v>z&&(U=!U),U&&t._rangebreaks.reverse();var H=U?-1:1;for(t._m2=H*t._length/(Math.abs(z-v)-t._lBreaks),t._B.push(-t._m2*(T?z:v)),F=0;F<t._rangebreaks.length;F++)q=t._rangebreaks[F],t._B.push(t._B[t._B.length-1]-H*t._m2*(q.max-q.min));for(F=0;F<t._rangebreaks.length;F++)q=t._rangebreaks[F],q.pmin=b(q.min),q.pmax=b(q.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(A){var L=t.rangebreaks||[],_,C,M,v,z;L._cachedPatterns||(L._cachedPatterns=L.map(function(re){return re.enabled&&re.bounds?xc.simpleMap(re.bounds,re.pattern?n_:t.d2c):null})),L._cachedValues||(L._cachedValues=L.map(function(re){return re.enabled&&re.values?xc.simpleMap(re.values,t.d2c).sort(xc.sorterAsc):null}));for(var T=0;T<L.length;T++){var F=L[T];if(F.enabled){if(F.bounds){var q=F.pattern;switch(_=L._cachedPatterns[T],C=_[0],M=_[1],q){case uz:z=new Date(A),v=z.getUTCDay(),C>M&&(M+=7,v<C&&(v+=7));break;case lz:z=new Date(A);var U=z.getUTCHours(),H=z.getUTCMinutes(),j=z.getUTCSeconds(),G=z.getUTCMilliseconds();v=U+(H/60+j/3600+G/36e5),C>M&&(M+=24,v<C&&(v+=24));break;case"":v=A;break}if(v>=C&&v<M)return by}else for(var O=L._cachedValues[T],W=0;W<O.length;W++)if(C=O[W],M=C+F.dvalue,A>=C&&A<M)return by}}return A},t.locateBreaks=function(A,L){var _,C,M,v,z=[];if(!t.rangebreaks)return z;var T=t.rangebreaks.slice().sort(function(be,ze){return be.pattern===uz&&ze.pattern===lz?-1:ze.pattern===uz&&be.pattern===lz?1:0}),F=function(be,ze){if(be=xc.constrain(be,A,L),ze=xc.constrain(ze,A,L),be!==ze){for(var Ce=!0,he=0;he<z.length;he++){var te=z[he];be<te.max&&ze>=te.min&&(be<te.min&&(te.min=be),ze>te.max&&(te.max=ze),Ce=!1)}Ce&&z.push({min:be,max:ze})}};for(_=0;_<T.length;_++){var q=T[_];if(q.enabled)if(q.bounds){var U=A,H=L;q.pattern&&(U=Math.floor(U)),C=xc.simpleMap(q.bounds,q.pattern?n_:t.r2l),M=C[0],v=C[1];var j=new Date(U),G,O;switch(q.pattern){case uz:O=yot,G=((v<M?7:0)+(v-M))*az,U+=M*az-(j.getUTCDay()*az+j.getUTCHours()*oz+j.getUTCMinutes()*Xoe+j.getUTCSeconds()*Yoe+j.getUTCMilliseconds());break;case lz:O=az,G=((v<M?24:0)+(v-M))*oz,U+=M*oz-(j.getUTCHours()*oz+j.getUTCMinutes()*Xoe+j.getUTCSeconds()*Yoe+j.getUTCMilliseconds());break;default:U=Math.min(C[0],C[1]),H=Math.max(C[0],C[1]),O=H-U,G=O}for(var W=U;W<H;W+=O)F(W,W+G)}else for(var re=xc.simpleMap(q.values,t.d2c),ne=0;ne<re.length;ne++)M=re[ne],v=M+q.dvalue,F(M,v)}return z.sort(function(be,ze){return be.min-ze.min}),z},t.makeCalcdata=function(A,L,_){var C,M,v,z,T=t.type,F=T==="date"&&A[L+"calendar"];if(L in A){if(C=A[L],z=A._length||xc.minRowLength(C),xc.isTypedArray(C)&&(T==="linear"||T==="log")){if(z===C.length)return C;if(C.subarray)return C.subarray(0,z)}if(T==="multicategory")return f(C,z);for(M=new Array(z),v=0;v<z;v++)M[v]=t.d2c(C[v],0,F,_)}else{var q=L+"0"in A?t.d2c(A[L+"0"],0,F):0,U=A["d"+L]?Number(A["d"+L]):1;for(C=A[{x:"y",y:"x"}[L]],z=A._length||C.length,M=new Array(z),v=0;v<z;v++)M[v]=q+v*U}if(t.rangebreaks)for(v=0;v<z;v++)M[v]=t.maskBreaks(M[v]);return M},t.isValidRange=function(A,L){return Array.isArray(A)&&A.length===2&&(L&&A[0]===null||ym(t.r2l(A[0])))&&(L&&A[1]===null||ym(t.r2l(A[1])))},t.getAutorangeDflt=function(A,L){var _=!t.isValidRange(A,"nullOk");return _&&L&&L.reverseDflt?_="reversed":A&&(A[0]===null&&A[1]===null?_=!0:A[0]===null&&A[1]!==null?_="min":A[0]!==null&&A[1]===null&&(_="max")),_},t.isReversed=function(){var A=t.autorange;return A==="reversed"||A==="min reversed"||A==="max reversed"},t.isPtWithinRange=function(A,L){var _=t.c2l(A[i],null,L),C=t.r2l(t.range[0]),M=t.r2l(t.range[1]);return C<M?C<=_&&_<=M:M<=_&&_<=C},t._emptyCategories=function(){t._categories=[],t._categoriesMap={}},t.clearCalc=function(){var A=t._matchGroup;if(A){var L=null,_=null;for(var C in A){var M=r[sz.id2name(C)];if(M._categories){L=M._categories,_=M._categoriesMap;break}}L&&_?(t._categories=L,t._categoriesMap=_):t._emptyCategories()}else t._emptyCategories();if(t._initialCategories)for(var v=0;v<t._initialCategories.length;v++)l(t._initialCategories[v])},t.sortByInitialCategories=function(){var A=[];if(t._emptyCategories(),t._initialCategories)for(var L=0;L<t._initialCategories.length;L++)l(t._initialCategories[L]);A=A.concat(t._traceIndices);var _=t._matchGroup;for(var C in _)if(n!==C){var M=r[sz.id2name(C)];M._categories=t._categories,M._categoriesMap=t._categoriesMap,A=A.concat(M._traceIndices)}return A};var E=r._d3locale;t.type==="date"&&(t._dateFormat=E?E.timeFormat:hot,t._extraFormat=r._extraFormat),t._separators=r.separators,t._numFormat=E?E.numberFormat:dot,delete t._minDtick,delete t._forceTick0}});var L3=Se((Bir,ese)=>{"use strict";var Joe=_u(),tN=Zr(),mot=ju().BADNUM,cz=tN.isArrayOrTypedArray,got=tN.isDateTime,_ot=tN.cleanNumber,$oe=Math.round;ese.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(cz(i)&&!i.length)return"-";if(!a&&Aot(i))return"multicategory";if(a&&Array.isArray(i[0])){for(var o=[],s=0;s<i.length;s++)if(cz(i[s]))for(var u=0;u<i[s].length;u++)o.push(i[s][u]);i=o}if(wot(i,r))return"date";var l=n.autotypenumbers!=="strict";return Tot(i,l)?"category":bot(i,l)?"linear":"-"};function xot(e,t){return t?Joe(e):typeof e=="number"}function bot(e,t){for(var r=e.length,n=0;n<r;n++)if(xot(e[n],t))return!0;return!1}function wot(e,t){for(var r=e.length,n=Qoe(r),i=0,a=0,o={},s=0;s<r;s+=n){var u=$oe(s),l=e[u],f=String(l);o[f]||(o[f]=1,got(l,t)&&i++,Joe(l)&&a++)}return i>a*2}function Qoe(e){return Math.max(1,(e-1)/1e3)}function Tot(e,t){for(var r=e.length,n=Qoe(r),i=0,a=0,o={},s=0;s<r;s+=n){var u=$oe(s),l=e[u],f=String(l);if(!o[f]){o[f]=1;var c=typeof l;c==="boolean"?a++:(t?_ot(l)!==mot:c==="number")?i++:c==="string"&&a++}}return a>i*2}function Aot(e){return cz(e[0])&&cz(e[1])}});var wy=Se((Oir,lse)=>{"use strict";var Sot=Nl(),nse=_u(),o_=Zr(),hz=ju().FP_SAFE,Mot=Ul(),Eot=yu(),ase=$c(),kot=ase.getFromId,Cot=ase.isLinked;lse.exports={applyAutorangeOptions:sse,getAutoRange:rN,makePadFn:iN,doAutoRange:zot,findExtremes:Pot,concatExtremes:oN};function rN(e,t){var r,n,i=[],a=e._fullLayout,o=iN(a,t,0),s=iN(a,t,1),u=oN(e,t),l=u.min,f=u.max;if(l.length===0||f.length===0)return o_.simpleMap(t.range,t.r2l);var c=l[0].val,h=f[0].val;for(r=1;r<l.length&&c===h;r++)c=Math.min(c,l[r].val);for(r=1;r<f.length&&c===h;r++)h=Math.max(h,f[r].val);var d=t.autorange,p=d==="reversed"||d==="min reversed"||d==="max reversed";if(!p&&t.range){var x=o_.simpleMap(t.range,t.r2l);p=x[1]<x[0]}t.autorange==="reversed"&&(t.autorange=!0);var b=t.rangemode,y=b==="tozero",k=b==="nonnegative",E=t._length,A=E/10,L=0,_,C,M,v,z,T;for(r=0;r<l.length;r++)for(_=l[r],n=0;n<f.length;n++)C=f[n],T=C.val-_.val-tse(t,_.val,C.val),T>0&&(z=E-o(_)-s(C),z>A?T/z>L&&(M=_,v=C,L=T/z):T/E>L&&(M={val:_.val,nopad:1},v={val:C.val,nopad:1},L=T/E));function F(G,O){return Math.max(G,s(O))}if(c===h){var q=c-1,U=c+1;if(y)if(c===0)i=[0,1];else{var H=(c>0?f:l).reduce(F,0),j=c/(1-Math.min(.5,H/E));i=c>0?[0,j]:[j,0]}else k?i=[Math.max(0,q),Math.max(1,U)]:i=[q,U]}else y?(M.val>=0&&(M={val:0,nopad:1}),v.val<=0&&(v={val:0,nopad:1})):k&&(M.val-L*o(M)<0&&(M={val:0,nopad:1}),v.val<=0&&(v={val:1,nopad:1})),L=(v.val-M.val-tse(t,_.val,C.val))/(E-o(M)-s(v)),i=[M.val-L*o(M),v.val+L*s(v)];return i=sse(i,t),t.limitRange&&t.limitRange(),p&&i.reverse(),o_.simpleMap(i,t.l2r||Number)}function tse(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 iN(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=o_.simpleMap(t.range,t.r2l);a=o[1]<o[0]}a&&(r=!r)}var s=0;return Cot(e,t._id)||(s=Lot(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(l){return l.nopad?0:l.pad+(l.extrapad?n:s)}}var rse=3;function Lot(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 u=o_.deg2rad(s._tickAngles[s._id+"tick"]||0),l=Math.abs(Math.cos(u)),f=Math.abs(Math.sin(u));if(!s._vals[0].bb){var c=s._id+"tick",h=s._selections[c];h.each(function(k){var E=Sot.select(this),A=E.select(".text-math-group");A.empty()&&(k.bb=Eot.bBox(E.node()))})}for(var d=0;d<s._vals.length;d++){var p=s._vals[d],x=p.bb;if(x){var b=2*rse+x.width,y=2*rse+x.height;n=Math.max(n,i?Math.max(b*l,y*f):Math.max(y*l,b*f))}}}s.ticks==="inside"&&s.ticklabelposition==="inside"&&(n+=s.ticklen||0)}}}return n}function oN(e,t,r){var n=t._id,i=e._fullData,a=e._fullLayout,o=[],s=[],u,l,f;function c(b,y){for(u=0;u<y.length;u++){var k=b[y[u]],E=(k._extremes||{})[n];if(k.visible===!0&&E){for(l=0;l<E.min.length;l++)f=E.min[l],nN(o,f.val,f.pad,{extrapad:f.extrapad});for(l=0;l<E.max.length;l++)f=E.max[l],aN(s,f.val,f.pad,{extrapad:f.extrapad})}}}if(c(i,t._traceIndices),c(a.annotations||[],t._annIndices||[]),c(a.shapes||[],t._shapeIndices||[]),t._matchGroup&&!r){for(var h in t._matchGroup)if(h!==t._id){var d=kot(e,h),p=oN(e,d,!0),x=t._length/d._length;for(l=0;l<p.min.length;l++)f=p.min[l],nN(o,f.val,f.pad*x,{extrapad:f.extrapad});for(l=0;l<p.max.length;l++)f=p.max[l],aN(s,f.val,f.pad*x,{extrapad:f.extrapad})}}return{min:o,max:s}}function zot(e,t,r){if(t.setScale(),t.autorange){t.range=r?r.slice():rN(e,t),t._r=t.range.slice(),t._rl=o_.simpleMap(t._r,t.r2l);var n=t._input,i={};i[t._attr+".range"]=t.range,i[t._attr+".autorange"]=t.autorange,Mot.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=rN(e,t)),a._input.rangeslider[t._name]=o_.extendFlat({},o)}}function Pot(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==="-"),u=e.type==="log",l=!1,f=r.vpadLinearized||!1,c,h,d,p,x,b,y,k,E;function A(F){if(Array.isArray(F))return l=!0,function(U){return Math.max(Number(F[U]||0),0)};var q=Math.max(Number(F||0),0);return function(){return q}}var L=A((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),_=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=A(r.vpadplus||r.vpad),M=A(r.vpadminus||r.vpad);if(!l){if(k=1/0,E=-1/0,u)for(c=0;c<a;c++)h=t[c],h<k&&h>0&&(k=h),h>E&&h<hz&&(E=h);else for(c=0;c<a;c++)h=t[c],h<k&&h>-hz&&(k=h),h>E&&h<hz&&(E=h);t=[k,E],a=2}var v={tozero:s,extrapad:o};function z(F){d=t[F],nse(d)&&(b=L(F),y=_(F),f?(p=e.c2l(d)-M(F),x=e.c2l(d)+C(F)):(k=d-M(F),E=d+C(F),u&&k<E/10&&(k=E/10),p=e.c2l(k),x=e.c2l(E)),s&&(p=Math.min(0,p),x=Math.max(0,x)),ise(p)&&nN(n,p,y,v),ise(x)&&aN(i,x,b,v))}var T=Math.min(6,a);for(c=0;c<T;c++)z(c);for(c=a-1;c>=T;c--)z(c);return{min:n,max:i,opts:r}}function nN(e,t,r,n){ose(e,t,r,n,Iot)}function aN(e,t,r,n){ose(e,t,r,n,Dot)}function ose(e,t,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,u=0;u<e.length&&s;u++){var l=e[u];if(i(l.val,t)&&l.pad>=r&&(l.extrapad||!o)){s=!1;break}else i(t,l.val)&&l.pad<=r&&(o||!l.extrapad)&&(e.splice(u,1),u--)}if(s){var f=a&&t===0;e.push({val:t,pad:f?0:r,extrapad:f?!1:o})}}function ise(e){return nse(e)&&Math.abs(e)<hz}function Iot(e,t){return e<=t}function Dot(e,t){return e>=t}function Rot(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&dz(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&dz(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function Fot(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&dz(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&dz(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function dz(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t<r):!0}function sse(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);o_.isArrayOrTypedArray(i)||(i=[i]);for(var s=0;s<i.length;s++){var u=t.d2l(i[s]);a>=u&&(a=u,r=u),o<=u&&(o=u,n=u)}}return r=Rot(r,t),n=Fot(n,t),[r,n]}});var hu=Se((Nir,Lse)=>{"use strict";var w0=Nl(),Rh=_u(),z3=Ac(),QM=Ul(),zu=Zr(),P3=zu.strTranslate,Eb=Bf(),qot=Mb(),e5=Pl(),Xv=yu(),Bot=Rd(),use=LO(),Qd=ju(),Oot=Qd.ONEMAXYEAR,yz=Qd.ONEAVGYEAR,mz=Qd.ONEMINYEAR,Not=Qd.ONEMAXQUARTER,fN=Qd.ONEAVGQUARTER,gz=Qd.ONEMINQUARTER,Uot=Qd.ONEMAXMONTH,I3=Qd.ONEAVGMONTH,_z=Qd.ONEMINMONTH,Yv=Qd.ONEWEEK,Fp=Qd.ONEDAY,s_=Fp/2,xm=Qd.ONEHOUR,t5=Qd.ONEMIN,xz=Qd.ONESEC,Vot=Qd.ONEMILLI,Hot=Qd.ONEMICROSEC,kb=Qd.MINUS_SIGN,Tz=Qd.BADNUM,cN={K:"zeroline"},hN={K:"gridline",L:"path"},dN={K:"minor-gridline",L:"path"},xse={K:"tick",L:"path"},fse={K:"tick",L:"text"},cse={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Az=Qh(),$M=Az.MID_SHIFT,Cb=Az.CAP_SHIFT,r5=Az.LINE_SPACING,Got=Az.OPPOSITE_SIDE,bz=3,Is=Lse.exports={};Is.setConvert=gm();var Wot=L3(),Ag=$c(),jot=Ag.idSort,Zot=Ag.isLinked;Is.id2name=Ag.id2name;Is.name2id=Ag.name2id;Is.cleanId=Ag.cleanId;Is.list=Ag.list;Is.listIds=Ag.listIds;Is.getFromId=Ag.getFromId;Is.getFromTrace=Ag.getFromTrace;var bse=wy();Is.getAutoRange=bse.getAutoRange;Is.findExtremes=bse.findExtremes;var Xot=1e-4;function mN(e){var t=(e[1]-e[0])*Xot;return[e[0]-t,e[1]+t]}Is.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],u=n+"ref",l={};return i||(i=s[0]||(typeof a=="string"?a:a[0])),a||(a=i),s=s.concat(s.map(function(f){return f+" domain"})),l[u]={valType:"enumerated",values:s.concat(a?typeof a=="string"?[a]:a:[]),dflt:i},zu.coerce(e,t,l,u)};Is.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};Is.coercePosition=function(e,t,r,n,i,a){var o,s,u=Is.getRefType(n);if(u!=="range")o=zu.ensureNumber,s=r(i,a);else{var l=Is.getFromId(t,n);a=l.fraction2r(a),s=r(i,a),o=l.cleanPos}e[i]=o(s)};Is.cleanPosition=function(e,t,r){var n=r==="paper"||r==="pixel"?zu.ensureNumber:Is.getFromId(t,r).cleanPos;return n(e)};Is.redrawComponents=function(e,t){t=t||Is.listIds(e);var r=e._fullLayout;function n(i,a,o,s){for(var u=QM.getComponentMethod(i,a),l={},f=0;f<t.length;f++)for(var c=r[Is.id2name(t[f])],h=c[o],d=0;d<h.length;d++){var p=h[d];if(!l[p]&&(u(e,p),l[p]=1,s))return}}n("annotations","drawOne","_annIndices"),n("shapes","drawOne","_shapeIndices"),n("images","draw","_imgIndices",!0),n("selections","drawOne","_selectionIndices")};var Yot=Is.getDataConversions=function(e,t,r,n){var i,a=r==="x"||r==="y"||r==="z"?r:n;if(zu.isArrayOrTypedArray(a)){if(i={type:Wot(n,void 0,{autotypenumbers:e._fullLayout.autotypenumbers}),_categories:[]},Is.setConvert(i),i.type==="category")for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=Is.getFromTrace(e,t,a);return i?{d2c:i.d2c,c2d:i.c2d}:a==="ids"?{d2c:dse,c2d:dse}:{d2c:hse,c2d:hse}};function hse(e){return+e}function dse(e){return String(e)}Is.getDataToCoordFunc=function(e,t,r,n){return Yot(e,t,r,n).d2c};Is.counterLetter=function(e){var t=e.charAt(0);if(t==="x")return"y";if(t==="y")return"x"};Is.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))};Is.saveRangeInitial=function(e,t){for(var r=Is.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,u=a.autorange;(o&&u!==!0||t&&s)&&(a._rangeInitial0=u==="min"||u==="max reversed"?void 0:a.range[0],a._rangeInitial1=u==="max"||u==="min reversed"?void 0:a.range[1],a._autorangeInitial=u,n=!0)}return n};Is.saveShowSpikeInitial=function(e,t){for(var r=Is.list(e,"",!0),n=!1,i="on",a=0;a<r.length;a++){var o=r[a],s=o._showSpikeInitial===void 0,u=s||o.showspikes!==o._showspikes;(s||t&&u)&&(o._showSpikeInitial=o.showspikes,n=!0),i==="on"&&!o.showspikes&&(i="off")}return e._fullLayout._cartesianSpikesEnabled=i,n};Is.autoBin=function(e,t,r,n,i,a){var o=zu.aggNums(Math.min,null,e),s=zu.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 u;if(t.type==="log"?u={type:"linear",range:[o,s]}:u={type:t.type,range:zu.simpleMap([o,s],t.c2r,0,i),calendar:i},Is.setConvert(u),a=a&&use.dtick(a,u.type),a)u.dtick=a,u.tick0=use.tick0(void 0,u.type,i);else{var l;if(r)l=(s-o)/r;else{var f=zu.distinctVals(e),c=Math.pow(10,Math.floor(Math.log(f.minDiff)/Math.LN10)),h=c*zu.roundUp(f.minDiff/c,[.9,1.9,4.9,9.9],!0);l=Math.max(h,2*zu.stdev(e)/Math.pow(e.length,n?.25:.4)),Rh(l)||(l=1)}Is.autoTicks(u,l)}var d=u.dtick,p=Is.tickIncrement(Is.tickFirst(u),d,"reverse",i),x,b;if(typeof d=="number")p=Kot(p,e,u,o,s),b=1+Math.floor((s-p)/d),x=p+b*d;else for(u.dtick.charAt(0)==="M"&&(p=Jot(p,e,d,o,i)),x=p,b=0;x<=s;)x=Is.tickIncrement(x,d,!1,i),b++;return{start:t.c2r(p,0,i),end:t.c2r(x,0,i),size:d,_dataSpan:s-o}};function Kot(e,t,r,n,i){var a=0,o=0,s=0,u=0;function l(d){return(1+(d-e)*100/r.dtick)%100<2}for(var f=0;f<t.length;f++)t[f]%1===0?s++:Rh(t[f])||u++,l(t[f])&&a++,l(t[f]+r.dtick/2)&&o++;var c=t.length-u;if(s===c&&r.type!=="date")r.dtick<1?e=n-.5*r.dtick:(e-=.5,e+r.dtick<n&&(e+=r.dtick));else if(o<c*.1&&(a>c*.3||l(n)||l(i))){var h=r.dtick/2;e+=e+h<n?h:-h}return e}function Jot(e,t,r,n,i){var a=zu.findExactDates(t,i),o=.8;if(a.exactDays>o){var s=Number(r.substr(1));a.exactYears>o&&s%12===0?e=Is.tickIncrement(e,"M6","reverse")+Fp*1.5:a.exactMonths>o?e=Is.tickIncrement(e,"M1","reverse")+Fp*15.5:e-=s_;var u=Is.tickIncrement(e,r);if(u<=n)return u}return e}Is.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n=t.dtick&&Rh(t._tmin),i;if(n){var a=Is.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=zu.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=zu.simpleMap(i,t.l2r),e._isMinor=!0,Is.prepTicks(e,r),n){var s=Rh(t.dtick),u=Rh(e.dtick),l=s?t.dtick:+t.dtick.substring(1),f=u?e.dtick:+e.dtick.substring(1);s&&u?sN(l,f)?l===2*Yv&&f===2*Fp&&(e.dtick=Yv):l===2*Yv&&f===3*Fp?e.dtick=Yv:l===Yv&&!(t._input.minor||{}).nticks?e.dtick=Fp:pse(l/f,2.5)?e.dtick=l/2:e.dtick=l:String(t.dtick).charAt(0)==="M"?u?e.dtick="M1":sN(l,f)?l>=12&&f===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?sN(l,f)||(e.dtick=pse(l/f,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 sN(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function pse(e,t){return Math.abs(e/t-1)<.001}Is.prepTicks=function(e,t){var r=zu.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?zu.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)==="y"?40:80,n=zu.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,Is.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"&&$ot(e),e.tick0||(e.tick0=e.type==="date"?"2000-01-01":0),e.type==="date"&&e.dtick<.1&&(e.dtick=.1),Sse(e)};function lN(e){return+e.substring(1)}function $ot(e){var t;function r(){return!(Rh(e.dtick)||e.dtick.charAt(0)!=="M")}var n=r(),i=Is.getTickFormat(e);if(i){var a=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=xm,a&&!n&&e.dtick<xm&&(e.dtick=xm)):/%p/.test(i)?(t=s_,a&&!n&&e.dtick<s_&&(e.dtick=s_)):/%[Aadejuwx]/.test(i)?(t=Fp,a&&!n&&e.dtick<Fp&&(e.dtick=Fp)):/%[UVW]/.test(i)?(t=Yv,a&&!n&&e.dtick<Yv&&(e.dtick=Yv)):/%[Bbm]/.test(i)?(t=I3,a&&(n?lN(e.dtick)<1:e.dtick<_z)&&(e.dtick="M1")):/%[q]/.test(i)?(t=fN,a&&(n?lN(e.dtick)<3:e.dtick<gz)&&(e.dtick="M3")):/%[Yy]/.test(i)&&(t=yz,a&&(n?lN(e.dtick)<12:e.dtick<mz)&&(e.dtick="M12")))}n=r(),n&&e.tick0===e._dowTick0&&(e.tick0=e._rawTick0),e._definedDelta=t}function Qot(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,u=e[o].value,l=Math.abs(u-s),f=r||l,c=0;f>=mz?l>=mz&&l<=Oot?c=l:c=yz:r===fN&&f>=gz?l>=gz&&l<=Not?c=l:c=fN:f>=_z?l>=_z&&l<=Uot?c=l:c=I3:r===Yv&&f>=Yv?c=Yv:f>=Fp?c=Fp:r===s_&&f>=s_?c=s_:r===xm&&f>=xm&&(c=xm);var h;c>=l&&(c=l,h=!0);var d=i+c;if(t.rangebreaks&&c>0){for(var p=84,x=0,b=0;b<p;b++){var y=(b+.5)/p;t.maskBreaks(i*(1-y)+y*d)!==Tz&&x++}c*=x/p,c||(e[n].drop=!0),h&&l>Yv&&(c=l)}(c>0||n===0)&&(e[n].periodX=i+c/2)}}Is.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],u=!t.ticklabelindex||zu.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],l=zu.simpleMap(t.range,t.r2l,void 0,void 0,r),f=l[1]<l[0],c=Math.min(l[0],l[1]),h=Math.max(l[0],l[1]),d=Math.max(1e3,t._length||0),p=[],x=[],b=[],y=[],k=[],E=t.minor&&(t.minor.ticks||t.minor.showgrid),A=1;A>=(E?0:1);A--){var L=!A;A?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var _=A?t:zu.extendFlat({},t,t.minor);if(L?Is.prepMinorTicks(_,t,r):Is.prepTicks(_,r),_.tickmode==="array"){A?(b=[],p=vse(t,!L)):(y=[],x=vse(t,!L));continue}if(_.tickmode==="sync"){b=[],p=est(t);continue}var C=mN(l),M=C[0],v=C[1],z=Rh(_.dtick),T=n==="log"&&!(z||_.dtick.charAt(0)==="L"),F=Is.tickFirst(_,r);if(A){if(t._tmin=F,F<M!==f)break;(n==="category"||n==="multicategory")&&(v=f?Math.max(-.5,v):Math.min(t._categories.length-.5,v))}var q=null,U=F,H;if(A){var j;z?j=t.dtick:n==="date"?typeof t.dtick=="string"&&t.dtick.charAt(0)==="M"&&(j=I3*t.dtick.substring(1)):j=t._roughDTick,H=Math.round((t.r2l(U)-t.r2l(t.tick0))/j)-1}var G=_.dtick;for(_.rangebreaks&&_._tick0Init!==_.tick0&&(U=uN(U,t),f||(U=Is.tickIncrement(U,G,!f,i))),A&&o&&(U=Is.tickIncrement(U,G,!f,i),H--);f?U>=v:U<=v;U=Is.tickIncrement(U,G,f,i)){if(A&&H++,_.rangebreaks&&!f){if(U<M)continue;if(_.maskBreaks(U)===Tz&&uN(U,_)>=h)break}if(b.length>d||U===q)break;q=U;var O={value:U};A?(T&&U!==(U|0)&&(O.simpleLabel=!0),a>1&&H%a&&(O.skipLabel=!0),b.push(O)):(O.minor=!0,y.push(O))}}if(!y||y.length<2)u=!1;else{var W=(y[1].value-y[0].value)*(s?-1:1);Ast(W,t.tickformat)||(u=!1)}if(!u)k=b;else{var re=b.concat(y);o&&b.length&&(re=re.slice(1)),re=re.sort(function(Tt,xt){return Tt.value-xt.value}).filter(function(Tt,xt,_t){return xt===0||Tt.value!==_t[xt-1].value});var ne=re.map(function(Tt,xt){return Tt.minor===void 0&&!Tt.skipLabel?xt:null}).filter(function(Tt){return Tt!==null});ne.forEach(function(Tt){u.map(function(xt){var _t=Tt+xt;_t>=0&&_t<re.length&&zu.pushUnique(k,re[_t])})})}if(E){var be=t.minor.ticks==="inside"&&t.ticks==="outside"||t.minor.ticks==="outside"&&t.ticks==="inside";if(!be){for(var ze=b.map(function(Tt){return Tt.value}),Ce=[],he=0;he<y.length;he++){var te=y[he],ke=te.value;if(ze.indexOf(ke)===-1){for(var Ee=!1,Me=0;!Ee&&Me<b.length;Me++)1e7+b[Me].value===1e7+ke&&(Ee=!0);Ee||Ce.push(te)}}y=Ce}}o&&Qot(k,t,t._definedDelta);var Oe;if(t.rangebreaks){var Re=t._id.charAt(0)==="y",me=1;t.tickmode==="auto"&&(me=t.tickfont?t.tickfont.size:12);var Be=NaN;for(Oe=b.length-1;Oe>-1;Oe--){if(b[Oe].drop){b.splice(Oe,1);continue}b[Oe].value=uN(b[Oe].value,t);var fe=t.c2p(b[Oe].value);(Re?Be>fe-me:Be<fe+me)?b.splice(f?Oe+1:Oe,1):Be=fe}}xN(t)&&Math.abs(l[1]-l[0])===360&&b.pop(),t._tmax=(b[b.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;var Ze,et=function(Tt){Tt.text="",t._prevDateHead=Ze};b=b.concat(y);function gt(Tt,xt){var _t=Is.tickText(Tt,xt.value,!1,xt.simpleLabel),Ct=xt.periodX;return Ct!==void 0&&(_t.periodX=Ct,(Ct>h||Ct<c)&&(Ct>h&&(_t.periodX=h),Ct<c&&(_t.periodX=c),et(_t))),_t}var Pt;for(Oe=0;Oe<b.length;Oe++){var Qe=b[Oe].minor,Xe=b[Oe].value;Qe?(u&&k.indexOf(b[Oe])!==-1?Pt=gt(t,b[Oe]):Pt={x:Xe},Pt.minor=!0,x.push(Pt)):(Ze=t._prevDateHead,Pt=gt(t,b[Oe]),(b[Oe].skipLabel||u&&k.indexOf(b[Oe])===-1)&&et(Pt),p.push(Pt))}return p=p.concat(x),t._inCalcTicks=!1,o&&p.length&&(p[0].noTick=!0),p};function wse(e,t){return e.rangebreaks&&(t=t.filter(function(r){return e.maskBreaks(r.x)!==Tz})),t}function est(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=Is.tickText(e,a);t._vals[n].minor&&(o.minor=!0,o.text=""),r.push(o)}}return r=wse(e,r),r}function vse(e,t){var r=zu.simpleMap(e.range,e.r2l),n=mN(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=[],u=0;u<=1;u++)if(!(t!==void 0&&(t&&u||t===!1&&!u))&&!(u&&!e.minor)){var l=u?e.minor.tickvals:e.tickvals,f=u?[]:e.ticktext;if(l){zu.isArrayOrTypedArray(f)||(f=[]);for(var c=0;c<l.length;c++){var h=o(l[c]);if(h>i&&h<a){var d=Is.tickText(e,h,!1,String(f[c]));u&&(d.minor=!0,d.text=""),s.push(d)}}}}return s=wse(e,s),s}var pz=[2,5,10],yse=[1,2,3,6,12],mse=[1,2,5,10,15,30],tst=[1,2,3,7,14],Tse=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Ase=[-.301,0,.301,.699,1],rst=[15,30,45,90,180];function _m(e,t,r){return t*zu.roundUp(e/t,r)}Is.autoTicks=function(e,t,r){var n;function i(c){return Math.pow(c,Math.floor(Math.log(t)/Math.LN10))}if(e.type==="date"){e.tick0=zu.dateTick0(e.calendar,0);var a=2*t;if(a>yz)t/=yz,n=i(10),e.dtick="M"+12*_m(t,n,pz);else if(a>I3)t/=I3,e.dtick="M"+_m(t,1,yse);else if(a>Fp){if(e.dtick=_m(t,Fp,e._hasDayOfWeekBreaks?[1,2,7,14]:tst),!r){var o=Is.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=zu.dateTick0(e.calendar,2):e.tick0=zu.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>xm?e.dtick=_m(t,xm,yse):a>t5?e.dtick=_m(t,t5,mse):a>xz?e.dtick=_m(t,xz,mse):(n=i(10),e.dtick=_m(t,n,pz))}else if(e.type==="log"){e.tick0=0;var u=zu.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var l=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/l,n=i(10),e.dtick="L"+_m(t,n,pz)}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))):xN(e)?(e.tick0=0,n=1,e.dtick=_m(t,n,rst)):(e.tick0=0,n=i(10),e.dtick=_m(t,n,pz));if(e.dtick===0&&(e.dtick=1),!Rh(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function Sse(e){var t=e.dtick;if(e._tickexponent=0,!Rh(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.substr(5)!=="01-01"?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=Fp&&i<=10||t>=Fp*15)e._tickround="d";else if(t>=t5&&i<=16||t>=xm)e._tickround="M";else if(t>=xz&&i<=19||t>=t5)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(Rh(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);Rh(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),u=Math.floor(Math.log(s)/Math.LN10+.01),l=e.minexponent===void 0?3:e.minexponent;Math.abs(u)>l&&(wz(e.exponentformat)&&!gN(u)?e._tickexponent=3*Math.round((u-1)/3):e._tickexponent=u)}else e._tickround=null}Is.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(Rh(t))return zu.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.substr(1));if(a==="M")return zu.incrementMonth(e,o,n);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?Ase:Tse,u=e+i*.01,l=zu.roundUp(zu.mod(u,1),s,r);return Math.floor(u)+Math.log(w0.round(Math.pow(10,l),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Is.tickFirst=function(e,t){var r=e.r2l||Number,n=zu.simpleMap(e.range,r,void 0,void 0,t),i=n[1]<n[0],a=i?Math.floor:Math.ceil,o=mN(n)[0],s=e.dtick,u=r(e.tick0);if(Rh(s)){var l=a((o-u)/s)*s+u;return(e.type==="category"||e.type==="multicategory")&&(l=zu.constrain(l,0,e._categories.length-1)),l}var f=s.charAt(0),c=Number(s.substr(1));if(f==="M"){for(var h=0,d=u,p,x,b;h<10;){if(p=Is.tickIncrement(d,s,i,e.calendar),(p-o)*(d-o)<=0)return i?Math.min(d,p):Math.max(d,p);x=(o-(d+p)/2)/(p-d),b=f+(Math.abs(Math.round(x))||1)*c,d=Is.tickIncrement(d,b,x<0?!i:i,e.calendar),h++}return zu.error("tickFirst did not converge",e),d}else{if(f==="L")return Math.log(a((Math.pow(10,o)-u)/c)*c+u)/Math.LN10;if(f==="D"){var y=s==="D2"?Ase:Tse,k=zu.roundUp(zu.mod(o,1),y,i);return Math.floor(o)+Math.log(w0.round(Math.pow(10,k),1))/Math.LN10}else throw"unrecognized dtick "+String(s)}};Is.tickText=function(e,t,r,n){var i=Mse(e,t),a=e.tickmode==="array",o=r||a,s=e.type,u=s==="category"?e.d2l_noadd:e.d2l,l,f=function(b){var y=e.l2p(b);return y>=0&&y<=e._length?b:null};if(a&&zu.isArrayOrTypedArray(e.ticktext)){var c=zu.simpleMap(e.range,e.r2l),h=(Math.abs(c[1]-c[0])-(e._lBreaks||0))/1e4;for(l=0;l<e.ticktext.length&&!(Math.abs(t-u(e.tickvals[l]))<h);l++);if(l<e.ticktext.length)return i.text=String(e.ticktext[l]),i.xbnd=[f(i.x-.5),f(i.x+e.dtick-.5)],i}function d(b){if(b===void 0)return!0;if(r)return b==="none";var y={first:e._tmin,last:e._tmax}[b];return b!=="all"&&t!==y}var p=r?"never":e.exponentformat!=="none"&&d(e.showexponent)?"hide":"";if(s==="date"?ist(e,i,r,o):s==="log"?nst(e,i,r,o,p):s==="category"?ast(e,i):s==="multicategory"?ost(e,i,r):xN(e)?lst(e,i,r,o,p):sst(e,i,r,o,p),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 x=e.labelalias[i.text];typeof x=="string"&&(i.text=x)}return(e.tickson==="boundaries"||e.showdividers)&&(i.xbnd=[f(i.x-.5),f(i.x+e.dtick-.5)]),i};Is.hoverLabelText=function(e,t,r){r&&(e=zu.extendFlat({},e,{hoverformat:r}));var n=zu.isArrayOrTypedArray(t)?t[0]:t,i=zu.isArrayOrTypedArray(t)?t[1]:void 0;if(i!==void 0&&i!==n)return Is.hoverLabelText(e,n,r)+" - "+Is.hoverLabelText(e,i,r);var a=e.type==="log"&&n<=0,o=Is.tickText(e,e.c2l(a?-n:n),"hover").text;return a?n===0?"0":kb+o:o};function Mse(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 ist(e,t,r,n){var i=e._tickround,a=r&&e.hoverformat||Is.getTickFormat(e);n=!a&&n,n&&(Rh(i)?i=4:i={y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o=zu.formatDate(t.x,a,i,e._dateFormat,e.calendar,e._extraFormat),s,u=o.indexOf(`
`);if(u!==-1&&(s=o.substr(u+1),o=o.substr(0,u)),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 l=n5(e),f=e._trueSide||e.side;(!l&&f==="top"||l&&f==="bottom")&&(o+="<br> ")}t.text=o}function nst(e,t,r,n,i){var a=e.dtick,o=t.x,s=e.tickformat,u=typeof a=="string"&&a.charAt(0);if(i==="never"&&(i=""),n&&u!=="L"&&(a="L3",u="L"),s||u==="L")t.text=i5(Math.pow(10,o),e,i,n);else if(Rh(a)||u==="D"&&zu.mod(o+.01,1)<.1){var l=Math.round(o),f=Math.abs(l),c=e.exponentformat;c==="power"||wz(c)&&gN(l)?(l===0?t.text=1:l===1?t.text="10":t.text="10<sup>"+(l>1?"":kb)+f+"</sup>",t.fontSize*=1.25):(c==="e"||c==="E")&&f>2?t.text="1"+c+(l>0?"+":kb)+f:(t.text=i5(Math.pow(10,o),e,"","fakehover"),a==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(u==="D")t.text=String(Math.round(Math.pow(10,zu.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var h=String(t.text).charAt(0);(h==="0"||h==="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 ast(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function ost(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 sst(e,t,r,n,i){i==="never"?i="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=i5(t.x,e,i,n)}function lst(e,t,r,n,i){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=ust(a);if(o[1]>=100)t.text=i5(zu.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=kb+t.text)}}}else t.text=i5(t.x,e,i,n)}function ust(e){function t(s,u){return Math.abs(s-u)<=1e-6}function r(s,u){return t(u,0)?s:r(u,s%u)}function n(s){for(var u=1;!t(Math.round(s*u)/u,s);)u*=10;return u}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}var fst=["f","p","n","\u03BC","m","","k","M","G","T"];function wz(e){return e==="SI"||e==="B"}function gN(e){return e>14||e<-15}function i5(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,u=Is.getTickFormat(t),l=t.separatethousands;if(n){var f={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:Rh(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Sse(f),a=(Number(f._tickround)||0)+4,s=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,kb);var c=Math.pow(10,-a)/2;if(o==="none"&&(s=0),e=Math.abs(e),e<c)e="0",i=!1;else{if(e+=c,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.substr(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.substr(0,d+a).replace(/\.?0+$/,""))}e=zu.numSeparate(e,t._separators,l)}if(s&&o!=="hide"){wz(o)&&gN(s)&&(o="power");var p;s<0?p=kb+-s:o!=="power"?p="+"+s:p=String(s),o==="e"||o==="E"?e+=o+p:o==="power"?e+="\xD710<sup>"+p+"</sup>":o==="B"&&s===9?e+="B":wz(o)&&(e+=fst[s/3+5])}return i?kb+e:e}Is.getTickFormat=function(e){var t;function r(u){return typeof u!="string"?u:Number(u.replace("M",""))*I3}function n(u,l){var f=["L","D"];if(typeof u==typeof l){if(typeof u=="number")return u-l;var c=f.indexOf(u.charAt(0)),h=f.indexOf(l.charAt(0));return c===h?Number(u.replace(/(L|D)/g,""))-Number(l.replace(/(L|D)/g,"")):c-h}else return typeof u=="number"?1:-1}function i(u,l,f){var c=f||function(p){return p},h=l[0],d=l[1];return(!h&&typeof h!="number"||c(h)<=c(u))&&(!d&&typeof d!="number"||c(d)>=c(u))}function a(u,l){var f=l[0]===null,c=l[1]===null,h=n(u,l[0])>=0,d=n(u,l[1])<=0;return(f||h)&&(c||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};Is.getSubplots=function(e,t){var r=e._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=t?Is.findSubplotsWithAxis(n,t):n;return i.sort(function(a,o){var s=a.substr(1).split("y"),u=o.substr(1).split("y");return s[0]===u[0]?+s[1]-+u[1]:+s[0]-+u[0]}),i};Is.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};Is.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=Is.list(e,"x",!0),a=Is.list(e,"y",!0),o=[],s,u;for(s=0;s<i.length;s++)for(o.push({x:i[s],y:n}),u=0;u<a.length;u++)s===0&&o.push({x:r,y:a[u]}),o.push({x:i[s],y:a[u]});var l=t._clips.selectAll(".axesclip").data(o,function(f){return f.x._id+f.y._id});l.enter().append("clipPath").classed("axesclip",!0).attr("id",function(f){return"clip"+t._uid+f.x._id+f.y._id}).append("rect"),l.exit().remove(),l.each(function(f){w0.select(this).select("rect").attr({x:f.x._offset||0,y:f.y._offset||0,width:f.x._length||1,height:f.y._length||1})})}};Is.draw=function(e,t,r){var n=e._fullLayout;t==="redraw"&&n._paper.selectAll("g.subplot").each(function(u){var l=u[0],f=n._plots[l];if(f){var c=f.xaxis,h=f.yaxis;f.xaxislayer.selectAll("."+c._id+"tick").remove(),f.yaxislayer.selectAll("."+h._id+"tick").remove(),f.xaxislayer.selectAll("."+c._id+"tick2").remove(),f.yaxislayer.selectAll("."+h._id+"tick2").remove(),f.xaxislayer.selectAll("."+c._id+"divider").remove(),f.yaxislayer.selectAll("."+h._id+"divider").remove(),f.minorGridlayer&&f.minorGridlayer.selectAll("path").remove(),f.gridlayer&&f.gridlayer.selectAll("path").remove(),f.zerolinelayer&&f.zerolinelayer.selectAll("path").remove(),n._infolayer.select(".g-"+c._id+"title").remove(),n._infolayer.select(".g-"+h._id+"title").remove()}});var i=!t||t==="redraw"?Is.listIds(e):t,a=Is.list(e),o=a.filter(function(u){return u.autoshift}).map(function(u){return u.overlaying});i.map(function(u){var l=Is.getFromId(e,u);if(l.tickmode==="sync"&&l.overlaying){var f=i.findIndex(function(c){return c===l.overlaying});f>=0&&i.unshift(i.splice(f,1).shift())}});var s={false:{left:0,right:0}};return zu.syncOrAsync(i.map(function(u){return function(){if(u){var l=Is.getFromId(e,u);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var f=Is.drawOne(e,l,r);return l._shiftPusher&&yN(l,l._fullDepth||0,s,!0),l._r=l.range.slice(),l._rl=zu.simpleMap(l._r,l.r2l),f}}}))};Is.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},i=r.overlayingShiftedAx||[],a,o,s;t.setScale();var u=e._fullLayout,l=t._id,f=l.charAt(0),c=Is.counterLetter(l),h=u._plots[t._mainSubplot];if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var d=t.linewidth/2||0;t.ticks==="inside"&&(d+=t.ticklen),yN(t,d,n,!0),yN(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Tst(t,n));var p=h[f+"axislayer"],x=t._mainLinePosition,b=x+=t._shift,y=t._mainMirrorPosition,k=t._vals=Is.calcTicks(t),E=[t.mirror,b,y].join("_");for(a=0;a<k.length;a++)k[a].axInfo=E;t._selections={},t._tickAngles&&(t._prevTickAngles=t._tickAngles),t._tickAngles={},t._depth=null;var A={};function L(Qe){var Xe=l+(Qe||"tick");return A[Xe]||(A[Xe]=pst(t,Xe,b)),A[Xe]}if(t.visible){var _=Is.makeTransTickFn(t),C=Is.makeTransTickLabelFn(t),M,v,z=t.ticks==="inside",T=t.ticks==="outside";if(t.tickson==="boundaries"){var F=cst(t,k);v=Is.clipEnds(t,F),M=z?v:F}else v=Is.clipEnds(t,k),M=z&&t.ticklabelmode!=="period"?v:k;var q=t._gridVals=v,U=dst(t,k);if(!u._hasOnlyLargeSploms){var H=t._subplotsWith,j={};for(a=0;a<H.length;a++){o=H[a],s=u._plots[o];var G=s[c+"axis"],O=G._mainAxis._id;if(!j[O]){j[O]=1;var W=f==="x"?"M0,"+G._offset+"v"+G._length:"M"+G._offset+",0h"+G._length;Is.drawGrid(e,t,{vals:q,counterAxis:G,layer:s.gridlayer.select("."+l),minorLayer:s.minorGridlayer.select("."+l),path:W,transFn:_}),Is.drawZeroLine(e,t,{counterAxis:G,layer:s.zerolinelayer,path:W,transFn:_})}}}var re,ne=Is.getTickSigns(t),be=Is.getTickSigns(t,"minor");if(t.ticks||t.minor&&t.minor.ticks){var ze=Is.makeTickPath(t,b,ne[2]),Ce=Is.makeTickPath(t,b,be[2],{minor:!0}),he,te,ke,Ee;if(t._anchorAxis&&t.mirror&&t.mirror!==!0?(he=Is.makeTickPath(t,y,ne[3]),te=Is.makeTickPath(t,y,be[3],{minor:!0}),ke=ze+he,Ee=Ce+te):(he="",te="",ke=ze,Ee=Ce),t.showdividers&&T&&t.tickson==="boundaries"){var Me={};for(a=0;a<U.length;a++)Me[U[a].x]=1;re=function(Qe){return Me[Qe.x]?he:ke}}else re=function(Qe){return Qe.minor?Ee:ke}}if(Is.drawTicks(e,t,{vals:M,layer:p,path:re,transFn:_}),t.mirror==="allticks"){var Oe=Object.keys(t._linepositions||{});for(a=0;a<Oe.length;a++){o=Oe[a],s=u._plots[o];var Re=t._linepositions[o]||[],me=Re[0],Be=Re[1],fe=Re[2],Ze=Is.makeTickPath(t,me,fe?ne[0]:be[0],{minor:fe})+Is.makeTickPath(t,Be,fe?ne[1]:be[1],{minor:fe});Is.drawTicks(e,t,{vals:M,layer:s[f+"axislayer"],path:Ze,transFn:_})}}var et=[];if(et.push(function(){return Is.drawLabels(e,t,{vals:k,layer:p,plotinfo:s,transFn:C,labelFns:Is.makeLabelFns(t,b)})}),t.type==="multicategory"){var gt={x:2,y:10}[f];et.push(function(){var Qe={x:"height",y:"width"}[f],Xe=L()[Qe]+gt+(t._tickAngles[l+"tick"]?t.tickfont.size*r5:0);return Is.drawLabels(e,t,{vals:hst(t,k),layer:p,cls:l+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:_,labelFns:Is.makeLabelFns(t,b+Xe*ne[4])})}),et.push(function(){return t._depth=ne[4]*(L("tick2")[t.side]-b),yst(e,t,{vals:U,layer:p,path:Is.makeTickPath(t,b,ne[4],{len:t._depth}),transFn:_})})}else t.title.hasOwnProperty("standoff")&&et.push(function(){t._depth=ne[4]*(L()[t.side]-b)});var Pt=QM.getComponentMethod("rangeslider","isVisible")(t);return!r.skipTitle&&!(Pt&&t.side==="bottom")&&et.push(function(){return mst(e,t)}),et.push(function(){var Qe=t.side.charAt(0),Xe=Got[t.side].charAt(0),Tt=Is.getPxPosition(e,t),xt=T?t.ticklen:0,_t,Ct,jt,At;(t.automargin||Pt||t._shiftPusher)&&(t.type==="multicategory"?_t=L("tick2"):(_t=L(),f==="x"&&Qe==="b"&&(t._depth=Math.max(_t.width>0?_t.bottom-Tt:0,xt))));var Te=0,nt=0;if(t._shiftPusher&&(Te=Math.max(xt,_t.height>0?Qe==="l"?Tt-_t.left:_t.right-Tt:0),t.title.text!==u._dfltTitle[f]&&(nt=(t._titleStandoff||0)+(t._titleScoot||0),Qe==="l"&&(nt+=_se(t))),t._fullDepth=Math.max(Te,nt)),t.automargin){Ct={x:0,y:0,r:0,l:0,t:0,b:0};var ut=[0,1],ct=typeof t._shift=="number"?t._shift:0;if(f==="x"){if(Qe==="b"?Ct[Qe]=t._depth:(Ct[Qe]=t._depth=Math.max(_t.width>0?Tt-_t.top:0,xt),ut.reverse()),_t.width>0){var rt=_t.right-(t._offset+t._length);rt>0&&(Ct.xr=1,Ct.r=rt);var je=t._offset-_t.left;je>0&&(Ct.xl=0,Ct.l=je)}}else if(Qe==="l"?(t._depth=Math.max(_t.height>0?Tt-_t.left:0,xt),Ct[Qe]=t._depth-ct):(t._depth=Math.max(_t.height>0?_t.right-Tt:0,xt),Ct[Qe]=t._depth+ct,ut.reverse()),_t.height>0){var tt=_t.bottom-(t._offset+t._length);tt>0&&(Ct.yb=0,Ct.b=tt);var Je=t._offset-_t.top;Je>0&&(Ct.yt=1,Ct.t=Je)}Ct[c]=t.anchor==="free"?t.position:t._anchorAxis.domain[ut[0]],t.title.text!==u._dfltTitle[f]&&(Ct[Qe]+=_se(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(jt={x:0,y:0,r:0,l:0,t:0,b:0},jt[Xe]=t.linewidth,t.mirror&&t.mirror!==!0&&(jt[Xe]+=xt),t.mirror===!0||t.mirror==="ticks"?jt[c]=t._anchorAxis.domain[ut[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(jt[c]=[t._counterDomainMin,t._counterDomainMax][ut[1]]))}Pt&&(At=QM.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(gse(Ct,t.automargin),gse(jt,t.automargin)),z3.autoMargin(e,_N(t),Ct),z3.autoMargin(e,kse(t),jt),z3.autoMargin(e,Cse(t),At)}),zu.syncOrAsync(et)}};function gse(e,t){if(e){var r=Object.keys(cse).reduce(function(n,i){return t.indexOf(i)!==-1&&cse[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 cst(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(zu.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 hst(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(Mse(e,zu.interp(n[o],.5),o));return r}function dst(e,t){var r=[],n,i,a=t.length&&t[t.length-1].x<t[0].x,o=function(u,l){var f=u.xbnd[l];f!==null&&r.push(zu.extendFlat({},u,{x:f}))};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 pst(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 u=vN(this),l=Xv.bBox(u.node().parentNode);n=Math.min(n,l.top),i=Math.max(i,l.bottom),a=Math.min(a,l.left),o=Math.max(o,l.right)});else{var s=Is.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}}Is.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};Is.makeTransTickFn=function(e){return e._id.charAt(0)==="x"?function(t){return P3(e._offset+e.l2p(t.x),0)}:function(t){return P3(0,e._offset+e.l2p(t.x))}};Is.makeTransTickLabelFn=function(e){var t=vst(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,u=!s;if(r){var l=o?-1:1;r=r*l}if(n){var f=e.side,c=s&&(f==="top"||f==="left")||u&&(f==="bottom"||f==="right")?1:-1;n=n*c}return e._id.charAt(0)==="x"?function(h){return P3(i+e._offset+e.l2p(pN(h))+r,a+n)}:function(h){return P3(a+n,i+e._offset+e.l2p(pN(h))+r)}};function pN(e){return e.periodX!==void 0?e.periodX:e.x}function vst(e){var t=e.ticklabelposition||"",r=function(d){return t.indexOf(d)!==-1},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),u=o||i||n||a;if(!u&&!s)return[0,0];var l=e.side,f=u?(e.tickwidth||0)/2:0,c=bz,h=e.tickfont?e.tickfont.size:12;return(o||n)&&(f+=h*Cb,c+=(e.linewidth||0)/2),(i||a)&&(f+=(e.linewidth||0)/2,c+=bz),s&&l==="top"&&(c-=h*(1-Cb)),(i||n)&&(f=-f),(l==="bottom"||l==="right")&&(c=-c),[u?f:0,s?c:0]}Is.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};Is.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=function(F){return n.indexOf(F)!==-1},a=i("top"),o=i("left"),s=i("right"),u=i("bottom"),l=u||o||a||s,f=i("inside"),c=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,p=c?e.ticklen:0;if(f?p*=-1:l&&(p=0),c&&(h+=p,r)){var x=zu.deg2rad(r);h=p*Math.cos(x)+1,d=p*Math.sin(x)}e.showticklabels&&(c||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(f?-1:1);var b={labelStandoff:h,labelShift:d},y,k,E,A,L=0,_=e.side,C=e._id.charAt(0),M=e.tickangle,v;if(C==="x")v=!f&&_==="bottom"||f&&_==="top",A=v?1:-1,f&&(A*=-1),y=d*A,k=t+h*A,E=v?1:-.2,Math.abs(M)===90&&(f?E+=$M:M===-90&&_==="bottom"?E=Cb:M===90&&_==="top"?E=$M:E=.5,L=$M/2*(M/90)),b.xFn=function(F){return F.dx+y+L*F.fontSize},b.yFn=function(F){return F.dy+k+F.fontSize*E},b.anchorFn=function(F,q){if(l){if(o)return"end";if(s)return"start"}return!Rh(q)||q===0||q===180?"middle":q*A<0!==f?"end":"start"},b.heightFn=function(F,q,U){return q<-60||q>60?-.5*U:e.side==="top"!==f?-U:0};else if(C==="y"){if(v=!f&&_==="left"||f&&_==="right",A=v?1:-1,f&&(A*=-1),y=h,k=d*A,E=0,!f&&Math.abs(M)===90&&(M===-90&&_==="left"||M===90&&_==="right"?E=Cb:E=.5),f){var z=Rh(M)?+M:0;if(z!==0){var T=zu.deg2rad(z);L=Math.abs(Math.sin(T))*Cb*A,E=0}}b.xFn=function(F){return F.dx+t-(y+F.fontSize*E)*A+L*F.fontSize},b.yFn=function(F){return F.dy+k+F.fontSize*$M},b.anchorFn=function(F,q){return Rh(q)&&Math.abs(q)===90?"middle":v?"end":"start"},b.heightFn=function(F,q,U){return e.side==="right"&&(q*=-1),q<-30?-U:q<30?-.5*U:0}}return b};function Sz(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Is.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,Sz);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return e5.stroke(w0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return Xv.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Mz(t,[xse]),a.attr("transform",r.transFn)};Is.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(y){return y.minor}):[],o=t.showgrid?r.vals.filter(function(y){return!y.minor}):[],s=r.counterAxis;if(s&&Is.shouldShowZeroLine(e,t,s))for(var u=t.tickmode==="array",l=0;l<o.length;l++){var f=o[l].x;if(u?!f:Math.abs(f)<t.dtick/100)if(o=o.slice(0,l).concat(o.slice(l+1)),u)l--;else break}t._gw=Xv.crispRound(e,t.gridwidth,1);for(var c=i?Xv.crispRound(e,t.minor.gridwidth,1):0,h=r.layer,d=r.minorLayer,p=1;p>=0;p--){var x=p?h:d;if(x){var b=x.selectAll("path."+n).data(p?o:a,Sz);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(y){return e5.stroke(w0.select(this),y.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(y){return Xv.dashStyle(y.minor?t.minor.griddash:t.griddash,y.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(y){return(y.minor?c:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&b.attr("d",r.path)}}Mz(t,[hN,dN])}};Is.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=Is.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 jot(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(e5.stroke,t.zerolinecolor||e5.defaultLine).style("stroke-width",Xv.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Mz(t,[cN])};Is.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=r.cls||i+"tick",o=r.vals.filter(function(O){return O.text}),s=r.labelFns,u=r.secondary?0:t.tickangle,l=(t._prevTickAngles||{})[a],f=r.layer.selectAll("g."+a).data(t.showticklabels?o:[],Sz),c=[];f.enter().append("g").classed(a,1).append("text").attr("text-anchor","middle").each(function(O){var W=w0.select(this),re=e._promises.length;W.call(Eb.positionText,s.xFn(O),s.yFn(O)).call(Xv.font,{family:O.font,size:O.fontSize,color:O.fontColor,weight:O.fontWeight,style:O.fontStyle,variant:O.fontVariant,textcase:O.fontTextcase,lineposition:O.fontLineposition,shadow:O.fontShadow}).text(O.text).call(Eb.convertToTspans,e),e._promises[re]?c.push(e._promises.pop().then(function(){h(W,u)})):h(W,u)}),Mz(t,[fse]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(O){w0.select(this).select("text").call(Eb.positionText,s.xFn(O),s.yFn(O))});function h(O,W){O.each(function(re){var ne=w0.select(this),be=ne.select(".text-math-group"),ze=s.anchorFn(re,W),Ce=r.transFn.call(ne.node(),re)+(Rh(W)&&+W!=0?" rotate("+W+","+s.xFn(re)+","+(s.yFn(re)-re.fontSize/2)+")":""),he=Eb.lineCount(ne),te=r5*re.fontSize,ke=s.heightFn(re,Rh(W)?+W:0,(he-1)*te);if(ke&&(Ce+=P3(0,ke)),be.empty()){var Ee=ne.select("text");Ee.attr({transform:Ce,"text-anchor":ze}),Ee.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var Me=Xv.bBox(be.node()).width,Oe=Me*{end:-.5,start:.5}[ze];be.attr("transform",Ce+P3(Oe,0))}})}t._adjustTickLabelsOverflow=function(){var O=t.ticklabeloverflow;if(!(!O||O==="allow")){var W=O.indexOf("hide")!==-1,re=t._id.charAt(0)==="x",ne=0,be=re?e._fullLayout.width:e._fullLayout.height;if(O.indexOf("domain")!==-1){var ze=zu.simpleMap(t.range,t.r2l);ne=t.l2p(ze[0])+t._offset,be=t.l2p(ze[1])+t._offset}var Ce=Math.min(ne,be),he=Math.max(ne,be),te=t.side,ke=1/0,Ee=-1/0;f.each(function(me){var Be=w0.select(this),fe=Be.select(".text-math-group");if(fe.empty()){var Ze=Xv.bBox(Be.node()),et=0;re?(Ze.right>he||Ze.left<Ce)&&(et=1):(Ze.bottom>he||Ze.top+(t.tickangle?0:me.fontSize/4)<Ce)&&(et=1);var gt=Be.select("text");et?W&&gt.style("opacity",0):(gt.style("opacity",1),te==="bottom"||te==="right"?ke=Math.min(ke,re?Ze.top:Ze.left):ke=-1/0,te==="top"||te==="left"?Ee=Math.max(Ee,re?Ze.bottom:Ze.right):Ee=1/0)}});for(var Me in n._plots){var Oe=n._plots[Me];if(!(t._id!==Oe.xaxis._id&&t._id!==Oe.yaxis._id)){var Re=re?Oe.yaxis:Oe.xaxis;Re&&(Re["_visibleLabelMin_"+t._id]=ke,Re["_visibleLabelMax_"+t._id]=Ee)}}}},t._hideCounterAxisInsideTickLabels=function(O){var W=t._id.charAt(0)==="x",re=[];for(var ne in n._plots){var be=n._plots[ne];t._id!==be.xaxis._id&&t._id!==be.yaxis._id||re.push(W?be.yaxis:be.xaxis)}re.forEach(function(ze,Ce){ze&&n5(ze)&&(O||[cN,dN,hN,xse,fse]).forEach(function(he){var te=he.K==="tick"&&he.L==="text"&&t.ticklabelmode==="period",ke=n._plots[t._mainSubplot],Ee;he.K===cN.K?Ee=ke.zerolinelayer.selectAll("."+t._id+"zl"):he.K===dN.K?Ee=ke.minorGridlayer.selectAll("."+t._id):he.K===hN.K?Ee=ke.gridlayer.selectAll("."+t._id):Ee=ke[t._id.charAt(0)+"axislayer"],Ee.each(function(){var Me=w0.select(this);he.L&&(Me=Me.selectAll(he.L)),Me.each(function(Oe){var Re=t.l2p(te?pN(Oe):Oe.x)+t._offset,me=w0.select(this);Re<t["_visibleLabelMax_"+ze._id]&&Re>t["_visibleLabelMin_"+ze._id]?me.style("display","none"):he.K==="tick"&&!Ce&&me.style("display",null)})})})})},h(f,l+1?l:u);function d(){return c.length&&Promise.all(c)}var p=null;function x(){if(h(f,u),o.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){p=t.autotickangles[0];var O=0,W=[],re,ne=1;f.each(function(_t){O=Math.max(O,_t.fontSize);var Ct=t.l2p(_t.x),jt=vN(this),At=Xv.bBox(jt.node());ne=Math.max(ne,Eb.lineCount(jt)),W.push({top:0,bottom:10,height:10,left:Ct-At.width/2,right:Ct+At.width/2+2,width:At.width+2})});var be=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,ze=o.length,Ce=Math.abs((o[ze-1].x-o[0].x)*t._m)/(ze-1),he=be?Ce/2:Ce,te=be?t.ticklen:O*1.25*ne,ke=Math.sqrt(Math.pow(he,2)+Math.pow(te,2)),Ee=he/ke,Me=t.autotickangles.map(function(_t){return _t*Math.PI/180}),Oe=Me.find(function(_t){return Math.abs(Math.cos(_t))<=Ee});Oe===void 0&&(Oe=Me.reduce(function(_t,Ct){return Math.abs(Math.cos(_t))<Math.abs(Math.cos(Ct))?_t:Ct},Me[0]));var Re=Oe*(180/Math.PI);if(be){var me=2;for(t.ticks&&(me+=t.tickwidth/2),re=0;re<W.length;re++){var Be=o[re].xbnd,fe=W[re];if(Be[0]!==null&&fe.left-t.l2p(Be[0])<me||Be[1]!==null&&t.l2p(Be[1])-fe.right<me){p=Re;break}}}else{var Ze=t.ticklabelposition||"",et=function(_t){return Ze.indexOf(_t)!==-1},gt=et("top"),Pt=et("left"),Qe=et("right"),Xe=et("bottom"),Tt=Xe||Pt||gt||Qe,xt=Tt?(t.tickwidth||0)+2*bz:0;for(re=0;re<W.length-1;re++)if(zu.bBoxIntersect(W[re],W[re+1],xt)){p=Re;break}}p&&h(f,p)}}t._selections&&(t._selections[a]=f);var b=[d];t.automargin&&n._redrawFromAutoMarginCount&&l===90?(p=l,b.push(function(){h(f,l)})):b.push(x),t._tickAngles&&b.push(function(){t._tickAngles[a]=p===null?Rh(u)?u:0:p});var y=function(){var O=0,W=0;return f.each(function(re,ne){var be=vN(this),ze=be.select(".text-math-group");if(ze.empty()){var Ce;t._vals[ne]&&(Ce=t._vals[ne].bb||Xv.bBox(be.node()),t._vals[ne].bb=Ce),O=Math.max(O,Ce.width),W=Math.max(W,Ce.height)}}),{labelsMaxW:O,labelsMaxH:W}},k=t._anchorAxis;if(k&&(k.autorange||k.insiderange)&&n5(t)&&!Zot(n,t._id)&&(n._insideTickLabelsUpdaterange||(n._insideTickLabelsUpdaterange={}),k.autorange&&(n._insideTickLabelsUpdaterange[k._name+".autorange"]=k.autorange,b.push(y)),k.insiderange)){var E=y(),A=t._id.charAt(0)==="y"?E.labelsMaxW:E.labelsMaxH;A+=2*bz,t.ticklabelposition==="inside"&&(A+=t.ticklen||0);var L=t.side==="right"||t.side==="top"?1:-1,_=L===1?1:0,C=L===1?0:1,M=[];M[C]=k.range[C];var v=k.range,z=k.r2p(v[_]),T=k.r2p(v[C]),F=n._insideTickLabelsUpdaterange[k._name+".range"];if(F){var q=k.r2p(F[_]),U=k.r2p(F[C]),H=L*(t._id.charAt(0)==="y"?1:-1);H*z<H*q&&(z=q,M[_]=v[_]=F[_]),H*T>H*U&&(T=U,M[C]=v[C]=F[C])}var j=Math.abs(T-z);j-A>0?(j-=A,A*=1+A/j):A=0,t._id.charAt(0)!=="y"&&(A=-A),M[_]=k.p2r(k.r2p(v[_])+L*A),k.autorange==="min"||k.autorange==="max reversed"?(M[0]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0):(k.autorange==="max"||k.autorange==="min reversed")&&(M[1]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[k._name+".range"]=M}var G=zu.syncOrAsync(b);return G&&G.then&&e._promises.push(G),G};function yst(e,t,r){var n=t._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,Sz);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(e5.stroke,t.dividercolor).style("stroke-width",Xv.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}Is.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 _se(e){var t=e.title.font.size,r=(e.title.text.match(Eb.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Cb+r*r5):r?t*(r+1)*r5:t}function mst(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(Eb.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*Cb:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*($M+s*r5));else{var u=n5(t);if(t.type==="multicategory")o=t._depth;else{var l=1.5*a;u&&(l=.5*a,t.ticks==="outside"&&(l+=t.ticklen)),o=10+l+(t.linewidth?t.linewidth-1:0)}u||(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 f=Is.getPxPosition(e,t),c,h,d;i==="x"?(h=t._offset+t._length/2,d=t.side==="top"?f-o:f+o):(d=t._offset+t._length/2,h=t.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var p;if(t.type!=="multicategory"){var x=t._selections[t._id+"tick"];if(p={selection:x,side:t.side},x&&x.node()&&x.node().parentNode){var b=Xv.getTranslate(x.node().parentNode);p.offsetLeft=b.x,p.offsetTop=b.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return t._titleStandoff=o,qot.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[i],avoid:p,transform:c,attributes:{x:h,y:d,"text-anchor":"middle"}})}Is.shouldShowZeroLine=function(e,t,r){var n=zu.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===Tz)&&(Ese(t,0)||!gst(e,t,r,n)||_st(e,t))};Is.clipEnds=function(e,t){return t.filter(function(r){return Ese(e,r.x)})};function Ese(e,t){var r=e.l2p(t);return r>1&&r<e._length-1}function gst(e,t,r,n){var i=r._mainAxis;if(!i)return;var a=e._fullLayout,o=t._id.charAt(0),s=Is.counterLetter(t._id),u=t._offset+(Math.abs(n[0])<Math.abs(n[1])==(o==="x")?0:t._length);function l(p){if(!p.showline||!p.linewidth)return!1;var x=Math.max((p.linewidth+t.zerolinewidth)/2,1);function b(E){return typeof E=="number"&&Math.abs(E-u)<x}if(b(p._mainLinePosition)||b(p._mainMirrorPosition))return!0;var y=p._linepositions||{};for(var k in y)if(b(y[k][0])||b(y[k][1]))return!0}var f=a._plots[r._mainSubplot];if(!(f.mainplotinfo||f).overlays.length)return l(r,u);for(var c=Is.list(e,s),h=0;h<c.length;h++){var d=c[h];if(d._mainAxis===i&&l(d,u))return!0}}function _st(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&&(QM.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 vN(e){var t=w0.select(e),r=t.select(".text-math-group");return r.empty()?t.select("text"):r}Is.allowAutoMargin=function(e){for(var t=Is.list(e,"",!0),r=0;r<t.length;r++){var n=t[r];n.automargin&&(z3.allowAutoMargin(e,_N(n)),n.mirror&&z3.allowAutoMargin(e,kse(n))),QM.getComponentMethod("rangeslider","isVisible")(n)&&z3.allowAutoMargin(e,Cse(n))}};function _N(e){return e._id+".automargin"}function kse(e){return _N(e)+".mirror"}function Cse(e){return e._id+".rangeslider"}Is.swap=function(e,t){for(var r=xst(e,t),n=0;n<r.length;n++)bst(e,r[n].x,r[n].y)};function xst(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 u=r[a[0]],l;if(a.length>1)for(i=1;i<a.length;i++)l=r[a[i]],vz(u.x,l.x),vz(u.y,l.y);vz(u.x,[o]),vz(u.y,[s])}}return r}function vz(e,t){for(var r=0;r<t.length;r++)e.indexOf(t[r])===-1&&e.push(t[r])}function bst(e,t,r){var n=[],i=[],a=e.layout,o,s;for(o=0;o<t.length;o++)n.push(Is.getFromId(e,t[o]));for(o=0;o<r.length;o++)i.push(Is.getFromId(e,r[o]));var u=Object.keys(Bot),l=["anchor","domain","overlaying","position","side","tickangle","editType"],f=["linear","log"];for(o=0;o<u.length;o++){var c=u[o],h=n[0][c],d=i[0][c],p=!0,x=!1,b=!1;if(!(c.charAt(0)==="_"||typeof h=="function"||l.indexOf(c)!==-1)){for(s=1;s<n.length&&p;s++){var y=n[s][c];c==="type"&&f.indexOf(h)!==-1&&f.indexOf(y)!==-1&&h!==y?x=!0:y!==h&&(p=!1)}for(s=1;s<i.length&&p;s++){var k=i[s][c];c==="type"&&f.indexOf(d)!==-1&&f.indexOf(k)!==-1&&d!==k?b=!0:i[s][c]!==d&&(p=!1)}p&&(x&&(a[n[0]._name].type="linear"),b&&(a[i[0]._name].type="linear"),wst(a,c,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&&zu.swapAttrs(a.annotations[o],["?"])}}function wst(e,t,r,n,i){var a=zu.nestedProperty,o=a(e[r[0]._name],t).get(),s=a(e[n[0]._name],t).get(),u;for(t==="title"&&(o&&o.text===i.x&&(o.text=i.y),s&&s.text===i.y&&(s.text=i.x)),u=0;u<r.length;u++)a(e,r[u]._name+"."+t).set(s);for(u=0;u<n.length;u++)a(e,n[u]._name+"."+t).set(o)}function xN(e){return e._id==="angularaxis"}function uN(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 n5(e){return(e.ticklabelposition||"").indexOf("inside")!==-1}function Mz(e,t){n5(e._anchorAxis||{})&&e._hideCounterAxisInsideTickLabels&&e._hideCounterAxisInsideTickLabels(t)}function yN(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 Tst(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}function Ast(e,t){return/%f/.test(t)?e>=Hot:/%L/.test(t)?e>=Vot:/%[SX]/.test(t)?e>=xz:/%M/.test(t)?e>=t5:/%[HI]/.test(t)?e>=xm:/%p/.test(t)?e>=s_:/%[Aadejuwx]/.test(t)?e>=Fp:/%[UVW]/.test(t)?e>=Yv:/%[Bbm]/.test(t)?e>=_z:/%[q]/.test(t)?e>=gz:/%[Yy]/.test(t)?e>=mz:!0}});var bN=Se((Uir,zse)=>{"use strict";zse.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),u=t("autorangeoptions.maxallowed",i===null?a:void 0);s===void 0&&t("autorangeoptions.clipmin"),u===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var wN=Se((Vir,Pse)=>{"use strict";var Sst=bN();Pse.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 u;!i.noInsiderange&&o!=="log"&&(u=n("insiderange"),u&&(u[0]===null||u[1]===null)&&(r.insiderange=!1,u=void 0),u&&(s=n("range",u)))}var l=r.getAutorangeDflt(s,i),f=n("autorange",l),c;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(f==="reversed"||f===!0)||s[0]!==null&&(f==="min"||f==="max reversed")||s[1]!==null&&(f==="max"||f==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,c=!0),c||(l=r.getAutorangeDflt(s,i),f=n("autorange",l)),f&&(Sst(n,f,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var Dse=Se((Hir,Ise)=>{var Mst={left:0,top:0};Ise.exports=Est;function Est(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=kst(t);return r[0]=n-a.left,r[1]=i-a.top,r}function kst(e){return e===window||e===document||e===document.body?Mst:e.getBoundingClientRect()}});var Ez=Se((Gir,Rse)=>{"use strict";var Cst=aO();function Lst(){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}Rse.exports=Cst&&Lst()});var qse=Se((Wir,Fse)=>{"use strict";Fse.exports=function(t,r,n,i,a){var o=(t-n)/(i-n),s=o+r/(i-n),u=(o+s)/2;return a==="left"||a==="bottom"?o:a==="center"||a==="middle"?u:a==="right"||a==="top"?s:o<2/3-u?o:s>4/3-u?s:u}});var Nse=Se((jir,Ose)=>{"use strict";var Bse=Zr(),zst=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Ose.exports=function(t,r,n,i){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=Bse.constrain(Math.floor(t*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Bse.constrain(Math.floor(r*3),0,2),zst[r][t]}});var Vse=Se((Zir,Use)=>{"use strict";var Pst=y3(),Ist=LL(),Dst=DM().getGraphDiv,Rst=PM(),TN=Use.exports={};TN.wrapped=function(e,t,r){e=Dst(e),e._fullLayout&&Ist.clear(e._fullLayout._uid+Rst.HOVERID),TN.raw(e,t,r)};TN.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&Pst.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 gp=Se((Xir,Wse)=>{"use strict";var Fst=Dse(),AN=sO(),qst=Ez(),Bst=Zr().removeElement,Ost=dd(),Lb=Wse.exports={};Lb.align=qse();Lb.getCursor=Nse();var Hse=Vse();Lb.unhover=Hse.wrapped;Lb.unhoverRaw=Hse.raw;Lb.init=function(t){var r=t.gd,n=1,i=r._context.doubleClickDelay,a=t.element,o,s,u,l,f,c,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents="all",a.onmousedown=b,qst?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=b,a.addEventListener("touchstart",b,{passive:!1})):a.ontouchstart=b;function p(E,A,L){return Math.abs(E)<L&&(E=0),Math.abs(A)<L&&(A=0),[E,A]}var x=t.clampFn||p;function b(E){r._dragged=!1,r._dragging=!0;var A=SN(E);o=A[0],s=A[1],h=E.target,c=E,d=E.buttons===2||E.ctrlKey,typeof E.clientX=="undefined"&&typeof E.clientY=="undefined"&&(E.clientX=o,E.clientY=s),u=new Date().getTime(),u-r._mouseDownTime<i?n+=1:(n=1,r._mouseDownTime=u),t.prepFn&&t.prepFn(E,o,s),AN&&!d?(f=Gse(),f.style.cursor=window.getComputedStyle(a).cursor):AN||(f=document,l=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",y),document.addEventListener("touchmove",y,{passive:!1}))}function y(E){E.preventDefault();var A=SN(E),L=t.minDrag||Ost.MINDRAG,_=x(A[0]-o,A[1]-s,L),C=_[0],M=_[1];(C||M)&&(r._dragged=!0,Lb.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",y),document.removeEventListener("touchmove",y)),document.removeEventListener("mouseup",k),document.removeEventListener("touchend",k),AN?Bst(f):l&&(f.documentElement.style.cursor=l,l=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 if(t.clickFn&&t.clickFn(n,c),!d){var A;try{A=new MouseEvent("click",E)}catch(_){var L=SN(E);A=document.createEvent("MouseEvents"),A.initMouseEvent("click",E.bubbles,E.cancelable,E.view,E.detail,E.screenX,E.screenY,L[0],L[1],E.ctrlKey,E.altKey,E.shiftKey,E.metaKey,E.button,E.relatedTarget)}h.dispatchEvent(A)}r._dragging=!1,r._dragged=!1}};function Gse(){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}Lb.coverSlip=Gse;function SN(e){return Fst(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Ty=Se((Yir,jse)=>{"use strict";jse.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 Yse=Se((Kir,Xse)=>{"use strict";var MN=Ty(),a5="data-savedcursor",Zse="!!";Xse.exports=function(t,r){var n=t.attr(a5);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(a5,o.substr(7)).classed(o,!1)}t.attr(a5)||t.attr(a5,Zse)}MN(t,r)}else n&&(t.attr(a5,null),n===Zse?MN(t):MN(t,n))}});var kN=Se((Jir,Kse)=>{"use strict";var EN=uc(),Nst=Ih();Kse.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:Nst.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:EN({editType:"legend"}),grouptitlefont:EN({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"},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:EN({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var Cz=Se(kz=>{"use strict";kz.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};kz.isVertical=function(t){return t.orientation!=="h"};kz.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1}});var zN=Se((Qir,Jse)=>{"use strict";var CN=Ul(),Kv=Zr(),Ust=_f(),Vst=zf(),Hst=kN(),Gst=s3(),LN=Cz();function Wst(e,t,r,n){var i=t[e]||{},a=Ust.newContainer(r,e);function o(G,O){return Kv.coerce(i,a,Hst,G,O)}var s=Kv.coerceFont(o,"font",r.font);o("bgcolor",r.paper_bgcolor),o("bordercolor");var u=o("visible");if(u){for(var l,f=function(G,O){var W=l._input,re=l;return Kv.coerce(W,re,Vst,G,O)},c=r.font||{},h=Kv.coerceFont(o,"grouptitlefont",c,{overrideDflt:{size:Math.round(c.size*1.1)}}),d=0,p=!1,x="normal",b=(r.shapes||[]).filter(function(G){return G.showlegend}),y=n.concat(b).filter(function(G){return e===(G.legend||"legend")}),k=0;k<y.length;k++)if(l=y[k],!!l.visible){var E=l._isShape;(l.showlegend||l._dfltShowLegend&&!(l._module&&l._module.attributes&&l._module.attributes.showlegend&&l._module.attributes.showlegend.dflt===!1))&&(d++,l.showlegend&&(p=!0,(!E&&CN.traceIs(l,"pie-like")||l._input.showlegend===!0)&&d++),Kv.coerceFont(f,"legendgrouptitle.font",h)),(!E&&CN.traceIs(l,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(l.fill)!==-1)&&(x=LN.isGrouped({traceorder:x})?"grouped+reversed":"reversed"),l.legendgroup!==void 0&&l.legendgroup!==""&&(x=LN.isReversed({traceorder:x})?"reversed+grouped":"grouped")}var A=Kv.coerce(t,r,Gst,"showlegend",p&&d>(e==="legend"?1:0));if(A===!1&&(r[e]=void 0),!(A===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),A!==!1)){o("borderwidth");var L=o("orientation"),_=o("yref"),C=o("xref"),M=L==="h",v=_==="paper",z=C==="paper",T,F,q,U="left";M?(T=0,CN.getComponentMethod("rangeslider","isVisible")(t.xaxis)?v?(F=1.1,q="bottom"):(F=1,q="top"):v?(F=-.1,q="top"):(F=0,q="bottom")):(F=1,q="auto",z?T=1.02:(T=1,U="right")),Kv.coerce(i,a,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:T}},"x"),Kv.coerce(i,a,{y:{valType:"number",editType:"legend",min:v?-2:0,max:v?3:1,dflt:F}},"y"),o("traceorder",x),LN.isGrouped(r[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",U),o("yanchor",q),o("valign"),Kv.noneOrAll(i,a,["x","y"]);var H=o("title.text");if(H){o("title.side",M?"left":"top");var j=Kv.extendFlat({},s,{size:Kv.bigFont(s.size)});Kv.coerceFont(o,"title.font",j)}}}}Jse.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 u={_input:s._input,visible:s.visible,showlegend:s.showlegend,legend:s.legend};a.push(u)}}var l=["legend"];for(i=0;i<a.length;i++)Kv.pushUnique(l,a[i].legend);for(r._legends=[],i=0;i<l.length;i++){var f=l[i];Wst(f,t,r,a),r[f]&&r[f].visible&&(r[f]._id=f),r._legends.push(f)}}});var Qse=Se((enr,$se)=>{"use strict";var D3=Ul(),IN=Zr(),jst=IN.pushUnique,PN=!0;$se.exports=function(t,r,n){var i=r._fullLayout;if(r._dragged||r._editing)return;var a=i.legend.itemclick,o=i.legend.itemdoubleclick,s=i.legend.groupclick;n===1&&a==="toggle"&&o==="toggleothers"&&PN&&r.data&&r._context.showTips&&IN.notifier(IN._(r,"Double-click on legend to isolate one trace"),"long"),PN=!1;var u;if(n===1?u=a:n===2&&(u=o),!u)return;var l=s==="togglegroup",f=i.hiddenlabels?i.hiddenlabels.slice():[],c=t.data()[0][0];if(c.groupTitle&&c.noClick)return;var h=r._fullData,d=(i.shapes||[]).filter(function(Tt){return Tt.showlegend}),p=h.concat(d),x=c.trace;x._isShape&&(x=x._fullInput);var b=x.legendgroup,y,k,E,A,L,_,C={},M=[],v=[],z=[];function T(Tt,xt){var _t=M.indexOf(Tt),Ct=C.visible;return Ct||(Ct=C.visible=[]),M.indexOf(Tt)===-1&&(M.push(Tt),_t=M.length-1),Ct[_t]=xt,_t}var F=(i.shapes||[]).map(function(Tt){return Tt._input}),q=!1;function U(Tt,xt){F[Tt].visible=xt,q=!0}function H(Tt,xt){if(!(c.groupTitle&&!l)){var _t=Tt._fullInput||Tt,Ct=_t._isShape,jt=_t.index;jt===void 0&&(jt=_t._index);var At=_t.visible===!1?!1:xt;Ct?U(jt,At):T(jt,At)}}var j=x.legend,G=x._fullInput,O=G&&G._isShape;if(!O&&D3.traceIs(x,"pie-like")){var W=c.label,re=f.indexOf(W);if(u==="toggle")re===-1?f.push(W):f.splice(re,1);else if(u==="toggleothers"){var ne=re!==-1,be=[];for(y=0;y<r.calcdata.length;y++){var ze=r.calcdata[y];for(k=0;k<ze.length;k++){var Ce=ze[k],he=Ce.label;j===ze[0].trace.legend&&W!==he&&(f.indexOf(he)===-1&&(ne=!0),jst(f,he),be.push(he))}}if(!ne)for(var te=0;te<be.length;te++){var ke=f.indexOf(be[te]);ke!==-1&&f.splice(ke,1)}}D3.call("_guiRelayout",r,"hiddenlabels",f)}else{var Ee=b&&b.length,Me=[],Oe;if(Ee)for(y=0;y<p.length;y++)Oe=p[y],Oe.visible&&Oe.legendgroup===b&&Me.push(y);if(u==="toggle"){var Re;switch(x.visible){case!0:Re="legendonly";break;case!1:Re=!1;break;case"legendonly":Re=!0;break}if(Ee)if(l)for(y=0;y<p.length;y++){var me=p[y];me.visible!==!1&&me.legendgroup===b&&H(me,Re)}else H(x,Re);else H(x,Re)}else if(u==="toggleothers"){var Be,fe,Ze,et,gt,Pt=!0;for(y=0;y<p.length;y++)if(gt=p[y],Be=gt===x,Ze=gt.showlegend!==!0,!(Be||Ze)&&(fe=Ee&&gt.legendgroup===b,!fe&&gt.legend===j&&gt.visible===!0&&!D3.traceIs(gt,"notLegendIsolatable"))){Pt=!1;break}for(y=0;y<p.length;y++)if(gt=p[y],!(gt.visible===!1||gt.legend!==j)&&!D3.traceIs(gt,"notLegendIsolatable"))switch(x.visible){case"legendonly":H(gt,!0);break;case!0:et=Pt?!0:"legendonly",Be=gt===x,Ze=gt.showlegend!==!0&&!gt.legendgroup,fe=Be||Ee&&gt.legendgroup===b,H(gt,fe||Ze?!0:et);break}}for(y=0;y<v.length;y++)if(E=v[y],!!E){var Qe=E.constructUpdate(),Xe=Object.keys(Qe);for(k=0;k<Xe.length;k++)A=Xe[k],_=C[A]=C[A]||[],_[z[y]]=Qe[A]}for(L=Object.keys(C),y=0;y<L.length;y++)for(A=L[y],k=0;k<M.length;k++)C[A].hasOwnProperty(k)||(C[A][k]=void 0);q?D3.call("_guiUpdate",r,C,{shapes:F},M):D3.call("_guiRestyle",r,C,M)}}});var DN=Se((tnr,ele)=>{"use strict";ele.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var ile=Se((rnr,rle)=>{"use strict";var tle=Ul(),RN=Cz();rle.exports=function(t,r,n){var i=r._inHover,a=RN.isGrouped(r),o=RN.isReversed(r),s={},u=[],l=!1,f={},c=0,h=0,d,p;function x(G,O,W){if(r.visible!==!1&&!(n&&G!==r._id))if(O===""||!RN.isGrouped(r)){var re="~~i"+c;u.push(re),s[re]=[W],c++}else u.indexOf(O)===-1?(u.push(O),l=!0,s[O]=[W]):s[O].push(W)}for(d=0;d<t.length;d++){var b=t[d],y=b[0],k=y.trace,E=k.legend,A=k.legendgroup;if(!(!i&&(!k.visible||!k.showlegend)))if(tle.traceIs(k,"pie-like"))for(f[A]||(f[A]={}),p=0;p<b.length;p++){var L=b[p].label;f[A][L]||(x(E,A,{label:L,color:b[p].color,i:b[p].i,trace:k,pts:b[p].pts}),f[A][L]=!0,h=Math.max(h,(L||"").length))}else x(E,A,y),h=Math.max(h,(k.name||"").length)}if(!u.length)return[];var _=!l||!a,C=[];for(d=0;d<u.length;d++){var M=s[u[d]];_?C.push(M[0]):C.push(M)}for(_&&(C=[C]),d=0;d<C.length;d++){var v=1/0;for(p=0;p<C[d].length;p++){var z=C[d][p].trace.legendrank;v>z&&(v=z)}C[d][0]._groupMinRank=v,C[d][0]._preGroupSort=d}var T=function(G,O){return G[0]._groupMinRank-O[0]._groupMinRank||G[0]._preGroupSort-O[0]._preGroupSort},F=function(G,O){return G.trace.legendrank-O.trace.legendrank||G._preSort-O._preSort};for(C.forEach(function(G,O){G[0]._preGroupSort=O}),C.sort(T),d=0;d<C.length;d++){C[d].forEach(function(G,O){G._preSort=O}),C[d].sort(F);var q=C[d][0].trace,U=null;for(p=0;p<C[d].length;p++){var H=C[d][p].trace.legendgrouptitle;if(H&&H.text){U=H,i&&(H.font=r._groupTitleFont);break}}if(o&&C[d].reverse(),U){var j=!1;for(p=0;p<C[d].length;p++)if(tle.traceIs(C[d][p].trace,"pie-like")){j=!0;break}C[d].unshift({i:-1,groupTitle:U,noClick:j,trace:{showlegend:q.showlegend,legendgroup:q.legendgroup,visible:r.groupclick==="toggleitem"?!0:q.visible}})}for(p=0;p<C[d].length;p++)C[d][p]=[C[d][p]]}return r._lgroupsLength=C.length,r._maxNameLength=h,C}});var l_=Se(zb=>{"use strict";var Lz=Zr();function nle(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}zb.formatPiePercent=function(t,r){var n=nle((t*100).toPrecision(3));return Lz.numSeparate(n,r)+"%"};zb.formatPieValue=function(t,r){var n=nle(t.toPrecision(10));return Lz.numSeparate(n,r)};zb.getFirstFilled=function(t,r){if(Lz.isArrayOrTypedArray(t))for(var n=0;n<r.length;n++){var i=t[r[n]];if(i||i===0||i==="")return i}};zb.castOption=function(t,r){if(Lz.isArrayOrTypedArray(t))return zb.getFirstFilled(t,r);if(t)return t};zb.getRotationAngle=function(e){return(e==="auto"?0:e)*Math.PI/180}});var ole=Se((nnr,ale)=>{"use strict";var Zst=yu(),Xst=Pl();ale.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?Zst.pointStyle(t,n,i,r):Xst.fill(t,r.color)}});var R3=Se((anr,ule)=>{"use strict";var sle=Pl(),lle=l_().castOption,Yst=ole();ule.exports=function(t,r,n,i){var a=n.marker.line,o=lle(a.color,r.pts)||sle.defaultLine,s=lle(a.width,r.pts)||0;t.call(Yst,r,n,i).style("stroke-width",s).call(sle.stroke,o)}});var ON=Se((onr,vle)=>{"use strict";var qp=Nl(),FN=Ul(),_p=Zr(),fle=_p.strTranslate,iv=yu(),T0=Pl(),qN=Dp().extractOpts,zz=ec(),Kst=R3(),Jst=l_().castOption,$st=DN(),cle=12,hle=5,Pb=2,Qst=10,F3=5;vle.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing==="constant",o=n.itemwidth,s=(o+$st.itemGap*2)/2,u=fle(s,0),l=function(C,M,v,z){var T;if(C+1)T=C;else if(M&&M.width>0)T=M.width;else return 0;return a?z:Math.min(T,v)};t.each(function(C){var M=qp.select(this),v=_p.ensureSingle(M,"g","layers");v.style("opacity",C[0].trace.opacity);var z=n.indentation,T=n.valign,F=C[0].lineHeight,q=C[0].height;if(T==="middle"&&z===0||!F||!q)v.attr("transform",null);else{var U={top:1,bottom:-1}[T],H=U*(.5*(F-q+3))||0,j=n.indentation;v.attr("transform",fle(j,H))}var G=v.selectAll("g.legendfill").data([C]);G.enter().append("g").classed("legendfill",!0);var O=v.selectAll("g.legendlines").data([C]);O.enter().append("g").classed("legendlines",!0);var W=v.selectAll("g.legendsymbols").data([C]);W.enter().append("g").classed("legendsymbols",!0),W.selectAll("g.legendpoints").data([C]).enter().append("g").classed("legendpoints",!0)}).each(_).each(h).each(p).each(d).each(b).each(A).each(E).each(f).each(c).each(y).each(k);function f(C){var M=dle(C),v=M.showFill,z=M.showLine,T=M.showGradientLine,F=M.showGradientFill,q=M.anyFill,U=M.anyLine,H=C[0],j=H.trace,G,O,W=qN(j),re=W.colorscale,ne=W.reversescale,be=function(Me){if(Me.size())if(v)iv.fillGroupStyle(Me,r,!0);else{var Oe="legendfill-"+j.uid;iv.gradient(Me,r,Oe,BN(ne),re,"fill")}},ze=function(Me){if(Me.size()){var Oe="legendline-"+j.uid;iv.lineGroupStyle(Me),iv.gradient(Me,r,Oe,BN(ne),re,"stroke")}},Ce=zz.hasMarkers(j)||!q?"M5,0":U?"M5,-2":"M5,-3",he=qp.select(this),te=he.select(".legendfill").selectAll("path").data(v||F?[C]:[]);if(te.enter().append("path").classed("js-fill",!0),te.exit().remove(),te.attr("d",Ce+"h"+o+"v6h-"+o+"z").call(be),z||T){var ke=l(void 0,j.line,Qst,hle);O=_p.minExtend(j,{line:{width:ke}}),G=[_p.minExtend(H,{trace:O})]}var Ee=he.select(".legendlines").selectAll("path").data(z||T?[G]:[]);Ee.enter().append("path").classed("js-line",!0),Ee.exit().remove(),Ee.attr("d",Ce+(T?"l"+o+",0.0001":"h"+o)).call(z?iv.lineGroupStyle:ze)}function c(C){var M=dle(C),v=M.anyFill,z=M.anyLine,T=M.showLine,F=M.showMarker,q=C[0],U=q.trace,H=!F&&!z&&!v&&zz.hasText(U),j,G;function O(te,ke,Ee,Me){var Oe=_p.nestedProperty(U,te).get(),Re=_p.isArrayOrTypedArray(Oe)&&ke?ke(Oe):Oe;if(a&&Re&&Me!==void 0&&(Re=Me),Ee){if(Re<Ee[0])return Ee[0];if(Re>Ee[1])return Ee[1]}return Re}function W(te){return q._distinct&&q.index&&te[q.index]?te[q.index]:te[0]}if(F||H||T){var re={},ne={};if(F){re.mc=O("marker.color",W),re.mx=O("marker.symbol",W),re.mo=O("marker.opacity",_p.mean,[.2,1]),re.mlc=O("marker.line.color",W),re.mlw=O("marker.line.width",_p.mean,[0,5],Pb),ne.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var be=O("marker.size",_p.mean,[2,16],cle);re.ms=be,ne.marker.size=be}T&&(ne.line={width:O("line.width",W,[0,10],hle)}),H&&(re.tx="Aa",re.tp=O("textposition",W),re.ts=10,re.tc=O("textfont.color",W),re.tf=O("textfont.family",W),re.tw=O("textfont.weight",W),re.ty=O("textfont.style",W),re.tv=O("textfont.variant",W),re.tC=O("textfont.textcase",W),re.tE=O("textfont.lineposition",W),re.tS=O("textfont.shadow",W)),j=[_p.minExtend(q,re)],G=_p.minExtend(U,ne),G.selectedpoints=null,G.texttemplate=null}var ze=qp.select(this).select("g.legendpoints"),Ce=ze.selectAll("path.scatterpts").data(F?j:[]);Ce.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",u),Ce.exit().remove(),Ce.call(iv.pointStyle,G,r),F&&(j[0].mrc=3);var he=ze.selectAll("g.pointtext").data(H?j:[]);he.enter().append("g").classed("pointtext",!0).append("text").attr("transform",u),he.exit().remove(),he.selectAll("text").call(iv.textPointStyle,G,r)}function h(C){var M=C[0].trace,v=M.type==="waterfall";if(C[0]._distinct&&v){var z=C[0].trace[C[0].dir].marker;return C[0].mc=z.color,C[0].mlw=z.line.width,C[0].mlc=z.line.color,x(C,this,"waterfall")}var T=[];M.visible&&v&&(T=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 F=qp.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(T);F.enter().append("path").classed("legendwaterfall",!0).attr("transform",u).style("stroke-miterlimit",1),F.exit().remove(),F.each(function(q){var U=qp.select(this),H=M[q[0]].marker,j=l(void 0,H.line,F3,Pb);U.attr("d",q[1]).style("stroke-width",j+"px").call(T0.fill,H.color),j&&U.call(T0.stroke,H.line.color)})}function d(C){x(C,this)}function p(C){x(C,this,"funnel")}function x(C,M,v){var z=C[0].trace,T=z.marker||{},F=T.line||{},q=T.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=v?z.visible&&z.type===v:FN.traceIs(z,"bar"),H=qp.select(M).select("g.legendpoints").selectAll("path.legend"+v).data(U?[C]:[]);H.enter().append("path").classed("legend"+v,!0).attr("d",q).attr("transform",u),H.exit().remove(),H.each(function(j){var G=qp.select(this),O=j[0],W=l(O.mlw,T.line,F3,Pb);G.style("stroke-width",W+"px");var re=O.mcc;if(!n._inHover&&"mc"in O){var ne=qN(T),be=ne.mid;be===void 0&&(be=(ne.max+ne.min)/2),re=iv.tryColorscale(T,"")(be)}var ze=re||O.mc||T.color,Ce=T.pattern,he=Ce&&iv.getPatternAttr(Ce.shape,0,"");if(he){var te=iv.getPatternAttr(Ce.bgcolor,0,null),ke=iv.getPatternAttr(Ce.fgcolor,0,null),Ee=Ce.fgopacity,Me=ple(Ce.size,8,10),Oe=ple(Ce.solidity,.5,1),Re="legend-"+z.uid;G.call(iv.pattern,"legend",r,Re,he,Me,Oe,re,Ce.fillmode,te,ke,Ee)}else G.call(T0.fill,ze);W&&T0.stroke(G,O.mlc||F.color)})}function b(C){var M=C[0].trace,v=qp.select(this).select("g.legendpoints").selectAll("path.legendbox").data(M.visible&&FN.traceIs(M,"box-violin")?[C]:[]);v.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),v.exit().remove(),v.each(function(){var z=qp.select(this);if((M.boxpoints==="all"||M.points==="all")&&T0.opacity(M.fillcolor)===0&&T0.opacity((M.line||{}).color)===0){var T=_p.minExtend(M,{marker:{size:a?cle:_p.constrain(M.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});v.call(iv.pointStyle,T,r)}else{var F=l(void 0,M.line,F3,Pb);z.style("stroke-width",F+"px").call(T0.fill,M.fillcolor),F&&T0.stroke(z,M.line.color)}})}function y(C){var M=C[0].trace,v=qp.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(M.visible&&M.type==="candlestick"?[C,C]:[]);v.enter().append("path").classed("legendcandle",!0).attr("d",function(z,T){return T?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",u).style("stroke-miterlimit",1),v.exit().remove(),v.each(function(z,T){var F=qp.select(this),q=M[T?"increasing":"decreasing"],U=l(void 0,q.line,F3,Pb);F.style("stroke-width",U+"px").call(T0.fill,q.fillcolor),U&&T0.stroke(F,q.line.color)})}function k(C){var M=C[0].trace,v=qp.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(M.visible&&M.type==="ohlc"?[C,C]:[]);v.enter().append("path").classed("legendohlc",!0).attr("d",function(z,T){return T?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",u).style("stroke-miterlimit",1),v.exit().remove(),v.each(function(z,T){var F=qp.select(this),q=M[T?"increasing":"decreasing"],U=l(void 0,q.line,F3,Pb);F.style("fill","none").call(iv.dashLine,q.line.dash,U),U&&T0.stroke(F,q.line.color)})}function E(C){L(C,this,"pie")}function A(C){L(C,this,"funnelarea")}function L(C,M,v){var z=C[0],T=z.trace,F=v?T.visible&&T.type===v:FN.traceIs(T,v),q=qp.select(M).select("g.legendpoints").selectAll("path.legend"+v).data(F?[C]:[]);if(q.enter().append("path").classed("legend"+v,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),q.exit().remove(),q.size()){var U=T.marker||{},H=l(Jst(U.line.width,z.pts),U.line,F3,Pb),j="pieLike",G=_p.minExtend(T,{marker:{line:{width:H}}},j),O=_p.minExtend(z,{trace:G},j);Kst(q,O,G,r)}}function _(C){var M=C[0].trace,v,z=[];if(M.visible)switch(M.type){case"histogram2d":case"heatmap":z=[["M-15,-2V4H15V-2Z"]],v=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":z=[["M-6,-6V6H6V-6Z"]],v=!0;break;case"densitymapbox":case"densitymap":z=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],v="radial";break;case"cone":z=[["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"]],v=!1;break;case"streamtube":z=[["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"]],v=!1;break;case"surface":z=[["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"]],v=!0;break;case"mesh3d":z=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],v=!1;break;case"volume":z=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],v=!0;break;case"isosurface":z=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],v=!1;break}var T=qp.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(z);T.enter().append("path").classed("legend3dandfriends",!0).attr("transform",u).style("stroke-miterlimit",1),T.exit().remove(),T.each(function(F,q){var U=qp.select(this),H=qN(M),j=H.colorscale,G=H.reversescale,O=function(be){if(be.size()){var ze="legendfill-"+M.uid;iv.gradient(be,r,ze,BN(G,v==="radial"),j,"fill")}},W;if(j){if(!v){var ne=j.length;W=q===0?j[G?ne-1:0][1]:q===1?j[G?0:ne-1][1]:j[Math.floor((ne-1)/2)][1]}}else{var re=M.vertexcolor||M.facecolor||M.color;W=_p.isArrayOrTypedArray(re)?re[q]||re[0]:re}U.attr("d",F[0]),W?U.call(T0.fill,W):U.call(O)})}};function BN(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function dle(e){var t=e[0].trace,r=t.contours,n=zz.hasLines(t),i=zz.hasMarkers(t),a=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var u=r.coloring;u==="lines"?o=!0:n=u==="none"||u==="heatmap"||r.showlines,r.type==="constraint"?a=r._operation!=="=":(u==="fill"||u==="heatmap")&&(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function ple(e,t,r){return e&&_p.isArrayOrTypedArray(e)?t:e>r?r:e}});var HN=Se((snr,Sle)=>{"use strict";var Sv=Nl(),Fh=Zr(),UN=Ac(),O3=Ul(),yle=y3(),NN=gp(),qh=yu(),Iz=Pl(),Ib=Bf(),mle=Qse(),td=DN(),VN=Qh(),Tle=VN.LINE_SPACING,B3=VN.FROM_TL,gle=VN.FROM_BR,_le=ile(),elt=ON(),xle=Cz(),q3=1,tlt=/^legend[0-9]*$/;Sle.exports=function(t,r){if(r)ble(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^="legend"]');a.each(function(){var l=Sv.select(this),f=l.attr("class"),c=f.split(" ")[0];c.match(tlt)&&i.indexOf(c)===-1&&l.remove()});for(var o=0;o<i.length;o++){var s=i[o],u=t._fullLayout[s];ble(t,u)}}};function rlt(e,t,r){if(!(t.title.side!=="top center"&&t.title.side!=="top right")){var n=t.title.font,i=n.size*Tle,a=0,o=e.node(),s=qh.bBox(o).width;t.title.side==="top center"?a=.5*(t._width-2*r-2*td.titlePad-s):t.title.side==="top right"&&(a=t._width-2*r-2*td.titlePad-s),Ib.positionText(e,r+td.titlePad+a,r+i)}}function ble(e,t){var r=t||{},n=e._fullLayout,i=qz(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 u;if(s){if(!r.entries)return;u=_le(r.entries,r)}else{for(var l=(e.calcdata||[]).slice(),f=n.shapes,c=0;c<f.length;c++){var h=f[c];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"}};l.push([{trace:d}])}}u=n.showlegend&&_le(l,r,n._legends.length>1)}var p=n.hiddenlabels||[];if(!s&&(!n.showlegend||!u.length))return o.selectAll("."+i).remove(),n._topdefs.select("#"+a).remove(),UN.autoMargin(e,i);var x=Fh.ensureSingle(o,"g",i,function(M){s||M.attr("pointer-events","all")}),b=Fh.ensureSingleById(n._topdefs,"clipPath",a,function(M){M.append("rect")}),y=Fh.ensureSingle(x,"rect","bg",function(M){M.attr("shape-rendering","crispEdges")});y.call(Iz.stroke,r.bordercolor).call(Iz.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var k=Fh.ensureSingle(x,"g","scrollbox"),E=r.title;r._titleWidth=0,r._titleHeight=0;var A;E.text?(A=Fh.ensureSingle(k,"text",i+"titletext"),A.attr("text-anchor","start").call(qh.font,E.font).text(E.text),Dz(A,k,e,r,q3)):k.selectAll("."+i+"titletext").remove();var L=Fh.ensureSingle(x,"rect","scrollbar",function(M){M.attr(td.scrollBarEnterAttrs).call(Iz.fill,td.scrollBarColor)}),_=k.selectAll("g.groups").data(u);_.enter().append("g").attr("class","groups"),_.exit().remove();var C=_.selectAll("g.traces").data(Fh.identity);C.enter().append("g").attr("class","traces"),C.exit().remove(),C.style("opacity",function(M){var v=M[0].trace;return O3.traceIs(v,"pie-like")?p.indexOf(M[0].label)!==-1?.5:1:v.visible==="legendonly"?.5:1}).each(function(){Sv.select(this).call(ilt,e,r)}).call(elt,e,r).each(function(){s||Sv.select(this).call(nlt,e,i)}),Fh.syncOrAsync([UN.previousPromises,function(){return slt(e,_,C,r)},function(){var M=n._size,v=r.borderwidth,z=r.xref==="paper",T=r.yref==="paper";if(E.text&&rlt(A,r,v),!s){var F,q;z?F=M.l+M.w*r.x-B3[Rz(r)]*r._width:F=n.width*r.x-B3[Rz(r)]*r._width,T?q=M.t+M.h*(1-r.y)-B3[Fz(r)]*r._effHeight:q=n.height*(1-r.y)-B3[Fz(r)]*r._effHeight;var U=llt(e,i,F,q);if(U)return;if(n.margin.autoexpand){var H=F,j=q;F=z?Fh.constrain(F,0,n.width-r._width):H,q=T?Fh.constrain(q,0,n.height-r._effHeight):j,F!==H&&Fh.log("Constrain "+i+".x to make legend fit inside graph"),q!==j&&Fh.log("Constrain "+i+".y to make legend fit inside graph")}qh.setTranslate(x,F,q)}if(L.on(".drag",null),x.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var G=r._effHeight;s&&(G=r._height),y.attr({width:r._width-v,height:G-v,x:v/2,y:v/2}),qh.setTranslate(k,0,0),b.select("rect").attr({width:r._width-2*v,height:G-2*v,x:v,y:v}),qh.setClipUrl(k,a,e),qh.setRect(L,0,0,0,0),delete r._scrollY}else{var O=Math.max(td.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),W=r._effHeight-O-2*td.scrollBarMargin,re=r._height-r._effHeight,ne=W/re,be=Math.min(r._scrollY||0,re);y.attr({width:r._width-2*v+td.scrollBarWidth+td.scrollBarMargin,height:r._effHeight-v,x:v/2,y:v/2}),b.select("rect").attr({width:r._width-2*v+td.scrollBarWidth+td.scrollBarMargin,height:r._effHeight-2*v,x:v,y:v+be}),qh.setClipUrl(k,a,e),Oe(be,O,ne),x.on("wheel",function(){be=Fh.constrain(r._scrollY+Sv.event.deltaY/W*re,0,re),Oe(be,O,ne),be!==0&&be!==re&&Sv.event.preventDefault()});var ze,Ce,he,te=function(Ze,et,gt){var Pt=(gt-et)/ne+Ze;return Fh.constrain(Pt,0,re)},ke=function(Ze,et,gt){var Pt=(et-gt)/ne+Ze;return Fh.constrain(Pt,0,re)},Ee=Sv.behavior.drag().on("dragstart",function(){var Ze=Sv.event.sourceEvent;Ze.type==="touchstart"?ze=Ze.changedTouches[0].clientY:ze=Ze.clientY,he=be}).on("drag",function(){var Ze=Sv.event.sourceEvent;Ze.buttons===2||Ze.ctrlKey||(Ze.type==="touchmove"?Ce=Ze.changedTouches[0].clientY:Ce=Ze.clientY,be=te(he,ze,Ce),Oe(be,O,ne))});L.call(Ee);var Me=Sv.behavior.drag().on("dragstart",function(){var Ze=Sv.event.sourceEvent;Ze.type==="touchstart"&&(ze=Ze.changedTouches[0].clientY,he=be)}).on("drag",function(){var Ze=Sv.event.sourceEvent;Ze.type==="touchmove"&&(Ce=Ze.changedTouches[0].clientY,be=ke(he,ze,Ce),Oe(be,O,ne))});k.call(Me)}function Oe(Ze,et,gt){r._scrollY=e._fullLayout[i]._scrollY=Ze,qh.setTranslate(k,0,-Ze),qh.setRect(L,r._width,td.scrollBarMargin+Ze*gt,td.scrollBarWidth,et),b.select("rect").attr("y",v+Ze)}if(e._context.edits.legendPosition){var Re,me,Be,fe;x.classed("cursor-move",!0),NN.init({element:x.node(),gd:e,prepFn:function(Ze){if(Ze.target!==L.node()){var et=qh.getTranslate(x);Be=et.x,fe=et.y}},moveFn:function(Ze,et){if(Be!==void 0&&fe!==void 0){var gt=Be+Ze,Pt=fe+et;qh.setTranslate(x,gt,Pt),Re=NN.align(gt,r._width,M.l,M.l+M.w,r.xanchor),me=NN.align(Pt+r._height,-r._height,M.t+M.h,M.t,r.yanchor)}},doneFn:function(){if(Re!==void 0&&me!==void 0){var Ze={};Ze[i+".x"]=Re,Ze[i+".y"]=me,O3.call("_guiRelayout",e,Ze)}},clickFn:function(Ze,et){var gt=o.selectAll("g.traces").filter(function(){var Pt=this.getBoundingClientRect();return et.clientX>=Pt.left&&et.clientX<=Pt.right&&et.clientY>=Pt.top&&et.clientY<=Pt.bottom});gt.size()>0&&Ale(e,x,gt,Ze,et)}})}}],e)}}function Pz(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 Ale(e,t,r,n,i){var a=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};a._group&&(o.group=a._group),O3.traceIs(a,"pie-like")&&(o.label=r.datum()[0].label);var s=yle.triggerHandler(e,"plotly_legendclick",o);if(n===1){if(s===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&mle(r,e,n)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var u=yle.triggerHandler(e,"plotly_legenddoubleclick",o);u!==!1&&s!==!1&&mle(r,e,n)}}function ilt(e,t,r){var n=qz(r),i=e.data()[0][0],a=i.trace,o=O3.traceIs(a,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,u=r._maxNameLength,l,f;i.groupTitle?(l=i.groupTitle.text,f=i.groupTitle.font):(f=r.font,r.entries?l=i.text:(l=o?i.label:a.name,a._meta&&(l=Fh.templateString(l,a._meta))));var c=Fh.ensureSingle(e,"text",n+"text");c.attr("text-anchor","start").call(qh.font,f).text(s?wle(l,u):l);var h=r.indentation+r.itemwidth+td.itemGap*2;Ib.positionText(c,h,0),s?c.call(Ib.makeEditable,{gd:t,text:l}).call(Dz,e,t,r).on("edit",function(d){this.text(wle(d,u)).call(Dz,e,t,r);var p=i.trace._fullInput||{},x={};return x.name=d,p._isShape?O3.call("_guiRelayout",t,"shapes["+a.index+"].name",x.name):O3.call("_guiRestyle",t,x,a.index)}):Dz(c,e,t,r)}function wle(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 nlt(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=Fh.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(Iz.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)),Ale(t,s,e,a,Sv.event)}}))}function Dz(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),Ib.convertToTspans(e,r,function(){alt(t,r,n,i)})}function alt(e,t,r,n){var i=e.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend){e.remove();return}var a=e.select("g[class*=math-group]"),o=a.node(),s=qz(r);r||(r=t._fullLayout[s]);var u=r.borderwidth,l;n===q3?l=r.title.font:i.groupTitle?l=i.groupTitle.font:l=r.font;var f=l.size*Tle,c,h;if(o){var d=qh.bBox(o);c=d.height,h=d.width,n===q3?qh.setTranslate(a,u,u+c*.75):qh.setTranslate(a,0,c*.25)}else{var p="."+s+(n===q3?"title":"")+"text",x=e.select(p),b=Ib.lineCount(x),y=x.node();if(c=f*b,h=y?qh.bBox(y).width:0,n===q3)r.title.side==="left"&&(h+=td.itemGap*2),Ib.positionText(x,u+td.titlePad,u+f);else{var k=td.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(k=td.itemGap,h-=r.indentation+r.itemwidth),Ib.positionText(x,k,-f*((b-1)/2-.3))}}n===q3?(r._titleWidth=h,r._titleHeight=c):(i.lineHeight=f,i.height=Math.max(c,16)+3,i.width=h)}function olt(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 slt(e,t,r,n){var i=e._fullLayout,a=qz(n);n||(n=i[a]);var o=i._size,s=xle.isVertical(n),u=xle.isGrouped(n),l=n.entrywidthmode==="fraction",f=n.borderwidth,c=2*f,h=td.itemGap,d=n.indentation+n.itemwidth+h*2,p=2*(f+h),x=Fz(n),b=n.y<0||n.y===0&&x==="top",y=n.y>1||n.y===1&&x==="bottom",k=n.tracegroupgap,E={};n._maxHeight=Math.max(b||y?i.height/2:o.h,30);var A=0;n._width=0,n._height=0;var L=olt(n);if(s)r.each(function(he){var te=he[0].height;qh.setTranslate(this,f+L[0],f+L[1]+n._height+te/2+h),n._height+=te,n._width=Math.max(n._width,he[0].width)}),A=d+n._width,n._width+=h+d+c,n._height+=p,u&&(t.each(function(he,te){qh.setTranslate(this,0,te*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var _=Rz(n),C=n.x<0||n.x===0&&_==="right",M=n.x>1||n.x===1&&_==="left",v=y||b,z=i.width/2;n._maxWidth=Math.max(C?v&&_==="left"?o.l+o.w:z:M?v&&_==="right"?o.r+o.w:z:o.w,2*d);var T=0,F=0;r.each(function(he){var te=Pz(he,n,d);T=Math.max(T,te),F+=te}),A=null;var q=0;if(u){var U=0,H=0,j=0;t.each(function(){var he=0,te=0;Sv.select(this).selectAll("g.traces").each(function(Ee){var Me=Pz(Ee,n,d),Oe=Ee[0].height;qh.setTranslate(this,L[0],L[1]+f+h+Oe/2+te),te+=Oe,he=Math.max(he,Me),E[Ee[0].trace.legendgroup]=he});var ke=he+h;H>0&&ke+f+H>n._maxWidth?(q=Math.max(q,H),H=0,j+=U+k,U=te):U=Math.max(U,te),qh.setTranslate(this,H,j),H+=ke}),n._width=Math.max(q,H)+f,n._height=j+U+p}else{var G=r.size(),O=F+c+(G-1)*h<n._maxWidth,W=0,re=0,ne=0,be=0;r.each(function(he){var te=he[0].height,ke=Pz(he,n,d,u),Ee=O?ke:T;l||(Ee+=h),Ee+f+re-h>=n._maxWidth&&(q=Math.max(q,be),re=0,ne+=W,n._height+=W,W=0),qh.setTranslate(this,L[0]+f+re,L[1]+f+ne+te/2+h),be=re+ke+h,re+=Ee,W=Math.max(W,te)}),O?(n._width=re+c,n._height=W+p):(n._width=Math.max(q,be)+c,n._height+=W+p)}}n._width=Math.ceil(Math.max(n._width+L[0],n._titleWidth+2*(f+td.titlePad))),n._height=Math.ceil(Math.max(n._height+L[1],n._titleHeight+2*(f+td.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var ze=e._context.edits,Ce=ze.legendText||ze.legendPosition;r.each(function(he){var te=Sv.select(this).select("."+a+"toggle"),ke=he[0].height,Ee=he[0].trace.legendgroup,Me=Pz(he,n,d);u&&Ee!==""&&(Me=E[Ee]);var Oe=Ce?d:A||Me;!s&&!l&&(Oe+=h/2),qh.setRect(te,0,-ke/2,Oe,ke)})}function llt(e,t,r,n){var i=e._fullLayout,a=i[t],o=Rz(a),s=Fz(a),u=a.xref==="paper",l=a.yref==="paper";e._fullLayout._reservedMargin[t]={};var f=a.y<.5?"b":"t",c=a.x<.5?"l":"r",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(u&&l)return UN.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*B3[o],r:a._width*gle[o],b:a._effHeight*gle[s],t:a._effHeight*B3[s]});u?e._fullLayout._reservedMargin[t][f]=h[f]:l||a.orientation==="v"?e._fullLayout._reservedMargin[t][c]=h[c]:e._fullLayout._reservedMargin[t][f]=h[f]}function Rz(e){return Fh.isRightAnchor(e)?"right":Fh.isCenterAnchor(e)?"center":"left"}function Fz(e){return Fh.isBottomAnchor(e)?"bottom":Fh.isMiddleAnchor(e)?"middle":"top"}function qz(e){return e._id||"legend"}});var ZN=Se(jN=>{"use strict";var Db=Nl(),Sg=_u(),Mle=cd(),fh=Zr(),ult=fh.pushUnique,GN=fh.strTranslate,flt=fh.strRotate,clt=y3(),A0=Bf(),hlt=Yse(),bm=yu(),vd=Pl(),Bz=gp(),wm=hu(),dlt=dd().zindexSeparator,U3=Ul(),Ay=rv(),Rb=PM(),plt=zN(),vlt=HN(),Dle=Rb.YANGLE,WN=Math.PI*Dle/180,ylt=1/Math.sin(WN),mlt=Math.cos(WN),glt=Math.sin(WN),Wc=Rb.HOVERARROWSIZE,mf=Rb.HOVERTEXTPAD,Ele={box:!0,ohlc:!0,violin:!0,candlestick:!0},_lt={scatter:!0,scattergl:!0,splom:!0};function kle(e,t){return e.distance-t.distance}jN.hover=function(t,r,n,i){t=fh.getGraphDiv(t);var a=r.target;fh.throttle(t._fullLayout._uid+Rb.HOVERID,Rb.HOVERMINTIME,function(){xlt(t,r,n,i,a)})};jN.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Ole(i),o=Nle(i),s=t.map(function(b){var y=b._x0||b.x0||b.x||0,k=b._x1||b.x1||b.x||0,E=b._y0||b.y0||b.y||0,A=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var _=Math.min(y,k),C=Math.max(y,k),M=Math.min(E,A),v=Math.max(E,A),z=b.trace;if(U3.traceIs(z,"gl3d")){var T=i._fullLayout[z.scene]._scene.container,F=T.offsetLeft,q=T.offsetTop;_+=F,C+=F,M+=q,v+=q}L.bbox={x0:_+o,x1:C+o,y0:M+a,y1:v+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}}),u=!1,l=Fle(s,{gd:i,hovermode:"closest",rotateLabels:u,bgColor:r.bgColor||vd.background,container:Db.select(r.container),outerContainer:r.outerContainer||r.container}),f=l.hoverLabels,c=5,h=0,d=0;f.sort(function(b,y){return b.y0-y.y0}).each(function(b,y){var k=b.y0-b.by/2;k-c<h?b.offset=h-k+c:b.offset=0,h=k+b.by+b.offset,y===r.anchorIndex&&(d=b.offset)}).each(function(b){b.offset-=d});var p=i._fullLayout._invScaleX,x=i._fullLayout._invScaleY;return Ble(f,u,p,x),n?f:f.node()};function xlt(e,t,r,n,i){r||(r="xy"),typeof r=="string"&&(r=r.split(dlt)[0]);var a=Array.isArray(r)?r:[r],o,s=e._fullLayout,u=s.hoversubplots,l=s._plots||[],f=l[r],c=s._has("cartesian"),h=t.hovermode||s.hovermode,d=(h||"").charAt(0)==="x",p=(h||"").charAt(0)==="y",x,b;if(c&&(d||p)&&u==="axis"){for(var y=a.length,k=0;k<y;k++)if(o=a[k],l[o]){x=wm.getFromId(e,o,"x"),b=wm.getFromId(e,o,"y");var E=(d?x:b)._subplotsWith;if(E&&E.length)for(var A=0;A<E.length;A++)ult(a,E[A])}}if(f&&u!=="single"){var L=f.overlays.map(function(xi){return xi.id});a=a.concat(L)}for(var _=a.length,C=new Array(_),M=new Array(_),v=!1,z=0;z<_;z++)if(o=a[z],l[o])v=!0,C[z]=l[o].xaxis,M[z]=l[o].yaxis;else if(s[o]&&s[o]._subplot){var T=s[o]._subplot;C[z]=T.xaxis,M[z]=T.yaxis}else{fh.warn("Unrecognized subplot: "+o);return}if(h&&!v&&(h="closest"),["x","y","closest","x unified","y unified"].indexOf(h)===-1||!e.calcdata||e.querySelector(".zoombox")||e._dragging)return Bz.unhoverRaw(e,t);var F=s.hoverdistance;F===-1&&(F=1/0);var q=s.spikedistance;q===-1&&(q=1/0);var U=[],H=[],j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me={hLinePoint:null,vLinePoint:null},Oe=!1;if(Array.isArray(t))for(h="array",O=0;O<t.length;O++)re=e.calcdata[t[O].curveNumber||0],re&&(ne=re[0].trace,re[0].trace.hoverinfo!=="skip"&&(H.push(re),ne.orientation==="h"&&(Oe=!0)));else{var Re=e.calcdata.slice();for(Re.sort(function(xi,Hi){var Jr=xi[0].trace.zorder||0,ci=Hi[0].trace.zorder||0;return Jr-ci}),W=0;W<Re.length;W++)re=Re[W],ne=re[0].trace,ne.hoverinfo!=="skip"&&Ay.isTraceInSubplots(ne,a)&&(H.push(re),ne.orientation==="h"&&(Oe=!0));var me=!i,Be,fe;if(me)"xpx"in t?Be=t.xpx:Be=C[0]._length/2,"ypx"in t?fe=t.ypx:fe=M[0]._length/2;else{if(clt.triggerHandler(e,"plotly_beforehover",t)===!1)return;var Ze=i.getBoundingClientRect();Be=t.clientX-Ze.left,fe=t.clientY-Ze.top,s._calcInverseTransform(e);var et=fh.apply3DTransform(s._invTransform)(Be,fe);if(Be=et[0],fe=et[1],Be<0||Be>C[0]._length||fe<0||fe>M[0]._length)return Bz.unhoverRaw(e,t)}if(t.pointerX=Be+C[0]._offset,t.pointerY=fe+M[0]._offset,"xval"in t?j=Ay.flat(a,t.xval):j=Ay.p2c(C,Be),"yval"in t?G=Ay.flat(a,t.yval):G=Ay.p2c(M,fe),!Sg(j[0])||!Sg(G[0]))return fh.warn("Fx.hover failed",t,e),Bz.unhoverRaw(e,t)}var gt=1/0;function Pt(xi,Hi){for(W=0;W<H.length;W++)if(re=H[W],!(!re||!re[0]||!re[0].trace)&&(ne=re[0].trace,!(ne.visible!==!0||ne._length===0)&&["carpet","contourcarpet"].indexOf(ne._module.name)===-1)){if(Ce=h,Ay.isUnifiedHover(Ce)&&(Ce=Ce.charAt(0)),ne.type==="splom"?(ze=0,be=a[ze]):(be=Ay.getSubplot(ne),ze=a.indexOf(be)),ke={cd:re,trace:ne,xa:C[ze],ya:M[ze],maxHoverDistance:F,maxSpikeDistance:q,index:!1,distance:Math.min(gt,F),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:vd.defaultLine,name:ne.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[be]&&(ke.subplot=s[be]._subplot),s._splomScenes&&s._splomScenes[ne.uid]&&(ke.scene=s._splomScenes[ne.uid]),Ce==="array"){var Jr=t[W];"pointNumber"in Jr?(ke.index=Jr.pointNumber,Ce="closest"):(Ce="","xval"in Jr&&(he=Jr.xval,Ce="x"),"yval"in Jr&&(te=Jr.yval,Ce=Ce?"closest":"y"))}else xi!==void 0&&Hi!==void 0?(he=xi,te=Hi):(he=j[ze],te=G[ze]);if(Ee=U.length,F!==0)if(ne._module&&ne._module.hoverPoints){var ci=ne._module.hoverPoints(ke,he,te,Ce,{finiteRange:!0,hoverLayer:s._hoverlayer,hoversubplots:u,gd:e});if(ci)for(var Di,Lt=0;Lt<ci.length;Lt++)Di=ci[Lt],Sg(Di.x0)&&Sg(Di.y0)&&U.push(Alt(Di,h))}else fh.log("Unrecognized trace type in hover:",ne);if(h==="closest"&&U.length>Ee&&(U.splice(0,Ee),gt=U[0].distance),c&&q!==0&&U.length===0){ke.distance=q,ke.index=!1;var vt=ne._module.hoverPoints(ke,he,te,"closest",{hoverLayer:s._hoverlayer});if(vt&&(vt=vt.filter(function(Tr){return Tr.spikeDistance<=q})),vt&&vt.length){var Dt,Bt=vt.filter(function(Tr){return Tr.xa.showspikes&&Tr.xa.spikesnap!=="hovered data"});if(Bt.length){var sr=Bt[0];Sg(sr.x0)&&Sg(sr.y0)&&(Dt=Xe(sr),(!Me.vLinePoint||Me.vLinePoint.spikeDistance>Dt.spikeDistance)&&(Me.vLinePoint=Dt))}var br=vt.filter(function(Tr){return Tr.ya.showspikes&&Tr.ya.spikesnap!=="hovered data"});if(br.length){var zr=br[0];Sg(zr.x0)&&Sg(zr.y0)&&(Dt=Xe(zr),(!Me.hLinePoint||Me.hLinePoint.spikeDistance>Dt.spikeDistance)&&(Me.hLinePoint=Dt))}}}}}Pt();function Qe(xi,Hi,Jr){for(var ci=null,Di=1/0,Lt,vt=0;vt<xi.length;vt++)x&&x._id!==xi[vt].xa._id||b&&b._id!==xi[vt].ya._id||(Lt=xi[vt].spikeDistance,Jr&&vt===0&&(Lt=-1/0),Lt<=Di&&Lt<=Hi&&(ci=xi[vt],Di=Lt));return ci}function Xe(xi){return xi?{xa:xi.xa,ya:xi.ya,x:xi.xSpike!==void 0?xi.xSpike:(xi.x0+xi.x1)/2,y:xi.ySpike!==void 0?xi.ySpike:(xi.y0+xi.y1)/2,distance:xi.distance,spikeDistance:xi.spikeDistance,curveNumber:xi.trace.index,color:xi.color,pointNumber:xi.index}:null}var Tt={fullLayout:s,container:s._hoverlayer,event:t},xt=e._spikepoints,_t={vLinePoint:Me.vLinePoint,hLinePoint:Me.hLinePoint};e._spikepoints=_t;var Ct=function(){var xi=U.filter(function(Jr){return x&&x._id===Jr.xa._id&&b&&b._id===Jr.ya._id}),Hi=U.filter(function(Jr){return!(x&&x._id===Jr.xa._id&&b&&b._id===Jr.ya._id)});xi.sort(kle),Hi.sort(kle),U=xi.concat(Hi),U=Mlt(U,h)};Ct();var jt=h.charAt(0),At=(jt==="x"||jt==="y")&&U[0]&&_lt[U[0].trace.type];if(c&&q!==0&&U.length!==0){var Te=U.filter(function(xi){return xi.ya.showspikes}),nt=Qe(Te,q,At);Me.hLinePoint=Xe(nt);var ut=U.filter(function(xi){return xi.xa.showspikes}),ct=Qe(ut,q,At);Me.vLinePoint=Xe(ct)}if(U.length===0){var rt=Bz.unhoverRaw(e,t);return c&&(Me.hLinePoint!==null||Me.vLinePoint!==null)&&zle(xt)&&Lle(e,Me,Tt),rt}if(c&&zle(xt)&&Lle(e,Me,Tt),Ay.isXYhover(Ce)&&U[0].length!==0&&U[0].trace.type!=="splom"){var je=U[0];Ele[je.trace.type]?U=U.filter(function(xi){return xi.trace.index===je.trace.index}):U=[je];var tt=U.length,Je=Ile("x",je,s),Mt=Ile("y",je,s);Pt(Je,Mt);var Vt=[],Kt={},ir=0,fr=function(xi){var Hi=Ele[xi.trace.type]?Rle(xi):xi.trace.index;if(!Kt[Hi])ir++,Kt[Hi]=ir,Vt.push(xi);else{var Jr=Kt[Hi]-1,ci=Vt[Jr];Jr>0&&Math.abs(xi.distance)<Math.abs(ci.distance)&&(Vt[Jr]=xi)}},Ot;for(Ot=0;Ot<tt;Ot++)fr(U[Ot]);for(Ot=U.length-1;Ot>tt-1;Ot--)fr(U[Ot]);U=Vt,Ct()}var De=e._hoverdata,_e=[],Fe=Ole(e),Pe=Nle(e);for(O=0;O<U.length;O++){var Ie=U[O],lt=Ay.makeEventData(Ie,Ie.trace,Ie.cd);if(Ie.hovertemplate!==!1){var ye=!1;Ie.cd[Ie.index]&&Ie.cd[Ie.index].ht&&(ye=Ie.cd[Ie.index].ht),Ie.hovertemplate=ye||Ie.trace.hovertemplate||!1}if(Ie.xa&&Ie.ya){var ue=Ie.x0+Ie.xa._offset,de=Ie.x1+Ie.xa._offset,ht=Ie.y0+Ie.ya._offset,Et=Ie.y1+Ie.ya._offset,St=Math.min(ue,de),Zt=Math.max(ue,de),qr=Math.min(ht,Et),Lr=Math.max(ht,Et);lt.bbox={x0:St+Pe,x1:Zt+Pe,y0:qr+Fe,y1:Lr+Fe}}Ie.eventData=[lt],_e.push(lt)}e._hoverdata=_e;var vr=h==="y"&&(H.length>1||U.length>1)||h==="closest"&&Oe&&U.length>1,Er=vd.combine(s.plot_bgcolor||vd.background,s.paper_bgcolor),si=Fle(U,{gd:e,hovermode:h,rotateLabels:vr,bgColor:Er,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Ei=si.hoverLabels;if(Ay.isUnifiedHover(h)||(wlt(Ei,vr,s,si.commonLabelBoundingBox),Ble(Ei,vr,s._invScaleX,s._invScaleY)),i&&i.tagName){var Si=U3.getComponentMethod("annotations","hasClickToShow")(e,_e);hlt(Db.select(i),Si?"pointer":"")}!i||n||!Slt(e,t,De)||(De&&e.emit("plotly_unhover",{event:t,points:De}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:C,yaxes:M,xvals:j,yvals:G}))}function Rle(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 blt=/<extra>([\s\S]*)<\/extra>/;function Fle(e,t){var r=t.gd,n=r._fullLayout,i=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,u=t.outerContainer,l=t.commonLabelOpts||{};if(e.length===0)return[[]];var f=t.fontFamily||Rb.HOVERFONT,c=t.fontSize||Rb.HOVERFONTSIZE,h=t.fontWeight||n.font.weight,d=t.fontStyle||n.font.style,p=t.fontVariant||n.font.variant,x=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,y=t.fontShadow||n.font.shadow,k=e[0],E=k.xa,A=k.ya,L=i.charAt(0),_=L+"Label",C=k[_];if(C===void 0&&E.type==="multicategory")for(var M=0;M<e.length&&(C=e[M][_],C===void 0);M++);var v=N3(r,u),z=v.top,T=v.width,F=v.height,q=C!==void 0&&k.distance<=t.hoverdistance&&(i==="x"||i==="y");if(q){var U=!0,H,j;for(H=0;H<e.length;H++)if(U&&e[H].zLabel===void 0&&(U=!1),j=e[H].hoverinfo||e[H].trace.hoverinfo,j){var G=Array.isArray(j)?j:j.split("+");if(G.indexOf("all")===-1&&G.indexOf(i)===-1){q=!1;break}}U&&(q=!1)}var O=s.selectAll("g.axistext").data(q?[0]:[]);O.enter().append("g").classed("axistext",!0),O.exit().remove();var W={minX:0,maxX:0,minY:0,maxY:0};if(O.each(function(){var ut=Db.select(this),ct=fh.ensureSingle(ut,"path","",function(St){St.style({"stroke-width":"1px"})}),rt=fh.ensureSingle(ut,"text","",function(St){St.attr("data-notex",1)}),je=l.bgcolor||vd.defaultLine,tt=l.bordercolor||vd.contrast(je),Je=vd.contrast(je),Mt=l.font,Vt={weight:Mt.weight||h,style:Mt.style||d,variant:Mt.variant||p,textcase:Mt.textcase||x,lineposition:Mt.lineposition||b,shadow:Mt.shadow||y,family:Mt.family||f,size:Mt.size||c,color:Mt.color||Je};ct.style({fill:je,stroke:tt}),rt.text(C).call(bm.font,Vt).call(A0.positionText,0,0).call(A0.convertToTspans,r),ut.attr("transform","");var Kt=N3(r,rt.node()),ir,fr;if(i==="x"){var Ot=E.side==="top"?"-":"";rt.attr("text-anchor","middle").call(A0.positionText,0,E.side==="top"?z-Kt.bottom-Wc-mf:z-Kt.top+Wc+mf),ir=E._offset+(k.x0+k.x1)/2,fr=A._offset+(E.side==="top"?0:A._length);var De=Kt.width/2+mf,_e=ir;ir<De?_e=De:ir>n.width-De&&(_e=n.width-De),ct.attr("d","M"+(ir-_e)+",0L"+(ir-_e+Wc)+","+Ot+Wc+"H"+De+"v"+Ot+(mf*2+Kt.height)+"H"+-De+"V"+Ot+Wc+"H"+(ir-_e-Wc)+"Z"),ir=_e,W.minX=ir-De,W.maxX=ir+De,E.side==="top"?(W.minY=fr-(mf*2+Kt.height),W.maxY=fr-mf):(W.minY=fr+mf,W.maxY=fr+(mf*2+Kt.height))}else{var Fe,Pe,Ie;A.side==="right"?(Fe="start",Pe=1,Ie="",ir=E._offset+E._length):(Fe="end",Pe=-1,Ie="-",ir=E._offset),fr=A._offset+(k.y0+k.y1)/2,rt.attr("text-anchor",Fe),ct.attr("d","M0,0L"+Ie+Wc+","+Wc+"V"+(mf+Kt.height/2)+"h"+Ie+(mf*2+Kt.width)+"V-"+(mf+Kt.height/2)+"H"+Ie+Wc+"V-"+Wc+"Z"),W.minY=fr-(mf+Kt.height/2),W.maxY=fr+(mf+Kt.height/2),A.side==="right"?(W.minX=ir+Wc,W.maxX=ir+Wc+(mf*2+Kt.width)):(W.minX=ir-Wc-(mf*2+Kt.width),W.maxX=ir-Wc);var lt=Kt.height/2,ye=z-Kt.top-lt,ue="clip"+n._uid+"commonlabel"+A._id,de;if(ir<Kt.width+2*mf+Wc){de="M-"+(Wc+mf)+"-"+lt+"h-"+(Kt.width-mf)+"V"+lt+"h"+(Kt.width-mf)+"Z";var ht=Kt.width-ir+mf;A0.positionText(rt,ht,ye),Fe==="end"&&rt.selectAll("tspan").each(function(){var St=Db.select(this),Zt=bm.tester.append("text").text(St.text()).call(bm.font,Vt),qr=N3(r,Zt.node());Math.round(qr.width)<Math.round(Kt.width)&&St.attr("x",ht-qr.width),Zt.remove()})}else A0.positionText(rt,Pe*(mf+Wc),ye),de=null;var Et=n._topclips.selectAll("#"+ue).data(de?[0]:[]);Et.enter().append("clipPath").attr("id",ue).append("path"),Et.exit().remove(),Et.select("path").attr("d",de),bm.setClipUrl(rt,de?ue:null,r)}ut.attr("transform",GN(ir,fr))}),Ay.isUnifiedHover(i)){s.selectAll("g.hovertext").remove();var re=e.filter(function(ut){return ut.hoverinfo!=="none"});if(re.length===0)return[];var ne=n.hoverlabel,be=ne.font,ze={showlegend:!0,legend:{title:{text:C,font:be},font:be,bgcolor:ne.bgcolor,bordercolor:ne.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:"v"}},Ce={font:be};plt(ze,Ce,r._fullData);var he=Ce.legend;he.entries=[];for(var te=0;te<re.length;te++){var ke=re[te];if(ke.hoverinfo!=="none"){var Ee=Cle(ke,!0,i,n,C),Me=Ee[0],Oe=Ee[1];ke.name=Oe,Oe!==""?ke.text=Oe+" : "+Me:ke.text=Me;var Re=ke.cd[ke.index];Re&&(Re.mc&&(ke.mc=Re.mc),Re.mcc&&(ke.mc=Re.mcc),Re.mlc&&(ke.mlc=Re.mlc),Re.mlcc&&(ke.mlc=Re.mlcc),Re.mlw&&(ke.mlw=Re.mlw),Re.mrc&&(ke.mrc=Re.mrc),Re.dir&&(ke.dir=Re.dir)),ke._distinct=!0,he.entries.push([ke])}}he.entries.sort(function(ut,ct){return ut[0].trace.index-ct[0].trace.index}),he.layer=s,he._inHover=!0,he._groupTitleFont=ne.grouptitlefont,vlt(r,he);var me=s.select("g.legend"),Be=N3(r,me.node()),fe=Be.width+2*mf,Ze=Be.height+2*mf,et=re[0],gt=(et.x0+et.x1)/2,Pt=(et.y0+et.y1)/2,Qe=!(U3.traceIs(et.trace,"bar-like")||U3.traceIs(et.trace,"box-violin")),Xe,Tt;L==="y"?Qe?(Tt=Pt-mf,Xe=Pt+mf):(Tt=Math.min.apply(null,re.map(function(ut){return Math.min(ut.y0,ut.y1)})),Xe=Math.max.apply(null,re.map(function(ut){return Math.max(ut.y0,ut.y1)}))):Tt=Xe=fh.mean(re.map(function(ut){return(ut.y0+ut.y1)/2}))-Ze/2;var xt,_t;L==="x"?Qe?(xt=gt+mf,_t=gt-mf):(xt=Math.max.apply(null,re.map(function(ut){return Math.max(ut.x0,ut.x1)})),_t=Math.min.apply(null,re.map(function(ut){return Math.min(ut.x0,ut.x1)}))):xt=_t=fh.mean(re.map(function(ut){return(ut.x0+ut.x1)/2}))-fe/2;var Ct=E._offset,jt=A._offset;Xe+=jt,xt+=Ct,_t+=Ct-fe,Tt+=jt-Ze;var At,Te;return xt+fe<T&&xt>=0?At=xt:_t+fe<T&&_t>=0?At=_t:Ct+fe<T?At=Ct:xt-gt<gt-_t+fe?At=T-fe:At=0,At+=mf,Xe+Ze<F&&Xe>=0?Te=Xe:Tt+Ze<F&&Tt>=0?Te=Tt:jt+Ze<F?Te=jt:Xe-Pt<Pt-Tt+Ze?Te=F-Ze:Te=0,Te+=mf,me.attr("transform",GN(At-1,Te-1)),me}var nt=s.selectAll("g.hovertext").data(e,function(ut){return Rle(ut)});return nt.enter().append("g").classed("hovertext",!0).each(function(){var ut=Db.select(this);ut.append("rect").call(vd.fill,vd.addOpacity(o,.8)),ut.append("text").classed("name",!0),ut.append("path").style("stroke-width","1px"),ut.append("text").classed("nums",!0).call(bm.font,{weight:h,style:d,variant:p,textcase:x,lineposition:b,shadow:y,family:f,size:c})}),nt.exit().remove(),nt.each(function(ut){var ct=Db.select(this).attr("transform",""),rt=ut.color;Array.isArray(rt)&&(rt=rt[ut.eventData[0].pointNumber]);var je=ut.bgcolor||rt,tt=vd.combine(vd.opacity(je)?je:vd.defaultLine,o),Je=vd.combine(vd.opacity(rt)?rt:vd.defaultLine,o),Mt=ut.borderColor||vd.contrast(tt),Vt=Cle(ut,q,i,n,C,ct),Kt=Vt[0],ir=Vt[1],fr=ct.select("text.nums").call(bm.font,{family:ut.fontFamily||f,size:ut.fontSize||c,color:ut.fontColor||Mt,weight:ut.fontWeight||h,style:ut.fontStyle||d,variant:ut.fontVariant||p,textcase:ut.fontTextcase||x,lineposition:ut.fontLineposition||b,shadow:ut.fontShadow||y}).text(Kt).attr("data-notex",1).call(A0.positionText,0,0).call(A0.convertToTspans,r),Ot=ct.select("text.name"),De=0,_e=0;if(ir&&ir!==Kt){Ot.call(bm.font,{family:ut.fontFamily||f,size:ut.fontSize||c,color:Je,weight:ut.fontWeight||h,style:ut.fontStyle||d,variant:ut.fontVariant||p,textcase:ut.fontTextcase||x,lineposition:ut.fontLineposition||b,shadow:ut.fontShadow||y}).text(ir).attr("data-notex",1).call(A0.positionText,0,0).call(A0.convertToTspans,r);var Fe=N3(r,Ot.node());De=Fe.width+2*mf,_e=Fe.height+2*mf}else Ot.remove(),ct.select("rect").remove();ct.select("path").style({fill:tt,stroke:Mt});var Pe=ut.xa._offset+(ut.x0+ut.x1)/2,Ie=ut.ya._offset+(ut.y0+ut.y1)/2,lt=Math.abs(ut.x1-ut.x0),ye=Math.abs(ut.y1-ut.y0),ue=N3(r,fr.node()),de=ue.width/n._invScaleX,ht=ue.height/n._invScaleY;ut.ty0=(z-ue.top)/n._invScaleY,ut.bx=de+2*mf,ut.by=Math.max(ht+2*mf,_e),ut.anchor="start",ut.txwidth=de,ut.tx2width=De,ut.offset=0;var Et=(de+Wc+mf+De)*n._invScaleX,St,Zt;if(a)ut.pos=Pe,St=Ie+ye/2+Et<=F,Zt=Ie-ye/2-Et>=0,(ut.idealAlign==="top"||!St)&&Zt?(Ie-=ye/2,ut.anchor="end"):St?(Ie+=ye/2,ut.anchor="start"):ut.anchor="middle",ut.crossPos=Ie;else{if(ut.pos=Ie,St=Pe+lt/2+Et<=T,Zt=Pe-lt/2-Et>=0,(ut.idealAlign==="left"||!St)&&Zt)Pe-=lt/2,ut.anchor="end";else if(St)Pe+=lt/2,ut.anchor="start";else{ut.anchor="middle";var qr=Et/2,Lr=Pe+qr-T,vr=Pe-qr;Lr>0&&(Pe-=Lr),vr<0&&(Pe+=-vr)}ut.crossPos=Pe}fr.attr("text-anchor",ut.anchor),De&&Ot.attr("text-anchor",ut.anchor),ct.attr("transform",GN(Pe,Ie)+(a?flt(Dle):""))}),{hoverLabels:nt,commonLabelBoundingBox:W}}function Cle(e,t,r,n,i,a){var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=fh.templateString(e.name,e.trace._meta)),o=Ple(e.name,e.nameLength));var u=r.charAt(0),l=u==="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[u+"Label"]===i?s=e[l+"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);var f=e.hovertemplate||!1;if(f){var c=e.hovertemplateLabels||e;e[u+"Label"]!==i&&(c[u+"other"]=c[u+"Val"],c[u+"otherLabel"]=c[u+"Label"]),s=fh.hovertemplateString(f,c,n._d3locale,e.eventData[0]||{},e.trace._meta),s=s.replace(blt,function(h,d){return o=Ple(d,e.nameLength),""})}return[s,o]}function wlt(e,t,r,n){var i=t?"xa":"ya",a=t?"ya":"xa",o=0,s=1,u=e.size(),l=new Array(u),f=0,c=n.minX,h=n.maxX,d=n.minY,p=n.maxY,x=function(j){return j*r._invScaleX},b=function(j){return j*r._invScaleY};e.each(function(j){var G=j[i],O=j[a],W=G._id.charAt(0)==="x",re=G.range;f===0&&re&&re[0]>re[1]!==W&&(s=-1);var ne=0,be=W?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var ze=qle(j,t),Ce=j.anchor,he=Ce==="end"?-1:1,te,ke;if(Ce==="middle")te=j.crossPos+(W?b(ze.y-j.by/2):x(j.bx/2+j.tx2width/2)),ke=te+(W?b(j.by):x(j.bx));else if(W)te=j.crossPos+b(Wc+ze.y)-b(j.by/2-Wc),ke=te+b(j.by);else{var Ee=x(he*Wc+ze.x),Me=Ee+x(he*j.bx);te=j.crossPos+Math.min(Ee,Me),ke=j.crossPos+Math.max(Ee,Me)}W?d!==void 0&&p!==void 0&&Math.min(ke,p)-Math.max(te,d)>1&&(O.side==="left"?(ne=O._mainLinePosition,be=r.width):be=O._mainLinePosition):c!==void 0&&h!==void 0&&Math.min(ke,h)-Math.max(te,c)>1&&(O.side==="top"?(ne=O._mainLinePosition,be=r.height):be=O._mainLinePosition)}l[f++]=[{datum:j,traceIndex:j.trace.index,dp:0,pos:j.pos,posref:j.posref,size:j.by*(W?ylt:1)/2,pmin:ne,pmax:be}]}),l.sort(function(j,G){return j[0].posref-G[0].posref||s*(G[0].traceIndex-j[0].traceIndex)});var y,k,E,A,L,_,C;function M(j){var G=j[0],O=j[j.length-1];if(k=G.pmin-G.pos-G.dp+G.size,E=O.pos+O.dp+O.size-G.pmax,k>.01){for(L=j.length-1;L>=0;L--)j[L].dp+=k;y=!1}if(!(E<.01)){if(k<-.01){for(L=j.length-1;L>=0;L--)j[L].dp-=E;y=!1}if(y){var W=0;for(A=0;A<j.length;A++)_=j[A],_.pos+_.dp+_.size>G.pmax&&W++;for(A=j.length-1;A>=0&&!(W<=0);A--)_=j[A],_.pos>G.pmax-1&&(_.del=!0,W--);for(A=0;A<j.length&&!(W<=0);A++)if(_=j[A],_.pos<G.pmin+1)for(_.del=!0,W--,E=_.size*2,L=j.length-1;L>=0;L--)j[L].dp-=E;for(A=j.length-1;A>=0&&!(W<=0);A--)_=j[A],_.pos+_.dp+_.size>G.pmax&&(_.del=!0,W--)}}}for(;!y&&o<=u;){for(o++,y=!0,A=0;A<l.length-1;){var v=l[A],z=l[A+1],T=v[v.length-1],F=z[0];if(k=T.pos+T.dp+T.size-F.pos-F.dp+F.size,k>.01){for(L=z.length-1;L>=0;L--)z[L].dp+=k;for(v.push.apply(v,z),l.splice(A+1,1),C=0,L=v.length-1;L>=0;L--)C+=v[L].dp;for(E=C/v.length,L=v.length-1;L>=0;L--)v[L].dp-=E;y=!1}else A++}l.forEach(M)}for(A=l.length-1;A>=0;A--){var q=l[A];for(L=q.length-1;L>=0;L--){var U=q[L],H=U.datum;H.offset=U.dp,H.del=U.del}}}function qle(e,t){var r=0,n=e.offset;return t&&(n*=-glt,r=e.offset*mlt),{x:r,y:n}}function Tlt(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Wc+mf),n=r+t*(e.txwidth+mf),i=e.anchor==="middle";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+mf),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Ble(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=Db.select(this);if(o.del)return s.remove();var u=s.select("text.nums"),l=o.anchor,f=l==="end"?-1:1,c=Tlt(o),h=qle(o,t),d=h.x,p=h.y,x=l==="middle";s.select("path").attr("d",x?"M-"+i(o.bx/2+o.tx2width/2)+","+a(p-o.by/2)+"h"+i(o.bx)+"v"+a(o.by)+"h-"+i(o.bx)+"Z":"M0,0L"+i(f*Wc+d)+","+a(Wc+p)+"v"+a(o.by/2-Wc)+"h"+i(f*o.bx)+"v-"+a(o.by)+"H"+i(f*Wc+d)+"V"+a(p-Wc)+"Z");var b=d+c.textShiftX,y=p+o.ty0-o.by/2+mf,k=o.textAlign||"auto";k!=="auto"&&(k==="left"&&l!=="start"?(u.attr("text-anchor","start"),b=x?-o.bx/2-o.tx2width/2+mf:-o.bx-mf):k==="right"&&l!=="end"&&(u.attr("text-anchor","end"),b=x?o.bx/2-o.tx2width/2-mf:o.bx+mf)),u.call(A0.positionText,i(b),a(y)),o.tx2width&&(s.select("text.name").call(A0.positionText,i(c.text2ShiftX+c.alignShift*mf+d),a(p+o.ty0-o.by/2+mf)),s.select("rect").call(bm.setRect,i(c.text2ShiftX+(c.alignShift-1)*o.tx2width/2+d),a(p-o.by/2-1),i(o.tx2width),a(o.by+2)))})}function Alt(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||Sg(h)&&h===0}var s=Array.isArray(r)?function(h,d){var p=fh.castOption(i,r,h);return o(p)?p:fh.extractOption({},n,"",d)}:function(h,d){return fh.extractOption(a,n,h,d)};function u(h,d,p){var x=s(d,p);o(x)&&(e[h]=x)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("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=fh.constrain(e.x0,0,e.xa._length),e.x1=fh.constrain(e.x1,0,e.xa._length),e.y0=fh.constrain(e.y0,0,e.ya._length),e.y1=fh.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:wm.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:wm.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 l=wm.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+l+" / -"+wm.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+l,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=wm.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+wm.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,t==="y"&&(e.distance+=1)}var c=e.hoverinfo||e.trace.hoverinfo;return c&&c!=="all"&&(c=Array.isArray(c)?c:c.split("+"),c.indexOf("x")===-1&&(e.xLabel=void 0),c.indexOf("y")===-1&&(e.yLabel=void 0),c.indexOf("z")===-1&&(e.zLabel=void 0),c.indexOf("text")===-1&&(e.text=void 0),c.indexOf("name")===-1&&(e.name=void 0)),e}function Lle(e,t,r){var n=r.container,i=r.fullLayout,a=i._size,o=r.event,s=!!t.hLinePoint,u=!!t.vLinePoint,l,f;if(n.selectAll(".spikeline").remove(),!!(u||s)){var c=vd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,p;l=h&&h.xa,f=h&&h.ya;var x=f.spikesnap;x==="cursor"?(d=o.pointerX,p=o.pointerY):(d=l._offset+h.x,p=f._offset+h.y);var b=Mle.readability(h.color,c)<1.5?vd.contrast(c):h.color,y=f.spikemode,k=f.spikethickness,E=f.spikecolor||b,A=wm.getPxPosition(e,f),L,_;if(y.indexOf("toaxis")!==-1||y.indexOf("across")!==-1){if(y.indexOf("toaxis")!==-1&&(L=A,_=d),y.indexOf("across")!==-1){var C=f._counterDomainMin,M=f._counterDomainMax;f.anchor==="free"&&(C=Math.min(C,f.position),M=Math.max(M,f.position)),L=a.l+C*a.w,_=a.l+M*a.w}n.insert("line",":first-child").attr({x1:L,x2:_,y1:p,y2:p,"stroke-width":k,stroke:E,"stroke-dasharray":bm.dashStyle(f.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:_,y1:p,y2:p,"stroke-width":k+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}y.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:A+(f.side!=="right"?k:-k),cy:p,r:k,fill:E}).classed("spikeline",!0)}if(u){var v=t.vLinePoint,z,T;l=v&&v.xa,f=v&&v.ya;var F=l.spikesnap;F==="cursor"?(z=o.pointerX,T=o.pointerY):(z=l._offset+v.x,T=f._offset+v.y);var q=Mle.readability(v.color,c)<1.5?vd.contrast(c):v.color,U=l.spikemode,H=l.spikethickness,j=l.spikecolor||q,G=wm.getPxPosition(e,l),O,W;if(U.indexOf("toaxis")!==-1||U.indexOf("across")!==-1){if(U.indexOf("toaxis")!==-1&&(O=G,W=T),U.indexOf("across")!==-1){var re=l._counterDomainMin,ne=l._counterDomainMax;l.anchor==="free"&&(re=Math.min(re,l.position),ne=Math.max(ne,l.position)),O=a.t+(1-ne)*a.h,W=a.t+(1-re)*a.h}n.insert("line",":first-child").attr({x1:z,x2:z,y1:O,y2:W,"stroke-width":H,stroke:j,"stroke-dasharray":bm.dashStyle(l.spikedash,H)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:z,x2:z,y1:O,y2:W,"stroke-width":H+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}U.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:z,cy:G-(l.side!=="top"?H:-H),r:H,fill:j}).classed("spikeline",!0)}}}function Slt(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))return!0}return!1}function zle(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Ple(e,t){return A0.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Mlt(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;o<e.length;o++){var s=e[o];U3.traceIs(s.trace,"bar-like")||U3.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 Ile(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],u=s[e+"Start"];u===void 0&&(u=s[e]);var l=s[e+"End"];l===void 0&&(l=s[e]);var f=l-u;o==="end"?i+=f:o==="middle"&&(i+=f/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}function Ole(e){return e.offsetTop+e.clientTop}function Nle(e){return e.offsetLeft+e.clientLeft}function N3(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,a=n.top,o=i+n.width,s=a+n.height,u=fh.apply3DTransform(r._invTransform)(i,a),l=fh.apply3DTransform(r._invTransform)(o,s),f=u[0],c=u[1],h=l[0],d=l[1];return{x:f,y:c,width:h-f,height:d-c,top:Math.min(c,d),left:Math.min(f,h),right:Math.max(f,h),bottom:Math.max(c,d)}}});var o5=Se((unr,Ule)=>{"use strict";var Elt=Zr(),klt=Pl(),Clt=rv().isUnifiedHover;Ule.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&&Clt(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(i.bgcolor||(i.bgcolor=klt.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),Elt.coerceFont(n,"hoverlabel.font",i.font),n("hoverlabel.align",i.align)}});var Hle=Se((fnr,Vle)=>{"use strict";var Llt=Zr(),zlt=o5(),Plt=O1();Vle.exports=function(t,r){function n(i,a){return Llt.coerce(t,r,Plt,i,a)}zlt(t,r,n)}});var jle=Se((cnr,Wle)=>{"use strict";var Gle=Zr(),Ilt=i3(),Dlt=o5();Wle.exports=function(t,r,n,i){function a(s,u){return Gle.coerce(t,r,Ilt,s,u)}var o=Gle.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Dlt(t,r,a,o)}});var XN=Se((hnr,Zle)=>{"use strict";var Rlt=Zr(),Flt=O1();Zle.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:Rlt.coerce(t,r,Flt,i,a)}return n("clickmode"),n("hoversubplots"),n("hovermode")}});var Kle=Se((dnr,Yle)=>{"use strict";var Xle=Zr(),qlt=O1(),Blt=XN(),Olt=o5();Yle.exports=function(t,r){function n(f,c){return Xle.coerce(t,r,qlt,f,c)}var i=Blt(t,r);i&&(n("hoverdistance"),n("spikedistance"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=r._has("mapbox"),s=r._has("map"),u=r._has("geo"),l=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s||u)&&l===1||(o||s)&&u&&l===2)&&(r.dragmode="pan"),Olt(t,r,n),Xle.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var Qle=Se((pnr,$le)=>{"use strict";var YN=Zr(),Jle=Ul();$le.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(l){return function(f){return YN.coerceHoverinfo({hoverinfo:f},{_module:l._module},n)}}for(var a=0;a<r.length;a++){var o=r[a],s=o[0].trace;if(!Jle.traceIs(s,"pie-like")){var u=Jle.traceIs(s,"2dMap")?Nlt:YN.fillArray;u(s.hoverinfo,o,"hi",i(s)),s.hovertemplate&&u(s.hovertemplate,o,"ht"),s.hoverlabel&&(u(s.hoverlabel.bgcolor,o,"hbg"),u(s.hoverlabel.bordercolor,o,"hbc"),u(s.hoverlabel.font.size,o,"hts"),u(s.hoverlabel.font.color,o,"htc"),u(s.hoverlabel.font.family,o,"htf"),u(s.hoverlabel.font.weight,o,"htw"),u(s.hoverlabel.font.style,o,"hty"),u(s.hoverlabel.font.variant,o,"htv"),u(s.hoverlabel.namelength,o,"hnl"),u(s.hoverlabel.align,o,"hta"))}}};function Nlt(e,t,r,n){n=n||YN.identity,Array.isArray(e)&&(t[0][r]=n(e))}});var tue=Se((vnr,eue)=>{"use strict";var Ult=Ul(),Vlt=ZN().hover;eue.exports=function(t,r,n){var i=Ult.getComponentMethod("annotations","onClick")(t,t._hoverdata);n!==void 0&&Vlt(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 jc=Se((ynr,nue)=>{"use strict";var Hlt=Nl(),Oz=Zr(),Glt=gp(),s5=rv(),rue=O1(),iue=ZN();nue.exports={moduleType:"component",name:"fx",constants:PM(),schema:{layout:rue},attributes:i3(),layoutAttributes:rue,supplyLayoutGlobalDefaults:Hle(),supplyDefaults:jle(),supplyLayoutDefaults:Kle(),calc:Qle(),getDistanceFunction:s5.getDistanceFunction,getClosest:s5.getClosest,inbox:s5.inbox,quadrature:s5.quadrature,appendArrayPointValue:s5.appendArrayPointValue,castHoverOption:jlt,castHoverinfo:Zlt,hover:iue.hover,unhover:Glt.unhover,loneHover:iue.loneHover,loneUnhover:Wlt,click:tue()};function Wlt(e){var t=Oz.isD3Selection(e)?e:Hlt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function jlt(e,t,r){return Oz.castOption(e,t,"hoverlabel."+r)}function Zlt(e,t,r){function n(i){return Oz.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return Oz.castOption(e,r,"hoverinfo",n)}});var Sy=Se(Mg=>{"use strict";Mg.selectMode=function(e){return e==="lasso"||e==="select"};Mg.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Mg.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Mg.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Mg.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Mg.selectingOrDrawing=function(e){return Mg.freeMode(e)||Mg.rectMode(e)}});var l5=Se((gnr,aue)=>{"use strict";aue.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 Nz=Se((_nr,oue)=>{"use strict";oue.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 Vz=Se((xnr,sue)=>{"use strict";var Uz=32;sue.exports={CIRCLE_SIDES:Uz,i000:0,i090:Uz/4,i180:Uz/2,i270:Uz/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var Hz=Se((bnr,uue)=>{"use strict";var Xlt=Zr().strTranslate;function lue(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 Ylt(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 Klt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return lue(e,r[t])}}function Jlt(e){return Xlt(e.xaxis._offset,e.yaxis._offset)}uue.exports={p2r:lue,r2p:Ylt,axValue:Klt,getTransform:Jlt}});var u_=Se(Eg=>{"use strict";var $lt=XM(),hue=Vz(),V3=hue.CIRCLE_SIDES,KN=hue.SQRT2,due=Hz(),fue=due.p2r,cue=due.r2p,Qlt=[0,3,4,5,6,1,2],eut=[0,3,4,1,2];Eg.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,u=0;u<s;u++){var l=u;o==="Q"||o==="S"?l=eut[u]:o==="C"&&(l=Qlt[u]),r+=e[n][a][l],u>0&&u<s-1&&(r+=",")}}return r};Eg.readPaths=function(e,t,r,n){var i=$lt(e),a=[],o=-1,s=function(){o++,a[o]=[]},u,l=0,f=0,c,h,d=function(){c=l,h=f};d();for(var p=0;p<i.length;p++){var x=[],b,y,k,E,A=i[p][0],L=A;switch(A){case"M":s(),l=+i[p][1],f=+i[p][2],x.push([L,l,f]),d();break;case"Q":case"S":b=+i[p][1],k=+i[p][2],l=+i[p][3],f=+i[p][4],x.push([L,l,f,b,k]);break;case"C":b=+i[p][1],k=+i[p][2],y=+i[p][3],E=+i[p][4],l=+i[p][5],f=+i[p][6],x.push([L,l,f,b,k,y,E]);break;case"T":case"L":l=+i[p][1],f=+i[p][2],x.push([L,l,f]);break;case"H":L="L",l=+i[p][1],x.push([L,l,f]);break;case"V":L="L",f=+i[p][1],x.push([L,l,f]);break;case"A":L="L";var _=+i[p][1],C=+i[p][2];+i[p][4]||(_=-_,C=-C);var M=l-_,v=f;for(u=1;u<=V3/2;u++){var z=2*Math.PI*u/V3;x.push([L,M+_*Math.cos(z),v+C*Math.sin(z)])}break;case"Z":(l!==c||f!==h)&&(l=c,f=h,x.push([L,l,f]));break}for(var T=(r||{}).domain,F=t._fullLayout._size,q=r&&r.xsizemode==="pixel",U=r&&r.ysizemode==="pixel",H=n===!1,j=0;j<x.length;j++){for(u=0;u+2<7;u+=2){var G=x[j][u+1],O=x[j][u+2];G===void 0||O===void 0||(l=G,f=O,r&&(r.xaxis&&r.xaxis.p2r?(H&&(G-=r.xaxis._offset),q?G=cue(r.xaxis,r.xanchor)+G:G=fue(r.xaxis,G)):(H&&(G-=F.l),T?G=T.x[0]+G/F.w:G=G/F.w),r.yaxis&&r.yaxis.p2r?(H&&(O-=r.yaxis._offset),U?O=cue(r.yaxis,r.yanchor)-O:O=fue(r.yaxis,O)):(H&&(O-=F.t),T?O=T.y[1]-O/F.h:O=1-O/F.h)),x[j][u+1]=G,x[j][u+2]=O)}a[o].push(x[j].slice())}}return a};function u5(e,t){return Math.abs(e-t)<=1e-6}function Gz(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}Eg.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(!u5(n,i))return!1;var a=e[0][r]-e[3][r],o=e[1][r]-e[2][r];if(!u5(a,o))return!1}return!u5(e[0][1],e[1][1])&&!u5(e[0][1],e[3][1])?!1:!!(Gz(e[0],e[1])*Gz(e[0],e[3]))};Eg.pointsOnEllipse=function(e){var t=e.length;if(t!==V3+1)return!1;t=V3;for(var r=0;r<t;r++){var n=(t*2-r)%t,i=(t/2+n)%t,a=(t/2+r)%t;if(!u5(Gz(e[r],e[a]),Gz(e[n],e[i])))return!1}return!0};Eg.handleEllipse=function(e,t,r){if(!e)return[t,r];var n=Eg.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/KN),s||(s=o=o/KN);for(var u=[],l=0;l<V3;l++){var f=l*2*Math.PI/V3;u.push([i+o*Math.cos(f),a+s*Math.sin(f)])}return u};Eg.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,u=(r+i)/2,l=KN;return a*=l,o*=l,{x0:s-a,y0:u-o,x1:s+a,y1:u+o}};Eg.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 Zz=Se((Tnr,bue)=>{"use strict";var gue=Sy(),tut=gue.drawMode,rut=gue.openMode,H3=Vz(),pue=H3.i000,vue=H3.i090,yue=H3.i180,mue=H3.i270,iut=H3.cos45,nut=H3.sin45,_ue=Hz(),Wz=_ue.p2r,f_=_ue.r2p,aut=Q1(),out=aut.clearOutline,jz=u_(),sut=jz.readPaths,lut=jz.writePaths,uut=jz.ellipseOver,fut=jz.fixDatesForPaths;function cut(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(!tut(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 u=o[s].path||"";u[u.length-1]==="Z"?a="drawclosedpath":a="drawopenpath";break}}var l=xue(e,t,a);out(n);for(var f=t.editHelpers,c=(f||{}).modifyItem,h=[],d=0;d<o.length;d++){var p=n._fullLayout.shapes[d];if(h[d]=p._input,i!==void 0&&d===n._fullLayout._activeShapeIndex){var x=l;switch(p.type){case"line":case"rect":case"circle":c("x0",x.x0-(p.x0shift||0)),c("x1",x.x1-(p.x1shift||0)),c("y0",x.y0-(p.y0shift||0)),c("y1",x.y1-(p.y1shift||0));break;case"path":c("path",x.path);break}}}return i===void 0?(h.push(l),h):f?f.getUpdateObj():{}}}}function xue(e,t,r){var n=e[0][0],i=t.gd,a=n.getAttribute("d"),o=i._fullLayout.newshape,s=t.plotinfo,u=t.isActiveShape,l=s.xaxis,f=s.yaxis,c=!!s.domain||!s.xaxis,h=!!s.domain||!s.yaxis,d=rut(r),p=sut(a,i,s,u),x={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:c?"paper":l._id,yref:h?"paper":f._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};d||(x.fillcolor=o.fillcolor,x.fillrule=o.fillrule);var b;if(p.length===1&&(b=p[0]),b&&b.length===5&&r==="drawrect")x.type="rect",x.x0=b[0][1],x.y0=b[0][2],x.x1=b[2][1],x.y1=b[2][2];else if(b&&r==="drawline")x.type="line",x.x0=b[0][1],x.y0=b[0][2],x.x1=b[1][1],x.y1=b[1][2];else if(b&&r==="drawcircle"){x.type="circle";var y=b[pue][1],k=b[vue][1],E=b[yue][1],A=b[mue][1],L=b[pue][2],_=b[vue][2],C=b[yue][2],M=b[mue][2],v=s.xaxis&&(s.xaxis.type==="date"||s.xaxis.type==="log"),z=s.yaxis&&(s.yaxis.type==="date"||s.yaxis.type==="log");v&&(y=f_(s.xaxis,y),k=f_(s.xaxis,k),E=f_(s.xaxis,E),A=f_(s.xaxis,A)),z&&(L=f_(s.yaxis,L),_=f_(s.yaxis,_),C=f_(s.yaxis,C),M=f_(s.yaxis,M));var T=(k+A)/2,F=(L+C)/2,q=(A-k+E-y)/2,U=(M-_+C-L)/2,H=uut({x0:T,y0:F,x1:T+q*iut,y1:F+U*nut});v&&(H.x0=Wz(s.xaxis,H.x0),H.x1=Wz(s.xaxis,H.x1)),z&&(H.y0=Wz(s.yaxis,H.y0),H.y1=Wz(s.yaxis,H.y1)),x.x0=H.x0,x.y0=H.y0,x.x1=H.x1,x.y1=H.y1}else x.type="path",l&&f&&fut(p,l,f),x.path=lut(p),b=null;return x}bue.exports={newShapes:cut,createShapeObj:xue}});var $N=Se((Anr,wue)=>{"use strict";var hut=Sy(),dut=hut.selectMode,put=Q1(),vut=put.clearOutline,JN=u_(),yut=JN.readPaths,mut=JN.writePaths,gut=JN.fixDatesForPaths;wue.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,u=s.xaxis,l=s.yaxis,f=r.isActiveSelection,c=r.dragmode,h=(a.layout||{}).selections||[];if(!dut(c)&&f!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d<h.length)switch(a._fullLayout.selections[d].type){case"rect":c="select";break;case"path":c="lasso";break}}var p=yut(i,a,s,f),x={xref:u._id,yref:l._id,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}},b;p.length===1&&(b=p[0]),b&&b.length===5&&c==="select"?(x.type="rect",x.x0=b[0][1],x.y0=b[0][2],x.x1=b[2][1],x.y1=b[2][2]):(x.type="path",u&&l&&gut(p,u,l),x.path=mut(p),b=null),vut(a);for(var y=r.editHelpers,k=(y||{}).modifyItem,E=[],A=0;A<h.length;A++){var L=a._fullLayout.selections[A];if(!L){E[A]=L;continue}if(E[A]=L._input,f!==void 0&&A===a._fullLayout._activeSelectionIndex){var _=x;switch(L.type){case"rect":k("x0",_.x0),k("x1",_.x1),k("y0",_.y0),k("y1",_.y1);break;case"path":k("path",_.path);break}}}return f===void 0?(E.push(x),E):y?y.getUpdateObj():{}}}}});var f5=Se((Snr,Tue)=>{"use strict";Tue.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var c_=Se(Fd=>{"use strict";var Fb=f5(),Aue=Zr(),Xz=hu();Fd.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};Fd.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};Fd.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};Fd.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};Fd.extractPathCoords=function(e,t,r){var n=[],i=e.match(Fb.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.substr(1).match(Fb.paramRE);if(!(!s||s.length<o)){var u=s[o],l=r?u:Aue.cleanNumber(u);n.push(l)}}}),n};Fd.getDataToPixel=function(e,t,r,n,i){var a=e._fullLayout._size,o;if(t)if(i==="domain")o=function(u){return t._length*(n?1-u:u)+t._offset};else{var s=Fd.shapePositionToRange(t);o=function(u){var l=c5(t,r);return t._offset+t.r2p(s(u,!0))+l},t.type==="date"&&(o=Fd.decodeDate(o))}else n?o=function(u){return a.t+a.h*(1-u)}:o=function(u){return a.l+a.w*u};return o};Fd.getPixelToData=function(e,t,r,n){var i=e._fullLayout._size,a;if(t)if(n==="domain")a=function(s){var u=(s-t._offset)/t._length;return r?1-u:u};else{var o=Fd.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};Fd.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};Fd.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}};Fd.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}};Fd.getPathString=function(e,t){var r=t.type,n=Xz.getRefType(t.xref),i=Xz.getRefType(t.yref),a=Xz.getFromId(e,t.xref),o=Xz.getFromId(e,t.yref),s=e._fullLayout._size,u,l,f,c,h=c5(a,t.x0shift),d=c5(a,t.x1shift),p=c5(o,t.y0shift),x=c5(o,t.y1shift),b,y,k,E;if(a?n==="domain"?l=function(q){return a._offset+a._length*q}:(u=Fd.shapePositionToRange(a),l=function(q){return a._offset+a.r2p(u(q,!0))}):l=function(q){return s.l+s.w*q},o?i==="domain"?c=function(q){return o._offset+o._length*(1-q)}:(f=Fd.shapePositionToRange(o),c=function(q){return o._offset+o.r2p(f(q,!0))}):c=function(q){return s.t+s.h*(1-q)},r==="path")return a&&a.type==="date"&&(l=Fd.decodeDate(l)),o&&o.type==="date"&&(c=Fd.decodeDate(c)),_ut(t,l,c);if(t.xsizemode==="pixel"){var A=l(t.xanchor);b=A+t.x0+h,y=A+t.x1+d}else b=l(t.x0)+h,y=l(t.x1)+d;if(t.ysizemode==="pixel"){var L=c(t.yanchor);k=L-t.y0+p,E=L-t.y1+x}else k=c(t.y0)+p,E=c(t.y1)+x;if(r==="line")return"M"+b+","+k+"L"+y+","+E;if(r==="rect")return"M"+b+","+k+"H"+y+"V"+E+"H"+b+"Z";var _=(b+y)/2,C=(k+E)/2,M=Math.abs(_-b),v=Math.abs(C-k),z="A"+M+","+v,T=_+M+","+C,F=_+","+(C-v);return"M"+T+z+" 0 1,1 "+F+z+" 0 0,1 "+T+"Z"};function _ut(e,t,r){var n=e.path,i=e.xsizemode,a=e.ysizemode,o=e.xanchor,s=e.yanchor;return n.replace(Fb.segmentRE,function(u){var l=0,f=u.charAt(0),c=Fb.paramIsX[f],h=Fb.paramIsY[f],d=Fb.numParams[f],p=u.substr(1).replace(Fb.paramRE,function(x){return c[l]?i==="pixel"?x=t(o)+Number(x):x=t(x):h[l]&&(a==="pixel"?x=r(s)-Number(x):x=r(x)),l++,l>d&&(x="X"),x});return l>d&&(p=p.replace(/[\s,]*X.*/,""),Aue.log("Ignoring extra params in segment "+u)),f+p})}function c5(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 e7=Se((Enr,kue)=>{"use strict";var xut=Zr(),G3=hu(),Sue=Bf(),Mue=yu(),but=u_().readPaths,QN=c_(),wut=QN.getPathString,Eue=xL(),Tut=Qh().FROM_TL;kue.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=G3.getFromId(t,n.xref),u=G3.getFromId(t,n.yref);for(var l in Eue){var f=Eue[l](n,s,u);f!==void 0&&(o[l]=f)}}a=xut.texttemplateStringForShapes(n.label.texttemplate,{},t._fullLayout._d3locale,o)}else a=n.label.text;var c={"data-index":r},h=n.label.font,d={"data-notex":1},p=i.append("g").attr(c).classed("shape-label",!0),x=p.append("text").attr(d).classed("shape-label-text",!0).text(a),b,y,k,E;if(n.path){var A=wut(t,n),L=but(A,t);b=1/0,k=1/0,y=-1/0,E=-1/0;for(var _=0;_<L.length;_++)for(var C=0;C<L[_].length;C++)for(var M=L[_][C],v=1;v<M.length;v+=2){var z=M[v],T=M[v+1];b=Math.min(b,z),y=Math.max(y,z),k=Math.min(k,T),E=Math.max(E,T)}}else{var F=G3.getFromId(t,n.xref),q=n.x0shift,U=n.x1shift,H=G3.getRefType(n.xref),j=G3.getFromId(t,n.yref),G=n.y0shift,O=n.y1shift,W=G3.getRefType(n.yref),re=function(Ee,Me){var Oe=QN.getDataToPixel(t,F,Me,!1,H);return Oe(Ee)},ne=function(Ee,Me){var Oe=QN.getDataToPixel(t,j,Me,!0,W);return Oe(Ee)};b=re(n.x0,q),y=re(n.x1,U),k=ne(n.y0,G),E=ne(n.y1,O)}var be=n.label.textangle;be==="auto"&&(n.type==="line"?be=Aut(b,k,y,E):be=0),x.call(function(Ee){return Ee.call(Mue.font,h).attr({}),Sue.convertToTspans(Ee,t),Ee});var ze=Mue.bBox(x.node()),Ce=Sut(b,k,y,E,n,be,ze),he=Ce.textx,te=Ce.texty,ke=Ce.xanchor;x.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[ke],y:te,x:he,transform:"rotate("+be+","+he+","+te+")"}).call(Sue.positionText,he,te)}};function Aut(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 Sut(e,t,r,n,i,a,o){var s=i.label.textposition,u=i.label.textangle,l=i.label.padding,f=i.type,c=Math.PI/180*a,h=Math.sin(c),d=Math.cos(c),p=i.label.xanchor,x=i.label.yanchor,b,y,k,E;if(f==="line"){s==="start"?(b=e,y=t):s==="end"?(b=r,y=n):(b=(e+r)/2,y=(t+n)/2),p==="auto"&&(s==="start"?u==="auto"?r>e?p="left":r<e?p="right":p="center":r>e?p="right":r<e?p="left":p="center":s==="end"?u==="auto"?r>e?p="right":r<e?p="left":p="center":r>e?p="left":r<e?p="right":p="center":p="center");var A={left:1,center:0,right:-1},L={bottom:-1,middle:0,top:1};if(u==="auto"){var _=L[x];k=-l*h*_,E=l*d*_}else{var C=A[p],M=L[x];k=l*C,E=l*M}b=b+k,y=y+E}else k=l+3,s.indexOf("right")!==-1?(b=Math.max(e,r)-k,p==="auto"&&(p="right")):s.indexOf("left")!==-1?(b=Math.min(e,r)+k,p==="auto"&&(p="left")):(b=(e+r)/2,p==="auto"&&(p="center")),s.indexOf("top")!==-1?y=Math.min(t,n):s.indexOf("bottom")!==-1?y=Math.max(t,n):y=(t+n)/2,E=l,x==="bottom"?y=y-E:x==="top"&&(y=y+E);var v=Tut[x],z=i.label.font.size,T=o.height,F=(T*v-z)*h,q=-(T*v-z)*d;return{textx:b+F,texty:y+q,xanchor:p}}});var Jz=Se((knr,Fue)=>{"use strict";var Mut=Zr(),Eut=Mut.strTranslate,Cue=gp(),Pue=Sy(),kut=Pue.drawMode,Iue=Pue.selectMode,Due=Ul(),Lue=Pl(),Kz=Vz(),Cut=Kz.i000,Lut=Kz.i090,zut=Kz.i180,Put=Kz.i270,Iut=Q1(),Rue=Iut.clearOutlineControllers,r7=u_(),Yz=r7.pointsOnRectangle,t7=r7.pointsOnEllipse,Dut=r7.writePaths,Rut=Zz().newShapes,Fut=Zz().createShapeObj,qut=$N(),But=e7();Fue.exports=function e(t,r,n,i){i||(i=0);var a=n.gd;function o(){e(t,r,n,i++),(t7(t[0])||n.hasText)&&s({redrawing:!0})}function s(G){var O={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,O=Rut(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,O=qut(r,n),a._fullLayout._reselect=!0),Object.keys(O).length&&Due.call((G||{}).redrawing?"relayout":"_guiRelayout",a,O)}var u=a._fullLayout,l=u._zoomlayer,f=n.dragmode,c=kut(f),h=Iue(f);(c||h)&&(a._fullLayout._outlining=!0),Rue(a),r.attr("d",Dut(t));var d,p,x,b,y;if(!i&&(n.isActiveShape||n.isActiveSelection)){y=Out([],t);var k=l.append("g").attr("class","outline-controllers");z(k),j()}if(c&&n.hasText){var E=l.select(".label-temp"),A=Fut(r,n,n.dragmode);But(a,"label-temp",A,E)}function L(G){x=+G.srcElement.getAttribute("data-i"),b=+G.srcElement.getAttribute("data-j"),d[x][b].moveFn=_}function _(G,O){if(t.length){var W=y[x][b][1],re=y[x][b][2],ne=t[x],be=ne.length;if(Yz(ne)){var ze=G,Ce=O;if(n.isActiveSelection){var he=zue(ne,b);he[1]===ne[b][1]?Ce=0:ze=0}for(var te=0;te<be;te++)if(te!==b){var ke=ne[te];ke[1]===ne[b][1]&&(ke[1]=W+ze),ke[2]===ne[b][2]&&(ke[2]=re+Ce)}if(ne[b][1]=W+ze,ne[b][2]=re+Ce,!Yz(ne))for(var Ee=0;Ee<be;Ee++)for(var Me=0;Me<ne[Ee].length;Me++)ne[Ee][Me]=y[x][Ee][Me]}else ne[b][1]=W+G,ne[b][2]=re+O;o()}}function C(){s()}function M(){if(t.length&&t[x]&&t[x].length){for(var G=[],O=0;O<t[x].length;O++)O!==b&&G.push(t[x][O]);G.length>1&&!(G.length===2&&G[1][0]==="Z")&&(b===0&&(G[0][0]="M"),t[x]=G,o(),s())}}function v(G,O){if(G===2){x=+O.srcElement.getAttribute("data-i"),b=+O.srcElement.getAttribute("data-j");var W=t[x];!Yz(W)&&!t7(W)&&M()}}function z(G){d=[];for(var O=0;O<t.length;O++){var W=t[O],re=Yz(W),ne=!re&&t7(W);d[O]=[];for(var be=W.length,ze=0;ze<be;ze++)if(W[ze][0]!=="Z"&&!(ne&&ze!==Cut&&ze!==Lut&&ze!==zut&&ze!==Put)){var Ce=re&&n.isActiveSelection,he;Ce&&(he=zue(W,ze));var te=W[ze][1],ke=W[ze][2],Ee=G.append(Ce?"rect":"circle").attr("data-i",O).attr("data-j",ze).style({fill:Lue.background,stroke:Lue.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(Ce){var Me=he[1]-te,Oe=he[2]-ke,Re=Oe?5:Math.max(Math.min(25,Math.abs(Me)-5),5),me=Me?5:Math.max(Math.min(25,Math.abs(Oe)-5),5);Ee.classed(Oe?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",Re).attr("height",me).attr("x",te-Re/2).attr("y",ke-me/2).attr("transform",Eut(Me/2,Oe/2))}else Ee.classed("cursor-grab",!0).attr("r",5).attr("cx",te).attr("cy",ke);d[O][ze]={element:Ee.node(),gd:a,prepFn:L,doneFn:C,clickFn:v},Cue.init(d[O][ze])}}}function T(G,O){if(t.length)for(var W=0;W<t.length;W++)for(var re=0;re<t[W].length;re++)for(var ne=0;ne+2<t[W][re].length;ne+=2)t[W][re][ne+1]=y[W][re][ne+1]+G,t[W][re][ne+2]=y[W][re][ne+2]+O}function F(G,O){T(G,O),o()}function q(G){x=+G.srcElement.getAttribute("data-i"),x||(x=0),p[x].moveFn=F}function U(){s()}function H(G){G===2&&Nut(a)}function j(){if(p=[],!!t.length){var G=0;p[G]={element:r[0][0],gd:a,prepFn:q,doneFn:U,clickFn:H},Cue.init(p[G])}}};function Out(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 zue(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 Nut(e){if(Iue(e._fullLayout.dragmode)){Rue(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},Due.call("_guiRelayout",e,{selections:n})}}}});var tP=Se((Cnr,jue)=>{"use strict";var Uut=Nl(),Vue=Ul(),que=Zr(),W3=hu(),Vut=u_().readPaths,Hut=Jz(),Qz=e7(),Hue=Q1().clearOutlineControllers,i7=Pl(),a7=yu(),Gut=_f().arrayEditor,Bue=gp(),Oue=Ty(),qb=f5(),Mv=c_(),n7=Mv.getPathString;jue.exports={draw:o7,drawOne:Gue,eraseActiveShape:Zut,drawLabel:Qz};function o7(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&&Gue(e,i)}function $z(e){return!!e._fullLayout._outlining}function eP(e){return!e._context.edits.shapePosition}function Gue(e,t){e._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+t+'"]').remove();var r=Mv.makeShapesOptionsAndPlotinfo(e,t),n=r.options,i=r.plotinfo;if(!n._input||n.visible!==!0)return;if(n.layer==="above")o(e._fullLayout._shapeUpperLayer);else if(n.xref==="paper"||n.yref==="paper")o(e._fullLayout._shapeLowerLayer);else if(n.layer==="between")o(i.shapelayerBetween);else if(i._hadPlotinfo){var a=i.mainplotinfo||i;o(a.shapelayer)}else o(e._fullLayout._shapeLowerLayer);function o(s){var u=n7(e,n),l={"data-index":t,"fill-rule":n.fillrule,d:u},f=n.opacity,c=n.fillcolor,h=n.line.width?n.line.color:"rgba(0,0,0,0)",d=n.line.width,p=n.line.dash;!d&&n.editable===!0&&(d=5,p="solid");var x=u[u.length-1]!=="Z",b=eP(e)&&n.editable&&e._fullLayout._activeShapeIndex===t;b&&(c=x?"rgba(0,0,0,0)":e._fullLayout.activeshape.fillcolor,f=e._fullLayout.activeshape.opacity);var y=s.append("g").classed("shape-group",!0).attr({"data-index":t}),k=y.append("path").attr(l).style("opacity",f).call(i7.stroke,h).call(i7.fill,c).call(a7.dashLine,p,d);Wue(y,e,n),Qz(e,t,n,y);var E;if((b||e._context.edits.shapePosition)&&(E=Gut(e.layout,"shapes",n)),b){k.style({cursor:"move"});var A={element:k.node(),plotinfo:i,gd:e,editHelpers:E,hasText:n.label.text||n.label.texttemplate,isActiveShape:!0},L=Vut(u,e);Hut(L,k,A)}else e._context.edits.shapePosition?Wut(e,k,n,t,s,E):n.editable===!0&&k.style("pointer-events",x||i7.opacity(c)*f<=.5?"stroke":"all");k.node().addEventListener("click",function(){return jut(e,k)})}}function Wue(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");a7.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function Wut(e,t,r,n,i,a){var o=10,s=10,u=r.xsizemode==="pixel",l=r.ysizemode==="pixel",f=r.type==="line",c=r.type==="path",h=a.modifyItem,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F=Uut.select(t.node().parentNode),q=W3.getFromId(e,r.xref),U=W3.getRefType(r.xref),H=W3.getFromId(e,r.yref),j=W3.getRefType(r.yref),G=r.x0shift,O=r.x1shift,W=r.y0shift,re=r.y1shift,ne=function(Qe,Xe){var Tt=Mv.getDataToPixel(e,q,Xe,!1,U);return Tt(Qe)},be=function(Qe,Xe){var Tt=Mv.getDataToPixel(e,H,Xe,!0,j);return Tt(Qe)},ze=Mv.getPixelToData(e,q,!1,U),Ce=Mv.getPixelToData(e,H,!0,j),he=Ee(),te={element:he.node(),gd:e,prepFn:Re,doneFn:me,clickFn:Be},ke;Bue.init(te),he.node().onmousemove=Oe;function Ee(){return f?Me():t}function Me(){var Qe=10,Xe=Math.max(r.line.width,Qe),Tt=i.append("g").attr("data-index",n).attr("drag-helper",!0);Tt.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":Xe,"stroke-opacity":"0"});var xt={"fill-opacity":"0"},_t=Math.max(Xe/2,Qe);return Tt.append("circle").attr({"data-line-point":"start-point",cx:u?ne(r.xanchor)+r.x0:ne(r.x0,G),cy:l?be(r.yanchor)-r.y0:be(r.y0,W),r:_t}).style(xt).classed("cursor-grab",!0),Tt.append("circle").attr({"data-line-point":"end-point",cx:u?ne(r.xanchor)+r.x1:ne(r.x1,O),cy:l?be(r.yanchor)-r.y1:be(r.y1,re),r:_t}).style(xt).classed("cursor-grab",!0),Tt}function Oe(Qe){if($z(e)){ke=null;return}if(f)Qe.target.tagName==="path"?ke="move":ke=Qe.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Xe=te.element.getBoundingClientRect(),Tt=Xe.right-Xe.left,xt=Xe.bottom-Xe.top,_t=Qe.clientX-Xe.left,Ct=Qe.clientY-Xe.top,jt=!c&&Tt>o&&xt>s&&!Qe.shiftKey?Bue.getCursor(_t/Tt,1-Ct/xt):"move";Oue(t,jt),ke=jt.split("-")[0]}}function Re(Qe){$z(e)||(u&&(y=ne(r.xanchor)),l&&(k=be(r.yanchor)),r.type==="path"?T=r.path:(d=u?r.x0:ne(r.x0),p=l?r.y0:be(r.y0),x=u?r.x1:ne(r.x1),b=l?r.y1:be(r.y1)),d<x?(L=d,v="x0",_=x,z="x1"):(L=x,v="x1",_=d,z="x0"),!l&&p<b||l&&p>b?(E=p,C="y0",A=b,M="y1"):(E=b,C="y1",A=p,M="y0"),Oe(Qe),et(i,r),Pt(t,r,e),te.moveFn=ke==="move"?fe:Ze,te.altKey=Qe.altKey)}function me(){$z(e)||(Oue(t),gt(i),Wue(t,e,r),Vue.call("_guiRelayout",e,a.getUpdateObj()))}function Be(){$z(e)||gt(i)}function fe(Qe,Xe){if(r.type==="path"){var Tt=function(Ct){return Ct},xt=Tt,_t=Tt;u?h("xanchor",r.xanchor=ze(y+Qe)):(xt=function(jt){return ze(ne(jt)+Qe)},q&&q.type==="date"&&(xt=Mv.encodeDate(xt))),l?h("yanchor",r.yanchor=Ce(k+Xe)):(_t=function(jt){return Ce(be(jt)+Xe)},H&&H.type==="date"&&(_t=Mv.encodeDate(_t))),h("path",r.path=Nue(T,xt,_t))}else u?h("xanchor",r.xanchor=ze(y+Qe)):(h("x0",r.x0=ze(d+Qe)),h("x1",r.x1=ze(x+Qe))),l?h("yanchor",r.yanchor=Ce(k+Xe)):(h("y0",r.y0=Ce(p+Xe)),h("y1",r.y1=Ce(b+Xe)));t.attr("d",n7(e,r)),et(i,r),Qz(e,n,r,F)}function Ze(Qe,Xe){if(c){var Tt=function(Kt){return Kt},xt=Tt,_t=Tt;u?h("xanchor",r.xanchor=ze(y+Qe)):(xt=function(ir){return ze(ne(ir)+Qe)},q&&q.type==="date"&&(xt=Mv.encodeDate(xt))),l?h("yanchor",r.yanchor=Ce(k+Xe)):(_t=function(ir){return Ce(be(ir)+Xe)},H&&H.type==="date"&&(_t=Mv.encodeDate(_t))),h("path",r.path=Nue(T,xt,_t))}else if(f){if(ke==="resize-over-start-point"){var Ct=d+Qe,jt=l?p-Xe:p+Xe;h("x0",r.x0=u?Ct:ze(Ct)),h("y0",r.y0=l?jt:Ce(jt))}else if(ke==="resize-over-end-point"){var At=x+Qe,Te=l?b-Xe:b+Xe;h("x1",r.x1=u?At:ze(At)),h("y1",r.y1=l?Te:Ce(Te))}}else{var nt=function(Kt){return ke.indexOf(Kt)!==-1},ut=nt("n"),ct=nt("s"),rt=nt("w"),je=nt("e"),tt=ut?E+Xe:E,Je=ct?A+Xe:A,Mt=rt?L+Qe:L,Vt=je?_+Qe:_;l&&(ut&&(tt=E-Xe),ct&&(Je=A-Xe)),(!l&&Je-tt>s||l&&tt-Je>s)&&(h(C,r[C]=l?tt:Ce(tt)),h(M,r[M]=l?Je:Ce(Je))),Vt-Mt>o&&(h(v,r[v]=u?Mt:ze(Mt)),h(z,r[z]=u?Vt:ze(Vt)))}t.attr("d",n7(e,r)),et(i,r),Qz(e,n,r,F)}function et(Qe,Xe){(u||l)&&Tt();function Tt(){var xt=Xe.type!=="path",_t=Qe.selectAll(".visual-cue").data([0]),Ct=1;_t.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var jt=ne(u?Xe.xanchor:que.midRange(xt?[Xe.x0,Xe.x1]:Mv.extractPathCoords(Xe.path,qb.paramIsX))),At=be(l?Xe.yanchor:que.midRange(xt?[Xe.y0,Xe.y1]:Mv.extractPathCoords(Xe.path,qb.paramIsY)));if(jt=Mv.roundPositionForSharpStrokeRendering(jt,Ct),At=Mv.roundPositionForSharpStrokeRendering(At,Ct),u&&l){var Te="M"+(jt-1-Ct)+","+(At-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";_t.attr("d",Te)}else if(u){var nt="M"+(jt-1-Ct)+","+(At-9-Ct)+"v18 h2 v-18 Z";_t.attr("d",nt)}else{var ut="M"+(jt-9-Ct)+","+(At-1-Ct)+"h18 v2 h-18 Z";_t.attr("d",ut)}}}function gt(Qe){Qe.selectAll(".visual-cue").remove()}function Pt(Qe,Xe,Tt){var xt=Xe.xref,_t=Xe.yref,Ct=W3.getFromId(Tt,xt),jt=W3.getFromId(Tt,_t),At="";xt!=="paper"&&!Ct.autorange&&(At+=xt),_t!=="paper"&&!jt.autorange&&(At+=_t),a7.setClipUrl(Qe,At?"clip"+Tt._fullLayout._uid+At:null,Tt)}}function Nue(e,t,r){return e.replace(qb.segmentRE,function(n){var i=0,a=n.charAt(0),o=qb.paramIsX[a],s=qb.paramIsY[a],u=qb.numParams[a],l=n.substr(1).replace(qb.paramRE,function(f){return i>=u||(o[i]?f=t(f):s[i]&&(f=r(f)),i++),f});return a+l})}function jut(e,t){if(eP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Uue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Uue,o7(e)}}}function Uue(e){if(eP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(Hue(e),delete e._fullLayout._activeShapeIndex,o7(e))}}function Zut(e){if(eP(e)){Hue(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,Vue.call("_guiRelayout",e,{shapes:n})}}}});var u7=Se((Lnr,tfe)=>{"use strict";var S0=Ul(),Zue=Ac(),Xue=$c(),Mf=Nz(),Xut=tP().eraseActiveShape,rP=Zr(),pf=rP._,Ef=tfe.exports={};Ef.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?pf(e,"Download plot as a png"):pf(e,"Download plot")},icon:Mf.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};rP.notifier(pf(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){rP.notifier(pf(e,"Snapshot succeeded")+" - "+n,"long")}).catch(function(){rP.notifier(pf(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Ef.sendDataToCloud={name:"sendDataToCloud",title:function(e){return pf(e,"Edit in Chart Studio")},icon:Mf.disk,click:function(e){Zue.sendDataToCloud(e)}};Ef.editInChartStudio={name:"editInChartStudio",title:function(e){return pf(e,"Edit in Chart Studio")},icon:Mf.pencil,click:function(e){Zue.sendDataToCloud(e)}};Ef.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return pf(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Mf.zoombox,click:Bp};Ef.pan2d={name:"pan2d",_cat:"pan",title:function(e){return pf(e,"Pan")},attr:"dragmode",val:"pan",icon:Mf.pan,click:Bp};Ef.select2d={name:"select2d",_cat:"select",title:function(e){return pf(e,"Box Select")},attr:"dragmode",val:"select",icon:Mf.selectbox,click:Bp};Ef.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return pf(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Mf.lasso,click:Bp};Ef.drawclosedpath={name:"drawclosedpath",title:function(e){return pf(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Mf.drawclosedpath,click:Bp};Ef.drawopenpath={name:"drawopenpath",title:function(e){return pf(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Mf.drawopenpath,click:Bp};Ef.drawline={name:"drawline",title:function(e){return pf(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Mf.drawline,click:Bp};Ef.drawrect={name:"drawrect",title:function(e){return pf(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Mf.drawrect,click:Bp};Ef.drawcircle={name:"drawcircle",title:function(e){return pf(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Mf.drawcircle,click:Bp};Ef.eraseshape={name:"eraseshape",title:function(e){return pf(e,"Erase active shape")},icon:Mf.eraseshape,click:Xut};Ef.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return pf(e,"Zoom in")},attr:"zoom",val:"in",icon:Mf.zoom_plus,click:Bp};Ef.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return pf(e,"Zoom out")},attr:"zoom",val:"out",icon:Mf.zoom_minus,click:Bp};Ef.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return pf(e,"Autoscale")},attr:"zoom",val:"auto",icon:Mf.autoscale,click:Bp};Ef.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return pf(e,"Reset axes")},attr:"zoom",val:"reset",icon:Mf.home,click:Bp};Ef.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return pf(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Mf.tooltip_basic,gravity:"ne",click:Bp};Ef.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return pf(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Mf.tooltip_compare,gravity:"ne",click:Bp};function Bp(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=Xue.list(e,null,!0),u=a._cartesianSpikesEnabled,l,f;if(n==="zoom"){var c=i==="in"?.5:2,h=(1+c)/2,d=(1-c)/2,p;for(f=0;f<s.length;f++)if(l=s[f],!l.fixedrange)if(p=l._name,i==="auto")o[p+".autorange"]=!0;else if(i==="reset")l._rangeInitial0===void 0&&l._rangeInitial1===void 0?o[p+".autorange"]=!0:l._rangeInitial0===void 0?(o[p+".autorange"]=l._autorangeInitial,o[p+".range"]=[null,l._rangeInitial1]):l._rangeInitial1===void 0?(o[p+".range"]=[l._rangeInitial0,null],o[p+".autorange"]=l._autorangeInitial):o[p+".range"]=[l._rangeInitial0,l._rangeInitial1],l._showSpikeInitial!==void 0&&(o[p+".showspikes"]=l._showSpikeInitial,u==="on"&&!l._showSpikeInitial&&(u="off"));else{var x=[l.r2l(l.range[0]),l.r2l(l.range[1])],b=[h*x[0]+d*x[1],h*x[1]+d*x[0]];o[p+".range[0]"]=l.l2r(b[0]),o[p+".range[1]"]=l.l2r(b[1])}}else n==="hovermode"&&(i==="x"||i==="y")&&(i=a._isHoriz?"y":"x",r.setAttribute("data-val",i)),o[n]=i;a._cartesianSpikesEnabled=u,S0.call("_guiRelayout",e,o)}Ef.zoom3d={name:"zoom3d",_cat:"zoom",title:function(e){return pf(e,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:Mf.zoombox,click:iP};Ef.pan3d={name:"pan3d",_cat:"pan",title:function(e){return pf(e,"Pan")},attr:"scene.dragmode",val:"pan",icon:Mf.pan,click:iP};Ef.orbitRotation={name:"orbitRotation",title:function(e){return pf(e,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:Mf["3d_rotate"],click:iP};Ef.tableRotation={name:"tableRotation",title:function(e){return pf(e,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:Mf["z-axis"],click:iP};function iP(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("."),u=0;u<a.length;u++)o[a[u]+"."+s[1]]=i;var l=i==="pan"?i:"zoom";o.dragmode=l,S0.call("_guiRelayout",e,o)}Ef.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(e){return pf(e,"Reset camera to default")},attr:"resetDefault",icon:Mf.home,click:s7};Ef.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(e){return pf(e,"Reset camera to last save")},attr:"resetLastSave",icon:Mf.movie,click:s7};function s7(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||[],u={},l=0;l<s.length;l++){var f=s[l],c=f+".camera",h=f+".aspectratio",d=f+".aspectmode",p=o[f]._scene,x;i?(u[c+".up"]=p.viewInitial.up,u[c+".eye"]=p.viewInitial.eye,u[c+".center"]=p.viewInitial.center,x=!0):a&&(u[c+".up"]=null,u[c+".eye"]=null,u[c+".center"]=null,x=!0),x&&(u[h+".x"]=p.viewInitial.aspectratio.x,u[h+".y"]=p.viewInitial.aspectratio.y,u[h+".z"]=p.viewInitial.aspectratio.z,u[d]=p.viewInitial.aspectmode)}S0.call("_guiRelayout",e,u)}Ef.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(e){return pf(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Mf.tooltip_basic,gravity:"ne",click:Yut};function Yue(e,t){var r=t.currentTarget,n=r._previousVal,i=e._fullLayout,a=i._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],s={},u={};if(n)u=n,r._previousVal=null;else{for(var l=0;l<a.length;l++){var f=a[l],c=i[f],h=f+".hovermode";s[h]=c.hovermode,u[h]=!1;for(var d=0;d<3;d++){var p=o[d],x=f+"."+p+".showspikes";u[x]=!1,s[x]=c[p].showspikes}}r._previousVal=s}return u}function Yut(e,t){var r=Yue(e,t);S0.call("_guiRelayout",e,r)}Ef.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(e){return pf(e,"Zoom in")},attr:"zoom",val:"in",icon:Mf.zoom_plus,click:l7};Ef.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(e){return pf(e,"Zoom out")},attr:"zoom",val:"out",icon:Mf.zoom_minus,click:l7};Ef.resetGeo={name:"resetGeo",_cat:"reset",title:function(e){return pf(e,"Reset")},attr:"reset",val:null,icon:Mf.autoscale,click:l7};Ef.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(e){return pf(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Mf.tooltip_basic,gravity:"ne",click:Jue};function l7(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 u=o[s],l=a[u];if(n==="zoom"){var f=l.projection.scale,c=i==="in"?2*f:.5*f;S0.call("_guiRelayout",e,u+".projection.scale",c)}}n==="reset"&&j3(e,"geo")}Ef.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(e){return pf(e,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:Mf.tooltip_basic,gravity:"ne",click:Jue};function Kue(e){var t=e._fullLayout;return t.hovermode?!1:t._has("cartesian")?t._isHoriz?"y":"x":"closest"}function Jue(e){var t=Kue(e);S0.call("_guiRelayout",e,"hovermode",t)}Ef.resetViewSankey={name:"resetSankeyGroup",title:function(e){return pf(e,"Reset view")},icon:Mf.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)}};Ef.toggleHover={name:"toggleHover",title:function(e){return pf(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Mf.tooltip_basic,gravity:"ne",click:function(e,t){var r=Yue(e,t);r.hovermode=Kue(e),S0.call("_guiRelayout",e,r)}};Ef.resetViews={name:"resetViews",title:function(e){return pf(e,"Reset views")},icon:Mf.home,click:function(e,t){var r=t.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),Bp(e,t),r.setAttribute("data-attr","resetLastSave"),s7(e,t),j3(e,"geo"),j3(e,"mapbox"),j3(e,"map")}};Ef.toggleSpikelines={name:"toggleSpikelines",title:function(e){return pf(e,"Toggle Spike Lines")},icon:Mf.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,Kut(e))}};function Kut(e){for(var t=e._fullLayout,r=t._cartesianSpikesEnabled==="on",n=Xue.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}Ef.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(e){return pf(e,"Reset view")},attr:"reset",icon:Mf.home,click:function(e){j3(e,"mapbox")}};Ef.resetViewMap={name:"resetViewMap",_cat:"resetView",title:function(e){return pf(e,"Reset view")},attr:"reset",icon:Mf.home,click:function(e){j3(e,"map")}};Ef.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(e){return pf(e,"Zoom in")},attr:"zoom",val:"in",icon:Mf.zoom_plus,click:$ue};Ef.zoomInMap={name:"zoomInMap",_cat:"zoomin",title:function(e){return pf(e,"Zoom in")},attr:"zoom",val:"in",icon:Mf.zoom_plus,click:Que};Ef.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(e){return pf(e,"Zoom out")},attr:"zoom",val:"out",icon:Mf.zoom_minus,click:$ue};Ef.zoomOutMap={name:"zoomOutMap",_cat:"zoomout",title:function(e){return pf(e,"Zoom out")},attr:"zoom",val:"out",icon:Mf.zoom_minus,click:Que};function $ue(e,t){efe(e,t,"mapbox")}function Que(e,t){efe(e,t,"map")}function efe(e,t,r){for(var n=t.currentTarget,i=n.getAttribute("data-val"),a=e._fullLayout,o=a._subplots[r]||[],s=1.05,u={},l=0;l<o.length;l++){var f=o[l],c=a[f].zoom,h=i==="in"?s*c:c/s;u[f+".zoom"]=h}S0.call("_guiRelayout",e,u)}function j3(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,u=s.viewInitial,l=Object.keys(u),f=0;f<l.length;f++){var c=l[f];i[o+"."+c]=u[c]}S0.call("_guiRelayout",e,i)}});var f7=Se((znr,afe)=>{"use strict";var rfe=u7(),Jut=Object.keys(rfe),ife=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],nfe=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(ife),Z3=[],$ut=function(e){if(nfe.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();Z3.indexOf(t)===-1&&Z3.push(t),Z3.indexOf(r)===-1&&Z3.push(r)}};Jut.forEach(function(e){$ut(rfe[e])});Z3.sort();afe.exports={DRAW_MODES:ife,backButtons:nfe,foreButtons:Z3}});var c7=Se((Inr,ofe)=>{"use strict";var Pnr=f7();ofe.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 lfe=Se((Dnr,sfe)=>{"use strict";var Qut=Zr(),h5=Pl(),eft=_f(),tft=c7();sfe.exports=function(t,r){var n=t.modebar||{},i=eft.newContainer(r,"modebar");function a(s,u){return Qut.coerce(n,i,tft,s,u)}a("orientation"),a("bgcolor",h5.addOpacity(r.paper_bgcolor,.5));var o=h5.contrast(h5.rgb(r.modebar.bgcolor));a("color",h5.addOpacity(o,.3)),a("activecolor",h5.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var hfe=Se((Rnr,cfe)=>{"use strict";var h7=Nl(),rft=_u(),nP=Zr(),ufe=Nz(),ift=QC().version,nft=new DOMParser;function ffe(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Tm=ffe.prototype;Tm.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._uid=i,this.element.className="modebar",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(c){c.style.backgroundColor=a.bgcolor}),nP.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color);var s=!this.hasButtons(t),u=this.hasLogo!==r.displaylogo,l=this.locale!==r.locale;if(this.locale=r.locale,(s||u||l)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var f=this.getLogo();r.watermark&&(f.className=f.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};Tm.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)})};Tm.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};Tm.createButton=function(e){var t=this,r=document.createElement("a");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),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&&h7.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||ufe.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};Tm.createIcon=function(e){var t=rft(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=nft.parseFromString(e.svg,"application/xml");n=a.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};Tm.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=h7.select(n),u=function(c,h){var d=t.modebar,p=c.querySelector(".icon path");p&&(h||c.matches(":hover")?p.style.fill=d.activecolor:p.style.fill=d.color)};if(o){if(a===r){var l=!s.classed("active");s.classed("active",l),u(n,l)}}else{var f=a===null?a:nP.nestedProperty(t,a).get();s.classed("active",f===i),u(n,f===i)}})};Tm.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 aft(e){return e+" (v"+ift+")"}Tm.getLogo=function(){var e=this.createGroup(),t=document.createElement("a");return t.href="https://plotly.com/",t.target="_blank",t.setAttribute("data-title",aft(nP._(this.graphInfo,"Produced with Plotly.js"))),t.className="modebar-btn plotlyjsicon modebar-btn--logo",t.appendChild(this.createIcon(ufe.newplotlylogo)),e.appendChild(t),e};Tm.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};Tm.destroy=function(){nP.removeElement(this.container.querySelector(".modebar"))};function oft(e,t){var r=e._fullLayout,n=new ffe({graphInfo:e,container:r._modebardiv.node(),buttons:t});return r._privateplot&&h7.select(n.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),n}cfe.exports=oft});var vfe=Se((Fnr,pfe)=>{"use strict";var sft=$c(),dfe=ec(),d7=Ul(),lft=rv().isUnifiedHover,uft=hfe(),aP=u7(),fft=f7().DRAW_MODES,cft=Zr().extendDeep;pfe.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=mft(a):!n.displayModeBar&&n.watermark?o=[]:o=hft(t),i?i.update(t,o):r._modeBar=uft(t,o)};function hft(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(O,W){if(typeof W=="string"){if(W.toLowerCase()===O.toLowerCase())return!0}else{var re=W.name,ne=W._cat||W.name;if(re===O||ne===O.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(O){for(var W=0;W<n.modeBarButtonsToRemove.length;W++)if(i(O,n.modeBarButtonsToRemove[W]))return!1;return!0})),u=n.modeBarButtonsToRemove.concat(o.filter(function(O){for(var W=0;W<n.modeBarButtonsToAdd.length;W++)if(i(O,n.modeBarButtonsToAdd[W]))return!1;return!0})),l=t._has("cartesian"),f=t._has("gl3d"),c=t._has("geo"),h=t._has("pie"),d=t._has("funnelarea"),p=t._has("ternary"),x=t._has("mapbox"),b=t._has("map"),y=t._has("polar"),k=t._has("smith"),E=t._has("sankey"),A=dft(t),L=lft(t.hovermode),_=[];function C(O){if(O.length){for(var W=[],re=0;re<O.length;re++){for(var ne=O[re],be=aP[ne],ze=be.name.toLowerCase(),Ce=(be._cat||be.name).toLowerCase(),he=!1,te=0;te<u.length;te++){var ke=u[te].toLowerCase();if(ke===ze||ke===Ce){he=!0;break}}he||W.push(aP[ne])}_.push(W)}}var M=["toImage"];n.showEditInChartStudio?M.push("editInChartStudio"):n.showSendToCloud&&M.push("sendDataToCloud"),C(M);var v=[],z=[],T=[],F=[];(l||h||d||p)+c+f+x+b+y+k>1?(z=["toggleHover"],T=["resetViews"]):c?(v=["zoomInGeo","zoomOutGeo"],z=["hoverClosestGeo"],T=["resetGeo"]):f?(z=["hoverClosest3d"],T=["resetCameraDefault3d","resetCameraLastSave3d"]):x?(v=["zoomInMapbox","zoomOutMapbox"],z=["toggleHover"],T=["resetViewMapbox"]):b?(v=["zoomInMap","zoomOutMap"],z=["toggleHover"],T=["resetViewMap"]):h?z=["hoverClosestPie"]:E?(z=["hoverClosestCartesian","hoverCompareCartesian"],T=["resetViewSankey"]):z=["toggleHover"],l&&z.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(vft(r)||L)&&(z=[]),l&&!A&&(v=["zoomIn2d","zoomOut2d","autoScale2d"],T[0]!=="resetViews"&&(T=["resetScale2d"])),f?F=["zoom3d","pan3d","orbitRotation","tableRotation"]:l&&!A||p?F=["zoom2d","pan2d"]:x||b||c?F=["pan2d"]:y&&(F=["zoom2d"]),pft(r)&&F.push("select2d","lasso2d");var q=[],U=function(O){q.indexOf(O)===-1&&z.indexOf(O)!==-1&&q.push(O)};if(Array.isArray(s)){for(var H=[],j=0;j<s.length;j++){var G=s[j];typeof G=="string"?(G=G.toLowerCase(),fft.indexOf(G)!==-1?(t._has("mapbox")||t._has("map")||t._has("cartesian"))&&F.push(G):G==="togglespikelines"?U("toggleSpikelines"):G==="togglehover"?U("toggleHover"):G==="hovercompare"?U("hoverCompareCartesian"):G==="hoverclosest"?(U("hoverClosestCartesian"),U("hoverClosestGeo"),U("hoverClosest3d"),U("hoverClosestPie")):G==="v1hovermode"&&(U("hoverClosestCartesian"),U("hoverCompareCartesian"),U("hoverClosestGeo"),U("hoverClosest3d"),U("hoverClosestPie"))):H.push(G)}s=H}return C(F),C(v.concat(T)),C(q),yft(_,s)}function dft(e){for(var t=sft.list({_fullLayout:e},null,!0),r=0;r<t.length;r++)if(!t[r].fixedrange)return!1;return!0}function pft(e){for(var t=!1,r=0;r<e.length&&!t;r++){var n=e[r];!n._module||!n._module.selectPoints||(d7.traceIs(n,"scatter-like")?(dfe.hasMarkers(n)||dfe.hasText(n))&&(t=!0):d7.traceIs(n,"box-violin")?(n.boxpoints==="all"||n.points==="all")&&(t=!0):t=!0)}return t}function vft(e){for(var t=0;t<e.length;t++)if(!d7.traceIs(e[t],"noHover"))return!1;return!0}function yft(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 mft(e){for(var t=cft([],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(aP[a]!==void 0)t[r][i]=aP[a];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return t}});var p7=Se((qnr,yfe)=>{"use strict";yfe.exports={moduleType:"component",name:"modebar",layoutAttributes:c7(),supplyLayoutDefaults:lfe(),manage:vfe()}});var v7=Se((Bnr,mfe)=>{"use strict";var gft=Qh().FROM_BL;mfe.exports=function(t,r,n){n===void 0&&(n=gft[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 Ob=Se(d5=>{"use strict";var Bb=Zr(),y7=wy(),My=$c().id2name,_ft=Rd(),gfe=v7(),xft=gm(),bft=ju().ALMOST_EQUAL,wft=Qh().FROM_BL;d5.handleDefaults=function(e,t,r){var n=r.axIds,i=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,u,l,f,c,h,d,p;for(s=0;s<n.length;s++)f=My(n[s]),c=e[f],h=t[f],Tft(c,h,{axIds:n,layoutOut:t,hasImage:i[f]});function x(M,v){for(s=0;s<M.length;s++){u=M[s];for(l in u)t[My(l)][v]=u}}for(x(o,"_matchGroup"),s=0;s<a.length;s++){u=a[s];for(l in u)if(h=t[My(l)],h.fixedrange){for(var b in u){var y=My(b);(e[y]||{}).fixedrange===!1&&Bb.warn("fixedrange was specified as false for axis "+y+" but was overridden because another axis in its constraint group has fixedrange true"),t[y].fixedrange=!0}break}}for(s=0;s<a.length;){u=a[s];for(l in u){h=t[My(l)],h._matchGroup&&Object.keys(h._matchGroup).length===Object.keys(u).length&&(a.splice(s,1),s--);break}s++}x(a,"_constraintGroup");var k=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],E=!1,A=!1;function L(){p=h[d],d==="rangebreaks"&&(A=h._hasDayOfWeekBreaks)}for(s=0;s<o.length;s++){u=o[s];for(var _=0;_<k.length;_++){d=k[_],p=null;var C;for(l in u)if(f=My(l),c=e[f],h=t[f],d in h){if(!h.matches&&(C=h,d in c)){L();break}p===null&&d in c&&L()}if(d==="range"&&p&&c.range&&c.range.length===2&&c.range[0]!==null&&c.range[1]!==null&&(E=!0),d==="autorange"&&p===null&&E&&(p=!1),p===null&&d in C&&(p=C[d]),p!==null)for(l in u)h=t[My(l)],h[d]=d==="range"?p.slice():p,d==="rangebreaks"&&(h._hasDayOfWeekBreaks=A,xft(h,t))}}};function Tft(e,t,r){var n=r.axIds,i=r.layoutOut,a=r.hasImage,o=i._axisConstraintGroups,s=i._axisMatchGroups,u=t._id,l=u.charAt(0),f=((i._splomAxes||{})[l]||{})[u]||{},c=t._id,h=c.charAt(0)==="x";t._matchGroup=null,t._constraintGroup=null;function d(F,q){return Bb.coerce(e,t,_ft,F,q)}d("constrain",a?"domain":"range"),Bb.coerce(e,t,{constraintoward:{valType:"enumerated",values:h?["left","center","right"]:["bottom","middle","top"],dflt:h?"center":"middle"}},"constraintoward");var p=t.type,x,b,y=[];for(x=0;x<n.length;x++)if(b=n[x],b!==c){var k=i[My(b)];k.type===p&&y.push(b)}var E=bfe(o,c);if(E){var A=[];for(x=0;x<y.length;x++)b=y[x],E[b]||A.push(b);y=A}var L=y.length,_,C;L&&(e.matches||f.matches)&&(_=Bb.coerce(e,t,{matches:{valType:"enumerated",values:y,dflt:y.indexOf(f.matches)!==-1?f.matches:void 0}},"matches"));var M=a&&!h?t.anchor:void 0;if(L&&!_&&(e.scaleanchor||M)&&(C=Bb.coerce(e,t,{scaleanchor:{valType:"enumerated",values:y.concat([!1])}},"scaleanchor",M)),_){t._matchGroup=m7(s,c,_,1);var v=i[My(_)],z=_fe(i,t)/_fe(i,v);h!==(_.charAt(0)==="x")&&(z=(h?"x":"y")+z),m7(o,c,_,z)}else e.matches&&n.indexOf(e.matches)!==-1&&Bb.warn("ignored "+t._name+'.matches: "'+e.matches+'" to avoid an infinite loop');if(C){var T=d("scaleratio");T||(T=t.scaleratio=1),m7(o,c,C,T)}else e.scaleanchor&&n.indexOf(e.scaleanchor)!==-1&&Bb.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 _fe(e,t){var r=t.domain;return r||(r=e[My(t.overlaying)].domain),r[1]-r[0]}function bfe(e,t){for(var r=0;r<e.length;r++)if(e[r][t])return e[r];return null}function m7(e,t,r,n){var i,a,o,s,u,l=bfe(e,t);l===null?(l={},l[t]=1,u=e.length,e.push(l)):u=e.indexOf(l);var f=Object.keys(l);for(i=0;i<e.length;i++)if(o=e[i],i!==u&&o[r]){var c=o[r];for(a=0;a<f.length;a++)s=f[a],o[s]=g7(c,g7(n,l[s]));e.splice(u,1);return}if(n!==1)for(a=0;a<f.length;a++){var h=f[a];l[h]=g7(n,l[h])}l[r]=1}function g7(e,t){var r="",n="",i,a;typeof e=="string"&&(r=e.match(/^[xy]*/)[0],i=r.length,e=+e.substr(i)),typeof t=="string"&&(n=t.match(/^[xy]*/)[0],a=n.length,t=+t.substr(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.substr(a):n.substr(i))+o}function Aft(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],u=e[s];if(typeof u=="string"){var l=u.match(/^[xy]*/)[0],f=l.length;u=+u.substr(f);for(var c=l.charAt(0)==="y"?n:1/n,h=0;h<f;h++)u*=c}i[s]=u}return i}d5.enforce=function(t){var r=t._fullLayout,n=r._axisConstraintGroups||[],i,a,o,s,u,l,f,c;for(i=0;i<n.length;i++){o=Aft(n[i],r);var h=Object.keys(o),d=1/0,p=0,x=1/0,b={},y={},k=!1;for(a=0;a<h.length;a++)s=h[a],y[s]=u=r[My(s)],u._inputDomain?u.domain=u._inputDomain.slice():u._inputDomain=u.domain.slice(),u._inputRange||(u._inputRange=u.range.slice()),u.setScale(),b[s]=l=Math.abs(u._m)/o[s],d=Math.min(d,l),(u.constrain==="domain"||!u._constraintShrinkable)&&(x=Math.min(x,l)),delete u._constraintShrinkable,p=Math.max(p,l),u.constrain==="domain"&&(k=!0);if(!(d>bft*p&&!k)){for(a=0;a<h.length;a++)if(s=h[a],l=b[s],u=y[s],f=u.constrain,l!==x||f==="domain")if(c=l/x,f==="range")gfe(u,c);else{var E=u._inputDomain,A=(u.domain[1]-u.domain[0])/(E[1]-E[0]),L=(u.r2l(u.range[1])-u.r2l(u.range[0]))/(u.r2l(u._inputRange[1])-u.r2l(u._inputRange[0]));if(c/=A,c*L<1){u.domain=u._input.domain=E.slice(),gfe(u,c);continue}if(L<1&&(u.range=u._input.range=u._inputRange.slice(),c*=L),u.autorange){var _=u.r2l(u.range[0]),C=u.r2l(u.range[1]),M=(_+C)/2,v=M,z=M,T=Math.abs(C-M),F=M-T*c*1.0001,q=M+T*c*1.0001,U=y7.makePadFn(r,u,0),H=y7.makePadFn(r,u,1);xfe(u,c);var j=Math.abs(u._m),G=y7.concatExtremes(t,u),O=G.min,W=G.max,re,ne;for(ne=0;ne<O.length;ne++)re=O[ne].val-U(O[ne])/j,re>F&&re<v&&(v=re);for(ne=0;ne<W.length;ne++)re=W[ne].val+H(W[ne])/j,re<q&&re>z&&(z=re);var be=(z-v)/(2*T);c/=be,v=u.l2r(v),z=u.l2r(z),u.range=u._input.range=_<C?[v,z]:[z,v]}xfe(u,c)}}}};d5.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};d5.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 xfe(e,t){var r=e._inputDomain,n=wft[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 y5=Se(yd=>{"use strict";var sP=Nl(),Op=Ul(),Jv=Ac(),M0=Zr(),_7=Bf(),x7=l5(),p5=Pl(),X3=yu(),wfe=Mb(),Efe=p7(),v5=hu(),kg=Qh(),kfe=Ob(),Sft=kfe.enforce,Mft=kfe.clean,Tfe=wy().doAutoRange,Cfe="start",Eft="middle",Lfe="end",kft=dd().zindexSeparator;yd.layoutStyles=function(e){return M0.syncOrAsync([Jv.doAutoMargin,Lft],e)};function Cft(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 Lft(e){var t=e._fullLayout,r=t._size,n=r.p,i=v5.list(e,"",!0),a,o,s,u,l,f;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(X3.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),yd.drawMainTitle(e),Efe.manage(e),!t._has("cartesian"))return Jv.previousPromises(e);function c(Re,me,Be){var fe=Re._lw/2;if(Re._id.charAt(0)==="x"){if(me){if(Be==="top")return me._offset-n-fe}else return r.t+r.h*(1-(Re.position||0))+fe%1;return me._offset+me._length+n+fe}if(me){if(Be==="right")return me._offset+me._length+n+fe}else return r.l+r.w*(Re.position||0)+fe%1;return me._offset-n-fe}for(a=0;a<i.length;a++){u=i[a];var h=u._anchorAxis;u._linepositions={},u._lw=X3.crispRound(e,u.linewidth,1),u._mainLinePosition=c(u,h,u.side),u._mainMirrorPosition=u.mirror&&h?c(u,h,kg.OPPOSITE_SIDE[u.side]):null}var d=[],p=[],x=[],b=p5.opacity(t.paper_bgcolor)===1&&p5.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 y=s.xaxis.domain,k=s.yaxis.domain,E=s.plotgroup;if(Cft(y,k,x)&&o.indexOf(kft)===-1){var A=E.node(),L=s.bg=M0.ensureSingle(E,"rect","bg");A.insertBefore(L.node(),A.childNodes[0]),p.push(o)}else E.select("rect.bg").remove(),x.push([y,k]),b||(d.push(o),p.push(o))}var _=t._bgLayer.selectAll(".bg").data(d);for(_.enter().append("rect").classed("bg",!0),_.exit().remove(),_.each(function(Re){t._plots[Re].bg=sP.select(this)}),a=0;a<p.length;a++)s=t._plots[p[a]],l=s.xaxis,f=s.yaxis,s.bg&&l._offset!==void 0&&f._offset!==void 0&&s.bg.call(X3.setRect,l._offset-n,f._offset-n,l._length+2*n,f._length+2*n).call(p5.fill,t.plot_bgcolor).style("stroke-width",0);if(!t._hasOnlyLargeSploms)for(o in t._plots){s=t._plots[o],l=s.xaxis,f=s.yaxis;var C=s.clipId="clip"+t._uid+o+"plot",M=M0.ensureSingleById(t._clips,"clipPath",C,function(Re){Re.classed("plotclip",!0).append("rect")});s.clipRect=M.select("rect").attr({width:l._length,height:f._length}),X3.setTranslate(s.plot,l._offset,f._offset);var v,z;s._hasClipOnAxisFalse?(v=null,z=C):(v=C,z=null),X3.setClipUrl(s.plot,v,e),s.layerClipId=z}var T,F,q,U,H,j,G,O,W,re,ne,be,ze;function Ce(Re){return"M"+T+","+Re+"H"+F}function he(Re){return"M"+l._offset+","+Re+"h"+l._length}function te(Re){return"M"+Re+","+O+"V"+G}function ke(Re){return f._shift!==void 0&&(Re+=f._shift),"M"+Re+","+f._offset+"v"+f._length}function Ee(Re,me,Be){if(!Re.showline||o!==Re._mainSubplot)return"";if(!Re._anchorAxis)return Be(Re._mainLinePosition);var fe=me(Re._mainLinePosition);return Re.mirror&&(fe+=me(Re._mainMirrorPosition)),fe}for(o in t._plots){s=t._plots[o],l=s.xaxis,f=s.yaxis;var Me="M0,0";Afe(l,o)&&(H=oP(l,"left",f,i),T=l._offset-(H?n+H:0),j=oP(l,"right",f,i),F=l._offset+l._length+(j?n+j:0),q=c(l,f,"bottom"),U=c(l,f,"top"),ze=!l._anchorAxis||o!==l._mainSubplot,ze&&(l.mirror==="allticks"||l.mirror==="all")&&(l._linepositions[o]=[q,U]),Me=Ee(l,Ce,he),ze&&l.showline&&(l.mirror==="all"||l.mirror==="allticks")&&(Me+=Ce(q)+Ce(U)),s.xlines.style("stroke-width",l._lw+"px").call(p5.stroke,l.showline?l.linecolor:"rgba(0,0,0,0)")),s.xlines.attr("d",Me);var Oe="M0,0";Afe(f,o)&&(ne=oP(f,"bottom",l,i),G=f._offset+f._length+(ne?n:0),be=oP(f,"top",l,i),O=f._offset-(be?n:0),W=c(f,l,"left"),re=c(f,l,"right"),ze=!f._anchorAxis||o!==f._mainSubplot,ze&&(f.mirror==="allticks"||f.mirror==="all")&&(f._linepositions[o]=[W,re]),Oe=Ee(f,te,ke),ze&&f.showline&&(f.mirror==="all"||f.mirror==="allticks")&&(Oe+=te(W)+te(re)),s.ylines.style("stroke-width",f._lw+"px").call(p5.stroke,f.showline?f.linecolor:"rgba(0,0,0,0)")),s.ylines.attr("d",Oe)}return v5.makeClipPaths(e),Jv.previousPromises(e)}function Afe(e,t){return(e.ticks||e.showline)&&(t===e._mainSubplot||e.mirror==="all"||e.mirror==="allticks")}function Sfe(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=kg.FROM_BL[t];return r.side===t?n.domain[i]===e.domain[i]:r.mirror&&n.domain[1-i]===e.domain[1-i]}function oP(e,t,r,n){if(Sfe(e,t,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&Sfe(e,t,a))return a._lw}return 0}yd.drawMainTitle=function(e){var t=e._fullLayout.title,r=e._fullLayout,n=qft(r),i=Bft(r),a=Fft(r,i),o=Rft(r,n);if(wfe.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=sP.selectAll(".gtitle"),u=X3.bBox(sP.selectAll(".g-gtitle").node()).height,l=Ift(e,t,u);if(l>0){Dft(e,a,l,u),s.attr({x:o,y:a,"text-anchor":n,dy:Mfe(t.yanchor)}).call(_7.positionText,o,a);var f=(t.text.match(_7.BR_TAG_ALL)||[]).length;if(f){var c=kg.LINE_SPACING*f+kg.MID_SHIFT;t.y===0&&(c=-c),s.selectAll(".line").each(function(){var b=+this.getAttribute("dy").slice(0,-2)-c+"em";this.setAttribute("dy",b)})}var h=sP.selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),p=d.y+d.height,x=p+wfe.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:x,"text-anchor":n,dy:Mfe(t.yanchor)}).call(_7.positionText,o,x)}}}};function zft(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 Pft(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 Ift(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=Pft(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function Dft(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},u={};a.yref==="paper"&&zft(e,a,o,t,n)?s[o]=r:a.yref==="container"&&(u[o]=r,e._fullLayout._reservedMargin[i]=u),Jv.allowAutoMargin(e,i),Jv.autoMargin(e,i,s)}function Rft(e,t){var r=e.title,n=e._size,i=0;switch(t===Cfe?i=r.pad.l:t===Lfe&&(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 Fft(e,t){var r=e.title,n=e._size,i=0;if(t==="0em"||!t?i=-r.pad.b:t===kg.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 Mfe(e){return e==="top"?kg.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":kg.MID_SHIFT+"em"}function qft(e){var t=e.title,r=Eft;return M0.isRightAnchor(t)?r=Lfe:M0.isLeftAnchor(t)&&(r=Cfe),r}function Bft(e){var t=e.title,r="0em";return M0.isTopAnchor(t)?r=kg.CAP_SHIFT+"em":M0.isMiddleAnchor(t)&&(r=kg.MID_SHIFT+"em"),r}yd.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||{},u=s.arraysToCalcdata;u&&u(i,o);var l=s.editStyle;l&&r.push({fn:l,cd0:a})}if(r.length){for(n=0;n<r.length;n++){var f=r[n];f.fn(e,f.cd0)}x7(e),yd.redrawReglTraces(e)}return Jv.style(e),Op.getComponentMethod("legend","draw")(e),Jv.previousPromises(e)};yd.doColorBars=function(e){return Op.getComponentMethod("colorbar","draw")(e),Jv.previousPromises(e)};yd.layoutReplot=function(e){var t=e.layout;return e.layout=void 0,Op.call("_doPlot",e,"",t)};yd.doLegend=function(e){return Op.getComponentMethod("legend","draw")(e),Jv.previousPromises(e)};yd.doTicksRelayout=function(e){return v5.draw(e,"redraw"),e._fullLayout._hasOnlyLargeSploms&&(Op.subplotsRegistry.splom.updateGrid(e),x7(e),yd.redrawReglTraces(e)),yd.drawMainTitle(e),Jv.previousPromises(e)};yd.doModeBar=function(e){var t=e._fullLayout;Efe.manage(e);for(var r=0;r<t._basePlotModules.length;r++){var n=t._basePlotModules[r].updateFx;n&&n(e)}return Jv.previousPromises(e)};yd.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)}};yd.drawData=function(e){var t=e._fullLayout;x7(e);for(var r=t._basePlotModules,n=0;n<r.length;n++)r[n].plot(e);return yd.redrawReglTraces(e),Jv.style(e),Op.getComponentMethod("selections","draw")(e),Op.getComponentMethod("shapes","draw")(e),Op.getComponentMethod("annotations","draw")(e),Op.getComponentMethod("images","draw")(e),t._replotting=!1,Jv.previousPromises(e)};yd.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()}};yd.doAutoRangeAndConstraints=function(e){for(var t=v5.list(e,"",!0),r,n={},i=0;i<t.length;i++)if(r=t[i],!n[r._id]){n[r._id]=1,Mft(e,r),Tfe(e,r);var a=r._matchGroup;if(a)for(var o in a){var s=v5.getFromId(e,o);Tfe(e,s,r.range),n[o]=1}}Sft(e)};yd.finalDraw=function(e){Op.getComponentMethod("rangeslider","draw")(e),Op.getComponentMethod("rangeselector","draw")(e)};yd.drawMarginPushers=function(e){Op.getComponentMethod("legend","draw")(e),Op.getComponentMethod("rangeselector","draw")(e),Op.getComponentMethod("sliders","draw")(e),Op.getComponentMethod("updatemenus","draw")(e),Op.getComponentMethod("colorbar","draw")(e)}});var T7=Se((Unr,Rfe)=>{"use strict";var Oft=u_().readPaths,Nft=Jz(),zfe=Q1().clearOutlineControllers,b7=Pl(),Pfe=yu(),Uft=_f().arrayEditor,Ife=c_(),Vft=Ife.getPathString;Rfe.exports={draw:lP,drawOne:Dfe,activateLastSelection:Wft};function lP(e){var t=e._fullLayout;zfe(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++)Dfe(e,i)}function uP(e){return e._context.editSelection}function Dfe(e,t){e._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+t+'"]').remove();var r=Ife.makeSelectionsOptionsAndPlotinfo(e,t),n=r.options,i=r.plotinfo;if(!n._input)return;a(e._fullLayout._selectionLayer);function a(o){var s=Vft(e,n),u={"data-index":t,"fill-rule":"evenodd",d:s},l=n.opacity,f="rgba(0,0,0,0)",c=n.line.color||b7.contrast(e._fullLayout.plot_bgcolor),h=n.line.width,d=n.line.dash;h||(h=5,d="solid");var p=uP(e)&&e._fullLayout._activeSelectionIndex===t;p&&(f=e._fullLayout.activeselection.fillcolor,l=e._fullLayout.activeselection.opacity);for(var x=[],b=1;b>=0;b--){var y=o.append("path").attr(u).style("opacity",b?.1:l).call(b7.stroke,c).call(b7.fill,f).call(Pfe.dashLine,b?"solid":d,b?4+h:h);if(Hft(y,e,n),p){var k=Uft(e.layout,"selections",n);y.style({cursor:"move"});var E={element:y.node(),plotinfo:i,gd:e,editHelpers:k,isActiveSelection:!0},A=Oft(s,e);Nft(A,y,E)}else y.style("pointer-events",b?"all":"none");x[b]=y}var L=x[0],_=x[1];_.node().addEventListener("click",function(){return Gft(e,L)})}}function Hft(e,t,r){var n=r.xref+r.yref;Pfe.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function Gft(e,t){if(uP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){w7(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=w7,lP(e)}}}function Wft(e){if(uP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=w7,lP(e)}}function w7(e){if(uP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(zfe(e),delete e._fullLayout._activeSelectionIndex,lP(e))}}});var qfe=Se((Vnr,Ffe)=>{function jft(){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}Ffe.exports=jft});var Ofe=Se((Hnr,Bfe)=>{function Zft(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],u=i[1],l=r[0],f=r[1];return(s-a)*(f-o)-(u-o)*(l-a)>=-e},pointBetween:function(r,n,i){var a=r[1]-n[1],o=i[0]-n[0],s=r[0]-n[0],u=i[1]-n[1],l=s*o+a*u;if(l<e)return!1;var f=o*o+u*u;return!(l-f>-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],u=n[1]-i[1];return Math.abs(a*u-s*o)<e},linesIntersect:function(r,n,i,a){var o=n[0]-r[0],s=n[1]-r[1],u=a[0]-i[0],l=a[1]-i[1],f=o*l-s*u;if(Math.abs(f)<e)return!1;var c=r[0]-i[0],h=r[1]-i[1],d=(u*h-l*c)/f,p=(o*h-s*c)/f,x={alongA:0,alongB:0,pt:[r[0]+d*o,r[1]+d*s]};return d<=-e?x.alongA=-2:d<e?x.alongA=-1:d-1<=-e?x.alongA=0:d-1<e?x.alongA=1:x.alongA=2,p<=-e?x.alongB=-2:p<e?x.alongB=-1:p-1<=-e?x.alongB=0:p-1<e?x.alongB=1:x.alongB=2,x},pointInsideRegion:function(r,n){for(var i=r[0],a=r[1],o=n[n.length-1][0],s=n[n.length-1][1],u=!1,l=0;l<n.length;l++){var f=n[l][0],c=n[l][1];c-a>e!=s-a>e&&(o-f)*(a-c)/(s-c)+f-i>e&&(u=!u),o=f,s=c}return u}};return t}Bfe.exports=Zft});var Ufe=Se((Gnr,Nfe)=>{var Xft={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}};Nfe.exports=Xft});var Hfe=Se((Wnr,Vfe)=>{var m5=Ufe();function Yft(e,t,r){function n(p,x){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:null,below:null},otherFill:null}}function i(p,x,b){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=m5.create();function o(p,x,b,y,k,E){var A=t.pointsCompare(x,k);return A!==0?A:t.pointsSame(b,E)?0:p!==y?p?1:-1:t.pointAboveOrOnLine(b,y?k:E,y?E:k)?1:-1}function s(p,x){a.insertBefore(p,function(b){var y=o(p.isStart,p.pt,x,b.isStart,b.pt,b.other.pt);return y<0})}function u(p,x){var b=m5.node({isStart:!0,pt:p.start,seg:p,primary:x,other:null,status:null});return s(b,p.end),b}function l(p,x,b){var y=m5.node({isStart:!1,pt:x.end,seg:x,primary:b,other:p,status:null});p.other=y,s(y,p.pt)}function f(p,x){var b=u(p,x);return l(b,p,x),b}function c(p,x){r&&r.segmentChop(p.seg,x),p.other.remove(),p.seg.end=x,p.other.pt=x,s(p.other,p.pt)}function h(p,x){var b=i(x,p.seg.end,p.seg);return c(p,x),f(b,p.primary)}function d(p,x){var b=m5.create();function y(H,j){var G=H.seg.start,O=H.seg.end,W=j.seg.start,re=j.seg.end;return t.pointsCollinear(G,W,re)?t.pointsCollinear(O,W,re)||t.pointAboveOrOnLine(O,W,re)?1:-1:t.pointAboveOrOnLine(G,W,re)?1:-1}function k(H){return b.findTransition(function(j){var G=y(H,j.ev);return G>0})}function E(H,j){var G=H.seg,O=j.seg,W=G.start,re=G.end,ne=O.start,be=O.end;r&&r.checkIntersection(G,O);var ze=t.linesIntersect(W,re,ne,be);if(ze===!1){if(!t.pointsCollinear(W,re,ne)||t.pointsSame(W,be)||t.pointsSame(re,ne))return!1;var Ce=t.pointsSame(W,ne),he=t.pointsSame(re,be);if(Ce&&he)return j;var te=!Ce&&t.pointBetween(W,ne,be),ke=!he&&t.pointBetween(re,ne,be);if(Ce)return ke?h(j,re):h(H,be),j;te&&(he||(ke?h(j,re):h(H,be)),h(j,W))}else ze.alongA===0&&(ze.alongB===-1?h(H,ne):ze.alongB===0?h(H,ze.pt):ze.alongB===1&&h(H,be)),ze.alongB===0&&(ze.alongA===-1?h(j,W):ze.alongA===0?h(j,ze.pt):ze.alongA===1&&h(j,re));return!1}for(var A=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let H=function(){if(C){var j=E(L,C);if(j)return j}return M?E(L,M):!1};var U=H;r&&r.segmentNew(L.seg,L.primary);var _=k(L),C=_.before?_.before.ev:null,M=_.after?_.after.ev:null;r&&r.tempStatus(L.seg,C?C.seg:!1,M?M.seg:!1);var v=H();if(v){if(e){var z;L.seg.myFill.below===null?z=!0:z=L.seg.myFill.above!==L.seg.myFill.below,z&&(v.seg.myFill.above=!v.seg.myFill.above)}else v.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(v.seg),L.other.remove(),L.remove()}if(a.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var z;L.seg.myFill.below===null?z=!0:z=L.seg.myFill.above!==L.seg.myFill.below,M?L.seg.myFill.below=M.seg.myFill.above:L.seg.myFill.below=p,z?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var T;M?L.primary===M.primary?T=M.seg.otherFill.above:T=M.seg.myFill.above:T=L.primary?x:p,L.seg.otherFill={above:T,below:T}}r&&r.status(L.seg,C?C.seg:!1,M?M.seg:!1),L.other.status=_.insert(m5.node({ev:L}))}else{var F=L.status;if(F===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(F.prev)&&b.exists(F.next)&&E(F.prev.ev,F.next.ev),r&&r.statusRemove(F.ev.seg),F.remove(),!L.primary){var q=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=q}A.push(L.seg)}a.getHead().remove()}return r&&r.done(),A}return e?{addRegion:function(p){for(var x,b=p[p.length-1],y=0;y<p.length;y++){x=b,b=p[y];var k=t.pointsCompare(x,b);k!==0&&f(n(k<0?x:b,k<0?b:x),!0)}},calculate:function(p){return d(p,!1)}}:{calculate:function(p,x,b,y){return p.forEach(function(k){f(i(k.start,k.end,k),!0)}),b.forEach(function(k){f(i(k.start,k.end,k),!1)}),d(x,y)}}}Vfe.exports=Yft});var Wfe=Se((jnr,Gfe)=>{function Kft(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 u={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},f=u;function c(U,H,j){return f.index=U,f.matches_head=H,f.matches_pt1=j,f===u?(f=l,!1):(f=null,!0)}for(var h=0;h<n.length;h++){var d=n[h],p=d[0],x=d[1],b=d[d.length-1],y=d[d.length-2];if(t.pointsSame(p,o)){if(c(h,!0,!0))break}else if(t.pointsSame(p,s)){if(c(h,!0,!1))break}else if(t.pointsSame(b,o)){if(c(h,!1,!0))break}else if(t.pointsSame(b,s)&&c(h,!1,!1))break}if(f===u){n.push([o,s]),r&&r.chainNew(o,s);return}if(f===l){r&&r.chainMatch(u.index);var k=u.index,E=u.matches_pt1?s:o,A=u.matches_head,d=n[k],L=A?d[0]:d[d.length-1],_=A?d[1]:d[d.length-2],C=A?d[d.length-1]:d[0],M=A?d[d.length-2]:d[1];if(t.pointsCollinear(_,L,E)&&(A?(r&&r.chainRemoveHead(u.index,E),d.shift()):(r&&r.chainRemoveTail(u.index,E),d.pop()),L=_),t.pointsSame(C,E)){n.splice(k,1),t.pointsCollinear(M,C,L)&&(A?(r&&r.chainRemoveTail(u.index,L),d.pop()):(r&&r.chainRemoveHead(u.index,L),d.shift())),r&&r.chainClose(u.index),i.push(d);return}A?(r&&r.chainAddHead(u.index,E),d.unshift(E)):(r&&r.chainAddTail(u.index,E),d.push(E));return}function v(U){r&&r.chainReverse(U),n[U].reverse()}function z(U,H){var j=n[U],G=n[H],O=j[j.length-1],W=j[j.length-2],re=G[0],ne=G[1];t.pointsCollinear(W,O,re)&&(r&&r.chainRemoveTail(U,O),j.pop(),O=W),t.pointsCollinear(O,re,ne)&&(r&&r.chainRemoveHead(H,re),G.shift()),r&&r.chainJoin(U,H),n[U]=j.concat(G),n.splice(H,1)}var T=u.index,F=l.index;r&&r.chainConnect(T,F);var q=n[T].length<n[F].length;u.matches_head?l.matches_head?q?(v(T),z(T,F)):(v(F),z(F,T)):z(F,T):l.matches_head?z(T,F):q?(v(T),z(F,T)):(v(F),z(T,F))}),i}Gfe.exports=Kft});var Zfe=Se((Znr,jfe)=>{function g5(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 Jft={union:function(e,t){return g5(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return g5(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return g5(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return g5(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return g5(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};jfe.exports=Jft});var Yfe=Se((Xnr,Xfe)=>{var $ft={toPolygon:function(e,t){function r(a){if(a.length<=0)return e.segments({inverted:!1,regions:[]});function o(l){var f=l.slice(0,l.length-1);return e.segments({inverted:!1,regions:[f]})}for(var s=o(a[0]),u=1;u<a.length;u++)s=e.selectDifference(e.combine(s,o(a[u])));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,p){return t.pointInsideRegion([(d[0][0]+d[1][0])*.5,(d[0][1]+d[1][1])*.5],p)}function i(d){return{region:d,children:[]}}var a=i(null);function o(d,p){for(var x=0;x<d.children.length;x++){var b=d.children[x];if(n(p,b.region)){o(b,p);return}}for(var y=i(p),x=0;x<d.children.length;x++){var b=d.children[x];n(b.region,p)&&(y.children.push(b),d.children.splice(x,1),x--)}d.children.push(y)}for(var s=0;s<r.regions.length;s++){var u=r.regions[s];u.length<3||o(a,u)}function l(d,p){for(var x=0,b=d[d.length-1][0],y=d[d.length-1][1],k=[],E=0;E<d.length;E++){var A=d[E][0],L=d[E][1];k.push([A,L]),x+=L*b-A*y,b=A,y=L}var _=x<0;return _!==p&&k.reverse(),k.push([k[0][0],k[0][1]]),k}var f=[];function c(d){var p=[l(d.region,!1)];f.push(p);for(var x=0;x<d.children.length;x++)p.push(h(d.children[x]))}function h(d){for(var p=0;p<d.children.length;p++)c(d.children[p]);return l(d.region,!0)}for(var s=0;s<a.children.length;s++)c(a.children[s]);return f.length<=0?{type:"Polygon",coordinates:[]}:f.length==1?{type:"Polygon",coordinates:f[0]}:{type:"MultiPolygon",coordinates:f}}};Xfe.exports=$ft});var Qfe=Se((Ynr,$fe)=>{var Qft=qfe(),ect=Ofe(),Kfe=Hfe(),tct=Wfe(),_5=Zfe(),Jfe=Yfe(),E0=!1,x5=ect(),Ev;Ev={buildLog:function(e){return e===!0?E0=Qft():e===!1&&(E0=!1),E0===!1?!1:E0.list},epsilon:function(e){return x5.epsilon(e)},segments:function(e){var t=Kfe(!0,x5,E0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=Kfe(!1,x5,E0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:_5.union(e.combined,E0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:_5.intersect(e.combined,E0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:_5.difference(e.combined,E0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:_5.differenceRev(e.combined,E0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:_5.xor(e.combined,E0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:tct(e.segments,x5,E0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return Jfe.toPolygon(Ev,e)},polygonToGeoJSON:function(e){return Jfe.fromPolygon(Ev,x5,e)},union:function(e,t){return b5(e,t,Ev.selectUnion)},intersect:function(e,t){return b5(e,t,Ev.selectIntersect)},difference:function(e,t){return b5(e,t,Ev.selectDifference)},differenceRev:function(e,t){return b5(e,t,Ev.selectDifferenceRev)},xor:function(e,t){return b5(e,t,Ev.selectXor)}};function b5(e,t,r){var n=Ev.segments(e),i=Ev.segments(t),a=Ev.combine(n,i),o=r(a);return Ev.polygon(o)}typeof window=="object"&&(window.PolyBool=Ev);$fe.exports=Ev});var tce=Se((Knr,ece)=>{ece.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 u=i-n,l=0,f=u-1;l<u;f=l++){var c=r[l+n][0],h=r[l+n][1],d=r[f+n][0],p=r[f+n][1],x=h>o!=p>o&&a<(d-c)*(o-h)/(p-h)+c;x&&(s=!s)}return s}});var w5=Se((Jnr,rce)=>{"use strict";var A7=yL().dot,fP=ju().BADNUM,cP=rce.exports={};cP.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 u=!1,l;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]&&(u=!0,l=function(p){return p[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]&&(u=!0,l=function(p){return p[1]===r[0][1]}));function f(p,x){var b=p[0],y=p[1];return!(b===fP||b<n||b>i||y===fP||y<a||y>o||x&&l(p))}function c(p,x){var b=p[0],y=p[1];if(b===fP||b<n||b>i||y===fP||y<a||y>o)return!1;var k=r.length,E=r[0][0],A=r[0][1],L=0,_,C,M,v,z;for(_=1;_<k;_++)if(C=E,M=A,E=r[_][0],A=r[_][1],v=Math.min(C,E),!(b<v||b>Math.max(C,E)||y>Math.max(M,A)))if(y<Math.min(M,A))b!==v&&L++;else{if(E===C?z=y:z=M+(b-C)*(A-M)/(E-C),y===z)return!(_===1&&x);y<=z&&b!==v&&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:u?f:c,isRect:u,degenerate:h}};cP.isSegmentBent=function(t,r,n,i){var a=t[r],o=[t[n][0]-a[0],t[n][1]-a[1]],s=A7(o,o),u=Math.sqrt(s),l=[-o[1]/u,o[0]/u],f,c,h;for(f=r+1;f<n;f++)if(c=[t[f][0]-a[0],t[f][1]-a[1]],h=A7(c,o),h<0||h>s||Math.abs(A7(c,l))>i)return!0;return!1};cP.filter=function(t,r){var n=[t[0]],i=0,a=0;function o(u){t.push(u);var l=n.length,f=i;n.splice(a+1);for(var c=f+1;c<t.length;c++)(c===t.length-1||cP.isSegmentBent(t,f,c+1,r))&&(n.push(t[c]),n.length<l-2&&(i=c,a=n.length-1),f=c)}if(t.length>1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var nce=Se(($nr,ice)=>{"use strict";ice.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var Mce=Se((Qnr,Sce)=>{"use strict";var ace=Qfe(),rct=tce(),S5=Ul(),ict=yu().dashStyle,T5=Pl(),nct=jc(),act=rv().makeEventData,L5=Sy(),oct=L5.freeMode,sct=L5.rectMode,M5=L5.drawMode,k7=L5.openMode,C7=L5.selectMode,oce=c_(),sce=f5(),hce=Jz(),dce=Q1().clearOutline,pce=u_(),S7=pce.handleEllipse,lct=pce.readPaths,uct=Zz().newShapes,fct=$N(),cct=T7().activateLastSelection,dP=Zr(),hct=dP.sorterAsc,vce=w5(),A5=LL(),k0=$c().getFromId,dct=l5(),pct=y5().redrawReglTraces,pP=nce(),Am=pP.MINSELECT,vct=vce.filter,L7=vce.tester,z7=Hz(),lce=z7.p2r,yct=z7.axValue,mct=z7.getTransform;function P7(e){return e.subplot!==void 0}function gct(e,t,r,n,i){var a=!P7(n),o=oct(i),s=sct(i),u=k7(i),l=M5(i),f=C7(i),c=i==="drawline",h=i==="drawcircle",d=c||h,p=n.gd,x=p._fullLayout,b=f&&x.newselection.mode==="immediate"&&a,y=x._zoomlayer,k=n.element.getBoundingClientRect(),E=n.plotinfo,A=mct(E),L=t-k.left,_=r-k.top;x._calcInverseTransform(p);var C=dP.apply3DTransform(x._invTransform)(L,_);L=C[0],_=C[1];var M=x._invScaleX,v=x._invScaleY,z=L,T=_,F="M"+L+","+_,q=n.xaxes[0],U=n.yaxes[0],H=q._length,j=U._length,G=e.altKey&&!(M5(i)&&u),O,W,re,ne,be,ze,Ce;mce(e,p,n),o&&(O=vct([[L,_]],pP.BENDPX));var he=y.selectAll("path.select-outline-"+E.id).data([1]),te=l?x.newshape:x.newselection;l&&(n.hasText=te.label.text||te.label.texttemplate);var ke=l&&!u?te.fillcolor:"rgba(0,0,0,0)",Ee=te.line.color||(a?T5.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");he.enter().append("path").attr("class","select-outline select-outline-"+E.id).style({opacity:l?te.opacity/2:1,"stroke-dasharray":ict(te.line.dash,te.line.width),"stroke-width":te.line.width+"px","shape-rendering":"crispEdges"}).call(T5.stroke,Ee).call(T5.fill,ke).attr("fill-rule","evenodd").classed("cursor-move",!!l).attr("transform",A).attr("d",F+"Z");var Me=y.append("path").attr("class","zoombox-corners").style({fill:T5.background,stroke:T5.defaultLine,"stroke-width":1}).attr("transform",A).attr("d","M0,0Z");if(l&&n.hasText){var Oe=y.select(".label-temp");Oe.empty()&&(Oe=y.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Re=x._uid+pP.SELECTID,me=[],Be=vP(p,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var Ze=q._id,et=U._id;wce(p,Ze,et,Be);for(var gt=(p.layout||{}).selections||[],Pt=[],Qe=!1,Xe=0;Xe<gt.length;Xe++){var Tt=x.selections[Xe];!Tt||Tt.xref!==Ze||Tt.yref!==et?Pt.push(gt[Xe]):Qe=!0}Qe&&(p._fullLayout._noEmitSelectedAtStart=!0,S5.call("_guiRelayout",p,{selections:Pt}))}});var fe=Pct(n);n.moveFn=function(Ze,et){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),z=Math.max(0,Math.min(H,M*Ze+L)),T=Math.max(0,Math.min(j,v*et+_));var gt=Math.abs(z-L),Pt=Math.abs(T-_);if(s){var Qe,Xe,Tt;if(f){var xt=x.selectdirection;switch(xt==="any"?Pt<Math.min(gt*.6,Am)?Qe="h":gt<Math.min(Pt*.6,Am)?Qe="v":Qe="d":Qe=xt,Qe){case"h":Xe=h?j/2:0,Tt=j;break;case"v":Xe=h?H/2:0,Tt=H;break}}if(l)switch(x.newshape.drawdirection){case"vertical":Qe="h",Xe=h?j/2:0,Tt=j;break;case"horizontal":Qe="v",Xe=h?H/2:0,Tt=H;break;case"ortho":gt<Pt?(Qe="h",Xe=_,Tt=T):(Qe="v",Xe=L,Tt=z);break;default:Qe="d"}Qe==="h"?(ne=d?S7(h,[z,Xe],[z,Tt]):[[L,Xe],[L,Tt],[z,Tt],[z,Xe]],ne.xmin=d?z:Math.min(L,z),ne.xmax=d?z:Math.max(L,z),ne.ymin=Math.min(Xe,Tt),ne.ymax=Math.max(Xe,Tt),Me.attr("d","M"+ne.xmin+","+(_-Am)+"h-4v"+2*Am+"h4ZM"+(ne.xmax-1)+","+(_-Am)+"h4v"+2*Am+"h-4Z")):Qe==="v"?(ne=d?S7(h,[Xe,T],[Tt,T]):[[Xe,_],[Xe,T],[Tt,T],[Tt,_]],ne.xmin=Math.min(Xe,Tt),ne.xmax=Math.max(Xe,Tt),ne.ymin=d?T:Math.min(_,T),ne.ymax=d?T:Math.max(_,T),Me.attr("d","M"+(L-Am)+","+ne.ymin+"v-4h"+2*Am+"v4ZM"+(L-Am)+","+(ne.ymax-1)+"v4h"+2*Am+"v-4Z")):Qe==="d"&&(ne=d?S7(h,[L,_],[z,T]):[[L,_],[L,T],[z,T],[z,_]],ne.xmin=Math.min(L,z),ne.xmax=Math.max(L,z),ne.ymin=Math.min(_,T),ne.ymax=Math.max(_,T),Me.attr("d","M0,0Z"))}else o&&(O.addPt([z,T]),ne=O.filtered);if(n.selectionDefs&&n.selectionDefs.length?(re=gce(n.mergedPolygons,ne,G),ne.subtract=G,W=I7(n.selectionDefs.concat([ne]))):(re=[ne],W=L7(ne)),hce(xce(re,u),he,n),f){var _t=E7(p,!1),Ct=_t.eventData?_t.eventData.points.slice():[];_t=E7(p,!1,W,Be,n),W=_t.selectionTesters,Ce=_t.eventData;var jt;O?jt=O.filtered:jt=Tce(re),A5.throttle(Re,pP.SELECTDELAY,function(){me=bce(W,Be);for(var At=me.slice(),Te=0;Te<Ct.length;Te++){for(var nt=Ct[Te],ut=!1,ct=0;ct<At.length;ct++)if(At[ct].curveNumber===nt.curveNumber&&At[ct].pointNumber===nt.pointNumber){ut=!0;break}ut||At.push(nt)}At.length&&(Ce||(Ce={}),Ce.points=At),fe(Ce,jt),Ict(p,Ce)})}},n.clickFn=function(Ze,et){if(Me.remove(),p._fullLayout._activeShapeIndex>=0){p._fullLayout._deactivateShape(p);return}if(!l){var gt=x.clickmode;A5.done(Re).then(function(){if(A5.clear(Re),Ze===2){for(he.remove(),be=0;be<Be.length;be++)ze=Be[be],ze._module.selectPoints(ze,!1);if(k5(p,Be),E5(n),R7(p),Be.length){var Pt=Be[0].xaxis,Qe=Be[0].yaxis;if(Pt&&Qe){for(var Xe=[],Tt=p._fullLayout.selections,xt=0;xt<Tt.length;xt++){var _t=Tt[xt];_t&&(_t.xref!==Pt._id||_t.yref!==Qe._id)&&Xe.push(_t)}Xe.length<Tt.length&&(p._fullLayout._noEmitSelectedAtStart=!0,S5.call("_guiRelayout",p,{selections:Xe}))}}}else gt.indexOf("select")>-1&&yce(et,p,n.xaxes,n.yaxes,n.subplot,n,he),gt==="event"&&C5(p,void 0);nct.click(p,et,E.id)}).catch(dP.error)}},n.doneFn=function(){Me.remove(),A5.done(Re).then(function(){A5.clear(Re),!b&&ne&&n.selectionDefs&&(ne.subtract=G,n.selectionDefs.push(ne),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,re)),(b||l)&&E5(n,b),n.doneFnCompleted&&n.doneFnCompleted(me),f&&C5(p,Ce)}).catch(dP.error)}}function yce(e,t,r,n,i,a,o){var s=t._hoverdata,u=t._fullLayout,l=u.clickmode,f=l.indexOf("event")>-1,c=[],h,d,p,x,b,y,k,E,A,L;if(Tct(s)){mce(e,t,a),h=vP(t,r,n,i);var _=Act(s,h),C=_.pointNumbers.length>0;if(C?Sct(h,_):Mct(h)&&(k=fce(_))){for(o&&o.remove(),L=0;L<h.length;L++)d=h[L],d._module.selectPoints(d,!1);k5(t,h),E5(a),f&&R7(t)}else{E=e.shiftKey&&(k!==void 0?k:fce(_)),p=_ct(_.pointNumber,_.searchInfo,E);var M=a.selectionDefs.concat([p]);for(x=I7(M,x),L=0;L<h.length;L++)if(b=h[L]._module.selectPoints(h[L],x),y=_ce(b,h[L]),c.length)for(var v=0;v<y.length;v++)c.push(y[v]);else c=y;if(A={points:c},k5(t,h,A),p&&a&&a.selectionDefs.push(p),o){var z=a.mergedPolygons,T=k7(a.dragmode);hce(xce(z,T),o,a)}f&&C5(t,A)}}}function _ct(e,t,r){return{pointNumber:e,searchInfo:t,subtract:!!r}}function M7(e){return"pointNumber"in e&&"searchInfo"in e}function xct(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 I7(e){if(!e.length)return;for(var t=[],r=M7(e[0])?0:e[0][0][0],n=r,i=M7(e[0])?0:e[0][0][1],a=i,o=0;o<e.length;o++)if(M7(e[o]))t.push(xct(e[o]));else{var s=L7(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 u(l,f,c,h){for(var d=!1,p=0;p<t.length;p++)t[p].contains(l,f,c,h)&&(d=!t[p].subtract);return d}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:u,isRect:!1,degenerate:!1}}function mce(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)&&!(M5(a)&&k7(a));o&&s&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!s||!i.selection)&&E5(r),o||(dce(t),n._lastSelectedSubplot=i.id)}function bct(e){return e._fullLayout._activeShapeIndex>=0}function wct(e){return e._fullLayout._activeSelectionIndex>=0}function E5(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;bct(i)&&i._fullLayout._deactivateShape(i),wct(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=M5(r),u=C7(r);if(s||u){var l=o.selectAll(".select-outline-"+n.id);if(l&&i._fullLayout._outlining){var f;s&&(f=uct(l,e)),f&&S5.call("_guiRelayout",i,{shapes:f});var c;u&&!P7(e)&&(c=fct(l,e)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,S5.call("_guiRelayout",i,{selections:c}).then(function(){t&&cct(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function uce(e){return e._id}function vP(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(uce),o=r.map(uce),s,u,l;for(l=0;l<e.calcdata.length;l++)if(s=e.calcdata[l],u=s[0].trace,!(u.visible!==!0||!u._module||!u._module.selectPoints))if(P7({subplot:n})&&(u.subplot===n||u.geo===n))i.push(hP(u._module,s,t[0],r[0]));else if(u.type==="splom"){if(u._xaxes[a[0]]&&u._yaxes[o[0]]){var f=hP(u._module,s,t[0],r[0]);f.scene=e._fullLayout._splomScenes[u.uid],i.push(f)}}else if(u.type==="sankey"){var c=hP(u._module,s,t[0],r[0]);i.push(c)}else{if(a.indexOf(u.xaxis)===-1&&(!u._xA||!u._xA.overlaying)||o.indexOf(u.yaxis)===-1&&(!u._yA||!u._yA.overlaying))continue;i.push(hP(u._module,s,k0(e,u.xaxis),k0(e,u.yaxis)))}return i}function hP(e,t,r,n){return{_module:e,cd:t,xaxis:r,yaxis:n}}function Tct(e){return e&&Array.isArray(e)&&e[0].hoverOnBox!==!0}function Act(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 fce(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 Sct(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 Mct(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 k5(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 u=0;u<s.length;u++){var l=s[u],f=l.data,c=l.fullData,h=l.pointIndex,d=l.pointIndices;d?([].push.apply(f.selectedpoints,d),o._fullInput!==o&&[].push.apply(c.selectedpoints,d)):(f.selectedpoints.push(h),o._fullInput!==o&&c.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;Ect(e,t)}function Ect(e,t){for(var r=!1,n=0;n<t.length;n++){var i=t[n],a=i.cd;S5.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&&(dct(e),pct(e))}function gce(e,t,r){for(var n=r?ace.difference:ace.union,i=n({regions:e},{regions:[t]}),a=i.regions.reverse(),o=0;o<a.length;o++){var s=a[o];s.subtract=D7(s,a.slice(0,o))}return a}function _ce(e,t){if(Array.isArray(e))for(var r=t.cd,n=t.cd[0].trace,i=0;i<e.length;i++)e[i]=act(e[i],n,r);return e}function xce(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 bce(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=_ce(a,s),r=r.concat(n)}return r}function E7(e,t,r,n,i){var a=!!n,o,s,u;i&&(o=i.plotinfo,s=i.xaxes[0]._id,u=i.yaxes[0]._id);var l=[],f=[],c=cce(e),h=e._fullLayout;if(o){var d=h._zoomlayer,p=h.dragmode,x=M5(p),b=C7(p);if(x||b){var y=k0(e,s,"x"),k=k0(e,u,"y");if(y&&k){var E=d.selectAll(".select-outline-"+o.id);if(E&&e._fullLayout._outlining&&E.length){for(var A=E[0][0],L=A.getAttribute("d"),_=lct(L,e,o),C=[],M=0;M<_.length;M++){for(var v=_[M],z=[],T=0;T<v.length;T++)z.push([h_(y,v[T][1]),h_(k,v[T][2])]);z.xref=s,z.yref=u,z.subtract=D7(z,C),C.push(z)}c=c.concat(C)}}}}var F=s&&u?[s+u]:h._subplots.cartesian;kct(e);for(var q={},U=0;U<F.length;U++){var H=F[U],j=H.indexOf("y"),G=H.slice(0,j),O=H.slice(j),W=s&&u?r:void 0;if(W=Lct(c,G,O,W),W){var re=n;if(!a){var ne=k0(e,G,"x"),be=k0(e,O,"y");re=vP(e,[ne],[be],H);for(var ze=0;ze<re.length;ze++){var Ce=re[ze],he=Ce.cd[0],te=he.trace;if(Ce._module.name==="scattergl"&&!he.t.xpx){var ke=te.x,Ee=te.y,Me=te._length;he.t.xpx=[],he.t.ypx=[];for(var Oe=0;Oe<Me;Oe++)he.t.xpx[Oe]=ne.c2p(ke[Oe]),he.t.ypx[Oe]=be.c2p(Ee[Oe])}Ce._module.name==="splom"&&(q[te.uid]||(q[te.uid]=!0))}}var Re=bce(W,re);l=l.concat(Re),f=f.concat(re)}}var me={points:l};k5(e,f,me);var Be=h.clickmode,fe=Be.indexOf("event")>-1&&t;if(!o&&t){var Ze=cce(e,!0);if(Ze.length){var et=Ze[0].xref,gt=Ze[0].yref;if(et&&gt){var Pt=Tce(Ze),Qe=Ace([k0(e,et,"x"),k0(e,gt,"y")]);Qe(me,Pt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:fe&&C5(e,me),h._reselect=!1}if(!o&&h._deselect){var Xe=h._deselect;s=Xe.xref,u=Xe.yref,Cct(s,u,f)||wce(e,s,u,n),fe&&(me.points.length?C5(e,me):R7(e)),h._deselect=!1}return{eventData:me,selectionTesters:r}}function kct(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 Cct(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 wce(e,t,r,n){n=vP(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)}k5(e,n)}function Lct(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=gce(i,o,s),n=I7(i)}else i=[o],n=L7(o)}return n}function cce(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 u=s.xref,l=s.yref,f=k0(e,u,"x"),c=k0(e,l,"y"),h,d,p,x,b;if(s.type==="rect"){b=[];var y=h_(f,s.x0),k=h_(f,s.x1),E=h_(c,s.y0),A=h_(c,s.y1);b=[[y,E],[y,A],[k,A],[k,E]],h=Math.min(y,k),d=Math.max(y,k),p=Math.min(E,A),x=Math.max(E,A),b.xmin=h,b.xmax=d,b.ymin=p,b.ymax=x,b.xref=u,b.yref=l,b.subtract=!1,b.isRect=!0,r.push(b)}else if(s.type==="path")for(var L=s.path.split("Z"),_=[],C=0;C<L.length;C++){var M=L[C];if(M){M+="Z";var v=oce.extractPathCoords(M,sce.paramIsX,"raw"),z=oce.extractPathCoords(M,sce.paramIsY,"raw");h=1/0,d=-1/0,p=1/0,x=-1/0,b=[];for(var T=0;T<v.length;T++){var F=h_(f,v[T]),q=h_(c,z[T]);b.push([F,q]),h=Math.min(F,h),d=Math.max(F,d),p=Math.min(q,p),x=Math.max(q,x)}b.xmin=h,b.xmax=d,b.ymin=p,b.ymax=x,b.xref=u,b.yref=l,b.subtract=D7(b,_),_.push(b),r.push(b)}}}}return r}function D7(e,t){for(var r=!1,n=0;n<t.length;n++)for(var i=t[n],a=0;a<e.length;a++)if(rct(e[a],i)){r=!r;break}return r}function h_(e,t){return e.type==="date"&&(t=t.replace("_"," ")),e.type==="log"?e.c2p(t):e.r2p(t,null,e.calendar)}function Tce(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 zct(r)}function zct(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 Ace(e){return function(t,r){for(var n,i,a=0;a<e.length;a++){var o=e[a],s=o._id,u=s.charAt(0);if(r.isRect){n||(n={});var l=r[u+"min"],f=r[u+"max"];l!==void 0&&f!==void 0&&(n[s]=[lce(o,l),lce(o,f)].sort(hct))}else i||(i={}),i[s]=r.map(yct(o))}n&&(t.range=n),i&&(t.lassoPoints=i)}}function Pct(e){var t=e.plotinfo;return t.fillRangeItems||Ace(e.xaxes.concat(e.yaxes))}function Ict(e,t){e.emit("plotly_selecting",t)}function C5(e,t){t&&(t.selections=(e.layout||{}).selections||[]),e.emit("plotly_selected",t)}function R7(e){e.emit("plotly_deselect",null)}Sce.exports={reselect:E7,prepSelect:gct,clearOutline:dce,clearSelectionsCache:E5,selectOnClick:yce}});var F7=Se((ear,Ece)=>{"use strict";Ece.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 z5=Se((tar,kce)=>{"use strict";kce.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 Nb=Se((iar,zce)=>{"use strict";var Cce=F7(),Lce=uc(),yP=dd(),Dct=_f().templatedArray,rar=z5();zce.exports=Dct("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:Lce({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:Cce.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:Cce.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",yP.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",yP.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",yP.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",yP.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:Lce({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Sm=Se((nar,Pce)=>{"use strict";Pce.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Ey=Se((aar,Ice)=>{"use strict";Ice.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Zc=Se((oar,Oce)=>{"use strict";var Dce=Gc().axisHoverFormat,Rct=Du().texttemplateAttrs,Fct=Du().hovertemplateAttrs,Rce=Xf(),qct=uc(),Bct=Id().dash,Oct=Id().pattern,Nct=yu(),Uct=Sm(),mP=vu().extendFlat,Vct=Ey();function Fce(e){return{valType:"any",dflt:0,editType:"calc"}}function qce(e){return{valType:"any",editType:"calc"}}function Bce(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Oce.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:Fce("x"),yperiod:Fce("y"),xperiod0:qce("x0"),yperiod0:qce("y0"),xperiodalignment:Bce("x"),yperiodalignment:Bce("y"),xhoverformat:Dce("x"),yhoverformat:Dce("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:Rct({},{}),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:Fct({},{keys:Uct.eventDataKeys}),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:mP({},Bct,{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:Vct(!0),fillgradient:mP({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:Oct,marker:mP({symbol:{valType:"enumerated",values:Nct.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:mP({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},Rce("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"},Rce("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:qct({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var q7=Se((lar,Vce)=>{"use strict";var Nce=Nb(),Uce=Zc().line,Hct=Id().dash,gP=vu().extendFlat,Gct=_c().overrideAll,Wct=_f().templatedArray,sar=z5();Vce.exports=Gct(Wct("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:gP({},Nce.xref,{}),yref:gP({},Nce.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:Uce.color,width:gP({},Uce.width,{min:1,dflt:1}),dash:gP({},Hct,{dflt:"dot"})}}),"arraydraw","from-root")});var jce=Se((uar,Wce)=>{"use strict";var Hce=Zr(),_P=hu(),jct=Jd(),Zct=q7(),Gce=c_();Wce.exports=function(t,r){jct(t,r,{name:"selections",handleItemDefaults:Xct});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 Xct(e,t,r){function n(_,C){return Hce.coerce(e,t,Zct,_,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 u=["x","y"],l=0;l<2;l++){var f=u[l],c={_fullLayout:r},h,d,p,x=_P.coerceRef(e,t,c,f);if(h=_P.getFromId(c,x),h._selectionIndices.push(t._index),p=Gce.rangeToShapePosition(h),d=Gce.shapePositionToRange(h),s){var b=f+"0",y=f+"1",k=e[b],E=e[y];e[b]=d(e[b],!0),e[y]=d(e[y],!0),_P.coercePosition(t,c,n,x,b),_P.coercePosition(t,c,n,x,y);var A=t[b],L=t[y];A!==void 0&&L!==void 0&&(t[b]=p(A),t[y]=p(L),e[b]=k,e[y]=E)}}s&&Hce.noneOrAll(e,t,["x0","x1","y0","y1"])}});var Xce=Se((far,Zce)=>{"use strict";Zce.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 P5=Se((car,Jce)=>{"use strict";var Yct=Ul(),Yce=Zr(),Kce=$c();Jce.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=Yct.subplotsRegistry.cartesian,s=o.idRegex,u=i._subplots,l=u.xaxis,f=u.yaxis,c=u.cartesian,h=i._has("cartesian"),d=0;d<a.length;d++){var p=a[d];if(Yce.isPlainObject(p)){var x=Kce.cleanId(p.xref,"x",!1),b=Kce.cleanId(p.yref,"y",!1),y=s.x.test(x),k=s.y.test(b);if(y||k){h||Yce.pushUnique(i._basePlotModules,o);var E=!1;y&&l.indexOf(x)===-1&&(l.push(x),E=!0),k&&f.indexOf(b)===-1&&(f.push(b),E=!0),E&&y&&k&&c.push(x+b)}}}}}});var nh=Se((har,Qce)=>{"use strict";var $ce=T7(),I5=Mce();Qce.exports={moduleType:"component",name:"selections",layoutAttributes:q7(),supplyLayoutDefaults:jce(),supplyDrawNewSelectionDefaults:Xce(),includeBasePlot:P5()("selections"),draw:$ce.draw,drawOne:$ce.drawOne,reselect:I5.reselect,prepSelect:I5.prepSelect,clearOutline:I5.clearOutline,clearSelectionsCache:I5.clearSelectionsCache,selectOnClick:I5.selectOnClick}});var G7=Se((dar,_he)=>{"use strict";var V7=Nl(),C0=Zr(),ehe=C0.numberFormat,Kct=cd(),Jct=Ez(),xP=Ul(),uhe=C0.strTranslate,$ct=Bf(),the=Pl(),d_=yu(),Qct=jc(),rhe=hu(),eht=Ty(),tht=gp(),fhe=Sy(),bP=fhe.selectingOrDrawing,rht=fhe.freeMode,iht=Qh().FROM_TL,nht=l5(),aht=y5().redrawReglTraces,oht=Ac(),O7=$c().getFromId,sht=nh().prepSelect,lht=nh().clearOutline,uht=nh().selectOnClick,B7=v7(),H7=dd(),ihe=H7.MINDRAG,nv=H7.MINZOOM,nhe=!0;function fht(e,t,r,n,i,a,o,s){var u=e._fullLayout._zoomlayer,l=o+s==="nsew",f=(o+s).length===1,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G;r+=t.yaxis._shift;function O(){if(c=t.xaxis,h=t.yaxis,E=c._length,A=h._length,y=c._offset,k=h._offset,d={},d[c._id]=c,p={},p[h._id]=h,o&&s)for(var je=t.overlays,tt=0;tt<je.length;tt++){var Je=je[tt].xaxis;d[Je._id]=Je;var Mt=je[tt].yaxis;p[Mt._id]=Mt}x=lhe(d),b=lhe(p),C=ahe(x,s),M=ahe(b,o),v=!M&&!C,_=she(e,e._fullLayout._axisMatchGroups,d,p),L=she(e,e._fullLayout._axisConstraintGroups,d,p,_);var Vt=L.isSubplotConstrained||_.isSubplotConstrained;z=s||Vt,T=o||Vt;var Kt=e._fullLayout;F=Kt._has("scattergl"),q=Kt._has("splom"),U=Kt._has("svg")}O();var W=dht(M+C,e._fullLayout.dragmode,l),re=hhe(t,o+s+"drag",W,r,n,i,a);if(v&&!l)return re.onmousedown=null,re.style.pointerEvents="none",re;var ne={element:re,gd:e,plotinfo:t};ne.prepFn=function(je,tt,Je){var Mt=ne.dragmode,Vt=e._fullLayout.dragmode;Vt!==Mt&&(ne.dragmode=Vt),O(),j=e._fullLayout._invScaleX,G=e._fullLayout._invScaleY,v||(l?je.shiftKey?Vt==="pan"?Vt="zoom":bP(Vt)||(Vt="pan"):je.ctrlKey&&(Vt="pan"):Vt="pan"),rht(Vt)?ne.minDrag=1:ne.minDrag=void 0,bP(Vt)?(ne.xaxes=x,ne.yaxes=b,sht(je,tt,Je,ne,Vt)):(ne.clickFn=ze,bP(Mt)&&be(),v||(Vt==="zoom"?(ne.moveFn=Ze,ne.doneFn=gt,ne.minDrag=1,fe(je,tt,Je)):Vt==="pan"&&(ne.moveFn=_t,ne.doneFn=Te))),e._fullLayout._redrag=function(){var Kt=e._dragdata;if(Kt&&Kt.element===re){var ir=e._fullLayout.dragmode;bP(ir)||(O(),nt([0,0,E,A]),ne.moveFn(Kt.dx,Kt.dy))}}};function be(){ne.plotinfo.selection=!1,lht(e)}function ze(je,tt){var Je=ne.gd;if(Je._fullLayout._activeShapeIndex>=0){Je._fullLayout._deactivateShape(Je);return}var Mt=Je._fullLayout.clickmode;if(U7(Je),je===2&&!f&&At(),l)Mt.indexOf("select")>-1&&uht(tt,Je,x,b,t.id,ne),Mt.indexOf("event")>-1&&Qct.click(Je,tt,t.id);else if(je===1&&f){var Vt=o?h:c,Kt=o==="s"||s==="w"?0:1,ir=Vt._name+".range["+Kt+"]",fr=cht(Vt,Kt),Ot="left",De="middle";if(Vt.fixedrange)return;o?(De=o==="n"?"top":"bottom",Vt.side==="right"&&(Ot="right")):s==="e"&&(Ot="right"),Je._context.showAxisRangeEntryBoxes&&V7.select(re).call($ct.makeEditable,{gd:Je,immediate:!0,background:Je._fullLayout.paper_bgcolor,text:String(fr),fill:Vt.tickfont?Vt.tickfont.color:"#444",horizontalAlign:Ot,verticalAlign:De}).on("edit",function(_e){var Fe=Vt.d2r(_e);Fe!==void 0&&xP.call("_guiRelayout",Je,ir,Fe)})}}tht.init(ne);var Ce,he,te,ke,Ee,Me,Oe,Re,me,Be;function fe(je,tt,Je){var Mt=re.getBoundingClientRect();Ce=tt-Mt.left,he=Je-Mt.top,e._fullLayout._calcInverseTransform(e);var Vt=C0.apply3DTransform(e._fullLayout._invTransform)(Ce,he);Ce=Vt[0],he=Vt[1],te={l:Ce,r:Ce,w:0,t:he,b:he,h:0},ke=e._hmpixcount?e._hmlumcount/e._hmpixcount:Kct(e._fullLayout.plot_bgcolor).getLuminance(),Ee="M0,0H"+E+"V"+A+"H0V0",Me=!1,Oe="xy",Be=!1,Re=dhe(u,ke,y,k,Ee),me=phe(u,y,k)}function Ze(je,tt){if(e._transitioningWithDuration)return!1;var Je=Math.max(0,Math.min(E,j*je+Ce)),Mt=Math.max(0,Math.min(A,G*tt+he)),Vt=Math.abs(Je-Ce),Kt=Math.abs(Mt-he);te.l=Math.min(Ce,Je),te.r=Math.max(Ce,Je),te.t=Math.min(he,Mt),te.b=Math.max(he,Mt);function ir(){Oe="",te.r=te.l,te.t=te.b,me.attr("d","M0,0Z")}if(L.isSubplotConstrained)Vt>nv||Kt>nv?(Oe="xy",Vt/E>Kt/A?(Kt=Vt*A/E,he>Mt?te.t=he-Kt:te.b=he+Kt):(Vt=Kt*E/A,Ce>Je?te.l=Ce-Vt:te.r=Ce+Vt),me.attr("d",wP(te))):ir();else if(_.isSubplotConstrained)if(Vt>nv||Kt>nv){Oe="xy";var fr=Math.min(te.l/E,(A-te.b)/A),Ot=Math.max(te.r/E,(A-te.t)/A);te.l=fr*E,te.r=Ot*E,te.b=(1-fr)*A,te.t=(1-Ot)*A,me.attr("d",wP(te))}else ir();else!M||Kt<Math.min(Math.max(Vt*.6,ihe),nv)?Vt<ihe||!C?ir():(te.t=0,te.b=A,Oe="x",me.attr("d",pht(te,he))):!C||Vt<Math.min(Kt*.6,nv)?(te.l=0,te.r=E,Oe="y",me.attr("d",vht(te,Ce))):(Oe="xy",me.attr("d",wP(te)));te.w=te.r-te.l,te.h=te.b-te.t,Oe&&(Be=!0),e._dragged=Be,vhe(Re,me,te,Ee,Me,ke),et(),e.emit("plotly_relayouting",H),Me=!0}function et(){H={},(Oe==="xy"||Oe==="x")&&(N7(x,te.l/E,te.r/E,H,L.xaxes),Ct("x",H)),(Oe==="xy"||Oe==="y")&&(N7(b,(A-te.b)/A,(A-te.t)/A,H,L.yaxes),Ct("y",H))}function gt(){et(),U7(e),Te(),mhe(e)}var Pt=[0,0,E,A],Qe=null,Xe=H7.REDRAWDELAY,Tt=t.mainplot?e._fullLayout._plots[t.mainplot]:t;function xt(je){if(!e._context._scrollZoom.cartesian&&!e._fullLayout._enablescrollzoom)return;if(be(),e._transitioningWithDuration){je.preventDefault(),je.stopPropagation();return}O(),clearTimeout(Qe);var tt=-je.deltaY;if(isFinite(tt)||(tt=je.wheelDelta/10),!isFinite(tt)){C0.log("Did not find wheel motion attributes: ",je);return}var Je=Math.exp(-Math.min(Math.max(tt,-20),20)/200),Mt=Tt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Vt=(je.clientX-Mt.left)/Mt.width,Kt=(Mt.bottom-je.clientY)/Mt.height,ir;function fr(Ot,De,_e){if(Ot.fixedrange)return;var Fe=C0.simpleMap(Ot.range,Ot.r2l),Pe=Fe[0]+(Fe[1]-Fe[0])*De;function Ie(lt){return Ot.l2r(Pe+(lt-Pe)*_e)}Ot.range=Fe.map(Ie)}if(z){for(s||(Vt=.5),ir=0;ir<x.length;ir++)fr(x[ir],Vt,Je);Ct("x"),Pt[2]*=Je,Pt[0]+=Pt[2]*Vt*(1/Je-1)}if(T){for(o||(Kt=.5),ir=0;ir<b.length;ir++)fr(b[ir],Kt,Je);Ct("y"),Pt[3]*=Je,Pt[1]+=Pt[3]*(1-Kt)*(1/Je-1)}nt(Pt),jt(),e.emit("plotly_relayouting",H),Qe=setTimeout(function(){e._fullLayout&&(Pt=[0,0,E,A],Te())},Xe),je.preventDefault()}o.length*s.length!==1&&ghe(re,xt);function _t(je,tt){if(je=je*j,tt=tt*G,e._transitioningWithDuration)return;if(e._fullLayout._replotting=!0,C==="ew"||M==="ns"){var Je=C?-je:0,Mt=M?-tt:0;if(_.isSubplotConstrained){if(C&&M){var Vt=(je/E-tt/A)/2;je=Vt*E,tt=-Vt*A,Je=-je,Mt=-tt}M?Je=-Mt*E/A:Mt=-Je*A/E}C&&(ohe(x,je),Ct("x")),M&&(ohe(b,tt),Ct("y")),nt([Je,Mt,E,A]),jt(),e.emit("plotly_relayouting",H);return}function Kt(Ie,lt,ye){for(var ue=1-lt,de,ht,Et=0;Et<Ie.length;Et++){var St=Ie[Et];if(!St.fixedrange){de=St,ht=St._rl[ue]+(St._rl[lt]-St._rl[ue])/hht(ye/St._length);var Zt=St.l2r(ht);Zt!==!1&&Zt!==void 0&&(St.range[lt]=Zt)}}return de._length*(de._rl[lt]-ht)/(de._rl[lt]-de._rl[ue])}var ir=C==="w"==(M==="n")?1:-1;if(C&&M&&(L.isSubplotConstrained||_.isSubplotConstrained)){var fr=(je/E+ir*tt/A)/2;je=fr*E,tt=ir*fr*A}var Ot,De;if(C==="w"?je=Kt(x,0,je):C==="e"?je=Kt(x,1,-je):C||(je=0),M==="n"?tt=Kt(b,1,tt):M==="s"?tt=Kt(b,0,-tt):M||(tt=0),Ot=C==="w"?je:0,De=M==="n"?tt:0,L.isSubplotConstrained&&!_.isSubplotConstrained||_.isSubplotConstrained&&C&&M&&ir>0){var _e;if(_.isSubplotConstrained||!C&&M.length===1){for(_e=0;_e<x.length;_e++)x[_e].range=x[_e]._r.slice(),B7(x[_e],1-tt/A);je=tt*E/A,Ot=je/2}if(_.isSubplotConstrained||!M&&C.length===1){for(_e=0;_e<b.length;_e++)b[_e].range=b[_e]._r.slice(),B7(b[_e],1-je/E);tt=je*A/E,De=tt/2}}(!_.isSubplotConstrained||!M)&&Ct("x"),(!_.isSubplotConstrained||!C)&&Ct("y");var Fe=E-je,Pe=A-tt;_.isSubplotConstrained&&!(C&&M)&&(C?(De=Ot?0:je*A/E,Pe=Fe*A/E):(Ot=De?0:tt*E/A,Fe=Pe*E/A)),nt([Ot,De,Fe,Pe]),jt(),e.emit("plotly_relayouting",H)}function Ct(je,tt){for(var Je=_.isSubplotConstrained?{x:b,y:x}[je]:_[je+"axes"],Mt=_.isSubplotConstrained?{x,y:b}[je]:[],Vt=0;Vt<Je.length;Vt++){var Kt=Je[Vt],ir=Kt._id,fr=_.xLinks[ir]||_.yLinks[ir],Ot=Mt[0]||d[fr]||p[fr];Ot&&(tt?(tt[Kt._name+".range[0]"]=tt[Ot._name+".range[0]"],tt[Kt._name+".range[1]"]=tt[Ot._name+".range[1]"]):Kt.range=Ot.range.slice())}}function jt(){var je=[],tt;function Je(ir){for(tt=0;tt<ir.length;tt++)ir[tt].fixedrange||je.push(ir[tt]._id)}function Mt(ir,fr){for(tt=0;tt<ir.length;tt++){var Ot=ir[tt],De=Ot[fr];!Ot.fixedrange&&De.tickmode==="sync"&&je.push(De._id)}}for(z&&(Je(x),Je(L.xaxes),Je(_.xaxes),Mt(t.overlays,"xaxis")),T&&(Je(b),Je(L.yaxes),Je(_.yaxes),Mt(t.overlays,"yaxis")),H={},tt=0;tt<je.length;tt++){var Vt=je[tt],Kt=O7(e,Vt);rhe.drawOne(e,Kt,{skipTitle:!0}),H[Kt._name+".range[0]"]=Kt.range[0],H[Kt._name+".range[1]"]=Kt.range[1]}rhe.redrawComponents(e,je)}function At(){if(!e._transitioningWithDuration){var je=e._context.doubleClick,tt=[];C&&(tt=tt.concat(x)),M&&(tt=tt.concat(b)),_.xaxes&&(tt=tt.concat(_.xaxes)),_.yaxes&&(tt=tt.concat(_.yaxes));var Je={},Mt,Vt;if(je==="reset+autosize")for(je="autosize",Vt=0;Vt<tt.length;Vt++){Mt=tt[Vt];var Kt=Mt._rangeInitial0,ir=Mt._rangeInitial1,fr=Kt!==void 0||ir!==void 0;if(fr&&(Kt!==void 0&&Kt!==Mt.range[0]||ir!==void 0&&ir!==Mt.range[1])||!fr&&Mt.autorange!==!0){je="reset";break}}if(je==="autosize")for(Vt=0;Vt<tt.length;Vt++)Mt=tt[Vt],Mt.fixedrange||(Je[Mt._name+".autorange"]=!0);else if(je==="reset"){for((C||L.isSubplotConstrained)&&(tt=tt.concat(L.xaxes)),M&&!L.isSubplotConstrained&&(tt=tt.concat(L.yaxes)),L.isSubplotConstrained&&(C?M||(tt=tt.concat(b)):tt=tt.concat(x)),Vt=0;Vt<tt.length;Vt++)if(Mt=tt[Vt],!Mt.fixedrange){var Ot=Mt._name,De=Mt._autorangeInitial;Mt._rangeInitial0===void 0&&Mt._rangeInitial1===void 0?Je[Ot+".autorange"]=!0:Mt._rangeInitial0===void 0?(Je[Ot+".autorange"]=De,Je[Ot+".range"]=[null,Mt._rangeInitial1]):Mt._rangeInitial1===void 0?(Je[Ot+".range"]=[Mt._rangeInitial0,null],Je[Ot+".autorange"]=De):Je[Ot+".range"]=[Mt._rangeInitial0,Mt._rangeInitial1]}}e.emit("plotly_doubleclick",null),xP.call("_guiRelayout",e,Je)}}function Te(){nt([0,0,E,A]),C0.syncOrAsync([oht.previousPromises,function(){e._fullLayout._replotting=!1,xP.call("_guiRelayout",e,H)}],e)}function nt(je){var tt=e._fullLayout,Je=tt._plots,Mt=tt._subplots.cartesian,Vt,Kt,ir,fr;if(q&&xP.subplotsRegistry.splom.drag(e),F){for(Vt=0;Vt<Mt.length;Vt++)if(Kt=Je[Mt[Vt]],ir=Kt.xaxis,fr=Kt.yaxis,Kt._scene){ir.limitRange&&ir.limitRange(),fr.limitRange&&fr.limitRange();var Ot=C0.simpleMap(ir.range,ir.r2l),De=C0.simpleMap(fr.range,fr.r2l);Kt._scene.update({range:[Ot[0],De[0],Ot[1],De[1]]})}}if((q||F)&&(nht(e),aht(e)),U){var _e=je[2]/c._length,Fe=je[3]/h._length;for(Vt=0;Vt<Mt.length;Vt++){Kt=Je[Mt[Vt]],ir=Kt.xaxis,fr=Kt.yaxis;var Pe=(z||_.isSubplotConstrained)&&!ir.fixedrange&&d[ir._id],Ie=(T||_.isSubplotConstrained)&&!fr.fixedrange&&p[fr._id],lt,ye,ue,de;if(Pe?(lt=_e,ue=s||_.isSubplotConstrained?je[0]:rt(ir,lt)):_.xaHash[ir._id]?(lt=_e,ue=je[0]*ir._length/c._length):_.yaHash[ir._id]?(lt=Fe,ue=M==="ns"?-je[1]*ir._length/h._length:rt(ir,lt,{n:"top",s:"bottom"}[M])):(lt=ut(ir,_e,Fe),ue=ct(ir,lt)),lt>1&&(ir.maxallowed!==void 0&&z===(ir.range[0]<ir.range[1]?"e":"w")||ir.minallowed!==void 0&&z===(ir.range[0]<ir.range[1]?"w":"e"))&&(lt=1,ue=0),Ie?(ye=Fe,de=o||_.isSubplotConstrained?je[1]:rt(fr,ye)):_.yaHash[fr._id]?(ye=Fe,de=je[1]*fr._length/h._length):_.xaHash[fr._id]?(ye=_e,de=C==="ew"?-je[0]*fr._length/c._length:rt(fr,ye,{e:"right",w:"left"}[C])):(ye=ut(fr,_e,Fe),de=ct(fr,ye)),ye>1&&(fr.maxallowed!==void 0&&T===(fr.range[0]<fr.range[1]?"n":"s")||fr.minallowed!==void 0&&T===(fr.range[0]<fr.range[1]?"s":"n"))&&(ye=1,de=0),!(!lt&&!ye)){lt||(lt=1),ye||(ye=1);var ht=ir._offset-ue/lt,Et=fr._offset-de/ye;Kt.clipRect.call(d_.setTranslate,ue,de).call(d_.setScale,lt,ye),Kt.plot.call(d_.setTranslate,ht,Et).call(d_.setScale,1/lt,1/ye),(lt!==Kt.xScaleFactor||ye!==Kt.yScaleFactor)&&(d_.setPointGroupScale(Kt.zoomScalePts,lt,ye),d_.setTextPointsScale(Kt.zoomScaleTxt,lt,ye)),d_.hideOutsideRangePoints(Kt.clipOnAxisFalseTraces,Kt),Kt.xScaleFactor=lt,Kt.yScaleFactor=ye}}}}function ut(je,tt,Je){return je.fixedrange?0:z&&L.xaHash[je._id]?tt:T&&(L.isSubplotConstrained?L.xaHash:L.yaHash)[je._id]?Je:0}function ct(je,tt){return tt?(je.range=je._r.slice(),B7(je,tt),rt(je,tt)):0}function rt(je,tt,Je){return je._length*(1-tt)*iht[Je||je.constraintoward||"middle"]}return re}function che(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(eht,n),i.node()}function hhe(e,t,r,n,i,a,o){var s=che(e,"rect",t,r);return V7.select(s).call(d_.setRect,n,i,a,o),s}function ahe(e,t){for(var r=0;r<e.length;r++)if(!e[r].fixedrange)return t;return""}function cht(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,ehe("."+i+"g")(Math.pow(10,r))):(i=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(n)/Math.LN10)+4,ehe("."+String(i)+"g")(r))}function N7(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",u=s?1-t:t,l=s?1-r:r;n[o._name+".range[0]"]=o.l2r(o.p2l(u*o._length)),n[o._name+".range[1]"]=o.l2r(o.p2l(l*o._length))}else{var f=o._rl[0],c=o._rl[1]-f;n[o._name+".range[0]"]=o.l2r(f+c*t),n[o._name+".range[1]"]=o.l2r(f+c*r)}}if(i&&i.length){var h=(t+(1-r))/2;N7(i,h,1-h,n,[])}}function ohe(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),u=(o+s)/2;n.range=[n.l2r(n._rl[0]-u),n.l2r(n._rl[1]-u)]}else n.range=[n.l2r(n._rl[0]-t/n._m),n.l2r(n._rl[1]-t/n._m)];n.limitRange&&n.limitRange()}}}function hht(e){return 1-(e>=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function dht(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function dhe(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",uhe(r,n)).attr("d",i+"Z")}function phe(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:the.background,stroke:the.defaultLine,"stroke-width":1,opacity:0}).attr("transform",uhe(t,r)).attr("d","M0,0Z")}function vhe(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"),yhe(e,t,i,a)}function yhe(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 U7(e){V7.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function mhe(e){nhe&&e.data&&e._context.showTips&&(C0.notifier(C0._(e,"Double-click to zoom back out"),"long"),nhe=!1)}function pht(e,t){return"M"+(e.l-.5)+","+(t-nv-.5)+"h-3v"+(2*nv+1)+"h3ZM"+(e.r+.5)+","+(t-nv-.5)+"h3v"+(2*nv+1)+"h-3Z"}function vht(e,t){return"M"+(t-nv-.5)+","+(e.t-.5)+"v-3h"+(2*nv+1)+"v3ZM"+(t-nv-.5)+","+(e.b+.5)+"v3h"+(2*nv+1)+"v-3Z"}function wP(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,nv)/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 she(e,t,r,n,i){for(var a=!1,o={},s={},u,l,f,c,h=(i||{}).xaHash,d=(i||{}).yaHash,p=0;p<t.length;p++){var x=t[p];for(u in r)if(x[u]){for(f in x)!(i&&(h[f]||d[f]))&&!(f.charAt(0)==="x"?r:n)[f]&&(o[f]=u);for(l in n)!(i&&(h[l]||d[l]))&&x[l]&&(a=!0)}for(l in n)if(x[l])for(c in x)!(i&&(h[c]||d[c]))&&!(c.charAt(0)==="x"?r:n)[c]&&(s[c]=l)}a&&(C0.extendFlat(o,s),s={});var b={},y=[];for(f in o){var k=O7(e,f);y.push(k),b[k._id]=k}var E={},A=[];for(c in s){var L=O7(e,c);A.push(L),E[L._id]=L}return{xaHash:b,yaHash:E,xaxes:y,yaxes:A,xLinks:o,yLinks:s,isSubplotConstrained:a}}function ghe(e,t){if(!Jct)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 lhe(e){var t=[];for(var r in e)t.push(e[r]);return t}_he.exports={makeDragBox:fht,makeDragger:che,makeRectDragger:hhe,makeZoombox:dhe,makeCorners:phe,updateZoombox:vhe,xyCorners:wP,transitionZoombox:yhe,removeZoombox:U7,showDoubleClickNotifier:mhe,attachWheelEventHandler:ghe}});var W7=Se(AP=>{"use strict";var yht=Nl(),TP=jc(),mht=gp(),ght=Ty(),ky=G7().makeDragBox,md=dd().DRAGGERSIZE;AP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){yht.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"),u=o.split("y");return s[0]===u[0]?Number(s[1]||1)-Number(u[1]||1):Number(s[0]||1)-Number(u[0]||1)}return r._plots[a].mainplot?1:-1});n.forEach(function(a){var o=r._plots[a],s=o.xaxis,u=o.yaxis;if(!o.mainplot){var l=ky(t,o,s._offset,u._offset,s._length,u._length,"ns","ew");l.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&TP.hover(t,h,a)},TP.hover(t,h,a),t._fullLayout._lasthover=l,t._fullLayout._hoversubplot=a},l.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,mht.unhover(t,h))},t._context.showAxisDragHandles&&(ky(t,o,s._offset-md,u._offset-md,md,md,"n","w"),ky(t,o,s._offset+s._length,u._offset-md,md,md,"n","e"),ky(t,o,s._offset-md,u._offset+u._length,md,md,"s","w"),ky(t,o,s._offset+s._length,u._offset+u._length,md,md,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var f=s._mainLinePosition;s.side==="top"&&(f-=md),ky(t,o,s._offset+s._length*.1,f,s._length*.8,md,"","ew"),ky(t,o,s._offset,f,s._length*.1,md,"","w"),ky(t,o,s._offset+s._length*.9,f,s._length*.1,md,"","e")}if(a===u._mainSubplot){var c=u._mainLinePosition;u.side!=="right"&&(c-=md),ky(t,o,c,u._offset+u._length*.1,md,u._length*.8,"ns",""),ky(t,o,c,u._offset+u._length*.9,md,u._length*.1,"s",""),ky(t,o,c,u._offset,md,u._length*.1,"n","")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,TP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,TP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},AP.updateFx(t)}};AP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";ght(t._draggers,r)}});var whe=Se((yar,bhe)=>{"use strict";var xhe=Ul();bhe.exports=function(t){for(var r=xhe.layoutArrayContainers,n=xhe.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 u=t.substr(a.length);return u?(o=u.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),o?{array:a,index:Number(o[1]),property:o[3]||""}:!1):{array:a,index:"",property:""}}});var Ahe=Se(R5=>{"use strict";var _ht=yg(),j7=vL(),D5=H1(),xht=EL().sorterAsc,Z7=Ul();R5.containerArrayMatch=whe();var bht=R5.isAddVal=function(t){return t==="add"||_ht(t)},The=R5.isRemoveVal=function(t){return t===null||t==="remove"};R5.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=Z7.getComponentMethod(o,"supplyLayoutDefaults"),u=Z7.getComponentMethod(o,"draw"),l=Z7.getComponentMethod(o,"drawOne"),f=i.replot||i.recalc||s===j7||u===j7,c=t.layout,h=t._fullLayout;if(n[""]){Object.keys(n).length>1&&D5.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(The(d))r.set(null);else if(Array.isArray(d))r.set(d);else return D5.warn("Unrecognized full array edit value",o,d),!0;return f?!1:(s(c,h),u(t),!0)}var p=Object.keys(n).map(Number).sort(xht),x=r.get(),b=x||[],y=a(h,o).get(),k=[],E=-1,A=b.length,L,_,C,M,v,z,T,F;for(L=0;L<p.length;L++){if(C=p[L],M=n[C],v=Object.keys(M),z=M[""],T=bht(z),C<0||C>b.length-(T?0:1)){D5.warn("index out of range",o,C);continue}if(z!==void 0)v.length>1&&D5.warn("Insertion & removal are incompatible with edits to the same index.",o,C),The(z)?k.push(C):T?(z==="add"&&(z={}),b.splice(C,0,z),y&&y.splice(C,0,{})):D5.warn("Unrecognized full object edit value",o,C,z),E===-1&&(E=C);else for(_=0;_<v.length;_++)F=o+"["+C+"].",a(b[C],v[_],F).set(M[v[_]])}for(L=k.length-1;L>=0;L--)b.splice(k[L],1),y&&y.splice(k[L],1);if(b.length?x||r.set(b):r.set(null),f)return!1;if(s(c,h),l!==j7){var q;if(E===-1)q=p;else{for(A=Math.max(b.length,A),q=[],L=0;L<p.length&&(C=p[L],!(C>=E));L++)q.push(C);for(L=E;L<A;L++)q.push(L)}for(L=0;L<q.length;L++)l(t,q[L])}else u(t);return!0}});var Phe=Se(Cy=>{"use strict";var khe=_u(),gar=OB(),Che=Ul(),kv=Zr(),F5=Ac(),Lhe=$c(),zhe=Pl(),q5=Lhe.cleanId,wht=Lhe.getFromTrace,X7=Che.traceIs;Cy.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&kv.log("Clearing previous rejected promises from queue."),e._promises=[]};Cy.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=(F5.subplotsRegistry.cartesian||{}).attrRegex,i=(F5.subplotsRegistry.polar||{}).attrRegex,a=(F5.subplotsRegistry.ternary||{}).attrRegex,o=(F5.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t<s.length;t++){var u=s[t];if(n&&n.test(u)){var l=e[u];l.anchor&&l.anchor!=="free"&&(l.anchor=q5(l.anchor)),l.overlaying&&(l.overlaying=q5(l.overlaying)),l.type||(l.isdate?l.type="date":l.islog?l.type="log":l.isdate===!1&&l.islog===!1&&(l.type="linear")),(l.autorange==="withzero"||l.autorange==="tozero")&&(l.autorange=!0,l.rangemode="tozero"),l.insiderange&&delete l.range,delete l.islog,delete l.isdate,delete l.categories,SP(l,"domain")&&delete l.domain}}var f=Array.isArray(e.annotations)?e.annotations.length:0;for(t=0;t<f;t++){var c=e.annotations[t];kv.isPlainObject(c)&&(Y3(c,"xref"),Y3(c,"yref"))}var h=Array.isArray(e.shapes)?e.shapes.length:0;for(t=0;t<h;t++){var d=e.shapes[t];kv.isPlainObject(d)&&(Y3(d,"xref"),Y3(d,"yref"))}var p=Array.isArray(e.images)?e.images.length:0;for(t=0;t<p;t++){var x=e.images[t];kv.isPlainObject(x)&&(Y3(x,"xref"),Y3(x,"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"),zhe.clean(e),e.template&&e.template.layout&&Cy.cleanLayout(e.template.layout),e};function Y3(e,t){var r=e[t],n=t.charAt(0);r&&r!=="paper"&&(e[t]=q5(r,n,!0))}Cy.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"&&Cy.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=q5(r.xaxis,"x")),r.yaxis&&(r.yaxis=q5(r.yaxis,"y")),X7(r,"gl3d")&&r.scene&&(r.scene=F5.subplotsRegistry.gl3d.cleanId(r.scene)),!X7(r,"pie-like")&&!X7(r,"bar-like"))if(Array.isArray(r.textposition))for(n=0;n<r.textposition.length;n++)r.textposition[n]=Mhe(r.textposition[n]);else r.textposition&&(r.textposition=Mhe(r.textposition));var i=Che.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"&&kv.isPlainObject(r.contours)){var s=["x","y","z"];for(n=0;n<s.length;n++){var u=r.contours[s[n]];kv.isPlainObject(u)&&(u.highlightColor&&(u.highlightcolor=u.highlightColor,delete u.highlightColor),u.highlightWidth&&(u.highlightwidth=u.highlightWidth,delete u.highlightWidth))}}if(r.type==="candlestick"||r.type==="ohlc"){var l=(r.increasing||{}).showlegend!==!1,f=(r.decreasing||{}).showlegend!==!1,c=She(r.increasing),h=She(r.decreasing);if(c!==!1&&h!==!1){var d=Tht(c,h,l,f);d&&(r.name=d)}else(c||h)&&!r.name&&(r.name=c||h)}SP(r,"line")&&delete r.line,"marker"in r&&(SP(r.marker,"line")&&delete r.marker.line,SP(r,"marker")&&delete r.marker),zhe.clean(r),r.autobinx&&(delete r.autobinx,delete r.xbins),r.autobiny&&(delete r.autobiny,delete r.ybins)}};function She(e){if(!kv.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,(typeof t=="string"||typeof t=="number")&&String(t)}function Tht(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.substr(0,a);return o.trim()}function Mhe(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 SP(e,t){return t in e&&typeof e[t]=="object"&&Object.keys(e[t]).length===0}Cy.swapXYData=function(e){var t;if(kv.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);kv.swapAttrs(e,["error_?.copy_ystyle"]),n&&kv.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("+")}};Cy.coerceTraceIndices=function(e,t){if(khe(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++)kv.isIndex(t[n],e.data.length)?r.push(t[n]):kv.warn("trace index (",t[n],") is not a number or is out of bounds");return r}return t};Cy.manageArrayContainers=function(e,t,r){var n=e.obj,i=e.parts,a=i.length,o=i[a-1],s=khe(o);if(s&&t===null){var u=i.slice(0,a-1).join("."),l=kv.nestedProperty(n,u).get();l.splice(o,1)}else s&&e.get()===void 0&&e.get()===void 0&&(r[e.astr]=null),e.set(t)};var Aht=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function Ehe(e){var t=e.search(Aht);if(t>0)return e.substr(0,t)}Cy.hasParent=function(e,t){for(var r=Ehe(t);r;){if(r in e)return!0;r=Ehe(r)}return!1};var Sht=["x","y","z"];Cy.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=wht(e,i,Sht[a]);if(o&&o.type!=="log"){var s=o._name,u=o._id.substr(1);if(u.substr(0,5)==="scene"){if(r[u]!==void 0)continue;s=u+"."+s}var l=s+".type";r[s]===void 0&&r[l]===void 0&&kv.nestedProperty(e.layout,l).set(null)}}}});var qP=Se(Pf=>{"use strict";var kP=Nl(),Mht=_u(),Eht=sO(),Tl=Zr(),Sc=Tl.nestedProperty,J7=y3(),av=yne(),L0=Ul(),RP=_3(),Pu=Ac(),Np=hu(),kht=wN(),Cht=Rd(),Y7=yu(),Lht=Pl(),zht=W7().initInteractions,Pht=Zv(),Iht=nh().clearOutline,qhe=ub().dfltConfig,MP=Ahe(),Bh=Phe(),Yf=y5(),p_=_c(),Dht=dd().AX_NAME_PATTERN,K7=0,Ihe=5;function Rht(e,t,r,n){var i;if(e=Tl.getGraphDiv(e),J7.init(e),Tl.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=J7.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!Tl.isPlotDiv(e)&&Tl.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(i)return Pf.addFrames(e,i)}Ohe(e,n),r||(r={}),kP.select(e).classed("js-plotly-plot",!0),Y7.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var u=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(Bh.cleanData(t),u?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||u)&&(e.layout=Bh.cleanLayout(r)),Pu.supplyDefaults(e);var l=e._fullLayout,f=l._has("cartesian");l._replotting=!0,(u||l._shouldCreateBgLayer)&&(ndt(e),l._shouldCreateBgLayer&&delete l._shouldCreateBgLayer),Y7.initGradients(e),Y7.initPatterns(e),u&&Np.saveShowSpikeInitial(e);var c=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;c&&Pu.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(){Tl.isHidden(e)||Pu.resize(e)},window.addEventListener("resize",e._responsiveChartHandler)):Tl.clearResponsive(e);var d=Tl.extendFlat({},l._size),p=0;function x(){for(var C=l._basePlotModules,M=0;M<C.length;M++)C[M].drawFramework&&C[M].drawFramework(e);!l._glcanvas&&l._has("gl")&&(l._glcanvas=l._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(F){return F.key}),l._glcanvas.enter().append("canvas").attr("class",function(F){return"gl-canvas gl-canvas-"+F.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var v=e._context.plotGlPixelRatio;if(l._glcanvas){l._glcanvas.attr("width",l.width*v).attr("height",l.height*v).style("width",l.width+"px").style("height",l.height+"px");var z=l._glcanvas.data()[0].regl;if(z&&(Math.floor(l.width*v)!==z._gl.drawingBufferWidth||Math.floor(l.height*v)!==z._gl.drawingBufferHeight)){var T="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(p)Tl.error(T);else return Tl.log(T+" Clearing graph and plotting again."),Pu.cleanPlot([],{},e._fullData,l),Pu.supplyDefaults(e),l=e._fullLayout,Pu.doCalcdata(e),p++,x()}}return l.modebar.orientation==="h"?l._modebardiv.style("height",null).style("width","100%"):l._modebardiv.style("width",null).style("height",l.height+"px"),Pu.previousPromises(e)}function b(){if(Pu.clearAutoMarginIds(e),Yf.drawMarginPushers(e),Np.allowAutoMargin(e),e._fullLayout.title.text&&e._fullLayout.title.automargin&&Pu.allowAutoMargin(e,"title.automargin"),l._has("pie"))for(var C=e._fullData,M=0;M<C.length;M++){var v=C[M];v.type==="pie"&&v.automargin&&Pu.allowAutoMargin(e,"pie."+v.uid+".automargin")}return Pu.doAutoMargin(e),Pu.previousPromises(e)}function y(){if(Pu.didMarginChange(d,l._size))return Tl.syncOrAsync([b,Yf.layoutStyles],e)}function k(){if(!c){E();return}return Tl.syncOrAsync([L0.getComponentMethod("shapes","calcAutorange"),L0.getComponentMethod("annotations","calcAutorange"),E],e)}function E(){e._transitioning||(Yf.doAutoRangeAndConstraints(e),u&&Np.saveRangeInitial(e),L0.getComponentMethod("rangeslider","calcAutorange")(e))}function A(){return Np.draw(e,u?"":"redraw")}var L=[Pu.previousPromises,s,x,b,y];f&&L.push(k),L.push(Yf.layoutStyles),f&&L.push(A,function(M){var v=M._fullLayout._insideTickLabelsUpdaterange;if(v)return M._fullLayout._insideTickLabelsUpdaterange=void 0,B5(M,v).then(function(){Np.saveRangeInitial(M,!0)})}),L.push(Yf.drawData,Yf.finalDraw,zht,Pu.addLinks,Pu.rehover,Pu.redrag,Pu.reselect,Pu.doAutoMargin,Pu.previousPromises);var _=Tl.syncOrAsync(L,e);return(!_||!_.then)&&(_=Promise.resolve()),_.then(function(){return O5(e),e})}function O5(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function Fht(e){return Tl.extendFlat(qhe,e)}function Bhe(e,t){try{e._fullLayout._paper.style("background",t)}catch(r){Tl.error(r)}}function qht(e,t){var r=Lht.combine(t,"white");Bhe(e,r)}function Ohe(e,t){if(!e._context){e._context=Tl.extendDeep({},qhe);var r=kP.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]=qht: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"&&!Eht&&(n.displayModeBar=!0),(n.setBackground==="transparent"||typeof n.setBackground!="function")&&(n.setBackground=Bhe),n._hasZeroHeight=n._hasZeroHeight||e.clientHeight===0,n._hasZeroWidth=n._hasZeroWidth||e.clientWidth===0;var u=n.scrollZoom,l=n._scrollZoom={};if(u===!0)l.cartesian=1,l.gl3d=1,l.geo=1,l.mapbox=1,l.map=1;else if(typeof u=="string"){var f=u.split("+");for(i=0;i<f.length;i++)l[f[i]]=1}else u!==!1&&(l.gl3d=1,l.geo=1,l.mapbox=1,l.map=1)}function Bht(e){if(e=Tl.getGraphDiv(e),!Tl.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);return Bh.cleanData(e.data),Bh.cleanLayout(e.layout),e.calcdata=void 0,Pf._doPlot(e).then(function(){return e.emit("plotly_redraw"),e})}function Oht(e,t,r,n){return e=Tl.getGraphDiv(e),Pu.cleanPlot([],{},e._fullData||[],e._fullLayout||{}),Pu.purge(e),Pf._doPlot(e,t,r,n)}function CP(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 LP(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 Nhe(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]),LP(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&LP(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function Nht(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 Uht(e,t,r,n){var i=Tl.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!Tl.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");LP(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 corrispondence with the keys and number of traces in the update object")}}function Vht(e,t,r,n){var i=Tl.isPlainObject(n),a=[],o,s,u,l,f;Array.isArray(r)||(r=[r]),r=CP(r,e.data.length-1);for(var c in t)for(var h=0;h<r.length;h++){if(o=e.data[r[h]],u=Sc(o,c),s=u.get(),l=t[c][h],!Tl.isArrayOrTypedArray(l))throw new Error("attribute: "+c+" index: "+h+" must be an array");if(!Tl.isArrayOrTypedArray(s))throw new Error("cannot extend missing or non-array attribute: "+c);if(s.constructor!==l.constructor)throw new Error("cannot extend array with an array of a different type: "+c);f=i?n[c][h]:n,Mht(f)||(f=-1),a.push({prop:u,target:s,insert:l,maxp:Math.floor(f)})}return a}function Uhe(e,t,r,n,i){Uht(e,t,r,n);for(var a=Vht(e,t,r,n),o={},s={},u=0;u<a.length;u++){var l=a[u].prop,f=a[u].maxp,c=i(a[u].target,a[u].insert,f);l.set(c[0]),Array.isArray(o[l.astr])||(o[l.astr]=[]),o[l.astr].push(c[1]),Array.isArray(s[l.astr])||(s[l.astr]=[]),s[l.astr].push(a[u].target.length)}return{update:o,maxPoints:s}}function Vhe(e,t){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Hhe(e,t,r,n){e=Tl.getGraphDiv(e);function i(u,l,f){var c,h;if(Tl.isTypedArray(u))if(f<0){var d=new u.constructor(0),p=Vhe(u,l);f<0?(c=p,h=d):(c=d,h=p)}else if(c=new u.constructor(f),h=new u.constructor(u.length+l.length-f),f===l.length)c.set(l),h.set(u);else if(f<l.length){var x=l.length-f;c.set(l.subarray(x)),h.set(u),h.set(l.subarray(0,x),u.length)}else{var b=f-l.length,y=u.length-b;c.set(u.subarray(y)),c.set(l,b),h.set(u.subarray(0,y))}else c=u.concat(l),h=f>=0&&f<c.length?c.splice(0,c.length-f):[];return[c,h]}var a=Uhe(e,t,r,n,i),o=Pf.redraw(e),s=[e,a.update,r,a.maxPoints];return av.add(e,Pf.prependTraces,s,Hhe,arguments),o}function Ghe(e,t,r,n){e=Tl.getGraphDiv(e);function i(u,l,f){var c,h;if(Tl.isTypedArray(u))if(f<=0){var d=new u.constructor(0),p=Vhe(l,u);f<0?(c=p,h=d):(c=d,h=p)}else if(c=new u.constructor(f),h=new u.constructor(u.length+l.length-f),f===l.length)c.set(l),h.set(u);else if(f<l.length){var x=l.length-f;c.set(l.subarray(0,x)),h.set(l.subarray(x)),h.set(u,x)}else{var b=f-l.length;c.set(l),c.set(u.subarray(0,b),l.length),h.set(u.subarray(b))}else c=l.concat(u),h=f>=0&&f<c.length?c.splice(f,c.length):[];return[c,h]}var a=Uhe(e,t,r,n,i),o=Pf.redraw(e),s=[e,a.update,r,a.maxPoints];return av.add(e,Pf.extendTraces,s,Ghe,arguments),o}function Whe(e,t,r){e=Tl.getGraphDiv(e);var n=[],i=Pf.deleteTraces,a=Whe,o=[e,n],s=[e,t],u,l;for(Nht(e,t,r),Array.isArray(t)||(t=[t]),t=t.map(function(f){return Tl.extendFlat({},f)}),Bh.cleanData(t),u=0;u<t.length;u++)e.data.push(t[u]);for(u=0;u<t.length;u++)n.push(-t.length+u);if(typeof r=="undefined")return l=Pf.redraw(e),av.add(e,i,o,a,s),l;Array.isArray(r)||(r=[r]);try{Nhe(e,n,r)}catch(f){throw e.data.splice(e.data.length-t.length,t.length),f}return av.startSequence(e),av.add(e,i,o,a,s),l=Pf.moveTraces(e,n,r),av.stopSequence(e),l}function jhe(e,t){e=Tl.getGraphDiv(e);var r=[],n=Pf.addTraces,i=jhe,a=[e,r,t],o=[e,t],s,u;if(typeof t=="undefined")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(t)||(t=[t]),LP(e,t,"indices"),t=CP(t,e.data.length-1),t.sort(Tl.sorterDes),s=0;s<t.length;s+=1)u=e.data.splice(t[s],1)[0],r.push(u);var l=Pf.redraw(e);return av.add(e,n,a,i,o),l}function $7(e,t,r){e=Tl.getGraphDiv(e);var n=[],i=[],a=$7,o=$7,s=[e,r,t],u=[e,t,r],l;if(Nhe(e,t,r),t=Array.isArray(t)?t:[t],typeof r=="undefined")for(r=[],l=0;l<t.length;l++)r.push(-t.length+l);for(r=Array.isArray(r)?r:[r],t=CP(t,e.data.length-1),r=CP(r,e.data.length-1),l=0;l<e.data.length;l++)t.indexOf(l)===-1&&n.push(e.data[l]);for(l=0;l<t.length;l++)i.push({newIndex:r[l],trace:e.data[t[l]]});for(i.sort(function(c,h){return c.newIndex-h.newIndex}),l=0;l<i.length;l+=1)n.splice(i[l].newIndex,0,i[l].trace);e.data=n;var f=Pf.redraw(e);return av.add(e,a,s,o,u),f}function zP(e,t,r,n){e=Tl.getGraphDiv(e),Bh.clearPromiseQueue(e);var i={};if(typeof t=="string")i[t]=r;else if(Tl.isPlainObject(t))i=Tl.extendFlat({},t),n===void 0&&(n=r);else return Tl.warn("Restyle fail.",t,r,n),Promise.reject();Object.keys(i).length&&(e.changed=!0);var a=Bh.coerceTraceIndices(e,n),o=Zhe(e,i,a),s=o.flags;s.calc&&(e.calcdata=void 0),s.clearAxisTypes&&Bh.clearAxisTypes(e,a,{});var u=[];s.fullReplot?u.push(Pf._doPlot):(u.push(Pu.previousPromises),Pu.supplyDefaults(e),s.markerSize&&(Pu.doCalcdata(e),FP(u)),s.style&&u.push(Yf.doTraceStyle),s.colorbars&&u.push(Yf.doColorBars),u.push(O5)),u.push(Pu.rehover,Pu.redrag,Pu.reselect),av.add(e,zP,[e,o.undoit,o.traces],zP,[e,o.redoit,o.traces]);var l=Tl.syncOrAsync(u,e);return(!l||!l.then)&&(l=Promise.resolve()),l.then(function(){return e.emit("plotly_restyle",o.eventData),e})}function Cg(e){return e===void 0?null:e}function EP(e,t){return t?function(r,n,i){var a=Sc(r,n),o=a.set;return a.set=function(s){var u=(i||"")+n;PP(u,a.get(),s,e),o(s)},a}:Sc}function PP(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++)PP(e+"["+s+"]",i[s],a[s],n);else if(Tl.isPlainObject(t)||Tl.isPlainObject(r)){var u=Tl.isPlainObject(t)?t:{},l=Tl.isPlainObject(r)?r:{},f=Tl.extendFlat({},u,l);for(var c in f)PP(e+"."+c,u[c],l[c],n)}else n[e]===void 0&&(n[e]=Cg(t))}function Hht(e,t,r){for(var n in r){var i=Sc(e,n);PP(n,i.get(),r[n],t)}}function Zhe(e,t,r){var n=e._fullLayout,i=e._fullData,a=e.data,o=n._guiEditing,s=EP(n._preGUI,o),u=Tl.extendDeepAll({},t),l,f=p_.traceFlags(),c={},h={},d;function p(){return r.map(function(){})}function x(me){var Be=Np.id2name(me);d.indexOf(Be)===-1&&d.push(Be)}function b(me){return"LAYOUT"+me+".autorange"}function y(me){return"LAYOUT"+me+".range"}function k(me){for(var Be=me;Be<i.length;Be++)if(i[Be]._input===a[me])return i[Be]}function E(me,Be,fe){if(Array.isArray(me)){me.forEach(function(Pt){E(Pt,Be,fe)});return}if(!(me in t||Bh.hasParent(t,me))){var Ze;if(me.substr(0,6)==="LAYOUT")Ze=s(e.layout,me.replace("LAYOUT",""));else{var et=r[fe],gt=n._tracePreGUI[k(et)._fullInput.uid];Ze=EP(gt,o)(a[et],me)}me in h||(h[me]=p()),h[me][fe]===void 0&&(h[me][fe]=Cg(Ze.get())),Be!==void 0&&Ze.set(Be)}}function A(me){return function(Be){return i[Be][me]}}function L(me){return function(Be,fe){return Be===!1?i[r[fe]][me]:null}}for(var _ in t){if(Bh.hasParent(t,_))throw new Error("cannot set "+_+" and a parent attribute simultaneously");var C=t[_],M,v,z,T,F,q;if((_==="autobinx"||_==="autobiny")&&(_=_.charAt(_.length-1)+"bins",Array.isArray(C)?C=C.map(L(_)):C===!1?C=r.map(A(_)):C=null),c[_]=C,_.substr(0,6)==="LAYOUT"){z=s(e.layout,_.replace("LAYOUT","")),h[_]=[Cg(z.get())],z.set(Array.isArray(C)?C[0]:C),f.calc=!0;continue}for(h[_]=p(),l=0;l<r.length;l++){M=a[r[l]],v=k(r[l]);var U=n._tracePreGUI[v._fullInput.uid];if(z=EP(U,o)(M,_),T=z.get(),F=Array.isArray(C)?C[l%C.length]:C,F!==void 0){var H=z.parts[z.parts.length-1],j=_.substr(0,_.length-H.length-1),G=j?j+".":"",O=j?Sc(v,j).get():v;if(q=RP.getTraceValObject(v,z.parts),q&&q.impliedEdits&&F!==null)for(var W in q.impliedEdits)E(Tl.relativeAttr(_,W),q.impliedEdits[W],l);else if((H==="thicknessmode"||H==="lenmode")&&T!==F&&(F==="fraction"||F==="pixels")&&O){var re=n._size,ne=O.orient,be=ne==="top"||ne==="bottom";if(H==="thicknessmode"){var ze=be?re.h:re.w;E(G+"thickness",O.thickness*(F==="fraction"?1/ze:ze),l)}else{var Ce=be?re.w:re.h;E(G+"len",O.len*(F==="fraction"?1/Ce:Ce),l)}}else if(_==="type"&&(F==="pie"!=(T==="pie")||F==="funnelarea"!=(T==="funnelarea"))){var he="x",te="y";(F==="bar"||T==="bar")&&M.orientation==="h"&&(he="y",te="x"),Tl.swapAttrs(M,["?","?src"],"labels",he),Tl.swapAttrs(M,["d?","?0"],"label",he),Tl.swapAttrs(M,["?","?src"],"values",te),T==="pie"||T==="funnelarea"?(Sc(M,"marker.color").set(Sc(M,"marker.colors").get()),n._pielayer.selectAll("g.trace").remove()):L0.traceIs(M,"cartesian")&&Sc(M,"marker.colors").set(Sc(M,"marker.color").get())}h[_][l]=Cg(T);var ke=["swapxy","swapxyaxes","orientation","orientationaxes"];if(ke.indexOf(_)!==-1){if(_==="orientation"){z.set(F);var Ee=M.x&&!M.y?"h":"v";if((z.get()||Ee)===v.orientation)continue}else _==="orientationaxes"&&(M.orientation={v:"h",h:"v"}[v.orientation]);Bh.swapXYData(M),f.calc=f.clearAxisTypes=!0}else Pu.dataArrayContainers.indexOf(z.parts[0])!==-1?(Bh.manageArrayContainers(z,F,h),f.calc=!0):(q?q.arrayOk&&!L0.traceIs(v,"regl")&&(Tl.isArrayOrTypedArray(F)||Tl.isArrayOrTypedArray(T))?f.calc=!0:p_.update(f,q):f.calc=!0,z.set(F))}}if(["swapxyaxes","orientationaxes"].indexOf(_)!==-1&&Np.swap(e,r),_==="orientationaxes"){var Me=Sc(e.layout,"hovermode"),Oe=Me.get();Oe==="x"?Me.set("y"):Oe==="y"?Me.set("x"):Oe==="x unified"?Me.set("y unified"):Oe==="y unified"&&Me.set("x unified")}if(["orientation","type"].indexOf(_)!==-1){for(d=[],l=0;l<r.length;l++){var Re=a[r[l]];L0.traceIs(Re,"cartesian")&&(x(Re.xaxis||"x"),x(Re.yaxis||"y"))}E(d.map(b),!0,0),E(d.map(y),[0,1],0)}}return(f.calc||f.plot)&&(f.fullReplot=!0),{flags:f,undoit:h,redoit:c,traces:r,eventData:Tl.extendDeepNoArrays([],[u,r])}}function B5(e,t,r){e=Tl.getGraphDiv(e),Bh.clearPromiseQueue(e);var n={};if(typeof t=="string")n[t]=r;else if(Tl.isPlainObject(t))n=Tl.extendFlat({},t);else return Tl.warn("Relayout fail.",t,r),Promise.reject();Object.keys(n).length&&(e.changed=!0);var i=Jhe(e,n),a=i.flags;a.calc&&(e.calcdata=void 0);var o=[Pu.previousPromises];a.layoutReplot?o.push(Yf.layoutReplot):Object.keys(n).length&&(Xhe(e,a,i)||Pu.supplyDefaults(e),a.legend&&o.push(Yf.doLegend),a.layoutstyle&&o.push(Yf.layoutStyles),a.axrange&&FP(o,i.rangesAltered),a.ticks&&o.push(Yf.doTicksRelayout),a.modebar&&o.push(Yf.doModeBar),a.camera&&o.push(Yf.doCamera),a.colorbars&&o.push(Yf.doColorBars),o.push(O5)),o.push(Pu.rehover,Pu.redrag,Pu.reselect),av.add(e,B5,[e,i.undoit],B5,[e,i.redoit]);var s=Tl.syncOrAsync(o,e);return(!s||!s.then)&&(s=Promise.resolve(e)),s.then(function(){return e.emit("plotly_relayout",i.eventData),e})}function Xhe(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,p){return Tl.coerce(a,o,Cht,d,p)},u={};for(var l in r.rangesAltered){var f=Np.id2name(l);if(a=e.layout[f],o=n[f],kht(a,o,s,u),o._matchGroup){for(var c in o._matchGroup)if(c!==l){var h=n[Np.id2name(c)];h.autorange=o.autorange,h.range=o.range.slice(),h._input.range=o.range.slice()}}}return!0}function FP(e,t){var r=t?function(n){var i=[],a=!0;for(var o in t){var s=Np.getFromId(n,o);if(i.push(o),(s.ticklabelposition||"").indexOf("inside")!==-1&&s._anchorAxis&&i.push(s._anchorAxis._id),s._matchGroup)for(var u in s._matchGroup)t[u]||i.push(u)}return Np.draw(n,i,{skipTitle:a})}:function(n){return Np.draw(n,"redraw")};e.push(Iht,Yf.doAutoRangeAndConstraints,r,Yf.drawData,Yf.finalDraw)}var Yhe=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Khe=/^[xyz]axis[0-9]*\.autorange$/,Ght=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Jhe(e,t){var r=e.layout,n=e._fullLayout,i=n._guiEditing,a=EP(n._preGUI,i),o=Object.keys(t),s=Np.list(e),u=Tl.extendDeepAll({},t),l={},f,c,h;for(o=Object.keys(t),c=0;c<o.length;c++)if(o[c].indexOf("allaxes")===0){for(h=0;h<s.length;h++){var d=s[h]._id.substr(1),p=d.indexOf("scene")!==-1?d+".":"",x=o[c].replace("allaxes",p+s[h]._name);t[x]||(t[x]=t[o[c]])}delete t[o[c]]}var b=p_.layoutFlags(),y={},k={};function E(gt,Pt){if(Array.isArray(gt)){gt.forEach(function(Xe){E(Xe,Pt)});return}if(!(gt in t||Bh.hasParent(t,gt))){var Qe=a(r,gt);gt in k||(k[gt]=Cg(Qe.get())),Pt!==void 0&&Qe.set(Pt)}}var A={},L;function _(gt){var Pt=Np.name2id(gt.split(".")[0]);return A[Pt]=1,Pt}for(var C in t){if(Bh.hasParent(t,C))throw new Error("cannot set "+C+" and a parent attribute simultaneously");for(var M=a(r,C),v=t[C],z=M.parts.length,T=z-1;T>0&&typeof M.parts[T]!="string";)T--;var F=M.parts[T],q=M.parts[T-1]+"."+F,U=M.parts.slice(0,T).join("."),H=Sc(e.layout,U).get(),j=Sc(n,U).get(),G=M.get();if(v!==void 0){y[C]=v,k[C]=F==="reverse"?v:Cg(G);var O=RP.getLayoutValObject(n,M.parts);if(O&&O.impliedEdits&&v!==null)for(var W in O.impliedEdits)E(Tl.relativeAttr(C,W),O.impliedEdits[W]);if(["width","height"].indexOf(C)!==-1)if(v){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",v?null:n.width),E("height",v?null:n.height);else if(q.match(Yhe))_(q),Sc(n,U+"._inputRange").set(null);else if(q.match(Khe)){_(q),Sc(n,U+"._inputRange").set(null);var ne=Sc(n,U).get();ne._inputDomain&&(ne._input.domain=ne._inputDomain.slice())}else q.match(Ght)&&Sc(n,U+"._inputDomain").set(null);if(F==="type"){L=H;var be=j.type==="linear"&&v==="log",ze=j.type==="log"&&v==="linear";if(be||ze){if(!L||!L.range)E(U+".autorange",!0);else if(j.autorange)be&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var Ce=L.range[0],he=L.range[1];be?(Ce<=0&&he<=0&&E(U+".autorange",!0),Ce<=0?Ce=he/1e6:he<=0&&(he=Ce/1e6),E(U+".range[0]",Math.log(Ce)/Math.LN10),E(U+".range[1]",Math.log(he)/Math.LN10)):(E(U+".range[0]",Math.pow(10,Ce)),E(U+".range[1]",Math.pow(10,he)))}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"],L0.getComponentMethod("annotations","convertCoords")(e,j,v,E),L0.getComponentMethod("images","convertCoords")(e,j,v,E)}else E(U+".autorange",!0),E(U+".range",null);Sc(n,U+"._inputRange").set(null)}else if(F.match(Dht)){var te=Sc(n,C).get(),ke=(v||{}).type;(!ke||ke==="-")&&(ke="linear"),L0.getComponentMethod("annotations","convertCoords")(e,te,ke,E),L0.getComponentMethod("images","convertCoords")(e,te,ke,E)}var Ee=MP.containerArrayMatch(C);if(Ee){f=Ee.array,c=Ee.index;var Me=Ee.property,Oe=O||{editType:"calc"};c!==""&&Me===""&&(MP.isAddVal(v)?k[C]=null:MP.isRemoveVal(v)?k[C]=(Sc(r,f).get()||[])[c]:Tl.warn("unrecognized full object value",t)),p_.update(b,Oe),l[f]||(l[f]={});var Re=l[f][c];Re||(Re=l[f][c]={}),Re[Me]=v,delete t[C]}else F==="reverse"?(H.range?H.range.reverse():(E(U+".autorange",!0),H.range=[1,0]),j.autorange?b.calc=!0:b.plot=!0):(C==="dragmode"&&(v===!1&&G!==!1||v!==!1&&G===!1)||n._has("scatter-like")&&n._has("regl")&&C==="dragmode"&&(v==="lasso"||v==="select")&&!(G==="lasso"||G==="select")?b.plot=!0:O?p_.update(b,O):b.calc=!0,M.set(v))}}for(f in l){var me=MP.applyContainerArrayChanges(e,a(r,f),l[f],b,a);me||(b.plot=!0)}for(var Be in A){L=Np.getFromId(e,Be);var fe=L&&L._constraintGroup;if(fe){b.calc=!0;for(var Ze in fe)A[Ze]||(Np.getFromId(e,Ze)._constraintShrinkable=!0)}}($he(e)||t.height||t.width)&&(b.plot=!0);var et=n.shapes;for(c=0;c<et.length;c++)if(et[c].showlegend){b.calc=!0;break}return(b.plot||b.calc)&&(b.layoutReplot=!0),{flags:b,rangesAltered:A,undoit:k,redoit:y,eventData:u}}function $he(e){var t=e._fullLayout,r=t.width,n=t.height;return e.layout.autosize&&Pu.plotAutoSize(e,e.layout,t),t.width!==r||t.height!==n}function IP(e,t,r,n){e=Tl.getGraphDiv(e),Bh.clearPromiseQueue(e),Tl.isPlainObject(t)||(t={}),Tl.isPlainObject(r)||(r={}),Object.keys(t).length&&(e.changed=!0),Object.keys(r).length&&(e.changed=!0);var i=Bh.coerceTraceIndices(e,n),a=Zhe(e,Tl.extendFlat({},t),i),o=a.flags,s=Jhe(e,Tl.extendFlat({},r)),u=s.flags;(o.calc||u.calc)&&(e.calcdata=void 0),o.clearAxisTypes&&Bh.clearAxisTypes(e,i,r);var l=[];u.layoutReplot?l.push(Yf.layoutReplot):o.fullReplot?l.push(Pf._doPlot):(l.push(Pu.previousPromises),Xhe(e,u,s)||Pu.supplyDefaults(e),o.style&&l.push(Yf.doTraceStyle),(o.colorbars||u.colorbars)&&l.push(Yf.doColorBars),u.legend&&l.push(Yf.doLegend),u.layoutstyle&&l.push(Yf.layoutStyles),u.axrange&&FP(l,s.rangesAltered),u.ticks&&l.push(Yf.doTicksRelayout),u.modebar&&l.push(Yf.doModeBar),u.camera&&l.push(Yf.doCamera),l.push(O5)),l.push(Pu.rehover,Pu.redrag,Pu.reselect),av.add(e,IP,[e,a.undoit,s.undoit,a.traces],IP,[e,a.redoit,s.redoit,a.traces]);var f=Tl.syncOrAsync(l,e);return(!f||!f.then)&&(f=Promise.resolve(e)),f.then(function(){return e.emit("plotly_update",{data:a.eventData,layout:s.eventData}),e})}function eU(e){return function(r){r._fullLayout._guiEditing=!0;var n=e.apply(null,arguments);return r._fullLayout._guiEditing=!1,n}}var Wht=[{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"}],jht=[{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 Dhe(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.substr(a.length+1),attr:n.attr}}}}function Rhe(e,t){var r=Sc(t,e).get();if(r!==void 0)return r;var n=e.split(".");for(n.pop();n.length>1;)if(n.pop(),r=Sc(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function Zht(e,t){for(var r=0;r<t.length;r++)if(t[r]._fullInput.uid===e)return r;return-1}function Xht(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 Fhe(e,t){var r=Tl.isPlainObject(e),n=Array.isArray(e);return r||n?(r&&Tl.isPlainObject(t)||n&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function Yht(e,t,r,n){var i=n._preGUI,a,o,s,u,l,f,c,h,d,p,x=[],b={},y={};for(a in i){if(l=Dhe(a,Wht),l){if(d=l.head,p=l.tail,o=l.attr||d+".uirevision",s=Sc(n,o).get(),u=s&&Rhe(o,t),u&&u===s){if(f=i[a],f===null&&(f=void 0),c=Sc(t,a),h=c.get(),Fhe(h,f)){h===void 0&&p==="autorange"&&x.push(d),c.set(Cg(Sc(n,a).get()));continue}else if(p==="autorange"||p.substr(0,6)==="range["){var k=i[d+".range[0]"],E=i[d+".range[1]"],A=i[d+".autorange"];if(A||A===null&&k===null&&E===null){if(!(d in b)){var L=Sc(t,d).get();b[d]=L&&(L.autorange||L.autorange!==!1&&(!L.range||L.range.length!==2))}if(b[d]){c.set(Cg(Sc(n,a).get()));continue}}}}}else Tl.warn("unrecognized GUI edit: "+a);delete i[a],l&&l.tail.substr(0,6)==="range["&&(y[l.head]=1)}for(var _=0;_<x.length;_++){var C=x[_];if(y[C]){var M=Sc(t,C).get();M&&delete M.autorange}}var v=n._tracePreGUI;for(var z in v){var T=v[z],F=null,q;for(a in T){if(!F){var U=Zht(z,r);if(U<0){delete v[z];break}var H=r[U];q=H._fullInput;var j=Xht(z,e,q.index);if(j<0){delete v[z];break}F=e[j]}if(l=Dhe(a,jht),l){if(l.attr?(s=Sc(n,l.attr).get(),u=s&&Rhe(l.attr,t)):(s=q.uirevision,u=F.uirevision,u===void 0&&(u=t.uirevision)),u&&u===s&&(f=T[a],f===null&&(f=void 0),c=Sc(F,a),h=c.get(),Fhe(h,f))){c.set(Cg(Sc(q,a).get()));continue}}else Tl.warn("unrecognized GUI edit: "+a+" in trace uid "+z);delete T[a]}}}function Kht(e,t,r,n){var i,a;function o(){return Pf.addFrames(e,i)}e=Tl.getGraphDiv(e),Bh.clearPromiseQueue(e);var s=e._fullData,u=e._fullLayout;if(!Tl.isPlotDiv(e)||!s||!u)a=Pf.newPlot(e,t,r,n);else{if(Tl.isPlainObject(t)){var l=t;t=l.data,r=l.layout,n=l.config,i=l.frames}var f=!1;if(n){var c=Tl.extendDeep({},e._context);e._context=void 0,Ohe(e,n),f=Q7(c,e._context)}e.data=t||[],Bh.cleanData(e.data),e.layout=r||{},Bh.cleanLayout(e.layout),Yht(e.data,e.layout,s,u),Pu.supplyDefaults(e,{skipUpdateCalc:!0});var h=e._fullData,d=e._fullLayout,p=d.datarevision===void 0,x=d.transition,b=$ht(e,u,d,p,x),y=b.newDataRevision,k=Jht(e,s,h,p,x,y);if($he(e)&&(b.layoutReplot=!0),k.calc||b.calc){e.calcdata=void 0;for(var E=Object.getOwnPropertyNames(d),A=0;A<E.length;A++){var L=E[A],_=L.substring(0,5);if(_==="xaxis"||_==="yaxis"){var C=d[L]._emptyCategories;C&&C()}}}else Pu.supplyDefaultsUpdateCalc(e.calcdata,h);var M=[];if(i&&(e._transitionData={},Pu.createTransitionData(e),M.push(o)),d.transition&&!f&&(k.anim||b.anim))b.ticks&&M.push(Yf.doTicksRelayout),Pu.doCalcdata(e),Yf.doAutoRangeAndConstraints(e),M.push(function(){return Pu.transitionFromReact(e,k,b,u)});else if(k.fullReplot||b.layoutReplot||f)e._fullLayout._skipDefaults=!0,M.push(Pf._doPlot);else{for(var v in b.arrays){var z=b.arrays[v];if(z.length){var T=L0.getComponentMethod(v,"drawOne");if(T!==Tl.noop)for(var F=0;F<z.length;F++)T(e,z[F]);else{var q=L0.getComponentMethod(v,"draw");if(q===Tl.noop)throw new Error("cannot draw components: "+v);q(e)}}}M.push(Pu.previousPromises),k.style&&M.push(Yf.doTraceStyle),(k.colorbars||b.colorbars)&&M.push(Yf.doColorBars),b.legend&&M.push(Yf.doLegend),b.layoutstyle&&M.push(Yf.layoutStyles),b.axrange&&FP(M),b.ticks&&M.push(Yf.doTicksRelayout),b.modebar&&M.push(Yf.doModeBar),b.camera&&M.push(Yf.doCamera),M.push(O5)}M.push(Pu.rehover,Pu.redrag,Pu.reselect),a=Tl.syncOrAsync(M,e),(!a||!a.then)&&(a=Promise.resolve(e))}return a.then(function(){return e.emit("plotly_react",{data:t,layout:r}),e})}function Jht(e,t,r,n,i,a){var o=t.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s=p_.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var u,l;function f(d){var p=RP.getTraceValObject(l,d);return!l._module.animatable&&p.anim&&(p.anim=!1),p}var c={getValObject:f,flags:s,immutable:n,transition:i,newDataRevision:a,gd:e},h={};for(u=0;u<t.length;u++)if(r[u]){if(l=r[u]._fullInput,h[l.uid])continue;h[l.uid]=1,DP(t[u]._fullInput,l,[],c)}return(s.calc||s.plot)&&(s.fullReplot=!0),i&&s.nChanges&&s.nChangesAnim&&(s.anim=s.nChanges===s.nChangesAnim&&o?"all":"some"),s}function $ht(e,t,r,n,i){var a=p_.layoutFlags();a.arrays={},a.rangesAltered={},a.nChanges=0,a.nChangesAnim=0;function o(h){return RP.getLayoutValObject(r,h)}for(var s in r)if(!(!s.startsWith("xaxis")&&!s.startsWith("yaxis"))&&t[s]){var u=r[s].domain,l=t[s].domain,f=t[s]._inputDomain;t[s]._inputDomain&&(u[0]===f[0]&&u[1]===f[1]?r[s].domain=t[s].domain:(u[0]!==l[0]||u[1]!==l[1])&&(r[s]._inputDomain=null))}var c={getValObject:o,flags:a,immutable:n,transition:i,gd:e};return DP(t,r,[],c),(a.plot||a.calc)&&(a.layoutReplot=!0),i&&a.nChanges&&a.nChangesAnim&&(a.anim=a.nChanges===a.nChangesAnim?"all":"some"),a}function DP(e,t,r,n){var i,a,o,s=n.getValObject,u=n.flags,l=n.immutable,f=n.inArray,c=n.arrayIndex;function h(){var U=i.editType;if(f&&U.indexOf("arraydraw")!==-1){Tl.pushUnique(u.arrays[f],c);return}p_.update(u,i),U!=="none"&&u.nChanges++,n.transition&&i.anim&&u.nChangesAnim++,(Yhe.test(o)||Khe.test(o))&&(u.rangesAltered[r[0]]=1),a==="datarevision"&&(u.newDataRevision=1)}function d(U){return U.valType==="data_array"||U.arrayOk}for(a in e){if(u.calc&&!n.transition)return;var p=e[a],x=t[a],b=r.concat(a);if(o=b.join("."),!(a.charAt(0)==="_"||typeof p=="function"||p===x)){if((a==="tick0"||a==="dtick")&&r[0]!=="geo"){var y=t.tickmode;if(y==="auto"||y==="array"||!y)continue}if(!(a==="range"&&t.autorange)&&!((a==="zmin"||a==="zmax")&&t.type==="contourcarpet")&&(i=s(b),!!i&&!(i._compareAsJSON&&JSON.stringify(p)===JSON.stringify(x)))){var k=i.valType,E,A=d(i),L=Array.isArray(p),_=Array.isArray(x);if(L&&_){var C="_input_"+a,M=e[C],v=t[C];if(Array.isArray(M)&&M===v)continue}if(x===void 0)A&&L?u.calc=!0:h();else if(i._isLinkedToArray){var z=[],T=!1;f||(u.arrays[a]=z);var F=Math.min(p.length,x.length),q=Math.max(p.length,x.length);if(F!==q)if(i.editType==="arraydraw")T=!0;else{h();continue}for(E=0;E<F;E++)DP(p[E],x[E],b.concat(E),Tl.extendFlat({inArray:a,arrayIndex:E},n));if(T)for(E=F;E<q;E++)z.push(E)}else!k&&Tl.isPlainObject(p)?DP(p,x,b,n):A?L&&_?(l&&(u.calc=!0),(l||n.newDataRevision)&&h()):L!==_?u.calc=!0:h():L&&_?(p.length!==x.length||String(p)!==String(x))&&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])){u.calc=!0;return}else h()}function Q7(e,t){var r;for(r in e)if(r.charAt(0)!=="_"){var n=e[r],i=t[r];if(n!==i)if(Tl.isPlainObject(n)&&Tl.isPlainObject(i)){if(Q7(n,i))return!0}else if(Array.isArray(n)&&Array.isArray(i)){if(n.length!==i.length)return!0;for(var a=0;a<n.length;a++)if(n[a]!==i[a])if(Tl.isPlainObject(n[a])&&Tl.isPlainObject(i[a])){if(Q7(n[a],i[a]))return!0}else return!0}else return!0}}function Qht(e,t,r){if(e=Tl.getGraphDiv(e),!Tl.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=Pu.supplyAnimationDefaults(r);var i=r.transition,a=r.frame;n._frameWaitingCnt===void 0&&(n._frameWaitingCnt=0);function o(l){return Array.isArray(i)?l>=i.length?i[0]:i[l]:i}function s(l){return Array.isArray(a)?l>=a.length?a[0]:a[l]:a}function u(l,f){var c=0;return function(){if(l&&++c===f)return l()}}return new Promise(function(l,f){function c(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var F=n._frameQueue.pop();F.onInterrupt&&F.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(F){if(F.length!==0){for(var q=0;q<F.length;q++){var U;F[q].type==="byname"?U=Pu.computeFrame(e,F[q].name):U=F[q].data;var H=s(q),j=o(q);j.duration=Math.min(j.duration,H.duration);var G={frame:U,name:F[q].name,frameOpts:H,transitionOpts:j};q===F.length-1&&(G.onComplete=u(l,2),G.onInterrupt=f),n._frameQueue.push(G)}r.mode==="immediate"&&(n._lastFrameAt=-1/0),n._animationRaf||x()}}function d(){e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var F=n._currentFrame=n._frameQueue.shift();if(F){var q=F.name?F.name.toString():null;e._fullLayout._currentFrame=q,n._lastFrameAt=Date.now(),n._timeToNext=F.frameOpts.duration,Pu.transition(e,F.frame.data,F.frame.layout,Bh.coerceTraceIndices(e,F.frame.traces),F.frameOpts,F.transitionOpts).then(function(){F.onComplete&&F.onComplete()}),e.emit("plotly_animatingframe",{name:q,frame:F.frame,animation:{frame:F.frameOpts,transition:F.transitionOpts}})}else d()}function x(){e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var F=function(){n._animationRaf=window.requestAnimationFrame(F),Date.now()-n._lastFrameAt>n._timeToNext&&p()};F()}var b=0;function y(F){return Array.isArray(i)?b>=i.length?F.transitionOpts=i[b]:F.transitionOpts=i[0]:F.transitionOpts=i,b++,F}var k,E,A=[],L=t==null,_=Array.isArray(t),C=!L&&!_&&Tl.isPlainObject(t);if(C)A.push({type:"object",data:y(Tl.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))&&A.push({type:"byname",name:String(E.name),data:y({name:E.name})});else if(_)for(k=0;k<t.length;k++){var M=t[k];["number","string"].indexOf(typeof M)!==-1?(M=String(M),A.push({type:"byname",name:M,data:y({name:M})})):Tl.isPlainObject(M)&&A.push({type:"object",data:y(Tl.extendFlat({},M))})}for(k=0;k<A.length;k++)if(E=A[k],E.type==="byname"&&!n._frameHash[E.data.name]){Tl.warn('animate failure: frame not found: "'+E.data.name+'"'),f();return}["next","immediate"].indexOf(r.mode)!==-1&&c(),r.direction==="reverse"&&A.reverse();var v=e._fullLayout._currentFrame;if(v&&r.fromcurrent){var z=-1;for(k=0;k<A.length;k++)if(E=A[k],E.type==="byname"&&E.name===v){z=k;break}if(z>0&&z<A.length-1){var T=[];for(k=0;k<A.length;k++)E=A[k],(A[k].type!=="byname"||k>z)&&T.push(E);A=T}}A.length>0?h(A):(e.emit("plotly_animated"),l())})}function edt(e,t,r){if(e=Tl.getGraphDiv(e),t==null)return Promise.resolve();if(!Tl.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,u=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var l=s.length+t.length*2,f=[],c={};for(n=t.length-1;n>=0;n--)if(Tl.isPlainObject(t[n])){var h=t[n].name,d=(u[h]||c[h]||{}).name,p=t[n].name,x=u[d]||c[d];d&&p&&typeof p=="number"&&x&&K7<Ihe&&(K7++,Tl.warn('addFrames: overwriting frame "'+(u[d]||c[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.'),K7===Ihe&&Tl.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.")),c[h]={name:h},f.push({frame:Pu.supplyFrameDefaults(t[n]),index:r&&r[n]!==void 0&&r[n]!==null?r[n]:l+n})}f.sort(function(C,M){return C.index>M.index?-1:C.index<M.index?1:0});var b=[],y=[],k=s.length;for(n=f.length-1;n>=0;n--){if(i=f[n].frame,typeof i.name=="number"&&Tl.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+e._transitionData._counter++];);if(u[i.name]){for(a=0;a<s.length&&(s[a]||{}).name!==i.name;a++);b.push({type:"replace",index:a,value:i}),y.unshift({type:"replace",index:a,value:s[a]})}else o=Math.max(0,Math.min(f[n].index,k)),b.push({type:"insert",index:o,value:i}),y.unshift({type:"delete",index:o}),k++}var E=Pu.modifyFrames,A=Pu.modifyFrames,L=[e,y],_=[e,b];return av&&av.add(e,E,L,A,_),Pu.modifyFrames(e,b)}function tdt(e,t){if(e=Tl.getGraphDiv(e),!Tl.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=Pu.modifyFrames,u=Pu.modifyFrames,l=[e,o],f=[e,a];return av&&av.add(e,s,l,u,f),Pu.modifyFrames(e,a)}function rdt(e){e=Tl.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Pu.cleanPlot([],{},r,t),Pu.purge(e),J7.purge(e),t._container&&t._container.remove(),delete e._context,e}function idt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!Tl.equalDomRects(r,t._lastBBox)){var n=t._invTransform=Tl.inverseTransformMatrix(Tl.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 ndt(e){var t=kP.select(e),r=e._fullLayout;if(r._calcInverseTransform=idt,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={};kP.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=Tl.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(Pht.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")}Pf.animate=Qht;Pf.addFrames=edt;Pf.deleteFrames=tdt;Pf.addTraces=Whe;Pf.deleteTraces=jhe;Pf.extendTraces=Hhe;Pf.moveTraces=$7;Pf.prependTraces=Ghe;Pf.newPlot=Oht;Pf._doPlot=Rht;Pf.purge=rdt;Pf.react=Kht;Pf.redraw=Bht;Pf.relayout=B5;Pf.restyle=zP;Pf.setPlotConfig=Fht;Pf.update=IP;Pf._guiRelayout=eU(B5);Pf._guiRestyle=eU(zP);Pf._guiUpdate=eU(IP);Pf._storeDirectGUIEdit=Hht});var Lg=Se(Mm=>{"use strict";var adt=Ul();Mm.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Mm.getRedrawFunc=function(e){return function(){adt.getComponentMethod("colorbar","draw")(e)}};Mm.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Mm.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var Qhe=window.URL||window.webkitURL;Mm.createObjectURL=function(e){return Qhe.createObjectURL(e)};Mm.revokeObjectURL=function(e){return Qhe.revokeObjectURL(e)};Mm.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=odt(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Mm.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function odt(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}Mm.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/});var BP=Se((Aar,ede)=>{"use strict";var rU=Nl(),war=Zr(),sdt=yu(),ldt=Pl(),Tar=Zv(),tU=/"/g,N5="TOBESTRIPPED",udt=new RegExp('("'+N5+")|("+N5+'")',"g");function fdt(e){var t=rU.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 cdt(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}ede.exports=function(t,r,n){var i=t._fullLayout,a=i._paper,o=i._toppaper,s=i.width,u=i.height,l;a.insert("rect",":first-child").call(sdt.setRect,0,0,s,u).call(ldt.fill,i.paper_bgcolor);var f=i._basePlotModules||[];for(l=0;l<f.length;l++){var c=f[l];c.toSVG&&c.toSVG(t)}if(o){var h=o.node().childNodes,d=Array.prototype.slice.call(h);for(l=0;l<d.length;l++){var p=d[l];p.childNodes.length&&a.node().appendChild(p)}}i._draggers&&i._draggers.remove(),a.node().style.background="",a.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var b=rU.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){b.remove();return}else b.style({visibility:null,display:null});var y=this.style.fontFamily;y&&y.indexOf('"')!==-1&&b.style("font-family",y.replace(tU,N5));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 A=this.style.fontVariant;A&&A==="normal"&&b.style("font-variant",void 0)}),a.selectAll(".gradient_filled,.pattern_filled").each(function(){var b=rU.select(this),y=this.style.fill;y&&y.indexOf("url(")!==-1&&b.style("fill",y.replace(tU,N5));var k=this.style.stroke;k&&k.indexOf("url(")!==-1&&b.style("stroke",k.replace(tU,N5))}),(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*u),a.attr("viewBox","0 0 "+s+" "+u));var x=new window.XMLSerializer().serializeToString(a.node());return x=fdt(x),x=cdt(x),x=x.replace(udt,"'"),x}});var OP=Se((Sar,tde)=>{"use strict";var hdt=Zr(),ddt=pb().EventEmitter,U5=Lg();function pdt(e){var t=e.emitter||new ddt,r=new Promise(function(n,i){var a=window.Image,o=e.svg,s=e.format||"png",u=e.canvas,l=e.scale||1,f=e.width||300,c=e.height||150,h=l*f,d=l*c,p=u.getContext("2d",{willReadFrequently:!0}),x=new a,b,y;s==="svg"||hdt.isSafari()?y=U5.encodeSVG(o):(b=U5.createBlob(o,"svg"),y=U5.createObjectURL(b)),u.width=h,u.height=d,x.onload=function(){var k;switch(b=null,U5.revokeObjectURL(y),s!=="svg"&&p.drawImage(x,0,0,h,d),s){case"jpeg":k=u.toDataURL("image/jpeg");break;case"png":k=u.toDataURL("image/png");break;case"webp":k=u.toDataURL("image/webp");break;case"svg":k=y;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)},x.onerror=function(k){if(b=null,U5.revokeObjectURL(y),i(k),!e.promise)return t.emit("error",k)},x.src=y});return e.promise?r:t}tde.exports=pdt});var nU=Se((Mar,nde)=>{"use strict";var rde=_u(),ide=qP(),vdt=Ac(),Em=Zr(),V5=Lg(),ydt=BP(),mdt=OP(),gdt=QC().version,iU={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 _dt(e,t){t=t||{};var r,n,i,a;Em.isPlainObject(e)?(r=e.data||[],n=e.layout||{},i=e.config||{},a={}):(e=Em.getGraphDiv(e),r=Em.extendDeep([],e.data),n=Em.extendDeep({},e.layout),i=e._context,a=e._fullLayout||{});function o(_){return!(_ in t)||Em.validate(t[_],iU[_])}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 "+Em.join2(iU.format.values,", "," or ")+".");var s={};function u(_,C){return Em.coerce(t,s,iU,_,C)}var l=u("format"),f=u("width"),c=u("height"),h=u("scale"),d=u("setBackground"),p=u("imageDataOnly"),x=document.createElement("div");x.style.position="absolute",x.style.left="-5000px",document.body.appendChild(x);var b=Em.extendFlat({},n);f?b.width=f:t.width===null&&rde(a.width)&&(b.width=a.width),c?b.height=c:t.height===null&&rde(a.height)&&(b.height=a.height);var y=Em.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),k=V5.getRedrawFunc(x);function E(){return new Promise(function(_){setTimeout(_,V5.getDelay(x._fullLayout))})}function A(){return new Promise(function(_,C){var M=ydt(x,l,h),v=x._fullLayout.width,z=x._fullLayout.height;function T(){ide.purge(x),document.body.removeChild(x)}if(l==="full-json"){var F=vdt.graphJson(x,!1,"keepdata","object",!0,!0);return F.version=gdt,F=JSON.stringify(F),T(),_(p?F:V5.encodeJSON(F))}if(T(),l==="svg")return _(p?M:V5.encodeSVG(M));var q=document.createElement("canvas");q.id=Em.randstr(),mdt({format:l,width:v,height:z,scale:h,canvas:q,svg:M,promise:!0}).then(_).catch(C)})}function L(_){return p?_.replace(V5.IMAGE_URL_PREFIX,""):_}return new Promise(function(_,C){ide.newPlot(x,r,b,y).then(k).then(E).then(A).then(function(M){_(L(M))}).catch(function(M){C(M)})})}nde.exports=_dt});var lde=Se((Ear,sde)=>{"use strict";var z0=Zr(),xdt=Ac(),bdt=_3(),wdt=ub().dfltConfig,Ly=z0.isPlainObject,Vb=Array.isArray,ade=z0.isArrayOrTypedArray;sde.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=bdt.get(),i=[],a={_context:z0.extendFlat({},wdt)},o,s;Vb(t)?(a.data=z0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(gd("array","data"))),Ly(r)?(a.layout=z0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(gd("object","layout"))),xdt.supplyDefaults(a);for(var u=a._fullData,l=o.length,f=0;f<l;f++){var c=o[f],h=["data",f];if(!Ly(c)){i.push(gd("object",h));continue}var d=u[f],p=d.type,x=n.traces[p].attributes;x.type={valType:"enumerated",values:[p]},d.visible===!1&&c.visible!==!1&&i.push(gd("invisible",h)),NP(c,d,x,i,h)}var b=a._fullLayout,y=Tdt(n,u);return NP(s,b,y,i,"layout"),i.length===0?void 0:i};function NP(e,t,r,n,i,a){a=a||[];for(var o=Object.keys(e),s=0;s<o.length;s++){var u=o[s],l=a.slice();l.push(u);var f=e[u],c=t[u],h=Mdt(r,u),d=(h||{}).valType,p=d==="info_array",x=d==="colorscale",b=(h||{}).items;if(!Sdt(r,u))n.push(gd("schema",i,l));else if(Ly(f)&&Ly(c)&&d!=="any")NP(f,c,h,n,i,l);else if(p&&Vb(f)){f.length>c.length&&n.push(gd("unused",i,l.concat(c.length)));var y=c.length,k=Array.isArray(b);k&&(y=Math.min(y,b.length));var E,A,L,_,C;if(h.dimensions===2)for(A=0;A<y;A++)if(Vb(f[A])){f[A].length>c[A].length&&n.push(gd("unused",i,l.concat(A,c[A].length)));var M=c[A].length;for(E=0;E<(k?Math.min(M,b[A].length):M);E++)L=k?b[A][E]:b,_=f[A][E],C=c[A][E],z0.validate(_,L)?C!==_&&C!==+_&&n.push(gd("dynamic",i,l.concat(A,E),_,C)):n.push(gd("value",i,l.concat(A,E),_))}else n.push(gd("array",i,l.concat(A),f[A]));else for(A=0;A<y;A++)L=k?b[A]:b,_=f[A],C=c[A],z0.validate(_,L)?C!==_&&C!==+_&&n.push(gd("dynamic",i,l.concat(A),_,C)):n.push(gd("value",i,l.concat(A),_))}else if(h.items&&!p&&Vb(f)){var v=b[Object.keys(b)[0]],z=[],T,F;for(T=0;T<c.length;T++){var q=c[T]._index||T;if(F=l.slice(),F.push(q),Ly(f[q])&&Ly(c[T])){z.push(q);var U=f[q],H=c[T];Ly(U)&&U.visible!==!1&&H.visible===!1?n.push(gd("invisible",i,F)):NP(U,H,v,n,i,F)}}for(T=0;T<f.length;T++)F=l.slice(),F.push(T),Ly(f[T])?z.indexOf(T)===-1&&n.push(gd("unused",i,F)):n.push(gd("object",i,F,f[T]))}else!Ly(f)&&Ly(c)?n.push(gd("object",i,l,f)):!ade(f)&&ade(c)&&!p&&!x?n.push(gd("array",i,l,f)):u in t?z0.validate(f,h)?h.valType==="enumerated"&&(h.coerceNumber&&f!==+c||f!==c)&&n.push(gd("dynamic",i,l,f,c)):n.push(gd("value",i,l,f)):n.push(gd("unused",i,l,f))}return n}function Tdt(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?z0.extendFlat(r[a.attributes.subplot.dflt],o):z0.extendFlat(r,o))}return r}var Adt={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=Ub(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=Ub(e)+"key "+t,r+" must be linked to an array container"},schema:function(e,t){return Ub(e)+"key "+t+" is not part of the schema"},unused:function(e,t,r){var n=Ly(r)?"container":"key";return Ub(e)+n+" "+t+" did not get coerced"},dynamic:function(e,t,r,n){return[Ub(e)+"key",t,"(set to '"+r+"')","got reset to","'"+n+"'","during defaults."].join(" ")},invisible:function(e,t){return(t?Ub(e)+"item "+t:"Trace "+e[1])+" got defaulted to be not visible"},value:function(e,t,r){return[Ub(e)+"key "+t,"is set to an invalid value ("+r+")"].join(" ")}};function Ub(e){return Vb(e)?"In data trace "+e[1]+", ":"In "+e+", "}function gd(e,t,r,n,i){r=r||"";var a,o;Vb(t)?(a=t[0],o=t[1]):(a=t,o=null);var s=kdt(r),u=Adt[e](t,s,n,i);return z0.log(u),{code:e,container:a,trace:o,path:r,astr:s,msg:u}}function Sdt(e,t){var r=ode(t),n=r.keyMinusId,i=r.id;return n in e&&e[n]._isSubplotObj&&i?!0:t in e}function Mdt(e,t){if(t in e)return e[t];var r=ode(t);return e[r.keyMinusId]}var Edt=z0.counterRegex("([a-z]+)");function ode(e){var t=e.match(Edt);return{keyMinusId:t&&t[1],id:t&&t[2]}}function kdt(e){if(!Vb(e))return String(e);for(var t="",r=0;r<e.length;r++){var n=e[r];typeof n=="number"?t=t.substr(0,t.length-1)+"["+n+"]":t+=n,r<e.length-1&&(t+=".")}return t}});var fde=Se((kar,ude)=>{"use strict";var Cdt=Zr(),UP=Lg();function Ldt(e,t,r){var n=document.createElement("a"),i="download"in n,a=new Promise(function(o,s){var u,l;if(i)return u=UP.createBlob(e,r),l=UP.createObjectURL(u),n.href=l,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),UP.revokeObjectURL(l),u=null,o(t);if(Cdt.isSafari()){var f=r==="svg"?",":";base64,";return UP.octetStream(f+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}ude.exports=Ldt});var aU=Se((Lar,hde)=>{"use strict";var cde=Zr(),zdt=nU(),Pdt=fde(),Car=Lg();function Idt(e,t){var r;return cde.isPlainObject(e)||(r=cde.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=zdt(e,t),o=t.filename||e.fn||"newplot";o+="."+t.format.replace("-","."),a.then(function(s){return r&&(r._snapshotInProgress=!1),Pdt(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}hde.exports=Idt});var mde=Se(oU=>{"use strict";var Cv=Zr(),Lv=Cv.isPlainObject,dde=_3(),pde=Ac(),Ddt=zf(),vde=_f(),yde=ub().dfltConfig;oU.makeTemplate=function(e){e=Cv.isPlainObject(e)?e:Cv.getGraphDiv(e),e=Cv.extendDeep({_context:yde},{data:e.data,layout:e.layout}),pde.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 p={};H5(d,p,Fdt.bind(null,d));var x=Cv.coerce(d,{},Ddt,"type"),b=n.data[x];b||(b=n.data[x]=[]),b.push(p)}),H5(r,n.layout,Rdt.bind(null,r)),delete n.layout.template;var i=r.template;if(Lv(i)){var a=i.layout,o,s,u,l,f,c;Lv(a)&&VP(a,n.layout);var h=i.data;if(Lv(h)){for(s in n.data)if(u=h[s],Array.isArray(u)){for(f=n.data[s],c=f.length,l=u.length,o=0;o<c;o++)VP(u[o%l],f[o]);for(o=c;o<l;o++)f.push(Cv.extendDeep({},u[o]))}for(s in h)s in n.data||(n.data[s]=Cv.extendDeep([],h[s]))}}return n};function VP(e,t){e=Cv.extendDeep({},e);var r=Object.keys(e).sort(),n,i;function a(f,c,h){if(Lv(c)&&Lv(f))VP(f,c);else if(Array.isArray(c)&&Array.isArray(f)){var d=vde.arrayTemplater({_template:e},h);for(i=0;i<c.length;i++){var p=c[i],x=d.newItem(p)._template;x&&VP(x,p)}var b=d.defaultItems();for(i=0;i<b.length;i++)c.push(b[i]._template);for(i=0;i<c.length;i++)delete c[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,HP(o)===o)for(var u in t){var l=HP(u);u!==l&&l===o&&!(u in e)&&a(s,t[u],o)}}}function HP(e){return e.replace(/[0-9]+$/,"")}function H5(e,t,r,n,i){var a=i&&r(i);for(var o in e){var s=e[o],u=P0(e,o,n),l=P0(e,o,i),f=r(l);if(!f){var c=HP(o);c!==o&&(l=P0(e,c,i),f=r(l))}if(!(a&&a===f)&&!(!f||f._noTemplating||f.valType==="data_array"||f.arrayOk&&Array.isArray(s)))if(!f.valType&&Lv(s))H5(s,t,r,u,l);else if(f._isLinkedToArray&&Array.isArray(s))for(var h=!1,d=0,p={},x=0;x<s.length;x++){var b=s[x];if(Lv(b)){var y=b.name;if(y)p[y]||(H5(b,t,r,P0(s,d,u),P0(s,d,l)),d++,p[y]=1);else if(!h){var k=vde.arrayDefaultKey(o),E=P0(e,k,n),A=P0(s,d,u);H5(b,t,r,A,P0(s,d,l));var L=Cv.nestedProperty(t,A),_=Cv.nestedProperty(t,E);_.set(L.get()),L.set(null),h=!0}}}else{var C=Cv.nestedProperty(t,u);C.set(s)}}}function Rdt(e,t){return dde.getLayoutValObject(e,Cv.nestedProperty({},t).parts)}function Fdt(e,t){return dde.getTraceValObject(e,Cv.nestedProperty({},t).parts)}function P0(e,t,r){var n;return r?Array.isArray(e)?n=r+"["+t+"]":n=r+"."+t:n=t,n}oU.validateTemplate=function(e,t){var r=Cv.extendDeep({},{_context:yde,data:e.data,layout:e.layout}),n=r.layout||{};Lv(t)||(t=n.template||{});var i=t.layout,a=t.data,o=[];r.layout=n,r.layout.template=t,pde.supplyDefaults(r);var s=r._fullLayout,u=r._fullData,l={};function f(E,A){for(var L in E)if(L.charAt(0)!=="_"&&Lv(E[L])){var _=HP(L),C=[],M;for(M=0;M<A.length;M++)C.push(P0(E,L,A[M])),_!==L&&C.push(P0(E,_,A[M]));for(M=0;M<C.length;M++)l[C[M]]=1;f(E[L],C)}}function c(E,A){for(var L in E)if(L.indexOf("defaults")===-1&&Lv(E[L])){var _=P0(E,L,A);l[_]?c(E[L],_):o.push({code:"unused",path:_})}}if(Lv(i)?(f(s,["layout"]),c(i,"layout")):o.push({code:"layout"}),!Lv(a))o.push({code:"data"});else{for(var h={},d,p=0;p<u.length;p++){var x=u[p];d=x.type,h[d]=(h[d]||0)+1,x._fullInput._template||o.push({code:"missing",index:x.index,traceType:d})}for(d in a){var b=a[d].length,y=h[d]||0;b>y?o.push({code:"unused",traceType:d,templateCount:b,dataCount:y}):y>b&&o.push({code:"reused",traceType:d,templateCount:b,dataCount:y})}}function k(E,A){for(var L in E)if(L.charAt(0)!=="_"){var _=E[L],C=P0(E,L,A);Lv(_)?(Array.isArray(E)&&_._template===!1&&_.templateitemname&&o.push({code:"missing",path:C,templateitemname:_.templateitemname}),k(_,C)):Array.isArray(_)&&qdt(_)&&k(_,C)}}if(k({data:u,layout:s},""),o.length)return o.map(Bdt)};function qdt(e){for(var t=0;t<e.length;t++)if(Lv(e[t]))return!0}function Bdt(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 _de=Se(Uc=>{"use strict";var rd=qP();Uc._doPlot=rd._doPlot;Uc.newPlot=rd.newPlot;Uc.restyle=rd.restyle;Uc.relayout=rd.relayout;Uc.redraw=rd.redraw;Uc.update=rd.update;Uc._guiRestyle=rd._guiRestyle;Uc._guiRelayout=rd._guiRelayout;Uc._guiUpdate=rd._guiUpdate;Uc._storeDirectGUIEdit=rd._storeDirectGUIEdit;Uc.react=rd.react;Uc.extendTraces=rd.extendTraces;Uc.prependTraces=rd.prependTraces;Uc.addTraces=rd.addTraces;Uc.deleteTraces=rd.deleteTraces;Uc.moveTraces=rd.moveTraces;Uc.purge=rd.purge;Uc.addFrames=rd.addFrames;Uc.deleteFrames=rd.deleteFrames;Uc.animate=rd.animate;Uc.setPlotConfig=rd.setPlotConfig;var Odt=DM().getGraphDiv,Ndt=tP().eraseActiveShape;Uc.deleteActiveShape=function(e){return Ndt(Odt(e))};Uc.toImage=nU();Uc.validate=lde();Uc.downloadImage=aU();var gde=mde();Uc.makeTemplate=gde.makeTemplate;Uc.validateTemplate=gde.validateTemplate});var K3=Se((Iar,xde)=>{"use strict";var sU=Zr(),Udt=Ul();xde.exports=function(t,r,n,i){var a=i("x"),o=i("y"),s,u=Udt.getComponentMethod("calendars","handleTraceDefaults");if(u(t,r,["x","y"],n),a){var l=sU.minRowLength(a);o?s=Math.min(l,sU.minRowLength(o)):(s=l,i("y0"),i("dy"))}else{if(!o)return 0;s=sU.minRowLength(o),i("x0"),i("dx")}return r._length=s,s}});var zy=Se((Dar,Tde)=>{"use strict";var bde=Zr().dateTick0,Vdt=ju(),Hdt=Vdt.ONEWEEK;function wde(e,t){return e%Hdt===0?bde(t,1):bde(t,0)}Tde.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",wde(o,r.xcalendar)),i("xperiodalignment"))}if(a.y){var s=i("yperiod");s&&(i("yperiod0",wde(s,r.ycalendar)),i("yperiodalignment"))}}});var Mde=Se((Rar,Sde)=>{"use strict";var Ade=["orientation","groupnorm","stackgaps"];Sde.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=r.xaxis+r.yaxis,u=a[s];u||(u=a[s]={});var l=u[o],f=!1;l?l.traces.push(r):(l=u[o]={traceIndices:[],traces:[r]},f=!0);for(var c={orientation:r.x&&!r.y?"h":"v"},h=0;h<Ade.length;h++){var d=Ade[h],p=d+"Found";if(!l[p]){var x=t[d]!==void 0,b=d==="orientation";if((x||f)&&(l[d]=i(d,c[d]),b&&(l.fillDflt=l[d]==="h"?"tonextx":"tonexty"),x&&(l[p]=!0,!f&&(delete l.traces[0][d],b))))for(var y=0;y<l.traces.length-1;y++){var k=l.traces[y];k._input.fill!==k.fill&&(k.fill=l.fillDflt)}}}return l}}});var $v=Se((Far,Lde)=>{"use strict";var Ede=Pl(),kde=Dp().hasColorscale,Cde=ed(),Gdt=ec();Lde.exports=function(t,r,n,i,a,o){var s=Gdt.isBubble(t),u=(t.line||{}).color,l;if(o=o||{},u&&(n=u),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),kde(t,"marker")&&Cde(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||(u&&!Array.isArray(u)&&r.marker.color!==u?l=u:s?l=Ede.background:l=Ede.defaultLine,a("marker.line.color",l),kde(t,"marker.line")&&Cde(t,r,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",s?1:0)),s&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),o.gradient){var f=a("marker.gradient.type");f!=="none"&&a("marker.gradient.color")}}});var I0=Se((qar,zde)=>{"use strict";var Wdt=Zr().isArrayOrTypedArray,jdt=Dp().hasColorscale,Zdt=ed();zde.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),jdt(t,"line"))Zdt(t,r,i,a,{prefix:"line.",cLetter:"c"});else{var u=(Wdt(s)?!1:s)||n;a("line.color",u)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var J3=Se((Bar,Pde)=>{"use strict";Pde.exports=function(t,r,n){var i=n("line.shape");i==="spline"&&n("line.smoothing")}});var D0=Se((Oar,Ide)=>{"use strict";var Xdt=Zr();Ide.exports=function(e,t,r,n,i){i=i||{},n("textposition"),Xdt.coerceFont(n,"textfont",i.font||r.font,i),i.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var Py=Se((Nar,Rde)=>{"use strict";var GP=Pl(),Dde=Zr().isArrayOrTypedArray;function Ydt(e){for(var t=GP.interpolate(e[0][1],e[1][1],.5),r=2;r<e.length;r++){var n=GP.interpolate(e[r-1][1],e[r][1],.5);t=GP.interpolate(t,n,e[r-1][0]/e[r][0])}return t}Rde.exports=function(t,r,n,i,a){a||(a={});var o=!1;if(r.marker){var s=r.marker.color,u=(r.marker.line||{}).color;s&&!Dde(s)?o=s:u&&!Dde(u)&&(o=u)}var l;if(a.moduleHasFillgradient){var f=i("fillgradient.type");if(f!=="none"){i("fillgradient.start"),i("fillgradient.stop");var c=i("fillgradient.colorscale");c&&(l=Ydt(c))}}i("fillcolor",GP.addOpacity((r.line||{}).color||o||l||n,.5))}});var Ode=Se((Uar,Bde)=>{"use strict";var Fde=Zr(),Kdt=Ul(),Jdt=Zc(),$dt=Sm(),$3=ec(),Qdt=K3(),ept=zy(),tpt=Mde(),rpt=$v(),ipt=I0(),qde=J3(),npt=D0(),apt=Py(),opt=Zr().coercePattern;Bde.exports=function(t,r,n,i){function a(d,p){return Fde.coerce(t,r,Jdt,d,p)}var o=Qdt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){ept(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=tpt(t,r,i,a);i.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var u=!s&&o<$dt.PTS_LINESONLY?"lines+markers":"lines";a("text"),a("hovertext"),a("mode",u),$3.hasMarkers(r)&&rpt(t,r,n,i,a,{gradient:!0}),$3.hasLines(r)&&(ipt(t,r,n,i,a,{backoff:!0}),qde(t,r,a),a("connectgaps"),a("line.simplify")),$3.hasText(r)&&(a("texttemplate"),npt(t,r,i,a));var l=[];($3.hasMarkers(r)||$3.hasText(r))&&(a("cliponaxis"),a("marker.maxdisplayed"),l.push("points")),a("fill",s?s.fillDflt:"none"),r.fill!=="none"&&(apt(t,r,n,a,{moduleHasFillgradient:!0}),$3.hasLines(r)||qde(t,r,a),opt(a,"fillpattern",r.fillcolor,!1));var f=(r.line||{}).color,c=(r.marker||{}).color;(r.fill==="tonext"||r.fill==="toself")&&l.push("fills"),a("hoveron",l.join("+")||"points"),r.hoveron!=="fills"&&a("hovertemplate");var h=Kdt.getComponentMethod("errorbars","supplyDefaults");h(t,r,f||c||n,{axis:"y"}),h(t,r,f||c||n,{axis:"x",inherit:"y"}),Fde.coerceSelectionMarkerOpacity(r,a)}}});var Hb=Se((Var,Nde)=>{"use strict";var spt=Ob().getAxisGroup;Nde.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],u=spt(n,s)+o,l=n._alignmentOpts||{},f=i("alignmentgroup"),c=l[u];c||(c=l[u]={});var h=c[f];h?h.traces.push(r):h=c[f]={traces:[r],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var d=i("offsetgroup")||"",p=h.offsetGroups,x=p[d];r._offsetIndex=0,(a!=="group"||d)&&(x||(x=p[d]={offsetIndex:Object.keys(p).length}),r._offsetIndex=x.offsetIndex)}});var lU=Se((Har,Ude)=>{"use strict";var lpt=Zr(),upt=Hb(),fpt=Zc();Ude.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return lpt.coerce(i._input,i,fpt,h)}if(r.scattermode==="group")for(a=0;a<t.length;a++)i=t[a],i.type==="scatter"&&(n=i._input,upt(n,i,r,s,o));for(a=0;a<t.length;a++){var u=t[a];if(u.type==="scatter"){var l=u.fill;if(!(l==="none"||l==="toself")&&(u.opacity=void 0,l==="tonexty"||l==="tonextx"))for(var f=a-1;f>=0;f--){var c=t[f];if(c.type==="scatter"&&c.xaxis===u.xaxis&&c.yaxis===u.yaxis){c.opacity=void 0;break}}}}}});var Hde=Se((Gar,Vde)=>{"use strict";var cpt=Zr(),hpt=UL();Vde.exports=function(e,t){function r(i,a){return cpt.coerce(e,t,hpt,i,a)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var Iy=Se((War,Wde)=>{"use strict";var dpt=_u(),Gde=Zr(),ppt=Gde.dateTime2ms,WP=Gde.incrementMonth,vpt=ju(),ypt=vpt.ONEAVGMONTH;Wde.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(dpt(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var u=+o.substring(1);if(u>0&&Math.round(u)===u)s=u;else return{vals:i}}for(var l=r.calendar,f=a==="start",c=a==="end",h=t[n+"period0"],d=ppt(h,l)||0,p=[],x=[],b=[],y=i.length,k=0;k<y;k++){var E=i[k],A,L,_;if(s){for(A=Math.round((E-d)/(s*ypt)),_=WP(d,s*A,l);_>E;)_=WP(_,-s,l);for(;_<=E;)_=WP(_,s,l);L=WP(_,-s,l)}else{for(A=Math.round((E-d)/o),_=d+A*o;_>E;)_-=o;for(;_<=E;)_+=o;L=_-o}p[k]=f?L:c?_:(L+_)/2,x[k]=L,b[k]=_}return{vals:p,starts:x,ends:b}}});var R0=Se((jar,Zde)=>{"use strict";var uU=Dp().hasColorscale,fU=Rp(),jde=ec();Zde.exports=function(t,r){jde.hasLines(r)&&uU(r,"line")&&fU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),jde.hasMarkers(r)&&(uU(r,"marker")&&fU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),uU(r,"marker.line")&&fU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var km=Se((Zar,Xde)=>{"use strict";var ch=Zr();Xde.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;ch.mergeArray(r.text,t,"tx"),ch.mergeArray(r.texttemplate,t,"txt"),ch.mergeArray(r.hovertext,t,"htx"),ch.mergeArray(r.customdata,t,"data"),ch.mergeArray(r.textposition,t,"tp"),r.textfont&&(ch.mergeArrayCastPositive(r.textfont.size,t,"ts"),ch.mergeArray(r.textfont.color,t,"tc"),ch.mergeArray(r.textfont.family,t,"tf"),ch.mergeArray(r.textfont.weight,t,"tw"),ch.mergeArray(r.textfont.style,t,"ty"),ch.mergeArray(r.textfont.variant,t,"tv"),ch.mergeArray(r.textfont.textcase,t,"tC"),ch.mergeArray(r.textfont.lineposition,t,"tE"),ch.mergeArray(r.textfont.shadow,t,"tS"));var i=r.marker;if(i){ch.mergeArrayCastPositive(i.size,t,"ms"),ch.mergeArrayCastPositive(i.opacity,t,"mo"),ch.mergeArray(i.symbol,t,"mx"),ch.mergeArray(i.angle,t,"ma"),ch.mergeArray(i.standoff,t,"mf"),ch.mergeArray(i.color,t,"mc");var a=i.line;i.line&&(ch.mergeArray(a.color,t,"mlc"),ch.mergeArrayCastPositive(a.width,t,"mlw"));var o=i.gradient;o&&o.type!=="none"&&(ch.mergeArray(o.type,t,"mgt"),ch.mergeArray(o.color,t,"mgc"))}}});var F0=Se((Xar,Kde)=>{"use strict";var Yde=Zr();Kde.exports=function(t,r){Yde.isArrayOrTypedArray(r.selectedpoints)&&Yde.tagSelected(t,r)}});var q0=Se((Yar,ipe)=>{"use strict";var Jde=_u(),hU=Zr(),G5=hu(),$de=Iy(),cU=ju().BADNUM,dU=ec(),mpt=R0(),gpt=km(),_pt=F0();function xpt(e,t){var r=e._fullLayout,n=t._xA=G5.getFromId(e,t.xaxis||"x","x"),i=t._yA=G5.getFromId(e,t.yaxis||"y","y"),a=n.makeCalcdata(t,"x"),o=i.makeCalcdata(t,"y"),s=$de(t,n,"x",a),u=$de(t,i,"y",o),l=s.vals,f=u.vals,c=t._length,h=new Array(c),d=t.ids,p=pU(t,r,n,i),x=!1,b,y,k,E,A,L;tpe(r,t);var _="x",C="y",M;if(p)hU.pushUnique(p.traceIndices,t.index),b=p.orientation==="v",b?(C="s",M="x"):(_="s",M="y"),A=p.stackgaps==="interpolate";else{var v=epe(t,c);Qde(e,t,n,i,l,f,v)}var z=!!t.xperiodalignment,T=!!t.yperiodalignment;for(y=0;y<c;y++){var F=h[y]={},q=Jde(l[y]),U=Jde(f[y]);q&&U?(F[_]=l[y],F[C]=f[y],z&&(F.orig_x=a[y],F.xEnd=s.ends[y],F.xStart=s.starts[y]),T&&(F.orig_y=o[y],F.yEnd=u.ends[y],F.yStart=u.starts[y])):p&&(b?q:U)?(F[M]=b?l[y]:f[y],F.gap=!0,A?(F.s=cU,x=!0):F.s=0):F[_]=F[C]=cU,d&&(F.id=String(d[y]))}if(gpt(h,t),mpt(e,t),_pt(h,t),p){for(y=0;y<h.length;)h[y][M]===cU?h.splice(y,1):y++;if(hU.sort(h,function(O,W){return O[M]-W[M]||O.i-W.i}),x){for(y=0;y<h.length-1&&h[y].gap;)y++;for(L=h[y].s,L||(L=h[y].s=0),k=0;k<y;k++)h[k].s=L;for(E=h.length-1;E>y&&h[E].gap;)E--;for(L=h[E].s,k=h.length-1;k>E;k--)h[k].s=L;for(;y<E;)if(y++,h[y].gap){for(k=y+1;h[k].gap;)k++;for(var H=h[y-1][M],j=h[y-1].s,G=(h[k].s-j)/(h[k][M]-H);y<k;)h[y].s=j+(h[y][M]-H)*G,y++}}}return h}function Qde(e,t,r,n,i,a,o){var s=t._length,u=e._fullLayout,l=r._id,f=n._id,c=u._firstScatter[rpe(t)]===t.uid,h=(pU(t,u,r,n)||{}).orientation,d=t.fill;r._minDtick=0,n._minDtick=0;var p={padded:!0},x={padded:!0};o&&(p.ppad=x.ppad=o);var b=s<2||i[0]!==i[s-1]||a[0]!==a[s-1];b&&(d==="tozerox"||d==="tonextx"&&(c||h==="h"))?p.tozero=!0:!(t.error_y||{}).visible&&(d==="tonexty"||d==="tozeroy"||!dU.hasMarkers(t)&&!dU.hasText(t))&&(p.padded=!1,p.ppad=0),b&&(d==="tozeroy"||d==="tonexty"&&(c||h==="v"))?x.tozero=!0:(d==="tonextx"||d==="tozerox")&&(x.padded=!1),l&&(t._extremes[l]=G5.findExtremes(r,i,p)),f&&(t._extremes[f]=G5.findExtremes(n,a,x))}function epe(e,t){if(dU.hasMarkers(e)){var r=e.marker,n=1.6*(e.marker.sizeref||1),i;if(e.marker.sizemode==="area"?i=function(l){return Math.max(Math.sqrt((l||0)/n),3)}:i=function(l){return Math.max((l||0)/n,3)},hU.isArrayOrTypedArray(r.size)){var a={type:"linear"};G5.setConvert(a);for(var o=a.makeCalcdata(e.marker,"size"),s=new Array(t),u=0;u<t;u++)s[u]=i(o[u]);return s}else return i(r.size)}}function tpe(e,t){var r=rpe(t),n=e._firstScatter;n[r]||(n[r]=t.uid)}function rpe(e){var t=e.stackgroup;return e.xaxis+e.yaxis+e.type+(t?"-"+t:"")}function pU(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}}ipe.exports={calc:xpt,calcMarkerSize:epe,calcAxisExpansion:Qde,setFirstScatter:tpe,getStackOpts:pU}});var ape=Se((Kar,npe)=>{"use strict";npe.exports=jP;var bpt=Zr().distinctVals;function jP(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 u=o[s],l=u.p;l===void 0&&(l=u[n]),l!==void 0&&i.push(l)}o[0]&&o[0].width1&&(r=Math.min(o[0].width1,r))}this.positions=i;var f=bpt(i);this.distinctPositions=f.vals,f.vals.length===1&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(f.minDiff,r);var c=(t.posAxis||{}).type;(c==="category"||c==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}jP.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};jP.prototype.get=function(t,r,n){var i=this.getLabel(t,r,n);return this.bins[i]||0};jP.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 Gb=Se((Jar,upe)=>{"use strict";var B0=_u(),v_=Zr().isArrayOrTypedArray,Q3=ju().BADNUM,wpt=Ul(),W5=hu(),Tpt=Ob().getAxisGroup,ZP=ape();function Apt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],u=[],l=0;l<a.length;l++){var f=a[l];if(f.visible===!0&&wpt.traceIs(f,"bar")&&f.xaxis===r._id&&f.yaxis===n._id&&(f.orientation==="h"?s.push(o[l]):u.push(o[l]),f._computePh))for(var c=e.calcdata[l],h=0;h<c.length;h++)typeof c[h].ph0=="function"&&(c[h].ph0=c[h].ph0()),typeof c[h].ph1=="function"&&(c[h].ph1=c[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,u,d),yU(e,n,r,s,d)}function yU(e,t,r,n,i){if(n.length){var a,o,s,u,l;switch(Ept(r,n),i.mode){case"overlay":vU(e,t,r,n,i);break;case"group":for(a=[],o=[],s=0;s<n.length;s++)u=n[s],l=u[0].trace,l.offset===void 0?o.push(u):a.push(u);o.length&&kpt(e,t,r,o,i),a.length&&vU(e,t,r,a,i);break;case"stack":case"relative":for(a=[],o=[],s=0;s<n.length;s++)u=n[s],l=u[0].trace,l.base===void 0?o.push(u):a.push(u);Mpt(o),o.length&&Cpt(e,t,r,o,i),a.length&&vU(e,t,r,a,i);break}Spt(n),Rpt(n,t)}}function Spt(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 Mpt(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 Ept(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,u=a.orientation==="h"?a.xcalendar:a.ycalendar,l=e.type==="category"||e.type==="multicategory"?function(){return null}:e.d2c;if(v_(o)){for(n=0;n<Math.min(o.length,i.length);n++)s=l(o[n],0,u),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=l(o,0,u);var f=B0(s);for(s=f?s:0,n=0;n<i.length;n++)i[n].b=s,f&&(i[n].hasB=1)}}}function vU(e,t,r,n,i){for(var a=0;a<n.length;a++){var o=n[a],s=new ZP([o],{posAxis:t,sepNegVal:!1,overlapNoMerge:!i.norm});mU(e,t,s,i),i.norm?(lpe(s),gU(r,s,i)):spe(r,s)}}function kpt(e,t,r,n,i){var a=new ZP(n,{posAxis:t,sepNegVal:!1,overlapNoMerge:!i.norm});mU(e,t,a,i),Ipt(a,t),i.norm?(lpe(a),gU(r,a,i)):spe(r,a)}function Cpt(e,t,r,n,i){var a=new ZP(n,{posAxis:t,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});mU(e,t,a,i),Ppt(r,a,i);for(var o=0;o<n.length;o++)for(var s=n[o],u=s[0].t.offsetindex,l=0;l<s.length;l++){var f=s[l];if(f.s!==Q3){var c=f.b+f.s===a.get(f.p,u,f.s);c&&(f._outmost=!0)}}i.norm&&gU(r,a,i)}function mU(e,t,r,n){var i=e._fullLayout,a=r.positions,o=r.distinctPositions,s=r.minDiff,u=r.traces,l=u.length,f=a.length!==o.length,c=s*(1-n.gap),h,d,p,x;if(t._id==="angularaxis")h=c,d=h*(1-(n.groupgap||0)),p=-d/2;else{var b=Tpt(i,t._id)+u[0][0].trace.orientation;x=i._alignmentOpts[b]||{}}for(var y=0;y<l;y++){var k=u[y],E=k[0].trace;if(t._id!=="angularaxis"){var A=x[E.alignmentgroup]||{},L=Object.keys(A.offsetGroups||{}).length;L?h=c/L:h=f?c/l:c,d=h*(1-(n.groupgap||0)),L?p=((2*E._offsetIndex+1-L)*h-d)/2:p=f?((2*y+1-l)*h-d)/2:-d/2}var _=k[0].t;_.barwidth=d,_.offsetindex=E._offsetIndex||0,_.poffset=p,_.bargroupwidth=c,_.bardelta=s}r.binWidth=u[0][0].t.barwidth/100,Lpt(r),zpt(t,r),t._id==="angularaxis"?ope(t,r):ope(t,r,f)}function Lpt(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,u=o._offset||o.offset,l=s.poffset,f;if(v_(u)){for(f=Array.prototype.slice.call(u,0,i.length),n=0;n<f.length;n++)B0(f[n])||(f[n]=l);for(n=f.length;n<i.length;n++)f.push(l);s.poffset=f}else u!==void 0&&(s.poffset=u);var c=o._width||o.width,h=s.barwidth;if(v_(c)){var d=Array.prototype.slice.call(c,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,u===void 0){for(f=[],n=0;n<i.length;n++)f.push(l+(h-d[n])/2);s.poffset=f}}else c!==void 0&&(s.barwidth=c,u===void 0&&(s.poffset=l+(h-c)/2))}}function zpt(e,t){for(var r=t.traces,n=eT(e),i=0;i<r.length;i++)for(var a=r[i],o=a[0].t,s=o.poffset,u=v_(s),l=o.barwidth,f=v_(l),c=0;c<a.length;c++){var h=a[c],d=h.w=f?l[c]:l;h.p===void 0&&(h.p=h[n],h["orig_"+n]=h[n]);var p=(u?s[c]:s)+d/2;h[n]=h.p+p}}function ope(e,t,r){var n=t.traces,i=t.minDiff,a=i/2;W5.minDtick(e,t.minDiff,t.distinctPositions[0],r);for(var o=0;o<n.length;o++){var s=n[o],u=s[0],l=u.trace,f=[],c,h,d,p;for(p=0;p<s.length;p++)c=s[p],h=c.p-a,d=c.p+a,f.push(h,d);if(l.width||l.offset){var x=u.t,b=x.poffset,y=x.barwidth,k=v_(b),E=v_(y);for(p=0;p<s.length;p++){c=s[p];var A=k?b[p]:b,L=E?y[p]:y;h=c.p+A,d=h+L,f.push(h,d)}}l._extremes[e._id]=W5.findExtremes(e,f,{padded:!1})}}function spe(e,t){for(var r=t.traces,n=eT(e),i=0;i<r.length;i++){for(var a=r[i],o=a[0].trace,s=o.type==="scatter",u=o.orientation==="v",l=[],f=!1,c=0;c<a.length;c++){var h=a[c],d=s?0:h.b,p=s?u?h.y:h.x:d+h.s;h[n]=p,l.push(p),h.hasB&&l.push(d),(!h.hasB||!h.b)&&(f=!0)}o._extremes[e._id]=W5.findExtremes(e,l,{tozero:f,padded:!0})}}function Ppt(e,t,r){var n=eT(e),i=t.traces,a,o,s,u,l,f,c;for(u=0;u<i.length;u++)if(a=i[u],o=a[0].trace,o.type==="funnel")for(c=a[0].t.offsetindex,l=0;l<a.length;l++)f=a[l],f.s!==Q3&&t.put(f.p,c,-.5*f.s);for(u=0;u<i.length;u++){a=i[u],o=a[0].trace,s=o.type==="funnel",c=o.type==="barpolar"?0:a[0].t.offsetindex;var h=[];for(l=0;l<a.length;l++)if(f=a[l],f.s!==Q3){var d;s?d=f.s:d=f.s+f.b;var p=t.put(f.p,c,d),x=p+d;f.b=p,f[n]=x,r.norm||(h.push(x),f.hasB&&h.push(p))}r.norm||(o._extremes[e._id]=W5.findExtremes(e,h,{tozero:!0,padded:!0}))}}function lpe(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!==Q3&&e.put(o.p,i,o.b+o.s)}}function Ipt(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 ZP([i],{posAxis:t,sepNegVal:!0,overlapNoMerge:!0}),u=0;u<i.length;u++){var l=i[u];if(l.p!==Q3){var f=s.put(l.p,o,l.b+l.s);f&&(l.b=f)}}}}function gU(e,t,r){var n=t.traces,i=eT(e),a=r.norm==="fraction"?1:100,o=a/1e9,s=e.l2c(e.c2l(0)),u=r.mode==="stack"?a:s;function l(_){return B0(e.c2l(_))&&(_<s-o||_>u+o||!B0(s))}for(var f=0;f<n.length;f++){for(var c=n[f],h=c[0].t.offsetindex,d=c[0].trace,p=[],x=!1,b=!1,y=0;y<c.length;y++){var k=c[y];if(k.s!==Q3){var E=Math.abs(a/t.get(k.p,h,k.s));k.b*=E,k.s*=E;var A=k.b,L=A+k.s;k[i]=L,p.push(L),b=b||l(L),k.hasB&&(p.push(A),b=b||l(A)),(!k.hasB||!k.b)&&(x=!0)}}d._extremes[e._id]=W5.findExtremes(e,p,{tozero:x,padded:b})}}function Dpt(e,t,r,n){for(var i=eT(n),a=0;a<e.length;a++)for(var o=e[a],s=0;s<o.length;s++){var u=o[s],l=u[i];u._sMin=t[l],u._sMax=r[l]}}function Rpt(e,t){var r=eT(t),n={},i,a,o,s=1/0,u=-1/0;for(i=0;i<e.length;i++)for(o=e[i],a=0;a<o.length;a++){var l=o[a].p;B0(l)&&(s=Math.min(s,l),u=Math.max(u,l))}var f=1e4/(u-s),c=n.round=function(M){return String(Math.round(f*(M-s)))},h={},d={},p=e.some(function(M){var v=M[0].trace;return"marker"in v&&v.marker.cornerradius});for(i=0;i<e.length;i++){o=e[i],o[0].t.extents=n;var x=o[0].t.poffset,b=v_(x);for(a=0;a<o.length;a++){var y=o[a],k=y[r]-y.w/2;if(B0(k)){var E=y[r]+y.w/2,A=c(y.p);n[A]?n[A]=[Math.min(k,n[A][0]),Math.max(E,n[A][1])]:n[A]=[k,E]}if(y.p0=y.p+(b?x[a]:x),y.p1=y.p0+y.w,y.s0=y.b,y.s1=y.s0+y.s,p){var L=Math.min(y.s0,y.s1)||0,_=Math.max(y.s0,y.s1)||0,C=y[r];h[C]=C in h?Math.min(h[C],L):L,d[C]=C in d?Math.max(d[C],_):_}}}p&&Dpt(e,h,d,t)}function eT(e){return e._id.charAt(0)}upe.exports={crossTraceCalc:Apt,setGroupPositions:yU}});var dpe=Se(($ar,hpe)=>{"use strict";var fpe=q0(),cpe=Gb().setGroupPositions;function Fpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],u=[],l=0;l<a.length;l++){var f=a[l];f.visible===!0&&f.type==="scatter"&&f.xaxis===r._id&&f.yaxis===n._id&&(f.orientation==="h"?s.push(o[l]):f.orientation==="v"&&u.push(o[l]))}var c={mode:i.scattermode,gap:i.scattergap};cpe(e,r,n,u,c),cpe(e,n,r,s,c)}hpe.exports=function(t,r){t._fullLayout.scattermode==="group"&&Fpt(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,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_;for(var C in o){y=o[C];var M=y.traceIndices;if(M.length){for(k=y.stackgaps==="interpolate",E=y.groupnorm,y.orientation==="v"?(A="x",L="y"):(A="y",L="x"),_=new Array(M.length),u=0;u<_.length;u++)_[u]=!1;d=s[M[0]];var v=new Array(d.length);for(u=0;u<d.length;u++)v[u]=d[u][A];for(u=1;u<M.length;u++){for(h=s[M[u]],l=f=0;l<h.length;l++){for(p=h[l][A];p>v[f]&&f<v.length;f++)_U(h,l,v[f],u,_,k,A),l++;if(p!==v[f]){for(c=0;c<u;c++)_U(s[M[c]],f,p,c,_,k,A);v.splice(f,0,p)}f++}for(;f<v.length;f++)_U(h,l,v[f],u,_,k,A),l++}var z=v.length;for(l=0;l<d.length;l++){for(x=d[l][L]=d[l].s,u=1;u<M.length;u++)h=s[M[u]],h[0].trace._rawLength=h[0].trace._length,h[0].trace._length=z,x+=h[l].s,h[l][L]=x;if(E)for(b=(E==="fraction"?x:x/100)||1,u=0;u<M.length;u++){var T=s[M[u]][l];T[L]/=b,T.sNorm=T.s/b}}for(u=0;u<M.length;u++){h=s[M[u]];var F=h[0].trace,q=fpe.calcMarkerSize(F,F._rawLength),U=Array.isArray(q);if(q&&_[u]||U){var H=q;for(q=new Array(z),l=0;l<z;l++)q[l]=h[l].gap?0:U?H[h[l].i]:H}var j=new Array(z),G=new Array(z);for(l=0;l<z;l++)j[l]=h[l].x,G[l]=h[l].y;fpe.calcAxisExpansion(t,F,n,i,j,G,q),h[0].t.orientation=y.orientation}}}}};function _U(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 u=e[t-1];s.s=u.s,s.i=u.i,s.gap=u.gap}else a&&(s.s=qpt(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 qpt(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 bU=Se((Qar,_pe)=>{"use strict";var Bpt=yu(),mpe=ju(),j5=mpe.BADNUM,gpe=mpe.LOG_CLIP,ppe=gpe+.5,vpe=gpe-.5,XP=Zr(),Opt=XP.segmentsIntersect,ype=XP.constrain,xU=Sm();_pe.exports=function(t,r){var n=r.trace||{},i=r.xaxis,a=r.yaxis,o=i.type==="log",s=a.type==="log",u=i._length,l=a._length,f=r.backoff,c=n.marker,h=r.connectGaps,d=r.baseTolerance,p=r.shape,x=p==="linear",b=n.fill&&n.fill!=="none",y=[],k=xU.minTolerance,E=t.length,A=new Array(E),L=0,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne;function be(De){var _e=t[De];if(!_e)return!1;var Fe=r.linearized?i.l2p(_e.x):i.c2p(_e.x),Pe=r.linearized?a.l2p(_e.y):a.c2p(_e.y);if(Fe===j5){if(o&&(Fe=i.c2p(_e.x,!0)),Fe===j5)return!1;s&&Pe===j5&&(Fe*=Math.abs(i._m*l*(i._m>0?ppe:vpe)/(a._m*u*(a._m>0?ppe:vpe)))),Fe*=1e3}if(Pe===j5){if(s&&(Pe=a.c2p(_e.y,!0)),Pe===j5)return!1;Pe*=1e3}return[Fe,Pe]}function ze(De,_e,Fe,Pe){var Ie=Fe-De,lt=Pe-_e,ye=.5-De,ue=.5-_e,de=Ie*Ie+lt*lt,ht=Ie*ye+lt*ue;if(ht>0&&ht<de){var Et=ye*lt-ue*Ie;if(Et*Et<de)return!0}}var Ce,he;function te(De,_e){var Fe=De[0]/u,Pe=De[1]/l,Ie=Math.max(0,-Fe,Fe-1,-Pe,Pe-1);return Ie&&Ce!==void 0&&ze(Fe,Pe,Ce,he)&&(Ie=0),Ie&&_e&&ze(Fe,Pe,_e[0]/u,_e[1]/l)&&(Ie=0),(1+xU.toleranceGrowth*Ie)*d}function ke(De,_e){var Fe=De[0]-_e[0],Pe=De[1]-_e[1];return Math.sqrt(Fe*Fe+Pe*Pe)}var Ee=xU.maxScreensAway,Me=-u*Ee,Oe=u*(1+Ee),Re=-l*Ee,me=l*(1+Ee),Be=[[Me,Re,Oe,Re],[Oe,Re,Oe,me],[Oe,me,Me,me],[Me,me,Me,Re]],fe,Ze,et,gt,Pt,Qe;function Xe(De,_e){for(var Fe=[],Pe=0,Ie=0;Ie<4;Ie++){var lt=Be[Ie],ye=Opt(De[0],De[1],_e[0],_e[1],lt[0],lt[1],lt[2],lt[3]);ye&&(!Pe||Math.abs(ye.x-Fe[0][0])>1||Math.abs(ye.y-Fe[0][1])>1)&&(ye=[ye.x,ye.y],Pe&&ke(ye,De)<ke(Fe[0],De)?Fe.unshift(ye):Fe.push(ye),Pe++)}return Fe}function Tt(De){if(De[0]<Me||De[0]>Oe||De[1]<Re||De[1]>me)return[ype(De[0],Me,Oe),ype(De[1],Re,me)]}function xt(De,_e){if(De[0]===_e[0]&&(De[0]===Me||De[0]===Oe)||De[1]===_e[1]&&(De[1]===Re||De[1]===me))return!0}function _t(De,_e){var Fe=[],Pe=Tt(De),Ie=Tt(_e);return Pe&&Ie&&xt(Pe,Ie)||(Pe&&Fe.push(Pe),Ie&&Fe.push(Ie)),Fe}function Ct(De,_e,Fe){return function(Pe,Ie){var lt=Tt(Pe),ye=Tt(Ie),ue=[];if(lt&&ye&&xt(lt,ye))return ue;lt&&ue.push(lt),ye&&ue.push(ye);var de=2*XP.constrain((Pe[De]+Ie[De])/2,_e,Fe)-((lt||Pe)[De]+(ye||Ie)[De]);if(de){var ht;lt&&ye?ht=de>0==lt[De]>ye[De]?lt:ye:ht=lt||ye,ht[De]+=de}return ue}}var jt;p==="linear"||p==="spline"?jt=Xe:p==="hv"||p==="vh"?jt=_t:p==="hvh"?jt=Ct(0,Me,Oe):p==="vhv"&&(jt=Ct(1,Re,me));function At(De,_e){var Fe=_e[0]-De[0],Pe=(_e[1]-De[1])/Fe,Ie=(De[1]*_e[0]-_e[1]*De[0])/Fe;return Ie>0?[Pe>0?Me:Oe,me]:[Pe>0?Oe:Me,Re]}function Te(De){var _e=De[0],Fe=De[1],Pe=_e===A[L-1][0],Ie=Fe===A[L-1][1];if(!(Pe&&Ie))if(L>1){var lt=_e===A[L-2][0],ye=Fe===A[L-2][1];Pe&&(_e===Me||_e===Oe)&&lt?ye?L--:A[L-1]=De:Ie&&(Fe===Re||Fe===me)&&ye?lt?L--:A[L-1]=De:A[L++]=De}else A[L++]=De}function nt(De){A[L-1][0]!==De[0]&&A[L-1][1]!==De[1]&&Te([et,gt]),Te(De),Pt=null,et=gt=0}var ut=XP.isArrayOrTypedArray(c);function ct(De){if(De&&f&&(De.i=_,De.d=t,De.trace=n,De.marker=ut?c[De.i]:c,De.backoff=f),Ce=De[0]/u,he=De[1]/l,fe=De[0]<Me?Me:De[0]>Oe?Oe:0,Ze=De[1]<Re?Re:De[1]>me?me:0,fe||Ze){if(!L)A[L++]=[fe||De[0],Ze||De[1]];else if(Pt){var _e=jt(Pt,De);_e.length>1&&(nt(_e[0]),A[L++]=_e[1])}else Qe=jt(A[L-1],De)[0],A[L++]=Qe;var Fe=A[L-1];fe&&Ze&&(Fe[0]!==fe||Fe[1]!==Ze)?(Pt&&(et!==fe&&gt!==Ze?Te(et&&gt?At(Pt,De):[et||fe,gt||Ze]):et&&gt&&Te([et,gt])),Te([fe,Ze])):et-fe&&gt-Ze&&Te([fe||et,Ze||gt]),Pt=De,et=fe,gt=Ze}else Pt&&nt(jt(Pt,De)[0]),A[L++]=De}for(_=0;_<E;_++)if(C=be(_),!!C){for(L=0,Pt=null,ct(C),_++;_<E;_++){if(v=be(_),!v){if(h)continue;break}if(!x||!r.simplify){ct(v);continue}var rt=be(_+1);if(H=ke(v,C),!(!(b&&(L===0||L===E-1))&&H<te(v,rt)*k)){for(q=[(v[0]-C[0])/H,(v[1]-C[1])/H],z=C,j=H,G=W=re=0,F=!1,M=v,_++;_<t.length;_++){if(T=rt,rt=be(_+1),!T){if(h)continue;break}if(U=[T[0]-C[0],T[1]-C[1]],ne=U[0]*q[1]-U[1]*q[0],W=Math.min(W,ne),re=Math.max(re,ne),re-W>te(T,rt))break;M=T,O=U[0]*q[0]+U[1]*q[1],O>j?(j=O,v=T,F=!1):O<G&&(G=O,z=T,F=!0)}if(F?(ct(v),M!==z&&ct(z)):(z!==C&&ct(z),M!==v&&ct(v)),ct(M),_>=t.length||!T)break;ct(T),C=T}}Pt&&Te([et||Pt[0],gt||Pt[1]]),y.push(A.slice(0,L))}var je=p.slice(p.length-1);if(f&&je!=="h"&&je!=="v"){for(var tt=!1,Je=-1,Mt=[],Vt=0;Vt<y.length;Vt++)for(var Kt=0;Kt<y[Vt].length-1;Kt++){var ir=y[Vt][Kt],fr=y[Vt][Kt+1],Ot=Bpt.applyBackoff(fr,ir);(Ot[0]!==fr[0]||Ot[1]!==fr[1])&&(tt=!0),Mt[Je+1]||(Je++,Mt[Je]=[ir,[Ot[0],Ot[1]]])}return tt?Mt:y}return y}});var wU=Se((eor,bpe)=>{"use strict";var xpe={tonextx:1,tonexty:1,tonext:1};bpe.exports=function(t,r,n){var i,a,o,s,u,l={},f=!1,c=-1,h=0,d=-1;for(a=0;a<n.length;a++)i=n[a][0].trace,o=i.stackgroup||"",o?o in l?u=l[o]:(u=l[o]=h,h++):i.fill in xpe&&d>=0?u=d:(u=d=h,h++),u<c&&(f=!0),i._groupIndex=c=u;var p=n.slice();f&&p.sort(function(b,y){var k=b[0].trace,E=y[0].trace;return k._groupIndex-E._groupIndex||k.index-E.index});var x={};for(a=0;a<p.length;a++)i=p[a][0].trace,o=i.stackgroup||"",i.visible===!0?(i._nexttrace=null,i.fill in xpe&&(s=x[o],i._prevtrace=s||null,s&&(s._nexttrace=i)),i._ownfill=i.fill&&(i.fill.substr(0,6)==="tozero"||i.fill==="toself"||i.fill.substr(0,2)==="to"&&!i._prevtrace),x[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return p}});var iT=Se((tor,Ape)=>{"use strict";var Dy=Nl(),Npt=Ul(),Z5=Zr(),tT=Z5.ensureSingle,Tpe=Z5.identity,hh=yu(),rT=ec(),Upt=bU(),Vpt=wU(),YP=w5().tester;Ape.exports=function(t,r,n,i,a,o){var s,u,l=!a,f=!!a&&a.duration>0,c=Vpt(t,r,n);if(s=i.selectAll("g.trace").data(c,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(),Hpt(t,s,r),f){o&&(u=o());var h=Dy.transition().duration(a.duration).ease(a.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});h.each(function(){i.selectAll("g.trace").each(function(d,p){wpe(t,p,r,d,c,this,a)})})}else s.each(function(d,p){wpe(t,p,r,d,c,this,a)});l&&s.exit().remove(),i.selectAll("path:not([d])").remove()};function Hpt(e,t,r){t.each(function(n){var i=tT(Dy.select(this),"g","fills");hh.setClipUrl(i,r.layerClipId,e);var a=n[0].trace,o=[];a._ownfill&&o.push("_ownFill"),a._nexttrace&&o.push("_nextFill");var s=i.selectAll("g").data(o,Tpe);s.enter().append("g"),s.exit().each(function(u){a[u]=null}).remove(),s.order().each(function(u){a[u]=tT(Dy.select(this),"path","js-fill")})})}function wpe(e,t,r,n,i,a,o){var s=e._context.staticPlot,u;Gpt(e,t,r,n,i);var l=!!o&&o.duration>0;function f(Ct){return l?Ct.transition():Ct}var c=r.xaxis,h=r.yaxis,d=n[0].trace,p=d.line,x=Dy.select(a),b=tT(x,"g","errorbars"),y=tT(x,"g","lines"),k=tT(x,"g","points"),E=tT(x,"g","text");if(Npt.getComponentMethod("errorbars","plot")(e,b,r,o),d.visible!==!0)return;f(x).style("opacity",d.opacity);var A,L,_=d.fill.charAt(d.fill.length-1);_!=="x"&&_!=="y"&&(_="");var C,M;_==="y"?(C=1,M=h.c2p(0,!0)):_==="x"&&(C=0,M=c.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=x;var v="",z=[],T=d._prevtrace,F=null,q=null;T&&(v=T._prevRevpath||"",L=T._nextFill,z=T._ownPolygons,F=T._fillsegments,q=T._fillElement);var U,H,j="",G="",O,W,re,ne,be,ze,Ce=[];d._polygons=[];var he=[],te=[],ke=Z5.noop;if(A=d._ownFill,rT.hasLines(d)||d.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(O=hh.steps(p.shape),W=hh.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?O=W=function(Ct){var jt=Ct[Ct.length-1];return Ct.length>1&&Ct[0][0]===jt[0]&&Ct[0][1]===jt[1]?hh.smoothclosed(Ct.slice(1),p.smoothing):hh.smoothopen(Ct,p.smoothing)}:O=W=function(Ct){return"M"+Ct.join("L")},re=function(Ct){return W(Ct.reverse())},te=Upt(n,{xaxis:c,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:d.fill}),he=new Array(te.length);var Ee=0;for(u=0;u<te.length;u++){var Me,Oe=te[u];!Me||!_?(Me=Oe.slice(),he[Ee]=Me,Ee++):Me.push.apply(Me,Oe)}d._fillElement=null,d._fillExclusionElement=q,d._fillsegments=he.slice(0,Ee),he=d._fillsegments,te.length&&(ne=te[0][0].slice(),be=te[te.length-1],ze=be[be.length-1].slice()),ke=function(Ct){return function(jt){if(U=O(jt),H=re(jt),j?_?(j+="L"+U.substr(1),G=H+("L"+G.substr(1))):(j+="Z"+U,G=H+"Z"+G):(j=U,G=H),rT.hasLines(d)){var At=Dy.select(this);if(At.datum(n),Ct)f(At.style("opacity",0).attr("d",U).call(hh.lineGroupStyle)).style("opacity",1);else{var Te=f(At);Te.attr("d",U),hh.singleLineStyle(n,Te)}}}}}var Re=y.selectAll(".js-line").data(te);f(Re.exit()).style("opacity",0).remove(),Re.each(ke(!1)),Re.enter().append("path").classed("js-line",!0).style("vector-effect",s?"none":"non-scaling-stroke").call(hh.lineGroupStyle).each(ke(!0)),hh.setClipUrl(Re,r.layerClipId,e);function me(Ct){f(Ct).attr("d","M0,0Z")}var Be=function(){var Ct=new Array(he.length);for(u=0;u<he.length;u++)Ct[u]=YP(he[u]);return Ct},fe=function(Ct){var jt,At;if(!Ct||Ct.length===0)for(jt=new Array(he.length),At=0;At<he.length;At++){var Te=he[At][0].slice(),nt=he[At][he[At].length-1].slice();Te[C]=nt[C]=M;var ut=[nt,Te],ct=ut.concat(he[At]);jt[At]=YP(ct)}else{for(jt=new Array(Ct.length-1+he.length),At=0;At<Ct.length-1;At++)jt[At]=YP(Ct[At]);var rt=Ct[Ct.length-1].slice();for(rt.reverse(),At=0;At<he.length;At++)jt[Ct.length-1+At]=YP(he[At].concat(rt))}return jt};te.length?(A?(A.datum(n),ne&&ze&&(_?(ne[C]=ze[C]=M,f(A).attr("d","M"+ze+"L"+ne+"L"+j.substr(1)).call(hh.singleFillStyle,e),Ce=fe(null)):(f(A).attr("d",j+"Z").call(hh.singleFillStyle,e),Ce=Be())),d._polygons=Ce,d._fillElement=A):L&&(d.fill.substr(0,6)==="tonext"&&j&&v?(d.fill==="tonext"?(f(L).attr("d",j+"Z"+v+"Z").call(hh.singleFillStyle,e),Ce=Be(),d._polygons=Ce.concat(z)):(f(L).attr("d",j+"L"+v.substr(1)+"Z").call(hh.singleFillStyle,e),Ce=fe(F),d._polygons=Ce),d._fillElement=L):me(L)),d._prevRevpath=G):(A?me(A):L&&me(L),d._prevRevpath=null),d._ownPolygons=Ce;function Ze(Ct){return Ct.filter(function(jt){return!jt.gap&&jt.vis})}function et(Ct){return Ct.filter(function(jt){return jt.vis})}function gt(Ct){return Ct.filter(function(jt){return!jt.gap})}function Pt(Ct){return Ct.id}function Qe(Ct){if(Ct.ids)return Pt}function Xe(){return!1}function Tt(Ct,jt,At){var Te,nt,ut,ct=At[0].trace,rt=rT.hasMarkers(ct),je=rT.hasText(ct),tt=Qe(ct),Je=Xe,Mt=Xe;if(rt||je){var Vt=Tpe,Kt=ct.stackgroup,ir=Kt&&e._fullLayout._scatterStackOpts[c._id+h._id][Kt].stackgaps==="infer zero";ct.marker.maxdisplayed||ct._needsCull?Vt=ir?et:Ze:Kt&&!ir&&(Vt=gt),rt&&(Je=Vt),je&&(Mt=Vt)}nt=Ct.selectAll("path.point"),Te=nt.data(Je,tt);var fr=Te.enter().append("path").classed("point",!0);l&&fr.call(hh.pointStyle,ct,e).call(hh.translatePoints,c,h).style("opacity",0).transition().style("opacity",1),Te.order();var Ot;rt&&(Ot=hh.makePointStyleFns(ct)),Te.each(function(De){var _e=Dy.select(this),Fe=f(_e);ut=hh.translatePoint(De,Fe,c,h),ut?(hh.singlePointStyle(De,Fe,ct,Ot,e),r.layerClipId&&hh.hideOutsideRangePoint(De,Fe,c,h,ct.xcalendar,ct.ycalendar),ct.customdata&&_e.classed("plotly-customdata",De.data!==null&&De.data!==void 0)):Fe.remove()}),l?Te.exit().transition().style("opacity",0).remove():Te.exit().remove(),nt=jt.selectAll("g"),Te=nt.data(Mt,tt),Te.enter().append("g").classed("textpoint",!0).append("text"),Te.order(),Te.each(function(De){var _e=Dy.select(this),Fe=f(_e.select("text"));ut=hh.translatePoint(De,Fe,c,h),ut?r.layerClipId&&hh.hideOutsideRangePoint(De,_e,c,h,ct.xcalendar,ct.ycalendar):_e.remove()}),Te.selectAll("text").call(hh.textPointStyle,ct,e).each(function(De){var _e=c.c2p(De.x),Fe=h.c2p(De.y);Dy.select(this).selectAll("tspan.line").each(function(){f(Dy.select(this)).attr({x:_e,y:Fe})})}),Te.exit().remove()}k.datum(n),E.datum(n),Tt(k,E,n);var xt=d.cliponaxis===!1,_t=xt?null:r.layerClipId;hh.setClipUrl(k,_t,e),hh.setClipUrl(E,_t,e)}function Gpt(e,t,r,n,i){var a=r.xaxis,o=r.yaxis,s=Dy.extent(Z5.simpleMap(a.range,a.r2c)),u=Dy.extent(Z5.simpleMap(o.range,o.r2c)),l=n[0].trace;if(rT.hasMarkers(l)){var f=l.marker.maxdisplayed;if(f!==0){var c=n.filter(function(x){return x.x>=s[0]&&x.x<=s[1]&&x.y>=u[0]&&x.y<=u[1]}),h=Math.ceil(c.length/f),d=0;i.forEach(function(x,b){var y=x[0].trace;rT.hasMarkers(y)&&y.marker.maxdisplayed>0&&b<t&&d++});var p=Math.round(d*h/3+Math.floor(d/3)*h/7.1);n.forEach(function(x){delete x.vis}),c.forEach(function(x,b){Math.round((b+p)%h)===0&&(x.vis=!0)})}}}});var ep=Se((ror,Spe)=>{"use strict";Spe.exports={container:"marker",min:"cmin",max:"cmax"}});var JP=Se((ior,Mpe)=>{"use strict";var KP=hu();Mpe.exports=function(t,r,n){var i={},a={_fullLayout:n},o=KP.getFromTrace(a,r,"x"),s=KP.getFromTrace(a,r,"y"),u=t.orig_x;u===void 0&&(u=t.x);var l=t.orig_y;return l===void 0&&(l=t.y),i.xLabel=KP.tickText(o,o.c2l(u),!0).text,i.yLabel=KP.tickText(s,s.c2l(l),!0).text,i}});var ov=Se((nor,Epe)=>{"use strict";var TU=Nl(),nT=yu(),Wpt=Ul();function jpt(e){var t=TU.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=TU.select(this),i=r.trace||r[0].trace;AU(n,i,e)}),t.selectAll("g.text").each(function(r){var n=TU.select(this),i=r.trace||r[0].trace;SU(n,i,e)}),t.selectAll("g.trace path.js-line").call(nT.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(nT.fillGroupStyle,e,!1),Wpt.getComponentMethod("errorbars","style")(t)}function AU(e,t,r){nT.pointStyle(e.selectAll("path.point"),t,r)}function SU(e,t,r){nT.textPointStyle(e.selectAll("text"),t,r)}function Zpt(e,t,r){var n=t[0].trace;n.selectedpoints?(nT.selectedPointStyle(r.selectAll("path.point"),n),nT.selectedTextStyle(r.selectAll("text"),n)):(AU(r,n,e),SU(r,n,e))}Epe.exports={style:jpt,stylePoints:AU,styleText:SU,styleOnSelect:Zpt}});var oT=Se((aor,kpe)=>{"use strict";var aT=Pl(),Xpt=ec();kpe.exports=function(t,r){var n,i;if(t.mode==="lines")return n=t.line.color,n&&aT.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&&aT.opacity(a)?a:o&&aT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",i?aT.opacity(i)<.3?aT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&aT.opacity(n)&&Xpt.hasLines(t)&&t.line.width?n:t.fillcolor)}});var sT=Se((oor,Lpe)=>{"use strict";var $P=Zr(),Cpe=jc(),Ypt=Ul(),Kpt=oT(),MU=Pl(),Jpt=$P.fillText;Lpe.exports=function(t,r,n,i){var a=t.cd,o=a[0].trace,s=t.xa,u=t.ya,l=s.c2p(r),f=u.c2p(n),c=[l,f],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,x=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var b=function(G){if(p){var O=s.c2p(G.xStart),W=s.c2p(G.xEnd);return l>=Math.min(O,W)&&l<=Math.max(O,W)?0:1/0}var re=Math.max(3,G.mrc||0),ne=1-1/re,be=Math.abs(s.c2p(G.x)-l);return be<re?ne*be/re:be-re+ne},y=function(G){if(x){var O=u.c2p(G.yStart),W=u.c2p(G.yEnd);return f>=Math.min(O,W)&&f<=Math.max(O,W)?0:1/0}var re=Math.max(3,G.mrc||0),ne=1-1/re,be=Math.abs(u.c2p(G.y)-f);return be<re?ne*be/re:be-re+ne},k=function(G){var O=Math.max(d,G.mrc||0),W=s.c2p(G.x)-l,re=u.c2p(G.y)-f;return Math.max(Math.sqrt(W*W+re*re)-O,1-d/O)},E=Cpe.getDistanceFunction(i,b,y,k);if(Cpe.getClosest(a,E,t),t.index!==!1){var A=a[t.index],L=s.c2p(A.x,!0),_=u.c2p(A.y,!0),C=A.mrc||1;t.index=A.i;var M=a[0].t.orientation,v=M&&(A.sNorm||A.s),z=M==="h"?v:A.orig_x!==void 0?A.orig_x:A.x,T=M==="v"?v:A.orig_y!==void 0?A.orig_y:A.y;return $P.extendFlat(t,{color:Kpt(o,A),x0:L-C,x1:L+C,xLabelVal:z,y0:_-C,y1:_+C,yLabelVal:T,spikeDistance:k(A),hovertemplate:o.hovertemplate}),Jpt(A,o,t),Ypt.getComponentMethod("errorbars","hoverInfo")(A,o,t),[t]}}function F(G){if(!G)return!1;var O=G.node();try{var W=new DOMPoint(c[0],c[1]);return O.isPointInFill(W)}catch(ne){var re=O.ownerSVGElement.createSVGPoint();return re.x=c[0],re.y=c[1],O.isPointInFill(re)}}function q(G){var O,W=[],re=1/0,ne=-1/0,be=1/0,ze=-1/0,Ce;for(O=0;O<G.length;O++){var he=G[O];he.contains(c)&&(W.push(he),be=Math.min(be,he.ymin),ze=Math.max(ze,he.ymax))}if(W.length===0)return null;be=Math.max(be,0),ze=Math.min(ze,u._length),Ce=(be+ze)/2;var te,ke,Ee,Me,Oe,Re,me;for(O=0;O<W.length;O++)for(ke=W[O].pts,te=1;te<ke.length;te++)Re=ke[te-1][1],me=ke[te][1],Re>Ce!=me>=Ce&&(Me=ke[te-1][0],Oe=ke[te][0],me-Re&&(Ee=Me+(Oe-Me)*(Ce-Re)/(me-Re),re=Math.min(re,Ee),ne=Math.max(ne,Ee)));return re=Math.max(re,0),ne=Math.min(ne,s._length),{x0:re,x1:ne,y0:Ce,y1:Ce}}if(h.indexOf("fills")!==-1&&o._fillElement){var U=F(o._fillElement)&&!F(o._fillExclusionElement);if(U){var H=q(o._polygons);H===null&&(H={x0:c[0],x1:c[0],y0:c[1],y1:c[1]});var j=MU.defaultLine;return MU.opacity(o.fillcolor)?j=o.fillcolor:MU.opacity((o.line||{}).color)&&(j=o.line.color),$P.extendFlat(t,{distance:t.maxHoverDistance,x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1,color:j,hovertemplate:!1}),delete t.index,o.text&&!$P.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var lT=Se((sor,Ppe)=>{"use strict";var zpe=ec();Ppe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u,l,f,c,h=!zpe.hasMarkers(s)&&!zpe.hasText(s);if(h)return[];if(r===!1)for(u=0;u<n.length;u++)n[u].selected=0;else for(u=0;u<n.length;u++)l=n[u],f=i.c2p(l.x),c=a.c2p(l.y),l.i!==null&&r.contains([f,c],!1,u,t)?(o.push({pointNumber:l.i,x:i.c2d(l.x),y:a.c2d(l.y)}),l.selected=1):l.selected=0;return o}});var Dpe=Se((lor,Ipe)=>{"use strict";Ipe.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var kU=Se((uor,qpe)=>{"use strict";var X5=Ul().traceIs,EU=L3();qpe.exports=function(t,r,n,i){n("autotypenumbers",i.autotypenumbersDflt);var a=n("type",(i.splomStash||{}).type);a==="-"&&($pt(r,i.data),r.type==="-"?r.type="linear":t.type=r.type)};function $pt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i;r.indexOf("scene")!==-1&&(r=n);var a=Qpt(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],u={noMultiCategory:!X5(a,"cartesian")||X5(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&n==={h:"x",v:"y"}[a.orientation||"v"]&&(u.noMultiCategory=!0),u.autotypenumbers=e.autotypenumbers,Fpe(a,n)){var l=Rpe(a),f=[];for(i=0;i<t.length;i++){var c=t[i];!X5(c,"box-violin")||(c[n+"axis"]||n)!==r||(c[l]!==void 0?f.push(c[l][0]):c.name!==void 0?f.push(c.name):f.push("text"),c[o]!==s&&(s=void 0))}e.type=EU(f,s,u)}else if(a.type==="splom"){var h=a.dimensions,d=h[a._axesDim[r]];d.visible&&(e.type=EU(d.values,s,u))}else e.type=EU(a[n]||[a[n+"0"]],s,u)}}}function Qpt(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(Fpe(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function Rpe(e){return{v:"x",h:"y"}[e.orientation||"v"]}function Fpe(e,t){var r=Rpe(e),n=X5(e,"box-violin"),i=X5(e._fullInput||{},"candlestick");return n&&!i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var QP=Se((cor,Bpe)=>{"use strict";var evt=yp().isTypedArraySpec;function tvt(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 u=i[a][r];for(o=0;o<u.length;o++){var l=u[o];l!=null&&(n[l]=1)}}return Object.keys(n)}Bpe.exports=function(t,r,n,i){if(r.type==="category"){var a=t.categoryarray,o=Array.isArray(a)&&a.length>0||evt(a),s;o&&(s="array");var u=n("categoryorder",s),l;u==="array"&&(l=n("categoryarray")),!o&&u==="array"&&(u=r.categoryorder="trace"),u==="trace"?r._initialCategories=[]:u==="array"?r._initialCategories=l.slice():(l=tvt(r,i).sort(),u==="category ascending"?r._initialCategories=l:u==="category descending"&&(r._initialCategories=l.reverse()))}}});var Y5=Se((hor,Npe)=>{"use strict";var Ope=cd().mix,rvt=Ih(),ivt=Zr();Npe.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(C,M){return ivt.coerce2(t,r,i.attributes,C,M)}var s=o("linecolor",a),u=o("linewidth"),l=n("showline",i.showLine||!!s||!!u);l||(delete r.linecolor,delete r.linewidth);var f=Ope(a,i.bgColor,i.blend||rvt.lightFraction).toRgbString(),c=o("gridcolor",f),h=o("gridwidth"),d=o("griddash"),p=n("showgrid",i.showGrid||!!c||!!h||!!d);if(p||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var x=Ope(r.gridcolor,i.bgColor,67).toRgbString(),b=o("minor.gridcolor",x),y=o("minor.gridwidth",r.gridwidth||1),k=o("minor.griddash",r.griddash||"solid"),E=n("minor.showgrid",!!b||!!y||!!k);E||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var A=o("zerolinecolor",a),L=o("zerolinewidth"),_=n("zeroline",i.showGrid||!!A||!!L);_||(delete r.zerolinecolor,delete r.zerolinewidth)}}});var J5=Se((dor,jpe)=>{"use strict";var Upe=_u(),nvt=Ul(),K5=Zr(),avt=_f(),ovt=Jd(),CU=Rd(),Vpe=xb(),Hpe=T3(),svt=e_(),lvt=t_(),uvt=QP(),fvt=Y5(),cvt=wN(),Gpe=gm(),eI=dd().WEEKDAY_PATTERN,hvt=dd().HOUR_PATTERN;jpe.exports=function(t,r,n,i,a){var o=i.letter,s=i.font||{},u=i.splomStash||{},l=n("visible",!i.visibleDflt),f=r._template||{},c=r.type||f.type||"-",h;if(c==="date"){var d=nvt.getComponentMethod("calendars","handleDefaults");d(t,r,"calendar",i.calendar),i.noTicklabelmode||(h=n("ticklabelmode"))}!i.noTicklabelindex&&(c==="date"||c==="linear")&&n("ticklabelindex");var p="";(!i.noTicklabelposition||c==="multicategory")&&(p=K5.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",p.indexOf("inside")!==-1?"hide past domain":c==="category"||c==="multicategory"?"allow":"hide past div"),Gpe(r,a),cvt(t,r,n,i),uvt(t,r,n,i),c!=="category"&&!i.noHover&&n("hoverformat");var x=n("color"),b=x!==CU.color.dflt?x:s.color,y=u.label||a._dfltTitle[o];if(lvt(t,r,n,c,i),!l)return r;n("title.text",y),K5.coerceFont(n,"title.font",s,{overrideDflt:{size:K5.bigFont(s.size),color:b}}),Vpe(t,r,n,c);var k=i.hasMinor;if(k&&(avt.newContainer(r,"minor"),Vpe(t,r,n,c,{isMinor:!0})),svt(t,r,n,c,i),Hpe(t,r,n,i),k){var E=i.isMinor;i.isMinor=!0,Hpe(t,r,n,i),i.isMinor=E}fvt(t,r,n,{dfltColor:x,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:k,attributes:CU}),k&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var A=c==="multicategory";if(!i.noTickson&&(c==="category"||A)&&(r.ticks||r.showgrid)){var L;A&&(L="boundaries");var _=n("tickson",L);_==="boundaries"&&delete r.ticklabelposition}if(A){var C=n("showdividers");C&&(n("dividercolor"),n("dividerwidth"))}if(c==="date")if(ovt(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:dvt}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var M=0;M<r.rangebreaks.length;M++)if(r.rangebreaks[M].pattern===eI){r._hasDayOfWeekBreaks=!0;break}if(Gpe(r,a),a._has("scattergl")||a._has("splom"))for(var v=0;v<i.data.length;v++){var z=i.data[v];(z.type==="scattergl"||z.type==="splom")&&(z.visible=!1,K5.warn(z.type+" traces do not work on axes with rangebreaks. Setting trace "+z.index+" to `visible: false`."))}}return r};function dvt(e,t,r){function n(h,d){return K5.coerce(e,t,CU.rangebreaks,h,d)}var i=n("enabled");if(i){var a=n("bounds");if(a&&a.length>=2){var o="",s,u;if(a.length===2){for(s=0;s<2;s++)if(u=Wpe(a[s]),u){o=eI;break}}var l=n("pattern",o);if(l===eI)for(s=0;s<2;s++)u=Wpe(a[s]),u&&(t.bounds[s]=a[s]=u-1);if(l)for(s=0;s<2;s++)switch(u=a[s],l){case eI:if(!Upe(u)){t.enabled=!1;return}if(u=+u,u!==Math.floor(u)||u<0||u>=7){t.enabled=!1;return}t.bounds[s]=a[s]=u;break;case hvt:if(!Upe(u)){t.enabled=!1;return}if(u=+u,u<0||u>24){t.enabled=!1;return}t.bounds[s]=a[s]=u;break}if(r.autorange===!1){var f=r.range;if(f[0]<f[1]){if(a[0]<f[0]&&a[1]>f[1]){t.enabled=!1;return}}else if(a[0]>f[0]&&a[1]<f[1]){t.enabled=!1;return}}}else{var c=n("values");if(c&&c.length)n("dvalue");else{t.enabled=!1;return}}}}var pvt={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function Wpe(e){if(typeof e=="string")return pvt[e.substr(0,3).toLowerCase()]}});var rI=Se((por,Zpe)=>{"use strict";var vvt=_u(),tI=Zr();Zpe.exports=function(t,r,n,i){var a=i.counterAxes||[],o=i.overlayableAxes||[],s=i.letter,u=i.grid,l=i.overlayingDomain,f,c,h,d,p,x;u&&(c=u._domains[s][u._axisMap[r._id]],f=u._anchors[r._id],c&&(h=u[s+"side"].split(" ")[0],d=u.domain[s][h==="right"||h==="top"?1:0])),c=c||[0,1],f=f||(vvt(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,p=0,x=!1;var b=tI.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:f}},"anchor"),y=tI.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=y==="left"?l[0]:l[1],x=r.automargin?r.automargin:!0,p=y==="left"?-3:3),n("shift",p)}n("position",d)}n("automargin",x);var E=!1;if(o.length&&(E=tI.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!E){var A=n("domain",c);A[0]>A[1]-1/4096&&(r.domain=c),tI.noneOrAll(t.domain,r.domain,c),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var rve=Se((vor,tve)=>{"use strict";var Wb=Zr(),Xpe=Pl(),yvt=rv().isUnifiedHover,mvt=XN(),Ype=_f(),gvt=s3(),Kpe=Rd(),_vt=kU(),Jpe=J5(),xvt=Ob(),$pe=rI(),zU=$c(),Cm=zU.id2name,Qpe=zU.name2id,bvt=dd().AX_ID_PATTERN,eve=Ul(),iI=eve.traceIs,LU=eve.getComponentMethod;function nI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}tve.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},u={},l={},f={},c={},h={},d={},p={},x,b;for(x=0;x<n.length;x++){var y=n[x];if(iI(y,"cartesian")){var k;if(y.xaxis)k=Cm(y.xaxis),nI(a,k,y);else if(y.xaxes)for(b=0;b<y.xaxes.length;b++)nI(a,Cm(y.xaxes[b]),y);var E;if(y.yaxis)E=Cm(y.yaxis),nI(a,E,y);else if(y.yaxes)for(b=0;b<y.yaxes.length;b++)nI(a,Cm(y.yaxes[b]),y);if(y.type==="funnel"?y.orientation==="h"?(k&&(o[k]=!0),E&&(c[E]=!0)):E&&(s[E]=!0):y.type==="image"?(E&&(h[E]=!0),k&&(h[k]=!0)):(E&&(l[E]=!0,f[E]=!0),(!iI(y,"carpet")||y.type==="carpet"&&!y._cheater)&&k&&(u[k]=!0)),y.type==="carpet"&&y._cheater&&k&&(o[k]=!0),iI(y,"2dMap")&&(d[k]=!0,d[E]=!0),iI(y,"oriented")){var A=y.orientation==="h"?E:k;p[A]=!0}}}var L=r._subplots,_=L.xaxis,C=L.yaxis,M=Wb.simpleMap(_,Cm),v=Wb.simpleMap(C,Cm),z=M.concat(v),T=Xpe.background;_.length&&C.length&&(T=Wb.coerce(t,r,gvt,"plot_bgcolor"));var F=Xpe.combine(T,r.paper_bgcolor),q,U,H,j,G;function O(){var nt=a[q]||[];G._traceIndices=nt.map(function(ut){return ut.index}),G._annIndices=[],G._shapeIndices=[],G._selectionIndices=[],G._imgIndices=[],G._subplotsWith=[],G._counterAxes=[],G._name=G._attr=q,G._id=U}function W(nt,ut){return Wb.coerce(j,G,Kpe,nt,ut)}function re(nt,ut){return Wb.coerce2(j,G,Kpe,nt,ut)}function ne(nt){return nt==="x"?C:_}function be(nt,ut){for(var ct=nt==="x"?M:v,rt=[],je=0;je<ct.length;je++){var tt=ct[je];tt!==ut&&!(t[tt]||{}).overlaying&&rt.push(Qpe(tt))}return rt}var ze={x:ne("x"),y:ne("y")},Ce=ze.x.concat(ze.y),he={},te=[];function ke(){var nt=j.matches;bvt.test(nt)&&Ce.indexOf(nt)===-1&&(he[nt]=j.type,te=Object.keys(he))}var Ee=mvt(t,r),Me=yvt(Ee);for(x=0;x<z.length;x++){q=z[x],U=Qpe(q),H=q.charAt(0),Wb.isPlainObject(t[q])||(t[q]={}),j=t[q],G=Ype.newContainer(r,q,H+"axis"),O();var Oe=H==="x"&&!u[q]&&o[q]||H==="y"&&!l[q]&&s[q],Re=H==="y"&&(!f[q]&&c[q]||h[q]),me={hasMinor:!0,letter:H,font:r.font,outerTicks:d[q],showGrid:!p[q],data:a[q]||[],bgColor:F,calendar:r.calendar,automargin:!0,visibleDflt:Oe,reverseDflt:Re,autotypenumbersDflt:i,splomStash:((r._splomAxes||{})[H]||{})[U],noAutotickangles:H==="y"};W("uirevision",r.uirevision),_vt(j,G,W,me),Jpe(j,G,W,me,r);var Be=Me&&H===Ee.charAt(0),fe=re("spikecolor",Me?G.color:void 0),Ze=re("spikethickness",Me?1.5:void 0),et=re("spikedash",Me?"dot":void 0),gt=re("spikemode",Me?"across":void 0),Pt=re("spikesnap"),Qe=W("showspikes",!!Be||!!fe||!!Ze||!!et||!!gt||!!Pt);Qe||(delete G.spikecolor,delete G.spikethickness,delete G.spikedash,delete G.spikemode,delete G.spikesnap);var Xe=Cm(j.overlaying),Tt=[0,1];if(r[Xe]!==void 0){var xt=Cm(r[Xe].anchor);r[xt]!==void 0&&(Tt=r[xt].domain)}$pe(j,G,W,{letter:H,counterAxes:ze[H],overlayableAxes:be(H,q),grid:r.grid,overlayingDomain:Tt}),W("title.standoff"),ke(),G._input=j}for(x=0;x<te.length;){U=te[x++],q=Cm(U),H=q.charAt(0),Wb.isPlainObject(t[q])||(t[q]={}),j=t[q],G=Ype.newContainer(r,q,H+"axis"),O();var _t={letter:H,font:r.font,outerTicks:d[q],showGrid:!p[q],data:[],bgColor:F,calendar:r.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:i,splomStash:((r._splomAxes||{})[H]||{})[U]};W("uirevision",r.uirevision),G.type=he[U]||"linear",Jpe(j,G,W,_t,r),$pe(j,G,W,{letter:H,counterAxes:ze[H],overlayableAxes:be(H,q),grid:r.grid}),W("fixedrange"),ke(),G._input=j}var Ct=LU("rangeslider","handleDefaults"),jt=LU("rangeselector","handleDefaults");for(x=0;x<M.length;x++)q=M[x],j=t[q],G=r[q],Ct(t,r,q),G.type==="date"&&jt(j,G,r,v,G.calendar),W("fixedrange");for(x=0;x<v.length;x++){q=v[x],j=t[q],G=r[q];var At=r[Cm(G.anchor)],Te=LU("rangeslider","isVisible")(At);W("fixedrange",Te)}xvt.handleDefaults(t,r,{axIds:Ce.concat(te).sort(zU.idSort),axHasImage:h})}});var ave=Se((yor,nve)=>{"use strict";var wvt=Nl(),ive=Ul(),aI=Zr(),Qv=yu(),oI=hu();nve.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){oI.redrawComponents(t);return}function o(b){var y=b.xaxis,k=b.yaxis;a._defs.select("#"+b.clipId+"> rect").call(Qv.setTranslate,0,0).call(Qv.setScale,1,1),b.plot.call(Qv.setTranslate,y._offset,k._offset).call(Qv.setScale,1,1);var E=b.plot.selectAll(".scatterlayer .trace");E.selectAll(".point").call(Qv.setPointGroupScale,1,1),E.selectAll(".textpoint").call(Qv.setTextPointsScale,1,1),E.call(Qv.hideOutsideRangePoints,b)}function s(b,y){var k=b.plotinfo,E=k.xaxis,A=k.yaxis,L=E._length,_=A._length,C=!!b.xr1,M=!!b.yr1,v=[];if(C){var z=aI.simpleMap(b.xr0,E.r2l),T=aI.simpleMap(b.xr1,E.r2l),F=z[1]-z[0],q=T[1]-T[0];v[0]=(z[0]*(1-y)+y*T[0]-z[0])/(z[1]-z[0])*L,v[2]=L*(1-y+y*q/F),E.range[0]=E.l2r(z[0]*(1-y)+y*T[0]),E.range[1]=E.l2r(z[1]*(1-y)+y*T[1])}else v[0]=0,v[2]=L;if(M){var U=aI.simpleMap(b.yr0,A.r2l),H=aI.simpleMap(b.yr1,A.r2l),j=U[1]-U[0],G=H[1]-H[0];v[1]=(U[1]*(1-y)+y*H[1]-U[1])/(U[0]-U[1])*_,v[3]=_*(1-y+y*G/j),A.range[0]=E.l2r(U[0]*(1-y)+y*H[0]),A.range[1]=A.l2r(U[1]*(1-y)+y*H[1])}else v[1]=0,v[3]=_;oI.drawOne(t,E,{skipTitle:!0}),oI.drawOne(t,A,{skipTitle:!0}),oI.redrawComponents(t,[E._id,A._id]);var O=C?L/v[2]:1,W=M?_/v[3]:1,re=C?v[0]:0,ne=M?v[1]:0,be=C?v[0]/v[2]*L:0,ze=M?v[1]/v[3]*_:0,Ce=E._offset-be,he=A._offset-ze;k.clipRect.call(Qv.setTranslate,re,ne).call(Qv.setScale,1/O,1/W),k.plot.call(Qv.setTranslate,Ce,he).call(Qv.setScale,O,W),Qv.setPointGroupScale(k.zoomScalePts,1/O,1/W),Qv.setTextPointsScale(k.zoomScaleTxt,1/O,1/W)}var u;i&&(u=i());function l(){for(var b={},y=0;y<r.length;y++){var k=r[y],E=k.plotinfo.xaxis,A=k.plotinfo.yaxis;k.xr1&&(b[E._name+".range"]=k.xr1.slice()),k.yr1&&(b[A._name+".range"]=k.yr1.slice())}return u&&u(),ive.call("relayout",t,b).then(function(){for(var L=0;L<r.length;L++)o(r[L].plotinfo)})}function f(){for(var b={},y=0;y<r.length;y++){var k=r[y],E=k.plotinfo.xaxis,A=k.plotinfo.yaxis;k.xr0&&(b[E._name+".range"]=k.xr0.slice()),k.yr0&&(b[A._name+".range"]=k.yr0.slice())}return ive.call("relayout",t,b).then(function(){for(var L=0;L<r.length;L++)o(r[L].plotinfo)})}var c,h,d,p=wvt.ease(n.easing);t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(d),d=null,f()});function x(){h=Date.now();for(var b=Math.min(1,(h-c)/n.duration),y=p(b),k=0;k<r.length;k++)s(r[k],y);h-c>n.duration?(l(),d=window.cancelAnimationFrame(x)):d=window.requestAnimationFrame(x)}return c=Date.now(),d=window.requestAnimationFrame(x),Promise.resolve()}});var Th=Se(xp=>{"use strict";var lI=Nl(),ove=Ul(),jb=Zr(),Tvt=Ac(),Avt=yu(),sve=Dd().getModuleCalcData,y_=$c(),Ry=dd(),Svt=Zv(),Nf=jb.ensureSingle;function sI(e,t,r){return jb.ensureSingle(e,t,r,function(n){n.datum(r)})}var Zb=Ry.zindexSeparator;xp.name="cartesian";xp.attr=["xaxis","yaxis"];xp.idRoot=["x","y"];xp.idRegex=Ry.idRegex;xp.attrRegex=Ry.attrRegex;xp.attributes=Dpe();xp.layoutAttributes=Rd();xp.supplyLayoutDefaults=rve();xp.transitionAxes=ave();xp.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,i=r.yaxis,a=r.cartesian,o=a,s={},u={},l,f,c;for(l=0;l<o.length;l++){var h=o[l].split("y");s[h[0]]=1,u["y"+h[1]]=1}for(l=0;l<n.length;l++)f=n[l],s[f]||(c=(e[y_.id2name(f)]||{}).anchor,Ry.idRegex.y.test(c)||(c="y"),a.push(f+c),o.push(f+c),u[c]||(u[c]=1,jb.pushUnique(i,c)));for(l=0;l<i.length;l++)c=i[l],u[c]||(f=(e[y_.id2name(c)]||{}).anchor,Ry.idRegex.x.test(f)||(f="x"),a.push(f+c),o.push(f+c),s[f]||(s[f]=1,jb.pushUnique(n,f)));if(!o.length){f="",c="";for(var d in e)if(Ry.attrRegex.test(d)){var p=d.charAt(0);p==="x"?(!f||+d.substr(5)<+f.substr(5))&&(f=d):(!c||+d.substr(5)<+c.substr(5))&&(c=d)}f=f?y_.name2id(f):"x",c=c?y_.name2id(c):"y",n.push(f),i.push(c),a.push(f+c)}};xp.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 u=i._zindices,l=0;l<u.length;l++){var f=u[l];for(s=0;s<a.length;s++){var c=a[s],h=i._plots[c];if(l>0){var d=h.id;if(d.indexOf(Zb)!==-1)continue;d+=Zb+(l+1),h=jb.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var p=[],x,b=0;b<o.length;b++){var y=o[b],k=y[0].trace;f===(k.zorder||0)&&k.xaxis+k.yaxis===c&&((t.indexOf(k.index)!==-1||k.carpet)&&(x&&x[0].trace.xaxis+x[0].trace.yaxis===c&&["tonextx","tonexty","tonext"].indexOf(k.fill)!==-1&&p.indexOf(x)===-1&&p.push(x),p.push(y)),x=y)}lve(e,h,p,r,n)}}};function lve(e,t,r,n,i){for(var a=Ry.traceLayerClasses,o=e._fullLayout,s=o._zindices,u=o._modules,l,f,c,h=[],d=[],p=0;p<s.length;p++)for(var x=s[p],b=0;b<u.length;b++){l=u[b];var y=l.name,k=ove.modules[y].categories;if(k.svg){var E=l.layerName||y+"layer",A=E+(p?Number(p)+1:""),L=l.plot;f=sve(r,L,x),c=f[0],r=f[1],c.length&&h.push({i:a.indexOf(E),zindex:p,className:A,plotMethod:L,cdModule:c}),k.zoomScale&&d.push("."+A)}}h.sort(function(M,v){return(M.zindex||0)-(v.zindex||0)||M.i-v.i});var _=t.plot.selectAll("g.mlayer").data(h,function(M){return M.className});if(_.enter().append("g").attr("class",function(M){return M.className}).classed("mlayer",!0).classed("rangeplot",t.isRangePlot),_.exit().remove(),_.order(),_.each(function(M){var v=lI.select(this),z=M.className;M.plotMethod(e,t,M.cdModule,v,n,i),Ry.clipOnAxisFalseQuery.indexOf("."+z)===-1&&Avt.setClipUrl(v,t.layerClipId,e)}),o._has("scattergl")&&(l=ove.getModule("scattergl"),c=sve(r,l)[0],l.plot(e,t,c)),!e._context.staticPlot&&(t._hasClipOnAxisFalse&&(t.clipOnAxisFalseTraces=t.plot.selectAll(Ry.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")}}xp.clean=function(e,t,r,n){var i=n._plots||{},a=t._plots||{},o=n._subplots||{},s,u,l;if(n._hasOnlyLargeSploms&&!t._hasOnlyLargeSploms)for(l in i)s=i[l],s.plotgroup&&s.plotgroup.remove();var f=n._has&&n._has("gl"),c=t._has&&t._has("gl");if(f&&!c)for(l in i)s=i[l],s._scene&&s._scene.destroy();if(o.xaxis&&o.yaxis){var h=y_.listIds({_fullLayout:n});for(u=0;u<h.length;u++){var d=h[u];t[y_.id2name(d)]||n._infolayer.selectAll(".g-"+d+"title").remove()}}var p=n._has&&n._has("cartesian"),x=t._has&&t._has("cartesian");if(p&&!x)fve(n._cartesianlayer.selectAll(".subplot"),n),n._defs.selectAll(".axesclip").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(o.cartesian)for(u=0;u<o.cartesian.length;u++){var b=o.cartesian[u];if(b.indexOf(Zb)===-1&&!a[b]){var y="."+b+",."+b+"-x,."+b+"-y";n._cartesianlayer.selectAll(y).remove(),cve(b,n)}}};xp.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 u=Object.keys(i).map(Number).sort(jb.sorterAsc);u.length||(u=[0]),t._zindices=u;var l=Mvt(e),f=l.length,c=[];for(n=0;n<f;n++)c[n]=l[n].slice();for(var h=1;h<u.length;h++){var d=[];for(n=0;n<f;n++)d[n]=l[n].slice(),d[n][0]+=Zb+(h+1);c=c.concat(d)}var p=t._cartesianlayer.selectAll(".subplot").data(c,String);p.enter().append("g").attr("class",function(x){return"subplot "+x[0]}),p.order(),p.exit().call(fve,t),p.each(function(x){var b=x[0],y=b.indexOf(Zb),k=y!==-1,E=k?b.slice(0,y):b,A=t._plots[b];A||(A=jb.extendFlat({},t._plots[E]),A&&(A.id=b,t._plots[b]=A,t._subplots.cartesian.push(b))),A&&(A.plotgroup=lI.select(this),uve(e,A),k||(A.draglayer=Nf(t._draggers,"g",b)))})};xp.rangePlot=function(e,t,r){uve(e,t),lve(e,t,r),Tvt.style(e)};function Mvt(e){var t=e._fullLayout,r=t._zindices.length,n=t._subplots.cartesian,i=n.length,a,o,s,u,l,f,c=[],h=[];for(a=0;a<i;a++){s=n[a],u=t._plots[s],l=u.xaxis,f=u.yaxis;var d=l._mainAxis,p=f._mainAxis,x=d._id+p._id,b=t._plots[x];u.overlays=[],x!==s&&b?(u.mainplot=x,u.mainplotinfo=b,h.push(s)):(u.mainplot=void 0,u.mainplotinfo=void 0,c.push(s))}for(a=0;a<h.length;a++)s=h[a],u=t._plots[s],u.mainplotinfo.overlays.push(u);var y=c.concat(h),k=[];for(a=0;a<i;a++){s=y[a],u=t._plots[s],l=u.xaxis,f=u.yaxis;for(var E=[],A=1;A<=r;A++){var L="";for(A>1&&(L+=Zb+A),E.push(s+L),o=0;o<u.overlays.length;o++)E.push(u.overlays[o].id+L)}E=E.concat([l.layer,f.layer,l.overlaying||"",f.overlaying||""]),k.push(E)}return k}function uve(e,t){var r=e._fullLayout,n=t.plotgroup,i=t.id,a=i.indexOf(Zb),o=a!==-1,s=Ry.layerValue2layerClass[t.xaxis.layer],u=Ry.layerValue2layerClass[t.yaxis.layer],l=r._hasOnlyLargeSploms,f=r._zindices.length>1,c=t.mainplotinfo;if(!t.mainplot||f)if(l)t.xlines=Nf(n,"path","xlines-above"),t.ylines=Nf(n,"path","ylines-above"),t.xaxislayer=Nf(n,"g","xaxislayer-above"),t.yaxislayer=Nf(n,"g","yaxislayer-above");else{if(!o){var h=Nf(n,"g","layer-subplot");t.shapelayer=Nf(h,"g","shapelayer"),t.imagelayer=Nf(h,"g","imagelayer"),c&&f?(t.minorGridlayer=c.minorGridlayer,t.gridlayer=c.gridlayer,t.zerolinelayer=c.zerolinelayer):(t.minorGridlayer=Nf(n,"g","minor-gridlayer"),t.gridlayer=Nf(n,"g","gridlayer"),t.zerolinelayer=Nf(n,"g","zerolinelayer"));var d=Nf(n,"g","layer-between");t.shapelayerBetween=Nf(d,"g","shapelayer"),t.imagelayerBetween=Nf(d,"g","imagelayer"),Nf(n,"path","xlines-below"),Nf(n,"path","ylines-below"),t.overlinesBelow=Nf(n,"g","overlines-below"),Nf(n,"g","xaxislayer-below"),Nf(n,"g","yaxislayer-below"),t.overaxesBelow=Nf(n,"g","overaxes-below")}t.overplot=Nf(n,"g","overplot"),t.plot=Nf(t.overplot,"g",i),o||(t.xlines=Nf(n,"path","xlines-above"),t.ylines=Nf(n,"path","ylines-above"),t.overlinesAbove=Nf(n,"g","overlines-above"),Nf(n,"g","xaxislayer-above"),Nf(n,"g","yaxislayer-above"),t.overaxesAbove=Nf(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+u),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+u))}else{var p=c.plotgroup,x=i+"-x",b=i+"-y";t.minorGridlayer=c.minorGridlayer,t.gridlayer=c.gridlayer,t.zerolinelayer=c.zerolinelayer,Nf(c.overlinesBelow,"path",x),Nf(c.overlinesBelow,"path",b),Nf(c.overaxesBelow,"g",x),Nf(c.overaxesBelow,"g",b),t.plot=Nf(c.overplot,"g",i),Nf(c.overlinesAbove,"path",x),Nf(c.overlinesAbove,"path",b),Nf(c.overaxesAbove,"g",x),Nf(c.overaxesAbove,"g",b),t.xlines=p.select(".overlines-"+s).select("."+x),t.ylines=p.select(".overlines-"+u).select("."+b),t.xaxislayer=p.select(".overaxes-"+s).select("."+x),t.yaxislayer=p.select(".overaxes-"+u).select("."+b)}o||(l||(sI(t.minorGridlayer,"g",t.xaxis._id),sI(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(y){return y[0]}).sort(y_.idSort),sI(t.gridlayer,"g",t.xaxis._id),sI(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(y){return y[0]}).sort(y_.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function fve(e,t){if(e){var r={};e.each(function(u){var l=u[0],f=lI.select(this);f.remove(),cve(l,t),r[l]=!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 cve(e,t){t._draggers.selectAll("g."+e).remove(),t._defs.select("#clip"+t._uid+e+"plot").remove()}xp.toSVG=function(e){var t=e._fullLayout._glimages,r=lI.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:Svt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i)};xp.updateFx=W7().updateFx});var dve=Se((gor,hve)=>{"use strict";var uI=ec();hve.exports={hasLines:uI.hasLines,hasMarkers:uI.hasMarkers,hasText:uI.hasText,isBubble:uI.isBubble,attributes:Zc(),layoutAttributes:UL(),supplyDefaults:Ode(),crossTraceDefaults:lU(),supplyLayoutDefaults:Hde(),calc:q0().calc,crossTraceCalc:dpe(),arraysToCalcdata:km(),plot:iT(),colorbar:ep(),formatLabels:JP(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:sT(),selectPoints:lT(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Th(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var yve=Se((_or,vve)=>{"use strict";var Evt=Nl(),kvt=Pl(),pve=F7(),PU=Zr(),Cvt=PU.strScale,Lvt=PU.strRotate,zvt=PU.strTranslate;vve.exports=function(t,r,n){var i=t.node(),a=pve[n.arrowhead||0],o=pve[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),u=(n.arrowwidth||1)*(n.startarrowsize||1),l=r.indexOf("start")>=0,f=r.indexOf("end")>=0,c=a.backoff*s+n.standoff,h=o.backoff*u+n.startstandoff,d,p,x,b;if(i.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},p={x:+t.attr("x2"),y:+t.attr("y2")};var y=d.x-p.x,k=d.y-p.y;if(x=Math.atan2(k,y),b=x+Math.PI,c&&h&&c+h>Math.sqrt(y*y+k*k)){U();return}if(c){if(c*c>y*y+k*k){U();return}var E=c*Math.cos(x),A=c*Math.sin(x);p.x+=E,p.y+=A,t.attr({x2:p.x,y2:p.y})}if(h){if(h*h>y*y+k*k){U();return}var L=h*Math.cos(x),_=h*Math.sin(x);d.x-=L,d.y-=_,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var C=i.getTotalLength(),M="";if(C<c+h){U();return}var v=i.getPointAtLength(0),z=i.getPointAtLength(.1);x=Math.atan2(v.y-z.y,v.x-z.x),d=i.getPointAtLength(Math.min(h,C)),M="0px,"+h+"px,";var T=i.getPointAtLength(C),F=i.getPointAtLength(C-.1);b=Math.atan2(T.y-F.y,T.x-F.x),p=i.getPointAtLength(Math.max(0,C-c));var q=M?h+c:c;M+=C-q+"px,"+C+"px",t.style("stroke-dasharray",M)}function U(){t.style("stroke-dasharray","0px,100px")}function H(j,G,O,W){j.path&&(j.noRotate&&(O=0),Evt.select(i.parentNode).append("path").attr({class:t.attr("class"),d:j.path,transform:zvt(G.x,G.y)+Lvt(O*180/Math.PI)+Cvt(W)}).style({fill:kvt.rgb(n.arrowcolor),"stroke-width":0}))}l&&H(o,d,x,u),f&&H(a,p,b,s)}});var fI=Se((xor,bve)=>{"use strict";var mve=Nl(),IU=Ul(),Pvt=Ac(),g_=Zr(),DU=g_.strTranslate,Q5=hu(),Xb=Pl(),zg=yu(),gve=jc(),RU=Bf(),FU=Ty(),$5=gp(),Ivt=_f().arrayEditor,Dvt=yve();bve.exports={draw:Rvt,drawOne:_ve,drawRaw:xve};function Rvt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r<t.annotations.length;r++)t.annotations[r].visible&&_ve(e,r);return Pvt.previousPromises(e)}function _ve(e,t){var r=e._fullLayout,n=r.annotations[t]||{},i=Q5.getFromId(e,n.xref),a=Q5.getFromId(e,n.yref);i&&i.setScale(),a&&a.setScale(),xve(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,u=Q5.getRefType(o)==="domain",l=s?n.h:n.w;return e?u?a+(s?-t:t)/e._length:e.p2r(e.r2p(a)+t):a+(s?-t:t)/l}function xve(e,t,r,n,i,a){var o=e._fullLayout,s=e._fullLayout._size,u=e._context.edits,l,f;n?(l="annotation-"+n,f=n+".annotations"):(l="annotation",f="annotations");var c=Ivt(e.layout,f,t),h=c.modifyBase,d=c.modifyItem,p=c.getUpdateObj;o._infolayer.selectAll("."+l+'[data-index="'+r+'"]').remove();var x="clip"+o._uid+"_ann"+r;if(!t._input||t.visible===!1){mve.selectAll("#"+x).remove();return}var b={x:{},y:{}},y=+t.textangle||0,k=o._infolayer.append("g").classed(l,!0).attr("data-index",String(r)).style("opacity",t.opacity),E=k.append("g").classed("annotation-text-g",!0),A=u[t.showarrow?"annotationTail":"annotationPosition"],L=t.captureevents||u.annotationText||A;function _(W){var re={index:r,annotation:t._input,fullAnnotation:t,event:W};return n&&(re.subplotId=n),re}var C=E.append("g").style("pointer-events",L?"all":null).call(FU,"pointer").on("click",function(){e._dragging=!1,e.emit("plotly_clickannotation",_(mve.event))});t.hovertext&&C.on("mouseover",function(){var W=t.hoverlabel,re=W.font,ne=this.getBoundingClientRect(),be=e.getBoundingClientRect();gve.loneHover({x0:ne.left-be.left,x1:ne.right-be.left,y:(ne.top+ne.bottom)/2-be.top,text:t.hovertext,color:W.bgcolor,borderColor:W.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(){gve.loneUnhover(o._hoverlayer.node())});var M=t.borderwidth,v=t.borderpad,z=M+v,T=C.append("rect").attr("class","bg").style("stroke-width",M+"px").call(Xb.stroke,t.bordercolor).call(Xb.fill,t.bgcolor),F=t.width||t.height,q=o._topclips.selectAll("#"+x).data(F?[0]:[]);q.enter().append("clipPath").classed("annclip",!0).attr("id",x).append("rect"),q.exit().remove();var U=t.font,H=o._meta?g_.templateString(t.text,o._meta):t.text,j=C.append("text").classed("annotation-text",!0).text(H);function G(W){return W.call(zg.font,U).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),RU.convertToTspans(W,e,O),W}function O(){var W=j.selectAll("a");if(W.size()===1&&W.text()===j.text()){var re=C.insert("a",":first-child").attr({"xlink:xlink:href":W.attr("xlink:href"),"xlink:xlink:show":W.attr("xlink:show")}).style({cursor:"pointer"});re.node().appendChild(T.node())}var ne=C.select(".annotation-text-math-group"),be=!ne.empty(),ze=zg.bBox((be?ne:j).node()),Ce=ze.width,he=ze.height,te=t.width||Ce,ke=t.height||he,Ee=Math.round(te+2*z),Me=Math.round(ke+2*z);function Oe(Pe,Ie){return Ie==="auto"&&(Pe<1/3?Ie="left":Pe>2/3?Ie="right":Ie="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ie]}for(var Re=!1,me=["x","y"],Be=0;Be<me.length;Be++){var fe=me[Be],Ze=t[fe+"ref"]||fe,et=t["a"+fe+"ref"],gt={x:i,y:a}[fe],Pt=(y+(fe==="x"?0:-90))*Math.PI/180,Qe=Ee*Math.cos(Pt),Xe=Me*Math.sin(Pt),Tt=Math.abs(Qe)+Math.abs(Xe),xt=t[fe+"anchor"],_t=t[fe+"shift"]*(fe==="x"?1:-1),Ct=b[fe],jt,At,Te,nt,ut,ct=Q5.getRefType(Ze);if(gt&&ct!=="domain"){var rt=gt.r2fraction(t[fe]);(rt<0||rt>1)&&(et===Ze?(rt=gt.r2fraction(t["a"+fe]),(rt<0||rt>1)&&(Re=!0)):Re=!0),jt=gt._offset+gt.r2p(t[fe]),nt=.5}else{var je=ct==="domain";fe==="x"?(Te=t[fe],jt=je?gt._offset+gt._length*Te:jt=s.l+s.w*Te):(Te=1-t[fe],jt=je?gt._offset+gt._length*Te:jt=s.t+s.h*Te),nt=t.showarrow?.5:Te}if(t.showarrow){Ct.head=jt;var tt=t["a"+fe];if(ut=Qe*Oe(.5,t.xanchor)-Xe*Oe(.5,t.yanchor),et===Ze){var Je=Q5.getRefType(et);Je==="domain"?(fe==="y"&&(tt=1-tt),Ct.tail=gt._offset+gt._length*tt):Je==="paper"?fe==="y"?(tt=1-tt,Ct.tail=s.t+s.h*tt):Ct.tail=s.l+s.w*tt:Ct.tail=gt._offset+gt.r2p(tt),At=ut}else Ct.tail=jt+tt,At=ut+tt;Ct.text=Ct.tail+ut;var Mt=o[fe==="x"?"width":"height"];if(Ze==="paper"&&(Ct.head=g_.constrain(Ct.head,1,Mt-1)),et==="pixel"){var Vt=-Math.max(Ct.tail-3,Ct.text),Kt=Math.min(Ct.tail+3,Ct.text)-Mt;Vt>0?(Ct.tail+=Vt,Ct.text+=Vt):Kt>0&&(Ct.tail-=Kt,Ct.text-=Kt)}Ct.tail+=_t,Ct.head+=_t}else ut=Tt*Oe(nt,xt),At=ut,Ct.text=jt+ut;Ct.text+=_t,ut+=_t,At+=_t,t["_"+fe+"padplus"]=Tt/2+At,t["_"+fe+"padminus"]=Tt/2-At,t["_"+fe+"size"]=Tt,t["_"+fe+"shift"]=ut}if(Re){C.remove();return}var ir=0,fr=0;if(t.align!=="left"&&(ir=(te-Ce)*(t.align==="center"?.5:1)),t.valign!=="top"&&(fr=(ke-he)*(t.valign==="middle"?.5:1)),be)ne.select("svg").attr({x:z+ir-1,y:z+fr}).call(zg.setClipUrl,F?x:null,e);else{var Ot=z+fr-ze.top,De=z+ir-ze.left;j.call(RU.positionText,De,Ot).call(zg.setClipUrl,F?x:null,e)}q.select("rect").call(zg.setRect,z,z,te,ke),T.call(zg.setRect,M/2,M/2,Ee-M,Me-M),C.call(zg.setTranslate,Math.round(b.x.text-Ee/2),Math.round(b.y.text-Me/2)),E.attr({transform:"rotate("+y+","+b.x.text+","+b.y.text+")"});var _e=function(Pe,Ie){k.selectAll(".annotation-arrow-g").remove();var lt=b.x.head,ye=b.y.head,ue=b.x.tail+Pe,de=b.y.tail+Ie,ht=b.x.text+Pe,Et=b.y.text+Ie,St=g_.rotationXYMatrix(y,ht,Et),Zt=g_.apply2DTransform(St),qr=g_.apply2DTransform2(St),Lr=+T.attr("width"),vr=+T.attr("height"),Er=ht-.5*Lr,si=Er+Lr,Ei=Et-.5*vr,Si=Ei+vr,xi=[[Er,Ei,Er,Si],[Er,Si,si,Si],[si,Si,si,Ei],[si,Ei,Er,Ei]].map(qr);if(!xi.reduce(function(Tr,Rr){return Tr^!!g_.segmentsIntersect(lt,ye,lt+1e6,ye+1e6,Rr[0],Rr[1],Rr[2],Rr[3])},!1)){xi.forEach(function(Tr){var Rr=g_.segmentsIntersect(ue,de,lt,ye,Tr[0],Tr[1],Tr[2],Tr[3]);Rr&&(ue=Rr.x,de=Rr.y)});var Hi=t.arrowwidth,Jr=t.arrowcolor,ci=t.arrowside,Di=k.append("g").style({opacity:Xb.opacity(Jr)}).classed("annotation-arrow-g",!0),Lt=Di.append("path").attr("d","M"+ue+","+de+"L"+lt+","+ye).style("stroke-width",Hi+"px").call(Xb.stroke,Xb.rgb(Jr));if(Dvt(Lt,ci,t),u.annotationPosition&&Lt.node().parentNode&&!n){var vt=lt,Dt=ye;if(t.standoff){var Bt=Math.sqrt(Math.pow(lt-ue,2)+Math.pow(ye-de,2));vt+=t.standoff*(ue-lt)/Bt,Dt+=t.standoff*(de-ye)/Bt}var sr=Di.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(ue-vt)+","+(de-Dt),transform:DU(vt,Dt)}).style("stroke-width",Hi+6+"px").call(Xb.stroke,"rgba(0,0,0,0)").call(Xb.fill,"rgba(0,0,0,0)"),br,zr;$5.init({element:sr.node(),gd:e,prepFn:function(){var Tr=zg.getTranslate(C);br=Tr.x,zr=Tr.y,i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function(Tr,Rr){var Br=Zt(br,zr),oi=Br[0]+Tr,vi=Br[1]+Rr;C.call(zg.setTranslate,oi,vi),d("x",m_(i,Tr,"x",s,t)),d("y",m_(a,Rr,"y",s,t)),t.axref===t.xref&&d("ax",m_(i,Tr,"ax",s,t)),t.ayref===t.yref&&d("ay",m_(a,Rr,"ay",s,t)),Di.attr("transform",DU(Tr,Rr)),E.attr({transform:"rotate("+y+","+oi+","+vi+")"})},doneFn:function(){IU.call("_guiRelayout",e,p());var Tr=document.querySelector(".js-notes-box-panel");Tr&&Tr.redraw(Tr.selectedObj)}})}}};if(t.showarrow&&_e(0,0),A){var Fe;$5.init({element:C.node(),gd:e,prepFn:function(){Fe=E.attr("transform")},moveFn:function(Pe,Ie){var lt="pointer";if(t.showarrow)t.axref===t.xref?d("ax",m_(i,Pe,"ax",s,t)):d("ax",t.ax+Pe),t.ayref===t.yref?d("ay",m_(a,Ie,"ay",s.w,t)):d("ay",t.ay+Ie),_e(Pe,Ie);else{if(n)return;var ye,ue;if(i)ye=m_(i,Pe,"x",s,t);else{var de=t._xsize/s.w,ht=t.x+(t._xshift-t.xshift)/s.w-de/2;ye=$5.align(ht+Pe/s.w,de,0,1,t.xanchor)}if(a)ue=m_(a,Ie,"y",s,t);else{var Et=t._ysize/s.h,St=t.y-(t._yshift+t.yshift)/s.h-Et/2;ue=$5.align(St-Ie/s.h,Et,0,1,t.yanchor)}d("x",ye),d("y",ue),(!i||!a)&&(lt=$5.getCursor(i?.5:ye,a?.5:ue,t.xanchor,t.yanchor))}E.attr({transform:DU(Pe,Ie)+Fe}),FU(C,lt)},clickFn:function(Pe,Ie){t.captureevents&&e.emit("plotly_clickannotation",_(Ie))},doneFn:function(){FU(C),IU.call("_guiRelayout",e,p());var Pe=document.querySelector(".js-notes-box-panel");Pe&&Pe.redraw(Pe.selectedObj)}})}}u.annotationText?j.call(RU.makeEditable,{delegate:C,gd:e}).call(G).on("edit",function(W){t.text=W,this.call(G),d("text",W),i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),IU.call("_guiRelayout",e,p())}):j.call(G)}});var Eve=Se((bor,Mve)=>{"use strict";var wve=Zr(),Fvt=Ul(),Tve=_f().arrayEditor;Mve.exports={hasClickToShow:qvt,onClick:Bvt};function qvt(e,t){var r=Sve(e,t);return r.on.length>0||r.explicitOff.length>0}function Bvt(e,t){var r=Sve(e,t),n=r.on,i=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,u;if(n.length||i.length){for(s=0;s<n.length;s++)u=Tve(e.layout,"annotations",o[n[s]]),u.modifyItem("visible",!0),wve.extendFlat(a,u.getUpdateObj());for(s=0;s<i.length;s++)u=Tve(e.layout,"annotations",o[i[s]]),u.modifyItem("visible",!1),wve.extendFlat(a,u.getUpdateObj());return Fvt.call("update",e,{},a)}}function Sve(e,t){var r=e._fullLayout.annotations,n=[],i=[],a=[],o=(t||[]).length,s,u,l,f,c,h,d,p;for(s=0;s<r.length;s++)if(l=r[s],f=l.clicktoshow,f){for(u=0;u<o;u++)if(c=t[u],h=c.xaxis,d=c.yaxis,h._id===l.xref&&d._id===l.yref&&h.d2r(c.x)===Ave(l._xclick,h)&&d.d2r(c.y)===Ave(l._yclick,d)){l.visible?f==="onout"?p=i:p=a:p=n,p.push(s);break}u===o&&l.visible&&f==="onout"&&i.push(s)}return{on:n,off:i,explicitOff:a}}function Ave(e,t){return t.type==="log"?t.l2r(e):t.d2r(e)}});var BU=Se((wor,kve)=>{"use strict";var qU=Zr(),uT=Pl();kve.exports=function(t,r,n,i){i("opacity");var a=i("bgcolor"),o=i("bordercolor"),s=uT.opacity(o);i("borderpad");var u=i("borderwidth"),l=i("showarrow");i("text",l?" ":n._dfltTitle.annotation),i("textangle"),qU.coerceFont(i,"font",n.font),i("width"),i("align");var f=i("height");if(f&&i("valign"),l){var c=i("arrowside"),h,d;c.indexOf("end")!==-1&&(h=i("arrowhead"),d=i("arrowsize")),c.indexOf("start")!==-1&&(i("startarrowhead",h),i("startarrowsize",d)),i("arrowcolor",s?r.bordercolor:uT.defaultLine),i("arrowwidth",(s&&u||1)*2),i("standoff"),i("startstandoff")}var p=i("hovertext"),x=n.hoverlabel||{};if(p){var b=i("hoverlabel.bgcolor",x.bgcolor||(uT.opacity(a)?uT.rgb(a):uT.defaultLine)),y=i("hoverlabel.bordercolor",x.bordercolor||uT.contrast(b)),k=qU.extendFlat({},x.font);k.color||(k.color=y),qU.coerceFont(i,"hoverlabel.font",k)}i("captureevents",!!p)}});var Lve=Se((Tor,Cve)=>{"use strict";var OU=Zr(),Yb=hu(),Ovt=Jd(),Nvt=BU(),Uvt=Nb();Cve.exports=function(t,r){Ovt(t,r,{name:"annotations",handleItemDefaults:Vvt})};function Vvt(e,t,r){function n(E,A){return OU.coerce(e,t,Uvt,E,A)}var i=n("visible"),a=n("clicktoshow");if(i||a){Nvt(e,t,r,n);for(var o=t.showarrow,s=["x","y"],u=[-10,-30],l={_fullLayout:r},f=0;f<2;f++){var c=s[f],h=Yb.coerceRef(e,t,l,c,"","paper");if(h!=="paper"){var d=Yb.getFromId(l,h);d._annIndices.push(t._index)}if(Yb.coercePosition(t,l,n,h,c,.5),o){var p="a"+c,x=Yb.coerceRef(e,t,l,p,"pixel",["pixel","paper"]);x!=="pixel"&&x!==h&&(x=t[p]="pixel");var b=x==="pixel"?u[f]:.4;Yb.coercePosition(t,l,n,x,p,b)}n(c+"anchor"),n(c+"shift")}if(OU.noneOrAll(e,t,["x","y"]),o&&OU.noneOrAll(e,t,["ax","ay"]),a){var y=n("xclick"),k=n("yclick");t._xclick=y===void 0?t.x:Yb.cleanPosition(y,l,t.xref),t._yclick=k===void 0?t.y:Yb.cleanPosition(k,l,t.yref)}}}});var Ive=Se((Aor,Pve)=>{"use strict";var NU=Zr(),Kb=hu(),Hvt=fI().draw;Pve.exports=function(t){var r=t._fullLayout,n=NU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return NU.syncOrAsync([Hvt,Gvt],t)};function Gvt(e){var t=e._fullLayout;NU.filterVisible(t.annotations).forEach(function(r){var n=Kb.getFromId(e,r.xref),i=Kb.getFromId(e,r.yref),a=Kb.getRefType(r.xref),o=Kb.getRefType(r.yref);r._extremes={},a==="range"&&zve(r,n),o==="range"&&zve(r,i)})}function zve(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"],u=e["_"+n+"padplus"],l=e["_"+n+"padminus"],f={x:1,y:-1}[n]*e[n+"shift"],c=3*e.arrowsize*e.arrowwidth||0,h=c+f,d=c-f,p=3*e.startarrowsize*e.arrowwidth||0,x=p+f,b=p-f,y;if(s===o){var k=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),E=Kb.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(u,x),ppadminus:Math.max(l,b)});y={min:[k.min[0],E.min[0]],max:[k.max[0],E.max[0]]}}else x=a?x+a:x,b=a?b-a:b,y=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(u,h,x),ppadminus:Math.max(l,d,b)});e._extremes[r]=y}});var Rve=Se((Sor,Dve)=>{"use strict";var Wvt=_u(),jvt=lL();Dve.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,u=r._id.charAt(0),l,f;function c(d){var p=l[d],x=null;a?x=jvt(p,r.range):x=Math.pow(10,p),Wvt(x)||(x=null),i(f+d,x)}for(var h=0;h<s.length;h++)l=s[h],f="annotations["+h+"].",l[u+"ref"]===r._id&&c(u),l["a"+u+"ref"]===r._id&&c("a"+u)}});var Bve=Se((Mor,qve)=>{"use strict";var UU=fI(),Fve=Eve();qve.exports={moduleType:"component",name:"annotations",layoutAttributes:Nb(),supplyLayoutDefaults:Lve(),includeBasePlot:P5()("annotations"),calcAutorange:Ive(),draw:UU.draw,drawOne:UU.drawOne,drawRaw:UU.drawRaw,hasClickToShow:Fve.hasClickToShow,onClick:Fve.onClick,convertCoords:Rve()}});var cI=Se((Eor,Ove)=>{"use strict";var Mc=Nb(),Zvt=_c().overrideAll,Xvt=_f().templatedArray;Ove.exports=Zvt(Xvt("annotation",{visible:Mc.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Mc.xanchor,xshift:Mc.xshift,yanchor:Mc.yanchor,yshift:Mc.yshift,text:Mc.text,textangle:Mc.textangle,font:Mc.font,width:Mc.width,height:Mc.height,opacity:Mc.opacity,align:Mc.align,valign:Mc.valign,bgcolor:Mc.bgcolor,bordercolor:Mc.bordercolor,borderpad:Mc.borderpad,borderwidth:Mc.borderwidth,showarrow:Mc.showarrow,arrowcolor:Mc.arrowcolor,arrowhead:Mc.arrowhead,startarrowhead:Mc.startarrowhead,arrowside:Mc.arrowside,arrowsize:Mc.arrowsize,startarrowsize:Mc.startarrowsize,arrowwidth:Mc.arrowwidth,standoff:Mc.standoff,startstandoff:Mc.startstandoff,hovertext:Mc.hovertext,hoverlabel:Mc.hoverlabel,captureevents:Mc.captureevents}),"calc","from-root")});var Uve=Se((kor,Nve)=>{"use strict";var VU=Zr(),Yvt=hu(),Kvt=Jd(),Jvt=BU(),$vt=cI();Nve.exports=function(t,r,n){Kvt(t,r,{name:"annotations",handleItemDefaults:Qvt,fullLayout:n.fullLayout})};function Qvt(e,t,r,n){function i(s,u){return VU.coerce(e,t,$vt,s,u)}function a(s){var u=s+"axis",l={_fullLayout:{}};return l._fullLayout[u]=r[u],Yvt.coercePosition(t,l,i,s,s,.5)}var o=i("visible");o&&(Jvt(e,t,n.fullLayout,i),a("x"),a("y"),a("z"),VU.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),VU.noneOrAll(e,t,["ax","ay"])))}});var Wve=Se((Cor,Gve)=>{"use strict";var Vve=Zr(),Hve=hu();Gve.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i<n.length;i++)e0t(n[i],t);t.fullLayout._infolayer.selectAll(".annotation-"+t.id).remove()};function e0t(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={},Vve.extendFlat(e._xa,a),Hve.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={},Vve.extendFlat(e._ya,a),Hve.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 GU=Se((Lor,jve)=>{"use strict";function HU(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 t0t(e,t){var r=HU(e.projection,HU(e.view,HU(e.model,[t[0],t[1],t[2],1])));return r}jve.exports=t0t});var Xve=Se((zor,Zve)=>{"use strict";var r0t=fI().drawRaw,i0t=GU(),n0t=["x","y","z"];Zve.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,u=0;u<3;u++){var l=n0t[u],f=o[l],c=r[l+"axis"],h=c.r2fraction(f);if(h<0||h>1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+a+'"]').remove():(o._pdata=i0t(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),r0t(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var Jve=Se((Por,Kve)=>{"use strict";var a0t=Ul(),Yve=Zr();Kve.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:cI()}}},layoutAttributes:cI(),handleDefaults:Uve(),includeBasePlot:o0t,convert:Wve(),draw:Xve()};function o0t(e,t){var r=a0t.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&&(Yve.pushUnique(t._basePlotModules,r),Yve.pushUnique(t._subplots.gl3d,o))}}});var WU=Se((Dor,t0e)=>{"use strict";var $ve=Nb(),Qve=uc(),e0e=Zc().line,s0t=Id().dash,Fy=vu().extendFlat,l0t=_f().templatedArray,Ior=z5(),fT=zf(),u0t=Du().shapeTexttemplateAttrs,f0t=xL();t0e.exports=l0t("shape",{visible:Fy({},fT.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Fy({},fT.legend,{editType:"calc+arraydraw"}),legendgroup:Fy({},fT.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Fy({},fT.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:Qve({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Fy({},fT.legendrank,{editType:"calc+arraydraw"}),legendwidth:Fy({},fT.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:Fy({},$ve.xref,{}),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:Fy({},$ve.yref,{}),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:Fy({},e0e.color,{editType:"arraydraw"}),width:Fy({},e0e.width,{editType:"calc+arraydraw"}),dash:Fy({},s0t,{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:u0t({},{keys:Object.keys(f0t)}),font:Qve({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 n0e=Se((Ror,i0e)=>{"use strict";var e4=Zr(),cT=hu(),c0t=Jd(),h0t=WU(),r0e=c_();i0e.exports=function(t,r){c0t(t,r,{name:"shapes",handleItemDefaults:p0t})};function d0t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function p0t(e,t,r){function n(W,re){return e4.coerce(e,t,h0t,W,re)}t._isShape=!0;var i=n("visible");if(i){var a=n("showlegend");a&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),e4.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",u=n("type",s),l=u!=="path";l&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var f=n("line.width");f&&(n("line.color"),n("line.dash"));for(var c=n("xsizemode"),h=n("ysizemode"),d=["x","y"],p=0;p<2;p++){var x=d[p],b=x+"anchor",y=x==="x"?c:h,k={_fullLayout:r},E,A,L,_=cT.coerceRef(e,t,k,x,void 0,"paper"),C=cT.getRefType(_);if(C==="range"?(E=cT.getFromId(k,_),E._shapeIndices.push(t._index),L=r0e.rangeToShapePosition(E),A=r0e.shapePositionToRange(E),(E.type==="category"||E.type==="multicategory")&&(n(x+"0shift"),n(x+"1shift"))):A=L=e4.identity,l){var M=.25,v=.75,z=x+"0",T=x+"1",F=e[z],q=e[T];e[z]=A(e[z],!0),e[T]=A(e[T],!0),y==="pixel"?(n(z,0),n(T,10)):(cT.coercePosition(t,k,n,_,z,M),cT.coercePosition(t,k,n,_,T,v)),t[z]=L(t[z]),t[T]=L(t[T]),e[z]=F,e[T]=q}if(y==="pixel"){var U=e[b];e[b]=A(e[b],!0),cT.coercePosition(t,k,n,_,b,.25),t[b]=L(t[b]),e[b]=U}}l&&e4.noneOrAll(e,t,["x0","x1","y0","y1"]);var H=u==="line",j,G;if(l&&(j=n("label.texttemplate")),j||(G=n("label.text")),G||j){n("label.textangle");var O=n("label.textposition",H?"middle":"middle center");n("label.xanchor"),n("label.yanchor",d0t(H,O)),n("label.padding"),e4.coerceFont(n,"label.font",r.font)}}}});var s0e=Se((For,o0e)=>{"use strict";var v0t=Pl(),a0e=Zr();function y0t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}o0e.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"),a0e.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",v0t.contrast(a)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),u=n("newshape.label.texttemplate");if(s||u){n("newshape.label.textangle");var l=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",y0t(o,l)),n("newshape.label.padding"),a0e.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var h0e=Se((qor,c0e)=>{"use strict";var jU=Zr(),hT=hu(),dT=f5(),u0e=c_();c0e.exports=function(t){var r=t._fullLayout,n=jU.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,u=hT.getRefType(a.xref),l=hT.getRefType(a.yref);a.xref!=="paper"&&u!=="domain"&&(o=hT.getFromId(t,a.xref),s=l0e(o,a,dT.paramIsX),s&&(a._extremes[o._id]=hT.findExtremes(o,s,m0t(a)))),a.yref!=="paper"&&l!=="domain"&&(o=hT.getFromId(t,a.yref),s=l0e(o,a,dT.paramIsY),s&&(a._extremes[o._id]=hT.findExtremes(o,s,g0t(a))))}};function m0t(e){return f0e(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function g0t(e){return f0e(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function f0e(e,t,r,n,i,a){var o=e/2,s=a;if(t==="pixel"){var u=i?u0e.extractPathCoords(i,a?dT.paramIsY:dT.paramIsX):[r,n],l=jU.aggNums(Math.max,null,u),f=jU.aggNums(Math.min,null,u),c=f<0?Math.abs(f)+o:o,h=l>0?l+o:o;return{ppad:o,ppadplus:s?c:h,ppadminus:s?h:c}}else return{ppad:o}}function l0e(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",i=e.type==="category"||e.type==="multicategory",a,o,s=0,u=0,l=i?e.r2c:e.d2c,f=t[n+"sizemode"]==="scaled";if(f?(a=t[n+"0"],o=t[n+"1"],i&&(s=t[n+"0shift"],u=t[n+"1shift"])):(a=t[n+"anchor"],o=t[n+"anchor"]),a!==void 0)return[l(a)+s,l(o)+u];if(t.path){var c=1/0,h=-1/0,d=t.path.match(dT.segmentRE),p,x,b,y,k;for(e.type==="date"&&(l=u0e.decodeDate(l)),p=0;p<d.length;p++)x=d[p],b=r[x.charAt(0)].drawn,b!==void 0&&(y=d[p].substr(1).match(dT.paramRE),!(!y||y.length<b)&&(k=l(y[b]),k<c&&(c=k),k>h&&(h=k)));if(h>=c)return[c,h]}}});var v0e=Se((Bor,p0e)=>{"use strict";var d0e=tP();p0e.exports={moduleType:"component",name:"shapes",layoutAttributes:WU(),supplyLayoutDefaults:n0e(),supplyDrawNewShapeDefaults:s0e(),includeBasePlot:P5()("shapes"),calcAutorange:h0e(),draw:d0e.draw,drawOne:d0e.drawOne}});var ZU=Se((Nor,m0e)=>{"use strict";var y0e=dd(),_0t=_f().templatedArray,Oor=z5();m0e.exports=_0t("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",y0e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",y0e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var _0e=Se((Uor,g0e)=>{"use strict";var x0t=Zr(),XU=hu(),b0t=Jd(),w0t=ZU(),T0t="images";g0e.exports=function(t,r){var n={name:T0t,handleItemDefaults:A0t};b0t(t,r,n)};function A0t(e,t,r){function n(h,d){return x0t.coerce(e,t,w0t,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"],u=0;u<2;u++){var l=s[u],f=XU.coerceRef(e,t,o,l,"paper",void 0);if(f!=="paper"){var c=XU.getFromId(o,f);c._imgIndices.push(t._index)}XU.coercePosition(t,o,n,f,l,0)}return t}});var T0e=Se((Vor,w0e)=>{"use strict";var x0e=Nl(),S0t=yu(),pT=hu(),b0e=$c(),M0t=Zv();w0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s<r.images.length;s++){var u=r.images[s];if(u.visible)if(u.layer==="below"&&u.xref!=="paper"&&u.yref!=="paper"){o=b0e.ref2id(u.xref)+b0e.ref2id(u.yref);var l=r._plots[o];if(!l){a.push(u);continue}l.mainplot&&(o=l.mainplot.id),i[o]||(i[o]=[]),i[o].push(u)}else u.layer==="above"?n.push(u):a.push(u)}var f={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 c(A){var L=x0e.select(this);if(this._imgSrc!==A.source)if(L.attr("xmlns",M0t.svg),!t._context.staticPlot||A.source&&A.source.slice(0,5)==="data:")L.attr("xlink:href",A.source),this._imgSrc=A.source;else{var _=new Promise(function(C){var M=new Image;this.img=M,M.setAttribute("crossOrigin","anonymous"),M.onerror=v,M.onload=function(){var z=document.createElement("canvas");z.width=this.width,z.height=this.height;var T=z.getContext("2d",{willReadFrequently:!0});T.drawImage(this,0,0);var F=z.toDataURL("image/png");L.attr("xlink:href",F),C()},L.on("error",v),M.src=A.source,this._imgSrc=A.source;function v(){L.remove(),C()}}.bind(this));t._promises.push(_)}}function h(A){var L=x0e.select(this),_=pT.getFromId(t,A.xref),C=pT.getFromId(t,A.yref),M=pT.getRefType(A.xref)==="domain",v=pT.getRefType(A.yref)==="domain",z=r._size,T,F;_!==void 0?T=typeof A.xref=="string"&&M?_._length*A.sizex:Math.abs(_.l2p(A.sizex)-_.l2p(0)):T=A.sizex*z.w,C!==void 0?F=typeof A.yref=="string"&&v?C._length*A.sizey:Math.abs(C.l2p(A.sizey)-C.l2p(0)):F=A.sizey*z.h;var q=T*f.x[A.xanchor].offset,U=F*f.y[A.yanchor].offset,H=f.x[A.xanchor].sizing+f.y[A.yanchor].sizing,j,G;switch(_!==void 0?j=typeof A.xref=="string"&&M?_._length*A.x+_._offset:_.r2p(A.x)+_._offset:j=A.x*z.w+z.l,j+=q,C!==void 0?G=typeof A.yref=="string"&&v?C._length*(1-A.y)+C._offset:C.r2p(A.y)+C._offset:G=z.h-A.y*z.h+z.t,G+=U,A.sizing){case"fill":H+=" slice";break;case"stretch":H="none";break}L.attr({x:j,y:G,width:T,height:F,preserveAspectRatio:H,opacity:A.opacity});var O=_&&pT.getRefType(A.xref)!=="domain"?_._id:"",W=C&&pT.getRefType(A.yref)!=="domain"?C._id:"",re=O+W;S0t.setClipUrl(L,re?"clip"+r._uid+re:null,t)}function d(A){return[A.xref,A.x,A.sizex,A.yref,A.y,A.sizey].join("_")}function p(A,L){return A._index-L._index}var x=r._imageLowerLayer.selectAll("image").data(a,d),b=r._imageUpperLayer.selectAll("image").data(n,d);x.enter().append("image"),b.enter().append("image"),x.exit().remove(),b.exit().remove(),x.each(function(A){c.bind(this)(A),h.bind(this)(A)}),b.each(function(A){c.bind(this)(A),h.bind(this)(A)}),x.sort(p),b.sort(p);var y=Object.keys(r._plots);for(s=0;s<y.length;s++){o=y[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(A){c.bind(this)(A),h.bind(this)(A)}),E.sort(p)}}}});var M0e=Se((Hor,S0e)=>{"use strict";var A0e=_u(),E0t=lL();S0e.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,u=r._id.charAt(0),l,f,c=0;c<s.length;c++)if(l=s[c],f="images["+c+"].",l[u+"ref"]===r._id){var h=l[u],d=l["size"+u],p=null,x=null;if(a){p=E0t(h,r.range);var b=d/Math.pow(10,p)/2;x=2*Math.log(b+Math.sqrt(1+b*b))/Math.LN10}else p=Math.pow(10,h),x=p*(Math.pow(10,d/2)-Math.pow(10,-d/2));A0e(p)?A0e(x)||(x=null):(p=null,x=null),i(f+u,p),i(f+"size"+u,x)}}}});var k0e=Se((Gor,E0e)=>{"use strict";E0e.exports={moduleType:"component",name:"images",layoutAttributes:ZU(),supplyLayoutDefaults:_0e(),includeBasePlot:P5()("images"),draw:T0e(),convertCoords:M0e()}});var hI=Se((Wor,C0e)=>{"use strict";C0e.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 YU=Se((jor,z0e)=>{"use strict";var k0t=uc(),C0t=Ih(),L0t=vu().extendFlat,z0t=_c().overrideAll,P0t=bL(),L0e=_f().templatedArray,I0t=L0e("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}});z0e.exports=z0t(L0e("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:I0t,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:L0t(P0t({editType:"arraydraw"}),{}),font:k0t({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:C0t.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var R0e=Se((Zor,D0e)=>{"use strict";var dI=Zr(),P0e=Jd(),I0e=YU(),D0t=hI(),R0t=D0t.name,F0t=I0e.buttons;D0e.exports=function(t,r){var n={name:R0t,handleItemDefaults:q0t};P0e(t,r,n)};function q0t(e,t,r){function n(o,s){return dI.coerce(e,t,I0e,o,s)}var i=P0e(e,t,{name:"buttons",handleItemDefaults:B0t}),a=n("visible",i.length>0);a&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),dI.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),dI.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function B0t(e,t){function r(i,a){return dI.coerce(e,t,F0t,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 B0e=Se((Xor,q0e)=>{"use strict";q0e.exports=Qc;var qy=Nl(),F0e=Pl(),vT=yu(),pI=Zr();function Qc(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})}Qc.barWidth=2;Qc.barLength=20;Qc.barRadius=2;Qc.barPad=1;Qc.barColor="#808BA4";Qc.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,u=this.position.w,l=this.position.t,f=this.position.h,c=this.position.direction,h=c==="down",d=c==="left",p=c==="right",x=c==="up",b=u,y=f,k,E,A,L;!h&&!d&&!p&&!x&&(this.position.direction="down",h=!0);var _=h||x;_?(k=s,E=k+b,h?(A=l,L=Math.min(A+y,o),y=L-A):(L=l+y,A=Math.max(L-y,0),y=L-A)):(A=l,L=A+y,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:A,w:b,h:y};var C=u>b,M=Qc.barLength+2*Qc.barPad,v=Qc.barWidth+2*Qc.barPad,z=s,T=l+f;T+v>o&&(T=o-v);var F=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(F0e.fill,Qc.barColor),C?(this.hbar=F.attr({rx:Qc.barRadius,ry:Qc.barRadius,x:z,y:T,width:M,height:v}),this._hbarXMin=z+M/2,this._hbarTranslateMax=b-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var q=f>y,U=Qc.barWidth+2*Qc.barPad,H=Qc.barLength+2*Qc.barPad,j=s+u,G=l;j+U>a&&(j=a-U);var O=this.container.selectAll("rect.scrollbar-vertical").data(q?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-vertical",!0).call(F0e.fill,Qc.barColor),q?(this.vbar=O.attr({rx:Qc.barRadius,ry:Qc.barRadius,x:j,y:G,width:U,height:H}),this._vbarYMin=G+H/2,this._vbarTranslateMax=y-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var W=this.id,re=k-.5,ne=q?E+U+.5:E+.5,be=A-.5,ze=C?L+v+.5:L+.5,Ce=i._topdefs.selectAll("#"+W).data(C||q?[0]:[]);if(Ce.exit().remove(),Ce.enter().append("clipPath").attr("id",W).append("rect"),C||q?(this._clipRect=Ce.select("rect").attr({x:Math.floor(re),y:Math.floor(be),width:Math.ceil(ne)-Math.floor(re),height:Math.ceil(ze)-Math.floor(be)}),this.container.call(vT.setClipUrl,W,this.gd),this.bg.attr({x:s,y:l,width:u,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(vT.setClipUrl,null),delete this._clipRect),C||q){var he=qy.behavior.drag().on("dragstart",function(){qy.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(he);var te=qy.behavior.drag().on("dragstart",function(){qy.event.sourceEvent.preventDefault(),qy.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));C&&this.hbar.on(".drag",null).call(te),q&&this.vbar.on(".drag",null).call(te)}this.setTranslate(r,n)};Qc.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(vT.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)};Qc.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=qy.event.dx),this.vbar&&(r-=qy.event.dy),this.setTranslate(t,r)};Qc.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=qy.event.deltaY),this.vbar&&(r+=qy.event.deltaY),this.setTranslate(t,r)};Qc.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=pI.constrain(qy.event.x,n,i),o=(a-n)/(i-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var u=r+this._vbarYMin,l=u+this._vbarTranslateMax,f=pI.constrain(qy.event.y,u,l),c=(f-u)/(l-u),h=this.position.h-this._box.h;r=c*h}this.setTranslate(t,r)};Qc.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=pI.constrain(t||0,0,n),r=pI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(vT.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(vT.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(vT.setTranslate,t,r+o*this._vbarTranslateMax)}}});var X0e=Se((Yor,Z0e)=>{"use strict";var yT=Nl(),t4=Ac(),r4=Pl(),mT=yu(),e0=Zr(),vI=Bf(),O0t=_f().arrayEditor,N0e=Qh().LINE_SPACING,Iu=hI(),N0t=B0e();Z0e.exports=function(t){var r=t._fullLayout,n=e0.filterVisible(r[Iu.name]);function i(h){t4.autoMargin(t,W0e(h))}var a=r._menulayer.selectAll("g."+Iu.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append("g").classed(Iu.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){yT.select(this).selectAll("g."+Iu.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll("g."+Iu.headerGroupClassName).data(n,U0t);o.enter().append("g").classed(Iu.headerGroupClassName,!0);for(var s=e0.ensureSingle(a,"g",Iu.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),u=0;u<n.length;u++){var l=n[u];Z0t(t,l)}var f="updatemenus"+r._uid,c=new N0t(t,s,f);o.enter().size()&&(s.node().parentNode.appendChild(s.node()),s.call(JU)),o.exit().each(function(h){s.call(JU),i(h)}).remove(),o.each(function(h){var d=yT.select(this),p=h.type==="dropdown"?s:null;t4.manageCommandObserver(t,h,h.buttons,function(x){KU(t,h,h.buttons[x.index],d,p,c,x.index,!0)}),h.type==="dropdown"?(V0e(t,d,s,c,h),U0e(s,h)&&i4(t,d,s,c,h)):i4(t,d,null,null,h)})}};function U0t(e){return e._index}function V0t(e){return+e.attr(Iu.menuIndexAttrName)==-1}function U0e(e,t){return+e.attr(Iu.menuIndexAttrName)===t._index}function KU(e,t,r,n,i,a,o,s){t.active=o,O0t(e.layout,Iu.name,t).applyUpdate("active",o),t.type==="buttons"?i4(e,n,null,null,t):t.type==="dropdown"&&(i.attr(Iu.menuIndexAttrName,"-1"),V0e(e,n,i,a,t),s||i4(e,n,i,a,t))}function V0e(e,t,r,n,i){var a=e0.ensureSingle(t,"g",Iu.headerClassName,function(h){h.style("pointer-events","all")}),o=i._dims,s=i.active,u=i.buttons[s]||Iu.blankHeaderOpts,l={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},f={width:o.headerWidth,height:o.headerHeight};a.call($U,i,u,e).call(j0e,i,l,f);var c=e0.ensureSingle(t,"text",Iu.headerArrowClassName,function(h){h.attr("text-anchor","end").call(mT.font,i.font).text(Iu.arrowSymbol[i.direction])});c.attr({x:o.headerWidth-Iu.arrowOffsetX+i.pad.l,y:o.headerHeight/2+Iu.textOffsetY+i.pad.t}),a.on("click",function(){r.call(JU,String(U0e(r,i)?-1:i._index)),i4(e,t,r,n,i)}),a.on("mouseover",function(){a.call(H0e)}),a.on("mouseout",function(){a.call(G0e,i)}),mT.setTranslate(t,o.lx,o.ly)}function i4(e,t,r,n,i){r||(r=t,r.attr("pointer-events","all"));var a=!V0t(r)||i.type==="buttons"?i.buttons:[],o=i.type==="dropdown"?Iu.dropdownButtonClassName:Iu.buttonClassName,s=r.selectAll("g."+o).data(e0.filterVisible(a)),u=s.enter().append("g").classed(o,!0),l=s.exit();i.type==="dropdown"?(u.attr("opacity","0").transition().attr("opacity","1"),l.transition().attr("opacity","0").remove()):l.remove();var f=0,c=0,h=i._dims,d=["up","down"].indexOf(i.direction)!==-1;i.type==="dropdown"&&(d?c=h.headerHeight+Iu.gapButtonHeader:f=h.headerWidth+Iu.gapButtonHeader),i.type==="dropdown"&&i.direction==="up"&&(c=-Iu.gapButtonHeader+Iu.gapButton-h.openHeight),i.type==="dropdown"&&i.direction==="left"&&(f=-Iu.gapButtonHeader+Iu.gapButton-h.openWidth);var p={x:h.lx+f+i.pad.l,y:h.ly+c+i.pad.t,yPad:Iu.gapButton,xPad:Iu.gapButton,index:0},x={l:p.x+i.borderwidth,t:p.y+i.borderwidth};s.each(function(b,y){var k=yT.select(this);k.call($U,i,b,e).call(j0e,i,p),k.on("click",function(){yT.event.defaultPrevented||(b.execute&&(b.args2&&i.active===y?(KU(e,i,b,t,r,n,-1),t4.executeAPICommand(e,b.method,b.args2)):(KU(e,i,b,t,r,n,y),t4.executeAPICommand(e,b.method,b.args))),e.emit("plotly_buttonclicked",{menu:i,button:b,active:i.active}))}),k.on("mouseover",function(){k.call(H0e)}),k.on("mouseout",function(){k.call(G0e,i),s.call(O0e,i)})}),s.call(O0e,i),d?(x.w=Math.max(h.openWidth,h.headerWidth),x.h=p.y-x.t):(x.w=p.x-x.l,x.h=Math.max(h.openHeight,h.headerHeight)),x.direction=i.direction,n&&(s.size()?H0t(e,t,r,n,i,x):G0t(n))}function H0t(e,t,r,n,i,a){var o=i.direction,s=o==="up"||o==="down",u=i._dims,l=i.active,f,c,h;if(s)for(c=0,h=0;h<l;h++)c+=u.heights[h]+Iu.gapButton;else for(f=0,h=0;h<l;h++)f+=u.widths[h]+Iu.gapButton;n.enable(a,f,c),n.hbar&&n.hbar.attr("opacity","0").transition().attr("opacity","1"),n.vbar&&n.vbar.attr("opacity","0").transition().attr("opacity","1")}function G0t(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 $U(e,t,r,n){e.call(W0t,t).call(j0t,t,r,n)}function W0t(e,t){var r=e0.ensureSingle(e,"rect",Iu.itemRectClassName,function(n){n.attr({rx:Iu.rx,ry:Iu.ry,"shape-rendering":"crispEdges"})});r.call(r4.stroke,t.bordercolor).call(r4.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px")}function j0t(e,t,r,n){var i=e0.ensureSingle(e,"text",Iu.itemTextClassName,function(s){s.attr({"text-anchor":"start","data-notex":1})}),a=r.label,o=n._fullLayout._meta;o&&(a=e0.templateString(a,o)),i.call(mT.font,t.font).text(a).call(vI.convertToTspans,n)}function O0e(e,t){var r=t.active;e.each(function(n,i){var a=yT.select(this);i===r&&t.showactive&&a.select("rect."+Iu.itemRectClassName).call(r4.fill,Iu.activeColor)})}function H0e(e){e.select("rect."+Iu.itemRectClassName).call(r4.fill,Iu.hoverColor)}function G0e(e,t){e.select("rect."+Iu.itemRectClassName).call(r4.fill,t.bgcolor)}function Z0t(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=mT.tester.selectAll("g."+Iu.dropdownButtonClassName).data(e0.filterVisible(t.buttons));n.enter().append("g").classed(Iu.dropdownButtonClassName,!0);var i=["up","down"].indexOf(t.direction)!==-1;n.each(function(f,c){var h=yT.select(this);h.call($U,t,f,e);var d=h.select("."+Iu.itemTextClassName),p=d.node()&&mT.bBox(d.node()).width,x=Math.max(p+Iu.textPadX,Iu.minWidth),b=t.font.size*N0e,y=vI.lineCount(d),k=Math.max(b*y,Iu.minHeight)+Iu.textOffsetY;k=Math.ceil(k),x=Math.ceil(x),r.widths[c]=x,r.heights[c]=k,r.height1=Math.max(r.height1,k),r.width1=Math.max(r.width1,x),i?(r.totalWidth=Math.max(r.totalWidth,x),r.openWidth=r.totalWidth,r.totalHeight+=k+Iu.gapButton,r.openHeight+=k+Iu.gapButton):(r.totalWidth+=x+Iu.gapButton,r.openWidth+=x+Iu.gapButton,r.totalHeight=Math.max(r.totalHeight,k),r.openHeight=r.totalHeight)}),i?r.totalHeight-=Iu.gapButton:r.totalWidth-=Iu.gapButton,r.headerWidth=r.width1+Iu.arrowPadX,r.headerHeight=r.height1,t.type==="dropdown"&&(i?(r.width1+=Iu.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=Iu.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 u="left";e0.isRightAnchor(t)&&(r.lx-=a,u="right"),e0.isCenterAnchor(t)&&(r.lx-=a/2,u="center");var l="top";e0.isBottomAnchor(t)&&(r.ly-=o,l="bottom"),e0.isMiddleAnchor(t)&&(r.ly-=o/2,l="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),t4.autoMargin(e,W0e(t),{x:t.x,y:t.y,l:a*({right:1,center:.5}[u]||0),r:a*({left:1,center:.5}[u]||0),b:o*({top:1,middle:.5}[l]||0),t:o*({bottom:1,middle:.5}[l]||0)})}function W0e(e){return Iu.autoMarginIdRoot+e._index}function j0e(e,t,r,n){n=n||{};var i=e.select("."+Iu.itemRectClassName),a=e.select("."+Iu.itemTextClassName),o=t.borderwidth,s=r.index,u=t._dims;mT.setTranslate(e,o+r.x,o+r.y);var l=["up","down"].indexOf(t.direction)!==-1,f=n.height||(l?u.heights[s]:u.height1);i.attr({x:0,y:0,width:n.width||(l?u.width1:u.widths[s]),height:f});var c=t.font.size*N0e,h=vI.lineCount(a),d=(h-1)*c/2;vI.positionText(a,Iu.textOffsetX,f/2-d+Iu.textOffsetY),l?r.y+=u.heights[s]+r.yPad:r.x+=u.widths[s]+r.xPad,r.index++}function JU(e,t){e.attr(Iu.menuIndexAttrName,t||"-1").selectAll("g."+Iu.dropdownButtonClassName).remove()}});var K0e=Se((Kor,Y0e)=>{"use strict";var X0t=hI();Y0e.exports={moduleType:"component",name:X0t.name,layoutAttributes:YU(),supplyLayoutDefaults:R0e(),draw:X0e()}});var n4=Se((Jor,J0e)=>{"use strict";J0e.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 QU=Se(($or,eye)=>{"use strict";var $0e=uc(),Y0t=bL(),K0t=vu().extendDeepAll,J0t=_c().overrideAll,$0t=RM(),Q0e=_f().templatedArray,Jb=n4(),Q0t=Q0e("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}});eye.exports=J0t(Q0e("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:Q0t,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:K0t(Y0t({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:$0t.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:$0e({})},font:$0e({}),activebgcolor:{valType:"color",dflt:Jb.gripBgActiveColor},bgcolor:{valType:"color",dflt:Jb.railBgColor},bordercolor:{valType:"color",dflt:Jb.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Jb.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Jb.tickLength},tickcolor:{valType:"color",dflt:Jb.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Jb.minorTickLength}}),"arraydraw","from-root")});var nye=Se((Qor,iye)=>{"use strict";var gT=Zr(),tye=Jd(),rye=QU(),eyt=n4(),tyt=eyt.name,ryt=rye.steps;iye.exports=function(t,r){tye(t,r,{name:tyt,handleItemDefaults:iyt})};function iyt(e,t,r){function n(c,h){return gT.coerce(e,t,rye,c,h)}for(var i=tye(e,t,{name:"steps",handleItemDefaults:nyt}),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 u=t._visibleSteps=gT.filterVisible(i),l=n("active");(i[l]||{}).visible||(t.active=u[0]._index),n("x"),n("y"),gT.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"),gT.coerceFont(n,"font",r.font);var f=n("currentvalue.visible");f&&(n("currentvalue.xanchor"),n("currentvalue.prefix"),n("currentvalue.suffix"),n("currentvalue.offset"),gT.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 nyt(e,t){function r(a,o){return gT.coerce(e,t,ryt,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 pye=Se((esr,dye)=>{"use strict";var By=Nl(),yI=Ac(),__=Pl(),Oy=yu(),t0=Zr(),ayt=t0.strTranslate,a4=Bf(),oyt=_f().arrayEditor,lf=n4(),rV=Qh(),sye=rV.LINE_SPACING,eV=rV.FROM_TL,tV=rV.FROM_BR;dye.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=syt(n,t),a=n._infolayer.selectAll("g."+lf.containerClassName).data(i.length>0?[0]:[]);a.enter().append("g").classed(lf.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),yI.autoMargin(t,lye(f))}if(a.exit().each(function(){By.select(this).selectAll("g."+lf.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll("g."+lf.groupClassName).data(i,lyt);s.enter().append("g").classed(lf.groupClassName,!0),s.exit().each(o).remove();for(var u=0;u<i.length;u++){var l=i[u];uyt(t,l)}s.each(function(f){var c=By.select(this);pyt(f),yI.manageCommandObserver(t,f,f._visibleSteps,function(h){var d=c.data()[0];d.active!==h.index&&(d._dragging||fye(t,c,d,h.index,!1,!0))}),fyt(t,By.select(this),f)})}};function lye(e){return lf.autoMarginIdRoot+e._index}function syt(e,t){for(var r=e[lf.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&(a._gd=t,n.push(a))}return n}function lyt(e){return e._index}function uyt(e,t){var r=Oy.tester.selectAll("g."+lf.labelGroupClass).data(t._visibleSteps);r.enter().append("g").classed(lf.labelGroupClass,!0);var n=0,i=0;r.each(function(p){var x=By.select(this),b=uye(x,{step:p},t),y=b.node();if(y){var k=Oy.bBox(y);i=Math.max(i,k.height),n=Math.max(n,k.width)}}),r.remove();var a=t._dims={};a.inputAreaWidth=Math.max(lf.railWidth,lf.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*lf.stepInset,u=s/(t._stepCount-1),l=n+lf.labelPadding;if(a.labelStride=Math.max(1,Math.ceil(l/u)),a.labelHeight=i,a.currentValueMaxWidth=0,a.currentValueHeight=0,a.currentValueTotalHeight=0,a.currentValueMaxLines=1,t.currentvalue.visible){var f=Oy.tester.append("g");r.each(function(p){var x=mI(f,t,p.label),b=x.node()&&Oy.bBox(x.node())||{width:0,height:0},y=a4.lineCount(x);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,y)}),a.currentValueTotalHeight=a.currentValueHeight+t.currentvalue.offset,f.remove()}a.height=a.currentValueTotalHeight+lf.tickOffset+t.ticklen+lf.labelOffset+a.labelHeight+t.pad.t+t.pad.b;var c="left";t0.isRightAnchor(t)&&(a.lx-=a.outerLength,c="right"),t0.isCenterAnchor(t)&&(a.lx-=a.outerLength/2,c="center");var h="top";t0.isBottomAnchor(t)&&(a.ly-=a.height,h="bottom"),t0.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*tV[h],t:a.height*eV[h]};t.lenmode==="fraction"?(d.l=0,d.xl=t.x-t.len*eV[c],d.r=0,d.xr=t.x+t.len*tV[c]):(d.x=t.x,d.l=a.outerLength*eV[c],d.r=a.outerLength*tV[c]),yI.autoMargin(e,lye(t),d)}function fyt(e,t,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),t.call(mI,r).call(yyt,r).call(hyt,r).call(dyt,r).call(vyt,e,r).call(cyt,e,r);var n=r._dims;Oy.setTranslate(t,n.lx+r.pad.l,n.ly+r.pad.t),t.call(hye,r,!1),t.call(mI,r)}function mI(e,t,r){if(t.currentvalue.visible){var n=t._dims,i,a;switch(t.currentvalue.xanchor){case"right":i=n.inputAreaLength-lf.currentValueInset-n.currentValueMaxWidth,a="left";break;case"center":i=n.inputAreaLength*.5,a="middle";break;default:i=lf.currentValueInset,a="left"}var o=t0.ensureSingle(e,"text",lf.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 u=t.steps[t.active].label,l=t._gd._fullLayout._meta;l&&(u=t0.templateString(u,l)),s+=u}t.currentvalue.suffix&&(s+=t.currentvalue.suffix),o.call(Oy.font,t.currentvalue.font).text(s).call(a4.convertToTspans,t._gd);var f=a4.lineCount(o),c=(n.currentValueMaxLines+1-f)*t.currentvalue.font.size*sye;return a4.positionText(o,i,c),o}}function cyt(e,t,r){var n=t0.ensureSingle(e,"rect",lf.gripRectClass,function(i){i.call(cye,t,e,r).style("pointer-events","all")});n.attr({width:lf.gripWidth,height:lf.gripHeight,rx:lf.gripRadius,ry:lf.gripRadius}).call(__.stroke,r.bordercolor).call(__.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function uye(e,t,r){var n=t0.ensureSingle(e,"text",lf.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),i=t.step.label,a=r._gd._fullLayout._meta;return a&&(i=t0.templateString(i,a)),n.call(Oy.font,r.font).text(i).call(a4.convertToTspans,r._gd),n}function hyt(e,t){var r=t0.ensureSingle(e,"g",lf.labelsClass),n=t._dims,i=r.selectAll("g."+lf.labelGroupClass).data(n.labelSteps);i.enter().append("g").classed(lf.labelGroupClass,!0),i.exit().remove(),i.each(function(a){var o=By.select(this);o.call(uye,a,t),Oy.setTranslate(o,iV(t,a.fraction),lf.tickOffset+t.ticklen+t.font.size*sye+lf.labelOffset+n.currentValueTotalHeight)})}function aye(e,t,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&fye(e,t,r,o,!0,i)}function fye(e,t,r,n,i,a){var o=r.active;r.active=n,oyt(e.layout,lf.name,r).applyUpdate("active",n);var s=r.steps[r.active];t.call(hye,r,a),t.call(mI,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 u=t._nextMethod.step;u.method&&(u.execute&&yI.executeAPICommand(e,u.method,u.args),t._nextMethod=null,t._nextMethodRaf=null)})))}function cye(e,t,r){if(t._context.staticPlot)return;var n=r.node(),i=By.select(t);function a(){return r.data()[0]}function o(){var s=a();t.emit("plotly_sliderstart",{slider:s});var u=r.select("."+lf.gripRectClass);By.event.stopPropagation(),By.event.preventDefault(),u.call(__.fill,s.activebgcolor);var l=oye(s,By.mouse(n)[0]);aye(t,r,s,l,!0),s._dragging=!0;function f(){var h=a(),d=oye(h,By.mouse(n)[0]);aye(t,r,h,d,!1)}i.on("mousemove",f),i.on("touchmove",f);function c(){var h=a();h._dragging=!1,u.call(__.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",c),i.on("touchend",c)}e.on("mousedown",o),e.on("touchstart",o)}function dyt(e,t){var r=e.selectAll("rect."+lf.tickRectClass).data(t._visibleSteps),n=t._dims;r.enter().append("rect").classed(lf.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=By.select(this);s.attr({height:o?t.ticklen:t.minorticklen}).call(__.fill,t.tickcolor),Oy.setTranslate(s,iV(t,a/(t._stepCount-1))-.5*t.tickwidth,(o?lf.tickOffset:lf.minorTickOffset)+n.currentValueTotalHeight)})}function pyt(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 hye(e,t,r){for(var n=e.select("rect."+lf.gripRectClass),i=0,a=0;a<t._stepCount;a++)if(t._visibleSteps[a]._index===t.active){i=a;break}var o=iV(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",ayt(o-lf.gripWidth*.5,t._dims.currentValueTotalHeight))}}function iV(e,t){var r=e._dims;return r.inputAreaStart+lf.stepInset+(r.inputAreaLength-2*lf.stepInset)*Math.min(1,Math.max(0,t))}function oye(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-lf.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*lf.stepInset-2*r.inputAreaStart)))}function vyt(e,t,r){var n=r._dims,i=t0.ensureSingle(e,"rect",lf.railTouchRectClass,function(a){a.call(cye,t,e,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,lf.tickOffset+r.ticklen+n.labelHeight)}).call(__.fill,r.bgcolor).attr("opacity",0),Oy.setTranslate(i,0,n.currentValueTotalHeight)}function yyt(e,t){var r=t._dims,n=r.inputAreaLength-lf.railInset*2,i=t0.ensureSingle(e,"rect",lf.railRectClass);i.attr({width:n,height:lf.railWidth,rx:lf.railRadius,ry:lf.railRadius,"shape-rendering":"crispEdges"}).call(__.stroke,t.bordercolor).call(__.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Oy.setTranslate(i,lf.railInset,(r.inputAreaWidth-lf.railWidth)*.5+r.currentValueTotalHeight)}});var yye=Se((tsr,vye)=>{"use strict";var myt=n4();vye.exports={moduleType:"component",name:myt.name,layoutAttributes:QU(),supplyLayoutDefaults:nye(),draw:pye()}});var gI=Se((rsr,gye)=>{"use strict";var mye=Ih();gye.exports={bgcolor:{valType:"color",dflt:mye.background,editType:"plot"},bordercolor:{valType:"color",dflt:mye.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 nV=Se((isr,_ye)=>{"use strict";_ye.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 _I=Se((nsr,xye)=>{"use strict";xye.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 Tye=Se(bI=>{"use strict";var gyt=$c(),_yt=Bf(),bye=_I(),xyt=Qh().LINE_SPACING,xI=bye.name;function wye(e){var t=e&&e[xI];return t&&t.visible}bI.isVisible=wye;bI.makeData=function(e){for(var t=gyt.list({_fullLayout:e},"x",!0),r=e.margin,n=[],i=0;i<t.length;i++){var a=t[i];if(wye(a)){n.push(a);var o=a[xI];o._id=xI+a._id,o._height=(e.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}e._rangeSliderData=n};bI.autoMarginOpts=function(e,t){var r=e._fullLayout,n=t[xI],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(_yt.BR_TAG_ALL)||[]).length;o+=s*t.title.font.size*xyt}return{x:0,y:t._counterDomainMin,l:0,r:0,t:0,b:n._height+a+Math.max(r.margin.b,o),pad:bye.extraPad+n._offsetShift*2}}});var Eye=Se((osr,Mye)=>{"use strict";var wI=Zr(),Aye=_f(),Sye=$c(),byt=gI(),wyt=nV();Mye.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;wI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=Aye.newContainer(a,"rangeslider");function u(L,_){return wI.coerce(o,s,byt,L,_)}var l,f;function c(L,_){return wI.coerce(l,f,wyt,L,_)}var h=u("visible");if(h){u("bgcolor",r.plot_bgcolor),u("bordercolor"),u("borderwidth"),u("thickness"),u("autorange",!a.isValidRange(o.range)),u("range");var d=r._subplots;if(d)for(var p=d.cartesian.filter(function(L){return L.substr(0,L.indexOf("y"))===Sye.name2id(n)}).map(function(L){return L.substr(L.indexOf("y"),L.length)}),x=wI.simpleMap(p,Sye.id2name),b=0;b<x.length;b++){var y=x[b];l=o[y]||{},f=Aye.newContainer(s,y,"yaxis");var k=r[y],E;l.range&&k.isValidRange(l.range)&&(E="fixed");var A=c("rangemode",E);A!=="match"&&c("range",k.range.slice())}s._input=o}}});var Cye=Se((ssr,kye)=>{"use strict";var Tyt=$c().list,Ayt=wy().getAutoRange,Syt=_I();kye.exports=function(t){for(var r=Tyt(t,"x",!0),n=0;n<r.length;n++){var i=r[n],a=i[Syt.name];a&&a.visible&&a.autorange&&(a._input.autorange=!0,a._input.range=a.range=Ayt(t,i))}}});var Iye=Se((lsr,Pye)=>{"use strict";var TI=Nl(),Myt=Ul(),Eyt=Ac(),dh=Zr(),AI=dh.strTranslate,zye=yu(),x_=Pl(),kyt=Mb(),Cyt=Th(),aV=$c(),Lyt=gp(),zyt=Ty(),vf=_I();Pye.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n<r.length;n++){var i=r[n][vf.name];i._clipId=i._id+"-"+t._uid}function a(s){return s._name}var o=t._infolayer.selectAll("g."+vf.containerClassName).data(r,a);o.exit().each(function(s){var u=s[vf.name];t._topdefs.select("#"+u._clipId).remove()}).remove(),r.length!==0&&(o.enter().append("g").classed(vf.containerClassName,!0).attr("pointer-events","all"),o.each(function(s){var u=TI.select(this),l=s[vf.name],f=t[aV.id2name(s.anchor)],c=l[aV.id2name(s.anchor)];if(l.range){var h=dh.simpleMap(l.range,s.r2l),d=dh.simpleMap(s.range,s.r2l),p;d[0]<d[1]?p=[Math.min(h[0],d[0]),Math.max(h[1],d[1])]:p=[Math.max(h[0],d[0]),Math.min(h[1],d[1])],l.range=l._input.range=dh.simpleMap(p,s.l2r)}s.cleanRange("rangeslider.range");var x=t._size,b=s.domain;l._width=x.w*(b[1]-b[0]);var y=Math.round(x.l+x.w*b[0]),k=Math.round(x.t+x.h*(1-s._counterDomainMin)+(s.side==="bottom"?s._depth:0)+l._offsetShift+vf.extraPad);u.attr("transform",AI(y,k)),l._rl=dh.simpleMap(l.range,s.r2l);var E=l._rl[0],A=l._rl[1],L=A-E;if(l.p2d=function(H){return H/l._width*L+E},l.d2p=function(H){return(H-E)/L*l._width},s.rangebreaks){var _=s.locateBreaks(E,A);if(_.length){var C,M,v=0;for(C=0;C<_.length;C++)M=_[C],v+=M.max-M.min;var z=l._width/(A-E-v),T=[-z*E];for(C=0;C<_.length;C++)M=_[C],T.push(T[T.length-1]-z*(M.max-M.min));for(l.d2p=function(H){for(var j=T[0],G=0;G<_.length;G++){var O=_[G];if(H>=O.max)j=T[G+1];else if(H<O.min)break}return j+z*H},C=0;C<_.length;C++)M=_[C],M.pmin=l.d2p(M.min),M.pmax=l.d2p(M.max);l.p2d=function(H){for(var j=T[0],G=0;G<_.length;G++){var O=_[G];if(H>=O.pmax)j=T[G+1];else if(H<O.pmin)break}return(H-j)/z}}}if(c.rangemode!=="match"){var F=f.r2l(c.range[0]),q=f.r2l(c.range[1]),U=q-F;l.d2pOppAxis=function(H){return(H-F)/U*l._height}}u.call(Ryt,e,s,l).call(Fyt,e,s,l).call(qyt,e,s,l).call(Oyt,e,s,l,c).call(Nyt,e,s,l).call(Uyt,e,s,l),Pyt(u,e,s,l),Dyt(u,e,s,l,f,c),s.side==="bottom"&&kyt.draw(e,s._id+"title",{propContainer:s,propName:s._name+".title",placeholder:t._dfltTitle.x,attributes:{x:s._offset+s._length/2,y:k+l._height+l._offsetShift+10+1.5*s.title.font.size,"text-anchor":"middle"}})}))};function Lye(e){return typeof e.clientX=="number"?e.clientX:e.touches&&e.touches.length>0?e.touches[0].clientX:0}function Pyt(e,t,r,n){if(t._context.staticPlot)return;var i=e.select("rect."+vf.slideBoxClassName).node(),a=e.select("rect."+vf.grabAreaMinClassName).node(),o=e.select("rect."+vf.grabAreaMaxClassName).node();function s(){var u=TI.event,l=u.target,f=Lye(u),c=f-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),p=Lyt.coverSlip();this.addEventListener("touchmove",x),this.addEventListener("touchend",b),p.addEventListener("mousemove",x),p.addEventListener("mouseup",b);function x(y){var k=Lye(y),E=+k-f,A,L,_;switch(l){case i:if(_="ew-resize",h+E>r._length||d+E<0)return;A=h+E,L=d+E;break;case a:if(_="col-resize",h+E>r._length)return;A=h+E,L=d;break;case o:if(_="col-resize",d+E<0)return;A=h,L=d+E;break;default:_="ew-resize",A=c,L=c+E;break}if(L<A){var C=L;L=A,A=C}n._pixelMin=A,n._pixelMax=L,zyt(TI.select(p),_),Iyt(e,t,r,n)}function b(){p.removeEventListener("mousemove",x),p.removeEventListener("mouseup",b),this.removeEventListener("touchmove",x),this.removeEventListener("touchend",b),dh.removeElement(p)}}e.on("mousedown",s),e.on("touchstart",s)}function Iyt(e,t,r,n){function i(s){return r.l2r(dh.constrain(s,n._rl[0],n._rl[1]))}var a=i(n.p2d(n._pixelMin)),o=i(n.p2d(n._pixelMax));window.requestAnimationFrame(function(){Myt.call("_guiRelayout",t,r._name+".range",[a,o])})}function Dyt(e,t,r,n,i,a){var o=vf.handleWidth/2;function s(y){return dh.constrain(y,0,n._width)}function u(y){return dh.constrain(y,0,n._height)}function l(y){return dh.constrain(y,-o,n._width+o)}var f=s(n.d2p(r._rl[0])),c=s(n.d2p(r._rl[1]));if(e.select("rect."+vf.slideBoxClassName).attr("x",f).attr("width",c-f),e.select("rect."+vf.maskMinClassName).attr("width",f),e.select("rect."+vf.maskMaxClassName).attr("x",c).attr("width",n._width-c),a.rangemode!=="match"){var h=n._height-u(n.d2pOppAxis(i._rl[1])),d=n._height-u(n.d2pOppAxis(i._rl[0]));e.select("rect."+vf.maskMinOppAxisClassName).attr("x",f).attr("height",h).attr("width",c-f),e.select("rect."+vf.maskMaxOppAxisClassName).attr("x",f).attr("y",d).attr("height",n._height-d).attr("width",c-f),e.select("rect."+vf.slideBoxClassName).attr("y",h).attr("height",d-h)}var p=.5,x=Math.round(l(f-o))-p,b=Math.round(l(c-o))+p;e.select("g."+vf.grabberMinClassName).attr("transform",AI(x,p)),e.select("g."+vf.grabberMaxClassName).attr("transform",AI(b,p))}function Ryt(e,t,r,n){var i=dh.ensureSingle(e,"rect",vf.bgClassName,function(u){u.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),a=n.borderwidth%2===0?n.borderwidth:n.borderwidth-1,o=-n._offsetShift,s=zye.crispRound(t,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:AI(o,o),"stroke-width":s}).call(x_.stroke,n.bordercolor).call(x_.fill,n.bgcolor)}function Fyt(e,t,r,n){var i=t._fullLayout,a=dh.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 qyt(e,t,r,n){var i=t.calcdata,a=e.selectAll("g."+vf.rangePlotClassName).data(r._subplotsWith,dh.identity);a.enter().append("g").attr("class",function(s){return vf.rangePlotClassName+" "+s}).call(zye.setClipUrl,n._clipId,t),a.order(),a.exit().remove();var o;a.each(function(s,u){var l=TI.select(this),f=u===0,c=aV.getFromId(t,s,"y"),h=c._name,d=n[h],p={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&&(p.layout.xaxis.rangebreaks=r.rangebreaks),p.layout[h]={type:c.type,domain:[0,1],range:d.rangemode!=="match"?d.range.slice():c.range.slice(),calendar:c.calendar},c.rangebreaks&&(p.layout[h].rangebreaks=c.rangebreaks),Eyt.supplyDefaults(p);var x=p._fullLayout.xaxis,b=p._fullLayout[h];x.clearCalc(),x.setScale(),b.clearCalc(),b.setScale();var y={id:s,plotgroup:l,xaxis:x,yaxis:b,isRangePlot:!0};f?o=y:(y.mainplot="xy",y.mainplotinfo=o),Cyt.rangePlot(t,y,Byt(i,s))})}function Byt(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 Oyt(e,t,r,n,i){var a=dh.ensureSingle(e,"rect",vf.maskMinClassName,function(l){l.attr({x:0,y:0,"shape-rendering":"crispEdges"})});a.attr("height",n._height).call(x_.fill,vf.maskColor);var o=dh.ensureSingle(e,"rect",vf.maskMaxClassName,function(l){l.attr({y:0,"shape-rendering":"crispEdges"})});if(o.attr("height",n._height).call(x_.fill,vf.maskColor),i.rangemode!=="match"){var s=dh.ensureSingle(e,"rect",vf.maskMinOppAxisClassName,function(l){l.attr({y:0,"shape-rendering":"crispEdges"})});s.attr("width",n._width).call(x_.fill,vf.maskOppAxisColor);var u=dh.ensureSingle(e,"rect",vf.maskMaxOppAxisClassName,function(l){l.attr({y:0,"shape-rendering":"crispEdges"})});u.attr("width",n._width).style("border-top",vf.maskOppBorder).call(x_.fill,vf.maskOppAxisColor)}}function Nyt(e,t,r,n){if(!t._context.staticPlot){var i=dh.ensureSingle(e,"rect",vf.slideBoxClassName,function(a){a.attr({y:0,cursor:vf.slideBoxCursor,"shape-rendering":"crispEdges"})});i.attr({height:n._height,fill:vf.slideBoxFill})}}function Uyt(e,t,r,n){var i=dh.ensureSingle(e,"g",vf.grabberMinClassName),a=dh.ensureSingle(e,"g",vf.grabberMaxClassName),o={x:0,width:vf.handleWidth,rx:vf.handleRadius,fill:x_.background,stroke:x_.defaultLine,"stroke-width":vf.handleStrokeWidth,"shape-rendering":"crispEdges"},s={y:Math.round(n._height/4),height:Math.round(n._height/2)},u=dh.ensureSingle(i,"rect",vf.handleMinClassName,function(d){d.attr(o)});u.attr(s);var l=dh.ensureSingle(a,"rect",vf.handleMaxClassName,function(d){d.attr(o)});l.attr(s);var f={width:vf.grabAreaWidth,x:0,y:0,fill:vf.grabAreaFill,cursor:t._context.staticPlot?void 0:vf.grabAreaCursor},c=dh.ensureSingle(i,"rect",vf.grabAreaMinClassName,function(d){d.attr(f)});c.attr("height",n._height);var h=dh.ensureSingle(a,"rect",vf.grabAreaMaxClassName,function(d){d.attr(f)});h.attr("height",n._height)}});var Rye=Se((usr,Dye)=>{"use strict";var Vyt=Zr(),Hyt=gI(),Gyt=nV(),oV=Tye();Dye.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:Vyt.extendFlat({},Hyt,{yaxis:Gyt})}}},layoutAttributes:gI(),handleDefaults:Eye(),calcAutorange:Cye(),draw:Iye(),isVisible:oV.isVisible,makeData:oV.makeData,autoMarginOpts:oV.autoMarginOpts}});var SI=Se((fsr,qye)=>{"use strict";var Wyt=uc(),Fye=Ih(),jyt=_f().templatedArray,Zyt=jyt("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"});qye.exports={visible:{valType:"boolean",editType:"plot"},buttons:Zyt,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:Wyt({editType:"plot"}),bgcolor:{valType:"color",dflt:Fye.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Fye.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var sV=Se((csr,Bye)=>{"use strict";Bye.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Uye=Se((hsr,Nye)=>{"use strict";var MI=Zr(),Xyt=Pl(),Yyt=_f(),Kyt=Jd(),Oye=SI(),lV=sV();Nye.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=Yyt.newContainer(r,"rangeselector");function u(d,p){return MI.coerce(o,s,Oye,d,p)}var l=Kyt(o,s,{name:"buttons",handleItemDefaults:Jyt,calendar:a}),f=u("visible",l.length>0);if(f){var c=$yt(r,n,i);u("x",c[0]),u("y",c[1]),MI.noneOrAll(t,r,["x","y"]),u("xanchor"),u("yanchor"),MI.coerceFont(u,"font",n.font);var h=u("bgcolor");u("activecolor",Xyt.contrast(h,lV.lightAmount,lV.darkAmount)),u("bordercolor"),u("borderwidth")}};function Jyt(e,t,r,n){var i=n.calendar;function a(u,l){return MI.coerce(e,t,Oye.buttons,u,l)}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 $yt(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+lV.yPad]}});var Hye=Se((dsr,Vye)=>{"use strict";var Qyt=wB(),emt=Zr().titleCase;Vye.exports=function(t,r){var n=t._name,i={};if(r.step==="all")i[n+".autorange"]=!0;else{var a=tmt(t,r);i[n+".range[0]"]=a[0],i[n+".range[1]"]=a[1]}return i};function tmt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=Qyt["utc"+emt(i)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+a.offset(n,-o));break;case"todate":var u=a.offset(n,-o);s=e.l2r(+a.ceil(u));break}var l=r[1];return[s,l]}});var Jye=Se((psr,Kye)=>{"use strict";var kI=Nl(),rmt=Ul(),imt=Ac(),Gye=Pl(),Yye=yu(),Pg=Zr(),Wye=Pg.strTranslate,EI=Bf(),nmt=$c(),cV=Qh(),jye=cV.LINE_SPACING,Zye=cV.FROM_TL,Xye=cV.FROM_BR,fV=sV(),amt=Hye();Kye.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(omt(t),smt);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(i){var a=kI.select(this),o=i,s=o.rangeselector,u=a.selectAll("g.button").data(Pg.filterVisible(s.buttons));u.enter().append("g").classed("button",!0),u.exit().remove(),u.each(function(l){var f=kI.select(this),c=amt(o,l);l._isActive=lmt(o,l,c),f.call(uV,s,l),f.call(fmt,s,l,t),f.on("click",function(){t._dragged||rmt.call("_guiRelayout",t,c)}),f.on("mouseover",function(){l._isHovered=!0,f.call(uV,s,l)}),f.on("mouseout",function(){l._isHovered=!1,f.call(uV,s,l)})}),hmt(t,u,s,o._name,a)})};function omt(e){for(var t=nmt.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 smt(e){return e._id}function lmt(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 uV(e,t,r){var n=Pg.ensureSingle(e,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});n.attr({rx:fV.rx,ry:fV.ry}),n.call(Gye.stroke,t.bordercolor).call(Gye.fill,umt(t,r)).style("stroke-width",t.borderwidth+"px")}function umt(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}function fmt(e,t,r,n){function i(o){EI.convertToTspans(o,n)}var a=Pg.ensureSingle(e,"text","selector-text",function(o){o.attr("text-anchor","middle")});a.call(Yye.font,t.font).text(cmt(r,n._fullLayout._meta)).call(i)}function cmt(e,t){return e.label?t?Pg.templateString(e.label,t):e.label:e.step==="all"?"all":e.count+e.step.charAt(0)}function hmt(e,t,r,n,i){var a=0,o=0,s=r.borderwidth;t.each(function(){var d=kI.select(this),p=d.select(".selector-text"),x=r.font.size*jye,b=Math.max(x*EI.lineCount(p),16)+3;o=Math.max(o,b)}),t.each(function(){var d=kI.select(this),p=d.select(".selector-rect"),x=d.select(".selector-text"),b=x.node()&&Yye.bBox(x.node()).width,y=r.font.size*jye,k=EI.lineCount(x),E=Math.max(b+10,fV.minButtonWidth);d.attr("transform",Wye(s+a,s)),p.attr({x:0,y:0,width:E,height:o}),EI.positionText(x,E/2,o/2-(k-1)*y/2+3),a+=E+5});var u=e._fullLayout._size,l=u.l+u.w*r.x,f=u.t+u.h*(1-r.y),c="left";Pg.isRightAnchor(r)&&(l-=a,c="right"),Pg.isCenterAnchor(r)&&(l-=a/2,c="center");var h="top";Pg.isBottomAnchor(r)&&(f-=o,h="bottom"),Pg.isMiddleAnchor(r)&&(f-=o/2,h="middle"),a=Math.ceil(a),o=Math.ceil(o),l=Math.round(l),f=Math.round(f),imt.autoMargin(e,n+"-range-selector",{x:r.x,y:r.y,l:a*Zye[c],r:a*Xye[c],b:o*Xye[h],t:o*Zye[h]}),i.attr("transform",Wye(l,f))}});var Qye=Se((vsr,$ye)=>{"use strict";$ye.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:SI()}}},layoutAttributes:SI(),handleDefaults:Uye(),draw:Jye()}});var Ec=Se(hV=>{"use strict";var eme=vu().extendFlat;hV.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:eme({},r,{}),y:eme({},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};hV.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 u=r("domain.row");u!==void 0&&(u<o.rows?a=o._domains.y[u]:delete e.domain.row)}var l=r("domain.x",i),f=r("domain.y",a);l[0]<l[1]||(e.domain.x=i.slice()),f[0]<f[1]||(e.domain.y=a.slice())}});var pV=Se((msr,nme)=>{"use strict";var dmt=Zr(),pmt=n3().counter,vmt=Ec().attributes,tme=dd().idRegex,ymt=_f(),dV={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:[pmt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[tme.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[tme.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:vmt({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 CI(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 mmt(e,t){var r=e.grid||{},n=CI(t,r,"x"),i=CI(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),u=o&&n!==r.xaxes&&s&&i!==r.yaxes,l,f;a?(l=r.subplots.length,f=r.subplots[0].length):(s&&(l=i.length),o&&(f=n.length));var c=ymt.newContainer(t,"grid");function h(_,C){return dmt.coerce(r,c,dV,_,C)}var d=h("rows",l),p=h("columns",f);if(!(d*p>1)){delete t.grid;return}if(!a&&!o&&!s){var x=h("pattern")==="independent";x&&(a=!0)}c._hasSubplotGrid=a;var b=h("roworder"),y=b==="top to bottom",k=a?.2:.1,E=a?.3:.1,A,L;u&&t._splomGridDflt&&(A=t._splomGridDflt.xside,L=t._splomGridDflt.yside),c._domains={x:rme("x",h,k,A,p),y:rme("y",h,E,L,d,y)}}function rme(e,t,r,n,i,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var u=new Array(i),l=s[0],f=(s[1]-l)/(i-o),c=f*(1-o),h=0;h<i;h++){var d=l+f*h;u[a?i-1-h:h]=[d,d+c]}return u}function gmt(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,u=r.pattern==="independent",l,f,c,h,d,p,x,b=r._axisMap={};if(a){var y=n.subplots||[];p=r.subplots=new Array(o);var k=1;for(l=0;l<o;l++){var E=p[l]=new Array(s),A=y[l]||[];for(f=0;f<s;f++)if(u?(d=k===1?"xy":"x"+k+"y"+k,k++):d=A[f],E[f]="",i.cartesian.indexOf(d)!==-1){if(x=d.indexOf("y"),c=d.slice(0,x),h=d.slice(x),b[c]!==void 0&&b[c]!==f||b[h]!==void 0&&b[h]!==l)continue;E[f]=d,b[c]=f,b[h]=l}}}else{var L=CI(t,n,"x"),_=CI(t,n,"y");r.xaxes=ime(L,i.xaxis,s,b,"x"),r.yaxes=ime(_,i.yaxis,o,b,"y")}var C=r._anchors={},M=r.roworder==="top to bottom";for(var v in b){var z=v.charAt(0),T=r[z+"side"],F,q,U;if(T.length<8)C[v]="free";else if(z==="x"){if(T.charAt(0)==="t"===M?(F=0,q=1,U=o):(F=o-1,q=-1,U=-1),a){var H=b[v];for(l=F;l!==U;l+=q)if(d=p[l][H],!!d&&(x=d.indexOf("y"),d.slice(0,x)===v)){C[v]=d.slice(x);break}}else for(l=F;l!==U;l+=q)if(h=r.yaxes[l],i.cartesian.indexOf(v+h)!==-1){C[v]=h;break}}else if(T.charAt(0)==="l"?(F=0,q=1,U=s):(F=s-1,q=-1,U=-1),a){var j=b[v];for(l=F;l!==U;l+=q)if(d=p[j][l],!!d&&(x=d.indexOf("y"),d.slice(x)===v)){C[v]=d.slice(0,x);break}}else for(l=F;l!==U;l+=q)if(c=r.xaxes[l],i.cartesian.indexOf(c+v)!==-1){C[v]=c;break}}}}function ime(e,t,r,n,i){var a=new Array(r),o;function s(u,l){t.indexOf(l)!==-1&&n[l]===void 0?(a[u]=l,n[l]=u):a[u]=""}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}nme.exports={moduleType:"component",name:"grid",schema:{layout:{grid:dV}},layoutAttributes:dV,sizeDefaults:mmt,contentDefaults:gmt}});var vV=Se((gsr,ame)=>{"use strict";ame.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 lme=Se((_sr,sme)=>{"use strict";var ome=_u(),_mt=Ul(),xmt=Zr(),bmt=_f(),wmt=vV();sme.exports=function(e,t,r,n){var i="error_"+n.axis,a=bmt.newContainer(t,i),o=e[i]||{};function s(p,x){return xmt.coerce(o,a,wmt,p,x)}var u=o.array!==void 0||o.value!==void 0||o.type==="sqrt",l=s("visible",u);if(l!==!1){var f=s("type","array"in o?"data":"percent"),c=!0;f!=="sqrt"&&(c=s("symmetric",!((f==="data"?"arrayminus":"valueminus")in o))),f==="data"?(s("array"),s("traceref"),c||(s("arrayminus"),s("tracerefminus"))):(f==="percent"||f==="constant")&&(s("value"),c||s("valueminus"));var h="copy_"+n.inherit+"style";if(n.inherit){var d=t["error_"+n.inherit];(d||{}).visible&&s(h,!(o.color||ome(o.thickness)||ome(o.width)))}(!n.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",_mt.traceIs(t,"gl3d")?0:4))}}});var yV=Se((xsr,fme)=>{"use strict";fme.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var i=t.array||[];if(n)return function(l,f){var c=+i[f];return[c,c]};var a=t.arrayminus||[];return function(l,f){var c=+i[f],h=+a[f];return!isNaN(c)||!isNaN(h)?[h||0,c||0]:[NaN,NaN]}}else{var o=ume(r,t.value),s=ume(r,t.valueminus);return n||t.valueminus===void 0?function(l){var f=o(l);return[f,f]}:function(l){return[s(l),o(l)]}}};function ume(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 dme=Se((bsr,hme)=>{"use strict";var mV=_u(),Tmt=Ul(),gV=hu(),Amt=Zr(),Smt=yV();hme.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&&Tmt.traceIs(a,"errorBarsOK")){var o=gV.getFromId(t,a.xaxis),s=gV.getFromId(t,a.yaxis);cme(i,a,o,"x"),cme(i,a,s,"y")}}};function cme(e,t,r,n){var i=t["error_"+n]||{},a=i.visible&&["linear","log"].indexOf(r.type)!==-1,o=[];if(a){for(var s=Smt(i),u=0;u<e.length;u++){var l=e[u],f=l.i;if(f===void 0)f=u;else if(f===null)continue;var c=l[n];if(mV(r.c2l(c))){var h=s(c,f);if(mV(h[0])&&mV(h[1])){var d=l[n+"s"]=c-h[0],p=l[n+"h"]=c+h[1];o.push(d,p)}}}var x=r._id,b=t._extremes[x],y=gV.findExtremes(r,o,Amt.extendFlat({tozero:b.opts.tozero},{padded:!0}));b.min=b.min.concat(y.min),b.max=b.max.concat(y.max)}}});var yme=Se((wsr,vme)=>{"use strict";var pme=Nl(),b_=_u(),Mmt=yu(),Emt=ec();vme.exports=function(t,r,n,i){var a,o=n.xaxis,s=n.yaxis,u=i&&i.duration>0,l=t._context.staticPlot;r.each(function(f){var c=f[0].trace,h=c.error_x||{},d=c.error_y||{},p;c.ids&&(p=function(k){return k.id});var x=Emt.hasMarkers(c)&&c.marker.maxdisplayed>0;!d.visible&&!h.visible&&(f=[]);var b=pme.select(this).selectAll("g.errorbar").data(f,p);if(b.exit().remove(),!!f.length){h.visible||b.selectAll("path.xerror").remove(),d.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var y=b.enter().append("g").classed("errorbar",!0);u&&y.style("opacity",0).transition().duration(i.duration).style("opacity",1),Mmt.setClipUrl(b,n.layerClipId,t),b.each(function(k){var E=pme.select(this),A=kmt(k,o,s);if(!(x&&!k.vis)){var L,_=E.select("path.yerror");if(d.visible&&b_(A.x)&&b_(A.yh)&&b_(A.ys)){var C=d.width;L="M"+(A.x-C)+","+A.yh+"h"+2*C+"m-"+C+",0V"+A.ys,A.noYS||(L+="m-"+C+",0h"+2*C),a=!_.size(),a?_=E.append("path").style("vector-effect",l?"none":"non-scaling-stroke").classed("yerror",!0):u&&(_=_.transition().duration(i.duration).ease(i.easing)),_.attr("d",L)}else _.remove();var M=E.select("path.xerror");if(h.visible&&b_(A.y)&&b_(A.xh)&&b_(A.xs)){var v=(h.copy_ystyle?d:h).width;L="M"+A.xh+","+(A.y-v)+"v"+2*v+"m0,-"+v+"H"+A.xs,A.noXS||(L+="m0,-"+v+"v"+2*v),a=!M.size(),a?M=E.append("path").style("vector-effect",l?"none":"non-scaling-stroke").classed("xerror",!0):u&&(M=M.transition().duration(i.duration).ease(i.easing)),M.attr("d",L)}else M.remove()}})}})};function kmt(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),b_(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),b_(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var _me=Se((Tsr,gme)=>{"use strict";var Cmt=Nl(),mme=Pl();gme.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Cmt.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(mme.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(mme.stroke,a.color)})}});var wme=Se((Asr,bme)=>{"use strict";var o4=Zr(),xme=_c().overrideAll,s4=vV(),$b={error_x:o4.extendFlat({},s4),error_y:o4.extendFlat({},s4)};delete $b.error_x.copy_zstyle;delete $b.error_y.copy_zstyle;delete $b.error_y.copy_ystyle;var l4={error_x:o4.extendFlat({},s4),error_y:o4.extendFlat({},s4),error_z:o4.extendFlat({},s4)};delete l4.error_x.copy_ystyle;delete l4.error_y.copy_ystyle;delete l4.error_z.copy_ystyle;delete l4.error_z.copy_zstyle;bme.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:$b,bar:$b,histogram:$b,scatter3d:xme(l4,"calc","nested"),scattergl:xme($b,"calc","nested")}},supplyDefaults:lme(),calc:dme(),makeComputeError:yV(),plot:yme(),style:_me(),hoverInfo:Lmt};function Lmt(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 Ame=Se((Ssr,Tme)=>{"use strict";Tme.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 zme=Se((Msr,Lme)=>{"use strict";var w_=Nl(),_V=cd(),zI=Ac(),Sme=Ul(),Ig=hu(),LI=gp(),O0=Zr(),Uy=O0.strTranslate,Cme=vu().extendFlat,xV=Ty(),Ny=yu(),bV=Pl(),zmt=Mb(),Pmt=Bf(),Imt=Dp().flipScale,Dmt=J5(),Rmt=rI(),Fmt=Rd(),wV=Qh(),Mme=wV.LINE_SPACING,Eme=wV.FROM_TL,kme=wV.FROM_BR,Xc=Ame().cn;function qmt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Xc.colorbar).data(Bmt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(Xc.colorbar,!0),r.each(function(n){var i=w_.select(this);O0.ensureSingle(i,"rect",Xc.cbbg),O0.ensureSingle(i,"g",Xc.cbfills),O0.ensureSingle(i,"g",Xc.cblines),O0.ensureSingle(i,"g",Xc.cbaxis,function(o){o.classed(Xc.crisp,!0)}),O0.ensureSingle(i,"g",Xc.cbtitleunshift,function(o){o.append("g").classed(Xc.cbtitle,!0)}),O0.ensureSingle(i,"rect",Xc.cboutline);var a=Omt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&Nmt(i,n,e)}),r.exit().each(function(n){zI.autoMargin(e,n._id)}).remove(),r.order()}function Bmt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function u(E){return Cme(E,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function l(){typeof s.calc=="function"?s.calc(e,o,i):(i._fillgradient=a.reversescale?Imt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var f=0;f<r.length;f++){var c=r[f];if(o=c[0].trace,!!o._module){var h=o._module.colorbar;if(o.visible===!0&&h)for(var d=Array.isArray(h),p=d?h:[h],x=0;x<p.length;x++){s=p[x];var b=s.container;a=b?o[b]:o,a&&a.showscale&&(i=u(a.colorbar),i._id="cb"+o.uid+(d&&b?"-"+b:""),i._traceIndex=o.index,i._propPrefix=(b?b+".":"")+"colorbar.",i._meta=o._meta,l(),n.push(i))}}}for(var y in t._colorAxes)if(a=t[y],a.showscale){var k=t._colorAxes[y];i=u(a.colorbar),i._id="cb"+y,i._propPrefix=y+".colorbar.",i._meta=t._meta,s={min:"cmin",max:"cmax"},k[0]!=="heatmap"&&(o=k[1],s.calc=o._module.colorbar.calc),l(),n.push(i)}return n}function Omt(e,t,r){var n=t.orientation==="v",i=t.len,a=t.lenmode,o=t.thickness,s=t.thicknessmode,u=t.outlinewidth,l=t.borderwidth,f=t.bgcolor,c=t.xanchor,h=t.yanchor,d=t.xpad,p=t.ypad,x=t.x,b=n?t.y:1-t.y,y=t.yref==="paper",k=t.xref==="paper",E=r._fullLayout,A=E._size,L=t._fillcolor,_=t._line,C=t.title,M=C.side,v=t._zrange||w_.extent((typeof L=="function"?L:_.color).domain()),z=typeof _.color=="function"?_.color:function(){return _.color},T=typeof L=="function"?L:function(){return L},F=t._levels,q=Umt(r,t,v),U=q.fill,H=q.line,j=Math.round(o*(s==="fraction"?n?A.w:A.h:1)),G=j/(n?A.w:A.h),O=Math.round(i*(a==="fraction"?n?A.h:A.w:1)),W=O/(n?A.h:A.w),re=k?A.w:r._fullLayout.width,ne=y?A.h:r._fullLayout.height,be=Math.round(n?x*re+d:b*ne+p),ze={center:.5,right:1}[c]||0,Ce={top:1,middle:.5}[h]||0,he=n?x-ze*G:b-Ce*G,te=n?b-Ce*W:x-ze*W,ke=Math.round(n?ne*(1-te):re*te);t._lenFrac=W,t._thickFrac=G,t._uFrac=he,t._vFrac=te;var Ee=t._axis=Vmt(r,t,v);Ee.position=G+(n?x+d/A.w:b+p/A.h);var Me=["top","bottom"].indexOf(M)!==-1;if(n&&Me&&(Ee.title.side=M,Ee.titlex=x+d/A.w,Ee.titley=te+(C.side==="top"?W-p/A.h:p/A.h)),!n&&!Me&&(Ee.title.side=M,Ee.titley=b+p/A.h,Ee.titlex=te+d/A.w),_.color&&t.tickmode==="auto"){Ee.tickmode="linear",Ee.tick0=F.start;var Oe=F.size,Re=O0.constrain(O/50,4,15)+1,me=(v[1]-v[0])/((t.nticks||Re)*Oe);if(me>1){var Be=Math.pow(10,Math.floor(Math.log(me)/Math.LN10));Oe*=Be*O0.roundUp(me/Be,[2,5,10]),(Math.abs(F.start)/F.size+1e-6)%1<2e-6&&(Ee.tick0=0)}Ee.dtick=Oe}Ee.domain=n?[te+p/A.h,te+W-p/A.h]:[te+d/A.w,te+W-d/A.w],Ee.setScale(),e.attr("transform",Uy(Math.round(A.l),Math.round(A.t)));var fe=e.select("."+Xc.cbtitleunshift).attr("transform",Uy(-Math.round(A.l),-Math.round(A.t))),Ze=Ee.ticklabelposition,et=Ee.title.font.size,gt=e.select("."+Xc.cbaxis),Pt,Qe=0,Xe=0;function Tt(At,Te){var nt={propContainer:Ee,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:E._dfltTitle.colorbar,containerGroup:e.select("."+Xc.cbtitle)},ut=At.charAt(0)==="h"?At.substr(1):"h"+At;e.selectAll("."+ut+",."+ut+"-math-group").remove(),zmt.draw(r,At,Cme(nt,Te||{}))}function xt(){if(n&&Me||!n&&!Me){var At,Te;M==="top"&&(At=d+A.l+re*x,Te=p+A.t+ne*(1-te-W)+3+et*.75),M==="bottom"&&(At=d+A.l+re*x,Te=p+A.t+ne*(1-te)-3-et*.25),M==="right"&&(Te=p+A.t+ne*b+3+et*.75,At=d+A.l+re*te),Tt(Ee._id+"title",{attributes:{x:At,y:Te,"text-anchor":n?"start":"middle"}})}}function _t(){if(n&&!Me||!n&&Me){var At=Ee.position||0,Te=Ee._offset+Ee._length/2,nt,ut;if(M==="right")ut=Te,nt=A.l+re*At+10+et*(Ee.showticklabels?1:.5);else if(nt=Te,M==="bottom"&&(ut=A.t+ne*At+10+(Ze.indexOf("inside")===-1?Ee.tickfont.size:0)+(Ee.ticks!=="intside"&&t.ticklen||0)),M==="top"){var ct=C.text.split("<br>").length;ut=A.t+ne*At+10-j-Mme*et*ct}Tt((n?"h":"v")+Ee._id+"title",{avoid:{selection:w_.select(r).selectAll("g."+Ee._id+"tick"),side:M,offsetTop:n?0:A.t,offsetLeft:n?A.l:0,maxShift:n?E.width:E.height},attributes:{x:nt,y:ut,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function Ct(){if(!n&&!Me||n&&Me){var At=e.select("."+Xc.cbtitle),Te=At.select("text"),nt=[-u/2,u/2],ut=At.select(".h"+Ee._id+"title-math-group").node(),ct=15.6;Te.node()&&(ct=parseInt(Te.node().style.fontSize,10)*Mme);var rt;if(ut?(rt=Ny.bBox(ut),Xe=rt.width,Qe=rt.height,Qe>ct&&(nt[1]-=(Qe-ct)/2)):Te.node()&&!Te.classed(Xc.jsPlaceholder)&&(rt=Ny.bBox(Te.node()),Xe=rt.width,Qe=rt.height),n){if(Qe){if(Qe+=5,M==="top")Ee.domain[1]-=Qe/A.h,nt[1]*=-1;else{Ee.domain[0]+=Qe/A.h;var je=Pmt.lineCount(Te);nt[1]+=(1-je)*ct}At.attr("transform",Uy(nt[0],nt[1])),Ee.setScale()}}else Xe&&(M==="right"&&(Ee.domain[0]+=(Xe+et/2)/A.w),At.attr("transform",Uy(nt[0],nt[1])),Ee.setScale())}e.selectAll("."+Xc.cbfills+",."+Xc.cblines).attr("transform",n?Uy(0,Math.round(A.h*(1-Ee.domain[1]))):Uy(Math.round(A.w*Ee.domain[0]),0)),gt.attr("transform",n?Uy(0,Math.round(-A.t)):Uy(Math.round(-A.l),0));var tt=e.select("."+Xc.cbfills).selectAll("rect."+Xc.cbfill).attr("style","").data(U);tt.enter().append("rect").classed(Xc.cbfill,!0).attr("style",""),tt.exit().remove();var Je=v.map(Ee.c2p).map(Math.round).sort(function(fr,Ot){return fr-Ot});tt.each(function(fr,Ot){var De=[Ot===0?v[0]:(U[Ot]+U[Ot-1])/2,Ot===U.length-1?v[1]:(U[Ot]+U[Ot+1])/2].map(Ee.c2p).map(Math.round);n&&(De[1]=O0.constrain(De[1]+(De[1]>De[0])?1:-1,Je[0],Je[1]));var _e=w_.select(this).attr(n?"x":"y",be).attr(n?"y":"x",w_.min(De)).attr(n?"width":"height",Math.max(j,2)).attr(n?"height":"width",Math.max(w_.max(De)-w_.min(De),2));if(t._fillgradient)Ny.gradient(_e,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Fe=T(fr).replace("e-","");_e.attr("fill",_V(Fe).toHexString())}});var Mt=e.select("."+Xc.cblines).selectAll("path."+Xc.cbline).data(_.color&&_.width?H:[]);Mt.enter().append("path").classed(Xc.cbline,!0),Mt.exit().remove(),Mt.each(function(fr){var Ot=be,De=Math.round(Ee.c2p(fr))+_.width/2%1;w_.select(this).attr("d","M"+(n?Ot+","+De:De+","+Ot)+(n?"h":"v")+j).call(Ny.lineGroupStyle,_.width,z(fr),_.dash)}),gt.selectAll("g."+Ee._id+"tick,path").remove();var Vt=be+j+(u||0)/2-(t.ticks==="outside"?1:0),Kt=Ig.calcTicks(Ee),ir=Ig.getTickSigns(Ee)[2];return Ig.drawTicks(r,Ee,{vals:Ee.ticks==="inside"?Ig.clipEnds(Ee,Kt):Kt,layer:gt,path:Ig.makeTickPath(Ee,Vt,ir),transFn:Ig.makeTransTickFn(Ee)}),Ig.drawLabels(r,Ee,{vals:Kt,layer:gt,transFn:Ig.makeTransTickLabelFn(Ee),labelFns:Ig.makeLabelFns(Ee,Vt)})}function jt(){var At,Te=j+u/2;Ze.indexOf("inside")===-1&&(At=Ny.bBox(gt.node()),Te+=n?At.width:At.height),Pt=fe.select("text");var nt=0,ut=n&&M==="top",ct=!n&&M==="right",rt=0;if(Pt.node()&&!Pt.classed(Xc.jsPlaceholder)){var je,tt=fe.select(".h"+Ee._id+"title-math-group").node();tt&&(n&&Me||!n&&!Me)?(At=Ny.bBox(tt),nt=At.width,je=At.height):(At=Ny.bBox(fe.node()),nt=At.right-A.l-(n?be:ke),je=At.bottom-A.t-(n?ke:be),!n&&M==="top"&&(Te+=At.height,rt=At.height)),ct&&(Pt.attr("transform",Uy(nt/2+et/2,0)),nt*=2),Te=Math.max(Te,n?nt:je)}var Je=(n?d:p)*2+Te+l+u/2,Mt=0;!n&&C.text&&h==="bottom"&&b<=0&&(Mt=Je/2,Je+=Mt,rt+=Mt),E._hColorbarMoveTitle=Mt,E._hColorbarMoveCBTitle=rt;var Vt=l+u,Kt=(n?be:ke)-Vt/2-(n?d:0),ir=(n?ke:be)-(n?O:p+rt-Mt);e.select("."+Xc.cbbg).attr("x",Kt).attr("y",ir).attr(n?"width":"height",Math.max(Je-Mt,2)).attr(n?"height":"width",Math.max(O+Vt,2)).call(bV.fill,f).call(bV.stroke,t.bordercolor).style("stroke-width",l);var fr=ct?Math.max(nt-10,0):0;e.selectAll("."+Xc.cboutline).attr("x",(n?be:ke+d)+fr).attr("y",(n?ke+p-O:be)+(ut?Qe:0)).attr(n?"width":"height",Math.max(j,2)).attr(n?"height":"width",Math.max(O-(n?2*p+Qe:2*d+fr),2)).call(bV.stroke,t.outlinecolor).style({fill:"none","stroke-width":u});var Ot=n?ze*Je:0,De=n?0:(1-Ce)*Je-rt;if(Ot=k?A.l-Ot:-Ot,De=y?A.t-De:-De,e.attr("transform",Uy(Ot,De)),!n&&(l||_V(f).getAlpha()&&!_V.equals(E.paper_bgcolor,f))){var _e=gt.selectAll("text"),Fe=_e[0].length,Pe=e.select("."+Xc.cbbg).node(),Ie=Ny.bBox(Pe),lt=Ny.getTranslate(e),ye=2;_e.each(function(Er,si){var Ei=0,Si=Fe-1;if(si===Ei||si===Si){var xi=Ny.bBox(this),Hi=Ny.getTranslate(this),Jr;if(si===Si){var ci=xi.right+Hi.x,Di=Ie.right+lt.x+ke-l-ye+x;Jr=Di-ci,Jr>0&&(Jr=0)}else if(si===Ei){var Lt=xi.left+Hi.x,vt=Ie.left+lt.x+ke+l+ye;Jr=vt-Lt,Jr<0&&(Jr=0)}Jr&&(Fe<3?this.setAttribute("transform","translate("+Jr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ue={},de=Eme[c],ht=kme[c],Et=Eme[h],St=kme[h],Zt=Je-j;n?(a==="pixels"?(ue.y=b,ue.t=O*Et,ue.b=O*St):(ue.t=ue.b=0,ue.yt=b+i*Et,ue.yb=b-i*St),s==="pixels"?(ue.x=x,ue.l=Je*de,ue.r=Je*ht):(ue.l=Zt*de,ue.r=Zt*ht,ue.xl=x-o*de,ue.xr=x+o*ht)):(a==="pixels"?(ue.x=x,ue.l=O*de,ue.r=O*ht):(ue.l=ue.r=0,ue.xl=x+i*de,ue.xr=x-i*ht),s==="pixels"?(ue.y=1-b,ue.t=Je*Et,ue.b=Je*St):(ue.t=Zt*Et,ue.b=Zt*St,ue.yt=b-o*Et,ue.yb=b+o*St));var qr=t.y<.5?"b":"t",Lr=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var vr={r:E.width-Kt-Ot,l:Kt+ue.r,b:E.height-ir-De,t:ir+ue.b};k&&y?zI.autoMargin(r,t._id,ue):k?r._fullLayout._reservedMargin[t._id][qr]=vr[qr]:y||n?r._fullLayout._reservedMargin[t._id][Lr]=vr[Lr]:r._fullLayout._reservedMargin[t._id][qr]=vr[qr]}return O0.syncOrAsync([zI.previousPromises,xt,Ct,_t,zI.previousPromises,jt],r)}function Nmt(e,t,r){var n=t.orientation==="v",i=r._fullLayout,a=i._size,o,s,u;LI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),xV(e)},moveFn:function(l,f){e.attr("transform",o+Uy(l,f)),s=LI.align((n?t._uFrac:t._vFrac)+l/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),u=LI.align((n?t._vFrac:1-t._uFrac)-f/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var c=LI.getCursor(s,u,t.xanchor,t.yanchor);xV(e,c)},doneFn:function(){if(xV(e),s!==void 0&&u!==void 0){var l={};l[t._propPrefix+"x"]=s,l[t._propPrefix+"y"]=u,t._traceIndex!==void 0?Sme.call("_guiRestyle",r,l,t._traceIndex):Sme.call("_guiRelayout",r,l)}}})}function Umt(e,t,r){var n=t._levels,i=[],a=[],o,s,u=n.end+n.size/100,l=n.size,f=1.001*r[0]-.001*r[1],c=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*l,!(l>0?o>=u:o<=u));s++)o>f&&o<c&&i.push(o);if(t._fillgradient)a=[0];else if(typeof t._fillcolor=="function"){var h=t._filllevels;if(h)for(u=h.end+h.size/100,l=h.size,s=0;s<1e5&&(o=h.start+s*l,!(l>0?o>=u:o<=u));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 Vmt(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},u={letter:o,font:n.font,noAutotickangles:o==="y",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:n.calendar};function l(f,c){return O0.coerce(a,s,Fmt,f,c)}return Dmt(a,s,l,u,n),Rmt(a,s,l,u),s}Lme.exports={draw:qmt}});var Ime=Se((Esr,Pme)=>{"use strict";Pme.exports={moduleType:"component",name:"colorbar",attributes:YL(),supplyDefaults:DO(),draw:zme().draw,hasColorbar:EO()}});var Rme=Se((ksr,Dme)=>{"use strict";Dme.exports={moduleType:"component",name:"legend",layoutAttributes:kN(),supplyLayoutDefaults:zN(),draw:HN(),style:ON()}});var qme=Se((Csr,Fme)=>{"use strict";Fme.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 Ome=Se((Lsr,Bme)=>{"use strict";Bme.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var AV=Se((zsr,Hme)=>{"use strict";var Hmt=Ul(),Vme=Zr(),TV=Vme.extendFlat,Nme=Vme.extendDeep;function Ume(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 Gmt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}Hme.exports=function(t,r){var n,i=t.data,a=t.layout,o=Nme([],i),s=Nme({},a,Ume(r.tileClass)),u=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 l=Object.keys(s);for(n=0;n<l.length;n++)Gmt(l[n])&&(s[l[n]].title={text:""});for(n=0;n<o.length;n++){var f=o[n];f.showscale=!1,f.marker&&(f.marker.showscale=!1),Hmt.traceIs(f,"pie-like")&&(f.textposition="none")}}if(Array.isArray(r.annotations))for(n=0;n<r.annotations.length;n++)s.annotations.push(r.annotations[n]);var c=Object.keys(s).filter(function(b){return b.match(/^scene\d*$/)});if(c.length){var h={};for(r.tileClass==="thumbnail"&&(h={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),n=0;n<c.length;n++){var d=s[c[n]];d.xaxis||(d.xaxis={}),d.yaxis||(d.yaxis={}),d.zaxis||(d.zaxis={}),TV(d.xaxis,h),TV(d.yaxis,h),TV(d.zaxis,h),d._scene=null}}var p=document.createElement("div");r.tileClass&&(p.className=r.tileClass);var x={gd:p,td:p,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:u.mapboxAccessToken}};return r.setBackground!=="transparent"&&(x.config.setBackground=r.setBackground||"opaque"),x.gd.defaultLayout=Ume(r.tileClass),x}});var jme=Se((Psr,Wme)=>{"use strict";var Wmt=pb().EventEmitter,jmt=Ul(),Zmt=Zr(),Gme=Lg(),Xmt=AV(),Ymt=BP(),Kmt=OP();function Jmt(e,t){var r=new Wmt,n=Xmt(e,{format:"png"}),i=n.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function a(){var s=Gme.getDelay(i._fullLayout);setTimeout(function(){var u=Ymt(i),l=document.createElement("canvas");l.id=Zmt.randstr(),r=Kmt({format:t.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:l,emitter:r,svg:u}),r.clean=function(){i&&document.body.removeChild(i)}},s)}var o=Gme.getRedrawFunc(i);return jmt.call("_doPlot",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}Wme.exports=Jmt});var Yme=Se((Isr,Xme)=>{"use strict";var Zme=Lg(),$mt={getDelay:Zme.getDelay,getRedrawFunc:Zme.getRedrawFunc,clone:AV(),toSVG:BP(),svgToImg:OP(),toImage:jme(),downloadImage:aU()};Xme.exports=$mt});var Jme=Se(Dg=>{"use strict";Dg.version=QC().version;cee();ene();var Qmt=Ul(),u4=Dg.register=Qmt.register,MV=_de(),Kme=Object.keys(MV);for(PI=0;PI<Kme.length;PI++)_T=Kme[PI],_T.charAt(0)!=="_"&&(Dg[_T]=MV[_T]),u4({moduleType:"apiMethod",name:_T,fn:MV[_T]});var _T,PI;u4(dve());u4([Bve(),Jve(),nh(),v0e(),k0e(),K0e(),yye(),Rye(),Qye(),pV(),wme(),fc(),Ime(),Rme(),jc(),p7()]);u4([qme(),Ome()]);window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(u4(window.PlotlyLocales),delete window.PlotlyLocales);Dg.Icons=Nz();var II=jc(),SV=Ac();Dg.Plots={resize:SV.resize,graphJson:SV.graphJson,sendDataToCloud:SV.sendDataToCloud};Dg.Fx={hover:II.hover,unhover:II.unhover,loneHover:II.loneHover,loneUnhover:II.loneUnhover};Dg.Snapshot=Yme();Dg.PlotSchema=_3()});var Qme=Se((Rsr,$me)=>{"use strict";$me.exports=Jme()});var Qb=Se((Fsr,ege)=>{"use strict";ege.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var Lm=Se((qsr,nge)=>{"use strict";var ah=Zc(),tge=Gc().axisHoverFormat,egt=Du().hovertemplateAttrs,tgt=Du().texttemplateAttrs,ige=Xf(),rgt=uc(),rge=Qb(),igt=Id().pattern,e2=vu().extendFlat,EV=rgt({editType:"calc",arrayOk:!0,colorEditType:"style"}),ngt=ah.marker,agt=ngt.line,ogt=e2({},agt.width,{dflt:0}),sgt=e2({width:ogt,editType:"calc"},ige("marker.line")),lgt=e2({line:sgt,editType:"calc"},ige("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:igt,cornerradius:{valType:"any",editType:"calc"}});nge.exports={x:ah.x,x0:ah.x0,dx:ah.dx,y:ah.y,y0:ah.y0,dy:ah.dy,xperiod:ah.xperiod,yperiod:ah.yperiod,xperiod0:ah.xperiod0,yperiod0:ah.yperiod0,xperiodalignment:ah.xperiodalignment,yperiodalignment:ah.yperiodalignment,xhoverformat:tge("x"),yhoverformat:tge("y"),text:ah.text,texttemplate:tgt({editType:"plot"},{keys:rge.eventDataKeys}),hovertext:ah.hovertext,hovertemplate:egt({},{keys:rge.eventDataKeys}),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:e2({},EV,{}),insidetextfont:e2({},EV,{}),outsidetextfont:e2({},EV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:e2({},ah.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:lgt,offsetgroup:ah.offsetgroup,alignmentgroup:ah.alignmentgroup,selected:{marker:{opacity:ah.selected.marker.opacity,color:ah.selected.marker.color,editType:"style"},textfont:ah.selected.textfont,editType:"style"},unselected:{marker:{opacity:ah.unselected.marker.opacity,color:ah.unselected.marker.color,editType:"style"},textfont:ah.unselected.textfont,editType:"style"},zorder:ah.zorder}});var DI=Se((Bsr,age)=>{"use strict";age.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 RI=Se((Osr,lge)=>{"use strict";var ugt=Pl(),oge=Dp().hasColorscale,sge=ed(),fgt=Zr().coercePattern;lge.exports=function(t,r,n,i,a){var o=n("marker.color",i),s=oge(t,"marker");s&&sge(t,r,a,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",ugt.defaultLine),oge(t,"marker.line")&&sge(t,r,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),fgt(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var r0=Se((Nsr,pge)=>{"use strict";var uge=_u(),xT=Zr(),fge=Pl(),cgt=Ul(),hgt=K3(),dgt=zy(),pgt=RI(),vgt=Hb(),cge=Lm(),FI=xT.coerceFont;function ygt(e,t,r,n){function i(l,f){return xT.coerce(e,t,cge,l,f)}var a=hgt(e,t,n,i);if(!a){t.visible=!1;return}dgt(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");var o=i("textposition");dge(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),pgt(e,t,i,r,n);var s=(t.marker.line||{}).color,u=cgt.getComponentMethod("errorbars","supplyDefaults");u(e,t,s||fge.defaultLine,{axis:"y"}),u(e,t,s||fge.defaultLine,{axis:"x",inherit:"y"}),xT.coerceSelectionMarkerOpacity(t,i)}function mgt(e,t){var r,n;function i(s,u){return xT.coerce(n._input,n,cge,s,u)}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=hge(o)),vgt(r,n,t,i,t.barmode)}}function hge(e){if(uge(e)){if(e=+e,e>=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&uge(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function dge(e,t,r,n,i,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,u=a.moduleHasConstrain!==!1,l=a.moduleHasCliponaxis!==!1,f=a.moduleHasTextangle!==!1,c=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(i)||i==="auto",p=d||i==="inside",x=d||i==="outside";if(p||x){var b=FI(n,"textfont",r.font),y=xT.extendFlat({},b),k=e.textfont&&e.textfont.color,E=!k;if(E&&delete y.color,FI(n,"insidetextfont",y),h){var A=xT.extendFlat({},b);E&&delete A.color,FI(n,"pathbar.textfont",A)}x&&FI(n,"outsidetextfont",b),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),u&&n("constraintext"),l&&n("cliponaxis"),f&&n("textangle"),n("texttemplate")}p&&c&&n("insidetextanchor")}pge.exports={supplyDefaults:ygt,crossTraceDefaults:mgt,handleText:dge,validateCornerradius:hge}});var kV=Se((Usr,vge)=>{"use strict";var ggt=Ul(),_gt=hu(),xgt=Zr(),bgt=DI(),wgt=r0().validateCornerradius;vge.exports=function(e,t,r){function n(x,b){return xgt.coerce(e,t,bgt,x,b)}for(var i=!1,a=!1,o=!1,s={},u=n("barmode"),l=u==="group",f=0;f<r.length;f++){var c=r[f];if(ggt.traceIs(c,"bar")&&c.visible)i=!0;else continue;var h=c.xaxis+c.yaxis;if(l?(s[h]&&(o=!0),s[h]=!0):(h+=c._input.offsetgroup,s.length>0&&!s[h]&&(o=!0),s[h]=!0),c.visible&&c.type==="histogram"){var d=_gt.getFromId({_fullLayout:t},c[c.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(a=!0)}}if(!i){delete t.barmode;return}u!=="overlay"&&n("barnorm"),n("bargap",a&&!o?0:.2),n("bargroupgap");var p=n("barcornerradius");t.barcornerradius=wgt(p)}});var f4=Se((Vsr,yge)=>{"use strict";var bT=Zr();yge.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;bT.mergeArray(r.text,t,"tx"),bT.mergeArray(r.hovertext,t,"htx");var i=r.marker;if(i){bT.mergeArray(i.opacity,t,"mo",!0),bT.mergeArray(i.color,t,"mc");var a=i.line;a&&(bT.mergeArray(a.color,t,"mlc"),bT.mergeArrayCastPositive(a.width,t,"mlw"))}}});var wge=Se((Hsr,bge)=>{"use strict";var mge=hu(),gge=Iy(),_ge=Dp().hasColorscale,xge=Rp(),Tgt=f4(),Agt=F0();bge.exports=function(t,r){var n=mge.getFromId(t,r.xaxis||"x"),i=mge.getFromId(t,r.yaxis||"y"),a,o,s,u,l,f,c={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(a=n.makeCalcdata(r,"x",c),s=i.makeCalcdata(r,"y"),u=gge(r,i,"y",s),l=!!r.yperiodalignment,f="y"):(a=i.makeCalcdata(r,"y",c),s=n.makeCalcdata(r,"x"),u=gge(r,n,"x",s),l=!!r.xperiodalignment,f="x"),o=u.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),p=0;p<h;p++)d[p]={p:o[p],s:a[p]},l&&(d[p].orig_p=s[p],d[p][f+"End"]=u.ends[p],d[p][f+"Start"]=u.starts[p]),r.ids&&(d[p].id=String(r.ids[p]));return _ge(r,"marker")&&xge(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),_ge(r,"marker.line")&&xge(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),Tgt(d,r),Agt(d,r),d}});var bp=Se((Gsr,Age)=>{"use strict";var Sgt=Nl(),Mgt=Zr();function Egt(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 u=s.transform;if(u){u.scale=a&&u.hide?0:i/u.fontSize;var l=Sgt.select(this).select("text");Mgt.setTransormAndDisplay(l,u)}})}}function kgt(e,t,r){if(r.uniformtext.mode){var n=Tge(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 Cgt(e,t){var r=Tge(e);t[r]=void 0}function Tge(e){return"_"+e+"Text_minsize"}Age.exports={recordMinTextSize:kgt,clearMinTextSize:Cgt,resizeText:Egt}});var qI=Se(t2=>{"use strict";var Lgt=_u(),zgt=cd(),Sge=Zr().isArrayOrTypedArray;t2.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};t2.coerceNumber=function(e,t,r){if(Lgt(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};t2.coerceColor=function(e,t,r){return zgt(t).isValid()?t:r!==void 0?r:e.dflt};t2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};t2.getValue=function(e,t){var r;return Sge(e)?t<e.length&&(r=e[t]):r=e,r};t2.getLineWidth=function(e,t){var r=0<t.mlw?t.mlw:Sge(e.marker.line.width)?0:e.marker.line.width;return r}});var N0=Se((jsr,Fge)=>{"use strict";var c4=Nl(),Pgt=Pl(),h4=yu(),Mge=Zr(),Ege=Ul(),kge=bp().resizeText,CV=Lm(),Igt=CV.textfont,Dgt=CV.insidetextfont,Rgt=CV.outsidetextfont,tp=qI();function Fgt(e){var t=c4.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");kge(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)&&c4.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(i){var a=c4.select(this),o=i[0].trace;Cge(a,o,e)}),Ege.getComponentMethod("errorbars","style")(t)}function Cge(e,t,r){h4.pointStyle(e.selectAll("path"),t,r),Lge(e,t,r)}function Lge(e,t,r){e.selectAll("text").each(function(n){var i=c4.select(this),a=Mge.ensureUniformFontSize(r,zge(i,n,t,r));h4.font(i,a)})}function qgt(e,t,r){var n=t[0].trace;n.selectedpoints?Bgt(r,n,e):(Cge(r,n,e),Ege.getComponentMethod("errorbars","style")(r))}function Bgt(e,t,r){h4.selectedPointStyle(e.selectAll("path"),t),Ogt(e.selectAll("text"),t,r)}function Ogt(e,t,r){e.each(function(n){var i=c4.select(this),a;if(n.selected){a=Mge.ensureUniformFontSize(r,zge(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),h4.font(i,a)}else h4.selectedTextStyle(i,t)})}function zge(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=Rge(t,r);a=Ige(r,t.i,i,o)}else e.classed("bartext-outside")&&(a=Dge(r,t.i,i));return a}function Pge(e,t,r){return LV(Igt,e.textfont,t,r)}function Ige(e,t,r,n){var i=Pge(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:Pgt.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}),LV(Dgt,e.insidetextfont,t,i)}function Dge(e,t,r){var n=Pge(e,t,r);return LV(Rgt,e.outsidetextfont,t,n)}function LV(e,t,r,n){t=t||{};var i=tp.getValue(t.family,r),a=tp.getValue(t.size,r),o=tp.getValue(t.color,r),s=tp.getValue(t.weight,r),u=tp.getValue(t.style,r),l=tp.getValue(t.variant,r),f=tp.getValue(t.textcase,r),c=tp.getValue(t.lineposition,r),h=tp.getValue(t.shadow,r);return{family:tp.coerceString(e.family,i,n.family),size:tp.coerceNumber(e.size,a,n.size),color:tp.coerceColor(e.color,o,n.color),weight:tp.coerceString(e.weight,s,n.weight),style:tp.coerceString(e.style,u,n.style),variant:tp.coerceString(e.variant,l,n.variant),textcase:tp.coerceString(e.variant,f,n.textcase),lineposition:tp.coerceString(e.variant,c,n.lineposition),shadow:tp.coerceString(e.variant,h,n.shadow)}}function Rge(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}Fge.exports={style:Fgt,styleTextPoints:Lge,styleOnSelect:qgt,getInsideTextFont:Ige,getOutsideTextFont:Dge,getBarColor:Rge,resizeText:kge}});var i2=Se((Zsr,Gge)=>{"use strict";var BI=Nl(),OI=_u(),qd=Zr(),Ngt=Bf(),Ugt=Pl(),T_=yu(),Vgt=Ul(),NI=hu().tickText,qge=bp(),Hgt=qge.recordMinTextSize,Ggt=qge.clearMinTextSize,zV=N0(),wT=qI(),Wgt=Qb(),Bge=Lm(),jgt=Bge.text,Zgt=Bge.textposition,Xgt=rv().appendArrayPointValue,Up=Wgt.TEXTPAD;function Ygt(e){return e.id}function Kgt(e){if(e.ids)return Ygt}function PV(e){return(e>0)-(e<0)}function zm(e,t){return e<t?1:-1}function Jgt(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 Oge(e,t,r,n){if(!t.uniformtext.mode&&Nge(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 Nge(e){return e&&e.duration>0}function $gt(e,t,r,n,i,a){var o=t.xaxis,s=t.yaxis,u=e._fullLayout,l=e._context.staticPlot;i||(i={mode:u.barmode,norm:u.barmode,gap:u.bargap,groupgap:u.bargroupgap},Ggt("bar",u));var f=qd.makeTraceGroups(n,r,"trace bars").each(function(c){var h=BI.select(this),d=c[0].trace,p=c[0].t,x=d.type==="waterfall",b=d.type==="funnel",y=d.type==="histogram",k=d.type==="bar",E=k||b,A=0;x&&d.connector.visible&&d.connector.mode==="between"&&(A=d.connector.line.width/2);var L=d.orientation==="h",_=Nge(i),C=qd.ensureSingle(h,"g","points"),M=Kgt(d),v=C.selectAll("g.point").data(qd.identity,M);v.enter().append("g").classed("point",!0),v.exit().remove(),v.each(function(T,F){var q=BI.select(this),U=Jgt(T,o,s,L),H=U[0][0],j=U[0][1],G=U[1][0],O=U[1][1],W=(L?j-H:O-G)===0;W&&E&&wT.getLineWidth(d,T)&&(W=!1),W||(W=!OI(H)||!OI(j)||!OI(G)||!OI(O)),T.isBlank=W,W&&(L?j=H:O=G),A&&!W&&(L?(H-=zm(H,j)*A,j+=zm(H,j)*A):(G-=zm(G,O)*A,O+=zm(G,O)*A));var re,ne;if(d.type==="waterfall"){if(!W){var be=d[T.dir].marker;re=be.line.width,ne=be.color}}else re=wT.getLineWidth(d,T),ne=T.mc||d.marker.color;function ze(Te){var nt=BI.round(re/2%1,2);return i.gap===0&&i.groupgap===0?BI.round(Math.round(Te)-nt,2):Te}function Ce(Te,nt,ut){return ut&&Te===nt?Te:Math.abs(Te-nt)>=2?ze(Te):Te>nt?Math.ceil(Te):Math.floor(Te)}var he=Ugt.opacity(ne),te=he<1||re>.01?ze:Ce;e._context.staticPlot||(H=te(H,j,L),j=te(j,H,L),G=te(G,O,!L),O=te(O,G,!L));var ke=L?o.c2p:s.c2p,Ee;T.s0>0?Ee=T._sMax:T.s0<0?Ee=T._sMin:Ee=T.s1>0?T._sMax:T._sMin;function Me(Te,nt){if(!Te)return 0;var ut=Math.abs(L?O-G:j-H),ct=Math.abs(L?j-H:O-G),rt=te(Math.abs(ke(Ee,!0)-ke(0,!0))),je=T.hasB?Math.min(ut/2,ct/2):Math.min(ut/2,rt),tt;if(nt==="%"){var Je=Math.min(50,Te);tt=ut*(Je/100)}else tt=Te;return te(Math.max(Math.min(tt,je),0))}var Oe=k||y?Me(p.cornerradiusvalue,p.cornerradiusform):0,Re,me,Be="M"+H+","+G+"V"+O+"H"+j+"V"+G+"Z",fe=0;if(Oe&&T.s){var Ze=PV(T.s0)===0||PV(T.s)===PV(T.s0)?T.s1:T.s0;if(fe=te(T.hasB?0:Math.abs(ke(Ee,!0)-ke(Ze,!0))),fe<Oe){var et=zm(H,j),gt=zm(G,O),Pt=et===-gt?1:0;if(L)if(T.hasB)Re="M"+(H+Oe*et)+","+G+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+H+","+(G+Oe*gt)+"V"+(O-Oe*gt)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(H+Oe*et)+","+O+"H"+(j-Oe*et)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+j+","+(O-Oe*gt)+"V"+(G+Oe*gt)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(j-Oe*et)+","+G+"Z";else{me=Math.abs(j-H)+fe;var Qe=me<Oe?Oe-Math.sqrt(me*(2*Oe-me)):0,Xe=fe>0?Math.sqrt(fe*(2*Oe-fe)):0,Tt=et>0?Math.max:Math.min;Re="M"+H+","+G+"V"+(O-Qe*gt)+"H"+Tt(j-(Oe-fe)*et,H)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+j+","+(O-Oe*gt-Xe)+"V"+(G+Oe*gt+Xe)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+Tt(j-(Oe-fe)*et,H)+","+(G+Qe*gt)+"Z"}else if(T.hasB)Re="M"+(H+Oe*et)+","+G+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+H+","+(G+Oe*gt)+"V"+(O-Oe*gt)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(H+Oe*et)+","+O+"H"+(j-Oe*et)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+j+","+(O-Oe*gt)+"V"+(G+Oe*gt)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(j-Oe*et)+","+G+"Z";else{me=Math.abs(O-G)+fe;var xt=me<Oe?Oe-Math.sqrt(me*(2*Oe-me)):0,_t=fe>0?Math.sqrt(fe*(2*Oe-fe)):0,Ct=gt>0?Math.max:Math.min;Re="M"+(H+xt*et)+","+G+"V"+Ct(O-(Oe-fe)*gt,G)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(H+Oe*et-_t)+","+O+"H"+(j-Oe*et+_t)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(j-xt*et)+","+Ct(O-(Oe-fe)*gt,G)+"V"+G+"Z"}}else Re=Be}else Re=Be;var jt=Oge(qd.ensureSingle(q,"path"),u,i,a);if(jt.style("vector-effect",l?"none":"non-scaling-stroke").attr("d",isNaN((j-H)*(O-G))||W&&e._context.staticPlot?"M0,0Z":Re).call(T_.setClipUrl,t.layerClipId,e),!u.uniformtext.mode&&_){var At=T_.makePointStyleFns(d);T_.singlePointStyle(T,jt,d,At,e)}Qgt(e,t,q,c,F,H,j,G,O,Oe,fe,i,a),t.layerClipId&&T_.hideOutsideRangePoint(T,q.select("text"),o,s,d.xcalendar,d.ycalendar)});var z=d.cliponaxis===!1;T_.setClipUrl(h,z?null:t.layerClipId,e)});Vgt.getComponentMethod("errorbars","plot")(e,f,t,i)}function Qgt(e,t,r,n,i,a,o,s,u,l,f,c,h){var d=t.xaxis,p=t.yaxis,x=e._fullLayout,b;function y(me,Be,fe){var Ze=qd.ensureSingle(me,"text").text(Be).attr({class:"bartext bartext-"+b,"text-anchor":"middle","data-notex":1}).call(T_.font,fe).call(Ngt.convertToTspans,e);return Ze}var k=n[0].trace,E=k.orientation==="h",A=r1t(x,n,i,d,p);b=i1t(k,i);var L=c.mode==="stack"||c.mode==="relative",_=n[i],C=!L||_._outmost,M=_.hasB,v=l&&l-f>Up;if(!A||b==="none"||(_.isBlank||a===o||s===u)&&(b==="auto"||b==="inside")){r.select("text").remove();return}var z=x.font,T=zV.getBarColor(n[i],k),F=zV.getInsideTextFont(k,i,z,T),q=zV.getOutsideTextFont(k,i,z),U=k.insidetextanchor||"end",H=r.datum();E?d.type==="log"&&H.s0<=0&&(d.range[0]<d.range[1]?a=0:a=d._length):p.type==="log"&&H.s0<=0&&(p.range[0]<p.range[1]?s=p._length:s=0);var j=Math.abs(o-a),G=Math.abs(u-s),O=j-2*Up,W=G-2*Up,re,ne,be,ze,Ce;if(b==="outside"&&!C&&!_.hasB&&(b="inside"),b==="auto")if(C){b="inside",Ce=qd.ensureUniformFontSize(e,F),re=y(r,A,Ce),ne=T_.bBox(re.node()),be=ne.width,ze=ne.height;var he=be>0&&ze>0,te;v?M?te=r2(O-2*l,W,be,ze,E)||r2(O,W-2*l,be,ze,E):E?te=r2(O-(l-f),W,be,ze,E)||r2(O,W-2*(l-f),be,ze,E):te=r2(O,W-(l-f),be,ze,E)||r2(O-2*(l-f),W,be,ze,E):te=r2(O,W,be,ze,E),he&&te?b="inside":(b="outside",re.remove(),re=null)}else b="inside";if(!re){Ce=qd.ensureUniformFontSize(e,b==="outside"?q:F),re=y(r,A,Ce);var ke=re.attr("transform");if(re.attr("transform",""),ne=T_.bBox(re.node()),be=ne.width,ze=ne.height,re.attr("transform",ke),be<=0||ze<=0){re.remove();return}}var Ee=k.textangle,Me,Oe;b==="outside"?(Oe=k.constraintext==="both"||k.constraintext==="outside",Me=t1t(a,o,s,u,ne,{isHorizontal:E,constrained:Oe,angle:Ee})):(Oe=k.constraintext==="both"||k.constraintext==="inside",Me=Hge(a,o,s,u,ne,{isHorizontal:E,constrained:Oe,angle:Ee,anchor:U,hasB:M,r:l,overhead:f})),Me.fontSize=Ce.size,Hgt(k.type==="histogram"?"bar":k.type,Me,x),_.transform=Me;var Re=Oge(re,x,c,h);qd.setTransormAndDisplay(Re,Me)}function r2(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 Uge(e){return e==="auto"?0:e}function Vge(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 Hge(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,u=a.angle||0,l=a.anchor,f=l==="end",c=l==="start",h=a.leftToRight||0,d=(h+1)/2,p=1-d,x=a.hasB,b=a.r,y=a.overhead,k=i.width,E=i.height,A=Math.abs(t-e),L=Math.abs(n-r),_=A>2*Up&&L>2*Up?Up:0;A-=2*_,L-=2*_;var C=Uge(u);u==="auto"&&!(k<=A&&E<=L)&&(k>A||E>L)&&(!(k>L||E>A)||k<E!=A<L)&&(C+=90);var M=Vge(i,C),v,z;if(b&&b-y>Up){var T=e1t(e,t,r,n,M,b,y,o,x);v=T.scale,z=T.pad}else v=1,s&&(v=Math.min(1,A/M.x,L/M.y)),z=0;var F=i.left*p+i.right*d,q=(i.top+i.bottom)/2,U=(e+Up)*p+(t-Up)*d,H=(r+n)/2,j=0,G=0;if(c||f){var O=(o?M.x:M.y)/2;b&&(f||x)&&(_+=z);var W=o?zm(e,t):zm(r,n);o?c?(U=e+W*_,j=-W*O):(U=t-W*_,j=W*O):c?(H=r+W*_,G=-W*O):(H=n-W*_,G=W*O)}return{textX:F,textY:q,targetX:U,targetY:H,anchorX:j,anchorY:G,scale:v,rotate:C}}function e1t(e,t,r,n,i,a,o,s,u){var l=Math.max(0,Math.abs(t-e)-2*Up),f=Math.max(0,Math.abs(n-r)-2*Up),c=a-Up,h=o?c-Math.sqrt(c*c-(c-o)*(c-o)):c,d=u?c*2:s?c-o:2*h,p=u?c*2:s?2*h:c-o,x,b,y,k,E;return i.y/i.x>=f/(l-d)?k=f/i.y:i.y/i.x<=(f-p)/l?k=l/i.x:!u&&s?(x=i.x*i.x+i.y*i.y/4,b=-2*i.x*(l-c)-i.y*(f/2-c),y=(l-c)*(l-c)+(f/2-c)*(f/2-c)-c*c,k=(-b+Math.sqrt(b*b-4*x*y))/(2*x)):u?(x=(i.x*i.x+i.y*i.y)/4,b=-i.x*(l/2-c)-i.y*(f/2-c),y=(l/2-c)*(l/2-c)+(f/2-c)*(f/2-c)-c*c,k=(-b+Math.sqrt(b*b-4*x*y))/(2*x)):(x=i.x*i.x/4+i.y*i.y,b=-i.x*(l/2-c)-2*i.y*(f-c),y=(l/2-c)*(l/2-c)+(f-c)*(f-c)-c*c,k=(-b+Math.sqrt(b*b-4*x*y))/(2*x)),k=Math.min(1,k),s?E=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(f-i.y*k)/2)*(c-(f-i.y*k)/2)))-o):E=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(l-i.x*k)/2)*(c-(l-i.x*k)/2)))-o),{scale:k,pad:E}}function t1t(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,u=a.angle||0,l=i.width,f=i.height,c=Math.abs(t-e),h=Math.abs(n-r),d;o?d=h>2*Up?Up:0:d=c>2*Up?Up:0;var p=1;s&&(p=o?Math.min(1,h/f):Math.min(1,c/l));var x=Uge(u),b=Vge(i,x),y=(o?b.x:b.y)/2,k=(i.left+i.right)/2,E=(i.top+i.bottom)/2,A=(e+t)/2,L=(r+n)/2,_=0,C=0,M=o?zm(t,e):zm(r,n);return o?(A=t-M*d,_=M*y):(L=n+M*d,C=-M*y),{textX:k,textY:E,targetX:A,targetY:L,anchorX:_,anchorY:C,scale:p,rotate:x}}function r1t(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=n1t(e,t,r,n,i):a.textinfo?s=a1t(t,r,n,i):s=wT.getValue(a.text,r),wT.coerceString(jgt,s)}function i1t(e,t){var r=wT.getValue(e.textposition,t);return wT.coerceEnumerated(Zgt,r)}function n1t(e,t,r,n,i){var a=t[0].trace,o=qd.castOption(a,r,"texttemplate");if(!o)return"";var s=a.type==="histogram",u=a.type==="waterfall",l=a.type==="funnel",f=a.orientation==="h",c,h,d,p;f?(c="y",h=i,d="x",p=n):(c="x",h=n,d="y",p=i);function x(_){return NI(h,h.c2l(_),!0).text}function b(_){return NI(p,p.c2l(_),!0).text}var y=t[r],k={};k.label=y.p,k.labelLabel=k[c+"Label"]=x(y.p);var E=qd.castOption(a,y.i,"text");(E===0||E)&&(k.text=E),k.value=y.s,k.valueLabel=k[d+"Label"]=b(y.s);var A={};Xgt(A,a,y.i),(s||A.x===void 0)&&(A.x=f?k.value:k.label),(s||A.y===void 0)&&(A.y=f?k.label:k.value),(s||A.xLabel===void 0)&&(A.xLabel=f?k.valueLabel:k.labelLabel),(s||A.yLabel===void 0)&&(A.yLabel=f?k.labelLabel:k.valueLabel),u&&(k.delta=+y.rawS||y.s,k.deltaLabel=b(k.delta),k.final=y.v,k.finalLabel=b(k.final),k.initial=k.final-k.delta,k.initialLabel=b(k.initial)),l&&(k.value=y.s,k.valueLabel=b(k.value),k.percentInitial=y.begR,k.percentInitialLabel=qd.formatPercent(y.begR),k.percentPrevious=y.difR,k.percentPreviousLabel=qd.formatPercent(y.difR),k.percentTotal=y.sumR,k.percenTotalLabel=qd.formatPercent(y.sumR));var L=qd.castOption(a,y.i,"customdata");return L&&(k.customdata=L),qd.texttemplateString(o,k,e._d3locale,A,k,a._meta||{})}function a1t(e,t,r,n){var i=e[0].trace,a=i.orientation==="h",o=i.type==="waterfall",s=i.type==="funnel";function u(L){var _=a?n:r;return NI(_,L,!0).text}function l(L){var _=a?r:n;return NI(_,+L,!0).text}var f=i.textinfo,c=e[t],h=f.split("+"),d=[],p,x=function(L){return h.indexOf(L)!==-1};if(x("label")&&d.push(u(e[t].p)),x("text")&&(p=qd.castOption(i,c.i,"text"),(p===0||p)&&d.push(p)),o){var b=+c.rawS||c.s,y=c.v,k=y-b;x("initial")&&d.push(l(k)),x("delta")&&d.push(l(b)),x("final")&&d.push(l(y))}if(s){x("value")&&d.push(l(c.s));var E=0;x("percent initial")&&E++,x("percent previous")&&E++,x("percent total")&&E++;var A=E>1;x("percent initial")&&(p=qd.formatPercent(c.begR),A&&(p+=" of initial"),d.push(p)),x("percent previous")&&(p=qd.formatPercent(c.difR),A&&(p+=" of previous"),d.push(p)),x("percent total")&&(p=qd.formatPercent(c.sumR),A&&(p+=" of total"),d.push(p))}return d.join("<br>")}Gge.exports={plot:$gt,toMoveInsideBar:Hge}});var TT=Se((Xsr,Xge)=>{"use strict";var d4=jc(),o1t=Ul(),Wge=Pl(),s1t=Zr().fillText,l1t=qI().getLineWidth,IV=hu().hoverLabelText,u1t=ju().BADNUM;function f1t(e,t,r,n,i){var a=jge(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,u=o[a.index];return a.color=Zge(s,u),o1t.getComponentMethod("errorbars","hoverInfo")(u,s,a),[a]}}function jge(e,t,r,n,i){var a=e.cd,o=a[0].trace,s=a[0].t,u=n==="closest",l=o.type==="waterfall",f=e.maxHoverDistance,c=e.maxSpikeDistance,h,d,p,x,b,y,k;o.orientation==="h"?(h=r,d=t,p="y",x="x",b=H,y=F):(h=t,d=r,p="x",x="y",y=H,b=F);var E=o[p+"period"],A=u||E;function L(te){return C(te,-1)}function _(te){return C(te,1)}function C(te,ke){var Ee=te.w;return te[p]+ke*Ee/2}function M(te){return te[p+"End"]-te[p+"Start"]}var v=u?L:E?function(te){return te.p-M(te)/2}:function(te){return Math.min(L(te),te.p-s.bardelta/2)},z=u?_:E?function(te){return te.p+M(te)/2}:function(te){return Math.max(_(te),te.p+s.bardelta/2)};function T(te,ke,Ee){return i.finiteRange&&(Ee=0),d4.inbox(te-h,ke-h,Ee+Math.min(1,Math.abs(ke-te)/k)-1)}function F(te){return T(v(te),z(te),f)}function q(te){return T(L(te),_(te),c)}function U(te){var ke=te[x];if(l){var Ee=Math.abs(te.rawS)||0;d>0?ke+=Ee:d<0&&(ke-=Ee)}return ke}function H(te){var ke=d,Ee=te.b,Me=U(te);return d4.inbox(Ee-ke,Me-ke,f+(Me-ke)/(Me-Ee)-1)}function j(te){var ke=d,Ee=te.b,Me=U(te);return d4.inbox(Ee-ke,Me-ke,c+(Me-ke)/(Me-Ee)-1)}var G=e[p+"a"],O=e[x+"a"];k=Math.abs(G.r2c(G.range[1])-G.r2c(G.range[0]));function W(te){return(b(te)+y(te))/2}var re=d4.getDistanceFunction(n,b,y,W);if(d4.getClosest(a,re,e),e.index!==!1&&a[e.index].p!==u1t){A||(v=function(te){return Math.min(L(te),te.p-s.bargroupwidth/2)},z=function(te){return Math.max(_(te),te.p+s.bargroupwidth/2)});var ne=e.index,be=a[ne],ze=o.base?be.b+be.s:be.s;e[x+"0"]=e[x+"1"]=O.c2p(be[x],!0),e[x+"LabelVal"]=ze;var Ce=s.extents[s.extents.round(be.p)];e[p+"0"]=G.c2p(u?v(be):Ce[0],!0),e[p+"1"]=G.c2p(u?z(be):Ce[1],!0);var he=be.orig_p!==void 0;return e[p+"LabelVal"]=he?be.orig_p:be.p,e.labelLabel=IV(G,e[p+"LabelVal"],o[p+"hoverformat"]),e.valueLabel=IV(O,e[x+"LabelVal"],o[x+"hoverformat"]),e.baseLabel=IV(O,be.b,o[x+"hoverformat"]),e.spikeDistance=(j(be)+q(be))/2,e[p+"Spike"]=G.c2p(be.p,!0),s1t(be,o,e),e.hovertemplate=o.hovertemplate,e}}function Zge(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=l1t(e,t);if(Wge.opacity(r))return r;if(Wge.opacity(n)&&i)return n}Xge.exports={hoverPoints:f1t,hoverOnBars:jge,getTraceColor:Zge}});var Kge=Se((Ysr,Yge)=>{"use strict";Yge.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 AT=Se((Ksr,Jge)=>{"use strict";Jge.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=n[0].trace,s=o.type==="funnel",u=o.orientation==="h",l=[],f;if(r===!1)for(f=0;f<n.length;f++)n[f].selected=0;else for(f=0;f<n.length;f++){var c=n[f],h="ct"in c?c.ct:c1t(c,i,a,u,s);r.contains(h,!1,f,t)?(l.push({pointNumber:f,x:i.c2d(c.x),y:a.c2d(c.y)}),c.selected=1):c.selected=0}return l};function c1t(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),u=r.c2p(n?e.p1:e.s1,!0);return i?[(a+o)/2,(s+u)/2]:n?[o,(s+u)/2]:[(a+o)/2,u]}});var Qge=Se((Jsr,$ge)=>{"use strict";$ge.exports={attributes:Lm(),layoutAttributes:DI(),supplyDefaults:r0().supplyDefaults,crossTraceDefaults:r0().crossTraceDefaults,supplyLayoutDefaults:kV(),calc:wge(),crossTraceCalc:Gb().crossTraceCalc,colorbar:ep(),arraysToCalcdata:f4(),plot:i2().plot,style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:TT().hoverPoints,eventData:Kge(),selectPoints:AT(),moduleType:"trace",name:"bar",basePlotModule:Th(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var t1e=Se(($sr,e1e)=>{"use strict";e1e.exports=Qge()});var p4=Se((Qsr,a1e)=>{"use strict";var h1t=Ey(),U0=Zc(),r1e=Lm(),d1t=Ih(),i1e=Gc().axisHoverFormat,p1t=Du().hovertemplateAttrs,Rg=vu().extendFlat,ST=U0.marker,n1e=ST.line;a1e.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:U0.xperiod,yperiod:U0.yperiod,xperiod0:U0.xperiod0,yperiod0:U0.yperiod0,xperiodalignment:U0.xperiodalignment,yperiodalignment:U0.yperiodalignment,xhoverformat:i1e("x"),yhoverformat:i1e("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:Rg({},ST.symbol,{arrayOk:!1,editType:"plot"}),opacity:Rg({},ST.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:Rg({},ST.angle,{arrayOk:!1,editType:"calc"}),size:Rg({},ST.size,{arrayOk:!1,editType:"calc"}),color:Rg({},ST.color,{arrayOk:!1,editType:"style"}),line:{color:Rg({},n1e.color,{arrayOk:!1,dflt:d1t.defaultLine,editType:"style"}),width:Rg({},n1e.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:h1t(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:r1e.offsetgroup,alignmentgroup:r1e.alignmentgroup,selected:{marker:U0.selected.marker,editType:"style"},unselected:{marker:U0.unselected.marker,editType:"style"},text:Rg({},U0.text,{}),hovertext:Rg({},U0.hovertext,{}),hovertemplate:p1t({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:U0.zorder}});var v4=Se((elr,o1e)=>{"use strict";o1e.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 m4=Se((tlr,f1e)=>{"use strict";var V0=Zr(),v1t=Ul(),y1t=Pl(),m1t=zy(),g1t=Hb(),s1e=L3(),y4=p4();function _1t(e,t,r,n){function i(p,x){return V0.coerce(e,t,y4,p,x)}if(l1e(e,t,i,n),t.visible!==!1){m1t(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",y1t.addOpacity(t.line.color,.5));var o=!1;if(a){var s=i("mean"),u=i("sd");s&&s.length&&(o=!0,u&&u.length&&(o="sd"))}i("whiskerwidth");var l=i("sizemode"),f;l==="quartiles"&&(f=i("boxmean",o)),i("showwhiskers",l==="quartiles"),(l==="sd"||f==="sd")&&i("sdmultiple"),i("width"),i("quartilemethod");var c=!1;if(a){var h=i("notchspan");h&&h.length&&(c=!0)}else V0.validate(e.notchwidth,y4.notchwidth)&&(c=!0);var d=i("notched",c);d&&i("notchwidth"),u1e(e,t,i,{prefix:"box"}),i("zorder")}}function l1e(e,t,r,n){function i(z){var T=0;return z&&z.length&&(T+=1,V0.isArrayOrTypedArray(z[0])&&z[0].length&&(T+=1)),T}function a(z){return V0.validate(e[z],y4[z])}var o=r("y"),s=r("x"),u;if(t.type==="box"){var l=r("q1"),f=r("median"),c=r("q3");t._hasPreCompStats=l&&l.length&&f&&f.length&&c&&c.length,u=Math.min(V0.minRowLength(l),V0.minRowLength(f),V0.minRowLength(c))}var h=i(o),d=i(s),p=h&&V0.minRowLength(o),x=d&&V0.minRowLength(s),b=n.calendar,y={autotypenumbers:n.autotypenumbers},k,E;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var A=a("x0")||a("dx"),L=a("y0")||a("dy");L&&!A?k="h":k="v",E=u;break;case"10":k="v",E=Math.min(u,x);break;case"20":k="h",E=Math.min(u,s.length);break;case"01":k="h",E=Math.min(u,p);break;case"02":k="v",E=Math.min(u,o.length);break;case"12":k="v",E=Math.min(u,x,o.length);break;case"21":k="h",E=Math.min(u,s.length,p);break;case"11":E=0;break;case"22":var _=!1,C;for(C=0;C<s.length;C++)if(s1e(s[C],b,y)==="category"){_=!0;break}if(_)k="v",E=Math.min(u,x,o.length);else{for(C=0;C<o.length;C++)if(s1e(o[C],b,y)==="category"){_=!0;break}_?(k="h",E=Math.min(u,s.length,p)):(k="v",E=Math.min(u,x,o.length))}break}else h>0?(k="v",d>0?E=Math.min(x,p):E=Math.min(p)):d>0?(k="h",E=Math.min(x)):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 v=v1t.getComponentMethod("calendars","handleTraceDefaults");v(e,t,["x","y"],n)}function u1e(e,t,r,n){var i=n.prefix,a=V0.coerce2(e,t,y4,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(a||o)&&(s="suspectedoutliers");var u=r(i+"points",s);u?(r("jitter",u==="all"?.3:0),r("pointpos",u==="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"),u==="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 l=r("hoveron");(l==="all"||l.indexOf("points")!==-1)&&r("hovertemplate"),V0.coerceSelectionMarkerOpacity(t,r)}function x1t(e,t){var r,n;function i(u){return V0.coerce(n._input,n,y4,u)}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"&&g1t(r,n,t,i,s)}}}f1e.exports={supplyDefaults:_1t,crossTraceDefaults:x1t,handleSampleDefaults:l1e,handlePointsDefaults:u1e}});var UI=Se((rlr,h1e)=>{"use strict";var b1t=Ul(),w1t=Zr(),T1t=v4();function c1e(e,t,r,n,i){for(var a=i+"Layout",o=!1,s=0;s<r.length;s++){var u=r[s];if(b1t.traceIs(u,a)){o=!0;break}}o&&(n(i+"mode"),n(i+"gap"),n(i+"groupgap"))}function A1t(e,t,r){function n(i,a){return w1t.coerce(e,t,T1t,i,a)}c1e(e,t,r,n,"box")}h1e.exports={supplyLayoutDefaults:A1t,_supply:c1e}});var FV=Se((ilr,b1e)=>{"use strict";var RV=_u(),VI=hu(),S1t=Iy(),Ah=Zr(),i0=ju().BADNUM,Fg=Ah._;b1e.exports=function(t,r){var n=t._fullLayout,i=VI.getFromId(t,r.xaxis||"x"),a=VI.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",u,l,f,c,h,d,p;r.orientation==="h"?(f=i,c="x",h=a,d="y",p=!!r.yperiodalignment):(f=a,c="y",h=i,d="x",p=!!r.xperiodalignment);var x=M1t(r,d,h,n[s]),b=x[0],y=x[1],k=Ah.distinctVals(b,h),E=k.vals,A=k.minDiff/2,L,_,C,M,v,z,T=(r.boxpoints||r.points)==="all"?Ah.identity:function(Pt){return Pt.v<L.lf||Pt.v>L.uf};if(r._hasPreCompStats){var F=r[c],q=function(Pt){return f.d2c((r[Pt]||[])[u])},U=1/0,H=-1/0;for(u=0;u<r._length;u++){var j=b[u];if(RV(j)){if(L={},L.pos=L[d]=j,p&&y&&(L.orig_p=y[u]),L.q1=q("q1"),L.med=q("median"),L.q3=q("q3"),_=[],F&&Ah.isArrayOrTypedArray(F[u]))for(l=0;l<F[u].length;l++)z=f.d2c(F[u][l]),z!==i0&&(v={v:z,i:[u,l]},d1e(v,r,[u,l]),_.push(v));if(L.pts=_.sort(p1e),C=L[c]=_.map(v1e),M=C.length,L.med!==i0&&L.q1!==i0&&L.q3!==i0&&L.med>=L.q1&&L.q3>=L.med){var G=q("lowerfence");L.lf=G!==i0&&G<=L.q1?G:y1e(L,C,M);var O=q("upperfence");L.uf=O!==i0&&O>=L.q3?O:m1e(L,C,M);var W=q("mean");L.mean=W!==i0?W:M?Ah.mean(C,M):(L.q1+L.q3)/2;var re=q("sd");L.sd=W!==i0&&re>=0?re:M?Ah.stdev(C,M,L.mean):L.q3-L.q1,L.lo=g1e(L),L.uo=_1e(L);var ne=q("notchspan");ne=ne!==i0&&ne>0?ne:x1e(L,M),L.ln=L.med-ne,L.un=L.med+ne;var be=L.lf,ze=L.uf;r.boxpoints&&C.length&&(be=Math.min(be,C[0]),ze=Math.max(ze,C[M-1])),r.notched&&(be=Math.min(be,L.ln),ze=Math.max(ze,L.un)),L.min=be,L.max=ze}else{Ah.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(`
`));var Ce;L.med!==i0?Ce=L.med:L.q1!==i0?L.q3!==i0?Ce=(L.q1+L.q3)/2:Ce=L.q1:L.q3!==i0?Ce=L.q3:Ce=0,L.med=Ce,L.q1=L.q3=Ce,L.lf=L.uf=Ce,L.mean=L.sd=Ce,L.ln=L.un=Ce,L.min=L.max=Ce}U=Math.min(U,L.min),H=Math.max(H,L.max),L.pts2=_.filter(T),o.push(L)}}r._extremes[f._id]=VI.findExtremes(f,[U,H],{padded:!0})}else{var he=f.makeCalcdata(r,c),te=E1t(E,A),ke=E.length,Ee=k1t(ke);for(u=0;u<r._length;u++)if(z=he[u],!!RV(z)){var Me=Ah.findBin(b[u],te);Me>=0&&Me<ke&&(v={v:z,i:u},d1e(v,r,u),Ee[Me].push(v))}var Oe=1/0,Re=-1/0,me=r.quartilemethod,Be=me==="exclusive",fe=me==="inclusive";for(u=0;u<ke;u++)if(Ee[u].length>0){if(L={},L.pos=L[d]=E[u],_=L.pts=Ee[u].sort(p1e),C=L[c]=_.map(v1e),M=C.length,L.min=C[0],L.max=C[M-1],L.mean=Ah.mean(C,M),L.sd=Ah.stdev(C,M,L.mean)*r.sdmultiple,L.med=Ah.interp(C,.5),M%2&&(Be||fe)){var Ze,et;Be?(Ze=C.slice(0,M/2),et=C.slice(M/2+1)):fe&&(Ze=C.slice(0,M/2+1),et=C.slice(M/2)),L.q1=Ah.interp(Ze,.5),L.q3=Ah.interp(et,.5)}else L.q1=Ah.interp(C,.25),L.q3=Ah.interp(C,.75);L.lf=y1e(L,C,M),L.uf=m1e(L,C,M),L.lo=g1e(L),L.uo=_1e(L);var gt=x1e(L,M);L.ln=L.med-gt,L.un=L.med+gt,Oe=Math.min(Oe,L.ln),Re=Math.max(Re,L.un),L.pts2=_.filter(T),o.push(L)}r.notched&&Ah.isTypedArray(he)&&(he=Array.from(he)),r._extremes[f._id]=VI.findExtremes(f,r.notched?he.concat([Oe,Re]):he,{padded:!0})}return C1t(o,r),o.length>0?(o[0].t={num:n[s],dPos:A,posLetter:d,valLetter:c,labels:{med:Fg(t,"median:"),min:Fg(t,"min:"),q1:Fg(t,"q1:"),q3:Fg(t,"q3:"),max:Fg(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Fg(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Fg(t,"mean:"),lf:Fg(t,"lower fence:"),uf:Fg(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function M1t(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),u=S1t(e,r,t,s).vals;return[u,s]}var l;a?l=e[t+"0"]:"name"in e&&(r.type==="category"||RV(e.name)&&["linear","log"].indexOf(r.type)!==-1||Ah.isDateTime(e.name)&&r.type==="date")?l=e.name:l=n;for(var f=r.type==="multicategory"?r.r2c_just_indices(l):r.d2c(l,0,e[t+"calendar"]),c=e._length,h=new Array(c),d=0;d<c;d++)h[d]=f;return[h]}function E1t(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 k1t(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=[];return t}var DV={text:"tx",hovertext:"htx"};function d1e(e,t,r){for(var n in DV)Ah.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?Ah.isArrayOrTypedArray(t[n][r[0]])&&(e[DV[n]]=t[n][r[0]][r[1]]):e[DV[n]]=t[n][r])}function C1t(e,t){if(Ah.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;Ah.tagSelected(n,t,i)}}function p1e(e,t){return e.v-t.v}function v1e(e){return e.v}function y1e(e,t,r){return r===0?e.q1:Math.min(e.q1,t[Math.min(Ah.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function m1e(e,t,r){return r===0?e.q3:Math.max(e.q3,t[Math.max(Ah.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function g1e(e){return 4*e.q1-3*e.q3}function _1e(e){return 4*e.q3-3*e.q1}function x1e(e,t){return t===0?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}});var HI=Se((nlr,S1e)=>{"use strict";var w1e=hu(),L1t=Zr(),z1t=Ob().getAxisGroup,T1e=["v","h"];function P1t(e,t){for(var r=e.calcdata,n=t.xaxis,i=t.yaxis,a=0;a<T1e.length;a++){for(var o=T1e[a],s=o==="h"?i:n,u=[],l=0;l<r.length;l++){var f=r[l],c=f[0].t,h=f[0].trace;h.visible===!0&&(h.type==="box"||h.type==="candlestick")&&!c.empty&&(h.orientation||"v")===o&&h.xaxis===n._id&&h.yaxis===i._id&&u.push(l)}A1e("box",e,u,s)}}function A1e(e,t,r,n){var i=t.calcdata,a=t._fullLayout,o=n._id,s=o.charAt(0),u,l,f,c=[],h=0;for(u=0;u<r.length;u++)for(f=i[r[u]],l=0;l<f.length;l++)c.push(n.c2l(f[l].pos,!0)),h+=(f[l].pts2||[]).length;if(c.length){var d=L1t.distinctVals(c);(n.type==="category"||n.type==="multicategory")&&(d.minDiff=1);var p=d.minDiff/2;w1e.minDtick(n,d.minDiff,d.vals[0],!0);var x=e==="violin"?"_numViolins":"_numBoxes",b=a[x],y=a[e+"mode"]==="group"&&b>1,k=1-a[e+"gap"],E=1-a[e+"groupgap"];for(u=0;u<r.length;u++){f=i[r[u]];var A=f[0].trace,L=f[0].t,_=A.width,C=A.side,M,v,z,T;if(_)M=v=T=_/2,z=0;else if(M=p,y){var F=z1t(a,n._id)+A.orientation,q=a._alignmentOpts[F]||{},U=q[A.alignmentgroup]||{},H=Object.keys(U.offsetGroups||{}).length,j=H||b,G=H?A._offsetIndex:L.num;v=M*k*E/j,z=2*M*(-.5+(G+.5)/j)*k,T=M*k/j}else v=M*k*E,z=0,T=M;L.dPos=M,L.bPos=z,L.bdPos=v,L.wHover=T;var O,W,re=z+v,ne,be,ze,Ce,he,te,ke=!!_,Ee=(A.boxpoints||A.points)&&h>0;if(C==="positive"?(O=M*(_?1:.5),ne=re,W=ne=z):C==="negative"?(O=ne=z,W=M*(_?1:.5),be=re):(O=W=M,ne=be=re),Ee){var Me=A.pointpos,Oe=A.jitter,Re=A.marker.size/2,me=0;Me+Oe>=0&&(me=re*(Me+Oe),me>O?(ke=!0,he=Re,ze=me):me>ne&&(he=Re,ze=O)),me<=O&&(ze=O);var Be=0;Me-Oe<=0&&(Be=-re*(Me-Oe),Be>W?(ke=!0,te=Re,Ce=Be):Be>be&&(te=Re,Ce=W)),Be<=W&&(Ce=W)}else ze=O,Ce=W;var fe=new Array(f.length);for(l=0;l<f.length;l++)fe[l]=f[l].pos;A._extremes[o]=w1e.findExtremes(n,fe,{padded:ke,vpadminus:Ce,vpadplus:ze,vpadLinearized:!0,ppadminus:{x:te,y:he}[s],ppadplus:{x:he,y:te}[s]})}}}S1e.exports={crossTraceCalc:P1t,setPositionOffset:A1e}});var GI=Se((alr,L1e)=>{"use strict";var MT=Nl(),n2=Zr(),I1t=yu(),M1e=5,D1t=.01;function R1t(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;n2.makeTraceGroups(n,r,"trace boxes").each(function(s){var u=MT.select(this),l=s[0],f=l.t,c=l.trace;if(f.wdPos=f.bdPos*c.whiskerwidth,c.visible!==!0||f.empty){u.remove();return}var h,d;c.orientation==="h"?(h=o,d=a):(h=a,d=o),E1e(u,{pos:h,val:d},c,f,i),k1e(u,{x:a,y:o},c,f),C1e(u,{pos:h,val:d},c,f)})}function E1e(e,t,r,n,i){var a=r.orientation==="h",o=t.val,s=t.pos,u=!!s.rangebreaks,l=n.bPos,f=n.wdPos||0,c=n.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,p=r.notched||!1,x=p?1-2*r.notchwidth:1,b,y;Array.isArray(n.bdPos)?(b=n.bdPos[0],y=n.bdPos[1]):(b=n.bdPos,y=n.bdPos);var k=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?n2.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 MT.select(this).attr("d","M0,0Z");var A=s.c2l(E.pos+l,!0),L=s.l2p(A-b)+c,_=s.l2p(A+y)+c,C=u?(L+_)/2:s.l2p(A)+c,M=r.whiskerwidth,v=u?L*M+(1-M)*C:s.l2p(A-f)+c,z=u?_*M+(1-M)*C:s.l2p(A+f)+c,T=s.l2p(A-b*x)+c,F=s.l2p(A+y*x)+c,q=r.sizemode==="sd",U=o.c2p(q?E.mean-E.sd:E.q1,!0),H=q?o.c2p(E.mean+E.sd,!0):o.c2p(E.q3,!0),j=n2.constrain(q?o.c2p(E.mean,!0):o.c2p(E.med,!0),Math.min(U,H)+1,Math.max(U,H)-1),G=E.lf===void 0||r.boxpoints===!1||q,O=o.c2p(G?E.min:E.lf,!0),W=o.c2p(G?E.max:E.uf,!0),re=o.c2p(E.ln,!0),ne=o.c2p(E.un,!0);a?MT.select(this).attr("d","M"+j+","+T+"V"+F+"M"+U+","+L+"V"+_+(p?"H"+re+"L"+j+","+F+"L"+ne+","+_:"")+"H"+H+"V"+L+(p?"H"+ne+"L"+j+","+T+"L"+re+","+L:"")+"Z"+(d?"M"+U+","+C+"H"+O+"M"+H+","+C+"H"+W+(h===0?"":"M"+O+","+v+"V"+z+"M"+W+","+v+"V"+z):"")):MT.select(this).attr("d","M"+T+","+j+"H"+F+"M"+L+","+U+"H"+_+(p?"V"+re+"L"+F+","+j+"L"+_+","+ne:"")+"V"+H+"H"+L+(p?"V"+ne+"L"+T+","+j+"L"+L+","+re:"")+"Z"+(d?"M"+C+","+U+"V"+O+"M"+C+","+H+"V"+W+(h===0?"":"M"+v+","+O+"H"+z+"M"+v+","+W+"H"+z):""))})}function k1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,u=r.boxpoints||r.points;n2.seedPseudoRandom();var l=function(h){return h.forEach(function(d){d.t=n,d.trace=r}),h},f=e.selectAll("g.points").data(u?l:[]);f.enter().append("g").attr("class","points"),f.exit().remove();var c=f.selectAll("path").data(function(h){var d,p=h.pts2,x=Math.max((h.max-h.min)/10,h.q3-h.q1),b=x*1e-9,y=x*D1t,k=[],E=0,A;if(r.jitter){if(x===0)for(E=1,k=new Array(p.length),d=0;d<p.length;d++)k[d]=1;else for(d=0;d<p.length;d++){var L=Math.max(0,d-M1e),_=p[L].v,C=Math.min(p.length-1,d+M1e),M=p[C].v;u!=="all"&&(p[d].v<h.lf?M=Math.min(M,h.lf):_=Math.max(_,h.uf));var v=Math.sqrt(y*(C-L)/(M-_+b))||0;v=n2.constrain(Math.abs(v),0,1),k.push(v),E=Math.max(v,E)}A=r.jitter*2/(E||1)}for(d=0;d<p.length;d++){var z=p[d],T=z.v,F=r.jitter?A*k[d]*(n2.pseudoRandom()-.5):0,q=h.pos+s+o*(r.pointpos+F);r.orientation==="h"?(z.y=q,z.x=T):(z.x=q,z.y=T),u==="suspectedoutliers"&&T<h.uo&&T>h.lo&&(z.so=!0)}return p});c.enter().append("path").classed("point",!0),c.exit().remove(),c.call(I1t.translatePoints,i,a)}function C1e(e,t,r,n){var i=t.val,a=t.pos,o=!!a.rangebreaks,s=n.bPos,u=n.bPosPxOffset||0,l=r.boxmean||(r.meanline||{}).visible,f,c;Array.isArray(n.bdPos)?(f=n.bdPos[0],c=n.bdPos[1]):(f=n.bdPos,c=n.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?n2.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var p=a.c2l(d.pos+s,!0),x=a.l2p(p-f)+u,b=a.l2p(p+c)+u,y=o?(x+b)/2:a.l2p(p)+u,k=i.c2p(d.mean,!0),E=i.c2p(d.mean-d.sd,!0),A=i.c2p(d.mean+d.sd,!0);r.orientation==="h"?MT.select(this).attr("d","M"+k+","+x+"V"+b+(l==="sd"?"m0,0L"+E+","+y+"L"+k+","+x+"L"+A+","+y+"Z":"")):MT.select(this).attr("d","M"+x+","+k+"H"+b+(l==="sd"?"m0,0L"+y+","+E+"L"+x+","+k+"L"+y+","+A+"Z":""))})}L1e.exports={plot:R1t,plotBoxAndWhiskers:E1e,plotPoints:k1e,plotBoxMean:C1e}});var WI=Se((olr,z1e)=>{"use strict";var qV=Nl(),BV=Pl(),OV=yu();function F1t(e,t,r){var n=r||qV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=qV.select(this),o=i[0].trace,s=o.line.width;function u(c,h,d,p){c.style("stroke-width",h+"px").call(BV.stroke,d).call(BV.fill,p)}var l=a.selectAll("path.box");if(o.type==="candlestick")l.each(function(c){if(!c.empty){var h=qV.select(this),d=o[c.dir];u(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",o.selectedpoints&&!c.selected?.3:1)}});else{u(l,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(BV.stroke,o.line.color);var f=a.selectAll("path.point");OV.pointStyle(f,o,e)}})}function q1t(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?OV.selectedPointStyle(i,n):OV.pointStyle(i,n,e)}z1e.exports={style:F1t,styleOnSelect:q1t}});var UV=Se((slr,R1e)=>{"use strict";var B1t=hu(),NV=Zr(),A_=jc(),P1e=Pl(),O1t=NV.fillText;function N1t(e,t,r,n){var i=e.cd,a=i[0].trace,o=a.hoveron,s=[],u;return o.indexOf("boxes")!==-1&&(s=s.concat(I1e(e,t,r,n))),o.indexOf("points")!==-1&&(u=D1e(e,t,r)),n==="closest"?u?[u]:s:(u&&s.push(u),s)}function I1e(e,t,r,n){var i=e.cd,a=e.xa,o=e.ya,s=i[0].trace,u=i[0].t,l=s.type==="violin",f,c,h,d,p,x,b,y,k,E,A,L=u.bdPos,_,C,M=u.wHover,v=function(Re){return h.c2l(Re.pos)+u.bPos-h.c2l(x)};l&&s.side!=="both"?(s.side==="positive"&&(k=function(Re){var me=v(Re);return A_.inbox(me,me+M,E)},_=L,C=0),s.side==="negative"&&(k=function(Re){var me=v(Re);return A_.inbox(me-M,me,E)},_=0,C=L)):(k=function(Re){var me=v(Re);return A_.inbox(me-M,me+M,E)},_=C=L);var z;l?z=function(Re){return A_.inbox(Re.span[0]-p,Re.span[1]-p,E)}:z=function(Re){return A_.inbox(Re.min-p,Re.max-p,E)},s.orientation==="h"?(p=t,x=r,b=z,y=k,f="y",h=o,c="x",d=a):(p=r,x=t,b=k,y=z,f="x",h=a,c="y",d=o);var T=Math.min(1,L/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));E=e.maxHoverDistance-T,A=e.maxSpikeDistance-T;function F(Re){return(b(Re)+y(Re))/2}var q=A_.getDistanceFunction(n,b,y,F);if(A_.getClosest(i,q,e),e.index===!1)return[];var U=i[e.index],H=s.line.color,j=(s.marker||{}).color;P1e.opacity(H)&&s.line.width?e.color=H:P1e.opacity(j)&&s.boxpoints?e.color=j:e.color=s.fillcolor,e[f+"0"]=h.c2p(U.pos+u.bPos-C,!0),e[f+"1"]=h.c2p(U.pos+u.bPos+_,!0),e[f+"LabelVal"]=U.orig_p!==void 0?U.orig_p:U.pos;var G=f+"Spike";e.spikeDistance=F(U)*A/E,e[G]=h.c2p(U.pos,!0);var O=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,W=s.boxpoints||s.points,re=W&&O?["max","uf","q3","med","mean","q1","lf","min"]:W&&!O?["max","uf","q3","med","q1","lf","min"]:!W&&O?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ne=d.range[1]<d.range[0];s.orientation===(ne?"v":"h")&&re.reverse();for(var be=e.spikeDistance,ze=e[G],Ce=[],he=0;he<re.length;he++){var te=re[he];if(te in U){var ke=U[te],Ee=d.c2p(ke,!0),Me=NV.extendFlat({},e);Me.attr=te,Me[c+"0"]=Me[c+"1"]=Ee,Me[c+"LabelVal"]=ke,Me[c+"Label"]=(u.labels?u.labels[te]+" ":"")+B1t.hoverLabelText(d,ke,s[c+"hoverformat"]),Me.hoverOnBox=!0,te==="mean"&&"sd"in U&&(s.boxmean==="sd"||s.sizemode==="sd")&&(Me[c+"err"]=U.sd),Me.hovertemplate=!1,Ce.push(Me)}}e.name="",e.spikeDistance=void 0,e[G]=void 0;for(var Oe=0;Oe<Ce.length;Oe++)Ce[Oe].attr!=="med"?(Ce[Oe].name="",Ce[Oe].spikeDistance=void 0,Ce[Oe][G]=void 0):(Ce[Oe].spikeDistance=be,Ce[Oe][G]=ze);return Ce}function D1e(e,t,r){for(var n=e.cd,i=e.xa,a=e.ya,o=n[0].trace,s=i.c2p(t),u=a.c2p(r),l,f=function(z){var T=Math.max(3,z.mrc||0);return Math.max(Math.abs(i.c2p(z.x)-s)-T,1-3/T)},c=function(z){var T=Math.max(3,z.mrc||0);return Math.max(Math.abs(a.c2p(z.y)-u)-T,1-3/T)},h=A_.quadrature(f,c),d=!1,p,x,b=0;b<n.length;b++){p=n[b];for(var y=0;y<(p.pts||[]).length;y++){x=p.pts[y];var k=h(x);k<=e.distance&&(e.distance=k,d=[b,y])}}if(!d)return!1;p=n[d[0]],x=p.pts[d[1]];var E=i.c2p(x.x,!0),A=a.c2p(x.y,!0),L=x.mrc||1;l=NV.extendFlat({},e,{index:x.i,color:(o.marker||{}).color,name:o.name,x0:E-L,x1:E+L,y0:A-L,y1:A+L,spikeDistance:e.distance,hovertemplate:o.hovertemplate});var _=p.orig_p,C=_!==void 0?_:p.pos,M;o.orientation==="h"?(M=a,l.xLabelVal=x.x,l.yLabelVal=C):(M=i,l.xLabelVal=C,l.yLabelVal=x.y);var v=M._id.charAt(0);return l[v+"Spike"]=M.c2p(p.pos,!0),O1t(x,o,l),l}R1e.exports={hoverPoints:N1t,hoverOnBoxes:I1e,hoverOnPoints:D1e}});var q1e=Se((llr,F1e)=>{"use strict";F1e.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 VV=Se((ulr,B1e)=>{"use strict";B1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,u;if(r===!1)for(s=0;s<n.length;s++)for(u=0;u<(n[s].pts||[]).length;u++)n[s].pts[u].selected=0;else for(s=0;s<n.length;s++)for(u=0;u<(n[s].pts||[]).length;u++){var l=n[s].pts[u],f=i.c2p(l.x),c=a.c2p(l.y);r.contains([f,c],null,l.i,t)?(o.push({pointNumber:l.i,x:i.c2d(l.x),y:a.c2d(l.y)}),l.selected=1):l.selected=0}return o}});var N1e=Se((flr,O1e)=>{"use strict";O1e.exports={attributes:p4(),layoutAttributes:v4(),supplyDefaults:m4().supplyDefaults,crossTraceDefaults:m4().crossTraceDefaults,supplyLayoutDefaults:UI().supplyLayoutDefaults,calc:FV(),crossTraceCalc:HI().crossTraceCalc,plot:GI().plot,style:WI().style,styleOnSelect:WI().styleOnSelect,hoverPoints:UV().hoverPoints,eventData:q1e(),selectPoints:VV(),moduleType:"trace",name:"box",basePlotModule:Th(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var V1e=Se((clr,U1e)=>{"use strict";U1e.exports=N1e()});var ET=Se((hlr,H1e)=>{"use strict";var n0=Zc(),U1t=zf(),V1t=uc(),HV=Gc().axisHoverFormat,H1t=Du().hovertemplateAttrs,G1t=Du().texttemplateAttrs,W1t=Xf(),zv=vu().extendFlat;H1e.exports=zv({z:{valType:"data_array",editType:"calc"},x:zv({},n0.x,{impliedEdits:{xtype:"array"}}),x0:zv({},n0.x0,{impliedEdits:{xtype:"scaled"}}),dx:zv({},n0.dx,{impliedEdits:{xtype:"scaled"}}),y:zv({},n0.y,{impliedEdits:{ytype:"array"}}),y0:zv({},n0.y0,{impliedEdits:{ytype:"scaled"}}),dy:zv({},n0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:zv({},n0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:zv({},n0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:zv({},n0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:zv({},n0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:zv({},n0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:zv({},n0.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:HV("x"),yhoverformat:HV("y"),zhoverformat:HV("z",1),hovertemplate:H1t(),texttemplate:G1t({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:V1t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:zv({},U1t.showlegend,{dflt:!1}),zorder:n0.zorder},W1t("",{cLetter:"z",autoColorDflt:!1}))});var ZI=Se((dlr,W1e)=>{"use strict";var j1t=_u(),jI=Zr(),Z1t=Ul();W1e.exports=function(t,r,n,i,a,o){var s=n("z");a=a||"x",o=o||"y";var u,l;if(s===void 0||!s.length)return 0;if(jI.isArray1D(s)){u=n(a),l=n(o);var f=jI.minRowLength(u),c=jI.minRowLength(l);if(f===0||c===0)return 0;r._length=Math.min(f,c,s.length)}else{if(u=G1e(a,n),l=G1e(o,n),!X1t(s))return 0;n("transpose"),r._length=null}var h=Z1t.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],i),!0};function G1e(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function X1t(e){for(var t=!0,r=!1,n=!1,i,a=0;a<e.length;a++){if(i=e[a],!jI.isArrayOrTypedArray(i)){t=!1;break}i.length>0&&(r=!0);for(var o=0;o<i.length;o++)if(j1t(i[o])){n=!0;break}}return t&&r&&n}});var g4=Se((plr,Z1e)=>{"use strict";var j1e=Zr();Z1e.exports=function(t,r){t("texttemplate");var n=j1e.extendFlat({},r.font,{color:"auto",size:"auto"});j1e.coerceFont(t,"textfont",n)}});var GV=Se((vlr,X1e)=>{"use strict";X1e.exports=function(t,r,n){var i=n("zsmooth");i===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var J1e=Se((ylr,K1e)=>{"use strict";var Y1e=Zr(),Y1t=ZI(),K1t=g4(),J1t=zy(),$1t=GV(),Q1t=ed(),e_t=ET();K1e.exports=function(t,r,n,i){function a(s,u){return Y1e.coerce(t,r,e_t,s,u)}var o=Y1t(t,r,a,i);if(!o){r.visible=!1;return}J1t(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),K1t(a,i),$1t(t,r,a,i),a("hoverongaps"),a("connectgaps",Y1e.isArray1D(r.z)&&r.zsmooth!==!1),Q1t(t,r,i,a,{prefix:"",cLetter:"z"}),a("zorder")}});var WV=Se((mlr,$1e)=>{"use strict";var kT=_u();$1e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return kT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return kT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(kT(i))if(i=Number(i),kT(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(kT(i))if(i=Number(i),kT(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 jV=Se((glr,Q1e)=>{"use strict";Q1e.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 ZV=Se((_lr,e_e)=>{"use strict";e_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 XV=Se((xlr,l_e)=>{"use strict";var CT=ju(),a2=CT.ONEAVGYEAR,t_e=CT.ONEAVGMONTH,YI=CT.ONEDAY,r_e=CT.ONEHOUR,i_e=CT.ONEMIN,n_e=CT.ONESEC,a_e=hu().tickIncrement;l_e.exports=function(t,r,n,i,a){var o=-1.1*r,s=-.1*r,u=t-s,l=n[0],f=n[1],c=Math.min(XI(l+s,l+u,i,a),XI(f+s,f+u,i,a)),h=Math.min(XI(l+o,l+s,i,a),XI(f+o,f+s,i,a)),d,p;if(c>h&&h<Math.abs(f-l)/4e3?(d=c,p=!1):(d=Math.min(c,h),p=!0),i.type==="date"&&d>YI){var x=d===a2?1:6,b=d===a2?"M12":"M1";return function(y,k){var E=i.c2d(y,a2,a),A=E.indexOf("-",x);A>0&&(E=E.substr(0,A));var L=i.d2c(E,0,a);if(L<y){var _=a_e(L,b,!1,a);(L+_)/2<y+t&&(L=_)}return k&&p?a_e(L,b,!0,a):L}}return function(y,k){var E=d*Math.round(y/d);return E+d/10<y&&E+d*.9<y+t&&(E+=d),k&&p&&(E-=d),E}};function XI(e,t,r,n){if(e*t<=0)return 1/0;for(var i=Math.abs(t-e),a=r.type==="date",o=o_e(i,a),s=0;s<10;s++){var u=o_e(o*80,a);if(o===u)break;if(t_t(u,e,t,a,r,n))o=u;else break}return o}function o_e(e,t){return t&&e>n_e?e>YI?e>a2*1.1?a2:e>t_e*1.1?t_e:YI:e>r_e?r_e:e>i_e?i_e:n_e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function t_t(e,t,r,n,i,a){if(n&&e>YI){var o=s_e(t,i,a),s=s_e(r,i,a),u=e===a2?0:1;return o[u]!==s[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}function s_e(e,t,r){var n=t.c2d(e,a2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var JV=Se((blr,c_e)=>{"use strict";var YV=_u(),Vp=Zr(),u_e=Ul(),H0=hu(),r_t=f4(),f_e=WV(),i_t=jV(),n_t=ZV(),a_t=XV();function o_t(e,t){var r=[],n=[],i=t.orientation==="h",a=H0.getFromId(e,i?t.yaxis:t.xaxis),o=i?"y":"x",s={x:"y",y:"x"}[o],u=t[o+"calendar"],l=t.cumulative,f,c=KV(e,t,a,o),h=c[0],d=c[1],p=typeof h.size=="string",x=[],b=p?x:h,y=[],k=[],E=[],A=0,L=t.histnorm,_=t.histfunc,C=L.indexOf("density")!==-1,M,v,z;l.enabled&&C&&(L=L.replace(/ ?density$/,""),C=!1);var T=_==="max"||_==="min",F=T?null:0,q=f_e.count,U=i_t[L],H=!1,j=function(me){return a.r2c(me,0,u)},G;for(Vp.isArrayOrTypedArray(t[s])&&_!=="count"&&(G=t[s],H=_==="avg",q=f_e[_]),f=j(h.start),v=j(h.end)+(f-H0.tickIncrement(f,h.size,!1,u))/1e6;f<v&&r.length<1e6&&(M=H0.tickIncrement(f,h.size,!1,u),r.push((f+M)/2),n.push(F),E.push([]),x.push(f),C&&y.push(1/(M-f)),H&&k.push(0),!(M<=f));)f=M;x.push(f),!p&&a.type==="date"&&(b={start:j(b.start),end:j(b.end),size:b.size}),e._fullLayout._roundFnOpts||(e._fullLayout._roundFnOpts={});var O=t["_"+o+"bingroup"],W={leftGap:1/0,rightGap:1/0};O&&(e._fullLayout._roundFnOpts[O]||(e._fullLayout._roundFnOpts[O]=W),W=e._fullLayout._roundFnOpts[O]);var re=n.length,ne=!0,be=W.leftGap,ze=W.rightGap,Ce={};for(f=0;f<d.length;f++){var he=d[f];z=Vp.findBin(he,b),z>=0&&z<re&&(A+=q(z,f,n,G,k),ne&&E[z].length&&he!==d[E[z][0]]&&(ne=!1),E[z].push(f),Ce[f]=z,be=Math.min(be,he-x[z]),ze=Math.min(ze,x[z+1]-he))}W.leftGap=be,W.rightGap=ze;var te;ne||(te=function(me,Be){return function(){var fe=e._fullLayout._roundFnOpts[O];return a_t(fe.leftGap,fe.rightGap,x,a,u)(me,Be)}}),H&&(A=n_t(n,k)),U&&U(n,A,y),l.enabled&&u_t(n,l.direction,l.currentbin);var ke=Math.min(r.length,n.length),Ee=[],Me=0,Oe=ke-1;for(f=0;f<ke;f++)if(n[f]){Me=f;break}for(f=ke-1;f>=Me;f--)if(n[f]){Oe=f;break}for(f=Me;f<=Oe;f++)if(YV(r[f])&&YV(n[f])){var Re={p:r[f],s:n[f],b:0};l.enabled||(Re.pts=E[f],ne?Re.ph0=Re.ph1=E[f].length?d[E[f][0]]:r[f]:(t._computePh=!0,Re.ph0=te(x[f]),Re.ph1=te(x[f+1],!0))),Ee.push(Re)}return Ee.length===1&&(Ee[0].width1=H0.tickIncrement(Ee[0].p,h.size,!1,u)-Ee[0].p),r_t(Ee,t),Vp.isArrayOrTypedArray(t.selectedpoints)&&Vp.tagSelected(Ee,t,Ce),Ee}function KV(e,t,r,n,i){var a=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],u=o._histogramBinOpts[s],l=o.barmode==="overlay",f,c,h,d,p,x,b,y=function(he){return r.r2c(he,0,d)},k=function(he){return r.c2r(he,0,d)},E=r.type==="date"?function(he){return he||he===0?Vp.cleanDate(he,null,d):null}:function(he){return YV(he)?Number(he):null};function A(he,te,ke){te[he+"Found"]?(te[he]=E(te[he]),te[he]===null&&(te[he]=ke[he])):(x[he]=te[he]=ke[he],Vp.nestedProperty(c[0],a+"."+he).set(ke[he]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{c=u.traces;var L=[],_=!0,C=!1,M=!1;for(f=0;f<c.length;f++)if(h=c[f],h.visible){var v=u.dirs[f];p=h["_"+v+"pos0"]=r.makeCalcdata(h,v),L=Vp.concat(L,p),delete h["_"+n+"autoBinFinished"],t.visible===!0&&(_?_=!1:(delete h._autoBin,h["_"+n+"autoBinFinished"]=1),u_e.traceIs(h,"2dMap")&&(C=!0),h.type==="histogram2dcontour"&&(M=!0))}d=c[0][n+"calendar"];var z=H0.autoBin(L,r,u.nbins,C,d,u.sizeFound&&u.size),T=c[0]._autoBin={};if(x=T[u.dirs[0]]={},M&&(u.size||(z.start=k(H0.tickIncrement(y(z.start),z.size,!0,d))),u.end===void 0&&(z.end=k(H0.tickIncrement(y(z.end),z.size,!1,d)))),l&&!u_e.traceIs(t,"2dMap")&&z._dataSpan===0&&r.type!=="category"&&r.type!=="multicategory"&&t.bingroup===""&&typeof t.xbins=="undefined"){if(i)return[z,p,!0];z=s_t(e,t,r,n,a)}b=h.cumulative||{},b.enabled&&b.currentbin!=="include"&&(b.direction==="decreasing"?z.start=k(H0.tickIncrement(y(z.start),z.size,!0,d)):z.end=k(H0.tickIncrement(y(z.end),z.size,!1,d))),u.size=z.size,u.sizeFound||(x.size=z.size,Vp.nestedProperty(c[0],a+".size").set(z.size)),A("start",u,z),A("end",u,z)}p=t["_"+n+"pos0"],delete t["_"+n+"pos0"];var F=t._input[a]||{},q=Vp.extendFlat({},u),U=u.start,H=r.r2l(F.start),j=H!==void 0;if((u.startFound||j)&&H!==r.r2l(U)){var G=j?H:Vp.aggNums(Math.min,null,p),O={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:u.size,tick0:U,calendar:d,range:[G,H0.tickIncrement(G,u.size,!1,d)].map(r.l2r)},W=H0.tickFirst(O);W>r.r2l(G)&&(W=H0.tickIncrement(W,u.size,!0,d)),q.start=r.l2r(W),j||Vp.nestedProperty(t,a+".start").set(q.start)}var re=u.end,ne=r.r2l(F.end),be=ne!==void 0;if((u.endFound||be)&&ne!==r.r2l(re)){var ze=be?ne:Vp.aggNums(Math.max,null,p);q.end=r.l2r(ze),be||Vp.nestedProperty(t,a+".start").set(q.end)}var Ce="autobin"+n;return t._input[Ce]===!1&&(t._input[a]=Vp.extendFlat({},t[a]||{}),delete t._input[Ce],delete t[Ce]),[q,p]}function s_t(e,t,r,n,i){var a=e._fullLayout,o=l_t(e,t),s=!1,u=1/0,l=[t],f,c,h;for(f=0;f<o.length;f++)if(c=o[f],c===t)s=!0;else if(!s)h=a._histogramBinOpts[c["_"+n+"bingroup"]],u=Math.min(u,h.size||c[i].size);else{var d=KV(e,c,r,n,!0),p=d[0],x=d[2];c["_"+n+"autoBinFinished"]=1,c["_"+n+"pos0"]=d[1],x?l.push(c):u=Math.min(u,p.size)}var b=new Array(l.length);for(f=0;f<l.length;f++)for(var y=l[f]["_"+n+"pos0"],k=0;k<y.length;k++)if(y[k]!==void 0){b[f]=y[k];break}for(isFinite(u)||(u=Vp.distinctVals(b).minDiff),f=0;f<l.length;f++){c=l[f];var E=c[n+"calendar"],A={start:r.c2r(b[f]-u/2,0,E),end:r.c2r(b[f]+u/2,0,E),size:u};c._input[i]=c[i]=A,h=a._histogramBinOpts[c["_"+n+"bingroup"]],h&&Vp.extendFlat(h,A)}return t[i]}function l_t(e,t){for(var r=t.xaxis,n=t.yaxis,i=t.orientation,a=[],o=e._fullData,s=0;s<o.length;s++){var u=o[s];u.type==="histogram"&&u.visible===!0&&u.orientation===i&&u.xaxis===r&&u.yaxis===n&&a.push(u)}return a}function u_t(e,t,r){var n,i,a;function o(u){a=e[u],e[u]/=2}function s(u){i=e[u],e[u]=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())}}c_e.exports={calc:o_t,calcAllAutoBins:KV}});var __e=Se((wlr,g_e)=>{"use strict";var h_e=Zr(),LT=hu(),d_e=WV(),f_t=jV(),c_t=ZV(),h_t=XV(),p_e=JV().calcAllAutoBins;g_e.exports=function(t,r){var n=LT.getFromId(t,r.xaxis),i=LT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(je){return n.r2c(je,0,a)},u=function(je){return i.r2c(je,0,o)},l=function(je){return n.c2r(je,0,a)},f=function(je){return i.c2r(je,0,o)},c,h,d,p,x=p_e(t,r,n,"x"),b=x[0],y=x[1],k=p_e(t,r,i,"y"),E=k[0],A=k[1],L=r._length;y.length>L&&y.splice(L,y.length-L),A.length>L&&A.splice(L,A.length-L);var _=[],C=[],M=[],v=typeof b.size=="string",z=typeof E.size=="string",T=[],F=[],q=v?T:b,U=z?F:E,H=0,j=[],G=[],O=r.histnorm,W=r.histfunc,re=O.indexOf("density")!==-1,ne=W==="max"||W==="min",be=ne?null:0,ze=d_e.count,Ce=f_t[O],he=!1,te=[],ke=[],Ee="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";Ee&&W!=="count"&&(he=W==="avg",ze=d_e[W]);var Me=b.size,Oe=s(b.start),Re=s(b.end)+(Oe-LT.tickIncrement(Oe,Me,!1,a))/1e6;for(c=Oe;c<Re;c=LT.tickIncrement(c,Me,!1,a))C.push(be),T.push(c),he&&M.push(0);T.push(c);var me=C.length,Be=(c-Oe)/me,fe=l(Oe+Be/2),Ze=E.size,et=u(E.start),gt=u(E.end)+(et-LT.tickIncrement(et,Ze,!1,o))/1e6;for(c=et;c<gt;c=LT.tickIncrement(c,Ze,!1,o)){_.push(C.slice()),F.push(c);var Pt=new Array(me);for(h=0;h<me;h++)Pt[h]=[];G.push(Pt),he&&j.push(M.slice())}F.push(c);var Qe=_.length,Xe=(c-et)/Qe,Tt=f(et+Xe/2);re&&(te=v_e(C.length,q,Be,v),ke=v_e(_.length,U,Xe,z)),!v&&n.type==="date"&&(q=y_e(s,q)),!z&&i.type==="date"&&(U=y_e(u,U));var xt=!0,_t=!0,Ct=new Array(me),jt=new Array(Qe),At=1/0,Te=1/0,nt=1/0,ut=1/0;for(c=0;c<L;c++){var ct=y[c],rt=A[c];d=h_e.findBin(ct,q),p=h_e.findBin(rt,U),d>=0&&d<me&&p>=0&&p<Qe&&(H+=ze(d,c,_[p],Ee,j[p]),G[p][d].push(c),xt&&(Ct[d]===void 0?Ct[d]=ct:Ct[d]!==ct&&(xt=!1)),_t&&(jt[p]===void 0?jt[p]=rt:jt[p]!==rt&&(_t=!1)),At=Math.min(At,ct-T[d]),Te=Math.min(Te,T[d+1]-ct),nt=Math.min(nt,rt-F[p]),ut=Math.min(ut,F[p+1]-rt))}if(he)for(p=0;p<Qe;p++)H+=c_t(_[p],j[p]);if(Ce)for(p=0;p<Qe;p++)Ce(_[p],H,te,ke[p]);return{x:y,xRanges:m_e(T,xt&&Ct,At,Te,n,a),x0:fe,dx:Be,y:A,yRanges:m_e(F,_t&&jt,nt,ut,i,o),y0:Tt,dy:Xe,z:_,pts:G}};function v_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 y_e(e,t){return{start:e(t.start),end:e(t.end),size:t.size}}function m_e(e,t,r,n,i,a){var o,s=e.length-1,u=new Array(s),l=h_t(r,n,e,i,a);for(o=0;o<s;o++){var f=(t||[])[o];u[o]=f===void 0?[l(e[o]),l(e[o+1],!0)]:[f,f]}return u}});var KI=Se((Tlr,w_e)=>{"use strict";var Pm=Zr(),x_e=ju().BADNUM,b_e=Iy();w_e.exports=function(t,r,n,i,a,o){var s=t._length,u=r.makeCalcdata(t,i),l=n.makeCalcdata(t,a);u=b_e(t,r,i,u).vals,l=b_e(t,n,a,l).vals;var f=t.text,c=f!==void 0&&Pm.isArray1D(f),h=t.hovertext,d=h!==void 0&&Pm.isArray1D(h),p,x,b=Pm.distinctVals(u),y=b.vals,k=Pm.distinctVals(l),E=k.vals,A=[],L,_,C=E.length,M=y.length;for(p=0;p<o.length;p++)A[p]=Pm.init2dArray(C,M);c&&(L=Pm.init2dArray(C,M)),d&&(_=Pm.init2dArray(C,M));var v=Pm.init2dArray(C,M);for(p=0;p<s;p++)if(u[p]!==x_e&&l[p]!==x_e){var z=Pm.findBin(u[p]+b.minDiff/2,y),T=Pm.findBin(l[p]+k.minDiff/2,E);for(x=0;x<o.length;x++){var F=o[x],q=t[F],U=A[x];U[T][z]=q[p],v[T][z]=p}c&&(L[T][z]=f[p]),d&&(_[T][z]=h[p])}for(t["_"+i]=y,t["_"+a]=E,x=0;x<o.length;x++)t["_"+o[x]]=A[x];c&&(t._text=L),d&&(t._hovertext=_),r&&r.type==="category"&&(t["_"+i+"CategoryMap"]=y.map(function(H){return r._categories[H]})),n&&n.type==="category"&&(t["_"+a+"CategoryMap"]=E.map(function(H){return n._categories[H]})),t._after2before=v}});var $I=Se((Alr,T_e)=>{"use strict";var d_t=_u(),p_t=Zr(),JI=ju().BADNUM;T_e.exports=function(t,r,n,i){var a,o,s,u,l,f;function c(y){if(d_t(y))return+y}if(r&&r.transpose){for(a=0,l=0;l<t.length;l++)a=Math.max(a,t[l].length);if(a===0)return!1;s=function(y){return y.length},u=function(y,k,E){return(y[E]||[])[k]}}else a=t.length,s=function(y,k){return y[k].length},u=function(y,k,E){return(y[k]||[])[E]};var h=function(y,k,E){return k===JI||E===JI?JI:u(y,k,E)};function d(y){if(r&&r.type!=="carpet"&&r.type!=="contourcarpet"&&y&&y.type==="category"&&r["_"+y._id.charAt(0)].length){var k=y._id.charAt(0),E={},A=r["_"+k+"CategoryMap"]||r[k];for(l=0;l<A.length;l++)E[A[l]]=l;return function(L){var _=E[y._categories[L]];return _+1?_:JI}}else return p_t.identity}var p=d(n),x=d(i);i&&i.type==="category"&&(a=i._categories.length);var b=new Array(a);for(l=0;l<a;l++)for(n&&n.type==="category"?o=n._categories.length:o=s(t,l),b[l]=new Array(o),f=0;f<o;f++)b[l][f]=c(h(t,x(l),p(f)));return b}});var QI=Se((Slr,M_e)=>{"use strict";var v_t=Zr(),A_e=.01,y_t=[[-1,0],[1,0],[0,-1],[0,1]];function m_t(e){return .5-.25*Math.min(1,e*.5)}M_e.exports=function(t,r){var n=1,i;for(S_e(t,r),i=0;i<r.length&&!(r[i][2]<4);i++);for(r=r.slice(i),i=0;i<100&&n>A_e;i++)n=S_e(t,r,m_t(n));return n>A_e&&v_t.log("interp2d didn't converge quickly",n),t};function S_e(e,t,r){var n=0,i,a,o,s,u,l,f,c,h,d,p,x,b;for(s=0;s<t.length;s++){for(i=t[s],a=i[0],o=i[1],p=e[a][o],d=0,h=0,u=0;u<4;u++)l=y_t[u],f=e[a+l[0]],f&&(c=f[o+l[1]],c!==void 0&&(d===0?x=b=c:(x=Math.min(x,c),b=Math.max(b,c)),h++,d+=c));if(h===0)throw"iterateInterp2d order is wrong: no defined neighbors";e[a][o]=d/h,p===void 0?h<4&&(n=1):(e[a][o]=(1+r)*e[a][o]-r*p,b>x&&(n=Math.max(n,Math.abs(e[a][o]-p)/(b-x))))}return n}});var eD=Se((Mlr,E_e)=>{"use strict";var g_t=Zr().maxRowLength;E_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],u=g_t(t),l,f,c,h,d,p,x,b;for(f=0;f<t.length;f++)for(l=o,o=a,a=t[f+1]||[],c=0;c<u;c++)o[c]===void 0&&(p=(o[c-1]!==void 0?1:0)+(o[c+1]!==void 0?1:0)+(l[c]!==void 0?1:0)+(a[c]!==void 0?1:0),p?(f===0&&p++,c===0&&p++,f===t.length-1&&p++,c===o.length-1&&p++,p<4&&(n[[f,c]]=[f,c,p]),r.push([f,c,p])):i.push([f,c]));for(;i.length;){for(x={},b=!1,d=i.length-1;d>=0;d--)h=i[d],f=h[0],c=h[1],p=((n[[f-1,c]]||s)[2]+(n[[f+1,c]]||s)[2]+(n[[f,c-1]]||s)[2]+(n[[f,c+1]]||s)[2])/20,p&&(x[h]=[f,c,p],i.splice(d,1),b=!0);if(!b)throw"findEmpties iterated with no new neighbors";for(h in x)n[h]=x[h],r.push(x[h])}return r.sort(function(y,k){return k[2]-y[2]})}});var $V=Se((Elr,L_e)=>{"use strict";var k_e=Ul(),C_e=Zr().isArrayOrTypedArray;L_e.exports=function(t,r,n,i,a,o){var s=[],u=k_e.traceIs(t,"contour"),l=k_e.traceIs(t,"histogram"),f,c,h,d=C_e(r)&&r.length>1;if(d&&!l&&o.type!=="category"){var p=r.length;if(p<=a){if(u)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<p;h++)s.push(Math.sqrt(r[h-1]*r[h]));s.push(Math.pow(r[p-1],1.5)/Math.pow(r[p-2],.5))}else{for(s=[1.5*r[0]-.5*r[1]],h=1;h<p;h++)s.push((r[h-1]+r[h])*.5);s.push(1.5*r[p-1]-.5*r[p-2])}if(p<a){var x=s[s.length-1],b;if(o.type==="log")for(b=x/s[s.length-2],h=p;h<a;h++)x*=b,s.push(x);else for(b=x-s[s.length-2],h=p;h<a;h++)x+=b,s.push(x)}}else return u?r.slice(0,a):r.slice(0,a+1)}else{var y=t[o._id.charAt(0)+"calendar"];if(l)f=o.r2c(n,0,y);else if(C_e(r)&&r.length===1)f=r[0];else if(n===void 0)f=0;else{var k=o.type==="log"?o.d2c:o.r2c;f=k(n,0,y)}for(c=i||1,h=u?0:-.5;h<a;h++)s.push(f+c*h)}return s}});var iD=Se((klr,D_e)=>{"use strict";var z_e=Ul(),QV=Zr(),tD=hu(),P_e=Iy(),__t=__e(),x_t=Rp(),b_t=KI(),w_t=$I(),T_t=QI(),A_t=eD(),rD=$V(),eH=ju().BADNUM;D_e.exports=function(t,r){var n=tD.getFromId(t,r.xaxis||"x"),i=tD.getFromId(t,r.yaxis||"y"),a=z_e.traceIs(r,"contour"),o=z_e.traceIs(r,"histogram"),s=a?"best":r.zsmooth,u,l,f,c,h,d,p,x,b,y,k;if(n._minDtick=0,i._minDtick=0,o)k=__t(t,r),c=k.orig_x,u=k.x,l=k.x0,f=k.dx,x=k.orig_y,h=k.y,d=k.y0,p=k.dy,b=k.z;else{var E=r.z;QV.isArray1D(E)?(b_t(r,n,i,"x","y",["z"]),u=r._x,h=r._y,E=r._z):(c=r.x?n.makeCalcdata(r,"x"):[],x=r.y?i.makeCalcdata(r,"y"):[],u=P_e(r,n,"x",c).vals,h=P_e(r,i,"y",x).vals,r._x=u,r._y=h),l=r.x0,f=r.dx,d=r.y0,p=r.dy,b=w_t(E,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=S_t(u,h,b),o||(u=I_e(u),h=I_e(h),r._x=u,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=A_t(b),T_t(b,r._emptypoints));function A(q){s=r._input.zsmooth=r.zsmooth=!1,QV.warn('cannot use zsmooth: "fast": '+q)}function L(q){if(q.length>1){var U=(q[q.length-1]-q[0])/(q.length-1),H=Math.abs(U/100);for(y=0;y<q.length-1;y++)if(Math.abs(q[y+1]-q[y]-U)>H)return!1}return!0}r._islinear=!1,n.type==="log"||i.type==="log"?s==="fast"&&A("log axis found"):L(u)?L(h)?r._islinear=!0:s==="fast"&&A("y scale is not linear"):s==="fast"&&A("x scale is not linear");var _=QV.maxRowLength(b),C=r.xtype==="scaled"?"":u,M=rD(r,C,l,f,_,n),v=r.ytype==="scaled"?"":h,z=rD(r,v,d,p,b.length,i);r._extremes[n._id]=tD.findExtremes(n,M),r._extremes[i._id]=tD.findExtremes(i,z);var T={x:M,y:z,z:b,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&c&&(T.orig_x=c),r.yperiodalignment&&x&&(T.orig_y=x),C&&C.length===M.length-1&&(T.xCenter=C),v&&v.length===z.length-1&&(T.yCenter=v),o&&(T.xRanges=k.xRanges,T.yRanges=k.yRanges,T.pts=k.pts),a||x_t(t,r,{vals:b,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var F={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};T.xfill=rD(F,C,l,f,_,n),T.yfill=rD(F,v,d,p,b.length,i)}return[T]};function I_e(e){for(var t=[],r=e.length,n=0;n<r;n++){var i=e[n];i!==eH&&t.push(i)}return t}function S_t(e,t,r){for(var n=[],i=-1,a=0;a<r.length;a++)if(t[a]!==eH){i++,n[i]=[];for(var o=0;o<r[a].length;o++)e[o]!==eH&&n[i].push(r[a][o])}return n}});var aD=Se(nD=>{"use strict";nD.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"]];nD.STYLE=nD.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var tH=Se((Llr,q_e)=>{"use strict";var R_e=aD(),M_t=yu(),F_e=Zr(),zT=null;function E_t(){if(zT!==null)return zT;zT=!1;var e=F_e.isSafari()||F_e.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(R_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")zT=t.some(function(o){return r.apply(null,o)});else{var n=M_t.tester.append("image").attr("style",R_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;zT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return zT}q_e.exports=E_t});var oD=Se((zlr,j_e)=>{"use strict";var B_e=Nl(),k_t=cd(),C_t=Ul(),L_t=yu(),z_t=hu(),G0=Zr(),O_e=Bf(),P_t=JP(),I_t=Pl(),D_t=fc().extractOpts,R_t=fc().makeColorScaleFuncFromTrace,F_t=Zv(),q_t=Qh(),rH=q_t.LINE_SPACING,B_t=tH(),O_t=aD().STYLE,G_e="heatmap-label";function W_e(e){return e.selectAll("g."+G_e)}function N_e(e){W_e(e).remove()}j_e.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;G0.makeTraceGroups(n,r,"hm").each(function(o){var s=B_e.select(this),u=o[0],l=u.trace,f=l.xgap||0,c=l.ygap||0,h=u.z,d=u.x,p=u.y,x=u.xCenter,b=u.yCenter,y=C_t.traceIs(l,"contour"),k=y?"best":l.zsmooth,E=h.length,A=G0.maxRowLength(h),L=!1,_=!1,C,M,v,z,T,F,q,U;for(F=0;C===void 0&&F<d.length-1;)C=i.c2p(d[F]),F++;for(F=d.length-1;M===void 0&&F>0;)M=i.c2p(d[F]),F--;for(M<C&&(v=M,M=C,C=v,L=!0),F=0;z===void 0&&F<p.length-1;)z=a.c2p(p[F]),F++;for(F=p.length-1;T===void 0&&F>0;)T=a.c2p(p[F]),F--;T<z&&(v=z,z=T,T=v,_=!0),y&&(x=d,b=p,d=u.xfill,p=u.yfill);var H="default";if(k?H=k==="best"?"smooth":"fast":l._islinear&&f===0&&c===0&&B_t()&&(H="fast"),H!=="fast"){var j=k==="best"?0:.5;C=Math.max(-j*i._length,C),M=Math.min((1+j)*i._length,M),z=Math.max(-j*a._length,z),T=Math.min((1+j)*a._length,T)}var G=Math.round(M-C),O=Math.round(T-z),W=C>=i._length||M<=0||z>=a._length||T<=0;if(W){var re=s.selectAll("image").data([]);re.exit().remove(),N_e(s);return}var ne,be;H==="fast"?(ne=A,be=E):(ne=G,be=O);var ze=document.createElement("canvas");ze.width=ne,ze.height=be;var Ce=ze.getContext("2d",{willReadFrequently:!0}),he=R_t(l,{noNumericCheck:!0,returnArray:!0}),te,ke;H==="fast"?(te=L?function(vi){return A-1-vi}:G0.identity,ke=_?function(vi){return E-1-vi}:G0.identity):(te=function(vi){return G0.constrain(Math.round(i.c2p(d[vi])-C),0,G)},ke=function(vi){return G0.constrain(Math.round(a.c2p(p[vi])-z),0,O)});var Ee=ke(0),Me=[Ee,Ee],Oe=L?0:1,Re=_?0:1,me=0,Be=0,fe=0,Ze=0,et,gt,Pt,Qe,Xe;function Tt(vi,Pi){if(vi!==void 0){var Yr=he(vi);return Yr[0]=Math.round(Yr[0]),Yr[1]=Math.round(Yr[1]),Yr[2]=Math.round(Yr[2]),me+=Pi,Be+=Yr[0]*Pi,fe+=Yr[1]*Pi,Ze+=Yr[2]*Pi,Yr}return[0,0,0,0]}function xt(vi,Pi,Yr,Ni){var Ur=vi[Yr.bin0];if(Ur===void 0)return Tt(void 0,1);var ti=vi[Yr.bin1],ki=Pi[Yr.bin0],ji=Pi[Yr.bin1],Vi=ti-Ur||0,zi=ki-Ur||0,Mi;return ti===void 0?ji===void 0?Mi=0:ki===void 0?Mi=2*(ji-Ur):Mi=(2*ji-ki-Ur)*2/3:ji===void 0?ki===void 0?Mi=0:Mi=(2*Ur-ti-ki)*2/3:ki===void 0?Mi=(2*ji-ti-Ur)*2/3:Mi=ji+Ur-ti-ki,Tt(Ur+Yr.frac*Vi+Ni.frac*(zi+Yr.frac*Mi))}if(H!=="default"){var _t=0,Ct;try{Ct=new Uint8Array(ne*be*4)}catch(vi){Ct=new Array(ne*be*4)}if(H==="smooth"){var jt=x||d,At=b||p,Te=new Array(jt.length),nt=new Array(At.length),ut=new Array(G),ct=x?V_e:U_e,rt=b?V_e:U_e,je,tt,Je;for(F=0;F<jt.length;F++)Te[F]=Math.round(i.c2p(jt[F])-C);for(F=0;F<At.length;F++)nt[F]=Math.round(a.c2p(At[F])-z);for(F=0;F<G;F++)ut[F]=ct(F,Te);for(q=0;q<O;q++)for(je=rt(q,nt),tt=h[je.bin0],Je=h[je.bin1],F=0;F<G;F++,_t+=4)Xe=xt(tt,Je,ut[F],je),H_e(Ct,_t,Xe)}else for(q=0;q<E;q++)for(Qe=h[q],Me=ke(q),F=0;F<A;F++)Xe=Tt(Qe[F],1),_t=(Me*A+te(F))*4,H_e(Ct,_t,Xe);var Mt=Ce.createImageData(ne,be);try{Mt.data.set(Ct)}catch(vi){var Vt=Mt.data,Kt=Vt.length;for(q=0;q<Kt;q++)Vt[q]=Ct[q]}Ce.putImageData(Mt,0,0)}else{var ir=Math.floor(f/2),fr=Math.floor(c/2);for(q=0;q<E;q++)if(Qe=h[q],Me.reverse(),Me[Re]=ke(q+1),!(Me[0]===Me[1]||Me[0]===void 0||Me[1]===void 0))for(gt=te(0),et=[gt,gt],F=0;F<A;F++)et.reverse(),et[Oe]=te(F+1),!(et[0]===et[1]||et[0]===void 0||et[1]===void 0)&&(Pt=Qe[F],Xe=Tt(Pt,(et[1]-et[0])*(Me[1]-Me[0])),Ce.fillStyle="rgba("+Xe.join(",")+")",Ce.fillRect(et[0]+ir,Me[0]+fr,et[1]-et[0]-f,Me[1]-Me[0]-c))}Be=Math.round(Be/me),fe=Math.round(fe/me),Ze=Math.round(Ze/me);var Ot=k_t("rgb("+Be+","+fe+","+Ze+")");e._hmpixcount=(e._hmpixcount||0)+me,e._hmlumcount=(e._hmlumcount||0)+me*Ot.getLuminance();var De=s.selectAll("image").data(o);De.enter().append("svg:image").attr({xmlns:F_t.svg,preserveAspectRatio:"none"}),De.attr({height:O,width:G,x:C,y:z,"xlink:href":ze.toDataURL("image/png")}),H==="fast"&&!k&&De.attr("style",O_t),N_e(s);var _e=l.texttemplate;if(_e){var Fe=D_t(l),Pe={type:"linear",range:[Fe.min,Fe.max],_separators:i._separators,_numFormat:i._numFormat},Ie=l.type==="histogram2dcontour",lt=l.type==="contour",ye=lt?1:0,ue=lt?E-1:E,de=lt?1:0,ht=lt?A-1:A,Et=[];for(F=ye;F<ue;F++){var St;if(lt)St=u.y[F];else if(Ie){if(F===0||F===E-1)continue;St=u.y[F]}else if(u.yCenter)St=u.yCenter[F];else{if(F+1===E&&u.y[F+1]===void 0)continue;St=(u.y[F]+u.y[F+1])/2}var Zt=Math.round(a.c2p(St));if(!(0>Zt||Zt>a._length))for(q=de;q<ht;q++){var qr;if(lt)qr=u.x[q];else if(Ie){if(q===0||q===A-1)continue;qr=u.x[q]}else if(u.xCenter)qr=u.xCenter[q];else{if(q+1===A&&u.x[q+1]===void 0)continue;qr=(u.x[q]+u.x[q+1])/2}var Lr=Math.round(i.c2p(qr));if(!(0>Lr||Lr>i._length)){var vr=P_t({x:qr,y:St},l,e._fullLayout);vr.x=qr,vr.y=St;var Er=u.z[F][q];Er===void 0?(vr.z="",vr.zLabel=""):(vr.z=Er,vr.zLabel=z_t.tickText(Pe,Er,"hover").text);var si=u.text&&u.text[F]&&u.text[F][q];(si===void 0||si===!1)&&(si=""),vr.text=si;var Ei=G0.texttemplateString(_e,vr,e._fullLayout._d3locale,vr,l._meta||{});if(Ei){var Si=Ei.split("<br>"),xi=Si.length,Hi=0;for(U=0;U<xi;U++)Hi=Math.max(Hi,Si[U].length);Et.push({l:xi,c:Hi,t:Ei,x:Lr,y:Zt,z:Er})}}}}var Jr=l.textfont,ci=Jr.size,Di=e._fullLayout.font.size;if(!ci||ci==="auto"){var Lt=1/0,vt=1/0,Dt=0,Bt=0;for(U=0;U<Et.length;U++){var sr=Et[U];if(Dt=Math.max(Dt,sr.l),Bt=Math.max(Bt,sr.c),U<Et.length-1){var br=Et[U+1],zr=Math.abs(br.x-sr.x),Tr=Math.abs(br.y-sr.y);zr&&(Lt=Math.min(Lt,zr)),Tr&&(vt=Math.min(vt,Tr))}}!isFinite(Lt)||!isFinite(vt)?ci=Di:(Lt-=f,vt-=c,Lt/=Bt,vt/=Dt,Lt/=rH/2,vt/=rH,ci=Math.min(Math.floor(Lt),Math.floor(vt),Di))}if(ci<=0||!isFinite(ci))return;var Rr=function(vi){return vi.x},Br=function(vi){return vi.y-ci*(vi.l*rH/2-1)},oi=W_e(s).data(Et);oi.enter().append("g").classed(G_e,1).append("text").attr("text-anchor","middle").each(function(vi){var Pi=B_e.select(this),Yr=Jr.color;(!Yr||Yr==="auto")&&(Yr=I_t.contrast(vi.z===void 0?e._fullLayout.plot_bgcolor:"rgba("+he(vi.z).join()+")")),Pi.attr("data-notex",1).call(O_e.positionText,Rr(vi),Br(vi)).call(L_t.font,{family:Jr.family,size:ci,color:Yr,weight:Jr.weight,style:Jr.style,variant:Jr.variant,textcase:Jr.textcase,lineposition:Jr.lineposition,shadow:Jr.shadow}).text(vi.t).call(O_e.convertToTspans,e)})}})};function U_e(e,t){var r=t.length-2,n=G0.constrain(G0.findBin(e,t),0,r),i=t[n],a=t[n+1],o=G0.constrain(n+(e-i)/(a-i)-.5,0,r),s=Math.round(o),u=Math.abs(o-s);return!o||o===r||!u?{bin0:s,bin1:s,frac:0}:{bin0:s,frac:u,bin1:Math.round(s+u/(o-s))}}function V_e(e,t){var r=t.length-1,n=G0.constrain(G0.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 H_e(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 S_=Se((Plr,Z_e)=>{"use strict";Z_e.exports={min:"zmin",max:"zmax"}});var sD=Se((Ilr,X_e)=>{"use strict";var N_t=Nl();X_e.exports=function(t){N_t.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var uD=Se((Dlr,K_e)=>{"use strict";var Y_e=jc(),_4=Zr(),lD=_4.isArrayOrTypedArray,U_t=hu(),V_t=fc().extractOpts;K_e.exports=function(t,r,n,i,a){a||(a={});var o=a.isContour,s=t.cd[0],u=s.trace,l=t.xa,f=t.ya,c=s.x,h=s.y,d=s.z,p=s.xCenter,x=s.yCenter,b=s.zmask,y=u.zhoverformat,k=c,E=h,A,L,_,C;if(t.index!==!1){try{_=Math.round(t.index[1]),C=Math.round(t.index[0])}catch(re){_4.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(_<0||_>=d[0].length||C<0||C>d.length)return}else{if(Y_e.inbox(r-c[0],r-c[c.length-1],0)>0||Y_e.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var M;for(k=[2*c[0]-c[1]],M=1;M<c.length;M++)k.push((c[M]+c[M-1])/2);for(k.push([2*c[c.length-1]-c[c.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]])}_=Math.max(0,Math.min(k.length-2,_4.findBin(r,k))),C=Math.max(0,Math.min(E.length-2,_4.findBin(n,E)))}var v=l.c2p(c[_]),z=l.c2p(c[_+1]),T=f.c2p(h[C]),F=f.c2p(h[C+1]),q,U;o?(q=s.orig_x||c,U=s.orig_y||h,z=v,A=q[_],F=T,L=U[C]):(q=s.orig_x||p||c,U=s.orig_y||x||h,A=p?q[_]:(q[_]+q[_+1])/2,L=x?U[C]:(U[C]+U[C+1])/2,l&&l.type==="category"&&(A=c[_]),f&&f.type==="category"&&(L=h[C]),u.zsmooth&&(v=z=l.c2p(A),T=F=f.c2p(L)));var H=d[C][_];if(b&&!b[C][_]&&(H=void 0),!(H===void 0&&!u.hoverongaps)){var j;lD(s.hovertext)&&lD(s.hovertext[C])?j=s.hovertext[C][_]:lD(s.text)&&lD(s.text[C])&&(j=s.text[C][_]);var G=V_t(u),O={type:"linear",range:[G.min,G.max],hoverformat:y,_separators:l._separators,_numFormat:l._numFormat},W=U_t.tickText(O,H,"hover").text;return[_4.extendFlat(t,{index:u._after2before?u._after2before[C][_]:[C,_],distance:t.maxHoverDistance,spikeDistance:t.maxSpikeDistance,x0:v,x1:z,y0:T,y1:F,xLabelVal:A,yLabelVal:L,zLabelVal:H,zLabel:W,text:j})]}}});var $_e=Se((Rlr,J_e)=>{"use strict";J_e.exports={attributes:ET(),supplyDefaults:J1e(),calc:iD(),plot:oD(),colorbar:S_(),style:sD(),hoverPoints:uD(),moduleType:"trace",name:"heatmap",basePlotModule:Th(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var exe=Se((Flr,Q_e)=>{"use strict";Q_e.exports=$_e()});var iH=Se((qlr,txe)=>{"use strict";txe.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var ixe=Se((Blr,rxe)=>{"use strict";rxe.exports={eventDataKeys:["binNumber"]}});var fD=Se((Olr,oxe)=>{"use strict";var Pv=Lm(),nxe=Gc().axisHoverFormat,H_t=Du().hovertemplateAttrs,G_t=Du().texttemplateAttrs,nH=uc(),axe=iH(),W_t=ixe(),aH=vu().extendFlat;oxe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:nxe("x"),yhoverformat:nxe("y"),text:aH({},Pv.text,{}),hovertext:aH({},Pv.hovertext,{}),orientation:Pv.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:axe("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:axe("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:H_t({},{keys:W_t.eventDataKeys}),texttemplate:G_t({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:aH({},Pv.textposition,{arrayOk:!1}),textfont:nH({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:nH({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:nH({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Pv.insidetextanchor,textangle:Pv.textangle,cliponaxis:Pv.cliponaxis,constraintext:Pv.constraintext,marker:Pv.marker,offsetgroup:Pv.offsetgroup,alignmentgroup:Pv.alignmentgroup,selected:Pv.selected,unselected:Pv.unselected,zorder:Pv.zorder}});var fxe=Se((Nlr,uxe)=>{"use strict";var sxe=Ul(),x4=Zr(),lxe=Pl(),j_t=r0().handleText,Z_t=RI(),X_t=fD();uxe.exports=function(t,r,n,i){function a(k,E){return x4.coerce(t,r,X_t,k,E)}var o=a("x"),s=a("y"),u=a("cumulative.enabled");u&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var l=a("textposition");j_t(t,r,i,a,l,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat");var f=a("orientation",s&&!o?"h":"v"),c=f==="v"?"x":"y",h=f==="v"?"y":"x",d=o&&s?Math.min(x4.minRowLength(o)&&x4.minRowLength(s)):x4.minRowLength(r[c]||[]);if(!d){r.visible=!1;return}r._length=d;var p=sxe.getComponentMethod("calendars","handleTraceDefaults");p(t,r,["x","y"],i);var x=r[h];x&&a("histfunc"),a("histnorm"),a("autobin"+c),Z_t(t,r,a,n,i),x4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,y=sxe.getComponentMethod("errorbars","supplyDefaults");y(t,r,b||lxe.defaultLine,{axis:"y"}),y(t,r,b||lxe.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var hD=Se((Ulr,dxe)=>{"use strict";var b4=Zr(),Y_t=$c(),cD=Ul().traceIs,K_t=Hb(),J_t=r0().validateCornerradius,cxe=b4.nestedProperty,oH=Ob().getAxisGroup,hxe=[{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"}],$_t=["x","y"];dxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,u,l,f,c,h,d;function p(H,j){return b4.coerce(s._input,s,s._module.attributes,H,j)}function x(H){return H.orientation==="v"?"x":"y"}function b(H,j){var G=Y_t.getFromTrace({_fullLayout:r},H,j);return G.type}function y(H,j,G){var O=H.uid+"__"+G;j||(j=O);var W=b(H,G),re=H[G+"calendar"]||"",ne=n[j],be=!0;ne&&(W===ne.axType&&re===ne.calendar?(be=!1,ne.traces.push(H),ne.dirs.push(G)):(j=O,W!==ne.axType&&b4.warn(["Attempted to group the bins of trace",H.index,"set on a","type:"+W,"axis","with bins on","type:"+ne.axType,"axis."].join(" ")),re!==ne.calendar&&b4.warn(["Attempted to group the bins of trace",H.index,"set with a",re,"calendar","with bins",ne.calendar?"on a "+ne.calendar+" calendar":"w/o a set calendar"].join(" ")))),be&&(n[j]={traces:[H],dirs:[G],axType:W,calendar:H[G+"calendar"]||""}),H["_"+G+"bingroup"]=j}for(c=0;c<t.length;c++)if(s=t[c],cD(s,"histogram")){if(i.push(s),delete s._xautoBinFinished,delete s._yautoBinFinished,s.type==="histogram"){var k=p("marker.cornerradius",r.barcornerradius);s.marker&&(s.marker.cornerradius=J_t(k))}cD(s,"2dMap")||K_t(s._input,s,r,p,r.barmode)}var E=r._alignmentOpts||{};for(c=0;c<i.length;c++){if(s=i[c],l="",!cD(s,"2dMap")){if(f=x(s),r.barmode==="group"&&s.alignmentgroup){var A=s[f+"axis"],L=oH(r,A)+s.orientation;(E[L]||{})[s.alignmentgroup]&&(l=L)}!l&&r.barmode!=="overlay"&&(l=oH(r,s.xaxis)+oH(r,s.yaxis)+x(s))}l?(a[l]||(a[l]=[]),a[l].push(s)):o.push(s)}for(l in a){if(u=a[l],u.length===1){o.push(u[0]);continue}var _=!1;for(u.length&&(s=u[0],_=p("bingroup")),l=_||l,c=0;c<u.length;c++){s=u[c];var C=s._input.bingroup;C&&C!==l&&b4.warn(["Trace",s.index,"must match","within bingroup",l+".","Ignoring its bingroup:",C,"setting."].join(" ")),s.bingroup=l,y(s,l,x(s))}}for(c=0;c<o.length;c++){s=o[c];var M=p("bingroup");if(cD(s,"2dMap"))for(d=0;d<2;d++){f=$_t[d];var v=p(f+"bingroup",M?M+"__"+f:null);y(s,v,f)}else y(s,M,x(s))}for(l in n){var z=n[l];for(u=z.traces,h=0;h<hxe.length;h++){var T=hxe[h],F=T.name,q,U;if(!(F==="nbins"&&z.sizeFound)){for(c=0;c<u.length;c++){if(s=u[c],f=z.dirs[c],q=T.aStr[f],cxe(s._input,q).get()!==void 0){z[F]=p(q),z[F+"Found"]=!0;break}U=(s._autoBin||{})[f]||{},U[F]&&cxe(s,q).set(U[F])}if(F==="start"||F==="end")for(;c<u.length;c++)s=u[c],s["_"+f+"bingroup"]&&(U=(s._autoBin||{})[f]||{},p(q,U[F]));F==="nbins"&&!z.sizeFound&&!z.nbinsFound&&(s=u[0],z[F]=p(q))}}}}});var vxe=Se((Vlr,pxe)=>{"use strict";var Q_t=TT().hoverPoints,ext=hu().hoverLabelText;pxe.exports=function(t,r,n,i,a){var o=Q_t(t,r,n,i,a);if(o){t=o[0];var s=t.cd[t.index],u=t.cd[0].trace;if(!u.cumulative.enabled){var l=u.orientation==="h"?"y":"x";t[l+"Label"]=ext(t[l+"a"],[s.ph0,s.ph1],u[l+"hoverformat"])}return o}}});var sH=Se((Hlr,yxe)=>{"use strict";yxe.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 u=0;u<o.length;u++)s=s.concat(n._indexToPoints[o[u]])}else s=o;t.pointIndices=s}return t}});var gxe=Se((Glr,mxe)=>{"use strict";mxe.exports={attributes:fD(),layoutAttributes:DI(),supplyDefaults:fxe(),crossTraceDefaults:hD(),supplyLayoutDefaults:kV(),calc:JV().calc,crossTraceCalc:Gb().crossTraceCalc,plot:i2().plot,layerName:"barlayer",style:N0().style,styleOnSelect:N0().styleOnSelect,colorbar:ep(),hoverPoints:vxe(),selectPoints:AT(),eventData:sH(),moduleType:"trace",name:"histogram",basePlotModule:Th(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var xxe=Se((Wlr,_xe)=>{"use strict";_xe.exports=gxe()});var pD=Se((jlr,wxe)=>{"use strict";var Vy=fD(),bxe=iH(),dD=ET(),txt=zf(),lH=Gc().axisHoverFormat,rxt=Du().hovertemplateAttrs,ixt=Du().texttemplateAttrs,nxt=Xf(),w4=vu().extendFlat;wxe.exports=w4({x:Vy.x,y:Vy.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:Vy.histnorm,histfunc:Vy.histfunc,nbinsx:Vy.nbinsx,xbins:bxe("x"),nbinsy:Vy.nbinsy,ybins:bxe("y"),autobinx:Vy.autobinx,autobiny:Vy.autobiny,bingroup:w4({},Vy.bingroup,{}),xbingroup:w4({},Vy.bingroup,{}),ybingroup:w4({},Vy.bingroup,{}),xgap:dD.xgap,ygap:dD.ygap,zsmooth:dD.zsmooth,xhoverformat:lH("x"),yhoverformat:lH("y"),zhoverformat:lH("z",1),hovertemplate:rxt({},{keys:"z"}),texttemplate:ixt({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:dD.textfont,showlegend:w4({},txt.showlegend,{dflt:!1})},nxt("",{cLetter:"z",autoColorDflt:!1}))});var uH=Se((Zlr,Axe)=>{"use strict";var axt=Ul(),Txe=Zr();Axe.exports=function(t,r,n,i){var a=n("x"),o=n("y"),s=Txe.minRowLength(a),u=Txe.minRowLength(o);if(!s||!u){r.visible=!1;return}r._length=Math.min(s,u);var l=axt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y"],i);var f=n("z")||n("marker.color");f&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var Mxe=Se((Xlr,Sxe)=>{"use strict";var oxt=Zr(),sxt=uH(),lxt=GV(),uxt=ed(),fxt=g4(),cxt=pD();Sxe.exports=function(t,r,n,i){function a(o,s){return oxt.coerce(t,r,cxt,o,s)}sxt(t,r,a,i),r.visible!==!1&&(lxt(t,r,a,i),uxt(t,r,i,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),fxt(a,i),a("xhoverformat"),a("yhoverformat"))}});var Cxe=Se((Ylr,kxe)=>{"use strict";var hxt=uD(),Exe=hu().hoverLabelText;kxe.exports=function(t,r,n,i,a){var o=hxt(t,r,n,i,a);if(o){t=o[0];var s=t.index,u=s[0],l=s[1],f=t.cd[0],c=f.trace,h=f.xRanges[l],d=f.yRanges[u];return t.xLabel=Exe(t.xa,[h[0],h[1]],c.xhoverformat),t.yLabel=Exe(t.ya,[d[0],d[1]],c.yhoverformat),o}}});var zxe=Se((Klr,Lxe)=>{"use strict";Lxe.exports={attributes:pD(),supplyDefaults:Mxe(),crossTraceDefaults:hD(),calc:iD(),plot:oD(),layerName:"heatmaplayer",colorbar:S_(),style:sD(),hoverPoints:Cxe(),eventData:sH(),moduleType:"trace",name:"histogram2d",basePlotModule:Th(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var Ixe=Se((Jlr,Pxe)=>{"use strict";Pxe.exports=zxe()});var vD=Se(($lr,Dxe)=>{"use strict";Dxe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var T4=Se((Qlr,Bxe)=>{"use strict";var id=ET(),yD=Zc(),Fxe=Gc(),fH=Fxe.axisHoverFormat,dxt=Fxe.descriptionOnlyNumbers,pxt=Xf(),vxt=Id().dash,yxt=uc(),PT=vu().extendFlat,qxe=vD(),mxt=qxe.COMPARISON_OPS2,gxt=qxe.INTERVAL_OPS,Rxe=yD.line;Bxe.exports=PT({z:id.z,x:id.x,x0:id.x0,dx:id.dx,y:id.y,y0:id.y0,dy:id.dy,xperiod:id.xperiod,yperiod:id.yperiod,xperiod0:yD.xperiod0,yperiod0:yD.yperiod0,xperiodalignment:id.xperiodalignment,yperiodalignment:id.yperiodalignment,text:id.text,hovertext:id.hovertext,transpose:id.transpose,xtype:id.xtype,ytype:id.ytype,xhoverformat:fH("x"),yhoverformat:fH("y"),zhoverformat:fH("z",1),hovertemplate:id.hovertemplate,texttemplate:PT({},id.texttemplate,{}),textfont:PT({},id.textfont,{}),hoverongaps:id.hoverongaps,connectgaps:PT({},id.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:yxt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:dxt("contour label")},operation:{valType:"enumerated",values:[].concat(mxt).concat(gxt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:PT({},Rxe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:vxt,smoothing:PT({},Rxe.smoothing,{}),editType:"plot"},zorder:yD.zorder},pxt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var hH=Se((eur,Nxe)=>{"use strict";var Hp=pD(),qg=T4(),_xt=Xf(),cH=Gc().axisHoverFormat,Oxe=vu().extendFlat;Nxe.exports=Oxe({x:Hp.x,y:Hp.y,z:Hp.z,marker:Hp.marker,histnorm:Hp.histnorm,histfunc:Hp.histfunc,nbinsx:Hp.nbinsx,xbins:Hp.xbins,nbinsy:Hp.nbinsy,ybins:Hp.ybins,autobinx:Hp.autobinx,autobiny:Hp.autobiny,bingroup:Hp.bingroup,xbingroup:Hp.xbingroup,ybingroup:Hp.ybingroup,autocontour:qg.autocontour,ncontours:qg.ncontours,contours:qg.contours,line:{color:qg.line.color,width:Oxe({},qg.line.width,{dflt:.5}),dash:qg.line.dash,smoothing:qg.line.smoothing,editType:"plot"},xhoverformat:cH("x"),yhoverformat:cH("y"),zhoverformat:cH("z",1),hovertemplate:Hp.hovertemplate,texttemplate:qg.texttemplate,textfont:qg.textfont},_xt("",{cLetter:"z",editTypeOverride:"calc"}))});var mD=Se((tur,Uxe)=>{"use strict";Uxe.exports=function(t,r,n,i){var a=i("contours.start"),o=i("contours.end"),s=a===!1||o===!1,u=n("contours.size"),l;s?l=r.autocontour=!0:l=n("autocontour",!1),(l||!u)&&n("ncontours")}});var dH=Se((rur,Vxe)=>{"use strict";var xxt=Zr();Vxe.exports=function(t,r,n,i){i||(i={});var a=t("contours.showlabels");if(a){var o=r.font;xxt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}i.hasHover!==!1&&t("zhoverformat")}});var gD=Se((iur,Hxe)=>{"use strict";var bxt=ed(),wxt=dH();Hxe.exports=function(t,r,n,i,a){var o=n("contours.coloring"),s,u="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(u=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,bxt(t,r,i,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),wxt(n,i,u,a)}});var Zxe=Se((nur,jxe)=>{"use strict";var Gxe=Zr(),Txt=uH(),Axt=mD(),Sxt=gD(),Mxt=g4(),Wxe=hH();jxe.exports=function(t,r,n,i){function a(s,u){return Gxe.coerce(t,r,Wxe,s,u)}function o(s){return Gxe.coerce2(t,r,Wxe,s)}Txt(t,r,a,i),r.visible!==!1&&(Axt(t,r,a,o),Sxt(t,r,a,i),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),r.contours&&r.contours.coloring==="heatmap"&&Mxt(a,i))}});var yH=Se((aur,Yxe)=>{"use strict";var vH=hu(),pH=Zr();Yxe.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=pH.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=pH.aggNums(Math.max,null,r));var o=Xxe(i,a,t.ncontours);n.size=o.dtick,n.start=vH.tickFirst(o),o.range.reverse(),n.end=vH.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={}),pH.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,u=n.end,l=t._input.contours;if(s>u&&(n.start=l.start=u,u=n.end=l.end=s,s=n.start),!(n.size>0)){var f;s===u?f=1:f=Xxe(s,u,t.ncontours).dtick,l.size=n.size=f}}};function Xxe(e,t,r){var n={type:"linear",range:[e,t]};return vH.autoTicks(n,(t-e)/(r||15)),n}});var A4=Se((our,Kxe)=>{"use strict";Kxe.exports=function(t){return t.end+t.size/1e6}});var mH=Se((sur,$xe)=>{"use strict";var Jxe=fc(),Ext=iD(),kxt=yH(),Cxt=A4();$xe.exports=function(t,r){var n=Ext(t,r),i=n[0].z;kxt(r,i);var a=r.contours,o=Jxe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var u=a.start,l=Cxt(a),f=a.size||1,c=Math.floor((l-u)/f)+1;isFinite(f)||(f=1,c=1);var h=u-f/2,d=h+c*f;s=[h,d]}else s=i;return Jxe.calc(t,r,{vals:s,cLetter:"z"}),n}});var S4=Se((lur,Qxe)=>{"use strict";Qxe.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 gH=Se((uur,ebe)=>{"use strict";var _D=S4();ebe.exports=function(t){var r=t[0].z,n=r.length,i=r[0].length,a=n===2||i===2,o,s,u,l,f,c,h,d,p;for(s=0;s<n-1;s++)for(l=[],s===0&&(l=l.concat(_D.BOTTOMSTART)),s===n-2&&(l=l.concat(_D.TOPSTART)),o=0;o<i-1;o++)for(u=l.slice(),o===0&&(u=u.concat(_D.LEFTSTART)),o===i-2&&(u=u.concat(_D.RIGHTSTART)),f=o+","+s,c=[[r[s][o],r[s][o+1]],[r[s+1][o],r[s+1][o+1]]],p=0;p<t.length;p++)d=t[p],h=Lxt(d.level,c),h&&(d.crossings[f]=h,u.indexOf(h)!==-1&&(d.starts.push([o,s]),a&&u.indexOf(h,u.indexOf(h)+1)!==-1&&d.starts.push([o,s])))};function Lxt(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 _H=Se((fur,ibe)=>{"use strict";var xD=Zr(),IT=S4();ibe.exports=function(t,r,n){var i,a,o,s,u;for(r=r||.01,n=n||.01,o=0;o<t.length;o++){for(s=t[o],u=0;u<s.starts.length;u++)a=s.starts[u],tbe(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),tbe(s,a,void 0,r,n);i===1e4&&xD.log("Infinite loop in contour?")}};function M4(e,t,r,n){return Math.abs(e[0]-t[0])<r&&Math.abs(e[1]-t[1])<n}function zxt(e,t){var r=e[2]-t[2],n=e[3]-t[3];return Math.sqrt(r*r+n*n)}function tbe(e,t,r,n,i){var a=t.join(","),o=e.crossings[a],s=Pxt(o,r,t),u=[rbe(e,t,[-s[0],-s[1]])],l=e.z.length,f=e.z[0].length,c=t.slice(),h=s.slice(),d;for(d=0;d<1e4;d++){if(o>20?(o=IT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=IT.SADDLEREMAINDER[o]):delete e.crossings[a],s=IT.NEWDELTA[o],!s){xD.log("Found bad marching index:",o,t,e.level);break}u.push(rbe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),M4(u[u.length-1],u[u.length-2],n,i)&&u.pop();var p=s[0]&&(t[0]<0||t[0]>f-2)||s[1]&&(t[1]<0||t[1]>l-2),x=t[0]===c[0]&&t[1]===c[1]&&s[0]===h[0]&&s[1]===h[1];if(x||r&&p)break;o=e.crossings[a]}d===1e4&&xD.log("Infinite loop in contour?");var b=M4(u[0],u[u.length-1],n,i),y=0,k=.2*e.smoothing,E=[],A=0,L,_,C,M,v,z,T,F,q,U,H;for(d=1;d<u.length;d++)T=zxt(u[d],u[d-1]),y+=T,E.push(T);var j=y/E.length*k;function G(re){return u[re%u.length]}for(d=u.length-2;d>=A;d--)if(L=E[d],L<j){for(C=0,_=d-1;_>=A&&L+E[_]<j;_--)L+=E[_];if(b&&d===u.length-2)for(C=0;C<_&&L+E[C]<j;C++)L+=E[C];v=d-_+C+1,z=Math.floor((d+_+C+2)/2),!b&&d===u.length-2?M=u[u.length-1]:!b&&_===-1?M=u[0]:v%2?M=G(z):M=[(G(z)[0]+G(z+1)[0])/2,(G(z)[1]+G(z+1)[1])/2],u.splice(_+1,d-_+1,M),d=_+1,C&&(A=C),b&&(d===u.length-2?u[C]=u[u.length-1]:d===0&&(u[u.length-1]=u[0]))}for(u.splice(0,A),d=0;d<u.length;d++)u[d].length=2;if(!(u.length<2))if(b)u.pop(),e.paths.push(u);else{r||xD.log("Unclosed interior contour?",e.level,c.join(","),u.join("L"));var O=!1;for(F=0;F<e.edgepaths.length;F++)if(U=e.edgepaths[F],!O&&M4(U[0],u[u.length-1],n,i)){u.pop(),O=!0;var W=!1;for(q=0;q<e.edgepaths.length;q++)if(H=e.edgepaths[q],M4(H[H.length-1],u[0],n,i)){W=!0,u.shift(),e.edgepaths.splice(F,1),q===F?e.paths.push(u.concat(H)):(q>F&&q--,e.edgepaths[q]=H.concat(u,U));break}W||(e.edgepaths[F]=u.concat(U))}for(F=0;F<e.edgepaths.length&&!O;F++)U=e.edgepaths[F],M4(U[U.length-1],u[0],n,i)&&(u.shift(),e.edgepaths[F]=U.concat(u),O=!0);O||e.edgepaths.push(u)}}function Pxt(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:IT.BOTTOMSTART.indexOf(e)!==-1?i=1:IT.LEFTSTART.indexOf(e)!==-1?n=1:IT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function rbe(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 u=(e.level-a)/(e.z[i][n+1]-a),l=(u!==1?(1-u)*o.c2l(e.x[n]):0)+(u!==0?u*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(l),!0),s.c2p(e.y[i],!0),n+u,i]}else{var f=(e.level-a)/(e.z[i+1][n]-a),c=(f!==1?(1-f)*s.c2l(e.y[i]):0)+(f!==0?f*s.c2l(e.y[i+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(c),!0),n,i+f]}}});var sbe=Se((cur,obe)=>{"use strict";var xH=vD(),Ixt=_u();obe.exports={"[]":nbe("[]"),"][":nbe("]["),">":bH(">"),"<":bH("<"),"=":bH("=")};function abe(e,t){var r=Array.isArray(t),n;function i(a){return Ixt(a)?+a:null}return xH.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):xH.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:xH.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function nbe(e){return function(t){t=abe(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 bH(e){return function(t){return t=abe(e,t),{start:t,end:1/0,size:1/0}}}});var wH=Se((hur,ube)=>{"use strict";var lbe=Zr(),Dxt=sbe(),Rxt=A4();ube.exports=function(t,r,n){for(var i=t.type==="constraint"?Dxt[t._operation](t.value):t,a=i.size,o=[],s=Rxt(i),u=n.trace._carpetTrace,l=u?{xaxis:u.aaxis,yaxis:u.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},f=i.start;f<s;f+=a)if(o.push(lbe.extendFlat({level:f,crossings:{},starts:[],edgepaths:[],paths:[],z:n.z,smoothing:n.trace.line.smoothing},l)),o.length>1e3){lbe.warn("Too many contours, clipping at 1000",t);break}return o}});var TH=Se((dur,cbe)=>{"use strict";var DT=Zr();cbe.exports=function(e,t){var r,n,i,a=function(u){return u.reverse()},o=function(u){return u};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&DT.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&&DT.warn("Contour data invalid for the specified inequality range operation."),n=fbe(e[0]),i=fbe(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 fbe(e){return DT.extendFlat({},e,{edgepaths:DT.extendDeep([],e.edgepaths),paths:DT.extendDeep([],e.paths),starts:DT.extendDeep([],e.starts)})}});var AH=Se((pur,hbe)=>{"use strict";hbe.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,u=r.y.length,l=-1/0,f=1/0;for(i=0;i<u;i++)f=Math.min(f,n[i][0]),f=Math.min(f,n[i][s-1]),l=Math.max(l,n[i][0]),l=Math.max(l,n[i][s-1]);for(i=1;i<s-1;i++)f=Math.min(f,n[0][i]),f=Math.min(f,n[u-1][i]),l=Math.max(l,n[0][i]),l=Math.max(l,n[u-1][i]);var c=t.value,h,d;switch(t._operation){case">":c>l&&(r.prefixBoundary=!0);break;case"<":(c<f||r.starts.length&&c===f)&&(r.prefixBoundary=!0);break;case"[]":h=Math.min(c[0],c[1]),d=Math.max(c[0],c[1]),(d<f||h>l||r.starts.length&&d===f)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(c[0],c[1]),d=Math.max(c[0],c[1]),h<f&&d>l&&(r.prefixBoundary=!0);break}break}}});var bD=Se(Gp=>{"use strict";var k4=Nl(),Bd=Zr(),Bg=yu(),Fxt=fc(),vbe=Bf(),dbe=hu(),pbe=gm(),qxt=oD(),ybe=gH(),mbe=_H(),Bxt=wH(),Oxt=TH(),gbe=AH(),E4=S4(),Im=E4.LABELOPTIMIZER;Gp.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;Bd.makeTraceGroups(i,n,"contour").each(function(s){var u=k4.select(this),l=s[0],f=l.trace,c=l.x,h=l.y,d=f.contours,p=Bxt(d,r,l),x=Bd.ensureSingle(u,"g","heatmapcoloring"),b=[];d.coloring==="heatmap"&&(b=[s]),qxt(t,r,b,x),ybe(p),mbe(p);var y=a.c2p(c[0],!0),k=a.c2p(c[c.length-1],!0),E=o.c2p(h[0],!0),A=o.c2p(h[h.length-1],!0),L=[[y,A],[k,A],[k,E],[y,E]],_=p;d.type==="constraint"&&(_=Oxt(p,d._operation)),Nxt(u,L,d),Uxt(u,_,L,d),Vxt(u,p,t,l,d),Gxt(u,r,t,l,L)})};function Nxt(e,t,r){var n=Bd.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 Uxt(e,t,r,n){var i=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",a="M"+r.join("L")+"Z";i&&gbe(t,n);var o=Bd.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(i?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(u){var l=(u.prefixBoundary?a:"")+_be(u,r);l?k4.select(this).attr("d",l).style("stroke","none"):k4.select(this).remove()})}function _be(e,t){var r="",n=0,i=e.edgepaths.map(function(y,k){return k}),a=!0,o,s,u,l,f,c;function h(y){return Math.abs(y[1]-t[0][1])<.01}function d(y){return Math.abs(y[1]-t[2][1])<.01}function p(y){return Math.abs(y[0]-t[0][0])<.01}function x(y){return Math.abs(y[0]-t[2][0])<.01}for(;i.length;){for(c=Bg.smoothopen(e.edgepaths[n],e.smoothing),r+=a?c:c.replace(/^M/,"L"),i.splice(i.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],l=-1,u=0;u<4;u++){if(!o){Bd.log("Missing end?",n,e);break}for(h(o)&&!x(o)?s=t[1]:p(o)?s=t[0]:d(o)?s=t[3]:x(o)&&(s=t[2]),f=0;f<e.edgepaths.length;f++){var b=e.edgepaths[f][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,l=f):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,l=f):Bd.log("endpt to newendpt is not vert. or horz.",o,s,b)}if(o=s,l>=0)break;r+="L"+s}if(l===e.edgepaths.length){Bd.log("unclosed perimeter path");break}n=l,a=i.indexOf(n)===-1,a&&(n=i[0],r+="Z")}for(n=0;n<e.paths.length;n++)r+=Bg.smoothclosed(e.paths[n],e.smoothing);return r}function Vxt(e,t,r,n,i){var a=r._context.staticPlot,o=Bd.ensureSingle(e,"g","contourlines"),s=i.showlines!==!1,u=i.showlabels,l=s&&u,f=Gp.createLines(o,s||u,t,a),c=Gp.createLineClip(o,l,r,n.trace.uid),h=e.selectAll("g.contourlabels").data(u?[0]:[]);if(h.exit().remove(),h.enter().append("g").classed("contourlabels",!0),u){var d=[],p=[];Bd.clearLocationCache();var x=Gp.labelFormatter(r,n),b=Bg.tester.append("text").attr("data-notex",1).call(Bg.font,i.labelfont),y=t[0].xaxis,k=t[0].yaxis,E=y._length,A=k._length,L=y.range,_=k.range,C=Bd.aggNums(Math.min,null,n.x),M=Bd.aggNums(Math.max,null,n.x),v=Bd.aggNums(Math.min,null,n.y),z=Bd.aggNums(Math.max,null,n.y),T=Math.max(y.c2p(C,!0),0),F=Math.min(y.c2p(M,!0),E),q=Math.max(k.c2p(z,!0),0),U=Math.min(k.c2p(v,!0),A),H={};L[0]<L[1]?(H.left=T,H.right=F):(H.left=F,H.right=T),_[0]<_[1]?(H.top=q,H.bottom=U):(H.top=U,H.bottom=q),H.middle=(H.top+H.bottom)/2,H.center=(H.left+H.right)/2,d.push([[H.left,H.top],[H.right,H.top],[H.right,H.bottom],[H.left,H.bottom]]);var j=Math.sqrt(E*E+A*A),G=E4.LABELDISTANCE*j/Math.max(1,t.length/E4.LABELINCREASE);f.each(function(O){var W=Gp.calcTextOpts(O.level,x,b,r);k4.select(this).selectAll("path").each(function(){var re=this,ne=Bd.getVisibleSegment(re,H,W.height/2);if(ne&&!(ne.len<(W.width+W.height)*E4.LABELMIN))for(var be=Math.min(Math.ceil(ne.len/G),E4.LABELMAX),ze=0;ze<be;ze++){var Ce=Gp.findBestTextLocation(re,ne,W,p,H);if(!Ce)break;Gp.addLabelData(Ce,W,p,d)}})}),b.remove(),Gp.drawLabels(h,p,r,c,l?d:null)}u&&!s&&f.remove()}Gp.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(u){return u.pedgepaths||u.edgepaths});o.exit().remove(),o.enter().append("path").classed("openline",!0),o.attr("d",function(u){return Bg.smoothopen(u,i)}).style("stroke-miterlimit",1).style("vector-effect",n?"none":"non-scaling-stroke");var s=a.selectAll("path.closedline").data(function(u){return u.ppaths||u.paths});s.exit().remove(),s.enter().append("path").classed("closedline",!0),s.attr("d",function(u){return Bg.smoothclosed(u,i)}).style("stroke-miterlimit",1).style("vector-effect",n?"none":"non-scaling-stroke")}return a};Gp.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),Bg.setClipUrl(e,a,r),o};Gp.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,pbe(a,r);else{var o=Fxt.extractOpts(n);if(o&&o.colorbar&&o.colorbar._axis)a=o.colorbar._axis;else{if(i.type==="constraint"){var s=i.value;Bd.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),pbe(a,r),dbe.prepTicks(a),a._tmin=null,a._tmax=null}}return function(u){return dbe.tickText(a,u).text}};Gp.calcTextOpts=function(e,t,r,n){var i=t(e);r.text(i).call(vbe.convertToTspans,n);var a=r.node(),o=Bg.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}};Gp.findBestTextLocation=function(e,t,r,n,i){var a=r.width,o,s,u,l,f;t.isClosed?(s=t.len/Im.INITIALSEARCHPOINTS,o=t.min+s/2,u=t.max):(s=(t.len-a)/(Im.INITIALSEARCHPOINTS+1),o=t.min+s+a/2,u=t.max-(s+a)/2);for(var c=1/0,h=0;h<Im.ITERATIONS;h++){for(var d=o;d<u;d+=s){var p=Bd.getTextLocation(e,t.total,d,a),x=Hxt(p,r,n,i);x<c&&(c=x,f=p,l=d)}if(c>Im.MAXCOST*2)break;h&&(s/=2),o=l-s/2,u=o+s*1.5}if(c<=Im.MAXCOST)return f};function Hxt(e,t,r,n){var i=t.width/2,a=t.height/2,o=e.x,s=e.y,u=e.theta,l=Math.cos(u)*i,f=Math.sin(u)*i,c=(o>n.center?n.right-o:o-n.left)/(l+Math.abs(Math.sin(u)*a)),h=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(f)+Math.cos(u)*a);if(c<1||h<1)return 1/0;var d=Im.EDGECOST*(1/(c-1)+1/(h-1));d+=Im.ANGLECOST*u*u;for(var p=o-l,x=s-f,b=o+l,y=s+f,k=0;k<r.length;k++){var E=r[k],A=Math.cos(E.theta)*E.width/2,L=Math.sin(E.theta)*E.width/2,_=Bd.segmentDistance(p,x,b,y,E.x-A,E.y-L,E.x+A,E.y+L)*2/(t.height+E.height),C=E.level===t.level,M=C?Im.SAMELEVELDISTANCE:1;if(_<=M)return 1/0;var v=Im.NEIGHBORCOST*(C?Im.SAMELEVELFACTOR:1);d+=v/(_-M)}return d}Gp.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,u=e.y,l=e.theta,f=Math.sin(l),c=Math.cos(l),h=function(p,x){return[s+p*c-x*f,u+p*f+x*c]},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:u,dy:t.dy,theta:l,level:t.level,width:a,height:o}),n.push(d)};Gp.drawLabels=function(e,t,r,n,i){var a=e.selectAll("text").data(t,function(l){return l.text+","+l.x+","+l.y+","+l.theta});if(a.exit().remove(),a.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(l){var f=l.x+Math.sin(l.theta)*l.dy,c=l.y-Math.cos(l.theta)*l.dy;k4.select(this).text(l.text).attr({x:f,y:c,transform:"rotate("+180*l.theta/Math.PI+" "+f+" "+c+")"}).call(vbe.convertToTspans,r)}),i){for(var o="",s=0;s<i.length;s++)o+="M"+i[s].join("L")+"Z";var u=Bd.ensureSingle(n,"path","");u.attr("d",o)}};function Gxt(e,t,r,n,i){var a=n.trace,o=r._fullLayout._clips,s="clip"+a.uid,u=o.selectAll("#"+s).data(a.connectgaps?[]:[0]);if(u.enter().append("clipPath").classed("contourclip",!0).attr("id",s),u.exit().remove(),a.connectgaps===!1){var l={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:t.xaxis,yaxis:t.yaxis,x:n.x,y:n.y,z:Wxt(n),smoothing:0};ybe([l]),mbe([l]),gbe([l],{type:"levels"});var f=Bd.ensureSingle(u,"path","");f.attr("d",(l.prefixBoundary?"M"+i.join("L")+"Z":"")+_be(l,i))}else s=null;Bg.setClipUrl(e,s,r)}function Wxt(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 MH=Se((yur,xbe)=>{"use strict";var jxt=Nl(),SH=fc(),Zxt=A4();xbe.exports=function(t){var r=t.contours,n=r.start,i=Zxt(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring==="lines"?0:1,u=SH.extractOpts(t);isFinite(a)||(a=1,o=1);var l=u.reversescale?SH.flipScale(u.colorscale):u.colorscale,f=l.length,c=new Array(f),h=new Array(f),d,p,x=u.min,b=u.max;if(r.coloring==="heatmap"){for(p=0;p<f;p++)d=l[p],c[p]=d[0]*(b-x)+x,h[p]=d[1];var y=jxt.extent([x,b,r.start,r.start+a*(o-1)]),k=y[x<b?0:1],E=y[x<b?1:0];k!==x&&(c.splice(0,0,k),h.splice(0,0,h[0])),E!==b&&(c.push(E),h.push(h[h.length-1]))}else{var A=t._input&&typeof t._input.zmin=="number"&&typeof t._input.zmax=="number";for(A&&(n<=x||i>=b)&&(n<=x&&(n=x),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),p=0;p<f;p++)d=l[p],c[p]=(d[0]*(o+s-1)-s/2)*a+n,h[p]=d[1];(A||t.autocontour)&&(c[0]>x&&(c.unshift(x),h.unshift(h[0])),c[c.length-1]<b&&(c.push(b),h.push(h[h.length-1])))}return SH.makeColorScaleFunc({domain:c,range:h},{noNumericCheck:!0})}});var TD=Se((mur,wbe)=>{"use strict";var wD=Nl(),bbe=yu(),Xxt=sD(),Yxt=MH();wbe.exports=function(t){var r=wD.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=wD.select(this),a=n[0].trace,o=a.contours,s=a.line,u=o.size||1,l=o.start,f=o.type==="constraint",c=!f&&o.coloring==="lines",h=!f&&o.coloring==="fill",d=c||h?Yxt(a):null;i.selectAll("g.contourlevel").each(function(b){wD.select(this).selectAll("path").call(bbe.lineGroupStyle,s.width,c?d(b.level):s.color,s.dash)});var p=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(b){bbe.font(wD.select(this),{weight:p.weight,style:p.style,variant:p.variant,textcase:p.textcase,lineposition:p.lineposition,shadow:p.shadow,family:p.family,size:p.size,color:p.color||(c?d(b.level):s.color)})}),f)i.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(h){var x;i.selectAll("g.contourfill path").style("fill",function(b){return x===void 0&&(x=b.level),d(b.level+.5*u)}),x===void 0&&(x=l),i.selectAll("g.contourbg path").style("fill",d(x-.5*u))}}),Xxt(t)}});var AD=Se((gur,Abe)=>{"use strict";var Tbe=fc(),Kxt=MH(),Jxt=A4();function $xt(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=Kxt(t,{isColorbar:!0});if(o==="heatmap"){var u=Tbe.extractOpts(t);r._fillgradient=u.reversescale?Tbe.flipScale(u.colorscale):u.colorscale,r._zrange=[u.min,u.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:Jxt(n),size:a}}Abe.exports={min:"zmin",max:"zmax",calc:$xt}});var EH=Se((_ur,Sbe)=>{"use strict";var SD=Pl(),Qxt=uD();Sbe.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=Qxt(t,r,n,i,a);return o&&o.forEach(function(s){var u=s.trace;u.contours.type==="constraint"&&(u.fillcolor&&SD.opacity(u.fillcolor)?s.color=SD.addOpacity(u.fillcolor,1):u.contours.showlines&&SD.opacity(u.line.color)&&(s.color=SD.addOpacity(u.line.color,1)))}),o}});var Ebe=Se((xur,Mbe)=>{"use strict";Mbe.exports={attributes:hH(),supplyDefaults:Zxe(),crossTraceDefaults:hD(),calc:mH(),plot:bD().plot,layerName:"contourlayer",style:TD(),colorbar:AD(),hoverPoints:EH(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Th(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var Cbe=Se((bur,kbe)=>{"use strict";kbe.exports=Ebe()});var kH=Se((wur,Rbe)=>{"use strict";var Lbe=_u(),ebt=dH(),Ibe=Pl(),zbe=Ibe.addOpacity,tbt=Ibe.opacity,Dbe=vD(),Pbe=Zr().isArrayOrTypedArray,rbt=Dbe.CONSTRAINT_REDUCTION,ibt=Dbe.COMPARISON_OPS2;Rbe.exports=function(t,r,n,i,a,o){var s=r.contours,u,l,f,c=n("contours.operation");if(s._operation=rbt[c],nbt(n,s),c==="="?u=s.showlines=!0:(u=n("contours.showlines"),f=n("fillcolor",zbe((t.line||{}).color||a,.5))),u){var h=f&&tbt(f)?zbe(r.fillcolor,1):a;l=n("line.color",h),n("line.width",2),n("line.dash")}n("line.smoothing"),ebt(n,i,l,o)};function nbt(e,t){var r;ibt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),Pbe(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])]:Lbe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),Lbe(t.value)||(Pbe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var Bbe=Se((Tur,qbe)=>{"use strict";var CH=Zr(),abt=ZI(),obt=zy(),sbt=kH(),lbt=mD(),ubt=gD(),fbt=g4(),Fbe=T4();qbe.exports=function(t,r,n,i){function a(l,f){return CH.coerce(t,r,Fbe,l,f)}function o(l){return CH.coerce2(t,r,Fbe,l)}var s=abt(t,r,a,i);if(!s){r.visible=!1;return}obt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate");var u=a("contours.type")==="constraint";a("connectgaps",CH.isArray1D(r.z)),u?sbt(t,r,a,i,n):(lbt(t,r,a,o),ubt(t,r,a,i)),r.contours&&r.contours.coloring==="heatmap"&&fbt(a,i),a("zorder")}});var Nbe=Se((Aur,Obe)=>{"use strict";Obe.exports={attributes:T4(),supplyDefaults:Bbe(),calc:mH(),plot:bD().plot,style:TD(),colorbar:AD(),hoverPoints:EH(),moduleType:"trace",name:"contour",basePlotModule:Th(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var Vbe=Se((Sur,Ube)=>{"use strict";Ube.exports=Nbe()});var LH=Se((Mur,Gbe)=>{"use strict";var cbt=Du().hovertemplateAttrs,hbt=Du().texttemplateAttrs,dbt=Ey(),a0=Zc(),pbt=zf(),Hbe=Xf(),vbt=Id().dash,M_=vu().extendFlat,W0=a0.marker,C4=a0.line,ybt=W0.line;Gbe.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:M_({},a0.mode,{dflt:"markers"}),text:M_({},a0.text,{}),texttemplate:hbt({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:M_({},a0.hovertext,{}),line:{color:C4.color,width:C4.width,dash:vbt,backoff:C4.backoff,shape:M_({},C4.shape,{values:["linear","spline"]}),smoothing:C4.smoothing,editType:"calc"},connectgaps:a0.connectgaps,cliponaxis:a0.cliponaxis,fill:M_({},a0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:dbt(),marker:M_({symbol:W0.symbol,opacity:W0.opacity,angle:W0.angle,angleref:W0.angleref,standoff:W0.standoff,maxdisplayed:W0.maxdisplayed,size:W0.size,sizeref:W0.sizeref,sizemin:W0.sizemin,sizemode:W0.sizemode,line:M_({width:ybt.width,editType:"calc"},Hbe("marker.line")),gradient:W0.gradient,editType:"calc"},Hbe("marker")),textfont:a0.textfont,textposition:a0.textposition,selected:a0.selected,unselected:a0.unselected,hoverinfo:M_({},pbt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:a0.hoveron,hovertemplate:cbt()}});var Xbe=Se((Eur,Zbe)=>{"use strict";var Wbe=Zr(),mbt=Sm(),RT=ec(),gbt=$v(),_bt=I0(),jbe=J3(),xbt=D0(),bbt=Py(),wbt=LH();Zbe.exports=function(t,r,n,i){function a(h,d){return Wbe.coerce(t,r,wbt,h,d)}var o=a("a"),s=a("b"),u=a("c"),l;if(o?(l=o.length,s?(l=Math.min(l,s.length),u&&(l=Math.min(l,u.length))):u?l=Math.min(l,u.length):l=0):s&&u&&(l=Math.min(s.length,u.length)),!l){r.visible=!1;return}r._length=l,a("sum"),a("text"),a("hovertext"),r.hoveron!=="fills"&&a("hovertemplate");var f=l<mbt.PTS_LINESONLY?"lines+markers":"lines";a("mode",f),RT.hasMarkers(r)&&gbt(t,r,n,i,a,{gradient:!0}),RT.hasLines(r)&&(_bt(t,r,n,i,a,{backoff:!0}),jbe(t,r,a),a("connectgaps")),RT.hasText(r)&&(a("texttemplate"),xbt(t,r,i,a));var c=[];(RT.hasMarkers(r)||RT.hasText(r))&&(a("cliponaxis"),a("marker.maxdisplayed"),c.push("points")),a("fill"),r.fill!=="none"&&(bbt(t,r,n,a),RT.hasLines(r)||jbe(t,r,a)),(r.fill==="tonext"||r.fill==="toself")&&c.push("fills"),a("hoveron",c.join("+")||"points"),Wbe.coerceSelectionMarkerOpacity(r,a)}});var Kbe=Se((kur,Ybe)=>{"use strict";var zH=hu();Ybe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=zH.tickText(a.aaxis,t.a,!0).text,i.bLabel=zH.tickText(a.baxis,t.b,!0).text,i.cLabel=zH.tickText(a.caxis,t.c,!0).text,i}});var e2e=Se((Cur,Qbe)=>{"use strict";var PH=_u(),Tbt=R0(),Abt=km(),Sbt=F0(),Mbt=q0().calcMarkerSize,Jbe=["a","b","c"],$be={a:["b","c"],b:["a","c"],c:["a","b"]};Qbe.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,u,l,f,c,h,d;for(u=0;u<Jbe.length;u++)if(f=Jbe[u],!o[f]){for(h=o[$be[f][0]],d=o[$be[f][1]],c=new Array(h.length),l=0;l<h.length;l++)c[l]=a-h[l]-d[l];o[f]=c}var p=r._length,x=new Array(p),b,y,k,E,A,L;for(u=0;u<p;u++)b=o.a[u],y=o.b[u],k=o.c[u],PH(b)&&PH(y)&&PH(k)?(b=+b,y=+y,k=+k,E=i/(b+y+k),E!==1&&(b*=E,y*=E,k*=E),L=b,A=k-y,x[u]={x:A,y:L,a:b,b:y,c:k},s&&(x[u].id=s[u])):x[u]={x:!1,y:!1};return Mbt(r,p),Tbt(t,r),Abt(x,r),Sbt(x,r),x}});var r2e=Se((Lur,t2e)=>{"use strict";var Ebt=iT();t2e.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},u=r.layers.frontplot.select("g.scatterlayer"),l=0;l<n.length;l++){var f=n[l];f.length&&(f[0].trace._xA=a,f[0].trace._yA=o)}Ebt(t,s,n,u)}});var n2e=Se((zur,i2e)=>{"use strict";var kbt=sT();i2e.exports=function(t,r,n,i){var a=kbt(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,u=t.xa._length,l=u*s/2,f=u-l;return o.x0=Math.max(Math.min(o.x0,f),l),o.x1=Math.max(Math.min(o.x1,f),l),a}var c=o.cd[o.index],h=o.trace,d=o.subplot;o.a=c.a,o.b=c.b,o.c=c.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var p={};p[h.subplot]={_subplot:d};var x=h._module.formatLabels(c,h,p);o.aLabel=x.aLabel,o.bLabel=x.bLabel,o.cLabel=x.cLabel;var b=c.hi||h.hoverinfo,y=[];function k(A,L){y.push(A._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=y.join("<br>"),o.hovertemplate=h.hovertemplate,a}});var o2e=Se((Pur,a2e)=>{"use strict";a2e.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 m2e=Se((Iur,y2e)=>{"use strict";var h2e=Nl(),Cbt=cd(),IH=Ul(),Og=Zr(),Dm=Og.strTranslate,MD=Og._,qT=Pl(),ED=yu(),L4=gm(),DH=vu().extendFlat,Lbt=Ac(),E_=hu(),s2e=gp(),l2e=jc(),d2e=Sy(),u2e=d2e.freeMode,zbt=d2e.rectMode,RH=Mb(),Pbt=nh().prepSelect,Ibt=nh().selectOnClick,Dbt=nh().clearOutline,Rbt=nh().clearSelectionsCache,p2e=dd();function v2e(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}y2e.exports=v2e;var Rm=v2e.prototype;Rm.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Rm.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),Lbt.generalUpdatePerTraceModule(r.graphDiv,r,e,n),r.layers.plotbg.select("path").call(qT.fill,n.bgcolor)};Rm.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=Og.ensureSingleById(e._clips,"clipPath",i,function(o){o.append("path").attr("d","M0,0Z")}),t.clipDefRelative=Og.ensureSingleById(e._clips,"clipPath",a,function(o){o.append("path").attr("d","M0,0Z")}),t.plotContainer=Og.ensureSingle(t.container,"g",t.id),t.updateLayers(n),ED.setClipUrl(t.layers.backplot,i,r),ED.setClipUrl(t.layers.grids,i,r)};Rm.updateFx=function(e){e._ternarylayer.selectAll("g.toplevel").style("cursor",e.dragmode==="pan"?"move":"crosshair")};Rm.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=h2e.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(u){r[u]=s.append("g").classed("grid "+u,!0)})}),i.order()};var FT=Math.sqrt(4/3);Rm.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],u=o*t.w,l=s*t.h,f=e.sum,c=e.aaxis.min,h=e.baxis.min,d=e.caxis.min,p,x,b,y,k,E;u>FT*l?(y=l,b=y*FT):(b=u,y=b/FT),k=o*b/u,E=s*y/l,p=t.l+t.w*i-b/2,x=t.t+t.h*(1-a)-y/2,r.x0=p,r.y0=x,r.w=b,r.h=y,r.sum=f,r.xaxis={type:"linear",range:[c+2*d-f,f-c-2*h],domain:[i-k/2,i+k/2],_id:"x"},L4(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:[c,f-h-d],domain:[a-E/2,a+E/2],_id:"y"},L4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var A=r.yaxis.domain[0],L=r.aaxis=DH({},e.aaxis,{range:[c,f-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[A,A+E*FT],anchor:"free",position:0,_id:"y",_length:b});L4(L,r.graphDiv._fullLayout),L.setScale();var _=r.baxis=DH({},e.baxis,{range:[f-c-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:b});L4(_,r.graphDiv._fullLayout),_.setScale();var C=r.caxis=DH({},e.caxis,{range:[f-c-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[A,A+E*FT],anchor:"free",position:0,_id:"y",_length:b});L4(C,r.graphDiv._fullLayout),C.setScale();var M="M"+p+","+(x+y)+"h"+b+"l-"+b/2+",-"+y+"Z";r.clipDef.select("path").attr("d",M),r.layers.plotbg.select("path").attr("d",M);var v="M0,"+y+"h"+b+"l-"+b/2+",-"+y+"Z";r.clipDefRelative.select("path").attr("d",v);var z=Dm(p,x);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",z),r.clipDefRelative.select("path").attr("transform",null);var T=Dm(p-_._offset,x+y);r.layers.baxis.attr("transform",T),r.layers.bgrid.attr("transform",T);var F=Dm(p+b/2,x)+"rotate(30)"+Dm(0,-L._offset);r.layers.aaxis.attr("transform",F),r.layers.agrid.attr("transform",F);var q=Dm(p+b/2,x)+"rotate(-30)"+Dm(0,-C._offset);r.layers.caxis.attr("transform",q),r.layers.cgrid.attr("transform",q),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+p+","+(x+y)+"l"+b/2+",-"+y:"M0,0").call(qT.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",_.showline?"M"+p+","+(x+y)+"h"+b:"M0,0").call(qT.stroke,_.linecolor||"#000").style("stroke-width",(_.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",C.showline?"M"+(p+b/2)+","+x+"l"+b/2+","+y:"M0,0").call(qT.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),ED.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};Rm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.substr(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 u=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),l=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;i["a-title"]=RH.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title",placeholder:MD(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-u,"text-anchor":"middle"}}),i["b-title"]=RH.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title",placeholder:MD(r,"Click to enter Component B title"),attributes:{x:t.x0-l,y:t.y0+t.h+o.title.font.size*.83+l,"text-anchor":"middle"}}),i["c-title"]=RH.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title",placeholder:MD(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+l,y:t.y0+t.h+s.title.font.size*.83+l,"text-anchor":"middle"}})}};Rm.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,u=i+"tickLayout",l=Fbt(e);t[u]!==l&&(o.selectAll("."+a+"tick").remove(),t[u]=l),e.setScale();var f=E_.calcTicks(e),c=E_.clipEnds(e,f),h=E_.makeTransTickFn(e),d=E_.getTickSigns(e)[2],p=Og.deg2rad(s),x=d*(e.linewidth||1)/2,b=d*e.ticklen,y=t.w,k=t.h,E=i==="b"?"M0,"+x+"l"+Math.sin(p)*b+","+Math.cos(p)*b:"M"+x+",0l"+Math.cos(p)*b+","+-Math.sin(p)*b,A={a:"M0,0l"+k+",-"+y/2,b:"M0,0l-"+y/2+",-"+k,c:"M0,0l-"+k+","+y/2}[i];E_.drawTicks(r,e,{vals:e.ticks==="inside"?c:f,layer:o,path:E,transFn:h,crisp:!1}),E_.drawGrid(r,e,{vals:c,layer:t.layers[i+"grid"],path:A,transFn:h,crisp:!1}),E_.drawLabels(r,e,{vals:f,layer:o,transFn:h,labelFns:E_.makeLabelFns(e,0,s)})};function Fbt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var _d=p2e.MINZOOM/2+.87,qbt="m-0.87,.5h"+_d+"v3h-"+(_d+5.2)+"l"+(_d/2+2.6)+",-"+(_d*.87+4.5)+"l2.6,1.5l-"+_d/2+","+_d*.87+"Z",Bbt="m0.87,.5h-"+_d+"v3h"+(_d+5.2)+"l-"+(_d/2+2.6)+",-"+(_d*.87+4.5)+"l-2.6,1.5l"+_d/2+","+_d*.87+"Z",Obt="m0,1l"+_d/2+","+_d*.87+"l2.6,-1.5l-"+(_d/2+2.6)+",-"+(_d*.87+4.5)+"l-"+(_d/2+2.6)+","+(_d*.87+4.5)+"l2.6,1.5l"+_d/2+",-"+_d*.87+"Z",Nbt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",f2e=!0;Rm.clearOutline=function(){Rbt(this.dragOptions),Dbt(this.dragOptions.gd)};Rm.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(T,F,q){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;u2e(U)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,U==="zoom"?(e.dragOptions.moveFn=_,e.dragOptions.clickFn=y,e.dragOptions.doneFn=C,k(T,F,q)):U==="pan"?(e.dragOptions.moveFn=v,e.dragOptions.clickFn=y,e.dragOptions.doneFn=z,M(),e.clearOutline(r)):(zbt(U)||u2e(U))&&Pbt(T,F,q,e.dragOptions,U)}};var o,s,u,l,f,c,h,d,p,x;function b(T){var F={};return F[e.id+".aaxis.min"]=T.a,F[e.id+".baxis.min"]=T.b,F[e.id+".caxis.min"]=T.c,F}function y(T,F){var q=r._fullLayout.clickmode;c2e(r),T===2&&(r.emit("plotly_doubleclick",null),IH.call("_guiRelayout",r,b({a:0,b:0,c:0}))),q.indexOf("select")>-1&&T===1&&Ibt(F,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),q.indexOf("event")>-1&&l2e.click(r,F,e.id)}function k(T,F,q){var U=t.getBoundingClientRect();o=F-U.left,s=q-U.top,r._fullLayout._calcInverseTransform(r);var H=r._fullLayout._invTransform,j=Og.apply3DTransform(H)(o,s);o=j[0],s=j[1],u={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},f=u,l=e.aaxis.range[1]-u.a,c=Cbt(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,p=n.append("path").attr("class","zoombox").attr("transform",Dm(e.x0,e.y0)).style({fill:c>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),x=n.append("path").attr("class","zoombox-corners").attr("transform",Dm(e.x0,e.y0)).style({fill:qT.background,stroke:qT.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function E(T,F){return 1-F/e.h}function A(T,F){return 1-(T+(e.h-F)/Math.sqrt(3))/e.w}function L(T,F){return(T-(e.h-F)/Math.sqrt(3))/e.w}function _(T,F){var q=o+T*i,U=s+F*a,H=Math.max(0,Math.min(1,E(o,s),E(q,U))),j=Math.max(0,Math.min(1,A(o,s),A(q,U))),G=Math.max(0,Math.min(1,L(o,s),L(q,U))),O=(H/2+G)*e.w,W=(1-H/2-j)*e.w,re=(O+W)/2,ne=W-O,be=(1-H)*e.h,ze=be-ne/FT;ne<p2e.MINZOOM?(f=u,p.attr("d",h),x.attr("d","M0,0Z")):(f={a:u.a+H*l,b:u.b+j*l,c:u.c+G*l},p.attr("d",h+"M"+O+","+be+"H"+W+"L"+re+","+ze+"L"+O+","+be+"Z"),x.attr("d","M"+o+","+s+Nbt+"M"+O+","+be+qbt+"M"+W+","+be+Bbt+"M"+re+","+ze+Obt)),d||(p.transition().style("fill",c>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),x.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",b(f))}function C(){c2e(r),f!==u&&(IH.call("_guiRelayout",r,b(f)),f2e&&r.data&&r._context.showTips&&(Og.notifier(MD(r,"Double-click to zoom back out"),"long"),f2e=!1))}function M(){u={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},f=u}function v(T,F){var q=T/e.xaxis._m,U=F/e.yaxis._m;f={a:u.a-U,b:u.b+(q+U)/2,c:u.c-(q-U)/2};var H=[f.a,f.b,f.c].sort(Og.sorterAsc),j={a:H.indexOf(f.a),b:H.indexOf(f.b),c:H.indexOf(f.c)};H[0]<0&&(H[1]+H[0]/2<0?(H[2]+=H[0]+H[1],H[0]=H[1]=0):(H[2]+=H[0]/2,H[1]+=H[0]/2,H[0]=0),f={a:H[j.a],b:H[j.b],c:H[j.c]},F=(u.a-f.a)*e.yaxis._m,T=(u.c-f.c-u.b+f.b)*e.xaxis._m);var G=Dm(e.x0+T,e.y0+F);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",G);var O=Dm(-T,-F);e.clipDefRelative.select("path").attr("transform",O),e.aaxis.range=[f.a,e.sum-f.b-f.c],e.baxis.range=[e.sum-f.a-f.c,f.b],e.caxis.range=[e.sum-f.a-f.b,f.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(ED.hideOutsideRangePoints,e),r.emit("plotly_relayouting",b(f))}function z(){IH.call("_guiRelayout",r,b(f))}t.onmousemove=function(T){l2e.hover(r,T,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(T){r._dragging||s2e.unhover(r,T)},s2e.init(this.dragOptions)};function c2e(e){h2e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var BH=Se((Dur,g2e)=>{"use strict";var Ubt=Ih(),Vbt=Ec().attributes,Uf=Rd(),Hbt=_c().overrideAll,FH=vu().extendFlat,qH={title:{text:Uf.title.text,font:Uf.title.font},color:Uf.color,tickmode:Uf.minor.tickmode,nticks:FH({},Uf.nticks,{dflt:6,min:1}),tick0:Uf.tick0,dtick:Uf.dtick,tickvals:Uf.tickvals,ticktext:Uf.ticktext,ticks:Uf.ticks,ticklen:Uf.ticklen,tickwidth:Uf.tickwidth,tickcolor:Uf.tickcolor,ticklabelstep:Uf.ticklabelstep,showticklabels:Uf.showticklabels,labelalias:Uf.labelalias,showtickprefix:Uf.showtickprefix,tickprefix:Uf.tickprefix,showticksuffix:Uf.showticksuffix,ticksuffix:Uf.ticksuffix,showexponent:Uf.showexponent,exponentformat:Uf.exponentformat,minexponent:Uf.minexponent,separatethousands:Uf.separatethousands,tickfont:Uf.tickfont,tickangle:Uf.tickangle,tickformat:Uf.tickformat,tickformatstops:Uf.tickformatstops,hoverformat:Uf.hoverformat,showline:FH({},Uf.showline,{dflt:!0}),linecolor:Uf.linecolor,linewidth:Uf.linewidth,showgrid:FH({},Uf.showgrid,{dflt:!0}),gridcolor:Uf.gridcolor,gridwidth:Uf.gridwidth,griddash:Uf.griddash,layer:Uf.layer,min:{valType:"number",dflt:0,min:0}},kD=g2e.exports=Hbt({domain:Vbt({name:"ternary"}),bgcolor:{valType:"color",dflt:Ubt.background},sum:{valType:"number",dflt:1,min:0},aaxis:qH,baxis:qH,caxis:qH},"plot","from-root");kD.uirevision={valType:"any",editType:"none"};kD.aaxis.uirevision=kD.baxis.uirevision=kD.caxis.uirevision={valType:"any",editType:"none"}});var k_=Se((Rur,_2e)=>{"use strict";var Gbt=Zr(),Wbt=_f(),jbt=Ec().defaults;_2e.exports=function(t,r,n,i){var a=i.type,o=i.attributes,s=i.handleDefaults,u=i.partition||"x",l=r._subplots[a],f=l.length,c=f&&l[0].replace(/\d+$/,""),h,d;function p(k,E){return Gbt.coerce(h,d,o,k,E)}for(var x=0;x<f;x++){var b=l[x];t[b]?h=t[b]:h=t[b]={},d=Wbt.newContainer(r,b,c),i.noUirevision||p("uirevision",r.uirevision);var y={};y[u]=[x/f,(x+1)/f],jbt(d,r,p,y),i.id=b,s(h,d,p,i)}}});var T2e=Se((Fur,w2e)=>{"use strict";var Zbt=Pl(),Xbt=_f(),CD=Zr(),Ybt=k_(),Kbt=e_(),Jbt=t_(),$bt=T3(),Qbt=xb(),e2t=Y5(),b2e=BH(),x2e=["aaxis","baxis","caxis"];w2e.exports=function(t,r,n){Ybt(t,r,n,{type:"ternary",attributes:b2e,handleDefaults:t2t,font:r.font,paper_bgcolor:r.paper_bgcolor})};function t2t(e,t,r,n){var i=r("bgcolor"),a=r("sum");n.bgColor=Zbt.combine(i,n.paper_bgcolor);for(var o,s,u,l=0;l<x2e.length;l++)o=x2e[l],s=e[o]||{},u=Xbt.newContainer(t,o),u._name=o,r2t(s,u,n,t);var f=t.aaxis,c=t.baxis,h=t.caxis;f.min+c.min+h.min>=a&&(f.min=0,c.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function r2t(e,t,r,n){var i=b2e[t._name];function a(d,p){return CD.coerce(e,t,i,d,p)}a("uirevision",n.uirevision),t.type="linear";var o=a("color"),s=o!==i.color.dflt?o:r.font.color,u=t._name,l=u.charAt(0).toUpperCase(),f="Component "+l,c=a("title.text",f);t._hovertitle=c===f?c:l,CD.coerceFont(a,"title.font",r.font,{overrideDflt:{size:CD.bigFont(r.font.size),color:s}}),a("min"),Qbt(e,t,a,"linear"),Jbt(e,t,a,"linear"),Kbt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),$bt(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(CD.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),e2t(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a("hoverformat"),a("layer")}});var A2e=Se(j0=>{"use strict";var i2t=m2e(),n2t=Dd().getSubplotCalcData,a2t=Zr().counterRegex,BT="ternary";j0.name=BT;var o2t=j0.attr="subplot";j0.idRoot=BT;j0.idRegex=j0.attrRegex=a2t(BT);var s2t=j0.attributes={};s2t[o2t]={valType:"subplotid",dflt:"ternary",editType:"calc"};j0.layoutAttributes=BH();j0.supplyLayoutDefaults=T2e();j0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[BT],a=0;a<i.length;a++){var o=i[a],s=n2t(n,BT,o),u=r[o]._subplot;u||(u=new i2t({id:o,graphDiv:t,container:r._ternarylayer.node()},r),r[o]._subplot=u),u.plot(s,r,t._promises)}};j0.clean=function(e,t,r,n){for(var i=n._subplots[BT]||[],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())}};j0.updateFx=function(e){var t=e._fullLayout;t._ternarylayer.selectAll("g.toplevel").style("cursor",t.dragmode==="pan"?"move":"crosshair")}});var M2e=Se((Bur,S2e)=>{"use strict";S2e.exports={attributes:LH(),supplyDefaults:Xbe(),colorbar:ep(),formatLabels:Kbe(),calc:e2e(),plot:r2e(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:n2e(),selectPoints:lT(),eventData:o2e(),moduleType:"trace",name:"scatterternary",basePlotModule:A2e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var k2e=Se((Our,E2e)=>{"use strict";E2e.exports=M2e()});var OH=Se((Nur,L2e)=>{"use strict";var nd=p4(),OT=vu().extendFlat,C2e=Gc().axisHoverFormat;L2e.exports={y:nd.y,x:nd.x,x0:nd.x0,y0:nd.y0,xhoverformat:C2e("x"),yhoverformat:C2e("y"),name:OT({},nd.name,{}),orientation:OT({},nd.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:nd.fillcolor,points:OT({},nd.boxpoints,{}),jitter:OT({},nd.jitter,{}),pointpos:OT({},nd.pointpos,{}),width:OT({},nd.width,{}),marker:nd.marker,text:nd.text,hovertext:nd.hovertext,hovertemplate:nd.hovertemplate,quartilemethod:nd.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:nd.offsetgroup,alignmentgroup:nd.alignmentgroup,selected:nd.selected,unselected:nd.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:nd.zorder}});var VH=Se((Uur,z2e)=>{"use strict";var NH=v4(),UH=Zr().extendFlat;z2e.exports={violinmode:UH({},NH.boxmode,{}),violingap:UH({},NH.boxgap,{}),violingroupgap:UH({},NH.boxgroupgap,{})}});var F2e=Se((Vur,R2e)=>{"use strict";var P2e=Zr(),l2t=Pl(),I2e=m4(),D2e=OH();R2e.exports=function(t,r,n,i){function a(L,_){return P2e.coerce(t,r,D2e,L,_)}function o(L,_){return P2e.coerce2(t,r,D2e,L,_)}if(I2e.handleSampleDefaults(t,r,a,i),r.visible!==!1){a("bandwidth"),a("side");var s=a("width");s||(a("scalegroup",r.name),a("scalemode"));var u=a("span"),l;Array.isArray(u)&&(l="manual"),a("spanmode",l);var f=a("line.color",(t.marker||{}).color||n),c=a("line.width"),h=a("fillcolor",l2t.addOpacity(r.line.color,.5));I2e.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),p=o("box.fillcolor",h),x=o("box.line.color",f),b=o("box.line.width",c),y=a("box.visible",!!(d||p||x||b));y||(r.box={visible:!1});var k=o("meanline.color",f),E=o("meanline.width",c),A=a("meanline.visible",!!(k||E));A||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var B2e=Se((Hur,q2e)=>{"use strict";var u2t=Zr(),f2t=VH(),c2t=UI();q2e.exports=function(t,r,n){function i(a,o){return u2t.coerce(t,r,f2t,a,o)}c2t._supply(t,r,n,i,"violin")}});var LD=Se(o2=>{"use strict";var h2t=Zr(),d2t={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};o2.makeKDE=function(e,t,r){var n=r.length,i=d2t.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var u=0,l=0;l<n;l++)u+=i((s-r[l])/a);return o*u}};o2.getPositionOnKdePath=function(e,t,r){var n,i;t.orientation==="h"?(n="y",i="x"):(n="x",i="y");var a=h2t.findPointOnPath(e.path,r,i,{pathLength:e.pathLength}),o=e.posCenterPx,s=a[n],u=t.side==="both"?2*o-s:o;return[s,u]};o2.getKdeValue=function(e,t,r){var n=e.pts.map(o2.extractVal),i=o2.makeKDE(e,t,n);return i(r)/e.posDensityScale};o2.extractVal=function(e){return e.v}});var U2e=Se((Wur,N2e)=>{"use strict";var HH=Zr(),GH=hu(),p2t=FV(),O2e=LD(),v2t=ju().BADNUM;N2e.exports=function(t,r){var n=p2t(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=GH.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,u=0,l=0,f=0;f<n.length;f++){var c=n[f],h=c.pts.map(O2e.extractVal),d=c.bandwidth=m2t(r,c,h),p=c.span=g2t(r,c,a,d);if(c.min===c.max&&d===0)p=c.span=[c.min,c.max],c.density=[{v:1,t:p[0]}],c.bandwidth=d,u=Math.max(u,1);else{var x=p[1]-p[0],b=Math.ceil(x/(d/3)),y=x/b;if(!isFinite(y)||!isFinite(b))return HH.error("Something went wrong with computing the violin span"),n[0].t.empty=!0,n;var k=O2e.makeKDE(c,r,h);c.density=new Array(b);for(var E=0,A=p[0];A<p[1]+y/2;E++,A+=y){var L=k(A);c.density[E]={v:L,t:A},u=Math.max(u,L)}}l=Math.max(l,h.length),o=Math.min(o,p[0]),s=Math.max(s,p[1])}var _=GH.findExtremes(a,[o,s],{padded:!0});if(r._extremes[a._id]=_,r.width)n[0].t.maxKDE=u;else{var C=i._violinScaleGroupStats,M=r.scalegroup,v=C[M];v?(v.maxKDE=Math.max(v.maxKDE,u),v.maxCount=Math.max(v.maxCount,l)):C[M]={maxKDE:u,maxCount:l}}return n[0].t.labels.kde=HH._(t,"kde:"),n};function y2t(e,t,r){var n=Math.min(t,r/1.349);return 1.059*n*Math.pow(e,-.2)}function m2t(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=HH.stdev(r,i-1,t.mean);return Math.max(y2t(i,a,t.q3-t.q1),n/100)}function g2t(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],u;function l(c){var h=a[c],d=r.type==="multicategory"?r.r2c(h):r.d2c(h,0,e[t.valLetter+"calendar"]);return d===v2t?s[c]:d}i==="soft"?u=s:i==="hard"?u=o:u=[l(0),l(1)];var f={type:"linear",range:u};return GH.setConvert(f),f.cleanRange(),u}});var G2e=Se((jur,H2e)=>{"use strict";var _2t=HI().setPositionOffset,V2e=["v","h"];H2e.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o<V2e.length;o++){for(var s=V2e[o],u=s==="h"?a:i,l=[],f=0;f<n.length;f++){var c=n[f],h=c[0].t,d=c[0].trace;d.visible===!0&&d.type==="violin"&&!h.empty&&d.orientation===s&&d.xaxis===i._id&&d.yaxis===a._id&&l.push(f)}_2t("violin",t,l,u)}}});var j2e=Se((Zur,W2e)=>{"use strict";var WH=Nl(),jH=Zr(),x2t=yu(),ZH=GI(),b2t=bU(),w2t=LD();W2e.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,u=r.yaxis;function l(f,c){var h=b2t(f,{xaxis:s,yaxis:u,trace:c,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return x2t.smoothopen(h[0],1)}jH.makeTraceGroups(i,n,"trace violins").each(function(f){var c=WH.select(this),h=f[0],d=h.t,p=h.trace;if(p.visible!==!0||d.empty){c.remove();return}var x=d.bPos,b=d.bdPos,y=r[d.valLetter+"axis"],k=r[d.posLetter+"axis"],E=p.side==="both",A=E||p.side==="positive",L=E||p.side==="negative",_=c.selectAll("path.violin").data(jH.identity);_.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each(function(U){var H=WH.select(this),j=U.density,G=j.length,O=k.c2l(U.pos+x,!0),W=k.l2p(O),re;if(p.width)re=d.maxKDE/b;else{var ne=o._violinScaleGroupStats[p.scalegroup];re=p.scalemode==="count"?ne.maxKDE/b*(ne.maxCount/U.pts.length):ne.maxKDE/b}var be,ze,Ce,he,te,ke,Ee;if(A){for(ke=new Array(G),he=0;he<G;he++)Ee=ke[he]={},Ee[d.posLetter]=O+j[he].v/re,Ee[d.valLetter]=y.c2l(j[he].t,!0);be=l(ke,p)}if(L){for(ke=new Array(G),te=0,he=G-1;te<G;te++,he--)Ee=ke[te]={},Ee[d.posLetter]=O-j[he].v/re,Ee[d.valLetter]=y.c2l(j[he].t,!0);ze=l(ke,p)}if(E)Ce=be+"L"+ze.substr(1)+"Z";else{var Me=[W,y.c2p(j[0].t)],Oe=[W,y.c2p(j[G-1].t)];p.orientation==="h"&&(Me.reverse(),Oe.reverse()),A?Ce="M"+Me+"L"+be.substr(1)+"L"+Oe:Ce="M"+Oe+"L"+ze.substr(1)+"L"+Me}H.attr("d",Ce),U.posCenterPx=W,U.posDensityScale=re*b,U.path=H.node(),U.pathLength=U.path.getTotalLength()/(E?2:1)});var C=p.box,M=C.width,v=(C.line||{}).width,z,T;E?(z=b*M,T=0):A?(z=[0,b*M/2],T=v*{x:1,y:-1}[d.posLetter]):(z=[b*M/2,0],T=v*{x:-1,y:1}[d.posLetter]),ZH.plotBoxAndWhiskers(c,{pos:k,val:y},p,{bPos:x,bdPos:z,bPosPxOffset:T}),ZH.plotBoxMean(c,{pos:k,val:y},p,{bPos:x,bdPos:z,bPosPxOffset:T});var F;!p.box.visible&&p.meanline.visible&&(F=jH.identity);var q=c.selectAll("path.meanline").data(F||[]);q.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect",a?"none":"non-scaling-stroke"),q.exit().remove(),q.each(function(U){var H=y.c2p(U.mean,!0),j=w2t.getPositionOnKdePath(U,p,H);WH.select(this).attr("d",p.orientation==="h"?"M"+H+","+j[0]+"V"+j[1]:"M"+j[0]+","+H+"H"+j[1])}),ZH.plotPoints(c,{x:s,y:u},p,d)})}});var Y2e=Se((Xur,X2e)=>{"use strict";var Z2e=Nl(),NT=Pl(),T2t=ov().stylePoints;X2e.exports=function(t){var r=Z2e.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=Z2e.select(this),o=i.box||{},s=o.line||{},u=i.meanline||{},l=u.width;a.selectAll("path.violin").style("stroke-width",i.line.width+"px").call(NT.stroke,i.line.color).call(NT.fill,i.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(NT.stroke,s.color).call(NT.fill,o.fillcolor);var f={"stroke-width":l+"px","stroke-dasharray":2*l+"px,"+l+"px"};a.selectAll("path.mean").style(f).call(NT.stroke,u.color),a.selectAll("path.meanline").style(f).call(NT.stroke,u.color),T2t(a,i,t)})}});var Q2e=Se((Yur,$2e)=>{"use strict";var A2t=Pl(),XH=Zr(),S2t=hu(),K2e=UV(),J2e=LD();$2e.exports=function(t,r,n,i,a){a||(a={});var o=a.hoverLayer,s=t.cd,u=s[0].trace,l=u.hoveron,f=l.indexOf("violins")!==-1,c=l.indexOf("kde")!==-1,h=[],d,p;if(f||c){var x=K2e.hoverOnBoxes(t,r,n,i);if(c&&x.length>0){var b=t.xa,y=t.ya,k,E,A,L,_;u.orientation==="h"?(_=r,k="y",A=y,E="x",L=b):(_=n,k="x",A=b,E="y",L=y);var C=s[t.index];if(_>=C.span[0]&&_<=C.span[1]){var M=XH.extendFlat({},t),v=L.c2p(_,!0),z=J2e.getKdeValue(C,u,_),T=J2e.getPositionOnKdePath(C,u,v),F=A._offset,q=A._length;M[k+"0"]=T[0],M[k+"1"]=T[1],M[E+"0"]=M[E+"1"]=v,M[E+"Label"]=E+": "+S2t.hoverLabelText(L,_,u[E+"hoverformat"])+", "+s[0].t.labels.kde+" "+z.toFixed(3);for(var U=0,H=0;H<x.length;H++)if(x[H].attr==="med"){U=H;break}M.spikeDistance=x[U].spikeDistance;var j=k+"Spike";M[j]=x[U][j],x[U].spikeDistance=void 0,x[U][j]=void 0,M.hovertemplate=!1,h.push(M),p={},p[k+"1"]=XH.constrain(F+T[0],F,F+q),p[k+"2"]=XH.constrain(F+T[1],F,F+q),p[E+"1"]=p[E+"2"]=L._offset+v}}f&&(h=h.concat(x))}l.indexOf("points")!==-1&&(d=K2e.hoverOnPoints(t,r,n));var G=o.selectAll(".violinline-"+u.uid).data(p?[0]:[]);return G.enter().append("line").classed("violinline-"+u.uid,!0).attr("stroke-width",1.5),G.exit().remove(),G.attr(p).call(A2t.stroke,t.color),i==="closest"?d?[d]:h:(d&&h.push(d),h)}});var twe=Se((Kur,ewe)=>{"use strict";ewe.exports={attributes:OH(),layoutAttributes:VH(),supplyDefaults:F2e(),crossTraceDefaults:m4().crossTraceDefaults,supplyLayoutDefaults:B2e(),calc:U2e(),crossTraceCalc:G2e(),plot:j2e(),style:Y2e(),styleOnSelect:ov().styleOnSelect,hoverPoints:Q2e(),selectPoints:VV(),moduleType:"trace",name:"violin",basePlotModule:Th(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var iwe=Se((Jur,rwe)=>{"use strict";rwe.exports=twe()});var awe=Se(($ur,nwe)=>{"use strict";nwe.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var KH=Se((Qur,lwe)=>{"use strict";var Dc=Lm(),YH=Zc().line,M2t=zf(),owe=Gc().axisHoverFormat,E2t=Du().hovertemplateAttrs,k2t=Du().texttemplateAttrs,swe=awe(),Ng=vu().extendFlat,C2t=Pl();lwe.exports={x:Dc.x,x0:Dc.x0,dx:Dc.dx,y:Dc.y,y0:Dc.y0,dy:Dc.dy,xperiod:Dc.xperiod,yperiod:Dc.yperiod,xperiod0:Dc.xperiod0,yperiod0:Dc.yperiod0,xperiodalignment:Dc.xperiodalignment,yperiodalignment:Dc.yperiodalignment,xhoverformat:owe("x"),yhoverformat:owe("y"),hovertext:Dc.hovertext,hovertemplate:E2t({},{keys:swe.eventDataKeys}),hoverinfo:Ng({},M2t.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:k2t({editType:"plot"},{keys:swe.eventDataKeys.concat(["label","value"])}),text:Dc.text,textposition:Dc.textposition,insidetextanchor:Ng({},Dc.insidetextanchor,{dflt:"middle"}),textangle:Ng({},Dc.textangle,{dflt:0}),textfont:Dc.textfont,insidetextfont:Dc.insidetextfont,outsidetextfont:Dc.outsidetextfont,constraintext:Dc.constraintext,cliponaxis:Dc.cliponaxis,orientation:Ng({},Dc.orientation,{}),offset:Ng({},Dc.offset,{arrayOk:!1}),width:Ng({},Dc.width,{arrayOk:!1}),marker:L2t(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Ng({},YH.color,{dflt:C2t.defaultLine}),width:Ng({},YH.width,{dflt:0,editType:"plot"}),dash:YH.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:Dc.offsetgroup,alignmentgroup:Dc.alignmentgroup,zorder:Dc.zorder};function L2t(){var e=Ng({},Dc.marker);return delete e.pattern,delete e.cornerradius,e}});var JH=Se((efr,uwe)=>{"use strict";uwe.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 QH=Se((tfr,cwe)=>{"use strict";var zD=Zr(),z2t=Hb(),P2t=r0().handleText,I2t=K3(),D2t=zy(),fwe=KH(),$H=Pl();function R2t(e,t,r,n){function i(c,h){return zD.coerce(e,t,fwe,c,h)}var a=I2t(e,t,n,i);if(!a){t.visible=!1;return}D2t(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");var s=i("textposition");P2t(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&i("textinfo",zD.isArrayOrTypedArray(o)?"text+value":"value");var u=i("marker.color",r);i("marker.line.color",$H.defaultLine),i("marker.line.width");var l=i("connector.visible");if(l){i("connector.fillcolor",F2t(u));var f=i("connector.line.width");f&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function F2t(e){var t=zD.isArrayOrTypedArray(e)?"#000":e;return $H.addOpacity(t,.5*$H.opacity(t))}function q2t(e,t){var r,n;function i(o){return zD.coerce(n._input,n,fwe,o)}for(var a=0;a<e.length;a++)n=e[a],n.type==="funnel"&&(r=n._input,z2t(r,n,t,i,t.funnelmode))}cwe.exports={supplyDefaults:R2t,crossTraceDefaults:q2t}});var dwe=Se((rfr,hwe)=>{"use strict";var B2t=Zr(),O2t=JH();hwe.exports=function(e,t,r){var n=!1;function i(s,u){return B2t.coerce(e,t,O2t,s,u)}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 vwe=Se((ifr,pwe)=>{"use strict";var UT=Zr();pwe.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;UT.mergeArray(r.text,t,"tx"),UT.mergeArray(r.hovertext,t,"htx");var i=r.marker;if(i){UT.mergeArray(i.opacity,t,"mo"),UT.mergeArray(i.color,t,"mc");var a=i.line;a&&(UT.mergeArray(a.color,t,"mlc"),UT.mergeArrayCastPositive(a.width,t,"mlw"))}}});var _we=Se((nfr,gwe)=>{"use strict";var ywe=hu(),mwe=Iy(),N2t=vwe(),U2t=F0(),z4=ju().BADNUM;gwe.exports=function(t,r){var n=ywe.getFromId(t,r.xaxis||"x"),i=ywe.getFromId(t,r.yaxis||"y"),a,o,s,u,l,f,c,h;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),u=mwe(r,i,"y",s),l=!!r.yperiodalignment,f="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),u=mwe(r,n,"x",s),l=!!r.xperiodalignment,f="x"),o=u.vals;var d=Math.min(o.length,a.length),p=new Array(d);for(r._base=[],c=0;c<d;c++){a[c]<0&&(a[c]=z4);var x=!1;a[c]!==z4&&c+1<d&&a[c+1]!==z4&&(x=!0),h=p[c]={p:o[c],s:a[c],cNext:x},r._base[c]=-.5*h.s,l&&(p[c].orig_p=s[c],p[c][f+"End"]=u.ends[c],p[c][f+"Start"]=u.starts[c]),r.ids&&(h.id=String(r.ids[c])),c===0&&(p[0].vTotal=0),p[0].vTotal+=eG(h.s),h.begR=eG(h.s)/eG(p[0].s)}var b;for(c=0;c<d;c++)h=p[c],h.s!==z4&&(h.sumR=h.s/p[0].vTotal,h.difR=b!==void 0?h.s/b:1,b=h.s);return N2t(p,r),U2t(p,r),p};function eG(e){return e===z4?0:e}});var wwe=Se((afr,bwe)=>{"use strict";var xwe=Gb().setGroupPositions;bwe.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,u=[],l=[],f=[],c,h;for(h=0;h<i.length;h++){var d=i[h],p=d.orientation==="h";d.visible===!0&&d.xaxis===o._id&&d.yaxis===s._id&&d.type==="funnel"&&(c=a[h],p?f.push(c):l.push(c),u.push(c))}var x={mode:n.funnelmode,norm:n.funnelnorm,gap:n.funnelgap,groupgap:n.funnelgroupgap};for(xwe(t,o,s,l,x),xwe(t,s,o,f,x),h=0;h<u.length;h++){c=u[h];for(var b=0;b<c.length;b++)b+1<c.length&&(c[b].nextP0=c[b+1].p0,c[b].nextS0=c[b+1].s0,c[b].nextP1=c[b+1].p1,c[b].nextS1=c[b+1].s1)}}});var Mwe=Se((ofr,Swe)=>{"use strict";var PD=Nl(),L_=Zr(),Twe=yu(),C_=ju().BADNUM,V2t=i2(),H2t=bp().clearMinTextSize;Swe.exports=function(t,r,n,i){var a=t._fullLayout;H2t("funnel",a),G2t(t,r,n,i),W2t(t,r,n,i),V2t.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function G2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=PD.select(this),u=o[0].trace,l=L_.ensureSingle(s,"g","regions");if(!u.connector||!u.connector.visible){l.remove();return}var f=u.orientation==="h",c=l.selectAll("g.region").data(L_.identity);c.enter().append("g").classed("region",!0),c.exit().remove();var h=c.size();c.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var x=Awe(d,i,a,f),b=x[0],y=x[1],k="";b[0]!==C_&&y[0]!==C_&&b[1]!==C_&&y[1]!==C_&&b[2]!==C_&&y[2]!==C_&&b[3]!==C_&&y[3]!==C_&&(f?k+="M"+b[0]+","+y[1]+"L"+b[2]+","+y[2]+"H"+b[3]+"L"+b[1]+","+y[1]+"Z":k+="M"+b[1]+","+y[1]+"L"+b[2]+","+y[3]+"V"+y[2]+"L"+b[1]+","+y[0]+"Z"),k===""&&(k="M0,0Z"),L_.ensureSingle(PD.select(this),"path").attr("d",k).call(Twe.setClipUrl,t.layerClipId,e)}})})}function W2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=PD.select(this),u=o[0].trace,l=L_.ensureSingle(s,"g","lines");if(!u.connector||!u.connector.visible||!u.connector.line.width){l.remove();return}var f=u.orientation==="h",c=l.selectAll("g.line").data(L_.identity);c.enter().append("g").classed("line",!0),c.exit().remove();var h=c.size();c.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var x=Awe(d,i,a,f),b=x[0],y=x[1],k="";b[3]!==void 0&&y[3]!==void 0&&(f?(k+="M"+b[0]+","+y[1]+"L"+b[2]+","+y[2],k+="M"+b[1]+","+y[1]+"L"+b[3]+","+y[2]):(k+="M"+b[1]+","+y[1]+"L"+b[2]+","+y[3],k+="M"+b[1]+","+y[0]+"L"+b[2]+","+y[2])),k===""&&(k="M0,0Z"),L_.ensureSingle(PD.select(this),"path").attr("d",k).call(Twe.setClipUrl,t.layerClipId,e)}})})}function Awe(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 Cwe=Se((sfr,kwe)=>{"use strict";var P4=Nl(),Ewe=yu(),tG=Pl(),j2t=N1().DESELECTDIM,Z2t=N0(),X2t=bp().resizeText,Y2t=Z2t.styleTextPoints;function K2t(e,t,r){var n=r||P4.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");X2t(e,n,"funnel"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=P4.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var u=o.marker;P4.select(this).call(tG.fill,s.mc||u.color).call(tG.stroke,s.mlc||u.line.color).call(Ewe.dashLine,u.line.dash,s.mlw||u.line.width).style("opacity",o.selectedpoints&&!s.selected?j2t:1)}}),Y2t(a,o,e),a.selectAll(".regions").each(function(){P4.select(this).selectAll("path").style("stroke-width",0).call(tG.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;Ewe.lineGroupStyle(P4.select(this).selectAll("path"),s.width,s.color,s.dash)})})}kwe.exports={style:K2t}});var Pwe=Se((lfr,zwe)=>{"use strict";var Lwe=Pl().opacity,J2t=TT().hoverOnBars,rG=Zr().formatPercent;zwe.exports=function(t,r,n,i,a){var o=J2t(t,r,n,i,a);if(o){var s=o.cd,u=s[0].trace,l=u.orientation==="h",f=o.index,c=s[f],h=l?"x":"y";o[h+"LabelVal"]=c.s,o.percentInitial=c.begR,o.percentInitialLabel=rG(c.begR,1),o.percentPrevious=c.difR,o.percentPreviousLabel=rG(c.difR,1),o.percentTotal=c.sumR,o.percentTotalLabel=rG(c.sumR,1);var d=c.hi||u.hoverinfo,p=[];if(d&&d!=="none"&&d!=="skip"){var x=d==="all",b=d.split("+"),y=function(k){return x||b.indexOf(k)!==-1};y("percent initial")&&p.push(o.percentInitialLabel+" of initial"),y("percent previous")&&p.push(o.percentPreviousLabel+" of previous"),y("percent total")&&p.push(o.percentTotalLabel+" of total")}return o.extraText=p.join("<br>"),o.color=$2t(u,c),[o]}};function $2t(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(Lwe(n))return n;if(Lwe(i)&&a)return i}});var Dwe=Se((ufr,Iwe)=>{"use strict";Iwe.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 Fwe=Se((ffr,Rwe)=>{"use strict";Rwe.exports={attributes:KH(),layoutAttributes:JH(),supplyDefaults:QH().supplyDefaults,crossTraceDefaults:QH().crossTraceDefaults,supplyLayoutDefaults:dwe(),calc:_we(),crossTraceCalc:wwe(),plot:Mwe(),style:Cwe().style,hoverPoints:Pwe(),eventData:Dwe(),selectPoints:AT(),moduleType:"trace",name:"funnel",basePlotModule:Th(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var Bwe=Se((cfr,qwe)=>{"use strict";qwe.exports=Fwe()});var Nwe=Se((hfr,Owe)=>{"use strict";Owe.exports={eventDataKeys:["initial","delta","final"]}});var aG=Se((dfr,Hwe)=>{"use strict";var bc=Lm(),iG=Zc().line,Q2t=zf(),Uwe=Gc().axisHoverFormat,ewt=Du().hovertemplateAttrs,twt=Du().texttemplateAttrs,Vwe=Nwe(),VT=vu().extendFlat,rwt=Pl();function nG(e){return{marker:{color:VT({},bc.marker.color,{arrayOk:!1,editType:"style"}),line:{color:VT({},bc.marker.line.color,{arrayOk:!1,editType:"style"}),width:VT({},bc.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}Hwe.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:bc.x,x0:bc.x0,dx:bc.dx,y:bc.y,y0:bc.y0,dy:bc.dy,xperiod:bc.xperiod,yperiod:bc.yperiod,xperiod0:bc.xperiod0,yperiod0:bc.yperiod0,xperiodalignment:bc.xperiodalignment,yperiodalignment:bc.yperiodalignment,xhoverformat:Uwe("x"),yhoverformat:Uwe("y"),hovertext:bc.hovertext,hovertemplate:ewt({},{keys:Vwe.eventDataKeys}),hoverinfo:VT({},Q2t.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:twt({editType:"plot"},{keys:Vwe.eventDataKeys.concat(["label"])}),text:bc.text,textposition:bc.textposition,insidetextanchor:bc.insidetextanchor,textangle:bc.textangle,textfont:bc.textfont,insidetextfont:bc.insidetextfont,outsidetextfont:bc.outsidetextfont,constraintext:bc.constraintext,cliponaxis:bc.cliponaxis,orientation:bc.orientation,offset:bc.offset,width:bc.width,increasing:nG("increasing"),decreasing:nG("decreasing"),totals:nG("intermediate sums and total"),connector:{line:{color:VT({},iG.color,{dflt:rwt.defaultLine}),width:VT({},iG.width,{editType:"plot"}),dash:iG.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:bc.offsetgroup,alignmentgroup:bc.alignmentgroup,zorder:bc.zorder}});var oG=Se((pfr,Gwe)=>{"use strict";Gwe.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 HT=Se((vfr,Wwe)=>{"use strict";Wwe.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var lG=Se((yfr,Ywe)=>{"use strict";var jwe=Zr(),iwt=Hb(),nwt=r0().handleText,awt=K3(),owt=zy(),Zwe=aG(),swt=Pl(),Xwe=HT(),lwt=Xwe.INCREASING.COLOR,uwt=Xwe.DECREASING.COLOR,fwt="#4499FF";function sG(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",swt.defaultLine),e(t+".marker.line.width")}function cwt(e,t,r,n){function i(l,f){return jwe.coerce(e,t,Zwe,l,f)}var a=awt(e,t,n,i);if(!a){t.visible=!1;return}owt(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");var o=i("textposition");nwt(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(i("texttemplate"),t.texttemplate||i("textinfo")),sG(i,"increasing",lwt),sG(i,"decreasing",uwt),sG(i,"totals",fwt);var s=i("connector.visible");if(s){i("connector.mode");var u=i("connector.line.width");u&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function hwt(e,t){var r,n;function i(o){return jwe.coerce(n._input,n,Zwe,o)}if(t.waterfallmode==="group")for(var a=0;a<e.length;a++)n=e[a],r=n._input,iwt(r,n,t,i,t.waterfallmode)}Ywe.exports={supplyDefaults:cwt,crossTraceDefaults:hwt}});var Jwe=Se((mfr,Kwe)=>{"use strict";var dwt=Zr(),pwt=oG();Kwe.exports=function(e,t,r){var n=!1;function i(s,u){return dwt.coerce(e,t,pwt,s,u)}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 i3e=Se((gfr,r3e)=>{"use strict";var $we=hu(),Qwe=Iy(),e3e=Zr().mergeArray,vwt=F0(),t3e=ju().BADNUM;function uG(e){return e==="a"||e==="absolute"}function fG(e){return e==="t"||e==="total"}r3e.exports=function(t,r){var n=$we.getFromId(t,r.xaxis||"x"),i=$we.getFromId(t,r.yaxis||"y"),a,o,s,u,l,f;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),u=Qwe(r,i,"y",s),l=!!r.yperiodalignment,f="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),u=Qwe(r,n,"x",s),l=!!r.xperiodalignment,f="x"),o=u.vals;for(var c=Math.min(o.length,a.length),h=new Array(c),d=0,p,x=!1,b=0;b<c;b++){var y=a[b]||0,k=!1;(a[b]!==t3e||fG(r.measure[b])||uG(r.measure[b]))&&b+1<c&&(a[b+1]!==t3e||fG(r.measure[b+1])||uG(r.measure[b+1]))&&(k=!0);var E=h[b]={i:b,p:o[b],s:y,rawS:y,cNext:k};uG(r.measure[b])?(d=E.s,E.isSum=!0,E.dir="totals",E.s=d):fG(r.measure[b])?(E.isSum=!0,E.dir="totals",E.s=d):(E.isSum=!1,E.dir=E.rawS<0?"decreasing":"increasing",p=E.s,E.s=d+p,d+=p),E.dir==="totals"&&(x=!0),l&&(h[b].orig_p=s[b],h[b][f+"End"]=u.ends[b],h[b][f+"Start"]=u.starts[b]),r.ids&&(E.id=String(r.ids[b])),E.v=(r.base||0)+d}return h.length&&(h[0].hasTotals=x),e3e(r.text,h,"tx"),e3e(r.hovertext,h,"htx"),vwt(h,r),h}});var o3e=Se((_fr,a3e)=>{"use strict";var n3e=Gb().setGroupPositions;a3e.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,u=[],l=[],f=[],c,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"&&(c=a[h],d.orientation==="h"?f.push(c):l.push(c),u.push(c))}var p={mode:n.waterfallmode,norm:n.waterfallnorm,gap:n.waterfallgap,groupgap:n.waterfallgroupgap};for(n3e(t,o,s,l,p),n3e(t,s,o,f,p),h=0;h<u.length;h++){c=u[h];for(var x=0;x<c.length;x++){var b=c[x];b.isSum===!1&&(b.s0+=x===0?0:c[x-1].s),x+1<c.length&&(c[x].nextP0=c[x+1].p0,c[x].nextS0=c[x+1].s0)}}}});var u3e=Se((xfr,l3e)=>{"use strict";var s3e=Nl(),ID=Zr(),ywt=yu(),GT=ju().BADNUM,mwt=i2(),gwt=bp().clearMinTextSize;l3e.exports=function(t,r,n,i){var a=t._fullLayout;gwt("waterfall",a),mwt.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),_wt(t,r,n,i)};function _wt(e,t,r,n){var i=t.xaxis,a=t.yaxis;ID.makeTraceGroups(n,r,"trace bars").each(function(o){var s=s3e.select(this),u=o[0].trace,l=ID.ensureSingle(s,"g","lines");if(!u.connector||!u.connector.visible){l.remove();return}var f=u.orientation==="h",c=u.connector.mode,h=l.selectAll("g.line").data(ID.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(p,x){if(!(x!==d-1&&!p.cNext)){var b=xwt(p,i,a,f),y=b[0],k=b[1],E="";y[0]!==GT&&k[0]!==GT&&y[1]!==GT&&k[1]!==GT&&(c==="spanning"&&!p.isSum&&x>0&&(f?E+="M"+y[0]+","+k[1]+"V"+k[0]:E+="M"+y[1]+","+k[0]+"H"+y[0]),c!=="between"&&(p.isSum||x<d-1)&&(f?E+="M"+y[1]+","+k[0]+"V"+k[1]:E+="M"+y[0]+","+k[1]+"H"+y[1]),y[2]!==GT&&k[2]!==GT&&(f?E+="M"+y[1]+","+k[1]+"V"+k[2]:E+="M"+y[1]+","+k[1]+"H"+y[2])),E===""&&(E="M0,0Z"),ID.ensureSingle(s3e.select(this),"path").attr("d",E).call(ywt.setClipUrl,t.layerClipId,e)}})})}function xwt(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 d3e=Se((bfr,h3e)=>{"use strict";var DD=Nl(),f3e=yu(),c3e=Pl(),bwt=N1().DESELECTDIM,wwt=N0(),Twt=bp().resizeText,Awt=wwt.styleTextPoints;function Swt(e,t,r){var n=r||DD.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");Twt(e,n,"waterfall"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=DD.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var u=o[s.dir].marker;DD.select(this).call(c3e.fill,u.color).call(c3e.stroke,u.line.color).call(f3e.dashLine,u.line.dash,u.line.width).style("opacity",o.selectedpoints&&!s.selected?bwt:1)}}),Awt(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;f3e.lineGroupStyle(DD.select(this).selectAll("path"),s.width,s.color,s.dash)})})}h3e.exports={style:Swt}});var g3e=Se((wfr,m3e)=>{"use strict";var Mwt=hu().hoverLabelText,p3e=Pl().opacity,Ewt=TT().hoverOnBars,v3e=HT(),y3e={increasing:v3e.INCREASING.SYMBOL,decreasing:v3e.DECREASING.SYMBOL};m3e.exports=function(t,r,n,i,a){var o=Ewt(t,r,n,i,a);if(!o)return;var s=o.cd,u=s[0].trace,l=u.orientation==="h",f=l?"x":"y",c=l?t.xa:t.ya;function h(_){return Mwt(c,_,u[f+"hoverformat"])}var d=o.index,p=s[d],x=p.isSum?p.b+p.s:p.rawS;o.initial=p.b+p.s-x,o.delta=x,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=x<0?"("+b+")":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var y=p.hi||u.hoverinfo,k=[];if(y&&y!=="none"&&y!=="skip"){var E=y==="all",A=y.split("+"),L=function(_){return E||A.indexOf(_)!==-1};p.isSum||(L("final")&&(l?!L("x"):!L("y"))&&k.push(o.finalLabel),L("delta")&&(x<0?k.push(o.deltaLabel+" "+y3e.decreasing):k.push(o.deltaLabel+" "+y3e.increasing)),L("initial")&&k.push("Initial: "+o.initialLabel))}return k.length&&(o.extraText=k.join("<br>")),o.color=kwt(u,p),[o]};function kwt(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(p3e(n))return n;if(p3e(i)&&a)return i}});var x3e=Se((Tfr,_3e)=>{"use strict";_3e.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 w3e=Se((Afr,b3e)=>{"use strict";b3e.exports={attributes:aG(),layoutAttributes:oG(),supplyDefaults:lG().supplyDefaults,crossTraceDefaults:lG().crossTraceDefaults,supplyLayoutDefaults:Jwe(),calc:i3e(),crossTraceCalc:o3e(),plot:u3e(),style:d3e().style,hoverPoints:g3e(),eventData:x3e(),selectPoints:AT(),moduleType:"trace",name:"waterfall",basePlotModule:Th(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var A3e=Se((Sfr,T3e)=>{"use strict";T3e.exports=w3e()});var WT=Se((Mfr,S3e)=>{"use strict";S3e.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 cG=Se((Efr,E3e)=>{"use strict";var Cwt=zf(),Lwt=Zc().zorder,zwt=Du().hovertemplateAttrs,M3e=vu().extendFlat,Pwt=WT().colormodel,D4=["rgb","rgba","rgba256","hsl","hsla"],Iwt=[],Dwt=[];for(jT=0;jT<D4.length;jT++)I4=Pwt[D4[jT]],Iwt.push("For the `"+D4[jT]+"` colormodel, it is ["+(I4.zminDflt||I4.min).join(", ")+"]."),Dwt.push("For the `"+D4[jT]+"` colormodel, it is ["+(I4.zmaxDflt||I4.max).join(", ")+"].");var I4,jT;E3e.exports=M3e({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:D4,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"},dy:{valType:"number",dflt:1,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:M3e({},Cwt.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:zwt({},{keys:["z","color","colormodel"]}),zorder:Lwt})});var L3e=Se((kfr,C3e)=>{"use strict";var Rwt=Zr(),Fwt=cG(),k3e=WT(),qwt=Lg().IMAGE_URL_PREFIX;C3e.exports=function(t,r){function n(o,s){return Rwt.coerce(t,r,Fwt,o,s)}n("source"),r.source&&!r.source.match(qwt)&&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=k3e.colormodel[r.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=k3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),r._length=null,n("zorder")}});var Ug=Se((Cfr,hG)=>{typeof Object.create=="function"?hG.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:hG.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 dG=Se((Lfr,z3e)=>{z3e.exports=pb().EventEmitter});var D3e=Se(RD=>{"use strict";RD.byteLength=Owt;RD.toByteArray=Uwt;RD.fromByteArray=Gwt;var Fm=[],Z0=[],Bwt=typeof Uint8Array!="undefined"?Uint8Array:Array,pG="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(s2=0,P3e=pG.length;s2<P3e;++s2)Fm[s2]=pG[s2],Z0[pG.charCodeAt(s2)]=s2;var s2,P3e;Z0[45]=62;Z0[95]=63;function I3e(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 Owt(e){var t=I3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Nwt(e,t,r){return(t+r)*3/4-r}function Uwt(e){var t,r=I3e(e),n=r[0],i=r[1],a=new Bwt(Nwt(e,n,i)),o=0,s=i>0?n-4:n,u;for(u=0;u<s;u+=4)t=Z0[e.charCodeAt(u)]<<18|Z0[e.charCodeAt(u+1)]<<12|Z0[e.charCodeAt(u+2)]<<6|Z0[e.charCodeAt(u+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=Z0[e.charCodeAt(u)]<<2|Z0[e.charCodeAt(u+1)]>>4,a[o++]=t&255),i===1&&(t=Z0[e.charCodeAt(u)]<<10|Z0[e.charCodeAt(u+1)]<<4|Z0[e.charCodeAt(u+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function Vwt(e){return Fm[e>>18&63]+Fm[e>>12&63]+Fm[e>>6&63]+Fm[e&63]}function Hwt(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(Vwt(n));return i.join("")}function Gwt(e){for(var t,r=e.length,n=r%3,i=[],a=16383,o=0,s=r-n;o<s;o+=a)i.push(Hwt(e,o,o+a>s?s:o+a));return n===1?(t=e[r-1],i.push(Fm[t>>2]+Fm[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Fm[t>>10]+Fm[t>>4&63]+Fm[t<<2&63]+"=")),i.join("")}});var R3e=Se(vG=>{vG.read=function(e,t,r,n,i){var a,o,s=i*8-n-1,u=(1<<s)-1,l=u>>1,f=-7,c=r?i-1:0,h=r?-1:1,d=e[t+c];for(c+=h,a=d&(1<<-f)-1,d>>=-f,f+=s;f>0;a=a*256+e[t+c],c+=h,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=n;f>0;o=o*256+e[t+c],c+=h,f-=8);if(a===0)a=1-l;else{if(a===u)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-l}return(d?-1:1)*o*Math.pow(2,a-n)};vG.write=function(e,t,r,n,i,a){var o,s,u,l=a*8-i-1,f=(1<<l)-1,c=f>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,x=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=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+c>=1?t+=h/u:t+=h*Math.pow(2,1-c),t*u>=2&&(o++,u/=2),o+c>=f?(s=0,o=f):o+c>=1?(s=(t*u-1)*Math.pow(2,i),o=o+c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=s&255,d+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[r+d]=o&255,d+=p,o/=256,l-=8);e[r+d-p]|=x*128}});var u2=Se(KT=>{"use strict";var yG=D3e(),XT=R3e(),F3e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;KT.Buffer=Ns;KT.SlowBuffer=Kwt;KT.INSPECT_MAX_BYTES=50;var FD=2147483647;KT.kMaxLength=FD;Ns.TYPED_ARRAY_SUPPORT=Wwt();!Ns.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 Wwt(){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(Ns.prototype,"parent",{enumerable:!0,get:function(){if(Ns.isBuffer(this))return this.buffer}});Object.defineProperty(Ns.prototype,"offset",{enumerable:!0,get:function(){if(Ns.isBuffer(this))return this.byteOffset}});function Vg(e){if(e>FD)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Ns.prototype),t}function Ns(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 xG(e)}return N3e(e,t,r)}Ns.poolSize=8192;function N3e(e,t,r){if(typeof e=="string")return Zwt(e,t);if(ArrayBuffer.isView(e))return Xwt(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(qm(e,ArrayBuffer)||e&&qm(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(qm(e,SharedArrayBuffer)||e&&qm(e.buffer,SharedArrayBuffer)))return gG(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 Ns.from(n,t,r);let i=Ywt(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Ns.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)}Ns.from=function(e,t,r){return N3e(e,t,r)};Object.setPrototypeOf(Ns.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ns,Uint8Array);function U3e(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 jwt(e,t,r){return U3e(e),e<=0?Vg(e):t!==void 0?typeof r=="string"?Vg(e).fill(t,r):Vg(e).fill(t):Vg(e)}Ns.alloc=function(e,t,r){return jwt(e,t,r)};function xG(e){return U3e(e),Vg(e<0?0:bG(e)|0)}Ns.allocUnsafe=function(e){return xG(e)};Ns.allocUnsafeSlow=function(e){return xG(e)};function Zwt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Ns.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=V3e(e,t)|0,n=Vg(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function mG(e){let t=e.length<0?0:bG(e.length)|0,r=Vg(t);for(let n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Xwt(e){if(qm(e,Uint8Array)){let t=new Uint8Array(e);return gG(t.buffer,t.byteOffset,t.byteLength)}return mG(e)}function gG(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,Ns.prototype),n}function Ywt(e){if(Ns.isBuffer(e)){let t=bG(e.length)|0,r=Vg(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||TG(e.length)?Vg(0):mG(e);if(e.type==="Buffer"&&Array.isArray(e.data))return mG(e.data)}function bG(e){if(e>=FD)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+FD.toString(16)+" bytes");return e|0}function Kwt(e){return+e!=e&&(e=0),Ns.alloc(+e)}Ns.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Ns.prototype};Ns.compare=function(t,r){if(qm(t,Uint8Array)&&(t=Ns.from(t,t.offset,t.byteLength)),qm(r,Uint8Array)&&(r=Ns.from(r,r.offset,r.byteLength)),!Ns.isBuffer(t)||!Ns.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};Ns.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}};Ns.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return Ns.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;let i=Ns.allocUnsafe(r),a=0;for(n=0;n<t.length;++n){let o=t[n];if(qm(o,Uint8Array))a+o.length>i.length?(Ns.isBuffer(o)||(o=Ns.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(Ns.isBuffer(o))o.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return i};function V3e(e,t){if(Ns.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||qm(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 _G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return J3e(e).length;default:if(i)return n?-1:_G(e).length;t=(""+t).toLowerCase(),i=!0}}Ns.byteLength=V3e;function Jwt(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 s3t(this,t,r);case"utf8":case"utf-8":return G3e(this,t,r);case"ascii":return a3t(this,t,r);case"latin1":case"binary":return o3t(this,t,r);case"base64":return i3t(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l3t(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Ns.prototype._isBuffer=!0;function l2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}Ns.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)l2(this,r,r+1);return this};Ns.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)l2(this,r,r+3),l2(this,r+1,r+2);return this};Ns.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)l2(this,r,r+7),l2(this,r+1,r+6),l2(this,r+2,r+5),l2(this,r+3,r+4);return this};Ns.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?G3e(this,0,t):Jwt.apply(this,arguments)};Ns.prototype.toLocaleString=Ns.prototype.toString;Ns.prototype.equals=function(t){if(!Ns.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:Ns.compare(this,t)===0};Ns.prototype.inspect=function(){let t="",r=KT.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};F3e&&(Ns.prototype[F3e]=Ns.prototype.inspect);Ns.prototype.compare=function(t,r,n,i,a){if(qm(t,Uint8Array)&&(t=Ns.from(t,t.offset,t.byteLength)),!Ns.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,u=Math.min(o,s),l=this.slice(i,a),f=t.slice(r,n);for(let c=0;c<u;++c)if(l[c]!==f[c]){o=l[c],s=f[c];break}return o<s?-1:s<o?1:0};function H3e(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,TG(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=Ns.from(t,n)),Ns.isBuffer(t))return t.length===0?-1:q3e(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):q3e(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function q3e(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 u(f,c){return a===1?f[c]:f.readUInt16BE(c*a)}let l;if(i){let f=-1;for(l=r;l<o;l++)if(u(e,l)===u(t,f===-1?0:l-f)){if(f===-1&&(f=l),l-f+1===s)return f*a}else f!==-1&&(l-=l-f),f=-1}else for(r+s>o&&(r=o-s),l=r;l>=0;l--){let f=!0;for(let c=0;c<s;c++)if(u(e,l+c)!==u(t,c)){f=!1;break}if(f)return l}return-1}Ns.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};Ns.prototype.indexOf=function(t,r,n){return H3e(this,t,r,n,!0)};Ns.prototype.lastIndexOf=function(t,r,n){return H3e(this,t,r,n,!1)};function $wt(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(TG(s))return o;e[r+o]=s}return o}function Qwt(e,t,r,n){return qD(_G(t,e.length-r),e,r,n)}function e3t(e,t,r,n){return qD(h3t(t),e,r,n)}function t3t(e,t,r,n){return qD(J3e(t),e,r,n)}function r3t(e,t,r,n){return qD(d3t(t,e.length-r),e,r,n)}Ns.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 $wt(this,t,r,n);case"utf8":case"utf-8":return Qwt(this,t,r,n);case"ascii":case"latin1":case"binary":return e3t(this,t,r,n);case"base64":return t3t(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r3t(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};Ns.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function i3t(e,t,r){return t===0&&r===e.length?yG.fromByteArray(e):yG.fromByteArray(e.slice(t,r))}function G3e(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 u,l,f,c;switch(s){case 1:a<128&&(o=a);break;case 2:u=e[i+1],(u&192)===128&&(c=(a&31)<<6|u&63,c>127&&(o=c));break;case 3:u=e[i+1],l=e[i+2],(u&192)===128&&(l&192)===128&&(c=(a&15)<<12|(u&63)<<6|l&63,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:u=e[i+1],l=e[i+2],f=e[i+3],(u&192)===128&&(l&192)===128&&(f&192)===128&&(c=(a&15)<<18|(u&63)<<12|(l&63)<<6|f&63,c>65535&&c<1114112&&(o=c))}}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 n3t(n)}var B3e=4096;function n3t(e){let t=e.length;if(t<=B3e)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=B3e));return r}function a3t(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 o3t(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 s3t(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+=p3t[e[a]];return i}function l3t(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}Ns.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,Ns.prototype),i};function rp(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")}Ns.prototype.readUintLE=Ns.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||rp(t,r,this.length);let i=this[t],a=1,o=0;for(;++o<r&&(a*=256);)i+=this[t+o]*a;return i};Ns.prototype.readUintBE=Ns.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||rp(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};Ns.prototype.readUint8=Ns.prototype.readUInt8=function(t,r){return t=t>>>0,r||rp(t,1,this.length),this[t]};Ns.prototype.readUint16LE=Ns.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||rp(t,2,this.length),this[t]|this[t+1]<<8};Ns.prototype.readUint16BE=Ns.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||rp(t,2,this.length),this[t]<<8|this[t+1]};Ns.prototype.readUint32LE=Ns.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Ns.prototype.readUint32BE=Ns.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Ns.prototype.readBigUInt64LE=z_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(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))});Ns.prototype.readBigUInt64BE=z_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(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)});Ns.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||rp(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};Ns.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||rp(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};Ns.prototype.readInt8=function(t,r){return t=t>>>0,r||rp(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Ns.prototype.readInt16LE=function(t,r){t=t>>>0,r||rp(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Ns.prototype.readInt16BE=function(t,r){t=t>>>0,r||rp(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Ns.prototype.readInt32LE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Ns.prototype.readInt32BE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Ns.prototype.readBigInt64LE=z_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(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)});Ns.prototype.readBigInt64BE=z_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(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)});Ns.prototype.readFloatLE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),XT.read(this,t,!0,23,4)};Ns.prototype.readFloatBE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),XT.read(this,t,!1,23,4)};Ns.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||rp(t,8,this.length),XT.read(this,t,!0,52,8)};Ns.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||rp(t,8,this.length),XT.read(this,t,!1,52,8)};function Iv(e,t,r,n,i,a){if(!Ns.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")}Ns.prototype.writeUintLE=Ns.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;Iv(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};Ns.prototype.writeUintBE=Ns.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;Iv(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};Ns.prototype.writeUint8=Ns.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,1,255,0),this[r]=t&255,r+1};Ns.prototype.writeUint16LE=Ns.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Ns.prototype.writeUint16BE=Ns.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Ns.prototype.writeUint32LE=Ns.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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};Ns.prototype.writeUint32BE=Ns.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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 W3e(e,t,r,n,i){K3e(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 j3e(e,t,r,n,i){K3e(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}Ns.prototype.writeBigUInt64LE=z_(function(t,r=0){return W3e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ns.prototype.writeBigUInt64BE=z_(function(t,r=0){return j3e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ns.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let u=Math.pow(2,8*n-1);Iv(this,t,r,n,u-1,-u)}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};Ns.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let u=Math.pow(2,8*n-1);Iv(this,t,r,n,u-1,-u)}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};Ns.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Ns.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Ns.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Ns.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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};Ns.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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};Ns.prototype.writeBigInt64LE=z_(function(t,r=0){return W3e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Ns.prototype.writeBigInt64BE=z_(function(t,r=0){return j3e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Z3e(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 X3e(e,t,r,n,i){return t=+t,r=r>>>0,i||Z3e(e,t,r,4,34028234663852886e22,-34028234663852886e22),XT.write(e,t,r,n,23,4),r+4}Ns.prototype.writeFloatLE=function(t,r,n){return X3e(this,t,r,!0,n)};Ns.prototype.writeFloatBE=function(t,r,n){return X3e(this,t,r,!1,n)};function Y3e(e,t,r,n,i){return t=+t,r=r>>>0,i||Z3e(e,t,r,8,17976931348623157e292,-17976931348623157e292),XT.write(e,t,r,n,52,8),r+8}Ns.prototype.writeDoubleLE=function(t,r,n){return Y3e(this,t,r,!0,n)};Ns.prototype.writeDoubleBE=function(t,r,n){return Y3e(this,t,r,!1,n)};Ns.prototype.copy=function(t,r,n,i){if(!Ns.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};Ns.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"&&!Ns.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=Ns.isBuffer(t)?t:Ns.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 ZT={};function wG(e,t,r){ZT[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}`}}}wG("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);wG("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);wG("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=O3e(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=O3e(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function O3e(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 u3t(e,t,r){YT(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&R4(t,e.length-(r+1))}function K3e(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 ZT.ERR_OUT_OF_RANGE("value",s,e)}u3t(n,i,a)}function YT(e,t){if(typeof e!="number")throw new ZT.ERR_INVALID_ARG_TYPE(t,"number",e)}function R4(e,t,r){throw Math.floor(e)!==e?(YT(e,r),new ZT.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new ZT.ERR_BUFFER_OUT_OF_BOUNDS:new ZT.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var f3t=/[^+/0-9A-Za-z-_]/g;function c3t(e){if(e=e.split("=")[0],e=e.trim().replace(f3t,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function _G(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 h3t(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function d3t(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 J3e(e){return yG.toByteArray(c3t(e))}function qD(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 qm(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function TG(e){return e!==e}var p3t=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 z_(e){return typeof BigInt=="undefined"?v3t:e}function v3t(){throw new Error("BigInt not supported")}});var BD=Se((Rfr,$3e)=>{"use strict";$3e.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(r 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 a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var F4=Se((Ffr,Q3e)=>{"use strict";var y3t=BD();Q3e.exports=function(){return y3t()&&!!Symbol.toStringTag}});var tTe=Se((qfr,eTe)=>{"use strict";eTe.exports=Error});var iTe=Se((Bfr,rTe)=>{"use strict";rTe.exports=EvalError});var aTe=Se((Ofr,nTe)=>{"use strict";nTe.exports=RangeError});var sTe=Se((Nfr,oTe)=>{"use strict";oTe.exports=ReferenceError});var AG=Se((Ufr,lTe)=>{"use strict";lTe.exports=SyntaxError});var q4=Se((Vfr,uTe)=>{"use strict";uTe.exports=TypeError});var cTe=Se((Hfr,fTe)=>{"use strict";fTe.exports=URIError});var pTe=Se((Gfr,dTe)=>{"use strict";var hTe=typeof Symbol!="undefined"&&Symbol,m3t=BD();dTe.exports=function(){return typeof hTe!="function"||typeof Symbol!="function"||typeof hTe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:m3t()}});var mTe=Se((Wfr,yTe)=>{"use strict";var vTe={foo:{}},g3t=Object;yTe.exports=function(){return{__proto__:vTe}.foo===vTe.foo&&!({__proto__:null}instanceof g3t)}});var xTe=Se((jfr,_Te)=>{"use strict";var _3t="Function.prototype.bind called on incompatible ",x3t=Object.prototype.toString,b3t=Math.max,w3t="[object Function]",gTe=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},T3t=function(t,r){for(var n=[],i=r||0,a=0;i<t.length;i+=1,a+=1)n[a]=t[i];return n},A3t=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};_Te.exports=function(t){var r=this;if(typeof r!="function"||x3t.apply(r)!==w3t)throw new TypeError(_3t+r);for(var n=T3t(arguments,1),i,a=function(){if(this instanceof i){var f=r.apply(this,gTe(n,arguments));return Object(f)===f?f:this}return r.apply(t,gTe(n,arguments))},o=b3t(0,r.length-n.length),s=[],u=0;u<o;u++)s[u]="$"+u;if(i=Function("binder","return function ("+A3t(s,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var l=function(){};l.prototype=r.prototype,i.prototype=new l,l.prototype=null}return i}});var OD=Se((Zfr,bTe)=>{"use strict";var S3t=xTe();bTe.exports=Function.prototype.bind||S3t});var TTe=Se((Xfr,wTe)=>{"use strict";var M3t=Function.prototype.call,E3t=Object.prototype.hasOwnProperty,k3t=OD();wTe.exports=k3t.call(M3t,E3t)});var tA=Se((Yfr,kTe)=>{"use strict";var Wf,C3t=tTe(),L3t=iTe(),z3t=aTe(),P3t=sTe(),eA=AG(),QT=q4(),I3t=cTe(),ETe=Function,SG=function(e){try{return ETe('"use strict"; return ('+e+").constructor;")()}catch(t){}},f2=Object.getOwnPropertyDescriptor;if(f2)try{f2({},"")}catch(e){f2=null}var MG=function(){throw new QT},D3t=f2?function(){try{return arguments.callee,MG}catch(e){try{return f2(arguments,"callee").get}catch(t){return MG}}}():MG,JT=pTe()(),R3t=mTe()(),ip=Object.getPrototypeOf||(R3t?function(e){return e.__proto__}:null),$T={},F3t=typeof Uint8Array=="undefined"||!ip?Wf:ip(Uint8Array),c2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Wf:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Wf:ArrayBuffer,"%ArrayIteratorPrototype%":JT&&ip?ip([][Symbol.iterator]()):Wf,"%AsyncFromSyncIteratorPrototype%":Wf,"%AsyncFunction%":$T,"%AsyncGenerator%":$T,"%AsyncGeneratorFunction%":$T,"%AsyncIteratorPrototype%":$T,"%Atomics%":typeof Atomics=="undefined"?Wf:Atomics,"%BigInt%":typeof BigInt=="undefined"?Wf:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Wf:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Wf:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Wf:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":C3t,"%eval%":eval,"%EvalError%":L3t,"%Float32Array%":typeof Float32Array=="undefined"?Wf:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Wf:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Wf:FinalizationRegistry,"%Function%":ETe,"%GeneratorFunction%":$T,"%Int8Array%":typeof Int8Array=="undefined"?Wf:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Wf:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Wf:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":JT&&ip?ip(ip([][Symbol.iterator]())):Wf,"%JSON%":typeof JSON=="object"?JSON:Wf,"%Map%":typeof Map=="undefined"?Wf:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!JT||!ip?Wf:ip(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Wf:Promise,"%Proxy%":typeof Proxy=="undefined"?Wf:Proxy,"%RangeError%":z3t,"%ReferenceError%":P3t,"%Reflect%":typeof Reflect=="undefined"?Wf:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Wf:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!JT||!ip?Wf:ip(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Wf:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":JT&&ip?ip(""[Symbol.iterator]()):Wf,"%Symbol%":JT?Symbol:Wf,"%SyntaxError%":eA,"%ThrowTypeError%":D3t,"%TypedArray%":F3t,"%TypeError%":QT,"%Uint8Array%":typeof Uint8Array=="undefined"?Wf:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Wf:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Wf:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Wf:Uint32Array,"%URIError%":I3t,"%WeakMap%":typeof WeakMap=="undefined"?Wf:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Wf:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Wf:WeakSet};if(ip)try{null.error}catch(e){ATe=ip(ip(e)),c2["%Error.prototype%"]=ATe}var ATe,q3t=function e(t){var r;if(t==="%AsyncFunction%")r=SG("async function () {}");else if(t==="%GeneratorFunction%")r=SG("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=SG("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&ip&&(r=ip(i.prototype))}return c2[t]=r,r},STe={__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"]},B4=OD(),ND=TTe(),B3t=B4.call(Function.call,Array.prototype.concat),O3t=B4.call(Function.apply,Array.prototype.splice),MTe=B4.call(Function.call,String.prototype.replace),UD=B4.call(Function.call,String.prototype.slice),N3t=B4.call(Function.call,RegExp.prototype.exec),U3t=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V3t=/\\(\\)?/g,H3t=function(t){var r=UD(t,0,1),n=UD(t,-1);if(r==="%"&&n!=="%")throw new eA("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new eA("invalid intrinsic syntax, expected opening `%`");var i=[];return MTe(t,U3t,function(a,o,s,u){i[i.length]=s?MTe(u,V3t,"$1"):o||a}),i},G3t=function(t,r){var n=t,i;if(ND(STe,n)&&(i=STe[n],n="%"+i[0]+"%"),ND(c2,n)){var a=c2[n];if(a===$T&&(a=q3t(n)),typeof a=="undefined"&&!r)throw new QT("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new eA("intrinsic "+t+" does not exist!")};kTe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new QT("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new QT('"allowMissing" argument must be a boolean');if(N3t(/^%?[^%]*%?$/,t)===null)throw new eA("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=H3t(t),i=n.length>0?n[0]:"",a=G3t("%"+i+"%",r),o=a.name,s=a.value,u=!1,l=a.alias;l&&(i=l[0],O3t(n,B3t([0,1],l)));for(var f=1,c=!0;f<n.length;f+=1){var h=n[f],d=UD(h,0,1),p=UD(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new eA("property names with quotes must have matching quotes");if((h==="constructor"||!c)&&(u=!0),i+="."+h,o="%"+i+"%",ND(c2,o))s=c2[o];else if(s!=null){if(!(h in s)){if(!r)throw new QT("base intrinsic for "+t+" exists, but the property is not available.");return}if(f2&&f+1>=n.length){var x=f2(s,h);c=!!x,c&&"get"in x&&!("originalValue"in x.get)?s=x.get:s=s[h]}else c=ND(s,h),s=s[h];c&&!u&&(c2[o]=s)}}return s}});var HD=Se((Kfr,CTe)=>{"use strict";var W3t=tA(),VD=W3t("%Object.defineProperty%",!0)||!1;if(VD)try{VD({},"a",{value:1})}catch(e){VD=!1}CTe.exports=VD});var O4=Se((Jfr,LTe)=>{"use strict";var j3t=tA(),GD=j3t("%Object.getOwnPropertyDescriptor%",!0);if(GD)try{GD([],"length")}catch(e){GD=null}LTe.exports=GD});var DTe=Se(($fr,ITe)=>{"use strict";var zTe=HD(),Z3t=AG(),rA=q4(),PTe=O4();ITe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new rA("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new rA("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new rA("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new rA("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new rA("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new rA("`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,u=!!PTe&&PTe(t,r);if(zTe)zTe(t,r,{configurable:o===null&&u?u.configurable:!o,enumerable:i===null&&u?u.enumerable:!i,value:n,writable:a===null&&u?u.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new Z3t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var kG=Se((Qfr,FTe)=>{"use strict";var EG=HD(),RTe=function(){return!!EG};RTe.hasArrayLengthDefineBug=function(){if(!EG)return null;try{return EG([],"length",{value:1}).length!==1}catch(t){return!0}};FTe.exports=RTe});var UTe=Se((ecr,NTe)=>{"use strict";var X3t=tA(),qTe=DTe(),Y3t=kG()(),BTe=O4(),OTe=q4(),K3t=X3t("%Math.floor%");NTe.exports=function(t,r){if(typeof t!="function")throw new OTe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||K3t(r)!==r)throw new OTe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&BTe){var o=BTe(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(Y3t?qTe(t,"length",r,!0,!0):qTe(t,"length",r)),t}});var N4=Se((tcr,WD)=>{"use strict";var CG=OD(),jD=tA(),J3t=UTe(),$3t=q4(),GTe=jD("%Function.prototype.apply%"),WTe=jD("%Function.prototype.call%"),jTe=jD("%Reflect.apply%",!0)||CG.call(WTe,GTe),VTe=HD(),Q3t=jD("%Math.max%");WD.exports=function(t){if(typeof t!="function")throw new $3t("a function is required");var r=jTe(CG,WTe,arguments);return J3t(r,1+Q3t(0,t.length-(arguments.length-1)),!0)};var HTe=function(){return jTe(CG,GTe,arguments)};VTe?VTe(WD.exports,"apply",{value:HTe}):WD.exports.apply=HTe});var iA=Se((rcr,YTe)=>{"use strict";var ZTe=tA(),XTe=N4(),eTt=XTe(ZTe("String.prototype.indexOf"));YTe.exports=function(t,r){var n=ZTe(t,!!r);return typeof n=="function"&&eTt(t,".prototype.")>-1?XTe(n):n}});var $Te=Se((icr,JTe)=>{"use strict";var tTt=F4()(),rTt=iA(),LG=rTt("Object.prototype.toString"),ZD=function(t){return tTt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:LG(t)==="[object Arguments]"},KTe=function(t){return ZD(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&LG(t)!=="[object Array]"&&LG(t.callee)==="[object Function]"},iTt=function(){return ZD(arguments)}();ZD.isLegacyArguments=KTe;JTe.exports=iTt?ZD:KTe});var tAe=Se((ncr,eAe)=>{"use strict";var nTt=Object.prototype.toString,aTt=Function.prototype.toString,oTt=/^\s*(?:function)?\*/,QTe=F4()(),zG=Object.getPrototypeOf,sTt=function(){if(!QTe)return!1;try{return Function("return function*() {}")()}catch(e){}},PG;eAe.exports=function(t){if(typeof t!="function")return!1;if(oTt.test(aTt.call(t)))return!0;if(!QTe){var r=nTt.call(t);return r==="[object GeneratorFunction]"}if(!zG)return!1;if(typeof PG=="undefined"){var n=sTt();PG=n?zG(n):!1}return zG(t)===PG}});var aAe=Se((acr,nAe)=>{"use strict";var iAe=Function.prototype.toString,nA=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,DG,XD;if(typeof nA=="function"&&typeof Object.defineProperty=="function")try{DG=Object.defineProperty({},"length",{get:function(){throw XD}}),XD={},nA(function(){throw 42},null,DG)}catch(e){e!==XD&&(nA=null)}else nA=null;var lTt=/^\s*class\b/,RG=function(t){try{var r=iAe.call(t);return lTt.test(r)}catch(n){return!1}},IG=function(t){try{return RG(t)?!1:(iAe.call(t),!0)}catch(r){return!1}},YD=Object.prototype.toString,uTt="[object Object]",fTt="[object Function]",cTt="[object GeneratorFunction]",hTt="[object HTMLAllCollection]",dTt="[object HTML document.all class]",pTt="[object HTMLCollection]",vTt=typeof Symbol=="function"&&!!Symbol.toStringTag,yTt=!(0 in[,]),FG=function(){return!1};typeof document=="object"&&(rAe=document.all,YD.call(rAe)===YD.call(document.all)&&(FG=function(t){if((yTt||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=YD.call(t);return(r===hTt||r===dTt||r===pTt||r===uTt)&&t("")==null}catch(n){}return!1}));var rAe;nAe.exports=nA?function(t){if(FG(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{nA(t,null,DG)}catch(r){if(r!==XD)return!1}return!RG(t)&&IG(t)}:function(t){if(FG(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(vTt)return IG(t);if(RG(t))return!1;var r=YD.call(t);return r!==fTt&&r!==cTt&&!/^\[object HTML/.test(r)?!1:IG(t)}});var qG=Se((ocr,sAe)=>{"use strict";var mTt=aAe(),gTt=Object.prototype.toString,oAe=Object.prototype.hasOwnProperty,_Tt=function(t,r,n){for(var i=0,a=t.length;i<a;i++)oAe.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},xTt=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)},bTt=function(t,r,n){for(var i in t)oAe.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},wTt=function(t,r,n){if(!mTt(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),gTt.call(t)==="[object Array]"?_Tt(t,r,i):typeof t=="string"?xTt(t,r,i):bTt(t,r,i)};sAe.exports=wTt});var OG=Se((scr,lAe)=>{"use strict";var BG=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],TTt=typeof globalThis=="undefined"?window:globalThis;lAe.exports=function(){for(var t=[],r=0;r<BG.length;r++)typeof TTt[BG[r]]=="function"&&(t[t.length]=BG[r]);return t}});var dAe=Se((lcr,hAe)=>{"use strict";var JD=qG(),ATt=OG(),uAe=N4(),VG=iA(),KD=O4(),STt=VG("Object.prototype.toString"),cAe=F4()(),fAe=typeof globalThis=="undefined"?window:globalThis,UG=ATt(),HG=VG("String.prototype.slice"),NG=Object.getPrototypeOf,MTt=VG("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},$D={__proto__:null};cAe&&KD&&NG?JD(UG,function(e){var t=new fAe[e];if(Symbol.toStringTag in t){var r=NG(t),n=KD(r,Symbol.toStringTag);if(!n){var i=NG(r);n=KD(i,Symbol.toStringTag)}$D["$"+e]=uAe(n.get)}}):JD(UG,function(e){var t=new fAe[e],r=t.slice||t.set;r&&($D["$"+e]=uAe(r))});var ETt=function(t){var r=!1;return JD($D,function(n,i){if(!r)try{"$"+n(t)===i&&(r=HG(i,1))}catch(a){}}),r},kTt=function(t){var r=!1;return JD($D,function(n,i){if(!r)try{n(t),r=HG(i,1)}catch(a){}}),r};hAe.exports=function(t){if(!t||typeof t!="object")return!1;if(!cAe){var r=HG(STt(t),8,-1);return MTt(UG,r)>-1?r:r!=="Object"?!1:kTt(t)}return KD?ETt(t):null}});var _Ae=Se((ucr,gAe)=>{"use strict";var pAe=qG(),CTt=OG(),WG=iA(),LTt=WG("Object.prototype.toString"),vAe=F4()(),QD=O4(),zTt=typeof globalThis=="undefined"?window:globalThis,yAe=CTt(),PTt=WG("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},ITt=WG("String.prototype.slice"),mAe={},GG=Object.getPrototypeOf;vAe&&QD&&GG&&pAe(yAe,function(e){var t=new zTt[e];if(Symbol.toStringTag in t){var r=GG(t),n=QD(r,Symbol.toStringTag);if(!n){var i=GG(r);n=QD(i,Symbol.toStringTag)}mAe[e]=n.get}});var DTt=function(t){var r=!1;return pAe(mAe,function(n,i){if(!r)try{r=n.call(t)===i}catch(a){}}),r};gAe.exports=function(t){if(!t||typeof t!="object")return!1;if(!vAe||!(Symbol.toStringTag in t)){var r=ITt(LTt(t),8,-1);return PTt(yAe,r)>-1}return QD?DTt(t):!1}});var XG=Se(Vf=>{"use strict";var RTt=$Te(),FTt=tAe(),Hy=dAe(),xAe=_Ae();function aA(e){return e.call.bind(e)}var bAe=typeof BigInt!="undefined",wAe=typeof Symbol!="undefined",X0=aA(Object.prototype.toString),qTt=aA(Number.prototype.valueOf),BTt=aA(String.prototype.valueOf),OTt=aA(Boolean.prototype.valueOf);bAe&&(TAe=aA(BigInt.prototype.valueOf));var TAe;wAe&&(AAe=aA(Symbol.prototype.valueOf));var AAe;function V4(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}Vf.isArgumentsObject=RTt;Vf.isGeneratorFunction=FTt;Vf.isTypedArray=xAe;function NTt(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}Vf.isPromise=NTt;function UTt(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):xAe(e)||MAe(e)}Vf.isArrayBufferView=UTt;function VTt(e){return Hy(e)==="Uint8Array"}Vf.isUint8Array=VTt;function HTt(e){return Hy(e)==="Uint8ClampedArray"}Vf.isUint8ClampedArray=HTt;function GTt(e){return Hy(e)==="Uint16Array"}Vf.isUint16Array=GTt;function WTt(e){return Hy(e)==="Uint32Array"}Vf.isUint32Array=WTt;function jTt(e){return Hy(e)==="Int8Array"}Vf.isInt8Array=jTt;function ZTt(e){return Hy(e)==="Int16Array"}Vf.isInt16Array=ZTt;function XTt(e){return Hy(e)==="Int32Array"}Vf.isInt32Array=XTt;function YTt(e){return Hy(e)==="Float32Array"}Vf.isFloat32Array=YTt;function KTt(e){return Hy(e)==="Float64Array"}Vf.isFloat64Array=KTt;function JTt(e){return Hy(e)==="BigInt64Array"}Vf.isBigInt64Array=JTt;function $Tt(e){return Hy(e)==="BigUint64Array"}Vf.isBigUint64Array=$Tt;function e6(e){return X0(e)==="[object Map]"}e6.working=typeof Map!="undefined"&&e6(new Map);function QTt(e){return typeof Map=="undefined"?!1:e6.working?e6(e):e instanceof Map}Vf.isMap=QTt;function t6(e){return X0(e)==="[object Set]"}t6.working=typeof Set!="undefined"&&t6(new Set);function eAt(e){return typeof Set=="undefined"?!1:t6.working?t6(e):e instanceof Set}Vf.isSet=eAt;function r6(e){return X0(e)==="[object WeakMap]"}r6.working=typeof WeakMap!="undefined"&&r6(new WeakMap);function tAt(e){return typeof WeakMap=="undefined"?!1:r6.working?r6(e):e instanceof WeakMap}Vf.isWeakMap=tAt;function ZG(e){return X0(e)==="[object WeakSet]"}ZG.working=typeof WeakSet!="undefined"&&ZG(new WeakSet);function rAt(e){return ZG(e)}Vf.isWeakSet=rAt;function i6(e){return X0(e)==="[object ArrayBuffer]"}i6.working=typeof ArrayBuffer!="undefined"&&i6(new ArrayBuffer);function SAe(e){return typeof ArrayBuffer=="undefined"?!1:i6.working?i6(e):e instanceof ArrayBuffer}Vf.isArrayBuffer=SAe;function n6(e){return X0(e)==="[object DataView]"}n6.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&n6(new DataView(new ArrayBuffer(1),0,1));function MAe(e){return typeof DataView=="undefined"?!1:n6.working?n6(e):e instanceof DataView}Vf.isDataView=MAe;var jG=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function U4(e){return X0(e)==="[object SharedArrayBuffer]"}function EAe(e){return typeof jG=="undefined"?!1:(typeof U4.working=="undefined"&&(U4.working=U4(new jG)),U4.working?U4(e):e instanceof jG)}Vf.isSharedArrayBuffer=EAe;function iAt(e){return X0(e)==="[object AsyncFunction]"}Vf.isAsyncFunction=iAt;function nAt(e){return X0(e)==="[object Map Iterator]"}Vf.isMapIterator=nAt;function aAt(e){return X0(e)==="[object Set Iterator]"}Vf.isSetIterator=aAt;function oAt(e){return X0(e)==="[object Generator]"}Vf.isGeneratorObject=oAt;function sAt(e){return X0(e)==="[object WebAssembly.Module]"}Vf.isWebAssemblyCompiledModule=sAt;function kAe(e){return V4(e,qTt)}Vf.isNumberObject=kAe;function CAe(e){return V4(e,BTt)}Vf.isStringObject=CAe;function LAe(e){return V4(e,OTt)}Vf.isBooleanObject=LAe;function zAe(e){return bAe&&V4(e,TAe)}Vf.isBigIntObject=zAe;function PAe(e){return wAe&&V4(e,AAe)}Vf.isSymbolObject=PAe;function lAt(e){return kAe(e)||CAe(e)||LAe(e)||zAe(e)||PAe(e)}Vf.isBoxedPrimitive=lAt;function uAt(e){return typeof Uint8Array!="undefined"&&(SAe(e)||EAe(e))}Vf.isAnyArrayBuffer=uAt;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(Vf,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var YG=Se((ccr,IAe)=>{IAe.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var tW=Se(Hf=>{var DAe=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},fAt=/%[sdj%]/g;Hf.format=function(e){if(!c6(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(P_(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(fAt,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(u){return"[Circular]"}default:return s}}),o=n[r];r<i;o=n[++r])f6(o)||!oA(o)?a+=" "+o:a+=" "+P_(o);return a};Hf.deprecate=function(e,t){if(typeof process!="undefined"&&process.noDeprecation===!0)return e;if(typeof process=="undefined")return function(){return Hf.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 a6={},RAe=/^$/;o6="false",o6=o6.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),RAe=new RegExp("^"+o6+"$","i");var o6;Hf.debuglog=function(e){if(e=e.toUpperCase(),!a6[e])if(RAe.test(e)){var t=process.pid;a6[e]=function(){var r=Hf.format.apply(Hf,arguments);console.error("%s %d: %s",e,t,r)}}else a6[e]=function(){};return a6[e]};function P_(e,t){var r={seen:[],stylize:hAt};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),QG(t)?r.showHidden=t:t&&Hf._extend(r,t),d2(r.showHidden)&&(r.showHidden=!1),d2(r.depth)&&(r.depth=2),d2(r.colors)&&(r.colors=!1),d2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=cAt),l6(r,e,r.depth)}Hf.inspect=P_;P_.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]};P_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function cAt(e,t){var r=P_.styles[t];return r?"\x1B["+P_.colors[r][0]+"m"+e+"\x1B["+P_.colors[r][1]+"m":e}function hAt(e,t){return e}function dAt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function l6(e,t,r){if(e.customInspect&&t&&s6(t.inspect)&&t.inspect!==Hf.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return c6(n)||(n=l6(e,n,r)),n}var i=pAt(e,t);if(i)return i;var a=Object.keys(t),o=dAt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),G4(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return KG(t);if(a.length===0){if(s6(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(H4(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(u6(t))return e.stylize(Date.prototype.toString.call(t),"date");if(G4(t))return KG(t)}var u="",l=!1,f=["{","}"];if(FAe(t)&&(l=!0,f=["[","]"]),s6(t)){var c=t.name?": "+t.name:"";u=" [Function"+c+"]"}if(H4(t)&&(u=" "+RegExp.prototype.toString.call(t)),u6(t)&&(u=" "+Date.prototype.toUTCString.call(t)),G4(t)&&(u=" "+KG(t)),a.length===0&&(!l||t.length==0))return f[0]+u+f[1];if(r<0)return H4(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return l?h=vAt(e,t,r,o,a):h=a.map(function(d){return $G(e,t,r,o,d,l)}),e.seen.pop(),yAt(h,u,f)}function pAt(e,t){if(d2(t))return e.stylize("undefined","undefined");if(c6(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(qAe(t))return e.stylize(""+t,"number");if(QG(t))return e.stylize(""+t,"boolean");if(f6(t))return e.stylize("null","null")}function KG(e){return"["+Error.prototype.toString.call(e)+"]"}function vAt(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)BAe(t,String(o))?a.push($G(e,t,r,n,String(o),!0)):a.push("");return i.forEach(function(u){u.match(/^\d+$/)||a.push($G(e,t,r,n,u,!0))}),a}function $G(e,t,r,n,i,a){var o,s,u;if(u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},u.get?u.set?s=e.stylize("[Getter/Setter]","special"):s=e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),BAe(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(f6(r)?s=l6(e,u.value,null):s=l6(e,u.value,r-1),s.indexOf(`
`)>-1&&(a?s=s.split(`
`).map(function(l){return"  "+l}).join(`
`).slice(2):s=`
`+s.split(`
`).map(function(l){return"   "+l}).join(`
`))):s=e.stylize("[Circular]","special")),d2(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 yAt(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(`
`)>=0&&n++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(t===""?"":t+`
 `)+" "+e.join(`,
  `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}Hf.types=XG();function FAe(e){return Array.isArray(e)}Hf.isArray=FAe;function QG(e){return typeof e=="boolean"}Hf.isBoolean=QG;function f6(e){return e===null}Hf.isNull=f6;function mAt(e){return e==null}Hf.isNullOrUndefined=mAt;function qAe(e){return typeof e=="number"}Hf.isNumber=qAe;function c6(e){return typeof e=="string"}Hf.isString=c6;function gAt(e){return typeof e=="symbol"}Hf.isSymbol=gAt;function d2(e){return e===void 0}Hf.isUndefined=d2;function H4(e){return oA(e)&&eW(e)==="[object RegExp]"}Hf.isRegExp=H4;Hf.types.isRegExp=H4;function oA(e){return typeof e=="object"&&e!==null}Hf.isObject=oA;function u6(e){return oA(e)&&eW(e)==="[object Date]"}Hf.isDate=u6;Hf.types.isDate=u6;function G4(e){return oA(e)&&(eW(e)==="[object Error]"||e instanceof Error)}Hf.isError=G4;Hf.types.isNativeError=G4;function s6(e){return typeof e=="function"}Hf.isFunction=s6;function _At(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}Hf.isPrimitive=_At;Hf.isBuffer=YG();function eW(e){return Object.prototype.toString.call(e)}function JG(e){return e<10?"0"+e.toString(10):e.toString(10)}var xAt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function bAt(){var e=new Date,t=[JG(e.getHours()),JG(e.getMinutes()),JG(e.getSeconds())].join(":");return[e.getDate(),xAt[e.getMonth()],t].join(" ")}Hf.log=function(){console.log("%s - %s",bAt(),Hf.format.apply(Hf,arguments))};Hf.inherits=Ug();Hf._extend=function(e,t){if(!t||!oA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function BAe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var h2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;Hf.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(h2&&t[h2]){var r=t[h2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,h2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(u,l){n=u,i=l}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(u,l){u?i(u):n(l)});try{t.apply(this,o)}catch(u){i(u)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),h2&&Object.defineProperty(r,h2,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,DAe(t))};Hf.promisify.custom=h2;function wAt(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function TAt(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(wAt.bind(null,s,o))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,DAe(e)),t}Hf.callbackify=TAt});var VAe=Se((dcr,UAe)=>{"use strict";function OAe(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 AAt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OAe(Object(r),!0).forEach(function(n){SAt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OAe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SAt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MAt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NAe(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 EAt(e,t,r){return t&&NAe(e.prototype,t),r&&NAe(e,r),e}var kAt=u2(),h6=kAt.Buffer,CAt=tW(),rW=CAt.inspect,LAt=rW&&rW.custom||"inspect";function zAt(e,t,r){h6.prototype.copy.call(e,t,r)}UAe.exports=function(){function e(){MAt(this,e),this.head=null,this.tail=null,this.length=0}return EAt(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 h6.alloc(0);for(var n=h6.allocUnsafe(r>>>0),i=this.head,a=0;i;)zAt(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=h6.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:LAt,value:function(r,n){return rW(this,AAt({},n,{depth:0,customInspect:!1}))}}]),e}()});var nW=Se((pcr,GAe)=>{"use strict";function PAt(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(iW,this,e)):process.nextTick(iW,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(d6,r):(r._writableState.errorEmitted=!0,process.nextTick(HAe,r,a)):process.nextTick(HAe,r,a):t?(process.nextTick(d6,r),t(a)):process.nextTick(d6,r)}),this)}function HAe(e,t){iW(e,t),d6(e)}function d6(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function IAt(){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 iW(e,t){e.emit("error",t)}function DAt(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}GAe.exports={destroy:PAt,undestroy:IAt,errorOrDestroy:DAt}});var p2=Se((vcr,ZAe)=>{"use strict";function RAt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var jAe={};function Y0(e,t,r){r||(r=Error);function n(a,o,s){return typeof t=="string"?t:t(a,o,s)}var i=function(a){RAt(o,a);function o(s,u,l){return a.call(this,n(s,u,l))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=e,jAe[e]=i}function WAe(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 FAt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function qAt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function BAt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Y0("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Y0("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&FAt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(qAt(e," argument"))i="The ".concat(e," ").concat(n," ").concat(WAe(t,"type"));else{var a=BAt(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(WAe(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);Y0("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Y0("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Y0("ERR_STREAM_PREMATURE_CLOSE","Premature close");Y0("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Y0("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Y0("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Y0("ERR_STREAM_WRITE_AFTER_END","write after end");Y0("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Y0("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Y0("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");ZAe.exports.codes=jAe});var aW=Se((ycr,XAe)=>{"use strict";var OAt=p2().codes.ERR_INVALID_OPT_VALUE;function NAt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function UAt(e,t,r,n){var i=NAt(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new OAt(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}XAe.exports={getHighWaterMark:UAt}});var KAe=Se((mcr,YAe)=>{YAe.exports=VAt;function VAt(e,t){if(oW("noDeprecation"))return e;var r=!1;function n(){if(!r){if(oW("throwDeprecation"))throw new Error(t);oW("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function oW(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 uW=Se((gcr,rSe)=>{"use strict";rSe.exports=Oh;function $Ae(e){var t=this;this.next=null,this.entry=null,this.finish=function(){vSt(t,e)}}var sA;Oh.WritableState=j4;var HAt={deprecate:KAe()},QAe=dG(),v6=u2().Buffer,GAt=window.Uint8Array||function(){};function WAt(e){return v6.from(e)}function jAt(e){return v6.isBuffer(e)||e instanceof GAt}var lW=nW(),ZAt=aW(),XAt=ZAt.getHighWaterMark,I_=p2().codes,YAt=I_.ERR_INVALID_ARG_TYPE,KAt=I_.ERR_METHOD_NOT_IMPLEMENTED,JAt=I_.ERR_MULTIPLE_CALLBACK,$At=I_.ERR_STREAM_CANNOT_PIPE,QAt=I_.ERR_STREAM_DESTROYED,eSt=I_.ERR_STREAM_NULL_VALUES,tSt=I_.ERR_STREAM_WRITE_AFTER_END,rSt=I_.ERR_UNKNOWN_ENCODING,lA=lW.errorOrDestroy;Ug()(Oh,QAe);function iSt(){}function j4(e,t,r){sA=sA||v2(),e=e||{},typeof r!="boolean"&&(r=t instanceof sA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=XAt(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){fSt(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 $Ae(this)}j4.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(j4.prototype,"buffer",{get:HAt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var p6;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(p6=Function.prototype[Symbol.hasInstance],Object.defineProperty(Oh,Symbol.hasInstance,{value:function(t){return p6.call(this,t)?!0:this!==Oh?!1:t&&t._writableState instanceof j4}})):p6=function(t){return t instanceof this};function Oh(e){sA=sA||v2();var t=this instanceof sA;if(!t&&!p6.call(Oh,this))return new Oh(e);this._writableState=new j4(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)),QAe.call(this)}Oh.prototype.pipe=function(){lA(this,new $At)};function nSt(e,t){var r=new tSt;lA(e,r),process.nextTick(t,r)}function aSt(e,t,r,n){var i;return r===null?i=new eSt:typeof r!="string"&&!t.objectMode&&(i=new YAt("chunk",["string","Buffer"],r)),i?(lA(e,i),process.nextTick(n,i),!1):!0}Oh.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&jAt(e);return a&&!v6.isBuffer(e)&&(e=WAt(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=iSt),n.ending?nSt(this,r):(a||aSt(this,n,e,r))&&(n.pendingcb++,i=sSt(this,n,a,e,t,r)),i};Oh.prototype.cork=function(){this._writableState.corked++};Oh.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&eSe(this,e))};Oh.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 rSt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Oh.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function oSt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=v6.from(t,r)),t}Object.defineProperty(Oh.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function sSt(e,t,r,n,i,a){if(!r){var o=oSt(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else sW(e,t,!1,s,n,i,a);return u}function sW(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new QAt("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function lSt(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(W4,e,t),e._writableState.errorEmitted=!0,lA(e,n)):(i(n),e._writableState.errorEmitted=!0,lA(e,n),W4(e,t))}function uSt(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function fSt(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new JAt;if(uSt(r),t)lSt(e,r,n,t,i);else{var a=tSe(r)||e.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&eSe(e,r),n?process.nextTick(JAe,e,r,a,i):JAe(e,r,a,i)}}function JAe(e,t,r,n){r||cSt(e,t),t.pendingcb--,n(),W4(e,t)}function cSt(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function eSe(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,sW(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 $Ae(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,l=r.encoding,f=r.callback,c=t.objectMode?1:u.length;if(sW(e,t,!1,c,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}Oh.prototype._write=function(e,t,r){r(new KAt("_write()"))};Oh.prototype._writev=null;Oh.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||pSt(this,n,r),this};Object.defineProperty(Oh.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function tSe(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function hSt(e,t){e._final(function(r){t.pendingcb--,r&&lA(e,r),t.prefinished=!0,e.emit("prefinish"),W4(e,t)})}function dSt(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(hSt,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function W4(e,t){var r=tSe(t);if(r&&(dSt(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 pSt(e,t,r){t.ending=!0,W4(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(Oh.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Oh.prototype.destroy=lW.destroy;Oh.prototype._undestroy=lW.undestroy;Oh.prototype._destroy=function(e,t){t(e)}});var v2=Se((_cr,nSe)=>{"use strict";var ySt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};nSe.exports=Bm;var iSe=hW(),cW=uW();Ug()(Bm,iSe);for(fW=ySt(cW.prototype),y6=0;y6<fW.length;y6++)m6=fW[y6],Bm.prototype[m6]||(Bm.prototype[m6]=cW.prototype[m6]);var fW,m6,y6;function Bm(e){if(!(this instanceof Bm))return new Bm(e);iSe.call(this,e),cW.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",mSt)))}Object.defineProperty(Bm.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Bm.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Bm.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function mSt(){this._writableState.ended||process.nextTick(gSt,this)}function gSt(e){e.end()}Object.defineProperty(Bm.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 sSe=Se((dW,oSe)=>{var g6=u2(),Om=g6.Buffer;function aSe(e,t){for(var r in e)t[r]=e[r]}Om.from&&Om.alloc&&Om.allocUnsafe&&Om.allocUnsafeSlow?oSe.exports=g6:(aSe(g6,dW),dW.Buffer=y2);function y2(e,t,r){return Om(e,t,r)}y2.prototype=Object.create(Om.prototype);aSe(Om,y2);y2.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Om(e,t,r)};y2.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Om(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};y2.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Om(e)};y2.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return g6.SlowBuffer(e)}});var yW=Se(uSe=>{"use strict";var vW=sSe().Buffer,lSe=vW.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 _St(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=_St(e);if(typeof t!="string"&&(vW.isEncoding===lSe||!lSe(e)))throw new Error("Unknown encoding: "+e);return t||e}uSe.StringDecoder=Z4;function Z4(e){this.encoding=xSt(e);var t;switch(this.encoding){case"utf16le":this.text=MSt,this.end=ESt,t=4;break;case"utf8":this.fillLast=TSt,t=4;break;case"base64":this.text=kSt,this.end=CSt,t=3;break;default:this.write=LSt,this.end=zSt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=vW.allocUnsafe(t)}Z4.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||""};Z4.prototype.end=SSt;Z4.prototype.text=ASt;Z4.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 pW(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function bSt(e,t,r){var n=t.length-1;if(n<r)return 0;var i=pW(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||i===-2?0:(i=pW(t[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||i===-2?0:(i=pW(t[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function wSt(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 TSt(e){var t=this.lastTotal-this.lastNeed,r=wSt(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 ASt(e,t){var r=bSt(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 SSt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function MSt(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 ESt(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 kSt(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 CSt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function LSt(e){return e.toString(this.encoding)}function zSt(e){return e&&e.length?this.write(e):""}});var _6=Se((bcr,hSe)=>{"use strict";var fSe=p2().codes.ERR_STREAM_PREMATURE_CLOSE;function PSt(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 ISt(){}function DSt(e){return e.setHeader&&typeof e.abort=="function"}function cSe(e,t,r){if(typeof t=="function")return cSe(e,null,t);t||(t={}),r=PSt(r||ISt);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)},u=e._readableState&&e._readableState.endEmitted,l=function(){n=!1,u=!0,i||r.call(e)},f=function(p){r.call(e,p)},c=function(){var p;if(n&&!u)return(!e._readableState||!e._readableState.ended)&&(p=new fSe),r.call(e,p);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(p=new fSe),r.call(e,p)},h=function(){e.req.on("finish",s)};return DSt(e)?(e.on("complete",s),e.on("abort",c),e.req?h():e.on("request",h)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",s),t.error!==!1&&e.on("error",f),e.on("close",c),function(){e.removeListener("complete",s),e.removeListener("abort",c),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",l),e.removeListener("error",f),e.removeListener("close",c)}}hSe.exports=cSe});var pSe=Se((wcr,dSe)=>{"use strict";var x6;function D_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var RSt=_6(),R_=Symbol("lastResolve"),m2=Symbol("lastReject"),X4=Symbol("error"),b6=Symbol("ended"),g2=Symbol("lastPromise"),mW=Symbol("handlePromise"),_2=Symbol("stream");function F_(e,t){return{value:e,done:t}}function FSt(e){var t=e[R_];if(t!==null){var r=e[_2].read();r!==null&&(e[g2]=null,e[R_]=null,e[m2]=null,t(F_(r,!1)))}}function qSt(e){process.nextTick(FSt,e)}function BSt(e,t){return function(r,n){e.then(function(){if(t[b6]){r(F_(void 0,!0));return}t[mW](r,n)},n)}}var OSt=Object.getPrototypeOf(function(){}),NSt=Object.setPrototypeOf((x6={get stream(){return this[_2]},next:function(){var t=this,r=this[X4];if(r!==null)return Promise.reject(r);if(this[b6])return Promise.resolve(F_(void 0,!0));if(this[_2].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[X4]?s(t[X4]):o(F_(void 0,!0))})});var n=this[g2],i;if(n)i=new Promise(BSt(n,this));else{var a=this[_2].read();if(a!==null)return Promise.resolve(F_(a,!1));i=new Promise(this[mW])}return this[g2]=i,i}},D_(x6,Symbol.asyncIterator,function(){return this}),D_(x6,"return",function(){var t=this;return new Promise(function(r,n){t[_2].destroy(null,function(i){if(i){n(i);return}r(F_(void 0,!0))})})}),x6),OSt),USt=function(t){var r,n=Object.create(NSt,(r={},D_(r,_2,{value:t,writable:!0}),D_(r,R_,{value:null,writable:!0}),D_(r,m2,{value:null,writable:!0}),D_(r,X4,{value:null,writable:!0}),D_(r,b6,{value:t._readableState.endEmitted,writable:!0}),D_(r,mW,{value:function(a,o){var s=n[_2].read();s?(n[g2]=null,n[R_]=null,n[m2]=null,a(F_(s,!1))):(n[R_]=a,n[m2]=o)},writable:!0}),r));return n[g2]=null,RSt(t,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[m2];a!==null&&(n[g2]=null,n[R_]=null,n[m2]=null,a(i)),n[X4]=i;return}var o=n[R_];o!==null&&(n[g2]=null,n[R_]=null,n[m2]=null,o(F_(void 0,!0))),n[b6]=!0}),t.on("readable",qSt.bind(null,n)),n};dSe.exports=USt});var ySe=Se((Tcr,vSe)=>{vSe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var hW=Se((Scr,MSe)=>{"use strict";MSe.exports=ic;var uA;ic.ReadableState=xSe;var Acr=pb().EventEmitter,_Se=function(t,r){return t.listeners(r).length},K4=dG(),w6=u2().Buffer,VSt=window.Uint8Array||function(){};function HSt(e){return w6.from(e)}function GSt(e){return w6.isBuffer(e)||e instanceof VSt}var gW=tW(),Of;gW&&gW.debuglog?Of=gW.debuglog("stream"):Of=function(){};var WSt=VAe(),SW=nW(),jSt=aW(),ZSt=jSt.getHighWaterMark,T6=p2().codes,XSt=T6.ERR_INVALID_ARG_TYPE,YSt=T6.ERR_STREAM_PUSH_AFTER_EOF,KSt=T6.ERR_METHOD_NOT_IMPLEMENTED,JSt=T6.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,fA,_W,xW;Ug()(ic,K4);var Y4=SW.errorOrDestroy,bW=["error","close","destroy","pause","resume"];function $St(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 xSe(e,t,r){uA=uA||v2(),e=e||{},typeof r!="boolean"&&(r=t instanceof uA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=ZSt(this,e,"readableHighWaterMark",r),this.buffer=new WSt,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&&(fA||(fA=yW().StringDecoder),this.decoder=new fA(e.encoding),this.encoding=e.encoding)}function ic(e){if(uA=uA||v2(),!(this instanceof ic))return new ic(e);var t=this instanceof uA;this._readableState=new xSe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),K4.call(this)}Object.defineProperty(ic.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ic.prototype.destroy=SW.destroy;ic.prototype._undestroy=SW.undestroy;ic.prototype._destroy=function(e,t){t(e)};ic.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=w6.from(e,t),t=""),n=!0),bSe(this,e,t,!1,n)};ic.prototype.unshift=function(e){return bSe(this,e,null,!0,!1)};function bSe(e,t,r,n,i){Of("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,tMt(e,a);else{var o;if(i||(o=QSt(a,t)),o)Y4(e,o);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==w6.prototype&&(t=HSt(t)),n)a.endEmitted?Y4(e,new JSt):wW(e,a,t,!0);else if(a.ended)Y4(e,new YSt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?wW(e,a,t,!1):AW(e,a)):wW(e,a,t,!1)}else n||(a.reading=!1,AW(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function wW(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&&A6(e)),AW(e,t)}function QSt(e,t){var r;return!GSt(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new XSt("chunk",["string","Buffer","Uint8Array"],t)),r}ic.prototype.isPaused=function(){return this._readableState.flowing===!1};ic.prototype.setEncoding=function(e){fA||(fA=yW().StringDecoder);var t=new fA(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 mSe=1073741824;function eMt(e){return e>=mSe?e=mSe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function gSe(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))}ic.prototype.read=function(e){Of("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 Of("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?TW(this):A6(this),null;if(e=gSe(e,t),e===0&&t.ended)return t.length===0&&TW(this),null;var n=t.needReadable;Of("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,Of("length less than watermark",n)),t.ended||t.reading?(n=!1,Of("reading or ended",n)):n&&(Of("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=gSe(r,t)));var i;return e>0?i=ASe(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&&TW(this)),i!==null&&this.emit("data",i),i};function tMt(e,t){if(Of("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?A6(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,wSe(e)))}}function A6(e){var t=e._readableState;Of("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(Of("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(wSe,e))}function wSe(e){var t=e._readableState;Of("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,MW(e)}function AW(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(rMt,e,t))}function rMt(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(Of("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}ic.prototype._read=function(e){Y4(this,new KSt("_read()"))};ic.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,Of("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:x;n.endEmitted?process.nextTick(a):r.once("end",a),e.on("unpipe",o);function o(b,y){Of("onunpipe"),b===r&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,f())}function s(){Of("onend"),e.end()}var u=iMt(r);e.on("drain",u);var l=!1;function f(){Of("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",x),r.removeListener("data",c),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}r.on("data",c);function c(b){Of("ondata");var y=e.write(b);Of("dest.write",y),y===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&SSe(n.pipes,e)!==-1)&&!l&&(Of("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(b){Of("onerror",b),x(),e.removeListener("error",h),_Se(e,"error")===0&&Y4(e,b)}$St(e,"error",h);function d(){e.removeListener("finish",p),x()}e.once("close",d);function p(){Of("onfinish"),e.removeListener("close",d),x()}e.once("finish",p);function x(){Of("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(Of("pipe resume"),r.resume()),e};function iMt(e){return function(){var r=e._readableState;Of("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&_Se(e,"data")&&(r.flowing=!0,MW(e))}}ic.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=SSe(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)};ic.prototype.on=function(e,t){var r=K4.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,Of("on readable",n.length,n.reading),n.length?A6(this):n.reading||process.nextTick(nMt,this)),r};ic.prototype.addListener=ic.prototype.on;ic.prototype.removeListener=function(e,t){var r=K4.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(TSe,this),r};ic.prototype.removeAllListeners=function(e){var t=K4.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(TSe,this),t};function TSe(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 nMt(e){Of("readable nexttick read 0"),e.read(0)}ic.prototype.resume=function(){var e=this._readableState;return e.flowing||(Of("resume"),e.flowing=!e.readableListening,aMt(this,e)),e.paused=!1,this};function aMt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(oMt,e,t))}function oMt(e,t){Of("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),MW(e),t.flowing&&!t.reading&&e.read(0)}ic.prototype.pause=function(){return Of("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Of("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function MW(e){var t=e._readableState;for(Of("flow",t.flowing);t.flowing&&e.read()!==null;);}ic.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(Of("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(Of("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<bW.length;a++)e.on(bW[a],this.emit.bind(this,bW[a]));return this._read=function(o){Of("wrapped _read",o),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(ic.prototype[Symbol.asyncIterator]=function(){return _W===void 0&&(_W=pSe()),_W(this)});Object.defineProperty(ic.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(ic.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(ic.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});ic._fromList=ASe;Object.defineProperty(ic.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ASe(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 TW(e){var t=e._readableState;Of("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(sMt,t,e))}function sMt(e,t){if(Of("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"&&(ic.from=function(e,t){return xW===void 0&&(xW=ySe()),xW(ic,e,t)});function SSe(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var EW=Se((Mcr,kSe)=>{"use strict";kSe.exports=Hg;var S6=p2().codes,lMt=S6.ERR_METHOD_NOT_IMPLEMENTED,uMt=S6.ERR_MULTIPLE_CALLBACK,fMt=S6.ERR_TRANSFORM_ALREADY_TRANSFORMING,cMt=S6.ERR_TRANSFORM_WITH_LENGTH_0,M6=v2();Ug()(Hg,M6);function hMt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new uMt);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 Hg(e){if(!(this instanceof Hg))return new Hg(e);M6.call(this,e),this._transformState={afterTransform:hMt.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",dMt)}function dMt(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){ESe(e,t,r)}):ESe(this,null,null)}Hg.prototype.push=function(e,t){return this._transformState.needTransform=!1,M6.prototype.push.call(this,e,t)};Hg.prototype._transform=function(e,t,r){r(new lMt("_transform()"))};Hg.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)}};Hg.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};Hg.prototype._destroy=function(e,t){M6.prototype._destroy.call(this,e,function(r){t(r)})};function ESe(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new cMt;if(e._transformState.transforming)throw new fMt;return e.push(null)}});var zSe=Se((Ecr,LSe)=>{"use strict";LSe.exports=J4;var CSe=EW();Ug()(J4,CSe);function J4(e){if(!(this instanceof J4))return new J4(e);CSe.call(this,e)}J4.prototype._transform=function(e,t,r){r(null,e)}});var FSe=Se((kcr,RSe)=>{"use strict";var kW;function pMt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var DSe=p2().codes,vMt=DSe.ERR_MISSING_ARGS,yMt=DSe.ERR_STREAM_DESTROYED;function PSe(e){if(e)throw e}function mMt(e){return e.setHeader&&typeof e.abort=="function"}function gMt(e,t,r,n){n=pMt(n);var i=!1;e.on("close",function(){i=!0}),kW===void 0&&(kW=_6()),kW(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,mMt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new yMt("pipe"))}}}function ISe(e){e()}function _Mt(e,t){return e.pipe(t)}function xMt(e){return!e.length||typeof e[e.length-1]!="function"?PSe:e.pop()}function bMt(){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 u=s<t.length-1,l=s>0;return gMt(o,u,l,function(f){i||(i=f),f&&a.forEach(ISe),!u&&(a.forEach(ISe),n(i))})});return t.reduce(_Mt)}RSe.exports=bMt});var BSe=Se((Ccr,qSe)=>{qSe.exports=K0;var CW=pb().EventEmitter,wMt=Ug();wMt(K0,CW);K0.Readable=hW();K0.Writable=uW();K0.Duplex=v2();K0.Transform=EW();K0.PassThrough=zSe();K0.finished=_6();K0.pipeline=FSe();K0.Stream=K0;function K0(){CW.call(this)}K0.prototype.pipe=function(e,t){var r=this;function n(f){e.writable&&e.write(f)===!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 u(f){if(l(),CW.listenerCount(this,"error")===0)throw f}r.on("error",u),e.on("error",u);function l(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}});var hA=Se(Gf=>{var OSe=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},TMt=/%[sdj%]/g;Gf.format=function(e){if(!I6(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(q_(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(TMt,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(u){return"[Circular]"}default:return s}}),o=n[r];r<i;o=n[++r])P6(o)||!cA(o)?a+=" "+o:a+=" "+q_(o);return a};Gf.deprecate=function(e,t){if(typeof process!="undefined"&&process.noDeprecation===!0)return e;if(typeof process=="undefined")return function(){return Gf.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 E6={},NSe=/^$/;k6="false",k6=k6.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),NSe=new RegExp("^"+k6+"$","i");var k6;Gf.debuglog=function(e){if(e=e.toUpperCase(),!E6[e])if(NSe.test(e)){var t=process.pid;E6[e]=function(){var r=Gf.format.apply(Gf,arguments);console.error("%s %d: %s",e,t,r)}}else E6[e]=function(){};return E6[e]};function q_(e,t){var r={seen:[],stylize:SMt};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),IW(t)?r.showHidden=t:t&&Gf._extend(r,t),b2(r.showHidden)&&(r.showHidden=!1),b2(r.depth)&&(r.depth=2),b2(r.colors)&&(r.colors=!1),b2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=AMt),L6(r,e,r.depth)}Gf.inspect=q_;q_.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]};q_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function AMt(e,t){var r=q_.styles[t];return r?"\x1B["+q_.colors[r][0]+"m"+e+"\x1B["+q_.colors[r][1]+"m":e}function SMt(e,t){return e}function MMt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function L6(e,t,r){if(e.customInspect&&t&&C6(t.inspect)&&t.inspect!==Gf.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return I6(n)||(n=L6(e,n,r)),n}var i=EMt(e,t);if(i)return i;var a=Object.keys(t),o=MMt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),Q4(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return LW(t);if(a.length===0){if(C6(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if($4(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(z6(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Q4(t))return LW(t)}var u="",l=!1,f=["{","}"];if(USe(t)&&(l=!0,f=["[","]"]),C6(t)){var c=t.name?": "+t.name:"";u=" [Function"+c+"]"}if($4(t)&&(u=" "+RegExp.prototype.toString.call(t)),z6(t)&&(u=" "+Date.prototype.toUTCString.call(t)),Q4(t)&&(u=" "+LW(t)),a.length===0&&(!l||t.length==0))return f[0]+u+f[1];if(r<0)return $4(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return l?h=kMt(e,t,r,o,a):h=a.map(function(d){return PW(e,t,r,o,d,l)}),e.seen.pop(),CMt(h,u,f)}function EMt(e,t){if(b2(t))return e.stylize("undefined","undefined");if(I6(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(VSe(t))return e.stylize(""+t,"number");if(IW(t))return e.stylize(""+t,"boolean");if(P6(t))return e.stylize("null","null")}function LW(e){return"["+Error.prototype.toString.call(e)+"]"}function kMt(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)HSe(t,String(o))?a.push(PW(e,t,r,n,String(o),!0)):a.push("");return i.forEach(function(u){u.match(/^\d+$/)||a.push(PW(e,t,r,n,u,!0))}),a}function PW(e,t,r,n,i,a){var o,s,u;if(u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},u.get?u.set?s=e.stylize("[Getter/Setter]","special"):s=e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),HSe(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(P6(r)?s=L6(e,u.value,null):s=L6(e,u.value,r-1),s.indexOf(`
`)>-1&&(a?s=s.split(`
`).map(function(l){return"  "+l}).join(`
`).slice(2):s=`
`+s.split(`
`).map(function(l){return"   "+l}).join(`
`))):s=e.stylize("[Circular]","special")),b2(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 CMt(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(`
`)>=0&&n++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(t===""?"":t+`
 `)+" "+e.join(`,
  `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}Gf.types=XG();function USe(e){return Array.isArray(e)}Gf.isArray=USe;function IW(e){return typeof e=="boolean"}Gf.isBoolean=IW;function P6(e){return e===null}Gf.isNull=P6;function LMt(e){return e==null}Gf.isNullOrUndefined=LMt;function VSe(e){return typeof e=="number"}Gf.isNumber=VSe;function I6(e){return typeof e=="string"}Gf.isString=I6;function zMt(e){return typeof e=="symbol"}Gf.isSymbol=zMt;function b2(e){return e===void 0}Gf.isUndefined=b2;function $4(e){return cA(e)&&DW(e)==="[object RegExp]"}Gf.isRegExp=$4;Gf.types.isRegExp=$4;function cA(e){return typeof e=="object"&&e!==null}Gf.isObject=cA;function z6(e){return cA(e)&&DW(e)==="[object Date]"}Gf.isDate=z6;Gf.types.isDate=z6;function Q4(e){return cA(e)&&(DW(e)==="[object Error]"||e instanceof Error)}Gf.isError=Q4;Gf.types.isNativeError=Q4;function C6(e){return typeof e=="function"}Gf.isFunction=C6;function PMt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}Gf.isPrimitive=PMt;Gf.isBuffer=YG();function DW(e){return Object.prototype.toString.call(e)}function zW(e){return e<10?"0"+e.toString(10):e.toString(10)}var IMt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function DMt(){var e=new Date,t=[zW(e.getHours()),zW(e.getMinutes()),zW(e.getSeconds())].join(":");return[e.getDate(),IMt[e.getMonth()],t].join(" ")}Gf.log=function(){console.log("%s - %s",DMt(),Gf.format.apply(Gf,arguments))};Gf.inherits=Ug();Gf._extend=function(e,t){if(!t||!cA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function HSe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var x2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;Gf.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(x2&&t[x2]){var r=t[x2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,x2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(u,l){n=u,i=l}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(u,l){u?i(u):n(l)});try{t.apply(this,o)}catch(u){i(u)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),x2&&Object.defineProperty(r,x2,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,OSe(t))};Gf.promisify.custom=x2;function RMt(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function FMt(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(RMt.bind(null,s,o))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,OSe(e)),t}Gf.callbackify=FMt});var qW=Se((zcr,ZSe)=>{"use strict";function B_(e){"@babel/helpers - typeof";return B_=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},B_(e)}function GSe(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,BMt(n.key),n)}}function qMt(e,t,r){return t&&GSe(e.prototype,t),r&&GSe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function BMt(e){var t=OMt(e,"string");return B_(t)==="symbol"?t:String(t)}function OMt(e,t){if(B_(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(B_(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NMt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UMt(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&&FW(e,t)}function FW(e,t){return FW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},FW(e,t)}function VMt(e){var t=WMt();return function(){var n=D6(e),i;if(t){var a=D6(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return HMt(this,i)}}function HMt(e,t){if(t&&(B_(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GMt(e)}function GMt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WMt(){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 D6(e){return D6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},D6(e)}var jSe={},dA,RW;function eE(e,t,r){r||(r=Error);function n(a,o,s){return typeof t=="string"?t:t(a,o,s)}var i=function(a){UMt(s,a);var o=VMt(s);function s(u,l,f){var c;return NMt(this,s),c=o.call(this,n(u,l,f)),c.code=e,c}return qMt(s)}(r);jSe[e]=i}function WSe(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 jMt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function ZMt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function XMt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}eE("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);eE("ERR_INVALID_ARG_TYPE",function(e,t,r){dA===void 0&&(dA=tE()),dA(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&jMt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(ZMt(e," argument"))i="The ".concat(e," ").concat(n," ").concat(WSe(t,"type"));else{var a=XMt(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(WSe(t,"type"))}return i+=". Received type ".concat(B_(r)),i},TypeError);eE("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";RW===void 0&&(RW=hA());var n=RW.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);eE("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(B_(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);eE("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];dA===void 0&&(dA=tE()),dA(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);ZSe.exports.codes=jSe});var iMe=Se((Pcr,rMe)=>{"use strict";function XSe(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 YSe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XSe(Object(r),!0).forEach(function(n){YMt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XSe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YMt(e,t,r){return t=QSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KMt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KSe(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,QSe(n.key),n)}}function JMt(e,t,r){return t&&KSe(e.prototype,t),r&&KSe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function QSe(e){var t=$Mt(e,"string");return Dv(t)==="symbol"?t:String(t)}function $Mt(e,t){if(Dv(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Dv(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QMt(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&&aE(e,t)}function e5t(e){var t=tMe();return function(){var n=oE(e),i;if(t){var a=oE(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return eMe(this,i)}}function eMe(e,t){if(t&&(Dv(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BW(e)}function BW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OW(e){var t=typeof Map=="function"?new Map:void 0;return OW=function(n){if(n===null||!t5t(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 R6(n,arguments,oE(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),aE(i,n)},OW(e)}function R6(e,t,r){return tMe()?R6=Reflect.construct.bind():R6=function(i,a,o){var s=[null];s.push.apply(s,a);var u=Function.bind.apply(i,s),l=new u;return o&&aE(l,o.prototype),l},R6.apply(null,arguments)}function tMe(){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 t5t(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function aE(e,t){return aE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},aE(e,t)}function oE(e){return oE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},oE(e)}function Dv(e){"@babel/helpers - typeof";return Dv=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},Dv(e)}var r5t=hA(),NW=r5t.inspect,i5t=qW(),n5t=i5t.codes.ERR_INVALID_ARG_TYPE;function JSe(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function a5t(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 Gy="",rE="",iE="",wp="",w2={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:"},o5t=10;function $Se(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 nE(e){return NW(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function s5t(e,t,r){var n="",i="",a=0,o="",s=!1,u=nE(e),l=u.split(`
`),f=nE(t).split(`
`),c=0,h="";if(r==="strictEqual"&&Dv(e)==="object"&&Dv(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),l.length===1&&f.length===1&&l[0]!==f[0]){var d=l[0].length+f[0].length;if(d<=o5t){if((Dv(e)!=="object"||e===null)&&(Dv(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(w2[r],`

`)+"".concat(l[0]," !== ").concat(f[0],`
`)}else if(r!=="strictEqualObject"){var p=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d<p){for(;l[0][c]===f[0][c];)c++;c>2&&(h=`
  `.concat(a5t(" ",c),"^"),c=0)}}}for(var x=l[l.length-1],b=f[f.length-1];x===b&&(c++<2?o=`
  `.concat(x).concat(o):n=x,l.pop(),f.pop(),!(l.length===0||f.length===0));)x=l[l.length-1],b=f[f.length-1];var y=Math.max(l.length,f.length);if(y===0){var k=u.split(`
`);if(k.length>30)for(k[26]="".concat(Gy,"...").concat(wp);k.length>27;)k.pop();return"".concat(w2.notIdentical,`

`).concat(k.join(`
`),`
`)}c>3&&(o=`
`.concat(Gy,"...").concat(wp).concat(o),s=!0),n!==""&&(o=`
  `.concat(n).concat(o),n="");var E=0,A=w2[r]+`
`.concat(rE,"+ actual").concat(wp," ").concat(iE,"- expected").concat(wp),L=" ".concat(Gy,"...").concat(wp," Lines skipped");for(c=0;c<y;c++){var _=c-a;if(l.length<c+1)_>1&&c>2&&(_>4?(i+=`
`.concat(Gy,"...").concat(wp),s=!0):_>3&&(i+=`
  `.concat(f[c-2]),E++),i+=`
  `.concat(f[c-1]),E++),a=c,n+=`
`.concat(iE,"-").concat(wp," ").concat(f[c]),E++;else if(f.length<c+1)_>1&&c>2&&(_>4?(i+=`
`.concat(Gy,"...").concat(wp),s=!0):_>3&&(i+=`
  `.concat(l[c-2]),E++),i+=`
  `.concat(l[c-1]),E++),a=c,i+=`
`.concat(rE,"+").concat(wp," ").concat(l[c]),E++;else{var C=f[c],M=l[c],v=M!==C&&(!JSe(M,",")||M.slice(0,-1)!==C);v&&JSe(C,",")&&C.slice(0,-1)===M&&(v=!1,M+=","),v?(_>1&&c>2&&(_>4?(i+=`
`.concat(Gy,"...").concat(wp),s=!0):_>3&&(i+=`
  `.concat(l[c-2]),E++),i+=`
  `.concat(l[c-1]),E++),a=c,i+=`
`.concat(rE,"+").concat(wp," ").concat(M),n+=`
`.concat(iE,"-").concat(wp," ").concat(C),E+=2):(i+=n,n="",(_===1||c===0)&&(i+=`
  `.concat(M),E++))}if(E>20&&c<y-2)return"".concat(A).concat(L,`
`).concat(i,`
`).concat(Gy,"...").concat(wp).concat(n,`
`)+"".concat(Gy,"...").concat(wp)}return"".concat(A).concat(s?L:"",`
`).concat(i).concat(n).concat(o).concat(h)}var l5t=function(e,t){QMt(n,e);var r=e5t(n);function n(i){var a;if(KMt(this,n),Dv(i)!=="object"||i===null)throw new n5t("options","Object",i);var o=i.message,s=i.operator,u=i.stackStartFn,l=i.actual,f=i.expected,c=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?(Gy="\x1B[34m",rE="\x1B[32m",wp="\x1B[39m",iE="\x1B[31m"):(Gy="",rE="",wp="",iE="")),Dv(l)==="object"&&l!==null&&Dv(f)==="object"&&f!==null&&"stack"in l&&l instanceof Error&&"stack"in f&&f instanceof Error&&(l=$Se(l),f=$Se(f)),s==="deepStrictEqual"||s==="strictEqual")a=r.call(this,s5t(l,f,s));else if(s==="notDeepStrictEqual"||s==="notStrictEqual"){var h=w2[s],d=nE(l).split(`
`);if(s==="notStrictEqual"&&Dv(l)==="object"&&l!==null&&(h=w2.notStrictEqualObject),d.length>30)for(d[26]="".concat(Gy,"...").concat(wp);d.length>27;)d.pop();d.length===1?a=r.call(this,"".concat(h," ").concat(d[0])):a=r.call(this,"".concat(h,`

`).concat(d.join(`
`),`
`))}else{var p=nE(l),x="",b=w2[s];s==="notDeepEqual"||s==="notEqual"?(p="".concat(w2[s],`

`).concat(p),p.length>1024&&(p="".concat(p.slice(0,1021),"..."))):(x="".concat(nE(f)),p.length>512&&(p="".concat(p.slice(0,509),"...")),x.length>512&&(x="".concat(x.slice(0,509),"...")),s==="deepEqual"||s==="equal"?p="".concat(b,`

`).concat(p,`

should equal

`):x=" ".concat(s," ").concat(x)),a=r.call(this,"".concat(p).concat(x))}return Error.stackTraceLimit=c,a.generatedMessage=!o,Object.defineProperty(BW(a),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),a.code="ERR_ASSERTION",a.actual=l,a.expected=f,a.operator=s,Error.captureStackTrace&&Error.captureStackTrace(BW(a),u),a.stack,a.name="AssertionError",eMe(a)}return JMt(n,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(a,o){return NW(this,YSe(YSe({},o),{},{customInspect:!1,depth:0}))}}]),n}(OW(Error),NW.custom);rMe.exports=l5t});var UW=Se((Icr,aMe)=>{"use strict";var nMe=Object.prototype.toString;aMe.exports=function(t){var r=nMe.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&nMe.call(t.callee)==="[object Function]"),n}});var pMe=Se((Dcr,dMe)=>{"use strict";var hMe;Object.keys||(sE=Object.prototype.hasOwnProperty,VW=Object.prototype.toString,oMe=UW(),HW=Object.prototype.propertyIsEnumerable,sMe=!HW.call({toString:null},"toString"),lMe=HW.call(function(){},"prototype"),lE=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],F6=function(e){var t=e.constructor;return t&&t.prototype===e},uMe={$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},fMe=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!uMe["$"+e]&&sE.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{F6(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),cMe=function(e){if(typeof window=="undefined"||!fMe)return F6(e);try{return F6(e)}catch(t){return!1}},hMe=function(t){var r=t!==null&&typeof t=="object",n=VW.call(t)==="[object Function]",i=oMe(t),a=r&&VW.call(t)==="[object String]",o=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var s=lMe&&n;if(a&&t.length>0&&!sE.call(t,0))for(var u=0;u<t.length;++u)o.push(String(u));if(i&&t.length>0)for(var l=0;l<t.length;++l)o.push(String(l));else for(var f in t)!(s&&f==="prototype")&&sE.call(t,f)&&o.push(String(f));if(sMe)for(var c=cMe(t),h=0;h<lE.length;++h)!(c&&lE[h]==="constructor")&&sE.call(t,lE[h])&&o.push(lE[h]);return o});var sE,VW,oMe,HW,sMe,lMe,lE,F6,uMe,fMe,cMe;dMe.exports=hMe});var GW=Se((Rcr,mMe)=>{"use strict";var u5t=Array.prototype.slice,f5t=UW(),vMe=Object.keys,q6=vMe?function(t){return vMe(t)}:pMe(),yMe=Object.keys;q6.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 f5t(n)?yMe(u5t.call(n)):yMe(n)})}else Object.keys=q6;return Object.keys||q6};mMe.exports=q6});var TMe=Se((Fcr,wMe)=>{"use strict";var c5t=GW(),xMe=BD()(),bMe=iA(),gMe=Object,h5t=bMe("Array.prototype.push"),_Me=bMe("Object.prototype.propertyIsEnumerable"),d5t=xMe?Object.getOwnPropertySymbols:null;wMe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=gMe(t);if(arguments.length===1)return n;for(var i=1;i<arguments.length;++i){var a=gMe(arguments[i]),o=c5t(a),s=xMe&&(Object.getOwnPropertySymbols||d5t);if(s)for(var u=s(a),l=0;l<u.length;++l){var f=u[l];_Me(a,f)&&h5t(o,f)}for(var c=0;c<o.length;++c){var h=o[c];if(_Me(a,h)){var d=a[h];n[h]=d}}}return n}});var SMe=Se((qcr,AMe)=>{"use strict";var WW=TMe(),p5t=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},v5t=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};AMe.exports=function(){return!Object.assign||p5t()||v5t()?WW:Object.assign}});var jW=Se((Bcr,EMe)=>{"use strict";var MMe=function(e){return e!==e};EMe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||MMe(t)&&MMe(r))}});var B6=Se((Ocr,kMe)=>{"use strict";var y5t=jW();kMe.exports=function(){return typeof Object.is=="function"?Object.is:y5t}});var uE=Se((Ncr,PMe)=>{"use strict";var m5t=GW(),g5t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",_5t=Object.prototype.toString,x5t=Array.prototype.concat,CMe=Object.defineProperty,b5t=function(e){return typeof e=="function"&&_5t.call(e)==="[object Function]"},w5t=kG()(),LMe=CMe&&w5t,T5t=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!b5t(n)||!n())return}LMe?CMe(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r},zMe=function(e,t){var r=arguments.length>2?arguments[2]:{},n=m5t(t);g5t&&(n=x5t.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i<n.length;i+=1)T5t(e,n[i],t[n[i]],r[n[i]])};zMe.supportsDescriptors=!!LMe;PMe.exports=zMe});var DMe=Se((Ucr,IMe)=>{"use strict";var A5t=B6(),S5t=uE();IMe.exports=function(){var t=A5t();return S5t(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var BMe=Se((Vcr,qMe)=>{"use strict";var M5t=uE(),E5t=N4(),k5t=jW(),RMe=B6(),C5t=DMe(),FMe=E5t(RMe(),Object);M5t(FMe,{getPolyfill:RMe,implementation:k5t,shim:C5t});qMe.exports=FMe});var ZW=Se((Hcr,OMe)=>{"use strict";OMe.exports=function(t){return t!==t}});var XW=Se((Gcr,NMe)=>{"use strict";var L5t=ZW();NMe.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:L5t}});var VMe=Se((Wcr,UMe)=>{"use strict";var z5t=uE(),P5t=XW();UMe.exports=function(){var t=P5t();return z5t(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var jMe=Se((jcr,WMe)=>{"use strict";var I5t=N4(),D5t=uE(),R5t=ZW(),HMe=XW(),F5t=VMe(),GMe=I5t(HMe(),Number);D5t(GMe,{getPolyfill:HMe,implementation:R5t,shim:F5t});WMe.exports=GMe});var h5e=Se((Zcr,c5e)=>{"use strict";function ZMe(e,t){return N5t(e)||O5t(e,t)||B5t(e,t)||q5t()}function q5t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B5t(e,t){if(e){if(typeof e=="string")return XMe(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 XMe(e,t)}}function XMe(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 O5t(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){l=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function N5t(e){if(Array.isArray(e))return e}function J0(e){"@babel/helpers - typeof";return J0=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},J0(e)}var U5t=/a/g.flags!==void 0,W6=function(t){var r=[];return t.forEach(function(n){return r.push(n)}),r},YMe=function(t){var r=[];return t.forEach(function(n,i){return r.push([i,n])}),r},o5e=Object.is?Object.is:BMe(),H6=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},YW=Number.isNaN?Number.isNaN:jMe();function JW(e){return e.call.bind(e)}var cE=JW(Object.prototype.hasOwnProperty),G6=JW(Object.prototype.propertyIsEnumerable),KMe=JW(Object.prototype.toString),sv=hA().types,V5t=sv.isAnyArrayBuffer,H5t=sv.isArrayBufferView,JMe=sv.isDate,O6=sv.isMap,$Me=sv.isRegExp,N6=sv.isSet,G5t=sv.isNativeError,W5t=sv.isBoxedPrimitive,QMe=sv.isNumberObject,e5e=sv.isStringObject,t5e=sv.isBooleanObject,r5e=sv.isBigIntObject,j5t=sv.isSymbolObject,Z5t=sv.isFloat32Array,X5t=sv.isFloat64Array;function Y5t(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 U6(e){return Object.keys(e).filter(Y5t).concat(H6(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function s5e(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 V6=void 0,K5t=!0,J5t=!1,KW=0,$W=1,l5e=2,u5e=3;function $5t(e,t){return U5t?e.source===t.source&&e.flags===t.flags:RegExp.prototype.toString.call(e)===RegExp.prototype.toString.call(t)}function Q5t(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 e4t(e,t){return e.byteLength!==t.byteLength?!1:s5e(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))===0}function t4t(e,t){return e.byteLength===t.byteLength&&s5e(new Uint8Array(e),new Uint8Array(t))===0}function r4t(e,t){return QMe(e)?QMe(t)&&o5e(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):e5e(e)?e5e(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):t5e(e)?t5e(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):r5e(e)?r5e(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):j5t(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}function $0(e,t,r,n){if(e===t)return e!==0?!0:r?o5e(e,t):!0;if(r){if(J0(e)!=="object")return typeof e=="number"&&YW(e)&&YW(t);if(J0(t)!=="object"||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(e===null||J0(e)!=="object")return t===null||J0(t)!=="object"?e==t:!1;if(t===null||J0(t)!=="object")return!1}var i=KMe(e),a=KMe(t);if(i!==a)return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var o=U6(e,V6),s=U6(t,V6);return o.length!==s.length?!1:fE(e,t,r,n,$W,o)}if(i==="[object Object]"&&(!O6(e)&&O6(t)||!N6(e)&&N6(t)))return!1;if(JMe(e)){if(!JMe(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if($Me(e)){if(!$Me(t)||!$5t(e,t))return!1}else if(G5t(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else if(H5t(e)){if(!r&&(Z5t(e)||X5t(e))){if(!Q5t(e,t))return!1}else if(!e4t(e,t))return!1;var u=U6(e,V6),l=U6(t,V6);return u.length!==l.length?!1:fE(e,t,r,n,KW,u)}else{if(N6(e))return!N6(t)||e.size!==t.size?!1:fE(e,t,r,n,l5e);if(O6(e))return!O6(t)||e.size!==t.size?!1:fE(e,t,r,n,u5e);if(V5t(e)){if(!t4t(e,t))return!1}else if(W5t(e)&&!r4t(e,t))return!1}return fE(e,t,r,n,KW)}function i5e(e,t){return t.filter(function(r){return G6(e,r)})}function fE(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(!cE(t,a[s]))return!1;if(r&&arguments.length===5){var u=H6(e);if(u.length!==0){var l=0;for(s=0;s<u.length;s++){var f=u[s];if(G6(e,f)){if(!G6(t,f))return!1;a.push(f),l++}else if(G6(t,f))return!1}var c=H6(t);if(u.length!==c.length&&i5e(t,c).length!==l)return!1}else{var h=H6(t);if(h.length!==0&&i5e(t,h).length!==0)return!1}}if(a.length===0&&(i===KW||i===$W&&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 p=n.val2.get(t);if(p!==void 0)return d===p}n.position++}n.val1.set(e,n.position),n.val2.set(t,n.position);var x=s4t(e,t,r,a,n,i);return n.val1.delete(e),n.val2.delete(t),x}function n5e(e,t,r,n){for(var i=W6(e),a=0;a<i.length;a++){var o=i[a];if($0(t,o,r,n))return e.delete(o),!0}return!1}function f5e(e){switch(J0(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(YW(e))return!1}return!0}function i4t(e,t,r){var n=f5e(r);return n!=null?n:t.has(n)&&!e.has(n)}function n4t(e,t,r,n,i){var a=f5e(r);if(a!=null)return a;var o=t.get(a);return o===void 0&&!t.has(a)||!$0(n,o,!1,i)?!1:!e.has(a)&&$0(n,o,!1,i)}function a4t(e,t,r,n){for(var i=null,a=W6(e),o=0;o<a.length;o++){var s=a[o];if(J0(s)==="object"&&s!==null)i===null&&(i=new Set),i.add(s);else if(!t.has(s)){if(r||!i4t(e,t,s))return!1;i===null&&(i=new Set),i.add(s)}}if(i!==null){for(var u=W6(t),l=0;l<u.length;l++){var f=u[l];if(J0(f)==="object"&&f!==null){if(!n5e(i,f,r,n))return!1}else if(!r&&!e.has(f)&&!n5e(i,f,r,n))return!1}return i.size===0}return!0}function a5e(e,t,r,n,i,a){for(var o=W6(e),s=0;s<o.length;s++){var u=o[s];if($0(r,u,i,a)&&$0(n,t.get(u),i,a))return e.delete(u),!0}return!1}function o4t(e,t,r,n){for(var i=null,a=YMe(e),o=0;o<a.length;o++){var s=ZMe(a[o],2),u=s[0],l=s[1];if(J0(u)==="object"&&u!==null)i===null&&(i=new Set),i.add(u);else{var f=t.get(u);if(f===void 0&&!t.has(u)||!$0(l,f,r,n)){if(r||!n4t(e,t,u,l,n))return!1;i===null&&(i=new Set),i.add(u)}}}if(i!==null){for(var c=YMe(t),h=0;h<c.length;h++){var d=ZMe(c[h],2),p=d[0],x=d[1];if(J0(p)==="object"&&p!==null){if(!a5e(i,e,p,x,r,n))return!1}else if(!r&&(!e.has(p)||!$0(e.get(p),x,!1,n))&&!a5e(i,e,p,x,!1,n))return!1}return i.size===0}return!0}function s4t(e,t,r,n,i,a){var o=0;if(a===l5e){if(!a4t(e,t,r,i))return!1}else if(a===u5e){if(!o4t(e,t,r,i))return!1}else if(a===$W)for(;o<e.length;o++)if(cE(e,o)){if(!cE(t,o)||!$0(e[o],t[o],r,i))return!1}else{if(cE(t,o))return!1;for(var s=Object.keys(e);o<s.length;o++){var u=s[o];if(!cE(t,u)||!$0(e[u],t[u],r,i))return!1}return s.length===Object.keys(t).length}for(o=0;o<n.length;o++){var l=n[o];if(!$0(e[l],t[l],r,i))return!1}return!0}function l4t(e,t){return $0(e,t,J5t)}function u4t(e,t){return $0(e,t,K5t)}c5e.exports={isDeepEqual:l4t,isDeepStrictEqual:u4t}});var tE=Se((Xcr,L5e)=>{"use strict";function Wy(e){"@babel/helpers - typeof";return Wy=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},Wy(e)}function d5e(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,c4t(n.key),n)}}function f4t(e,t,r){return t&&d5e(e.prototype,t),r&&d5e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c4t(e){var t=h4t(e,"string");return Wy(t)==="symbol"?t:String(t)}function h4t(e,t){if(Wy(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wy(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")}var p4t=qW(),hE=p4t.codes,p5e=hE.ERR_AMBIGUOUS_ARGUMENT,pA=hE.ERR_INVALID_ARG_TYPE,v4t=hE.ERR_INVALID_ARG_VALUE,y4t=hE.ERR_INVALID_RETURN_VALUE,N_=hE.ERR_MISSING_ARGS,U_=iMe(),m4t=hA(),j6=m4t.inspect,g5e=hA().types,g4t=g5e.isPromise,Z6=g5e.isRegExp,_4t=SMe()(),_5e=B6()(),X6=iA()("RegExp.prototype.test"),O_,Y6;function dE(){var e=h5e();O_=e.isDeepEqual,Y6=e.isDeepStrictEqual}var v5e=!1,eh=L5e.exports=QW,K6={};function jy(e){throw e.message instanceof Error?e.message:new U_(e)}function x5e(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(v5e===!1){v5e=!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 u={actual:e,expected:t,operator:n===void 0?"fail":n,stackStartFn:i||x5e};r!==void 0&&(u.message=r);var l=new U_(u);throw o&&(l.message=o,l.generatedMessage=!0),l}eh.fail=x5e;eh.AssertionError=U_;function b5e(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 U_({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw a.generatedMessage=i,a}}function QW(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];b5e.apply(void 0,[QW,t.length].concat(t))}eh.ok=QW;eh.equal=function e(t,r,n){if(arguments.length<2)throw new N_("actual","expected");t!=r&&jy({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})};eh.notEqual=function e(t,r,n){if(arguments.length<2)throw new N_("actual","expected");t==r&&jy({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})};eh.deepEqual=function e(t,r,n){if(arguments.length<2)throw new N_("actual","expected");O_===void 0&&dE(),O_(t,r)||jy({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})};eh.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new N_("actual","expected");O_===void 0&&dE(),O_(t,r)&&jy({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})};eh.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new N_("actual","expected");O_===void 0&&dE(),Y6(t,r)||jy({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})};eh.notDeepStrictEqual=w5e;function w5e(e,t,r){if(arguments.length<2)throw new N_("actual","expected");O_===void 0&&dE(),Y6(e,t)&&jy({actual:e,expected:t,message:r,operator:"notDeepStrictEqual",stackStartFn:w5e})}eh.strictEqual=function e(t,r,n){if(arguments.length<2)throw new N_("actual","expected");_5e(t,r)||jy({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})};eh.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new N_("actual","expected");_5e(t,r)&&jy({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var y5e=f4t(function e(t,r,n){var i=this;d4t(this,e),r.forEach(function(a){a in t&&(n!==void 0&&typeof n[a]=="string"&&Z6(t[a])&&X6(t[a],n[a])?i[a]=n[a]:i[a]=t[a])})});function x4t(e,t,r,n,i,a){if(!(r in e)||!Y6(e[r],t[r])){if(!n){var o=new y5e(e,i),s=new y5e(t,i,e),u=new U_({actual:o,expected:s,operator:"deepStrictEqual",stackStartFn:a});throw u.actual=e,u.expected=t,u.operator=a.name,u}jy({actual:e,expected:t,message:n,operator:a.name,stackStartFn:a})}}function T5e(e,t,r,n){if(typeof t!="function"){if(Z6(t))return X6(t,e);if(arguments.length===2)throw new pA("expected",["Function","RegExp"],t);if(Wy(e)!=="object"||e===null){var i=new U_({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 v4t("error",t,"may not be an empty object");return O_===void 0&&dE(),a.forEach(function(o){typeof e[o]=="string"&&Z6(t[o])&&X6(t[o],e[o])||x4t(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 A5e(e){if(typeof e!="function")throw new pA("fn","Function",e);try{e()}catch(t){return t}return K6}function m5e(e){return g4t(e)||e!==null&&Wy(e)==="object"&&typeof e.then=="function"&&typeof e.catch=="function"}function S5e(e){return Promise.resolve().then(function(){var t;if(typeof e=="function"){if(t=e(),!m5e(t))throw new y4t("instance of Promise","promiseFn",t)}else if(m5e(e))t=e;else throw new pA("promiseFn",["Function","Promise"],e);return Promise.resolve().then(function(){return t}).then(function(){return K6}).catch(function(r){return r})})}function M5e(e,t,r,n){if(typeof r=="string"){if(arguments.length===4)throw new pA("error",["Object","Error","Function","RegExp"],r);if(Wy(t)==="object"&&t!==null){if(t.message===r)throw new p5e("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new p5e("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(r!=null&&Wy(r)!=="object"&&typeof r!="function")throw new pA("error",["Object","Error","Function","RegExp"],r);if(t===K6){var i="";r&&r.name&&(i+=" (".concat(r.name,")")),i+=n?": ".concat(n):".";var a=e.name==="rejects"?"rejection":"exception";jy({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(i),stackStartFn:e})}if(r&&!T5e(t,r,n,e))throw t}function E5e(e,t,r,n){if(t!==K6){if(typeof r=="string"&&(n=r,r=void 0),!r||T5e(t,r)){var i=n?": ".concat(n):".",a=e.name==="doesNotReject"?"rejection":"exception";jy({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(a).concat(i,`
`)+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}eh.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];M5e.apply(void 0,[e,A5e(t)].concat(n))};eh.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 S5e(t).then(function(a){return M5e.apply(void 0,[e,a].concat(n))})};eh.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];E5e.apply(void 0,[e,A5e(t)].concat(n))};eh.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 S5e(t).then(function(a){return E5e.apply(void 0,[e,a].concat(n))})};eh.ifError=function e(t){if(t!=null){var r="ifError got unwanted exception: ";Wy(t)==="object"&&typeof t.message=="string"?t.message.length===0&&t.constructor?r+=t.constructor.name:r+=t.message:r+=j6(t);var n=new U_({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),i=t.stack;if(typeof i=="string"){var a=i.split(`
`);a.shift();for(var o=n.stack.split(`
`),s=0;s<a.length;s++){var u=o.indexOf(a[s]);if(u!==-1){o=o.slice(0,u);break}}n.stack="".concat(o.join(`
`),`
`).concat(a.join(`
`))}throw n}};function k5e(e,t,r,n,i){if(!Z6(t))throw new pA("regexp","RegExp",t);var a=i==="match";if(typeof e!="string"||X6(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(Wy(e)," (").concat(j6(e),")"):(a?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(j6(t),`. Input:

`).concat(j6(e),`
`));var s=new U_({actual:e,expected:t,message:r,operator:i,stackStartFn:n});throw s.generatedMessage=o,s}}eh.match=function e(t,r,n){k5e(t,r,n,e,"match")};eh.doesNotMatch=function e(t,r,n){k5e(t,r,n,e,"doesNotMatch")};function C5e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];b5e.apply(void 0,[C5e,t.length].concat(t))}eh.strict=_4t(C5e,eh,{equal:eh.strictEqual,deepEqual:eh.deepStrictEqual,notEqual:eh.notStrictEqual,notDeepEqual:eh.notDeepStrictEqual});eh.strict.strict=eh.strict});var P5e=Se((Ycr,z5e)=>{var pE=1e3,vE=pE*60,yE=vE*60,mE=yE*24,b4t=mE*365.25;z5e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return w4t(e);if(r==="number"&&isNaN(e)===!1)return t.long?A4t(e):T4t(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function w4t(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*b4t;case"days":case"day":case"d":return r*mE;case"hours":case"hour":case"hrs":case"hr":case"h":return r*yE;case"minutes":case"minute":case"mins":case"min":case"m":return r*vE;case"seconds":case"second":case"secs":case"sec":case"s":return r*pE;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function T4t(e){return e>=mE?Math.round(e/mE)+"d":e>=yE?Math.round(e/yE)+"h":e>=vE?Math.round(e/vE)+"m":e>=pE?Math.round(e/pE)+"s":e+"ms"}function A4t(e){return J6(e,mE,"day")||J6(e,yE,"hour")||J6(e,vE,"minute")||J6(e,pE,"second")||e+" ms"}function J6(e,t,r){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}});var D5e=Se((kc,I5e)=>{kc=I5e.exports=tj.debug=tj.default=tj;kc.coerce=C4t;kc.disable=E4t;kc.enable=M4t;kc.enabled=k4t;kc.humanize=P5e();kc.names=[];kc.skips=[];kc.formatters={};var ej;function S4t(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return kc.colors[Math.abs(t)%kc.colors.length]}function tj(e){function t(){if(t.enabled){var r=t,n=+new Date,i=n-(ej||n);r.diff=i,r.prev=ej,r.curr=n,ej=n;for(var a=new Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=kc.coerce(a[0]),typeof a[0]!="string"&&a.unshift("%O");var s=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(l,f){if(l==="%%")return l;s++;var c=kc.formatters[f];if(typeof c=="function"){var h=a[s];l=c.call(r,h),a.splice(s,1),s--}return l}),kc.formatArgs.call(r,a);var u=t.log||kc.log||console.log.bind(console);u.apply(r,a)}}return t.namespace=e,t.enabled=kc.enabled(e),t.useColors=kc.useColors(),t.color=S4t(e),typeof kc.init=="function"&&kc.init(t),t}function M4t(e){kc.save(e),kc.names=[],kc.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]==="-"?kc.skips.push(new RegExp("^"+e.substr(1)+"$")):kc.names.push(new RegExp("^"+e+"$")))}function E4t(){kc.enable("")}function k4t(e){var t,r;for(t=0,r=kc.skips.length;t<r;t++)if(kc.skips[t].test(e))return!1;for(t=0,r=kc.names.length;t<r;t++)if(kc.names[t].test(e))return!0;return!1}function C4t(e){return e instanceof Error?e.stack||e.message:e}});var q5e=Se((lv,F5e)=>{lv=F5e.exports=D5e();lv.log=P4t;lv.formatArgs=z4t;lv.save=I4t;lv.load=R5e;lv.useColors=L4t;lv.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:D4t();lv.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function L4t(){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+)/)}lv.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function z4t(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+lv.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 P4t(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function I4t(e){try{e==null?lv.storage.removeItem("debug"):lv.storage.debug=e}catch(t){}}function R5e(){var e;try{e=lv.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}lv.enable(R5e());function D4t(){try{return window.localStorage}catch(e){}}});var W5e=Se((Kcr,G5e)=>{var vA=tE(),V_=q5e()("stream-parser");G5e.exports=F4t;var O5e=-1,$6=0,R4t=1,N5e=2;function F4t(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");V_("extending Parser into stream"),e._bytes=q4t,e._skipBytes=B4t,t&&(e._passthrough=O4t),t?e._transform=U4t:e._write=N4t}function gE(e){V_("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=O5e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function q4t(e,t){vA(!this._parserCallback,'there is already a "callback" set!'),vA(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||gE(this),V_("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=$6}function B4t(e,t){vA(!this._parserCallback,'there is already a "callback" set!'),vA(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||gE(this),V_("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=R4t}function O4t(e,t){vA(!this._parserCallback,'There is already a "callback" set!'),vA(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||gE(this),V_("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=N5e}function N4t(e,t,r){this._parserInit||gE(this),V_("write(%o bytes)",e.length),typeof t=="function"&&(r=t),V5e(this,e,null,r)}function U4t(e,t,r){this._parserInit||gE(this),V_("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),V5e(this,e,t,r)}function U5e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return B5e(e,t,r,n)}:function(){var i=t.slice(0,e._parserBytesLeft);return B5e(e,i,r,function(a){if(a)return n(a);if(t.length>i.length)return function(){return U5e(e,t.slice(i.length),r,n)}})}}function B5e(e,t,r,n){if(e._parserBytesLeft-=t.length,V_("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===$6?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===N5e&&r(t),e._parserBytesLeft===0){var i=e._parserCallback;if(i&&e._parserState===$6&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==$6&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=O5e,e._parserBuffers.splice(0),i){var a=[];t&&a.push(t),r&&a.push(r);var o=i.length>a.length;o&&a.push(H5e(n));var s=i.apply(e,a);if(!o||n===s)return n}}else return n}var V5e=H5e(U5e);function H5e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var cc=Se(Gg=>{"use strict";var j5e=BSe().Transform,V4t=W5e();function _E(){j5e.call(this,{readableObjectMode:!0})}_E.prototype=Object.create(j5e.prototype);_E.prototype.constructor=_E;V4t(_E.prototype);Gg.ParserStream=_E;Gg.sliceEq=function(e,t,r){for(var n=t,i=0;i<r.length;)if(e[n++]!==r[i++])return!1;return!0};Gg.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};Gg.readUInt16LE=function(e,t){return e[t]|e[t+1]<<8};Gg.readUInt16BE=function(e,t){return e[t+1]|e[t]<<8};Gg.readUInt32LE=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]*16777216};Gg.readUInt32BE=function(e,t){return e[t+3]|e[t+2]<<8|e[t+1]<<16|e[t]*16777216};function Q6(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)}Q6.prototype=Object.create(Error.prototype);Q6.prototype.constructor=Q6;Gg.ProbeError=Q6});var Z5e=Se(($cr,eR)=>{"use strict";var yA=cc().readUInt16BE,ij=cc().readUInt32BE;function xE(e,t){if(e.length<4+t)return null;var r=ij(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}}eR.exports.unbox=xE;function H4t(e,t){for(var r=0;;){var n=xE(e,r);if(!n)break;switch(n.boxtype){case"ispe":t.sizes.push({width:ij(n.data,4),height:ij(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 rj(e,t,r){for(var n=0,i=0;i<r;i++)n=n*256+(e[t+i]||0);return n}function G4t(e,t){for(var r=e[4]>>4&15,n=e[4]&15,i=e[5]>>4&15,a=yA(e,6),o=8,s=0;s<a;s++){var u=yA(e,o);o+=2;var l=yA(e,o);o+=2;var f=rj(e,o,i);o+=i;var c=yA(e,o);if(o+=2,l===0&&c===1){var h=rj(e,o,r),d=rj(e,o+r,n);t.item_loc[u]={length:d,offset:h+f}}o+=c*(r+n)}}function W4t(e,t){for(var r=yA(e,4),n=6,i=0;i<r;i++){var a=xE(e,n);if(!a)break;if(a.boxtype==="infe"){for(var o=yA(a.data,4),s="",u=8;u<a.data.length&&a.data[u];u++)s+=String.fromCharCode(a.data[u]);t.item_inf[s]=o}n=a.end}}function j4t(e,t){for(var r=0;;){var n=xE(e,r);if(!n)break;n.boxtype==="ipco"&&H4t(n.data,t),r=n.end}}function Z4t(e,t){for(var r=4;;){var n=xE(e,r);if(!n)break;n.boxtype==="iprp"&&j4t(n.data,t),n.boxtype==="iloc"&&G4t(n.data,t),n.boxtype==="iinf"&&W4t(n.data,t),r=n.end}}function X4t(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}eR.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(Z4t(e,t),!!t.sizes.length){var r=X4t(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 u=0;u<a.value;u++)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}}};eR.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 rR=Se((Qcr,nj)=>{"use strict";function tR(e,t){var r=new Error(e);return r.code=t,r}function Y4t(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function Wg(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 tR("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}Wg.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)}};Wg.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw tR("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};Wg.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw tR("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};Wg.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};Wg.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}};Wg.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}};Wg.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),u=this.exif_format_length(o),l=s*u,f=l<=4?t+8:this.read_uint32(t+8),c=!1;if(f+l>this.input.length)throw tR("unexpected EOF","EBADDATA");for(var h=[],d=f,p=0;p<s;p++,d+=u){var x=this.exif_format_read(o,d);if(x===null){h=null;break}h.push(x)}Array.isArray(h)&&o===2&&(h=Y4t(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]}),c=!0);var b={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:l,data_offset:f+this.start,value:h,is_subifd_link:c};if(r(b)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};nj.exports.ExifParser=Wg;nj.exports.get_orientation=function(e){var t=0;try{return new Wg(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 Y5e=Se((ehr,X5e)=>{"use strict";var K4t=cc().str2arr,J4t=cc().sliceEq,$4t=cc().readUInt32BE,iR=Z5e(),Q4t=rR(),eEt=K4t("ftyp");X5e.exports=function(e){if(J4t(e,4,eEt)){var t=iR.unbox(e,0);if(t){var r=iR.getMimeType(t.data);if(r){for(var n,i=t.end;;){var a=iR.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=iR.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 u=$4t(e,o.exif_location.offset),l=e.slice(o.exif_location.offset+u+4,o.exif_location.offset+o.exif_location.length),f=Q4t.get_orientation(l);f>0&&(s.orientation=f)}return s}}}}}}});var $5e=Se((thr,J5e)=>{"use strict";var tEt=cc().str2arr,rEt=cc().sliceEq,K5e=cc().readUInt16LE,iEt=tEt("BM");J5e.exports=function(e){if(!(e.length<26)&&rEt(e,0,iEt))return{width:K5e(e,18),height:K5e(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var i4e=Se((rhr,r4e)=>{"use strict";var t4e=cc().str2arr,Q5e=cc().sliceEq,e4e=cc().readUInt16LE,nEt=t4e("GIF87a"),aEt=t4e("GIF89a");r4e.exports=function(e){if(!(e.length<10)&&!(!Q5e(e,0,nEt)&&!Q5e(e,0,aEt)))return{width:e4e(e,6),height:e4e(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var o4e=Se((ihr,a4e)=>{"use strict";var aj=cc().readUInt16LE,oEt=0,sEt=1,n4e=16;a4e.exports=function(e){var t=aj(e,0),r=aj(e,2),n=aj(e,4);if(!(t!==oEt||r!==sEt||!n)){for(var i=[],a={width:0,height:0},o=0;o<n;o++){var s=e[6+n4e*o]||256,u=e[6+n4e*o+1]||256,l={width:s,height:u};i.push(l),(s>a.width||u>a.height)&&(a=l)}return{width:a.width,height:a.height,variants:i,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var l4e=Se((nhr,s4e)=>{"use strict";var oj=cc().readUInt16BE,lEt=cc().str2arr,uEt=cc().sliceEq,fEt=rR(),cEt=lEt("Exif\0\0");s4e.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=oj(e,t)-2,t+=2}else return;if(r===217||r===218)return;var i;if(r===225&&n>=10&&uEt(e,t,cEt)&&(i=fEt.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:oj(e,t+3),height:oj(e,t+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return i>0&&(a.orientation=i),a}t+=n}}});var d4e=Se((ahr,h4e)=>{"use strict";var c4e=cc().str2arr,u4e=cc().sliceEq,f4e=cc().readUInt32BE,hEt=c4e(`\x89PNG\r

`),dEt=c4e("IHDR");h4e.exports=function(e){if(!(e.length<24)&&u4e(e,0,hEt)&&u4e(e,12,dEt))return{width:f4e(e,16),height:f4e(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var y4e=Se((ohr,v4e)=>{"use strict";var pEt=cc().str2arr,vEt=cc().sliceEq,p4e=cc().readUInt32BE,yEt=pEt("8BPS\0");v4e.exports=function(e){if(!(e.length<22)&&vEt(e,0,yEt))return{width:p4e(e,18),height:p4e(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var _4e=Se((shr,g4e)=>{"use strict";function mEt(e){return e===32||e===9||e===13||e===10}function mA(e){return typeof e=="number"&&isFinite(e)&&e>0}function gEt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t<r&&mEt(e[t]);)t++;return t===r?!1:e[t]===60}var _Et=/<[-_.:a-zA-Z0-9][^>]*>/,xEt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,bEt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,wEt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,TEt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,m4e=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function AEt(e){var t=e.match(bEt),r=e.match(wEt),n=e.match(TEt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Nm(e){return m4e.test(e)?e.match(m4e)[0]:"px"}g4e.exports=function(e){if(gEt(e)){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);var n=(t.match(_Et)||[""])[0];if(xEt.test(n)){var i=AEt(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:Nm(i.width),hUnits:Nm(i.height)};var s=(i.viewbox||"").split(" "),u={width:s[2],height:s[3]},l=parseFloat(u.width),f=parseFloat(u.height);if(!(!mA(l)||!mA(f))&&Nm(u.width)===Nm(u.height)){var c=l/f;return i.width?mA(a)?{width:a,height:a/c,type:"svg",mime:"image/svg+xml",wUnits:Nm(i.width),hUnits:Nm(i.width)}:void 0:i.height?mA(o)?{width:o*c,height:o,type:"svg",mime:"image/svg+xml",wUnits:Nm(i.height),hUnits:Nm(i.height)}:void 0:{width:l,height:f,type:"svg",mime:"image/svg+xml",wUnits:Nm(u.width),hUnits:Nm(u.height)}}}}}});var A4e=Se((lhr,T4e)=>{"use strict";var w4e=cc().str2arr,x4e=cc().sliceEq,SEt=cc().readUInt16LE,MEt=cc().readUInt16BE,EEt=cc().readUInt32LE,kEt=cc().readUInt32BE,CEt=w4e("II*\0"),LEt=w4e("MM\0*");function nR(e,t,r){return r?MEt(e,t):SEt(e,t)}function sj(e,t,r){return r?kEt(e,t):EEt(e,t)}function b4e(e,t,r){var n=nR(e,t+2,r),i=sj(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?nR(e,t+8,r):sj(e,t+8,r)}T4e.exports=function(e){if(!(e.length<8)&&!(!x4e(e,0,CEt)&&!x4e(e,0,LEt))){var t=e[0]===77,r=sj(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=nR(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n<i))){var a,o,s,u;for(a=0;a<i;a+=12)u=nR(e,n+a,t),u===256?o=b4e(e,n+a,t):u===257&&(s=b4e(e,n+a,t));if(o&&s)return{width:o,height:s,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}});var C4e=Se((uhr,k4e)=>{"use strict";var E4e=cc().str2arr,S4e=cc().sliceEq,M4e=cc().readUInt16LE,lj=cc().readUInt32LE,zEt=rR(),PEt=E4e("RIFF"),IEt=E4e("WEBP");function DEt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:M4e(e,t+6)&16383,height:M4e(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function REt(e,t){if(e[t]===47){var r=lj(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function FEt(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"}}k4e.exports=function(e){if(!(e.length<16)&&!(!S4e(e,0,PEt)&&!S4e(e,8,IEt))){var t=12,r=null,n=0,i=lj(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=lj(e,t+4);a==="VP8 "&&o>=10?r=r||DEt(e,t+8):a==="VP8L"&&o>=9?r=r||REt(e,t+8):a==="VP8X"&&o>=10?r=r||FEt(e,t+8):a==="EXIF"&&(n=zEt.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 z4e=Se((fhr,L4e)=>{"use strict";L4e.exports={avif:Y5e(),bmp:$5e(),gif:i4e(),ico:o4e(),jpeg:l4e(),png:d4e(),psd:y4e(),svg:_4e(),tiff:A4e(),webp:C4e()}});var P4e=Se((chr,fj)=>{"use strict";var uj=z4e();function qEt(e){for(var t=Object.keys(uj),r=0;r<t.length;r++){var n=uj[t[r]](e);if(n)return n}return null}fj.exports=function(t){return qEt(t)};fj.exports.parsers=uj});var D4e=Se(I4e=>{"use strict";var BEt=P4e(),OEt=Lg().IMAGE_URL_PREFIX,NEt=u2().Buffer;I4e.getImageSize=function(e){var t=e.replace(OEt,""),r=new NEt(t,"base64");return BEt(r)}});var q4e=Se((dhr,F4e)=>{"use strict";var R4e=Zr(),UEt=WT(),VEt=_u(),aR=hu(),HEt=Zr().maxRowLength,GEt=D4e().getImageSize;F4e.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=HEt(r.z);else if(r._hasSource){var a=GEt(r.source);n=a.height,i=a.width}var o=aR.getFromId(t,r.xaxis||"x"),s=aR.getFromId(t,r.yaxis||"y"),u=o.d2c(r.x0)-r.dx/2,l=s.d2c(r.y0)-r.dy/2,f,c=[u,u+i*r.dx],h=[l,l+n*r.dy];if(o&&o.type==="log")for(f=0;f<i;f++)c.push(u+f*r.dx);if(s&&s.type==="log")for(f=0;f<n;f++)h.push(l+f*r.dy);r._extremes[o._id]=aR.findExtremes(o,c),r._extremes[s._id]=aR.findExtremes(s,h),r._scaler=ZEt(r);var d={x0:u,y0:l,z:r.z,w:i,h:n};return[d]};function WEt(e,t,r,n){return function(i){return R4e.constrain((i-e)*t,r,n)}}function jEt(e,t){return function(r){return R4e.constrain(r,e,t)}}function ZEt(e){var t=UEt.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(WEt(e.zmin[i],(t.max[i]-t.min[i])/(e.zmax[i]-e.zmin[i]),t.min[i],t.max[i])):e._sArray.push(jEt(t.min[i],t.max[i]));return function(a){for(var o=a.slice(0,n),s=0;s<n;s++){var u=o[s];if(!VEt(u))return!1;o[s]=e._sArray[s](u)}return o}}});var N4e=Se((phr,O4e)=>{"use strict";var XEt=Nl(),T2=Zr(),B4e=T2.strTranslate,YEt=Zv(),KEt=WT(),JEt=tH(),$Et=aD().STYLE;O4e.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&JEt();T2.makeTraceGroups(i,n,"im").each(function(u){var l=XEt.select(this),f=u[0],c=f.trace,h=(c.zsmooth==="fast"||c.zsmooth===!1&&s)&&!c._hasZ&&c._hasSource&&a.type==="linear"&&o.type==="linear";c._realImage=h;var d=f.z,p=f.x0,x=f.y0,b=f.w,y=f.h,k=c.dx,E=c.dy,A,L,_,C,M,v;for(v=0;A===void 0&&v<b;)A=a.c2p(p+v*k),v++;for(v=b;L===void 0&&v>0;)L=a.c2p(p+v*k),v--;for(v=0;C===void 0&&v<y;)C=o.c2p(x+v*E),v++;for(v=y;M===void 0&&v>0;)M=o.c2p(x+v*E),v--;if(L<A&&(_=L,L=A,A=_),M<C&&(_=C,C=M,M=_),!h){var z=.5;A=Math.max(-z*a._length,A),L=Math.min((1+z)*a._length,L),C=Math.max(-z*o._length,C),M=Math.min((1+z)*o._length,M)}var T=Math.round(L-A),F=Math.round(M-C),q=T<=0||F<=0;if(q){var U=l.selectAll("image").data([]);U.exit().remove();return}function H(he){var te=document.createElement("canvas");te.width=T,te.height=F;var ke=te.getContext("2d",{willReadFrequently:!0}),Ee=function(Qe){return T2.constrain(Math.round(a.c2p(p+Qe*k)-A),0,T)},Me=function(Qe){return T2.constrain(Math.round(o.c2p(x+Qe*E)-C),0,F)},Oe=KEt.colormodel[c.colormodel],Re=Oe.colormodel||c.colormodel,me=Oe.fmt,Be;for(v=0;v<f.w;v++){var fe=Ee(v),Ze=Ee(v+1);if(!(Ze===fe||isNaN(Ze)||isNaN(fe)))for(var et=0;et<f.h;et++){var gt=Me(et),Pt=Me(et+1);Pt===gt||isNaN(Pt)||isNaN(gt)||!he(v,et)||(Be=c._scaler(he(v,et)),Be?ke.fillStyle=Re+"("+me(Be).join(",")+")":ke.fillStyle="rgba(0,0,0,0)",ke.fillRect(fe,gt,Ze-fe,Pt-gt))}}return te}var j=l.selectAll("image").data([u]);j.enter().append("svg:image").attr({xmlns:YEt.svg,preserveAspectRatio:"none"}),j.exit().remove();var G=c.zsmooth===!1?$Et:"";if(h){var O=T2.simpleMap(a.range,a.r2l),W=T2.simpleMap(o.range,o.r2l),re=O[1]<O[0],ne=W[1]>W[0];if(re||ne){var be=A+T/2,ze=C+F/2;G+="transform:"+B4e(be+"px",ze+"px")+"scale("+(re?-1:1)+","+(ne?-1:1)+")"+B4e(-be+"px",-ze+"px")+";"}}j.attr("style",G);var Ce=new Promise(function(he){if(c._hasZ)he();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===b&&c._canvas.el.height===y&&c._canvas.source===c.source)he();else{var te=document.createElement("canvas");te.width=b,te.height=y;var ke=te.getContext("2d",{willReadFrequently:!0});c._image=c._image||new Image;var Ee=c._image;Ee.onload=function(){ke.drawImage(Ee,0,0),c._canvas={el:te,source:c.source},he()},Ee.setAttribute("src",c.source)}}).then(function(){var he,te;if(c._hasZ)te=H(function(Me,Oe){var Re=d[Oe][Me];return T2.isTypedArray(Re)&&(Re=Array.from(Re)),Re}),he=te.toDataURL("image/png");else if(c._hasSource)if(h)he=c.source;else{var ke=c._canvas.el.getContext("2d",{willReadFrequently:!0}),Ee=ke.getImageData(0,0,b,y).data;te=H(function(Me,Oe){var Re=4*(Oe*b+Me);return[Ee[Re],Ee[Re+1],Ee[Re+2],Ee[Re+3]]}),he=te.toDataURL("image/png")}j.attr({"xlink:href":he,height:F,width:T,x:A,y:C})});t._promises.push(Ce)})}});var V4e=Se((vhr,U4e)=>{"use strict";var QEt=Nl();U4e.exports=function(t){QEt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var j4e=Se((yhr,W4e)=>{"use strict";var H4e=jc(),G4e=Zr(),oR=G4e.isArrayOrTypedArray,ekt=WT();W4e.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(H4e.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||H4e.inbox(n-i.y0,n-(i.y0+i.h*a.dy),0)>0)){var u=Math.floor((r-i.x0)/a.dx),l=Math.floor(Math.abs(n-i.y0)/a.dy),f;if(a._hasZ?f=i.z[l][u]:a._hasSource&&(f=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(u,l,1,1).data),!!f){var c=i.hi||a.hoverinfo,h;if(c){var d=c.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(h=!0)}var p=ekt.colormodel[a.colormodel],x=p.colormodel||a.colormodel,b=x.length,y=a._scaler(f),k=p.suffix,E=[];(a.hovertemplate||h)&&(E.push("["+[y[0]+k[0],y[1]+k[1],y[2]+k[2]].join(", ")),b===4&&E.push(", "+y[3]+k[3]),E.push("]"),E=E.join(""),t.extraText=x.toUpperCase()+": "+E);var A;oR(a.hovertext)&&oR(a.hovertext[l])?A=a.hovertext[l][u]:oR(a.text)&&oR(a.text[l])&&(A=a.text[l][u]);var L=s.c2p(i.y0+(l+.5)*a.dy),_=i.x0+(u+.5)*a.dx,C=i.y0+(l+.5)*a.dy,M="["+f.slice(0,a.colormodel.length).join(", ")+"]";return[G4e.extendFlat(t,{index:[l,u],x0:o.c2p(i.x0+u*a.dx),x1:o.c2p(i.x0+(u+1)*a.dx),y0:L,y1:L,color:y,xVal:_,xLabelVal:_,yVal:C,yLabelVal:C,zLabelVal:M,text:A,hovertemplateLabels:{zLabel:M,colorLabel:E,"color[0]Label":y[0]+k[0],"color[1]Label":y[1]+k[1],"color[2]Label":y[2]+k[2],"color[3]Label":y[3]+k[3]}})]}}}});var X4e=Se((mhr,Z4e)=>{"use strict";Z4e.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 K4e=Se((ghr,Y4e)=>{"use strict";Y4e.exports={attributes:cG(),supplyDefaults:L3e(),calc:q4e(),plot:N4e(),style:V4e(),hoverPoints:j4e(),eventData:X4e(),moduleType:"trace",name:"image",basePlotModule:Th(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var $4e=Se((_hr,J4e)=>{"use strict";J4e.exports=K4e()});var A2=Se((xhr,Q4e)=>{"use strict";var tkt=zf(),rkt=Ec().attributes,ikt=uc(),nkt=Ih(),akt=Du().hovertemplateAttrs,okt=Du().texttemplateAttrs,bE=vu().extendFlat,skt=Id().pattern,sR=ikt({editType:"plot",arrayOk:!0,colorEditType:"plot"});Q4e.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:nkt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:skt,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:bE({},tkt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:akt({},{keys:["label","color","value","percent","text"]}),texttemplate:okt({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:bE({},sR,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:bE({},sR,{}),outsidetextfont:bE({},sR,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:bE({},sR,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:rkt({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 S2=Se((bhr,rEe)=>{"use strict";var lkt=_u(),wE=Zr(),ukt=A2(),fkt=Ec().defaults,ckt=r0().handleText,hkt=Zr().coercePattern;function eEe(e,t){var r=wE.isArrayOrTypedArray(e),n=wE.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(lkt(s)&&s>0){a=!0;break}}a||(i=0)}return{hasLabels:r,hasValues:n,len:i}}function tEe(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");hkt(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 dkt(e,t,r,n){function i(k,E){return wE.coerce(e,t,ukt,k,E)}var a=i("labels"),o=i("values"),s=eEe(a,o),u=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i("label0"),i("dlabel")),!u){t.visible=!1;return}t._length=u,tEe(e,t,n,i,!0),i("scalegroup");var l=i("text"),f=i("texttemplate"),c;if(f||(c=i("textinfo",wE.isArrayOrTypedArray(l)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),f||c&&c!=="none"){var h=i("textposition");ckt(e,t,n,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",p=d||h==="outside";p&&i("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&i("insidetextorientation")}else c==="none"&&i("textposition","none");fkt(t,n,i);var x=i("hole"),b=i("title.text");if(b){var y=i("title.position",x?"middle center":"top center");!x&&y==="middle center"&&(t.title.position="top center"),wE.coerceFont(i,"title.font",n.font)}i("sort"),i("direction"),i("rotation"),i("pull")}rEe.exports={handleLabelsAndValues:eEe,handleMarkerDefaults:tEe,supplyDefaults:dkt}});var lR=Se((whr,iEe)=>{"use strict";iEe.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var aEe=Se((Thr,nEe)=>{"use strict";var pkt=Zr(),vkt=lR();nEe.exports=function(t,r){function n(i,a){return pkt.coerce(t,r,vkt,i,a)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var gA=Se((Ahr,lEe)=>{"use strict";var ykt=_u(),cj=cd(),mkt=Pl(),gkt={};function _kt(e,t){var r=[],n=e._fullLayout,i=n.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,u=t._length,l=t._hasValues&&u,f,c;if(t.dlabel)for(a=new Array(u),f=0;f<u;f++)a[f]=String(t.label0+f*t.dlabel);var h={},d=oEe(n["_"+t.type+"colormap"]),p=0,x=!1;for(f=0;f<u;f++){var b,y,k;if(l){if(b=s[f],!ykt(b))continue;b=+b}else b=1;y=a[f],(y===void 0||y==="")&&(y=f),y=String(y);var E=h[y];E===void 0?(h[y]=r.length,k=i.indexOf(y)!==-1,k||(p+=b),r.push({v:b,label:y,color:d(o[f],y),i:f,pts:[f],hidden:k})):(x=!0,c=r[E],c.v+=b,c.pts.push(f),c.hidden||(p+=b),c.color===!1&&o[f]&&(c.color=d(o[f],y)))}r=r.filter(function(L){return L.v>=0});var A=t.type==="funnelarea"?x:t.sort;return A&&r.sort(function(L,_){return _.v-L.v}),r[0]&&(r[0].vTotal=p),r}function oEe(e){return function(r,n){return!r||(r=cj(r),!r.isValid())?!1:(r=mkt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function xkt(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=sEe(a,gkt));for(var s=0,u=0;u<i.length;u++){var l=i[u],f=l[0].trace.type;if(f===r)for(var c=0;c<l.length;c++){var h=l[c];h.color===!1&&(o[h.label]?h.color=o[h.label]:(o[h.label]=h.color=a[s%a.length],s++))}}}function sEe(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(cj(e[r]).lighten(20).toHexString());for(r=0;r<e.length;r++)i.push(cj(e[r]).darken(20).toHexString());t[n]=i}return i}lEe.exports={calc:_kt,crossTraceCalc:xkt,makePullColorFn:oEe,generateExtendedColors:sEe}});var fEe=Se((Shr,uEe)=>{"use strict";var bkt=rv().appendArrayMultiPointValues;uEe.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]),bkt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var hR=Se((Mhr,zEe)=>{"use strict";var Rv=Nl(),wkt=Ac(),uR=jc(),yEe=Pl(),jg=yu(),np=Zr(),Tkt=np.strScale,cEe=np.strTranslate,hj=Bf(),mEe=bp(),Akt=mEe.recordMinTextSize,Skt=mEe.clearMinTextSize,gEe=Qb().TEXTPAD,Fu=l_(),fR=fEe(),hEe=Zr().isValidTextValue;function Mkt(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;Skt("pie",n),bEe(t,e),kEe(t,i);var a=np.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=Rv.select(this),u=o[0],l=u.trace;Rkt(o),s.attr("stroke-linejoin","round"),s.each(function(){var f=Rv.select(this).selectAll("g.slice").data(o);f.enter().append("g").classed("slice",!0),f.exit().remove();var c=[[[],[]],[[],[]]],h=!1;f.each(function(A,L){if(A.hidden){Rv.select(this).selectAll("path,g").remove();return}A.pointNumber=A.i,A.curveNumber=l.index,c[A.pxmid[1]<0?0:1][A.pxmid[0]<0?0:1].push(A);var _=u.cx,C=u.cy,M=Rv.select(this),v=M.selectAll("path.surface").data([A]);if(v.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),M.call(_Ee,e,o),l.pull){var z=+Fu.castOption(l.pull,A.pts)||0;z>0&&(_+=z*A.pxmid[0],C+=z*A.pxmid[1])}A.cxFinal=_,A.cyFinal=C;function T(O,W,re,ne){var be=ne*(W[0]-O[0]),ze=ne*(W[1]-O[1]);return"a"+ne*u.r+","+ne*u.r+" 0 "+A.largeArc+(re?" 1 ":" 0 ")+be+","+ze}var F=l.hole;if(A.v===u.vTotal){var q="M"+(_+A.px0[0])+","+(C+A.px0[1])+T(A.px0,A.pxmid,!0,1)+T(A.pxmid,A.px0,!0,1)+"Z";F?v.attr("d","M"+(_+F*A.px0[0])+","+(C+F*A.px0[1])+T(A.px0,A.pxmid,!1,F)+T(A.pxmid,A.px0,!1,F)+"Z"+q):v.attr("d",q)}else{var U=T(A.px0,A.px1,!0,1);if(F){var H=1-F;v.attr("d","M"+(_+F*A.px1[0])+","+(C+F*A.px1[1])+T(A.px1,A.px0,!1,F)+"l"+H*A.px0[0]+","+H*A.px0[1]+U+"Z")}else v.attr("d","M"+_+","+C+"l"+A.px0[0]+","+A.px0[1]+U+"Z")}CEe(e,A,u);var j=Fu.castOption(l.textposition,A.pts),G=M.selectAll("g.slicetext").data(A.text&&j!=="none"?[0]:[]);G.enter().append("g").classed("slicetext",!0),G.exit().remove(),G.each(function(){var O=np.ensureSingle(Rv.select(this),"text","",function(te){te.attr("data-notex",1)}),W=np.ensureUniformFontSize(e,j==="outside"?kkt(l,A,n.font):xEe(l,A,n.font));O.text(A.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(jg.font,W).call(hj.convertToTspans,e);var re=jg.bBox(O.node()),ne;if(j==="outside")ne=vEe(re,A);else if(ne=wEe(re,A,u),j==="auto"&&ne.scale<1){var be=np.ensureUniformFontSize(e,l.outsidetextfont);O.call(jg.font,be),re=jg.bBox(O.node()),ne=vEe(re,A)}var ze=ne.textPosAngle,Ce=ze===void 0?A.pxmid:cR(u.r,ze);if(ne.targetX=_+Ce[0]*ne.rCenter+(ne.x||0),ne.targetY=C+Ce[1]*ne.rCenter+(ne.y||0),LEe(ne,re),ne.outside){var he=ne.targetY;A.yLabelMin=he-re.height/2,A.yLabelMid=he,A.yLabelMax=he+re.height/2,A.labelExtraX=0,A.labelExtraY=0,h=!0}ne.fontSize=W.size,Akt(l.type,ne,n),o[L].transform=ne,np.setTransormAndDisplay(O,ne)})});var d=Rv.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);if(d.enter().append("g").classed("titletext",!0),d.exit().remove(),d.each(function(){var A=np.ensureSingle(Rv.select(this),"text","",function(C){C.attr("data-notex",1)}),L=l.title.text;l._meta&&(L=np.templateString(L,l._meta)),A.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(jg.font,l.title.font).call(hj.convertToTspans,e);var _;l.title.position==="middle center"?_=zkt(u):_=MEe(u,i),A.attr("transform",cEe(_.x,_.y)+Tkt(Math.min(1,_.scale))+cEe(_.tx,_.ty))}),h&&Ikt(c,l),Ekt(f,l),h&&l.automargin){var p=jg.bBox(s.node()),x=l.domain,b=i.w*(x.x[1]-x.x[0]),y=i.h*(x.y[1]-x.y[0]),k=(.5*b-u.r)/i.w,E=(.5*y-u.r)/i.h;wkt.autoMargin(e,"pie."+l.uid+".automargin",{xl:x.x[0]-k,xr:x.x[1]+k,yb:x.y[0]-E,yt:x.y[1]+E,l:Math.max(u.cx-u.r-p.left,0),r:Math.max(p.right-(u.cx+u.r),0),b:Math.max(p.bottom-(u.cy+u.r),0),t:Math.max(u.cy-u.r-p.top,0),pad:5})}})});setTimeout(function(){a.selectAll("tspan").each(function(){var o=Rv.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function Ekt(e,t){e.each(function(r){var n=Rv.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,np.setTransormAndDisplay(i,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+a+","+o,u=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var l=r.labelExtraX*r.pxmid[1]/r.pxmid[0],f=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(l)>Math.abs(f)?s+="l"+f*r.pxmid[0]/r.pxmid[1]+","+f+"H"+(a+r.labelExtraX+u):s+="l"+r.labelExtraX+","+l+"v"+(f-l)+"h"+u}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+u;np.ensureSingle(n,"path","textline").call(yEe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function _Ee(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(u){var l=t._fullLayout,f=t._fullData[o.index];if(!(t._dragging||l.hovermode===!1)){var c=f.hoverinfo;if(Array.isArray(c)&&(c=uR.castHoverinfo({hoverinfo:[Fu.castOption(c,u.pts)],_module:o._module},l,0)),c==="all"&&(c="label+text+value+percent+name"),f.hovertemplate||c!=="none"&&c!=="skip"&&c){var h=u.rInscribed||0,d=i+u.pxmid[0]*(1-h),p=a+u.pxmid[1]*(1-h),x=l.separators,b=[];if(c&&c.indexOf("label")!==-1&&b.push(u.label),u.text=Fu.castOption(f.hovertext||f.text,u.pts),c&&c.indexOf("text")!==-1){var y=u.text;np.isValidTextValue(y)&&b.push(y)}u.value=u.v,u.valueLabel=Fu.formatPieValue(u.v,x),c&&c.indexOf("value")!==-1&&b.push(u.valueLabel),u.percent=u.v/n.vTotal,u.percentLabel=Fu.formatPiePercent(u.percent,x),c&&c.indexOf("percent")!==-1&&b.push(u.percentLabel);var k=f.hoverlabel,E=k.font,A=[];uR.loneHover({trace:o,x0:d-h*n.r,x1:d+h*n.r,y:p,_x0:s?i+u.TL[0]:d-h*n.r,_x1:s?i+u.TR[0]:d+h*n.r,_y0:s?a+u.TL[1]:p-h*n.r,_y1:s?a+u.BL[1]:p+h*n.r,text:b.join("<br>"),name:f.hovertemplate||c.indexOf("name")!==-1?f.name:void 0,idealAlign:u.pxmid[0]<0?"left":"right",color:Fu.castOption(k.bgcolor,u.pts)||u.color,borderColor:Fu.castOption(k.bordercolor,u.pts),fontFamily:Fu.castOption(E.family,u.pts),fontSize:Fu.castOption(E.size,u.pts),fontColor:Fu.castOption(E.color,u.pts),nameLength:Fu.castOption(k.namelength,u.pts),textAlign:Fu.castOption(k.align,u.pts),hovertemplate:Fu.castOption(f.hovertemplate,u.pts),hovertemplateLabels:u,eventData:[fR(u,f)]},{container:l._hoverlayer.node(),outerContainer:l._paper.node(),gd:t,inOut_bbox:A}),u.bbox=A[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[fR(u,f)],event:Rv.event})}}),e.on("mouseout",function(u){var l=t._fullLayout,f=t._fullData[o.index],c=Rv.select(this).datum();o._hasHoverEvent&&(u.originalEvent=Rv.event,t.emit("plotly_unhover",{points:[fR(c,f)],event:Rv.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(uR.loneUnhover(l._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(u){var l=t._fullLayout,f=t._fullData[o.index];t._dragging||l.hovermode===!1||(t._hoverdata=[fR(u,f)],uR.click(t,Rv.event))})}function kkt(e,t,r){var n=Fu.castOption(e.outsidetextfont.color,t.pts)||Fu.castOption(e.textfont.color,t.pts)||r.color,i=Fu.castOption(e.outsidetextfont.family,t.pts)||Fu.castOption(e.textfont.family,t.pts)||r.family,a=Fu.castOption(e.outsidetextfont.size,t.pts)||Fu.castOption(e.textfont.size,t.pts)||r.size,o=Fu.castOption(e.outsidetextfont.weight,t.pts)||Fu.castOption(e.textfont.weight,t.pts)||r.weight,s=Fu.castOption(e.outsidetextfont.style,t.pts)||Fu.castOption(e.textfont.style,t.pts)||r.style,u=Fu.castOption(e.outsidetextfont.variant,t.pts)||Fu.castOption(e.textfont.variant,t.pts)||r.variant,l=Fu.castOption(e.outsidetextfont.textcase,t.pts)||Fu.castOption(e.textfont.textcase,t.pts)||r.textcase,f=Fu.castOption(e.outsidetextfont.lineposition,t.pts)||Fu.castOption(e.textfont.lineposition,t.pts)||r.lineposition,c=Fu.castOption(e.outsidetextfont.shadow,t.pts)||Fu.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:i,size:a,weight:o,style:s,variant:u,textcase:l,lineposition:f,shadow:c}}function xEe(e,t,r){var n=Fu.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=Fu.castOption(e._input.textfont.color,t.pts));var i=Fu.castOption(e.insidetextfont.family,t.pts)||Fu.castOption(e.textfont.family,t.pts)||r.family,a=Fu.castOption(e.insidetextfont.size,t.pts)||Fu.castOption(e.textfont.size,t.pts)||r.size,o=Fu.castOption(e.insidetextfont.weight,t.pts)||Fu.castOption(e.textfont.weight,t.pts)||r.weight,s=Fu.castOption(e.insidetextfont.style,t.pts)||Fu.castOption(e.textfont.style,t.pts)||r.style,u=Fu.castOption(e.insidetextfont.variant,t.pts)||Fu.castOption(e.textfont.variant,t.pts)||r.variant,l=Fu.castOption(e.insidetextfont.textcase,t.pts)||Fu.castOption(e.textfont.textcase,t.pts)||r.textcase,f=Fu.castOption(e.insidetextfont.lineposition,t.pts)||Fu.castOption(e.textfont.lineposition,t.pts)||r.lineposition,c=Fu.castOption(e.insidetextfont.shadow,t.pts)||Fu.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||yEe.contrast(t.color),family:i,size:a,weight:o,style:s,variant:u,textcase:l,lineposition:f,shadow:c}}function bEe(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=np.templateString(a,n._meta));var o=jg.tester.append("text").attr("data-notex",1).text(a).call(jg.font,n.title.font).call(hj.convertToTspans,t),s=jg.bBox(o.node(),!0);r.titleBox={width:s.width,height:s.height},o.remove()}}function wEe(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,u=t.halfangle,l=t.midangle,f=r.trace.insidetextorientation,c=f==="horizontal",h=f==="tangential",d=f==="radial",p=f==="auto",x=[],b;if(!p){var y=function(M,v){if(Ckt(t,M)){var z=Math.abs(M-t.startangle),T=Math.abs(M-t.stopangle),F=z<T?z:T;v==="tan"?b=pEe(e,n,o,F,0):b=dEe(e,n,o,F,Math.PI/2),b.textPosAngle=M,x.push(b)}},k;if(c||h){for(k=4;k>=-4;k-=2)y(Math.PI*k,"tan");for(k=4;k>=-4;k-=2)y(Math.PI*(k+1),"tan")}if(c||d){for(k=4;k>=-4;k-=2)y(Math.PI*(k+1.5),"rad");for(k=4;k>=-4;k-=2)y(Math.PI*(k+.5),"rad")}}if(s||p||c){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;x.push(b)}(p||d)&&(b=dEe(e,n,o,u,l),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b)),(p||h)&&(b=pEe(e,n,o,u,l),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b));for(var A=0,L=0,_=0;_<x.length;_++){var C=x[_].scale;if(L<C&&(L=C,A=_),!p&&L>=1)break}return x[A]}function Ckt(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r<t&&t<n}function dEe(e,t,r,n,i){t=Math.max(0,t-2*gEe);var a=e.width/e.height,o=SEe(a,n,t,r);return{scale:o*2/e.height,rCenter:TEe(a,o/t),rotate:AEe(i)}}function pEe(e,t,r,n,i){t=Math.max(0,t-2*gEe);var a=e.height/e.width,o=SEe(a,n,t,r);return{scale:o*2/e.width,rCenter:TEe(a,o/t),rotate:AEe(i+Math.PI/2)}}function TEe(e,t){return Math.cos(t)-e*t}function AEe(e){return(180/Math.PI*e+720)%180-90}function SEe(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 Lkt(e,t){return e.v===t.vTotal&&!t.trace.hole?1:Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2)}function vEe(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 zkt(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 MEe(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=EEe(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 u=Pkt(e.r,e.trace.aspectratio),l=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf("left")!==-1?(l=l+u,o.x-=(1+i)*u,s.tx+=e.titleBox.width/2):a.title.position.indexOf("center")!==-1?l*=2:a.title.position.indexOf("right")!==-1&&(l=l+u,o.x+=(1+i)*u,s.tx-=e.titleBox.width/2),r=l/e.titleBox.width,n=dj(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function Pkt(e,t){return e/(t===void 0?1:t)}function dj(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 EEe(e){var t=e.pull;if(!t)return 0;var r;if(np.isArrayOrTypedArray(t))for(t=0,r=0;r<e.pull.length;r++)e.pull[r]>t&&(t=e.pull[r]);return t}function Ikt(e,t){var r,n,i,a,o,s,u,l,f,c,h,d,p;function x(E,A){return E.pxmid[1]-A.pxmid[1]}function b(E,A){return A.pxmid[1]-E.pxmid[1]}function y(E,A){A||(A={});var L=A.labelExtraY+(n?A.yLabelMax:A.yLabelMin),_=n?E.yLabelMin:E.yLabelMax,C=n?E.yLabelMax:E.yLabelMin,M=E.cyFinal+o(E.px0[1],E.px1[1]),v=L-_,z,T,F,q,U,H;if(v*u>0&&(E.labelExtraY=v),!!np.isArrayOrTypedArray(t.pull))for(T=0;T<c.length;T++)F=c[T],!(F===E||(Fu.castOption(t.pull,E.pts)||0)>=(Fu.castOption(t.pull,F.pts)||0))&&((E.pxmid[1]-F.pxmid[1])*u>0?(q=F.cyFinal+o(F.px0[1],F.px1[1]),v=q-_-E.labelExtraY,v*u>0&&(E.labelExtraY+=v)):(C+E.labelExtraY-M)*u>0&&(z=3*s*Math.abs(T-c.indexOf(E)),U=F.cxFinal+a(F.px0[0],F.px1[0]),H=U+z-(E.cxFinal+E.pxmid[0])-E.labelExtraX,H*s>0&&(E.labelExtraX+=H)))}for(n=0;n<2;n++)for(i=n?x:b,o=n?Math.max:Math.min,u=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,l=e[n][r],l.sort(i),f=e[1-n][r],c=f.concat(l),d=[],h=0;h<l.length;h++)l[h].yLabelMid!==void 0&&d.push(l[h]);for(p=!1,h=0;n&&h<f.length;h++)if(f[h].yLabelMid!==void 0){p=f[h];break}for(h=0;h<d.length;h++){var k=h&&d[h-1];p&&!h&&(k=p),y(d[h],k)}}}function kEe(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]),u=t.h*(o.y[1]-o.y[0]);a.title.text&&a.title.position!=="middle center"&&(u-=dj(i,t));var l=s/2,f=u/2;a.type==="funnelarea"&&!a.scalegroup&&(f/=a.aspectratio),i.r=Math.min(l,f)/(1+EEe(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])-u/2,a.title.text&&a.title.position.indexOf("bottom")!==-1&&(i.cy-=dj(i,t)),a.scalegroup&&r.indexOf(a.scalegroup)===-1&&r.push(a.scalegroup)}Dkt(e,r)}function Dkt(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 u;if(i.type==="pie")u=r.r*r.r;else if(i.type==="funnelarea"){var l,f;i.aspectratio>1?(l=r.r,f=l/i.aspectratio):(f=r.r,l=f*i.aspectratio),l*=(1+i.baseratio)/2,u=l*f}o=Math.min(o,u/r.vTotal)}for(n=0;n<e.length;n++)if(r=e[n][0],i=r.trace,i.scalegroup===s){var c=o*r.vTotal;i.type==="funnelarea"&&(c/=(1+i.baseratio)/2,c/=i.aspectratio),r.r=Math.sqrt(c)}}}function Rkt(e){var t=e[0],r=t.r,n=t.trace,i=Fu.getRotationAngle(n.rotation),a=2*Math.PI/t.vTotal,o="px0",s="px1",u,l,f;if(n.direction==="counterclockwise"){for(u=0;u<e.length&&e[u].hidden;u++);if(u===e.length)return;i+=a*e[u].v,a*=-1,o="px1",s="px0"}for(f=cR(r,i),u=0;u<e.length;u++)l=e[u],!l.hidden&&(l[o]=f,l.startangle=i,i+=a*l.v/2,l.pxmid=cR(r,i),l.midangle=i,i+=a*l.v/2,f=cR(r,i),l.stopangle=i,l[s]=f,l.largeArc=l.v>t.vTotal/2?1:0,l.halfangle=Math.PI*Math.min(l.v/t.vTotal,.5),l.ring=1-n.hole,l.rInscribed=Lkt(l,t))}function cR(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function CEe(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("+"),u=function(A){return s.indexOf(A)!==-1},l=u("label"),f=u("text"),c=u("value"),h=u("percent"),d=n.separators,p;if(p=l?[t.label]:[],f){var x=Fu.getFirstFilled(i.text,t.pts);hEe(x)&&p.push(x)}c&&p.push(Fu.formatPieValue(t.v,d)),h&&p.push(Fu.formatPiePercent(t.v/r.vTotal,d)),t.text=p.join("<br>")}function b(A){return{label:A.label,value:A.v,valueLabel:Fu.formatPieValue(A.v,n.separators),percent:A.v/r.vTotal,percentLabel:Fu.formatPiePercent(A.v/r.vTotal,n.separators),color:A.color,text:A.text,customdata:np.castOption(i,A.i,"customdata")}}if(a){var y=np.castOption(i,t.i,"texttemplate");if(!y)t.text="";else{var k=b(t),E=Fu.getFirstFilled(i.text,t.pts);(hEe(E)||E==="")&&(k.text=E),t.text=np.texttemplateString(y,k,e._fullLayout._d3locale,k,i._meta||{})}}}function LEe(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}zEe.exports={plot:Mkt,formatSliceLabel:CEe,transformInsideText:wEe,determineInsideTextFont:xEe,positionTitleOutside:MEe,prerenderTitles:bEe,layoutAreas:kEe,attachFxHandlers:_Ee,computeTransform:LEe}});var DEe=Se((Ehr,IEe)=>{"use strict";var PEe=Nl(),Fkt=R3(),qkt=bp().resizeText;IEe.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");qkt(t,r,"pie"),r.each(function(n){var i=n[0],a=i.trace,o=PEe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){PEe.select(this).call(Fkt,s,a,t)})})}});var FEe=Se(_A=>{"use strict";var REe=Ac();_A.name="pie";_A.plot=function(e,t,r,n){REe.plotBasePlot(_A.name,e,t,r,n)};_A.clean=function(e,t,r,n){REe.cleanBasePlot(_A.name,e,t,r,n)}});var BEe=Se((Chr,qEe)=>{"use strict";qEe.exports={attributes:A2(),supplyDefaults:S2().supplyDefaults,supplyLayoutDefaults:aEe(),layoutAttributes:lR(),calc:gA().calc,crossTraceCalc:gA().crossTraceCalc,plot:hR().plot,style:DEe(),styleOne:R3(),moduleType:"trace",name:"pie",basePlotModule:FEe(),categories:["pie-like","pie","showLegend"],meta:{}}});var NEe=Se((Lhr,OEe)=>{"use strict";OEe.exports=BEe()});var VEe=Se(xA=>{"use strict";var UEe=Ac();xA.name="sunburst";xA.plot=function(e,t,r,n){UEe.plotBasePlot(xA.name,e,t,r,n)};xA.clean=function(e,t,r,n){UEe.cleanBasePlot(xA.name,e,t,r,n)}});var pj=Se((Phr,HEe)=>{"use strict";HEe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var AE=Se((Ihr,WEe)=>{"use strict";var Bkt=zf(),Okt=Du().hovertemplateAttrs,Nkt=Du().texttemplateAttrs,Ukt=Xf(),Vkt=Ec().attributes,Zg=A2(),GEe=pj(),TE=vu().extendFlat,Hkt=Id().pattern;WEe.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:TE({colors:{valType:"data_array",editType:"calc"},line:{color:TE({},Zg.marker.line.color,{dflt:null}),width:TE({},Zg.marker.line.width,{dflt:1}),editType:"calc"},pattern:Hkt,editType:"calc"},Ukt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:Zg.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:Nkt({editType:"plot"},{keys:GEe.eventDataKeys.concat(["label","value"])}),hovertext:Zg.hovertext,hoverinfo:TE({},Bkt.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:Okt({},{keys:GEe.eventDataKeys}),textfont:Zg.textfont,insidetextorientation:Zg.insidetextorientation,insidetextfont:Zg.insidetextfont,outsidetextfont:TE({},Zg.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:Zg.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:Vkt({name:"sunburst",trace:!0,editType:"calc"})}});var vj=Se((Dhr,jEe)=>{"use strict";jEe.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var KEe=Se((Rhr,YEe)=>{"use strict";var ZEe=Zr(),Gkt=AE(),Wkt=Ec().defaults,jkt=r0().handleText,Zkt=S2().handleMarkerDefaults,XEe=fc(),Xkt=XEe.hasColorscale,Ykt=XEe.handleDefaults;YEe.exports=function(t,r,n,i){function a(h,d){return ZEe.coerce(t,r,Gkt,h,d)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var u=a("values");u&&u.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),Zkt(t,r,i,a);var l=r._hasColorscale=Xkt(t,"marker","colors")||(t.marker||{}).coloraxis;l&&Ykt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",l?1:.7);var f=a("text");a("texttemplate"),r.texttemplate||a("textinfo",ZEe.isArrayOrTypedArray(f)?"text+label":"label"),a("hovertext"),a("hovertemplate");var c="auto";jkt(t,r,i,a,c,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),Wkt(r,i,a),r._length=null}});var $Ee=Se((Fhr,JEe)=>{"use strict";var Kkt=Zr(),Jkt=vj();JEe.exports=function(t,r){function n(i,a){return Kkt.coerce(t,r,Jkt,i,a)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var SE=Se((dR,QEe)=>{(function(e,t){typeof dR=="object"&&typeof QEe!="undefined"?t(dR):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(dR,function(e){"use strict";function t(Pe,Ie){return Pe.parent===Ie.parent?1:2}function r(Pe){return Pe.reduce(n,0)/Pe.length}function n(Pe,Ie){return Pe+Ie.x}function i(Pe){return 1+Pe.reduce(a,0)}function a(Pe,Ie){return Math.max(Pe,Ie.y)}function o(Pe){for(var Ie;Ie=Pe.children;)Pe=Ie[0];return Pe}function s(Pe){for(var Ie;Ie=Pe.children;)Pe=Ie[Ie.length-1];return Pe}function u(){var Pe=t,Ie=1,lt=1,ye=!1;function ue(de){var ht,Et=0;de.eachAfter(function(vr){var Er=vr.children;Er?(vr.x=r(Er),vr.y=i(Er)):(vr.x=ht?Et+=Pe(vr,ht):0,vr.y=0,ht=vr)});var St=o(de),Zt=s(de),qr=St.x-Pe(St,Zt)/2,Lr=Zt.x+Pe(Zt,St)/2;return de.eachAfter(ye?function(vr){vr.x=(vr.x-de.x)*Ie,vr.y=(de.y-vr.y)*lt}:function(vr){vr.x=(vr.x-qr)/(Lr-qr)*Ie,vr.y=(1-(de.y?vr.y/de.y:1))*lt})}return ue.separation=function(de){return arguments.length?(Pe=de,ue):Pe},ue.size=function(de){return arguments.length?(ye=!1,Ie=+de[0],lt=+de[1],ue):ye?null:[Ie,lt]},ue.nodeSize=function(de){return arguments.length?(ye=!0,Ie=+de[0],lt=+de[1],ue):ye?[Ie,lt]:null},ue}function l(Pe){var Ie=0,lt=Pe.children,ye=lt&&lt.length;if(!ye)Ie=1;else for(;--ye>=0;)Ie+=lt[ye].value;Pe.value=Ie}function f(){return this.eachAfter(l)}function c(Pe){var Ie=this,lt,ye=[Ie],ue,de,ht;do for(lt=ye.reverse(),ye=[];Ie=lt.pop();)if(Pe(Ie),ue=Ie.children,ue)for(de=0,ht=ue.length;de<ht;++de)ye.push(ue[de]);while(ye.length);return this}function h(Pe){for(var Ie=this,lt=[Ie],ye,ue;Ie=lt.pop();)if(Pe(Ie),ye=Ie.children,ye)for(ue=ye.length-1;ue>=0;--ue)lt.push(ye[ue]);return this}function d(Pe){for(var Ie=this,lt=[Ie],ye=[],ue,de,ht;Ie=lt.pop();)if(ye.push(Ie),ue=Ie.children,ue)for(de=0,ht=ue.length;de<ht;++de)lt.push(ue[de]);for(;Ie=ye.pop();)Pe(Ie);return this}function p(Pe){return this.eachAfter(function(Ie){for(var lt=+Pe(Ie.data)||0,ye=Ie.children,ue=ye&&ye.length;--ue>=0;)lt+=ye[ue].value;Ie.value=lt})}function x(Pe){return this.eachBefore(function(Ie){Ie.children&&Ie.children.sort(Pe)})}function b(Pe){for(var Ie=this,lt=y(Ie,Pe),ye=[Ie];Ie!==lt;)Ie=Ie.parent,ye.push(Ie);for(var ue=ye.length;Pe!==lt;)ye.splice(ue,0,Pe),Pe=Pe.parent;return ye}function y(Pe,Ie){if(Pe===Ie)return Pe;var lt=Pe.ancestors(),ye=Ie.ancestors(),ue=null;for(Pe=lt.pop(),Ie=ye.pop();Pe===Ie;)ue=Pe,Pe=lt.pop(),Ie=ye.pop();return ue}function k(){for(var Pe=this,Ie=[Pe];Pe=Pe.parent;)Ie.push(Pe);return Ie}function E(){var Pe=[];return this.each(function(Ie){Pe.push(Ie)}),Pe}function A(){var Pe=[];return this.eachBefore(function(Ie){Ie.children||Pe.push(Ie)}),Pe}function L(){var Pe=this,Ie=[];return Pe.each(function(lt){lt!==Pe&&Ie.push({source:lt.parent,target:lt})}),Ie}function _(Pe,Ie){var lt=new T(Pe),ye=+Pe.value&&(lt.value=Pe.value),ue,de=[lt],ht,Et,St,Zt;for(Ie==null&&(Ie=M);ue=de.pop();)if(ye&&(ue.value=+ue.data.value),(Et=Ie(ue.data))&&(Zt=Et.length))for(ue.children=new Array(Zt),St=Zt-1;St>=0;--St)de.push(ht=ue.children[St]=new T(Et[St])),ht.parent=ue,ht.depth=ue.depth+1;return lt.eachBefore(z)}function C(){return _(this).eachBefore(v)}function M(Pe){return Pe.children}function v(Pe){Pe.data=Pe.data.data}function z(Pe){var Ie=0;do Pe.height=Ie;while((Pe=Pe.parent)&&Pe.height<++Ie)}function T(Pe){this.data=Pe,this.depth=this.height=0,this.parent=null}T.prototype=_.prototype={constructor:T,count:f,each:c,eachAfter:d,eachBefore:h,sum:p,sort:x,path:b,ancestors:k,descendants:E,leaves:A,links:L,copy:C};var F=Array.prototype.slice;function q(Pe){for(var Ie=Pe.length,lt,ye;Ie;)ye=Math.random()*Ie--|0,lt=Pe[Ie],Pe[Ie]=Pe[ye],Pe[ye]=lt;return Pe}function U(Pe){for(var Ie=0,lt=(Pe=q(F.call(Pe))).length,ye=[],ue,de;Ie<lt;)ue=Pe[Ie],de&&G(de,ue)?++Ie:(de=W(ye=H(ye,ue)),Ie=0);return de}function H(Pe,Ie){var lt,ye;if(O(Ie,Pe))return[Ie];for(lt=0;lt<Pe.length;++lt)if(j(Ie,Pe[lt])&&O(ne(Pe[lt],Ie),Pe))return[Pe[lt],Ie];for(lt=0;lt<Pe.length-1;++lt)for(ye=lt+1;ye<Pe.length;++ye)if(j(ne(Pe[lt],Pe[ye]),Ie)&&j(ne(Pe[lt],Ie),Pe[ye])&&j(ne(Pe[ye],Ie),Pe[lt])&&O(be(Pe[lt],Pe[ye],Ie),Pe))return[Pe[lt],Pe[ye],Ie];throw new Error}function j(Pe,Ie){var lt=Pe.r-Ie.r,ye=Ie.x-Pe.x,ue=Ie.y-Pe.y;return lt<0||lt*lt<ye*ye+ue*ue}function G(Pe,Ie){var lt=Pe.r-Ie.r+1e-6,ye=Ie.x-Pe.x,ue=Ie.y-Pe.y;return lt>0&&lt*lt>ye*ye+ue*ue}function O(Pe,Ie){for(var lt=0;lt<Ie.length;++lt)if(!G(Pe,Ie[lt]))return!1;return!0}function W(Pe){switch(Pe.length){case 1:return re(Pe[0]);case 2:return ne(Pe[0],Pe[1]);case 3:return be(Pe[0],Pe[1],Pe[2])}}function re(Pe){return{x:Pe.x,y:Pe.y,r:Pe.r}}function ne(Pe,Ie){var lt=Pe.x,ye=Pe.y,ue=Pe.r,de=Ie.x,ht=Ie.y,Et=Ie.r,St=de-lt,Zt=ht-ye,qr=Et-ue,Lr=Math.sqrt(St*St+Zt*Zt);return{x:(lt+de+St/Lr*qr)/2,y:(ye+ht+Zt/Lr*qr)/2,r:(Lr+ue+Et)/2}}function be(Pe,Ie,lt){var ye=Pe.x,ue=Pe.y,de=Pe.r,ht=Ie.x,Et=Ie.y,St=Ie.r,Zt=lt.x,qr=lt.y,Lr=lt.r,vr=ye-ht,Er=ye-Zt,si=ue-Et,Ei=ue-qr,Si=St-de,xi=Lr-de,Hi=ye*ye+ue*ue-de*de,Jr=Hi-ht*ht-Et*Et+St*St,ci=Hi-Zt*Zt-qr*qr+Lr*Lr,Di=Er*si-vr*Ei,Lt=(si*ci-Ei*Jr)/(Di*2)-ye,vt=(Ei*Si-si*xi)/Di,Dt=(Er*Jr-vr*ci)/(Di*2)-ue,Bt=(vr*xi-Er*Si)/Di,sr=vt*vt+Bt*Bt-1,br=2*(de+Lt*vt+Dt*Bt),zr=Lt*Lt+Dt*Dt-de*de,Tr=-(sr?(br+Math.sqrt(br*br-4*sr*zr))/(2*sr):zr/br);return{x:ye+Lt+vt*Tr,y:ue+Dt+Bt*Tr,r:Tr}}function ze(Pe,Ie,lt){var ye=Pe.x-Ie.x,ue,de,ht=Pe.y-Ie.y,Et,St,Zt=ye*ye+ht*ht;Zt?(de=Ie.r+lt.r,de*=de,St=Pe.r+lt.r,St*=St,de>St?(ue=(Zt+St-de)/(2*Zt),Et=Math.sqrt(Math.max(0,St/Zt-ue*ue)),lt.x=Pe.x-ue*ye-Et*ht,lt.y=Pe.y-ue*ht+Et*ye):(ue=(Zt+de-St)/(2*Zt),Et=Math.sqrt(Math.max(0,de/Zt-ue*ue)),lt.x=Ie.x+ue*ye-Et*ht,lt.y=Ie.y+ue*ht+Et*ye)):(lt.x=Ie.x+lt.r,lt.y=Ie.y)}function Ce(Pe,Ie){var lt=Pe.r+Ie.r-1e-6,ye=Ie.x-Pe.x,ue=Ie.y-Pe.y;return lt>0&&lt*lt>ye*ye+ue*ue}function he(Pe){var Ie=Pe._,lt=Pe.next._,ye=Ie.r+lt.r,ue=(Ie.x*lt.r+lt.x*Ie.r)/ye,de=(Ie.y*lt.r+lt.y*Ie.r)/ye;return ue*ue+de*de}function te(Pe){this._=Pe,this.next=null,this.previous=null}function ke(Pe){if(!(ue=Pe.length))return 0;var Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr;if(Ie=Pe[0],Ie.x=0,Ie.y=0,!(ue>1))return Ie.r;if(lt=Pe[1],Ie.x=-lt.r,lt.x=Ie.r,lt.y=0,!(ue>2))return Ie.r+lt.r;ze(lt,Ie,ye=Pe[2]),Ie=new te(Ie),lt=new te(lt),ye=new te(ye),Ie.next=ye.previous=lt,lt.next=Ie.previous=ye,ye.next=lt.previous=Ie;e:for(Et=3;Et<ue;++Et){ze(Ie._,lt._,ye=Pe[Et]),ye=new te(ye),St=lt.next,Zt=Ie.previous,qr=lt._.r,Lr=Ie._.r;do if(qr<=Lr){if(Ce(St._,ye._)){lt=St,Ie.next=lt,lt.previous=Ie,--Et;continue e}qr+=St._.r,St=St.next}else{if(Ce(Zt._,ye._)){Ie=Zt,Ie.next=lt,lt.previous=Ie,--Et;continue e}Lr+=Zt._.r,Zt=Zt.previous}while(St!==Zt.next);for(ye.previous=Ie,ye.next=lt,Ie.next=lt.previous=lt=ye,de=he(Ie);(ye=ye.next)!==lt;)(ht=he(ye))<de&&(Ie=ye,de=ht);lt=Ie.next}for(Ie=[lt._],ye=lt;(ye=ye.next)!==lt;)Ie.push(ye._);for(ye=U(Ie),Et=0;Et<ue;++Et)Ie=Pe[Et],Ie.x-=ye.x,Ie.y-=ye.y;return ye.r}function Ee(Pe){return ke(Pe),Pe}function Me(Pe){return Pe==null?null:Oe(Pe)}function Oe(Pe){if(typeof Pe!="function")throw new Error;return Pe}function Re(){return 0}function me(Pe){return function(){return Pe}}function Be(Pe){return Math.sqrt(Pe.value)}function fe(){var Pe=null,Ie=1,lt=1,ye=Re;function ue(de){return de.x=Ie/2,de.y=lt/2,Pe?de.eachBefore(Ze(Pe)).eachAfter(et(ye,.5)).eachBefore(gt(1)):de.eachBefore(Ze(Be)).eachAfter(et(Re,1)).eachAfter(et(ye,de.r/Math.min(Ie,lt))).eachBefore(gt(Math.min(Ie,lt)/(2*de.r))),de}return ue.radius=function(de){return arguments.length?(Pe=Me(de),ue):Pe},ue.size=function(de){return arguments.length?(Ie=+de[0],lt=+de[1],ue):[Ie,lt]},ue.padding=function(de){return arguments.length?(ye=typeof de=="function"?de:me(+de),ue):ye},ue}function Ze(Pe){return function(Ie){Ie.children||(Ie.r=Math.max(0,+Pe(Ie)||0))}}function et(Pe,Ie){return function(lt){if(ye=lt.children){var ye,ue,de=ye.length,ht=Pe(lt)*Ie||0,Et;if(ht)for(ue=0;ue<de;++ue)ye[ue].r+=ht;if(Et=ke(ye),ht)for(ue=0;ue<de;++ue)ye[ue].r-=ht;lt.r=Et+ht}}}function gt(Pe){return function(Ie){var lt=Ie.parent;Ie.r*=Pe,lt&&(Ie.x=lt.x+Pe*Ie.x,Ie.y=lt.y+Pe*Ie.y)}}function Pt(Pe){Pe.x0=Math.round(Pe.x0),Pe.y0=Math.round(Pe.y0),Pe.x1=Math.round(Pe.x1),Pe.y1=Math.round(Pe.y1)}function Qe(Pe,Ie,lt,ye,ue){for(var de=Pe.children,ht,Et=-1,St=de.length,Zt=Pe.value&&(ye-Ie)/Pe.value;++Et<St;)ht=de[Et],ht.y0=lt,ht.y1=ue,ht.x0=Ie,ht.x1=Ie+=ht.value*Zt}function Xe(){var Pe=1,Ie=1,lt=0,ye=!1;function ue(ht){var Et=ht.height+1;return ht.x0=ht.y0=lt,ht.x1=Pe,ht.y1=Ie/Et,ht.eachBefore(de(Ie,Et)),ye&&ht.eachBefore(Pt),ht}function de(ht,Et){return function(St){St.children&&Qe(St,St.x0,ht*(St.depth+1)/Et,St.x1,ht*(St.depth+2)/Et);var Zt=St.x0,qr=St.y0,Lr=St.x1-lt,vr=St.y1-lt;Lr<Zt&&(Zt=Lr=(Zt+Lr)/2),vr<qr&&(qr=vr=(qr+vr)/2),St.x0=Zt,St.y0=qr,St.x1=Lr,St.y1=vr}}return ue.round=function(ht){return arguments.length?(ye=!!ht,ue):ye},ue.size=function(ht){return arguments.length?(Pe=+ht[0],Ie=+ht[1],ue):[Pe,Ie]},ue.padding=function(ht){return arguments.length?(lt=+ht,ue):lt},ue}var Tt="$",xt={depth:-1},_t={};function Ct(Pe){return Pe.id}function jt(Pe){return Pe.parentId}function At(){var Pe=Ct,Ie=jt;function lt(ye){var ue,de,ht=ye.length,Et,St,Zt,qr=new Array(ht),Lr,vr,Er={};for(de=0;de<ht;++de)ue=ye[de],Zt=qr[de]=new T(ue),(Lr=Pe(ue,de,ye))!=null&&(Lr+="")&&(vr=Tt+(Zt.id=Lr),Er[vr]=vr in Er?_t:Zt);for(de=0;de<ht;++de)if(Zt=qr[de],Lr=Ie(ye[de],de,ye),Lr==null||!(Lr+="")){if(Et)throw new Error("multiple roots");Et=Zt}else{if(St=Er[Tt+Lr],!St)throw new Error("missing: "+Lr);if(St===_t)throw new Error("ambiguous: "+Lr);St.children?St.children.push(Zt):St.children=[Zt],Zt.parent=St}if(!Et)throw new Error("no root");if(Et.parent=xt,Et.eachBefore(function(si){si.depth=si.parent.depth+1,--ht}).eachBefore(z),Et.parent=null,ht>0)throw new Error("cycle");return Et}return lt.id=function(ye){return arguments.length?(Pe=Oe(ye),lt):Pe},lt.parentId=function(ye){return arguments.length?(Ie=Oe(ye),lt):Ie},lt}function Te(Pe,Ie){return Pe.parent===Ie.parent?1:2}function nt(Pe){var Ie=Pe.children;return Ie?Ie[0]:Pe.t}function ut(Pe){var Ie=Pe.children;return Ie?Ie[Ie.length-1]:Pe.t}function ct(Pe,Ie,lt){var ye=lt/(Ie.i-Pe.i);Ie.c-=ye,Ie.s+=lt,Pe.c+=ye,Ie.z+=lt,Ie.m+=lt}function rt(Pe){for(var Ie=0,lt=0,ye=Pe.children,ue=ye.length,de;--ue>=0;)de=ye[ue],de.z+=Ie,de.m+=Ie,Ie+=de.s+(lt+=de.c)}function je(Pe,Ie,lt){return Pe.a.parent===Ie.parent?Pe.a:lt}function tt(Pe,Ie){this._=Pe,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=Ie}tt.prototype=Object.create(T.prototype);function Je(Pe){for(var Ie=new tt(Pe,0),lt,ye=[Ie],ue,de,ht,Et;lt=ye.pop();)if(de=lt._.children)for(lt.children=new Array(Et=de.length),ht=Et-1;ht>=0;--ht)ye.push(ue=lt.children[ht]=new tt(de[ht],ht)),ue.parent=lt;return(Ie.parent=new tt(null,0)).children=[Ie],Ie}function Mt(){var Pe=Te,Ie=1,lt=1,ye=null;function ue(Zt){var qr=Je(Zt);if(qr.eachAfter(de),qr.parent.m=-qr.z,qr.eachBefore(ht),ye)Zt.eachBefore(St);else{var Lr=Zt,vr=Zt,Er=Zt;Zt.eachBefore(function(Hi){Hi.x<Lr.x&&(Lr=Hi),Hi.x>vr.x&&(vr=Hi),Hi.depth>Er.depth&&(Er=Hi)});var si=Lr===vr?1:Pe(Lr,vr)/2,Ei=si-Lr.x,Si=Ie/(vr.x+si+Ei),xi=lt/(Er.depth||1);Zt.eachBefore(function(Hi){Hi.x=(Hi.x+Ei)*Si,Hi.y=Hi.depth*xi})}return Zt}function de(Zt){var qr=Zt.children,Lr=Zt.parent.children,vr=Zt.i?Lr[Zt.i-1]:null;if(qr){rt(Zt);var Er=(qr[0].z+qr[qr.length-1].z)/2;vr?(Zt.z=vr.z+Pe(Zt._,vr._),Zt.m=Zt.z-Er):Zt.z=Er}else vr&&(Zt.z=vr.z+Pe(Zt._,vr._));Zt.parent.A=Et(Zt,vr,Zt.parent.A||Lr[0])}function ht(Zt){Zt._.x=Zt.z+Zt.parent.m,Zt.m+=Zt.parent.m}function Et(Zt,qr,Lr){if(qr){for(var vr=Zt,Er=Zt,si=qr,Ei=vr.parent.children[0],Si=vr.m,xi=Er.m,Hi=si.m,Jr=Ei.m,ci;si=ut(si),vr=nt(vr),si&&vr;)Ei=nt(Ei),Er=ut(Er),Er.a=Zt,ci=si.z+Hi-vr.z-Si+Pe(si._,vr._),ci>0&&(ct(je(si,Zt,Lr),Zt,ci),Si+=ci,xi+=ci),Hi+=si.m,Si+=vr.m,Jr+=Ei.m,xi+=Er.m;si&&!ut(Er)&&(Er.t=si,Er.m+=Hi-xi),vr&&!nt(Ei)&&(Ei.t=vr,Ei.m+=Si-Jr,Lr=Zt)}return Lr}function St(Zt){Zt.x*=Ie,Zt.y=Zt.depth*lt}return ue.separation=function(Zt){return arguments.length?(Pe=Zt,ue):Pe},ue.size=function(Zt){return arguments.length?(ye=!1,Ie=+Zt[0],lt=+Zt[1],ue):ye?null:[Ie,lt]},ue.nodeSize=function(Zt){return arguments.length?(ye=!0,Ie=+Zt[0],lt=+Zt[1],ue):ye?[Ie,lt]:null},ue}function Vt(Pe,Ie,lt,ye,ue){for(var de=Pe.children,ht,Et=-1,St=de.length,Zt=Pe.value&&(ue-lt)/Pe.value;++Et<St;)ht=de[Et],ht.x0=Ie,ht.x1=ye,ht.y0=lt,ht.y1=lt+=ht.value*Zt}var Kt=(1+Math.sqrt(5))/2;function ir(Pe,Ie,lt,ye,ue,de){for(var ht=[],Et=Ie.children,St,Zt,qr=0,Lr=0,vr=Et.length,Er,si,Ei=Ie.value,Si,xi,Hi,Jr,ci,Di,Lt;qr<vr;){Er=ue-lt,si=de-ye;do Si=Et[Lr++].value;while(!Si&&Lr<vr);for(xi=Hi=Si,Di=Math.max(si/Er,Er/si)/(Ei*Pe),Lt=Si*Si*Di,ci=Math.max(Hi/Lt,Lt/xi);Lr<vr;++Lr){if(Si+=Zt=Et[Lr].value,Zt<xi&&(xi=Zt),Zt>Hi&&(Hi=Zt),Lt=Si*Si*Di,Jr=Math.max(Hi/Lt,Lt/xi),Jr>ci){Si-=Zt;break}ci=Jr}ht.push(St={value:Si,dice:Er<si,children:Et.slice(qr,Lr)}),St.dice?Qe(St,lt,ye,ue,Ei?ye+=si*Si/Ei:de):Vt(St,lt,ye,Ei?lt+=Er*Si/Ei:ue,de),Ei-=Si,qr=Lr}return ht}var fr=function Pe(Ie){function lt(ye,ue,de,ht,Et){ir(Ie,ye,ue,de,ht,Et)}return lt.ratio=function(ye){return Pe((ye=+ye)>1?ye:1)},lt}(Kt);function Ot(){var Pe=fr,Ie=!1,lt=1,ye=1,ue=[0],de=Re,ht=Re,Et=Re,St=Re,Zt=Re;function qr(vr){return vr.x0=vr.y0=0,vr.x1=lt,vr.y1=ye,vr.eachBefore(Lr),ue=[0],Ie&&vr.eachBefore(Pt),vr}function Lr(vr){var Er=ue[vr.depth],si=vr.x0+Er,Ei=vr.y0+Er,Si=vr.x1-Er,xi=vr.y1-Er;Si<si&&(si=Si=(si+Si)/2),xi<Ei&&(Ei=xi=(Ei+xi)/2),vr.x0=si,vr.y0=Ei,vr.x1=Si,vr.y1=xi,vr.children&&(Er=ue[vr.depth+1]=de(vr)/2,si+=Zt(vr)-Er,Ei+=ht(vr)-Er,Si-=Et(vr)-Er,xi-=St(vr)-Er,Si<si&&(si=Si=(si+Si)/2),xi<Ei&&(Ei=xi=(Ei+xi)/2),Pe(vr,si,Ei,Si,xi))}return qr.round=function(vr){return arguments.length?(Ie=!!vr,qr):Ie},qr.size=function(vr){return arguments.length?(lt=+vr[0],ye=+vr[1],qr):[lt,ye]},qr.tile=function(vr){return arguments.length?(Pe=Oe(vr),qr):Pe},qr.padding=function(vr){return arguments.length?qr.paddingInner(vr).paddingOuter(vr):qr.paddingInner()},qr.paddingInner=function(vr){return arguments.length?(de=typeof vr=="function"?vr:me(+vr),qr):de},qr.paddingOuter=function(vr){return arguments.length?qr.paddingTop(vr).paddingRight(vr).paddingBottom(vr).paddingLeft(vr):qr.paddingTop()},qr.paddingTop=function(vr){return arguments.length?(ht=typeof vr=="function"?vr:me(+vr),qr):ht},qr.paddingRight=function(vr){return arguments.length?(Et=typeof vr=="function"?vr:me(+vr),qr):Et},qr.paddingBottom=function(vr){return arguments.length?(St=typeof vr=="function"?vr:me(+vr),qr):St},qr.paddingLeft=function(vr){return arguments.length?(Zt=typeof vr=="function"?vr:me(+vr),qr):Zt},qr}function De(Pe,Ie,lt,ye,ue){var de=Pe.children,ht,Et=de.length,St,Zt=new Array(Et+1);for(Zt[0]=St=ht=0;ht<Et;++ht)Zt[ht+1]=St+=de[ht].value;qr(0,Et,Pe.value,Ie,lt,ye,ue);function qr(Lr,vr,Er,si,Ei,Si,xi){if(Lr>=vr-1){var Hi=de[Lr];Hi.x0=si,Hi.y0=Ei,Hi.x1=Si,Hi.y1=xi;return}for(var Jr=Zt[Lr],ci=Er/2+Jr,Di=Lr+1,Lt=vr-1;Di<Lt;){var vt=Di+Lt>>>1;Zt[vt]<ci?Di=vt+1:Lt=vt}ci-Zt[Di-1]<Zt[Di]-ci&&Lr+1<Di&&--Di;var Dt=Zt[Di]-Jr,Bt=Er-Dt;if(Si-si>xi-Ei){var sr=(si*Bt+Si*Dt)/Er;qr(Lr,Di,Dt,si,Ei,sr,xi),qr(Di,vr,Bt,sr,Ei,Si,xi)}else{var br=(Ei*Bt+xi*Dt)/Er;qr(Lr,Di,Dt,si,Ei,Si,br),qr(Di,vr,Bt,si,br,Si,xi)}}}function _e(Pe,Ie,lt,ye,ue){(Pe.depth&1?Vt:Qe)(Pe,Ie,lt,ye,ue)}var Fe=function Pe(Ie){function lt(ye,ue,de,ht,Et){if((St=ye._squarify)&&St.ratio===Ie)for(var St,Zt,qr,Lr,vr=-1,Er,si=St.length,Ei=ye.value;++vr<si;){for(Zt=St[vr],qr=Zt.children,Lr=Zt.value=0,Er=qr.length;Lr<Er;++Lr)Zt.value+=qr[Lr].value;Zt.dice?Qe(Zt,ue,de,ht,de+=(Et-de)*Zt.value/Ei):Vt(Zt,ue,de,ue+=(ht-ue)*Zt.value/Ei,Et),Ei-=Zt.value}else ye._squarify=St=ir(Ie,ye,ue,de,ht,Et),St.ratio=Ie}return lt.ratio=function(ye){return Pe((ye=+ye)>1?ye:1)},lt}(Kt);e.cluster=u,e.hierarchy=_,e.pack=fe,e.packEnclose=U,e.packSiblings=Ee,e.partition=Xe,e.stratify=At,e.tree=Mt,e.treemap=Ot,e.treemapBinary=De,e.treemapDice=Qe,e.treemapResquarify=Fe,e.treemapSlice=Vt,e.treemapSliceDice=_e,e.treemapSquarify=fr,Object.defineProperty(e,"__esModule",{value:!0})})});var EE=Se(ME=>{"use strict";var eke=SE(),$kt=_u(),bA=Zr(),Qkt=fc().makeColorScaleFuncFromTrace,eCt=gA().makePullColorFn,tCt=gA().generateExtendedColors,rCt=fc().calc,iCt=ju().ALMOST_EQUAL,nCt={},aCt={},oCt={};ME.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=bA.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,u=bA.isArrayOrTypedArray(s),l=[],f={},c={},h=function(G,O){f[G]?f[G].push(O):f[G]=[O],c[O]=1},d=function(G){return G||typeof G=="number"},p=function(G){return!u||$kt(s[G])&&s[G]>=0},x,b,y;i?(x=Math.min(n.length,o.length),b=function(G){return d(n[G])&&p(G)},y=function(G){return String(n[G])}):(x=Math.min(a.length,o.length),b=function(G){return d(a[G])&&p(G)},y=function(G){return String(a[G])}),u&&(x=Math.min(x,s.length));for(var k=0;k<x;k++)if(b(k)){var E=y(k),A=d(o[k])?String(o[k]):"",L={i:k,id:E,pid:A,label:d(a[k])?String(a[k]):""};u&&(L.v=+s[k]),l.push(L),h(A,E)}if(f[""]){if(f[""].length>1){for(var M=bA.randstr(),v=0;v<l.length;v++)l[v].pid===""&&(l[v].pid=M);l.unshift({hasMultipleRoots:!0,id:M,pid:"",label:""})}}else{var _=[],C;for(C in f)c[C]||_.push(C);if(_.length===1)C=_[0],l.unshift({hasImpliedRoot:!0,id:C,pid:"",label:C});else return bA.warn(["Multiple implied roots, cannot build",t.type,"hierarchy of",t.name+".","These roots include:",_.join(", ")].join(" "))}var z;try{z=eke.stratify().id(function(G){return G.id}).parentId(function(G){return G.pid})(l)}catch(G){return bA.warn(["Failed to build",t.type,"hierarchy of",t.name+".","Error:",G.message].join(" "))}var T=eke.hierarchy(z),F=!1;if(u)switch(t.branchvalues){case"remainder":T.sum(function(G){return G.data.v});break;case"total":T.each(function(G){var O=G.data.data,W=O.v;if(G.children){var re=G.children.reduce(function(ne,be){return ne+be.data.data.v},0);if((O.hasImpliedRoot||O.hasMultipleRoots)&&(W=re),W<re*iCt)return F=!0,bA.warn(["Total value for node",G.data.data.id,"of",t.name,"is smaller than the sum of its children.",`
parent value =`,W,`
children sum =`,re].join(" "))}G.value=W});break}else tke(T,t,{branches:t.count.indexOf("branches")!==-1,leaves:t.count.indexOf("leaves")!==-1});if(!F){t.sort&&T.sort(function(G,O){return O.value-G.value});var q,U,H=t.marker.colors||[],j=!!H.length;return t._hasColorscale?(j||(H=u?t.values:t._values),rCt(e,t,{vals:H,containerStr:"marker",cLetter:"c"}),U=Qkt(t.marker)):q=eCt(r["_"+t.type+"colormap"]),T.each(function(G){var O=G.data.data;O.color=t._hasColorscale?U(H[O.i]):q(H[O.i],O.id)}),l[0].hierarchy=T,l}};ME._runCrossTraceCalc=function(e,t){var r=t._fullLayout,n=t.calcdata,i=r[e+"colorway"],a=r["_"+e+"colormap"];r["extend"+e+"colors"]&&(i=tCt(i,e==="icicle"?oCt:e==="treemap"?aCt:nCt));var o=0,s;function u(h){var d=h.data.data,p=d.id;d.color===!1&&(a[p]?d.color=a[p]:h.parent?h.parent.parent?d.color=h.parent.data.data.color:(a[p]=d.color=i[o%i.length],o++):d.color=s)}for(var l=0;l<n.length;l++){var f=n[l],c=f[0];c.trace.type===e&&c.hierarchy&&(s=c.trace.root.color,c.hierarchy.each(u))}};ME.crossTraceCalc=function(e){return ME._runCrossTraceCalc("sunburst",e)};function tke(e,t,r){var n=0,i=e.children;if(i){for(var a=i.length,o=0;o<a;o++)n+=tke(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 Xg(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function H_(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var pR=Qf(()=>{});function Vm(){}function ike(){return this.rgb().formatHex()}function pCt(){return this.rgb().formatHex8()}function vCt(){return fke(this).formatHsl()}function nke(){return this.rgb().formatRgb()}function W_(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=sCt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?ake(t):r===3?new xd(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?vR(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?vR(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=lCt.exec(e))?new xd(t[1],t[2],t[3],1):(t=uCt.exec(e))?new xd(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fCt.exec(e))?vR(t[1],t[2],t[3],t[4]):(t=cCt.exec(e))?vR(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hCt.exec(e))?lke(t[1],t[2]/100,t[3]/100,1):(t=dCt.exec(e))?lke(t[1],t[2]/100,t[3]/100,t[4]):rke.hasOwnProperty(e)?ake(rke[e]):e==="transparent"?new xd(NaN,NaN,NaN,0):null}function ake(e){return new xd(e>>16&255,e>>8&255,e&255,1)}function vR(e,t,r,n){return n<=0&&(e=t=r=NaN),new xd(e,t,r,n)}function CE(e){return e instanceof Vm||(e=W_(e)),e?(e=e.rgb(),new xd(e.r,e.g,e.b,e.opacity)):new xd}function TA(e,t,r,n){return arguments.length===1?CE(e):new xd(e,t,r,n==null?1:n)}function xd(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function oke(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}`}function yCt(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}${M2((isNaN(this.opacity)?1:this.opacity)*255)}`}function ske(){let e=mR(this.opacity);return`${e===1?"rgb(":"rgba("}${E2(this.r)}, ${E2(this.g)}, ${E2(this.b)}${e===1?")":`, ${e})`}`}function mR(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function E2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function M2(e){return e=E2(e),(e<16?"0":"")+e.toString(16)}function lke(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Zy(e,t,r,n)}function fke(e){if(e instanceof Zy)return new Zy(e.h,e.s,e.l,e.opacity);if(e instanceof Vm||(e=W_(e)),!e)return new Zy;if(e instanceof Zy)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,u=(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/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new Zy(o,s,u,e.opacity)}function LE(e,t,r,n){return arguments.length===1?fke(e):new Zy(e,t,r,n==null?1:n)}function Zy(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function uke(e){return e=(e||0)%360,e<0?e+360:e}function yR(e){return Math.max(0,Math.min(1,e||0))}function yj(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 G_,k2,wA,kE,Um,sCt,lCt,uCt,fCt,cCt,hCt,dCt,rke,gR=Qf(()=>{pR();G_=.7,k2=1/G_,wA="\\s*([+-]?\\d+)\\s*",kE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Um="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sCt=/^#([0-9a-f]{3,8})$/,lCt=new RegExp(`^rgb\\(${wA},${wA},${wA}\\)$`),uCt=new RegExp(`^rgb\\(${Um},${Um},${Um}\\)$`),fCt=new RegExp(`^rgba\\(${wA},${wA},${wA},${kE}\\)$`),cCt=new RegExp(`^rgba\\(${Um},${Um},${Um},${kE}\\)$`),hCt=new RegExp(`^hsl\\(${kE},${Um},${Um}\\)$`),dCt=new RegExp(`^hsla\\(${kE},${Um},${Um},${kE}\\)$`),rke={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};Xg(Vm,W_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ike,formatHex:ike,formatHex8:pCt,formatHsl:vCt,formatRgb:nke,toString:nke});Xg(xd,TA,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new xd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new xd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xd(E2(this.r),E2(this.g),E2(this.b),mR(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:oke,formatHex:oke,formatHex8:yCt,formatRgb:ske,toString:ske}));Xg(Zy,LE,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new Zy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new Zy(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 xd(yj(e>=240?e-240:e+120,i,n),yj(e,i,n),yj(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Zy(uke(this.h),yR(this.s),yR(this.l),mR(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=mR(this.opacity);return`${e===1?"hsl(":"hsla("}${uke(this.h)}, ${yR(this.s)*100}%, ${yR(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var _R,xR,mj=Qf(()=>{_R=Math.PI/180,xR=180/Math.PI});function yke(e){if(e instanceof Hm)return new Hm(e.l,e.a,e.b,e.opacity);if(e instanceof Yg)return mke(e);e instanceof xd||(e=CE(e));var t=bj(e.r),r=bj(e.g),n=bj(e.b),i=gj((.2225045*t+.7168786*r+.0606169*n)/hke),a,o;return t===r&&r===n?a=o=i:(a=gj((.4360747*t+.3850649*r+.1430804*n)/cke),o=gj((.0139322*t+.0971045*r+.7141733*n)/dke)),new Hm(116*i-16,500*(a-i),200*(i-o),e.opacity)}function SA(e,t,r,n){return arguments.length===1?yke(e):new Hm(e,t,r,n==null?1:n)}function Hm(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function gj(e){return e>mCt?Math.pow(e,1/3):e/vke+pke}function _j(e){return e>AA?e*e*e:vke*(e-pke)}function xj(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function bj(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function gCt(e){if(e instanceof Yg)return new Yg(e.h,e.c,e.l,e.opacity);if(e instanceof Hm||(e=yke(e)),e.a===0&&e.b===0)return new Yg(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*xR;return new Yg(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function zE(e,t,r,n){return arguments.length===1?gCt(e):new Yg(e,t,r,n==null?1:n)}function Yg(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function mke(e){if(isNaN(e.h))return new Hm(e.l,0,0,e.opacity);var t=e.h*_R;return new Hm(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}var bR,cke,hke,dke,pke,AA,vke,mCt,gke=Qf(()=>{pR();gR();mj();bR=18,cke=.96422,hke=1,dke=.82521,pke=4/29,AA=6/29,vke=3*AA*AA,mCt=AA*AA*AA;Xg(Hm,SA,H_(Vm,{brighter(e){return new Hm(this.l+bR*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Hm(this.l-bR*(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=cke*_j(t),e=hke*_j(e),r=dke*_j(r),new xd(xj(3.1338561*t-1.6168667*e-.4906146*r),xj(-.9787684*t+1.9161415*e+.033454*r),xj(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));Xg(Yg,zE,H_(Vm,{brighter(e){return new Yg(this.h,this.c,this.l+bR*(e==null?1:e),this.opacity)},darker(e){return new Yg(this.h,this.c,this.l-bR*(e==null?1:e),this.opacity)},rgb(){return mke(this).rgb()}}))});function _Ct(e){if(e instanceof C2)return new C2(e.h,e.s,e.l,e.opacity);e instanceof xd||(e=CE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(bke*n+_ke*t-xke*r)/(bke+_ke-xke),a=n-i,o=(PE*(r-i)-Tj*a)/wR,s=Math.sqrt(o*o+a*a)/(PE*i*(1-i)),u=s?Math.atan2(o,a)*xR-120:NaN;return new C2(u<0?u+360:u,s,i,e.opacity)}function MA(e,t,r,n){return arguments.length===1?_Ct(e):new C2(e,t,r,n==null?1:n)}function C2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var wke,wj,Tj,wR,PE,_ke,xke,bke,Tke=Qf(()=>{pR();gR();mj();wke=-.14861,wj=1.78277,Tj=-.29227,wR=-.90649,PE=1.97294,_ke=PE*wR,xke=PE*wj,bke=wj*Tj-wR*wke;Xg(C2,MA,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new C2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new C2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*_R,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new xd(255*(t+r*(wke*n+wj*i)),255*(t+r*(Tj*n+wR*i)),255*(t+r*(PE*n)),this.opacity)}}))});var L2=Qf(()=>{gR();gke();Tke()});function Aj(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 TR(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 Aj((r-n/t)*t,o,i,a,s)}}var AR=Qf(()=>{});function SR(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 Aj((r-n/t)*t,i,a,o,s)}}var Sj=Qf(()=>{AR()});var EA,Mj=Qf(()=>{EA=e=>()=>e});function Ake(e,t){return function(r){return e+r*t}}function xCt(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 j_(e,t){var r=t-e;return r?Ake(e,r>180||r<-180?r-360*Math.round(r/360):r):EA(isNaN(e)?t:e)}function Ske(e){return(e=+e)==1?ph:function(t,r){return r-t?xCt(t,r,e):EA(isNaN(t)?r:t)}}function ph(e,t){var r=t-e;return r?Ake(e,r):EA(isNaN(e)?t:e)}var z2=Qf(()=>{Mj()});function Mke(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=TA(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(u){return s.r=n(u),s.g=i(u),s.b=a(u),s+""}}}var IE,Eke,kke,Ej=Qf(()=>{L2();AR();Sj();z2();IE=function e(t){var r=Ske(t);function n(i,a){var o=r((i=TA(i)).r,(a=TA(a)).r),s=r(i.g,a.g),u=r(i.b,a.b),l=ph(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=u(f),i.opacity=l(f),i+""}}return n.gamma=e,n}(1);Eke=Mke(TR),kke=Mke(SR)});function kA(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 MR(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var ER=Qf(()=>{});function Cke(e,t){return(MR(t)?kA:kj)(e,t)}function kj(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]=Z_(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 Cj=Qf(()=>{DE();ER()});function kR(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var Lj=Qf(()=>{});function Fv(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var RE=Qf(()=>{});function CR(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]=Z_(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var zj=Qf(()=>{DE()});function bCt(e){return function(){return e}}function wCt(e){return function(t){return e(t)+""}}function LR(e,t){var r=Ij.lastIndex=Pj.lastIndex=0,n,i,a,o=-1,s=[],u=[];for(e=e+"",t=t+"";(n=Ij.exec(e))&&(i=Pj.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,u.push({i:o,x:Fv(n,i)})),r=Pj.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?u[0]?wCt(u[0].x):bCt(t):(t=u.length,function(l){for(var f=0,c;f<t;++f)s[(c=u[f]).i]=c.x(l);return s.join("")})}var Ij,Pj,Dj=Qf(()=>{RE();Ij=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Pj=new RegExp(Ij.source,"g")});function Z_(e,t){var r=typeof t,n;return t==null||r==="boolean"?EA(t):(r==="number"?Fv:r==="string"?(n=W_(t))?(t=n,IE):LR:t instanceof W_?IE:t instanceof Date?kR:MR(t)?kA:Array.isArray(t)?kj:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?CR:Fv)(e,t)}var DE=Qf(()=>{L2();Ej();Cj();Lj();RE();zj();Dj();Mj();ER()});function Lke(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var zke=Qf(()=>{});function Pke(e,t){var r=j_(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var Ike=Qf(()=>{z2()});function Dke(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var Rke=Qf(()=>{});function Rj(e,t,r,n,i,a){var o,s,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*r+t*n)&&(r-=e*u,n-=t*u),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,u/=s),e*n<t*r&&(e=-e,t=-t,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Fke,skewX:Math.atan(u)*Fke,scaleX:o,scaleY:s}}var Fke,zR,qke=Qf(()=>{Fke=180/Math.PI,zR={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function Bke(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zR:Rj(t.a,t.b,t.c,t.d,t.e,t.f)}function Oke(e){return e==null?zR:(PR||(PR=document.createElementNS("http://www.w3.org/2000/svg","g")),PR.setAttribute("transform",e),(e=PR.transform.baseVal.consolidate())?(e=e.matrix,Rj(e.a,e.b,e.c,e.d,e.e,e.f)):zR)}var PR,Nke=Qf(()=>{qke()});function Uke(e,t,r,n){function i(l){return l.length?l.pop()+" ":""}function a(l,f,c,h,d,p){if(l!==c||f!==h){var x=d.push("translate(",null,t,null,r);p.push({i:x-4,x:Fv(l,c)},{i:x-2,x:Fv(f,h)})}else(c||h)&&d.push("translate("+c+t+h+r)}function o(l,f,c,h){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),h.push({i:c.push(i(c)+"rotate(",null,n)-2,x:Fv(l,f)})):f&&c.push(i(c)+"rotate("+f+n)}function s(l,f,c,h){l!==f?h.push({i:c.push(i(c)+"skewX(",null,n)-2,x:Fv(l,f)}):f&&c.push(i(c)+"skewX("+f+n)}function u(l,f,c,h,d,p){if(l!==c||f!==h){var x=d.push(i(d)+"scale(",null,",",null,")");p.push({i:x-4,x:Fv(l,c)},{i:x-2,x:Fv(f,h)})}else(c!==1||h!==1)&&d.push(i(d)+"scale("+c+","+h+")")}return function(l,f){var c=[],h=[];return l=e(l),f=e(f),a(l.translateX,l.translateY,f.translateX,f.translateY,c,h),o(l.rotate,f.rotate,c,h),s(l.skewX,f.skewX,c,h),u(l.scaleX,l.scaleY,f.scaleX,f.scaleY,c,h),l=f=null,function(d){for(var p=-1,x=h.length,b;++p<x;)c[(b=h[p]).i]=b.x(d);return c.join("")}}}var Vke,Hke,Gke=Qf(()=>{RE();Nke();Vke=Uke(Bke,"px, ","px)","deg)"),Hke=Uke(Oke,", ",")",")")});function Wke(e){return((e=Math.exp(e))+1/e)/2}function ACt(e){return((e=Math.exp(e))-1/e)/2}function SCt(e){return((e=Math.exp(2*e))-1)/(e+1)}var TCt,jke,Zke=Qf(()=>{TCt=1e-12;jke=function e(t,r,n){function i(a,o){var s=a[0],u=a[1],l=a[2],f=o[0],c=o[1],h=o[2],d=f-s,p=c-u,x=d*d+p*p,b,y;if(x<TCt)y=Math.log(h/l)/t,b=function(C){return[s+C*d,u+C*p,l*Math.exp(t*C*y)]};else{var k=Math.sqrt(x),E=(h*h-l*l+n*x)/(2*l*r*k),A=(h*h-l*l-n*x)/(2*h*r*k),L=Math.log(Math.sqrt(E*E+1)-E),_=Math.log(Math.sqrt(A*A+1)-A);y=(_-L)/t,b=function(C){var M=C*y,v=Wke(L),z=l/(r*k)*(v*SCt(t*M+L)-ACt(L));return[s+z*d,u+z*p,l*v/Wke(t*M+L)]}}return b.duration=y*1e3*t/Math.SQRT2,b}return i.rho=function(a){var o=Math.max(.001,+a),s=o*o,u=s*s;return e(o,s,u)},i}(Math.SQRT2,2,4)});function Xke(e){return function(t,r){var n=e((t=LE(t)).h,(r=LE(r)).h),i=ph(t.s,r.s),a=ph(t.l,r.l),o=ph(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 Yke,Kke,Jke=Qf(()=>{L2();z2();Yke=Xke(j_),Kke=Xke(ph)});function Fj(e,t){var r=ph((e=SA(e)).l,(t=SA(t)).l),n=ph(e.a,t.a),i=ph(e.b,t.b),a=ph(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 $ke=Qf(()=>{L2();z2()});function Qke(e){return function(t,r){var n=e((t=zE(t)).h,(r=zE(r)).h),i=ph(t.c,r.c),a=ph(t.l,r.l),o=ph(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 eCe,tCe,rCe=Qf(()=>{L2();z2();eCe=Qke(j_),tCe=Qke(ph)});function iCe(e){return function t(r){r=+r;function n(i,a){var o=e((i=MA(i)).h,(a=MA(a)).h),s=ph(i.s,a.s),u=ph(i.l,a.l),l=ph(i.opacity,a.opacity);return function(f){return i.h=o(f),i.s=s(f),i.l=u(Math.pow(f,r)),i.opacity=l(f),i+""}}return n.gamma=t,n}(1)}var nCe,aCe,oCe=Qf(()=>{L2();z2();nCe=iCe(j_),aCe=iCe(ph)});function qj(e,t){t===void 0&&(t=e,e=Z_);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 sCe=Qf(()=>{DE()});function lCe(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r}var uCe=Qf(()=>{});var P2={};Eet(P2,{interpolate:()=>Z_,interpolateArray:()=>Cke,interpolateBasis:()=>TR,interpolateBasisClosed:()=>SR,interpolateCubehelix:()=>nCe,interpolateCubehelixLong:()=>aCe,interpolateDate:()=>kR,interpolateDiscrete:()=>Lke,interpolateHcl:()=>eCe,interpolateHclLong:()=>tCe,interpolateHsl:()=>Yke,interpolateHslLong:()=>Kke,interpolateHue:()=>Pke,interpolateLab:()=>Fj,interpolateNumber:()=>Fv,interpolateNumberArray:()=>kA,interpolateObject:()=>CR,interpolateRgb:()=>IE,interpolateRgbBasis:()=>Eke,interpolateRgbBasisClosed:()=>kke,interpolateRound:()=>Dke,interpolateString:()=>LR,interpolateTransformCss:()=>Vke,interpolateTransformSvg:()=>Hke,interpolateZoom:()=>jke,piecewise:()=>qj,quantize:()=>lCe});var I2=Qf(()=>{DE();Cj();AR();Sj();Lj();zke();Ike();RE();ER();zj();Rke();Dj();Gke();Zke();Ej();Jke();$ke();rCe();oCe();sCe();uCe()});var IR=Se((Mpr,fCe)=>{"use strict";var MCt=yu(),ECt=Pl();fCe.exports=function(t,r,n,i,a){var o=r.data.data,s=o.i,u=a||o.color;if(s>=0){r.i=o.i;var l=n.marker;l.pattern?(!l.colors||!l.pattern.shape)&&(l.color=u,r.color=u):(l.color=u,r.color=u),MCt.pointStyle(t,n,i,r)}else ECt.fill(t,u)}});var Bj=Se((Epr,vCe)=>{"use strict";var cCe=Nl(),hCe=Pl(),dCe=Zr(),kCt=bp().resizeText,CCt=IR();function LCt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");kCt(e,t,"sunburst"),t.each(function(r){var n=cCe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){cCe.select(this).call(pCe,o,a,e)})})}function pCe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=dCe.castOption(r,o,"marker.line.color")||hCe.defaultLine,u=dCe.castOption(r,o,"marker.line.width")||0;e.call(CCt,t,r,n).style("stroke-width",u).call(hCe.stroke,s).style("opacity",a?r.leaf.opacity:null)}vCe.exports={style:LCt,styleOne:pCe}});var Kg=Se(uf=>{"use strict";var D2=Zr(),zCt=Pl(),PCt=Ty(),yCe=l_();uf.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(uf.getPtId(n)===t)return r=n.copy()}),r||e};uf.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(uf.getPtId(o)===t)return r=n.copy()}}),r||e};uf.isEntry=function(e){return!e.parent};uf.isLeaf=function(e){return!e.children};uf.getPtId=function(e){return e.data.data.id};uf.getPtLabel=function(e){return e.data.data.label};uf.getValue=function(e){return e.value};uf.isHierarchyRoot=function(e){return mCe(e)===""};uf.setSliceCursor=function(e,t,r){var n=r.isTransitioning;if(!n){var i=e.datum();n=r.hideOnRoot&&uf.isHierarchyRoot(i)||r.hideOnLeaves&&uf.isLeaf(i)}PCt(e,n?null:"pointer")};function ICt(e,t,r){return{color:uf.getOutsideTextFontKey("color",e,t,r),family:uf.getOutsideTextFontKey("family",e,t,r),size:uf.getOutsideTextFontKey("size",e,t,r),weight:uf.getOutsideTextFontKey("weight",e,t,r),style:uf.getOutsideTextFontKey("style",e,t,r),variant:uf.getOutsideTextFontKey("variant",e,t,r),textcase:uf.getOutsideTextFontKey("textcase",e,t,r),lineposition:uf.getOutsideTextFontKey("lineposition",e,t,r),shadow:uf.getOutsideTextFontKey("shadow",e,t,r)}}function DCt(e,t,r,n){var i=(n||{}).onPathbar,a=t.data.data,o=a.i,s=D2.castOption(e,o,(i?"pathbar.textfont":"insidetextfont")+".color");return!s&&e._input.textfont&&(s=D2.castOption(e._input,o,"textfont.color")),{color:s||zCt.contrast(a.color),family:uf.getInsideTextFontKey("family",e,t,r,n),size:uf.getInsideTextFontKey("size",e,t,r,n),weight:uf.getInsideTextFontKey("weight",e,t,r,n),style:uf.getInsideTextFontKey("style",e,t,r,n),variant:uf.getInsideTextFontKey("variant",e,t,r,n),textcase:uf.getInsideTextFontKey("textcase",e,t,r,n),lineposition:uf.getInsideTextFontKey("lineposition",e,t,r,n),shadow:uf.getInsideTextFontKey("shadow",e,t,r,n)}}uf.getInsideTextFontKey=function(e,t,r,n,i){var a=(i||{}).onPathbar,o=a?"pathbar.textfont":"insidetextfont",s=r.data.data.i;return D2.castOption(t,s,o+"."+e)||D2.castOption(t,s,"textfont."+e)||n.size};uf.getOutsideTextFontKey=function(e,t,r,n){var i=r.data.data.i;return D2.castOption(t,i,"outsidetextfont."+e)||D2.castOption(t,i,"textfont."+e)||n.size};uf.isOutsideText=function(e,t){return!e._hasColorscale&&uf.isHierarchyRoot(t)};uf.determineTextFont=function(e,t,r,n){return uf.isOutsideText(e,t)?ICt(e,t,r):DCt(e,t,r,n)};uf.hasTransition=function(e){return!!(e&&e.duration>0)};uf.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};uf.isHeader=function(e,t){return!(uf.isLeaf(e)||e.depth===t._maxDepth-1)};function mCe(e){return e.data.data.pid}uf.getParent=function(e,t){return uf.findEntryWithLevel(e,mCe(t))};uf.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return uf.listPath(r,t).concat(n)};uf.getPath=function(e){return uf.listPath(e,"label").join("/")+"/"};uf.formatValue=yCe.formatPieValue;uf.formatPercent=function(e,t){var r=D2.formatPercent(e,0);return r==="0%"&&(r=yCe.formatPiePercent(e,t)),r}});var BE=Se((Cpr,xCe)=>{"use strict";var CA=Nl(),gCe=Ul(),RCt=rv().appendArrayPointValue,FE=jc(),_Ce=Zr(),FCt=y3(),ad=Kg(),qCt=l_(),BCt=qCt.formatPieValue;xCe.exports=function(t,r,n,i,a){var o=i[0],s=o.trace,u=o.hierarchy,l=s.type==="sunburst",f=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var c=function(p){var x=n._fullLayout;if(!(n._dragging||x.hovermode===!1)){var b=n._fullData[s.index],y=p.data.data,k=y.i,E=ad.isHierarchyRoot(p),A=ad.getParent(u,p),L=ad.getValue(p),_=function(ze){return _Ce.castOption(b,k,ze)},C=_("hovertemplate"),M=FE.castHoverinfo(b,x,k),v=x.separators,z;if(C||M&&M!=="none"&&M!=="skip"){var T,F;l&&(T=o.cx+p.pxmid[0]*(1-p.rInscribed),F=o.cy+p.pxmid[1]*(1-p.rInscribed)),f&&(T=p._hoverX,F=p._hoverY);var q={},U=[],H=[],j=function(ze){return U.indexOf(ze)!==-1};M&&(U=M==="all"?b._module.attributes.hoverinfo.flags:M.split("+")),q.label=y.label,j("label")&&q.label&&H.push(q.label),y.hasOwnProperty("v")&&(q.value=y.v,q.valueLabel=BCt(q.value,v),j("value")&&H.push(q.valueLabel)),q.currentPath=p.currentPath=ad.getPath(p.data),j("current path")&&!E&&H.push(q.currentPath);var G,O=[],W=function(){O.indexOf(G)===-1&&(H.push(G),O.push(G))};q.percentParent=p.percentParent=L/ad.getValue(A),q.parent=p.parentString=ad.getPtLabel(A),j("percent parent")&&(G=ad.formatPercent(q.percentParent,v)+" of "+q.parent,W()),q.percentEntry=p.percentEntry=L/ad.getValue(r),q.entry=p.entry=ad.getPtLabel(r),j("percent entry")&&!E&&!p.onPathbar&&(G=ad.formatPercent(q.percentEntry,v)+" of "+q.entry,W()),q.percentRoot=p.percentRoot=L/ad.getValue(u),q.root=p.root=ad.getPtLabel(u),j("percent root")&&!E&&(G=ad.formatPercent(q.percentRoot,v)+" of "+q.root,W()),q.text=_("hovertext")||_("text"),j("text")&&(G=q.text,_Ce.isValidTextValue(G)&&H.push(G)),z=[qE(p,b,a.eventDataKeys)];var re={trace:b,y:F,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:H.join("<br>"),name:C||j("name")?b.name:void 0,color:_("hoverlabel.bgcolor")||y.color,borderColor:_("hoverlabel.bordercolor"),fontFamily:_("hoverlabel.font.family"),fontSize:_("hoverlabel.font.size"),fontColor:_("hoverlabel.font.color"),fontWeight:_("hoverlabel.font.weight"),fontStyle:_("hoverlabel.font.style"),fontVariant:_("hoverlabel.font.variant"),nameLength:_("hoverlabel.namelength"),textAlign:_("hoverlabel.align"),hovertemplate:C,hovertemplateLabels:q,eventData:z};l&&(re.x0=T-p.rInscribed*p.rpx1,re.x1=T+p.rInscribed*p.rpx1,re.idealAlign=p.pxmid[0]<0?"left":"right"),f&&(re.x=T,re.idealAlign=T<0?"left":"right");var ne=[];FE.loneHover(re,{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:n,inOut_bbox:ne}),z[0].bbox=ne[0],s._hasHoverLabel=!0}if(f){var be=t.select("path.surface");a.styleOne(be,p,b,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:z||[qE(p,b,a.eventDataKeys)],event:CA.event})}},h=function(p){var x=n._fullLayout,b=n._fullData[s.index],y=CA.select(this).datum();if(s._hasHoverEvent&&(p.originalEvent=CA.event,n.emit("plotly_unhover",{points:[qE(y,b,a.eventDataKeys)],event:CA.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(FE.loneUnhover(x._hoverlayer.node()),s._hasHoverLabel=!1),f){var k=t.select("path.surface");a.styleOne(k,y,b,n,{hovered:!1})}},d=function(p){var x=n._fullLayout,b=n._fullData[s.index],y=l&&(ad.isHierarchyRoot(p)||ad.isLeaf(p)),k=ad.getPtId(p),E=ad.isEntry(p)?ad.findEntryWithChild(u,k):ad.findEntryWithLevel(u,k),A=ad.getPtId(E),L={points:[qE(p,b,a.eventDataKeys)],event:CA.event};y||(L.nextLevel=A);var _=FCt.triggerHandler(n,"plotly_"+s.type+"click",L);if(_!==!1&&x.hovermode&&(n._hoverdata=[qE(p,b,a.eventDataKeys)],FE.click(n,CA.event)),!y&&_!==!1&&!n._dragging&&!n._transitioning){gCe.call("_storeDirectGUIEdit",b,x._tracePreGUI[b.uid],{level:b.level});var C={data:[{level:A}],traces:[s.index]},M={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};FE.loneUnhover(x._hoverlayer.node()),gCe.call("animate",n,C,M)}};t.on("mouseover",c),t.on("mouseout",h),t.on("click",d)};function qE(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&&!ad.isHierarchyRoot(e)&&(i.parent=e.parentString),RCt(i,t,n.i),i}});var RR=Se(DR=>{"use strict";var OE=Nl(),OCt=SE(),Xy=(I2(),ab(P2)).interpolate,bCe=yu(),Tp=Zr(),NCt=Bf(),SCe=bp(),wCe=SCe.recordMinTextSize,UCt=SCe.clearMinTextSize,MCe=hR(),VCt=l_().getRotationAngle,HCt=MCe.computeTransform,GCt=MCe.transformInsideText,WCt=Bj().styleOne,jCt=N0().resizeText,ZCt=BE(),Oj=pj(),kf=Kg();DR.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,u=!r,l=!i.uniformtext.mode&&kf.hasTransition(r);if(UCt("sunburst",i),o=a.selectAll("g.trace.sunburst").data(t,function(c){return c[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),l){n&&(s=n());var f=OE.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});f.each(function(){a.selectAll("g.trace").each(function(c){TCe(e,c,this,r)})})}else o.each(function(c){TCe(e,c,this,r)}),i.uniformtext.mode&&jCt(e,i._sunburstlayer.selectAll(".trace"),"sunburst");u&&o.exit().remove()};function TCe(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&kf.hasTransition(n),s=OE.select(r),u=s.selectAll("g.slice"),l=t[0],f=l.trace,c=l.hierarchy,h=kf.findEntryWithLevel(c,f.level),d=kf.getMaxDepth(f),p=a._size,x=f.domain,b=p.w*(x.x[1]-x.x[0]),y=p.h*(x.y[1]-x.y[0]),k=.5*Math.min(b,y),E=l.cx=p.l+p.w*(x.x[1]+x.x[0])/2,A=l.cy=p.t+p.h*(1-x.y[0])-y/2;if(!h)return u.remove();var L=null,_={};o&&u.each(function(he){_[kf.getPtId(he)]={rpx0:he.rpx0,rpx1:he.rpx1,x0:he.x0,x1:he.x1,transform:he.transform},!L&&kf.isEntry(he)&&(L=he)});var C=XCt(h).descendants(),M=h.height+1,v=0,z=d;l.hasMultipleRoots&&kf.isHierarchyRoot(h)&&(C=C.slice(1),M-=1,v=1,z+=1),C=C.filter(function(he){return he.y1<=z});var T=VCt(f.rotation);T&&C.forEach(function(he){he.x0+=T,he.x1+=T});var F=Math.min(M,d),q=function(he){return(he-v)/F*k},U=function(he,te){return[he*Math.cos(te),-he*Math.sin(te)]},H=function(he){return Tp.pathAnnulus(he.rpx0,he.rpx1,he.x0,he.x1,E,A)},j=function(he){return E+ACe(he)[0]*(he.transform.rCenter||0)+(he.transform.x||0)},G=function(he){return A+ACe(he)[1]*(he.transform.rCenter||0)+(he.transform.y||0)};u=u.data(C,kf.getPtId),u.enter().append("g").classed("slice",!0),o?u.exit().transition().each(function(){var he=OE.select(this),te=he.select("path.surface");te.transition().attrTween("d",function(Ee){var Me=ne(Ee);return function(Oe){return H(Me(Oe))}});var ke=he.select("g.slicetext");ke.attr("opacity",0)}).remove():u.exit().remove(),u.order();var O=null;if(o&&L){var W=kf.getPtId(L);u.each(function(he){O===null&&kf.getPtId(he)===W&&(O=he.x1)})}var re=u;o&&(re=re.transition().each("end",function(){var he=OE.select(this);kf.setSliceCursor(he,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),re.each(function(he){var te=OE.select(this),ke=Tp.ensureSingle(te,"path","surface",function(Be){Be.style("pointer-events",i?"none":"all")});he.rpx0=q(he.y0),he.rpx1=q(he.y1),he.xmid=(he.x0+he.x1)/2,he.pxmid=U(he.rpx1,he.xmid),he.midangle=-(he.xmid-Math.PI/2),he.startangle=-(he.x0-Math.PI/2),he.stopangle=-(he.x1-Math.PI/2),he.halfangle=.5*Math.min(Tp.angleDelta(he.x0,he.x1)||Math.PI,Math.PI),he.ring=1-he.rpx0/he.rpx1,he.rInscribed=YCt(he,f),o?ke.transition().attrTween("d",function(Be){var fe=be(Be);return function(Ze){return H(fe(Ze))}}):ke.attr("d",H),te.call(ZCt,h,e,t,{eventDataKeys:Oj.eventDataKeys,transitionTime:Oj.CLICK_TRANSITION_TIME,transitionEasing:Oj.CLICK_TRANSITION_EASING}).call(kf.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),ke.call(WCt,he,f,e);var Ee=Tp.ensureSingle(te,"g","slicetext"),Me=Tp.ensureSingle(Ee,"text","",function(Be){Be.attr("data-notex",1)}),Oe=Tp.ensureUniformFontSize(e,kf.determineTextFont(f,he,a.font));Me.text(DR.formatSliceLabel(he,h,f,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(bCe.font,Oe).call(NCt.convertToTspans,e);var Re=bCe.bBox(Me.node());he.transform=GCt(Re,he,l),he.transform.targetX=j(he),he.transform.targetY=G(he);var me=function(Be,fe){var Ze=Be.transform;return HCt(Ze,fe),Ze.fontSize=Oe.size,wCe(f.type,Ze,a),Tp.getTextTransform(Ze)};o?Me.transition().attrTween("transform",function(Be){var fe=ze(Be);return function(Ze){return me(fe(Ze),Re)}}):Me.attr("transform",me(he,Re))});function ne(he){var te=kf.getPtId(he),ke=_[te],Ee=_[kf.getPtId(h)],Me;if(Ee){var Oe=(he.x1>Ee.x1?2*Math.PI:0)+T;Me=he.rpx1<Ee.rpx1?{x0:he.x0,x1:he.x1,rpx0:0,rpx1:0}:{x0:Oe,x1:Oe,rpx0:he.rpx0,rpx1:he.rpx1}}else{var Re,me=kf.getPtId(he.parent);u.each(function(gt){if(kf.getPtId(gt)===me)return Re=gt});var Be=Re.children,fe;Be.forEach(function(gt,Pt){if(kf.getPtId(gt)===te)return fe=Pt});var Ze=Be.length,et=Xy(Re.x0,Re.x1);Me={rpx0:k,rpx1:k,x0:et(fe/Ze),x1:et((fe+1)/Ze)}}return Xy(ke,Me)}function be(he){var te=_[kf.getPtId(he)],ke,Ee={x0:he.x0,x1:he.x1,rpx0:he.rpx0,rpx1:he.rpx1};if(te)ke=te;else if(L)if(he.parent)if(O){var Me=(he.x1>O?2*Math.PI:0)+T;ke={x0:Me,x1:Me}}else ke={rpx0:k,rpx1:k},Tp.extendFlat(ke,Ce(he));else ke={rpx0:0,rpx1:0};else ke={x0:T,x1:T};return Xy(ke,Ee)}function ze(he){var te=_[kf.getPtId(he)],ke,Ee=he.transform;if(te)ke=te;else if(ke={rpx1:he.rpx1,transform:{textPosAngle:Ee.textPosAngle,scale:0,rotate:Ee.rotate,rCenter:Ee.rCenter,x:Ee.x,y:Ee.y}},L)if(he.parent)if(O){var Me=he.x1>O?2*Math.PI:0;ke.x0=ke.x1=Me}else Tp.extendFlat(ke,Ce(he));else ke.x0=ke.x1=T;else ke.x0=ke.x1=T;var Oe=Xy(ke.transform.textPosAngle,he.transform.textPosAngle),Re=Xy(ke.rpx1,he.rpx1),me=Xy(ke.x0,he.x0),Be=Xy(ke.x1,he.x1),fe=Xy(ke.transform.scale,Ee.scale),Ze=Xy(ke.transform.rotate,Ee.rotate),et=Ee.rCenter===0?3:ke.transform.rCenter===0?1/3:1,gt=Xy(ke.transform.rCenter,Ee.rCenter),Pt=function(Qe){return gt(Math.pow(Qe,et))};return function(Qe){var Xe=Re(Qe),Tt=me(Qe),xt=Be(Qe),_t=Pt(Qe),Ct=U(Xe,(Tt+xt)/2),jt=Oe(Qe),At={pxmid:Ct,rpx1:Xe,transform:{textPosAngle:jt,rCenter:_t,x:Ee.x,y:Ee.y}};return wCe(f.type,Ee,a),{transform:{targetX:j(At),targetY:G(At),scale:fe(Qe),rotate:Ze(Qe),rCenter:_t}}}}function Ce(he){var te=he.parent,ke=_[kf.getPtId(te)],Ee={};if(ke){var Me=te.children,Oe=Me.indexOf(he),Re=Me.length,me=Xy(ke.x0,ke.x1);Ee.x0=me(Oe/Re),Ee.x1=me(Oe/Re)}else Ee.x0=Ee.x1=0;return Ee}}function XCt(e){return OCt.partition().size([2*Math.PI,e.height+1])(e)}DR.formatSliceLabel=function(e,t,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o==="none"))return"";var s=i.separators,u=n[0],l=e.data.data,f=u.hierarchy,c=kf.isHierarchyRoot(e),h=kf.getParent(f,e),d=kf.getValue(e);if(!a){var p=o.split("+"),x=function(v){return p.indexOf(v)!==-1},b=[],y;if(x("label")&&l.label&&b.push(l.label),l.hasOwnProperty("v")&&x("value")&&b.push(kf.formatValue(l.v,s)),!c){x("current path")&&b.push(kf.getPath(e.data));var k=0;x("percent parent")&&k++,x("percent entry")&&k++,x("percent root")&&k++;var E=k>1;if(k){var A,L=function(v){y=kf.formatPercent(A,s),E&&(y+=" of "+v),b.push(y)};x("percent parent")&&!c&&(A=d/kf.getValue(h),L("parent")),x("percent entry")&&(A=d/kf.getValue(t),L("entry")),x("percent root")&&(A=d/kf.getValue(f),L("root"))}}return x("text")&&(y=Tp.castOption(r,l.i,"text"),Tp.isValidTextValue(y)&&b.push(y)),b.join("<br>")}var _=Tp.castOption(r,l.i,"texttemplate");if(!_)return"";var C={};l.label&&(C.label=l.label),l.hasOwnProperty("v")&&(C.value=l.v,C.valueLabel=kf.formatValue(l.v,s)),C.currentPath=kf.getPath(e.data),c||(C.percentParent=d/kf.getValue(h),C.percentParentLabel=kf.formatPercent(C.percentParent,s),C.parent=kf.getPtLabel(h)),C.percentEntry=d/kf.getValue(t),C.percentEntryLabel=kf.formatPercent(C.percentEntry,s),C.entry=kf.getPtLabel(t),C.percentRoot=d/kf.getValue(f),C.percentRootLabel=kf.formatPercent(C.percentRoot,s),C.root=kf.getPtLabel(f),l.hasOwnProperty("color")&&(C.color=l.color);var M=Tp.castOption(r,l.i,"text");return(Tp.isValidTextValue(M)||M==="")&&(C.text=M),C.customdata=Tp.castOption(r,l.i,"customdata"),Tp.texttemplateString(_,C,i._d3locale,C,r._meta||{})};function YCt(e){return e.rpx0===0&&Tp.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function ACe(e){return KCt(e.rpx1,e.transform.textPosAngle)}function KCt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var kCe=Se((zpr,ECe)=>{"use strict";ECe.exports={moduleType:"trace",name:"sunburst",basePlotModule:VEe(),categories:[],animatable:!0,attributes:AE(),layoutAttributes:vj(),supplyDefaults:KEe(),supplyLayoutDefaults:$Ee(),calc:EE().calc,crossTraceCalc:EE().crossTraceCalc,plot:RR().plot,style:Bj().style,colorbar:ep(),meta:{}}});var LCe=Se((Ppr,CCe)=>{"use strict";CCe.exports=kCe()});var PCe=Se(LA=>{"use strict";var zCe=Ac();LA.name="treemap";LA.plot=function(e,t,r,n){zCe.plotBasePlot(LA.name,e,t,r,n)};LA.clean=function(e,t,r,n){zCe.cleanBasePlot(LA.name,e,t,r,n)}});var R2=Se((Dpr,ICe)=>{"use strict";ICe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var FR=Se((Rpr,RCe)=>{"use strict";var JCt=Du().hovertemplateAttrs,$Ct=Du().texttemplateAttrs,QCt=Xf(),eLt=Ec().attributes,F2=A2(),Q0=AE(),DCe=R2(),Nj=vu().extendFlat,tLt=Id().pattern;RCe.exports={labels:Q0.labels,parents:Q0.parents,values:Q0.values,branchvalues:Q0.branchvalues,count:Q0.count,level:Q0.level,maxdepth:Q0.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:Nj({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:Q0.marker.colors,pattern:tLt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Q0.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},QCt("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:Nj({},F2.textfont,{}),editType:"calc"},text:F2.text,textinfo:Q0.textinfo,texttemplate:$Ct({editType:"plot"},{keys:DCe.eventDataKeys.concat(["label","value"])}),hovertext:F2.hovertext,hoverinfo:Q0.hoverinfo,hovertemplate:JCt({},{keys:DCe.eventDataKeys}),textfont:F2.textfont,insidetextfont:F2.insidetextfont,outsidetextfont:Nj({},F2.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:F2.sort,root:Q0.root,domain:eLt({name:"treemap",trace:!0,editType:"calc"})}});var Uj=Se((Fpr,FCe)=>{"use strict";FCe.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var NCe=Se((qpr,OCe)=>{"use strict";var qCe=Zr(),rLt=FR(),iLt=Pl(),nLt=Ec().defaults,aLt=r0().handleText,oLt=Qb().TEXTPAD,sLt=S2().handleMarkerDefaults,BCe=fc(),lLt=BCe.hasColorscale,uLt=BCe.handleDefaults;OCe.exports=function(t,r,n,i){function a(b,y){return qCe.coerce(t,r,rLt,b,y)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var u=a("values");u&&u.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var l=a("tiling.packing");l==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var f=a("text");a("texttemplate"),r.texttemplate||a("textinfo",qCe.isArrayOrTypedArray(f)?"text+label":"label"),a("hovertext"),a("hovertemplate");var c=a("pathbar.visible"),h="auto";aLt(t,r,i,a,h,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition");var d=r.textposition.indexOf("bottom")!==-1;sLt(t,r,i,a);var p=r._hasColorscale=lLt(t,"marker","colors")||(t.marker||{}).coloraxis;p?uLt(t,r,i,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var x=r.textfont.size*2;a("marker.pad.t",d?x/4:x),a("marker.pad.l",x/4),a("marker.pad.r",x/4),a("marker.pad.b",d?x:x/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:iLt.contrast(i.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*oLt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),nLt(r,i,a),r._length=null}});var VCe=Se((Bpr,UCe)=>{"use strict";var fLt=Zr(),cLt=Uj();UCe.exports=function(t,r){function n(i,a){return fLt.coerce(t,r,cLt,i,a)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var Hj=Se(Vj=>{"use strict";var HCe=EE();Vj.calc=function(e,t){return HCe.calc(e,t)};Vj.crossTraceCalc=function(e){return HCe._runCrossTraceCalc("treemap",e)}});var Gj=Se((Npr,GCe)=>{"use strict";GCe.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 Wj=Se((Upr,WCe)=>{"use strict";var zA=SE(),hLt=Gj();WCe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.packing==="dice-slice",s=n.pad[a?"bottom":"top"],u=n.pad[i?"right":"left"],l=n.pad[i?"left":"right"],f=n.pad[a?"top":"bottom"],c;o&&(c=u,u=s,s=c,c=l,l=f,f=c);var h=zA.treemap().tile(dLt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(u).paddingRight(l).paddingTop(s).paddingBottom(f).size(o?[r[1],r[0]]:r)(t);return(o||i||a)&&hLt(h,r,{swapXY:o,flipX:i,flipY:a}),h};function dLt(e,t){switch(e){case"squarify":return zA.treemapSquarify.ratio(t);case"binary":return zA.treemapBinary;case"dice":return zA.treemapDice;case"slice":return zA.treemapSlice;default:return zA.treemapSliceDice}}});var qR=Se((Vpr,YCe)=>{"use strict";var jCe=Nl(),PA=Pl(),ZCe=Zr(),jj=Kg(),pLt=bp().resizeText,vLt=IR();function yLt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");pLt(e,t,"treemap"),t.each(function(r){var n=jCe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){jCe.select(this).call(XCe,o,a,e,{hovered:!1})})})}function XCe(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,u,l,f=o.color,c=jj.isHierarchyRoot(t),h=1;if(a)u=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(c&&f===r.root.color)h=100,u="rgba(0,0,0,0)",l=0;else if(u=ZCe.castOption(r,s,"marker.line.color")||PA.defaultLine,l=ZCe.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var p=PA.combine(PA.addOpacity(r._backgroundColor,.75),f),x;if(d===!0){var b=jj.getMaxDepth(r);isFinite(b)?jj.isLeaf(t)?x=0:x=r._maxVisibleLayers-(t.data.depth-r._entryDepth):x=t.data.height+1}else x=t.data.depth-r._entryDepth,r._atRootLevel||x++;if(x>0)for(var y=0;y<x;y++){var k=.5*y/x;f=PA.combine(PA.addOpacity(p,k),f)}}}e.call(vLt,t,r,n,f).style("stroke-width",l).call(PA.stroke,u).style("opacity",h)}YCe.exports={style:yLt,styleOne:XCe}});var eLe=Se((Hpr,QCe)=>{"use strict";var KCe=Nl(),BR=Zr(),JCe=yu(),mLt=Bf(),gLt=Wj(),$Ce=qR().styleOne,Zj=R2(),IA=Kg(),_Lt=BE(),Xj=!0;QCe.exports=function(t,r,n,i,a){var o=a.barDifY,s=a.width,u=a.height,l=a.viewX,f=a.viewY,c=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,p=a.hasTransition,x=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,y=a.makeUpdateTextInterpolator,k={},E=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=L.hierarchy,M=s/_._entryDepth,v=IA.listPath(n.data,"id"),z=gLt(C.copy(),[s,u],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();z=z.filter(function(F){var q=v.indexOf(F.data.id);return q===-1?!1:(F.x0=M*q,F.x1=M*(q+1),F.y0=o,F.y1=o+u,F.onPathbar=!0,!0)}),z.reverse(),i=i.data(z,IA.getPtId),i.enter().append("g").classed("pathbar",!0),x(i,Xj,k,[s,u],c),i.order();var T=i;p&&(T=T.transition().each("end",function(){var F=KCe.select(this);IA.setSliceCursor(F,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),T.each(function(F){F._x0=l(F.x0),F._x1=l(F.x1),F._y0=f(F.y0),F._y1=f(F.y1),F._hoverX=l(F.x1-Math.min(s,u)/2),F._hoverY=f(F.y1-u/2);var q=KCe.select(this),U=BR.ensureSingle(q,"path","surface",function(O){O.style("pointer-events",E?"none":"all")});p?U.transition().attrTween("d",function(O){var W=b(O,Xj,k,[s,u]);return function(re){return c(W(re))}}):U.attr("d",c),q.call(_Lt,n,t,r,{styleOne:$Ce,eventDataKeys:Zj.eventDataKeys,transitionTime:Zj.CLICK_TRANSITION_TIME,transitionEasing:Zj.CLICK_TRANSITION_EASING}).call(IA.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),U.call($Ce,F,_,t,{hovered:!1}),F._text=(IA.getPtLabel(F)||"").split("<br>").join(" ")||"";var H=BR.ensureSingle(q,"g","slicetext"),j=BR.ensureSingle(H,"text","",function(O){O.attr("data-notex",1)}),G=BR.ensureUniformFontSize(t,IA.determineTextFont(_,F,A.font,{onPathbar:!0}));j.text(F._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(JCe.font,G).call(mLt.convertToTspans,t),F.textBB=JCe.bBox(j.node()),F.transform=h(F,{fontSize:G.size,onPathbar:!0}),F.transform.fontSize=G.size,p?j.transition().attrTween("transform",function(O){var W=y(O,Xj,k,[s,u]);return function(re){return d(W(re))}}):j.attr("transform",d(F))})}});var nLe=Se((Gpr,iLe)=>{"use strict";var tLe=Nl(),Yj=(I2(),ab(P2)).interpolate,X_=Kg(),NE=Zr(),rLe=Qb().TEXTPAD,xLt=i2(),bLt=xLt.toMoveInsideBar,wLt=bp(),Kj=wLt.recordMinTextSize,TLt=R2(),ALt=eLe();function q2(e){return X_.isHierarchyRoot(e)?"":X_.getPtId(e)}iLe.exports=function(t,r,n,i,a){var o=t._fullLayout,s=r[0],u=s.trace,l=u.type,f=l==="icicle",c=s.hierarchy,h=X_.findEntryWithLevel(c,u.level),d=tLe.select(n),p=d.selectAll("g.pathbar"),x=d.selectAll("g.slice");if(!h){p.remove(),x.remove();return}var b=X_.isHierarchyRoot(h),y=!o.uniformtext.mode&&X_.hasTransition(i),k=X_.getMaxDepth(u),E=function(Te){return Te.data.depth-h.data.depth<k},A=o._size,L=u.domain,_=A.w*(L.x[1]-L.x[0]),C=A.h*(L.y[1]-L.y[0]),M=_,v=u.pathbar.thickness,z=u.marker.line.width+TLt.gapWithPathbar,T=u.pathbar.visible?u.pathbar.side.indexOf("bottom")>-1?C+z:-(v+z):0,F={x0:M,x1:M,y0:T,y1:T+v},q=function(Te,nt,ut){var ct=u.tiling.pad,rt=function(Mt){return Mt-ct<=nt.x0},je=function(Mt){return Mt+ct>=nt.x1},tt=function(Mt){return Mt-ct<=nt.y0},Je=function(Mt){return Mt+ct>=nt.y1};return Te.x0===nt.x0&&Te.x1===nt.x1&&Te.y0===nt.y0&&Te.y1===nt.y1?{x0:Te.x0,x1:Te.x1,y0:Te.y0,y1:Te.y1}:{x0:rt(Te.x0-ct)?0:je(Te.x0-ct)?ut[0]:Te.x0,x1:rt(Te.x1+ct)?0:je(Te.x1+ct)?ut[0]:Te.x1,y0:tt(Te.y0-ct)?0:Je(Te.y0-ct)?ut[1]:Te.y0,y1:tt(Te.y1+ct)?0:Je(Te.y1+ct)?ut[1]:Te.y1}},U=null,H={},j={},G=null,O=function(Te,nt){return nt?H[q2(Te)]:j[q2(Te)]},W=function(Te,nt,ut,ct){if(nt)return H[q2(c)]||F;var rt=j[u.level]||ut;return E(Te)?q(Te,rt,ct):{}};s.hasMultipleRoots&&b&&k++,u._maxDepth=k,u._backgroundColor=o.paper_bgcolor,u._entryDepth=h.data.depth,u._atRootLevel=b;var re=-_/2+A.l+A.w*(L.x[1]+L.x[0])/2,ne=-C/2+A.t+A.h*(1-(L.y[1]+L.y[0])/2),be=function(Te){return re+Te},ze=function(Te){return ne+Te},Ce=ze(0),he=be(0),te=function(Te){return he+Te},ke=function(Te){return Ce+Te};function Ee(Te,nt){return Te+","+nt}var Me=te(0),Oe=function(Te){Te.x=Math.max(Me,Te.x)},Re=u.pathbar.edgeshape,me=function(Te){var nt=te(Math.max(Math.min(Te.x0,Te.x0),0)),ut=te(Math.min(Math.max(Te.x1,Te.x1),M)),ct=ke(Te.y0),rt=ke(Te.y1),je=v/2,tt={},Je={};tt.x=nt,Je.x=ut,tt.y=Je.y=(ct+rt)/2;var Mt={x:nt,y:ct},Vt={x:ut,y:ct},Kt={x:ut,y:rt},ir={x:nt,y:rt};return Re===">"?(Mt.x-=je,Vt.x-=je,Kt.x-=je,ir.x-=je):Re==="/"?(Kt.x-=je,ir.x-=je,tt.x-=je/2,Je.x-=je/2):Re==="\\"?(Mt.x-=je,Vt.x-=je,tt.x-=je/2,Je.x-=je/2):Re==="<"&&(tt.x-=je,Je.x-=je),Oe(Mt),Oe(ir),Oe(tt),Oe(Vt),Oe(Kt),Oe(Je),"M"+Ee(Mt.x,Mt.y)+"L"+Ee(Vt.x,Vt.y)+"L"+Ee(Je.x,Je.y)+"L"+Ee(Kt.x,Kt.y)+"L"+Ee(ir.x,ir.y)+"L"+Ee(tt.x,tt.y)+"Z"},Be=u[f?"tiling":"marker"].pad,fe=function(Te){return u.textposition.indexOf(Te)!==-1},Ze=fe("top"),et=fe("left"),gt=fe("right"),Pt=fe("bottom"),Qe=function(Te){var nt=be(Te.x0),ut=be(Te.x1),ct=ze(Te.y0),rt=ze(Te.y1),je=ut-nt,tt=rt-ct;if(!je||!tt)return"";var Je=u.marker.cornerradius||0,Mt=Math.min(Je,je/2,tt/2);Mt&&Te.data&&Te.data.data&&Te.data.data.label&&(Ze&&(Mt=Math.min(Mt,Be.t)),et&&(Mt=Math.min(Mt,Be.l)),gt&&(Mt=Math.min(Mt,Be.r)),Pt&&(Mt=Math.min(Mt,Be.b)));var Vt=function(Kt,ir){return Mt?"a"+Ee(Mt,Mt)+" 0 0 1 "+Ee(Kt,ir):""};return"M"+Ee(nt,ct+Mt)+Vt(Mt,-Mt)+"L"+Ee(ut-Mt,ct)+Vt(Mt,Mt)+"L"+Ee(ut,rt-Mt)+Vt(-Mt,Mt)+"L"+Ee(nt+Mt,rt)+Vt(-Mt,-Mt)+"Z"},Xe=function(Te,nt){var ut=Te.x0,ct=Te.x1,rt=Te.y0,je=Te.y1,tt=Te.textBB,Je=Ze||nt.isHeader&&!Pt,Mt=Je?"start":Pt?"end":"middle",Vt=fe("right"),Kt=fe("left")||nt.onPathbar,ir=Kt?-1:Vt?1:0;if(nt.isHeader){if(ut+=(f?Be:Be.l)-rLe,ct-=(f?Be:Be.r)-rLe,ut>=ct){var fr=(ut+ct)/2;ut=fr,ct=fr}var Ot;Pt?(Ot=je-(f?Be:Be.b),rt<Ot&&Ot<je&&(rt=Ot)):(Ot=rt+(f?Be:Be.t),rt<Ot&&Ot<je&&(je=Ot))}var De=bLt(ut,ct,rt,je,tt,{isHorizontal:!1,constrained:!0,angle:0,anchor:Mt,leftToRight:ir});return De.fontSize=nt.fontSize,De.targetX=be(De.targetX),De.targetY=ze(De.targetY),isNaN(De.targetX)||isNaN(De.targetY)?{}:(ut!==ct&&rt!==je&&Kj(u.type,De,o),{scale:De.scale,rotate:De.rotate,textX:De.textX,textY:De.textY,anchorX:De.anchorX,anchorY:De.anchorY,targetX:De.targetX,targetY:De.targetY})},Tt=function(Te,nt){for(var ut,ct=0,rt=Te;!ut&&ct<k;)ct++,rt=rt.parent,rt?ut=O(rt,nt):ct=k;return ut||{}},xt=function(Te,nt,ut,ct){var rt=O(Te,nt),je;if(nt)je=F;else{var tt=O(h,nt);tt?je=q(Te,tt,ct):je={}}return Yj(rt,je)},_t=function(Te,nt,ut,ct,rt){var je=O(Te,nt),tt;if(je)tt=je;else if(nt)tt=F;else if(U)if(Te.parent){var Je=G||ut;Je&&!nt?tt=q(Te,Je,ct):(tt={},NE.extendFlat(tt,Tt(Te,nt)))}else tt=NE.extendFlat({},Te),f&&(rt.orientation==="h"?rt.flipX?tt.x0=Te.x1:tt.x1=0:rt.flipY?tt.y0=Te.y1:tt.y1=0);else tt={};return Yj(tt,{x0:Te.x0,x1:Te.x1,y0:Te.y0,y1:Te.y1})},Ct=function(Te,nt,ut,ct){var rt=O(Te,nt),je={},tt=W(Te,nt,ut,ct);NE.extendFlat(je,{transform:Xe({x0:tt.x0,x1:tt.x1,y0:tt.y0,y1:tt.y1,textBB:Te.textBB,_text:Te._text},{isHeader:X_.isHeader(Te,u)})}),rt?je=rt:Te.parent&&NE.extendFlat(je,Tt(Te,nt));var Je=Te.transform;return Te.x0!==Te.x1&&Te.y0!==Te.y1&&Kj(u.type,Je,o),Yj(je,{transform:{scale:Je.scale,rotate:Je.rotate,textX:Je.textX,textY:Je.textY,anchorX:Je.anchorX,anchorY:Je.anchorY,targetX:Je.targetX,targetY:Je.targetY}})},jt=function(Te,nt,ut,ct,rt){var je=ct[0],tt=ct[1];y?Te.exit().transition().each(function(){var Je=tLe.select(this),Mt=Je.select("path.surface");Mt.transition().attrTween("d",function(Kt){var ir=xt(Kt,nt,ut,[je,tt]);return function(fr){return rt(ir(fr))}});var Vt=Je.select("g.slicetext");Vt.attr("opacity",0)}).remove():Te.exit().remove()},At=function(Te){var nt=Te.transform;return Te.x0!==Te.x1&&Te.y0!==Te.y1&&Kj(u.type,nt,o),NE.getTextTransform({textX:nt.textX,textY:nt.textY,anchorX:nt.anchorX,anchorY:nt.anchorY,targetX:nt.targetX,targetY:nt.targetY,scale:nt.scale,rotate:nt.rotate})};y&&(p.each(function(Te){H[q2(Te)]={x0:Te.x0,x1:Te.x1,y0:Te.y0,y1:Te.y1},Te.transform&&(H[q2(Te)].transform={textX:Te.transform.textX,textY:Te.transform.textY,anchorX:Te.transform.anchorX,anchorY:Te.transform.anchorY,targetX:Te.transform.targetX,targetY:Te.transform.targetY,scale:Te.transform.scale,rotate:Te.transform.rotate})}),x.each(function(Te){j[q2(Te)]={x0:Te.x0,x1:Te.x1,y0:Te.y0,y1:Te.y1},Te.transform&&(j[q2(Te)].transform={textX:Te.transform.textX,textY:Te.transform.textY,anchorX:Te.transform.anchorX,anchorY:Te.transform.anchorY,targetX:Te.transform.targetX,targetY:Te.transform.targetY,scale:Te.transform.scale,rotate:Te.transform.rotate}),!U&&X_.isEntry(Te)&&(U=Te)})),G=a(t,r,h,x,{width:_,height:C,viewX:be,viewY:ze,pathSlice:Qe,toMoveInsideSlice:Xe,prevEntry:U,makeUpdateSliceInterpolator:_t,makeUpdateTextInterpolator:Ct,handleSlicesExit:jt,hasTransition:y,strTransform:At}),u.pathbar.visible?ALt(t,r,h,p,{barDifY:T,width:M,height:v,viewX:te,viewY:ke,pathSlice:me,toMoveInsideSlice:Xe,makeUpdateSliceInterpolator:_t,makeUpdateTextInterpolator:Ct,handleSlicesExit:jt,hasTransition:y,strTransform:At}):p.remove()}});var Jj=Se((Wpr,oLe)=>{"use strict";var SLt=Nl(),MLt=Kg(),ELt=bp(),kLt=ELt.clearMinTextSize,CLt=N0().resizeText,aLe=nLe();oLe.exports=function(t,r,n,i,a){var o=a.type,s=a.drawDescendants,u=t._fullLayout,l=u["_"+o+"layer"],f,c,h=!n;if(kLt(o,u),f=l.selectAll("g.trace."+o).data(r,function(p){return p[0].trace.uid}),f.enter().append("g").classed("trace",!0).classed(o,!0),f.order(),!u.uniformtext.mode&&MLt.hasTransition(n)){i&&(c=i());var d=SLt.transition().duration(n.duration).ease(n.easing).each("end",function(){c&&c()}).each("interrupt",function(){c&&c()});d.each(function(){l.selectAll("g.trace").each(function(p){aLe(t,p,this,n,s)})})}else f.each(function(p){aLe(t,p,this,n,s)}),u.uniformtext.mode&&CLt(t,l.selectAll(".trace"),o);h&&f.exit().remove()}});var cLe=Se((jpr,fLe)=>{"use strict";var sLe=Nl(),OR=Zr(),lLe=yu(),LLt=Bf(),zLt=Wj(),uLe=qR().styleOne,$j=R2(),Y_=Kg(),PLt=BE(),ILt=RR().formatSliceLabel,Qj=!1;fLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,u=a.viewX,l=a.viewY,f=a.pathSlice,c=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,p=a.handleSlicesExit,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,y=a.prevEntry,k={},E=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=_.textposition.indexOf("left")!==-1,M=_.textposition.indexOf("right")!==-1,v=_.textposition.indexOf("bottom")!==-1,z=!v&&!_.marker.pad.t||v&&!_.marker.pad.b,T=zLt(n,[o,s],{packing:_.tiling.packing,squarifyratio:_.tiling.squarifyratio,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,pad:{inner:_.tiling.pad,top:_.marker.pad.t,left:_.marker.pad.l,right:_.marker.pad.r,bottom:_.marker.pad.b}}),F=T.descendants(),q=1/0,U=-1/0;F.forEach(function(W){var re=W.depth;re>=_._maxDepth?(W.x0=W.x1=(W.x0+W.x1)/2,W.y0=W.y1=(W.y0+W.y1)/2):(q=Math.min(q,re),U=Math.max(U,re))}),i=i.data(F,Y_.getPtId),_._maxVisibleLayers=isFinite(U)?U-q+1:0,i.enter().append("g").classed("slice",!0),p(i,Qj,k,[o,s],f),i.order();var H=null;if(d&&y){var j=Y_.getPtId(y);i.each(function(W){H===null&&Y_.getPtId(W)===j&&(H={x0:W.x0,x1:W.x1,y0:W.y0,y1:W.y1})})}var G=function(){return H||{x0:0,x1:o,y0:0,y1:s}},O=i;return d&&(O=O.transition().each("end",function(){var W=sLe.select(this);Y_.setSliceCursor(W,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),O.each(function(W){var re=Y_.isHeader(W,_);W._x0=u(W.x0),W._x1=u(W.x1),W._y0=l(W.y0),W._y1=l(W.y1),W._hoverX=u(W.x1-_.marker.pad.r),W._hoverY=l(v?W.y1-_.marker.pad.b/2:W.y0+_.marker.pad.t/2);var ne=sLe.select(this),be=OR.ensureSingle(ne,"path","surface",function(Ee){Ee.style("pointer-events",E?"none":"all")});d?be.transition().attrTween("d",function(Ee){var Me=x(Ee,Qj,G(),[o,s]);return function(Oe){return f(Me(Oe))}}):be.attr("d",f),ne.call(PLt,n,t,r,{styleOne:uLe,eventDataKeys:$j.eventDataKeys,transitionTime:$j.CLICK_TRANSITION_TIME,transitionEasing:$j.CLICK_TRANSITION_EASING}).call(Y_.setSliceCursor,t,{isTransitioning:t._transitioning}),be.call(uLe,W,_,t,{hovered:!1}),W.x0===W.x1||W.y0===W.y1?W._text="":re?W._text=z?"":Y_.getPtLabel(W)||"":W._text=ILt(W,n,_,r,A)||"";var ze=OR.ensureSingle(ne,"g","slicetext"),Ce=OR.ensureSingle(ze,"text","",function(Ee){Ee.attr("data-notex",1)}),he=OR.ensureUniformFontSize(t,Y_.determineTextFont(_,W,A.font)),te=W._text||" ",ke=re&&te.indexOf("<br>")===-1;Ce.text(te).classed("slicetext",!0).attr("text-anchor",M?"end":C||ke?"start":"middle").call(lLe.font,he).call(LLt.convertToTspans,t),W.textBB=lLe.bBox(Ce.node()),W.transform=c(W,{fontSize:he.size,isHeader:re}),W.transform.fontSize=he.size,d?Ce.transition().attrTween("transform",function(Ee){var Me=b(Ee,Qj,G(),[o,s]);return function(Oe){return h(Me(Oe))}}):Ce.attr("transform",h(W))}),H}});var dLe=Se((Zpr,hLe)=>{"use strict";var DLt=Jj(),RLt=cLe();hLe.exports=function(t,r,n,i){return DLt(t,r,n,i,{type:"treemap",drawDescendants:RLt})}});var vLe=Se((Xpr,pLe)=>{"use strict";pLe.exports={moduleType:"trace",name:"treemap",basePlotModule:PCe(),categories:[],animatable:!0,attributes:FR(),layoutAttributes:Uj(),supplyDefaults:NCe(),supplyLayoutDefaults:VCe(),calc:Hj().calc,crossTraceCalc:Hj().crossTraceCalc,plot:dLe(),style:qR().style,colorbar:ep(),meta:{}}});var mLe=Se((Ypr,yLe)=>{"use strict";yLe.exports=vLe()});var _Le=Se(DA=>{"use strict";var gLe=Ac();DA.name="icicle";DA.plot=function(e,t,r,n){gLe.plotBasePlot(DA.name,e,t,r,n)};DA.clean=function(e,t,r,n){gLe.cleanBasePlot(DA.name,e,t,r,n)}});var eZ=Se((Jpr,bLe)=>{"use strict";var FLt=Du().hovertemplateAttrs,qLt=Du().texttemplateAttrs,BLt=Xf(),OLt=Ec().attributes,UE=A2(),o0=AE(),NR=FR(),xLe=R2(),NLt=vu().extendFlat,ULt=Id().pattern;bLe.exports={labels:o0.labels,parents:o0.parents,values:o0.values,branchvalues:o0.branchvalues,count:o0.count,level:o0.level,maxdepth:o0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:NR.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:NLt({colors:o0.marker.colors,line:o0.marker.line,pattern:ULt,editType:"calc"},BLt("marker",{colorAttr:"colors",anim:!1})),leaf:o0.leaf,pathbar:NR.pathbar,text:UE.text,textinfo:o0.textinfo,texttemplate:qLt({editType:"plot"},{keys:xLe.eventDataKeys.concat(["label","value"])}),hovertext:UE.hovertext,hoverinfo:o0.hoverinfo,hovertemplate:FLt({},{keys:xLe.eventDataKeys}),textfont:UE.textfont,insidetextfont:UE.insidetextfont,outsidetextfont:NR.outsidetextfont,textposition:NR.textposition,sort:UE.sort,root:o0.root,domain:OLt({name:"icicle",trace:!0,editType:"calc"})}});var tZ=Se(($pr,wLe)=>{"use strict";wLe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var MLe=Se((Qpr,SLe)=>{"use strict";var TLe=Zr(),VLt=eZ(),HLt=Pl(),GLt=Ec().defaults,WLt=r0().handleText,jLt=Qb().TEXTPAD,ZLt=S2().handleMarkerDefaults,ALe=fc(),XLt=ALe.hasColorscale,YLt=ALe.handleDefaults;SLe.exports=function(t,r,n,i){function a(d,p){return TLe.coerce(t,r,VLt,d,p)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var u=a("values");u&&u.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("tiling.orientation"),a("tiling.flip"),a("tiling.pad");var l=a("text");a("texttemplate"),r.texttemplate||a("textinfo",TLe.isArrayOrTypedArray(l)?"text+label":"label"),a("hovertext"),a("hovertemplate");var f=a("pathbar.visible"),c="auto";WLt(t,r,i,a,c,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),ZLt(t,r,i,a);var h=r._hasColorscale=XLt(t,"marker","colors")||(t.marker||{}).coloraxis;h&&YLt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:HLt.contrast(i.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*jLt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),GLt(r,i,a),r._length=null}});var kLe=Se((evr,ELe)=>{"use strict";var KLt=Zr(),JLt=tZ();ELe.exports=function(t,r){function n(i,a){return KLt.coerce(t,r,JLt,i,a)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var iZ=Se(rZ=>{"use strict";var CLe=EE();rZ.calc=function(e,t){return CLe.calc(e,t)};rZ.crossTraceCalc=function(e){return CLe._runCrossTraceCalc("icicle",e)}});var zLe=Se((rvr,LLe)=>{"use strict";var $Lt=SE(),QLt=Gj();LLe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.orientation==="h",s=n.maxDepth,u=r[0],l=r[1];s&&(u=(t.height+1)*r[0]/Math.min(t.height+1,s),l=(t.height+1)*r[1]/Math.min(t.height+1,s));var f=$Lt.partition().padding(n.pad.inner).size(o?[r[1],u]:[r[0],l])(t);return(o||i||a)&&QLt(f,r,{swapXY:o,flipX:i,flipY:a}),f}});var nZ=Se((ivr,FLe)=>{"use strict";var PLe=Nl(),ILe=Pl(),DLe=Zr(),ezt=bp().resizeText,tzt=IR();function rzt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");ezt(e,t,"icicle"),t.each(function(r){var n=PLe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){PLe.select(this).call(RLe,o,a,e)})})}function RLe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=DLe.castOption(r,o,"marker.line.color")||ILe.defaultLine,u=DLe.castOption(r,o,"marker.line.width")||0;e.call(tzt,t,r,n).style("stroke-width",u).call(ILe.stroke,s).style("opacity",a?r.leaf.opacity:null)}FLe.exports={style:rzt,styleOne:RLe}});var ULe=Se((nvr,NLe)=>{"use strict";var qLe=Nl(),UR=Zr(),BLe=yu(),izt=Bf(),nzt=zLe(),OLe=nZ().styleOne,aZ=R2(),RA=Kg(),azt=BE(),ozt=RR().formatSliceLabel,oZ=!1;NLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,u=a.viewX,l=a.viewY,f=a.pathSlice,c=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,p=a.handleSlicesExit,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,y=a.prevEntry,k={},E=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=_.textposition.indexOf("left")!==-1,M=_.textposition.indexOf("right")!==-1,v=_.textposition.indexOf("bottom")!==-1,z=nzt(n,[o,s],{flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,orientation:_.tiling.orientation,pad:{inner:_.tiling.pad},maxDepth:_._maxDepth}),T=z.descendants(),F=1/0,q=-1/0;T.forEach(function(O){var W=O.depth;W>=_._maxDepth?(O.x0=O.x1=(O.x0+O.x1)/2,O.y0=O.y1=(O.y0+O.y1)/2):(F=Math.min(F,W),q=Math.max(q,W))}),i=i.data(T,RA.getPtId),_._maxVisibleLayers=isFinite(q)?q-F+1:0,i.enter().append("g").classed("slice",!0),p(i,oZ,k,[o,s],f),i.order();var U=null;if(d&&y){var H=RA.getPtId(y);i.each(function(O){U===null&&RA.getPtId(O)===H&&(U={x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1})})}var j=function(){return U||{x0:0,x1:o,y0:0,y1:s}},G=i;return d&&(G=G.transition().each("end",function(){var O=qLe.select(this);RA.setSliceCursor(O,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),G.each(function(O){O._x0=u(O.x0),O._x1=u(O.x1),O._y0=l(O.y0),O._y1=l(O.y1),O._hoverX=u(O.x1-_.tiling.pad),O._hoverY=l(v?O.y1-_.tiling.pad/2:O.y0+_.tiling.pad/2);var W=qLe.select(this),re=UR.ensureSingle(W,"path","surface",function(Ce){Ce.style("pointer-events",E?"none":"all")});d?re.transition().attrTween("d",function(Ce){var he=x(Ce,oZ,j(),[o,s],{orientation:_.tiling.orientation,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1});return function(te){return f(he(te))}}):re.attr("d",f),W.call(azt,n,t,r,{styleOne:OLe,eventDataKeys:aZ.eventDataKeys,transitionTime:aZ.CLICK_TRANSITION_TIME,transitionEasing:aZ.CLICK_TRANSITION_EASING}).call(RA.setSliceCursor,t,{isTransitioning:t._transitioning}),re.call(OLe,O,_,t,{hovered:!1}),O.x0===O.x1||O.y0===O.y1?O._text="":O._text=ozt(O,n,_,r,A)||"";var ne=UR.ensureSingle(W,"g","slicetext"),be=UR.ensureSingle(ne,"text","",function(Ce){Ce.attr("data-notex",1)}),ze=UR.ensureUniformFontSize(t,RA.determineTextFont(_,O,A.font));be.text(O._text||" ").classed("slicetext",!0).attr("text-anchor",M?"end":C?"start":"middle").call(BLe.font,ze).call(izt.convertToTspans,t),O.textBB=BLe.bBox(be.node()),O.transform=c(O,{fontSize:ze.size}),O.transform.fontSize=ze.size,d?be.transition().attrTween("transform",function(Ce){var he=b(Ce,oZ,j(),[o,s]);return function(te){return h(he(te))}}):be.attr("transform",h(O))}),U}});var HLe=Se((avr,VLe)=>{"use strict";var szt=Jj(),lzt=ULe();VLe.exports=function(t,r,n,i){return szt(t,r,n,i,{type:"icicle",drawDescendants:lzt})}});var WLe=Se((ovr,GLe)=>{"use strict";GLe.exports={moduleType:"trace",name:"icicle",basePlotModule:_Le(),categories:[],animatable:!0,attributes:eZ(),layoutAttributes:tZ(),supplyDefaults:MLe(),supplyLayoutDefaults:kLe(),calc:iZ().calc,crossTraceCalc:iZ().crossTraceCalc,plot:HLe(),style:nZ().style,colorbar:ep(),meta:{}}});var ZLe=Se((svr,jLe)=>{"use strict";jLe.exports=WLe()});var YLe=Se(FA=>{"use strict";var XLe=Ac();FA.name="funnelarea";FA.plot=function(e,t,r,n){XLe.plotBasePlot(FA.name,e,t,r,n)};FA.clean=function(e,t,r,n){XLe.cleanBasePlot(FA.name,e,t,r,n)}});var sZ=Se((uvr,KLe)=>{"use strict";var ap=A2(),uzt=zf(),fzt=Ec().attributes,czt=Du().hovertemplateAttrs,hzt=Du().texttemplateAttrs,B2=vu().extendFlat;KLe.exports={labels:ap.labels,label0:ap.label0,dlabel:ap.dlabel,values:ap.values,marker:{colors:ap.marker.colors,line:{color:B2({},ap.marker.line.color,{dflt:null}),width:B2({},ap.marker.line.width,{dflt:1}),editType:"calc"},pattern:ap.marker.pattern,editType:"calc"},text:ap.text,hovertext:ap.hovertext,scalegroup:B2({},ap.scalegroup,{}),textinfo:B2({},ap.textinfo,{flags:["label","text","value","percent"]}),texttemplate:hzt({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:B2({},uzt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:czt({},{keys:["label","color","value","text","percent"]}),textposition:B2({},ap.textposition,{values:["inside","none"],dflt:"inside"}),textfont:ap.textfont,insidetextfont:ap.insidetextfont,title:{text:ap.title.text,font:ap.title.font,position:B2({},ap.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:fzt({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 lZ=Se((fvr,JLe)=>{"use strict";var dzt=lR().hiddenlabels;JLe.exports={hiddenlabels:dzt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var eze=Se((cvr,QLe)=>{"use strict";var $Le=Zr(),pzt=sZ(),vzt=Ec().defaults,yzt=r0().handleText,mzt=S2().handleLabelsAndValues,gzt=S2().handleMarkerDefaults;QLe.exports=function(t,r,n,i){function a(x,b){return $Le.coerce(t,r,pzt,x,b)}var o=a("labels"),s=a("values"),u=mzt(o,s),l=u.len;if(r._hasLabels=u.hasLabels,r._hasValues=u.hasValues,!r._hasLabels&&r._hasValues&&(a("label0"),a("dlabel")),!l){r.visible=!1;return}r._length=l,gzt(t,r,i,a),a("scalegroup");var f=a("text"),c=a("texttemplate"),h;if(c||(h=a("textinfo",Array.isArray(f)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),c||h&&h!=="none"){var d=a("textposition");yzt(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");vzt(r,i,a);var p=a("title.text");p&&(a("title.position"),$Le.coerceFont(a,"title.font",i.font)),a("aspectratio"),a("baseratio")}});var rze=Se((hvr,tze)=>{"use strict";var _zt=Zr(),xzt=lZ();tze.exports=function(t,r){function n(i,a){return _zt.coerce(t,r,xzt,i,a)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var uZ=Se((dvr,nze)=>{"use strict";var ize=gA();function bzt(e,t){return ize.calc(e,t)}function wzt(e){ize.crossTraceCalc(e,{type:"funnelarea"})}nze.exports={calc:bzt,crossTraceCalc:wzt}});var uze=Se((pvr,lze)=>{"use strict";var O2=Nl(),fZ=yu(),K_=Zr(),Tzt=K_.strScale,aze=K_.strTranslate,oze=Bf(),Azt=i2(),Szt=Azt.toMoveInsideBar,sze=bp(),Mzt=sze.recordMinTextSize,Ezt=sze.clearMinTextSize,kzt=l_(),qA=hR(),Czt=qA.attachFxHandlers,Lzt=qA.determineInsideTextFont,zzt=qA.layoutAreas,Pzt=qA.prerenderTitles,Izt=qA.positionTitleOutside,Dzt=qA.formatSliceLabel;lze.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;Ezt("funnelarea",i),Pzt(r,t),zzt(r,i._size),K_.makeTraceGroups(i._funnelarealayer,r,"trace").each(function(a){var o=O2.select(this),s=a[0],u=s.trace;Fzt(a),o.each(function(){var l=O2.select(this).selectAll("g.slice").data(a);l.enter().append("g").classed("slice",!0),l.exit().remove(),l.each(function(c,h){if(c.hidden){O2.select(this).selectAll("path,g").remove();return}c.pointNumber=c.i,c.curveNumber=u.index;var d=s.cx,p=s.cy,x=O2.select(this),b=x.selectAll("path.surface").data([c]);b.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),x.call(Czt,t,a);var y="M"+(d+c.TR[0])+","+(p+c.TR[1])+cZ(c.TR,c.BR)+cZ(c.BR,c.BL)+cZ(c.BL,c.TL)+"Z";b.attr("d",y),Dzt(t,c,s);var k=kzt.castOption(u.textposition,c.pts),E=x.selectAll("g.slicetext").data(c.text&&k!=="none"?[0]:[]);E.enter().append("g").classed("slicetext",!0),E.exit().remove(),E.each(function(){var A=K_.ensureSingle(O2.select(this),"text","",function(F){F.attr("data-notex",1)}),L=K_.ensureUniformFontSize(t,Lzt(u,c,i.font));A.text(c.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(fZ.font,L).call(oze.convertToTspans,t);var _=fZ.bBox(A.node()),C,M,v,z=Math.min(c.BL[1],c.BR[1])+p,T=Math.max(c.TL[1],c.TR[1])+p;M=Math.max(c.TL[0],c.BL[0])+d,v=Math.min(c.TR[0],c.BR[0])+d,C=Szt(M,v,z,T,_,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),C.fontSize=L.size,Mzt(u.type,C,i),a[h].transform=C,K_.setTransormAndDisplay(A,C)})});var f=O2.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);f.enter().append("g").classed("titletext",!0),f.exit().remove(),f.each(function(){var c=K_.ensureSingle(O2.select(this),"text","",function(p){p.attr("data-notex",1)}),h=u.title.text;u._meta&&(h=K_.templateString(h,u._meta)),c.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(fZ.font,u.title.font).call(oze.convertToTspans,t);var d=Izt(s,i._size);c.attr("transform",aze(d.x,d.y)+Tzt(Math.min(1,d.scale))+aze(d.tx,d.ty))})})})};function cZ(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function Rzt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function Fzt(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),u=o,l=s/o;function f(){var q=Math.sqrt(l);return{x:q,y:-q}}function c(){var q=f();return[q.x,q.y]}var h,d=[];d.push(c());var p,x;for(p=e.length-1;p>-1;p--)if(x=e[p],!x.hidden){var b=x.v/u;l+=b,d.push(c())}var y=1/0,k=-1/0;for(p=0;p<d.length;p++)h=d[p],y=Math.min(y,h[1]),k=Math.max(k,h[1]);for(p=0;p<d.length;p++)d[p][1]-=(k+y)/2;var E=d[d.length-1][0],A=t.r,L=(k-y)/2,_=A/E,C=A/L*n;for(t.r=C*L,p=0;p<d.length;p++)d[p][0]*=_,d[p][1]*=C;h=d[0];var M=[-h[0],h[1]],v=[h[0],h[1]],z=0;for(p=e.length-1;p>-1;p--)if(x=e[p],!x.hidden){z+=1;var T=d[z][0],F=d[z][1];x.TL=[-T,F],x.TR=[T,F],x.BL=M,x.BR=v,x.pxmid=Rzt(x.TR,x.BR),M=x.TL,v=x.TR}}});var hze=Se((vvr,cze)=>{"use strict";var fze=Nl(),qzt=R3(),Bzt=bp().resizeText;cze.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");Bzt(t,r,"funnelarea"),r.each(function(n){var i=n[0],a=i.trace,o=fze.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){fze.select(this).call(qzt,s,a,t)})})}});var pze=Se((yvr,dze)=>{"use strict";dze.exports={moduleType:"trace",name:"funnelarea",basePlotModule:YLe(),categories:["pie-like","funnelarea","showLegend"],attributes:sZ(),layoutAttributes:lZ(),supplyDefaults:eze(),supplyLayoutDefaults:rze(),calc:uZ().calc,crossTraceCalc:uZ().crossTraceCalc,plot:uze(),style:hze(),styleOne:R3(),meta:{}}});var yze=Se((mvr,vze)=>{"use strict";vze.exports=pze()});var Od=Se((gvr,mze)=>{(function(){var e={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)}},4793:function(i,a,o){"use strict";var s;function u(ye,ue){if(!(ye instanceof ue))throw new TypeError("Cannot call a class as a function")}function l(ye,ue){for(var de=0;de<ue.length;de++){var ht=ue[de];ht.enumerable=ht.enumerable||!1,ht.configurable=!0,"value"in ht&&(ht.writable=!0),Object.defineProperty(ye,c(ht.key),ht)}}function f(ye,ue,de){return ue&&l(ye.prototype,ue),de&&l(ye,de),Object.defineProperty(ye,"prototype",{writable:!1}),ye}function c(ye){var ue=h(ye,"string");return A(ue)=="symbol"?ue:ue+""}function h(ye,ue){if(A(ye)!="object"||!ye)return ye;var de=ye[Symbol.toPrimitive];if(de!==void 0){var ht=de.call(ye,ue||"default");if(A(ht)!="object")return ht;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ue==="string"?String:Number)(ye)}function d(ye,ue,de){return ue=y(ue),p(ye,b()?Reflect.construct(ue,de||[],y(ye).constructor):ue.apply(ye,de))}function p(ye,ue){if(ue&&(A(ue)=="object"||typeof ue=="function"))return ue;if(ue!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x(ye)}function x(ye){if(ye===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye}function b(){try{var ye=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(ue){}return(b=function(){return!!ye})()}function y(ye){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},y(ye)}function k(ye,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");ye.prototype=Object.create(ue&&ue.prototype,{constructor:{value:ye,writable:!0,configurable:!0}}),Object.defineProperty(ye,"prototype",{writable:!1}),ue&&E(ye,ue)}function E(ye,ue){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(de,ht){return de.__proto__=ht,de},E(ye,ue)}function A(ye){"@babel/helpers - typeof";return A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ue){return typeof ue}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},A(ye)}var L=o(7507),_=o(3778),C=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.hp=T,s=be,a.IS=50;var M=2147483647;s=M,T.TYPED_ARRAY_SUPPORT=v(),!T.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 v(){try{var ye=new Uint8Array(1),ue={foo:function(){return 42}};return Object.setPrototypeOf(ue,Uint8Array.prototype),Object.setPrototypeOf(ye,ue),ye.foo()===42}catch(de){return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}}),Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function z(ye){if(ye>M)throw new RangeError('The value "'+ye+'" is invalid for option "size"');var ue=new Uint8Array(ye);return Object.setPrototypeOf(ue,T.prototype),ue}function T(ye,ue,de){if(typeof ye=="number"){if(typeof ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return H(ye)}return F(ye,ue,de)}T.poolSize=8192;function F(ye,ue,de){if(typeof ye=="string")return j(ye,ue);if(ArrayBuffer.isView(ye))return O(ye);if(ye==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(ye));if(_e(ye,ArrayBuffer)||ye&&_e(ye.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(_e(ye,SharedArrayBuffer)||ye&&_e(ye.buffer,SharedArrayBuffer)))return W(ye,ue,de);if(typeof ye=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ht=ye.valueOf&&ye.valueOf();if(ht!=null&&ht!==ye)return T.from(ht,ue,de);var Et=re(ye);if(Et)return Et;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof ye[Symbol.toPrimitive]=="function")return T.from(ye[Symbol.toPrimitive]("string"),ue,de);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(ye))}T.from=function(ye,ue,de){return F(ye,ue,de)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array);function q(ye){if(typeof ye!="number")throw new TypeError('"size" argument must be of type number');if(ye<0)throw new RangeError('The value "'+ye+'" is invalid for option "size"')}function U(ye,ue,de){return q(ye),ye<=0?z(ye):ue!==void 0?typeof de=="string"?z(ye).fill(ue,de):z(ye).fill(ue):z(ye)}T.alloc=function(ye,ue,de){return U(ye,ue,de)};function H(ye){return q(ye),z(ye<0?0:ne(ye)|0)}T.allocUnsafe=function(ye){return H(ye)},T.allocUnsafeSlow=function(ye){return H(ye)};function j(ye,ue){if((typeof ue!="string"||ue==="")&&(ue="utf8"),!T.isEncoding(ue))throw new TypeError("Unknown encoding: "+ue);var de=ze(ye,ue)|0,ht=z(de),Et=ht.write(ye,ue);return Et!==de&&(ht=ht.slice(0,Et)),ht}function G(ye){for(var ue=ye.length<0?0:ne(ye.length)|0,de=z(ue),ht=0;ht<ue;ht+=1)de[ht]=ye[ht]&255;return de}function O(ye){if(_e(ye,Uint8Array)){var ue=new Uint8Array(ye);return W(ue.buffer,ue.byteOffset,ue.byteLength)}return G(ye)}function W(ye,ue,de){if(ue<0||ye.byteLength<ue)throw new RangeError('"offset" is outside of buffer bounds');if(ye.byteLength<ue+(de||0))throw new RangeError('"length" is outside of buffer bounds');var ht;return ue===void 0&&de===void 0?ht=new Uint8Array(ye):de===void 0?ht=new Uint8Array(ye,ue):ht=new Uint8Array(ye,ue,de),Object.setPrototypeOf(ht,T.prototype),ht}function re(ye){if(T.isBuffer(ye)){var ue=ne(ye.length)|0,de=z(ue);return de.length===0||ye.copy(de,0,0,ue),de}if(ye.length!==void 0)return typeof ye.length!="number"||Fe(ye.length)?z(0):G(ye);if(ye.type==="Buffer"&&Array.isArray(ye.data))return G(ye.data)}function ne(ye){if(ye>=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return ye|0}function be(ye){return+ye!=ye&&(ye=0),T.alloc(+ye)}T.isBuffer=function(ue){return ue!=null&&ue._isBuffer===!0&&ue!==T.prototype},T.compare=function(ue,de){if(_e(ue,Uint8Array)&&(ue=T.from(ue,ue.offset,ue.byteLength)),_e(de,Uint8Array)&&(de=T.from(de,de.offset,de.byteLength)),!T.isBuffer(ue)||!T.isBuffer(de))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ue===de)return 0;for(var ht=ue.length,Et=de.length,St=0,Zt=Math.min(ht,Et);St<Zt;++St)if(ue[St]!==de[St]){ht=ue[St],Et=de[St];break}return ht<Et?-1:Et<ht?1:0},T.isEncoding=function(ue){switch(String(ue).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}},T.concat=function(ue,de){if(!Array.isArray(ue))throw new TypeError('"list" argument must be an Array of Buffers');if(ue.length===0)return T.alloc(0);var ht;if(de===void 0)for(de=0,ht=0;ht<ue.length;++ht)de+=ue[ht].length;var Et=T.allocUnsafe(de),St=0;for(ht=0;ht<ue.length;++ht){var Zt=ue[ht];if(_e(Zt,Uint8Array))St+Zt.length>Et.length?(T.isBuffer(Zt)||(Zt=T.from(Zt)),Zt.copy(Et,St)):Uint8Array.prototype.set.call(Et,Zt,St);else if(T.isBuffer(Zt))Zt.copy(Et,St);else throw new TypeError('"list" argument must be an Array of Buffers');St+=Zt.length}return Et};function ze(ye,ue){if(T.isBuffer(ye))return ye.length;if(ArrayBuffer.isView(ye)||_e(ye,ArrayBuffer))return ye.byteLength;if(typeof ye!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+A(ye));var de=ye.length,ht=arguments.length>2&&arguments[2]===!0;if(!ht&&de===0)return 0;for(var Et=!1;;)switch(ue){case"ascii":case"latin1":case"binary":return de;case"utf8":case"utf-8":return Kt(ye).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de*2;case"hex":return de>>>1;case"base64":return Ot(ye).length;default:if(Et)return ht?-1:Kt(ye).length;ue=(""+ue).toLowerCase(),Et=!0}}T.byteLength=ze;function Ce(ye,ue,de){var ht=!1;if((ue===void 0||ue<0)&&(ue=0),ue>this.length||((de===void 0||de>this.length)&&(de=this.length),de<=0)||(de>>>=0,ue>>>=0,de<=ue))return"";for(ye||(ye="utf8");;)switch(ye){case"hex":return Qe(this,ue,de);case"utf8":case"utf-8":return fe(this,ue,de);case"ascii":return gt(this,ue,de);case"latin1":case"binary":return Pt(this,ue,de);case"base64":return Be(this,ue,de);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xe(this,ue,de);default:if(ht)throw new TypeError("Unknown encoding: "+ye);ye=(ye+"").toLowerCase(),ht=!0}}T.prototype._isBuffer=!0;function he(ye,ue,de){var ht=ye[ue];ye[ue]=ye[de],ye[de]=ht}T.prototype.swap16=function(){var ue=this.length;if(ue%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var de=0;de<ue;de+=2)he(this,de,de+1);return this},T.prototype.swap32=function(){var ue=this.length;if(ue%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var de=0;de<ue;de+=4)he(this,de,de+3),he(this,de+1,de+2);return this},T.prototype.swap64=function(){var ue=this.length;if(ue%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var de=0;de<ue;de+=8)he(this,de,de+7),he(this,de+1,de+6),he(this,de+2,de+5),he(this,de+3,de+4);return this},T.prototype.toString=function(){var ue=this.length;return ue===0?"":arguments.length===0?fe(this,0,ue):Ce.apply(this,arguments)},T.prototype.toLocaleString=T.prototype.toString,T.prototype.equals=function(ue){if(!T.isBuffer(ue))throw new TypeError("Argument must be a Buffer");return this===ue?!0:T.compare(this,ue)===0},T.prototype.inspect=function(){var ue="",de=a.IS;return ue=this.toString("hex",0,de).replace(/(.{2})/g,"$1 ").trim(),this.length>de&&(ue+=" ... "),"<Buffer "+ue+">"},C&&(T.prototype[C]=T.prototype.inspect),T.prototype.compare=function(ue,de,ht,Et,St){if(_e(ue,Uint8Array)&&(ue=T.from(ue,ue.offset,ue.byteLength)),!T.isBuffer(ue))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+A(ue));if(de===void 0&&(de=0),ht===void 0&&(ht=ue?ue.length:0),Et===void 0&&(Et=0),St===void 0&&(St=this.length),de<0||ht>ue.length||Et<0||St>this.length)throw new RangeError("out of range index");if(Et>=St&&de>=ht)return 0;if(Et>=St)return-1;if(de>=ht)return 1;if(de>>>=0,ht>>>=0,Et>>>=0,St>>>=0,this===ue)return 0;for(var Zt=St-Et,qr=ht-de,Lr=Math.min(Zt,qr),vr=this.slice(Et,St),Er=ue.slice(de,ht),si=0;si<Lr;++si)if(vr[si]!==Er[si]){Zt=vr[si],qr=Er[si];break}return Zt<qr?-1:qr<Zt?1:0};function te(ye,ue,de,ht,Et){if(ye.length===0)return-1;if(typeof de=="string"?(ht=de,de=0):de>2147483647?de=2147483647:de<-2147483648&&(de=-2147483648),de=+de,Fe(de)&&(de=Et?0:ye.length-1),de<0&&(de=ye.length+de),de>=ye.length){if(Et)return-1;de=ye.length-1}else if(de<0)if(Et)de=0;else return-1;if(typeof ue=="string"&&(ue=T.from(ue,ht)),T.isBuffer(ue))return ue.length===0?-1:ke(ye,ue,de,ht,Et);if(typeof ue=="number")return ue=ue&255,typeof Uint8Array.prototype.indexOf=="function"?Et?Uint8Array.prototype.indexOf.call(ye,ue,de):Uint8Array.prototype.lastIndexOf.call(ye,ue,de):ke(ye,[ue],de,ht,Et);throw new TypeError("val must be string, number or Buffer")}function ke(ye,ue,de,ht,Et){var St=1,Zt=ye.length,qr=ue.length;if(ht!==void 0&&(ht=String(ht).toLowerCase(),ht==="ucs2"||ht==="ucs-2"||ht==="utf16le"||ht==="utf-16le")){if(ye.length<2||ue.length<2)return-1;St=2,Zt/=2,qr/=2,de/=2}function Lr(Si,xi){return St===1?Si[xi]:Si.readUInt16BE(xi*St)}var vr;if(Et){var Er=-1;for(vr=de;vr<Zt;vr++)if(Lr(ye,vr)===Lr(ue,Er===-1?0:vr-Er)){if(Er===-1&&(Er=vr),vr-Er+1===qr)return Er*St}else Er!==-1&&(vr-=vr-Er),Er=-1}else for(de+qr>Zt&&(de=Zt-qr),vr=de;vr>=0;vr--){for(var si=!0,Ei=0;Ei<qr;Ei++)if(Lr(ye,vr+Ei)!==Lr(ue,Ei)){si=!1;break}if(si)return vr}return-1}T.prototype.includes=function(ue,de,ht){return this.indexOf(ue,de,ht)!==-1},T.prototype.indexOf=function(ue,de,ht){return te(this,ue,de,ht,!0)},T.prototype.lastIndexOf=function(ue,de,ht){return te(this,ue,de,ht,!1)};function Ee(ye,ue,de,ht){de=Number(de)||0;var Et=ye.length-de;ht?(ht=Number(ht),ht>Et&&(ht=Et)):ht=Et;var St=ue.length;ht>St/2&&(ht=St/2);var Zt;for(Zt=0;Zt<ht;++Zt){var qr=parseInt(ue.substr(Zt*2,2),16);if(Fe(qr))return Zt;ye[de+Zt]=qr}return Zt}function Me(ye,ue,de,ht){return De(Kt(ue,ye.length-de),ye,de,ht)}function Oe(ye,ue,de,ht){return De(ir(ue),ye,de,ht)}function Re(ye,ue,de,ht){return De(Ot(ue),ye,de,ht)}function me(ye,ue,de,ht){return De(fr(ue,ye.length-de),ye,de,ht)}T.prototype.write=function(ue,de,ht,Et){if(de===void 0)Et="utf8",ht=this.length,de=0;else if(ht===void 0&&typeof de=="string")Et=de,ht=this.length,de=0;else if(isFinite(de))de=de>>>0,isFinite(ht)?(ht=ht>>>0,Et===void 0&&(Et="utf8")):(Et=ht,ht=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var St=this.length-de;if((ht===void 0||ht>St)&&(ht=St),ue.length>0&&(ht<0||de<0)||de>this.length)throw new RangeError("Attempt to write outside buffer bounds");Et||(Et="utf8");for(var Zt=!1;;)switch(Et){case"hex":return Ee(this,ue,de,ht);case"utf8":case"utf-8":return Me(this,ue,de,ht);case"ascii":case"latin1":case"binary":return Oe(this,ue,de,ht);case"base64":return Re(this,ue,de,ht);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,ue,de,ht);default:if(Zt)throw new TypeError("Unknown encoding: "+Et);Et=(""+Et).toLowerCase(),Zt=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Be(ye,ue,de){return ue===0&&de===ye.length?L.fromByteArray(ye):L.fromByteArray(ye.slice(ue,de))}function fe(ye,ue,de){de=Math.min(ye.length,de);for(var ht=[],Et=ue;Et<de;){var St=ye[Et],Zt=null,qr=St>239?4:St>223?3:St>191?2:1;if(Et+qr<=de){var Lr=void 0,vr=void 0,Er=void 0,si=void 0;switch(qr){case 1:St<128&&(Zt=St);break;case 2:Lr=ye[Et+1],(Lr&192)===128&&(si=(St&31)<<6|Lr&63,si>127&&(Zt=si));break;case 3:Lr=ye[Et+1],vr=ye[Et+2],(Lr&192)===128&&(vr&192)===128&&(si=(St&15)<<12|(Lr&63)<<6|vr&63,si>2047&&(si<55296||si>57343)&&(Zt=si));break;case 4:Lr=ye[Et+1],vr=ye[Et+2],Er=ye[Et+3],(Lr&192)===128&&(vr&192)===128&&(Er&192)===128&&(si=(St&15)<<18|(Lr&63)<<12|(vr&63)<<6|Er&63,si>65535&&si<1114112&&(Zt=si))}}Zt===null?(Zt=65533,qr=1):Zt>65535&&(Zt-=65536,ht.push(Zt>>>10&1023|55296),Zt=56320|Zt&1023),ht.push(Zt),Et+=qr}return et(ht)}var Ze=4096;function et(ye){var ue=ye.length;if(ue<=Ze)return String.fromCharCode.apply(String,ye);for(var de="",ht=0;ht<ue;)de+=String.fromCharCode.apply(String,ye.slice(ht,ht+=Ze));return de}function gt(ye,ue,de){var ht="";de=Math.min(ye.length,de);for(var Et=ue;Et<de;++Et)ht+=String.fromCharCode(ye[Et]&127);return ht}function Pt(ye,ue,de){var ht="";de=Math.min(ye.length,de);for(var Et=ue;Et<de;++Et)ht+=String.fromCharCode(ye[Et]);return ht}function Qe(ye,ue,de){var ht=ye.length;(!ue||ue<0)&&(ue=0),(!de||de<0||de>ht)&&(de=ht);for(var Et="",St=ue;St<de;++St)Et+=Pe[ye[St]];return Et}function Xe(ye,ue,de){for(var ht=ye.slice(ue,de),Et="",St=0;St<ht.length-1;St+=2)Et+=String.fromCharCode(ht[St]+ht[St+1]*256);return Et}T.prototype.slice=function(ue,de){var ht=this.length;ue=~~ue,de=de===void 0?ht:~~de,ue<0?(ue+=ht,ue<0&&(ue=0)):ue>ht&&(ue=ht),de<0?(de+=ht,de<0&&(de=0)):de>ht&&(de=ht),de<ue&&(de=ue);var Et=this.subarray(ue,de);return Object.setPrototypeOf(Et,T.prototype),Et};function Tt(ye,ue,de){if(ye%1!==0||ye<0)throw new RangeError("offset is not uint");if(ye+ue>de)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(ue,de,ht){ue=ue>>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=this[ue],St=1,Zt=0;++Zt<de&&(St*=256);)Et+=this[ue+Zt]*St;return Et},T.prototype.readUintBE=T.prototype.readUIntBE=function(ue,de,ht){ue=ue>>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=this[ue+--de],St=1;de>0&&(St*=256);)Et+=this[ue+--de]*St;return Et},T.prototype.readUint8=T.prototype.readUInt8=function(ue,de){return ue=ue>>>0,de||Tt(ue,1,this.length),this[ue]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(ue,de){return ue=ue>>>0,de||Tt(ue,2,this.length),this[ue]|this[ue+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(ue,de){return ue=ue>>>0,de||Tt(ue,2,this.length),this[ue]<<8|this[ue+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),(this[ue]|this[ue+1]<<8|this[ue+2]<<16)+this[ue+3]*16777216},T.prototype.readUint32BE=T.prototype.readUInt32BE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),this[ue]*16777216+(this[ue+1]<<16|this[ue+2]<<8|this[ue+3])},T.prototype.readBigUInt64LE=Ie(function(ue){ue=ue>>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=de+this[++ue]*Math.pow(2,8)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,24),St=this[++ue]+this[++ue]*Math.pow(2,8)+this[++ue]*Math.pow(2,16)+ht*Math.pow(2,24);return BigInt(Et)+(BigInt(St)<<BigInt(32))}),T.prototype.readBigUInt64BE=Ie(function(ue){ue=ue>>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=de*Math.pow(2,24)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,8)+this[++ue],St=this[++ue]*Math.pow(2,24)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,8)+ht;return(BigInt(Et)<<BigInt(32))+BigInt(St)}),T.prototype.readIntLE=function(ue,de,ht){ue=ue>>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=this[ue],St=1,Zt=0;++Zt<de&&(St*=256);)Et+=this[ue+Zt]*St;return St*=128,Et>=St&&(Et-=Math.pow(2,8*de)),Et},T.prototype.readIntBE=function(ue,de,ht){ue=ue>>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=de,St=1,Zt=this[ue+--Et];Et>0&&(St*=256);)Zt+=this[ue+--Et]*St;return St*=128,Zt>=St&&(Zt-=Math.pow(2,8*de)),Zt},T.prototype.readInt8=function(ue,de){return ue=ue>>>0,de||Tt(ue,1,this.length),this[ue]&128?(255-this[ue]+1)*-1:this[ue]},T.prototype.readInt16LE=function(ue,de){ue=ue>>>0,de||Tt(ue,2,this.length);var ht=this[ue]|this[ue+1]<<8;return ht&32768?ht|4294901760:ht},T.prototype.readInt16BE=function(ue,de){ue=ue>>>0,de||Tt(ue,2,this.length);var ht=this[ue+1]|this[ue]<<8;return ht&32768?ht|4294901760:ht},T.prototype.readInt32LE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),this[ue]|this[ue+1]<<8|this[ue+2]<<16|this[ue+3]<<24},T.prototype.readInt32BE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),this[ue]<<24|this[ue+1]<<16|this[ue+2]<<8|this[ue+3]},T.prototype.readBigInt64LE=Ie(function(ue){ue=ue>>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=this[ue+4]+this[ue+5]*Math.pow(2,8)+this[ue+6]*Math.pow(2,16)+(ht<<24);return(BigInt(Et)<<BigInt(32))+BigInt(de+this[++ue]*Math.pow(2,8)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,24))}),T.prototype.readBigInt64BE=Ie(function(ue){ue=ue>>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=(de<<24)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,8)+this[++ue];return(BigInt(Et)<<BigInt(32))+BigInt(this[++ue]*Math.pow(2,24)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,8)+ht)}),T.prototype.readFloatLE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),_.read(this,ue,!0,23,4)},T.prototype.readFloatBE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),_.read(this,ue,!1,23,4)},T.prototype.readDoubleLE=function(ue,de){return ue=ue>>>0,de||Tt(ue,8,this.length),_.read(this,ue,!0,52,8)},T.prototype.readDoubleBE=function(ue,de){return ue=ue>>>0,de||Tt(ue,8,this.length),_.read(this,ue,!1,52,8)};function xt(ye,ue,de,ht,Et,St){if(!T.isBuffer(ye))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue>Et||ue<St)throw new RangeError('"value" argument is out of bounds');if(de+ht>ye.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(ue,de,ht,Et){if(ue=+ue,de=de>>>0,ht=ht>>>0,!Et){var St=Math.pow(2,8*ht)-1;xt(this,ue,de,ht,St,0)}var Zt=1,qr=0;for(this[de]=ue&255;++qr<ht&&(Zt*=256);)this[de+qr]=ue/Zt&255;return de+ht},T.prototype.writeUintBE=T.prototype.writeUIntBE=function(ue,de,ht,Et){if(ue=+ue,de=de>>>0,ht=ht>>>0,!Et){var St=Math.pow(2,8*ht)-1;xt(this,ue,de,ht,St,0)}var Zt=ht-1,qr=1;for(this[de+Zt]=ue&255;--Zt>=0&&(qr*=256);)this[de+Zt]=ue/qr&255;return de+ht},T.prototype.writeUint8=T.prototype.writeUInt8=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,1,255,0),this[de]=ue&255,de+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,65535,0),this[de]=ue&255,this[de+1]=ue>>>8,de+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,65535,0),this[de]=ue>>>8,this[de+1]=ue&255,de+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,4294967295,0),this[de+3]=ue>>>24,this[de+2]=ue>>>16,this[de+1]=ue>>>8,this[de]=ue&255,de+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,4294967295,0),this[de]=ue>>>24,this[de+1]=ue>>>16,this[de+2]=ue>>>8,this[de+3]=ue&255,de+4};function _t(ye,ue,de,ht,Et){je(ue,ht,Et,ye,de,7);var St=Number(ue&BigInt(4294967295));ye[de++]=St,St=St>>8,ye[de++]=St,St=St>>8,ye[de++]=St,St=St>>8,ye[de++]=St;var Zt=Number(ue>>BigInt(32)&BigInt(4294967295));return ye[de++]=Zt,Zt=Zt>>8,ye[de++]=Zt,Zt=Zt>>8,ye[de++]=Zt,Zt=Zt>>8,ye[de++]=Zt,de}function Ct(ye,ue,de,ht,Et){je(ue,ht,Et,ye,de,7);var St=Number(ue&BigInt(4294967295));ye[de+7]=St,St=St>>8,ye[de+6]=St,St=St>>8,ye[de+5]=St,St=St>>8,ye[de+4]=St;var Zt=Number(ue>>BigInt(32)&BigInt(4294967295));return ye[de+3]=Zt,Zt=Zt>>8,ye[de+2]=Zt,Zt=Zt>>8,ye[de+1]=Zt,Zt=Zt>>8,ye[de]=Zt,de+8}T.prototype.writeBigUInt64LE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return _t(this,ue,de,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeBigUInt64BE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ct(this,ue,de,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeIntLE=function(ue,de,ht,Et){if(ue=+ue,de=de>>>0,!Et){var St=Math.pow(2,8*ht-1);xt(this,ue,de,ht,St-1,-St)}var Zt=0,qr=1,Lr=0;for(this[de]=ue&255;++Zt<ht&&(qr*=256);)ue<0&&Lr===0&&this[de+Zt-1]!==0&&(Lr=1),this[de+Zt]=(ue/qr>>0)-Lr&255;return de+ht},T.prototype.writeIntBE=function(ue,de,ht,Et){if(ue=+ue,de=de>>>0,!Et){var St=Math.pow(2,8*ht-1);xt(this,ue,de,ht,St-1,-St)}var Zt=ht-1,qr=1,Lr=0;for(this[de+Zt]=ue&255;--Zt>=0&&(qr*=256);)ue<0&&Lr===0&&this[de+Zt+1]!==0&&(Lr=1),this[de+Zt]=(ue/qr>>0)-Lr&255;return de+ht},T.prototype.writeInt8=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,1,127,-128),ue<0&&(ue=255+ue+1),this[de]=ue&255,de+1},T.prototype.writeInt16LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,32767,-32768),this[de]=ue&255,this[de+1]=ue>>>8,de+2},T.prototype.writeInt16BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,32767,-32768),this[de]=ue>>>8,this[de+1]=ue&255,de+2},T.prototype.writeInt32LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,2147483647,-2147483648),this[de]=ue&255,this[de+1]=ue>>>8,this[de+2]=ue>>>16,this[de+3]=ue>>>24,de+4},T.prototype.writeInt32BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,2147483647,-2147483648),ue<0&&(ue=4294967295+ue+1),this[de]=ue>>>24,this[de+1]=ue>>>16,this[de+2]=ue>>>8,this[de+3]=ue&255,de+4},T.prototype.writeBigInt64LE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return _t(this,ue,de,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),T.prototype.writeBigInt64BE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ct(this,ue,de,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function jt(ye,ue,de,ht,Et,St){if(de+ht>ye.length)throw new RangeError("Index out of range");if(de<0)throw new RangeError("Index out of range")}function At(ye,ue,de,ht,Et){return ue=+ue,de=de>>>0,Et||jt(ye,ue,de,4,34028234663852886e22,-34028234663852886e22),_.write(ye,ue,de,ht,23,4),de+4}T.prototype.writeFloatLE=function(ue,de,ht){return At(this,ue,de,!0,ht)},T.prototype.writeFloatBE=function(ue,de,ht){return At(this,ue,de,!1,ht)};function Te(ye,ue,de,ht,Et){return ue=+ue,de=de>>>0,Et||jt(ye,ue,de,8,17976931348623157e292,-17976931348623157e292),_.write(ye,ue,de,ht,52,8),de+8}T.prototype.writeDoubleLE=function(ue,de,ht){return Te(this,ue,de,!0,ht)},T.prototype.writeDoubleBE=function(ue,de,ht){return Te(this,ue,de,!1,ht)},T.prototype.copy=function(ue,de,ht,Et){if(!T.isBuffer(ue))throw new TypeError("argument should be a Buffer");if(ht||(ht=0),!Et&&Et!==0&&(Et=this.length),de>=ue.length&&(de=ue.length),de||(de=0),Et>0&&Et<ht&&(Et=ht),Et===ht||ue.length===0||this.length===0)return 0;if(de<0)throw new RangeError("targetStart out of bounds");if(ht<0||ht>=this.length)throw new RangeError("Index out of range");if(Et<0)throw new RangeError("sourceEnd out of bounds");Et>this.length&&(Et=this.length),ue.length-de<Et-ht&&(Et=ue.length-de+ht);var St=Et-ht;return this===ue&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(de,ht,Et):Uint8Array.prototype.set.call(ue,this.subarray(ht,Et),de),St},T.prototype.fill=function(ue,de,ht,Et){if(typeof ue=="string"){if(typeof de=="string"?(Et=de,de=0,ht=this.length):typeof ht=="string"&&(Et=ht,ht=this.length),Et!==void 0&&typeof Et!="string")throw new TypeError("encoding must be a string");if(typeof Et=="string"&&!T.isEncoding(Et))throw new TypeError("Unknown encoding: "+Et);if(ue.length===1){var St=ue.charCodeAt(0);(Et==="utf8"&&St<128||Et==="latin1")&&(ue=St)}}else typeof ue=="number"?ue=ue&255:typeof ue=="boolean"&&(ue=Number(ue));if(de<0||this.length<de||this.length<ht)throw new RangeError("Out of range index");if(ht<=de)return this;de=de>>>0,ht=ht===void 0?this.length:ht>>>0,ue||(ue=0);var Zt;if(typeof ue=="number")for(Zt=de;Zt<ht;++Zt)this[Zt]=ue;else{var qr=T.isBuffer(ue)?ue:T.from(ue,Et),Lr=qr.length;if(Lr===0)throw new TypeError('The value "'+ue+'" is invalid for argument "value"');for(Zt=0;Zt<ht-de;++Zt)this[Zt+de]=qr[Zt%Lr]}return this};var nt={};function ut(ye,ue,de){nt[ye]=function(ht){function Et(){var St;return u(this,Et),St=d(this,Et),Object.defineProperty(St,"message",{value:ue.apply(St,arguments),writable:!0,configurable:!0}),St.name="".concat(St.name," [").concat(ye,"]"),St.stack,delete St.name,St}return k(Et,ht),f(Et,[{key:"code",get:function(){return ye},set:function(Zt){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Zt,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(ye,"]: ").concat(this.message)}}])}(de)}ut("ERR_BUFFER_OUT_OF_BOUNDS",function(ye){return ye?"".concat(ye," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),ut("ERR_INVALID_ARG_TYPE",function(ye,ue){return'The "'.concat(ye,'" argument must be of type number. Received type ').concat(A(ue))},TypeError),ut("ERR_OUT_OF_RANGE",function(ye,ue,de){var ht='The value of "'.concat(ye,'" is out of range.'),Et=de;return Number.isInteger(de)&&Math.abs(de)>Math.pow(2,32)?Et=ct(String(de)):typeof de=="bigint"&&(Et=String(de),(de>Math.pow(BigInt(2),BigInt(32))||de<-Math.pow(BigInt(2),BigInt(32)))&&(Et=ct(Et)),Et+="n"),ht+=" It must be ".concat(ue,". Received ").concat(Et),ht},RangeError);function ct(ye){for(var ue="",de=ye.length,ht=ye[0]==="-"?1:0;de>=ht+4;de-=3)ue="_".concat(ye.slice(de-3,de)).concat(ue);return"".concat(ye.slice(0,de)).concat(ue)}function rt(ye,ue,de){tt(ue,"offset"),(ye[ue]===void 0||ye[ue+de]===void 0)&&Je(ue,ye.length-(de+1))}function je(ye,ue,de,ht,Et,St){if(ye>de||ye<ue){var Zt=typeof ue=="bigint"?"n":"",qr;throw St>3?ue===0||ue===BigInt(0)?qr=">= 0".concat(Zt," and < 2").concat(Zt," ** ").concat((St+1)*8).concat(Zt):qr=">= -(2".concat(Zt," ** ").concat((St+1)*8-1).concat(Zt,") and < 2 ** ")+"".concat((St+1)*8-1).concat(Zt):qr=">= ".concat(ue).concat(Zt," and <= ").concat(de).concat(Zt),new nt.ERR_OUT_OF_RANGE("value",qr,ye)}rt(ht,Et,St)}function tt(ye,ue){if(typeof ye!="number")throw new nt.ERR_INVALID_ARG_TYPE(ue,"number",ye)}function Je(ye,ue,de){throw Math.floor(ye)!==ye?(tt(ye,de),new nt.ERR_OUT_OF_RANGE(de||"offset","an integer",ye)):ue<0?new nt.ERR_BUFFER_OUT_OF_BOUNDS:new nt.ERR_OUT_OF_RANGE(de||"offset",">= ".concat(de?1:0," and <= ").concat(ue),ye)}var Mt=/[^+/0-9A-Za-z-_]/g;function Vt(ye){if(ye=ye.split("=")[0],ye=ye.trim().replace(Mt,""),ye.length<2)return"";for(;ye.length%4!==0;)ye=ye+"=";return ye}function Kt(ye,ue){ue=ue||1/0;for(var de,ht=ye.length,Et=null,St=[],Zt=0;Zt<ht;++Zt){if(de=ye.charCodeAt(Zt),de>55295&&de<57344){if(!Et){if(de>56319){(ue-=3)>-1&&St.push(239,191,189);continue}else if(Zt+1===ht){(ue-=3)>-1&&St.push(239,191,189);continue}Et=de;continue}if(de<56320){(ue-=3)>-1&&St.push(239,191,189),Et=de;continue}de=(Et-55296<<10|de-56320)+65536}else Et&&(ue-=3)>-1&&St.push(239,191,189);if(Et=null,de<128){if((ue-=1)<0)break;St.push(de)}else if(de<2048){if((ue-=2)<0)break;St.push(de>>6|192,de&63|128)}else if(de<65536){if((ue-=3)<0)break;St.push(de>>12|224,de>>6&63|128,de&63|128)}else if(de<1114112){if((ue-=4)<0)break;St.push(de>>18|240,de>>12&63|128,de>>6&63|128,de&63|128)}else throw new Error("Invalid code point")}return St}function ir(ye){for(var ue=[],de=0;de<ye.length;++de)ue.push(ye.charCodeAt(de)&255);return ue}function fr(ye,ue){for(var de,ht,Et,St=[],Zt=0;Zt<ye.length&&!((ue-=2)<0);++Zt)de=ye.charCodeAt(Zt),ht=de>>8,Et=de%256,St.push(Et),St.push(ht);return St}function Ot(ye){return L.toByteArray(Vt(ye))}function De(ye,ue,de,ht){var Et;for(Et=0;Et<ht&&!(Et+de>=ue.length||Et>=ye.length);++Et)ue[Et+de]=ye[Et];return Et}function _e(ye,ue){return ye instanceof ue||ye!=null&&ye.constructor!=null&&ye.constructor.name!=null&&ye.constructor.name===ue.name}function Fe(ye){return ye!==ye}var Pe=function(){for(var ye="0123456789abcdef",ue=new Array(256),de=0;de<16;++de)for(var ht=de*16,Et=0;Et<16;++Et)ue[ht+Et]=ye[de]+ye[Et];return ue}();function Ie(ye){return typeof BigInt=="undefined"?lt:ye}function lt(){throw new Error("BigInt not supported")}},9216:function(i){"use strict";i.exports=u,i.exports.isMobile=u,i.exports.default=u;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 u(l){l||(l={});var f=l.ua;if(!f&&typeof navigator!="undefined"&&(f=navigator.userAgent),f&&f.headers&&typeof f.headers["user-agent"]=="string"&&(f=f.headers["user-agent"]),typeof f!="string")return!1;var c=a.test(f)&&!o.test(f)||!!l.tablet&&s.test(f);return!c&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&f.indexOf("Macintosh")!==-1&&f.indexOf("Safari")!==-1&&(c=!0),c}},6296:function(i,a,o){"use strict";i.exports=h;var s=o(7261),u=o(9977),l=o(1811);function f(d,p){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(x){return d[x]}),this._mode=p,this._active=d[p],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 c=f.prototype;c.flush=function(d){for(var p=this._controllerList,x=0;x<p.length;++x)p[x].flush(d)},c.idle=function(d){for(var p=this._controllerList,x=0;x<p.length;++x)p[x].idle(d)},c.lookAt=function(d,p,x,b){for(var y=this._controllerList,k=0;k<y.length;++k)y[k].lookAt(d,p,x,b)},c.rotate=function(d,p,x,b){for(var y=this._controllerList,k=0;k<y.length;++k)y[k].rotate(d,p,x,b)},c.pan=function(d,p,x,b){for(var y=this._controllerList,k=0;k<y.length;++k)y[k].pan(d,p,x,b)},c.translate=function(d,p,x,b){for(var y=this._controllerList,k=0;k<y.length;++k)y[k].translate(d,p,x,b)},c.setMatrix=function(d,p){for(var x=this._controllerList,b=0;b<x.length;++b)x[b].setMatrix(d,p)},c.setDistanceLimits=function(d,p){for(var x=this._controllerList,b=0;b<x.length;++b)x[b].setDistanceLimits(d,p)},c.setDistance=function(d,p){for(var x=this._controllerList,b=0;b<x.length;++b)x[b].setDistance(d,p)},c.recalcMatrix=function(d){this._active.recalcMatrix(d)},c.getDistance=function(d){return this._active.getDistance(d)},c.getDistanceLimits=function(d){return this._active.getDistanceLimits(d)},c.lastT=function(){return this._active.lastT()},c.setMode=function(d){if(d!==this._mode){var p=this._controllerNames.indexOf(d);if(!(p<0)){var x=this._active,b=this._controllerList[p],y=Math.max(x.lastT(),b.lastT());x.recalcMatrix(y),b.setMatrix(y,x.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}}},c.getMode=function(){return this._mode};function h(d){d=d||{};var p=d.eye||[0,0,1],x=d.center||[0,0,0],b=d.up||[0,1,0],y=d.distanceLimits||[0,1/0],k=d.mode||"turntable",E=s(),A=u(),L=l();return E.setDistanceLimits(y[0],y[1]),E.lookAt(0,p,x,b),A.setDistanceLimits(y[0],y[1]),A.lookAt(0,p,x,b),L.setDistanceLimits(y[0],y[1]),L.lookAt(0,p,x,b),new f({turntable:E,orbit:A,matrix:L},k)}},7169:function(i,a,o){"use strict";var s=typeof WeakMap=="undefined"?o(1538):WeakMap,u=o(2762),l=o(8116),f=new s;function c(h){var d=f.get(h),p=d&&(d._triangleBuffer.handle||d._triangleBuffer.buffer);if(!p||!h.isBuffer(p)){var x=u(h,new Float32Array([-1,-1,-1,4,4,-1]));d=l(h,[{buffer:x,type:h.FLOAT,size:2}]),d._triangleBuffer=x,f.set(h,d)}d.bind(),h.drawArrays(h.TRIANGLES,0,3),d.unbind()}i.exports=c},1085:function(i,a,o){var s=o(1371);i.exports=u;function u(l,f,c){f=typeof f=="number"?f:1,c=c||": ";var h=l.split(/\r?\n/),d=String(h.length+f-1).length;return h.map(function(p,x){var b=x+f,y=String(b).length,k=s(b,d-y);return k+c+p}).join(`
`)}},3952:function(i,a,o){"use strict";i.exports=l;var s=o(3250);function u(f,c){for(var h=new Array(c+1),d=0;d<f.length;++d)h[d]=f[d];for(var d=0;d<=f.length;++d){for(var p=f.length;p<=c;++p){for(var x=new Array(c),b=0;b<c;++b)x[b]=Math.pow(p+1-d,b);h[p]=x}var y=s.apply(void 0,h);if(y)return!0}return!1}function l(f){var c=f.length;if(c===0)return[];if(c===1)return[0];for(var h=f[0].length,d=[f[0]],p=[0],x=1;x<c;++x){if(d.push(f[x]),!u(d,h)){d.pop();continue}if(p.push(x),p.length===h+1)return p}return p}},5995:function(i,a,o){"use strict";i.exports=l;var s=o(7642),u=o(6037);function l(f,c){return s(c).filter(function(h){for(var d=new Array(h.length),p=0;p<h.length;++p)d[p]=c[h[p]];return u(d)*f<1})}},3502:function(i,a,o){i.exports=l;var s=o(5995),u=o(9127);function l(f,c){return u(s(f,c))}},6468:function(i){i.exports=function(o){return atob(o)}},2642:function(i,a,o){"use strict";i.exports=l;var s=o(727);function u(f){for(var c=0,h=0;h<f.length;++h)c+=f[h];return c}function l(f,c){for(var h=c.length,d=new Array(h+1),p=0;p<h;++p){for(var x=new Array(h+1),b=0;b<=h;++b)x[b]=f[b][p];d[p]=x}d[h]=new Array(h+1);for(var p=0;p<=h;++p)d[h][p]=1;for(var y=new Array(h+1),p=0;p<h;++p)y[p]=c[p];y[h]=1;var k=s(d,y),E=u(k[h+1]);E===0&&(E=1);for(var A=new Array(h+1),p=0;p<=h;++p)A[p]=u(k[p])/E;return A}},7507:function(i,a){"use strict";a.byteLength=d,a.toByteArray=x,a.fromByteArray=k;for(var o=[],s=[],u=typeof Uint8Array!="undefined"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,c=l.length;f<c;++f)o[f]=l[f],s[l.charCodeAt(f)]=f;s[45]=62,s[95]=63;function h(E){var A=E.length;if(A%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var L=E.indexOf("=");L===-1&&(L=A);var _=L===A?0:4-L%4;return[L,_]}function d(E){var A=h(E),L=A[0],_=A[1];return(L+_)*3/4-_}function p(E,A,L){return(A+L)*3/4-L}function x(E){var A,L=h(E),_=L[0],C=L[1],M=new u(p(E,_,C)),v=0,z=C>0?_-4:_,T;for(T=0;T<z;T+=4)A=s[E.charCodeAt(T)]<<18|s[E.charCodeAt(T+1)]<<12|s[E.charCodeAt(T+2)]<<6|s[E.charCodeAt(T+3)],M[v++]=A>>16&255,M[v++]=A>>8&255,M[v++]=A&255;return C===2&&(A=s[E.charCodeAt(T)]<<2|s[E.charCodeAt(T+1)]>>4,M[v++]=A&255),C===1&&(A=s[E.charCodeAt(T)]<<10|s[E.charCodeAt(T+1)]<<4|s[E.charCodeAt(T+2)]>>2,M[v++]=A>>8&255,M[v++]=A&255),M}function b(E){return o[E>>18&63]+o[E>>12&63]+o[E>>6&63]+o[E&63]}function y(E,A,L){for(var _,C=[],M=A;M<L;M+=3)_=(E[M]<<16&16711680)+(E[M+1]<<8&65280)+(E[M+2]&255),C.push(b(_));return C.join("")}function k(E){for(var A,L=E.length,_=L%3,C=[],M=16383,v=0,z=L-_;v<z;v+=M)C.push(y(E,v,v+M>z?z:v+M));return _===1?(A=E[L-1],C.push(o[A>>2]+o[A<<4&63]+"==")):_===2&&(A=(E[L-2]<<8)+E[L-1],C.push(o[A>>10]+o[A>>4&63]+o[A<<2&63]+"=")),C.join("")}},3865:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[1]).add(f[0].mul(l[1])),l[1].mul(f[1]))}},1318:function(i){"use strict";i.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[1]),l[1].mul(f[0]))}},7842:function(i,a,o){"use strict";var s=o(6330),u=o(1533),l=o(2651),f=o(6768),c=o(869),h=o(8697);i.exports=d;function d(p,x){if(s(p))return x?h(p,d(x)):[p[0].clone(),p[1].clone()];var b=0,y,k;if(u(p))y=p.clone();else if(typeof p=="string")y=f(p);else{if(p===0)return[l(0),l(1)];if(p===Math.floor(p))y=l(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),b-=256;y=l(p)}}if(s(x))y.mul(x[1]),k=x[0].clone();else if(u(x))k=x.clone();else if(typeof x=="string")k=f(x);else if(!x)k=l(1);else if(x===Math.floor(x))k=l(x);else{for(;x!==Math.floor(x);)x=x*Math.pow(2,256),b+=256;k=l(x)}return b>0?y=y.ushln(b):b<0&&(k=k.ushln(-b)),c(y,k)}},6330:function(i,a,o){"use strict";var s=o(1533);i.exports=u;function u(l){return Array.isArray(l)&&l.length===2&&s(l[0])&&s(l[1])}},5716:function(i,a,o){"use strict";var s=o(6859);i.exports=u;function u(l){return l.cmp(new s(0))}},1369:function(i,a,o){"use strict";var s=o(5716);i.exports=u;function u(l){var f=l.length,c=l.words,h=0;if(f===1)h=c[0];else if(f===2)h=c[0]+c[1]*67108864;else for(var d=0;d<f;d++){var p=c[d];h+=p*Math.pow(67108864,d)}return s(l)*h}},4025:function(i,a,o){"use strict";var s=o(2361),u=o(8828).countTrailingZeros;i.exports=l;function l(f){var c=u(s.lo(f));if(c<32)return c;var h=u(s.hi(f));return h>20?52:h+32}},1533:function(i,a,o){"use strict";var s=o(6859);i.exports=u;function u(l){return l&&typeof l=="object"&&!!l.words}},2651:function(i,a,o){"use strict";var s=o(6859),u=o(2361);i.exports=l;function l(f){var c=u.exponent(f);return c<52?new s(f):new s(f*Math.pow(2,52-c)).ushln(c-52)}},869:function(i,a,o){"use strict";var s=o(2651),u=o(5716);i.exports=l;function l(f,c){var h=u(f),d=u(c);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<0&&(f=f.neg(),c=c.neg());var p=f.gcd(c);return p.cmpn(1)?[f.div(p),c.div(p)]:[f,c]}},6768:function(i,a,o){"use strict";var s=o(6859);i.exports=u;function u(l){return new s(l)}},6504:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[0]),l[1].mul(f[1]))}},7721:function(i,a,o){"use strict";var s=o(5716);i.exports=u;function u(l){return s(l[0])*s(l[1])}},5572:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[1]).sub(l[1].mul(f[0])),l[1].mul(f[1]))}},946:function(i,a,o){"use strict";var s=o(1369),u=o(4025);i.exports=l;function l(f){var c=f[0],h=f[1];if(c.cmpn(0)===0)return 0;var d=c.abs().divmod(h.abs()),p=d.div,x=s(p),b=d.mod,y=c.negative!==h.negative?-1:1;if(b.cmpn(0)===0)return y*x;if(x){var k=u(x)+4,E=s(b.ushln(k).divRound(h));return y*(x+E*Math.pow(2,-k))}else{var A=h.bitLength()-b.bitLength()+53,E=s(b.ushln(A).divRound(h));return A<1023?y*E*Math.pow(2,-A):(E*=Math.pow(2,-1023),y*E*Math.pow(2,1023-A))}}},2478:function(i){"use strict";function a(c,h,d,p,x){for(var b=x+1;p<=x;){var y=p+x>>>1,k=c[y],E=d!==void 0?d(k,h):k-h;E>=0?(b=y,x=y-1):p=y+1}return b}function o(c,h,d,p,x){for(var b=x+1;p<=x;){var y=p+x>>>1,k=c[y],E=d!==void 0?d(k,h):k-h;E>0?(b=y,x=y-1):p=y+1}return b}function s(c,h,d,p,x){for(var b=p-1;p<=x;){var y=p+x>>>1,k=c[y],E=d!==void 0?d(k,h):k-h;E<0?(b=y,p=y+1):x=y-1}return b}function u(c,h,d,p,x){for(var b=p-1;p<=x;){var y=p+x>>>1,k=c[y],E=d!==void 0?d(k,h):k-h;E<=0?(b=y,p=y+1):x=y-1}return b}function l(c,h,d,p,x){for(;p<=x;){var b=p+x>>>1,y=c[b],k=d!==void 0?d(y,h):y-h;if(k===0)return b;k<=0?p=b+1:x=b-1}return-1}function f(c,h,d,p,x,b){return typeof d=="function"?b(c,h,d,p===void 0?0:p|0,x===void 0?c.length-1:x|0):b(c,h,void 0,d===void 0?0:d|0,p===void 0?c.length-1:p|0)}i.exports={ge:function(c,h,d,p,x){return f(c,h,d,p,x,a)},gt:function(c,h,d,p,x){return f(c,h,d,p,x,o)},lt:function(c,h,d,p,x){return f(c,h,d,p,x,s)},le:function(c,h,d,p,x){return f(c,h,d,p,x,u)},eq:function(c,h,d,p,x){return f(c,h,d,p,x,l)}}},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(l){return(l>0)-(l<0)},a.abs=function(l){var f=l>>o-1;return(l^f)-f},a.min=function(l,f){return f^(l^f)&-(l<f)},a.max=function(l,f){return l^(l^f)&-(l<f)},a.isPow2=function(l){return!(l&l-1)&&!!l},a.log2=function(l){var f,c;return f=(l>65535)<<4,l>>>=f,c=(l>255)<<3,l>>>=c,f|=c,c=(l>15)<<2,l>>>=c,f|=c,c=(l>3)<<1,l>>>=c,f|=c,f|l>>1},a.log10=function(l){return l>=1e9?9:l>=1e8?8:l>=1e7?7:l>=1e6?6:l>=1e5?5:l>=1e4?4:l>=1e3?3:l>=100?2:l>=10?1:0},a.popCount=function(l){return l=l-(l>>>1&1431655765),l=(l&858993459)+(l>>>2&858993459),(l+(l>>>4)&252645135)*16843009>>>24};function s(l){var f=32;return l&=-l,l&&f--,l&65535&&(f-=16),l&16711935&&(f-=8),l&252645135&&(f-=4),l&858993459&&(f-=2),l&1431655765&&(f-=1),f}a.countTrailingZeros=s,a.nextPow2=function(l){return l+=l===0,--l,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l+1},a.prevPow2=function(l){return l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l-(l>>>1)},a.parity=function(l){return l^=l>>>16,l^=l>>>8,l^=l>>>4,l&=15,27030>>>l&1};var u=new Array(256);(function(l){for(var f=0;f<256;++f){var c=f,h=f,d=7;for(c>>>=1;c;c>>>=1)h<<=1,h|=c&1,--d;l[f]=h<<d&255}})(u),a.reverse=function(l){return u[l&255]<<24|u[l>>>8&255]<<16|u[l>>>16&255]<<8|u[l>>>24&255]},a.interleave2=function(l,f){return l&=65535,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,l|f<<1},a.deinterleave2=function(l,f){return l=l>>>f&1431655765,l=(l|l>>>1)&858993459,l=(l|l>>>2)&252645135,l=(l|l>>>4)&16711935,l=(l|l>>>16)&65535,l<<16>>16},a.interleave3=function(l,f,c){return l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,l|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,l|c<<2},a.deinterleave3=function(l,f){return l=l>>>f&1227133513,l=(l|l>>>2)&3272356035,l=(l|l>>>4)&251719695,l=(l|l>>>8)&4278190335,l=(l|l>>>16)&1023,l<<22>>22},a.nextCombination=function(l){var f=l|l-1;return f+1|(~f&-~f)-1>>>s(l)+1}},6859:function(i,a,o){i=o.nmd(i),function(s,u){"use strict";function l(G,O){if(!G)throw new Error(O||"Assertion failed")}function f(G,O){G.super_=O;var W=function(){};W.prototype=O.prototype,G.prototype=new W,G.prototype.constructor=G}function c(G,O,W){if(c.isBN(G))return G;this.negative=0,this.words=null,this.length=0,this.red=null,G!==null&&((O==="le"||O==="be")&&(W=O,O=10),this._init(G||0,O||10,W||"be"))}typeof s=="object"?s.exports=c:u.BN=c,c.BN=c,c.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(G){}c.isBN=function(O){return O instanceof c?!0:O!==null&&typeof O=="object"&&O.constructor.wordSize===c.wordSize&&Array.isArray(O.words)},c.max=function(O,W){return O.cmp(W)>0?O:W},c.min=function(O,W){return O.cmp(W)<0?O:W},c.prototype._init=function(O,W,re){if(typeof O=="number")return this._initNumber(O,W,re);if(typeof O=="object")return this._initArray(O,W,re);W==="hex"&&(W=16),l(W===(W|0)&&W>=2&&W<=36),O=O.toString().replace(/\s+/g,"");var ne=0;O[0]==="-"&&(ne++,this.negative=1),ne<O.length&&(W===16?this._parseHex(O,ne,re):(this._parseBase(O,W,ne),re==="le"&&this._initArray(this.toArray(),W,re)))},c.prototype._initNumber=function(O,W,re){O<0&&(this.negative=1,O=-O),O<67108864?(this.words=[O&67108863],this.length=1):O<4503599627370496?(this.words=[O&67108863,O/67108864&67108863],this.length=2):(l(O<9007199254740992),this.words=[O&67108863,O/67108864&67108863,1],this.length=3),re==="le"&&this._initArray(this.toArray(),W,re)},c.prototype._initArray=function(O,W,re){if(l(typeof O.length=="number"),O.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(O.length/3),this.words=new Array(this.length);for(var ne=0;ne<this.length;ne++)this.words[ne]=0;var be,ze,Ce=0;if(re==="be")for(ne=O.length-1,be=0;ne>=0;ne-=3)ze=O[ne]|O[ne-1]<<8|O[ne-2]<<16,this.words[be]|=ze<<Ce&67108863,this.words[be+1]=ze>>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,be++);else if(re==="le")for(ne=0,be=0;ne<O.length;ne+=3)ze=O[ne]|O[ne+1]<<8|O[ne+2]<<16,this.words[be]|=ze<<Ce&67108863,this.words[be+1]=ze>>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,be++);return this.strip()};function d(G,O){var W=G.charCodeAt(O);return W>=65&&W<=70?W-55:W>=97&&W<=102?W-87:W-48&15}function p(G,O,W){var re=d(G,W);return W-1>=O&&(re|=d(G,W-1)<<4),re}c.prototype._parseHex=function(O,W,re){this.length=Math.ceil((O.length-W)/6),this.words=new Array(this.length);for(var ne=0;ne<this.length;ne++)this.words[ne]=0;var be=0,ze=0,Ce;if(re==="be")for(ne=O.length-1;ne>=W;ne-=2)Ce=p(O,W,ne)<<be,this.words[ze]|=Ce&67108863,be>=18?(be-=18,ze+=1,this.words[ze]|=Ce>>>26):be+=8;else{var he=O.length-W;for(ne=he%2===0?W+1:W;ne<O.length;ne+=2)Ce=p(O,W,ne)<<be,this.words[ze]|=Ce&67108863,be>=18?(be-=18,ze+=1,this.words[ze]|=Ce>>>26):be+=8}this.strip()};function x(G,O,W,re){for(var ne=0,be=Math.min(G.length,W),ze=O;ze<be;ze++){var Ce=G.charCodeAt(ze)-48;ne*=re,Ce>=49?ne+=Ce-49+10:Ce>=17?ne+=Ce-17+10:ne+=Ce}return ne}c.prototype._parseBase=function(O,W,re){this.words=[0],this.length=1;for(var ne=0,be=1;be<=67108863;be*=W)ne++;ne--,be=be/W|0;for(var ze=O.length-re,Ce=ze%ne,he=Math.min(ze,ze-Ce)+re,te=0,ke=re;ke<he;ke+=ne)te=x(O,ke,ke+ne,W),this.imuln(be),this.words[0]+te<67108864?this.words[0]+=te:this._iaddn(te);if(Ce!==0){var Ee=1;for(te=x(O,ke,O.length,W),ke=0;ke<Ce;ke++)Ee*=W;this.imuln(Ee),this.words[0]+te<67108864?this.words[0]+=te:this._iaddn(te)}this.strip()},c.prototype.copy=function(O){O.words=new Array(this.length);for(var W=0;W<this.length;W++)O.words[W]=this.words[W];O.length=this.length,O.negative=this.negative,O.red=this.red},c.prototype.clone=function(){var O=new c(null);return this.copy(O),O},c.prototype._expand=function(O){for(;this.length<O;)this.words[this.length++]=0;return this},c.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.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"],y=[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];c.prototype.toString=function(O,W){O=O||10,W=W|0||1;var re;if(O===16||O==="hex"){re="";for(var ne=0,be=0,ze=0;ze<this.length;ze++){var Ce=this.words[ze],he=((Ce<<ne|be)&16777215).toString(16);be=Ce>>>24-ne&16777215,be!==0||ze!==this.length-1?re=b[6-he.length]+he+re:re=he+re,ne+=2,ne>=26&&(ne-=26,ze--)}for(be!==0&&(re=be.toString(16)+re);re.length%W!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}if(O===(O|0)&&O>=2&&O<=36){var te=y[O],ke=k[O];re="";var Ee=this.clone();for(Ee.negative=0;!Ee.isZero();){var Me=Ee.modn(ke).toString(O);Ee=Ee.idivn(ke),Ee.isZero()?re=Me+re:re=b[te-Me.length]+Me+re}for(this.isZero()&&(re="0"+re);re.length%W!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}l(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var O=this.words[0];return this.length===2?O+=this.words[1]*67108864:this.length===3&&this.words[2]===1?O+=4503599627370496+this.words[1]*67108864:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-O:O},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(O,W){return l(typeof h!="undefined"),this.toArrayLike(h,O,W)},c.prototype.toArray=function(O,W){return this.toArrayLike(Array,O,W)},c.prototype.toArrayLike=function(O,W,re){var ne=this.byteLength(),be=re||Math.max(1,ne);l(ne<=be,"byte array longer than desired length"),l(be>0,"Requested array length <= 0"),this.strip();var ze=W==="le",Ce=new O(be),he,te,ke=this.clone();if(ze){for(te=0;!ke.isZero();te++)he=ke.andln(255),ke.iushrn(8),Ce[te]=he;for(;te<be;te++)Ce[te]=0}else{for(te=0;te<be-ne;te++)Ce[te]=0;for(te=0;!ke.isZero();te++)he=ke.andln(255),ke.iushrn(8),Ce[be-te-1]=he}return Ce},Math.clz32?c.prototype._countBits=function(O){return 32-Math.clz32(O)}:c.prototype._countBits=function(O){var W=O,re=0;return W>=4096&&(re+=13,W>>>=13),W>=64&&(re+=7,W>>>=7),W>=8&&(re+=4,W>>>=4),W>=2&&(re+=2,W>>>=2),re+W},c.prototype._zeroBits=function(O){if(O===0)return 26;var W=O,re=0;return W&8191||(re+=13,W>>>=13),W&127||(re+=7,W>>>=7),W&15||(re+=4,W>>>=4),W&3||(re+=2,W>>>=2),W&1||re++,re},c.prototype.bitLength=function(){var O=this.words[this.length-1],W=this._countBits(O);return(this.length-1)*26+W};function E(G){for(var O=new Array(G.bitLength()),W=0;W<O.length;W++){var re=W/26|0,ne=W%26;O[W]=(G.words[re]&1<<ne)>>>ne}return O}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,W=0;W<this.length;W++){var re=this._zeroBits(this.words[W]);if(O+=re,re!==26)break}return O},c.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},c.prototype.toTwos=function(O){return this.negative!==0?this.abs().inotn(O).iaddn(1):this.clone()},c.prototype.fromTwos=function(O){return this.testn(O-1)?this.notn(O).iaddn(1).ineg():this.clone()},c.prototype.isNeg=function(){return this.negative!==0},c.prototype.neg=function(){return this.clone().ineg()},c.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},c.prototype.iuor=function(O){for(;this.length<O.length;)this.words[this.length++]=0;for(var W=0;W<O.length;W++)this.words[W]=this.words[W]|O.words[W];return this.strip()},c.prototype.ior=function(O){return l((this.negative|O.negative)===0),this.iuor(O)},c.prototype.or=function(O){return this.length>O.length?this.clone().ior(O):O.clone().ior(this)},c.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},c.prototype.iuand=function(O){var W;this.length>O.length?W=O:W=this;for(var re=0;re<W.length;re++)this.words[re]=this.words[re]&O.words[re];return this.length=W.length,this.strip()},c.prototype.iand=function(O){return l((this.negative|O.negative)===0),this.iuand(O)},c.prototype.and=function(O){return this.length>O.length?this.clone().iand(O):O.clone().iand(this)},c.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},c.prototype.iuxor=function(O){var W,re;this.length>O.length?(W=this,re=O):(W=O,re=this);for(var ne=0;ne<re.length;ne++)this.words[ne]=W.words[ne]^re.words[ne];if(this!==W)for(;ne<W.length;ne++)this.words[ne]=W.words[ne];return this.length=W.length,this.strip()},c.prototype.ixor=function(O){return l((this.negative|O.negative)===0),this.iuxor(O)},c.prototype.xor=function(O){return this.length>O.length?this.clone().ixor(O):O.clone().ixor(this)},c.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},c.prototype.inotn=function(O){l(typeof O=="number"&&O>=0);var W=Math.ceil(O/26)|0,re=O%26;this._expand(W),re>0&&W--;for(var ne=0;ne<W;ne++)this.words[ne]=~this.words[ne]&67108863;return re>0&&(this.words[ne]=~this.words[ne]&67108863>>26-re),this.strip()},c.prototype.notn=function(O){return this.clone().inotn(O)},c.prototype.setn=function(O,W){l(typeof O=="number"&&O>=0);var re=O/26|0,ne=O%26;return this._expand(re+1),W?this.words[re]=this.words[re]|1<<ne:this.words[re]=this.words[re]&~(1<<ne),this.strip()},c.prototype.iadd=function(O){var W;if(this.negative!==0&&O.negative===0)return this.negative=0,W=this.isub(O),this.negative^=1,this._normSign();if(this.negative===0&&O.negative!==0)return O.negative=0,W=this.isub(O),O.negative=1,W._normSign();var re,ne;this.length>O.length?(re=this,ne=O):(re=O,ne=this);for(var be=0,ze=0;ze<ne.length;ze++)W=(re.words[ze]|0)+(ne.words[ze]|0)+be,this.words[ze]=W&67108863,be=W>>>26;for(;be!==0&&ze<re.length;ze++)W=(re.words[ze]|0)+be,this.words[ze]=W&67108863,be=W>>>26;if(this.length=re.length,be!==0)this.words[this.length]=be,this.length++;else if(re!==this)for(;ze<re.length;ze++)this.words[ze]=re.words[ze];return this},c.prototype.add=function(O){var W;return O.negative!==0&&this.negative===0?(O.negative=0,W=this.sub(O),O.negative^=1,W):O.negative===0&&this.negative!==0?(this.negative=0,W=O.sub(this),this.negative=1,W):this.length>O.length?this.clone().iadd(O):O.clone().iadd(this)},c.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var W=this.iadd(O);return O.negative=1,W._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var re=this.cmp(O);if(re===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ne,be;re>0?(ne=this,be=O):(ne=O,be=this);for(var ze=0,Ce=0;Ce<be.length;Ce++)W=(ne.words[Ce]|0)-(be.words[Ce]|0)+ze,ze=W>>26,this.words[Ce]=W&67108863;for(;ze!==0&&Ce<ne.length;Ce++)W=(ne.words[Ce]|0)+ze,ze=W>>26,this.words[Ce]=W&67108863;if(ze===0&&Ce<ne.length&&ne!==this)for(;Ce<ne.length;Ce++)this.words[Ce]=ne.words[Ce];return this.length=Math.max(this.length,Ce),ne!==this&&(this.negative=1),this.strip()},c.prototype.sub=function(O){return this.clone().isub(O)};function A(G,O,W){W.negative=O.negative^G.negative;var re=G.length+O.length|0;W.length=re,re=re-1|0;var ne=G.words[0]|0,be=O.words[0]|0,ze=ne*be,Ce=ze&67108863,he=ze/67108864|0;W.words[0]=Ce;for(var te=1;te<re;te++){for(var ke=he>>>26,Ee=he&67108863,Me=Math.min(te,O.length-1),Oe=Math.max(0,te-G.length+1);Oe<=Me;Oe++){var Re=te-Oe|0;ne=G.words[Re]|0,be=O.words[Oe]|0,ze=ne*be+Ee,ke+=ze/67108864|0,Ee=ze&67108863}W.words[te]=Ee|0,he=ke|0}return he!==0?W.words[te]=he|0:W.length--,W.strip()}var L=function(O,W,re){var ne=O.words,be=W.words,ze=re.words,Ce=0,he,te,ke,Ee=ne[0]|0,Me=Ee&8191,Oe=Ee>>>13,Re=ne[1]|0,me=Re&8191,Be=Re>>>13,fe=ne[2]|0,Ze=fe&8191,et=fe>>>13,gt=ne[3]|0,Pt=gt&8191,Qe=gt>>>13,Xe=ne[4]|0,Tt=Xe&8191,xt=Xe>>>13,_t=ne[5]|0,Ct=_t&8191,jt=_t>>>13,At=ne[6]|0,Te=At&8191,nt=At>>>13,ut=ne[7]|0,ct=ut&8191,rt=ut>>>13,je=ne[8]|0,tt=je&8191,Je=je>>>13,Mt=ne[9]|0,Vt=Mt&8191,Kt=Mt>>>13,ir=be[0]|0,fr=ir&8191,Ot=ir>>>13,De=be[1]|0,_e=De&8191,Fe=De>>>13,Pe=be[2]|0,Ie=Pe&8191,lt=Pe>>>13,ye=be[3]|0,ue=ye&8191,de=ye>>>13,ht=be[4]|0,Et=ht&8191,St=ht>>>13,Zt=be[5]|0,qr=Zt&8191,Lr=Zt>>>13,vr=be[6]|0,Er=vr&8191,si=vr>>>13,Ei=be[7]|0,Si=Ei&8191,xi=Ei>>>13,Hi=be[8]|0,Jr=Hi&8191,ci=Hi>>>13,Di=be[9]|0,Lt=Di&8191,vt=Di>>>13;re.negative=O.negative^W.negative,re.length=19,he=Math.imul(Me,fr),te=Math.imul(Me,Ot),te=te+Math.imul(Oe,fr)|0,ke=Math.imul(Oe,Ot);var Dt=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,he=Math.imul(me,fr),te=Math.imul(me,Ot),te=te+Math.imul(Be,fr)|0,ke=Math.imul(Be,Ot),he=he+Math.imul(Me,_e)|0,te=te+Math.imul(Me,Fe)|0,te=te+Math.imul(Oe,_e)|0,ke=ke+Math.imul(Oe,Fe)|0;var Bt=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,he=Math.imul(Ze,fr),te=Math.imul(Ze,Ot),te=te+Math.imul(et,fr)|0,ke=Math.imul(et,Ot),he=he+Math.imul(me,_e)|0,te=te+Math.imul(me,Fe)|0,te=te+Math.imul(Be,_e)|0,ke=ke+Math.imul(Be,Fe)|0,he=he+Math.imul(Me,Ie)|0,te=te+Math.imul(Me,lt)|0,te=te+Math.imul(Oe,Ie)|0,ke=ke+Math.imul(Oe,lt)|0;var sr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(sr>>>26)|0,sr&=67108863,he=Math.imul(Pt,fr),te=Math.imul(Pt,Ot),te=te+Math.imul(Qe,fr)|0,ke=Math.imul(Qe,Ot),he=he+Math.imul(Ze,_e)|0,te=te+Math.imul(Ze,Fe)|0,te=te+Math.imul(et,_e)|0,ke=ke+Math.imul(et,Fe)|0,he=he+Math.imul(me,Ie)|0,te=te+Math.imul(me,lt)|0,te=te+Math.imul(Be,Ie)|0,ke=ke+Math.imul(Be,lt)|0,he=he+Math.imul(Me,ue)|0,te=te+Math.imul(Me,de)|0,te=te+Math.imul(Oe,ue)|0,ke=ke+Math.imul(Oe,de)|0;var br=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(br>>>26)|0,br&=67108863,he=Math.imul(Tt,fr),te=Math.imul(Tt,Ot),te=te+Math.imul(xt,fr)|0,ke=Math.imul(xt,Ot),he=he+Math.imul(Pt,_e)|0,te=te+Math.imul(Pt,Fe)|0,te=te+Math.imul(Qe,_e)|0,ke=ke+Math.imul(Qe,Fe)|0,he=he+Math.imul(Ze,Ie)|0,te=te+Math.imul(Ze,lt)|0,te=te+Math.imul(et,Ie)|0,ke=ke+Math.imul(et,lt)|0,he=he+Math.imul(me,ue)|0,te=te+Math.imul(me,de)|0,te=te+Math.imul(Be,ue)|0,ke=ke+Math.imul(Be,de)|0,he=he+Math.imul(Me,Et)|0,te=te+Math.imul(Me,St)|0,te=te+Math.imul(Oe,Et)|0,ke=ke+Math.imul(Oe,St)|0;var zr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(zr>>>26)|0,zr&=67108863,he=Math.imul(Ct,fr),te=Math.imul(Ct,Ot),te=te+Math.imul(jt,fr)|0,ke=Math.imul(jt,Ot),he=he+Math.imul(Tt,_e)|0,te=te+Math.imul(Tt,Fe)|0,te=te+Math.imul(xt,_e)|0,ke=ke+Math.imul(xt,Fe)|0,he=he+Math.imul(Pt,Ie)|0,te=te+Math.imul(Pt,lt)|0,te=te+Math.imul(Qe,Ie)|0,ke=ke+Math.imul(Qe,lt)|0,he=he+Math.imul(Ze,ue)|0,te=te+Math.imul(Ze,de)|0,te=te+Math.imul(et,ue)|0,ke=ke+Math.imul(et,de)|0,he=he+Math.imul(me,Et)|0,te=te+Math.imul(me,St)|0,te=te+Math.imul(Be,Et)|0,ke=ke+Math.imul(Be,St)|0,he=he+Math.imul(Me,qr)|0,te=te+Math.imul(Me,Lr)|0,te=te+Math.imul(Oe,qr)|0,ke=ke+Math.imul(Oe,Lr)|0;var Tr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,he=Math.imul(Te,fr),te=Math.imul(Te,Ot),te=te+Math.imul(nt,fr)|0,ke=Math.imul(nt,Ot),he=he+Math.imul(Ct,_e)|0,te=te+Math.imul(Ct,Fe)|0,te=te+Math.imul(jt,_e)|0,ke=ke+Math.imul(jt,Fe)|0,he=he+Math.imul(Tt,Ie)|0,te=te+Math.imul(Tt,lt)|0,te=te+Math.imul(xt,Ie)|0,ke=ke+Math.imul(xt,lt)|0,he=he+Math.imul(Pt,ue)|0,te=te+Math.imul(Pt,de)|0,te=te+Math.imul(Qe,ue)|0,ke=ke+Math.imul(Qe,de)|0,he=he+Math.imul(Ze,Et)|0,te=te+Math.imul(Ze,St)|0,te=te+Math.imul(et,Et)|0,ke=ke+Math.imul(et,St)|0,he=he+Math.imul(me,qr)|0,te=te+Math.imul(me,Lr)|0,te=te+Math.imul(Be,qr)|0,ke=ke+Math.imul(Be,Lr)|0,he=he+Math.imul(Me,Er)|0,te=te+Math.imul(Me,si)|0,te=te+Math.imul(Oe,Er)|0,ke=ke+Math.imul(Oe,si)|0;var Rr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,he=Math.imul(ct,fr),te=Math.imul(ct,Ot),te=te+Math.imul(rt,fr)|0,ke=Math.imul(rt,Ot),he=he+Math.imul(Te,_e)|0,te=te+Math.imul(Te,Fe)|0,te=te+Math.imul(nt,_e)|0,ke=ke+Math.imul(nt,Fe)|0,he=he+Math.imul(Ct,Ie)|0,te=te+Math.imul(Ct,lt)|0,te=te+Math.imul(jt,Ie)|0,ke=ke+Math.imul(jt,lt)|0,he=he+Math.imul(Tt,ue)|0,te=te+Math.imul(Tt,de)|0,te=te+Math.imul(xt,ue)|0,ke=ke+Math.imul(xt,de)|0,he=he+Math.imul(Pt,Et)|0,te=te+Math.imul(Pt,St)|0,te=te+Math.imul(Qe,Et)|0,ke=ke+Math.imul(Qe,St)|0,he=he+Math.imul(Ze,qr)|0,te=te+Math.imul(Ze,Lr)|0,te=te+Math.imul(et,qr)|0,ke=ke+Math.imul(et,Lr)|0,he=he+Math.imul(me,Er)|0,te=te+Math.imul(me,si)|0,te=te+Math.imul(Be,Er)|0,ke=ke+Math.imul(Be,si)|0,he=he+Math.imul(Me,Si)|0,te=te+Math.imul(Me,xi)|0,te=te+Math.imul(Oe,Si)|0,ke=ke+Math.imul(Oe,xi)|0;var Br=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Br>>>26)|0,Br&=67108863,he=Math.imul(tt,fr),te=Math.imul(tt,Ot),te=te+Math.imul(Je,fr)|0,ke=Math.imul(Je,Ot),he=he+Math.imul(ct,_e)|0,te=te+Math.imul(ct,Fe)|0,te=te+Math.imul(rt,_e)|0,ke=ke+Math.imul(rt,Fe)|0,he=he+Math.imul(Te,Ie)|0,te=te+Math.imul(Te,lt)|0,te=te+Math.imul(nt,Ie)|0,ke=ke+Math.imul(nt,lt)|0,he=he+Math.imul(Ct,ue)|0,te=te+Math.imul(Ct,de)|0,te=te+Math.imul(jt,ue)|0,ke=ke+Math.imul(jt,de)|0,he=he+Math.imul(Tt,Et)|0,te=te+Math.imul(Tt,St)|0,te=te+Math.imul(xt,Et)|0,ke=ke+Math.imul(xt,St)|0,he=he+Math.imul(Pt,qr)|0,te=te+Math.imul(Pt,Lr)|0,te=te+Math.imul(Qe,qr)|0,ke=ke+Math.imul(Qe,Lr)|0,he=he+Math.imul(Ze,Er)|0,te=te+Math.imul(Ze,si)|0,te=te+Math.imul(et,Er)|0,ke=ke+Math.imul(et,si)|0,he=he+Math.imul(me,Si)|0,te=te+Math.imul(me,xi)|0,te=te+Math.imul(Be,Si)|0,ke=ke+Math.imul(Be,xi)|0,he=he+Math.imul(Me,Jr)|0,te=te+Math.imul(Me,ci)|0,te=te+Math.imul(Oe,Jr)|0,ke=ke+Math.imul(Oe,ci)|0;var oi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(oi>>>26)|0,oi&=67108863,he=Math.imul(Vt,fr),te=Math.imul(Vt,Ot),te=te+Math.imul(Kt,fr)|0,ke=Math.imul(Kt,Ot),he=he+Math.imul(tt,_e)|0,te=te+Math.imul(tt,Fe)|0,te=te+Math.imul(Je,_e)|0,ke=ke+Math.imul(Je,Fe)|0,he=he+Math.imul(ct,Ie)|0,te=te+Math.imul(ct,lt)|0,te=te+Math.imul(rt,Ie)|0,ke=ke+Math.imul(rt,lt)|0,he=he+Math.imul(Te,ue)|0,te=te+Math.imul(Te,de)|0,te=te+Math.imul(nt,ue)|0,ke=ke+Math.imul(nt,de)|0,he=he+Math.imul(Ct,Et)|0,te=te+Math.imul(Ct,St)|0,te=te+Math.imul(jt,Et)|0,ke=ke+Math.imul(jt,St)|0,he=he+Math.imul(Tt,qr)|0,te=te+Math.imul(Tt,Lr)|0,te=te+Math.imul(xt,qr)|0,ke=ke+Math.imul(xt,Lr)|0,he=he+Math.imul(Pt,Er)|0,te=te+Math.imul(Pt,si)|0,te=te+Math.imul(Qe,Er)|0,ke=ke+Math.imul(Qe,si)|0,he=he+Math.imul(Ze,Si)|0,te=te+Math.imul(Ze,xi)|0,te=te+Math.imul(et,Si)|0,ke=ke+Math.imul(et,xi)|0,he=he+Math.imul(me,Jr)|0,te=te+Math.imul(me,ci)|0,te=te+Math.imul(Be,Jr)|0,ke=ke+Math.imul(Be,ci)|0,he=he+Math.imul(Me,Lt)|0,te=te+Math.imul(Me,vt)|0,te=te+Math.imul(Oe,Lt)|0,ke=ke+Math.imul(Oe,vt)|0;var vi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(vi>>>26)|0,vi&=67108863,he=Math.imul(Vt,_e),te=Math.imul(Vt,Fe),te=te+Math.imul(Kt,_e)|0,ke=Math.imul(Kt,Fe),he=he+Math.imul(tt,Ie)|0,te=te+Math.imul(tt,lt)|0,te=te+Math.imul(Je,Ie)|0,ke=ke+Math.imul(Je,lt)|0,he=he+Math.imul(ct,ue)|0,te=te+Math.imul(ct,de)|0,te=te+Math.imul(rt,ue)|0,ke=ke+Math.imul(rt,de)|0,he=he+Math.imul(Te,Et)|0,te=te+Math.imul(Te,St)|0,te=te+Math.imul(nt,Et)|0,ke=ke+Math.imul(nt,St)|0,he=he+Math.imul(Ct,qr)|0,te=te+Math.imul(Ct,Lr)|0,te=te+Math.imul(jt,qr)|0,ke=ke+Math.imul(jt,Lr)|0,he=he+Math.imul(Tt,Er)|0,te=te+Math.imul(Tt,si)|0,te=te+Math.imul(xt,Er)|0,ke=ke+Math.imul(xt,si)|0,he=he+Math.imul(Pt,Si)|0,te=te+Math.imul(Pt,xi)|0,te=te+Math.imul(Qe,Si)|0,ke=ke+Math.imul(Qe,xi)|0,he=he+Math.imul(Ze,Jr)|0,te=te+Math.imul(Ze,ci)|0,te=te+Math.imul(et,Jr)|0,ke=ke+Math.imul(et,ci)|0,he=he+Math.imul(me,Lt)|0,te=te+Math.imul(me,vt)|0,te=te+Math.imul(Be,Lt)|0,ke=ke+Math.imul(Be,vt)|0;var Pi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,he=Math.imul(Vt,Ie),te=Math.imul(Vt,lt),te=te+Math.imul(Kt,Ie)|0,ke=Math.imul(Kt,lt),he=he+Math.imul(tt,ue)|0,te=te+Math.imul(tt,de)|0,te=te+Math.imul(Je,ue)|0,ke=ke+Math.imul(Je,de)|0,he=he+Math.imul(ct,Et)|0,te=te+Math.imul(ct,St)|0,te=te+Math.imul(rt,Et)|0,ke=ke+Math.imul(rt,St)|0,he=he+Math.imul(Te,qr)|0,te=te+Math.imul(Te,Lr)|0,te=te+Math.imul(nt,qr)|0,ke=ke+Math.imul(nt,Lr)|0,he=he+Math.imul(Ct,Er)|0,te=te+Math.imul(Ct,si)|0,te=te+Math.imul(jt,Er)|0,ke=ke+Math.imul(jt,si)|0,he=he+Math.imul(Tt,Si)|0,te=te+Math.imul(Tt,xi)|0,te=te+Math.imul(xt,Si)|0,ke=ke+Math.imul(xt,xi)|0,he=he+Math.imul(Pt,Jr)|0,te=te+Math.imul(Pt,ci)|0,te=te+Math.imul(Qe,Jr)|0,ke=ke+Math.imul(Qe,ci)|0,he=he+Math.imul(Ze,Lt)|0,te=te+Math.imul(Ze,vt)|0,te=te+Math.imul(et,Lt)|0,ke=ke+Math.imul(et,vt)|0;var Yr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,he=Math.imul(Vt,ue),te=Math.imul(Vt,de),te=te+Math.imul(Kt,ue)|0,ke=Math.imul(Kt,de),he=he+Math.imul(tt,Et)|0,te=te+Math.imul(tt,St)|0,te=te+Math.imul(Je,Et)|0,ke=ke+Math.imul(Je,St)|0,he=he+Math.imul(ct,qr)|0,te=te+Math.imul(ct,Lr)|0,te=te+Math.imul(rt,qr)|0,ke=ke+Math.imul(rt,Lr)|0,he=he+Math.imul(Te,Er)|0,te=te+Math.imul(Te,si)|0,te=te+Math.imul(nt,Er)|0,ke=ke+Math.imul(nt,si)|0,he=he+Math.imul(Ct,Si)|0,te=te+Math.imul(Ct,xi)|0,te=te+Math.imul(jt,Si)|0,ke=ke+Math.imul(jt,xi)|0,he=he+Math.imul(Tt,Jr)|0,te=te+Math.imul(Tt,ci)|0,te=te+Math.imul(xt,Jr)|0,ke=ke+Math.imul(xt,ci)|0,he=he+Math.imul(Pt,Lt)|0,te=te+Math.imul(Pt,vt)|0,te=te+Math.imul(Qe,Lt)|0,ke=ke+Math.imul(Qe,vt)|0;var Ni=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Ni>>>26)|0,Ni&=67108863,he=Math.imul(Vt,Et),te=Math.imul(Vt,St),te=te+Math.imul(Kt,Et)|0,ke=Math.imul(Kt,St),he=he+Math.imul(tt,qr)|0,te=te+Math.imul(tt,Lr)|0,te=te+Math.imul(Je,qr)|0,ke=ke+Math.imul(Je,Lr)|0,he=he+Math.imul(ct,Er)|0,te=te+Math.imul(ct,si)|0,te=te+Math.imul(rt,Er)|0,ke=ke+Math.imul(rt,si)|0,he=he+Math.imul(Te,Si)|0,te=te+Math.imul(Te,xi)|0,te=te+Math.imul(nt,Si)|0,ke=ke+Math.imul(nt,xi)|0,he=he+Math.imul(Ct,Jr)|0,te=te+Math.imul(Ct,ci)|0,te=te+Math.imul(jt,Jr)|0,ke=ke+Math.imul(jt,ci)|0,he=he+Math.imul(Tt,Lt)|0,te=te+Math.imul(Tt,vt)|0,te=te+Math.imul(xt,Lt)|0,ke=ke+Math.imul(xt,vt)|0;var Ur=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,he=Math.imul(Vt,qr),te=Math.imul(Vt,Lr),te=te+Math.imul(Kt,qr)|0,ke=Math.imul(Kt,Lr),he=he+Math.imul(tt,Er)|0,te=te+Math.imul(tt,si)|0,te=te+Math.imul(Je,Er)|0,ke=ke+Math.imul(Je,si)|0,he=he+Math.imul(ct,Si)|0,te=te+Math.imul(ct,xi)|0,te=te+Math.imul(rt,Si)|0,ke=ke+Math.imul(rt,xi)|0,he=he+Math.imul(Te,Jr)|0,te=te+Math.imul(Te,ci)|0,te=te+Math.imul(nt,Jr)|0,ke=ke+Math.imul(nt,ci)|0,he=he+Math.imul(Ct,Lt)|0,te=te+Math.imul(Ct,vt)|0,te=te+Math.imul(jt,Lt)|0,ke=ke+Math.imul(jt,vt)|0;var ti=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(ti>>>26)|0,ti&=67108863,he=Math.imul(Vt,Er),te=Math.imul(Vt,si),te=te+Math.imul(Kt,Er)|0,ke=Math.imul(Kt,si),he=he+Math.imul(tt,Si)|0,te=te+Math.imul(tt,xi)|0,te=te+Math.imul(Je,Si)|0,ke=ke+Math.imul(Je,xi)|0,he=he+Math.imul(ct,Jr)|0,te=te+Math.imul(ct,ci)|0,te=te+Math.imul(rt,Jr)|0,ke=ke+Math.imul(rt,ci)|0,he=he+Math.imul(Te,Lt)|0,te=te+Math.imul(Te,vt)|0,te=te+Math.imul(nt,Lt)|0,ke=ke+Math.imul(nt,vt)|0;var ki=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(ki>>>26)|0,ki&=67108863,he=Math.imul(Vt,Si),te=Math.imul(Vt,xi),te=te+Math.imul(Kt,Si)|0,ke=Math.imul(Kt,xi),he=he+Math.imul(tt,Jr)|0,te=te+Math.imul(tt,ci)|0,te=te+Math.imul(Je,Jr)|0,ke=ke+Math.imul(Je,ci)|0,he=he+Math.imul(ct,Lt)|0,te=te+Math.imul(ct,vt)|0,te=te+Math.imul(rt,Lt)|0,ke=ke+Math.imul(rt,vt)|0;var ji=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(ji>>>26)|0,ji&=67108863,he=Math.imul(Vt,Jr),te=Math.imul(Vt,ci),te=te+Math.imul(Kt,Jr)|0,ke=Math.imul(Kt,ci),he=he+Math.imul(tt,Lt)|0,te=te+Math.imul(tt,vt)|0,te=te+Math.imul(Je,Lt)|0,ke=ke+Math.imul(Je,vt)|0;var Vi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,he=Math.imul(Vt,Lt),te=Math.imul(Vt,vt),te=te+Math.imul(Kt,Lt)|0,ke=Math.imul(Kt,vt);var zi=(Ce+he|0)+((te&8191)<<13)|0;return Ce=(ke+(te>>>13)|0)+(zi>>>26)|0,zi&=67108863,ze[0]=Dt,ze[1]=Bt,ze[2]=sr,ze[3]=br,ze[4]=zr,ze[5]=Tr,ze[6]=Rr,ze[7]=Br,ze[8]=oi,ze[9]=vi,ze[10]=Pi,ze[11]=Yr,ze[12]=Ni,ze[13]=Ur,ze[14]=ti,ze[15]=ki,ze[16]=ji,ze[17]=Vi,ze[18]=zi,Ce!==0&&(ze[19]=Ce,re.length++),re};Math.imul||(L=A);function _(G,O,W){W.negative=O.negative^G.negative,W.length=G.length+O.length;for(var re=0,ne=0,be=0;be<W.length-1;be++){var ze=ne;ne=0;for(var Ce=re&67108863,he=Math.min(be,O.length-1),te=Math.max(0,be-G.length+1);te<=he;te++){var ke=be-te,Ee=G.words[ke]|0,Me=O.words[te]|0,Oe=Ee*Me,Re=Oe&67108863;ze=ze+(Oe/67108864|0)|0,Re=Re+Ce|0,Ce=Re&67108863,ze=ze+(Re>>>26)|0,ne+=ze>>>26,ze&=67108863}W.words[be]=Ce,re=ze,ze=ne}return re!==0?W.words[be]=re:W.length--,W.strip()}function C(G,O,W){var re=new M;return re.mulp(G,O,W)}c.prototype.mulTo=function(O,W){var re,ne=this.length+O.length;return this.length===10&&O.length===10?re=L(this,O,W):ne<63?re=A(this,O,W):ne<1024?re=_(this,O,W):re=C(this,O,W),re};function M(G,O){this.x=G,this.y=O}M.prototype.makeRBT=function(O){for(var W=new Array(O),re=c.prototype._countBits(O)-1,ne=0;ne<O;ne++)W[ne]=this.revBin(ne,re,O);return W},M.prototype.revBin=function(O,W,re){if(O===0||O===re-1)return O;for(var ne=0,be=0;be<W;be++)ne|=(O&1)<<W-be-1,O>>=1;return ne},M.prototype.permute=function(O,W,re,ne,be,ze){for(var Ce=0;Ce<ze;Ce++)ne[Ce]=W[O[Ce]],be[Ce]=re[O[Ce]]},M.prototype.transform=function(O,W,re,ne,be,ze){this.permute(ze,O,W,re,ne,be);for(var Ce=1;Ce<be;Ce<<=1)for(var he=Ce<<1,te=Math.cos(2*Math.PI/he),ke=Math.sin(2*Math.PI/he),Ee=0;Ee<be;Ee+=he)for(var Me=te,Oe=ke,Re=0;Re<Ce;Re++){var me=re[Ee+Re],Be=ne[Ee+Re],fe=re[Ee+Re+Ce],Ze=ne[Ee+Re+Ce],et=Me*fe-Oe*Ze;Ze=Me*Ze+Oe*fe,fe=et,re[Ee+Re]=me+fe,ne[Ee+Re]=Be+Ze,re[Ee+Re+Ce]=me-fe,ne[Ee+Re+Ce]=Be-Ze,Re!==he&&(et=te*Me-ke*Oe,Oe=te*Oe+ke*Me,Me=et)}},M.prototype.guessLen13b=function(O,W){var re=Math.max(W,O)|1,ne=re&1,be=0;for(re=re/2|0;re;re=re>>>1)be++;return 1<<be+1+ne},M.prototype.conjugate=function(O,W,re){if(!(re<=1))for(var ne=0;ne<re/2;ne++){var be=O[ne];O[ne]=O[re-ne-1],O[re-ne-1]=be,be=W[ne],W[ne]=-W[re-ne-1],W[re-ne-1]=-be}},M.prototype.normalize13b=function(O,W){for(var re=0,ne=0;ne<W/2;ne++){var be=Math.round(O[2*ne+1]/W)*8192+Math.round(O[2*ne]/W)+re;O[ne]=be&67108863,be<67108864?re=0:re=be/67108864|0}return O},M.prototype.convert13b=function(O,W,re,ne){for(var be=0,ze=0;ze<W;ze++)be=be+(O[ze]|0),re[2*ze]=be&8191,be=be>>>13,re[2*ze+1]=be&8191,be=be>>>13;for(ze=2*W;ze<ne;++ze)re[ze]=0;l(be===0),l((be&-8192)===0)},M.prototype.stub=function(O){for(var W=new Array(O),re=0;re<O;re++)W[re]=0;return W},M.prototype.mulp=function(O,W,re){var ne=2*this.guessLen13b(O.length,W.length),be=this.makeRBT(ne),ze=this.stub(ne),Ce=new Array(ne),he=new Array(ne),te=new Array(ne),ke=new Array(ne),Ee=new Array(ne),Me=new Array(ne),Oe=re.words;Oe.length=ne,this.convert13b(O.words,O.length,Ce,ne),this.convert13b(W.words,W.length,ke,ne),this.transform(Ce,ze,he,te,ne,be),this.transform(ke,ze,Ee,Me,ne,be);for(var Re=0;Re<ne;Re++){var me=he[Re]*Ee[Re]-te[Re]*Me[Re];te[Re]=he[Re]*Me[Re]+te[Re]*Ee[Re],he[Re]=me}return this.conjugate(he,te,ne),this.transform(he,te,Oe,ze,ne,be),this.conjugate(Oe,ze,ne),this.normalize13b(Oe,ne),re.negative=O.negative^W.negative,re.length=O.length+W.length,re.strip()},c.prototype.mul=function(O){var W=new c(null);return W.words=new Array(this.length+O.length),this.mulTo(O,W)},c.prototype.mulf=function(O){var W=new c(null);return W.words=new Array(this.length+O.length),C(this,O,W)},c.prototype.imul=function(O){return this.clone().mulTo(O,this)},c.prototype.imuln=function(O){l(typeof O=="number"),l(O<67108864);for(var W=0,re=0;re<this.length;re++){var ne=(this.words[re]|0)*O,be=(ne&67108863)+(W&67108863);W>>=26,W+=ne/67108864|0,W+=be>>>26,this.words[re]=be&67108863}return W!==0&&(this.words[re]=W,this.length++),this},c.prototype.muln=function(O){return this.clone().imuln(O)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(O){var W=E(O);if(W.length===0)return new c(1);for(var re=this,ne=0;ne<W.length&&W[ne]===0;ne++,re=re.sqr());if(++ne<W.length)for(var be=re.sqr();ne<W.length;ne++,be=be.sqr())W[ne]!==0&&(re=re.mul(be));return re},c.prototype.iushln=function(O){l(typeof O=="number"&&O>=0);var W=O%26,re=(O-W)/26,ne=67108863>>>26-W<<26-W,be;if(W!==0){var ze=0;for(be=0;be<this.length;be++){var Ce=this.words[be]&ne,he=(this.words[be]|0)-Ce<<W;this.words[be]=he|ze,ze=Ce>>>26-W}ze&&(this.words[be]=ze,this.length++)}if(re!==0){for(be=this.length-1;be>=0;be--)this.words[be+re]=this.words[be];for(be=0;be<re;be++)this.words[be]=0;this.length+=re}return this.strip()},c.prototype.ishln=function(O){return l(this.negative===0),this.iushln(O)},c.prototype.iushrn=function(O,W,re){l(typeof O=="number"&&O>=0);var ne;W?ne=(W-W%26)/26:ne=0;var be=O%26,ze=Math.min((O-be)/26,this.length),Ce=67108863^67108863>>>be<<be,he=re;if(ne-=ze,ne=Math.max(0,ne),he){for(var te=0;te<ze;te++)he.words[te]=this.words[te];he.length=ze}if(ze!==0)if(this.length>ze)for(this.length-=ze,te=0;te<this.length;te++)this.words[te]=this.words[te+ze];else this.words[0]=0,this.length=1;var ke=0;for(te=this.length-1;te>=0&&(ke!==0||te>=ne);te--){var Ee=this.words[te]|0;this.words[te]=ke<<26-be|Ee>>>be,ke=Ee&Ce}return he&&ke!==0&&(he.words[he.length++]=ke),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(O,W,re){return l(this.negative===0),this.iushrn(O,W,re)},c.prototype.shln=function(O){return this.clone().ishln(O)},c.prototype.ushln=function(O){return this.clone().iushln(O)},c.prototype.shrn=function(O){return this.clone().ishrn(O)},c.prototype.ushrn=function(O){return this.clone().iushrn(O)},c.prototype.testn=function(O){l(typeof O=="number"&&O>=0);var W=O%26,re=(O-W)/26,ne=1<<W;if(this.length<=re)return!1;var be=this.words[re];return!!(be&ne)},c.prototype.imaskn=function(O){l(typeof O=="number"&&O>=0);var W=O%26,re=(O-W)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=re)return this;if(W!==0&&re++,this.length=Math.min(re,this.length),W!==0){var ne=67108863^67108863>>>W<<W;this.words[this.length-1]&=ne}return this.strip()},c.prototype.maskn=function(O){return this.clone().imaskn(O)},c.prototype.iaddn=function(O){return l(typeof O=="number"),l(O<67108864),O<0?this.isubn(-O):this.negative!==0?this.length===1&&(this.words[0]|0)<O?(this.words[0]=O-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(O),this.negative=1,this):this._iaddn(O)},c.prototype._iaddn=function(O){this.words[0]+=O;for(var W=0;W<this.length&&this.words[W]>=67108864;W++)this.words[W]-=67108864,W===this.length-1?this.words[W+1]=1:this.words[W+1]++;return this.length=Math.max(this.length,W+1),this},c.prototype.isubn=function(O){if(l(typeof O=="number"),l(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var W=0;W<this.length&&this.words[W]<0;W++)this.words[W]+=67108864,this.words[W+1]-=1;return this.strip()},c.prototype.addn=function(O){return this.clone().iaddn(O)},c.prototype.subn=function(O){return this.clone().isubn(O)},c.prototype.iabs=function(){return this.negative=0,this},c.prototype.abs=function(){return this.clone().iabs()},c.prototype._ishlnsubmul=function(O,W,re){var ne=O.length+re,be;this._expand(ne);var ze,Ce=0;for(be=0;be<O.length;be++){ze=(this.words[be+re]|0)+Ce;var he=(O.words[be]|0)*W;ze-=he&67108863,Ce=(ze>>26)-(he/67108864|0),this.words[be+re]=ze&67108863}for(;be<this.length-re;be++)ze=(this.words[be+re]|0)+Ce,Ce=ze>>26,this.words[be+re]=ze&67108863;if(Ce===0)return this.strip();for(l(Ce===-1),Ce=0,be=0;be<this.length;be++)ze=-(this.words[be]|0)+Ce,Ce=ze>>26,this.words[be]=ze&67108863;return this.negative=1,this.strip()},c.prototype._wordDiv=function(O,W){var re=this.length-O.length,ne=this.clone(),be=O,ze=be.words[be.length-1]|0,Ce=this._countBits(ze);re=26-Ce,re!==0&&(be=be.ushln(re),ne.iushln(re),ze=be.words[be.length-1]|0);var he=ne.length-be.length,te;if(W!=="mod"){te=new c(null),te.length=he+1,te.words=new Array(te.length);for(var ke=0;ke<te.length;ke++)te.words[ke]=0}var Ee=ne.clone()._ishlnsubmul(be,1,he);Ee.negative===0&&(ne=Ee,te&&(te.words[he]=1));for(var Me=he-1;Me>=0;Me--){var Oe=(ne.words[be.length+Me]|0)*67108864+(ne.words[be.length+Me-1]|0);for(Oe=Math.min(Oe/ze|0,67108863),ne._ishlnsubmul(be,Oe,Me);ne.negative!==0;)Oe--,ne.negative=0,ne._ishlnsubmul(be,1,Me),ne.isZero()||(ne.negative^=1);te&&(te.words[Me]=Oe)}return te&&te.strip(),ne.strip(),W!=="div"&&re!==0&&ne.iushrn(re),{div:te||null,mod:ne}},c.prototype.divmod=function(O,W,re){if(l(!O.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var ne,be,ze;return this.negative!==0&&O.negative===0?(ze=this.neg().divmod(O,W),W!=="mod"&&(ne=ze.div.neg()),W!=="div"&&(be=ze.mod.neg(),re&&be.negative!==0&&be.iadd(O)),{div:ne,mod:be}):this.negative===0&&O.negative!==0?(ze=this.divmod(O.neg(),W),W!=="mod"&&(ne=ze.div.neg()),{div:ne,mod:ze.mod}):this.negative&O.negative?(ze=this.neg().divmod(O.neg(),W),W!=="div"&&(be=ze.mod.neg(),re&&be.negative!==0&&be.isub(O)),{div:ze.div,mod:be}):O.length>this.length||this.cmp(O)<0?{div:new c(0),mod:this}:O.length===1?W==="div"?{div:this.divn(O.words[0]),mod:null}:W==="mod"?{div:null,mod:new c(this.modn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new c(this.modn(O.words[0]))}:this._wordDiv(O,W)},c.prototype.div=function(O){return this.divmod(O,"div",!1).div},c.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},c.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},c.prototype.divRound=function(O){var W=this.divmod(O);if(W.mod.isZero())return W.div;var re=W.div.negative!==0?W.mod.isub(O):W.mod,ne=O.ushrn(1),be=O.andln(1),ze=re.cmp(ne);return ze<0||be===1&&ze===0?W.div:W.div.negative!==0?W.div.isubn(1):W.div.iaddn(1)},c.prototype.modn=function(O){l(O<=67108863);for(var W=(1<<26)%O,re=0,ne=this.length-1;ne>=0;ne--)re=(W*re+(this.words[ne]|0))%O;return re},c.prototype.idivn=function(O){l(O<=67108863);for(var W=0,re=this.length-1;re>=0;re--){var ne=(this.words[re]|0)+W*67108864;this.words[re]=ne/O|0,W=ne%O}return this.strip()},c.prototype.divn=function(O){return this.clone().idivn(O)},c.prototype.egcd=function(O){l(O.negative===0),l(!O.isZero());var W=this,re=O.clone();W.negative!==0?W=W.umod(O):W=W.clone();for(var ne=new c(1),be=new c(0),ze=new c(0),Ce=new c(1),he=0;W.isEven()&&re.isEven();)W.iushrn(1),re.iushrn(1),++he;for(var te=re.clone(),ke=W.clone();!W.isZero();){for(var Ee=0,Me=1;!(W.words[0]&Me)&&Ee<26;++Ee,Me<<=1);if(Ee>0)for(W.iushrn(Ee);Ee-- >0;)(ne.isOdd()||be.isOdd())&&(ne.iadd(te),be.isub(ke)),ne.iushrn(1),be.iushrn(1);for(var Oe=0,Re=1;!(re.words[0]&Re)&&Oe<26;++Oe,Re<<=1);if(Oe>0)for(re.iushrn(Oe);Oe-- >0;)(ze.isOdd()||Ce.isOdd())&&(ze.iadd(te),Ce.isub(ke)),ze.iushrn(1),Ce.iushrn(1);W.cmp(re)>=0?(W.isub(re),ne.isub(ze),be.isub(Ce)):(re.isub(W),ze.isub(ne),Ce.isub(be))}return{a:ze,b:Ce,gcd:re.iushln(he)}},c.prototype._invmp=function(O){l(O.negative===0),l(!O.isZero());var W=this,re=O.clone();W.negative!==0?W=W.umod(O):W=W.clone();for(var ne=new c(1),be=new c(0),ze=re.clone();W.cmpn(1)>0&&re.cmpn(1)>0;){for(var Ce=0,he=1;!(W.words[0]&he)&&Ce<26;++Ce,he<<=1);if(Ce>0)for(W.iushrn(Ce);Ce-- >0;)ne.isOdd()&&ne.iadd(ze),ne.iushrn(1);for(var te=0,ke=1;!(re.words[0]&ke)&&te<26;++te,ke<<=1);if(te>0)for(re.iushrn(te);te-- >0;)be.isOdd()&&be.iadd(ze),be.iushrn(1);W.cmp(re)>=0?(W.isub(re),ne.isub(be)):(re.isub(W),be.isub(ne))}var Ee;return W.cmpn(1)===0?Ee=ne:Ee=be,Ee.cmpn(0)<0&&Ee.iadd(O),Ee},c.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var W=this.clone(),re=O.clone();W.negative=0,re.negative=0;for(var ne=0;W.isEven()&&re.isEven();ne++)W.iushrn(1),re.iushrn(1);do{for(;W.isEven();)W.iushrn(1);for(;re.isEven();)re.iushrn(1);var be=W.cmp(re);if(be<0){var ze=W;W=re,re=ze}else if(be===0||re.cmpn(1)===0)break;W.isub(re)}while(!0);return re.iushln(ne)},c.prototype.invm=function(O){return this.egcd(O).a.umod(O)},c.prototype.isEven=function(){return(this.words[0]&1)===0},c.prototype.isOdd=function(){return(this.words[0]&1)===1},c.prototype.andln=function(O){return this.words[0]&O},c.prototype.bincn=function(O){l(typeof O=="number");var W=O%26,re=(O-W)/26,ne=1<<W;if(this.length<=re)return this._expand(re+1),this.words[re]|=ne,this;for(var be=ne,ze=re;be!==0&&ze<this.length;ze++){var Ce=this.words[ze]|0;Ce+=be,be=Ce>>>26,Ce&=67108863,this.words[ze]=Ce}return be!==0&&(this.words[ze]=be,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(O){var W=O<0;if(this.negative!==0&&!W)return-1;if(this.negative===0&&W)return 1;this.strip();var re;if(this.length>1)re=1;else{W&&(O=-O),l(O<=67108863,"Number is too big");var ne=this.words[0]|0;re=ne===O?0:ne<O?-1:1}return this.negative!==0?-re|0:re},c.prototype.cmp=function(O){if(this.negative!==0&&O.negative===0)return-1;if(this.negative===0&&O.negative!==0)return 1;var W=this.ucmp(O);return this.negative!==0?-W|0:W},c.prototype.ucmp=function(O){if(this.length>O.length)return 1;if(this.length<O.length)return-1;for(var W=0,re=this.length-1;re>=0;re--){var ne=this.words[re]|0,be=O.words[re]|0;if(ne!==be){ne<be?W=-1:ne>be&&(W=1);break}}return W},c.prototype.gtn=function(O){return this.cmpn(O)===1},c.prototype.gt=function(O){return this.cmp(O)===1},c.prototype.gten=function(O){return this.cmpn(O)>=0},c.prototype.gte=function(O){return this.cmp(O)>=0},c.prototype.ltn=function(O){return this.cmpn(O)===-1},c.prototype.lt=function(O){return this.cmp(O)===-1},c.prototype.lten=function(O){return this.cmpn(O)<=0},c.prototype.lte=function(O){return this.cmp(O)<=0},c.prototype.eqn=function(O){return this.cmpn(O)===0},c.prototype.eq=function(O){return this.cmp(O)===0},c.red=function(O){return new H(O)},c.prototype.toRed=function(O){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},c.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(O){return this.red=O,this},c.prototype.forceRed=function(O){return l(!this.red,"Already a number in reduction context"),this._forceRed(O)},c.prototype.redAdd=function(O){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},c.prototype.redIAdd=function(O){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},c.prototype.redSub=function(O){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},c.prototype.redISub=function(O){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},c.prototype.redShl=function(O){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},c.prototype.redMul=function(O){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},c.prototype.redIMul=function(O){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},c.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(O){return l(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var v={k256:null,p224:null,p192:null,p25519:null};function z(G,O){this.name=G,this.p=new c(O,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var O=new c(null);return O.words=new Array(Math.ceil(this.n/13)),O},z.prototype.ireduce=function(O){var W=O,re;do this.split(W,this.tmp),W=this.imulK(W),W=W.iadd(this.tmp),re=W.bitLength();while(re>this.n);var ne=re<this.n?-1:W.ucmp(this.p);return ne===0?(W.words[0]=0,W.length=1):ne>0?W.isub(this.p):W.strip!==void 0?W.strip():W._strip(),W},z.prototype.split=function(O,W){O.iushrn(this.n,0,W)},z.prototype.imulK=function(O){return O.imul(this.k)};function T(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}f(T,z),T.prototype.split=function(O,W){for(var re=4194303,ne=Math.min(O.length,9),be=0;be<ne;be++)W.words[be]=O.words[be];if(W.length=ne,O.length<=9){O.words[0]=0,O.length=1;return}var ze=O.words[9];for(W.words[W.length++]=ze&re,be=10;be<O.length;be++){var Ce=O.words[be]|0;O.words[be-10]=(Ce&re)<<4|ze>>>22,ze=Ce}ze>>>=22,O.words[be-10]=ze,ze===0&&O.length>10?O.length-=10:O.length-=9},T.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var W=0,re=0;re<O.length;re++){var ne=O.words[re]|0;W+=ne*977,O.words[re]=W&67108863,W=ne*64+(W/67108864|0)}return O.words[O.length-1]===0&&(O.length--,O.words[O.length-1]===0&&O.length--),O};function F(){z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}f(F,z);function q(){z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}f(q,z);function U(){z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}f(U,z),U.prototype.imulK=function(O){for(var W=0,re=0;re<O.length;re++){var ne=(O.words[re]|0)*19+W,be=ne&67108863;ne>>>=26,O.words[re]=be,W=ne}return W!==0&&(O.words[O.length++]=W),O},c._prime=function(O){if(v[O])return v[O];var W;if(O==="k256")W=new T;else if(O==="p224")W=new F;else if(O==="p192")W=new q;else if(O==="p25519")W=new U;else throw new Error("Unknown prime "+O);return v[O]=W,W};function H(G){if(typeof G=="string"){var O=c._prime(G);this.m=O.p,this.prime=O}else l(G.gtn(1),"modulus must be greater than 1"),this.m=G,this.prime=null}H.prototype._verify1=function(O){l(O.negative===0,"red works only with positives"),l(O.red,"red works only with red numbers")},H.prototype._verify2=function(O,W){l((O.negative|W.negative)===0,"red works only with positives"),l(O.red&&O.red===W.red,"red works only with red numbers")},H.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):O.umod(this.m)._forceRed(this)},H.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},H.prototype.add=function(O,W){this._verify2(O,W);var re=O.add(W);return re.cmp(this.m)>=0&&re.isub(this.m),re._forceRed(this)},H.prototype.iadd=function(O,W){this._verify2(O,W);var re=O.iadd(W);return re.cmp(this.m)>=0&&re.isub(this.m),re},H.prototype.sub=function(O,W){this._verify2(O,W);var re=O.sub(W);return re.cmpn(0)<0&&re.iadd(this.m),re._forceRed(this)},H.prototype.isub=function(O,W){this._verify2(O,W);var re=O.isub(W);return re.cmpn(0)<0&&re.iadd(this.m),re},H.prototype.shl=function(O,W){return this._verify1(O),this.imod(O.ushln(W))},H.prototype.imul=function(O,W){return this._verify2(O,W),this.imod(O.imul(W))},H.prototype.mul=function(O,W){return this._verify2(O,W),this.imod(O.mul(W))},H.prototype.isqr=function(O){return this.imul(O,O.clone())},H.prototype.sqr=function(O){return this.mul(O,O)},H.prototype.sqrt=function(O){if(O.isZero())return O.clone();var W=this.m.andln(3);if(l(W%2===1),W===3){var re=this.m.add(new c(1)).iushrn(2);return this.pow(O,re)}for(var ne=this.m.subn(1),be=0;!ne.isZero()&&ne.andln(1)===0;)be++,ne.iushrn(1);l(!ne.isZero());var ze=new c(1).toRed(this),Ce=ze.redNeg(),he=this.m.subn(1).iushrn(1),te=this.m.bitLength();for(te=new c(2*te*te).toRed(this);this.pow(te,he).cmp(Ce)!==0;)te.redIAdd(Ce);for(var ke=this.pow(te,ne),Ee=this.pow(O,ne.addn(1).iushrn(1)),Me=this.pow(O,ne),Oe=be;Me.cmp(ze)!==0;){for(var Re=Me,me=0;Re.cmp(ze)!==0;me++)Re=Re.redSqr();l(me<Oe);var Be=this.pow(ke,new c(1).iushln(Oe-me-1));Ee=Ee.redMul(Be),ke=Be.redSqr(),Me=Me.redMul(ke),Oe=me}return Ee},H.prototype.invm=function(O){var W=O._invmp(this.m);return W.negative!==0?(W.negative=0,this.imod(W).redNeg()):this.imod(W)},H.prototype.pow=function(O,W){if(W.isZero())return new c(1).toRed(this);if(W.cmpn(1)===0)return O.clone();var re=4,ne=new Array(1<<re);ne[0]=new c(1).toRed(this),ne[1]=O;for(var be=2;be<ne.length;be++)ne[be]=this.mul(ne[be-1],O);var ze=ne[0],Ce=0,he=0,te=W.bitLength()%26;for(te===0&&(te=26),be=W.length-1;be>=0;be--){for(var ke=W.words[be],Ee=te-1;Ee>=0;Ee--){var Me=ke>>Ee&1;if(ze!==ne[0]&&(ze=this.sqr(ze)),Me===0&&Ce===0){he=0;continue}Ce<<=1,Ce|=Me,he++,!(he!==re&&(be!==0||Ee!==0))&&(ze=this.mul(ze,ne[Ce]),he=0,Ce=0)}te=26}return ze},H.prototype.convertTo=function(O){var W=O.umod(this.m);return W===O?W.clone():W},H.prototype.convertFrom=function(O){var W=O.clone();return W.red=null,W},c.mont=function(O){return new j(O)};function j(G){H.call(this,G),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(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)}f(j,H),j.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},j.prototype.convertFrom=function(O){var W=this.imod(O.mul(this.rinv));return W.red=null,W},j.prototype.imul=function(O,W){if(O.isZero()||W.isZero())return O.words[0]=0,O.length=1,O;var re=O.imul(W),ne=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),be=re.isub(ne).iushrn(this.shift),ze=be;return be.cmp(this.m)>=0?ze=be.isub(this.m):be.cmpn(0)<0&&(ze=be.iadd(this.m)),ze._forceRed(this)},j.prototype.mul=function(O,W){if(O.isZero()||W.isZero())return new c(0)._forceRed(this);var re=O.mul(W),ne=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),be=re.isub(ne).iushrn(this.shift),ze=be;return be.cmp(this.m)>=0?ze=be.isub(this.m):be.cmpn(0)<0&&(ze=be.iadd(this.m)),ze._forceRed(this)},j.prototype.invm=function(O){var W=this.imod(O._invmp(this.m).mul(this.r2));return W._forceRed(this)}}(i,this)},6204:function(i){"use strict";i.exports=a;function a(o){var s,u,l,f=o.length,c=0;for(s=0;s<f;++s)c+=o[s].length;var h=new Array(c),d=0;for(s=0;s<f;++s){var p=o[s],x=p.length;for(u=0;u<x;++u){var b=h[d++]=new Array(x-1),y=0;for(l=0;l<x;++l)l!==u&&(b[y++]=p[l]);if(u&1){var k=b[1];b[1]=b[0],b[0]=k}}}return h}},6867:function(i,a,o){"use strict";i.exports=y;var s=o(1888),u=o(855),l=o(7150);function f(k,E){for(var A=0;A<k;++A)if(!(E[A]<=E[A+k]))return!0;return!1}function c(k,E,A,L){for(var _=0,C=0,M=0,v=k.length;M<v;++M){var z=k[M];if(!f(E,z)){for(var T=0;T<2*E;++T)A[_++]=z[T];L[C++]=M}}return C}function h(k,E,A,L){var _=k.length,C=E.length;if(!(_<=0||C<=0)){var M=k[0].length>>>1;if(!(M<=0)){var v,z=s.mallocDouble(2*M*_),T=s.mallocInt32(_);if(_=c(k,M,z,T),_>0){if(M===1&&L)u.init(_),v=u.sweepComplete(M,A,0,_,z,T,0,_,z,T);else{var F=s.mallocDouble(2*M*C),q=s.mallocInt32(C);C=c(E,M,F,q),C>0&&(u.init(_+C),M===1?v=u.sweepBipartite(M,A,0,_,z,T,0,C,F,q):v=l(M,A,L,_,z,T,C,F,q),s.free(F),s.free(q))}s.free(z),s.free(T)}return v}}}var d;function p(k,E){d.push([k,E])}function x(k){return d=[],h(k,k,p,!0),d}function b(k,E){return d=[],h(k,E,p,!1),d}function y(k,E,A){switch(arguments.length){case 1:return x(k);case 2:return typeof E=="function"?h(k,k,E,!0):b(k,E);case 3:return h(k,E,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(i,a){"use strict";function o(){function l(h,d,p,x,b,y,k,E,A,L,_){for(var C=2*h,M=x,v=C*x;M<b;++M,v+=C){var z=y[d+v],T=y[d+v+h],F=k[M];e:for(var q=E,U=C*E;q<A;++q,U+=C){var H=L[d+U],j=L[d+U+h],G=_[q];if(!(j<z||T<H)){for(var O=d+1;O<h;++O){var W=y[O+v],re=y[O+h+v],ne=L[O+U],be=L[O+h+U];if(re<ne||be<W)continue e}var ze=p(F,G);if(ze!==void 0)return ze}}}}function f(h,d,p,x,b,y,k,E,A,L,_){for(var C=2*h,M=E,v=C*E;M<A;++M,v+=C){var z=L[d+v],T=L[d+v+h],F=_[M];e:for(var q=x,U=C*x;q<b;++q,U+=C){var H=y[d+U],j=y[d+U+h],G=k[q];if(!(T<H||j<z)){for(var O=d+1;O<h;++O){var W=y[O+U],re=y[O+h+U],ne=L[O+v],be=L[O+h+v];if(re<ne||be<W)continue e}var ze=p(G,F);if(ze!==void 0)return ze}}}}function c(h,d,p,x,b,y,k,E,A,L,_){return b-x>A-E?l(h,d,p,x,b,y,k,E,A,L,_):f(h,d,p,x,b,y,k,E,A,L,_)}return c}function s(){function l(p,x,b,y,k,E,A,L,_,C,M){for(var v=2*p,z=y,T=v*y;z<k;++z,T+=v){var F=E[x+T],q=E[x+T+p],U=A[z];e:for(var H=L,j=v*L;H<_;++H,j+=v){var G=C[x+j],O=M[H];if(!(G<=F||q<G)){for(var W=x+1;W<p;++W){var re=E[W+T],ne=E[W+p+T],be=C[W+j],ze=C[W+p+j];if(ne<be||ze<re)continue e}var Ce=b(O,U);if(Ce!==void 0)return Ce}}}}function f(p,x,b,y,k,E,A,L,_,C,M){for(var v=2*p,z=y,T=v*y;z<k;++z,T+=v){var F=E[x+T],q=E[x+T+p],U=A[z];e:for(var H=L,j=v*L;H<_;++H,j+=v){var G=C[x+j],O=M[H];if(!(G<F||q<G)){for(var W=x+1;W<p;++W){var re=E[W+T],ne=E[W+p+T],be=C[W+j],ze=C[W+p+j];if(ne<be||ze<re)continue e}var Ce=b(U,O);if(Ce!==void 0)return Ce}}}}function c(p,x,b,y,k,E,A,L,_,C,M){for(var v=2*p,z=L,T=v*L;z<_;++z,T+=v){var F=C[x+T],q=M[z];e:for(var U=y,H=v*y;U<k;++U,H+=v){var j=E[x+H],G=E[x+H+p],O=A[U];if(!(F<=j||G<F)){for(var W=x+1;W<p;++W){var re=E[W+H],ne=E[W+p+H],be=C[W+T],ze=C[W+p+T];if(ne<be||ze<re)continue e}var Ce=b(q,O);if(Ce!==void 0)return Ce}}}}function h(p,x,b,y,k,E,A,L,_,C,M){for(var v=2*p,z=L,T=v*L;z<_;++z,T+=v){var F=C[x+T],q=M[z];e:for(var U=y,H=v*y;U<k;++U,H+=v){var j=E[x+H],G=E[x+H+p],O=A[U];if(!(F<j||G<F)){for(var W=x+1;W<p;++W){var re=E[W+H],ne=E[W+p+H],be=C[W+T],ze=C[W+p+T];if(ne<be||ze<re)continue e}var Ce=b(O,q);if(Ce!==void 0)return Ce}}}}function d(p,x,b,y,k,E,A,L,_,C,M,v){return E-k>C-_?y?l(p,x,b,k,E,A,L,_,C,M,v):f(p,x,b,k,E,A,L,_,C,M,v):y?c(p,x,b,k,E,A,L,_,C,M,v):h(p,x,b,k,E,A,L,_,C,M,v)}return d}function u(l){return l?o():s()}a.partial=u(!1),a.full=u(!0)},7150:function(i,a,o){"use strict";i.exports=G;var s=o(1888),u=o(8828),l=o(2455),f=l.partial,c=l.full,h=o(855),d=o(3545),p=o(8105),x=128,b=1<<22,y=1<<22,k=p("!(lo>=p0)&&!(p1>=hi)"),E=p("lo===p0"),A=p("lo<p0"),L=p("hi<=p0"),_=p("lo<=p0&&p0<=hi"),C=p("lo<p0&&p0<=hi"),M=6,v=2,z=1024,T=s.mallocInt32(z),F=s.mallocDouble(z);function q(O,W){var re=8*u.log2(W+1)*(O+1)|0,ne=u.nextPow2(M*re);T.length<ne&&(s.free(T),T=s.mallocInt32(ne));var be=u.nextPow2(v*re);F.length<be&&(s.free(F),F=s.mallocDouble(be))}function U(O,W,re,ne,be,ze,Ce,he,te){var ke=M*O;T[ke]=W,T[ke+1]=re,T[ke+2]=ne,T[ke+3]=be,T[ke+4]=ze,T[ke+5]=Ce;var Ee=v*O;F[Ee]=he,F[Ee+1]=te}function H(O,W,re,ne,be,ze,Ce,he,te,ke,Ee){var Me=2*O,Oe=te*Me,Re=ke[Oe+W];e:for(var me=be,Be=be*Me;me<ze;++me,Be+=Me){var fe=Ce[Be+W],Ze=Ce[Be+W+O];if(!(Re<fe||Ze<Re)&&!(ne&&Re===fe)){for(var et=he[me],gt=W+1;gt<O;++gt){var fe=Ce[Be+gt],Ze=Ce[Be+gt+O],Pt=ke[Oe+gt],Qe=ke[Oe+gt+O];if(Ze<Pt||Qe<fe)continue e}var Xe;if(ne?Xe=re(Ee,et):Xe=re(et,Ee),Xe!==void 0)return Xe}}}function j(O,W,re,ne,be,ze,Ce,he,te,ke){var Ee=2*O,Me=he*Ee,Oe=te[Me+W];e:for(var Re=ne,me=ne*Ee;Re<be;++Re,me+=Ee){var Be=Ce[Re];if(Be!==ke){var fe=ze[me+W],Ze=ze[me+W+O];if(!(Oe<fe||Ze<Oe)){for(var et=W+1;et<O;++et){var fe=ze[me+et],Ze=ze[me+et+O],gt=te[Me+et],Pt=te[Me+et+O];if(Ze<gt||Pt<fe)continue e}var Qe=re(Be,ke);if(Qe!==void 0)return Qe}}}}function G(O,W,re,ne,be,ze,Ce,he,te){q(O,ne+Ce);var ke=0,Ee=2*O,Me;for(U(ke++,0,0,ne,0,Ce,re?16:0,-1/0,1/0),re||U(ke++,0,0,Ce,0,ne,1,-1/0,1/0);ke>0;){ke-=1;var Oe=ke*M,Re=T[Oe],me=T[Oe+1],Be=T[Oe+2],fe=T[Oe+3],Ze=T[Oe+4],et=T[Oe+5],gt=ke*v,Pt=F[gt],Qe=F[gt+1],Xe=et&1,Tt=!!(et&16),xt=be,_t=ze,Ct=he,jt=te;if(Xe&&(xt=he,_t=te,Ct=be,jt=ze),!(et&2&&(Be=A(O,Re,me,Be,xt,_t,Qe),me>=Be))&&!(et&4&&(me=L(O,Re,me,Be,xt,_t,Pt),me>=Be))){var At=Be-me,Te=Ze-fe;if(Tt){if(O*At*(At+Te)<y){if(Me=h.scanComplete(O,Re,W,me,Be,xt,_t,fe,Ze,Ct,jt),Me!==void 0)return Me;continue}}else if(O*Math.min(At,Te)<x){if(Me=f(O,Re,W,Xe,me,Be,xt,_t,fe,Ze,Ct,jt),Me!==void 0)return Me;continue}else if(O*At*Te<b){if(Me=h.scanBipartite(O,Re,W,Xe,me,Be,xt,_t,fe,Ze,Ct,jt),Me!==void 0)return Me;continue}var nt=k(O,Re,me,Be,xt,_t,Pt,Qe);if(me<nt)if(O*(nt-me)<x){if(Me=c(O,Re+1,W,me,nt,xt,_t,fe,Ze,Ct,jt),Me!==void 0)return Me}else if(Re===O-2){if(Xe?Me=h.sweepBipartite(O,W,fe,Ze,Ct,jt,me,nt,xt,_t):Me=h.sweepBipartite(O,W,me,nt,xt,_t,fe,Ze,Ct,jt),Me!==void 0)return Me}else U(ke++,Re+1,me,nt,fe,Ze,Xe,-1/0,1/0),U(ke++,Re+1,fe,Ze,me,nt,Xe^1,-1/0,1/0);if(nt<Be){var ut=d(O,Re,fe,Ze,Ct,jt),ct=Ct[Ee*ut+Re],rt=E(O,Re,ut,Ze,Ct,jt,ct);if(rt<Ze&&U(ke++,Re,nt,Be,rt,Ze,(Xe|4)+(Tt?16:0),ct,Qe),fe<ut&&U(ke++,Re,nt,Be,fe,ut,(Xe|2)+(Tt?16:0),Pt,ct),ut+1===rt){if(Tt?Me=j(O,Re,W,nt,Be,xt,_t,ut,Ct,jt[ut]):Me=H(O,Re,W,Xe,nt,Be,xt,_t,ut,Ct,jt[ut]),Me!==void 0)return Me}else if(ut<rt){var je;if(Tt){if(je=_(O,Re,nt,Be,xt,_t,ct),nt<je){var tt=E(O,Re,nt,je,xt,_t,ct);if(Re===O-2){if(nt<tt&&(Me=h.sweepComplete(O,W,nt,tt,xt,_t,ut,rt,Ct,jt),Me!==void 0)||tt<je&&(Me=h.sweepBipartite(O,W,tt,je,xt,_t,ut,rt,Ct,jt),Me!==void 0))return Me}else nt<tt&&U(ke++,Re+1,nt,tt,ut,rt,16,-1/0,1/0),tt<je&&(U(ke++,Re+1,tt,je,ut,rt,0,-1/0,1/0),U(ke++,Re+1,ut,rt,tt,je,1,-1/0,1/0))}}else Xe?je=C(O,Re,nt,Be,xt,_t,ct):je=_(O,Re,nt,Be,xt,_t,ct),nt<je&&(Re===O-2?Xe?Me=h.sweepBipartite(O,W,ut,rt,Ct,jt,nt,je,xt,_t):Me=h.sweepBipartite(O,W,nt,je,xt,_t,ut,rt,Ct,jt):(U(ke++,Re+1,nt,je,ut,rt,Xe,-1/0,1/0),U(ke++,Re+1,ut,rt,nt,je,Xe^1,-1/0,1/0)))}}}}}},3545:function(i,a,o){"use strict";i.exports=c;var s=o(8105),u=s("lo<p0"),l=8;function f(h,d,p,x,b,y){for(var k=2*h,E=k*(p+1)+d,A=p+1;A<x;++A,E+=k)for(var L=b[E],_=A,C=k*(A-1);_>p&&b[C+d]>L;--_,C-=k){for(var M=C,v=C+k,z=0;z<k;++z,++M,++v){var T=b[M];b[M]=b[v],b[v]=T}var F=y[_];y[_]=y[_-1],y[_-1]=F}}function c(h,d,p,x,b,y){if(x<=p+1)return p;for(var k=p,E=x,A=x+p>>>1,L=2*h,_=A,C=b[L*A+d];k<E;){if(E-k<l){f(h,d,k,E,b,y),C=b[L*A+d];break}var M=E-k,v=Math.random()*M+k|0,z=b[L*v+d],T=Math.random()*M+k|0,F=b[L*T+d],q=Math.random()*M+k|0,U=b[L*q+d];z<=F?U>=F?(_=T,C=F):z>=U?(_=v,C=z):(_=q,C=U):F>=U?(_=T,C=F):U>=z?(_=v,C=z):(_=q,C=U);for(var G=L*(E-1),O=L*_,H=0;H<L;++H,++G,++O){var j=b[G];b[G]=b[O],b[O]=j}var W=y[E-1];y[E-1]=y[_],y[_]=W,_=u(h,d,k,E-1,b,y,C);for(var G=L*(E-1),O=L*_,H=0;H<L;++H,++G,++O){var j=b[G];b[G]=b[O],b[O]=j}var W=y[E-1];if(y[E-1]=y[_],y[_]=W,A<_){for(E=_-1;k<E&&b[L*(E-1)+d]===C;)E-=1;E+=1}else if(_<A)for(k=_+1;k<E&&b[L*k+d]===C;)k+=1;else break}return u(h,d,p,A,b,y,b[L*A+d])}},8105:function(i){"use strict";i.exports=o;var a={"lo===p0":s,"lo<p0":u,"lo<=p0":l,"hi<=p0":f,"lo<p0&&p0<=hi":h,"lo<=p0&&p0<=hi":c,"!(lo>=p0)&&!(p1>=hi)":d};function o(p){return a[p]}function s(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+v];if(F===A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[_+q];k[_+q]=k[C],k[C++]=U}var H=E[T];E[T]=E[M],E[M++]=H}}return M}function u(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+v];if(F<A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[_+q];k[_+q]=k[C],k[C++]=U}var H=E[T];E[T]=E[M],E[M++]=H}}return M}function l(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+z];if(F<=A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[_+q];k[_+q]=k[C],k[C++]=U}var H=E[T];E[T]=E[M],E[M++]=H}}return M}function f(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+z];if(F<=A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[_+q];k[_+q]=k[C],k[C++]=U}var H=E[T];E[T]=E[M],E[M++]=H}}return M}function c(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+v],q=k[_+z];if(F<=A&&A<=q)if(M===T)M+=1,C+=L;else{for(var U=0;L>U;++U){var H=k[_+U];k[_+U]=k[C],k[C++]=H}var j=E[T];E[T]=E[M],E[M++]=j}}return M}function h(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+v],q=k[_+z];if(F<A&&A<=q)if(M===T)M+=1,C+=L;else{for(var U=0;L>U;++U){var H=k[_+U];k[_+U]=k[C],k[C++]=H}var j=E[T];E[T]=E[M],E[M++]=j}}return M}function d(p,x,b,y,k,E,A,L){for(var _=2*p,C=_*b,M=C,v=b,z=x,T=p+x,F=b;y>F;++F,C+=_){var q=k[C+z],U=k[C+T];if(!(q>=A)&&!(L>=U))if(v===F)v+=1,M+=_;else{for(var H=0;_>H;++H){var j=k[C+H];k[C+H]=k[M],k[M++]=j}var G=E[F];E[F]=E[v],E[v++]=G}}return v}},4192:function(i){"use strict";i.exports=o;var a=32;function o(x,b){b<=4*a?s(0,b-1,x):p(0,b-1,x)}function s(x,b,y){for(var k=2*(x+1),E=x+1;E<=b;++E){for(var A=y[k++],L=y[k++],_=E,C=k-2;_-- >x;){var M=y[C-2],v=y[C-1];if(M<A)break;if(M===A&&v<L)break;y[C]=M,y[C+1]=v,C-=2}y[C]=A,y[C+1]=L}}function u(x,b,y){x*=2,b*=2;var k=y[x],E=y[x+1];y[x]=y[b],y[x+1]=y[b+1],y[b]=k,y[b+1]=E}function l(x,b,y){x*=2,b*=2,y[x]=y[b],y[x+1]=y[b+1]}function f(x,b,y,k){x*=2,b*=2,y*=2;var E=k[x],A=k[x+1];k[x]=k[b],k[x+1]=k[b+1],k[b]=k[y],k[b+1]=k[y+1],k[y]=E,k[y+1]=A}function c(x,b,y,k,E){x*=2,b*=2,E[x]=E[b],E[b]=y,E[x+1]=E[b+1],E[b+1]=k}function h(x,b,y){x*=2,b*=2;var k=y[x],E=y[b];return k<E?!1:k===E?y[x+1]>y[b+1]:!0}function d(x,b,y,k){x*=2;var E=k[x];return E<b?!0:E===b?k[x+1]<y:!1}function p(x,b,y){var k=(b-x+1)/6|0,E=x+k,A=b-k,L=x+b>>1,_=L-k,C=L+k,M=E,v=_,z=L,T=C,F=A,q=x+1,U=b-1,H=0;h(M,v,y)&&(H=M,M=v,v=H),h(T,F,y)&&(H=T,T=F,F=H),h(M,z,y)&&(H=M,M=z,z=H),h(v,z,y)&&(H=v,v=z,z=H),h(M,T,y)&&(H=M,M=T,T=H),h(z,T,y)&&(H=z,z=T,T=H),h(v,F,y)&&(H=v,v=F,F=H),h(v,z,y)&&(H=v,v=z,z=H),h(T,F,y)&&(H=T,T=F,F=H);for(var j=y[2*v],G=y[2*v+1],O=y[2*T],W=y[2*T+1],re=2*M,ne=2*z,be=2*F,ze=2*E,Ce=2*L,he=2*A,te=0;te<2;++te){var ke=y[re+te],Ee=y[ne+te],Me=y[be+te];y[ze+te]=ke,y[Ce+te]=Ee,y[he+te]=Me}l(_,x,y),l(C,b,y);for(var Oe=q;Oe<=U;++Oe)if(d(Oe,j,G,y))Oe!==q&&u(Oe,q,y),++q;else if(!d(Oe,O,W,y))for(;;)if(d(U,O,W,y)){d(U,j,G,y)?(f(Oe,q,U,y),++q,--U):(u(Oe,U,y),--U);break}else{if(--U<Oe)break;continue}c(x,q-1,j,G,y),c(b,U+1,O,W,y),q-2-x<=a?s(x,q-2,y):p(x,q-2,y),b-(U+2)<=a?s(U+2,b,y):p(U+2,b,y),U-q<=a?s(q,U,y):p(q,U,y)}},855:function(i,a,o){"use strict";i.exports={init:E,sweepBipartite:_,sweepComplete:C,scanBipartite:M,scanComplete:v};var s=o(1888),u=o(8828),l=o(4192),f=1<<28,c=1024,h=s.mallocInt32(c),d=s.mallocInt32(c),p=s.mallocInt32(c),x=s.mallocInt32(c),b=s.mallocInt32(c),y=s.mallocInt32(c),k=s.mallocDouble(c*8);function E(z){var T=u.nextPow2(z);h.length<T&&(s.free(h),h=s.mallocInt32(T)),d.length<T&&(s.free(d),d=s.mallocInt32(T)),p.length<T&&(s.free(p),p=s.mallocInt32(T)),x.length<T&&(s.free(x),x=s.mallocInt32(T)),b.length<T&&(s.free(b),b=s.mallocInt32(T)),y.length<T&&(s.free(y),y=s.mallocInt32(T));var F=8*T;k.length<F&&(s.free(k),k=s.mallocDouble(F))}function A(z,T,F,q){var U=T[q],H=z[F-1];z[U]=H,T[H]=U}function L(z,T,F,q){z[F]=q,T[q]=F}function _(z,T,F,q,U,H,j,G,O,W){for(var re=0,ne=2*z,be=z-1,ze=ne-1,Ce=F;Ce<q;++Ce){var he=H[Ce],te=ne*Ce;k[re++]=U[te+be],k[re++]=-(he+1),k[re++]=U[te+ze],k[re++]=he}for(var Ce=j;Ce<G;++Ce){var he=W[Ce]+f,ke=ne*Ce;k[re++]=O[ke+be],k[re++]=-he,k[re++]=O[ke+ze],k[re++]=he}var Ee=re>>>1;l(k,Ee);for(var Me=0,Oe=0,Ce=0;Ce<Ee;++Ce){var Re=k[2*Ce+1]|0;if(Re>=f)Re=Re-f|0,A(p,x,Oe--,Re);else if(Re>=0)A(h,d,Me--,Re);else if(Re<=-f){Re=-Re-f|0;for(var me=0;me<Me;++me){var Be=T(h[me],Re);if(Be!==void 0)return Be}L(p,x,Oe++,Re)}else{Re=-Re-1|0;for(var me=0;me<Oe;++me){var Be=T(Re,p[me]);if(Be!==void 0)return Be}L(h,d,Me++,Re)}}}function C(z,T,F,q,U,H,j,G,O,W){for(var re=0,ne=2*z,be=z-1,ze=ne-1,Ce=F;Ce<q;++Ce){var he=H[Ce]+1<<1,te=ne*Ce;k[re++]=U[te+be],k[re++]=-he,k[re++]=U[te+ze],k[re++]=he}for(var Ce=j;Ce<G;++Ce){var he=W[Ce]+1<<1,ke=ne*Ce;k[re++]=O[ke+be],k[re++]=-he|1,k[re++]=O[ke+ze],k[re++]=he|1}var Ee=re>>>1;l(k,Ee);for(var Me=0,Oe=0,Re=0,Ce=0;Ce<Ee;++Ce){var me=k[2*Ce+1]|0,Be=me&1;if(Ce<Ee-1&&me>>1===k[2*Ce+3]>>1&&(Be=2,Ce+=1),me<0){for(var fe=-(me>>1)-1,Ze=0;Ze<Re;++Ze){var et=T(b[Ze],fe);if(et!==void 0)return et}if(Be!==0)for(var Ze=0;Ze<Me;++Ze){var et=T(h[Ze],fe);if(et!==void 0)return et}if(Be!==1)for(var Ze=0;Ze<Oe;++Ze){var et=T(p[Ze],fe);if(et!==void 0)return et}Be===0?L(h,d,Me++,fe):Be===1?L(p,x,Oe++,fe):Be===2&&L(b,y,Re++,fe)}else{var fe=(me>>1)-1;Be===0?A(h,d,Me--,fe):Be===1?A(p,x,Oe--,fe):Be===2&&A(b,y,Re--,fe)}}}function M(z,T,F,q,U,H,j,G,O,W,re,ne){var be=0,ze=2*z,Ce=T,he=T+z,te=1,ke=1;q?ke=f:te=f;for(var Ee=U;Ee<H;++Ee){var Me=Ee+te,Oe=ze*Ee;k[be++]=j[Oe+Ce],k[be++]=-Me,k[be++]=j[Oe+he],k[be++]=Me}for(var Ee=O;Ee<W;++Ee){var Me=Ee+ke,Re=ze*Ee;k[be++]=re[Re+Ce],k[be++]=-Me}var me=be>>>1;l(k,me);for(var Be=0,Ee=0;Ee<me;++Ee){var fe=k[2*Ee+1]|0;if(fe<0){var Me=-fe,Ze=!1;if(Me>=f?(Ze=!q,Me-=f):(Ze=!!q,Me-=1),Ze)L(h,d,Be++,Me);else{var et=ne[Me],gt=ze*Me,Pt=re[gt+T+1],Qe=re[gt+T+1+z];e:for(var Xe=0;Xe<Be;++Xe){var Tt=h[Xe],xt=ze*Tt;if(!(Qe<j[xt+T+1]||j[xt+T+1+z]<Pt)){for(var _t=T+2;_t<z;++_t)if(re[gt+_t+z]<j[xt+_t]||j[xt+_t+z]<re[gt+_t])continue e;var Ct=G[Tt],jt;if(q?jt=F(et,Ct):jt=F(Ct,et),jt!==void 0)return jt}}}}else A(h,d,Be--,fe-te)}}function v(z,T,F,q,U,H,j,G,O,W,re){for(var ne=0,be=2*z,ze=T,Ce=T+z,he=q;he<U;++he){var te=he+f,ke=be*he;k[ne++]=H[ke+ze],k[ne++]=-te,k[ne++]=H[ke+Ce],k[ne++]=te}for(var he=G;he<O;++he){var te=he+1,Ee=be*he;k[ne++]=W[Ee+ze],k[ne++]=-te}var Me=ne>>>1;l(k,Me);for(var Oe=0,he=0;he<Me;++he){var Re=k[2*he+1]|0;if(Re<0){var te=-Re;if(te>=f)h[Oe++]=te-f;else{te-=1;var me=re[te],Be=be*te,fe=W[Be+T+1],Ze=W[Be+T+1+z];e:for(var et=0;et<Oe;++et){var gt=h[et],Pt=j[gt];if(Pt===me)break;var Qe=be*gt;if(!(Ze<H[Qe+T+1]||H[Qe+T+1+z]<fe)){for(var Xe=T+2;Xe<z;++Xe)if(W[Be+Xe+z]<H[Qe+Xe]||H[Qe+Xe+z]<W[Be+Xe])continue e;var Tt=F(Pt,me);if(Tt!==void 0)return Tt}}}}else{for(var te=Re-f,et=Oe-1;et>=0;--et)if(h[et]===te){for(var Xe=et+1;Xe<Oe;++Xe)h[Xe-1]=h[Xe];break}--Oe}}}},2538:function(i,a,o){"use strict";var s=o(8902),u=o(5542),l=o(2272),f=o(5023);i.exports=x;function c(b){return[Math.min(b[0],b[1]),Math.max(b[0],b[1])]}function h(b,y){return b[0]-y[0]||b[1]-y[1]}function d(b){return b.map(c).sort(h)}function p(b,y,k){return y in b?b[y]:k}function x(b,y,k){Array.isArray(y)?(k=k||{},y=y||[]):(k=y||{},y=[]);var E=!!p(k,"delaunay",!0),A=!!p(k,"interior",!0),L=!!p(k,"exterior",!0),_=!!p(k,"infinity",!1);if(!A&&!L||b.length===0)return[];var C=s(b,y);if(E||A!==L||_){for(var M=u(b.length,d(y)),v=0;v<C.length;++v){var z=C[v];M.addTriangle(z[0],z[1],z[2])}return E&&l(b,M),L?A?_?f(M,0,_):M.cells():f(M,1,_):f(M,-1)}else return C}},2272:function(i,a,o){"use strict";var s=o(2646)[4],u=o(2478);i.exports=f;function l(c,h,d,p,x,b){var y=h.opposite(p,x);if(!(y<0)){if(x<p){var k=p;p=x,x=k,k=b,b=y,y=k}h.isConstraint(p,x)||s(c[p],c[x],c[b],c[y])<0&&d.push(p,x)}}function f(c,h){for(var d=[],p=c.length,x=h.stars,b=0;b<p;++b)for(var y=x[b],k=1;k<y.length;k+=2){var E=y[k];if(!(E<b)&&!h.isConstraint(b,E)){for(var A=y[k-1],L=-1,_=1;_<y.length;_+=2)if(y[_-1]===E){L=y[_];break}L<0||s(c[b],c[E],c[A],c[L])<0&&d.push(b,E)}}for(;d.length>0;){for(var E=d.pop(),b=d.pop(),A=-1,L=-1,y=x[b],C=1;C<y.length;C+=2){var M=y[C-1],v=y[C];M===E?L=v:v===E&&(A=M)}A<0||L<0||s(c[b],c[E],c[A],c[L])>=0||(h.flip(b,E),l(c,h,d,A,b,L),l(c,h,d,b,L,A),l(c,h,d,L,E,A),l(c,h,d,E,A,L))}}},5023:function(i,a,o){"use strict";var s=o(2478);i.exports=d;function u(p,x,b,y,k,E,A){this.cells=p,this.neighbor=x,this.flags=y,this.constraint=b,this.active=k,this.next=E,this.boundary=A}var l=u.prototype;function f(p,x){return p[0]-x[0]||p[1]-x[1]||p[2]-x[2]}l.locate=function(){var p=[0,0,0];return function(x,b,y){var k=x,E=b,A=y;return b<y?b<x&&(k=b,E=y,A=x):y<x&&(k=y,E=x,A=b),k<0?-1:(p[0]=k,p[1]=E,p[2]=A,s.eq(this.cells,p,f))}}();function c(p,x){for(var b=p.cells(),y=b.length,k=0;k<y;++k){var E=b[k],A=E[0],L=E[1],_=E[2];L<_?L<A&&(E[0]=L,E[1]=_,E[2]=A):_<A&&(E[0]=_,E[1]=A,E[2]=L)}b.sort(f);for(var C=new Array(y),k=0;k<C.length;++k)C[k]=0;var M=[],v=[],z=new Array(3*y),T=new Array(3*y),F=null;x&&(F=[]);for(var q=new u(b,z,T,C,M,v,F),k=0;k<y;++k)for(var E=b[k],U=0;U<3;++U){var A=E[U],L=E[(U+1)%3],H=z[3*k+U]=q.locate(L,A,p.opposite(L,A)),j=T[3*k+U]=p.isConstraint(A,L);H<0&&(j?v.push(k):(M.push(k),C[k]=1),x&&F.push([L,A,-1]))}return q}function h(p,x,b){for(var y=0,k=0;k<p.length;++k)x[k]===b&&(p[y++]=p[k]);return p.length=y,p}function d(p,x,b){var y=c(p,b);if(x===0)return b?y.cells.concat(y.boundary):y.cells;for(var k=1,E=y.active,A=y.next,L=y.flags,_=y.cells,C=y.constraint,M=y.neighbor;E.length>0||A.length>0;){for(;E.length>0;){var v=E.pop();if(L[v]!==-k){L[v]=k;for(var z=_[v],T=0;T<3;++T){var F=M[3*v+T];F>=0&&L[F]===0&&(C[3*v+T]?A.push(F):(E.push(F),L[F]=k))}}}var q=A;A=E,E=q,A.length=0,k=-k}var U=h(_,L,x);return b?U.concat(y.boundary):U}},8902:function(i,a,o){"use strict";var s=o(2478),u=o(3250)[3],l=0,f=1,c=2;i.exports=A;function h(L,_,C,M,v){this.a=L,this.b=_,this.idx=C,this.lowerIds=M,this.upperIds=v}function d(L,_,C,M){this.a=L,this.b=_,this.type=C,this.idx=M}function p(L,_){var C=L.a[0]-_.a[0]||L.a[1]-_.a[1]||L.type-_.type;return C||L.type!==l&&(C=u(L.a,L.b,_.b),C)?C:L.idx-_.idx}function x(L,_){return u(L.a,L.b,_)}function b(L,_,C,M,v){for(var z=s.lt(_,M,x),T=s.gt(_,M,x),F=z;F<T;++F){for(var q=_[F],U=q.lowerIds,j=U.length;j>1&&u(C[U[j-2]],C[U[j-1]],M)>0;)L.push([U[j-1],U[j-2],v]),j-=1;U.length=j,U.push(v);for(var H=q.upperIds,j=H.length;j>1&&u(C[H[j-2]],C[H[j-1]],M)<0;)L.push([H[j-2],H[j-1],v]),j-=1;H.length=j,H.push(v)}}function y(L,_){var C;return L.a[0]<_.a[0]?C=u(L.a,L.b,_.a):C=u(_.b,_.a,L.a),C||(_.b[0]<L.b[0]?C=u(L.a,L.b,_.b):C=u(_.b,_.a,L.b),C||L.idx-_.idx)}function k(L,_,C){var M=s.le(L,C,y),v=L[M],z=v.upperIds,T=z[z.length-1];v.upperIds=[T],L.splice(M+1,0,new h(C.a,C.b,C.idx,[T],z))}function E(L,_,C){var M=C.a;C.a=C.b,C.b=M;var v=s.eq(L,C,y),z=L[v],T=L[v-1];T.upperIds=z.upperIds,L.splice(v,1)}function A(L,_){for(var C=L.length,M=_.length,v=[],z=0;z<C;++z)v.push(new d(L[z],null,l,z));for(var z=0;z<M;++z){var T=_[z],F=L[T[0]],q=L[T[1]];F[0]<q[0]?v.push(new d(F,q,c,z),new d(q,F,f,z)):F[0]>q[0]&&v.push(new d(q,F,c,z),new d(F,q,f,z))}v.sort(p);for(var U=v[0].a[0]-(1+Math.abs(v[0].a[0]))*Math.pow(2,-52),H=[new h([U,1],[U,0],-1,[],[],[],[])],j=[],z=0,G=v.length;z<G;++z){var O=v[z],W=O.type;W===l?b(j,H,L,O.a,O.idx):W===c?k(H,L,O):E(H,L,O)}return j}},5542:function(i,a,o){"use strict";var s=o(2478);i.exports=c;function u(h,d){this.stars=h,this.edges=d}var l=u.prototype;function f(h,d,p){for(var x=1,b=h.length;x<b;x+=2)if(h[x-1]===d&&h[x]===p){h[x-1]=h[b-2],h[x]=h[b-1],h.length=b-2;return}}l.isConstraint=function(){var h=[0,0];function d(p,x){return p[0]-x[0]||p[1]-x[1]}return function(p,x){return h[0]=Math.min(p,x),h[1]=Math.max(p,x),s.eq(this.edges,h,d)>=0}}(),l.removeTriangle=function(h,d,p){var x=this.stars;f(x[h],d,p),f(x[d],p,h),f(x[p],h,d)},l.addTriangle=function(h,d,p){var x=this.stars;x[h].push(d,p),x[d].push(p,h),x[p].push(h,d)},l.opposite=function(h,d){for(var p=this.stars[d],x=1,b=p.length;x<b;x+=2)if(p[x]===h)return p[x-1];return-1},l.flip=function(h,d){var p=this.opposite(h,d),x=this.opposite(d,h);this.removeTriangle(h,d,p),this.removeTriangle(d,h,x),this.addTriangle(h,x,p),this.addTriangle(d,p,x)},l.edges=function(){for(var h=this.stars,d=[],p=0,x=h.length;p<x;++p)for(var b=h[p],y=0,k=b.length;y<k;y+=2)d.push([b[y],b[y+1]]);return d},l.cells=function(){for(var h=this.stars,d=[],p=0,x=h.length;p<x;++p)for(var b=h[p],y=0,k=b.length;y<k;y+=2){var E=b[y],A=b[y+1];p<Math.min(E,A)&&d.push([p,E,A])}return d};function c(h,d){for(var p=new Array(h),x=0;x<h;++x)p[x]=[];return new u(p,d)}},2419:function(i){"use strict";i.exports=a;function a(o){for(var s=1,u=1;u<o.length;++u)for(var l=0;l<u;++l)if(o[u]<o[l])s=-s;else if(o[l]===o[u])return 0;return s}},3628:function(i,a,o){"use strict";var s=o(1338),u=o(727);function l(h,d){for(var p=0,x=h.length,b=0;b<x;++b)p+=h[b]*d[b];return p}function f(h){var d=h.length;if(d===0)return[];var p=h[0].length,x=s([h.length+1,h.length+1],1),b=s([h.length+1],1);x[d][d]=0;for(var y=0;y<d;++y){for(var k=0;k<=y;++k)x[k][y]=x[y][k]=2*l(h[y],h[k]);b[y]=l(h[y],h[y])}for(var E=u(x,b),A=0,L=E[d+1],y=0;y<L.length;++y)A+=L[y];for(var _=new Array(d),y=0;y<d;++y){for(var L=E[y],C=0,k=0;k<L.length;++k)C+=L[k];_[y]=C/A}return _}function c(h){if(h.length===0)return[];for(var d=h[0].length,p=s([d]),x=f(h),b=0;b<h.length;++b)for(var y=0;y<d;++y)p[y]+=h[b][y]*x[b];return p}c.barycenetric=f,i.exports=c},6037:function(i,a,o){i.exports=u;var s=o(3628);function u(l){for(var f=s(l),c=0,h=0;h<l.length;++h)for(var d=l[h],p=0;p<f.length;++p)c+=Math.pow(d[p]-f[p],2);return Math.sqrt(c/l.length)}},332:function(i,a,o){"use strict";i.exports=F;var s=o(1755),u=o(6867),l=o(1125),f=o(7842),c=o(1318),h=o(946),d=o(5838),p=o(1278),x=o(3637);function b(q){var U=h(q);return[p(U,-1/0),p(U,1/0)]}function y(q,U){for(var H=new Array(U.length),j=0;j<U.length;++j){var G=U[j],O=q[G[0]],W=q[G[1]];H[j]=[p(Math.min(O[0],W[0]),-1/0),p(Math.min(O[1],W[1]),-1/0),p(Math.max(O[0],W[0]),1/0),p(Math.max(O[1],W[1]),1/0)]}return H}function k(q){for(var U=new Array(q.length),H=0;H<q.length;++H){var j=q[H];U[H]=[p(j[0],-1/0),p(j[1],-1/0),p(j[0],1/0),p(j[1],1/0)]}return U}function E(q,U,H){var j=[];return u(H,function(G,O){var W=U[G],re=U[O];if(!(W[0]===re[0]||W[0]===re[1]||W[1]===re[0]||W[1]===re[1])){var ne=q[W[0]],be=q[W[1]],ze=q[re[0]],Ce=q[re[1]];l(ne,be,ze,Ce)&&j.push([G,O])}}),j}function A(q,U,H,j){var G=[];return u(H,j,function(O,W){var re=U[O];if(!(re[0]===W||re[1]===W)){var ne=q[W],be=q[re[0]],ze=q[re[1]];l(be,ze,ne,ne)&&G.push([O,W])}}),G}function L(q,U,H,j,G){var O,W,re=q.map(function(gt){return[f(gt[0]),f(gt[1])]});for(O=0;O<H.length;++O){var ne=H[O];W=ne[0];var be=ne[1],ze=U[W],Ce=U[be],he=x(d(q[ze[0]]),d(q[ze[1]]),d(q[Ce[0]]),d(q[Ce[1]]));if(he){var te=q.length;q.push([h(he[0]),h(he[1])]),re.push(he),j.push([W,te],[be,te])}}for(j.sort(function(gt,Pt){if(gt[0]!==Pt[0])return gt[0]-Pt[0];var Qe=re[gt[1]],Xe=re[Pt[1]];return c(Qe[0],Xe[0])||c(Qe[1],Xe[1])}),O=j.length-1;O>=0;--O){var ke=j[O];W=ke[0];var Ee=U[W],Me=Ee[0],Oe=Ee[1],Re=q[Me],me=q[Oe];if((Re[0]-me[0]||Re[1]-me[1])<0){var Be=Me;Me=Oe,Oe=Be}Ee[0]=Me;var fe=Ee[1]=ke[1],Ze;for(G&&(Ze=Ee[2]);O>0&&j[O-1][0]===W;){var ke=j[--O],et=ke[1];G?U.push([fe,et,Ze]):U.push([fe,et]),fe=et}G?U.push([fe,Oe,Ze]):U.push([fe,Oe])}return re}function _(q,U,H){for(var j=U.length,G=new s(j),O=[],W=0;W<U.length;++W){var re=U[W],ne=b(re[0]),be=b(re[1]);O.push([p(ne[0],-1/0),p(be[0],-1/0),p(ne[1],1/0),p(be[1],1/0)])}u(O,function(ke,Ee){G.link(ke,Ee)});for(var ze=!0,Ce=new Array(j),W=0;W<j;++W){var he=G.find(W);he!==W&&(ze=!1,q[he]=[Math.min(q[W][0],q[he][0]),Math.min(q[W][1],q[he][1])])}if(ze)return null;for(var te=0,W=0;W<j;++W){var he=G.find(W);he===W?(Ce[W]=te,q[te++]=q[W]):Ce[W]=-1}q.length=te;for(var W=0;W<j;++W)Ce[W]<0&&(Ce[W]=Ce[G.find(W)]);return Ce}function C(q,U){return q[0]-U[0]||q[1]-U[1]}function M(q,U){var H=q[0]-U[0]||q[1]-U[1];return H||(q[2]<U[2]?-1:q[2]>U[2]?1:0)}function v(q,U,H){if(q.length!==0){if(U)for(var j=0;j<q.length;++j){var G=q[j],O=U[G[0]],W=U[G[1]];G[0]=Math.min(O,W),G[1]=Math.max(O,W)}else for(var j=0;j<q.length;++j){var G=q[j],O=G[0],W=G[1];G[0]=Math.min(O,W),G[1]=Math.max(O,W)}H?q.sort(M):q.sort(C);for(var re=1,j=1;j<q.length;++j){var ne=q[j-1],be=q[j];be[0]===ne[0]&&be[1]===ne[1]&&(!H||be[2]===ne[2])||(q[re++]=be)}q.length=re}}function z(q,U,H){var j=_(q,[],k(q));return v(U,j,H),!!j}function T(q,U,H){var j=y(q,U),G=E(q,U,j),O=k(q),W=A(q,U,j,O),re=L(q,U,G,W,H),ne=_(q,re,O);return v(U,ne,H),ne?!0:G.length>0||W.length>0}function F(q,U,H){var j;if(H){j=U;for(var G=new Array(U.length),O=0;O<U.length;++O){var W=U[O];G[O]=[W[0],W[1],H[O]]}U=G}for(var re=z(q,U,!!H);T(q,U,!!H);)re=!0;if(H&&re){j.length=0,H.length=0;for(var O=0;O<U.length;++O){var W=U[O];j.push([W[0],W[1]]),H.push(W[2])}}return re}},3637:function(i,a,o){"use strict";i.exports=x;var s=o(6504),u=o(8697),l=o(5572),f=o(7721),c=o(544),h=o(2653),d=o(8987);function p(b,y){return l(s(b[0],y[1]),s(b[1],y[0]))}function x(b,y,k,E){var A=c(y,b),L=c(E,k),_=p(A,L);if(f(_)===0)return null;var C=c(b,k),M=p(L,C),v=u(M,_),z=d(A,v),T=h(b,z);return T}},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]}]}},6729:function(i,a,o){"use strict";var s=o(3642),u=o(395);i.exports=l;function l(d){var p,x,b,y,k,E,A,L,v,_,C;if(d||(d={}),L=(d.nshades||72)-1,A=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?_=[1,1]:_=d.alpha.slice():typeof d.alpha=="number"?_=[d.alpha,d.alpha]:_=[1,1],p=k.map(function(F){return Math.round(F.index*L)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var M=k.map(function(F,q){var U=k[q].index,H=k[q].rgb.slice();return H.length===4&&H[3]>=0&&H[3]<=1||(H[3]=_[0]+(_[1]-_[0])*U),H}),v=[];for(C=0;C<p.length-1;++C){y=p[C+1]-p[C],x=M[C],b=M[C+1];for(var z=0;z<y;z++){var T=z/y;v.push([Math.round(u(x[0],b[0],T)),Math.round(u(x[1],b[1],T)),Math.round(u(x[2],b[2],T)),u(x[3],b[3],T)])}}return v.push(k[k.length-1].rgb.concat(_[1])),A==="hex"?v=v.map(c):A==="rgbaString"?v=v.map(h):A==="float"&&(v=v.map(f)),v}function f(d){return[d[0]/255,d[1]/255,d[2]/255,d[3]]}function c(d){for(var p,x="#",b=0;b<3;++b)p=d[b],p=p.toString(16),x+=("00"+p).substr(p.length);return x}function h(d){return"rgba("+d.join(",")+")"}},3140:function(i,a,o){"use strict";i.exports=d;var s=o(3250),u=o(8572),l=o(9362),f=o(5382),c=o(8210);function h(p,x,b){var y=l(p[0],-x[0]),k=l(p[1],-x[1]),E=l(b[0],-x[0]),A=l(b[1],-x[1]),L=c(f(y,E),f(k,A));return L[L.length-1]>=0}function d(p,x,b,y){var k=s(x,b,y);if(k===0){var E=u(s(p,x,b)),A=u(s(p,x,y));if(E===A){if(E===0){var L=h(p,x,b),_=h(p,x,y);return L===_?0:L?1:-1}return 0}else{if(A===0)return E>0||h(p,x,y)?-1:1;if(E===0)return A>0||h(p,x,b)?1:-1}return u(A-E)}var C=s(p,x,b);if(C>0)return k>0&&s(p,x,y)>0?1:-1;if(C<0)return k>0||s(p,x,y)>0?1:-1;var M=s(p,x,y);return M>0||h(p,x,b)?1:-1}},8572:function(i){"use strict";i.exports=function(o){return o<0?-1:o>0?1:0}},8507:function(i){i.exports=s;var a=Math.min;function o(u,l){return u-l}function s(u,l){var f=u.length,c=u.length-l.length;if(c)return c;switch(f){case 0:return 0;case 1:return u[0]-l[0];case 2:return u[0]+u[1]-l[0]-l[1]||a(u[0],u[1])-a(l[0],l[1]);case 3:var h=u[0]+u[1],d=l[0]+l[1];if(c=h+u[2]-(d+l[2]),c)return c;var p=a(u[0],u[1]),x=a(l[0],l[1]);return a(p,u[2])-a(x,l[2])||a(p+u[2],h)-a(x+l[2],d);case 4:var b=u[0],y=u[1],k=u[2],E=u[3],A=l[0],L=l[1],_=l[2],C=l[3];return b+y+k+E-(A+L+_+C)||a(b,y,k,E)-a(A,L,_,C,A)||a(b+y,b+k,b+E,y+k,y+E,k+E)-a(A+L,A+_,A+C,L+_,L+C,_+C)||a(b+y+k,b+y+E,b+k+E,y+k+E)-a(A+L+_,A+L+C,A+_+C,L+_+C);default:for(var M=u.slice().sort(o),v=l.slice().sort(o),z=0;z<f;++z)if(c=M[z]-v[z],c)return c;return 0}}},3788:function(i,a,o){"use strict";var s=o(8507),u=o(2419);i.exports=l;function l(f,c){return s(f,c)||u(f)-u(c)}},7352:function(i,a,o){"use strict";var s=o(5721),u=o(4750),l=o(2690);i.exports=f;function f(c){var h=c.length;if(h===0)return[];if(h===1)return[[0]];var d=c[0].length;return d===0?[]:d===1?s(c):d===2?u(c):l(c,d)}},5721:function(i){"use strict";i.exports=a;function a(o){for(var s=0,u=0,l=1;l<o.length;++l)o[l][0]<o[s][0]&&(s=l),o[l][0]>o[u][0]&&(u=l);return s<u?[[s],[u]]:s>u?[[u],[s]]:[[s]]}},4750:function(i,a,o){"use strict";i.exports=u;var s=o(3090);function u(l){var f=s(l),c=f.length;if(c<=2)return[];for(var h=new Array(c),d=f[c-1],p=0;p<c;++p){var x=f[p];h[p]=[d,x],d=x}return h}},2690:function(i,a,o){"use strict";i.exports=c;var s=o(8954),u=o(3952);function l(h,d){for(var p=h.length,x=new Array(p),b=0;b<d.length;++b)x[b]=h[d[b]];for(var y=d.length,b=0;b<p;++b)d.indexOf(b)<0&&(x[y++]=h[b]);return x}function f(h,d){for(var p=h.length,x=d.length,b=0;b<p;++b)for(var y=h[b],k=0;k<y.length;++k){var E=y[k];if(E<x)y[k]=d[E];else{E=E-x;for(var A=0;A<x;++A)E>=d[A]&&(E+=1);y[k]=E}}return h}function c(h,d){try{return s(h,!0)}catch(y){var p=u(h);if(p.length<=d)return[];var x=l(h,p),b=s(x,!0);return f(b,p)}}},4769:function(i){"use strict";function a(s,u,l,f,c,h){var d=6*c*c-6*c,p=3*c*c-4*c+1,x=-6*c*c+6*c,b=3*c*c-2*c;if(s.length){h||(h=new Array(s.length));for(var y=s.length-1;y>=0;--y)h[y]=d*s[y]+p*u[y]+x*l[y]+b*f[y];return h}return d*s+p*u+x*l[y]+b*f}function o(s,u,l,f,c,h){var d=c-1,p=c*c,x=d*d,b=(1+2*c)*x,y=c*x,k=p*(3-2*c),E=p*d;if(s.length){h||(h=new Array(s.length));for(var A=s.length-1;A>=0;--A)h[A]=b*s[A]+y*u[A]+k*l[A]+E*f[A];return h}return b*s+y*u+k*l+E*f}i.exports=o,i.exports.derivative=a},7642:function(i,a,o){"use strict";var s=o(8954),u=o(1682);i.exports=h;function l(d,p){this.point=d,this.index=p}function f(d,p){for(var x=d.point,b=p.point,y=x.length,k=0;k<y;++k){var E=b[k]-x[k];if(E)return E}return 0}function c(d,p,x){if(d===1)return x?[[-1,0]]:[];var b=p.map(function(L,_){return[L[0],_]});b.sort(function(L,_){return L[0]-_[0]});for(var y=new Array(d-1),k=1;k<d;++k){var E=b[k-1],A=b[k];y[k-1]=[E[1],A[1]]}return x&&y.push([-1,y[0][1]],[y[d-1][1],-1]),y}function h(d,p){var x=d.length;if(x===0)return[];var b=d[0].length;if(b<1)return[];if(b===1)return c(x,d,p);for(var y=new Array(x),k=1,E=0;E<x;++E){for(var A=d[E],L=new Array(b+1),_=0,C=0;C<b;++C){var M=A[C];L[C]=M,_+=M*M}L[b]=_,y[E]=new l(L,E),k=Math.max(_,k)}u(y,f),x=y.length;for(var v=new Array(x+b+1),z=new Array(x+b+1),T=(b+1)*(b+1)*k,F=new Array(b+1),E=0;E<=b;++E)F[E]=0;F[b]=T,v[0]=F.slice(),z[0]=-1;for(var E=0;E<=b;++E){var L=F.slice();L[E]=1,v[E+1]=L,z[E+1]=-1}for(var E=0;E<x;++E){var q=y[E];v[E+b+1]=q.point,z[E+b+1]=q.index}var U=s(v,!1);if(p?U=U.filter(function(H){for(var j=0,G=0;G<=b;++G){var O=z[H[G]];if(O<0&&++j>=2)return!1;H[G]=O}return!0}):U=U.filter(function(H){for(var j=0;j<=b;++j){var G=z[H[j]];if(G<0)return!1;H[j]=G}return!0}),b&1)for(var E=0;E<U.length;++E){var q=U[E],L=q[0];q[0]=q[1],q[1]=L}return U}},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,_){return s[0]=L,s[1]=_,o[0]},E=function(L){return o[0]=L,s[0]},A=function(L){return o[0]=L,s[1]};var l=k,f=E,c=A;i.exports=function(_){return o[0]=_,[s[0],s[1]]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=A}else if(s[0]===1072693248){let k=function(L,_){return s[1]=L,s[0]=_,o[0]},E=function(L){return o[0]=L,s[1]},A=function(L){return o[0]=L,s[0]};var h=k,d=E,p=A;i.exports=function(_){return o[0]=_,[s[1],s[0]]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=A}else a=!1}if(!a){let k=function(L,_){return u.writeUInt32LE(L,0,!0),u.writeUInt32LE(_,4,!0),u.readDoubleLE(0,!0)},E=function(L){return u.writeDoubleLE(L,0,!0),u.readUInt32LE(0,!0)},A=function(L){return u.writeDoubleLE(L,0,!0),u.readUInt32LE(4,!0)};var x=k,b=E,y=A,u=new Buffer(8);i.exports=function(_){return u.writeDoubleLE(_,0,!0),[u.readUInt32LE(0,!0),u.readUInt32LE(4,!0)]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=A}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),A=i.exports.hi(k),L=A&(1<<20)-1;return A&2146435072&&(L+=1048576),[E,L]},i.exports.denormalized=function(k){var E=i.exports.hi(k);return!(E&2146435072)}},1338:function(i){"use strict";function a(u,l,f){var c=u[f]|0;if(c<=0)return[];var h=new Array(c),d;if(f===u.length-1)for(d=0;d<c;++d)h[d]=l;else for(d=0;d<c;++d)h[d]=a(u,l,f+1);return h}function o(u,l){var f,c;for(f=new Array(u),c=0;c<u;++c)f[c]=l;return f}function s(u,l){switch(typeof l=="undefined"&&(l=0),typeof u){case"number":if(u>0)return o(u|0,l);break;case"object":if(typeof u.length=="number")return a(u,l,0);break}return[]}i.exports=s},3134:function(i,a,o){"use strict";i.exports=u;var s=o(1682);function u(l,f){var c=l.length;if(typeof f!="number"){f=0;for(var h=0;h<c;++h){var d=l[h];f=Math.max(f,d[0],d[1])}f=(f|0)+1}f=f|0;for(var p=new Array(f),h=0;h<f;++h)p[h]=[];for(var h=0;h<c;++h){var d=l[h];p[d[0]].push(d[1]),p[d[1]].push(d[0])}for(var x=0;x<f;++x)s(p[x],function(b,y){return b-y});return p}},5033:function(i){"use strict";i.exports=a;function a(o,s,u){var l=s||0,f=u||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]],[l*o[12]+o[8],l*o[13]+o[9],l*o[14]+o[10],l*o[15]+o[11]],[f*o[12]-o[8],f*o[13]-o[9],f*o[14]-o[10],f*o[15]-o[11]]]}},9215:function(i,a,o){"use strict";i.exports=d;var s=o(4769),u=o(2478);function l(p,x,b){return Math.min(x,Math.max(p,b))}function f(p,x,b){this.dimension=p.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var y=0;y<this.dimension;++y)this.bounds[0][y]=-1/0,this.bounds[1][y]=1/0;this._state=p.slice().reverse(),this._velocity=x.slice().reverse(),this._time=[b],this._scratch=[p.slice(),p.slice(),p.slice(),p.slice(),p.slice()]}var c=f.prototype;c.flush=function(p){var x=u.gt(this._time,p)-1;x<=0||(this._time.splice(0,x),this._state.splice(0,x*this.dimension),this._velocity.splice(0,x*this.dimension))},c.curve=function(p){var x=this._time,b=x.length,y=u.le(x,p),k=this._scratch[0],E=this._state,A=this._velocity,L=this.dimension,_=this.bounds;if(y<0)for(var C=L-1,M=0;M<L;++M,--C)k[M]=E[C];else if(y>=b-1)for(var C=E.length-1,v=p-x[b-1],M=0;M<L;++M,--C)k[M]=E[C]+v*A[C];else{for(var C=L*(y+1)-1,z=x[y],T=x[y+1],F=T-z||1,q=this._scratch[1],U=this._scratch[2],H=this._scratch[3],j=this._scratch[4],G=!0,M=0;M<L;++M,--C)q[M]=E[C],H[M]=A[C]*F,U[M]=E[C+L],j[M]=A[C+L]*F,G=G&&q[M]===U[M]&&H[M]===j[M]&&H[M]===0;if(G)for(var M=0;M<L;++M)k[M]=q[M];else s(q,H,U,j,(p-z)/F,k)}for(var O=_[0],W=_[1],M=0;M<L;++M)k[M]=l(O[M],W[M],k[M]);return k},c.dcurve=function(p){var x=this._time,b=x.length,y=u.le(x,p),k=this._scratch[0],E=this._state,A=this._velocity,L=this.dimension;if(y>=b-1)for(var _=E.length-1,C=p-x[b-1],M=0;M<L;++M,--_)k[M]=A[_];else{for(var _=L*(y+1)-1,v=x[y],z=x[y+1],T=z-v||1,F=this._scratch[1],q=this._scratch[2],U=this._scratch[3],H=this._scratch[4],j=!0,M=0;M<L;++M,--_)F[M]=E[_],U[M]=A[_]*T,q[M]=E[_+L],H[M]=A[_+L]*T,j=j&&F[M]===q[M]&&U[M]===H[M]&&U[M]===0;if(j)for(var M=0;M<L;++M)k[M]=0;else{s.derivative(F,U,q,H,(p-v)/T,k);for(var M=0;M<L;++M)k[M]/=T}}return k},c.lastT=function(){var p=this._time;return p[p.length-1]},c.stable=function(){for(var p=this._velocity,x=p.length,b=this.dimension-1;b>=0;--b)if(p[--x])return!1;return!0},c.jump=function(p){var x=this.lastT(),b=this.dimension;if(!(p<x||arguments.length!==b+1)){var y=this._state,k=this._velocity,E=y.length-this.dimension,A=this.bounds,L=A[0],_=A[1];this._time.push(x,p);for(var C=0;C<2;++C)for(var M=0;M<b;++M)y.push(y[E++]),k.push(0);this._time.push(p);for(var M=b;M>0;--M)y.push(l(L[M-1],_[M-1],arguments[M])),k.push(0)}},c.push=function(p){var x=this.lastT(),b=this.dimension;if(!(p<x||arguments.length!==b+1)){var y=this._state,k=this._velocity,E=y.length-this.dimension,A=p-x,L=this.bounds,_=L[0],C=L[1],M=A>1e-6?1/A:0;this._time.push(p);for(var v=b;v>0;--v){var z=l(_[v-1],C[v-1],arguments[v]);y.push(z),k.push((z-y[E++])*M)}}},c.set=function(p){var x=this.dimension;if(!(p<this.lastT()||arguments.length!==x+1)){var b=this._state,y=this._velocity,k=this.bounds,E=k[0],A=k[1];this._time.push(p);for(var L=x;L>0;--L)b.push(l(E[L-1],A[L-1],arguments[L])),y.push(0)}},c.move=function(p){var x=this.lastT(),b=this.dimension;if(!(p<=x||arguments.length!==b+1)){var y=this._state,k=this._velocity,E=y.length-this.dimension,A=this.bounds,L=A[0],_=A[1],C=p-x,M=C>1e-6?1/C:0;this._time.push(p);for(var v=b;v>0;--v){var z=arguments[v];y.push(l(L[v-1],_[v-1],y[E++]+z)),k.push(z*M)}}},c.idle=function(p){var x=this.lastT();if(!(p<x)){var b=this.dimension,y=this._state,k=this._velocity,E=y.length-b,A=this.bounds,L=A[0],_=A[1],C=p-x;this._time.push(p);for(var M=b-1;M>=0;--M)y.push(l(L[M],_[M],y[E]+C*k[E])),k.push(0),E+=1}};function h(p){for(var x=new Array(p),b=0;b<p;++b)x[b]=0;return x}function d(p,x,b){switch(arguments.length){case 0:return new f([0],[0],0);case 1:if(typeof p=="number"){var y=h(p);return new f(y,y,0)}else return new f(p,h(p.length),0);case 2:if(typeof x=="number"){var y=h(p.length);return new f(p,y,+x)}else b=0;case 3:if(p.length!==x.length)throw new Error("state and velocity lengths must match");return new f(p,x,b)}}},3840:function(i){"use strict";i.exports=L;var a=0,o=1;function s(_,C,M,v,z,T){this._color=_,this.key=C,this.value=M,this.left=v,this.right=z,this._count=T}function u(_){return new s(_._color,_.key,_.value,_.left,_.right,_._count)}function l(_,C){return new s(_,C.key,C.value,C.left,C.right,C._count)}function f(_){_._count=1+(_.left?_.left._count:0)+(_.right?_.right._count:0)}function c(_,C){this._compare=_,this.root=C}var h=c.prototype;Object.defineProperty(h,"keys",{get:function(){var _=[];return this.forEach(function(C,M){_.push(C)}),_}}),Object.defineProperty(h,"values",{get:function(){var _=[];return this.forEach(function(C,M){_.push(M)}),_}}),Object.defineProperty(h,"length",{get:function(){return this.root?this.root._count:0}}),h.insert=function(_,C){for(var M=this._compare,v=this.root,z=[],T=[];v;){var F=M(_,v.key);z.push(v),T.push(F),F<=0?v=v.left:v=v.right}z.push(new s(a,_,C,null,null,1));for(var q=z.length-2;q>=0;--q){var v=z[q];T[q]<=0?z[q]=new s(v._color,v.key,v.value,z[q+1],v.right,v._count+1):z[q]=new s(v._color,v.key,v.value,v.left,z[q+1],v._count+1)}for(var q=z.length-1;q>1;--q){var U=z[q-1],v=z[q];if(U._color===o||v._color===o)break;var H=z[q-2];if(H.left===U)if(U.left===v){var j=H.right;if(j&&j._color===a)U._color=o,H.right=l(o,j),H._color=a,q-=1;else{if(H._color=a,H.left=U.right,U._color=o,U.right=H,z[q-2]=U,z[q-1]=v,f(H),f(U),q>=3){var G=z[q-3];G.left===H?G.left=U:G.right=U}break}}else{var j=H.right;if(j&&j._color===a)U._color=o,H.right=l(o,j),H._color=a,q-=1;else{if(U.right=v.left,H._color=a,H.left=v.right,v._color=o,v.left=U,v.right=H,z[q-2]=v,z[q-1]=U,f(H),f(U),f(v),q>=3){var G=z[q-3];G.left===H?G.left=v:G.right=v}break}}else if(U.right===v){var j=H.left;if(j&&j._color===a)U._color=o,H.left=l(o,j),H._color=a,q-=1;else{if(H._color=a,H.right=U.left,U._color=o,U.left=H,z[q-2]=U,z[q-1]=v,f(H),f(U),q>=3){var G=z[q-3];G.right===H?G.right=U:G.left=U}break}}else{var j=H.left;if(j&&j._color===a)U._color=o,H.left=l(o,j),H._color=a,q-=1;else{if(U.left=v.right,H._color=a,H.right=v.left,v._color=o,v.right=U,v.left=H,z[q-2]=v,z[q-1]=U,f(H),f(U),f(v),q>=3){var G=z[q-3];G.right===H?G.right=v:G.left=v}break}}}return z[0]._color=o,new c(M,z[0])};function d(_,C){if(C.left){var M=d(_,C.left);if(M)return M}var M=_(C.key,C.value);if(M)return M;if(C.right)return d(_,C.right)}function p(_,C,M,v){var z=C(_,v.key);if(z<=0){if(v.left){var T=p(_,C,M,v.left);if(T)return T}var T=M(v.key,v.value);if(T)return T}if(v.right)return p(_,C,M,v.right)}function x(_,C,M,v,z){var T=M(_,z.key),F=M(C,z.key),q;if(T<=0&&(z.left&&(q=x(_,C,M,v,z.left),q)||F>0&&(q=v(z.key,z.value),q)))return q;if(F>0&&z.right)return x(_,C,M,v,z.right)}h.forEach=function(C,M,v){if(this.root)switch(arguments.length){case 1:return d(C,this.root);case 2:return p(M,this._compare,C,this.root);case 3:return this._compare(M,v)>=0?void 0:x(M,v,this._compare,C,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var _=[],C=this.root;C;)_.push(C),C=C.left;return new b(this,_)}}),Object.defineProperty(h,"end",{get:function(){for(var _=[],C=this.root;C;)_.push(C),C=C.right;return new b(this,_)}}),h.at=function(_){if(_<0)return new b(this,[]);for(var C=this.root,M=[];;){if(M.push(C),C.left){if(_<C.left._count){C=C.left;continue}_-=C.left._count}if(!_)return new b(this,M);if(_-=1,C.right){if(_>=C.right._count)break;C=C.right}else break}return new b(this,[])},h.ge=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T<=0&&(z=v.length),T<=0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.gt=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T<0&&(z=v.length),T<0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.lt=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T>0&&(z=v.length),T<=0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.le=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T>=0&&(z=v.length),T<0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.find=function(_){for(var C=this._compare,M=this.root,v=[];M;){var z=C(_,M.key);if(v.push(M),z===0)return new b(this,v);z<=0?M=M.left:M=M.right}return new b(this,[])},h.remove=function(_){var C=this.find(_);return C?C.remove():this},h.get=function(_){for(var C=this._compare,M=this.root;M;){var v=C(_,M.key);if(v===0)return M.value;v<=0?M=M.left:M=M.right}};function b(_,C){this.tree=_,this._stack=C}var y=b.prototype;Object.defineProperty(y,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(y,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),y.clone=function(){return new b(this.tree,this._stack.slice())};function k(_,C){_.key=C.key,_.value=C.value,_.left=C.left,_.right=C.right,_._color=C._color,_._count=C._count}function E(_){for(var C,M,v,z,T=_.length-1;T>=0;--T){if(C=_[T],T===0){C._color=o;return}if(M=_[T-1],M.left===C){if(v=M.right,v.right&&v.right._color===a){if(v=M.right=u(v),z=v.right=u(v.right),M.right=v.left,v.left=M,v.right=z,v._color=M._color,C._color=o,M._color=o,z._color=o,f(M),f(v),T>1){var F=_[T-2];F.left===M?F.left=v:F.right=v}_[T-1]=v;return}else if(v.left&&v.left._color===a){if(v=M.right=u(v),z=v.left=u(v.left),M.right=z.left,v.left=z.right,z.left=M,z.right=v,z._color=M._color,M._color=o,v._color=o,C._color=o,f(M),f(v),f(z),T>1){var F=_[T-2];F.left===M?F.left=z:F.right=z}_[T-1]=z;return}if(v._color===o)if(M._color===a){M._color=o,M.right=l(a,v);return}else{M.right=l(a,v);continue}else{if(v=u(v),M.right=v.left,v.left=M,v._color=M._color,M._color=a,f(M),f(v),T>1){var F=_[T-2];F.left===M?F.left=v:F.right=v}_[T-1]=v,_[T]=M,T+1<_.length?_[T+1]=C:_.push(C),T=T+2}}else{if(v=M.left,v.left&&v.left._color===a){if(v=M.left=u(v),z=v.left=u(v.left),M.left=v.right,v.right=M,v.left=z,v._color=M._color,C._color=o,M._color=o,z._color=o,f(M),f(v),T>1){var F=_[T-2];F.right===M?F.right=v:F.left=v}_[T-1]=v;return}else if(v.right&&v.right._color===a){if(v=M.left=u(v),z=v.right=u(v.right),M.left=z.right,v.right=z.left,z.right=M,z.left=v,z._color=M._color,M._color=o,v._color=o,C._color=o,f(M),f(v),f(z),T>1){var F=_[T-2];F.right===M?F.right=z:F.left=z}_[T-1]=z;return}if(v._color===o)if(M._color===a){M._color=o,M.left=l(a,v);return}else{M.left=l(a,v);continue}else{if(v=u(v),M.left=v.right,v.right=M,v._color=M._color,M._color=a,f(M),f(v),T>1){var F=_[T-2];F.right===M?F.right=v:F.left=v}_[T-1]=v,_[T]=M,T+1<_.length?_[T+1]=C:_.push(C),T=T+2}}}}y.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var C=new Array(_.length),M=_[_.length-1];C[C.length-1]=new s(M._color,M.key,M.value,M.left,M.right,M._count);for(var v=_.length-2;v>=0;--v){var M=_[v];M.left===_[v+1]?C[v]=new s(M._color,M.key,M.value,C[v+1],M.right,M._count):C[v]=new s(M._color,M.key,M.value,M.left,C[v+1],M._count)}if(M=C[C.length-1],M.left&&M.right){var z=C.length;for(M=M.left;M.right;)C.push(M),M=M.right;var T=C[z-1];C.push(new s(M._color,T.key,T.value,M.left,M.right,M._count)),C[z-1].key=M.key,C[z-1].value=M.value;for(var v=C.length-2;v>=z;--v)M=C[v],C[v]=new s(M._color,M.key,M.value,M.left,C[v+1],M._count);C[z-1].left=C[z]}if(M=C[C.length-1],M._color===a){var F=C[C.length-2];F.left===M?F.left=null:F.right===M&&(F.right=null),C.pop();for(var v=0;v<C.length;++v)C[v]._count--;return new c(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 v=0;v<C.length-1;++v)C[v]._count--;return new c(this.tree._compare,C[0])}else{if(C.length===1)return new c(this.tree._compare,null);for(var v=0;v<C.length;++v)C[v]._count--;var q=C[C.length-2];E(C),q.left===M?q.left=null:q.right=null}return new c(this.tree._compare,C[0])},Object.defineProperty(y,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(y,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(y,"index",{get:function(){var _=0,C=this._stack;if(C.length===0){var M=this.tree.root;return M?M._count:0}else C[C.length-1].left&&(_=C[C.length-1].left._count);for(var v=C.length-2;v>=0;--v)C[v+1]===C[v].right&&(++_,C[v].left&&(_+=C[v].left._count));return _},enumerable:!0}),y.next=function(){var _=this._stack;if(_.length!==0){var C=_[_.length-1];if(C.right)for(C=C.right;C;)_.push(C),C=C.left;else for(_.pop();_.length>0&&_[_.length-1].right===C;)C=_[_.length-1],_.pop()}},Object.defineProperty(y,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var C=_.length-1;C>0;--C)if(_[C-1].left===_[C])return!0;return!1}}),y.update=function(_){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var M=new Array(C.length),v=C[C.length-1];M[M.length-1]=new s(v._color,v.key,_,v.left,v.right,v._count);for(var z=C.length-2;z>=0;--z)v=C[z],v.left===C[z+1]?M[z]=new s(v._color,v.key,v.value,M[z+1],v.right,v._count):M[z]=new s(v._color,v.key,v.value,v.left,M[z+1],v._count);return new c(this.tree._compare,M[0])},y.prev=function(){var _=this._stack;if(_.length!==0){var C=_[_.length-1];if(C.left)for(C=C.left;C;)_.push(C),C=C.right;else for(_.pop();_.length>0&&_[_.length-1].left===C;)C=_[_.length-1],_.pop()}},Object.defineProperty(y,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var C=_.length-1;C>0;--C)if(_[C-1].right===_[C])return!0;return!1}});function A(_,C){return _<C?-1:_>C?1:0}function L(_){return new c(_||A,null)}},3837:function(i,a,o){"use strict";i.exports=q;var s=o(4935),u=o(501),l=o(5304),f=o(6429),c=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,p=DataView;function x(U){return d.isView(U)&&!(U instanceof p)}function b(U){return Array.isArray(U)||x(U)}function y(U,H){return U[0]=H[0],U[1]=H[1],U[2]=H[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=l(U)}var E=k.prototype;E.update=function(U){U=U||{};function H(Me,Oe,Re){if(Re in U){var me=U[Re],Be=this[Re],fe;(Me?b(me)&&b(me[0]):b(me))?this[Re]=fe=[Oe(me[0]),Oe(me[1]),Oe(me[2])]:this[Re]=fe=[Oe(me),Oe(me),Oe(me)];for(var Ze=0;Ze<3;++Ze)if(fe[Ze]!==Be[Ze])return!0}return!1}var j=H.bind(this,!1,Number),G=H.bind(this,!1,Boolean),O=H.bind(this,!1,String),W=H.bind(this,!0,function(Me){if(b(Me)){if(Me.length===3)return[+Me[0],+Me[1],+Me[2],1];if(Me.length===4)return[+Me[0],+Me[1],+Me[2],+Me[3]]}return[0,0,0,1]}),re,ne=!1,be=!1;if("bounds"in U)for(var ze=U.bounds,Ce=0;Ce<2;++Ce)for(var he=0;he<3;++he)ze[Ce][he]!==this.bounds[Ce][he]&&(be=!0),this.bounds[Ce][he]=ze[Ce][he];if("ticks"in U){re=U.ticks,ne=!0,this.autoTicks=!1;for(var Ce=0;Ce<3;++Ce)this.tickSpacing[Ce]=0}else j("tickSpacing")&&(this.autoTicks=!0,be=!0);if(this._firstInit&&("ticks"in U||"tickSpacing"in U||(this.autoTicks=!0),be=!0,ne=!0,this._firstInit=!1),be&&this.autoTicks&&(re=c.create(this.bounds,this.tickSpacing),ne=!0),ne){for(var Ce=0;Ce<3;++Ce)re[Ce].sort(function(Oe,Re){return Oe.x-Re.x});c.equal(re,this.ticks)?ne=!1:this.ticks=re}G("tickEnable"),O("tickFont")&&(ne=!0),O("tickFontStyle")&&(ne=!0),O("tickFontWeight")&&(ne=!0),O("tickFontVariant")&&(ne=!0),j("tickSize"),j("tickAngle"),j("tickPad"),W("tickColor");var te=O("labels");O("labelFont")&&(te=!0),O("labelFontStyle")&&(te=!0),O("labelFontWeight")&&(te=!0),O("labelFontVariant")&&(te=!0),G("labelEnable"),j("labelSize"),j("labelPad"),W("labelColor"),G("lineEnable"),G("lineMirror"),j("lineWidth"),W("lineColor"),G("lineTickEnable"),G("lineTickMirror"),j("lineTickLength"),j("lineTickWidth"),W("lineTickColor"),G("gridEnable"),j("gridWidth"),W("gridColor"),G("zeroEnable"),W("zeroLineColor"),j("zeroLineWidth"),G("backgroundEnable"),W("backgroundColor");var ke=[{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&&(te||ne)&&this._text.update(this.bounds,this.labels,ke,this.ticks,Ee):this._text=s(this.gl,this.bounds,this.labels,ke,this.ticks,Ee),this._lines&&ne&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};function A(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new A,new A,new A];function _(U,H,j,G,O){for(var W=U.primalOffset,re=U.primalMinor,ne=U.mirrorOffset,be=U.mirrorMinor,ze=G[H],Ce=0;Ce<3;++Ce)if(H!==Ce){var he=W,te=ne,ke=re,Ee=be;ze&1<<Ce&&(he=ne,te=W,ke=be,Ee=re),he[Ce]=j[0][Ce],te[Ce]=j[1][Ce],O[Ce]>0?(ke[Ce]=-1,Ee[Ce]=0):(ke[Ce]=0,Ee[Ce]=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 v=0,z=[0,0,0],T=[0,0,0],F=[0,0,0];E.draw=function(U){U=U||M;for(var Re=this.gl,H=U.model||h,j=U.view||h,G=U.projection||h,O=this.bounds,W=U._ortho||!1,re=f(H,j,G,O,W),ne=re.cubeEdges,be=re.axis,ze=j[12],Ce=j[13],he=j[14],te=j[15],ke=W?2:1,Ee=ke*this.pixelRatio*(G[3]*ze+G[7]*Ce+G[11]*he+G[15]*te)/Re.drawingBufferHeight,Me=0;Me<3;++Me)this.lastCubeProps.cubeEdges[Me]=ne[Me],this.lastCubeProps.axis[Me]=be[Me];for(var Oe=L,Me=0;Me<3;++Me)_(L[Me],Me,this.bounds,ne,be);for(var Re=this.gl,me=C,Me=0;Me<3;++Me)this.backgroundEnable[Me]?me[Me]=be[Me]:me[Me]=0;this._background.draw(H,j,G,O,me,this.backgroundColor),this._lines.bind(H,j,G,this);for(var Me=0;Me<3;++Me){var Be=[0,0,0];be[Me]>0?Be[Me]=O[1][Me]:Be[Me]=O[0][Me];for(var fe=0;fe<2;++fe){var Ze=(Me+1+fe)%3,et=(Me+1+(fe^1))%3;this.gridEnable[Ze]&&this._lines.drawGrid(Ze,et,this.bounds,Be,this.gridColor[Ze],this.gridWidth[Ze]*this.pixelRatio)}for(var fe=0;fe<2;++fe){var Ze=(Me+1+fe)%3,et=(Me+1+(fe^1))%3;this.zeroEnable[et]&&Math.min(O[0][et],O[1][et])<=0&&Math.max(O[0][et],O[1][et])>=0&&this._lines.drawZero(Ze,et,this.bounds,Be,this.zeroLineColor[et],this.zeroLineWidth[et]*this.pixelRatio)}}for(var Me=0;Me<3;++Me){this.lineEnable[Me]&&this._lines.drawAxisLine(Me,this.bounds,Oe[Me].primalOffset,this.lineColor[Me],this.lineWidth[Me]*this.pixelRatio),this.lineMirror[Me]&&this._lines.drawAxisLine(Me,this.bounds,Oe[Me].mirrorOffset,this.lineColor[Me],this.lineWidth[Me]*this.pixelRatio);for(var gt=y(z,Oe[Me].primalMinor),Pt=y(T,Oe[Me].mirrorMinor),Qe=this.lineTickLength,fe=0;fe<3;++fe){var Xe=Ee/H[5*fe];gt[fe]*=Qe[fe]*Xe,Pt[fe]*=Qe[fe]*Xe}this.lineTickEnable[Me]&&this._lines.drawAxisTicks(Me,Oe[Me].primalOffset,gt,this.lineTickColor[Me],this.lineTickWidth[Me]*this.pixelRatio),this.lineTickMirror[Me]&&this._lines.drawAxisTicks(Me,Oe[Me].mirrorOffset,Pt,this.lineTickColor[Me],this.lineTickWidth[Me]*this.pixelRatio)}this._lines.unbind(),this._text.bind(H,j,G,this.pixelRatio);var Tt,xt=.5,_t,Ct;function jt(rt){Ct=[0,0,0],Ct[rt]=1}function At(rt,je,tt){var Je=(rt+1)%3,Mt=(rt+2)%3,Vt=je[Je],Kt=je[Mt],ir=tt[Je],fr=tt[Mt];if(Vt>0&&fr>0){jt(Je);return}else if(Vt>0&&fr<0){jt(Je);return}else if(Vt<0&&fr>0){jt(Je);return}else if(Vt<0&&fr<0){jt(Je);return}else if(Kt>0&&ir>0){jt(Mt);return}else if(Kt>0&&ir<0){jt(Mt);return}else if(Kt<0&&ir>0){jt(Mt);return}else if(Kt<0&&ir<0){jt(Mt);return}}for(var Me=0;Me<3;++Me){for(var Te=Oe[Me].primalMinor,nt=Oe[Me].mirrorMinor,ut=y(F,Oe[Me].primalOffset),fe=0;fe<3;++fe)this.lineTickEnable[Me]&&(ut[fe]+=Ee*Te[fe]*Math.max(this.lineTickLength[fe],0)/H[5*fe]);var ct=[0,0,0];if(ct[Me]=1,this.tickEnable[Me]){this.tickAngle[Me]===-3600?(this.tickAngle[Me]=0,this.tickAlign[Me]="auto"):this.tickAlign[Me]=-1,_t=1,Tt=[this.tickAlign[Me],xt,_t],Tt[0]==="auto"?Tt[0]=v:Tt[0]=parseInt(""+Tt[0]),Ct=[0,0,0],At(Me,Te,nt);for(var fe=0;fe<3;++fe)ut[fe]+=Ee*Te[fe]*this.tickPad[fe]/H[5*fe];this._text.drawTicks(Me,this.tickSize[Me],this.tickAngle[Me],ut,this.tickColor[Me],ct,Ct,Tt)}if(this.labelEnable[Me]){_t=0,Ct=[0,0,0],this.labels[Me].length>4&&(jt(Me),_t=1),Tt=[this.labelAlign[Me],xt,_t],Tt[0]==="auto"?Tt[0]=v:Tt[0]=parseInt(""+Tt[0]);for(var fe=0;fe<3;++fe)ut[fe]+=Ee*Te[fe]*this.labelPad[fe]/H[5*fe];ut[Me]+=.5*(O[0][Me]+O[1][Me]),this._text.drawLabel(Me,this.labelSize[Me],this.labelAngle[Me],ut,this.labelColor[Me],[0,0,0],Ct,Tt)}}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 q(U,H){var j=new k(U);return j.update(H),j}},5304:function(i,a,o){"use strict";i.exports=h;var s=o(2762),u=o(8116),l=o(1879).bg;function f(d,p,x,b){this.gl=d,this.buffer=p,this.vao=x,this.shader=b}var c=f.prototype;c.draw=function(d,p,x,b,y,k){for(var E=!1,A=0;A<3;++A)E=E||y[A];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:p,projection:x,bounds:b,enable:y,colors:k},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var p=[],x=[],b=0,y=0;y<3;++y)for(var k=(y+1)%3,E=(y+2)%3,A=[0,0,0],L=[0,0,0],_=-1;_<=1;_+=2){x.push(b,b+2,b+1,b+1,b+2,b+3),A[y]=_,L[y]=_;for(var C=-1;C<=1;C+=2){A[k]=C;for(var M=-1;M<=1;M+=2)A[E]=M,p.push(A[0],A[1],A[2],L[0],L[1],L[2]),b+=1}var v=k;k=E,E=v}var z=s(d,new Float32Array(p)),T=s(d,new Uint16Array(x),d.ELEMENT_ARRAY_BUFFER),F=u(d,[{buffer:z,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:z,type:d.FLOAT,size:3,offset:12,stride:24}],T),q=l(d);return q.attributes.position.location=0,q.attributes.normal.location=1,new f(d,z,F,q)}},6429:function(i,a,o){"use strict";i.exports=_;var s=o(8828),u=o(6760),l=o(5202),f=o(3250),c=new Array(16),h=new Array(8),d=new Array(8),p=new Array(3),x=[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,v){for(var z=0;z<4;++z){C[z]=v[12+z];for(var T=0;T<3;++T)C[z]+=M[T]*v[4*T+z]}}var y=[[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<y.length;++M)if(C=l.positive(C,y[M]),C.length<3)return 0;for(var v=C[0],z=v[0]/v[3],T=v[1]/v[3],F=0,M=1;M+1<C.length;++M){var q=C[M],U=C[M+1],H=q[0]/q[3],j=q[1]/q[3],G=U[0]/U[3],O=U[1]/U[3],W=H-z,re=j-T,ne=G-z,be=O-T;F+=Math.abs(W*be-re*ne)}return F}var E=[1,1,1],A=[0,0,0],L={cubeEdges:E,axis:A};function _(C,M,v,z,T){u(c,M,C),u(c,v,c);for(var F=0,q=0;q<2;++q){p[2]=z[q][2];for(var U=0;U<2;++U){p[1]=z[U][1];for(var H=0;H<2;++H)p[0]=z[H][0],b(h[F],p,c),F+=1}}for(var j=-1,q=0;q<8;++q){for(var G=h[q][3],O=0;O<3;++O)d[q][O]=h[q][O]/G;T&&(d[q][2]*=-1),G<0&&(j<0||d[q][2]<d[j][2])&&(j=q)}if(j<0){j=0;for(var W=0;W<3;++W){for(var re=(W+2)%3,ne=(W+1)%3,be=-1,ze=-1,Ce=0;Ce<2;++Ce){var he=Ce<<W,te=he+(Ce<<re)+(1-Ce<<ne),ke=he+(1-Ce<<re)+(Ce<<ne);f(d[he],d[te],d[ke],x)<0||(Ce?be=1:ze=1)}if(be<0||ze<0){ze>be&&(j|=1<<W);continue}for(var Ce=0;Ce<2;++Ce){var he=Ce<<W,te=he+(Ce<<re)+(1-Ce<<ne),ke=he+(1-Ce<<re)+(Ce<<ne),Ee=k([h[he],h[te],h[ke],h[he+(1<<re)+(1<<ne)]]);Ce?be=Ee:ze=Ee}if(ze>be){j|=1<<W;continue}}}for(var Me=7^j,Oe=-1,q=0;q<8;++q)q===j||q===Me||(Oe<0||d[Oe][1]>d[q][1])&&(Oe=q);for(var Re=-1,q=0;q<3;++q){var me=Oe^1<<q;if(!(me===j||me===Me)){Re<0&&(Re=me);var ne=d[me];ne[0]<d[Re][0]&&(Re=me)}}for(var Be=-1,q=0;q<3;++q){var me=Oe^1<<q;if(!(me===j||me===Me||me===Re)){Be<0&&(Be=me);var ne=d[me];ne[0]>d[Be][0]&&(Be=me)}}var fe=E;fe[0]=fe[1]=fe[2]=0,fe[s.log2(Re^Oe)]=Oe&Re,fe[s.log2(Oe^Be)]=Oe&Be;var Ze=Be^7;Ze===j||Ze===Me?(Ze=Re^7,fe[s.log2(Be^Ze)]=Ze&Be):fe[s.log2(Re^Ze)]=Ze&Re;for(var et=A,gt=j,W=0;W<3;++W)gt&1<<W?et[W]=-1:et[W]=1;return L}},501:function(i,a,o){"use strict";i.exports=E;var s=o(2762),u=o(8116),l=o(1879).n,f=[0,0,0],c=[0,0,0],h=[0,0,0],d=[0,0,0],p=[1,1];function x(A){return A[0]=A[1]=A[2]=0,A}function b(A,L){return A[0]=L[0],A[1]=L[1],A[2]=L[2],A}function y(A,L,_,C,M,v,z,T){this.gl=A,this.vertBuffer=L,this.vao=_,this.shader=C,this.tickCount=M,this.tickOffset=v,this.gridCount=z,this.gridOffset=T}var k=y.prototype;k.bind=function(A,L,_){this.shader.bind(),this.shader.uniforms.model=A,this.shader.uniforms.view=L,this.shader.uniforms.projection=_,p[0]=this.gl.drawingBufferWidth,p[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=p,this.vao.bind()},k.unbind=function(){this.vao.unbind()},k.drawAxisLine=function(A,L,_,C,M){var v=x(c);this.shader.uniforms.majorAxis=c,v[A]=L[1][A]-L[0][A],this.shader.uniforms.minorAxis=v;var z=b(d,_);z[A]+=L[0][A],this.shader.uniforms.offset=z,this.shader.uniforms.lineWidth=M,this.shader.uniforms.color=C;var T=x(h);T[(A+2)%3]=1,this.shader.uniforms.screenAxis=T,this.vao.draw(this.gl.TRIANGLES,6);var T=x(h);T[(A+1)%3]=1,this.shader.uniforms.screenAxis=T,this.vao.draw(this.gl.TRIANGLES,6)},k.drawAxisTicks=function(A,L,_,C,M){if(this.tickCount[A]){var v=x(f);v[A]=1,this.shader.uniforms.majorAxis=v,this.shader.uniforms.offset=L,this.shader.uniforms.minorAxis=_,this.shader.uniforms.color=C,this.shader.uniforms.lineWidth=M;var z=x(h);z[A]=1,this.shader.uniforms.screenAxis=z,this.vao.draw(this.gl.TRIANGLES,this.tickCount[A],this.tickOffset[A])}},k.drawGrid=function(A,L,_,C,M,v){if(this.gridCount[A]){var z=x(c);z[L]=_[1][L]-_[0][L],this.shader.uniforms.minorAxis=z;var T=b(d,C);T[L]+=_[0][L],this.shader.uniforms.offset=T;var F=x(f);F[A]=1,this.shader.uniforms.majorAxis=F;var q=x(h);q[A]=1,this.shader.uniforms.screenAxis=q,this.shader.uniforms.lineWidth=v,this.shader.uniforms.color=M,this.vao.draw(this.gl.TRIANGLES,this.gridCount[A],this.gridOffset[A])}},k.drawZero=function(A,L,_,C,M,v){var z=x(c);this.shader.uniforms.majorAxis=z,z[A]=_[1][A]-_[0][A],this.shader.uniforms.minorAxis=z;var T=b(d,C);T[A]+=_[0][A],this.shader.uniforms.offset=T;var F=x(h);F[L]=1,this.shader.uniforms.screenAxis=F,this.shader.uniforms.lineWidth=v,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(A,L,_){var C=[],M=[0,0,0],v=[0,0,0],z=[0,0,0],T=[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 F=0;F<3;++F){for(var H=C.length/3|0,q=0;q<_[F].length;++q){var U=+_[F][q].x;C.push(U,0,1,U,1,1,U,0,-1,U,0,-1,U,1,1,U,1,-1)}var G=C.length/3|0;M[F]=H,v[F]=G-H;for(var H=C.length/3|0,j=0;j<_[F].length;++j){var U=+_[F][j].x;C.push(U,0,1,U,1,1,U,0,-1,U,0,-1,U,1,1,U,1,-1)}var G=C.length/3|0;z[F]=H,T[F]=G-H}var O=s(A,new Float32Array(C)),W=u(A,[{buffer:O,type:A.FLOAT,size:3,stride:0,offset:0}]),re=l(A);return re.attributes.position.location=0,new y(A,O,W,re,v,M,T,z)}},1879:function(i,a,o){"use strict";var s=o(3236),u=o(9405),l=s([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;

uniform mat4 model, view, projection;
uniform vec3 offset, majorAxis, minorAxis, screenAxis;
uniform float lineWidth;
uniform vec2 screenShape;

vec3 project(vec3 p) {
  vec4 pp = projection * (view * (model * vec4(p, 1.0)));
  return pp.xyz / max(pp.w, 0.0001);
}

void main() {
  vec3 major = position.x * majorAxis;
  vec3 minor = position.y * minorAxis;

  vec3 vPosition = major + minor + offset;
  vec3 pPosition = project(vPosition);
  vec3 offset = project(vPosition + screenAxis * position.z);

  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;

  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);
}
`]),f=s([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);a.n=function(x){return u(x,l,f,null,[{name:"position",type:"vec3"}])};var c=s([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;

uniform mat4 model, view, projection;
uniform vec3 offset, axis, alignDir, alignOpt;
uniform float scale, angle, pixelScale;
uniform vec2 resolution;

vec3 project(vec3 p) {
  vec4 pp = projection * (view * (model * vec4(p, 1.0)));
  return pp.xyz / max(pp.w, 0.0001);
}

float computeViewAngle(vec3 a, vec3 b) {
  vec3 A = project(a);
  vec3 B = project(b);

  return atan(
    (B.y - A.y) * resolution.y,
    (B.x - A.x) * resolution.x
  );
}

const float PI = 3.141592;
const float TWO_PI = 2.0 * PI;
const float HALF_PI = 0.5 * PI;
const float ONE_AND_HALF_PI = 1.5 * PI;

int option = int(floor(alignOpt.x + 0.001));
float hv_ratio =       alignOpt.y;
bool enableAlign =    (alignOpt.z != 0.0);

float mod_angle(float a) {
  return mod(a, PI);
}

float positive_angle(float a) {
  return mod_angle((a < 0.0) ?
    a + TWO_PI :
    a
  );
}

float look_upwards(float a) {
  float b = positive_angle(a);
  return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?
    b - PI :
    b;
}

float look_horizontal_or_vertical(float a, float ratio) {
  // ratio controls the ratio between being horizontal to (vertical + horizontal)
  // if ratio is set to 0.5 then it is 50%, 50%.
  // when using a higher ratio e.g. 0.75 the result would
  // likely be more horizontal than vertical.

  float b = positive_angle(a);

  return
    (b < (      ratio) * HALF_PI) ? 0.0 :
    (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :
    (b < (2.0 + ratio) * HALF_PI) ? 0.0 :
    (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :
                                    0.0;
}

float roundTo(float a, float b) {
  return float(b * floor((a + 0.5 * b) / b));
}

float look_round_n_directions(float a, int n) {
  float b = positive_angle(a);
  float div = TWO_PI / float(n);
  float c = roundTo(b, div);
  return look_upwards(c);
}

float applyAlignOption(float rawAngle, float delta) {
  return
    (option >  2) ? look_round_n_directions(rawAngle + delta, option) :       // option 3-n: round to n directions
    (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical
    (option == 1) ? rawAngle + delta :       // use free angle, and flip to align with one direction of the axis
    (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards
    (option ==-1) ? 0.0 :                    // useful for backward compatibility, all texts remains horizontal
                    rawAngle;                // otherwise return back raw input angle
}

bool isAxisTitle = (axis.x == 0.0) &&
                   (axis.y == 0.0) &&
                   (axis.z == 0.0);

void main() {
  //Compute world offset
  float axisDistance = position.z;
  vec3 dataPosition = axisDistance * axis + offset;

  float beta = angle; // i.e. user defined attributes for each tick

  float axisAngle;
  float clipAngle;
  float flip;

  if (enableAlign) {
    axisAngle = (isAxisTitle) ? HALF_PI :
                      computeViewAngle(dataPosition, dataPosition + axis);
    clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);

    axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;
    clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;

    flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),
                vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;

    beta += applyAlignOption(clipAngle, flip * PI);
  }

  //Compute plane offset
  vec2 planeCoord = position.xy * pixelScale;

  mat2 planeXform = scale * mat2(
     cos(beta), sin(beta),
    -sin(beta), cos(beta)
  );

  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;

  //Compute clip position
  vec3 clipPosition = project(dataPosition);

  //Apply text offset in clip coordinates
  clipPosition += vec3(viewOffset, 0.0);

  //Done
  gl_Position = vec4(clipPosition, 1.0);
}
`]),h=s([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);a.Q=function(x){return u(x,c,h,null,[{name:"position",type:"vec3"}])};var d=s([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;
attribute vec3 normal;

uniform mat4 model, view, projection;
uniform vec3 enable;
uniform vec3 bounds[2];

varying vec3 colorChannel;

void main() {

  vec3 signAxis = sign(bounds[1] - bounds[0]);

  vec3 realNormal = signAxis * normal;

  if(dot(realNormal, enable) > 0.0) {
    vec3 minRange = min(bounds[0], bounds[1]);
    vec3 maxRange = max(bounds[0], bounds[1]);
    vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));
    gl_Position = projection * (view * (model * vec4(nPosition, 1.0)));
  } else {
    gl_Position = vec4(0,0,0,0);
  }

  colorChannel = abs(realNormal);
}
`]),p=s([`precision highp float;
#define GLSLIFY 1

uniform vec4 colors[3];

varying vec3 colorChannel;

void main() {
  gl_FragColor = colorChannel.x * colors[0] +
                 colorChannel.y * colors[1] +
                 colorChannel.z * colors[2];
}`]);a.bg=function(x){return u(x,d,p,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(i,a,o){"use strict";i.exports=k;var s=o(2762),u=o(8116),l=o(4359),f=o(1879).Q,c=window||process.global||{},h=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var d=3;function p(E,A,L,_){this.gl=E,this.shader=A,this.buffer=L,this.vao=_,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var x=p.prototype,b=[0,0];x.bind=function(E,A,L,_){this.vao.bind(),this.shader.bind();var C=this.shader.uniforms;C.model=E,C.view=A,C.projection=L,C.pixelScale=_,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},x.unbind=function(){this.vao.unbind()},x.update=function(E,A,L,_,C){var M=[];function v(W,re,ne,be,ze,Ce){var he=[ne.style,ne.weight,ne.variant,ne.family].join("_"),te=h[he];te||(te=h[he]={});var ke=te[re];ke||(ke=te[re]=y(re,{triangles:!0,font:ne.family,fontStyle:ne.style,fontWeight:ne.weight,fontVariant:ne.variant,textAlign:"center",textBaseline:"middle",lineSpacing:ze,styletags:Ce}));for(var Ee=(be||12)/12,Me=ke.positions,Oe=ke.cells,Re=0,me=Oe.length;Re<me;++Re)for(var Be=Oe[Re],fe=2;fe>=0;--fe){var Ze=Me[Be[fe]];M.push(Ee*Ze[0],-Ee*Ze[1],W)}}for(var z=[0,0,0],T=[0,0,0],F=[0,0,0],q=[0,0,0],U=1.25,H={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},j=0;j<3;++j){F[j]=M.length/d|0,v(.5*(E[0][j]+E[1][j]),A[j],L[j],12,U,H),q[j]=(M.length/d|0)-F[j],z[j]=M.length/d|0;for(var G=0;G<_[j].length;++G)if(_[j][G].text){var O={family:_[j][G].font||C[j].family,style:C[j].fontStyle||C[j].style,weight:C[j].fontWeight||C[j].weight,variant:C[j].fontVariant||C[j].variant};v(_[j][G].x,_[j][G].text,O,_[j][G].fontSize||12,U,H)}T[j]=(M.length/d|0)-z[j]}this.buffer.update(M),this.tickOffset=z,this.tickCount=T,this.labelOffset=F,this.labelCount=q},x.drawTicks=function(E,A,L,_,C,M,v,z){this.tickCount[E]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=A,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=v,this.shader.uniforms.alignOpt=z,this.vao.draw(this.gl.TRIANGLES,this.tickCount[E],this.tickOffset[E]))},x.drawLabel=function(E,A,L,_,C,M,v,z){this.labelCount[E]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=A,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=v,this.shader.uniforms.alignOpt=z,this.vao.draw(this.gl.TRIANGLES,this.labelCount[E],this.labelOffset[E]))},x.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function y(E,A){try{return l(E,A)}catch(L){return console.warn('error vectorizing text:"'+E+'" error:',L),{cells:[],positions:[]}}}function k(E,A,L,_,C,M){var v=s(E),z=u(E,[{buffer:v,size:3}]),T=f(E);T.attributes.position.location=0;var F=new p(E,T,v,z);return F.update(A,L,_,C,M),F}},6444:function(i,a){"use strict";a.create=s,a.equal=u;function o(l,f){var c=l+"",h=c.indexOf("."),d=0;h>=0&&(d=c.length-h-1);var p=Math.pow(10,d),x=Math.round(l*f*p),b=x+"";if(b.indexOf("e")>=0)return b;var y=x/p,k=x%p;x<0?(y=-Math.ceil(y)|0,k=-k|0):(y=Math.floor(y)|0,k=k|0);var E=""+y;if(x<0&&(E="-"+E),d){for(var A=""+k;A.length<d;)A="0"+A;return E+"."+A}else return E}function s(l,f){for(var c=[],h=0;h<3;++h){for(var d=[],p=.5*(l[0][h]+l[1][h]),x=0;x*f[h]<=l[1][h];++x)d.push({x:x*f[h],text:o(f[h],x)});for(var x=-1;x*f[h]>=l[0][h];--x)d.push({x:x*f[h],text:o(f[h],x)});c.push(d)}return c}function u(l,f){for(var c=0;c<3;++c){if(l[c].length!==f[c].length)return!1;for(var h=0;h<l[c].length;++h){var d=l[c][h],p=f[c][h];if(d.x!==p.x||d.text!==p.text||d.font!==p.font||d.fontColor!==p.fontColor||d.fontSize!==p.fontSize||d.dx!==p.dx||d.dy!==p.dy)return!1}}return!0}},5445:function(i,a,o){"use strict";i.exports=L;var s=o(5033),u=o(5202),l=o(6429),f=o(6760),c=o(5665),h=o(5352),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=new Float32Array(16);function x(_,C,M){this.lo=_,this.hi=C,this.pixelsPerDataUnit=M}var b=[0,0,0,1],y=[0,0,0,1];function k(_,C,M,v,z){for(var T=0;T<3;++T){for(var F=b,q=y,U=0;U<3;++U)q[U]=F[U]=M[U];q[3]=F[3]=1,q[T]+=1,h(q,q,C),q[3]<0&&(_[T]=1/0),F[T]-=1,h(F,F,C),F[3]<0&&(_[T]=1/0);var H=(F[0]/F[3]-q[0]/q[3])*v,j=(F[1]/F[3]-q[1]/q[3])*z;_[T]=.25*Math.sqrt(H*H+j*j)}return _}var E=[new x(1/0,-1/0,1/0),new x(1/0,-1/0,1/0),new x(1/0,-1/0,1/0)],A=[0,0,0];function L(_,C,M,v,j){var T=C.model||d,F=C.view||d,q=C.projection||d,U=C._ortho||!1,H=_.bounds,j=j||l(T,F,q,H,U),G=j.axis;f(p,F,T),f(p,q,p);for(var O=E,W=0;W<3;++W)O[W].lo=1/0,O[W].hi=-1/0,O[W].pixelsPerDataUnit=1/0;var re=s(c(p,p));c(p,p);for(var ne=0;ne<3;++ne){var be=(ne+1)%3,ze=(ne+2)%3,Ce=A;e:for(var W=0;W<2;++W){var he=[];if(G[ne]<0!=!!W){Ce[ne]=H[W][ne];for(var te=0;te<2;++te){Ce[be]=H[te^W][be];for(var ke=0;ke<2;++ke)Ce[ze]=H[ke^te^W][ze],he.push(Ce.slice())}for(var Ee=U?5:4,te=Ee;te===Ee;++te){if(he.length===0)continue e;he=u.positive(he,re[te])}for(var te=0;te<he.length;++te)for(var ze=he[te],Me=k(A,p,ze,M,v),ke=0;ke<3;++ke)O[ke].lo=Math.min(O[ke].lo,ze[ke]),O[ke].hi=Math.max(O[ke].hi,ze[ke]),ke!==ne&&(O[ke].pixelsPerDataUnit=Math.min(O[ke].pixelsPerDataUnit,Math.abs(Me[ke])))}}}return O}},2762:function(i,a,o){"use strict";var s=o(1888),u=o(5298),l=o(9618),f=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function c(y,k,E,A,L){this.gl=y,this.type=k,this.handle=E,this.length=A,this.usage=L}var h=c.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(y,k,E,A,L,_){var C=L.length*L.BYTES_PER_ELEMENT;if(_<0)return y.bufferData(k,L,A),C;if(C+_>E)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return y.bufferSubData(k,_,L),E}function p(y,k){for(var E=s.malloc(y.length,k),A=y.length,L=0;L<A;++L)E[L]=y[L];return E}function x(y,k){for(var E=1,A=k.length-1;A>=0;--A){if(k[A]!==E)return!1;E*=y[A]}return!0}h.update=function(y,k){if(typeof k!="number"&&(k=-1),this.bind(),typeof y=="object"&&typeof y.shape!="undefined"){var E=y.dtype;if(f.indexOf(E)<0&&(E="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&E!=="uint16"?E="uint32":E="uint16"}if(E===y.dtype&&x(y.shape,y.stride))y.offset===0&&y.data.length===y.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,y.data,k):this.length=d(this.gl,this.type,this.length,this.usage,y.data.subarray(y.offset,y.shape[0]),k);else{var L=s.malloc(y.size,E),_=l(L,y.shape);u.assign(_,y),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,y.size),k),s.free(L)}}else if(Array.isArray(y)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=p(y,"uint16"):C=p(y,"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,y.length),k),s.free(C)}else if(typeof y=="object"&&typeof y.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,y,k);else if(typeof y=="number"||y===void 0){if(k>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");y=y|0,y<=0&&(y=1),this.gl.bufferData(this.type,y|0,this.usage),this.length=y}else throw new Error("gl-buffer: Invalid data type")};function b(y,k,E,A){if(E=E||y.ARRAY_BUFFER,A=A||y.DYNAMIC_DRAW,E!==y.ARRAY_BUFFER&&E!==y.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(A!==y.DYNAMIC_DRAW&&A!==y.STATIC_DRAW&&A!==y.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=y.createBuffer(),_=new c(y,E,L,0,A);return _.update(k),_}i.exports=b},6405:function(i,a,o){"use strict";var s=o(2931);i.exports=function(l,f){var c=l.positions,h=l.vectors,d={positions:[],vertexIntensity:[],vertexIntensityBounds:l.vertexIntensityBounds,vectors:[],cells:[],coneOffset:l.coneOffset,colormap:l.colormap};if(l.positions.length===0)return f&&(f[0]=[0,0,0],f[1]=[0,0,0]),d;for(var p=0,x=1/0,b=-1/0,y=1/0,k=-1/0,E=1/0,A=-1/0,L=null,_=null,C=[],M=1/0,v=!1,z=l.coneSizemode==="raw",T=0;T<c.length;T++){var F=c[T];x=Math.min(F[0],x),b=Math.max(F[0],b),y=Math.min(F[1],y),k=Math.max(F[1],k),E=Math.min(F[2],E),A=Math.max(F[2],A);var q=h[T];if(s.length(q)>p&&(p=s.length(q)),T&&!z){var U=2*s.distance(L,F)/(s.length(_)+s.length(q));U?(M=Math.min(M,U),v=!1):v=!0}v||(L=F,_=q),C.push(q)}var H=[x,y,E],j=[b,k,A];f&&(f[0]=H,f[1]=j),p===0&&(p=1);var G=1/p;isFinite(M)||(M=1),d.vectorScale=M;var O=l.coneSize||(z?1:.5);l.absoluteConeSize&&(O=l.absoluteConeSize*G),d.coneScale=O;for(var T=0,W=0;T<c.length;T++)for(var F=c[T],re=F[0],ne=F[1],be=F[2],ze=C[T],Ce=s.length(ze)*G,he=0,te=8;he<te;he++){d.positions.push([re,ne,be,W++]),d.positions.push([re,ne,be,W++]),d.positions.push([re,ne,be,W++]),d.positions.push([re,ne,be,W++]),d.positions.push([re,ne,be,W++]),d.positions.push([re,ne,be,W++]),d.vectors.push(ze),d.vectors.push(ze),d.vectors.push(ze),d.vectors.push(ze),d.vectors.push(ze),d.vectors.push(ze),d.vertexIntensity.push(Ce,Ce,Ce),d.vertexIntensity.push(Ce,Ce,Ce);var ke=d.positions.length;d.cells.push([ke-6,ke-5,ke-4],[ke-3,ke-2,ke-1])}return d};var u=o(614);i.exports.createMesh=o(9060),i.exports.createConeMesh=function(l,f){return i.exports.createMesh(l,f,{shaders:u,traceType:"cone"})}},9060:function(i,a,o){"use strict";var s=o(9405),u=o(2762),l=o(8116),f=o(7766),c=o(6760),h=o(7608),d=o(9618),p=o(6729),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function b(C,M,v,z,T,F,q,U,H,j,G){this.gl=C,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=M,this.dirty=!0,this.triShader=v,this.pickShader=z,this.trianglePositions=T,this.triangleVectors=F,this.triangleColors=U,this.triangleUVs=H,this.triangleIds=q,this.triangleVAO=j,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=G,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=x,this._view=x,this._projection=x,this._resolution=[1,1]}var y=b.prototype;y.isOpaque=function(){return this.opacity>=1},y.isTransparent=function(){return this.opacity<1},y.pickSlots=1,y.setPickBase=function(C){this.pickId=C};function k(C){for(var M=p({colormap:C,nshades:256,format:"rgba"}),v=new Uint8Array(256*4),z=0;z<256;++z){for(var T=M[z],F=0;F<3;++F)v[4*z+F]=T[F];v[4*z+3]=T[3]*255}return d(v,[256,256,4],[4,0,1])}function E(C){for(var M=C.length,v=new Array(M),z=0;z<M;++z)v[z]=C[z][2];return v}y.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 v=C.cells,z=C.positions,T=C.vectors;if(!(!z||!v||!T)){var F=[],q=[],U=[],H=[],j=[];this.cells=v,this.positions=z,this.vectors=T;var G=C.meshColor||[1,1,1,1],O=C.vertexIntensity,W=1/0,re=-1/0;if(O)if(C.vertexIntensityBounds)W=+C.vertexIntensityBounds[0],re=+C.vertexIntensityBounds[1];else for(var ne=0;ne<O.length;++ne){var be=O[ne];W=Math.min(W,be),re=Math.max(re,be)}else for(var ne=0;ne<z.length;++ne){var be=z[ne][2];W=Math.min(W,be),re=Math.max(re,be)}O?this.intensity=O:this.intensity=E(z),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var ne=0;ne<z.length;++ne)for(var ze=z[ne],Ce=0;Ce<3;++Ce)isNaN(ze[Ce])||!isFinite(ze[Ce])||(this.bounds[0][Ce]=Math.min(this.bounds[0][Ce],ze[Ce]),this.bounds[1][Ce]=Math.max(this.bounds[1][Ce],ze[Ce]));var he=0;e:for(var ne=0;ne<v.length;++ne){var te=v[ne];switch(te.length){case 3:for(var Ce=0;Ce<3;++Ce)for(var ke=te[Ce],ze=z[ke],Ee=0;Ee<3;++Ee)if(isNaN(ze[Ee])||!isFinite(ze[Ee]))continue e;for(var Ce=0;Ce<3;++Ce){var ke=te[2-Ce],ze=z[ke];F.push(ze[0],ze[1],ze[2],ze[3]);var Me=T[ke];q.push(Me[0],Me[1],Me[2],Me[3]||0);var Oe=G;Oe.length===3?U.push(Oe[0],Oe[1],Oe[2],1):U.push(Oe[0],Oe[1],Oe[2],Oe[3]);var Re;O?Re=[(O[ke]-W)/(re-W),0]:Re=[(ze[2]-W)/(re-W),0],H.push(Re[0],Re[1]),j.push(ne)}he+=1;break;default:break}}this.triangleCount=he,this.trianglePositions.update(F),this.triangleVectors.update(q),this.triangleColors.update(U),this.triangleUVs.update(H),this.triangleIds.update(new Uint32Array(j))}},y.drawTransparent=y.draw=function(C){C=C||{};for(var M=this.gl,v=C.model||x,z=C.view||x,T=C.projection||x,F=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)F[0][q]=Math.max(F[0][q],this.clipBounds[0][q]),F[1][q]=Math.min(F[1][q],this.clipBounds[1][q]);var U={model:v,view:z,projection:T,inverseModel:x.slice(),clipBounds:F,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 H=new Array(16);c(H,U.view,U.model),c(H,U.projection,H),h(H,H);for(var q=0;q<3;++q)U.eyePosition[q]=H[12+q]/H[15];for(var j=H[15],q=0;q<3;++q)j+=this.lightPosition[q]*H[4*q+3];for(var q=0;q<3;++q){for(var G=H[12+q],O=0;O<3;++O)G+=H[4*O+q]*this.lightPosition[O];U.lightPosition[q]=G/j}if(this.triangleCount>0){var W=this.triShader;W.bind(),W.uniforms=U,this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},y.drawPick=function(C){C=C||{};for(var M=this.gl,v=C.model||x,z=C.view||x,T=C.projection||x,F=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)F[0][q]=Math.max(F[0][q],this.clipBounds[0][q]),F[1][q]=Math.min(F[1][q],this.clipBounds[1][q]);this._model=[].slice.call(v),this._view=[].slice.call(z),this._projection=[].slice.call(T),this._resolution=[M.drawingBufferWidth,M.drawingBufferHeight];var U={model:v,view:z,projection:T,clipBounds:F,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},H=this.pickShader;H.bind(),H.uniforms=U,this.triangleCount>0&&(this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},y.pick=function(C){if(!C||C.id!==this.pickId)return null;var M=C.value[0]+256*C.value[1]+65536*C.value[2],v=this.cells[M],z=this.positions[v[1]].slice(0,3),T={position:z,dataCoordinate:z,index:Math.floor(v[1]/48)};return this.traceType==="cone"?T.index=Math.floor(v[1]/48):this.traceType==="streamtube"&&(T.intensity=this.intensity[v[1]],T.velocity=this.vectors[v[1]].slice(0,3),T.divergence=this.vectors[v[1]][3],T.index=M),T},y.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 A(C,M){var v=s(C,M.meshShader.vertex,M.meshShader.fragment,null,M.meshShader.attributes);return v.attributes.position.location=0,v.attributes.color.location=2,v.attributes.uv.location=3,v.attributes.vector.location=4,v}function L(C,M){var v=s(C,M.pickShader.vertex,M.pickShader.fragment,null,M.pickShader.attributes);return v.attributes.position.location=0,v.attributes.id.location=1,v.attributes.vector.location=4,v}function _(C,M,v){var z=v.shaders;arguments.length===1&&(M=C,C=M.gl);var T=A(C,z),F=L(C,z),q=f(C,d(new Uint8Array([255,255,255,255]),[1,1,4]));q.generateMipmap(),q.minFilter=C.LINEAR_MIPMAP_LINEAR,q.magFilter=C.LINEAR;var U=u(C),H=u(C),j=u(C),G=u(C),O=u(C),W=l(C,[{buffer:U,type:C.FLOAT,size:4},{buffer:O,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:j,type:C.FLOAT,size:4},{buffer:G,type:C.FLOAT,size:2},{buffer:H,type:C.FLOAT,size:4}]),re=new b(C,q,T,F,U,H,O,j,G,W,v.traceType||"cone");return re.update(M),re}i.exports=_},614:function(i,a,o){var s=o(3236),u=s([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // 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).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the cone vertex and normal at the given index.
//
// The returned vertex is for a cone with its top at origin and height of 1.0,
// pointing in the direction of the vector attribute.
//
// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
// These vertices are used to make up the triangles of the cone by the following:
//   segment + 0 top vertex
//   segment + 1 perimeter vertex a+1
//   segment + 2 perimeter vertex a
//   segment + 3 center base vertex
//   segment + 4 perimeter vertex a
//   segment + 5 perimeter vertex a+1
// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
// To go from index to segment, floor(index / 6)
// To go from segment to angle, 2*pi * (segment/segmentCount)
// To go from index to segment index, index - (segment*6)
//
vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {

  const float segmentCount = 8.0;

  float index = rawIndex - floor(rawIndex /
    (segmentCount * 6.0)) *
    (segmentCount * 6.0);

  float segment = floor(0.001 + index/6.0);
  float segmentIndex = index - (segment*6.0);

  normal = -normalize(d);

  if (segmentIndex > 2.99 && segmentIndex < 3.01) {
    return mix(vec3(0.0), -d, coneOffset);
  }

  float nextAngle = (
    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||
    (segmentIndex > 4.99 &&  segmentIndex < 5.01)
  ) ? 1.0 : 0.0;
  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);

  vec3 v1 = mix(d, vec3(0.0), coneOffset);
  vec3 v2 = v1 - d;

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d)*0.25;
  vec3 y = v * sin(angle) * length(d)*0.25;
  vec3 v3 = v2 + x + y;
  if (segmentIndex < 3.0) {
    vec3 tx = u * sin(angle);
    vec3 ty = v * -cos(angle);
    vec3 tangent = tx + ty;
    normal = normalize(cross(v3 - v1, tangent));
  }

  if (segmentIndex == 0.0) {
    return mix(d, vec3(0.0), coneOffset);
  }
  return v3;
}

attribute vec3 vector;
attribute vec4 color, position;
attribute vec2 uv;

uniform float vectorScale, coneScale, coneOffset;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 eyePosition, lightPosition;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  // Scale the vector magnitude to stay constant with
  // model & view changes.
  vec3 normal;
  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);
  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * conePosition;
  cameraCoordinate.xyz /= cameraCoordinate.w;
  f_lightDirection = lightPosition - cameraCoordinate.xyz;
  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);

  // vec4 m_position  = model * vec4(conePosition, 1.0);
  vec4 t_position  = view * conePosition;
  gl_Position      = projection * t_position;

  f_color          = color;
  f_data           = conePosition.xyz;
  f_position       = position.xyz;
  f_uv             = uv;
}
`]),l=s([`#extension GL_OES_standard_derivatives : enable

precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float cookTorranceSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness,
  float fresnel) {

  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);

  //Half angle vector
  vec3 H = normalize(lightDirection + viewDirection);

  //Geometric term
  float NdotH = max(dot(surfaceNormal, H), 0.0);
  float VdotH = max(dot(viewDirection, H), 0.000001);
  float LdotH = max(dot(lightDirection, H), 0.000001);
  float G1 = (2.0 * NdotH * VdotN) / VdotH;
  float G2 = (2.0 * NdotH * LdotN) / LdotH;
  float G = min(1.0, min(G1, G2));
  
  //Distribution term
  float D = beckmannDistribution(NdotH, roughness);

  //Fresnel term
  float F = pow(1.0 - VdotN, fresnel);

  //Multiply terms and done
  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform sampler2D texture;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
  vec3 N = normalize(f_normal);
  vec3 L = normalize(f_lightDirection);
  vec3 V = normalize(f_eyeDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  vec4 surfaceColor = f_color * texture2D(texture, f_uv);
  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = litColor * opacity;
}
`]),f=s([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // 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).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the cone vertex and normal at the given index.
//
// The returned vertex is for a cone with its top at origin and height of 1.0,
// pointing in the direction of the vector attribute.
//
// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
// These vertices are used to make up the triangles of the cone by the following:
//   segment + 0 top vertex
//   segment + 1 perimeter vertex a+1
//   segment + 2 perimeter vertex a
//   segment + 3 center base vertex
//   segment + 4 perimeter vertex a
//   segment + 5 perimeter vertex a+1
// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
// To go from index to segment, floor(index / 6)
// To go from segment to angle, 2*pi * (segment/segmentCount)
// To go from index to segment index, index - (segment*6)
//
vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {

  const float segmentCount = 8.0;

  float index = rawIndex - floor(rawIndex /
    (segmentCount * 6.0)) *
    (segmentCount * 6.0);

  float segment = floor(0.001 + index/6.0);
  float segmentIndex = index - (segment*6.0);

  normal = -normalize(d);

  if (segmentIndex > 2.99 && segmentIndex < 3.01) {
    return mix(vec3(0.0), -d, coneOffset);
  }

  float nextAngle = (
    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||
    (segmentIndex > 4.99 &&  segmentIndex < 5.01)
  ) ? 1.0 : 0.0;
  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);

  vec3 v1 = mix(d, vec3(0.0), coneOffset);
  vec3 v2 = v1 - d;

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d)*0.25;
  vec3 y = v * sin(angle) * length(d)*0.25;
  vec3 v3 = v2 + x + y;
  if (segmentIndex < 3.0) {
    vec3 tx = u * sin(angle);
    vec3 ty = v * -cos(angle);
    vec3 tangent = tx + ty;
    normal = normalize(cross(v3 - v1, tangent));
  }

  if (segmentIndex == 0.0) {
    return mix(d, vec3(0.0), coneOffset);
  }
  return v3;
}

attribute vec4 vector;
attribute vec4 position;
attribute vec4 id;

uniform mat4 model, view, projection;
uniform float vectorScale, coneScale, coneOffset;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  vec3 normal;
  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);
  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
  gl_Position = projection * (view * conePosition);
  f_id        = id;
  f_position  = position.xyz;
}
`]),c=s([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3  clipBounds[2];
uniform float pickId;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;

  gl_FragColor = vec4(pickId, f_id.xyz);
}`]);a.meshShader={vertex:u,fragment:l,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},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"}},5171:function(i,a,o){var s=o(737);i.exports=function(l){return s[l]}},9165:function(i,a,o){"use strict";i.exports=b;var s=o(2762),u=o(8116),l=o(3436),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(y,k,E,A){this.gl=y,this.shader=A,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=c.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(y){var k=this.gl,E=this.shader.uniforms;this.shader.bind();var A=E.view=y.view||f,L=E.projection=y.projection||f;E.model=y.model||f,E.clipBounds=this.clipBounds,E.opacity=this.opacity;var _=A[12],C=A[13],M=A[14],v=A[15],z=y._ortho||!1,T=z?2:1,F=T*this.pixelRatio*(L[3]*_+L[7]*C+L[11]*M+L[15]*v)/k.drawingBufferHeight;this.vao.bind();for(var q=0;q<3;++q)k.lineWidth(this.lineWidth[q]*this.pixelRatio),E.capSize=this.capSize[q]*F,this.lineCount[q]&&k.drawArrays(k.LINES,this.lineOffset[q],this.lineCount[q]);this.vao.unbind()};function d(y,k){for(var E=0;E<3;++E)y[0][E]=Math.min(y[0][E],k[E]),y[1][E]=Math.max(y[1][E],k[E])}var p=function(){for(var y=new Array(3),k=0;k<3;++k){for(var E=[],A=1;A<=2;++A)for(var L=-1;L<=1;L+=2){var _=(A+k)%3,C=[0,0,0];C[_]=L,E.push(C)}y[k]=E}return y}();function x(y,k,E,A){for(var L=p[A],_=0;_<L.length;++_){var C=L[_];y.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(y){y=y||{},"lineWidth"in y&&(this.lineWidth=y.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in y&&(this.capSize=y.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in y&&(this.opacity=+y.opacity,this.opacity<1&&(this.hasAlpha=!0));var k=y.color||[[0,0,0],[0,0,0],[0,0,0]],E=y.position,A=y.error;if(Array.isArray(k[0])||(k=[k,k,k]),E&&A){var L=[],_=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 v=0;v<_;++v){for(var z=E[v],T=0;T<3;++T)if(isNaN(z[T])||!isFinite(z[T]))continue e;var F=A[v],q=k[M];if(Array.isArray(q[0])&&(q=k[v]),q.length===3?q=[q[0],q[1],q[2],1]:q.length===4&&(q=[q[0],q[1],q[2],q[3]],!this.hasAlpha&&q[3]<1&&(this.hasAlpha=!0)),!(isNaN(F[0][M])||isNaN(F[1][M]))){if(F[0][M]<0){var U=z.slice();U[M]+=F[0][M],L.push(z[0],z[1],z[2],q[0],q[1],q[2],q[3],0,0,0,U[0],U[1],U[2],q[0],q[1],q[2],q[3],0,0,0),d(this.bounds,U),C+=2+x(L,U,q,M)}if(F[1][M]>0){var U=z.slice();U[M]+=F[1][M],L.push(z[0],z[1],z[2],q[0],q[1],q[2],q[3],0,0,0,U[0],U[1],U[2],q[0],q[1],q[2],q[3],0,0,0),d(this.bounds,U),C+=2+x(L,U,q,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(y){var k=y.gl,E=s(k),A=u(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=l(k);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var _=new c(k,E,A,L);return _.update(y),_}},3436:function(i,a,o){"use strict";var s=o(3236),u=o(9405),l=s([`precision highp float;
#define GLSLIFY 1

attribute vec3 position, offset;
attribute vec4 color;
uniform mat4 model, view, projection;
uniform float capSize;
varying vec4 fragColor;
varying vec3 fragPosition;

void main() {
  vec4 worldPosition  = model * vec4(position, 1.0);
  worldPosition       = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);
  gl_Position         = projection * (view * worldPosition);
  fragColor           = color;
  fragPosition        = position;
}`]),f=s([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float opacity;
varying vec3 fragPosition;
varying vec4 fragColor;

void main() {
  if (
    outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||
    fragColor.a * opacity == 0.
  ) discard;

  gl_FragColor = opacity * fragColor;
}`]);i.exports=function(c){return u(c,l,f,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(i,a,o){"use strict";var s=o(7766);i.exports=C;var u=null,l,f,c,h;function d(M){var v=M.getParameter(M.FRAMEBUFFER_BINDING),z=M.getParameter(M.RENDERBUFFER_BINDING),T=M.getParameter(M.TEXTURE_BINDING_2D);return[v,z,T]}function p(M,v){M.bindFramebuffer(M.FRAMEBUFFER,v[0]),M.bindRenderbuffer(M.RENDERBUFFER,v[1]),M.bindTexture(M.TEXTURE_2D,v[2])}function x(M,v){var z=M.getParameter(v.MAX_COLOR_ATTACHMENTS_WEBGL);u=new Array(z+1);for(var T=0;T<=z;++T){for(var F=new Array(z),q=0;q<T;++q)F[q]=M.COLOR_ATTACHMENT0+q;for(var q=T;q<z;++q)F[q]=M.NONE;u[T]=F}}function b(M){switch(M){case l:throw new Error("gl-fbo: Framebuffer unsupported");case f:throw new Error("gl-fbo: Framebuffer incomplete attachment");case c: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 y(M,v,z,T,F,q){if(!T)return null;var U=s(M,v,z,F,T);return U.magFilter=M.NEAREST,U.minFilter=M.NEAREST,U.mipSamples=1,U.bind(),M.framebufferTexture2D(M.FRAMEBUFFER,q,M.TEXTURE_2D,U.handle,0),U}function k(M,v,z,T,F){var q=M.createRenderbuffer();return M.bindRenderbuffer(M.RENDERBUFFER,q),M.renderbufferStorage(M.RENDERBUFFER,T,v,z),M.framebufferRenderbuffer(M.FRAMEBUFFER,F,M.RENDERBUFFER,q),q}function E(M){var v=d(M.gl),z=M.gl,T=M.handle=z.createFramebuffer(),F=M._shape[0],q=M._shape[1],U=M.color.length,H=M._ext,j=M._useStencil,G=M._useDepth,O=M._colorType;z.bindFramebuffer(z.FRAMEBUFFER,T);for(var W=0;W<U;++W)M.color[W]=y(z,F,q,O,z.RGBA,z.COLOR_ATTACHMENT0+W);U===0?(M._color_rb=k(z,F,q,z.RGBA4,z.COLOR_ATTACHMENT0),H&&H.drawBuffersWEBGL(u[0])):U>1&&H.drawBuffersWEBGL(u[U]);var re=z.getExtension("WEBGL_depth_texture");re?j?M.depth=y(z,F,q,re.UNSIGNED_INT_24_8_WEBGL,z.DEPTH_STENCIL,z.DEPTH_STENCIL_ATTACHMENT):G&&(M.depth=y(z,F,q,z.UNSIGNED_SHORT,z.DEPTH_COMPONENT,z.DEPTH_ATTACHMENT)):G&&j?M._depth_rb=k(z,F,q,z.DEPTH_STENCIL,z.DEPTH_STENCIL_ATTACHMENT):G?M._depth_rb=k(z,F,q,z.DEPTH_COMPONENT16,z.DEPTH_ATTACHMENT):j&&(M._depth_rb=k(z,F,q,z.STENCIL_INDEX,z.STENCIL_ATTACHMENT));var ne=z.checkFramebufferStatus(z.FRAMEBUFFER);if(ne!==z.FRAMEBUFFER_COMPLETE){M._destroyed=!0,z.bindFramebuffer(z.FRAMEBUFFER,null),z.deleteFramebuffer(M.handle),M.handle=null,M.depth&&(M.depth.dispose(),M.depth=null),M._depth_rb&&(z.deleteRenderbuffer(M._depth_rb),M._depth_rb=null);for(var W=0;W<M.color.length;++W)M.color[W].dispose(),M.color[W]=null;M._color_rb&&(z.deleteRenderbuffer(M._color_rb),M._color_rb=null),p(z,v),b(ne)}p(z,v)}function A(M,v,z,T,F,q,U,H){this.gl=M,this._shape=[v|0,z|0],this._destroyed=!1,this._ext=H,this.color=new Array(F);for(var j=0;j<F;++j)this.color[j]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=T,this._useDepth=q,this._useStencil=U;var G=this,O=[v|0,z|0];Object.defineProperties(O,{0:{get:function(){return G._shape[0]},set:function(W){return G.width=W}},1:{get:function(){return G._shape[1]},set:function(W){return G.height=W}}}),this._shapeVector=O,E(this)}var L=A.prototype;function _(M,v,z){if(M._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(M._shape[0]===v&&M._shape[1]===z)){var T=M.gl,F=T.getParameter(T.MAX_RENDERBUFFER_SIZE);if(v<0||v>F||z<0||z>F)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");M._shape[0]=v,M._shape[1]=z;for(var q=d(T),U=0;U<M.color.length;++U)M.color[U].shape=M._shape;M._color_rb&&(T.bindRenderbuffer(T.RENDERBUFFER,M._color_rb),T.renderbufferStorage(T.RENDERBUFFER,T.RGBA4,M._shape[0],M._shape[1])),M.depth&&(M.depth.shape=M._shape),M._depth_rb&&(T.bindRenderbuffer(T.RENDERBUFFER,M._depth_rb),M._useDepth&&M._useStencil?T.renderbufferStorage(T.RENDERBUFFER,T.DEPTH_STENCIL,M._shape[0],M._shape[1]):M._useDepth?T.renderbufferStorage(T.RENDERBUFFER,T.DEPTH_COMPONENT16,M._shape[0],M._shape[1]):M._useStencil&&T.renderbufferStorage(T.RENDERBUFFER,T.STENCIL_INDEX,M._shape[0],M._shape[1])),T.bindFramebuffer(T.FRAMEBUFFER,M.handle);var H=T.checkFramebufferStatus(T.FRAMEBUFFER);H!==T.FRAMEBUFFER_COMPLETE&&(M.dispose(),p(T,q),b(H)),p(T,q)}}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 v=M[0]|0,z=M[1]|0;return _(this,v,z),[v,z]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(M){return M=M|0,_(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,_(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 v=0;v<this.color.length;++v)this.color[v].dispose(),this.color[v]=null;this._color_rb&&(M.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function C(M,v,z,T){l||(l=M.FRAMEBUFFER_UNSUPPORTED,f=M.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,c=M.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,h=M.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var F=M.getExtension("WEBGL_draw_buffers");if(!u&&F&&x(M,F),Array.isArray(v)&&(T=z,z=v[1]|0,v=v[0]|0),typeof v!="number")throw new Error("gl-fbo: Missing shape parameter");var q=M.getParameter(M.MAX_RENDERBUFFER_SIZE);if(v<0||v>q||z<0||z>q)throw new Error("gl-fbo: Parameters are too large for FBO");T=T||{};var U=1;if("color"in T){if(U=Math.max(T.color|0,0),U<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(U>1)if(F){if(U>M.getParameter(F.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 H=M.UNSIGNED_BYTE,j=M.getExtension("OES_texture_float");if(T.float&&U>0){if(!j)throw new Error("gl-fbo: Context does not support floating point textures");H=M.FLOAT}else T.preferFloat&&U>0&&j&&(H=M.FLOAT);var G=!0;"depth"in T&&(G=!!T.depth);var O=!1;return"stencil"in T&&(O=!!T.stencil),new A(M,v,z,H,U,G,O,F)}},2992:function(i,a,o){var s=o(3387).sprintf,u=o(5171),l=o(1848),f=o(1085);i.exports=c;function c(h,d,p){"use strict";var x=l(d)||"of unknown name (see npm glsl-shader-name)",b="unknown type";p!==void 0&&(b=p===u.FRAGMENT_SHADER?"fragment":"vertex");for(var y=s(`Error compiling %s shader %s:
`,b,x),k=s("%s%s",y,h),E=h.split(`
`),A={},L=0;L<E.length;L++){var _=E[L];if(!(_===""||_==="\0")){var C=parseInt(_.split(":")[2]);if(isNaN(C))throw new Error(s("Could not parse error: %s",_));A[C]=_}}for(var M=f(d).split(`
`),L=0;L<M.length;L++)if(!(!A[L+3]&&!A[L+2]&&!A[L+1])){var v=M[L];if(y+=v+`
`,A[L+1]){var z=A[L+1];z=z.substr(z.split(":",3).join(":").length+1).trim(),y+=s(`^^^ %s

`,z)}}return{long:y.trim(),short:k.trim()}}},7319:function(i,a,o){var s=o(3236),u=o(9405),l=s([`precision highp float;
#define GLSLIFY 1

attribute vec3 position, nextPosition;
attribute float arcLength, lineWidth;
attribute vec4 color;

uniform vec2 screenShape;
uniform float pixelRatio;
uniform mat4 model, view, projection;

varying vec4 fragColor;
varying vec3 worldPosition;
varying float pixelArcLength;

vec4 project(vec3 p) {
  return projection * (view * (model * vec4(p, 1.0)));
}

void main() {
  vec4 startPoint = project(position);
  vec4 endPoint   = project(nextPosition);

  vec2 A = startPoint.xy / startPoint.w;
  vec2 B =   endPoint.xy /   endPoint.w;

  float clipAngle = atan(
    (B.y - A.y) * screenShape.y,
    (B.x - A.x) * screenShape.x
  );

  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(
    sin(clipAngle),
    -cos(clipAngle)
  ) / screenShape;

  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);

  worldPosition = position;
  pixelArcLength = arcLength;
  fragColor = color;
}
`]),f=s([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3      clipBounds[2];
uniform sampler2D dashTexture;
uniform float     dashScale;
uniform float     opacity;

varying vec3    worldPosition;
varying float   pixelArcLength;
varying vec4    fragColor;

void main() {
  if (
    outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||
    fragColor.a * opacity == 0.
  ) discard;

  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;
  if(dashWeight < 0.5) {
    discard;
  }
  gl_FragColor = fragColor * opacity;
}
`]),c=s([`precision highp float;
#define GLSLIFY 1

#define FLOAT_MAX  1.70141184e38
#define FLOAT_MIN  1.17549435e-38

// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl
vec4 packFloat(float v) {
  float av = abs(v);

  //Handle special cases
  if(av < FLOAT_MIN) {
    return vec4(0.0, 0.0, 0.0, 0.0);
  } else if(v > FLOAT_MAX) {
    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;
  } else if(v < -FLOAT_MAX) {
    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;
  }

  vec4 c = vec4(0,0,0,0);

  //Compute exponent and mantissa
  float e = floor(log2(av));
  float m = av * pow(2.0, -e) - 1.0;

  //Unpack mantissa
  c[1] = floor(128.0 * m);
  m -= c[1] / 128.0;
  c[2] = floor(32768.0 * m);
  m -= c[2] / 32768.0;
  c[3] = floor(8388608.0 * m);

  //Unpack exponent
  float ebias = e + 127.0;
  c[0] = floor(ebias / 2.0);
  ebias -= c[0] * 2.0;
  c[1] += floor(ebias) * 128.0;

  //Unpack sign bit
  c[0] += 128.0 * step(0.0, -v);

  //Scale back to range
  return c / 255.0;
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform float pickId;
uniform vec3 clipBounds[2];

varying vec3 worldPosition;
varying float pixelArcLength;
varying vec4 fragColor;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;

  gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);
}`]),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 u(d,l,f,null,h)},a.createPickShader=function(d){return u(d,l,c,null,h)}},5714:function(i,a,o){"use strict";i.exports=M;var s=o(2762),u=o(8116),l=o(7766),f=new Uint8Array(4),c=new Float32Array(f.buffer);function h(v,z,T,F){return f[0]=F,f[1]=T,f[2]=z,f[3]=v,c[0]}var d=o(2478),p=o(9618),x=o(7319),b=x.createShader,y=x.createPickShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function E(v,z){for(var T=0,F=0;F<3;++F){var q=v[F]-z[F];T+=q*q}return Math.sqrt(T)}function A(v){for(var z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],T=0;T<3;++T)z[0][T]=Math.max(v[0][T],z[0][T]),z[1][T]=Math.min(v[1][T],z[1][T]);return z}function L(v,z,T,F){this.arcLength=v,this.position=z,this.index=T,this.dataCoordinate=F}function _(v,z,T,F,q,U){this.gl=v,this.shader=z,this.pickShader=T,this.buffer=F,this.vao=q,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=_.prototype;C.isTransparent=function(){return this.hasAlpha},C.isOpaque=function(){return!this.hasAlpha},C.pickSlots=1,C.setPickBase=function(v){this.pickId=v},C.drawTransparent=C.draw=function(v){if(this.vertexCount){var z=this.gl,T=this.shader,F=this.vao;T.bind(),T.uniforms={model:v.model||k,view:v.view||k,projection:v.projection||k,clipBounds:A(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[z.drawingBufferWidth,z.drawingBufferHeight],pixelRatio:this.pixelRatio},F.bind(),F.draw(z.TRIANGLE_STRIP,this.vertexCount),F.unbind()}},C.drawPick=function(v){if(this.vertexCount){var z=this.gl,T=this.pickShader,F=this.vao;T.bind(),T.uniforms={model:v.model||k,view:v.view||k,projection:v.projection||k,pickId:this.pickId,clipBounds:A(this.clipBounds),screenShape:[z.drawingBufferWidth,z.drawingBufferHeight],pixelRatio:this.pixelRatio},F.bind(),F.draw(z.TRIANGLE_STRIP,this.vertexCount),F.unbind()}},C.update=function(v){var z,T;this.dirty=!0;var F=!!v.connectGaps;"dashScale"in v&&(this.dashScale=v.dashScale),this.hasAlpha=!1,"opacity"in v&&(this.opacity=+v.opacity,this.opacity<1&&(this.hasAlpha=!0));var q=[],U=[],H=[],j=0,G=0,O=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],W=v.position||v.positions;if(W){var re=v.color||v.colors||[0,0,0,1],ne=v.lineWidth||1,be=!1;e:for(z=1;z<W.length;++z){var ze=W[z-1],Ce=W[z];for(U.push(j),H.push(ze.slice()),T=0;T<3;++T){if(isNaN(ze[T])||isNaN(Ce[T])||!isFinite(ze[T])||!isFinite(Ce[T])){if(!F&&q.length>0){for(var he=0;he<24;++he)q.push(q[q.length-12]);G+=2,be=!0}continue e}O[0][T]=Math.min(O[0][T],ze[T],Ce[T]),O[1][T]=Math.max(O[1][T],ze[T],Ce[T])}var te,ke;Array.isArray(re[0])?(te=re.length>z-1?re[z-1]:re.length>0?re[re.length-1]:[0,0,0,1],ke=re.length>z?re[z]:re.length>0?re[re.length-1]:[0,0,0,1]):te=ke=re,te.length===3&&(te=[te[0],te[1],te[2],1]),ke.length===3&&(ke=[ke[0],ke[1],ke[2],1]),!this.hasAlpha&&te[3]<1&&(this.hasAlpha=!0);var Ee;Array.isArray(ne)?Ee=ne.length>z-1?ne[z-1]:ne.length>0?ne[ne.length-1]:[0,0,0,1]:Ee=ne;var Me=j;if(j+=E(ze,Ce),be){for(T=0;T<2;++T)q.push(ze[0],ze[1],ze[2],Ce[0],Ce[1],Ce[2],Me,Ee,te[0],te[1],te[2],te[3]);G+=2,be=!1}q.push(ze[0],ze[1],ze[2],Ce[0],Ce[1],Ce[2],Me,Ee,te[0],te[1],te[2],te[3],ze[0],ze[1],ze[2],Ce[0],Ce[1],Ce[2],Me,-Ee,te[0],te[1],te[2],te[3],Ce[0],Ce[1],Ce[2],ze[0],ze[1],ze[2],j,-Ee,ke[0],ke[1],ke[2],ke[3],Ce[0],Ce[1],Ce[2],ze[0],ze[1],ze[2],j,Ee,ke[0],ke[1],ke[2],ke[3]),G+=4}}if(this.buffer.update(q),U.push(j),H.push(W[W.length-1].slice()),this.bounds=O,this.vertexCount=G,this.points=H,this.arcLength=U,"dashes"in v){var Oe=v.dashes,Re=Oe.slice();for(Re.unshift(0),z=1;z<Re.length;++z)Re[z]=Re[z-1]+Re[z];var me=p(new Array(256*4),[256,1,4]);for(z=0;z<256;++z){for(T=0;T<4;++T)me.set(z,0,T,0);d.le(Re,Re[Re.length-1]*z/255)&1?me.set(z,0,0,0):me.set(z,0,0,255)}this.texture.setPixels(me)}},C.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},C.pick=function(v){if(!v||v.id!==this.pickId)return null;var z=h(v.value[0],v.value[1],v.value[2],0),T=d.le(this.arcLength,z);if(T<0)return null;if(T===this.arcLength.length-1)return new L(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),T);for(var F=this.points[T],q=this.points[Math.min(T+1,this.points.length-1)],U=(z-this.arcLength[T])/(this.arcLength[T+1]-this.arcLength[T]),H=1-U,j=[0,0,0],G=0;G<3;++G)j[G]=H*F[G]+U*q[G];var O=Math.min(U<.5?T:T+1,this.points.length-1);return new L(z,j,O,this.points[O])};function M(v){var z=v.gl||v.scene&&v.scene.gl,T=b(z);T.attributes.position.location=0,T.attributes.nextPosition.location=1,T.attributes.arcLength.location=2,T.attributes.lineWidth.location=3,T.attributes.color.location=4;var F=y(z);F.attributes.position.location=0,F.attributes.nextPosition.location=1,F.attributes.arcLength.location=2,F.attributes.lineWidth.location=3,F.attributes.color.location=4;for(var q=s(z),U=u(z,[{buffer:q,size:3,offset:0,stride:48},{buffer:q,size:3,offset:12,stride:48},{buffer:q,size:1,offset:24,stride:48},{buffer:q,size:1,offset:28,stride:48},{buffer:q,size:4,offset:32,stride:48}]),H=p(new Array(256*4),[256,1,4]),j=0;j<1024;++j)H.data[j]=255;var G=l(z,H);G.wrap=z.REPEAT;var O=new _(z,T,F,q,U,G);return O.update(v),O}},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}},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}},9921:function(i){i.exports=a;function a(o){var s=o[0],u=o[1],l=o[2],f=o[3],c=o[4],h=o[5],d=o[6],p=o[7],x=o[8],b=o[9],y=o[10],k=o[11],E=o[12],A=o[13],L=o[14],_=o[15],C=s*h-u*c,M=s*d-l*c,v=s*p-f*c,z=u*d-l*h,T=u*p-f*h,F=l*p-f*d,q=x*A-b*E,U=x*L-y*E,H=x*_-k*E,j=b*L-y*A,G=b*_-k*A,O=y*_-k*L;return C*O-M*G+v*j+z*H-T*U+F*q}},7399:function(i){i.exports=a;function a(o,s){var u=s[0],l=s[1],f=s[2],c=s[3],h=u+u,d=l+l,p=f+f,x=u*h,b=l*h,y=l*d,k=f*h,E=f*d,A=f*p,L=c*h,_=c*d,C=c*p;return o[0]=1-y-A,o[1]=b+C,o[2]=k-_,o[3]=0,o[4]=b-C,o[5]=1-x-A,o[6]=E+L,o[7]=0,o[8]=k+_,o[9]=E-L,o[10]=1-x-y,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},6743:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=s[3],d=l+l,p=f+f,x=c+c,b=l*d,y=l*p,k=l*x,E=f*p,A=f*x,L=c*x,_=h*d,C=h*p,M=h*x;return o[0]=1-(E+L),o[1]=y+M,o[2]=k-C,o[3]=0,o[4]=y-M,o[5]=1-(b+L),o[6]=A+_,o[7]=0,o[8]=k+C,o[9]=A-_,o[10]=1-(b+E),o[11]=0,o[12]=u[0],o[13]=u[1],o[14]=u[2],o[15]=1,o}},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}},7608:function(i){i.exports=a;function a(o,s){var u=s[0],l=s[1],f=s[2],c=s[3],h=s[4],d=s[5],p=s[6],x=s[7],b=s[8],y=s[9],k=s[10],E=s[11],A=s[12],L=s[13],_=s[14],C=s[15],M=u*d-l*h,v=u*p-f*h,z=u*x-c*h,T=l*p-f*d,F=l*x-c*d,q=f*x-c*p,U=b*L-y*A,H=b*_-k*A,j=b*C-E*A,G=y*_-k*L,O=y*C-E*L,W=k*C-E*_,re=M*W-v*O+z*G+T*j-F*H+q*U;return re?(re=1/re,o[0]=(d*W-p*O+x*G)*re,o[1]=(f*O-l*W-c*G)*re,o[2]=(L*q-_*F+C*T)*re,o[3]=(k*F-y*q-E*T)*re,o[4]=(p*j-h*W-x*H)*re,o[5]=(u*W-f*j+c*H)*re,o[6]=(_*z-A*q-C*v)*re,o[7]=(b*q-k*z+E*v)*re,o[8]=(h*O-d*j+x*U)*re,o[9]=(l*j-u*O-c*U)*re,o[10]=(A*F-L*z+C*M)*re,o[11]=(y*z-b*F-E*M)*re,o[12]=(d*H-h*G-p*U)*re,o[13]=(u*G-l*H+f*U)*re,o[14]=(L*v-A*T-_*M)*re,o[15]=(b*T-y*v+k*M)*re,o):null}},6582:function(i,a,o){var s=o(7894);i.exports=u;function u(l,f,c,h){var d,p,x,b,y,k,E,A,L,_,C=f[0],M=f[1],v=f[2],z=h[0],T=h[1],F=h[2],q=c[0],U=c[1],H=c[2];return Math.abs(C-q)<1e-6&&Math.abs(M-U)<1e-6&&Math.abs(v-H)<1e-6?s(l):(E=C-q,A=M-U,L=v-H,_=1/Math.sqrt(E*E+A*A+L*L),E*=_,A*=_,L*=_,d=T*L-F*A,p=F*E-z*L,x=z*A-T*E,_=Math.sqrt(d*d+p*p+x*x),_?(_=1/_,d*=_,p*=_,x*=_):(d=0,p=0,x=0),b=A*x-L*p,y=L*d-E*x,k=E*p-A*d,_=Math.sqrt(b*b+y*y+k*k),_?(_=1/_,b*=_,y*=_,k*=_):(b=0,y=0,k=0),l[0]=d,l[1]=b,l[2]=E,l[3]=0,l[4]=p,l[5]=y,l[6]=A,l[7]=0,l[8]=x,l[9]=k,l[10]=L,l[11]=0,l[12]=-(d*C+p*M+x*v),l[13]=-(b*C+y*M+k*v),l[14]=-(E*C+A*M+L*v),l[15]=1,l)}},6760:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=s[3],d=s[4],p=s[5],x=s[6],b=s[7],y=s[8],k=s[9],E=s[10],A=s[11],L=s[12],_=s[13],C=s[14],M=s[15],v=u[0],z=u[1],T=u[2],F=u[3];return o[0]=v*l+z*d+T*y+F*L,o[1]=v*f+z*p+T*k+F*_,o[2]=v*c+z*x+T*E+F*C,o[3]=v*h+z*b+T*A+F*M,v=u[4],z=u[5],T=u[6],F=u[7],o[4]=v*l+z*d+T*y+F*L,o[5]=v*f+z*p+T*k+F*_,o[6]=v*c+z*x+T*E+F*C,o[7]=v*h+z*b+T*A+F*M,v=u[8],z=u[9],T=u[10],F=u[11],o[8]=v*l+z*d+T*y+F*L,o[9]=v*f+z*p+T*k+F*_,o[10]=v*c+z*x+T*E+F*C,o[11]=v*h+z*b+T*A+F*M,v=u[12],z=u[13],T=u[14],F=u[15],o[12]=v*l+z*d+T*y+F*L,o[13]=v*f+z*p+T*k+F*_,o[14]=v*c+z*x+T*E+F*C,o[15]=v*h+z*b+T*A+F*M,o}},4040:function(i){i.exports=a;function a(o,s,u,l,f,c,h){var d=1/(s-u),p=1/(l-f),x=1/(c-h);return o[0]=-2*d,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*p,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*x,o[11]=0,o[12]=(s+u)*d,o[13]=(f+l)*p,o[14]=(h+c)*x,o[15]=1,o}},4772:function(i){i.exports=a;function a(o,s,u,l,f){var c=1/Math.tan(s/2),h=1/(l-f);return o[0]=c/u,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=c,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=(f+l)*h,o[11]=-1,o[12]=0,o[13]=0,o[14]=2*f*l*h,o[15]=0,o}},6079:function(i){i.exports=a;function a(o,s,u,l){var f=l[0],c=l[1],h=l[2],d=Math.sqrt(f*f+c*c+h*h),p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne;return Math.abs(d)<1e-6?null:(d=1/d,f*=d,c*=d,h*=d,p=Math.sin(u),x=Math.cos(u),b=1-x,y=s[0],k=s[1],E=s[2],A=s[3],L=s[4],_=s[5],C=s[6],M=s[7],v=s[8],z=s[9],T=s[10],F=s[11],q=f*f*b+x,U=c*f*b+h*p,H=h*f*b-c*p,j=f*c*b-h*p,G=c*c*b+x,O=h*c*b+f*p,W=f*h*b+c*p,re=c*h*b-f*p,ne=h*h*b+x,o[0]=y*q+L*U+v*H,o[1]=k*q+_*U+z*H,o[2]=E*q+C*U+T*H,o[3]=A*q+M*U+F*H,o[4]=y*j+L*G+v*O,o[5]=k*j+_*G+z*O,o[6]=E*j+C*G+T*O,o[7]=A*j+M*G+F*O,o[8]=y*W+L*re+v*ne,o[9]=k*W+_*re+z*ne,o[10]=E*W+C*re+T*ne,o[11]=A*W+M*re+F*ne,s!==o&&(o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o)}},5567:function(i){i.exports=a;function a(o,s,u){var l=Math.sin(u),f=Math.cos(u),c=s[4],h=s[5],d=s[6],p=s[7],x=s[8],b=s[9],y=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]=c*f+x*l,o[5]=h*f+b*l,o[6]=d*f+y*l,o[7]=p*f+k*l,o[8]=x*f-c*l,o[9]=b*f-h*l,o[10]=y*f-d*l,o[11]=k*f-p*l,o}},2408:function(i){i.exports=a;function a(o,s,u){var l=Math.sin(u),f=Math.cos(u),c=s[0],h=s[1],d=s[2],p=s[3],x=s[8],b=s[9],y=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]=c*f-x*l,o[1]=h*f-b*l,o[2]=d*f-y*l,o[3]=p*f-k*l,o[8]=c*l+x*f,o[9]=h*l+b*f,o[10]=d*l+y*f,o[11]=p*l+k*f,o}},7089:function(i){i.exports=a;function a(o,s,u){var l=Math.sin(u),f=Math.cos(u),c=s[0],h=s[1],d=s[2],p=s[3],x=s[4],b=s[5],y=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]=c*f+x*l,o[1]=h*f+b*l,o[2]=d*f+y*l,o[3]=p*f+k*l,o[4]=x*f-c*l,o[5]=b*f-h*l,o[6]=y*f-d*l,o[7]=k*f-p*l,o}},2504:function(i){i.exports=a;function a(o,s,u){var l=u[0],f=u[1],c=u[2];return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o[4]=s[4]*f,o[5]=s[5]*f,o[6]=s[6]*f,o[7]=s[7]*f,o[8]=s[8]*c,o[9]=s[9]*c,o[10]=s[10]*c,o[11]=s[11]*c,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15],o}},7656:function(i){i.exports=a;function a(o,s,u){var l=u[0],f=u[1],c=u[2],h,d,p,x,b,y,k,E,A,L,_,C;return s===o?(o[12]=s[0]*l+s[4]*f+s[8]*c+s[12],o[13]=s[1]*l+s[5]*f+s[9]*c+s[13],o[14]=s[2]*l+s[6]*f+s[10]*c+s[14],o[15]=s[3]*l+s[7]*f+s[11]*c+s[15]):(h=s[0],d=s[1],p=s[2],x=s[3],b=s[4],y=s[5],k=s[6],E=s[7],A=s[8],L=s[9],_=s[10],C=s[11],o[0]=h,o[1]=d,o[2]=p,o[3]=x,o[4]=b,o[5]=y,o[6]=k,o[7]=E,o[8]=A,o[9]=L,o[10]=_,o[11]=C,o[12]=h*l+b*f+A*c+s[12],o[13]=d*l+y*f+L*c+s[13],o[14]=p*l+k*f+_*c+s[14],o[15]=x*l+E*f+C*c+s[15]),o}},5665:function(i){i.exports=a;function a(o,s){if(o===s){var u=s[1],l=s[2],f=s[3],c=s[6],h=s[7],d=s[11];o[1]=s[4],o[2]=s[8],o[3]=s[12],o[4]=u,o[6]=s[9],o[7]=s[13],o[8]=l,o[9]=c,o[11]=s[14],o[12]=f,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}},7626:function(i,a,o){"use strict";var s=o(2642),u=o(9346);i.exports=d;function l(p,x){for(var b=[0,0,0,0],y=0;y<4;++y)for(var k=0;k<4;++k)b[k]+=p[4*y+k]*x[y];return b}function f(p,x,b,y,k){for(var E=l(y,l(b,l(x,[p[0],p[1],p[2],1]))),A=0;A<3;++A)E[A]/=E[3];return[.5*k[0]*(1+E[0]),.5*k[1]*(1-E[1])]}function c(p,x){if(p.length===2){for(var b=0,y=0,k=0;k<2;++k)b+=Math.pow(x[k]-p[0][k],2),y+=Math.pow(x[k]-p[1][k],2);return b=Math.sqrt(b),y=Math.sqrt(y),b+y<1e-6?[1,0]:[y/(b+y),b/(y+b)]}else if(p.length===3){var E=[0,0];return u(p[0],p[1],p[2],x,E),s(p,E)}return[]}function h(p,x){for(var b=[0,0,0],y=0;y<p.length;++y)for(var k=p[y],E=x[y],A=0;A<3;++A)b[A]+=E*k[A];return b}function d(p,x,b,y,k,E){if(p.length===1)return[0,p[0].slice()];for(var A=new Array(p.length),L=0;L<p.length;++L)A[L]=f(p[L],b,y,k,E);for(var _=0,C=1/0,L=0;L<A.length;++L){for(var M=0,v=0;v<2;++v)M+=Math.pow(A[L][v]-x[v],2);M<C&&(C=M,_=L)}for(var z=c(A,x),T=0,L=0;L<3;++L){if(z[L]<-.001||z[L]>1.0001)return null;T+=z[L]}return Math.abs(T-1)>.001?null:[_,h(p,z),z]}},840:function(i,a,o){var s=o(3236),u=s([`precision highp float;
#define GLSLIFY 1

attribute vec3 position, normal;
attribute vec4 color;
attribute vec2 uv;

uniform mat4 model
           , view
           , projection
           , inverseModel;
uniform vec3 eyePosition
           , lightPosition;

varying vec3 f_normal
           , f_lightDirection
           , f_eyeDirection
           , f_data;
varying vec4 f_color;
varying vec2 f_uv;

vec4 project(vec3 p) {
  return projection * (view * (model * vec4(p, 1.0)));
}

void main() {
  gl_Position      = project(position);

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * vec4(position , 1.0);
  cameraCoordinate.xyz /= cameraCoordinate.w;
  f_lightDirection = lightPosition - cameraCoordinate.xyz;
  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
  f_normal  = normalize((vec4(normal, 0.0) * inverseModel).xyz);

  f_color          = color;
  f_data           = position;
  f_uv             = uv;
}
`]),l=s([`#extension GL_OES_standard_derivatives : enable

precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float cookTorranceSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness,
  float fresnel) {

  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);

  //Half angle vector
  vec3 H = normalize(lightDirection + viewDirection);

  //Geometric term
  float NdotH = max(dot(surfaceNormal, H), 0.0);
  float VdotH = max(dot(viewDirection, H), 0.000001);
  float LdotH = max(dot(lightDirection, H), 0.000001);
  float G1 = (2.0 * NdotH * VdotN) / VdotH;
  float G2 = (2.0 * NdotH * LdotN) / LdotH;
  float G = min(1.0, min(G1, G2));
  
  //Distribution term
  float D = beckmannDistribution(NdotH, roughness);

  //Fresnel term
  float F = pow(1.0 - VdotN, fresnel);

  //Multiply terms and done
  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
}

//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float roughness
            , fresnel
            , kambient
            , kdiffuse
            , kspecular;
uniform sampler2D texture;

varying vec3 f_normal
           , f_lightDirection
           , f_eyeDirection
           , f_data;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (f_color.a == 0.0 ||
    outOfRange(clipBounds[0], clipBounds[1], f_data)
  ) discard;

  vec3 N = normalize(f_normal);
  vec3 L = normalize(f_lightDirection);
  vec3 V = normalize(f_eyeDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
  //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d

  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);
  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = litColor * f_color.a;
}
`]),f=s([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;
attribute vec4 color;
attribute vec2 uv;

uniform mat4 model, view, projection;

varying vec4 f_color;
varying vec3 f_data;
varying vec2 f_uv;

void main() {
  gl_Position = projection * (view * (model * vec4(position, 1.0)));
  f_color = color;
  f_data  = position;
  f_uv    = uv;
}`]),c=s([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform sampler2D texture;
uniform float opacity;

varying vec4 f_color;
varying vec3 f_data;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;

  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
}`]),h=s([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 uv;
attribute float pointSize;

uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];

varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);
  } else {
    gl_Position = projection * (view * (model * vec4(position, 1.0)));
  }
  gl_PointSize = pointSize;
  f_color = color;
  f_uv = uv;
}`]),d=s([`precision highp float;
#define GLSLIFY 1

uniform sampler2D texture;
uniform float opacity;

varying vec4 f_color;
varying vec2 f_uv;

void main() {
  vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);
  if(dot(pointR, pointR) > 0.25) {
    discard;
  }
  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
}`]),p=s([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;
attribute vec4 id;

uniform mat4 model, view, projection;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  gl_Position = projection * (view * (model * vec4(position, 1.0)));
  f_id        = id;
  f_position  = position;
}`]),x=s([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3  clipBounds[2];
uniform float pickId;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;

  gl_FragColor = vec4(pickId, f_id.xyz);
}`]),b=s([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3  position;
attribute float pointSize;
attribute vec4  id;

uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0.0, 0.0, 0.0, 0.0);
  } else {
    gl_Position  = projection * (view * (model * vec4(position, 1.0)));
    gl_PointSize = pointSize;
  }
  f_id         = id;
  f_position   = position;
}`]),y=s([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;

uniform mat4 model, view, projection;

void main() {
  gl_Position = projection * (view * (model * vec4(position, 1.0)));
}`]),k=s([`precision highp float;
#define GLSLIFY 1

uniform vec3 contourColor;

void main() {
  gl_FragColor = vec4(contourColor, 1.0);
}
`]);a.meshShader={vertex:u,fragment:l,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.wireShader={vertex:f,fragment:c,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:p,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:b,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:y,fragment:k,attributes:[{name:"position",type:"vec3"}]}},7201:function(i,a,o){"use strict";var s=1e-6,u=1e-6,l=o(9405),f=o(2762),c=o(8116),h=o(7766),d=o(8406),p=o(6760),x=o(7608),b=o(9618),y=o(6729),k=o(7765),E=o(1888),A=o(840),L=o(7626),_=A.meshShader,C=A.wireShader,M=A.pointShader,v=A.pickShader,z=A.pointPickShader,T=A.contourShader,F=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function q(he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt){this.gl=he,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=te,this.dirty=!0,this.triShader=ke,this.lineShader=Ee,this.pointShader=Me,this.pickShader=Oe,this.pointPickShader=Re,this.contourShader=me,this.trianglePositions=Be,this.triangleColors=Ze,this.triangleNormals=gt,this.triangleUVs=et,this.triangleIds=fe,this.triangleVAO=Pt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Qe,this.edgeColors=Tt,this.edgeUVs=xt,this.edgeIds=Xe,this.edgeVAO=_t,this.edgeCount=0,this.pointPositions=Ct,this.pointColors=At,this.pointUVs=Te,this.pointSizes=nt,this.pointIds=jt,this.pointVAO=ut,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ct,this.contourVAO=rt,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=F,this._view=F,this._projection=F,this._resolution=[1,1]}var U=q.prototype;U.isOpaque=function(){return!this.hasAlpha},U.isTransparent=function(){return this.hasAlpha},U.pickSlots=1,U.setPickBase=function(he){this.pickId=he};function H(he,te){if(!te||!te.length)return 1;for(var ke=0;ke<te.length;++ke){if(te.length<2)return 1;if(te[ke][0]===he)return te[ke][1];if(te[ke][0]>he&&ke>0){var Ee=(te[ke][0]-he)/(te[ke][0]-te[ke-1][0]);return te[ke][1]*(1-Ee)+Ee*te[ke-1][1]}}return 1}function j(he,te){for(var ke=y({colormap:he,nshades:256,format:"rgba"}),Ee=new Uint8Array(256*4),Me=0;Me<256;++Me){for(var Oe=ke[Me],Re=0;Re<3;++Re)Ee[4*Me+Re]=Oe[Re];te?Ee[4*Me+3]=255*H(Me/255,te):Ee[4*Me+3]=255*Oe[3]}return b(Ee,[256,256,4],[4,0,1])}function G(he){for(var te=he.length,ke=new Array(te),Ee=0;Ee<te;++Ee)ke[Ee]=he[Ee][2];return ke}U.highlight=function(he){if(!he||!this.contourEnable){this.contourCount=0;return}for(var te=k(this.cells,this.intensity,he.intensity),ke=te.cells,Ee=te.vertexIds,Me=te.vertexWeights,Oe=ke.length,Re=E.mallocFloat32(2*3*Oe),me=0,Be=0;Be<Oe;++Be)for(var fe=ke[Be],Ze=0;Ze<2;++Ze){var et=fe[0];fe.length===2&&(et=fe[Ze]);for(var gt=Ee[et][0],Pt=Ee[et][1],Qe=Me[et],Xe=1-Qe,Tt=this.positions[gt],xt=this.positions[Pt],_t=0;_t<3;++_t)Re[me++]=Qe*Tt[_t]+Xe*xt[_t]}this.contourCount=me/3|0,this.contourPositions.update(Re.subarray(0,me)),E.free(Re)},U.update=function(he){he=he||{};var te=this.gl;this.dirty=!0,"contourEnable"in he&&(this.contourEnable=he.contourEnable),"contourColor"in he&&(this.contourColor=he.contourColor),"lineWidth"in he&&(this.lineWidth=he.lineWidth),"lightPosition"in he&&(this.lightPosition=he.lightPosition),this.hasAlpha=!1,"opacity"in he&&(this.opacity=he.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in he&&(this.opacityscale=he.opacityscale,this.hasAlpha=!0),"ambient"in he&&(this.ambientLight=he.ambient),"diffuse"in he&&(this.diffuseLight=he.diffuse),"specular"in he&&(this.specularLight=he.specular),"roughness"in he&&(this.roughness=he.roughness),"fresnel"in he&&(this.fresnel=he.fresnel),he.texture?(this.texture.dispose(),this.texture=h(te,he.texture)):he.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=te.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=te.LINEAR,this.texture.setPixels(j(he.colormap,this.opacityscale)),this.texture.generateMipmap());var ke=he.cells,Ee=he.positions;if(!(!Ee||!ke)){var Me=[],Oe=[],Re=[],me=[],Be=[],fe=[],Ze=[],et=[],gt=[],Pt=[],Qe=[],Xe=[],Tt=[],xt=[];this.cells=ke,this.positions=Ee;var _t=he.vertexNormals,Ct=he.cellNormals,jt=he.vertexNormalsEpsilon===void 0?s:he.vertexNormalsEpsilon,At=he.faceNormalsEpsilon===void 0?u:he.faceNormalsEpsilon;he.useFacetNormals&&!Ct&&(Ct=d.faceNormals(ke,Ee,At)),!Ct&&!_t&&(_t=d.vertexNormals(ke,Ee,jt));var Te=he.vertexColors,nt=he.cellColors,ut=he.meshColor||[1,1,1,1],ct=he.vertexUVs,rt=he.vertexIntensity,je=he.cellUVs,tt=he.cellIntensity,Je=1/0,Mt=-1/0;if(!ct&&!je)if(rt)if(he.vertexIntensityBounds)Je=+he.vertexIntensityBounds[0],Mt=+he.vertexIntensityBounds[1];else for(var Vt=0;Vt<rt.length;++Vt){var Kt=rt[Vt];Je=Math.min(Je,Kt),Mt=Math.max(Mt,Kt)}else if(tt)if(he.cellIntensityBounds)Je=+he.cellIntensityBounds[0],Mt=+he.cellIntensityBounds[1];else for(var Vt=0;Vt<tt.length;++Vt){var Kt=tt[Vt];Je=Math.min(Je,Kt),Mt=Math.max(Mt,Kt)}else for(var Vt=0;Vt<Ee.length;++Vt){var Kt=Ee[Vt][2];Je=Math.min(Je,Kt),Mt=Math.max(Mt,Kt)}rt?this.intensity=rt:tt?this.intensity=tt:this.intensity=G(Ee),this.pickVertex=!(tt||nt);var ir=he.pointSizes,fr=he.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var Vt=0;Vt<Ee.length;++Vt)for(var Ot=Ee[Vt],De=0;De<3;++De)isNaN(Ot[De])||!isFinite(Ot[De])||(this.bounds[0][De]=Math.min(this.bounds[0][De],Ot[De]),this.bounds[1][De]=Math.max(this.bounds[1][De],Ot[De]));var _e=0,Fe=0,Pe=0;e:for(var Vt=0;Vt<ke.length;++Vt){var Ie=ke[Vt];switch(Ie.length){case 1:for(var lt=Ie[0],Ot=Ee[lt],De=0;De<3;++De)if(isNaN(Ot[De])||!isFinite(Ot[De]))continue e;Pt.push(Ot[0],Ot[1],Ot[2]);var ye;Te?ye=Te[lt]:nt?ye=nt[Vt]:ye=ut,this.opacityscale&&rt?Oe.push(ye[0],ye[1],ye[2],this.opacity*H((rt[lt]-Je)/(Mt-Je),this.opacityscale)):ye.length===3?Qe.push(ye[0],ye[1],ye[2],this.opacity):(Qe.push(ye[0],ye[1],ye[2],ye[3]*this.opacity),ye[3]<1&&(this.hasAlpha=!0));var ue;ct?ue=ct[lt]:rt?ue=[(rt[lt]-Je)/(Mt-Je),0]:je?ue=je[Vt]:tt?ue=[(tt[Vt]-Je)/(Mt-Je),0]:ue=[(Ot[2]-Je)/(Mt-Je),0],Xe.push(ue[0],ue[1]),ir?Tt.push(ir[lt]):Tt.push(fr),xt.push(Vt),Pe+=1;break;case 2:for(var De=0;De<2;++De)for(var lt=Ie[De],Ot=Ee[lt],de=0;de<3;++de)if(isNaN(Ot[de])||!isFinite(Ot[de]))continue e;for(var De=0;De<2;++De){var lt=Ie[De],Ot=Ee[lt];fe.push(Ot[0],Ot[1],Ot[2]);var ye;Te?ye=Te[lt]:nt?ye=nt[Vt]:ye=ut,this.opacityscale&&rt?Oe.push(ye[0],ye[1],ye[2],this.opacity*H((rt[lt]-Je)/(Mt-Je),this.opacityscale)):ye.length===3?Ze.push(ye[0],ye[1],ye[2],this.opacity):(Ze.push(ye[0],ye[1],ye[2],ye[3]*this.opacity),ye[3]<1&&(this.hasAlpha=!0));var ue;ct?ue=ct[lt]:rt?ue=[(rt[lt]-Je)/(Mt-Je),0]:je?ue=je[Vt]:tt?ue=[(tt[Vt]-Je)/(Mt-Je),0]:ue=[(Ot[2]-Je)/(Mt-Je),0],et.push(ue[0],ue[1]),gt.push(Vt)}Fe+=1;break;case 3:for(var De=0;De<3;++De)for(var lt=Ie[De],Ot=Ee[lt],de=0;de<3;++de)if(isNaN(Ot[de])||!isFinite(Ot[de]))continue e;for(var De=0;De<3;++De){var lt=Ie[2-De],Ot=Ee[lt];Me.push(Ot[0],Ot[1],Ot[2]);var ye;Te?ye=Te[lt]:nt?ye=nt[Vt]:ye=ut,ye?this.opacityscale&&rt?Oe.push(ye[0],ye[1],ye[2],this.opacity*H((rt[lt]-Je)/(Mt-Je),this.opacityscale)):ye.length===3?Oe.push(ye[0],ye[1],ye[2],this.opacity):(Oe.push(ye[0],ye[1],ye[2],ye[3]*this.opacity),ye[3]<1&&(this.hasAlpha=!0)):Oe.push(.5,.5,.5,1);var ue;ct?ue=ct[lt]:rt?ue=[(rt[lt]-Je)/(Mt-Je),0]:je?ue=je[Vt]:tt?ue=[(tt[Vt]-Je)/(Mt-Je),0]:ue=[(Ot[2]-Je)/(Mt-Je),0],me.push(ue[0],ue[1]);var ht;_t?ht=_t[lt]:ht=Ct[Vt],Re.push(ht[0],ht[1],ht[2]),Be.push(Vt)}_e+=1;break;default:break}}this.pointCount=Pe,this.edgeCount=Fe,this.triangleCount=_e,this.pointPositions.update(Pt),this.pointColors.update(Qe),this.pointUVs.update(Xe),this.pointSizes.update(Tt),this.pointIds.update(new Uint32Array(xt)),this.edgePositions.update(fe),this.edgeColors.update(Ze),this.edgeUVs.update(et),this.edgeIds.update(new Uint32Array(gt)),this.trianglePositions.update(Me),this.triangleColors.update(Oe),this.triangleUVs.update(me),this.triangleNormals.update(Re),this.triangleIds.update(new Uint32Array(Be))}},U.drawTransparent=U.draw=function(he){he=he||{};for(var te=this.gl,ke=he.model||F,Ee=he.view||F,Me=he.projection||F,Oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Re=0;Re<3;++Re)Oe[0][Re]=Math.max(Oe[0][Re],this.clipBounds[0][Re]),Oe[1][Re]=Math.min(Oe[1][Re],this.clipBounds[1][Re]);var me={model:ke,view:Ee,projection:Me,inverseModel:F.slice(),clipBounds:Oe,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=x(me.inverseModel,me.model),te.disable(te.CULL_FACE),this.texture.bind(0);var Be=new Array(16);p(Be,me.view,me.model),p(Be,me.projection,Be),x(Be,Be);for(var Re=0;Re<3;++Re)me.eyePosition[Re]=Be[12+Re]/Be[15];for(var fe=Be[15],Re=0;Re<3;++Re)fe+=this.lightPosition[Re]*Be[4*Re+3];for(var Re=0;Re<3;++Re){for(var Ze=Be[12+Re],et=0;et<3;++et)Ze+=Be[4*et+Re]*this.lightPosition[et];me.lightPosition[Re]=Ze/fe}if(this.triangleCount>0){var gt=this.triShader;gt.bind(),gt.uniforms=me,this.triangleVAO.bind(),te.drawArrays(te.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var gt=this.lineShader;gt.bind(),gt.uniforms=me,this.edgeVAO.bind(),te.lineWidth(this.lineWidth*this.pixelRatio),te.drawArrays(te.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var gt=this.pointShader;gt.bind(),gt.uniforms=me,this.pointVAO.bind(),te.drawArrays(te.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var gt=this.contourShader;gt.bind(),gt.uniforms=me,this.contourVAO.bind(),te.drawArrays(te.LINES,0,this.contourCount),this.contourVAO.unbind()}},U.drawPick=function(he){he=he||{};for(var te=this.gl,ke=he.model||F,Ee=he.view||F,Me=he.projection||F,Oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Re=0;Re<3;++Re)Oe[0][Re]=Math.max(Oe[0][Re],this.clipBounds[0][Re]),Oe[1][Re]=Math.min(Oe[1][Re],this.clipBounds[1][Re]);this._model=[].slice.call(ke),this._view=[].slice.call(Ee),this._projection=[].slice.call(Me),this._resolution=[te.drawingBufferWidth,te.drawingBufferHeight];var me={model:ke,view:Ee,projection:Me,clipBounds:Oe,pickId:this.pickId/255},Be=this.pickShader;if(Be.bind(),Be.uniforms=me,this.triangleCount>0&&(this.triangleVAO.bind(),te.drawArrays(te.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),te.lineWidth(this.lineWidth*this.pixelRatio),te.drawArrays(te.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Be=this.pointPickShader;Be.bind(),Be.uniforms=me,this.pointVAO.bind(),te.drawArrays(te.POINTS,0,this.pointCount),this.pointVAO.unbind()}},U.pick=function(he){if(!he||he.id!==this.pickId)return null;for(var te=he.value[0]+256*he.value[1]+65536*he.value[2],ke=this.cells[te],Ee=this.positions,Me=new Array(ke.length),Oe=0;Oe<ke.length;++Oe)Me[Oe]=Ee[ke[Oe]];var Re=he.coord[0],me=he.coord[1];if(!this.pickVertex){var Be=this.positions[ke[0]],fe=this.positions[ke[1]],Ze=this.positions[ke[2]],et=[(Be[0]+fe[0]+Ze[0])/3,(Be[1]+fe[1]+Ze[1])/3,(Be[2]+fe[2]+Ze[2])/3];return{_cellCenter:!0,position:[Re,me],index:te,cell:ke,cellId:te,intensity:this.intensity[te],dataCoordinate:et}}var gt=L(Me,[Re*this.pixelRatio,this._resolution[1]-me*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!gt)return null;for(var Pt=gt[2],Qe=0,Oe=0;Oe<ke.length;++Oe)Qe+=Pt[Oe]*this.intensity[ke[Oe]];return{position:gt[1],index:ke[gt[0]],cell:ke,cellId:te,intensity:Qe,dataCoordinate:this.positions[ke[gt[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 O(he){var te=l(he,_.vertex,_.fragment);return te.attributes.position.location=0,te.attributes.color.location=2,te.attributes.uv.location=3,te.attributes.normal.location=4,te}function W(he){var te=l(he,C.vertex,C.fragment);return te.attributes.position.location=0,te.attributes.color.location=2,te.attributes.uv.location=3,te}function re(he){var te=l(he,M.vertex,M.fragment);return te.attributes.position.location=0,te.attributes.color.location=2,te.attributes.uv.location=3,te.attributes.pointSize.location=4,te}function ne(he){var te=l(he,v.vertex,v.fragment);return te.attributes.position.location=0,te.attributes.id.location=1,te}function be(he){var te=l(he,z.vertex,z.fragment);return te.attributes.position.location=0,te.attributes.id.location=1,te.attributes.pointSize.location=4,te}function ze(he){var te=l(he,T.vertex,T.fragment);return te.attributes.position.location=0,te}function Ce(he,te){arguments.length===1&&(te=he,he=te.gl);var ke=he.getExtension("OES_standard_derivatives")||he.getExtension("MOZ_OES_standard_derivatives")||he.getExtension("WEBKIT_OES_standard_derivatives");if(!ke)throw new Error("derivatives not supported");var Ee=O(he),Me=W(he),Oe=re(he),Re=ne(he),me=be(he),Be=ze(he),fe=h(he,b(new Uint8Array([255,255,255,255]),[1,1,4]));fe.generateMipmap(),fe.minFilter=he.LINEAR_MIPMAP_LINEAR,fe.magFilter=he.LINEAR;var Ze=f(he),et=f(he),gt=f(he),Pt=f(he),Qe=f(he),Xe=c(he,[{buffer:Ze,type:he.FLOAT,size:3},{buffer:Qe,type:he.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:et,type:he.FLOAT,size:4},{buffer:gt,type:he.FLOAT,size:2},{buffer:Pt,type:he.FLOAT,size:3}]),Tt=f(he),xt=f(he),_t=f(he),Ct=f(he),jt=c(he,[{buffer:Tt,type:he.FLOAT,size:3},{buffer:Ct,type:he.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:xt,type:he.FLOAT,size:4},{buffer:_t,type:he.FLOAT,size:2}]),At=f(he),Te=f(he),nt=f(he),ut=f(he),ct=f(he),rt=c(he,[{buffer:At,type:he.FLOAT,size:3},{buffer:ct,type:he.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Te,type:he.FLOAT,size:4},{buffer:nt,type:he.FLOAT,size:2},{buffer:ut,type:he.FLOAT,size:1}]),je=f(he),tt=c(he,[{buffer:je,type:he.FLOAT,size:3}]),Je=new q(he,fe,Ee,Me,Oe,Re,me,Be,Ze,Qe,et,gt,Pt,Xe,Tt,Ct,xt,_t,jt,At,ct,Te,nt,ut,rt,je,tt);return Je.update(te),Je}i.exports=Ce},4437:function(i,a,o){"use strict";i.exports=d;var s=o(3025),u=o(6296),l=o(351),f=o(8512),c=o(24),h=o(7520);function d(p,x){p=p||document.body,x=x||{};var b=[.01,1/0];"distanceLimits"in x&&(b[0]=x.distanceLimits[0],b[1]=x.distanceLimits[1]),"zoomMin"in x&&(b[0]=x.zoomMin),"zoomMax"in x&&(b[1]=x.zoomMax);var y=u({center:x.center||[0,0,0],up:x.up||[0,1,0],eye:x.eye||[0,0,10],mode:x.mode||"orbit",distanceLimits:b}),k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],E=0,A=p.clientWidth,L=p.clientHeight,_={keyBindingMode:"rotate",enableWheel:!0,view:y,element:p,delay:x.delay||16,rotateSpeed:x.rotateSpeed||1,zoomSpeed:x.zoomSpeed||1,translateSpeed:x.translateSpeed||1,flipX:!!x.flipX,flipY:!!x.flipY,modes:y.modes,_ortho:x._ortho||x.projection&&x.projection.type==="orthographic"||!1,tick:function(){var C=s(),M=this.delay,v=C-2*M;y.idle(C-M),y.recalcMatrix(v),y.flush(C-(100+M*2));for(var z=!0,T=y.computedMatrix,F=0;F<16;++F)z=z&&k[F]===T[F],k[F]=T[F];var q=p.clientWidth===A&&p.clientHeight===L;return A=p.clientWidth,L=p.clientHeight,z?!q:(E=Math.exp(y.computedRadius[0]),!0)},lookAt:function(C,M,v){y.lookAt(y.lastT(),C,M,v)},rotate:function(C,M,v){y.rotate(y.lastT(),C,M,v)},pan:function(C,M,v){y.pan(y.lastT(),C,M,v)},translate:function(C,M,v){y.translate(y.lastT(),C,M,v)}};return Object.defineProperties(_,{matrix:{get:function(){return y.computedMatrix},set:function(C){return y.setMatrix(y.lastT(),C),y.computedMatrix},enumerable:!0},mode:{get:function(){return y.getMode()},set:function(C){var M=y.computedUp.slice(),v=y.computedEye.slice(),z=y.computedCenter.slice();if(y.setMode(C),C==="turntable"){var T=s();y._active.lookAt(T,v,z,M),y._active.lookAt(T+500,v,z,[0,0,1]),y._active.flush(T)}return y.getMode()},enumerable:!0},center:{get:function(){return y.computedCenter},set:function(C){return y.lookAt(y.lastT(),null,C),y.computedCenter},enumerable:!0},eye:{get:function(){return y.computedEye},set:function(C){return y.lookAt(y.lastT(),C),y.computedEye},enumerable:!0},up:{get:function(){return y.computedUp},set:function(C){return y.lookAt(y.lastT(),null,null,C),y.computedUp},enumerable:!0},distance:{get:function(){return E},set:function(C){return y.setDistance(y.lastT(),C),C},enumerable:!0},distanceLimits:{get:function(){return y.getDistanceLimits(b)},set:function(C){return y.setDistanceLimits(C),C},enumerable:!0}}),p.addEventListener("contextmenu",function(C){return C.preventDefault(),!1}),_._lastX=-1,_._lastY=-1,_._lastMods={shift:!1,control:!1,alt:!1,meta:!1},_.enableMouseListeners=function(){_.mouseListener=l(p,C),p.addEventListener("touchstart",function(M){var v=c(M.changedTouches[0],p);C(0,v[0],v[1],_._lastMods),C(1,v[0],v[1],_._lastMods)},h?{passive:!0}:!1),p.addEventListener("touchmove",function(M){var v=c(M.changedTouches[0],p);C(1,v[0],v[1],_._lastMods),M.preventDefault()},h?{passive:!1}:!1),p.addEventListener("touchend",function(M){C(0,_._lastX,_._lastY,_._lastMods)},h?{passive:!0}:!1);function C(M,v,z,T){var F=_.keyBindingMode;if(F!==!1){var q=F==="rotate",U=F==="pan",H=F==="zoom",j=!!T.control,G=!!T.alt,O=!!T.shift,W=!!(M&1),re=!!(M&2),ne=!!(M&4),be=1/p.clientHeight,ze=be*(v-_._lastX),Ce=be*(z-_._lastY),he=_.flipX?1:-1,te=_.flipY?1:-1,ke=Math.PI*_.rotateSpeed,Ee=s();if(_._lastX!==-1&&_._lastY!==-1&&((q&&W&&!j&&!G&&!O||W&&!j&&!G&&O)&&y.rotate(Ee,he*ke*ze,-te*ke*Ce,0),(U&&W&&!j&&!G&&!O||re||W&&j&&!G&&!O)&&y.pan(Ee,-_.translateSpeed*ze*E,_.translateSpeed*Ce*E,0),H&&W&&!j&&!G&&!O||ne||W&&!j&&G&&!O)){var Me=-_.zoomSpeed*Ce/window.innerHeight*(Ee-y.lastT())*100;y.pan(Ee,0,0,E*(Math.exp(Me)-1))}return _._lastX=v,_._lastY=z,_._lastMods=T,!0}}_.wheelListener=f(p,function(M,v){if(_.keyBindingMode!==!1&&_.enableWheel){var z=_.flipX?1:-1,T=_.flipY?1:-1,F=s();if(Math.abs(M)>Math.abs(v))y.rotate(F,0,0,-M*z*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var q=-_.zoomSpeed*T*v/window.innerHeight*(F-y.lastT())/20;y.pan(F,0,0,E*(Math.exp(q)-1))}}},!0)},_.enableMouseListeners(),_}},799:function(i,a,o){var s=o(3236),u=o(9405),l=s([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
varying vec2 uv;
void main() {
  uv = position;
  gl_Position = vec4(position, 0, 1);
}`]),f=s([`precision mediump float;
#define GLSLIFY 1

uniform sampler2D accumBuffer;
varying vec2 uv;

void main() {
  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));
  gl_FragColor = min(vec4(1,1,1,1), accum);
}`]);i.exports=function(c){return u(c,l,f,null,[{name:"position",type:"vec2"}])}},4100:function(i,a,o){"use strict";var s=o(4437),u=o(3837),l=o(5445),f=o(4449),c=o(3589),h=o(2260),d=o(7169),p=o(351),x=o(4772),b=o(4040),y=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 A(v,z){var T=null;try{T=v.getContext("webgl",z),T||(T=v.getContext("experimental-webgl",z))}catch(F){return null}return T}function L(v){var z=Math.round(Math.log(Math.abs(v))/Math.log(10));if(z<0){var T=Math.round(Math.pow(10,-z));return Math.ceil(v*T)/T}else if(z>0){var T=Math.round(Math.pow(10,z));return Math.ceil(v/T)*T}return Math.ceil(v)}function _(v){return typeof v=="boolean"?v:!0}function C(v){v=v||{},v.camera=v.camera||{};var z=v.canvas;if(!z)if(z=document.createElement("canvas"),v.container){var T=v.container;T.appendChild(z)}else document.body.appendChild(z);var F=v.gl;if(F||(v.glOptions&&(k=!!v.glOptions.preserveDrawingBuffer),F=A(z,v.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:k})),!F)throw new Error("webgl not supported");var q=v.bounds||[[-10,-10,-10],[10,10,10]],U=new E,H=h(F,F.drawingBufferWidth,F.drawingBufferHeight,{preferFloat:!k}),j=y(F),G=v.cameraObject&&v.cameraObject._ortho===!0||v.camera.projection&&v.camera.projection.type==="orthographic"||!1,O={eye:v.camera.eye||[2,0,0],center:v.camera.center||[0,0,0],up:v.camera.up||[0,1,0],zoomMin:v.camera.zoomMax||.1,zoomMax:v.camera.zoomMin||100,mode:v.camera.mode||"turntable",_ortho:G},W=v.axes||{},re=u(F,W);re.enable=!W.disable;var ne=v.spikes||{},be=f(F,ne),ze=[],Ce=[],he=[],te=[],ke=!0,Re=!0,Ee=new Array(16),Me=new Array(16),Oe={view:null,projection:Ee,model:Me,_ortho:!1},Re=!0,me=[F.drawingBufferWidth,F.drawingBufferHeight],Be=v.cameraObject||s(z,O),fe={gl:F,contextLost:!1,pixelRatio:v.pixelRatio||1,canvas:z,selection:U,camera:Be,axes:re,axesPixels:null,spikes:be,bounds:q,objects:ze,shape:me,aspect:v.aspectRatio||[1,1,1],pickRadius:v.pickRadius||10,zNear:v.zNear||.01,zFar:v.zFar||1e3,fovy:v.fovy||Math.PI/4,clearColor:v.clearColor||[0,0,0,0],autoResize:_(v.autoResize),autoBounds:_(v.autoBounds),autoScale:!!v.autoScale,autoCenter:_(v.autoCenter),clipToBounds:_(v.clipToBounds),snapToData:!!v.snapToData,onselect:v.onselect||null,onrender:v.onrender||null,onclick:v.onclick||null,cameraParams:Oe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ct){this.aspect[0]=Ct.x,this.aspect[1]=Ct.y,this.aspect[2]=Ct.z,Re=!0},setBounds:function(Ct,jt){this.bounds[0][Ct]=jt.min,this.bounds[1][Ct]=jt.max},setClearColor:function(Ct){this.clearColor=Ct},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)}},Ze=[F.drawingBufferWidth/fe.pixelRatio|0,F.drawingBufferHeight/fe.pixelRatio|0];function et(){if(!fe._stopped&&fe.autoResize){var Ct=z.parentNode,jt=1,At=1;Ct&&Ct!==document.body?(jt=Ct.clientWidth,At=Ct.clientHeight):(jt=window.innerWidth,At=window.innerHeight);var Te=Math.ceil(jt*fe.pixelRatio)|0,nt=Math.ceil(At*fe.pixelRatio)|0;if(Te!==z.width||nt!==z.height){z.width=Te,z.height=nt;var ut=z.style;ut.position=ut.position||"absolute",ut.left="0px",ut.top="0px",ut.width=jt+"px",ut.height=At+"px",ke=!0}}}fe.autoResize&&et(),window.addEventListener("resize",et);function gt(){for(var Ct=ze.length,jt=te.length,At=0;At<jt;++At)he[At]=0;e:for(var At=0;At<Ct;++At){var Te=ze[At],nt=Te.pickSlots;if(!nt){Ce[At]=-1;continue}for(var ut=0;ut<jt;++ut)if(he[ut]+nt<255){Ce[At]=ut,Te.setPickBase(he[ut]+1),he[ut]+=nt;continue e}var ct=c(F,me);Ce[At]=jt,te.push(ct),he.push(nt),Te.setPickBase(1),jt+=1}for(;jt>0&&he[jt-1]===0;)he.pop(),te.pop().dispose()}fe.update=function(Ct){fe._stopped||(Ct=Ct||{},ke=!0,Re=!0)},fe.add=function(Ct){fe._stopped||(Ct.axes=re,ze.push(Ct),Ce.push(-1),ke=!0,Re=!0,gt())},fe.remove=function(Ct){if(!fe._stopped){var jt=ze.indexOf(Ct);jt<0||(ze.splice(jt,1),Ce.pop(),ke=!0,Re=!0,gt())}},fe.dispose=function(){if(!fe._stopped&&(fe._stopped=!0,window.removeEventListener("resize",et),z.removeEventListener("webglcontextlost",Pt),fe.mouseListener.enabled=!1,!fe.contextLost)){re.dispose(),be.dispose();for(var Ct=0;Ct<ze.length;++Ct)ze[Ct].dispose();H.dispose();for(var Ct=0;Ct<te.length;++Ct)te[Ct].dispose();j.dispose(),F=null,re=null,be=null,ze=[]}},fe._mouseRotating=!1,fe._prevButtons=0,fe.enableMouseListeners=function(){fe.mouseListener=p(z,function(Ct,jt,At){if(!fe._stopped){var Te=te.length,nt=ze.length,ut=U.object;U.distance=1/0,U.mouse[0]=jt,U.mouse[1]=At,U.object=null,U.screen=null,U.dataCoordinate=U.dataPosition=null;var ct=!1;if(Ct&&fe._prevButtons)fe._mouseRotating=!0;else{fe._mouseRotating&&(Re=!0),fe._mouseRotating=!1;for(var rt=0;rt<Te;++rt){var je=te[rt].query(jt,Ze[1]-At-1,fe.pickRadius);if(je){if(je.distance>U.distance)continue;for(var tt=0;tt<nt;++tt){var Je=ze[tt];if(Ce[tt]===rt){var Mt=Je.pick(je);Mt&&(U.buttons=Ct,U.screen=je.coord,U.distance=je.distance,U.object=Je,U.index=Mt.distance,U.dataPosition=Mt.position,U.dataCoordinate=Mt.dataCoordinate,U.data=Mt,ct=!0)}}}}}ut&&ut!==U.object&&(ut.highlight&&ut.highlight(null),ke=!0),U.object&&(U.object.highlight&&U.object.highlight(U.data),ke=!0),ct=ct||U.object!==ut,ct&&fe.onselect&&fe.onselect(U),Ct&1&&!(fe._prevButtons&1)&&fe.onclick&&fe.onclick(U),fe._prevButtons=Ct}})};function Pt(){if(fe.contextLost)return!0;F.isContextLost()&&(fe.contextLost=!0,fe.mouseListener.enabled=!1,fe.selection.object=null,fe.oncontextloss&&fe.oncontextloss())}z.addEventListener("webglcontextlost",Pt);function Qe(){if(!Pt()){F.colorMask(!0,!0,!0,!0),F.depthMask(!0),F.disable(F.BLEND),F.enable(F.DEPTH_TEST),F.depthFunc(F.LEQUAL);for(var Ct=ze.length,jt=te.length,At=0;At<jt;++At){var Te=te[At];Te.shape=Ze,Te.begin();for(var nt=0;nt<Ct;++nt)if(Ce[nt]===At){var ut=ze[nt];ut.drawPick&&(ut.pixelRatio=1,ut.drawPick(Oe))}Te.end()}}}var Xe=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Tt=[Xe[0].slice(),Xe[1].slice()];function xt(){if(!Pt()){et();var Ct=fe.camera.tick();Oe.view=fe.camera.matrix,ke=ke||Ct,Re=Re||Ct,re.pixelRatio=fe.pixelRatio,be.pixelRatio=fe.pixelRatio;var jt=ze.length,At=Xe[0],Te=Xe[1];At[0]=At[1]=At[2]=1/0,Te[0]=Te[1]=Te[2]=-1/0;for(var nt=0;nt<jt;++nt){var ut=ze[nt];ut.pixelRatio=fe.pixelRatio,ut.axes=fe.axes,ke=ke||!!ut.dirty,Re=Re||!!ut.dirty;var ct=ut.bounds;if(ct)for(var rt=ct[0],je=ct[1],tt=0;tt<3;++tt)At[tt]=Math.min(At[tt],rt[tt]),Te[tt]=Math.max(Te[tt],je[tt])}var Je=fe.bounds;if(fe.autoBounds)for(var tt=0;tt<3;++tt){if(Te[tt]<At[tt])At[tt]=-1,Te[tt]=1;else{At[tt]===Te[tt]&&(At[tt]-=1,Te[tt]+=1);var Mt=.05*(Te[tt]-At[tt]);At[tt]=At[tt]-Mt,Te[tt]=Te[tt]+Mt}Je[0][tt]=At[tt],Je[1][tt]=Te[tt]}for(var Vt=!1,tt=0;tt<3;++tt)Vt=Vt||Tt[0][tt]!==Je[0][tt]||Tt[1][tt]!==Je[1][tt],Tt[0][tt]=Je[0][tt],Tt[1][tt]=Je[1][tt];if(Re=Re||Vt,ke=ke||Vt,!!ke){if(Vt){for(var Kt=[0,0,0],nt=0;nt<3;++nt)Kt[nt]=L((Je[1][nt]-Je[0][nt])/10);re.autoTicks?re.update({bounds:Je,tickSpacing:Kt}):re.update({bounds:Je})}var ir=F.drawingBufferWidth,fr=F.drawingBufferHeight;me[0]=ir,me[1]=fr,Ze[0]=Math.max(ir/fe.pixelRatio,1)|0,Ze[1]=Math.max(fr/fe.pixelRatio,1)|0,M(fe,G);for(var nt=0;nt<jt;++nt){var ut=ze[nt];ut.axesBounds=Je,fe.clipToBounds&&(ut.clipBounds=Je)}U.object&&(fe.snapToData?be.position=U.dataCoordinate:be.position=U.dataPosition,be.bounds=Je),Re&&(Re=!1,Qe()),fe.axesPixels=l(fe.axes,Oe,ir,fr),fe.onrender&&fe.onrender(),F.bindFramebuffer(F.FRAMEBUFFER,null),F.viewport(0,0,ir,fr),fe.clearRGBA(),F.depthMask(!0),F.colorMask(!0,!0,!0,!0),F.enable(F.DEPTH_TEST),F.depthFunc(F.LEQUAL),F.disable(F.BLEND),F.disable(F.CULL_FACE);var Ot=!1;re.enable&&(Ot=Ot||re.isTransparent(),re.draw(Oe)),be.axes=re,U.object&&be.draw(Oe),F.disable(F.CULL_FACE);for(var nt=0;nt<jt;++nt){var ut=ze[nt];ut.axes=re,ut.pixelRatio=fe.pixelRatio,ut.isOpaque&&ut.isOpaque()&&ut.draw(Oe),ut.isTransparent&&ut.isTransparent()&&(Ot=!0)}if(Ot){H.shape=me,H.bind(),F.clear(F.DEPTH_BUFFER_BIT),F.colorMask(!1,!1,!1,!1),F.depthMask(!0),F.depthFunc(F.LESS),re.enable&&re.isTransparent()&&re.drawTransparent(Oe);for(var nt=0;nt<jt;++nt){var ut=ze[nt];ut.isOpaque&&ut.isOpaque()&&ut.draw(Oe)}F.enable(F.BLEND),F.blendEquation(F.FUNC_ADD),F.blendFunc(F.ONE,F.ONE_MINUS_SRC_ALPHA),F.colorMask(!0,!0,!0,!0),F.depthMask(!1),F.clearColor(0,0,0,0),F.clear(F.COLOR_BUFFER_BIT),re.isTransparent()&&re.drawTransparent(Oe);for(var nt=0;nt<jt;++nt){var ut=ze[nt];ut.isTransparent&&ut.isTransparent()&&ut.drawTransparent(Oe)}F.bindFramebuffer(F.FRAMEBUFFER,null),F.blendFunc(F.ONE,F.ONE_MINUS_SRC_ALPHA),F.disable(F.DEPTH_TEST),j.bind(),H.color[0].bind(0),j.uniforms.accumBuffer=0,d(F),F.disable(F.BLEND)}ke=!1;for(var nt=0;nt<jt;++nt)ze[nt].dirty=!1}}}function _t(){fe._stopped||fe.contextLost||(xt(),requestAnimationFrame(_t))}return fe.enableMouseListeners(),_t(),fe.redraw=function(){fe._stopped||(ke=!0,xt())},fe}function M(v,z){var T=v.bounds,F=v.cameraParams,q=F.projection,U=F.model,H=v.gl.drawingBufferWidth,j=v.gl.drawingBufferHeight,G=v.zNear,O=v.zFar,W=v.fovy,re=H/j;z?(b(q,-re,re,-1,1,G,O),F._ortho=!0):(x(q,W,re,G,O),F._ortho=!1);for(var ne=0;ne<16;++ne)U[ne]=0;U[15]=1;for(var be=0,ne=0;ne<3;++ne)be=Math.max(be,T[1][ne]-T[0][ne]);for(var ne=0;ne<3;++ne)v.autoScale?U[5*ne]=v.aspect[ne]/(T[1][ne]-T[0][ne]):U[5*ne]=1/be,v.autoCenter&&(U[12+ne]=-U[5*ne]*.5*(T[0][ne]+T[1][ne]))}},783:function(i){i.exports=a;function a(o,s,u,l){var f=s[0],c=s[1],h=s[2],d=s[3],p=u[0],x=u[1],b=u[2],y=u[3],k,E,A,L,_;return E=f*p+c*x+h*b+d*y,E<0&&(E=-E,p=-p,x=-x,b=-b,y=-y),1-E>1e-6?(k=Math.acos(E),A=Math.sin(k),L=Math.sin((1-l)*k)/A,_=Math.sin(l*k)/A):(L=1-l,_=l),o[0]=L*f+_*p,o[1]=L*c+_*x,o[2]=L*h+_*b,o[3]=L*d+_*y,o}},5964:function(i){"use strict";i.exports=function(a){return!a&&a!==0?"":a.toString()}},9366:function(i,a,o){"use strict";var s=o(4359);i.exports=l;var u={};function l(f,c,h){var d=[c.style,c.weight,c.variant,c.family].join("_"),p=u[d];if(p||(p=u[d]={}),f in p)return p[f];var x={textAlign:"center",textBaseline:"middle",lineHeight:1,font:c.family,fontStyle:c.style,fontWeight:c.weight,fontVariant:c.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};x.triangles=!0;var b=s(f,x);x.triangles=!1;var y=s(f,x),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<y.positions.length;++k)for(E=0;E<y.positions[k].length;++E)y.positions[k][E]/=h}var A=[[1/0,1/0],[-1/0,-1/0]],L=y.positions.length;for(k=0;k<L;++k){var _=y.positions[k];for(E=0;E<2;++E)A[0][E]=Math.min(A[0][E],_[E]),A[1][E]=Math.max(A[1][E],_[E])}return p[f]=[b,y,A]}},1283:function(i,a,o){var s=o(9405),u=o(3236),l=u([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;

uniform vec4 highlightId;
uniform float highlightScale;
uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];

varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0,0,0,0);
  } else {
    float scale = 1.0;
    if(distance(highlightId, id) < 0.0001) {
      scale = highlightScale;
    }

    vec4 worldPosition = model * vec4(position, 1);
    vec4 viewPosition = view * worldPosition;
    viewPosition = viewPosition / viewPosition.w;
    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));

    gl_Position = clipPosition;
    interpColor = color;
    pickId = id;
    dataCoordinate = position;
  }
}`]),f=u([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;

uniform mat4 model, view, projection;
uniform vec2 screenSize;
uniform vec3 clipBounds[2];
uniform float highlightScale, pixelRatio;
uniform vec4 highlightId;

varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0,0,0,0);
  } else {
    float scale = pixelRatio;
    if(distance(highlightId.bgr, id.bgr) < 0.001) {
      scale *= highlightScale;
    }

    vec4 worldPosition = model * vec4(position, 1.0);
    vec4 viewPosition = view * worldPosition;
    vec4 clipPosition = projection * viewPosition;
    clipPosition /= clipPosition.w;

    gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);
    interpColor = color;
    pickId = id;
    dataCoordinate = position;
  }
}`]),c=u([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;

uniform float highlightScale;
uniform vec4 highlightId;
uniform vec3 axes[2];
uniform mat4 model, view, projection;
uniform vec2 screenSize;
uniform vec3 clipBounds[2];
uniform float scale, pixelRatio;

varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0,0,0,0);
  } else {
    float lscale = pixelRatio * scale;
    if(distance(highlightId, id) < 0.0001) {
      lscale *= highlightScale;
    }

    vec4 clipCenter   = projection * (view * (model * vec4(position, 1)));
    vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;
    vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1)));

    gl_Position = clipPosition;
    interpColor = color;
    pickId = id;
    dataCoordinate = dataPosition;
  }
}
`]),h=u([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 fragClipBounds[2];
uniform float opacity;

varying vec4 interpColor;
varying vec3 dataCoordinate;

void main() {
  if (
    outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||
    interpColor.a * opacity == 0.
  ) discard;
  gl_FragColor = interpColor * opacity;
}
`]),d=u([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 fragClipBounds[2];
uniform float pickGroup;

varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;

  gl_FragColor = vec4(pickGroup, pickId.bgr);
}`]),p=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],x={vertex:l,fragment:h,attributes:p},b={vertex:f,fragment:h,attributes:p},y={vertex:c,fragment:h,attributes:p},k={vertex:l,fragment:d,attributes:p},E={vertex:f,fragment:d,attributes:p},A={vertex:c,fragment:d,attributes:p};function L(_,C){var M=s(_,C),v=M.attributes;return v.position.location=0,v.color.location=1,v.glyph.location=2,v.id.location=3,M}a.createPerspective=function(_){return L(_,x)},a.createOrtho=function(_){return L(_,b)},a.createProject=function(_){return L(_,y)},a.createPickPerspective=function(_){return L(_,k)},a.createPickOrtho=function(_){return L(_,E)},a.createPickProject=function(_){return L(_,A)}},8418:function(i,a,o){"use strict";var s=o(5219),u=o(2762),l=o(8116),f=o(1888),c=o(6760),h=o(1283),d=o(9366),p=o(5964),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],b=ArrayBuffer,y=DataView;function k(Me){return b.isView(Me)&&!(Me instanceof y)}function E(Me){return Array.isArray(Me)||k(Me)}i.exports=Ee;function A(Me,Oe){var Re=Me[0],me=Me[1],Be=Me[2],fe=Me[3];return Me[0]=Oe[0]*Re+Oe[4]*me+Oe[8]*Be+Oe[12]*fe,Me[1]=Oe[1]*Re+Oe[5]*me+Oe[9]*Be+Oe[13]*fe,Me[2]=Oe[2]*Re+Oe[6]*me+Oe[10]*Be+Oe[14]*fe,Me[3]=Oe[3]*Re+Oe[7]*me+Oe[11]*Be+Oe[15]*fe,Me}function L(Me,Oe,Re,me){return A(me,me,Re),A(me,me,Oe),A(me,me,Me)}function _(Me,Oe){this.index=Me,this.dataCoordinate=this.position=Oe}function C(Me){return Me===!0||Me>1?1:Me}function M(Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe){this.gl=Me,this.pixelRatio=1,this.shader=Oe,this.orthoShader=Re,this.projectShader=me,this.pointBuffer=Be,this.colorBuffer=fe,this.glyphBuffer=Ze,this.idBuffer=et,this.vao=gt,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=Pt,this.pickOrthoShader=Qe,this.pickProjectShader=Xe,this.points=[],this._selectResult=new _(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 v=M.prototype;v.pickSlots=1,v.setPickBase=function(Me){this.pickId=Me},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var Me=0;Me<3;++Me)if(this.axesProject[Me]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Me=0;Me<3;++Me)if(this.axesProject[Me]&&!this.projectHasAlpha)return!0;return!1};var z=[0,0],T=[0,0,0],F=[0,0,0],q=[0,0,0,1],U=[0,0,0,1],H=x.slice(),j=[0,0,0],G=[[0,0,0],[0,0,0]];function O(Me){return Me[0]=Me[1]=Me[2]=0,Me}function W(Me,Oe){return Me[0]=Oe[0],Me[1]=Oe[1],Me[2]=Oe[2],Me[3]=1,Me}function re(Me,Oe,Re,me){return Me[0]=Oe[0],Me[1]=Oe[1],Me[2]=Oe[2],Me[Re]=me,Me}function ne(Me){for(var Oe=G,Re=0;Re<2;++Re)for(var me=0;me<3;++me)Oe[Re][me]=Math.max(Math.min(Me[Re][me],1e8),-1e8);return Oe}function be(Me,Oe,Re,me){var Be=Oe.axesProject,fe=Oe.gl,Ze=Me.uniforms,et=Re.model||x,gt=Re.view||x,Pt=Re.projection||x,Qe=Oe.axesBounds,Xe=ne(Oe.clipBounds),Tt;Oe.axes&&Oe.axes.lastCubeProps?Tt=Oe.axes.lastCubeProps.axis:Tt=[1,1,1],z[0]=2/fe.drawingBufferWidth,z[1]=2/fe.drawingBufferHeight,Me.bind(),Ze.view=gt,Ze.projection=Pt,Ze.screenSize=z,Ze.highlightId=Oe.highlightId,Ze.highlightScale=Oe.highlightScale,Ze.clipBounds=Xe,Ze.pickGroup=Oe.pickId/255,Ze.pixelRatio=me;for(var xt=0;xt<3;++xt)if(Be[xt]){Ze.scale=Oe.projectScale[xt],Ze.opacity=Oe.projectOpacity[xt];for(var _t=H,Ct=0;Ct<16;++Ct)_t[Ct]=0;for(var Ct=0;Ct<4;++Ct)_t[5*Ct]=1;_t[5*xt]=0,Tt[xt]<0?_t[12+xt]=Qe[0][xt]:_t[12+xt]=Qe[1][xt],c(_t,et,_t),Ze.model=_t;var jt=(xt+1)%3,At=(xt+2)%3,Te=O(T),nt=O(F);Te[jt]=1,nt[At]=1;var ut=L(Pt,gt,et,W(q,Te)),ct=L(Pt,gt,et,W(U,nt));if(Math.abs(ut[1])>Math.abs(ct[1])){var rt=ut;ut=ct,ct=rt,rt=Te,Te=nt,nt=rt;var je=jt;jt=At,At=je}ut[0]<0&&(Te[jt]=-1),ct[1]>0&&(nt[At]=-1);for(var tt=0,Je=0,Ct=0;Ct<4;++Ct)tt+=Math.pow(et[4*jt+Ct],2),Je+=Math.pow(et[4*At+Ct],2);Te[jt]/=Math.sqrt(tt),nt[At]/=Math.sqrt(Je),Ze.axes[0]=Te,Ze.axes[1]=nt,Ze.fragClipBounds[0]=re(j,Xe[0],xt,-1e8),Ze.fragClipBounds[1]=re(j,Xe[1],xt,1e8),Oe.vao.bind(),Oe.vao.draw(fe.TRIANGLES,Oe.vertexCount),Oe.lineWidth>0&&(fe.lineWidth(Oe.lineWidth*me),Oe.vao.draw(fe.LINES,Oe.lineVertexCount,Oe.vertexCount)),Oe.vao.unbind()}}var ze=[-1e8,-1e8,-1e8],Ce=[1e8,1e8,1e8],he=[ze,Ce];function te(Me,Oe,Re,me,Be,fe,Ze){var et=Re.gl;if((fe===Re.projectHasAlpha||Ze)&&be(Oe,Re,me,Be),fe===Re.hasAlpha||Ze){Me.bind();var gt=Me.uniforms;gt.model=me.model||x,gt.view=me.view||x,gt.projection=me.projection||x,z[0]=2/et.drawingBufferWidth,z[1]=2/et.drawingBufferHeight,gt.screenSize=z,gt.highlightId=Re.highlightId,gt.highlightScale=Re.highlightScale,gt.fragClipBounds=he,gt.clipBounds=Re.axes.bounds,gt.opacity=Re.opacity,gt.pickGroup=Re.pickId/255,gt.pixelRatio=Be,Re.vao.bind(),Re.vao.draw(et.TRIANGLES,Re.vertexCount),Re.lineWidth>0&&(et.lineWidth(Re.lineWidth*Be),Re.vao.draw(et.LINES,Re.lineVertexCount,Re.vertexCount)),Re.vao.unbind()}}v.draw=function(Me){var Oe=this.useOrtho?this.orthoShader:this.shader;te(Oe,this.projectShader,this,Me,this.pixelRatio,!1,!1)},v.drawTransparent=function(Me){var Oe=this.useOrtho?this.orthoShader:this.shader;te(Oe,this.projectShader,this,Me,this.pixelRatio,!0,!1)},v.drawPick=function(Me){var Oe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;te(Oe,this.pickProjectShader,this,Me,1,!0,!0)},v.pick=function(Me){if(!Me||Me.id!==this.pickId)return null;var Oe=Me.value[2]+(Me.value[1]<<8)+(Me.value[0]<<16);if(Oe>=this.pointCount||Oe<0)return null;var Re=this.points[Oe],me=this._selectResult;me.index=Oe;for(var Be=0;Be<3;++Be)me.position[Be]=me.dataCoordinate[Be]=Re[Be];return me},v.highlight=function(Me){if(!Me)this.highlightId=[1,1,1,1];else{var Oe=Me.index,Re=Oe&255,me=Oe>>8&255,Be=Oe>>16&255;this.highlightId=[Re/255,me/255,Be/255,0]}};function ke(Me,Oe,Re,me){var Be;E(Me)?Oe<Me.length?Be=Me[Oe]:Be=void 0:Be=Me,Be=p(Be);var fe=!0;s(Be)&&(Be="\u25BC",fe=!1),Re||(Re={});var Ze=Re.family;E(Ze)&&(Ze=Ze[Oe]),Ze||(Ze="normal");var et=Re.weight;E(et)&&(et=et[Oe]),et||(et="normal");var gt=Re.style;E(gt)&&(gt=gt[Oe]),gt||(gt="normal");var Pt=Re.variant;E(Pt)&&(Pt=Pt[Oe]),Pt||(Pt="normal");var Qe=d(Be,{family:Ze,weight:et,style:gt,variant:Pt},me),Qe=d(Be,Re,me);return{mesh:Qe[0],lines:Qe[1],bounds:Qe[2],visible:fe}}v.update=function(Me){if(Me=Me||{},"perspective"in Me&&(this.useOrtho=!Me.perspective),"orthographic"in Me&&(this.useOrtho=!!Me.orthographic),"lineWidth"in Me&&(this.lineWidth=Me.lineWidth),"project"in Me)if(E(Me.project))this.axesProject=Me.project;else{var Oe=!!Me.project;this.axesProject=[Oe,Oe,Oe]}if("projectScale"in Me)if(E(Me.projectScale))this.projectScale=Me.projectScale.slice();else{var Re=+Me.projectScale;this.projectScale=[Re,Re,Re]}if(this.projectHasAlpha=!1,"projectOpacity"in Me){if(E(Me.projectOpacity))this.projectOpacity=Me.projectOpacity.slice();else{var Re=+Me.projectOpacity;this.projectOpacity=[Re,Re,Re]}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 Me&&(this.opacity=C(Me.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var Be=Me.position,fe={family:Me.font||"normal",style:Me.fontStyle||"normal",weight:Me.fontWeight||"normal",variant:Me.fontVariant||"normal"},Ze=Me.alignment||[0,0],et,gt;if(Ze.length===2)et=Ze[0],gt=Ze[1];else{et=[],gt=[];for(var me=0;me<Ze.length;++me)et[me]=Ze[me][0],gt[me]=Ze[me][1]}var Pt=[1/0,1/0,1/0],Qe=[-1/0,-1/0,-1/0],Xe=Me.glyph,Tt=Me.color,xt=Me.size,_t=Me.angle,Ct=Me.lineColor,jt=-1,At=0,Te=0,nt=0;if(Be.length){nt=Be.length;e:for(var me=0;me<nt;++me){for(var ut=Be[me],ct=0;ct<3;++ct)if(isNaN(ut[ct])||!isFinite(ut[ct]))continue e;var rt=ke(Xe,me,fe,this.pixelRatio),je=rt.mesh,tt=rt.lines,Je=rt.bounds;At+=je.cells.length*3,Te+=tt.edges.length*2}}var Mt=At+Te,Vt=f.mallocFloat(3*Mt),Kt=f.mallocFloat(4*Mt),ir=f.mallocFloat(2*Mt),fr=f.mallocUint32(Mt);if(Mt>0){var Ot=0,De=At,_e=[0,0,0,1],Fe=[0,0,0,1],Pe=E(Tt)&&E(Tt[0]),Ie=E(Ct)&&E(Ct[0]);e:for(var me=0;me<nt;++me){jt+=1;for(var ut=Be[me],ct=0;ct<3;++ct){if(isNaN(ut[ct])||!isFinite(ut[ct]))continue e;Qe[ct]=Math.max(Qe[ct],ut[ct]),Pt[ct]=Math.min(Pt[ct],ut[ct])}var rt=ke(Xe,me,fe,this.pixelRatio),je=rt.mesh,tt=rt.lines,Je=rt.bounds,lt=rt.visible;if(!lt)_e=[1,1,1,0];else if(E(Tt)){var ye;if(Pe?me<Tt.length?ye=Tt[me]:ye=[0,0,0,0]:ye=Tt,ye.length===3){for(var ct=0;ct<3;++ct)_e[ct]=ye[ct];_e[3]=1}else if(ye.length===4){for(var ct=0;ct<4;++ct)_e[ct]=ye[ct];!this.hasAlpha&&ye[3]<1&&(this.hasAlpha=!0)}}else _e[0]=_e[1]=_e[2]=0,_e[3]=1;if(!lt)Fe=[1,1,1,0];else if(E(Ct)){var ye;if(Ie?me<Ct.length?ye=Ct[me]:ye=[0,0,0,0]:ye=Ct,ye.length===3){for(var ct=0;ct<3;++ct)Fe[ct]=ye[ct];Fe[ct]=1}else if(ye.length===4){for(var ct=0;ct<4;++ct)Fe[ct]=ye[ct];!this.hasAlpha&&ye[3]<1&&(this.hasAlpha=!0)}}else Fe[0]=Fe[1]=Fe[2]=0,Fe[3]=1;var ue=.5;lt?E(xt)?me<xt.length?ue=+xt[me]:ue=12:xt?ue=+xt:this.useOrtho&&(ue=12):ue=0;var de=0;E(_t)?me<_t.length?de=+_t[me]:de=0:_t&&(de=+_t);for(var ht=Math.cos(de),Et=Math.sin(de),ut=Be[me],ct=0;ct<3;++ct)Qe[ct]=Math.max(Qe[ct],ut[ct]),Pt[ct]=Math.min(Pt[ct],ut[ct]);var St=et,Zt=gt,St=0;E(et)?me<et.length?St=et[me]:St=0:et&&(St=et);var Zt=0;E(gt)?me<gt.length?Zt=gt[me]:Zt=0:gt&&(Zt=gt),St*=St>0?1-Je[0][0]:St<0?1+Je[1][0]:1,Zt*=Zt>0?1-Je[0][1]:Zt<0?1+Je[1][1]:1;for(var qr=[St,Zt],Ei=je.cells||[],Si=je.positions||[],ct=0;ct<Ei.length;++ct)for(var Lr=Ei[ct],vr=0;vr<3;++vr){for(var Er=0;Er<3;++Er)Vt[3*Ot+Er]=ut[Er];for(var Er=0;Er<4;++Er)Kt[4*Ot+Er]=_e[Er];fr[Ot]=jt;var si=Si[Lr[vr]];ir[2*Ot]=ue*(ht*si[0]-Et*si[1]+qr[0]),ir[2*Ot+1]=ue*(Et*si[0]+ht*si[1]+qr[1]),Ot+=1}for(var Ei=tt.edges,Si=tt.positions,ct=0;ct<Ei.length;++ct)for(var Lr=Ei[ct],vr=0;vr<2;++vr){for(var Er=0;Er<3;++Er)Vt[3*De+Er]=ut[Er];for(var Er=0;Er<4;++Er)Kt[4*De+Er]=Fe[Er];fr[De]=jt;var si=Si[Lr[vr]];ir[2*De]=ue*(ht*si[0]-Et*si[1]+qr[0]),ir[2*De+1]=ue*(Et*si[0]+ht*si[1]+qr[1]),De+=1}}}this.bounds=[Pt,Qe],this.points=Be,this.pointCount=Be.length,this.vertexCount=At,this.lineVertexCount=Te,this.pointBuffer.update(Vt),this.colorBuffer.update(Kt),this.glyphBuffer.update(ir),this.idBuffer.update(fr),f.free(Vt),f.free(Kt),f.free(ir),f.free(fr)},v.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(Me){var Oe=Me.gl,Re=h.createPerspective(Oe),me=h.createOrtho(Oe),Be=h.createProject(Oe),fe=h.createPickPerspective(Oe),Ze=h.createPickOrtho(Oe),et=h.createPickProject(Oe),gt=u(Oe),Pt=u(Oe),Qe=u(Oe),Xe=u(Oe),Tt=l(Oe,[{buffer:gt,size:3,type:Oe.FLOAT},{buffer:Pt,size:4,type:Oe.FLOAT},{buffer:Qe,size:2,type:Oe.FLOAT},{buffer:Xe,size:4,type:Oe.UNSIGNED_BYTE,normalized:!0}]),xt=new M(Oe,Re,me,Be,gt,Pt,Qe,Xe,Tt,fe,Ze,et);return xt.update(Me),xt}},3589:function(i,a,o){"use strict";i.exports=x;var s=o(2260),u=o(1888),l=o(9618),f=o(8828).nextPow2,c=function(b,y,k){for(var E=1e8,A=-1,L=-1,_=b.shape[0],C=b.shape[1],M=0;M<_;M++)for(var v=0;v<C;v++){var z=b.get(M,v,0),T=b.get(M,v,1),F=b.get(M,v,2),q=b.get(M,v,3);if(z<255||T<255||F<255||q<255){var U=y-M,H=k-v,j=U*U+H*H;j<E&&(E=j,A=M,L=v)}}return[A,L,E]};function h(b,y,k,E,A){this.coord=[b,y],this.id=k,this.value=E,this.distance=A}function d(b,y,k){this.gl=b,this.fbo=y,this.buffer=k,this._readTimeout=null;var E=this;this._readCallback=function(){E.gl&&(y.bind(),b.readPixels(0,0,y.shape[0],y.shape[1],b.RGBA,b.UNSIGNED_BYTE,E.buffer),E._readTimeout=null)}}var p=d.prototype;Object.defineProperty(p,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(b){if(this.gl){this.fbo.shape=b;var y=this.fbo.shape[0],k=this.fbo.shape[1];if(k*y*4>this.buffer.length){u.free(this.buffer);for(var E=this.buffer=u.mallocUint8(f(k*y*4)),A=0;A<k*y*4;++A)E[A]=255}return b}}}),p.begin=function(){var b=this.gl,y=this.shape;b&&(this.fbo.bind(),b.clearColor(1,1,1,1),b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT))},p.end=function(){var b=this.gl;b&&(b.bindFramebuffer(b.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},p.query=function(b,y,k){if(!this.gl)return null;var E=this.fbo.shape.slice();b=b|0,y=y|0,typeof k!="number"&&(k=1);var A=Math.min(Math.max(b-k,0),E[0])|0,L=Math.min(Math.max(b+k,0),E[0])|0,_=Math.min(Math.max(y-k,0),E[1])|0,C=Math.min(Math.max(y+k,0),E[1])|0;if(L<=A||C<=_)return null;var M=[L-A,C-_],v=l(this.buffer,[M[0],M[1],4],[4,E[0]*4,1],4*(A+E[0]*_)),z=c(v.hi(M[0],M[1],1),k,k),T=z[0],F=z[1];if(T<0||Math.pow(this.radius,2)<z[2])return null;var q=v.get(T,F,0),U=v.get(T,F,1),H=v.get(T,F,2),j=v.get(T,F,3);return new h(T+A|0,F+_|0,q,[U,H,j],Math.sqrt(z[2]))},p.dispose=function(){this.gl&&(this.fbo.dispose(),u.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function x(b,y){var k=y[0],E=y[1],A={},L=s(b,k,E,A),_=u.mallocUint8(k*E*4);return new d(b,L,_)}},9405:function(i,a,o){"use strict";var s=o(3327),u=o(8731),l=o(216),f=o(5091),c=o(2145),h=o(8866);function d(y){this.gl=y,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var p=d.prototype;p.bind=function(){this.program||this._relink();var y,k=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),E=this.gl.lastAttribCount;if(k>E)for(y=E;y<k;y++)this.gl.enableVertexAttribArray(y);else if(E>k)for(y=k;y<E;y++)this.gl.disableVertexAttribArray(y);this.gl.lastAttribCount=k,this.gl.useProgram(this.program)},p.dispose=function(){for(var y=this.gl.lastAttribCount,k=0;k<y;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 x(y,k){return y.name<k.name?-1:1}p.update=function(y,k,E,A){if(!k||arguments.length===1){var L=y;y=L.vertex,k=L.fragment,E=L.uniforms,A=L.attributes}var _=this,C=_.gl,M=_._vref;_._vref=f.shader(C,C.VERTEX_SHADER,y),M&&M.dispose(),_.vertShader=_._vref.shader;var v=this._fref;if(_._fref=f.shader(C,C.FRAGMENT_SHADER,k),v&&v.dispose(),_.fragShader=_._fref.shader,!E||!A){var z=C.createProgram();if(C.attachShader(z,_.fragShader),C.attachShader(z,_.vertShader),C.linkProgram(z),!C.getProgramParameter(z,C.LINK_STATUS)){var T=C.getProgramInfoLog(z);throw new h(T,"Error linking program:"+T)}E=E||c.uniforms(C,z),A=A||c.attributes(C,z),C.deleteProgram(z)}A=A.slice(),A.sort(x);var F=[],q=[],U=[],H;for(H=0;H<A.length;++H){var j=A[H];if(j.type.indexOf("mat")>=0){for(var G=j.type.charAt(j.type.length-1)|0,O=new Array(G),W=0;W<G;++W)O[W]=U.length,q.push(j.name+"["+W+"]"),typeof j.location=="number"?U.push(j.location+W):Array.isArray(j.location)&&j.location.length===G&&typeof j.location[W]=="number"?U.push(j.location[W]|0):U.push(-1);F.push({name:j.name,type:j.type,locations:O})}else F.push({name:j.name,type:j.type,locations:[U.length]}),q.push(j.name),typeof j.location=="number"?U.push(j.location|0):U.push(-1)}var re=0;for(H=0;H<U.length;++H)if(U[H]<0){for(;U.indexOf(re)>=0;)re+=1;U[H]=re}var ne=new Array(E.length);function be(){_.program=f.program(C,_._vref,_._fref,q,U);for(var ze=0;ze<E.length;++ze)ne[ze]=C.getUniformLocation(_.program,E[ze].name)}be(),_._relink=be,_.types={uniforms:l(E),attributes:l(A)},_.attributes=u(C,_,F,U),Object.defineProperty(_,"uniforms",s(C,_,E,ne))};function b(y,k,E,A,L){var _=new d(y);return _.update(k,E,A,L),_}i.exports=b},8866:function(i){function a(o,s,u){this.shortMessage=s||"",this.longMessage=u||"",this.rawError=o||"",this.message="gl-shader: "+(s||o||"")+(u?`
`+u:""),this.stack=new Error().stack}a.prototype=new Error,a.prototype.name="GLError",a.prototype.constructor=a,i.exports=a},8731:function(i,a,o){"use strict";i.exports=d;var s=o(8866);function u(p,x,b,y,k,E){this._gl=p,this._wrapper=x,this._index=b,this._locations=y,this._dimension=k,this._constFunc=E}var l=u.prototype;l.pointer=function(x,b,y,k){var E=this,A=E._gl,L=E._locations[E._index];A.vertexAttribPointer(L,E._dimension,x||A.FLOAT,!!b,y||0,k||0),A.enableVertexAttribArray(L)},l.set=function(p,x,b,y){return this._constFunc(this._locations[this._index],p,x,b,y)},Object.defineProperty(l,"location",{get:function(){return this._locations[this._index]},set:function(p){return p!==this._locations[this._index]&&(this._locations[this._index]=p|0,this._wrapper.program=null),p|0}});var f=[function(p,x,b){return b.length===void 0?p.vertexAttrib1f(x,b):p.vertexAttrib1fv(x,b)},function(p,x,b,y){return b.length===void 0?p.vertexAttrib2f(x,b,y):p.vertexAttrib2fv(x,b)},function(p,x,b,y,k){return b.length===void 0?p.vertexAttrib3f(x,b,y,k):p.vertexAttrib3fv(x,b)},function(p,x,b,y,k,E){return b.length===void 0?p.vertexAttrib4f(x,b,y,k,E):p.vertexAttrib4fv(x,b)}];function c(p,x,b,y,k,E,A){var L=f[k],_=new u(p,x,b,y,k,L);Object.defineProperty(E,A,{set:function(C){return p.disableVertexAttribArray(y[b]),L(p,y[b],C),C},get:function(){return _},enumerable:!0})}function h(p,x,b,y,k,E,A){for(var L=new Array(k),_=new Array(k),C=0;C<k;++C)c(p,x,b[C],y,k,L,C),_[C]=L[C];Object.defineProperty(L,"location",{set:function(z){if(Array.isArray(z))for(var T=0;T<k;++T)_[T].location=z[T];else for(var T=0;T<k;++T)_[T].location=z+T;return z},get:function(){for(var z=new Array(k),T=0;T<k;++T)z[T]=y[b[T]];return z},enumerable:!0}),L.pointer=function(z,T,F,q){z=z||p.FLOAT,T=!!T,F=F||k*k,q=q||0;for(var U=0;U<k;++U){var H=y[b[U]];p.vertexAttribPointer(H,k,z,T,F,q+U*k),p.enableVertexAttribArray(H)}};var M=new Array(k),v=p["vertexAttrib"+k+"fv"];Object.defineProperty(E,A,{set:function(z){for(var T=0;T<k;++T){var F=y[b[T]];if(p.disableVertexAttribArray(F),Array.isArray(z[0]))v.call(p,F,z[T]);else{for(var q=0;q<k;++q)M[q]=z[k*T+q];v.call(p,F,M)}}return z},get:function(){return L},enumerable:!0})}function d(p,x,b,y){for(var k={},E=0,A=b.length;E<A;++E){var L=b[E],_=L.name,C=L.type,M=L.locations;switch(C){case"bool":case"int":case"float":c(p,x,M[0],y,1,k,_);break;default:if(C.indexOf("vec")>=0){var v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new s("","Invalid data type for attribute "+_+": "+C);c(p,x,M[0],y,v,k,_)}else if(C.indexOf("mat")>=0){var v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new s("","Invalid data type for attribute "+_+": "+C);h(p,x,M,y,v,k,_)}else throw new s("","Unknown data type for attribute "+_+": "+C);break}}return k}},3327:function(i,a,o){"use strict";var s=o(216),u=o(8866);i.exports=c;function l(h){return function(){return h}}function f(h,d){for(var p=new Array(h),x=0;x<h;++x)p[x]=d;return p}function c(h,d,p,x){function b(C){return function(M,v,z){return M.getUniform(v.program,z[C])}}function y(C){return function(v){for(var z=k("",C),T=0;T<z.length;++T){var F=z[T],q=F[0],U=F[1];if(x[U]){var H=v;if(typeof q=="string"&&(q.indexOf(".")===0||q.indexOf("[")===0)){var j=q;if(q.indexOf(".")===0&&(j=q.slice(1)),j.indexOf("]")===j.length-1){var G=j.indexOf("["),O=j.slice(0,G),W=j.slice(G+1,j.length-1);H=O?v[O][W]:v[W]}else H=v[j]}var re=p[U].type,ne;switch(re){case"bool":case"int":case"sampler2D":case"samplerCube":h.uniform1i(x[U],H);break;case"float":h.uniform1f(x[U],H);break;default:var be=re.indexOf("vec");if(0<=be&&be<=1&&re.length===4+be){if(ne=re.charCodeAt(re.length-1)-48,ne<2||ne>4)throw new u("","Invalid data type");switch(re.charAt(0)){case"b":case"i":h["uniform"+ne+"iv"](x[U],H);break;case"v":h["uniform"+ne+"fv"](x[U],H);break;default:throw new u("","Unrecognized data type for vector "+name+": "+re)}}else if(re.indexOf("mat")===0&&re.length===4){if(ne=re.charCodeAt(re.length-1)-48,ne<2||ne>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+re);h["uniformMatrix"+ne+"fv"](x[U],!1,H);break}else throw new u("","Unknown uniform data type for "+name+": "+re)}}}}}function k(C,M){if(typeof M!="object")return[[C,M]];var v=[];for(var z in M){var T=M[z],F=C;parseInt(z)+""===z?F+="["+z+"]":F+="."+z,typeof T=="object"?v.push.apply(v,k(F,T)):v.push([F,T])}return v}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 v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new u("","Invalid data type");return C.charAt(0)==="b"?f(v,!1):f(v,0)}else if(C.indexOf("mat")===0&&C.length===4){var v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+C);return f(v*v,0)}else throw new u("","Unknown uniform data type for "+name+": "+C)}}function A(C,M,v){if(typeof v=="object"){var z=L(v);Object.defineProperty(C,M,{get:l(z),set:y(v),enumerable:!0,configurable:!1})}else x[v]?Object.defineProperty(C,M,{get:b(v),set:y(v),enumerable:!0,configurable:!1}):C[M]=E(p[v].type)}function L(C){var M;if(Array.isArray(C)){M=new Array(C.length);for(var v=0;v<C.length;++v)A(M,v,C[v])}else{M={};for(var z in C)A(M,z,C[z])}return M}var _=s(p,!0);return{get:l(L(_)),set:y(_),enumerable:!0,configurable:!0}}},216:function(i){"use strict";i.exports=a;function a(o,s){for(var u={},l=0;l<o.length;++l)for(var f=o[l].name,c=f.split("."),h=u,d=0;d<c.length;++d){var p=c[d].split("[");if(p.length>1){p[0]in h||(h[p[0]]=[]),h=h[p[0]];for(var x=1;x<p.length;++x){var b=parseInt(p[x]);x<p.length-1||d<c.length-1?(b in h||(x<p.length-1?h[b]=[]:h[b]={}),h=h[b]):s?h[b]=l:h[b]=o[l].type}}else d<c.length-1?(p[0]in h||(h[p[0]]={}),h=h[p[0]]):s?h[p[0]]=l:h[p[0]]=o[l].type}return u}},2145:function(i,a){"use strict";a.uniforms=l,a.attributes=f;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 u(c,h){if(!s){var d=Object.keys(o);s={};for(var p=0;p<d.length;++p){var x=d[p];s[c[x]]=o[x]}}return s[h]}function l(c,h){for(var d=c.getProgramParameter(h,c.ACTIVE_UNIFORMS),p=[],x=0;x<d;++x){var b=c.getActiveUniform(h,x);if(b){var y=u(c,b.type);if(b.size>1)for(var k=0;k<b.size;++k)p.push({name:b.name.replace("[0]","["+k+"]"),type:y});else p.push({name:b.name,type:y})}}return p}function f(c,h){for(var d=c.getProgramParameter(h,c.ACTIVE_ATTRIBUTES),p=[],x=0;x<d;++x){var b=c.getActiveAttrib(h,x);b&&p.push({name:b.name,type:u(c,b.type)})}return p}},5091:function(i,a,o){"use strict";a.shader=k,a.program=E;var s=o(8866),u=o(2992),l=typeof WeakMap=="undefined"?o(606):WeakMap,f=new l,c=0;function h(A,L,_,C,M,v,z){this.id=A,this.src=L,this.type=_,this.shader=C,this.count=v,this.programs=[],this.cache=z}h.prototype.dispose=function(){if(--this.count===0){for(var A=this.cache,L=A.gl,_=this.programs,C=0,M=_.length;C<M;++C){var v=A.programs[_[C]];v&&(delete A.programs[C],L.deleteProgram(v))}L.deleteShader(this.shader),delete A.shaders[this.type===L.FRAGMENT_SHADER|0][this.src]}};function d(A){this.gl=A,this.shaders=[{},{}],this.programs={}}var p=d.prototype;function x(A,L,_){var C=A.createShader(L);if(A.shaderSource(C,_),A.compileShader(C),!A.getShaderParameter(C,A.COMPILE_STATUS)){var M=A.getShaderInfoLog(C);try{var v=u(M,_,L)}catch(z){throw console.warn("Failed to format compiler error: "+z),new s(M,`Error compiling shader:
`+M)}throw new s(M,v.short,v.long)}return C}p.getShaderReference=function(A,L){var _=this.gl,C=this.shaders[A===_.FRAGMENT_SHADER|0],M=C[L];if(!M||!_.isShader(M.shader)){var v=x(_,A,L);M=C[L]=new h(c++,L,A,v,[],1,this)}else M.count+=1;return M};function b(A,L,_,C,M){var v=A.createProgram();A.attachShader(v,L),A.attachShader(v,_);for(var z=0;z<C.length;++z)A.bindAttribLocation(v,M[z],C[z]);if(A.linkProgram(v),!A.getProgramParameter(v,A.LINK_STATUS)){var T=A.getProgramInfoLog(v);throw new s(T,"Error linking program: "+T)}return v}p.getProgram=function(A,L,_,C){var M=[A.id,L.id,_.join(":"),C.join(":")].join("@"),v=this.programs[M];return(!v||!this.gl.isProgram(v))&&(this.programs[M]=v=b(this.gl,A.shader,L.shader,_,C),A.programs.push(M),L.programs.push(M)),v};function y(A){var L=f.get(A);return L||(L=new d(A),f.set(A,L)),L}function k(A,L,_){return y(A).getShaderReference(L,_)}function E(A,L,_,C,M){return y(A).getProgram(L,_,C,M)}},1493:function(i,a,o){"use strict";var s=o(3236),u=o(9405),l=s([`precision mediump float;
#define GLSLIFY 1

attribute vec3 position, color;
attribute float weight;

uniform mat4 model, view, projection;
uniform vec3 coordinates[3];
uniform vec4 colors[3];
uniform vec2 screenShape;
uniform float lineWidth;

varying vec4 fragColor;

void main() {
  vec3 vertexPosition = mix(coordinates[0],
    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));

  vec4 clipPos = projection * (view * (model * vec4(vertexPosition, 1.0)));
  vec2 clipOffset = (projection * (view * (model * vec4(color, 0.0)))).xy;
  vec2 delta = weight * clipOffset * screenShape;
  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;

  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);
  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];
}
`]),f=s([`precision mediump float;
#define GLSLIFY 1

varying vec4 fragColor;

void main() {
  gl_FragColor = fragColor;
}`]);i.exports=function(c){return u(c,l,f,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},4449:function(i,a,o){"use strict";var s=o(2762),u=o(8116),l=o(1493);i.exports=b;var f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(y,k,E,A){this.gl=y,this.buffer=k,this.vao=E,this.shader=A,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=c.prototype,d=[0,0,0],p=[0,0,0],x=[0,0];h.isTransparent=function(){return!1},h.drawTransparent=function(y){},h.draw=function(y){var k=this.gl,E=this.vao,A=this.shader;E.bind(),A.bind();var L=y.model||f,_=y.view||f,C=y.projection||f,M;this.axes&&(M=this.axes.lastCubeProps.axis);for(var v=d,z=p,T=0;T<3;++T)M&&M[T]<0?(v[T]=this.bounds[0][T],z[T]=this.bounds[1][T]):(v[T]=this.bounds[1][T],z[T]=this.bounds[0][T]);x[0]=k.drawingBufferWidth,x[1]=k.drawingBufferHeight,A.uniforms.model=L,A.uniforms.view=_,A.uniforms.projection=C,A.uniforms.coordinates=[this.position,v,z],A.uniforms.colors=this.colors,A.uniforms.screenShape=x;for(var T=0;T<3;++T)A.uniforms.lineWidth=this.lineWidth[T]*this.pixelRatio,this.enabled[T]&&(E.draw(k.TRIANGLES,6,6*T),this.drawSides[T]&&E.draw(k.TRIANGLES,12,18+12*T));E.unbind()},h.update=function(y){y&&("bounds"in y&&(this.bounds=y.bounds),"position"in y&&(this.position=y.position),"lineWidth"in y&&(this.lineWidth=y.lineWidth),"colors"in y&&(this.colors=y.colors),"enabled"in y&&(this.enabled=y.enabled),"drawSides"in y&&(this.drawSides=y.drawSides))},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function b(y,k){var E=[];function A(v,z,T,F,q,U){var H=[v,z,T,0,0,0,1];H[F+3]=1,H[F]=q,E.push.apply(E,H),H[6]=-1,E.push.apply(E,H),H[F]=U,E.push.apply(E,H),E.push.apply(E,H),H[6]=1,E.push.apply(E,H),H[F]=q,E.push.apply(E,H)}A(0,0,0,0,0,1),A(0,0,0,1,0,1),A(0,0,0,2,0,1),A(1,0,0,1,-1,1),A(1,0,0,2,-1,1),A(0,1,0,0,-1,1),A(0,1,0,2,-1,1),A(0,0,1,0,-1,1),A(0,0,1,1,-1,1);var L=s(y,E),_=u(y,[{type:y.FLOAT,buffer:L,size:3,offset:0,stride:28},{type:y.FLOAT,buffer:L,size:3,offset:12,stride:28},{type:y.FLOAT,buffer:L,size:1,offset:24,stride:28}]),C=l(y);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.weight.location=2;var M=new c(y,L,_,C);return M.update(k),M}},6740:function(i,a,o){var s=o(3236),u=s([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // 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).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the tube vertex and normal at the given index.
//
// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
//
// Each tube segment is made up of a ring of vertices.
// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
// The indexes of tube segments run from 0 to 8.
//
vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
  float segmentCount = 8.0;

  float angle = 2.0 * 3.14159 * (index / segmentCount);

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d);
  vec3 y = v * sin(angle) * length(d);
  vec3 v3 = x + y;

  normal = normalize(v3);

  return v3;
}

attribute vec4 vector;
attribute vec4 color, position;
attribute vec2 uv;

uniform float vectorScale, tubeScale;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 eyePosition, lightPosition;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  // Scale the vector magnitude to stay constant with
  // model & view changes.
  vec3 normal;
  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);
  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * tubePosition;
  cameraCoordinate.xyz /= cameraCoordinate.w;
  f_lightDirection = lightPosition - cameraCoordinate.xyz;
  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);

  // vec4 m_position  = model * vec4(tubePosition, 1.0);
  vec4 t_position  = view * tubePosition;
  gl_Position      = projection * t_position;

  f_color          = color;
  f_data           = tubePosition.xyz;
  f_position       = position.xyz;
  f_uv             = uv;
}
`]),l=s([`#extension GL_OES_standard_derivatives : enable

precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float cookTorranceSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness,
  float fresnel) {

  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);

  //Half angle vector
  vec3 H = normalize(lightDirection + viewDirection);

  //Geometric term
  float NdotH = max(dot(surfaceNormal, H), 0.0);
  float VdotH = max(dot(viewDirection, H), 0.000001);
  float LdotH = max(dot(lightDirection, H), 0.000001);
  float G1 = (2.0 * NdotH * VdotN) / VdotH;
  float G2 = (2.0 * NdotH * LdotN) / LdotH;
  float G = min(1.0, min(G1, G2));
  
  //Distribution term
  float D = beckmannDistribution(NdotH, roughness);

  //Fresnel term
  float F = pow(1.0 - VdotN, fresnel);

  //Multiply terms and done
  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform sampler2D texture;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
  vec3 N = normalize(f_normal);
  vec3 L = normalize(f_lightDirection);
  vec3 V = normalize(f_eyeDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  vec4 surfaceColor = f_color * texture2D(texture, f_uv);
  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = litColor * opacity;
}
`]),f=s([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // 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).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the tube vertex and normal at the given index.
//
// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
//
// Each tube segment is made up of a ring of vertices.
// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
// The indexes of tube segments run from 0 to 8.
//
vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
  float segmentCount = 8.0;

  float angle = 2.0 * 3.14159 * (index / segmentCount);

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d);
  vec3 y = v * sin(angle) * length(d);
  vec3 v3 = x + y;

  normal = normalize(v3);

  return v3;
}

attribute vec4 vector;
attribute vec4 position;
attribute vec4 id;

uniform mat4 model, view, projection;
uniform float tubeScale;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  vec3 normal;
  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);
  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);

  gl_Position = projection * (view * tubePosition);
  f_id        = id;
  f_position  = position.xyz;
}
`]),c=s([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3  clipBounds[2];
uniform float pickId;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;

  gl_FragColor = vec4(pickId, f_id.xyz);
}`]);a.meshShader={vertex:u,fragment:l,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},a.pickShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(i,a,o){"use strict";var s=o(2931),u=o(9970),l=["xyz","xzy","yxz","yzx","zxy","zyx"],f=function(A,L,_,C){for(var M=A.points,v=A.velocities,z=A.divergences,T=[],F=[],q=[],U=[],H=[],j=[],G=0,O=0,W=u.create(),re=u.create(),ne=8,be=0;be<M.length;be++){var ze=M[be],Ce=v[be],he=z[be];L===0&&(he=_*.05),O=s.length(Ce)/C,W=u.create(),s.copy(W,Ce),W[3]=he;for(var te=0;te<ne;te++)H[te]=[ze[0],ze[1],ze[2],te];if(U.length>0)for(var te=0;te<ne;te++){var ke=(te+1)%ne;T.push(U[te],H[te],H[ke],H[ke],U[ke],U[te]),q.push(re,W,W,W,re,re),j.push(G,O,O,O,G,G);var Ee=T.length;F.push([Ee-6,Ee-5,Ee-4],[Ee-3,Ee-2,Ee-1])}var Me=U;U=H,H=Me;var Oe=re;re=W,W=Oe;var Re=G;G=O,O=Re}return{positions:T,cells:F,vectors:q,vertexIntensity:j}},c=function(A,L,_,C){for(var M=0,v=0;v<A.length;v++)for(var z=A[v].velocities,T=0;T<z.length;T++)M=Math.max(M,s.length(z[T]));for(var F=A.map(function(be){return f(be,_,C,M)}),q=[],U=[],H=[],j=[],v=0;v<F.length;v++){var G=F[v],O=q.length;q=q.concat(G.positions),H=H.concat(G.vectors),j=j.concat(G.vertexIntensity);for(var T=0;T<G.cells.length;T++){var W=G.cells[T],re=[];U.push(re);for(var ne=0;ne<W.length;ne++)re.push(W[ne]+O)}}return{positions:q,cells:U,vectors:H,vertexIntensity:j,colormap:L}},h=function(A,L){var _=A.length,C;for(C=0;C<_;C++){var M=A[C];if(M===L)return C;if(M>L)return C-1}return C},d=function(A,L,_){return A<L?L:A>_?_:A},p=function(A,L,_){var C=L.vectors,M=L.meshgrid,v=A[0],z=A[1],T=A[2],F=M[0].length,q=M[1].length,U=M[2].length,H=h(M[0],v),j=h(M[1],z),G=h(M[2],T),O=H+1,W=j+1,re=G+1;if(H=d(H,0,F-1),O=d(O,0,F-1),j=d(j,0,q-1),W=d(W,0,q-1),G=d(G,0,U-1),re=d(re,0,U-1),H<0||j<0||G<0||O>F-1||W>q-1||re>U-1)return s.create();var ne=M[0][H],be=M[0][O],ze=M[1][j],Ce=M[1][W],he=M[2][G],te=M[2][re],ke=(v-ne)/(be-ne),Ee=(z-ze)/(Ce-ze),Me=(T-he)/(te-he);isFinite(ke)||(ke=.5),isFinite(Ee)||(Ee=.5),isFinite(Me)||(Me=.5);var Oe,Re,me,Be,fe,Ze;switch(_.reversedX&&(H=F-1-H,O=F-1-O),_.reversedY&&(j=q-1-j,W=q-1-W),_.reversedZ&&(G=U-1-G,re=U-1-re),_.filled){case 5:fe=G,Ze=re,me=j*U,Be=W*U,Oe=H*U*q,Re=O*U*q;break;case 4:fe=G,Ze=re,Oe=H*U,Re=O*U,me=j*U*F,Be=W*U*F;break;case 3:me=j,Be=W,fe=G*q,Ze=re*q,Oe=H*q*U,Re=O*q*U;break;case 2:me=j,Be=W,Oe=H*q,Re=O*q,fe=G*q*F,Ze=re*q*F;break;case 1:Oe=H,Re=O,fe=G*F,Ze=re*F,me=j*F*U,Be=W*F*U;break;default:Oe=H,Re=O,me=j*F,Be=W*F,fe=G*F*q,Ze=re*F*q;break}var et=C[Oe+me+fe],gt=C[Oe+me+Ze],Pt=C[Oe+Be+fe],Qe=C[Oe+Be+Ze],Xe=C[Re+me+fe],Tt=C[Re+me+Ze],xt=C[Re+Be+fe],_t=C[Re+Be+Ze],Ct=s.create(),jt=s.create(),At=s.create(),Te=s.create();s.lerp(Ct,et,Xe,ke),s.lerp(jt,gt,Tt,ke),s.lerp(At,Pt,xt,ke),s.lerp(Te,Qe,_t,ke);var nt=s.create(),ut=s.create();s.lerp(nt,Ct,At,Ee),s.lerp(ut,jt,Te,Ee);var ct=s.create();return s.lerp(ct,nt,ut,Me),ct},x=function(A,L){var _=L[0],C=L[1],M=L[2];return A[0]=_<0?-_:_,A[1]=C<0?-C:C,A[2]=M<0?-M:M,A},b=function(A){var L=1/0;A.sort(function(v,z){return v-z});for(var _=A.length,C=1;C<_;C++){var M=Math.abs(A[C]-A[C-1]);M<L&&(L=M)}return L},y=function(A){for(var L=[],_=[],C=[],M={},v={},z={},T=A.length,F=0;F<T;F++){var q=A[F],U=q[0],H=q[1],j=q[2];M[U]||(L.push(U),M[U]=!0),v[H]||(_.push(H),v[H]=!0),z[j]||(C.push(j),z[j]=!0)}var G=b(L),O=b(_),W=b(C),re=Math.min(G,O,W);return isFinite(re)?re:1};i.exports=function(A,L){var _=A.startingPositions,C=A.maxLength||1e3,M=A.tubeSize||1,v=A.absoluteTubeSize,z=A.gridFill||"+x+y+z",T={};z.indexOf("-x")!==-1&&(T.reversedX=!0),z.indexOf("-y")!==-1&&(T.reversedY=!0),z.indexOf("-z")!==-1&&(T.reversedZ=!0),T.filled=l.indexOf(z.replace(/-/g,"").replace(/\+/g,""));var F=A.getVelocity||function(Tt){return p(Tt,A,T)},q=A.getDivergence||function(Tt,xt){var _t=s.create(),Ct=1e-4;s.add(_t,Tt,[Ct,0,0]);var jt=F(_t);s.subtract(jt,jt,xt),s.scale(jt,jt,1/Ct),s.add(_t,Tt,[0,Ct,0]);var At=F(_t);s.subtract(At,At,xt),s.scale(At,At,1/Ct),s.add(_t,Tt,[0,0,Ct]);var Te=F(_t);return s.subtract(Te,Te,xt),s.scale(Te,Te,1/Ct),s.add(_t,jt,At),s.add(_t,_t,Te),_t},U=[],H=L[0][0],j=L[0][1],G=L[0][2],O=L[1][0],W=L[1][1],re=L[1][2],ne=function(Tt){var xt=Tt[0],_t=Tt[1],Ct=Tt[2];return!(xt<H||xt>O||_t<j||_t>W||Ct<G||Ct>re)},be=s.distance(L[0],L[1]),ze=10*be/C,Ce=ze*ze,he=1,te=0,ke=_.length;ke>1&&(he=y(_));for(var Ee=0;Ee<ke;Ee++){var Me=s.create();s.copy(Me,_[Ee]);var Oe=[Me],Re=[],me=F(Me),Be=Me;Re.push(me);var fe=[],Ze=q(Me,me),et=s.length(Ze);isFinite(et)&&et>te&&(te=et),fe.push(et),U.push({points:Oe,velocities:Re,divergences:fe});for(var gt=0;gt<C*100&&Oe.length<C&&ne(Me);){gt++;var Pt=s.clone(me),Qe=s.squaredLength(Pt);if(Qe===0)break;if(Qe>Ce&&s.scale(Pt,Pt,ze/Math.sqrt(Qe)),s.add(Pt,Pt,Me),me=F(Pt),s.squaredDistance(Be,Pt)-Ce>-1e-4*Ce){Oe.push(Pt),Be=Pt,Re.push(me);var Ze=q(Pt,me),et=s.length(Ze);isFinite(et)&&et>te&&(te=et),fe.push(et)}Me=Pt}}var Xe=c(U,A.colormap,te,he);return v?Xe.tubeScale=v:(te===0&&(te=1),Xe.tubeScale=M*.5*he/te),Xe};var k=o(6740),E=o(6405).createMesh;i.exports.createTubeMesh=function(A,L){return E(A,L,{shaders:k,traceType:"streamtube"})}},990:function(i,a,o){var s=o(9405),u=o(3236),l=u([`precision highp float;
#define GLSLIFY 1

attribute vec4 uv;
attribute vec3 f;
attribute vec3 normal;

uniform vec3 objectOffset;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 lightPosition, eyePosition;
uniform sampler2D colormap;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;

void main() {
  vec3 localCoordinate = vec3(uv.zw, f.x);
  worldCoordinate = objectOffset + localCoordinate;
  mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));
  vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0);
  vec4 clipPosition = projection * (view * worldPosition);
  gl_Position = clipPosition;
  kill = f.y;
  value = f.z;
  planeCoordinate = uv.xy;

  vColor = texture2D(colormap, vec2(value, value));

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * worldPosition;
  cameraCoordinate.xyz /= cameraCoordinate.w;
  lightDirection = lightPosition - cameraCoordinate.xyz;
  eyeDirection   = eyePosition - cameraCoordinate.xyz;
  surfaceNormal  = normalize((vec4(normal,0) * inverseModel).xyz);
}
`]),f=u([`precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float beckmannSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness) {
  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 lowerBound, upperBound;
uniform float contourTint;
uniform vec4 contourColor;
uniform sampler2D colormap;
uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform float vertexColor;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;

void main() {
  if (
    kill > 0.0 ||
    vColor.a == 0.0 ||
    outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)
  ) discard;

  vec3 N = normalize(surfaceNormal);
  vec3 V = normalize(eyeDirection);
  vec3 L = normalize(lightDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = max(beckmannSpecular(L, V, N, roughness), 0.);
  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  //decide how to interpolate color \u2014 in vertex or in fragment
  vec4 surfaceColor =
    step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +
    step(.5, vertexColor) * vColor;

  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;
}
`]),c=u([`precision highp float;
#define GLSLIFY 1

attribute vec4 uv;
attribute float f;

uniform vec3 objectOffset;
uniform mat3 permutation;
uniform mat4 model, view, projection;
uniform float height, zOffset;
uniform sampler2D colormap;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;

void main() {
  vec3 dataCoordinate = permutation * vec3(uv.xy, height);
  worldCoordinate = objectOffset + dataCoordinate;
  mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));
  vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);

  vec4 clipPosition = projection * (view * worldPosition);
  clipPosition.z += zOffset;

  gl_Position = clipPosition;
  value = f + objectOffset.z;
  kill = -1.0;
  planeCoordinate = uv.zw;

  vColor = texture2D(colormap, vec2(value, value));

  //Don't do lighting for contours
  surfaceNormal   = vec3(1,0,0);
  eyeDirection    = vec3(0,1,0);
  lightDirection  = vec3(0,0,1);
}
`]),h=u([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec2 shape;
uniform vec3 clipBounds[2];
uniform float pickId;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 surfaceNormal;

vec2 splitFloat(float v) {
  float vh = 255.0 * v;
  float upper = floor(vh);
  float lower = fract(vh);
  return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);
}

void main() {
  if ((kill > 0.0) ||
      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;

  vec2 ux = splitFloat(planeCoordinate.x / shape.x);
  vec2 uy = splitFloat(planeCoordinate.y / shape.y);
  gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));
}
`]);a.createShader=function(d){var p=s(d,l,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},a.createPickShader=function(d){var p=s(d,l,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},a.createContourShader=function(d){var p=s(d,c,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p},a.createPickContourShader=function(d){var p=s(d,c,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p}},9499:function(i,a,o){"use strict";i.exports=Oe;var s=o(8828),u=o(2762),l=o(8116),f=o(7766),c=o(1888),h=o(6729),d=o(5298),p=o(9994),x=o(9618),b=o(3711),y=o(6760),k=o(7608),E=o(2478),A=o(6199),L=o(990),_=L.createShader,C=L.createContourShader,M=L.createPickShader,v=L.createPickContourShader,z=4*10,T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],F=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],q=[[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 Re=0;Re<3;++Re){var me=q[Re],Be=(Re+1)%3,fe=(Re+2)%3;me[Be+0]=1,me[fe+3]=1,me[Re+6]=1}})();function U(Re,me,Be,fe,Ze){this.position=Re,this.index=me,this.uv=Be,this.level=fe,this.dataCoordinate=Ze}var H=256;function j(Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt){this.gl=Re,this.shape=me,this.bounds=Be,this.objectOffset=jt,this.intensityBounds=[],this._shader=fe,this._pickShader=Ze,this._coordinateBuffer=et,this._vao=gt,this._colorMap=Pt,this._contourShader=Qe,this._contourPickShader=Xe,this._contourBuffer=Tt,this._contourVAO=xt,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=Ct,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=[x(c.mallocFloat(1024),[0,0]),x(c.mallocFloat(1024),[0,0]),x(c.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 G=j.prototype;G.genColormap=function(Re,me){var Be=!1,fe=p([h({colormap:Re,nshades:H,format:"rgba"}).map(function(Ze,et){var gt=me?O(et/255,me):Ze[3];return gt<1&&(Be=!0),[Ze[0],Ze[1],Ze[2],255*gt]})]);return d.divseq(fe,255),this.hasAlphaScale=Be,fe},G.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},G.isOpaque=function(){return!this.isTransparent()},G.pickSlots=1,G.setPickBase=function(Re){this.pickId=Re};function O(Re,me){if(!me||!me.length)return 1;for(var Be=0;Be<me.length;++Be){if(me.length<2)return 1;if(me[Be][0]===Re)return me[Be][1];if(me[Be][0]>Re&&Be>0){var fe=(me[Be][0]-Re)/(me[Be][0]-me[Be-1][0]);return me[Be][1]*(1-fe)+fe*me[Be-1][1]}}return 1}var W=[0,0,0],re={showSurface:!1,showContour:!1,projections:[T.slice(),T.slice(),T.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function ne(Re,me){var Be,fe,Ze,et=me.axes&&me.axes.lastCubeProps.axis||W,gt=me.showSurface,Pt=me.showContour;for(Be=0;Be<3;++Be)for(gt=gt||me.surfaceProject[Be],fe=0;fe<3;++fe)Pt=Pt||me.contourProject[Be][fe];for(Be=0;Be<3;++Be){var Qe=re.projections[Be];for(fe=0;fe<16;++fe)Qe[fe]=0;for(fe=0;fe<4;++fe)Qe[5*fe]=1;Qe[5*Be]=0,Qe[12+Be]=me.axesBounds[+(et[Be]>0)][Be],y(Qe,Re.model,Qe);var Xe=re.clipBounds[Be];for(Ze=0;Ze<2;++Ze)for(fe=0;fe<3;++fe)Xe[Ze][fe]=Re.clipBounds[Ze][fe];Xe[0][Be]=-1e8,Xe[1][Be]=1e8}return re.showSurface=gt,re.showContour=Pt,re}var be={model:T,view:T,projection:T,inverseModel:T.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},ze=T.slice(),Ce=[1,0,0,0,1,0,0,0,1];function he(Re,me){Re=Re||{};var Be=this.gl;Be.disable(Be.CULL_FACE),this._colorMap.bind(0);var fe=be;fe.model=Re.model||T,fe.view=Re.view||T,fe.projection=Re.projection||T,fe.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],fe.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],fe.objectOffset=this.objectOffset,fe.contourColor=this.contourColor[0],fe.inverseModel=k(fe.inverseModel,fe.model);for(var Ze=0;Ze<2;++Ze)for(var et=fe.clipBounds[Ze],gt=0;gt<3;++gt)et[gt]=Math.min(Math.max(this.clipBounds[Ze][gt],-1e8),1e8);fe.kambient=this.ambientLight,fe.kdiffuse=this.diffuseLight,fe.kspecular=this.specularLight,fe.roughness=this.roughness,fe.fresnel=this.fresnel,fe.opacity=this.opacity,fe.height=0,fe.permutation=Ce,fe.vertexColor=this.vertexColor;var Pt=ze;for(y(Pt,fe.view,fe.model),y(Pt,fe.projection,Pt),k(Pt,Pt),Ze=0;Ze<3;++Ze)fe.eyePosition[Ze]=Pt[12+Ze]/Pt[15];var Qe=Pt[15];for(Ze=0;Ze<3;++Ze)Qe+=this.lightPosition[Ze]*Pt[4*Ze+3];for(Ze=0;Ze<3;++Ze){var Xe=Pt[12+Ze];for(gt=0;gt<3;++gt)Xe+=Pt[4*gt+Ze]*this.lightPosition[gt];fe.lightPosition[Ze]=Xe/Qe}var Tt=ne(fe,this);if(Tt.showSurface){for(this._shader.bind(),this._shader.uniforms=fe,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Be.TRIANGLES,this._vertexCount),Ze=0;Ze<3;++Ze)!this.surfaceProject[Ze]||!this.vertexCount||(this._shader.uniforms.model=Tt.projections[Ze],this._shader.uniforms.clipBounds=Tt.clipBounds[Ze],this._vao.draw(Be.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Tt.showContour){var xt=this._contourShader;fe.kambient=1,fe.kdiffuse=0,fe.kspecular=0,fe.opacity=1,xt.bind(),xt.uniforms=fe;var _t=this._contourVAO;for(_t.bind(),Ze=0;Ze<3;++Ze)for(xt.uniforms.permutation=q[Ze],Be.lineWidth(this.contourWidth[Ze]*this.pixelRatio),gt=0;gt<this.contourLevels[Ze].length;++gt)gt===this.highlightLevel[Ze]?(xt.uniforms.contourColor=this.highlightColor[Ze],xt.uniforms.contourTint=this.highlightTint[Ze]):(gt===0||gt-1===this.highlightLevel[Ze])&&(xt.uniforms.contourColor=this.contourColor[Ze],xt.uniforms.contourTint=this.contourTint[Ze]),this._contourCounts[Ze][gt]&&(xt.uniforms.height=this.contourLevels[Ze][gt],_t.draw(Be.LINES,this._contourCounts[Ze][gt],this._contourOffsets[Ze][gt]));for(Ze=0;Ze<3;++Ze)for(xt.uniforms.model=Tt.projections[Ze],xt.uniforms.clipBounds=Tt.clipBounds[Ze],gt=0;gt<3;++gt)if(this.contourProject[Ze][gt]){xt.uniforms.permutation=q[gt],Be.lineWidth(this.contourWidth[gt]*this.pixelRatio);for(var Ct=0;Ct<this.contourLevels[gt].length;++Ct)Ct===this.highlightLevel[gt]?(xt.uniforms.contourColor=this.highlightColor[gt],xt.uniforms.contourTint=this.highlightTint[gt]):(Ct===0||Ct-1===this.highlightLevel[gt])&&(xt.uniforms.contourColor=this.contourColor[gt],xt.uniforms.contourTint=this.contourTint[gt]),this._contourCounts[gt][Ct]&&(xt.uniforms.height=this.contourLevels[gt][Ct],_t.draw(Be.LINES,this._contourCounts[gt][Ct],this._contourOffsets[gt][Ct]))}for(_t.unbind(),_t=this._dynamicVAO,_t.bind(),Ze=0;Ze<3;++Ze)if(this._dynamicCounts[Ze]!==0)for(xt.uniforms.model=fe.model,xt.uniforms.clipBounds=fe.clipBounds,xt.uniforms.permutation=q[Ze],Be.lineWidth(this.dynamicWidth[Ze]*this.pixelRatio),xt.uniforms.contourColor=this.dynamicColor[Ze],xt.uniforms.contourTint=this.dynamicTint[Ze],xt.uniforms.height=this.dynamicLevel[Ze],_t.draw(Be.LINES,this._dynamicCounts[Ze],this._dynamicOffsets[Ze]),gt=0;gt<3;++gt)this.contourProject[gt][Ze]&&(xt.uniforms.model=Tt.projections[gt],xt.uniforms.clipBounds=Tt.clipBounds[gt],_t.draw(Be.LINES,this._dynamicCounts[Ze],this._dynamicOffsets[Ze]));_t.unbind()}}G.draw=function(Re){return he.call(this,Re,!1)},G.drawTransparent=function(Re){return he.call(this,Re,!0)};var te={model:T,view:T,projection:T,inverseModel:T,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]};G.drawPick=function(Re){Re=Re||{};var me=this.gl;me.disable(me.CULL_FACE);var Be=te;Be.model=Re.model||T,Be.view=Re.view||T,Be.projection=Re.projection||T,Be.shape=this._field[2].shape,Be.pickId=this.pickId/255,Be.lowerBound=this.bounds[0],Be.upperBound=this.bounds[1],Be.objectOffset=this.objectOffset,Be.permutation=Ce;for(var fe=0;fe<2;++fe)for(var Ze=Be.clipBounds[fe],et=0;et<3;++et)Ze[et]=Math.min(Math.max(this.clipBounds[fe][et],-1e8),1e8);var gt=ne(Be,this);if(gt.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=Be,this._vao.bind(),this._vao.draw(me.TRIANGLES,this._vertexCount),fe=0;fe<3;++fe)this.surfaceProject[fe]&&(this._pickShader.uniforms.model=gt.projections[fe],this._pickShader.uniforms.clipBounds=gt.clipBounds[fe],this._vao.draw(me.TRIANGLES,this._vertexCount));this._vao.unbind()}if(gt.showContour){var Pt=this._contourPickShader;Pt.bind(),Pt.uniforms=Be;var Qe=this._contourVAO;for(Qe.bind(),et=0;et<3;++et)for(me.lineWidth(this.contourWidth[et]*this.pixelRatio),Pt.uniforms.permutation=q[et],fe=0;fe<this.contourLevels[et].length;++fe)this._contourCounts[et][fe]&&(Pt.uniforms.height=this.contourLevels[et][fe],Qe.draw(me.LINES,this._contourCounts[et][fe],this._contourOffsets[et][fe]));for(fe=0;fe<3;++fe)for(Pt.uniforms.model=gt.projections[fe],Pt.uniforms.clipBounds=gt.clipBounds[fe],et=0;et<3;++et)if(this.contourProject[fe][et]){Pt.uniforms.permutation=q[et],me.lineWidth(this.contourWidth[et]*this.pixelRatio);for(var Xe=0;Xe<this.contourLevels[et].length;++Xe)this._contourCounts[et][Xe]&&(Pt.uniforms.height=this.contourLevels[et][Xe],Qe.draw(me.LINES,this._contourCounts[et][Xe],this._contourOffsets[et][Xe]))}Qe.unbind()}},G.pick=function(Re){if(!Re||Re.id!==this.pickId)return null;var me=this._field[2].shape,Be=this._pickResult,fe=me[0]*(Re.value[0]+(Re.value[2]>>4)/16)/255,Ze=Math.floor(fe),et=fe-Ze,gt=me[1]*(Re.value[1]+(Re.value[2]&15)/16)/255,Pt=Math.floor(gt),Qe=gt-Pt;Ze+=1,Pt+=1;var Xe=Be.position;Xe[0]=Xe[1]=Xe[2]=0;for(var Tt=0;Tt<2;++Tt)for(var xt=Tt?et:1-et,_t=0;_t<2;++_t)for(var Ct=_t?Qe:1-Qe,jt=Ze+Tt,At=Pt+_t,Te=xt*Ct,nt=0;nt<3;++nt)Xe[nt]+=this._field[nt].get(jt,At)*Te;for(var ut=this._pickResult.level,ct=0;ct<3;++ct)if(ut[ct]=E.le(this.contourLevels[ct],Xe[ct]),ut[ct]<0)this.contourLevels[ct].length>0&&(ut[ct]=0);else if(ut[ct]<this.contourLevels[ct].length-1){var rt=this.contourLevels[ct][ut[ct]],je=this.contourLevels[ct][ut[ct]+1];Math.abs(rt-Xe[ct])>Math.abs(je-Xe[ct])&&(ut[ct]+=1)}for(Be.index[0]=et<.5?Ze:Ze+1,Be.index[1]=Qe<.5?Pt:Pt+1,Be.uv[0]=fe/me[0],Be.uv[1]=gt/me[1],nt=0;nt<3;++nt)Be.dataCoordinate[nt]=this._field[nt].get(Be.index[0],Be.index[1]);return Be},G.padField=function(Re,me){var Be=me.shape.slice(),fe=Re.shape.slice();d.assign(Re.lo(1,1).hi(Be[0],Be[1]),me),d.assign(Re.lo(1).hi(Be[0],1),me.hi(Be[0],1)),d.assign(Re.lo(1,fe[1]-1).hi(Be[0],1),me.lo(0,Be[1]-1).hi(Be[0],1)),d.assign(Re.lo(0,1).hi(1,Be[1]),me.hi(1)),d.assign(Re.lo(fe[0]-1,1).hi(1,Be[1]),me.lo(Be[0]-1)),Re.set(0,0,me.get(0,0)),Re.set(0,fe[1]-1,me.get(0,Be[1]-1)),Re.set(fe[0]-1,0,me.get(Be[0]-1,0)),Re.set(fe[0]-1,fe[1]-1,me.get(Be[0]-1,Be[1]-1))};function ke(Re,me){return Array.isArray(Re)?[me(Re[0]),me(Re[1]),me(Re[2])]:[me(Re),me(Re),me(Re)]}function Ee(Re){return Array.isArray(Re)?Re.length===3?[Re[0],Re[1],Re[2],1]:[Re[0],Re[1],Re[2],Re[3]]:[0,0,0,1]}function Me(Re){if(Array.isArray(Re)){if(Array.isArray(Re))return[Ee(Re[0]),Ee(Re[1]),Ee(Re[2])];var me=Ee(Re);return[me.slice(),me.slice(),me.slice()]}}G.update=function(Re){Re=Re||{},this.objectOffset=Re.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in Re&&(this.contourWidth=ke(Re.contourWidth,Number)),"showContour"in Re&&(this.showContour=ke(Re.showContour,Boolean)),"showSurface"in Re&&(this.showSurface=!!Re.showSurface),"contourTint"in Re&&(this.contourTint=ke(Re.contourTint,Boolean)),"contourColor"in Re&&(this.contourColor=Me(Re.contourColor)),"contourProject"in Re&&(this.contourProject=ke(Re.contourProject,function(Pi){return ke(Pi,Boolean)})),"surfaceProject"in Re&&(this.surfaceProject=Re.surfaceProject),"dynamicColor"in Re&&(this.dynamicColor=Me(Re.dynamicColor)),"dynamicTint"in Re&&(this.dynamicTint=ke(Re.dynamicTint,Number)),"dynamicWidth"in Re&&(this.dynamicWidth=ke(Re.dynamicWidth,Number)),"opacity"in Re&&(this.opacity=Re.opacity),"opacityscale"in Re&&(this.opacityscale=Re.opacityscale),"colorBounds"in Re&&(this.colorBounds=Re.colorBounds),"vertexColor"in Re&&(this.vertexColor=Re.vertexColor?1:0),"colormap"in Re&&this._colorMap.setPixels(this.genColormap(Re.colormap,this.opacityscale));var me=Re.field||Re.coords&&Re.coords[2]||null,Be=!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 Re||"coords"in Re){var fe=(me.shape[0]+2)*(me.shape[1]+2);fe>this._field[2].data.length&&(c.freeFloat(this._field[2].data),this._field[2].data=c.mallocFloat(s.nextPow2(fe))),this._field[2]=x(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 Ze=this.shape,et=0;et<2;++et)this._field[2].size>this._field[et].data.length&&(c.freeFloat(this._field[et].data),this._field[et].data=c.mallocFloat(this._field[2].size)),this._field[et]=x(this._field[et].data,[Ze[0]+2,Ze[1]+2]);if(Re.coords){var gt=Re.coords;if(!Array.isArray(gt)||gt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(et=0;et<2;++et){var Pt=gt[et];for(_t=0;_t<2;++_t)if(Pt.shape[_t]!==Ze[_t])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[et],Pt)}}else if(Re.ticks){var Qe=Re.ticks;if(!Array.isArray(Qe)||Qe.length!==2)throw new Error("gl-surface: invalid ticks");for(et=0;et<2;++et){var Xe=Qe[et];if((Array.isArray(Xe)||Xe.length)&&(Xe=x(Xe)),Xe.shape[0]!==Ze[et])throw new Error("gl-surface: invalid tick length");var Tt=x(Xe.data,Ze);Tt.stride[et]=Xe.stride[0],Tt.stride[et^1]=0,this.padField(this._field[et],Tt)}}else{for(et=0;et<2;++et){var xt=[0,0];xt[et]=1,this._field[et]=x(this._field[et].data,[Ze[0]+2,Ze[1]+2],xt,0)}this._field[0].set(0,0,0);for(var _t=0;_t<Ze[0];++_t)this._field[0].set(_t+1,0,_t);for(this._field[0].set(Ze[0]+1,0,Ze[0]-1),this._field[1].set(0,0,0),_t=0;_t<Ze[1];++_t)this._field[1].set(0,_t+1,_t);this._field[1].set(0,Ze[1]+1,Ze[1]-1)}var Ct=this._field,jt=x(c.mallocFloat(Ct[2].size*3*2),[3,Ze[0]+2,Ze[1]+2,2]);for(et=0;et<3;++et)A(jt.pick(et),Ct[et],"mirror");var At=x(c.mallocFloat(Ct[2].size*3),[Ze[0]+2,Ze[1]+2,3]);for(et=0;et<Ze[0]+2;++et)for(_t=0;_t<Ze[1]+2;++_t){var Te=jt.get(0,et,_t,0),nt=jt.get(0,et,_t,1),ut=jt.get(1,et,_t,0),ct=jt.get(1,et,_t,1),rt=jt.get(2,et,_t,0),je=jt.get(2,et,_t,1),tt=ut*je-ct*rt,Je=rt*nt-je*Te,Mt=Te*ct-nt*ut,Vt=Math.sqrt(tt*tt+Je*Je+Mt*Mt);Vt<1e-8?(Vt=Math.max(Math.abs(tt),Math.abs(Je),Math.abs(Mt)),Vt<1e-8?(Mt=1,Je=tt=0,Vt=1):Vt=1/Vt):Vt=1/Math.sqrt(Vt),At.set(et,_t,0,tt*Vt),At.set(et,_t,1,Je*Vt),At.set(et,_t,2,Mt*Vt)}c.free(jt.data);var Kt=[1/0,1/0,1/0],ir=[-1/0,-1/0,-1/0],fr=1/0,Ot=-1/0,De=(Ze[0]-1)*(Ze[1]-1)*6,_e=c.mallocFloat(s.nextPow2(10*De)),Fe=0,Pe=0;for(et=0;et<Ze[0]-1;++et)e:for(_t=0;_t<Ze[1]-1;++_t){for(var Ie=0;Ie<2;++Ie)for(var lt=0;lt<2;++lt)for(var ye=0;ye<3;++ye){var ue=this._field[ye].get(1+et+Ie,1+_t+lt);if(isNaN(ue)||!isFinite(ue))continue e}for(ye=0;ye<6;++ye){var de=et+F[ye][0],ht=_t+F[ye][1],Et=this._field[0].get(de+1,ht+1),St=this._field[1].get(de+1,ht+1);ue=this._field[2].get(de+1,ht+1),tt=At.get(de+1,ht+1,0),Je=At.get(de+1,ht+1,1),Mt=At.get(de+1,ht+1,2),Re.intensity&&(Zt=Re.intensity.get(de,ht));var Zt=Re.intensity?Re.intensity.get(de,ht):ue+this.objectOffset[2];_e[Fe++]=de,_e[Fe++]=ht,_e[Fe++]=Et,_e[Fe++]=St,_e[Fe++]=ue,_e[Fe++]=0,_e[Fe++]=Zt,_e[Fe++]=tt,_e[Fe++]=Je,_e[Fe++]=Mt,Kt[0]=Math.min(Kt[0],Et+this.objectOffset[0]),Kt[1]=Math.min(Kt[1],St+this.objectOffset[1]),Kt[2]=Math.min(Kt[2],ue+this.objectOffset[2]),fr=Math.min(fr,Zt),ir[0]=Math.max(ir[0],Et+this.objectOffset[0]),ir[1]=Math.max(ir[1],St+this.objectOffset[1]),ir[2]=Math.max(ir[2],ue+this.objectOffset[2]),Ot=Math.max(Ot,Zt),Pe+=1}}for(Re.intensityBounds&&(fr=+Re.intensityBounds[0],Ot=+Re.intensityBounds[1]),et=6;et<Fe;et+=10)_e[et]=(_e[et]-fr)/(Ot-fr);this._vertexCount=Pe,this._coordinateBuffer.update(_e.subarray(0,Fe)),c.freeFloat(_e),c.free(At.data),this.bounds=[Kt,ir],this.intensity=Re.intensity||this._field[2],(this.intensityBounds[0]!==fr||this.intensityBounds[1]!==Ot)&&(Be=!0),this.intensityBounds=[fr,Ot]}if("levels"in Re){var qr=Re.levels;for(Array.isArray(qr[0])?qr=qr.slice():qr=[[],[],qr],et=0;et<3;++et)qr[et]=qr[et].slice(),qr[et].sort(function(Pi,Yr){return Pi-Yr});for(et=0;et<3;++et)for(_t=0;_t<qr[et].length;++_t)qr[et][_t]-=this.objectOffset[et];e:for(et=0;et<3;++et){if(qr[et].length!==this.contourLevels[et].length){Be=!0;break}for(_t=0;_t<qr[et].length;++_t)if(qr[et][_t]!==this.contourLevels[et][_t]){Be=!0;break e}}this.contourLevels=qr}if(Be){Ct=this._field,Ze=this.shape;for(var Lr=[],vr=0;vr<3;++vr){var Er=this.contourLevels[vr],si=[],Ei=[],Si=[0,0,0];for(et=0;et<Er.length;++et){var xi=b(this._field[vr],Er[et]);si.push(Lr.length/5|0),Pe=0;e:for(_t=0;_t<xi.cells.length;++_t){var Hi=xi.cells[_t];for(ye=0;ye<2;++ye){var Jr=xi.positions[Hi[ye]],ci=Jr[0],Di=Math.floor(ci)|0,Lt=ci-Di,vt=Jr[1],Dt=Math.floor(vt)|0,Bt=vt-Dt,sr=!1;t:for(var br=0;br<3;++br){Si[br]=0;var zr=(vr+br+1)%3;for(Ie=0;Ie<2;++Ie){var Tr=Ie?Lt:1-Lt;for(de=Math.min(Math.max(Di+Ie,0),Ze[0])|0,lt=0;lt<2;++lt){var Rr=lt?Bt:1-Bt;if(ht=Math.min(Math.max(Dt+lt,0),Ze[1])|0,br<2?ue=this._field[zr].get(de,ht):ue=(this.intensity.get(de,ht)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(ue)||isNaN(ue)){sr=!0;break t}var Br=Tr*Rr;Si[br]+=Br*ue}}}if(!sr)Lr.push(Si[0],Si[1],Jr[0],Jr[1],Si[2]),Pe+=1;else{if(ye>0){for(var oi=0;oi<5;++oi)Lr.pop();Pe-=1}continue e}}}Ei.push(Pe)}this._contourOffsets[vr]=si,this._contourCounts[vr]=Ei}var vi=c.mallocFloat(Lr.length);for(et=0;et<Lr.length;++et)vi[et]=Lr[et];this._contourBuffer.update(vi),c.freeFloat(vi)}},G.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 Re=0;Re<3;++Re)c.freeFloat(this._field[Re].data)},G.highlight=function(Re){var me;if(!Re){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]=Re.level[me]:this.highlightLevel[me]=-1;var Be;for(this.snapToData?Be=Re.dataCoordinate:Be=Re.position,me=0;me<3;++me)Be[me]-=this.objectOffset[me];if(!((!this.enableDynamic[0]||Be[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||Be[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||Be[2]===this.dynamicLevel[2]))){for(var fe=0,Ze=this.shape,et=c.mallocFloat(12*Ze[0]*Ze[1]),gt=0;gt<3;++gt){if(!this.enableDynamic[gt]){this.dynamicLevel[gt]=NaN,this._dynamicCounts[gt]=0;continue}this.dynamicLevel[gt]=Be[gt];var Pt=(gt+1)%3,Qe=(gt+2)%3,Xe=this._field[gt],Tt=this._field[Pt],xt=this._field[Qe],_t=b(Xe,Be[gt]),Ct=_t.cells,jt=_t.positions;for(this._dynamicOffsets[gt]=fe,me=0;me<Ct.length;++me)for(var At=Ct[me],Te=0;Te<2;++Te){var nt=jt[At[Te]],ut=+nt[0],ct=ut|0,rt=Math.min(ct+1,Ze[0])|0,je=ut-ct,tt=1-je,Je=+nt[1],Mt=Je|0,Vt=Math.min(Mt+1,Ze[1])|0,Kt=Je-Mt,ir=1-Kt,fr=tt*ir,Ot=tt*Kt,De=je*ir,_e=je*Kt,Fe=fr*Tt.get(ct,Mt)+Ot*Tt.get(ct,Vt)+De*Tt.get(rt,Mt)+_e*Tt.get(rt,Vt),Pe=fr*xt.get(ct,Mt)+Ot*xt.get(ct,Vt)+De*xt.get(rt,Mt)+_e*xt.get(rt,Vt);if(isNaN(Fe)||isNaN(Pe)){Te&&(fe-=1);break}et[2*fe+0]=Fe,et[2*fe+1]=Pe,fe+=1}this._dynamicCounts[gt]=fe-this._dynamicOffsets[gt]}this._dynamicBuffer.update(et.subarray(0,2*fe)),c.freeFloat(et)}};function Oe(Re){var me=Re.gl,Be=_(me),fe=M(me),Ze=C(me),et=v(me),gt=u(me),Pt=l(me,[{buffer:gt,size:4,stride:z,offset:0},{buffer:gt,size:3,stride:z,offset:16},{buffer:gt,size:3,stride:z,offset:28}]),Qe=u(me),Xe=l(me,[{buffer:Qe,size:4,stride:20,offset:0},{buffer:Qe,size:1,stride:20,offset:16}]),Tt=u(me),xt=l(me,[{buffer:Tt,size:2,type:me.FLOAT}]),_t=f(me,1,H,me.RGBA,me.UNSIGNED_BYTE);_t.minFilter=me.LINEAR,_t.magFilter=me.LINEAR;var Ct=new j(me,[0,0],[[0,0,0],[0,0,0]],Be,fe,gt,Pt,_t,Ze,et,Qe,Xe,Tt,xt,[0,0,0]),jt={levels:[[],[],[]]};for(var At in Re)jt[At]=Re[At];return jt.colormap=jt.colormap||"jet",Ct.update(jt),Ct}},7766:function(i,a,o){"use strict";var s=o(9618),u=o(5298),l=o(1888);i.exports=v;var f=null,c=null,h=null;function d(z){f=[z.LINEAR,z.NEAREST_MIPMAP_LINEAR,z.LINEAR_MIPMAP_NEAREST,z.LINEAR_MIPMAP_NEAREST],c=[z.NEAREST,z.LINEAR,z.NEAREST_MIPMAP_NEAREST,z.NEAREST_MIPMAP_LINEAR,z.LINEAR_MIPMAP_NEAREST,z.LINEAR_MIPMAP_LINEAR],h=[z.REPEAT,z.CLAMP_TO_EDGE,z.MIRRORED_REPEAT]}function p(z){return typeof HTMLCanvasElement!="undefined"&&z instanceof HTMLCanvasElement||typeof HTMLImageElement!="undefined"&&z instanceof HTMLImageElement||typeof HTMLVideoElement!="undefined"&&z instanceof HTMLVideoElement||typeof ImageData!="undefined"&&z instanceof ImageData}var x=function(z,T){u.muls(z,T,255)};function b(z,T,F){var q=z.gl,U=q.getParameter(q.MAX_TEXTURE_SIZE);if(T<0||T>U||F<0||F>U)throw new Error("gl-texture2d: Invalid texture size");return z._shape=[T,F],z.bind(),q.texImage2D(q.TEXTURE_2D,0,z.format,T,F,0,z.format,z.type,null),z._mipLevels=[0],z}function y(z,T,F,q,U,H){this.gl=z,this.handle=T,this.format=U,this.type=H,this._shape=[F,q],this._mipLevels=[0],this._magFilter=z.NEAREST,this._minFilter=z.NEAREST,this._wrapS=z.CLAMP_TO_EDGE,this._wrapT=z.CLAMP_TO_EDGE,this._anisoSamples=1;var j=this,G=[this._wrapS,this._wrapT];Object.defineProperties(G,[{get:function(){return j._wrapS},set:function(W){return j.wrapS=W}},{get:function(){return j._wrapT},set:function(W){return j.wrapT=W}}]),this._wrapVector=G;var O=[this._shape[0],this._shape[1]];Object.defineProperties(O,[{get:function(){return j._shape[0]},set:function(W){return j.width=W}},{get:function(){return j._shape[1]},set:function(W){return j.height=W}}]),this._shapeVector=O}var k=y.prototype;Object.defineProperties(k,{minFilter:{get:function(){return this._minFilter},set:function(z){this.bind();var T=this.gl;if(this.type===T.FLOAT&&f.indexOf(z)>=0&&(T.getExtension("OES_texture_float_linear")||(z=T.NEAREST)),c.indexOf(z)<0)throw new Error("gl-texture2d: Unknown filter mode "+z);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,z),this._minFilter=z}},magFilter:{get:function(){return this._magFilter},set:function(z){this.bind();var T=this.gl;if(this.type===T.FLOAT&&f.indexOf(z)>=0&&(T.getExtension("OES_texture_float_linear")||(z=T.NEAREST)),c.indexOf(z)<0)throw new Error("gl-texture2d: Unknown filter mode "+z);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,z),this._magFilter=z}},mipSamples:{get:function(){return this._anisoSamples},set:function(z){var T=this._anisoSamples;if(this._anisoSamples=Math.max(z,1)|0,T!==this._anisoSamples){var F=this.gl.getExtension("EXT_texture_filter_anisotropic");F&&this.gl.texParameterf(this.gl.TEXTURE_2D,F.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(z){if(this.bind(),h.indexOf(z)<0)throw new Error("gl-texture2d: Unknown wrap mode "+z);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,z),this._wrapS=z}},wrapT:{get:function(){return this._wrapT},set:function(z){if(this.bind(),h.indexOf(z)<0)throw new Error("gl-texture2d: Unknown wrap mode "+z);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,z),this._wrapT=z}},wrap:{get:function(){return this._wrapVector},set:function(z){if(Array.isArray(z)||(z=[z,z]),z.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var T=0;T<2;++T)if(h.indexOf(z[T])<0)throw new Error("gl-texture2d: Unknown wrap mode "+z);this._wrapS=z[0],this._wrapT=z[1];var F=this.gl;return this.bind(),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_S,this._wrapS),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_T,this._wrapT),z}},shape:{get:function(){return this._shapeVector},set:function(z){if(!Array.isArray(z))z=[z|0,z|0];else if(z.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return b(this,z[0]|0,z[1]|0),[z[0]|0,z[1]|0]}},width:{get:function(){return this._shape[0]},set:function(z){return z=z|0,b(this,z,this._shape[1]),z}},height:{get:function(){return this._shape[1]},set:function(z){return z=z|0,b(this,this._shape[0],z),z}}}),k.bind=function(z){var T=this.gl;return z!==void 0&&T.activeTexture(T.TEXTURE0+(z|0)),T.bindTexture(T.TEXTURE_2D,this.handle),z!==void 0?z|0:T.getParameter(T.ACTIVE_TEXTURE)-T.TEXTURE0},k.dispose=function(){this.gl.deleteTexture(this.handle)},k.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var z=Math.min(this._shape[0],this._shape[1]),T=0;z>0;++T,z>>>=1)this._mipLevels.indexOf(T)<0&&this._mipLevels.push(T)},k.setPixels=function(z,T,F,q){var U=this.gl;this.bind(),Array.isArray(T)?(q=F,F=T[1]|0,T=T[0]|0):(T=T||0,F=F||0),q=q||0;var H=p(z)?z:z.raw;if(H){var j=this._mipLevels.indexOf(q)<0;j?(U.texImage2D(U.TEXTURE_2D,0,this.format,this.format,this.type,H),this._mipLevels.push(q)):U.texSubImage2D(U.TEXTURE_2D,q,T,F,this.format,this.type,H)}else if(z.shape&&z.stride&&z.data){if(z.shape.length<2||T+z.shape[1]>this._shape[1]>>>q||F+z.shape[0]>this._shape[0]>>>q||T<0||F<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(U,T,F,q,this.format,this.type,this._mipLevels,z)}else throw new Error("gl-texture2d: Unsupported data type")};function E(z,T){return z.length===3?T[2]===1&&T[1]===z[0]*z[2]&&T[0]===z[2]:T[0]===1&&T[1]===z[0]}function A(z,T,F,q,U,H,j,G){var O=G.dtype,W=G.shape.slice();if(W.length<2||W.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var re=0,ne=0,be=E(W,G.stride.slice());O==="float32"?re=z.FLOAT:O==="float64"?(re=z.FLOAT,be=!1,O="float32"):O==="uint8"?re=z.UNSIGNED_BYTE:(re=z.UNSIGNED_BYTE,be=!1,O="uint8");var ze=1;if(W.length===2)ne=z.LUMINANCE,W=[W[0],W[1],1],G=s(G.data,W,[G.stride[0],G.stride[1],1],G.offset);else if(W.length===3){if(W[2]===1)ne=z.ALPHA;else if(W[2]===2)ne=z.LUMINANCE_ALPHA;else if(W[2]===3)ne=z.RGB;else if(W[2]===4)ne=z.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ze=W[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((ne===z.LUMINANCE||ne===z.ALPHA)&&(U===z.LUMINANCE||U===z.ALPHA)&&(ne=U),ne!==U)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var Ce=G.size,he=j.indexOf(q)<0;if(he&&j.push(q),re===H&&be)G.offset===0&&G.data.length===Ce?he?z.texImage2D(z.TEXTURE_2D,q,U,W[0],W[1],0,U,H,G.data):z.texSubImage2D(z.TEXTURE_2D,q,T,F,W[0],W[1],U,H,G.data):he?z.texImage2D(z.TEXTURE_2D,q,U,W[0],W[1],0,U,H,G.data.subarray(G.offset,G.offset+Ce)):z.texSubImage2D(z.TEXTURE_2D,q,T,F,W[0],W[1],U,H,G.data.subarray(G.offset,G.offset+Ce));else{var te;H===z.FLOAT?te=l.mallocFloat32(Ce):te=l.mallocUint8(Ce);var ke=s(te,W,[W[2],W[2]*W[0],1]);re===z.FLOAT&&H===z.UNSIGNED_BYTE?x(ke,G):u.assign(ke,G),he?z.texImage2D(z.TEXTURE_2D,q,U,W[0],W[1],0,U,H,te.subarray(0,Ce)):z.texSubImage2D(z.TEXTURE_2D,q,T,F,W[0],W[1],U,H,te.subarray(0,Ce)),H===z.FLOAT?l.freeFloat32(te):l.freeUint8(te)}}function L(z){var T=z.createTexture();return z.bindTexture(z.TEXTURE_2D,T),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MIN_FILTER,z.NEAREST),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MAG_FILTER,z.NEAREST),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,z.CLAMP_TO_EDGE),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,z.CLAMP_TO_EDGE),T}function _(z,T,F,q,U){var H=z.getParameter(z.MAX_TEXTURE_SIZE);if(T<0||T>H||F<0||F>H)throw new Error("gl-texture2d: Invalid texture shape");if(U===z.FLOAT&&!z.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var j=L(z);return z.texImage2D(z.TEXTURE_2D,0,q,T,F,0,q,U,null),new y(z,j,T,F,q,U)}function C(z,T,F,q,U,H){var j=L(z);return z.texImage2D(z.TEXTURE_2D,0,U,U,H,T),new y(z,j,F,q,U,H)}function M(z,T){var F=T.dtype,q=T.shape.slice(),U=z.getParameter(z.MAX_TEXTURE_SIZE);if(q[0]<0||q[0]>U||q[1]<0||q[1]>U)throw new Error("gl-texture2d: Invalid texture size");var H=E(q,T.stride.slice()),j=0;F==="float32"?j=z.FLOAT:F==="float64"?(j=z.FLOAT,H=!1,F="float32"):F==="uint8"?j=z.UNSIGNED_BYTE:(j=z.UNSIGNED_BYTE,H=!1,F="uint8");var G=0;if(q.length===2)G=z.LUMINANCE,q=[q[0],q[1],1],T=s(T.data,q,[T.stride[0],T.stride[1],1],T.offset);else if(q.length===3)if(q[2]===1)G=z.ALPHA;else if(q[2]===2)G=z.LUMINANCE_ALPHA;else if(q[2]===3)G=z.RGB;else if(q[2]===4)G=z.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");j===z.FLOAT&&!z.getExtension("OES_texture_float")&&(j=z.UNSIGNED_BYTE,H=!1);var O,W,re=T.size;if(H)T.offset===0&&T.data.length===re?O=T.data:O=T.data.subarray(T.offset,T.offset+re);else{var ne=[q[2],q[2]*q[0],1];W=l.malloc(re,F);var be=s(W,q,ne,0);(F==="float32"||F==="float64")&&j===z.UNSIGNED_BYTE?x(be,T):u.assign(be,T),O=W.subarray(0,re)}var ze=L(z);return z.texImage2D(z.TEXTURE_2D,0,G,q[0],q[1],0,G,j,O),H||l.free(W),new y(z,ze,q[0],q[1],G,j)}function v(z){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(f||d(z),typeof arguments[1]=="number")return _(z,arguments[1],arguments[2],arguments[3]||z.RGBA,arguments[4]||z.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(z,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||z.RGBA,arguments[3]||z.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var T=arguments[1],F=p(T)?T:T.raw;if(F)return C(z,F,T.width|0,T.height|0,arguments[2]||z.RGBA,arguments[3]||z.UNSIGNED_BYTE);if(T.shape&&T.data&&T.stride)return M(z,T)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(i){"use strict";function a(o,s,u){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var l=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(u){if(u.length>l)throw new Error("gl-vao: Too many vertex attributes");for(var f=0;f<u.length;++f){var c=u[f];if(c.buffer){var h=c.buffer,d=c.size||4,p=c.type||o.FLOAT,x=!!c.normalized,b=c.stride||0,y=c.offset||0;h.bind(),o.enableVertexAttribArray(f),o.vertexAttribPointer(f,d,p,x,b,y)}else{if(typeof c=="number")o.vertexAttrib1f(f,c);else if(c.length===1)o.vertexAttrib1f(f,c[0]);else if(c.length===2)o.vertexAttrib2f(f,c[0],c[1]);else if(c.length===3)o.vertexAttrib3f(f,c[0],c[1],c[2]);else if(c.length===4)o.vertexAttrib4f(f,c[0],c[1],c[2],c[3]);else throw new Error("gl-vao: Invalid vertex attribute");o.disableVertexAttribArray(f)}}for(;f<l;++f)o.disableVertexAttribArray(f)}else{o.bindBuffer(o.ARRAY_BUFFER,null);for(var f=0;f<l;++f)o.disableVertexAttribArray(f)}}i.exports=a},870:function(i,a,o){"use strict";var s=o(1433);function u(f){this.gl=f,this._elements=null,this._attributes=null,this._elementsType=f.UNSIGNED_SHORT}u.prototype.bind=function(){s(this.gl,this._elements,this._attributes)},u.prototype.update=function(f,c,h){this._elements=c,this._attributes=f,this._elementsType=h||this.gl.UNSIGNED_SHORT},u.prototype.dispose=function(){},u.prototype.unbind=function(){},u.prototype.draw=function(f,c,h){h=h||0;var d=this.gl;this._elements?d.drawElements(f,c,this._elementsType,h):d.drawArrays(f,h,c)};function l(f){return new u(f)}i.exports=l},7518:function(i,a,o){"use strict";var s=o(1433);function u(c,h,d,p,x,b){this.location=c,this.dimension=h,this.a=d,this.b=p,this.c=x,this.d=b}u.prototype.bind=function(c){switch(this.dimension){case 1:c.vertexAttrib1f(this.location,this.a);break;case 2:c.vertexAttrib2f(this.location,this.a,this.b);break;case 3:c.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:c.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function l(c,h,d){this.gl=c,this._ext=h,this.handle=d,this._attribs=[],this._useElements=!1,this._elementsType=c.UNSIGNED_SHORT}l.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var c=0;c<this._attribs.length;++c)this._attribs[c].bind(this.gl)},l.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},l.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},l.prototype.update=function(c,h,d){if(this.bind(),s(this.gl,h,c),this.unbind(),this._attribs.length=0,c)for(var p=0;p<c.length;++p){var x=c[p];typeof x=="number"?this._attribs.push(new u(p,1,x)):Array.isArray(x)&&this._attribs.push(new u(p,x.length,x[0],x[1],x[2],x[3]))}this._useElements=!!h,this._elementsType=d||this.gl.UNSIGNED_SHORT},l.prototype.draw=function(c,h,d){d=d||0;var p=this.gl;this._useElements?p.drawElements(c,h,this._elementsType,d):p.drawArrays(c,d,h)};function f(c,h){return new l(c,h,h.createVertexArrayOES())}i.exports=f},8116:function(i,a,o){"use strict";var s=o(7518),u=o(870);function l(c){this.bindVertexArrayOES=c.bindVertexArray.bind(c),this.createVertexArrayOES=c.createVertexArray.bind(c),this.deleteVertexArrayOES=c.deleteVertexArray.bind(c)}function f(c,h,d,p){var x=c.createVertexArray?new l(c):c.getExtension("OES_vertex_array_object"),b;return x?b=s(c,x):b=u(c),b.update(h,d,p),b}i.exports=f},5632:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]+u[0],o[1]=s[1]+u[1],o[2]=s[2]+u[2],o}},8192:function(i,a,o){i.exports=f;var s=o(2825),u=o(3536),l=o(244);function f(c,h){var d=s(c[0],c[1],c[2]),p=s(h[0],h[1],h[2]);u(d,d),u(p,p);var x=l(d,p);return x>1?0:Math.acos(x)}},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}},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}},3990:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091:function(i){i.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[0],d=u[1],p=u[2];return o[0]=f*p-c*d,o[1]=c*h-l*p,o[2]=l*d-f*h,o}},5455:function(i,a,o){i.exports=o(7056)},7056:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2];return Math.sqrt(u*u+l*l+f*f)}},4008:function(i,a,o){i.exports=o(6690)},6690:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]/u[0],o[1]=s[1]/u[1],o[2]=s[2]/u[2],o}},244:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613:function(i){i.exports=1e-6},9922:function(i,a,o){i.exports=u;var s=o(2613);function u(l,f){var c=l[0],h=l[1],d=l[2],p=f[0],x=f[1],b=f[2];return Math.abs(c-p)<=s*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(h-x)<=s*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(d-b)<=s*Math.max(1,Math.abs(d),Math.abs(b))}},9265:function(i){i.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},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}},5137:function(i,a,o){i.exports=u;var s=o(1091)();function u(l,f,c,h,d,p){var x,b;for(f||(f=3),c||(c=0),h?b=Math.min(h*f+c,l.length):b=l.length,x=c;x<b;x+=f)s[0]=l[x],s[1]=l[x+1],s[2]=l[x+2],d(s,s,p),l[x]=s[0],l[x+1]=s[1],l[x+2]=s[2];return l}},2825:function(i){i.exports=a;function a(o,s,u){var l=new Float32Array(3);return l[0]=o,l[1]=s,l[2]=u,l}},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)}},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}},868:function(i,a,o){i.exports=o(1387)},1387:function(i){i.exports=a;function a(o){var s=o[0],u=o[1],l=o[2];return Math.sqrt(s*s+u*u+l*l)}},6658:function(i){i.exports=a;function a(o,s,u,l){var f=s[0],c=s[1],h=s[2];return o[0]=f+l*(u[0]-f),o[1]=c+l*(u[1]-c),o[2]=h+l*(u[2]-h),o}},7417:function(i){i.exports=a;function a(o,s,u){return o[0]=Math.max(s[0],u[0]),o[1]=Math.max(s[1],u[1]),o[2]=Math.max(s[2],u[2]),o}},8107:function(i){i.exports=a;function a(o,s,u){return o[0]=Math.min(s[0],u[0]),o[1]=Math.min(s[1],u[1]),o[2]=Math.min(s[2],u[2]),o}},4505:function(i,a,o){i.exports=o(5847)},5847:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]*u[0],o[1]=s[1]*u[1],o[2]=s[2]*u[2],o}},5093:function(i){i.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o}},3536:function(i){i.exports=a;function a(o,s){var u=s[0],l=s[1],f=s[2],c=u*u+l*l+f*f;return c>0&&(c=1/Math.sqrt(c),o[0]=s[0]*c,o[1]=s[1]*c,o[2]=s[2]*c),o}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var u=Math.random()*2*Math.PI,l=Math.random()*2-1,f=Math.sqrt(1-l*l)*s;return o[0]=Math.cos(u)*f,o[1]=Math.sin(u)*f,o[2]=l*s,o}},6894:function(i){i.exports=a;function a(o,s,u,l){var f=u[1],c=u[2],h=s[1]-f,d=s[2]-c,p=Math.sin(l),x=Math.cos(l);return o[0]=s[0],o[1]=f+h*x-d*p,o[2]=c+h*p+d*x,o}},109:function(i){i.exports=a;function a(o,s,u,l){var f=u[0],c=u[2],h=s[0]-f,d=s[2]-c,p=Math.sin(l),x=Math.cos(l);return o[0]=f+d*p+h*x,o[1]=s[1],o[2]=c+d*x-h*p,o}},8692:function(i){i.exports=a;function a(o,s,u,l){var f=u[0],c=u[1],h=s[0]-f,d=s[1]-c,p=Math.sin(l),x=Math.cos(l);return o[0]=f+h*x-d*p,o[1]=c+h*p+d*x,o[2]=s[2],o}},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}},6621:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o}},8489:function(i){i.exports=a;function a(o,s,u,l){return o[0]=s[0]+u[0]*l,o[1]=s[1]+u[1]*l,o[2]=s[2]+u[2]*l,o}},1463:function(i){i.exports=a;function a(o,s,u,l){return o[0]=s,o[1]=u,o[2]=l,o}},6141:function(i,a,o){i.exports=o(2953)},5486:function(i,a,o){i.exports=o(3066)},2953:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2];return u*u+l*l+f*f}},3066:function(i){i.exports=a;function a(o){var s=o[0],u=o[1],l=o[2];return s*s+u*u+l*l}},2229:function(i,a,o){i.exports=o(6843)},6843:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]-u[0],o[1]=s[1]-u[1],o[2]=s[2]-u[2],o}},492:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2];return o[0]=l*u[0]+f*u[3]+c*u[6],o[1]=l*u[1]+f*u[4]+c*u[7],o[2]=l*u[2]+f*u[5]+c*u[8],o}},5673:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[3]*l+u[7]*f+u[11]*c+u[15];return h=h||1,o[0]=(u[0]*l+u[4]*f+u[8]*c+u[12])/h,o[1]=(u[1]*l+u[5]*f+u[9]*c+u[13])/h,o[2]=(u[2]*l+u[6]*f+u[10]*c+u[14])/h,o}},264:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[0],d=u[1],p=u[2],x=u[3],b=x*l+d*c-p*f,y=x*f+p*l-h*c,k=x*c+h*f-d*l,E=-h*l-d*f-p*c;return o[0]=b*x+E*-h+y*-p-k*-d,o[1]=y*x+E*-d+k*-h-b*-p,o[2]=k*x+E*-p+b*-d-y*-h,o}},4361:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]+u[0],o[1]=s[1]+u[1],o[2]=s[2]+u[2],o[3]=s[3]+u[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}},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}},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}},4691:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2],c=s[3]-o[3];return Math.sqrt(u*u+l*l+f*f+c*c)}},1373:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]/u[0],o[1]=s[1]/u[1],o[2]=s[2]/u[2],o[3]=s[3]/u[3],o}},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]}},3390:function(i){i.exports=a;function a(o,s,u,l){var f=new Float32Array(4);return f[0]=o,f[1]=s,f[2]=u,f[3]=l,f}},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)}},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}},6808:function(i){i.exports=a;function a(o){var s=o[0],u=o[1],l=o[2],f=o[3];return Math.sqrt(s*s+u*u+l*l+f*f)}},2573:function(i){i.exports=a;function a(o,s,u,l){var f=s[0],c=s[1],h=s[2],d=s[3];return o[0]=f+l*(u[0]-f),o[1]=c+l*(u[1]-c),o[2]=h+l*(u[2]-h),o[3]=d+l*(u[3]-d),o}},160:function(i){i.exports=a;function a(o,s,u){return o[0]=Math.max(s[0],u[0]),o[1]=Math.max(s[1],u[1]),o[2]=Math.max(s[2],u[2]),o[3]=Math.max(s[3],u[3]),o}},2334:function(i){i.exports=a;function a(o,s,u){return o[0]=Math.min(s[0],u[0]),o[1]=Math.min(s[1],u[1]),o[2]=Math.min(s[2],u[2]),o[3]=Math.min(s[3],u[3]),o}},3576:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]*u[0],o[1]=s[1]*u[1],o[2]=s[2]*u[2],o[3]=s[3]*u[3],o}},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}},5177:function(i){i.exports=a;function a(o,s){var u=s[0],l=s[1],f=s[2],c=s[3],h=u*u+l*l+f*f+c*c;return h>0&&(h=1/Math.sqrt(h),o[0]=u*h,o[1]=l*h,o[2]=f*h,o[3]=c*h),o}},9131:function(i,a,o){var s=o(5177),u=o(9288);i.exports=l;function l(f,c){return c=c||1,f[0]=Math.random(),f[1]=Math.random(),f[2]=Math.random(),f[3]=Math.random(),s(f,f),u(f,f,c),f}},9288:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o[3]=s[3]*u,o}},4844:function(i){i.exports=a;function a(o,s,u,l){return o[0]=s[0]+u[0]*l,o[1]=s[1]+u[1]*l,o[2]=s[2]+u[2]*l,o[3]=s[3]+u[3]*l,o}},4578:function(i){i.exports=a;function a(o,s,u,l,f){return o[0]=s,o[1]=u,o[2]=l,o[3]=f,o}},7960:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2],c=s[3]-o[3];return u*u+l*l+f*f+c*c}},483:function(i){i.exports=a;function a(o){var s=o[0],u=o[1],l=o[2],f=o[3];return s*s+u*u+l*l+f*f}},6860:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]-u[0],o[1]=s[1]-u[1],o[2]=s[2]-u[2],o[3]=s[3]-u[3],o}},5352:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=s[3];return o[0]=u[0]*l+u[4]*f+u[8]*c+u[12]*h,o[1]=u[1]*l+u[5]*f+u[9]*c+u[13]*h,o[2]=u[2]*l+u[6]*f+u[10]*c+u[14]*h,o[3]=u[3]*l+u[7]*f+u[11]*c+u[15]*h,o}},4041:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[0],d=u[1],p=u[2],x=u[3],b=x*l+d*c-p*f,y=x*f+p*l-h*c,k=x*c+h*f-d*l,E=-h*l-d*f-p*c;return o[0]=b*x+E*-h+y*-p-k*-d,o[1]=y*x+E*-d+k*-h-b*-p,o[2]=k*x+E*-p+b*-d-y*-h,o[3]=s[3],o}},1848:function(i,a,o){var s=o(4905),u=o(6468);i.exports=l;function l(f){for(var c=Array.isArray(f)?f:s(f),h=0;h<c.length;h++){var d=c[h];if(d.type==="preprocessor"){var p=d.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(p&&p[2]){var x=p[1],b=p[2];return(x?u(b):b).trim()}}}}},5874:function(i,a,o){i.exports=T;var s=o(620),u=o(7827),l=o(6852),f=o(7932),c=o(3508),h=999,d=9999,p=0,x=1,b=2,y=3,k=4,E=5,A=6,L=7,_=8,C=9,M=10,v=11,z=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function T(F){var q=0,U=0,H=h,j,G,O=[],W=[],re=0,ne=0,be=1,ze=0,Ce=0,he=!1,te=!1,ke="",Ee;F=F||{};var Me=l,Oe=s;F.version==="300 es"&&(Me=c,Oe=f);for(var Re={},me={},q=0;q<Me.length;q++)Re[Me[q]]=!0;for(var q=0;q<Oe.length;q++)me[Oe[q]]=!0;return function(Te){return W=[],Te!==null?fe(Te):Ze()};function Be(Te){Te.length&&W.push({type:z[H],data:Te,position:Ce,line:be,column:ze})}function fe(Te){q=0,Te.toString&&(Te=Te.toString()),ke+=Te.replace(/\r\n/g,`
`),Ee=ke.length;for(var nt;j=ke[q],q<Ee;){switch(nt=q,H){case p:q=Xe();break;case x:q=Qe();break;case b:q=Pt();break;case y:q=Tt();break;case k:q=Ct();break;case v:q=_t();break;case E:q=jt();break;case d:q=At();break;case C:q=gt();break;case h:q=et();break}if(nt!==q)switch(ke[nt]){case`
`:ze=0,++be;break;default:++ze;break}}return U+=q,ke=ke.slice(q),W}function Ze(Te){return O.length&&Be(O.join("")),H=M,Be("(eof)"),W}function et(){return O=O.length?[]:O,G==="/"&&j==="*"?(Ce=U+q-1,H=p,G=j,q+1):G==="/"&&j==="/"?(Ce=U+q-1,H=x,G=j,q+1):j==="#"?(H=b,Ce=U+q,q):/\s/.test(j)?(H=C,Ce=U+q,q):(he=/\d/.test(j),te=/[^\w_]/.test(j),Ce=U+q,H=he?k:te?y:d,q)}function gt(){return/[^\s]/g.test(j)?(Be(O.join("")),H=h,q):(O.push(j),G=j,q+1)}function Pt(){return(j==="\r"||j===`
`)&&G!=="\\"?(Be(O.join("")),H=h,q):(O.push(j),G=j,q+1)}function Qe(){return Pt()}function Xe(){return j==="/"&&G==="*"?(O.push(j),Be(O.join("")),H=h,q+1):(O.push(j),G=j,q+1)}function Tt(){if(G==="."&&/\d/.test(j))return H=E,q;if(G==="/"&&j==="*")return H=p,q;if(G==="/"&&j==="/")return H=x,q;if(j==="."&&O.length){for(;xt(O););return H=E,q}if(j===";"||j===")"||j==="("){if(O.length)for(;xt(O););return Be(j),H=h,q+1}var Te=O.length===2&&j!=="=";if(/[\w_\d\s]/.test(j)||Te){for(;xt(O););return H=h,q}return O.push(j),G=j,q+1}function xt(Te){var nt=0,ut,ct;do{if(ut=u.indexOf(Te.slice(0,Te.length+nt).join("")),ct=u[ut],ut===-1){if(nt--+Te.length>0)continue;ct=Te.slice(0,1).join("")}return Be(ct),Ce+=ct.length,O=O.slice(ct.length),O.length}while(!0)}function _t(){return/[^a-fA-F0-9]/.test(j)?(Be(O.join("")),H=h,q):(O.push(j),G=j,q+1)}function Ct(){return j==="."||/[eE]/.test(j)?(O.push(j),H=E,G=j,q+1):j==="x"&&O.length===1&&O[0]==="0"?(H=v,O.push(j),G=j,q+1):/[^\d]/.test(j)?(Be(O.join("")),H=h,q):(O.push(j),G=j,q+1)}function jt(){return j==="f"&&(O.push(j),G=j,q+=1),/[eE]/.test(j)||(j==="-"||j==="+")&&/[eE]/.test(G)?(O.push(j),G=j,q+1):/[^\d]/.test(j)?(Be(O.join("")),H=h,q):(O.push(j),G=j,q+1)}function At(){if(/[^\d\w_]/.test(j)){var Te=O.join("");return me[Te]?H=_:Re[Te]?H=L:H=A,Be(O.join("")),H=h,q}return O.push(j),G=j,q+1}}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(u){return!/^(gl\_|texture)/.test(u)}),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"])},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"]},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"])},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"]},7827:function(i){i.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(i,a,o){var s=o(5874);i.exports=u;function u(l,f){var c=s(f),h=[];return h=h.concat(c(l)),h=h.concat(c(null)),h}},3236:function(i){i.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],u=0;u<a.length-1;u++)s.push(a[u],o[u]||"");return s.push(a[u]),s.join("")}},7520:function(i,a,o){"use strict";var s=o(9507);function u(){var l=!1;try{var f=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("test",null,f),window.removeEventListener("test",null,f)}catch(c){l=!1}return l}i.exports=s&&u()},3778:function(i,a){a.read=function(o,s,u,l,f){var c,h,d=f*8-l-1,p=(1<<d)-1,x=p>>1,b=-7,y=u?f-1:0,k=u?-1:1,E=o[s+y];for(y+=k,c=E&(1<<-b)-1,E>>=-b,b+=d;b>0;c=c*256+o[s+y],y+=k,b-=8);for(h=c&(1<<-b)-1,c>>=-b,b+=l;b>0;h=h*256+o[s+y],y+=k,b-=8);if(c===0)c=1-x;else{if(c===p)return h?NaN:(E?-1:1)*(1/0);h=h+Math.pow(2,l),c=c-x}return(E?-1:1)*h*Math.pow(2,c-l)},a.write=function(o,s,u,l,f,c){var h,d,p,x=c*8-f-1,b=(1<<x)-1,y=b>>1,k=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=l?0:c-1,A=l?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*(p=Math.pow(2,-h))<1&&(h--,p*=2),h+y>=1?s+=k/p:s+=k*Math.pow(2,1-y),s*p>=2&&(h++,p/=2),h+y>=b?(d=0,h=b):h+y>=1?(d=(s*p-1)*Math.pow(2,f),h=h+y):(d=s*Math.pow(2,y-1)*Math.pow(2,f),h=0));f>=8;o[u+E]=d&255,E+=A,d/=256,f-=8);for(h=h<<f|d,x+=f;x>0;o[u+E]=h&255,E+=A,h/=256,x-=8);o[u+E-A]|=L*128}},8954:function(i,a,o){"use strict";i.exports=y;var s=o(3250),u=o(6803).Fw;function l(k,E,A){this.vertices=k,this.adjacent=E,this.boundary=A,this.lastVisited=-1}l.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 f(k,E,A){this.vertices=k,this.cell=E,this.index=A}function c(k,E){return u(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 p=[];function x(k,E,A){this.dimension=k,this.vertices=E,this.simplices=A,this.interior=A.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 _=p[k];_||(_=p[k]=d(k)),this.orient=_}var b=x.prototype;b.handleBoundaryDegeneracy=function(k,E){var A=this.dimension,L=this.vertices.length-1,_=this.tuple,C=this.vertices,M=[k];for(k.lastVisited=-L;M.length>0;){k=M.pop();for(var v=k.adjacent,z=0;z<=A;++z){var T=v[z];if(!(!T.boundary||T.lastVisited<=-L)){for(var F=T.vertices,q=0;q<=A;++q){var U=F[q];U<0?_[q]=E:_[q]=C[U]}var H=this.orient();if(H>0)return T;T.lastVisited=-L,H===0&&M.push(T)}}}return null},b.walk=function(k,E){var A=this.vertices.length-1,L=this.dimension,_=this.vertices,C=this.tuple,M=E?this.interior.length*Math.random()|0:this.interior.length-1,v=this.interior[M];e:for(;!v.boundary;){for(var z=v.vertices,T=v.adjacent,F=0;F<=L;++F)C[F]=_[z[F]];v.lastVisited=A;for(var F=0;F<=L;++F){var q=T[F];if(!(q.lastVisited>=A)){var U=C[F];C[F]=k;var H=this.orient();if(C[F]=U,H<0){v=q;continue e}else q.boundary?q.lastVisited=-A:q.lastVisited=A}}return}return v},b.addPeaks=function(k,E){var A=this.vertices.length-1,L=this.dimension,_=this.vertices,C=this.tuple,M=this.interior,v=this.simplices,z=[E];E.lastVisited=A,E.vertices[E.vertices.indexOf(-1)]=A,E.boundary=!1,M.push(E);for(var T=[];z.length>0;){var E=z.pop(),F=E.vertices,q=E.adjacent,U=F.indexOf(A);if(!(U<0)){for(var H=0;H<=L;++H)if(H!==U){var j=q[H];if(!(!j.boundary||j.lastVisited>=A)){var G=j.vertices;if(j.lastVisited!==-A){for(var O=0,W=0;W<=L;++W)G[W]<0?(O=W,C[W]=k):C[W]=_[G[W]];var re=this.orient();if(re>0){G[O]=A,j.boundary=!1,M.push(j),z.push(j),j.lastVisited=A;continue}else j.lastVisited=-A}var ne=j.adjacent,be=F.slice(),ze=q.slice(),Ce=new l(be,ze,!0);v.push(Ce);var he=ne.indexOf(E);if(!(he<0)){ne[he]=Ce,ze[U]=j,be[H]=-1,ze[H]=E,q[H]=Ce,Ce.flip();for(var W=0;W<=L;++W){var te=be[W];if(!(te<0||te===A)){for(var ke=new Array(L-1),Ee=0,Me=0;Me<=L;++Me){var Oe=be[Me];Oe<0||Me===W||(ke[Ee++]=Oe)}T.push(new f(ke,Ce,W))}}}}}}}T.sort(c);for(var H=0;H+1<T.length;H+=2){var Re=T[H],me=T[H+1],Be=Re.index,fe=me.index;Be<0||fe<0||(Re.cell.adjacent[Re.index]=me.cell,me.cell.adjacent[me.index]=Re.cell)}},b.insert=function(k,E){var A=this.vertices;A.push(k);var L=this.walk(k,E);if(L){for(var _=this.dimension,C=this.tuple,M=0;M<=_;++M){var v=L.vertices[M];v<0?C[M]=k:C[M]=A[v]}var z=this.orient(C);z<0||z===0&&(L=this.handleBoundaryDegeneracy(L,k),!L)||this.addPeaks(k,L)}},b.boundary=function(){for(var k=this.dimension,E=[],A=this.simplices,L=A.length,_=0;_<L;++_){var C=A[_];if(C.boundary){for(var M=new Array(k),v=C.vertices,z=0,T=0,F=0;F<=k;++F)v[F]>=0?M[z++]=v[F]:T=F&1;if(T===(k&1)){var q=M[0];M[0]=M[1],M[1]=q}E.push(M)}}return E};function y(k,E){var A=k.length;if(A===0)throw new Error("Must have at least d+1 points");var L=k[0].length;if(A<=L)throw new Error("Must input at least d+1 points");var _=k.slice(0,L+1),C=s.apply(void 0,_);if(C===0)throw new Error("Input not in general position");for(var M=new Array(L+1),v=0;v<=L;++v)M[v]=v;C<0&&(M[0]=1,M[1]=0);for(var z=new l(M,new Array(L+1),!1),T=z.adjacent,F=new Array(L+2),v=0;v<=L;++v){for(var q=M.slice(),U=0;U<=L;++U)U===v&&(q[U]=-1);var H=q[0];q[0]=q[1],q[1]=H;var j=new l(q,new Array(L+1),!0);T[v]=j,F[v]=j}F[L+1]=z;for(var v=0;v<=L;++v)for(var q=T[v].vertices,G=T[v].adjacent,U=0;U<=L;++U){var O=q[U];if(O<0){G[U]=z;continue}for(var W=0;W<=L;++W)T[W].vertices.indexOf(O)<0&&(G[U]=T[W])}for(var re=new x(L,_,F),ne=!!E,v=L+1;v<A;++v)re.insert(k[v],ne);return re.boundary()}},3352:function(i,a,o){"use strict";var s=o(2478),u=0,l=1,f=2;i.exports=z;function c(T,F,q,U,H){this.mid=T,this.left=F,this.right=q,this.leftPoints=U,this.rightPoints=H,this.count=(F?F.count:0)+(q?q.count:0)+U.length}var h=c.prototype;function d(T,F){T.mid=F.mid,T.left=F.left,T.right=F.right,T.leftPoints=F.leftPoints,T.rightPoints=F.rightPoints,T.count=F.count}function p(T,F){var q=C(F);T.mid=q.mid,T.left=q.left,T.right=q.right,T.leftPoints=q.leftPoints,T.rightPoints=q.rightPoints,T.count=q.count}function x(T,F){var q=T.intervals([]);q.push(F),p(T,q)}function b(T,F){var q=T.intervals([]),U=q.indexOf(F);return U<0?u:(q.splice(U,1),p(T,q),l)}h.intervals=function(T){return T.push.apply(T,this.leftPoints),this.left&&this.left.intervals(T),this.right&&this.right.intervals(T),T},h.insert=function(T){var F=this.count-this.leftPoints.length;if(this.count+=1,T[1]<this.mid)this.left?4*(this.left.count+1)>3*(F+1)?x(this,T):this.left.insert(T):this.left=C([T]);else if(T[0]>this.mid)this.right?4*(this.right.count+1)>3*(F+1)?x(this,T):this.right.insert(T):this.right=C([T]);else{var q=s.ge(this.leftPoints,T,L),U=s.ge(this.rightPoints,T,_);this.leftPoints.splice(q,0,T),this.rightPoints.splice(U,0,T)}},h.remove=function(T){var F=this.count-this.leftPoints;if(T[1]<this.mid){if(!this.left)return u;var q=this.right?this.right.count:0;if(4*q>3*(F-1))return b(this,T);var U=this.left.remove(T);return U===f?(this.left=null,this.count-=1,l):(U===l&&(this.count-=1),U)}else if(T[0]>this.mid){if(!this.right)return u;var H=this.left?this.left.count:0;if(4*H>3*(F-1))return b(this,T);var U=this.right.remove(T);return U===f?(this.right=null,this.count-=1,l):(U===l&&(this.count-=1),U)}else{if(this.count===1)return this.leftPoints[0]===T?f:u;if(this.leftPoints.length===1&&this.leftPoints[0]===T){if(this.left&&this.right){for(var j=this,G=this.left;G.right;)j=G,G=G.right;if(j===this)G.right=this.right;else{var O=this.left,U=this.right;j.count-=G.count,j.right=G.left,G.left=O,G.right=U}d(this,G),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 l}for(var O=s.ge(this.leftPoints,T,L);O<this.leftPoints.length&&this.leftPoints[O][0]===T[0];++O)if(this.leftPoints[O]===T){this.count-=1,this.leftPoints.splice(O,1);for(var U=s.ge(this.rightPoints,T,_);U<this.rightPoints.length&&this.rightPoints[U][1]===T[1];++U)if(this.rightPoints[U]===T)return this.rightPoints.splice(U,1),l}return u}};function y(T,F,q){for(var U=0;U<T.length&&T[U][0]<=F;++U){var H=q(T[U]);if(H)return H}}function k(T,F,q){for(var U=T.length-1;U>=0&&T[U][1]>=F;--U){var H=q(T[U]);if(H)return H}}function E(T,F){for(var q=0;q<T.length;++q){var U=F(T[q]);if(U)return U}}h.queryPoint=function(T,F){if(T<this.mid){if(this.left){var q=this.left.queryPoint(T,F);if(q)return q}return y(this.leftPoints,T,F)}else if(T>this.mid){if(this.right){var q=this.right.queryPoint(T,F);if(q)return q}return k(this.rightPoints,T,F)}else return E(this.leftPoints,F)},h.queryInterval=function(T,F,q){if(T<this.mid&&this.left){var U=this.left.queryInterval(T,F,q);if(U)return U}if(F>this.mid&&this.right){var U=this.right.queryInterval(T,F,q);if(U)return U}return F<this.mid?y(this.leftPoints,F,q):T>this.mid?k(this.rightPoints,T,q):E(this.leftPoints,q)};function A(T,F){return T-F}function L(T,F){var q=T[0]-F[0];return q||T[1]-F[1]}function _(T,F){var q=T[1]-F[1];return q||T[0]-F[0]}function C(T){if(T.length===0)return null;for(var F=[],q=0;q<T.length;++q)F.push(T[q][0],T[q][1]);F.sort(A);for(var U=F[F.length>>1],H=[],j=[],G=[],q=0;q<T.length;++q){var O=T[q];O[1]<U?H.push(O):U<O[0]?j.push(O):G.push(O)}var W=G,re=G.slice();return W.sort(L),re.sort(_),new c(U,C(H),C(j),W,re)}function M(T){this.root=T}var v=M.prototype;v.insert=function(T){this.root?this.root.insert(T):this.root=new c(T[0],null,null,[T],[T])},v.remove=function(T){if(this.root){var F=this.root.remove(T);return F===f&&(this.root=null),F!==u}return!1},v.queryPoint=function(T,F){if(this.root)return this.root.queryPoint(T,F)},v.queryInterval=function(T,F,q){if(T<=F&&this.root)return this.root.queryInterval(T,F,q)},Object.defineProperty(v,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(v,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function z(T){return!T||T.length===0?new M(null):new M(C(T))}},9507:function(i){i.exports=!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))}},5219:function(i){"use strict";i.exports=function(a){for(var o=a.length,s,u=0;u<o;u++)if(s=a.charCodeAt(u),(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}},395:function(i){function a(o,s,u){return o*(1-u)+s*u}i.exports=a},2652:function(i,a,o){var s=o(4335),u=o(6864),l=o(1903),f=o(9921),c=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},p=u(),x=u(),b=[0,0,0,0],y=[[0,0,0],[0,0,0],[0,0,0]],k=[0,0,0];i.exports=function(C,M,v,z,T,F){if(M||(M=[0,0,0]),v||(v=[0,0,0]),z||(z=[0,0,0]),T||(T=[0,0,0,1]),F||(F=[0,0,0,1]),!s(p,C)||(l(x,p),x[3]=0,x[7]=0,x[11]=0,x[15]=1,Math.abs(f(x)<1e-8)))return!1;var q=p[3],U=p[7],H=p[11],j=p[12],G=p[13],O=p[14],W=p[15];if(q!==0||U!==0||H!==0){b[0]=q,b[1]=U,b[2]=H,b[3]=W;var re=c(x,x);if(!re)return!1;h(x,x),E(T,b,x)}else T[0]=T[1]=T[2]=0,T[3]=1;if(M[0]=j,M[1]=G,M[2]=O,A(y,p),v[0]=d.length(y[0]),d.normalize(y[0],y[0]),z[0]=d.dot(y[0],y[1]),L(y[1],y[1],y[0],1,-z[0]),v[1]=d.length(y[1]),d.normalize(y[1],y[1]),z[0]/=v[1],z[1]=d.dot(y[0],y[2]),L(y[2],y[2],y[0],1,-z[1]),z[2]=d.dot(y[1],y[2]),L(y[2],y[2],y[1],1,-z[2]),v[2]=d.length(y[2]),d.normalize(y[2],y[2]),z[1]/=v[2],z[2]/=v[2],d.cross(k,y[1],y[2]),d.dot(y[0],k)<0)for(var ne=0;ne<3;ne++)v[ne]*=-1,y[ne][0]*=-1,y[ne][1]*=-1,y[ne][2]*=-1;return F[0]=.5*Math.sqrt(Math.max(1+y[0][0]-y[1][1]-y[2][2],0)),F[1]=.5*Math.sqrt(Math.max(1-y[0][0]+y[1][1]-y[2][2],0)),F[2]=.5*Math.sqrt(Math.max(1-y[0][0]-y[1][1]+y[2][2],0)),F[3]=.5*Math.sqrt(Math.max(1+y[0][0]+y[1][1]+y[2][2],0)),y[2][1]>y[1][2]&&(F[0]=-F[0]),y[0][2]>y[2][0]&&(F[1]=-F[1]),y[1][0]>y[0][1]&&(F[2]=-F[2]),!0};function E(_,C,M){var v=C[0],z=C[1],T=C[2],F=C[3];return _[0]=M[0]*v+M[4]*z+M[8]*T+M[12]*F,_[1]=M[1]*v+M[5]*z+M[9]*T+M[13]*F,_[2]=M[2]*v+M[6]*z+M[10]*T+M[14]*F,_[3]=M[3]*v+M[7]*z+M[11]*T+M[15]*F,_}function A(_,C){_[0][0]=C[0],_[0][1]=C[1],_[0][2]=C[2],_[1][0]=C[4],_[1][1]=C[5],_[1][2]=C[6],_[2][0]=C[8],_[2][1]=C[9],_[2][2]=C[10]}function L(_,C,M,v,z){_[0]=C[0]*v+M[0]*z,_[1]=C[1]*v+M[1]*z,_[2]=C[2]*v+M[2]*z}},4335:function(i){i.exports=function(o,s){var u=s[15];if(u===0)return!1;for(var l=1/u,f=0;f<16;f++)o[f]=s[f]*l;return!0}},7442:function(i,a,o){var s=o(6658),u=o(7182),l=o(2652),f=o(9921),c=o(8648),h=b(),d=b(),p=b();i.exports=x;function x(E,A,L,_){if(f(A)===0||f(L)===0)return!1;var C=l(A,h.translate,h.scale,h.skew,h.perspective,h.quaternion),M=l(L,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!C||!M?!1:(s(p.translate,h.translate,d.translate,_),s(p.skew,h.skew,d.skew,_),s(p.scale,h.scale,d.scale,_),s(p.perspective,h.perspective,d.perspective,_),c(p.quaternion,h.quaternion,d.quaternion,_),u(E,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function b(){return{translate:y(),scale:y(1),skew:y(),perspective:k(),quaternion:k()}}function y(E){return[E||0,E||0,E||0]}function k(){return[0,0,0,1]}},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)},u=s.create(),l=s.create();i.exports=function(c,h,d,p,x,b){return s.identity(c),s.fromRotationTranslation(c,b,h),c[3]=x[0],c[7]=x[1],c[11]=x[2],c[15]=x[3],s.identity(l),p[2]!==0&&(l[9]=p[2],s.multiply(c,c,l)),p[1]!==0&&(l[9]=0,l[8]=p[1],s.multiply(c,c,l)),p[0]!==0&&(l[8]=0,l[4]=p[0],s.multiply(c,c,l)),s.scale(c,c,d),c}},1811:function(i,a,o){"use strict";var s=o(2478),u=o(7442),l=o(7608),f=o(5567),c=o(2408),h=o(7089),d=o(6582),p=o(7656),x=o(2504),b=o(3536),y=[0,0,0];i.exports=L;function k(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.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(_){var C=this._time,M=s.le(C,_),v=this.computedMatrix;if(!(M<0)){var z=this._components;if(M===C.length-1)for(var T=16*M,F=0;F<16;++F)v[F]=z[T++];else{for(var q=C[M+1]-C[M],T=16*M,U=this.prevMatrix,H=!0,F=0;F<16;++F)U[F]=z[T++];for(var j=this.nextMatrix,F=0;F<16;++F)j[F]=z[T++],H=H&&U[F]===j[F];if(q<1e-6||H)for(var F=0;F<16;++F)v[F]=U[F];else u(v,U,j,(_-C[M])/q)}var G=this.computedUp;G[0]=v[1],G[1]=v[5],G[2]=v[9],b(G,G);var O=this.computedInverse;l(O,v);var W=this.computedEye,re=O[15];W[0]=O[12]/re,W[1]=O[13]/re,W[2]=O[14]/re;for(var ne=this.computedCenter,be=Math.exp(this.computedRadius[0]),F=0;F<3;++F)ne[F]=W[F]-v[2+4*F]*be}},E.idle=function(_){if(!(_<this.lastT())){for(var C=this._components,M=C.length-16,v=0;v<16;++v)C.push(C[M++]);this._time.push(_)}},E.flush=function(_){var C=s.gt(this._time,_)-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(_,C,M,v){this.recalcMatrix(_),C=C||this.computedEye,M=M||y,v=v||this.computedUp,this.setMatrix(_,d(this.computedMatrix,C,M,v));for(var z=0,T=0;T<3;++T)z+=Math.pow(M[T]-C[T],2);z=Math.log(Math.sqrt(z)),this.computedRadius[0]=z},E.rotate=function(_,C,M,v){this.recalcMatrix(_);var z=this.computedInverse;C&&c(z,z,C),M&&f(z,z,M),v&&h(z,z,v),this.setMatrix(_,l(this.computedMatrix,z))};var A=[0,0,0];E.pan=function(_,C,M,v){A[0]=-(C||0),A[1]=-(M||0),A[2]=-(v||0),this.recalcMatrix(_);var z=this.computedInverse;p(z,z,A),this.setMatrix(_,l(z,z))},E.translate=function(_,C,M,v){A[0]=C||0,A[1]=M||0,A[2]=v||0,this.recalcMatrix(_);var z=this.computedMatrix;p(z,z,A),this.setMatrix(_,z)},E.setMatrix=function(_,C){if(!(_<this.lastT())){this._time.push(_);for(var M=0;M<16;++M)this._components.push(C[M])}},E.setDistance=function(_,C){this.computedRadius[0]=C},E.setDistanceLimits=function(_,C){var M=this._limits;M[0]=_,M[1]=C},E.getDistanceLimits=function(_){var C=this._limits;return _?(_[0]=C[0],_[1]=C[1],_):C};function L(_){_=_||{};var C=_.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new k(C)}},3090:function(i,a,o){"use strict";i.exports=u;var s=o(3250)[3];function u(l){var f=l.length;if(f<3){for(var k=new Array(f),c=0;c<f;++c)k[c]=c;return f===2&&l[0][0]===l[1][0]&&l[0][1]===l[1][1]?[0]:k}for(var h=new Array(f),c=0;c<f;++c)h[c]=c;h.sort(function(_,C){var M=l[_][0]-l[C][0];return M||l[_][1]-l[C][1]});for(var d=[h[0],h[1]],p=[h[0],h[1]],c=2;c<f;++c){for(var x=h[c],b=l[x],y=d.length;y>1&&s(l[d[y-2]],l[d[y-1]],b)<=0;)y-=1,d.pop();for(d.push(x),y=p.length;y>1&&s(l[p[y-2]],l[p[y-1]],b)>=0;)y-=1,p.pop();p.push(x)}for(var k=new Array(p.length+d.length-2),E=0,c=0,A=d.length;c<A;++c)k[E++]=d[c];for(var L=p.length-2;L>0;--L)k[E++]=p[L];return k}},351:function(i,a,o){"use strict";i.exports=u;var s=o(4687);function u(l,f){f||(f=l,l=window);var c=0,h=0,d=0,p={shift:!1,alt:!1,control:!1,meta:!1},x=!1;function b(T){var F=!1;return"altKey"in T&&(F=F||T.altKey!==p.alt,p.alt=!!T.altKey),"shiftKey"in T&&(F=F||T.shiftKey!==p.shift,p.shift=!!T.shiftKey),"ctrlKey"in T&&(F=F||T.ctrlKey!==p.control,p.control=!!T.ctrlKey),"metaKey"in T&&(F=F||T.metaKey!==p.meta,p.meta=!!T.metaKey),F}function y(T,F){var q=s.x(F),U=s.y(F);"buttons"in F&&(T=F.buttons|0),(T!==c||q!==h||U!==d||b(F))&&(c=T|0,h=q||0,d=U||0,f&&f(c,h,d,p))}function k(T){y(0,T)}function E(){(c||h||d||p.shift||p.alt||p.meta||p.control)&&(h=d=0,c=0,p.shift=p.alt=p.control=p.meta=!1,f&&f(0,0,0,p))}function A(T){b(T)&&f&&f(c,h,d,p)}function L(T){s.buttons(T)===0?y(0,T):y(c,T)}function _(T){y(c|s.buttons(T),T)}function C(T){y(c&~s.buttons(T),T)}function M(){x||(x=!0,l.addEventListener("mousemove",L),l.addEventListener("mousedown",_),l.addEventListener("mouseup",C),l.addEventListener("mouseleave",k),l.addEventListener("mouseenter",k),l.addEventListener("mouseout",k),l.addEventListener("mouseover",k),l.addEventListener("blur",E),l.addEventListener("keyup",A),l.addEventListener("keydown",A),l.addEventListener("keypress",A),l!==window&&(window.addEventListener("blur",E),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function v(){x&&(x=!1,l.removeEventListener("mousemove",L),l.removeEventListener("mousedown",_),l.removeEventListener("mouseup",C),l.removeEventListener("mouseleave",k),l.removeEventListener("mouseenter",k),l.removeEventListener("mouseout",k),l.removeEventListener("mouseover",k),l.removeEventListener("blur",E),l.removeEventListener("keyup",A),l.removeEventListener("keydown",A),l.removeEventListener("keypress",A),l!==window&&(window.removeEventListener("blur",E),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}M();var z={element:l};return Object.defineProperties(z,{enabled:{get:function(){return x},set:function(T){T?M():v()},enumerable:!0},buttons:{get:function(){return c},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),z}},24:function(i){var a={left:0,top:0};i.exports=o;function o(u,l,f){l=l||u.currentTarget||u.srcElement,Array.isArray(f)||(f=[0,0]);var c=u.clientX||0,h=u.clientY||0,d=s(l);return f[0]=c-d.left,f[1]=h-d.top,f}function s(u){return u===window||u===document||u===document.body?a:u.getBoundingClientRect()}},4687:function(i,a){"use strict";function o(f){if(typeof f=="object"){if("buttons"in f)return f.buttons;if("which"in f){var c=f.which;if(c===2)return 4;if(c===3)return 2;if(c>0)return 1<<c-1}else if("button"in f){var c=f.button;if(c===1)return 4;if(c===2)return 2;if(c>=0)return 1<<c}}return 0}a.buttons=o;function s(f){return f.target||f.srcElement||window}a.element=s;function u(f){if(typeof f=="object"){if("offsetX"in f)return f.offsetX;var c=s(f),h=c.getBoundingClientRect();return f.clientX-h.left}return 0}a.x=u;function l(f){if(typeof f=="object"){if("offsetY"in f)return f.offsetY;var c=s(f),h=c.getBoundingClientRect();return f.clientY-h.top}return 0}a.y=l},8512:function(i,a,o){"use strict";var s=o(665);i.exports=u;function u(l,f,c){typeof l=="function"&&(c=!!f,f=l,l=window);var h=s("ex",l),d=function(p){c&&p.preventDefault();var x=p.deltaX||0,b=p.deltaY||0,y=p.deltaZ||0,k=p.deltaMode,E=1;switch(k){case 1:E=h;break;case 2:E=window.innerHeight;break}if(x*=E,b*=E,y*=E,x||b||y)return f(x,b,y,p)};return l.addEventListener("wheel",d),d}},2640:function(i,a,o){"use strict";var s=o(1888);i.exports=f;var u={"false,0,1":function(h,d,p,x,b){return function(k,E,A,L){var _=k.shape[0]|0,C=k.shape[1]|0,M=k.data,v=k.offset|0,z=k.stride[0]|0,T=k.stride[1]|0,F=v,q,U=-z|0,H=0,j=-T|0,G=0,O=-z-T|0,W=0,re=z|0,ne=T-z*_|0,be=0,ze=0,Ce=0,he=2*_|0,te=x(he),ke=x(he),Ee=0,Me=0,Oe=-1,Re=-1,me=0,Be=-_|0,fe=_|0,Ze=0,et=-_-1|0,gt=_-1|0,Pt=0,Qe=0,Xe=0;for(be=0;be<_;++be)te[Ee++]=p(M[F],E,A,L),F+=re;if(F+=ne,C>0){if(ze=1,te[Ee++]=p(M[F],E,A,L),F+=re,_>0)for(be=1,q=M[F],Me=te[Ee]=p(q,E,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,E,A,L),Qe=ke[Ee]=Ce++),Ee+=1,F+=re,be=2;be<_;++be)q=M[F],Me=te[Ee]=p(q,E,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,E,A,L),Qe=ke[Ee]=Ce++,Pt!==me&&d(ke[Ee+Oe],Qe,W,H,Pt,me,E,A,L)),Ee+=1,F+=re;for(F+=ne,Ee=0,Xe=Oe,Oe=Re,Re=Xe,Xe=Be,Be=fe,fe=Xe,Xe=et,et=gt,gt=Xe,ze=2;ze<C;++ze){if(te[Ee++]=p(M[F],E,A,L),F+=re,_>0)for(be=1,q=M[F],Me=te[Ee]=p(q,E,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,E,A,L),Qe=ke[Ee]=Ce++,Pt!==Ze&&d(ke[Ee+Be],Qe,G,W,Ze,Pt,E,A,L)),Ee+=1,F+=re,be=2;be<_;++be)q=M[F],Me=te[Ee]=p(q,E,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,E,A,L),Qe=ke[Ee]=Ce++,Pt!==Ze&&d(ke[Ee+Be],Qe,G,W,Ze,Pt,E,A,L),Pt!==me&&d(ke[Ee+Oe],Qe,W,H,Pt,me,E,A,L)),Ee+=1,F+=re;ze&1&&(Ee=0),Xe=Oe,Oe=Re,Re=Xe,Xe=Be,Be=fe,fe=Xe,Xe=et,et=gt,gt=Xe,F+=ne}}b(ke),b(te)}},"false,1,0":function(h,d,p,x,b){return function(k,E,A,L){var _=k.shape[0]|0,C=k.shape[1]|0,M=k.data,v=k.offset|0,z=k.stride[0]|0,T=k.stride[1]|0,F=v,q,U=-z|0,H=0,j=-T|0,G=0,O=-z-T|0,W=0,re=T|0,ne=z-T*C|0,be=0,ze=0,Ce=0,he=2*C|0,te=x(he),ke=x(he),Ee=0,Me=0,Oe=-1,Re=-1,me=0,Be=-C|0,fe=C|0,Ze=0,et=-C-1|0,gt=C-1|0,Pt=0,Qe=0,Xe=0;for(ze=0;ze<C;++ze)te[Ee++]=p(M[F],E,A,L),F+=re;if(F+=ne,_>0){if(be=1,te[Ee++]=p(M[F],E,A,L),F+=re,C>0)for(ze=1,q=M[F],Me=te[Ee]=p(q,E,A,L),Ze=te[Ee+Be],me=te[Ee+Oe],Pt=te[Ee+et],(Me!==Ze||Me!==me||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,Ze,me,Pt,E,A,L),Qe=ke[Ee]=Ce++),Ee+=1,F+=re,ze=2;ze<C;++ze)q=M[F],Me=te[Ee]=p(q,E,A,L),Ze=te[Ee+Be],me=te[Ee+Oe],Pt=te[Ee+et],(Me!==Ze||Me!==me||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,Ze,me,Pt,E,A,L),Qe=ke[Ee]=Ce++,Pt!==me&&d(ke[Ee+Oe],Qe,G,W,me,Pt,E,A,L)),Ee+=1,F+=re;for(F+=ne,Ee=0,Xe=Be,Be=fe,fe=Xe,Xe=Oe,Oe=Re,Re=Xe,Xe=et,et=gt,gt=Xe,be=2;be<_;++be){if(te[Ee++]=p(M[F],E,A,L),F+=re,C>0)for(ze=1,q=M[F],Me=te[Ee]=p(q,E,A,L),Ze=te[Ee+Be],me=te[Ee+Oe],Pt=te[Ee+et],(Me!==Ze||Me!==me||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,Ze,me,Pt,E,A,L),Qe=ke[Ee]=Ce++,Pt!==Ze&&d(ke[Ee+Be],Qe,W,H,Pt,Ze,E,A,L)),Ee+=1,F+=re,ze=2;ze<C;++ze)q=M[F],Me=te[Ee]=p(q,E,A,L),Ze=te[Ee+Be],me=te[Ee+Oe],Pt=te[Ee+et],(Me!==Ze||Me!==me||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,Ze,me,Pt,E,A,L),Qe=ke[Ee]=Ce++,Pt!==me&&d(ke[Ee+Oe],Qe,G,W,me,Pt,E,A,L),Pt!==Ze&&d(ke[Ee+Be],Qe,W,H,Pt,Ze,E,A,L)),Ee+=1,F+=re;be&1&&(Ee=0),Xe=Be,Be=fe,fe=Xe,Xe=Oe,Oe=Re,Re=Xe,Xe=et,et=gt,gt=Xe,F+=ne}}b(ke),b(te)}}};function l(c,h,d,p,x,b){var y=[b,x].join(","),k=u[y];return k(c,h,d,s.mallocUint32,s.freeUint32)}function f(c){function h(E){throw new Error("ndarray-extract-contour: "+E)}typeof c!="object"&&h("Must specify arguments");var d=c.order;Array.isArray(d)||h("Must specify order");var p=c.arrayArguments||1;p<1&&h("Must have at least one array argument");var x=c.scalarArguments||0;x<0&&h("Scalar arg count must be > 0"),typeof c.vertex!="function"&&h("Must specify vertex creation function"),typeof c.cell!="function"&&h("Must specify cell creation function"),typeof c.phase!="function"&&h("Must specify phase function");for(var b=c.getters||[],y=new Array(p),k=0;k<p;++k)b.indexOf(k)>=0?y[k]=!0:y[k]=!1;return l(c.vertex,c.cell,c.phase,x,d,y)}},6199:function(i,a,o){"use strict";var s=o(1338),u={zero:function(L,_,C,M){var v=L[0],z=C[0];M|=0;var T=0,F=z;for(T=0;T<v;++T)_[M]=0,M+=F},fdTemplate1:function(L,_,C,M,v,z,T){var F=L[0],q=C[0],U=z[0],H=-1*q,j=q;M|=0,T|=0;var G=0,O=q,W=U;for(G=0;G<F;++G)v[T]=.5*(_[M+H]-_[M+j]),M+=O,T+=W},fdTemplate2:function(L,_,C,M,v,z,T,F,q,U){var H=L[0],j=L[1],G=C[0],O=C[1],W=z[0],re=z[1],ne=q[0],be=q[1],ze=-1*G,Ce=G,he=-1*O,te=O;M|=0,T|=0,U|=0;var ke=0,Ee=0,Me=O,Oe=G-j*O,Re=re,me=W-j*re,Be=be,fe=ne-j*be;for(Ee=0;Ee<H;++Ee){for(ke=0;ke<j;++ke)v[T]=.5*(_[M+ze]-_[M+Ce]),F[U]=.5*(_[M+he]-_[M+te]),M+=Me,T+=Re,U+=Be;M+=Oe,T+=me,U+=fe}}},l={cdiff:function(L){var _={};return function(M,v,z){var T=M.dtype,F=M.order,q=v.dtype,U=v.order,H=z.dtype,j=z.order,G=[T,F.join(),q,U.join(),H,j.join()].join(),O=_[G];return O||(_[G]=O=L([T,F,q,U,H,j])),O(M.shape.slice(0),M.data,M.stride,M.offset|0,v.data,v.stride,v.offset|0,z.data,z.stride,z.offset|0)}},zero:function(L){var _={};return function(M){var v=M.dtype,z=M.order,T=[v,z.join()].join(),F=_[T];return F||(_[T]=F=L([v,z])),F(M.shape.slice(0),M.data,M.stride,M.offset|0)}},fdTemplate1:function(L){var _={};return function(M,v){var z=M.dtype,T=M.order,F=v.dtype,q=v.order,U=[z,T.join(),F,q.join()].join(),H=_[U];return H||(_[U]=H=L([z,T,F,q])),H(M.shape.slice(0),M.data,M.stride,M.offset|0,v.data,v.stride,v.offset|0)}},fdTemplate2:function(L){var _={};return function(M,v,z){var T=M.dtype,F=M.order,q=v.dtype,U=v.order,H=z.dtype,j=z.order,G=[T,F.join(),q,U.join(),H,j.join()].join(),O=_[G];return O||(_[G]=O=L([T,F,q,U,H,j])),O(M.shape.slice(0),M.data,M.stride,M.offset|0,v.data,v.stride,v.offset|0,z.data,z.stride,z.offset|0)}}};function f(L){var _=l[L.funcName];return _(c.bind(void 0,L))}function c(L){return u[L.funcName]}function h(L){return f({funcName:L.funcName})}var d={},p={},x={body:"",args:[],thisVars:[],localVars:[]},b=h({funcName:"cdiff"}),y=h({funcName:"zero"});function k(L){return L in d?d[L]:d[L]=h({funcName:"fdTemplate"+L})}function E(L,_,C,M){return function(v,z){var T=z.shape.slice();return T[0]>2&&T[1]>2&&M(z.pick(-1,-1).lo(1,1).hi(T[0]-2,T[1]-2),v.pick(-1,-1,0).lo(1,1).hi(T[0]-2,T[1]-2),v.pick(-1,-1,1).lo(1,1).hi(T[0]-2,T[1]-2)),T[1]>2&&(C(z.pick(0,-1).lo(1).hi(T[1]-2),v.pick(0,-1,1).lo(1).hi(T[1]-2)),_(v.pick(0,-1,0).lo(1).hi(T[1]-2))),T[1]>2&&(C(z.pick(T[0]-1,-1).lo(1).hi(T[1]-2),v.pick(T[0]-1,-1,1).lo(1).hi(T[1]-2)),_(v.pick(T[0]-1,-1,0).lo(1).hi(T[1]-2))),T[0]>2&&(C(z.pick(-1,0).lo(1).hi(T[0]-2),v.pick(-1,0,0).lo(1).hi(T[0]-2)),_(v.pick(-1,0,1).lo(1).hi(T[0]-2))),T[0]>2&&(C(z.pick(-1,T[1]-1).lo(1).hi(T[0]-2),v.pick(-1,T[1]-1,0).lo(1).hi(T[0]-2)),_(v.pick(-1,T[1]-1,1).lo(1).hi(T[0]-2))),v.set(0,0,0,0),v.set(0,0,1,0),v.set(T[0]-1,0,0,0),v.set(T[0]-1,0,1,0),v.set(0,T[1]-1,0,0),v.set(0,T[1]-1,1,0),v.set(T[0]-1,T[1]-1,0,0),v.set(T[0]-1,T[1]-1,1,0),v}}function A(L){var _=L.join(),T=p[_];if(T)return T;for(var C=L.length,M=[b,y],v=1;v<=C;++v)M.push(k(v));var z=E,T=z.apply(void 0,M);return p[_]=T,T}i.exports=function(_,C,M){if(Array.isArray(M)||(typeof M=="string"?M=s(C.dimension,M):M=s(C.dimension,"clamp")),C.size===0)return _;if(C.dimension===0)return _.set(0),_;var v=A(M);return v(_,C)}},4317:function(i){"use strict";function a(f,c){var h=Math.floor(c),d=c-h,p=0<=h&&h<f.shape[0],x=0<=h+1&&h+1<f.shape[0],b=p?+f.get(h):0,y=x?+f.get(h+1):0;return(1-d)*b+d*y}function o(f,c,h){var d=Math.floor(c),p=c-d,x=0<=d&&d<f.shape[0],b=0<=d+1&&d+1<f.shape[0],y=Math.floor(h),k=h-y,E=0<=y&&y<f.shape[1],A=0<=y+1&&y+1<f.shape[1],L=x&&E?f.get(d,y):0,_=x&&A?f.get(d,y+1):0,C=b&&E?f.get(d+1,y):0,M=b&&A?f.get(d+1,y+1):0;return(1-k)*((1-p)*L+p*C)+k*((1-p)*_+p*M)}function s(f,c,h,d){var p=Math.floor(c),x=c-p,b=0<=p&&p<f.shape[0],y=0<=p+1&&p+1<f.shape[0],k=Math.floor(h),E=h-k,A=0<=k&&k<f.shape[1],L=0<=k+1&&k+1<f.shape[1],_=Math.floor(d),C=d-_,M=0<=_&&_<f.shape[2],v=0<=_+1&&_+1<f.shape[2],z=b&&A&&M?f.get(p,k,_):0,T=b&&L&&M?f.get(p,k+1,_):0,F=y&&A&&M?f.get(p+1,k,_):0,q=y&&L&&M?f.get(p+1,k+1,_):0,U=b&&A&&v?f.get(p,k,_+1):0,H=b&&L&&v?f.get(p,k+1,_+1):0,j=y&&A&&v?f.get(p+1,k,_+1):0,G=y&&L&&v?f.get(p+1,k+1,_+1):0;return(1-C)*((1-E)*((1-x)*z+x*F)+E*((1-x)*T+x*q))+C*((1-E)*((1-x)*U+x*j)+E*((1-x)*H+x*G))}function u(f){var c=f.shape.length|0,h=new Array(c),d=new Array(c),p=new Array(c),x=new Array(c),b,y;for(b=0;b<c;++b)y=+arguments[b+1],h[b]=Math.floor(y),d[b]=y-h[b],p[b]=0<=h[b]&&h[b]<f.shape[b],x[b]=0<=h[b]+1&&h[b]+1<f.shape[b];var k=0,E,A,L;e:for(b=0;b<1<<c;++b){for(A=1,L=f.offset,E=0;E<c;++E)if(b&1<<E){if(!x[E])continue e;A*=d[E],L+=f.stride[E]*(h[E]+1)}else{if(!p[E])continue e;A*=1-d[E],L+=f.stride[E]*h[E]}k+=A*f.data[L]}return k}function l(f,c,h,d){switch(f.shape.length){case 0:return 0;case 1:return a(f,c);case 2:return o(f,c,h);case 3:return s(f,c,h,d);default:return u.apply(void 0,arguments)}}i.exports=l,i.exports.d1=a,i.exports.d2=o,i.exports.d3=s},5298:function(i,a){"use strict";var o={"float64,2,1,0":function(){return function(p,x,b,y,k){var E=p[0],A=p[1],L=p[2],_=b[0],C=b[1],M=b[2];y|=0;var v=0,z=0,T=0,F=M,q=C-L*M,U=_-A*C;for(T=0;T<E;++T){for(z=0;z<A;++z){for(v=0;v<L;++v)x[y]/=k,y+=F;y+=q}y+=U}}},"uint8,2,0,1,float64,2,1,0":function(){return function(p,x,b,y,k,E,A,L){var _=p[0],C=p[1],M=p[2],v=b[0],z=b[1],T=b[2],F=E[0],q=E[1],U=E[2];y|=0,A|=0;for(var H=y,j=A,G=p[0]|0;G>0;){G<64?(_=G,G=0):(_=64,G-=64);for(var O=p[1]|0;O>0;){O<64?(C=O,O=0):(C=64,O-=64),y=H+G*v+O*z,A=j+G*F+O*q;var W=0,re=0,ne=0,be=T,ze=v-M*T,Ce=z-_*v,he=U,te=F-M*U,ke=q-_*F;for(ne=0;ne<C;++ne){for(re=0;re<_;++re){for(W=0;W<M;++W)x[y]=k[A]*L,y+=be,A+=he;y+=ze,A+=te}y+=Ce,A+=ke}}}}},"float32,1,0,float32,1,0":function(){return function(p,x,b,y,k,E,A){var L=p[0],_=p[1],C=b[0],M=b[1],v=E[0],z=E[1];y|=0,A|=0;var T=0,F=0,q=M,U=C-_*M,H=z,j=v-_*z;for(F=0;F<L;++F){for(T=0;T<_;++T)x[y]=k[A],y+=q,A+=H;y+=U,A+=j}}},"float32,1,0,float32,0,1":function(){return function(p,x,b,y,k,E,A){var L=p[0],_=p[1],C=b[0],M=b[1],v=E[0],z=E[1];y|=0,A|=0;for(var T=y,F=A,q=p[1]|0;q>0;){q<64?(_=q,q=0):(_=64,q-=64);for(var U=p[0]|0;U>0;){U<64?(L=U,U=0):(L=64,U-=64),y=T+q*M+U*C,A=F+q*z+U*v;var H=0,j=0,G=M,O=C-_*M,W=z,re=v-_*z;for(j=0;j<L;++j){for(H=0;H<_;++H)x[y]=k[A],y+=G,A+=W;y+=O,A+=re}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(p,x,b,y,k,E,A){var L=p[0],_=p[1],C=p[2],M=b[0],v=b[1],z=b[2],T=E[0],F=E[1],q=E[2];y|=0,A|=0;for(var U=y,H=A,j=p[2]|0;j>0;){j<64?(C=j,j=0):(C=64,j-=64);for(var G=p[0]|0;G>0;){G<64?(L=G,G=0):(L=64,G-=64);for(var O=p[1]|0;O>0;){O<64?(_=O,O=0):(_=64,O-=64),y=U+j*z+G*M+O*v,A=H+j*q+G*T+O*F;var W=0,re=0,ne=0,be=z,ze=M-C*z,Ce=v-L*M,he=q,te=T-C*q,ke=F-L*T;for(ne=0;ne<_;++ne){for(re=0;re<L;++re){for(W=0;W<C;++W)x[y]=k[A],y+=be,A+=he;y+=ze,A+=te}y+=Ce,A+=ke}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(p,x,b,y,k,E,A){var L=p[0],_=p[1],C=p[2],M=b[0],v=b[1],z=b[2],T=E[0],F=E[1],q=E[2];y|=0,A|=0;var U=0,H=0,j=0,G=z,O=M-C*z,W=v-L*M,re=q,ne=T-C*q,be=F-L*T;for(j=0;j<_;++j){for(H=0;H<L;++H){for(U=0;U<C;++U)x[y]=k[A],y+=G,A+=re;y+=O,A+=ne}y+=W,A+=be}}}};function s(d,p){var x=p.join(","),b=o[x];return b()}var u=s,l={mul:function(d){var p={};return function(b,y,k){var E=b.dtype,A=b.order,L=y.dtype,_=y.order,C=k.dtype,M=k.order,v=[E,A.join(),L,_.join(),C,M.join()].join(),z=p[v];return z||(p[v]=z=d([E,A,L,_,C,M])),z(b.shape.slice(0),b.data,b.stride,b.offset|0,y.data,y.stride,y.offset|0,k.data,k.stride,k.offset|0)}},muls:function(d){var p={};return function(b,y,k){var E=b.dtype,A=b.order,L=y.dtype,_=y.order,C=[E,A.join(),L,_.join()].join(),M=p[C];return M||(p[C]=M=d([E,A,L,_])),M(b.shape.slice(0),b.data,b.stride,b.offset|0,y.data,y.stride,y.offset|0,k)}},mulseq:function(d){var p={};return function(b,y){var k=b.dtype,E=b.order,A=[k,E.join()].join(),L=p[A];return L||(p[A]=L=d([k,E])),L(b.shape.slice(0),b.data,b.stride,b.offset|0,y)}},div:function(d){var p={};return function(b,y,k){var E=b.dtype,A=b.order,L=y.dtype,_=y.order,C=k.dtype,M=k.order,v=[E,A.join(),L,_.join(),C,M.join()].join(),z=p[v];return z||(p[v]=z=d([E,A,L,_,C,M])),z(b.shape.slice(0),b.data,b.stride,b.offset|0,y.data,y.stride,y.offset|0,k.data,k.stride,k.offset|0)}},divs:function(d){var p={};return function(b,y,k){var E=b.dtype,A=b.order,L=y.dtype,_=y.order,C=[E,A.join(),L,_.join()].join(),M=p[C];return M||(p[C]=M=d([E,A,L,_])),M(b.shape.slice(0),b.data,b.stride,b.offset|0,y.data,y.stride,y.offset|0,k)}},divseq:function(d){var p={};return function(b,y){var k=b.dtype,E=b.order,A=[k,E.join()].join(),L=p[A];return L||(p[A]=L=d([k,E])),L(b.shape.slice(0),b.data,b.stride,b.offset|0,y)}},assign:function(d){var p={};return function(b,y){var k=b.dtype,E=b.order,A=y.dtype,L=y.order,_=[k,E.join(),A,L.join()].join(),C=p[_];return C||(p[_]=C=d([k,E,A,L])),C(b.shape.slice(0),b.data,b.stride,b.offset|0,y.data,y.stride,y.offset|0)}}};function f(d){var p=l[d.funcName];return p(u.bind(void 0,d))}function c(d){return f({funcName:d.funcName})}var h={mul:"*",div:"/"};(function(){for(var d in h)a[d]=c({funcName:d}),a[d+"s"]=c({funcName:d+"s"}),a[d+"seq"]=c({funcName:d+"seq"})})(),a.assign=c({funcName:"assign"})},9994:function(i,a,o){"use strict";var s=o(9618),u=o(8277);i.exports=function(f,c){for(var h=[],d=f,p=1;Array.isArray(d);)h.push(d.length),p*=d.length,d=d[0];return h.length===0?s():(c||(c=s(new Float64Array(p),h)),u(c,f),c)}},8277:function(i){"use strict";function a(){return function(c,h,d,p,x){var b=c[0],y=c[1],k=c[2],E=d[0],A=d[1],L=d[2],_=[0,0,0];p|=0;var C=0,M=0,v=0,z=L,T=A-k*L,F=E-y*A;for(v=0;v<b;++v){for(M=0;M<y;++M){for(C=0;C<k;++C){{var q=x,U;for(U=0;U<_.length-1;++U)q=q[_[U]];h[p]=q[_[_.length-1]]}p+=z,++_[2]}p+=T,_[2]-=k,++_[1]}p+=F,_[1]-=y,++_[0]}}}function o(){return a()}var s=o;function u(c){var h={};return function(p,x){var b=p.dtype,y=p.order,k=[b,y.join()].join(),E=h[k];return E||(h[k]=E=c([b,y])),E(p.shape.slice(0),p.data,p.stride,p.offset|0,x)}}function l(c){return u(s.bind(void 0,c))}function f(c){return l({funcName:c.funcName})}i.exports=f({funcName:"convert"})},7640:function(i,a,o){"use strict";var s=o(1888);function u(x){switch(x){case"uint32":return[s.mallocUint32,s.freeUint32];default:return null}}var l={"uint32,1,0":function(x,b){return function(k,E,A,L,_,C,M,v,z,T,F){var q,U,H,j=k*_+L,G,O=x(v),W,re,ne,be;for(q=k+1;q<=E;++q){for(U=q,j+=_,H=j,W=0,re=j,G=0;G<v;++G)O[W++]=A[re],re+=z;e:for(;U-- >k;){W=0,re=H-_;t:for(G=0;G<v;++G){if(ne=A[re],be=O[W],ne<be)break e;if(ne>be)break t;re+=T,W+=F}for(W=H,re=H-_,G=0;G<v;++G)A[W]=A[re],W+=z,re+=z;H-=_}for(W=H,re=0,G=0;G<v;++G)A[W]=O[re++],W+=z}b(O)}}};function f(x,b){var y=u(b),k=[b,x].join(","),E=l[k];return y?E(y[0],y[1]):E()}var c={"uint32,1,0":function(x,b,y){return function k(E,A,L,_,C,M,v,z,T,F,q){var U=(A-E+1)/6|0,H=E+U,j=A-U,G=E+A>>1,O=G-U,W=G+U,re=H,ne=O,be=G,ze=W,Ce=j,he=E+1,te=A-1,ke=!0,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt=0,Pt=0,Qe=0,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt=z,Kt=b(Vt),ir=b(Vt);Tt=C*re,xt=C*ne,Mt=_;e:for(Xe=0;Xe<z;++Xe){if(fe=Tt+Mt,Ze=xt+Mt,Qe=L[fe]-L[Ze],Qe>0){Me=re,re=ne,ne=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ze,xt=C*Ce,Mt=_;e:for(Xe=0;Xe<z;++Xe){if(fe=Tt+Mt,Ze=xt+Mt,Qe=L[fe]-L[Ze],Qe>0){Me=ze,ze=Ce,Ce=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*re,xt=C*be,Mt=_;e:for(Xe=0;Xe<z;++Xe){if(fe=Tt+Mt,Ze=xt+Mt,Qe=L[fe]-L[Ze],Qe>0){Me=re,re=be,be=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ne,xt=C*be,Mt=_;e:for(Xe=0;Xe<z;++Xe){if(fe=Tt+Mt,Ze=xt+Mt,Qe=L[fe]-L[Ze],Qe>0){Me=ne,ne=be,be=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*re,xt=C*ze,Mt=_;e:for(Xe=0;Xe<z;++Xe){if(fe=Tt+Mt,Ze=xt+Mt,Qe=L[fe]-L[Ze],Qe>0){Me=re,re=ze,ze=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*be,xt=C*ze,Mt=_;e:for(Xe=0;Xe<z;++Xe){if(fe=Tt+Mt,Ze=xt+Mt,Qe=L[fe]-L[Ze],Qe>0){Me=be,be=ze,ze=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ne,xt=C*Ce,Mt=_;e:for(Xe=0;Xe<z;++Xe){if(fe=Tt+Mt,Ze=xt+Mt,Qe=L[fe]-L[Ze],Qe>0){Me=ne,ne=Ce,Ce=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ne,xt=C*be,Mt=_;e:for(Xe=0;Xe<z;++Xe){if(fe=Tt+Mt,Ze=xt+Mt,Qe=L[fe]-L[Ze],Qe>0){Me=ne,ne=be,be=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ze,xt=C*Ce,Mt=_;e:for(Xe=0;Xe<z;++Xe){if(fe=Tt+Mt,Ze=xt+Mt,Qe=L[fe]-L[Ze],Qe>0){Me=ze,ze=Ce,Ce=Me;break e}if(Qe<0)break e;Mt+=F}for(Tt=C*re,xt=C*ne,_t=C*be,Ct=C*ze,jt=C*Ce,At=C*H,Te=C*G,nt=C*j,Je=0,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,et=_t+Mt,ut=Ct+Mt,ct=jt+Mt,rt=At+Mt,je=Te+Mt,tt=nt+Mt,Kt[Je]=L[Ze],ir[Je]=L[ut],ke=ke&&Kt[Je]===ir[Je],Oe=L[fe],Re=L[et],me=L[ct],L[rt]=Oe,L[je]=Re,L[tt]=me,++Je,Mt+=T;for(Tt=C*O,xt=C*E,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,L[fe]=L[Ze],Mt+=T;for(Tt=C*W,xt=C*A,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,L[fe]=L[Ze],Mt+=T;if(ke)for(Be=he;Be<=te;++Be){fe=_+Be*C,Je=0;e:for(Xe=0;Xe<z;++Xe){if(Qe=L[fe]-Kt[Je],Qe!==0)break e;Je+=q,fe+=F}if(Qe!==0)if(Qe<0){if(Be!==he)for(Tt=C*Be,xt=C*he,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,Ee=L[fe],L[fe]=L[Ze],L[Ze]=Ee,Mt+=T;++he}else for(;;){fe=_+te*C,Je=0;e:for(Xe=0;Xe<z;++Xe){if(Qe=L[fe]-Kt[Je],Qe!==0)break e;Je+=q,fe+=F}if(Qe>0)te--;else if(Qe<0){for(Tt=C*Be,xt=C*he,_t=C*te,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,et=_t+Mt,Ee=L[fe],L[fe]=L[Ze],L[Ze]=L[et],L[et]=Ee,Mt+=T;++he,--te;break}else{for(Tt=C*Be,xt=C*te,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,Ee=L[fe],L[fe]=L[Ze],L[Ze]=Ee,Mt+=T;--te;break}}}else for(Be=he;Be<=te;++Be){fe=_+Be*C,Je=0;e:for(Xe=0;Xe<z;++Xe){if(gt=L[fe]-Kt[Je],gt!==0)break e;Je+=q,fe+=F}if(gt<0){if(Be!==he)for(Tt=C*Be,xt=C*he,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,Ee=L[fe],L[fe]=L[Ze],L[Ze]=Ee,Mt+=T;++he}else{fe=_+Be*C,Je=0;e:for(Xe=0;Xe<z;++Xe){if(Pt=L[fe]-ir[Je],Pt!==0)break e;Je+=q,fe+=F}if(Pt>0)for(;;){fe=_+te*C,Je=0;e:for(Xe=0;Xe<z;++Xe){if(Qe=L[fe]-ir[Je],Qe!==0)break e;Je+=q,fe+=F}if(Qe>0){if(--te<Be)break;continue}else{fe=_+te*C,Je=0;e:for(Xe=0;Xe<z;++Xe){if(Qe=L[fe]-Kt[Je],Qe!==0)break e;Je+=q,fe+=F}if(Qe<0){for(Tt=C*Be,xt=C*he,_t=C*te,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,et=_t+Mt,Ee=L[fe],L[fe]=L[Ze],L[Ze]=L[et],L[et]=Ee,Mt+=T;++he,--te}else{for(Tt=C*Be,xt=C*te,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,Ee=L[fe],L[fe]=L[Ze],L[Ze]=Ee,Mt+=T;--te}break}}}}for(Tt=C*E,xt=C*(he-1),Je=0,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,L[fe]=L[Ze],L[Ze]=Kt[Je],++Je,Mt+=T;for(Tt=C*A,xt=C*(te+1),Je=0,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,L[fe]=L[Ze],L[Ze]=ir[Je],++Je,Mt+=T;if(he-2-E<=32?x(E,he-2,L,_,C,M,v,z,T,F,q):k(E,he-2,L,_,C,M,v,z,T,F,q),A-(te+2)<=32?x(te+2,A,L,_,C,M,v,z,T,F,q):k(te+2,A,L,_,C,M,v,z,T,F,q),ke){y(Kt),y(ir);return}if(he<H&&te>j){e:for(;;){for(fe=_+he*C,Je=0,Mt=_,Xe=0;Xe<z;++Xe){if(L[fe]!==Kt[Je])break e;++Je,fe+=T}++he}e:for(;;){for(fe=_+te*C,Je=0,Mt=_,Xe=0;Xe<z;++Xe){if(L[fe]!==ir[Je])break e;++Je,fe+=T}--te}for(Be=he;Be<=te;++Be){fe=_+Be*C,Je=0;e:for(Xe=0;Xe<z;++Xe){if(gt=L[fe]-Kt[Je],gt!==0)break e;Je+=q,fe+=F}if(gt===0){if(Be!==he)for(Tt=C*Be,xt=C*he,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,Ee=L[fe],L[fe]=L[Ze],L[Ze]=Ee,Mt+=T;++he}else{fe=_+Be*C,Je=0;e:for(Xe=0;Xe<z;++Xe){if(Pt=L[fe]-ir[Je],Pt!==0)break e;Je+=q,fe+=F}if(Pt===0)for(;;){fe=_+te*C,Je=0;e:for(Xe=0;Xe<z;++Xe){if(Qe=L[fe]-ir[Je],Qe!==0)break e;Je+=q,fe+=F}if(Qe===0){if(--te<Be)break;continue}else{fe=_+te*C,Je=0;e:for(Xe=0;Xe<z;++Xe){if(Qe=L[fe]-Kt[Je],Qe!==0)break e;Je+=q,fe+=F}if(Qe<0){for(Tt=C*Be,xt=C*he,_t=C*te,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,et=_t+Mt,Ee=L[fe],L[fe]=L[Ze],L[Ze]=L[et],L[et]=Ee,Mt+=T;++he,--te}else{for(Tt=C*Be,xt=C*te,Mt=_,Xe=0;Xe<z;++Xe)fe=Tt+Mt,Ze=xt+Mt,Ee=L[fe],L[fe]=L[Ze],L[Ze]=Ee,Mt+=T;--te}break}}}}}y(Kt),y(ir),te-he<=32?x(he,te,L,_,C,M,v,z,T,F,q):k(he,te,L,_,C,M,v,z,T,F,q)}}};function h(x,b,y){var k=u(b),E=[b,x].join(","),A=c[E];return x.length>1&&k?A(y,k[0],k[1]):A(y)}var d={"uint32,1,0":function(x,b){return function(y){var k=y.data,E=y.offset|0,A=y.shape,L=y.stride,_=L[0]|0,C=A[0]|0,M=L[1]|0,v=A[1]|0,z=M,T=M,F=1;C<=32?x(0,C-1,k,E,_,M,C,v,z,T,F):b(0,C-1,k,E,_,M,C,v,z,T,F)}}};function p(x,b){var y=[b,x].join(","),k=d[y],E=f(x,b),A=h(x,b,E);return k(E,A)}i.exports=p},446:function(i,a,o){"use strict";var s=o(7640),u={};function l(f){var c=f.order,h=f.dtype,d=[c,h],p=d.join(":"),x=u[p];return x||(u[p]=x=s(c,h)),x(f),f}i.exports=l},9618:function(i,a,o){var s=o(7163),u=typeof Float64Array!="undefined";function l(b,y){return b[0]-y[0]}function f(){var b=this.stride,y=new Array(b.length),k;for(k=0;k<y.length;++k)y[k]=[Math.abs(b[k]),k];y.sort(l);var E=new Array(y.length);for(k=0;k<E.length;++k)E[k]=y[k][1];return E}var c={T:function(b){function y(E){this.data=E}var k=y.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 y(this.data)},k.get=k.set=function(){},k.pick=function(){return null},function(A){return new y(A)}},0:function(b,y){function k(A,L){this.data=A,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 y(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,_,C,M){return new k(L,M)}},1:function(b,y,k){function E(L,_,C,M){this.data=L,this.shape=[_],this.stride=[C],this.offset=M|0}var A=E.prototype;return A.dtype=b,A.dimension=1,Object.defineProperty(A,"size",{get:function(){return this.shape[0]}}),A.order=[0],A.set=function(_,C){return b==="generic"?this.data.set(this.offset+this.stride[0]*_,C):this.data[this.offset+this.stride[0]*_]=C},A.get=function(_){return b==="generic"?this.data.get(this.offset+this.stride[0]*_):this.data[this.offset+this.stride[0]*_]},A.index=function(_){return this.offset+this.stride[0]*_},A.hi=function(_){return new E(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,this.stride[0],this.offset)},A.lo=function(_){var C=this.offset,M=0,v=this.shape[0],z=this.stride[0];return typeof _=="number"&&_>=0&&(M=_|0,C+=z*M,v-=M),new E(this.data,v,z,C)},A.step=function(_){var C=this.shape[0],M=this.stride[0],v=this.offset,z=0,T=Math.ceil;return typeof _=="number"&&(z=_|0,z<0?(v+=M*(C-1),C=T(-C/z)):C=T(C/z),M*=z),new E(this.data,C,M,v)},A.transpose=function(_){_=_===void 0?0:_|0;var C=this.shape,M=this.stride;return new E(this.data,C[_],M[_],this.offset)},A.pick=function(_){var C=[],M=[],v=this.offset;typeof _=="number"&&_>=0?v=v+this.stride[0]*_|0:(C.push(this.shape[0]),M.push(this.stride[0]));var z=y[C.length+1];return z(this.data,C,M,v)},function(_,C,M,v){return new E(_,C[0],M[0],v)}},2:function(b,y,k){function E(L,_,C,M,v,z){this.data=L,this.shape=[_,C],this.stride=[M,v],this.offset=z|0}var A=E.prototype;return A.dtype=b,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(_,C,M){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C,M):this.data[this.offset+this.stride[0]*_+this.stride[1]*C]=M},A.get=function(_,C){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C):this.data[this.offset+this.stride[0]*_+this.stride[1]*C]},A.index=function(_,C){return this.offset+this.stride[0]*_+this.stride[1]*C},A.hi=function(_,C){return new E(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(_,C){var M=this.offset,v=0,z=this.shape[0],T=this.shape[1],F=this.stride[0],q=this.stride[1];return typeof _=="number"&&_>=0&&(v=_|0,M+=F*v,z-=v),typeof C=="number"&&C>=0&&(v=C|0,M+=q*v,T-=v),new E(this.data,z,T,F,q,M)},A.step=function(_,C){var M=this.shape[0],v=this.shape[1],z=this.stride[0],T=this.stride[1],F=this.offset,q=0,U=Math.ceil;return typeof _=="number"&&(q=_|0,q<0?(F+=z*(M-1),M=U(-M/q)):M=U(M/q),z*=q),typeof C=="number"&&(q=C|0,q<0?(F+=T*(v-1),v=U(-v/q)):v=U(v/q),T*=q),new E(this.data,M,v,z,T,F)},A.transpose=function(_,C){_=_===void 0?0:_|0,C=C===void 0?1:C|0;var M=this.shape,v=this.stride;return new E(this.data,M[_],M[C],v[_],v[C],this.offset)},A.pick=function(_,C){var M=[],v=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(M.push(this.shape[0]),v.push(this.stride[0])),typeof C=="number"&&C>=0?z=z+this.stride[1]*C|0:(M.push(this.shape[1]),v.push(this.stride[1]));var T=y[M.length+1];return T(this.data,M,v,z)},function(_,C,M,v){return new E(_,C[0],C[1],M[0],M[1],v)}},3:function(b,y,k){function E(L,_,C,M,v,z,T,F){this.data=L,this.shape=[_,C,M],this.stride=[v,z,T],this.offset=F|0}var A=E.prototype;return A.dtype=b,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var _=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),M=Math.abs(this.stride[2]);return _>C?C>M?[2,1,0]:_>M?[1,2,0]:[1,0,2]:_>M?[2,0,1]:M>C?[0,1,2]:[0,2,1]}}),A.set=function(_,C,M,v){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M,v):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M]=v},A.get=function(_,C,M){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M]},A.index=function(_,C,M){return this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M},A.hi=function(_,C,M){return new E(this.data,typeof _!="number"||_<0?this.shape[0]:_|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)},A.lo=function(_,C,M){var v=this.offset,z=0,T=this.shape[0],F=this.shape[1],q=this.shape[2],U=this.stride[0],H=this.stride[1],j=this.stride[2];return typeof _=="number"&&_>=0&&(z=_|0,v+=U*z,T-=z),typeof C=="number"&&C>=0&&(z=C|0,v+=H*z,F-=z),typeof M=="number"&&M>=0&&(z=M|0,v+=j*z,q-=z),new E(this.data,T,F,q,U,H,j,v)},A.step=function(_,C,M){var v=this.shape[0],z=this.shape[1],T=this.shape[2],F=this.stride[0],q=this.stride[1],U=this.stride[2],H=this.offset,j=0,G=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(H+=F*(v-1),v=G(-v/j)):v=G(v/j),F*=j),typeof C=="number"&&(j=C|0,j<0?(H+=q*(z-1),z=G(-z/j)):z=G(z/j),q*=j),typeof M=="number"&&(j=M|0,j<0?(H+=U*(T-1),T=G(-T/j)):T=G(T/j),U*=j),new E(this.data,v,z,T,F,q,U,H)},A.transpose=function(_,C,M){_=_===void 0?0:_|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0;var v=this.shape,z=this.stride;return new E(this.data,v[_],v[C],v[M],z[_],z[C],z[M],this.offset)},A.pick=function(_,C,M){var v=[],z=[],T=this.offset;typeof _=="number"&&_>=0?T=T+this.stride[0]*_|0:(v.push(this.shape[0]),z.push(this.stride[0])),typeof C=="number"&&C>=0?T=T+this.stride[1]*C|0:(v.push(this.shape[1]),z.push(this.stride[1])),typeof M=="number"&&M>=0?T=T+this.stride[2]*M|0:(v.push(this.shape[2]),z.push(this.stride[2]));var F=y[v.length+1];return F(this.data,v,z,T)},function(_,C,M,v){return new E(_,C[0],C[1],C[2],M[0],M[1],M[2],v)}},4:function(b,y,k){function E(L,_,C,M,v,z,T,F,q,U){this.data=L,this.shape=[_,C,M,v],this.stride=[z,T,F,q],this.offset=U|0}var A=E.prototype;return A.dtype=b,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:k}),A.set=function(_,C,M,v,z){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v,z):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v]=z},A.get=function(_,C,M,v){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v]},A.index=function(_,C,M,v){return this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v},A.hi=function(_,C,M,v){return new E(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof M!="number"||M<0?this.shape[2]:M|0,typeof v!="number"||v<0?this.shape[3]:v|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(_,C,M,v){var z=this.offset,T=0,F=this.shape[0],q=this.shape[1],U=this.shape[2],H=this.shape[3],j=this.stride[0],G=this.stride[1],O=this.stride[2],W=this.stride[3];return typeof _=="number"&&_>=0&&(T=_|0,z+=j*T,F-=T),typeof C=="number"&&C>=0&&(T=C|0,z+=G*T,q-=T),typeof M=="number"&&M>=0&&(T=M|0,z+=O*T,U-=T),typeof v=="number"&&v>=0&&(T=v|0,z+=W*T,H-=T),new E(this.data,F,q,U,H,j,G,O,W,z)},A.step=function(_,C,M,v){var z=this.shape[0],T=this.shape[1],F=this.shape[2],q=this.shape[3],U=this.stride[0],H=this.stride[1],j=this.stride[2],G=this.stride[3],O=this.offset,W=0,re=Math.ceil;return typeof _=="number"&&(W=_|0,W<0?(O+=U*(z-1),z=re(-z/W)):z=re(z/W),U*=W),typeof C=="number"&&(W=C|0,W<0?(O+=H*(T-1),T=re(-T/W)):T=re(T/W),H*=W),typeof M=="number"&&(W=M|0,W<0?(O+=j*(F-1),F=re(-F/W)):F=re(F/W),j*=W),typeof v=="number"&&(W=v|0,W<0?(O+=G*(q-1),q=re(-q/W)):q=re(q/W),G*=W),new E(this.data,z,T,F,q,U,H,j,G,O)},A.transpose=function(_,C,M,v){_=_===void 0?0:_|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0,v=v===void 0?3:v|0;var z=this.shape,T=this.stride;return new E(this.data,z[_],z[C],z[M],z[v],T[_],T[C],T[M],T[v],this.offset)},A.pick=function(_,C,M,v){var z=[],T=[],F=this.offset;typeof _=="number"&&_>=0?F=F+this.stride[0]*_|0:(z.push(this.shape[0]),T.push(this.stride[0])),typeof C=="number"&&C>=0?F=F+this.stride[1]*C|0:(z.push(this.shape[1]),T.push(this.stride[1])),typeof M=="number"&&M>=0?F=F+this.stride[2]*M|0:(z.push(this.shape[2]),T.push(this.stride[2])),typeof v=="number"&&v>=0?F=F+this.stride[3]*v|0:(z.push(this.shape[3]),T.push(this.stride[3]));var q=y[z.length+1];return q(this.data,z,T,F)},function(_,C,M,v){return new E(_,C[0],C[1],C[2],C[3],M[0],M[1],M[2],M[3],v)}},5:function(y,k,E){function A(_,C,M,v,z,T,F,q,U,H,j,G){this.data=_,this.shape=[C,M,v,z,T],this.stride=[F,q,U,H,j],this.offset=G|0}var L=A.prototype;return L.dtype=y,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,v,z,T,F){return y==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T,F):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T]=F},L.get=function(C,M,v,z,T){return y==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T]},L.index=function(C,M,v,z,T){return this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T},L.hi=function(C,M,v,z,T){return new A(this.data,typeof C!="number"||C<0?this.shape[0]:C|0,typeof M!="number"||M<0?this.shape[1]:M|0,typeof v!="number"||v<0?this.shape[2]:v|0,typeof z!="number"||z<0?this.shape[3]:z|0,typeof T!="number"||T<0?this.shape[4]:T|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(C,M,v,z,T){var F=this.offset,q=0,U=this.shape[0],H=this.shape[1],j=this.shape[2],G=this.shape[3],O=this.shape[4],W=this.stride[0],re=this.stride[1],ne=this.stride[2],be=this.stride[3],ze=this.stride[4];return typeof C=="number"&&C>=0&&(q=C|0,F+=W*q,U-=q),typeof M=="number"&&M>=0&&(q=M|0,F+=re*q,H-=q),typeof v=="number"&&v>=0&&(q=v|0,F+=ne*q,j-=q),typeof z=="number"&&z>=0&&(q=z|0,F+=be*q,G-=q),typeof T=="number"&&T>=0&&(q=T|0,F+=ze*q,O-=q),new A(this.data,U,H,j,G,O,W,re,ne,be,ze,F)},L.step=function(C,M,v,z,T){var F=this.shape[0],q=this.shape[1],U=this.shape[2],H=this.shape[3],j=this.shape[4],G=this.stride[0],O=this.stride[1],W=this.stride[2],re=this.stride[3],ne=this.stride[4],be=this.offset,ze=0,Ce=Math.ceil;return typeof C=="number"&&(ze=C|0,ze<0?(be+=G*(F-1),F=Ce(-F/ze)):F=Ce(F/ze),G*=ze),typeof M=="number"&&(ze=M|0,ze<0?(be+=O*(q-1),q=Ce(-q/ze)):q=Ce(q/ze),O*=ze),typeof v=="number"&&(ze=v|0,ze<0?(be+=W*(U-1),U=Ce(-U/ze)):U=Ce(U/ze),W*=ze),typeof z=="number"&&(ze=z|0,ze<0?(be+=re*(H-1),H=Ce(-H/ze)):H=Ce(H/ze),re*=ze),typeof T=="number"&&(ze=T|0,ze<0?(be+=ne*(j-1),j=Ce(-j/ze)):j=Ce(j/ze),ne*=ze),new A(this.data,F,q,U,H,j,G,O,W,re,ne,be)},L.transpose=function(C,M,v,z,T){C=C===void 0?0:C|0,M=M===void 0?1:M|0,v=v===void 0?2:v|0,z=z===void 0?3:z|0,T=T===void 0?4:T|0;var F=this.shape,q=this.stride;return new A(this.data,F[C],F[M],F[v],F[z],F[T],q[C],q[M],q[v],q[z],q[T],this.offset)},L.pick=function(C,M,v,z,T){var F=[],q=[],U=this.offset;typeof C=="number"&&C>=0?U=U+this.stride[0]*C|0:(F.push(this.shape[0]),q.push(this.stride[0])),typeof M=="number"&&M>=0?U=U+this.stride[1]*M|0:(F.push(this.shape[1]),q.push(this.stride[1])),typeof v=="number"&&v>=0?U=U+this.stride[2]*v|0:(F.push(this.shape[2]),q.push(this.stride[2])),typeof z=="number"&&z>=0?U=U+this.stride[3]*z|0:(F.push(this.shape[3]),q.push(this.stride[3])),typeof T=="number"&&T>=0?U=U+this.stride[4]*T|0:(F.push(this.shape[4]),q.push(this.stride[4]));var H=k[F.length+1];return H(this.data,F,q,U)},function(C,M,v,z){return new A(C,M[0],M[1],M[2],M[3],M[4],v[0],v[1],v[2],v[3],v[4],z)}}};function h(b,y){var k=y===-1?"T":String(y),E=c[k];return y===-1?E(b):y===0?E(b,p[b][0]):E(b,p[b],f)}function d(b){if(s(b))return"buffer";if(u)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 p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function x(b,y,k,E){if(b===void 0){var v=p.array[0];return v([])}else typeof b=="number"&&(b=[b]);y===void 0&&(y=[b.length]);var A=y.length;if(k===void 0){k=new Array(A);for(var L=A-1,_=1;L>=0;--L)k[L]=_,_*=y[L]}if(E===void 0){E=0;for(var L=0;L<A;++L)k[L]<0&&(E-=(y[L]-1)*k[L])}for(var C=d(b),M=p[C];M.length<=A+1;)M.push(h(C,M.length-1));var v=M[A+1];return v(b,y,k,E)}i.exports=x},1278:function(i,a,o){"use strict";var s=o(2361),u=Math.pow(2,-1074),l=-1>>>0;i.exports=f;function f(c,h){if(isNaN(c)||isNaN(h))return NaN;if(c===h)return c;if(c===0)return h<0?-u:u;var d=s.hi(c),p=s.lo(c);return h>c==c>0?p===l?(d+=1,p=0):p+=1:p===0?(p=l,d-=1):p-=1,s.pack(p,d)}},8406:function(i,a){var o=1e-6,s=1e-6;a.vertexNormals=function(u,l,f){for(var c=l.length,h=new Array(c),d=f===void 0?o:f,p=0;p<c;++p)h[p]=[0,0,0];for(var p=0;p<u.length;++p)for(var x=u[p],b=0,y=x[x.length-1],k=x[0],E=0;E<x.length;++E){b=y,y=k,k=x[(E+1)%x.length];for(var A=l[b],L=l[y],_=l[k],C=new Array(3),M=0,v=new Array(3),z=0,T=0;T<3;++T)C[T]=A[T]-L[T],M+=C[T]*C[T],v[T]=_[T]-L[T],z+=v[T]*v[T];if(M*z>d)for(var F=h[y],q=1/Math.sqrt(M*z),T=0;T<3;++T){var U=(T+1)%3,H=(T+2)%3;F[T]+=q*(v[U]*C[H]-v[H]*C[U])}}for(var p=0;p<c;++p){for(var F=h[p],j=0,T=0;T<3;++T)j+=F[T]*F[T];if(j>d)for(var q=1/Math.sqrt(j),T=0;T<3;++T)F[T]*=q;else for(var T=0;T<3;++T)F[T]=0}return h},a.faceNormals=function(u,l,f){for(var c=u.length,h=new Array(c),d=f===void 0?s:f,p=0;p<c;++p){for(var x=u[p],b=new Array(3),y=0;y<3;++y)b[y]=l[x[y]];for(var k=new Array(3),E=new Array(3),y=0;y<3;++y)k[y]=b[1][y]-b[0][y],E[y]=b[2][y]-b[0][y];for(var A=new Array(3),L=0,y=0;y<3;++y){var _=(y+1)%3,C=(y+2)%3;A[y]=k[_]*E[C]-k[C]*E[_],L+=A[y]*A[y]}L>d?L=1/Math.sqrt(L):L=0;for(var y=0;y<3;++y)A[y]*=L;h[p]=A}return h}},4081:function(i){"use strict";i.exports=a;function a(o,s,u,l,f,c,h,d,p,x){var b=s+c+x;if(y>0){var y=Math.sqrt(b+1);o[0]=.5*(h-p)/y,o[1]=.5*(d-l)/y,o[2]=.5*(u-c)/y,o[3]=.5*y}else{var k=Math.max(s,c,x),y=Math.sqrt(2*k-b+1);s>=k?(o[0]=.5*y,o[1]=.5*(f+u)/y,o[2]=.5*(d+l)/y,o[3]=.5*(h-p)/y):c>=k?(o[0]=.5*(u+f)/y,o[1]=.5*y,o[2]=.5*(p+h)/y,o[3]=.5*(d-l)/y):(o[0]=.5*(l+d)/y,o[1]=.5*(h+p)/y,o[2]=.5*y,o[3]=.5*(u-f)/y)}return o}},9977:function(i,a,o){"use strict";i.exports=y;var s=o(9215),u=o(6582),l=o(7399),f=o(7608),c=o(4081);function h(k,E,A){return Math.sqrt(Math.pow(k,2)+Math.pow(E,2)+Math.pow(A,2))}function d(k,E,A,L){return Math.sqrt(Math.pow(k,2)+Math.pow(E,2)+Math.pow(A,2)+Math.pow(L,2))}function p(k,E){var A=E[0],L=E[1],_=E[2],C=E[3],M=d(A,L,_,C);M>1e-6?(k[0]=A/M,k[1]=L/M,k[2]=_/M,k[3]=C/M):(k[0]=k[1]=k[2]=0,k[3]=1)}function x(k,E,A){this.radius=s([A]),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=x.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;p(E,E);var A=this.computedMatrix;l(A,E);var L=this.computedCenter,_=this.computedEye,C=this.computedUp,M=Math.exp(this.computedRadius[0]);_[0]=L[0]+M*A[2],_[1]=L[1]+M*A[6],_[2]=L[2]+M*A[10],C[0]=A[1],C[1]=A[5],C[2]=A[9];for(var v=0;v<3;++v){for(var z=0,T=0;T<3;++T)z+=A[v+4*T]*_[T];A[12+v]=-z}},b.getMatrix=function(k,E){this.recalcMatrix(k);var A=this.computedMatrix;if(E){for(var L=0;L<16;++L)E[L]=A[L];return E}return A},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,A,L){E=E||0,A=A||0,L=L||0,this.recalcMatrix(k);var _=this.computedMatrix,C=_[1],M=_[5],v=_[9],z=h(C,M,v);C/=z,M/=z,v/=z;var T=_[0],F=_[4],q=_[8],U=T*C+F*M+q*v;T-=C*U,F-=M*U,q-=v*U;var H=h(T,F,q);T/=H,F/=H,q/=H;var j=_[2],G=_[6],O=_[10],W=j*C+G*M+O*v,re=j*T+G*F+O*q;j-=W*C+re*T,G-=W*M+re*F,O-=W*v+re*q;var ne=h(j,G,O);j/=ne,G/=ne,O/=ne;var be=T*E+C*A,ze=F*E+M*A,Ce=q*E+v*A;this.center.move(k,be,ze,Ce);var he=Math.exp(this.computedRadius[0]);he=Math.max(1e-4,he+L),this.radius.set(k,Math.log(he))},b.rotate=function(k,E,A,L){this.recalcMatrix(k),E=E||0,A=A||0;var _=this.computedMatrix,C=_[0],M=_[4],v=_[8],z=_[1],T=_[5],F=_[9],q=_[2],U=_[6],H=_[10],j=E*C+A*z,G=E*M+A*T,O=E*v+A*F,W=-(U*O-H*G),re=-(H*j-q*O),ne=-(q*G-U*j),be=Math.sqrt(Math.max(0,1-Math.pow(W,2)-Math.pow(re,2)-Math.pow(ne,2))),ze=d(W,re,ne,be);ze>1e-6?(W/=ze,re/=ze,ne/=ze,be/=ze):(W=re=ne=0,be=1);var Ce=this.computedRotation,he=Ce[0],te=Ce[1],ke=Ce[2],Ee=Ce[3],Me=he*be+Ee*W+te*ne-ke*re,Oe=te*be+Ee*re+ke*W-he*ne,Re=ke*be+Ee*ne+he*re-te*W,me=Ee*be-he*W-te*re-ke*ne;if(L){W=q,re=U,ne=H;var Be=Math.sin(L)/h(W,re,ne);W*=Be,re*=Be,ne*=Be,be=Math.cos(E),Me=Me*be+me*W+Oe*ne-Re*re,Oe=Oe*be+me*re+Re*W-Me*ne,Re=Re*be+me*ne+Me*re-Oe*W,me=me*be-Me*W-Oe*re-Re*ne}var fe=d(Me,Oe,Re,me);fe>1e-6?(Me/=fe,Oe/=fe,Re/=fe,me/=fe):(Me=Oe=Re=0,me=1),this.rotation.set(k,Me,Oe,Re,me)},b.lookAt=function(k,E,A,L){this.recalcMatrix(k),A=A||this.computedCenter,E=E||this.computedEye,L=L||this.computedUp;var _=this.computedMatrix;u(_,E,A,L);var C=this.computedRotation;c(C,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),p(C,C),this.rotation.set(k,C[0],C[1],C[2],C[3]);for(var M=0,v=0;v<3;++v)M+=Math.pow(A[v]-E[v],2);this.radius.set(k,.5*Math.log(Math.max(M,1e-6))),this.center.set(k,A[0],A[1],A[2])},b.translate=function(k,E,A,L){this.center.move(k,E||0,A||0,L||0)},b.setMatrix=function(k,E){var A=this.computedRotation;c(A,E[0],E[1],E[2],E[4],E[5],E[6],E[8],E[9],E[10]),p(A,A),this.rotation.set(k,A[0],A[1],A[2],A[3]);var L=this.computedMatrix;f(L,E);var _=L[15];if(Math.abs(_)>1e-6){var C=L[12]/_,M=L[13]/_,v=L[14]/_;this.recalcMatrix(k);var z=Math.exp(this.computedRadius[0]);this.center.set(k,C-L[2]*z,M-L[6]*z,v-L[10]*z),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(),A=k.center;A&&this.center.set(E,A[0],A[1],A[2]);var L=k.rotation;L&&this.rotation.set(E,L[0],L[1],L[2],L[3]);var _=k.distance;_&&_>0&&this.radius.set(E,Math.log(_)),this.setDistanceLimits(k.zoomMin,k.zoomMax)};function y(k){k=k||{};var E=k.center||[0,0,0],A=k.rotation||[0,0,0,1],L=k.radius||1;E=[].slice.call(E,0,3),A=[].slice.call(A,0,4),p(A,A);var _=new x(A,E,Math.log(L));return _.setDistanceLimits(k.zoomMin,k.zoomMax),("eye"in k||"up"in k)&&_.lookAt(0,k.eye,k.center,k.up),_}},1371:function(i,a,o){"use strict";var s=o(3233);i.exports=function(l,f,c){return c=typeof c!="undefined"?c+"":" ",s(c,f)+l}},3202:function(i){i.exports=function(o,s){s||(s=[0,""]),o=String(o);var u=parseFloat(o,10);return s[0]=u,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3088:function(i,a,o){"use strict";i.exports=u;var s=o(3140);function u(l,f){for(var c=f.length|0,h=l.length,d=[new Array(c),new Array(c)],p=0;p<c;++p)d[0][p]=[],d[1][p]=[];for(var p=0;p<h;++p){var x=l[p];d[0][x[0]].push(x),d[1][x[1]].push(x)}for(var b=[],p=0;p<c;++p)d[0][p].length+d[1][p].length===0&&b.push([p]);function y(v,z){var T=d[z][v[z]];T.splice(T.indexOf(v),1)}function k(v,z,T){for(var F,q,U,H=0;H<2;++H)if(d[H][z].length>0){F=d[H][z][0],U=H;break}q=F[U^1];for(var j=0;j<2;++j)for(var G=d[j][z],O=0;O<G.length;++O){var W=G[O],re=W[j^1],ne=s(f[v],f[z],f[q],f[re]);ne>0&&(F=W,q=re,U=j)}return T||F&&y(F,U),q}function E(v,z){var T=d[z][v][0],F=[v];y(T,z);for(var q=T[z^1],U=z;;){for(;q!==v;)F.push(q),q=k(F[F.length-2],q,!1);if(d[0][v].length+d[1][v].length===0)break;var H=F[F.length-1],j=v,G=F[1],O=k(H,j,!0);if(s(f[H],f[j],f[G],f[O])<0)break;F.push(v),q=k(H,j)}return F}function A(v,z){return z[1]===z[z.length-1]}for(var p=0;p<c;++p)for(var L=0;L<2;++L){for(var _=[];d[L][p].length>0;){var C=d[0][p].length,M=E(p,L);A(_,M)?_.push.apply(_,M):(_.length>0&&b.push(_),_=M)}_.length>0&&b.push(_)}return b}},5609:function(i,a,o){"use strict";i.exports=u;var s=o(3134);function u(l,f){for(var c=s(l,f.length),h=new Array(f.length),d=new Array(f.length),p=[],x=0;x<f.length;++x){var b=c[x].length;d[x]=b,h[x]=!0,b<=1&&p.push(x)}for(;p.length>0;){var y=p.pop();h[y]=!1;for(var k=c[y],x=0;x<k.length;++x){var E=k[x];--d[E]===0&&p.push(E)}}for(var A=new Array(f.length),L=[],x=0;x<f.length;++x)if(h[x]){var y=L.length;A[x]=y,L.push(f[x])}else A[x]=-1;for(var _=[],x=0;x<l.length;++x){var C=l[x];h[C[0]]&&h[C[1]]&&_.push([A[C[0]],A[C[1]]])}return[_,L]}},2095:function(i,a,o){"use strict";i.exports=b;var s=o(3134),u=o(3088),l=o(5085),f=o(5250),c=o(8210),h=o(1682),d=o(5609);function p(y,k){for(var E=new Array(y),A=0;A<y;++A)E[A]=k;return E}function x(y){for(var k=new Array(y),E=0;E<y;++E)k[E]=[];return k}function b(y,k){var Be=d(y,k);y=Be[0],k=Be[1];for(var E=k.length,A=y.length,L=s(y,k.length),_=0;_<E;++_)if(L[_].length%2===1)throw new Error("planar-graph-to-polyline: graph must be manifold");var C=u(y,k);function M(Xe){for(var Tt=Xe.length,xt=[0],_t=0;_t<Tt;++_t){var Ct=k[Xe[_t]],jt=k[Xe[(_t+1)%Tt]],At=f(-Ct[0],Ct[1]),Te=f(-Ct[0],jt[1]),nt=f(jt[0],Ct[1]),ut=f(jt[0],jt[1]);xt=c(xt,c(c(At,Te),c(nt,ut)))}return xt[xt.length-1]>0}C=C.filter(M);for(var v=C.length,z=new Array(v),T=new Array(v),_=0;_<v;++_){z[_]=_;var F=new Array(v),q=C[_].map(function(Tt){return k[Tt]}),U=l([q]),H=0;e:for(var j=0;j<v;++j)if(F[j]=0,_!==j){for(var G=C[j],O=G.length,W=0;W<O;++W){var re=U(k[G[W]]);if(re!==0){re<0&&(F[j]=1,H+=1);continue e}}F[j]=1,H+=1}T[_]=[H,_,F]}T.sort(function(Xe,Tt){return Tt[0]-Xe[0]});for(var _=0;_<v;++_)for(var F=T[_],ne=F[1],be=F[2],j=0;j<v;++j)be[j]&&(z[j]=ne);for(var ze=x(v),_=0;_<v;++_)ze[_].push(z[_]),ze[z[_]].push(_);for(var Ce={},he=p(E,!1),_=0;_<v;++_)for(var G=C[_],O=G.length,j=0;j<O;++j){var te=G[j],ke=G[(j+1)%O],Ee=Math.min(te,ke)+":"+Math.max(te,ke);if(Ee in Ce){var Me=Ce[Ee];ze[Me].push(_),ze[_].push(Me),he[te]=he[ke]=!0}else Ce[Ee]=_}function Oe(Xe){for(var Tt=Xe.length,xt=0;xt<Tt;++xt)if(!he[Xe[xt]])return!1;return!0}for(var Re=[],me=p(v,-1),_=0;_<v;++_)z[_]===_&&!Oe(C[_])?(Re.push(_),me[_]=0):me[_]=-1;for(var Be=[];Re.length>0;){var fe=Re.pop(),Ze=ze[fe];h(Ze,function(Xe,Tt){return Xe-Tt});var et=Ze.length,gt=me[fe],Pt;if(gt===0){var G=C[fe];Pt=[G]}for(var _=0;_<et;++_){var Qe=Ze[_];if(!(me[Qe]>=0)&&(me[Qe]=gt^1,Re.push(Qe),gt===0)){var G=C[Qe];Oe(G)||(G.reverse(),Pt.push(G))}}gt===0&&Be.push(Pt)}return Be}},5085:function(i,a,o){i.exports=k;var s=o(3250)[3],u=o(4209),l=o(3352),f=o(2478);function c(){return!0}function h(E){return function(A,L){var _=E[A];return _?!!_.queryPoint(L,c):!1}}function d(E){for(var A={},L=0;L<E.length;++L){var _=E[L],C=_[0][0],M=_[0][1],v=_[1][1],z=[Math.min(M,v),Math.max(M,v)];C in A?A[C].push(z):A[C]=[z]}for(var T={},F=Object.keys(A),L=0;L<F.length;++L){var q=A[F[L]];T[F[L]]=l(q)}return h(T)}function p(E,A){return function(L){var _=f.le(A,L[0]);if(_<0)return 1;var C=E[_];if(!C)if(_>0&&A[_]===L[0])C=E[_-1];else return 1;for(var M=1;C;){var v=C.key,z=s(L,v[0],v[1]);if(v[0][0]<v[1][0])if(z<0)C=C.left;else if(z>0)M=-1,C=C.right;else return 0;else if(z>0)C=C.left;else if(z<0)M=1,C=C.right;else return 0}return M}}function x(E){return 1}function b(E){return function(L){return E(L[0],L[1])?0:1}}function y(E,A){return function(_){return E(_[0],_[1])?0:A(_)}}function k(E){for(var A=E.length,L=[],_=[],C=0,M=0;M<A;++M)for(var v=E[M],z=v.length,T=z-1,F=0;F<z;T=F++){var q=v[T],U=v[F];q[0]===U[0]?_.push([q,U]):L.push([q,U])}if(L.length===0)return _.length===0?x:b(d(_));var H=u(L),j=p(H.slabs,H.coordinates);return _.length===0?j:y(d(_),j)}},9346:function(i){"use strict";var a=new Float64Array(4),o=new Float64Array(4),s=new Float64Array(4);function u(l,f,c,h,d){a.length<h.length&&(a=new Float64Array(h.length),o=new Float64Array(h.length),s=new Float64Array(h.length));for(var p=0;p<h.length;++p)a[p]=l[p]-h[p],o[p]=f[p]-l[p],s[p]=c[p]-l[p];for(var x=0,b=0,y=0,k=0,E=0,A=0,p=0;p<h.length;++p){var L=o[p],_=s[p],C=a[p];x+=L*L,b+=L*_,y+=_*_,k+=C*L,E+=C*_,A+=C*C}var M=Math.abs(x*y-b*b),v=b*E-y*k,z=b*k-x*E,T;if(v+z<=M)if(v<0)z<0&&k<0?(z=0,-k>=x?(v=1,T=x+2*k+A):(v=-k/x,T=k*v+A)):(v=0,E>=0?(z=0,T=A):-E>=y?(z=1,T=y+2*E+A):(z=-E/y,T=E*z+A));else if(z<0)z=0,k>=0?(v=0,T=A):-k>=x?(v=1,T=x+2*k+A):(v=-k/x,T=k*v+A);else{var F=1/M;v*=F,z*=F,T=v*(x*v+b*z+2*k)+z*(b*v+y*z+2*E)+A}else{var q,U,H,j;v<0?(q=b+k,U=y+E,U>q?(H=U-q,j=x-2*b+y,H>=j?(v=1,z=0,T=x+2*k+A):(v=H/j,z=1-v,T=v*(x*v+b*z+2*k)+z*(b*v+y*z+2*E)+A)):(v=0,U<=0?(z=1,T=y+2*E+A):E>=0?(z=0,T=A):(z=-E/y,T=E*z+A))):z<0?(q=b+E,U=x+k,U>q?(H=U-q,j=x-2*b+y,H>=j?(z=1,v=0,T=y+2*E+A):(z=H/j,v=1-z,T=v*(x*v+b*z+2*k)+z*(b*v+y*z+2*E)+A)):(z=0,U<=0?(v=1,T=x+2*k+A):k>=0?(v=0,T=A):(v=-k/x,T=k*v+A))):(H=y+E-b-k,H<=0?(v=0,z=1,T=y+2*E+A):(j=x-2*b+y,H>=j?(v=1,z=0,T=x+2*k+A):(v=H/j,z=1-v,T=v*(x*v+b*z+2*k)+z*(b*v+y*z+2*E)+A)))}for(var G=1-v-z,p=0;p<h.length;++p)d[p]=G*l[p]+v*f[p]+z*c[p];return T<0?0:T}i.exports=u},8648:function(i,a,o){i.exports=o(783)},2653:function(i,a,o){"use strict";var s=o(3865);i.exports=u;function u(l,f){for(var c=l.length,h=new Array(c),d=0;d<c;++d)h[d]=s(l[d],f[d]);return h}},5838:function(i,a,o){"use strict";i.exports=u;var s=o(7842);function u(l){for(var f=new Array(l.length),c=0;c<l.length;++c)f[c]=s(l[c]);return f}},8987:function(i,a,o){"use strict";var s=o(7842),u=o(6504);i.exports=l;function l(f,c){for(var h=s(c),d=f.length,p=new Array(d),x=0;x<d;++x)p[x]=u(f[x],h);return p}},544:function(i,a,o){"use strict";var s=o(5572);i.exports=u;function u(l,f){for(var c=l.length,h=new Array(c),d=0;d<c;++d)h[d]=s(l[d],f[d]);return h}},5771:function(i,a,o){"use strict";var s=o(8507),u=o(3788),l=o(2419);i.exports=f;function f(c){c.sort(u);for(var h=c.length,d=0,p=0;p<h;++p){var x=c[p],b=l(x);if(b!==0){if(d>0){var y=c[d-1];if(s(x,y)===0&&l(y)!==b){d-=1;continue}}c[d++]=x}}return c.length=d,c}},3233:function(i){"use strict";var a="",o;i.exports=s;function s(u,l){if(typeof u!="string")throw new TypeError("expected a string");if(l===1)return u;if(l===2)return u+u;var f=u.length*l;if(o!==u||typeof o=="undefined")o=u,a="";else if(a.length>=f)return a.substr(0,f);for(;f>a.length&&l>1;)l&1&&(a+=u),l>>=1,u+=u;return a+=u,a=a.substr(0,f),a}},3025:function(i,a,o){i.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(i){"use strict";i.exports=a;function a(o){for(var s=o.length,u=o[o.length-1],l=s,f=s-2;f>=0;--f){var c=u,h=o[f];u=c+h;var d=u-c,p=h-d;p&&(o[--l]=u,u=p)}for(var x=0,f=l;f<s;++f){var c=o[f],h=u;u=c+h;var d=u-c,p=h-d;p&&(o[x++]=p)}return o[x++]=u,o.length=x,o}},2962:function(i,a,o){"use strict";var s=o(5250),u=o(8210),l=o(3012),f=o(7004),c=6;function h(A,L,_,C){return function(v){return C(A(_(v[0][0],v[1][1]),_(-v[0][1],v[1][0])))}}function d(A,L,_,C){return function(v){return C(A(L(A(_(v[1][1],v[2][2]),_(-v[1][2],v[2][1])),v[0][0]),A(L(A(_(v[1][0],v[2][2]),_(-v[1][2],v[2][0])),-v[0][1]),L(A(_(v[1][0],v[2][1]),_(-v[1][1],v[2][0])),v[0][2]))))}}function p(A,L,_,C){return function(v){return C(A(A(L(A(L(A(_(v[2][2],v[3][3]),_(-v[2][3],v[3][2])),v[1][1]),A(L(A(_(v[2][1],v[3][3]),_(-v[2][3],v[3][1])),-v[1][2]),L(A(_(v[2][1],v[3][2]),_(-v[2][2],v[3][1])),v[1][3]))),v[0][0]),L(A(L(A(_(v[2][2],v[3][3]),_(-v[2][3],v[3][2])),v[1][0]),A(L(A(_(v[2][0],v[3][3]),_(-v[2][3],v[3][0])),-v[1][2]),L(A(_(v[2][0],v[3][2]),_(-v[2][2],v[3][0])),v[1][3]))),-v[0][1])),A(L(A(L(A(_(v[2][1],v[3][3]),_(-v[2][3],v[3][1])),v[1][0]),A(L(A(_(v[2][0],v[3][3]),_(-v[2][3],v[3][0])),-v[1][1]),L(A(_(v[2][0],v[3][1]),_(-v[2][1],v[3][0])),v[1][3]))),v[0][2]),L(A(L(A(_(v[2][1],v[3][2]),_(-v[2][2],v[3][1])),v[1][0]),A(L(A(_(v[2][0],v[3][2]),_(-v[2][2],v[3][0])),-v[1][1]),L(A(_(v[2][0],v[3][1]),_(-v[2][1],v[3][0])),v[1][2]))),-v[0][3]))))}}function x(A,L,_,C){return function(v){return C(A(A(L(A(A(L(A(L(A(_(v[3][3],v[4][4]),_(-v[3][4],v[4][3])),v[2][2]),A(L(A(_(v[3][2],v[4][4]),_(-v[3][4],v[4][2])),-v[2][3]),L(A(_(v[3][2],v[4][3]),_(-v[3][3],v[4][2])),v[2][4]))),v[1][1]),L(A(L(A(_(v[3][3],v[4][4]),_(-v[3][4],v[4][3])),v[2][1]),A(L(A(_(v[3][1],v[4][4]),_(-v[3][4],v[4][1])),-v[2][3]),L(A(_(v[3][1],v[4][3]),_(-v[3][3],v[4][1])),v[2][4]))),-v[1][2])),A(L(A(L(A(_(v[3][2],v[4][4]),_(-v[3][4],v[4][2])),v[2][1]),A(L(A(_(v[3][1],v[4][4]),_(-v[3][4],v[4][1])),-v[2][2]),L(A(_(v[3][1],v[4][2]),_(-v[3][2],v[4][1])),v[2][4]))),v[1][3]),L(A(L(A(_(v[3][2],v[4][3]),_(-v[3][3],v[4][2])),v[2][1]),A(L(A(_(v[3][1],v[4][3]),_(-v[3][3],v[4][1])),-v[2][2]),L(A(_(v[3][1],v[4][2]),_(-v[3][2],v[4][1])),v[2][3]))),-v[1][4]))),v[0][0]),L(A(A(L(A(L(A(_(v[3][3],v[4][4]),_(-v[3][4],v[4][3])),v[2][2]),A(L(A(_(v[3][2],v[4][4]),_(-v[3][4],v[4][2])),-v[2][3]),L(A(_(v[3][2],v[4][3]),_(-v[3][3],v[4][2])),v[2][4]))),v[1][0]),L(A(L(A(_(v[3][3],v[4][4]),_(-v[3][4],v[4][3])),v[2][0]),A(L(A(_(v[3][0],v[4][4]),_(-v[3][4],v[4][0])),-v[2][3]),L(A(_(v[3][0],v[4][3]),_(-v[3][3],v[4][0])),v[2][4]))),-v[1][2])),A(L(A(L(A(_(v[3][2],v[4][4]),_(-v[3][4],v[4][2])),v[2][0]),A(L(A(_(v[3][0],v[4][4]),_(-v[3][4],v[4][0])),-v[2][2]),L(A(_(v[3][0],v[4][2]),_(-v[3][2],v[4][0])),v[2][4]))),v[1][3]),L(A(L(A(_(v[3][2],v[4][3]),_(-v[3][3],v[4][2])),v[2][0]),A(L(A(_(v[3][0],v[4][3]),_(-v[3][3],v[4][0])),-v[2][2]),L(A(_(v[3][0],v[4][2]),_(-v[3][2],v[4][0])),v[2][3]))),-v[1][4]))),-v[0][1])),A(L(A(A(L(A(L(A(_(v[3][3],v[4][4]),_(-v[3][4],v[4][3])),v[2][1]),A(L(A(_(v[3][1],v[4][4]),_(-v[3][4],v[4][1])),-v[2][3]),L(A(_(v[3][1],v[4][3]),_(-v[3][3],v[4][1])),v[2][4]))),v[1][0]),L(A(L(A(_(v[3][3],v[4][4]),_(-v[3][4],v[4][3])),v[2][0]),A(L(A(_(v[3][0],v[4][4]),_(-v[3][4],v[4][0])),-v[2][3]),L(A(_(v[3][0],v[4][3]),_(-v[3][3],v[4][0])),v[2][4]))),-v[1][1])),A(L(A(L(A(_(v[3][1],v[4][4]),_(-v[3][4],v[4][1])),v[2][0]),A(L(A(_(v[3][0],v[4][4]),_(-v[3][4],v[4][0])),-v[2][1]),L(A(_(v[3][0],v[4][1]),_(-v[3][1],v[4][0])),v[2][4]))),v[1][3]),L(A(L(A(_(v[3][1],v[4][3]),_(-v[3][3],v[4][1])),v[2][0]),A(L(A(_(v[3][0],v[4][3]),_(-v[3][3],v[4][0])),-v[2][1]),L(A(_(v[3][0],v[4][1]),_(-v[3][1],v[4][0])),v[2][3]))),-v[1][4]))),v[0][2]),A(L(A(A(L(A(L(A(_(v[3][2],v[4][4]),_(-v[3][4],v[4][2])),v[2][1]),A(L(A(_(v[3][1],v[4][4]),_(-v[3][4],v[4][1])),-v[2][2]),L(A(_(v[3][1],v[4][2]),_(-v[3][2],v[4][1])),v[2][4]))),v[1][0]),L(A(L(A(_(v[3][2],v[4][4]),_(-v[3][4],v[4][2])),v[2][0]),A(L(A(_(v[3][0],v[4][4]),_(-v[3][4],v[4][0])),-v[2][2]),L(A(_(v[3][0],v[4][2]),_(-v[3][2],v[4][0])),v[2][4]))),-v[1][1])),A(L(A(L(A(_(v[3][1],v[4][4]),_(-v[3][4],v[4][1])),v[2][0]),A(L(A(_(v[3][0],v[4][4]),_(-v[3][4],v[4][0])),-v[2][1]),L(A(_(v[3][0],v[4][1]),_(-v[3][1],v[4][0])),v[2][4]))),v[1][2]),L(A(L(A(_(v[3][1],v[4][2]),_(-v[3][2],v[4][1])),v[2][0]),A(L(A(_(v[3][0],v[4][2]),_(-v[3][2],v[4][0])),-v[2][1]),L(A(_(v[3][0],v[4][1]),_(-v[3][1],v[4][0])),v[2][2]))),-v[1][4]))),-v[0][3]),L(A(A(L(A(L(A(_(v[3][2],v[4][3]),_(-v[3][3],v[4][2])),v[2][1]),A(L(A(_(v[3][1],v[4][3]),_(-v[3][3],v[4][1])),-v[2][2]),L(A(_(v[3][1],v[4][2]),_(-v[3][2],v[4][1])),v[2][3]))),v[1][0]),L(A(L(A(_(v[3][2],v[4][3]),_(-v[3][3],v[4][2])),v[2][0]),A(L(A(_(v[3][0],v[4][3]),_(-v[3][3],v[4][0])),-v[2][2]),L(A(_(v[3][0],v[4][2]),_(-v[3][2],v[4][0])),v[2][3]))),-v[1][1])),A(L(A(L(A(_(v[3][1],v[4][3]),_(-v[3][3],v[4][1])),v[2][0]),A(L(A(_(v[3][0],v[4][3]),_(-v[3][3],v[4][0])),-v[2][1]),L(A(_(v[3][0],v[4][1]),_(-v[3][1],v[4][0])),v[2][3]))),v[1][2]),L(A(L(A(_(v[3][1],v[4][2]),_(-v[3][2],v[4][1])),v[2][0]),A(L(A(_(v[3][0],v[4][2]),_(-v[3][2],v[4][0])),-v[2][1]),L(A(_(v[3][0],v[4][1]),_(-v[3][1],v[4][0])),v[2][2]))),-v[1][3]))),v[0][4])))))}}function b(A){var L=A===2?h:A===3?d:A===4?p:A===5?x:void 0;return L(u,l,s,f)}var y=[function(){return[0]},function(L){return[L[0][0]]}];function k(A,L,_,C,M,v,z,T){return function(q){switch(q.length){case 0:return A(q);case 1:return L(q);case 2:return _(q);case 3:return C(q);case 4:return M(q);case 5:return v(q)}var U=z[q.length];return U||(U=z[q.length]=T(q.length)),U(q)}}function E(){for(;y.length<c;)y.push(b(y.length));i.exports=k.apply(void 0,y.concat([y,b]));for(var A=0;A<y.length;++A)i.exports[A]=y[A]}E()},1944:function(i,a,o){"use strict";var s=o(5250),u=o(8210);i.exports=l;function l(f,c){for(var h=s(f[0],c[0]),d=1;d<f.length;++d)h=u(h,s(f[d],c[d]));return h}},2646:function(i,a,o){"use strict";var s=o(5250),u=o(8210),l=o(8545),f=o(3012),c=6;function h(M){var v=M===3?b:M===4?y:M===5?k:E;return v(u,l,s,f)}function d(){return 0}function p(){return 0}function x(){return 0}function b(M,v,z,T){function F(q,U,H){var j=z(q[0],q[0]),G=T(j,U[0]),O=T(j,H[0]),W=z(U[0],U[0]),re=T(W,q[0]),ne=T(W,H[0]),be=z(H[0],H[0]),ze=T(be,q[0]),Ce=T(be,U[0]),he=M(v(Ce,ne),v(re,G)),te=v(ze,O),ke=v(he,te);return ke[ke.length-1]}return F}function y(M,v,z,T){function F(q,U,H,j){var G=M(z(q[0],q[0]),z(q[1],q[1])),O=T(G,U[0]),W=T(G,H[0]),re=T(G,j[0]),ne=M(z(U[0],U[0]),z(U[1],U[1])),be=T(ne,q[0]),ze=T(ne,H[0]),Ce=T(ne,j[0]),he=M(z(H[0],H[0]),z(H[1],H[1])),te=T(he,q[0]),ke=T(he,U[0]),Ee=T(he,j[0]),Me=M(z(j[0],j[0]),z(j[1],j[1])),Oe=T(Me,q[0]),Re=T(Me,U[0]),me=T(Me,H[0]),Be=M(M(T(v(me,Ee),U[1]),M(T(v(Re,Ce),-H[1]),T(v(ke,ze),j[1]))),M(T(v(Re,Ce),q[1]),M(T(v(Oe,re),-U[1]),T(v(be,O),j[1])))),fe=M(M(T(v(me,Ee),q[1]),M(T(v(Oe,re),-H[1]),T(v(te,W),j[1]))),M(T(v(ke,ze),q[1]),M(T(v(te,W),-U[1]),T(v(be,O),H[1])))),Ze=v(Be,fe);return Ze[Ze.length-1]}return F}function k(M,v,z,T){function F(q,U,H,j,G){var O=M(z(q[0],q[0]),M(z(q[1],q[1]),z(q[2],q[2]))),W=T(O,U[0]),re=T(O,H[0]),ne=T(O,j[0]),be=T(O,G[0]),ze=M(z(U[0],U[0]),M(z(U[1],U[1]),z(U[2],U[2]))),Ce=T(ze,q[0]),he=T(ze,H[0]),te=T(ze,j[0]),ke=T(ze,G[0]),Ee=M(z(H[0],H[0]),M(z(H[1],H[1]),z(H[2],H[2]))),Me=T(Ee,q[0]),Oe=T(Ee,U[0]),Re=T(Ee,j[0]),me=T(Ee,G[0]),Be=M(z(j[0],j[0]),M(z(j[1],j[1]),z(j[2],j[2]))),fe=T(Be,q[0]),Ze=T(Be,U[0]),et=T(Be,H[0]),gt=T(Be,G[0]),Pt=M(z(G[0],G[0]),M(z(G[1],G[1]),z(G[2],G[2]))),Qe=T(Pt,q[0]),Xe=T(Pt,U[0]),Tt=T(Pt,H[0]),xt=T(Pt,j[0]),_t=M(M(M(T(M(T(v(xt,gt),H[1]),M(T(v(Tt,me),-j[1]),T(v(et,Re),G[1]))),U[2]),M(T(M(T(v(xt,gt),U[1]),M(T(v(Xe,ke),-j[1]),T(v(Ze,te),G[1]))),-H[2]),T(M(T(v(Tt,me),U[1]),M(T(v(Xe,ke),-H[1]),T(v(Oe,he),G[1]))),j[2]))),M(T(M(T(v(et,Re),U[1]),M(T(v(Ze,te),-H[1]),T(v(Oe,he),j[1]))),-G[2]),M(T(M(T(v(xt,gt),U[1]),M(T(v(Xe,ke),-j[1]),T(v(Ze,te),G[1]))),q[2]),T(M(T(v(xt,gt),q[1]),M(T(v(Qe,be),-j[1]),T(v(fe,ne),G[1]))),-U[2])))),M(M(T(M(T(v(Xe,ke),q[1]),M(T(v(Qe,be),-U[1]),T(v(Ce,W),G[1]))),j[2]),M(T(M(T(v(Ze,te),q[1]),M(T(v(fe,ne),-U[1]),T(v(Ce,W),j[1]))),-G[2]),T(M(T(v(et,Re),U[1]),M(T(v(Ze,te),-H[1]),T(v(Oe,he),j[1]))),q[2]))),M(T(M(T(v(et,Re),q[1]),M(T(v(fe,ne),-H[1]),T(v(Me,re),j[1]))),-U[2]),M(T(M(T(v(Ze,te),q[1]),M(T(v(fe,ne),-U[1]),T(v(Ce,W),j[1]))),H[2]),T(M(T(v(Oe,he),q[1]),M(T(v(Me,re),-U[1]),T(v(Ce,W),H[1]))),-j[2]))))),Ct=M(M(M(T(M(T(v(xt,gt),H[1]),M(T(v(Tt,me),-j[1]),T(v(et,Re),G[1]))),q[2]),T(M(T(v(xt,gt),q[1]),M(T(v(Qe,be),-j[1]),T(v(fe,ne),G[1]))),-H[2])),M(T(M(T(v(Tt,me),q[1]),M(T(v(Qe,be),-H[1]),T(v(Me,re),G[1]))),j[2]),T(M(T(v(et,Re),q[1]),M(T(v(fe,ne),-H[1]),T(v(Me,re),j[1]))),-G[2]))),M(M(T(M(T(v(Tt,me),U[1]),M(T(v(Xe,ke),-H[1]),T(v(Oe,he),G[1]))),q[2]),T(M(T(v(Tt,me),q[1]),M(T(v(Qe,be),-H[1]),T(v(Me,re),G[1]))),-U[2])),M(T(M(T(v(Xe,ke),q[1]),M(T(v(Qe,be),-U[1]),T(v(Ce,W),G[1]))),H[2]),T(M(T(v(Oe,he),q[1]),M(T(v(Me,re),-U[1]),T(v(Ce,W),H[1]))),-G[2])))),jt=v(_t,Ct);return jt[jt.length-1]}return F}function E(M,v,z,T){function F(q,U,H,j,G,O){var W=M(M(z(q[0],q[0]),z(q[1],q[1])),M(z(q[2],q[2]),z(q[3],q[3]))),re=T(W,U[0]),ne=T(W,H[0]),be=T(W,j[0]),ze=T(W,G[0]),Ce=T(W,O[0]),he=M(M(z(U[0],U[0]),z(U[1],U[1])),M(z(U[2],U[2]),z(U[3],U[3]))),te=T(he,q[0]),ke=T(he,H[0]),Ee=T(he,j[0]),Me=T(he,G[0]),Oe=T(he,O[0]),Re=M(M(z(H[0],H[0]),z(H[1],H[1])),M(z(H[2],H[2]),z(H[3],H[3]))),me=T(Re,q[0]),Be=T(Re,U[0]),fe=T(Re,j[0]),Ze=T(Re,G[0]),et=T(Re,O[0]),gt=M(M(z(j[0],j[0]),z(j[1],j[1])),M(z(j[2],j[2]),z(j[3],j[3]))),Pt=T(gt,q[0]),Qe=T(gt,U[0]),Xe=T(gt,H[0]),Tt=T(gt,G[0]),xt=T(gt,O[0]),_t=M(M(z(G[0],G[0]),z(G[1],G[1])),M(z(G[2],G[2]),z(G[3],G[3]))),Ct=T(_t,q[0]),jt=T(_t,U[0]),At=T(_t,H[0]),Te=T(_t,j[0]),nt=T(_t,O[0]),ut=M(M(z(O[0],O[0]),z(O[1],O[1])),M(z(O[2],O[2]),z(O[3],O[3]))),ct=T(ut,q[0]),rt=T(ut,U[0]),je=T(ut,H[0]),tt=T(ut,j[0]),Je=T(ut,G[0]),Mt=M(M(M(T(M(M(T(M(T(v(Je,nt),j[1]),M(T(v(tt,xt),-G[1]),T(v(Te,Tt),O[1]))),H[2]),T(M(T(v(Je,nt),H[1]),M(T(v(je,et),-G[1]),T(v(At,Ze),O[1]))),-j[2])),M(T(M(T(v(tt,xt),H[1]),M(T(v(je,et),-j[1]),T(v(Xe,fe),O[1]))),G[2]),T(M(T(v(Te,Tt),H[1]),M(T(v(At,Ze),-j[1]),T(v(Xe,fe),G[1]))),-O[2]))),U[3]),M(T(M(M(T(M(T(v(Je,nt),j[1]),M(T(v(tt,xt),-G[1]),T(v(Te,Tt),O[1]))),U[2]),T(M(T(v(Je,nt),U[1]),M(T(v(rt,Oe),-G[1]),T(v(jt,Me),O[1]))),-j[2])),M(T(M(T(v(tt,xt),U[1]),M(T(v(rt,Oe),-j[1]),T(v(Qe,Ee),O[1]))),G[2]),T(M(T(v(Te,Tt),U[1]),M(T(v(jt,Me),-j[1]),T(v(Qe,Ee),G[1]))),-O[2]))),-H[3]),T(M(M(T(M(T(v(Je,nt),H[1]),M(T(v(je,et),-G[1]),T(v(At,Ze),O[1]))),U[2]),T(M(T(v(Je,nt),U[1]),M(T(v(rt,Oe),-G[1]),T(v(jt,Me),O[1]))),-H[2])),M(T(M(T(v(je,et),U[1]),M(T(v(rt,Oe),-H[1]),T(v(Be,ke),O[1]))),G[2]),T(M(T(v(At,Ze),U[1]),M(T(v(jt,Me),-H[1]),T(v(Be,ke),G[1]))),-O[2]))),j[3]))),M(M(T(M(M(T(M(T(v(tt,xt),H[1]),M(T(v(je,et),-j[1]),T(v(Xe,fe),O[1]))),U[2]),T(M(T(v(tt,xt),U[1]),M(T(v(rt,Oe),-j[1]),T(v(Qe,Ee),O[1]))),-H[2])),M(T(M(T(v(je,et),U[1]),M(T(v(rt,Oe),-H[1]),T(v(Be,ke),O[1]))),j[2]),T(M(T(v(Xe,fe),U[1]),M(T(v(Qe,Ee),-H[1]),T(v(Be,ke),j[1]))),-O[2]))),-G[3]),T(M(M(T(M(T(v(Te,Tt),H[1]),M(T(v(At,Ze),-j[1]),T(v(Xe,fe),G[1]))),U[2]),T(M(T(v(Te,Tt),U[1]),M(T(v(jt,Me),-j[1]),T(v(Qe,Ee),G[1]))),-H[2])),M(T(M(T(v(At,Ze),U[1]),M(T(v(jt,Me),-H[1]),T(v(Be,ke),G[1]))),j[2]),T(M(T(v(Xe,fe),U[1]),M(T(v(Qe,Ee),-H[1]),T(v(Be,ke),j[1]))),-G[2]))),O[3])),M(T(M(M(T(M(T(v(Je,nt),j[1]),M(T(v(tt,xt),-G[1]),T(v(Te,Tt),O[1]))),U[2]),T(M(T(v(Je,nt),U[1]),M(T(v(rt,Oe),-G[1]),T(v(jt,Me),O[1]))),-j[2])),M(T(M(T(v(tt,xt),U[1]),M(T(v(rt,Oe),-j[1]),T(v(Qe,Ee),O[1]))),G[2]),T(M(T(v(Te,Tt),U[1]),M(T(v(jt,Me),-j[1]),T(v(Qe,Ee),G[1]))),-O[2]))),q[3]),T(M(M(T(M(T(v(Je,nt),j[1]),M(T(v(tt,xt),-G[1]),T(v(Te,Tt),O[1]))),q[2]),T(M(T(v(Je,nt),q[1]),M(T(v(ct,Ce),-G[1]),T(v(Ct,ze),O[1]))),-j[2])),M(T(M(T(v(tt,xt),q[1]),M(T(v(ct,Ce),-j[1]),T(v(Pt,be),O[1]))),G[2]),T(M(T(v(Te,Tt),q[1]),M(T(v(Ct,ze),-j[1]),T(v(Pt,be),G[1]))),-O[2]))),-U[3])))),M(M(M(T(M(M(T(M(T(v(Je,nt),U[1]),M(T(v(rt,Oe),-G[1]),T(v(jt,Me),O[1]))),q[2]),T(M(T(v(Je,nt),q[1]),M(T(v(ct,Ce),-G[1]),T(v(Ct,ze),O[1]))),-U[2])),M(T(M(T(v(rt,Oe),q[1]),M(T(v(ct,Ce),-U[1]),T(v(te,re),O[1]))),G[2]),T(M(T(v(jt,Me),q[1]),M(T(v(Ct,ze),-U[1]),T(v(te,re),G[1]))),-O[2]))),j[3]),T(M(M(T(M(T(v(tt,xt),U[1]),M(T(v(rt,Oe),-j[1]),T(v(Qe,Ee),O[1]))),q[2]),T(M(T(v(tt,xt),q[1]),M(T(v(ct,Ce),-j[1]),T(v(Pt,be),O[1]))),-U[2])),M(T(M(T(v(rt,Oe),q[1]),M(T(v(ct,Ce),-U[1]),T(v(te,re),O[1]))),j[2]),T(M(T(v(Qe,Ee),q[1]),M(T(v(Pt,be),-U[1]),T(v(te,re),j[1]))),-O[2]))),-G[3])),M(T(M(M(T(M(T(v(Te,Tt),U[1]),M(T(v(jt,Me),-j[1]),T(v(Qe,Ee),G[1]))),q[2]),T(M(T(v(Te,Tt),q[1]),M(T(v(Ct,ze),-j[1]),T(v(Pt,be),G[1]))),-U[2])),M(T(M(T(v(jt,Me),q[1]),M(T(v(Ct,ze),-U[1]),T(v(te,re),G[1]))),j[2]),T(M(T(v(Qe,Ee),q[1]),M(T(v(Pt,be),-U[1]),T(v(te,re),j[1]))),-G[2]))),O[3]),T(M(M(T(M(T(v(tt,xt),H[1]),M(T(v(je,et),-j[1]),T(v(Xe,fe),O[1]))),U[2]),T(M(T(v(tt,xt),U[1]),M(T(v(rt,Oe),-j[1]),T(v(Qe,Ee),O[1]))),-H[2])),M(T(M(T(v(je,et),U[1]),M(T(v(rt,Oe),-H[1]),T(v(Be,ke),O[1]))),j[2]),T(M(T(v(Xe,fe),U[1]),M(T(v(Qe,Ee),-H[1]),T(v(Be,ke),j[1]))),-O[2]))),q[3]))),M(M(T(M(M(T(M(T(v(tt,xt),H[1]),M(T(v(je,et),-j[1]),T(v(Xe,fe),O[1]))),q[2]),T(M(T(v(tt,xt),q[1]),M(T(v(ct,Ce),-j[1]),T(v(Pt,be),O[1]))),-H[2])),M(T(M(T(v(je,et),q[1]),M(T(v(ct,Ce),-H[1]),T(v(me,ne),O[1]))),j[2]),T(M(T(v(Xe,fe),q[1]),M(T(v(Pt,be),-H[1]),T(v(me,ne),j[1]))),-O[2]))),-U[3]),T(M(M(T(M(T(v(tt,xt),U[1]),M(T(v(rt,Oe),-j[1]),T(v(Qe,Ee),O[1]))),q[2]),T(M(T(v(tt,xt),q[1]),M(T(v(ct,Ce),-j[1]),T(v(Pt,be),O[1]))),-U[2])),M(T(M(T(v(rt,Oe),q[1]),M(T(v(ct,Ce),-U[1]),T(v(te,re),O[1]))),j[2]),T(M(T(v(Qe,Ee),q[1]),M(T(v(Pt,be),-U[1]),T(v(te,re),j[1]))),-O[2]))),H[3])),M(T(M(M(T(M(T(v(je,et),U[1]),M(T(v(rt,Oe),-H[1]),T(v(Be,ke),O[1]))),q[2]),T(M(T(v(je,et),q[1]),M(T(v(ct,Ce),-H[1]),T(v(me,ne),O[1]))),-U[2])),M(T(M(T(v(rt,Oe),q[1]),M(T(v(ct,Ce),-U[1]),T(v(te,re),O[1]))),H[2]),T(M(T(v(Be,ke),q[1]),M(T(v(me,ne),-U[1]),T(v(te,re),H[1]))),-O[2]))),-j[3]),T(M(M(T(M(T(v(Xe,fe),U[1]),M(T(v(Qe,Ee),-H[1]),T(v(Be,ke),j[1]))),q[2]),T(M(T(v(Xe,fe),q[1]),M(T(v(Pt,be),-H[1]),T(v(me,ne),j[1]))),-U[2])),M(T(M(T(v(Qe,Ee),q[1]),M(T(v(Pt,be),-U[1]),T(v(te,re),j[1]))),H[2]),T(M(T(v(Be,ke),q[1]),M(T(v(me,ne),-U[1]),T(v(te,re),H[1]))),-j[2]))),O[3]))))),Vt=M(M(M(T(M(M(T(M(T(v(Je,nt),j[1]),M(T(v(tt,xt),-G[1]),T(v(Te,Tt),O[1]))),H[2]),T(M(T(v(Je,nt),H[1]),M(T(v(je,et),-G[1]),T(v(At,Ze),O[1]))),-j[2])),M(T(M(T(v(tt,xt),H[1]),M(T(v(je,et),-j[1]),T(v(Xe,fe),O[1]))),G[2]),T(M(T(v(Te,Tt),H[1]),M(T(v(At,Ze),-j[1]),T(v(Xe,fe),G[1]))),-O[2]))),q[3]),M(T(M(M(T(M(T(v(Je,nt),j[1]),M(T(v(tt,xt),-G[1]),T(v(Te,Tt),O[1]))),q[2]),T(M(T(v(Je,nt),q[1]),M(T(v(ct,Ce),-G[1]),T(v(Ct,ze),O[1]))),-j[2])),M(T(M(T(v(tt,xt),q[1]),M(T(v(ct,Ce),-j[1]),T(v(Pt,be),O[1]))),G[2]),T(M(T(v(Te,Tt),q[1]),M(T(v(Ct,ze),-j[1]),T(v(Pt,be),G[1]))),-O[2]))),-H[3]),T(M(M(T(M(T(v(Je,nt),H[1]),M(T(v(je,et),-G[1]),T(v(At,Ze),O[1]))),q[2]),T(M(T(v(Je,nt),q[1]),M(T(v(ct,Ce),-G[1]),T(v(Ct,ze),O[1]))),-H[2])),M(T(M(T(v(je,et),q[1]),M(T(v(ct,Ce),-H[1]),T(v(me,ne),O[1]))),G[2]),T(M(T(v(At,Ze),q[1]),M(T(v(Ct,ze),-H[1]),T(v(me,ne),G[1]))),-O[2]))),j[3]))),M(M(T(M(M(T(M(T(v(tt,xt),H[1]),M(T(v(je,et),-j[1]),T(v(Xe,fe),O[1]))),q[2]),T(M(T(v(tt,xt),q[1]),M(T(v(ct,Ce),-j[1]),T(v(Pt,be),O[1]))),-H[2])),M(T(M(T(v(je,et),q[1]),M(T(v(ct,Ce),-H[1]),T(v(me,ne),O[1]))),j[2]),T(M(T(v(Xe,fe),q[1]),M(T(v(Pt,be),-H[1]),T(v(me,ne),j[1]))),-O[2]))),-G[3]),T(M(M(T(M(T(v(Te,Tt),H[1]),M(T(v(At,Ze),-j[1]),T(v(Xe,fe),G[1]))),q[2]),T(M(T(v(Te,Tt),q[1]),M(T(v(Ct,ze),-j[1]),T(v(Pt,be),G[1]))),-H[2])),M(T(M(T(v(At,Ze),q[1]),M(T(v(Ct,ze),-H[1]),T(v(me,ne),G[1]))),j[2]),T(M(T(v(Xe,fe),q[1]),M(T(v(Pt,be),-H[1]),T(v(me,ne),j[1]))),-G[2]))),O[3])),M(T(M(M(T(M(T(v(Je,nt),H[1]),M(T(v(je,et),-G[1]),T(v(At,Ze),O[1]))),U[2]),T(M(T(v(Je,nt),U[1]),M(T(v(rt,Oe),-G[1]),T(v(jt,Me),O[1]))),-H[2])),M(T(M(T(v(je,et),U[1]),M(T(v(rt,Oe),-H[1]),T(v(Be,ke),O[1]))),G[2]),T(M(T(v(At,Ze),U[1]),M(T(v(jt,Me),-H[1]),T(v(Be,ke),G[1]))),-O[2]))),q[3]),T(M(M(T(M(T(v(Je,nt),H[1]),M(T(v(je,et),-G[1]),T(v(At,Ze),O[1]))),q[2]),T(M(T(v(Je,nt),q[1]),M(T(v(ct,Ce),-G[1]),T(v(Ct,ze),O[1]))),-H[2])),M(T(M(T(v(je,et),q[1]),M(T(v(ct,Ce),-H[1]),T(v(me,ne),O[1]))),G[2]),T(M(T(v(At,Ze),q[1]),M(T(v(Ct,ze),-H[1]),T(v(me,ne),G[1]))),-O[2]))),-U[3])))),M(M(M(T(M(M(T(M(T(v(Je,nt),U[1]),M(T(v(rt,Oe),-G[1]),T(v(jt,Me),O[1]))),q[2]),T(M(T(v(Je,nt),q[1]),M(T(v(ct,Ce),-G[1]),T(v(Ct,ze),O[1]))),-U[2])),M(T(M(T(v(rt,Oe),q[1]),M(T(v(ct,Ce),-U[1]),T(v(te,re),O[1]))),G[2]),T(M(T(v(jt,Me),q[1]),M(T(v(Ct,ze),-U[1]),T(v(te,re),G[1]))),-O[2]))),H[3]),T(M(M(T(M(T(v(je,et),U[1]),M(T(v(rt,Oe),-H[1]),T(v(Be,ke),O[1]))),q[2]),T(M(T(v(je,et),q[1]),M(T(v(ct,Ce),-H[1]),T(v(me,ne),O[1]))),-U[2])),M(T(M(T(v(rt,Oe),q[1]),M(T(v(ct,Ce),-U[1]),T(v(te,re),O[1]))),H[2]),T(M(T(v(Be,ke),q[1]),M(T(v(me,ne),-U[1]),T(v(te,re),H[1]))),-O[2]))),-G[3])),M(T(M(M(T(M(T(v(At,Ze),U[1]),M(T(v(jt,Me),-H[1]),T(v(Be,ke),G[1]))),q[2]),T(M(T(v(At,Ze),q[1]),M(T(v(Ct,ze),-H[1]),T(v(me,ne),G[1]))),-U[2])),M(T(M(T(v(jt,Me),q[1]),M(T(v(Ct,ze),-U[1]),T(v(te,re),G[1]))),H[2]),T(M(T(v(Be,ke),q[1]),M(T(v(me,ne),-U[1]),T(v(te,re),H[1]))),-G[2]))),O[3]),T(M(M(T(M(T(v(Te,Tt),H[1]),M(T(v(At,Ze),-j[1]),T(v(Xe,fe),G[1]))),U[2]),T(M(T(v(Te,Tt),U[1]),M(T(v(jt,Me),-j[1]),T(v(Qe,Ee),G[1]))),-H[2])),M(T(M(T(v(At,Ze),U[1]),M(T(v(jt,Me),-H[1]),T(v(Be,ke),G[1]))),j[2]),T(M(T(v(Xe,fe),U[1]),M(T(v(Qe,Ee),-H[1]),T(v(Be,ke),j[1]))),-G[2]))),q[3]))),M(M(T(M(M(T(M(T(v(Te,Tt),H[1]),M(T(v(At,Ze),-j[1]),T(v(Xe,fe),G[1]))),q[2]),T(M(T(v(Te,Tt),q[1]),M(T(v(Ct,ze),-j[1]),T(v(Pt,be),G[1]))),-H[2])),M(T(M(T(v(At,Ze),q[1]),M(T(v(Ct,ze),-H[1]),T(v(me,ne),G[1]))),j[2]),T(M(T(v(Xe,fe),q[1]),M(T(v(Pt,be),-H[1]),T(v(me,ne),j[1]))),-G[2]))),-U[3]),T(M(M(T(M(T(v(Te,Tt),U[1]),M(T(v(jt,Me),-j[1]),T(v(Qe,Ee),G[1]))),q[2]),T(M(T(v(Te,Tt),q[1]),M(T(v(Ct,ze),-j[1]),T(v(Pt,be),G[1]))),-U[2])),M(T(M(T(v(jt,Me),q[1]),M(T(v(Ct,ze),-U[1]),T(v(te,re),G[1]))),j[2]),T(M(T(v(Qe,Ee),q[1]),M(T(v(Pt,be),-U[1]),T(v(te,re),j[1]))),-G[2]))),H[3])),M(T(M(M(T(M(T(v(At,Ze),U[1]),M(T(v(jt,Me),-H[1]),T(v(Be,ke),G[1]))),q[2]),T(M(T(v(At,Ze),q[1]),M(T(v(Ct,ze),-H[1]),T(v(me,ne),G[1]))),-U[2])),M(T(M(T(v(jt,Me),q[1]),M(T(v(Ct,ze),-U[1]),T(v(te,re),G[1]))),H[2]),T(M(T(v(Be,ke),q[1]),M(T(v(me,ne),-U[1]),T(v(te,re),H[1]))),-G[2]))),-j[3]),T(M(M(T(M(T(v(Xe,fe),U[1]),M(T(v(Qe,Ee),-H[1]),T(v(Be,ke),j[1]))),q[2]),T(M(T(v(Xe,fe),q[1]),M(T(v(Pt,be),-H[1]),T(v(me,ne),j[1]))),-U[2])),M(T(M(T(v(Qe,Ee),q[1]),M(T(v(Pt,be),-U[1]),T(v(te,re),j[1]))),H[2]),T(M(T(v(Be,ke),q[1]),M(T(v(me,ne),-U[1]),T(v(te,re),H[1]))),-j[2]))),G[3]))))),Kt=v(Mt,Vt);return Kt[Kt.length-1]}return F}var A=[d,p,x];function L(M){var v=A[M.length];return v||(v=A[M.length]=h(M.length)),v.apply(void 0,M)}function _(M,v,z,T,F,q,U,H){function j(G,O,W,re,ne,be){switch(arguments.length){case 0:case 1:return 0;case 2:return T(G,O);case 3:return F(G,O,W);case 4:return q(G,O,W,re);case 5:return U(G,O,W,re,ne);case 6:return H(G,O,W,re,ne,be)}for(var ze=new Array(arguments.length),Ce=0;Ce<arguments.length;++Ce)ze[Ce]=arguments[Ce];return M(ze)}return j}function C(){for(;A.length<=c;)A.push(h(A.length));i.exports=_.apply(void 0,[L].concat(A));for(var M=0;M<=c;++M)i.exports[M]=A[M]}C()},727:function(i,a,o){"use strict";var s=o(2962),u=6;function l(A){var L=A===2?h:A===3?d:A===4?p:A===5?x:b;return A<6?L(s[A]):L(s)}function f(){return[[0]]}function c(A,L){return[[L[0]],[A[0][0]]]}function h(A){return function(_,C){return[A([[+C[0],+_[0][1]],[+C[1],+_[1][1]]]),A([[+_[0][0],+C[0]],[+_[1][0],+C[1]]]),A(_)]}}function d(A){return function(_,C){return[A([[+C[0],+_[0][1],+_[0][2]],[+C[1],+_[1][1],+_[1][2]],[+C[2],+_[2][1],+_[2][2]]]),A([[+_[0][0],+C[0],+_[0][2]],[+_[1][0],+C[1],+_[1][2]],[+_[2][0],+C[2],+_[2][2]]]),A([[+_[0][0],+_[0][1],+C[0]],[+_[1][0],+_[1][1],+C[1]],[+_[2][0],+_[2][1],+C[2]]]),A(_)]}}function p(A){return function(_,C){return[A([[+C[0],+_[0][1],+_[0][2],+_[0][3]],[+C[1],+_[1][1],+_[1][2],+_[1][3]],[+C[2],+_[2][1],+_[2][2],+_[2][3]],[+C[3],+_[3][1],+_[3][2],+_[3][3]]]),A([[+_[0][0],+C[0],+_[0][2],+_[0][3]],[+_[1][0],+C[1],+_[1][2],+_[1][3]],[+_[2][0],+C[2],+_[2][2],+_[2][3]],[+_[3][0],+C[3],+_[3][2],+_[3][3]]]),A([[+_[0][0],+_[0][1],+C[0],+_[0][3]],[+_[1][0],+_[1][1],+C[1],+_[1][3]],[+_[2][0],+_[2][1],+C[2],+_[2][3]],[+_[3][0],+_[3][1],+C[3],+_[3][3]]]),A([[+_[0][0],+_[0][1],+_[0][2],+C[0]],[+_[1][0],+_[1][1],+_[1][2],+C[1]],[+_[2][0],+_[2][1],+_[2][2],+C[2]],[+_[3][0],+_[3][1],+_[3][2],+C[3]]]),A(_)]}}function x(A){return function(_,C){return[A([[+C[0],+_[0][1],+_[0][2],+_[0][3],+_[0][4]],[+C[1],+_[1][1],+_[1][2],+_[1][3],+_[1][4]],[+C[2],+_[2][1],+_[2][2],+_[2][3],+_[2][4]],[+C[3],+_[3][1],+_[3][2],+_[3][3],+_[3][4]],[+C[4],+_[4][1],+_[4][2],+_[4][3],+_[4][4]]]),A([[+_[0][0],+C[0],+_[0][2],+_[0][3],+_[0][4]],[+_[1][0],+C[1],+_[1][2],+_[1][3],+_[1][4]],[+_[2][0],+C[2],+_[2][2],+_[2][3],+_[2][4]],[+_[3][0],+C[3],+_[3][2],+_[3][3],+_[3][4]],[+_[4][0],+C[4],+_[4][2],+_[4][3],+_[4][4]]]),A([[+_[0][0],+_[0][1],+C[0],+_[0][3],+_[0][4]],[+_[1][0],+_[1][1],+C[1],+_[1][3],+_[1][4]],[+_[2][0],+_[2][1],+C[2],+_[2][3],+_[2][4]],[+_[3][0],+_[3][1],+C[3],+_[3][3],+_[3][4]],[+_[4][0],+_[4][1],+C[4],+_[4][3],+_[4][4]]]),A([[+_[0][0],+_[0][1],+_[0][2],+C[0],+_[0][4]],[+_[1][0],+_[1][1],+_[1][2],+C[1],+_[1][4]],[+_[2][0],+_[2][1],+_[2][2],+C[2],+_[2][4]],[+_[3][0],+_[3][1],+_[3][2],+C[3],+_[3][4]],[+_[4][0],+_[4][1],+_[4][2],+C[4],+_[4][4]]]),A([[+_[0][0],+_[0][1],+_[0][2],+_[0][3],+C[0]],[+_[1][0],+_[1][1],+_[1][2],+_[1][3],+C[1]],[+_[2][0],+_[2][1],+_[2][2],+_[2][3],+C[2]],[+_[3][0],+_[3][1],+_[3][2],+_[3][3],+C[3]],[+_[4][0],+_[4][1],+_[4][2],+_[4][3],+C[4]]]),A(_)]}}function b(A){return function(_,C){return[A([[+C[0],+_[0][1],+_[0][2],+_[0][3],+_[0][4],+_[0][5]],[+C[1],+_[1][1],+_[1][2],+_[1][3],+_[1][4],+_[1][5]],[+C[2],+_[2][1],+_[2][2],+_[2][3],+_[2][4],+_[2][5]],[+C[3],+_[3][1],+_[3][2],+_[3][3],+_[3][4],+_[3][5]],[+C[4],+_[4][1],+_[4][2],+_[4][3],+_[4][4],+_[4][5]],[+C[5],+_[5][1],+_[5][2],+_[5][3],+_[5][4],+_[5][5]]]),A([[+_[0][0],+C[0],+_[0][2],+_[0][3],+_[0][4],+_[0][5]],[+_[1][0],+C[1],+_[1][2],+_[1][3],+_[1][4],+_[1][5]],[+_[2][0],+C[2],+_[2][2],+_[2][3],+_[2][4],+_[2][5]],[+_[3][0],+C[3],+_[3][2],+_[3][3],+_[3][4],+_[3][5]],[+_[4][0],+C[4],+_[4][2],+_[4][3],+_[4][4],+_[4][5]],[+_[5][0],+C[5],+_[5][2],+_[5][3],+_[5][4],+_[5][5]]]),A([[+_[0][0],+_[0][1],+C[0],+_[0][3],+_[0][4],+_[0][5]],[+_[1][0],+_[1][1],+C[1],+_[1][3],+_[1][4],+_[1][5]],[+_[2][0],+_[2][1],+C[2],+_[2][3],+_[2][4],+_[2][5]],[+_[3][0],+_[3][1],+C[3],+_[3][3],+_[3][4],+_[3][5]],[+_[4][0],+_[4][1],+C[4],+_[4][3],+_[4][4],+_[4][5]],[+_[5][0],+_[5][1],+C[5],+_[5][3],+_[5][4],+_[5][5]]]),A([[+_[0][0],+_[0][1],+_[0][2],+C[0],+_[0][4],+_[0][5]],[+_[1][0],+_[1][1],+_[1][2],+C[1],+_[1][4],+_[1][5]],[+_[2][0],+_[2][1],+_[2][2],+C[2],+_[2][4],+_[2][5]],[+_[3][0],+_[3][1],+_[3][2],+C[3],+_[3][4],+_[3][5]],[+_[4][0],+_[4][1],+_[4][2],+C[4],+_[4][4],+_[4][5]],[+_[5][0],+_[5][1],+_[5][2],+C[5],+_[5][4],+_[5][5]]]),A([[+_[0][0],+_[0][1],+_[0][2],+_[0][3],+C[0],+_[0][5]],[+_[1][0],+_[1][1],+_[1][2],+_[1][3],+C[1],+_[1][5]],[+_[2][0],+_[2][1],+_[2][2],+_[2][3],+C[2],+_[2][5]],[+_[3][0],+_[3][1],+_[3][2],+_[3][3],+C[3],+_[3][5]],[+_[4][0],+_[4][1],+_[4][2],+_[4][3],+C[4],+_[4][5]],[+_[5][0],+_[5][1],+_[5][2],+_[5][3],+C[5],+_[5][5]]]),A([[+_[0][0],+_[0][1],+_[0][2],+_[0][3],+_[0][4],+C[0]],[+_[1][0],+_[1][1],+_[1][2],+_[1][3],+_[1][4],+C[1]],[+_[2][0],+_[2][1],+_[2][2],+_[2][3],+_[2][4],+C[2]],[+_[3][0],+_[3][1],+_[3][2],+_[3][3],+_[3][4],+C[3]],[+_[4][0],+_[4][1],+_[4][2],+_[4][3],+_[4][4],+C[4]],[+_[5][0],+_[5][1],+_[5][2],+_[5][3],+_[5][4],+C[5]]]),A(_)]}}var y=[f,c];function k(A,L,_,C,M,v,z,T){return function(q,U){switch(q.length){case 0:return A(q,U);case 1:return L(q,U);case 2:return _(q,U);case 3:return C(q,U);case 4:return M(q,U);case 5:return v(q,U)}var H=z[q.length];return H||(H=z[q.length]=T(q.length)),H(q,U)}}function E(){for(;y.length<u;)y.push(l(y.length));i.exports=k.apply(void 0,y.concat([y,l]));for(var A=0;A<u;++A)i.exports[A]=y[A]}E()},3250:function(i,a,o){"use strict";var s=o(5250),u=o(8210),l=o(3012),f=o(8545),c=5,h=11102230246251565e-32,d=(3+16*h)*h,p=(7+56*h)*h;function x(v,z,T,F){return function(U,H,j){var G=v(v(z(H[1],j[0]),z(-j[1],H[0])),v(z(U[1],H[0]),z(-H[1],U[0]))),O=v(z(U[1],j[0]),z(-j[1],U[0])),W=F(G,O);return W[W.length-1]}}function b(v,z,T,F){return function(U,H,j,G){var O=v(v(T(v(z(j[1],G[0]),z(-G[1],j[0])),H[2]),v(T(v(z(H[1],G[0]),z(-G[1],H[0])),-j[2]),T(v(z(H[1],j[0]),z(-j[1],H[0])),G[2]))),v(T(v(z(H[1],G[0]),z(-G[1],H[0])),U[2]),v(T(v(z(U[1],G[0]),z(-G[1],U[0])),-H[2]),T(v(z(U[1],H[0]),z(-H[1],U[0])),G[2])))),W=v(v(T(v(z(j[1],G[0]),z(-G[1],j[0])),U[2]),v(T(v(z(U[1],G[0]),z(-G[1],U[0])),-j[2]),T(v(z(U[1],j[0]),z(-j[1],U[0])),G[2]))),v(T(v(z(H[1],j[0]),z(-j[1],H[0])),U[2]),v(T(v(z(U[1],j[0]),z(-j[1],U[0])),-H[2]),T(v(z(U[1],H[0]),z(-H[1],U[0])),j[2])))),re=F(O,W);return re[re.length-1]}}function y(v,z,T,F){return function(U,H,j,G,O){var W=v(v(v(T(v(T(v(z(G[1],O[0]),z(-O[1],G[0])),j[2]),v(T(v(z(j[1],O[0]),z(-O[1],j[0])),-G[2]),T(v(z(j[1],G[0]),z(-G[1],j[0])),O[2]))),H[3]),v(T(v(T(v(z(G[1],O[0]),z(-O[1],G[0])),H[2]),v(T(v(z(H[1],O[0]),z(-O[1],H[0])),-G[2]),T(v(z(H[1],G[0]),z(-G[1],H[0])),O[2]))),-j[3]),T(v(T(v(z(j[1],O[0]),z(-O[1],j[0])),H[2]),v(T(v(z(H[1],O[0]),z(-O[1],H[0])),-j[2]),T(v(z(H[1],j[0]),z(-j[1],H[0])),O[2]))),G[3]))),v(T(v(T(v(z(j[1],G[0]),z(-G[1],j[0])),H[2]),v(T(v(z(H[1],G[0]),z(-G[1],H[0])),-j[2]),T(v(z(H[1],j[0]),z(-j[1],H[0])),G[2]))),-O[3]),v(T(v(T(v(z(G[1],O[0]),z(-O[1],G[0])),H[2]),v(T(v(z(H[1],O[0]),z(-O[1],H[0])),-G[2]),T(v(z(H[1],G[0]),z(-G[1],H[0])),O[2]))),U[3]),T(v(T(v(z(G[1],O[0]),z(-O[1],G[0])),U[2]),v(T(v(z(U[1],O[0]),z(-O[1],U[0])),-G[2]),T(v(z(U[1],G[0]),z(-G[1],U[0])),O[2]))),-H[3])))),v(v(T(v(T(v(z(H[1],O[0]),z(-O[1],H[0])),U[2]),v(T(v(z(U[1],O[0]),z(-O[1],U[0])),-H[2]),T(v(z(U[1],H[0]),z(-H[1],U[0])),O[2]))),G[3]),v(T(v(T(v(z(H[1],G[0]),z(-G[1],H[0])),U[2]),v(T(v(z(U[1],G[0]),z(-G[1],U[0])),-H[2]),T(v(z(U[1],H[0]),z(-H[1],U[0])),G[2]))),-O[3]),T(v(T(v(z(j[1],G[0]),z(-G[1],j[0])),H[2]),v(T(v(z(H[1],G[0]),z(-G[1],H[0])),-j[2]),T(v(z(H[1],j[0]),z(-j[1],H[0])),G[2]))),U[3]))),v(T(v(T(v(z(j[1],G[0]),z(-G[1],j[0])),U[2]),v(T(v(z(U[1],G[0]),z(-G[1],U[0])),-j[2]),T(v(z(U[1],j[0]),z(-j[1],U[0])),G[2]))),-H[3]),v(T(v(T(v(z(H[1],G[0]),z(-G[1],H[0])),U[2]),v(T(v(z(U[1],G[0]),z(-G[1],U[0])),-H[2]),T(v(z(U[1],H[0]),z(-H[1],U[0])),G[2]))),j[3]),T(v(T(v(z(H[1],j[0]),z(-j[1],H[0])),U[2]),v(T(v(z(U[1],j[0]),z(-j[1],U[0])),-H[2]),T(v(z(U[1],H[0]),z(-H[1],U[0])),j[2]))),-G[3]))))),re=v(v(v(T(v(T(v(z(G[1],O[0]),z(-O[1],G[0])),j[2]),v(T(v(z(j[1],O[0]),z(-O[1],j[0])),-G[2]),T(v(z(j[1],G[0]),z(-G[1],j[0])),O[2]))),U[3]),T(v(T(v(z(G[1],O[0]),z(-O[1],G[0])),U[2]),v(T(v(z(U[1],O[0]),z(-O[1],U[0])),-G[2]),T(v(z(U[1],G[0]),z(-G[1],U[0])),O[2]))),-j[3])),v(T(v(T(v(z(j[1],O[0]),z(-O[1],j[0])),U[2]),v(T(v(z(U[1],O[0]),z(-O[1],U[0])),-j[2]),T(v(z(U[1],j[0]),z(-j[1],U[0])),O[2]))),G[3]),T(v(T(v(z(j[1],G[0]),z(-G[1],j[0])),U[2]),v(T(v(z(U[1],G[0]),z(-G[1],U[0])),-j[2]),T(v(z(U[1],j[0]),z(-j[1],U[0])),G[2]))),-O[3]))),v(v(T(v(T(v(z(j[1],O[0]),z(-O[1],j[0])),H[2]),v(T(v(z(H[1],O[0]),z(-O[1],H[0])),-j[2]),T(v(z(H[1],j[0]),z(-j[1],H[0])),O[2]))),U[3]),T(v(T(v(z(j[1],O[0]),z(-O[1],j[0])),U[2]),v(T(v(z(U[1],O[0]),z(-O[1],U[0])),-j[2]),T(v(z(U[1],j[0]),z(-j[1],U[0])),O[2]))),-H[3])),v(T(v(T(v(z(H[1],O[0]),z(-O[1],H[0])),U[2]),v(T(v(z(U[1],O[0]),z(-O[1],U[0])),-H[2]),T(v(z(U[1],H[0]),z(-H[1],U[0])),O[2]))),j[3]),T(v(T(v(z(H[1],j[0]),z(-j[1],H[0])),U[2]),v(T(v(z(U[1],j[0]),z(-j[1],U[0])),-H[2]),T(v(z(U[1],H[0]),z(-H[1],U[0])),j[2]))),-O[3])))),ne=F(W,re);return ne[ne.length-1]}}function k(v){var z=v===3?x:v===4?b:y;return z(u,s,l,f)}var E=k(3),A=k(4),L=[function(){return 0},function(){return 0},function(z,T){return T[0]-z[0]},function(z,T,F){var q=(z[1]-F[1])*(T[0]-F[0]),U=(z[0]-F[0])*(T[1]-F[1]),H=q-U,j;if(q>0){if(U<=0)return H;j=q+U}else if(q<0){if(U>=0)return H;j=-(q+U)}else return H;var G=d*j;return H>=G||H<=-G?H:E(z,T,F)},function(z,T,F,q){var U=z[0]-q[0],H=T[0]-q[0],j=F[0]-q[0],G=z[1]-q[1],O=T[1]-q[1],W=F[1]-q[1],re=z[2]-q[2],ne=T[2]-q[2],be=F[2]-q[2],ze=H*W,Ce=j*O,he=j*G,te=U*W,ke=U*O,Ee=H*G,Me=re*(ze-Ce)+ne*(he-te)+be*(ke-Ee),Oe=(Math.abs(ze)+Math.abs(Ce))*Math.abs(re)+(Math.abs(he)+Math.abs(te))*Math.abs(ne)+(Math.abs(ke)+Math.abs(Ee))*Math.abs(be),Re=p*Oe;return Me>Re||-Me>Re?Me:A(z,T,F,q)}];function _(v){var z=L[v.length];return z||(z=L[v.length]=k(v.length)),z.apply(void 0,v)}function C(v,z,T,F,q,U,H){return function(G,O,W,re,ne){switch(arguments.length){case 0:case 1:return 0;case 2:return F(G,O);case 3:return q(G,O,W);case 4:return U(G,O,W,re);case 5:return H(G,O,W,re,ne)}for(var be=new Array(arguments.length),ze=0;ze<arguments.length;++ze)be[ze]=arguments[ze];return v(be)}}function M(){for(;L.length<=c;)L.push(k(L.length));i.exports=C.apply(void 0,[_].concat(L));for(var v=0;v<=c;++v)i.exports[v]=L[v]}M()},5382:function(i,a,o){"use strict";var s=o(8210),u=o(3012);i.exports=l;function l(f,c){if(f.length===1)return u(c,f[0]);if(c.length===1)return u(f,c[0]);if(f.length===0||c.length===0)return[0];var h=[0];if(f.length<c.length)for(var d=0;d<f.length;++d)h=s(h,u(c,f[d]));else for(var d=0;d<c.length;++d)h=s(h,u(f,c[d]));return h}},3012:function(i,a,o){"use strict";var s=o(5250),u=o(9362);i.exports=l;function l(f,c){var h=f.length;if(h===1){var d=s(f[0],c);return d[0]?d:[d[1]]}var p=new Array(2*h),x=[.1,.1],b=[.1,.1],y=0;s(f[0],c,x),x[0]&&(p[y++]=x[0]);for(var k=1;k<h;++k){s(f[k],c,b);var E=x[1];u(E,b[0],x),x[0]&&(p[y++]=x[0]);var A=b[1],L=x[1],_=A+L,C=_-A,M=L-C;x[1]=_,M&&(p[y++]=M)}return x[1]&&(p[y++]=x[1]),y===0&&(p[y++]=0),p.length=y,p}},1125:function(i,a,o){"use strict";i.exports=l;var s=o(3250)[3];function u(f,c,h,d){for(var p=0;p<2;++p){var x=f[p],b=c[p],y=Math.min(x,b),k=Math.max(x,b),E=h[p],A=d[p],L=Math.min(E,A),_=Math.max(E,A);if(_<y||k<L)return!1}return!0}function l(f,c,h,d){var p=s(f,h,d),x=s(c,h,d);if(p>0&&x>0||p<0&&x<0)return!1;var b=s(h,f,c),y=s(d,f,c);return b>0&&y>0||b<0&&y<0?!1:p===0&&x===0&&b===0&&y===0?u(f,c,h,d):!0}},8545:function(i){"use strict";i.exports=o;function a(s,u){var l=s+u,f=l-s,c=l-f,h=u-f,d=s-c,p=d+h;return p?[p,l]:[l]}function o(s,u){var l=s.length|0,f=u.length|0;if(l===1&&f===1)return a(s[0],-u[0]);var c=l+f,h=new Array(c),d=0,p=0,x=0,b=Math.abs,y=s[p],k=b(y),E=-u[x],A=b(E),L,_;k<A?(_=y,p+=1,p<l&&(y=s[p],k=b(y))):(_=E,x+=1,x<f&&(E=-u[x],A=b(E))),p<l&&k<A||x>=f?(L=y,p+=1,p<l&&(y=s[p],k=b(y))):(L=E,x+=1,x<f&&(E=-u[x],A=b(E)));for(var C=L+_,M=C-L,v=_-M,z=v,T=C,F,q,U,H,j;p<l&&x<f;)k<A?(L=y,p+=1,p<l&&(y=s[p],k=b(y))):(L=E,x+=1,x<f&&(E=-u[x],A=b(E))),_=z,C=L+_,M=C-L,v=_-M,v&&(h[d++]=v),F=T+C,q=F-T,U=F-q,H=C-q,j=T-U,z=j+H,T=F;for(;p<l;)L=y,_=z,C=L+_,M=C-L,v=_-M,v&&(h[d++]=v),F=T+C,q=F-T,U=F-q,H=C-q,j=T-U,z=j+H,T=F,p+=1,p<l&&(y=s[p]);for(;x<f;)L=E,_=z,C=L+_,M=C-L,v=_-M,v&&(h[d++]=v),F=T+C,q=F-T,U=F-q,H=C-q,j=T-U,z=j+H,T=F,x+=1,x<f&&(E=-u[x]);return z&&(h[d++]=z),T&&(h[d++]=T),d||(h[d++]=0),h.length=d,h}},8210:function(i){"use strict";i.exports=o;function a(s,u){var l=s+u,f=l-s,c=l-f,h=u-f,d=s-c,p=d+h;return p?[p,l]:[l]}function o(s,u){var l=s.length|0,f=u.length|0;if(l===1&&f===1)return a(s[0],u[0]);var c=l+f,h=new Array(c),d=0,p=0,x=0,b=Math.abs,y=s[p],k=b(y),E=u[x],A=b(E),L,_;k<A?(_=y,p+=1,p<l&&(y=s[p],k=b(y))):(_=E,x+=1,x<f&&(E=u[x],A=b(E))),p<l&&k<A||x>=f?(L=y,p+=1,p<l&&(y=s[p],k=b(y))):(L=E,x+=1,x<f&&(E=u[x],A=b(E)));for(var C=L+_,M=C-L,v=_-M,z=v,T=C,F,q,U,H,j;p<l&&x<f;)k<A?(L=y,p+=1,p<l&&(y=s[p],k=b(y))):(L=E,x+=1,x<f&&(E=u[x],A=b(E))),_=z,C=L+_,M=C-L,v=_-M,v&&(h[d++]=v),F=T+C,q=F-T,U=F-q,H=C-q,j=T-U,z=j+H,T=F;for(;p<l;)L=y,_=z,C=L+_,M=C-L,v=_-M,v&&(h[d++]=v),F=T+C,q=F-T,U=F-q,H=C-q,j=T-U,z=j+H,T=F,p+=1,p<l&&(y=s[p]);for(;x<f;)L=E,_=z,C=L+_,M=C-L,v=_-M,v&&(h[d++]=v),F=T+C,q=F-T,U=F-q,H=C-q,j=T-U,z=j+H,T=F,x+=1,x<f&&(E=u[x]);return z&&(h[d++]=z),T&&(h[d++]=T),d||(h[d++]=0),h.length=d,h}},9127:function(i,a,o){"use strict";i.exports=l;var s=o(6204),u=o(5771);function l(f){return u(s(f))}},7765:function(i,a,o){"use strict";i.exports=y;var s=o(9618),u=o(1888),l=o(446),f=o(1570);function c(k){for(var E=k.length,A=0,L=0;L<E;++L)A=Math.max(A,k[L].length)|0;return A-1}function h(k,E){for(var A=k.length,L=u.mallocUint8(A),_=0;_<A;++_)L[_]=k[_]<E|0;return L}function d(k,E){for(var A=k.length,L=E*(E+1)/2*A|0,_=u.mallocUint32(L*2),C=0,M=0;M<A;++M)for(var v=k[M],E=v.length,z=0;z<E;++z)for(var T=0;T<z;++T){var F=v[T],q=v[z];_[C++]=Math.min(F,q)|0,_[C++]=Math.max(F,q)|0}var U=C/2|0;l(s(_,[U,2]));for(var H=2,M=2;M<C;M+=2)_[M-2]===_[M]&&_[M-1]===_[M+1]||(_[H++]=_[M],_[H++]=_[M+1]);return s(_,[H/2|0,2])}function p(k,E,A,L){for(var _=k.data,C=k.shape[0],M=u.mallocDouble(C),v=0,z=0;z<C;++z){var T=_[2*z],F=_[2*z+1];if(A[T]!==A[F]){var q=E[T],U=E[F];_[2*v]=T,_[2*v+1]=F,M[v++]=(U-L)/(U-q)}}return k.shape[0]=v,s(M,[v])}function x(k,E){var A=u.mallocInt32(E*2),L=k.shape[0],_=k.data;A[0]=0;for(var C=0,M=0;M<L;++M){var v=_[2*M];if(v!==C){for(A[2*C+1]=M;++C<v;)A[2*C]=M,A[2*C+1]=M;A[2*C]=M}}for(A[2*C+1]=L;++C<E;)A[2*C]=A[2*C+1]=L;return A}function b(k){for(var E=k.shape[0]|0,A=k.data,L=new Array(E),_=0;_<E;++_)L[_]=[A[2*_],A[2*_+1]];return L}function y(k,E,A,L){A=A||0,typeof L=="undefined"&&(L=c(k));var _=k.length;if(_===0||L<1)return{cells:[],vertexIds:[],vertexWeights:[]};var C=h(E,+A),M=d(k,L),v=p(M,E,C,+A),z=x(M,E.length|0),T=f(L)(k,M.data,z,C),F=b(M),q=[].slice.call(v.data,0,v.shape[0]);return u.free(C),u.free(M.data),u.free(v.data),u.free(z),{cells:T,vertexIds:F,vertexWeights:q}}},1570:function(i){"use strict";i.exports=o;var a=[function(){function u(f,c,h,d){for(var p=Math.min(h,d)|0,x=Math.max(h,d)|0,b=f[2*p],y=f[2*p+1];b<y;){var k=b+y>>1,E=c[2*k+1];if(E===x)return k;x<E?y=k:b=k+1}return b}function l(f,c,h,d){for(var p=f.length,x=[],b=0;b<p;++b)var y=f[b],k=y.length;return x}return l},function(){function u(f,c,h,d){for(var p=Math.min(h,d)|0,x=Math.max(h,d)|0,b=f[2*p],y=f[2*p+1];b<y;){var k=b+y>>1,E=c[2*k+1];if(E===x)return k;x<E?y=k:b=k+1}return b}function l(f,c,h,d){for(var p=f.length,x=[],b=0;b<p;++b){var y=f[b],k=y.length;if(k===2){var E=(d[y[0]]<<0)+(d[y[1]]<<1);if(E===0||E===3)continue;switch(E){case 0:break;case 1:x.push([u(h,c,y[0],y[1])]);break;case 2:x.push([u(h,c,y[1],y[0])]);break;case 3:break}}}return x}return l},function(){function u(f,c,h,d){for(var p=Math.min(h,d)|0,x=Math.max(h,d)|0,b=f[2*p],y=f[2*p+1];b<y;){var k=b+y>>1,E=c[2*k+1];if(E===x)return k;x<E?y=k:b=k+1}return b}function l(f,c,h,d){for(var p=f.length,x=[],b=0;b<p;++b){var y=f[b],k=y.length;if(k===3){var E=(d[y[0]]<<0)+(d[y[1]]<<1)+(d[y[2]]<<2);if(E===0||E===7)continue;switch(E){case 0:break;case 1:x.push([u(h,c,y[0],y[2]),u(h,c,y[0],y[1])]);break;case 2:x.push([u(h,c,y[1],y[0]),u(h,c,y[1],y[2])]);break;case 3:x.push([u(h,c,y[0],y[2]),u(h,c,y[1],y[2])]);break;case 4:x.push([u(h,c,y[2],y[1]),u(h,c,y[2],y[0])]);break;case 5:x.push([u(h,c,y[2],y[1]),u(h,c,y[0],y[1])]);break;case 6:x.push([u(h,c,y[1],y[0]),u(h,c,y[2],y[0])]);break;case 7:break}}else if(k===2){var E=(d[y[0]]<<0)+(d[y[1]]<<1);if(E===0||E===3)continue;switch(E){case 0:break;case 1:x.push([u(h,c,y[0],y[1])]);break;case 2:x.push([u(h,c,y[1],y[0])]);break;case 3:break}}}return x}return l},function(){function u(f,c,h,d){for(var p=Math.min(h,d)|0,x=Math.max(h,d)|0,b=f[2*p],y=f[2*p+1];b<y;){var k=b+y>>1,E=c[2*k+1];if(E===x)return k;x<E?y=k:b=k+1}return b}function l(f,c,h,d){for(var p=f.length,x=[],b=0;b<p;++b){var y=f[b],k=y.length;if(k===4){var E=(d[y[0]]<<0)+(d[y[1]]<<1)+(d[y[2]]<<2)+(d[y[3]]<<3);if(E===0||E===15)continue;switch(E){case 0:break;case 1:x.push([u(h,c,y[0],y[1]),u(h,c,y[0],y[2]),u(h,c,y[0],y[3])]);break;case 2:x.push([u(h,c,y[1],y[2]),u(h,c,y[1],y[0]),u(h,c,y[1],y[3])]);break;case 3:x.push([u(h,c,y[1],y[2]),u(h,c,y[0],y[2]),u(h,c,y[0],y[3])],[u(h,c,y[1],y[3]),u(h,c,y[1],y[2]),u(h,c,y[0],y[3])]);break;case 4:x.push([u(h,c,y[2],y[0]),u(h,c,y[2],y[1]),u(h,c,y[2],y[3])]);break;case 5:x.push([u(h,c,y[0],y[1]),u(h,c,y[2],y[1]),u(h,c,y[0],y[3])],[u(h,c,y[2],y[1]),u(h,c,y[2],y[3]),u(h,c,y[0],y[3])]);break;case 6:x.push([u(h,c,y[2],y[0]),u(h,c,y[1],y[0]),u(h,c,y[1],y[3])],[u(h,c,y[2],y[3]),u(h,c,y[2],y[0]),u(h,c,y[1],y[3])]);break;case 7:x.push([u(h,c,y[0],y[3]),u(h,c,y[1],y[3]),u(h,c,y[2],y[3])]);break;case 8:x.push([u(h,c,y[3],y[1]),u(h,c,y[3],y[0]),u(h,c,y[3],y[2])]);break;case 9:x.push([u(h,c,y[3],y[1]),u(h,c,y[0],y[1]),u(h,c,y[0],y[2])],[u(h,c,y[3],y[2]),u(h,c,y[3],y[1]),u(h,c,y[0],y[2])]);break;case 10:x.push([u(h,c,y[1],y[0]),u(h,c,y[3],y[0]),u(h,c,y[1],y[2])],[u(h,c,y[3],y[0]),u(h,c,y[3],y[2]),u(h,c,y[1],y[2])]);break;case 11:x.push([u(h,c,y[1],y[2]),u(h,c,y[0],y[2]),u(h,c,y[3],y[2])]);break;case 12:x.push([u(h,c,y[3],y[0]),u(h,c,y[2],y[0]),u(h,c,y[2],y[1])],[u(h,c,y[3],y[1]),u(h,c,y[3],y[0]),u(h,c,y[2],y[1])]);break;case 13:x.push([u(h,c,y[0],y[1]),u(h,c,y[2],y[1]),u(h,c,y[3],y[1])]);break;case 14:x.push([u(h,c,y[2],y[0]),u(h,c,y[1],y[0]),u(h,c,y[3],y[0])]);break;case 15:break}}else if(k===3){var E=(d[y[0]]<<0)+(d[y[1]]<<1)+(d[y[2]]<<2);if(E===0||E===7)continue;switch(E){case 0:break;case 1:x.push([u(h,c,y[0],y[2]),u(h,c,y[0],y[1])]);break;case 2:x.push([u(h,c,y[1],y[0]),u(h,c,y[1],y[2])]);break;case 3:x.push([u(h,c,y[0],y[2]),u(h,c,y[1],y[2])]);break;case 4:x.push([u(h,c,y[2],y[1]),u(h,c,y[2],y[0])]);break;case 5:x.push([u(h,c,y[2],y[1]),u(h,c,y[0],y[1])]);break;case 6:x.push([u(h,c,y[1],y[0]),u(h,c,y[2],y[0])]);break;case 7:break}}else if(k===2){var E=(d[y[0]]<<0)+(d[y[1]]<<1);if(E===0||E===3)continue;switch(E){case 0:break;case 1:x.push([u(h,c,y[0],y[1])]);break;case 2:x.push([u(h,c,y[1],y[0])]);break;case 3:break}}}return x}return l}];function o(s){return a[s]()}},6803:function(i,a,o){"use strict";var s,u=o(8828),l=o(1755);function f(z){for(var T=0,F=Math.max,q=0,U=z.length;q<U;++q)T=F(T,z[q].length);return T-1}s=f;function c(z){for(var T=-1,F=Math.max,q=0,U=z.length;q<U;++q)for(var H=z[q],j=0,G=H.length;j<G;++j)T=F(T,H[j]);return T+1}s=c;function h(z){for(var T=new Array(z.length),F=0,q=z.length;F<q;++F)T[F]=z[F].slice(0);return T}s=h;function d(z,T){var F=z.length,q=z.length-T.length,U=Math.min;if(q)return q;switch(F){case 0:return 0;case 1:return z[0]-T[0];case 2:var W=z[0]+z[1]-T[0]-T[1];return W||U(z[0],z[1])-U(T[0],T[1]);case 3:var H=z[0]+z[1],j=T[0]+T[1];if(W=H+z[2]-(j+T[2]),W)return W;var G=U(z[0],z[1]),O=U(T[0],T[1]),W=U(G,z[2])-U(O,T[2]);return W||U(G+z[2],H)-U(O+T[2],j);default:var re=z.slice(0);re.sort();var ne=T.slice(0);ne.sort();for(var be=0;be<F;++be)if(q=re[be]-ne[be],q)return q;return 0}}a.Fw=d;function p(z,T){return d(z[0],T[0])}function x(z,T){if(T){for(var F=z.length,q=new Array(F),U=0;U<F;++U)q[U]=[z[U],T[U]];q.sort(p);for(var U=0;U<F;++U)z[U]=q[U][0],T[U]=q[U][1];return z}else return z.sort(d),z}s=x;function b(z){if(z.length===0)return[];for(var T=1,F=z.length,q=1;q<F;++q){var U=z[q];if(d(U,z[q-1])){if(q===T){T++;continue}z[T++]=U}}return z.length=T,z}s=b;function y(z,T){for(var F=0,q=z.length-1,U=-1;F<=q;){var H=F+q>>1,j=d(z[H],T);j<=0?(j===0&&(U=H),F=H+1):j>0&&(q=H-1)}return U}s=y;function k(z,T){for(var F=new Array(z.length),q=0,U=F.length;q<U;++q)F[q]=[];for(var H=[],q=0,j=T.length;q<j;++q)for(var G=T[q],O=G.length,W=1,re=1<<O;W<re;++W){H.length=u.popCount(W);for(var ne=0,be=0;be<O;++be)W&1<<be&&(H[ne++]=G[be]);var ze=y(z,H);if(!(ze<0))for(;F[ze++].push(q),!(ze>=z.length||d(z[ze],H)!==0););}return F}s=k;function E(z,T){if(!T)return k(b(L(z,0)),z,0);for(var F=new Array(T),q=0;q<T;++q)F[q]=[];for(var q=0,U=z.length;q<U;++q)for(var H=z[q],j=0,G=H.length;j<G;++j)F[H[j]].push(q);return F}s=E;function A(z){for(var T=[],F=0,q=z.length;F<q;++F)for(var U=z[F],H=U.length|0,j=1,G=1<<H;j<G;++j){for(var O=[],W=0;W<H;++W)j>>>W&1&&O.push(U[W]);T.push(O)}return x(T)}s=A;function L(z,T){if(T<0)return[];for(var F=[],q=(1<<T+1)-1,U=0;U<z.length;++U)for(var H=z[U],j=q;j<1<<H.length;j=u.nextCombination(j)){for(var G=new Array(T+1),O=0,W=0;W<H.length;++W)j&1<<W&&(G[O++]=H[W]);F.push(G)}return x(F)}s=L;function _(z){for(var T=[],F=0,q=z.length;F<q;++F)for(var U=z[F],H=0,j=U.length;H<j;++H){for(var G=new Array(U.length-1),O=0,W=0;O<j;++O)O!==H&&(G[W++]=U[O]);T.push(G)}return x(T)}s=_;function C(z,T){for(var F=new l(T),q=0;q<z.length;++q)for(var U=z[q],H=0;H<U.length;++H)for(var j=H+1;j<U.length;++j)F.link(U[H],U[j]);for(var G=[],O=F.ranks,q=0;q<O.length;++q)O[q]=-1;for(var q=0;q<z.length;++q){var W=F.find(z[q][0]);O[W]<0?(O[W]=G.length,G.push([z[q].slice(0)])):G[O[W]].push(z[q].slice(0))}return G}function M(z){for(var T=b(x(L(z,0))),F=new l(T.length),q=0;q<z.length;++q)for(var U=z[q],H=0;H<U.length;++H)for(var j=y(T,[U[H]]),G=H+1;G<U.length;++G)F.link(j,y(T,[U[G]]));for(var O=[],W=F.ranks,q=0;q<W.length;++q)W[q]=-1;for(var q=0;q<z.length;++q){var re=F.find(y(T,[z[q][0]]));W[re]<0?(W[re]=O.length,O.push([z[q].slice(0)])):O[W[re]].push(z[q].slice(0))}return O}function v(z,T){return T?C(z,T):M(z)}s=v},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(l){return(l>0)-(l<0)},a.abs=function(l){var f=l>>o-1;return(l^f)-f},a.min=function(l,f){return f^(l^f)&-(l<f)},a.max=function(l,f){return l^(l^f)&-(l<f)},a.isPow2=function(l){return!(l&l-1)&&!!l},a.log2=function(l){var f,c;return f=(l>65535)<<4,l>>>=f,c=(l>255)<<3,l>>>=c,f|=c,c=(l>15)<<2,l>>>=c,f|=c,c=(l>3)<<1,l>>>=c,f|=c,f|l>>1},a.log10=function(l){return l>=1e9?9:l>=1e8?8:l>=1e7?7:l>=1e6?6:l>=1e5?5:l>=1e4?4:l>=1e3?3:l>=100?2:l>=10?1:0},a.popCount=function(l){return l=l-(l>>>1&1431655765),l=(l&858993459)+(l>>>2&858993459),(l+(l>>>4)&252645135)*16843009>>>24};function s(l){var f=32;return l&=-l,l&&f--,l&65535&&(f-=16),l&16711935&&(f-=8),l&252645135&&(f-=4),l&858993459&&(f-=2),l&1431655765&&(f-=1),f}a.countTrailingZeros=s,a.nextPow2=function(l){return l+=l===0,--l,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l+1},a.prevPow2=function(l){return l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l-(l>>>1)},a.parity=function(l){return l^=l>>>16,l^=l>>>8,l^=l>>>4,l&=15,27030>>>l&1};var u=new Array(256);(function(l){for(var f=0;f<256;++f){var c=f,h=f,d=7;for(c>>>=1;c;c>>>=1)h<<=1,h|=c&1,--d;l[f]=h<<d&255}})(u),a.reverse=function(l){return u[l&255]<<24|u[l>>>8&255]<<16|u[l>>>16&255]<<8|u[l>>>24&255]},a.interleave2=function(l,f){return l&=65535,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,l|f<<1},a.deinterleave2=function(l,f){return l=l>>>f&1431655765,l=(l|l>>>1)&858993459,l=(l|l>>>2)&252645135,l=(l|l>>>4)&16711935,l=(l|l>>>16)&65535,l<<16>>16},a.interleave3=function(l,f,c){return l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,l|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,l|c<<2},a.deinterleave3=function(l,f){return l=l>>>f&1227133513,l=(l|l>>>2)&3272356035,l=(l|l>>>4)&251719695,l=(l|l>>>8)&4278190335,l=(l|l>>>16)&1023,l<<22>>22},a.nextCombination=function(l){var f=l|l-1;return f+1|(~f&-~f)-1>>>s(l)+1}},2014:function(i,a,o){"use strict";"use restrict";var s=o(3105),u=o(4623);function l(v){for(var z=0,T=Math.max,F=0,q=v.length;F<q;++F)z=T(z,v[F].length);return z-1}a.dimension=l;function f(v){for(var z=-1,T=Math.max,F=0,q=v.length;F<q;++F)for(var U=v[F],H=0,j=U.length;H<j;++H)z=T(z,U[H]);return z+1}a.countVertices=f;function c(v){for(var z=new Array(v.length),T=0,F=v.length;T<F;++T)z[T]=v[T].slice(0);return z}a.cloneCells=c;function h(v,z){var T=v.length,F=v.length-z.length,q=Math.min;if(F)return F;switch(T){case 0:return 0;case 1:return v[0]-z[0];case 2:var O=v[0]+v[1]-z[0]-z[1];return O||q(v[0],v[1])-q(z[0],z[1]);case 3:var U=v[0]+v[1],H=z[0]+z[1];if(O=U+v[2]-(H+z[2]),O)return O;var j=q(v[0],v[1]),G=q(z[0],z[1]),O=q(j,v[2])-q(G,z[2]);return O||q(j+v[2],U)-q(G+z[2],H);default:var W=v.slice(0);W.sort();var re=z.slice(0);re.sort();for(var ne=0;ne<T;++ne)if(F=W[ne]-re[ne],F)return F;return 0}}a.compareCells=h;function d(v,z){return h(v[0],z[0])}function p(v,z){if(z){for(var T=v.length,F=new Array(T),q=0;q<T;++q)F[q]=[v[q],z[q]];F.sort(d);for(var q=0;q<T;++q)v[q]=F[q][0],z[q]=F[q][1];return v}else return v.sort(h),v}a.normalize=p;function x(v){if(v.length===0)return[];for(var z=1,T=v.length,F=1;F<T;++F){var q=v[F];if(h(q,v[F-1])){if(F===z){z++;continue}v[z++]=q}}return v.length=z,v}a.unique=x;function b(v,z){for(var T=0,F=v.length-1,q=-1;T<=F;){var U=T+F>>1,H=h(v[U],z);H<=0?(H===0&&(q=U),T=U+1):H>0&&(F=U-1)}return q}a.findCell=b;function y(v,z){for(var T=new Array(v.length),F=0,q=T.length;F<q;++F)T[F]=[];for(var U=[],F=0,H=z.length;F<H;++F)for(var j=z[F],G=j.length,O=1,W=1<<G;O<W;++O){U.length=s.popCount(O);for(var re=0,ne=0;ne<G;++ne)O&1<<ne&&(U[re++]=j[ne]);var be=b(v,U);if(!(be<0))for(;T[be++].push(F),!(be>=v.length||h(v[be],U)!==0););}return T}a.incidence=y;function k(v,z){if(!z)return y(x(A(v,0)),v,0);for(var T=new Array(z),F=0;F<z;++F)T[F]=[];for(var F=0,q=v.length;F<q;++F)for(var U=v[F],H=0,j=U.length;H<j;++H)T[U[H]].push(F);return T}a.dual=k;function E(v){for(var z=[],T=0,F=v.length;T<F;++T)for(var q=v[T],U=q.length|0,H=1,j=1<<U;H<j;++H){for(var G=[],O=0;O<U;++O)H>>>O&1&&G.push(q[O]);z.push(G)}return p(z)}a.explode=E;function A(v,z){if(z<0)return[];for(var T=[],F=(1<<z+1)-1,q=0;q<v.length;++q)for(var U=v[q],H=F;H<1<<U.length;H=s.nextCombination(H)){for(var j=new Array(z+1),G=0,O=0;O<U.length;++O)H&1<<O&&(j[G++]=U[O]);T.push(j)}return p(T)}a.skeleton=A;function L(v){for(var z=[],T=0,F=v.length;T<F;++T)for(var q=v[T],U=0,H=q.length;U<H;++U){for(var j=new Array(q.length-1),G=0,O=0;G<H;++G)G!==U&&(j[O++]=q[G]);z.push(j)}return p(z)}a.boundary=L;function _(v,z){for(var T=new u(z),F=0;F<v.length;++F)for(var q=v[F],U=0;U<q.length;++U)for(var H=U+1;H<q.length;++H)T.link(q[U],q[H]);for(var j=[],G=T.ranks,F=0;F<G.length;++F)G[F]=-1;for(var F=0;F<v.length;++F){var O=T.find(v[F][0]);G[O]<0?(G[O]=j.length,j.push([v[F].slice(0)])):j[G[O]].push(v[F].slice(0))}return j}function C(v){for(var z=x(p(A(v,0))),T=new u(z.length),F=0;F<v.length;++F)for(var q=v[F],U=0;U<q.length;++U)for(var H=b(z,[q[U]]),j=U+1;j<q.length;++j)T.link(H,b(z,[q[j]]));for(var G=[],O=T.ranks,F=0;F<O.length;++F)O[F]=-1;for(var F=0;F<v.length;++F){var W=T.find(b(z,[v[F][0]]));O[W]<0?(O[W]=G.length,G.push([v[F].slice(0)])):G[O[W]].push(v[F].slice(0))}return G}function M(v,z){return z?_(v,z):C(v)}a.connectedComponents=M},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 u=s[o];s[o]=s[u],o=u}return o},a.prototype.link=function(o,s){var u=this.find(o),l=this.find(s);if(u!==l){var f=this.ranks,c=this.roots,h=f[u],d=f[l];h<d?c[u]=l:d<h?c[l]=u:(c[l]=u,++f[u])}}},5878:function(i,a,o){"use strict";i.exports=f;var s=o(3250),u=o(2014);function l(c,h,d){var p=Math.abs(s(c,h,d)),x=Math.sqrt(Math.pow(h[0]-d[0],2)+Math.pow(h[1]-d[1],2));return p/x}function f(c,h,d){for(var p=h.length,x=c.length,b=new Array(p),y=new Array(p),k=new Array(p),E=new Array(p),A=0;A<p;++A)b[A]=y[A]=-1,k[A]=1/0,E[A]=!1;for(var A=0;A<x;++A){var L=c[A];if(L.length!==2)throw new Error("Input must be a graph");var _=L[1],C=L[0];y[C]!==-1?y[C]=-2:y[C]=_,b[_]!==-1?b[_]=-2:b[_]=C}function M(te){if(E[te])return 1/0;var ke=b[te],Ee=y[te];return ke<0||Ee<0?1/0:l(h[te],h[ke],h[Ee])}function v(te,ke){var Ee=G[te],Me=G[ke];G[te]=Me,G[ke]=Ee,O[Ee]=ke,O[Me]=te}function z(te){return k[G[te]]}function T(te){return te&1?te-1>>1:(te>>1)-1}function F(te){for(var ke=z(te);;){var Ee=ke,Me=2*te+1,Oe=2*(te+1),Re=te;if(Me<re){var me=z(Me);me<Ee&&(Re=Me,Ee=me)}if(Oe<re){var Be=z(Oe);Be<Ee&&(Re=Oe)}if(Re===te)return te;v(te,Re),te=Re}}function q(te){for(var ke=z(te);te>0;){var Ee=T(te);if(Ee>=0){var Me=z(Ee);if(ke<Me){v(te,Ee),te=Ee;continue}}return te}}function U(){if(re>0){var te=G[0];return v(0,re-1),re-=1,F(0),te}return-1}function H(te,ke){var Ee=G[te];return k[Ee]===ke?te:(k[Ee]=-1/0,q(te),U(),k[Ee]=ke,re+=1,q(re-1))}function j(te){if(!E[te]){E[te]=!0;var ke=b[te],Ee=y[te];b[Ee]>=0&&(b[Ee]=ke),y[ke]>=0&&(y[ke]=Ee),O[ke]>=0&&H(O[ke],M(ke)),O[Ee]>=0&&H(O[Ee],M(Ee))}}for(var G=[],O=new Array(p),A=0;A<p;++A){var W=k[A]=M(A);W<1/0?(O[A]=G.length,G.push(A)):O[A]=-1}for(var re=G.length,A=re>>1;A>=0;--A)F(A);for(;;){var ne=U();if(ne<0||k[ne]>d)break;j(ne)}for(var be=[],A=0;A<p;++A)E[A]||(O[A]=be.length,be.push(h[A].slice()));var ze=be.length;function Ce(te,ke){if(te[ke]<0)return ke;var Ee=ke,Me=ke;do{var Oe=te[Me];if(!E[Me]||Oe<0||Oe===Me||(Me=Oe,Oe=te[Me],!E[Me]||Oe<0||Oe===Me))break;Me=Oe,Ee=te[Ee]}while(Ee!==Me);for(var Re=ke;Re!==Me;Re=te[Re])te[Re]=Me;return Me}var he=[];return c.forEach(function(te){var ke=Ce(b,te[0]),Ee=Ce(y,te[1]);if(ke>=0&&Ee>=0&&ke!==Ee){var Me=O[ke],Oe=O[Ee];Me!==Oe&&he.push([Me,Oe])}}),u.unique(u.normalize(he)),{positions:be,edges:he}}},1303:function(i,a,o){"use strict";i.exports=l;var s=o(3250);function u(f,c){var h,d;if(c[0][0]<c[1][0])h=c[0],d=c[1];else if(c[0][0]>c[1][0])h=c[1],d=c[0];else{var p=Math.min(f[0][1],f[1][1]),x=Math.max(f[0][1],f[1][1]),b=Math.min(c[0][1],c[1][1]),y=Math.max(c[0][1],c[1][1]);return x<b?x-b:p>y?p-y:x-y}var k,E;f[0][1]<f[1][1]?(k=f[0],E=f[1]):(k=f[1],E=f[0]);var A=s(d,h,k);return A||(A=s(d,h,E),A)?A:E-d}function l(f,c){var h,d;if(c[0][0]<c[1][0])h=c[0],d=c[1];else if(c[0][0]>c[1][0])h=c[1],d=c[0];else return u(c,f);var p,x;if(f[0][0]<f[1][0])p=f[0],x=f[1];else if(f[0][0]>f[1][0])p=f[1],x=f[0];else return-u(f,c);var b=s(h,d,x),y=s(h,d,p);if(b<0){if(y<=0)return b}else if(b>0){if(y>=0)return b}else if(y)return y;if(b=s(x,p,d),y=s(x,p,h),b<0){if(y<=0)return b}else if(b>0){if(y>=0)return b}else if(y)return y;return d[0]-x[0]}},4209:function(i,a,o){"use strict";i.exports=y;var s=o(2478),u=o(3840),l=o(3250),f=o(1303);function c(k,E,A){this.slabs=k,this.coordinates=E,this.horizontal=A}var h=c.prototype;function d(k,E){return k.y-E}function p(k,E){for(var A=null;k;){var L=k.key,_,C;L[0][0]<L[1][0]?(_=L[0],C=L[1]):(_=L[1],C=L[0]);var M=l(_,C,E);if(M<0)k=k.left;else if(M>0)if(E[0]!==L[1][0])A=k,k=k.right;else{var v=p(k.right,E);if(v)return v;k=k.left}else{if(E[0]!==L[1][0])return k;var v=p(k.right,E);if(v)return v;k=k.left}}return A}h.castUp=function(k){var E=s.le(this.coordinates,k[0]);if(E<0)return-1;var A=this.slabs[E],L=p(this.slabs[E],k),_=-1;if(L&&(_=L.value),this.coordinates[E]===k[0]){var C=null;if(L&&(C=L.key),E>0){var M=p(this.slabs[E-1],k);M&&(C?f(M.key,C)>0&&(C=M.key,_=M.value):(_=M.value,C=M.key))}var v=this.horizontal[E];if(v.length>0){var z=s.ge(v,k[1],d);if(z<v.length){var T=v[z];if(k[1]===T.y){if(T.closed)return T.index;for(;z<v.length-1&&v[z+1].y===k[1];)if(z=z+1,T=v[z],T.closed)return T.index;if(T.y===k[1]&&!T.start){if(z=z+1,z>=v.length)return _;T=v[z]}}if(T.start)if(C){var F=l(C[0],C[1],[k[0],T.y]);C[0][0]>C[1][0]&&(F=-F),F>0&&(_=T.index)}else _=T.index;else T.y!==k[1]&&(_=T.index)}}}return _};function x(k,E,A,L){this.y=k,this.index=E,this.start=A,this.closed=L}function b(k,E,A,L){this.x=k,this.segment=E,this.create=A,this.index=L}function y(k){for(var E=k.length,A=2*E,L=new Array(A),_=0;_<E;++_){var C=k[_],M=C[0][0]<C[1][0];L[2*_]=new b(C[0][0],C,M,_),L[2*_+1]=new b(C[1][0],C,!M,_)}L.sort(function(G,O){var W=G.x-O.x;return W||(W=G.create-O.create,W)?W:Math.min(G.segment[0][1],G.segment[1][1])-Math.min(O.segment[0][1],O.segment[1][1])});for(var v=u(f),z=[],T=[],F=[],q=-1/0,_=0;_<A;){for(var U=L[_].x,H=[];_<A;){var j=L[_];if(j.x!==U)break;_+=1,j.segment[0][0]===j.x&&j.segment[1][0]===j.x?j.create&&(j.segment[0][1]<j.segment[1][1]?(H.push(new x(j.segment[0][1],j.index,!0,!0)),H.push(new x(j.segment[1][1],j.index,!1,!1))):(H.push(new x(j.segment[1][1],j.index,!0,!1)),H.push(new x(j.segment[0][1],j.index,!1,!0)))):j.create?v=v.insert(j.segment,j.index):v=v.remove(j.segment)}z.push(v.root),T.push(U),F.push(H)}return new c(z,T,F)}},5202:function(i,a,o){"use strict";var s=o(1944),u=o(8210);i.exports=c,i.exports.positive=h,i.exports.negative=d;function l(p,x){var b=u(s(p,x),[x[x.length-1]]);return b[b.length-1]}function f(p,x,b,y){var k=y-x,E=-x/k;E<0?E=0:E>1&&(E=1);for(var A=1-E,L=p.length,_=new Array(L),C=0;C<L;++C)_[C]=E*p[C]+A*b[C];return _}function c(p,x){for(var b=[],y=[],k=l(p[p.length-1],x),E=p[p.length-1],A=p[0],L=0;L<p.length;++L,E=A){A=p[L];var _=l(A,x);if(k<0&&_>0||k>0&&_<0){var C=f(E,_,A,k);b.push(C),y.push(C.slice())}_<0?y.push(A.slice()):_>0?b.push(A.slice()):(b.push(A.slice()),y.push(A.slice())),k=_}return{positive:b,negative:y}}function h(p,x){for(var b=[],y=l(p[p.length-1],x),k=p[p.length-1],E=p[0],A=0;A<p.length;++A,k=E){E=p[A];var L=l(E,x);(y<0&&L>0||y>0&&L<0)&&b.push(f(k,L,E,y)),L>=0&&b.push(E.slice()),y=L}return b}function d(p,x){for(var b=[],y=l(p[p.length-1],x),k=p[p.length-1],E=p[0],A=0;A<p.length;++A,k=E){E=p[A];var L=l(E,x);(y<0&&L>0||y>0&&L<0)&&b.push(f(k,L,E,y)),L<=0&&b.push(E.slice()),y=L}return b}},3387:function(i,a,o){var s;(function(){"use strict";var u={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 l(p){return c(d(p),arguments)}function f(p,x){return l.apply(null,[p].concat(x||[]))}function c(p,x){var b=1,y=p.length,k,E="",A,L,_,C,M,v,z,T;for(A=0;A<y;A++)if(typeof p[A]=="string")E+=p[A];else if(typeof p[A]=="object"){if(_=p[A],_.keys)for(k=x[b],L=0;L<_.keys.length;L++){if(k==null)throw new Error(l('[sprintf] Cannot access property "%s" of undefined value "%s"',_.keys[L],_.keys[L-1]));k=k[_.keys[L]]}else _.param_no?k=x[_.param_no]:k=x[b++];if(u.not_type.test(_.type)&&u.not_primitive.test(_.type)&&k instanceof Function&&(k=k()),u.numeric_arg.test(_.type)&&typeof k!="number"&&isNaN(k))throw new TypeError(l("[sprintf] expecting number but found %T",k));switch(u.number.test(_.type)&&(z=k>=0),_.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,_.width?parseInt(_.width):0);break;case"e":k=_.precision?parseFloat(k).toExponential(_.precision):parseFloat(k).toExponential();break;case"f":k=_.precision?parseFloat(k).toFixed(_.precision):parseFloat(k);break;case"g":k=_.precision?String(Number(k.toPrecision(_.precision))):parseFloat(k);break;case"o":k=(parseInt(k,10)>>>0).toString(8);break;case"s":k=String(k),k=_.precision?k.substring(0,_.precision):k;break;case"t":k=String(!!k),k=_.precision?k.substring(0,_.precision):k;break;case"T":k=Object.prototype.toString.call(k).slice(8,-1).toLowerCase(),k=_.precision?k.substring(0,_.precision):k;break;case"u":k=parseInt(k,10)>>>0;break;case"v":k=k.valueOf(),k=_.precision?k.substring(0,_.precision):k;break;case"x":k=(parseInt(k,10)>>>0).toString(16);break;case"X":k=(parseInt(k,10)>>>0).toString(16).toUpperCase();break}u.json.test(_.type)?E+=k:(u.number.test(_.type)&&(!z||_.sign)?(T=z?"+":"-",k=k.toString().replace(u.sign,"")):T="",M=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",v=_.width-(T+k).length,C=_.width&&v>0?M.repeat(v):"",E+=_.align?T+k+C:M==="0"?T+C+k:C+T+k)}return E}var h=Object.create(null);function d(p){if(h[p])return h[p];for(var x=p,b,y=[],k=0;x;){if((b=u.text.exec(x))!==null)y.push(b[0]);else if((b=u.modulo.exec(x))!==null)y.push("%");else if((b=u.placeholder.exec(x))!==null){if(b[2]){k|=1;var E=[],A=b[2],L=[];if((L=u.key.exec(A))!==null)for(E.push(L[1]);(A=A.substring(L[0].length))!=="";)if((L=u.key_access.exec(A))!==null)E.push(L[1]);else if((L=u.index_access.exec(A))!==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");y.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");x=x.substring(b[0].length)}return h[p]=y}a.sprintf=l,a.vsprintf=f,typeof window!="undefined"&&(window.sprintf=l,window.vsprintf=f,s=function(){return{sprintf:l,vsprintf:f}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3711:function(i,a,o){"use strict";i.exports=d;var s=o(2640),u=o(781),l={"2d":function(p,x,b){var y=p({order:x,scalarArguments:3,getters:b==="generic"?[0]:void 0,phase:function(E,A,L,_){return E>_|0},vertex:function(E,A,L,_,C,M,v,z,T,F,q,U,H){var j=(v<<0)+(z<<1)+(T<<2)+(F<<3)|0;if(!(j===0||j===15))switch(j){case 0:q.push([E-.5,A-.5]);break;case 1:q.push([E-.25-.25*(_+L-2*H)/(L-_),A-.25-.25*(C+L-2*H)/(L-C)]);break;case 2:q.push([E-.75-.25*(-_-L+2*H)/(_-L),A-.25-.25*(M+_-2*H)/(_-M)]);break;case 3:q.push([E-.5,A-.5-.5*(C+L+M+_-4*H)/(L-C+_-M)]);break;case 4:q.push([E-.25-.25*(M+C-2*H)/(C-M),A-.75-.25*(-C-L+2*H)/(C-L)]);break;case 5:q.push([E-.5-.5*(_+L+M+C-4*H)/(L-_+C-M),A-.5]);break;case 6:q.push([E-.5-.25*(-_-L+M+C)/(_-L+C-M),A-.5-.25*(-C-L+M+_)/(C-L+_-M)]);break;case 7:q.push([E-.75-.25*(M+C-2*H)/(C-M),A-.75-.25*(M+_-2*H)/(_-M)]);break;case 8:q.push([E-.75-.25*(-M-C+2*H)/(M-C),A-.75-.25*(-M-_+2*H)/(M-_)]);break;case 9:q.push([E-.5-.25*(_+L+-M-C)/(L-_+M-C),A-.5-.25*(C+L+-M-_)/(L-C+M-_)]);break;case 10:q.push([E-.5-.5*(-_-L+-M-C+4*H)/(_-L+M-C),A-.5]);break;case 11:q.push([E-.25-.25*(-M-C+2*H)/(M-C),A-.75-.25*(C+L-2*H)/(L-C)]);break;case 12:q.push([E-.5,A-.5-.5*(-C-L+-M-_+4*H)/(C-L+M-_)]);break;case 13:q.push([E-.75-.25*(_+L-2*H)/(L-_),A-.25-.25*(-M-_+2*H)/(M-_)]);break;case 14:q.push([E-.25-.25*(-_-L+2*H)/(_-L),A-.25-.25*(-C-L+2*H)/(C-L)]);break;case 15:q.push([E-.5,A-.5]);break}},cell:function(E,A,L,_,C,M,v,z,T){C?z.push([E,A]):z.push([A,E])}});return function(k,E){var A=[],L=[];return y(k,A,L,E),{positions:A,cells:L}}}};function f(p,x){var b=p.length+"d",y=l[b];if(y)return y(s,p,x)}function c(p,x){for(var b=u(p,x),y=b.length,k=new Array(y),E=new Array(y),A=0;A<y;++A)k[A]=[b[A]],E[A]=[A];return{positions:k,cells:E}}var h={};function d(p,k){if(p.dimension<=0)return{positions:[],cells:[]};if(p.dimension===1)return c(p,k);var b=p.order.join()+"-"+p.dtype,y=h[b],k=+k||0;return y||(y=h[b]=f(p.order,p.dtype)),y(p,k)}},665:function(i,a,o){"use strict";var s=o(3202);i.exports=c;var u=96;function l(h,d){var p=s(getComputedStyle(h).getPropertyValue(d));return p[0]*c(p[1],h)}function f(h,d){var p=document.createElement("div");p.style["font-size"]="128"+h,d.appendChild(p);var x=l(p,"font-size")/128;return d.removeChild(p),x}function c(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 f(h,d);case"em":return l(d,"font-size");case"rem":return l(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 u;case"cm":return u/2.54;case"mm":return u/25.4;case"pt":return u/72;case"pc":return u/6}return 1}},7261:function(i,a,o){"use strict";i.exports=E;var s=o(9215),u=o(7608),l=o(6079),f=o(5911),c=o(3536),h=o(244);function d(A,L,_){return Math.sqrt(Math.pow(A,2)+Math.pow(L,2)+Math.pow(_,2))}function p(A){return Math.min(1,Math.max(-1,A))}function x(A){var L=Math.abs(A[0]),_=Math.abs(A[1]),C=Math.abs(A[2]),M=[0,0,0];L>Math.max(_,C)?M[2]=1:_>Math.max(L,C)?M[0]=1:M[1]=1;for(var v=0,z=0,T=0;T<3;++T)v+=A[T]*A[T],z+=M[T]*A[T];for(var T=0;T<3;++T)M[T]-=z/v*A[T];return c(M,M),M}function b(A,L,_,C,M,v,z,T){this.center=s(_),this.up=s(C),this.right=s(M),this.radius=s([v]),this.angle=s([z,T]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,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 F=0;F<16;++F)this.computedMatrix[F]=.5;this.recalcMatrix(0)}var y=b.prototype;y.setDistanceLimits=function(A,L){A>0?A=Math.log(A):A=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=L},y.getDistanceLimits=function(A){var L=this.radius.bounds[0];return A?(A[0]=Math.exp(L[0][0]),A[1]=Math.exp(L[1][0]),A):[Math.exp(L[0][0]),Math.exp(L[1][0])]},y.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var L=this.computedUp,_=this.computedRight,C=0,M=0,v=0;v<3;++v)M+=L[v]*_[v],C+=L[v]*L[v];for(var z=Math.sqrt(C),T=0,v=0;v<3;++v)_[v]-=L[v]*M/C,T+=_[v]*_[v],L[v]/=z;for(var F=Math.sqrt(T),v=0;v<3;++v)_[v]/=F;var q=this.computedToward;f(q,L,_),c(q,q);for(var U=Math.exp(this.computedRadius[0]),H=this.computedAngle[0],j=this.computedAngle[1],G=Math.cos(H),O=Math.sin(H),W=Math.cos(j),re=Math.sin(j),ne=this.computedCenter,be=G*W,ze=O*W,Ce=re,he=-G*re,te=-O*re,ke=W,Ee=this.computedEye,Me=this.computedMatrix,v=0;v<3;++v){var Oe=be*_[v]+ze*q[v]+Ce*L[v];Me[4*v+1]=he*_[v]+te*q[v]+ke*L[v],Me[4*v+2]=Oe,Me[4*v+3]=0}var Re=Me[1],me=Me[5],Be=Me[9],fe=Me[2],Ze=Me[6],et=Me[10],gt=me*et-Be*Ze,Pt=Be*fe-Re*et,Qe=Re*Ze-me*fe,Xe=d(gt,Pt,Qe);gt/=Xe,Pt/=Xe,Qe/=Xe,Me[0]=gt,Me[4]=Pt,Me[8]=Qe;for(var v=0;v<3;++v)Ee[v]=ne[v]+Me[2+4*v]*U;for(var v=0;v<3;++v){for(var T=0,Tt=0;Tt<3;++Tt)T+=Me[v+4*Tt]*Ee[Tt];Me[12+v]=-T}Me[15]=1},y.getMatrix=function(A,L){this.recalcMatrix(A);var _=this.computedMatrix;if(L){for(var C=0;C<16;++C)L[C]=_[C];return L}return _};var k=[0,0,0];y.rotate=function(A,L,_,C){if(this.angle.move(A,L,_),C){this.recalcMatrix(A);var M=this.computedMatrix;k[0]=M[2],k[1]=M[6],k[2]=M[10];for(var v=this.computedUp,z=this.computedRight,T=this.computedToward,F=0;F<3;++F)M[4*F]=v[F],M[4*F+1]=z[F],M[4*F+2]=T[F];l(M,M,C,k);for(var F=0;F<3;++F)v[F]=M[4*F],z[F]=M[4*F+1];this.up.set(A,v[0],v[1],v[2]),this.right.set(A,z[0],z[1],z[2])}},y.pan=function(A,L,_,C){L=L||0,_=_||0,C=C||0,this.recalcMatrix(A);var M=this.computedMatrix,v=Math.exp(this.computedRadius[0]),z=M[1],T=M[5],F=M[9],q=d(z,T,F);z/=q,T/=q,F/=q;var U=M[0],H=M[4],j=M[8],G=U*z+H*T+j*F;U-=z*G,H-=T*G,j-=F*G;var O=d(U,H,j);U/=O,H/=O,j/=O;var W=U*L+z*_,re=H*L+T*_,ne=j*L+F*_;this.center.move(A,W,re,ne);var be=Math.exp(this.computedRadius[0]);be=Math.max(1e-4,be+C),this.radius.set(A,Math.log(be))},y.translate=function(A,L,_,C){this.center.move(A,L||0,_||0,C||0)},y.setMatrix=function(A,L,_,C){var M=1;typeof _=="number"&&(M=_|0),(M<0||M>3)&&(M=1);var v=(M+2)%3,z=(M+1)%3;L||(this.recalcMatrix(A),L=this.computedMatrix);var T=L[M],F=L[M+4],q=L[M+8];if(C){var H=Math.abs(T),j=Math.abs(F),G=Math.abs(q),O=Math.max(H,j,G);H===O?(T=T<0?-1:1,F=q=0):G===O?(q=q<0?-1:1,T=F=0):(F=F<0?-1:1,T=q=0)}else{var U=d(T,F,q);T/=U,F/=U,q/=U}var W=L[v],re=L[v+4],ne=L[v+8],be=W*T+re*F+ne*q;W-=T*be,re-=F*be,ne-=q*be;var ze=d(W,re,ne);W/=ze,re/=ze,ne/=ze;var Ce=F*ne-q*re,he=q*W-T*ne,te=T*re-F*W,ke=d(Ce,he,te);Ce/=ke,he/=ke,te/=ke,this.center.jump(A,At,Te,nt),this.radius.idle(A),this.up.jump(A,T,F,q),this.right.jump(A,W,re,ne);var Ee,Me;if(M===2){var Oe=L[1],Re=L[5],me=L[9],Be=Oe*W+Re*re+me*ne,fe=Oe*Ce+Re*he+me*te;Pt<0?Ee=-Math.PI/2:Ee=Math.PI/2,Me=Math.atan2(fe,Be)}else{var Ze=L[2],et=L[6],gt=L[10],Pt=Ze*T+et*F+gt*q,Qe=Ze*W+et*re+gt*ne,Xe=Ze*Ce+et*he+gt*te;Ee=Math.asin(p(Pt)),Me=Math.atan2(Xe,Qe)}this.angle.jump(A,Me,Ee),this.recalcMatrix(A);var Tt=L[2],xt=L[6],_t=L[10],Ct=this.computedMatrix;u(Ct,L);var jt=Ct[15],At=Ct[12]/jt,Te=Ct[13]/jt,nt=Ct[14]/jt,ut=Math.exp(this.computedRadius[0]);this.center.jump(A,At-Tt*ut,Te-xt*ut,nt-_t*ut)},y.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},y.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},y.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},y.setDistance=function(A,L){L>0&&this.radius.set(A,Math.log(L))},y.lookAt=function(A,L,_,C){this.recalcMatrix(A),L=L||this.computedEye,_=_||this.computedCenter,C=C||this.computedUp;var M=C[0],v=C[1],z=C[2],T=d(M,v,z);if(!(T<1e-6)){M/=T,v/=T,z/=T;var F=L[0]-_[0],q=L[1]-_[1],U=L[2]-_[2],H=d(F,q,U);if(!(H<1e-6)){F/=H,q/=H,U/=H;var j=this.computedRight,G=j[0],O=j[1],W=j[2],re=M*G+v*O+z*W;G-=re*M,O-=re*v,W-=re*z;var ne=d(G,O,W);if(!(ne<.01&&(G=v*U-z*q,O=z*F-M*U,W=M*q-v*F,ne=d(G,O,W),ne<1e-6))){G/=ne,O/=ne,W/=ne,this.up.set(A,M,v,z),this.right.set(A,G,O,W),this.center.set(A,_[0],_[1],_[2]),this.radius.set(A,Math.log(H));var be=v*W-z*O,ze=z*G-M*W,Ce=M*O-v*G,he=d(be,ze,Ce);be/=he,ze/=he,Ce/=he;var te=M*F+v*q+z*U,ke=G*F+O*q+W*U,Ee=be*F+ze*q+Ce*U,Me=Math.asin(p(te)),Oe=Math.atan2(Ee,ke),Re=this.angle._state,me=Re[Re.length-1],Be=Re[Re.length-2];me=me%(2*Math.PI);var fe=Math.abs(me+2*Math.PI-Oe),Ze=Math.abs(me-Oe),et=Math.abs(me-2*Math.PI-Oe);fe<Ze&&(me+=2*Math.PI),et<Ze&&(me-=2*Math.PI),this.angle.jump(this.angle.lastT(),me,Be),this.angle.set(A,Oe,Me)}}}};function E(A){A=A||{};var L=A.center||[0,0,0],_=A.up||[0,1,0],C=A.right||x(_),M=A.radius||1,v=A.theta||0,z=A.phi||0;if(L=[].slice.call(L,0,3),_=[].slice.call(_,0,3),c(_,_),C=[].slice.call(C,0,3),c(C,C),"eye"in A){var T=A.eye,F=[T[0]-L[0],T[1]-L[1],T[2]-L[2]];f(C,F,_),d(C[0],C[1],C[2])<1e-6?C=x(_):c(C,C),M=d(F[0],F[1],F[2]);var q=h(_,F)/M,U=h(C,F)/M;z=Math.acos(q),v=Math.acos(U)}return M=Math.log(M),new b(A.zoomMin,A.zoomMax,L,_,C,M,v,z)}},5250:function(i){"use strict";i.exports=o;var a=+(Math.pow(2,27)+1);function o(s,u,l){var f=s*u,c=a*s,h=c-s,d=c-h,p=s-d,x=a*u,b=x-u,y=x-b,k=u-y,E=f-d*y,A=E-p*y,L=A-d*k,_=p*k-L;return l?(l[0]=_,l[1]=f,l):[_,f]}},9362:function(i){"use strict";i.exports=a;function a(o,s,u){var l=o+s,f=l-o,c=l-f,h=s-f,d=o-c;return u?(u[0]=d+h,u[1]=l,u):[d+h,l]}},1888:function(i,a,o){"use strict";var s=o(8828),u=o(1338),l=o(4793).hp;o.g.__TYPEDARRAY_POOL||(o.g.__TYPEDARRAY_POOL={UINT8:u([32,0]),UINT16:u([32,0]),UINT32:u([32,0]),BIGUINT64:u([32,0]),INT8:u([32,0]),INT16:u([32,0]),INT32:u([32,0]),BIGINT64:u([32,0]),FLOAT:u([32,0]),DOUBLE:u([32,0]),DATA:u([32,0]),UINT8C:u([32,0]),BUFFER:u([32,0])});var f=typeof Uint8ClampedArray!="undefined",c=typeof BigUint64Array!="undefined",h=typeof BigInt64Array!="undefined",d=o.g.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=u([32,0])),d.BIGUINT64||(d.BIGUINT64=u([32,0])),d.BIGINT64||(d.BIGINT64=u([32,0])),d.BUFFER||(d.BUFFER=u([32,0]));var p=d.DATA,x=d.BUFFER;a.free=function(G){if(l.isBuffer(G))x[s.log2(G.length)].push(G);else{if(Object.prototype.toString.call(G)!=="[object ArrayBuffer]"&&(G=G.buffer),!G)return;var O=G.length||G.byteLength,W=s.log2(O)|0;p[W].push(G)}};function b(j){if(j){var G=j.length||j.byteLength,O=s.log2(G);p[O].push(j)}}function y(j){b(j.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=y,a.freeArrayBuffer=b,a.freeBuffer=function(G){x[s.log2(G.length)].push(G)},a.malloc=function(G,O){if(O===void 0||O==="arraybuffer")return k(G);switch(O){case"uint8":return E(G);case"uint16":return A(G);case"uint32":return L(G);case"int8":return _(G);case"int16":return C(G);case"int32":return M(G);case"float":case"float32":return v(G);case"double":case"float64":return z(G);case"uint8_clamped":return T(G);case"bigint64":return q(G);case"biguint64":return F(G);case"buffer":return H(G);case"data":case"dataview":return U(G);default:return null}return null};function k(G){var G=s.nextPow2(G),O=s.log2(G),W=p[O];return W.length>0?W.pop():new ArrayBuffer(G)}a.mallocArrayBuffer=k;function E(j){return new Uint8Array(k(j),0,j)}a.mallocUint8=E;function A(j){return new Uint16Array(k(2*j),0,j)}a.mallocUint16=A;function L(j){return new Uint32Array(k(4*j),0,j)}a.mallocUint32=L;function _(j){return new Int8Array(k(j),0,j)}a.mallocInt8=_;function C(j){return new Int16Array(k(2*j),0,j)}a.mallocInt16=C;function M(j){return new Int32Array(k(4*j),0,j)}a.mallocInt32=M;function v(j){return new Float32Array(k(4*j),0,j)}a.mallocFloat32=a.mallocFloat=v;function z(j){return new Float64Array(k(8*j),0,j)}a.mallocFloat64=a.mallocDouble=z;function T(j){return f?new Uint8ClampedArray(k(j),0,j):E(j)}a.mallocUint8Clamped=T;function F(j){return c?new BigUint64Array(k(8*j),0,j):null}a.mallocBigUint64=F;function q(j){return h?new BigInt64Array(k(8*j),0,j):null}a.mallocBigInt64=q;function U(j){return new DataView(k(j),0,j)}a.mallocDataView=U;function H(j){j=s.nextPow2(j);var G=s.log2(j),O=x[G];return O.length>0?O.pop():new l(j)}a.mallocBuffer=H,a.clearCache=function(){for(var G=0;G<32;++G)d.UINT8[G].length=0,d.UINT16[G].length=0,d.UINT32[G].length=0,d.INT8[G].length=0,d.INT16[G].length=0,d.INT32[G].length=0,d.FLOAT[G].length=0,d.DOUBLE[G].length=0,d.BIGUINT64[G].length=0,d.BIGINT64[G].length=0,d.UINT8C[G].length=0,p[G].length=0,x[G].length=0}},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 u=0;u<s;++u)this.roots[u]=u,this.ranks[u]=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 u=s,l=this.roots;l[s]!==s;)s=l[s];for(;l[u]!==s;){var f=l[u];l[u]=s,u=f}return s},o.link=function(s,u){var l=this.find(s),f=this.find(u);if(l!==f){var c=this.ranks,h=this.roots,d=c[l],p=c[f];d<p?h[l]=f:p<d?h[f]=l:(h[f]=l,++c[l])}}},1682:function(i){"use strict";function a(u,l){for(var f=1,c=u.length,h=u[0],d=u[0],p=1;p<c;++p)if(d=h,h=u[p],l(h,d)){if(p===f){f++;continue}u[f++]=h}return u.length=f,u}function o(u){for(var l=1,f=u.length,c=u[0],h=u[0],d=1;d<f;++d,h=c)if(h=c,c=u[d],c!==h){if(d===l){l++;continue}u[l++]=c}return u.length=l,u}function s(u,l,f){return u.length===0?u:l?(f||u.sort(l),a(u,l)):(f||u.sort(),o(u))}i.exports=s},4359:function(i,a,o){"use strict";i.exports=f;var s=o(7718),u=null,l=null;typeof document!="undefined"&&(u=document.createElement("canvas"),u.width=8192,u.height=1024,l=u.getContext("2d"));function f(c,h){return(typeof h!="object"||h===null)&&(h={}),s(c,h.canvas||u,h.context||l,h)}},7718:function(i,a,o){i.exports=q,i.exports.processPixels=F;var s=o(3711),u=o(9618),l=o(5878),f=o(332),c=o(2538),h=o(2095),d="b",p="b|",x="i",b="i|",y="sup",k="+",E="+1",A="sub",L="-",_="-1";function C(U,H,j,G){for(var O="<"+U+">",W="</"+U+">",re=O.length,ne=W.length,be=H[0]===k||H[0]===L,ze=0,Ce=-ne;ze>-1&&(ze=j.indexOf(O,ze),!(ze===-1||(Ce=j.indexOf(W,ze+re),Ce===-1)||Ce<=ze));){for(var he=ze;he<Ce+ne;++he)if(he<ze+re||he>=Ce)G[he]=null,j=j.substr(0,he)+" "+j.substr(he+1);else if(G[he]!==null){var te=G[he].indexOf(H[0]);te===-1?G[he]+=H:be&&(G[he]=G[he].substr(0,te+1)+(1+parseInt(G[he][te+1]))+G[he].substr(te+2))}var ke=ze+re,Ee=j.substr(ke,Ce-ke),Me=Ee.indexOf(O);Me!==-1?ze=Me:ze=Ce+ne}return G}function M(U,H,j){for(var G=H.textAlign||"start",O=H.textBaseline||"alphabetic",W=[1<<30,1<<30],re=[0,0],ne=U.length,be=0;be<ne;++be)for(var ze=U[be],Ce=0;Ce<2;++Ce)W[Ce]=Math.min(W[Ce],ze[Ce])|0,re[Ce]=Math.max(re[Ce],ze[Ce])|0;var he=0;switch(G){case"center":he=-.5*(W[0]+re[0]);break;case"right":case"end":he=-re[0];break;case"left":case"start":he=-W[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+G+"'")}var te=0;switch(O){case"hanging":case"top":te=-W[1];break;case"middle":te=-.5*(W[1]+re[1]);break;case"alphabetic":case"ideographic":te=-3*j;break;case"bottom":te=-re[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+O+"'")}var ke=1/j;return"lineHeight"in H?ke*=+H.lineHeight:"width"in H?ke=H.width/(re[0]-W[0]):"height"in H&&(ke=H.height/(re[1]-W[1])),U.map(function(Ee){return[ke*(Ee[0]+he),ke*(Ee[1]+te)]})}function v(U,H,j,G,O,W){j=j.replace(/\n/g,""),W.breaklines===!0?j=j.replace(/\<br\>/g,`
`):j=j.replace(/\<br\>/g," ");var re="",ne=[];for(me=0;me<j.length;++me)ne[me]=re;W.bolds===!0&&(ne=C(d,p,j,ne)),W.italics===!0&&(ne=C(x,b,j,ne)),W.superscripts===!0&&(ne=C(y,E,j,ne)),W.subscripts===!0&&(ne=C(A,_,j,ne));var be=[],ze="";for(me=0;me<j.length;++me)ne[me]!==null&&(ze+=j[me],be.push(ne[me]));var Ce=ze.split(`
`),he=Ce.length,te=Math.round(O*G),ke=G,Ee=G*2,Me=0,Oe=he*te+Ee;U.height<Oe&&(U.height=Oe),H.fillStyle="#000",H.fillRect(0,0,U.width,U.height),H.fillStyle="#fff";var Re,me,Be,fe,Ze,et=0,gt="";function Pt(){if(gt!==""){var Te=H.measureText(gt).width;H.fillText(gt,ke+Be,Ee+fe),Be+=Te}}function Qe(){return""+Math.round(Ze)+"px "}function Xe(Te,nt){var ut=""+H.font;if(W.subscripts===!0){var ct=Te.indexOf(L),rt=nt.indexOf(L),je=ct>-1?parseInt(Te[1+ct]):0,tt=rt>-1?parseInt(nt[1+rt]):0;je!==tt&&(ut=ut.replace(Qe(),"?px "),Ze*=Math.pow(.75,tt-je),ut=ut.replace("?px ",Qe())),fe+=.25*te*(tt-je)}if(W.superscripts===!0){var Je=Te.indexOf(k),Mt=nt.indexOf(k),Vt=Je>-1?parseInt(Te[1+Je]):0,Kt=Mt>-1?parseInt(nt[1+Mt]):0;Vt!==Kt&&(ut=ut.replace(Qe(),"?px "),Ze*=Math.pow(.75,Kt-Vt),ut=ut.replace("?px ",Qe())),fe-=.25*te*(Kt-Vt)}if(W.bolds===!0){var ir=Te.indexOf(p)>-1,fr=nt.indexOf(p)>-1;!ir&&fr&&(Ot?ut=ut.replace("italic ","italic bold "):ut="bold "+ut),ir&&!fr&&(ut=ut.replace("bold ",""))}if(W.italics===!0){var Ot=Te.indexOf(b)>-1,De=nt.indexOf(b)>-1;!Ot&&De&&(ut="italic "+ut),Ot&&!De&&(ut=ut.replace("italic ",""))}H.font=ut}for(Re=0;Re<he;++Re){var Tt=Ce[Re]+`
`;for(Be=0,fe=Re*te,Ze=G,gt="",me=0;me<Tt.length;++me){var xt=me+et<be.length?be[me+et]:be[be.length-1];re===xt?gt+=Tt[me]:(Pt(),gt=Tt[me],xt!==void 0&&(Xe(re,xt),re=xt))}Pt(),et+=Tt.length;var _t=Math.round(Be+2*ke)|0;Me<_t&&(Me=_t)}var Ct=Me,jt=Ee+te*he,At=u(H.getImageData(0,0,Ct,jt).data,[jt,Ct,4]);return At.pick(-1,-1,0).transpose(1,0)}function z(U,H){var j=s(U,128);return H?l(j.cells,j.positions,.25):{edges:j.cells,positions:j.positions}}function T(U,H,j,G){var O=z(U,G),W=M(O.positions,H,j),re=O.edges,ne=H.orientation==="ccw";if(f(W,re),H.polygons||H.polygon||H.polyline){for(var be=h(re,W),ze=new Array(be.length),Ce=0;Ce<be.length;++Ce){for(var he=be[Ce],te=new Array(he.length),ke=0;ke<he.length;++ke){for(var Ee=he[ke],Me=new Array(Ee.length),Oe=0;Oe<Ee.length;++Oe)Me[Oe]=W[Ee[Oe]].slice();ne&&Me.reverse(),te[ke]=Me}ze[Ce]=te}return ze}else return H.triangles||H.triangulate||H.triangle?{cells:c(W,re,{delaunay:!1,exterior:!1,interior:!0}),positions:W}:{edges:re,positions:W}}function F(U,H,j){try{return T(U,H,j,!0)}catch(G){}try{return T(U,H,j,!1)}catch(G){}return H.polygons||H.polyline||H.polygon?[]:H.triangles||H.triangulate||H.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function q(U,H,j,G){var O=64,W=1.25,re={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};G&&(G.size&&G.size>0&&(O=G.size),G.lineSpacing&&G.lineSpacing>0&&(W=G.lineSpacing),G.styletags&&G.styletags.breaklines&&(re.breaklines=!!G.styletags.breaklines),G.styletags&&G.styletags.bolds&&(re.bolds=!!G.styletags.bolds),G.styletags&&G.styletags.italics&&(re.italics=!!G.styletags.italics),G.styletags&&G.styletags.subscripts&&(re.subscripts=!!G.styletags.subscripts),G.styletags&&G.styletags.superscripts&&(re.superscripts=!!G.styletags.superscripts)),j.font=[G.fontStyle,G.fontVariant,G.fontWeight,O+"px",G.font].filter(function(be){return be}).join(" "),j.textAlign="start",j.textBaseline="alphabetic",j.direction="ltr";var ne=v(H,j,U,O,W,re);return F(ne,G,O)}},1538:function(i){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(T){T.permitHostObjects___&&T.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var u=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var l=new u,f=Object.freeze({});if(l.set(f,1),l.get(f)!==1)s=!0;else{i.exports=WeakMap;return}}}var c=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,p=Object.isExtensible,x="weakmap:",b=x+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var y=new ArrayBuffer(25),k=new Uint8Array(y);crypto.getRandomValues(k),b=x+"rand:"+Array.prototype.map.call(k,function(T){return(T%36).toString(36)}).join("")+"___"}function E(T){return!(T.substr(0,x.length)==x&&T.substr(T.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(F){return h(F).filter(E)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(F){return A(F).filter(E)}})}function L(T){if(T!==Object(T))throw new TypeError("Not an object: "+T);var F=T[b];if(F&&F.key===T)return F;if(p(T)){F={key:T};try{return d(T,b,{value:F,writable:!1,enumerable:!1,configurable:!1}),F}catch(q){return}}}(function(){var T=Object.freeze;d(Object,"freeze",{value:function(H){return L(H),T(H)}});var F=Object.seal;d(Object,"seal",{value:function(H){return L(H),F(H)}});var q=Object.preventExtensions;d(Object,"preventExtensions",{value:function(H){return L(H),q(H)}})})();function _(T){return T.prototype=null,Object.freeze(T)}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 v=0,z=function(){this instanceof z||M();var T=[],F=[],q=v++;function U(O,W){var re,ne=L(O);return ne?q in ne?ne[q]:W:(re=T.indexOf(O),re>=0?F[re]:W)}function H(O){var W=L(O);return W?q in W:T.indexOf(O)>=0}function j(O,W){var re,ne=L(O);return ne?ne[q]=W:(re=T.indexOf(O),re>=0?F[re]=W:(re=T.length,F[re]=W,T[re]=O)),this}function G(O){var W=L(O),re,ne;return W?q in W&&delete W[q]:(re=T.indexOf(O),re<0?!1:(ne=T.length-1,T[re]=void 0,F[re]=F[ne],T[re]=T[ne],T.length=ne,F.length=ne,!0))}return Object.create(z.prototype,{get___:{value:_(U)},has___:{value:_(H)},set___:{value:_(j)},delete___:{value:_(G)}})};z.prototype=Object.create(Object.prototype,{get:{value:function(F,q){return this.get___(F,q)},writable:!0,configurable:!0},has:{value:function(F){return this.has___(F)},writable:!0,configurable:!0},set:{value:function(F,q){return this.set___(F,q)},writable:!0,configurable:!0},delete:{value:function(F){return this.delete___(F)},writable:!0,configurable:!0}}),typeof u=="function"?function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function T(){this instanceof z||M();var F=new u,q=void 0,U=!1;function H(W,re){return q?F.has(W)?F.get(W):q.get___(W,re):F.get(W,re)}function j(W){return F.has(W)||(q?q.has___(W):!1)}var G;s?G=function(W,re){return F.set(W,re),F.has(W)||(q||(q=new z),q.set(W,re)),this}:G=function(W,re){if(U)try{F.set(W,re)}catch(ne){q||(q=new z),q.set___(W,re)}else F.set(W,re);return this};function O(W){var re=!!F.delete(W);return q&&q.delete___(W)||re}return Object.create(z.prototype,{get___:{value:_(H)},has___:{value:_(j)},set___:{value:_(G)},delete___:{value:_(O)},permitHostObjects___:{value:_(function(W){if(W===o)U=!0;else throw new Error("bogus call to permitHostObjects___")})}})}T.prototype=z.prototype,i.exports=T,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy!="undefined"&&(Proxy=void 0),i.exports=z)})()},236:function(i,a,o){var s=o(8284);i.exports=u;function u(){var l={};return function(f){if((typeof f!="object"||f===null)&&typeof f!="function")throw new Error("Weakmap-shim: Key must be object");var c=f.valueOf(l);return c&&c.identity===l?c:s(f,l)}}},8284:function(i){i.exports=a;function a(o,s){var u={identity:s},l=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(f){return f!==s?l.apply(this,arguments):u},writable:!0}),u}},606:function(i,a,o){var s=o(236);i.exports=u;function u(){var l=s();return{get:function(f,c){var h=l(f);return h.hasOwnProperty("value")?h.value:c},set:function(f,c){return l(f).value=c,this},has:function(f){return"value"in l(f)},delete:function(f){return delete l(f).value}}}},3349:function(i){"use strict";function a(){return function(c,h,d,p,x,b){var y=c[0],k=d[0],E=[0],A=k;p|=0;var L=0,_=k;for(L=0;L<y;++L){{var C=h[p]-b,M=h[p+A]-b;C>=0!=M>=0&&x.push(E[0]+.5+.5*(C+M)/(C-M))}p+=_,++E[0]}}}function o(){return a()}var s=o;function u(c){var h={};return function(p,x,b){var y=p.dtype,k=p.order,E=[y,k.join()].join(),A=h[E];return A||(h[E]=A=c([y,k])),A(p.shape.slice(0),p.data,p.stride,p.offset|0,x,b)}}function l(c){return u(s.bind(void 0,c))}function f(c){return l({funcName:c.funcName})}i.exports=f({funcName:"zeroCrossings"})},781:function(i,a,o){"use strict";i.exports=u;var s=o(3349);function u(l,f){var c=[];return f=+f||0,s(l.hi(l.shape[0]-1),c,f),c}},7790:function(){}},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);mze.exports=n})()});var _ze=Se((_vr,gze)=>{"use strict";gze.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 Tze=Se((xvr,wze)=>{"use strict";var xze=_ze();wze.exports=Ozt;var bze={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Ozt(e){var t,r=[],n=1,i;if(typeof e=="string")if(e=e.toLowerCase(),xze[e])r=xze[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 u=t[1],l=u==="rgb",a=u.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(bze[h]!==void 0)return bze[h]}return parseFloat(h)}),u===a&&r.push(1),n=l||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(f){return parseFloat(f)}),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 Sze=Se((bvr,Aze)=>{"use strict";Aze.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var Eze=Se((wvr,Mze)=>{"use strict";var Nzt=Sze();Mze.exports={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,u;if(r===0)return u=n*255,[u,u,u];n<.5?a=n*(1+r):a=n+r-n*r,i=2*n-a,s=[0,0,0];for(var l=0;l<3;l++)o=t+1/3*-(l-1),o<0?o++:o>1&&o--,6*o<1?u=i+(a-i)*6*o:2*o<1?u=a:3*o<2?u=i+(a-i)*(2/3-o)*6:u=i,s[l]=u*255;return s}};Nzt.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,u,l;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),l=(i+a)/2,a===i?u=0:l<=.5?u=o/(a+i):u=o/(2-a-i),[s,u*100,l*100]}});var BA=Se((Tvr,kze)=>{kze.exports=Uzt;function Uzt(e,t,r){return t<r?e<t?t:e>r?r:e:e<r?r:e>t?t:e}});var hZ=Se((Avr,Cze)=>{"use strict";var Vzt=Tze(),Hzt=Eze(),VR=BA();Cze.exports=function(t){var r,n,i,a=Vzt(t);return a.space?(r=Array(3),r[0]=VR(a.values[0],0,255),r[1]=VR(a.values[1],0,255),r[2]=VR(a.values[2],0,255),a.space[0]==="h"&&(r=Hzt.rgb(r)),r.push(VR(a.alpha,0,1)),r):[]}});var HR=Se((Svr,Lze)=>{Lze.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 J_=Se((Mvr,zze)=>{"use strict";var Gzt=hZ(),GR=BA(),Wzt=HR();zze.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=Wzt(r),i=new n(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=Gzt(t),t[0]/=255,t[1]/=255,t[2]/=255),jzt(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]=GR(Math.floor(t[0]*255),0,255),i[1]=GR(Math.floor(t[1]*255),0,255),i[2]=GR(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:GR(Math.floor(t[3]*255),0,255)),i)};function jzt(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 Jg=Se((Evr,Pze)=>{"use strict";var Zzt=J_();function Xzt(e){return e?Zzt(e):[0,0,0,1]}Pze.exports=Xzt});var $g=Se((kvr,Oze)=>{"use strict";var qze=_u(),Yzt=cd(),WR=J_(),jR=fc(),Kzt=Ih().defaultLine,Ize=yp().isArrayOrTypedArray,dZ=WR(Kzt),Bze=1;function Dze(e,t){var r=e;return r[3]*=t,r}function Rze(e){if(qze(e))return dZ;var t=WR(e);return t.length?t:dZ}function Fze(e){return qze(e)?e:Bze}function Jzt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=Ize(n),a=Ize(t),o=jR.extractOpts(e),s=[],u,l,f,c,h;if(o.colorscale!==void 0?u=jR.makeColorScaleFuncFromTrace(e):u=Rze,i?l=function(p,x){return p[x]===void 0?dZ:WR(u(p[x]))}:l=Rze,a?f=function(p,x){return p[x]===void 0?Bze:Fze(p[x])}:f=Fze,i||a)for(var d=0;d<r;d++)c=l(n,d),h=f(t,d),s[d]=Dze(c,h);else s=Dze(WR(n),t);return s}function $zt(e){var t=jR.extractOpts(e),r=t.colorscale;return t.reversescale&&(r=jR.flipScale(t.colorscale)),r.map(function(n){var i=n[0],a=Yzt(n[1]),o=a.toRgb();return{index:i,rgb:[o.r,o.g,o.b,o.a]}})}Oze.exports={formatColor:Jzt,parseColorScale:$zt}});var pZ=Se((Cvr,Nze)=>{"use strict";Nze.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 ZR=Se((Lvr,Uze)=>{"use strict";Uze.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var Hze=Se((zvr,Vze)=>{"use strict";var Qzt=Ul();function vZ(e,t,r,n){if(!t||!t.visible)return null;for(var i=Qzt.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 u=n.c2l(e[o]),l=e[o]-s[0],f=e[o]+s[1];if(a[o]=[(n.c2l(l,!0)-u)*r,(n.c2l(f,!0)-u)*r],l>0){var c=n.c2l(l);n._lowerLogErrorBound||(n._lowerLogErrorBound=c),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,c)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function ePt(e){for(var t=0;t<e.length;t++)if(e[t])return e[t].length;return 0}function tPt(e,t,r){var n=[vZ(e.x,e.error_x,t[0],r.xaxis),vZ(e.y,e.error_y,t[1],r.yaxis),vZ(e.z,e.error_z,t[2],r.zaxis)],i=ePt(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]],u=0;u<3;u++)if(n[u])for(var l=0;l<2;l++)s[l][u]=n[u][o][l];a[o]=s}return a}Vze.exports=tPt});var $ze=Se((Pvr,Jze)=>{"use strict";var rPt=Od().gl_line3d,Gze=Od().gl_scatter3d,iPt=Od().gl_error3d,nPt=Od().gl_mesh3d,aPt=Od().delaunay_triangulate,Qg=Zr(),Yze=Jg(),XR=$g().formatColor,oPt=S3(),yZ=pZ(),sPt=ZR(),lPt=hu(),uPt=rv().appendArrayPointValue,fPt=Hze();function Kze(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 gZ=Kze.prototype;gZ.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&&(Qg.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 cPt(e,t,r){var n=(r+1)%3,i=(r+2)%3,a=[],o=[],s;for(s=0;s<e.length;++s){var u=e[s];isNaN(u[n])||!isFinite(u[n])||isNaN(u[i])||!isFinite(u[i])||(a.push([u[n],u[i]]),o.push(s))}var l=aPt(a);for(s=0;s<l.length;++s)for(var f=l[s],c=0;c<f.length;++c)f[c]=o[f[c]];return{positions:e,cells:l,meshColor:t}}function hPt(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]=Yze(a.color),n[i]=a.thickness)}return{capSize:t,color:r,lineWidth:n}}function Wze(e){return e==null?0:e.indexOf("left")>-1?-1:e.indexOf("right")>-1?1:0}function jze(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function dPt(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]=Wze(e[i]),n[i][1]=jze(e[i]));else n[0]=Wze(e),n[1]=jze(e);return n}function pPt(e,t){return t(e*4)}function vPt(e){return sPt[e]}function mZ(e,t,r,n,i){var a=null;if(Qg.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,Qg.identity);return a}function yPt(e,t){var r=[],n=e.fullSceneLayout,i=e.dataScale,a=n.xaxis,o=n.yaxis,s=n.zaxis,u=t.marker,l=t.line,f=t.x||[],c=t.y||[],h=t.z||[],d=f.length,p=t.xcalendar,x=t.ycalendar,b=t.zcalendar,y,k,E,A,L,_;for(L=0;L<d;L++)y=a.d2l(f[L],0,p)*i[0],k=o.d2l(c[L],0,x)*i[1],E=s.d2l(h[L],0,b)*i[2],r[L]=[y,k,E];if(Array.isArray(t.text))_=t.text;else if(Qg.isTypedArray(t.text))_=Array.from(t.text);else if(t.text!==void 0)for(_=new Array(d),L=0;L<d;L++)_[L]=t.text;function C(be,ze){var Ce=n[be];return lPt.tickText(Ce,Ce.d2l(ze),!0).text}var M=t.texttemplate;if(M){var v=e.fullLayout,z=v._d3locale,T=Array.isArray(M),F=T?Math.min(M.length,d):d,q=T?function(be){return M[be]}:function(){return M};for(_=new Array(F),L=0;L<F;L++){var U={x:f[L],y:c[L],z:h[L]},H={xLabel:C("xaxis",f[L]),yLabel:C("yaxis",c[L]),zLabel:C("zaxis",h[L])},j={};uPt(j,t,L);var G=t._meta||{};_[L]=Qg.texttemplateString(q(L),H,z,j,U,G)}}if(A={position:r,mode:t.mode,text:_},"line"in t&&(A.lineColor=XR(l,1,d),A.lineWidth=l.width,A.lineDashes=l.dash),"marker"in t){var O=oPt(t);A.scatterColor=XR(u,1,d),A.scatterSize=mZ(u.size,d,pPt,20,O),A.scatterMarker=mZ(u.symbol,d,vPt,"\u25CF"),A.scatterLineWidth=u.line.width,A.scatterLineColor=XR(u.line,1,d),A.scatterAngle=0}"textposition"in t&&(A.textOffset=dPt(t.textposition),A.textColor=XR(t.textfont,1,d),A.textSize=mZ(t.textfont.size,d,Qg.identity,12),A.textFontFamily=t.textfont.family,A.textFontWeight=t.textfont.weight,A.textFontStyle=t.textfont.style,A.textFontVariant=t.textfont.variant,A.textAngle=0);var W=["x","y","z"];for(A.project=[!1,!1,!1],A.projectScale=[1,1,1],A.projectOpacity=[1,1,1],L=0;L<3;++L){var re=t.projection[W[L]];(A.project[L]=re.show)&&(A.projectOpacity[L]=re.opacity,A.projectScale[L]=re.scale)}A.errorBounds=fPt(t,i,n);var ne=hPt([t.error_x,t.error_y,t.error_z]);return A.errorColor=ne.color,A.errorLineWidth=ne.lineWidth,A.errorCapSize=ne.capSize,A.delaunayAxis=t.surfaceaxis,A.delaunayColor=Yze(t.surfacecolor),A}function Zze(e){if(Qg.isArrayOrTypedArray(e)){var t=e[0];return Qg.isArrayOrTypedArray(t)&&(e=t),"rgb("+e.slice(0,3).map(function(r){return Math.round(r*255)})+")"}return null}function Xze(e){return Qg.isArrayOrTypedArray(e)?e.length===4&&typeof e[0]=="number"?Zze(e):e.map(Zze):null}gZ.update=function(e){var t=this.scene.glplot.gl,r,n,i,a,o=yZ.solid;this.data=e;var s=yPt(this.scene,e);"mode"in s&&(this.mode=s.mode),"lineDashes"in s&&s.lineDashes in yZ&&(o=yZ[s.lineDashes]),this.color=Xze(s.scatterColor)||Xze(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=rPt(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 u=e.opacity;if(e.marker&&e.marker.opacity!==void 0&&(u*=e.marker.opacity),n={gl:this.scene.glplot.gl,position:s.position,color:s.scatterColor,size:s.scatterSize,glyph:s.scatterMarker,opacity:u,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=Gze(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=Gze(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=iPt(i),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),s.delaunayAxis>=0){var l=cPt(s.position,s.delaunayColor,s.delaunayAxis);l.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(l):(l.gl=t,this.delaunayMesh=nPt(l),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)};gZ.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 mPt(e,t){var r=new Kze(e,t.uid);return r.update(t),r}Jze.exports=mPt});var TZ=Se((Ivr,tPe)=>{"use strict";var e1=Zc(),gPt=uc(),wZ=Xf(),_Z=Gc().axisHoverFormat,_Pt=Du().hovertemplateAttrs,xPt=Du().texttemplateAttrs,Qze=zf(),bPt=pZ(),wPt=ZR(),Yy=vu().extendFlat,TPt=_c().overrideAll,ePe=X1(),APt=e1.line,N2=e1.marker,SPt=N2.line,MPt=Yy({width:APt.width,dash:{valType:"enumerated",values:ePe(bPt),dflt:"solid"}},wZ("line"));function xZ(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 bZ=tPe.exports=TPt({x:e1.x,y:e1.y,z:{valType:"data_array"},text:Yy({},e1.text,{}),texttemplate:xPt({},{}),hovertext:Yy({},e1.hovertext,{}),hovertemplate:_Pt(),xhoverformat:_Z("x"),yhoverformat:_Z("y"),zhoverformat:_Z("z"),mode:Yy({},e1.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:xZ("x"),y:xZ("y"),z:xZ("z")},connectgaps:e1.connectgaps,line:MPt,marker:Yy({symbol:{valType:"enumerated",values:ePe(wPt),dflt:"circle",arrayOk:!0},size:Yy({},N2.size,{dflt:8}),sizeref:N2.sizeref,sizemin:N2.sizemin,sizemode:N2.sizemode,opacity:Yy({},N2.opacity,{arrayOk:!1}),colorbar:N2.colorbar,line:Yy({width:Yy({},SPt.width,{arrayOk:!1})},wZ("marker.line"))},wZ("marker")),textposition:Yy({},e1.textposition,{dflt:"top center"}),textfont:gPt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:Qze.opacity,hoverinfo:Yy({},Qze.hoverinfo)},"calc","nested");bZ.x.editType=bZ.y.editType=bZ.z.editType="calc+clearAxisTypes"});var nPe=Se((Dvr,iPe)=>{"use strict";var rPe=Ul(),EPt=Zr(),AZ=ec(),kPt=$v(),CPt=I0(),LPt=D0(),zPt=TZ();iPe.exports=function(t,r,n,i){function a(d,p){return EPt.coerce(t,r,zPt,d,p)}var o=PPt(t,r,a,i);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),AZ.hasMarkers(r)&&kPt(t,r,n,i,a,{noSelect:!0,noAngle:!0}),AZ.hasLines(r)&&(a("connectgaps"),CPt(t,r,n,i,a)),AZ.hasText(r)&&(a("texttemplate"),LPt(t,r,i,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,u=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",s||u);for(var l=["x","y","z"],f=0;f<3;++f){var c="projection."+l[f];a(c+".show")&&(a(c+".opacity"),a(c+".scale"))}var h=rPe.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||u||n,{axis:"z"}),h(t,r,s||u||n,{axis:"y",inherit:"z"}),h(t,r,s||u||n,{axis:"x",inherit:"z"})};function PPt(e,t,r,n){var i=0,a=r("x"),o=r("y"),s=r("z"),u=rPe.getComponentMethod("calendars","handleTraceDefaults");return u(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 oPe=Se((Rvr,aPe)=>{"use strict";var IPt=km(),DPt=R0();aPe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return IPt(n,r),DPt(t,r),n}});var lPe=Se((Fvr,sPe)=>{sPe.exports=RPt;function RPt(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 fPe=Se((qvr,uPe)=>{var FPt=lPe();uPe.exports=function(t){return FPt("webgl",t)}});var SZ=Se((Bvr,hPe)=>{"use strict";var cPe=Pl(),qPt=function(){};hPe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=qPt);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=cPe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=cPe.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 vPe=Se((Ovr,pPe)=>{"use strict";var U2=Jg(),BPt=Zr(),OPt=["xaxis","yaxis","zaxis"];function dPe(){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 NPt=dPe.prototype;NPt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[OPt[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?BPt.templateString(i.title.text,e._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(r.labelColor[n]=U2(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]=U2(i.linecolor)),"linewidth"in i&&(r.lineWidth[n]=i.linewidth),"showgrid"in i&&(r.gridEnable[n]=i.showgrid),"gridcolor"in i&&(r.gridColor[n]=U2(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]=U2(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]=U2(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]=U2(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]=U2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function UPt(e,t){var r=new dPe;return r.merge(e,t),r}pPe.exports=UPt});var gPe=Se((Nvr,mPe)=>{"use strict";var VPt=Jg(),HPt=["xaxis","yaxis","zaxis"];function yPe(){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 GPt=yPe.prototype;GPt.merge=function(e){for(var t=0;t<3;++t){var r=e[HPt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=VPt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function WPt(e){var t=new yPe;return t.merge(e),t}mPe.exports=WPt});var bPe=Se((Uvr,xPe)=>{"use strict";xPe.exports=KPt;var _Pe=hu(),jPt=Zr(),ZPt=["xaxis","yaxis","zaxis"],XPt=[0,0,0];function YPt(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 KPt(e){for(var t=e.axesOptions,r=e.glplot.axesPixels,n=e.fullSceneLayout,i=[[],[],[]],a=0;a<3;++a){var o=n[ZPt[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 u=o.nticks||jPt.constrain(o._length/40,4,9);_Pe.autoTicks(o,Math.abs(o.range[1]-o.range[0])/u)}for(var l=_Pe.calcTicks(o,{msUTC:!0}),f=0;f<l.length;++f)l[f].x=l[f].x*e.dataScale[a],o.type==="date"&&(l[f].text=l[f].text.replace(/\<br\>/g," "));i[a]=l,o.tickmode=s}}t.ticks=i;for(var a=0;a<3;++a){XPt[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var f=0;f<2;++f)t.bounds[f][a]=e.glplot.bounds[f][a]}e.contourLevels=YPt(i)}});var kPe=Se((Vvr,EPe)=>{"use strict";var APe=Od().gl_plot3d,JPt=APe.createCamera,wPe=APe.createScene,$Pt=fPe(),QPt=Ez(),JR=Ul(),uv=Zr(),KR=uv.preserveDrawingBuffer(),$R=hu(),Ky=jc(),eIt=Jg(),tIt=SZ(),rIt=GU(),iIt=vPe(),nIt=gPe(),aIt=bPe(),oIt=wy().applyAutorangeOptions,VE,YR,SPe=!1;function MPe(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=iIt(t,t[this.id]),this.spikeOptions=nIt(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=JR.getComponentMethod("annotations3d","convert"),this.drawAnnotations=JR.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Ap=MPe.prototype;Ap.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:KR,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(!YR&&(VE=document.createElement("canvas"),YR=$Pt({canvas:VE,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!YR))throw new Error("error creating static canvas/context for image server");t.gl=YR,t.canvas=VE}return t};var TPe=!0;Ap.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=wPe(t)}catch(n){if(e.staticMode||!TPe||KR)r=!1;else{uv.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{KR=t.glOptions.preserveDrawingBuffer=!0,e.glplot=wPe(t)}catch(i){KR=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return TPe=!1,r};Ap.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=JPt(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"})};Ap.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return tIt(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(){SPe=!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,u=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*u.x,y:s*u.y,z:s*u.z})}a(e)}},QPt?{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};Ap.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,u=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+u),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",u),aIt(e),e.glplot.axes.update(e.axesOptions);for(var l=Object.keys(e.traces),f=null,c=e.glplot.selection,h=0;h<l.length;++h)r=e.traces[l[h]],r.data.hoverinfo!=="skip"&&r.handlePick(c)&&(f=r),r.setContourLevels&&r.setContourLevels();function d(z,T,F){var q=e.fullSceneLayout[z+"axis"];return q.type!=="log"&&(T=q.d2l(T)),$R.hoverLabelText(q,T,F)}if(f!==null){var p=rIt(e.glplot.cameraParams,c.dataCoordinate);r=f.data;var x=t._fullData[r.index],b=c.index,y={xLabel:d("x",c.traceCoordinate[0],r.xhoverformat),yLabel:d("y",c.traceCoordinate[1],r.yhoverformat),zLabel:d("z",c.traceCoordinate[2],r.zhoverformat)},k=Ky.castHoverinfo(x,e.fullLayout,b),E=(k||"").split("+"),A=k&&k==="all";!x.hovertemplate&&!A&&(E.indexOf("x")===-1&&(y.xLabel=void 0),E.indexOf("y")===-1&&(y.yLabel=void 0),E.indexOf("z")===-1&&(y.zLabel=void 0),E.indexOf("text")===-1&&(c.textLabel=void 0),E.indexOf("name")===-1&&(f.name=void 0));var L,_=[];r.type==="cone"||r.type==="streamtube"?(y.uLabel=d("x",c.traceCoordinate[3],r.uhoverformat),(A||E.indexOf("u")!==-1)&&_.push("u: "+y.uLabel),y.vLabel=d("y",c.traceCoordinate[4],r.vhoverformat),(A||E.indexOf("v")!==-1)&&_.push("v: "+y.vLabel),y.wLabel=d("z",c.traceCoordinate[5],r.whoverformat),(A||E.indexOf("w")!==-1)&&_.push("w: "+y.wLabel),y.normLabel=c.traceCoordinate[6].toPrecision(3),(A||E.indexOf("norm")!==-1)&&_.push("norm: "+y.normLabel),r.type==="streamtube"&&(y.divergenceLabel=c.traceCoordinate[7].toPrecision(3),(A||E.indexOf("divergence")!==-1)&&_.push("divergence: "+y.divergenceLabel)),c.textLabel&&_.push(c.textLabel),L=_.join("<br>")):r.type==="isosurface"||r.type==="volume"?(y.valueLabel=$R.hoverLabelText(e._mockAxis,e._mockAxis.d2l(c.traceCoordinate[3]),r.valuehoverformat),_.push("value: "+y.valueLabel),c.textLabel&&_.push(c.textLabel),L=_.join("<br>")):L=c.textLabel;var C={x:c.traceCoordinate[0],y:c.traceCoordinate[1],z:c.traceCoordinate[2],data:x._input,fullData:x,curveNumber:x.index,pointNumber:b};Ky.appendArrayPointValue(C,x,b),r._module.eventData&&(C=x._module.eventData(C,c,x,{},b));var M={points:[C]};if(e.fullSceneLayout.hovermode){var v=[];Ky.loneHover({trace:x,x:(.5+.5*p[0]/p[3])*s,y:(.5-.5*p[1]/p[3])*u,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:L,name:f.name,color:Ky.castHoverOption(x,b,"bgcolor")||f.color,borderColor:Ky.castHoverOption(x,b,"bordercolor"),fontFamily:Ky.castHoverOption(x,b,"font.family"),fontSize:Ky.castHoverOption(x,b,"font.size"),fontColor:Ky.castHoverOption(x,b,"font.color"),nameLength:Ky.castHoverOption(x,b,"namelength"),textAlign:Ky.castHoverOption(x,b,"align"),hovertemplate:uv.castOption(x,b,"hovertemplate"),hovertemplateLabels:uv.extendFlat({},C,y),eventData:[C]},{container:n,gd:t,inOut_bbox:v}),C.bbox=v[0]}c.distance<5&&(c.buttons||SPe)?t.emit("plotly_click",M):t.emit("plotly_hover",M),this.oldEventData=M}else Ky.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Ap.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){uv.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var HE=["xaxis","yaxis","zaxis"];function sIt(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=HE[i],o=a.charAt(0),s=n[a],u=t[o],l=t[o+"calendar"],f=t["_"+o+"length"];if(!uv.isArrayOrTypedArray(u))r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],f-1);else for(var c,h=0;h<(f||u.length);h++)if(uv.isArrayOrTypedArray(u[h]))for(var d=0;d<u[h].length;++d)c=s.d2l(u[h][d],0,l),!isNaN(c)&&isFinite(c)&&(r[0][i]=Math.min(r[0][i],c),r[1][i]=Math.max(r[1][i],c));else c=s.d2l(u[h],0,l),!isNaN(c)&&isFinite(c)&&(r[0][i]=Math.min(r[0][i],c),r[1][i]=Math.max(r[1][i],c))}}function lIt(e,t){for(var r=e.fullSceneLayout,n=r.annotations||[],i=0;i<3;i++)for(var a=HE[i],o=a.charAt(0),s=r[a],u=0;u<n.length;u++){var l=n[u];if(l.visible){var f=s.r2l(l[o]);!isNaN(f)&&isFinite(f)&&(t[0][i]=Math.min(t[0][i],f),t[1][i]=Math.max(t[1][i],f))}}}Ap.plot=function(e,t,r){var n=this;if(n.plotArgs=[e,t,r],!n.glplot.contextLost){var i,a,o,s,u,l,f=t[n.id],c=r[n.id];n.fullLayout=t,n.fullSceneLayout=f,n.axesOptions.merge(t,f),n.spikeOptions.merge(f),n.setViewport(f),n.updateFx(f.dragmode,f.hovermode),n.camera.enableWheel=n.graphDiv._context._scrollZoom.gl3d,n.glplot.setClearColor(eIt(f.bgcolor)),n.setConvert(u),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)&&sIt(this,i,h);lIt(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 p=Object.keys(n.traces);e:for(o=0;o<p.length;++o){for(s=0;s<e.length;++s)if(e[s].uid===p[o]&&e[s].visible===!0&&e[s]._length!==0)continue e;a=n.traces[p[o]],a.dispose(),delete n.traces[p[o]]}n.glplot.objects.sort(function(ne,be){return ne._trace.data.index-be._trace.data.index});var x=[[0,0,0],[0,0,0]],b=[],y={};for(o=0;o<3;++o){u=f[HE[o]],l=u.type,l in y?(y[l].acc*=d[o],y[l].count+=1):y[l]={acc:d[o],count:1};var k;if(u.autorange){x[0][o]=1/0,x[1][o]=-1/0;var E=n.glplot.objects,A=n.fullSceneLayout.annotations||[],L=u._name.charAt(0);for(s=0;s<E.length;s++){var _=E[s],C=_.bounds,M=_._trace.data._pad||0;_.constructor.name==="ErrorBars"&&u._lowerLogErrorBound?x[0][o]=Math.min(x[0][o],u._lowerLogErrorBound):x[0][o]=Math.min(x[0][o],C[0][o]/d[o]-M),x[1][o]=Math.max(x[1][o],C[1][o]/d[o]+M)}for(s=0;s<A.length;s++){var v=A[s];if(v.visible){var z=u.r2l(v[L]);x[0][o]=Math.min(x[0][o],z),x[1][o]=Math.max(x[1][o],z)}}if("rangemode"in u&&u.rangemode==="tozero"&&(x[0][o]=Math.min(x[0][o],0),x[1][o]=Math.max(x[1][o],0)),x[0][o]>x[1][o])x[0][o]=-1,x[1][o]=1;else{var T=x[1][o]-x[0][o];x[0][o]-=T/32,x[1][o]+=T/32}if(k=[x[0][o],x[1][o]],k=oIt(k,u),x[0][o]=k[0],x[1][o]=k[1],u.isReversed()){var F=x[0][o];x[0][o]=x[1][o],x[1][o]=F}}else k=u.range,x[0][o]=u.r2l(k[0]),x[1][o]=u.r2l(k[1]);x[0][o]===x[1][o]&&(x[0][o]-=1,x[1][o]+=1),b[o]=x[1][o]-x[0][o],u.range=[x[0][o],x[1][o]],u.limitRange(),n.glplot.setBounds(o,{min:u.range[0]*d[o],max:u.range[1]*d[o]})}var q,U=f.aspectmode;if(U==="cube")q=[1,1,1];else if(U==="manual"){var H=f.aspectratio;q=[H.x,H.y,H.z]}else if(U==="auto"||U==="data"){var j=[1,1,1];for(o=0;o<3;++o){u=f[HE[o]],l=u.type;var G=y[l];j[o]=Math.pow(G.acc,1/G.count)/d[o]}U==="data"||Math.max.apply(null,j)/Math.min.apply(null,j)<=4?q=j:q=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");f.aspectratio.x=c.aspectratio.x=q[0],f.aspectratio.y=c.aspectratio.y=q[1],f.aspectratio.z=c.aspectratio.z=q[2],n.glplot.setAspectratio(f.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:f.aspectratio.x,y:f.aspectratio.y,z:f.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=f.aspectmode);var O=f.domain||null,W=t._size||null;if(O&&W){var re=n.container.style;re.position="absolute",re.left=W.l+O.x[0]*W.w+"px",re.top=W.t+(1-O.y[1])*W.h+"px",re.width=W.w*(O.x[1]-O.x[0])+"px",re.height=W.h*(O.y[1]-O.y[0])+"px"}n.glplot.redraw()}};Ap.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 uIt(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 fIt(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"}}}Ap.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),fIt(e.camera)};Ap.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,uIt(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())};Ap.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=uv.nestedProperty(e,t.id+".camera"),i=n.get();function a(l,f,c,h){var d=["up","center","eye"],p=["x","y","z"];return f[d[c]]&&l[d[c]][p[h]]===f[d[c]][p[h]]}var o=!1;if(i===void 0)o=!0;else{for(var s=0;s<3;s++)for(var u=0;u<3;u++)if(!a(r,i,s,u)){o=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(o=!0)}return o};Ap.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=uv.nestedProperty(e,t.id+".aspectratio"),i=n.get();return i===void 0||i.x!==r.x||i.y!==r.y||i.z!==r.z};Ap.saveLayout=function(e){var t=this,r=t.fullLayout,n,i,a,o,s,u,l=t.isCameraChanged(e),f=t.isAspectChanged(e),c=l||f;if(c){var h={};if(l&&(n=t.getCamera(),i=uv.nestedProperty(e,t.id+".camera"),a=i.get(),h[t.id+".camera"]=a),f&&(o=t.glplot.getAspectratio(),s=uv.nestedProperty(e,t.id+".aspectratio"),u=s.get(),h[t.id+".aspectratio"]=u),JR.call("_storeDirectGUIEdit",e,r._preGUI,h),l){i.set(n);var d=uv.nestedProperty(r,t.id+".camera");d.set(n)}if(f){s.set(o);var p=uv.nestedProperty(r,t.id+".aspectratio");p.set(o),t.glplot.redraw()}}return c};Ap.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,u=o.up.y,l=o.up.z;if(l/Math.sqrt(s*s+u*u+l*l)<.999){var f=r.id+".camera.up",c={x:0,y:0,z:1},h={};h[f]=c;var d=i.layout;JR.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=c,uv.nestedProperty(d,f).set(c)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function cIt(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,u=4*(t*i+a)+o,l=e[s];e[s]=e[u],e[u]=l}}function hIt(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,u=0;u<3;++u)e[a+u]=Math.min(s*e[a+u],255)}}Ap.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(VE),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),cIt(a,n,i),hIt(a,n,i);var o=document.createElement("canvas");o.width=n,o.height=i;var s=o.getContext("2d",{willReadFrequently:!0}),u=s.createImageData(n,i);u.data.set(a),s.putImageData(u,0,0);var l;switch(e){case"jpeg":l=o.toDataURL("image/jpeg");break;case"webp":l=o.toDataURL("image/webp");break;default:l=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(VE),l};Ap.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[HE[t]];$R.setConvert(r,e.fullLayout),r.setScale=uv.noop}};Ap.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},$R.setConvert(e._mockAxis,r)};EPe.exports=MPe});var LPe=Se((Hvr,CPe)=>{"use strict";CPe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var EZ=Se((Gvr,zPe)=>{"use strict";var dIt=Pl(),ef=Rd(),MZ=vu().extendFlat,pIt=_c().overrideAll;zPe.exports=pIt({visible:ef.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:dIt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:ef.color,categoryorder:ef.categoryorder,categoryarray:ef.categoryarray,title:{text:ef.title.text,font:ef.title.font},type:MZ({},ef.type,{values:["-","linear","log","date","category"]}),autotypenumbers:ef.autotypenumbers,autorange:ef.autorange,autorangeoptions:{minallowed:ef.autorangeoptions.minallowed,maxallowed:ef.autorangeoptions.maxallowed,clipmin:ef.autorangeoptions.clipmin,clipmax:ef.autorangeoptions.clipmax,include:ef.autorangeoptions.include,editType:"plot"},rangemode:ef.rangemode,minallowed:ef.minallowed,maxallowed:ef.maxallowed,range:MZ({},ef.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:ef.minor.tickmode,nticks:ef.nticks,tick0:ef.tick0,dtick:ef.dtick,tickvals:ef.tickvals,ticktext:ef.ticktext,ticks:ef.ticks,mirror:ef.mirror,ticklen:ef.ticklen,tickwidth:ef.tickwidth,tickcolor:ef.tickcolor,showticklabels:ef.showticklabels,labelalias:ef.labelalias,tickfont:ef.tickfont,tickangle:ef.tickangle,tickprefix:ef.tickprefix,showtickprefix:ef.showtickprefix,ticksuffix:ef.ticksuffix,showticksuffix:ef.showticksuffix,showexponent:ef.showexponent,exponentformat:ef.exponentformat,minexponent:ef.minexponent,separatethousands:ef.separatethousands,tickformat:ef.tickformat,tickformatstops:ef.tickformatstops,hoverformat:ef.hoverformat,showline:ef.showline,linecolor:ef.linecolor,linewidth:ef.linewidth,showgrid:ef.showgrid,gridcolor:MZ({},ef.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:ef.gridwidth,zeroline:ef.zeroline,zerolinecolor:ef.zerolinecolor,zerolinewidth:ef.zerolinewidth},"plot","from-root")});var zZ=Se((Wvr,PPe)=>{"use strict";var kZ=EZ(),vIt=Ec().attributes,CZ=vu().extendFlat,yIt=Zr().counterRegex;function LZ(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"}}PPe.exports={_arrayAttrRegexps:[yIt("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:CZ(LZ(0,0,1),{}),center:CZ(LZ(0,0,0),{}),eye:CZ(LZ(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:vIt({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:kZ,yaxis:kZ,zaxis:kZ,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 FPe=Se((jvr,RPe)=>{"use strict";var mIt=cd().mix,IPe=Zr(),gIt=_f(),_It=EZ(),xIt=kU(),bIt=J5(),DPe=["xaxis","yaxis","zaxis"],wIt=100*136/187;RPe.exports=function(t,r,n){var i,a;function o(l,f){return IPe.coerce(i,a,_It,l,f)}for(var s=0;s<DPe.length;s++){var u=DPe[s];i=t[u]||{},a=gIt.newContainer(r,u),a._id=u[0]+n.scene,a._name=u,xIt(i,a,o,n),bIt(i,a,o,{font:n.font,letter:u[0],data:n.data,showGrid:!0,noAutotickangles:!0,noTicklabelindex:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,noInsiderange:!0,bgColor:n.bgColor,calendar:n.calendar},n.fullLayout),o("gridcolor",mIt(a.color,n.bgColor,wIt).toRgbString()),o("title.text",u[0]),a.setScale=IPe.noop,o("showspikes")&&(o("spikesides"),o("spikethickness"),o("spikecolor",a.color)),o("showaxeslabels"),o("showbackground")&&o("backgroundcolor")}}});var NPe=Se((Zvr,OPe)=>{"use strict";var TIt=Zr(),AIt=Pl(),SIt=Ul(),MIt=k_(),EIt=FPe(),qPe=zZ(),kIt=Dd().getSubplotData,BPe="gl3d";OPe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=TIt.validate(t[o],qPe[o]);if(s)return t[o]}}MIt(t,r,n,{type:BPe,attributes:qPe,handleDefaults:CIt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function CIt(e,t,r,n){for(var i=r("bgcolor"),a=AIt.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 u=!!r("aspectratio.x")&&!!r("aspectratio.y")&&!!r("aspectratio.z"),l=u?"manual":"auto",f=r("aspectmode",l);u||(e.aspectratio=t.aspectratio={x:1,y:1,z:1},f==="manual"&&(t.aspectmode="auto"),e.aspectmode=t.aspectmode);var c=kIt(n.fullData,BPe,n.id);EIt(e,t,{font:n.font,scene:n.id,data:c,bgColor:a,calendar:n.calendar,autotypenumbersDflt:n.autotypenumbersDflt,fullLayout:n.fullLayout}),SIt.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,p=e.camera.up.y,x=e.camera.up.z;x!==0&&(!d||!p||!x||x/Math.sqrt(d*d+p*p+x*x)>.999)&&(h="turntable")}else h="turntable";r("dragmode",h),r("hovermode",n.getDfltFromLayout("hovermode"))}});var $_=Se(fv=>{"use strict";var LIt=_c().overrideAll,zIt=O1(),PIt=kPe(),IIt=Dd().getSubplotData,DIt=Zr(),RIt=Zv(),OA="gl3d",PZ="scene";fv.name=OA;fv.attr=PZ;fv.idRoot=PZ;fv.idRegex=fv.attrRegex=DIt.counterRegex("scene");fv.attributes=LPe();fv.layoutAttributes=zZ();fv.baseLayoutAttrOverrides=LIt({hoverlabel:zIt.hoverlabel},"plot","nested");fv.supplyLayoutDefaults=NPe();fv.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[OA],a=0;a<i.length;a++){var o=i[a],s=IIt(n,OA,o),u=r[o],l=u.camera,f=u._scene;f||(f=new PIt({id:o,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:l},r),u._scene=f),f.viewInitial||(f.viewInitial={up:{x:l.up.x,y:l.up.y,z:l.up.z},eye:{x:l.eye.x,y:l.eye.y,z:l.eye.z},center:{x:l.center.x,y:l.center.y,z:l.center.z}}),f.plot(s,r,t.layout)}};fv.clean=function(e,t,r,n){for(var i=n._subplots[OA]||[],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())}};fv.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[OA],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._scene,u=s.toImage("png"),l=t._glimages.append("svg:image");l.attr({xmlns:RIt.svg,"xlink:href":u,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()}};fv.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var r=t.substr(5);return r==="1"&&(r=""),PZ+r}};fv.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[OA],n=0;n<r.length;n++){var i=t[r[n]]._scene;i.updateFx(t.dragmode,t.hovermode)}}});var VPe=Se((Yvr,UPe)=>{"use strict";UPe.exports={plot:$ze(),attributes:TZ(),markerSymbols:ZR(),supplyDefaults:nPe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:oPe(),moduleType:"trace",name:"scatter3d",basePlotModule:$_(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var GPe=Se((Kvr,HPe)=>{"use strict";HPe.exports=VPe()});var GE=Se((Jvr,ZPe)=>{"use strict";var WPe=Pl(),FIt=Xf(),IZ=Gc().axisHoverFormat,qIt=Du().hovertemplateAttrs,jPe=zf(),DZ=vu().extendFlat,BIt=_c().overrideAll;function RZ(e){return{valType:"boolean",dflt:!1}}function FZ(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:RZ("x"),y:RZ("y"),z:RZ("z")},color:{valType:"color",dflt:WPe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:WPe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var qZ=ZPe.exports=BIt(DZ({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:qIt(),xhoverformat:IZ("x"),yhoverformat:IZ("y"),zhoverformat:IZ("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},FIt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:FZ("x"),y:FZ("y"),z:FZ("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},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:DZ({},jPe.hoverinfo),showlegend:DZ({},jPe.showlegend,{dflt:!1})}),"calc","nested");qZ.x.editType=qZ.y.editType=qZ.z.editType="calc+clearAxisTypes"});var OZ=Se(($vr,KPe)=>{"use strict";var OIt=Ul(),XPe=Zr(),NIt=ed(),UIt=GE(),BZ=.1;function VIt(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 HIt(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 GIt(e,t,r,n){var i,a;function o(b,y){return XPe.coerce(e,t,UIt,b,y)}var s=o("x"),u=o("y"),l=o("z");if(!l||!l.length||s&&s.length<1||u&&u.length<1){t.visible=!1;return}t._xlength=Array.isArray(s)&&XPe.isArrayOrTypedArray(s[0])?l.length:l[0].length,t._ylength=l.length;var f=OIt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),o("text"),o("hovertext"),o("hovertemplate"),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 c=o("surfacecolor"),h=["x","y","z"];for(i=0;i<3;++i){var d="contours."+h[i],p=o(d+".show"),x=o(d+".highlight");if(p||x)for(a=0;a<3;++a)o(d+".project."+h[a]);p&&(o(d+".color"),o(d+".width"),o(d+".usecolormap")),x&&(o(d+".highlightcolor"),o(d+".highlightwidth")),o(d+".start"),o(d+".end"),o(d+".size")}NIt(e,t,n,o,{prefix:"",cLetter:"c"}),YPe(e,t,n,o),t._length=null}function YPe(e,t,r,n){var i=n("opacityscale");i==="max"?t.opacityscale=[[0,BZ],[1,1]]:i==="min"?t.opacityscale=[[0,1],[1,BZ]]:i==="extremes"?t.opacityscale=VIt(1,BZ):HIt(i)||(t.opacityscale=void 0)}KPe.exports={supplyDefaults:GIt,opacityscaleDefaults:YPe}});var QPe=Se((Qvr,$Pe)=>{"use strict";var JPe=Rp();$Pe.exports=function(t,r){r.surfacecolor?JPe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):JPe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var aIe=Se((e0r,nIe)=>{"use strict";var WIt=Od().gl_surface3d,NA=Od().ndarray,jIt=Od().ndarray_linear_interpolate.d2,ZIt=QI(),XIt=eD(),WE=Zr().isArrayOrTypedArray,YIt=$g().parseColorScale,eIe=Jg(),KIt=fc().extractOpts;function rIe(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 Jy=rIe.prototype;Jy.getXat=function(e,t,r,n){var i=WE(this.data.x)?WE(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};Jy.getYat=function(e,t,r,n){var i=WE(this.data.y)?WE(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};Jy.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)};Jy.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 WE(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 JIt(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 UA=[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 $It(e,t){if(e<t)return 0;for(var r=0;Math.floor(e%t)===0;)e/=t,r++;return r}function NZ(e){for(var t=[],r=0;r<UA.length;r++){var n=UA[r];t.push($It(e,n))}return t}function QIt(e){for(var t=NZ(e),r=e,n=0;n<UA.length;n++)if(t[n]>0){r=UA[n];break}return r}function eDt(e,t){if(!(e<1||t<1)){for(var r=NZ(e),n=NZ(t),i=1,a=0;a<UA.length;a++)i*=Math.pow(UA[a],Math.max(r[a],n[a]));return i}}function tDt(e){if(e.length!==0){for(var t=1,r=0;r<e.length;r++)t=eDt(t,e[r]);return t}}Jy.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};Jy.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 iIe=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],tIe=iIe[9],QR=iIe[13];Jy.estimateScale=function(e,t){for(var r=t===0?this.calcXnums(e):this.calcYnums(e),n=1+tDt(r);n<tIe;)n*=2;for(;n>QR;)n--,n/=QIt(n),n++,n<tIe&&(n=QR);var i=Math.round(n/e);return i>1?i:1};function rDt(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 iDt(e,t,r){return nDt(e,t,rDt,r),e}function nDt(e,t,r,n){for(var i=[0,0],a=e.shape[0],o=e.shape[1],s=0;s<a;s++)for(var u=0;u<o;u++)r(i,[s,u],n),e.set(s,u,jIt(t,i[0],i[1]));return e}Jy.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,u=1+i+1,l=NA(new Float32Array(s*u),[s,u]),f=[1/t,0,0,0,1/r,0,0,0,1],c=0;c<e.length;++c){this.surface.padField(l,e[c]);var h=NA(new Float32Array(a*o),[a,o]);iDt(h,l,f),e[c]=h}};function aDt(e,t){for(var r=!1,n=0;n<e.length;n++)if(t===e[n]){r=!0;break}r===!1&&e.push(t)}Jy.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],aDt(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})}};Jy.update=function(e){var t=this.scene,r=t.fullSceneLayout,n=this.surface,i=YIt(e),a=t.dataScale,o=e.z[0].length,s=e._ylength,u=t.contourLevels;this.data=e;var l,f,c,h,d=[];for(l=0;l<3;l++)for(d[l]=[],f=0;f<o;f++)d[l][f]=[];for(f=0;f<o;f++)for(c=0;c<s;c++)d[0][f][c]=this.getXat(f,c,e.xcalendar,r.xaxis),d[1][f][c]=this.getYat(f,c,e.ycalendar,r.yaxis),d[2][f][c]=this.getZat(f,c,e.zcalendar,r.zaxis);if(e.connectgaps)for(e._emptypoints=XIt(d[2]),ZIt(d[2],e._emptypoints),e._interpolatedZ=[],f=0;f<o;f++)for(e._interpolatedZ[f]=[],c=0;c<s;c++)e._interpolatedZ[f][c]=d[2][f][c];for(l=0;l<3;l++)for(f=0;f<o;f++)for(c=0;c<s;c++)h=d[l][f][c],h==null?d[l][f][c]=NaN:h=d[l][f][c]*=a[l];for(l=0;l<3;l++)for(f=0;f<o;f++)for(c=0;c<s;c++)h=d[l][f][c],h!=null&&(this.minValues[l]>h&&(this.minValues[l]=h),this.maxValues[l]<h&&(this.maxValues[l]=h));for(l=0;l<3;l++)this.objectOffset[l]=.5*(this.minValues[l]+this.maxValues[l]);for(l=0;l<3;l++)for(f=0;f<o;f++)for(c=0;c<s;c++)h=d[l][f][c],h!=null&&(d[l][f][c]-=this.objectOffset[l]);var p=[NA(new Float32Array(o*s),[o,s]),NA(new Float32Array(o*s),[o,s]),NA(new Float32Array(o*s),[o,s])];for(l=0;l<3;l++)for(f=0;f<o;f++)for(c=0;c<s;c++)p[l].set(f,c,d[l][f][c]);d=[];var x={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=KIt(e);if(x.intensityBounds=[b.min,b.max],e.surfacecolor){var y=NA(new Float32Array(o*s),[o,s]);for(f=0;f<o;f++)for(c=0;c<s;c++)y.set(f,c,e.surfacecolor[c][f]);p.push(y)}else x.intensityBounds[0]*=a[2],x.intensityBounds[1]*=a[2];(QR<p[0].shape[0]||QR<p[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(p[0].shape[0],0),this.dataScaleY=this.estimateScale(p[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(p)),e.surfacecolor&&(x.intensity=p.pop());var k=[!0,!0,!0],E=["x","y","z"];for(l=0;l<3;++l){var A=e.contours[E[l]];k[l]=A.highlight,x.showContour[l]=A.show||A.highlight,x.showContour[l]&&(x.contourProject[l]=[A.project.x,A.project.y,A.project.z],A.show?(this.showContour[l]=!0,x.levels[l]=u[l],n.highlightColor[l]=x.contourColor[l]=eIe(A.color),A.usecolormap?n.highlightTint[l]=x.contourTint[l]=0:n.highlightTint[l]=x.contourTint[l]=1,x.contourWidth[l]=A.width,this.contourStart[l]=A.start,this.contourEnd[l]=A.end,this.contourSize[l]=A.size):(this.showContour[l]=!1,this.contourStart[l]=null,this.contourEnd[l]=null,this.contourSize[l]=0),A.highlight&&(x.dynamicColor[l]=eIe(A.highlightcolor),x.dynamicWidth[l]=A.highlightwidth))}JIt(i)&&(x.vertexColor=!0),x.objectOffset=this.objectOffset,x.coords=p,n.update(x),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])};Jy.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function oDt(e,t){var r=e.glplot.gl,n=WIt({gl:r}),i=new rIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}nIe.exports=oDt});var sIe=Se((t0r,oIe)=>{"use strict";oIe.exports={attributes:GE(),supplyDefaults:OZ().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:QPe(),plot:aIe(),moduleType:"trace",name:"surface",basePlotModule:$_(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var uIe=Se((r0r,lIe)=>{"use strict";lIe.exports=sIe()});var VA=Se((i0r,cIe)=>{"use strict";var sDt=Xf(),UZ=Gc().axisHoverFormat,lDt=Du().hovertemplateAttrs,Q_=GE(),fIe=zf(),ex=vu().extendFlat;cIe.exports=ex({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:lDt({editType:"calc"}),xhoverformat:UZ("x"),yhoverformat:UZ("y"),zhoverformat:UZ("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"}},sDt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:Q_.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:ex({},Q_.contours.x.show,{}),color:Q_.contours.x.color,width:Q_.contours.x.width,editType:"calc"},lightposition:{x:ex({},Q_.lightposition.x,{dflt:1e5}),y:ex({},Q_.lightposition.y,{dflt:1e5}),z:ex({},Q_.lightposition.z,{dflt:0}),editType:"calc"},lighting:ex({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},Q_.lighting),hoverinfo:ex({},fIe.hoverinfo,{editType:"calc"}),showlegend:ex({},fIe.showlegend,{dflt:!1})})});var tF=Se((n0r,dIe)=>{"use strict";var uDt=Xf(),eF=Gc().axisHoverFormat,fDt=Du().hovertemplateAttrs,jE=VA(),hIe=zf(),VZ=vu().extendFlat,cDt=_c().overrideAll;function HZ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function GZ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var HA=dIe.exports=cDt(VZ({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:HZ("x"),y:HZ("y"),z:HZ("z")},caps:{x:GZ("x"),y:GZ("y"),z:GZ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:fDt(),xhoverformat:eF("x"),yhoverformat:eF("y"),zhoverformat:eF("z"),valuehoverformat:eF("value",1),showlegend:VZ({},hIe.showlegend,{dflt:!1})},uDt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:jE.opacity,lightposition:jE.lightposition,lighting:jE.lighting,flatshading:jE.flatshading,contour:jE.contour,hoverinfo:VZ({},hIe.hoverinfo)}),"calc","nested");HA.flatshading.dflt=!0;HA.lighting.facenormalsepsilon.dflt=0;HA.x.editType=HA.y.editType=HA.z.editType=HA.value.editType="calc+clearAxisTypes"});var WZ=Se((a0r,vIe)=>{"use strict";var hDt=Zr(),dDt=Ul(),pDt=tF(),vDt=ed();function yDt(e,t,r,n){function i(a,o){return hDt.coerce(e,t,pDt,a,o)}pIe(e,t,r,n,i)}function pIe(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"),u=i("y"),l=i("z"),f=i("value");if(!s||!s.length||!u||!u.length||!l||!l.length||!f||!f.length){t.visible=!1;return}var c=dDt.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(x){i(x+"hoverformat");var b="caps."+x,y=i(b+".show");y&&i(b+".fill");var k="slices."+x,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 p=i("contour.show");p&&(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(x){i(x)}),vDt(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null}vIe.exports={supplyDefaults:yDt,supplyIsoDefaults:pIe}});var rF=Se((o0r,mIe)=>{"use strict";var ZZ=Zr(),mDt=Rp();function gDt(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=Gm(t.u,t._len),t._v=Gm(t.v,t._len),t._w=Gm(t.w,t._len),t._x=Gm(t.x,t._len),t._y=Gm(t.y,t._len),t._z=Gm(t.z,t._len);var r=yIe(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=Gm(t.starts.x||[]),a=Gm(t.starts.y||[]),o=Gm(t.starts.z||[]),n=Math.min(i.length,a.length,o.length)),t._startsX=i||[],t._startsY=a||[],t._startsZ=o||[];var s=0,u=1/0,l;for(l=0;l<t._len;l++){var f=t._u[l],c=t._v[l],h=t._w[l],d=Math.sqrt(f*f+c*c+h*h);s=Math.max(s,d),u=Math.min(u,d)}for(mDt(e,t,{vals:[u,s],containerStr:"",cLetter:"c"}),l=0;l<n;l++){var p=i[l];r.xMax=Math.max(r.xMax,p),r.xMin=Math.min(r.xMin,p);var x=a[l];r.yMax=Math.max(r.yMax,x),r.yMin=Math.min(r.yMin,x);var b=o[l];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 yIe(e){var t=e._x,r=e._y,n=e._z,i=e._len,a,o,s,u=-1/0,l=1/0,f=-1/0,c=1/0,h=-1/0,d=1/0,p="",x,b,y,k,E,A,L,_,C;for(i&&(k=t[0],A=r[0],_=n[0]),i>1&&(E=t[i-1],L=r[i-1],C=n[i-1]),a=0;a<i;a++)u=Math.max(u,t[a]),l=Math.min(l,t[a]),f=Math.max(f,r[a]),c=Math.min(c,r[a]),h=Math.max(h,n[a]),d=Math.min(d,n[a]),!x&&t[a]!==k&&(x=!0,p+="x"),!b&&r[a]!==A&&(b=!0,p+="y"),!y&&n[a]!==_&&(y=!0,p+="z");x||(p+="x"),b||(p+="y"),y||(p+="z");var M=jZ(e._x),v=jZ(e._y),z=jZ(e._z);p=p.replace("x",(k>E?"-":"+")+"x"),p=p.replace("y",(A>L?"-":"+")+"y"),p=p.replace("z",(_>C?"-":"+")+"z");var T=function(){i=0,M=[],v=[],z=[]};(!i||i<M.length*v.length*z.length)&&T();var F=function(Oe){return Oe==="x"?t:Oe==="y"?r:n},q=function(Oe){return Oe==="x"?M:Oe==="y"?v:z},U=function(Oe){return Oe[i-1]<Oe[0]?-1:1},H=F(p[1]),j=F(p[3]),G=F(p[5]),O=q(p[1]).length,W=q(p[3]).length,re=q(p[5]).length,ne=!1,be=function(Oe,Re,me){return O*(W*Oe+Re)+me},ze=U(F(p[1])),Ce=U(F(p[3])),he=U(F(p[5]));for(a=0;a<re-1;a++){for(o=0;o<W-1;o++){for(s=0;s<O-1;s++){var te=be(a,o,s),ke=be(a,o,s+1),Ee=be(a,o+1,s),Me=be(a+1,o,s);if((!(H[te]*ze<H[ke]*ze)||!(j[te]*Ce<j[Ee]*Ce)||!(G[te]*he<G[Me]*he))&&(ne=!0),ne)break}if(ne)break}if(ne)break}return ne&&(ZZ.warn("Encountered arbitrary coordinates! Unable to input data grid."),T()),{xMin:l,yMin:c,zMin:d,xMax:u,yMax:f,zMax:h,Xs:M,Ys:v,Zs:z,len:i,fill:p}}function jZ(e){return ZZ.distinctVals(e).vals}function Gm(e,t){if(t===void 0&&(t=e.length),ZZ.isTypedArray(e))return e.subarray(0,t);for(var r=[],n=0;n<t;n++)r[n]=+e[n];return r}mIe.exports={calc:gDt,filter:Gm,processGrid:yIe}});var XZ=Se((s0r,gIe)=>{"use strict";var _Dt=Rp(),xDt=rF().processGrid,iF=rF().filter;gIe.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=iF(r.x,r._len),r._y=iF(r.y,r._len),r._z=iF(r.z,r._len),r._value=iF(r.value,r._len);var n=xDt(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,_Dt(t,r,{vals:[r._vMin,r._vMax],containerStr:"",cLetter:"c"})}});var GA=Se((l0r,_Ie)=>{"use strict";_Ie.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 nF=Se((u0r,TIe)=>{"use strict";var bDt=Od().gl_mesh3d,wDt=$g().parseColorScale,TDt=Zr().isArrayOrTypedArray,ADt=Jg(),SDt=fc().extractOpts,xIe=GA(),ZE=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 bIe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var YZ=bIe.prototype;YZ.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=ZE(r,this.data._Xs).id,u=ZE(n,this.data._Ys).id,l=ZE(i,this.data._Zs).id,f=e.index=l+o*u+o*a*s;e.traceCoordinate=[this.data._meshX[f],this.data._meshY[f],this.data._meshZ[f],this.data._value[f]];var c=this.data.hovertext||this.data.text;return TDt(c)&&c[f]!==void 0?e.textLabel=c[f]:c&&(e.textLabel=c),!0}};YZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=wIe(e);function n(u,l,f,c){return l.map(function(h){return u.d2l(h,0,c)*f})}var i=xIe(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=xIe(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:ADt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=SDt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=wDt(e),this.mesh.update(o)};YZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var MDt=["xyz","xzy","yxz","yzx","zxy","zyx"];function wIe(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,u,l,f=e._Xs,c=e._Ys,h=e._Zs,d=f.length,p=c.length,x=h.length,b=MDt.indexOf(e._gridFill.replace(/-/g,"").replace(/\+/g,"")),y=function(ut,ct,rt){switch(b){case 5:return rt+x*ct+x*p*ut;case 4:return rt+x*ut+x*d*ct;case 3:return ct+p*rt+p*x*ut;case 2:return ct+p*ut+p*d*rt;case 1:return ut+d*rt+d*x*ct;default:return ut+d*ct+d*p*rt}},k=e._minValues,E=e._maxValues,A=e._vMin,L=e._vMax,_,C,M,v;function z(ut,ct,rt){for(var je=v.length,tt=l;tt<je;tt++)if(ut===_[tt]&&ct===C[tt]&&rt===M[tt])return tt;return-1}function T(){l=u}function F(){_=[],C=[],M=[],v=[],u=0,T()}function q(ut,ct,rt,je){return _.push(ut),C.push(ct),M.push(rt),v.push(je),u++,u-1}function U(ut,ct,rt){return e._meshI.push(ut),e._meshJ.push(ct),e._meshK.push(rt),s++,s-1}function H(ut,ct,rt){for(var je=[],tt=0;tt<ut.length;tt++)je[tt]=(ut[tt]+ct[tt]+rt[tt])/3;return je}function j(ut,ct,rt){for(var je=[],tt=0;tt<ut.length;tt++)je[tt]=ut[tt]*(1-rt)+rt*ct[tt];return je}var G;function O(ut){G=ut}function W(ut,ct){var rt=ut[0],je=ut[1],tt=ut[2],Je=H(rt,je,tt),Mt=Math.sqrt(1-G),Vt=j(Je,rt,Mt),Kt=j(Je,je,Mt),ir=j(Je,tt,Mt),fr=ct[0],Ot=ct[1],De=ct[2];return{xyzv:[[rt,je,Kt],[Kt,Vt,rt],[je,tt,ir],[ir,Kt,je],[tt,rt,Vt],[Vt,ir,tt]],abc:[[fr,Ot,-1],[-1,-1,fr],[Ot,De,-1],[-1,-1,Ot],[De,fr,-1],[-1,-1,De]]}}function re(ut,ct){return ut==="all"||ut===null?!0:ut.indexOf(ct)>-1}function ne(ut,ct){return ut===null?ct:ut}function be(ut,ct,rt){T();var je=[ct],tt=[rt];if(G>=1)je=[ct],tt=[rt];else if(G>0){var Je=W(ct,rt);je=Je.xyzv,tt=Je.abc}for(var Mt=0;Mt<je.length;Mt++){ct=je[Mt],rt=tt[Mt];for(var Vt=[],Kt=0;Kt<3;Kt++){var ir=ct[Kt][0],fr=ct[Kt][1],Ot=ct[Kt][2],De=ct[Kt][3],_e=rt[Kt]>-1?rt[Kt]:z(ir,fr,Ot);_e>-1?Vt[Kt]=_e:Vt[Kt]=q(ir,fr,Ot,ne(ut,De))}U(Vt[0],Vt[1],Vt[2])}}function ze(ut,ct,rt){var je=function(tt,Je,Mt){be(ut,[ct[tt],ct[Je],ct[Mt]],[rt[tt],rt[Je],rt[Mt]])};je(0,1,2),je(2,3,0)}function Ce(ut,ct,rt){var je=function(tt,Je,Mt){be(ut,[ct[tt],ct[Je],ct[Mt]],[rt[tt],rt[Je],rt[Mt]])};je(0,1,2),je(3,0,1),je(2,3,0),je(1,2,3)}function he(ut,ct,rt,je){var tt=ut[3];tt<rt&&(tt=rt),tt>je&&(tt=je);for(var Je=(ut[3]-tt)/(ut[3]-ct[3]+1e-9),Mt=[],Vt=0;Vt<4;Vt++)Mt[Vt]=(1-Je)*ut[Vt]+Je*ct[Vt];return Mt}function te(ut,ct,rt){return ut>=ct&&ut<=rt}function ke(ut){var ct=.001*(L-A);return ut>=A-ct&&ut<=L+ct}function Ee(ut){for(var ct=[],rt=0;rt<4;rt++){var je=ut[rt];ct.push([e._x[je],e._y[je],e._z[je],e._value[je]])}return ct}var Me=3;function Oe(ut,ct,rt,je,tt,Je){Je||(Je=1),rt=[-1,-1,-1];var Mt=!1,Vt=[te(ct[0][3],je,tt),te(ct[1][3],je,tt),te(ct[2][3],je,tt)];if(!Vt[0]&&!Vt[1]&&!Vt[2])return!1;var Kt=function(fr,Ot,De){return ke(Ot[0][3])&&ke(Ot[1][3])&&ke(Ot[2][3])?(be(fr,Ot,De),!0):Je<Me?Oe(fr,Ot,De,A,L,++Je):!1};if(Vt[0]&&Vt[1]&&Vt[2])return Kt(ut,ct,rt)||Mt;var ir=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(fr){if(Vt[fr[0]]&&Vt[fr[1]]&&!Vt[fr[2]]){var Ot=ct[fr[0]],De=ct[fr[1]],_e=ct[fr[2]],Fe=he(_e,Ot,je,tt),Pe=he(_e,De,je,tt);Mt=Kt(ut,[Pe,Fe,Ot],[-1,-1,rt[fr[0]]])||Mt,Mt=Kt(ut,[Ot,De,Pe],[rt[fr[0]],rt[fr[1]],-1])||Mt,ir=!0}}),ir||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(fr){if(Vt[fr[0]]&&!Vt[fr[1]]&&!Vt[fr[2]]){var Ot=ct[fr[0]],De=ct[fr[1]],_e=ct[fr[2]],Fe=he(De,Ot,je,tt),Pe=he(_e,Ot,je,tt);Mt=Kt(ut,[Pe,Fe,Ot],[-1,-1,rt[fr[0]]])||Mt,ir=!0}}),Mt}function Re(ut,ct,rt,je){var tt=!1,Je=Ee(ct),Mt=[te(Je[0][3],rt,je),te(Je[1][3],rt,je),te(Je[2][3],rt,je),te(Je[3][3],rt,je)];if(!Mt[0]&&!Mt[1]&&!Mt[2]&&!Mt[3])return tt;if(Mt[0]&&Mt[1]&&Mt[2]&&Mt[3])return o&&(tt=Ce(ut,Je,ct)||tt),tt;var Vt=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(Kt){if(Mt[Kt[0]]&&Mt[Kt[1]]&&Mt[Kt[2]]&&!Mt[Kt[3]]){var ir=Je[Kt[0]],fr=Je[Kt[1]],Ot=Je[Kt[2]],De=Je[Kt[3]];if(o)tt=be(ut,[ir,fr,Ot],[ct[Kt[0]],ct[Kt[1]],ct[Kt[2]]])||tt;else{var _e=he(De,ir,rt,je),Fe=he(De,fr,rt,je),Pe=he(De,Ot,rt,je);tt=be(null,[_e,Fe,Pe],[-1,-1,-1])||tt}Vt=!0}}),Vt||([[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(Kt){if(Mt[Kt[0]]&&Mt[Kt[1]]&&!Mt[Kt[2]]&&!Mt[Kt[3]]){var ir=Je[Kt[0]],fr=Je[Kt[1]],Ot=Je[Kt[2]],De=Je[Kt[3]],_e=he(Ot,ir,rt,je),Fe=he(Ot,fr,rt,je),Pe=he(De,fr,rt,je),Ie=he(De,ir,rt,je);o?(tt=be(ut,[ir,Ie,_e],[ct[Kt[0]],-1,-1])||tt,tt=be(ut,[fr,Fe,Pe],[ct[Kt[1]],-1,-1])||tt):tt=ze(null,[_e,Fe,Pe,Ie],[-1,-1,-1,-1])||tt,Vt=!0}}),Vt)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(Kt){if(Mt[Kt[0]]&&!Mt[Kt[1]]&&!Mt[Kt[2]]&&!Mt[Kt[3]]){var ir=Je[Kt[0]],fr=Je[Kt[1]],Ot=Je[Kt[2]],De=Je[Kt[3]],_e=he(fr,ir,rt,je),Fe=he(Ot,ir,rt,je),Pe=he(De,ir,rt,je);o?(tt=be(ut,[ir,_e,Fe],[ct[Kt[0]],-1,-1])||tt,tt=be(ut,[ir,Fe,Pe],[ct[Kt[0]],-1,-1])||tt,tt=be(ut,[ir,Pe,_e],[ct[Kt[0]],-1,-1])||tt):tt=be(null,[_e,Fe,Pe],[-1,-1,-1])||tt,Vt=!0}}),tt}function me(ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr){var Ot=!1;return a&&(re(ut,"A")&&(Ot=Re(null,[ct,rt,je,Je],ir,fr)||Ot),re(ut,"B")&&(Ot=Re(null,[rt,je,tt,Kt],ir,fr)||Ot),re(ut,"C")&&(Ot=Re(null,[rt,Je,Mt,Kt],ir,fr)||Ot),re(ut,"D")&&(Ot=Re(null,[je,Je,Vt,Kt],ir,fr)||Ot),re(ut,"E")&&(Ot=Re(null,[rt,je,Je,Kt],ir,fr)||Ot)),o&&(Ot=Re(ut,[rt,je,Je,Kt],ir,fr)||Ot),Ot}function Be(ut,ct,rt,je,tt,Je,Mt,Vt){return[Vt[0]===!0?!0:Oe(ut,Ee([ct,rt,je]),[ct,rt,je],Je,Mt),Vt[1]===!0?!0:Oe(ut,Ee([je,tt,ct]),[je,tt,ct],Je,Mt)]}function fe(ut,ct,rt,je,tt,Je,Mt,Vt,Kt){return Vt?Be(ut,ct,rt,tt,je,Je,Mt,Kt):Be(ut,rt,tt,je,ct,Je,Mt,Kt)}function Ze(ut,ct,rt,je,tt,Je,Mt){var Vt=!1,Kt,ir,fr,Ot,De=function(){Vt=Oe(ut,[Kt,ir,fr],[-1,-1,-1],tt,Je)||Vt,Vt=Oe(ut,[fr,Ot,Kt],[-1,-1,-1],tt,Je)||Vt},_e=Mt[0],Fe=Mt[1],Pe=Mt[2];return _e&&(Kt=j(Ee([y(ct,rt-0,je-0)])[0],Ee([y(ct-1,rt-0,je-0)])[0],_e),ir=j(Ee([y(ct,rt-0,je-1)])[0],Ee([y(ct-1,rt-0,je-1)])[0],_e),fr=j(Ee([y(ct,rt-1,je-1)])[0],Ee([y(ct-1,rt-1,je-1)])[0],_e),Ot=j(Ee([y(ct,rt-1,je-0)])[0],Ee([y(ct-1,rt-1,je-0)])[0],_e),De()),Fe&&(Kt=j(Ee([y(ct-0,rt,je-0)])[0],Ee([y(ct-0,rt-1,je-0)])[0],Fe),ir=j(Ee([y(ct-0,rt,je-1)])[0],Ee([y(ct-0,rt-1,je-1)])[0],Fe),fr=j(Ee([y(ct-1,rt,je-1)])[0],Ee([y(ct-1,rt-1,je-1)])[0],Fe),Ot=j(Ee([y(ct-1,rt,je-0)])[0],Ee([y(ct-1,rt-1,je-0)])[0],Fe),De()),Pe&&(Kt=j(Ee([y(ct-0,rt-0,je)])[0],Ee([y(ct-0,rt-0,je-1)])[0],Pe),ir=j(Ee([y(ct-0,rt-1,je)])[0],Ee([y(ct-0,rt-1,je-1)])[0],Pe),fr=j(Ee([y(ct-1,rt-1,je)])[0],Ee([y(ct-1,rt-1,je-1)])[0],Pe),Ot=j(Ee([y(ct-1,rt-0,je)])[0],Ee([y(ct-1,rt-0,je-1)])[0],Pe),De()),Vt}function et(ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot){var De=ut;return Ot?(a&&ut==="even"&&(De=null),me(De,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr)):(a&&ut==="odd"&&(De=null),me(De,Kt,Vt,Mt,Je,tt,je,rt,ct,ir,fr))}function gt(ut,ct,rt,je,tt){for(var Je=[],Mt=0,Vt=0;Vt<ct.length;Vt++)for(var Kt=ct[Vt],ir=1;ir<x;ir++)for(var fr=1;fr<p;fr++)Je.push(fe(ut,y(Kt,fr-1,ir-1),y(Kt,fr-1,ir),y(Kt,fr,ir-1),y(Kt,fr,ir),rt,je,(Kt+fr+ir)%2,tt&&tt[Mt]?tt[Mt]:[])),Mt++;return Je}function Pt(ut,ct,rt,je,tt){for(var Je=[],Mt=0,Vt=0;Vt<ct.length;Vt++)for(var Kt=ct[Vt],ir=1;ir<d;ir++)for(var fr=1;fr<x;fr++)Je.push(fe(ut,y(ir-1,Kt,fr-1),y(ir,Kt,fr-1),y(ir-1,Kt,fr),y(ir,Kt,fr),rt,je,(ir+Kt+fr)%2,tt&&tt[Mt]?tt[Mt]:[])),Mt++;return Je}function Qe(ut,ct,rt,je,tt){for(var Je=[],Mt=0,Vt=0;Vt<ct.length;Vt++)for(var Kt=ct[Vt],ir=1;ir<p;ir++)for(var fr=1;fr<d;fr++)Je.push(fe(ut,y(fr-1,ir-1,Kt),y(fr-1,ir,Kt),y(fr,ir-1,Kt),y(fr,ir,Kt),rt,je,(fr+ir+Kt)%2,tt&&tt[Mt]?tt[Mt]:[])),Mt++;return Je}function Xe(ut,ct,rt){for(var je=1;je<x;je++)for(var tt=1;tt<p;tt++)for(var Je=1;Je<d;Je++)et(ut,y(Je-1,tt-1,je-1),y(Je-1,tt-1,je),y(Je-1,tt,je-1),y(Je-1,tt,je),y(Je,tt-1,je-1),y(Je,tt-1,je),y(Je,tt,je-1),y(Je,tt,je),ct,rt,(Je+tt+je)%2)}function Tt(ut,ct,rt){o=!0,Xe(ut,ct,rt),o=!1}function xt(ut,ct,rt){a=!0,Xe(ut,ct,rt),a=!1}function _t(ut,ct,rt,je,tt,Je){for(var Mt=[],Vt=0,Kt=0;Kt<ct.length;Kt++)for(var ir=ct[Kt],fr=1;fr<x;fr++)for(var Ot=1;Ot<p;Ot++)Mt.push(Ze(ut,ir,Ot,fr,rt,je,tt[Kt],Je&&Je[Vt]?Je[Vt]:[])),Vt++;return Mt}function Ct(ut,ct,rt,je,tt,Je){for(var Mt=[],Vt=0,Kt=0;Kt<ct.length;Kt++)for(var ir=ct[Kt],fr=1;fr<d;fr++)for(var Ot=1;Ot<x;Ot++)Mt.push(Ze(ut,fr,ir,Ot,rt,je,tt[Kt],Je&&Je[Vt]?Je[Vt]:[])),Vt++;return Mt}function jt(ut,ct,rt,je,tt,Je){for(var Mt=[],Vt=0,Kt=0;Kt<ct.length;Kt++)for(var ir=ct[Kt],fr=1;fr<p;fr++)for(var Ot=1;Ot<d;Ot++)Mt.push(Ze(ut,Ot,fr,ir,rt,je,tt[Kt],Je&&Je[Vt]?Je[Vt]:[])),Vt++;return Mt}function At(ut,ct){for(var rt=[],je=ut;je<ct;je++)rt.push(je);return rt}function Te(){for(var ut=0;ut<d;ut++)for(var ct=0;ct<p;ct++)for(var rt=0;rt<x;rt++){var je=y(ut,ct,rt);q(e._x[je],e._y[je],e._z[je],e._value[je])}}function nt(){F(),Te();var ut=null;if(r&&i&&(O(i),Tt(ut,A,L)),t&&n){O(n);for(var ct=e.surface.pattern,rt=e.surface.count,je=0;je<rt;je++){var tt=rt===1?.5:je/(rt-1),Je=(1-tt)*A+tt*L,Mt=Math.abs(Je-k),Vt=Math.abs(Je-E),Kt=Mt>Vt?[k,Je]:[Je,E];xt(ct,Kt[0],Kt[1])}}var ir=[[Math.min(A,E),Math.max(A,E)],[Math.min(k,L),Math.max(k,L)]];["x","y","z"].forEach(function(fr){for(var Ot=[],De=0;De<ir.length;De++){var _e=0,Fe=ir[De][0],Pe=ir[De][1],Ie=e.slices[fr];if(Ie.show&&Ie.fill){O(Ie.fill);var lt=[],ye=[],ue=[];if(Ie.locations.length)for(var de=0;de<Ie.locations.length;de++){var ht=ZE(Ie.locations[de],fr==="x"?f:fr==="y"?c:h);ht.distRatio===0?lt.push(ht.id):ht.id>0&&(ye.push(ht.id),fr==="x"?ue.push([ht.distRatio,0,0]):fr==="y"?ue.push([0,ht.distRatio,0]):ue.push([0,0,ht.distRatio]))}else fr==="x"?lt=At(1,d-1):fr==="y"?lt=At(1,p-1):lt=At(1,x-1);ye.length>0&&(fr==="x"?Ot[_e]=_t(ut,ye,Fe,Pe,ue,Ot[_e]):fr==="y"?Ot[_e]=Ct(ut,ye,Fe,Pe,ue,Ot[_e]):Ot[_e]=jt(ut,ye,Fe,Pe,ue,Ot[_e]),_e++),lt.length>0&&(fr==="x"?Ot[_e]=gt(ut,lt,Fe,Pe,Ot[_e]):fr==="y"?Ot[_e]=Pt(ut,lt,Fe,Pe,Ot[_e]):Ot[_e]=Qe(ut,lt,Fe,Pe,Ot[_e]),_e++)}var Et=e.caps[fr];Et.show&&Et.fill&&(O(Et.fill),fr==="x"?Ot[_e]=gt(ut,[0,d-1],Fe,Pe,Ot[_e]):fr==="y"?Ot[_e]=Pt(ut,[0,p-1],Fe,Pe,Ot[_e]):Ot[_e]=Qe(ut,[0,x-1],Fe,Pe,Ot[_e]),_e++)}}),s===0&&F(),e._meshX=_,e._meshY=C,e._meshZ=M,e._meshIntensity=v,e._Xs=f,e._Ys=c,e._Zs=h}return nt(),e}function EDt(e,t){var r=e.glplot.gl,n=bDt({gl:r}),i=new bIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}TIe.exports={findNearestOnAxis:ZE,generateIsoMeshes:wIe,createIsosurfaceTrace:EDt}});var SIe=Se((f0r,AIe)=>{"use strict";AIe.exports={attributes:tF(),supplyDefaults:WZ().supplyDefaults,calc:XZ(),colorbar:{min:"cmin",max:"cmax"},plot:nF().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var EIe=Se((c0r,MIe)=>{"use strict";MIe.exports=SIe()});var JZ=Se((h0r,CIe)=>{"use strict";var kDt=Xf(),Nh=tF(),CDt=GE(),kIe=zf(),KZ=vu().extendFlat,LDt=_c().overrideAll,aF=CIe.exports=LDt(KZ({x:Nh.x,y:Nh.y,z:Nh.z,value:Nh.value,isomin:Nh.isomin,isomax:Nh.isomax,surface:Nh.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Nh.slices,caps:Nh.caps,text:Nh.text,hovertext:Nh.hovertext,xhoverformat:Nh.xhoverformat,yhoverformat:Nh.yhoverformat,zhoverformat:Nh.zhoverformat,valuehoverformat:Nh.valuehoverformat,hovertemplate:Nh.hovertemplate},kDt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Nh.colorbar,opacity:Nh.opacity,opacityscale:CDt.opacityscale,lightposition:Nh.lightposition,lighting:Nh.lighting,flatshading:Nh.flatshading,contour:Nh.contour,hoverinfo:KZ({},kIe.hoverinfo),showlegend:KZ({},kIe.showlegend,{dflt:!1})}),"calc","nested");aF.x.editType=aF.y.editType=aF.z.editType=aF.value.editType="calc+clearAxisTypes"});var zIe=Se((d0r,LIe)=>{"use strict";var zDt=Zr(),PDt=JZ(),IDt=WZ().supplyIsoDefaults,DDt=OZ().opacityscaleDefaults;LIe.exports=function(t,r,n,i){function a(o,s){return zDt.coerce(t,r,PDt,o,s)}IDt(t,r,n,i,a),DDt(t,r,i,a)}});var RIe=Se((p0r,DIe)=>{"use strict";var RDt=Od().gl_mesh3d,FDt=$g().parseColorScale,qDt=Zr().isArrayOrTypedArray,BDt=Jg(),ODt=fc().extractOpts,PIe=GA(),$Z=nF().findNearestOnAxis,NDt=nF().generateIsoMeshes;function IIe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var QZ=IIe.prototype;QZ.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=$Z(r,this.data._Xs).id,u=$Z(n,this.data._Ys).id,l=$Z(i,this.data._Zs).id,f=e.index=l+o*u+o*a*s;e.traceCoordinate=[this.data._meshX[f],this.data._meshY[f],this.data._meshZ[f],this.data._value[f]];var c=this.data.hovertext||this.data.text;return qDt(c)&&c[f]!==void 0?e.textLabel=c[f]:c&&(e.textLabel=c),!0}};QZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=NDt(e);function n(u,l,f,c){return l.map(function(h){return u.d2l(h,0,c)*f})}var i=PIe(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=PIe(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:BDt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=ODt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=FDt(e),this.mesh.update(o)};QZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function UDt(e,t){var r=e.glplot.gl,n=RDt({gl:r}),i=new IIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}DIe.exports=UDt});var qIe=Se((v0r,FIe)=>{"use strict";FIe.exports={attributes:JZ(),supplyDefaults:zIe(),calc:XZ(),colorbar:{min:"cmin",max:"cmax"},plot:RIe(),moduleType:"trace",name:"volume",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var OIe=Se((y0r,BIe)=>{"use strict";BIe.exports=qIe()});var VIe=Se((m0r,UIe)=>{"use strict";var VDt=Ul(),NIe=Zr(),HDt=ed(),GDt=VA();UIe.exports=function(t,r,n,i){function a(f,c){return NIe.coerce(t,r,GDt,f,c)}function o(f){var c=f.map(function(h){var d=a(h);return d&&NIe.isArrayOrTypedArray(d)?d:null});return c.every(function(h){return h&&h.length===c[0].length})&&c}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 u=VDt.getComponentMethod("calendars","handleTraceDefaults");u(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(f){a(f)});var l=a("contour.show");l&&(a("contour.color"),a("contour.width")),"intensity"in t?(a("intensity"),a("intensitymode"),HDt(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("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var GIe=Se((g0r,HIe)=>{"use strict";var WDt=Rp();HIe.exports=function(t,r){r.intensity&&WDt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var YIe=Se((_0r,XIe)=>{"use strict";var jDt=Od().gl_mesh3d,ZDt=Od().delaunay_triangulate,XDt=Od().alpha_shape,YDt=Od().convex_hull,KDt=$g().parseColorScale,JDt=Zr().isArrayOrTypedArray,iX=Jg(),$Dt=fc().extractOpts,WIe=GA();function ZIe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var nX=ZIe.prototype;nX.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 JDt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function jIe(e){for(var t=[],r=e.length,n=0;n<r;n++)t[n]=iX(e[n]);return t}function eX(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 tX(e){for(var t=[],r=e.length,n=0;n<r;n++)t[n]=Math.round(e[n]);return t}function QDt(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 ZDt(n)}function rX(e,t){for(var r=e.length,n=0;n<r;n++)if(e[n]<=-.5||e[n]>=t-.5)return!1;return!0}nX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=WIe(eX(r.xaxis,e.x,t.dataScale[0],e.xcalendar),eX(r.yaxis,e.y,t.dataScale[1],e.ycalendar),eX(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||!rX(e.i,n)||!rX(e.j,n)||!rX(e.k,n))return;a=WIe(tX(e.i),tX(e.j),tX(e.k))}else e.alphahull===0?a=YDt(i):e.alphahull>0?a=XDt(e.alphahull,i):a=QDt(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:iX(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=$Dt(e);this.color="#fff";var u=e.intensitymode;o[u+"Intensity"]=e.intensity,o[u+"IntensityBounds"]=[s.min,s.max],o.colormap=KDt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=jIe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=jIe(e.facecolor)):(this.color=e.color,o.meshColor=iX(e.color));this.mesh.update(o)};nX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function e6t(e,t){var r=e.glplot.gl,n=jDt({gl:r}),i=new ZIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}XIe.exports=e6t});var JIe=Se((x0r,KIe)=>{"use strict";KIe.exports={attributes:VA(),supplyDefaults:VIe(),calc:GIe(),colorbar:{min:"cmin",max:"cmax"},plot:YIe(),moduleType:"trace",name:"mesh3d",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var QIe=Se((b0r,$Ie)=>{"use strict";$Ie.exports=JIe()});var oX=Se((w0r,tDe)=>{"use strict";var t6t=Xf(),WA=Gc().axisHoverFormat,r6t=Du().hovertemplateAttrs,i6t=VA(),eDe=zf(),aX=vu().extendFlat,oF={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:r6t({editType:"calc"},{keys:["norm"]}),uhoverformat:WA("u",1),vhoverformat:WA("v",1),whoverformat:WA("w",1),xhoverformat:WA("x"),yhoverformat:WA("y"),zhoverformat:WA("z"),showlegend:aX({},eDe.showlegend,{dflt:!1})};aX(oF,t6t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n6t=["opacity","lightposition","lighting"];n6t.forEach(function(e){oF[e]=i6t[e]});oF.hoverinfo=aX({},eDe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});tDe.exports=oF});var iDe=Se((T0r,rDe)=>{"use strict";var a6t=Zr(),o6t=ed(),s6t=oX();rDe.exports=function(t,r,n,i){function a(d,p){return a6t.coerce(t,r,s6t,d,p)}var o=a("u"),s=a("v"),u=a("w"),l=a("x"),f=a("y"),c=a("z");if(!o||!o.length||!s||!s.length||!u||!u.length||!l||!l.length||!f||!f.length||!c||!c.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"),o6t(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var aDe=Se((A0r,nDe)=>{"use strict";var l6t=Rp();nDe.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,u=1/0,l=0;l<o;l++){var f=n[l],c=i[l],h=a[l],d=Math.sqrt(f*f+c*c+h*h);s=Math.max(s,d),u=Math.min(u,d)}r._len=o,r._normMax=s,l6t(t,r,{vals:[u,s],containerStr:"",cLetter:"c"})}});var fDe=Se((S0r,uDe)=>{"use strict";var u6t=Od().gl_cone3d,f6t=Od().gl_cone3d.createConeMesh,c6t=Zr().simpleMap,h6t=$g().parseColorScale,d6t=fc().extractOpts,p6t=Zr().isArrayOrTypedArray,oDe=GA();function sDe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var sX=sDe.prototype;sX.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 u=this.data.hovertext||this.data.text;return p6t(u)&&u[t]!==void 0?e.textLabel=u[t]:u&&(e.textLabel=u),!0}};var v6t={xaxis:0,yaxis:1,zaxis:2},y6t={tip:1,tail:0,cm:.25,center:.5},m6t={tip:1,tail:1,cm:.75,center:.5};function lDe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(f,c){var h=r[c],d=n[v6t[c]];return c6t(f,function(p){return h.d2l(p)*d})}i.vectors=oDe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),i.positions=oDe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=d6t(t);i.colormap=h6t(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=y6t[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 u=u6t(i),l=t.lightposition;return u.lightPosition=[l.x,l.y,l.z],u.ambient=t.lighting.ambient,u.diffuse=t.lighting.diffuse,u.specular=t.lighting.specular,u.roughness=t.lighting.roughness,u.fresnel=t.lighting.fresnel,u.opacity=t.opacity,t._pad=m6t[t.anchor]*u.vectorScale*u.coneScale*t._normMax,u}sX.update=function(e){this.data=e;var t=lDe(this.scene,e);this.mesh.update(t)};sX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g6t(e,t){var r=e.glplot.gl,n=lDe(e,t),i=f6t(r,n),a=new sDe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}uDe.exports=g6t});var hDe=Se((M0r,cDe)=>{"use strict";cDe.exports={moduleType:"trace",name:"cone",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:oX(),supplyDefaults:iDe(),colorbar:{min:"cmin",max:"cmax"},calc:aDe(),plot:fDe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var pDe=Se((E0r,dDe)=>{"use strict";dDe.exports=hDe()});var uX=Se((k0r,yDe)=>{"use strict";var _6t=Xf(),jA=Gc().axisHoverFormat,x6t=Du().hovertemplateAttrs,b6t=VA(),vDe=zf(),lX=vu().extendFlat,sF={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:x6t({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:jA("u",1),vhoverformat:jA("v",1),whoverformat:jA("w",1),xhoverformat:jA("x"),yhoverformat:jA("y"),zhoverformat:jA("z"),showlegend:lX({},vDe.showlegend,{dflt:!1})};lX(sF,_6t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var w6t=["opacity","lightposition","lighting"];w6t.forEach(function(e){sF[e]=b6t[e]});sF.hoverinfo=lX({},vDe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});yDe.exports=sF});var gDe=Se((C0r,mDe)=>{"use strict";var T6t=Zr(),A6t=ed(),S6t=uX();mDe.exports=function(t,r,n,i){function a(h,d){return T6t.coerce(t,r,S6t,h,d)}var o=a("u"),s=a("v"),u=a("w"),l=a("x"),f=a("y"),c=a("z");if(!o||!o.length||!s||!s.length||!u||!u.length||!l||!l.length||!f||!f.length||!c||!c.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"),A6t(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var MDe=Se((L0r,SDe)=>{"use strict";var bDe=Od().gl_streamtube3d,M6t=bDe.createTubeMesh,E6t=Zr(),k6t=$g().parseColorScale,C6t=fc().extractOpts,_De=GA(),wDe={xaxis:0,yaxis:1,zaxis:2};function TDe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var cX=TDe.prototype;cX.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var u=t[s],l=r[wDe[s]];return u.l2c(o)/l}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 xDe(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 fX(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function ADe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(F,q){var U=r[q],H=n[wDe[q]];return E6t.simpleMap(F,function(j){return U.d2l(j)*H})}if(a.vectors=_De(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),i),!i)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),u=o(t._Ys,"yaxis"),l=o(t._Zs,"zaxis");a.meshgrid=[s,u,l],a.gridFill=t._gridFill;var f=t._slen;if(f)a.startingPositions=_De(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var c=u[0],h=xDe(s),d=xDe(l),p=new Array(h.length*d.length),x=0,b=0;b<h.length;b++)for(var y=0;y<d.length;y++)p[x++]=[h[b],c,d[y]];a.startingPositions=p}a.colormap=k6t(t),a.tubeSize=t.sizeref,a.maxLength=t.maxdisplayed;var k=o(t._xbnds,"xaxis"),E=o(t._ybnds,"yaxis"),A=o(t._zbnds,"zaxis"),L=fX(s),_=fX(u),C=fX(l),M=[[k[0]-L[0],E[0]-_[0],A[0]-C[0]],[k[1]+L[1],E[1]+_[1],A[1]+C[1]]],v=bDe(a,M),z=C6t(t);v.vertexIntensityBounds=[z.min/t._normMax,z.max/t._normMax];var T=t.lightposition;return v.lightPosition=[T.x,T.y,T.z],v.ambient=t.lighting.ambient,v.diffuse=t.lighting.diffuse,v.specular=t.lighting.specular,v.roughness=t.lighting.roughness,v.fresnel=t.lighting.fresnel,v.opacity=t.opacity,t._pad=v.tubeScale*t.sizeref*2,v}cX.update=function(e){this.data=e;var t=ADe(this.scene,e);this.mesh.update(t)};cX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function L6t(e,t){var r=e.glplot.gl,n=ADe(e,t),i=M6t(r,n),a=new TDe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}SDe.exports=L6t});var kDe=Se((z0r,EDe)=>{"use strict";EDe.exports={moduleType:"trace",name:"streamtube",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:uX(),supplyDefaults:gDe(),colorbar:{min:"cmin",max:"cmax"},calc:rF().calc,plot:MDe(),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 LDe=Se((P0r,CDe)=>{"use strict";CDe.exports=kDe()});var H2=Se((I0r,IDe)=>{"use strict";var z6t=Du().hovertemplateAttrs,P6t=Du().texttemplateAttrs,I6t=Ey(),Wm=Zc(),D6t=zf(),zDe=Xf(),R6t=Id().dash,V2=vu().extendFlat,F6t=_c().overrideAll,ey=Wm.marker,PDe=Wm.line,q6t=ey.line;IDe.exports=F6t({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:V2({},Wm.mode,{dflt:"markers"}),text:V2({},Wm.text,{}),texttemplate:P6t({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:V2({},Wm.hovertext,{}),textfont:Wm.textfont,textposition:Wm.textposition,line:{color:PDe.color,width:PDe.width,dash:R6t},connectgaps:Wm.connectgaps,marker:V2({symbol:ey.symbol,opacity:ey.opacity,angle:ey.angle,angleref:V2({},ey.angleref,{values:["previous","up","north"]}),standoff:ey.standoff,size:ey.size,sizeref:ey.sizeref,sizemin:ey.sizemin,sizemode:ey.sizemode,colorbar:ey.colorbar,line:V2({width:q6t.width},zDe("marker.line")),gradient:ey.gradient},zDe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:I6t(),selected:Wm.selected,unselected:Wm.unselected,hoverinfo:V2({},D6t.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:z6t()},"calc","nested")});var RDe=Se((D0r,DDe)=>{"use strict";var hX=Zr(),dX=ec(),B6t=$v(),O6t=I0(),N6t=D0(),U6t=Py(),V6t=H2();DDe.exports=function(t,r,n,i){function a(d,p){return hX.coerce(t,r,V6t,d,p)}var o=a("locations"),s;if(o&&o.length){var u=a("geojson"),l;(typeof u=="string"&&u!==""||hX.isPlainObject(u))&&(l="geojson-id");var f=a("locationmode",l);f==="geojson-id"&&a("featureidkey"),s=o.length}else{var c=a("lon")||[],h=a("lat")||[];s=Math.min(c.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("mode"),dX.hasMarkers(r)&&B6t(t,r,n,i,a,{gradient:!0}),dX.hasLines(r)&&(O6t(t,r,n,i,a),a("connectgaps")),dX.hasText(r)&&(a("texttemplate"),N6t(t,r,i,a)),a("fill"),r.fill!=="none"&&U6t(t,r,n,a),hX.coerceSelectionMarkerOpacity(r,a)}});var BDe=Se((R0r,qDe)=>{"use strict";var FDe=hu();qDe.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=FDe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=FDe.tickText(o,o.c2l(s[1]),!0).text,i}});var lF=Se((F0r,VDe)=>{"use strict";var pX=_u(),ODe=ju().BADNUM,H6t=R0(),G6t=km(),W6t=F0(),j6t=Zr().isArrayOrTypedArray,NDe=Zr()._;function UDe(e){return e&&typeof e=="string"}VDe.exports=function(t,r){var n=j6t(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return UDe(h)||pX(h)}:o=UDe;for(var s=0;s<i;s++){var u=a[s]={};if(n){var l=r.locations[s];u.loc=o(l)?l:null}else{var f=r.lon[s],c=r.lat[s];pX(f)&&pX(c)?u.lonlat=[+f,+c]:u.lonlat=[ODe,ODe]}}return G6t(a,r),H6t(t,r),W6t(a,r),i&&(a[0].t={labels:{lat:NDe(t,"lat:")+" ",lon:NDe(t,"lon:")+" "}}),a}});var XE=Se(Sp=>{"use strict";Sp.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"};Sp.axesNames=["lonaxis","lataxis"];Sp.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Sp.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Sp.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]}};Sp.clipPad=.001;Sp.precision=.1;Sp.landColor="#F0DC82";Sp.waterColor="#3399FF";Sp.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Sp.sphereSVG={type:"Sphere"};Sp.fillLayers={ocean:1,land:1,lakes:1};Sp.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Sp.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Sp.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Sp.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var vX=Se((uF,HDe)=>{(function(e,t){typeof uF=="object"&&typeof HDe!="undefined"?t(uF):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.topojson=e.topojson||{}))})(uF,function(e){"use strict";function t(E){return E}function r(E){if(E==null)return t;var A,L,_=E.scale[0],C=E.scale[1],M=E.translate[0],v=E.translate[1];return function(z,T){T||(A=L=0);var F=2,q=z.length,U=new Array(q);for(U[0]=(A+=z[0])*_+M,U[1]=(L+=z[1])*C+v;F<q;)U[F]=z[F],++F;return U}}function n(E){var A=r(E.transform),L,_=1/0,C=_,M=-_,v=-_;function z(F){F=A(F),F[0]<_&&(_=F[0]),F[0]>M&&(M=F[0]),F[1]<C&&(C=F[1]),F[1]>v&&(v=F[1])}function T(F){switch(F.type){case"GeometryCollection":F.geometries.forEach(T);break;case"Point":z(F.coordinates);break;case"MultiPoint":F.coordinates.forEach(z);break}}E.arcs.forEach(function(F){for(var q=-1,U=F.length,H;++q<U;)H=A(F[q],q),H[0]<_&&(_=H[0]),H[0]>M&&(M=H[0]),H[1]<C&&(C=H[1]),H[1]>v&&(v=H[1])});for(L in E.objects)T(E.objects[L]);return[_,C,M,v]}function i(E,A){for(var L,_=E.length,C=_-A;C<--_;)L=E[C],E[C++]=E[_],E[_]=L}function a(E,A){return typeof A=="string"&&(A=E.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(L){return o(E,L)})}:o(E,A)}function o(E,A){var L=A.id,_=A.bbox,C=A.properties==null?{}:A.properties,M=s(E,A);return L==null&&_==null?{type:"Feature",properties:C,geometry:M}:_==null?{type:"Feature",id:L,properties:C,geometry:M}:{type:"Feature",id:L,bbox:_,properties:C,geometry:M}}function s(E,A){var L=r(E.transform),_=E.arcs;function C(q,U){U.length&&U.pop();for(var H=_[q<0?~q:q],j=0,G=H.length;j<G;++j)U.push(L(H[j],j));q<0&&i(U,G)}function M(q){return L(q)}function v(q){for(var U=[],H=0,j=q.length;H<j;++H)C(q[H],U);return U.length<2&&U.push(U[0]),U}function z(q){for(var U=v(q);U.length<4;)U.push(U[0]);return U}function T(q){return q.map(z)}function F(q){var U=q.type,H;switch(U){case"GeometryCollection":return{type:U,geometries:q.geometries.map(F)};case"Point":H=M(q.coordinates);break;case"MultiPoint":H=q.coordinates.map(M);break;case"LineString":H=v(q.arcs);break;case"MultiLineString":H=q.arcs.map(v);break;case"Polygon":H=T(q.arcs);break;case"MultiPolygon":H=q.arcs.map(T);break;default:return null}return{type:U,coordinates:H}}return F(A)}function u(E,A){var L={},_={},C={},M=[],v=-1;A.forEach(function(F,q){var U=E.arcs[F<0?~F:F],H;U.length<3&&!U[1][0]&&!U[1][1]&&(H=A[++v],A[v]=F,A[q]=H)}),A.forEach(function(F){var q=z(F),U=q[0],H=q[1],j,G;if(j=C[U])if(delete C[j.end],j.push(F),j.end=H,G=_[H]){delete _[G.start];var O=G===j?j:j.concat(G);_[O.start=j.start]=C[O.end=G.end]=O}else _[j.start]=C[j.end]=j;else if(j=_[H])if(delete _[j.start],j.unshift(F),j.start=U,G=C[U]){delete C[G.end];var W=G===j?j:G.concat(j);_[W.start=G.start]=C[W.end=j.end]=W}else _[j.start]=C[j.end]=j;else j=[F],_[j.start=U]=C[j.end=H]=j});function z(F){var q=E.arcs[F<0?~F:F],U=q[0],H;return E.transform?(H=[0,0],q.forEach(function(j){H[0]+=j[0],H[1]+=j[1]})):H=q[q.length-1],F<0?[H,U]:[U,H]}function T(F,q){for(var U in F){var H=F[U];delete q[H.start],delete H.start,delete H.end,H.forEach(function(j){L[j<0?~j:j]=1}),M.push(H)}}return T(C,_),T(_,C),A.forEach(function(F){L[F<0?~F:F]||M.push([F])}),M}function l(E){return s(E,f.apply(this,arguments))}function f(E,A,L){var _,C,M;if(arguments.length>1)_=c(E,A,L);else for(C=0,_=new Array(M=E.arcs.length);C<M;++C)_[C]=C;return{type:"MultiLineString",arcs:u(E,_)}}function c(E,A,L){var _=[],C=[],M;function v(U){var H=U<0?~U:U;(C[H]||(C[H]=[])).push({i:U,g:M})}function z(U){U.forEach(v)}function T(U){U.forEach(z)}function F(U){U.forEach(T)}function q(U){switch(M=U,U.type){case"GeometryCollection":U.geometries.forEach(q);break;case"LineString":z(U.arcs);break;case"MultiLineString":case"Polygon":T(U.arcs);break;case"MultiPolygon":F(U.arcs);break}}return q(A),C.forEach(L==null?function(U){_.push(U[0].i)}:function(U){L(U[0].g,U[U.length-1].g)&&_.push(U[0].i)}),_}function h(E){for(var A=-1,L=E.length,_,C=E[L-1],M=0;++A<L;)_=C,C=E[A],M+=_[0]*C[1]-_[1]*C[0];return Math.abs(M)}function d(E){return s(E,p.apply(this,arguments))}function p(E,A){var L={},_=[],C=[];A.forEach(M);function M(T){switch(T.type){case"GeometryCollection":T.geometries.forEach(M);break;case"Polygon":v(T.arcs);break;case"MultiPolygon":T.arcs.forEach(v);break}}function v(T){T.forEach(function(F){F.forEach(function(q){(L[q=q<0?~q:q]||(L[q]=[])).push(T)})}),_.push(T)}function z(T){return h(s(E,{type:"Polygon",arcs:[T]}).coordinates[0])}return _.forEach(function(T){if(!T._){var F=[],q=[T];for(T._=1,C.push(F);T=q.pop();)F.push(T),T.forEach(function(U){U.forEach(function(H){L[H<0?~H:H].forEach(function(j){j._||(j._=1,q.push(j))})})})}}),_.forEach(function(T){delete T._}),{type:"MultiPolygon",arcs:C.map(function(T){var F=[],q;if(T.forEach(function(O){O.forEach(function(W){W.forEach(function(re){L[re<0?~re:re].length<2&&F.push(re)})})}),F=u(E,F),(q=F.length)>1)for(var U=1,H=z(F[0]),j,G;U<q;++U)(j=z(F[U]))>H&&(G=F[0],F[0]=F[U],F[U]=G,H=j);return F}).filter(function(T){return T.length>0})}}function x(E,A){for(var L=0,_=E.length;L<_;){var C=L+_>>>1;E[C]<A?L=C+1:_=C}return L}function b(E){var A={},L=E.map(function(){return[]});function _(O,W){O.forEach(function(re){re<0&&(re=~re);var ne=A[re];ne?ne.push(W):A[re]=[W]})}function C(O,W){O.forEach(function(re){_(re,W)})}function M(O,W){O.type==="GeometryCollection"?O.geometries.forEach(function(re){M(re,W)}):O.type in v&&v[O.type](O.arcs,W)}var v={LineString:_,MultiLineString:C,Polygon:C,MultiPolygon:function(O,W){O.forEach(function(re){C(re,W)})}};E.forEach(M);for(var z in A)for(var T=A[z],F=T.length,q=0;q<F;++q)for(var U=q+1;U<F;++U){var H=T[q],j=T[U],G;(G=L[H])[z=x(G,j)]!==j&&G.splice(z,0,j),(G=L[j])[z=x(G,H)]!==H&&G.splice(z,0,H)}return L}function y(E){if(E==null)return t;var A,L,_=E.scale[0],C=E.scale[1],M=E.translate[0],v=E.translate[1];return function(z,T){T||(A=L=0);var F=2,q=z.length,U=new Array(q),H=Math.round((z[0]-M)/_),j=Math.round((z[1]-v)/C);for(U[0]=H-A,A=H,U[1]=j-L,L=j;F<q;)U[F]=z[F],++F;return U}}function k(E,A){if(E.transform)throw new Error("already quantized");if(!A||!A.scale){if(!((v=Math.floor(A))>=2))throw new Error("n must be \u22652");T=E.bbox||n(E);var L=T[0],_=T[1],C=T[2],M=T[3],v;A={scale:[C-L?(C-L)/(v-1):1,M-_?(M-_)/(v-1):1],translate:[L,_]}}else T=E.bbox;var z=y(A),T,F,q=E.objects,U={};function H(O){return z(O)}function j(O){var W;switch(O.type){case"GeometryCollection":W={type:"GeometryCollection",geometries:O.geometries.map(j)};break;case"Point":W={type:"Point",coordinates:H(O.coordinates)};break;case"MultiPoint":W={type:"MultiPoint",coordinates:O.coordinates.map(H)};break;default:return O}return O.id!=null&&(W.id=O.id),O.bbox!=null&&(W.bbox=O.bbox),O.properties!=null&&(W.properties=O.properties),W}function G(O){var W=0,re=1,ne=O.length,be,ze=new Array(ne);for(ze[0]=z(O[0],0);++W<ne;)((be=z(O[W],W))[0]||be[1])&&(ze[re++]=be);return re===1&&(ze[re++]=[0,0]),ze.length=re,ze}for(F in q)U[F]=j(q[F]);return{type:"Topology",bbox:T,transform:A,objects:U,arcs:E.arcs.map(G)}}e.bbox=n,e.feature=a,e.merge=d,e.mergeArcs=p,e.mesh=l,e.meshArcs=f,e.neighbors=b,e.quantize=k,e.transform=r,e.untransform=y,Object.defineProperty(e,"__esModule",{value:!0})})});var fF=Se((B0r,GDe)=>{"use strict";var yX=GDe.exports={},Z6t=XE().locationmodeToLayer,X6t=vX().feature;yX.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};yX.getTopojsonPath=function(e,t){return e+t+".json"};yX.getTopojsonFeatures=function(e,t){var r=Z6t[e.locationmode],n=t.objects[r];return X6t(t,n).features}});var tx=Se(YE=>{"use strict";var Y6t=ju().BADNUM;YE.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]!==Y6t?i.push(s):!r&&i.length>0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n};YE.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};YE.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}};YE.makeBlank=function(){return{type:"Point",coordinates:[]}}});var jDe=Se((N0r,WDe)=>{WDe.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 dF=Se(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var qv=63710088e-1,gX={centimeters:qv*100,centimetres:qv*100,degrees:360/(2*Math.PI),feet:qv*3.28084,inches:qv*39.37,kilometers:qv/1e3,kilometres:qv/1e3,meters:qv,metres:qv,miles:qv/1609.344,millimeters:qv*1e3,millimetres:qv*1e3,nauticalmiles:qv/1852,radians:1,yards:qv*1.0936},mX={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 rx(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 K6t(e,t,r={}){switch(e){case"Point":return _X(t).geometry;case"LineString":return bX(t).geometry;case"Polygon":return xX(t).geometry;case"MultiPoint":return XDe(t).geometry;case"MultiLineString":return ZDe(t).geometry;case"MultiPolygon":return YDe(t).geometry;default:throw new Error(e+" is invalid")}}function _X(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(!cF(e[0])||!cF(e[1]))throw new Error("coordinates must contain numbers");return rx({type:"Point",coordinates:e},t,r)}function J6t(e,t,r={}){return hF(e.map(n=>_X(n,t)),r)}function xX(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 rx({type:"Polygon",coordinates:e},t,r)}function $6t(e,t,r={}){return hF(e.map(n=>xX(n,t)),r)}function bX(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return rx({type:"LineString",coordinates:e},t,r)}function Q6t(e,t,r={}){return hF(e.map(n=>bX(n,t)),r)}function hF(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function ZDe(e,t,r={}){return rx({type:"MultiLineString",coordinates:e},t,r)}function XDe(e,t,r={}){return rx({type:"MultiPoint",coordinates:e},t,r)}function YDe(e,t,r={}){return rx({type:"MultiPolygon",coordinates:e},t,r)}function eRt(e,t,r={}){return rx({type:"GeometryCollection",geometries:e},t,r)}function tRt(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 KDe(e,t="kilometers"){let r=gX[t];if(!r)throw new Error(t+" units is invalid");return e*r}function wX(e,t="kilometers"){let r=gX[t];if(!r)throw new Error(t+" units is invalid");return e/r}function rRt(e,t){return JDe(wX(e,t))}function iRt(e){let t=e%360;return t<0&&(t+=360),t}function nRt(e){return e=e%360,e>0?e>180?e-360:e:e<-180?e+360:e}function JDe(e){return e%(2*Math.PI)*180/Math.PI}function aRt(e){return e%360*Math.PI/180}function oRt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return KDe(wX(e,t),r)}function sRt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=mX[t];if(!n)throw new Error("invalid original units");let i=mX[r];if(!i)throw new Error("invalid final units");return e/n*i}function cF(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function lRt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function uRt(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(!cF(t))throw new Error("bbox must only contain numbers")})}function fRt(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")}hc.areaFactors=mX;hc.azimuthToBearing=nRt;hc.bearingToAzimuth=iRt;hc.convertArea=sRt;hc.convertLength=oRt;hc.degreesToRadians=aRt;hc.earthRadius=qv;hc.factors=gX;hc.feature=rx;hc.featureCollection=hF;hc.geometry=K6t;hc.geometryCollection=eRt;hc.isNumber=cF;hc.isObject=lRt;hc.lengthToDegrees=rRt;hc.lengthToRadians=wX;hc.lineString=bX;hc.lineStrings=Q6t;hc.multiLineString=ZDe;hc.multiPoint=XDe;hc.multiPolygon=YDe;hc.point=_X;hc.points=J6t;hc.polygon=xX;hc.polygons=$6t;hc.radiansToDegrees=JDe;hc.radiansToLength=KDe;hc.round=tRt;hc.validateBBox=uRt;hc.validateId=fRt});var vF=Se(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});var Wp=dF();function KE(e,t,r){if(e!==null)for(var n,i,a,o,s,u,l,f=0,c=0,h,d=e.type,p=d==="FeatureCollection",x=d==="Feature",b=p?e.features.length:1,y=0;y<b;y++){l=p?e.features[y].geometry:x?e.geometry:e,h=l?l.type==="GeometryCollection":!1,s=h?l.geometries.length:1;for(var k=0;k<s;k++){var E=0,A=0;if(o=h?l.geometries[k]:l,o!==null){u=o.coordinates;var L=o.type;switch(f=r&&(L==="Polygon"||L==="MultiPolygon")?1:0,L){case null:break;case"Point":if(t(u,c,y,E,A)===!1)return!1;c++,E++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(t(u[n],c,y,E,A)===!1)return!1;c++,L==="MultiPoint"&&E++}L==="LineString"&&E++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-f;i++){if(t(u[n][i],c,y,E,A)===!1)return!1;c++}L==="MultiLineString"&&E++,L==="Polygon"&&A++}L==="Polygon"&&E++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(A=0,i=0;i<u[n].length;i++){for(a=0;a<u[n][i].length-f;a++){if(t(u[n][i][a],c,y,E,A)===!1)return!1;c++}A++}E++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(KE(o.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function cRt(e,t,r,n){var i=r;return KE(e,function(a,o,s,u,l){o===0&&r===void 0?i=a:i=t(i,a,o,s,u,l)},n),i}function $De(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 hRt(e,t,r){var n=r;return $De(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}function QDe(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 dRt(e,t,r){var n=r;return QDe(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}function pRt(e){var t=[];return KE(e,function(r){t.push(r)}),t}function TX(e,t){var r,n,i,a,o,s,u,l,f,c,h=0,d=e.type==="FeatureCollection",p=e.type==="Feature",x=d?e.features.length:1;for(r=0;r<x;r++){for(s=d?e.features[r].geometry:p?e.geometry:e,l=d?e.features[r].properties:p?e.properties:{},f=d?e.features[r].bbox:p?e.bbox:void 0,c=d?e.features[r].id:p?e.id:void 0,u=s?s.type==="GeometryCollection":!1,o=u?s.geometries.length:1,i=0;i<o;i++){if(a=u?s.geometries[i]:s,a===null){if(t(null,h,l,f,c)===!1)return!1;continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(a,h,l,f,c)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<a.geometries.length;n++)if(t(a.geometries[n],h,l,f,c)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}h++}}function vRt(e,t,r){var n=r;return TX(e,function(i,a,o,s,u){a===0&&r===void 0?n=i:n=t(n,i,a,o,s,u)}),n}function pF(e,t){TX(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(Wp.feature.call(void 0,r,i,{bbox:a,id:o}),n,0)===!1?!1:void 0}var u;switch(s){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon";break}for(var l=0;l<r.coordinates.length;l++){var f=r.coordinates[l],c={type:u,coordinates:f};if(t(Wp.feature.call(void 0,c,i),n,l)===!1)return!1}})}function yRt(e,t,r){var n=r;return pF(e,function(i,a,o){a===0&&o===0&&r===void 0?n=i:n=t(n,i,a,o)}),n}function e6e(e,t){pF(e,function(r,n,i){var a=0;if(r.geometry){var o=r.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var s,u=0,l=0,f=0;if(KE(r,function(c,h,d,p,x){if(s===void 0||n>u||p>l||x>f){s=c,u=n,l=p,f=x,a=0;return}var b=Wp.lineString.call(void 0,[s,c],r.properties);if(t(b,n,i,x,a)===!1)return!1;a++,s=c})===!1)return!1}}})}function mRt(e,t,r){var n=r,i=!1;return e6e(e,function(a,o,s,u,l){i===!1&&r===void 0?n=a:n=t(n,a,o,s,u,l),i=!0}),n}function t6e(e,t){if(!e)throw new Error("geojson is required");pF(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(Wp.lineString.call(void 0,o[s],r.properties),n,i,s)===!1)return!1;break}}})}function gRt(e,t,r){var n=r;return t6e(e,function(i,a,o,s){a===0&&r===void 0?n=i:n=t(n,i,a,o,s)}),n}function _Rt(e,t){if(t=t||{},!Wp.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 u=s.coordinates;switch(s.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=u.length+a-1),Wp.lineString.call(void 0,[u[a],u[a+1]],o,t);case"Polygon":return i<0&&(i=u.length+i),a<0&&(a=u[i].length+a-1),Wp.lineString.call(void 0,[u[i][a],u[i][a+1]],o,t);case"MultiLineString":return n<0&&(n=u.length+n),a<0&&(a=u[n].length+a-1),Wp.lineString.call(void 0,[u[n][a],u[n][a+1]],o,t);case"MultiPolygon":return n<0&&(n=u.length+n),i<0&&(i=u[n].length+i),a<0&&(a=u[n][i].length-a-1),Wp.lineString.call(void 0,[u[n][i][a],u[n][i][a+1]],o,t)}throw new Error("geojson is invalid")}function xRt(e,t){if(t=t||{},!Wp.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 u=s.coordinates;switch(s.type){case"Point":return Wp.point.call(void 0,u,o,t);case"MultiPoint":return n<0&&(n=u.length+n),Wp.point.call(void 0,u[n],o,t);case"LineString":return a<0&&(a=u.length+a),Wp.point.call(void 0,u[a],o,t);case"Polygon":return i<0&&(i=u.length+i),a<0&&(a=u[i].length+a),Wp.point.call(void 0,u[i][a],o,t);case"MultiLineString":return n<0&&(n=u.length+n),a<0&&(a=u[n].length+a),Wp.point.call(void 0,u[n][a],o,t);case"MultiPolygon":return n<0&&(n=u.length+n),i<0&&(i=u[n].length+i),a<0&&(a=u[n][i].length-a),Wp.point.call(void 0,u[n][i][a],o,t)}throw new Error("geojson is invalid")}Nd.coordAll=pRt;Nd.coordEach=KE;Nd.coordReduce=cRt;Nd.featureEach=QDe;Nd.featureReduce=dRt;Nd.findPoint=xRt;Nd.findSegment=_Rt;Nd.flattenEach=pF;Nd.flattenReduce=yRt;Nd.geomEach=TX;Nd.geomReduce=vRt;Nd.lineEach=t6e;Nd.lineReduce=gRt;Nd.propEach=$De;Nd.propReduce=hRt;Nd.segmentEach=e6e;Nd.segmentReduce=mRt});var o6e=Se(yF=>{"use strict";Object.defineProperty(yF,"__esModule",{value:!0});var r6e=dF(),bRt=vF();function a6e(e){return bRt.geomReduce.call(void 0,e,(t,r)=>t+wRt(r),0)}function wRt(e){let t=0,r;switch(e.type){case"Polygon":return i6e(e.coordinates);case"MultiPolygon":for(r=0;r<e.coordinates.length;r++)t+=i6e(e.coordinates[r]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function i6e(e){let t=0;if(e&&e.length>0){t+=Math.abs(n6e(e[0]));for(let r=1;r<e.length;r++)t-=Math.abs(n6e(e[r]))}return t}var TRt=r6e.earthRadius*r6e.earthRadius/2,AX=Math.PI/180;function n6e(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]*AX,u=a[1]*AX,l=o[0]*AX;r+=(l-s)*Math.sin(u),n++}return r*TRt}var ARt=a6e;yF.area=a6e;yF.default=ARt});var l6e=Se(mF=>{"use strict";Object.defineProperty(mF,"__esModule",{value:!0});var SRt=dF(),MRt=vF();function s6e(e,t={}){let r=0,n=0,i=0;return MRt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),SRt.point.call(void 0,[r/i,n/i],t.properties)}var ERt=s6e;mF.centroid=s6e;mF.default=ERt});var f6e=Se(gF=>{"use strict";Object.defineProperty(gF,"__esModule",{value:!0});var kRt=vF();function u6e(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return kRt.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 CRt=u6e;gF.bbox=u6e;gF.default=CRt});var ix=Se((j0r,v6e)=>{"use strict";var LRt=Nl(),d6e=jDe(),{area:zRt}=o6e(),{centroid:PRt}=l6e(),{bbox:IRt}=f6e(),c6e=BM(),ZA=H1(),DRt=yg(),RRt=EM(),_F=w5(),h6e=Object.keys(d6e),FRt={"ISO-3":c6e,"USA-states":c6e,"country names":qRt};function qRt(e){for(var t=0;t<h6e.length;t++){var r=h6e[t],n=new RegExp(d6e[r]);if(n.test(e.trim().toLowerCase()))return r}return ZA.log("Unrecognized country name: "+e+"."),!1}function BRt(e,t,r){if(!t||typeof t!="string")return!1;var n=FRt[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;ZA.log(["Location with id",n,"does not have a matching topojson feature at this resolution."].join(" "))}return!1}function ORt(e){var t=e.geometry,r=t.coordinates,n=e.id,i=[],a,o,s,u;function l(f){for(var c=0;c<f.length-1;c++)if(f[c][0]>0&&f[c+1][0]<0)return c;return null}switch(n==="RUS"||n==="FJI"?a=function(f){var c;if(l(f)===null)c=f;else for(c=new Array(f.length),u=0;u<f.length;u++)c[u]=[f[u][0]<0?f[u][0]+360:f[u][0],f[u][1]];i.push(_F.tester(c))}:n==="ATA"?a=function(f){var c=l(f);if(c===null)return i.push(_F.tester(f));var h=new Array(f.length+1),d=0;for(u=0;u<f.length;u++)u>c?h[d++]=[f[u][0]+360,f[u][1]]:u===c?(h[d++]=f[u],h[d++]=[f[u][0],-90]):h[d++]=f[u];var p=_F.tester(h);p.pts.pop(),i.push(p)}:a=function(f){i.push(_F.tester(f))},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 p6e(e){var t=e.geojson,r=window.PlotlyGeoAssets||{},n=typeof t=="string"?r[t]:t;return DRt(n)?n:(ZA.error("Oops ... something went wrong when fetching "+t),!1)}function NRt(e){var t=e[0].trace,r=p6e(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(f){var c=RRt(f,t.featureidkey||"id").get(),h=n[c];if(h){var d=f.geometry;if(d.type==="Polygon"||d.type==="MultiPolygon"){var p={type:"Feature",id:c,geometry:d,properties:{}};p.geometry.coordinates.length>0?p.properties.ct=URt(p):p.properties.ct=[NaN,NaN],h.fIn=f,h.fOut=p,i.push(p)}else ZA.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[c]}switch(r.type){case"FeatureCollection":var u=r.features;for(a=0;a<u.length;a++)s(u[a]);break;case"Feature":s(r);break;default:return ZA.warn(["Invalid GeoJSON type",(r.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var l in n)ZA.log(["Location *"+l+"*","does not have a matching feature with id-key","*"+t.featureidkey+"*."].join(" "));return i}function URt(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=zRt(o);s>i&&(i=s,r=o)}else r=t;return PRt(r).geometry.coordinates}function VRt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(u){return new Promise(function(l,f){LRt.json(u,function(c,h){if(c){delete t[u];var d=c.status===404?'GeoJSON at URL "'+u+'" does not exist.':"Unexpected error while fetching from "+u;return f(new Error(d))}return t[u]=h,l(h)})})}function i(u){return new Promise(function(l,f){var c=0,h=setInterval(function(){if(t[u]&&t[u]!=="pending")return clearInterval(h),l(t[u]);if(c>100)return clearInterval(h),f("Unexpected error while fetching from "+u);c++},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 HRt(e){return IRt(e)}v6e.exports={locationToFeature:BRt,feature2polygons:ORt,getTraceGeojson:p6e,extractTraceFeature:NRt,fetchTraceGeoData:VRt,computeBbox:HRt}});var SX=Se((Z0r,g6e)=>{"use strict";var GRt=Nl(),WRt=yu(),y6e=Pl(),m6e=ov(),jRt=m6e.stylePoints,ZRt=m6e.styleText;g6e.exports=function(t,r){r&&XRt(t,r)};function XRt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),jRt(n,r,e),ZRt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(i){var a=GRt.select(this),o=i.trace,s=o.line||{};a.call(y6e.stroke,s.color).call(WRt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(y6e.fill,o.fillcolor)})}});var CX=Se((X0r,b6e)=>{"use strict";var _6e=Nl(),bF=Zr(),YRt=fF().getTopojsonFeatures,MX=tx(),xF=ix(),x6e=wy().findExtremes,kX=ju().BADNUM,KRt=q0().calcMarkerSize,EX=ec(),JRt=SX();function $Rt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),i=bF.makeTraceGroups(n,r,"trace scattergeo");function a(o,s){o.lonlat[0]===kX&&_6e.select(s).remove()}i.selectAll("*").remove(),i.each(function(o){var s=_6e.select(this),u=o[0].trace;if(EX.hasLines(u)||u.fill!=="none"){var l=MX.calcTraceToLineCoords(o),f=u.fill!=="none"?MX.makePolygon(l):MX.makeLine(l);s.selectAll("path.js-line").data([{geojson:f,trace:u}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}EX.hasMarkers(u)&&s.selectAll("path.point").data(bF.identity).enter().append("path").classed("point",!0).each(function(c){a(c,this)}),EX.hasText(u)&&s.selectAll("g").data(bF.identity).enter().append("g").append("text").each(function(c){a(c,this)}),JRt(e,o)})}function QRt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(bF.isArrayOrTypedArray(r.locations)){var u=r.locationmode,l=u==="geojson-id"?xF.extractTraceFeature(e):YRt(r,i.topojson);for(o=0;o<a;o++){s=e[o];var f=u==="geojson-id"?s.fOut:xF.locationToFeature(u,s.loc,l);s.lonlat=f?f.properties.ct:[kX,kX]}}var c={padded:!0},h,d;if(n.fitbounds==="geojson"&&r.locationmode==="geojson-id"){var p=xF.computeBbox(xF.getTraceGeojson(r));h=[p[0],p[2]],d=[p[1],p[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];c.ppad=KRt(r,a)}r._extremes.lon=x6e(n.lonaxis._ax,h,c),r._extremes.lat=x6e(n.lataxis._ax,d,c)}b6e.exports={calcGeoJSON:QRt,plot:$Rt}});var T6e=Se((Y0r,w6e)=>{"use strict";var eFt=jc(),tFt=ju().BADNUM,rFt=oT(),iFt=Zr().fillText,nFt=H2();w6e.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.xa,s=t.ya,u=t.subplot,l=u.projection.isLonLatOverEdges,f=u.project;function c(k){var E=k.lonlat;if(E[0]===tFt||l(E))return 1/0;var A=f(E),L=f([r,n]),_=Math.abs(A[0]-L[0]),C=Math.abs(A[1]-L[1]),M=Math.max(3,k.mrc||0);return Math.max(Math.sqrt(_*_+C*C)-M,1-3/M)}if(eFt.getClosest(i,c,t),t.index!==!1){var h=i[t.index],d=h.lonlat,p=[o.c2p(d),s.c2p(d)],x=h.mrc||1;t.x0=p[0]-x,t.x1=p[0]+x,t.y0=p[1]-x,t.y1=p[1]+x,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:u};var y=a._module.formatLabels(h,a,b);return t.lonLabel=y.lonLabel,t.latLabel=y.latLabel,t.color=rFt(a,h),t.extraText=aFt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function aFt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i==="all"?nFt.hoverinfo.flags:i.split("+"),o=a.indexOf("location")!==-1&&Array.isArray(e.locations),s=a.indexOf("lon")!==-1,u=a.indexOf("lat")!==-1,l=a.indexOf("text")!==-1,f=[];function c(h){return h+"\xB0"}return o?f.push(t.loc):s&&u?f.push("("+c(r.latLabel)+", "+c(r.lonLabel)+")"):s?f.push(n.lon+c(r.lonLabel)):u&&f.push(n.lat+c(r.latLabel)),l&&iFt(t,e,f),f.join("<br>")}});var S6e=Se((K0r,A6e)=>{"use strict";A6e.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 k6e=Se((J0r,E6e)=>{"use strict";var M6e=ec(),oFt=ju().BADNUM;E6e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u,l,f,c,h,d=!M6e.hasMarkers(s)&&!M6e.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++)u=n[h],l=u.lonlat,l[0]!==oFt&&(f=i.c2p(l),c=a.c2p(l),r.contains([f,c],null,h,t)?(o.push({pointNumber:h,lon:l[0],lat:l[1]}),u.selected=1):u.selected=0);return o}});var JE=Se((wF,C6e)=>{(function(e,t){typeof wF=="object"&&typeof C6e!="undefined"?t(wF):typeof define=="function"&&define.amd?define(["exports"],t):t(e.d3=e.d3||{})})(wF,function(e){"use strict";function t(Ee,Me){return Ee<Me?-1:Ee>Me?1:Ee>=Me?0:NaN}function r(Ee){return Ee.length===1&&(Ee=n(Ee)),{left:function(Me,Oe,Re,me){for(Re==null&&(Re=0),me==null&&(me=Me.length);Re<me;){var Be=Re+me>>>1;Ee(Me[Be],Oe)<0?Re=Be+1:me=Be}return Re},right:function(Me,Oe,Re,me){for(Re==null&&(Re=0),me==null&&(me=Me.length);Re<me;){var Be=Re+me>>>1;Ee(Me[Be],Oe)>0?me=Be:Re=Be+1}return Re}}}function n(Ee){return function(Me,Oe){return t(Ee(Me),Oe)}}var i=r(t),a=i.right,o=i.left;function s(Ee,Me){Me==null&&(Me=u);for(var Oe=0,Re=Ee.length-1,me=Ee[0],Be=new Array(Re<0?0:Re);Oe<Re;)Be[Oe]=Me(me,me=Ee[++Oe]);return Be}function u(Ee,Me){return[Ee,Me]}function l(Ee,Me,Oe){var Re=Ee.length,me=Me.length,Be=new Array(Re*me),fe,Ze,et,gt;for(Oe==null&&(Oe=u),fe=et=0;fe<Re;++fe)for(gt=Ee[fe],Ze=0;Ze<me;++Ze,++et)Be[et]=Oe(gt,Me[Ze]);return Be}function f(Ee,Me){return Me<Ee?-1:Me>Ee?1:Me>=Ee?0:NaN}function c(Ee){return Ee===null?NaN:+Ee}function h(Ee,Me){var Oe=Ee.length,Re=0,me=-1,Be=0,fe,Ze,et=0;if(Me==null)for(;++me<Oe;)isNaN(fe=c(Ee[me]))||(Ze=fe-Be,Be+=Ze/++Re,et+=Ze*(fe-Be));else for(;++me<Oe;)isNaN(fe=c(Me(Ee[me],me,Ee)))||(Ze=fe-Be,Be+=Ze/++Re,et+=Ze*(fe-Be));if(Re>1)return et/(Re-1)}function d(Ee,Me){var Oe=h(Ee,Me);return Oe&&Math.sqrt(Oe)}function p(Ee,Me){var Oe=Ee.length,Re=-1,me,Be,fe;if(Me==null){for(;++Re<Oe;)if((me=Ee[Re])!=null&&me>=me)for(Be=fe=me;++Re<Oe;)(me=Ee[Re])!=null&&(Be>me&&(Be=me),fe<me&&(fe=me))}else for(;++Re<Oe;)if((me=Me(Ee[Re],Re,Ee))!=null&&me>=me)for(Be=fe=me;++Re<Oe;)(me=Me(Ee[Re],Re,Ee))!=null&&(Be>me&&(Be=me),fe<me&&(fe=me));return[Be,fe]}var x=Array.prototype,b=x.slice,y=x.map;function k(Ee){return function(){return Ee}}function E(Ee){return Ee}function A(Ee,Me,Oe){Ee=+Ee,Me=+Me,Oe=(me=arguments.length)<2?(Me=Ee,Ee=0,1):me<3?1:+Oe;for(var Re=-1,me=Math.max(0,Math.ceil((Me-Ee)/Oe))|0,Be=new Array(me);++Re<me;)Be[Re]=Ee+Re*Oe;return Be}var L=Math.sqrt(50),_=Math.sqrt(10),C=Math.sqrt(2);function M(Ee,Me,Oe){var Re,me=-1,Be,fe,Ze;if(Me=+Me,Ee=+Ee,Oe=+Oe,Ee===Me&&Oe>0)return[Ee];if((Re=Me<Ee)&&(Be=Ee,Ee=Me,Me=Be),(Ze=v(Ee,Me,Oe))===0||!isFinite(Ze))return[];if(Ze>0)for(Ee=Math.ceil(Ee/Ze),Me=Math.floor(Me/Ze),fe=new Array(Be=Math.ceil(Me-Ee+1));++me<Be;)fe[me]=(Ee+me)*Ze;else for(Ee=Math.floor(Ee*Ze),Me=Math.ceil(Me*Ze),fe=new Array(Be=Math.ceil(Ee-Me+1));++me<Be;)fe[me]=(Ee-me)/Ze;return Re&&fe.reverse(),fe}function v(Ee,Me,Oe){var Re=(Me-Ee)/Math.max(0,Oe),me=Math.floor(Math.log(Re)/Math.LN10),Be=Re/Math.pow(10,me);return me>=0?(Be>=L?10:Be>=_?5:Be>=C?2:1)*Math.pow(10,me):-Math.pow(10,-me)/(Be>=L?10:Be>=_?5:Be>=C?2:1)}function z(Ee,Me,Oe){var Re=Math.abs(Me-Ee)/Math.max(0,Oe),me=Math.pow(10,Math.floor(Math.log(Re)/Math.LN10)),Be=Re/me;return Be>=L?me*=10:Be>=_?me*=5:Be>=C&&(me*=2),Me<Ee?-me:me}function T(Ee){return Math.ceil(Math.log(Ee.length)/Math.LN2)+1}function F(){var Ee=E,Me=p,Oe=T;function Re(me){var Be,fe=me.length,Ze,et=new Array(fe);for(Be=0;Be<fe;++Be)et[Be]=Ee(me[Be],Be,me);var gt=Me(et),Pt=gt[0],Qe=gt[1],Xe=Oe(et,Pt,Qe);Array.isArray(Xe)||(Xe=z(Pt,Qe,Xe),Xe=A(Math.ceil(Pt/Xe)*Xe,Qe,Xe));for(var Tt=Xe.length;Xe[0]<=Pt;)Xe.shift(),--Tt;for(;Xe[Tt-1]>Qe;)Xe.pop(),--Tt;var xt=new Array(Tt+1),_t;for(Be=0;Be<=Tt;++Be)_t=xt[Be]=[],_t.x0=Be>0?Xe[Be-1]:Pt,_t.x1=Be<Tt?Xe[Be]:Qe;for(Be=0;Be<fe;++Be)Ze=et[Be],Pt<=Ze&&Ze<=Qe&&xt[a(Xe,Ze,0,Tt)].push(me[Be]);return xt}return Re.value=function(me){return arguments.length?(Ee=typeof me=="function"?me:k(me),Re):Ee},Re.domain=function(me){return arguments.length?(Me=typeof me=="function"?me:k([me[0],me[1]]),Re):Me},Re.thresholds=function(me){return arguments.length?(Oe=typeof me=="function"?me:Array.isArray(me)?k(b.call(me)):k(me),Re):Oe},Re}function q(Ee,Me,Oe){if(Oe==null&&(Oe=c),!!(Re=Ee.length)){if((Me=+Me)<=0||Re<2)return+Oe(Ee[0],0,Ee);if(Me>=1)return+Oe(Ee[Re-1],Re-1,Ee);var Re,me=(Re-1)*Me,Be=Math.floor(me),fe=+Oe(Ee[Be],Be,Ee),Ze=+Oe(Ee[Be+1],Be+1,Ee);return fe+(Ze-fe)*(me-Be)}}function U(Ee,Me,Oe){return Ee=y.call(Ee,c).sort(t),Math.ceil((Oe-Me)/(2*(q(Ee,.75)-q(Ee,.25))*Math.pow(Ee.length,-1/3)))}function H(Ee,Me,Oe){return Math.ceil((Oe-Me)/(3.5*d(Ee)*Math.pow(Ee.length,-1/3)))}function j(Ee,Me){var Oe=Ee.length,Re=-1,me,Be;if(Me==null){for(;++Re<Oe;)if((me=Ee[Re])!=null&&me>=me)for(Be=me;++Re<Oe;)(me=Ee[Re])!=null&&me>Be&&(Be=me)}else for(;++Re<Oe;)if((me=Me(Ee[Re],Re,Ee))!=null&&me>=me)for(Be=me;++Re<Oe;)(me=Me(Ee[Re],Re,Ee))!=null&&me>Be&&(Be=me);return Be}function G(Ee,Me){var Oe=Ee.length,Re=Oe,me=-1,Be,fe=0;if(Me==null)for(;++me<Oe;)isNaN(Be=c(Ee[me]))?--Re:fe+=Be;else for(;++me<Oe;)isNaN(Be=c(Me(Ee[me],me,Ee)))?--Re:fe+=Be;if(Re)return fe/Re}function O(Ee,Me){var Oe=Ee.length,Re=-1,me,Be=[];if(Me==null)for(;++Re<Oe;)isNaN(me=c(Ee[Re]))||Be.push(me);else for(;++Re<Oe;)isNaN(me=c(Me(Ee[Re],Re,Ee)))||Be.push(me);return q(Be.sort(t),.5)}function W(Ee){for(var Me=Ee.length,Oe,Re=-1,me=0,Be,fe;++Re<Me;)me+=Ee[Re].length;for(Be=new Array(me);--Me>=0;)for(fe=Ee[Me],Oe=fe.length;--Oe>=0;)Be[--me]=fe[Oe];return Be}function re(Ee,Me){var Oe=Ee.length,Re=-1,me,Be;if(Me==null){for(;++Re<Oe;)if((me=Ee[Re])!=null&&me>=me)for(Be=me;++Re<Oe;)(me=Ee[Re])!=null&&Be>me&&(Be=me)}else for(;++Re<Oe;)if((me=Me(Ee[Re],Re,Ee))!=null&&me>=me)for(Be=me;++Re<Oe;)(me=Me(Ee[Re],Re,Ee))!=null&&Be>me&&(Be=me);return Be}function ne(Ee,Me){for(var Oe=Me.length,Re=new Array(Oe);Oe--;)Re[Oe]=Ee[Me[Oe]];return Re}function be(Ee,Me){if(Oe=Ee.length){var Oe,Re=0,me=0,Be,fe=Ee[me];for(Me==null&&(Me=t);++Re<Oe;)(Me(Be=Ee[Re],fe)<0||Me(fe,fe)!==0)&&(fe=Be,me=Re);if(Me(fe,fe)===0)return me}}function ze(Ee,Me,Oe){for(var Re=(Oe==null?Ee.length:Oe)-(Me=Me==null?0:+Me),me,Be;Re;)Be=Math.random()*Re--|0,me=Ee[Re+Me],Ee[Re+Me]=Ee[Be+Me],Ee[Be+Me]=me;return Ee}function Ce(Ee,Me){var Oe=Ee.length,Re=-1,me,Be=0;if(Me==null)for(;++Re<Oe;)(me=+Ee[Re])&&(Be+=me);else for(;++Re<Oe;)(me=+Me(Ee[Re],Re,Ee))&&(Be+=me);return Be}function he(Ee){if(!(Be=Ee.length))return[];for(var Me=-1,Oe=re(Ee,te),Re=new Array(Oe);++Me<Oe;)for(var me=-1,Be,fe=Re[Me]=new Array(Be);++me<Be;)fe[me]=Ee[me][Me];return Re}function te(Ee){return Ee.length}function ke(){return he(arguments)}e.bisect=a,e.bisectRight=a,e.bisectLeft=o,e.ascending=t,e.bisector=r,e.cross=l,e.descending=f,e.deviation=d,e.extent=p,e.histogram=F,e.thresholdFreedmanDiaconis=U,e.thresholdScott=H,e.thresholdSturges=T,e.max=j,e.mean=G,e.median=O,e.merge=W,e.min=re,e.pairs=s,e.permute=ne,e.quantile=q,e.range=A,e.scan=be,e.shuffle=ze,e.sum=Ce,e.ticks=M,e.tickIncrement=v,e.tickStep=z,e.transpose=he,e.variance=h,e.zip=ke,Object.defineProperty(e,"__esModule",{value:!0})})});var LX=Se((TF,L6e)=>{(function(e,t){typeof TF=="object"&&typeof L6e!="undefined"?t(TF,JE()):typeof define=="function"&&define.amd?define(["exports","d3-array"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(TF,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(bt){a(i,bt,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(bt,Ft,hr){var nr=bt.s=Ft+hr,Sr=nr-Ft,li=nr-Sr;bt.t=Ft-li+(hr-Sr)}var o=1e-6,s=1e-12,u=Math.PI,l=u/2,f=u/4,c=u*2,h=180/u,d=u/180,p=Math.abs,x=Math.atan,b=Math.atan2,y=Math.cos,k=Math.ceil,E=Math.exp,A=Math.log,L=Math.pow,_=Math.sin,C=Math.sign||function(bt){return bt>0?1:bt<0?-1:0},M=Math.sqrt,v=Math.tan;function z(bt){return bt>1?0:bt<-1?u:Math.acos(bt)}function T(bt){return bt>1?l:bt<-1?-l:Math.asin(bt)}function F(bt){return(bt=_(bt/2))*bt}function q(){}function U(bt,Ft){bt&&j.hasOwnProperty(bt.type)&&j[bt.type](bt,Ft)}var H={Feature:function(bt,Ft){U(bt.geometry,Ft)},FeatureCollection:function(bt,Ft){for(var hr=bt.features,nr=-1,Sr=hr.length;++nr<Sr;)U(hr[nr].geometry,Ft)}},j={Sphere:function(bt,Ft){Ft.sphere()},Point:function(bt,Ft){bt=bt.coordinates,Ft.point(bt[0],bt[1],bt[2])},MultiPoint:function(bt,Ft){for(var hr=bt.coordinates,nr=-1,Sr=hr.length;++nr<Sr;)bt=hr[nr],Ft.point(bt[0],bt[1],bt[2])},LineString:function(bt,Ft){G(bt.coordinates,Ft,0)},MultiLineString:function(bt,Ft){for(var hr=bt.coordinates,nr=-1,Sr=hr.length;++nr<Sr;)G(hr[nr],Ft,0)},Polygon:function(bt,Ft){O(bt.coordinates,Ft)},MultiPolygon:function(bt,Ft){for(var hr=bt.coordinates,nr=-1,Sr=hr.length;++nr<Sr;)O(hr[nr],Ft)},GeometryCollection:function(bt,Ft){for(var hr=bt.geometries,nr=-1,Sr=hr.length;++nr<Sr;)U(hr[nr],Ft)}};function G(bt,Ft,hr){var nr=-1,Sr=bt.length-hr,li;for(Ft.lineStart();++nr<Sr;)li=bt[nr],Ft.point(li[0],li[1],li[2]);Ft.lineEnd()}function O(bt,Ft){var hr=-1,nr=bt.length;for(Ft.polygonStart();++hr<nr;)G(bt[hr],Ft,1);Ft.polygonEnd()}function W(bt,Ft){bt&&H.hasOwnProperty(bt.type)?H[bt.type](bt,Ft):U(bt,Ft)}var re=r(),ne=r(),be,ze,Ce,he,te,ke={point:q,lineStart:q,lineEnd:q,polygonStart:function(){re.reset(),ke.lineStart=Ee,ke.lineEnd=Me},polygonEnd:function(){var bt=+re;ne.add(bt<0?c+bt:bt),this.lineStart=this.lineEnd=this.point=q},sphere:function(){ne.add(c)}};function Ee(){ke.point=Oe}function Me(){Re(be,ze)}function Oe(bt,Ft){ke.point=Re,be=bt,ze=Ft,bt*=d,Ft*=d,Ce=bt,he=y(Ft=Ft/2+f),te=_(Ft)}function Re(bt,Ft){bt*=d,Ft*=d,Ft=Ft/2+f;var hr=bt-Ce,nr=hr>=0?1:-1,Sr=nr*hr,li=y(Ft),di=_(Ft),mi=te*di,Oi=he*li+mi*y(Sr),dn=mi*nr*_(Sr);re.add(b(dn,Oi)),Ce=bt,he=li,te=di}function me(bt){return ne.reset(),W(bt,ke),ne*2}function Be(bt){return[b(bt[1],bt[0]),T(bt[2])]}function fe(bt){var Ft=bt[0],hr=bt[1],nr=y(hr);return[nr*y(Ft),nr*_(Ft),_(hr)]}function Ze(bt,Ft){return bt[0]*Ft[0]+bt[1]*Ft[1]+bt[2]*Ft[2]}function et(bt,Ft){return[bt[1]*Ft[2]-bt[2]*Ft[1],bt[2]*Ft[0]-bt[0]*Ft[2],bt[0]*Ft[1]-bt[1]*Ft[0]]}function gt(bt,Ft){bt[0]+=Ft[0],bt[1]+=Ft[1],bt[2]+=Ft[2]}function Pt(bt,Ft){return[bt[0]*Ft,bt[1]*Ft,bt[2]*Ft]}function Qe(bt){var Ft=M(bt[0]*bt[0]+bt[1]*bt[1]+bt[2]*bt[2]);bt[0]/=Ft,bt[1]/=Ft,bt[2]/=Ft}var Xe,Tt,xt,_t,Ct,jt,At,Te,nt=r(),ut,ct,rt={point:je,lineStart:Je,lineEnd:Mt,polygonStart:function(){rt.point=Vt,rt.lineStart=Kt,rt.lineEnd=ir,nt.reset(),ke.polygonStart()},polygonEnd:function(){ke.polygonEnd(),rt.point=je,rt.lineStart=Je,rt.lineEnd=Mt,re<0?(Xe=-(xt=180),Tt=-(_t=90)):nt>o?_t=90:nt<-o&&(Tt=-90),ct[0]=Xe,ct[1]=xt},sphere:function(){Xe=-(xt=180),Tt=-(_t=90)}};function je(bt,Ft){ut.push(ct=[Xe=bt,xt=bt]),Ft<Tt&&(Tt=Ft),Ft>_t&&(_t=Ft)}function tt(bt,Ft){var hr=fe([bt*d,Ft*d]);if(Te){var nr=et(Te,hr),Sr=[nr[1],-nr[0],0],li=et(Sr,nr);Qe(li),li=Be(li);var di=bt-Ct,mi=di>0?1:-1,Oi=li[0]*h*mi,dn,wi=p(di)>180;wi^(mi*Ct<Oi&&Oi<mi*bt)?(dn=li[1]*h,dn>_t&&(_t=dn)):(Oi=(Oi+360)%360-180,wi^(mi*Ct<Oi&&Oi<mi*bt)?(dn=-li[1]*h,dn<Tt&&(Tt=dn)):(Ft<Tt&&(Tt=Ft),Ft>_t&&(_t=Ft))),wi?bt<Ct?fr(Xe,bt)>fr(Xe,xt)&&(xt=bt):fr(bt,xt)>fr(Xe,xt)&&(Xe=bt):xt>=Xe?(bt<Xe&&(Xe=bt),bt>xt&&(xt=bt)):bt>Ct?fr(Xe,bt)>fr(Xe,xt)&&(xt=bt):fr(bt,xt)>fr(Xe,xt)&&(Xe=bt)}else ut.push(ct=[Xe=bt,xt=bt]);Ft<Tt&&(Tt=Ft),Ft>_t&&(_t=Ft),Te=hr,Ct=bt}function Je(){rt.point=tt}function Mt(){ct[0]=Xe,ct[1]=xt,rt.point=je,Te=null}function Vt(bt,Ft){if(Te){var hr=bt-Ct;nt.add(p(hr)>180?hr+(hr>0?360:-360):hr)}else jt=bt,At=Ft;ke.point(bt,Ft),tt(bt,Ft)}function Kt(){ke.lineStart()}function ir(){Vt(jt,At),ke.lineEnd(),p(nt)>o&&(Xe=-(xt=180)),ct[0]=Xe,ct[1]=xt,Te=null}function fr(bt,Ft){return(Ft-=bt)<0?Ft+360:Ft}function Ot(bt,Ft){return bt[0]-Ft[0]}function De(bt,Ft){return bt[0]<=bt[1]?bt[0]<=Ft&&Ft<=bt[1]:Ft<bt[0]||bt[1]<Ft}function _e(bt){var Ft,hr,nr,Sr,li,di,mi;if(_t=xt=-(Xe=Tt=1/0),ut=[],W(bt,rt),hr=ut.length){for(ut.sort(Ot),Ft=1,nr=ut[0],li=[nr];Ft<hr;++Ft)Sr=ut[Ft],De(nr,Sr[0])||De(nr,Sr[1])?(fr(nr[0],Sr[1])>fr(nr[0],nr[1])&&(nr[1]=Sr[1]),fr(Sr[0],nr[1])>fr(nr[0],nr[1])&&(nr[0]=Sr[0])):li.push(nr=Sr);for(di=-1/0,hr=li.length-1,Ft=0,nr=li[hr];Ft<=hr;nr=Sr,++Ft)Sr=li[Ft],(mi=fr(nr[1],Sr[0]))>di&&(di=mi,Xe=Sr[0],xt=nr[1])}return ut=ct=null,Xe===1/0||Tt===1/0?[[NaN,NaN],[NaN,NaN]]:[[Xe,Tt],[xt,_t]]}var Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei={sphere:q,point:Si,lineStart:Hi,lineEnd:Di,polygonStart:function(){Ei.lineStart=Lt,Ei.lineEnd=vt},polygonEnd:function(){Ei.lineStart=Hi,Ei.lineEnd=Di}};function Si(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft);xi(hr*y(bt),hr*_(bt),_(Ft))}function xi(bt,Ft,hr){++Fe,Ie+=(bt-Ie)/Fe,lt+=(Ft-lt)/Fe,ye+=(hr-ye)/Fe}function Hi(){Ei.point=Jr}function Jr(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft);vr=hr*y(bt),Er=hr*_(bt),si=_(Ft),Ei.point=ci,xi(vr,Er,si)}function ci(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft),nr=hr*y(bt),Sr=hr*_(bt),li=_(Ft),di=b(M((di=Er*li-si*Sr)*di+(di=si*nr-vr*li)*di+(di=vr*Sr-Er*nr)*di),vr*nr+Er*Sr+si*li);Pe+=di,ue+=di*(vr+(vr=nr)),de+=di*(Er+(Er=Sr)),ht+=di*(si+(si=li)),xi(vr,Er,si)}function Di(){Ei.point=Si}function Lt(){Ei.point=Dt}function vt(){Bt(qr,Lr),Ei.point=Si}function Dt(bt,Ft){qr=bt,Lr=Ft,bt*=d,Ft*=d,Ei.point=Bt;var hr=y(Ft);vr=hr*y(bt),Er=hr*_(bt),si=_(Ft),xi(vr,Er,si)}function Bt(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft),nr=hr*y(bt),Sr=hr*_(bt),li=_(Ft),di=Er*li-si*Sr,mi=si*nr-vr*li,Oi=vr*Sr-Er*nr,dn=M(di*di+mi*mi+Oi*Oi),wi=T(dn),ui=dn&&-wi/dn;Et+=ui*di,St+=ui*mi,Zt+=ui*Oi,Pe+=wi,ue+=wi*(vr+(vr=nr)),de+=wi*(Er+(Er=Sr)),ht+=wi*(si+(si=li)),xi(vr,Er,si)}function sr(bt){Fe=Pe=Ie=lt=ye=ue=de=ht=Et=St=Zt=0,W(bt,Ei);var Ft=Et,hr=St,nr=Zt,Sr=Ft*Ft+hr*hr+nr*nr;return Sr<s&&(Ft=ue,hr=de,nr=ht,Pe<o&&(Ft=Ie,hr=lt,nr=ye),Sr=Ft*Ft+hr*hr+nr*nr,Sr<s)?[NaN,NaN]:[b(hr,Ft)*h,T(nr/M(Sr))*h]}function br(bt){return function(){return bt}}function zr(bt,Ft){function hr(nr,Sr){return nr=bt(nr,Sr),Ft(nr[0],nr[1])}return bt.invert&&Ft.invert&&(hr.invert=function(nr,Sr){return nr=Ft.invert(nr,Sr),nr&&bt.invert(nr[0],nr[1])}),hr}function Tr(bt,Ft){return[p(bt)>u?bt+Math.round(-bt/c)*c:bt,Ft]}Tr.invert=Tr;function Rr(bt,Ft,hr){return(bt%=c)?Ft||hr?zr(oi(bt),vi(Ft,hr)):oi(bt):Ft||hr?vi(Ft,hr):Tr}function Br(bt){return function(Ft,hr){return Ft+=bt,[Ft>u?Ft-c:Ft<-u?Ft+c:Ft,hr]}}function oi(bt){var Ft=Br(bt);return Ft.invert=Br(-bt),Ft}function vi(bt,Ft){var hr=y(bt),nr=_(bt),Sr=y(Ft),li=_(Ft);function di(mi,Oi){var dn=y(Oi),wi=y(mi)*dn,ui=_(mi)*dn,Ai=_(Oi),gi=Ai*hr+wi*nr;return[b(ui*Sr-gi*li,wi*hr-Ai*nr),T(gi*Sr+ui*li)]}return di.invert=function(mi,Oi){var dn=y(Oi),wi=y(mi)*dn,ui=_(mi)*dn,Ai=_(Oi),gi=Ai*Sr-ui*li;return[b(ui*Sr+Ai*li,wi*hr+gi*nr),T(gi*hr-wi*nr)]},di}function Pi(bt){bt=Rr(bt[0]*d,bt[1]*d,bt.length>2?bt[2]*d:0);function Ft(hr){return hr=bt(hr[0]*d,hr[1]*d),hr[0]*=h,hr[1]*=h,hr}return Ft.invert=function(hr){return hr=bt.invert(hr[0]*d,hr[1]*d),hr[0]*=h,hr[1]*=h,hr},Ft}function Yr(bt,Ft,hr,nr,Sr,li){if(hr){var di=y(Ft),mi=_(Ft),Oi=nr*hr;Sr==null?(Sr=Ft+nr*c,li=Ft-Oi/2):(Sr=Ni(di,Sr),li=Ni(di,li),(nr>0?Sr<li:Sr>li)&&(Sr+=nr*c));for(var dn,wi=Sr;nr>0?wi>li:wi<li;wi-=Oi)dn=Be([di,-mi*y(wi),-mi*_(wi)]),bt.point(dn[0],dn[1])}}function Ni(bt,Ft){Ft=fe(Ft),Ft[0]-=bt,Qe(Ft);var hr=z(-Ft[1]);return((-Ft[2]<0?-hr:hr)+c-o)%c}function Ur(){var bt=br([0,0]),Ft=br(90),hr=br(6),nr,Sr,li={point:di};function di(Oi,dn){nr.push(Oi=Sr(Oi,dn)),Oi[0]*=h,Oi[1]*=h}function mi(){var Oi=bt.apply(this,arguments),dn=Ft.apply(this,arguments)*d,wi=hr.apply(this,arguments)*d;return nr=[],Sr=Rr(-Oi[0]*d,-Oi[1]*d,0).invert,Yr(li,dn,wi,1),Oi={type:"Polygon",coordinates:[nr]},nr=Sr=null,Oi}return mi.center=function(Oi){return arguments.length?(bt=typeof Oi=="function"?Oi:br([+Oi[0],+Oi[1]]),mi):bt},mi.radius=function(Oi){return arguments.length?(Ft=typeof Oi=="function"?Oi:br(+Oi),mi):Ft},mi.precision=function(Oi){return arguments.length?(hr=typeof Oi=="function"?Oi:br(+Oi),mi):hr},mi}function ti(){var bt=[],Ft;return{point:function(hr,nr,Sr){Ft.push([hr,nr,Sr])},lineStart:function(){bt.push(Ft=[])},lineEnd:q,rejoin:function(){bt.length>1&&bt.push(bt.pop().concat(bt.shift()))},result:function(){var hr=bt;return bt=[],Ft=null,hr}}}function ki(bt,Ft){return p(bt[0]-Ft[0])<o&&p(bt[1]-Ft[1])<o}function ji(bt,Ft,hr,nr){this.x=bt,this.z=Ft,this.o=hr,this.e=nr,this.v=!1,this.n=this.p=null}function Vi(bt,Ft,hr,nr,Sr){var li=[],di=[],mi,Oi;if(bt.forEach(function(gn){if(!((In=gn.length-1)<=0)){var In,Vn=gn[0],Rn=gn[In],Hn;if(ki(Vn,Rn)){if(!Vn[2]&&!Rn[2]){for(Sr.lineStart(),mi=0;mi<In;++mi)Sr.point((Vn=gn[mi])[0],Vn[1]);Sr.lineEnd();return}Rn[0]+=2*o}li.push(Hn=new ji(Vn,gn,null,!0)),di.push(Hn.o=new ji(Vn,null,Hn,!1)),li.push(Hn=new ji(Rn,gn,null,!1)),di.push(Hn.o=new ji(Rn,null,Hn,!0))}}),!!li.length){for(di.sort(Ft),zi(li),zi(di),mi=0,Oi=di.length;mi<Oi;++mi)di[mi].e=hr=!hr;for(var dn=li[0],wi,ui;;){for(var Ai=dn,gi=!0;Ai.v;)if((Ai=Ai.n)===dn)return;wi=Ai.z,Sr.lineStart();do{if(Ai.v=Ai.o.v=!0,Ai.e){if(gi)for(mi=0,Oi=wi.length;mi<Oi;++mi)Sr.point((ui=wi[mi])[0],ui[1]);else nr(Ai.x,Ai.n.x,1,Sr);Ai=Ai.n}else{if(gi)for(wi=Ai.p.z,mi=wi.length-1;mi>=0;--mi)Sr.point((ui=wi[mi])[0],ui[1]);else nr(Ai.x,Ai.p.x,-1,Sr);Ai=Ai.p}Ai=Ai.o,wi=Ai.z,gi=!gi}while(!Ai.v);Sr.lineEnd()}}}function zi(bt){if(Ft=bt.length){for(var Ft,hr=0,nr=bt[0],Sr;++hr<Ft;)nr.n=Sr=bt[hr],Sr.p=nr,nr=Sr;nr.n=Sr=bt[0],Sr.p=nr}}var Mi=r();function sn(bt){return p(bt[0])<=u?bt[0]:C(bt[0])*((p(bt[0])+u)%c-u)}function fi(bt,Ft){var hr=sn(Ft),nr=Ft[1],Sr=_(nr),li=[_(hr),-y(hr),0],di=0,mi=0;Mi.reset(),Sr===1?nr=l+o:Sr===-1&&(nr=-l-o);for(var Oi=0,dn=bt.length;Oi<dn;++Oi)if(ui=(wi=bt[Oi]).length)for(var wi,ui,Ai=wi[ui-1],gi=sn(Ai),gn=Ai[1]/2+f,In=_(gn),Vn=y(gn),Rn=0;Rn<ui;++Rn,gi=Gn,In=Lo,Vn=us,Ai=Hn){var Hn=wi[Rn],Gn=sn(Hn),pn=Hn[1]/2+f,Lo=_(pn),us=y(pn),Bs=Gn-gi,Js=Bs>=0?1:-1,ol=Js*Bs,Cl=ol>u,ul=In*Lo;if(Mi.add(b(ul*Js*_(ol),Vn*us+ul*y(ol))),di+=Cl?Bs+Js*c:Bs,Cl^gi>=hr^Gn>=hr){var Gl=et(fe(Ai),fe(Hn));Qe(Gl);var Vl=et(li,Gl);Qe(Vl);var Fl=(Cl^Bs>=0?-1:1)*T(Vl[2]);(nr>Fl||nr===Fl&&(Gl[0]||Gl[1]))&&(mi+=Cl^Bs>=0?1:-1)}}return(di<-o||di<o&&Mi<-o)^mi&1}function Or(bt,Ft,hr,nr){return function(Sr){var li=Ft(Sr),di=ti(),mi=Ft(di),Oi=!1,dn,wi,ui,Ai={point:gi,lineStart:In,lineEnd:Vn,polygonStart:function(){Ai.point=Rn,Ai.lineStart=Hn,Ai.lineEnd=Gn,wi=[],dn=[]},polygonEnd:function(){Ai.point=gi,Ai.lineStart=In,Ai.lineEnd=Vn,wi=t.merge(wi);var pn=fi(dn,nr);wi.length?(Oi||(Sr.polygonStart(),Oi=!0),Vi(wi,Wt,pn,hr,Sr)):pn&&(Oi||(Sr.polygonStart(),Oi=!0),Sr.lineStart(),hr(null,null,1,Sr),Sr.lineEnd()),Oi&&(Sr.polygonEnd(),Oi=!1),wi=dn=null},sphere:function(){Sr.polygonStart(),Sr.lineStart(),hr(null,null,1,Sr),Sr.lineEnd(),Sr.polygonEnd()}};function gi(pn,Lo){bt(pn,Lo)&&Sr.point(pn,Lo)}function gn(pn,Lo){li.point(pn,Lo)}function In(){Ai.point=gn,li.lineStart()}function Vn(){Ai.point=gi,li.lineEnd()}function Rn(pn,Lo){ui.push([pn,Lo]),mi.point(pn,Lo)}function Hn(){mi.lineStart(),ui=[]}function Gn(){Rn(ui[0][0],ui[0][1]),mi.lineEnd();var pn=mi.clean(),Lo=di.result(),us,Bs=Lo.length,Js,ol,Cl;if(ui.pop(),dn.push(ui),ui=null,!!Bs){if(pn&1){if(ol=Lo[0],(Js=ol.length-1)>0){for(Oi||(Sr.polygonStart(),Oi=!0),Sr.lineStart(),us=0;us<Js;++us)Sr.point((Cl=ol[us])[0],Cl[1]);Sr.lineEnd()}return}Bs>1&&pn&2&&Lo.push(Lo.pop().concat(Lo.shift())),wi.push(Lo.filter(st))}}return Ai}}function st(bt){return bt.length>1}function Wt(bt,Ft){return((bt=bt.x)[0]<0?bt[1]-l-o:l-bt[1])-((Ft=Ft.x)[0]<0?Ft[1]-l-o:l-Ft[1])}var tr=Or(function(){return!0},or,hi,[-u,-l]);function or(bt){var Ft=NaN,hr=NaN,nr=NaN,Sr;return{lineStart:function(){bt.lineStart(),Sr=1},point:function(li,di){var mi=li>0?u:-u,Oi=p(li-Ft);p(Oi-u)<o?(bt.point(Ft,hr=(hr+di)/2>0?l:-l),bt.point(nr,hr),bt.lineEnd(),bt.lineStart(),bt.point(mi,hr),bt.point(li,hr),Sr=0):nr!==mi&&Oi>=u&&(p(Ft-nr)<o&&(Ft-=nr*o),p(li-mi)<o&&(li-=mi*o),hr=Nr(Ft,hr,li,di),bt.point(nr,hr),bt.lineEnd(),bt.lineStart(),bt.point(mi,hr),Sr=0),bt.point(Ft=li,hr=di),nr=mi},lineEnd:function(){bt.lineEnd(),Ft=hr=NaN},clean:function(){return 2-Sr}}}function Nr(bt,Ft,hr,nr){var Sr,li,di=_(bt-hr);return p(di)>o?x((_(Ft)*(li=y(nr))*_(hr)-_(nr)*(Sr=y(Ft))*_(bt))/(Sr*li*di)):(Ft+nr)/2}function hi(bt,Ft,hr,nr){var Sr;if(bt==null)Sr=hr*l,nr.point(-u,Sr),nr.point(0,Sr),nr.point(u,Sr),nr.point(u,0),nr.point(u,-Sr),nr.point(0,-Sr),nr.point(-u,-Sr),nr.point(-u,0),nr.point(-u,Sr);else if(p(bt[0]-Ft[0])>o){var li=bt[0]<Ft[0]?u:-u;Sr=hr*li/2,nr.point(-li,Sr),nr.point(0,Sr),nr.point(li,Sr)}else nr.point(Ft[0],Ft[1])}function Gi(bt){var Ft=y(bt),hr=6*d,nr=Ft>0,Sr=p(Ft)>o;function li(wi,ui,Ai,gi){Yr(gi,bt,hr,Ai,wi,ui)}function di(wi,ui){return y(wi)*y(ui)>Ft}function mi(wi){var ui,Ai,gi,gn,In;return{lineStart:function(){gn=gi=!1,In=1},point:function(Vn,Rn){var Hn=[Vn,Rn],Gn,pn=di(Vn,Rn),Lo=nr?pn?0:dn(Vn,Rn):pn?dn(Vn+(Vn<0?u:-u),Rn):0;if(!ui&&(gn=gi=pn)&&wi.lineStart(),pn!==gi&&(Gn=Oi(ui,Hn),(!Gn||ki(ui,Gn)||ki(Hn,Gn))&&(Hn[2]=1)),pn!==gi)In=0,pn?(wi.lineStart(),Gn=Oi(Hn,ui),wi.point(Gn[0],Gn[1])):(Gn=Oi(ui,Hn),wi.point(Gn[0],Gn[1],2),wi.lineEnd()),ui=Gn;else if(Sr&&ui&&nr^pn){var us;!(Lo&Ai)&&(us=Oi(Hn,ui,!0))&&(In=0,nr?(wi.lineStart(),wi.point(us[0][0],us[0][1]),wi.point(us[1][0],us[1][1]),wi.lineEnd()):(wi.point(us[1][0],us[1][1]),wi.lineEnd(),wi.lineStart(),wi.point(us[0][0],us[0][1],3)))}pn&&(!ui||!ki(ui,Hn))&&wi.point(Hn[0],Hn[1]),ui=Hn,gi=pn,Ai=Lo},lineEnd:function(){gi&&wi.lineEnd(),ui=null},clean:function(){return In|(gn&&gi)<<1}}}function Oi(wi,ui,Ai){var gi=fe(wi),gn=fe(ui),In=[1,0,0],Vn=et(gi,gn),Rn=Ze(Vn,Vn),Hn=Vn[0],Gn=Rn-Hn*Hn;if(!Gn)return!Ai&&wi;var pn=Ft*Rn/Gn,Lo=-Ft*Hn/Gn,us=et(In,Vn),Bs=Pt(In,pn),Js=Pt(Vn,Lo);gt(Bs,Js);var ol=us,Cl=Ze(Bs,ol),ul=Ze(ol,ol),Gl=Cl*Cl-ul*(Ze(Bs,Bs)-1);if(!(Gl<0)){var Vl=M(Gl),Fl=Pt(ol,(-Cl-Vl)/ul);if(gt(Fl,Bs),Fl=Be(Fl),!Ai)return Fl;var ga=wi[0],ko=ui[0],zs=wi[1],Fo=ui[1],Ys;ko<ga&&(Ys=ga,ga=ko,ko=Ys);var Gs=ko-ga,Us=p(Gs-u)<o,Sl=Us||Gs<o;if(!Us&&Fo<zs&&(Ys=zs,zs=Fo,Fo=Ys),Sl?Us?zs+Fo>0^Fl[1]<(p(Fl[0]-ga)<o?zs:Fo):zs<=Fl[1]&&Fl[1]<=Fo:Gs>u^(ga<=Fl[0]&&Fl[0]<=ko)){var _l=Pt(ol,(-Cl+Vl)/ul);return gt(_l,Bs),[Fl,Be(_l)]}}}function dn(wi,ui){var Ai=nr?bt:u-bt,gi=0;return wi<-Ai?gi|=1:wi>Ai&&(gi|=2),ui<-Ai?gi|=4:ui>Ai&&(gi|=8),gi}return Or(di,mi,li,nr?[0,-bt]:[-u,bt-u])}function Qr(bt,Ft,hr,nr,Sr,li){var di=bt[0],mi=bt[1],Oi=Ft[0],dn=Ft[1],wi=0,ui=1,Ai=Oi-di,gi=dn-mi,gn;if(gn=hr-di,!(!Ai&&gn>0)){if(gn/=Ai,Ai<0){if(gn<wi)return;gn<ui&&(ui=gn)}else if(Ai>0){if(gn>ui)return;gn>wi&&(wi=gn)}if(gn=Sr-di,!(!Ai&&gn<0)){if(gn/=Ai,Ai<0){if(gn>ui)return;gn>wi&&(wi=gn)}else if(Ai>0){if(gn<wi)return;gn<ui&&(ui=gn)}if(gn=nr-mi,!(!gi&&gn>0)){if(gn/=gi,gi<0){if(gn<wi)return;gn<ui&&(ui=gn)}else if(gi>0){if(gn>ui)return;gn>wi&&(wi=gn)}if(gn=li-mi,!(!gi&&gn<0)){if(gn/=gi,gi<0){if(gn>ui)return;gn>wi&&(wi=gn)}else if(gi>0){if(gn<wi)return;gn<ui&&(ui=gn)}return wi>0&&(bt[0]=di+wi*Ai,bt[1]=mi+wi*gi),ui<1&&(Ft[0]=di+ui*Ai,Ft[1]=mi+ui*gi),!0}}}}}var Ui=1e9,zn=-Ui;function fn(bt,Ft,hr,nr){function Sr(dn,wi){return bt<=dn&&dn<=hr&&Ft<=wi&&wi<=nr}function li(dn,wi,ui,Ai){var gi=0,gn=0;if(dn==null||(gi=di(dn,ui))!==(gn=di(wi,ui))||Oi(dn,wi)<0^ui>0)do Ai.point(gi===0||gi===3?bt:hr,gi>1?nr:Ft);while((gi=(gi+ui+4)%4)!==gn);else Ai.point(wi[0],wi[1])}function di(dn,wi){return p(dn[0]-bt)<o?wi>0?0:3:p(dn[0]-hr)<o?wi>0?2:1:p(dn[1]-Ft)<o?wi>0?1:0:wi>0?3:2}function mi(dn,wi){return Oi(dn.x,wi.x)}function Oi(dn,wi){var ui=di(dn,1),Ai=di(wi,1);return ui!==Ai?ui-Ai:ui===0?wi[1]-dn[1]:ui===1?dn[0]-wi[0]:ui===2?dn[1]-wi[1]:wi[0]-dn[0]}return function(dn){var wi=dn,ui=ti(),Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs={point:Js,lineStart:Gl,lineEnd:Vl,polygonStart:Cl,polygonEnd:ul};function Js(ga,ko){Sr(ga,ko)&&wi.point(ga,ko)}function ol(){for(var ga=0,ko=0,zs=gi.length;ko<zs;++ko)for(var Fo=gi[ko],Ys=1,Gs=Fo.length,Us=Fo[0],Sl,_l,kl=Us[0],cl=Us[1];Ys<Gs;++Ys)Sl=kl,_l=cl,Us=Fo[Ys],kl=Us[0],cl=Us[1],_l<=nr?cl>nr&&(kl-Sl)*(nr-_l)>(cl-_l)*(bt-Sl)&&++ga:cl<=nr&&(kl-Sl)*(nr-_l)<(cl-_l)*(bt-Sl)&&--ga;return ga}function Cl(){wi=ui,Ai=[],gi=[],us=!0}function ul(){var ga=ol(),ko=us&&ga,zs=(Ai=t.merge(Ai)).length;(ko||zs)&&(dn.polygonStart(),ko&&(dn.lineStart(),li(null,null,1,dn),dn.lineEnd()),zs&&Vi(Ai,mi,ga,li,dn),dn.polygonEnd()),wi=dn,Ai=gi=gn=null}function Gl(){Bs.point=Fl,gi&&gi.push(gn=[]),Lo=!0,pn=!1,Hn=Gn=NaN}function Vl(){Ai&&(Fl(In,Vn),Rn&&pn&&ui.rejoin(),Ai.push(ui.result())),Bs.point=Js,pn&&wi.lineEnd()}function Fl(ga,ko){var zs=Sr(ga,ko);if(gi&&gn.push([ga,ko]),Lo)In=ga,Vn=ko,Rn=zs,Lo=!1,zs&&(wi.lineStart(),wi.point(ga,ko));else if(zs&&pn)wi.point(ga,ko);else{var Fo=[Hn=Math.max(zn,Math.min(Ui,Hn)),Gn=Math.max(zn,Math.min(Ui,Gn))],Ys=[ga=Math.max(zn,Math.min(Ui,ga)),ko=Math.max(zn,Math.min(Ui,ko))];Qr(Fo,Ys,bt,Ft,hr,nr)?(pn||(wi.lineStart(),wi.point(Fo[0],Fo[1])),wi.point(Ys[0],Ys[1]),zs||wi.lineEnd(),us=!1):zs&&(wi.lineStart(),wi.point(ga,ko),us=!1)}Hn=ga,Gn=ko,pn=zs}return Bs}}function xn(){var bt=0,Ft=0,hr=960,nr=500,Sr,li,di;return di={stream:function(mi){return Sr&&li===mi?Sr:Sr=fn(bt,Ft,hr,nr)(li=mi)},extent:function(mi){return arguments.length?(bt=+mi[0][0],Ft=+mi[0][1],hr=+mi[1][0],nr=+mi[1][1],Sr=li=null,di):[[bt,Ft],[hr,nr]]}}}var _a=r(),Wn,Fn,ia,za={sphere:q,point:q,lineStart:Hr,lineEnd:q,polygonStart:q,polygonEnd:q};function Hr(){za.point=go,za.lineEnd=na}function na(){za.point=za.lineEnd=q}function go(bt,Ft){bt*=d,Ft*=d,Wn=bt,Fn=_(Ft),ia=y(Ft),za.point=Dn}function Dn(bt,Ft){bt*=d,Ft*=d;var hr=_(Ft),nr=y(Ft),Sr=p(bt-Wn),li=y(Sr),di=_(Sr),mi=nr*di,Oi=ia*hr-Fn*nr*li,dn=Fn*hr+ia*nr*li;_a.add(b(M(mi*mi+Oi*Oi),dn)),Wn=bt,Fn=hr,ia=nr}function un(bt){return _a.reset(),W(bt,za),+_a}var Zn=[null,null],Wo={type:"LineString",coordinates:Zn};function Ba(bt,Ft){return Zn[0]=bt,Zn[1]=Ft,un(Wo)}var Bo={Feature:function(bt,Ft){return Ha(bt.geometry,Ft)},FeatureCollection:function(bt,Ft){for(var hr=bt.features,nr=-1,Sr=hr.length;++nr<Sr;)if(Ha(hr[nr].geometry,Ft))return!0;return!1}},Ea={Sphere:function(){return!0},Point:function(bt,Ft){return tn(bt.coordinates,Ft)},MultiPoint:function(bt,Ft){for(var hr=bt.coordinates,nr=-1,Sr=hr.length;++nr<Sr;)if(tn(hr[nr],Ft))return!0;return!1},LineString:function(bt,Ft){return Cn(bt.coordinates,Ft)},MultiLineString:function(bt,Ft){for(var hr=bt.coordinates,nr=-1,Sr=hr.length;++nr<Sr;)if(Cn(hr[nr],Ft))return!0;return!1},Polygon:function(bt,Ft){return Xn(bt.coordinates,Ft)},MultiPolygon:function(bt,Ft){for(var hr=bt.coordinates,nr=-1,Sr=hr.length;++nr<Sr;)if(Xn(hr[nr],Ft))return!0;return!1},GeometryCollection:function(bt,Ft){for(var hr=bt.geometries,nr=-1,Sr=hr.length;++nr<Sr;)if(Ha(hr[nr],Ft))return!0;return!1}};function Ha(bt,Ft){return bt&&Ea.hasOwnProperty(bt.type)?Ea[bt.type](bt,Ft):!1}function tn(bt,Ft){return Ba(bt,Ft)===0}function Cn(bt,Ft){for(var hr,nr,Sr,li=0,di=bt.length;li<di;li++){if(nr=Ba(bt[li],Ft),nr===0||li>0&&(Sr=Ba(bt[li],bt[li-1]),Sr>0&&hr<=Sr&&nr<=Sr&&(hr+nr-Sr)*(1-Math.pow((hr-nr)/Sr,2))<s*Sr))return!0;hr=nr}return!1}function Xn(bt,Ft){return!!fi(bt.map(ts),Ja(Ft))}function ts(bt){return bt=bt.map(Ja),bt.pop(),bt}function Ja(bt){return[bt[0]*d,bt[1]*d]}function to(bt,Ft){return(bt&&Bo.hasOwnProperty(bt.type)?Bo[bt.type]:Ha)(bt,Ft)}function Ri(bt,Ft,hr){var nr=t.range(bt,Ft-o,hr).concat(Ft);return function(Sr){return nr.map(function(li){return[Sr,li]})}}function an(bt,Ft,hr){var nr=t.range(bt,Ft-o,hr).concat(Ft);return function(Sr){return nr.map(function(li){return[li,Sr]})}}function cs(){var bt,Ft,hr,nr,Sr,li,di,mi,Oi=10,dn=Oi,wi=90,ui=360,Ai,gi,gn,In,Vn=2.5;function Rn(){return{type:"MultiLineString",coordinates:Hn()}}function Hn(){return t.range(k(nr/wi)*wi,hr,wi).map(gn).concat(t.range(k(mi/ui)*ui,di,ui).map(In)).concat(t.range(k(Ft/Oi)*Oi,bt,Oi).filter(function(Gn){return p(Gn%wi)>o}).map(Ai)).concat(t.range(k(li/dn)*dn,Sr,dn).filter(function(Gn){return p(Gn%ui)>o}).map(gi))}return Rn.lines=function(){return Hn().map(function(Gn){return{type:"LineString",coordinates:Gn}})},Rn.outline=function(){return{type:"Polygon",coordinates:[gn(nr).concat(In(di).slice(1),gn(hr).reverse().slice(1),In(mi).reverse().slice(1))]}},Rn.extent=function(Gn){return arguments.length?Rn.extentMajor(Gn).extentMinor(Gn):Rn.extentMinor()},Rn.extentMajor=function(Gn){return arguments.length?(nr=+Gn[0][0],hr=+Gn[1][0],mi=+Gn[0][1],di=+Gn[1][1],nr>hr&&(Gn=nr,nr=hr,hr=Gn),mi>di&&(Gn=mi,mi=di,di=Gn),Rn.precision(Vn)):[[nr,mi],[hr,di]]},Rn.extentMinor=function(Gn){return arguments.length?(Ft=+Gn[0][0],bt=+Gn[1][0],li=+Gn[0][1],Sr=+Gn[1][1],Ft>bt&&(Gn=Ft,Ft=bt,bt=Gn),li>Sr&&(Gn=li,li=Sr,Sr=Gn),Rn.precision(Vn)):[[Ft,li],[bt,Sr]]},Rn.step=function(Gn){return arguments.length?Rn.stepMajor(Gn).stepMinor(Gn):Rn.stepMinor()},Rn.stepMajor=function(Gn){return arguments.length?(wi=+Gn[0],ui=+Gn[1],Rn):[wi,ui]},Rn.stepMinor=function(Gn){return arguments.length?(Oi=+Gn[0],dn=+Gn[1],Rn):[Oi,dn]},Rn.precision=function(Gn){return arguments.length?(Vn=+Gn,Ai=Ri(li,Sr,90),gi=an(Ft,bt,Vn),gn=Ri(mi,di,90),In=an(nr,hr,Vn),Rn):Vn},Rn.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function pa(){return cs()()}function ln(bt,Ft){var hr=bt[0]*d,nr=bt[1]*d,Sr=Ft[0]*d,li=Ft[1]*d,di=y(nr),mi=_(nr),Oi=y(li),dn=_(li),wi=di*y(hr),ui=di*_(hr),Ai=Oi*y(Sr),gi=Oi*_(Sr),gn=2*T(M(F(li-nr)+di*Oi*F(Sr-hr))),In=_(gn),Vn=gn?function(Rn){var Hn=_(Rn*=gn)/In,Gn=_(gn-Rn)/In,pn=Gn*wi+Hn*Ai,Lo=Gn*ui+Hn*gi,us=Gn*mi+Hn*dn;return[b(Lo,pn)*h,b(us,M(pn*pn+Lo*Lo))*h]}:function(){return[hr*h,nr*h]};return Vn.distance=gn,Vn}function ka(bt){return bt}var va=r(),bo=r(),Co,Fi,Yn,xa,Qi={point:q,lineStart:q,lineEnd:q,polygonStart:function(){Qi.lineStart=Nn,Qi.lineEnd=jo},polygonEnd:function(){Qi.lineStart=Qi.lineEnd=Qi.point=q,va.add(p(bo)),bo.reset()},result:function(){var bt=va/2;return va.reset(),bt}};function Nn(){Qi.point=Pn}function Pn(bt,Ft){Qi.point=qa,Co=Yn=bt,Fi=xa=Ft}function qa(bt,Ft){bo.add(xa*bt-Yn*Ft),Yn=bt,xa=Ft}function jo(){qa(Co,Fi)}var Vo=1/0,Pa=Vo,Oa=-Vo,co=Oa,An={point:_o,lineStart:q,lineEnd:q,polygonStart:q,polygonEnd:q,result:function(){var bt=[[Vo,Pa],[Oa,co]];return Oa=co=-(Pa=Vo=1/0),bt}};function _o(bt,Ft){bt<Vo&&(Vo=bt),bt>Oa&&(Oa=bt),Ft<Pa&&(Pa=Ft),Ft>co&&(co=Ft)}var ks=0,bs=0,ps=0,sa=0,Bn=0,ms=0,ya=0,on=0,mn=0,Ga,ca,bn,Xi,qn={point:Ia,lineStart:yn,lineEnd:Da,polygonStart:function(){qn.lineStart=Aa,qn.lineEnd=Ln},polygonEnd:function(){qn.point=Ia,qn.lineStart=yn,qn.lineEnd=Da},result:function(){var bt=mn?[ya/mn,on/mn]:ms?[sa/ms,Bn/ms]:ps?[ks/ps,bs/ps]:[NaN,NaN];return ks=bs=ps=sa=Bn=ms=ya=on=mn=0,bt}};function Ia(bt,Ft){ks+=bt,bs+=Ft,++ps}function yn(){qn.point=Ya}function Ya(bt,Ft){qn.point=ba,Ia(bn=bt,Xi=Ft)}function ba(bt,Ft){var hr=bt-bn,nr=Ft-Xi,Sr=M(hr*hr+nr*nr);sa+=Sr*(bn+bt)/2,Bn+=Sr*(Xi+Ft)/2,ms+=Sr,Ia(bn=bt,Xi=Ft)}function Da(){qn.point=Ia}function Aa(){qn.point=wo}function Ln(){wa(Ga,ca)}function wo(bt,Ft){qn.point=wa,Ia(Ga=bn=bt,ca=Xi=Ft)}function wa(bt,Ft){var hr=bt-bn,nr=Ft-Xi,Sr=M(hr*hr+nr*nr);sa+=Sr*(bn+bt)/2,Bn+=Sr*(Xi+Ft)/2,ms+=Sr,Sr=Xi*bt-bn*Ft,ya+=Sr*(bn+bt),on+=Sr*(Xi+Ft),mn+=Sr*3,Ia(bn=bt,Xi=Ft)}function $i(bt){this._context=bt}$i.prototype={_radius:4.5,pointRadius:function(bt){return this._radius=bt,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(bt,Ft){switch(this._point){case 0:{this._context.moveTo(bt,Ft),this._point=1;break}case 1:{this._context.lineTo(bt,Ft);break}default:{this._context.moveTo(bt+this._radius,Ft),this._context.arc(bt,Ft,this._radius,0,c);break}}},result:q};var ea=r(),Sa,Za,xo,Wa,hn,Un={point:q,lineStart:function(){Un.point=Ss},lineEnd:function(){Sa&&Kn(Za,xo),Un.point=q},polygonStart:function(){Sa=!0},polygonEnd:function(){Sa=null},result:function(){var bt=+ea;return ea.reset(),bt}};function Ss(bt,Ft){Un.point=Kn,Za=Wa=bt,xo=hn=Ft}function Kn(bt,Ft){Wa-=bt,hn-=Ft,ea.add(M(Wa*Wa+hn*hn)),Wa=bt,hn=Ft}function ns(){this._string=[]}ns.prototype={_radius:4.5,_circle:Jo(4.5),pointRadius:function(bt){return(bt=+bt)!==this._radius&&(this._radius=bt,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(bt,Ft){switch(this._point){case 0:{this._string.push("M",bt,",",Ft),this._point=1;break}case 1:{this._string.push("L",bt,",",Ft);break}default:{this._circle==null&&(this._circle=Jo(this._radius)),this._string.push("M",bt,",",Ft,this._circle);break}}},result:function(){if(this._string.length){var bt=this._string.join("");return this._string=[],bt}else return null}};function Jo(bt){return"m0,"+bt+"a"+bt+","+bt+" 0 1,1 0,"+-2*bt+"a"+bt+","+bt+" 0 1,1 0,"+2*bt+"z"}function vo(bt,Ft){var hr=4.5,nr,Sr;function li(di){return di&&(typeof hr=="function"&&Sr.pointRadius(+hr.apply(this,arguments)),W(di,nr(Sr))),Sr.result()}return li.area=function(di){return W(di,nr(Qi)),Qi.result()},li.measure=function(di){return W(di,nr(Un)),Un.result()},li.bounds=function(di){return W(di,nr(An)),An.result()},li.centroid=function(di){return W(di,nr(qn)),qn.result()},li.projection=function(di){return arguments.length?(nr=di==null?(bt=null,ka):(bt=di).stream,li):bt},li.context=function(di){return arguments.length?(Sr=di==null?(Ft=null,new ns):new $i(Ft=di),typeof hr!="function"&&Sr.pointRadius(hr),li):Ft},li.pointRadius=function(di){return arguments.length?(hr=typeof di=="function"?di:(Sr.pointRadius(+di),+di),li):hr},li.projection(bt).context(Ft)}function ma(bt){return{stream:ja(bt)}}function ja(bt){return function(Ft){var hr=new To;for(var nr in bt)hr[nr]=bt[nr];return hr.stream=Ft,hr}}function To(){}To.prototype={constructor:To,point:function(bt,Ft){this.stream.point(bt,Ft)},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 Ao(bt,Ft,hr){var nr=bt.clipExtent&&bt.clipExtent();return bt.scale(150).translate([0,0]),nr!=null&&bt.clipExtent(null),W(hr,bt.stream(An)),Ft(An.result()),nr!=null&&bt.clipExtent(nr),bt}function la(bt,Ft,hr){return Ao(bt,function(nr){var Sr=Ft[1][0]-Ft[0][0],li=Ft[1][1]-Ft[0][1],di=Math.min(Sr/(nr[1][0]-nr[0][0]),li/(nr[1][1]-nr[0][1])),mi=+Ft[0][0]+(Sr-di*(nr[1][0]+nr[0][0]))/2,Oi=+Ft[0][1]+(li-di*(nr[1][1]+nr[0][1]))/2;bt.scale(150*di).translate([mi,Oi])},hr)}function Ki(bt,Ft,hr){return la(bt,[[0,0],Ft],hr)}function ho(bt,Ft,hr){return Ao(bt,function(nr){var Sr=+Ft,li=Sr/(nr[1][0]-nr[0][0]),di=(Sr-li*(nr[1][0]+nr[0][0]))/2,mi=-li*nr[0][1];bt.scale(150*li).translate([di,mi])},hr)}function Ka(bt,Ft,hr){return Ao(bt,function(nr){var Sr=+Ft,li=Sr/(nr[1][1]-nr[0][1]),di=-li*nr[0][0],mi=(Sr-li*(nr[1][1]+nr[0][1]))/2;bt.scale(150*li).translate([di,mi])},hr)}var Ca=16,ta=y(30*d);function En(bt,Ft){return+Ft?Ds(bt,Ft):Mo(bt)}function Mo(bt){return ja({point:function(Ft,hr){Ft=bt(Ft,hr),this.stream.point(Ft[0],Ft[1])}})}function Ds(bt,Ft){function hr(nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn){var Rn=dn-nr,Hn=wi-Sr,Gn=Rn*Rn+Hn*Hn;if(Gn>4*Ft&&In--){var pn=di+Ai,Lo=mi+gi,us=Oi+gn,Bs=M(pn*pn+Lo*Lo+us*us),Js=T(us/=Bs),ol=p(p(us)-1)<o||p(li-ui)<o?(li+ui)/2:b(Lo,pn),Cl=bt(ol,Js),ul=Cl[0],Gl=Cl[1],Vl=ul-nr,Fl=Gl-Sr,ga=Hn*Vl-Rn*Fl;(ga*ga/Gn>Ft||p((Rn*Vl+Hn*Fl)/Gn-.5)>.3||di*Ai+mi*gi+Oi*gn<ta)&&(hr(nr,Sr,li,di,mi,Oi,ul,Gl,ol,pn/=Bs,Lo/=Bs,us,In,Vn),Vn.point(ul,Gl),hr(ul,Gl,ol,pn,Lo,us,dn,wi,ui,Ai,gi,gn,In,Vn))}}return function(nr){var Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn={point:Rn,lineStart:Hn,lineEnd:pn,polygonStart:function(){nr.polygonStart(),Vn.lineStart=Lo},polygonEnd:function(){nr.polygonEnd(),Vn.lineStart=Hn}};function Rn(Js,ol){Js=bt(Js,ol),nr.point(Js[0],Js[1])}function Hn(){ui=NaN,Vn.point=Gn,nr.lineStart()}function Gn(Js,ol){var Cl=fe([Js,ol]),ul=bt(Js,ol);hr(ui,Ai,wi,gi,gn,In,ui=ul[0],Ai=ul[1],wi=Js,gi=Cl[0],gn=Cl[1],In=Cl[2],Ca,nr),nr.point(ui,Ai)}function pn(){Vn.point=Rn,nr.lineEnd()}function Lo(){Hn(),Vn.point=us,Vn.lineEnd=Bs}function us(Js,ol){Gn(Sr=Js,ol),li=ui,di=Ai,mi=gi,Oi=gn,dn=In,Vn.point=Gn}function Bs(){hr(ui,Ai,wi,gi,gn,In,li,di,Sr,mi,Oi,dn,Ca,nr),Vn.lineEnd=pn,pn()}return Vn}}var Ro=ja({point:function(bt,Ft){this.stream.point(bt*d,Ft*d)}});function vs(bt){return ja({point:function(Ft,hr){var nr=bt(Ft,hr);return this.stream.point(nr[0],nr[1])}})}function Ks(bt,Ft,hr,nr,Sr){function li(di,mi){return di*=nr,mi*=Sr,[Ft+bt*di,hr-bt*mi]}return li.invert=function(di,mi){return[(di-Ft)/bt*nr,(hr-mi)/bt*Sr]},li}function as(bt,Ft,hr,nr,Sr,li){var di=y(li),mi=_(li),Oi=di*bt,dn=mi*bt,wi=di/bt,ui=mi/bt,Ai=(mi*hr-di*Ft)/bt,gi=(mi*Ft+di*hr)/bt;function gn(In,Vn){return In*=nr,Vn*=Sr,[Oi*In-dn*Vn+Ft,hr-dn*In-Oi*Vn]}return gn.invert=function(In,Vn){return[nr*(wi*In-ui*Vn+Ai),Sr*(gi-ui*In-wi*Vn)]},gn}function Jn(bt){return Cs(function(){return bt})()}function Cs(bt){var Ft,hr=150,nr=480,Sr=250,li=0,di=0,mi=0,Oi=0,dn=0,wi,ui=0,Ai=1,gi=1,gn=null,In=tr,Vn=null,Rn,Hn,Gn,pn=ka,Lo=.5,us,Bs,Js,ol,Cl;function ul(ga){return Js(ga[0]*d,ga[1]*d)}function Gl(ga){return ga=Js.invert(ga[0],ga[1]),ga&&[ga[0]*h,ga[1]*h]}ul.stream=function(ga){return ol&&Cl===ga?ol:ol=Ro(vs(wi)(In(us(pn(Cl=ga)))))},ul.preclip=function(ga){return arguments.length?(In=ga,gn=void 0,Fl()):In},ul.postclip=function(ga){return arguments.length?(pn=ga,Vn=Rn=Hn=Gn=null,Fl()):pn},ul.clipAngle=function(ga){return arguments.length?(In=+ga?Gi(gn=ga*d):(gn=null,tr),Fl()):gn*h},ul.clipExtent=function(ga){return arguments.length?(pn=ga==null?(Vn=Rn=Hn=Gn=null,ka):fn(Vn=+ga[0][0],Rn=+ga[0][1],Hn=+ga[1][0],Gn=+ga[1][1]),Fl()):Vn==null?null:[[Vn,Rn],[Hn,Gn]]},ul.scale=function(ga){return arguments.length?(hr=+ga,Vl()):hr},ul.translate=function(ga){return arguments.length?(nr=+ga[0],Sr=+ga[1],Vl()):[nr,Sr]},ul.center=function(ga){return arguments.length?(li=ga[0]%360*d,di=ga[1]%360*d,Vl()):[li*h,di*h]},ul.rotate=function(ga){return arguments.length?(mi=ga[0]%360*d,Oi=ga[1]%360*d,dn=ga.length>2?ga[2]%360*d:0,Vl()):[mi*h,Oi*h,dn*h]},ul.angle=function(ga){return arguments.length?(ui=ga%360*d,Vl()):ui*h},ul.reflectX=function(ga){return arguments.length?(Ai=ga?-1:1,Vl()):Ai<0},ul.reflectY=function(ga){return arguments.length?(gi=ga?-1:1,Vl()):gi<0},ul.precision=function(ga){return arguments.length?(us=En(Bs,Lo=ga*ga),Fl()):M(Lo)},ul.fitExtent=function(ga,ko){return la(ul,ga,ko)},ul.fitSize=function(ga,ko){return Ki(ul,ga,ko)},ul.fitWidth=function(ga,ko){return ho(ul,ga,ko)},ul.fitHeight=function(ga,ko){return Ka(ul,ga,ko)};function Vl(){var ga=as(hr,0,0,Ai,gi,ui).apply(null,Ft(li,di)),ko=(ui?as:Ks)(hr,nr-ga[0],Sr-ga[1],Ai,gi,ui);return wi=Rr(mi,Oi,dn),Bs=zr(Ft,ko),Js=zr(wi,Bs),us=En(Bs,Lo),Fl()}function Fl(){return ol=Cl=null,ul}return function(){return Ft=bt.apply(this,arguments),ul.invert=Ft.invert&&Gl,Vl()}}function Xa(bt){var Ft=0,hr=u/3,nr=Cs(bt),Sr=nr(Ft,hr);return Sr.parallels=function(li){return arguments.length?nr(Ft=li[0]*d,hr=li[1]*d):[Ft*h,hr*h]},Sr}function Zo(bt){var Ft=y(bt);function hr(nr,Sr){return[nr*Ft,_(Sr)/Ft]}return hr.invert=function(nr,Sr){return[nr/Ft,T(Sr*Ft)]},hr}function Eo(bt,Ft){var hr=_(bt),nr=(hr+_(Ft))/2;if(p(nr)<o)return Zo(bt);var Sr=1+hr*(2*nr-hr),li=M(Sr)/nr;function di(mi,Oi){var dn=M(Sr-2*nr*_(Oi))/nr;return[dn*_(mi*=nr),li-dn*y(mi)]}return di.invert=function(mi,Oi){var dn=li-Oi,wi=b(mi,p(dn))*C(dn);return dn*nr<0&&(wi-=u*C(mi)*C(dn)),[wi/nr,T((Sr-(mi*mi+dn*dn)*nr*nr)/(2*nr))]},di}function lo(){return Xa(Eo).scale(155.424).center([0,33.6442])}function $a(){return lo().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Xo(bt){var Ft=bt.length;return{point:function(hr,nr){for(var Sr=-1;++Sr<Ft;)bt[Sr].point(hr,nr)},sphere:function(){for(var hr=-1;++hr<Ft;)bt[hr].sphere()},lineStart:function(){for(var hr=-1;++hr<Ft;)bt[hr].lineStart()},lineEnd:function(){for(var hr=-1;++hr<Ft;)bt[hr].lineEnd()},polygonStart:function(){for(var hr=-1;++hr<Ft;)bt[hr].polygonStart()},polygonEnd:function(){for(var hr=-1;++hr<Ft;)bt[hr].polygonEnd()}}}function rs(){var bt,Ft,hr=$a(),nr,Sr=lo().rotate([154,0]).center([-2,58.5]).parallels([55,65]),li,di=lo().rotate([157,0]).center([-3,19.9]).parallels([8,18]),mi,Oi,dn={point:function(Ai,gi){Oi=[Ai,gi]}};function wi(Ai){var gi=Ai[0],gn=Ai[1];return Oi=null,nr.point(gi,gn),Oi||(li.point(gi,gn),Oi)||(mi.point(gi,gn),Oi)}wi.invert=function(Ai){var gi=hr.scale(),gn=hr.translate(),In=(Ai[0]-gn[0])/gi,Vn=(Ai[1]-gn[1])/gi;return(Vn>=.12&&Vn<.234&&In>=-.425&&In<-.214?Sr:Vn>=.166&&Vn<.234&&In>=-.214&&In<-.115?di:hr).invert(Ai)},wi.stream=function(Ai){return bt&&Ft===Ai?bt:bt=Xo([hr.stream(Ft=Ai),Sr.stream(Ai),di.stream(Ai)])},wi.precision=function(Ai){return arguments.length?(hr.precision(Ai),Sr.precision(Ai),di.precision(Ai),ui()):hr.precision()},wi.scale=function(Ai){return arguments.length?(hr.scale(Ai),Sr.scale(Ai*.35),di.scale(Ai),wi.translate(hr.translate())):hr.scale()},wi.translate=function(Ai){if(!arguments.length)return hr.translate();var gi=hr.scale(),gn=+Ai[0],In=+Ai[1];return nr=hr.translate(Ai).clipExtent([[gn-.455*gi,In-.238*gi],[gn+.455*gi,In+.238*gi]]).stream(dn),li=Sr.translate([gn-.307*gi,In+.201*gi]).clipExtent([[gn-.425*gi+o,In+.12*gi+o],[gn-.214*gi-o,In+.234*gi-o]]).stream(dn),mi=di.translate([gn-.205*gi,In+.212*gi]).clipExtent([[gn-.214*gi+o,In+.166*gi+o],[gn-.115*gi-o,In+.234*gi-o]]).stream(dn),ui()},wi.fitExtent=function(Ai,gi){return la(wi,Ai,gi)},wi.fitSize=function(Ai,gi){return Ki(wi,Ai,gi)},wi.fitWidth=function(Ai,gi){return ho(wi,Ai,gi)},wi.fitHeight=function(Ai,gi){return Ka(wi,Ai,gi)};function ui(){return bt=Ft=null,wi}return wi.scale(1070)}function $n(bt){return function(Ft,hr){var nr=y(Ft),Sr=y(hr),li=bt(nr*Sr);return[li*Sr*_(Ft),li*_(hr)]}}function Sn(bt){return function(Ft,hr){var nr=M(Ft*Ft+hr*hr),Sr=bt(nr),li=_(Sr),di=y(Sr);return[b(Ft*li,nr*di),T(nr&&hr*li/nr)]}}var uo=$n(function(bt){return M(2/(1+bt))});uo.invert=Sn(function(bt){return 2*T(bt/2)});function Rs(){return Jn(uo).scale(124.75).clipAngle(180-.001)}var xs=$n(function(bt){return(bt=z(bt))&&bt/_(bt)});xs.invert=Sn(function(bt){return bt});function Go(){return Jn(xs).scale(79.4188).clipAngle(180-.001)}function os(bt,Ft){return[bt,A(v((l+Ft)/2))]}os.invert=function(bt,Ft){return[bt,2*x(E(Ft))-l]};function So(){return Qn(os).scale(961/c)}function Qn(bt){var Ft=Jn(bt),hr=Ft.center,nr=Ft.scale,Sr=Ft.translate,li=Ft.clipExtent,di=null,mi,Oi,dn;Ft.scale=function(ui){return arguments.length?(nr(ui),wi()):nr()},Ft.translate=function(ui){return arguments.length?(Sr(ui),wi()):Sr()},Ft.center=function(ui){return arguments.length?(hr(ui),wi()):hr()},Ft.clipExtent=function(ui){return arguments.length?(ui==null?di=mi=Oi=dn=null:(di=+ui[0][0],mi=+ui[0][1],Oi=+ui[1][0],dn=+ui[1][1]),wi()):di==null?null:[[di,mi],[Oi,dn]]};function wi(){var ui=u*nr(),Ai=Ft(Pi(Ft.rotate()).invert([0,0]));return li(di==null?[[Ai[0]-ui,Ai[1]-ui],[Ai[0]+ui,Ai[1]+ui]]:bt===os?[[Math.max(Ai[0]-ui,di),mi],[Math.min(Ai[0]+ui,Oi),dn]]:[[di,Math.max(Ai[1]-ui,mi)],[Oi,Math.min(Ai[1]+ui,dn)]])}return wi()}function zo(bt){return v((l+bt)/2)}function rl(bt,Ft){var hr=y(bt),nr=bt===Ft?_(bt):A(hr/y(Ft))/A(zo(Ft)/zo(bt)),Sr=hr*L(zo(bt),nr)/nr;if(!nr)return os;function li(di,mi){Sr>0?mi<-l+o&&(mi=-l+o):mi>l-o&&(mi=l-o);var Oi=Sr/L(zo(mi),nr);return[Oi*_(nr*di),Sr-Oi*y(nr*di)]}return li.invert=function(di,mi){var Oi=Sr-mi,dn=C(nr)*M(di*di+Oi*Oi),wi=b(di,p(Oi))*C(Oi);return Oi*nr<0&&(wi-=u*C(di)*C(Oi)),[wi/nr,2*x(L(Sr/dn,1/nr))-l]},li}function $o(){return Xa(rl).scale(109.5).parallels([30,30])}function Na(bt,Ft){return[bt,Ft]}Na.invert=Na;function Ua(){return Jn(Na).scale(152.63)}function Po(bt,Ft){var hr=y(bt),nr=bt===Ft?_(bt):(hr-y(Ft))/(Ft-bt),Sr=hr/nr+bt;if(p(nr)<o)return Na;function li(di,mi){var Oi=Sr-mi,dn=nr*di;return[Oi*_(dn),Sr-Oi*y(dn)]}return li.invert=function(di,mi){var Oi=Sr-mi,dn=b(di,p(Oi))*C(Oi);return Oi*nr<0&&(dn-=u*C(di)*C(Oi)),[dn/nr,Sr-C(nr)*M(di*di+Oi*Oi)]},li}function fo(){return Xa(Po).scale(131.154).center([0,13.9389])}var ro=1.340264,Ma=-.081106,io=893e-6,aa=.003796,Oo=M(3)/2,No=12;function Zs(bt,Ft){var hr=T(Oo*_(Ft)),nr=hr*hr,Sr=nr*nr*nr;return[bt*y(hr)/(Oo*(ro+3*Ma*nr+Sr*(7*io+9*aa*nr))),hr*(ro+Ma*nr+Sr*(io+aa*nr))]}Zs.invert=function(bt,Ft){for(var hr=Ft,nr=hr*hr,Sr=nr*nr*nr,li=0,di,mi,Oi;li<No&&(mi=hr*(ro+Ma*nr+Sr*(io+aa*nr))-Ft,Oi=ro+3*Ma*nr+Sr*(7*io+9*aa*nr),hr-=di=mi/Oi,nr=hr*hr,Sr=nr*nr*nr,!(p(di)<s));++li);return[Oo*bt*(ro+3*Ma*nr+Sr*(7*io+9*aa*nr))/y(hr),T(_(hr)/Oo)]};function Fs(){return Jn(Zs).scale(177.158)}function ws(bt,Ft){var hr=y(Ft),nr=y(bt)*hr;return[hr*_(bt)/nr,_(Ft)/nr]}ws.invert=Sn(x);function no(){return Jn(ws).scale(144.049).clipAngle(60)}function Ls(){var bt=1,Ft=0,hr=0,nr=1,Sr=1,li=0,di,mi,Oi=null,dn,wi,ui,Ai=1,gi=1,gn=ja({point:function(pn,Lo){var us=Gn([pn,Lo]);this.stream.point(us[0],us[1])}}),In=ka,Vn,Rn;function Hn(){return Ai=bt*nr,gi=bt*Sr,Vn=Rn=null,Gn}function Gn(pn){var Lo=pn[0]*Ai,us=pn[1]*gi;if(li){var Bs=us*di-Lo*mi;Lo=Lo*di+us*mi,us=Bs}return[Lo+Ft,us+hr]}return Gn.invert=function(pn){var Lo=pn[0]-Ft,us=pn[1]-hr;if(li){var Bs=us*di+Lo*mi;Lo=Lo*di-us*mi,us=Bs}return[Lo/Ai,us/gi]},Gn.stream=function(pn){return Vn&&Rn===pn?Vn:Vn=gn(In(Rn=pn))},Gn.postclip=function(pn){return arguments.length?(In=pn,Oi=dn=wi=ui=null,Hn()):In},Gn.clipExtent=function(pn){return arguments.length?(In=pn==null?(Oi=dn=wi=ui=null,ka):fn(Oi=+pn[0][0],dn=+pn[0][1],wi=+pn[1][0],ui=+pn[1][1]),Hn()):Oi==null?null:[[Oi,dn],[wi,ui]]},Gn.scale=function(pn){return arguments.length?(bt=+pn,Hn()):bt},Gn.translate=function(pn){return arguments.length?(Ft=+pn[0],hr=+pn[1],Hn()):[Ft,hr]},Gn.angle=function(pn){return arguments.length?(li=pn%360*d,mi=_(li),di=y(li),Hn()):li*h},Gn.reflectX=function(pn){return arguments.length?(nr=pn?-1:1,Hn()):nr<0},Gn.reflectY=function(pn){return arguments.length?(Sr=pn?-1:1,Hn()):Sr<0},Gn.fitExtent=function(pn,Lo){return la(Gn,pn,Lo)},Gn.fitSize=function(pn,Lo){return Ki(Gn,pn,Lo)},Gn.fitWidth=function(pn,Lo){return ho(Gn,pn,Lo)},Gn.fitHeight=function(pn,Lo){return Ka(Gn,pn,Lo)},Gn}function ds(bt,Ft){var hr=Ft*Ft,nr=hr*hr;return[bt*(.8707-.131979*hr+nr*(-.013791+nr*(.003971*hr-.001529*nr))),Ft*(1.007226+hr*(.015085+nr*(-.044475+.028874*hr-.005916*nr)))]}ds.invert=function(bt,Ft){var hr=Ft,nr=25,Sr;do{var li=hr*hr,di=li*li;hr-=Sr=(hr*(1.007226+li*(.015085+di*(-.044475+.028874*li-.005916*di)))-Ft)/(1.007226+li*(.015085*3+di*(-.044475*7+.028874*9*li-.005916*11*di)))}while(p(Sr)>o&&--nr>0);return[bt/(.8707+(li=hr*hr)*(-.131979+li*(-.013791+li*li*li*(.003971-.001529*li)))),hr]};function Xs(){return Jn(ds).scale(175.295)}function oa(bt,Ft){return[y(Ft)*_(bt),_(Ft)]}oa.invert=Sn(T);function Yo(){return Jn(oa).scale(249.5).clipAngle(90+o)}function po(bt,Ft){var hr=y(Ft),nr=1+y(bt)*hr;return[hr*_(bt)/nr,_(Ft)/nr]}po.invert=Sn(function(bt){return 2*x(bt)});function ss(){return Jn(po).scale(250).clipAngle(142)}function ls(bt,Ft){return[A(v((l+Ft)/2)),-bt]}ls.invert=function(bt,Ft){return[-Ft,2*x(E(bt))-l]};function gs(){var bt=Qn(ls),Ft=bt.center,hr=bt.rotate;return bt.center=function(nr){return arguments.length?Ft([-nr[1],nr[0]]):(nr=Ft(),[nr[1],-nr[0]])},bt.rotate=function(nr){return arguments.length?hr([nr[0],nr[1],nr.length>2?nr[2]+90:90]):(nr=hr(),[nr[0],nr[1],nr[2]-90])},hr([0,0,90]).scale(159.155)}e.geoAlbers=$a,e.geoAlbersUsa=rs,e.geoArea=me,e.geoAzimuthalEqualArea=Rs,e.geoAzimuthalEqualAreaRaw=uo,e.geoAzimuthalEquidistant=Go,e.geoAzimuthalEquidistantRaw=xs,e.geoBounds=_e,e.geoCentroid=sr,e.geoCircle=Ur,e.geoClipAntimeridian=tr,e.geoClipCircle=Gi,e.geoClipExtent=xn,e.geoClipRectangle=fn,e.geoConicConformal=$o,e.geoConicConformalRaw=rl,e.geoConicEqualArea=lo,e.geoConicEqualAreaRaw=Eo,e.geoConicEquidistant=fo,e.geoConicEquidistantRaw=Po,e.geoContains=to,e.geoDistance=Ba,e.geoEqualEarth=Fs,e.geoEqualEarthRaw=Zs,e.geoEquirectangular=Ua,e.geoEquirectangularRaw=Na,e.geoGnomonic=no,e.geoGnomonicRaw=ws,e.geoGraticule=cs,e.geoGraticule10=pa,e.geoIdentity=Ls,e.geoInterpolate=ln,e.geoLength=un,e.geoMercator=So,e.geoMercatorRaw=os,e.geoNaturalEarth1=Xs,e.geoNaturalEarth1Raw=ds,e.geoOrthographic=Yo,e.geoOrthographicRaw=oa,e.geoPath=vo,e.geoProjection=Jn,e.geoProjectionMutator=Cs,e.geoRotation=Pi,e.geoStereographic=ss,e.geoStereographicRaw=po,e.geoStream=W,e.geoTransform=ma,e.geoTransverseMercator=gs,e.geoTransverseMercatorRaw=ls,Object.defineProperty(e,"__esModule",{value:!0})})});var P6e=Se((AF,z6e)=>{(function(e,t){typeof AF=="object"&&typeof z6e!="undefined"?t(AF,LX(),JE()):typeof define=="function"&&define.amd?define(["exports","d3-geo","d3-array"],t):t(e.d3=e.d3||{},e.d3,e.d3)})(AF,function(e,t,r){"use strict";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,u=Math.floor,l=Math.log,f=Math.max,c=Math.min,h=Math.pow,d=Math.round,p=Math.sign||function(ce){return ce>0?1:ce<0?-1:0},x=Math.sin,b=Math.tan,y=1e-6,k=1e-12,E=Math.PI,A=E/2,L=E/4,_=Math.SQRT1_2,C=H(2),M=H(E),v=E*2,z=180/E,T=E/180;function F(ce){return ce?ce/Math.sin(ce):1}function q(ce){return ce>1?A:ce<-1?-A:Math.asin(ce)}function U(ce){return ce>1?0:ce<-1?E:Math.acos(ce)}function H(ce){return ce>0?Math.sqrt(ce):0}function j(ce){return ce=s(2*ce),(ce-1)/(ce+1)}function G(ce){return(s(ce)-s(-ce))/2}function O(ce){return(s(ce)+s(-ce))/2}function W(ce){return l(ce+H(ce*ce+1))}function re(ce){return l(ce+H(ce*ce-1))}function ne(ce){var Ae=b(ce/2),qe=2*l(o(ce/2))/(Ae*Ae);function Ve(ot,Ke){var ft=o(ot),qt=o(Ke),Xt=x(Ke),$t=qt*ft,dr=-((1-$t?l((1+$t)/2)/(1-$t):-.5)+qe/(1+$t));return[dr*qt*x(ot),dr*Xt]}return Ve.invert=function(ot,Ke){var ft=H(ot*ot+Ke*Ke),qt=-ce/2,Xt=50,$t;if(!ft)return[0,0];do{var dr=qt/2,Mr=o(dr),$r=x(dr),ii=$r/Mr,pi=-l(n(Mr));qt-=$t=(2/ii*pi-qe*ii-ft)/(-pi/($r*$r)+1-qe/(2*Mr*Mr))*(Mr<0?.7:1)}while(n($t)>y&&--Xt>0);var Yi=x(qt);return[a(ot*Yi,ft*o(qt)),q(Ke*Yi/ft)]},Ve}function be(){var ce=A,Ae=t.geoProjectionMutator(ne),qe=Ae(ce);return qe.radius=function(Ve){return arguments.length?Ae(ce=Ve*T):ce*z},qe.scale(179.976).clipAngle(147)}function ze(ce,Ae){var qe=o(Ae),Ve=F(U(qe*o(ce/=2)));return[2*qe*x(ce)*Ve,x(Ae)*Ve]}ze.invert=function(ce,Ae){if(!(ce*ce+4*Ae*Ae>E*E+y)){var qe=ce,Ve=Ae,ot=25;do{var Ke=x(qe),ft=x(qe/2),qt=o(qe/2),Xt=x(Ve),$t=o(Ve),dr=x(2*Ve),Mr=Xt*Xt,$r=$t*$t,ii=ft*ft,pi=1-$r*qt*qt,Yi=pi?U($t*qt)*H(wn=1/pi):wn=0,wn,Tn=2*Yi*$t*ft-ce,ua=Yi*Xt-Ae,oo=wn*($r*ii+Yi*$t*qt*Mr),el=wn*(.5*Ke*dr-Yi*2*Xt*ft),ys=wn*.25*(dr*ft-Yi*Xt*$r*Ke),il=wn*(Mr*qt+Yi*ii*$t),$l=el*ys-il*oo;if(!$l)break;var pl=(ua*el-Tn*il)/$l,Hl=(Tn*ys-ua*oo)/$l;qe-=pl,Ve-=Hl}while((n(pl)>y||n(Hl)>y)&&--ot>0);return[qe,Ve]}};function Ce(){return t.geoProjection(ze).scale(152.63)}function he(ce){var Ae=x(ce),qe=o(ce),Ve=ce>=0?1:-1,ot=b(Ve*ce),Ke=(1+Ae-qe)/2;function ft(qt,Xt){var $t=o(Xt),dr=o(qt/=2);return[(1+$t)*x(qt),(Ve*Xt>-a(dr,ot)-.001?0:-Ve*10)+Ke+x(Xt)*qe-(1+$t)*Ae*dr]}return ft.invert=function(qt,Xt){var $t=0,dr=0,Mr=50;do{var $r=o($t),ii=x($t),pi=o(dr),Yi=x(dr),wn=1+pi,Tn=wn*ii-qt,ua=Ke+Yi*qe-wn*Ae*$r-Xt,oo=wn*$r/2,el=-ii*Yi,ys=Ae*wn*ii/2,il=qe*pi+Ae*$r*Yi,$l=el*ys-il*oo,pl=(ua*el-Tn*il)/$l/2,Hl=(Tn*ys-ua*oo)/$l;n(Hl)>2&&(Hl/=2),$t-=pl,dr-=Hl}while((n(pl)>y||n(Hl)>y)&&--Mr>0);return Ve*dr>-a(o($t),ot)-.001?[$t*2,dr]:null},ft}function te(){var ce=20*T,Ae=ce>=0?1:-1,qe=b(Ae*ce),Ve=t.geoProjectionMutator(he),ot=Ve(ce),Ke=ot.stream;return ot.parallel=function(ft){return arguments.length?(qe=b((Ae=(ce=ft*T)>=0?1:-1)*ce),Ve(ce)):ce*z},ot.stream=function(ft){var qt=ot.rotate(),Xt=Ke(ft),$t=(ot.rotate([0,0]),Ke(ft)),dr=ot.precision();return ot.rotate(qt),Xt.sphere=function(){$t.polygonStart(),$t.lineStart();for(var Mr=Ae*-180;Ae*Mr<180;Mr+=Ae*90)$t.point(Mr,Ae*90);if(ce)for(;Ae*(Mr-=3*Ae*dr)>=-180;)$t.point(Mr,Ae*-a(o(Mr*T/2),qe)*z);$t.lineEnd(),$t.polygonEnd()},Xt},ot.scale(218.695).center([0,28.0974])}function ke(ce,Ae){var qe=b(Ae/2),Ve=H(1-qe*qe),ot=1+Ve*o(ce/=2),Ke=x(ce)*Ve/ot,ft=qe/ot,qt=Ke*Ke,Xt=ft*ft;return[4/3*Ke*(3+qt-3*Xt),4/3*ft*(3+3*qt-Xt)]}ke.invert=function(ce,Ae){if(ce*=3/8,Ae*=3/8,!ce&&n(Ae)>1)return null;var qe=ce*ce,Ve=Ae*Ae,ot=1+qe+Ve,Ke=H((ot-H(ot*ot-4*Ae*Ae))/2),ft=q(Ke)/3,qt=Ke?re(n(Ae/Ke))/3:W(n(ce))/3,Xt=o(ft),$t=O(qt),dr=$t*$t-Xt*Xt;return[p(ce)*2*a(G(qt)*Xt,.25-dr),p(Ae)*2*a($t*x(ft),.25+dr)]};function Ee(){return t.geoProjection(ke).scale(66.1603)}var Me=H(8),Oe=l(1+C);function Re(ce,Ae){var qe=n(Ae);return qe<L?[ce,l(b(L+Ae/2))]:[ce*o(qe)*(2*C-1/x(qe)),p(Ae)*(2*C*(qe-L)-l(b(qe/2)))]}Re.invert=function(ce,Ae){if((Ke=n(Ae))<Oe)return[ce,2*i(s(Ae))-A];var qe=L,Ve=25,ot,Ke;do{var ft=o(qe/2),qt=b(qe/2);qe-=ot=(Me*(qe-L)-l(qt)-Ke)/(Me-ft*ft/(2*qt))}while(n(ot)>k&&--Ve>0);return[ce/(o(qe)*(Me-1/x(qe))),p(Ae)*qe]};function me(){return t.geoProjection(Re).scale(112.314)}function Be(ce){var Ae=2*E/ce;function qe(Ve,ot){var Ke=t.geoAzimuthalEquidistantRaw(Ve,ot);if(n(Ve)>A){var ft=a(Ke[1],Ke[0]),qt=H(Ke[0]*Ke[0]+Ke[1]*Ke[1]),Xt=Ae*d((ft-A)/Ae)+A,$t=a(x(ft-=Xt),2-o(ft));ft=Xt+q(E/qt*x($t))-$t,Ke[0]=qt*o(ft),Ke[1]=qt*x(ft)}return Ke}return qe.invert=function(Ve,ot){var Ke=H(Ve*Ve+ot*ot);if(Ke>A){var ft=a(ot,Ve),qt=Ae*d((ft-A)/Ae)+A,Xt=ft>qt?-1:1,$t=Ke*o(qt-ft),dr=1/b(Xt*U(($t-E)/H(E*(E-2*$t)+Ke*Ke)));ft=qt+2*i((dr+Xt*H(dr*dr-3))/3),Ve=Ke*o(ft),ot=Ke*x(ft)}return t.geoAzimuthalEquidistantRaw.invert(Ve,ot)},qe}function fe(){var ce=5,Ae=t.geoProjectionMutator(Be),qe=Ae(ce),Ve=qe.stream,ot=.01,Ke=-o(ot*T),ft=x(ot*T);return qe.lobes=function(qt){return arguments.length?Ae(ce=+qt):ce},qe.stream=function(qt){var Xt=qe.rotate(),$t=Ve(qt),dr=(qe.rotate([0,0]),Ve(qt));return qe.rotate(Xt),$t.sphere=function(){dr.polygonStart(),dr.lineStart();for(var Mr=0,$r=360/ce,ii=2*E/ce,pi=90-180/ce,Yi=A;Mr<ce;++Mr,pi-=$r,Yi-=ii)dr.point(a(ft*o(Yi),Ke)*z,q(ft*x(Yi))*z),pi<-90?(dr.point(-90,-180-pi-ot),dr.point(-90,-180-pi+ot)):(dr.point(90,pi+ot),dr.point(90,pi-ot));dr.lineEnd(),dr.polygonEnd()},$t},qe.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function Ze(ce,Ae){if(arguments.length<2&&(Ae=ce),Ae===1)return t.geoAzimuthalEqualAreaRaw;if(Ae===1/0)return et;function qe(Ve,ot){var Ke=t.geoAzimuthalEqualAreaRaw(Ve/Ae,ot);return Ke[0]*=ce,Ke}return qe.invert=function(Ve,ot){var Ke=t.geoAzimuthalEqualAreaRaw.invert(Ve/ce,ot);return Ke[0]*=Ae,Ke},qe}function et(ce,Ae){return[ce*o(Ae)/o(Ae/=2),2*x(Ae)]}et.invert=function(ce,Ae){var qe=2*q(Ae/2);return[ce*o(qe/2)/o(qe),qe]};function gt(){var ce=2,Ae=t.geoProjectionMutator(Ze),qe=Ae(ce);return qe.coefficient=function(Ve){return arguments.length?Ae(ce=+Ve):ce},qe.scale(169.529)}function Pt(ce,Ae,qe){var Ve=100,ot,Ke,ft;qe=qe===void 0?0:+qe,Ae=+Ae;do Ke=ce(qe),ft=ce(qe+y),Ke===ft&&(ft=Ke+y),qe-=ot=-1*y*(Ke-Ae)/(Ke-ft);while(Ve-- >0&&n(ot)>y);return Ve<0?NaN:qe}function Qe(ce,Ae,qe){return Ae===void 0&&(Ae=40),qe===void 0&&(qe=k),function(Ve,ot,Ke,ft){var qt,Xt,$t;Ke=Ke===void 0?0:+Ke,ft=ft===void 0?0:+ft;for(var dr=0;dr<Ae;dr++){var Mr=ce(Ke,ft),$r=Mr[0]-Ve,ii=Mr[1]-ot;if(n($r)<qe&&n(ii)<qe)break;var pi=$r*$r+ii*ii;if(pi>qt){Ke-=Xt/=2,ft-=$t/=2;continue}qt=pi;var Yi=(Ke>0?-1:1)*qe,wn=(ft>0?-1:1)*qe,Tn=ce(Ke+Yi,ft),ua=ce(Ke,ft+wn),oo=(Tn[0]-Mr[0])/Yi,el=(Tn[1]-Mr[1])/Yi,ys=(ua[0]-Mr[0])/wn,il=(ua[1]-Mr[1])/wn,$l=il*oo-el*ys,pl=(n($l)<.5?.5:1)/$l;if(Xt=(ii*ys-$r*il)*pl,$t=($r*el-ii*oo)*pl,Ke+=Xt,ft+=$t,n(Xt)<qe&&n($t)<qe)break}return[Ke,ft]}}function Xe(){var ce=Ze(1.68,2),Ae=1.4,qe=12;function Ve(ot,Ke){if(ot+Ke<-Ae){var ft=(ot-Ke+1.6)*(ot+Ke+Ae)/8;ot+=ft,Ke-=.8*ft*x(Ke+E/2)}var qt=ce(ot,Ke),Xt=(1-o(ot*Ke))/qe;return qt[1]<0&&(qt[0]*=1+Xt),qt[1]>0&&(qt[1]*=1+Xt/1.5*qt[0]*qt[0]),qt}return Ve.invert=Qe(Ve),Ve}function Tt(){return t.geoProjection(Xe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function xt(ce,Ae){var qe=ce*x(Ae),Ve=30,ot;do Ae-=ot=(Ae+x(Ae)-qe)/(1+o(Ae));while(n(ot)>y&&--Ve>0);return Ae/2}function _t(ce,Ae,qe){function Ve(ot,Ke){return[ce*ot*o(Ke=xt(qe,Ke)),Ae*x(Ke)]}return Ve.invert=function(ot,Ke){return Ke=q(Ke/Ae),[ot/(ce*o(Ke)),q((2*Ke+x(2*Ke))/qe)]},Ve}var Ct=_t(C/A,C,E);function jt(){return t.geoProjection(Ct).scale(169.529)}var At=2.00276,Te=1.11072;function nt(ce,Ae){var qe=xt(E,Ae);return[At*ce/(1/o(Ae)+Te/o(qe)),(Ae+C*x(qe))/At]}nt.invert=function(ce,Ae){var qe=At*Ae,Ve=Ae<0?-L:L,ot=25,Ke,ft;do ft=qe-C*x(Ve),Ve-=Ke=(x(2*Ve)+2*Ve-E*x(ft))/(2*o(2*Ve)+2+E*o(ft)*C*o(Ve));while(n(Ke)>y&&--ot>0);return ft=qe-C*x(Ve),[ce*(1/o(ft)+Te/o(Ve))/At,ft]};function ut(){return t.geoProjection(nt).scale(160.857)}function ct(ce){var Ae=0,qe=t.geoProjectionMutator(ce),Ve=qe(Ae);return Ve.parallel=function(ot){return arguments.length?qe(Ae=ot*T):Ae*z},Ve}function rt(ce,Ae){return[ce*o(Ae),Ae]}rt.invert=function(ce,Ae){return[ce/o(Ae),Ae]};function je(){return t.geoProjection(rt).scale(152.63)}function tt(ce){if(!ce)return rt;var Ae=1/b(ce);function qe(Ve,ot){var Ke=Ae+ce-ot,ft=Ke&&Ve*o(ot)/Ke;return[Ke*x(ft),Ae-Ke*o(ft)]}return qe.invert=function(Ve,ot){var Ke=H(Ve*Ve+(ot=Ae-ot)*ot),ft=Ae+ce-Ke;return[Ke/o(ft)*a(Ve,ot),ft]},qe}function Je(){return ct(tt).scale(123.082).center([0,26.1441]).parallel(45)}function Mt(ce){function Ae(qe,Ve){var ot=A-Ve,Ke=ot&&qe*ce*x(ot)/ot;return[ot*x(Ke)/ce,A-ot*o(Ke)]}return Ae.invert=function(qe,Ve){var ot=qe*ce,Ke=A-Ve,ft=H(ot*ot+Ke*Ke),qt=a(ot,Ke);return[(ft?ft/x(ft):1)*qt/ce,A-ft]},Ae}function Vt(){var ce=.5,Ae=t.geoProjectionMutator(Mt),qe=Ae(ce);return qe.fraction=function(Ve){return arguments.length?Ae(ce=+Ve):ce},qe.scale(158.837)}var Kt=_t(1,4/E,E);function ir(){return t.geoProjection(Kt).scale(152.63)}function fr(ce,Ae,qe,Ve,ot,Ke){var ft=o(Ke),qt;if(n(ce)>1||n(Ke)>1)qt=U(qe*ot+Ae*Ve*ft);else{var Xt=x(ce/2),$t=x(Ke/2);qt=2*q(H(Xt*Xt+Ae*Ve*$t*$t))}return n(qt)>y?[qt,a(Ve*x(Ke),Ae*ot-qe*Ve*ft)]:[0,0]}function Ot(ce,Ae,qe){return U((ce*ce+Ae*Ae-qe*qe)/(2*ce*Ae))}function De(ce){return ce-2*E*u((ce+E)/(2*E))}function _e(ce,Ae,qe){for(var Ve=[[ce[0],ce[1],x(ce[1]),o(ce[1])],[Ae[0],Ae[1],x(Ae[1]),o(Ae[1])],[qe[0],qe[1],x(qe[1]),o(qe[1])]],ot=Ve[2],Ke,ft=0;ft<3;++ft,ot=Ke)Ke=Ve[ft],ot.v=fr(Ke[1]-ot[1],ot[3],ot[2],Ke[3],Ke[2],Ke[0]-ot[0]),ot.point=[0,0];var qt=Ot(Ve[0].v[0],Ve[2].v[0],Ve[1].v[0]),Xt=Ot(Ve[0].v[0],Ve[1].v[0],Ve[2].v[0]),$t=E-qt;Ve[2].point[1]=0,Ve[0].point[0]=-(Ve[1].point[0]=Ve[0].v[0]/2);var dr=[Ve[2].point[0]=Ve[0].point[0]+Ve[2].v[0]*o(qt),2*(Ve[0].point[1]=Ve[1].point[1]=Ve[2].v[0]*x(qt))];function Mr($r,ii){var pi=x(ii),Yi=o(ii),wn=new Array(3),Tn;for(Tn=0;Tn<3;++Tn){var ua=Ve[Tn];if(wn[Tn]=fr(ii-ua[1],ua[3],ua[2],Yi,pi,$r-ua[0]),!wn[Tn][0])return ua.point;wn[Tn][1]=De(wn[Tn][1]-ua.v[1])}var oo=dr.slice();for(Tn=0;Tn<3;++Tn){var el=Tn==2?0:Tn+1,ys=Ot(Ve[Tn].v[0],wn[Tn][0],wn[el][0]);wn[Tn][1]<0&&(ys=-ys),Tn?Tn==1?(ys=Xt-ys,oo[0]-=wn[Tn][0]*o(ys),oo[1]-=wn[Tn][0]*x(ys)):(ys=$t-ys,oo[0]+=wn[Tn][0]*o(ys),oo[1]+=wn[Tn][0]*x(ys)):(oo[0]+=wn[Tn][0]*o(ys),oo[1]-=wn[Tn][0]*x(ys))}return oo[0]/=3,oo[1]/=3,oo}return Mr}function Fe(ce){return ce[0]*=T,ce[1]*=T,ce}function Pe(){return Ie([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ie(ce,Ae,qe){var Ve=t.geoCentroid({type:"MultiPoint",coordinates:[ce,Ae,qe]}),ot=[-Ve[0],-Ve[1]],Ke=t.geoRotation(ot),ft=_e(Fe(Ke(ce)),Fe(Ke(Ae)),Fe(Ke(qe)));ft.invert=Qe(ft);var qt=t.geoProjection(ft).rotate(ot),Xt=qt.center;return delete qt.rotate,qt.center=function($t){return arguments.length?Xt(Ke($t)):Ke.invert(Xt())},qt.clipAngle(90)}function lt(ce,Ae){var qe=H(1-x(Ae));return[2/M*ce*qe,M*(1-qe)]}lt.invert=function(ce,Ae){var qe=(qe=Ae/M-1)*qe;return[qe>0?ce*H(E/qe)/2:0,q(1-qe)]};function ye(){return t.geoProjection(lt).scale(95.6464).center([0,30])}function ue(ce){var Ae=b(ce);function qe(Ve,ot){return[Ve,(Ve?Ve/x(Ve):1)*(x(ot)*o(Ve)-Ae*o(ot))]}return qe.invert=Ae?function(Ve,ot){Ve&&(ot*=x(Ve)/Ve);var Ke=o(Ve);return[Ve,2*a(H(Ke*Ke+Ae*Ae-ot*ot)-Ke,Ae-ot)]}:function(Ve,ot){return[Ve,q(Ve?ot*b(Ve)/Ve:ot)]},qe}function de(){return ct(ue).scale(249.828).clipAngle(90)}var ht=H(3);function Et(ce,Ae){return[ht*ce*(2*o(2*Ae/3)-1)/M,ht*M*x(Ae/3)]}Et.invert=function(ce,Ae){var qe=3*q(Ae/(ht*M));return[M*ce/(ht*(2*o(2*qe/3)-1)),qe]};function St(){return t.geoProjection(Et).scale(156.19)}function Zt(ce){var Ae=o(ce);function qe(Ve,ot){return[Ve*Ae,x(ot)/Ae]}return qe.invert=function(Ve,ot){return[Ve/Ae,q(ot*Ae)]},qe}function qr(){return ct(Zt).parallel(38.58).scale(195.044)}function Lr(ce){var Ae=o(ce);function qe(Ve,ot){return[Ve*Ae,(1+Ae)*b(ot/2)]}return qe.invert=function(Ve,ot){return[Ve/Ae,i(ot/(1+Ae))*2]},qe}function vr(){return ct(Lr).scale(124.75)}function Er(ce,Ae){var qe=H(8/(3*E));return[qe*ce*(1-n(Ae)/E),qe*Ae]}Er.invert=function(ce,Ae){var qe=H(8/(3*E)),Ve=Ae/qe;return[ce/(qe*(1-n(Ve)/E)),Ve]};function si(){return t.geoProjection(Er).scale(165.664)}function Ei(ce,Ae){var qe=H(4-3*x(n(Ae)));return[2/H(6*E)*ce*qe,p(Ae)*H(2*E/3)*(2-qe)]}Ei.invert=function(ce,Ae){var qe=2-n(Ae)/H(2*E/3);return[ce*H(6*E)/(2*qe),p(Ae)*q((4-qe*qe)/3)]};function Si(){return t.geoProjection(Ei).scale(165.664)}function xi(ce,Ae){var qe=H(E*(4+E));return[2/qe*ce*(1+H(1-4*Ae*Ae/(E*E))),4/qe*Ae]}xi.invert=function(ce,Ae){var qe=H(E*(4+E))/2;return[ce*qe/(1+H(1-Ae*Ae*(4+E)/(4*E))),Ae*qe/2]};function Hi(){return t.geoProjection(xi).scale(180.739)}function Jr(ce,Ae){var qe=(2+A)*x(Ae);Ae/=2;for(var Ve=0,ot=1/0;Ve<10&&n(ot)>y;Ve++){var Ke=o(Ae);Ae-=ot=(Ae+x(Ae)*(Ke+2)-qe)/(2*Ke*(1+Ke))}return[2/H(E*(4+E))*ce*(1+o(Ae)),2*H(E/(4+E))*x(Ae)]}Jr.invert=function(ce,Ae){var qe=Ae*H((4+E)/E)/2,Ve=q(qe),ot=o(Ve);return[ce/(2/H(E*(4+E))*(1+ot)),q((Ve+qe*(ot+2))/(2+A))]};function ci(){return t.geoProjection(Jr).scale(180.739)}function Di(ce,Ae){return[ce*(1+o(Ae))/H(2+E),2*Ae/H(2+E)]}Di.invert=function(ce,Ae){var qe=H(2+E),Ve=Ae*qe/2;return[qe*ce/(1+o(Ve)),Ve]};function Lt(){return t.geoProjection(Di).scale(173.044)}function vt(ce,Ae){for(var qe=(1+A)*x(Ae),Ve=0,ot=1/0;Ve<10&&n(ot)>y;Ve++)Ae-=ot=(Ae+x(Ae)-qe)/(1+o(Ae));return qe=H(2+E),[ce*(1+o(Ae))/qe,2*Ae/qe]}vt.invert=function(ce,Ae){var qe=1+A,Ve=H(qe/2);return[ce*2*Ve/(1+o(Ae*=Ve)),q((Ae+x(Ae))/qe)]};function Dt(){return t.geoProjection(vt).scale(173.044)}var Bt=3+2*C;function sr(ce,Ae){var qe=x(ce/=2),Ve=o(ce),ot=H(o(Ae)),Ke=o(Ae/=2),ft=x(Ae)/(Ke+C*Ve*ot),qt=H(2/(1+ft*ft)),Xt=H((C*Ke+(Ve+qe)*ot)/(C*Ke+(Ve-qe)*ot));return[Bt*(qt*(Xt-1/Xt)-2*l(Xt)),Bt*(qt*ft*(Xt+1/Xt)-2*i(ft))]}sr.invert=function(ce,Ae){if(!(Ke=ke.invert(ce/1.2,Ae*1.065)))return null;var qe=Ke[0],Ve=Ke[1],ot=20,Ke;ce/=Bt,Ae/=Bt;do{var ft=qe/2,qt=Ve/2,Xt=x(ft),$t=o(ft),dr=x(qt),Mr=o(qt),$r=o(Ve),ii=H($r),pi=dr/(Mr+C*$t*ii),Yi=pi*pi,wn=H(2/(1+Yi)),Tn=C*Mr+($t+Xt)*ii,ua=C*Mr+($t-Xt)*ii,oo=Tn/ua,el=H(oo),ys=el-1/el,il=el+1/el,$l=wn*ys-2*l(el)-ce,pl=wn*pi*il-2*i(pi)-Ae,Hl=dr&&_*ii*Xt*Yi/dr,Ll=(C*$t*Mr+ii)/(2*(Mr+C*$t*ii)*(Mr+C*$t*ii)*ii),Ql=-.5*pi*wn*wn*wn,ku=Ql*Hl,Jl=Ql*Ll,Kl=(Kl=2*Mr+C*ii*($t-Xt))*Kl*el,Hu=(C*$t*Mr*ii+$r)/Kl,tf=-(C*Xt*dr)/(ii*Kl),Ku=ys*ku-2*Hu/el+wn*(Hu+Hu/oo),Gu=ys*Jl-2*tf/el+wn*(tf+tf/oo),Wu=pi*il*ku-2*Hl/(1+Yi)+wn*il*Hl+wn*pi*(Hu-Hu/oo),sf=pi*il*Jl-2*Ll/(1+Yi)+wn*il*Ll+wn*pi*(tf-tf/oo),gf=Gu*Wu-sf*Ku;if(!gf)break;var nf=(pl*Gu-$l*sf)/gf,af=($l*Wu-pl*Ku)/gf;qe-=nf,Ve=f(-A,c(A,Ve-af))}while((n(nf)>y||n(af)>y)&&--ot>0);return n(n(Ve)-A)<y?[0,Ve]:ot&&[qe,Ve]};function br(){return t.geoProjection(sr).scale(62.5271)}var zr=o(35*T);function Tr(ce,Ae){var qe=b(Ae/2);return[ce*zr*H(1-qe*qe),(1+zr)*qe]}Tr.invert=function(ce,Ae){var qe=Ae/(1+zr);return[ce&&ce/(zr*H(1-qe*qe)),2*i(qe)]};function Rr(){return t.geoProjection(Tr).scale(137.152)}function Br(ce,Ae){var qe=Ae/2,Ve=o(qe);return[2*ce/M*o(Ae)*Ve*Ve,M*b(qe)]}Br.invert=function(ce,Ae){var qe=i(Ae/M),Ve=o(qe),ot=2*qe;return[ce*M/2/(o(ot)*Ve*Ve),ot]};function oi(){return t.geoProjection(Br).scale(135.264)}function vi(ce){var Ae=1-ce,qe=Ke(E,0)[0]-Ke(-E,0)[0],Ve=Ke(0,A)[1]-Ke(0,-A)[1],ot=H(2*Ve/qe);function Ke(Xt,$t){var dr=o($t),Mr=x($t);return[dr/(Ae+ce*dr)*Xt,Ae*$t+ce*Mr]}function ft(Xt,$t){var dr=Ke(Xt,$t);return[dr[0]*ot,dr[1]/ot]}function qt(Xt){return ft(0,Xt)[1]}return ft.invert=function(Xt,$t){var dr=Pt(qt,$t),Mr=Xt/ot*(ce+Ae/o(dr));return[Mr,dr]},ft}function Pi(){var ce=.5,Ae=t.geoProjectionMutator(vi),qe=Ae(ce);return qe.alpha=function(Ve){return arguments.length?Ae(ce=+Ve):ce},qe.scale(168.725)}function Yr(ce){return[ce[0]/2,q(b(ce[1]/2*T))*z]}function Ni(ce){return[ce[0]*2,2*i(x(ce[1]*T))*z]}function Ur(ce){ce==null&&(ce=t.geoOrthographic);var Ae=ce(),qe=t.geoEquirectangular().scale(z).precision(0).clipAngle(null).translate([0,0]);function Ve(Ke){return Ae(Yr(Ke))}Ae.invert&&(Ve.invert=function(Ke){return Ni(Ae.invert(Ke))}),Ve.stream=function(Ke){var ft=Ae.stream(Ke),qt=qe.stream({point:function(Xt,$t){ft.point(Xt/2,q(b(-$t/2*T))*z)},lineStart:function(){ft.lineStart()},lineEnd:function(){ft.lineEnd()},polygonStart:function(){ft.polygonStart()},polygonEnd:function(){ft.polygonEnd()}});return qt.sphere=ft.sphere,qt};function ot(Ke){Ve[Ke]=function(){return arguments.length?(Ae[Ke].apply(Ae,arguments),Ve):Ae[Ke]()}}return Ve.rotate=function(Ke){return arguments.length?(qe.rotate(Ke),Ve):qe.rotate()},Ve.center=function(Ke){return arguments.length?(Ae.center(Yr(Ke)),Ve):Ni(Ae.center())},ot("angle"),ot("clipAngle"),ot("clipExtent"),ot("fitExtent"),ot("fitHeight"),ot("fitSize"),ot("fitWidth"),ot("scale"),ot("translate"),ot("precision"),Ve.scale(249.5)}function ti(ce,Ae){var qe=2*E/Ae,Ve=ce*ce;function ot(Ke,ft){var qt=t.geoAzimuthalEquidistantRaw(Ke,ft),Xt=qt[0],$t=qt[1],dr=Xt*Xt+$t*$t;if(dr>Ve){var Mr=H(dr),$r=a($t,Xt),ii=qe*d($r/qe),pi=$r-ii,Yi=ce*o(pi),wn=(ce*x(pi)-pi*x(Yi))/(A-Yi),Tn=ki(pi,wn),ua=(E-ce)/ji(Tn,Yi,E);Xt=Mr;var oo=50,el;do Xt-=el=(ce+ji(Tn,Yi,Xt)*ua-Mr)/(Tn(Xt)*ua);while(n(el)>y&&--oo>0);$t=pi*x(Xt),Xt<A&&($t-=wn*(Xt-A));var ys=x(ii),il=o(ii);qt[0]=Xt*il-$t*ys,qt[1]=Xt*ys+$t*il}return qt}return ot.invert=function(Ke,ft){var qt=Ke*Ke+ft*ft;if(qt>Ve){var Xt=H(qt),$t=a(ft,Ke),dr=qe*d($t/qe),Mr=$t-dr;Ke=Xt*o(Mr),ft=Xt*x(Mr);for(var $r=Ke-A,ii=x(Ke),pi=ft/ii,Yi=Ke<A?1/0:0,wn=10;;){var Tn=ce*x(pi),ua=ce*o(pi),oo=x(ua),el=A-ua,ys=(Tn-pi*oo)/el,il=ki(pi,ys);if(n(Yi)<k||!--wn)break;pi-=Yi=(pi*ii-ys*$r-ft)/(ii-$r*2*(el*(ua+pi*Tn*o(ua)-oo)-Tn*(Tn-pi*oo))/(el*el))}Xt=ce+ji(il,ua,Ke)*(E-ce)/ji(il,ua,E),$t=dr+pi,Ke=Xt*o($t),ft=Xt*x($t)}return t.geoAzimuthalEquidistantRaw.invert(Ke,ft)},ot}function ki(ce,Ae){return function(qe){var Ve=ce*o(qe);return qe<A&&(Ve-=Ae),H(1+Ve*Ve)}}function ji(ce,Ae,qe){for(var Ve=50,ot=(qe-Ae)/Ve,Ke=ce(Ae)+ce(qe),ft=1,qt=Ae;ft<Ve;++ft)Ke+=2*ce(qt+=ot);return Ke*.5*ot}function Vi(){var ce=6,Ae=30*T,qe=o(Ae),Ve=x(Ae),ot=t.geoProjectionMutator(ti),Ke=ot(Ae,ce),ft=Ke.stream,qt=.01,Xt=-o(qt*T),$t=x(qt*T);return Ke.radius=function(dr){return arguments.length?(qe=o(Ae=dr*T),Ve=x(Ae),ot(Ae,ce)):Ae*z},Ke.lobes=function(dr){return arguments.length?ot(Ae,ce=+dr):ce},Ke.stream=function(dr){var Mr=Ke.rotate(),$r=ft(dr),ii=(Ke.rotate([0,0]),ft(dr));return Ke.rotate(Mr),$r.sphere=function(){ii.polygonStart(),ii.lineStart();for(var pi=0,Yi=2*E/ce,wn=0;pi<ce;++pi,wn-=Yi)ii.point(a($t*o(wn),Xt)*z,q($t*x(wn))*z),ii.point(a(Ve*o(wn-Yi/2),qe)*z,q(Ve*x(wn-Yi/2))*z);ii.lineEnd(),ii.polygonEnd()},$r},Ke.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function zi(ce,Ae,qe,Ve,ot,Ke,ft,qt){arguments.length<8&&(qt=0);function Xt($t,dr){if(!dr)return[ce*$t/E,0];var Mr=dr*dr,$r=ce+Mr*(Ae+Mr*(qe+Mr*Ve)),ii=dr*(ot-1+Mr*(Ke-qt+Mr*ft)),pi=($r*$r+ii*ii)/(2*ii),Yi=$t*q($r/pi)/E;return[pi*x(Yi),dr*(1+Mr*qt)+pi*(1-o(Yi))]}return Xt.invert=function($t,dr){var Mr=E*$t/ce,$r=dr,ii,pi,Yi=50;do{var wn=$r*$r,Tn=ce+wn*(Ae+wn*(qe+wn*Ve)),ua=$r*(ot-1+wn*(Ke-qt+wn*ft)),oo=Tn*Tn+ua*ua,el=2*ua,ys=oo/el,il=ys*ys,$l=q(Tn/ys)/E,pl=Mr*$l,Hl=Tn*Tn,Ll=(2*Ae+wn*(4*qe+wn*6*Ve))*$r,Ql=ot+wn*(3*Ke+wn*5*ft),ku=2*(Tn*Ll+ua*(Ql-1)),Jl=2*(Ql-1),Kl=(ku*el-oo*Jl)/(el*el),Hu=o(pl),tf=x(pl),Ku=ys*Hu,Gu=ys*tf,Wu=Mr/E*(1/H(1-Hl/il))*(Ll*ys-Tn*Kl)/il,sf=Gu-$t,gf=$r*(1+wn*qt)+ys-Ku-dr,nf=Kl*tf+Ku*Wu,af=Ku*$l,X=1+Kl-(Kl*Hu-Gu*Wu),se=Gu*$l,Le=nf*se-X*af;if(!Le)break;Mr-=ii=(gf*nf-sf*X)/Le,$r-=pi=(sf*se-gf*af)/Le}while((n(ii)>y||n(pi)>y)&&--Yi>0);return[Mr,$r]},Xt}var Mi=zi(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function sn(){return t.geoProjection(Mi).scale(149.995)}var fi=zi(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Or(){return t.geoProjection(fi).scale(153.93)}var st=zi(5/6*E,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Wt(){return t.geoProjection(st).scale(130.945)}function tr(ce,Ae){var qe=ce*ce,Ve=Ae*Ae;return[ce*(1-.162388*Ve)*(.87-952426e-9*qe*qe),Ae*(1+Ve/12)]}tr.invert=function(ce,Ae){var qe=ce,Ve=Ae,ot=50,Ke;do{var ft=Ve*Ve;Ve-=Ke=(Ve*(1+ft/12)-Ae)/(1+ft/4)}while(n(Ke)>y&&--ot>0);ot=50,ce/=1-.162388*ft;do{var qt=(qt=qe*qe)*qt;qe-=Ke=(qe*(.87-952426e-9*qt)-ce)/(.87-.00476213*qt)}while(n(Ke)>y&&--ot>0);return[qe,Ve]};function or(){return t.geoProjection(tr).scale(131.747)}var Nr=zi(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function hi(){return t.geoProjection(Nr).scale(131.087)}function Gi(ce){var Ae=ce(A,0)[0]-ce(-A,0)[0];function qe(Ve,ot){var Ke=Ve>0?-.5:.5,ft=ce(Ve+Ke*E,ot);return ft[0]-=Ke*Ae,ft}return ce.invert&&(qe.invert=function(Ve,ot){var Ke=Ve>0?-.5:.5,ft=ce.invert(Ve+Ke*Ae,ot),qt=ft[0]-Ke*E;return qt<-E?qt+=2*E:qt>E&&(qt-=2*E),ft[0]=qt,ft}),qe}function Qr(ce,Ae){var qe=p(ce),Ve=p(Ae),ot=o(Ae),Ke=o(ce)*ot,ft=x(ce)*ot,qt=x(Ve*Ae);ce=n(a(ft,qt)),Ae=q(Ke),n(ce-A)>y&&(ce%=A);var Xt=Ui(ce>E/4?A-ce:ce,Ae);return ce>E/4&&(qt=Xt[0],Xt[0]=-Xt[1],Xt[1]=-qt),Xt[0]*=qe,Xt[1]*=-Ve,Xt}Qr.invert=function(ce,Ae){n(ce)>1&&(ce=p(ce)*2-ce),n(Ae)>1&&(Ae=p(Ae)*2-Ae);var qe=p(ce),Ve=p(Ae),ot=-qe*ce,Ke=-Ve*Ae,ft=Ke/ot<1,qt=zn(ft?Ke:ot,ft?ot:Ke),Xt=qt[0],$t=qt[1],dr=o($t);return ft&&(Xt=-A-Xt),[qe*(a(x(Xt)*dr,-x($t))+E),Ve*q(o(Xt)*dr)]};function Ui(ce,Ae){if(Ae===A)return[0,0];var qe=x(Ae),Ve=qe*qe,ot=Ve*Ve,Ke=1+ot,ft=1+3*ot,qt=1-ot,Xt=q(1/H(Ke)),$t=qt+Ve*Ke*Xt,dr=(1-qe)/$t,Mr=H(dr),$r=dr*Ke,ii=H($r),pi=Mr*qt,Yi,wn;if(ce===0)return[0,-(pi+Ve*ii)];var Tn=o(Ae),ua=1/Tn,oo=2*qe*Tn,el=(-3*Ve+Xt*ft)*oo,ys=(-$t*Tn-(1-qe)*el)/($t*$t),il=.5*ys/Mr,$l=qt*il-2*Ve*Mr*oo,pl=Ve*Ke*ys+dr*ft*oo,Hl=-ua*oo,Ll=-ua*pl,Ql=-2*ua*$l,ku=4*ce/E,Jl;if(ce>.222*E||Ae<E/4&&ce>.175*E){if(Yi=(pi+Ve*H($r*(1+ot)-pi*pi))/(1+ot),ce>E/4)return[Yi,Yi];var Kl=Yi,Hu=.5*Yi;Yi=.5*(Hu+Kl),wn=50;do{var tf=H($r-Yi*Yi),Ku=Yi*(Ql+Hl*tf)+Ll*q(Yi/ii)-ku;if(!Ku)break;Ku<0?Hu=Yi:Kl=Yi,Yi=.5*(Hu+Kl)}while(n(Kl-Hu)>y&&--wn>0)}else{Yi=y,wn=25;do{var Gu=Yi*Yi,Wu=H($r-Gu),sf=Ql+Hl*Wu,gf=Yi*sf+Ll*q(Yi/ii)-ku,nf=sf+(Ll-Hl*Gu)/Wu;Yi-=Jl=Wu?gf/nf:0}while(n(Jl)>y&&--wn>0)}return[Yi,-pi-Ve*H($r-Yi*Yi)]}function zn(ce,Ae){for(var qe=0,Ve=1,ot=.5,Ke=50;;){var ft=ot*ot,qt=H(ot),Xt=q(1/H(1+ft)),$t=1-ft+ot*(1+ft)*Xt,dr=(1-qt)/$t,Mr=H(dr),$r=dr*(1+ft),ii=Mr*(1-ft),pi=$r-ce*ce,Yi=H(pi),wn=Ae+ii+ot*Yi;if(n(Ve-qe)<k||--Ke===0||wn===0)break;wn>0?qe=ot:Ve=ot,ot=.5*(qe+Ve)}if(!Ke)return null;var Tn=q(qt),ua=o(Tn),oo=1/ua,el=2*qt*ua,ys=(-3*ot+Xt*(1+3*ft))*el,il=(-$t*ua-(1-qt)*ys)/($t*$t),$l=.5*il/Mr,pl=(1-ft)*$l-2*ot*Mr*el,Hl=-2*oo*pl,Ll=-oo*el,Ql=-oo*(ot*(1+ft)*il+dr*(1+3*ft)*el);return[E/4*(ce*(Hl+Ll*Yi)+Ql*q(ce/H($r))),Tn]}function fn(){return t.geoProjection(Gi(Qr)).scale(239.75)}function xn(ce,Ae,qe){var Ve,ot,Ke;return ce?(Ve=_a(ce,qe),Ae?(ot=_a(Ae,1-qe),Ke=ot[1]*ot[1]+qe*Ve[0]*Ve[0]*ot[0]*ot[0],[[Ve[0]*ot[2]/Ke,Ve[1]*Ve[2]*ot[0]*ot[1]/Ke],[Ve[1]*ot[1]/Ke,-Ve[0]*Ve[2]*ot[0]*ot[2]/Ke],[Ve[2]*ot[1]*ot[2]/Ke,-qe*Ve[0]*Ve[1]*ot[0]/Ke]]):[[Ve[0],0],[Ve[1],0],[Ve[2],0]]):(ot=_a(Ae,1-qe),[[0,ot[0]/ot[1]],[1/ot[1],0],[ot[2]/ot[1],0]])}function _a(ce,Ae){var qe,Ve,ot,Ke,ft;if(Ae<y)return Ke=x(ce),Ve=o(ce),qe=Ae*(ce-Ke*Ve)/4,[Ke-qe*Ve,Ve+qe*Ke,1-Ae*Ke*Ke/2,ce-qe];if(Ae>=1-y)return qe=(1-Ae)/4,Ve=O(ce),Ke=j(ce),ot=1/Ve,ft=Ve*G(ce),[Ke+qe*(ft-ce)/(Ve*Ve),ot-qe*Ke*ot*(ft-ce),ot+qe*Ke*ot*(ft+ce),2*i(s(ce))-A+qe*(ft-ce)/Ve];var qt=[1,0,0,0,0,0,0,0,0],Xt=[H(Ae),0,0,0,0,0,0,0,0],$t=0;for(Ve=H(1-Ae),ft=1;n(Xt[$t]/qt[$t])>y&&$t<8;)qe=qt[$t++],Xt[$t]=(qe-Ve)/2,qt[$t]=(qe+Ve)/2,Ve=H(qe*Ve),ft*=2;ot=ft*qt[$t]*ce;do Ke=Xt[$t]*x(Ve=ot)/qt[$t],ot=(q(Ke)+ot)/2;while(--$t);return[x(ot),Ke=o(ot),Ke/o(ot-Ve),ot]}function Wn(ce,Ae,qe){var Ve=n(ce),ot=n(Ae),Ke=G(ot);if(Ve){var ft=1/x(Ve),qt=1/(b(Ve)*b(Ve)),Xt=-(qt+qe*(Ke*Ke*ft*ft)-1+qe),$t=(qe-1)*qt,dr=(-Xt+H(Xt*Xt-4*$t))/2;return[Fn(i(1/H(dr)),qe)*p(ce),Fn(i(H((dr/qt-1)/qe)),1-qe)*p(Ae)]}return[0,Fn(i(Ke),1-qe)*p(Ae)]}function Fn(ce,Ae){if(!Ae)return ce;if(Ae===1)return l(b(ce/2+L));for(var qe=1,Ve=H(1-Ae),ot=H(Ae),Ke=0;n(ot)>y;Ke++){if(ce%E){var ft=i(Ve*b(ce)/qe);ft<0&&(ft+=E),ce+=ft+~~(ce/E)*E}else ce+=ce;ot=(qe+Ve)/2,Ve=H(qe*Ve),ot=((qe=ot)-Ve)/2}return ce/(h(2,Ke)*qe)}function ia(ce,Ae){var qe=(C-1)/(C+1),Ve=H(1-qe*qe),ot=Fn(A,Ve*Ve),Ke=-1,ft=l(b(E/4+n(Ae)/2)),qt=s(Ke*ft)/H(qe),Xt=za(qt*o(Ke*ce),qt*x(Ke*ce)),$t=Wn(Xt[0],Xt[1],Ve*Ve);return[-$t[1],(Ae>=0?1:-1)*(.5*ot-$t[0])]}function za(ce,Ae){var qe=ce*ce,Ve=Ae+1,ot=1-qe-Ae*Ae;return[.5*((ce>=0?A:-A)-a(ot,2*ce)),-.25*l(ot*ot+4*qe)+.5*l(Ve*Ve+qe)]}function Hr(ce,Ae){var qe=Ae[0]*Ae[0]+Ae[1]*Ae[1];return[(ce[0]*Ae[0]+ce[1]*Ae[1])/qe,(ce[1]*Ae[0]-ce[0]*Ae[1])/qe]}ia.invert=function(ce,Ae){var qe=(C-1)/(C+1),Ve=H(1-qe*qe),ot=Fn(A,Ve*Ve),Ke=-1,ft=xn(.5*ot-Ae,-ce,Ve*Ve),qt=Hr(ft[0],ft[1]),Xt=a(qt[1],qt[0])/Ke;return[Xt,2*i(s(.5/Ke*l(qe*qt[0]*qt[0]+qe*qt[1]*qt[1])))-A]};function na(){return t.geoProjection(Gi(ia)).scale(151.496)}function go(ce){var Ae=x(ce),qe=o(ce),Ve=Dn(ce);Ve.invert=Dn(-ce);function ot(Ke,ft){var qt=Ve(Ke,ft);Ke=qt[0],ft=qt[1];var Xt=x(ft),$t=o(ft),dr=o(Ke),Mr=U(Ae*Xt+qe*$t*dr),$r=x(Mr),ii=n($r)>y?Mr/$r:1;return[ii*qe*x(Ke),(n(Ke)>A?ii:-ii)*(Ae*$t-qe*Xt*dr)]}return ot.invert=function(Ke,ft){var qt=H(Ke*Ke+ft*ft),Xt=-x(qt),$t=o(qt),dr=qt*$t,Mr=-ft*Xt,$r=qt*Ae,ii=H(dr*dr+Mr*Mr-$r*$r),pi=a(dr*$r+Mr*ii,Mr*$r-dr*ii),Yi=(qt>A?-1:1)*a(Ke*Xt,qt*o(pi)*$t+ft*x(pi)*Xt);return Ve.invert(Yi,pi)},ot}function Dn(ce){var Ae=x(ce),qe=o(ce);return function(Ve,ot){var Ke=o(ot),ft=o(Ve)*Ke,qt=x(Ve)*Ke,Xt=x(ot);return[a(qt,ft*qe-Xt*Ae),q(Xt*qe+ft*Ae)]}}function un(){var ce=0,Ae=t.geoProjectionMutator(go),qe=Ae(ce),Ve=qe.rotate,ot=qe.stream,Ke=t.geoCircle();return qe.parallel=function(ft){if(!arguments.length)return ce*z;var qt=qe.rotate();return Ae(ce=ft*T).rotate(qt)},qe.rotate=function(ft){return arguments.length?(Ve.call(qe,[ft[0],ft[1]-ce*z]),Ke.center([-ft[0],-ft[1]]),qe):(ft=Ve.call(qe),ft[1]+=ce*z,ft)},qe.stream=function(ft){return ft=ot(ft),ft.sphere=function(){ft.polygonStart();var qt=.01,Xt=Ke.radius(90-qt)().coordinates[0],$t=Xt.length-1,dr=-1,Mr;for(ft.lineStart();++dr<$t;)ft.point((Mr=Xt[dr])[0],Mr[1]);for(ft.lineEnd(),Xt=Ke.radius(90+qt)().coordinates[0],$t=Xt.length-1,ft.lineStart();--dr>=0;)ft.point((Mr=Xt[dr])[0],Mr[1]);ft.lineEnd(),ft.polygonEnd()},ft},qe.scale(79.4187).parallel(45).clipAngle(180-.001)}var Zn=3,Wo=q(1-1/Zn)*z,Ba=Zt(0);function Bo(ce){var Ae=Wo*T,qe=lt(E,Ae)[0]-lt(-E,Ae)[0],Ve=Ba(0,Ae)[1],ot=lt(0,Ae)[1],Ke=M-ot,ft=v/ce,qt=4/v,Xt=Ve+Ke*Ke*4/v;function $t(dr,Mr){var $r,ii=n(Mr);if(ii>Ae){var pi=c(ce-1,f(0,u((dr+E)/ft)));dr+=E*(ce-1)/ce-pi*ft,$r=lt(dr,ii),$r[0]=$r[0]*v/qe-v*(ce-1)/(2*ce)+pi*v/ce,$r[1]=Ve+($r[1]-ot)*4*Ke/v,Mr<0&&($r[1]=-$r[1])}else $r=Ba(dr,Mr);return $r[0]*=qt,$r[1]/=Xt,$r}return $t.invert=function(dr,Mr){dr/=qt,Mr*=Xt;var $r=n(Mr);if($r>Ve){var ii=c(ce-1,f(0,u((dr+E)/ft)));dr=(dr+E*(ce-1)/ce-ii*ft)*qe/v;var pi=lt.invert(dr,.25*($r-Ve)*v/Ke+ot);return pi[0]-=E*(ce-1)/ce-ii*ft,Mr<0&&(pi[1]=-pi[1]),pi}return Ba.invert(dr,Mr)},$t}function Ea(ce,Ae){return[ce,Ae&1?90-y:Wo]}function Ha(ce,Ae){return[ce,Ae&1?-90+y:-Wo]}function tn(ce){return[ce[0]*(1-y),ce[1]]}function Cn(ce){var Ae=[].concat(r.range(-180,180+ce/2,ce).map(Ea),r.range(180,-180-ce/2,-ce).map(Ha));return{type:"Polygon",coordinates:[ce===180?Ae.map(tn):Ae]}}function Xn(){var ce=4,Ae=t.geoProjectionMutator(Bo),qe=Ae(ce),Ve=qe.stream;return qe.lobes=function(ot){return arguments.length?Ae(ce=+ot):ce},qe.stream=function(ot){var Ke=qe.rotate(),ft=Ve(ot),qt=(qe.rotate([0,0]),Ve(ot));return qe.rotate(Ke),ft.sphere=function(){t.geoStream(Cn(180/ce),qt)},ft},qe.scale(239.75)}function ts(ce){var Ae=1+ce,qe=x(1/Ae),Ve=q(qe),ot=2*H(E/(Ke=E+4*Ve*Ae)),Ke,ft=.5*ot*(Ae+H(ce*(2+ce))),qt=ce*ce,Xt=Ae*Ae;function $t(dr,Mr){var $r=1-x(Mr),ii,pi;if($r&&$r<2){var Yi=A-Mr,wn=25,Tn;do{var ua=x(Yi),oo=o(Yi),el=Ve+a(ua,Ae-oo),ys=1+Xt-2*Ae*oo;Yi-=Tn=(Yi-qt*Ve-Ae*ua+ys*el-.5*$r*Ke)/(2*Ae*ua*el)}while(n(Tn)>k&&--wn>0);ii=ot*H(ys),pi=dr*el/E}else ii=ot*(ce+$r),pi=dr*Ve/E;return[ii*x(pi),ft-ii*o(pi)]}return $t.invert=function(dr,Mr){var $r=dr*dr+(Mr-=ft)*Mr,ii=(1+Xt-$r/(ot*ot))/(2*Ae),pi=U(ii),Yi=x(pi),wn=Ve+a(Yi,Ae-ii);return[q(dr/H($r))*E/wn,q(1-2*(pi-qt*Ve-Ae*Yi+(1+Xt-2*Ae*ii)*wn)/Ke)]},$t}function Ja(){var ce=1,Ae=t.geoProjectionMutator(ts),qe=Ae(ce);return qe.ratio=function(Ve){return arguments.length?Ae(ce=+Ve):ce},qe.scale(167.774).center([0,18.67])}var to=.7109889596207567,Ri=.0528035274542;function an(ce,Ae){return Ae>-to?(ce=Ct(ce,Ae),ce[1]+=Ri,ce):rt(ce,Ae)}an.invert=function(ce,Ae){return Ae>-to?Ct.invert(ce,Ae-Ri):rt.invert(ce,Ae)};function cs(){return t.geoProjection(an).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function pa(ce,Ae){return n(Ae)>to?(ce=Ct(ce,Ae),ce[1]-=Ae>0?Ri:-Ri,ce):rt(ce,Ae)}pa.invert=function(ce,Ae){return n(Ae)>to?Ct.invert(ce,Ae+(Ae>0?Ri:-Ri)):rt.invert(ce,Ae)};function ln(){return t.geoProjection(pa).scale(152.63)}function ka(ce,Ae,qe,Ve){var ot=H(4*E/(2*qe+(1+ce-Ae/2)*x(2*qe)+(ce+Ae)/2*x(4*qe)+Ae/2*x(6*qe))),Ke=H(Ve*x(qe)*H((1+ce*o(2*qe)+Ae*o(4*qe))/(1+ce+Ae))),ft=qe*Xt(1);function qt(Mr){return H(1+ce*o(2*Mr)+Ae*o(4*Mr))}function Xt(Mr){var $r=Mr*qe;return(2*$r+(1+ce-Ae/2)*x(2*$r)+(ce+Ae)/2*x(4*$r)+Ae/2*x(6*$r))/qe}function $t(Mr){return qt(Mr)*x(Mr)}var dr=function(Mr,$r){var ii=qe*Pt(Xt,ft*x($r)/qe,$r/E);isNaN(ii)&&(ii=qe*p($r));var pi=ot*qt(ii);return[pi*Ke*Mr/E*o(ii),pi/Ke*x(ii)]};return dr.invert=function(Mr,$r){var ii=Pt($t,$r*Ke/ot);return[Mr*E/(o(ii)*ot*Ke*qt(ii)),q(qe*Xt(ii/qe)/ft)]},qe===0&&(ot=H(Ve/E),dr=function(Mr,$r){return[Mr*ot,x($r)/ot]},dr.invert=function(Mr,$r){return[Mr/ot,q($r*ot)]}),dr}function va(){var ce=1,Ae=0,qe=45*T,Ve=2,ot=t.geoProjectionMutator(ka),Ke=ot(ce,Ae,qe,Ve);return Ke.a=function(ft){return arguments.length?ot(ce=+ft,Ae,qe,Ve):ce},Ke.b=function(ft){return arguments.length?ot(ce,Ae=+ft,qe,Ve):Ae},Ke.psiMax=function(ft){return arguments.length?ot(ce,Ae,qe=+ft*T,Ve):qe*z},Ke.ratio=function(ft){return arguments.length?ot(ce,Ae,qe,Ve=+ft):Ve},Ke.scale(180.739)}function bo(ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr){if(dr.nanEncountered)return NaN;var Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el;if(Mr=qe-Ae,$r=ce(Ae+Mr*.25),ii=ce(qe-Mr*.25),isNaN($r)){dr.nanEncountered=!0;return}if(isNaN(ii)){dr.nanEncountered=!0;return}return pi=Mr*(Ve+4*$r+ot)/12,Yi=Mr*(ot+4*ii+Ke)/12,wn=pi+Yi,el=(wn-ft)/15,$t>Xt?(dr.maxDepthCount++,wn+el):Math.abs(el)<qt?wn+el:(Tn=Ae+Mr*.5,ua=bo(ce,Ae,Tn,Ve,$r,ot,pi,qt*.5,Xt,$t+1,dr),isNaN(ua)?(dr.nanEncountered=!0,NaN):(oo=bo(ce,Tn,qe,ot,ii,Ke,Yi,qt*.5,Xt,$t+1,dr),isNaN(oo)?(dr.nanEncountered=!0,NaN):ua+oo))}function Co(ce,Ae,qe,Ve,ot){var Ke={maxDepthCount:0,nanEncountered:!1};Ve===void 0&&(Ve=1e-8),ot===void 0&&(ot=20);var ft=ce(Ae),qt=ce(.5*(Ae+qe)),Xt=ce(qe),$t=(ft+4*qt+Xt)*(qe-Ae)/6,dr=bo(ce,Ae,qe,ft,qt,Xt,$t,Ve,ot,1,Ke);return dr}function Fi(ce,Ae,qe){function Ve(ii){return ce+(1-ce)*h(1-h(ii,Ae),1/Ae)}function ot(ii){return Co(Ve,0,ii,1e-4)}for(var Ke=1/ot(1),ft=1e3,qt=(1+1e-8)*Ke,Xt=[],$t=0;$t<=ft;$t++)Xt.push(ot($t/ft)*qt);function dr(ii){var pi=0,Yi=ft,wn=ft>>1;do Xt[wn]>ii?Yi=wn:pi=wn,wn=pi+Yi>>1;while(wn>pi);var Tn=Xt[wn+1]-Xt[wn];return Tn&&(Tn=(ii-Xt[wn+1])/Tn),(wn+1+Tn)/ft}var Mr=2*dr(1)/E*Ke/qe,$r=function(ii,pi){var Yi=dr(n(x(pi))),wn=Ve(Yi)*ii;return Yi/=Mr,[wn,pi>=0?Yi:-Yi]};return $r.invert=function(ii,pi){var Yi;return pi*=Mr,n(pi)<1&&(Yi=p(pi)*q(ot(n(pi))*Ke)),[ii/Ve(n(pi)),Yi]},$r}function Yn(){var ce=0,Ae=2.5,qe=1.183136,Ve=t.geoProjectionMutator(Fi),ot=Ve(ce,Ae,qe);return ot.alpha=function(Ke){return arguments.length?Ve(ce=+Ke,Ae,qe):ce},ot.k=function(Ke){return arguments.length?Ve(ce,Ae=+Ke,qe):Ae},ot.gamma=function(Ke){return arguments.length?Ve(ce,Ae,qe=+Ke):qe},ot.scale(152.63)}function xa(ce,Ae){return n(ce[0]-Ae[0])<y&&n(ce[1]-Ae[1])<y}function Qi(ce,Ae){for(var qe=-1,Ve=ce.length,ot=ce[0],Ke,ft,qt,Xt=[];++qe<Ve;){Ke=ce[qe],ft=(Ke[0]-ot[0])/Ae,qt=(Ke[1]-ot[1])/Ae;for(var $t=0;$t<Ae;++$t)Xt.push([ot[0]+$t*ft,ot[1]+$t*qt]);ot=Ke}return Xt.push(Ke),Xt}function Nn(ce){var Ae=[],qe,Ve,ot,Ke,ft,qt,Xt,$t=ce[0].length;for(Xt=0;Xt<$t;++Xt)qe=ce[0][Xt],Ve=qe[0][0],ot=qe[0][1],Ke=qe[1][1],ft=qe[2][0],qt=qe[2][1],Ae.push(Qi([[Ve+y,ot+y],[Ve+y,Ke-y],[ft-y,Ke-y],[ft-y,qt+y]],30));for(Xt=ce[1].length-1;Xt>=0;--Xt)qe=ce[1][Xt],Ve=qe[0][0],ot=qe[0][1],Ke=qe[1][1],ft=qe[2][0],qt=qe[2][1],Ae.push(Qi([[ft-y,qt-y],[ft-y,Ke+y],[Ve+y,Ke+y],[Ve+y,ot-y]],30));return{type:"Polygon",coordinates:[r.merge(Ae)]}}function Pn(ce,Ae,qe){var Ve,ot;function Ke(Xt,$t){for(var dr=$t<0?-1:1,Mr=Ae[+($t<0)],$r=0,ii=Mr.length-1;$r<ii&&Xt>Mr[$r][2][0];++$r);var pi=ce(Xt-Mr[$r][1][0],$t);return pi[0]+=ce(Mr[$r][1][0],dr*$t>dr*Mr[$r][0][1]?Mr[$r][0][1]:$t)[0],pi}qe?Ke.invert=qe(Ke):ce.invert&&(Ke.invert=function(Xt,$t){for(var dr=ot[+($t<0)],Mr=Ae[+($t<0)],$r=0,ii=dr.length;$r<ii;++$r){var pi=dr[$r];if(pi[0][0]<=Xt&&Xt<pi[1][0]&&pi[0][1]<=$t&&$t<pi[1][1]){var Yi=ce.invert(Xt-ce(Mr[$r][1][0],0)[0],$t);return Yi[0]+=Mr[$r][1][0],xa(Ke(Yi[0],Yi[1]),[Xt,$t])?Yi:null}}});var ft=t.geoProjection(Ke),qt=ft.stream;return ft.stream=function(Xt){var $t=ft.rotate(),dr=qt(Xt),Mr=(ft.rotate([0,0]),qt(Xt));return ft.rotate($t),dr.sphere=function(){t.geoStream(Ve,Mr)},dr},ft.lobes=function(Xt){return arguments.length?(Ve=Nn(Xt),Ae=Xt.map(function($t){return $t.map(function(dr){return[[dr[0][0]*T,dr[0][1]*T],[dr[1][0]*T,dr[1][1]*T],[dr[2][0]*T,dr[2][1]*T]]})}),ot=Ae.map(function($t){return $t.map(function(dr){var Mr=ce(dr[0][0],dr[0][1])[0],$r=ce(dr[2][0],dr[2][1])[0],ii=ce(dr[1][0],dr[0][1])[1],pi=ce(dr[1][0],dr[1][1])[1],Yi;return ii>pi&&(Yi=ii,ii=pi,pi=Yi),[[Mr,ii],[$r,pi]]})}),ft):Ae.map(function($t){return $t.map(function(dr){return[[dr[0][0]*z,dr[0][1]*z],[dr[1][0]*z,dr[1][1]*z],[dr[2][0]*z,dr[2][1]*z]]})})},Ae!=null&&ft.lobes(Ae),ft}var qa=[[[[-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 jo(){return Pn(nt,qa).scale(160.857)}var Vo=[[[[-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 Pa(){return Pn(pa,Vo).scale(152.63)}var Oa=[[[[-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 co(){return Pn(Ct,Oa).scale(169.529)}var An=[[[[-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 _o(){return Pn(Ct,An).scale(169.529).rotate([20,0])}var ks=[[[[-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 bs(){return Pn(an,ks,Qe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ps=[[[[-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 sa(){return Pn(rt,ps).scale(152.63).rotate([-20,0])}function Bn(ce,Ae){return[3/v*ce*H(E*E/3-Ae*Ae),Ae]}Bn.invert=function(ce,Ae){return[v/3*ce/H(E*E/3-Ae*Ae),Ae]};function ms(){return t.geoProjection(Bn).scale(158.837)}function ya(ce){function Ae(qe,Ve){if(n(n(Ve)-A)<y)return[0,Ve<0?-2:2];var ot=x(Ve),Ke=h((1+ot)/(1-ot),ce/2),ft=.5*(Ke+1/Ke)+o(qe*=ce);return[2*x(qe)/ft,(Ke-1/Ke)/ft]}return Ae.invert=function(qe,Ve){var ot=n(Ve);if(n(ot-2)<y)return qe?null:[0,p(Ve)*A];if(ot>2)return null;qe/=2,Ve/=2;var Ke=qe*qe,ft=Ve*Ve,qt=2*Ve/(1+Ke+ft);return qt=h((1+qt)/(1-qt),1/ce),[a(2*qe,1-Ke-ft)/ce,q((qt-1)/(qt+1))]},Ae}function on(){var ce=.5,Ae=t.geoProjectionMutator(ya),qe=Ae(ce);return qe.spacing=function(Ve){return arguments.length?Ae(ce=+Ve):ce},qe.scale(124.75)}var mn=E/C;function Ga(ce,Ae){return[ce*(1+H(o(Ae)))/2,Ae/(o(Ae/2)*o(ce/6))]}Ga.invert=function(ce,Ae){var qe=n(ce),Ve=n(Ae),ot=y,Ke=A;Ve<mn?Ke*=Ve/mn:ot+=6*U(mn/Ve);for(var ft=0;ft<25;ft++){var qt=x(Ke),Xt=H(o(Ke)),$t=x(Ke/2),dr=o(Ke/2),Mr=x(ot/6),$r=o(ot/6),ii=.5*ot*(1+Xt)-qe,pi=Ke/(dr*$r)-Ve,Yi=Xt?-.25*ot*qt/Xt:0,wn=.5*(1+Xt),Tn=(1+.5*Ke*$t/dr)/(dr*$r),ua=Ke/dr*(Mr/6)/($r*$r),oo=Yi*ua-Tn*wn,el=(ii*ua-pi*wn)/oo,ys=(pi*Yi-ii*Tn)/oo;if(Ke-=el,ot-=ys,n(el)<y&&n(ys)<y)break}return[ce<0?-ot:ot,Ae<0?-Ke:Ke]};function ca(){return t.geoProjection(Ga).scale(97.2672)}function bn(ce,Ae){var qe=ce*ce,Ve=Ae*Ae;return[ce*(.975534+Ve*(-.119161+qe*-.0143059+Ve*-.0547009)),Ae*(1.00384+qe*(.0802894+Ve*-.02855+qe*199025e-9)+Ve*(.0998909+Ve*-.0491032))]}bn.invert=function(ce,Ae){var qe=p(ce)*E,Ve=Ae/2,ot=50;do{var Ke=qe*qe,ft=Ve*Ve,qt=qe*Ve,Xt=qe*(.975534+ft*(-.119161+Ke*-.0143059+ft*-.0547009))-ce,$t=Ve*(1.00384+Ke*(.0802894+ft*-.02855+Ke*199025e-9)+ft*(.0998909+ft*-.0491032))-Ae,dr=.975534-ft*(.119161+3*Ke*.0143059+ft*.0547009),Mr=-qt*(2*.119161+4*.0547009*ft+2*.0143059*Ke),$r=qt*(2*.0802894+4*199025e-9*Ke+2*-.02855*ft),ii=1.00384+Ke*(.0802894+199025e-9*Ke)+ft*(3*(.0998909-.02855*Ke)-5*.0491032*ft),pi=Mr*$r-ii*dr,Yi=($t*Mr-Xt*ii)/pi,wn=(Xt*$r-$t*dr)/pi;qe-=Yi,Ve-=wn}while((n(Yi)>y||n(wn)>y)&&--ot>0);return ot&&[qe,Ve]};function Xi(){return t.geoProjection(bn).scale(139.98)}function qn(ce,Ae){return[x(ce)/o(Ae),b(Ae)*o(ce)]}qn.invert=function(ce,Ae){var qe=ce*ce,Ve=Ae*Ae,ot=Ve+1,Ke=qe+ot,ft=ce?_*H((Ke-H(Ke*Ke-4*qe))/qe):1/H(ot);return[q(ce*ft),p(Ae)*U(ft)]};function Ia(){return t.geoProjection(qn).scale(144.049).clipAngle(90-.001)}function yn(ce){var Ae=o(ce),qe=b(L+ce/2);function Ve(ot,Ke){var ft=Ke-ce,qt=n(ft)<y?ot*Ae:n(qt=L+Ke/2)<y||n(n(qt)-A)<y?0:ot*ft/l(b(qt)/qe);return[qt,ft]}return Ve.invert=function(ot,Ke){var ft,qt=Ke+ce;return[n(Ke)<y?ot/Ae:n(ft=L+qt/2)<y||n(n(ft)-A)<y?0:ot*l(b(ft)/qe)/Ke,qt]},Ve}function Ya(){return ct(yn).parallel(40).scale(158.837)}function ba(ce,Ae){return[ce,1.25*l(b(L+.4*Ae))]}ba.invert=function(ce,Ae){return[ce,2.5*i(s(.8*Ae))-.625*E]};function Da(){return t.geoProjection(ba).scale(108.318)}function Aa(ce){var Ae=ce.length-1;function qe(Ve,ot){for(var Ke=o(ot),ft=2/(1+Ke*o(Ve)),qt=ft*Ke*x(Ve),Xt=ft*x(ot),$t=Ae,dr=ce[$t],Mr=dr[0],$r=dr[1],ii;--$t>=0;)dr=ce[$t],Mr=dr[0]+qt*(ii=Mr)-Xt*$r,$r=dr[1]+qt*$r+Xt*ii;return Mr=qt*(ii=Mr)-Xt*$r,$r=qt*$r+Xt*ii,[Mr,$r]}return qe.invert=function(Ve,ot){var Ke=20,ft=Ve,qt=ot;do{for(var Xt=Ae,$t=ce[Xt],dr=$t[0],Mr=$t[1],$r=0,ii=0,pi;--Xt>=0;)$t=ce[Xt],$r=dr+ft*(pi=$r)-qt*ii,ii=Mr+ft*ii+qt*pi,dr=$t[0]+ft*(pi=dr)-qt*Mr,Mr=$t[1]+ft*Mr+qt*pi;$r=dr+ft*(pi=$r)-qt*ii,ii=Mr+ft*ii+qt*pi,dr=ft*(pi=dr)-qt*Mr-Ve,Mr=ft*Mr+qt*pi-ot;var Yi=$r*$r+ii*ii,wn,Tn;ft-=wn=(dr*$r+Mr*ii)/Yi,qt-=Tn=(Mr*$r-dr*ii)/Yi}while(n(wn)+n(Tn)>y*y&&--Ke>0);if(Ke){var ua=H(ft*ft+qt*qt),oo=2*i(ua*.5),el=x(oo);return[a(ft*el,ua*o(oo)),ua?q(qt*el/ua):0]}},qe}var Ln=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],wo=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],wa=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],$i=[[.9245,0],[0,0],[.01943,0]],ea=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Sa(){return Un(Ln,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Za(){return Un(wo,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function xo(){return Un(wa,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Wa(){return Un($i,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function hn(){return Un(ea,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Un(ce,Ae){var qe=t.geoProjection(Aa(ce)).rotate(Ae).clipAngle(90),Ve=t.geoRotation(Ae),ot=qe.center;return delete qe.rotate,qe.center=function(Ke){return arguments.length?ot(Ve(Ke)):Ve.invert(ot())},qe}var Ss=H(6),Kn=H(7);function ns(ce,Ae){var qe=q(7*x(Ae)/(3*Ss));return[Ss*ce*(2*o(2*qe/3)-1)/Kn,9*x(qe/3)/Kn]}ns.invert=function(ce,Ae){var qe=3*q(Ae*Kn/9);return[ce*Kn/(Ss*(2*o(2*qe/3)-1)),q(x(qe)*3*Ss/7)]};function Jo(){return t.geoProjection(ns).scale(164.859)}function vo(ce,Ae){for(var qe=(1+_)*x(Ae),Ve=Ae,ot=0,Ke;ot<25&&(Ve-=Ke=(x(Ve/2)+x(Ve)-qe)/(.5*o(Ve/2)+o(Ve)),!(n(Ke)<y));ot++);return[ce*(1+2*o(Ve)/o(Ve/2))/(3*C),2*H(3)*x(Ve/2)/H(2+C)]}vo.invert=function(ce,Ae){var qe=Ae*H(2+C)/(2*H(3)),Ve=2*q(qe);return[3*C*ce/(1+2*o(Ve)/o(Ve/2)),q((qe+x(Ve))/(1+_))]};function ma(){return t.geoProjection(vo).scale(188.209)}function ja(ce,Ae){for(var qe=H(6/(4+E)),Ve=(1+E/4)*x(Ae),ot=Ae/2,Ke=0,ft;Ke<25&&(ot-=ft=(ot/2+x(ot)-Ve)/(.5+o(ot)),!(n(ft)<y));Ke++);return[qe*(.5+o(ot))*ce/1.5,qe*ot]}ja.invert=function(ce,Ae){var qe=H(6/(4+E)),Ve=Ae/qe;return n(n(Ve)-A)<y&&(Ve=Ve<0?-A:A),[1.5*ce/(qe*(.5+o(Ve))),q((Ve/2+x(Ve))/(1+E/4))]};function To(){return t.geoProjection(ja).scale(166.518)}function Ao(ce,Ae){var qe=Ae*Ae,Ve=qe*qe,ot=qe*Ve;return[ce*(.84719-.13063*qe+ot*ot*(-.04515+.05494*qe-.02326*Ve+.00331*ot)),Ae*(1.01183+Ve*Ve*(-.02625+.01926*qe-.00396*Ve))]}Ao.invert=function(ce,Ae){var qe=Ae,Ve=25,ot,Ke,ft,qt;do Ke=qe*qe,ft=Ke*Ke,qe-=ot=(qe*(1.01183+ft*ft*(-.02625+.01926*Ke-.00396*ft))-Ae)/(1.01183+ft*ft*(9*-.02625+11*.01926*Ke+13*-.00396*ft));while(n(ot)>k&&--Ve>0);return Ke=qe*qe,ft=Ke*Ke,qt=Ke*ft,[ce/(.84719-.13063*Ke+qt*qt*(-.04515+.05494*Ke-.02326*ft+.00331*qt)),qe]};function la(){return t.geoProjection(Ao).scale(175.295)}function Ki(ce,Ae){return[ce*(1+o(Ae))/2,2*(Ae-b(Ae/2))]}Ki.invert=function(ce,Ae){for(var qe=Ae/2,Ve=0,ot=1/0;Ve<10&&n(ot)>y;++Ve){var Ke=o(Ae/2);Ae-=ot=(Ae-b(Ae/2)-qe)/(1-.5/(Ke*Ke))}return[2*ce/(1+o(Ae)),Ae]};function ho(){return t.geoProjection(Ki).scale(152.63)}var Ka=[[[[-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 Ca(){return Pn(Ze(1/0),Ka).rotate([20,0]).scale(152.63)}function ta(ce,Ae){var qe=x(Ae),Ve=o(Ae),ot=p(ce);if(ce===0||n(Ae)===A)return[0,Ae];if(Ae===0)return[ce,0];if(n(ce)===A)return[ce*Ve,A*qe];var Ke=E/(2*ce)-2*ce/E,ft=2*Ae/E,qt=(1-ft*ft)/(qe-ft),Xt=Ke*Ke,$t=qt*qt,dr=1+Xt/$t,Mr=1+$t/Xt,$r=(Ke*qe/qt-Ke/2)/dr,ii=($t*qe/Xt+qt/2)/Mr,pi=$r*$r+Ve*Ve/dr,Yi=ii*ii-($t*qe*qe/Xt+qt*qe-1)/Mr;return[A*($r+H(pi)*ot),A*(ii+H(Yi<0?0:Yi)*p(-Ae*Ke)*ot)]}ta.invert=function(ce,Ae){ce/=A,Ae/=A;var qe=ce*ce,Ve=Ae*Ae,ot=qe+Ve,Ke=E*E;return[ce?(ot-1+H((1-ot)*(1-ot)+4*qe))/(2*ce)*A:0,Pt(function(ft){return ot*(E*x(ft)-2*ft)*E+4*ft*ft*(Ae-x(ft))+2*E*ft-Ke*Ae},0)]};function En(){return t.geoProjection(ta).scale(127.267)}var Mo=1.0148,Ds=.23185,Ro=-.14499,vs=.02406,Ks=Mo,as=5*Ds,Jn=7*Ro,Cs=9*vs,Xa=1.790857183;function Zo(ce,Ae){var qe=Ae*Ae;return[ce,Ae*(Mo+qe*qe*(Ds+qe*(Ro+vs*qe)))]}Zo.invert=function(ce,Ae){Ae>Xa?Ae=Xa:Ae<-Xa&&(Ae=-Xa);var qe=Ae,Ve;do{var ot=qe*qe;qe-=Ve=(qe*(Mo+ot*ot*(Ds+ot*(Ro+vs*ot)))-Ae)/(Ks+ot*ot*(as+ot*(Jn+Cs*ot)))}while(n(Ve)>y);return[ce,qe]};function Eo(){return t.geoProjection(Zo).scale(139.319)}function lo(ce,Ae){if(n(Ae)<y)return[ce,0];var qe=b(Ae),Ve=ce*x(Ae);return[x(Ve)/qe,Ae+(1-o(Ve))/qe]}lo.invert=function(ce,Ae){if(n(Ae)<y)return[ce,0];var qe=ce*ce+Ae*Ae,Ve=Ae*.5,ot=10,Ke;do{var ft=b(Ve),qt=1/o(Ve),Xt=qe-2*Ae*Ve+Ve*Ve;Ve-=Ke=(ft*Xt+2*(Ve-Ae))/(2+Xt*qt*qt+2*(Ve-Ae)*ft)}while(n(Ke)>y&&--ot>0);return ft=b(Ve),[(n(Ae)<n(Ve+1/ft)?q(ce*ft):p(Ae)*p(ce)*(U(n(ce*ft))+A))/x(Ve),Ve]};function $a(){return t.geoProjection(lo).scale(103.74)}function Xo(ce,Ae){var qe=Sn(ce[1],ce[0]),Ve=Sn(Ae[1],Ae[0]),ot=Rs(qe,Ve),Ke=uo(qe)/uo(Ve);return $n([1,0,ce[0][0],0,1,ce[0][1]],$n([Ke,0,0,0,Ke,0],$n([o(ot),x(ot),0,-x(ot),o(ot),0],[1,0,-Ae[0][0],0,1,-Ae[0][1]])))}function rs(ce){var Ae=1/(ce[0]*ce[4]-ce[1]*ce[3]);return[Ae*ce[4],-Ae*ce[1],Ae*(ce[1]*ce[5]-ce[2]*ce[4]),-Ae*ce[3],Ae*ce[0],Ae*(ce[2]*ce[3]-ce[0]*ce[5])]}function $n(ce,Ae){return[ce[0]*Ae[0]+ce[1]*Ae[3],ce[0]*Ae[1]+ce[1]*Ae[4],ce[0]*Ae[2]+ce[1]*Ae[5]+ce[2],ce[3]*Ae[0]+ce[4]*Ae[3],ce[3]*Ae[1]+ce[4]*Ae[4],ce[3]*Ae[2]+ce[4]*Ae[5]+ce[5]]}function Sn(ce,Ae){return[ce[0]-Ae[0],ce[1]-Ae[1]]}function uo(ce){return H(ce[0]*ce[0]+ce[1]*ce[1])}function Rs(ce,Ae){return a(ce[0]*Ae[1]-ce[1]*Ae[0],ce[0]*Ae[0]+ce[1]*Ae[1])}function xs(ce,Ae,qe){Ve(ce,{transform:null});function Ve($t,dr){if($t.edges=Qn($t.face),dr.face){var Mr=$t.shared=So($t.face,dr.face),$r=Xo(Mr.map(dr.project),Mr.map($t.project));$t.transform=dr.transform?$n(dr.transform,$r):$r;for(var ii=dr.edges,pi=0,Yi=ii.length;pi<Yi;++pi)os(Mr[0],ii[pi][1])&&os(Mr[1],ii[pi][0])&&(ii[pi]=$t),os(Mr[0],ii[pi][0])&&os(Mr[1],ii[pi][1])&&(ii[pi]=$t);for(ii=$t.edges,pi=0,Yi=ii.length;pi<Yi;++pi)os(Mr[0],ii[pi][0])&&os(Mr[1],ii[pi][1])&&(ii[pi]=dr),os(Mr[0],ii[pi][1])&&os(Mr[1],ii[pi][0])&&(ii[pi]=dr)}else $t.transform=dr.transform;return $t.children&&$t.children.forEach(function(wn){Ve(wn,$t)}),$t}function ot($t,dr){var Mr=Ae($t,dr),$r=Mr.project([$t*z,dr*z]),ii;return(ii=Mr.transform)?[ii[0]*$r[0]+ii[1]*$r[1]+ii[2],-(ii[3]*$r[0]+ii[4]*$r[1]+ii[5])]:($r[1]=-$r[1],$r)}zo(ce)&&(ot.invert=function($t,dr){var Mr=Ke(ce,[$t,-dr]);return Mr&&(Mr[0]*=T,Mr[1]*=T,Mr)});function Ke($t,dr){var Mr=$t.project.invert,$r=$t.transform,ii=dr;if($r&&($r=rs($r),ii=[$r[0]*ii[0]+$r[1]*ii[1]+$r[2],$r[3]*ii[0]+$r[4]*ii[1]+$r[5]]),Mr&&$t===ft(pi=Mr(ii)))return pi;for(var pi,Yi=$t.children,wn=0,Tn=Yi&&Yi.length;wn<Tn;++wn)if(pi=Ke(Yi[wn],dr))return pi}function ft($t){return Ae($t[0]*T,$t[1]*T)}var qt=t.geoProjection(ot),Xt=qt.stream;return qt.stream=function($t){var dr=qt.rotate(),Mr=Xt($t),$r=(qt.rotate([0,0]),Xt($t));return qt.rotate(dr),Mr.sphere=function(){$r.polygonStart(),$r.lineStart(),Go($r,ce),$r.lineEnd(),$r.polygonEnd()},Mr},qt.angle(qe==null?-30:qe*z)}function Go(ce,Ae,qe){var Ve,ot=Ae.edges,Ke=ot.length,ft,qt={type:"MultiPoint",coordinates:Ae.face},Xt=Ae.face.filter(function(Yi){return n(Yi[1])!==90}),$t=t.geoBounds({type:"MultiPoint",coordinates:Xt}),dr=!1,Mr=-1,$r=$t[1][0]-$t[0][0],ii=$r===180||$r===360?[($t[0][0]+$t[1][0])/2,($t[0][1]+$t[1][1])/2]:t.geoCentroid(qt);if(qe)for(;++Mr<Ke&&ot[Mr]!==qe;);++Mr;for(var pi=0;pi<Ke;++pi)ft=ot[(pi+Mr)%Ke],Array.isArray(ft)?(dr||(ce.point((Ve=t.geoInterpolate(ft[0],ii)(y))[0],Ve[1]),dr=!0),ce.point((Ve=t.geoInterpolate(ft[1],ii)(y))[0],Ve[1])):(dr=!1,ft!==qe&&Go(ce,ft,Ae))}function os(ce,Ae){return ce&&Ae&&ce[0]===Ae[0]&&ce[1]===Ae[1]}function So(ce,Ae){for(var qe,Ve,ot=ce.length,Ke=null,ft=0;ft<ot;++ft){qe=ce[ft];for(var qt=Ae.length;--qt>=0;)if(Ve=Ae[qt],qe[0]===Ve[0]&&qe[1]===Ve[1]){if(Ke)return[Ke,qe];Ke=qe}}}function Qn(ce){for(var Ae=ce.length,qe=[],Ve=ce[Ae-1],ot=0;ot<Ae;++ot)qe.push([Ve,Ve=ce[ot]]);return qe}function zo(ce){return ce.project.invert||ce.children&&ce.children.some(zo)}var rl=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],$o=[[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(ce){return ce.map(function(Ae){return rl[Ae]})});function Na(ce){ce=ce||function(qe){var Ve=t.geoCentroid({type:"MultiPoint",coordinates:qe});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-Ve[0],-Ve[1]])};var Ae=$o.map(function(qe){return{face:qe,project:ce(qe)}});return[-1,0,0,1,0,1,4,5].forEach(function(qe,Ve){var ot=Ae[qe];ot&&(ot.children||(ot.children=[])).push(Ae[Ve])}),xs(Ae[0],function(qe,Ve){return Ae[qe<-E/2?Ve<0?6:4:qe<0?Ve<0?2:0:qe<E/2?Ve<0?3:1:Ve<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var Ua=2/H(3);function Po(ce,Ae){var qe=lt(ce,Ae);return[qe[0]*Ua,qe[1]]}Po.invert=function(ce,Ae){return lt.invert(ce/Ua,Ae)};function fo(ce){ce=ce||function(qe){var Ve=t.geoCentroid({type:"MultiPoint",coordinates:qe});return t.geoProjection(Po).translate([0,0]).scale(1).rotate(Ve[1]>0?[-Ve[0],0]:[180-Ve[0],180])};var Ae=$o.map(function(qe){return{face:qe,project:ce(qe)}});return[-1,0,0,1,0,1,4,5].forEach(function(qe,Ve){var ot=Ae[qe];ot&&(ot.children||(ot.children=[])).push(Ae[Ve])}),xs(Ae[0],function(qe,Ve){return Ae[qe<-E/2?Ve<0?6:4:qe<0?Ve<0?2:0:qe<E/2?Ve<0?3:1:Ve<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function ro(ce){ce=ce||function(ft){var qt=ft.length===6?t.geoCentroid({type:"MultiPoint",coordinates:ft}):ft[0];return t.geoGnomonic().scale(1).translate([0,0]).rotate([-qt[0],-qt[1]])};var Ae=$o.map(function(ft){for(var qt=ft.map(Oo),Xt=qt.length,$t=qt[Xt-1],dr,Mr=[],$r=0;$r<Xt;++$r)dr=qt[$r],Mr.push(aa([$t[0]*.9486832980505138+dr[0]*.31622776601683794,$t[1]*.9486832980505138+dr[1]*.31622776601683794,$t[2]*.9486832980505138+dr[2]*.31622776601683794]),aa([dr[0]*.9486832980505138+$t[0]*.31622776601683794,dr[1]*.9486832980505138+$t[1]*.31622776601683794,dr[2]*.9486832980505138+$t[2]*.31622776601683794])),$t=dr;return Mr}),qe=[],Ve=[-1,0,0,1,0,1,4,5];Ae.forEach(function(ft,qt){for(var Xt=$o[qt],$t=Xt.length,dr=qe[qt]=[],Mr=0;Mr<$t;++Mr)Ae.push([Xt[Mr],ft[(Mr*2+2)%(2*$t)],ft[(Mr*2+1)%(2*$t)]]),Ve.push(qt),dr.push(io(Oo(ft[(Mr*2+2)%(2*$t)]),Oo(ft[(Mr*2+1)%(2*$t)])))});var ot=Ae.map(function(ft){return{project:ce(ft),face:ft}});Ve.forEach(function(ft,qt){var Xt=ot[ft];Xt&&(Xt.children||(Xt.children=[])).push(ot[qt])});function Ke(ft,qt){var Xt=o(qt),$t=[Xt*o(ft),Xt*x(ft),x(qt)],dr=ft<-E/2?qt<0?6:4:ft<0?qt<0?2:0:ft<E/2?qt<0?3:1:qt<0?7:5,Mr=qe[dr];return ot[Ma(Mr[0],$t)<0?8+3*dr:Ma(Mr[1],$t)<0?8+3*dr+1:Ma(Mr[2],$t)<0?8+3*dr+2:dr]}return xs(ot[0],Ke).angle(-30).scale(110.625).center([0,45])}function Ma(ce,Ae){for(var qe=0,Ve=ce.length,ot=0;qe<Ve;++qe)ot+=ce[qe]*Ae[qe];return ot}function io(ce,Ae){return[ce[1]*Ae[2]-ce[2]*Ae[1],ce[2]*Ae[0]-ce[0]*Ae[2],ce[0]*Ae[1]-ce[1]*Ae[0]]}function aa(ce){return[a(ce[1],ce[0])*z,q(f(-1,c(1,ce[2])))*z]}function Oo(ce){var Ae=ce[0]*T,qe=ce[1]*T,Ve=o(qe);return[Ve*o(Ae),Ve*x(Ae),x(qe)]}function No(){}function Zs(ce){if((qe=ce.length)<4)return!1;for(var Ae=0,qe,Ve=ce[qe-1][1]*ce[0][0]-ce[qe-1][0]*ce[0][1];++Ae<qe;)Ve+=ce[Ae-1][1]*ce[Ae][0]-ce[Ae-1][0]*ce[Ae][1];return Ve<=0}function Fs(ce,Ae){for(var qe=Ae[0],Ve=Ae[1],ot=!1,Ke=0,ft=ce.length,qt=ft-1;Ke<ft;qt=Ke++){var Xt=ce[Ke],$t=Xt[0],dr=Xt[1],Mr=ce[qt],$r=Mr[0],ii=Mr[1];dr>Ve^ii>Ve&&qe<($r-$t)*(Ve-dr)/(ii-dr)+$t&&(ot=!ot)}return ot}function ws(ce,Ae){var qe=Ae.stream,Ve;if(!qe)throw new Error("invalid projection");switch(ce&&ce.type){case"Feature":Ve=Ls;break;case"FeatureCollection":Ve=no;break;default:Ve=Xs;break}return Ve(ce,qe)}function no(ce,Ae){return{type:"FeatureCollection",features:ce.features.map(function(qe){return Ls(qe,Ae)})}}function Ls(ce,Ae){return{type:"Feature",id:ce.id,properties:ce.properties,geometry:Xs(ce.geometry,Ae)}}function ds(ce,Ae){return{type:"GeometryCollection",geometries:ce.geometries.map(function(qe){return Xs(qe,Ae)})}}function Xs(ce,Ae){if(!ce)return null;if(ce.type==="GeometryCollection")return ds(ce,Ae);var qe;switch(ce.type){case"Point":qe=po;break;case"MultiPoint":qe=po;break;case"LineString":qe=ss;break;case"MultiLineString":qe=ss;break;case"Polygon":qe=ls;break;case"MultiPolygon":qe=ls;break;case"Sphere":qe=ls;break;default:return null}return t.geoStream(ce,Ae(qe)),qe.result()}var oa=[],Yo=[],po={point:function(ce,Ae){oa.push([ce,Ae])},result:function(){var ce=oa.length?oa.length<2?{type:"Point",coordinates:oa[0]}:{type:"MultiPoint",coordinates:oa}:null;return oa=[],ce}},ss={lineStart:No,point:function(ce,Ae){oa.push([ce,Ae])},lineEnd:function(){oa.length&&(Yo.push(oa),oa=[])},result:function(){var ce=Yo.length?Yo.length<2?{type:"LineString",coordinates:Yo[0]}:{type:"MultiLineString",coordinates:Yo}:null;return Yo=[],ce}},ls={polygonStart:No,lineStart:No,point:function(ce,Ae){oa.push([ce,Ae])},lineEnd:function(){var ce=oa.length;if(ce){do oa.push(oa[0].slice());while(++ce<4);Yo.push(oa),oa=[]}},polygonEnd:No,result:function(){if(!Yo.length)return null;var ce=[],Ae=[];return Yo.forEach(function(qe){Zs(qe)?ce.push([qe]):Ae.push(qe)}),Ae.forEach(function(qe){var Ve=qe[0];ce.some(function(ot){if(Fs(ot[0],Ve))return ot.push(qe),!0})||ce.push([qe])}),Yo=[],ce.length?ce.length>1?{type:"MultiPolygon",coordinates:ce}:{type:"Polygon",coordinates:ce[0]}:null}};function gs(ce){var Ae=ce(A,0)[0]-ce(-A,0)[0];function qe(Ve,ot){var Ke=n(Ve)<A,ft=ce(Ke?Ve:Ve>0?Ve-E:Ve+E,ot),qt=(ft[0]-ft[1])*_,Xt=(ft[0]+ft[1])*_;if(Ke)return[qt,Xt];var $t=Ae*_,dr=qt>0^Xt>0?-1:1;return[dr*qt-p(Xt)*$t,dr*Xt-p(qt)*$t]}return ce.invert&&(qe.invert=function(Ve,ot){var Ke=(Ve+ot)*_,ft=(ot-Ve)*_,qt=n(Ke)<.5*Ae&&n(ft)<.5*Ae;if(!qt){var Xt=Ae*_,$t=Ke>0^ft>0?-1:1,dr=-$t*Ve+(ft>0?1:-1)*Xt,Mr=-$t*ot+(Ke>0?1:-1)*Xt;Ke=(-dr-Mr)*_,ft=(dr-Mr)*_}var $r=ce.invert(Ke,ft);return qt||($r[0]+=Ke>0?E:-E),$r}),t.geoProjection(qe).rotate([-90,-90,45]).clipAngle(180-.001)}function bt(){return gs(Qr).scale(176.423)}function Ft(){return gs(ia).scale(111.48)}function hr(ce,Ae){if(!(0<=(Ae=+Ae)&&Ae<=20))throw new Error("invalid digits");function qe($t){var dr=$t.length,Mr=2,$r=new Array(dr);for($r[0]=+$t[0].toFixed(Ae),$r[1]=+$t[1].toFixed(Ae);Mr<dr;)$r[Mr]=$t[Mr],++Mr;return $r}function Ve($t){return $t.map(qe)}function ot($t){for(var dr=qe($t[0]),Mr=[dr],$r=1;$r<$t.length;$r++){var ii=qe($t[$r]);(ii.length>2||ii[0]!=dr[0]||ii[1]!=dr[1])&&(Mr.push(ii),dr=ii)}return Mr.length===1&&$t.length>1&&Mr.push(qe($t[$t.length-1])),Mr}function Ke($t){return $t.map(ot)}function ft($t){if($t==null)return $t;var dr;switch($t.type){case"GeometryCollection":dr={type:"GeometryCollection",geometries:$t.geometries.map(ft)};break;case"Point":dr={type:"Point",coordinates:qe($t.coordinates)};break;case"MultiPoint":dr={type:$t.type,coordinates:Ve($t.coordinates)};break;case"LineString":dr={type:$t.type,coordinates:ot($t.coordinates)};break;case"MultiLineString":case"Polygon":dr={type:$t.type,coordinates:Ke($t.coordinates)};break;case"MultiPolygon":dr={type:"MultiPolygon",coordinates:$t.coordinates.map(Ke)};break;default:return $t}return $t.bbox!=null&&(dr.bbox=$t.bbox),dr}function qt($t){var dr={type:"Feature",properties:$t.properties,geometry:ft($t.geometry)};return $t.id!=null&&(dr.id=$t.id),$t.bbox!=null&&(dr.bbox=$t.bbox),dr}if(ce!=null)switch(ce.type){case"Feature":return qt(ce);case"FeatureCollection":{var Xt={type:"FeatureCollection",features:ce.features.map(qt)};return ce.bbox!=null&&(Xt.bbox=ce.bbox),Xt}default:return ft(ce)}return ce}function nr(ce){var Ae=x(ce);function qe(Ve,ot){var Ke=Ae?b(Ve*Ae/2)/Ae:Ve/2;if(!ot)return[2*Ke,-ce];var ft=2*i(Ke*x(ot)),qt=1/b(ot);return[x(ft)*qt,ot+(1-o(ft))*qt-ce]}return qe.invert=function(Ve,ot){if(n(ot+=ce)<y)return[Ae?2*i(Ae*Ve/2)/Ae:Ve,0];var Ke=Ve*Ve+ot*ot,ft=0,qt=10,Xt;do{var $t=b(ft),dr=1/o(ft),Mr=Ke-2*ot*ft+ft*ft;ft-=Xt=($t*Mr+2*(ft-ot))/(2+Mr*dr*dr+2*(ft-ot)*$t)}while(n(Xt)>y&&--qt>0);var $r=Ve*($t=b(ft)),ii=b(n(ot)<n(ft+1/$t)?q($r)*.5:U($r)*.5+E/4)/x(ft);return[Ae?2*i(Ae*ii)/Ae:2*ii,ft]},qe}function Sr(){return ct(nr).scale(131.215)}var li=[[.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]];li.forEach(function(ce){ce[1]*=1.0144});function di(ce,Ae){var qe=c(18,n(Ae)*36/E),Ve=u(qe),ot=qe-Ve,Ke=(Mr=li[Ve])[0],ft=Mr[1],qt=(Mr=li[++Ve])[0],Xt=Mr[1],$t=(Mr=li[c(19,++Ve)])[0],dr=Mr[1],Mr;return[ce*(qt+ot*($t-Ke)/2+ot*ot*($t-2*qt+Ke)/2),(Ae>0?A:-A)*(Xt+ot*(dr-ft)/2+ot*ot*(dr-2*Xt+ft)/2)]}di.invert=function(ce,Ae){var qe=Ae/A,Ve=qe*90,ot=c(18,n(Ve/5)),Ke=f(0,u(ot));do{var ft=li[Ke][1],qt=li[Ke+1][1],Xt=li[c(19,Ke+2)][1],$t=Xt-ft,dr=Xt-2*qt+ft,Mr=2*(n(qe)-qt)/$t,$r=dr/$t,ii=Mr*(1-$r*Mr*(1-2*$r*Mr));if(ii>=0||Ke===1){Ve=(Ae>=0?5:-5)*(ii+ot);var pi=50,Yi;do ot=c(18,n(Ve)/5),Ke=u(ot),ii=ot-Ke,ft=li[Ke][1],qt=li[Ke+1][1],Xt=li[c(19,Ke+2)][1],Ve-=(Yi=(Ae>=0?A:-A)*(qt+ii*(Xt-ft)/2+ii*ii*(Xt-2*qt+ft)/2)-Ae)*z;while(n(Yi)>k&&--pi>0);break}}while(--Ke>=0);var wn=li[Ke][0],Tn=li[Ke+1][0],ua=li[c(19,Ke+2)][0];return[ce/(Tn+ii*(ua-wn)/2+ii*ii*(ua-2*Tn+wn)/2),Ve*T]};function mi(){return t.geoProjection(di).scale(152.63)}function Oi(ce){function Ae(qe,Ve){var ot=o(Ve),Ke=(ce-1)/(ce-ot*o(qe));return[Ke*ot*x(qe),Ke*x(Ve)]}return Ae.invert=function(qe,Ve){var ot=qe*qe+Ve*Ve,Ke=H(ot),ft=(ce-H(1-ot*(ce+1)/(ce-1)))/((ce-1)/Ke+Ke/(ce-1));return[a(qe*ft,Ke*H(1-ft*ft)),Ke?q(Ve*ft/Ke):0]},Ae}function dn(ce,Ae){var qe=Oi(ce);if(!Ae)return qe;var Ve=o(Ae),ot=x(Ae);function Ke(ft,qt){var Xt=qe(ft,qt),$t=Xt[1],dr=$t*ot/(ce-1)+Ve;return[Xt[0]*Ve/dr,$t/dr]}return Ke.invert=function(ft,qt){var Xt=(ce-1)/(ce-1-qt*ot);return qe.invert(Xt*ft,Xt*qt*Ve)},Ke}function wi(){var ce=2,Ae=0,qe=t.geoProjectionMutator(dn),Ve=qe(ce,Ae);return Ve.distance=function(ot){return arguments.length?qe(ce=+ot,Ae):ce},Ve.tilt=function(ot){return arguments.length?qe(ce,Ae=ot*T):Ae*z},Ve.scale(432.147).clipAngle(U(1/ce)*z-1e-6)}var ui=1e-4,Ai=1e4,gi=-180,gn=gi+ui,In=180,Vn=In-ui,Rn=-90,Hn=Rn+ui,Gn=90,pn=Gn-ui;function Lo(ce){return ce.length>0}function us(ce){return Math.floor(ce*Ai)/Ai}function Bs(ce){return ce===Rn||ce===Gn?[0,ce]:[gi,us(ce)]}function Js(ce){var Ae=ce[0],qe=ce[1],Ve=!1;return Ae<=gn?(Ae=gi,Ve=!0):Ae>=Vn&&(Ae=In,Ve=!0),qe<=Hn?(qe=Rn,Ve=!0):qe>=pn&&(qe=Gn,Ve=!0),Ve?[Ae,qe]:ce}function ol(ce){return ce.map(Js)}function Cl(ce,Ae,qe){for(var Ve=0,ot=ce.length;Ve<ot;++Ve){var Ke=ce[Ve].slice();qe.push({index:-1,polygon:Ae,ring:Ke});for(var ft=0,qt=Ke.length;ft<qt;++ft){var Xt=Ke[ft],$t=Xt[0],dr=Xt[1];if($t<=gn||$t>=Vn||dr<=Hn||dr>=pn){Ke[ft]=Js(Xt);for(var Mr=ft+1;Mr<qt;++Mr){var $r=Ke[Mr],ii=$r[0],pi=$r[1];if(ii>gn&&ii<Vn&&pi>Hn&&pi<pn)break}if(Mr===ft+1)continue;if(ft){var Yi={index:-1,polygon:Ae,ring:Ke.slice(0,ft+1)};Yi.ring[Yi.ring.length-1]=Bs(dr),qe[qe.length-1]=Yi}else qe.pop();if(Mr>=qt)break;qe.push({index:-1,polygon:Ae,ring:Ke=Ke.slice(Mr-1)}),Ke[0]=Bs(Ke[0][1]),ft=-1,qt=Ke.length}}}}function ul(ce){var Ae,qe=ce.length,Ve={},ot={},Ke,ft,qt,Xt,$t;for(Ae=0;Ae<qe;++Ae){if(Ke=ce[Ae],ft=Ke.ring[0],Xt=Ke.ring[Ke.ring.length-1],ft[0]===Xt[0]&&ft[1]===Xt[1]){Ke.polygon.push(Ke.ring),ce[Ae]=null;continue}Ke.index=Ae,Ve[ft]=ot[Xt]=Ke}for(Ae=0;Ae<qe;++Ae)if(Ke=ce[Ae],Ke){if(ft=Ke.ring[0],Xt=Ke.ring[Ke.ring.length-1],qt=ot[ft],$t=Ve[Xt],delete Ve[ft],delete ot[Xt],ft[0]===Xt[0]&&ft[1]===Xt[1]){Ke.polygon.push(Ke.ring);continue}qt?(delete ot[ft],delete Ve[qt.ring[0]],qt.ring.pop(),ce[qt.index]=null,Ke={index:-1,polygon:qt.polygon,ring:qt.ring.concat(Ke.ring)},qt===$t?Ke.polygon.push(Ke.ring):(Ke.index=qe++,ce.push(Ve[Ke.ring[0]]=ot[Ke.ring[Ke.ring.length-1]]=Ke))):$t?(delete Ve[Xt],delete ot[$t.ring[$t.ring.length-1]],Ke.ring.pop(),Ke={index:qe++,polygon:$t.polygon,ring:Ke.ring.concat($t.ring)},ce[$t.index]=null,ce.push(Ve[Ke.ring[0]]=ot[Ke.ring[Ke.ring.length-1]]=Ke)):(Ke.ring.push(Ke.ring[0]),Ke.polygon.push(Ke.ring))}}function Gl(ce){var Ae={type:"Feature",geometry:Vl(ce.geometry)};return ce.id!=null&&(Ae.id=ce.id),ce.bbox!=null&&(Ae.bbox=ce.bbox),ce.properties!=null&&(Ae.properties=ce.properties),Ae}function Vl(ce){if(ce==null)return ce;var Ae,qe,Ve,ot;switch(ce.type){case"GeometryCollection":Ae={type:"GeometryCollection",geometries:ce.geometries.map(Vl)};break;case"Point":Ae={type:"Point",coordinates:Js(ce.coordinates)};break;case"MultiPoint":case"LineString":Ae={type:ce.type,coordinates:ol(ce.coordinates)};break;case"MultiLineString":Ae={type:"MultiLineString",coordinates:ce.coordinates.map(ol)};break;case"Polygon":{var Ke=[];Cl(ce.coordinates,Ke,qe=[]),ul(qe),Ae={type:"Polygon",coordinates:Ke};break}case"MultiPolygon":{qe=[],Ve=-1,ot=ce.coordinates.length;for(var ft=new Array(ot);++Ve<ot;)Cl(ce.coordinates[Ve],ft[Ve]=[],qe);ul(qe),Ae={type:"MultiPolygon",coordinates:ft.filter(Lo)};break}default:return ce}return ce.bbox!=null&&(Ae.bbox=ce.bbox),Ae}function Fl(ce){if(ce==null)return ce;switch(ce.type){case"Feature":return Gl(ce);case"FeatureCollection":{var Ae={type:"FeatureCollection",features:ce.features.map(Gl)};return ce.bbox!=null&&(Ae.bbox=ce.bbox),Ae}default:return Vl(ce)}}function ga(ce,Ae){var qe=b(Ae/2),Ve=x(L*qe);return[ce*(.74482-.34588*Ve*Ve),1.70711*qe]}ga.invert=function(ce,Ae){var qe=Ae/1.70711,Ve=x(L*qe);return[ce/(.74482-.34588*Ve*Ve),2*i(qe)]};function ko(){return t.geoProjection(ga).scale(146.153)}function zs(ce,Ae,qe){var Ve=t.geoInterpolate(Ae,qe),ot=Ve(.5),Ke=t.geoRotation([-ot[0],-ot[1]])(Ae),ft=Ve.distance/2,qt=-q(x(Ke[1]*T)/x(ft)),Xt=[-ot[0],-ot[1],-(Ke[0]>0?E-qt:qt)*z],$t=t.geoProjection(ce(ft)).rotate(Xt),dr=t.geoRotation(Xt),Mr=$t.center;return delete $t.rotate,$t.center=function($r){return arguments.length?Mr(dr($r)):dr.invert(Mr())},$t.clipAngle(90)}function Fo(ce){var Ae=o(ce);function qe(Ve,ot){var Ke=t.geoGnomonicRaw(Ve,ot);return Ke[0]*=Ae,Ke}return qe.invert=function(Ve,ot){return t.geoGnomonicRaw.invert(Ve/Ae,ot)},qe}function Ys(){return Gs([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Gs(ce,Ae){return zs(Fo,ce,Ae)}function Us(ce){if(!(ce*=2))return t.geoAzimuthalEquidistantRaw;var Ae=-ce/2,qe=-Ae,Ve=ce*ce,ot=b(qe),Ke=.5/x(qe);function ft(qt,Xt){var $t=U(o(Xt)*o(qt-Ae)),dr=U(o(Xt)*o(qt-qe)),Mr=Xt<0?-1:1;return $t*=$t,dr*=dr,[($t-dr)/(2*ce),Mr*H(4*Ve*dr-(Ve-$t+dr)*(Ve-$t+dr))/(2*ce)]}return ft.invert=function(qt,Xt){var $t=Xt*Xt,dr=o(H($t+($r=qt+Ae)*$r)),Mr=o(H($t+($r=qt+qe)*$r)),$r,ii;return[a(ii=dr-Mr,$r=(dr+Mr)*ot),(Xt<0?-1:1)*U(H($r*$r+ii*ii)*Ke)]},ft}function Sl(){return _l([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function _l(ce,Ae){return zs(Us,ce,Ae)}function kl(ce,Ae){if(n(Ae)<y)return[ce,0];var qe=n(Ae/A),Ve=q(qe);if(n(ce)<y||n(n(Ae)-A)<y)return[0,p(Ae)*E*b(Ve/2)];var ot=o(Ve),Ke=n(E/ce-ce/E)/2,ft=Ke*Ke,qt=ot/(qe+ot-1),Xt=qt*(2/qe-1),$t=Xt*Xt,dr=$t+ft,Mr=qt-$t,$r=ft+qt;return[p(ce)*E*(Ke*Mr+H(ft*Mr*Mr-dr*(qt*qt-$t)))/dr,p(Ae)*E*(Xt*$r-Ke*H((ft+1)*dr-$r*$r))/dr]}kl.invert=function(ce,Ae){if(n(Ae)<y)return[ce,0];if(n(ce)<y)return[0,A*x(2*i(Ae/E))];var qe=(ce/=E)*ce,Ve=(Ae/=E)*Ae,ot=qe+Ve,Ke=ot*ot,ft=-n(Ae)*(1+ot),qt=ft-2*Ve+qe,Xt=-2*ft+1+2*Ve+Ke,$t=Ve/Xt+(2*qt*qt*qt/(Xt*Xt*Xt)-9*ft*qt/(Xt*Xt))/27,dr=(ft-qt*qt/(3*Xt))/Xt,Mr=2*H(-dr/3),$r=U(3*$t/(dr*Mr))/3;return[E*(ot-1+H(1+2*(qe-Ve)+Ke))/(2*ce),p(Ae)*E*(-Mr*o($r+E/3)-qt/(3*Xt))]};function cl(){return t.geoProjection(kl).scale(79.4183)}function xl(ce,Ae){if(n(Ae)<y)return[ce,0];var qe=n(Ae/A),Ve=q(qe);if(n(ce)<y||n(n(Ae)-A)<y)return[0,p(Ae)*E*b(Ve/2)];var ot=o(Ve),Ke=n(E/ce-ce/E)/2,ft=Ke*Ke,qt=ot*(H(1+ft)-Ke*ot)/(1+ft*qe*qe);return[p(ce)*E*qt,p(Ae)*E*H(1-qt*(2*Ke+qt))]}xl.invert=function(ce,Ae){if(!ce)return[0,A*x(2*i(Ae/E))];var qe=n(ce/E),Ve=(1-qe*qe-(Ae/=E)*Ae)/(2*qe),ot=Ve*Ve,Ke=H(ot+1);return[p(ce)*E*(Ke-Ve),p(Ae)*A*x(2*a(H((1-2*Ve*qe)*(Ve+Ke)-qe),H(Ke+Ve+qe)))]};function Uo(){return t.geoProjection(xl).scale(79.4183)}function _s(ce,Ae){if(n(Ae)<y)return[ce,0];var qe=Ae/A,Ve=q(qe);if(n(ce)<y||n(n(Ae)-A)<y)return[0,E*b(Ve/2)];var ot=(E/ce-ce/E)/2,Ke=qe/(1+o(Ve));return[E*(p(ce)*H(ot*ot+1-Ke*Ke)-ot),E*Ke]}_s.invert=function(ce,Ae){if(!Ae)return[ce,0];var qe=Ae/E,Ve=(E*E*(1-qe*qe)-ce*ce)/(2*E*ce);return[ce?E*(p(ce)*H(Ve*Ve+1)-Ve):0,A*x(2*i(qe))]};function Bl(){return t.geoProjection(_s).scale(79.4183)}function Il(ce,Ae){if(!Ae)return[ce,0];var qe=n(Ae);if(!ce||qe===A)return[0,Ae];var Ve=qe/A,ot=Ve*Ve,Ke=(8*Ve-ot*(ot+2)-5)/(2*ot*(Ve-1)),ft=Ke*Ke,qt=Ve*Ke,Xt=ot+ft+2*qt,$t=Ve+3*Ke,dr=ce/A,Mr=dr+1/dr,$r=p(n(ce)-A)*H(Mr*Mr-4),ii=$r*$r,pi=Xt*(ot+ft*ii-1)+(1-ot)*(ot*($t*$t+4*ft)+12*qt*ft+4*ft*ft),Yi=($r*(Xt+ft-1)+2*H(pi))/(4*Xt+ii);return[p(ce)*A*Yi,p(Ae)*A*H(1+$r*n(Yi)-Yi*Yi)]}Il.invert=function(ce,Ae){var qe;if(!ce||!Ae)return[ce,Ae];Ae/=E;var Ve=p(ce)*ce/A,ot=(Ve*Ve-1+4*Ae*Ae)/n(Ve),Ke=ot*ot,ft=2*Ae,qt=50;do{var Xt=ft*ft,$t=(8*ft-Xt*(Xt+2)-5)/(2*Xt*(ft-1)),dr=(3*ft-Xt*ft-10)/(2*Xt*ft),Mr=$t*$t,$r=ft*$t,ii=ft+$t,pi=ii*ii,Yi=ft+3*$t,wn=pi*(Xt+Mr*Ke-1)+(1-Xt)*(Xt*(Yi*Yi+4*Mr)+Mr*(12*$r+4*Mr)),Tn=-2*ii*(4*$r*Mr+(1-4*Xt+3*Xt*Xt)*(1+dr)+Mr*(-6+14*Xt-Ke+(-8+8*Xt-2*Ke)*dr)+$r*(-8+12*Xt+(-10+10*Xt-Ke)*dr)),ua=H(wn),oo=ot*(pi+Mr-1)+2*ua-Ve*(4*pi+Ke),el=ot*(2*$t*dr+2*ii*(1+dr))+Tn/ua-8*ii*(ot*(-1+Mr+pi)+2*ua)*(1+dr)/(Ke+4*pi);ft-=qe=oo/el}while(qe>y&&--qt>0);return[p(ce)*(H(ot*ot+4)+ot)*E/4,A*ft]};function Dl(){return t.geoProjection(Il).scale(127.16)}function oe(ce,Ae,qe,Ve,ot){function Ke(ft,qt){var Xt=qe*x(Ve*qt),$t=H(1-Xt*Xt),dr=H(2/(1+$t*o(ft*=ot)));return[ce*$t*dr*x(ft),Ae*Xt*dr]}return Ke.invert=function(ft,qt){var Xt=ft/ce,$t=qt/Ae,dr=H(Xt*Xt+$t*$t),Mr=2*q(dr/2);return[a(ft*b(Mr),ce*dr)/ot,dr&&q(qt*x(Mr)/(Ae*qe*dr))/Ve]},Ke}function w(ce,Ae,qe,Ve){var ot=E/3;ce=f(ce,y),Ae=f(Ae,y),ce=c(ce,A),Ae=c(Ae,E-y),qe=f(qe,0),qe=c(qe,100-y),Ve=f(Ve,y);var Ke=qe/100+1,ft=Ve/100,qt=U(Ke*o(ot))/ot,Xt=x(ce)/x(qt*A),$t=Ae/E,dr=H(ft*x(ce/2)/x(Ae/2)),Mr=dr/H($t*Xt*qt),$r=1/(dr*H($t*Xt*qt));return oe(Mr,$r,Xt,qt,$t)}function B(){var ce=65*T,Ae=60*T,qe=20,Ve=200,ot=t.geoProjectionMutator(w),Ke=ot(ce,Ae,qe,Ve);return Ke.poleline=function(ft){return arguments.length?ot(ce=+ft*T,Ae,qe,Ve):ce*z},Ke.parallels=function(ft){return arguments.length?ot(ce,Ae=+ft*T,qe,Ve):Ae*z},Ke.inflation=function(ft){return arguments.length?ot(ce,Ae,qe=+ft,Ve):qe},Ke.ratio=function(ft){return arguments.length?ot(ce,Ae,qe,Ve=+ft):Ve},Ke.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*E+3*H(3),le=2*H(2*E*H(3)/ee),Ne=_t(le*H(3)/E,le,ee/6);function $e(){return t.geoProjection(Ne).scale(176.84)}function pt(ce,Ae){return[ce*H(1-3*Ae*Ae/(E*E)),Ae]}pt.invert=function(ce,Ae){return[ce/H(1-3*Ae*Ae/(E*E)),Ae]};function zt(){return t.geoProjection(pt).scale(152.63)}function Yt(ce,Ae){var qe=o(Ae),Ve=o(ce)*qe,ot=1-Ve,Ke=o(ce=a(x(ce)*qe,-x(Ae))),ft=x(ce);return qe=H(1-Ve*Ve),[ft*qe-Ke*ot,-Ke*qe-ft*ot]}Yt.invert=function(ce,Ae){var qe=(ce*ce+Ae*Ae)/-2,Ve=H(-qe*(2+qe)),ot=Ae*qe+ce*Ve,Ke=ce*qe-Ae*Ve,ft=H(Ke*Ke+ot*ot);return[a(Ve*ot,ft*(1+qe)),ft?-q(Ve*Ke/ft):0]};function Jt(){return t.geoProjection(Yt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function yr(ce,Ae){var qe=ze(ce,Ae);return[(qe[0]+ce/A)/2,(qe[1]+Ae)/2]}yr.invert=function(ce,Ae){var qe=ce,Ve=Ae,ot=25;do{var Ke=o(Ve),ft=x(Ve),qt=x(2*Ve),Xt=ft*ft,$t=Ke*Ke,dr=x(qe),Mr=o(qe/2),$r=x(qe/2),ii=$r*$r,pi=1-$t*Mr*Mr,Yi=pi?U(Ke*Mr)*H(wn=1/pi):wn=0,wn,Tn=.5*(2*Yi*Ke*$r+qe/A)-ce,ua=.5*(Yi*ft+Ve)-Ae,oo=.5*wn*($t*ii+Yi*Ke*Mr*Xt)+.5/A,el=wn*(dr*qt/4-Yi*ft*$r),ys=.125*wn*(qt*$r-Yi*ft*$t*dr),il=.5*wn*(Xt*Mr+Yi*ii*Ke)+.5,$l=el*ys-il*oo,pl=(ua*el-Tn*il)/$l,Hl=(Tn*ys-ua*oo)/$l;qe-=pl,Ve-=Hl}while((n(pl)>y||n(Hl)>y)&&--ot>0);return[qe,Ve]};function Ir(){return t.geoProjection(yr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=be,e.geoAiryRaw=ne,e.geoAitoff=Ce,e.geoAitoffRaw=ze,e.geoArmadillo=te,e.geoArmadilloRaw=he,e.geoAugust=Ee,e.geoAugustRaw=ke,e.geoBaker=me,e.geoBakerRaw=Re,e.geoBerghaus=fe,e.geoBerghausRaw=Be,e.geoBertin1953=Tt,e.geoBertin1953Raw=Xe,e.geoBoggs=ut,e.geoBoggsRaw=nt,e.geoBonne=Je,e.geoBonneRaw=tt,e.geoBottomley=Vt,e.geoBottomleyRaw=Mt,e.geoBromley=ir,e.geoBromleyRaw=Kt,e.geoChamberlin=Ie,e.geoChamberlinRaw=_e,e.geoChamberlinAfrica=Pe,e.geoCollignon=ye,e.geoCollignonRaw=lt,e.geoCraig=de,e.geoCraigRaw=ue,e.geoCraster=St,e.geoCrasterRaw=Et,e.geoCylindricalEqualArea=qr,e.geoCylindricalEqualAreaRaw=Zt,e.geoCylindricalStereographic=vr,e.geoCylindricalStereographicRaw=Lr,e.geoEckert1=si,e.geoEckert1Raw=Er,e.geoEckert2=Si,e.geoEckert2Raw=Ei,e.geoEckert3=Hi,e.geoEckert3Raw=xi,e.geoEckert4=ci,e.geoEckert4Raw=Jr,e.geoEckert5=Lt,e.geoEckert5Raw=Di,e.geoEckert6=Dt,e.geoEckert6Raw=vt,e.geoEisenlohr=br,e.geoEisenlohrRaw=sr,e.geoFahey=Rr,e.geoFaheyRaw=Tr,e.geoFoucaut=oi,e.geoFoucautRaw=Br,e.geoFoucautSinusoidal=Pi,e.geoFoucautSinusoidalRaw=vi,e.geoGilbert=Ur,e.geoGingery=Vi,e.geoGingeryRaw=ti,e.geoGinzburg4=sn,e.geoGinzburg4Raw=Mi,e.geoGinzburg5=Or,e.geoGinzburg5Raw=fi,e.geoGinzburg6=Wt,e.geoGinzburg6Raw=st,e.geoGinzburg8=or,e.geoGinzburg8Raw=tr,e.geoGinzburg9=hi,e.geoGinzburg9Raw=Nr,e.geoGringorten=fn,e.geoGringortenRaw=Qr,e.geoGuyou=na,e.geoGuyouRaw=ia,e.geoHammer=gt,e.geoHammerRaw=Ze,e.geoHammerRetroazimuthal=un,e.geoHammerRetroazimuthalRaw=go,e.geoHealpix=Xn,e.geoHealpixRaw=Bo,e.geoHill=Ja,e.geoHillRaw=ts,e.geoHomolosine=ln,e.geoHomolosineRaw=pa,e.geoHufnagel=va,e.geoHufnagelRaw=ka,e.geoHyperelliptical=Yn,e.geoHyperellipticalRaw=Fi,e.geoInterrupt=Pn,e.geoInterruptedBoggs=jo,e.geoInterruptedHomolosine=Pa,e.geoInterruptedMollweide=co,e.geoInterruptedMollweideHemispheres=_o,e.geoInterruptedSinuMollweide=bs,e.geoInterruptedSinusoidal=sa,e.geoKavrayskiy7=ms,e.geoKavrayskiy7Raw=Bn,e.geoLagrange=on,e.geoLagrangeRaw=ya,e.geoLarrivee=ca,e.geoLarriveeRaw=Ga,e.geoLaskowski=Xi,e.geoLaskowskiRaw=bn,e.geoLittrow=Ia,e.geoLittrowRaw=qn,e.geoLoximuthal=Ya,e.geoLoximuthalRaw=yn,e.geoMiller=Da,e.geoMillerRaw=ba,e.geoModifiedStereographic=Un,e.geoModifiedStereographicRaw=Aa,e.geoModifiedStereographicAlaska=Sa,e.geoModifiedStereographicGs48=Za,e.geoModifiedStereographicGs50=xo,e.geoModifiedStereographicMiller=Wa,e.geoModifiedStereographicLee=hn,e.geoMollweide=jt,e.geoMollweideRaw=Ct,e.geoMtFlatPolarParabolic=Jo,e.geoMtFlatPolarParabolicRaw=ns,e.geoMtFlatPolarQuartic=ma,e.geoMtFlatPolarQuarticRaw=vo,e.geoMtFlatPolarSinusoidal=To,e.geoMtFlatPolarSinusoidalRaw=ja,e.geoNaturalEarth2=la,e.geoNaturalEarth2Raw=Ao,e.geoNellHammer=ho,e.geoNellHammerRaw=Ki,e.geoInterruptedQuarticAuthalic=Ca,e.geoNicolosi=En,e.geoNicolosiRaw=ta,e.geoPatterson=Eo,e.geoPattersonRaw=Zo,e.geoPolyconic=$a,e.geoPolyconicRaw=lo,e.geoPolyhedral=xs,e.geoPolyhedralButterfly=Na,e.geoPolyhedralCollignon=fo,e.geoPolyhedralWaterman=ro,e.geoProject=ws,e.geoGringortenQuincuncial=bt,e.geoPeirceQuincuncial=Ft,e.geoPierceQuincuncial=Ft,e.geoQuantize=hr,e.geoQuincuncial=gs,e.geoRectangularPolyconic=Sr,e.geoRectangularPolyconicRaw=nr,e.geoRobinson=mi,e.geoRobinsonRaw=di,e.geoSatellite=wi,e.geoSatelliteRaw=dn,e.geoSinuMollweide=cs,e.geoSinuMollweideRaw=an,e.geoSinusoidal=je,e.geoSinusoidalRaw=rt,e.geoStitch=Fl,e.geoTimes=ko,e.geoTimesRaw=ga,e.geoTwoPointAzimuthal=Gs,e.geoTwoPointAzimuthalRaw=Fo,e.geoTwoPointAzimuthalUsa=Ys,e.geoTwoPointEquidistant=_l,e.geoTwoPointEquidistantRaw=Us,e.geoTwoPointEquidistantUsa=Sl,e.geoVanDerGrinten=cl,e.geoVanDerGrintenRaw=kl,e.geoVanDerGrinten2=Uo,e.geoVanDerGrinten2Raw=xl,e.geoVanDerGrinten3=Bl,e.geoVanDerGrinten3Raw=_s,e.geoVanDerGrinten4=Dl,e.geoVanDerGrinten4Raw=Il,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=$e,e.geoWagner4Raw=Ne,e.geoWagner6=zt,e.geoWagner6Raw=pt,e.geoWiechel=Jt,e.geoWiechelRaw=Yt,e.geoWinkel3=Ir,e.geoWinkel3Raw=yr,Object.defineProperty(e,"__esModule",{value:!0})})});var q6e=Se(($0r,F6e)=>{"use strict";var od=Nl(),zX=Zr(),sFt=Ul(),XA=Math.PI/180,G2=180/Math.PI,IX={cursor:"pointer"},DX={cursor:"auto"};function lFt(e,t){var r=e.projection,n;return t._isScoped?n=uFt:t._isClipped?n=cFt:n=fFt,n(e,r)}F6e.exports=lFt;function RX(e,t){return od.behavior.zoom().translate(t.translate()).scale(t.scale())}function FX(e,t,r){var n=e.id,i=e.graphDiv,a=i.layout,o=a[n],s=i._fullLayout,u=s[n],l={},f={};function c(h,d){l[n+"."+h]=zX.nestedProperty(o,h).get(),sFt.call("_storeDirectGUIEdit",a,s._preGUI,l);var p=zX.nestedProperty(u,h);p.get()!==d&&(p.set(d),zX.nestedProperty(o,h).set(d),f[n+"."+h]=d)}r(c),c("projection.scale",t.scale()/e.fitScale),c("fitbounds",!1),i.emit("plotly_relayout",f)}function uFt(e,t){var r=RX(e,t);function n(){od.select(this).style(IX)}function i(){t.scale(od.event.scale).translate(od.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 u=t.invert(e.midPt);s("center.lon",u[0]),s("center.lat",u[1])}function o(){od.select(this).style(DX),FX(e,t,a)}return r.on("zoomstart",n).on("zoom",i).on("zoomend",o),r}function fFt(e,t){var r=RX(e,t),n=2,i,a,o,s,u,l,f,c,h;function d(E){return t.invert(E)}function p(E){var A=d(E);if(!A)return!0;var L=t(A);return Math.abs(L[0]-E[0])>n||Math.abs(L[1]-E[1])>n}function x(){od.select(this).style(IX),i=od.mouse(this),a=t.rotate(),o=t.translate(),s=a,u=d(i)}function b(){if(l=od.mouse(this),p(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(od.event.scale),t.translate([o[0],od.event.translate[1]]),u?d(l)&&(c=d(l),f=[s[0]+(c[0]-u[0]),a[1],a[2]],t.rotate(f),s=f):(i=l,u=d(i)),h=!0,e.render(!0);var E=t.rotate(),A=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":A[0],"geo.center.lat":A[1],"geo.projection.rotation.lon":-E[0]})}function y(){od.select(this).style(DX),h&&FX(e,t,k)}function k(E){var A=t.rotate(),L=t.invert(e.midPt);E("projection.rotation.lon",-A[0]),E("center.lon",L[0]),E("center.lat",L[1])}return r.on("zoomstart",x).on("zoom",b).on("zoomend",y),r}function cFt(e,t){var r={r:t.rotate(),k:t.scale()},n=RX(e,t),i=_Ft(n,"zoomstart","zoom","zoomend"),a=0,o=n.on,s;n.on("zoomstart",function(){od.select(this).style(IX);var h=od.mouse(this),d=t.rotate(),p=d,x=t.translate(),b=hFt(d);s=SF(t,h),o.call(n,"zoom",function(){var y=od.mouse(this);if(t.scale(r.k=od.event.scale),!s)h=y,s=SF(t,h);else if(SF(t,y)){t.rotate(d).translate(x);var k=SF(t,y),E=pFt(s,k),A=yFt(dFt(b,E)),L=r.r=vFt(A,s,p);(!isFinite(L[0])||!isFinite(L[1])||!isFinite(L[2]))&&(L=p),t.rotate(L),p=L}l(i.of(this,arguments))}),u(i.of(this,arguments))}).on("zoomend",function(){od.select(this).style(DX),o.call(n,"zoom",null),f(i.of(this,arguments)),FX(e,t,c)}).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 u(h){a++||h({type:"zoomstart"})}function l(h){h({type:"zoom"})}function f(h){--a||h({type:"zoomend"})}function c(h){var d=t.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return od.rebind(n,i,"on")}function SF(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&mFt(r)}function hFt(e){var t=.5*e[0]*XA,r=.5*e[1]*XA,n=.5*e[2]*XA,i=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),u=Math.sin(n),l=Math.cos(n);return[a*s*l+i*o*u,i*s*l-a*o*u,a*o*l+i*s*u,a*s*u-i*o*l]}function dFt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],u=t[2],l=t[3];return[r*o-n*s-i*u-a*l,r*s+n*o+i*l-a*u,r*u-n*l+i*o+a*s,r*l+n*u-i*s+a*o]}function pFt(e,t){if(!(!e||!t)){var r=gFt(e,t),n=Math.sqrt(R6e(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,R6e(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function vFt(e,t,r){var n=PX(t,2,e[0]);n=PX(n,1,e[1]),n=PX(n,0,e[2]-r[2]);var i=t[0],a=t[1],o=t[2],s=n[0],u=n[1],l=n[2],f=Math.atan2(a,i)*G2,c=Math.sqrt(i*i+a*a),h,d;Math.abs(u)>c?(d=(u>0?90:-90)-f,h=0):(d=Math.asin(u/c)*G2-f,h=Math.sqrt(c*c-u*u));var p=180-d-2*f,x=(Math.atan2(l,s)-Math.atan2(o,h))*G2,b=(Math.atan2(l,s)-Math.atan2(o,-h))*G2,y=I6e(r[0],r[1],d,x),k=I6e(r[0],r[1],p,b);return y<=k?[d,x,r[2]]:[p,b,r[2]]}function I6e(e,t,r,n){var i=D6e(r-e),a=D6e(n-t);return Math.sqrt(i*i+a*a)}function D6e(e){return(e%360+540)%360-180}function PX(e,t,r){var n=r*XA,i=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(n),u=Math.sin(n);return i[a]=e[a]*s-e[o]*u,i[o]=e[o]*s+e[a]*u,i}function yFt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*G2,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*G2,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*G2]}function mFt(e){var t=e[0]*XA,r=e[1]*XA,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function R6e(e,t){for(var r=0,n=0,i=e.length;n<i;++n)r+=e[n]*t[n];return r}function gFt(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 _Ft(e){for(var t=0,r=arguments.length,n=[];++t<r;)n.push(arguments[t]);var i=od.dispatch.apply(null,n);return i.of=function(a,o){return function(s){var u;try{u=s.sourceEvent=od.event,s.target=e,od.event=s,i[s.type].apply(a,o)}finally{od.event=u}}},i}});var G6e=Se((Q0r,H6e)=>{"use strict";var t1=Nl(),OX=LX(),xFt=OX.geoPath,bFt=OX.geoDistance,wFt=P6e(),TFt=Ul(),QE=Zr(),AFt=QE.strTranslate,MF=Pl(),$E=yu(),B6e=jc(),SFt=Ac(),BX=hu(),O6e=wy().getAutoRange,qX=gp(),MFt=nh().prepSelect,EFt=nh().clearOutline,kFt=nh().selectOnClick,CFt=q6e(),cv=XE(),LFt=ix(),U6e=fF(),zFt=vX().feature;function V6e(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 $y=V6e.prototype;H6e.exports=function(t){return new V6e(t)};$y.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 u in cv.layerNameToAdjective)if(u!=="frame"&&a["show"+u]){s=!0;break}for(var l=!1,f=0;f<e.length;f++){var c=e[0][0].trace;c._geo=i,c.locationmode&&(s=!0);var h=c.marker;if(h){var d=h.angle,p=h.angleref;(d||p==="north"||p==="previous")&&(l=!0)}}if(this._hasMarkerAngles=l,s){var x=U6e.getTopojsonName(a);(i.topojson===null||x!==i.topojsonName)&&(i.topojsonName=x,PlotlyGeoAssets.topojson[i.topojsonName]===void 0&&o.push(i.fetchTopojson()))}o=o.concat(LFt.fetchTraceGeoData(e)),r.push(new Promise(function(b,y){Promise.all(o).then(function(){i.topojson=PlotlyGeoAssets.topojson[i.topojsonName],i.update(e,t),b()}).catch(y)}))};$y.fetchTopojson=function(){var e=this,t=U6e.getTopojsonPath(e.topojsonURL,e.topojsonName);return new Promise(function(r,n){t1.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()})})};$y.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),SFt.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var u=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=u.selectAll(".point"),this.dataPoints.text=u.selectAll("text"),this.dataPaths.line=u.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()};$y.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],i=t._size,a=n.domain,o=n.projection,s=n.lonaxis,u=n.lataxis,l=s._ax,f=u._ax,c=this.projection=PFt(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||{},p=o.rotation||{},x=s.range||[],b=u.range||[];if(n.fitbounds){l._length=h[1][0]-h[0][0],f._length=h[1][1]-h[0][1],l.range=O6e(r,l),f.range=O6e(r,f);var y=(l.range[0]+l.range[1])/2,k=(f.range[0]+f.range[1])/2;if(n._isScoped)d={lon:y,lat:k};else if(n._isClipped){d={lon:y,lat:k},p={lon:y,lat:k,roll:p.roll};var E=o.type,A=cv.lonaxisSpan[E]/2||180,L=cv.lataxisSpan[E]/2||90;x=[y-A,y+A],b=[k-L,k+L]}else d={lon:y,lat:k},p={lon:y,lat:p.lat,roll:p.roll}}c.center([d.lon-p.lon,d.lat-p.lat]).rotate([-p.lon,-p.lat,p.roll]).parallels(o.parallels);var _=N6e(x,b);c.fitExtent(h,_);var C=this.bounds=c.getBounds(_),M=this.fitScale=c.scale(),v=c.translate();if(n.fitbounds){var z=c.getBounds(N6e(l.range,f.range)),T=Math.min((C[1][0]-C[0][0])/(z[1][0]-z[0][0]),(C[1][1]-C[0][1])/(z[1][1]-z[0][1]));isFinite(T)?c.scale(T*M):QE.warn("Something went wrong during"+this.id+"fitbounds computations.")}else c.scale(o.scale*M);var F=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(c.translate([v[0]+(F[0]-v[0]),v[1]+(F[1]-v[1])]).clipExtent(C),n._isAlbersUsa){var q=c([d.lon,d.lat]),U=c.translate();c.translate([U[0]-(q[0]-U[0]),U[1]-(q[1]-U[1])])}};$y.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!!cv.lineLayers[h]}function u(h){return!!cv.fillLayers[h]}var l=this.hasChoropleth?cv.layersForChoropleth:cv.layers,f=l.filter(function(h){return s(h)||u(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),c=r.framework.selectAll(".layer").data(f,String);c.exit().each(function(h){delete i[h],delete a[h],t1.select(this).remove()}),c.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var d=i[h]=t1.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):u(h)&&(a[h]=d.append("path").style("stroke","none"))}),c.order(),c.each(function(h){var d=a[h],p=cv.layerNameToAdjective[h];h==="frame"?d.datum(cv.sphereSVG):s(h)||u(h)?d.datum(zFt(n,n.objects[h])):o(h)&&d.datum(IFt(h,t,e)).call(MF.stroke,t[h].gridcolor).call($E.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(MF.stroke,t[p+"color"]).call($E.dashLine,"",t[p+"width"]):u(h)&&d.call(MF.fill,t[p+"color"])})};$y.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;$E.setRect(this.clipRect,i,a,o,s),this.bgRect.call($E.setRect,i,a,o,s).call(MF.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};$y.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 c=r.viewInitial,h={};for(var d in c)h[r.id+"."+d]=c[d];TFt.call("_guiRelayout",n,h),n.emit("plotly_doubleclick",null)}function u(c){return r.projection.invert([c[0]+r.xaxis._offset,c[1]+r.yaxis._offset])}var l=function(c,h){if(h.isRect){var d=c.range={};d[r.id]=[u([h.xmin,h.ymin]),u([h.xmax,h.ymax])]}else{var p=c.lassoPoints={};p[r.id]=h.map(u)}},f={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:l},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(c){c===2&&EFt(n)}};a==="pan"?(i.node().onmousedown=null,i.call(CFt(r,t)),i.on("dblclick.zoom",s),n._context._scrollZoom.geo||i.on("wheel.zoom",null)):(a==="select"||a==="lasso")&&(i.on(".zoom",null),f.prepFn=function(c,h,d){MFt(c,h,d,f,a)},qX.init(f)),i.on("mousemove",function(){var c=r.projection.invert(QE.getPositionFromD3Event());if(!c)return qX.unhover(n,t1.event);r.xaxis.p2c=function(){return c[0]},r.yaxis.p2c=function(){return c[1]},B6e.hover(n,t1.event,r.id)}),i.on("mouseout",function(){n._dragging||qX.unhover(n,t1.event)}),i.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&kFt(t1.event,n,[r.xaxis],[r.yaxis],r.id,f),o.indexOf("event")>-1&&B6e.click(n,t1.event))})};$y.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=t1.select(e.container).append("g").attr("class","geo "+e.id).call($E.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"},BX.setConvert(e.mockAxis,r)};$y.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},QE.extendFlat(this.viewInitial,i)};$y.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};$y._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?AFt(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 PFt(e){var t=e.projection,r=t.type,n=cv.projNames[r];n="geo"+QE.titleCase(n);for(var i=OX[n]||wFt[n],a=i(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?cv.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],u=function(c){return c?a:[]},l=0;l<s.length;l++){var f=s[l];typeof a[f]!="function"&&(a[f]=u)}return a.isLonLatOverEdges=function(c){if(a(c)===null)return!0;if(o){var h=a.rotate(),d=bFt(c,[-h[0],-h[1]]),p=o*Math.PI/180;return d>p}else return!1},a.getPath=function(){return xFt().projection(a)},a.getBounds=function(c){return a.getPath().bounds(c)},a.precision(cv.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-cv.clipPad),a}function IFt(e,t,r){var n=1e-6,i=2.5,a=t[e],o=cv.scopeDefaults[t.scope],s,u,l;e==="lonaxis"?(s=o.lonaxisRange,u=o.lataxisRange,l=function(k,E){return[k,E]}):e==="lataxis"&&(s=o.lataxisRange,u=o.lonaxisRange,l=function(k,E){return[E,k]});var f={type:"linear",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};BX.setConvert(f,r);var c=BX.calcTicks(f);!t.isScoped&&e==="lonaxis"&&c.pop();for(var h=c.length,d=new Array(h),p=0;p<h;p++)for(var x=c[p].x,b=d[p]=[],y=u[0];y<u[1]+i;y+=i)b.push(l(x,y));return{type:"MultiLineString",coordinates:d}}function N6e(e,t){var r=cv.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 NX=Se((eyr,Z6e)=>{"use strict";var KA=Ih(),DFt=Ec().attributes,RFt=Id().dash,YA=XE(),FFt=_c().overrideAll,W6e=X1(),j6e={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:KA.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:RFt},qFt=Z6e.exports=FFt({domain:DFt({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:W6e(YA.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:W6e(YA.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:KA.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:YA.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:YA.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:YA.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:YA.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:KA.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:KA.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:KA.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:KA.background},lonaxis:j6e,lataxis:j6e},"plot","from-root");qFt.uirevision={valType:"any",editType:"none"}});var K6e=Se((tyr,Y6e)=>{"use strict";var EF=Zr(),BFt=k_(),OFt=Dd().getSubplotData,kF=XE(),NFt=NX(),X6e=kF.axesNames;Y6e.exports=function(t,r,n){BFt(t,r,n,{type:"geo",attributes:NFt,handleDefaults:UFt,fullData:n,partition:"y"})};function UFt(e,t,r,n){var i=OFt(n.fullData,"geo",n.id),a=i.map(function(ne){return ne.index}),o=r("resolution"),s=r("scope"),u=kF.scopeDefaults[s],l=r("projection.type",u.projType),f=t._isAlbersUsa=l==="albers usa";f&&(s=t.scope="usa");var c=t._isScoped=s!=="world",h=t._isSatellite=l==="satellite",d=t._isConic=l.indexOf("conic")!==-1||l==="albers",p=t._isClipped=!!kF.lonaxisSpan[l];if(e.visible===!1){var x=EF.extendDeep({},t._template);x.showcoastlines=!1,x.showcountries=!1,x.showframe=!1,x.showlakes=!1,x.showland=!1,x.showocean=!1,x.showrivers=!1,x.showsubunits=!1,x.lonaxis&&(x.lonaxis.showgrid=!1),x.lataxis&&(x.lataxis.showgrid=!1),t._template=x}for(var b=r("visible"),y,k=0;k<X6e.length;k++){var E=X6e[k],A=[30,10][k],L;if(c)L=u[E+"Range"];else{var _=kF[E+"Span"],C=(_[l]||_["*"])/2,M=r("projection.rotation."+E.substr(0,3),u.projRotate[k]);L=[M-C,M+C]}var v=r(E+".range",L);r(E+".tick0"),r(E+".dtick",A),y=r(E+".showgrid",b?void 0:!1),y&&(r(E+".gridcolor"),r(E+".gridwidth"),r(E+".griddash")),t[E]._ax={type:"linear",_id:E.slice(0,3),_traceIndices:a,setScale:EF.identity,c2l:EF.identity,r2l:EF.identity,autorange:!0,range:v.slice(),_m:1,_input:{}}}var z=t.lonaxis.range,T=t.lataxis.range,F=z[0],q=z[1];F>0&&q<0&&(q+=360);var U=(F+q)/2,H;if(!f){var j=c?u.projRotate:[U,0,0];H=r("projection.rotation.lon",j[0]),r("projection.rotation.lat",j[1]),r("projection.rotation.roll",j[2]),y=r("showcoastlines",!c&&b),y&&(r("coastlinecolor"),r("coastlinewidth")),y=r("showocean",b?void 0:!1),y&&r("oceancolor")}var G,O;if(f?(G=-96.6,O=38.7):(G=c?U:H,O=(T[0]+T[1])/2),r("center.lon",G),r("center.lat",O),h&&(r("projection.tilt"),r("projection.distance")),d){var W=u.projParallels||[0,60];r("projection.parallels",W)}r("projection.scale"),y=r("showland",b?void 0:!1),y&&r("landcolor"),y=r("showlakes",b?void 0:!1),y&&r("lakecolor"),y=r("showrivers",b?void 0:!1),y&&(r("rivercolor"),r("riverwidth")),y=r("showcountries",c&&s!=="usa"&&b),y&&(r("countrycolor"),r("countrywidth")),(s==="usa"||s==="north america"&&o===50)&&(r("showsubunits",b),r("subunitcolor"),r("subunitwidth")),c||(y=r("showframe",b),y&&(r("framecolor"),r("framewidth"))),r("bgcolor");var re=r("fitbounds");re&&(delete t.projection.scale,c?(delete t.center.lon,delete t.center.lat):p?(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 UX=Se((ryr,Q6e)=>{"use strict";var VFt=Dd().getSubplotCalcData,HFt=Zr().counterRegex,GFt=G6e(),jm="geo",J6e=HFt(jm),$6e={};$6e[jm]={valType:"subplotid",dflt:jm,editType:"calc"};function WFt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[jm],i=0;i<n.length;i++){var a=n[i],o=VFt(r,jm,a),s=t[a],u=s._subplot;u||(u=GFt({id:a,graphDiv:e,container:t._geolayer.node(),topojsonURL:e._context.topojsonURL,staticPlot:e._context.staticPlot}),t[a]._subplot=u),u.plot(o,t,e._promises)}}function jFt(e,t,r,n){for(var i=n._subplots[jm]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!t[o]&&s&&(s.framework.remove(),s.clipDef.remove())}}function ZFt(e){for(var t=e._fullLayout,r=t._subplots[jm],n=0;n<r.length;n++){var i=t[r[n]],a=i._subplot;a.updateFx(t,i)}}Q6e.exports={attr:jm,name:jm,idRoot:jm,idRegex:J6e,attrRegex:J6e,attributes:$6e,layoutAttributes:NX(),supplyLayoutDefaults:K6e(),plot:WFt,updateFx:ZFt,clean:jFt}});var tRe=Se((iyr,eRe)=>{"use strict";eRe.exports={attributes:H2(),supplyDefaults:RDe(),colorbar:ep(),formatLabels:BDe(),calc:lF(),calcGeoJSON:CX().calcGeoJSON,plot:CX().plot,style:SX(),styleOnSelect:ov().styleOnSelect,hoverPoints:T6e(),eventData:S6e(),selectPoints:k6e(),moduleType:"trace",name:"scattergeo",basePlotModule:UX(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var iRe=Se((nyr,rRe)=>{"use strict";rRe.exports=tRe()});var JA=Se((ayr,oRe)=>{"use strict";var XFt=Du().hovertemplateAttrs,ax=H2(),YFt=Xf(),nRe=zf(),KFt=Ih().defaultLine,nx=vu().extendFlat,aRe=ax.marker.line;oRe.exports=nx({locations:{valType:"data_array",editType:"calc"},locationmode:ax.locationmode,z:{valType:"data_array",editType:"calc"},geojson:nx({},ax.geojson,{}),featureidkey:ax.featureidkey,text:nx({},ax.text,{}),hovertext:nx({},ax.hovertext,{}),marker:{line:{color:nx({},aRe.color,{dflt:KFt}),width:nx({},aRe.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:ax.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:ax.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:nx({},nRe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:XFt(),showlegend:nx({},nRe.showlegend,{dflt:!1})},YFt("",{cLetter:"z",editTypeOverride:"calc"}))});var lRe=Se((oyr,sRe)=>{"use strict";var CF=Zr(),JFt=ed(),$Ft=JA();sRe.exports=function(t,r,n,i){function a(h,d){return CF.coerce(t,r,$Ft,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&CF.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var u=a("geojson"),l;(typeof u=="string"&&u!==""||CF.isPlainObject(u))&&(l="geojson-id");var f=a("locationmode",l);f==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate");var c=a("marker.line.width");c&&a("marker.line.color"),a("marker.opacity"),JFt(t,r,i,a,{prefix:"",cLetter:"z"}),CF.coerceSelectionMarkerOpacity(r,a)}});var LF=Se((syr,cRe)=>{"use strict";var uRe=_u(),QFt=ju().BADNUM,e9t=Rp(),t9t=km(),r9t=F0();function fRe(e){return e&&typeof e=="string"}cRe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(f){return fRe(f)||uRe(f)}:a=fRe;for(var o=0;o<n;o++){var s=i[o]={},u=r.locations[o],l=r.z[o];a(u)&&uRe(l)?(s.loc=u,s.z=l):(s.loc=null,s.z=QFt),s.index=o}return t9t(i,r),e9t(t,r,{vals:r.z,containerStr:"",cLetter:"z"}),r9t(i,r),i}});var zF=Se((lyr,dRe)=>{"use strict";var i9t=Nl(),n9t=Pl(),VX=yu(),a9t=fc();function o9t(e,t){t&&hRe(e,t)}function hRe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=a9t.makeColorScaleFuncFromTrace(r);i.each(function(u){i9t.select(this).attr("fill",s(u.z)).call(n9t.stroke,u.mlc||o.color).call(VX.dashLine,"",u.mlw||o.width||0).style("opacity",a.opacity)}),VX.selectedPointStyle(i,r)}function s9t(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?VX.selectedPointStyle(r.selectAll(".choroplethlocation"),n):hRe(e,t)}dRe.exports={style:o9t,styleOnSelect:s9t}});var HX=Se((uyr,yRe)=>{"use strict";var l9t=Nl(),pRe=Zr(),$A=ix(),u9t=fF().getTopojsonFeatures,vRe=wy().findExtremes,f9t=zF().style;function c9t(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");pRe.makeTraceGroups(n,r,"trace choropleth").each(function(i){var a=l9t.select(this),o=a.selectAll("path.choroplethlocation").data(pRe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),f9t(e,i)})}function h9t(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"?$A.extractTraceFeature(e):u9t(r,i.topojson),u=[],l=[],f=0;f<o;f++){var c=e[f],h=a==="geojson-id"?c.fOut:$A.locationToFeature(a,c.loc,s);if(h){c.geojson=h,c.ct=h.properties.ct,c._polygons=$A.feature2polygons(h);var d=$A.computeBbox(h);u.push(d[0],d[2]),l.push(d[1],d[3])}else c.geojson=null}if(n.fitbounds==="geojson"&&a==="geojson-id"){var p=$A.computeBbox($A.getTraceGeojson(r));u=[p[0],p[2]],l=[p[1],p[3]]}var x={padded:!0};r._extremes.lon=vRe(n.lonaxis._ax,u,x),r._extremes.lat=vRe(n.lataxis._ax,l,x)}yRe.exports={calcGeoJSON:h9t,plot:c9t}});var PF=Se((fyr,mRe)=>{"use strict";var d9t=hu(),p9t=JA(),v9t=Zr().fillText;mRe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s,u,l,f,c=[r,n],h=[r+360,n];for(u=0;u<i.length;u++)if(s=i[u],f=!1,s._polygons){for(l=0;l<s._polygons.length;l++)s._polygons[l].contains(c)&&(f=!f),s._polygons[l].contains(h)&&(f=!f);if(f)break}if(!(!f||!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=d9t.tickText(o.mockAxis,o.mockAxis.c2l(s.z),"hover").text,t.hovertemplate=s.hovertemplate,y9t(t,a,s),[t]};function y9t(e,t,r){if(!t.hovertemplate){var n=r.hi||t.hoverinfo,i=String(r.loc),a=n==="all"?p9t.hoverinfo.flags:n.split("+"),o=a.indexOf("name")!==-1,s=a.indexOf("location")!==-1,u=a.indexOf("z")!==-1,l=a.indexOf("text")!==-1,f=!o&&s,c=[];f?e.nameOverride=i:(o&&(e.nameOverride=t.name),s&&c.push(i)),u&&c.push(e.zLabel),l&&v9t(r,t,c),e.extraText=c.join("<br>")}}});var IF=Se((cyr,gRe)=>{"use strict";gRe.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 DF=Se((hyr,_Re)=>{"use strict";_Re.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,u,l,f,c;if(r===!1)for(s=0;s<n.length;s++)n[s].selected=0;else for(s=0;s<n.length;s++)u=n[s],l=u.ct,l&&(f=i.c2p(l),c=a.c2p(l),r.contains([f,c],null,s,t)?(o.push({pointNumber:s,lon:l[0],lat:l[1]}),u.selected=1):u.selected=0);return o}});var bRe=Se((dyr,xRe)=>{"use strict";xRe.exports={attributes:JA(),supplyDefaults:lRe(),colorbar:S_(),calc:LF(),calcGeoJSON:HX().calcGeoJSON,plot:HX().plot,style:zF().style,styleOnSelect:zF().styleOnSelect,hoverPoints:PF(),eventData:IF(),selectPoints:DF(),moduleType:"trace",name:"choropleth",basePlotModule:UX(),categories:["geo","noOpacity","showLegend"],meta:{}}});var TRe=Se((pyr,wRe)=>{"use strict";wRe.exports=bRe()});var RF=Se((vyr,SRe)=>{"use strict";var m9t=Ul(),s0=Zr(),g9t=oT();function _9t(e,t,r,n){var i=e.cd,a=i[0].t,o=i[0].trace,s=e.xa,u=e.ya,l=a.x,f=a.y,c=s.c2p(t),h=u.c2p(r),d=e.distance,p;if(a.tree){var x=s.p2c(c-d),b=s.p2c(c+d),y=u.p2c(h-d),k=u.p2c(h+d);n==="x"?p=a.tree.range(Math.min(x,b),Math.min(u._rl[0],u._rl[1]),Math.max(x,b),Math.max(u._rl[0],u._rl[1])):p=a.tree.range(Math.min(x,b),Math.min(y,k),Math.max(x,b),Math.max(y,k))}else p=a.ids;var E,A,L,_,C,M,v,z,T,F=d;if(n==="x"){var q=!!o.xperiodalignment,U=!!o.yperiodalignment;for(C=0;C<p.length;C++){if(E=p[C],L=l[E],M=Math.abs(s.c2p(L)-c),q){var H=s.c2p(o._xStarts[E]),j=s.c2p(o._xEnds[E]);M=c>=Math.min(H,j)&&c<=Math.max(H,j)?0:1/0}if(M<F){if(F=M,_=f[E],v=u.c2p(_)-h,U){var G=u.c2p(o._yStarts[E]),O=u.c2p(o._yEnds[E]);v=h>=Math.min(G,O)&&h<=Math.max(G,O)?0:1/0}T=Math.sqrt(M*M+v*v),A=p[C]}}}else for(C=p.length-1;C>-1;C--)E=p[C],L=l[E],_=f[E],M=s.c2p(L)-c,v=u.c2p(_)-h,z=Math.sqrt(M*M+v*v),z<F&&(F=T=z,A=E);return e.index=A,e.distance=F,e.dxy=T,A===void 0?[e]:[ARe(e,l,f,o)]}function ARe(e,t,r,n){var i=e.xa,a=e.ya,o=e.distance,s=e.dxy,u=e.index,l={pointNumber:u,x:t[u],y:r[u]};l.tx=s0.isArrayOrTypedArray(n.text)?n.text[u]:n.text,l.htx=Array.isArray(n.hovertext)?n.hovertext[u]:n.hovertext,l.data=Array.isArray(n.customdata)?n.customdata[u]:n.customdata,l.tp=Array.isArray(n.textposition)?n.textposition[u]:n.textposition;var f=n.textfont;f&&(l.ts=s0.isArrayOrTypedArray(f.size)?f.size[u]:f.size,l.tc=s0.isArrayOrTypedArray(f.color)?f.color[u]:f.color,l.tf=Array.isArray(f.family)?f.family[u]:f.family,l.tw=Array.isArray(f.weight)?f.weight[u]:f.weight,l.ty=Array.isArray(f.style)?f.style[u]:f.style,l.tv=Array.isArray(f.variant)?f.variant[u]:f.variant);var c=n.marker;c&&(l.ms=s0.isArrayOrTypedArray(c.size)?c.size[u]:c.size,l.mo=s0.isArrayOrTypedArray(c.opacity)?c.opacity[u]:c.opacity,l.mx=s0.isArrayOrTypedArray(c.symbol)?c.symbol[u]:c.symbol,l.ma=s0.isArrayOrTypedArray(c.angle)?c.angle[u]:c.angle,l.mc=s0.isArrayOrTypedArray(c.color)?c.color[u]:c.color);var h=c&&c.line;h&&(l.mlc=Array.isArray(h.color)?h.color[u]:h.color,l.mlw=s0.isArrayOrTypedArray(h.width)?h.width[u]:h.width);var d=c&&c.gradient;d&&d.type!=="none"&&(l.mgt=Array.isArray(d.type)?d.type[u]:d.type,l.mgc=Array.isArray(d.color)?d.color[u]:d.color);var p=i.c2p(l.x,!0),x=a.c2p(l.y,!0),b=l.mrc||1,y=n.hoverlabel;y&&(l.hbg=Array.isArray(y.bgcolor)?y.bgcolor[u]:y.bgcolor,l.hbc=Array.isArray(y.bordercolor)?y.bordercolor[u]:y.bordercolor,l.hts=s0.isArrayOrTypedArray(y.font.size)?y.font.size[u]:y.font.size,l.htc=Array.isArray(y.font.color)?y.font.color[u]:y.font.color,l.htf=Array.isArray(y.font.family)?y.font.family[u]:y.font.family,l.hnl=s0.isArrayOrTypedArray(y.namelength)?y.namelength[u]:y.namelength);var k=n.hoverinfo;k&&(l.hi=Array.isArray(k)?k[u]:k);var E=n.hovertemplate;E&&(l.ht=Array.isArray(E)?E[u]:E);var A={};A[e.index]=l;var L=n._origX,_=n._origY,C=s0.extendFlat({},e,{color:g9t(n,l),x0:p-b,x1:p+b,xLabelVal:L?L[u]:l.x,y0:x-b,y1:x+b,yLabelVal:_?_[u]:l.y,cd:A,distance:o,spikeDistance:s,hovertemplate:l.ht});return l.htx?C.text=l.htx:l.tx?C.text=l.tx:n.text&&(C.text=n.text),s0.fillText(l,n,C),m9t.getComponentMethod("errorbars","hoverInfo")(l,n,C),C}SRe.exports={hoverPoints:_9t,calcHover:ARe}});var ox=Se((yyr,ERe)=>{"use strict";var MRe=20;ERe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:MRe,SYMBOL_STROKE:MRe/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 ek=Se((myr,zRe)=>{"use strict";var x9t=zf(),b9t=uc(),w9t=Ey(),oh=Zc(),kRe=Gc().axisHoverFormat,CRe=Xf(),T9t=X1(),GX=vu().extendFlat,A9t=_c().overrideAll,S9t=ox().DASHES,LRe=oh.line,r1=oh.marker,M9t=r1.line,QA=zRe.exports=A9t({x:oh.x,x0:oh.x0,dx:oh.dx,y:oh.y,y0:oh.y0,dy:oh.dy,xperiod:oh.xperiod,yperiod:oh.yperiod,xperiod0:oh.xperiod0,yperiod0:oh.yperiod0,xperiodalignment:oh.xperiodalignment,yperiodalignment:oh.yperiodalignment,xhoverformat:kRe("x"),yhoverformat:kRe("y"),text:oh.text,hovertext:oh.hovertext,textposition:oh.textposition,textfont:b9t({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:LRe.color,width:LRe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:T9t(S9t),dflt:"solid"}},marker:GX({},CRe("marker"),{symbol:r1.symbol,angle:r1.angle,size:r1.size,sizeref:r1.sizeref,sizemin:r1.sizemin,sizemode:r1.sizemode,opacity:r1.opacity,colorbar:r1.colorbar,line:GX({},CRe("marker.line"),{width:M9t.width})}),connectgaps:oh.connectgaps,fill:GX({},oh.fill,{dflt:"none"}),fillcolor:w9t(),selected:{marker:oh.selected.marker,textfont:oh.selected.textfont},unselected:{marker:oh.unselected.marker,textfont:oh.unselected.textfont},opacity:x9t.opacity},"calc","nested");QA.x.editType=QA.y.editType=QA.x0.editType=QA.y0.editType="calc+clearAxisTypes";QA.hovertemplate=oh.hovertemplate;QA.texttemplate=oh.texttemplate});var FF=Se(WX=>{"use strict";var PRe=ox();WX.isOpenSymbol=function(e){return typeof e=="string"?PRe.OPEN_RE.test(e):e%200>100};WX.isDotSymbol=function(e){return typeof e=="string"?PRe.DOT_RE.test(e):e>200}});var RRe=Se((_yr,DRe)=>{"use strict";var IRe=Zr(),E9t=Ul(),k9t=FF(),C9t=ek(),L9t=Sm(),qF=ec(),z9t=K3(),P9t=zy(),I9t=$v(),D9t=I0(),R9t=Py(),F9t=D0();DRe.exports=function(t,r,n,i){function a(d,p){return IRe.coerce(t,r,C9t,d,p)}var o=t.marker?k9t.isOpenSymbol(t.marker.symbol):!1,s=qF.isBubble(t),u=z9t(t,r,i,a);if(!u){r.visible=!1;return}P9t(t,r,i,a),a("xhoverformat"),a("yhoverformat");var l=u<L9t.PTS_LINESONLY?"lines+markers":"lines";a("text"),a("hovertext"),a("hovertemplate"),a("mode",l),qF.hasMarkers(r)&&(I9t(t,r,n,i,a,{noAngleRef:!0,noStandOff:!0}),a("marker.line.width",o||s?1:0)),qF.hasLines(r)&&(a("connectgaps"),D9t(t,r,n,i,a),a("line.shape")),qF.hasText(r)&&(a("texttemplate"),F9t(t,r,i,a,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var f=(r.line||{}).color,c=(r.marker||{}).color;a("fill"),r.fill!=="none"&&R9t(t,r,n,a);var h=E9t.getComponentMethod("errorbars","supplyDefaults");h(t,r,f||c||n,{axis:"y"}),h(t,r,f||c||n,{axis:"x",inherit:"y"}),IRe.coerceSelectionMarkerOpacity(r,a)}});var qRe=Se((xyr,FRe)=>{"use strict";var q9t=JP();FRe.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]),q9t(t,r,n)}});var ORe=Se((byr,BRe)=>{"use strict";function B9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],u=r!==void 0?r(s,t):s-t;u>=0?(a=o,i=o-1):n=o+1}return a}function O9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],u=r!==void 0?r(s,t):s-t;u>0?(a=o,i=o-1):n=o+1}return a}function N9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],u=r!==void 0?r(s,t):s-t;u<0?(a=o,n=o+1):i=o-1}return a}function U9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],u=r!==void 0?r(s,t):s-t;u<=0?(a=o,n=o+1):i=o-1}return a}function V9t(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 tk(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)}BRe.exports={ge:function(e,t,r,n,i){return tk(e,t,r,n,i,B9t)},gt:function(e,t,r,n,i){return tk(e,t,r,n,i,O9t)},lt:function(e,t,r,n,i){return tk(e,t,r,n,i,N9t)},le:function(e,t,r,n,i){return tk(e,t,r,n,i,U9t)},eq:function(e,t,r,n,i){return tk(e,t,r,n,i,V9t)}}});var Zm=Se((wyr,URe)=>{"use strict";URe.exports=function(t,r,n){var i={},a,o;if(typeof r=="string"&&(r=NRe(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]=NRe(r[a]);var u={};for(a in r){var l=r[a];if(Array.isArray(l))for(o=0;o<l.length;o++){var f=l[o];if(n&&(u[f]=!0),f in t){if(i[a]=t[f],n)for(var c=o;c<l.length;c++)u[l[c]]=!0;break}}else a in t&&(r[a]&&(i[a]=t[a]),n&&(u[a]=!0))}if(n)for(a in t)u[a]||(i[a]=t[a]);return i};var jX={};function NRe(e){return jX[e]?jX[e]:(typeof e=="string"&&(e=jX[e]=e.split(/\s*,\s*|\s+/)),e)}});var eS=Se((Tyr,VRe)=>{"use strict";var H9t=Zm();VRe.exports=G9t;function G9t(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=H9t(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 W2=Se((Ayr,HRe)=>{"use strict";HRe.exports=W9t;function W9t(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 WRe=Se((Syr,GRe)=>{GRe.exports=function(){for(var e=0;e<arguments.length;e++)if(arguments[e]!==void 0)return arguments[e]}});var j2=Se((Myr,ZRe)=>{var jRe=HR();ZRe.exports=j9t;function j9t(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,u;(!t||typeof t=="string")&&(t=new(jRe(t||"float32"))(i+r));var l=t.length-r;if(i!==l)throw new Error("source length "+i+" ("+n+"x"+e.length+") does not match destination length "+l);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 f=jRe(t||"float32");if(Array.isArray(e)||t==="array")for(t=new f(e.length+r),a=0,s=r,u=t.length;s<u;s++,a++)t[s]=e[a]===null?NaN:e[a];else r===0?t=new f(e):(t=new f(e.length+r),t.set(e,r))}else t.set(e,r);return t}});var YRe=Se((Eyr,XRe)=>{"use strict";XRe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var JRe=Se((kyr,KRe)=>{"use strict";KRe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var nFe=Se((Cyr,iFe)=>{"use strict";var $Re=ORe(),QRe=BA(),Z9t=eS(),X9t=W2(),eFe=Zm(),ZX=WRe(),Y9t=j2(),K9t=YRe(),J9t=HR(),tFe=JRe(),$9t=1073741824;iFe.exports=function(t,r){r||(r={}),t=Y9t(t,"float64"),r=eFe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=ZX(r.maxDepth,255),i=ZX(r.bounds,X9t(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=rFe(t,i),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(J9t(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let y=0;y<o;++y)s[y]=y;let u=[],l=[],f=[],c=[];d(0,0,1,s,0,1);let h=0;for(let y=0;y<u.length;y++){let k=u[y];if(s.set)s.set(k,h);else for(let A=0,L=k.length;A<L;A++)s[A+h]=k[A];let E=h+u[y].length;c[y]=[h,E],h=E}return s.range=p,s;function d(y,k,E,A,L,_){if(!A.length)return null;let C=u[L]||(u[L]=[]),M=f[L]||(f[L]=[]),v=l[L]||(l[L]=[]),z=C.length;if(L++,L>n||_>$9t){for(let O=0;O<A.length;O++)C.push(A[O]),M.push(_),v.push(null,null,null,null);return z}if(C.push(A[0]),M.push(_),A.length<=1)return v.push(null,null,null,null),z;let T=E*.5,F=y+T,q=k+T,U=[],H=[],j=[],G=[];for(let O=1,W=A.length;O<W;O++){let re=A[O],ne=a[re*2],be=a[re*2+1];ne<F?be<q?U.push(re):H.push(re):be<q?j.push(re):G.push(re)}return _<<=2,v.push(d(y,k,T,U,L,_),d(y,q,T,H,L,_+1),d(F,k,T,j,L,_+2),d(F,q,T,G,L,_+3)),z}function p(...y){let k;if(K9t(y[y.length-1])){let j=y.pop();!y.length&&(j.x!=null||j.l!=null||j.left!=null)&&(y=[j],k={}),k=eFe(j,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else k={};y.length||(y=i);let E=Z9t(...y),[A,L,_,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,v,z,T]=rFe([A,L,_,C],i),F=ZX(k.level,u.length);if(k.d!=null){let j;typeof k.d=="number"?j=[k.d,k.d]:k.d.length&&(j=k.d),F=Math.min(Math.max(Math.ceil(-tFe(Math.abs(j[0])/(i[2]-i[0]))),Math.ceil(-tFe(Math.abs(j[1])/(i[3]-i[1])))),F)}if(F=Math.min(F,u.length),k.lod)return x(M,v,z,T,F);let q=[];U(0,0,1,0,0,1);function U(j,G,O,W,re,ne){if(re===null||ne===null)return;let be=j+O,ze=G+O;if(M>be||v>ze||z<j||T<G||W>=F||re===ne)return;let Ce=u[W];ne===void 0&&(ne=Ce.length);for(let Be=re;Be<ne;Be++){let fe=Ce[Be],Ze=t[fe*2],et=t[fe*2+1];Ze>=A&&Ze<=_&&et>=L&&et<=C&&q.push(fe)}let he=l[W],te=he[re*4+0],ke=he[re*4+1],Ee=he[re*4+2],Me=he[re*4+3],Oe=H(he,re+1),Re=O*.5,me=W+1;U(j,G,Re,me,te,ke||Ee||Me||Oe),U(j,G+Re,Re,me,ke,Ee||Me||Oe),U(j+Re,G,Re,me,Ee,Me||Oe),U(j+Re,G+Re,Re,me,Me,Oe)}function H(j,G){let O=null,W=0;for(;O===null;)if(O=j[G*4+W],W++,W>j.length)return null;return O}return q}function x(y,k,E,A,L){let _=[];for(let C=0;C<L;C++){let M=f[C],v=c[C][0],z=b(y,k,C),T=b(E,A,C),F=$Re.ge(M,z),q=$Re.gt(M,T,F,M.length-1);_[C]=[F+v,q+v]}return _}function b(y,k,E){let A=1,L=.5,_=.5,C=.5;for(let M=0;M<E;M++)A<<=2,A+=y<L?k<_?0:1:k<_?2:3,C*=.5,L+=y<L?-C:C,_+=k<_?-C:C;return A}};function rFe(e,t){let[r,n,i,a]=t,o=1/(i-r),s=1/(a-n),u=new Array(e.length);for(let l=0,f=e.length/2;l<f;l++)u[2*l]=QRe((e[2*l]-r)*o,0,1),u[2*l+1]=QRe((e[2*l+1]-n)*s,0,1);return u}});var BF=Se((Lyr,aFe)=>{"use strict";aFe.exports=nFe()});var XX=Se((zyr,oFe)=>{oFe.exports=Q9t;function Q9t(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 u=1;u<a.length;)a[u++]+=n,a[u++]+=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 uFe=Se((OF,lFe)=>{"use strict";Object.defineProperty(OF,"__esModule",{value:!0});var eqt=function(){function e(t,r){var n=[],i=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),u;!(i=(u=s.next()).done)&&(n.push(u.value),!(r&&n.length===r));i=!0);}catch(l){a=!0,o=l}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")}}(),rk=Math.PI*2,YX=function(t,r,n,i,a,o,s){var u=t.x,l=t.y;u*=r,l*=n;var f=i*u-a*l,c=a*u+i*l;return{x:f+o,y:c+s}},tqt=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}]},sFe=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)},rqt=function(t,r,n,i,a,o,s,u,l,f,c,h){var d=Math.pow(a,2),p=Math.pow(o,2),x=Math.pow(c,2),b=Math.pow(h,2),y=d*p-d*b-p*x;y<0&&(y=0),y/=d*b+p*x,y=Math.sqrt(y)*(s===u?-1:1);var k=y*a/o*h,E=y*-o/a*c,A=f*k-l*E+(t+n)/2,L=l*k+f*E+(r+i)/2,_=(c-k)/a,C=(h-E)/o,M=(-c-k)/a,v=(-h-E)/o,z=sFe(1,0,_,C),T=sFe(_,C,M,v);return u===0&&T>0&&(T-=rk),u===1&&T<0&&(T+=rk),[A,L,z,T]},iqt=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,o=t.rx,s=t.ry,u=t.xAxisRotation,l=u===void 0?0:u,f=t.largeArcFlag,c=f===void 0?0:f,h=t.sweepFlag,d=h===void 0?0:h,p=[];if(o===0||s===0)return[];var x=Math.sin(l*rk/360),b=Math.cos(l*rk/360),y=b*(r-i)/2+x*(n-a)/2,k=-x*(r-i)/2+b*(n-a)/2;if(y===0&&k===0)return[];o=Math.abs(o),s=Math.abs(s);var E=Math.pow(y,2)/Math.pow(o,2)+Math.pow(k,2)/Math.pow(s,2);E>1&&(o*=Math.sqrt(E),s*=Math.sqrt(E));var A=rqt(r,n,i,a,o,s,c,d,x,b,y,k),L=eqt(A,4),_=L[0],C=L[1],M=L[2],v=L[3],z=Math.abs(v)/(rk/4);Math.abs(1-z)<1e-7&&(z=1);var T=Math.max(Math.ceil(z),1);v/=T;for(var F=0;F<T;F++)p.push(tqt(M,v)),M+=v;return p.map(function(q){var U=YX(q[0],o,s,b,x,_,C),H=U.x,j=U.y,G=YX(q[1],o,s,b,x,_,C),O=G.x,W=G.y,re=YX(q[2],o,s,b,x,_,C),ne=re.x,be=re.y;return{x1:H,y1:j,x2:O,y2:W,x:ne,y:be}})};OF.default=iqt;lFe.exports=OF.default});var hFe=Se((Pyr,cFe)=>{"use strict";cFe.exports=aqt;var nqt=uFe();function aqt(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,u=null,l=0,f=0,c=0,h=e.length;c<h;c++){var d=e[c],p=d[0];switch(p){case"M":a=d[1],o=d[2];break;case"A":var x=nqt({px:l,py:f,cx:d[6],cy:d[7],rx:d[1],ry:d[2],xAxisRotation:d[3],largeArcFlag:d[4],sweepFlag:d[5]});if(!x.length)continue;for(var b=0,y;b<x.length;b++)y=x[b],d=["C",y.x1,y.y1,y.x2,y.y2,y.x,y.y],b<x.length-1&&r.push(d);break;case"S":var k=l,E=f;(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=l*2-s,u=f*2-u):(s=l,u=f),d=fFe(l,f,s,u,d[1],d[2]);break;case"Q":s=d[1],u=d[2],d=fFe(l,f,d[1],d[2],d[3],d[4]);break;case"L":d=NF(l,f,d[1],d[2]);break;case"H":d=NF(l,f,d[1],f);break;case"V":d=NF(l,f,l,d[1]);break;case"Z":d=NF(l,f,a,o);break}t=p,l=d[d.length-2],f=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=l,i=f),r.push(d)}return r}function NF(e,t,r,n){return["C",e,t,r,n,r,n]}function fFe(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 KX=Se((Iyr,dFe)=>{"use strict";dFe.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 yFe=Se((Dyr,vFe)=>{"use strict";var oqt=XM(),sqt=XX(),lqt=hFe(),uqt=KX(),pFe=tE();vFe.exports=fqt;function fqt(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(pFe(uqt(e),"String is not an SVG path."),e=oqt(e)),pFe(Array.isArray(e),"Argument should be a string or an array of path segments."),e=sqt(e),e=lqt(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 wFe=Se((Ryr,bFe)=>{var Z2=Math.PI,mFe=xFe(120);bFe.exports=cqt;function cqt(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,u=null,l=0,f=0,c=0,h=e.length;c<h;c++){var d=e[c],p=d[0];switch(p){case"M":a=d[1],o=d[2];break;case"A":d=_Fe(l,f,d[1],d[2],xFe(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 x=l,b=f;(t=="C"||t=="S")&&(x+=x-n,b+=b-i),d=["C",x,b,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(s=l*2-s,u=f*2-u):(s=l,u=f),d=gFe(l,f,s,u,d[1],d[2]);break;case"Q":s=d[1],u=d[2],d=gFe(l,f,d[1],d[2],d[3],d[4]);break;case"L":d=UF(l,f,d[1],d[2]);break;case"H":d=UF(l,f,d[1],f);break;case"V":d=UF(l,f,l,d[1]);break;case"Z":d=UF(l,f,a,o);break}t=p,l=d[d.length-2],f=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=l,i=f),r.push(d)}return r}function UF(e,t,r,n){return["C",e,t,r,n,r,n]}function gFe(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 _Fe(e,t,r,n,i,a,o,s,u,l){if(l)E=l[0],A=l[1],y=l[2],k=l[3];else{var f=JX(e,t,-i);e=f.x,t=f.y,f=JX(s,u,-i),s=f.x,u=f.y;var c=(e-s)/2,h=(t-u)/2,d=c*c/(r*r)+h*h/(n*n);d>1&&(d=Math.sqrt(d),r=d*r,n=d*n);var p=r*r,x=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((p*x-p*h*h-x*c*c)/(p*h*h+x*c*c)));b==1/0&&(b=1);var y=b*r*h/n+(e+s)/2,k=b*-n*c/r+(t+u)/2,E=Math.asin(((t-k)/n).toFixed(9)),A=Math.asin(((u-k)/n).toFixed(9));E=e<y?Z2-E:E,A=s<y?Z2-A:A,E<0&&(E=Z2*2+E),A<0&&(A=Z2*2+A),o&&E>A&&(E=E-Z2*2),!o&&A>E&&(A=A-Z2*2)}if(Math.abs(A-E)>mFe){var L=A,_=s,C=u;A=E+mFe*(o&&A>E?1:-1),s=y+r*Math.cos(A),u=k+n*Math.sin(A);var M=_Fe(s,u,r,n,i,0,o,_,C,[A,L,y,k])}var v=Math.tan((A-E)/4),z=4/3*r*v,T=4/3*n*v,F=[2*e-(e+z*Math.sin(E)),2*t-(t-T*Math.cos(E)),s+z*Math.sin(A),u-T*Math.cos(A),s,u];if(l)return F;M&&(F=F.concat(M));for(var q=0;q<F.length;){var U=JX(F[q],F[q+1],i);F[q++]=U.x,F[q++]=U.y}return F}function JX(e,t,r){return{x:e*Math.cos(r)-t*Math.sin(r),y:e*Math.sin(r)+t*Math.cos(r)}}function xFe(e){return e*(Z2/180)}});var AFe=Se((Fyr,TFe)=>{var hqt=XX(),dqt=wFe(),pqt={M:"moveTo",C:"bezierCurveTo"};TFe.exports=function(e,t){e.beginPath(),dqt(hqt(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[pqt[n]].apply(e,i)}),e.closePath()}});var kFe=Se((qyr,EFe)=>{"use strict";var vqt=BA();EFe.exports=yqt;var ik=1e20;function yqt(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,u,l,f,c,h,d,p,x;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,u=e,t.stride?f=t.stride:f=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,c=h.getContext("2d"),a=h.width,o=h.height,d=c.getImageData(0,0,a,o),u=d.data,f=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,c=e,a=h.width,o=h.height,d=c.getImageData(0,0,a,o),u=d.data,f=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,u=d.data,f=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&u instanceof window.Uint8ClampedArray||window.Uint8Array&&u instanceof window.Uint8Array)for(l=u,u=Array(a*o),p=0,x=l.length;p<x;p++)u[p]=l[p*f+i]/255;else if(f!==1)throw Error("Raw data can have only 1 value per pixel");var b=Array(a*o),y=Array(a*o),k=Array(s),E=Array(s),A=Array(s+1),L=Array(s);for(p=0,x=a*o;p<x;p++){var _=u[p];b[p]=_===1?0:_===0?ik:Math.pow(Math.max(0,.5-_),2),y[p]=_===1?ik:_===0?0:Math.pow(Math.max(0,_-.5),2)}SFe(b,a,o,k,E,L,A),SFe(y,a,o,k,E,L,A);var C=window.Float32Array?new Float32Array(a*o):new Array(a*o);for(p=0,x=a*o;p<x;p++)C[p]=vqt(1-((b[p]-y[p])/n+r),0,1);return C}function SFe(e,t,r,n,i,a,o){for(var s=0;s<t;s++){for(var u=0;u<r;u++)n[u]=e[u*t+s];for(MFe(n,i,a,o,r),u=0;u<r;u++)e[u*t+s]=i[u]}for(u=0;u<r;u++){for(s=0;s<t;s++)n[s]=e[u*t+s];for(MFe(n,i,a,o,t),s=0;s<t;s++)e[u*t+s]=Math.sqrt(i[s])}}function MFe(e,t,r,n,i){r[0]=0,n[0]=-ik,n[1]=+ik;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]=+ik}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 LFe=Se((Byr,CFe)=>{"use strict";var mqt=yFe(),gqt=XM(),_qt=AFe(),xqt=KX(),bqt=kFe(),$X=document.createElement("canvas"),hv=$X.getContext("2d");CFe.exports=wqt;function wqt(e,t){if(!xqt(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=$X.width=t.w||t.width||200,n=$X.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||mqt(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],u=Math.min(s[0]||0,s[1]||0)/2;if(hv.fillStyle="black",hv.fillRect(0,0,r,n),hv.fillStyle="white",a&&(typeof a!="number"&&(a=1),a>0?hv.strokeStyle="white":hv.strokeStyle="black",hv.lineWidth=Math.abs(a)),hv.translate(r*.5,n*.5),hv.scale(u,u),Tqt()){var l=new Path2D(e);hv.fill(l),a&&hv.stroke(l)}else{var f=gqt(e);_qt(hv,f),hv.fill(),a&&hv.stroke()}hv.setTransform(1,0,0,1,0,0);var c=bqt(hv,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return c}var VF;function Tqt(){if(VF!=null)return VF;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return VF=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return VF=r&&r.data&&r.data[3]===255}});var Y2=Se((Oyr,UFe)=>{"use strict";var GF=_u(),Aqt=LFe(),HF=J_(),Sqt=Ul(),iS=Zr(),Sh=iS.isArrayOrTypedArray,tS=yu(),zFe=$c(),PFe=$g().formatColor,rS=ec(),Mqt=S3(),eY=FF(),nk=ox(),Eqt=N1().DESELECTDIM,IFe={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},kqt=rv().appendArrayPointValue;function Cqt(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(rS.hasText(t)&&(n.text=NFe(e,t),n.textSel=RFe(e,t,t.selected),n.textUnsel=RFe(e,t,t.unselected)),rS.hasMarkers(t)&&(n.marker=rY(e,t),n.markerSel=tY(e,t,t.selected),n.markerUnsel=tY(e,t,t.unselected),!t.unselected&&Sh(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]=Eqt*a[r]}if(rS.hasLines(t)){n.line={overlay:!0,thickness:t.line.width*i,color:t.line.color,opacity:t.opacity};var o=(nk.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=FFe(t,t.error_x,i)),t.error_y&&t.error_y.visible&&(n.errorY=FFe(t,t.error_y,i)),t.fill&&t.fill!=="none"&&(n.fill={closed:!0,fill:t.fillcolor,thickness:0}),n}function NFe(e,t){var r=e._fullLayout,n=t._length,i=t.textfont,a=t.textposition,o=Sh(a)?a:[a],s=i.color,u=i.size,l=i.family,f=i.weight,c=i.style,h=i.variant,d={},p,x=e._context.plotGlPixelRatio,b=t.texttemplate;if(b){d.text=[];var y=r._d3locale,k=Array.isArray(b),E=k?Math.min(b.length,n):n,A=k?function(T){return b[T]}:function(){return b};for(p=0;p<E;p++){var L={i:p},_=t._module.formatLabels(L,t,r),C={};kqt(C,t,p);var M=t._meta||{};d.text.push(iS.texttemplateString(A(p),_,y,C,L,M))}}else Sh(t.text)&&t.text.length<n?d.text=t.text.slice():d.text=t.text;if(Sh(d.text))for(p=d.text.length;p<n;p++)d.text[p]="";for(d.opacity=t.opacity,d.font={},d.align=[],d.baseline=[],p=0;p<o.length;p++){var v=o[p].split(/\s+/);switch(v[1]){case"left":d.align.push("right");break;case"right":d.align.push("left");break;default:d.align.push(v[1])}switch(v[0]){case"top":d.baseline.push("bottom");break;case"bottom":d.baseline.push("top");break;default:d.baseline.push(v[0])}}if(Sh(s))for(d.color=new Array(n),p=0;p<n;p++)d.color[p]=s[p];else d.color=s;if(Sh(u)||Array.isArray(l)||Sh(f)||Array.isArray(c)||Array.isArray(h))for(d.font=new Array(n),p=0;p<n;p++){var z=d.font[p]={};z.size=(iS.isTypedArray(u)?u[p]:Sh(u)?GF(u[p])?u[p]:0:u)*x,z.family=Array.isArray(l)?l[p]:l,z.weight=DFe(Sh(f)?f[p]:f),z.style=Array.isArray(c)?c[p]:c,z.variant=Array.isArray(h)?h[p]:h}else d.font={size:u*x,family:l,weight:DFe(f),style:c,variant:h};return d}function DFe(e){return e<=1e3?e>500?"bold":"normal":e}function rY(e,t){var r=t._length,n=t.marker,i={},a,o=Sh(n.symbol),s=Sh(n.angle),u=Sh(n.color),l=Sh(n.line.color),f=Sh(n.opacity),c=Sh(n.size),h=Sh(n.line.width),d;if(o||(d=eY.isOpenSymbol(n.symbol)),o||u||l||f||s){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var p=n.symbol,x=n.angle,b=PFe(n,n.opacity,r),y=PFe(n.line,n.opacity,r);if(!Sh(y[0])){var k=y;for(y=Array(r),a=0;a<r;a++)y[a]=k}if(!Sh(b[0])){var E=b;for(b=Array(r),a=0;a<r;a++)b[a]=E}if(!Sh(p)){var A=p;for(p=Array(r),a=0;a<r;a++)p[a]=A}if(!Sh(x)){var L=x;for(x=Array(r),a=0;a<r;a++)x[a]=L}for(i.symbols=p,i.angles=x,i.colors=b,i.borderColors=y,a=0;a<r;a++)o&&(d=eY.isOpenSymbol(n.symbol[a])),d&&(y[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]=OFe({mx:i.symbols[a],ma:i.angles[a]},t)}else d?(i.color=HF(n.color,"uint8"),i.color[3]=0,i.borderColor=HF(n.color,"uint8")):(i.color=HF(n.color,"uint8"),i.borderColor=HF(n.line.color,"uint8")),i.opacity=t.opacity*n.opacity,i.marker=OFe({mx:n.symbol,ma:n.angle},t);var _=1,C=Mqt(t,_),M;if(c||h){var v=i.sizes=new Array(r),z=i.borderSizes=new Array(r),T=0,F;if(c){for(a=0;a<r;a++)v[a]=C(n.size[a]),T+=v[a];F=T/r}else for(M=C(n.size),a=0;a<r;a++)v[a]=M;if(h)for(a=0;a<r;a++)z[a]=n.line.width[a];else for(M=n.line.width,a=0;a<r;a++)z[a]=M;i.sizeAvg=F}else i.size=C(n&&n.size||10),i.borderSizes=C(n.line.width);return i}function tY(e,t,r){var n=t.marker,i={};return r&&(r.marker&&r.marker.symbol?i=rY(e,iS.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 RFe(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:iS.extendFlat({},t.textfont)};r.textfont&&iS.extendFlat(i.textfont,r.textfont),n=NFe(e,i)}return n}function FFe(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 qFe=nk.SYMBOL_SDF_SIZE,X2=nk.SYMBOL_SIZE,BFe=nk.SYMBOL_STROKE,QX={},Lqt=tS.symbolFuncs[0](X2*.05);function OFe(e,t){var r=e.mx;if(r==="circle")return null;var n,i,a=tS.symbolNumber(r),o=tS.symbolFuncs[a%100],s=!!tS.symbolNoDot[a%100],u=!!tS.symbolNoFill[a%100],l=eY.isDotSymbol(r);if(e.ma&&(r+="_"+e.ma),QX[r])return QX[r];var f=tS.getMarkerAngle(e,t);return l&&!s?n=o(X2*1.1,f)+Lqt:n=o(X2,f),i=Aqt(n,{w:qFe,h:qFe,viewBox:[-X2,-X2,X2,X2],stroke:u?BFe:-BFe}),QX[r]=i,i||null}function zqt(e,t,r){var n=r.length,i=n/2,a,o;if(rS.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 u=(r[o*2+1]+r[o*2+3])/2;a.push(r[o*2],r[o*2+1],r[o*2],u,r[o*2+2],u)}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 l=!1;for(o=0;o<a.length;o++)if(isNaN(a[o])){l=!0;break}var f=l||a.length>nk.TOO_MANY_POINTS||rS.hasMarkers(t)?"rect":"round";if(l&&t.connectgaps){var c=a[0],h=a[1];for(o=0;o<a.length;o+=2)isNaN(a[o])||isNaN(a[o+1])?(a[o]=c,a[o+1]=h):(c=a[o],h=a[o+1])}return{join:f,positions:a}}function Pqt(e,t,r,n,i){var a=Sqt.getComponentMethod("errorbars","makeComputeError"),o=zFe.getFromId(e,t.xaxis,"x"),s=zFe.getFromId(e,t.yaxis,"y"),u=r.length/2,l={};function f(c,h){var d=h._id.charAt(0),p=t["error_"+d];if(p&&p.visible&&(h.type==="linear"||h.type==="log")){for(var x=a(p),b={x:0,y:1}[d],y={x:[0,1,2,3],y:[2,3,0,1]}[d],k=new Float64Array(4*u),E=1/0,A=-1/0,L=0,_=0;L<u;L++,_+=4){var C=c[L];if(GF(C)){var M=r[L*2+b],v=x(C,L),z=v[0],T=v[1];if(GF(z)&&GF(T)){var F=C-z,q=C+T;k[_+y[0]]=M-h.c2l(F),k[_+y[1]]=h.c2l(q)-M,k[_+y[2]]=0,k[_+y[3]]=0,E=Math.min(E,C-z),A=Math.max(A,C+T)}}}l[d]={positions:r,errors:k,_bnds:[E,A]}}}return f(n,o),f(i,s),l}function Iqt(e,t,r,n){var i=t._length,a={},o;if(rS.hasMarkers(t)){var s=r.font,u=r.align,l=r.baseline;for(a.offset=new Array(i),o=0;o<i;o++){var f=n.sizes?n.sizes[o]:n.size,c=Sh(s)?s[o].size:s.size,h=Sh(u)?u.length>1?u[o]:u[0]:u,d=Sh(l)?l.length>1?l[o]:l[0]:l,p=IFe[h],x=IFe[d],b=f?f/.8+1:0,y=-x*b-x*.5;a.offset[o]=[p*b/c,y/c]}}return a}UFe.exports={style:Cqt,markerStyle:rY,markerSelection:tY,linePositions:zqt,errorBarPositions:Pqt,textPosition:Iqt}});var iY=Se((Nyr,VFe)=>{"use strict";var WF=Zr();VFe.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(){WF.extendFlat(n,a,i)},n.init(),n.update=function(s){var u=WF.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(u),n.scatter2d&&n.scatter2d.update(u),n.line2d&&n.line2d.update(u),n.error2d&&n.error2d.update(u.concat(u)),n.select2d&&n.select2d.update(u),n.glText)for(var l=0;l<n.count;l++)n.glText[l].update(s)},n.draw=function(){for(var s=n.count,u=n.fill2d,l=n.error2d,f=n.line2d,c=n.scatter2d,h=n.glText,d=n.select2d,p=n.selectBatch,x=n.unselectBatch,b=0;b<s;b++){if(u&&n.fillOrder[b]&&u.draw(n.fillOrder[b]),f&&n.lineOptions[b]&&f.draw(b),l&&(n.errorXOptions[b]&&l.draw(b),n.errorYOptions[b]&&l.draw(b+s)),c&&n.markerOptions[b])if(x[b].length){var y=WF.repeat([],n.count);y[b]=x[b],c.draw(y)}else p[b].length||c.draw(b);h[b]&&n.textOptions[b]&&h[b].render()}d&&d.draw(p),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||WF.extendFlat(n,i),n}});var XFe=Se((Uyr,ZFe)=>{"use strict";var Dqt=BF(),nS=Zr(),HFe=$c(),Rqt=wy().findExtremes,GFe=Iy(),nY=q0(),Fqt=nY.calcMarkerSize,qqt=nY.calcAxisExpansion,Bqt=nY.setFirstScatter,Oqt=R0(),aS=Y2(),Nqt=iY(),WFe=ju().BADNUM,Uqt=ox().TOO_MANY_POINTS;ZFe.exports=function(t,r){var n=t._fullLayout,i=r._xA=HFe.getFromId(t,r.xaxis,"x"),a=r._yA=HFe.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,u=s>=Uqt,l=s*2,f={},c,h=i.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),p=GFe(r,i,"x",h),x=GFe(r,a,"y",d),b=p.vals,y=x.vals;r._x=b,r._y=y,r.xperiodalignment&&(r._origX=h,r._xStarts=p.starts,r._xEnds=p.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=x.starts,r._yEnds=x.ends);var k=new Array(l),E=new Array(s);for(c=0;c<s;c++)k[c*2]=b[c]===WFe?NaN:b[c],k[c*2+1]=y[c]===WFe?NaN:y[c],E[c]=c;if(i.type==="log")for(c=0;c<l;c+=2)k[c]=i.c2l(k[c]);if(a.type==="log")for(c=1;c<l;c+=2)k[c]=a.c2l(k[c]);u&&i.type!=="log"&&a.type!=="log"?f.tree=Dqt(k):f.ids=E,Oqt(t,r);var A=Vqt(t,o,r,k,b,y),L=Nqt(t,o);Bqt(n,r);var _;return u?A.marker&&(_=A.marker.sizeAvg||Math.max(A.marker.size,3)):_=Fqt(r,s),qqt(t,r,i,a,b,y,_),A.errorX&&jFe(r,i,A.errorX),A.errorY&&jFe(r,a,A.errorY),A.fill&&!L.fill2d&&(L.fill2d=!0),A.marker&&!L.scatter2d&&(L.scatter2d=!0),A.line&&!L.line2d&&(L.line2d=!0),(A.errorX||A.errorY)&&!L.error2d&&(L.error2d=!0),A.text&&!L.glText&&(L.glText=!0),A.marker&&(A.marker.snap=s),L.lineOptions.push(A.line),L.errorXOptions.push(A.errorX),L.errorYOptions.push(A.errorY),L.fillOptions.push(A.fill),L.markerOptions.push(A.marker),L.markerSelectedOptions.push(A.markerSel),L.markerUnselectedOptions.push(A.markerUnsel),L.textOptions.push(A.text),L.textSelectedOptions.push(A.textSel),L.textUnselectedOptions.push(A.textUnsel),L.selectBatch.push([]),L.unselectBatch.push([]),f._scene=L,f.index=L.count,f.x=b,f.y=y,f.positions=k,L.count++,[{x:!1,y:!1,t:f,trace:r}]};function jFe(e,t,r){var n=e._extremes[t._id],i=Rqt(t,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}function Vqt(e,t,r,n,i,a){var o=aS.style(e,r);if(o.marker&&(o.marker.positions=n),o.line&&n.length>1&&nS.extendFlat(o.line,aS.linePositions(e,r,n)),o.errorX||o.errorY){var s=aS.errorBarPositions(e,r,n,i,a);o.errorX&&nS.extendFlat(o.errorX,s.x),o.errorY&&nS.extendFlat(o.errorY,s.y)}return o.text&&(nS.extendFlat(o.text,{positions:n},aS.textPosition(e,r,o.text,o.marker)),nS.extendFlat(o.textSel,{positions:n},aS.textPosition(e,r,o.text,o.markerSel)),nS.extendFlat(o.textUnsel,{positions:n},aS.textPosition(e,r,o.text,o.markerUnsel))),o}});var aY=Se((Vyr,KFe)=>{"use strict";var YFe=Zr(),Hqt=Pl(),Gqt=N1().DESELECTDIM;function Wqt(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],u=i.textOptions[a],l=i.textSelectedOptions[a]||{},f=i.textUnselectedOptions[a]||{},c=YFe.extendFlat({},u),h,d;if(o.length||s.length){var p=l.color,x=f.color,b=u.color,y=YFe.isArrayOrTypedArray(b);for(c.color=new Array(r._length),h=0;h<o.length;h++)d=o[h],c.color[d]=p||(y?b[d]:b);for(h=0;h<s.length;h++){d=s[h];var k=y?b[d]:b;c.color[d]=x||(p?k:Hqt.addOpacity(k,Gqt))}}i.glText[a].update(c)}KFe.exports={styleTextSelection:Wqt}});var oY=Se((Hyr,$Fe)=>{"use strict";var JFe=ec(),jqt=aY().styleTextSelection;$Fe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u=n[0].t,l=s._length,f=u.x,c=u.y,h=u._scene,d=u.index;if(!h)return o;var p=JFe.hasText(s),x=JFe.hasMarkers(s),b=!x&&!p;if(s.visible!==!0||b)return o;var y=[],k=[];if(r!==!1&&!r.degenerate)for(var E=0;E<l;E++)r.contains([u.xpx[E],u.ypx[E]],!1,E,t)?(y.push(E),o.push({pointNumber:E,x:i.c2d(f[E]),y:a.c2d(c[E])})):k.push(E);if(x){var A=h.scatter2d;if(!y.length&&!k.length){var L=new Array(h.count);L[d]=h.markerOptions[d],A.update.apply(A,L)}else if(!h.selectBatch[d].length&&!h.unselectBatch[d].length){var _=new Array(h.count);_[d]=h.markerUnselectedOptions[d],A.update.apply(A,_)}}return h.selectBatch[d]=y,h.unselectBatch[d]=k,p&&jqt(n),o}});var e9e=Se((Gyr,QFe)=>{"use strict";var Zqt=RF();QFe.exports={moduleType:"trace",name:"scattergl",basePlotModule:Th(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:ek(),supplyDefaults:RRe(),crossTraceDefaults:lU(),colorbar:ep(),formatLabels:qRe(),calc:XFe(),hoverPoints:Zqt.hoverPoints,selectPoints:oY(),meta:{}}});var r9e=Se((Wyr,ZF)=>{"use strict";var jF=BA();ZF.exports=t9e;ZF.exports.to=t9e;ZF.exports.from=Xqt;function t9e(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=jF(r,0,255)&255,n=jF(n,0,255)&255,i=jF(i,0,255)&255,a=jF(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function Xqt(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 Uh=Se((jyr,n9e)=>{"use strict";var i9e=Object.getOwnPropertySymbols,Yqt=Object.prototype.hasOwnProperty,Kqt=Object.prototype.propertyIsEnumerable;function Jqt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function $qt(){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}}n9e.exports=$qt()?Object.assign:function(e,t){for(var r,n=Jqt(e),i,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var o in r)Yqt.call(r,o)&&(n[o]=r[o]);if(i9e){i=i9e(r);for(var s=0;s<i.length;s++)Kqt.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n}});var o9e=Se((Zyr,a9e)=>{a9e.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 sY=Se((Xyr,s9e)=>{"use strict";s9e.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 u;if(o[s]===!0)u=r[s];else{if(o[s]===!1)continue;if(typeof o[s]=="function"&&(u=o[s](r[s],t,r),u===void 0))continue}t[s]=u}}return t}});var u9e=Se((Yyr,l9e)=>{"use strict";l9e.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var XF=Se((Kyr,oS)=>{"use strict";oS.exports=ak;oS.exports.float32=oS.exports.float=ak;oS.exports.fract32=oS.exports.fract=Qqt;var f9e=new Float32Array(1);function Qqt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=ak(e));for(var r=0,n=t.length;r<n;r++)t[r]=e[r]-t[r];return t}return ak(e-ak(e))}function ak(e){return e.length?e instanceof Float32Array?e:new Float32Array(e):(f9e[0]=e,f9e[0])}});var uY=Se((Jyr,d9e)=>{"use strict";function e8t(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){l=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function t8t(e,t){return n8t(e)||e8t(e,t)||h9e(e,t)||s8t()}function r8t(e){return i8t(e)||a8t(e)||h9e(e)||o8t()}function i8t(e){if(Array.isArray(e))return lY(e)}function n8t(e){if(Array.isArray(e))return e}function a8t(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function h9e(e,t){if(e){if(typeof e=="string")return lY(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 lY(e,t)}}function lY(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 o8t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s8t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l8t=J_(),u8t=W2(),f8t=r9e(),c8t=BF(),K2=Uh(),YF=o9e(),h8t=Zm(),d8t=sY(),p8t=j2(),c9e=u9e(),KF=XF(),v8t=eS(),y8t=op;function op(e,t){var r=this;if(!(this instanceof op))return new op(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=[],u=[null],l=[null],f=255,c=100;this.tooManyColors=c9e,i=e.texture({data:new Uint8Array(f*4),width:f,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),K2(this,{regl:e,gl:n,groups:s,markerCache:l,markerTextures:u,palette:a,paletteIds:o,paletteTexture:i,maxColors:f,maxSize:c,canvas:n.canvas}),this.update(t);var h={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop("opacity"),paletteSize:function(b,y){return[r.tooManyColors?0:f,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,y){return y.xAttr||{buffer:y.positionBuffer,stride:8,offset:0}},y:function(b,y){return y.yAttr||{buffer:y.positionBuffer,stride:8,offset:4}},xFract:function(b,y){return y.xAttr?{constant:[0,0]}:{buffer:y.positionFractBuffer,stride:8,offset:0}},yFract:function(b,y){return y.yAttr?{constant:[0,0]}:{buffer:y.positionFractBuffer,stride:8,offset:4}},size:function(b,y){return y.size.length?{buffer:y.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(y.size*255/r.maxSize)]}},borderSize:function(b,y){return y.borderSize.length?{buffer:y.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(y.borderSize*255/r.maxSize)]}},colorId:function(b,y){return y.color.length?{buffer:y.colorBuffer,stride:r.tooManyColors?8:4,offset:0}:{constant:r.tooManyColors?a.slice(y.color*4,y.color*4+4):[y.color]}},borderColorId:function(b,y){return y.borderColor.length?{buffer:y.colorBuffer,stride:r.tooManyColors?8:4,offset:r.tooManyColors?4:2}:{constant:r.tooManyColors?a.slice(y.borderColor*4,y.borderColor*4+4):[y.borderColor]}},isActive:function(b,y){return y.activation===!0?{constant:[1]}:y.activation?y.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=K2({},h);d.frag=YF([`precision highp float;
#define GLSLIFY 1

uniform float opacity;
uniform sampler2D markerTexture;

varying vec4 fragColor, fragBorderColor;
varying float fragWidth, fragBorderColorLevel, fragColorLevel;

float smoothStep(float x, float y) {
  return 1.0 / (1.0 + exp(50.0*(x - y)));
}

void main() {
  float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth;

  // max-distance alpha
  if (dist < 0.003) discard;

  // null-border case
  if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {
    float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);
    gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);
  }
  else {
    float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);
    float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);

    vec4 color = fragBorderColor;
    color.a *= borderColorAmt;
    color = mix(color, fragColor, colorAmt);
    color.a *= opacity;

    gl_FragColor = color;
  }

}
`]),d.vert=YF([`precision highp float;
#define GLSLIFY 1

attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;

// \`invariant\` effectively turns off optimizations for the position.
// We need this because -fast-math on M1 Macs is re-ordering
// floating point operations in a way that causes floating point
// precision limits to put points in the wrong locations.
invariant gl_Position;

uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 scale, scaleFract, translate, translateFract, paletteSize;
uniform sampler2D paletteTexture;

const float maxSize = 100.;
const float borderLevel = .5;

varying vec4 fragColor, fragBorderColor;
varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;

float pointSizeScale = (constPointSize) ? 2. : pixelRatio;

bool isDirect = (paletteSize.x < 1.);

vec4 getColor(vec4 id) {
  return isDirect ? id / 255. : texture2D(paletteTexture,
    vec2(
      (id.x + .5) / paletteSize.x,
      (id.y + .5) / paletteSize.y
    )
  );
}

void main() {
  // ignore inactive points
  if (isActive == 0.) return;

  vec2 position = vec2(x, y);
  vec2 positionFract = vec2(xFract, yFract);

  vec4 color = getColor(colorId);
  vec4 borderColor = getColor(borderColorId);

  float size = size * maxSize / 255.;
  float borderSize = borderSize * maxSize / 255.;

  gl_PointSize = 2. * size * pointSizeScale;
  fragPointSize = size * pixelRatio;

  vec2 pos = (position + translate) * scale
      + (positionFract + translateFract) * scale
      + (position + translate) * scaleFract
      + (positionFract + translateFract) * scaleFract;

  gl_Position = vec4(pos * 2. - 1., 0., 1.);

  fragColor = color;
  fragBorderColor = borderColor;
  fragWidth = 1. / gl_PointSize;

  fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);
  fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);
}
`]),this.drawMarker=e(d);var p=K2({},h);p.frag=YF([`precision highp float;
#define GLSLIFY 1

varying vec4 fragColor, fragBorderColor;
varying float fragBorderRadius, fragWidth;

uniform float opacity;

float smoothStep(float edge0, float edge1, float x) {
	float t;
	t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
	return t * t * (3.0 - 2.0 * t);
}

void main() {
	float radius, alpha = 1.0, delta = fragWidth;

	radius = length(2.0 * gl_PointCoord.xy - 1.0);

	if (radius > 1.0 + delta) {
		discard;
	}

	alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);

	float borderRadius = fragBorderRadius;
	float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);
	vec4 color = mix(fragColor, fragBorderColor, ratio);
	color.a *= alpha * opacity;
	gl_FragColor = color;
}
`]),p.vert=YF([`precision highp float;
#define GLSLIFY 1

attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;

// \`invariant\` effectively turns off optimizations for the position.
// We need this because -fast-math on M1 Macs is re-ordering
// floating point operations in a way that causes floating point
// precision limits to put points in the wrong locations.
invariant gl_Position;

uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 paletteSize, scale, scaleFract, translate, translateFract;
uniform sampler2D paletteTexture;

const float maxSize = 100.;

varying vec4 fragColor, fragBorderColor;
varying float fragBorderRadius, fragWidth;

float pointSizeScale = (constPointSize) ? 2. : pixelRatio;

bool isDirect = (paletteSize.x < 1.);

vec4 getColor(vec4 id) {
  return isDirect ? id / 255. : texture2D(paletteTexture,
    vec2(
      (id.x + .5) / paletteSize.x,
      (id.y + .5) / paletteSize.y
    )
  );
}

void main() {
  // ignore inactive points
  if (isActive == 0.) return;

  vec2 position = vec2(x, y);
  vec2 positionFract = vec2(xFract, yFract);

  vec4 color = getColor(colorId);
  vec4 borderColor = getColor(borderColorId);

  float size = size * maxSize / 255.;
  float borderSize = borderSize * maxSize / 255.;

  gl_PointSize = (size + borderSize) * pointSizeScale;

  vec2 pos = (position + translate) * scale
      + (positionFract + translateFract) * scale
      + (position + translate) * scaleFract
      + (positionFract + translateFract) * scaleFract;

  gl_Position = vec4(pos * 2. - 1., 0., 1.);

  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);
  fragColor = color;
  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;
  fragWidth = 1. / gl_PointSize;
}
`]),c9e&&(p.frag=p.frag.replace("smoothstep","smoothStep"),d.frag=d.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(p)}op.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};op.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this};op.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};op.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,r8t(this.getMarkerDrawOptions(a,n,t)));i.length&&this.drawMarker(i)}};op.prototype.getMarkerDrawOptions=function(e,t,r){var n=t.range,i=t.tree,a=t.viewport,o=t.activation,s=t.selectionBuffer,u=t.count,l=this.regl;if(!i)return r?[K2({},t,{markerTexture:this.markerTextures[e],activation:o[e],count:r.length,elements:r,offset:0})]:[K2({},t,{markerTexture:this.markerTextures[e],activation:o[e],offset:0})];var f=[],c=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,p=new Uint8Array(u),x=0;x<r.length;x++){var b=r[x];p[b]=d?d[b]:1}s.subdata(p)}for(var y=c.length;y--;){var k=t8t(c[y],2),E=k[0],A=k[1];f.push(K2({},t,{markerTexture:this.markerTextures[e],activation:r?s:o[e],offset:E,count:A-E}))}return f};op.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,u=this.maxColors,l=this.palette;this.groups=i=r.map(function(f,c){var h=i[c];if(f===void 0)return h;f===null?f={positions:null}:typeof f=="function"?f={ondraw:f}:typeof f[0]=="number"&&(f={positions:f}),f=h8t(f,{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"}),f.positions===null&&(f.positions=[]),f.tooManyColors!=null&&(e.tooManyColors=f.tooManyColors),h||(i[c]=h={id:c,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"})},f=K2({},op.defaults,f)),f.positions&&!("marker"in f)&&(f.marker=h.marker,delete h.marker),f.marker&&!("positions"in f)&&(f.positions=h.positions,delete h.positions);var d=0,p=0;if(d8t(h,f,[{snap:!0,size:function(G,O){return G==null&&(G=op.defaults.size),d+=G&&G.length?1:0,G},borderSize:function(G,O){return G==null&&(G=op.defaults.borderSize),d+=G&&G.length?1:0,G},opacity:parseFloat,color:function(G,O){return G==null&&(G=op.defaults.color),G=e.updateColor(G),p++,G},borderColor:function(G,O){return G==null&&(G=op.defaults.borderColor),G=e.updateColor(G),p++,G},bounds:function(G,O,W){return"range"in W||(W.range=null),G},positions:function(G,O,W){var re=O.snap,ne=O.positionBuffer,be=O.positionFractBuffer,ze=O.selectionBuffer;if(G.x||G.y)return G.x.length?O.xAttr={buffer:o.buffer(G.x),offset:0,stride:4,count:G.x.length}:O.xAttr={buffer:G.x.buffer,offset:G.x.offset*4||0,stride:(G.x.stride||1)*4,count:G.x.count},G.y.length?O.yAttr={buffer:o.buffer(G.y),offset:0,stride:4,count:G.y.length}:O.yAttr={buffer:G.y.buffer,offset:G.y.offset*4||0,stride:(G.y.stride||1)*4,count:G.y.count},O.count=Math.max(O.xAttr.count,O.yAttr.count),G;G=p8t(G,"float64");var Ce=O.count=Math.floor(G.length/2),he=O.bounds=Ce?u8t(G,2):null;if(!W.range&&!O.range&&(delete O.range,W.range=he),!W.marker&&!O.marker&&(delete O.marker,W.marker=null),re&&(re===!0||Ce>re)?O.tree=c8t(G,{bounds:he}):re&&re.length&&(O.tree=re),O.tree){var te={primitive:"points",usage:"static",data:O.tree,type:"uint32"};O.elements?O.elements(te):O.elements=o.elements(te)}var ke=KF.float32(G);ne({data:ke,usage:"dynamic"});var Ee=KF.fract32(G,ke);return be({data:Ee,usage:"dynamic"}),ze({data:new Uint8Array(Ce),type:"uint8",usage:"stream"}),G}},{marker:function(G,O,W){var re=O.activation;if(re.forEach(function(Ee){return Ee&&Ee.destroy&&Ee.destroy()}),re.length=0,!G||typeof G[0]=="number"){var ne=e.addMarker(G);re[ne]=!0}else{for(var be=[],ze=0,Ce=Math.min(G.length,O.count);ze<Ce;ze++){var he=e.addMarker(G[ze]);be[he]||(be[he]=new Uint8Array(O.count)),be[he][ze]=1}for(var te=0;te<be.length;te++)if(be[te]){var ke={data:be[te],type:"uint8",usage:"static"};re[te]?re[te](ke):re[te]=o.buffer(ke),re[te].data=be[te]}}return G},range:function(G,O,W){var re=O.bounds;if(re)return G||(G=re),O.scale=[1/(G[2]-G[0]),1/(G[3]-G[1])],O.translate=[-G[0],-G[1]],O.scaleFract=KF.fract(O.scale),O.translateFract=KF.fract(O.translate),G},viewport:function(G){var O=v8t(G||[a.drawingBufferWidth,a.drawingBufferHeight]);return O}}]),d){var x=h,b=x.count,y=x.size,k=x.borderSize,E=x.sizeBuffer,A=new Uint8Array(b*2);if(y.length||k.length)for(var L=0;L<b;L++)A[L*2]=Math.round((y[L]==null?y:y[L])*255/s),A[L*2+1]=Math.round((k[L]==null?k:k[L])*255/s);E({data:A,usage:"dynamic"})}if(p){var _=h,C=_.count,M=_.color,v=_.borderColor,z=_.colorBuffer,T;if(e.tooManyColors){if(M.length||v.length){T=new Uint8Array(C*8);for(var F=0;F<C;F++){var q=M[F];T[F*8]=l[q*4],T[F*8+1]=l[q*4+1],T[F*8+2]=l[q*4+2],T[F*8+3]=l[q*4+3];var U=v[F];T[F*8+4]=l[U*4],T[F*8+5]=l[U*4+1],T[F*8+6]=l[U*4+2],T[F*8+7]=l[U*4+3]}}}else if(M.length||v.length){T=new Uint8Array(C*4+2);for(var H=0;H<C;H++)M[H]!=null&&(T[H*4]=M[H]%u,T[H*4+1]=Math.floor(M[H]/u)),v[H]!=null&&(T[H*4+2]=v[H]%u,T[H*4+3]=Math.floor(v[H]/u))}z({data:T||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return h})}};op.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 u=Math.floor(Math.sqrt(a.length));return i=t.length,n.push(e),t.push(r.texture({channels:1,data:a,radius:u,mag:"linear",min:"linear"})),i};op.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 u=0;u<e.length;u++){var l=e[u];l=l8t(l,"uint8");var f=f8t(l,!1);if(t[f]==null){var c=r.length;t[f]=Math.floor(c/4),r[c]=l[0],r[c+1]=l[1],r[c+2]=l[2],r[c+3]=l[3]}i[u]=t[f]}return!this.tooManyColors&&r.length>n*4&&(this.tooManyColors=!0),this.updatePalette(r),i.length===1?i[0]:i};op.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)}};op.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 m8t=Uh(),g8t=function(t,r){var n=new y8t(t,r),i=n.render.bind(n);return m8t(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};d9e.exports=g8t});var g9e=Se(($yr,dY)=>{"use strict";dY.exports=QF;dY.exports.default=QF;function QF(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=v9e(e,0,i,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,u,l,f,c,h,d;if(n&&(a=T8t(e,t,a,r)),e.length>80*r){s=l=e[0],u=f=e[1];for(var p=r;p<i;p+=r)c=e[p],h=e[p+1],c<s&&(s=c),h<u&&(u=h),c>l&&(l=c),h>f&&(f=h);d=Math.max(l-s,f-u),d=d!==0?32767/d:0}return ok(a,o,r,s,u,d,0),o}function v9e(e,t,r,n,i){var a,o;if(i===hY(e,t,r,n)>0)for(a=t;a<r;a+=n)o=p9e(a,e[a],e[a+1],o);else for(a=r-n;a>=t;a-=n)o=p9e(a,e[a],e[a+1],o);return o&&e9(o,o.next)&&(lk(o),o=o.next),o}function J2(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(e9(r,r.next)||Mh(r.prev,r,r.next)===0)){if(lk(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function ok(e,t,r,n,i,a,o){if(e){!o&&a&&k8t(e,n,i,a);for(var s=e,u,l;e.prev!==e.next;){if(u=e.prev,l=e.next,a?x8t(e,n,i,a):_8t(e)){t.push(u.i/r|0),t.push(e.i/r|0),t.push(l.i/r|0),lk(e),e=l.next,s=l.next;continue}if(e=l,e===s){o?o===1?(e=b8t(J2(e),t,r),ok(e,t,r,n,i,a,2)):o===2&&w8t(e,t,r,n,i,a):ok(J2(e),t,r,n,i,a,1);break}}}}function _8t(e){var t=e.prev,r=e,n=e.next;if(Mh(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,u=r.y,l=n.y,f=i<a?i<o?i:o:a<o?a:o,c=s<u?s<l?s:l:u<l?u:l,h=i>a?i>o?i:o:a>o?a:o,d=s>u?s>l?s:l:u>l?u:l,p=n.next;p!==t;){if(p.x>=f&&p.x<=h&&p.y>=c&&p.y<=d&&sS(i,s,a,u,o,l,p.x,p.y)&&Mh(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function x8t(e,t,r,n){var i=e.prev,a=e,o=e.next;if(Mh(i,a,o)>=0)return!1;for(var s=i.x,u=a.x,l=o.x,f=i.y,c=a.y,h=o.y,d=s<u?s<l?s:l:u<l?u:l,p=f<c?f<h?f:h:c<h?c:h,x=s>u?s>l?s:l:u>l?u:l,b=f>c?f>h?f:h:c>h?c:h,y=fY(d,p,t,r,n),k=fY(x,b,t,r,n),E=e.prevZ,A=e.nextZ;E&&E.z>=y&&A&&A.z<=k;){if(E.x>=d&&E.x<=x&&E.y>=p&&E.y<=b&&E!==i&&E!==o&&sS(s,f,u,c,l,h,E.x,E.y)&&Mh(E.prev,E,E.next)>=0||(E=E.prevZ,A.x>=d&&A.x<=x&&A.y>=p&&A.y<=b&&A!==i&&A!==o&&sS(s,f,u,c,l,h,A.x,A.y)&&Mh(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;E&&E.z>=y;){if(E.x>=d&&E.x<=x&&E.y>=p&&E.y<=b&&E!==i&&E!==o&&sS(s,f,u,c,l,h,E.x,E.y)&&Mh(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;A&&A.z<=k;){if(A.x>=d&&A.x<=x&&A.y>=p&&A.y<=b&&A!==i&&A!==o&&sS(s,f,u,c,l,h,A.x,A.y)&&Mh(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function b8t(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!e9(i,a)&&y9e(i,n,n.next,a)&&sk(i,a)&&sk(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),lk(n),lk(n.next),n=e=a),n=n.next}while(n!==e);return J2(n)}function w8t(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&z8t(o,s)){var u=m9e(o,s);o=J2(o,o.next),u=J2(u,u.next),ok(o,t,r,n,i,a,0),ok(u,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function T8t(e,t,r,n){var i=[],a,o,s,u,l;for(a=0,o=t.length;a<o;a++)s=t[a]*n,u=a<o-1?t[a+1]*n:e.length,l=v9e(e,s,u,n,!1),l===l.next&&(l.steiner=!0),i.push(L8t(l));for(i.sort(A8t),a=0;a<i.length;a++)r=S8t(i[a],r);return r}function A8t(e,t){return e.x-t.x}function S8t(e,t){var r=M8t(e,t);if(!r)return t;var n=m9e(r,e);return J2(n,n.next),J2(r,r.next)}function M8t(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 u=o,l=o.x,f=o.y,c=1/0,h;r=o;do n>=r.x&&r.x>=l&&n!==r.x&&sS(i<f?n:a,i,l,f,i<f?a:n,i,r.x,r.y)&&(h=Math.abs(i-r.y)/(n-r.x),sk(r,e)&&(h<c||h===c&&(r.x>o.x||r.x===o.x&&E8t(o,r)))&&(o=r,c=h)),r=r.next;while(r!==u);return o}function E8t(e,t){return Mh(e.prev,e,t.prev)<0&&Mh(t.next,e,e.next)<0}function k8t(e,t,r,n){var i=e;do i.z===0&&(i.z=fY(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,C8t(i)}function C8t(e){var t,r,n,i,a,o,s,u,l=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t<l&&(s++,n=n.nextZ,!!n);t++);for(u=l;s>0||u>0&&n;)s!==0&&(u===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,l*=2}while(o>1);return e}function fY(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 L8t(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 sS(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 z8t(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!P8t(e,t)&&(sk(e,t)&&sk(t,e)&&I8t(e,t)&&(Mh(e.prev,e,t.prev)||Mh(e,t.prev,t))||e9(e,t)&&Mh(e.prev,e,e.next)>0&&Mh(t.prev,t,t.next)>0)}function Mh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function e9(e,t){return e.x===t.x&&e.y===t.y}function y9e(e,t,r,n){var i=$F(Mh(e,t,r)),a=$F(Mh(e,t,n)),o=$F(Mh(r,n,e)),s=$F(Mh(r,n,t));return!!(i!==a&&o!==s||i===0&&JF(e,r,t)||a===0&&JF(e,n,t)||o===0&&JF(r,e,n)||s===0&&JF(r,t,n))}function JF(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 $F(e){return e>0?1:e<0?-1:0}function P8t(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&&y9e(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function sk(e,t){return Mh(e.prev,e,e.next)<0?Mh(e,t,e.next)>=0&&Mh(e,e.prev,t)>=0:Mh(e,t,e.prev)<0||Mh(e,e.next,t)<0}function I8t(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 m9e(e,t){var r=new cY(e.i,e.x,e.y),n=new cY(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 p9e(e,t,r,n){var i=new cY(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 lk(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 cY(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}QF.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(hY(e,0,a,r));if(i)for(var s=0,u=t.length;s<u;s++){var l=t[s]*r,f=s<u-1?t[s+1]*r:e.length;o-=Math.abs(hY(e,l,f,r))}var c=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,d=n[s+1]*r,p=n[s+2]*r;c+=Math.abs((e[h]-e[p])*(e[d+1]-e[h+1])-(e[h]-e[d])*(e[p+1]-e[h+1]))}return o===0&&c===0?0:Math.abs((c-o)/o)};function hY(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}QF.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 x9e=Se((Qyr,_9e)=>{"use strict";var D8t=W2();_9e.exports=R8t;function R8t(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=D8t(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 u=i-a;for(o=n;o<s;o+=t)isNaN(e[o])||(e[o]=u===0?.5:(e[o]-a)/u)}}return e}});var w9e=Se((emr,b9e)=>{"use strict";b9e.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 A9e=Se((tmr,T9e)=>{"use strict";T9e.exports=function(){}});var sx=Se((rmr,S9e)=>{"use strict";var F8t=A9e()();S9e.exports=function(e){return e!==F8t&&e!==null}});var pY=Se((imr,E9e)=>{"use strict";var q8t=Object.create,B8t=Object.getPrototypeOf,M9e={};E9e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||q8t;return typeof e!="function"?!1:B8t(e(t(null),M9e))===M9e}});var vY=Se((nmr,k9e)=>{"use strict";var O8t=sx(),N8t={function:!0,object:!0};k9e.exports=function(e){return O8t(e)&&N8t[typeof e]||!1}});var i1=Se((amr,C9e)=>{"use strict";var U8t=sx();C9e.exports=function(e){if(!U8t(e))throw new TypeError("Cannot use null or undefined");return e}});var z9e=Se((omr,L9e)=>{"use strict";var yY=Object.create,t9;pY()()||(t9=mY());L9e.exports=function(){var e,t,r;return!t9||t9.level!==1?yY:(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(t9,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return yY(n===null?e:n,i)})}()});var mY=Se((smr,P9e)=>{"use strict";var V8t=vY(),H8t=i1(),G8t=Object.prototype.isPrototypeOf,W8t=Object.defineProperty,j8t={configurable:!0,enumerable:!1,writable:!0,value:void 0},r9;r9=function(e,t){if(H8t(e),t===null||V8t(t))return e;throw new TypeError("Prototype must be null or an object")};P9e.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(r9(n,i),i),n}):t=function(n,i){return r9(n,i).__proto__=i,n}:t=function n(i,a){var o;return r9(i,a),o=G8t.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&W8t(n.nullPolyfill,"__proto__",j8t),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)}());z9e()});var i9=Se((lmr,I9e)=>{"use strict";I9e.exports=pY()()?Object.setPrototypeOf:mY()});var R9e=Se((umr,D9e)=>{"use strict";var Z8t=vY();D9e.exports=function(e){if(!Z8t(e))throw new TypeError(e+" is not an Object");return e}});var q9e=Se((fmr,F9e)=>{"use strict";var X8t=Object.create(null),Y8t=Math.random;F9e.exports=function(){var e;do e=Y8t().toString(36).slice(2);while(X8t[e]);return e}});var $2=Se((cmr,B9e)=>{"use strict";var K8t=void 0;B9e.exports=function(e){return e!==K8t&&e!==null}});var n9=Se((hmr,O9e)=>{"use strict";var J8t=$2(),$8t={object:!0,function:!0,undefined:!0};O9e.exports=function(e){return J8t(e)?hasOwnProperty.call($8t,typeof e):!1}});var U9e=Se((dmr,N9e)=>{"use strict";var Q8t=n9();N9e.exports=function(e){if(!Q8t(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var H9e=Se((pmr,V9e)=>{"use strict";var eBt=U9e();V9e.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!eBt(e)}});var gY=Se((vmr,G9e)=>{"use strict";var tBt=H9e(),rBt=/^\s*class[\s{/}]/,iBt=Function.prototype.toString;G9e.exports=function(e){return!(!tBt(e)||rBt.test(iBt.call(e)))}});var j9e=Se((ymr,W9e)=>{"use strict";W9e.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 X9e=Se((mmr,Z9e)=>{"use strict";Z9e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var K9e=Se((gmr,Y9e)=>{"use strict";var nBt=sx(),aBt=Object.keys;Y9e.exports=function(e){return aBt(nBt(e)?Object(e):e)}});var $9e=Se((_mr,J9e)=>{"use strict";J9e.exports=X9e()()?Object.keys:K9e()});var eqe=Se((xmr,Q9e)=>{"use strict";var oBt=$9e(),sBt=i1(),lBt=Math.max;Q9e.exports=function(e,t){var r,n,i=lBt(arguments.length,2),a;for(e=Object(sBt(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n<i;++n)t=arguments[n],oBt(t).forEach(a);if(r!==void 0)throw r;return e}});var a9=Se((bmr,tqe)=>{"use strict";tqe.exports=j9e()()?Object.assign:eqe()});var _Y=Se((wmr,rqe)=>{"use strict";var uBt=sx(),fBt=Array.prototype.forEach,cBt=Object.create,hBt=function(e,t){var r;for(r in e)t[r]=e[r]};rqe.exports=function(e){var t=cBt(null);return fBt.call(arguments,function(r){uBt(r)&&hBt(Object(r),t)}),t}});var nqe=Se((Tmr,iqe)=>{"use strict";var xY="razdwatrzy";iqe.exports=function(){return typeof xY.contains!="function"?!1:xY.contains("dwa")===!0&&xY.contains("foo")===!1}});var oqe=Se((Amr,aqe)=>{"use strict";var dBt=String.prototype.indexOf;aqe.exports=function(e){return dBt.call(this,e,arguments[1])>-1}});var bY=Se((Smr,sqe)=>{"use strict";sqe.exports=nqe()()?String.prototype.contains:oqe()});var n1=Se((Mmr,cqe)=>{"use strict";var o9=$2(),lqe=gY(),uqe=a9(),fqe=_Y(),uk=bY(),pBt=cqe.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],o9(e)?(r=uk.call(e,"c"),n=uk.call(e,"e"),i=uk.call(e,"w")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?uqe(fqe(a),o):o};pBt.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],o9(t)?lqe(t)?o9(r)?lqe(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,o9(e)?(n=uk.call(e,"c"),i=uk.call(e,"e")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?uqe(fqe(a),o):o}});var fk=Se((Emr,dqe)=>{"use strict";var hqe=Object.prototype.toString,vBt=hqe.call(function(){return arguments}());dqe.exports=function(e){return hqe.call(e)===vBt}});var ck=Se((kmr,vqe)=>{"use strict";var pqe=Object.prototype.toString,yBt=pqe.call("");vqe.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||pqe.call(e)===yBt)||!1}});var mqe=Se((Cmr,yqe)=>{"use strict";yqe.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var xqe=Se((Lmr,_qe)=>{var gqe=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};_qe.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return gqe()}try{return __global__||gqe()}finally{delete Object.prototype.__global__}}()});var hk=Se((zmr,bqe)=>{"use strict";bqe.exports=mqe()()?globalThis:xqe()});var Tqe=Se((Pmr,wqe)=>{"use strict";var mBt=hk(),wY={object:!0,symbol:!0};wqe.exports=function(){var e=mBt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!wY[typeof e.iterator]||!wY[typeof e.toPrimitive]||!wY[typeof e.toStringTag])}});var Sqe=Se((Imr,Aqe)=>{"use strict";Aqe.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var TY=Se((Dmr,Mqe)=>{"use strict";var gBt=Sqe();Mqe.exports=function(e){if(!gBt(e))throw new TypeError(e+" is not a symbol");return e}});var zqe=Se((Rmr,Lqe)=>{"use strict";var Eqe=n1(),_Bt=Object.create,kqe=Object.defineProperty,xBt=Object.prototype,Cqe=_Bt(null);Lqe.exports=function(e){for(var t=0,r,n;Cqe[e+(t||"")];)++t;return e+=t||"",Cqe[e]=!0,r="@@"+e,kqe(xBt,r,Eqe.gs(null,function(i){n||(n=!0,kqe(this,r,Eqe(i)),n=!1)})),r}});var Iqe=Se((Fmr,Pqe)=>{"use strict";var Qy=n1(),Vh=hk().Symbol;Pqe.exports=function(e){return Object.defineProperties(e,{hasInstance:Qy("",Vh&&Vh.hasInstance||e("hasInstance")),isConcatSpreadable:Qy("",Vh&&Vh.isConcatSpreadable||e("isConcatSpreadable")),iterator:Qy("",Vh&&Vh.iterator||e("iterator")),match:Qy("",Vh&&Vh.match||e("match")),replace:Qy("",Vh&&Vh.replace||e("replace")),search:Qy("",Vh&&Vh.search||e("search")),species:Qy("",Vh&&Vh.species||e("species")),split:Qy("",Vh&&Vh.split||e("split")),toPrimitive:Qy("",Vh&&Vh.toPrimitive||e("toPrimitive")),toStringTag:Qy("",Vh&&Vh.toStringTag||e("toStringTag")),unscopables:Qy("",Vh&&Vh.unscopables||e("unscopables"))})}});var Fqe=Se((qmr,Rqe)=>{"use strict";var Dqe=n1(),bBt=TY(),dk=Object.create(null);Rqe.exports=function(e){return Object.defineProperties(e,{for:Dqe(function(t){return dk[t]?dk[t]:dk[t]=e(String(t))}),keyFor:Dqe(function(t){var r;bBt(t);for(r in dk)if(dk[r]===t)return r})})}});var Oqe=Se((Bmr,Bqe)=>{"use strict";var Xm=n1(),AY=TY(),s9=hk().Symbol,wBt=zqe(),TBt=Iqe(),ABt=Fqe(),SBt=Object.create,SY=Object.defineProperties,l9=Object.defineProperty,jp,lS,qqe;if(typeof s9=="function")try{String(s9()),qqe=!0}catch(e){}else s9=null;lS=function(t){if(this instanceof lS)throw new TypeError("Symbol is not a constructor");return jp(t)};Bqe.exports=jp=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return qqe?s9(t):(r=SBt(lS.prototype),t=t===void 0?"":String(t),SY(r,{__description__:Xm("",t),__name__:Xm("",wBt(t))}))};TBt(jp);ABt(jp);SY(lS.prototype,{constructor:Xm(jp),toString:Xm("",function(){return this.__name__})});SY(jp.prototype,{toString:Xm(function(){return"Symbol ("+AY(this).__description__+")"}),valueOf:Xm(function(){return AY(this)})});l9(jp.prototype,jp.toPrimitive,Xm("",function(){var e=AY(this);return typeof e=="symbol"?e:e.toString()}));l9(jp.prototype,jp.toStringTag,Xm("c","Symbol"));l9(lS.prototype,jp.toStringTag,Xm("c",jp.prototype[jp.toStringTag]));l9(lS.prototype,jp.toPrimitive,Xm("c",jp.prototype[jp.toPrimitive]))});var lx=Se((Omr,Nqe)=>{"use strict";Nqe.exports=Tqe()()?hk().Symbol:Oqe()});var Vqe=Se((Nmr,Uqe)=>{"use strict";var MBt=i1();Uqe.exports=function(){return MBt(this).length=0,this}});var uS=Se((Umr,Hqe)=>{"use strict";Hqe.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var Wqe=Se((Vmr,Gqe)=>{"use strict";var EBt=$2(),kBt=n9(),CBt=Object.prototype.toString;Gqe.exports=function(e){if(!EBt(e))return null;if(kBt(e)){var t=e.toString;if(typeof t!="function"||t===CBt)return null}try{return""+e}catch(r){return null}}});var Zqe=Se((Hmr,jqe)=>{"use strict";jqe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var Yqe=Se((Gmr,Xqe)=>{"use strict";var LBt=Zqe(),zBt=/[\n\r\u2028\u2029]/g;Xqe.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(zBt,function(r){switch(r){case`
`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),t)}});var MY=Se((Wmr,$qe)=>{"use strict";var Kqe=$2(),PBt=n9(),IBt=Wqe(),DBt=Yqe(),Jqe=function(e,t){return e.replace("%v",DBt(t))};$qe.exports=function(e,t,r){if(!PBt(r))throw new TypeError(Jqe(t,e));if(!Kqe(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=IBt(r.errorMessage);throw Kqe(n)||(n=t),new TypeError(Jqe(n,e))}});var e8e=Se((jmr,Qqe)=>{"use strict";var RBt=MY(),FBt=$2();Qqe.exports=function(e){return FBt(e)?e:RBt(e,"Cannot use %v",arguments[1])}});var r8e=Se((Zmr,t8e)=>{"use strict";var qBt=MY(),BBt=gY();t8e.exports=function(e){return BBt(e)?e:qBt(e,"%v is not a plain function",arguments[1])}});var n8e=Se((Xmr,i8e)=>{"use strict";i8e.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 o8e=Se((Ymr,a8e)=>{"use strict";var OBt=Object.prototype.toString,NBt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);a8e.exports=function(e){return typeof e=="function"&&NBt(OBt.call(e))}});var l8e=Se((Kmr,s8e)=>{"use strict";s8e.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var f8e=Se((Jmr,u8e)=>{"use strict";u8e.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var h8e=Se(($mr,c8e)=>{"use strict";c8e.exports=l8e()()?Math.sign:f8e()});var p8e=Se((Qmr,d8e)=>{"use strict";var UBt=h8e(),VBt=Math.abs,HBt=Math.floor;d8e.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:UBt(e)*HBt(VBt(e)))}});var y8e=Se((egr,v8e)=>{"use strict";var GBt=p8e(),WBt=Math.max;v8e.exports=function(e){return WBt(0,GBt(e))}});var x8e=Se((tgr,_8e)=>{"use strict";var jBt=lx().iterator,ZBt=fk(),XBt=o8e(),YBt=y8e(),m8e=uS(),KBt=i1(),JBt=sx(),$Bt=ck(),g8e=Array.isArray,EY=Function.prototype.call,Q2={configurable:!0,enumerable:!0,writable:!0,value:null},kY=Object.defineProperty;_8e.exports=function(e){var t=arguments[1],r=arguments[2],n,i,a,o,s,u,l,f,c,h;if(e=Object(KBt(e)),JBt(t)&&m8e(t),!this||this===Array||!XBt(this)){if(!t){if(ZBt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(g8e(e)){for(o=new Array(s=e.length),i=0;i<s;++i)o[i]=e[i];return o}}o=[]}else n=this;if(!g8e(e)){if((c=e[jBt])!==void 0){for(l=m8e(c).call(e),n&&(o=new n),f=l.next(),i=0;!f.done;)h=t?EY.call(t,r,f.value,i):f.value,n?(Q2.value=h,kY(o,i,Q2)):o[i]=h,f=l.next(),++i;s=i}else if($Bt(e)){for(s=e.length,n&&(o=new n),i=0,a=0;i<s;++i)h=e[i],i+1<s&&(u=h.charCodeAt(0),u>=55296&&u<=56319&&(h+=e[++i])),h=t?EY.call(t,r,h,a):h,n?(Q2.value=h,kY(o,a,Q2)):o[a]=h,++a;s=a}}if(s===void 0)for(s=YBt(e.length),n&&(o=new n(s)),i=0;i<s;++i)h=t?EY.call(t,r,e[i],i):e[i],n?(Q2.value=h,kY(o,i,Q2)):o[i]=h;return n&&(Q2.value=null,o.length=s),o}});var w8e=Se((rgr,b8e)=>{"use strict";b8e.exports=n8e()()?Array.from:x8e()});var A8e=Se((igr,T8e)=>{"use strict";var QBt=w8e(),eOt=a9(),tOt=i1();T8e.exports=function(e){var t=Object(tOt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var i={};return r?QBt(r,function(a){(n.ensure||a in e)&&(i[a]=e[a])}):eOt(i,e),i}});var E8e=Se((ngr,M8e)=>{"use strict";var rOt=uS(),iOt=i1(),nOt=Function.prototype.bind,S8e=Function.prototype.call,aOt=Object.keys,oOt=Object.prototype.propertyIsEnumerable;M8e.exports=function(e,t){return function(r,n){var i,a=arguments[2],o=arguments[3];return r=Object(iOt(r)),rOt(n),i=aOt(r),o&&i.sort(typeof o=="function"?nOt.call(o,r):void 0),typeof e!="function"&&(e=i[e]),S8e.call(e,i,function(s,u){return oOt.call(r,s)?S8e.call(n,a,r[s],s,r,u):t})}}});var C8e=Se((agr,k8e)=>{"use strict";k8e.exports=E8e()("forEach")});var z8e=Se((ogr,L8e)=>{"use strict";var sOt=uS(),lOt=C8e(),uOt=Function.prototype.call;L8e.exports=function(e,t){var r={},n=arguments[2];return sOt(t),lOt(e,function(i,a,o,s){r[a]=uOt.call(t,n,i,a,o,s)}),r}});var R8e=Se((sgr,D8e)=>{"use strict";var fOt=$2(),cOt=e8e(),P8e=r8e(),hOt=A8e(),dOt=_Y(),pOt=z8e(),vOt=Function.prototype.bind,yOt=Object.defineProperty,mOt=Object.prototype.hasOwnProperty,I8e;I8e=function(e,t,r){var n=cOt(t)&&P8e(t.value),i;return i=hOt(t),delete i.writable,delete i.value,i.get=function(){return!r.overwriteDefinition&&mOt.call(this,e)?n:(t.value=vOt.call(n,r.resolveContext?r.resolveContext(this):this),yOt(this,e,t),this[e])},i};D8e.exports=function(e){var t=dOt(arguments[1]);return fOt(t.resolveContext)&&P8e(t.resolveContext),pOt(e,function(r,n){return I8e(n,r,t)})}});var CY=Se((lgr,O8e)=>{"use strict";var gOt=Vqe(),_Ot=a9(),xOt=uS(),bOt=i1(),Bv=n1(),wOt=R8e(),F8e=lx(),q8e=Object.defineProperty,B8e=Object.defineProperties,pk;O8e.exports=pk=function(e,t){if(!(this instanceof pk))throw new TypeError("Constructor requires 'new'");B8e(this,{__list__:Bv("w",bOt(e)),__context__:Bv("w",t),__nextIndex__:Bv("w",0)}),t&&(xOt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete pk.prototype.constructor;B8e(pk.prototype,_Ot({_next:Bv(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:Bv(function(){return this._createResult(this._next())}),_createResult:Bv(function(e){return e===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(e)}}),_resolve:Bv(function(e){return this.__list__[e]}),_unBind:Bv(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:Bv(function(){return"[object "+(this[F8e.toStringTag]||"Object")+"]"})},wOt({_onAdd:Bv(function(e){if(!(e>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){q8e(this,"__redo__",Bv("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:Bv(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:Bv(function(){this.__redo__&&gOt.call(this.__redo__),this.__nextIndex__=0})})));q8e(pk.prototype,F8e.iterator,Bv(function(){return this}))});var G8e=Se((ugr,H8e)=>{"use strict";var N8e=i9(),U8e=bY(),LY=n1(),TOt=lx(),zY=CY(),V8e=Object.defineProperty,fS;fS=H8e.exports=function(e,t){if(!(this instanceof fS))throw new TypeError("Constructor requires 'new'");zY.call(this,e),t?U8e.call(t,"key+value")?t="key+value":U8e.call(t,"key")?t="key":t="value":t="value",V8e(this,"__kind__",LY("",t))};N8e&&N8e(fS,zY);delete fS.prototype.constructor;fS.prototype=Object.create(zY.prototype,{_resolve:LY(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});V8e(fS.prototype,TOt.toStringTag,LY("c","Array Iterator"))});var X8e=Se((fgr,Z8e)=>{"use strict";var W8e=i9(),u9=n1(),AOt=lx(),PY=CY(),j8e=Object.defineProperty,cS;cS=Z8e.exports=function(e){if(!(this instanceof cS))throw new TypeError("Constructor requires 'new'");e=String(e),PY.call(this,e),j8e(this,"__length__",u9("",e.length))};W8e&&W8e(cS,PY);delete cS.prototype.constructor;cS.prototype=Object.create(PY.prototype,{_next:u9(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:u9(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)})});j8e(cS.prototype,AOt.toStringTag,u9("c","String Iterator"))});var K8e=Se((cgr,Y8e)=>{"use strict";var SOt=fk(),MOt=sx(),EOt=ck(),kOt=lx().iterator,COt=Array.isArray;Y8e.exports=function(e){return MOt(e)?COt(e)||EOt(e)||SOt(e)?!0:typeof e[kOt]=="function":!1}});var $8e=Se((hgr,J8e)=>{"use strict";var LOt=K8e();J8e.exports=function(e){if(!LOt(e))throw new TypeError(e+" is not iterable");return e}});var IY=Se((dgr,tBe)=>{"use strict";var zOt=fk(),POt=ck(),Q8e=G8e(),IOt=X8e(),DOt=$8e(),eBe=lx().iterator;tBe.exports=function(e){return typeof DOt(e)[eBe]=="function"?e[eBe]():zOt(e)?new Q8e(e):POt(e)?new IOt(e):new Q8e(e)}});var iBe=Se((pgr,rBe)=>{"use strict";var ROt=fk(),FOt=uS(),qOt=ck(),BOt=IY(),OOt=Array.isArray,DY=Function.prototype.call,NOt=Array.prototype.some;rBe.exports=function(e,t){var r,n=arguments[2],i,a,o,s,u,l,f;if(OOt(e)||ROt(e)?r="array":qOt(e)?r="string":e=BOt(e),FOt(t),a=function(){o=!0},r==="array"){NOt.call(e,function(c){return DY.call(t,n,c,a),o});return}if(r==="string"){for(u=e.length,s=0;s<u&&(l=e[s],s+1<u&&(f=l.charCodeAt(0),f>=55296&&f<=56319&&(l+=e[++s])),DY.call(t,n,l,a),!o);++s);return}for(i=e.next();!i.done;){if(DY.call(t,n,i.value,a),o)return;i=e.next()}}});var aBe=Se((vgr,nBe)=>{"use strict";nBe.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()});var lBe=Se((ygr,sBe)=>{"use strict";var UOt=sx(),c9=i9(),f9=R9e(),VOt=i1(),HOt=q9e(),a1=n1(),GOt=IY(),WOt=iBe(),jOt=lx().toStringTag,oBe=aBe(),ZOt=Array.isArray,FY=Object.defineProperty,RY=Object.prototype.hasOwnProperty,XOt=Object.getPrototypeOf,ux;sBe.exports=ux=function(){var e=arguments[0],t;if(!(this instanceof ux))throw new TypeError("Constructor requires 'new'");return t=oBe&&c9&&WeakMap!==ux?c9(new WeakMap,XOt(this)):this,UOt(e)&&(ZOt(e)||(e=GOt(e))),FY(t,"__weakMapData__",a1("c","$weakMap$"+HOt())),e&&WOt(e,function(r){VOt(r),t.set(r[0],r[1])}),t};oBe&&(c9&&c9(ux,WeakMap),ux.prototype=Object.create(WeakMap.prototype,{constructor:a1(ux)}));Object.defineProperties(ux.prototype,{delete:a1(function(e){return RY.call(f9(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:a1(function(e){if(RY.call(f9(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:a1(function(e){return RY.call(f9(e),this.__weakMapData__)}),set:a1(function(e,t){return FY(f9(e),this.__weakMapData__,a1("c",t)),this}),toString:a1(function(){return"[object WeakMap]"})});FY(ux.prototype,jOt,a1("c","WeakMap"))});var qY=Se((mgr,uBe)=>{"use strict";uBe.exports=w9e()()?WeakMap:lBe()});var cBe=Se((ggr,fBe)=>{"use strict";fBe.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 NY=Se((_gr,pBe)=>{"use strict";var h9=J_(),YOt=W2(),OY=Uh(),KOt=Zm(),JOt=j2(),hBe=g9e(),$Ot=x9e(),{float32:QOt,fract32:BY}=XF(),eNt=qY(),dBe=eS(),tNt=cBe(),rNt=`
precision highp float;

attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;
attribute vec4 color;
attribute float lineEnd, lineTop;

uniform vec2 scale, scaleFract, translate, translateFract;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;

varying vec4 fragColor;
varying vec2 tangent;

vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {
	// the order is important
	return position * scale + translate
       + positionFract * scale + translateFract
       + position * scaleFract
       + positionFract * scaleFract;
}

void main() {
	float lineStart = 1. - lineEnd;
	float lineOffset = lineTop * 2. - 1.;

	vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);
	tangent = normalize(diff * scale * viewport.zw);
	vec2 normal = vec2(-tangent.y, tangent.x);

	vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart
		+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd

		+ thickness * normal * .5 * lineOffset / viewport.zw;

	gl_Position = vec4(position * 2.0 - 1.0, depth, 1);

	fragColor = color / 255.;
}
`,iNt=`
precision highp float;

uniform float dashLength, pixelRatio, thickness, opacity, id;
uniform sampler2D dashTexture;

varying vec4 fragColor;
varying vec2 tangent;

void main() {
	float alpha = 1.;

	float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
	float dash = texture2D(dashTexture, vec2(t, .5)).r;

	gl_FragColor = fragColor;
	gl_FragColor.a *= alpha * opacity * dash;
}
`,nNt=`
precision highp float;

attribute vec2 position, positionFract;

uniform vec4 color;
uniform vec2 scale, scaleFract, translate, translateFract;
uniform float pixelRatio, id;
uniform vec4 viewport;
uniform float opacity;

varying vec4 fragColor;

const float MAX_LINES = 256.;

void main() {
	float depth = (MAX_LINES - 4. - id) / (MAX_LINES);

	vec2 position = position * scale + translate
       + positionFract * scale + translateFract
       + position * scaleFract
       + positionFract * scaleFract;

	gl_Position = vec4(position * 2.0 - 1.0, depth, 1);

	fragColor = color / 255.;
	fragColor.a *= opacity;
}
`,aNt=`
precision highp float;
varying vec4 fragColor;

void main() {
	gl_FragColor = fragColor;
}
`,oNt=`
precision highp float;

attribute vec2 aCoord, bCoord, nextCoord, prevCoord;
attribute vec4 aColor, bColor;
attribute float lineEnd, lineTop;

uniform vec2 scale, translate;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;
uniform float miterLimit, miterMode;

varying vec4 fragColor;
varying vec4 startCutoff, endCutoff;
varying vec2 tangent;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;

const float REVERSE_THRESHOLD = -.875;
const float MIN_DIFF = 1e-6;

// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead
// TODO: precalculate dot products, normalize things beforehead etc.
// TODO: refactor to rectangular algorithm

float distToLine(vec2 p, vec2 a, vec2 b) {
	vec2 diff = b - a;
	vec2 perp = normalize(vec2(-diff.y, diff.x));
	return dot(p - a, perp);
}

bool isNaN( float val ){
  return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;
}

void main() {
	vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;

  vec2 adjustedScale;
  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;
  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;

  vec2 scaleRatio = adjustedScale * viewport.zw;
	vec2 normalWidth = thickness / scaleRatio;

	float lineStart = 1. - lineEnd;
	float lineBot = 1. - lineTop;

	fragColor = (lineStart * aColor + lineEnd * bColor) / 255.;

	if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;

	if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);
	if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);


	vec2 prevDiff = aCoord - prevCoord;
	vec2 currDiff = bCoord - aCoord;
	vec2 nextDiff = nextCoord - bCoord;

	vec2 prevTangent = normalize(prevDiff * scaleRatio);
	vec2 currTangent = normalize(currDiff * scaleRatio);
	vec2 nextTangent = normalize(nextDiff * scaleRatio);

	vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);
	vec2 currNormal = vec2(-currTangent.y, currTangent.x);
	vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);

	vec2 startJoinDirection = normalize(prevTangent - currTangent);
	vec2 endJoinDirection = normalize(currTangent - nextTangent);

	// collapsed/unidirectional segment cases
	// FIXME: there should be more elegant solution
	vec2 prevTanDiff = abs(prevTangent - currTangent);
	vec2 nextTanDiff = abs(nextTangent - currTangent);
	if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {
		startJoinDirection = currNormal;
	}
	if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {
		endJoinDirection = currNormal;
	}
	if (aCoord == bCoord) {
		endJoinDirection = startJoinDirection;
		currNormal = prevNormal;
		currTangent = prevTangent;
	}

	tangent = currTangent;

	//calculate join shifts relative to normals
	float startJoinShift = dot(currNormal, startJoinDirection);
	float endJoinShift = dot(currNormal, endJoinDirection);

	float startMiterRatio = abs(1. / startJoinShift);
	float endMiterRatio = abs(1. / endJoinShift);

	vec2 startJoin = startJoinDirection * startMiterRatio;
	vec2 endJoin = endJoinDirection * endMiterRatio;

	vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;
	startTopJoin = sign(startJoinShift) * startJoin * .5;
	startBotJoin = -startTopJoin;

	endTopJoin = sign(endJoinShift) * endJoin * .5;
	endBotJoin = -endTopJoin;

	vec2 aTopCoord = aCoord + normalWidth * startTopJoin;
	vec2 bTopCoord = bCoord + normalWidth * endTopJoin;
	vec2 aBotCoord = aCoord + normalWidth * startBotJoin;
	vec2 bBotCoord = bCoord + normalWidth * endBotJoin;

	//miter anti-clipping
	float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));
	float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));

	//prevent close to reverse direction switch
	bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) <  length(normalWidth * currNormal);
	bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) <  length(normalWidth * currNormal);

	if (prevReverse) {
		//make join rectangular
		vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;
		float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);
		aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
		aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
	}
	else if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {
		//handle miter clipping
		bTopCoord -= normalWidth * endTopJoin;
		bTopCoord += normalize(endTopJoin * normalWidth) * baClipping;
	}

	if (nextReverse) {
		//make join rectangular
		vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;
		float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);
		bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
		bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
	}
	else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {
		//handle miter clipping
		aBotCoord -= normalWidth * startBotJoin;
		aBotCoord += normalize(startBotJoin * normalWidth) * abClipping;
	}

	vec2 aTopPosition = (aTopCoord) * adjustedScale + translate;
	vec2 aBotPosition = (aBotCoord) * adjustedScale + translate;

	vec2 bTopPosition = (bTopCoord) * adjustedScale + translate;
	vec2 bBotPosition = (bBotCoord) * adjustedScale + translate;

	//position is normalized 0..1 coord on the screen
	vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;

	startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;
	endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;

	gl_Position = vec4(position  * 2.0 - 1.0, depth, 1);

	enableStartMiter = step(dot(currTangent, prevTangent), .5);
	enableEndMiter = step(dot(currTangent, nextTangent), .5);

	//bevel miter cutoffs
	if (miterMode == 1.) {
		if (enableStartMiter == 1.) {
			vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;
			startCutoff = vec4(aCoord, aCoord);
			startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
			startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			startCutoff += viewport.xyxy;
			startCutoff += startMiterWidth.xyxy;
		}

		if (enableEndMiter == 1.) {
			vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;
			endCutoff = vec4(bCoord, bCoord);
			endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;
			endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			endCutoff += viewport.xyxy;
			endCutoff += endMiterWidth.xyxy;
		}
	}

	//round miter cutoffs
	else if (miterMode == 2.) {
		if (enableStartMiter == 1.) {
			vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;
			startCutoff = vec4(aCoord, aCoord);
			startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
			startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			startCutoff += viewport.xyxy;
			startCutoff += startMiterWidth.xyxy;
		}

		if (enableEndMiter == 1.) {
			vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;
			endCutoff = vec4(bCoord, bCoord);
			endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;
			endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			endCutoff += viewport.xyxy;
			endCutoff += endMiterWidth.xyxy;
		}
	}
}
`,sNt=`
precision highp float;

uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;
uniform sampler2D dashTexture;

varying vec4 fragColor;
varying vec2 tangent;
varying vec4 startCutoff, endCutoff;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;

float distToLine(vec2 p, vec2 a, vec2 b) {
	vec2 diff = b - a;
	vec2 perp = normalize(vec2(-diff.y, diff.x));
	return dot(p - a, perp);
}

void main() {
	float alpha = 1., distToStart, distToEnd;
	float cutoff = thickness * .5;

	//bevel miter
	if (miterMode == 1.) {
		if (enableStartMiter == 1.) {
			distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
			if (distToStart < -1.) {
				discard;
				return;
			}
			alpha *= min(max(distToStart + 1., 0.), 1.);
		}

		if (enableEndMiter == 1.) {
			distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
			if (distToEnd < -1.) {
				discard;
				return;
			}
			alpha *= min(max(distToEnd + 1., 0.), 1.);
		}
	}

	// round miter
	else if (miterMode == 2.) {
		if (enableStartMiter == 1.) {
			distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
			if (distToStart < 0.) {
				float radius = length(gl_FragCoord.xy - startCoord);

				if(radius > cutoff + .5) {
					discard;
					return;
				}

				alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
			}
		}

		if (enableEndMiter == 1.) {
			distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
			if (distToEnd < 0.) {
				float radius = length(gl_FragCoord.xy - endCoord);

				if(radius > cutoff + .5) {
					discard;
					return;
				}

				alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
			}
		}
	}

	float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
	float dash = texture2D(dashTexture, vec2(t, .5)).r;

	gl_FragColor = fragColor;
	gl_FragColor.a *= alpha * opacity * dash;
}
`;pBe.exports=Rc;function Rc(e,t){if(!(this instanceof Rc))return new Rc(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=Rc.shaders.has(e)?Rc.shaders.get(e):Rc.shaders.set(e,Rc.createShaders(e)).get(e),this.update(t)}Rc.dashMult=2;Rc.maxPatternLength=256;Rc.precisionThreshold=3e6;Rc.maxPoints=1e4;Rc.maxLines=2048;Rc.shaders=new eNt;Rc.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(OY({vert:rNt,frag:iNt,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(OY({cull:{enable:!0,face:"back"},vert:oNt,frag:sNt,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:nNt,frag:aNt,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}};Rc.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};Rc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};Rc.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>Rc.precisionThreshold||t.scale[1]*t.viewport.height>Rc.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=Rc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};Rc.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=KOt(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=OY({},Rc.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<Rc.maxLines&&(o.depth=2*(Rc.maxLines-1-a%Rc.maxLines)/Rc.maxLines-1)),i.join!=null&&(o.join=i.join),i.hole!=null&&(o.hole=i.hole),i.fill!=null&&(o.fill=i.fill?h9(i.fill,"uint8"):null),i.viewport!=null&&(o.viewport=dBe(i.viewport)),o.viewport||(o.viewport=dBe([r.drawingBufferWidth,r.drawingBufferHeight])),i.close!=null&&(o.close=i.close),i.positions===null&&(i.positions=[]),i.positions){let l,f;if(i.positions.x&&i.positions.y){let p=i.positions.x,x=i.positions.y;f=o.count=Math.max(p.length,x.length),l=new Float64Array(f*2);for(let b=0;b<f;b++)l[b*2]=p[b],l[b*2+1]=x[b]}else l=JOt(i.positions,"float64"),f=o.count=Math.floor(l.length/2);let c=o.bounds=YOt(l,2);if(o.fill){let p=[],x={},b=0;for(let y=0,k=0,E=o.count;y<E;y++){let A=l[y*2],L=l[y*2+1];isNaN(A)||isNaN(L)||A==null||L==null?(A=l[b*2],L=l[b*2+1],x[y]=b):b=y,p[k++]=A,p[k++]=L}if(i.splitNull){o.count-1 in x||(x[o.count]=o.count-1);let y=Object.keys(x).map(Number).sort((L,_)=>L-_),k=[],E=0,A=o.hole!=null?o.hole[0]:null;if(A!=null){let L=tNt(y,_=>_>=A);y=y.slice(0,L),y.push(A)}for(let L=0;L<y.length;L++){let _=p.slice(E*2,y[L]*2).concat(A?p.slice(A*2):[]),C=(o.hole||[]).map(v=>v-A+(y[L]-E)),M=hBe(_,C);M=M.map(v=>v+E+(v+E<y[L]?0:A-y[L])),k.push(...M),E=y[L]+1}for(let L=0,_=k.length;L<_;L++)x[k[L]]!=null&&(k[L]=x[k[L]]);o.triangles=k}else{let y=hBe(p,o.hole||[]);for(let k=0,E=y.length;k<E;k++)x[y[k]]!=null&&(y[k]=x[y[k]]);o.triangles=y}}let h=new Float64Array(l);$Ot(h,2,c);let d=new Float64Array(f*2+6);o.close?l[0]===l[f*2-2]&&l[1]===l[f*2-1]?(d[0]=h[f*2-4],d[1]=h[f*2-3]):(d[0]=h[f*2-2],d[1]=h[f*2-1]):(d[0]=h[0],d[1]=h[1]),d.set(h,2),o.close?l[0]===l[f*2-2]&&l[1]===l[f*2-1]?(d[f*2+2]=h[2],d[f*2+3]=h[3],o.count-=1):(d[f*2+2]=h[0],d[f*2+3]=h[1],d[f*2+4]=h[2],d[f*2+5]=h[3]):(d[f*2+2]=h[f*2-2],d[f*2+3]=h[f*2-1],d[f*2+4]=h[f*2-2],d[f*2+5]=h[f*2-1]);var s=QOt(d);o.positionBuffer(s);var u=BY(d,s);o.positionFractBuffer(u)}if(i.range?o.range=i.range:o.range||(o.range=o.bounds),(i.range||i.positions)&&o.count){let l=o.bounds,f=l[2]-l[0],c=l[3]-l[1],h=o.range[2]-o.range[0],d=o.range[3]-o.range[1];o.scale=[f/h,c/d],o.translate=[-o.range[0]/h+l[0]/h||0,-o.range[1]/d+l[1]/d||0],o.scaleFract=BY(o.scale),o.translateFract=BY(o.translate)}if(i.dashes){let l=0,f;if(!i.dashes||i.dashes.length<2)l=1,f=new Uint8Array([255,255,255,255,255,255,255,255]);else{l=0;for(let d=0;d<i.dashes.length;++d)l+=i.dashes[d];f=new Uint8Array(l*Rc.dashMult);let c=0,h=255;for(let d=0;d<2;d++)for(let p=0;p<i.dashes.length;++p){for(let x=0,b=i.dashes[p]*Rc.dashMult*.5;x<b;++x)f[c++]=h;h^=255}}o.dashLength=l,o.dashTexture({channels:1,data:f,width:f.length,height:1,mag:"linear",min:"linear"},0,0)}if(i.color){let l=o.count,f=i.color;f||(f="transparent");let c=new Uint8Array(l*4+4);if(!Array.isArray(f)||typeof f[0]=="number"){let h=h9(f,"uint8");for(let d=0;d<l+1;d++)c.set(h,d*4)}else{for(let h=0;h<l;h++){let d=h9(f[h],"uint8");c.set(d,h*4)}c.set(h9(f[0],"uint8"),l*4)}o.colorBuffer({usage:"dynamic",type:"uint8",data:c})}}}),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};Rc.prototype.destroy=function(){return this.passes.forEach(e=>{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var _Be=Se((xgr,gBe)=>{"use strict";var lNt=W2(),uNt=J_(),fNt=sY(),cNt=Zm(),vBe=Uh(),yBe=j2(),{float32:hNt,fract32:UY}=XF();gBe.exports=dNt;var mBe=[[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 dNt(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,u,l={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},f=[];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)}),u=e.buffer({usage:"static",type:"float",data:mBe}),p(t),n=e({vert:`
		precision highp float;

		attribute vec2 position, positionFract;
		attribute vec4 error;
		attribute vec4 color;

		attribute vec2 direction, lineOffset, capOffset;

		uniform vec4 viewport;
		uniform float lineWidth, capSize;
		uniform vec2 scale, scaleFract, translate, translateFract;

		varying vec4 fragColor;

		void main() {
			fragColor = color / 255.;

			vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;

			vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;

			vec2 position = position + dxy;

			vec2 pos = (position + translate) * scale
				+ (positionFract + translateFract) * scale
				+ (position + translate) * scaleFract
				+ (positionFract + translateFract) * scaleFract;

			pos += pixelOffset / viewport.zw;

			gl_Position = vec4(pos * 2. - 1., 0, 1);
		}
		`,frag:`
		precision highp float;

		varying vec4 fragColor;

		uniform float opacity;

		void main() {
			gl_FragColor = fragColor;
			gl_FragColor.a *= opacity;
		}
		`,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,y)=>[y.viewport.x,y.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,y)=>y.offset*4,divisor:1},position:{buffer:i,offset:(b,y)=>y.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,y)=>y.offset*8,divisor:1},error:{buffer:s,offset:(b,y)=>y.offset*16,divisor:1},direction:{buffer:u,stride:24,offset:0},lineOffset:{buffer:u,stride:24,offset:8},capOffset:{buffer:u,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:mBe.length}),vBe(c,{update:p,draw:h,destroy:x,regl:e,gl:r,canvas:r.canvas,groups:f}),c;function c(b){b?p(b):b===null&&x(),h()}function h(b){if(typeof b=="number")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),f.forEach((y,k)=>{if(y){if(b&&(b[k]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}d(k)}})}function d(b){typeof b=="number"&&(b=f[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 p(b){if(!b)return;b.length!=null?typeof b[0]=="number"&&(b=[{positions:b}]):Array.isArray(b)||(b=[b]);let y=0,k=0;if(c.groups=f=b.map((L,_)=>{let C=f[_];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return C;return L=cNt(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||(f[_]=C={id:_,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=vBe({},l,L)),fNt(C,L,[{lineWidth:M=>+M*.5,capSize:M=>+M*.5,opacity:parseFloat,errors:M=>(M=yBe(M),k+=M.length,M),positions:(M,v)=>(M=yBe(M,"float64"),v.count=Math.floor(M.length/2),v.bounds=lNt(M,2),v.offset=y,y+=v.count,M)},{color:(M,v)=>{let z=v.count;if(M||(M="transparent"),!Array.isArray(M)||typeof M[0]=="number"){let F=M;M=Array(z);for(let q=0;q<z;q++)M[q]=F}if(M.length<z)throw Error("Not enough colors");let T=new Uint8Array(z*4);for(let F=0;F<z;F++){let q=uNt(M[F],"uint8");T.set(q,F*4)}return T},range:(M,v,z)=>{let T=v.bounds;return M||(M=T),v.scale=[1/(M[2]-M[0]),1/(M[3]-M[1])],v.translate=[-M[0],-M[1]],v.scaleFract=UY(v.scale),v.translateFract=UY(v.translate),M},viewport:M=>{let v;return Array.isArray(M)?v={x:M[0],y:M[1],width:M[2]-M[0],height:M[3]-M[1]}:M?(v={x:M.x||M.left||0,y:M.y||M.top||0},M.right?v.width=M.right-v.x:v.width=M.w||M.width||0,M.bottom?v.height=M.bottom-v.y:v.height=M.h||M.height||0):v={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},v}}]),C}),y||k){let L=f.reduce((v,z,T)=>v+(z?z.count:0),0),_=new Float64Array(L*2),C=new Uint8Array(L*4),M=new Float32Array(L*4);f.forEach((v,z)=>{if(!v)return;let{positions:T,count:F,offset:q,color:U,errors:H}=v;F&&(C.set(U,q*4),M.set(H,q*4),_.set(T,q*2))});var E=hNt(_);i(E);var A=UY(_,E);a(A),o(C),s(M)}}function x(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),u.destroy()}}});var wBe=Se((bgr,bBe)=>{var xBe=/[\'\"]/;bBe.exports=function(t){return t?(xBe.test(t.charAt(0))&&(t=t.substr(1)),xBe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var VY=Se(()=>{});var HY=Se(()=>{});var GY=Se(()=>{});var WY=Se(()=>{});var jY=Se(()=>{});var MBe=Se((Pgr,SBe)=>{"use strict";function TBe(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(u){var l=new RegExp(["\\",u[0],"[^\\",u[0],"\\",u[1],"]*\\",u[1]].join("")),f=[];function c(h,d,p){var x=r.push(h.slice(u[0].length,-u[1].length))-1;return f.push(x),i+x+i}r.forEach(function(h,d){for(var p,x=0;h!=p;)if(p=h,h=h.replace(l,c),x++>1e4)throw Error("References have circular dependency. Please, check them.");r[d]=h}),f=f.reverse(),r=r.map(function(h){return f.forEach(function(d){h=h.replace(new RegExp("(\\"+i+d+"\\"+i+")","g"),u[0]+"$1"+u[1])}),h})});var o=new RegExp("\\"+i+"([0-9]+)\\"+i);function s(u,l,f){for(var c=[],h,d=0;h=o.exec(u);){if(d++>1e4)throw Error("Circular references in parenthesis");c.push(u.slice(0,h.index)),c.push(s(l[h[1]],l)),u=u.slice(h.index+h[0].length)}return c.push(u),c}return a?r:s(r[0],r)}function ABe(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 u(l,f){return Array.isArray(f)&&(f=f.reduce(u,"")),l+f},"");function s(u,l){if(e[l]==null)throw Error("Reference "+l+"is undefined");return e[l]}}function ZY(e,t){return Array.isArray(e)?ABe(e,t):TBe(e,t)}ZY.parse=TBe;ZY.stringify=ABe;SBe.exports=ZY});var CBe=Se((Igr,kBe)=>{"use strict";var EBe=MBe();kBe.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(c){return c.length===1&&(c=c+c),c}));var i=EBe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],u=0;u<o.length;u++){var l=o[u],f=o[u+1];l[l.length-1]==="\\"&&l[l.length-2]!=="\\"?(s.push(l+r+f),u++):s.push(l)}o=s}for(var u=0;u<o.length;u++)i[0]=o[u],o[u]=EBe.stringify(i,{flat:!0});return o}});var LBe=Se(()=>{});var XY=Se((Fgr,zBe)=>{"use strict";var pNt=LBe();zBe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||pNt.indexOf(t)!==-1}}});var RBe=Se((qgr,DBe)=>{"use strict";var vNt=wBe(),yNt=VY(),mNt=HY(),gNt=GY(),_Nt=WY(),xNt=jY(),YY=CBe(),bNt=XY().isSize;DBe.exports=IBe;var vk=IBe.cache={};function IBe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(vk[e])return vk[e];if(e==="")throw new Error("Cannot parse an empty string.");if(mNt.indexOf(e)!==-1)return vk[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=YY(e,/\s+/),n;n=r.shift();){if(yNt.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=n}),vk[e]=t;if(_Nt.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(xNt.indexOf(n)!==-1){t.stretch=n;continue}if(gNt.indexOf(n)!==-1){t.weight=n;continue}if(bNt(n)){var i=YY(n,"/");if(t.size=i[0],i[1]!=null?t.lineHeight=PBe(i[1]):r[0]==="/"&&(r.shift(),t.lineHeight=PBe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=YY(r.join(" "),/\s*,\s*/).map(vNt),vk[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function PBe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var JY=Se((Bgr,FBe)=>{"use strict";var wNt=Zm(),TNt=XY().isSize,ANt=mk(VY()),SNt=mk(HY()),MNt=mk(GY()),ENt=mk(WY()),kNt=mk(jY()),CNt={normal:1,"small-caps":1},LNt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},KY={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};FBe.exports=function(t){if(t=wNt(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&&yk(t.system,SNt),t.system;if(yk(t.style,ENt),yk(t.variant,CNt),yk(t.weight,MNt),yk(t.stretch,kNt),t.size==null&&(t.size=KY.size),typeof t.size=="number"&&(t.size+="px"),!TNt)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=KY.family),Array.isArray(t.family)&&(t.family.length||(t.family=[KY.family]),t.family=t.family.map(function(n){return LNt[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 yk(e,t){if(e&&!t[e]&&!ANt[e])throw Error("Unknown keyword `"+e+"`");return e}function mk(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=1;return t}});var BBe=Se((Ogr,qBe)=>{"use strict";qBe.exports={parse:RBe(),stringify:JY()}});var eK=Se(($Y,QY)=>{(function(e,t){typeof $Y=="object"&&typeof QY!="undefined"?QY.exports=t():typeof define=="function"&&define.amd?define(t):e.createREGL=t()})($Y,function(){"use strict";var e=function(Gt,jr){for(var _i=Object.keys(jr),Mn=0;Mn<_i.length;++Mn)Gt[_i[Mn]]=jr[_i[Mn]];return Gt},t=0,r=0,n=5,i=6;function a(Gt,jr){this.id=t++,this.type=Gt,this.data=jr}function o(Gt){return Gt.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function s(Gt){if(Gt.length===0)return[];var jr=Gt.charAt(0),_i=Gt.charAt(Gt.length-1);if(Gt.length>1&&jr===_i&&(jr==='"'||jr==="'"))return['"'+o(Gt.substr(1,Gt.length-2))+'"'];var Mn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Gt);if(Mn)return s(Gt.substr(0,Mn.index)).concat(s(Mn[1])).concat(s(Gt.substr(Mn.index+Mn[0].length)));var Ta=Gt.split(".");if(Ta.length===1)return['"'+o(Gt)+'"'];for(var fa=[],ha=0;ha<Ta.length;++ha)fa=fa.concat(s(Ta[ha]));return fa}function u(Gt){return"["+s(Gt).join("][")+"]"}function l(Gt,jr){return new a(Gt,u(jr+""))}function f(Gt){return typeof Gt=="function"&&!Gt._reglType||Gt instanceof a}function c(Gt,jr){if(typeof Gt=="function")return new a(r,Gt);if(typeof Gt=="number"||typeof Gt=="boolean")return new a(n,Gt);if(Array.isArray(Gt))return new a(i,Gt.map(function(_i,Mn){return c(_i,jr+"["+Mn+"]")}));if(Gt instanceof a)return Gt}var h={DynamicVariable:a,define:l,isDynamic:f,unbox:c,accessor:u},d={next:typeof requestAnimationFrame=="function"?function(Gt){return requestAnimationFrame(Gt)}:function(Gt){return setTimeout(Gt,16)},cancel:typeof cancelAnimationFrame=="function"?function(Gt){return cancelAnimationFrame(Gt)}:clearTimeout},p=typeof performance!="undefined"&&performance.now?function(){return performance.now()}:function(){return+new Date};function x(){var Gt={"":0},jr=[""];return{id:function(_i){var Mn=Gt[_i];return Mn||(Mn=Gt[_i]=jr.length,jr.push(_i),Mn)},str:function(_i){return jr[_i]}}}function b(Gt,jr,_i){var Mn=document.createElement("canvas");e(Mn.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),Gt.appendChild(Mn),Gt===document.body&&(Mn.style.position="absolute",e(Gt.style,{margin:0,padding:0}));function Ta(){var Io=window.innerWidth,Vs=window.innerHeight;if(Gt!==document.body){var Hs=Mn.getBoundingClientRect();Io=Hs.right-Hs.left,Vs=Hs.bottom-Hs.top}Mn.width=_i*Io,Mn.height=_i*Vs}var fa;Gt!==document.body&&typeof ResizeObserver=="function"?(fa=new ResizeObserver(function(){setTimeout(Ta)}),fa.observe(Gt)):window.addEventListener("resize",Ta,!1);function ha(){fa?fa.disconnect():window.removeEventListener("resize",Ta),Gt.removeChild(Mn)}return Ta(),{canvas:Mn,onDestroy:ha}}function y(Gt,jr){function _i(Mn){try{return Gt.getContext(Mn,jr)}catch(Ta){return null}}return _i("webgl")||_i("experimental-webgl")||_i("webgl-experimental")}function k(Gt){return typeof Gt.nodeName=="string"&&typeof Gt.appendChild=="function"&&typeof Gt.getBoundingClientRect=="function"}function E(Gt){return typeof Gt.drawArrays=="function"||typeof Gt.drawElements=="function"}function A(Gt){return typeof Gt=="string"?Gt.split():Gt}function L(Gt){return typeof Gt=="string"?document.querySelector(Gt):Gt}function _(Gt){var jr=Gt||{},_i,Mn,Ta,fa,ha={},Io=[],Vs=[],Hs=typeof window=="undefined"?1:window.devicePixelRatio,is=!1,su={},Ps=function(kn){},qs=function(){};if(typeof jr=="string"?_i=document.querySelector(jr):typeof jr=="object"&&(k(jr)?_i=jr:E(jr)?(fa=jr,Ta=fa.canvas):("gl"in jr?fa=jr.gl:"canvas"in jr?Ta=L(jr.canvas):"container"in jr&&(Mn=L(jr.container)),"attributes"in jr&&(ha=jr.attributes),"extensions"in jr&&(Io=A(jr.extensions)),"optionalExtensions"in jr&&(Vs=A(jr.optionalExtensions)),"onDone"in jr&&(Ps=jr.onDone),"profile"in jr&&(is=!!jr.profile),"pixelRatio"in jr&&(Hs=+jr.pixelRatio),"cachedCode"in jr&&(su=jr.cachedCode))),_i&&(_i.nodeName.toLowerCase()==="canvas"?Ta=_i:Mn=_i),!fa){if(!Ta){var Do=b(Mn||document.body,Ps,Hs);if(!Do)return null;Ta=Do.canvas,qs=Do.onDestroy}ha.premultipliedAlpha===void 0&&(ha.premultipliedAlpha=!0),fa=y(Ta,ha)}return fa?{gl:fa,canvas:Ta,container:Mn,extensions:Io,optionalExtensions:Vs,pixelRatio:Hs,profile:is,cachedCode:su,onDone:Ps,onDestroy:qs}:(qs(),Ps("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function C(Gt,jr){var _i={};function Mn(ha){var Io=ha.toLowerCase(),Vs;try{Vs=_i[Io]=Gt.getExtension(Io)}catch(Hs){}return!!Vs}for(var Ta=0;Ta<jr.extensions.length;++Ta){var fa=jr.extensions[Ta];if(!Mn(fa))return jr.onDestroy(),jr.onDone('"'+fa+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return jr.optionalExtensions.forEach(Mn),{extensions:_i,restore:function(){Object.keys(_i).forEach(function(ha){if(_i[ha]&&!Mn(ha))throw new Error("(regl): error restoring extension "+ha)})}}}function M(Gt,jr){for(var _i=Array(Gt),Mn=0;Mn<Gt;++Mn)_i[Mn]=jr(Mn);return _i}var v=5120,z=5121,T=5122,F=5123,q=5124,U=5125,H=5126;function j(Gt){for(var jr=16;jr<=1<<28;jr*=16)if(Gt<=jr)return jr;return 0}function G(Gt){var jr,_i;return jr=(Gt>65535)<<4,Gt>>>=jr,_i=(Gt>255)<<3,Gt>>>=_i,jr|=_i,_i=(Gt>15)<<2,Gt>>>=_i,jr|=_i,_i=(Gt>3)<<1,Gt>>>=_i,jr|=_i,jr|Gt>>1}function O(){var Gt=M(8,function(){return[]});function jr(fa){var ha=j(fa),Io=Gt[G(ha)>>2];return Io.length>0?Io.pop():new ArrayBuffer(ha)}function _i(fa){Gt[G(fa.byteLength)>>2].push(fa)}function Mn(fa,ha){var Io=null;switch(fa){case v:Io=new Int8Array(jr(ha),0,ha);break;case z:Io=new Uint8Array(jr(ha),0,ha);break;case T:Io=new Int16Array(jr(2*ha),0,ha);break;case F:Io=new Uint16Array(jr(2*ha),0,ha);break;case q:Io=new Int32Array(jr(4*ha),0,ha);break;case U:Io=new Uint32Array(jr(4*ha),0,ha);break;case H:Io=new Float32Array(jr(4*ha),0,ha);break;default:return null}return Io.length!==ha?Io.subarray(0,ha):Io}function Ta(fa){_i(fa.buffer)}return{alloc:jr,free:_i,allocType:Mn,freeType:Ta}}var W=O();W.zero=O();var re=3408,ne=3410,be=3411,ze=3412,Ce=3413,he=3414,te=3415,ke=33901,Ee=33902,Me=3379,Oe=3386,Re=34921,me=36347,Be=36348,fe=35661,Ze=35660,et=34930,gt=36349,Pt=34076,Qe=34024,Xe=7936,Tt=7937,xt=7938,_t=35724,Ct=34047,jt=36063,At=34852,Te=3553,nt=34067,ut=34069,ct=33984,rt=6408,je=5126,tt=5121,Je=36160,Mt=36053,Vt=36064,Kt=16384,ir=function(Gt,jr){var _i=1;jr.ext_texture_filter_anisotropic&&(_i=Gt.getParameter(Ct));var Mn=1,Ta=1;jr.webgl_draw_buffers&&(Mn=Gt.getParameter(At),Ta=Gt.getParameter(jt));var fa=!!jr.oes_texture_float;if(fa){var ha=Gt.createTexture();Gt.bindTexture(Te,ha),Gt.texImage2D(Te,0,rt,1,1,0,rt,je,null);var Io=Gt.createFramebuffer();if(Gt.bindFramebuffer(Je,Io),Gt.framebufferTexture2D(Je,Vt,Te,ha,0),Gt.bindTexture(Te,null),Gt.checkFramebufferStatus(Je)!==Mt)fa=!1;else{Gt.viewport(0,0,1,1),Gt.clearColor(1,0,0,1),Gt.clear(Kt);var Vs=W.allocType(je,4);Gt.readPixels(0,0,1,1,rt,je,Vs),Gt.getError()?fa=!1:(Gt.deleteFramebuffer(Io),Gt.deleteTexture(ha),fa=Vs[0]===1),W.freeType(Vs)}}var Hs=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),is=!0;if(!Hs){var su=Gt.createTexture(),Ps=W.allocType(tt,36);Gt.activeTexture(ct),Gt.bindTexture(nt,su),Gt.texImage2D(ut,0,rt,3,3,0,rt,tt,Ps),W.freeType(Ps),Gt.bindTexture(nt,null),Gt.deleteTexture(su),is=!Gt.getError()}return{colorBits:[Gt.getParameter(ne),Gt.getParameter(be),Gt.getParameter(ze),Gt.getParameter(Ce)],depthBits:Gt.getParameter(he),stencilBits:Gt.getParameter(te),subpixelBits:Gt.getParameter(re),extensions:Object.keys(jr).filter(function(qs){return!!jr[qs]}),maxAnisotropic:_i,maxDrawbuffers:Mn,maxColorAttachments:Ta,pointSizeDims:Gt.getParameter(ke),lineWidthDims:Gt.getParameter(Ee),maxViewportDims:Gt.getParameter(Oe),maxCombinedTextureUnits:Gt.getParameter(fe),maxCubeMapSize:Gt.getParameter(Pt),maxRenderbufferSize:Gt.getParameter(Qe),maxTextureUnits:Gt.getParameter(et),maxTextureSize:Gt.getParameter(Me),maxAttributes:Gt.getParameter(Re),maxVertexUniforms:Gt.getParameter(me),maxVertexTextureUnits:Gt.getParameter(Ze),maxVaryingVectors:Gt.getParameter(Be),maxFragmentUniforms:Gt.getParameter(gt),glsl:Gt.getParameter(_t),renderer:Gt.getParameter(Tt),vendor:Gt.getParameter(Xe),version:Gt.getParameter(xt),readFloat:fa,npotTextureCube:is}},fr=function(Gt){return Gt instanceof Uint8Array||Gt instanceof Uint16Array||Gt instanceof Uint32Array||Gt instanceof Int8Array||Gt instanceof Int16Array||Gt instanceof Int32Array||Gt instanceof Float32Array||Gt instanceof Float64Array||Gt instanceof Uint8ClampedArray};function Ot(Gt){return!!Gt&&typeof Gt=="object"&&Array.isArray(Gt.shape)&&Array.isArray(Gt.stride)&&typeof Gt.offset=="number"&&Gt.shape.length===Gt.stride.length&&(Array.isArray(Gt.data)||fr(Gt.data))}var De=function(Gt){return Object.keys(Gt).map(function(jr){return Gt[jr]})},_e={shape:ue,flatten:ye};function Fe(Gt,jr,_i){for(var Mn=0;Mn<jr;++Mn)_i[Mn]=Gt[Mn]}function Pe(Gt,jr,_i,Mn){for(var Ta=0,fa=0;fa<jr;++fa)for(var ha=Gt[fa],Io=0;Io<_i;++Io)Mn[Ta++]=ha[Io]}function Ie(Gt,jr,_i,Mn,Ta,fa){for(var ha=fa,Io=0;Io<jr;++Io)for(var Vs=Gt[Io],Hs=0;Hs<_i;++Hs)for(var is=Vs[Hs],su=0;su<Mn;++su)Ta[ha++]=is[su]}function lt(Gt,jr,_i,Mn,Ta){for(var fa=1,ha=_i+1;ha<jr.length;++ha)fa*=jr[ha];var Io=jr[_i];if(jr.length-_i===4){var Vs=jr[_i+1],Hs=jr[_i+2],is=jr[_i+3];for(ha=0;ha<Io;++ha)Ie(Gt[ha],Vs,Hs,is,Mn,Ta),Ta+=fa}else for(ha=0;ha<Io;++ha)lt(Gt[ha],jr,_i+1,Mn,Ta),Ta+=fa}function ye(Gt,jr,_i,Mn){var Ta=1;if(jr.length)for(var fa=0;fa<jr.length;++fa)Ta*=jr[fa];else Ta=0;var ha=Mn||W.allocType(_i,Ta);switch(jr.length){case 0:break;case 1:Fe(Gt,jr[0],ha);break;case 2:Pe(Gt,jr[0],jr[1],ha);break;case 3:Ie(Gt,jr[0],jr[1],jr[2],ha,0);break;default:lt(Gt,jr,0,ha,0)}return ha}function ue(Gt){for(var jr=[],_i=Gt;_i.length;_i=_i[0])jr.push(_i.length);return jr}var de={"[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},ht=5120,Et=5122,St=5124,Zt=5121,qr=5123,Lr=5125,vr=5126,Er=5126,si={int8:ht,int16:Et,int32:St,uint8:Zt,uint16:qr,uint32:Lr,float:vr,float32:Er},Ei=35048,Si=35040,xi={dynamic:Ei,stream:Si,static:35044},Hi=_e.flatten,Jr=_e.shape,ci=35044,Di=35040,Lt=5121,vt=5126,Dt=[];Dt[5120]=1,Dt[5122]=2,Dt[5124]=4,Dt[5121]=1,Dt[5123]=2,Dt[5125]=4,Dt[5126]=4;function Bt(Gt){return de[Object.prototype.toString.call(Gt)]|0}function sr(Gt,jr){for(var _i=0;_i<jr.length;++_i)Gt[_i]=jr[_i]}function br(Gt,jr,_i,Mn,Ta,fa,ha){for(var Io=0,Vs=0;Vs<_i;++Vs)for(var Hs=0;Hs<Mn;++Hs)Gt[Io++]=jr[Ta*Vs+fa*Hs+ha]}function zr(Gt,jr,_i,Mn){var Ta=0,fa={};function ha(kn){this.id=Ta++,this.buffer=Gt.createBuffer(),this.type=kn,this.usage=ci,this.byteLength=0,this.dimension=1,this.dtype=Lt,this.persistentData=null,_i.profile&&(this.stats={size:0})}ha.prototype.bind=function(){Gt.bindBuffer(this.type,this.buffer)},ha.prototype.destroy=function(){Ps(this)};var Io=[];function Vs(kn,La){var Es=Io.pop();return Es||(Es=new ha(kn)),Es.bind(),su(Es,La,Di,0,1,!1),Es}function Hs(kn){Io.push(kn)}function is(kn,La,Es){kn.byteLength=La.byteLength,Gt.bufferData(kn.type,La,Es)}function su(kn,La,Es,Ws,Qo,bl){var nl;if(kn.usage=Es,Array.isArray(La)){if(kn.dtype=Ws||vt,La.length>0){var ru;if(Array.isArray(La[0])){nl=Jr(La);for(var hs=1,Ho=1;Ho<nl.length;++Ho)hs*=nl[Ho];kn.dimension=hs,ru=Hi(La,nl,kn.dtype),is(kn,ru,Es),bl?kn.persistentData=ru:W.freeType(ru)}else if(typeof La[0]=="number"){kn.dimension=Qo;var ql=W.allocType(kn.dtype,La.length);sr(ql,La),is(kn,ql,Es),bl?kn.persistentData=ql:W.freeType(ql)}else fr(La[0])&&(kn.dimension=La[0].length,kn.dtype=Ws||Bt(La[0])||vt,ru=Hi(La,[La.length,La[0].length],kn.dtype),is(kn,ru,Es),bl?kn.persistentData=ru:W.freeType(ru))}}else if(fr(La))kn.dtype=Ws||Bt(La),kn.dimension=Qo,is(kn,La,Es),bl&&(kn.persistentData=new Uint8Array(new Uint8Array(La.buffer)));else if(Ot(La)){nl=La.shape;var yl=La.stride,tl=La.offset,js=0,zl=0,lu=0,bu=0;nl.length===1?(js=nl[0],zl=1,lu=yl[0],bu=0):nl.length===2&&(js=nl[0],zl=nl[1],lu=yl[0],bu=yl[1]),kn.dtype=Ws||Bt(La.data)||vt,kn.dimension=zl;var al=W.allocType(kn.dtype,js*zl);br(al,La.data,js,zl,lu,bu,tl),is(kn,al,Es),bl?kn.persistentData=al:W.freeType(al)}else La instanceof ArrayBuffer&&(kn.dtype=Lt,kn.dimension=Qo,is(kn,La,Es),bl&&(kn.persistentData=new Uint8Array(new Uint8Array(La))))}function Ps(kn){jr.bufferCount--,Mn(kn);var La=kn.buffer;Gt.deleteBuffer(La),kn.buffer=null,delete fa[kn.id]}function qs(kn,La,Es,Ws){jr.bufferCount++;var Qo=new ha(La);fa[Qo.id]=Qo;function bl(hs){var Ho=ci,ql=null,yl=0,tl=0,js=1;return Array.isArray(hs)||fr(hs)||Ot(hs)||hs instanceof ArrayBuffer?ql=hs:typeof hs=="number"?yl=hs|0:hs&&("data"in hs&&(ql=hs.data),"usage"in hs&&(Ho=xi[hs.usage]),"type"in hs&&(tl=si[hs.type]),"dimension"in hs&&(js=hs.dimension|0),"length"in hs&&(yl=hs.length|0)),Qo.bind(),ql?su(Qo,ql,Ho,tl,js,Ws):(yl&&Gt.bufferData(Qo.type,yl,Ho),Qo.dtype=tl||Lt,Qo.usage=Ho,Qo.dimension=js,Qo.byteLength=yl),_i.profile&&(Qo.stats.size=Qo.byteLength*Dt[Qo.dtype]),bl}function nl(hs,Ho){Gt.bufferSubData(Qo.type,Ho,hs)}function ru(hs,Ho){var ql=(Ho||0)|0,yl;if(Qo.bind(),fr(hs)||hs instanceof ArrayBuffer)nl(hs,ql);else if(Array.isArray(hs)){if(hs.length>0){if(typeof hs[0]=="number"){var tl=W.allocType(Qo.dtype,hs.length);sr(tl,hs),nl(tl,ql),W.freeType(tl)}else if(Array.isArray(hs[0])||fr(hs[0])){yl=Jr(hs);var js=Hi(hs,yl,Qo.dtype);nl(js,ql),W.freeType(js)}}}else if(Ot(hs)){yl=hs.shape;var zl=hs.stride,lu=0,bu=0,al=0,jl=0;yl.length===1?(lu=yl[0],bu=1,al=zl[0],jl=0):yl.length===2&&(lu=yl[0],bu=yl[1],al=zl[0],jl=zl[1]);var mu=Array.isArray(hs.data)?Qo.dtype:Bt(hs.data),Tu=W.allocType(mu,lu*bu);br(Tu,hs.data,lu,bu,al,jl,hs.offset),nl(Tu,ql),W.freeType(Tu)}return bl}return Es||bl(kn),bl._reglType="buffer",bl._buffer=Qo,bl.subdata=ru,_i.profile&&(bl.stats=Qo.stats),bl.destroy=function(){Ps(Qo)},bl}function Do(){De(fa).forEach(function(kn){kn.buffer=Gt.createBuffer(),Gt.bindBuffer(kn.type,kn.buffer),Gt.bufferData(kn.type,kn.persistentData||kn.byteLength,kn.usage)})}return _i.profile&&(jr.getTotalBufferSize=function(){var kn=0;return Object.keys(fa).forEach(function(La){kn+=fa[La].stats.size}),kn}),{create:qs,createStream:Vs,destroyStream:Hs,clear:function(){De(fa).forEach(Ps),Io.forEach(Ps)},getBuffer:function(kn){return kn&&kn._buffer instanceof ha?kn._buffer:null},restore:Do,_initBuffer:su}}var Tr=0,Rr=0,Br=1,oi=1,vi=4,Pi=4,Yr={points:Tr,point:Rr,lines:Br,line:oi,triangles:vi,triangle:Pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ni=0,Ur=1,ti=4,ki=5120,ji=5121,Vi=5122,zi=5123,Mi=5124,sn=5125,fi=34963,Or=35040,st=35044;function Wt(Gt,jr,_i,Mn){var Ta={},fa=0,ha={uint8:ji,uint16:zi};jr.oes_element_index_uint&&(ha.uint32=sn);function Io(Do){this.id=fa++,Ta[this.id]=this,this.buffer=Do,this.primType=ti,this.vertCount=0,this.type=0}Io.prototype.bind=function(){this.buffer.bind()};var Vs=[];function Hs(Do){var kn=Vs.pop();return kn||(kn=new Io(_i.create(null,fi,!0,!1)._buffer)),su(kn,Do,Or,-1,-1,0,0),kn}function is(Do){Vs.push(Do)}function su(Do,kn,La,Es,Ws,Qo,bl){Do.buffer.bind();var nl;if(kn){var ru=bl;!bl&&(!fr(kn)||Ot(kn)&&!fr(kn.data))&&(ru=jr.oes_element_index_uint?sn:zi),_i._initBuffer(Do.buffer,kn,La,ru,3)}else Gt.bufferData(fi,Qo,La),Do.buffer.dtype=nl||ji,Do.buffer.usage=La,Do.buffer.dimension=3,Do.buffer.byteLength=Qo;if(nl=bl,!bl){switch(Do.buffer.dtype){case ji:case ki:nl=ji;break;case zi:case Vi:nl=zi;break;case sn:case Mi:nl=sn;break;default:}Do.buffer.dtype=nl}Do.type=nl;var hs=Ws;hs<0&&(hs=Do.buffer.byteLength,nl===zi?hs>>=1:nl===sn&&(hs>>=2)),Do.vertCount=hs;var Ho=Es;if(Es<0){Ho=ti;var ql=Do.buffer.dimension;ql===1&&(Ho=Ni),ql===2&&(Ho=Ur),ql===3&&(Ho=ti)}Do.primType=Ho}function Ps(Do){Mn.elementsCount--,delete Ta[Do.id],Do.buffer.destroy(),Do.buffer=null}function qs(Do,kn){var La=_i.create(null,fi,!0),Es=new Io(La._buffer);Mn.elementsCount++;function Ws(Qo){if(!Qo)La(),Es.primType=ti,Es.vertCount=0,Es.type=ji;else if(typeof Qo=="number")La(Qo),Es.primType=ti,Es.vertCount=Qo|0,Es.type=ji;else{var bl=null,nl=st,ru=-1,hs=-1,Ho=0,ql=0;Array.isArray(Qo)||fr(Qo)||Ot(Qo)?bl=Qo:("data"in Qo&&(bl=Qo.data),"usage"in Qo&&(nl=xi[Qo.usage]),"primitive"in Qo&&(ru=Yr[Qo.primitive]),"count"in Qo&&(hs=Qo.count|0),"type"in Qo&&(ql=ha[Qo.type]),"length"in Qo?Ho=Qo.length|0:(Ho=hs,ql===zi||ql===Vi?Ho*=2:(ql===sn||ql===Mi)&&(Ho*=4))),su(Es,bl,nl,ru,hs,Ho,ql)}return Ws}return Ws(Do),Ws._reglType="elements",Ws._elements=Es,Ws.subdata=function(Qo,bl){return La.subdata(Qo,bl),Ws},Ws.destroy=function(){Ps(Es)},Ws}return{create:qs,createStream:Hs,destroyStream:is,getElements:function(Do){return typeof Do=="function"&&Do._elements instanceof Io?Do._elements:null},clear:function(){De(Ta).forEach(Ps)}}}var tr=new Float32Array(1),or=new Uint32Array(tr.buffer),Nr=5123;function hi(Gt){for(var jr=W.allocType(Nr,Gt.length),_i=0;_i<Gt.length;++_i)if(isNaN(Gt[_i]))jr[_i]=65535;else if(Gt[_i]===1/0)jr[_i]=31744;else if(Gt[_i]===-1/0)jr[_i]=64512;else{tr[0]=Gt[_i];var Mn=or[0],Ta=Mn>>>31<<15,fa=(Mn<<1>>>24)-127,ha=Mn>>13&1023;if(fa<-24)jr[_i]=Ta;else if(fa<-14){var Io=-14-fa;jr[_i]=Ta+(ha+1024>>Io)}else fa>15?jr[_i]=Ta+31744:jr[_i]=Ta+(fa+15<<10)+ha}return jr}function Gi(Gt){return Array.isArray(Gt)||fr(Gt)}var Qr=34467,Ui=3553,zn=34067,fn=34069,xn=6408,_a=6406,Wn=6407,Fn=6409,ia=6410,za=32854,Hr=32855,na=36194,go=32819,Dn=32820,un=33635,Zn=34042,Wo=6402,Ba=34041,Bo=35904,Ea=35906,Ha=36193,tn=33776,Cn=33777,Xn=33778,ts=33779,Ja=35986,to=35987,Ri=34798,an=35840,cs=35841,pa=35842,ln=35843,ka=36196,va=5121,bo=5123,Co=5125,Fi=5126,Yn=10242,xa=10243,Qi=10497,Nn=33071,Pn=33648,qa=10240,jo=10241,Vo=9728,Pa=9729,Oa=9984,co=9985,An=9986,_o=9987,ks=33170,bs=4352,ps=4353,sa=4354,Bn=34046,ms=3317,ya=37440,on=37441,mn=37443,Ga=37444,ca=33984,bn=[Oa,An,co,_o],Xi=[0,Fn,ia,Wn,xn],qn={};qn[Fn]=qn[_a]=qn[Wo]=1,qn[Ba]=qn[ia]=2,qn[Wn]=qn[Bo]=3,qn[xn]=qn[Ea]=4;function Ia(Gt){return"[object "+Gt+"]"}var yn=Ia("HTMLCanvasElement"),Ya=Ia("OffscreenCanvas"),ba=Ia("CanvasRenderingContext2D"),Da=Ia("ImageBitmap"),Aa=Ia("HTMLImageElement"),Ln=Ia("HTMLVideoElement"),wo=Object.keys(de).concat([yn,Ya,ba,Da,Aa,Ln]),wa=[];wa[va]=1,wa[Fi]=4,wa[Ha]=2,wa[bo]=2,wa[Co]=4;var $i=[];$i[za]=2,$i[Hr]=2,$i[na]=2,$i[Ba]=4,$i[tn]=.5,$i[Cn]=.5,$i[Xn]=1,$i[ts]=1,$i[Ja]=.5,$i[to]=1,$i[Ri]=1,$i[an]=.5,$i[cs]=.25,$i[pa]=.5,$i[ln]=.25,$i[ka]=.5;function ea(Gt){return Array.isArray(Gt)&&(Gt.length===0||typeof Gt[0]=="number")}function Sa(Gt){if(!Array.isArray(Gt))return!1;var jr=Gt.length;return!(jr===0||!Gi(Gt[0]))}function Za(Gt){return Object.prototype.toString.call(Gt)}function xo(Gt){return Za(Gt)===yn}function Wa(Gt){return Za(Gt)===Ya}function hn(Gt){return Za(Gt)===ba}function Un(Gt){return Za(Gt)===Da}function Ss(Gt){return Za(Gt)===Aa}function Kn(Gt){return Za(Gt)===Ln}function ns(Gt){if(!Gt)return!1;var jr=Za(Gt);return wo.indexOf(jr)>=0?!0:ea(Gt)||Sa(Gt)||Ot(Gt)}function Jo(Gt){return de[Object.prototype.toString.call(Gt)]|0}function vo(Gt,jr){var _i=jr.length;switch(Gt.type){case va:case bo:case Co:case Fi:var Mn=W.allocType(Gt.type,_i);Mn.set(jr),Gt.data=Mn;break;case Ha:Gt.data=hi(jr);break;default:}}function ma(Gt,jr){return W.allocType(Gt.type===Ha?Fi:Gt.type,jr)}function ja(Gt,jr){Gt.type===Ha?(Gt.data=hi(jr),W.freeType(jr)):Gt.data=jr}function To(Gt,jr,_i,Mn,Ta,fa){for(var ha=Gt.width,Io=Gt.height,Vs=Gt.channels,Hs=ha*Io*Vs,is=ma(Gt,Hs),su=0,Ps=0;Ps<Io;++Ps)for(var qs=0;qs<ha;++qs)for(var Do=0;Do<Vs;++Do)is[su++]=jr[_i*qs+Mn*Ps+Ta*Do+fa];ja(Gt,is)}function Ao(Gt,jr,_i,Mn,Ta,fa){var ha;if(typeof $i[Gt]!="undefined"?ha=$i[Gt]:ha=qn[Gt]*wa[jr],fa&&(ha*=6),Ta){for(var Io=0,Vs=_i;Vs>=1;)Io+=ha*Vs*Vs,Vs/=2;return Io}else return ha*_i*Mn}function la(Gt,jr,_i,Mn,Ta,fa,ha){var Io={"don't care":bs,"dont care":bs,nice:sa,fast:ps},Vs={repeat:Qi,clamp:Nn,mirror:Pn},Hs={nearest:Vo,linear:Pa},is=e({mipmap:_o,"nearest mipmap nearest":Oa,"linear mipmap nearest":co,"nearest mipmap linear":An,"linear mipmap linear":_o},Hs),su={none:0,browser:Ga},Ps={uint8:va,rgba4:go,rgb565:un,"rgb5 a1":Dn},qs={alpha:_a,luminance:Fn,"luminance alpha":ia,rgb:Wn,rgba:xn,rgba4:za,"rgb5 a1":Hr,rgb565:na},Do={};jr.ext_srgb&&(qs.srgb=Bo,qs.srgba=Ea),jr.oes_texture_float&&(Ps.float32=Ps.float=Fi),jr.oes_texture_half_float&&(Ps.float16=Ps["half float"]=Ha),jr.webgl_depth_texture&&(e(qs,{depth:Wo,"depth stencil":Ba}),e(Ps,{uint16:bo,uint32:Co,"depth stencil":Zn})),jr.webgl_compressed_texture_s3tc&&e(Do,{"rgb s3tc dxt1":tn,"rgba s3tc dxt1":Cn,"rgba s3tc dxt3":Xn,"rgba s3tc dxt5":ts}),jr.webgl_compressed_texture_atc&&e(Do,{"rgb atc":Ja,"rgba atc explicit alpha":to,"rgba atc interpolated alpha":Ri}),jr.webgl_compressed_texture_pvrtc&&e(Do,{"rgb pvrtc 4bppv1":an,"rgb pvrtc 2bppv1":cs,"rgba pvrtc 4bppv1":pa,"rgba pvrtc 2bppv1":ln}),jr.webgl_compressed_texture_etc1&&(Do["rgb etc1"]=ka);var kn=Array.prototype.slice.call(Gt.getParameter(Qr));Object.keys(Do).forEach(function(ge){var Ue=Do[ge];kn.indexOf(Ue)>=0&&(qs[ge]=Ue)});var La=Object.keys(qs);_i.textureFormats=La;var Es=[];Object.keys(qs).forEach(function(ge){var Ue=qs[ge];Es[Ue]=ge});var Ws=[];Object.keys(Ps).forEach(function(ge){var Ue=Ps[ge];Ws[Ue]=ge});var Qo=[];Object.keys(Hs).forEach(function(ge){var Ue=Hs[ge];Qo[Ue]=ge});var bl=[];Object.keys(is).forEach(function(ge){var Ue=is[ge];bl[Ue]=ge});var nl=[];Object.keys(Vs).forEach(function(ge){var Ue=Vs[ge];nl[Ue]=ge});var ru=La.reduce(function(ge,Ue){var dt=qs[Ue];return dt===Fn||dt===_a||dt===Fn||dt===ia||dt===Wo||dt===Ba||jr.ext_srgb&&(dt===Bo||dt===Ea)?ge[dt]=dt:dt===Hr||Ue.indexOf("rgba")>=0?ge[dt]=xn:ge[dt]=Wn,ge},{});function hs(){this.internalformat=xn,this.format=xn,this.type=va,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Ga,this.width=0,this.height=0,this.channels=0}function Ho(ge,Ue){ge.internalformat=Ue.internalformat,ge.format=Ue.format,ge.type=Ue.type,ge.compressed=Ue.compressed,ge.premultiplyAlpha=Ue.premultiplyAlpha,ge.flipY=Ue.flipY,ge.unpackAlignment=Ue.unpackAlignment,ge.colorSpace=Ue.colorSpace,ge.width=Ue.width,ge.height=Ue.height,ge.channels=Ue.channels}function ql(ge,Ue){if(!(typeof Ue!="object"||!Ue)){if("premultiplyAlpha"in Ue&&(ge.premultiplyAlpha=Ue.premultiplyAlpha),"flipY"in Ue&&(ge.flipY=Ue.flipY),"alignment"in Ue&&(ge.unpackAlignment=Ue.alignment),"colorSpace"in Ue&&(ge.colorSpace=su[Ue.colorSpace]),"type"in Ue){var dt=Ue.type;ge.type=Ps[dt]}var Rt=ge.width,ur=ge.height,gr=ge.channels,cr=!1;"shape"in Ue?(Rt=Ue.shape[0],ur=Ue.shape[1],Ue.shape.length===3&&(gr=Ue.shape[2],cr=!0)):("radius"in Ue&&(Rt=ur=Ue.radius),"width"in Ue&&(Rt=Ue.width),"height"in Ue&&(ur=Ue.height),"channels"in Ue&&(gr=Ue.channels,cr=!0)),ge.width=Rt|0,ge.height=ur|0,ge.channels=gr|0;var It=!1;if("format"in Ue){var Qt=Ue.format,ar=ge.internalformat=qs[Qt];ge.format=ru[ar],Qt in Ps&&("type"in Ue||(ge.type=Ps[Qt])),Qt in Do&&(ge.compressed=!0),It=!0}!cr&&It?ge.channels=qn[ge.format]:cr&&!It&&ge.channels!==Xi[ge.format]&&(ge.format=ge.internalformat=Xi[ge.channels])}}function yl(ge){Gt.pixelStorei(ya,ge.flipY),Gt.pixelStorei(on,ge.premultiplyAlpha),Gt.pixelStorei(mn,ge.colorSpace),Gt.pixelStorei(ms,ge.unpackAlignment)}function tl(){hs.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function js(ge,Ue){var dt=null;if(ns(Ue)?dt=Ue:Ue&&(ql(ge,Ue),"x"in Ue&&(ge.xOffset=Ue.x|0),"y"in Ue&&(ge.yOffset=Ue.y|0),ns(Ue.data)&&(dt=Ue.data)),Ue.copy){var Rt=Ta.viewportWidth,ur=Ta.viewportHeight;ge.width=ge.width||Rt-ge.xOffset,ge.height=ge.height||ur-ge.yOffset,ge.needsCopy=!0}else if(!dt)ge.width=ge.width||1,ge.height=ge.height||1,ge.channels=ge.channels||4;else if(fr(dt))ge.channels=ge.channels||4,ge.data=dt,!("type"in Ue)&&ge.type===va&&(ge.type=Jo(dt));else if(ea(dt))ge.channels=ge.channels||4,vo(ge,dt),ge.alignment=1,ge.needsFree=!0;else if(Ot(dt)){var gr=dt.data;!Array.isArray(gr)&&ge.type===va&&(ge.type=Jo(gr));var cr=dt.shape,It=dt.stride,Qt,ar,mr,Pr,Dr,Xr;cr.length===3?(mr=cr[2],Xr=It[2]):(mr=1,Xr=1),Qt=cr[0],ar=cr[1],Pr=It[0],Dr=It[1],ge.alignment=1,ge.width=Qt,ge.height=ar,ge.channels=mr,ge.format=ge.internalformat=Xi[mr],ge.needsFree=!0,To(ge,gr,Pr,Dr,Xr,dt.offset)}else if(xo(dt)||Wa(dt)||hn(dt))xo(dt)||Wa(dt)?ge.element=dt:ge.element=dt.canvas,ge.width=ge.element.width,ge.height=ge.element.height,ge.channels=4;else if(Un(dt))ge.element=dt,ge.width=dt.width,ge.height=dt.height,ge.channels=4;else if(Ss(dt))ge.element=dt,ge.width=dt.naturalWidth,ge.height=dt.naturalHeight,ge.channels=4;else if(Kn(dt))ge.element=dt,ge.width=dt.videoWidth,ge.height=dt.videoHeight,ge.channels=4;else if(Sa(dt)){var Gr=ge.width||dt[0].length,Fr=ge.height||dt.length,Kr=ge.channels;Gi(dt[0][0])?Kr=Kr||dt[0][0].length:Kr=Kr||1;for(var Cr=_e.shape(dt),yi=1,qi=0;qi<Cr.length;++qi)yi*=Cr[qi];var vn=ma(ge,yi);_e.flatten(dt,Cr,"",vn),ja(ge,vn),ge.alignment=1,ge.width=Gr,ge.height=Fr,ge.channels=Kr,ge.format=ge.internalformat=Xi[Kr],ge.needsFree=!0}ge.type===Fi||ge.type}function zl(ge,Ue,dt){var Rt=ge.element,ur=ge.data,gr=ge.internalformat,cr=ge.format,It=ge.type,Qt=ge.width,ar=ge.height;yl(ge),Rt?Gt.texImage2D(Ue,dt,cr,cr,It,Rt):ge.compressed?Gt.compressedTexImage2D(Ue,dt,gr,Qt,ar,0,ur):ge.needsCopy?(Mn(),Gt.copyTexImage2D(Ue,dt,cr,ge.xOffset,ge.yOffset,Qt,ar,0)):Gt.texImage2D(Ue,dt,cr,Qt,ar,0,cr,It,ur||null)}function lu(ge,Ue,dt,Rt,ur){var gr=ge.element,cr=ge.data,It=ge.internalformat,Qt=ge.format,ar=ge.type,mr=ge.width,Pr=ge.height;yl(ge),gr?Gt.texSubImage2D(Ue,ur,dt,Rt,Qt,ar,gr):ge.compressed?Gt.compressedTexSubImage2D(Ue,ur,dt,Rt,It,mr,Pr,cr):ge.needsCopy?(Mn(),Gt.copyTexSubImage2D(Ue,ur,dt,Rt,ge.xOffset,ge.yOffset,mr,Pr)):Gt.texSubImage2D(Ue,ur,dt,Rt,mr,Pr,Qt,ar,cr)}var bu=[];function al(){return bu.pop()||new tl}function jl(ge){ge.needsFree&&W.freeType(ge.data),tl.call(ge),bu.push(ge)}function mu(){hs.call(this),this.genMipmaps=!1,this.mipmapHint=bs,this.mipmask=0,this.images=Array(16)}function Tu(ge,Ue,dt){var Rt=ge.images[0]=al();ge.mipmask=1,Rt.width=ge.width=Ue,Rt.height=ge.height=dt,Rt.channels=ge.channels=4}function Ru(ge,Ue){var dt=null;if(ns(Ue))dt=ge.images[0]=al(),Ho(dt,ge),js(dt,Ue),ge.mipmask=1;else if(ql(ge,Ue),Array.isArray(Ue.mipmap))for(var Rt=Ue.mipmap,ur=0;ur<Rt.length;++ur)dt=ge.images[ur]=al(),Ho(dt,ge),dt.width>>=ur,dt.height>>=ur,js(dt,Rt[ur]),ge.mipmask|=1<<ur;else dt=ge.images[0]=al(),Ho(dt,ge),js(dt,Ue),ge.mipmask=1;Ho(ge,ge.images[0]),ge.compressed&&(ge.internalformat===tn||ge.internalformat===Cn||ge.internalformat===Xn||ge.internalformat)}function Rf(ge,Ue){for(var dt=ge.images,Rt=0;Rt<dt.length;++Rt){if(!dt[Rt])return;zl(dt[Rt],Ue,Rt)}}var Cc=[];function rf(){var ge=Cc.pop()||new mu;hs.call(ge),ge.mipmask=0;for(var Ue=0;Ue<16;++Ue)ge.images[Ue]=null;return ge}function Lc(ge){for(var Ue=ge.images,dt=0;dt<Ue.length;++dt)Ue[dt]&&jl(Ue[dt]),Ue[dt]=null;Cc.push(ge)}function wf(){this.minFilter=Vo,this.magFilter=Vo,this.wrapS=Nn,this.wrapT=Nn,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=bs}function pc(ge,Ue){if("min"in Ue){var dt=Ue.min;ge.minFilter=is[dt],bn.indexOf(ge.minFilter)>=0&&!("faces"in Ue)&&(ge.genMipmaps=!0)}if("mag"in Ue){var Rt=Ue.mag;ge.magFilter=Hs[Rt]}var ur=ge.wrapS,gr=ge.wrapT;if("wrap"in Ue){var cr=Ue.wrap;typeof cr=="string"?ur=gr=Vs[cr]:Array.isArray(cr)&&(ur=Vs[cr[0]],gr=Vs[cr[1]])}else{if("wrapS"in Ue){var It=Ue.wrapS;ur=Vs[It]}if("wrapT"in Ue){var Qt=Ue.wrapT;gr=Vs[Qt]}}if(ge.wrapS=ur,ge.wrapT=gr,"anisotropic"in Ue){var ar=Ue.anisotropic;ge.anisotropic=Ue.anisotropic}if("mipmap"in Ue){var mr=!1;switch(typeof Ue.mipmap){case"string":ge.mipmapHint=Io[Ue.mipmap],ge.genMipmaps=!0,mr=!0;break;case"boolean":mr=ge.genMipmaps=Ue.mipmap;break;case"object":ge.genMipmaps=!1,mr=!0;break;default:}mr&&!("min"in Ue)&&(ge.minFilter=Oa)}}function vc(ge,Ue){Gt.texParameteri(Ue,jo,ge.minFilter),Gt.texParameteri(Ue,qa,ge.magFilter),Gt.texParameteri(Ue,Yn,ge.wrapS),Gt.texParameteri(Ue,xa,ge.wrapT),jr.ext_texture_filter_anisotropic&&Gt.texParameteri(Ue,Bn,ge.anisotropic),ge.genMipmaps&&(Gt.hint(ks,ge.mipmapHint),Gt.generateMipmap(Ue))}var qc=0,If={},Tc=_i.maxTextureUnits,zc=Array(Tc).map(function(){return null});function Vu(ge){hs.call(this),this.mipmask=0,this.internalformat=xn,this.id=qc++,this.refCount=1,this.target=ge,this.texture=Gt.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new wf,ha.profile&&(this.stats={size:0})}function Bc(ge){Gt.activeTexture(ca),Gt.bindTexture(ge.target,ge.texture)}function Ou(){var ge=zc[0];ge?Gt.bindTexture(ge.target,ge.texture):Gt.bindTexture(Ui,null)}function Y(ge){var Ue=ge.texture,dt=ge.unit,Rt=ge.target;dt>=0&&(Gt.activeTexture(ca+dt),Gt.bindTexture(Rt,null),zc[dt]=null),Gt.deleteTexture(Ue),ge.texture=null,ge.params=null,ge.pixels=null,ge.refCount=0,delete If[ge.id],fa.textureCount--}e(Vu.prototype,{bind:function(){var ge=this;ge.bindCount+=1;var Ue=ge.unit;if(Ue<0){for(var dt=0;dt<Tc;++dt){var Rt=zc[dt];if(Rt){if(Rt.bindCount>0)continue;Rt.unit=-1}zc[dt]=ge,Ue=dt;break}Ue>=Tc,ha.profile&&fa.maxTextureUnits<Ue+1&&(fa.maxTextureUnits=Ue+1),ge.unit=Ue,Gt.activeTexture(ca+Ue),Gt.bindTexture(ge.target,ge.texture)}return Ue},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Y(this)}});function R(ge,Ue){var dt=new Vu(Ui);If[dt.id]=dt,fa.textureCount++;function Rt(cr,It){var Qt=dt.texInfo;wf.call(Qt);var ar=rf();return typeof cr=="number"?typeof It=="number"?Tu(ar,cr|0,It|0):Tu(ar,cr|0,cr|0):cr?(pc(Qt,cr),Ru(ar,cr)):Tu(ar,1,1),Qt.genMipmaps&&(ar.mipmask=(ar.width<<1)-1),dt.mipmask=ar.mipmask,Ho(dt,ar),dt.internalformat=ar.internalformat,Rt.width=ar.width,Rt.height=ar.height,Bc(dt),Rf(ar,Ui),vc(Qt,Ui),Ou(),Lc(ar),ha.profile&&(dt.stats.size=Ao(dt.internalformat,dt.type,ar.width,ar.height,Qt.genMipmaps,!1)),Rt.format=Es[dt.internalformat],Rt.type=Ws[dt.type],Rt.mag=Qo[Qt.magFilter],Rt.min=bl[Qt.minFilter],Rt.wrapS=nl[Qt.wrapS],Rt.wrapT=nl[Qt.wrapT],Rt}function ur(cr,It,Qt,ar){var mr=It|0,Pr=Qt|0,Dr=ar|0,Xr=al();return Ho(Xr,dt),Xr.width=0,Xr.height=0,js(Xr,cr),Xr.width=Xr.width||(dt.width>>Dr)-mr,Xr.height=Xr.height||(dt.height>>Dr)-Pr,Bc(dt),lu(Xr,Ui,mr,Pr,Dr),Ou(),jl(Xr),Rt}function gr(cr,It){var Qt=cr|0,ar=It|0||Qt;if(Qt===dt.width&&ar===dt.height)return Rt;Rt.width=dt.width=Qt,Rt.height=dt.height=ar,Bc(dt);for(var mr=0;dt.mipmask>>mr;++mr){var Pr=Qt>>mr,Dr=ar>>mr;if(!Pr||!Dr)break;Gt.texImage2D(Ui,mr,dt.format,Pr,Dr,0,dt.format,dt.type,null)}return Ou(),ha.profile&&(dt.stats.size=Ao(dt.internalformat,dt.type,Qt,ar,!1,!1)),Rt}return Rt(ge,Ue),Rt.subimage=ur,Rt.resize=gr,Rt._reglType="texture2d",Rt._texture=dt,ha.profile&&(Rt.stats=dt.stats),Rt.destroy=function(){dt.decRef()},Rt}function K(ge,Ue,dt,Rt,ur,gr){var cr=new Vu(zn);If[cr.id]=cr,fa.cubeCount++;var It=new Array(6);function Qt(Pr,Dr,Xr,Gr,Fr,Kr){var Cr,yi=cr.texInfo;for(wf.call(yi),Cr=0;Cr<6;++Cr)It[Cr]=rf();if(typeof Pr=="number"||!Pr){var qi=Pr|0||1;for(Cr=0;Cr<6;++Cr)Tu(It[Cr],qi,qi)}else if(typeof Pr=="object")if(Dr)Ru(It[0],Pr),Ru(It[1],Dr),Ru(It[2],Xr),Ru(It[3],Gr),Ru(It[4],Fr),Ru(It[5],Kr);else if(pc(yi,Pr),ql(cr,Pr),"faces"in Pr){var vn=Pr.faces;for(Cr=0;Cr<6;++Cr)Ho(It[Cr],cr),Ru(It[Cr],vn[Cr])}else for(Cr=0;Cr<6;++Cr)Ru(It[Cr],Pr);for(Ho(cr,It[0]),yi.genMipmaps?cr.mipmask=(It[0].width<<1)-1:cr.mipmask=It[0].mipmask,cr.internalformat=It[0].internalformat,Qt.width=It[0].width,Qt.height=It[0].height,Bc(cr),Cr=0;Cr<6;++Cr)Rf(It[Cr],fn+Cr);for(vc(yi,zn),Ou(),ha.profile&&(cr.stats.size=Ao(cr.internalformat,cr.type,Qt.width,Qt.height,yi.genMipmaps,!0)),Qt.format=Es[cr.internalformat],Qt.type=Ws[cr.type],Qt.mag=Qo[yi.magFilter],Qt.min=bl[yi.minFilter],Qt.wrapS=nl[yi.wrapS],Qt.wrapT=nl[yi.wrapT],Cr=0;Cr<6;++Cr)Lc(It[Cr]);return Qt}function ar(Pr,Dr,Xr,Gr,Fr){var Kr=Xr|0,Cr=Gr|0,yi=Fr|0,qi=al();return Ho(qi,cr),qi.width=0,qi.height=0,js(qi,Dr),qi.width=qi.width||(cr.width>>yi)-Kr,qi.height=qi.height||(cr.height>>yi)-Cr,Bc(cr),lu(qi,fn+Pr,Kr,Cr,yi),Ou(),jl(qi),Qt}function mr(Pr){var Dr=Pr|0;if(Dr!==cr.width){Qt.width=cr.width=Dr,Qt.height=cr.height=Dr,Bc(cr);for(var Xr=0;Xr<6;++Xr)for(var Gr=0;cr.mipmask>>Gr;++Gr)Gt.texImage2D(fn+Xr,Gr,cr.format,Dr>>Gr,Dr>>Gr,0,cr.format,cr.type,null);return Ou(),ha.profile&&(cr.stats.size=Ao(cr.internalformat,cr.type,Qt.width,Qt.height,!1,!0)),Qt}}return Qt(ge,Ue,dt,Rt,ur,gr),Qt.subimage=ar,Qt.resize=mr,Qt._reglType="textureCube",Qt._texture=cr,ha.profile&&(Qt.stats=cr.stats),Qt.destroy=function(){cr.decRef()},Qt}function N(){for(var ge=0;ge<Tc;++ge)Gt.activeTexture(ca+ge),Gt.bindTexture(Ui,null),zc[ge]=null;De(If).forEach(Y),fa.cubeCount=0,fa.textureCount=0}ha.profile&&(fa.getTotalTextureSize=function(){var ge=0;return Object.keys(If).forEach(function(Ue){ge+=If[Ue].stats.size}),ge});function $(){for(var ge=0;ge<Tc;++ge){var Ue=zc[ge];Ue&&(Ue.bindCount=0,Ue.unit=-1,zc[ge]=null)}De(If).forEach(function(dt){dt.texture=Gt.createTexture(),Gt.bindTexture(dt.target,dt.texture);for(var Rt=0;Rt<32;++Rt)if(dt.mipmask&1<<Rt)if(dt.target===Ui)Gt.texImage2D(Ui,Rt,dt.internalformat,dt.width>>Rt,dt.height>>Rt,0,dt.internalformat,dt.type,null);else for(var ur=0;ur<6;++ur)Gt.texImage2D(fn+ur,Rt,dt.internalformat,dt.width>>Rt,dt.height>>Rt,0,dt.internalformat,dt.type,null);vc(dt.texInfo,dt.target)})}function we(){for(var ge=0;ge<Tc;++ge){var Ue=zc[ge];Ue&&(Ue.bindCount=0,Ue.unit=-1,zc[ge]=null),Gt.activeTexture(ca+ge),Gt.bindTexture(Ui,null),Gt.bindTexture(zn,null)}}return{create2D:R,createCube:K,clear:N,getTexture:function(ge){return null},restore:$,refresh:we}}var Ki=36161,ho=32854,Ka=32855,Ca=36194,ta=33189,En=36168,Mo=34041,Ds=35907,Ro=34836,vs=34842,Ks=34843,as=[];as[ho]=2,as[Ka]=2,as[Ca]=2,as[ta]=2,as[En]=1,as[Mo]=4,as[Ds]=4,as[Ro]=16,as[vs]=8,as[Ks]=6;function Jn(Gt,jr,_i){return as[Gt]*jr*_i}var Cs=function(Gt,jr,_i,Mn,Ta){var fa={rgba4:ho,rgb565:Ca,"rgb5 a1":Ka,depth:ta,stencil:En,"depth stencil":Mo};jr.ext_srgb&&(fa.srgba=Ds),jr.ext_color_buffer_half_float&&(fa.rgba16f=vs,fa.rgb16f=Ks),jr.webgl_color_buffer_float&&(fa.rgba32f=Ro);var ha=[];Object.keys(fa).forEach(function(qs){var Do=fa[qs];ha[Do]=qs});var Io=0,Vs={};function Hs(qs){this.id=Io++,this.refCount=1,this.renderbuffer=qs,this.format=ho,this.width=0,this.height=0,Ta.profile&&(this.stats={size:0})}Hs.prototype.decRef=function(){--this.refCount<=0&&is(this)};function is(qs){var Do=qs.renderbuffer;Gt.bindRenderbuffer(Ki,null),Gt.deleteRenderbuffer(Do),qs.renderbuffer=null,qs.refCount=0,delete Vs[qs.id],Mn.renderbufferCount--}function su(qs,Do){var kn=new Hs(Gt.createRenderbuffer());Vs[kn.id]=kn,Mn.renderbufferCount++;function La(Ws,Qo){var bl=0,nl=0,ru=ho;if(typeof Ws=="object"&&Ws){var hs=Ws;if("shape"in hs){var Ho=hs.shape;bl=Ho[0]|0,nl=Ho[1]|0}else"radius"in hs&&(bl=nl=hs.radius|0),"width"in hs&&(bl=hs.width|0),"height"in hs&&(nl=hs.height|0);"format"in hs&&(ru=fa[hs.format])}else typeof Ws=="number"?(bl=Ws|0,typeof Qo=="number"?nl=Qo|0:nl=bl):Ws||(bl=nl=1);if(!(bl===kn.width&&nl===kn.height&&ru===kn.format))return La.width=kn.width=bl,La.height=kn.height=nl,kn.format=ru,Gt.bindRenderbuffer(Ki,kn.renderbuffer),Gt.renderbufferStorage(Ki,ru,bl,nl),Ta.profile&&(kn.stats.size=Jn(kn.format,kn.width,kn.height)),La.format=ha[kn.format],La}function Es(Ws,Qo){var bl=Ws|0,nl=Qo|0||bl;return bl===kn.width&&nl===kn.height||(La.width=kn.width=bl,La.height=kn.height=nl,Gt.bindRenderbuffer(Ki,kn.renderbuffer),Gt.renderbufferStorage(Ki,kn.format,bl,nl),Ta.profile&&(kn.stats.size=Jn(kn.format,kn.width,kn.height))),La}return La(qs,Do),La.resize=Es,La._reglType="renderbuffer",La._renderbuffer=kn,Ta.profile&&(La.stats=kn.stats),La.destroy=function(){kn.decRef()},La}Ta.profile&&(Mn.getTotalRenderbufferSize=function(){var qs=0;return Object.keys(Vs).forEach(function(Do){qs+=Vs[Do].stats.size}),qs});function Ps(){De(Vs).forEach(function(qs){qs.renderbuffer=Gt.createRenderbuffer(),Gt.bindRenderbuffer(Ki,qs.renderbuffer),Gt.renderbufferStorage(Ki,qs.format,qs.width,qs.height)}),Gt.bindRenderbuffer(Ki,null)}return{create:su,clear:function(){De(Vs).forEach(is)},restore:Ps}},Xa=36160,Zo=36161,Eo=3553,lo=34069,$a=36064,Xo=36096,rs=36128,$n=33306,Sn=36053,uo=36193,Rs=5121,xs=5126,Go=6407,os=6408,So=[];So[os]=4,So[Go]=3;var Qn=[];Qn[Rs]=1,Qn[xs]=4,Qn[uo]=2;function zo(Gt,jr,_i,Mn,Ta,fa){var ha={cur:null,next:null,dirty:!1,setFBO:null},Io=["rgba"],Vs=["rgba4","rgb565","rgb5 a1"];jr.ext_srgb&&Vs.push("srgba"),jr.ext_color_buffer_half_float&&Vs.push("rgba16f","rgb16f"),jr.webgl_color_buffer_float&&Vs.push("rgba32f");var Hs=["uint8"];jr.oes_texture_half_float&&Hs.push("half float","float16"),jr.oes_texture_float&&Hs.push("float","float32");function is(tl,js,zl){this.target=tl,this.texture=js,this.renderbuffer=zl;var lu=0,bu=0;js?(lu=js.width,bu=js.height):zl&&(lu=zl.width,bu=zl.height),this.width=lu,this.height=bu}function su(tl){tl&&(tl.texture&&tl.texture._texture.decRef(),tl.renderbuffer&&tl.renderbuffer._renderbuffer.decRef())}function Ps(tl,js,zl){if(tl)if(tl.texture){var lu=tl.texture._texture,bu=Math.max(1,lu.width),al=Math.max(1,lu.height);lu.refCount+=1}else{var jl=tl.renderbuffer._renderbuffer;jl.refCount+=1}}function qs(tl,js){js&&(js.texture?Gt.framebufferTexture2D(Xa,tl,js.target,js.texture._texture.texture,0):Gt.framebufferRenderbuffer(Xa,tl,Zo,js.renderbuffer._renderbuffer.renderbuffer))}function Do(tl){var js=Eo,zl=null,lu=null,bu=tl;typeof tl=="object"&&(bu=tl.data,"target"in tl&&(js=tl.target|0));var al=bu._reglType;return al==="texture2d"||al==="textureCube"?zl=bu:al==="renderbuffer"&&(lu=bu,js=Zo),new is(js,zl,lu)}function kn(tl,js,zl,lu,bu){if(zl){var al=Mn.create2D({width:tl,height:js,format:lu,type:bu});return al._texture.refCount=0,new is(Eo,al,null)}else{var jl=Ta.create({width:tl,height:js,format:lu});return jl._renderbuffer.refCount=0,new is(Zo,null,jl)}}function La(tl){return tl&&(tl.texture||tl.renderbuffer)}function Es(tl,js,zl){tl&&(tl.texture?tl.texture.resize(js,zl):tl.renderbuffer&&tl.renderbuffer.resize(js,zl),tl.width=js,tl.height=zl)}var Ws=0,Qo={};function bl(){this.id=Ws++,Qo[this.id]=this,this.framebuffer=Gt.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function nl(tl){tl.colorAttachments.forEach(su),su(tl.depthAttachment),su(tl.stencilAttachment),su(tl.depthStencilAttachment)}function ru(tl){var js=tl.framebuffer;Gt.deleteFramebuffer(js),tl.framebuffer=null,fa.framebufferCount--,delete Qo[tl.id]}function hs(tl){var js;Gt.bindFramebuffer(Xa,tl.framebuffer);var zl=tl.colorAttachments;for(js=0;js<zl.length;++js)qs($a+js,zl[js]);for(js=zl.length;js<_i.maxColorAttachments;++js)Gt.framebufferTexture2D(Xa,$a+js,Eo,null,0);Gt.framebufferTexture2D(Xa,$n,Eo,null,0),Gt.framebufferTexture2D(Xa,Xo,Eo,null,0),Gt.framebufferTexture2D(Xa,rs,Eo,null,0),qs(Xo,tl.depthAttachment),qs(rs,tl.stencilAttachment),qs($n,tl.depthStencilAttachment);var lu=Gt.checkFramebufferStatus(Xa);Gt.isContextLost(),Gt.bindFramebuffer(Xa,ha.next?ha.next.framebuffer:null),ha.cur=ha.next,Gt.getError()}function Ho(tl,js){var zl=new bl;fa.framebufferCount++;function lu(al,jl){var mu,Tu=0,Ru=0,Rf=!0,Cc=!0,rf=null,Lc=!0,wf="rgba",pc="uint8",vc=1,qc=null,If=null,Tc=null,zc=!1;if(typeof al=="number")Tu=al|0,Ru=jl|0||Tu;else if(!al)Tu=Ru=1;else{var Vu=al;if("shape"in Vu){var Bc=Vu.shape;Tu=Bc[0],Ru=Bc[1]}else"radius"in Vu&&(Tu=Ru=Vu.radius),"width"in Vu&&(Tu=Vu.width),"height"in Vu&&(Ru=Vu.height);("color"in Vu||"colors"in Vu)&&(rf=Vu.color||Vu.colors,Array.isArray(rf)),rf||("colorCount"in Vu&&(vc=Vu.colorCount|0),"colorTexture"in Vu&&(Lc=!!Vu.colorTexture,wf="rgba4"),"colorType"in Vu&&(pc=Vu.colorType,Lc||(pc==="half float"||pc==="float16"?wf="rgba16f":(pc==="float"||pc==="float32")&&(wf="rgba32f"))),"colorFormat"in Vu&&(wf=Vu.colorFormat,Io.indexOf(wf)>=0?Lc=!0:Vs.indexOf(wf)>=0&&(Lc=!1))),("depthTexture"in Vu||"depthStencilTexture"in Vu)&&(zc=!!(Vu.depthTexture||Vu.depthStencilTexture)),"depth"in Vu&&(typeof Vu.depth=="boolean"?Rf=Vu.depth:(qc=Vu.depth,Cc=!1)),"stencil"in Vu&&(typeof Vu.stencil=="boolean"?Cc=Vu.stencil:(If=Vu.stencil,Rf=!1)),"depthStencil"in Vu&&(typeof Vu.depthStencil=="boolean"?Rf=Cc=Vu.depthStencil:(Tc=Vu.depthStencil,Rf=!1,Cc=!1))}var Ou=null,Y=null,R=null,K=null;if(Array.isArray(rf))Ou=rf.map(Do);else if(rf)Ou=[Do(rf)];else for(Ou=new Array(vc),mu=0;mu<vc;++mu)Ou[mu]=kn(Tu,Ru,Lc,wf,pc);Tu=Tu||Ou[0].width,Ru=Ru||Ou[0].height,qc?Y=Do(qc):Rf&&!Cc&&(Y=kn(Tu,Ru,zc,"depth","uint32")),If?R=Do(If):Cc&&!Rf&&(R=kn(Tu,Ru,!1,"stencil","uint8")),Tc?K=Do(Tc):!qc&&!If&&Cc&&Rf&&(K=kn(Tu,Ru,zc,"depth stencil","depth stencil"));var N=null;for(mu=0;mu<Ou.length;++mu)if(Ps(Ou[mu],Tu,Ru),Ou[mu]&&Ou[mu].texture){var $=So[Ou[mu].texture._texture.format]*Qn[Ou[mu].texture._texture.type];N===null&&(N=$)}return Ps(Y,Tu,Ru),Ps(R,Tu,Ru),Ps(K,Tu,Ru),nl(zl),zl.width=Tu,zl.height=Ru,zl.colorAttachments=Ou,zl.depthAttachment=Y,zl.stencilAttachment=R,zl.depthStencilAttachment=K,lu.color=Ou.map(La),lu.depth=La(Y),lu.stencil=La(R),lu.depthStencil=La(K),lu.width=zl.width,lu.height=zl.height,hs(zl),lu}function bu(al,jl){var mu=Math.max(al|0,1),Tu=Math.max(jl|0||mu,1);if(mu===zl.width&&Tu===zl.height)return lu;for(var Ru=zl.colorAttachments,Rf=0;Rf<Ru.length;++Rf)Es(Ru[Rf],mu,Tu);return Es(zl.depthAttachment,mu,Tu),Es(zl.stencilAttachment,mu,Tu),Es(zl.depthStencilAttachment,mu,Tu),zl.width=lu.width=mu,zl.height=lu.height=Tu,hs(zl),lu}return lu(tl,js),e(lu,{resize:bu,_reglType:"framebuffer",_framebuffer:zl,destroy:function(){ru(zl),nl(zl)},use:function(al){ha.setFBO({framebuffer:lu},al)}})}function ql(tl){var js=Array(6);function zl(bu){var al,jl={color:null},mu=0,Tu=null,Ru="rgba",Rf="uint8",Cc=1;if(typeof bu=="number")mu=bu|0;else if(!bu)mu=1;else{var rf=bu;if("shape"in rf){var Lc=rf.shape;mu=Lc[0]}else"radius"in rf&&(mu=rf.radius|0),"width"in rf?(mu=rf.width|0,"height"in rf):"height"in rf&&(mu=rf.height|0);("color"in rf||"colors"in rf)&&(Tu=rf.color||rf.colors,Array.isArray(Tu)),Tu||("colorCount"in rf&&(Cc=rf.colorCount|0),"colorType"in rf&&(Rf=rf.colorType),"colorFormat"in rf&&(Ru=rf.colorFormat)),"depth"in rf&&(jl.depth=rf.depth),"stencil"in rf&&(jl.stencil=rf.stencil),"depthStencil"in rf&&(jl.depthStencil=rf.depthStencil)}var wf;if(Tu)if(Array.isArray(Tu))for(wf=[],al=0;al<Tu.length;++al)wf[al]=Tu[al];else wf=[Tu];else{wf=Array(Cc);var pc={radius:mu,format:Ru,type:Rf};for(al=0;al<Cc;++al)wf[al]=Mn.createCube(pc)}for(jl.color=Array(wf.length),al=0;al<wf.length;++al){var vc=wf[al];mu=mu||vc.width,jl.color[al]={target:lo,data:wf[al]}}for(al=0;al<6;++al){for(var qc=0;qc<wf.length;++qc)jl.color[qc].target=lo+al;al>0&&(jl.depth=js[0].depth,jl.stencil=js[0].stencil,jl.depthStencil=js[0].depthStencil),js[al]?js[al](jl):js[al]=Ho(jl)}return e(zl,{width:mu,height:mu,color:wf})}function lu(bu){var al,jl=bu|0;if(jl===zl.width)return zl;var mu=zl.color;for(al=0;al<mu.length;++al)mu[al].resize(jl);for(al=0;al<6;++al)js[al].resize(jl);return zl.width=zl.height=jl,zl}return zl(tl),e(zl,{faces:js,resize:lu,_reglType:"framebufferCube",destroy:function(){js.forEach(function(bu){bu.destroy()})}})}function yl(){ha.cur=null,ha.next=null,ha.dirty=!0,De(Qo).forEach(function(tl){tl.framebuffer=Gt.createFramebuffer(),hs(tl)})}return e(ha,{getFramebuffer:function(tl){if(typeof tl=="function"&&tl._reglType==="framebuffer"){var js=tl._framebuffer;if(js instanceof bl)return js}return null},create:Ho,createCube:ql,clear:function(){De(Qo).forEach(ru)},restore:yl})}var rl=5126,$o=34962,Na=34963;function Ua(){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=rl,this.offset=0,this.stride=0,this.divisor=0}function Po(Gt,jr,_i,Mn,Ta,fa,ha){for(var Io=_i.maxAttributes,Vs=new Array(Io),Hs=0;Hs<Io;++Hs)Vs[Hs]=new Ua;var is=0,su={},Ps={Record:Ua,scope:{},state:Vs,currentVAO:null,targetVAO:null,restore:Do()?nl:function(){},createVAO:ru,getVAO:La,destroyBuffer:qs,setVAO:Do()?Es:Ws,clear:Do()?Qo:function(){}};function qs(hs){for(var Ho=0;Ho<Vs.length;++Ho){var ql=Vs[Ho];ql.buffer===hs&&(Gt.disableVertexAttribArray(Ho),ql.buffer=null)}}function Do(){return jr.oes_vertex_array_object}function kn(){return jr.angle_instanced_arrays}function La(hs){return typeof hs=="function"&&hs._vao?hs._vao:null}function Es(hs){if(hs!==Ps.currentVAO){var Ho=Do();hs?Ho.bindVertexArrayOES(hs.vao):Ho.bindVertexArrayOES(null),Ps.currentVAO=hs}}function Ws(hs){if(hs!==Ps.currentVAO){if(hs)hs.bindAttrs();else{for(var Ho=kn(),ql=0;ql<Vs.length;++ql){var yl=Vs[ql];yl.buffer?(Gt.enableVertexAttribArray(ql),yl.buffer.bind(),Gt.vertexAttribPointer(ql,yl.size,yl.type,yl.normalized,yl.stride,yl.offfset),Ho&&yl.divisor&&Ho.vertexAttribDivisorANGLE(ql,yl.divisor)):(Gt.disableVertexAttribArray(ql),Gt.vertexAttrib4f(ql,yl.x,yl.y,yl.z,yl.w))}ha.elements?Gt.bindBuffer(Na,ha.elements.buffer.buffer):Gt.bindBuffer(Na,null)}Ps.currentVAO=hs}}function Qo(){De(su).forEach(function(hs){hs.destroy()})}function bl(){this.id=++is,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var hs=Do();hs?this.vao=hs.createVertexArrayOES():this.vao=null,su[this.id]=this,this.buffers=[]}bl.prototype.bindAttrs=function(){for(var hs=kn(),Ho=this.attributes,ql=0;ql<Ho.length;++ql){var yl=Ho[ql];yl.buffer?(Gt.enableVertexAttribArray(ql),Gt.bindBuffer($o,yl.buffer.buffer),Gt.vertexAttribPointer(ql,yl.size,yl.type,yl.normalized,yl.stride,yl.offset),hs&&yl.divisor&&hs.vertexAttribDivisorANGLE(ql,yl.divisor)):(Gt.disableVertexAttribArray(ql),Gt.vertexAttrib4f(ql,yl.x,yl.y,yl.z,yl.w))}for(var tl=Ho.length;tl<Io;++tl)Gt.disableVertexAttribArray(tl);var js=fa.getElements(this.elements);js?Gt.bindBuffer(Na,js.buffer.buffer):Gt.bindBuffer(Na,null)},bl.prototype.refresh=function(){var hs=Do();hs&&(hs.bindVertexArrayOES(this.vao),this.bindAttrs(),Ps.currentVAO=null,hs.bindVertexArrayOES(null))},bl.prototype.destroy=function(){if(this.vao){var hs=Do();this===Ps.currentVAO&&(Ps.currentVAO=null,hs.bindVertexArrayOES(null)),hs.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),su[this.id]&&(delete su[this.id],Mn.vaoCount-=1)};function nl(){var hs=Do();hs&&De(su).forEach(function(Ho){Ho.refresh()})}function ru(hs){var Ho=new bl;Mn.vaoCount+=1;function ql(yl){var tl;if(Array.isArray(yl))tl=yl,Ho.elements&&Ho.ownsElements&&Ho.elements.destroy(),Ho.elements=null,Ho.ownsElements=!1,Ho.offset=0,Ho.count=0,Ho.instances=-1,Ho.primitive=4;else{if(yl.elements){var js=yl.elements;Ho.ownsElements?typeof js=="function"&&js._reglType==="elements"?(Ho.elements.destroy(),Ho.ownsElements=!1):(Ho.elements(js),Ho.ownsElements=!1):fa.getElements(yl.elements)?(Ho.elements=yl.elements,Ho.ownsElements=!1):(Ho.elements=fa.create(yl.elements),Ho.ownsElements=!0)}else Ho.elements=null,Ho.ownsElements=!1;tl=yl.attributes,Ho.offset=0,Ho.count=-1,Ho.instances=-1,Ho.primitive=4,Ho.elements&&(Ho.count=Ho.elements._elements.vertCount,Ho.primitive=Ho.elements._elements.primType),"offset"in yl&&(Ho.offset=yl.offset|0),"count"in yl&&(Ho.count=yl.count|0),"instances"in yl&&(Ho.instances=yl.instances|0),"primitive"in yl&&(Ho.primitive=Yr[yl.primitive])}var zl={},lu=Ho.attributes;lu.length=tl.length;for(var bu=0;bu<tl.length;++bu){var al=tl[bu],jl=lu[bu]=new Ua,mu=al.data||al;if(Array.isArray(mu)||fr(mu)||Ot(mu)){var Tu;Ho.buffers[bu]&&(Tu=Ho.buffers[bu],fr(mu)&&Tu._buffer.byteLength>=mu.byteLength?Tu.subdata(mu):(Tu.destroy(),Ho.buffers[bu]=null)),Ho.buffers[bu]||(Tu=Ho.buffers[bu]=Ta.create(al,$o,!1,!0)),jl.buffer=Ta.getBuffer(Tu),jl.size=jl.buffer.dimension|0,jl.normalized=!1,jl.type=jl.buffer.dtype,jl.offset=0,jl.stride=0,jl.divisor=0,jl.state=1,zl[bu]=1}else Ta.getBuffer(al)?(jl.buffer=Ta.getBuffer(al),jl.size=jl.buffer.dimension|0,jl.normalized=!1,jl.type=jl.buffer.dtype,jl.offset=0,jl.stride=0,jl.divisor=0,jl.state=1):Ta.getBuffer(al.buffer)?(jl.buffer=Ta.getBuffer(al.buffer),jl.size=(+al.size||jl.buffer.dimension)|0,jl.normalized=!!al.normalized||!1,"type"in al?jl.type=si[al.type]:jl.type=jl.buffer.dtype,jl.offset=(al.offset||0)|0,jl.stride=(al.stride||0)|0,jl.divisor=(al.divisor||0)|0,jl.state=1):"x"in al&&(jl.x=+al.x||0,jl.y=+al.y||0,jl.z=+al.z||0,jl.w=+al.w||0,jl.state=2)}for(var Ru=0;Ru<Ho.buffers.length;++Ru)!zl[Ru]&&Ho.buffers[Ru]&&(Ho.buffers[Ru].destroy(),Ho.buffers[Ru]=null);return Ho.refresh(),ql}return ql.destroy=function(){for(var yl=0;yl<Ho.buffers.length;++yl)Ho.buffers[yl]&&Ho.buffers[yl].destroy();Ho.buffers.length=0,Ho.ownsElements&&(Ho.elements.destroy(),Ho.elements=null,Ho.ownsElements=!1),Ho.destroy()},ql._vao=Ho,ql._reglType="vao",ql(hs)}return Ps}var fo=35632,ro=35633,Ma=35718,io=35721;function aa(Gt,jr,_i,Mn){var Ta={},fa={};function ha(kn,La,Es,Ws){this.name=kn,this.id=La,this.location=Es,this.info=Ws}function Io(kn,La){for(var Es=0;Es<kn.length;++Es)if(kn[Es].id===La.id){kn[Es].location=La.location;return}kn.push(La)}function Vs(kn,La,Es){var Ws=kn===fo?Ta:fa,Qo=Ws[La];if(!Qo){var bl=jr.str(La);Qo=Gt.createShader(kn),Gt.shaderSource(Qo,bl),Gt.compileShader(Qo),Ws[La]=Qo}return Qo}var Hs={},is=[],su=0;function Ps(kn,La){this.id=su++,this.fragId=kn,this.vertId=La,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Mn.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function qs(kn,La,Es){var Ws,Qo,bl=Vs(fo,kn.fragId),nl=Vs(ro,kn.vertId),ru=kn.program=Gt.createProgram();if(Gt.attachShader(ru,bl),Gt.attachShader(ru,nl),Es)for(Ws=0;Ws<Es.length;++Ws){var hs=Es[Ws];Gt.bindAttribLocation(ru,hs[0],hs[1])}Gt.linkProgram(ru);var Ho=Gt.getProgramParameter(ru,Ma);Mn.profile&&(kn.stats.uniformsCount=Ho);var ql=kn.uniforms;for(Ws=0;Ws<Ho;++Ws)if(Qo=Gt.getActiveUniform(ru,Ws),Qo)if(Qo.size>1)for(var yl=0;yl<Qo.size;++yl){var tl=Qo.name.replace("[0]","["+yl+"]");Io(ql,new ha(tl,jr.id(tl),Gt.getUniformLocation(ru,tl),Qo))}else Io(ql,new ha(Qo.name,jr.id(Qo.name),Gt.getUniformLocation(ru,Qo.name),Qo));var js=Gt.getProgramParameter(ru,io);Mn.profile&&(kn.stats.attributesCount=js);var zl=kn.attributes;for(Ws=0;Ws<js;++Ws)Qo=Gt.getActiveAttrib(ru,Ws),Qo&&Io(zl,new ha(Qo.name,jr.id(Qo.name),Gt.getAttribLocation(ru,Qo.name),Qo))}Mn.profile&&(_i.getMaxUniformsCount=function(){var kn=0;return is.forEach(function(La){La.stats.uniformsCount>kn&&(kn=La.stats.uniformsCount)}),kn},_i.getMaxAttributesCount=function(){var kn=0;return is.forEach(function(La){La.stats.attributesCount>kn&&(kn=La.stats.attributesCount)}),kn});function Do(){Ta={},fa={};for(var kn=0;kn<is.length;++kn)qs(is[kn],null,is[kn].attributes.map(function(La){return[La.location,La.name]}))}return{clear:function(){var kn=Gt.deleteShader.bind(Gt);De(Ta).forEach(kn),Ta={},De(fa).forEach(kn),fa={},is.forEach(function(La){Gt.deleteProgram(La.program)}),is.length=0,Hs={},_i.shaderCount=0},program:function(kn,La,Es,Ws){var Qo=Hs[La];Qo||(Qo=Hs[La]={});var bl=Qo[kn];if(bl&&(bl.refCount++,!Ws))return bl;var nl=new Ps(La,kn);return _i.shaderCount++,qs(nl,Es,Ws),bl||(Qo[kn]=nl),is.push(nl),e(nl,{destroy:function(){if(nl.refCount--,nl.refCount<=0){Gt.deleteProgram(nl.program);var ru=is.indexOf(nl);is.splice(ru,1),_i.shaderCount--}Qo[nl.vertId].refCount<=0&&(Gt.deleteShader(fa[nl.vertId]),delete fa[nl.vertId],delete Hs[nl.fragId][nl.vertId]),Object.keys(Hs[nl.fragId]).length||(Gt.deleteShader(Ta[nl.fragId]),delete Ta[nl.fragId],delete Hs[nl.fragId])}})},restore:Do,shader:Vs,frag:-1,vert:-1}}var Oo=6408,No=5121,Zs=3333,Fs=5126;function ws(Gt,jr,_i,Mn,Ta,fa,ha){function Io(is){var su;jr.next===null?su=No:su=jr.next.colorAttachments[0].texture._texture.type;var Ps=0,qs=0,Do=Mn.framebufferWidth,kn=Mn.framebufferHeight,La=null;fr(is)?La=is:is&&(Ps=is.x|0,qs=is.y|0,Do=(is.width||Mn.framebufferWidth-Ps)|0,kn=(is.height||Mn.framebufferHeight-qs)|0,La=is.data||null),_i();var Es=Do*kn*4;return La||(su===No?La=new Uint8Array(Es):su===Fs&&(La=La||new Float32Array(Es))),Gt.pixelStorei(Zs,4),Gt.readPixels(Ps,qs,Do,kn,Oo,su,La),La}function Vs(is){var su;return jr.setFBO({framebuffer:is.framebuffer},function(){su=Io(is)}),su}function Hs(is){return!is||!("framebuffer"in is)?Io(is):Vs(is)}return Hs}var no=0,Ls="";function ds(Gt){return Yo(Xs(ls(Gt)))}function Xs(Gt){return bt(wi(gs(Gt),Gt.length*8))}function oa(Gt,jr){var _i=gs(Gt);_i.length>16&&(_i=wi(_i,Gt.length*8));for(var Mn=Array(16),Ta=Array(16),fa=0;fa<16;fa++)Mn[fa]=_i[fa]^909522486,Ta[fa]=_i[fa]^1549556828;var ha=wi(Mn.concat(gs(jr)),512+jr.length*8);return bt(wi(Ta.concat(ha),768))}function Yo(Gt){for(var jr=no?"0123456789ABCDEF":"0123456789abcdef",_i="",Mn,Ta=0;Ta<Gt.length;Ta++)Mn=Gt.charCodeAt(Ta),_i+=jr.charAt(Mn>>>4&15)+jr.charAt(Mn&15);return _i}function po(Gt){for(var jr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_i="",Mn=Gt.length,Ta=0;Ta<Mn;Ta+=3)for(var fa=Gt.charCodeAt(Ta)<<16|(Ta+1<Mn?Gt.charCodeAt(Ta+1)<<8:0)|(Ta+2<Mn?Gt.charCodeAt(Ta+2):0),ha=0;ha<4;ha++)Ta*8+ha*6>Gt.length*8?_i+=Ls:_i+=jr.charAt(fa>>>6*(3-ha)&63);return _i}function ss(Gt,jr){var _i=jr.length,Mn=Array(),Ta,fa,ha,Io,Vs=Array(Math.ceil(Gt.length/2));for(Ta=0;Ta<Vs.length;Ta++)Vs[Ta]=Gt.charCodeAt(Ta*2)<<8|Gt.charCodeAt(Ta*2+1);for(;Vs.length>0;){for(Io=Array(),ha=0,Ta=0;Ta<Vs.length;Ta++)ha=(ha<<16)+Vs[Ta],fa=Math.floor(ha/_i),ha-=fa*_i,(Io.length>0||fa>0)&&(Io[Io.length]=fa);Mn[Mn.length]=ha,Vs=Io}var Hs="";for(Ta=Mn.length-1;Ta>=0;Ta--)Hs+=jr.charAt(Mn[Ta]);var is=Math.ceil(Gt.length*8/(Math.log(jr.length)/Math.log(2)));for(Ta=Hs.length;Ta<is;Ta++)Hs=jr[0]+Hs;return Hs}function ls(Gt){for(var jr="",_i=-1,Mn,Ta;++_i<Gt.length;)Mn=Gt.charCodeAt(_i),Ta=_i+1<Gt.length?Gt.charCodeAt(_i+1):0,55296<=Mn&&Mn<=56319&&56320<=Ta&&Ta<=57343&&(Mn=65536+((Mn&1023)<<10)+(Ta&1023),_i++),Mn<=127?jr+=String.fromCharCode(Mn):Mn<=2047?jr+=String.fromCharCode(192|Mn>>>6&31,128|Mn&63):Mn<=65535?jr+=String.fromCharCode(224|Mn>>>12&15,128|Mn>>>6&63,128|Mn&63):Mn<=2097151&&(jr+=String.fromCharCode(240|Mn>>>18&7,128|Mn>>>12&63,128|Mn>>>6&63,128|Mn&63));return jr}function gs(Gt){for(var jr=Array(Gt.length>>2),_i=0;_i<jr.length;_i++)jr[_i]=0;for(var _i=0;_i<Gt.length*8;_i+=8)jr[_i>>5]|=(Gt.charCodeAt(_i/8)&255)<<24-_i%32;return jr}function bt(Gt){for(var jr="",_i=0;_i<Gt.length*32;_i+=8)jr+=String.fromCharCode(Gt[_i>>5]>>>24-_i%32&255);return jr}function Ft(Gt,jr){return Gt>>>jr|Gt<<32-jr}function hr(Gt,jr){return Gt>>>jr}function nr(Gt,jr,_i){return Gt&jr^~Gt&_i}function Sr(Gt,jr,_i){return Gt&jr^Gt&_i^jr&_i}function li(Gt){return Ft(Gt,2)^Ft(Gt,13)^Ft(Gt,22)}function di(Gt){return Ft(Gt,6)^Ft(Gt,11)^Ft(Gt,25)}function mi(Gt){return Ft(Gt,7)^Ft(Gt,18)^hr(Gt,3)}function Oi(Gt){return Ft(Gt,17)^Ft(Gt,19)^hr(Gt,10)}var dn=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 wi(Gt,jr){var _i=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Mn=new Array(64),Ta,fa,ha,Io,Vs,Hs,is,su,Ps,qs,Do,kn;for(Gt[jr>>5]|=128<<24-jr%32,Gt[(jr+64>>9<<4)+15]=jr,Ps=0;Ps<Gt.length;Ps+=16){for(Ta=_i[0],fa=_i[1],ha=_i[2],Io=_i[3],Vs=_i[4],Hs=_i[5],is=_i[6],su=_i[7],qs=0;qs<64;qs++)qs<16?Mn[qs]=Gt[qs+Ps]:Mn[qs]=ui(ui(ui(Oi(Mn[qs-2]),Mn[qs-7]),mi(Mn[qs-15])),Mn[qs-16]),Do=ui(ui(ui(ui(su,di(Vs)),nr(Vs,Hs,is)),dn[qs]),Mn[qs]),kn=ui(li(Ta),Sr(Ta,fa,ha)),su=is,is=Hs,Hs=Vs,Vs=ui(Io,Do),Io=ha,ha=fa,fa=Ta,Ta=ui(Do,kn);_i[0]=ui(Ta,_i[0]),_i[1]=ui(fa,_i[1]),_i[2]=ui(ha,_i[2]),_i[3]=ui(Io,_i[3]),_i[4]=ui(Vs,_i[4]),_i[5]=ui(Hs,_i[5]),_i[6]=ui(is,_i[6]),_i[7]=ui(su,_i[7])}return _i}function ui(Gt,jr){var _i=(Gt&65535)+(jr&65535),Mn=(Gt>>16)+(jr>>16)+(_i>>16);return Mn<<16|_i&65535}function Ai(Gt){return Array.prototype.slice.call(Gt)}function gi(Gt){return Ai(Gt).join("")}function gn(Gt){var jr=Gt&&Gt.cache,_i=0,Mn=[],Ta=[],fa=[];function ha(Do,kn){var La=kn&&kn.stable;if(!La){for(var Es=0;Es<Ta.length;++Es)if(Ta[Es]===Do&&!fa[Es])return Mn[Es]}var Ws="g"+_i++;return Mn.push(Ws),Ta.push(Do),fa.push(La),Ws}function Io(){var Do=[];function kn(){Do.push.apply(Do,Ai(arguments))}var La=[];function Es(){var Ws="v"+_i++;return La.push(Ws),arguments.length>0&&(Do.push(Ws,"="),Do.push.apply(Do,Ai(arguments)),Do.push(";")),Ws}return e(kn,{def:Es,toString:function(){return gi([La.length>0?"var "+La.join(",")+";":"",gi(Do)])}})}function Vs(){var Do=Io(),kn=Io(),La=Do.toString,Es=kn.toString;function Ws(Qo,bl){kn(Qo,bl,"=",Do.def(Qo,bl),";")}return e(function(){Do.apply(Do,Ai(arguments))},{def:Do.def,entry:Do,exit:kn,save:Ws,set:function(Qo,bl,nl){Ws(Qo,bl),Do(Qo,bl,"=",nl,";")},toString:function(){return La()+Es()}})}function Hs(){var Do=gi(arguments),kn=Vs(),La=Vs(),Es=kn.toString,Ws=La.toString;return e(kn,{then:function(){return kn.apply(kn,Ai(arguments)),this},else:function(){return La.apply(La,Ai(arguments)),this},toString:function(){var Qo=Ws();return Qo&&(Qo="else{"+Qo+"}"),gi(["if(",Do,"){",Es(),"}",Qo])}})}var is=Io(),su={};function Ps(Do,kn){var La=[];function Es(){var ru="a"+La.length;return La.push(ru),ru}kn=kn||0;for(var Ws=0;Ws<kn;++Ws)Es();var Qo=Vs(),bl=Qo.toString,nl=su[Do]=e(Qo,{arg:Es,toString:function(){return gi(["function(",La.join(),"){",bl(),"}"])}});return nl}function qs(){var Do=['"use strict";',is,"return {"];Object.keys(su).forEach(function(Ws){Do.push('"',Ws,'":',su[Ws].toString(),",")}),Do.push("}");var kn=gi(Do).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),La;if(jr&&(La=ds(kn),jr[La]))return jr[La].apply(null,Ta);var Es=Function.apply(null,Mn.concat(kn));return jr&&(jr[La]=Es),Es.apply(null,Ta)}return{global:is,link:ha,block:Io,proc:Ps,scope:Vs,cond:Hs,compile:qs}}var In="xyzw".split(""),Vn=5121,Rn=1,Hn=2,Gn=0,pn=1,Lo=2,us=3,Bs=4,Js=5,ol=6,Cl="dither",ul="blend.enable",Gl="blend.color",Vl="blend.equation",Fl="blend.func",ga="depth.enable",ko="depth.func",zs="depth.range",Fo="depth.mask",Ys="colorMask",Gs="cull.enable",Us="cull.face",Sl="frontFace",_l="lineWidth",kl="polygonOffset.enable",cl="polygonOffset.offset",xl="sample.alpha",Uo="sample.enable",_s="sample.coverage",Bl="stencil.enable",Il="stencil.mask",Dl="stencil.func",oe="stencil.opFront",w="stencil.opBack",B="scissor.enable",Q="scissor.box",ee="viewport",le="profile",Ne="framebuffer",$e="vert",pt="frag",zt="elements",Yt="primitive",Jt="count",yr="offset",Ir="instances",ce="vao",Ae="Width",qe="Height",Ve=Ne+Ae,ot=Ne+qe,Ke=ee+Ae,ft=ee+qe,qt="drawingBuffer",Xt=qt+Ae,$t=qt+qe,dr=[Fl,Vl,Dl,oe,w,_s,ee,Q,cl],Mr=34962,$r=34963,ii=2884,pi=3042,Yi=3024,wn=2960,Tn=2929,ua=3089,oo=32823,el=32926,ys=32928,il=5126,$l=35664,pl=35665,Hl=35666,Ll=5124,Ql=35667,ku=35668,Jl=35669,Kl=35670,Hu=35671,tf=35672,Ku=35673,Gu=35674,Wu=35675,sf=35676,gf=35678,nf=35680,af=4,X=1028,se=1029,Le=2304,We=2305,Ye=32775,it=32776,Nt=519,mt=7680,er=0,_r=1,wr=32774,ni=513,Wr=36160,Ci=36064,Ji={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},ai={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},Ti={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Bi={cw:Le,ccw:We};function en(Gt){return Array.isArray(Gt)||fr(Gt)||Ot(Gt)}function Wi(Gt){return Gt.sort(function(jr,_i){return jr===ee?-1:_i===ee?1:jr<_i?-1:1})}function bi(Gt,jr,_i,Mn){this.thisDep=Gt,this.contextDep=jr,this.propDep=_i,this.append=Mn}function ao(Gt){return Gt&&!(Gt.thisDep||Gt.contextDep||Gt.propDep)}function yo(Gt){return new bi(!1,!1,!1,Gt)}function Ko(Gt,jr){var _i=Gt.type;if(_i===Gn){var Mn=Gt.data.length;return new bi(!0,Mn>=1,Mn>=2,jr)}else if(_i===Bs){var Ta=Gt.data;return new bi(Ta.thisDep,Ta.contextDep,Ta.propDep,jr)}else{if(_i===Js)return new bi(!1,!1,!1,jr);if(_i===ol){for(var fa=!1,ha=!1,Io=!1,Vs=0;Vs<Gt.data.length;++Vs){var Hs=Gt.data[Vs];if(Hs.type===pn)Io=!0;else if(Hs.type===Lo)ha=!0;else if(Hs.type===us)fa=!0;else if(Hs.type===Gn){fa=!0;var is=Hs.data;is>=1&&(ha=!0),is>=2&&(Io=!0)}else Hs.type===Bs&&(fa=fa||Hs.data.thisDep,ha=ha||Hs.data.contextDep,Io=Io||Hs.data.propDep)}return new bi(fa,ha,Io,jr)}else return new bi(_i===us,_i===Lo,_i===pn,jr)}}var Ms=new bi(!1,!1,!1,function(){});function vl(Gt,jr,_i,Mn,Ta,fa,ha,Io,Vs,Hs,is,su,Ps,qs,Do,kn){var La=Hs.Record,Es={add:32774,subtract:32778,"reverse subtract":32779};_i.ext_blend_minmax&&(Es.min=Ye,Es.max=it);var Ws=_i.angle_instanced_arrays,Qo=_i.webgl_draw_buffers,bl=_i.oes_vertex_array_object,nl={dirty:!0,profile:kn.profile},ru={},hs=[],Ho={},ql={};function yl(It){return It.replace(".","_")}function tl(It,Qt,ar){var mr=yl(It);hs.push(It),ru[mr]=nl[mr]=!!ar,Ho[mr]=Qt}function js(It,Qt,ar){var mr=yl(It);hs.push(It),Array.isArray(ar)?(nl[mr]=ar.slice(),ru[mr]=ar.slice()):nl[mr]=ru[mr]=ar,ql[mr]=Qt}function zl(It){return!!isNaN(It)}tl(Cl,Yi),tl(ul,pi),js(Gl,"blendColor",[0,0,0,0]),js(Vl,"blendEquationSeparate",[wr,wr]),js(Fl,"blendFuncSeparate",[_r,er,_r,er]),tl(ga,Tn,!0),js(ko,"depthFunc",ni),js(zs,"depthRange",[0,1]),js(Fo,"depthMask",!0),js(Ys,Ys,[!0,!0,!0,!0]),tl(Gs,ii),js(Us,"cullFace",se),js(Sl,Sl,We),js(_l,_l,1),tl(kl,oo),js(cl,"polygonOffset",[0,0]),tl(xl,el),tl(Uo,ys),js(_s,"sampleCoverage",[1,!1]),tl(Bl,wn),js(Il,"stencilMask",-1),js(Dl,"stencilFunc",[Nt,0,-1]),js(oe,"stencilOpSeparate",[X,mt,mt,mt]),js(w,"stencilOpSeparate",[se,mt,mt,mt]),tl(B,ua),js(Q,"scissor",[0,0,Gt.drawingBufferWidth,Gt.drawingBufferHeight]),js(ee,ee,[0,0,Gt.drawingBufferWidth,Gt.drawingBufferHeight]);var lu={gl:Gt,context:Ps,strings:jr,next:ru,current:nl,draw:su,elements:fa,buffer:Ta,shader:is,attributes:Hs.state,vao:Hs,uniforms:Vs,framebuffer:Io,extensions:_i,timer:qs,isBufferArgs:en},bu={primTypes:Yr,compareFuncs:ai,blendFuncs:Ji,blendEquations:Es,stencilOps:Ti,glTypes:si,orientationType:Bi};Qo&&(bu.backBuffer=[se],bu.drawBuffer=M(Mn.maxDrawbuffers,function(It){return It===0?[0]:M(It,function(Qt){return Ci+Qt})}));var al=0;function jl(){var It=gn({cache:Do}),Qt=It.link,ar=It.global;It.id=al++,It.batchId="0";var mr=Qt(lu),Pr=It.shared={props:"a0"};Object.keys(lu).forEach(function(Kr){Pr[Kr]=ar.def(mr,".",Kr)});var Dr=It.next={},Xr=It.current={};Object.keys(ql).forEach(function(Kr){Array.isArray(nl[Kr])&&(Dr[Kr]=ar.def(Pr.next,".",Kr),Xr[Kr]=ar.def(Pr.current,".",Kr))});var Gr=It.constants={};Object.keys(bu).forEach(function(Kr){Gr[Kr]=ar.def(JSON.stringify(bu[Kr]))}),It.invoke=function(Kr,Cr){switch(Cr.type){case Gn:var yi=["this",Pr.context,Pr.props,It.batchId];return Kr.def(Qt(Cr.data),".call(",yi.slice(0,Math.max(Cr.data.length+1,4)),")");case pn:return Kr.def(Pr.props,Cr.data);case Lo:return Kr.def(Pr.context,Cr.data);case us:return Kr.def("this",Cr.data);case Bs:return Cr.data.append(It,Kr),Cr.data.ref;case Js:return Cr.data.toString();case ol:return Cr.data.map(function(qi){return It.invoke(Kr,qi)})}},It.attribCache={};var Fr={};return It.scopeAttrib=function(Kr){var Cr=jr.id(Kr);if(Cr in Fr)return Fr[Cr];var yi=Hs.scope[Cr];yi||(yi=Hs.scope[Cr]=new La);var qi=Fr[Cr]=Qt(yi);return qi},It}function mu(It){var Qt=It.static,ar=It.dynamic,mr;if(le in Qt){var Pr=!!Qt[le];mr=yo(function(Xr,Gr){return Pr}),mr.enable=Pr}else if(le in ar){var Dr=ar[le];mr=Ko(Dr,function(Xr,Gr){return Xr.invoke(Gr,Dr)})}return mr}function Tu(It,Qt){var ar=It.static,mr=It.dynamic;if(Ne in ar){var Pr=ar[Ne];return Pr?(Pr=Io.getFramebuffer(Pr),yo(function(Xr,Gr){var Fr=Xr.link(Pr),Kr=Xr.shared;Gr.set(Kr.framebuffer,".next",Fr);var Cr=Kr.context;return Gr.set(Cr,"."+Ve,Fr+".width"),Gr.set(Cr,"."+ot,Fr+".height"),Fr})):yo(function(Xr,Gr){var Fr=Xr.shared;Gr.set(Fr.framebuffer,".next","null");var Kr=Fr.context;return Gr.set(Kr,"."+Ve,Kr+"."+Xt),Gr.set(Kr,"."+ot,Kr+"."+$t),"null"})}else if(Ne in mr){var Dr=mr[Ne];return Ko(Dr,function(Xr,Gr){var Fr=Xr.invoke(Gr,Dr),Kr=Xr.shared,Cr=Kr.framebuffer,yi=Gr.def(Cr,".getFramebuffer(",Fr,")");Gr.set(Cr,".next",yi);var qi=Kr.context;return Gr.set(qi,"."+Ve,yi+"?"+yi+".width:"+qi+"."+Xt),Gr.set(qi,"."+ot,yi+"?"+yi+".height:"+qi+"."+$t),yi})}else return null}function Ru(It,Qt,ar){var mr=It.static,Pr=It.dynamic;function Dr(Fr){if(Fr in mr){var Kr=mr[Fr],Cr=!0,yi=Kr.x|0,qi=Kr.y|0,vn,Qa;return"width"in Kr?vn=Kr.width|0:Cr=!1,"height"in Kr?Qa=Kr.height|0:Cr=!1,new bi(!Cr&&Qt&&Qt.thisDep,!Cr&&Qt&&Qt.contextDep,!Cr&&Qt&&Qt.propDep,function(sl,Os){var eo=sl.shared.context,fs=vn;"width"in Kr||(fs=Os.def(eo,".",Ve,"-",yi));var es=Qa;return"height"in Kr||(es=Os.def(eo,".",ot,"-",qi)),[yi,qi,fs,es]})}else if(Fr in Pr){var ra=Pr[Fr],mo=Ko(ra,function(sl,Os){var eo=sl.invoke(Os,ra),fs=sl.shared.context,es=Os.def(eo,".x|0"),$s=Os.def(eo,".y|0"),Ml=Os.def('"width" in ',eo,"?",eo,".width|0:","(",fs,".",Ve,"-",es,")"),Mu=Os.def('"height" in ',eo,"?",eo,".height|0:","(",fs,".",ot,"-",$s,")");return[es,$s,Ml,Mu]});return Qt&&(mo.thisDep=mo.thisDep||Qt.thisDep,mo.contextDep=mo.contextDep||Qt.contextDep,mo.propDep=mo.propDep||Qt.propDep),mo}else return Qt?new bi(Qt.thisDep,Qt.contextDep,Qt.propDep,function(sl,Os){var eo=sl.shared.context;return[0,0,Os.def(eo,".",Ve),Os.def(eo,".",ot)]}):null}var Xr=Dr(ee);if(Xr){var Gr=Xr;Xr=new bi(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Fr,Kr){var Cr=Gr.append(Fr,Kr),yi=Fr.shared.context;return Kr.set(yi,"."+Ke,Cr[2]),Kr.set(yi,"."+ft,Cr[3]),Cr})}return{viewport:Xr,scissor_box:Dr(Q)}}function Rf(It,Qt){var ar=It.static,mr=typeof ar[pt]=="string"&&typeof ar[$e]=="string";if(mr){if(Object.keys(Qt.dynamic).length>0)return null;var Pr=Qt.static,Dr=Object.keys(Pr);if(Dr.length>0&&typeof Pr[Dr[0]]=="number"){for(var Xr=[],Gr=0;Gr<Dr.length;++Gr)Xr.push([Pr[Dr[Gr]]|0,Dr[Gr]]);return Xr}}return null}function Cc(It,Qt,ar){var mr=It.static,Pr=It.dynamic;function Dr(Cr){if(Cr in mr){var yi=jr.id(mr[Cr]),qi=yo(function(){return yi});return qi.id=yi,qi}else if(Cr in Pr){var vn=Pr[Cr];return Ko(vn,function(Qa,ra){var mo=Qa.invoke(ra,vn),sl=ra.def(Qa.shared.strings,".id(",mo,")");return sl})}return null}var Xr=Dr(pt),Gr=Dr($e),Fr=null,Kr;return ao(Xr)&&ao(Gr)?(Fr=is.program(Gr.id,Xr.id,null,ar),Kr=yo(function(Cr,yi){return Cr.link(Fr)})):Kr=new bi(Xr&&Xr.thisDep||Gr&&Gr.thisDep,Xr&&Xr.contextDep||Gr&&Gr.contextDep,Xr&&Xr.propDep||Gr&&Gr.propDep,function(Cr,yi){var qi=Cr.shared.shader,vn;Xr?vn=Xr.append(Cr,yi):vn=yi.def(qi,".",pt);var Qa;Gr?Qa=Gr.append(Cr,yi):Qa=yi.def(qi,".",$e);var ra=qi+".program("+Qa+","+vn;return yi.def(ra+")")}),{frag:Xr,vert:Gr,progVar:Kr,program:Fr}}function rf(It,Qt){var ar=It.static,mr=It.dynamic,Pr={},Dr=!1;function Xr(){if(ce in ar){var Os=ar[ce];return Os!==null&&Hs.getVAO(Os)===null&&(Os=Hs.createVAO(Os)),Dr=!0,Pr.vao=Os,yo(function(fs){var es=Hs.getVAO(Os);return es?fs.link(es):"null"})}else if(ce in mr){Dr=!0;var eo=mr[ce];return Ko(eo,function(fs,es){var $s=fs.invoke(es,eo);return es.def(fs.shared.vao+".getVAO("+$s+")")})}return null}var Gr=Xr(),Fr=!1;function Kr(){if(zt in ar){var Os=ar[zt];if(Pr.elements=Os,en(Os)){var eo=Pr.elements=fa.create(Os,!0);Os=fa.getElements(eo),Fr=!0}else Os&&(Os=fa.getElements(Os),Fr=!0);var fs=yo(function($s,Ml){if(Os){var Mu=$s.link(Os);return $s.ELEMENTS=Mu,Mu}return $s.ELEMENTS=null,null});return fs.value=Os,fs}else if(zt in mr){Fr=!0;var es=mr[zt];return Ko(es,function($s,Ml){var Mu=$s.shared,Au=Mu.isBufferArgs,$u=Mu.elements,du=$s.invoke(Ml,es),Nu=Ml.def("null"),yf=Ml.def(Au,"(",du,")"),Kf=$s.cond(yf).then(Nu,"=",$u,".createStream(",du,");").else(Nu,"=",$u,".getElements(",du,");");return Ml.entry(Kf),Ml.exit($s.cond(yf).then($u,".destroyStream(",Nu,");")),$s.ELEMENTS=Nu,Nu})}else if(Dr)return new bi(Gr.thisDep,Gr.contextDep,Gr.propDep,function($s,Ml){return Ml.def($s.shared.vao+".currentVAO?"+$s.shared.elements+".getElements("+$s.shared.vao+".currentVAO.elements):null")});return null}var Cr=Kr();function yi(){if(Yt in ar){var Os=ar[Yt];return Pr.primitive=Os,yo(function(fs,es){return Yr[Os]})}else if(Yt in mr){var eo=mr[Yt];return Ko(eo,function(fs,es){var $s=fs.constants.primTypes,Ml=fs.invoke(es,eo);return es.def($s,"[",Ml,"]")})}else{if(Fr)return ao(Cr)?Cr.value?yo(function(fs,es){return es.def(fs.ELEMENTS,".primType")}):yo(function(){return af}):new bi(Cr.thisDep,Cr.contextDep,Cr.propDep,function(fs,es){var $s=fs.ELEMENTS;return es.def($s,"?",$s,".primType:",af)});if(Dr)return new bi(Gr.thisDep,Gr.contextDep,Gr.propDep,function(fs,es){return es.def(fs.shared.vao+".currentVAO?"+fs.shared.vao+".currentVAO.primitive:"+af)})}return null}function qi(Os,eo){if(Os in ar){var fs=ar[Os]|0;return eo?Pr.offset=fs:Pr.instances=fs,yo(function($s,Ml){return eo&&($s.OFFSET=fs),fs})}else if(Os in mr){var es=mr[Os];return Ko(es,function($s,Ml){var Mu=$s.invoke(Ml,es);return eo&&($s.OFFSET=Mu),Mu})}else if(eo){if(Fr)return yo(function($s,Ml){return $s.OFFSET=0,0});if(Dr)return new bi(Gr.thisDep,Gr.contextDep,Gr.propDep,function($s,Ml){return Ml.def($s.shared.vao+".currentVAO?"+$s.shared.vao+".currentVAO.offset:0")})}else if(Dr)return new bi(Gr.thisDep,Gr.contextDep,Gr.propDep,function($s,Ml){return Ml.def($s.shared.vao+".currentVAO?"+$s.shared.vao+".currentVAO.instances:-1")});return null}var vn=qi(yr,!0);function Qa(){if(Jt in ar){var Os=ar[Jt]|0;return Pr.count=Os,yo(function(){return Os})}else if(Jt in mr){var eo=mr[Jt];return Ko(eo,function(Ml,Mu){var Au=Ml.invoke(Mu,eo);return Au})}else if(Fr)if(ao(Cr)){if(Cr)return vn?new bi(vn.thisDep,vn.contextDep,vn.propDep,function(Ml,Mu){var Au=Mu.def(Ml.ELEMENTS,".vertCount-",Ml.OFFSET);return Au}):yo(function(Ml,Mu){return Mu.def(Ml.ELEMENTS,".vertCount")});var fs=yo(function(){return-1});return fs}else{var es=new bi(Cr.thisDep||vn.thisDep,Cr.contextDep||vn.contextDep,Cr.propDep||vn.propDep,function(Ml,Mu){var Au=Ml.ELEMENTS;return Ml.OFFSET?Mu.def(Au,"?",Au,".vertCount-",Ml.OFFSET,":-1"):Mu.def(Au,"?",Au,".vertCount:-1")});return es}else if(Dr){var $s=new bi(Gr.thisDep,Gr.contextDep,Gr.propDep,function(Ml,Mu){return Mu.def(Ml.shared.vao,".currentVAO?",Ml.shared.vao,".currentVAO.count:-1")});return $s}return null}var ra=yi(),mo=Qa(),sl=qi(Ir,!1);return{elements:Cr,primitive:ra,count:mo,instances:sl,offset:vn,vao:Gr,vaoActive:Dr,elementsActive:Fr,static:Pr}}function Lc(It,Qt){var ar=It.static,mr=It.dynamic,Pr={};return hs.forEach(function(Dr){var Xr=yl(Dr);function Gr(Fr,Kr){if(Dr in ar){var Cr=Fr(ar[Dr]);Pr[Xr]=yo(function(){return Cr})}else if(Dr in mr){var yi=mr[Dr];Pr[Xr]=Ko(yi,function(qi,vn){return Kr(qi,vn,qi.invoke(vn,yi))})}}switch(Dr){case Gs:case ul:case Cl:case Bl:case ga:case B:case kl:case xl:case Uo:case Fo:return Gr(function(Fr){return Fr},function(Fr,Kr,Cr){return Cr});case ko:return Gr(function(Fr){return ai[Fr]},function(Fr,Kr,Cr){var yi=Fr.constants.compareFuncs;return Kr.def(yi,"[",Cr,"]")});case zs:return Gr(function(Fr){return Fr},function(Fr,Kr,Cr){var yi=Kr.def("+",Cr,"[0]"),qi=Kr.def("+",Cr,"[1]");return[yi,qi]});case Fl:return Gr(function(Fr){var Kr="srcRGB"in Fr?Fr.srcRGB:Fr.src,Cr="srcAlpha"in Fr?Fr.srcAlpha:Fr.src,yi="dstRGB"in Fr?Fr.dstRGB:Fr.dst,qi="dstAlpha"in Fr?Fr.dstAlpha:Fr.dst;return[Ji[Kr],Ji[yi],Ji[Cr],Ji[qi]]},function(Fr,Kr,Cr){var yi=Fr.constants.blendFuncs;function qi(eo,fs){var es=Kr.def('"',eo,fs,'" in ',Cr,"?",Cr,".",eo,fs,":",Cr,".",eo);return es}var vn=qi("src","RGB"),Qa=qi("dst","RGB"),ra=Kr.def(yi,"[",vn,"]"),mo=Kr.def(yi,"[",qi("src","Alpha"),"]"),sl=Kr.def(yi,"[",Qa,"]"),Os=Kr.def(yi,"[",qi("dst","Alpha"),"]");return[ra,sl,mo,Os]});case Vl:return Gr(function(Fr){if(typeof Fr=="string")return[Es[Fr],Es[Fr]];if(typeof Fr=="object")return[Es[Fr.rgb],Es[Fr.alpha]]},function(Fr,Kr,Cr){var yi=Fr.constants.blendEquations,qi=Kr.def(),vn=Kr.def(),Qa=Fr.cond("typeof ",Cr,'==="string"');return Qa.then(qi,"=",vn,"=",yi,"[",Cr,"];"),Qa.else(qi,"=",yi,"[",Cr,".rgb];",vn,"=",yi,"[",Cr,".alpha];"),Kr(Qa),[qi,vn]});case Gl:return Gr(function(Fr){return M(4,function(Kr){return+Fr[Kr]})},function(Fr,Kr,Cr){return M(4,function(yi){return Kr.def("+",Cr,"[",yi,"]")})});case Il:return Gr(function(Fr){return Fr|0},function(Fr,Kr,Cr){return Kr.def(Cr,"|0")});case Dl:return Gr(function(Fr){var Kr=Fr.cmp||"keep",Cr=Fr.ref||0,yi="mask"in Fr?Fr.mask:-1;return[ai[Kr],Cr,yi]},function(Fr,Kr,Cr){var yi=Fr.constants.compareFuncs,qi=Kr.def('"cmp" in ',Cr,"?",yi,"[",Cr,".cmp]",":",mt),vn=Kr.def(Cr,".ref|0"),Qa=Kr.def('"mask" in ',Cr,"?",Cr,".mask|0:-1");return[qi,vn,Qa]});case oe:case w:return Gr(function(Fr){var Kr=Fr.fail||"keep",Cr=Fr.zfail||"keep",yi=Fr.zpass||"keep";return[Dr===w?se:X,Ti[Kr],Ti[Cr],Ti[yi]]},function(Fr,Kr,Cr){var yi=Fr.constants.stencilOps;function qi(vn){return Kr.def('"',vn,'" in ',Cr,"?",yi,"[",Cr,".",vn,"]:",mt)}return[Dr===w?se:X,qi("fail"),qi("zfail"),qi("zpass")]});case cl:return Gr(function(Fr){var Kr=Fr.factor|0,Cr=Fr.units|0;return[Kr,Cr]},function(Fr,Kr,Cr){var yi=Kr.def(Cr,".factor|0"),qi=Kr.def(Cr,".units|0");return[yi,qi]});case Us:return Gr(function(Fr){var Kr=0;return Fr==="front"?Kr=X:Fr==="back"&&(Kr=se),Kr},function(Fr,Kr,Cr){return Kr.def(Cr,'==="front"?',X,":",se)});case _l:return Gr(function(Fr){return Fr},function(Fr,Kr,Cr){return Cr});case Sl:return Gr(function(Fr){return Bi[Fr]},function(Fr,Kr,Cr){return Kr.def(Cr+'==="cw"?'+Le+":"+We)});case Ys:return Gr(function(Fr){return Fr.map(function(Kr){return!!Kr})},function(Fr,Kr,Cr){return M(4,function(yi){return"!!"+Cr+"["+yi+"]"})});case _s:return Gr(function(Fr){var Kr="value"in Fr?Fr.value:1,Cr=!!Fr.invert;return[Kr,Cr]},function(Fr,Kr,Cr){var yi=Kr.def('"value" in ',Cr,"?+",Cr,".value:1"),qi=Kr.def("!!",Cr,".invert");return[yi,qi]})}}),Pr}function wf(It,Qt){var ar=It.static,mr=It.dynamic,Pr={};return Object.keys(ar).forEach(function(Dr){var Xr=ar[Dr],Gr;if(typeof Xr=="number"||typeof Xr=="boolean")Gr=yo(function(){return Xr});else if(typeof Xr=="function"){var Fr=Xr._reglType;Fr==="texture2d"||Fr==="textureCube"?Gr=yo(function(Kr){return Kr.link(Xr)}):(Fr==="framebuffer"||Fr==="framebufferCube")&&(Gr=yo(function(Kr){return Kr.link(Xr.color[0])}))}else Gi(Xr)&&(Gr=yo(function(Kr){var Cr=Kr.global.def("[",M(Xr.length,function(yi){return Xr[yi]}),"]");return Cr}));Gr.value=Xr,Pr[Dr]=Gr}),Object.keys(mr).forEach(function(Dr){var Xr=mr[Dr];Pr[Dr]=Ko(Xr,function(Gr,Fr){return Gr.invoke(Fr,Xr)})}),Pr}function pc(It,Qt){var ar=It.static,mr=It.dynamic,Pr={};return Object.keys(ar).forEach(function(Dr){var Xr=ar[Dr],Gr=jr.id(Dr),Fr=new La;if(en(Xr))Fr.state=Rn,Fr.buffer=Ta.getBuffer(Ta.create(Xr,Mr,!1,!0)),Fr.type=0;else{var Kr=Ta.getBuffer(Xr);if(Kr)Fr.state=Rn,Fr.buffer=Kr,Fr.type=0;else if("constant"in Xr){var Cr=Xr.constant;Fr.buffer="null",Fr.state=Hn,typeof Cr=="number"?Fr.x=Cr:In.forEach(function(sl,Os){Os<Cr.length&&(Fr[sl]=Cr[Os])})}else{en(Xr.buffer)?Kr=Ta.getBuffer(Ta.create(Xr.buffer,Mr,!1,!0)):Kr=Ta.getBuffer(Xr.buffer);var yi=Xr.offset|0,qi=Xr.stride|0,vn=Xr.size|0,Qa=!!Xr.normalized,ra=0;"type"in Xr&&(ra=si[Xr.type]);var mo=Xr.divisor|0;Fr.buffer=Kr,Fr.state=Rn,Fr.size=vn,Fr.normalized=Qa,Fr.type=ra||Kr.dtype,Fr.offset=yi,Fr.stride=qi,Fr.divisor=mo}}Pr[Dr]=yo(function(sl,Os){var eo=sl.attribCache;if(Gr in eo)return eo[Gr];var fs={isStream:!1};return Object.keys(Fr).forEach(function(es){fs[es]=Fr[es]}),Fr.buffer&&(fs.buffer=sl.link(Fr.buffer),fs.type=fs.type||fs.buffer+".dtype"),eo[Gr]=fs,fs})}),Object.keys(mr).forEach(function(Dr){var Xr=mr[Dr];function Gr(Fr,Kr){var Cr=Fr.invoke(Kr,Xr),yi=Fr.shared,qi=Fr.constants,vn=yi.isBufferArgs,Qa=yi.buffer,ra={isStream:Kr.def(!1)},mo=new La;mo.state=Rn,Object.keys(mo).forEach(function(fs){ra[fs]=Kr.def(""+mo[fs])});var sl=ra.buffer,Os=ra.type;Kr("if(",vn,"(",Cr,")){",ra.isStream,"=true;",sl,"=",Qa,".createStream(",Mr,",",Cr,");",Os,"=",sl,".dtype;","}else{",sl,"=",Qa,".getBuffer(",Cr,");","if(",sl,"){",Os,"=",sl,".dtype;",'}else if("constant" in ',Cr,"){",ra.state,"=",Hn,";","if(typeof "+Cr+'.constant === "number"){',ra[In[0]],"=",Cr,".constant;",In.slice(1).map(function(fs){return ra[fs]}).join("="),"=0;","}else{",In.map(function(fs,es){return ra[fs]+"="+Cr+".constant.length>"+es+"?"+Cr+".constant["+es+"]:0;"}).join(""),"}}else{","if(",vn,"(",Cr,".buffer)){",sl,"=",Qa,".createStream(",Mr,",",Cr,".buffer);","}else{",sl,"=",Qa,".getBuffer(",Cr,".buffer);","}",Os,'="type" in ',Cr,"?",qi.glTypes,"[",Cr,".type]:",sl,".dtype;",ra.normalized,"=!!",Cr,".normalized;");function eo(fs){Kr(ra[fs],"=",Cr,".",fs,"|0;")}return eo("size"),eo("offset"),eo("stride"),eo("divisor"),Kr("}}"),Kr.exit("if(",ra.isStream,"){",Qa,".destroyStream(",sl,");","}"),ra}Pr[Dr]=Ko(Xr,Gr)}),Pr}function vc(It){var Qt=It.static,ar=It.dynamic,mr={};return Object.keys(Qt).forEach(function(Pr){var Dr=Qt[Pr];mr[Pr]=yo(function(Xr,Gr){return typeof Dr=="number"||typeof Dr=="boolean"?""+Dr:Xr.link(Dr)})}),Object.keys(ar).forEach(function(Pr){var Dr=ar[Pr];mr[Pr]=Ko(Dr,function(Xr,Gr){return Xr.invoke(Gr,Dr)})}),mr}function qc(It,Qt,ar,mr,Pr){var Dr=It.static,Xr=It.dynamic,Gr=Rf(It,Qt),Fr=Tu(It,Pr),Kr=Ru(It,Fr,Pr),Cr=rf(It,Pr),yi=Lc(It,Pr),qi=Cc(It,Pr,Gr);function vn(eo){var fs=Kr[eo];fs&&(yi[eo]=fs)}vn(ee),vn(yl(Q));var Qa=Object.keys(yi).length>0,ra={framebuffer:Fr,draw:Cr,shader:qi,state:yi,dirty:Qa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ra.profile=mu(It,Pr),ra.uniforms=wf(ar,Pr),ra.drawVAO=ra.scopeVAO=Cr.vao,!ra.drawVAO&&qi.program&&!Gr&&_i.angle_instanced_arrays&&Cr.static.elements){var mo=!0,sl=qi.program.attributes.map(function(eo){var fs=Qt.static[eo];return mo=mo&&!!fs,fs});if(mo&&sl.length>0){var Os=Hs.getVAO(Hs.createVAO({attributes:sl,elements:Cr.static.elements}));ra.drawVAO=new bi(null,null,null,function(eo,fs){return eo.link(Os)}),ra.useVAO=!0}}return Gr?ra.useVAO=!0:ra.attributes=pc(Qt,Pr),ra.context=vc(mr,Pr),ra}function If(It,Qt,ar){var mr=It.shared,Pr=mr.context,Dr=It.scope();Object.keys(ar).forEach(function(Xr){Qt.save(Pr,"."+Xr);var Gr=ar[Xr],Fr=Gr.append(It,Qt);Array.isArray(Fr)?Dr(Pr,".",Xr,"=[",Fr.join(),"];"):Dr(Pr,".",Xr,"=",Fr,";")}),Qt(Dr)}function Tc(It,Qt,ar,mr){var Pr=It.shared,Dr=Pr.gl,Xr=Pr.framebuffer,Gr;Qo&&(Gr=Qt.def(Pr.extensions,".webgl_draw_buffers"));var Fr=It.constants,Kr=Fr.drawBuffer,Cr=Fr.backBuffer,yi;ar?yi=ar.append(It,Qt):yi=Qt.def(Xr,".next"),mr||Qt("if(",yi,"!==",Xr,".cur){"),Qt("if(",yi,"){",Dr,".bindFramebuffer(",Wr,",",yi,".framebuffer);"),Qo&&Qt(Gr,".drawBuffersWEBGL(",Kr,"[",yi,".colorAttachments.length]);"),Qt("}else{",Dr,".bindFramebuffer(",Wr,",null);"),Qo&&Qt(Gr,".drawBuffersWEBGL(",Cr,");"),Qt("}",Xr,".cur=",yi,";"),mr||Qt("}")}function zc(It,Qt,ar){var mr=It.shared,Pr=mr.gl,Dr=It.current,Xr=It.next,Gr=mr.current,Fr=mr.next,Kr=It.cond(Gr,".dirty");hs.forEach(function(Cr){var yi=yl(Cr);if(!(yi in ar.state)){var qi,vn;if(yi in Xr){qi=Xr[yi],vn=Dr[yi];var Qa=M(nl[yi].length,function(mo){return Kr.def(qi,"[",mo,"]")});Kr(It.cond(Qa.map(function(mo,sl){return mo+"!=="+vn+"["+sl+"]"}).join("||")).then(Pr,".",ql[yi],"(",Qa,");",Qa.map(function(mo,sl){return vn+"["+sl+"]="+mo}).join(";"),";"))}else{qi=Kr.def(Fr,".",yi);var ra=It.cond(qi,"!==",Gr,".",yi);Kr(ra),yi in Ho?ra(It.cond(qi).then(Pr,".enable(",Ho[yi],");").else(Pr,".disable(",Ho[yi],");"),Gr,".",yi,"=",qi,";"):ra(Pr,".",ql[yi],"(",qi,");",Gr,".",yi,"=",qi,";")}}}),Object.keys(ar.state).length===0&&Kr(Gr,".dirty=false;"),Qt(Kr)}function Vu(It,Qt,ar,mr){var Pr=It.shared,Dr=It.current,Xr=Pr.current,Gr=Pr.gl,Fr;Wi(Object.keys(ar)).forEach(function(Kr){var Cr=ar[Kr];if(!(mr&&!mr(Cr))){var yi=Cr.append(It,Qt);if(Ho[Kr]){var qi=Ho[Kr];ao(Cr)?(Fr=It.link(yi,{stable:!0}),Qt(It.cond(Fr).then(Gr,".enable(",qi,");").else(Gr,".disable(",qi,");")),Qt(Xr,".",Kr,"=",Fr,";")):(Qt(It.cond(yi).then(Gr,".enable(",qi,");").else(Gr,".disable(",qi,");")),Qt(Xr,".",Kr,"=",yi,";"))}else if(Gi(yi)){var vn=Dr[Kr];Qt(Gr,".",ql[Kr],"(",yi,");",yi.map(function(Qa,ra){return vn+"["+ra+"]="+Qa}).join(";"),";")}else ao(Cr)?(Fr=It.link(yi,{stable:!0}),Qt(Gr,".",ql[Kr],"(",Fr,");",Xr,".",Kr,"=",Fr,";")):Qt(Gr,".",ql[Kr],"(",yi,");",Xr,".",Kr,"=",yi,";")}})}function Bc(It,Qt){Ws&&(It.instancing=Qt.def(It.shared.extensions,".angle_instanced_arrays"))}function Ou(It,Qt,ar,mr,Pr){var Dr=It.shared,Xr=It.stats,Gr=Dr.current,Fr=Dr.timer,Kr=ar.profile;function Cr(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var yi,qi;function vn(eo){yi=Qt.def(),eo(yi,"=",Cr(),";"),typeof Pr=="string"?eo(Xr,".count+=",Pr,";"):eo(Xr,".count++;"),qs&&(mr?(qi=Qt.def(),eo(qi,"=",Fr,".getNumPendingQueries();")):eo(Fr,".beginQuery(",Xr,");"))}function Qa(eo){eo(Xr,".cpuTime+=",Cr(),"-",yi,";"),qs&&(mr?eo(Fr,".pushScopeStats(",qi,",",Fr,".getNumPendingQueries(),",Xr,");"):eo(Fr,".endQuery();"))}function ra(eo){var fs=Qt.def(Gr,".profile");Qt(Gr,".profile=",eo,";"),Qt.exit(Gr,".profile=",fs,";")}var mo;if(Kr){if(ao(Kr)){Kr.enable?(vn(Qt),Qa(Qt.exit),ra("true")):ra("false");return}mo=Kr.append(It,Qt),ra(mo)}else mo=Qt.def(Gr,".profile");var sl=It.block();vn(sl),Qt("if(",mo,"){",sl,"}");var Os=It.block();Qa(Os),Qt.exit("if(",mo,"){",Os,"}")}function Y(It,Qt,ar,mr,Pr){var Dr=It.shared;function Xr(Fr){switch(Fr){case $l:case Ql:case Hu:return 2;case pl:case ku:case tf:return 3;case Hl:case Jl:case Ku:return 4;default:return 1}}function Gr(Fr,Kr,Cr){var yi=Dr.gl,qi=Qt.def(Fr,".location"),vn=Qt.def(Dr.attributes,"[",qi,"]"),Qa=Cr.state,ra=Cr.buffer,mo=[Cr.x,Cr.y,Cr.z,Cr.w],sl=["buffer","normalized","offset","stride"];function Os(){Qt("if(!",vn,".buffer){",yi,".enableVertexAttribArray(",qi,");}");var fs=Cr.type,es;if(Cr.size?es=Qt.def(Cr.size,"||",Kr):es=Kr,Qt("if(",vn,".type!==",fs,"||",vn,".size!==",es,"||",sl.map(function(Ml){return vn+"."+Ml+"!=="+Cr[Ml]}).join("||"),"){",yi,".bindBuffer(",Mr,",",ra,".buffer);",yi,".vertexAttribPointer(",[qi,es,fs,Cr.normalized,Cr.stride,Cr.offset],");",vn,".type=",fs,";",vn,".size=",es,";",sl.map(function(Ml){return vn+"."+Ml+"="+Cr[Ml]+";"}).join(""),"}"),Ws){var $s=Cr.divisor;Qt("if(",vn,".divisor!==",$s,"){",It.instancing,".vertexAttribDivisorANGLE(",[qi,$s],");",vn,".divisor=",$s,";}")}}function eo(){Qt("if(",vn,".buffer){",yi,".disableVertexAttribArray(",qi,");",vn,".buffer=null;","}if(",In.map(function(fs,es){return vn+"."+fs+"!=="+mo[es]}).join("||"),"){",yi,".vertexAttrib4f(",qi,",",mo,");",In.map(function(fs,es){return vn+"."+fs+"="+mo[es]+";"}).join(""),"}")}Qa===Rn?Os():Qa===Hn?eo():(Qt("if(",Qa,"===",Rn,"){"),Os(),Qt("}else{"),eo(),Qt("}"))}mr.forEach(function(Fr){var Kr=Fr.name,Cr=ar.attributes[Kr],yi;if(Cr){if(!Pr(Cr))return;yi=Cr.append(It,Qt)}else{if(!Pr(Ms))return;var qi=It.scopeAttrib(Kr);yi={},Object.keys(new La).forEach(function(vn){yi[vn]=Qt.def(qi,".",vn)})}Gr(It.link(Fr),Xr(Fr.info.type),yi)})}function R(It,Qt,ar,mr,Pr,Dr){for(var Xr=It.shared,Gr=Xr.gl,Fr,Kr=0;Kr<mr.length;++Kr){var Cr=mr[Kr],yi=Cr.name,qi=Cr.info.type,vn=ar.uniforms[yi],Qa=It.link(Cr),ra=Qa+".location",mo;if(vn){if(!Pr(vn))continue;if(ao(vn)){var sl=vn.value;if(qi===gf||qi===nf){var Os=It.link(sl._texture||sl.color[0]._texture);Qt(Gr,".uniform1i(",ra,",",Os+".bind());"),Qt.exit(Os,".unbind();")}else if(qi===Gu||qi===Wu||qi===sf){var eo=It.global.def("new Float32Array(["+Array.prototype.slice.call(sl)+"])"),fs=2;qi===Wu?fs=3:qi===sf&&(fs=4),Qt(Gr,".uniformMatrix",fs,"fv(",ra,",false,",eo,");")}else{switch(qi){case il:Fr="1f";break;case $l:Fr="2f";break;case pl:Fr="3f";break;case Hl:Fr="4f";break;case Kl:Fr="1i";break;case Ll:Fr="1i";break;case Hu:Fr="2i";break;case Ql:Fr="2i";break;case tf:Fr="3i";break;case ku:Fr="3i";break;case Ku:Fr="4i";break;case Jl:Fr="4i";break}Qt(Gr,".uniform",Fr,"(",ra,",",Gi(sl)?Array.prototype.slice.call(sl):sl,");")}continue}else mo=vn.append(It,Qt)}else{if(!Pr(Ms))continue;mo=Qt.def(Xr.uniforms,"[",jr.id(yi),"]")}qi===gf?Qt("if(",mo,"&&",mo,'._reglType==="framebuffer"){',mo,"=",mo,".color[0];","}"):qi===nf&&Qt("if(",mo,"&&",mo,'._reglType==="framebufferCube"){',mo,"=",mo,".color[0];","}");var es=1;switch(qi){case gf:case nf:var $s=Qt.def(mo,"._texture");Qt(Gr,".uniform1i(",ra,",",$s,".bind());"),Qt.exit($s,".unbind();");continue;case Ll:case Kl:Fr="1i";break;case Ql:case Hu:Fr="2i",es=2;break;case ku:case tf:Fr="3i",es=3;break;case Jl:case Ku:Fr="4i",es=4;break;case il:Fr="1f";break;case $l:Fr="2f",es=2;break;case pl:Fr="3f",es=3;break;case Hl:Fr="4f",es=4;break;case Gu:Fr="Matrix2fv";break;case Wu:Fr="Matrix3fv";break;case sf:Fr="Matrix4fv";break}if(Fr.charAt(0)==="M"){Qt(Gr,".uniform",Fr,"(",ra,",");var Ml=Math.pow(qi-Gu+2,2),Mu=It.global.def("new Float32Array(",Ml,")");Array.isArray(mo)?Qt("false,(",M(Ml,function(yf){return Mu+"["+yf+"]="+mo[yf]}),",",Mu,")"):Qt("false,(Array.isArray(",mo,")||",mo," instanceof Float32Array)?",mo,":(",M(Ml,function(yf){return Mu+"["+yf+"]="+mo+"["+yf+"]"}),",",Mu,")"),Qt(");")}else if(es>1){for(var Au=[],$u=[],du=0;du<es;++du)Array.isArray(mo)?$u.push(mo[du]):$u.push(Qt.def(mo+"["+du+"]")),Dr&&Au.push(Qt.def());Dr&&Qt("if(!",It.batchId,"||",Au.map(function(yf,Kf){return yf+"!=="+$u[Kf]}).join("||"),"){",Au.map(function(yf,Kf){return yf+"="+$u[Kf]+";"}).join("")),Qt(Gr,".uniform",Fr,"(",ra,",",$u.join(","),");"),Dr&&Qt("}")}else{if(Dr){var Nu=Qt.def();Qt("if(!",It.batchId,"||",Nu,"!==",mo,"){",Nu,"=",mo,";")}Qt(Gr,".uniform",Fr,"(",ra,",",mo,");"),Dr&&Qt("}")}}}function K(It,Qt,ar,mr){var Pr=It.shared,Dr=Pr.gl,Xr=Pr.draw,Gr=mr.draw;function Fr(){var es=Gr.elements,$s,Ml=Qt;return es?((es.contextDep&&mr.contextDynamic||es.propDep)&&(Ml=ar),$s=es.append(It,Ml),Gr.elementsActive&&Ml("if("+$s+")"+Dr+".bindBuffer("+$r+","+$s+".buffer.buffer);")):($s=Ml.def(),Ml($s,"=",Xr,".",zt,";","if(",$s,"){",Dr,".bindBuffer(",$r,",",$s,".buffer.buffer);}","else if(",Pr.vao,".currentVAO){",$s,"=",It.shared.elements+".getElements("+Pr.vao,".currentVAO.elements);",bl?"":"if("+$s+")"+Dr+".bindBuffer("+$r+","+$s+".buffer.buffer);","}")),$s}function Kr(){var es=Gr.count,$s,Ml=Qt;return es?((es.contextDep&&mr.contextDynamic||es.propDep)&&(Ml=ar),$s=es.append(It,Ml)):$s=Ml.def(Xr,".",Jt),$s}var Cr=Fr();function yi(es){var $s=Gr[es];return $s?$s.contextDep&&mr.contextDynamic||$s.propDep?$s.append(It,ar):$s.append(It,Qt):Qt.def(Xr,".",es)}var qi=yi(Yt),vn=yi(yr),Qa=Kr();if(typeof Qa=="number"){if(Qa===0)return}else ar("if(",Qa,"){"),ar.exit("}");var ra,mo;Ws&&(ra=yi(Ir),mo=It.instancing);var sl=Cr+".type",Os=Gr.elements&&ao(Gr.elements)&&!Gr.vaoActive;function eo(){function es(){ar(mo,".drawElementsInstancedANGLE(",[qi,Qa,sl,vn+"<<(("+sl+"-"+Vn+")>>1)",ra],");")}function $s(){ar(mo,".drawArraysInstancedANGLE(",[qi,vn,Qa,ra],");")}Cr&&Cr!=="null"?Os?es():(ar("if(",Cr,"){"),es(),ar("}else{"),$s(),ar("}")):$s()}function fs(){function es(){ar(Dr+".drawElements("+[qi,Qa,sl,vn+"<<(("+sl+"-"+Vn+")>>1)"]+");")}function $s(){ar(Dr+".drawArrays("+[qi,vn,Qa]+");")}Cr&&Cr!=="null"?Os?es():(ar("if(",Cr,"){"),es(),ar("}else{"),$s(),ar("}")):$s()}Ws&&(typeof ra!="number"||ra>=0)?typeof ra=="string"?(ar("if(",ra,">0){"),eo(),ar("}else if(",ra,"<0){"),fs(),ar("}")):eo():fs()}function N(It,Qt,ar,mr,Pr){var Dr=jl(),Xr=Dr.proc("body",Pr);return Ws&&(Dr.instancing=Xr.def(Dr.shared.extensions,".angle_instanced_arrays")),It(Dr,Xr,ar,mr),Dr.compile().body}function $(It,Qt,ar,mr){Bc(It,Qt),ar.useVAO?ar.drawVAO?Qt(It.shared.vao,".setVAO(",ar.drawVAO.append(It,Qt),");"):Qt(It.shared.vao,".setVAO(",It.shared.vao,".targetVAO);"):(Qt(It.shared.vao,".setVAO(null);"),Y(It,Qt,ar,mr.attributes,function(){return!0})),R(It,Qt,ar,mr.uniforms,function(){return!0},!1),K(It,Qt,Qt,ar)}function we(It,Qt){var ar=It.proc("draw",1);Bc(It,ar),If(It,ar,Qt.context),Tc(It,ar,Qt.framebuffer),zc(It,ar,Qt),Vu(It,ar,Qt.state),Ou(It,ar,Qt,!1,!0);var mr=Qt.shader.progVar.append(It,ar);if(ar(It.shared.gl,".useProgram(",mr,".program);"),Qt.shader.program)$(It,ar,Qt,Qt.shader.program);else{ar(It.shared.vao,".setVAO(null);");var Pr=It.global.def("{}"),Dr=ar.def(mr,".id"),Xr=ar.def(Pr,"[",Dr,"]");ar(It.cond(Xr).then(Xr,".call(this,a0);").else(Xr,"=",Pr,"[",Dr,"]=",It.link(function(Gr){return N($,It,Qt,Gr,1)}),"(",mr,");",Xr,".call(this,a0);"))}Object.keys(Qt.state).length>0&&ar(It.shared.current,".dirty=true;"),It.shared.vao&&ar(It.shared.vao,".setVAO(null);")}function ge(It,Qt,ar,mr){It.batchId="a1",Bc(It,Qt);function Pr(){return!0}Y(It,Qt,ar,mr.attributes,Pr),R(It,Qt,ar,mr.uniforms,Pr,!1),K(It,Qt,Qt,ar)}function Ue(It,Qt,ar,mr){Bc(It,Qt);var Pr=ar.contextDep,Dr=Qt.def(),Xr="a0",Gr="a1",Fr=Qt.def();It.shared.props=Fr,It.batchId=Dr;var Kr=It.scope(),Cr=It.scope();Qt(Kr.entry,"for(",Dr,"=0;",Dr,"<",Gr,";++",Dr,"){",Fr,"=",Xr,"[",Dr,"];",Cr,"}",Kr.exit);function yi(sl){return sl.contextDep&&Pr||sl.propDep}function qi(sl){return!yi(sl)}if(ar.needsContext&&If(It,Cr,ar.context),ar.needsFramebuffer&&Tc(It,Cr,ar.framebuffer),Vu(It,Cr,ar.state,yi),ar.profile&&yi(ar.profile)&&Ou(It,Cr,ar,!1,!0),mr)ar.useVAO?ar.drawVAO?yi(ar.drawVAO)?Cr(It.shared.vao,".setVAO(",ar.drawVAO.append(It,Cr),");"):Kr(It.shared.vao,".setVAO(",ar.drawVAO.append(It,Kr),");"):Kr(It.shared.vao,".setVAO(",It.shared.vao,".targetVAO);"):(Kr(It.shared.vao,".setVAO(null);"),Y(It,Kr,ar,mr.attributes,qi),Y(It,Cr,ar,mr.attributes,yi)),R(It,Kr,ar,mr.uniforms,qi,!1),R(It,Cr,ar,mr.uniforms,yi,!0),K(It,Kr,Cr,ar);else{var vn=It.global.def("{}"),Qa=ar.shader.progVar.append(It,Cr),ra=Cr.def(Qa,".id"),mo=Cr.def(vn,"[",ra,"]");Cr(It.shared.gl,".useProgram(",Qa,".program);","if(!",mo,"){",mo,"=",vn,"[",ra,"]=",It.link(function(sl){return N(ge,It,ar,sl,2)}),"(",Qa,");}",mo,".call(this,a0[",Dr,"],",Dr,");")}}function dt(It,Qt){var ar=It.proc("batch",2);It.batchId="0",Bc(It,ar);var mr=!1,Pr=!0;Object.keys(Qt.context).forEach(function(vn){mr=mr||Qt.context[vn].propDep}),mr||(If(It,ar,Qt.context),Pr=!1);var Dr=Qt.framebuffer,Xr=!1;Dr?(Dr.propDep?mr=Xr=!0:Dr.contextDep&&mr&&(Xr=!0),Xr||Tc(It,ar,Dr)):Tc(It,ar,null),Qt.state.viewport&&Qt.state.viewport.propDep&&(mr=!0);function Gr(vn){return vn.contextDep&&mr||vn.propDep}zc(It,ar,Qt),Vu(It,ar,Qt.state,function(vn){return!Gr(vn)}),(!Qt.profile||!Gr(Qt.profile))&&Ou(It,ar,Qt,!1,"a1"),Qt.contextDep=mr,Qt.needsContext=Pr,Qt.needsFramebuffer=Xr;var Fr=Qt.shader.progVar;if(Fr.contextDep&&mr||Fr.propDep)Ue(It,ar,Qt,null);else{var Kr=Fr.append(It,ar);if(ar(It.shared.gl,".useProgram(",Kr,".program);"),Qt.shader.program)Ue(It,ar,Qt,Qt.shader.program);else{ar(It.shared.vao,".setVAO(null);");var Cr=It.global.def("{}"),yi=ar.def(Kr,".id"),qi=ar.def(Cr,"[",yi,"]");ar(It.cond(qi).then(qi,".call(this,a0,a1);").else(qi,"=",Cr,"[",yi,"]=",It.link(function(vn){return N(Ue,It,Qt,vn,2)}),"(",Kr,");",qi,".call(this,a0,a1);"))}}Object.keys(Qt.state).length>0&&ar(It.shared.current,".dirty=true;"),It.shared.vao&&ar(It.shared.vao,".setVAO(null);")}function Rt(It,Qt){var ar=It.proc("scope",3);It.batchId="a2";var mr=It.shared,Pr=mr.current;if(If(It,ar,Qt.context),Qt.framebuffer&&Qt.framebuffer.append(It,ar),Wi(Object.keys(Qt.state)).forEach(function(Gr){var Fr=Qt.state[Gr],Kr=Fr.append(It,ar);Gi(Kr)?Kr.forEach(function(Cr,yi){zl(Cr)?ar.set(It.next[Gr],"["+yi+"]",Cr):ar.set(It.next[Gr],"["+yi+"]",It.link(Cr,{stable:!0}))}):ao(Fr)?ar.set(mr.next,"."+Gr,It.link(Kr,{stable:!0})):ar.set(mr.next,"."+Gr,Kr)}),Ou(It,ar,Qt,!0,!0),[zt,yr,Jt,Ir,Yt].forEach(function(Gr){var Fr=Qt.draw[Gr];if(Fr){var Kr=Fr.append(It,ar);zl(Kr)?ar.set(mr.draw,"."+Gr,Kr):ar.set(mr.draw,"."+Gr,It.link(Kr),{stable:!0})}}),Object.keys(Qt.uniforms).forEach(function(Gr){var Fr=Qt.uniforms[Gr].append(It,ar);Array.isArray(Fr)&&(Fr="["+Fr.map(function(Kr){return zl(Kr)?Kr:It.link(Kr,{stable:!0})})+"]"),ar.set(mr.uniforms,"["+It.link(jr.id(Gr),{stable:!0})+"]",Fr)}),Object.keys(Qt.attributes).forEach(function(Gr){var Fr=Qt.attributes[Gr].append(It,ar),Kr=It.scopeAttrib(Gr);Object.keys(new La).forEach(function(Cr){ar.set(Kr,"."+Cr,Fr[Cr])})}),Qt.scopeVAO){var Dr=Qt.scopeVAO.append(It,ar);zl(Dr)?ar.set(mr.vao,".targetVAO",Dr):ar.set(mr.vao,".targetVAO",It.link(Dr,{stable:!0}))}function Xr(Gr){var Fr=Qt.shader[Gr];if(Fr){var Kr=Fr.append(It,ar);zl(Kr)?ar.set(mr.shader,"."+Gr,Kr):ar.set(mr.shader,"."+Gr,It.link(Kr,{stable:!0}))}}Xr($e),Xr(pt),Object.keys(Qt.state).length>0&&(ar(Pr,".dirty=true;"),ar.exit(Pr,".dirty=true;")),ar("a1(",It.shared.context,",a0,",It.batchId,");")}function ur(It){if(!(typeof It!="object"||Gi(It))){for(var Qt=Object.keys(It),ar=0;ar<Qt.length;++ar)if(h.isDynamic(It[Qt[ar]]))return!0;return!1}}function gr(It,Qt,ar){var mr=Qt.static[ar];if(!mr||!ur(mr))return;var Pr=It.global,Dr=Object.keys(mr),Xr=!1,Gr=!1,Fr=!1,Kr=It.global.def("{}");Dr.forEach(function(yi){var qi=mr[yi];if(h.isDynamic(qi)){typeof qi=="function"&&(qi=mr[yi]=h.unbox(qi));var vn=Ko(qi,null);Xr=Xr||vn.thisDep,Fr=Fr||vn.propDep,Gr=Gr||vn.contextDep}else{switch(Pr(Kr,".",yi,"="),typeof qi){case"number":Pr(qi);break;case"string":Pr('"',qi,'"');break;case"object":Array.isArray(qi)&&Pr("[",qi.join(),"]");break;default:Pr(It.link(qi));break}Pr(";")}});function Cr(yi,qi){Dr.forEach(function(vn){var Qa=mr[vn];if(h.isDynamic(Qa)){var ra=yi.invoke(qi,Qa);qi(Kr,".",vn,"=",ra,";")}})}Qt.dynamic[ar]=new h.DynamicVariable(Bs,{thisDep:Xr,contextDep:Gr,propDep:Fr,ref:Kr,append:Cr}),delete Qt.static[ar]}function cr(It,Qt,ar,mr,Pr){var Dr=jl();Dr.stats=Dr.link(Pr),Object.keys(Qt.static).forEach(function(Gr){gr(Dr,Qt,Gr)}),dr.forEach(function(Gr){gr(Dr,It,Gr)});var Xr=qc(It,Qt,ar,mr,Dr);return Xr.shader.program&&(Xr.shader.program.attributes.sort(function(Gr,Fr){return Gr.name<Fr.name?-1:1}),Xr.shader.program.uniforms.sort(function(Gr,Fr){return Gr.name<Fr.name?-1:1})),we(Dr,Xr),Rt(Dr,Xr),dt(Dr,Xr),e(Dr.compile(),{destroy:function(){Xr.shader.program.destroy()}})}return{next:ru,current:nl,procs:function(){var It=jl(),Qt=It.proc("poll"),ar=It.proc("refresh"),mr=It.block();Qt(mr),ar(mr);var Pr=It.shared,Dr=Pr.gl,Xr=Pr.next,Gr=Pr.current;mr(Gr,".dirty=false;"),Tc(It,Qt),Tc(It,ar,null,!0);var Fr;Ws&&(Fr=It.link(Ws)),_i.oes_vertex_array_object&&ar(It.link(_i.oes_vertex_array_object),".bindVertexArrayOES(null);");var Kr=ar.def(Pr.attributes),Cr=ar.def(0),yi=It.cond(Cr,".buffer");yi.then(Dr,".enableVertexAttribArray(i);",Dr,".bindBuffer(",Mr,",",Cr,".buffer.buffer);",Dr,".vertexAttribPointer(i,",Cr,".size,",Cr,".type,",Cr,".normalized,",Cr,".stride,",Cr,".offset);").else(Dr,".disableVertexAttribArray(i);",Dr,".vertexAttrib4f(i,",Cr,".x,",Cr,".y,",Cr,".z,",Cr,".w);",Cr,".buffer=null;");var qi=It.link(Mn.maxAttributes,{stable:!0});return ar("for(var i=0;i<",qi,";++i){",Cr,"=",Kr,"[i];",yi,"}"),Ws&&ar("for(var i=0;i<",qi,";++i){",Fr,".vertexAttribDivisorANGLE(i,",Kr,"[i].divisor);","}"),ar(It.shared.vao,".currentVAO=null;",It.shared.vao,".setVAO(",It.shared.vao,".targetVAO);"),Object.keys(Ho).forEach(function(vn){var Qa=Ho[vn],ra=mr.def(Xr,".",vn),mo=It.block();mo("if(",ra,"){",Dr,".enable(",Qa,")}else{",Dr,".disable(",Qa,")}",Gr,".",vn,"=",ra,";"),ar(mo),Qt("if(",ra,"!==",Gr,".",vn,"){",mo,"}")}),Object.keys(ql).forEach(function(vn){var Qa=ql[vn],ra=nl[vn],mo,sl,Os=It.block();if(Os(Dr,".",Qa,"("),Gi(ra)){var eo=ra.length;mo=It.global.def(Xr,".",vn),sl=It.global.def(Gr,".",vn),Os(M(eo,function(fs){return mo+"["+fs+"]"}),");",M(eo,function(fs){return sl+"["+fs+"]="+mo+"["+fs+"];"}).join("")),Qt("if(",M(eo,function(fs){return mo+"["+fs+"]!=="+sl+"["+fs+"]"}).join("||"),"){",Os,"}")}else mo=mr.def(Xr,".",vn),sl=mr.def(Gr,".",vn),Os(mo,");",Gr,".",vn,"=",mo,";"),Qt("if(",mo,"!==",sl,"){",Os,"}");ar(Os)}),It.compile()}(),compile:cr}}function wl(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var au=34918,Al=34919,nu=35007,Bu=function(Gt,jr){if(!jr.ext_disjoint_timer_query)return null;var _i=[];function Mn(){return _i.pop()||jr.ext_disjoint_timer_query.createQueryEXT()}function Ta(Es){_i.push(Es)}var fa=[];function ha(Es){var Ws=Mn();jr.ext_disjoint_timer_query.beginQueryEXT(nu,Ws),fa.push(Ws),qs(fa.length-1,fa.length,Es)}function Io(){jr.ext_disjoint_timer_query.endQueryEXT(nu)}function Vs(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var Hs=[];function is(){return Hs.pop()||new Vs}function su(Es){Hs.push(Es)}var Ps=[];function qs(Es,Ws,Qo){var bl=is();bl.startQueryIndex=Es,bl.endQueryIndex=Ws,bl.sum=0,bl.stats=Qo,Ps.push(bl)}var Do=[],kn=[];function La(){var Es,Ws,Qo=fa.length;if(Qo!==0){kn.length=Math.max(kn.length,Qo+1),Do.length=Math.max(Do.length,Qo+1),Do[0]=0,kn[0]=0;var bl=0;for(Es=0,Ws=0;Ws<fa.length;++Ws){var nl=fa[Ws];jr.ext_disjoint_timer_query.getQueryObjectEXT(nl,Al)?(bl+=jr.ext_disjoint_timer_query.getQueryObjectEXT(nl,au),Ta(nl)):fa[Es++]=nl,Do[Ws+1]=bl,kn[Ws+1]=Es}for(fa.length=Es,Es=0,Ws=0;Ws<Ps.length;++Ws){var ru=Ps[Ws],hs=ru.startQueryIndex,Ho=ru.endQueryIndex;ru.sum+=Do[Ho]-Do[hs];var ql=kn[hs],yl=kn[Ho];yl===ql?(ru.stats.gpuTime+=ru.sum/1e6,su(ru)):(ru.startQueryIndex=ql,ru.endQueryIndex=yl,Ps[Es++]=ru)}Ps.length=Es}}return{beginQuery:ha,endQuery:Io,pushScopeStats:qs,update:La,getNumPendingQueries:function(){return fa.length},clear:function(){_i.push.apply(_i,fa);for(var Es=0;Es<_i.length;Es++)jr.ext_disjoint_timer_query.deleteQueryEXT(_i[Es]);fa.length=0,_i.length=0},restore:function(){fa.length=0,_i.length=0}}},qu=16384,Ju=256,qo=1024,Rl=34962,pu="webglcontextlost",xu="webglcontextrestored",of=1,ff=2,xf=3;function hf(Gt,jr){for(var _i=0;_i<Gt.length;++_i)if(Gt[_i]===jr)return _i;return-1}function dc(Gt){var jr=_(Gt);if(!jr)return null;var _i=jr.gl,Mn=_i.getContextAttributes(),Ta=_i.isContextLost(),fa=C(_i,jr);if(!fa)return null;var ha=x(),Io=wl(),Vs=jr.cachedCode||{},Hs=fa.extensions,is=Bu(_i,Hs),su=p(),Ps=_i.drawingBufferWidth,qs=_i.drawingBufferHeight,Do={tick:0,time:0,viewportWidth:Ps,viewportHeight:qs,framebufferWidth:Ps,framebufferHeight:qs,drawingBufferWidth:Ps,drawingBufferHeight:qs,pixelRatio:jr.pixelRatio},kn={},La={elements:null,primitive:4,count:-1,offset:0,instances:-1},Es=ir(_i,Hs),Ws=zr(_i,Io,jr,nl),Qo=Wt(_i,Hs,Ws,Io),bl=Po(_i,Hs,Es,Io,Ws,Qo,La);function nl(N){return bl.destroyBuffer(N)}var ru=aa(_i,ha,Io,jr),hs=la(_i,Hs,Es,function(){yl.procs.poll()},Do,Io,jr),Ho=Cs(_i,Hs,Es,Io,jr),ql=zo(_i,Hs,Es,hs,Ho,Io),yl=vl(_i,ha,Hs,Es,Ws,Qo,hs,ql,kn,bl,ru,La,Do,is,Vs,jr),tl=ws(_i,ql,yl.procs.poll,Do,Mn,Hs,Es),js=yl.next,zl=_i.canvas,lu=[],bu=[],al=[],jl=[jr.onDestroy],mu=null;function Tu(){if(lu.length===0){is&&is.update(),mu=null;return}mu=d.next(Tu),zc();for(var N=lu.length-1;N>=0;--N){var $=lu[N];$&&$(Do,null,0)}_i.flush(),is&&is.update()}function Ru(){!mu&&lu.length>0&&(mu=d.next(Tu))}function Rf(){mu&&(d.cancel(Tu),mu=null)}function Cc(N){N.preventDefault(),Ta=!0,Rf(),bu.forEach(function($){$()})}function rf(N){_i.getError(),Ta=!1,fa.restore(),ru.restore(),Ws.restore(),hs.restore(),Ho.restore(),ql.restore(),bl.restore(),is&&is.restore(),yl.procs.refresh(),Ru(),al.forEach(function($){$()})}zl&&(zl.addEventListener(pu,Cc,!1),zl.addEventListener(xu,rf,!1));function Lc(){lu.length=0,Rf(),zl&&(zl.removeEventListener(pu,Cc),zl.removeEventListener(xu,rf)),ru.clear(),ql.clear(),Ho.clear(),bl.clear(),hs.clear(),Qo.clear(),Ws.clear(),is&&is.clear(),jl.forEach(function(N){N()})}function wf(N){function $(Dr){var Xr=e({},Dr);delete Xr.uniforms,delete Xr.attributes,delete Xr.context,delete Xr.vao,"stencil"in Xr&&Xr.stencil.op&&(Xr.stencil.opBack=Xr.stencil.opFront=Xr.stencil.op,delete Xr.stencil.op);function Gr(Fr){if(Fr in Xr){var Kr=Xr[Fr];delete Xr[Fr],Object.keys(Kr).forEach(function(Cr){Xr[Fr+"."+Cr]=Kr[Cr]})}}return Gr("blend"),Gr("depth"),Gr("cull"),Gr("stencil"),Gr("polygonOffset"),Gr("scissor"),Gr("sample"),"vao"in Dr&&(Xr.vao=Dr.vao),Xr}function we(Dr,Xr){var Gr={},Fr={};return Object.keys(Dr).forEach(function(Kr){var Cr=Dr[Kr];if(h.isDynamic(Cr)){Fr[Kr]=h.unbox(Cr,Kr);return}else if(Xr&&Array.isArray(Cr)){for(var yi=0;yi<Cr.length;++yi)if(h.isDynamic(Cr[yi])){Fr[Kr]=h.unbox(Cr,Kr);return}}Gr[Kr]=Cr}),{dynamic:Fr,static:Gr}}var ge=we(N.context||{},!0),Ue=we(N.uniforms||{},!0),dt=we(N.attributes||{},!1),Rt=we($(N),!1),ur={gpuTime:0,cpuTime:0,count:0},gr=yl.compile(Rt,dt,Ue,ge,ur),cr=gr.draw,It=gr.batch,Qt=gr.scope,ar=[];function mr(Dr){for(;ar.length<Dr;)ar.push(null);return ar}function Pr(Dr,Xr){var Gr;if(typeof Dr=="function")return Qt.call(this,null,Dr,0);if(typeof Xr=="function")if(typeof Dr=="number")for(Gr=0;Gr<Dr;++Gr)Qt.call(this,null,Xr,Gr);else if(Array.isArray(Dr))for(Gr=0;Gr<Dr.length;++Gr)Qt.call(this,Dr[Gr],Xr,Gr);else return Qt.call(this,Dr,Xr,0);else if(typeof Dr=="number"){if(Dr>0)return It.call(this,mr(Dr|0),Dr|0)}else if(Array.isArray(Dr)){if(Dr.length)return It.call(this,Dr,Dr.length)}else return cr.call(this,Dr)}return e(Pr,{stats:ur,destroy:function(){gr.destroy()}})}var pc=ql.setFBO=wf({framebuffer:h.define.call(null,of,"framebuffer")});function vc(N,$){var we=0;yl.procs.poll();var ge=$.color;ge&&(_i.clearColor(+ge[0]||0,+ge[1]||0,+ge[2]||0,+ge[3]||0),we|=qu),"depth"in $&&(_i.clearDepth(+$.depth),we|=Ju),"stencil"in $&&(_i.clearStencil($.stencil|0),we|=qo),_i.clear(we)}function qc(N){if("framebuffer"in N)if(N.framebuffer&&N.framebuffer_reglType==="framebufferCube")for(var $=0;$<6;++$)pc(e({framebuffer:N.framebuffer.faces[$]},N),vc);else pc(N,vc);else vc(null,N)}function If(N){lu.push(N);function $(){var we=hf(lu,N);function ge(){var Ue=hf(lu,ge);lu[Ue]=lu[lu.length-1],lu.length-=1,lu.length<=0&&Rf()}lu[we]=ge}return Ru(),{cancel:$}}function Tc(){var N=js.viewport,$=js.scissor_box;N[0]=N[1]=$[0]=$[1]=0,Do.viewportWidth=Do.framebufferWidth=Do.drawingBufferWidth=N[2]=$[2]=_i.drawingBufferWidth,Do.viewportHeight=Do.framebufferHeight=Do.drawingBufferHeight=N[3]=$[3]=_i.drawingBufferHeight}function zc(){Do.tick+=1,Do.time=Bc(),Tc(),yl.procs.poll()}function Vu(){hs.refresh(),Tc(),yl.procs.refresh(),is&&is.update()}function Bc(){return(p()-su)/1e3}Vu();function Ou(N,$){var we;switch(N){case"frame":return If($);case"lost":we=bu;break;case"restore":we=al;break;case"destroy":we=jl;break;default:}return we.push($),{cancel:function(){for(var ge=0;ge<we.length;++ge)if(we[ge]===$){we[ge]=we[we.length-1],we.pop();return}}}}function Y(){return Vs}function R(N){Object.entries(N).forEach(function($){Vs[$[0]]=$[1]})}var K=e(wf,{clear:qc,prop:h.define.bind(null,of),context:h.define.bind(null,ff),this:h.define.bind(null,xf),draw:wf({}),buffer:function(N){return Ws.create(N,Rl,!1,!1)},elements:function(N){return Qo.create(N,!1)},texture:hs.create2D,cube:hs.createCube,renderbuffer:Ho.create,framebuffer:ql.create,framebufferCube:ql.createCube,vao:bl.createVAO,attributes:Mn,frame:If,on:Ou,limits:Es,hasExtension:function(N){return Es.extensions.indexOf(N.toLowerCase())>=0},read:tl,destroy:Lc,_gl:_i,_refresh:Vu,poll:function(){zc(),is&&is.update()},now:Bc,stats:Io,getCachedCode:Y,preloadCachedCode:R});return jr.onDone(null,K),K}return dc})});var HBe=Se((Ngr,VBe)=>{"use strict";var zNt=Zm();VBe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},NBe(t)?t={container:t}:PNt(t)?t={container:t}:INt(t)?t={gl:t}:t=zNt(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}NBe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=UBe(),t.container.appendChild(t.canvas),OBe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=UBe(),t.container.appendChild(t.canvas),OBe(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 OBe(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 NBe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function PNt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function INt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function UBe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var WBe=Se((Ugr,GBe)=>{"use strict";var DNt=JY(),RNt=[32,126];GBe.exports=FNt;function FNt(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||RNt;if(n&&typeof n!="string"&&(n=DNt(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],u=0;s<=a[1];s++)o[u++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var l=r.getContext("2d");l.fillStyle="#000",l.fillRect(0,0,r.width,r.height),l.font=n,l.textAlign="center",l.textBaseline="middle",l.fillStyle="#fff";for(var f=i[0]/2,c=i[1]/2,s=0;s<a.length;s++)l.fillText(a[s],f,c),(f+=i[0])>t[0]-i[0]/2&&(f=i[0]/2,c+=i[1]);return r}});var rK=Se(Hh=>{"use strict";"use restrict";var tK=32;Hh.INT_BITS=tK;Hh.INT_MAX=2147483647;Hh.INT_MIN=-1<<tK-1;Hh.sign=function(e){return(e>0)-(e<0)};Hh.abs=function(e){var t=e>>tK-1;return(e^t)-t};Hh.min=function(e,t){return t^(e^t)&-(e<t)};Hh.max=function(e,t){return e^(e^t)&-(e<t)};Hh.isPow2=function(e){return!(e&e-1)&&!!e};Hh.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};Hh.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};Hh.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function jBe(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}Hh.countTrailingZeros=jBe;Hh.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};Hh.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Hh.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var gk=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}})(gk);Hh.reverse=function(e){return gk[e&255]<<24|gk[e>>>8&255]<<16|gk[e>>>16&255]<<8|gk[e>>>24&255]};Hh.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};Hh.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};Hh.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};Hh.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};Hh.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>jBe(e)+1}});var YBe=Se((Hgr,XBe)=>{"use strict";function ZBe(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]=ZBe(e,t,r+1);return i}function qNt(e,t){var r,n;for(r=new Array(e),n=0;n<e;++n)r[n]=t;return r}function BNt(e,t){switch(typeof t=="undefined"&&(t=0),typeof e){case"number":if(e>0)return qNt(e|0,t);break;case"object":if(typeof e.length=="number")return ZBe(e,t,0);break}return[]}XBe.exports=BNt});var fOe=Se(jf=>{"use strict";var fx=rK(),Mp=YBe(),KBe=u2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Mp([32,0]),UINT16:Mp([32,0]),UINT32:Mp([32,0]),BIGUINT64:Mp([32,0]),INT8:Mp([32,0]),INT16:Mp([32,0]),INT32:Mp([32,0]),BIGINT64:Mp([32,0]),FLOAT:Mp([32,0]),DOUBLE:Mp([32,0]),DATA:Mp([32,0]),UINT8C:Mp([32,0]),BUFFER:Mp([32,0])});var ONt=typeof Uint8ClampedArray!="undefined",NNt=typeof BigUint64Array!="undefined",UNt=typeof BigInt64Array!="undefined",sd=window.__TYPEDARRAY_POOL;sd.UINT8C||(sd.UINT8C=Mp([32,0]));sd.BIGUINT64||(sd.BIGUINT64=Mp([32,0]));sd.BIGINT64||(sd.BIGINT64=Mp([32,0]));sd.BUFFER||(sd.BUFFER=Mp([32,0]));var d9=sd.DATA,p9=sd.BUFFER;jf.free=function(t){if(KBe.isBuffer(t))p9[fx.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=fx.log2(r)|0;d9[n].push(t)}};function JBe(e){if(e){var t=e.length||e.byteLength,r=fx.log2(t);d9[r].push(e)}}function VNt(e){JBe(e.buffer)}jf.freeUint8=jf.freeUint16=jf.freeUint32=jf.freeBigUint64=jf.freeInt8=jf.freeInt16=jf.freeInt32=jf.freeBigInt64=jf.freeFloat32=jf.freeFloat=jf.freeFloat64=jf.freeDouble=jf.freeUint8Clamped=jf.freeDataView=VNt;jf.freeArrayBuffer=JBe;jf.freeBuffer=function(t){p9[fx.log2(t.length)].push(t)};jf.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Ov(t);switch(r){case"uint8":return iK(t);case"uint16":return $Be(t);case"uint32":return QBe(t);case"int8":return eOe(t);case"int16":return tOe(t);case"int32":return rOe(t);case"float":case"float32":return iOe(t);case"double":case"float64":return nOe(t);case"uint8_clamped":return aOe(t);case"bigint64":return sOe(t);case"biguint64":return oOe(t);case"buffer":return uOe(t);case"data":case"dataview":return lOe(t);default:return null}return null};function Ov(t){var t=fx.nextPow2(t),r=fx.log2(t),n=d9[r];return n.length>0?n.pop():new ArrayBuffer(t)}jf.mallocArrayBuffer=Ov;function iK(e){return new Uint8Array(Ov(e),0,e)}jf.mallocUint8=iK;function $Be(e){return new Uint16Array(Ov(2*e),0,e)}jf.mallocUint16=$Be;function QBe(e){return new Uint32Array(Ov(4*e),0,e)}jf.mallocUint32=QBe;function eOe(e){return new Int8Array(Ov(e),0,e)}jf.mallocInt8=eOe;function tOe(e){return new Int16Array(Ov(2*e),0,e)}jf.mallocInt16=tOe;function rOe(e){return new Int32Array(Ov(4*e),0,e)}jf.mallocInt32=rOe;function iOe(e){return new Float32Array(Ov(4*e),0,e)}jf.mallocFloat32=jf.mallocFloat=iOe;function nOe(e){return new Float64Array(Ov(8*e),0,e)}jf.mallocFloat64=jf.mallocDouble=nOe;function aOe(e){return ONt?new Uint8ClampedArray(Ov(e),0,e):iK(e)}jf.mallocUint8Clamped=aOe;function oOe(e){return NNt?new BigUint64Array(Ov(8*e),0,e):null}jf.mallocBigUint64=oOe;function sOe(e){return UNt?new BigInt64Array(Ov(8*e),0,e):null}jf.mallocBigInt64=sOe;function lOe(e){return new DataView(Ov(e),0,e)}jf.mallocDataView=lOe;function uOe(e){e=fx.nextPow2(e);var t=fx.log2(e),r=p9[t];return r.length>0?r.pop():new KBe(e)}jf.mallocBuffer=uOe;jf.clearCache=function(){for(var t=0;t<32;++t)sd.UINT8[t].length=0,sd.UINT16[t].length=0,sd.UINT32[t].length=0,sd.INT8[t].length=0,sd.INT16[t].length=0,sd.INT32[t].length=0,sd.FLOAT[t].length=0,sd.DOUBLE[t].length=0,sd.BIGUINT64[t].length=0,sd.BIGINT64[t].length=0,sd.UINT8C[t].length=0,d9[t].length=0,p9[t].length=0}});var hOe=Se((Wgr,cOe)=>{"use strict";var HNt=Object.prototype.toString;cOe.exports=function(e){var t;return HNt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var nK=Se((jgr,dOe)=>{dOe.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 yOe=Se((Zgr,vOe)=>{"use strict";var GNt=nK();vOe.exports=pOe;var _k=96;function aK(e,t){var r=GNt(getComputedStyle(e).getPropertyValue(t));return r[0]*pOe(r[1],e)}function WNt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=aK(r,"font-size")/128;return t.removeChild(r),n}function pOe(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 WNt(e,t);case"em":return aK(t,"font-size");case"rem":return aK(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 _k;case"cm":return _k/2.54;case"mm":return _k/25.4;case"pt":return _k/72;case"pc":return _k/6}return 1}});var _Oe=Se((Xgr,gOe)=>{"use strict";gOe.exports=m9;var jNt=m9.canvas=document.createElement("canvas"),v9=jNt.getContext("2d"),mOe=y9([32,126]);m9.createPairs=y9;m9.ascii=mOe;function m9(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?n=y9(t):Array.isArray(t)?n=t:(t.o?n=y9(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=mOe),v9.font=i+"px "+e;for(var o=0;o<n.length;o++){var s=n[o],u=v9.measureText(s[0]).width+v9.measureText(s[1]).width,l=v9.measureText(s).width;if(Math.abs(u-l)>i*a){var f=(l-u)/i;r[s]=f*1e3}}return r}function y9(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 TOe=Se((Ygr,wOe)=>{"use strict";wOe.exports=cx;cx.canvas=document.createElement("canvas");cx.cache={};function cx(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(cx.cache[r]&&n<=cx.cache[r].em)return xOe(cx.cache[r],s);var u=t.canvas||cx.canvas,l=u.getContext("2d"),f={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"},c=Math.ceil(n*1.5);u.height=c,u.width=c*.5,l.font=o;var h="H",d={top:0};l.clearRect(0,0,c,c),l.textBaseline="top",l.fillStyle="black",l.fillText(h,0,0);var p=Ym(l.getImageData(0,0,c,c));l.clearRect(0,0,c,c),l.textBaseline="bottom",l.fillText(h,0,c);var x=Ym(l.getImageData(0,0,c,c));d.lineHeight=d.bottom=c-x+p,l.clearRect(0,0,c,c),l.textBaseline="alphabetic",l.fillText(h,0,c);var b=Ym(l.getImageData(0,0,c,c)),y=c-b-1+p;d.baseline=d.alphabetic=y,l.clearRect(0,0,c,c),l.textBaseline="middle",l.fillText(h,0,c*.5);var k=Ym(l.getImageData(0,0,c,c));d.median=d.middle=c-k-1+p-c*.5,l.clearRect(0,0,c,c),l.textBaseline="hanging",l.fillText(h,0,c*.5);var E=Ym(l.getImageData(0,0,c,c));d.hanging=c-E-1+p-c*.5,l.clearRect(0,0,c,c),l.textBaseline="ideographic",l.fillText(h,0,c);var A=Ym(l.getImageData(0,0,c,c));if(d.ideographic=c-A-1+p,f.upper&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.upper,0,0),d.upper=Ym(l.getImageData(0,0,c,c)),d.capHeight=d.baseline-d.upper),f.lower&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.lower,0,0),d.lower=Ym(l.getImageData(0,0,c,c)),d.xHeight=d.baseline-d.lower),f.tittle&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.tittle,0,0),d.tittle=Ym(l.getImageData(0,0,c,c))),f.ascent&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.ascent,0,0),d.ascent=Ym(l.getImageData(0,0,c,c))),f.descent&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.descent,0,0),d.descent=bOe(l.getImageData(0,0,c,c))),f.overshoot){l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.overshoot,0,0);var L=bOe(l.getImageData(0,0,c,c));d.overshoot=L-y}for(var _ in d)d[_]/=n;return d.em=n,cx.cache[r]=d,xOe(d,s)}function xOe(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 Ym(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 bOe(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 EOe=Se((Kgr,MOe)=>{"use strict";var hS=BBe(),ZNt=Zm(),XNt=eK(),YNt=HBe(),KNt=qY(),oK=J_(),JNt=WBe(),hx=fOe(),$Nt=eS(),QNt=hOe(),e7t=nK(),t7t=yOe(),r7t=_Oe(),i7t=Uh(),n7t=TOe(),a7t=j2(),o7t=rK(),AOe=o7t.nextPow2,SOe=new KNt,_9=!1;document.body&&(g9=document.body.appendChild(document.createElement("div")),g9.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(g9).fontStretch&&(_9=!0),document.body.removeChild(g9));var g9,wc=function(t){s7t(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=YNt(t),this.shader=SOe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||XNt({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(),SOe.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(QNt(t)?t:{})};wc.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:`
			precision highp float;
			attribute float width, charOffset, char;
			attribute vec2 position;
			uniform float fontSize, charStep, em, align, baseline;
			uniform vec4 viewport;
			uniform vec4 color;
			uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;
			varying vec2 charCoord, charId;
			varying float charWidth;
			varying vec4 fontColor;
			void main () {
				vec2 offset = floor(em * (vec2(align + charOffset, baseline)
					+ vec2(positionOffset.x, -positionOffset.y)))
					/ (viewport.zw * scale.xy);

				vec2 position = (position + translate) * scale;
				position += offset * scale;

				charCoord = position * viewport.zw + viewport.xy;

				gl_Position = vec4(position * 2. - 1., 0, 1);

				gl_PointSize = charStep;

				charId.x = mod(char, atlasDim.x);
				charId.y = floor(char / atlasDim.x);

				charWidth = width * em;

				fontColor = color / 255.;
			}`,frag:`
			precision highp float;
			uniform float fontSize, charStep, opacity;
			uniform vec2 atlasSize;
			uniform vec4 viewport;
			uniform sampler2D atlas;
			varying vec4 fontColor;
			varying vec2 charCoord, charId;
			varying float charWidth;

			float lightness(vec4 color) {
				return color.r * 0.299 + color.g * 0.587 + color.b * 0.114;
			}

			void main () {
				vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;
				float halfCharStep = floor(charStep * .5 + .5);

				// invert y and shift by 1px (FF expecially needs that)
				uv.y = charStep - uv.y;

				// ignore points outside of character bounding box
				float halfCharWidth = ceil(charWidth * .5);
				if (floor(uv.x) > halfCharStep + halfCharWidth ||
					floor(uv.x) < halfCharStep - halfCharWidth) return;

				uv += charId * charStep;
				uv = uv / atlasSize;

				vec4 color = fontColor;
				vec4 mask = texture2D(atlas, uv);

				float maskY = lightness(mask);
				// float colorY = lightness(color);
				color.a *= maskY;
				color.a *= opacity;

				// color.a += .1;

				// antialiasing, see yiq color space y-channel formula
				// color.rgb += (1. - color.rgb) * (1. - mask.rgb);

				gl_FragColor = color;
			}`}),n={};return{regl:t,draw:r,atlas:n}};wc.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=ZNt(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(Ce){return parseFloat(Ce)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=$Nt(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=a7t(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=wc.baseFontSize+"px sans-serif");var n=!1,i=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(Ce,he){if(typeof Ce=="string")try{Ce=hS.parse(Ce)}catch(Ze){Ce=hS.parse(wc.baseFontSize+"px "+Ce)}else{var te=Ce.style,ke=Ce.weight,Ee=Ce.stretch,Me=Ce.variant;Ce=hS.parse(hS.stringify(Ce)),te&&(Ce.style=te),ke&&(Ce.weight=ke),Ee&&(Ce.stretch=Ee),Me&&(Ce.variant=Me)}var Oe=hS.stringify({size:wc.baseFontSize,family:Ce.family,stretch:_9?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style}),Re=e7t(Ce.size),me=Math.round(Re[0]*t7t(Re[1]));if(me!==r.fontSize[he]&&(i=!0,r.fontSize[he]=me),(!r.font[he]||Oe!=r.font[he].baseString)&&(n=!0,r.font[he]=wc.fonts[Oe],!r.font[he])){var Be=Ce.family.join(", "),fe=[Ce.style];Ce.style!=Ce.variant&&fe.push(Ce.variant),Ce.variant!=Ce.weight&&fe.push(Ce.weight),_9&&Ce.weight!=Ce.stretch&&fe.push(Ce.stretch),r.font[he]={baseString:Oe,family:Be,weight:Ce.weight,stretch:Ce.stretch,style:Ce.style,variant:Ce.variant,width:{},kerning:{},metrics:n7t(Be,{origin:"top",fontSize:wc.baseFontSize,fontStyle:fe.join(" ")})},wc.fonts[Oe]=r.font[he]}}),(n||i)&&this.font.forEach(function(Ce,he){var te=hS.stringify({size:r.fontSize[he],family:Ce.family,stretch:_9?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style});if(r.fontAtlas[he]=r.shader.atlas[te],!r.fontAtlas[he]){var ke=Ce.metrics;r.shader.atlas[te]=r.fontAtlas[he]={fontString:te,step:Math.ceil(r.fontSize[he]*ke.bottom*.5)*2,em:r.fontSize[he],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 u=1;u<t.text.length;u++)this.textOffsets[u]=this.textOffsets[u-1]+t.text[u-1].length,this.count+=t.text[u].length,this.counts.push(t.text[u].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(Ce,he){wc.atlasContext.font=Ce.baseString;for(var te=r.fontAtlas[he],ke=0;ke<r.text.length;ke++){var Ee=r.text.charAt(ke);if(te.ids[Ee]==null&&(te.ids[Ee]=te.chars.length,te.chars.push(Ee),s.push(Ee)),Ce.width[Ee]==null&&(Ce.width[Ee]=wc.atlasContext.measureText(Ee).width/wc.baseFontSize,r.kerning)){var Me=[];for(var Oe in Ce.width)Me.push(Oe+Ee,Ee+Oe);i7t(Ce.kerning,r7t(Ce.family,{pairs:Me}))}}})}if(t.position)if(t.position.length>2){for(var l=!t.position[0].length,f=hx.mallocFloat(this.count*2),c=0,h=0;c<this.counts.length;c++){var d=this.counts[c];if(l)for(var p=0;p<d;p++)f[h++]=t.position[c*2],f[h++]=t.position[c*2+1];else for(var x=0;x<d;x++)f[h++]=t.position[c][0],f[h++]=t.position[c][1]}this.position.call?this.position({type:"float",data:f}):this.position=this.regl.buffer({type:"float",data:f}),hx.freeFloat(f)}else this.position.destroy&&this.position.destroy(),this.position={constant:t.position};if(t.text||n){var b=hx.mallocUint8(this.count),y=hx.mallocFloat(this.count*2);this.textWidth=[];for(var k=0,E=0;k<this.counts.length;k++){for(var A=this.counts[k],L=this.font[k]||this.font[0],_=this.fontAtlas[k]||this.fontAtlas[0],C=0;C<A;C++){var M=this.text.charAt(E),v=this.text.charAt(E-1);if(b[E]=_.ids[M],y[E*2]=L.width[M],C){var z=y[E*2-2],T=y[E*2],F=y[E*2-1],q=F+z*.5+T*.5;if(this.kerning){var U=L.kerning[v+M];U&&(q+=U*.001)}y[E*2+1]=q}else y[E*2+1]=y[E*2]*.5;E++}this.textWidth.push(y.length?y[E*2-2]*.5+y[E*2-1]:0)}t.align||(t.align=this.align),this.charBuffer({data:b,type:"uint8",usage:"stream"}),this.sizeBuffer({data:y,type:"float",usage:"stream"}),hx.freeUint8(b),hx.freeFloat(y),s.length&&this.font.forEach(function(Ce,he){var te=r.fontAtlas[he],ke=te.step,Ee=Math.floor(wc.maxAtlasSize/ke),Me=Math.min(Ee,te.chars.length),Oe=Math.ceil(te.chars.length/Me),Re=AOe(Me*ke),me=AOe(Oe*ke);te.width=Re,te.height=me,te.rows=Oe,te.cols=Me,te.em&&te.texture({data:JNt({canvas:wc.atlasCanvas,font:te.fontString,chars:te.chars,shape:[Re,me],step:[ke,ke]})})})}if(t.align&&(this.align=t.align,this.alignOffset=this.textWidth.map(function(Ce,he){var te=Array.isArray(r.align)?r.align.length>1?r.align[he]:r.align[0]:r.align;if(typeof te=="number")return te;switch(te){case"right":case"end":return-Ce;case"center":case"centre":case"middle":return-Ce*.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(Ce,he){var te=(r.font[he]||r.font[0]).metrics,ke=0;return ke+=te.bottom*.5,typeof Ce=="number"?ke+=Ce-te.baseline:ke+=-te[Ce],ke*=-1,ke})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=oK(t.color,"uint8");else{var H;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var j=t.color.length;H=hx.mallocUint8(j);for(var G=(t.color.subarray||t.color.slice).bind(t.color),O=0;O<j;O+=4)H.set(oK(G(O,O+4),"uint8"),O)}else{var W=t.color.length;H=hx.mallocUint8(W*4);for(var re=0;re<W;re++)H.set(oK(t.color[re]||0,"uint8"),re*4)}this.color=H}if(t.position||t.text||t.color||t.baseline||t.align||t.font||t.offset||t.opacity){var ne=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ne){var be=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(be);for(var ze=0;ze<this.batch.length;ze++)this.batch[ze]={count:this.counts.length>1?this.counts[ze]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ze]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ze*4,ze*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ze]:this.opacity,baseline:this.baselineOffset[ze]!=null?this.baselineOffset[ze]:this.baselineOffset[0],align:this.align?this.alignOffset[ze]!=null?this.alignOffset[ze]:this.alignOffset[0]:0,atlas:this.fontAtlas[ze]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ze*2,ze*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=[]}};wc.prototype.destroy=function(){};wc.prototype.kerning=!0;wc.prototype.position={constant:new Float32Array(2)};wc.prototype.translate=null;wc.prototype.scale=null;wc.prototype.font=null;wc.prototype.text="";wc.prototype.positionOffset=[0,0];wc.prototype.opacity=1;wc.prototype.color=new Uint8Array([0,0,0,255]);wc.prototype.alignOffset=[0,0];wc.maxAtlasSize=1024;wc.atlasCanvas=document.createElement("canvas");wc.atlasContext=wc.atlasCanvas.getContext("2d",{alpha:!1});wc.baseFontSize=64;wc.fonts={};function s7t(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}MOe.exports=wc});var x9=Se((Jgr,kOe)=>{"use strict";var l7t=SZ(),u7t=eK();kOe.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=u7t({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||l7t({container:i._glcontainer.node()}),a}});var uK=Se((lK,IOe)=>{"use strict";var COe=uY(),LOe=NY(),f7t=_Be(),zOe=EOe(),sK=Zr(),c7t=Sy().selectMode,h7t=x9(),d7t=ec(),p7t=wU(),v7t=aY().styleTextSelection,POe={};function y7t(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,u=i.b*n,l=i.r*n,f=i.t*n,c=i.w*n,h=i.h*n;return[s+t.domain[0]*c,u+r.domain[0]*h,a-l-(1-t.domain[1])*c,o-f-(1-r.domain[1])*h]}var lK=IOe.exports=function(t,r,n){if(n.length){var i=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,u,l;if(a){var f=h7t(t,["ANGLE_instanced_arrays","OES_element_index_uint"],POe);if(!f){a.init();return}var c=a.count,h=i._glcanvas.data()[0].regl;if(p7t(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({}),a.error2d===!0&&(a.error2d=f7t(h)),a.line2d===!0&&(a.line2d=LOe(h)),a.scatter2d===!0&&(a.scatter2d=COe(h)),a.fill2d===!0&&(a.fill2d=LOe(h)),a.glText===!0)for(a.glText=new Array(c),u=0;u<c;u++)a.glText[u]=new zOe(h);if(a.glText){if(c>a.glText.length){var d=c-a.glText.length;for(u=0;u<d;u++)a.glText.push(new zOe(h))}else if(c<a.glText.length){var p=a.glText.length-c,x=a.glText.splice(c,p);x.forEach(function(W){W.destroy()})}for(u=0;u<c;u++)a.glText[u].update(a.textOptions[u])}if(a.line2d&&(a.line2d.update(a.lineOptions),a.lineOptions=a.lineOptions.map(function(W){if(W&&W.positions){for(var re=W.positions,ne=0;ne<re.length&&(isNaN(re[ne])||isNaN(re[ne+1]));)ne+=2;for(var be=re.length-2;be>ne&&(isNaN(re[be])||isNaN(re[be+1]));)be-=2;W.positions=re.slice(ne,be+2)}return W}),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=sK.repeat(null,c),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(W,re){var ne=n[re];if(!(!W||!ne||!ne[0]||!ne[0].trace)){var be=ne[0],ze=be.trace,Ce=be.t,he=a.lineOptions[re],te,ke,Ee=[];ze._ownfill&&Ee.push(re),ze._nexttrace&&Ee.push(re+1),Ee.length&&(a.fillOrder[re]=Ee);var Me=[],Oe=he&&he.positions||Ce.positions,Re,me;if(ze.fill==="tozeroy"){for(Re=0;Re<Oe.length&&isNaN(Oe[Re+1]);)Re+=2;for(me=Oe.length-2;me>Re&&isNaN(Oe[me+1]);)me-=2;Oe[Re+1]!==0&&(Me=[Oe[Re],0]),Me=Me.concat(Oe.slice(Re,me+2)),Oe[me+1]!==0&&(Me=Me.concat([Oe[me],0]))}else if(ze.fill==="tozerox"){for(Re=0;Re<Oe.length&&isNaN(Oe[Re]);)Re+=2;for(me=Oe.length-2;me>Re&&isNaN(Oe[me]);)me-=2;Oe[Re]!==0&&(Me=[0,Oe[Re+1]]),Me=Me.concat(Oe.slice(Re,me+2)),Oe[me]!==0&&(Me=Me.concat([0,Oe[me+1]]))}else if(ze.fill==="toself"||ze.fill==="tonext"){for(Me=[],te=0,W.splitNull=!0,ke=0;ke<Oe.length;ke+=2)(isNaN(Oe[ke])||isNaN(Oe[ke+1]))&&(Me=Me.concat(Oe.slice(te,ke)),Me.push(Oe[te],Oe[te+1]),Me.push(null,null),te=ke+2);Me=Me.concat(Oe.slice(te)),te&&Me.push(Oe[te],Oe[te+1])}else{var Be=ze._nexttrace;if(Be){var fe=a.lineOptions[re+1];if(fe){var Ze=fe.positions;if(ze.fill==="tonexty"){for(Me=Oe.slice(),re=Math.floor(Ze.length/2);re--;){var et=Ze[re*2],gt=Ze[re*2+1];isNaN(et)||isNaN(gt)||Me.push(et,gt)}W.fill=Be.fillcolor}}}}if(ze._prevtrace&&ze._prevtrace.fill==="tonext"){var Pt=a.lineOptions[re-1].positions,Qe=Me.length/2;te=Qe;var Xe=[te];for(ke=0;ke<Pt.length;ke+=2)(isNaN(Pt[ke])||isNaN(Pt[ke+1]))&&(Xe.push(ke/2+Qe+1),te=ke+2);Me=Me.concat(Pt),W.hole=Xe}return W.fillmode=ze.fill,W.opacity=ze.opacity,W.positions=Me,W}}),a.fill2d.update(a.fillOptions))}var y=i.dragmode,k=c7t(y),E=i.clickmode.indexOf("select")>-1;for(u=0;u<c;u++){var A=n[u][0],L=A.trace,_=A.t,C=_.index,M=L._length,v=_.x,z=_.y;if(L.selectedpoints||k||E){if(k||(k=!0),L.selectedpoints){var T=a.selectBatch[C]=sK.selIndices2selPoints(L),F={};for(l=0;l<T.length;l++)F[T[l]]=1;var q=[];for(l=0;l<M;l++)F[l]||q.push(l);a.unselectBatch[C]=q}var U=_.xpx=new Array(M),H=_.ypx=new Array(M);for(l=0;l<M;l++)U[l]=o.c2p(v[l]),H[l]=s.c2p(z[l])}else _.xpx=_.ypx=null}if(k){if(a.select2d||(a.select2d=COe(i._glcanvas.data()[1].regl)),a.scatter2d){var j=new Array(c);for(u=0;u<c;u++)j[u]=a.selectBatch[u].length||a.unselectBatch[u].length?a.markerUnselectedOptions[u]:{};a.scatter2d.update(j)}a.select2d&&(a.select2d.update(a.markerOptions),a.select2d.update(a.markerSelectedOptions)),a.glText&&n.forEach(function(W){var re=((W||[])[0]||{}).trace||{};d7t.hasText(re)&&v7t(W)})}else a.scatter2d&&a.scatter2d.update(a.markerOptions);var G={viewport:y7t(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]]},O=sK.repeat(G,a.count);a.fill2d&&a.fill2d.update(O),a.line2d&&a.line2d.update(O),a.error2d&&a.error2d.update(O.concat(O)),a.scatter2d&&a.scatter2d.update(O),a.select2d&&a.select2d.update(O),a.glText&&a.glText.forEach(function(W){W.update(G)})}}};lK.reglPrecompiled=POe});var b9=Se(($gr,DOe)=>{DOe.exports=function(t,r,n){"use strict";var i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir;return i=t.gl,a=t.context,o=t.strings,s=t.next,u=t.current,l=t.draw,f=t.elements,c=t.buffer,h=t.shader,d=t.attributes,p=t.vao,x=t.uniforms,b=t.framebuffer,y=t.extensions,k=t.timer,E=t.isBufferArgs,A=s.blend_color,L=u.blend_color,_=s.blend_equation,C=u.blend_equation,M=s.blend_func,v=u.blend_func,z=s.depth_range,T=u.depth_range,F=s.colorMask,q=u.colorMask,U=s.polygonOffset_offset,H=u.polygonOffset_offset,j=s.sample_coverage,G=u.sample_coverage,O=s.stencil_func,W=u.stencil_func,re=s.stencil_opFront,ne=u.stencil_opFront,be=s.stencil_opBack,ze=u.stencil_opBack,Ce=s.scissor_box,he=u.scissor_box,te=s.viewport,ke=u.viewport,Ee={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Me={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},Oe={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},Re={add:32774,subtract:32778,"reverse subtract":32779},me={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Be={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},fe={cw:2304,ccw:2305},Ze=s.blend_color,et=u.blend_color,gt=s.blend_equation,Pt=u.blend_equation,Qe=s.blend_func,Xe=u.blend_func,Tt=s.depth_range,xt=u.depth_range,_t=s.colorMask,Ct=u.colorMask,jt=s.polygonOffset_offset,At=u.polygonOffset_offset,Te=s.sample_coverage,nt=u.sample_coverage,ut=s.stencil_func,ct=u.stencil_func,rt=s.stencil_opFront,je=u.stencil_opFront,tt=s.stencil_opBack,Je=u.stencil_opBack,Mt=s.scissor_box,Vt=u.scissor_box,Kt=s.viewport,ir=u.viewport,{poll:function(){var fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si;u.dirty=!1,Ot=s.dither,De=s.blend_enable,_e=s.depth_enable,Fe=s.cull_enable,Pe=s.polygonOffset_enable,Ie=s.sample_alpha,lt=s.sample_enable,ye=s.stencil_enable,ue=s.scissor_enable,de=s.depth_func,ht=u.depth_func,Et=s.depth_mask,St=u.depth_mask,Zt=s.cull_face,qr=u.cull_face,Lr=s.frontFace,vr=u.frontFace,Er=s.lineWidth,si=u.lineWidth,Ei=s.stencil_mask,Si=u.stencil_mask,fr=b.next,fr!==b.cur&&(fr?i.bindFramebuffer(36160,fr.framebuffer):i.bindFramebuffer(36160,null),b.cur=fr),Ot!==u.dither&&(Ot?i.enable(3024):i.disable(3024),u.dither=Ot),De!==u.blend_enable&&(De?i.enable(3042):i.disable(3042),u.blend_enable=De),_e!==u.depth_enable&&(_e?i.enable(2929):i.disable(2929),u.depth_enable=_e),Fe!==u.cull_enable&&(Fe?i.enable(2884):i.disable(2884),u.cull_enable=Fe),Pe!==u.polygonOffset_enable&&(Pe?i.enable(32823):i.disable(32823),u.polygonOffset_enable=Pe),Ie!==u.sample_alpha&&(Ie?i.enable(32926):i.disable(32926),u.sample_alpha=Ie),lt!==u.sample_enable&&(lt?i.enable(32928):i.disable(32928),u.sample_enable=lt),ye!==u.stencil_enable&&(ye?i.enable(2960):i.disable(2960),u.stencil_enable=ye),ue!==u.scissor_enable&&(ue?i.enable(3089):i.disable(3089),u.scissor_enable=ue),(Ze[0]!==et[0]||Ze[1]!==et[1]||Ze[2]!==et[2]||Ze[3]!==et[3])&&(i.blendColor(Ze[0],Ze[1],Ze[2],Ze[3]),et[0]=Ze[0],et[1]=Ze[1],et[2]=Ze[2],et[3]=Ze[3]),(gt[0]!==Pt[0]||gt[1]!==Pt[1])&&(i.blendEquationSeparate(gt[0],gt[1]),Pt[0]=gt[0],Pt[1]=gt[1]),(Qe[0]!==Xe[0]||Qe[1]!==Xe[1]||Qe[2]!==Xe[2]||Qe[3]!==Xe[3])&&(i.blendFuncSeparate(Qe[0],Qe[1],Qe[2],Qe[3]),Xe[0]=Qe[0],Xe[1]=Qe[1],Xe[2]=Qe[2],Xe[3]=Qe[3]),de!==ht&&(i.depthFunc(de),u.depth_func=de),(Tt[0]!==xt[0]||Tt[1]!==xt[1])&&(i.depthRange(Tt[0],Tt[1]),xt[0]=Tt[0],xt[1]=Tt[1]),Et!==St&&(i.depthMask(Et),u.depth_mask=Et),(_t[0]!==Ct[0]||_t[1]!==Ct[1]||_t[2]!==Ct[2]||_t[3]!==Ct[3])&&(i.colorMask(_t[0],_t[1],_t[2],_t[3]),Ct[0]=_t[0],Ct[1]=_t[1],Ct[2]=_t[2],Ct[3]=_t[3]),Zt!==qr&&(i.cullFace(Zt),u.cull_face=Zt),Lr!==vr&&(i.frontFace(Lr),u.frontFace=Lr),Er!==si&&(i.lineWidth(Er),u.lineWidth=Er),(jt[0]!==At[0]||jt[1]!==At[1])&&(i.polygonOffset(jt[0],jt[1]),At[0]=jt[0],At[1]=jt[1]),(Te[0]!==nt[0]||Te[1]!==nt[1])&&(i.sampleCoverage(Te[0],Te[1]),nt[0]=Te[0],nt[1]=Te[1]),Ei!==Si&&(i.stencilMask(Ei),u.stencil_mask=Ei),(ut[0]!==ct[0]||ut[1]!==ct[1]||ut[2]!==ct[2])&&(i.stencilFunc(ut[0],ut[1],ut[2]),ct[0]=ut[0],ct[1]=ut[1],ct[2]=ut[2]),(rt[0]!==je[0]||rt[1]!==je[1]||rt[2]!==je[2]||rt[3]!==je[3])&&(i.stencilOpSeparate(rt[0],rt[1],rt[2],rt[3]),je[0]=rt[0],je[1]=rt[1],je[2]=rt[2],je[3]=rt[3]),(tt[0]!==Je[0]||tt[1]!==Je[1]||tt[2]!==Je[2]||tt[3]!==Je[3])&&(i.stencilOpSeparate(tt[0],tt[1],tt[2],tt[3]),Je[0]=tt[0],Je[1]=tt[1],Je[2]=tt[2],Je[3]=tt[3]),(Mt[0]!==Vt[0]||Mt[1]!==Vt[1]||Mt[2]!==Vt[2]||Mt[3]!==Vt[3])&&(i.scissor(Mt[0],Mt[1],Mt[2],Mt[3]),Vt[0]=Mt[0],Vt[1]=Mt[1],Vt[2]=Mt[2],Vt[3]=Mt[3]),(Kt[0]!==ir[0]||Kt[1]!==ir[1]||Kt[2]!==ir[2]||Kt[3]!==ir[3])&&(i.viewport(Kt[0],Kt[1],Kt[2],Kt[3]),ir[0]=Kt[0],ir[1]=Kt[1],ir[2]=Kt[2],ir[3]=Kt[3])},refresh:function(){var fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi;u.dirty=!1,_e=s.dither,Fe=s.blend_enable,Pe=s.depth_enable,Ie=s.cull_enable,lt=s.polygonOffset_enable,ye=s.sample_alpha,ue=s.sample_enable,de=s.stencil_enable,ht=s.scissor_enable,Et=s.depth_func,St=u.depth_func,Zt=s.depth_mask,qr=u.depth_mask,Lr=s.cull_face,vr=u.cull_face,Er=s.frontFace,si=u.frontFace,Ei=s.lineWidth,Si=u.lineWidth,xi=s.stencil_mask,Hi=u.stencil_mask,fr=b.next,fr?i.bindFramebuffer(36160,fr.framebuffer):i.bindFramebuffer(36160,null),b.cur=fr,Ot=d,De=0;for(var Jr=0;Jr<n;++Jr)De=Ot[Jr],De.buffer?(i.enableVertexAttribArray(Jr),i.bindBuffer(34962,De.buffer.buffer),i.vertexAttribPointer(Jr,De.size,De.type,De.normalized,De.stride,De.offset)):(i.disableVertexAttribArray(Jr),i.vertexAttrib4f(Jr,De.x,De.y,De.z,De.w),De.buffer=null);for(var Jr=0;Jr<n;++Jr)r.vertexAttribDivisorANGLE(Jr,Ot[Jr].divisor);p.currentVAO=null,p.setVAO(p.targetVAO),_e?i.enable(3024):i.disable(3024),u.dither=_e,Fe?i.enable(3042):i.disable(3042),u.blend_enable=Fe,Pe?i.enable(2929):i.disable(2929),u.depth_enable=Pe,Ie?i.enable(2884):i.disable(2884),u.cull_enable=Ie,lt?i.enable(32823):i.disable(32823),u.polygonOffset_enable=lt,ye?i.enable(32926):i.disable(32926),u.sample_alpha=ye,ue?i.enable(32928):i.disable(32928),u.sample_enable=ue,de?i.enable(2960):i.disable(2960),u.stencil_enable=de,ht?i.enable(3089):i.disable(3089),u.scissor_enable=ht,i.blendColor(Ze[0],Ze[1],Ze[2],Ze[3]),et[0]=Ze[0],et[1]=Ze[1],et[2]=Ze[2],et[3]=Ze[3],i.blendEquationSeparate(gt[0],gt[1]),Pt[0]=gt[0],Pt[1]=gt[1],i.blendFuncSeparate(Qe[0],Qe[1],Qe[2],Qe[3]),Xe[0]=Qe[0],Xe[1]=Qe[1],Xe[2]=Qe[2],Xe[3]=Qe[3],i.depthFunc(Et),u.depth_func=Et,i.depthRange(Tt[0],Tt[1]),xt[0]=Tt[0],xt[1]=Tt[1],i.depthMask(Zt),u.depth_mask=Zt,i.colorMask(_t[0],_t[1],_t[2],_t[3]),Ct[0]=_t[0],Ct[1]=_t[1],Ct[2]=_t[2],Ct[3]=_t[3],i.cullFace(Lr),u.cull_face=Lr,i.frontFace(Er),u.frontFace=Er,i.lineWidth(Ei),u.lineWidth=Ei,i.polygonOffset(jt[0],jt[1]),At[0]=jt[0],At[1]=jt[1],i.sampleCoverage(Te[0],Te[1]),nt[0]=Te[0],nt[1]=Te[1],i.stencilMask(xi),u.stencil_mask=xi,i.stencilFunc(ut[0],ut[1],ut[2]),ct[0]=ut[0],ct[1]=ut[1],ct[2]=ut[2],i.stencilOpSeparate(rt[0],rt[1],rt[2],rt[3]),je[0]=rt[0],je[1]=rt[1],je[2]=rt[2],je[3]=rt[3],i.stencilOpSeparate(tt[0],tt[1],tt[2],tt[3]),Je[0]=tt[0],Je[1]=tt[1],Je[2]=tt[2],Je[3]=tt[3],i.scissor(Mt[0],Mt[1],Mt[2],Mt[3]),Vt[0]=Mt[0],Vt[1]=Mt[1],Vt[2]=Mt[2],Vt[3]=Mt[3],i.viewport(Kt[0],Kt[1],Kt[2],Kt[3]),ir[0]=Kt[0],ir[1]=Kt[1],ir[2]=Kt[2],ir[3]=Kt[3]}}}});var w9=Se((Qgr,ROe)=>{ROe.exports=function(t,r,n,i,a,o,s,u){"use strict";var l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt;return l=t.gl,f=t.context,c=t.strings,h=t.next,d=t.current,p=t.draw,x=t.elements,b=t.buffer,y=t.shader,k=t.attributes,E=t.vao,A=t.uniforms,L=t.framebuffer,_=t.extensions,C=t.timer,M=t.isBufferArgs,v=h.blend_color,z=d.blend_color,T=h.blend_equation,F=d.blend_equation,q=h.blend_func,U=d.blend_func,H=h.depth_range,j=d.depth_range,G=h.colorMask,O=d.colorMask,W=h.polygonOffset_offset,re=d.polygonOffset_offset,ne=h.sample_coverage,be=d.sample_coverage,ze=h.stencil_func,Ce=d.stencil_func,he=h.stencil_opFront,te=d.stencil_opFront,ke=h.stencil_opBack,Ee=d.stencil_opBack,Me=h.scissor_box,Oe=d.scissor_box,Re=h.viewport,me=d.viewport,Be={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},fe={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},Ze={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},et={add:32774,subtract:32778,"reverse subtract":32779},gt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Pt={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Qe={cw:2304,ccw:2305},Xe={},Tt={},{draw:function(xt){var _t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De;if(_t=_.angle_instanced_arrays,Ct=xt.framebuffer,jt=L.getFramebuffer(Ct),At=L.next,L.next=jt,Te=f.framebufferWidth,f.framebufferWidth=jt?jt.width:f.drawingBufferWidth,nt=f.framebufferHeight,f.framebufferHeight=jt?jt.height:f.drawingBufferHeight,jt!==L.cur&&(jt?l.bindFramebuffer(36160,jt.framebuffer):l.bindFramebuffer(36160,null),L.cur=jt),d.dirty){var _e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi;_e=h.dither,_e!==d.dither&&(_e?l.enable(3024):l.disable(3024),d.dither=_e),Fe=h.blend_enable,Fe!==d.blend_enable&&(Fe?l.enable(3042):l.disable(3042),d.blend_enable=Fe),Pe=v[0],Ie=v[1],lt=v[2],ye=v[3],(Pe!==z[0]||Ie!==z[1]||lt!==z[2]||ye!==z[3])&&(l.blendColor(Pe,Ie,lt,ye),z[0]=Pe,z[1]=Ie,z[2]=lt,z[3]=ye),ue=T[0],de=T[1],(ue!==F[0]||de!==F[1])&&(l.blendEquationSeparate(ue,de),F[0]=ue,F[1]=de),ht=q[0],Et=q[1],St=q[2],Zt=q[3],(ht!==U[0]||Et!==U[1]||St!==U[2]||Zt!==U[3])&&(l.blendFuncSeparate(ht,Et,St,Zt),U[0]=ht,U[1]=Et,U[2]=St,U[3]=Zt),qr=h.depth_enable,qr!==d.depth_enable&&(qr?l.enable(2929):l.disable(2929),d.depth_enable=qr),Lr=h.depth_func,Lr!==d.depth_func&&(l.depthFunc(Lr),d.depth_func=Lr),vr=H[0],Er=H[1],(vr!==j[0]||Er!==j[1])&&(l.depthRange(vr,Er),j[0]=vr,j[1]=Er),si=h.depth_mask,si!==d.depth_mask&&(l.depthMask(si),d.depth_mask=si),Ei=G[0],Si=G[1],xi=G[2],Hi=G[3],(Ei!==O[0]||Si!==O[1]||xi!==O[2]||Hi!==O[3])&&(l.colorMask(Ei,Si,xi,Hi),O[0]=Ei,O[1]=Si,O[2]=xi,O[3]=Hi),Jr=h.cull_enable,Jr!==d.cull_enable&&(Jr?l.enable(2884):l.disable(2884),d.cull_enable=Jr),ci=h.cull_face,ci!==d.cull_face&&(l.cullFace(ci),d.cull_face=ci),Di=h.frontFace,Di!==d.frontFace&&(l.frontFace(Di),d.frontFace=Di),Lt=h.lineWidth,Lt!==d.lineWidth&&(l.lineWidth(Lt),d.lineWidth=Lt),vt=h.polygonOffset_enable,vt!==d.polygonOffset_enable&&(vt?l.enable(32823):l.disable(32823),d.polygonOffset_enable=vt),Dt=W[0],Bt=W[1],(Dt!==re[0]||Bt!==re[1])&&(l.polygonOffset(Dt,Bt),re[0]=Dt,re[1]=Bt),sr=h.sample_alpha,sr!==d.sample_alpha&&(sr?l.enable(32926):l.disable(32926),d.sample_alpha=sr),br=h.sample_enable,br!==d.sample_enable&&(br?l.enable(32928):l.disable(32928),d.sample_enable=br),zr=ne[0],Tr=ne[1],(zr!==be[0]||Tr!==be[1])&&(l.sampleCoverage(zr,Tr),be[0]=zr,be[1]=Tr),Rr=h.stencil_enable,Rr!==d.stencil_enable&&(Rr?l.enable(2960):l.disable(2960),d.stencil_enable=Rr),Br=h.stencil_mask,Br!==d.stencil_mask&&(l.stencilMask(Br),d.stencil_mask=Br),oi=ze[0],vi=ze[1],Pi=ze[2],(oi!==Ce[0]||vi!==Ce[1]||Pi!==Ce[2])&&(l.stencilFunc(oi,vi,Pi),Ce[0]=oi,Ce[1]=vi,Ce[2]=Pi),Yr=he[0],Ni=he[1],Ur=he[2],ti=he[3],(Yr!==te[0]||Ni!==te[1]||Ur!==te[2]||ti!==te[3])&&(l.stencilOpSeparate(Yr,Ni,Ur,ti),te[0]=Yr,te[1]=Ni,te[2]=Ur,te[3]=ti),ki=ke[0],ji=ke[1],Vi=ke[2],zi=ke[3],(ki!==Ee[0]||ji!==Ee[1]||Vi!==Ee[2]||zi!==Ee[3])&&(l.stencilOpSeparate(ki,ji,Vi,zi),Ee[0]=ki,Ee[1]=ji,Ee[2]=Vi,Ee[3]=zi),Mi=h.scissor_enable,Mi!==d.scissor_enable&&(Mi?l.enable(3089):l.disable(3089),d.scissor_enable=Mi)}ut=f.framebufferWidth,ct=f.framebufferHeight,rt=f.viewportWidth,f.viewportWidth=ut,je=f.viewportHeight,f.viewportHeight=ct,l.viewport(0,0,ut,ct),me[0]=0,me[1]=0,me[2]=ut,me[3]=ct,tt=f.framebufferWidth,Je=f.framebufferHeight,l.scissor(0,0,tt,Je),Oe[0]=0,Oe[1]=0,Oe[2]=tt,Oe[3]=Je,Mt=d.profile,Mt&&(Vt=performance.now(),r.count++),Kt=y.frag,ir=y.vert,fr=y.program(ir,Kt),l.useProgram(fr.program),E.setVAO(null),Ot=fr.id,De=Xe[Ot],De?De.call(this,xt):(De=Xe[Ot]=n(fr),De.call(this,xt)),d.dirty=!0,E.setVAO(null),L.next=At,f.framebufferWidth=Te,f.framebufferHeight=nt,f.viewportWidth=rt,f.viewportHeight=je,Mt&&(r.cpuTime+=performance.now()-Vt)},scope:function(xt,_t,Ct){var jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie;jt=xt.framebuffer,At=L.getFramebuffer(jt),Te=L.next,L.next=At,nt=f.framebufferWidth,f.framebufferWidth=At?At.width:f.drawingBufferWidth,ut=f.framebufferHeight,f.framebufferHeight=At?At.height:f.drawingBufferHeight,ct=f.framebufferWidth,rt=f.framebufferHeight,je=f.viewportWidth,f.viewportWidth=ct,tt=f.viewportHeight,f.viewportHeight=rt,Je=Re[0],Re[0]=i,Mt=Re[1],Re[1]=a,Vt=Re[2],Re[2]=ct,Kt=Re[3],Re[3]=rt,ir=f.framebufferWidth,fr=f.framebufferHeight,Ot=Me[0],Me[0]=o,De=Me[1],Me[1]=s,_e=Me[2],Me[2]=ir,Fe=Me[3],Me[3]=fr,Pe=d.profile,Pe&&(Ie=performance.now(),r.count++),d.dirty=!0,_t(f,xt,Ct),L.next=Te,f.framebufferWidth=nt,f.framebufferHeight=ut,f.viewportWidth=je,f.viewportHeight=tt,Re[0]=Je,Re[1]=Mt,Re[2]=Vt,Re[3]=Kt,Me[0]=Ot,Me[1]=De,Me[2]=_e,Me[3]=Fe,Pe&&(r.cpuTime+=performance.now()-Ie),d.dirty=!0},batch:function(xt,_t){var Ct,jt,At,Te,nt,ut,ct,rt;if(Ct=_.angle_instanced_arrays,d.dirty){var je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi;je=h.dither,je!==d.dither&&(je?l.enable(3024):l.disable(3024),d.dither=je),tt=h.blend_enable,tt!==d.blend_enable&&(tt?l.enable(3042):l.disable(3042),d.blend_enable=tt),Je=v[0],Mt=v[1],Vt=v[2],Kt=v[3],(Je!==z[0]||Mt!==z[1]||Vt!==z[2]||Kt!==z[3])&&(l.blendColor(Je,Mt,Vt,Kt),z[0]=Je,z[1]=Mt,z[2]=Vt,z[3]=Kt),ir=T[0],fr=T[1],(ir!==F[0]||fr!==F[1])&&(l.blendEquationSeparate(ir,fr),F[0]=ir,F[1]=fr),Ot=q[0],De=q[1],_e=q[2],Fe=q[3],(Ot!==U[0]||De!==U[1]||_e!==U[2]||Fe!==U[3])&&(l.blendFuncSeparate(Ot,De,_e,Fe),U[0]=Ot,U[1]=De,U[2]=_e,U[3]=Fe),Pe=h.depth_enable,Pe!==d.depth_enable&&(Pe?l.enable(2929):l.disable(2929),d.depth_enable=Pe),Ie=h.depth_func,Ie!==d.depth_func&&(l.depthFunc(Ie),d.depth_func=Ie),lt=H[0],ye=H[1],(lt!==j[0]||ye!==j[1])&&(l.depthRange(lt,ye),j[0]=lt,j[1]=ye),ue=h.depth_mask,ue!==d.depth_mask&&(l.depthMask(ue),d.depth_mask=ue),de=G[0],ht=G[1],Et=G[2],St=G[3],(de!==O[0]||ht!==O[1]||Et!==O[2]||St!==O[3])&&(l.colorMask(de,ht,Et,St),O[0]=de,O[1]=ht,O[2]=Et,O[3]=St),Zt=h.cull_enable,Zt!==d.cull_enable&&(Zt?l.enable(2884):l.disable(2884),d.cull_enable=Zt),qr=h.cull_face,qr!==d.cull_face&&(l.cullFace(qr),d.cull_face=qr),Lr=h.frontFace,Lr!==d.frontFace&&(l.frontFace(Lr),d.frontFace=Lr),vr=h.lineWidth,vr!==d.lineWidth&&(l.lineWidth(vr),d.lineWidth=vr),Er=h.polygonOffset_enable,Er!==d.polygonOffset_enable&&(Er?l.enable(32823):l.disable(32823),d.polygonOffset_enable=Er),si=W[0],Ei=W[1],(si!==re[0]||Ei!==re[1])&&(l.polygonOffset(si,Ei),re[0]=si,re[1]=Ei),Si=h.sample_alpha,Si!==d.sample_alpha&&(Si?l.enable(32926):l.disable(32926),d.sample_alpha=Si),xi=h.sample_enable,xi!==d.sample_enable&&(xi?l.enable(32928):l.disable(32928),d.sample_enable=xi),Hi=ne[0],Jr=ne[1],(Hi!==be[0]||Jr!==be[1])&&(l.sampleCoverage(Hi,Jr),be[0]=Hi,be[1]=Jr),ci=h.stencil_enable,ci!==d.stencil_enable&&(ci?l.enable(2960):l.disable(2960),d.stencil_enable=ci),Di=h.stencil_mask,Di!==d.stencil_mask&&(l.stencilMask(Di),d.stencil_mask=Di),Lt=ze[0],vt=ze[1],Dt=ze[2],(Lt!==Ce[0]||vt!==Ce[1]||Dt!==Ce[2])&&(l.stencilFunc(Lt,vt,Dt),Ce[0]=Lt,Ce[1]=vt,Ce[2]=Dt),Bt=he[0],sr=he[1],br=he[2],zr=he[3],(Bt!==te[0]||sr!==te[1]||br!==te[2]||zr!==te[3])&&(l.stencilOpSeparate(Bt,sr,br,zr),te[0]=Bt,te[1]=sr,te[2]=br,te[3]=zr),Tr=ke[0],Rr=ke[1],Br=ke[2],oi=ke[3],(Tr!==Ee[0]||Rr!==Ee[1]||Br!==Ee[2]||oi!==Ee[3])&&(l.stencilOpSeparate(Tr,Rr,Br,oi),Ee[0]=Tr,Ee[1]=Rr,Ee[2]=Br,Ee[3]=oi),vi=h.scissor_enable,vi!==d.scissor_enable&&(vi?l.enable(3089):l.disable(3089),d.scissor_enable=vi)}jt=d.profile,jt&&(At=performance.now(),r.count+=_t),Te=y.frag,nt=y.vert,ut=y.program(nt,Te),l.useProgram(ut.program),E.setVAO(null),ct=ut.id,rt=Tt[ct],rt?rt.call(this,xt,_t):(rt=Tt[ct]=u(ut),rt.call(this,xt,_t)),d.dirty=!0,E.setVAO(null),jt&&(r.cpuTime+=performance.now()-At)}}}});var T9=Se((e1r,FOe)=>{FOe.exports=function(t,r,n,i){"use strict";var a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt;return a=t.gl,o=t.context,s=t.strings,u=t.next,l=t.current,f=t.draw,c=t.elements,h=t.buffer,d=t.shader,p=t.attributes,x=t.vao,b=t.uniforms,y=t.framebuffer,k=t.extensions,E=t.timer,A=t.isBufferArgs,L=u.blend_color,_=l.blend_color,C=u.blend_equation,M=l.blend_equation,v=u.blend_func,z=l.blend_func,T=u.depth_range,F=l.depth_range,q=u.colorMask,U=l.colorMask,H=u.polygonOffset_offset,j=l.polygonOffset_offset,G=u.sample_coverage,O=l.sample_coverage,W=u.stencil_func,re=l.stencil_func,ne=u.stencil_opFront,be=l.stencil_opFront,ze=u.stencil_opBack,Ce=l.stencil_opBack,he=u.scissor_box,te=l.scissor_box,ke=u.viewport,Ee=l.viewport,Me={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Oe={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},Re={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},me={add:32774,subtract:32778,"reverse subtract":32779},Be={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fe={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Ze={cw:2304,ccw:2305},et={},gt={},{draw:function(Pt){var Qe,Xe,Tt,xt,_t,Ct,jt,At,Te;if(Qe=k.angle_instanced_arrays,Xe=y.next,Xe!==y.cur&&(Xe?a.bindFramebuffer(36160,Xe.framebuffer):a.bindFramebuffer(36160,null),y.cur=Xe),l.dirty){var nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur;nt=u.dither,nt!==l.dither&&(nt?a.enable(3024):a.disable(3024),l.dither=nt),ut=u.blend_enable,ut!==l.blend_enable&&(ut?a.enable(3042):a.disable(3042),l.blend_enable=ut),ct=L[0],rt=L[1],je=L[2],tt=L[3],(ct!==_[0]||rt!==_[1]||je!==_[2]||tt!==_[3])&&(a.blendColor(ct,rt,je,tt),_[0]=ct,_[1]=rt,_[2]=je,_[3]=tt),Je=C[0],Mt=C[1],(Je!==M[0]||Mt!==M[1])&&(a.blendEquationSeparate(Je,Mt),M[0]=Je,M[1]=Mt),Vt=v[0],Kt=v[1],ir=v[2],fr=v[3],(Vt!==z[0]||Kt!==z[1]||ir!==z[2]||fr!==z[3])&&(a.blendFuncSeparate(Vt,Kt,ir,fr),z[0]=Vt,z[1]=Kt,z[2]=ir,z[3]=fr),Ot=u.depth_enable,Ot!==l.depth_enable&&(Ot?a.enable(2929):a.disable(2929),l.depth_enable=Ot),De=u.depth_func,De!==l.depth_func&&(a.depthFunc(De),l.depth_func=De),_e=T[0],Fe=T[1],(_e!==F[0]||Fe!==F[1])&&(a.depthRange(_e,Fe),F[0]=_e,F[1]=Fe),Pe=u.depth_mask,Pe!==l.depth_mask&&(a.depthMask(Pe),l.depth_mask=Pe),Ie=q[0],lt=q[1],ye=q[2],ue=q[3],(Ie!==U[0]||lt!==U[1]||ye!==U[2]||ue!==U[3])&&(a.colorMask(Ie,lt,ye,ue),U[0]=Ie,U[1]=lt,U[2]=ye,U[3]=ue),de=u.cull_enable,de!==l.cull_enable&&(de?a.enable(2884):a.disable(2884),l.cull_enable=de),ht=u.cull_face,ht!==l.cull_face&&(a.cullFace(ht),l.cull_face=ht),Et=u.frontFace,Et!==l.frontFace&&(a.frontFace(Et),l.frontFace=Et),St=u.lineWidth,St!==l.lineWidth&&(a.lineWidth(St),l.lineWidth=St),Zt=u.polygonOffset_enable,Zt!==l.polygonOffset_enable&&(Zt?a.enable(32823):a.disable(32823),l.polygonOffset_enable=Zt),qr=H[0],Lr=H[1],(qr!==j[0]||Lr!==j[1])&&(a.polygonOffset(qr,Lr),j[0]=qr,j[1]=Lr),vr=u.sample_alpha,vr!==l.sample_alpha&&(vr?a.enable(32926):a.disable(32926),l.sample_alpha=vr),Er=u.sample_enable,Er!==l.sample_enable&&(Er?a.enable(32928):a.disable(32928),l.sample_enable=Er),si=G[0],Ei=G[1],(si!==O[0]||Ei!==O[1])&&(a.sampleCoverage(si,Ei),O[0]=si,O[1]=Ei),Si=u.stencil_enable,Si!==l.stencil_enable&&(Si?a.enable(2960):a.disable(2960),l.stencil_enable=Si),xi=u.stencil_mask,xi!==l.stencil_mask&&(a.stencilMask(xi),l.stencil_mask=xi),Hi=W[0],Jr=W[1],ci=W[2],(Hi!==re[0]||Jr!==re[1]||ci!==re[2])&&(a.stencilFunc(Hi,Jr,ci),re[0]=Hi,re[1]=Jr,re[2]=ci),Di=ne[0],Lt=ne[1],vt=ne[2],Dt=ne[3],(Di!==be[0]||Lt!==be[1]||vt!==be[2]||Dt!==be[3])&&(a.stencilOpSeparate(Di,Lt,vt,Dt),be[0]=Di,be[1]=Lt,be[2]=vt,be[3]=Dt),Bt=ze[0],sr=ze[1],br=ze[2],zr=ze[3],(Bt!==Ce[0]||sr!==Ce[1]||br!==Ce[2]||zr!==Ce[3])&&(a.stencilOpSeparate(Bt,sr,br,zr),Ce[0]=Bt,Ce[1]=sr,Ce[2]=br,Ce[3]=zr),Tr=u.scissor_enable,Tr!==l.scissor_enable&&(Tr?a.enable(3089):a.disable(3089),l.scissor_enable=Tr),Rr=he[0],Br=he[1],oi=he[2],vi=he[3],(Rr!==te[0]||Br!==te[1]||oi!==te[2]||vi!==te[3])&&(a.scissor(Rr,Br,oi,vi),te[0]=Rr,te[1]=Br,te[2]=oi,te[3]=vi),Pi=ke[0],Yr=ke[1],Ni=ke[2],Ur=ke[3],(Pi!==Ee[0]||Yr!==Ee[1]||Ni!==Ee[2]||Ur!==Ee[3])&&(a.viewport(Pi,Yr,Ni,Ur),Ee[0]=Pi,Ee[1]=Yr,Ee[2]=Ni,Ee[3]=Ur),l.dirty=!1}Tt=l.profile,Tt&&(xt=performance.now(),r.count++),_t=d.frag,Ct=d.vert,jt=d.program(Ct,_t),a.useProgram(jt.program),x.setVAO(null),At=jt.id,Te=et[At],Te?Te.call(this,Pt):(Te=et[At]=n(jt),Te.call(this,Pt)),x.setVAO(null),Tt&&(r.cpuTime+=performance.now()-xt)},scope:function(Pt,Qe,Xe){var Tt,xt;Tt=l.profile,Tt&&(xt=performance.now(),r.count++),Qe(o,Pt,Xe),Tt&&(r.cpuTime+=performance.now()-xt)},batch:function(Pt,Qe){var Xe,Tt,xt,_t,Ct,jt,At,Te,nt;if(Xe=k.angle_instanced_arrays,Tt=y.next,Tt!==y.cur&&(Tt?a.bindFramebuffer(36160,Tt.framebuffer):a.bindFramebuffer(36160,null),y.cur=Tt),l.dirty){var ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti;ut=u.dither,ut!==l.dither&&(ut?a.enable(3024):a.disable(3024),l.dither=ut),ct=u.blend_enable,ct!==l.blend_enable&&(ct?a.enable(3042):a.disable(3042),l.blend_enable=ct),rt=L[0],je=L[1],tt=L[2],Je=L[3],(rt!==_[0]||je!==_[1]||tt!==_[2]||Je!==_[3])&&(a.blendColor(rt,je,tt,Je),_[0]=rt,_[1]=je,_[2]=tt,_[3]=Je),Mt=C[0],Vt=C[1],(Mt!==M[0]||Vt!==M[1])&&(a.blendEquationSeparate(Mt,Vt),M[0]=Mt,M[1]=Vt),Kt=v[0],ir=v[1],fr=v[2],Ot=v[3],(Kt!==z[0]||ir!==z[1]||fr!==z[2]||Ot!==z[3])&&(a.blendFuncSeparate(Kt,ir,fr,Ot),z[0]=Kt,z[1]=ir,z[2]=fr,z[3]=Ot),De=u.depth_enable,De!==l.depth_enable&&(De?a.enable(2929):a.disable(2929),l.depth_enable=De),_e=u.depth_func,_e!==l.depth_func&&(a.depthFunc(_e),l.depth_func=_e),Fe=T[0],Pe=T[1],(Fe!==F[0]||Pe!==F[1])&&(a.depthRange(Fe,Pe),F[0]=Fe,F[1]=Pe),Ie=u.depth_mask,Ie!==l.depth_mask&&(a.depthMask(Ie),l.depth_mask=Ie),lt=q[0],ye=q[1],ue=q[2],de=q[3],(lt!==U[0]||ye!==U[1]||ue!==U[2]||de!==U[3])&&(a.colorMask(lt,ye,ue,de),U[0]=lt,U[1]=ye,U[2]=ue,U[3]=de),ht=u.cull_enable,ht!==l.cull_enable&&(ht?a.enable(2884):a.disable(2884),l.cull_enable=ht),Et=u.cull_face,Et!==l.cull_face&&(a.cullFace(Et),l.cull_face=Et),St=u.frontFace,St!==l.frontFace&&(a.frontFace(St),l.frontFace=St),Zt=u.lineWidth,Zt!==l.lineWidth&&(a.lineWidth(Zt),l.lineWidth=Zt),qr=u.polygonOffset_enable,qr!==l.polygonOffset_enable&&(qr?a.enable(32823):a.disable(32823),l.polygonOffset_enable=qr),Lr=H[0],vr=H[1],(Lr!==j[0]||vr!==j[1])&&(a.polygonOffset(Lr,vr),j[0]=Lr,j[1]=vr),Er=u.sample_alpha,Er!==l.sample_alpha&&(Er?a.enable(32926):a.disable(32926),l.sample_alpha=Er),si=u.sample_enable,si!==l.sample_enable&&(si?a.enable(32928):a.disable(32928),l.sample_enable=si),Ei=G[0],Si=G[1],(Ei!==O[0]||Si!==O[1])&&(a.sampleCoverage(Ei,Si),O[0]=Ei,O[1]=Si),xi=u.stencil_enable,xi!==l.stencil_enable&&(xi?a.enable(2960):a.disable(2960),l.stencil_enable=xi),Hi=u.stencil_mask,Hi!==l.stencil_mask&&(a.stencilMask(Hi),l.stencil_mask=Hi),Jr=W[0],ci=W[1],Di=W[2],(Jr!==re[0]||ci!==re[1]||Di!==re[2])&&(a.stencilFunc(Jr,ci,Di),re[0]=Jr,re[1]=ci,re[2]=Di),Lt=ne[0],vt=ne[1],Dt=ne[2],Bt=ne[3],(Lt!==be[0]||vt!==be[1]||Dt!==be[2]||Bt!==be[3])&&(a.stencilOpSeparate(Lt,vt,Dt,Bt),be[0]=Lt,be[1]=vt,be[2]=Dt,be[3]=Bt),sr=ze[0],br=ze[1],zr=ze[2],Tr=ze[3],(sr!==Ce[0]||br!==Ce[1]||zr!==Ce[2]||Tr!==Ce[3])&&(a.stencilOpSeparate(sr,br,zr,Tr),Ce[0]=sr,Ce[1]=br,Ce[2]=zr,Ce[3]=Tr),Rr=u.scissor_enable,Rr!==l.scissor_enable&&(Rr?a.enable(3089):a.disable(3089),l.scissor_enable=Rr),Br=he[0],oi=he[1],vi=he[2],Pi=he[3],(Br!==te[0]||oi!==te[1]||vi!==te[2]||Pi!==te[3])&&(a.scissor(Br,oi,vi,Pi),te[0]=Br,te[1]=oi,te[2]=vi,te[3]=Pi),Yr=ke[0],Ni=ke[1],Ur=ke[2],ti=ke[3],(Yr!==Ee[0]||Ni!==Ee[1]||Ur!==Ee[2]||ti!==Ee[3])&&(a.viewport(Yr,Ni,Ur,ti),Ee[0]=Yr,Ee[1]=Ni,Ee[2]=Ur,Ee[3]=ti),l.dirty=!1}xt=l.profile,xt&&(_t=performance.now(),r.count+=Qe),Ct=d.frag,jt=d.vert,At=d.program(jt,Ct),a.useProgram(At.program),x.setVAO(null),Te=At.id,nt=gt[Te],nt?nt.call(this,Pt,Qe):(nt=gt[Te]=i(At),nt.call(this,Pt,Qe)),x.setVAO(null),xt&&(r.cpuTime+=performance.now()-_t)}}}});var A9=Se((t1r,qOe)=>{qOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt){"use strict";var Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi;return Je=t.gl,Mt=t.context,Vt=t.strings,Kt=t.next,ir=t.current,fr=t.draw,Ot=t.elements,De=t.buffer,_e=t.shader,Fe=t.attributes,Pe=t.vao,Ie=t.uniforms,lt=t.framebuffer,ye=t.extensions,ue=t.timer,de=t.isBufferArgs,ht=Kt.blend_color,Et=ir.blend_color,St=Kt.blend_equation,Zt=ir.blend_equation,qr=Kt.blend_func,Lr=ir.blend_func,vr=Kt.depth_range,Er=ir.depth_range,si=Kt.colorMask,Ei=ir.colorMask,Si=Kt.polygonOffset_offset,xi=ir.polygonOffset_offset,Hi=Kt.sample_coverage,Jr=ir.sample_coverage,ci=Kt.stencil_func,Di=ir.stencil_func,Lt=Kt.stencil_opFront,vt=ir.stencil_opFront,Dt=Kt.stencil_opBack,Bt=ir.stencil_opBack,sr=Kt.scissor_box,br=ir.scissor_box,zr=Kt.viewport,Tr=ir.viewport,Rr={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Br={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},oi={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},vi={add:32774,subtract:32778,"reverse subtract":32779},Pi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Yr={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Ni={cw:2304,ccw:2305},Ur={},Ur.stride=8,Ur.offset=8,Ur.divisor=1,ti={},ti.stride=8,ti.offset=16,ti.divisor=1,ki={},ki.stride=8,ki.offset=8,ki.divisor=1,ji={},ji.stride=8,ji.offset=16,ji.divisor=1,Vi={},Vi.stride=4,Vi.offset=0,Vi.divisor=1,{draw:function(zi){var Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn;if(Mi=ye.angle_instanced_arrays,sn=lt.next,sn!==lt.cur&&(sn?Je.bindFramebuffer(36160,sn.framebuffer):Je.bindFramebuffer(36160,null),lt.cur=sn),ir.dirty){var zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li;zo=Kt.dither,zo!==ir.dither&&(zo?Je.enable(3024):Je.disable(3024),ir.dither=zo),rl=Kt.depth_func,rl!==ir.depth_func&&(Je.depthFunc(rl),ir.depth_func=rl),$o=vr[0],Na=vr[1],($o!==Er[0]||Na!==Er[1])&&(Je.depthRange($o,Na),Er[0]=$o,Er[1]=Na),Ua=Kt.depth_mask,Ua!==ir.depth_mask&&(Je.depthMask(Ua),ir.depth_mask=Ua),Po=si[0],fo=si[1],ro=si[2],Ma=si[3],(Po!==Ei[0]||fo!==Ei[1]||ro!==Ei[2]||Ma!==Ei[3])&&(Je.colorMask(Po,fo,ro,Ma),Ei[0]=Po,Ei[1]=fo,Ei[2]=ro,Ei[3]=Ma),io=Kt.cull_enable,io!==ir.cull_enable&&(io?Je.enable(2884):Je.disable(2884),ir.cull_enable=io),aa=Kt.cull_face,aa!==ir.cull_face&&(Je.cullFace(aa),ir.cull_face=aa),Oo=Kt.frontFace,Oo!==ir.frontFace&&(Je.frontFace(Oo),ir.frontFace=Oo),No=Kt.lineWidth,No!==ir.lineWidth&&(Je.lineWidth(No),ir.lineWidth=No),Zs=Kt.polygonOffset_enable,Zs!==ir.polygonOffset_enable&&(Zs?Je.enable(32823):Je.disable(32823),ir.polygonOffset_enable=Zs),Fs=Si[0],ws=Si[1],(Fs!==xi[0]||ws!==xi[1])&&(Je.polygonOffset(Fs,ws),xi[0]=Fs,xi[1]=ws),no=Kt.sample_alpha,no!==ir.sample_alpha&&(no?Je.enable(32926):Je.disable(32926),ir.sample_alpha=no),Ls=Kt.sample_enable,Ls!==ir.sample_enable&&(Ls?Je.enable(32928):Je.disable(32928),ir.sample_enable=Ls),ds=Hi[0],Xs=Hi[1],(ds!==Jr[0]||Xs!==Jr[1])&&(Je.sampleCoverage(ds,Xs),Jr[0]=ds,Jr[1]=Xs),oa=Kt.stencil_mask,oa!==ir.stencil_mask&&(Je.stencilMask(oa),ir.stencil_mask=oa),Yo=ci[0],po=ci[1],ss=ci[2],(Yo!==Di[0]||po!==Di[1]||ss!==Di[2])&&(Je.stencilFunc(Yo,po,ss),Di[0]=Yo,Di[1]=po,Di[2]=ss),ls=Lt[0],gs=Lt[1],bt=Lt[2],Ft=Lt[3],(ls!==vt[0]||gs!==vt[1]||bt!==vt[2]||Ft!==vt[3])&&(Je.stencilOpSeparate(ls,gs,bt,Ft),vt[0]=ls,vt[1]=gs,vt[2]=bt,vt[3]=Ft),hr=Dt[0],nr=Dt[1],Sr=Dt[2],li=Dt[3],(hr!==Bt[0]||nr!==Bt[1]||Sr!==Bt[2]||li!==Bt[3])&&(Je.stencilOpSeparate(hr,nr,Sr,li),Bt[0]=hr,Bt[1]=nr,Bt[2]=Sr,Bt[3]=li)}fi=zi.viewport,Or=fi.x|0,st=fi.y|0,Wt="width"in fi?fi.width|0:Mt.framebufferWidth-Or,tr="height"in fi?fi.height|0:Mt.framebufferHeight-st,or=Mt.viewportWidth,Mt.viewportWidth=Wt,Nr=Mt.viewportHeight,Mt.viewportHeight=tr,Je.viewport(Or,st,Wt,tr),Tr[0]=Or,Tr[1]=st,Tr[2]=Wt,Tr[3]=tr,Je.blendColor(0,0,0,0),Et[0]=0,Et[1]=0,Et[2]=0,Et[3]=0,n?Je.enable(3042):Je.disable(3042),ir.blend_enable=n,Je.blendEquationSeparate(32774,32774),Zt[0]=32774,Zt[1]=32774,Je.blendFuncSeparate(770,771,773,1),Lr[0]=770,Lr[1]=771,Lr[2]=773,Lr[3]=1,hi=i.call(this,Mt,zi,0),hi?Je.enable(2929):Je.disable(2929),ir.depth_enable=hi,Gi=zi.viewport,Qr=Gi.x|0,Ui=Gi.y|0,zn="width"in Gi?Gi.width|0:Mt.framebufferWidth-Qr,fn="height"in Gi?Gi.height|0:Mt.framebufferHeight-Ui,Je.scissor(Qr,Ui,zn,fn),br[0]=Qr,br[1]=Ui,br[2]=zn,br[3]=fn,a?Je.enable(3089):Je.disable(3089),ir.scissor_enable=a,o?Je.enable(2960):Je.disable(2960),ir.stencil_enable=o,xn=ir.profile,xn&&(_a=performance.now(),r.count++),Je.useProgram(s.program),Wn=ye.angle_instanced_arrays,Pe.setVAO(null),Fn=zi.positionBuffer,Ur.buffer=Fn,ia=!1,za=1,Hr=0,na=0,go=0,Dn=0,un=null,Zn=0,Wo=!1,Ba=5126,Bo=0,Ea=0,Ha=0,de(Ur)?(ia=!0,un=De.createStream(34962,Ur),Ba=un.dtype):(un=De.getBuffer(Ur),un?Ba=un.dtype:"constant"in Ur?(za=2,typeof Ur.constant=="number"?(Hr=Ur.constant,na=go=Dn=0):(Hr=Ur.constant.length>0?Ur.constant[0]:0,na=Ur.constant.length>1?Ur.constant[1]:0,go=Ur.constant.length>2?Ur.constant[2]:0,Dn=Ur.constant.length>3?Ur.constant[3]:0)):(de(Ur.buffer)?un=De.createStream(34962,Ur.buffer):un=De.getBuffer(Ur.buffer),Ba="type"in Ur?Yr[Ur.type]:un.dtype,Wo=!!Ur.normalized,Zn=Ur.size|0,Bo=Ur.offset|0,Ea=Ur.stride|0,Ha=Ur.divisor|0)),tn=u.location,Cn=Fe[tn],za===1?(Cn.buffer||Je.enableVertexAttribArray(tn),Xn=Zn||2,(Cn.type!==Ba||Cn.size!==Xn||Cn.buffer!==un||Cn.normalized!==Wo||Cn.offset!==Bo||Cn.stride!==Ea)&&(Je.bindBuffer(34962,un.buffer),Je.vertexAttribPointer(tn,Xn,Ba,Wo,Ea,Bo),Cn.type=Ba,Cn.size=Xn,Cn.buffer=un,Cn.normalized=Wo,Cn.offset=Bo,Cn.stride=Ea),Cn.divisor!==Ha&&(Wn.vertexAttribDivisorANGLE(tn,Ha),Cn.divisor=Ha)):(Cn.buffer&&(Je.disableVertexAttribArray(tn),Cn.buffer=null),(Cn.x!==Hr||Cn.y!==na||Cn.z!==go||Cn.w!==Dn)&&(Je.vertexAttrib4f(tn,Hr,na,go,Dn),Cn.x=Hr,Cn.y=na,Cn.z=go,Cn.w=Dn)),ts=zi.positionFractBuffer,ki.buffer=ts,Ja=!1,to=1,Ri=0,an=0,cs=0,pa=0,ln=null,ka=0,va=!1,bo=5126,Co=0,Fi=0,Yn=0,de(ki)?(Ja=!0,ln=De.createStream(34962,ki),bo=ln.dtype):(ln=De.getBuffer(ki),ln?bo=ln.dtype:"constant"in ki?(to=2,typeof ki.constant=="number"?(Ri=ki.constant,an=cs=pa=0):(Ri=ki.constant.length>0?ki.constant[0]:0,an=ki.constant.length>1?ki.constant[1]:0,cs=ki.constant.length>2?ki.constant[2]:0,pa=ki.constant.length>3?ki.constant[3]:0)):(de(ki.buffer)?ln=De.createStream(34962,ki.buffer):ln=De.getBuffer(ki.buffer),bo="type"in ki?Yr[ki.type]:ln.dtype,va=!!ki.normalized,ka=ki.size|0,Co=ki.offset|0,Fi=ki.stride|0,Yn=ki.divisor|0)),xa=l.location,Qi=Fe[xa],to===1?(Qi.buffer||Je.enableVertexAttribArray(xa),Nn=ka||2,(Qi.type!==bo||Qi.size!==Nn||Qi.buffer!==ln||Qi.normalized!==va||Qi.offset!==Co||Qi.stride!==Fi)&&(Je.bindBuffer(34962,ln.buffer),Je.vertexAttribPointer(xa,Nn,bo,va,Fi,Co),Qi.type=bo,Qi.size=Nn,Qi.buffer=ln,Qi.normalized=va,Qi.offset=Co,Qi.stride=Fi),Qi.divisor!==Yn&&(Wn.vertexAttribDivisorANGLE(xa,Yn),Qi.divisor=Yn)):(Qi.buffer&&(Je.disableVertexAttribArray(xa),Qi.buffer=null),(Qi.x!==Ri||Qi.y!==an||Qi.z!==cs||Qi.w!==pa)&&(Je.vertexAttrib4f(xa,Ri,an,cs,pa),Qi.x=Ri,Qi.y=an,Qi.z=cs,Qi.w=pa)),Pn=zi.positionBuffer,ti.buffer=Pn,qa=!1,jo=1,Vo=0,Pa=0,Oa=0,co=0,An=null,_o=0,ks=!1,bs=5126,ps=0,sa=0,Bn=0,de(ti)?(qa=!0,An=De.createStream(34962,ti),bs=An.dtype):(An=De.getBuffer(ti),An?bs=An.dtype:"constant"in ti?(jo=2,typeof ti.constant=="number"?(Vo=ti.constant,Pa=Oa=co=0):(Vo=ti.constant.length>0?ti.constant[0]:0,Pa=ti.constant.length>1?ti.constant[1]:0,Oa=ti.constant.length>2?ti.constant[2]:0,co=ti.constant.length>3?ti.constant[3]:0)):(de(ti.buffer)?An=De.createStream(34962,ti.buffer):An=De.getBuffer(ti.buffer),bs="type"in ti?Yr[ti.type]:An.dtype,ks=!!ti.normalized,_o=ti.size|0,ps=ti.offset|0,sa=ti.stride|0,Bn=ti.divisor|0)),ms=f.location,ya=Fe[ms],jo===1?(ya.buffer||Je.enableVertexAttribArray(ms),on=_o||2,(ya.type!==bs||ya.size!==on||ya.buffer!==An||ya.normalized!==ks||ya.offset!==ps||ya.stride!==sa)&&(Je.bindBuffer(34962,An.buffer),Je.vertexAttribPointer(ms,on,bs,ks,sa,ps),ya.type=bs,ya.size=on,ya.buffer=An,ya.normalized=ks,ya.offset=ps,ya.stride=sa),ya.divisor!==Bn&&(Wn.vertexAttribDivisorANGLE(ms,Bn),ya.divisor=Bn)):(ya.buffer&&(Je.disableVertexAttribArray(ms),ya.buffer=null),(ya.x!==Vo||ya.y!==Pa||ya.z!==Oa||ya.w!==co)&&(Je.vertexAttrib4f(ms,Vo,Pa,Oa,co),ya.x=Vo,ya.y=Pa,ya.z=Oa,ya.w=co)),mn=zi.positionFractBuffer,ji.buffer=mn,Ga=!1,ca=1,bn=0,Xi=0,qn=0,Ia=0,yn=null,Ya=0,ba=!1,Da=5126,Aa=0,Ln=0,wo=0,de(ji)?(Ga=!0,yn=De.createStream(34962,ji),Da=yn.dtype):(yn=De.getBuffer(ji),yn?Da=yn.dtype:"constant"in ji?(ca=2,typeof ji.constant=="number"?(bn=ji.constant,Xi=qn=Ia=0):(bn=ji.constant.length>0?ji.constant[0]:0,Xi=ji.constant.length>1?ji.constant[1]:0,qn=ji.constant.length>2?ji.constant[2]:0,Ia=ji.constant.length>3?ji.constant[3]:0)):(de(ji.buffer)?yn=De.createStream(34962,ji.buffer):yn=De.getBuffer(ji.buffer),Da="type"in ji?Yr[ji.type]:yn.dtype,ba=!!ji.normalized,Ya=ji.size|0,Aa=ji.offset|0,Ln=ji.stride|0,wo=ji.divisor|0)),wa=c.location,$i=Fe[wa],ca===1?($i.buffer||Je.enableVertexAttribArray(wa),ea=Ya||2,($i.type!==Da||$i.size!==ea||$i.buffer!==yn||$i.normalized!==ba||$i.offset!==Aa||$i.stride!==Ln)&&(Je.bindBuffer(34962,yn.buffer),Je.vertexAttribPointer(wa,ea,Da,ba,Ln,Aa),$i.type=Da,$i.size=ea,$i.buffer=yn,$i.normalized=ba,$i.offset=Aa,$i.stride=Ln),$i.divisor!==wo&&(Wn.vertexAttribDivisorANGLE(wa,wo),$i.divisor=wo)):($i.buffer&&(Je.disableVertexAttribArray(wa),$i.buffer=null),($i.x!==bn||$i.y!==Xi||$i.z!==qn||$i.w!==Ia)&&(Je.vertexAttrib4f(wa,bn,Xi,qn,Ia),$i.x=bn,$i.y=Xi,$i.z=qn,$i.w=Ia)),Sa=zi.colorBuffer,Vi.buffer=Sa,Za=!1,xo=1,Wa=0,hn=0,Un=0,Ss=0,Kn=null,ns=0,Jo=!1,vo=5126,ma=0,ja=0,To=0,de(Vi)?(Za=!0,Kn=De.createStream(34962,Vi),vo=Kn.dtype):(Kn=De.getBuffer(Vi),Kn?vo=Kn.dtype:"constant"in Vi?(xo=2,typeof Vi.constant=="number"?(Wa=Vi.constant,hn=Un=Ss=0):(Wa=Vi.constant.length>0?Vi.constant[0]:0,hn=Vi.constant.length>1?Vi.constant[1]:0,Un=Vi.constant.length>2?Vi.constant[2]:0,Ss=Vi.constant.length>3?Vi.constant[3]:0)):(de(Vi.buffer)?Kn=De.createStream(34962,Vi.buffer):Kn=De.getBuffer(Vi.buffer),vo="type"in Vi?Yr[Vi.type]:Kn.dtype,Jo=!!Vi.normalized,ns=Vi.size|0,ma=Vi.offset|0,ja=Vi.stride|0,To=Vi.divisor|0)),Ao=h.location,la=Fe[Ao],xo===1?(la.buffer||Je.enableVertexAttribArray(Ao),Ki=ns||4,(la.type!==vo||la.size!==Ki||la.buffer!==Kn||la.normalized!==Jo||la.offset!==ma||la.stride!==ja)&&(Je.bindBuffer(34962,Kn.buffer),Je.vertexAttribPointer(Ao,Ki,vo,Jo,ja,ma),la.type=vo,la.size=Ki,la.buffer=Kn,la.normalized=Jo,la.offset=ma,la.stride=ja),la.divisor!==To&&(Wn.vertexAttribDivisorANGLE(Ao,To),la.divisor=To)):(la.buffer&&(Je.disableVertexAttribArray(Ao),la.buffer=null),(la.x!==Wa||la.y!==hn||la.z!==Un||la.w!==Ss)&&(Je.vertexAttrib4f(Ao,Wa,hn,Un,Ss),la.x=Wa,la.y=hn,la.z=Un,la.w=Ss)),ho=p.location,Ka=Fe[ho],Ka.buffer||Je.enableVertexAttribArray(ho),(Ka.type!==5126||Ka.size!==1||Ka.buffer!==d||Ka.normalized!==!1||Ka.offset!==0||Ka.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(ho,1,5126,!1,8,0),Ka.type=5126,Ka.size=1,Ka.buffer=d,Ka.normalized=!1,Ka.offset=0,Ka.stride=8),Ka.divisor!==0&&(Wn.vertexAttribDivisorANGLE(ho,0),Ka.divisor=0),Ca=x.location,ta=Fe[Ca],ta.buffer||Je.enableVertexAttribArray(Ca),(ta.type!==5126||ta.size!==1||ta.buffer!==d||ta.normalized!==!1||ta.offset!==4||ta.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(Ca,1,5126,!1,8,4),ta.type=5126,ta.size=1,ta.buffer=d,ta.normalized=!1,ta.offset=4,ta.stride=8),ta.divisor!==0&&(Wn.vertexAttribDivisorANGLE(Ca,0),ta.divisor=0),En=zi.dashLength,Je.uniform1f(b.location,En),Mo=zi.dashTexture,Mo&&Mo._reglType==="framebuffer"&&(Mo=Mo.color[0]),Ds=Mo._texture,Je.uniform1i(y.location,Ds.bind()),Ro=zi.depth,Je.uniform1f(k.location,Ro),vs=zi.opacity,Je.uniform1f(E.location,vs),Ks=zi.scale,as=Ks[0],Jn=Ks[1],Je.uniform2f(A.location,as,Jn),Cs=zi.scaleFract,Xa=Cs[0],Zo=Cs[1],Je.uniform2f(L.location,Xa,Zo),Eo=zi.thickness,Je.uniform1f(_.location,Eo),lo=zi.translate,$a=lo[0],Xo=lo[1],Je.uniform2f(C.location,$a,Xo),rs=zi.translateFract,$n=rs[0],Sn=rs[1],Je.uniform2f(M.location,$n,Sn),uo=z.call(this,Mt,zi,0),Rs=uo[0],xs=uo[1],Go=uo[2],os=uo[3],Je.uniform4f(v.location,Rs,xs,Go,os),So=fr.elements,So?Je.bindBuffer(34963,So.buffer.buffer):Pe.currentVAO&&(So=Ot.getElements(Pe.currentVAO.elements),So&&Je.bindBuffer(34963,So.buffer.buffer)),Qn=zi.count,Qn>0?So?Wn.drawElementsInstancedANGLE(5,4,So.type,0<<(So.type-5121>>1),Qn):Wn.drawArraysInstancedANGLE(5,0,4,Qn):Qn<0&&(So?Je.drawElements(5,4,So.type,0<<(So.type-5121>>1)):Je.drawArrays(5,0,4)),ir.dirty=!0,Pe.setVAO(null),Mt.viewportWidth=or,Mt.viewportHeight=Nr,xn&&(r.cpuTime+=performance.now()-_a),ia&&De.destroyStream(un),Ja&&De.destroyStream(ln),qa&&De.destroyStream(An),Ga&&De.destroyStream(yn),Za&&De.destroyStream(Kn),Ds.unbind()},scope:function(zi,Mi,sn){var fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt;fi=zi.viewport,Or=fi.x|0,st=fi.y|0,Wt="width"in fi?fi.width|0:Mt.framebufferWidth-Or,tr="height"in fi?fi.height|0:Mt.framebufferHeight-st,or=Mt.viewportWidth,Mt.viewportWidth=Wt,Nr=Mt.viewportHeight,Mt.viewportHeight=tr,hi=zr[0],zr[0]=Or,Gi=zr[1],zr[1]=st,Qr=zr[2],zr[2]=Wt,Ui=zr[3],zr[3]=tr,zn=ht[0],ht[0]=T,fn=ht[1],ht[1]=F,xn=ht[2],ht[2]=q,_a=ht[3],ht[3]=U,Wn=Kt.blend_enable,Kt.blend_enable=H,Fn=St[0],St[0]=j,ia=St[1],St[1]=G,za=qr[0],qr[0]=O,Hr=qr[1],qr[1]=W,na=qr[2],qr[2]=re,go=qr[3],qr[3]=ne,Dn=i.call(this,Mt,zi,sn),un=Kt.depth_enable,Kt.depth_enable=Dn,Zn=zi.viewport,Wo=Zn.x|0,Ba=Zn.y|0,Bo="width"in Zn?Zn.width|0:Mt.framebufferWidth-Wo,Ea="height"in Zn?Zn.height|0:Mt.framebufferHeight-Ba,Ha=sr[0],sr[0]=Wo,tn=sr[1],sr[1]=Ba,Cn=sr[2],sr[2]=Bo,Xn=sr[3],sr[3]=Ea,ts=Kt.scissor_enable,Kt.scissor_enable=be,Ja=Kt.stencil_enable,Kt.stencil_enable=ze,to=ir.profile,to&&(Ri=performance.now(),r.count++),an=fr.offset,fr.offset=Ce,cs=fr.count,fr.count=he,pa=zi.count,ln=fr.instances,fr.instances=pa,ka=fr.primitive,fr.primitive=te,va=ke.call(this,Mt,zi,sn),bo=Ie[Ee],Ie[Ee]=va,Co=zi.miterLimit,Fi=Ie[Me],Ie[Me]=Co,Yn=zi.scale,xa=Ie[Oe],Ie[Oe]=Yn,Qi=zi.scaleFract,Nn=Ie[Re],Ie[Re]=Qi,Pn=zi.translateFract,qa=Ie[me],Ie[me]=Pn,jo=zi.translate,Vo=Ie[Be],Ie[Be]=jo,Pa=zi.thickness,Oa=Ie[fe],Ie[fe]=Pa,co=zi.dashTexture,An=Ie[Ze],Ie[Ze]=co,_o=zi.opacity,ks=Ie[et],Ie[et]=_o,bs=Mt.pixelRatio,ps=Ie[gt],Ie[gt]=bs,sa=zi.id,Bn=Ie[Pt],Ie[Pt]=sa,ms=zi.dashLength,ya=Ie[Qe],Ie[Qe]=ms,on=z.call(this,Mt,zi,sn),mn=Ie[Xe],Ie[Xe]=on,Ga=zi.depth,ca=Ie[Tt],Ie[Tt]=Ga,bn=xt.state,xt.state=1,Xi=xt.x,xt.x=0,qn=xt.y,xt.y=0,Ia=xt.z,xt.z=0,yn=xt.w,xt.w=0,Ya=xt.buffer,xt.buffer=d,ba=xt.size,xt.size=0,Da=xt.normalized,xt.normalized=!1,Aa=xt.type,xt.type=5126,Ln=xt.offset,xt.offset=0,wo=xt.stride,xt.stride=8,wa=xt.divisor,xt.divisor=0,$i=_t.state,_t.state=1,ea=_t.x,_t.x=0,Sa=_t.y,_t.y=0,Za=_t.z,_t.z=0,xo=_t.w,_t.w=0,Wa=_t.buffer,_t.buffer=d,hn=_t.size,_t.size=0,Un=_t.normalized,_t.normalized=!1,Ss=_t.type,_t.type=5126,Kn=_t.offset,_t.offset=4,ns=_t.stride,_t.stride=8,Jo=_t.divisor,_t.divisor=0,vo=zi.positionBuffer,Ur.buffer=vo,ma=!1,ja=1,To=0,Ao=0,la=0,Ki=0,ho=null,Ka=0,Ca=!1,ta=5126,En=0,Mo=0,Ds=0,de(Ur)?(ma=!0,ho=De.createStream(34962,Ur),ta=ho.dtype):(ho=De.getBuffer(Ur),ho?ta=ho.dtype:"constant"in Ur?(ja=2,typeof Ur.constant=="number"?(To=Ur.constant,Ao=la=Ki=0):(To=Ur.constant.length>0?Ur.constant[0]:0,Ao=Ur.constant.length>1?Ur.constant[1]:0,la=Ur.constant.length>2?Ur.constant[2]:0,Ki=Ur.constant.length>3?Ur.constant[3]:0)):(de(Ur.buffer)?ho=De.createStream(34962,Ur.buffer):ho=De.getBuffer(Ur.buffer),ta="type"in Ur?Yr[Ur.type]:ho.dtype,Ca=!!Ur.normalized,Ka=Ur.size|0,En=Ur.offset|0,Mo=Ur.stride|0,Ds=Ur.divisor|0)),Ro=Ct.state,Ct.state=ja,vs=Ct.x,Ct.x=To,Ks=Ct.y,Ct.y=Ao,as=Ct.z,Ct.z=la,Jn=Ct.w,Ct.w=Ki,Cs=Ct.buffer,Ct.buffer=ho,Xa=Ct.size,Ct.size=Ka,Zo=Ct.normalized,Ct.normalized=Ca,Eo=Ct.type,Ct.type=ta,lo=Ct.offset,Ct.offset=En,$a=Ct.stride,Ct.stride=Mo,Xo=Ct.divisor,Ct.divisor=Ds,rs=zi.positionBuffer,ti.buffer=rs,$n=!1,Sn=1,uo=0,Rs=0,xs=0,Go=0,os=null,So=0,Qn=!1,zo=5126,rl=0,$o=0,Na=0,de(ti)?($n=!0,os=De.createStream(34962,ti),zo=os.dtype):(os=De.getBuffer(ti),os?zo=os.dtype:"constant"in ti?(Sn=2,typeof ti.constant=="number"?(uo=ti.constant,Rs=xs=Go=0):(uo=ti.constant.length>0?ti.constant[0]:0,Rs=ti.constant.length>1?ti.constant[1]:0,xs=ti.constant.length>2?ti.constant[2]:0,Go=ti.constant.length>3?ti.constant[3]:0)):(de(ti.buffer)?os=De.createStream(34962,ti.buffer):os=De.getBuffer(ti.buffer),zo="type"in ti?Yr[ti.type]:os.dtype,Qn=!!ti.normalized,So=ti.size|0,rl=ti.offset|0,$o=ti.stride|0,Na=ti.divisor|0)),Ua=jt.state,jt.state=Sn,Po=jt.x,jt.x=uo,fo=jt.y,jt.y=Rs,ro=jt.z,jt.z=xs,Ma=jt.w,jt.w=Go,io=jt.buffer,jt.buffer=os,aa=jt.size,jt.size=So,Oo=jt.normalized,jt.normalized=Qn,No=jt.type,jt.type=zo,Zs=jt.offset,jt.offset=rl,Fs=jt.stride,jt.stride=$o,ws=jt.divisor,jt.divisor=Na,no=zi.positionFractBuffer,ki.buffer=no,Ls=!1,ds=1,Xs=0,oa=0,Yo=0,po=0,ss=null,ls=0,gs=!1,bt=5126,Ft=0,hr=0,nr=0,de(ki)?(Ls=!0,ss=De.createStream(34962,ki),bt=ss.dtype):(ss=De.getBuffer(ki),ss?bt=ss.dtype:"constant"in ki?(ds=2,typeof ki.constant=="number"?(Xs=ki.constant,oa=Yo=po=0):(Xs=ki.constant.length>0?ki.constant[0]:0,oa=ki.constant.length>1?ki.constant[1]:0,Yo=ki.constant.length>2?ki.constant[2]:0,po=ki.constant.length>3?ki.constant[3]:0)):(de(ki.buffer)?ss=De.createStream(34962,ki.buffer):ss=De.getBuffer(ki.buffer),bt="type"in ki?Yr[ki.type]:ss.dtype,gs=!!ki.normalized,ls=ki.size|0,Ft=ki.offset|0,hr=ki.stride|0,nr=ki.divisor|0)),Sr=At.state,At.state=ds,li=At.x,At.x=Xs,di=At.y,At.y=oa,mi=At.z,At.z=Yo,Oi=At.w,At.w=po,dn=At.buffer,At.buffer=ss,wi=At.size,At.size=ls,ui=At.normalized,At.normalized=gs,Ai=At.type,At.type=bt,gi=At.offset,At.offset=Ft,gn=At.stride,At.stride=hr,In=At.divisor,At.divisor=nr,Vn=zi.positionFractBuffer,ji.buffer=Vn,Rn=!1,Hn=1,Gn=0,pn=0,Lo=0,us=0,Bs=null,Js=0,ol=!1,Cl=5126,ul=0,Gl=0,Vl=0,de(ji)?(Rn=!0,Bs=De.createStream(34962,ji),Cl=Bs.dtype):(Bs=De.getBuffer(ji),Bs?Cl=Bs.dtype:"constant"in ji?(Hn=2,typeof ji.constant=="number"?(Gn=ji.constant,pn=Lo=us=0):(Gn=ji.constant.length>0?ji.constant[0]:0,pn=ji.constant.length>1?ji.constant[1]:0,Lo=ji.constant.length>2?ji.constant[2]:0,us=ji.constant.length>3?ji.constant[3]:0)):(de(ji.buffer)?Bs=De.createStream(34962,ji.buffer):Bs=De.getBuffer(ji.buffer),Cl="type"in ji?Yr[ji.type]:Bs.dtype,ol=!!ji.normalized,Js=ji.size|0,ul=ji.offset|0,Gl=ji.stride|0,Vl=ji.divisor|0)),Fl=Te.state,Te.state=Hn,ga=Te.x,Te.x=Gn,ko=Te.y,Te.y=pn,zs=Te.z,Te.z=Lo,Fo=Te.w,Te.w=us,Ys=Te.buffer,Te.buffer=Bs,Gs=Te.size,Te.size=Js,Us=Te.normalized,Te.normalized=ol,Sl=Te.type,Te.type=Cl,_l=Te.offset,Te.offset=ul,kl=Te.stride,Te.stride=Gl,cl=Te.divisor,Te.divisor=Vl,xl=zi.colorBuffer,Vi.buffer=xl,Uo=!1,_s=1,Bl=0,Il=0,Dl=0,oe=0,w=null,B=0,Q=!1,ee=5126,le=0,Ne=0,$e=0,de(Vi)?(Uo=!0,w=De.createStream(34962,Vi),ee=w.dtype):(w=De.getBuffer(Vi),w?ee=w.dtype:"constant"in Vi?(_s=2,typeof Vi.constant=="number"?(Bl=Vi.constant,Il=Dl=oe=0):(Bl=Vi.constant.length>0?Vi.constant[0]:0,Il=Vi.constant.length>1?Vi.constant[1]:0,Dl=Vi.constant.length>2?Vi.constant[2]:0,oe=Vi.constant.length>3?Vi.constant[3]:0)):(de(Vi.buffer)?w=De.createStream(34962,Vi.buffer):w=De.getBuffer(Vi.buffer),ee="type"in Vi?Yr[Vi.type]:w.dtype,Q=!!Vi.normalized,B=Vi.size|0,le=Vi.offset|0,Ne=Vi.stride|0,$e=Vi.divisor|0)),pt=nt.state,nt.state=_s,zt=nt.x,nt.x=Bl,Yt=nt.y,nt.y=Il,Jt=nt.z,nt.z=Dl,yr=nt.w,nt.w=oe,Ir=nt.buffer,nt.buffer=w,ce=nt.size,nt.size=B,Ae=nt.normalized,nt.normalized=Q,qe=nt.type,nt.type=ee,Ve=nt.offset,nt.offset=le,ot=nt.stride,nt.stride=Ne,Ke=nt.divisor,nt.divisor=$e,ft=_e.vert,_e.vert=ut,qt=_e.frag,_e.frag=ct,ir.dirty=!0,Mi(Mt,zi,sn),Mt.viewportWidth=or,Mt.viewportHeight=Nr,zr[0]=hi,zr[1]=Gi,zr[2]=Qr,zr[3]=Ui,ht[0]=zn,ht[1]=fn,ht[2]=xn,ht[3]=_a,Kt.blend_enable=Wn,St[0]=Fn,St[1]=ia,qr[0]=za,qr[1]=Hr,qr[2]=na,qr[3]=go,Kt.depth_enable=un,sr[0]=Ha,sr[1]=tn,sr[2]=Cn,sr[3]=Xn,Kt.scissor_enable=ts,Kt.stencil_enable=Ja,to&&(r.cpuTime+=performance.now()-Ri),fr.offset=an,fr.count=cs,fr.instances=ln,fr.primitive=ka,Ie[Ee]=bo,Ie[Me]=Fi,Ie[Oe]=xa,Ie[Re]=Nn,Ie[me]=qa,Ie[Be]=Vo,Ie[fe]=Oa,Ie[Ze]=An,Ie[et]=ks,Ie[gt]=ps,Ie[Pt]=Bn,Ie[Qe]=ya,Ie[Xe]=mn,Ie[Tt]=ca,xt.state=bn,xt.x=Xi,xt.y=qn,xt.z=Ia,xt.w=yn,xt.buffer=Ya,xt.size=ba,xt.normalized=Da,xt.type=Aa,xt.offset=Ln,xt.stride=wo,xt.divisor=wa,_t.state=$i,_t.x=ea,_t.y=Sa,_t.z=Za,_t.w=xo,_t.buffer=Wa,_t.size=hn,_t.normalized=Un,_t.type=Ss,_t.offset=Kn,_t.stride=ns,_t.divisor=Jo,ma&&De.destroyStream(ho),Ct.state=Ro,Ct.x=vs,Ct.y=Ks,Ct.z=as,Ct.w=Jn,Ct.buffer=Cs,Ct.size=Xa,Ct.normalized=Zo,Ct.type=Eo,Ct.offset=lo,Ct.stride=$a,Ct.divisor=Xo,$n&&De.destroyStream(os),jt.state=Ua,jt.x=Po,jt.y=fo,jt.z=ro,jt.w=Ma,jt.buffer=io,jt.size=aa,jt.normalized=Oo,jt.type=No,jt.offset=Zs,jt.stride=Fs,jt.divisor=ws,Ls&&De.destroyStream(ss),At.state=Sr,At.x=li,At.y=di,At.z=mi,At.w=Oi,At.buffer=dn,At.size=wi,At.normalized=ui,At.type=Ai,At.offset=gi,At.stride=gn,At.divisor=In,Rn&&De.destroyStream(Bs),Te.state=Fl,Te.x=ga,Te.y=ko,Te.z=zs,Te.w=Fo,Te.buffer=Ys,Te.size=Gs,Te.normalized=Us,Te.type=Sl,Te.offset=_l,Te.stride=kl,Te.divisor=cl,Uo&&De.destroyStream(w),nt.state=pt,nt.x=zt,nt.y=Yt,nt.z=Jt,nt.w=yr,nt.buffer=Ir,nt.size=ce,nt.normalized=Ae,nt.type=qe,nt.offset=Ve,nt.stride=ot,nt.divisor=Ke,_e.vert=ft,_e.frag=qt,ir.dirty=!0},batch:function(zi,Mi){var sn,fi,Or,st,Wt,tr,or;if(sn=ye.angle_instanced_arrays,fi=lt.next,fi!==lt.cur&&(fi?Je.bindFramebuffer(36160,fi.framebuffer):Je.bindFramebuffer(36160,null),lt.cur=fi),ir.dirty){var Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an;Nr=Kt.dither,Nr!==ir.dither&&(Nr?Je.enable(3024):Je.disable(3024),ir.dither=Nr),hi=Kt.depth_func,hi!==ir.depth_func&&(Je.depthFunc(hi),ir.depth_func=hi),Gi=vr[0],Qr=vr[1],(Gi!==Er[0]||Qr!==Er[1])&&(Je.depthRange(Gi,Qr),Er[0]=Gi,Er[1]=Qr),Ui=Kt.depth_mask,Ui!==ir.depth_mask&&(Je.depthMask(Ui),ir.depth_mask=Ui),zn=si[0],fn=si[1],xn=si[2],_a=si[3],(zn!==Ei[0]||fn!==Ei[1]||xn!==Ei[2]||_a!==Ei[3])&&(Je.colorMask(zn,fn,xn,_a),Ei[0]=zn,Ei[1]=fn,Ei[2]=xn,Ei[3]=_a),Wn=Kt.cull_enable,Wn!==ir.cull_enable&&(Wn?Je.enable(2884):Je.disable(2884),ir.cull_enable=Wn),Fn=Kt.cull_face,Fn!==ir.cull_face&&(Je.cullFace(Fn),ir.cull_face=Fn),ia=Kt.frontFace,ia!==ir.frontFace&&(Je.frontFace(ia),ir.frontFace=ia),za=Kt.lineWidth,za!==ir.lineWidth&&(Je.lineWidth(za),ir.lineWidth=za),Hr=Kt.polygonOffset_enable,Hr!==ir.polygonOffset_enable&&(Hr?Je.enable(32823):Je.disable(32823),ir.polygonOffset_enable=Hr),na=Si[0],go=Si[1],(na!==xi[0]||go!==xi[1])&&(Je.polygonOffset(na,go),xi[0]=na,xi[1]=go),Dn=Kt.sample_alpha,Dn!==ir.sample_alpha&&(Dn?Je.enable(32926):Je.disable(32926),ir.sample_alpha=Dn),un=Kt.sample_enable,un!==ir.sample_enable&&(un?Je.enable(32928):Je.disable(32928),ir.sample_enable=un),Zn=Hi[0],Wo=Hi[1],(Zn!==Jr[0]||Wo!==Jr[1])&&(Je.sampleCoverage(Zn,Wo),Jr[0]=Zn,Jr[1]=Wo),Ba=Kt.stencil_mask,Ba!==ir.stencil_mask&&(Je.stencilMask(Ba),ir.stencil_mask=Ba),Bo=ci[0],Ea=ci[1],Ha=ci[2],(Bo!==Di[0]||Ea!==Di[1]||Ha!==Di[2])&&(Je.stencilFunc(Bo,Ea,Ha),Di[0]=Bo,Di[1]=Ea,Di[2]=Ha),tn=Lt[0],Cn=Lt[1],Xn=Lt[2],ts=Lt[3],(tn!==vt[0]||Cn!==vt[1]||Xn!==vt[2]||ts!==vt[3])&&(Je.stencilOpSeparate(tn,Cn,Xn,ts),vt[0]=tn,vt[1]=Cn,vt[2]=Xn,vt[3]=ts),Ja=Dt[0],to=Dt[1],Ri=Dt[2],an=Dt[3],(Ja!==Bt[0]||to!==Bt[1]||Ri!==Bt[2]||an!==Bt[3])&&(Je.stencilOpSeparate(Ja,to,Ri,an),Bt[0]=Ja,Bt[1]=to,Bt[2]=Ri,Bt[3]=an)}Je.blendColor(0,0,0,0),Et[0]=0,Et[1]=0,Et[2]=0,Et[3]=0,rt?Je.enable(3042):Je.disable(3042),ir.blend_enable=rt,Je.blendEquationSeparate(32774,32774),Zt[0]=32774,Zt[1]=32774,Je.blendFuncSeparate(770,771,773,1),Lr[0]=770,Lr[1]=771,Lr[2]=773,Lr[3]=1,je?Je.enable(3089):Je.disable(3089),ir.scissor_enable=je,tt?Je.enable(2960):Je.disable(2960),ir.stencil_enable=tt,Or=ir.profile,Or&&(st=performance.now(),r.count+=Mi),Je.useProgram(s.program),Wt=ye.angle_instanced_arrays;var cs,pa,ln,ka,va;for(Pe.setVAO(null),cs=p.location,pa=Fe[cs],pa.buffer||Je.enableVertexAttribArray(cs),(pa.type!==5126||pa.size!==1||pa.buffer!==d||pa.normalized!==!1||pa.offset!==0||pa.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(cs,1,5126,!1,8,0),pa.type=5126,pa.size=1,pa.buffer=d,pa.normalized=!1,pa.offset=0,pa.stride=8),pa.divisor!==0&&(Wt.vertexAttribDivisorANGLE(cs,0),pa.divisor=0),ln=x.location,ka=Fe[ln],ka.buffer||Je.enableVertexAttribArray(ln),(ka.type!==5126||ka.size!==1||ka.buffer!==d||ka.normalized!==!1||ka.offset!==4||ka.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(ln,1,5126,!1,8,4),ka.type=5126,ka.size=1,ka.buffer=d,ka.normalized=!1,ka.offset=4,ka.stride=8),ka.divisor!==0&&(Wt.vertexAttribDivisorANGLE(ln,0),ka.divisor=0),va=fr.elements,va?Je.bindBuffer(34963,va.buffer.buffer):Pe.currentVAO&&(va=Ot.getElements(Pe.currentVAO.elements),va&&Je.bindBuffer(34963,va.buffer.buffer)),tr=0;tr<Mi;++tr){or=zi[tr];var bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js;bo=or.viewport,Co=bo.x|0,Fi=bo.y|0,Yn="width"in bo?bo.width|0:Mt.framebufferWidth-Co,xa="height"in bo?bo.height|0:Mt.framebufferHeight-Fi,Qi=Mt.viewportWidth,Mt.viewportWidth=Yn,Nn=Mt.viewportHeight,Mt.viewportHeight=xa,Je.viewport(Co,Fi,Yn,xa),Tr[0]=Co,Tr[1]=Fi,Tr[2]=Yn,Tr[3]=xa,Pn=i.call(this,Mt,or,tr),Pn?Je.enable(2929):Je.disable(2929),ir.depth_enable=Pn,qa=or.viewport,jo=qa.x|0,Vo=qa.y|0,Pa="width"in qa?qa.width|0:Mt.framebufferWidth-jo,Oa="height"in qa?qa.height|0:Mt.framebufferHeight-Vo,Je.scissor(jo,Vo,Pa,Oa),br[0]=jo,br[1]=Vo,br[2]=Pa,br[3]=Oa,co=or.positionBuffer,Ur.buffer=co,An=!1,_o=1,ks=0,bs=0,ps=0,sa=0,Bn=null,ms=0,ya=!1,on=5126,mn=0,Ga=0,ca=0,de(Ur)?(An=!0,Bn=De.createStream(34962,Ur),on=Bn.dtype):(Bn=De.getBuffer(Ur),Bn?on=Bn.dtype:"constant"in Ur?(_o=2,typeof Ur.constant=="number"?(ks=Ur.constant,bs=ps=sa=0):(ks=Ur.constant.length>0?Ur.constant[0]:0,bs=Ur.constant.length>1?Ur.constant[1]:0,ps=Ur.constant.length>2?Ur.constant[2]:0,sa=Ur.constant.length>3?Ur.constant[3]:0)):(de(Ur.buffer)?Bn=De.createStream(34962,Ur.buffer):Bn=De.getBuffer(Ur.buffer),on="type"in Ur?Yr[Ur.type]:Bn.dtype,ya=!!Ur.normalized,ms=Ur.size|0,mn=Ur.offset|0,Ga=Ur.stride|0,ca=Ur.divisor|0)),bn=u.location,Xi=Fe[bn],_o===1?(Xi.buffer||Je.enableVertexAttribArray(bn),qn=ms||2,(Xi.type!==on||Xi.size!==qn||Xi.buffer!==Bn||Xi.normalized!==ya||Xi.offset!==mn||Xi.stride!==Ga)&&(Je.bindBuffer(34962,Bn.buffer),Je.vertexAttribPointer(bn,qn,on,ya,Ga,mn),Xi.type=on,Xi.size=qn,Xi.buffer=Bn,Xi.normalized=ya,Xi.offset=mn,Xi.stride=Ga),Xi.divisor!==ca&&(Wt.vertexAttribDivisorANGLE(bn,ca),Xi.divisor=ca)):(Xi.buffer&&(Je.disableVertexAttribArray(bn),Xi.buffer=null),(Xi.x!==ks||Xi.y!==bs||Xi.z!==ps||Xi.w!==sa)&&(Je.vertexAttrib4f(bn,ks,bs,ps,sa),Xi.x=ks,Xi.y=bs,Xi.z=ps,Xi.w=sa)),Ia=or.positionFractBuffer,ki.buffer=Ia,yn=!1,Ya=1,ba=0,Da=0,Aa=0,Ln=0,wo=null,wa=0,$i=!1,ea=5126,Sa=0,Za=0,xo=0,de(ki)?(yn=!0,wo=De.createStream(34962,ki),ea=wo.dtype):(wo=De.getBuffer(ki),wo?ea=wo.dtype:"constant"in ki?(Ya=2,typeof ki.constant=="number"?(ba=ki.constant,Da=Aa=Ln=0):(ba=ki.constant.length>0?ki.constant[0]:0,Da=ki.constant.length>1?ki.constant[1]:0,Aa=ki.constant.length>2?ki.constant[2]:0,Ln=ki.constant.length>3?ki.constant[3]:0)):(de(ki.buffer)?wo=De.createStream(34962,ki.buffer):wo=De.getBuffer(ki.buffer),ea="type"in ki?Yr[ki.type]:wo.dtype,$i=!!ki.normalized,wa=ki.size|0,Sa=ki.offset|0,Za=ki.stride|0,xo=ki.divisor|0)),Wa=l.location,hn=Fe[Wa],Ya===1?(hn.buffer||Je.enableVertexAttribArray(Wa),Un=wa||2,(hn.type!==ea||hn.size!==Un||hn.buffer!==wo||hn.normalized!==$i||hn.offset!==Sa||hn.stride!==Za)&&(Je.bindBuffer(34962,wo.buffer),Je.vertexAttribPointer(Wa,Un,ea,$i,Za,Sa),hn.type=ea,hn.size=Un,hn.buffer=wo,hn.normalized=$i,hn.offset=Sa,hn.stride=Za),hn.divisor!==xo&&(Wt.vertexAttribDivisorANGLE(Wa,xo),hn.divisor=xo)):(hn.buffer&&(Je.disableVertexAttribArray(Wa),hn.buffer=null),(hn.x!==ba||hn.y!==Da||hn.z!==Aa||hn.w!==Ln)&&(Je.vertexAttrib4f(Wa,ba,Da,Aa,Ln),hn.x=ba,hn.y=Da,hn.z=Aa,hn.w=Ln)),Ss=or.positionBuffer,ti.buffer=Ss,Kn=!1,ns=1,Jo=0,vo=0,ma=0,ja=0,To=null,Ao=0,la=!1,Ki=5126,ho=0,Ka=0,Ca=0,de(ti)?(Kn=!0,To=De.createStream(34962,ti),Ki=To.dtype):(To=De.getBuffer(ti),To?Ki=To.dtype:"constant"in ti?(ns=2,typeof ti.constant=="number"?(Jo=ti.constant,vo=ma=ja=0):(Jo=ti.constant.length>0?ti.constant[0]:0,vo=ti.constant.length>1?ti.constant[1]:0,ma=ti.constant.length>2?ti.constant[2]:0,ja=ti.constant.length>3?ti.constant[3]:0)):(de(ti.buffer)?To=De.createStream(34962,ti.buffer):To=De.getBuffer(ti.buffer),Ki="type"in ti?Yr[ti.type]:To.dtype,la=!!ti.normalized,Ao=ti.size|0,ho=ti.offset|0,Ka=ti.stride|0,Ca=ti.divisor|0)),ta=f.location,En=Fe[ta],ns===1?(En.buffer||Je.enableVertexAttribArray(ta),Mo=Ao||2,(En.type!==Ki||En.size!==Mo||En.buffer!==To||En.normalized!==la||En.offset!==ho||En.stride!==Ka)&&(Je.bindBuffer(34962,To.buffer),Je.vertexAttribPointer(ta,Mo,Ki,la,Ka,ho),En.type=Ki,En.size=Mo,En.buffer=To,En.normalized=la,En.offset=ho,En.stride=Ka),En.divisor!==Ca&&(Wt.vertexAttribDivisorANGLE(ta,Ca),En.divisor=Ca)):(En.buffer&&(Je.disableVertexAttribArray(ta),En.buffer=null),(En.x!==Jo||En.y!==vo||En.z!==ma||En.w!==ja)&&(Je.vertexAttrib4f(ta,Jo,vo,ma,ja),En.x=Jo,En.y=vo,En.z=ma,En.w=ja)),Ds=or.positionFractBuffer,ji.buffer=Ds,Ro=!1,vs=1,Ks=0,as=0,Jn=0,Cs=0,Xa=null,Zo=0,Eo=!1,lo=5126,$a=0,Xo=0,rs=0,de(ji)?(Ro=!0,Xa=De.createStream(34962,ji),lo=Xa.dtype):(Xa=De.getBuffer(ji),Xa?lo=Xa.dtype:"constant"in ji?(vs=2,typeof ji.constant=="number"?(Ks=ji.constant,as=Jn=Cs=0):(Ks=ji.constant.length>0?ji.constant[0]:0,as=ji.constant.length>1?ji.constant[1]:0,Jn=ji.constant.length>2?ji.constant[2]:0,Cs=ji.constant.length>3?ji.constant[3]:0)):(de(ji.buffer)?Xa=De.createStream(34962,ji.buffer):Xa=De.getBuffer(ji.buffer),lo="type"in ji?Yr[ji.type]:Xa.dtype,Eo=!!ji.normalized,Zo=ji.size|0,$a=ji.offset|0,Xo=ji.stride|0,rs=ji.divisor|0)),$n=c.location,Sn=Fe[$n],vs===1?(Sn.buffer||Je.enableVertexAttribArray($n),uo=Zo||2,(Sn.type!==lo||Sn.size!==uo||Sn.buffer!==Xa||Sn.normalized!==Eo||Sn.offset!==$a||Sn.stride!==Xo)&&(Je.bindBuffer(34962,Xa.buffer),Je.vertexAttribPointer($n,uo,lo,Eo,Xo,$a),Sn.type=lo,Sn.size=uo,Sn.buffer=Xa,Sn.normalized=Eo,Sn.offset=$a,Sn.stride=Xo),Sn.divisor!==rs&&(Wt.vertexAttribDivisorANGLE($n,rs),Sn.divisor=rs)):(Sn.buffer&&(Je.disableVertexAttribArray($n),Sn.buffer=null),(Sn.x!==Ks||Sn.y!==as||Sn.z!==Jn||Sn.w!==Cs)&&(Je.vertexAttrib4f($n,Ks,as,Jn,Cs),Sn.x=Ks,Sn.y=as,Sn.z=Jn,Sn.w=Cs)),Rs=or.colorBuffer,Vi.buffer=Rs,xs=!1,Go=1,os=0,So=0,Qn=0,zo=0,rl=null,$o=0,Na=!1,Ua=5126,Po=0,fo=0,ro=0,de(Vi)?(xs=!0,rl=De.createStream(34962,Vi),Ua=rl.dtype):(rl=De.getBuffer(Vi),rl?Ua=rl.dtype:"constant"in Vi?(Go=2,typeof Vi.constant=="number"?(os=Vi.constant,So=Qn=zo=0):(os=Vi.constant.length>0?Vi.constant[0]:0,So=Vi.constant.length>1?Vi.constant[1]:0,Qn=Vi.constant.length>2?Vi.constant[2]:0,zo=Vi.constant.length>3?Vi.constant[3]:0)):(de(Vi.buffer)?rl=De.createStream(34962,Vi.buffer):rl=De.getBuffer(Vi.buffer),Ua="type"in Vi?Yr[Vi.type]:rl.dtype,Na=!!Vi.normalized,$o=Vi.size|0,Po=Vi.offset|0,fo=Vi.stride|0,ro=Vi.divisor|0)),Ma=h.location,io=Fe[Ma],Go===1?(io.buffer||Je.enableVertexAttribArray(Ma),aa=$o||4,(io.type!==Ua||io.size!==aa||io.buffer!==rl||io.normalized!==Na||io.offset!==Po||io.stride!==fo)&&(Je.bindBuffer(34962,rl.buffer),Je.vertexAttribPointer(Ma,aa,Ua,Na,fo,Po),io.type=Ua,io.size=aa,io.buffer=rl,io.normalized=Na,io.offset=Po,io.stride=fo),io.divisor!==ro&&(Wt.vertexAttribDivisorANGLE(Ma,ro),io.divisor=ro)):(io.buffer&&(Je.disableVertexAttribArray(Ma),io.buffer=null),(io.x!==os||io.y!==So||io.z!==Qn||io.w!==zo)&&(Je.vertexAttrib4f(Ma,os,So,Qn,zo),io.x=os,io.y=So,io.z=Qn,io.w=zo)),Oo=or.dashLength,(!tr||No!==Oo)&&(No=Oo,Je.uniform1f(b.location,Oo)),Zs=or.dashTexture,Zs&&Zs._reglType==="framebuffer"&&(Zs=Zs.color[0]),Fs=Zs._texture,Je.uniform1i(y.location,Fs.bind()),ws=or.depth,(!tr||no!==ws)&&(no=ws,Je.uniform1f(k.location,ws)),Ls=or.opacity,(!tr||ds!==Ls)&&(ds=Ls,Je.uniform1f(E.location,Ls)),Xs=or.scale,oa=Xs[0],po=Xs[1],(!tr||Yo!==oa||ss!==po)&&(Yo=oa,ss=po,Je.uniform2f(A.location,oa,po)),ls=or.scaleFract,gs=ls[0],Ft=ls[1],(!tr||bt!==gs||hr!==Ft)&&(bt=gs,hr=Ft,Je.uniform2f(L.location,gs,Ft)),nr=or.thickness,(!tr||Sr!==nr)&&(Sr=nr,Je.uniform1f(_.location,nr)),li=or.translate,di=li[0],Oi=li[1],(!tr||mi!==di||dn!==Oi)&&(mi=di,dn=Oi,Je.uniform2f(C.location,di,Oi)),wi=or.translateFract,ui=wi[0],gi=wi[1],(!tr||Ai!==ui||gn!==gi)&&(Ai=ui,gn=gi,Je.uniform2f(M.location,ui,gi)),In=z.call(this,Mt,or,tr),Vn=In[0],Hn=In[1],pn=In[2],us=In[3],(!tr||Rn!==Vn||Gn!==Hn||Lo!==pn||Bs!==us)&&(Rn=Vn,Gn=Hn,Lo=pn,Bs=us,Je.uniform4f(v.location,Vn,Hn,pn,us)),Js=or.count,Js>0?va?Wt.drawElementsInstancedANGLE(5,4,va.type,0<<(va.type-5121>>1),Js):Wt.drawArraysInstancedANGLE(5,0,4,Js):Js<0&&(va?Je.drawElements(5,4,va.type,0<<(va.type-5121>>1)):Je.drawArrays(5,0,4)),Mt.viewportWidth=Qi,Mt.viewportHeight=Nn,An&&De.destroyStream(Bn),yn&&De.destroyStream(wo),Kn&&De.destroyStream(To),Ro&&De.destroyStream(Xa),xs&&De.destroyStream(rl),Fs.unbind()}ir.dirty=!0,Pe.setVAO(null),Or&&(r.cpuTime+=performance.now()-st)}}}});var S9=Se((r1r,BOe)=>{BOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De){"use strict";var _e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or;return _e=t.gl,Fe=t.context,Pe=t.strings,Ie=t.next,lt=t.current,ye=t.draw,ue=t.elements,de=t.buffer,ht=t.shader,Et=t.attributes,St=t.vao,Zt=t.uniforms,qr=t.framebuffer,Lr=t.extensions,vr=t.timer,Er=t.isBufferArgs,si=Ie.blend_color,Ei=lt.blend_color,Si=Ie.blend_equation,xi=lt.blend_equation,Hi=Ie.blend_func,Jr=lt.blend_func,ci=Ie.depth_range,Di=lt.depth_range,Lt=Ie.colorMask,vt=lt.colorMask,Dt=Ie.polygonOffset_offset,Bt=lt.polygonOffset_offset,sr=Ie.sample_coverage,br=lt.sample_coverage,zr=Ie.stencil_func,Tr=lt.stencil_func,Rr=Ie.stencil_opFront,Br=lt.stencil_opFront,oi=Ie.stencil_opBack,vi=lt.stencil_opBack,Pi=Ie.scissor_box,Yr=lt.scissor_box,Ni=Ie.viewport,Ur=lt.viewport,ti={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ki={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},ji={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},Vi={add:32774,subtract:32778,"reverse subtract":32779},zi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Mi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},sn={cw:2304,ccw:2305},fi={},fi.stride=4,fi.offset=0,fi.divisor=1,Or={},Or.stride=4,Or.offset=4,Or.divisor=1,st={},st.stride=8,st.offset=0,st.divisor=1,Wt={},Wt.stride=8,Wt.offset=8,Wt.divisor=1,tr={},tr.stride=8,tr.offset=16,tr.divisor=1,or={},or.stride=8,or.offset=24,or.divisor=1,{draw:function(Nr){var hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo;if(hi=Lr.angle_instanced_arrays,Gi=qr.next,Gi!==qr.cur&&(Gi?_e.bindFramebuffer(36160,Gi.framebuffer):_e.bindFramebuffer(36160,null),qr.cur=Gi),lt.dirty){var po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol;po=Ie.dither,po!==lt.dither&&(po?_e.enable(3024):_e.disable(3024),lt.dither=po),ss=Ie.depth_func,ss!==lt.depth_func&&(_e.depthFunc(ss),lt.depth_func=ss),ls=ci[0],gs=ci[1],(ls!==Di[0]||gs!==Di[1])&&(_e.depthRange(ls,gs),Di[0]=ls,Di[1]=gs),bt=Ie.depth_mask,bt!==lt.depth_mask&&(_e.depthMask(bt),lt.depth_mask=bt),Ft=Lt[0],hr=Lt[1],nr=Lt[2],Sr=Lt[3],(Ft!==vt[0]||hr!==vt[1]||nr!==vt[2]||Sr!==vt[3])&&(_e.colorMask(Ft,hr,nr,Sr),vt[0]=Ft,vt[1]=hr,vt[2]=nr,vt[3]=Sr),li=Ie.frontFace,li!==lt.frontFace&&(_e.frontFace(li),lt.frontFace=li),di=Ie.lineWidth,di!==lt.lineWidth&&(_e.lineWidth(di),lt.lineWidth=di),mi=Ie.polygonOffset_enable,mi!==lt.polygonOffset_enable&&(mi?_e.enable(32823):_e.disable(32823),lt.polygonOffset_enable=mi),Oi=Dt[0],dn=Dt[1],(Oi!==Bt[0]||dn!==Bt[1])&&(_e.polygonOffset(Oi,dn),Bt[0]=Oi,Bt[1]=dn),wi=Ie.sample_alpha,wi!==lt.sample_alpha&&(wi?_e.enable(32926):_e.disable(32926),lt.sample_alpha=wi),ui=Ie.sample_enable,ui!==lt.sample_enable&&(ui?_e.enable(32928):_e.disable(32928),lt.sample_enable=ui),Ai=sr[0],gi=sr[1],(Ai!==br[0]||gi!==br[1])&&(_e.sampleCoverage(Ai,gi),br[0]=Ai,br[1]=gi),gn=Ie.stencil_mask,gn!==lt.stencil_mask&&(_e.stencilMask(gn),lt.stencil_mask=gn),In=zr[0],Vn=zr[1],Rn=zr[2],(In!==Tr[0]||Vn!==Tr[1]||Rn!==Tr[2])&&(_e.stencilFunc(In,Vn,Rn),Tr[0]=In,Tr[1]=Vn,Tr[2]=Rn),Hn=Rr[0],Gn=Rr[1],pn=Rr[2],Lo=Rr[3],(Hn!==Br[0]||Gn!==Br[1]||pn!==Br[2]||Lo!==Br[3])&&(_e.stencilOpSeparate(Hn,Gn,pn,Lo),Br[0]=Hn,Br[1]=Gn,Br[2]=pn,Br[3]=Lo),us=oi[0],Bs=oi[1],Js=oi[2],ol=oi[3],(us!==vi[0]||Bs!==vi[1]||Js!==vi[2]||ol!==vi[3])&&(_e.stencilOpSeparate(us,Bs,Js,ol),vi[0]=us,vi[1]=Bs,vi[2]=Js,vi[3]=ol)}Qr=Nr.viewport,Ui=Qr.x|0,zn=Qr.y|0,fn="width"in Qr?Qr.width|0:Fe.framebufferWidth-Ui,xn="height"in Qr?Qr.height|0:Fe.framebufferHeight-zn,_a=Fe.viewportWidth,Fe.viewportWidth=fn,Wn=Fe.viewportHeight,Fe.viewportHeight=xn,_e.viewport(Ui,zn,fn,xn),Ur[0]=Ui,Ur[1]=zn,Ur[2]=fn,Ur[3]=xn,_e.blendColor(0,0,0,0),Ei[0]=0,Ei[1]=0,Ei[2]=0,Ei[3]=0,n?_e.enable(3042):_e.disable(3042),lt.blend_enable=n,_e.blendEquationSeparate(32774,32774),xi[0]=32774,xi[1]=32774,_e.blendFuncSeparate(770,771,773,1),Jr[0]=770,Jr[1]=771,Jr[2]=773,Jr[3]=1,i?_e.enable(2884):_e.disable(2884),lt.cull_enable=i,_e.cullFace(a),lt.cull_face=a,Fn=o.call(this,Fe,Nr,0),Fn?_e.enable(2929):_e.disable(2929),lt.depth_enable=Fn,ia=Nr.viewport,za=ia.x|0,Hr=ia.y|0,na="width"in ia?ia.width|0:Fe.framebufferWidth-za,go="height"in ia?ia.height|0:Fe.framebufferHeight-Hr,_e.scissor(za,Hr,na,go),Yr[0]=za,Yr[1]=Hr,Yr[2]=na,Yr[3]=go,s?_e.enable(3089):_e.disable(3089),lt.scissor_enable=s,u?_e.enable(2960):_e.disable(2960),lt.stencil_enable=u,Dn=lt.profile,Dn&&(un=performance.now(),r.count++),_e.useProgram(l.program),Zn=Lr.angle_instanced_arrays,St.setVAO(null),Wo=Nr.colorBuffer,fi.buffer=Wo,Ba=!1,Bo=1,Ea=0,Ha=0,tn=0,Cn=0,Xn=null,ts=0,Ja=!1,to=5126,Ri=0,an=0,cs=0,Er(fi)?(Ba=!0,Xn=de.createStream(34962,fi),to=Xn.dtype):(Xn=de.getBuffer(fi),Xn?to=Xn.dtype:"constant"in fi?(Bo=2,typeof fi.constant=="number"?(Ea=fi.constant,Ha=tn=Cn=0):(Ea=fi.constant.length>0?fi.constant[0]:0,Ha=fi.constant.length>1?fi.constant[1]:0,tn=fi.constant.length>2?fi.constant[2]:0,Cn=fi.constant.length>3?fi.constant[3]:0)):(Er(fi.buffer)?Xn=de.createStream(34962,fi.buffer):Xn=de.getBuffer(fi.buffer),to="type"in fi?Mi[fi.type]:Xn.dtype,Ja=!!fi.normalized,ts=fi.size|0,Ri=fi.offset|0,an=fi.stride|0,cs=fi.divisor|0)),pa=f.location,ln=Et[pa],Bo===1?(ln.buffer||_e.enableVertexAttribArray(pa),ka=ts||4,(ln.type!==to||ln.size!==ka||ln.buffer!==Xn||ln.normalized!==Ja||ln.offset!==Ri||ln.stride!==an)&&(_e.bindBuffer(34962,Xn.buffer),_e.vertexAttribPointer(pa,ka,to,Ja,an,Ri),ln.type=to,ln.size=ka,ln.buffer=Xn,ln.normalized=Ja,ln.offset=Ri,ln.stride=an),ln.divisor!==cs&&(Zn.vertexAttribDivisorANGLE(pa,cs),ln.divisor=cs)):(ln.buffer&&(_e.disableVertexAttribArray(pa),ln.buffer=null),(ln.x!==Ea||ln.y!==Ha||ln.z!==tn||ln.w!==Cn)&&(_e.vertexAttrib4f(pa,Ea,Ha,tn,Cn),ln.x=Ea,ln.y=Ha,ln.z=tn,ln.w=Cn)),va=Nr.positionBuffer,Wt.buffer=va,bo=!1,Co=1,Fi=0,Yn=0,xa=0,Qi=0,Nn=null,Pn=0,qa=!1,jo=5126,Vo=0,Pa=0,Oa=0,Er(Wt)?(bo=!0,Nn=de.createStream(34962,Wt),jo=Nn.dtype):(Nn=de.getBuffer(Wt),Nn?jo=Nn.dtype:"constant"in Wt?(Co=2,typeof Wt.constant=="number"?(Fi=Wt.constant,Yn=xa=Qi=0):(Fi=Wt.constant.length>0?Wt.constant[0]:0,Yn=Wt.constant.length>1?Wt.constant[1]:0,xa=Wt.constant.length>2?Wt.constant[2]:0,Qi=Wt.constant.length>3?Wt.constant[3]:0)):(Er(Wt.buffer)?Nn=de.createStream(34962,Wt.buffer):Nn=de.getBuffer(Wt.buffer),jo="type"in Wt?Mi[Wt.type]:Nn.dtype,qa=!!Wt.normalized,Pn=Wt.size|0,Vo=Wt.offset|0,Pa=Wt.stride|0,Oa=Wt.divisor|0)),co=c.location,An=Et[co],Co===1?(An.buffer||_e.enableVertexAttribArray(co),_o=Pn||2,(An.type!==jo||An.size!==_o||An.buffer!==Nn||An.normalized!==qa||An.offset!==Vo||An.stride!==Pa)&&(_e.bindBuffer(34962,Nn.buffer),_e.vertexAttribPointer(co,_o,jo,qa,Pa,Vo),An.type=jo,An.size=_o,An.buffer=Nn,An.normalized=qa,An.offset=Vo,An.stride=Pa),An.divisor!==Oa&&(Zn.vertexAttribDivisorANGLE(co,Oa),An.divisor=Oa)):(An.buffer&&(_e.disableVertexAttribArray(co),An.buffer=null),(An.x!==Fi||An.y!==Yn||An.z!==xa||An.w!==Qi)&&(_e.vertexAttrib4f(co,Fi,Yn,xa,Qi),An.x=Fi,An.y=Yn,An.z=xa,An.w=Qi)),ks=Nr.colorBuffer,Or.buffer=ks,bs=!1,ps=1,sa=0,Bn=0,ms=0,ya=0,on=null,mn=0,Ga=!1,ca=5126,bn=0,Xi=0,qn=0,Er(Or)?(bs=!0,on=de.createStream(34962,Or),ca=on.dtype):(on=de.getBuffer(Or),on?ca=on.dtype:"constant"in Or?(ps=2,typeof Or.constant=="number"?(sa=Or.constant,Bn=ms=ya=0):(sa=Or.constant.length>0?Or.constant[0]:0,Bn=Or.constant.length>1?Or.constant[1]:0,ms=Or.constant.length>2?Or.constant[2]:0,ya=Or.constant.length>3?Or.constant[3]:0)):(Er(Or.buffer)?on=de.createStream(34962,Or.buffer):on=de.getBuffer(Or.buffer),ca="type"in Or?Mi[Or.type]:on.dtype,Ga=!!Or.normalized,mn=Or.size|0,bn=Or.offset|0,Xi=Or.stride|0,qn=Or.divisor|0)),Ia=h.location,yn=Et[Ia],ps===1?(yn.buffer||_e.enableVertexAttribArray(Ia),Ya=mn||4,(yn.type!==ca||yn.size!==Ya||yn.buffer!==on||yn.normalized!==Ga||yn.offset!==bn||yn.stride!==Xi)&&(_e.bindBuffer(34962,on.buffer),_e.vertexAttribPointer(Ia,Ya,ca,Ga,Xi,bn),yn.type=ca,yn.size=Ya,yn.buffer=on,yn.normalized=Ga,yn.offset=bn,yn.stride=Xi),yn.divisor!==qn&&(Zn.vertexAttribDivisorANGLE(Ia,qn),yn.divisor=qn)):(yn.buffer&&(_e.disableVertexAttribArray(Ia),yn.buffer=null),(yn.x!==sa||yn.y!==Bn||yn.z!==ms||yn.w!==ya)&&(_e.vertexAttrib4f(Ia,sa,Bn,ms,ya),yn.x=sa,yn.y=Bn,yn.z=ms,yn.w=ya)),ba=Nr.positionBuffer,tr.buffer=ba,Da=!1,Aa=1,Ln=0,wo=0,wa=0,$i=0,ea=null,Sa=0,Za=!1,xo=5126,Wa=0,hn=0,Un=0,Er(tr)?(Da=!0,ea=de.createStream(34962,tr),xo=ea.dtype):(ea=de.getBuffer(tr),ea?xo=ea.dtype:"constant"in tr?(Aa=2,typeof tr.constant=="number"?(Ln=tr.constant,wo=wa=$i=0):(Ln=tr.constant.length>0?tr.constant[0]:0,wo=tr.constant.length>1?tr.constant[1]:0,wa=tr.constant.length>2?tr.constant[2]:0,$i=tr.constant.length>3?tr.constant[3]:0)):(Er(tr.buffer)?ea=de.createStream(34962,tr.buffer):ea=de.getBuffer(tr.buffer),xo="type"in tr?Mi[tr.type]:ea.dtype,Za=!!tr.normalized,Sa=tr.size|0,Wa=tr.offset|0,hn=tr.stride|0,Un=tr.divisor|0)),Ss=d.location,Kn=Et[Ss],Aa===1?(Kn.buffer||_e.enableVertexAttribArray(Ss),ns=Sa||2,(Kn.type!==xo||Kn.size!==ns||Kn.buffer!==ea||Kn.normalized!==Za||Kn.offset!==Wa||Kn.stride!==hn)&&(_e.bindBuffer(34962,ea.buffer),_e.vertexAttribPointer(Ss,ns,xo,Za,hn,Wa),Kn.type=xo,Kn.size=ns,Kn.buffer=ea,Kn.normalized=Za,Kn.offset=Wa,Kn.stride=hn),Kn.divisor!==Un&&(Zn.vertexAttribDivisorANGLE(Ss,Un),Kn.divisor=Un)):(Kn.buffer&&(_e.disableVertexAttribArray(Ss),Kn.buffer=null),(Kn.x!==Ln||Kn.y!==wo||Kn.z!==wa||Kn.w!==$i)&&(_e.vertexAttrib4f(Ss,Ln,wo,wa,$i),Kn.x=Ln,Kn.y=wo,Kn.z=wa,Kn.w=$i)),Jo=x.location,vo=Et[Jo],vo.buffer||_e.enableVertexAttribArray(Jo),(vo.type!==5126||vo.size!==1||vo.buffer!==p||vo.normalized!==!1||vo.offset!==0||vo.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(Jo,1,5126,!1,8,0),vo.type=5126,vo.size=1,vo.buffer=p,vo.normalized=!1,vo.offset=0,vo.stride=8),vo.divisor!==0&&(Zn.vertexAttribDivisorANGLE(Jo,0),vo.divisor=0),ma=b.location,ja=Et[ma],ja.buffer||_e.enableVertexAttribArray(ma),(ja.type!==5126||ja.size!==1||ja.buffer!==p||ja.normalized!==!1||ja.offset!==4||ja.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(ma,1,5126,!1,8,4),ja.type=5126,ja.size=1,ja.buffer=p,ja.normalized=!1,ja.offset=4,ja.stride=8),ja.divisor!==0&&(Zn.vertexAttribDivisorANGLE(ma,0),ja.divisor=0),To=Nr.positionBuffer,or.buffer=To,Ao=!1,la=1,Ki=0,ho=0,Ka=0,Ca=0,ta=null,En=0,Mo=!1,Ds=5126,Ro=0,vs=0,Ks=0,Er(or)?(Ao=!0,ta=de.createStream(34962,or),Ds=ta.dtype):(ta=de.getBuffer(or),ta?Ds=ta.dtype:"constant"in or?(la=2,typeof or.constant=="number"?(Ki=or.constant,ho=Ka=Ca=0):(Ki=or.constant.length>0?or.constant[0]:0,ho=or.constant.length>1?or.constant[1]:0,Ka=or.constant.length>2?or.constant[2]:0,Ca=or.constant.length>3?or.constant[3]:0)):(Er(or.buffer)?ta=de.createStream(34962,or.buffer):ta=de.getBuffer(or.buffer),Ds="type"in or?Mi[or.type]:ta.dtype,Mo=!!or.normalized,En=or.size|0,Ro=or.offset|0,vs=or.stride|0,Ks=or.divisor|0)),as=y.location,Jn=Et[as],la===1?(Jn.buffer||_e.enableVertexAttribArray(as),Cs=En||2,(Jn.type!==Ds||Jn.size!==Cs||Jn.buffer!==ta||Jn.normalized!==Mo||Jn.offset!==Ro||Jn.stride!==vs)&&(_e.bindBuffer(34962,ta.buffer),_e.vertexAttribPointer(as,Cs,Ds,Mo,vs,Ro),Jn.type=Ds,Jn.size=Cs,Jn.buffer=ta,Jn.normalized=Mo,Jn.offset=Ro,Jn.stride=vs),Jn.divisor!==Ks&&(Zn.vertexAttribDivisorANGLE(as,Ks),Jn.divisor=Ks)):(Jn.buffer&&(_e.disableVertexAttribArray(as),Jn.buffer=null),(Jn.x!==Ki||Jn.y!==ho||Jn.z!==Ka||Jn.w!==Ca)&&(_e.vertexAttrib4f(as,Ki,ho,Ka,Ca),Jn.x=Ki,Jn.y=ho,Jn.z=Ka,Jn.w=Ca)),Xa=Nr.positionBuffer,st.buffer=Xa,Zo=!1,Eo=1,lo=0,$a=0,Xo=0,rs=0,$n=null,Sn=0,uo=!1,Rs=5126,xs=0,Go=0,os=0,Er(st)?(Zo=!0,$n=de.createStream(34962,st),Rs=$n.dtype):($n=de.getBuffer(st),$n?Rs=$n.dtype:"constant"in st?(Eo=2,typeof st.constant=="number"?(lo=st.constant,$a=Xo=rs=0):(lo=st.constant.length>0?st.constant[0]:0,$a=st.constant.length>1?st.constant[1]:0,Xo=st.constant.length>2?st.constant[2]:0,rs=st.constant.length>3?st.constant[3]:0)):(Er(st.buffer)?$n=de.createStream(34962,st.buffer):$n=de.getBuffer(st.buffer),Rs="type"in st?Mi[st.type]:$n.dtype,uo=!!st.normalized,Sn=st.size|0,xs=st.offset|0,Go=st.stride|0,os=st.divisor|0)),So=k.location,Qn=Et[So],Eo===1?(Qn.buffer||_e.enableVertexAttribArray(So),zo=Sn||2,(Qn.type!==Rs||Qn.size!==zo||Qn.buffer!==$n||Qn.normalized!==uo||Qn.offset!==xs||Qn.stride!==Go)&&(_e.bindBuffer(34962,$n.buffer),_e.vertexAttribPointer(So,zo,Rs,uo,Go,xs),Qn.type=Rs,Qn.size=zo,Qn.buffer=$n,Qn.normalized=uo,Qn.offset=xs,Qn.stride=Go),Qn.divisor!==os&&(Zn.vertexAttribDivisorANGLE(So,os),Qn.divisor=os)):(Qn.buffer&&(_e.disableVertexAttribArray(So),Qn.buffer=null),(Qn.x!==lo||Qn.y!==$a||Qn.z!==Xo||Qn.w!==rs)&&(_e.vertexAttrib4f(So,lo,$a,Xo,rs),Qn.x=lo,Qn.y=$a,Qn.z=Xo,Qn.w=rs)),rl=Nr.dashLength,_e.uniform1f(E.location,rl),$o=Nr.dashTexture,$o&&$o._reglType==="framebuffer"&&($o=$o.color[0]),Na=$o._texture,_e.uniform1i(A.location,Na.bind()),Ua=Nr.depth,_e.uniform1f(L.location,Ua),Po=Nr.miterLimit,_e.uniform1f(_.location,Po),fo=M.call(this,Fe,Nr,0),_e.uniform1f(C.location,fo),ro=Nr.opacity,_e.uniform1f(v.location,ro),Ma=Nr.scale,io=Ma[0],aa=Ma[1],_e.uniform2f(z.location,io,aa),Oo=Nr.thickness,_e.uniform1f(T.location,Oo),No=Nr.translate,Zs=No[0],Fs=No[1],_e.uniform2f(F.location,Zs,Fs),ws=U.call(this,Fe,Nr,0),no=ws[0],Ls=ws[1],ds=ws[2],Xs=ws[3],_e.uniform4f(q.location,no,Ls,ds,Xs),oa=ye.elements,oa?_e.bindBuffer(34963,oa.buffer.buffer):St.currentVAO&&(oa=ue.getElements(St.currentVAO.elements),oa&&_e.bindBuffer(34963,oa.buffer.buffer)),Yo=Nr.count,Yo>0?oa?Zn.drawElementsInstancedANGLE(5,4,oa.type,0<<(oa.type-5121>>1),Yo):Zn.drawArraysInstancedANGLE(5,0,4,Yo):Yo<0&&(oa?_e.drawElements(5,4,oa.type,0<<(oa.type-5121>>1)):_e.drawArrays(5,0,4)),lt.dirty=!0,St.setVAO(null),Fe.viewportWidth=_a,Fe.viewportHeight=Wn,Dn&&(r.cpuTime+=performance.now()-un),Ba&&de.destroyStream(Xn),bo&&de.destroyStream(Nn),bs&&de.destroyStream(on),Da&&de.destroyStream(ea),Ao&&de.destroyStream(ta),Zo&&de.destroyStream($n),Na.unbind()},scope:function(Nr,hi,Gi){var Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye;Qr=Nr.viewport,Ui=Qr.x|0,zn=Qr.y|0,fn="width"in Qr?Qr.width|0:Fe.framebufferWidth-Ui,xn="height"in Qr?Qr.height|0:Fe.framebufferHeight-zn,_a=Fe.viewportWidth,Fe.viewportWidth=fn,Wn=Fe.viewportHeight,Fe.viewportHeight=xn,Fn=Ni[0],Ni[0]=Ui,ia=Ni[1],Ni[1]=zn,za=Ni[2],Ni[2]=fn,Hr=Ni[3],Ni[3]=xn,na=si[0],si[0]=H,go=si[1],si[1]=j,Dn=si[2],si[2]=G,un=si[3],si[3]=O,Zn=Ie.blend_enable,Ie.blend_enable=W,Wo=Si[0],Si[0]=re,Ba=Si[1],Si[1]=ne,Bo=Hi[0],Hi[0]=be,Ea=Hi[1],Hi[1]=ze,Ha=Hi[2],Hi[2]=Ce,tn=Hi[3],Hi[3]=he,Cn=Ie.cull_enable,Ie.cull_enable=te,Xn=Ie.cull_face,Ie.cull_face=ke,ts=o.call(this,Fe,Nr,Gi),Ja=Ie.depth_enable,Ie.depth_enable=ts,to=Nr.viewport,Ri=to.x|0,an=to.y|0,cs="width"in to?to.width|0:Fe.framebufferWidth-Ri,pa="height"in to?to.height|0:Fe.framebufferHeight-an,ln=Pi[0],Pi[0]=Ri,ka=Pi[1],Pi[1]=an,va=Pi[2],Pi[2]=cs,bo=Pi[3],Pi[3]=pa,Co=Ie.scissor_enable,Ie.scissor_enable=Ee,Fi=Ie.stencil_enable,Ie.stencil_enable=Me,Yn=lt.profile,Yn&&(xa=performance.now(),r.count++),Qi=ye.offset,ye.offset=Oe,Nn=ye.count,ye.count=Re,Pn=Nr.count,qa=ye.instances,ye.instances=Pn,jo=ye.primitive,ye.primitive=me,Vo=M.call(this,Fe,Nr,Gi),Pa=Zt[Be],Zt[Be]=Vo,Oa=Nr.miterLimit,co=Zt[fe],Zt[fe]=Oa,An=Nr.scale,_o=Zt[Ze],Zt[Ze]=An,ks=Nr.scaleFract,bs=Zt[et],Zt[et]=ks,ps=Nr.translateFract,sa=Zt[gt],Zt[gt]=ps,Bn=Nr.translate,ms=Zt[Pt],Zt[Pt]=Bn,ya=Nr.thickness,on=Zt[Qe],Zt[Qe]=ya,mn=Nr.dashTexture,Ga=Zt[Xe],Zt[Xe]=mn,ca=Nr.opacity,bn=Zt[Tt],Zt[Tt]=ca,Xi=Fe.pixelRatio,qn=Zt[xt],Zt[xt]=Xi,Ia=Nr.id,yn=Zt[_t],Zt[_t]=Ia,Ya=Nr.dashLength,ba=Zt[Ct],Zt[Ct]=Ya,Da=U.call(this,Fe,Nr,Gi),Aa=Zt[jt],Zt[jt]=Da,Ln=Nr.depth,wo=Zt[At],Zt[At]=Ln,wa=Te.state,Te.state=1,$i=Te.x,Te.x=0,ea=Te.y,Te.y=0,Sa=Te.z,Te.z=0,Za=Te.w,Te.w=0,xo=Te.buffer,Te.buffer=p,Wa=Te.size,Te.size=0,hn=Te.normalized,Te.normalized=!1,Un=Te.type,Te.type=5126,Ss=Te.offset,Te.offset=0,Kn=Te.stride,Te.stride=8,ns=Te.divisor,Te.divisor=0,Jo=nt.state,nt.state=1,vo=nt.x,nt.x=0,ma=nt.y,nt.y=0,ja=nt.z,nt.z=0,To=nt.w,nt.w=0,Ao=nt.buffer,nt.buffer=p,la=nt.size,nt.size=0,Ki=nt.normalized,nt.normalized=!1,ho=nt.type,nt.type=5126,Ka=nt.offset,nt.offset=4,Ca=nt.stride,nt.stride=8,ta=nt.divisor,nt.divisor=0,En=Nr.colorBuffer,fi.buffer=En,Mo=!1,Ds=1,Ro=0,vs=0,Ks=0,as=0,Jn=null,Cs=0,Xa=!1,Zo=5126,Eo=0,lo=0,$a=0,Er(fi)?(Mo=!0,Jn=de.createStream(34962,fi),Zo=Jn.dtype):(Jn=de.getBuffer(fi),Jn?Zo=Jn.dtype:"constant"in fi?(Ds=2,typeof fi.constant=="number"?(Ro=fi.constant,vs=Ks=as=0):(Ro=fi.constant.length>0?fi.constant[0]:0,vs=fi.constant.length>1?fi.constant[1]:0,Ks=fi.constant.length>2?fi.constant[2]:0,as=fi.constant.length>3?fi.constant[3]:0)):(Er(fi.buffer)?Jn=de.createStream(34962,fi.buffer):Jn=de.getBuffer(fi.buffer),Zo="type"in fi?Mi[fi.type]:Jn.dtype,Xa=!!fi.normalized,Cs=fi.size|0,Eo=fi.offset|0,lo=fi.stride|0,$a=fi.divisor|0)),Xo=ut.state,ut.state=Ds,rs=ut.x,ut.x=Ro,$n=ut.y,ut.y=vs,Sn=ut.z,ut.z=Ks,uo=ut.w,ut.w=as,Rs=ut.buffer,ut.buffer=Jn,xs=ut.size,ut.size=Cs,Go=ut.normalized,ut.normalized=Xa,os=ut.type,ut.type=Zo,So=ut.offset,ut.offset=Eo,Qn=ut.stride,ut.stride=lo,zo=ut.divisor,ut.divisor=$a,rl=Nr.colorBuffer,Or.buffer=rl,$o=!1,Na=1,Ua=0,Po=0,fo=0,ro=0,Ma=null,io=0,aa=!1,Oo=5126,No=0,Zs=0,Fs=0,Er(Or)?($o=!0,Ma=de.createStream(34962,Or),Oo=Ma.dtype):(Ma=de.getBuffer(Or),Ma?Oo=Ma.dtype:"constant"in Or?(Na=2,typeof Or.constant=="number"?(Ua=Or.constant,Po=fo=ro=0):(Ua=Or.constant.length>0?Or.constant[0]:0,Po=Or.constant.length>1?Or.constant[1]:0,fo=Or.constant.length>2?Or.constant[2]:0,ro=Or.constant.length>3?Or.constant[3]:0)):(Er(Or.buffer)?Ma=de.createStream(34962,Or.buffer):Ma=de.getBuffer(Or.buffer),Oo="type"in Or?Mi[Or.type]:Ma.dtype,aa=!!Or.normalized,io=Or.size|0,No=Or.offset|0,Zs=Or.stride|0,Fs=Or.divisor|0)),ws=ct.state,ct.state=Na,no=ct.x,ct.x=Ua,Ls=ct.y,ct.y=Po,ds=ct.z,ct.z=fo,Xs=ct.w,ct.w=ro,oa=ct.buffer,ct.buffer=Ma,Yo=ct.size,ct.size=io,po=ct.normalized,ct.normalized=aa,ss=ct.type,ct.type=Oo,ls=ct.offset,ct.offset=No,gs=ct.stride,ct.stride=Zs,bt=ct.divisor,ct.divisor=Fs,Ft=Nr.positionBuffer,st.buffer=Ft,hr=!1,nr=1,Sr=0,li=0,di=0,mi=0,Oi=null,dn=0,wi=!1,ui=5126,Ai=0,gi=0,gn=0,Er(st)?(hr=!0,Oi=de.createStream(34962,st),ui=Oi.dtype):(Oi=de.getBuffer(st),Oi?ui=Oi.dtype:"constant"in st?(nr=2,typeof st.constant=="number"?(Sr=st.constant,li=di=mi=0):(Sr=st.constant.length>0?st.constant[0]:0,li=st.constant.length>1?st.constant[1]:0,di=st.constant.length>2?st.constant[2]:0,mi=st.constant.length>3?st.constant[3]:0)):(Er(st.buffer)?Oi=de.createStream(34962,st.buffer):Oi=de.getBuffer(st.buffer),ui="type"in st?Mi[st.type]:Oi.dtype,wi=!!st.normalized,dn=st.size|0,Ai=st.offset|0,gi=st.stride|0,gn=st.divisor|0)),In=rt.state,rt.state=nr,Vn=rt.x,rt.x=Sr,Rn=rt.y,rt.y=li,Hn=rt.z,rt.z=di,Gn=rt.w,rt.w=mi,pn=rt.buffer,rt.buffer=Oi,Lo=rt.size,rt.size=dn,us=rt.normalized,rt.normalized=wi,Bs=rt.type,rt.type=ui,Js=rt.offset,rt.offset=Ai,ol=rt.stride,rt.stride=gi,Cl=rt.divisor,rt.divisor=gn,ul=Nr.positionBuffer,Wt.buffer=ul,Gl=!1,Vl=1,Fl=0,ga=0,ko=0,zs=0,Fo=null,Ys=0,Gs=!1,Us=5126,Sl=0,_l=0,kl=0,Er(Wt)?(Gl=!0,Fo=de.createStream(34962,Wt),Us=Fo.dtype):(Fo=de.getBuffer(Wt),Fo?Us=Fo.dtype:"constant"in Wt?(Vl=2,typeof Wt.constant=="number"?(Fl=Wt.constant,ga=ko=zs=0):(Fl=Wt.constant.length>0?Wt.constant[0]:0,ga=Wt.constant.length>1?Wt.constant[1]:0,ko=Wt.constant.length>2?Wt.constant[2]:0,zs=Wt.constant.length>3?Wt.constant[3]:0)):(Er(Wt.buffer)?Fo=de.createStream(34962,Wt.buffer):Fo=de.getBuffer(Wt.buffer),Us="type"in Wt?Mi[Wt.type]:Fo.dtype,Gs=!!Wt.normalized,Ys=Wt.size|0,Sl=Wt.offset|0,_l=Wt.stride|0,kl=Wt.divisor|0)),cl=je.state,je.state=Vl,xl=je.x,je.x=Fl,Uo=je.y,je.y=ga,_s=je.z,je.z=ko,Bl=je.w,je.w=zs,Il=je.buffer,je.buffer=Fo,Dl=je.size,je.size=Ys,oe=je.normalized,je.normalized=Gs,w=je.type,je.type=Us,B=je.offset,je.offset=Sl,Q=je.stride,je.stride=_l,ee=je.divisor,je.divisor=kl,le=Nr.positionBuffer,tr.buffer=le,Ne=!1,$e=1,pt=0,zt=0,Yt=0,Jt=0,yr=null,Ir=0,ce=!1,Ae=5126,qe=0,Ve=0,ot=0,Er(tr)?(Ne=!0,yr=de.createStream(34962,tr),Ae=yr.dtype):(yr=de.getBuffer(tr),yr?Ae=yr.dtype:"constant"in tr?($e=2,typeof tr.constant=="number"?(pt=tr.constant,zt=Yt=Jt=0):(pt=tr.constant.length>0?tr.constant[0]:0,zt=tr.constant.length>1?tr.constant[1]:0,Yt=tr.constant.length>2?tr.constant[2]:0,Jt=tr.constant.length>3?tr.constant[3]:0)):(Er(tr.buffer)?yr=de.createStream(34962,tr.buffer):yr=de.getBuffer(tr.buffer),Ae="type"in tr?Mi[tr.type]:yr.dtype,ce=!!tr.normalized,Ir=tr.size|0,qe=tr.offset|0,Ve=tr.stride|0,ot=tr.divisor|0)),Ke=tt.state,tt.state=$e,ft=tt.x,tt.x=pt,qt=tt.y,tt.y=zt,Xt=tt.z,tt.z=Yt,$t=tt.w,tt.w=Jt,dr=tt.buffer,tt.buffer=yr,Mr=tt.size,tt.size=Ir,$r=tt.normalized,tt.normalized=ce,ii=tt.type,tt.type=Ae,pi=tt.offset,tt.offset=qe,Yi=tt.stride,tt.stride=Ve,wn=tt.divisor,tt.divisor=ot,Tn=Nr.positionBuffer,or.buffer=Tn,ua=!1,oo=1,el=0,ys=0,il=0,$l=0,pl=null,Hl=0,Ll=!1,Ql=5126,ku=0,Jl=0,Kl=0,Er(or)?(ua=!0,pl=de.createStream(34962,or),Ql=pl.dtype):(pl=de.getBuffer(or),pl?Ql=pl.dtype:"constant"in or?(oo=2,typeof or.constant=="number"?(el=or.constant,ys=il=$l=0):(el=or.constant.length>0?or.constant[0]:0,ys=or.constant.length>1?or.constant[1]:0,il=or.constant.length>2?or.constant[2]:0,$l=or.constant.length>3?or.constant[3]:0)):(Er(or.buffer)?pl=de.createStream(34962,or.buffer):pl=de.getBuffer(or.buffer),Ql="type"in or?Mi[or.type]:pl.dtype,Ll=!!or.normalized,Hl=or.size|0,ku=or.offset|0,Jl=or.stride|0,Kl=or.divisor|0)),Hu=Je.state,Je.state=oo,tf=Je.x,Je.x=el,Ku=Je.y,Je.y=ys,Gu=Je.z,Je.z=il,Wu=Je.w,Je.w=$l,sf=Je.buffer,Je.buffer=pl,gf=Je.size,Je.size=Hl,nf=Je.normalized,Je.normalized=Ll,af=Je.type,Je.type=Ql,X=Je.offset,Je.offset=ku,se=Je.stride,Je.stride=Jl,Le=Je.divisor,Je.divisor=Kl,We=ht.vert,ht.vert=Mt,Ye=ht.frag,ht.frag=Vt,lt.dirty=!0,hi(Fe,Nr,Gi),Fe.viewportWidth=_a,Fe.viewportHeight=Wn,Ni[0]=Fn,Ni[1]=ia,Ni[2]=za,Ni[3]=Hr,si[0]=na,si[1]=go,si[2]=Dn,si[3]=un,Ie.blend_enable=Zn,Si[0]=Wo,Si[1]=Ba,Hi[0]=Bo,Hi[1]=Ea,Hi[2]=Ha,Hi[3]=tn,Ie.cull_enable=Cn,Ie.cull_face=Xn,Ie.depth_enable=Ja,Pi[0]=ln,Pi[1]=ka,Pi[2]=va,Pi[3]=bo,Ie.scissor_enable=Co,Ie.stencil_enable=Fi,Yn&&(r.cpuTime+=performance.now()-xa),ye.offset=Qi,ye.count=Nn,ye.instances=qa,ye.primitive=jo,Zt[Be]=Pa,Zt[fe]=co,Zt[Ze]=_o,Zt[et]=bs,Zt[gt]=sa,Zt[Pt]=ms,Zt[Qe]=on,Zt[Xe]=Ga,Zt[Tt]=bn,Zt[xt]=qn,Zt[_t]=yn,Zt[Ct]=ba,Zt[jt]=Aa,Zt[At]=wo,Te.state=wa,Te.x=$i,Te.y=ea,Te.z=Sa,Te.w=Za,Te.buffer=xo,Te.size=Wa,Te.normalized=hn,Te.type=Un,Te.offset=Ss,Te.stride=Kn,Te.divisor=ns,nt.state=Jo,nt.x=vo,nt.y=ma,nt.z=ja,nt.w=To,nt.buffer=Ao,nt.size=la,nt.normalized=Ki,nt.type=ho,nt.offset=Ka,nt.stride=Ca,nt.divisor=ta,Mo&&de.destroyStream(Jn),ut.state=Xo,ut.x=rs,ut.y=$n,ut.z=Sn,ut.w=uo,ut.buffer=Rs,ut.size=xs,ut.normalized=Go,ut.type=os,ut.offset=So,ut.stride=Qn,ut.divisor=zo,$o&&de.destroyStream(Ma),ct.state=ws,ct.x=no,ct.y=Ls,ct.z=ds,ct.w=Xs,ct.buffer=oa,ct.size=Yo,ct.normalized=po,ct.type=ss,ct.offset=ls,ct.stride=gs,ct.divisor=bt,hr&&de.destroyStream(Oi),rt.state=In,rt.x=Vn,rt.y=Rn,rt.z=Hn,rt.w=Gn,rt.buffer=pn,rt.size=Lo,rt.normalized=us,rt.type=Bs,rt.offset=Js,rt.stride=ol,rt.divisor=Cl,Gl&&de.destroyStream(Fo),je.state=cl,je.x=xl,je.y=Uo,je.z=_s,je.w=Bl,je.buffer=Il,je.size=Dl,je.normalized=oe,je.type=w,je.offset=B,je.stride=Q,je.divisor=ee,Ne&&de.destroyStream(yr),tt.state=Ke,tt.x=ft,tt.y=qt,tt.z=Xt,tt.w=$t,tt.buffer=dr,tt.size=Mr,tt.normalized=$r,tt.type=ii,tt.offset=pi,tt.stride=Yi,tt.divisor=wn,ua&&de.destroyStream(pl),Je.state=Hu,Je.x=tf,Je.y=Ku,Je.z=Gu,Je.w=Wu,Je.buffer=sf,Je.size=gf,Je.normalized=nf,Je.type=af,Je.offset=X,Je.stride=se,Je.divisor=Le,ht.vert=We,ht.frag=Ye,lt.dirty=!0},batch:function(Nr,hi){var Gi,Qr,Ui,zn,fn,xn,_a;if(Gi=Lr.angle_instanced_arrays,Qr=qr.next,Qr!==qr.cur&&(Qr?_e.bindFramebuffer(36160,Qr.framebuffer):_e.bindFramebuffer(36160,null),qr.cur=Qr),lt.dirty){var Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co;Wn=Ie.dither,Wn!==lt.dither&&(Wn?_e.enable(3024):_e.disable(3024),lt.dither=Wn),Fn=Ie.depth_func,Fn!==lt.depth_func&&(_e.depthFunc(Fn),lt.depth_func=Fn),ia=ci[0],za=ci[1],(ia!==Di[0]||za!==Di[1])&&(_e.depthRange(ia,za),Di[0]=ia,Di[1]=za),Hr=Ie.depth_mask,Hr!==lt.depth_mask&&(_e.depthMask(Hr),lt.depth_mask=Hr),na=Lt[0],go=Lt[1],Dn=Lt[2],un=Lt[3],(na!==vt[0]||go!==vt[1]||Dn!==vt[2]||un!==vt[3])&&(_e.colorMask(na,go,Dn,un),vt[0]=na,vt[1]=go,vt[2]=Dn,vt[3]=un),Zn=Ie.frontFace,Zn!==lt.frontFace&&(_e.frontFace(Zn),lt.frontFace=Zn),Wo=Ie.lineWidth,Wo!==lt.lineWidth&&(_e.lineWidth(Wo),lt.lineWidth=Wo),Ba=Ie.polygonOffset_enable,Ba!==lt.polygonOffset_enable&&(Ba?_e.enable(32823):_e.disable(32823),lt.polygonOffset_enable=Ba),Bo=Dt[0],Ea=Dt[1],(Bo!==Bt[0]||Ea!==Bt[1])&&(_e.polygonOffset(Bo,Ea),Bt[0]=Bo,Bt[1]=Ea),Ha=Ie.sample_alpha,Ha!==lt.sample_alpha&&(Ha?_e.enable(32926):_e.disable(32926),lt.sample_alpha=Ha),tn=Ie.sample_enable,tn!==lt.sample_enable&&(tn?_e.enable(32928):_e.disable(32928),lt.sample_enable=tn),Cn=sr[0],Xn=sr[1],(Cn!==br[0]||Xn!==br[1])&&(_e.sampleCoverage(Cn,Xn),br[0]=Cn,br[1]=Xn),ts=Ie.stencil_mask,ts!==lt.stencil_mask&&(_e.stencilMask(ts),lt.stencil_mask=ts),Ja=zr[0],to=zr[1],Ri=zr[2],(Ja!==Tr[0]||to!==Tr[1]||Ri!==Tr[2])&&(_e.stencilFunc(Ja,to,Ri),Tr[0]=Ja,Tr[1]=to,Tr[2]=Ri),an=Rr[0],cs=Rr[1],pa=Rr[2],ln=Rr[3],(an!==Br[0]||cs!==Br[1]||pa!==Br[2]||ln!==Br[3])&&(_e.stencilOpSeparate(an,cs,pa,ln),Br[0]=an,Br[1]=cs,Br[2]=pa,Br[3]=ln),ka=oi[0],va=oi[1],bo=oi[2],Co=oi[3],(ka!==vi[0]||va!==vi[1]||bo!==vi[2]||Co!==vi[3])&&(_e.stencilOpSeparate(ka,va,bo,Co),vi[0]=ka,vi[1]=va,vi[2]=bo,vi[3]=Co)}_e.blendColor(0,0,0,0),Ei[0]=0,Ei[1]=0,Ei[2]=0,Ei[3]=0,Kt?_e.enable(3042):_e.disable(3042),lt.blend_enable=Kt,_e.blendEquationSeparate(32774,32774),xi[0]=32774,xi[1]=32774,_e.blendFuncSeparate(770,771,773,1),Jr[0]=770,Jr[1]=771,Jr[2]=773,Jr[3]=1,ir?_e.enable(2884):_e.disable(2884),lt.cull_enable=ir,_e.cullFace(fr),lt.cull_face=fr,Ot?_e.enable(3089):_e.disable(3089),lt.scissor_enable=Ot,De?_e.enable(2960):_e.disable(2960),lt.stencil_enable=De,Ui=lt.profile,Ui&&(zn=performance.now(),r.count+=hi),_e.useProgram(l.program),fn=Lr.angle_instanced_arrays;var Fi,Yn,xa,Qi,Nn;for(St.setVAO(null),Fi=x.location,Yn=Et[Fi],Yn.buffer||_e.enableVertexAttribArray(Fi),(Yn.type!==5126||Yn.size!==1||Yn.buffer!==p||Yn.normalized!==!1||Yn.offset!==0||Yn.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(Fi,1,5126,!1,8,0),Yn.type=5126,Yn.size=1,Yn.buffer=p,Yn.normalized=!1,Yn.offset=0,Yn.stride=8),Yn.divisor!==0&&(fn.vertexAttribDivisorANGLE(Fi,0),Yn.divisor=0),xa=b.location,Qi=Et[xa],Qi.buffer||_e.enableVertexAttribArray(xa),(Qi.type!==5126||Qi.size!==1||Qi.buffer!==p||Qi.normalized!==!1||Qi.offset!==4||Qi.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(xa,1,5126,!1,8,4),Qi.type=5126,Qi.size=1,Qi.buffer=p,Qi.normalized=!1,Qi.offset=4,Qi.stride=8),Qi.divisor!==0&&(fn.vertexAttribDivisorANGLE(xa,0),Qi.divisor=0),Nn=ye.elements,Nn?_e.bindBuffer(34963,Nn.buffer.buffer):St.currentVAO&&(Nn=ue.getElements(St.currentVAO.elements),Nn&&_e.bindBuffer(34963,Nn.buffer.buffer)),xn=0;xn<hi;++xn){_a=Nr[xn];var Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl;Pn=_a.viewport,qa=Pn.x|0,jo=Pn.y|0,Vo="width"in Pn?Pn.width|0:Fe.framebufferWidth-qa,Pa="height"in Pn?Pn.height|0:Fe.framebufferHeight-jo,Oa=Fe.viewportWidth,Fe.viewportWidth=Vo,co=Fe.viewportHeight,Fe.viewportHeight=Pa,_e.viewport(qa,jo,Vo,Pa),Ur[0]=qa,Ur[1]=jo,Ur[2]=Vo,Ur[3]=Pa,An=o.call(this,Fe,_a,xn),An?_e.enable(2929):_e.disable(2929),lt.depth_enable=An,_o=_a.viewport,ks=_o.x|0,bs=_o.y|0,ps="width"in _o?_o.width|0:Fe.framebufferWidth-ks,sa="height"in _o?_o.height|0:Fe.framebufferHeight-bs,_e.scissor(ks,bs,ps,sa),Yr[0]=ks,Yr[1]=bs,Yr[2]=ps,Yr[3]=sa,Bn=_a.colorBuffer,fi.buffer=Bn,ms=!1,ya=1,on=0,mn=0,Ga=0,ca=0,bn=null,Xi=0,qn=!1,Ia=5126,yn=0,Ya=0,ba=0,Er(fi)?(ms=!0,bn=de.createStream(34962,fi),Ia=bn.dtype):(bn=de.getBuffer(fi),bn?Ia=bn.dtype:"constant"in fi?(ya=2,typeof fi.constant=="number"?(on=fi.constant,mn=Ga=ca=0):(on=fi.constant.length>0?fi.constant[0]:0,mn=fi.constant.length>1?fi.constant[1]:0,Ga=fi.constant.length>2?fi.constant[2]:0,ca=fi.constant.length>3?fi.constant[3]:0)):(Er(fi.buffer)?bn=de.createStream(34962,fi.buffer):bn=de.getBuffer(fi.buffer),Ia="type"in fi?Mi[fi.type]:bn.dtype,qn=!!fi.normalized,Xi=fi.size|0,yn=fi.offset|0,Ya=fi.stride|0,ba=fi.divisor|0)),Da=f.location,Aa=Et[Da],ya===1?(Aa.buffer||_e.enableVertexAttribArray(Da),Ln=Xi||4,(Aa.type!==Ia||Aa.size!==Ln||Aa.buffer!==bn||Aa.normalized!==qn||Aa.offset!==yn||Aa.stride!==Ya)&&(_e.bindBuffer(34962,bn.buffer),_e.vertexAttribPointer(Da,Ln,Ia,qn,Ya,yn),Aa.type=Ia,Aa.size=Ln,Aa.buffer=bn,Aa.normalized=qn,Aa.offset=yn,Aa.stride=Ya),Aa.divisor!==ba&&(fn.vertexAttribDivisorANGLE(Da,ba),Aa.divisor=ba)):(Aa.buffer&&(_e.disableVertexAttribArray(Da),Aa.buffer=null),(Aa.x!==on||Aa.y!==mn||Aa.z!==Ga||Aa.w!==ca)&&(_e.vertexAttrib4f(Da,on,mn,Ga,ca),Aa.x=on,Aa.y=mn,Aa.z=Ga,Aa.w=ca)),wo=_a.positionBuffer,Wt.buffer=wo,wa=!1,$i=1,ea=0,Sa=0,Za=0,xo=0,Wa=null,hn=0,Un=!1,Ss=5126,Kn=0,ns=0,Jo=0,Er(Wt)?(wa=!0,Wa=de.createStream(34962,Wt),Ss=Wa.dtype):(Wa=de.getBuffer(Wt),Wa?Ss=Wa.dtype:"constant"in Wt?($i=2,typeof Wt.constant=="number"?(ea=Wt.constant,Sa=Za=xo=0):(ea=Wt.constant.length>0?Wt.constant[0]:0,Sa=Wt.constant.length>1?Wt.constant[1]:0,Za=Wt.constant.length>2?Wt.constant[2]:0,xo=Wt.constant.length>3?Wt.constant[3]:0)):(Er(Wt.buffer)?Wa=de.createStream(34962,Wt.buffer):Wa=de.getBuffer(Wt.buffer),Ss="type"in Wt?Mi[Wt.type]:Wa.dtype,Un=!!Wt.normalized,hn=Wt.size|0,Kn=Wt.offset|0,ns=Wt.stride|0,Jo=Wt.divisor|0)),vo=c.location,ma=Et[vo],$i===1?(ma.buffer||_e.enableVertexAttribArray(vo),ja=hn||2,(ma.type!==Ss||ma.size!==ja||ma.buffer!==Wa||ma.normalized!==Un||ma.offset!==Kn||ma.stride!==ns)&&(_e.bindBuffer(34962,Wa.buffer),_e.vertexAttribPointer(vo,ja,Ss,Un,ns,Kn),ma.type=Ss,ma.size=ja,ma.buffer=Wa,ma.normalized=Un,ma.offset=Kn,ma.stride=ns),ma.divisor!==Jo&&(fn.vertexAttribDivisorANGLE(vo,Jo),ma.divisor=Jo)):(ma.buffer&&(_e.disableVertexAttribArray(vo),ma.buffer=null),(ma.x!==ea||ma.y!==Sa||ma.z!==Za||ma.w!==xo)&&(_e.vertexAttrib4f(vo,ea,Sa,Za,xo),ma.x=ea,ma.y=Sa,ma.z=Za,ma.w=xo)),To=_a.colorBuffer,Or.buffer=To,Ao=!1,la=1,Ki=0,ho=0,Ka=0,Ca=0,ta=null,En=0,Mo=!1,Ds=5126,Ro=0,vs=0,Ks=0,Er(Or)?(Ao=!0,ta=de.createStream(34962,Or),Ds=ta.dtype):(ta=de.getBuffer(Or),ta?Ds=ta.dtype:"constant"in Or?(la=2,typeof Or.constant=="number"?(Ki=Or.constant,ho=Ka=Ca=0):(Ki=Or.constant.length>0?Or.constant[0]:0,ho=Or.constant.length>1?Or.constant[1]:0,Ka=Or.constant.length>2?Or.constant[2]:0,Ca=Or.constant.length>3?Or.constant[3]:0)):(Er(Or.buffer)?ta=de.createStream(34962,Or.buffer):ta=de.getBuffer(Or.buffer),Ds="type"in Or?Mi[Or.type]:ta.dtype,Mo=!!Or.normalized,En=Or.size|0,Ro=Or.offset|0,vs=Or.stride|0,Ks=Or.divisor|0)),as=h.location,Jn=Et[as],la===1?(Jn.buffer||_e.enableVertexAttribArray(as),Cs=En||4,(Jn.type!==Ds||Jn.size!==Cs||Jn.buffer!==ta||Jn.normalized!==Mo||Jn.offset!==Ro||Jn.stride!==vs)&&(_e.bindBuffer(34962,ta.buffer),_e.vertexAttribPointer(as,Cs,Ds,Mo,vs,Ro),Jn.type=Ds,Jn.size=Cs,Jn.buffer=ta,Jn.normalized=Mo,Jn.offset=Ro,Jn.stride=vs),Jn.divisor!==Ks&&(fn.vertexAttribDivisorANGLE(as,Ks),Jn.divisor=Ks)):(Jn.buffer&&(_e.disableVertexAttribArray(as),Jn.buffer=null),(Jn.x!==Ki||Jn.y!==ho||Jn.z!==Ka||Jn.w!==Ca)&&(_e.vertexAttrib4f(as,Ki,ho,Ka,Ca),Jn.x=Ki,Jn.y=ho,Jn.z=Ka,Jn.w=Ca)),Xa=_a.positionBuffer,tr.buffer=Xa,Zo=!1,Eo=1,lo=0,$a=0,Xo=0,rs=0,$n=null,Sn=0,uo=!1,Rs=5126,xs=0,Go=0,os=0,Er(tr)?(Zo=!0,$n=de.createStream(34962,tr),Rs=$n.dtype):($n=de.getBuffer(tr),$n?Rs=$n.dtype:"constant"in tr?(Eo=2,typeof tr.constant=="number"?(lo=tr.constant,$a=Xo=rs=0):(lo=tr.constant.length>0?tr.constant[0]:0,$a=tr.constant.length>1?tr.constant[1]:0,Xo=tr.constant.length>2?tr.constant[2]:0,rs=tr.constant.length>3?tr.constant[3]:0)):(Er(tr.buffer)?$n=de.createStream(34962,tr.buffer):$n=de.getBuffer(tr.buffer),Rs="type"in tr?Mi[tr.type]:$n.dtype,uo=!!tr.normalized,Sn=tr.size|0,xs=tr.offset|0,Go=tr.stride|0,os=tr.divisor|0)),So=d.location,Qn=Et[So],Eo===1?(Qn.buffer||_e.enableVertexAttribArray(So),zo=Sn||2,(Qn.type!==Rs||Qn.size!==zo||Qn.buffer!==$n||Qn.normalized!==uo||Qn.offset!==xs||Qn.stride!==Go)&&(_e.bindBuffer(34962,$n.buffer),_e.vertexAttribPointer(So,zo,Rs,uo,Go,xs),Qn.type=Rs,Qn.size=zo,Qn.buffer=$n,Qn.normalized=uo,Qn.offset=xs,Qn.stride=Go),Qn.divisor!==os&&(fn.vertexAttribDivisorANGLE(So,os),Qn.divisor=os)):(Qn.buffer&&(_e.disableVertexAttribArray(So),Qn.buffer=null),(Qn.x!==lo||Qn.y!==$a||Qn.z!==Xo||Qn.w!==rs)&&(_e.vertexAttrib4f(So,lo,$a,Xo,rs),Qn.x=lo,Qn.y=$a,Qn.z=Xo,Qn.w=rs)),rl=_a.positionBuffer,or.buffer=rl,$o=!1,Na=1,Ua=0,Po=0,fo=0,ro=0,Ma=null,io=0,aa=!1,Oo=5126,No=0,Zs=0,Fs=0,Er(or)?($o=!0,Ma=de.createStream(34962,or),Oo=Ma.dtype):(Ma=de.getBuffer(or),Ma?Oo=Ma.dtype:"constant"in or?(Na=2,typeof or.constant=="number"?(Ua=or.constant,Po=fo=ro=0):(Ua=or.constant.length>0?or.constant[0]:0,Po=or.constant.length>1?or.constant[1]:0,fo=or.constant.length>2?or.constant[2]:0,ro=or.constant.length>3?or.constant[3]:0)):(Er(or.buffer)?Ma=de.createStream(34962,or.buffer):Ma=de.getBuffer(or.buffer),Oo="type"in or?Mi[or.type]:Ma.dtype,aa=!!or.normalized,io=or.size|0,No=or.offset|0,Zs=or.stride|0,Fs=or.divisor|0)),ws=y.location,no=Et[ws],Na===1?(no.buffer||_e.enableVertexAttribArray(ws),Ls=io||2,(no.type!==Oo||no.size!==Ls||no.buffer!==Ma||no.normalized!==aa||no.offset!==No||no.stride!==Zs)&&(_e.bindBuffer(34962,Ma.buffer),_e.vertexAttribPointer(ws,Ls,Oo,aa,Zs,No),no.type=Oo,no.size=Ls,no.buffer=Ma,no.normalized=aa,no.offset=No,no.stride=Zs),no.divisor!==Fs&&(fn.vertexAttribDivisorANGLE(ws,Fs),no.divisor=Fs)):(no.buffer&&(_e.disableVertexAttribArray(ws),no.buffer=null),(no.x!==Ua||no.y!==Po||no.z!==fo||no.w!==ro)&&(_e.vertexAttrib4f(ws,Ua,Po,fo,ro),no.x=Ua,no.y=Po,no.z=fo,no.w=ro)),ds=_a.positionBuffer,st.buffer=ds,Xs=!1,oa=1,Yo=0,po=0,ss=0,ls=0,gs=null,bt=0,Ft=!1,hr=5126,nr=0,Sr=0,li=0,Er(st)?(Xs=!0,gs=de.createStream(34962,st),hr=gs.dtype):(gs=de.getBuffer(st),gs?hr=gs.dtype:"constant"in st?(oa=2,typeof st.constant=="number"?(Yo=st.constant,po=ss=ls=0):(Yo=st.constant.length>0?st.constant[0]:0,po=st.constant.length>1?st.constant[1]:0,ss=st.constant.length>2?st.constant[2]:0,ls=st.constant.length>3?st.constant[3]:0)):(Er(st.buffer)?gs=de.createStream(34962,st.buffer):gs=de.getBuffer(st.buffer),hr="type"in st?Mi[st.type]:gs.dtype,Ft=!!st.normalized,bt=st.size|0,nr=st.offset|0,Sr=st.stride|0,li=st.divisor|0)),di=k.location,mi=Et[di],oa===1?(mi.buffer||_e.enableVertexAttribArray(di),Oi=bt||2,(mi.type!==hr||mi.size!==Oi||mi.buffer!==gs||mi.normalized!==Ft||mi.offset!==nr||mi.stride!==Sr)&&(_e.bindBuffer(34962,gs.buffer),_e.vertexAttribPointer(di,Oi,hr,Ft,Sr,nr),mi.type=hr,mi.size=Oi,mi.buffer=gs,mi.normalized=Ft,mi.offset=nr,mi.stride=Sr),mi.divisor!==li&&(fn.vertexAttribDivisorANGLE(di,li),mi.divisor=li)):(mi.buffer&&(_e.disableVertexAttribArray(di),mi.buffer=null),(mi.x!==Yo||mi.y!==po||mi.z!==ss||mi.w!==ls)&&(_e.vertexAttrib4f(di,Yo,po,ss,ls),mi.x=Yo,mi.y=po,mi.z=ss,mi.w=ls)),dn=_a.dashLength,(!xn||wi!==dn)&&(wi=dn,_e.uniform1f(E.location,dn)),ui=_a.dashTexture,ui&&ui._reglType==="framebuffer"&&(ui=ui.color[0]),Ai=ui._texture,_e.uniform1i(A.location,Ai.bind()),gi=_a.depth,(!xn||gn!==gi)&&(gn=gi,_e.uniform1f(L.location,gi)),In=_a.miterLimit,(!xn||Vn!==In)&&(Vn=In,_e.uniform1f(_.location,In)),Rn=M.call(this,Fe,_a,xn),(!xn||Hn!==Rn)&&(Hn=Rn,_e.uniform1f(C.location,Rn)),Gn=_a.opacity,(!xn||pn!==Gn)&&(pn=Gn,_e.uniform1f(v.location,Gn)),Lo=_a.scale,us=Lo[0],Js=Lo[1],(!xn||Bs!==us||ol!==Js)&&(Bs=us,ol=Js,_e.uniform2f(z.location,us,Js)),Cl=_a.thickness,(!xn||ul!==Cl)&&(ul=Cl,_e.uniform1f(T.location,Cl)),Gl=_a.translate,Vl=Gl[0],ga=Gl[1],(!xn||Fl!==Vl||ko!==ga)&&(Fl=Vl,ko=ga,_e.uniform2f(F.location,Vl,ga)),zs=U.call(this,Fe,_a,xn),Fo=zs[0],Gs=zs[1],Sl=zs[2],kl=zs[3],(!xn||Ys!==Fo||Us!==Gs||_l!==Sl||cl!==kl)&&(Ys=Fo,Us=Gs,_l=Sl,cl=kl,_e.uniform4f(q.location,Fo,Gs,Sl,kl)),xl=_a.count,xl>0?Nn?fn.drawElementsInstancedANGLE(5,4,Nn.type,0<<(Nn.type-5121>>1),xl):fn.drawArraysInstancedANGLE(5,0,4,xl):xl<0&&(Nn?_e.drawElements(5,4,Nn.type,0<<(Nn.type-5121>>1)):_e.drawArrays(5,0,4)),Fe.viewportWidth=Oa,Fe.viewportHeight=co,ms&&de.destroyStream(bn),wa&&de.destroyStream(Wa),Ao&&de.destroyStream(ta),Zo&&de.destroyStream($n),$o&&de.destroyStream(Ma),Xs&&de.destroyStream(gs),Ai.unbind()}lt.dirty=!0,St.setVAO(null),Ui&&(r.cpuTime+=performance.now()-zn)}}}});var M9=Se((i1r,OOe)=>{OOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze){"use strict";var et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci;return et=t.gl,gt=t.context,Pt=t.strings,Qe=t.next,Xe=t.current,Tt=t.draw,xt=t.elements,_t=t.buffer,Ct=t.shader,jt=t.attributes,At=t.vao,Te=t.uniforms,nt=t.framebuffer,ut=t.extensions,ct=t.timer,rt=t.isBufferArgs,je=Qe.blend_color,tt=Xe.blend_color,Je=Qe.blend_equation,Mt=Xe.blend_equation,Vt=Qe.blend_func,Kt=Xe.blend_func,ir=Qe.depth_range,fr=Xe.depth_range,Ot=Qe.colorMask,De=Xe.colorMask,_e=Qe.polygonOffset_offset,Fe=Xe.polygonOffset_offset,Pe=Qe.sample_coverage,Ie=Xe.sample_coverage,lt=Qe.stencil_func,ye=Xe.stencil_func,ue=Qe.stencil_opFront,de=Xe.stencil_opFront,ht=Qe.stencil_opBack,Et=Xe.stencil_opBack,St=Qe.scissor_box,Zt=Xe.scissor_box,qr=Qe.viewport,Lr=Xe.viewport,vr={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Er={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},si={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},Ei={add:32774,subtract:32778,"reverse subtract":32779},Si={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},xi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Hi={cw:2304,ccw:2305},Jr={},Jr.stride=8,Jr.offset=8,ci={},ci.stride=8,ci.offset=8,{draw:function(Di){var Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa;if(Lt=ut.angle_instanced_arrays,vt=nt.next,vt!==nt.cur&&(vt?et.bindFramebuffer(36160,vt.framebuffer):et.bindFramebuffer(36160,null),nt.cur=vt),Xe.dirty){var jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea;jo=Qe.dither,jo!==Xe.dither&&(jo?et.enable(3024):et.disable(3024),Xe.dither=jo),Vo=Qe.depth_func,Vo!==Xe.depth_func&&(et.depthFunc(Vo),Xe.depth_func=Vo),Pa=ir[0],Oa=ir[1],(Pa!==fr[0]||Oa!==fr[1])&&(et.depthRange(Pa,Oa),fr[0]=Pa,fr[1]=Oa),co=Qe.depth_mask,co!==Xe.depth_mask&&(et.depthMask(co),Xe.depth_mask=co),An=Ot[0],_o=Ot[1],ks=Ot[2],bs=Ot[3],(An!==De[0]||_o!==De[1]||ks!==De[2]||bs!==De[3])&&(et.colorMask(An,_o,ks,bs),De[0]=An,De[1]=_o,De[2]=ks,De[3]=bs),ps=Qe.cull_enable,ps!==Xe.cull_enable&&(ps?et.enable(2884):et.disable(2884),Xe.cull_enable=ps),sa=Qe.cull_face,sa!==Xe.cull_face&&(et.cullFace(sa),Xe.cull_face=sa),Bn=Qe.frontFace,Bn!==Xe.frontFace&&(et.frontFace(Bn),Xe.frontFace=Bn),ms=Qe.lineWidth,ms!==Xe.lineWidth&&(et.lineWidth(ms),Xe.lineWidth=ms),ya=Qe.polygonOffset_enable,ya!==Xe.polygonOffset_enable&&(ya?et.enable(32823):et.disable(32823),Xe.polygonOffset_enable=ya),on=_e[0],mn=_e[1],(on!==Fe[0]||mn!==Fe[1])&&(et.polygonOffset(on,mn),Fe[0]=on,Fe[1]=mn),Ga=Qe.sample_alpha,Ga!==Xe.sample_alpha&&(Ga?et.enable(32926):et.disable(32926),Xe.sample_alpha=Ga),ca=Qe.sample_enable,ca!==Xe.sample_enable&&(ca?et.enable(32928):et.disable(32928),Xe.sample_enable=ca),bn=Pe[0],Xi=Pe[1],(bn!==Ie[0]||Xi!==Ie[1])&&(et.sampleCoverage(bn,Xi),Ie[0]=bn,Ie[1]=Xi),qn=Qe.stencil_mask,qn!==Xe.stencil_mask&&(et.stencilMask(qn),Xe.stencil_mask=qn),Ia=lt[0],yn=lt[1],Ya=lt[2],(Ia!==ye[0]||yn!==ye[1]||Ya!==ye[2])&&(et.stencilFunc(Ia,yn,Ya),ye[0]=Ia,ye[1]=yn,ye[2]=Ya),ba=ue[0],Da=ue[1],Aa=ue[2],Ln=ue[3],(ba!==de[0]||Da!==de[1]||Aa!==de[2]||Ln!==de[3])&&(et.stencilOpSeparate(ba,Da,Aa,Ln),de[0]=ba,de[1]=Da,de[2]=Aa,de[3]=Ln),wo=ht[0],wa=ht[1],$i=ht[2],ea=ht[3],(wo!==Et[0]||wa!==Et[1]||$i!==Et[2]||ea!==Et[3])&&(et.stencilOpSeparate(wo,wa,$i,ea),Et[0]=wo,Et[1]=wa,Et[2]=$i,Et[3]=ea)}Dt=Di.viewport,Bt=Dt.x|0,sr=Dt.y|0,br="width"in Dt?Dt.width|0:gt.framebufferWidth-Bt,zr="height"in Dt?Dt.height|0:gt.framebufferHeight-sr,Tr=gt.viewportWidth,gt.viewportWidth=br,Rr=gt.viewportHeight,gt.viewportHeight=zr,et.viewport(Bt,sr,br,zr),Lr[0]=Bt,Lr[1]=sr,Lr[2]=br,Lr[3]=zr,et.blendColor(0,0,0,0),tt[0]=0,tt[1]=0,tt[2]=0,tt[3]=0,n?et.enable(3042):et.disable(3042),Xe.blend_enable=n,et.blendEquationSeparate(32774,32774),Mt[0]=32774,Mt[1]=32774,et.blendFuncSeparate(770,771,773,1),Kt[0]=770,Kt[1]=771,Kt[2]=773,Kt[3]=1,i?et.enable(2929):et.disable(2929),Xe.depth_enable=i,Br=Di.viewport,oi=Br.x|0,vi=Br.y|0,Pi="width"in Br?Br.width|0:gt.framebufferWidth-oi,Yr="height"in Br?Br.height|0:gt.framebufferHeight-vi,et.scissor(oi,vi,Pi,Yr),Zt[0]=oi,Zt[1]=vi,Zt[2]=Pi,Zt[3]=Yr,a?et.enable(3089):et.disable(3089),Xe.scissor_enable=a,o?et.enable(2960):et.disable(2960),Xe.stencil_enable=o,Ni=Xe.profile,Ni&&(Ur=performance.now(),r.count++),et.useProgram(s.program),ti=ut.angle_instanced_arrays,At.setVAO(null),ki=Di.positionBuffer,Jr.buffer=ki,ji=!1,Vi=1,zi=0,Mi=0,sn=0,fi=0,Or=null,st=0,Wt=!1,tr=5126,or=0,Nr=0,hi=0,rt(Jr)?(ji=!0,Or=_t.createStream(34962,Jr),tr=Or.dtype):(Or=_t.getBuffer(Jr),Or?tr=Or.dtype:"constant"in Jr?(Vi=2,typeof Jr.constant=="number"?(zi=Jr.constant,Mi=sn=fi=0):(zi=Jr.constant.length>0?Jr.constant[0]:0,Mi=Jr.constant.length>1?Jr.constant[1]:0,sn=Jr.constant.length>2?Jr.constant[2]:0,fi=Jr.constant.length>3?Jr.constant[3]:0)):(rt(Jr.buffer)?Or=_t.createStream(34962,Jr.buffer):Or=_t.getBuffer(Jr.buffer),tr="type"in Jr?xi[Jr.type]:Or.dtype,Wt=!!Jr.normalized,st=Jr.size|0,or=Jr.offset|0,Nr=Jr.stride|0,hi=Jr.divisor|0)),Gi=u.location,Qr=jt[Gi],Vi===1?(Qr.buffer||et.enableVertexAttribArray(Gi),Ui=st||2,(Qr.type!==tr||Qr.size!==Ui||Qr.buffer!==Or||Qr.normalized!==Wt||Qr.offset!==or||Qr.stride!==Nr)&&(et.bindBuffer(34962,Or.buffer),et.vertexAttribPointer(Gi,Ui,tr,Wt,Nr,or),Qr.type=tr,Qr.size=Ui,Qr.buffer=Or,Qr.normalized=Wt,Qr.offset=or,Qr.stride=Nr),Qr.divisor!==hi&&(ti.vertexAttribDivisorANGLE(Gi,hi),Qr.divisor=hi)):(Qr.buffer&&(et.disableVertexAttribArray(Gi),Qr.buffer=null),(Qr.x!==zi||Qr.y!==Mi||Qr.z!==sn||Qr.w!==fi)&&(et.vertexAttrib4f(Gi,zi,Mi,sn,fi),Qr.x=zi,Qr.y=Mi,Qr.z=sn,Qr.w=fi)),zn=Di.positionFractBuffer,ci.buffer=zn,fn=!1,xn=1,_a=0,Wn=0,Fn=0,ia=0,za=null,Hr=0,na=!1,go=5126,Dn=0,un=0,Zn=0,rt(ci)?(fn=!0,za=_t.createStream(34962,ci),go=za.dtype):(za=_t.getBuffer(ci),za?go=za.dtype:"constant"in ci?(xn=2,typeof ci.constant=="number"?(_a=ci.constant,Wn=Fn=ia=0):(_a=ci.constant.length>0?ci.constant[0]:0,Wn=ci.constant.length>1?ci.constant[1]:0,Fn=ci.constant.length>2?ci.constant[2]:0,ia=ci.constant.length>3?ci.constant[3]:0)):(rt(ci.buffer)?za=_t.createStream(34962,ci.buffer):za=_t.getBuffer(ci.buffer),go="type"in ci?xi[ci.type]:za.dtype,na=!!ci.normalized,Hr=ci.size|0,Dn=ci.offset|0,un=ci.stride|0,Zn=ci.divisor|0)),Wo=l.location,Ba=jt[Wo],xn===1?(Ba.buffer||et.enableVertexAttribArray(Wo),Bo=Hr||2,(Ba.type!==go||Ba.size!==Bo||Ba.buffer!==za||Ba.normalized!==na||Ba.offset!==Dn||Ba.stride!==un)&&(et.bindBuffer(34962,za.buffer),et.vertexAttribPointer(Wo,Bo,go,na,un,Dn),Ba.type=go,Ba.size=Bo,Ba.buffer=za,Ba.normalized=na,Ba.offset=Dn,Ba.stride=un),Ba.divisor!==Zn&&(ti.vertexAttribDivisorANGLE(Wo,Zn),Ba.divisor=Zn)):(Ba.buffer&&(et.disableVertexAttribArray(Wo),Ba.buffer=null),(Ba.x!==_a||Ba.y!==Wn||Ba.z!==Fn||Ba.w!==ia)&&(et.vertexAttrib4f(Wo,_a,Wn,Fn,ia),Ba.x=_a,Ba.y=Wn,Ba.z=Fn,Ba.w=ia)),Ea=Di.fill,Ha=Ea[0],tn=Ea[1],Cn=Ea[2],Xn=Ea[3],et.uniform4f(f.location,Ha,tn,Cn,Xn),ts=Di.id,et.uniform1f(c.location,ts),Ja=Di.opacity,et.uniform1f(h.location,Ja),to=Di.scale,Ri=to[0],an=to[1],et.uniform2f(d.location,Ri,an),cs=Di.scaleFract,pa=cs[0],ln=cs[1],et.uniform2f(p.location,pa,ln),ka=Di.translate,va=ka[0],bo=ka[1],et.uniform2f(x.location,va,bo),Co=Di.translateFract,Fi=Co[0],Yn=Co[1],et.uniform2f(b.location,Fi,Yn),xa=y.call(this,gt,Di,0),Qi=null,Nn=rt(xa),Nn?Qi=xt.createStream(xa):Qi=xt.getElements(xa),Qi&&et.bindBuffer(34963,Qi.buffer.buffer),Pn=Qi?Qi.vertCount:-1,Pn&&(qa=Tt.instances,qa>0?Qi?ti.drawElementsInstancedANGLE(4,Pn,Qi.type,0<<(Qi.type-5121>>1),qa):ti.drawArraysInstancedANGLE(4,0,Pn,qa):qa<0&&(Qi?et.drawElements(4,Pn,Qi.type,0<<(Qi.type-5121>>1)):et.drawArrays(4,0,Pn)),Xe.dirty=!0,At.setVAO(null),gt.viewportWidth=Tr,gt.viewportHeight=Rr,Ni&&(r.cpuTime+=performance.now()-Ur),ji&&_t.destroyStream(Or),fn&&_t.destroyStream(za),Nn&&xt.destroyStream(Qi))},scope:function(Di,Lt,vt){var Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo;Dt=Di.viewport,Bt=Dt.x|0,sr=Dt.y|0,br="width"in Dt?Dt.width|0:gt.framebufferWidth-Bt,zr="height"in Dt?Dt.height|0:gt.framebufferHeight-sr,Tr=gt.viewportWidth,gt.viewportWidth=br,Rr=gt.viewportHeight,gt.viewportHeight=zr,Br=qr[0],qr[0]=Bt,oi=qr[1],qr[1]=sr,vi=qr[2],qr[2]=br,Pi=qr[3],qr[3]=zr,Yr=je[0],je[0]=k,Ni=je[1],je[1]=E,Ur=je[2],je[2]=A,ti=je[3],je[3]=L,ki=Qe.blend_enable,Qe.blend_enable=_,ji=Je[0],Je[0]=C,Vi=Je[1],Je[1]=M,zi=Vt[0],Vt[0]=v,Mi=Vt[1],Vt[1]=z,sn=Vt[2],Vt[2]=T,fi=Vt[3],Vt[3]=F,Or=Qe.depth_enable,Qe.depth_enable=q,st=Di.viewport,Wt=st.x|0,tr=st.y|0,or="width"in st?st.width|0:gt.framebufferWidth-Wt,Nr="height"in st?st.height|0:gt.framebufferHeight-tr,hi=St[0],St[0]=Wt,Gi=St[1],St[1]=tr,Qr=St[2],St[2]=or,Ui=St[3],St[3]=Nr,zn=Qe.scissor_enable,Qe.scissor_enable=U,fn=Qe.stencil_enable,Qe.stencil_enable=H,xn=Xe.profile,xn&&(_a=performance.now(),r.count++),Wn=y.call(this,gt,Di,vt),Fn=null,ia=rt(Wn),ia?Fn=xt.createStream(Wn):Fn=xt.getElements(Wn),za=Tt.elements,Tt.elements=Fn,Hr=Tt.offset,Tt.offset=j,na=Fn?Fn.vertCount:-1,go=Tt.count,Tt.count=na,Dn=Tt.primitive,Tt.primitive=G,un=Di.scale,Zn=Te[O],Te[O]=un,Wo=Di.fill,Ba=Te[W],Te[W]=Wo,Bo=Di.scaleFract,Ea=Te[re],Te[re]=Bo,Ha=Di.translateFract,tn=Te[ne],Te[ne]=Ha,Cn=Di.translate,Xn=Te[be],Te[be]=Cn,ts=Di.opacity,Ja=Te[ze],Te[ze]=ts,to=gt.pixelRatio,Ri=Te[Ce],Te[Ce]=to,an=Di.id,cs=Te[he],Te[he]=an,pa=te.call(this,gt,Di,vt),ln=Te[ke],Te[ke]=pa,ka=Di.positionBuffer,Jr.buffer=ka,va=!1,bo=1,Co=0,Fi=0,Yn=0,xa=0,Qi=null,Nn=0,Pn=!1,qa=5126,jo=0,Vo=0,Pa=0,rt(Jr)?(va=!0,Qi=_t.createStream(34962,Jr),qa=Qi.dtype):(Qi=_t.getBuffer(Jr),Qi?qa=Qi.dtype:"constant"in Jr?(bo=2,typeof Jr.constant=="number"?(Co=Jr.constant,Fi=Yn=xa=0):(Co=Jr.constant.length>0?Jr.constant[0]:0,Fi=Jr.constant.length>1?Jr.constant[1]:0,Yn=Jr.constant.length>2?Jr.constant[2]:0,xa=Jr.constant.length>3?Jr.constant[3]:0)):(rt(Jr.buffer)?Qi=_t.createStream(34962,Jr.buffer):Qi=_t.getBuffer(Jr.buffer),qa="type"in Jr?xi[Jr.type]:Qi.dtype,Pn=!!Jr.normalized,Nn=Jr.size|0,jo=Jr.offset|0,Vo=Jr.stride|0,Pa=Jr.divisor|0)),Oa=Ee.state,Ee.state=bo,co=Ee.x,Ee.x=Co,An=Ee.y,Ee.y=Fi,_o=Ee.z,Ee.z=Yn,ks=Ee.w,Ee.w=xa,bs=Ee.buffer,Ee.buffer=Qi,ps=Ee.size,Ee.size=Nn,sa=Ee.normalized,Ee.normalized=Pn,Bn=Ee.type,Ee.type=qa,ms=Ee.offset,Ee.offset=jo,ya=Ee.stride,Ee.stride=Vo,on=Ee.divisor,Ee.divisor=Pa,mn=Di.positionFractBuffer,ci.buffer=mn,Ga=!1,ca=1,bn=0,Xi=0,qn=0,Ia=0,yn=null,Ya=0,ba=!1,Da=5126,Aa=0,Ln=0,wo=0,rt(ci)?(Ga=!0,yn=_t.createStream(34962,ci),Da=yn.dtype):(yn=_t.getBuffer(ci),yn?Da=yn.dtype:"constant"in ci?(ca=2,typeof ci.constant=="number"?(bn=ci.constant,Xi=qn=Ia=0):(bn=ci.constant.length>0?ci.constant[0]:0,Xi=ci.constant.length>1?ci.constant[1]:0,qn=ci.constant.length>2?ci.constant[2]:0,Ia=ci.constant.length>3?ci.constant[3]:0)):(rt(ci.buffer)?yn=_t.createStream(34962,ci.buffer):yn=_t.getBuffer(ci.buffer),Da="type"in ci?xi[ci.type]:yn.dtype,ba=!!ci.normalized,Ya=ci.size|0,Aa=ci.offset|0,Ln=ci.stride|0,wo=ci.divisor|0)),wa=Me.state,Me.state=ca,$i=Me.x,Me.x=bn,ea=Me.y,Me.y=Xi,Sa=Me.z,Me.z=qn,Za=Me.w,Me.w=Ia,xo=Me.buffer,Me.buffer=yn,Wa=Me.size,Me.size=Ya,hn=Me.normalized,Me.normalized=ba,Un=Me.type,Me.type=Da,Ss=Me.offset,Me.offset=Aa,Kn=Me.stride,Me.stride=Ln,ns=Me.divisor,Me.divisor=wo,Jo=Ct.vert,Ct.vert=Oe,vo=Ct.frag,Ct.frag=Re,Xe.dirty=!0,Lt(gt,Di,vt),gt.viewportWidth=Tr,gt.viewportHeight=Rr,qr[0]=Br,qr[1]=oi,qr[2]=vi,qr[3]=Pi,je[0]=Yr,je[1]=Ni,je[2]=Ur,je[3]=ti,Qe.blend_enable=ki,Je[0]=ji,Je[1]=Vi,Vt[0]=zi,Vt[1]=Mi,Vt[2]=sn,Vt[3]=fi,Qe.depth_enable=Or,St[0]=hi,St[1]=Gi,St[2]=Qr,St[3]=Ui,Qe.scissor_enable=zn,Qe.stencil_enable=fn,xn&&(r.cpuTime+=performance.now()-_a),ia&&xt.destroyStream(Fn),Tt.elements=za,Tt.offset=Hr,Tt.count=go,Tt.primitive=Dn,Te[O]=Zn,Te[W]=Ba,Te[re]=Ea,Te[ne]=tn,Te[be]=Xn,Te[ze]=Ja,Te[Ce]=Ri,Te[he]=cs,Te[ke]=ln,va&&_t.destroyStream(Qi),Ee.state=Oa,Ee.x=co,Ee.y=An,Ee.z=_o,Ee.w=ks,Ee.buffer=bs,Ee.size=ps,Ee.normalized=sa,Ee.type=Bn,Ee.offset=ms,Ee.stride=ya,Ee.divisor=on,Ga&&_t.destroyStream(yn),Me.state=wa,Me.x=$i,Me.y=ea,Me.z=Sa,Me.w=Za,Me.buffer=xo,Me.size=Wa,Me.normalized=hn,Me.type=Un,Me.offset=Ss,Me.stride=Kn,Me.divisor=ns,Ct.vert=Jo,Ct.frag=vo,Xe.dirty=!0},batch:function(Di,Lt){var vt,Dt,Bt,sr,br,zr,Tr;if(vt=ut.angle_instanced_arrays,Dt=nt.next,Dt!==nt.cur&&(Dt?et.bindFramebuffer(36160,Dt.framebuffer):et.bindFramebuffer(36160,null),nt.cur=Dt),Xe.dirty){var Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn;Rr=Qe.dither,Rr!==Xe.dither&&(Rr?et.enable(3024):et.disable(3024),Xe.dither=Rr),Br=Qe.depth_func,Br!==Xe.depth_func&&(et.depthFunc(Br),Xe.depth_func=Br),oi=ir[0],vi=ir[1],(oi!==fr[0]||vi!==fr[1])&&(et.depthRange(oi,vi),fr[0]=oi,fr[1]=vi),Pi=Qe.depth_mask,Pi!==Xe.depth_mask&&(et.depthMask(Pi),Xe.depth_mask=Pi),Yr=Ot[0],Ni=Ot[1],Ur=Ot[2],ti=Ot[3],(Yr!==De[0]||Ni!==De[1]||Ur!==De[2]||ti!==De[3])&&(et.colorMask(Yr,Ni,Ur,ti),De[0]=Yr,De[1]=Ni,De[2]=Ur,De[3]=ti),ki=Qe.cull_enable,ki!==Xe.cull_enable&&(ki?et.enable(2884):et.disable(2884),Xe.cull_enable=ki),ji=Qe.cull_face,ji!==Xe.cull_face&&(et.cullFace(ji),Xe.cull_face=ji),Vi=Qe.frontFace,Vi!==Xe.frontFace&&(et.frontFace(Vi),Xe.frontFace=Vi),zi=Qe.lineWidth,zi!==Xe.lineWidth&&(et.lineWidth(zi),Xe.lineWidth=zi),Mi=Qe.polygonOffset_enable,Mi!==Xe.polygonOffset_enable&&(Mi?et.enable(32823):et.disable(32823),Xe.polygonOffset_enable=Mi),sn=_e[0],fi=_e[1],(sn!==Fe[0]||fi!==Fe[1])&&(et.polygonOffset(sn,fi),Fe[0]=sn,Fe[1]=fi),Or=Qe.sample_alpha,Or!==Xe.sample_alpha&&(Or?et.enable(32926):et.disable(32926),Xe.sample_alpha=Or),st=Qe.sample_enable,st!==Xe.sample_enable&&(st?et.enable(32928):et.disable(32928),Xe.sample_enable=st),Wt=Pe[0],tr=Pe[1],(Wt!==Ie[0]||tr!==Ie[1])&&(et.sampleCoverage(Wt,tr),Ie[0]=Wt,Ie[1]=tr),or=Qe.stencil_mask,or!==Xe.stencil_mask&&(et.stencilMask(or),Xe.stencil_mask=or),Nr=lt[0],hi=lt[1],Gi=lt[2],(Nr!==ye[0]||hi!==ye[1]||Gi!==ye[2])&&(et.stencilFunc(Nr,hi,Gi),ye[0]=Nr,ye[1]=hi,ye[2]=Gi),Qr=ue[0],Ui=ue[1],zn=ue[2],fn=ue[3],(Qr!==de[0]||Ui!==de[1]||zn!==de[2]||fn!==de[3])&&(et.stencilOpSeparate(Qr,Ui,zn,fn),de[0]=Qr,de[1]=Ui,de[2]=zn,de[3]=fn),xn=ht[0],_a=ht[1],Wn=ht[2],Fn=ht[3],(xn!==Et[0]||_a!==Et[1]||Wn!==Et[2]||Fn!==Et[3])&&(et.stencilOpSeparate(xn,_a,Wn,Fn),Et[0]=xn,Et[1]=_a,Et[2]=Wn,Et[3]=Fn)}et.blendColor(0,0,0,0),tt[0]=0,tt[1]=0,tt[2]=0,tt[3]=0,me?et.enable(3042):et.disable(3042),Xe.blend_enable=me,et.blendEquationSeparate(32774,32774),Mt[0]=32774,Mt[1]=32774,et.blendFuncSeparate(770,771,773,1),Kt[0]=770,Kt[1]=771,Kt[2]=773,Kt[3]=1,Be?et.enable(2929):et.disable(2929),Xe.depth_enable=Be,fe?et.enable(3089):et.disable(3089),Xe.scissor_enable=fe,Ze?et.enable(2960):et.disable(2960),Xe.stencil_enable=Ze,Bt=Xe.profile,Bt&&(sr=performance.now(),r.count+=Lt),et.useProgram(s.program),br=ut.angle_instanced_arrays;var ia;for(At.setVAO(null),ia=Tt.instances,zr=0;zr<Lt;++zr){Tr=Di[zr];var za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki;za=Tr.viewport,Hr=za.x|0,na=za.y|0,go="width"in za?za.width|0:gt.framebufferWidth-Hr,Dn="height"in za?za.height|0:gt.framebufferHeight-na,un=gt.viewportWidth,gt.viewportWidth=go,Zn=gt.viewportHeight,gt.viewportHeight=Dn,et.viewport(Hr,na,go,Dn),Lr[0]=Hr,Lr[1]=na,Lr[2]=go,Lr[3]=Dn,Wo=Tr.viewport,Ba=Wo.x|0,Bo=Wo.y|0,Ea="width"in Wo?Wo.width|0:gt.framebufferWidth-Ba,Ha="height"in Wo?Wo.height|0:gt.framebufferHeight-Bo,et.scissor(Ba,Bo,Ea,Ha),Zt[0]=Ba,Zt[1]=Bo,Zt[2]=Ea,Zt[3]=Ha,tn=Tr.positionBuffer,Jr.buffer=tn,Cn=!1,Xn=1,ts=0,Ja=0,to=0,Ri=0,an=null,cs=0,pa=!1,ln=5126,ka=0,va=0,bo=0,rt(Jr)?(Cn=!0,an=_t.createStream(34962,Jr),ln=an.dtype):(an=_t.getBuffer(Jr),an?ln=an.dtype:"constant"in Jr?(Xn=2,typeof Jr.constant=="number"?(ts=Jr.constant,Ja=to=Ri=0):(ts=Jr.constant.length>0?Jr.constant[0]:0,Ja=Jr.constant.length>1?Jr.constant[1]:0,to=Jr.constant.length>2?Jr.constant[2]:0,Ri=Jr.constant.length>3?Jr.constant[3]:0)):(rt(Jr.buffer)?an=_t.createStream(34962,Jr.buffer):an=_t.getBuffer(Jr.buffer),ln="type"in Jr?xi[Jr.type]:an.dtype,pa=!!Jr.normalized,cs=Jr.size|0,ka=Jr.offset|0,va=Jr.stride|0,bo=Jr.divisor|0)),Co=u.location,Fi=jt[Co],Xn===1?(Fi.buffer||et.enableVertexAttribArray(Co),Yn=cs||2,(Fi.type!==ln||Fi.size!==Yn||Fi.buffer!==an||Fi.normalized!==pa||Fi.offset!==ka||Fi.stride!==va)&&(et.bindBuffer(34962,an.buffer),et.vertexAttribPointer(Co,Yn,ln,pa,va,ka),Fi.type=ln,Fi.size=Yn,Fi.buffer=an,Fi.normalized=pa,Fi.offset=ka,Fi.stride=va),Fi.divisor!==bo&&(br.vertexAttribDivisorANGLE(Co,bo),Fi.divisor=bo)):(Fi.buffer&&(et.disableVertexAttribArray(Co),Fi.buffer=null),(Fi.x!==ts||Fi.y!==Ja||Fi.z!==to||Fi.w!==Ri)&&(et.vertexAttrib4f(Co,ts,Ja,to,Ri),Fi.x=ts,Fi.y=Ja,Fi.z=to,Fi.w=Ri)),xa=Tr.positionFractBuffer,ci.buffer=xa,Qi=!1,Nn=1,Pn=0,qa=0,jo=0,Vo=0,Pa=null,Oa=0,co=!1,An=5126,_o=0,ks=0,bs=0,rt(ci)?(Qi=!0,Pa=_t.createStream(34962,ci),An=Pa.dtype):(Pa=_t.getBuffer(ci),Pa?An=Pa.dtype:"constant"in ci?(Nn=2,typeof ci.constant=="number"?(Pn=ci.constant,qa=jo=Vo=0):(Pn=ci.constant.length>0?ci.constant[0]:0,qa=ci.constant.length>1?ci.constant[1]:0,jo=ci.constant.length>2?ci.constant[2]:0,Vo=ci.constant.length>3?ci.constant[3]:0)):(rt(ci.buffer)?Pa=_t.createStream(34962,ci.buffer):Pa=_t.getBuffer(ci.buffer),An="type"in ci?xi[ci.type]:Pa.dtype,co=!!ci.normalized,Oa=ci.size|0,_o=ci.offset|0,ks=ci.stride|0,bs=ci.divisor|0)),ps=l.location,sa=jt[ps],Nn===1?(sa.buffer||et.enableVertexAttribArray(ps),Bn=Oa||2,(sa.type!==An||sa.size!==Bn||sa.buffer!==Pa||sa.normalized!==co||sa.offset!==_o||sa.stride!==ks)&&(et.bindBuffer(34962,Pa.buffer),et.vertexAttribPointer(ps,Bn,An,co,ks,_o),sa.type=An,sa.size=Bn,sa.buffer=Pa,sa.normalized=co,sa.offset=_o,sa.stride=ks),sa.divisor!==bs&&(br.vertexAttribDivisorANGLE(ps,bs),sa.divisor=bs)):(sa.buffer&&(et.disableVertexAttribArray(ps),sa.buffer=null),(sa.x!==Pn||sa.y!==qa||sa.z!==jo||sa.w!==Vo)&&(et.vertexAttrib4f(ps,Pn,qa,jo,Vo),sa.x=Pn,sa.y=qa,sa.z=jo,sa.w=Vo)),ms=Tr.fill,ya=ms[0],mn=ms[1],ca=ms[2],Xi=ms[3],(!zr||on!==ya||Ga!==mn||bn!==ca||qn!==Xi)&&(on=ya,Ga=mn,bn=ca,qn=Xi,et.uniform4f(f.location,ya,mn,ca,Xi)),Ia=Tr.id,(!zr||yn!==Ia)&&(yn=Ia,et.uniform1f(c.location,Ia)),Ya=Tr.opacity,(!zr||ba!==Ya)&&(ba=Ya,et.uniform1f(h.location,Ya)),Da=Tr.scale,Aa=Da[0],wo=Da[1],(!zr||Ln!==Aa||wa!==wo)&&(Ln=Aa,wa=wo,et.uniform2f(d.location,Aa,wo)),$i=Tr.scaleFract,ea=$i[0],Za=$i[1],(!zr||Sa!==ea||xo!==Za)&&(Sa=ea,xo=Za,et.uniform2f(p.location,ea,Za)),Wa=Tr.translate,hn=Wa[0],Ss=Wa[1],(!zr||Un!==hn||Kn!==Ss)&&(Un=hn,Kn=Ss,et.uniform2f(x.location,hn,Ss)),ns=Tr.translateFract,Jo=ns[0],ma=ns[1],(!zr||vo!==Jo||ja!==ma)&&(vo=Jo,ja=ma,et.uniform2f(b.location,Jo,ma)),To=y.call(this,gt,Tr,zr),Ao=null,la=rt(To),la?Ao=xt.createStream(To):Ao=xt.getElements(To),Ao&&et.bindBuffer(34963,Ao.buffer.buffer),Ki=Ao?Ao.vertCount:-1,Ki&&(ia>0?Ao?br.drawElementsInstancedANGLE(4,Ki,Ao.type,0<<(Ao.type-5121>>1),ia):br.drawArraysInstancedANGLE(4,0,Ki,ia):ia<0&&(Ao?et.drawElements(4,Ki,Ao.type,0<<(Ao.type-5121>>1)):et.drawArrays(4,0,Ki)),gt.viewportWidth=un,gt.viewportHeight=Zn,Cn&&_t.destroyStream(an),Qi&&_t.destroyStream(Pa),la&&xt.destroyStream(Ao))}Xe.dirty=!0,At.setVAO(null),Bt&&(r.cpuTime+=performance.now()-sr)}}}});var E9=Se((n1r,NOe)=>{NOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot){"use strict";var De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi;return De=t.gl,_e=t.context,Fe=t.strings,Pe=t.next,Ie=t.current,lt=t.draw,ye=t.elements,ue=t.buffer,de=t.shader,ht=t.attributes,Et=t.vao,St=t.uniforms,Zt=t.framebuffer,qr=t.extensions,Lr=t.timer,vr=t.isBufferArgs,Er=Pe.blend_color,si=Ie.blend_color,Ei=Pe.blend_equation,Si=Ie.blend_equation,xi=Pe.blend_func,Hi=Ie.blend_func,Jr=Pe.depth_range,ci=Ie.depth_range,Di=Pe.colorMask,Lt=Ie.colorMask,vt=Pe.polygonOffset_offset,Dt=Ie.polygonOffset_offset,Bt=Pe.sample_coverage,sr=Ie.sample_coverage,br=Pe.stencil_func,zr=Ie.stencil_func,Tr=Pe.stencil_opFront,Rr=Ie.stencil_opFront,Br=Pe.stencil_opBack,oi=Ie.stencil_opBack,vi=Pe.scissor_box,Pi=Ie.scissor_box,Yr=Pe.viewport,Ni=Ie.viewport,Ur={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ti={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},ki={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},ji={add:32774,subtract:32778,"reverse subtract":32779},Vi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},zi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Mi={cw:2304,ccw:2305},{draw:function(sn){var fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl;if(fi=qr.angle_instanced_arrays,Or=Zt.next,Or!==Zt.cur&&(Or?De.bindFramebuffer(36160,Or.framebuffer):De.bindFramebuffer(36160,null),Zt.cur=Or),Ie.dirty){var _l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr;_l=Pe.dither,_l!==Ie.dither&&(_l?De.enable(3024):De.disable(3024),Ie.dither=_l),kl=Ei[0],cl=Ei[1],(kl!==Si[0]||cl!==Si[1])&&(De.blendEquationSeparate(kl,cl),Si[0]=kl,Si[1]=cl),xl=Pe.depth_func,xl!==Ie.depth_func&&(De.depthFunc(xl),Ie.depth_func=xl),Uo=Jr[0],_s=Jr[1],(Uo!==ci[0]||_s!==ci[1])&&(De.depthRange(Uo,_s),ci[0]=Uo,ci[1]=_s),Bl=Pe.depth_mask,Bl!==Ie.depth_mask&&(De.depthMask(Bl),Ie.depth_mask=Bl),Il=Di[0],Dl=Di[1],oe=Di[2],w=Di[3],(Il!==Lt[0]||Dl!==Lt[1]||oe!==Lt[2]||w!==Lt[3])&&(De.colorMask(Il,Dl,oe,w),Lt[0]=Il,Lt[1]=Dl,Lt[2]=oe,Lt[3]=w),B=Pe.cull_enable,B!==Ie.cull_enable&&(B?De.enable(2884):De.disable(2884),Ie.cull_enable=B),Q=Pe.cull_face,Q!==Ie.cull_face&&(De.cullFace(Q),Ie.cull_face=Q),ee=Pe.frontFace,ee!==Ie.frontFace&&(De.frontFace(ee),Ie.frontFace=ee),le=Pe.lineWidth,le!==Ie.lineWidth&&(De.lineWidth(le),Ie.lineWidth=le),Ne=Pe.polygonOffset_enable,Ne!==Ie.polygonOffset_enable&&(Ne?De.enable(32823):De.disable(32823),Ie.polygonOffset_enable=Ne),$e=vt[0],pt=vt[1],($e!==Dt[0]||pt!==Dt[1])&&(De.polygonOffset($e,pt),Dt[0]=$e,Dt[1]=pt),zt=Pe.sample_alpha,zt!==Ie.sample_alpha&&(zt?De.enable(32926):De.disable(32926),Ie.sample_alpha=zt),Yt=Pe.sample_enable,Yt!==Ie.sample_enable&&(Yt?De.enable(32928):De.disable(32928),Ie.sample_enable=Yt),Jt=Bt[0],yr=Bt[1],(Jt!==sr[0]||yr!==sr[1])&&(De.sampleCoverage(Jt,yr),sr[0]=Jt,sr[1]=yr),Ir=Pe.stencil_mask,Ir!==Ie.stencil_mask&&(De.stencilMask(Ir),Ie.stencil_mask=Ir),ce=br[0],Ae=br[1],qe=br[2],(ce!==zr[0]||Ae!==zr[1]||qe!==zr[2])&&(De.stencilFunc(ce,Ae,qe),zr[0]=ce,zr[1]=Ae,zr[2]=qe),Ve=Tr[0],ot=Tr[1],Ke=Tr[2],ft=Tr[3],(Ve!==Rr[0]||ot!==Rr[1]||Ke!==Rr[2]||ft!==Rr[3])&&(De.stencilOpSeparate(Ve,ot,Ke,ft),Rr[0]=Ve,Rr[1]=ot,Rr[2]=Ke,Rr[3]=ft),qt=Br[0],Xt=Br[1],$t=Br[2],dr=Br[3],(qt!==oi[0]||Xt!==oi[1]||$t!==oi[2]||dr!==oi[3])&&(De.stencilOpSeparate(qt,Xt,$t,dr),oi[0]=qt,oi[1]=Xt,oi[2]=$t,oi[3]=dr)}st=sn.viewport,Wt=st.x|0,tr=st.y|0,or="width"in st?st.width|0:_e.framebufferWidth-Wt,Nr="height"in st?st.height|0:_e.framebufferHeight-tr,hi=_e.viewportWidth,_e.viewportWidth=or,Gi=_e.viewportHeight,_e.viewportHeight=Nr,De.viewport(Wt,tr,or,Nr),Ni[0]=Wt,Ni[1]=tr,Ni[2]=or,Ni[3]=Nr,De.blendColor(0,0,0,1),si[0]=0,si[1]=0,si[2]=0,si[3]=1,n?De.enable(3042):De.disable(3042),Ie.blend_enable=n,De.blendFuncSeparate(770,771,773,1),Hi[0]=770,Hi[1]=771,Hi[2]=773,Hi[3]=1,i?De.enable(2929):De.disable(2929),Ie.depth_enable=i,Qr=sn.viewport,Ui=Qr.x|0,zn=Qr.y|0,fn="width"in Qr?Qr.width|0:_e.framebufferWidth-Ui,xn="height"in Qr?Qr.height|0:_e.framebufferHeight-zn,De.scissor(Ui,zn,fn,xn),Pi[0]=Ui,Pi[1]=zn,Pi[2]=fn,Pi[3]=xn,a?De.enable(3089):De.disable(3089),Ie.scissor_enable=a,o?De.enable(2960):De.disable(2960),Ie.stencil_enable=o,_a=Ie.profile,_a&&(Wn=performance.now(),r.count++),De.useProgram(s.program),Fn=qr.angle_instanced_arrays,Et.setVAO(null),ia=u.call(this,_e,sn,0),za=!1,Hr=1,na=0,go=0,Dn=0,un=0,Zn=null,Wo=0,Ba=!1,Bo=5126,Ea=0,Ha=0,tn=0,vr(ia)?(za=!0,Zn=ue.createStream(34962,ia),Bo=Zn.dtype):(Zn=ue.getBuffer(ia),Zn?Bo=Zn.dtype:"constant"in ia?(Hr=2,typeof ia.constant=="number"?(na=ia.constant,go=Dn=un=0):(na=ia.constant.length>0?ia.constant[0]:0,go=ia.constant.length>1?ia.constant[1]:0,Dn=ia.constant.length>2?ia.constant[2]:0,un=ia.constant.length>3?ia.constant[3]:0)):(vr(ia.buffer)?Zn=ue.createStream(34962,ia.buffer):Zn=ue.getBuffer(ia.buffer),Bo="type"in ia?zi[ia.type]:Zn.dtype,Ba=!!ia.normalized,Wo=ia.size|0,Ea=ia.offset|0,Ha=ia.stride|0,tn=ia.divisor|0)),Cn=l.location,Xn=ht[Cn],Hr===1?(Xn.buffer||De.enableVertexAttribArray(Cn),ts=Wo||4,(Xn.type!==Bo||Xn.size!==ts||Xn.buffer!==Zn||Xn.normalized!==Ba||Xn.offset!==Ea||Xn.stride!==Ha)&&(De.bindBuffer(34962,Zn.buffer),De.vertexAttribPointer(Cn,ts,Bo,Ba,Ha,Ea),Xn.type=Bo,Xn.size=ts,Xn.buffer=Zn,Xn.normalized=Ba,Xn.offset=Ea,Xn.stride=Ha),Xn.divisor!==tn&&(Fn.vertexAttribDivisorANGLE(Cn,tn),Xn.divisor=tn)):(Xn.buffer&&(De.disableVertexAttribArray(Cn),Xn.buffer=null),(Xn.x!==na||Xn.y!==go||Xn.z!==Dn||Xn.w!==un)&&(De.vertexAttrib4f(Cn,na,go,Dn,un),Xn.x=na,Xn.y=go,Xn.z=Dn,Xn.w=un)),Ja=f.call(this,_e,sn,0),to=!1,Ri=1,an=0,cs=0,pa=0,ln=0,ka=null,va=0,bo=!1,Co=5126,Fi=0,Yn=0,xa=0,vr(Ja)?(to=!0,ka=ue.createStream(34962,Ja),Co=ka.dtype):(ka=ue.getBuffer(Ja),ka?Co=ka.dtype:"constant"in Ja?(Ri=2,typeof Ja.constant=="number"?(an=Ja.constant,cs=pa=ln=0):(an=Ja.constant.length>0?Ja.constant[0]:0,cs=Ja.constant.length>1?Ja.constant[1]:0,pa=Ja.constant.length>2?Ja.constant[2]:0,ln=Ja.constant.length>3?Ja.constant[3]:0)):(vr(Ja.buffer)?ka=ue.createStream(34962,Ja.buffer):ka=ue.getBuffer(Ja.buffer),Co="type"in Ja?zi[Ja.type]:ka.dtype,bo=!!Ja.normalized,va=Ja.size|0,Fi=Ja.offset|0,Yn=Ja.stride|0,xa=Ja.divisor|0)),Qi=c.location,Nn=ht[Qi],Ri===1?(Nn.buffer||De.enableVertexAttribArray(Qi),Pn=va||1,(Nn.type!==Co||Nn.size!==Pn||Nn.buffer!==ka||Nn.normalized!==bo||Nn.offset!==Fi||Nn.stride!==Yn)&&(De.bindBuffer(34962,ka.buffer),De.vertexAttribPointer(Qi,Pn,Co,bo,Yn,Fi),Nn.type=Co,Nn.size=Pn,Nn.buffer=ka,Nn.normalized=bo,Nn.offset=Fi,Nn.stride=Yn),Nn.divisor!==xa&&(Fn.vertexAttribDivisorANGLE(Qi,xa),Nn.divisor=xa)):(Nn.buffer&&(De.disableVertexAttribArray(Qi),Nn.buffer=null),(Nn.x!==an||Nn.y!==cs||Nn.z!==pa||Nn.w!==ln)&&(De.vertexAttrib4f(Qi,an,cs,pa,ln),Nn.x=an,Nn.y=cs,Nn.z=pa,Nn.w=ln)),qa=h.call(this,_e,sn,0),jo=!1,Vo=1,Pa=0,Oa=0,co=0,An=0,_o=null,ks=0,bs=!1,ps=5126,sa=0,Bn=0,ms=0,vr(qa)?(jo=!0,_o=ue.createStream(34962,qa),ps=_o.dtype):(_o=ue.getBuffer(qa),_o?ps=_o.dtype:"constant"in qa?(Vo=2,typeof qa.constant=="number"?(Pa=qa.constant,Oa=co=An=0):(Pa=qa.constant.length>0?qa.constant[0]:0,Oa=qa.constant.length>1?qa.constant[1]:0,co=qa.constant.length>2?qa.constant[2]:0,An=qa.constant.length>3?qa.constant[3]:0)):(vr(qa.buffer)?_o=ue.createStream(34962,qa.buffer):_o=ue.getBuffer(qa.buffer),ps="type"in qa?zi[qa.type]:_o.dtype,bs=!!qa.normalized,ks=qa.size|0,sa=qa.offset|0,Bn=qa.stride|0,ms=qa.divisor|0)),ya=d.location,on=ht[ya],Vo===1?(on.buffer||De.enableVertexAttribArray(ya),mn=ks||4,(on.type!==ps||on.size!==mn||on.buffer!==_o||on.normalized!==bs||on.offset!==sa||on.stride!==Bn)&&(De.bindBuffer(34962,_o.buffer),De.vertexAttribPointer(ya,mn,ps,bs,Bn,sa),on.type=ps,on.size=mn,on.buffer=_o,on.normalized=bs,on.offset=sa,on.stride=Bn),on.divisor!==ms&&(Fn.vertexAttribDivisorANGLE(ya,ms),on.divisor=ms)):(on.buffer&&(De.disableVertexAttribArray(ya),on.buffer=null),(on.x!==Pa||on.y!==Oa||on.z!==co||on.w!==An)&&(De.vertexAttrib4f(ya,Pa,Oa,co,An),on.x=Pa,on.y=Oa,on.z=co,on.w=An)),Ga=p.call(this,_e,sn,0),ca=!1,bn=1,Xi=0,qn=0,Ia=0,yn=0,Ya=null,ba=0,Da=!1,Aa=5126,Ln=0,wo=0,wa=0,vr(Ga)?(ca=!0,Ya=ue.createStream(34962,Ga),Aa=Ya.dtype):(Ya=ue.getBuffer(Ga),Ya?Aa=Ya.dtype:"constant"in Ga?(bn=2,typeof Ga.constant=="number"?(Xi=Ga.constant,qn=Ia=yn=0):(Xi=Ga.constant.length>0?Ga.constant[0]:0,qn=Ga.constant.length>1?Ga.constant[1]:0,Ia=Ga.constant.length>2?Ga.constant[2]:0,yn=Ga.constant.length>3?Ga.constant[3]:0)):(vr(Ga.buffer)?Ya=ue.createStream(34962,Ga.buffer):Ya=ue.getBuffer(Ga.buffer),Aa="type"in Ga?zi[Ga.type]:Ya.dtype,Da=!!Ga.normalized,ba=Ga.size|0,Ln=Ga.offset|0,wo=Ga.stride|0,wa=Ga.divisor|0)),$i=x.location,ea=ht[$i],bn===1?(ea.buffer||De.enableVertexAttribArray($i),Sa=ba||1,(ea.type!==Aa||ea.size!==Sa||ea.buffer!==Ya||ea.normalized!==Da||ea.offset!==Ln||ea.stride!==wo)&&(De.bindBuffer(34962,Ya.buffer),De.vertexAttribPointer($i,Sa,Aa,Da,wo,Ln),ea.type=Aa,ea.size=Sa,ea.buffer=Ya,ea.normalized=Da,ea.offset=Ln,ea.stride=wo),ea.divisor!==wa&&(Fn.vertexAttribDivisorANGLE($i,wa),ea.divisor=wa)):(ea.buffer&&(De.disableVertexAttribArray($i),ea.buffer=null),(ea.x!==Xi||ea.y!==qn||ea.z!==Ia||ea.w!==yn)&&(De.vertexAttrib4f($i,Xi,qn,Ia,yn),ea.x=Xi,ea.y=qn,ea.z=Ia,ea.w=yn)),Za=b.call(this,_e,sn,0),xo=!1,Wa=1,hn=0,Un=0,Ss=0,Kn=0,ns=null,Jo=0,vo=!1,ma=5126,ja=0,To=0,Ao=0,vr(Za)?(xo=!0,ns=ue.createStream(34962,Za),ma=ns.dtype):(ns=ue.getBuffer(Za),ns?ma=ns.dtype:"constant"in Za?(Wa=2,typeof Za.constant=="number"?(hn=Za.constant,Un=Ss=Kn=0):(hn=Za.constant.length>0?Za.constant[0]:0,Un=Za.constant.length>1?Za.constant[1]:0,Ss=Za.constant.length>2?Za.constant[2]:0,Kn=Za.constant.length>3?Za.constant[3]:0)):(vr(Za.buffer)?ns=ue.createStream(34962,Za.buffer):ns=ue.getBuffer(Za.buffer),ma="type"in Za?zi[Za.type]:ns.dtype,vo=!!Za.normalized,Jo=Za.size|0,ja=Za.offset|0,To=Za.stride|0,Ao=Za.divisor|0)),la=y.location,Ki=ht[la],Wa===1?(Ki.buffer||De.enableVertexAttribArray(la),ho=Jo||1,(Ki.type!==ma||Ki.size!==ho||Ki.buffer!==ns||Ki.normalized!==vo||Ki.offset!==ja||Ki.stride!==To)&&(De.bindBuffer(34962,ns.buffer),De.vertexAttribPointer(la,ho,ma,vo,To,ja),Ki.type=ma,Ki.size=ho,Ki.buffer=ns,Ki.normalized=vo,Ki.offset=ja,Ki.stride=To),Ki.divisor!==Ao&&(Fn.vertexAttribDivisorANGLE(la,Ao),Ki.divisor=Ao)):(Ki.buffer&&(De.disableVertexAttribArray(la),Ki.buffer=null),(Ki.x!==hn||Ki.y!==Un||Ki.z!==Ss||Ki.w!==Kn)&&(De.vertexAttrib4f(la,hn,Un,Ss,Kn),Ki.x=hn,Ki.y=Un,Ki.z=Ss,Ki.w=Kn)),Ka=k.call(this,_e,sn,0),Ca=!1,ta=1,En=0,Mo=0,Ds=0,Ro=0,vs=null,Ks=0,as=!1,Jn=5126,Cs=0,Xa=0,Zo=0,vr(Ka)?(Ca=!0,vs=ue.createStream(34962,Ka),Jn=vs.dtype):(vs=ue.getBuffer(Ka),vs?Jn=vs.dtype:"constant"in Ka?(ta=2,typeof Ka.constant=="number"?(En=Ka.constant,Mo=Ds=Ro=0):(En=Ka.constant.length>0?Ka.constant[0]:0,Mo=Ka.constant.length>1?Ka.constant[1]:0,Ds=Ka.constant.length>2?Ka.constant[2]:0,Ro=Ka.constant.length>3?Ka.constant[3]:0)):(vr(Ka.buffer)?vs=ue.createStream(34962,Ka.buffer):vs=ue.getBuffer(Ka.buffer),Jn="type"in Ka?zi[Ka.type]:vs.dtype,as=!!Ka.normalized,Ks=Ka.size|0,Cs=Ka.offset|0,Xa=Ka.stride|0,Zo=Ka.divisor|0)),Eo=E.location,lo=ht[Eo],ta===1?(lo.buffer||De.enableVertexAttribArray(Eo),$a=Ks||1,(lo.type!==Jn||lo.size!==$a||lo.buffer!==vs||lo.normalized!==as||lo.offset!==Cs||lo.stride!==Xa)&&(De.bindBuffer(34962,vs.buffer),De.vertexAttribPointer(Eo,$a,Jn,as,Xa,Cs),lo.type=Jn,lo.size=$a,lo.buffer=vs,lo.normalized=as,lo.offset=Cs,lo.stride=Xa),lo.divisor!==Zo&&(Fn.vertexAttribDivisorANGLE(Eo,Zo),lo.divisor=Zo)):(lo.buffer&&(De.disableVertexAttribArray(Eo),lo.buffer=null),(lo.x!==En||lo.y!==Mo||lo.z!==Ds||lo.w!==Ro)&&(De.vertexAttrib4f(Eo,En,Mo,Ds,Ro),lo.x=En,lo.y=Mo,lo.z=Ds,lo.w=Ro)),Xo=A.call(this,_e,sn,0),rs=!1,$n=1,Sn=0,uo=0,Rs=0,xs=0,Go=null,os=0,So=!1,Qn=5126,zo=0,rl=0,$o=0,vr(Xo)?(rs=!0,Go=ue.createStream(34962,Xo),Qn=Go.dtype):(Go=ue.getBuffer(Xo),Go?Qn=Go.dtype:"constant"in Xo?($n=2,typeof Xo.constant=="number"?(Sn=Xo.constant,uo=Rs=xs=0):(Sn=Xo.constant.length>0?Xo.constant[0]:0,uo=Xo.constant.length>1?Xo.constant[1]:0,Rs=Xo.constant.length>2?Xo.constant[2]:0,xs=Xo.constant.length>3?Xo.constant[3]:0)):(vr(Xo.buffer)?Go=ue.createStream(34962,Xo.buffer):Go=ue.getBuffer(Xo.buffer),Qn="type"in Xo?zi[Xo.type]:Go.dtype,So=!!Xo.normalized,os=Xo.size|0,zo=Xo.offset|0,rl=Xo.stride|0,$o=Xo.divisor|0)),Na=L.location,Ua=ht[Na],$n===1?(Ua.buffer||De.enableVertexAttribArray(Na),Po=os||1,(Ua.type!==Qn||Ua.size!==Po||Ua.buffer!==Go||Ua.normalized!==So||Ua.offset!==zo||Ua.stride!==rl)&&(De.bindBuffer(34962,Go.buffer),De.vertexAttribPointer(Na,Po,Qn,So,rl,zo),Ua.type=Qn,Ua.size=Po,Ua.buffer=Go,Ua.normalized=So,Ua.offset=zo,Ua.stride=rl),Ua.divisor!==$o&&(Fn.vertexAttribDivisorANGLE(Na,$o),Ua.divisor=$o)):(Ua.buffer&&(De.disableVertexAttribArray(Na),Ua.buffer=null),(Ua.x!==Sn||Ua.y!==uo||Ua.z!==Rs||Ua.w!==xs)&&(De.vertexAttrib4f(Na,Sn,uo,Rs,xs),Ua.x=Sn,Ua.y=uo,Ua.z=Rs,Ua.w=xs)),fo=_.call(this,_e,sn,0),ro=!1,Ma=1,io=0,aa=0,Oo=0,No=0,Zs=null,Fs=0,ws=!1,no=5126,Ls=0,ds=0,Xs=0,vr(fo)?(ro=!0,Zs=ue.createStream(34962,fo),no=Zs.dtype):(Zs=ue.getBuffer(fo),Zs?no=Zs.dtype:"constant"in fo?(Ma=2,typeof fo.constant=="number"?(io=fo.constant,aa=Oo=No=0):(io=fo.constant.length>0?fo.constant[0]:0,aa=fo.constant.length>1?fo.constant[1]:0,Oo=fo.constant.length>2?fo.constant[2]:0,No=fo.constant.length>3?fo.constant[3]:0)):(vr(fo.buffer)?Zs=ue.createStream(34962,fo.buffer):Zs=ue.getBuffer(fo.buffer),no="type"in fo?zi[fo.type]:Zs.dtype,ws=!!fo.normalized,Fs=fo.size|0,Ls=fo.offset|0,ds=fo.stride|0,Xs=fo.divisor|0)),oa=C.location,Yo=ht[oa],Ma===1?(Yo.buffer||De.enableVertexAttribArray(oa),po=Fs||1,(Yo.type!==no||Yo.size!==po||Yo.buffer!==Zs||Yo.normalized!==ws||Yo.offset!==Ls||Yo.stride!==ds)&&(De.bindBuffer(34962,Zs.buffer),De.vertexAttribPointer(oa,po,no,ws,ds,Ls),Yo.type=no,Yo.size=po,Yo.buffer=Zs,Yo.normalized=ws,Yo.offset=Ls,Yo.stride=ds),Yo.divisor!==Xs&&(Fn.vertexAttribDivisorANGLE(oa,Xs),Yo.divisor=Xs)):(Yo.buffer&&(De.disableVertexAttribArray(oa),Yo.buffer=null),(Yo.x!==io||Yo.y!==aa||Yo.z!==Oo||Yo.w!==No)&&(De.vertexAttrib4f(oa,io,aa,Oo,No),Yo.x=io,Yo.y=aa,Yo.z=Oo,Yo.w=No)),ss=M.call(this,_e,sn,0),ls=!1,gs=1,bt=0,Ft=0,hr=0,nr=0,Sr=null,li=0,di=!1,mi=5126,Oi=0,dn=0,wi=0,vr(ss)?(ls=!0,Sr=ue.createStream(34962,ss),mi=Sr.dtype):(Sr=ue.getBuffer(ss),Sr?mi=Sr.dtype:"constant"in ss?(gs=2,typeof ss.constant=="number"?(bt=ss.constant,Ft=hr=nr=0):(bt=ss.constant.length>0?ss.constant[0]:0,Ft=ss.constant.length>1?ss.constant[1]:0,hr=ss.constant.length>2?ss.constant[2]:0,nr=ss.constant.length>3?ss.constant[3]:0)):(vr(ss.buffer)?Sr=ue.createStream(34962,ss.buffer):Sr=ue.getBuffer(ss.buffer),mi="type"in ss?zi[ss.type]:Sr.dtype,di=!!ss.normalized,li=ss.size|0,Oi=ss.offset|0,dn=ss.stride|0,wi=ss.divisor|0)),ui=v.location,Ai=ht[ui],gs===1?(Ai.buffer||De.enableVertexAttribArray(ui),gi=li||1,(Ai.type!==mi||Ai.size!==gi||Ai.buffer!==Sr||Ai.normalized!==di||Ai.offset!==Oi||Ai.stride!==dn)&&(De.bindBuffer(34962,Sr.buffer),De.vertexAttribPointer(ui,gi,mi,di,dn,Oi),Ai.type=mi,Ai.size=gi,Ai.buffer=Sr,Ai.normalized=di,Ai.offset=Oi,Ai.stride=dn),Ai.divisor!==wi&&(Fn.vertexAttribDivisorANGLE(ui,wi),Ai.divisor=wi)):(Ai.buffer&&(De.disableVertexAttribArray(ui),Ai.buffer=null),(Ai.x!==bt||Ai.y!==Ft||Ai.z!==hr||Ai.w!==nr)&&(De.vertexAttrib4f(ui,bt,Ft,hr,nr),Ai.x=bt,Ai.y=Ft,Ai.z=hr,Ai.w=nr)),De.uniform1i(z.location,!1),gn=sn.markerTexture,gn&&gn._reglType==="framebuffer"&&(gn=gn.color[0]),In=gn._texture,De.uniform1i(T.location,In.bind()),Vn=sn.opacity,De.uniform1f(F.location,Vn),Rn=U.call(this,_e,sn,0),Hn=Rn[0],Gn=Rn[1],De.uniform2f(q.location,Hn,Gn),De.uniform1i(H.location,j.bind()),pn=_e.pixelRatio,De.uniform1f(G.location,pn),Lo=sn.scale,us=Lo[0],Bs=Lo[1],De.uniform2f(O.location,us,Bs),Js=sn.scaleFract,ol=Js[0],Cl=Js[1],De.uniform2f(W.location,ol,Cl),ul=sn.translate,Gl=ul[0],Vl=ul[1],De.uniform2f(re.location,Gl,Vl),Fl=sn.translateFract,ga=Fl[0],ko=Fl[1],De.uniform2f(ne.location,ga,ko),zs=sn.elements,Fo=null,Ys=vr(zs),Ys?Fo=ye.createStream(zs):Fo=ye.getElements(zs),Fo&&De.bindBuffer(34963,Fo.buffer.buffer),Gs=sn.offset,Us=sn.count,Us&&(Sl=lt.instances,Sl>0?Fo?Fn.drawElementsInstancedANGLE(0,Us,Fo.type,Gs<<(Fo.type-5121>>1),Sl):Fn.drawArraysInstancedANGLE(0,Gs,Us,Sl):Sl<0&&(Fo?De.drawElements(0,Us,Fo.type,Gs<<(Fo.type-5121>>1)):De.drawArrays(0,Gs,Us)),Ie.dirty=!0,Et.setVAO(null),_e.viewportWidth=hi,_e.viewportHeight=Gi,_a&&(r.cpuTime+=performance.now()-Wn),za&&ue.destroyStream(Zn),to&&ue.destroyStream(ka),jo&&ue.destroyStream(_o),ca&&ue.destroyStream(Ya),xo&&ue.destroyStream(ns),Ca&&ue.destroyStream(vs),rs&&ue.destroyStream(Go),ro&&ue.destroyStream(Zs),ls&&ue.destroyStream(Sr),In.unbind(),j.unbind(),Ys&&ye.destroyStream(Fo))},scope:function(sn,fi,Or){var st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye,it,Nt,mt,er,_r,wr,ni,Wr,Ci,Ji,ai,Ti,Bi,en,Wi,bi,ao,yo,Ko,Ms,vl,wl,au,Al,nu,Bu,qu,Ju,qo,Rl,pu,xu,of,ff,xf,hf;st=sn.viewport,Wt=st.x|0,tr=st.y|0,or="width"in st?st.width|0:_e.framebufferWidth-Wt,Nr="height"in st?st.height|0:_e.framebufferHeight-tr,hi=_e.viewportWidth,_e.viewportWidth=or,Gi=_e.viewportHeight,_e.viewportHeight=Nr,Qr=Yr[0],Yr[0]=Wt,Ui=Yr[1],Yr[1]=tr,zn=Yr[2],Yr[2]=or,fn=Yr[3],Yr[3]=Nr,xn=Er[0],Er[0]=be,_a=Er[1],Er[1]=ze,Wn=Er[2],Er[2]=Ce,Fn=Er[3],Er[3]=he,ia=Pe.blend_enable,Pe.blend_enable=te,za=xi[0],xi[0]=ke,Hr=xi[1],xi[1]=Ee,na=xi[2],xi[2]=Me,go=xi[3],xi[3]=Oe,Dn=Pe.depth_enable,Pe.depth_enable=Re,un=sn.viewport,Zn=un.x|0,Wo=un.y|0,Ba="width"in un?un.width|0:_e.framebufferWidth-Zn,Bo="height"in un?un.height|0:_e.framebufferHeight-Wo,Ea=vi[0],vi[0]=Zn,Ha=vi[1],vi[1]=Wo,tn=vi[2],vi[2]=Ba,Cn=vi[3],vi[3]=Bo,Xn=Pe.scissor_enable,Pe.scissor_enable=me,ts=Pe.stencil_enable,Pe.stencil_enable=Be,Ja=Ie.profile,Ja&&(to=performance.now(),r.count++),Ri=sn.elements,an=null,cs=vr(Ri),cs?an=ye.createStream(Ri):an=ye.getElements(Ri),pa=lt.elements,lt.elements=an,ln=sn.offset,ka=lt.offset,lt.offset=ln,va=sn.count,bo=lt.count,lt.count=va,Co=lt.primitive,lt.primitive=fe,Fi=St[Ze],St[Ze]=!1,Yn=St[gt],St[gt]=et,xa=sn.opacity,Qi=St[Pt],St[Pt]=xa,Nn=U.call(this,_e,sn,Or),Pn=St[Qe],St[Qe]=Nn,qa=_e.pixelRatio,jo=St[Xe],St[Xe]=qa,Vo=sn.scale,Pa=St[Tt],St[Tt]=Vo,Oa=sn.scaleFract,co=St[xt],St[xt]=Oa,An=sn.translate,_o=St[_t],St[_t]=An,ks=sn.translateFract,bs=St[Ct],St[Ct]=ks,ps=sn.markerTexture,sa=St[jt],St[jt]=ps,Bn=k.call(this,_e,sn,Or),ms=!1,ya=1,on=0,mn=0,Ga=0,ca=0,bn=null,Xi=0,qn=!1,Ia=5126,yn=0,Ya=0,ba=0,vr(Bn)?(ms=!0,bn=ue.createStream(34962,Bn),Ia=bn.dtype):(bn=ue.getBuffer(Bn),bn?Ia=bn.dtype:"constant"in Bn?(ya=2,typeof Bn.constant=="number"?(on=Bn.constant,mn=Ga=ca=0):(on=Bn.constant.length>0?Bn.constant[0]:0,mn=Bn.constant.length>1?Bn.constant[1]:0,Ga=Bn.constant.length>2?Bn.constant[2]:0,ca=Bn.constant.length>3?Bn.constant[3]:0)):(vr(Bn.buffer)?bn=ue.createStream(34962,Bn.buffer):bn=ue.getBuffer(Bn.buffer),Ia="type"in Bn?zi[Bn.type]:bn.dtype,qn=!!Bn.normalized,Xi=Bn.size|0,yn=Bn.offset|0,Ya=Bn.stride|0,ba=Bn.divisor|0)),Da=At.state,At.state=ya,Aa=At.x,At.x=on,Ln=At.y,At.y=mn,wo=At.z,At.z=Ga,wa=At.w,At.w=ca,$i=At.buffer,At.buffer=bn,ea=At.size,At.size=Xi,Sa=At.normalized,At.normalized=qn,Za=At.type,At.type=Ia,xo=At.offset,At.offset=yn,Wa=At.stride,At.stride=Ya,hn=At.divisor,At.divisor=ba,Un=_.call(this,_e,sn,Or),Ss=!1,Kn=1,ns=0,Jo=0,vo=0,ma=0,ja=null,To=0,Ao=!1,la=5126,Ki=0,ho=0,Ka=0,vr(Un)?(Ss=!0,ja=ue.createStream(34962,Un),la=ja.dtype):(ja=ue.getBuffer(Un),ja?la=ja.dtype:"constant"in Un?(Kn=2,typeof Un.constant=="number"?(ns=Un.constant,Jo=vo=ma=0):(ns=Un.constant.length>0?Un.constant[0]:0,Jo=Un.constant.length>1?Un.constant[1]:0,vo=Un.constant.length>2?Un.constant[2]:0,ma=Un.constant.length>3?Un.constant[3]:0)):(vr(Un.buffer)?ja=ue.createStream(34962,Un.buffer):ja=ue.getBuffer(Un.buffer),la="type"in Un?zi[Un.type]:ja.dtype,Ao=!!Un.normalized,To=Un.size|0,Ki=Un.offset|0,ho=Un.stride|0,Ka=Un.divisor|0)),Ca=Te.state,Te.state=Kn,ta=Te.x,Te.x=ns,En=Te.y,Te.y=Jo,Mo=Te.z,Te.z=vo,Ds=Te.w,Te.w=ma,Ro=Te.buffer,Te.buffer=ja,vs=Te.size,Te.size=To,Ks=Te.normalized,Te.normalized=Ao,as=Te.type,Te.type=la,Jn=Te.offset,Te.offset=Ki,Cs=Te.stride,Te.stride=ho,Xa=Te.divisor,Te.divisor=Ka,Zo=A.call(this,_e,sn,Or),Eo=!1,lo=1,$a=0,Xo=0,rs=0,$n=0,Sn=null,uo=0,Rs=!1,xs=5126,Go=0,os=0,So=0,vr(Zo)?(Eo=!0,Sn=ue.createStream(34962,Zo),xs=Sn.dtype):(Sn=ue.getBuffer(Zo),Sn?xs=Sn.dtype:"constant"in Zo?(lo=2,typeof Zo.constant=="number"?($a=Zo.constant,Xo=rs=$n=0):($a=Zo.constant.length>0?Zo.constant[0]:0,Xo=Zo.constant.length>1?Zo.constant[1]:0,rs=Zo.constant.length>2?Zo.constant[2]:0,$n=Zo.constant.length>3?Zo.constant[3]:0)):(vr(Zo.buffer)?Sn=ue.createStream(34962,Zo.buffer):Sn=ue.getBuffer(Zo.buffer),xs="type"in Zo?zi[Zo.type]:Sn.dtype,Rs=!!Zo.normalized,uo=Zo.size|0,Go=Zo.offset|0,os=Zo.stride|0,So=Zo.divisor|0)),Qn=nt.state,nt.state=lo,zo=nt.x,nt.x=$a,rl=nt.y,nt.y=Xo,$o=nt.z,nt.z=rs,Na=nt.w,nt.w=$n,Ua=nt.buffer,nt.buffer=Sn,Po=nt.size,nt.size=uo,fo=nt.normalized,nt.normalized=Rs,ro=nt.type,nt.type=xs,Ma=nt.offset,nt.offset=Go,io=nt.stride,nt.stride=os,aa=nt.divisor,nt.divisor=So,Oo=M.call(this,_e,sn,Or),No=!1,Zs=1,Fs=0,ws=0,no=0,Ls=0,ds=null,Xs=0,oa=!1,Yo=5126,po=0,ss=0,ls=0,vr(Oo)?(No=!0,ds=ue.createStream(34962,Oo),Yo=ds.dtype):(ds=ue.getBuffer(Oo),ds?Yo=ds.dtype:"constant"in Oo?(Zs=2,typeof Oo.constant=="number"?(Fs=Oo.constant,ws=no=Ls=0):(Fs=Oo.constant.length>0?Oo.constant[0]:0,ws=Oo.constant.length>1?Oo.constant[1]:0,no=Oo.constant.length>2?Oo.constant[2]:0,Ls=Oo.constant.length>3?Oo.constant[3]:0)):(vr(Oo.buffer)?ds=ue.createStream(34962,Oo.buffer):ds=ue.getBuffer(Oo.buffer),Yo="type"in Oo?zi[Oo.type]:ds.dtype,oa=!!Oo.normalized,Xs=Oo.size|0,po=Oo.offset|0,ss=Oo.stride|0,ls=Oo.divisor|0)),gs=ut.state,ut.state=Zs,bt=ut.x,ut.x=Fs,Ft=ut.y,ut.y=ws,hr=ut.z,ut.z=no,nr=ut.w,ut.w=Ls,Sr=ut.buffer,ut.buffer=ds,li=ut.size,ut.size=Xs,di=ut.normalized,ut.normalized=oa,mi=ut.type,ut.type=Yo,Oi=ut.offset,ut.offset=po,dn=ut.stride,ut.stride=ss,wi=ut.divisor,ut.divisor=ls,ui=b.call(this,_e,sn,Or),Ai=!1,gi=1,gn=0,In=0,Vn=0,Rn=0,Hn=null,Gn=0,pn=!1,Lo=5126,us=0,Bs=0,Js=0,vr(ui)?(Ai=!0,Hn=ue.createStream(34962,ui),Lo=Hn.dtype):(Hn=ue.getBuffer(ui),Hn?Lo=Hn.dtype:"constant"in ui?(gi=2,typeof ui.constant=="number"?(gn=ui.constant,In=Vn=Rn=0):(gn=ui.constant.length>0?ui.constant[0]:0,In=ui.constant.length>1?ui.constant[1]:0,Vn=ui.constant.length>2?ui.constant[2]:0,Rn=ui.constant.length>3?ui.constant[3]:0)):(vr(ui.buffer)?Hn=ue.createStream(34962,ui.buffer):Hn=ue.getBuffer(ui.buffer),Lo="type"in ui?zi[ui.type]:Hn.dtype,pn=!!ui.normalized,Gn=ui.size|0,us=ui.offset|0,Bs=ui.stride|0,Js=ui.divisor|0)),ol=ct.state,ct.state=gi,Cl=ct.x,ct.x=gn,ul=ct.y,ct.y=In,Gl=ct.z,ct.z=Vn,Vl=ct.w,ct.w=Rn,Fl=ct.buffer,ct.buffer=Hn,ga=ct.size,ct.size=Gn,ko=ct.normalized,ct.normalized=pn,zs=ct.type,ct.type=Lo,Fo=ct.offset,ct.offset=us,Ys=ct.stride,ct.stride=Bs,Gs=ct.divisor,ct.divisor=Js,Us=f.call(this,_e,sn,Or),Sl=!1,_l=1,kl=0,cl=0,xl=0,Uo=0,_s=null,Bl=0,Il=!1,Dl=5126,oe=0,w=0,B=0,vr(Us)?(Sl=!0,_s=ue.createStream(34962,Us),Dl=_s.dtype):(_s=ue.getBuffer(Us),_s?Dl=_s.dtype:"constant"in Us?(_l=2,typeof Us.constant=="number"?(kl=Us.constant,cl=xl=Uo=0):(kl=Us.constant.length>0?Us.constant[0]:0,cl=Us.constant.length>1?Us.constant[1]:0,xl=Us.constant.length>2?Us.constant[2]:0,Uo=Us.constant.length>3?Us.constant[3]:0)):(vr(Us.buffer)?_s=ue.createStream(34962,Us.buffer):_s=ue.getBuffer(Us.buffer),Dl="type"in Us?zi[Us.type]:_s.dtype,Il=!!Us.normalized,Bl=Us.size|0,oe=Us.offset|0,w=Us.stride|0,B=Us.divisor|0)),Q=rt.state,rt.state=_l,ee=rt.x,rt.x=kl,le=rt.y,rt.y=cl,Ne=rt.z,rt.z=xl,$e=rt.w,rt.w=Uo,pt=rt.buffer,rt.buffer=_s,zt=rt.size,rt.size=Bl,Yt=rt.normalized,rt.normalized=Il,Jt=rt.type,rt.type=Dl,yr=rt.offset,rt.offset=oe,Ir=rt.stride,rt.stride=w,ce=rt.divisor,rt.divisor=B,Ae=h.call(this,_e,sn,Or),qe=!1,Ve=1,ot=0,Ke=0,ft=0,qt=0,Xt=null,$t=0,dr=!1,Mr=5126,$r=0,ii=0,pi=0,vr(Ae)?(qe=!0,Xt=ue.createStream(34962,Ae),Mr=Xt.dtype):(Xt=ue.getBuffer(Ae),Xt?Mr=Xt.dtype:"constant"in Ae?(Ve=2,typeof Ae.constant=="number"?(ot=Ae.constant,Ke=ft=qt=0):(ot=Ae.constant.length>0?Ae.constant[0]:0,Ke=Ae.constant.length>1?Ae.constant[1]:0,ft=Ae.constant.length>2?Ae.constant[2]:0,qt=Ae.constant.length>3?Ae.constant[3]:0)):(vr(Ae.buffer)?Xt=ue.createStream(34962,Ae.buffer):Xt=ue.getBuffer(Ae.buffer),Mr="type"in Ae?zi[Ae.type]:Xt.dtype,dr=!!Ae.normalized,$t=Ae.size|0,$r=Ae.offset|0,ii=Ae.stride|0,pi=Ae.divisor|0)),Yi=je.state,je.state=Ve,wn=je.x,je.x=ot,Tn=je.y,je.y=Ke,ua=je.z,je.z=ft,oo=je.w,je.w=qt,el=je.buffer,je.buffer=Xt,ys=je.size,je.size=$t,il=je.normalized,je.normalized=dr,$l=je.type,je.type=Mr,pl=je.offset,je.offset=$r,Hl=je.stride,je.stride=ii,Ll=je.divisor,je.divisor=pi,Ql=u.call(this,_e,sn,Or),ku=!1,Jl=1,Kl=0,Hu=0,tf=0,Ku=0,Gu=null,Wu=0,sf=!1,gf=5126,nf=0,af=0,X=0,vr(Ql)?(ku=!0,Gu=ue.createStream(34962,Ql),gf=Gu.dtype):(Gu=ue.getBuffer(Ql),Gu?gf=Gu.dtype:"constant"in Ql?(Jl=2,typeof Ql.constant=="number"?(Kl=Ql.constant,Hu=tf=Ku=0):(Kl=Ql.constant.length>0?Ql.constant[0]:0,Hu=Ql.constant.length>1?Ql.constant[1]:0,tf=Ql.constant.length>2?Ql.constant[2]:0,Ku=Ql.constant.length>3?Ql.constant[3]:0)):(vr(Ql.buffer)?Gu=ue.createStream(34962,Ql.buffer):Gu=ue.getBuffer(Ql.buffer),gf="type"in Ql?zi[Ql.type]:Gu.dtype,sf=!!Ql.normalized,Wu=Ql.size|0,nf=Ql.offset|0,af=Ql.stride|0,X=Ql.divisor|0)),se=tt.state,tt.state=Jl,Le=tt.x,tt.x=Kl,We=tt.y,tt.y=Hu,Ye=tt.z,tt.z=tf,it=tt.w,tt.w=Ku,Nt=tt.buffer,tt.buffer=Gu,mt=tt.size,tt.size=Wu,er=tt.normalized,tt.normalized=sf,_r=tt.type,tt.type=gf,wr=tt.offset,tt.offset=nf,ni=tt.stride,tt.stride=af,Wr=tt.divisor,tt.divisor=X,Ci=p.call(this,_e,sn,Or),Ji=!1,ai=1,Ti=0,Bi=0,en=0,Wi=0,bi=null,ao=0,yo=!1,Ko=5126,Ms=0,vl=0,wl=0,vr(Ci)?(Ji=!0,bi=ue.createStream(34962,Ci),Ko=bi.dtype):(bi=ue.getBuffer(Ci),bi?Ko=bi.dtype:"constant"in Ci?(ai=2,typeof Ci.constant=="number"?(Ti=Ci.constant,Bi=en=Wi=0):(Ti=Ci.constant.length>0?Ci.constant[0]:0,Bi=Ci.constant.length>1?Ci.constant[1]:0,en=Ci.constant.length>2?Ci.constant[2]:0,Wi=Ci.constant.length>3?Ci.constant[3]:0)):(vr(Ci.buffer)?bi=ue.createStream(34962,Ci.buffer):bi=ue.getBuffer(Ci.buffer),Ko="type"in Ci?zi[Ci.type]:bi.dtype,yo=!!Ci.normalized,ao=Ci.size|0,Ms=Ci.offset|0,vl=Ci.stride|0,wl=Ci.divisor|0)),au=Je.state,Je.state=ai,Al=Je.x,Je.x=Ti,nu=Je.y,Je.y=Bi,Bu=Je.z,Je.z=en,qu=Je.w,Je.w=Wi,Ju=Je.buffer,Je.buffer=bi,qo=Je.size,Je.size=ao,Rl=Je.normalized,Je.normalized=yo,pu=Je.type,Je.type=Ko,xu=Je.offset,Je.offset=Ms,of=Je.stride,Je.stride=vl,ff=Je.divisor,Je.divisor=wl,xf=de.vert,de.vert=Mt,hf=de.frag,de.frag=Vt,Ie.dirty=!0,fi(_e,sn,Or),_e.viewportWidth=hi,_e.viewportHeight=Gi,Yr[0]=Qr,Yr[1]=Ui,Yr[2]=zn,Yr[3]=fn,Er[0]=xn,Er[1]=_a,Er[2]=Wn,Er[3]=Fn,Pe.blend_enable=ia,xi[0]=za,xi[1]=Hr,xi[2]=na,xi[3]=go,Pe.depth_enable=Dn,vi[0]=Ea,vi[1]=Ha,vi[2]=tn,vi[3]=Cn,Pe.scissor_enable=Xn,Pe.stencil_enable=ts,Ja&&(r.cpuTime+=performance.now()-to),cs&&ye.destroyStream(an),lt.elements=pa,lt.offset=ka,lt.count=bo,lt.primitive=Co,St[Ze]=Fi,St[gt]=Yn,St[Pt]=Qi,St[Qe]=Pn,St[Xe]=jo,St[Tt]=Pa,St[xt]=co,St[_t]=_o,St[Ct]=bs,St[jt]=sa,ms&&ue.destroyStream(bn),At.state=Da,At.x=Aa,At.y=Ln,At.z=wo,At.w=wa,At.buffer=$i,At.size=ea,At.normalized=Sa,At.type=Za,At.offset=xo,At.stride=Wa,At.divisor=hn,Ss&&ue.destroyStream(ja),Te.state=Ca,Te.x=ta,Te.y=En,Te.z=Mo,Te.w=Ds,Te.buffer=Ro,Te.size=vs,Te.normalized=Ks,Te.type=as,Te.offset=Jn,Te.stride=Cs,Te.divisor=Xa,Eo&&ue.destroyStream(Sn),nt.state=Qn,nt.x=zo,nt.y=rl,nt.z=$o,nt.w=Na,nt.buffer=Ua,nt.size=Po,nt.normalized=fo,nt.type=ro,nt.offset=Ma,nt.stride=io,nt.divisor=aa,No&&ue.destroyStream(ds),ut.state=gs,ut.x=bt,ut.y=Ft,ut.z=hr,ut.w=nr,ut.buffer=Sr,ut.size=li,ut.normalized=di,ut.type=mi,ut.offset=Oi,ut.stride=dn,ut.divisor=wi,Ai&&ue.destroyStream(Hn),ct.state=ol,ct.x=Cl,ct.y=ul,ct.z=Gl,ct.w=Vl,ct.buffer=Fl,ct.size=ga,ct.normalized=ko,ct.type=zs,ct.offset=Fo,ct.stride=Ys,ct.divisor=Gs,Sl&&ue.destroyStream(_s),rt.state=Q,rt.x=ee,rt.y=le,rt.z=Ne,rt.w=$e,rt.buffer=pt,rt.size=zt,rt.normalized=Yt,rt.type=Jt,rt.offset=yr,rt.stride=Ir,rt.divisor=ce,qe&&ue.destroyStream(Xt),je.state=Yi,je.x=wn,je.y=Tn,je.z=ua,je.w=oo,je.buffer=el,je.size=ys,je.normalized=il,je.type=$l,je.offset=pl,je.stride=Hl,je.divisor=Ll,ku&&ue.destroyStream(Gu),tt.state=se,tt.x=Le,tt.y=We,tt.z=Ye,tt.w=it,tt.buffer=Nt,tt.size=mt,tt.normalized=er,tt.type=_r,tt.offset=wr,tt.stride=ni,tt.divisor=Wr,Ji&&ue.destroyStream(bi),Je.state=au,Je.x=Al,Je.y=nu,Je.z=Bu,Je.w=qu,Je.buffer=Ju,Je.size=qo,Je.normalized=Rl,Je.type=pu,Je.offset=xu,Je.stride=of,Je.divisor=ff,de.vert=xf,de.frag=hf,Ie.dirty=!0},batch:function(sn,fi){var Or,st,Wt,tr,or,Nr,hi;if(Or=qr.angle_instanced_arrays,st=Zt.next,st!==Zt.cur&&(st?De.bindFramebuffer(36160,st.framebuffer):De.bindFramebuffer(36160,null),Zt.cur=st),Ie.dirty){var Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka;Gi=Pe.dither,Gi!==Ie.dither&&(Gi?De.enable(3024):De.disable(3024),Ie.dither=Gi),Qr=Ei[0],Ui=Ei[1],(Qr!==Si[0]||Ui!==Si[1])&&(De.blendEquationSeparate(Qr,Ui),Si[0]=Qr,Si[1]=Ui),zn=Pe.depth_func,zn!==Ie.depth_func&&(De.depthFunc(zn),Ie.depth_func=zn),fn=Jr[0],xn=Jr[1],(fn!==ci[0]||xn!==ci[1])&&(De.depthRange(fn,xn),ci[0]=fn,ci[1]=xn),_a=Pe.depth_mask,_a!==Ie.depth_mask&&(De.depthMask(_a),Ie.depth_mask=_a),Wn=Di[0],Fn=Di[1],ia=Di[2],za=Di[3],(Wn!==Lt[0]||Fn!==Lt[1]||ia!==Lt[2]||za!==Lt[3])&&(De.colorMask(Wn,Fn,ia,za),Lt[0]=Wn,Lt[1]=Fn,Lt[2]=ia,Lt[3]=za),Hr=Pe.cull_enable,Hr!==Ie.cull_enable&&(Hr?De.enable(2884):De.disable(2884),Ie.cull_enable=Hr),na=Pe.cull_face,na!==Ie.cull_face&&(De.cullFace(na),Ie.cull_face=na),go=Pe.frontFace,go!==Ie.frontFace&&(De.frontFace(go),Ie.frontFace=go),Dn=Pe.lineWidth,Dn!==Ie.lineWidth&&(De.lineWidth(Dn),Ie.lineWidth=Dn),un=Pe.polygonOffset_enable,un!==Ie.polygonOffset_enable&&(un?De.enable(32823):De.disable(32823),Ie.polygonOffset_enable=un),Zn=vt[0],Wo=vt[1],(Zn!==Dt[0]||Wo!==Dt[1])&&(De.polygonOffset(Zn,Wo),Dt[0]=Zn,Dt[1]=Wo),Ba=Pe.sample_alpha,Ba!==Ie.sample_alpha&&(Ba?De.enable(32926):De.disable(32926),Ie.sample_alpha=Ba),Bo=Pe.sample_enable,Bo!==Ie.sample_enable&&(Bo?De.enable(32928):De.disable(32928),Ie.sample_enable=Bo),Ea=Bt[0],Ha=Bt[1],(Ea!==sr[0]||Ha!==sr[1])&&(De.sampleCoverage(Ea,Ha),sr[0]=Ea,sr[1]=Ha),tn=Pe.stencil_mask,tn!==Ie.stencil_mask&&(De.stencilMask(tn),Ie.stencil_mask=tn),Cn=br[0],Xn=br[1],ts=br[2],(Cn!==zr[0]||Xn!==zr[1]||ts!==zr[2])&&(De.stencilFunc(Cn,Xn,ts),zr[0]=Cn,zr[1]=Xn,zr[2]=ts),Ja=Tr[0],to=Tr[1],Ri=Tr[2],an=Tr[3],(Ja!==Rr[0]||to!==Rr[1]||Ri!==Rr[2]||an!==Rr[3])&&(De.stencilOpSeparate(Ja,to,Ri,an),Rr[0]=Ja,Rr[1]=to,Rr[2]=Ri,Rr[3]=an),cs=Br[0],pa=Br[1],ln=Br[2],ka=Br[3],(cs!==oi[0]||pa!==oi[1]||ln!==oi[2]||ka!==oi[3])&&(De.stencilOpSeparate(cs,pa,ln,ka),oi[0]=cs,oi[1]=pa,oi[2]=ln,oi[3]=ka)}De.blendColor(0,0,0,1),si[0]=0,si[1]=0,si[2]=0,si[3]=1,Kt?De.enable(3042):De.disable(3042),Ie.blend_enable=Kt,De.blendFuncSeparate(770,771,773,1),Hi[0]=770,Hi[1]=771,Hi[2]=773,Hi[3]=1,ir?De.enable(2929):De.disable(2929),Ie.depth_enable=ir,fr?De.enable(3089):De.disable(3089),Ie.scissor_enable=fr,Ot?De.enable(2960):De.disable(2960),Ie.stencil_enable=Ot,Wt=Ie.profile,Wt&&(tr=performance.now(),r.count+=fi),De.useProgram(s.program),or=qr.angle_instanced_arrays;var va;for(Et.setVAO(null),De.uniform1i(z.location,!1),De.uniform1i(H.location,j.bind()),va=lt.instances,Nr=0;Nr<fi;++Nr){hi=sn[Nr];var bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl;bo=hi.viewport,Co=bo.x|0,Fi=bo.y|0,Yn="width"in bo?bo.width|0:_e.framebufferWidth-Co,xa="height"in bo?bo.height|0:_e.framebufferHeight-Fi,Qi=_e.viewportWidth,_e.viewportWidth=Yn,Nn=_e.viewportHeight,_e.viewportHeight=xa,De.viewport(Co,Fi,Yn,xa),Ni[0]=Co,Ni[1]=Fi,Ni[2]=Yn,Ni[3]=xa,Pn=hi.viewport,qa=Pn.x|0,jo=Pn.y|0,Vo="width"in Pn?Pn.width|0:_e.framebufferWidth-qa,Pa="height"in Pn?Pn.height|0:_e.framebufferHeight-jo,De.scissor(qa,jo,Vo,Pa),Pi[0]=qa,Pi[1]=jo,Pi[2]=Vo,Pi[3]=Pa,Oa=u.call(this,_e,hi,Nr),co=!1,An=1,_o=0,ks=0,bs=0,ps=0,sa=null,Bn=0,ms=!1,ya=5126,on=0,mn=0,Ga=0,vr(Oa)?(co=!0,sa=ue.createStream(34962,Oa),ya=sa.dtype):(sa=ue.getBuffer(Oa),sa?ya=sa.dtype:"constant"in Oa?(An=2,typeof Oa.constant=="number"?(_o=Oa.constant,ks=bs=ps=0):(_o=Oa.constant.length>0?Oa.constant[0]:0,ks=Oa.constant.length>1?Oa.constant[1]:0,bs=Oa.constant.length>2?Oa.constant[2]:0,ps=Oa.constant.length>3?Oa.constant[3]:0)):(vr(Oa.buffer)?sa=ue.createStream(34962,Oa.buffer):sa=ue.getBuffer(Oa.buffer),ya="type"in Oa?zi[Oa.type]:sa.dtype,ms=!!Oa.normalized,Bn=Oa.size|0,on=Oa.offset|0,mn=Oa.stride|0,Ga=Oa.divisor|0)),ca=l.location,bn=ht[ca],An===1?(bn.buffer||De.enableVertexAttribArray(ca),Xi=Bn||4,(bn.type!==ya||bn.size!==Xi||bn.buffer!==sa||bn.normalized!==ms||bn.offset!==on||bn.stride!==mn)&&(De.bindBuffer(34962,sa.buffer),De.vertexAttribPointer(ca,Xi,ya,ms,mn,on),bn.type=ya,bn.size=Xi,bn.buffer=sa,bn.normalized=ms,bn.offset=on,bn.stride=mn),bn.divisor!==Ga&&(or.vertexAttribDivisorANGLE(ca,Ga),bn.divisor=Ga)):(bn.buffer&&(De.disableVertexAttribArray(ca),bn.buffer=null),(bn.x!==_o||bn.y!==ks||bn.z!==bs||bn.w!==ps)&&(De.vertexAttrib4f(ca,_o,ks,bs,ps),bn.x=_o,bn.y=ks,bn.z=bs,bn.w=ps)),qn=f.call(this,_e,hi,Nr),Ia=!1,yn=1,Ya=0,ba=0,Da=0,Aa=0,Ln=null,wo=0,wa=!1,$i=5126,ea=0,Sa=0,Za=0,vr(qn)?(Ia=!0,Ln=ue.createStream(34962,qn),$i=Ln.dtype):(Ln=ue.getBuffer(qn),Ln?$i=Ln.dtype:"constant"in qn?(yn=2,typeof qn.constant=="number"?(Ya=qn.constant,ba=Da=Aa=0):(Ya=qn.constant.length>0?qn.constant[0]:0,ba=qn.constant.length>1?qn.constant[1]:0,Da=qn.constant.length>2?qn.constant[2]:0,Aa=qn.constant.length>3?qn.constant[3]:0)):(vr(qn.buffer)?Ln=ue.createStream(34962,qn.buffer):Ln=ue.getBuffer(qn.buffer),$i="type"in qn?zi[qn.type]:Ln.dtype,wa=!!qn.normalized,wo=qn.size|0,ea=qn.offset|0,Sa=qn.stride|0,Za=qn.divisor|0)),xo=c.location,Wa=ht[xo],yn===1?(Wa.buffer||De.enableVertexAttribArray(xo),hn=wo||1,(Wa.type!==$i||Wa.size!==hn||Wa.buffer!==Ln||Wa.normalized!==wa||Wa.offset!==ea||Wa.stride!==Sa)&&(De.bindBuffer(34962,Ln.buffer),De.vertexAttribPointer(xo,hn,$i,wa,Sa,ea),Wa.type=$i,Wa.size=hn,Wa.buffer=Ln,Wa.normalized=wa,Wa.offset=ea,Wa.stride=Sa),Wa.divisor!==Za&&(or.vertexAttribDivisorANGLE(xo,Za),Wa.divisor=Za)):(Wa.buffer&&(De.disableVertexAttribArray(xo),Wa.buffer=null),(Wa.x!==Ya||Wa.y!==ba||Wa.z!==Da||Wa.w!==Aa)&&(De.vertexAttrib4f(xo,Ya,ba,Da,Aa),Wa.x=Ya,Wa.y=ba,Wa.z=Da,Wa.w=Aa)),Un=h.call(this,_e,hi,Nr),Ss=!1,Kn=1,ns=0,Jo=0,vo=0,ma=0,ja=null,To=0,Ao=!1,la=5126,Ki=0,ho=0,Ka=0,vr(Un)?(Ss=!0,ja=ue.createStream(34962,Un),la=ja.dtype):(ja=ue.getBuffer(Un),ja?la=ja.dtype:"constant"in Un?(Kn=2,typeof Un.constant=="number"?(ns=Un.constant,Jo=vo=ma=0):(ns=Un.constant.length>0?Un.constant[0]:0,Jo=Un.constant.length>1?Un.constant[1]:0,vo=Un.constant.length>2?Un.constant[2]:0,ma=Un.constant.length>3?Un.constant[3]:0)):(vr(Un.buffer)?ja=ue.createStream(34962,Un.buffer):ja=ue.getBuffer(Un.buffer),la="type"in Un?zi[Un.type]:ja.dtype,Ao=!!Un.normalized,To=Un.size|0,Ki=Un.offset|0,ho=Un.stride|0,Ka=Un.divisor|0)),Ca=d.location,ta=ht[Ca],Kn===1?(ta.buffer||De.enableVertexAttribArray(Ca),En=To||4,(ta.type!==la||ta.size!==En||ta.buffer!==ja||ta.normalized!==Ao||ta.offset!==Ki||ta.stride!==ho)&&(De.bindBuffer(34962,ja.buffer),De.vertexAttribPointer(Ca,En,la,Ao,ho,Ki),ta.type=la,ta.size=En,ta.buffer=ja,ta.normalized=Ao,ta.offset=Ki,ta.stride=ho),ta.divisor!==Ka&&(or.vertexAttribDivisorANGLE(Ca,Ka),ta.divisor=Ka)):(ta.buffer&&(De.disableVertexAttribArray(Ca),ta.buffer=null),(ta.x!==ns||ta.y!==Jo||ta.z!==vo||ta.w!==ma)&&(De.vertexAttrib4f(Ca,ns,Jo,vo,ma),ta.x=ns,ta.y=Jo,ta.z=vo,ta.w=ma)),Mo=p.call(this,_e,hi,Nr),Ds=!1,Ro=1,vs=0,Ks=0,as=0,Jn=0,Cs=null,Xa=0,Zo=!1,Eo=5126,lo=0,$a=0,Xo=0,vr(Mo)?(Ds=!0,Cs=ue.createStream(34962,Mo),Eo=Cs.dtype):(Cs=ue.getBuffer(Mo),Cs?Eo=Cs.dtype:"constant"in Mo?(Ro=2,typeof Mo.constant=="number"?(vs=Mo.constant,Ks=as=Jn=0):(vs=Mo.constant.length>0?Mo.constant[0]:0,Ks=Mo.constant.length>1?Mo.constant[1]:0,as=Mo.constant.length>2?Mo.constant[2]:0,Jn=Mo.constant.length>3?Mo.constant[3]:0)):(vr(Mo.buffer)?Cs=ue.createStream(34962,Mo.buffer):Cs=ue.getBuffer(Mo.buffer),Eo="type"in Mo?zi[Mo.type]:Cs.dtype,Zo=!!Mo.normalized,Xa=Mo.size|0,lo=Mo.offset|0,$a=Mo.stride|0,Xo=Mo.divisor|0)),rs=x.location,$n=ht[rs],Ro===1?($n.buffer||De.enableVertexAttribArray(rs),Sn=Xa||1,($n.type!==Eo||$n.size!==Sn||$n.buffer!==Cs||$n.normalized!==Zo||$n.offset!==lo||$n.stride!==$a)&&(De.bindBuffer(34962,Cs.buffer),De.vertexAttribPointer(rs,Sn,Eo,Zo,$a,lo),$n.type=Eo,$n.size=Sn,$n.buffer=Cs,$n.normalized=Zo,$n.offset=lo,$n.stride=$a),$n.divisor!==Xo&&(or.vertexAttribDivisorANGLE(rs,Xo),$n.divisor=Xo)):($n.buffer&&(De.disableVertexAttribArray(rs),$n.buffer=null),($n.x!==vs||$n.y!==Ks||$n.z!==as||$n.w!==Jn)&&(De.vertexAttrib4f(rs,vs,Ks,as,Jn),$n.x=vs,$n.y=Ks,$n.z=as,$n.w=Jn)),uo=b.call(this,_e,hi,Nr),Rs=!1,xs=1,Go=0,os=0,So=0,Qn=0,zo=null,rl=0,$o=!1,Na=5126,Ua=0,Po=0,fo=0,vr(uo)?(Rs=!0,zo=ue.createStream(34962,uo),Na=zo.dtype):(zo=ue.getBuffer(uo),zo?Na=zo.dtype:"constant"in uo?(xs=2,typeof uo.constant=="number"?(Go=uo.constant,os=So=Qn=0):(Go=uo.constant.length>0?uo.constant[0]:0,os=uo.constant.length>1?uo.constant[1]:0,So=uo.constant.length>2?uo.constant[2]:0,Qn=uo.constant.length>3?uo.constant[3]:0)):(vr(uo.buffer)?zo=ue.createStream(34962,uo.buffer):zo=ue.getBuffer(uo.buffer),Na="type"in uo?zi[uo.type]:zo.dtype,$o=!!uo.normalized,rl=uo.size|0,Ua=uo.offset|0,Po=uo.stride|0,fo=uo.divisor|0)),ro=y.location,Ma=ht[ro],xs===1?(Ma.buffer||De.enableVertexAttribArray(ro),io=rl||1,(Ma.type!==Na||Ma.size!==io||Ma.buffer!==zo||Ma.normalized!==$o||Ma.offset!==Ua||Ma.stride!==Po)&&(De.bindBuffer(34962,zo.buffer),De.vertexAttribPointer(ro,io,Na,$o,Po,Ua),Ma.type=Na,Ma.size=io,Ma.buffer=zo,Ma.normalized=$o,Ma.offset=Ua,Ma.stride=Po),Ma.divisor!==fo&&(or.vertexAttribDivisorANGLE(ro,fo),Ma.divisor=fo)):(Ma.buffer&&(De.disableVertexAttribArray(ro),Ma.buffer=null),(Ma.x!==Go||Ma.y!==os||Ma.z!==So||Ma.w!==Qn)&&(De.vertexAttrib4f(ro,Go,os,So,Qn),Ma.x=Go,Ma.y=os,Ma.z=So,Ma.w=Qn)),aa=k.call(this,_e,hi,Nr),Oo=!1,No=1,Zs=0,Fs=0,ws=0,no=0,Ls=null,ds=0,Xs=!1,oa=5126,Yo=0,po=0,ss=0,vr(aa)?(Oo=!0,Ls=ue.createStream(34962,aa),oa=Ls.dtype):(Ls=ue.getBuffer(aa),Ls?oa=Ls.dtype:"constant"in aa?(No=2,typeof aa.constant=="number"?(Zs=aa.constant,Fs=ws=no=0):(Zs=aa.constant.length>0?aa.constant[0]:0,Fs=aa.constant.length>1?aa.constant[1]:0,ws=aa.constant.length>2?aa.constant[2]:0,no=aa.constant.length>3?aa.constant[3]:0)):(vr(aa.buffer)?Ls=ue.createStream(34962,aa.buffer):Ls=ue.getBuffer(aa.buffer),oa="type"in aa?zi[aa.type]:Ls.dtype,Xs=!!aa.normalized,ds=aa.size|0,Yo=aa.offset|0,po=aa.stride|0,ss=aa.divisor|0)),ls=E.location,gs=ht[ls],No===1?(gs.buffer||De.enableVertexAttribArray(ls),bt=ds||1,(gs.type!==oa||gs.size!==bt||gs.buffer!==Ls||gs.normalized!==Xs||gs.offset!==Yo||gs.stride!==po)&&(De.bindBuffer(34962,Ls.buffer),De.vertexAttribPointer(ls,bt,oa,Xs,po,Yo),gs.type=oa,gs.size=bt,gs.buffer=Ls,gs.normalized=Xs,gs.offset=Yo,gs.stride=po),gs.divisor!==ss&&(or.vertexAttribDivisorANGLE(ls,ss),gs.divisor=ss)):(gs.buffer&&(De.disableVertexAttribArray(ls),gs.buffer=null),(gs.x!==Zs||gs.y!==Fs||gs.z!==ws||gs.w!==no)&&(De.vertexAttrib4f(ls,Zs,Fs,ws,no),gs.x=Zs,gs.y=Fs,gs.z=ws,gs.w=no)),Ft=A.call(this,_e,hi,Nr),hr=!1,nr=1,Sr=0,li=0,di=0,mi=0,Oi=null,dn=0,wi=!1,ui=5126,Ai=0,gi=0,gn=0,vr(Ft)?(hr=!0,Oi=ue.createStream(34962,Ft),ui=Oi.dtype):(Oi=ue.getBuffer(Ft),Oi?ui=Oi.dtype:"constant"in Ft?(nr=2,typeof Ft.constant=="number"?(Sr=Ft.constant,li=di=mi=0):(Sr=Ft.constant.length>0?Ft.constant[0]:0,li=Ft.constant.length>1?Ft.constant[1]:0,di=Ft.constant.length>2?Ft.constant[2]:0,mi=Ft.constant.length>3?Ft.constant[3]:0)):(vr(Ft.buffer)?Oi=ue.createStream(34962,Ft.buffer):Oi=ue.getBuffer(Ft.buffer),ui="type"in Ft?zi[Ft.type]:Oi.dtype,wi=!!Ft.normalized,dn=Ft.size|0,Ai=Ft.offset|0,gi=Ft.stride|0,gn=Ft.divisor|0)),In=L.location,Vn=ht[In],nr===1?(Vn.buffer||De.enableVertexAttribArray(In),Rn=dn||1,(Vn.type!==ui||Vn.size!==Rn||Vn.buffer!==Oi||Vn.normalized!==wi||Vn.offset!==Ai||Vn.stride!==gi)&&(De.bindBuffer(34962,Oi.buffer),De.vertexAttribPointer(In,Rn,ui,wi,gi,Ai),Vn.type=ui,Vn.size=Rn,Vn.buffer=Oi,Vn.normalized=wi,Vn.offset=Ai,Vn.stride=gi),Vn.divisor!==gn&&(or.vertexAttribDivisorANGLE(In,gn),Vn.divisor=gn)):(Vn.buffer&&(De.disableVertexAttribArray(In),Vn.buffer=null),(Vn.x!==Sr||Vn.y!==li||Vn.z!==di||Vn.w!==mi)&&(De.vertexAttrib4f(In,Sr,li,di,mi),Vn.x=Sr,Vn.y=li,Vn.z=di,Vn.w=mi)),Hn=_.call(this,_e,hi,Nr),Gn=!1,pn=1,Lo=0,us=0,Bs=0,Js=0,ol=null,Cl=0,ul=!1,Gl=5126,Vl=0,Fl=0,ga=0,vr(Hn)?(Gn=!0,ol=ue.createStream(34962,Hn),Gl=ol.dtype):(ol=ue.getBuffer(Hn),ol?Gl=ol.dtype:"constant"in Hn?(pn=2,typeof Hn.constant=="number"?(Lo=Hn.constant,us=Bs=Js=0):(Lo=Hn.constant.length>0?Hn.constant[0]:0,us=Hn.constant.length>1?Hn.constant[1]:0,Bs=Hn.constant.length>2?Hn.constant[2]:0,Js=Hn.constant.length>3?Hn.constant[3]:0)):(vr(Hn.buffer)?ol=ue.createStream(34962,Hn.buffer):ol=ue.getBuffer(Hn.buffer),Gl="type"in Hn?zi[Hn.type]:ol.dtype,ul=!!Hn.normalized,Cl=Hn.size|0,Vl=Hn.offset|0,Fl=Hn.stride|0,ga=Hn.divisor|0)),ko=C.location,zs=ht[ko],pn===1?(zs.buffer||De.enableVertexAttribArray(ko),Fo=Cl||1,(zs.type!==Gl||zs.size!==Fo||zs.buffer!==ol||zs.normalized!==ul||zs.offset!==Vl||zs.stride!==Fl)&&(De.bindBuffer(34962,ol.buffer),De.vertexAttribPointer(ko,Fo,Gl,ul,Fl,Vl),zs.type=Gl,zs.size=Fo,zs.buffer=ol,zs.normalized=ul,zs.offset=Vl,zs.stride=Fl),zs.divisor!==ga&&(or.vertexAttribDivisorANGLE(ko,ga),zs.divisor=ga)):(zs.buffer&&(De.disableVertexAttribArray(ko),zs.buffer=null),(zs.x!==Lo||zs.y!==us||zs.z!==Bs||zs.w!==Js)&&(De.vertexAttrib4f(ko,Lo,us,Bs,Js),zs.x=Lo,zs.y=us,zs.z=Bs,zs.w=Js)),Ys=M.call(this,_e,hi,Nr),Gs=!1,Us=1,Sl=0,_l=0,kl=0,cl=0,xl=null,Uo=0,_s=!1,Bl=5126,Il=0,Dl=0,oe=0,vr(Ys)?(Gs=!0,xl=ue.createStream(34962,Ys),Bl=xl.dtype):(xl=ue.getBuffer(Ys),xl?Bl=xl.dtype:"constant"in Ys?(Us=2,typeof Ys.constant=="number"?(Sl=Ys.constant,_l=kl=cl=0):(Sl=Ys.constant.length>0?Ys.constant[0]:0,_l=Ys.constant.length>1?Ys.constant[1]:0,kl=Ys.constant.length>2?Ys.constant[2]:0,cl=Ys.constant.length>3?Ys.constant[3]:0)):(vr(Ys.buffer)?xl=ue.createStream(34962,Ys.buffer):xl=ue.getBuffer(Ys.buffer),Bl="type"in Ys?zi[Ys.type]:xl.dtype,_s=!!Ys.normalized,Uo=Ys.size|0,Il=Ys.offset|0,Dl=Ys.stride|0,oe=Ys.divisor|0)),w=v.location,B=ht[w],Us===1?(B.buffer||De.enableVertexAttribArray(w),Q=Uo||1,(B.type!==Bl||B.size!==Q||B.buffer!==xl||B.normalized!==_s||B.offset!==Il||B.stride!==Dl)&&(De.bindBuffer(34962,xl.buffer),De.vertexAttribPointer(w,Q,Bl,_s,Dl,Il),B.type=Bl,B.size=Q,B.buffer=xl,B.normalized=_s,B.offset=Il,B.stride=Dl),B.divisor!==oe&&(or.vertexAttribDivisorANGLE(w,oe),B.divisor=oe)):(B.buffer&&(De.disableVertexAttribArray(w),B.buffer=null),(B.x!==Sl||B.y!==_l||B.z!==kl||B.w!==cl)&&(De.vertexAttrib4f(w,Sl,_l,kl,cl),B.x=Sl,B.y=_l,B.z=kl,B.w=cl)),ee=hi.markerTexture,ee&&ee._reglType==="framebuffer"&&(ee=ee.color[0]),le=ee._texture,De.uniform1i(T.location,le.bind()),Ne=hi.opacity,(!Nr||$e!==Ne)&&($e=Ne,De.uniform1f(F.location,Ne)),pt=U.call(this,_e,hi,Nr),zt=pt[0],Jt=pt[1],(!Nr||Yt!==zt||yr!==Jt)&&(Yt=zt,yr=Jt,De.uniform2f(q.location,zt,Jt)),Ir=_e.pixelRatio,(!Nr||ce!==Ir)&&(ce=Ir,De.uniform1f(G.location,Ir)),Ae=hi.scale,qe=Ae[0],ot=Ae[1],(!Nr||Ve!==qe||Ke!==ot)&&(Ve=qe,Ke=ot,De.uniform2f(O.location,qe,ot)),ft=hi.scaleFract,qt=ft[0],$t=ft[1],(!Nr||Xt!==qt||dr!==$t)&&(Xt=qt,dr=$t,De.uniform2f(W.location,qt,$t)),Mr=hi.translate,$r=Mr[0],pi=Mr[1],(!Nr||ii!==$r||Yi!==pi)&&(ii=$r,Yi=pi,De.uniform2f(re.location,$r,pi)),wn=hi.translateFract,Tn=wn[0],oo=wn[1],(!Nr||ua!==Tn||el!==oo)&&(ua=Tn,el=oo,De.uniform2f(ne.location,Tn,oo)),ys=hi.elements,il=null,$l=vr(ys),$l?il=ye.createStream(ys):il=ye.getElements(ys),il&&De.bindBuffer(34963,il.buffer.buffer),pl=hi.offset,Hl=hi.count,Hl&&(va>0?il?or.drawElementsInstancedANGLE(0,Hl,il.type,pl<<(il.type-5121>>1),va):or.drawArraysInstancedANGLE(0,pl,Hl,va):va<0&&(il?De.drawElements(0,Hl,il.type,pl<<(il.type-5121>>1)):De.drawArrays(0,pl,Hl)),_e.viewportWidth=Qi,_e.viewportHeight=Nn,co&&ue.destroyStream(sa),Ia&&ue.destroyStream(Ln),Ss&&ue.destroyStream(ja),Ds&&ue.destroyStream(Cs),Rs&&ue.destroyStream(zo),Oo&&ue.destroyStream(Ls),hr&&ue.destroyStream(Oi),Gn&&ue.destroyStream(ol),Gs&&ue.destroyStream(xl),le.unbind(),$l&&ye.destroyStream(il))}j.unbind(),Ie.dirty=!0,Et.setVAO(null),Wt&&(r.cpuTime+=performance.now()-tr)}}}});var k9=Se((a1r,UOe)=>{UOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr){"use strict";var Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi;return Ot=t.gl,De=t.context,_e=t.strings,Fe=t.next,Pe=t.current,Ie=t.draw,lt=t.elements,ye=t.buffer,ue=t.shader,de=t.attributes,ht=t.vao,Et=t.uniforms,St=t.framebuffer,Zt=t.extensions,qr=t.timer,Lr=t.isBufferArgs,vr=Fe.blend_color,Er=Pe.blend_color,si=Fe.blend_equation,Ei=Pe.blend_equation,Si=Fe.blend_func,xi=Pe.blend_func,Hi=Fe.depth_range,Jr=Pe.depth_range,ci=Fe.colorMask,Di=Pe.colorMask,Lt=Fe.polygonOffset_offset,vt=Pe.polygonOffset_offset,Dt=Fe.sample_coverage,Bt=Pe.sample_coverage,sr=Fe.stencil_func,br=Pe.stencil_func,zr=Fe.stencil_opFront,Tr=Pe.stencil_opFront,Rr=Fe.stencil_opBack,Br=Pe.stencil_opBack,oi=Fe.scissor_box,vi=Pe.scissor_box,Pi=Fe.viewport,Yr=Pe.viewport,Ni={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ur={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},ti={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},ki={add:32774,subtract:32778,"reverse subtract":32779},ji={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Vi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},zi={cw:2304,ccw:2305},{draw:function(Mi){var sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys;if(sn=Zt.angle_instanced_arrays,fi=St.next,fi!==St.cur&&(fi?Ot.bindFramebuffer(36160,fi.framebuffer):Ot.bindFramebuffer(36160,null),St.cur=fi),Pe.dirty){var Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt;Gs=Fe.dither,Gs!==Pe.dither&&(Gs?Ot.enable(3024):Ot.disable(3024),Pe.dither=Gs),Us=si[0],Sl=si[1],(Us!==Ei[0]||Sl!==Ei[1])&&(Ot.blendEquationSeparate(Us,Sl),Ei[0]=Us,Ei[1]=Sl),_l=Fe.depth_func,_l!==Pe.depth_func&&(Ot.depthFunc(_l),Pe.depth_func=_l),kl=Hi[0],cl=Hi[1],(kl!==Jr[0]||cl!==Jr[1])&&(Ot.depthRange(kl,cl),Jr[0]=kl,Jr[1]=cl),xl=Fe.depth_mask,xl!==Pe.depth_mask&&(Ot.depthMask(xl),Pe.depth_mask=xl),Uo=ci[0],_s=ci[1],Bl=ci[2],Il=ci[3],(Uo!==Di[0]||_s!==Di[1]||Bl!==Di[2]||Il!==Di[3])&&(Ot.colorMask(Uo,_s,Bl,Il),Di[0]=Uo,Di[1]=_s,Di[2]=Bl,Di[3]=Il),Dl=Fe.cull_enable,Dl!==Pe.cull_enable&&(Dl?Ot.enable(2884):Ot.disable(2884),Pe.cull_enable=Dl),oe=Fe.cull_face,oe!==Pe.cull_face&&(Ot.cullFace(oe),Pe.cull_face=oe),w=Fe.frontFace,w!==Pe.frontFace&&(Ot.frontFace(w),Pe.frontFace=w),B=Fe.lineWidth,B!==Pe.lineWidth&&(Ot.lineWidth(B),Pe.lineWidth=B),Q=Fe.polygonOffset_enable,Q!==Pe.polygonOffset_enable&&(Q?Ot.enable(32823):Ot.disable(32823),Pe.polygonOffset_enable=Q),ee=Lt[0],le=Lt[1],(ee!==vt[0]||le!==vt[1])&&(Ot.polygonOffset(ee,le),vt[0]=ee,vt[1]=le),Ne=Fe.sample_alpha,Ne!==Pe.sample_alpha&&(Ne?Ot.enable(32926):Ot.disable(32926),Pe.sample_alpha=Ne),$e=Fe.sample_enable,$e!==Pe.sample_enable&&($e?Ot.enable(32928):Ot.disable(32928),Pe.sample_enable=$e),pt=Dt[0],zt=Dt[1],(pt!==Bt[0]||zt!==Bt[1])&&(Ot.sampleCoverage(pt,zt),Bt[0]=pt,Bt[1]=zt),Yt=Fe.stencil_mask,Yt!==Pe.stencil_mask&&(Ot.stencilMask(Yt),Pe.stencil_mask=Yt),Jt=sr[0],yr=sr[1],Ir=sr[2],(Jt!==br[0]||yr!==br[1]||Ir!==br[2])&&(Ot.stencilFunc(Jt,yr,Ir),br[0]=Jt,br[1]=yr,br[2]=Ir),ce=zr[0],Ae=zr[1],qe=zr[2],Ve=zr[3],(ce!==Tr[0]||Ae!==Tr[1]||qe!==Tr[2]||Ve!==Tr[3])&&(Ot.stencilOpSeparate(ce,Ae,qe,Ve),Tr[0]=ce,Tr[1]=Ae,Tr[2]=qe,Tr[3]=Ve),ot=Rr[0],Ke=Rr[1],ft=Rr[2],qt=Rr[3],(ot!==Br[0]||Ke!==Br[1]||ft!==Br[2]||qt!==Br[3])&&(Ot.stencilOpSeparate(ot,Ke,ft,qt),Br[0]=ot,Br[1]=Ke,Br[2]=ft,Br[3]=qt)}Or=Mi.viewport,st=Or.x|0,Wt=Or.y|0,tr="width"in Or?Or.width|0:De.framebufferWidth-st,or="height"in Or?Or.height|0:De.framebufferHeight-Wt,Nr=De.viewportWidth,De.viewportWidth=tr,hi=De.viewportHeight,De.viewportHeight=or,Ot.viewport(st,Wt,tr,or),Yr[0]=st,Yr[1]=Wt,Yr[2]=tr,Yr[3]=or,Ot.blendColor(0,0,0,1),Er[0]=0,Er[1]=0,Er[2]=0,Er[3]=1,n?Ot.enable(3042):Ot.disable(3042),Pe.blend_enable=n,Ot.blendFuncSeparate(770,771,773,1),xi[0]=770,xi[1]=771,xi[2]=773,xi[3]=1,i?Ot.enable(2929):Ot.disable(2929),Pe.depth_enable=i,Gi=Mi.viewport,Qr=Gi.x|0,Ui=Gi.y|0,zn="width"in Gi?Gi.width|0:De.framebufferWidth-Qr,fn="height"in Gi?Gi.height|0:De.framebufferHeight-Ui,Ot.scissor(Qr,Ui,zn,fn),vi[0]=Qr,vi[1]=Ui,vi[2]=zn,vi[3]=fn,a?Ot.enable(3089):Ot.disable(3089),Pe.scissor_enable=a,o?Ot.enable(2960):Ot.disable(2960),Pe.stencil_enable=o,xn=Pe.profile,xn&&(_a=performance.now(),r.count++),Ot.useProgram(s.program),Wn=Zt.angle_instanced_arrays,ht.setVAO(null),Fn=u.call(this,De,Mi,0),ia=!1,za=1,Hr=0,na=0,go=0,Dn=0,un=null,Zn=0,Wo=!1,Ba=5126,Bo=0,Ea=0,Ha=0,Lr(Fn)?(ia=!0,un=ye.createStream(34962,Fn),Ba=un.dtype):(un=ye.getBuffer(Fn),un?Ba=un.dtype:"constant"in Fn?(za=2,typeof Fn.constant=="number"?(Hr=Fn.constant,na=go=Dn=0):(Hr=Fn.constant.length>0?Fn.constant[0]:0,na=Fn.constant.length>1?Fn.constant[1]:0,go=Fn.constant.length>2?Fn.constant[2]:0,Dn=Fn.constant.length>3?Fn.constant[3]:0)):(Lr(Fn.buffer)?un=ye.createStream(34962,Fn.buffer):un=ye.getBuffer(Fn.buffer),Ba="type"in Fn?Vi[Fn.type]:un.dtype,Wo=!!Fn.normalized,Zn=Fn.size|0,Bo=Fn.offset|0,Ea=Fn.stride|0,Ha=Fn.divisor|0)),tn=l.location,Cn=de[tn],za===1?(Cn.buffer||Ot.enableVertexAttribArray(tn),Xn=Zn||4,(Cn.type!==Ba||Cn.size!==Xn||Cn.buffer!==un||Cn.normalized!==Wo||Cn.offset!==Bo||Cn.stride!==Ea)&&(Ot.bindBuffer(34962,un.buffer),Ot.vertexAttribPointer(tn,Xn,Ba,Wo,Ea,Bo),Cn.type=Ba,Cn.size=Xn,Cn.buffer=un,Cn.normalized=Wo,Cn.offset=Bo,Cn.stride=Ea),Cn.divisor!==Ha&&(Wn.vertexAttribDivisorANGLE(tn,Ha),Cn.divisor=Ha)):(Cn.buffer&&(Ot.disableVertexAttribArray(tn),Cn.buffer=null),(Cn.x!==Hr||Cn.y!==na||Cn.z!==go||Cn.w!==Dn)&&(Ot.vertexAttrib4f(tn,Hr,na,go,Dn),Cn.x=Hr,Cn.y=na,Cn.z=go,Cn.w=Dn)),ts=f.call(this,De,Mi,0),Ja=!1,to=1,Ri=0,an=0,cs=0,pa=0,ln=null,ka=0,va=!1,bo=5126,Co=0,Fi=0,Yn=0,Lr(ts)?(Ja=!0,ln=ye.createStream(34962,ts),bo=ln.dtype):(ln=ye.getBuffer(ts),ln?bo=ln.dtype:"constant"in ts?(to=2,typeof ts.constant=="number"?(Ri=ts.constant,an=cs=pa=0):(Ri=ts.constant.length>0?ts.constant[0]:0,an=ts.constant.length>1?ts.constant[1]:0,cs=ts.constant.length>2?ts.constant[2]:0,pa=ts.constant.length>3?ts.constant[3]:0)):(Lr(ts.buffer)?ln=ye.createStream(34962,ts.buffer):ln=ye.getBuffer(ts.buffer),bo="type"in ts?Vi[ts.type]:ln.dtype,va=!!ts.normalized,ka=ts.size|0,Co=ts.offset|0,Fi=ts.stride|0,Yn=ts.divisor|0)),xa=c.location,Qi=de[xa],to===1?(Qi.buffer||Ot.enableVertexAttribArray(xa),Nn=ka||1,(Qi.type!==bo||Qi.size!==Nn||Qi.buffer!==ln||Qi.normalized!==va||Qi.offset!==Co||Qi.stride!==Fi)&&(Ot.bindBuffer(34962,ln.buffer),Ot.vertexAttribPointer(xa,Nn,bo,va,Fi,Co),Qi.type=bo,Qi.size=Nn,Qi.buffer=ln,Qi.normalized=va,Qi.offset=Co,Qi.stride=Fi),Qi.divisor!==Yn&&(Wn.vertexAttribDivisorANGLE(xa,Yn),Qi.divisor=Yn)):(Qi.buffer&&(Ot.disableVertexAttribArray(xa),Qi.buffer=null),(Qi.x!==Ri||Qi.y!==an||Qi.z!==cs||Qi.w!==pa)&&(Ot.vertexAttrib4f(xa,Ri,an,cs,pa),Qi.x=Ri,Qi.y=an,Qi.z=cs,Qi.w=pa)),Pn=h.call(this,De,Mi,0),qa=!1,jo=1,Vo=0,Pa=0,Oa=0,co=0,An=null,_o=0,ks=!1,bs=5126,ps=0,sa=0,Bn=0,Lr(Pn)?(qa=!0,An=ye.createStream(34962,Pn),bs=An.dtype):(An=ye.getBuffer(Pn),An?bs=An.dtype:"constant"in Pn?(jo=2,typeof Pn.constant=="number"?(Vo=Pn.constant,Pa=Oa=co=0):(Vo=Pn.constant.length>0?Pn.constant[0]:0,Pa=Pn.constant.length>1?Pn.constant[1]:0,Oa=Pn.constant.length>2?Pn.constant[2]:0,co=Pn.constant.length>3?Pn.constant[3]:0)):(Lr(Pn.buffer)?An=ye.createStream(34962,Pn.buffer):An=ye.getBuffer(Pn.buffer),bs="type"in Pn?Vi[Pn.type]:An.dtype,ks=!!Pn.normalized,_o=Pn.size|0,ps=Pn.offset|0,sa=Pn.stride|0,Bn=Pn.divisor|0)),ms=d.location,ya=de[ms],jo===1?(ya.buffer||Ot.enableVertexAttribArray(ms),on=_o||4,(ya.type!==bs||ya.size!==on||ya.buffer!==An||ya.normalized!==ks||ya.offset!==ps||ya.stride!==sa)&&(Ot.bindBuffer(34962,An.buffer),Ot.vertexAttribPointer(ms,on,bs,ks,sa,ps),ya.type=bs,ya.size=on,ya.buffer=An,ya.normalized=ks,ya.offset=ps,ya.stride=sa),ya.divisor!==Bn&&(Wn.vertexAttribDivisorANGLE(ms,Bn),ya.divisor=Bn)):(ya.buffer&&(Ot.disableVertexAttribArray(ms),ya.buffer=null),(ya.x!==Vo||ya.y!==Pa||ya.z!==Oa||ya.w!==co)&&(Ot.vertexAttrib4f(ms,Vo,Pa,Oa,co),ya.x=Vo,ya.y=Pa,ya.z=Oa,ya.w=co)),mn=p.call(this,De,Mi,0),Ga=!1,ca=1,bn=0,Xi=0,qn=0,Ia=0,yn=null,Ya=0,ba=!1,Da=5126,Aa=0,Ln=0,wo=0,Lr(mn)?(Ga=!0,yn=ye.createStream(34962,mn),Da=yn.dtype):(yn=ye.getBuffer(mn),yn?Da=yn.dtype:"constant"in mn?(ca=2,typeof mn.constant=="number"?(bn=mn.constant,Xi=qn=Ia=0):(bn=mn.constant.length>0?mn.constant[0]:0,Xi=mn.constant.length>1?mn.constant[1]:0,qn=mn.constant.length>2?mn.constant[2]:0,Ia=mn.constant.length>3?mn.constant[3]:0)):(Lr(mn.buffer)?yn=ye.createStream(34962,mn.buffer):yn=ye.getBuffer(mn.buffer),Da="type"in mn?Vi[mn.type]:yn.dtype,ba=!!mn.normalized,Ya=mn.size|0,Aa=mn.offset|0,Ln=mn.stride|0,wo=mn.divisor|0)),wa=x.location,$i=de[wa],ca===1?($i.buffer||Ot.enableVertexAttribArray(wa),ea=Ya||1,($i.type!==Da||$i.size!==ea||$i.buffer!==yn||$i.normalized!==ba||$i.offset!==Aa||$i.stride!==Ln)&&(Ot.bindBuffer(34962,yn.buffer),Ot.vertexAttribPointer(wa,ea,Da,ba,Ln,Aa),$i.type=Da,$i.size=ea,$i.buffer=yn,$i.normalized=ba,$i.offset=Aa,$i.stride=Ln),$i.divisor!==wo&&(Wn.vertexAttribDivisorANGLE(wa,wo),$i.divisor=wo)):($i.buffer&&(Ot.disableVertexAttribArray(wa),$i.buffer=null),($i.x!==bn||$i.y!==Xi||$i.z!==qn||$i.w!==Ia)&&(Ot.vertexAttrib4f(wa,bn,Xi,qn,Ia),$i.x=bn,$i.y=Xi,$i.z=qn,$i.w=Ia)),Sa=b.call(this,De,Mi,0),Za=!1,xo=1,Wa=0,hn=0,Un=0,Ss=0,Kn=null,ns=0,Jo=!1,vo=5126,ma=0,ja=0,To=0,Lr(Sa)?(Za=!0,Kn=ye.createStream(34962,Sa),vo=Kn.dtype):(Kn=ye.getBuffer(Sa),Kn?vo=Kn.dtype:"constant"in Sa?(xo=2,typeof Sa.constant=="number"?(Wa=Sa.constant,hn=Un=Ss=0):(Wa=Sa.constant.length>0?Sa.constant[0]:0,hn=Sa.constant.length>1?Sa.constant[1]:0,Un=Sa.constant.length>2?Sa.constant[2]:0,Ss=Sa.constant.length>3?Sa.constant[3]:0)):(Lr(Sa.buffer)?Kn=ye.createStream(34962,Sa.buffer):Kn=ye.getBuffer(Sa.buffer),vo="type"in Sa?Vi[Sa.type]:Kn.dtype,Jo=!!Sa.normalized,ns=Sa.size|0,ma=Sa.offset|0,ja=Sa.stride|0,To=Sa.divisor|0)),Ao=y.location,la=de[Ao],xo===1?(la.buffer||Ot.enableVertexAttribArray(Ao),Ki=ns||1,(la.type!==vo||la.size!==Ki||la.buffer!==Kn||la.normalized!==Jo||la.offset!==ma||la.stride!==ja)&&(Ot.bindBuffer(34962,Kn.buffer),Ot.vertexAttribPointer(Ao,Ki,vo,Jo,ja,ma),la.type=vo,la.size=Ki,la.buffer=Kn,la.normalized=Jo,la.offset=ma,la.stride=ja),la.divisor!==To&&(Wn.vertexAttribDivisorANGLE(Ao,To),la.divisor=To)):(la.buffer&&(Ot.disableVertexAttribArray(Ao),la.buffer=null),(la.x!==Wa||la.y!==hn||la.z!==Un||la.w!==Ss)&&(Ot.vertexAttrib4f(Ao,Wa,hn,Un,Ss),la.x=Wa,la.y=hn,la.z=Un,la.w=Ss)),ho=k.call(this,De,Mi,0),Ka=!1,Ca=1,ta=0,En=0,Mo=0,Ds=0,Ro=null,vs=0,Ks=!1,as=5126,Jn=0,Cs=0,Xa=0,Lr(ho)?(Ka=!0,Ro=ye.createStream(34962,ho),as=Ro.dtype):(Ro=ye.getBuffer(ho),Ro?as=Ro.dtype:"constant"in ho?(Ca=2,typeof ho.constant=="number"?(ta=ho.constant,En=Mo=Ds=0):(ta=ho.constant.length>0?ho.constant[0]:0,En=ho.constant.length>1?ho.constant[1]:0,Mo=ho.constant.length>2?ho.constant[2]:0,Ds=ho.constant.length>3?ho.constant[3]:0)):(Lr(ho.buffer)?Ro=ye.createStream(34962,ho.buffer):Ro=ye.getBuffer(ho.buffer),as="type"in ho?Vi[ho.type]:Ro.dtype,Ks=!!ho.normalized,vs=ho.size|0,Jn=ho.offset|0,Cs=ho.stride|0,Xa=ho.divisor|0)),Zo=E.location,Eo=de[Zo],Ca===1?(Eo.buffer||Ot.enableVertexAttribArray(Zo),lo=vs||1,(Eo.type!==as||Eo.size!==lo||Eo.buffer!==Ro||Eo.normalized!==Ks||Eo.offset!==Jn||Eo.stride!==Cs)&&(Ot.bindBuffer(34962,Ro.buffer),Ot.vertexAttribPointer(Zo,lo,as,Ks,Cs,Jn),Eo.type=as,Eo.size=lo,Eo.buffer=Ro,Eo.normalized=Ks,Eo.offset=Jn,Eo.stride=Cs),Eo.divisor!==Xa&&(Wn.vertexAttribDivisorANGLE(Zo,Xa),Eo.divisor=Xa)):(Eo.buffer&&(Ot.disableVertexAttribArray(Zo),Eo.buffer=null),(Eo.x!==ta||Eo.y!==En||Eo.z!==Mo||Eo.w!==Ds)&&(Ot.vertexAttrib4f(Zo,ta,En,Mo,Ds),Eo.x=ta,Eo.y=En,Eo.z=Mo,Eo.w=Ds)),$a=A.call(this,De,Mi,0),Xo=!1,rs=1,$n=0,Sn=0,uo=0,Rs=0,xs=null,Go=0,os=!1,So=5126,Qn=0,zo=0,rl=0,Lr($a)?(Xo=!0,xs=ye.createStream(34962,$a),So=xs.dtype):(xs=ye.getBuffer($a),xs?So=xs.dtype:"constant"in $a?(rs=2,typeof $a.constant=="number"?($n=$a.constant,Sn=uo=Rs=0):($n=$a.constant.length>0?$a.constant[0]:0,Sn=$a.constant.length>1?$a.constant[1]:0,uo=$a.constant.length>2?$a.constant[2]:0,Rs=$a.constant.length>3?$a.constant[3]:0)):(Lr($a.buffer)?xs=ye.createStream(34962,$a.buffer):xs=ye.getBuffer($a.buffer),So="type"in $a?Vi[$a.type]:xs.dtype,os=!!$a.normalized,Go=$a.size|0,Qn=$a.offset|0,zo=$a.stride|0,rl=$a.divisor|0)),$o=L.location,Na=de[$o],rs===1?(Na.buffer||Ot.enableVertexAttribArray($o),Ua=Go||1,(Na.type!==So||Na.size!==Ua||Na.buffer!==xs||Na.normalized!==os||Na.offset!==Qn||Na.stride!==zo)&&(Ot.bindBuffer(34962,xs.buffer),Ot.vertexAttribPointer($o,Ua,So,os,zo,Qn),Na.type=So,Na.size=Ua,Na.buffer=xs,Na.normalized=os,Na.offset=Qn,Na.stride=zo),Na.divisor!==rl&&(Wn.vertexAttribDivisorANGLE($o,rl),Na.divisor=rl)):(Na.buffer&&(Ot.disableVertexAttribArray($o),Na.buffer=null),(Na.x!==$n||Na.y!==Sn||Na.z!==uo||Na.w!==Rs)&&(Ot.vertexAttrib4f($o,$n,Sn,uo,Rs),Na.x=$n,Na.y=Sn,Na.z=uo,Na.w=Rs)),Po=_.call(this,De,Mi,0),fo=!1,ro=1,Ma=0,io=0,aa=0,Oo=0,No=null,Zs=0,Fs=!1,ws=5126,no=0,Ls=0,ds=0,Lr(Po)?(fo=!0,No=ye.createStream(34962,Po),ws=No.dtype):(No=ye.getBuffer(Po),No?ws=No.dtype:"constant"in Po?(ro=2,typeof Po.constant=="number"?(Ma=Po.constant,io=aa=Oo=0):(Ma=Po.constant.length>0?Po.constant[0]:0,io=Po.constant.length>1?Po.constant[1]:0,aa=Po.constant.length>2?Po.constant[2]:0,Oo=Po.constant.length>3?Po.constant[3]:0)):(Lr(Po.buffer)?No=ye.createStream(34962,Po.buffer):No=ye.getBuffer(Po.buffer),ws="type"in Po?Vi[Po.type]:No.dtype,Fs=!!Po.normalized,Zs=Po.size|0,no=Po.offset|0,Ls=Po.stride|0,ds=Po.divisor|0)),Xs=C.location,oa=de[Xs],ro===1?(oa.buffer||Ot.enableVertexAttribArray(Xs),Yo=Zs||1,(oa.type!==ws||oa.size!==Yo||oa.buffer!==No||oa.normalized!==Fs||oa.offset!==no||oa.stride!==Ls)&&(Ot.bindBuffer(34962,No.buffer),Ot.vertexAttribPointer(Xs,Yo,ws,Fs,Ls,no),oa.type=ws,oa.size=Yo,oa.buffer=No,oa.normalized=Fs,oa.offset=no,oa.stride=Ls),oa.divisor!==ds&&(Wn.vertexAttribDivisorANGLE(Xs,ds),oa.divisor=ds)):(oa.buffer&&(Ot.disableVertexAttribArray(Xs),oa.buffer=null),(oa.x!==Ma||oa.y!==io||oa.z!==aa||oa.w!==Oo)&&(Ot.vertexAttrib4f(Xs,Ma,io,aa,Oo),oa.x=Ma,oa.y=io,oa.z=aa,oa.w=Oo)),po=M.call(this,De,Mi,0),ss=!1,ls=1,gs=0,bt=0,Ft=0,hr=0,nr=null,Sr=0,li=!1,di=5126,mi=0,Oi=0,dn=0,Lr(po)?(ss=!0,nr=ye.createStream(34962,po),di=nr.dtype):(nr=ye.getBuffer(po),nr?di=nr.dtype:"constant"in po?(ls=2,typeof po.constant=="number"?(gs=po.constant,bt=Ft=hr=0):(gs=po.constant.length>0?po.constant[0]:0,bt=po.constant.length>1?po.constant[1]:0,Ft=po.constant.length>2?po.constant[2]:0,hr=po.constant.length>3?po.constant[3]:0)):(Lr(po.buffer)?nr=ye.createStream(34962,po.buffer):nr=ye.getBuffer(po.buffer),di="type"in po?Vi[po.type]:nr.dtype,li=!!po.normalized,Sr=po.size|0,mi=po.offset|0,Oi=po.stride|0,dn=po.divisor|0)),wi=v.location,ui=de[wi],ls===1?(ui.buffer||Ot.enableVertexAttribArray(wi),Ai=Sr||1,(ui.type!==di||ui.size!==Ai||ui.buffer!==nr||ui.normalized!==li||ui.offset!==mi||ui.stride!==Oi)&&(Ot.bindBuffer(34962,nr.buffer),Ot.vertexAttribPointer(wi,Ai,di,li,Oi,mi),ui.type=di,ui.size=Ai,ui.buffer=nr,ui.normalized=li,ui.offset=mi,ui.stride=Oi),ui.divisor!==dn&&(Wn.vertexAttribDivisorANGLE(wi,dn),ui.divisor=dn)):(ui.buffer&&(Ot.disableVertexAttribArray(wi),ui.buffer=null),(ui.x!==gs||ui.y!==bt||ui.z!==Ft||ui.w!==hr)&&(Ot.vertexAttrib4f(wi,gs,bt,Ft,hr),ui.x=gs,ui.y=bt,ui.z=Ft,ui.w=hr)),Ot.uniform1i(z.location,!1),gi=Mi.opacity,Ot.uniform1f(T.location,gi),gn=q.call(this,De,Mi,0),In=gn[0],Vn=gn[1],Ot.uniform2f(F.location,In,Vn),Ot.uniform1i(U.location,H.bind()),Rn=De.pixelRatio,Ot.uniform1f(j.location,Rn),Hn=Mi.scale,Gn=Hn[0],pn=Hn[1],Ot.uniform2f(G.location,Gn,pn),Lo=Mi.scaleFract,us=Lo[0],Bs=Lo[1],Ot.uniform2f(O.location,us,Bs),Js=Mi.translate,ol=Js[0],Cl=Js[1],Ot.uniform2f(W.location,ol,Cl),ul=Mi.translateFract,Gl=ul[0],Vl=ul[1],Ot.uniform2f(re.location,Gl,Vl),Fl=Mi.elements,ga=null,ko=Lr(Fl),ko?ga=lt.createStream(Fl):ga=lt.getElements(Fl),ga&&Ot.bindBuffer(34963,ga.buffer.buffer),zs=Mi.offset,Fo=Mi.count,Fo&&(Ys=Ie.instances,Ys>0?ga?Wn.drawElementsInstancedANGLE(0,Fo,ga.type,zs<<(ga.type-5121>>1),Ys):Wn.drawArraysInstancedANGLE(0,zs,Fo,Ys):Ys<0&&(ga?Ot.drawElements(0,Fo,ga.type,zs<<(ga.type-5121>>1)):Ot.drawArrays(0,zs,Fo)),Pe.dirty=!0,ht.setVAO(null),De.viewportWidth=Nr,De.viewportHeight=hi,xn&&(r.cpuTime+=performance.now()-_a),ia&&ye.destroyStream(un),Ja&&ye.destroyStream(ln),qa&&ye.destroyStream(An),Ga&&ye.destroyStream(yn),Za&&ye.destroyStream(Kn),Ka&&ye.destroyStream(Ro),Xo&&ye.destroyStream(xs),fo&&ye.destroyStream(No),ss&&ye.destroyStream(nr),H.unbind(),ko&&lt.destroyStream(ga))},scope:function(Mi,sn,fi){var Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye,it,Nt,mt,er,_r,wr,ni,Wr,Ci,Ji,ai,Ti,Bi,en,Wi,bi,ao,yo,Ko,Ms,vl,wl,au,Al,nu,Bu,qu,Ju,qo,Rl,pu,xu,of,ff,xf;Or=Mi.viewport,st=Or.x|0,Wt=Or.y|0,tr="width"in Or?Or.width|0:De.framebufferWidth-st,or="height"in Or?Or.height|0:De.framebufferHeight-Wt,Nr=De.viewportWidth,De.viewportWidth=tr,hi=De.viewportHeight,De.viewportHeight=or,Gi=Pi[0],Pi[0]=st,Qr=Pi[1],Pi[1]=Wt,Ui=Pi[2],Pi[2]=tr,zn=Pi[3],Pi[3]=or,fn=vr[0],vr[0]=ne,xn=vr[1],vr[1]=be,_a=vr[2],vr[2]=ze,Wn=vr[3],vr[3]=Ce,Fn=Fe.blend_enable,Fe.blend_enable=he,ia=Si[0],Si[0]=te,za=Si[1],Si[1]=ke,Hr=Si[2],Si[2]=Ee,na=Si[3],Si[3]=Me,go=Fe.depth_enable,Fe.depth_enable=Oe,Dn=Mi.viewport,un=Dn.x|0,Zn=Dn.y|0,Wo="width"in Dn?Dn.width|0:De.framebufferWidth-un,Ba="height"in Dn?Dn.height|0:De.framebufferHeight-Zn,Bo=oi[0],oi[0]=un,Ea=oi[1],oi[1]=Zn,Ha=oi[2],oi[2]=Wo,tn=oi[3],oi[3]=Ba,Cn=Fe.scissor_enable,Fe.scissor_enable=Re,Xn=Fe.stencil_enable,Fe.stencil_enable=me,ts=Pe.profile,ts&&(Ja=performance.now(),r.count++),to=Mi.elements,Ri=null,an=Lr(to),an?Ri=lt.createStream(to):Ri=lt.getElements(to),cs=Ie.elements,Ie.elements=Ri,pa=Mi.offset,ln=Ie.offset,Ie.offset=pa,ka=Mi.count,va=Ie.count,Ie.count=ka,bo=Ie.primitive,Ie.primitive=Be,Co=Et[fe],Et[fe]=!1,Fi=Et[et],Et[et]=Ze,Yn=Mi.opacity,xa=Et[gt],Et[gt]=Yn,Qi=q.call(this,De,Mi,fi),Nn=Et[Pt],Et[Pt]=Qi,Pn=De.pixelRatio,qa=Et[Qe],Et[Qe]=Pn,jo=Mi.scale,Vo=Et[Xe],Et[Xe]=jo,Pa=Mi.scaleFract,Oa=Et[Tt],Et[Tt]=Pa,co=Mi.translate,An=Et[xt],Et[xt]=co,_o=Mi.translateFract,ks=Et[_t],Et[_t]=_o,bs=Mi.markerTexture,ps=Et[Ct],Et[Ct]=bs,sa=k.call(this,De,Mi,fi),Bn=!1,ms=1,ya=0,on=0,mn=0,Ga=0,ca=null,bn=0,Xi=!1,qn=5126,Ia=0,yn=0,Ya=0,Lr(sa)?(Bn=!0,ca=ye.createStream(34962,sa),qn=ca.dtype):(ca=ye.getBuffer(sa),ca?qn=ca.dtype:"constant"in sa?(ms=2,typeof sa.constant=="number"?(ya=sa.constant,on=mn=Ga=0):(ya=sa.constant.length>0?sa.constant[0]:0,on=sa.constant.length>1?sa.constant[1]:0,mn=sa.constant.length>2?sa.constant[2]:0,Ga=sa.constant.length>3?sa.constant[3]:0)):(Lr(sa.buffer)?ca=ye.createStream(34962,sa.buffer):ca=ye.getBuffer(sa.buffer),qn="type"in sa?Vi[sa.type]:ca.dtype,Xi=!!sa.normalized,bn=sa.size|0,Ia=sa.offset|0,yn=sa.stride|0,Ya=sa.divisor|0)),ba=jt.state,jt.state=ms,Da=jt.x,jt.x=ya,Aa=jt.y,jt.y=on,Ln=jt.z,jt.z=mn,wo=jt.w,jt.w=Ga,wa=jt.buffer,jt.buffer=ca,$i=jt.size,jt.size=bn,ea=jt.normalized,jt.normalized=Xi,Sa=jt.type,jt.type=qn,Za=jt.offset,jt.offset=Ia,xo=jt.stride,jt.stride=yn,Wa=jt.divisor,jt.divisor=Ya,hn=_.call(this,De,Mi,fi),Un=!1,Ss=1,Kn=0,ns=0,Jo=0,vo=0,ma=null,ja=0,To=!1,Ao=5126,la=0,Ki=0,ho=0,Lr(hn)?(Un=!0,ma=ye.createStream(34962,hn),Ao=ma.dtype):(ma=ye.getBuffer(hn),ma?Ao=ma.dtype:"constant"in hn?(Ss=2,typeof hn.constant=="number"?(Kn=hn.constant,ns=Jo=vo=0):(Kn=hn.constant.length>0?hn.constant[0]:0,ns=hn.constant.length>1?hn.constant[1]:0,Jo=hn.constant.length>2?hn.constant[2]:0,vo=hn.constant.length>3?hn.constant[3]:0)):(Lr(hn.buffer)?ma=ye.createStream(34962,hn.buffer):ma=ye.getBuffer(hn.buffer),Ao="type"in hn?Vi[hn.type]:ma.dtype,To=!!hn.normalized,ja=hn.size|0,la=hn.offset|0,Ki=hn.stride|0,ho=hn.divisor|0)),Ka=At.state,At.state=Ss,Ca=At.x,At.x=Kn,ta=At.y,At.y=ns,En=At.z,At.z=Jo,Mo=At.w,At.w=vo,Ds=At.buffer,At.buffer=ma,Ro=At.size,At.size=ja,vs=At.normalized,At.normalized=To,Ks=At.type,At.type=Ao,as=At.offset,At.offset=la,Jn=At.stride,At.stride=Ki,Cs=At.divisor,At.divisor=ho,Xa=A.call(this,De,Mi,fi),Zo=!1,Eo=1,lo=0,$a=0,Xo=0,rs=0,$n=null,Sn=0,uo=!1,Rs=5126,xs=0,Go=0,os=0,Lr(Xa)?(Zo=!0,$n=ye.createStream(34962,Xa),Rs=$n.dtype):($n=ye.getBuffer(Xa),$n?Rs=$n.dtype:"constant"in Xa?(Eo=2,typeof Xa.constant=="number"?(lo=Xa.constant,$a=Xo=rs=0):(lo=Xa.constant.length>0?Xa.constant[0]:0,$a=Xa.constant.length>1?Xa.constant[1]:0,Xo=Xa.constant.length>2?Xa.constant[2]:0,rs=Xa.constant.length>3?Xa.constant[3]:0)):(Lr(Xa.buffer)?$n=ye.createStream(34962,Xa.buffer):$n=ye.getBuffer(Xa.buffer),Rs="type"in Xa?Vi[Xa.type]:$n.dtype,uo=!!Xa.normalized,Sn=Xa.size|0,xs=Xa.offset|0,Go=Xa.stride|0,os=Xa.divisor|0)),So=Te.state,Te.state=Eo,Qn=Te.x,Te.x=lo,zo=Te.y,Te.y=$a,rl=Te.z,Te.z=Xo,$o=Te.w,Te.w=rs,Na=Te.buffer,Te.buffer=$n,Ua=Te.size,Te.size=Sn,Po=Te.normalized,Te.normalized=uo,fo=Te.type,Te.type=Rs,ro=Te.offset,Te.offset=xs,Ma=Te.stride,Te.stride=Go,io=Te.divisor,Te.divisor=os,aa=M.call(this,De,Mi,fi),Oo=!1,No=1,Zs=0,Fs=0,ws=0,no=0,Ls=null,ds=0,Xs=!1,oa=5126,Yo=0,po=0,ss=0,Lr(aa)?(Oo=!0,Ls=ye.createStream(34962,aa),oa=Ls.dtype):(Ls=ye.getBuffer(aa),Ls?oa=Ls.dtype:"constant"in aa?(No=2,typeof aa.constant=="number"?(Zs=aa.constant,Fs=ws=no=0):(Zs=aa.constant.length>0?aa.constant[0]:0,Fs=aa.constant.length>1?aa.constant[1]:0,ws=aa.constant.length>2?aa.constant[2]:0,no=aa.constant.length>3?aa.constant[3]:0)):(Lr(aa.buffer)?Ls=ye.createStream(34962,aa.buffer):Ls=ye.getBuffer(aa.buffer),oa="type"in aa?Vi[aa.type]:Ls.dtype,Xs=!!aa.normalized,ds=aa.size|0,Yo=aa.offset|0,po=aa.stride|0,ss=aa.divisor|0)),ls=nt.state,nt.state=No,gs=nt.x,nt.x=Zs,bt=nt.y,nt.y=Fs,Ft=nt.z,nt.z=ws,hr=nt.w,nt.w=no,nr=nt.buffer,nt.buffer=Ls,Sr=nt.size,nt.size=ds,li=nt.normalized,nt.normalized=Xs,di=nt.type,nt.type=oa,mi=nt.offset,nt.offset=Yo,Oi=nt.stride,nt.stride=po,dn=nt.divisor,nt.divisor=ss,wi=b.call(this,De,Mi,fi),ui=!1,Ai=1,gi=0,gn=0,In=0,Vn=0,Rn=null,Hn=0,Gn=!1,pn=5126,Lo=0,us=0,Bs=0,Lr(wi)?(ui=!0,Rn=ye.createStream(34962,wi),pn=Rn.dtype):(Rn=ye.getBuffer(wi),Rn?pn=Rn.dtype:"constant"in wi?(Ai=2,typeof wi.constant=="number"?(gi=wi.constant,gn=In=Vn=0):(gi=wi.constant.length>0?wi.constant[0]:0,gn=wi.constant.length>1?wi.constant[1]:0,In=wi.constant.length>2?wi.constant[2]:0,Vn=wi.constant.length>3?wi.constant[3]:0)):(Lr(wi.buffer)?Rn=ye.createStream(34962,wi.buffer):Rn=ye.getBuffer(wi.buffer),pn="type"in wi?Vi[wi.type]:Rn.dtype,Gn=!!wi.normalized,Hn=wi.size|0,Lo=wi.offset|0,us=wi.stride|0,Bs=wi.divisor|0)),Js=ut.state,ut.state=Ai,ol=ut.x,ut.x=gi,Cl=ut.y,ut.y=gn,ul=ut.z,ut.z=In,Gl=ut.w,ut.w=Vn,Vl=ut.buffer,ut.buffer=Rn,Fl=ut.size,ut.size=Hn,ga=ut.normalized,ut.normalized=Gn,ko=ut.type,ut.type=pn,zs=ut.offset,ut.offset=Lo,Fo=ut.stride,ut.stride=us,Ys=ut.divisor,ut.divisor=Bs,Gs=f.call(this,De,Mi,fi),Us=!1,Sl=1,_l=0,kl=0,cl=0,xl=0,Uo=null,_s=0,Bl=!1,Il=5126,Dl=0,oe=0,w=0,Lr(Gs)?(Us=!0,Uo=ye.createStream(34962,Gs),Il=Uo.dtype):(Uo=ye.getBuffer(Gs),Uo?Il=Uo.dtype:"constant"in Gs?(Sl=2,typeof Gs.constant=="number"?(_l=Gs.constant,kl=cl=xl=0):(_l=Gs.constant.length>0?Gs.constant[0]:0,kl=Gs.constant.length>1?Gs.constant[1]:0,cl=Gs.constant.length>2?Gs.constant[2]:0,xl=Gs.constant.length>3?Gs.constant[3]:0)):(Lr(Gs.buffer)?Uo=ye.createStream(34962,Gs.buffer):Uo=ye.getBuffer(Gs.buffer),Il="type"in Gs?Vi[Gs.type]:Uo.dtype,Bl=!!Gs.normalized,_s=Gs.size|0,Dl=Gs.offset|0,oe=Gs.stride|0,w=Gs.divisor|0)),B=ct.state,ct.state=Sl,Q=ct.x,ct.x=_l,ee=ct.y,ct.y=kl,le=ct.z,ct.z=cl,Ne=ct.w,ct.w=xl,$e=ct.buffer,ct.buffer=Uo,pt=ct.size,ct.size=_s,zt=ct.normalized,ct.normalized=Bl,Yt=ct.type,ct.type=Il,Jt=ct.offset,ct.offset=Dl,yr=ct.stride,ct.stride=oe,Ir=ct.divisor,ct.divisor=w,ce=h.call(this,De,Mi,fi),Ae=!1,qe=1,Ve=0,ot=0,Ke=0,ft=0,qt=null,Xt=0,$t=!1,dr=5126,Mr=0,$r=0,ii=0,Lr(ce)?(Ae=!0,qt=ye.createStream(34962,ce),dr=qt.dtype):(qt=ye.getBuffer(ce),qt?dr=qt.dtype:"constant"in ce?(qe=2,typeof ce.constant=="number"?(Ve=ce.constant,ot=Ke=ft=0):(Ve=ce.constant.length>0?ce.constant[0]:0,ot=ce.constant.length>1?ce.constant[1]:0,Ke=ce.constant.length>2?ce.constant[2]:0,ft=ce.constant.length>3?ce.constant[3]:0)):(Lr(ce.buffer)?qt=ye.createStream(34962,ce.buffer):qt=ye.getBuffer(ce.buffer),dr="type"in ce?Vi[ce.type]:qt.dtype,$t=!!ce.normalized,Xt=ce.size|0,Mr=ce.offset|0,$r=ce.stride|0,ii=ce.divisor|0)),pi=rt.state,rt.state=qe,Yi=rt.x,rt.x=Ve,wn=rt.y,rt.y=ot,Tn=rt.z,rt.z=Ke,ua=rt.w,rt.w=ft,oo=rt.buffer,rt.buffer=qt,el=rt.size,rt.size=Xt,ys=rt.normalized,rt.normalized=$t,il=rt.type,rt.type=dr,$l=rt.offset,rt.offset=Mr,pl=rt.stride,rt.stride=$r,Hl=rt.divisor,rt.divisor=ii,Ll=u.call(this,De,Mi,fi),Ql=!1,ku=1,Jl=0,Kl=0,Hu=0,tf=0,Ku=null,Gu=0,Wu=!1,sf=5126,gf=0,nf=0,af=0,Lr(Ll)?(Ql=!0,Ku=ye.createStream(34962,Ll),sf=Ku.dtype):(Ku=ye.getBuffer(Ll),Ku?sf=Ku.dtype:"constant"in Ll?(ku=2,typeof Ll.constant=="number"?(Jl=Ll.constant,Kl=Hu=tf=0):(Jl=Ll.constant.length>0?Ll.constant[0]:0,Kl=Ll.constant.length>1?Ll.constant[1]:0,Hu=Ll.constant.length>2?Ll.constant[2]:0,tf=Ll.constant.length>3?Ll.constant[3]:0)):(Lr(Ll.buffer)?Ku=ye.createStream(34962,Ll.buffer):Ku=ye.getBuffer(Ll.buffer),sf="type"in Ll?Vi[Ll.type]:Ku.dtype,Wu=!!Ll.normalized,Gu=Ll.size|0,gf=Ll.offset|0,nf=Ll.stride|0,af=Ll.divisor|0)),X=je.state,je.state=ku,se=je.x,je.x=Jl,Le=je.y,je.y=Kl,We=je.z,je.z=Hu,Ye=je.w,je.w=tf,it=je.buffer,je.buffer=Ku,Nt=je.size,je.size=Gu,mt=je.normalized,je.normalized=Wu,er=je.type,je.type=sf,_r=je.offset,je.offset=gf,wr=je.stride,je.stride=nf,ni=je.divisor,je.divisor=af,Wr=p.call(this,De,Mi,fi),Ci=!1,Ji=1,ai=0,Ti=0,Bi=0,en=0,Wi=null,bi=0,ao=!1,yo=5126,Ko=0,Ms=0,vl=0,Lr(Wr)?(Ci=!0,Wi=ye.createStream(34962,Wr),yo=Wi.dtype):(Wi=ye.getBuffer(Wr),Wi?yo=Wi.dtype:"constant"in Wr?(Ji=2,typeof Wr.constant=="number"?(ai=Wr.constant,Ti=Bi=en=0):(ai=Wr.constant.length>0?Wr.constant[0]:0,Ti=Wr.constant.length>1?Wr.constant[1]:0,Bi=Wr.constant.length>2?Wr.constant[2]:0,en=Wr.constant.length>3?Wr.constant[3]:0)):(Lr(Wr.buffer)?Wi=ye.createStream(34962,Wr.buffer):Wi=ye.getBuffer(Wr.buffer),yo="type"in Wr?Vi[Wr.type]:Wi.dtype,ao=!!Wr.normalized,bi=Wr.size|0,Ko=Wr.offset|0,Ms=Wr.stride|0,vl=Wr.divisor|0)),wl=tt.state,tt.state=Ji,au=tt.x,tt.x=ai,Al=tt.y,tt.y=Ti,nu=tt.z,tt.z=Bi,Bu=tt.w,tt.w=en,qu=tt.buffer,tt.buffer=Wi,Ju=tt.size,tt.size=bi,qo=tt.normalized,tt.normalized=ao,Rl=tt.type,tt.type=yo,pu=tt.offset,tt.offset=Ko,xu=tt.stride,tt.stride=Ms,of=tt.divisor,tt.divisor=vl,ff=ue.vert,ue.vert=Je,xf=ue.frag,ue.frag=Mt,Pe.dirty=!0,sn(De,Mi,fi),De.viewportWidth=Nr,De.viewportHeight=hi,Pi[0]=Gi,Pi[1]=Qr,Pi[2]=Ui,Pi[3]=zn,vr[0]=fn,vr[1]=xn,vr[2]=_a,vr[3]=Wn,Fe.blend_enable=Fn,Si[0]=ia,Si[1]=za,Si[2]=Hr,Si[3]=na,Fe.depth_enable=go,oi[0]=Bo,oi[1]=Ea,oi[2]=Ha,oi[3]=tn,Fe.scissor_enable=Cn,Fe.stencil_enable=Xn,ts&&(r.cpuTime+=performance.now()-Ja),an&&lt.destroyStream(Ri),Ie.elements=cs,Ie.offset=ln,Ie.count=va,Ie.primitive=bo,Et[fe]=Co,Et[et]=Fi,Et[gt]=xa,Et[Pt]=Nn,Et[Qe]=qa,Et[Xe]=Vo,Et[Tt]=Oa,Et[xt]=An,Et[_t]=ks,Et[Ct]=ps,Bn&&ye.destroyStream(ca),jt.state=ba,jt.x=Da,jt.y=Aa,jt.z=Ln,jt.w=wo,jt.buffer=wa,jt.size=$i,jt.normalized=ea,jt.type=Sa,jt.offset=Za,jt.stride=xo,jt.divisor=Wa,Un&&ye.destroyStream(ma),At.state=Ka,At.x=Ca,At.y=ta,At.z=En,At.w=Mo,At.buffer=Ds,At.size=Ro,At.normalized=vs,At.type=Ks,At.offset=as,At.stride=Jn,At.divisor=Cs,Zo&&ye.destroyStream($n),Te.state=So,Te.x=Qn,Te.y=zo,Te.z=rl,Te.w=$o,Te.buffer=Na,Te.size=Ua,Te.normalized=Po,Te.type=fo,Te.offset=ro,Te.stride=Ma,Te.divisor=io,Oo&&ye.destroyStream(Ls),nt.state=ls,nt.x=gs,nt.y=bt,nt.z=Ft,nt.w=hr,nt.buffer=nr,nt.size=Sr,nt.normalized=li,nt.type=di,nt.offset=mi,nt.stride=Oi,nt.divisor=dn,ui&&ye.destroyStream(Rn),ut.state=Js,ut.x=ol,ut.y=Cl,ut.z=ul,ut.w=Gl,ut.buffer=Vl,ut.size=Fl,ut.normalized=ga,ut.type=ko,ut.offset=zs,ut.stride=Fo,ut.divisor=Ys,Us&&ye.destroyStream(Uo),ct.state=B,ct.x=Q,ct.y=ee,ct.z=le,ct.w=Ne,ct.buffer=$e,ct.size=pt,ct.normalized=zt,ct.type=Yt,ct.offset=Jt,ct.stride=yr,ct.divisor=Ir,Ae&&ye.destroyStream(qt),rt.state=pi,rt.x=Yi,rt.y=wn,rt.z=Tn,rt.w=ua,rt.buffer=oo,rt.size=el,rt.normalized=ys,rt.type=il,rt.offset=$l,rt.stride=pl,rt.divisor=Hl,Ql&&ye.destroyStream(Ku),je.state=X,je.x=se,je.y=Le,je.z=We,je.w=Ye,je.buffer=it,je.size=Nt,je.normalized=mt,je.type=er,je.offset=_r,je.stride=wr,je.divisor=ni,Ci&&ye.destroyStream(Wi),tt.state=wl,tt.x=au,tt.y=Al,tt.z=nu,tt.w=Bu,tt.buffer=qu,tt.size=Ju,tt.normalized=qo,tt.type=Rl,tt.offset=pu,tt.stride=xu,tt.divisor=of,ue.vert=ff,ue.frag=xf,Pe.dirty=!0},batch:function(Mi,sn){var fi,Or,st,Wt,tr,or,Nr;if(fi=Zt.angle_instanced_arrays,Or=St.next,Or!==St.cur&&(Or?Ot.bindFramebuffer(36160,Or.framebuffer):Ot.bindFramebuffer(36160,null),St.cur=Or),Pe.dirty){var hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln;hi=Fe.dither,hi!==Pe.dither&&(hi?Ot.enable(3024):Ot.disable(3024),Pe.dither=hi),Gi=si[0],Qr=si[1],(Gi!==Ei[0]||Qr!==Ei[1])&&(Ot.blendEquationSeparate(Gi,Qr),Ei[0]=Gi,Ei[1]=Qr),Ui=Fe.depth_func,Ui!==Pe.depth_func&&(Ot.depthFunc(Ui),Pe.depth_func=Ui),zn=Hi[0],fn=Hi[1],(zn!==Jr[0]||fn!==Jr[1])&&(Ot.depthRange(zn,fn),Jr[0]=zn,Jr[1]=fn),xn=Fe.depth_mask,xn!==Pe.depth_mask&&(Ot.depthMask(xn),Pe.depth_mask=xn),_a=ci[0],Wn=ci[1],Fn=ci[2],ia=ci[3],(_a!==Di[0]||Wn!==Di[1]||Fn!==Di[2]||ia!==Di[3])&&(Ot.colorMask(_a,Wn,Fn,ia),Di[0]=_a,Di[1]=Wn,Di[2]=Fn,Di[3]=ia),za=Fe.cull_enable,za!==Pe.cull_enable&&(za?Ot.enable(2884):Ot.disable(2884),Pe.cull_enable=za),Hr=Fe.cull_face,Hr!==Pe.cull_face&&(Ot.cullFace(Hr),Pe.cull_face=Hr),na=Fe.frontFace,na!==Pe.frontFace&&(Ot.frontFace(na),Pe.frontFace=na),go=Fe.lineWidth,go!==Pe.lineWidth&&(Ot.lineWidth(go),Pe.lineWidth=go),Dn=Fe.polygonOffset_enable,Dn!==Pe.polygonOffset_enable&&(Dn?Ot.enable(32823):Ot.disable(32823),Pe.polygonOffset_enable=Dn),un=Lt[0],Zn=Lt[1],(un!==vt[0]||Zn!==vt[1])&&(Ot.polygonOffset(un,Zn),vt[0]=un,vt[1]=Zn),Wo=Fe.sample_alpha,Wo!==Pe.sample_alpha&&(Wo?Ot.enable(32926):Ot.disable(32926),Pe.sample_alpha=Wo),Ba=Fe.sample_enable,Ba!==Pe.sample_enable&&(Ba?Ot.enable(32928):Ot.disable(32928),Pe.sample_enable=Ba),Bo=Dt[0],Ea=Dt[1],(Bo!==Bt[0]||Ea!==Bt[1])&&(Ot.sampleCoverage(Bo,Ea),Bt[0]=Bo,Bt[1]=Ea),Ha=Fe.stencil_mask,Ha!==Pe.stencil_mask&&(Ot.stencilMask(Ha),Pe.stencil_mask=Ha),tn=sr[0],Cn=sr[1],Xn=sr[2],(tn!==br[0]||Cn!==br[1]||Xn!==br[2])&&(Ot.stencilFunc(tn,Cn,Xn),br[0]=tn,br[1]=Cn,br[2]=Xn),ts=zr[0],Ja=zr[1],to=zr[2],Ri=zr[3],(ts!==Tr[0]||Ja!==Tr[1]||to!==Tr[2]||Ri!==Tr[3])&&(Ot.stencilOpSeparate(ts,Ja,to,Ri),Tr[0]=ts,Tr[1]=Ja,Tr[2]=to,Tr[3]=Ri),an=Rr[0],cs=Rr[1],pa=Rr[2],ln=Rr[3],(an!==Br[0]||cs!==Br[1]||pa!==Br[2]||ln!==Br[3])&&(Ot.stencilOpSeparate(an,cs,pa,ln),Br[0]=an,Br[1]=cs,Br[2]=pa,Br[3]=ln)}Ot.blendColor(0,0,0,1),Er[0]=0,Er[1]=0,Er[2]=0,Er[3]=1,Vt?Ot.enable(3042):Ot.disable(3042),Pe.blend_enable=Vt,Ot.blendFuncSeparate(770,771,773,1),xi[0]=770,xi[1]=771,xi[2]=773,xi[3]=1,Kt?Ot.enable(2929):Ot.disable(2929),Pe.depth_enable=Kt,ir?Ot.enable(3089):Ot.disable(3089),Pe.scissor_enable=ir,fr?Ot.enable(2960):Ot.disable(2960),Pe.stencil_enable=fr,st=Pe.profile,st&&(Wt=performance.now(),r.count+=sn),Ot.useProgram(s.program),tr=Zt.angle_instanced_arrays;var ka;for(ht.setVAO(null),Ot.uniform1i(z.location,!1),Ot.uniform1i(U.location,H.bind()),ka=Ie.instances,or=0;or<sn;++or){Nr=Mi[or];var va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il;va=Nr.viewport,bo=va.x|0,Co=va.y|0,Fi="width"in va?va.width|0:De.framebufferWidth-bo,Yn="height"in va?va.height|0:De.framebufferHeight-Co,xa=De.viewportWidth,De.viewportWidth=Fi,Qi=De.viewportHeight,De.viewportHeight=Yn,Ot.viewport(bo,Co,Fi,Yn),Yr[0]=bo,Yr[1]=Co,Yr[2]=Fi,Yr[3]=Yn,Nn=Nr.viewport,Pn=Nn.x|0,qa=Nn.y|0,jo="width"in Nn?Nn.width|0:De.framebufferWidth-Pn,Vo="height"in Nn?Nn.height|0:De.framebufferHeight-qa,Ot.scissor(Pn,qa,jo,Vo),vi[0]=Pn,vi[1]=qa,vi[2]=jo,vi[3]=Vo,Pa=u.call(this,De,Nr,or),Oa=!1,co=1,An=0,_o=0,ks=0,bs=0,ps=null,sa=0,Bn=!1,ms=5126,ya=0,on=0,mn=0,Lr(Pa)?(Oa=!0,ps=ye.createStream(34962,Pa),ms=ps.dtype):(ps=ye.getBuffer(Pa),ps?ms=ps.dtype:"constant"in Pa?(co=2,typeof Pa.constant=="number"?(An=Pa.constant,_o=ks=bs=0):(An=Pa.constant.length>0?Pa.constant[0]:0,_o=Pa.constant.length>1?Pa.constant[1]:0,ks=Pa.constant.length>2?Pa.constant[2]:0,bs=Pa.constant.length>3?Pa.constant[3]:0)):(Lr(Pa.buffer)?ps=ye.createStream(34962,Pa.buffer):ps=ye.getBuffer(Pa.buffer),ms="type"in Pa?Vi[Pa.type]:ps.dtype,Bn=!!Pa.normalized,sa=Pa.size|0,ya=Pa.offset|0,on=Pa.stride|0,mn=Pa.divisor|0)),Ga=l.location,ca=de[Ga],co===1?(ca.buffer||Ot.enableVertexAttribArray(Ga),bn=sa||4,(ca.type!==ms||ca.size!==bn||ca.buffer!==ps||ca.normalized!==Bn||ca.offset!==ya||ca.stride!==on)&&(Ot.bindBuffer(34962,ps.buffer),Ot.vertexAttribPointer(Ga,bn,ms,Bn,on,ya),ca.type=ms,ca.size=bn,ca.buffer=ps,ca.normalized=Bn,ca.offset=ya,ca.stride=on),ca.divisor!==mn&&(tr.vertexAttribDivisorANGLE(Ga,mn),ca.divisor=mn)):(ca.buffer&&(Ot.disableVertexAttribArray(Ga),ca.buffer=null),(ca.x!==An||ca.y!==_o||ca.z!==ks||ca.w!==bs)&&(Ot.vertexAttrib4f(Ga,An,_o,ks,bs),ca.x=An,ca.y=_o,ca.z=ks,ca.w=bs)),Xi=f.call(this,De,Nr,or),qn=!1,Ia=1,yn=0,Ya=0,ba=0,Da=0,Aa=null,Ln=0,wo=!1,wa=5126,$i=0,ea=0,Sa=0,Lr(Xi)?(qn=!0,Aa=ye.createStream(34962,Xi),wa=Aa.dtype):(Aa=ye.getBuffer(Xi),Aa?wa=Aa.dtype:"constant"in Xi?(Ia=2,typeof Xi.constant=="number"?(yn=Xi.constant,Ya=ba=Da=0):(yn=Xi.constant.length>0?Xi.constant[0]:0,Ya=Xi.constant.length>1?Xi.constant[1]:0,ba=Xi.constant.length>2?Xi.constant[2]:0,Da=Xi.constant.length>3?Xi.constant[3]:0)):(Lr(Xi.buffer)?Aa=ye.createStream(34962,Xi.buffer):Aa=ye.getBuffer(Xi.buffer),wa="type"in Xi?Vi[Xi.type]:Aa.dtype,wo=!!Xi.normalized,Ln=Xi.size|0,$i=Xi.offset|0,ea=Xi.stride|0,Sa=Xi.divisor|0)),Za=c.location,xo=de[Za],Ia===1?(xo.buffer||Ot.enableVertexAttribArray(Za),Wa=Ln||1,(xo.type!==wa||xo.size!==Wa||xo.buffer!==Aa||xo.normalized!==wo||xo.offset!==$i||xo.stride!==ea)&&(Ot.bindBuffer(34962,Aa.buffer),Ot.vertexAttribPointer(Za,Wa,wa,wo,ea,$i),xo.type=wa,xo.size=Wa,xo.buffer=Aa,xo.normalized=wo,xo.offset=$i,xo.stride=ea),xo.divisor!==Sa&&(tr.vertexAttribDivisorANGLE(Za,Sa),xo.divisor=Sa)):(xo.buffer&&(Ot.disableVertexAttribArray(Za),xo.buffer=null),(xo.x!==yn||xo.y!==Ya||xo.z!==ba||xo.w!==Da)&&(Ot.vertexAttrib4f(Za,yn,Ya,ba,Da),xo.x=yn,xo.y=Ya,xo.z=ba,xo.w=Da)),hn=h.call(this,De,Nr,or),Un=!1,Ss=1,Kn=0,ns=0,Jo=0,vo=0,ma=null,ja=0,To=!1,Ao=5126,la=0,Ki=0,ho=0,Lr(hn)?(Un=!0,ma=ye.createStream(34962,hn),Ao=ma.dtype):(ma=ye.getBuffer(hn),ma?Ao=ma.dtype:"constant"in hn?(Ss=2,typeof hn.constant=="number"?(Kn=hn.constant,ns=Jo=vo=0):(Kn=hn.constant.length>0?hn.constant[0]:0,ns=hn.constant.length>1?hn.constant[1]:0,Jo=hn.constant.length>2?hn.constant[2]:0,vo=hn.constant.length>3?hn.constant[3]:0)):(Lr(hn.buffer)?ma=ye.createStream(34962,hn.buffer):ma=ye.getBuffer(hn.buffer),Ao="type"in hn?Vi[hn.type]:ma.dtype,To=!!hn.normalized,ja=hn.size|0,la=hn.offset|0,Ki=hn.stride|0,ho=hn.divisor|0)),Ka=d.location,Ca=de[Ka],Ss===1?(Ca.buffer||Ot.enableVertexAttribArray(Ka),ta=ja||4,(Ca.type!==Ao||Ca.size!==ta||Ca.buffer!==ma||Ca.normalized!==To||Ca.offset!==la||Ca.stride!==Ki)&&(Ot.bindBuffer(34962,ma.buffer),Ot.vertexAttribPointer(Ka,ta,Ao,To,Ki,la),Ca.type=Ao,Ca.size=ta,Ca.buffer=ma,Ca.normalized=To,Ca.offset=la,Ca.stride=Ki),Ca.divisor!==ho&&(tr.vertexAttribDivisorANGLE(Ka,ho),Ca.divisor=ho)):(Ca.buffer&&(Ot.disableVertexAttribArray(Ka),Ca.buffer=null),(Ca.x!==Kn||Ca.y!==ns||Ca.z!==Jo||Ca.w!==vo)&&(Ot.vertexAttrib4f(Ka,Kn,ns,Jo,vo),Ca.x=Kn,Ca.y=ns,Ca.z=Jo,Ca.w=vo)),En=p.call(this,De,Nr,or),Mo=!1,Ds=1,Ro=0,vs=0,Ks=0,as=0,Jn=null,Cs=0,Xa=!1,Zo=5126,Eo=0,lo=0,$a=0,Lr(En)?(Mo=!0,Jn=ye.createStream(34962,En),Zo=Jn.dtype):(Jn=ye.getBuffer(En),Jn?Zo=Jn.dtype:"constant"in En?(Ds=2,typeof En.constant=="number"?(Ro=En.constant,vs=Ks=as=0):(Ro=En.constant.length>0?En.constant[0]:0,vs=En.constant.length>1?En.constant[1]:0,Ks=En.constant.length>2?En.constant[2]:0,as=En.constant.length>3?En.constant[3]:0)):(Lr(En.buffer)?Jn=ye.createStream(34962,En.buffer):Jn=ye.getBuffer(En.buffer),Zo="type"in En?Vi[En.type]:Jn.dtype,Xa=!!En.normalized,Cs=En.size|0,Eo=En.offset|0,lo=En.stride|0,$a=En.divisor|0)),Xo=x.location,rs=de[Xo],Ds===1?(rs.buffer||Ot.enableVertexAttribArray(Xo),$n=Cs||1,(rs.type!==Zo||rs.size!==$n||rs.buffer!==Jn||rs.normalized!==Xa||rs.offset!==Eo||rs.stride!==lo)&&(Ot.bindBuffer(34962,Jn.buffer),Ot.vertexAttribPointer(Xo,$n,Zo,Xa,lo,Eo),rs.type=Zo,rs.size=$n,rs.buffer=Jn,rs.normalized=Xa,rs.offset=Eo,rs.stride=lo),rs.divisor!==$a&&(tr.vertexAttribDivisorANGLE(Xo,$a),rs.divisor=$a)):(rs.buffer&&(Ot.disableVertexAttribArray(Xo),rs.buffer=null),(rs.x!==Ro||rs.y!==vs||rs.z!==Ks||rs.w!==as)&&(Ot.vertexAttrib4f(Xo,Ro,vs,Ks,as),rs.x=Ro,rs.y=vs,rs.z=Ks,rs.w=as)),Sn=b.call(this,De,Nr,or),uo=!1,Rs=1,xs=0,Go=0,os=0,So=0,Qn=null,zo=0,rl=!1,$o=5126,Na=0,Ua=0,Po=0,Lr(Sn)?(uo=!0,Qn=ye.createStream(34962,Sn),$o=Qn.dtype):(Qn=ye.getBuffer(Sn),Qn?$o=Qn.dtype:"constant"in Sn?(Rs=2,typeof Sn.constant=="number"?(xs=Sn.constant,Go=os=So=0):(xs=Sn.constant.length>0?Sn.constant[0]:0,Go=Sn.constant.length>1?Sn.constant[1]:0,os=Sn.constant.length>2?Sn.constant[2]:0,So=Sn.constant.length>3?Sn.constant[3]:0)):(Lr(Sn.buffer)?Qn=ye.createStream(34962,Sn.buffer):Qn=ye.getBuffer(Sn.buffer),$o="type"in Sn?Vi[Sn.type]:Qn.dtype,rl=!!Sn.normalized,zo=Sn.size|0,Na=Sn.offset|0,Ua=Sn.stride|0,Po=Sn.divisor|0)),fo=y.location,ro=de[fo],Rs===1?(ro.buffer||Ot.enableVertexAttribArray(fo),Ma=zo||1,(ro.type!==$o||ro.size!==Ma||ro.buffer!==Qn||ro.normalized!==rl||ro.offset!==Na||ro.stride!==Ua)&&(Ot.bindBuffer(34962,Qn.buffer),Ot.vertexAttribPointer(fo,Ma,$o,rl,Ua,Na),ro.type=$o,ro.size=Ma,ro.buffer=Qn,ro.normalized=rl,ro.offset=Na,ro.stride=Ua),ro.divisor!==Po&&(tr.vertexAttribDivisorANGLE(fo,Po),ro.divisor=Po)):(ro.buffer&&(Ot.disableVertexAttribArray(fo),ro.buffer=null),(ro.x!==xs||ro.y!==Go||ro.z!==os||ro.w!==So)&&(Ot.vertexAttrib4f(fo,xs,Go,os,So),ro.x=xs,ro.y=Go,ro.z=os,ro.w=So)),io=k.call(this,De,Nr,or),aa=!1,Oo=1,No=0,Zs=0,Fs=0,ws=0,no=null,Ls=0,ds=!1,Xs=5126,oa=0,Yo=0,po=0,Lr(io)?(aa=!0,no=ye.createStream(34962,io),Xs=no.dtype):(no=ye.getBuffer(io),no?Xs=no.dtype:"constant"in io?(Oo=2,typeof io.constant=="number"?(No=io.constant,Zs=Fs=ws=0):(No=io.constant.length>0?io.constant[0]:0,Zs=io.constant.length>1?io.constant[1]:0,Fs=io.constant.length>2?io.constant[2]:0,ws=io.constant.length>3?io.constant[3]:0)):(Lr(io.buffer)?no=ye.createStream(34962,io.buffer):no=ye.getBuffer(io.buffer),Xs="type"in io?Vi[io.type]:no.dtype,ds=!!io.normalized,Ls=io.size|0,oa=io.offset|0,Yo=io.stride|0,po=io.divisor|0)),ss=E.location,ls=de[ss],Oo===1?(ls.buffer||Ot.enableVertexAttribArray(ss),gs=Ls||1,(ls.type!==Xs||ls.size!==gs||ls.buffer!==no||ls.normalized!==ds||ls.offset!==oa||ls.stride!==Yo)&&(Ot.bindBuffer(34962,no.buffer),Ot.vertexAttribPointer(ss,gs,Xs,ds,Yo,oa),ls.type=Xs,ls.size=gs,ls.buffer=no,ls.normalized=ds,ls.offset=oa,ls.stride=Yo),ls.divisor!==po&&(tr.vertexAttribDivisorANGLE(ss,po),ls.divisor=po)):(ls.buffer&&(Ot.disableVertexAttribArray(ss),ls.buffer=null),(ls.x!==No||ls.y!==Zs||ls.z!==Fs||ls.w!==ws)&&(Ot.vertexAttrib4f(ss,No,Zs,Fs,ws),ls.x=No,ls.y=Zs,ls.z=Fs,ls.w=ws)),bt=A.call(this,De,Nr,or),Ft=!1,hr=1,nr=0,Sr=0,li=0,di=0,mi=null,Oi=0,dn=!1,wi=5126,ui=0,Ai=0,gi=0,Lr(bt)?(Ft=!0,mi=ye.createStream(34962,bt),wi=mi.dtype):(mi=ye.getBuffer(bt),mi?wi=mi.dtype:"constant"in bt?(hr=2,typeof bt.constant=="number"?(nr=bt.constant,Sr=li=di=0):(nr=bt.constant.length>0?bt.constant[0]:0,Sr=bt.constant.length>1?bt.constant[1]:0,li=bt.constant.length>2?bt.constant[2]:0,di=bt.constant.length>3?bt.constant[3]:0)):(Lr(bt.buffer)?mi=ye.createStream(34962,bt.buffer):mi=ye.getBuffer(bt.buffer),wi="type"in bt?Vi[bt.type]:mi.dtype,dn=!!bt.normalized,Oi=bt.size|0,ui=bt.offset|0,Ai=bt.stride|0,gi=bt.divisor|0)),gn=L.location,In=de[gn],hr===1?(In.buffer||Ot.enableVertexAttribArray(gn),Vn=Oi||1,(In.type!==wi||In.size!==Vn||In.buffer!==mi||In.normalized!==dn||In.offset!==ui||In.stride!==Ai)&&(Ot.bindBuffer(34962,mi.buffer),Ot.vertexAttribPointer(gn,Vn,wi,dn,Ai,ui),In.type=wi,In.size=Vn,In.buffer=mi,In.normalized=dn,In.offset=ui,In.stride=Ai),In.divisor!==gi&&(tr.vertexAttribDivisorANGLE(gn,gi),In.divisor=gi)):(In.buffer&&(Ot.disableVertexAttribArray(gn),In.buffer=null),(In.x!==nr||In.y!==Sr||In.z!==li||In.w!==di)&&(Ot.vertexAttrib4f(gn,nr,Sr,li,di),In.x=nr,In.y=Sr,In.z=li,In.w=di)),Rn=_.call(this,De,Nr,or),Hn=!1,Gn=1,pn=0,Lo=0,us=0,Bs=0,Js=null,ol=0,Cl=!1,ul=5126,Gl=0,Vl=0,Fl=0,Lr(Rn)?(Hn=!0,Js=ye.createStream(34962,Rn),ul=Js.dtype):(Js=ye.getBuffer(Rn),Js?ul=Js.dtype:"constant"in Rn?(Gn=2,typeof Rn.constant=="number"?(pn=Rn.constant,Lo=us=Bs=0):(pn=Rn.constant.length>0?Rn.constant[0]:0,Lo=Rn.constant.length>1?Rn.constant[1]:0,us=Rn.constant.length>2?Rn.constant[2]:0,Bs=Rn.constant.length>3?Rn.constant[3]:0)):(Lr(Rn.buffer)?Js=ye.createStream(34962,Rn.buffer):Js=ye.getBuffer(Rn.buffer),ul="type"in Rn?Vi[Rn.type]:Js.dtype,Cl=!!Rn.normalized,ol=Rn.size|0,Gl=Rn.offset|0,Vl=Rn.stride|0,Fl=Rn.divisor|0)),ga=C.location,ko=de[ga],Gn===1?(ko.buffer||Ot.enableVertexAttribArray(ga),zs=ol||1,(ko.type!==ul||ko.size!==zs||ko.buffer!==Js||ko.normalized!==Cl||ko.offset!==Gl||ko.stride!==Vl)&&(Ot.bindBuffer(34962,Js.buffer),Ot.vertexAttribPointer(ga,zs,ul,Cl,Vl,Gl),ko.type=ul,ko.size=zs,ko.buffer=Js,ko.normalized=Cl,ko.offset=Gl,ko.stride=Vl),ko.divisor!==Fl&&(tr.vertexAttribDivisorANGLE(ga,Fl),ko.divisor=Fl)):(ko.buffer&&(Ot.disableVertexAttribArray(ga),ko.buffer=null),(ko.x!==pn||ko.y!==Lo||ko.z!==us||ko.w!==Bs)&&(Ot.vertexAttrib4f(ga,pn,Lo,us,Bs),ko.x=pn,ko.y=Lo,ko.z=us,ko.w=Bs)),Fo=M.call(this,De,Nr,or),Ys=!1,Gs=1,Us=0,Sl=0,_l=0,kl=0,cl=null,xl=0,Uo=!1,_s=5126,Bl=0,Il=0,Dl=0,Lr(Fo)?(Ys=!0,cl=ye.createStream(34962,Fo),_s=cl.dtype):(cl=ye.getBuffer(Fo),cl?_s=cl.dtype:"constant"in Fo?(Gs=2,typeof Fo.constant=="number"?(Us=Fo.constant,Sl=_l=kl=0):(Us=Fo.constant.length>0?Fo.constant[0]:0,Sl=Fo.constant.length>1?Fo.constant[1]:0,_l=Fo.constant.length>2?Fo.constant[2]:0,kl=Fo.constant.length>3?Fo.constant[3]:0)):(Lr(Fo.buffer)?cl=ye.createStream(34962,Fo.buffer):cl=ye.getBuffer(Fo.buffer),_s="type"in Fo?Vi[Fo.type]:cl.dtype,Uo=!!Fo.normalized,xl=Fo.size|0,Bl=Fo.offset|0,Il=Fo.stride|0,Dl=Fo.divisor|0)),oe=v.location,w=de[oe],Gs===1?(w.buffer||Ot.enableVertexAttribArray(oe),B=xl||1,(w.type!==_s||w.size!==B||w.buffer!==cl||w.normalized!==Uo||w.offset!==Bl||w.stride!==Il)&&(Ot.bindBuffer(34962,cl.buffer),Ot.vertexAttribPointer(oe,B,_s,Uo,Il,Bl),w.type=_s,w.size=B,w.buffer=cl,w.normalized=Uo,w.offset=Bl,w.stride=Il),w.divisor!==Dl&&(tr.vertexAttribDivisorANGLE(oe,Dl),w.divisor=Dl)):(w.buffer&&(Ot.disableVertexAttribArray(oe),w.buffer=null),(w.x!==Us||w.y!==Sl||w.z!==_l||w.w!==kl)&&(Ot.vertexAttrib4f(oe,Us,Sl,_l,kl),w.x=Us,w.y=Sl,w.z=_l,w.w=kl)),Q=Nr.opacity,(!or||ee!==Q)&&(ee=Q,Ot.uniform1f(T.location,Q)),le=q.call(this,De,Nr,or),Ne=le[0],pt=le[1],(!or||$e!==Ne||zt!==pt)&&($e=Ne,zt=pt,Ot.uniform2f(F.location,Ne,pt)),Yt=De.pixelRatio,(!or||Jt!==Yt)&&(Jt=Yt,Ot.uniform1f(j.location,Yt)),yr=Nr.scale,Ir=yr[0],Ae=yr[1],(!or||ce!==Ir||qe!==Ae)&&(ce=Ir,qe=Ae,Ot.uniform2f(G.location,Ir,Ae)),Ve=Nr.scaleFract,ot=Ve[0],ft=Ve[1],(!or||Ke!==ot||qt!==ft)&&(Ke=ot,qt=ft,Ot.uniform2f(O.location,ot,ft)),Xt=Nr.translate,$t=Xt[0],Mr=Xt[1],(!or||dr!==$t||$r!==Mr)&&(dr=$t,$r=Mr,Ot.uniform2f(W.location,$t,Mr)),ii=Nr.translateFract,pi=ii[0],wn=ii[1],(!or||Yi!==pi||Tn!==wn)&&(Yi=pi,Tn=wn,Ot.uniform2f(re.location,pi,wn)),ua=Nr.elements,oo=null,el=Lr(ua),el?oo=lt.createStream(ua):oo=lt.getElements(ua),oo&&Ot.bindBuffer(34963,oo.buffer.buffer),ys=Nr.offset,il=Nr.count,il&&(ka>0?oo?tr.drawElementsInstancedANGLE(0,il,oo.type,ys<<(oo.type-5121>>1),ka):tr.drawArraysInstancedANGLE(0,ys,il,ka):ka<0&&(oo?Ot.drawElements(0,il,oo.type,ys<<(oo.type-5121>>1)):Ot.drawArrays(0,ys,il)),De.viewportWidth=xa,De.viewportHeight=Qi,Oa&&ye.destroyStream(ps),qn&&ye.destroyStream(Aa),Un&&ye.destroyStream(ma),Mo&&ye.destroyStream(Jn),uo&&ye.destroyStream(Qn),aa&&ye.destroyStream(no),Ft&&ye.destroyStream(mi),Hn&&ye.destroyStream(Js),Ys&&ye.destroyStream(cl),el&&lt.destroyStream(oo))}H.unbind(),Pe.dirty=!0,ht.setVAO(null),st&&(r.cpuTime+=performance.now()-Wt)}}}});var C9=Se((o1r,VOe)=>{VOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt){"use strict";var je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti;return je=t.gl,tt=t.context,Je=t.strings,Mt=t.next,Vt=t.current,Kt=t.draw,ir=t.elements,fr=t.buffer,Ot=t.shader,De=t.attributes,_e=t.vao,Fe=t.uniforms,Pe=t.framebuffer,Ie=t.extensions,lt=t.timer,ye=t.isBufferArgs,ue=Mt.blend_color,de=Vt.blend_color,ht=Mt.blend_equation,Et=Vt.blend_equation,St=Mt.blend_func,Zt=Vt.blend_func,qr=Mt.depth_range,Lr=Vt.depth_range,vr=Mt.colorMask,Er=Vt.colorMask,si=Mt.polygonOffset_offset,Ei=Vt.polygonOffset_offset,Si=Mt.sample_coverage,xi=Vt.sample_coverage,Hi=Mt.stencil_func,Jr=Vt.stencil_func,ci=Mt.stencil_opFront,Di=Vt.stencil_opFront,Lt=Mt.stencil_opBack,vt=Vt.stencil_opBack,Dt=Mt.scissor_box,Bt=Vt.scissor_box,sr=Mt.viewport,br=Vt.viewport,zr={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Tr={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},Rr={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},Br={add:32774,subtract:32778,"reverse subtract":32779},oi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},vi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Pi={cw:2304,ccw:2305},Yr={},Yr.buffer=n,Yr.divisor=1,Ni={},Ni.buffer=i,Ni.divisor=1,Ur={},Ur.buffer=a,Ur.divisor=1,ti={},ti.buffer=o,ti.divisor=1,{draw:function(ki){var ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro;if(ji=Ie.angle_instanced_arrays,Vi=Pe.next,Vi!==Pe.cur&&(Vi?je.bindFramebuffer(36160,Vi.framebuffer):je.bindFramebuffer(36160,null),Pe.cur=Vi),Vt.dirty){var vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo;vs=Mt.dither,vs!==Vt.dither&&(vs?je.enable(3024):je.disable(3024),Vt.dither=vs),Ks=Mt.depth_func,Ks!==Vt.depth_func&&(je.depthFunc(Ks),Vt.depth_func=Ks),as=qr[0],Jn=qr[1],(as!==Lr[0]||Jn!==Lr[1])&&(je.depthRange(as,Jn),Lr[0]=as,Lr[1]=Jn),Cs=Mt.depth_mask,Cs!==Vt.depth_mask&&(je.depthMask(Cs),Vt.depth_mask=Cs),Xa=vr[0],Zo=vr[1],Eo=vr[2],lo=vr[3],(Xa!==Er[0]||Zo!==Er[1]||Eo!==Er[2]||lo!==Er[3])&&(je.colorMask(Xa,Zo,Eo,lo),Er[0]=Xa,Er[1]=Zo,Er[2]=Eo,Er[3]=lo),$a=Mt.cull_enable,$a!==Vt.cull_enable&&($a?je.enable(2884):je.disable(2884),Vt.cull_enable=$a),Xo=Mt.cull_face,Xo!==Vt.cull_face&&(je.cullFace(Xo),Vt.cull_face=Xo),rs=Mt.frontFace,rs!==Vt.frontFace&&(je.frontFace(rs),Vt.frontFace=rs),$n=Mt.lineWidth,$n!==Vt.lineWidth&&(je.lineWidth($n),Vt.lineWidth=$n),Sn=Mt.polygonOffset_enable,Sn!==Vt.polygonOffset_enable&&(Sn?je.enable(32823):je.disable(32823),Vt.polygonOffset_enable=Sn),uo=si[0],Rs=si[1],(uo!==Ei[0]||Rs!==Ei[1])&&(je.polygonOffset(uo,Rs),Ei[0]=uo,Ei[1]=Rs),xs=Mt.sample_alpha,xs!==Vt.sample_alpha&&(xs?je.enable(32926):je.disable(32926),Vt.sample_alpha=xs),Go=Mt.sample_enable,Go!==Vt.sample_enable&&(Go?je.enable(32928):je.disable(32928),Vt.sample_enable=Go),os=Si[0],So=Si[1],(os!==xi[0]||So!==xi[1])&&(je.sampleCoverage(os,So),xi[0]=os,xi[1]=So),Qn=Mt.stencil_enable,Qn!==Vt.stencil_enable&&(Qn?je.enable(2960):je.disable(2960),Vt.stencil_enable=Qn),zo=Mt.stencil_mask,zo!==Vt.stencil_mask&&(je.stencilMask(zo),Vt.stencil_mask=zo),rl=Hi[0],$o=Hi[1],Na=Hi[2],(rl!==Jr[0]||$o!==Jr[1]||Na!==Jr[2])&&(je.stencilFunc(rl,$o,Na),Jr[0]=rl,Jr[1]=$o,Jr[2]=Na),Ua=ci[0],Po=ci[1],fo=ci[2],ro=ci[3],(Ua!==Di[0]||Po!==Di[1]||fo!==Di[2]||ro!==Di[3])&&(je.stencilOpSeparate(Ua,Po,fo,ro),Di[0]=Ua,Di[1]=Po,Di[2]=fo,Di[3]=ro),Ma=Lt[0],io=Lt[1],aa=Lt[2],Oo=Lt[3],(Ma!==vt[0]||io!==vt[1]||aa!==vt[2]||Oo!==vt[3])&&(je.stencilOpSeparate(Ma,io,aa,Oo),vt[0]=Ma,vt[1]=io,vt[2]=aa,vt[3]=Oo)}zi=ki.viewport,Mi=zi.x|0,sn=zi.y|0,fi="width"in zi?zi.width|0:tt.framebufferWidth-Mi,Or="height"in zi?zi.height|0:tt.framebufferHeight-sn,st=tt.viewportWidth,tt.viewportWidth=fi,Wt=tt.viewportHeight,tt.viewportHeight=Or,je.viewport(Mi,sn,fi,Or),br[0]=Mi,br[1]=sn,br[2]=fi,br[3]=Or,je.blendColor(0,0,0,0),de[0]=0,de[1]=0,de[2]=0,de[3]=0,s?je.enable(3042):je.disable(3042),Vt.blend_enable=s,je.blendEquationSeparate(32774,32774),Et[0]=32774,Et[1]=32774,je.blendFuncSeparate(770,771,773,1),Zt[0]=770,Zt[1]=771,Zt[2]=773,Zt[3]=1,u?je.enable(2929):je.disable(2929),Vt.depth_enable=u,tr=ki.viewport,or=tr.x|0,Nr=tr.y|0,hi="width"in tr?tr.width|0:tt.framebufferWidth-or,Gi="height"in tr?tr.height|0:tt.framebufferHeight-Nr,je.scissor(or,Nr,hi,Gi),Bt[0]=or,Bt[1]=Nr,Bt[2]=hi,Bt[3]=Gi,l?je.enable(3089):je.disable(3089),Vt.scissor_enable=l,Qr=Vt.profile,Qr&&(Ui=performance.now(),r.count++),je.useProgram(f.program),zn=Ie.angle_instanced_arrays,_e.setVAO(null),fn=h.location,xn=De[fn],xn.buffer||je.enableVertexAttribArray(fn),(xn.type!==5126||xn.size!==2||xn.buffer!==c||xn.normalized!==!1||xn.offset!==16||xn.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(fn,2,5126,!1,24,16),xn.type=5126,xn.size=2,xn.buffer=c,xn.normalized=!1,xn.offset=16,xn.stride=24),xn.divisor!==0&&(zn.vertexAttribDivisorANGLE(fn,0),xn.divisor=0),_a=d.call(this,tt,ki,0),Yr.offset=_a,Wn=!1,Fn=1,ia=0,za=0,Hr=0,na=0,go=null,Dn=0,un=!1,Zn=5126,Wo=0,Ba=0,Bo=0,ye(Yr)?(Wn=!0,go=fr.createStream(34962,Yr),Zn=go.dtype):(go=fr.getBuffer(Yr),go?Zn=go.dtype:"constant"in Yr?(Fn=2,typeof Yr.constant=="number"?(ia=Yr.constant,za=Hr=na=0):(ia=Yr.constant.length>0?Yr.constant[0]:0,za=Yr.constant.length>1?Yr.constant[1]:0,Hr=Yr.constant.length>2?Yr.constant[2]:0,na=Yr.constant.length>3?Yr.constant[3]:0)):(ye(Yr.buffer)?go=fr.createStream(34962,Yr.buffer):go=fr.getBuffer(Yr.buffer),Zn="type"in Yr?vi[Yr.type]:go.dtype,un=!!Yr.normalized,Dn=Yr.size|0,Wo=Yr.offset|0,Ba=Yr.stride|0,Bo=Yr.divisor|0)),Ea=p.location,Ha=De[Ea],Fn===1?(Ha.buffer||je.enableVertexAttribArray(Ea),tn=Dn||4,(Ha.type!==Zn||Ha.size!==tn||Ha.buffer!==go||Ha.normalized!==un||Ha.offset!==Wo||Ha.stride!==Ba)&&(je.bindBuffer(34962,go.buffer),je.vertexAttribPointer(Ea,tn,Zn,un,Ba,Wo),Ha.type=Zn,Ha.size=tn,Ha.buffer=go,Ha.normalized=un,Ha.offset=Wo,Ha.stride=Ba),Ha.divisor!==Bo&&(zn.vertexAttribDivisorANGLE(Ea,Bo),Ha.divisor=Bo)):(Ha.buffer&&(je.disableVertexAttribArray(Ea),Ha.buffer=null),(Ha.x!==ia||Ha.y!==za||Ha.z!==Hr||Ha.w!==na)&&(je.vertexAttrib4f(Ea,ia,za,Hr,na),Ha.x=ia,Ha.y=za,Ha.z=Hr,Ha.w=na)),Cn=x.location,Xn=De[Cn],Xn.buffer||je.enableVertexAttribArray(Cn),(Xn.type!==5126||Xn.size!==2||Xn.buffer!==c||Xn.normalized!==!1||Xn.offset!==0||Xn.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(Cn,2,5126,!1,24,0),Xn.type=5126,Xn.size=2,Xn.buffer=c,Xn.normalized=!1,Xn.offset=0,Xn.stride=24),Xn.divisor!==0&&(zn.vertexAttribDivisorANGLE(Cn,0),Xn.divisor=0),ts=b.call(this,tt,ki,0),ti.offset=ts,Ja=!1,to=1,Ri=0,an=0,cs=0,pa=0,ln=null,ka=0,va=!1,bo=5126,Co=0,Fi=0,Yn=0,ye(ti)?(Ja=!0,ln=fr.createStream(34962,ti),bo=ln.dtype):(ln=fr.getBuffer(ti),ln?bo=ln.dtype:"constant"in ti?(to=2,typeof ti.constant=="number"?(Ri=ti.constant,an=cs=pa=0):(Ri=ti.constant.length>0?ti.constant[0]:0,an=ti.constant.length>1?ti.constant[1]:0,cs=ti.constant.length>2?ti.constant[2]:0,pa=ti.constant.length>3?ti.constant[3]:0)):(ye(ti.buffer)?ln=fr.createStream(34962,ti.buffer):ln=fr.getBuffer(ti.buffer),bo="type"in ti?vi[ti.type]:ln.dtype,va=!!ti.normalized,ka=ti.size|0,Co=ti.offset|0,Fi=ti.stride|0,Yn=ti.divisor|0)),xa=y.location,Qi=De[xa],to===1?(Qi.buffer||je.enableVertexAttribArray(xa),Nn=ka||4,(Qi.type!==bo||Qi.size!==Nn||Qi.buffer!==ln||Qi.normalized!==va||Qi.offset!==Co||Qi.stride!==Fi)&&(je.bindBuffer(34962,ln.buffer),je.vertexAttribPointer(xa,Nn,bo,va,Fi,Co),Qi.type=bo,Qi.size=Nn,Qi.buffer=ln,Qi.normalized=va,Qi.offset=Co,Qi.stride=Fi),Qi.divisor!==Yn&&(zn.vertexAttribDivisorANGLE(xa,Yn),Qi.divisor=Yn)):(Qi.buffer&&(je.disableVertexAttribArray(xa),Qi.buffer=null),(Qi.x!==Ri||Qi.y!==an||Qi.z!==cs||Qi.w!==pa)&&(je.vertexAttrib4f(xa,Ri,an,cs,pa),Qi.x=Ri,Qi.y=an,Qi.z=cs,Qi.w=pa)),Pn=k.location,qa=De[Pn],qa.buffer||je.enableVertexAttribArray(Pn),(qa.type!==5126||qa.size!==2||qa.buffer!==c||qa.normalized!==!1||qa.offset!==8||qa.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(Pn,2,5126,!1,24,8),qa.type=5126,qa.size=2,qa.buffer=c,qa.normalized=!1,qa.offset=8,qa.stride=24),qa.divisor!==0&&(zn.vertexAttribDivisorANGLE(Pn,0),qa.divisor=0),jo=E.call(this,tt,ki,0),Ni.offset=jo,Vo=!1,Pa=1,Oa=0,co=0,An=0,_o=0,ks=null,bs=0,ps=!1,sa=5126,Bn=0,ms=0,ya=0,ye(Ni)?(Vo=!0,ks=fr.createStream(34962,Ni),sa=ks.dtype):(ks=fr.getBuffer(Ni),ks?sa=ks.dtype:"constant"in Ni?(Pa=2,typeof Ni.constant=="number"?(Oa=Ni.constant,co=An=_o=0):(Oa=Ni.constant.length>0?Ni.constant[0]:0,co=Ni.constant.length>1?Ni.constant[1]:0,An=Ni.constant.length>2?Ni.constant[2]:0,_o=Ni.constant.length>3?Ni.constant[3]:0)):(ye(Ni.buffer)?ks=fr.createStream(34962,Ni.buffer):ks=fr.getBuffer(Ni.buffer),sa="type"in Ni?vi[Ni.type]:ks.dtype,ps=!!Ni.normalized,bs=Ni.size|0,Bn=Ni.offset|0,ms=Ni.stride|0,ya=Ni.divisor|0)),on=A.location,mn=De[on],Pa===1?(mn.buffer||je.enableVertexAttribArray(on),Ga=bs||2,(mn.type!==sa||mn.size!==Ga||mn.buffer!==ks||mn.normalized!==ps||mn.offset!==Bn||mn.stride!==ms)&&(je.bindBuffer(34962,ks.buffer),je.vertexAttribPointer(on,Ga,sa,ps,ms,Bn),mn.type=sa,mn.size=Ga,mn.buffer=ks,mn.normalized=ps,mn.offset=Bn,mn.stride=ms),mn.divisor!==ya&&(zn.vertexAttribDivisorANGLE(on,ya),mn.divisor=ya)):(mn.buffer&&(je.disableVertexAttribArray(on),mn.buffer=null),(mn.x!==Oa||mn.y!==co||mn.z!==An||mn.w!==_o)&&(je.vertexAttrib4f(on,Oa,co,An,_o),mn.x=Oa,mn.y=co,mn.z=An,mn.w=_o)),ca=L.call(this,tt,ki,0),Ur.offset=ca,bn=!1,Xi=1,qn=0,Ia=0,yn=0,Ya=0,ba=null,Da=0,Aa=!1,Ln=5126,wo=0,wa=0,$i=0,ye(Ur)?(bn=!0,ba=fr.createStream(34962,Ur),Ln=ba.dtype):(ba=fr.getBuffer(Ur),ba?Ln=ba.dtype:"constant"in Ur?(Xi=2,typeof Ur.constant=="number"?(qn=Ur.constant,Ia=yn=Ya=0):(qn=Ur.constant.length>0?Ur.constant[0]:0,Ia=Ur.constant.length>1?Ur.constant[1]:0,yn=Ur.constant.length>2?Ur.constant[2]:0,Ya=Ur.constant.length>3?Ur.constant[3]:0)):(ye(Ur.buffer)?ba=fr.createStream(34962,Ur.buffer):ba=fr.getBuffer(Ur.buffer),Ln="type"in Ur?vi[Ur.type]:ba.dtype,Aa=!!Ur.normalized,Da=Ur.size|0,wo=Ur.offset|0,wa=Ur.stride|0,$i=Ur.divisor|0)),ea=_.location,Sa=De[ea],Xi===1?(Sa.buffer||je.enableVertexAttribArray(ea),Za=Da||2,(Sa.type!==Ln||Sa.size!==Za||Sa.buffer!==ba||Sa.normalized!==Aa||Sa.offset!==wo||Sa.stride!==wa)&&(je.bindBuffer(34962,ba.buffer),je.vertexAttribPointer(ea,Za,Ln,Aa,wa,wo),Sa.type=Ln,Sa.size=Za,Sa.buffer=ba,Sa.normalized=Aa,Sa.offset=wo,Sa.stride=wa),Sa.divisor!==$i&&(zn.vertexAttribDivisorANGLE(ea,$i),Sa.divisor=$i)):(Sa.buffer&&(je.disableVertexAttribArray(ea),Sa.buffer=null),(Sa.x!==qn||Sa.y!==Ia||Sa.z!==yn||Sa.w!==Ya)&&(je.vertexAttrib4f(ea,qn,Ia,yn,Ya),Sa.x=qn,Sa.y=Ia,Sa.z=yn,Sa.w=Ya)),xo=ki.capSize,je.uniform1f(C.location,xo),Wa=ki.lineWidth,je.uniform1f(M.location,Wa),hn=ki.opacity,je.uniform1f(v.location,hn),Un=ki.scale,Ss=Un[0],Kn=Un[1],je.uniform2f(z.location,Ss,Kn),ns=ki.scaleFract,Jo=ns[0],vo=ns[1],je.uniform2f(T.location,Jo,vo),ma=ki.translate,ja=ma[0],To=ma[1],je.uniform2f(F.location,ja,To),Ao=ki.translateFract,la=Ao[0],Ki=Ao[1],je.uniform2f(q.location,la,Ki),ho=H.call(this,tt,ki,0),Ka=ho[0],Ca=ho[1],ta=ho[2],En=ho[3],je.uniform4f(U.location,Ka,Ca,ta,En),Mo=Kt.elements,Mo?je.bindBuffer(34963,Mo.buffer.buffer):_e.currentVAO&&(Mo=ir.getElements(_e.currentVAO.elements),Mo&&je.bindBuffer(34963,Mo.buffer.buffer)),Ds=Kt.offset,Ro=ki.count,Ro>0?Mo?zn.drawElementsInstancedANGLE(4,36,Mo.type,Ds<<(Mo.type-5121>>1),Ro):zn.drawArraysInstancedANGLE(4,Ds,36,Ro):Ro<0&&(Mo?je.drawElements(4,36,Mo.type,Ds<<(Mo.type-5121>>1)):je.drawArrays(4,Ds,36)),Vt.dirty=!0,_e.setVAO(null),tt.viewportWidth=st,tt.viewportHeight=Wt,Qr&&(r.cpuTime+=performance.now()-Ui),Wn&&fr.destroyStream(go),Ja&&fr.destroyStream(ln),Vo&&fr.destroyStream(ks),bn&&fr.destroyStream(ba)},scope:function(ki,ji,Vi){var zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l;zi=ki.viewport,Mi=zi.x|0,sn=zi.y|0,fi="width"in zi?zi.width|0:tt.framebufferWidth-Mi,Or="height"in zi?zi.height|0:tt.framebufferHeight-sn,st=tt.viewportWidth,tt.viewportWidth=fi,Wt=tt.viewportHeight,tt.viewportHeight=Or,tr=sr[0],sr[0]=Mi,or=sr[1],sr[1]=sn,Nr=sr[2],sr[2]=fi,hi=sr[3],sr[3]=Or,Gi=ue[0],ue[0]=j,Qr=ue[1],ue[1]=G,Ui=ue[2],ue[2]=O,zn=ue[3],ue[3]=W,fn=Mt.blend_enable,Mt.blend_enable=re,xn=ht[0],ht[0]=ne,_a=ht[1],ht[1]=be,Wn=St[0],St[0]=ze,Fn=St[1],St[1]=Ce,ia=St[2],St[2]=he,za=St[3],St[3]=te,Hr=Mt.depth_enable,Mt.depth_enable=ke,na=ki.viewport,go=na.x|0,Dn=na.y|0,un="width"in na?na.width|0:tt.framebufferWidth-go,Zn="height"in na?na.height|0:tt.framebufferHeight-Dn,Wo=Dt[0],Dt[0]=go,Ba=Dt[1],Dt[1]=Dn,Bo=Dt[2],Dt[2]=un,Ea=Dt[3],Dt[3]=Zn,Ha=Mt.scissor_enable,Mt.scissor_enable=Ee,tn=Vt.profile,tn&&(Cn=performance.now(),r.count++),Xn=Kt.count,Kt.count=Me,ts=ki.count,Ja=Kt.instances,Kt.instances=ts,to=Kt.primitive,Kt.primitive=Oe,Ri=ki.range,an=Fe[Re],Fe[Re]=Ri,cs=ki.lineWidth,pa=Fe[me],Fe[me]=cs,ln=ki.capSize,ka=Fe[Be],Fe[Be]=ln,va=ki.opacity,bo=Fe[fe],Fe[fe]=va,Co=ki.scale,Fi=Fe[Ze],Fe[Ze]=Co,Yn=ki.translate,xa=Fe[et],Fe[et]=Yn,Qi=ki.scaleFract,Nn=Fe[gt],Fe[gt]=Qi,Pn=ki.translateFract,qa=Fe[Pt],Fe[Pt]=Pn,jo=H.call(this,tt,ki,Vi),Vo=Fe[Qe],Fe[Qe]=jo,Pa=Xe.state,Xe.state=1,Oa=Xe.x,Xe.x=0,co=Xe.y,Xe.y=0,An=Xe.z,Xe.z=0,_o=Xe.w,Xe.w=0,ks=Xe.buffer,Xe.buffer=c,bs=Xe.size,Xe.size=0,ps=Xe.normalized,Xe.normalized=!1,sa=Xe.type,Xe.type=5126,Bn=Xe.offset,Xe.offset=0,ms=Xe.stride,Xe.stride=24,ya=Xe.divisor,Xe.divisor=0,on=Tt.state,Tt.state=1,mn=Tt.x,Tt.x=0,Ga=Tt.y,Tt.y=0,ca=Tt.z,Tt.z=0,bn=Tt.w,Tt.w=0,Xi=Tt.buffer,Tt.buffer=c,qn=Tt.size,Tt.size=0,Ia=Tt.normalized,Tt.normalized=!1,yn=Tt.type,Tt.type=5126,Ya=Tt.offset,Tt.offset=8,ba=Tt.stride,Tt.stride=24,Da=Tt.divisor,Tt.divisor=0,Aa=xt.state,xt.state=1,Ln=xt.x,xt.x=0,wo=xt.y,xt.y=0,wa=xt.z,xt.z=0,$i=xt.w,xt.w=0,ea=xt.buffer,xt.buffer=c,Sa=xt.size,xt.size=0,Za=xt.normalized,xt.normalized=!1,xo=xt.type,xt.type=5126,Wa=xt.offset,xt.offset=16,hn=xt.stride,xt.stride=24,Un=xt.divisor,xt.divisor=0,Ss=d.call(this,tt,ki,Vi),Yr.offset=Ss,Kn=!1,ns=1,Jo=0,vo=0,ma=0,ja=0,To=null,Ao=0,la=!1,Ki=5126,ho=0,Ka=0,Ca=0,ye(Yr)?(Kn=!0,To=fr.createStream(34962,Yr),Ki=To.dtype):(To=fr.getBuffer(Yr),To?Ki=To.dtype:"constant"in Yr?(ns=2,typeof Yr.constant=="number"?(Jo=Yr.constant,vo=ma=ja=0):(Jo=Yr.constant.length>0?Yr.constant[0]:0,vo=Yr.constant.length>1?Yr.constant[1]:0,ma=Yr.constant.length>2?Yr.constant[2]:0,ja=Yr.constant.length>3?Yr.constant[3]:0)):(ye(Yr.buffer)?To=fr.createStream(34962,Yr.buffer):To=fr.getBuffer(Yr.buffer),Ki="type"in Yr?vi[Yr.type]:To.dtype,la=!!Yr.normalized,Ao=Yr.size|0,ho=Yr.offset|0,Ka=Yr.stride|0,Ca=Yr.divisor|0)),ta=_t.state,_t.state=ns,En=_t.x,_t.x=Jo,Mo=_t.y,_t.y=vo,Ds=_t.z,_t.z=ma,Ro=_t.w,_t.w=ja,vs=_t.buffer,_t.buffer=To,Ks=_t.size,_t.size=Ao,as=_t.normalized,_t.normalized=la,Jn=_t.type,_t.type=Ki,Cs=_t.offset,_t.offset=ho,Xa=_t.stride,_t.stride=Ka,Zo=_t.divisor,_t.divisor=Ca,Eo=E.call(this,tt,ki,Vi),Ni.offset=Eo,lo=!1,$a=1,Xo=0,rs=0,$n=0,Sn=0,uo=null,Rs=0,xs=!1,Go=5126,os=0,So=0,Qn=0,ye(Ni)?(lo=!0,uo=fr.createStream(34962,Ni),Go=uo.dtype):(uo=fr.getBuffer(Ni),uo?Go=uo.dtype:"constant"in Ni?($a=2,typeof Ni.constant=="number"?(Xo=Ni.constant,rs=$n=Sn=0):(Xo=Ni.constant.length>0?Ni.constant[0]:0,rs=Ni.constant.length>1?Ni.constant[1]:0,$n=Ni.constant.length>2?Ni.constant[2]:0,Sn=Ni.constant.length>3?Ni.constant[3]:0)):(ye(Ni.buffer)?uo=fr.createStream(34962,Ni.buffer):uo=fr.getBuffer(Ni.buffer),Go="type"in Ni?vi[Ni.type]:uo.dtype,xs=!!Ni.normalized,Rs=Ni.size|0,os=Ni.offset|0,So=Ni.stride|0,Qn=Ni.divisor|0)),zo=Ct.state,Ct.state=$a,rl=Ct.x,Ct.x=Xo,$o=Ct.y,Ct.y=rs,Na=Ct.z,Ct.z=$n,Ua=Ct.w,Ct.w=Sn,Po=Ct.buffer,Ct.buffer=uo,fo=Ct.size,Ct.size=Rs,ro=Ct.normalized,Ct.normalized=xs,Ma=Ct.type,Ct.type=Go,io=Ct.offset,Ct.offset=os,aa=Ct.stride,Ct.stride=So,Oo=Ct.divisor,Ct.divisor=Qn,No=L.call(this,tt,ki,Vi),Ur.offset=No,Zs=!1,Fs=1,ws=0,no=0,Ls=0,ds=0,Xs=null,oa=0,Yo=!1,po=5126,ss=0,ls=0,gs=0,ye(Ur)?(Zs=!0,Xs=fr.createStream(34962,Ur),po=Xs.dtype):(Xs=fr.getBuffer(Ur),Xs?po=Xs.dtype:"constant"in Ur?(Fs=2,typeof Ur.constant=="number"?(ws=Ur.constant,no=Ls=ds=0):(ws=Ur.constant.length>0?Ur.constant[0]:0,no=Ur.constant.length>1?Ur.constant[1]:0,Ls=Ur.constant.length>2?Ur.constant[2]:0,ds=Ur.constant.length>3?Ur.constant[3]:0)):(ye(Ur.buffer)?Xs=fr.createStream(34962,Ur.buffer):Xs=fr.getBuffer(Ur.buffer),po="type"in Ur?vi[Ur.type]:Xs.dtype,Yo=!!Ur.normalized,oa=Ur.size|0,ss=Ur.offset|0,ls=Ur.stride|0,gs=Ur.divisor|0)),bt=jt.state,jt.state=Fs,Ft=jt.x,jt.x=ws,hr=jt.y,jt.y=no,nr=jt.z,jt.z=Ls,Sr=jt.w,jt.w=ds,li=jt.buffer,jt.buffer=Xs,di=jt.size,jt.size=oa,mi=jt.normalized,jt.normalized=Yo,Oi=jt.type,jt.type=po,dn=jt.offset,jt.offset=ss,wi=jt.stride,jt.stride=ls,ui=jt.divisor,jt.divisor=gs,Ai=b.call(this,tt,ki,Vi),ti.offset=Ai,gi=!1,gn=1,In=0,Vn=0,Rn=0,Hn=0,Gn=null,pn=0,Lo=!1,us=5126,Bs=0,Js=0,ol=0,ye(ti)?(gi=!0,Gn=fr.createStream(34962,ti),us=Gn.dtype):(Gn=fr.getBuffer(ti),Gn?us=Gn.dtype:"constant"in ti?(gn=2,typeof ti.constant=="number"?(In=ti.constant,Vn=Rn=Hn=0):(In=ti.constant.length>0?ti.constant[0]:0,Vn=ti.constant.length>1?ti.constant[1]:0,Rn=ti.constant.length>2?ti.constant[2]:0,Hn=ti.constant.length>3?ti.constant[3]:0)):(ye(ti.buffer)?Gn=fr.createStream(34962,ti.buffer):Gn=fr.getBuffer(ti.buffer),us="type"in ti?vi[ti.type]:Gn.dtype,Lo=!!ti.normalized,pn=ti.size|0,Bs=ti.offset|0,Js=ti.stride|0,ol=ti.divisor|0)),Cl=At.state,At.state=gn,ul=At.x,At.x=In,Gl=At.y,At.y=Vn,Vl=At.z,At.z=Rn,Fl=At.w,At.w=Hn,ga=At.buffer,At.buffer=Gn,ko=At.size,At.size=pn,zs=At.normalized,At.normalized=Lo,Fo=At.type,At.type=us,Ys=At.offset,At.offset=Bs,Gs=At.stride,At.stride=Js,Us=At.divisor,At.divisor=ol,Sl=Ot.vert,Ot.vert=Te,_l=Ot.frag,Ot.frag=nt,Vt.dirty=!0,ji(tt,ki,Vi),tt.viewportWidth=st,tt.viewportHeight=Wt,sr[0]=tr,sr[1]=or,sr[2]=Nr,sr[3]=hi,ue[0]=Gi,ue[1]=Qr,ue[2]=Ui,ue[3]=zn,Mt.blend_enable=fn,ht[0]=xn,ht[1]=_a,St[0]=Wn,St[1]=Fn,St[2]=ia,St[3]=za,Mt.depth_enable=Hr,Dt[0]=Wo,Dt[1]=Ba,Dt[2]=Bo,Dt[3]=Ea,Mt.scissor_enable=Ha,tn&&(r.cpuTime+=performance.now()-Cn),Kt.count=Xn,Kt.instances=Ja,Kt.primitive=to,Fe[Re]=an,Fe[me]=pa,Fe[Be]=ka,Fe[fe]=bo,Fe[Ze]=Fi,Fe[et]=xa,Fe[gt]=Nn,Fe[Pt]=qa,Fe[Qe]=Vo,Xe.state=Pa,Xe.x=Oa,Xe.y=co,Xe.z=An,Xe.w=_o,Xe.buffer=ks,Xe.size=bs,Xe.normalized=ps,Xe.type=sa,Xe.offset=Bn,Xe.stride=ms,Xe.divisor=ya,Tt.state=on,Tt.x=mn,Tt.y=Ga,Tt.z=ca,Tt.w=bn,Tt.buffer=Xi,Tt.size=qn,Tt.normalized=Ia,Tt.type=yn,Tt.offset=Ya,Tt.stride=ba,Tt.divisor=Da,xt.state=Aa,xt.x=Ln,xt.y=wo,xt.z=wa,xt.w=$i,xt.buffer=ea,xt.size=Sa,xt.normalized=Za,xt.type=xo,xt.offset=Wa,xt.stride=hn,xt.divisor=Un,Kn&&fr.destroyStream(To),_t.state=ta,_t.x=En,_t.y=Mo,_t.z=Ds,_t.w=Ro,_t.buffer=vs,_t.size=Ks,_t.normalized=as,_t.type=Jn,_t.offset=Cs,_t.stride=Xa,_t.divisor=Zo,lo&&fr.destroyStream(uo),Ct.state=zo,Ct.x=rl,Ct.y=$o,Ct.z=Na,Ct.w=Ua,Ct.buffer=Po,Ct.size=fo,Ct.normalized=ro,Ct.type=Ma,Ct.offset=io,Ct.stride=aa,Ct.divisor=Oo,Zs&&fr.destroyStream(Xs),jt.state=bt,jt.x=Ft,jt.y=hr,jt.z=nr,jt.w=Sr,jt.buffer=li,jt.size=di,jt.normalized=mi,jt.type=Oi,jt.offset=dn,jt.stride=wi,jt.divisor=ui,gi&&fr.destroyStream(Gn),At.state=Cl,At.x=ul,At.y=Gl,At.z=Vl,At.w=Fl,At.buffer=ga,At.size=ko,At.normalized=zs,At.type=Fo,At.offset=Ys,At.stride=Gs,At.divisor=Us,Ot.vert=Sl,Ot.frag=_l,Vt.dirty=!0},batch:function(ki,ji){var Vi,zi,Mi,sn,fi,Or,st;if(Vi=Ie.angle_instanced_arrays,zi=Pe.next,zi!==Pe.cur&&(zi?je.bindFramebuffer(36160,zi.framebuffer):je.bindFramebuffer(36160,null),Pe.cur=zi),Vt.dirty){var Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to;Wt=Mt.dither,Wt!==Vt.dither&&(Wt?je.enable(3024):je.disable(3024),Vt.dither=Wt),tr=Mt.depth_func,tr!==Vt.depth_func&&(je.depthFunc(tr),Vt.depth_func=tr),or=qr[0],Nr=qr[1],(or!==Lr[0]||Nr!==Lr[1])&&(je.depthRange(or,Nr),Lr[0]=or,Lr[1]=Nr),hi=Mt.depth_mask,hi!==Vt.depth_mask&&(je.depthMask(hi),Vt.depth_mask=hi),Gi=vr[0],Qr=vr[1],Ui=vr[2],zn=vr[3],(Gi!==Er[0]||Qr!==Er[1]||Ui!==Er[2]||zn!==Er[3])&&(je.colorMask(Gi,Qr,Ui,zn),Er[0]=Gi,Er[1]=Qr,Er[2]=Ui,Er[3]=zn),fn=Mt.cull_enable,fn!==Vt.cull_enable&&(fn?je.enable(2884):je.disable(2884),Vt.cull_enable=fn),xn=Mt.cull_face,xn!==Vt.cull_face&&(je.cullFace(xn),Vt.cull_face=xn),_a=Mt.frontFace,_a!==Vt.frontFace&&(je.frontFace(_a),Vt.frontFace=_a),Wn=Mt.lineWidth,Wn!==Vt.lineWidth&&(je.lineWidth(Wn),Vt.lineWidth=Wn),Fn=Mt.polygonOffset_enable,Fn!==Vt.polygonOffset_enable&&(Fn?je.enable(32823):je.disable(32823),Vt.polygonOffset_enable=Fn),ia=si[0],za=si[1],(ia!==Ei[0]||za!==Ei[1])&&(je.polygonOffset(ia,za),Ei[0]=ia,Ei[1]=za),Hr=Mt.sample_alpha,Hr!==Vt.sample_alpha&&(Hr?je.enable(32926):je.disable(32926),Vt.sample_alpha=Hr),na=Mt.sample_enable,na!==Vt.sample_enable&&(na?je.enable(32928):je.disable(32928),Vt.sample_enable=na),go=Si[0],Dn=Si[1],(go!==xi[0]||Dn!==xi[1])&&(je.sampleCoverage(go,Dn),xi[0]=go,xi[1]=Dn),un=Mt.stencil_enable,un!==Vt.stencil_enable&&(un?je.enable(2960):je.disable(2960),Vt.stencil_enable=un),Zn=Mt.stencil_mask,Zn!==Vt.stencil_mask&&(je.stencilMask(Zn),Vt.stencil_mask=Zn),Wo=Hi[0],Ba=Hi[1],Bo=Hi[2],(Wo!==Jr[0]||Ba!==Jr[1]||Bo!==Jr[2])&&(je.stencilFunc(Wo,Ba,Bo),Jr[0]=Wo,Jr[1]=Ba,Jr[2]=Bo),Ea=ci[0],Ha=ci[1],tn=ci[2],Cn=ci[3],(Ea!==Di[0]||Ha!==Di[1]||tn!==Di[2]||Cn!==Di[3])&&(je.stencilOpSeparate(Ea,Ha,tn,Cn),Di[0]=Ea,Di[1]=Ha,Di[2]=tn,Di[3]=Cn),Xn=Lt[0],ts=Lt[1],Ja=Lt[2],to=Lt[3],(Xn!==vt[0]||ts!==vt[1]||Ja!==vt[2]||to!==vt[3])&&(je.stencilOpSeparate(Xn,ts,Ja,to),vt[0]=Xn,vt[1]=ts,vt[2]=Ja,vt[3]=to)}je.blendColor(0,0,0,0),de[0]=0,de[1]=0,de[2]=0,de[3]=0,ut?je.enable(3042):je.disable(3042),Vt.blend_enable=ut,je.blendEquationSeparate(32774,32774),Et[0]=32774,Et[1]=32774,je.blendFuncSeparate(770,771,773,1),Zt[0]=770,Zt[1]=771,Zt[2]=773,Zt[3]=1,ct?je.enable(2929):je.disable(2929),Vt.depth_enable=ct,rt?je.enable(3089):je.disable(3089),Vt.scissor_enable=rt,Mi=Vt.profile,Mi&&(sn=performance.now(),r.count+=ji),je.useProgram(f.program),fi=Ie.angle_instanced_arrays;var Ri,an,cs,pa,ln,ka,va,bo;for(_e.setVAO(null),Ri=h.location,an=De[Ri],an.buffer||je.enableVertexAttribArray(Ri),(an.type!==5126||an.size!==2||an.buffer!==c||an.normalized!==!1||an.offset!==16||an.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(Ri,2,5126,!1,24,16),an.type=5126,an.size=2,an.buffer=c,an.normalized=!1,an.offset=16,an.stride=24),an.divisor!==0&&(fi.vertexAttribDivisorANGLE(Ri,0),an.divisor=0),cs=x.location,pa=De[cs],pa.buffer||je.enableVertexAttribArray(cs),(pa.type!==5126||pa.size!==2||pa.buffer!==c||pa.normalized!==!1||pa.offset!==0||pa.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(cs,2,5126,!1,24,0),pa.type=5126,pa.size=2,pa.buffer=c,pa.normalized=!1,pa.offset=0,pa.stride=24),pa.divisor!==0&&(fi.vertexAttribDivisorANGLE(cs,0),pa.divisor=0),ln=k.location,ka=De[ln],ka.buffer||je.enableVertexAttribArray(ln),(ka.type!==5126||ka.size!==2||ka.buffer!==c||ka.normalized!==!1||ka.offset!==8||ka.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(ln,2,5126,!1,24,8),ka.type=5126,ka.size=2,ka.buffer=c,ka.normalized=!1,ka.offset=8,ka.stride=24),ka.divisor!==0&&(fi.vertexAttribDivisorANGLE(ln,0),ka.divisor=0),va=Kt.elements,va?je.bindBuffer(34963,va.buffer.buffer):_e.currentVAO&&(va=ir.getElements(_e.currentVAO.elements),va&&je.bindBuffer(34963,va.buffer.buffer)),bo=Kt.offset,Or=0;Or<ji;++Or){st=ki[Or];var Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr;Co=st.viewport,Fi=Co.x|0,Yn=Co.y|0,xa="width"in Co?Co.width|0:tt.framebufferWidth-Fi,Qi="height"in Co?Co.height|0:tt.framebufferHeight-Yn,Nn=tt.viewportWidth,tt.viewportWidth=xa,Pn=tt.viewportHeight,tt.viewportHeight=Qi,je.viewport(Fi,Yn,xa,Qi),br[0]=Fi,br[1]=Yn,br[2]=xa,br[3]=Qi,qa=st.viewport,jo=qa.x|0,Vo=qa.y|0,Pa="width"in qa?qa.width|0:tt.framebufferWidth-jo,Oa="height"in qa?qa.height|0:tt.framebufferHeight-Vo,je.scissor(jo,Vo,Pa,Oa),Bt[0]=jo,Bt[1]=Vo,Bt[2]=Pa,Bt[3]=Oa,co=d.call(this,tt,st,Or),Yr.offset=co,An=!1,_o=1,ks=0,bs=0,ps=0,sa=0,Bn=null,ms=0,ya=!1,on=5126,mn=0,Ga=0,ca=0,ye(Yr)?(An=!0,Bn=fr.createStream(34962,Yr),on=Bn.dtype):(Bn=fr.getBuffer(Yr),Bn?on=Bn.dtype:"constant"in Yr?(_o=2,typeof Yr.constant=="number"?(ks=Yr.constant,bs=ps=sa=0):(ks=Yr.constant.length>0?Yr.constant[0]:0,bs=Yr.constant.length>1?Yr.constant[1]:0,ps=Yr.constant.length>2?Yr.constant[2]:0,sa=Yr.constant.length>3?Yr.constant[3]:0)):(ye(Yr.buffer)?Bn=fr.createStream(34962,Yr.buffer):Bn=fr.getBuffer(Yr.buffer),on="type"in Yr?vi[Yr.type]:Bn.dtype,ya=!!Yr.normalized,ms=Yr.size|0,mn=Yr.offset|0,Ga=Yr.stride|0,ca=Yr.divisor|0)),bn=p.location,Xi=De[bn],_o===1?(Xi.buffer||je.enableVertexAttribArray(bn),qn=ms||4,(Xi.type!==on||Xi.size!==qn||Xi.buffer!==Bn||Xi.normalized!==ya||Xi.offset!==mn||Xi.stride!==Ga)&&(je.bindBuffer(34962,Bn.buffer),je.vertexAttribPointer(bn,qn,on,ya,Ga,mn),Xi.type=on,Xi.size=qn,Xi.buffer=Bn,Xi.normalized=ya,Xi.offset=mn,Xi.stride=Ga),Xi.divisor!==ca&&(fi.vertexAttribDivisorANGLE(bn,ca),Xi.divisor=ca)):(Xi.buffer&&(je.disableVertexAttribArray(bn),Xi.buffer=null),(Xi.x!==ks||Xi.y!==bs||Xi.z!==ps||Xi.w!==sa)&&(je.vertexAttrib4f(bn,ks,bs,ps,sa),Xi.x=ks,Xi.y=bs,Xi.z=ps,Xi.w=sa)),Ia=b.call(this,tt,st,Or),ti.offset=Ia,yn=!1,Ya=1,ba=0,Da=0,Aa=0,Ln=0,wo=null,wa=0,$i=!1,ea=5126,Sa=0,Za=0,xo=0,ye(ti)?(yn=!0,wo=fr.createStream(34962,ti),ea=wo.dtype):(wo=fr.getBuffer(ti),wo?ea=wo.dtype:"constant"in ti?(Ya=2,typeof ti.constant=="number"?(ba=ti.constant,Da=Aa=Ln=0):(ba=ti.constant.length>0?ti.constant[0]:0,Da=ti.constant.length>1?ti.constant[1]:0,Aa=ti.constant.length>2?ti.constant[2]:0,Ln=ti.constant.length>3?ti.constant[3]:0)):(ye(ti.buffer)?wo=fr.createStream(34962,ti.buffer):wo=fr.getBuffer(ti.buffer),ea="type"in ti?vi[ti.type]:wo.dtype,$i=!!ti.normalized,wa=ti.size|0,Sa=ti.offset|0,Za=ti.stride|0,xo=ti.divisor|0)),Wa=y.location,hn=De[Wa],Ya===1?(hn.buffer||je.enableVertexAttribArray(Wa),Un=wa||4,(hn.type!==ea||hn.size!==Un||hn.buffer!==wo||hn.normalized!==$i||hn.offset!==Sa||hn.stride!==Za)&&(je.bindBuffer(34962,wo.buffer),je.vertexAttribPointer(Wa,Un,ea,$i,Za,Sa),hn.type=ea,hn.size=Un,hn.buffer=wo,hn.normalized=$i,hn.offset=Sa,hn.stride=Za),hn.divisor!==xo&&(fi.vertexAttribDivisorANGLE(Wa,xo),hn.divisor=xo)):(hn.buffer&&(je.disableVertexAttribArray(Wa),hn.buffer=null),(hn.x!==ba||hn.y!==Da||hn.z!==Aa||hn.w!==Ln)&&(je.vertexAttrib4f(Wa,ba,Da,Aa,Ln),hn.x=ba,hn.y=Da,hn.z=Aa,hn.w=Ln)),Ss=E.call(this,tt,st,Or),Ni.offset=Ss,Kn=!1,ns=1,Jo=0,vo=0,ma=0,ja=0,To=null,Ao=0,la=!1,Ki=5126,ho=0,Ka=0,Ca=0,ye(Ni)?(Kn=!0,To=fr.createStream(34962,Ni),Ki=To.dtype):(To=fr.getBuffer(Ni),To?Ki=To.dtype:"constant"in Ni?(ns=2,typeof Ni.constant=="number"?(Jo=Ni.constant,vo=ma=ja=0):(Jo=Ni.constant.length>0?Ni.constant[0]:0,vo=Ni.constant.length>1?Ni.constant[1]:0,ma=Ni.constant.length>2?Ni.constant[2]:0,ja=Ni.constant.length>3?Ni.constant[3]:0)):(ye(Ni.buffer)?To=fr.createStream(34962,Ni.buffer):To=fr.getBuffer(Ni.buffer),Ki="type"in Ni?vi[Ni.type]:To.dtype,la=!!Ni.normalized,Ao=Ni.size|0,ho=Ni.offset|0,Ka=Ni.stride|0,Ca=Ni.divisor|0)),ta=A.location,En=De[ta],ns===1?(En.buffer||je.enableVertexAttribArray(ta),Mo=Ao||2,(En.type!==Ki||En.size!==Mo||En.buffer!==To||En.normalized!==la||En.offset!==ho||En.stride!==Ka)&&(je.bindBuffer(34962,To.buffer),je.vertexAttribPointer(ta,Mo,Ki,la,Ka,ho),En.type=Ki,En.size=Mo,En.buffer=To,En.normalized=la,En.offset=ho,En.stride=Ka),En.divisor!==Ca&&(fi.vertexAttribDivisorANGLE(ta,Ca),En.divisor=Ca)):(En.buffer&&(je.disableVertexAttribArray(ta),En.buffer=null),(En.x!==Jo||En.y!==vo||En.z!==ma||En.w!==ja)&&(je.vertexAttrib4f(ta,Jo,vo,ma,ja),En.x=Jo,En.y=vo,En.z=ma,En.w=ja)),Ds=L.call(this,tt,st,Or),Ur.offset=Ds,Ro=!1,vs=1,Ks=0,as=0,Jn=0,Cs=0,Xa=null,Zo=0,Eo=!1,lo=5126,$a=0,Xo=0,rs=0,ye(Ur)?(Ro=!0,Xa=fr.createStream(34962,Ur),lo=Xa.dtype):(Xa=fr.getBuffer(Ur),Xa?lo=Xa.dtype:"constant"in Ur?(vs=2,typeof Ur.constant=="number"?(Ks=Ur.constant,as=Jn=Cs=0):(Ks=Ur.constant.length>0?Ur.constant[0]:0,as=Ur.constant.length>1?Ur.constant[1]:0,Jn=Ur.constant.length>2?Ur.constant[2]:0,Cs=Ur.constant.length>3?Ur.constant[3]:0)):(ye(Ur.buffer)?Xa=fr.createStream(34962,Ur.buffer):Xa=fr.getBuffer(Ur.buffer),lo="type"in Ur?vi[Ur.type]:Xa.dtype,Eo=!!Ur.normalized,Zo=Ur.size|0,$a=Ur.offset|0,Xo=Ur.stride|0,rs=Ur.divisor|0)),$n=_.location,Sn=De[$n],vs===1?(Sn.buffer||je.enableVertexAttribArray($n),uo=Zo||2,(Sn.type!==lo||Sn.size!==uo||Sn.buffer!==Xa||Sn.normalized!==Eo||Sn.offset!==$a||Sn.stride!==Xo)&&(je.bindBuffer(34962,Xa.buffer),je.vertexAttribPointer($n,uo,lo,Eo,Xo,$a),Sn.type=lo,Sn.size=uo,Sn.buffer=Xa,Sn.normalized=Eo,Sn.offset=$a,Sn.stride=Xo),Sn.divisor!==rs&&(fi.vertexAttribDivisorANGLE($n,rs),Sn.divisor=rs)):(Sn.buffer&&(je.disableVertexAttribArray($n),Sn.buffer=null),(Sn.x!==Ks||Sn.y!==as||Sn.z!==Jn||Sn.w!==Cs)&&(je.vertexAttrib4f($n,Ks,as,Jn,Cs),Sn.x=Ks,Sn.y=as,Sn.z=Jn,Sn.w=Cs)),Rs=st.capSize,(!Or||xs!==Rs)&&(xs=Rs,je.uniform1f(C.location,Rs)),Go=st.lineWidth,(!Or||os!==Go)&&(os=Go,je.uniform1f(M.location,Go)),So=st.opacity,(!Or||Qn!==So)&&(Qn=So,je.uniform1f(v.location,So)),zo=st.scale,rl=zo[0],Na=zo[1],(!Or||$o!==rl||Ua!==Na)&&($o=rl,Ua=Na,je.uniform2f(z.location,rl,Na)),Po=st.scaleFract,fo=Po[0],Ma=Po[1],(!Or||ro!==fo||io!==Ma)&&(ro=fo,io=Ma,je.uniform2f(T.location,fo,Ma)),aa=st.translate,Oo=aa[0],Zs=aa[1],(!Or||No!==Oo||Fs!==Zs)&&(No=Oo,Fs=Zs,je.uniform2f(F.location,Oo,Zs)),ws=st.translateFract,no=ws[0],ds=ws[1],(!Or||Ls!==no||Xs!==ds)&&(Ls=no,Xs=ds,je.uniform2f(q.location,no,ds)),oa=H.call(this,tt,st,Or),Yo=oa[0],ss=oa[1],gs=oa[2],Ft=oa[3],(!Or||po!==Yo||ls!==ss||bt!==gs||hr!==Ft)&&(po=Yo,ls=ss,bt=gs,hr=Ft,je.uniform4f(U.location,Yo,ss,gs,Ft)),nr=st.count,nr>0?va?fi.drawElementsInstancedANGLE(4,36,va.type,bo<<(va.type-5121>>1),nr):fi.drawArraysInstancedANGLE(4,bo,36,nr):nr<0&&(va?je.drawElements(4,36,va.type,bo<<(va.type-5121>>1)):je.drawArrays(4,bo,36)),tt.viewportWidth=Nn,tt.viewportHeight=Pn,An&&fr.destroyStream(Bn),yn&&fr.destroyStream(wo),Kn&&fr.destroyStream(To),Ro&&fr.destroyStream(Xa)}Vt.dirty=!0,_e.setVAO(null),Mi&&(r.cpuTime+=performance.now()-sn)}}}});var L9=Se((s1r,HOe)=>{HOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At){"use strict";var Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br;return Te=t.gl,nt=t.context,ut=t.strings,ct=t.next,rt=t.current,je=t.draw,tt=t.elements,Je=t.buffer,Mt=t.shader,Vt=t.attributes,Kt=t.vao,ir=t.uniforms,fr=t.framebuffer,Ot=t.extensions,De=t.timer,_e=t.isBufferArgs,Fe=ct.blend_color,Pe=rt.blend_color,Ie=ct.blend_equation,lt=rt.blend_equation,ye=ct.blend_func,ue=rt.blend_func,de=ct.depth_range,ht=rt.depth_range,Et=ct.colorMask,St=rt.colorMask,Zt=ct.polygonOffset_offset,qr=rt.polygonOffset_offset,Lr=ct.sample_coverage,vr=rt.sample_coverage,Er=ct.stencil_func,si=rt.stencil_func,Ei=ct.stencil_opFront,Si=rt.stencil_opFront,xi=ct.stencil_opBack,Hi=rt.stencil_opBack,Jr=ct.scissor_box,ci=rt.scissor_box,Di=ct.viewport,Lt=rt.viewport,vt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Dt={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},Bt={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},sr={add:32774,subtract:32778,"reverse subtract":32779},br={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},zr={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Tr={cw:2304,ccw:2305},Rr={},Rr.offset=4,Rr.stride=8,Br={},Br.offset=0,Br.stride=8,{draw:function(oi){var vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca;if(vi=Ot.angle_instanced_arrays,Pi=fr.next,Pi!==fr.cur&&(Pi?Te.bindFramebuffer(36160,Pi.framebuffer):Te.bindFramebuffer(36160,null),fr.cur=Pi),rt.dirty){var ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No;ta=ct.dither,ta!==rt.dither&&(ta?Te.enable(3024):Te.disable(3024),rt.dither=ta),En=Ie[0],Mo=Ie[1],(En!==lt[0]||Mo!==lt[1])&&(Te.blendEquationSeparate(En,Mo),lt[0]=En,lt[1]=Mo),Ds=ct.depth_func,Ds!==rt.depth_func&&(Te.depthFunc(Ds),rt.depth_func=Ds),Ro=de[0],vs=de[1],(Ro!==ht[0]||vs!==ht[1])&&(Te.depthRange(Ro,vs),ht[0]=Ro,ht[1]=vs),Ks=ct.depth_mask,Ks!==rt.depth_mask&&(Te.depthMask(Ks),rt.depth_mask=Ks),as=Et[0],Jn=Et[1],Cs=Et[2],Xa=Et[3],(as!==St[0]||Jn!==St[1]||Cs!==St[2]||Xa!==St[3])&&(Te.colorMask(as,Jn,Cs,Xa),St[0]=as,St[1]=Jn,St[2]=Cs,St[3]=Xa),Zo=ct.cull_enable,Zo!==rt.cull_enable&&(Zo?Te.enable(2884):Te.disable(2884),rt.cull_enable=Zo),Eo=ct.cull_face,Eo!==rt.cull_face&&(Te.cullFace(Eo),rt.cull_face=Eo),lo=ct.frontFace,lo!==rt.frontFace&&(Te.frontFace(lo),rt.frontFace=lo),$a=ct.lineWidth,$a!==rt.lineWidth&&(Te.lineWidth($a),rt.lineWidth=$a),Xo=ct.polygonOffset_enable,Xo!==rt.polygonOffset_enable&&(Xo?Te.enable(32823):Te.disable(32823),rt.polygonOffset_enable=Xo),rs=Zt[0],$n=Zt[1],(rs!==qr[0]||$n!==qr[1])&&(Te.polygonOffset(rs,$n),qr[0]=rs,qr[1]=$n),Sn=ct.sample_alpha,Sn!==rt.sample_alpha&&(Sn?Te.enable(32926):Te.disable(32926),rt.sample_alpha=Sn),uo=ct.sample_enable,uo!==rt.sample_enable&&(uo?Te.enable(32928):Te.disable(32928),rt.sample_enable=uo),Rs=Lr[0],xs=Lr[1],(Rs!==vr[0]||xs!==vr[1])&&(Te.sampleCoverage(Rs,xs),vr[0]=Rs,vr[1]=xs),Go=ct.stencil_mask,Go!==rt.stencil_mask&&(Te.stencilMask(Go),rt.stencil_mask=Go),os=Er[0],So=Er[1],Qn=Er[2],(os!==si[0]||So!==si[1]||Qn!==si[2])&&(Te.stencilFunc(os,So,Qn),si[0]=os,si[1]=So,si[2]=Qn),zo=Ei[0],rl=Ei[1],$o=Ei[2],Na=Ei[3],(zo!==Si[0]||rl!==Si[1]||$o!==Si[2]||Na!==Si[3])&&(Te.stencilOpSeparate(zo,rl,$o,Na),Si[0]=zo,Si[1]=rl,Si[2]=$o,Si[3]=Na),Ua=xi[0],Po=xi[1],fo=xi[2],ro=xi[3],(Ua!==Hi[0]||Po!==Hi[1]||fo!==Hi[2]||ro!==Hi[3])&&(Te.stencilOpSeparate(Ua,Po,fo,ro),Hi[0]=Ua,Hi[1]=Po,Hi[2]=fo,Hi[3]=ro),Ma=ct.scissor_enable,Ma!==rt.scissor_enable&&(Ma?Te.enable(3089):Te.disable(3089),rt.scissor_enable=Ma),io=Jr[0],aa=Jr[1],Oo=Jr[2],No=Jr[3],(io!==ci[0]||aa!==ci[1]||Oo!==ci[2]||No!==ci[3])&&(Te.scissor(io,aa,Oo,No),ci[0]=io,ci[1]=aa,ci[2]=Oo,ci[3]=No)}Yr=this.viewport,Ni=Yr.x|0,Ur=Yr.y|0,ti="width"in Yr?Yr.width|0:nt.framebufferWidth-Ni,ki="height"in Yr?Yr.height|0:nt.framebufferHeight-Ur,ji=nt.viewportWidth,nt.viewportWidth=ti,Vi=nt.viewportHeight,nt.viewportHeight=ki,Te.viewport(Ni,Ur,ti,ki),Lt[0]=Ni,Lt[1]=Ur,Lt[2]=ti,Lt[3]=ki,Te.blendColor(0,0,0,1),Pe[0]=0,Pe[1]=0,Pe[2]=0,Pe[3]=1,n?Te.enable(3042):Te.disable(3042),rt.blend_enable=n,Te.blendFuncSeparate(770,771,773,1),ue[0]=770,ue[1]=771,ue[2]=773,ue[3]=1,i?Te.enable(2929):Te.disable(2929),rt.depth_enable=i,a?Te.enable(2960):Te.disable(2960),rt.stencil_enable=a,zi=rt.profile,zi&&(Mi=performance.now(),r.count++),Te.useProgram(o.program),sn=Ot.angle_instanced_arrays,Kt.setVAO(null),fi=this.charBuffer,Or=!1,st=1,Wt=0,tr=0,or=0,Nr=0,hi=null,Gi=0,Qr=!1,Ui=5126,zn=0,fn=0,xn=0,_e(fi)?(Or=!0,hi=Je.createStream(34962,fi),Ui=hi.dtype):(hi=Je.getBuffer(fi),hi?Ui=hi.dtype:"constant"in fi?(st=2,typeof fi.constant=="number"?(Wt=fi.constant,tr=or=Nr=0):(Wt=fi.constant.length>0?fi.constant[0]:0,tr=fi.constant.length>1?fi.constant[1]:0,or=fi.constant.length>2?fi.constant[2]:0,Nr=fi.constant.length>3?fi.constant[3]:0)):(_e(fi.buffer)?hi=Je.createStream(34962,fi.buffer):hi=Je.getBuffer(fi.buffer),Ui="type"in fi?zr[fi.type]:hi.dtype,Qr=!!fi.normalized,Gi=fi.size|0,zn=fi.offset|0,fn=fi.stride|0,xn=fi.divisor|0)),_a=s.location,Wn=Vt[_a],st===1?(Wn.buffer||Te.enableVertexAttribArray(_a),Fn=Gi||1,(Wn.type!==Ui||Wn.size!==Fn||Wn.buffer!==hi||Wn.normalized!==Qr||Wn.offset!==zn||Wn.stride!==fn)&&(Te.bindBuffer(34962,hi.buffer),Te.vertexAttribPointer(_a,Fn,Ui,Qr,fn,zn),Wn.type=Ui,Wn.size=Fn,Wn.buffer=hi,Wn.normalized=Qr,Wn.offset=zn,Wn.stride=fn),Wn.divisor!==xn&&(sn.vertexAttribDivisorANGLE(_a,xn),Wn.divisor=xn)):(Wn.buffer&&(Te.disableVertexAttribArray(_a),Wn.buffer=null),(Wn.x!==Wt||Wn.y!==tr||Wn.z!==or||Wn.w!==Nr)&&(Te.vertexAttrib4f(_a,Wt,tr,or,Nr),Wn.x=Wt,Wn.y=tr,Wn.z=or,Wn.w=Nr)),ia=this.sizeBuffer,Rr.buffer=ia,za=!1,Hr=1,na=0,go=0,Dn=0,un=0,Zn=null,Wo=0,Ba=!1,Bo=5126,Ea=0,Ha=0,tn=0,_e(Rr)?(za=!0,Zn=Je.createStream(34962,Rr),Bo=Zn.dtype):(Zn=Je.getBuffer(Rr),Zn?Bo=Zn.dtype:"constant"in Rr?(Hr=2,typeof Rr.constant=="number"?(na=Rr.constant,go=Dn=un=0):(na=Rr.constant.length>0?Rr.constant[0]:0,go=Rr.constant.length>1?Rr.constant[1]:0,Dn=Rr.constant.length>2?Rr.constant[2]:0,un=Rr.constant.length>3?Rr.constant[3]:0)):(_e(Rr.buffer)?Zn=Je.createStream(34962,Rr.buffer):Zn=Je.getBuffer(Rr.buffer),Bo="type"in Rr?zr[Rr.type]:Zn.dtype,Ba=!!Rr.normalized,Wo=Rr.size|0,Ea=Rr.offset|0,Ha=Rr.stride|0,tn=Rr.divisor|0)),Cn=u.location,Xn=Vt[Cn],Hr===1?(Xn.buffer||Te.enableVertexAttribArray(Cn),ts=Wo||1,(Xn.type!==Bo||Xn.size!==ts||Xn.buffer!==Zn||Xn.normalized!==Ba||Xn.offset!==Ea||Xn.stride!==Ha)&&(Te.bindBuffer(34962,Zn.buffer),Te.vertexAttribPointer(Cn,ts,Bo,Ba,Ha,Ea),Xn.type=Bo,Xn.size=ts,Xn.buffer=Zn,Xn.normalized=Ba,Xn.offset=Ea,Xn.stride=Ha),Xn.divisor!==tn&&(sn.vertexAttribDivisorANGLE(Cn,tn),Xn.divisor=tn)):(Xn.buffer&&(Te.disableVertexAttribArray(Cn),Xn.buffer=null),(Xn.x!==na||Xn.y!==go||Xn.z!==Dn||Xn.w!==un)&&(Te.vertexAttrib4f(Cn,na,go,Dn,un),Xn.x=na,Xn.y=go,Xn.z=Dn,Xn.w=un)),Ja=this.position,to=!1,Ri=1,an=0,cs=0,pa=0,ln=0,ka=null,va=0,bo=!1,Co=5126,Fi=0,Yn=0,xa=0,_e(Ja)?(to=!0,ka=Je.createStream(34962,Ja),Co=ka.dtype):(ka=Je.getBuffer(Ja),ka?Co=ka.dtype:"constant"in Ja?(Ri=2,typeof Ja.constant=="number"?(an=Ja.constant,cs=pa=ln=0):(an=Ja.constant.length>0?Ja.constant[0]:0,cs=Ja.constant.length>1?Ja.constant[1]:0,pa=Ja.constant.length>2?Ja.constant[2]:0,ln=Ja.constant.length>3?Ja.constant[3]:0)):(_e(Ja.buffer)?ka=Je.createStream(34962,Ja.buffer):ka=Je.getBuffer(Ja.buffer),Co="type"in Ja?zr[Ja.type]:ka.dtype,bo=!!Ja.normalized,va=Ja.size|0,Fi=Ja.offset|0,Yn=Ja.stride|0,xa=Ja.divisor|0)),Qi=l.location,Nn=Vt[Qi],Ri===1?(Nn.buffer||Te.enableVertexAttribArray(Qi),Pn=va||2,(Nn.type!==Co||Nn.size!==Pn||Nn.buffer!==ka||Nn.normalized!==bo||Nn.offset!==Fi||Nn.stride!==Yn)&&(Te.bindBuffer(34962,ka.buffer),Te.vertexAttribPointer(Qi,Pn,Co,bo,Yn,Fi),Nn.type=Co,Nn.size=Pn,Nn.buffer=ka,Nn.normalized=bo,Nn.offset=Fi,Nn.stride=Yn),Nn.divisor!==xa&&(sn.vertexAttribDivisorANGLE(Qi,xa),Nn.divisor=xa)):(Nn.buffer&&(Te.disableVertexAttribArray(Qi),Nn.buffer=null),(Nn.x!==an||Nn.y!==cs||Nn.z!==pa||Nn.w!==ln)&&(Te.vertexAttrib4f(Qi,an,cs,pa,ln),Nn.x=an,Nn.y=cs,Nn.z=pa,Nn.w=ln)),qa=this.sizeBuffer,Br.buffer=qa,jo=!1,Vo=1,Pa=0,Oa=0,co=0,An=0,_o=null,ks=0,bs=!1,ps=5126,sa=0,Bn=0,ms=0,_e(Br)?(jo=!0,_o=Je.createStream(34962,Br),ps=_o.dtype):(_o=Je.getBuffer(Br),_o?ps=_o.dtype:"constant"in Br?(Vo=2,typeof Br.constant=="number"?(Pa=Br.constant,Oa=co=An=0):(Pa=Br.constant.length>0?Br.constant[0]:0,Oa=Br.constant.length>1?Br.constant[1]:0,co=Br.constant.length>2?Br.constant[2]:0,An=Br.constant.length>3?Br.constant[3]:0)):(_e(Br.buffer)?_o=Je.createStream(34962,Br.buffer):_o=Je.getBuffer(Br.buffer),ps="type"in Br?zr[Br.type]:_o.dtype,bs=!!Br.normalized,ks=Br.size|0,sa=Br.offset|0,Bn=Br.stride|0,ms=Br.divisor|0)),ya=f.location,on=Vt[ya],Vo===1?(on.buffer||Te.enableVertexAttribArray(ya),mn=ks||1,(on.type!==ps||on.size!==mn||on.buffer!==_o||on.normalized!==bs||on.offset!==sa||on.stride!==Bn)&&(Te.bindBuffer(34962,_o.buffer),Te.vertexAttribPointer(ya,mn,ps,bs,Bn,sa),on.type=ps,on.size=mn,on.buffer=_o,on.normalized=bs,on.offset=sa,on.stride=Bn),on.divisor!==ms&&(sn.vertexAttribDivisorANGLE(ya,ms),on.divisor=ms)):(on.buffer&&(Te.disableVertexAttribArray(ya),on.buffer=null),(on.x!==Pa||on.y!==Oa||on.z!==co||on.w!==An)&&(Te.vertexAttrib4f(ya,Pa,Oa,co,An),on.x=Pa,on.y=Oa,on.z=co,on.w=An)),Ga=oi.align,Te.uniform1f(c.location,Ga),ca=d.call(this,nt,oi,0),ca&&ca._reglType==="framebuffer"&&(ca=ca.color[0]),bn=ca._texture,Te.uniform1i(h.location,bn.bind()),Xi=x.call(this,nt,oi,0),qn=Xi[0],Ia=Xi[1],Te.uniform2f(p.location,qn,Ia),yn=y.call(this,nt,oi,0),Ya=yn[0],ba=yn[1],Te.uniform2f(b.location,Ya,ba),Da=oi.baseline,Te.uniform1f(k.location,Da),Aa=A.call(this,nt,oi,0),Te.uniform1f(E.location,Aa),Ln=oi.color,wo=Ln[0],wa=Ln[1],$i=Ln[2],ea=Ln[3],Te.uniform4f(L.location,wo,wa,$i,ea),Sa=C.call(this,nt,oi,0),Te.uniform1f(_.location,Sa),Za=oi.opacity,Te.uniform1f(M.location,Za),xo=oi.positionOffset,Wa=xo[0],hn=xo[1],Te.uniform2f(v.location,Wa,hn),Un=this.scale,Ss=Un[0],Kn=Un[1],Te.uniform2f(z.location,Ss,Kn),ns=this.translate,Jo=ns[0],vo=ns[1],Te.uniform2f(T.location,Jo,vo),ma=this.viewportArray,ja=ma[0],To=ma[1],Ao=ma[2],la=ma[3],Te.uniform4f(F.location,ja,To,Ao,la),Ki=je.elements,Ki?Te.bindBuffer(34963,Ki.buffer.buffer):Kt.currentVAO&&(Ki=tt.getElements(Kt.currentVAO.elements),Ki&&Te.bindBuffer(34963,Ki.buffer.buffer)),ho=oi.offset,Ka=oi.count,Ka&&(Ca=je.instances,Ca>0?Ki?sn.drawElementsInstancedANGLE(0,Ka,Ki.type,ho<<(Ki.type-5121>>1),Ca):sn.drawArraysInstancedANGLE(0,ho,Ka,Ca):Ca<0&&(Ki?Te.drawElements(0,Ka,Ki.type,ho<<(Ki.type-5121>>1)):Te.drawArrays(0,ho,Ka)),rt.dirty=!0,Kt.setVAO(null),nt.viewportWidth=ji,nt.viewportHeight=Vi,zi&&(r.cpuTime+=performance.now()-Mi),Or&&Je.destroyStream(hi),za&&Je.destroyStream(Zn),to&&Je.destroyStream(ka),jo&&Je.destroyStream(_o),bn.unbind())},scope:function(oi,vi,Pi){var Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa;Yr=this.viewport,Ni=Yr.x|0,Ur=Yr.y|0,ti="width"in Yr?Yr.width|0:nt.framebufferWidth-Ni,ki="height"in Yr?Yr.height|0:nt.framebufferHeight-Ur,ji=nt.viewportWidth,nt.viewportWidth=ti,Vi=nt.viewportHeight,nt.viewportHeight=ki,zi=Di[0],Di[0]=Ni,Mi=Di[1],Di[1]=Ur,sn=Di[2],Di[2]=ti,fi=Di[3],Di[3]=ki,Or=Fe[0],Fe[0]=q,st=Fe[1],Fe[1]=U,Wt=Fe[2],Fe[2]=H,tr=Fe[3],Fe[3]=j,or=ct.blend_enable,ct.blend_enable=G,Nr=ye[0],ye[0]=O,hi=ye[1],ye[1]=W,Gi=ye[2],ye[2]=re,Qr=ye[3],ye[3]=ne,Ui=ct.depth_enable,ct.depth_enable=be,zn=ct.stencil_enable,ct.stencil_enable=ze,fn=rt.profile,fn&&(xn=performance.now(),r.count++),_a=oi.offset,Wn=je.offset,je.offset=_a,Fn=oi.count,ia=je.count,je.count=Fn,za=je.primitive,je.primitive=Ce,Hr=y.call(this,nt,oi,Pi),na=ir[he],ir[he]=Hr,go=x.call(this,nt,oi,Pi),Dn=ir[te],ir[te]=go,un=d.call(this,nt,oi,Pi),Zn=ir[ke],ir[ke]=un,Wo=A.call(this,nt,oi,Pi),Ba=ir[Ee],ir[Ee]=Wo,Bo=C.call(this,nt,oi,Pi),Ea=ir[Me],ir[Me]=Bo,Ha=oi.color,tn=ir[Oe],ir[Oe]=Ha,Cn=oi.opacity,Xn=ir[Re],ir[Re]=Cn,ts=this.viewportArray,Ja=ir[me],ir[me]=ts,to=this.scale,Ri=ir[Be],ir[Be]=to,an=oi.align,cs=ir[fe],ir[fe]=an,pa=oi.baseline,ln=ir[Ze],ir[Ze]=pa,ka=this.translate,va=ir[et],ir[et]=ka,bo=oi.positionOffset,Co=ir[gt],ir[gt]=bo,Fi=this.charBuffer,Yn=!1,xa=1,Qi=0,Nn=0,Pn=0,qa=0,jo=null,Vo=0,Pa=!1,Oa=5126,co=0,An=0,_o=0,_e(Fi)?(Yn=!0,jo=Je.createStream(34962,Fi),Oa=jo.dtype):(jo=Je.getBuffer(Fi),jo?Oa=jo.dtype:"constant"in Fi?(xa=2,typeof Fi.constant=="number"?(Qi=Fi.constant,Nn=Pn=qa=0):(Qi=Fi.constant.length>0?Fi.constant[0]:0,Nn=Fi.constant.length>1?Fi.constant[1]:0,Pn=Fi.constant.length>2?Fi.constant[2]:0,qa=Fi.constant.length>3?Fi.constant[3]:0)):(_e(Fi.buffer)?jo=Je.createStream(34962,Fi.buffer):jo=Je.getBuffer(Fi.buffer),Oa="type"in Fi?zr[Fi.type]:jo.dtype,Pa=!!Fi.normalized,Vo=Fi.size|0,co=Fi.offset|0,An=Fi.stride|0,_o=Fi.divisor|0)),ks=Pt.state,Pt.state=xa,bs=Pt.x,Pt.x=Qi,ps=Pt.y,Pt.y=Nn,sa=Pt.z,Pt.z=Pn,Bn=Pt.w,Pt.w=qa,ms=Pt.buffer,Pt.buffer=jo,ya=Pt.size,Pt.size=Vo,on=Pt.normalized,Pt.normalized=Pa,mn=Pt.type,Pt.type=Oa,Ga=Pt.offset,Pt.offset=co,ca=Pt.stride,Pt.stride=An,bn=Pt.divisor,Pt.divisor=_o,Xi=this.position,qn=!1,Ia=1,yn=0,Ya=0,ba=0,Da=0,Aa=null,Ln=0,wo=!1,wa=5126,$i=0,ea=0,Sa=0,_e(Xi)?(qn=!0,Aa=Je.createStream(34962,Xi),wa=Aa.dtype):(Aa=Je.getBuffer(Xi),Aa?wa=Aa.dtype:"constant"in Xi?(Ia=2,typeof Xi.constant=="number"?(yn=Xi.constant,Ya=ba=Da=0):(yn=Xi.constant.length>0?Xi.constant[0]:0,Ya=Xi.constant.length>1?Xi.constant[1]:0,ba=Xi.constant.length>2?Xi.constant[2]:0,Da=Xi.constant.length>3?Xi.constant[3]:0)):(_e(Xi.buffer)?Aa=Je.createStream(34962,Xi.buffer):Aa=Je.getBuffer(Xi.buffer),wa="type"in Xi?zr[Xi.type]:Aa.dtype,wo=!!Xi.normalized,Ln=Xi.size|0,$i=Xi.offset|0,ea=Xi.stride|0,Sa=Xi.divisor|0)),Za=Qe.state,Qe.state=Ia,xo=Qe.x,Qe.x=yn,Wa=Qe.y,Qe.y=Ya,hn=Qe.z,Qe.z=ba,Un=Qe.w,Qe.w=Da,Ss=Qe.buffer,Qe.buffer=Aa,Kn=Qe.size,Qe.size=Ln,ns=Qe.normalized,Qe.normalized=wo,Jo=Qe.type,Qe.type=wa,vo=Qe.offset,Qe.offset=$i,ma=Qe.stride,Qe.stride=ea,ja=Qe.divisor,Qe.divisor=Sa,To=this.sizeBuffer,Rr.buffer=To,Ao=!1,la=1,Ki=0,ho=0,Ka=0,Ca=0,ta=null,En=0,Mo=!1,Ds=5126,Ro=0,vs=0,Ks=0,_e(Rr)?(Ao=!0,ta=Je.createStream(34962,Rr),Ds=ta.dtype):(ta=Je.getBuffer(Rr),ta?Ds=ta.dtype:"constant"in Rr?(la=2,typeof Rr.constant=="number"?(Ki=Rr.constant,ho=Ka=Ca=0):(Ki=Rr.constant.length>0?Rr.constant[0]:0,ho=Rr.constant.length>1?Rr.constant[1]:0,Ka=Rr.constant.length>2?Rr.constant[2]:0,Ca=Rr.constant.length>3?Rr.constant[3]:0)):(_e(Rr.buffer)?ta=Je.createStream(34962,Rr.buffer):ta=Je.getBuffer(Rr.buffer),Ds="type"in Rr?zr[Rr.type]:ta.dtype,Mo=!!Rr.normalized,En=Rr.size|0,Ro=Rr.offset|0,vs=Rr.stride|0,Ks=Rr.divisor|0)),as=Xe.state,Xe.state=la,Jn=Xe.x,Xe.x=Ki,Cs=Xe.y,Xe.y=ho,Xa=Xe.z,Xe.z=Ka,Zo=Xe.w,Xe.w=Ca,Eo=Xe.buffer,Xe.buffer=ta,lo=Xe.size,Xe.size=En,$a=Xe.normalized,Xe.normalized=Mo,Xo=Xe.type,Xe.type=Ds,rs=Xe.offset,Xe.offset=Ro,$n=Xe.stride,Xe.stride=vs,Sn=Xe.divisor,Xe.divisor=Ks,uo=this.sizeBuffer,Br.buffer=uo,Rs=!1,xs=1,Go=0,os=0,So=0,Qn=0,zo=null,rl=0,$o=!1,Na=5126,Ua=0,Po=0,fo=0,_e(Br)?(Rs=!0,zo=Je.createStream(34962,Br),Na=zo.dtype):(zo=Je.getBuffer(Br),zo?Na=zo.dtype:"constant"in Br?(xs=2,typeof Br.constant=="number"?(Go=Br.constant,os=So=Qn=0):(Go=Br.constant.length>0?Br.constant[0]:0,os=Br.constant.length>1?Br.constant[1]:0,So=Br.constant.length>2?Br.constant[2]:0,Qn=Br.constant.length>3?Br.constant[3]:0)):(_e(Br.buffer)?zo=Je.createStream(34962,Br.buffer):zo=Je.getBuffer(Br.buffer),Na="type"in Br?zr[Br.type]:zo.dtype,$o=!!Br.normalized,rl=Br.size|0,Ua=Br.offset|0,Po=Br.stride|0,fo=Br.divisor|0)),ro=Tt.state,Tt.state=xs,Ma=Tt.x,Tt.x=Go,io=Tt.y,Tt.y=os,aa=Tt.z,Tt.z=So,Oo=Tt.w,Tt.w=Qn,No=Tt.buffer,Tt.buffer=zo,Zs=Tt.size,Tt.size=rl,Fs=Tt.normalized,Tt.normalized=$o,ws=Tt.type,Tt.type=Na,no=Tt.offset,Tt.offset=Ua,Ls=Tt.stride,Tt.stride=Po,ds=Tt.divisor,Tt.divisor=fo,Xs=Mt.vert,Mt.vert=xt,oa=Mt.frag,Mt.frag=_t,rt.dirty=!0,vi(nt,oi,Pi),nt.viewportWidth=ji,nt.viewportHeight=Vi,Di[0]=zi,Di[1]=Mi,Di[2]=sn,Di[3]=fi,Fe[0]=Or,Fe[1]=st,Fe[2]=Wt,Fe[3]=tr,ct.blend_enable=or,ye[0]=Nr,ye[1]=hi,ye[2]=Gi,ye[3]=Qr,ct.depth_enable=Ui,ct.stencil_enable=zn,fn&&(r.cpuTime+=performance.now()-xn),je.offset=Wn,je.count=ia,je.primitive=za,ir[he]=na,ir[te]=Dn,ir[ke]=Zn,ir[Ee]=Ba,ir[Me]=Ea,ir[Oe]=tn,ir[Re]=Xn,ir[me]=Ja,ir[Be]=Ri,ir[fe]=cs,ir[Ze]=ln,ir[et]=va,ir[gt]=Co,Yn&&Je.destroyStream(jo),Pt.state=ks,Pt.x=bs,Pt.y=ps,Pt.z=sa,Pt.w=Bn,Pt.buffer=ms,Pt.size=ya,Pt.normalized=on,Pt.type=mn,Pt.offset=Ga,Pt.stride=ca,Pt.divisor=bn,qn&&Je.destroyStream(Aa),Qe.state=Za,Qe.x=xo,Qe.y=Wa,Qe.z=hn,Qe.w=Un,Qe.buffer=Ss,Qe.size=Kn,Qe.normalized=ns,Qe.type=Jo,Qe.offset=vo,Qe.stride=ma,Qe.divisor=ja,Ao&&Je.destroyStream(ta),Xe.state=as,Xe.x=Jn,Xe.y=Cs,Xe.z=Xa,Xe.w=Zo,Xe.buffer=Eo,Xe.size=lo,Xe.normalized=$a,Xe.type=Xo,Xe.offset=rs,Xe.stride=$n,Xe.divisor=Sn,Rs&&Je.destroyStream(zo),Tt.state=ro,Tt.x=Ma,Tt.y=io,Tt.z=aa,Tt.w=Oo,Tt.buffer=No,Tt.size=Zs,Tt.normalized=Fs,Tt.type=ws,Tt.offset=no,Tt.stride=Ls,Tt.divisor=ds,Mt.vert=Xs,Mt.frag=oa,rt.dirty=!0},batch:function(oi,vi){var Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st;if(Pi=Ot.angle_instanced_arrays,Yr=fr.next,Yr!==fr.cur&&(Yr?Te.bindFramebuffer(36160,Yr.framebuffer):Te.bindFramebuffer(36160,null),fr.cur=Yr),rt.dirty){var Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka;Wt=ct.dither,Wt!==rt.dither&&(Wt?Te.enable(3024):Te.disable(3024),rt.dither=Wt),tr=Ie[0],or=Ie[1],(tr!==lt[0]||or!==lt[1])&&(Te.blendEquationSeparate(tr,or),lt[0]=tr,lt[1]=or),Nr=ct.depth_func,Nr!==rt.depth_func&&(Te.depthFunc(Nr),rt.depth_func=Nr),hi=de[0],Gi=de[1],(hi!==ht[0]||Gi!==ht[1])&&(Te.depthRange(hi,Gi),ht[0]=hi,ht[1]=Gi),Qr=ct.depth_mask,Qr!==rt.depth_mask&&(Te.depthMask(Qr),rt.depth_mask=Qr),Ui=Et[0],zn=Et[1],fn=Et[2],xn=Et[3],(Ui!==St[0]||zn!==St[1]||fn!==St[2]||xn!==St[3])&&(Te.colorMask(Ui,zn,fn,xn),St[0]=Ui,St[1]=zn,St[2]=fn,St[3]=xn),_a=ct.cull_enable,_a!==rt.cull_enable&&(_a?Te.enable(2884):Te.disable(2884),rt.cull_enable=_a),Wn=ct.cull_face,Wn!==rt.cull_face&&(Te.cullFace(Wn),rt.cull_face=Wn),Fn=ct.frontFace,Fn!==rt.frontFace&&(Te.frontFace(Fn),rt.frontFace=Fn),ia=ct.lineWidth,ia!==rt.lineWidth&&(Te.lineWidth(ia),rt.lineWidth=ia),za=ct.polygonOffset_enable,za!==rt.polygonOffset_enable&&(za?Te.enable(32823):Te.disable(32823),rt.polygonOffset_enable=za),Hr=Zt[0],na=Zt[1],(Hr!==qr[0]||na!==qr[1])&&(Te.polygonOffset(Hr,na),qr[0]=Hr,qr[1]=na),go=ct.sample_alpha,go!==rt.sample_alpha&&(go?Te.enable(32926):Te.disable(32926),rt.sample_alpha=go),Dn=ct.sample_enable,Dn!==rt.sample_enable&&(Dn?Te.enable(32928):Te.disable(32928),rt.sample_enable=Dn),un=Lr[0],Zn=Lr[1],(un!==vr[0]||Zn!==vr[1])&&(Te.sampleCoverage(un,Zn),vr[0]=un,vr[1]=Zn),Wo=ct.stencil_mask,Wo!==rt.stencil_mask&&(Te.stencilMask(Wo),rt.stencil_mask=Wo),Ba=Er[0],Bo=Er[1],Ea=Er[2],(Ba!==si[0]||Bo!==si[1]||Ea!==si[2])&&(Te.stencilFunc(Ba,Bo,Ea),si[0]=Ba,si[1]=Bo,si[2]=Ea),Ha=Ei[0],tn=Ei[1],Cn=Ei[2],Xn=Ei[3],(Ha!==Si[0]||tn!==Si[1]||Cn!==Si[2]||Xn!==Si[3])&&(Te.stencilOpSeparate(Ha,tn,Cn,Xn),Si[0]=Ha,Si[1]=tn,Si[2]=Cn,Si[3]=Xn),ts=xi[0],Ja=xi[1],to=xi[2],Ri=xi[3],(ts!==Hi[0]||Ja!==Hi[1]||to!==Hi[2]||Ri!==Hi[3])&&(Te.stencilOpSeparate(ts,Ja,to,Ri),Hi[0]=ts,Hi[1]=Ja,Hi[2]=to,Hi[3]=Ri),an=ct.scissor_enable,an!==rt.scissor_enable&&(an?Te.enable(3089):Te.disable(3089),rt.scissor_enable=an),cs=Jr[0],pa=Jr[1],ln=Jr[2],ka=Jr[3],(cs!==ci[0]||pa!==ci[1]||ln!==ci[2]||ka!==ci[3])&&(Te.scissor(cs,pa,ln,ka),ci[0]=cs,ci[1]=pa,ci[2]=ln,ci[3]=ka)}Ni=this.viewport,Ur=Ni.x|0,ti=Ni.y|0,ki="width"in Ni?Ni.width|0:nt.framebufferWidth-Ur,ji="height"in Ni?Ni.height|0:nt.framebufferHeight-ti,Vi=nt.viewportWidth,nt.viewportWidth=ki,zi=nt.viewportHeight,nt.viewportHeight=ji,Te.viewport(Ur,ti,ki,ji),Lt[0]=Ur,Lt[1]=ti,Lt[2]=ki,Lt[3]=ji,Te.blendColor(0,0,0,1),Pe[0]=0,Pe[1]=0,Pe[2]=0,Pe[3]=1,Ct?Te.enable(3042):Te.disable(3042),rt.blend_enable=Ct,Te.blendFuncSeparate(770,771,773,1),ue[0]=770,ue[1]=771,ue[2]=773,ue[3]=1,jt?Te.enable(2929):Te.disable(2929),rt.depth_enable=jt,At?Te.enable(2960):Te.disable(2960),rt.stencil_enable=At,Mi=rt.profile,Mi&&(sn=performance.now(),r.count+=vi),Te.useProgram(o.program),fi=Ot.angle_instanced_arrays;var va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn;for(Kt.setVAO(null),va=this.charBuffer,bo=!1,Co=1,Fi=0,Yn=0,xa=0,Qi=0,Nn=null,Pn=0,qa=!1,jo=5126,Vo=0,Pa=0,Oa=0,_e(va)?(bo=!0,Nn=Je.createStream(34962,va),jo=Nn.dtype):(Nn=Je.getBuffer(va),Nn?jo=Nn.dtype:"constant"in va?(Co=2,typeof va.constant=="number"?(Fi=va.constant,Yn=xa=Qi=0):(Fi=va.constant.length>0?va.constant[0]:0,Yn=va.constant.length>1?va.constant[1]:0,xa=va.constant.length>2?va.constant[2]:0,Qi=va.constant.length>3?va.constant[3]:0)):(_e(va.buffer)?Nn=Je.createStream(34962,va.buffer):Nn=Je.getBuffer(va.buffer),jo="type"in va?zr[va.type]:Nn.dtype,qa=!!va.normalized,Pn=va.size|0,Vo=va.offset|0,Pa=va.stride|0,Oa=va.divisor|0)),co=s.location,An=Vt[co],Co===1?(An.buffer||Te.enableVertexAttribArray(co),_o=Pn||1,(An.type!==jo||An.size!==_o||An.buffer!==Nn||An.normalized!==qa||An.offset!==Vo||An.stride!==Pa)&&(Te.bindBuffer(34962,Nn.buffer),Te.vertexAttribPointer(co,_o,jo,qa,Pa,Vo),An.type=jo,An.size=_o,An.buffer=Nn,An.normalized=qa,An.offset=Vo,An.stride=Pa),An.divisor!==Oa&&(fi.vertexAttribDivisorANGLE(co,Oa),An.divisor=Oa)):(An.buffer&&(Te.disableVertexAttribArray(co),An.buffer=null),(An.x!==Fi||An.y!==Yn||An.z!==xa||An.w!==Qi)&&(Te.vertexAttrib4f(co,Fi,Yn,xa,Qi),An.x=Fi,An.y=Yn,An.z=xa,An.w=Qi)),ks=this.sizeBuffer,Rr.buffer=ks,bs=!1,ps=1,sa=0,Bn=0,ms=0,ya=0,on=null,mn=0,Ga=!1,ca=5126,bn=0,Xi=0,qn=0,_e(Rr)?(bs=!0,on=Je.createStream(34962,Rr),ca=on.dtype):(on=Je.getBuffer(Rr),on?ca=on.dtype:"constant"in Rr?(ps=2,typeof Rr.constant=="number"?(sa=Rr.constant,Bn=ms=ya=0):(sa=Rr.constant.length>0?Rr.constant[0]:0,Bn=Rr.constant.length>1?Rr.constant[1]:0,ms=Rr.constant.length>2?Rr.constant[2]:0,ya=Rr.constant.length>3?Rr.constant[3]:0)):(_e(Rr.buffer)?on=Je.createStream(34962,Rr.buffer):on=Je.getBuffer(Rr.buffer),ca="type"in Rr?zr[Rr.type]:on.dtype,Ga=!!Rr.normalized,mn=Rr.size|0,bn=Rr.offset|0,Xi=Rr.stride|0,qn=Rr.divisor|0)),Ia=u.location,yn=Vt[Ia],ps===1?(yn.buffer||Te.enableVertexAttribArray(Ia),Ya=mn||1,(yn.type!==ca||yn.size!==Ya||yn.buffer!==on||yn.normalized!==Ga||yn.offset!==bn||yn.stride!==Xi)&&(Te.bindBuffer(34962,on.buffer),Te.vertexAttribPointer(Ia,Ya,ca,Ga,Xi,bn),yn.type=ca,yn.size=Ya,yn.buffer=on,yn.normalized=Ga,yn.offset=bn,yn.stride=Xi),yn.divisor!==qn&&(fi.vertexAttribDivisorANGLE(Ia,qn),yn.divisor=qn)):(yn.buffer&&(Te.disableVertexAttribArray(Ia),yn.buffer=null),(yn.x!==sa||yn.y!==Bn||yn.z!==ms||yn.w!==ya)&&(Te.vertexAttrib4f(Ia,sa,Bn,ms,ya),yn.x=sa,yn.y=Bn,yn.z=ms,yn.w=ya)),ba=this.position,Da=!1,Aa=1,Ln=0,wo=0,wa=0,$i=0,ea=null,Sa=0,Za=!1,xo=5126,Wa=0,hn=0,Un=0,_e(ba)?(Da=!0,ea=Je.createStream(34962,ba),xo=ea.dtype):(ea=Je.getBuffer(ba),ea?xo=ea.dtype:"constant"in ba?(Aa=2,typeof ba.constant=="number"?(Ln=ba.constant,wo=wa=$i=0):(Ln=ba.constant.length>0?ba.constant[0]:0,wo=ba.constant.length>1?ba.constant[1]:0,wa=ba.constant.length>2?ba.constant[2]:0,$i=ba.constant.length>3?ba.constant[3]:0)):(_e(ba.buffer)?ea=Je.createStream(34962,ba.buffer):ea=Je.getBuffer(ba.buffer),xo="type"in ba?zr[ba.type]:ea.dtype,Za=!!ba.normalized,Sa=ba.size|0,Wa=ba.offset|0,hn=ba.stride|0,Un=ba.divisor|0)),Ss=l.location,Kn=Vt[Ss],Aa===1?(Kn.buffer||Te.enableVertexAttribArray(Ss),ns=Sa||2,(Kn.type!==xo||Kn.size!==ns||Kn.buffer!==ea||Kn.normalized!==Za||Kn.offset!==Wa||Kn.stride!==hn)&&(Te.bindBuffer(34962,ea.buffer),Te.vertexAttribPointer(Ss,ns,xo,Za,hn,Wa),Kn.type=xo,Kn.size=ns,Kn.buffer=ea,Kn.normalized=Za,Kn.offset=Wa,Kn.stride=hn),Kn.divisor!==Un&&(fi.vertexAttribDivisorANGLE(Ss,Un),Kn.divisor=Un)):(Kn.buffer&&(Te.disableVertexAttribArray(Ss),Kn.buffer=null),(Kn.x!==Ln||Kn.y!==wo||Kn.z!==wa||Kn.w!==$i)&&(Te.vertexAttrib4f(Ss,Ln,wo,wa,$i),Kn.x=Ln,Kn.y=wo,Kn.z=wa,Kn.w=$i)),Jo=this.sizeBuffer,Br.buffer=Jo,vo=!1,ma=1,ja=0,To=0,Ao=0,la=0,Ki=null,ho=0,Ka=!1,Ca=5126,ta=0,En=0,Mo=0,_e(Br)?(vo=!0,Ki=Je.createStream(34962,Br),Ca=Ki.dtype):(Ki=Je.getBuffer(Br),Ki?Ca=Ki.dtype:"constant"in Br?(ma=2,typeof Br.constant=="number"?(ja=Br.constant,To=Ao=la=0):(ja=Br.constant.length>0?Br.constant[0]:0,To=Br.constant.length>1?Br.constant[1]:0,Ao=Br.constant.length>2?Br.constant[2]:0,la=Br.constant.length>3?Br.constant[3]:0)):(_e(Br.buffer)?Ki=Je.createStream(34962,Br.buffer):Ki=Je.getBuffer(Br.buffer),Ca="type"in Br?zr[Br.type]:Ki.dtype,Ka=!!Br.normalized,ho=Br.size|0,ta=Br.offset|0,En=Br.stride|0,Mo=Br.divisor|0)),Ds=f.location,Ro=Vt[Ds],ma===1?(Ro.buffer||Te.enableVertexAttribArray(Ds),vs=ho||1,(Ro.type!==Ca||Ro.size!==vs||Ro.buffer!==Ki||Ro.normalized!==Ka||Ro.offset!==ta||Ro.stride!==En)&&(Te.bindBuffer(34962,Ki.buffer),Te.vertexAttribPointer(Ds,vs,Ca,Ka,En,ta),Ro.type=Ca,Ro.size=vs,Ro.buffer=Ki,Ro.normalized=Ka,Ro.offset=ta,Ro.stride=En),Ro.divisor!==Mo&&(fi.vertexAttribDivisorANGLE(Ds,Mo),Ro.divisor=Mo)):(Ro.buffer&&(Te.disableVertexAttribArray(Ds),Ro.buffer=null),(Ro.x!==ja||Ro.y!==To||Ro.z!==Ao||Ro.w!==la)&&(Te.vertexAttrib4f(Ds,ja,To,Ao,la),Ro.x=ja,Ro.y=To,Ro.z=Ao,Ro.w=la)),Ks=this.scale,as=Ks[0],Jn=Ks[1],Te.uniform2f(z.location,as,Jn),Cs=this.translate,Xa=Cs[0],Zo=Cs[1],Te.uniform2f(T.location,Xa,Zo),Eo=this.viewportArray,lo=Eo[0],$a=Eo[1],Xo=Eo[2],rs=Eo[3],Te.uniform4f(F.location,lo,$a,Xo,rs),$n=je.elements,$n?Te.bindBuffer(34963,$n.buffer.buffer):Kt.currentVAO&&($n=tt.getElements(Kt.currentVAO.elements),$n&&Te.bindBuffer(34963,$n.buffer.buffer)),Sn=je.instances,Or=0;Or<vi;++Or){st=oi[Or];var uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr;uo=st.align,(!Or||Rs!==uo)&&(Rs=uo,Te.uniform1f(c.location,uo)),xs=d.call(this,nt,st,Or),xs&&xs._reglType==="framebuffer"&&(xs=xs.color[0]),Go=xs._texture,Te.uniform1i(h.location,Go.bind()),os=x.call(this,nt,st,Or),So=os[0],zo=os[1],(!Or||Qn!==So||rl!==zo)&&(Qn=So,rl=zo,Te.uniform2f(p.location,So,zo)),$o=y.call(this,nt,st,Or),Na=$o[0],Po=$o[1],(!Or||Ua!==Na||fo!==Po)&&(Ua=Na,fo=Po,Te.uniform2f(b.location,Na,Po)),ro=st.baseline,(!Or||Ma!==ro)&&(Ma=ro,Te.uniform1f(k.location,ro)),io=A.call(this,nt,st,Or),(!Or||aa!==io)&&(aa=io,Te.uniform1f(E.location,io)),Oo=st.color,No=Oo[0],Fs=Oo[1],no=Oo[2],ds=Oo[3],(!Or||Zs!==No||ws!==Fs||Ls!==no||Xs!==ds)&&(Zs=No,ws=Fs,Ls=no,Xs=ds,Te.uniform4f(L.location,No,Fs,no,ds)),oa=C.call(this,nt,st,Or),(!Or||Yo!==oa)&&(Yo=oa,Te.uniform1f(_.location,oa)),po=st.opacity,(!Or||ss!==po)&&(ss=po,Te.uniform1f(M.location,po)),ls=st.positionOffset,gs=ls[0],Ft=ls[1],(!Or||bt!==gs||hr!==Ft)&&(bt=gs,hr=Ft,Te.uniform2f(v.location,gs,Ft)),nr=st.offset,Sr=st.count,Sr&&(Sn>0?$n?fi.drawElementsInstancedANGLE(0,Sr,$n.type,nr<<($n.type-5121>>1),Sn):fi.drawArraysInstancedANGLE(0,nr,Sr,Sn):Sn<0&&($n?Te.drawElements(0,Sr,$n.type,nr<<($n.type-5121>>1)):Te.drawArrays(0,nr,Sr)),Go.unbind())}bo&&Je.destroyStream(Nn),bs&&Je.destroyStream(on),Da&&Je.destroyStream(ea),vo&&Je.destroyStream(Ki),rt.dirty=!0,Kt.setVAO(null),nt.viewportWidth=Vi,nt.viewportHeight=zi,Mi&&(r.cpuTime+=performance.now()-sn)}}}});var fK=Se((l1r,GOe)=>{"use strict";var m7t=b9(),g7t=w9(),_7t=T9(),x7t=A9(),b7t=S9(),w7t=M9(),T7t=E9(),A7t=k9(),S7t=C9(),M7t=L9();GOe.exports={"3e771157d23b4793771f65d83e6387262ed73d488209157f19a7fa027bddd71b":m7t,cbf700f001fff25b649fba9c37fa0dc6631c1cdee318ad49473d28ec10dcee81:g7t,"8fad2284703471df7c0e0d0a7b96d983e8c53f6d707dd55d5921c1eab71f6623":_7t,fe5b6844077cde1bdd7273f4495969fad93500c26a69b62e74ec2664c447bcc7:x7t,db1b82c68771e7f5012fad1fbdae7ff23b526e58d2995bf6dd2cf30024e0f41d:b7t,"49e82bba439f1d9d441c17ba252d05640bc63fefdf22d1219993633af7730210":w7t,dbd1cc9126a137a605df67dc0706e55116f04e33b4545a80042031752de5aef5:T7t,bfc540da96a87fcc039073cb37b45e6b81ef5ee6ef3529d726ceed8336354019:A7t,"6a5d6bd29c15cf7614221b94c3f384df47c2c46fbe4456e8c57b5cd14c84d923":S7t,"8902aff2b23b600f8103bcc84a8af2999d28795208aedadc2db06f921f9c7034":M7t}});var ZOe=Se((u1r,jOe)=>{"use strict";var WOe=uK(),E7t=fK();Object.assign(WOe.reglPrecompiled,E7t);jOe.exports=WOe});var KOe=Se((f1r,YOe)=>{"use strict";var XOe=e9e();XOe.plot=ZOe();YOe.exports=XOe});var cK=Se((c1r,eNe)=>{"use strict";var k7t=Zc(),QOe=Xf(),JOe=Gc().axisHoverFormat,C7t=Du().hovertemplateAttrs,xk=ek(),L7t=dd().idRegex,z7t=_f().templatedArray,dS=vu().extendFlat,o1=k7t.marker,P7t=o1.line,I7t=dS(QOe("marker.line",{editTypeOverride:"calc"}),{width:dS({},P7t.width,{editType:"calc"}),editType:"calc"}),z9=dS(QOe("marker"),{symbol:o1.symbol,angle:o1.angle,size:dS({},o1.size,{editType:"markerSize"}),sizeref:o1.sizeref,sizemin:o1.sizemin,sizemode:o1.sizemode,opacity:o1.opacity,colorbar:o1.colorbar,line:I7t,editType:"calc"});z9.color.editType=z9.cmin.editType=z9.cmax.editType="style";function $Oe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:L7t[e],editType:"plot"}}}eNe.exports={dimensions:z7t("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:dS({},xk.text,{}),hovertext:dS({},xk.hovertext,{}),hovertemplate:C7t(),xhoverformat:JOe("x"),yhoverformat:JOe("y"),marker:z9,xaxes:$Oe("x"),yaxes:$Oe("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:xk.selected.marker,editType:"calc"},unselected:{marker:xk.unselected.marker,editType:"calc"},opacity:xk.opacity}});var P9=Se((h1r,tNe)=>{"use strict";tNe.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 nNe=Se((d1r,iNe)=>{"use strict";var hK=Zr(),D7t=Jd(),rNe=cK(),R7t=ec(),F7t=$v(),q7t=P9(),B7t=FF().isOpenSymbol;iNe.exports=function(t,r,n,i){function a(d,p){return hK.coerce(t,r,rNe,d,p)}var o=D7t(t,r,{name:"dimensions",handleItemDefaults:O7t}),s=a("diagonal.visible"),u=a("showupperhalf"),l=a("showlowerhalf"),f=q7t(r,o,"values");if(!f||!s&&!u&&!l){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),F7t(t,r,n,i,a,{noAngleRef:!0,noStandOff:!0});var c=B7t(r.marker.symbol),h=R7t.isBubble(r);a("marker.line.width",c||h?1:0),N7t(t,r,i,a),hK.coerceSelectionMarkerOpacity(r,a)};function O7t(e,t){function r(i,a){return hK.coerce(e,t,rNe.dimensions,i,a)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function N7t(e,t,r,n){var i=t.dimensions,a=i.length,o=t.showupperhalf,s=t.showlowerhalf,u=t.diagonal.visible,l,f,c=new Array(a),h=new Array(a);for(l=0;l<a;l++){var d=l?l+1:"";c[l]="x"+d,h[l]="y"+d}var p=n("xaxes",c),x=n("yaxes",h),b=t._diag=new Array(a);t._xaxes={},t._yaxes={};var y=[],k=[];function E(F,q,U,H){if(F){var j=F.charAt(0),G=r._splomAxes[j];if(t["_"+j+"axes"][F]=1,H.push(F),!(F in G)){var O=G[F]={};U&&(O.label=U.label||"",U.visible&&U.axis&&(U.axis.type&&(O.type=U.axis.type),U.axis.matches&&(O.matches=q)))}}}var A=!u&&!s,L=!u&&!o;for(t._axesDim={},l=0;l<a;l++){var _=i[l],C=l===0,M=l===a-1,v=C&&A||M&&L?void 0:p[l],z=C&&L||M&&A?void 0:x[l];E(v,z,_,y),E(z,v,_,k),b[l]=[v,z],t._axesDim[v]=l,t._axesDim[z]=l}for(l=0;l<y.length;l++)for(f=0;f<k.length;f++){var T=y[l]+k[f];(l>f&&o||l<f&&s||l===f&&(u||!s||!o))&&(r._splomSubplots[T]=1)}(!s||!u&&o&&s)&&(r._splomGridDflt.xside="bottom",r._splomGridDflt.yside="left")}});var sNe=Se((p1r,oNe)=>{"use strict";var aNe=Zr();oNe.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:[]},u=a[r.uid];return u||(u=a[i]=aNe.extendFlat({},o,s),u.draw=function(){u.matrix&&u.matrix.draw&&(u.selectBatch.length||u.unselectBatch.length?u.matrix.draw(u.unselectBatch,u.selectBatch):u.matrix.draw()),u.dirty=!1},u.destroy=function(){u.matrix&&u.matrix.destroy&&u.matrix.destroy(),u.matrixOptions=null,u.selectBatch=null,u.unselectBatch=null,u=null}),u.dirty||aNe.extendFlat(u,o),u}});var fNe=Se((v1r,uNe)=>{"use strict";var dK=Zr(),I9=$c(),U7t=q0().calcMarkerSize,V7t=q0().calcAxisExpansion,H7t=R0(),lNe=Y2().markerSelection,G7t=Y2().markerStyle,W7t=sNe(),j7t=ju().BADNUM,Z7t=ox().TOO_MANY_POINTS;uNe.exports=function(t,r){var n=r.dimensions,i=r._length,a={},o=a.cdata=[],s=a.data=[],u=r._visibleDims=[],l,f,c,h,d;function p(E,A){for(var L=E.makeCalcdata({v:A.values,vcalendar:r.calendar},"v"),_=0;_<L.length;_++)L[_]=L[_]===j7t?NaN:L[_];o.push(L),s.push(E.type==="log"?dK.simpleMap(L,E.c2l):L)}for(l=0;l<n.length;l++)if(c=n[l],c.visible){if(h=I9.getFromId(t,r._diag[l][0]),d=I9.getFromId(t,r._diag[l][1]),h&&d&&h.type!==d.type){dK.log("Skipping splom dimension "+l+" with conflicting axis types");continue}h?(p(h,c),d&&d.type==="category"&&(d._categories=h._categories.slice())):p(d,c),u.push(l)}H7t(t,r),dK.extendFlat(a,G7t(t,r));var x=o.length,b=x*i>Z7t,y;for(b?y=a.sizeAvg||Math.max(a.size,3):y=U7t(r,i),f=0;f<u.length;f++)l=u[f],c=n[l],h=I9.getFromId(t,r._diag[l][0])||{},d=I9.getFromId(t,r._diag[l][1])||{},V7t(t,r,h,d,o[f],o[f],y);var k=W7t(t,r);return k.matrix||(k.matrix=!0),k.matrixOptions=a,k.selectedOptions=lNe(t,r,r.selected),k.unselectedOptions=lNe(t,r,r.unselected),[{x:!1,y:!1,t:{},trace:r}]}});var hNe=Se((cNe,bk)=>{(function(){var e,t,r,n,i,a;typeof performance!="undefined"&&performance!==null&&performance.now?bk.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(bk.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?(bk.exports=function(){return Date.now()-r},r=Date.now()):(bk.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(cNe)});var pNe=Se((y1r,F9)=>{var X7t=hNe(),s1=window,D9=["moz","webkit"],vS="AnimationFrame",yS=s1["request"+vS],wk=s1["cancel"+vS]||s1["cancelRequest"+vS];for(pS=0;!yS&&pS<D9.length;pS++)yS=s1[D9[pS]+"Request"+vS],wk=s1[D9[pS]+"Cancel"+vS]||s1[D9[pS]+"CancelRequest"+vS];var pS;(!yS||!wk)&&(R9=0,pK=0,dx=[],dNe=1e3/60,yS=function(e){if(dx.length===0){var t=X7t(),r=Math.max(0,dNe-(t-R9));R9=r+t,setTimeout(function(){var n=dx.slice(0);dx.length=0;for(var i=0;i<n.length;i++)if(!n[i].cancelled)try{n[i].callback(R9)}catch(a){setTimeout(function(){throw a},0)}},Math.round(r))}return dx.push({handle:++pK,callback:e,cancelled:!1}),pK},wk=function(e){for(var t=0;t<dx.length;t++)dx[t].handle===e&&(dx[t].cancelled=!0)});var R9,pK,dx,dNe;F9.exports=function(e){return yS.call(s1,e)};F9.exports.cancel=function(){wk.apply(s1,arguments)};F9.exports.polyfill=function(e){e||(e=s1),e.requestAnimationFrame=yS,e.cancelAnimationFrame=wk}});var yNe=Se((m1r,vNe)=>{vNe.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,u=t;s<a;s++,u++)o[s]=u;return o}});var xNe=Se((g1r,_Ne)=>{"use strict";var Y7t=uY(),K7t=Zm(),J7t=W2(),mNe=pNe(),$7t=yNe(),vK=eS(),Q7t=j2();_Ne.exports=px;function px(e,t){if(!(this instanceof px))return new px(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=Y7t(e),this.canvas=this.scatter.canvas}px.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=mNe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,mNe(()=>{this.dirty=!1})),this)};px.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};px.prototype.updateItem=function(e,t){let{regl:r}=this;if(t===null)return this.traces[e]=null,this;if(!t)return this;let n=K7t(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:vK([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=vK(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(Q7t(n.data)),i.columns=n.data.length,i.count=n.data[0].length,i.bounds=[];for(let x=0;x<i.columns;x++)i.bounds[x]=J7t(n.data[x],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(gNe),o=!0):i.padding=gNe(n.padding));let s=i.columns,u=i.count,l=i.viewport.width,f=i.viewport.height,c=i.viewport.x,h=i.viewport.y,d=l/s,p=f/s;i.passes=[];for(let x=0;x<s;x++)for(let b=0;b<s;b++){if(!i.diagonal&&b===x||!i.upper&&x>b||!i.lower&&x<b)continue;let y=eUt(i.id,x,b),k=this.passes[y]||(this.passes[y]={});if(n.data&&(n.transpose?k.positions={x:{buffer:i.buffer,offset:b,count:u,stride:s},y:{buffer:i.buffer,offset:x,count:u,stride:s}}:k.positions={x:{buffer:i.buffer,offset:b*u,count:u},y:{buffer:i.buffer,offset:x*u,count:u}},k.bounds=q9(i.bounds,x,b)),n.domain||n.viewport||n.data){let E=o?q9(i.padding,x,b):i.padding;if(i.domain){let[A,L,_,C]=q9(i.domain,x,b);k.viewport=[c+A*l+E[0],h+L*f+E[1],c+_*l-E[2],h+C*f-E[3]]}else k.viewport=[c+b*d+d*E[0],h+x*p+p*E[1],c+(b+1)*d-d*E[2],h+(x+1)*p-p*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?q9(i.range,x,b):i.range||k.bounds),i.passes.push(y)}return this};px.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(...$7t(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};px.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 eUt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function q9(e,t,r){let n,i,a,o,s,u,l,f,c=e[t],h=e[r];return c.length>2?(n=c[0],a=c[2],i=c[1],o=c[3]):c.length?(n=i=c[0],a=o=c[1]):(n=c.x,i=c.y,a=c.x+c.width,o=c.y+c.height),h.length>2?(s=h[0],l=h[2],u=h[1],f=h[3]):h.length?(s=u=h[0],l=f=h[1]):(s=h.x,u=h.y,l=h.x+h.width,f=h.y+h.height),[s,i,l,o]}function gNe(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=vK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var wNe=Se((_1r,bNe)=>{"use strict";var tUt=xNe(),yK=Zr(),B9=$c(),rUt=Sy().selectMode;bNe.exports=function(t,r,n){if(n.length)for(var i=0;i<n.length;i++)iUt(t,n[i][0])};function iUt(e,t){var r=e._fullLayout,n=r._size,i=t.trace,a=t.t,o=r._splomScenes[i.uid],s=o.matrixOptions,u=s.cdata,l=r._glcanvas.data()[0].regl,f=r.dragmode,c,h,d,p,x;if(u.length!==0){s.lower=i.showupperhalf,s.upper=i.showlowerhalf,s.diagonal=i.diagonal.visible;var b=i._visibleDims,y=u.length,k=o.viewOpts={};for(k.ranges=new Array(y),k.domains=new Array(y),x=0;x<b.length;x++){d=b[x];var E=k.ranges[x]=new Array(4),A=k.domains[x]=new Array(4);c=B9.getFromId(e,i._diag[d][0]),c&&(E[0]=c._rl[0],E[2]=c._rl[1],A[0]=c.domain[0],A[2]=c.domain[1]),h=B9.getFromId(e,i._diag[d][1]),h&&(E[1]=h._rl[0],E[3]=h._rl[1],A[1]=h.domain[0],A[3]=h.domain[1])}var L=e._context.plotGlPixelRatio,_=n.l*L,C=n.b*L,M=n.w*L,v=n.h*L;k.viewport=[_,C,M+_,v+C],o.matrix===!0&&(o.matrix=tUt(l));var z=r.clickmode.indexOf("select")>-1,T=rUt(f)||!!i.selectedpoints||z,F=!0;if(T){var q=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var U=i.selectedpoints,H={};for(d=0;d<U.length;d++)H[U[d]]=!0;var j=[];for(d=0;d<q;d++)H[d]||j.push(d);o.unselectBatch=j}var G=a.xpx=new Array(y),O=a.ypx=new Array(y);for(x=0;x<b.length;x++){if(d=b[x],c=B9.getFromId(e,i._diag[d][0]),c)for(G[x]=new Array(q),p=0;p<q;p++)G[x][p]=c.c2p(u[x][p]);if(h=B9.getFromId(e,i._diag[d][1]),h)for(O[x]=new Array(q),p=0;p<q;p++)O[x][p]=h.c2p(u[x][p])}if(o.selectBatch.length||o.unselectBatch.length){var W=yK.extendFlat({},s,o.unselectedOptions,k),re=yK.extendFlat({},s,o.selectedOptions,k);o.matrix.update(W,re),F=!1}}else a.xpx=a.ypx=null;if(F){var ne=yK.extendFlat({},s,k);o.matrix.update(ne,null)}}}});var mK=Se(TNe=>{"use strict";TNe.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 u=o[s];if(t._diag[u][a]===n)return s}return!1}});var kNe=Se((b1r,ENe)=>{"use strict";var ANe=mK(),nUt=RF().calcHover,SNe=hu().getFromId,aUt=vu().extendFlat;function oUt(e,t,r,n,i){i||(i={});var a=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=MNe(e,t,r);if((a||o)&&i.hoversubplots==="axis"&&s[0])for(var u=(a?e.xa:e.ya)._subplotsWith,l=i.gd,f=aUt({},e),c=0;c<u.length;c++){var h=u[c];if(h!==e.xa._id+e.ya._id){o?f.xa=SNe(l,h,"x"):f.ya=SNe(l,h,"y");var d=a||o,p=MNe(f,t,r,d);s=s.concat(p)}}return s}function MNe(e,t,r,n){var i=e.cd,a=i[0].trace,o=e.scene,s=o.matrixOptions.cdata,u=e.xa,l=e.ya,f=u.c2p(t),c=l.c2p(r),h=e.distance,d=ANe.getDimIndex(a,u),p=ANe.getDimIndex(a,l);if(d===!1||p===!1)return[e];for(var x=s[d],b=s[p],y,k,E=h,A=0;A<x.length;A++)if(!(n&&A!==e.index)){var L=x[A],_=b[A],C=u.c2p(L)-f,M=l.c2p(_)-c,v=Math.sqrt(C*C+M*M);(n||v<E)&&(E=k=v,y=A)}return e.index=y,e.distance=E,e.dxy=k,y===void 0?[e]:[nUt(e,x,b,a)]}ENe.exports={hoverPoints:oUt}});var DNe=Se((w1r,INe)=>{"use strict";var PNe=Zr(),CNe=PNe.pushUnique,LNe=ec(),zNe=mK();INe.exports=function(t,r){var n=t.cd,i=n[0].trace,a=n[0].t,o=t.scene,s=o.matrixOptions.cdata,u=t.xaxis,l=t.yaxis,f=[];if(!o)return f;var c=!LNe.hasMarkers(i)&&!LNe.hasText(i);if(i.visible!==!0||c)return f;var h=zNe.getDimIndex(i,u),d=zNe.getDimIndex(i,l);if(h===!1||d===!1)return f;var p=a.xpx[h],x=a.ypx[d],b=s[h],y=s[d],k=(t.scene.selectBatch||[]).slice(),E=[];if(r!==!1&&!r.degenerate)for(var A=0;A<b.length;A++)r.contains([p[A],x[A]],null,A,t)?(f.push({pointNumber:A,x:b[A],y:y[A]}),CNe(k,A)):k.indexOf(A)!==-1?CNe(k,A):E.push(A);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,PNe.extendFlat({},L,o.selectedOptions,o.viewOpts)),o.selectBatch=k,o.unselectBatch=E,f}});var qNe=Se((T1r,FNe)=>{"use strict";var RNe=Zr(),sUt=R0(),lUt=Y2().markerStyle;FNe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){sUt(t,n),RNe.extendFlat(i.matrixOptions,lUt(t,n));var a=RNe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var ONe=Se((A1r,BNe)=>{"use strict";var uUt=Ul(),fUt=pV();BNe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:cK(),supplyDefaults:nNe(),colorbar:ep(),calc:fNe(),plot:wNe(),hoverPoints:kNe().hoverPoints,selectPoints:DNe(),editStyle:qNe(),meta:{}};uUt.register(fUt)});var WNe=Se((S1r,GNe)=>{"use strict";var cUt=NY(),hUt=Ul(),dUt=x9(),pUt=Dd().getModuleCalcData,vx=Th(),NNe=$c().getFromId,UNe=hu().shouldShowZeroLine,VNe="splom",HNe={};function vUt(e){var t=e._fullLayout,r=hUt.getModule(VNe),n=pUt(e.calcdata,r)[0],i=dUt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],HNe);i&&(t._hasOnlyLargeSploms&&gK(e),r.plot(e,{},n))}function yUt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&gK(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&&mUt(e,a,o)}}function mUt(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],u=a[o]=new Array(4),l=NNe(e,t._diag[s][0]);l&&(u[0]=l.r2l(l.range[0]),u[2]=l.r2l(l.range[1]));var f=NNe(e,t._diag[s][1]);f&&(u[1]=f.r2l(f.range[0]),u[3]=f.r2l(f.range[1]))}r.selectBatch.length||r.unselectBatch.length?r.matrix.update({ranges:a},{ranges:a}):r.matrix.update({ranges:a})}function gK(e){var t=e._fullLayout,r=t._glcanvas.data()[0].regl,n=t._splomGrid;n||(n=t._splomGrid=cUt(r)),n.update(gUt(e))}function gUt(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(_,C,M,v,z,T){M*=t,v*=t,z*=t,T*=t;var F=C[_+"color"],q=C[_+"width"],U=String(F+q);U in a?a[U].data.push(NaN,NaN,M,v,z,T):a[U]={data:[M,v,z,T],join:"rect",thickness:q*t,color:F,viewport:i,range:i,overlay:!1}}for(o in r._splomSubplots){var u=r._plots[o],l=u.xaxis,f=u.yaxis,c=l._gridVals,h=f._gridVals,d=l._offset,p=l._length,x=f._length,b=n.b+f.domain[0]*n.h,y=-f._m,k=-y*f.r2l(f.range[0],f.calendar),E,A;if(l.showgrid)for(o=0;o<c.length;o++)E=d+l.l2p(c[o].x),s("grid",l,E,b,E,b+x);if(f.showgrid)for(o=0;o<h.length;o++)A=b+k+y*h[o].x,s("grid",f,d,A,d+p,A);UNe(e,l,f)&&(E=d+l.l2p(0),s("zeroline",l,E,b,E,b+x)),UNe(e,f,l)&&(A=b+k+0,s("zeroline",f,d,A,d+p,A))}var L=[];for(o in a)L.push(a[o]);return L}function _Ut(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 u=n._splomScenes[s.uid];u&&u.destroy&&u.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),vx.clean(e,t,r,n)}GNe.exports={name:VNe,attr:vx.attr,attrRegex:vx.attrRegex,layoutAttributes:vx.layoutAttributes,supplyLayoutDefaults:vx.supplyLayoutDefaults,drawFramework:vx.drawFramework,plot:vUt,drag:yUt,updateGrid:gK,clean:_Ut,updateFx:vx.updateFx,toSVG:vx.toSVG,reglPrecompiled:HNe}});var ZNe=Se((M1r,jNe)=>{"use strict";var xUt=b9(),bUt=w9(),wUt=T9(),TUt=E9(),AUt=k9(),SUt=A9(),MUt=S9(),EUt=M9(),kUt=C9(),CUt=L9();jNe.exports={"3e771157d23b4793771f65d83e6387262ed73d488209157f19a7fa027bddd71b":xUt,cbf700f001fff25b649fba9c37fa0dc6631c1cdee318ad49473d28ec10dcee81:bUt,"8fad2284703471df7c0e0d0a7b96d983e8c53f6d707dd55d5921c1eab71f6623":wUt,dbd1cc9126a137a605df67dc0706e55116f04e33b4545a80042031752de5aef5:TUt,bfc540da96a87fcc039073cb37b45e6b81ef5ee6ef3529d726ceed8336354019:AUt,fe5b6844077cde1bdd7273f4495969fad93500c26a69b62e74ec2664c447bcc7:SUt,db1b82c68771e7f5012fad1fbdae7ff23b526e58d2995bf6dd2cf30024e0f41d:MUt,"49e82bba439f1d9d441c17ba252d05640bc63fefdf22d1219993633af7730210":EUt,"6a5d6bd29c15cf7614221b94c3f384df47c2c46fbe4456e8c57b5cd14c84d923":kUt,"8902aff2b23b600f8103bcc84a8af2999d28795208aedadc2db06f921f9c7034":CUt}});var KNe=Se((E1r,YNe)=>{"use strict";var XNe=WNe(),LUt=ZNe();Object.assign(XNe.reglPrecompiled,LUt);YNe.exports=XNe});var QNe=Se((k1r,$Ne)=>{"use strict";var JNe=ONe();JNe.basePlotModule=KNe(),$Ne.exports=JNe});var bK=Se((C1r,e7e)=>{"use strict";var zUt=Xf(),_K=Rd(),xK=uc(),PUt=Ec().attributes,O9=vu().extendFlat,IUt=_f().templatedArray;e7e.exports={domain:PUt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:xK({editType:"plot"}),tickfont:xK({autoShadowDflt:!0,editType:"plot"}),rangefont:xK({editType:"plot"}),dimensions:IUt("dimension",{label:{valType:"string",editType:"plot"},tickvals:O9({},_K.tickvals,{editType:"plot"}),ticktext:O9({},_K.ticktext,{editType:"plot"}),tickformat:O9({},_K.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:O9({editType:"calc"},zUt("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 Tk=Se((L1r,t7e)=>{"use strict";t7e.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 Km=Se((z1r,i7e)=>{"use strict";var DUt=BM();function r7e(e){return[e]}i7e.exports={keyFun:function(e){return e.key},repeat:r7e,descend:DUt,wrap:r7e,unwrap:function(e){return e[0]}}});var AK=Se((P1r,p7e)=>{"use strict";var Eh=Tk(),em=Nl(),RUt=Km().keyFun,N9=Km().repeat,mS=Zr().sorterAsc,FUt=Zr().strTranslate,n7e=Eh.bar.snapRatio;function a7e(e,t){return e*(1-n7e)+t*n7e}var o7e=Eh.bar.snapClose;function qUt(e,t){return e*(1-o7e)+t*o7e}function V9(e,t,r,n){if(BUt(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 u=t[a],l=u,f=a;i*f<i*o;f+=i){var c=f+i,h=t[c];if(i*r<i*qUt(u,h))return a7e(u,l);if(i*r<i*h||c===o)return a7e(h,u);l=u,u=h}}function BUt(e,t){for(var r=0;r<t.length;r++)if(e>=t[r][0]&&e<=t[r][1])return!0;return!1}function OUt(e){e.attr("x",-Eh.bar.captureWidth/2).attr("width",Eh.bar.captureWidth)}function NUt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function UUt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=s7e(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 s7e(e,t){return e.map(function(r){return r.map(function(n){return Math.max(0,n*t)}).sort(mS)})}function VUt(e,t){var r=Eh.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 l7e(){em.select(document.body).style("cursor",null)}function TK(e){e.attr("stroke-dasharray",UUt)}function U9(e,t){var r=em.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(Eh.bar.snapDuration).each("end",t):r;TK(n)}function u7e(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,u=r.filter.getConsolidated(),l=s7e(u,s),f=NaN,c=NaN,h=NaN;for(o=0;o<=l.length;o++){var d=l[o];if(d&&d[0]<=t&&t<=d[1]){f=o;break}else if(c=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(i=f,isNaN(i)&&(isNaN(c)||isNaN(h)?i=isNaN(c)?h:c:i=t-l[c][1]<l[h][0]-t?c:h),!isNaN(i)){var p=l[i],x=VUt(p,t);x&&(a.interval=u[i],a.intervalPix=p,a.region=x)}}if(e.ordinal&&!a.region){var b=e.unitTickvals,y=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(y>=k[0]&&y<=k[1]){a.clickableOrdinalRange=k;break}}}return a}function HUt(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*Eh.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=u7e(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var u=o.map(t.unitToPaddedPx);s.grabPoint=r-u[0]-Eh.verticalPadding,s.barLength=u[1]-u[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(l){return l[0]!==o[0]&&l[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function f7e(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*Eh.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(mS),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),U9(e.parentNode)}function GUt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(c7e(e,t),f7e(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=em.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,l7e(),!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&&wK(r)):wK(r),i.brushCallback(t),U9(e.parentNode),i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var u=t.unitTickvals;u[u.length-1]<u[0]&&u.reverse(),i.newExtent=[V9(0,u,i.newExtent[0],i.stayingIntervals),V9(1,u,i.newExtent[1],i.stayingIntervals)];var l=i.newExtent[1]>i.newExtent[0];i.extent=i.stayingIntervals.concat(l?[i.newExtent]:[]),i.extent.length||wK(r),i.brushCallback(t),l?U9(e.parentNode,s):(s(),U9(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function c7e(e,t){var r=t.height-em.mouse(e)[1]-2*Eh.verticalPadding,n=u7e(t,r),i="crosshair";n.clickableOrdinalRange?i="pointer":n.region&&(i=n.region+"-resize"),em.select(document.body).style("cursor",i)}function WUt(e){e.on("mousemove",function(t){em.event.preventDefault(),t.parent.inBrushDrag||c7e(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||l7e()}).call(em.behavior.drag().on("dragstart",function(t){HUt(this,t)}).on("drag",function(t){f7e(this,t)}).on("dragend",function(t){GUt(this,t)}))}function h7e(e,t){return e[0]-t[0]}function jUt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(".background").data(N9);i.enter().append("rect").classed("background",!0).call(OUt).call(NUt).style("pointer-events",n?"none":"auto").attr("transform",FUt(0,Eh.verticalPadding)),i.call(WUt).attr("height",function(s){return s.height-Eh.verticalPadding});var a=e.selectAll(".highlight-shadow").data(N9);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-Eh.bar.width/2).attr("stroke-width",Eh.bar.width+Eh.bar.strokeWidth).attr("stroke",t).attr("opacity",Eh.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(TK);var o=e.selectAll(".highlight").data(N9);o.enter().append("line").classed("highlight",!0).attr("x",-Eh.bar.width/2).attr("stroke-width",Eh.bar.width-Eh.bar.strokeWidth).attr("stroke",Eh.bar.fillColor).attr("opacity",Eh.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(TK)}function ZUt(e,t,r){var n=e.selectAll("."+Eh.cn.axisBrush).data(N9,RUt);n.enter().append("g").classed(Eh.cn.axisBrush,!0),jUt(n,t,r)}function XUt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function wK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function YUt(e){return function(r){var n=r.brush,i=XUt(n),a=i.slice();n.filter.set(a),e()}}function d7e(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 KUt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(mS)}).sort(h7e),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=d7e(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 JUt(e,t,r,n,i,a){var o=KUt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:YUt(i),brushEndCallback:a}}}function $Ut(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(mS)}),t.multiselect?e=d7e(e.sort(h7e)):e=[e[0]]):e=[e.sort(mS)],t.tickvals){var r=t.tickvals.slice().sort(mS);if(e=e.map(function(n){var i=[V9(0,r,n[0],[]),V9(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]}p7e.exports={makeBrush:JUt,ensureAxisBrush:ZUt,cleanRanges:$Ut}});var m7e=Se((I1r,y7e)=>{"use strict";var yx=Zr(),QUt=Dp().hasColorscale,eVt=ed(),tVt=Ec().defaults,rVt=Jd(),iVt=hu(),v7e=bK(),nVt=AK(),SK=Tk().maxDimensionCount,aVt=P9();function oVt(e,t,r,n,i){var a=i("line.color",r);if(QUt(e,"line")&&yx.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),eVt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function sVt(e,t,r,n){function i(l,f){return yx.coerce(e,t,v7e.dimensions,l,f)}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},iVt.setConvert(t._ax,n.layout),i("multiselect");var u=i("constraintrange");u&&(t.constraintrange=nVt.cleanRanges(u,t))}}y7e.exports=function(t,r,n,i){function a(f,c){return yx.coerce(t,r,v7e,f,c)}var o=t.dimensions;Array.isArray(o)&&o.length>SK&&(yx.log("parcoords traces support up to "+SK+" dimensions at the moment"),o.splice(SK));var s=rVt(t,r,{name:"dimensions",layout:i,handleItemDefaults:sVt}),u=oVt(t,r,n,i,a);tVt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),aVt(r,s,"values",u);var l=yx.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});yx.coerceFont(a,"labelfont",l),yx.coerceFont(a,"tickfont",l,{autoShadowDflt:!0}),yx.coerceFont(a,"rangefont",l),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var _7e=Se((D1r,g7e)=>{"use strict";var lVt=Zr().isArrayOrTypedArray,MK=fc(),uVt=Km().wrap;g7e.exports=function(t,r){var n,i;return MK.hasColorscale(r,"line")&&lVt(r.line.color)?(n=r.line.color,i=MK.extractOpts(r.line).colorscale,MK.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=fVt(r._length),i=[[0,r.line.color],[1,r.line.color]]),uVt({lineColor:n,cscale:i})};function fVt(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=.5;return t}});var EK=Se(H9=>{"use strict";var cVt=Zr().isTypedArray;H9.convertTypedArray=function(e){return cVt(e)?Array.prototype.slice.call(e):e};H9.isOrdinal=function(e){return!!e.tickvals};H9.isVisible=function(e){return e.visible||!("visible"in e)}});var C7e=Se((F1r,k7e)=>{"use strict";var hVt=["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(`
`),dVt=["precision highp float;","","varying vec4 fragColor;","","void main() {","    gl_FragColor = fragColor;","}"].join(`
`),Ak=Tk().maxDimensionCount,S7e=Zr(),x7e=1e-6,G9=2048,pVt=new Uint8Array(4),b7e=new Uint8Array(4),w7e={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function vVt(e){e.read({x:0,y:0,width:1,height:1,data:pVt})}function M7e(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 yVt(e,t,r,n,i,a){var o=a.key;function s(u){var l=Math.min(n,i-u*n);u===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],M7e(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*l,a.offset=2*u*n,t(a),u*n+l<i&&(r.currentRafs[o]=window.requestAnimationFrame(function(){s(u+1)})),r.drawCompleted=!1)}r.drawCompleted||(vVt(e),r.drawCompleted=!0),s(0)}function mVt(e){return Math.max(x7e,Math.min(1-x7e,e))}function gVt(e,t){for(var r=new Array(256),n=0;n<256;n++)r[n]=e(n/255).concat(t);return r}function kK(e,t){return(e>>>8*t)%256/255}function _Vt(e,t,r){for(var n=new Array(e*(Ak+4)),i=0,a=0;a<e;a++){for(var o=0;o<Ak;o++)n[i++]=o<t.length?t[o].paddedUnitValues[a]:.5;n[i++]=kK(a,2),n[i++]=kK(a,1),n[i++]=kK(a,0),n[i++]=mVt(r[a])}return n}function xVt(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 u=e*4+s,l=r[a*64+u];u===63&&o===0&&(l*=-1),n[i++]=l}return n}function T7e(e){var t="0"+e;return t.substr(t.length-2)}function E7e(e){return e<Ak?"p"+T7e(e+1)+"_"+T7e(e+4):"colors"}function bVt(e,t,r){for(var n=0;n<=Ak;n+=4)e[E7e(n)](xVt(n/4,t,r))}function wVt(e){for(var t={},r=0;r<=Ak;r+=4)t[E7e(r)]=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return t}function TVt(e,t,r,n,i,a,o,s,u,l,f,c,h,d){for(var p=[[],[]],x=0;x<64;x++)p[0][x]=x===i?1:0,p[1][x]=x===a?1:0;o*=d,s*=d,u*=d,l*=d;var b=e.lines.canvasOverdrag*d,y=e.domain,k=e.canvasWidth*d,E=e.canvasHeight*d,A=e.pad.l*d,L=e.pad.b*d,_=e.layoutHeight*d,C=e.layoutWidth*d,M=e.deselectedLines.color,v=e.deselectedLines.opacity,z=S7e.extendFlat({key:f,resolution:[k,E],viewBoxPos:[o+b,s],viewBoxSize:[u,l],i0:i,i1:a,dim0A:p[0].slice(0,16),dim0B:p[0].slice(16,32),dim0C:p[0].slice(32,48),dim0D:p[0].slice(48,64),dim1A:p[1].slice(0,16),dim1B:p[1].slice(16,32),dim1C:p[1].slice(32,48),dim1D:p[1].slice(48,64),drwLayer:c,contextColor:[M[0]/255,M[1]/255,M[2]/255,v!=="auto"?M[3]*v:Math.max(1/255,Math.pow(1/e.lines.color.length,1/3))],scissorX:(n===t?0:o+b)+(A-b)+C*y.x[0],scissorWidth:(n===r?k-o+b:u+.5)+(n===t?o+b:0),scissorY:s+L+_*y.y[0],scissorHeight:l,viewportX:A-b+C*y.x[0],viewportY:L+_*y.y[0],viewportWidth:k,viewportHeight:E},h);return z}function A7e(e){var t=G9-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)]}k7e.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)),u={currentRafs:{},drawCompleted:!0,clearOnly:!1},l,f,c,h,d=wVt(i),p,x=i.texture(w7e),b=[];k(t);var y=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:hVt,frag:dVt,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:x,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){l=M.model,f=M.viewModel,c=f.dimensions.slice(),h=c[0]?c[0].values.length:0;var v=l.lines,z=n?v.color.map(function(F,q){return q/v.color.length}):v.color,T=_Vt(h,c,z);bVt(d,h,T),!r&&!n&&(x=i.texture(S7e.extendFlat({data:gVt(l.unitToColor,255)},w7e)))}function E(M){var v,z,T,F=[[],[]];for(T=0;T<64;T++){var q=!M&&T<c.length?c[T].brush.filter.getBounds():[-1/0,1/0];F[0][T]=q[0],F[1][T]=q[1]}var U=G9*8,H=new Array(U);for(v=0;v<U;v++)H[v]=255;if(!M)for(v=0;v<c.length;v++){var j=v%8,G=(v-j)/8,O=Math.pow(2,j),W=c[v],re=W.brush.filter.get();if(!(re.length<2)){var ne=A7e(re[0])[1];for(z=1;z<re.length;z++){var be=A7e(re[z]);for(T=ne+1;T<be[0];T++)H[T*8+G]&=~O;ne=Math.max(ne,be[1])}}}var ze={shape:[8,G9],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:H};return p?p(ze):p=i.texture(ze),{maskTexture:p,maskHeight:G9,loA:F[0].slice(0,16),loB:F[0].slice(16,32),loC:F[0].slice(32,48),loD:F[0].slice(48,64),hiA:F[1].slice(0,16),hiB:F[1].slice(16,32),hiC:F[1].slice(32,48),hiD:F[1].slice(48,64)}}function A(M,v,z){var T=M.length,F,q,U,H=1/0,j=-1/0;for(F=0;F<T;F++)M[F].dim0.canvasX<H&&(H=M[F].dim0.canvasX,q=F),M[F].dim1.canvasX>j&&(j=M[F].dim1.canvasX,U=F);T===0&&M7e(i,0,0,l.canvasWidth,l.canvasHeight);var G=E(r);for(F=0;F<T;F++){var O=M[F],W=O.dim0.crossfilterDimensionIndex,re=O.dim1.crossfilterDimensionIndex,ne=O.canvasX,be=O.canvasY,ze=ne+O.panelSizeX,Ce=O.plotGlPixelRatio;if(v||!b[W]||b[W][0]!==ne||b[W][1]!==ze){b[W]=[ne,ze];var he=TVt(l,q,U,F,W,re,ne,be,O.panelSizeX,O.panelSizeY,O.dim0.crossfilterDimensionIndex,r?0:n?2:1,G,Ce);u.clearOnly=z;var te=v?l.lines.blockLineCount:h;yVt(i,y,u,te,h,he)}}}function L(M,v){return i.read({x:M,y:v,width:1,height:1,data:b7e}),b7e}function _(M,v,z,T){var F=new Uint8Array(4*z*T);return i.read({x:M,y:v,width:z,height:T,data:F}),F}function C(){e.style["pointer-events"]="none",x.destroy(),p&&p.destroy();for(var M in d)d[M].destroy()}return{render:A,readPixel:L,readPixels:_,destroy:C,update:k}}});var H7e=Se((q1r,V7e)=>{"use strict";var Ud=Nl(),l1=Zr(),CK=l1.isArrayOrTypedArray,R7e=l1.numberFormat,F7e=hZ(),q7e=hu(),AVt=l1.strRotate,Jm=l1.strTranslate,SVt=Bf(),W9=yu(),L7e=fc(),PK=Km(),ty=PK.keyFun,$m=PK.repeat,B7e=PK.unwrap,gS=EK(),Cf=Tk(),O7e=AK(),MVt=C7e();function z7e(e,t,r){return l1.aggNums(e,null,t,r)}function N7e(e,t){return IK(z7e(Math.min,e,t),z7e(Math.max,e,t))}function j9(e){var t=e.range;return t?IK(t[0],t[1]):N7e(e.values,e._length)}function IK(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 EVt(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function kVt(e,t,r,n,i){var a=j9(r);return n?Ud.scale.ordinal().domain(n.map(EVt(R7e(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):Ud.scale.linear().domain(a).range([e-t,t])}function CVt(e,t){return Ud.scale.linear().range([t,e-t])}function LVt(e,t){return Ud.scale.linear().domain(j9(e)).range([t,1-t])}function zVt(e){if(e.tickvals){var t=j9(e);return Ud.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function PVt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=F7e(a[1]);return Ud.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),n=function(a){return function(o){return o[a]}},i="rgb".split("").map(function(a){return Ud.scale.linear().clamp(!0).domain(t).range(r.map(n(a)))});return function(a){return i.map(function(o){return o(a)})}}function zK(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function IVt(e,t,r){var n=B7e(t),i=n.trace,a=gS.convertTypedArray(n.lineColor),o=i.line,s={color:F7e(i.unselected.line.color),opacity:i.unselected.line.opacity},u=L7e.extractOpts(o),l=u.reversescale?L7e.flipScale(n.cscale):n.cscale,f=i.domain,c=i.dimensions,h=e.width,d=i.labelangle,p=i.labelside,x=i.labelfont,b=i.tickfont,y=i.rangefont,k=l1.extendDeepNoArrays({},o,{color:a.map(Ud.scale.linear().domain(j9({values:a,range:[u.min,u.max],_length:i._length}))),blockLineCount:Cf.blockLineCount,canvasOverdrag:Cf.overdrag*Cf.canvasPixelRatio}),E=Math.floor(h*(f.x[1]-f.x[0])),A=Math.floor(e.height*(f.y[1]-f.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},_=E,C=A;return{key:r,colCount:c.filter(gS.isVisible).length,dimensions:c,tickDistance:Cf.tickDistance,unitToColor:PVt(l),lines:k,deselectedLines:s,labelAngle:d,labelSide:p,labelFont:x,tickFont:b,rangeFont:y,layoutWidth:h,layoutHeight:e.height,domain:f,translateX:f.x[0]*h,translateY:e.height-f.y[1]*e.height,pad:L,canvasWidth:_*Cf.canvasPixelRatio+2*k.canvasOverdrag,canvasHeight:C*Cf.canvasPixelRatio,width:_,height:C,canvasPixelRatio:Cf.canvasPixelRatio}}function DVt(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)},u=Cf.verticalPadding/i,l=CVt(i,Cf.verticalPadding),f={key:r.key,xScale:s,model:r,inBrushDrag:!1},c={};return f.dimensions=a.filter(gS.isVisible).map(function(h,d){var p=LVt(h,u),x=c[h.label];c[h.label]=(x||0)+1;var b=h.label+(x?"__"+x:""),y=h.constraintrange,k=y&&y.length;k&&!CK(y[0])&&(y=[y]);var E=k?y.map(function(q){return q.map(p)}):[[-1/0,1/0]],A=function(){var q=f;q.focusLayer&&q.focusLayer.render(q.panels,!0);var U=zK(q);!e.contextShown()&&U?(q.contextLayer&&q.contextLayer.render(q.panels,!0),e.contextShown(!0)):e.contextShown()&&!U&&(q.contextLayer&&q.contextLayer.render(q.panels,!0,!0),e.contextShown(!1))},L=h.values;L.length>h._length&&(L=L.slice(0,h._length));var _=h.tickvals,C;function M(q,U){return{val:q,text:C[U]}}function v(q,U){return q.val-U.val}if(CK(_)&&_.length){l1.isTypedArray(_)&&(_=Array.from(_)),C=h.ticktext,!CK(C)||!C.length?C=_.map(R7e(h.tickformat)):C.length>_.length?C=C.slice(0,_.length):_.length>C.length&&(_=_.slice(0,C.length));for(var z=1;z<_.length;z++)if(_[z]<_[z-1]){for(var T=_.map(M).sort(v),F=0;F<_.length;F++)_[F]=T[F].val,C[F]=T[F].text;break}}else _=void 0;return L=gS.convertTypedArray(L),{key:b,label:h.label,tickFormat:h.tickformat,tickvals:_,ticktext:C,ordinal:gS.isOrdinal(h),multiselect:h.multiselect,xIndex:d,crossfilterDimensionIndex:d,visibleIndex:h._index,height:i,values:L,paddedUnitValues:L.map(p),unitTickvals:_&&_.map(p),xScale:s,x:s(d),canvasX:s(d)*o,unitToPaddedPx:l,domainScale:kVt(i,Cf.verticalPadding,h,_,C),ordinalScale:zVt(h),parent:f,model:r,brush:O7e.makeBrush(e,k,E,function(){e.linePickActive(!1)},A,function(q){if(f.focusLayer.render(f.panels,!0),f.pickLayer&&f.pickLayer.render(f.panels,!0),e.linePickActive(!0),t&&t.filterChanged){var U=p.invert,H=q.map(function(j){return j.map(U).sort(l1.sorterAsc)}).sort(function(j,G){return j[0]-G[0]});t.filterChanged(f.key,h._index,H)}})}}),f}function P7e(e){e.classed(Cf.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function RVt(){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 I7e(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 LK(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],u=i[a+1];o.dim0=s,o.dim1=u,o.canvasX=s.canvasX,o.panelSizeX=u.canvasX-s.canvasX,o.panelSizeY=t.model.canvasHeight,o.y=0,o.canvasY=0,o.plotGlPixelRatio=r}}function FVt(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=IK(s.range[0],s.range[1]):s.range=N7e(o,n._length),s.dtick||(s.dtick=.01*(Math.abs(s.range[1]-s.range[0])||1)),s.tickformat=i[a].tickformat,q7e.calcTicks(s),s.cleanRange())}}function U7e(e,t){return q7e.tickText(e._ax,t,!1).text}function D7e(e,t){if(e.ordinal)return"";var r=e.domainScale.domain(),n=r[t?r.length-1:0];return U7e(e.model.dimensions[e.visibleIndex],n)}V7e.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=o._toppaper,u=o._glcontainer,l=t._context.plotGlPixelRatio,f=t._fullLayout.paper_bgcolor;FVt(r);var c=RVt(),h=r.filter(function(F){return B7e(F).trace.visible}).map(IVt.bind(0,n)).map(DVt.bind(0,c,i));u.each(function(F,q){return l1.extendFlat(F,h[q])});var d=u.selectAll(".gl-canvas").each(function(F){F.viewModel=h[0],F.viewModel.plotGlPixelRatio=l,F.viewModel.paperColor=f,F.model=F.viewModel?F.viewModel.model:null}),p=null,x=d.filter(function(F){return F.pick});x.style("pointer-events",a?"none":"auto").on("mousemove",function(F){if(c.linePickActive()&&F.lineLayer&&i&&i.hover){var q=Ud.event,U=this.width,H=this.height,j=Ud.mouse(this),G=j[0],O=j[1];if(G<0||O<0||G>=U||O>=H)return;var W=F.lineLayer.readPixel(G,H-1-O),re=W[3]!==0,ne=re?W[2]+256*(W[1]+256*W[0]):null,be={x:G,y:O,clientX:q.clientX,clientY:q.clientY,dataIndex:F.model.key,curveNumber:ne};ne!==p&&(re?i.hover(be):i.unhover&&i.unhover(be),p=ne)}}),d.style("opacity",function(F){return F.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var b=s.selectAll("."+Cf.cn.parcoords).data(h,ty);b.exit().remove(),b.enter().append("g").classed(Cf.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),b.attr("transform",function(F){return Jm(F.model.translateX,F.model.translateY)});var y=b.selectAll("."+Cf.cn.parcoordsControlView).data($m,ty);y.enter().append("g").classed(Cf.cn.parcoordsControlView,!0),y.attr("transform",function(F){return Jm(F.model.pad.l,F.model.pad.t)});var k=y.selectAll("."+Cf.cn.yAxis).data(function(F){return F.dimensions},ty);k.enter().append("g").classed(Cf.cn.yAxis,!0),y.each(function(F){LK(k,F,l)}),d.each(function(F){if(F.viewModel){!F.lineLayer||i?F.lineLayer=MVt(this,F):F.lineLayer.update(F),(F.key||F.key===0)&&(F.viewModel[F.key]=F.lineLayer);var q=!F.context||i;F.lineLayer.render(F.viewModel.panels,q)}}),k.attr("transform",function(F){return Jm(F.xScale(F.xIndex),0)}),k.call(Ud.behavior.drag().origin(function(F){return F}).on("drag",function(F){var q=F.parent;c.linePickActive(!1),F.x=Math.max(-Cf.overdrag,Math.min(F.model.width+Cf.overdrag,Ud.event.x)),F.canvasX=F.x*F.model.canvasPixelRatio,k.sort(function(U,H){return U.x-H.x}).each(function(U,H){U.xIndex=H,U.x=F===U?U.x:U.xScale(U.xIndex),U.canvasX=U.x*U.model.canvasPixelRatio}),LK(k,q,l),k.filter(function(U){return Math.abs(F.xIndex-U.xIndex)!==0}).attr("transform",function(U){return Jm(U.xScale(U.xIndex),0)}),Ud.select(this).attr("transform",Jm(F.x,0)),k.each(function(U,H,j){j===F.parent.key&&(q.dimensions[H]=U)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!zK(q)),q.focusLayer.render&&q.focusLayer.render(q.panels)}).on("dragend",function(F){var q=F.parent;F.x=F.xScale(F.xIndex),F.canvasX=F.x*F.model.canvasPixelRatio,LK(k,q,l),Ud.select(this).attr("transform",function(U){return Jm(U.x,0)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!zK(q)),q.focusLayer&&q.focusLayer.render(q.panels),q.pickLayer&&q.pickLayer.render(q.panels,!0),c.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(q.key,q.dimensions.map(function(U){return U.crossfilterDimensionIndex}))})),k.exit().remove();var E=k.selectAll("."+Cf.cn.axisOverlays).data($m,ty);E.enter().append("g").classed(Cf.cn.axisOverlays,!0),E.selectAll("."+Cf.cn.axis).remove();var A=E.selectAll("."+Cf.cn.axis).data($m,ty);A.enter().append("g").classed(Cf.cn.axis,!0),A.each(function(F){var q=F.model.height/F.model.tickDistance,U=F.domainScale,H=U.domain();Ud.select(this).call(Ud.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(q,F.tickFormat).tickValues(F.ordinal?H:null).tickFormat(function(j){return gS.isOrdinal(F)?j:U7e(F.model.dimensions[F.visibleIndex],j)}).scale(U)),W9.font(A.selectAll("text"),F.model.tickFont)}),A.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),A.selectAll("text").style("cursor","default");var L=E.selectAll("."+Cf.cn.axisHeading).data($m,ty);L.enter().append("g").classed(Cf.cn.axisHeading,!0);var _=L.selectAll("."+Cf.cn.axisTitle).data($m,ty);_.enter().append("text").classed(Cf.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),_.text(function(F){return F.label}).each(function(F){var q=Ud.select(this);W9.font(q,F.model.labelFont),SVt.convertToTspans(q,t)}).attr("transform",function(F){var q=I7e(F.model.labelAngle,F.model.labelSide),U=Cf.axisTitleOffset;return(q.dir>0?"":Jm(0,2*U+F.model.height))+AVt(q.degrees)+Jm(-U*q.dx,-U*q.dy)}).attr("text-anchor",function(F){var q=I7e(F.model.labelAngle,F.model.labelSide),U=Math.abs(q.dx),H=Math.abs(q.dy);return 2*U>H?q.dir*q.dx<0?"start":"end":"middle"});var C=E.selectAll("."+Cf.cn.axisExtent).data($m,ty);C.enter().append("g").classed(Cf.cn.axisExtent,!0);var M=C.selectAll("."+Cf.cn.axisExtentTop).data($m,ty);M.enter().append("g").classed(Cf.cn.axisExtentTop,!0),M.attr("transform",Jm(0,-Cf.axisExtentOffset));var v=M.selectAll("."+Cf.cn.axisExtentTopText).data($m,ty);v.enter().append("text").classed(Cf.cn.axisExtentTopText,!0).call(P7e),v.text(function(F){return D7e(F,!0)}).each(function(F){W9.font(Ud.select(this),F.model.rangeFont)});var z=C.selectAll("."+Cf.cn.axisExtentBottom).data($m,ty);z.enter().append("g").classed(Cf.cn.axisExtentBottom,!0),z.attr("transform",function(F){return Jm(0,F.model.height+Cf.axisExtentOffset)});var T=z.selectAll("."+Cf.cn.axisExtentBottomText).data($m,ty);T.enter().append("text").classed(Cf.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(P7e),T.text(function(F){return D7e(F,!1)}).each(function(F){W9.font(Ud.select(this),F.model.rangeFont)}),O7e.ensureAxisBrush(E,f,t)}});var RK=Se((DK,Z7e)=>{"use strict";var qVt=H7e(),BVt=x9(),G7e=EK().isVisible,j7e={};function W7e(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function OVt(e,t){return function(n,i){return W7e(e,t,n)-W7e(e,t,i)}}var DK=Z7e.exports=function(t,r){var n=t._fullLayout,i=BVt(t,[],j7e);if(i){var a={},o={},s={},u={},l=n._size;r.forEach(function(p,x){var b=p[0].trace;s[x]=b.index;var y=u[x]=b.index;a[x]=t.data[y].dimensions,o[x]=t.data[y].dimensions.slice()});var f=function(p,x,b){var y=o[p][x],k=b.map(function(M){return M.slice()}),E="dimensions["+x+"].constraintrange",A=n._tracePreGUI[t._fullData[s[p]]._fullInput.uid];if(A[E]===void 0){var L=y.constraintrange;A[E]=L||null}var _=t._fullData[s[p]].dimensions[x];k.length?(k.length===1&&(k=k[0]),y.constraintrange=k,_.constraintrange=k.slice(),k=[k]):(delete y.constraintrange,delete _.constraintrange,k=null);var C={};C[E]=k,t.emit("plotly_restyle",[C,[u[p]]])},c=function(p){t.emit("plotly_hover",p)},h=function(p){t.emit("plotly_unhover",p)},d=function(p,x){var b=OVt(x,o[p].filter(G7e));a[p].sort(b),o[p].filter(function(y){return!G7e(y)}).sort(function(y){return o[p].indexOf(y)}).forEach(function(y){a[p].splice(a[p].indexOf(y),1),a[p].splice(o[p].indexOf(y),0,y)}),t.emit("plotly_restyle",[{dimensions:[a[p]]},[u[p]]])};qVt(t,r,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:f,hover:c,unhover:h,axesMoved:d})}};DK.reglPrecompiled=j7e});var Y7e=Se(Sk=>{"use strict";var X7e=Nl(),NVt=Dd().getModuleCalcData,UVt=RK(),VVt=Zv();Sk.name="parcoords";Sk.plot=function(e){var t=NVt(e.calcdata,"parcoords")[0];t.length&&UVt(e,t)};Sk.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())};Sk.toSVG=function(e){var t=e._fullLayout._glimages,r=X7e.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:VVt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){X7e.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var J7e=Se((O1r,K7e)=>{"use strict";K7e.exports={attributes:bK(),supplyDefaults:m7e(),calc:_7e(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:Y7e(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var Q7e=Se((N1r,$7e)=>{$7e.exports=function(t,r){"use strict";var n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt;return n=t.gl,i=t.context,a=t.strings,o=t.next,s=t.current,u=t.draw,l=t.elements,f=t.buffer,c=t.shader,h=t.attributes,d=t.vao,p=t.uniforms,x=t.framebuffer,b=t.extensions,y=t.timer,k=t.isBufferArgs,E=o.blend_color,A=s.blend_color,L=o.blend_equation,_=s.blend_equation,C=o.blend_func,M=s.blend_func,v=o.depth_range,z=s.depth_range,T=o.colorMask,F=s.colorMask,q=o.polygonOffset_offset,U=s.polygonOffset_offset,H=o.sample_coverage,j=s.sample_coverage,G=o.stencil_func,O=s.stencil_func,W=o.stencil_opFront,re=s.stencil_opFront,ne=o.stencil_opBack,be=s.stencil_opBack,ze=o.scissor_box,Ce=s.scissor_box,he=o.viewport,te=s.viewport,ke={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ee={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},Me={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},Oe={add:32774,subtract:32778,"reverse subtract":32779},Re={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},me={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Be={cw:2304,ccw:2305},fe=o.blend_color,Ze=s.blend_color,et=o.blend_equation,gt=s.blend_equation,Pt=o.blend_func,Qe=s.blend_func,Xe=o.depth_range,Tt=s.depth_range,xt=o.colorMask,_t=s.colorMask,Ct=o.polygonOffset_offset,jt=s.polygonOffset_offset,At=o.sample_coverage,Te=s.sample_coverage,nt=o.stencil_func,ut=s.stencil_func,ct=o.stencil_opFront,rt=s.stencil_opFront,je=o.stencil_opBack,tt=s.stencil_opBack,Je=o.scissor_box,Mt=s.scissor_box,Vt=o.viewport,Kt=s.viewport,{poll:function(){var ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei;s.dirty=!1,fr=o.dither,Ot=o.blend_enable,De=o.depth_enable,_e=o.cull_enable,Fe=o.polygonOffset_enable,Pe=o.sample_alpha,Ie=o.sample_enable,lt=o.stencil_enable,ye=o.scissor_enable,ue=o.depth_func,de=s.depth_func,ht=o.depth_mask,Et=s.depth_mask,St=o.cull_face,Zt=s.cull_face,qr=o.frontFace,Lr=s.frontFace,vr=o.lineWidth,Er=s.lineWidth,si=o.stencil_mask,Ei=s.stencil_mask,ir=x.next,ir!==x.cur&&(ir?n.bindFramebuffer(36160,ir.framebuffer):n.bindFramebuffer(36160,null),x.cur=ir),fr!==s.dither&&(fr?n.enable(3024):n.disable(3024),s.dither=fr),Ot!==s.blend_enable&&(Ot?n.enable(3042):n.disable(3042),s.blend_enable=Ot),De!==s.depth_enable&&(De?n.enable(2929):n.disable(2929),s.depth_enable=De),_e!==s.cull_enable&&(_e?n.enable(2884):n.disable(2884),s.cull_enable=_e),Fe!==s.polygonOffset_enable&&(Fe?n.enable(32823):n.disable(32823),s.polygonOffset_enable=Fe),Pe!==s.sample_alpha&&(Pe?n.enable(32926):n.disable(32926),s.sample_alpha=Pe),Ie!==s.sample_enable&&(Ie?n.enable(32928):n.disable(32928),s.sample_enable=Ie),lt!==s.stencil_enable&&(lt?n.enable(2960):n.disable(2960),s.stencil_enable=lt),ye!==s.scissor_enable&&(ye?n.enable(3089):n.disable(3089),s.scissor_enable=ye),(fe[0]!==Ze[0]||fe[1]!==Ze[1]||fe[2]!==Ze[2]||fe[3]!==Ze[3])&&(n.blendColor(fe[0],fe[1],fe[2],fe[3]),Ze[0]=fe[0],Ze[1]=fe[1],Ze[2]=fe[2],Ze[3]=fe[3]),(et[0]!==gt[0]||et[1]!==gt[1])&&(n.blendEquationSeparate(et[0],et[1]),gt[0]=et[0],gt[1]=et[1]),(Pt[0]!==Qe[0]||Pt[1]!==Qe[1]||Pt[2]!==Qe[2]||Pt[3]!==Qe[3])&&(n.blendFuncSeparate(Pt[0],Pt[1],Pt[2],Pt[3]),Qe[0]=Pt[0],Qe[1]=Pt[1],Qe[2]=Pt[2],Qe[3]=Pt[3]),ue!==de&&(n.depthFunc(ue),s.depth_func=ue),(Xe[0]!==Tt[0]||Xe[1]!==Tt[1])&&(n.depthRange(Xe[0],Xe[1]),Tt[0]=Xe[0],Tt[1]=Xe[1]),ht!==Et&&(n.depthMask(ht),s.depth_mask=ht),(xt[0]!==_t[0]||xt[1]!==_t[1]||xt[2]!==_t[2]||xt[3]!==_t[3])&&(n.colorMask(xt[0],xt[1],xt[2],xt[3]),_t[0]=xt[0],_t[1]=xt[1],_t[2]=xt[2],_t[3]=xt[3]),St!==Zt&&(n.cullFace(St),s.cull_face=St),qr!==Lr&&(n.frontFace(qr),s.frontFace=qr),vr!==Er&&(n.lineWidth(vr),s.lineWidth=vr),(Ct[0]!==jt[0]||Ct[1]!==jt[1])&&(n.polygonOffset(Ct[0],Ct[1]),jt[0]=Ct[0],jt[1]=Ct[1]),(At[0]!==Te[0]||At[1]!==Te[1])&&(n.sampleCoverage(At[0],At[1]),Te[0]=At[0],Te[1]=At[1]),si!==Ei&&(n.stencilMask(si),s.stencil_mask=si),(nt[0]!==ut[0]||nt[1]!==ut[1]||nt[2]!==ut[2])&&(n.stencilFunc(nt[0],nt[1],nt[2]),ut[0]=nt[0],ut[1]=nt[1],ut[2]=nt[2]),(ct[0]!==rt[0]||ct[1]!==rt[1]||ct[2]!==rt[2]||ct[3]!==rt[3])&&(n.stencilOpSeparate(ct[0],ct[1],ct[2],ct[3]),rt[0]=ct[0],rt[1]=ct[1],rt[2]=ct[2],rt[3]=ct[3]),(je[0]!==tt[0]||je[1]!==tt[1]||je[2]!==tt[2]||je[3]!==tt[3])&&(n.stencilOpSeparate(je[0],je[1],je[2],je[3]),tt[0]=je[0],tt[1]=je[1],tt[2]=je[2],tt[3]=je[3]),(Je[0]!==Mt[0]||Je[1]!==Mt[1]||Je[2]!==Mt[2]||Je[3]!==Mt[3])&&(n.scissor(Je[0],Je[1],Je[2],Je[3]),Mt[0]=Je[0],Mt[1]=Je[1],Mt[2]=Je[2],Mt[3]=Je[3]),(Vt[0]!==Kt[0]||Vt[1]!==Kt[1]||Vt[2]!==Kt[2]||Vt[3]!==Kt[3])&&(n.viewport(Vt[0],Vt[1],Vt[2],Vt[3]),Kt[0]=Vt[0],Kt[1]=Vt[1],Kt[2]=Vt[2],Kt[3]=Vt[3])},refresh:function(){var ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi;s.dirty=!1,De=o.dither,_e=o.blend_enable,Fe=o.depth_enable,Pe=o.cull_enable,Ie=o.polygonOffset_enable,lt=o.sample_alpha,ye=o.sample_enable,ue=o.stencil_enable,de=o.scissor_enable,ht=o.depth_func,Et=s.depth_func,St=o.depth_mask,Zt=s.depth_mask,qr=o.cull_face,Lr=s.cull_face,vr=o.frontFace,Er=s.frontFace,si=o.lineWidth,Ei=s.lineWidth,Si=o.stencil_mask,xi=s.stencil_mask,ir=x.next,ir?n.bindFramebuffer(36160,ir.framebuffer):n.bindFramebuffer(36160,null),x.cur=ir,fr=h,Ot=0;for(var Hi=0;Hi<r;++Hi)Ot=fr[Hi],Ot.buffer?(n.enableVertexAttribArray(Hi),n.bindBuffer(34962,Ot.buffer.buffer),n.vertexAttribPointer(Hi,Ot.size,Ot.type,Ot.normalized,Ot.stride,Ot.offset)):(n.disableVertexAttribArray(Hi),n.vertexAttrib4f(Hi,Ot.x,Ot.y,Ot.z,Ot.w),Ot.buffer=null);d.currentVAO=null,d.setVAO(d.targetVAO),De?n.enable(3024):n.disable(3024),s.dither=De,_e?n.enable(3042):n.disable(3042),s.blend_enable=_e,Fe?n.enable(2929):n.disable(2929),s.depth_enable=Fe,Pe?n.enable(2884):n.disable(2884),s.cull_enable=Pe,Ie?n.enable(32823):n.disable(32823),s.polygonOffset_enable=Ie,lt?n.enable(32926):n.disable(32926),s.sample_alpha=lt,ye?n.enable(32928):n.disable(32928),s.sample_enable=ye,ue?n.enable(2960):n.disable(2960),s.stencil_enable=ue,de?n.enable(3089):n.disable(3089),s.scissor_enable=de,n.blendColor(fe[0],fe[1],fe[2],fe[3]),Ze[0]=fe[0],Ze[1]=fe[1],Ze[2]=fe[2],Ze[3]=fe[3],n.blendEquationSeparate(et[0],et[1]),gt[0]=et[0],gt[1]=et[1],n.blendFuncSeparate(Pt[0],Pt[1],Pt[2],Pt[3]),Qe[0]=Pt[0],Qe[1]=Pt[1],Qe[2]=Pt[2],Qe[3]=Pt[3],n.depthFunc(ht),s.depth_func=ht,n.depthRange(Xe[0],Xe[1]),Tt[0]=Xe[0],Tt[1]=Xe[1],n.depthMask(St),s.depth_mask=St,n.colorMask(xt[0],xt[1],xt[2],xt[3]),_t[0]=xt[0],_t[1]=xt[1],_t[2]=xt[2],_t[3]=xt[3],n.cullFace(qr),s.cull_face=qr,n.frontFace(vr),s.frontFace=vr,n.lineWidth(si),s.lineWidth=si,n.polygonOffset(Ct[0],Ct[1]),jt[0]=Ct[0],jt[1]=Ct[1],n.sampleCoverage(At[0],At[1]),Te[0]=At[0],Te[1]=At[1],n.stencilMask(Si),s.stencil_mask=Si,n.stencilFunc(nt[0],nt[1],nt[2]),ut[0]=nt[0],ut[1]=nt[1],ut[2]=nt[2],n.stencilOpSeparate(ct[0],ct[1],ct[2],ct[3]),rt[0]=ct[0],rt[1]=ct[1],rt[2]=ct[2],rt[3]=ct[3],n.stencilOpSeparate(je[0],je[1],je[2],je[3]),tt[0]=je[0],tt[1]=je[1],tt[2]=je[2],tt[3]=je[3],n.scissor(Je[0],Je[1],Je[2],Je[3]),Mt[0]=Je[0],Mt[1]=Je[1],Mt[2]=Je[2],Mt[3]=Je[3],n.viewport(Vt[0],Vt[1],Vt[2],Vt[3]),Kt[0]=Vt[0],Kt[1]=Vt[1],Kt[2]=Vt[2],Kt[3]=Vt[3]}}}});var tUe=Se((U1r,eUe)=>{eUe.exports=function(t,r,n,i,a,o,s,u){"use strict";var l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt;return l=t.gl,f=t.context,c=t.strings,h=t.next,d=t.current,p=t.draw,x=t.elements,b=t.buffer,y=t.shader,k=t.attributes,E=t.vao,A=t.uniforms,L=t.framebuffer,_=t.extensions,C=t.timer,M=t.isBufferArgs,v=h.blend_color,z=d.blend_color,T=h.blend_equation,F=d.blend_equation,q=h.blend_func,U=d.blend_func,H=h.depth_range,j=d.depth_range,G=h.colorMask,O=d.colorMask,W=h.polygonOffset_offset,re=d.polygonOffset_offset,ne=h.sample_coverage,be=d.sample_coverage,ze=h.stencil_func,Ce=d.stencil_func,he=h.stencil_opFront,te=d.stencil_opFront,ke=h.stencil_opBack,Ee=d.stencil_opBack,Me=h.scissor_box,Oe=d.scissor_box,Re=h.viewport,me=d.viewport,Be={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},fe={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},Ze={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},et={add:32774,subtract:32778,"reverse subtract":32779},gt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Pt={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Qe={cw:2304,ccw:2305},Xe={},Tt={},{draw:function(xt){var _t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot;if(_t=xt.framebuffer,Ct=L.getFramebuffer(_t),jt=L.next,L.next=Ct,At=f.framebufferWidth,f.framebufferWidth=Ct?Ct.width:f.drawingBufferWidth,Te=f.framebufferHeight,f.framebufferHeight=Ct?Ct.height:f.drawingBufferHeight,Ct!==L.cur&&(Ct?l.bindFramebuffer(36160,Ct.framebuffer):l.bindFramebuffer(36160,null),L.cur=Ct),d.dirty){var De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi;De=h.dither,De!==d.dither&&(De?l.enable(3024):l.disable(3024),d.dither=De),_e=h.blend_enable,_e!==d.blend_enable&&(_e?l.enable(3042):l.disable(3042),d.blend_enable=_e),Fe=v[0],Pe=v[1],Ie=v[2],lt=v[3],(Fe!==z[0]||Pe!==z[1]||Ie!==z[2]||lt!==z[3])&&(l.blendColor(Fe,Pe,Ie,lt),z[0]=Fe,z[1]=Pe,z[2]=Ie,z[3]=lt),ye=T[0],ue=T[1],(ye!==F[0]||ue!==F[1])&&(l.blendEquationSeparate(ye,ue),F[0]=ye,F[1]=ue),de=q[0],ht=q[1],Et=q[2],St=q[3],(de!==U[0]||ht!==U[1]||Et!==U[2]||St!==U[3])&&(l.blendFuncSeparate(de,ht,Et,St),U[0]=de,U[1]=ht,U[2]=Et,U[3]=St),Zt=h.depth_enable,Zt!==d.depth_enable&&(Zt?l.enable(2929):l.disable(2929),d.depth_enable=Zt),qr=h.depth_func,qr!==d.depth_func&&(l.depthFunc(qr),d.depth_func=qr),Lr=H[0],vr=H[1],(Lr!==j[0]||vr!==j[1])&&(l.depthRange(Lr,vr),j[0]=Lr,j[1]=vr),Er=h.depth_mask,Er!==d.depth_mask&&(l.depthMask(Er),d.depth_mask=Er),si=G[0],Ei=G[1],Si=G[2],xi=G[3],(si!==O[0]||Ei!==O[1]||Si!==O[2]||xi!==O[3])&&(l.colorMask(si,Ei,Si,xi),O[0]=si,O[1]=Ei,O[2]=Si,O[3]=xi),Hi=h.cull_enable,Hi!==d.cull_enable&&(Hi?l.enable(2884):l.disable(2884),d.cull_enable=Hi),Jr=h.cull_face,Jr!==d.cull_face&&(l.cullFace(Jr),d.cull_face=Jr),ci=h.frontFace,ci!==d.frontFace&&(l.frontFace(ci),d.frontFace=ci),Di=h.lineWidth,Di!==d.lineWidth&&(l.lineWidth(Di),d.lineWidth=Di),Lt=h.polygonOffset_enable,Lt!==d.polygonOffset_enable&&(Lt?l.enable(32823):l.disable(32823),d.polygonOffset_enable=Lt),vt=W[0],Dt=W[1],(vt!==re[0]||Dt!==re[1])&&(l.polygonOffset(vt,Dt),re[0]=vt,re[1]=Dt),Bt=h.sample_alpha,Bt!==d.sample_alpha&&(Bt?l.enable(32926):l.disable(32926),d.sample_alpha=Bt),sr=h.sample_enable,sr!==d.sample_enable&&(sr?l.enable(32928):l.disable(32928),d.sample_enable=sr),br=ne[0],zr=ne[1],(br!==be[0]||zr!==be[1])&&(l.sampleCoverage(br,zr),be[0]=br,be[1]=zr),Tr=h.stencil_enable,Tr!==d.stencil_enable&&(Tr?l.enable(2960):l.disable(2960),d.stencil_enable=Tr),Rr=h.stencil_mask,Rr!==d.stencil_mask&&(l.stencilMask(Rr),d.stencil_mask=Rr),Br=ze[0],oi=ze[1],vi=ze[2],(Br!==Ce[0]||oi!==Ce[1]||vi!==Ce[2])&&(l.stencilFunc(Br,oi,vi),Ce[0]=Br,Ce[1]=oi,Ce[2]=vi),Pi=he[0],Yr=he[1],Ni=he[2],Ur=he[3],(Pi!==te[0]||Yr!==te[1]||Ni!==te[2]||Ur!==te[3])&&(l.stencilOpSeparate(Pi,Yr,Ni,Ur),te[0]=Pi,te[1]=Yr,te[2]=Ni,te[3]=Ur),ti=ke[0],ki=ke[1],ji=ke[2],Vi=ke[3],(ti!==Ee[0]||ki!==Ee[1]||ji!==Ee[2]||Vi!==Ee[3])&&(l.stencilOpSeparate(ti,ki,ji,Vi),Ee[0]=ti,Ee[1]=ki,Ee[2]=ji,Ee[3]=Vi),zi=h.scissor_enable,zi!==d.scissor_enable&&(zi?l.enable(3089):l.disable(3089),d.scissor_enable=zi)}nt=f.framebufferWidth,ut=f.framebufferHeight,ct=f.viewportWidth,f.viewportWidth=nt,rt=f.viewportHeight,f.viewportHeight=ut,l.viewport(0,0,nt,ut),me[0]=0,me[1]=0,me[2]=nt,me[3]=ut,je=f.framebufferWidth,tt=f.framebufferHeight,l.scissor(0,0,je,tt),Oe[0]=0,Oe[1]=0,Oe[2]=je,Oe[3]=tt,Je=d.profile,Je&&(Mt=performance.now(),r.count++),Vt=y.frag,Kt=y.vert,ir=y.program(Kt,Vt),l.useProgram(ir.program),E.setVAO(null),fr=ir.id,Ot=Xe[fr],Ot?Ot.call(this,xt):(Ot=Xe[fr]=n(ir),Ot.call(this,xt)),d.dirty=!0,E.setVAO(null),L.next=jt,f.framebufferWidth=At,f.framebufferHeight=Te,f.viewportWidth=ct,f.viewportHeight=rt,Je&&(r.cpuTime+=performance.now()-Mt)},scope:function(xt,_t,Ct){var jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie;jt=xt.framebuffer,At=L.getFramebuffer(jt),Te=L.next,L.next=At,nt=f.framebufferWidth,f.framebufferWidth=At?At.width:f.drawingBufferWidth,ut=f.framebufferHeight,f.framebufferHeight=At?At.height:f.drawingBufferHeight,ct=f.framebufferWidth,rt=f.framebufferHeight,je=f.viewportWidth,f.viewportWidth=ct,tt=f.viewportHeight,f.viewportHeight=rt,Je=Re[0],Re[0]=i,Mt=Re[1],Re[1]=a,Vt=Re[2],Re[2]=ct,Kt=Re[3],Re[3]=rt,ir=f.framebufferWidth,fr=f.framebufferHeight,Ot=Me[0],Me[0]=o,De=Me[1],Me[1]=s,_e=Me[2],Me[2]=ir,Fe=Me[3],Me[3]=fr,Pe=d.profile,Pe&&(Ie=performance.now(),r.count++),d.dirty=!0,_t(f,xt,Ct),L.next=Te,f.framebufferWidth=nt,f.framebufferHeight=ut,f.viewportWidth=je,f.viewportHeight=tt,Re[0]=Je,Re[1]=Mt,Re[2]=Vt,Re[3]=Kt,Me[0]=Ot,Me[1]=De,Me[2]=_e,Me[3]=Fe,Pe&&(r.cpuTime+=performance.now()-Ie),d.dirty=!0},batch:function(xt,_t){var Ct,jt,At,Te,nt,ut,ct;if(d.dirty){var rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi;rt=h.dither,rt!==d.dither&&(rt?l.enable(3024):l.disable(3024),d.dither=rt),je=h.blend_enable,je!==d.blend_enable&&(je?l.enable(3042):l.disable(3042),d.blend_enable=je),tt=v[0],Je=v[1],Mt=v[2],Vt=v[3],(tt!==z[0]||Je!==z[1]||Mt!==z[2]||Vt!==z[3])&&(l.blendColor(tt,Je,Mt,Vt),z[0]=tt,z[1]=Je,z[2]=Mt,z[3]=Vt),Kt=T[0],ir=T[1],(Kt!==F[0]||ir!==F[1])&&(l.blendEquationSeparate(Kt,ir),F[0]=Kt,F[1]=ir),fr=q[0],Ot=q[1],De=q[2],_e=q[3],(fr!==U[0]||Ot!==U[1]||De!==U[2]||_e!==U[3])&&(l.blendFuncSeparate(fr,Ot,De,_e),U[0]=fr,U[1]=Ot,U[2]=De,U[3]=_e),Fe=h.depth_enable,Fe!==d.depth_enable&&(Fe?l.enable(2929):l.disable(2929),d.depth_enable=Fe),Pe=h.depth_func,Pe!==d.depth_func&&(l.depthFunc(Pe),d.depth_func=Pe),Ie=H[0],lt=H[1],(Ie!==j[0]||lt!==j[1])&&(l.depthRange(Ie,lt),j[0]=Ie,j[1]=lt),ye=h.depth_mask,ye!==d.depth_mask&&(l.depthMask(ye),d.depth_mask=ye),ue=G[0],de=G[1],ht=G[2],Et=G[3],(ue!==O[0]||de!==O[1]||ht!==O[2]||Et!==O[3])&&(l.colorMask(ue,de,ht,Et),O[0]=ue,O[1]=de,O[2]=ht,O[3]=Et),St=h.cull_enable,St!==d.cull_enable&&(St?l.enable(2884):l.disable(2884),d.cull_enable=St),Zt=h.cull_face,Zt!==d.cull_face&&(l.cullFace(Zt),d.cull_face=Zt),qr=h.frontFace,qr!==d.frontFace&&(l.frontFace(qr),d.frontFace=qr),Lr=h.lineWidth,Lr!==d.lineWidth&&(l.lineWidth(Lr),d.lineWidth=Lr),vr=h.polygonOffset_enable,vr!==d.polygonOffset_enable&&(vr?l.enable(32823):l.disable(32823),d.polygonOffset_enable=vr),Er=W[0],si=W[1],(Er!==re[0]||si!==re[1])&&(l.polygonOffset(Er,si),re[0]=Er,re[1]=si),Ei=h.sample_alpha,Ei!==d.sample_alpha&&(Ei?l.enable(32926):l.disable(32926),d.sample_alpha=Ei),Si=h.sample_enable,Si!==d.sample_enable&&(Si?l.enable(32928):l.disable(32928),d.sample_enable=Si),xi=ne[0],Hi=ne[1],(xi!==be[0]||Hi!==be[1])&&(l.sampleCoverage(xi,Hi),be[0]=xi,be[1]=Hi),Jr=h.stencil_enable,Jr!==d.stencil_enable&&(Jr?l.enable(2960):l.disable(2960),d.stencil_enable=Jr),ci=h.stencil_mask,ci!==d.stencil_mask&&(l.stencilMask(ci),d.stencil_mask=ci),Di=ze[0],Lt=ze[1],vt=ze[2],(Di!==Ce[0]||Lt!==Ce[1]||vt!==Ce[2])&&(l.stencilFunc(Di,Lt,vt),Ce[0]=Di,Ce[1]=Lt,Ce[2]=vt),Dt=he[0],Bt=he[1],sr=he[2],br=he[3],(Dt!==te[0]||Bt!==te[1]||sr!==te[2]||br!==te[3])&&(l.stencilOpSeparate(Dt,Bt,sr,br),te[0]=Dt,te[1]=Bt,te[2]=sr,te[3]=br),zr=ke[0],Tr=ke[1],Rr=ke[2],Br=ke[3],(zr!==Ee[0]||Tr!==Ee[1]||Rr!==Ee[2]||Br!==Ee[3])&&(l.stencilOpSeparate(zr,Tr,Rr,Br),Ee[0]=zr,Ee[1]=Tr,Ee[2]=Rr,Ee[3]=Br),oi=h.scissor_enable,oi!==d.scissor_enable&&(oi?l.enable(3089):l.disable(3089),d.scissor_enable=oi)}Ct=d.profile,Ct&&(jt=performance.now(),r.count+=_t),At=y.frag,Te=y.vert,nt=y.program(Te,At),l.useProgram(nt.program),E.setVAO(null),ut=nt.id,ct=Tt[ut],ct?ct.call(this,xt,_t):(ct=Tt[ut]=u(nt),ct.call(this,xt,_t)),d.dirty=!0,E.setVAO(null),Ct&&(r.cpuTime+=performance.now()-jt)}}}});var iUe=Se((V1r,rUe)=>{rUe.exports=function(t,r,n,i){"use strict";var a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt;return a=t.gl,o=t.context,s=t.strings,u=t.next,l=t.current,f=t.draw,c=t.elements,h=t.buffer,d=t.shader,p=t.attributes,x=t.vao,b=t.uniforms,y=t.framebuffer,k=t.extensions,E=t.timer,A=t.isBufferArgs,L=u.blend_color,_=l.blend_color,C=u.blend_equation,M=l.blend_equation,v=u.blend_func,z=l.blend_func,T=u.depth_range,F=l.depth_range,q=u.colorMask,U=l.colorMask,H=u.polygonOffset_offset,j=l.polygonOffset_offset,G=u.sample_coverage,O=l.sample_coverage,W=u.stencil_func,re=l.stencil_func,ne=u.stencil_opFront,be=l.stencil_opFront,ze=u.stencil_opBack,Ce=l.stencil_opBack,he=u.scissor_box,te=l.scissor_box,ke=u.viewport,Ee=l.viewport,Me={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Oe={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},Re={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},me={add:32774,subtract:32778,"reverse subtract":32779},Be={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fe={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Ze={cw:2304,ccw:2305},et={},gt={},{draw:function(Pt){var Qe,Xe,Tt,xt,_t,Ct,jt,At;if(Qe=y.next,Qe!==y.cur&&(Qe?a.bindFramebuffer(36160,Qe.framebuffer):a.bindFramebuffer(36160,null),y.cur=Qe),l.dirty){var Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni;Te=u.dither,Te!==l.dither&&(Te?a.enable(3024):a.disable(3024),l.dither=Te),nt=u.blend_enable,nt!==l.blend_enable&&(nt?a.enable(3042):a.disable(3042),l.blend_enable=nt),ut=L[0],ct=L[1],rt=L[2],je=L[3],(ut!==_[0]||ct!==_[1]||rt!==_[2]||je!==_[3])&&(a.blendColor(ut,ct,rt,je),_[0]=ut,_[1]=ct,_[2]=rt,_[3]=je),tt=C[0],Je=C[1],(tt!==M[0]||Je!==M[1])&&(a.blendEquationSeparate(tt,Je),M[0]=tt,M[1]=Je),Mt=v[0],Vt=v[1],Kt=v[2],ir=v[3],(Mt!==z[0]||Vt!==z[1]||Kt!==z[2]||ir!==z[3])&&(a.blendFuncSeparate(Mt,Vt,Kt,ir),z[0]=Mt,z[1]=Vt,z[2]=Kt,z[3]=ir),fr=u.depth_enable,fr!==l.depth_enable&&(fr?a.enable(2929):a.disable(2929),l.depth_enable=fr),Ot=u.depth_func,Ot!==l.depth_func&&(a.depthFunc(Ot),l.depth_func=Ot),De=T[0],_e=T[1],(De!==F[0]||_e!==F[1])&&(a.depthRange(De,_e),F[0]=De,F[1]=_e),Fe=u.depth_mask,Fe!==l.depth_mask&&(a.depthMask(Fe),l.depth_mask=Fe),Pe=q[0],Ie=q[1],lt=q[2],ye=q[3],(Pe!==U[0]||Ie!==U[1]||lt!==U[2]||ye!==U[3])&&(a.colorMask(Pe,Ie,lt,ye),U[0]=Pe,U[1]=Ie,U[2]=lt,U[3]=ye),ue=u.cull_enable,ue!==l.cull_enable&&(ue?a.enable(2884):a.disable(2884),l.cull_enable=ue),de=u.cull_face,de!==l.cull_face&&(a.cullFace(de),l.cull_face=de),ht=u.frontFace,ht!==l.frontFace&&(a.frontFace(ht),l.frontFace=ht),Et=u.lineWidth,Et!==l.lineWidth&&(a.lineWidth(Et),l.lineWidth=Et),St=u.polygonOffset_enable,St!==l.polygonOffset_enable&&(St?a.enable(32823):a.disable(32823),l.polygonOffset_enable=St),Zt=H[0],qr=H[1],(Zt!==j[0]||qr!==j[1])&&(a.polygonOffset(Zt,qr),j[0]=Zt,j[1]=qr),Lr=u.sample_alpha,Lr!==l.sample_alpha&&(Lr?a.enable(32926):a.disable(32926),l.sample_alpha=Lr),vr=u.sample_enable,vr!==l.sample_enable&&(vr?a.enable(32928):a.disable(32928),l.sample_enable=vr),Er=G[0],si=G[1],(Er!==O[0]||si!==O[1])&&(a.sampleCoverage(Er,si),O[0]=Er,O[1]=si),Ei=u.stencil_enable,Ei!==l.stencil_enable&&(Ei?a.enable(2960):a.disable(2960),l.stencil_enable=Ei),Si=u.stencil_mask,Si!==l.stencil_mask&&(a.stencilMask(Si),l.stencil_mask=Si),xi=W[0],Hi=W[1],Jr=W[2],(xi!==re[0]||Hi!==re[1]||Jr!==re[2])&&(a.stencilFunc(xi,Hi,Jr),re[0]=xi,re[1]=Hi,re[2]=Jr),ci=ne[0],Di=ne[1],Lt=ne[2],vt=ne[3],(ci!==be[0]||Di!==be[1]||Lt!==be[2]||vt!==be[3])&&(a.stencilOpSeparate(ci,Di,Lt,vt),be[0]=ci,be[1]=Di,be[2]=Lt,be[3]=vt),Dt=ze[0],Bt=ze[1],sr=ze[2],br=ze[3],(Dt!==Ce[0]||Bt!==Ce[1]||sr!==Ce[2]||br!==Ce[3])&&(a.stencilOpSeparate(Dt,Bt,sr,br),Ce[0]=Dt,Ce[1]=Bt,Ce[2]=sr,Ce[3]=br),zr=u.scissor_enable,zr!==l.scissor_enable&&(zr?a.enable(3089):a.disable(3089),l.scissor_enable=zr),Tr=he[0],Rr=he[1],Br=he[2],oi=he[3],(Tr!==te[0]||Rr!==te[1]||Br!==te[2]||oi!==te[3])&&(a.scissor(Tr,Rr,Br,oi),te[0]=Tr,te[1]=Rr,te[2]=Br,te[3]=oi),vi=ke[0],Pi=ke[1],Yr=ke[2],Ni=ke[3],(vi!==Ee[0]||Pi!==Ee[1]||Yr!==Ee[2]||Ni!==Ee[3])&&(a.viewport(vi,Pi,Yr,Ni),Ee[0]=vi,Ee[1]=Pi,Ee[2]=Yr,Ee[3]=Ni),l.dirty=!1}Xe=l.profile,Xe&&(Tt=performance.now(),r.count++),xt=d.frag,_t=d.vert,Ct=d.program(_t,xt),a.useProgram(Ct.program),x.setVAO(null),jt=Ct.id,At=et[jt],At?At.call(this,Pt):(At=et[jt]=n(Ct),At.call(this,Pt)),x.setVAO(null),Xe&&(r.cpuTime+=performance.now()-Tt)},scope:function(Pt,Qe,Xe){var Tt,xt;Tt=l.profile,Tt&&(xt=performance.now(),r.count++),Qe(o,Pt,Xe),Tt&&(r.cpuTime+=performance.now()-xt)},batch:function(Pt,Qe){var Xe,Tt,xt,_t,Ct,jt,At,Te;if(Xe=y.next,Xe!==y.cur&&(Xe?a.bindFramebuffer(36160,Xe.framebuffer):a.bindFramebuffer(36160,null),y.cur=Xe),l.dirty){var nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur;nt=u.dither,nt!==l.dither&&(nt?a.enable(3024):a.disable(3024),l.dither=nt),ut=u.blend_enable,ut!==l.blend_enable&&(ut?a.enable(3042):a.disable(3042),l.blend_enable=ut),ct=L[0],rt=L[1],je=L[2],tt=L[3],(ct!==_[0]||rt!==_[1]||je!==_[2]||tt!==_[3])&&(a.blendColor(ct,rt,je,tt),_[0]=ct,_[1]=rt,_[2]=je,_[3]=tt),Je=C[0],Mt=C[1],(Je!==M[0]||Mt!==M[1])&&(a.blendEquationSeparate(Je,Mt),M[0]=Je,M[1]=Mt),Vt=v[0],Kt=v[1],ir=v[2],fr=v[3],(Vt!==z[0]||Kt!==z[1]||ir!==z[2]||fr!==z[3])&&(a.blendFuncSeparate(Vt,Kt,ir,fr),z[0]=Vt,z[1]=Kt,z[2]=ir,z[3]=fr),Ot=u.depth_enable,Ot!==l.depth_enable&&(Ot?a.enable(2929):a.disable(2929),l.depth_enable=Ot),De=u.depth_func,De!==l.depth_func&&(a.depthFunc(De),l.depth_func=De),_e=T[0],Fe=T[1],(_e!==F[0]||Fe!==F[1])&&(a.depthRange(_e,Fe),F[0]=_e,F[1]=Fe),Pe=u.depth_mask,Pe!==l.depth_mask&&(a.depthMask(Pe),l.depth_mask=Pe),Ie=q[0],lt=q[1],ye=q[2],ue=q[3],(Ie!==U[0]||lt!==U[1]||ye!==U[2]||ue!==U[3])&&(a.colorMask(Ie,lt,ye,ue),U[0]=Ie,U[1]=lt,U[2]=ye,U[3]=ue),de=u.cull_enable,de!==l.cull_enable&&(de?a.enable(2884):a.disable(2884),l.cull_enable=de),ht=u.cull_face,ht!==l.cull_face&&(a.cullFace(ht),l.cull_face=ht),Et=u.frontFace,Et!==l.frontFace&&(a.frontFace(Et),l.frontFace=Et),St=u.lineWidth,St!==l.lineWidth&&(a.lineWidth(St),l.lineWidth=St),Zt=u.polygonOffset_enable,Zt!==l.polygonOffset_enable&&(Zt?a.enable(32823):a.disable(32823),l.polygonOffset_enable=Zt),qr=H[0],Lr=H[1],(qr!==j[0]||Lr!==j[1])&&(a.polygonOffset(qr,Lr),j[0]=qr,j[1]=Lr),vr=u.sample_alpha,vr!==l.sample_alpha&&(vr?a.enable(32926):a.disable(32926),l.sample_alpha=vr),Er=u.sample_enable,Er!==l.sample_enable&&(Er?a.enable(32928):a.disable(32928),l.sample_enable=Er),si=G[0],Ei=G[1],(si!==O[0]||Ei!==O[1])&&(a.sampleCoverage(si,Ei),O[0]=si,O[1]=Ei),Si=u.stencil_enable,Si!==l.stencil_enable&&(Si?a.enable(2960):a.disable(2960),l.stencil_enable=Si),xi=u.stencil_mask,xi!==l.stencil_mask&&(a.stencilMask(xi),l.stencil_mask=xi),Hi=W[0],Jr=W[1],ci=W[2],(Hi!==re[0]||Jr!==re[1]||ci!==re[2])&&(a.stencilFunc(Hi,Jr,ci),re[0]=Hi,re[1]=Jr,re[2]=ci),Di=ne[0],Lt=ne[1],vt=ne[2],Dt=ne[3],(Di!==be[0]||Lt!==be[1]||vt!==be[2]||Dt!==be[3])&&(a.stencilOpSeparate(Di,Lt,vt,Dt),be[0]=Di,be[1]=Lt,be[2]=vt,be[3]=Dt),Bt=ze[0],sr=ze[1],br=ze[2],zr=ze[3],(Bt!==Ce[0]||sr!==Ce[1]||br!==Ce[2]||zr!==Ce[3])&&(a.stencilOpSeparate(Bt,sr,br,zr),Ce[0]=Bt,Ce[1]=sr,Ce[2]=br,Ce[3]=zr),Tr=u.scissor_enable,Tr!==l.scissor_enable&&(Tr?a.enable(3089):a.disable(3089),l.scissor_enable=Tr),Rr=he[0],Br=he[1],oi=he[2],vi=he[3],(Rr!==te[0]||Br!==te[1]||oi!==te[2]||vi!==te[3])&&(a.scissor(Rr,Br,oi,vi),te[0]=Rr,te[1]=Br,te[2]=oi,te[3]=vi),Pi=ke[0],Yr=ke[1],Ni=ke[2],Ur=ke[3],(Pi!==Ee[0]||Yr!==Ee[1]||Ni!==Ee[2]||Ur!==Ee[3])&&(a.viewport(Pi,Yr,Ni,Ur),Ee[0]=Pi,Ee[1]=Yr,Ee[2]=Ni,Ee[3]=Ur),l.dirty=!1}Tt=l.profile,Tt&&(xt=performance.now(),r.count+=Qe),_t=d.frag,Ct=d.vert,jt=d.program(Ct,_t),a.useProgram(jt.program),x.setVAO(null),At=jt.id,Te=gt[At],Te?Te.call(this,Pt,Qe):(Te=gt[At]=i(jt),Te.call(this,Pt,Qe)),x.setVAO(null),Tt&&(r.cpuTime+=performance.now()-xt)}}}});var aUe=Se((H1r,nUe)=>{nUe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za){"use strict";var Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la;return Hr=t.gl,na=t.context,go=t.strings,Dn=t.next,un=t.current,Zn=t.draw,Wo=t.elements,Ba=t.buffer,Bo=t.shader,Ea=t.attributes,Ha=t.vao,tn=t.uniforms,Cn=t.framebuffer,Xn=t.extensions,ts=t.timer,Ja=t.isBufferArgs,to=Dn.blend_color,Ri=un.blend_color,an=Dn.blend_equation,cs=un.blend_equation,pa=Dn.blend_func,ln=un.blend_func,ka=Dn.depth_range,va=un.depth_range,bo=Dn.colorMask,Co=un.colorMask,Fi=Dn.polygonOffset_offset,Yn=un.polygonOffset_offset,xa=Dn.sample_coverage,Qi=un.sample_coverage,Nn=Dn.stencil_func,Pn=un.stencil_func,qa=Dn.stencil_opFront,jo=un.stencil_opFront,Vo=Dn.stencil_opBack,Pa=un.stencil_opBack,Oa=Dn.scissor_box,co=un.scissor_box,An=Dn.viewport,_o=un.viewport,ks={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},bs={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},ps={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},sa={add:32774,subtract:32778,"reverse subtract":32779},Bn={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ms={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},ya={cw:2304,ccw:2305},on={},mn={},Ga=new Float32Array(16),ca=new Float32Array(16),bn=new Float32Array(16),Xi=new Float32Array(16),qn=new Float32Array(16),Ia=new Float32Array(16),yn=new Float32Array(16),Ya=new Float32Array(16),ba=new Float32Array(16),Da=new Float32Array(16),Aa=new Float32Array(16),Ln=new Float32Array(16),wo=new Float32Array(16),wa=new Float32Array(16),$i=new Float32Array(16),ea=new Float32Array(16),Sa=new Float32Array(16),Za=new Float32Array(16),xo=new Float32Array(16),Wa=new Float32Array(16),hn=new Float32Array(16),Un=new Float32Array(16),Ss=new Float32Array(16),Kn=new Float32Array(16),ns=new Float32Array(16),Jo=new Float32Array(16),vo=new Float32Array(16),ma=new Float32Array(16),ja=new Float32Array(16),To=new Float32Array(16),Ao=new Float32Array(16),la=new Float32Array(16),{draw:function(Ki){var ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs;if(ho=Cn.next,ho!==Cn.cur&&(ho?Hr.bindFramebuffer(36160,ho.framebuffer):Hr.bindFramebuffer(36160,null),Cn.cur=ho),un.dirty){var Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt;Fo=bo[0],Ys=bo[1],Gs=bo[2],Us=bo[3],(Fo!==Co[0]||Ys!==Co[1]||Gs!==Co[2]||Us!==Co[3])&&(Hr.colorMask(Fo,Ys,Gs,Us),Co[0]=Fo,Co[1]=Ys,Co[2]=Gs,Co[3]=Us),Sl=Dn.frontFace,Sl!==un.frontFace&&(Hr.frontFace(Sl),un.frontFace=Sl),_l=Dn.polygonOffset_enable,_l!==un.polygonOffset_enable&&(_l?Hr.enable(32823):Hr.disable(32823),un.polygonOffset_enable=_l),kl=Fi[0],cl=Fi[1],(kl!==Yn[0]||cl!==Yn[1])&&(Hr.polygonOffset(kl,cl),Yn[0]=kl,Yn[1]=cl),xl=Dn.sample_alpha,xl!==un.sample_alpha&&(xl?Hr.enable(32926):Hr.disable(32926),un.sample_alpha=xl),Uo=Dn.sample_enable,Uo!==un.sample_enable&&(Uo?Hr.enable(32928):Hr.disable(32928),un.sample_enable=Uo),_s=xa[0],Bl=xa[1],(_s!==Qi[0]||Bl!==Qi[1])&&(Hr.sampleCoverage(_s,Bl),Qi[0]=_s,Qi[1]=Bl),Il=Dn.stencil_enable,Il!==un.stencil_enable&&(Il?Hr.enable(2960):Hr.disable(2960),un.stencil_enable=Il),Dl=Dn.stencil_mask,Dl!==un.stencil_mask&&(Hr.stencilMask(Dl),un.stencil_mask=Dl),oe=Nn[0],w=Nn[1],B=Nn[2],(oe!==Pn[0]||w!==Pn[1]||B!==Pn[2])&&(Hr.stencilFunc(oe,w,B),Pn[0]=oe,Pn[1]=w,Pn[2]=B),Q=qa[0],ee=qa[1],le=qa[2],Ne=qa[3],(Q!==jo[0]||ee!==jo[1]||le!==jo[2]||Ne!==jo[3])&&(Hr.stencilOpSeparate(Q,ee,le,Ne),jo[0]=Q,jo[1]=ee,jo[2]=le,jo[3]=Ne),$e=Vo[0],pt=Vo[1],zt=Vo[2],Yt=Vo[3],($e!==Pa[0]||pt!==Pa[1]||zt!==Pa[2]||Yt!==Pa[3])&&(Hr.stencilOpSeparate($e,pt,zt,Yt),Pa[0]=$e,Pa[1]=pt,Pa[2]=zt,Pa[3]=Yt)}Ka=Ki.viewportX,on.x=Ka,Ca=Ki.viewportY,on.y=Ca,ta=Ki.viewportWidth,on.width=ta,En=Ki.viewportHeight,on.height=En,Mo=on.x|0,Ds=on.y|0,Ro="width"in on?on.width|0:na.framebufferWidth-Mo,vs="height"in on?on.height|0:na.framebufferHeight-Ds,Ks=na.viewportWidth,na.viewportWidth=Ro,as=na.viewportHeight,na.viewportHeight=vs,Hr.viewport(Mo,Ds,Ro,vs),_o[0]=Mo,_o[1]=Ds,_o[2]=Ro,_o[3]=vs,Hr.blendColor(0,0,0,0),Ri[0]=0,Ri[1]=0,Ri[2]=0,Ri[3]=0,n?Hr.enable(3042):Hr.disable(3042),un.blend_enable=n,Hr.blendEquationSeparate(32774,32774),cs[0]=32774,cs[1]=32774,Hr.blendFuncSeparate(770,771,1,1),ln[0]=770,ln[1]=771,ln[2]=1,ln[3]=1,i?Hr.enable(2884):Hr.disable(2884),un.cull_enable=i,Hr.cullFace(a),un.cull_face=a,o?Hr.enable(2929):Hr.disable(2929),un.depth_enable=o,Hr.depthFunc(s),un.depth_func=s,Hr.depthMask(u),un.depth_mask=u,Hr.depthRange(0,1),va[0]=0,va[1]=1,l?Hr.enable(3024):Hr.disable(3024),un.dither=l,Hr.lineWidth(f),un.lineWidth=f,Jn=Ki.scissorX,mn.x=Jn,Cs=Ki.scissorY,mn.y=Cs,Xa=Ki.scissorWidth,mn.width=Xa,Zo=Ki.scissorHeight,mn.height=Zo,Eo=mn.x|0,lo=mn.y|0,$a="width"in mn?mn.width|0:na.framebufferWidth-Eo,Xo="height"in mn?mn.height|0:na.framebufferHeight-lo,Hr.scissor(Eo,lo,$a,Xo),co[0]=Eo,co[1]=lo,co[2]=$a,co[3]=Xo,c?Hr.enable(3089):Hr.disable(3089),un.scissor_enable=c,rs=un.profile,un.profile=!1,Hr.useProgram(h.program),Ha.setVAO(null),$n=p.location,Sn=Ea[$n],Sn.buffer||Hr.enableVertexAttribArray($n),(Sn.type!==d.dtype||Sn.size!==4||Sn.buffer!==d||Sn.normalized!==!1||Sn.offset!==0||Sn.stride!==0)&&(Hr.bindBuffer(34962,d.buffer),Hr.vertexAttribPointer($n,4,d.dtype,!1,0,0),Sn.type=d.dtype,Sn.size=4,Sn.buffer=d,Sn.normalized=!1,Sn.offset=0,Sn.stride=0),uo=b.location,Rs=Ea[uo],Rs.buffer||Hr.enableVertexAttribArray(uo),(Rs.type!==x.dtype||Rs.size!==4||Rs.buffer!==x||Rs.normalized!==!1||Rs.offset!==0||Rs.stride!==0)&&(Hr.bindBuffer(34962,x.buffer),Hr.vertexAttribPointer(uo,4,x.dtype,!1,0,0),Rs.type=x.dtype,Rs.size=4,Rs.buffer=x,Rs.normalized=!1,Rs.offset=0,Rs.stride=0),xs=k.location,Go=Ea[xs],Go.buffer||Hr.enableVertexAttribArray(xs),(Go.type!==y.dtype||Go.size!==4||Go.buffer!==y||Go.normalized!==!1||Go.offset!==0||Go.stride!==0)&&(Hr.bindBuffer(34962,y.buffer),Hr.vertexAttribPointer(xs,4,y.dtype,!1,0,0),Go.type=y.dtype,Go.size=4,Go.buffer=y,Go.normalized=!1,Go.offset=0,Go.stride=0),os=A.location,So=Ea[os],So.buffer||Hr.enableVertexAttribArray(os),(So.type!==E.dtype||So.size!==4||So.buffer!==E||So.normalized!==!1||So.offset!==0||So.stride!==0)&&(Hr.bindBuffer(34962,E.buffer),Hr.vertexAttribPointer(os,4,E.dtype,!1,0,0),So.type=E.dtype,So.size=4,So.buffer=E,So.normalized=!1,So.offset=0,So.stride=0),Qn=_.location,zo=Ea[Qn],zo.buffer||Hr.enableVertexAttribArray(Qn),(zo.type!==L.dtype||zo.size!==4||zo.buffer!==L||zo.normalized!==!1||zo.offset!==0||zo.stride!==0)&&(Hr.bindBuffer(34962,L.buffer),Hr.vertexAttribPointer(Qn,4,L.dtype,!1,0,0),zo.type=L.dtype,zo.size=4,zo.buffer=L,zo.normalized=!1,zo.offset=0,zo.stride=0),rl=M.location,$o=Ea[rl],$o.buffer||Hr.enableVertexAttribArray(rl),($o.type!==C.dtype||$o.size!==4||$o.buffer!==C||$o.normalized!==!1||$o.offset!==0||$o.stride!==0)&&(Hr.bindBuffer(34962,C.buffer),Hr.vertexAttribPointer(rl,4,C.dtype,!1,0,0),$o.type=C.dtype,$o.size=4,$o.buffer=C,$o.normalized=!1,$o.offset=0,$o.stride=0),Na=z.location,Ua=Ea[Na],Ua.buffer||Hr.enableVertexAttribArray(Na),(Ua.type!==v.dtype||Ua.size!==4||Ua.buffer!==v||Ua.normalized!==!1||Ua.offset!==0||Ua.stride!==0)&&(Hr.bindBuffer(34962,v.buffer),Hr.vertexAttribPointer(Na,4,v.dtype,!1,0,0),Ua.type=v.dtype,Ua.size=4,Ua.buffer=v,Ua.normalized=!1,Ua.offset=0,Ua.stride=0),Po=F.location,fo=Ea[Po],fo.buffer||Hr.enableVertexAttribArray(Po),(fo.type!==T.dtype||fo.size!==4||fo.buffer!==T||fo.normalized!==!1||fo.offset!==0||fo.stride!==0)&&(Hr.bindBuffer(34962,T.buffer),Hr.vertexAttribPointer(Po,4,T.dtype,!1,0,0),fo.type=T.dtype,fo.size=4,fo.buffer=T,fo.normalized=!1,fo.offset=0,fo.stride=0),ro=U.location,Ma=Ea[ro],Ma.buffer||Hr.enableVertexAttribArray(ro),(Ma.type!==q.dtype||Ma.size!==4||Ma.buffer!==q||Ma.normalized!==!1||Ma.offset!==0||Ma.stride!==0)&&(Hr.bindBuffer(34962,q.buffer),Hr.vertexAttribPointer(ro,4,q.dtype,!1,0,0),Ma.type=q.dtype,Ma.size=4,Ma.buffer=q,Ma.normalized=!1,Ma.offset=0,Ma.stride=0),io=j.location,aa=Ea[io],aa.buffer||Hr.enableVertexAttribArray(io),(aa.type!==H.dtype||aa.size!==4||aa.buffer!==H||aa.normalized!==!1||aa.offset!==0||aa.stride!==0)&&(Hr.bindBuffer(34962,H.buffer),Hr.vertexAttribPointer(io,4,H.dtype,!1,0,0),aa.type=H.dtype,aa.size=4,aa.buffer=H,aa.normalized=!1,aa.offset=0,aa.stride=0),Oo=O.location,No=Ea[Oo],No.buffer||Hr.enableVertexAttribArray(Oo),(No.type!==G.dtype||No.size!==4||No.buffer!==G||No.normalized!==!1||No.offset!==0||No.stride!==0)&&(Hr.bindBuffer(34962,G.buffer),Hr.vertexAttribPointer(Oo,4,G.dtype,!1,0,0),No.type=G.dtype,No.size=4,No.buffer=G,No.normalized=!1,No.offset=0,No.stride=0),Zs=re.location,Fs=Ea[Zs],Fs.buffer||Hr.enableVertexAttribArray(Zs),(Fs.type!==W.dtype||Fs.size!==4||Fs.buffer!==W||Fs.normalized!==!1||Fs.offset!==0||Fs.stride!==0)&&(Hr.bindBuffer(34962,W.buffer),Hr.vertexAttribPointer(Zs,4,W.dtype,!1,0,0),Fs.type=W.dtype,Fs.size=4,Fs.buffer=W,Fs.normalized=!1,Fs.offset=0,Fs.stride=0),ws=be.location,no=Ea[ws],no.buffer||Hr.enableVertexAttribArray(ws),(no.type!==ne.dtype||no.size!==4||no.buffer!==ne||no.normalized!==!1||no.offset!==0||no.stride!==0)&&(Hr.bindBuffer(34962,ne.buffer),Hr.vertexAttribPointer(ws,4,ne.dtype,!1,0,0),no.type=ne.dtype,no.size=4,no.buffer=ne,no.normalized=!1,no.offset=0,no.stride=0),Ls=Ce.location,ds=Ea[Ls],ds.buffer||Hr.enableVertexAttribArray(Ls),(ds.type!==ze.dtype||ds.size!==4||ds.buffer!==ze||ds.normalized!==!1||ds.offset!==0||ds.stride!==0)&&(Hr.bindBuffer(34962,ze.buffer),Hr.vertexAttribPointer(Ls,4,ze.dtype,!1,0,0),ds.type=ze.dtype,ds.size=4,ds.buffer=ze,ds.normalized=!1,ds.offset=0,ds.stride=0),Xs=te.location,oa=Ea[Xs],oa.buffer||Hr.enableVertexAttribArray(Xs),(oa.type!==he.dtype||oa.size!==4||oa.buffer!==he||oa.normalized!==!1||oa.offset!==0||oa.stride!==0)&&(Hr.bindBuffer(34962,he.buffer),Hr.vertexAttribPointer(Xs,4,he.dtype,!1,0,0),oa.type=he.dtype,oa.size=4,oa.buffer=he,oa.normalized=!1,oa.offset=0,oa.stride=0),Yo=Ee.location,po=Ea[Yo],po.buffer||Hr.enableVertexAttribArray(Yo),(po.type!==ke.dtype||po.size!==4||po.buffer!==ke||po.normalized!==!1||po.offset!==0||po.stride!==0)&&(Hr.bindBuffer(34962,ke.buffer),Hr.vertexAttribPointer(Yo,4,ke.dtype,!1,0,0),po.type=ke.dtype,po.size=4,po.buffer=ke,po.normalized=!1,po.offset=0,po.stride=0),ss=Ki.contextColor,ls=ss[0],gs=ss[1],bt=ss[2],Ft=ss[3],Hr.uniform4f(Me.location,ls,gs,bt,Ft),hr=Ki.dim0A,Hr.uniformMatrix4fv(Oe.location,!1,Array.isArray(hr)||hr instanceof Float32Array?hr:(Ga[0]=hr[0],Ga[1]=hr[1],Ga[2]=hr[2],Ga[3]=hr[3],Ga[4]=hr[4],Ga[5]=hr[5],Ga[6]=hr[6],Ga[7]=hr[7],Ga[8]=hr[8],Ga[9]=hr[9],Ga[10]=hr[10],Ga[11]=hr[11],Ga[12]=hr[12],Ga[13]=hr[13],Ga[14]=hr[14],Ga[15]=hr[15],Ga)),nr=Ki.dim0B,Hr.uniformMatrix4fv(Re.location,!1,Array.isArray(nr)||nr instanceof Float32Array?nr:(ca[0]=nr[0],ca[1]=nr[1],ca[2]=nr[2],ca[3]=nr[3],ca[4]=nr[4],ca[5]=nr[5],ca[6]=nr[6],ca[7]=nr[7],ca[8]=nr[8],ca[9]=nr[9],ca[10]=nr[10],ca[11]=nr[11],ca[12]=nr[12],ca[13]=nr[13],ca[14]=nr[14],ca[15]=nr[15],ca)),Sr=Ki.dim0C,Hr.uniformMatrix4fv(me.location,!1,Array.isArray(Sr)||Sr instanceof Float32Array?Sr:(bn[0]=Sr[0],bn[1]=Sr[1],bn[2]=Sr[2],bn[3]=Sr[3],bn[4]=Sr[4],bn[5]=Sr[5],bn[6]=Sr[6],bn[7]=Sr[7],bn[8]=Sr[8],bn[9]=Sr[9],bn[10]=Sr[10],bn[11]=Sr[11],bn[12]=Sr[12],bn[13]=Sr[13],bn[14]=Sr[14],bn[15]=Sr[15],bn)),li=Ki.dim0D,Hr.uniformMatrix4fv(Be.location,!1,Array.isArray(li)||li instanceof Float32Array?li:(Xi[0]=li[0],Xi[1]=li[1],Xi[2]=li[2],Xi[3]=li[3],Xi[4]=li[4],Xi[5]=li[5],Xi[6]=li[6],Xi[7]=li[7],Xi[8]=li[8],Xi[9]=li[9],Xi[10]=li[10],Xi[11]=li[11],Xi[12]=li[12],Xi[13]=li[13],Xi[14]=li[14],Xi[15]=li[15],Xi)),di=Ki.dim1A,Hr.uniformMatrix4fv(fe.location,!1,Array.isArray(di)||di instanceof Float32Array?di:(qn[0]=di[0],qn[1]=di[1],qn[2]=di[2],qn[3]=di[3],qn[4]=di[4],qn[5]=di[5],qn[6]=di[6],qn[7]=di[7],qn[8]=di[8],qn[9]=di[9],qn[10]=di[10],qn[11]=di[11],qn[12]=di[12],qn[13]=di[13],qn[14]=di[14],qn[15]=di[15],qn)),mi=Ki.dim1B,Hr.uniformMatrix4fv(Ze.location,!1,Array.isArray(mi)||mi instanceof Float32Array?mi:(Ia[0]=mi[0],Ia[1]=mi[1],Ia[2]=mi[2],Ia[3]=mi[3],Ia[4]=mi[4],Ia[5]=mi[5],Ia[6]=mi[6],Ia[7]=mi[7],Ia[8]=mi[8],Ia[9]=mi[9],Ia[10]=mi[10],Ia[11]=mi[11],Ia[12]=mi[12],Ia[13]=mi[13],Ia[14]=mi[14],Ia[15]=mi[15],Ia)),Oi=Ki.dim1C,Hr.uniformMatrix4fv(et.location,!1,Array.isArray(Oi)||Oi instanceof Float32Array?Oi:(yn[0]=Oi[0],yn[1]=Oi[1],yn[2]=Oi[2],yn[3]=Oi[3],yn[4]=Oi[4],yn[5]=Oi[5],yn[6]=Oi[6],yn[7]=Oi[7],yn[8]=Oi[8],yn[9]=Oi[9],yn[10]=Oi[10],yn[11]=Oi[11],yn[12]=Oi[12],yn[13]=Oi[13],yn[14]=Oi[14],yn[15]=Oi[15],yn)),dn=Ki.dim1D,Hr.uniformMatrix4fv(gt.location,!1,Array.isArray(dn)||dn instanceof Float32Array?dn:(Ya[0]=dn[0],Ya[1]=dn[1],Ya[2]=dn[2],Ya[3]=dn[3],Ya[4]=dn[4],Ya[5]=dn[5],Ya[6]=dn[6],Ya[7]=dn[7],Ya[8]=dn[8],Ya[9]=dn[9],Ya[10]=dn[10],Ya[11]=dn[11],Ya[12]=dn[12],Ya[13]=dn[13],Ya[14]=dn[14],Ya[15]=dn[15],Ya)),wi=Ki.drwLayer,Hr.uniform1f(Pt.location,wi),ui=Ki.hiA,Hr.uniformMatrix4fv(Qe.location,!1,Array.isArray(ui)||ui instanceof Float32Array?ui:(ba[0]=ui[0],ba[1]=ui[1],ba[2]=ui[2],ba[3]=ui[3],ba[4]=ui[4],ba[5]=ui[5],ba[6]=ui[6],ba[7]=ui[7],ba[8]=ui[8],ba[9]=ui[9],ba[10]=ui[10],ba[11]=ui[11],ba[12]=ui[12],ba[13]=ui[13],ba[14]=ui[14],ba[15]=ui[15],ba)),Ai=Ki.hiB,Hr.uniformMatrix4fv(Xe.location,!1,Array.isArray(Ai)||Ai instanceof Float32Array?Ai:(Da[0]=Ai[0],Da[1]=Ai[1],Da[2]=Ai[2],Da[3]=Ai[3],Da[4]=Ai[4],Da[5]=Ai[5],Da[6]=Ai[6],Da[7]=Ai[7],Da[8]=Ai[8],Da[9]=Ai[9],Da[10]=Ai[10],Da[11]=Ai[11],Da[12]=Ai[12],Da[13]=Ai[13],Da[14]=Ai[14],Da[15]=Ai[15],Da)),gi=Ki.hiC,Hr.uniformMatrix4fv(Tt.location,!1,Array.isArray(gi)||gi instanceof Float32Array?gi:(Aa[0]=gi[0],Aa[1]=gi[1],Aa[2]=gi[2],Aa[3]=gi[3],Aa[4]=gi[4],Aa[5]=gi[5],Aa[6]=gi[6],Aa[7]=gi[7],Aa[8]=gi[8],Aa[9]=gi[9],Aa[10]=gi[10],Aa[11]=gi[11],Aa[12]=gi[12],Aa[13]=gi[13],Aa[14]=gi[14],Aa[15]=gi[15],Aa)),gn=Ki.hiD,Hr.uniformMatrix4fv(xt.location,!1,Array.isArray(gn)||gn instanceof Float32Array?gn:(Ln[0]=gn[0],Ln[1]=gn[1],Ln[2]=gn[2],Ln[3]=gn[3],Ln[4]=gn[4],Ln[5]=gn[5],Ln[6]=gn[6],Ln[7]=gn[7],Ln[8]=gn[8],Ln[9]=gn[9],Ln[10]=gn[10],Ln[11]=gn[11],Ln[12]=gn[12],Ln[13]=gn[13],Ln[14]=gn[14],Ln[15]=gn[15],Ln)),In=Ki.loA,Hr.uniformMatrix4fv(_t.location,!1,Array.isArray(In)||In instanceof Float32Array?In:(wo[0]=In[0],wo[1]=In[1],wo[2]=In[2],wo[3]=In[3],wo[4]=In[4],wo[5]=In[5],wo[6]=In[6],wo[7]=In[7],wo[8]=In[8],wo[9]=In[9],wo[10]=In[10],wo[11]=In[11],wo[12]=In[12],wo[13]=In[13],wo[14]=In[14],wo[15]=In[15],wo)),Vn=Ki.loB,Hr.uniformMatrix4fv(Ct.location,!1,Array.isArray(Vn)||Vn instanceof Float32Array?Vn:(wa[0]=Vn[0],wa[1]=Vn[1],wa[2]=Vn[2],wa[3]=Vn[3],wa[4]=Vn[4],wa[5]=Vn[5],wa[6]=Vn[6],wa[7]=Vn[7],wa[8]=Vn[8],wa[9]=Vn[9],wa[10]=Vn[10],wa[11]=Vn[11],wa[12]=Vn[12],wa[13]=Vn[13],wa[14]=Vn[14],wa[15]=Vn[15],wa)),Rn=Ki.loC,Hr.uniformMatrix4fv(jt.location,!1,Array.isArray(Rn)||Rn instanceof Float32Array?Rn:($i[0]=Rn[0],$i[1]=Rn[1],$i[2]=Rn[2],$i[3]=Rn[3],$i[4]=Rn[4],$i[5]=Rn[5],$i[6]=Rn[6],$i[7]=Rn[7],$i[8]=Rn[8],$i[9]=Rn[9],$i[10]=Rn[10],$i[11]=Rn[11],$i[12]=Rn[12],$i[13]=Rn[13],$i[14]=Rn[14],$i[15]=Rn[15],$i)),Hn=Ki.loD,Hr.uniformMatrix4fv(At.location,!1,Array.isArray(Hn)||Hn instanceof Float32Array?Hn:(ea[0]=Hn[0],ea[1]=Hn[1],ea[2]=Hn[2],ea[3]=Hn[3],ea[4]=Hn[4],ea[5]=Hn[5],ea[6]=Hn[6],ea[7]=Hn[7],ea[8]=Hn[8],ea[9]=Hn[9],ea[10]=Hn[10],ea[11]=Hn[11],ea[12]=Hn[12],ea[13]=Hn[13],ea[14]=Hn[14],ea[15]=Hn[15],ea)),Gn=Ki.maskHeight,Hr.uniform1f(Te.location,Gn),pn=Ki.maskTexture,pn&&pn._reglType==="framebuffer"&&(pn=pn.color[0]),Lo=pn._texture,Hr.uniform1i(nt.location,Lo.bind()),Hr.uniform1i(ut.location,ct.bind()),us=Ki.resolution,Bs=us[0],Js=us[1],Hr.uniform2f(rt.location,Bs,Js),ol=Ki.viewBoxPos,Cl=ol[0],ul=ol[1],Hr.uniform2f(je.location,Cl,ul),Gl=Ki.viewBoxSize,Vl=Gl[0],Fl=Gl[1],Hr.uniform2f(tt.location,Vl,Fl),ga=Zn.elements,ga?Hr.bindBuffer(34963,ga.buffer.buffer):Ha.currentVAO&&(ga=Wo.getElements(Ha.currentVAO.elements),ga&&Hr.bindBuffer(34963,ga.buffer.buffer)),ko=Ki.offset,zs=Ki.count,zs&&(ga?Hr.drawElements(1,zs,ga.type,ko<<(ga.type-5121>>1)):Hr.drawArrays(1,ko,zs),un.dirty=!0,Ha.setVAO(null),na.viewportWidth=Ks,na.viewportHeight=as,un.profile=rs,Lo.unbind(),ct.unbind())},scope:function(Ki,ho,Ka){var Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye,it,Nt,mt,er,_r,wr,ni,Wr,Ci,Ji,ai,Ti,Bi,en,Wi,bi,ao,yo,Ko,Ms,vl,wl,au,Al,nu,Bu,qu,Ju,qo,Rl,pu,xu,of,ff,xf,hf,dc,Gt,jr,_i,Mn,Ta,fa,ha,Io,Vs,Hs,is,su,Ps,qs,Do,kn,La,Es,Ws,Qo,bl,nl,ru,hs,Ho,ql,yl,tl,js,zl,lu,bu,al,jl,mu,Tu,Ru,Rf,Cc,rf,Lc,wf,pc,vc,qc,If,Tc,zc,Vu,Bc,Ou,Y,R,K,N,$,we,ge,Ue,dt,Rt,ur,gr,cr,It,Qt,ar,mr,Pr,Dr,Xr,Gr,Fr,Kr,Cr,yi,qi,vn,Qa,ra,mo,sl,Os,eo,fs,es,$s,Ml,Mu,Au,$u,du,Nu,yf,Kf,wd,Td;Ca=Ki.viewportX,on.x=Ca,ta=Ki.viewportY,on.y=ta,En=Ki.viewportWidth,on.width=En,Mo=Ki.viewportHeight,on.height=Mo,Ds=on.x|0,Ro=on.y|0,vs="width"in on?on.width|0:na.framebufferWidth-Ds,Ks="height"in on?on.height|0:na.framebufferHeight-Ro,as=na.viewportWidth,na.viewportWidth=vs,Jn=na.viewportHeight,na.viewportHeight=Ks,Cs=An[0],An[0]=Ds,Xa=An[1],An[1]=Ro,Zo=An[2],An[2]=vs,Eo=An[3],An[3]=Ks,lo=to[0],to[0]=Je,$a=to[1],to[1]=Mt,Xo=to[2],to[2]=Vt,rs=to[3],to[3]=Kt,$n=Dn.blend_enable,Dn.blend_enable=ir,Sn=an[0],an[0]=fr,uo=an[1],an[1]=Ot,Rs=pa[0],pa[0]=De,xs=pa[1],pa[1]=_e,Go=pa[2],pa[2]=Fe,os=pa[3],pa[3]=Pe,So=Dn.cull_enable,Dn.cull_enable=Ie,Qn=Dn.cull_face,Dn.cull_face=lt,zo=Dn.depth_enable,Dn.depth_enable=ye,rl=Dn.depth_func,Dn.depth_func=ue,$o=Dn.depth_mask,Dn.depth_mask=de,Na=ka[0],ka[0]=ht,Ua=ka[1],ka[1]=Et,Po=Dn.dither,Dn.dither=St,fo=Dn.lineWidth,Dn.lineWidth=Zt,ro=Ki.scissorX,mn.x=ro,Ma=Ki.scissorY,mn.y=Ma,io=Ki.scissorWidth,mn.width=io,aa=Ki.scissorHeight,mn.height=aa,Oo=mn.x|0,No=mn.y|0,Zs="width"in mn?mn.width|0:na.framebufferWidth-Oo,Fs="height"in mn?mn.height|0:na.framebufferHeight-No,ws=Oa[0],Oa[0]=Oo,no=Oa[1],Oa[1]=No,Ls=Oa[2],Oa[2]=Zs,ds=Oa[3],Oa[3]=Fs,Xs=Dn.scissor_enable,Dn.scissor_enable=qr,oa=un.profile,un.profile=!1,Yo=Ki.offset,po=Zn.offset,Zn.offset=Yo,ss=Ki.count,ls=Zn.count,Zn.count=ss,gs=Zn.primitive,Zn.primitive=Lr,bt=tn[Er],tn[Er]=vr,Ft=Ki.resolution,hr=tn[si],tn[si]=Ft,nr=Ki.viewBoxPos,Sr=tn[Ei],tn[Ei]=nr,li=Ki.viewBoxSize,di=tn[Si],tn[Si]=li,mi=Ki.dim0A,Oi=tn[xi],tn[xi]=mi,dn=Ki.dim1A,wi=tn[Hi],tn[Hi]=dn,ui=Ki.dim0B,Ai=tn[Jr],tn[Jr]=ui,gi=Ki.dim1B,gn=tn[ci],tn[ci]=gi,In=Ki.dim0C,Vn=tn[Di],tn[Di]=In,Rn=Ki.dim1C,Hn=tn[Lt],tn[Lt]=Rn,Gn=Ki.dim0D,pn=tn[vt],tn[vt]=Gn,Lo=Ki.dim1D,us=tn[Dt],tn[Dt]=Lo,Bs=Ki.loA,Js=tn[Bt],tn[Bt]=Bs,ol=Ki.hiA,Cl=tn[sr],tn[sr]=ol,ul=Ki.loB,Gl=tn[br],tn[br]=ul,Vl=Ki.hiB,Fl=tn[zr],tn[zr]=Vl,ga=Ki.loC,ko=tn[Tr],tn[Tr]=ga,zs=Ki.hiC,Fo=tn[Rr],tn[Rr]=zs,Ys=Ki.loD,Gs=tn[Br],tn[Br]=Ys,Us=Ki.hiD,Sl=tn[oi],tn[oi]=Us,_l=Ki.contextColor,kl=tn[vi],tn[vi]=_l,cl=Ki.maskTexture,xl=tn[Pi],tn[Pi]=cl,Uo=Ki.drwLayer,_s=tn[Yr],tn[Yr]=Uo,Bl=Ki.maskHeight,Il=tn[Ni],tn[Ni]=Bl,Dl=Ur.state,Ur.state=1,oe=Ur.x,Ur.x=0,w=Ur.y,Ur.y=0,B=Ur.z,Ur.z=0,Q=Ur.w,Ur.w=0,ee=Ur.buffer,Ur.buffer=x,le=Ur.size,Ur.size=0,Ne=Ur.normalized,Ur.normalized=!1,$e=Ur.type,Ur.type=x.dtype,pt=Ur.offset,Ur.offset=0,zt=Ur.stride,Ur.stride=0,Yt=Ur.divisor,Ur.divisor=0,Jt=ti.state,ti.state=1,yr=ti.x,ti.x=0,Ir=ti.y,ti.y=0,ce=ti.z,ti.z=0,Ae=ti.w,ti.w=0,qe=ti.buffer,ti.buffer=y,Ve=ti.size,ti.size=0,ot=ti.normalized,ti.normalized=!1,Ke=ti.type,ti.type=y.dtype,ft=ti.offset,ti.offset=0,qt=ti.stride,ti.stride=0,Xt=ti.divisor,ti.divisor=0,$t=ki.state,ki.state=1,dr=ki.x,ki.x=0,Mr=ki.y,ki.y=0,$r=ki.z,ki.z=0,ii=ki.w,ki.w=0,pi=ki.buffer,ki.buffer=E,Yi=ki.size,ki.size=0,wn=ki.normalized,ki.normalized=!1,Tn=ki.type,ki.type=E.dtype,ua=ki.offset,ki.offset=0,oo=ki.stride,ki.stride=0,el=ki.divisor,ki.divisor=0,ys=ji.state,ji.state=1,il=ji.x,ji.x=0,$l=ji.y,ji.y=0,pl=ji.z,ji.z=0,Hl=ji.w,ji.w=0,Ll=ji.buffer,ji.buffer=L,Ql=ji.size,ji.size=0,ku=ji.normalized,ji.normalized=!1,Jl=ji.type,ji.type=L.dtype,Kl=ji.offset,ji.offset=0,Hu=ji.stride,ji.stride=0,tf=ji.divisor,ji.divisor=0,Ku=Vi.state,Vi.state=1,Gu=Vi.x,Vi.x=0,Wu=Vi.y,Vi.y=0,sf=Vi.z,Vi.z=0,gf=Vi.w,Vi.w=0,nf=Vi.buffer,Vi.buffer=C,af=Vi.size,Vi.size=0,X=Vi.normalized,Vi.normalized=!1,se=Vi.type,Vi.type=C.dtype,Le=Vi.offset,Vi.offset=0,We=Vi.stride,Vi.stride=0,Ye=Vi.divisor,Vi.divisor=0,it=zi.state,zi.state=1,Nt=zi.x,zi.x=0,mt=zi.y,zi.y=0,er=zi.z,zi.z=0,_r=zi.w,zi.w=0,wr=zi.buffer,zi.buffer=v,ni=zi.size,zi.size=0,Wr=zi.normalized,zi.normalized=!1,Ci=zi.type,zi.type=v.dtype,Ji=zi.offset,zi.offset=0,ai=zi.stride,zi.stride=0,Ti=zi.divisor,zi.divisor=0,Bi=Mi.state,Mi.state=1,en=Mi.x,Mi.x=0,Wi=Mi.y,Mi.y=0,bi=Mi.z,Mi.z=0,ao=Mi.w,Mi.w=0,yo=Mi.buffer,Mi.buffer=T,Ko=Mi.size,Mi.size=0,Ms=Mi.normalized,Mi.normalized=!1,vl=Mi.type,Mi.type=T.dtype,wl=Mi.offset,Mi.offset=0,au=Mi.stride,Mi.stride=0,Al=Mi.divisor,Mi.divisor=0,nu=sn.state,sn.state=1,Bu=sn.x,sn.x=0,qu=sn.y,sn.y=0,Ju=sn.z,sn.z=0,qo=sn.w,sn.w=0,Rl=sn.buffer,sn.buffer=q,pu=sn.size,sn.size=0,xu=sn.normalized,sn.normalized=!1,of=sn.type,sn.type=q.dtype,ff=sn.offset,sn.offset=0,xf=sn.stride,sn.stride=0,hf=sn.divisor,sn.divisor=0,dc=fi.state,fi.state=1,Gt=fi.x,fi.x=0,jr=fi.y,fi.y=0,_i=fi.z,fi.z=0,Mn=fi.w,fi.w=0,Ta=fi.buffer,fi.buffer=H,fa=fi.size,fi.size=0,ha=fi.normalized,fi.normalized=!1,Io=fi.type,fi.type=H.dtype,Vs=fi.offset,fi.offset=0,Hs=fi.stride,fi.stride=0,is=fi.divisor,fi.divisor=0,su=Or.state,Or.state=1,Ps=Or.x,Or.x=0,qs=Or.y,Or.y=0,Do=Or.z,Or.z=0,kn=Or.w,Or.w=0,La=Or.buffer,Or.buffer=G,Es=Or.size,Or.size=0,Ws=Or.normalized,Or.normalized=!1,Qo=Or.type,Or.type=G.dtype,bl=Or.offset,Or.offset=0,nl=Or.stride,Or.stride=0,ru=Or.divisor,Or.divisor=0,hs=st.state,st.state=1,Ho=st.x,st.x=0,ql=st.y,st.y=0,yl=st.z,st.z=0,tl=st.w,st.w=0,js=st.buffer,st.buffer=W,zl=st.size,st.size=0,lu=st.normalized,st.normalized=!1,bu=st.type,st.type=W.dtype,al=st.offset,st.offset=0,jl=st.stride,st.stride=0,mu=st.divisor,st.divisor=0,Tu=Wt.state,Wt.state=1,Ru=Wt.x,Wt.x=0,Rf=Wt.y,Wt.y=0,Cc=Wt.z,Wt.z=0,rf=Wt.w,Wt.w=0,Lc=Wt.buffer,Wt.buffer=ne,wf=Wt.size,Wt.size=0,pc=Wt.normalized,Wt.normalized=!1,vc=Wt.type,Wt.type=ne.dtype,qc=Wt.offset,Wt.offset=0,If=Wt.stride,Wt.stride=0,Tc=Wt.divisor,Wt.divisor=0,zc=tr.state,tr.state=1,Vu=tr.x,tr.x=0,Bc=tr.y,tr.y=0,Ou=tr.z,tr.z=0,Y=tr.w,tr.w=0,R=tr.buffer,tr.buffer=ze,K=tr.size,tr.size=0,N=tr.normalized,tr.normalized=!1,$=tr.type,tr.type=ze.dtype,we=tr.offset,tr.offset=0,ge=tr.stride,tr.stride=0,Ue=tr.divisor,tr.divisor=0,dt=or.state,or.state=1,Rt=or.x,or.x=0,ur=or.y,or.y=0,gr=or.z,or.z=0,cr=or.w,or.w=0,It=or.buffer,or.buffer=he,Qt=or.size,or.size=0,ar=or.normalized,or.normalized=!1,mr=or.type,or.type=he.dtype,Pr=or.offset,or.offset=0,Dr=or.stride,or.stride=0,Xr=or.divisor,or.divisor=0,Gr=Nr.state,Nr.state=1,Fr=Nr.x,Nr.x=0,Kr=Nr.y,Nr.y=0,Cr=Nr.z,Nr.z=0,yi=Nr.w,Nr.w=0,qi=Nr.buffer,Nr.buffer=ke,vn=Nr.size,Nr.size=0,Qa=Nr.normalized,Nr.normalized=!1,ra=Nr.type,Nr.type=ke.dtype,mo=Nr.offset,Nr.offset=0,sl=Nr.stride,Nr.stride=0,Os=Nr.divisor,Nr.divisor=0,eo=hi.state,hi.state=1,fs=hi.x,hi.x=0,es=hi.y,hi.y=0,$s=hi.z,hi.z=0,Ml=hi.w,hi.w=0,Mu=hi.buffer,hi.buffer=d,Au=hi.size,hi.size=0,$u=hi.normalized,hi.normalized=!1,du=hi.type,hi.type=d.dtype,Nu=hi.offset,hi.offset=0,yf=hi.stride,hi.stride=0,Kf=hi.divisor,hi.divisor=0,wd=Bo.vert,Bo.vert=Gi,Td=Bo.frag,Bo.frag=Qr,un.dirty=!0,ho(na,Ki,Ka),na.viewportWidth=as,na.viewportHeight=Jn,An[0]=Cs,An[1]=Xa,An[2]=Zo,An[3]=Eo,to[0]=lo,to[1]=$a,to[2]=Xo,to[3]=rs,Dn.blend_enable=$n,an[0]=Sn,an[1]=uo,pa[0]=Rs,pa[1]=xs,pa[2]=Go,pa[3]=os,Dn.cull_enable=So,Dn.cull_face=Qn,Dn.depth_enable=zo,Dn.depth_func=rl,Dn.depth_mask=$o,ka[0]=Na,ka[1]=Ua,Dn.dither=Po,Dn.lineWidth=fo,Oa[0]=ws,Oa[1]=no,Oa[2]=Ls,Oa[3]=ds,Dn.scissor_enable=Xs,un.profile=oa,Zn.offset=po,Zn.count=ls,Zn.primitive=gs,tn[Er]=bt,tn[si]=hr,tn[Ei]=Sr,tn[Si]=di,tn[xi]=Oi,tn[Hi]=wi,tn[Jr]=Ai,tn[ci]=gn,tn[Di]=Vn,tn[Lt]=Hn,tn[vt]=pn,tn[Dt]=us,tn[Bt]=Js,tn[sr]=Cl,tn[br]=Gl,tn[zr]=Fl,tn[Tr]=ko,tn[Rr]=Fo,tn[Br]=Gs,tn[oi]=Sl,tn[vi]=kl,tn[Pi]=xl,tn[Yr]=_s,tn[Ni]=Il,Ur.state=Dl,Ur.x=oe,Ur.y=w,Ur.z=B,Ur.w=Q,Ur.buffer=ee,Ur.size=le,Ur.normalized=Ne,Ur.type=$e,Ur.offset=pt,Ur.stride=zt,Ur.divisor=Yt,ti.state=Jt,ti.x=yr,ti.y=Ir,ti.z=ce,ti.w=Ae,ti.buffer=qe,ti.size=Ve,ti.normalized=ot,ti.type=Ke,ti.offset=ft,ti.stride=qt,ti.divisor=Xt,ki.state=$t,ki.x=dr,ki.y=Mr,ki.z=$r,ki.w=ii,ki.buffer=pi,ki.size=Yi,ki.normalized=wn,ki.type=Tn,ki.offset=ua,ki.stride=oo,ki.divisor=el,ji.state=ys,ji.x=il,ji.y=$l,ji.z=pl,ji.w=Hl,ji.buffer=Ll,ji.size=Ql,ji.normalized=ku,ji.type=Jl,ji.offset=Kl,ji.stride=Hu,ji.divisor=tf,Vi.state=Ku,Vi.x=Gu,Vi.y=Wu,Vi.z=sf,Vi.w=gf,Vi.buffer=nf,Vi.size=af,Vi.normalized=X,Vi.type=se,Vi.offset=Le,Vi.stride=We,Vi.divisor=Ye,zi.state=it,zi.x=Nt,zi.y=mt,zi.z=er,zi.w=_r,zi.buffer=wr,zi.size=ni,zi.normalized=Wr,zi.type=Ci,zi.offset=Ji,zi.stride=ai,zi.divisor=Ti,Mi.state=Bi,Mi.x=en,Mi.y=Wi,Mi.z=bi,Mi.w=ao,Mi.buffer=yo,Mi.size=Ko,Mi.normalized=Ms,Mi.type=vl,Mi.offset=wl,Mi.stride=au,Mi.divisor=Al,sn.state=nu,sn.x=Bu,sn.y=qu,sn.z=Ju,sn.w=qo,sn.buffer=Rl,sn.size=pu,sn.normalized=xu,sn.type=of,sn.offset=ff,sn.stride=xf,sn.divisor=hf,fi.state=dc,fi.x=Gt,fi.y=jr,fi.z=_i,fi.w=Mn,fi.buffer=Ta,fi.size=fa,fi.normalized=ha,fi.type=Io,fi.offset=Vs,fi.stride=Hs,fi.divisor=is,Or.state=su,Or.x=Ps,Or.y=qs,Or.z=Do,Or.w=kn,Or.buffer=La,Or.size=Es,Or.normalized=Ws,Or.type=Qo,Or.offset=bl,Or.stride=nl,Or.divisor=ru,st.state=hs,st.x=Ho,st.y=ql,st.z=yl,st.w=tl,st.buffer=js,st.size=zl,st.normalized=lu,st.type=bu,st.offset=al,st.stride=jl,st.divisor=mu,Wt.state=Tu,Wt.x=Ru,Wt.y=Rf,Wt.z=Cc,Wt.w=rf,Wt.buffer=Lc,Wt.size=wf,Wt.normalized=pc,Wt.type=vc,Wt.offset=qc,Wt.stride=If,Wt.divisor=Tc,tr.state=zc,tr.x=Vu,tr.y=Bc,tr.z=Ou,tr.w=Y,tr.buffer=R,tr.size=K,tr.normalized=N,tr.type=$,tr.offset=we,tr.stride=ge,tr.divisor=Ue,or.state=dt,or.x=Rt,or.y=ur,or.z=gr,or.w=cr,or.buffer=It,or.size=Qt,or.normalized=ar,or.type=mr,or.offset=Pr,or.stride=Dr,or.divisor=Xr,Nr.state=Gr,Nr.x=Fr,Nr.y=Kr,Nr.z=Cr,Nr.w=yi,Nr.buffer=qi,Nr.size=vn,Nr.normalized=Qa,Nr.type=ra,Nr.offset=mo,Nr.stride=sl,Nr.divisor=Os,hi.state=eo,hi.x=fs,hi.y=es,hi.z=$s,hi.w=Ml,hi.buffer=Mu,hi.size=Au,hi.normalized=$u,hi.type=du,hi.offset=Nu,hi.stride=yf,hi.divisor=Kf,Bo.vert=wd,Bo.frag=Td,un.dirty=!0},batch:function(Ki,ho){var Ka,Ca,ta,En;if(Ka=Cn.next,Ka!==Cn.cur&&(Ka?Hr.bindFramebuffer(36160,Ka.framebuffer):Hr.bindFramebuffer(36160,null),Cn.cur=Ka),un.dirty){var Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo;Mo=bo[0],Ds=bo[1],Ro=bo[2],vs=bo[3],(Mo!==Co[0]||Ds!==Co[1]||Ro!==Co[2]||vs!==Co[3])&&(Hr.colorMask(Mo,Ds,Ro,vs),Co[0]=Mo,Co[1]=Ds,Co[2]=Ro,Co[3]=vs),Ks=Dn.frontFace,Ks!==un.frontFace&&(Hr.frontFace(Ks),un.frontFace=Ks),as=Dn.polygonOffset_enable,as!==un.polygonOffset_enable&&(as?Hr.enable(32823):Hr.disable(32823),un.polygonOffset_enable=as),Jn=Fi[0],Cs=Fi[1],(Jn!==Yn[0]||Cs!==Yn[1])&&(Hr.polygonOffset(Jn,Cs),Yn[0]=Jn,Yn[1]=Cs),Xa=Dn.sample_alpha,Xa!==un.sample_alpha&&(Xa?Hr.enable(32926):Hr.disable(32926),un.sample_alpha=Xa),Zo=Dn.sample_enable,Zo!==un.sample_enable&&(Zo?Hr.enable(32928):Hr.disable(32928),un.sample_enable=Zo),Eo=xa[0],lo=xa[1],(Eo!==Qi[0]||lo!==Qi[1])&&(Hr.sampleCoverage(Eo,lo),Qi[0]=Eo,Qi[1]=lo),$a=Dn.stencil_enable,$a!==un.stencil_enable&&($a?Hr.enable(2960):Hr.disable(2960),un.stencil_enable=$a),Xo=Dn.stencil_mask,Xo!==un.stencil_mask&&(Hr.stencilMask(Xo),un.stencil_mask=Xo),rs=Nn[0],$n=Nn[1],Sn=Nn[2],(rs!==Pn[0]||$n!==Pn[1]||Sn!==Pn[2])&&(Hr.stencilFunc(rs,$n,Sn),Pn[0]=rs,Pn[1]=$n,Pn[2]=Sn),uo=qa[0],Rs=qa[1],xs=qa[2],Go=qa[3],(uo!==jo[0]||Rs!==jo[1]||xs!==jo[2]||Go!==jo[3])&&(Hr.stencilOpSeparate(uo,Rs,xs,Go),jo[0]=uo,jo[1]=Rs,jo[2]=xs,jo[3]=Go),os=Vo[0],So=Vo[1],Qn=Vo[2],zo=Vo[3],(os!==Pa[0]||So!==Pa[1]||Qn!==Pa[2]||zo!==Pa[3])&&(Hr.stencilOpSeparate(os,So,Qn,zo),Pa[0]=os,Pa[1]=So,Pa[2]=Qn,Pa[3]=zo)}Hr.blendColor(0,0,0,0),Ri[0]=0,Ri[1]=0,Ri[2]=0,Ri[3]=0,Ui?Hr.enable(3042):Hr.disable(3042),un.blend_enable=Ui,Hr.blendEquationSeparate(32774,32774),cs[0]=32774,cs[1]=32774,Hr.blendFuncSeparate(770,771,1,1),ln[0]=770,ln[1]=771,ln[2]=1,ln[3]=1,zn?Hr.enable(2884):Hr.disable(2884),un.cull_enable=zn,Hr.cullFace(fn),un.cull_face=fn,xn?Hr.enable(2929):Hr.disable(2929),un.depth_enable=xn,Hr.depthFunc(_a),un.depth_func=_a,Hr.depthMask(Wn),un.depth_mask=Wn,Hr.depthRange(0,1),va[0]=0,va[1]=1,Fn?Hr.enable(3024):Hr.disable(3024),un.dither=Fn,Hr.lineWidth(ia),un.lineWidth=ia,za?Hr.enable(3089):Hr.disable(3089),un.scissor_enable=za,Ca=un.profile,un.profile=!1,Hr.useProgram(h.program);var rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi;for(Ha.setVAO(null),rl=p.location,$o=Ea[rl],$o.buffer||Hr.enableVertexAttribArray(rl),($o.type!==d.dtype||$o.size!==4||$o.buffer!==d||$o.normalized!==!1||$o.offset!==0||$o.stride!==0)&&(Hr.bindBuffer(34962,d.buffer),Hr.vertexAttribPointer(rl,4,d.dtype,!1,0,0),$o.type=d.dtype,$o.size=4,$o.buffer=d,$o.normalized=!1,$o.offset=0,$o.stride=0),Na=b.location,Ua=Ea[Na],Ua.buffer||Hr.enableVertexAttribArray(Na),(Ua.type!==x.dtype||Ua.size!==4||Ua.buffer!==x||Ua.normalized!==!1||Ua.offset!==0||Ua.stride!==0)&&(Hr.bindBuffer(34962,x.buffer),Hr.vertexAttribPointer(Na,4,x.dtype,!1,0,0),Ua.type=x.dtype,Ua.size=4,Ua.buffer=x,Ua.normalized=!1,Ua.offset=0,Ua.stride=0),Po=k.location,fo=Ea[Po],fo.buffer||Hr.enableVertexAttribArray(Po),(fo.type!==y.dtype||fo.size!==4||fo.buffer!==y||fo.normalized!==!1||fo.offset!==0||fo.stride!==0)&&(Hr.bindBuffer(34962,y.buffer),Hr.vertexAttribPointer(Po,4,y.dtype,!1,0,0),fo.type=y.dtype,fo.size=4,fo.buffer=y,fo.normalized=!1,fo.offset=0,fo.stride=0),ro=A.location,Ma=Ea[ro],Ma.buffer||Hr.enableVertexAttribArray(ro),(Ma.type!==E.dtype||Ma.size!==4||Ma.buffer!==E||Ma.normalized!==!1||Ma.offset!==0||Ma.stride!==0)&&(Hr.bindBuffer(34962,E.buffer),Hr.vertexAttribPointer(ro,4,E.dtype,!1,0,0),Ma.type=E.dtype,Ma.size=4,Ma.buffer=E,Ma.normalized=!1,Ma.offset=0,Ma.stride=0),io=_.location,aa=Ea[io],aa.buffer||Hr.enableVertexAttribArray(io),(aa.type!==L.dtype||aa.size!==4||aa.buffer!==L||aa.normalized!==!1||aa.offset!==0||aa.stride!==0)&&(Hr.bindBuffer(34962,L.buffer),Hr.vertexAttribPointer(io,4,L.dtype,!1,0,0),aa.type=L.dtype,aa.size=4,aa.buffer=L,aa.normalized=!1,aa.offset=0,aa.stride=0),Oo=M.location,No=Ea[Oo],No.buffer||Hr.enableVertexAttribArray(Oo),(No.type!==C.dtype||No.size!==4||No.buffer!==C||No.normalized!==!1||No.offset!==0||No.stride!==0)&&(Hr.bindBuffer(34962,C.buffer),Hr.vertexAttribPointer(Oo,4,C.dtype,!1,0,0),No.type=C.dtype,No.size=4,No.buffer=C,No.normalized=!1,No.offset=0,No.stride=0),Zs=z.location,Fs=Ea[Zs],Fs.buffer||Hr.enableVertexAttribArray(Zs),(Fs.type!==v.dtype||Fs.size!==4||Fs.buffer!==v||Fs.normalized!==!1||Fs.offset!==0||Fs.stride!==0)&&(Hr.bindBuffer(34962,v.buffer),Hr.vertexAttribPointer(Zs,4,v.dtype,!1,0,0),Fs.type=v.dtype,Fs.size=4,Fs.buffer=v,Fs.normalized=!1,Fs.offset=0,Fs.stride=0),ws=F.location,no=Ea[ws],no.buffer||Hr.enableVertexAttribArray(ws),(no.type!==T.dtype||no.size!==4||no.buffer!==T||no.normalized!==!1||no.offset!==0||no.stride!==0)&&(Hr.bindBuffer(34962,T.buffer),Hr.vertexAttribPointer(ws,4,T.dtype,!1,0,0),no.type=T.dtype,no.size=4,no.buffer=T,no.normalized=!1,no.offset=0,no.stride=0),Ls=U.location,ds=Ea[Ls],ds.buffer||Hr.enableVertexAttribArray(Ls),(ds.type!==q.dtype||ds.size!==4||ds.buffer!==q||ds.normalized!==!1||ds.offset!==0||ds.stride!==0)&&(Hr.bindBuffer(34962,q.buffer),Hr.vertexAttribPointer(Ls,4,q.dtype,!1,0,0),ds.type=q.dtype,ds.size=4,ds.buffer=q,ds.normalized=!1,ds.offset=0,ds.stride=0),Xs=j.location,oa=Ea[Xs],oa.buffer||Hr.enableVertexAttribArray(Xs),(oa.type!==H.dtype||oa.size!==4||oa.buffer!==H||oa.normalized!==!1||oa.offset!==0||oa.stride!==0)&&(Hr.bindBuffer(34962,H.buffer),Hr.vertexAttribPointer(Xs,4,H.dtype,!1,0,0),oa.type=H.dtype,oa.size=4,oa.buffer=H,oa.normalized=!1,oa.offset=0,oa.stride=0),Yo=O.location,po=Ea[Yo],po.buffer||Hr.enableVertexAttribArray(Yo),(po.type!==G.dtype||po.size!==4||po.buffer!==G||po.normalized!==!1||po.offset!==0||po.stride!==0)&&(Hr.bindBuffer(34962,G.buffer),Hr.vertexAttribPointer(Yo,4,G.dtype,!1,0,0),po.type=G.dtype,po.size=4,po.buffer=G,po.normalized=!1,po.offset=0,po.stride=0),ss=re.location,ls=Ea[ss],ls.buffer||Hr.enableVertexAttribArray(ss),(ls.type!==W.dtype||ls.size!==4||ls.buffer!==W||ls.normalized!==!1||ls.offset!==0||ls.stride!==0)&&(Hr.bindBuffer(34962,W.buffer),Hr.vertexAttribPointer(ss,4,W.dtype,!1,0,0),ls.type=W.dtype,ls.size=4,ls.buffer=W,ls.normalized=!1,ls.offset=0,ls.stride=0),gs=be.location,bt=Ea[gs],bt.buffer||Hr.enableVertexAttribArray(gs),(bt.type!==ne.dtype||bt.size!==4||bt.buffer!==ne||bt.normalized!==!1||bt.offset!==0||bt.stride!==0)&&(Hr.bindBuffer(34962,ne.buffer),Hr.vertexAttribPointer(gs,4,ne.dtype,!1,0,0),bt.type=ne.dtype,bt.size=4,bt.buffer=ne,bt.normalized=!1,bt.offset=0,bt.stride=0),Ft=Ce.location,hr=Ea[Ft],hr.buffer||Hr.enableVertexAttribArray(Ft),(hr.type!==ze.dtype||hr.size!==4||hr.buffer!==ze||hr.normalized!==!1||hr.offset!==0||hr.stride!==0)&&(Hr.bindBuffer(34962,ze.buffer),Hr.vertexAttribPointer(Ft,4,ze.dtype,!1,0,0),hr.type=ze.dtype,hr.size=4,hr.buffer=ze,hr.normalized=!1,hr.offset=0,hr.stride=0),nr=te.location,Sr=Ea[nr],Sr.buffer||Hr.enableVertexAttribArray(nr),(Sr.type!==he.dtype||Sr.size!==4||Sr.buffer!==he||Sr.normalized!==!1||Sr.offset!==0||Sr.stride!==0)&&(Hr.bindBuffer(34962,he.buffer),Hr.vertexAttribPointer(nr,4,he.dtype,!1,0,0),Sr.type=he.dtype,Sr.size=4,Sr.buffer=he,Sr.normalized=!1,Sr.offset=0,Sr.stride=0),li=Ee.location,di=Ea[li],di.buffer||Hr.enableVertexAttribArray(li),(di.type!==ke.dtype||di.size!==4||di.buffer!==ke||di.normalized!==!1||di.offset!==0||di.stride!==0)&&(Hr.bindBuffer(34962,ke.buffer),Hr.vertexAttribPointer(li,4,ke.dtype,!1,0,0),di.type=ke.dtype,di.size=4,di.buffer=ke,di.normalized=!1,di.offset=0,di.stride=0),Hr.uniform1i(ut.location,ct.bind()),mi=Zn.elements,mi?Hr.bindBuffer(34963,mi.buffer.buffer):Ha.currentVAO&&(mi=Wo.getElements(Ha.currentVAO.elements),mi&&Hr.bindBuffer(34963,mi.buffer.buffer)),ta=0;ta<ho;++ta){En=Ki[ta];var Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr;Oi=En.viewportX,on.x=Oi,dn=En.viewportY,on.y=dn,wi=En.viewportWidth,on.width=wi,ui=En.viewportHeight,on.height=ui,Ai=on.x|0,gi=on.y|0,gn="width"in on?on.width|0:na.framebufferWidth-Ai,In="height"in on?on.height|0:na.framebufferHeight-gi,Vn=na.viewportWidth,na.viewportWidth=gn,Rn=na.viewportHeight,na.viewportHeight=In,Hr.viewport(Ai,gi,gn,In),_o[0]=Ai,_o[1]=gi,_o[2]=gn,_o[3]=In,Hn=En.scissorX,mn.x=Hn,Gn=En.scissorY,mn.y=Gn,pn=En.scissorWidth,mn.width=pn,Lo=En.scissorHeight,mn.height=Lo,us=mn.x|0,Bs=mn.y|0,Js="width"in mn?mn.width|0:na.framebufferWidth-us,ol="height"in mn?mn.height|0:na.framebufferHeight-Bs,Hr.scissor(us,Bs,Js,ol),co[0]=us,co[1]=Bs,co[2]=Js,co[3]=ol,Cl=En.contextColor,ul=Cl[0],Vl=Cl[1],ga=Cl[2],zs=Cl[3],(!ta||Gl!==ul||Fl!==Vl||ko!==ga||Fo!==zs)&&(Gl=ul,Fl=Vl,ko=ga,Fo=zs,Hr.uniform4f(Me.location,ul,Vl,ga,zs)),Ys=En.dim0A,Hr.uniformMatrix4fv(Oe.location,!1,Array.isArray(Ys)||Ys instanceof Float32Array?Ys:(Sa[0]=Ys[0],Sa[1]=Ys[1],Sa[2]=Ys[2],Sa[3]=Ys[3],Sa[4]=Ys[4],Sa[5]=Ys[5],Sa[6]=Ys[6],Sa[7]=Ys[7],Sa[8]=Ys[8],Sa[9]=Ys[9],Sa[10]=Ys[10],Sa[11]=Ys[11],Sa[12]=Ys[12],Sa[13]=Ys[13],Sa[14]=Ys[14],Sa[15]=Ys[15],Sa)),Gs=En.dim0B,Hr.uniformMatrix4fv(Re.location,!1,Array.isArray(Gs)||Gs instanceof Float32Array?Gs:(Za[0]=Gs[0],Za[1]=Gs[1],Za[2]=Gs[2],Za[3]=Gs[3],Za[4]=Gs[4],Za[5]=Gs[5],Za[6]=Gs[6],Za[7]=Gs[7],Za[8]=Gs[8],Za[9]=Gs[9],Za[10]=Gs[10],Za[11]=Gs[11],Za[12]=Gs[12],Za[13]=Gs[13],Za[14]=Gs[14],Za[15]=Gs[15],Za)),Us=En.dim0C,Hr.uniformMatrix4fv(me.location,!1,Array.isArray(Us)||Us instanceof Float32Array?Us:(xo[0]=Us[0],xo[1]=Us[1],xo[2]=Us[2],xo[3]=Us[3],xo[4]=Us[4],xo[5]=Us[5],xo[6]=Us[6],xo[7]=Us[7],xo[8]=Us[8],xo[9]=Us[9],xo[10]=Us[10],xo[11]=Us[11],xo[12]=Us[12],xo[13]=Us[13],xo[14]=Us[14],xo[15]=Us[15],xo)),Sl=En.dim0D,Hr.uniformMatrix4fv(Be.location,!1,Array.isArray(Sl)||Sl instanceof Float32Array?Sl:(Wa[0]=Sl[0],Wa[1]=Sl[1],Wa[2]=Sl[2],Wa[3]=Sl[3],Wa[4]=Sl[4],Wa[5]=Sl[5],Wa[6]=Sl[6],Wa[7]=Sl[7],Wa[8]=Sl[8],Wa[9]=Sl[9],Wa[10]=Sl[10],Wa[11]=Sl[11],Wa[12]=Sl[12],Wa[13]=Sl[13],Wa[14]=Sl[14],Wa[15]=Sl[15],Wa)),_l=En.dim1A,Hr.uniformMatrix4fv(fe.location,!1,Array.isArray(_l)||_l instanceof Float32Array?_l:(hn[0]=_l[0],hn[1]=_l[1],hn[2]=_l[2],hn[3]=_l[3],hn[4]=_l[4],hn[5]=_l[5],hn[6]=_l[6],hn[7]=_l[7],hn[8]=_l[8],hn[9]=_l[9],hn[10]=_l[10],hn[11]=_l[11],hn[12]=_l[12],hn[13]=_l[13],hn[14]=_l[14],hn[15]=_l[15],hn)),kl=En.dim1B,Hr.uniformMatrix4fv(Ze.location,!1,Array.isArray(kl)||kl instanceof Float32Array?kl:(Un[0]=kl[0],Un[1]=kl[1],Un[2]=kl[2],Un[3]=kl[3],Un[4]=kl[4],Un[5]=kl[5],Un[6]=kl[6],Un[7]=kl[7],Un[8]=kl[8],Un[9]=kl[9],Un[10]=kl[10],Un[11]=kl[11],Un[12]=kl[12],Un[13]=kl[13],Un[14]=kl[14],Un[15]=kl[15],Un)),cl=En.dim1C,Hr.uniformMatrix4fv(et.location,!1,Array.isArray(cl)||cl instanceof Float32Array?cl:(Ss[0]=cl[0],Ss[1]=cl[1],Ss[2]=cl[2],Ss[3]=cl[3],Ss[4]=cl[4],Ss[5]=cl[5],Ss[6]=cl[6],Ss[7]=cl[7],Ss[8]=cl[8],Ss[9]=cl[9],Ss[10]=cl[10],Ss[11]=cl[11],Ss[12]=cl[12],Ss[13]=cl[13],Ss[14]=cl[14],Ss[15]=cl[15],Ss)),xl=En.dim1D,Hr.uniformMatrix4fv(gt.location,!1,Array.isArray(xl)||xl instanceof Float32Array?xl:(Kn[0]=xl[0],Kn[1]=xl[1],Kn[2]=xl[2],Kn[3]=xl[3],Kn[4]=xl[4],Kn[5]=xl[5],Kn[6]=xl[6],Kn[7]=xl[7],Kn[8]=xl[8],Kn[9]=xl[9],Kn[10]=xl[10],Kn[11]=xl[11],Kn[12]=xl[12],Kn[13]=xl[13],Kn[14]=xl[14],Kn[15]=xl[15],Kn)),Uo=En.drwLayer,(!ta||_s!==Uo)&&(_s=Uo,Hr.uniform1f(Pt.location,Uo)),Bl=En.hiA,Hr.uniformMatrix4fv(Qe.location,!1,Array.isArray(Bl)||Bl instanceof Float32Array?Bl:(ns[0]=Bl[0],ns[1]=Bl[1],ns[2]=Bl[2],ns[3]=Bl[3],ns[4]=Bl[4],ns[5]=Bl[5],ns[6]=Bl[6],ns[7]=Bl[7],ns[8]=Bl[8],ns[9]=Bl[9],ns[10]=Bl[10],ns[11]=Bl[11],ns[12]=Bl[12],ns[13]=Bl[13],ns[14]=Bl[14],ns[15]=Bl[15],ns)),Il=En.hiB,Hr.uniformMatrix4fv(Xe.location,!1,Array.isArray(Il)||Il instanceof Float32Array?Il:(Jo[0]=Il[0],Jo[1]=Il[1],Jo[2]=Il[2],Jo[3]=Il[3],Jo[4]=Il[4],Jo[5]=Il[5],Jo[6]=Il[6],Jo[7]=Il[7],Jo[8]=Il[8],Jo[9]=Il[9],Jo[10]=Il[10],Jo[11]=Il[11],Jo[12]=Il[12],Jo[13]=Il[13],Jo[14]=Il[14],Jo[15]=Il[15],Jo)),Dl=En.hiC,Hr.uniformMatrix4fv(Tt.location,!1,Array.isArray(Dl)||Dl instanceof Float32Array?Dl:(vo[0]=Dl[0],vo[1]=Dl[1],vo[2]=Dl[2],vo[3]=Dl[3],vo[4]=Dl[4],vo[5]=Dl[5],vo[6]=Dl[6],vo[7]=Dl[7],vo[8]=Dl[8],vo[9]=Dl[9],vo[10]=Dl[10],vo[11]=Dl[11],vo[12]=Dl[12],vo[13]=Dl[13],vo[14]=Dl[14],vo[15]=Dl[15],vo)),oe=En.hiD,Hr.uniformMatrix4fv(xt.location,!1,Array.isArray(oe)||oe instanceof Float32Array?oe:(ma[0]=oe[0],ma[1]=oe[1],ma[2]=oe[2],ma[3]=oe[3],ma[4]=oe[4],ma[5]=oe[5],ma[6]=oe[6],ma[7]=oe[7],ma[8]=oe[8],ma[9]=oe[9],ma[10]=oe[10],ma[11]=oe[11],ma[12]=oe[12],ma[13]=oe[13],ma[14]=oe[14],ma[15]=oe[15],ma)),w=En.loA,Hr.uniformMatrix4fv(_t.location,!1,Array.isArray(w)||w instanceof Float32Array?w:(ja[0]=w[0],ja[1]=w[1],ja[2]=w[2],ja[3]=w[3],ja[4]=w[4],ja[5]=w[5],ja[6]=w[6],ja[7]=w[7],ja[8]=w[8],ja[9]=w[9],ja[10]=w[10],ja[11]=w[11],ja[12]=w[12],ja[13]=w[13],ja[14]=w[14],ja[15]=w[15],ja)),B=En.loB,Hr.uniformMatrix4fv(Ct.location,!1,Array.isArray(B)||B instanceof Float32Array?B:(To[0]=B[0],To[1]=B[1],To[2]=B[2],To[3]=B[3],To[4]=B[4],To[5]=B[5],To[6]=B[6],To[7]=B[7],To[8]=B[8],To[9]=B[9],To[10]=B[10],To[11]=B[11],To[12]=B[12],To[13]=B[13],To[14]=B[14],To[15]=B[15],To)),Q=En.loC,Hr.uniformMatrix4fv(jt.location,!1,Array.isArray(Q)||Q instanceof Float32Array?Q:(Ao[0]=Q[0],Ao[1]=Q[1],Ao[2]=Q[2],Ao[3]=Q[3],Ao[4]=Q[4],Ao[5]=Q[5],Ao[6]=Q[6],Ao[7]=Q[7],Ao[8]=Q[8],Ao[9]=Q[9],Ao[10]=Q[10],Ao[11]=Q[11],Ao[12]=Q[12],Ao[13]=Q[13],Ao[14]=Q[14],Ao[15]=Q[15],Ao)),ee=En.loD,Hr.uniformMatrix4fv(At.location,!1,Array.isArray(ee)||ee instanceof Float32Array?ee:(la[0]=ee[0],la[1]=ee[1],la[2]=ee[2],la[3]=ee[3],la[4]=ee[4],la[5]=ee[5],la[6]=ee[6],la[7]=ee[7],la[8]=ee[8],la[9]=ee[9],la[10]=ee[10],la[11]=ee[11],la[12]=ee[12],la[13]=ee[13],la[14]=ee[14],la[15]=ee[15],la)),le=En.maskHeight,(!ta||Ne!==le)&&(Ne=le,Hr.uniform1f(Te.location,le)),$e=En.maskTexture,$e&&$e._reglType==="framebuffer"&&($e=$e.color[0]),pt=$e._texture,Hr.uniform1i(nt.location,pt.bind()),zt=En.resolution,Yt=zt[0],yr=zt[1],(!ta||Jt!==Yt||Ir!==yr)&&(Jt=Yt,Ir=yr,Hr.uniform2f(rt.location,Yt,yr)),ce=En.viewBoxPos,Ae=ce[0],Ve=ce[1],(!ta||qe!==Ae||ot!==Ve)&&(qe=Ae,ot=Ve,Hr.uniform2f(je.location,Ae,Ve)),Ke=En.viewBoxSize,ft=Ke[0],Xt=Ke[1],(!ta||qt!==ft||$t!==Xt)&&(qt=ft,$t=Xt,Hr.uniform2f(tt.location,ft,Xt)),dr=En.offset,Mr=En.count,Mr&&(mi?Hr.drawElements(1,Mr,mi.type,dr<<(mi.type-5121>>1)):Hr.drawArrays(1,dr,Mr),na.viewportWidth=Vn,na.viewportHeight=Rn,pt.unbind())}ct.unbind(),un.dirty=!0,Ha.setVAO(null),un.profile=Ca}}}});var sUe=Se((G1r,oUe)=>{"use strict";var HVt=Q7e(),GVt=tUe(),WVt=iUe(),jVt=aUe();oUe.exports={"453a70fefa48db31713162aeb1ac438cb8579f54504f3b23acf32128df3dfd45":HVt,"30680f8f6712ef1af5cf7547e0af35b036fb300c67b07967cf448492ff4de4d0":GVt,a3970baf1d8cac9305ee830c7026550387343d4dde2353dd86a4d082c97d3470:WVt,"3fd666968f3ce90d1c048b7a9aab515f3ce387a5401a10f8b66121c9469d1c0d":jVt}});var fUe=Se((W1r,uUe)=>{"use strict";var lUe=RK(),ZVt=sUe();Object.assign(lUe.reglPrecompiled,ZVt);uUe.exports=lUe});var dUe=Se((j1r,hUe)=>{"use strict";var cUe=J7e();cUe.plot=fUe();hUe.exports=cUe});var FK=Se((Z1r,mUe)=>{"use strict";var vUe=vu().extendFlat,XVt=zf(),pUe=uc(),YVt=Xf(),yUe=Du().hovertemplateAttrs,KVt=Ec().attributes,JVt=vUe({editType:"calc"},YVt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:yUe({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});mUe.exports={domain:KVt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:vUe({},XVt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:yUe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),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:pUe({editType:"calc"}),tickfont:pUe({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:JVt,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 xUe=Se((X1r,_Ue)=>{"use strict";var _S=Zr(),$Vt=Dp().hasColorscale,QVt=ed(),eHt=Ec().defaults,tHt=Jd(),gUe=FK(),rHt=P9(),iHt=yp().isTypedArraySpec;function nHt(e,t,r,n,i){i("line.shape"),i("line.hovertemplate");var a=i("line.color",n.colorway[0]);if($Vt(e,"line")&&_S.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),QVt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function aHt(e,t){function r(l,f){return _S.coerce(e,t,gUe.dimensions,l,f)}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=_S.isArrayOrTypedArray(a)&&a.length>0||iHt(a),s;o&&(s="array");var u=r("categoryorder",s);u==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&u==="array"&&(t.categoryorder="trace")}}_Ue.exports=function(t,r,n,i){function a(l,f){return _S.coerce(t,r,gUe,l,f)}var o=tHt(t,r,{name:"dimensions",handleItemDefaults:aHt}),s=nHt(t,r,n,i,a);eHt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),rHt(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var u=i.font;_S.coerceFont(a,"labelfont",u,{overrideDflt:{size:Math.round(u.size)}}),_S.coerceFont(a,"tickfont",u,{autoShadowDflt:!0,overrideDflt:{size:Math.round(u.size/1.2)}})}});var wUe=Se((Y1r,bUe)=>{"use strict";var oHt=Km().wrap,sHt=Dp().hasColorscale,lHt=Rp(),uHt=eO(),fHt=yu(),Mk=Zr(),cHt=_u();bUe.exports=function(t,r){var n=Mk.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(v){var z;if(v.categoryorder==="trace")z=null;else if(v.categoryorder==="array")z=v.categoryarray;else{z=uHt(v.values);for(var T=!0,F=0;F<z.length;F++)if(!cHt(z[F])){T=!1;break}z.sort(T?Mk.sorterAsc:void 0),v.categoryorder==="category descending"&&(z=z.reverse())}return gHt(v.values,z)}),a,o,s;Mk.isArrayOrTypedArray(r.counts)?a=r.counts:a=[r.counts],_Ht(n),n.forEach(function(v,z){xHt(v,i[z])});var u=r.line,l;u?(sHt(r,"line")&&lHt(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),l=fHt.tryColorscale(u)):l=Mk.identity;function f(v){var z,T;return Mk.isArrayOrTypedArray(u.color)?(z=u.color[v%u.color.length],T=z):z=u.color,{color:l(z),rawColor:T}}var c=n[0].values.length,h={},d=i.map(function(v){return v.inds});s=0;var p,x;for(p=0;p<c;p++){var b=[];for(x=0;x<d.length;x++)b.push(d[x][p]);o=a[p%a.length],s+=o;var y=f(p),k=b+"-"+y.rawColor;h[k]===void 0&&(h[k]=yHt(b,y.color,y.rawColor)),mHt(h[k],p,o)}var E=n.map(function(v,z){return dHt(z,v._index,v._displayindex,v.label,s)});for(p=0;p<c;p++)for(o=a[p%a.length],x=0;x<E.length;x++){var A=E[x].containerInd,L=i[x].inds[p],_=E[x].categories;if(_[L]===void 0){var C=r.dimensions[A]._categoryarray[L],M=r.dimensions[A]._ticktext[L];_[L]=pHt(x,L,C,M)}vHt(_[L],p,o)}return oHt(hHt(E,h,s))};function hHt(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 dHt(e,t,r,n,i){return{dimensionInd:e,containerInd:t,displayInd:r,dimensionLabel:n,count:i,categories:[],dragX:null}}function pHt(e,t,r,n){return{dimensionInd:e,categoryInd:t,categoryValue:r,displayInd:t,categoryLabel:n,valueInds:[],count:0,dragY:null}}function vHt(e,t,r){e.valueInds.push(t),e.count+=r}function yHt(e,t,r){return{categoryInds:e,color:t,rawColor:r,valueInds:[],count:0}}function mHt(e,t,r){e.valueInds.push(t),e.count+=r}function gHt(e,t){t==null?t=[]:t=t.map(function(l){return l});var r={},n={},i=[];t.forEach(function(l,f){r[l]=0,n[l]=f});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 u=t.map(function(l){return r[l]});return{uniqueValues:t,uniqueCounts:u,inds:i}}function _Ht(e){var t=e.map(function(n){return n.displayindex}),r;if(bHt(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 xHt(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 bHt(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 zUe=Se((K1r,LUe)=>{"use strict";var Lf=Nl(),wHt=(I2(),ab(P2)).interpolateNumber,THt=qP(),Ck=jc(),mx=Zr(),Ek=mx.strTranslate,TUe=yu(),qK=cd(),AHt=Bf();function SHt(e,t,r,n){var i=t._context.staticPlot,a=e.map(NHt.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,u1),u=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(k){return Ek(k.x,k.y)}),u.append("g").attr("class","paths");var l=s.select("g.paths"),f=l.selectAll("path.path").data(function(k){return k.paths},u1);f.attr("fill",function(k){return k.model.color});var c=f.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(k){return k.model.color}).attr("fill-opacity",0);NK(c),f.attr("d",function(k){return k.svgD}),c.empty()||f.sort(BK),f.exit().remove(),f.on("mouseover",MHt).on("mouseout",EHt).on("click",kHt),u.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),d=h.selectAll("g.dimension").data(function(k){return k.dimensions},u1);d.enter().append("g").attr("class","dimension"),d.attr("transform",function(k){return Ek(k.x,0)}),d.exit().remove();var p=d.selectAll("g.category").data(function(k){return k.categories},u1),x=p.enter().append("g").attr("class","category");p.attr("transform",function(k){return Ek(0,k.y)}),x.append("rect").attr("class","catrect").attr("pointer-events","none"),p.select("rect.catrect").attr("fill","none").attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),SUe(x);var b=p.selectAll("rect.bandrect").data(function(k){return k.bands},u1);b.each(function(){mx.raiseToTop(this)}),b.attr("fill",function(k){return k.color});var y=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"}),VK(y),b.exit().remove(),x.append("text").attr("class","catlabel").attr("pointer-events","none"),p.select("text.catlabel").attr("text-anchor",function(k){return kk(k)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(k){return kk(k)?k.width+5:-5}).attr("y",function(k){return k.height/2}).text(function(k){return k.model.categoryLabel}).each(function(k){TUe.font(Lf.select(this),k.parcatsViewModel.categorylabelfont),AHt.convertToTspans(Lf.select(this),t)}),x.append("text").attr("class","dimlabel"),p.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){TUe.font(Lf.select(this),k.parcatsViewModel.labelfont)}),p.selectAll("rect.bandrect").on("mouseover",RHt).on("mouseout",FHt),p.exit().remove(),d.call(Lf.behavior.drag().origin(function(k){return{x:k.x,y:0}}).on("dragstart",qHt).on("drag",BHt).on("dragend",OHt)),s.each(function(k){k.traceSelection=Lf.select(this),k.pathSelection=Lf.select(this).selectAll("g.paths").selectAll("path.path"),k.dimensionSelection=Lf.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}LUe.exports=function(e,t,r,n){SHt(r,e,n,t)};function u1(e){return e.key}function kk(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function BK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor<t.model.rawColor?-1:0}function MHt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){mx.raiseToTop(this),UK(Lf.select(this));var t=Lk(e),r=OK(e);if(e.parcatsViewModel.graphDiv.emit("plotly_hover",{points:t,event:Lf.event,constraints:r}),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var n=Lf.mouse(this)[0],i=e.parcatsViewModel.graphDiv,a=e.parcatsViewModel.trace,o=i._fullLayout,s=o._paperdiv.node().getBoundingClientRect(),u=e.parcatsViewModel.graphDiv.getBoundingClientRect(),l,f,c;for(c=0;c<e.leftXs.length-1;c++)if(e.leftXs[c]+e.dimWidths[c]-2<=n&&n<=e.leftXs[c+1]+2){var h=e.parcatsViewModel.dimensions[c],d=e.parcatsViewModel.dimensions[c+1];l=(h.x+h.width+d.x)/2,f=(e.topYs[c]+e.topYs[c+1]+e.height)/2;break}var p=e.parcatsViewModel.x+l,x=e.parcatsViewModel.y+f,b=qK.mostReadable(e.model.color,["black","white"]),y=e.model.count,k=y/e.parcatsViewModel.model.count,E={countLabel:y,probabilityLabel:k.toFixed(3)},A=[];e.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&A.push(["Count:",E.countLabel].join(" ")),e.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&A.push(["P:",E.probabilityLabel].join(" "));var L=A.join("<br>"),_=Lf.mouse(i)[0];Ck.loneHover({trace:a,x:p-s.left+u.left,y:x-s.top+u.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:b,idealAlign:_<p?"right":"left",hovertemplate:(a.line||{}).hovertemplate,hovertemplateLabels:E,eventData:[{data:a._input,fullData:a,count:y,probability:k}]},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:i})}}}function EHt(e){if(!e.parcatsViewModel.dragDimension&&(NK(Lf.select(this)),Ck.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),e.parcatsViewModel.pathSelection.sort(BK),e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var t=Lk(e),r=OK(e);e.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:t,event:Lf.event,constraints:r})}}function Lk(e){for(var t=[],r=EUe(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 OK(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 kHt(e){if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Lk(e),r=OK(e);e.parcatsViewModel.graphDiv.emit("plotly_click",{points:t,event:Lf.event,constraints:r})}}function NK(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 UK(e){e.attr("fill-opacity",.8).attr("stroke",function(t){return qK.mostReadable(t.model.color,["black","white"])}).attr("stroke-width",.3)}function CHt(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function SUe(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function LHt(e){e.attr("stroke","black").attr("stroke-width",1.5)}function VK(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function Z9(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 zHt(e){var t=Lf.select(e.parentNode).selectAll("rect.bandrect");t.each(function(r){var n=Z9(r);UK(n),n.each(function(){mx.raiseToTop(this)})}),CHt(Lf.select(e.parentNode))}function PHt(e){var t=Lf.select(e).datum(),r=Z9(t);UK(r),r.each(function(){mx.raiseToTop(this)}),Lf.select(e.parentNode).selectAll("rect.bandrect").filter(function(n){return n.color===t.color}).each(function(){mx.raiseToTop(this),LHt(Lf.select(this))})}function HK(e,t,r){var n=Lf.select(e).datum(),i=n.categoryViewModel.model,a=n.parcatsViewModel.graphDiv,o=Lf.select(e.parentNode).selectAll("rect.bandrect"),s=[];o.each(function(l){var f=Z9(l);f.each(function(c){Array.prototype.push.apply(s,Lk(c))})});var u={};u[i.dimensionInd]=i.categoryValue,a.emit(t,{points:s,event:r,constraints:u})}function GK(e,t,r){var n=Lf.select(e).datum(),i=n.categoryViewModel.model,a=n.parcatsViewModel.graphDiv,o=Z9(n),s=[];o.each(function(l){Array.prototype.push.apply(s,Lk(l))});var u={};u[i.dimensionInd]=i.categoryValue,n.rawColor!==void 0&&(u.color=n.rawColor),a.emit(t,{points:s,event:r,constraints:u})}function MUe(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=Lf.select(r.parentNode).select("rect.catrect"),o=a.node().getBoundingClientRect(),s=a.datum(),u=s.parcatsViewModel,l=u.model.dimensions[s.model.dimensionInd],f=u.trace,c=o.top+o.height/2,h,d;u.dimensions.length>1&&l.displayInd===u.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var p=s.model.count,x=s.model.categoryLabel,b=p/s.parcatsViewModel.model.count,y={countLabel:p,categoryLabel:x,probabilityLabel:b.toFixed(3)},k=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&k.push(["Count:",y.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&k.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var E=k.join("<br>");return{trace:f,x:n*(h-t.left),y:i*(c-t.top),text:E,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:f.hovertemplate,hovertemplateLabels:y,eventData:[{data:f._input,fullData:f,count:p,category:x,probability:b}]}}function IHt(e,t,r){var n=[];return Lf.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var i=this;n.push(MUe(e,t,i))}),n}function DHt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=Lf.select(r).datum(),s=o.categoryViewModel,u=s.parcatsViewModel,l=u.model.dimensions[s.model.dimensionInd],f=u.trace,c=a.y+a.height/2,h,d;u.dimensions.length>1&&l.displayInd===u.dimensions.length-1?(h=a.left,d="left"):(h=a.left+a.width,d="right");var p=s.model.categoryLabel,x=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(z){z.color===o.color&&(b+=z.count)});var y=s.model.count,k=0;u.pathSelection.each(function(z){z.model.color===o.color&&(k+=z.model.count)});var E=b/x,A=b/k,L=b/y,_={countLabel:b,categoryLabel:p,probabilityLabel:E.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",_.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(C.push("P(color \u2229 "+p+"): "+_.probabilityLabel),C.push("P("+p+" | color): "+A.toFixed(3)),C.push("P(color | "+p+"): "+L.toFixed(3)));var M=C.join("<br>"),v=qK.mostReadable(o.color,["black","white"]);return{trace:f,x:n*(h-t.left),y:i*(c-t.top),text:M,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:v,fontSize:10,idealAlign:d,hovertemplate:f.hovertemplate,hovertemplateLabels:_,eventData:[{data:f._input,fullData:f,category:p,count:x,probability:E,categorycount:y,colorcount:k,bandcolorcount:b}]}}function RHt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Lf.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"?(PHt(o),GK(o,"plotly_hover",Lf.event)):(zHt(o),HK(o,"plotly_hover",Lf.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=MUe(r,i,o):a==="color"?s=DHt(r,i,o):a==="dimension"&&(s=IHt(r,i,o)),s&&Ck.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function FHt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(NK(t.pathSelection),SUe(t.dimensionSelection.selectAll("g.category")),VK(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),Ck.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(BK),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?GK(n,"plotly_unhover",Lf.event):HK(n,"plotly_unhover",Lf.event)}}function qHt(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,Lf.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Lf.mouse(this)[0],n=Lf.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,mx.raiseToTop(this.parentNode),Lf.select(this.parentNode).selectAll("rect.bandrect").each(function(i){i.y<n&&n<=i.y+i.height&&(e.potentialClickBand=this)}))}),e.parcatsViewModel.dragDimension=e,Ck.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function BHt(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+=Lf.event.dy;var o=a.model.dragY,s=a.model.displayInd,u=i.categories,l=u[s-1],f=u[s+1];l!==void 0&&o<l.y+l.height/2&&(a.model.displayInd=l.model.displayInd,l.model.displayInd=s),f!==void 0&&o+a.height>f.y+f.height/2&&(a.model.displayInd=f.model.displayInd,f.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){i.model.dragX=Lf.event.x;var c=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[n];c!==void 0&&i.model.dragX<c.x+c.width&&(i.model.displayInd=c.model.displayInd,c.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}jK(e.parcatsViewModel),WK(e.parcatsViewModel),CUe(e.parcatsViewModel),kUe(e.parcatsViewModel)}}function OHt(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Lf.select(this).selectAll("text").attr("font-weight","normal");var t={},r=EUe(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 p=e.parcatsViewModel.model.dimensions[d].containerInd;t["dimensions["+p+"].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}),u=s.map(function(h){return h.categoryValue}),l=s.map(function(h){return h.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[l],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?GK(e.potentialClickBand,"plotly_click",Lf.event.sourceEvent):HK(e.potentialClickBand,"plotly_click",Lf.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var f=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];f.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,jK(e.parcatsViewModel),WK(e.parcatsViewModel);var c=Lf.transition().duration(300).ease("cubic-in-out");c.each(function(){CUe(e.parcatsViewModel,!0),kUe(e.parcatsViewModel,!0)}).each("end",function(){(i||a)&&THt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function EUe(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 kUe(e,t){t===void 0&&(t=!1);function r(n){return t?n.transition():n}e.pathSelection.data(function(n){return n.paths},u1),r(e.pathSelection).attr("d",function(n){return n.svgD})}function CUe(e,t){t===void 0&&(t=!1);function r(u){return t?u.transition():u}e.dimensionSelection.data(function(u){return u.dimensions},u1);var n=e.dimensionSelection.selectAll("g.category").data(function(u){return u.categories},u1);r(e.dimensionSelection).attr("transform",function(u){return Ek(u.x,0)}),r(n).attr("transform",function(u){return Ek(0,u.y)});var i=n.select(".dimlabel");i.text(function(u,l){return l===0?u.parcatsViewModel.model.dimensions[u.model.dimensionInd].dimensionLabel:null});var a=n.select(".catlabel");a.attr("text-anchor",function(u){return kk(u)?"start":"end"}).attr("x",function(u){return kk(u)?u.width+5:-5}).each(function(u){var l,f;kk(u)?(l=u.width+5,f="start"):(l=-5,f="end"),Lf.select(this).selectAll("tspan").attr("x",l).attr("text-anchor",f)});var o=n.selectAll("rect.bandrect").data(function(u){return u.bands},u1),s=o.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(u){return u.color}).attr("fill-opacity",0);o.attr("fill",function(u){return u.color}).attr("width",function(u){return u.width}).attr("height",function(u){return u.height}).attr("y",function(u){return u.y}),VK(s),o.each(function(){mx.raiseToTop(this)}),o.exit().remove()}function NHt(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,u=t.height,l=Math.floor(s*(o.x[1]-o.x[0])),f=Math.floor(u*(o.y[1]-o.y[0])),c=o.x[0]*s+i.l,h=t.height-o.y[1]*t.height+i.t,d=a.line.shape,p;a.hoverinfo==="all"?p=["count","probability"]:p=(a.hoverinfo||"").split("+");var x={trace:a,key:a.uid,model:n,x:c,y:h,width:l,height:f,hoveron:a.hoveron,hoverinfoItems:p,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&&(jK(x),WK(x)),x}function AUe(e,t,r,n,i){var a=[],o=[],s,u;for(u=0;u<r.length-1;u++)s=wHt(r[u]+e[u],e[u+1]),a.push(s(i)),o.push(s(1-i));var l="M "+e[0]+","+t[0];for(l+="l"+r[0]+",0 ",u=1;u<r.length;u++)l+="C"+a[u-1]+","+t[u-1]+" "+o[u-1]+","+t[u]+" "+e[u]+","+t[u],l+="l"+r[u]+",0 ";for(l+="l0,"+n+" ",l+="l -"+r[r.length-1]+",0 ",u=r.length-2;u>=0;u--)l+="C"+o[u]+","+(t[u+1]+n)+" "+a[u]+","+(t[u]+n)+" "+(e[u]+r[u])+","+(t[u]+n),l+="l-"+r[u]+",0 ";return l+="Z",l}function WK(e){var t=e.dimensions,r=e.model,n=t.map(function(q){return q.categories.map(function(U){return U.y})}),i=e.model.dimensions.map(function(q){return q.categories.map(function(U){return U.displayInd})}),a=e.model.dimensions.map(function(q){return q.displayInd}),o=e.dimensions.map(function(q){return q.model.dimensionInd}),s=t.map(function(q){return q.x}),u=t.map(function(q){return q.width}),l=[];for(var f in r.paths)r.paths.hasOwnProperty(f)&&l.push(r.paths[f]);function c(q){var U=q.categoryInds.map(function(j,G){return i[G][j]}),H=o.map(function(j){return U[j]});return H}l.sort(function(q,U){var H=c(q),j=c(U);return e.sortpaths==="backward"&&(H.reverse(),j.reverse()),H.push(q.valueInds[0]),j.push(U.valueInds[0]),e.bundlecolors&&(H.unshift(q.rawColor),j.unshift(U.rawColor)),H<j?-1:H>j?1:0});for(var h=new Array(l.length),d=t[0].model.count,p=t[0].categories.map(function(q){return q.height}).reduce(function(q,U){return q+U}),x=0;x<l.length;x++){var b=l[x],y;d>0?y=p*(b.count/d):y=0;for(var k=new Array(n.length),E=0;E<b.categoryInds.length;E++){var A=b.categoryInds[E],L=i[E][A],_=a[E];k[_]=n[_][L],n[_][L]+=y;var C=e.dimensions[_].categories[L],M=C.bands.length,v=C.bands[M-1];if(v===void 0||b.rawColor!==v.rawColor){var z=v===void 0?0:v.y+v.height;C.bands.push({key:z,color:b.color,rawColor:b.rawColor,height:y,width:C.width,count:b.count,y:z,categoryViewModel:C,parcatsViewModel:e})}else{var T=C.bands[M-1];T.height+=y,T.count+=b.count}}var F;e.pathShape==="hspline"?F=AUe(s,k,u,y,.5):F=AUe(s,k,u,y,0),h[x]={key:b.valueInds[0],model:b,height:y,leftXs:s,topYs:k,dimWidths:u,svgD:F,parcatsViewModel:e}}e.paths=h}function jK(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(UHt(e,a))}e.dimensions=r}function UHt(e,t){var r=40,n=16,i=e.model.dimensions.length,a=t.displayInd,o,s,u;i>1?o=(e.width-2*r-n)/(i-1):o=0,s=r,u=s+o*a;var l=[],f=e.model.maxCats,c=t.categories.length,h=8,d=t.count,p=e.height-h*(f-1),x,b,y,k,E,A=(f-c)*h/2,L=t.categories.map(function(_){return{displayInd:_.displayInd,categoryInd:_.categoryInd}});for(L.sort(function(_,C){return _.displayInd-C.displayInd}),E=0;E<c;E++)k=L[E].categoryInd,b=t.categories[k],d>0?x=b.count/d*p:x=0,y={key:b.valueInds[0],model:b,width:n,height:x,y:b.dragY!==null?b.dragY:A,bands:[],parcatsViewModel:e},A=A+x+h,l.push(y);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:u,y:0,width:n,model:t,categories:l,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var ZK=Se((J1r,PUe)=>{"use strict";var VHt=zUe();PUe.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;VHt(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 DUe=Se(X9=>{"use strict";var HHt=Dd().getModuleCalcData,GHt=ZK(),IUe="parcats";X9.name=IUe;X9.plot=function(e,t,r,n){var i=HHt(e.calcdata,IUe);if(i.length){var a=i[0];GHt(e,a,r,n)}};X9.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 FUe=Se((Q1r,RUe)=>{"use strict";RUe.exports={attributes:FK(),supplyDefaults:xUe(),calc:wUe(),plot:ZK(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:DUe(),categories:["noOpacity"],meta:{}}});var BUe=Se((e_r,qUe)=>{"use strict";qUe.exports=FUe()});var f1=Se((t_r,WUe)=>{"use strict";var WHt=X1(),OUe="1.13.4",HUe='\xA9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',NUe=['\xA9 <a target="_blank" href="https://carto.com/">Carto</a>',HUe].join(" "),UUe=['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(" "),jHt=['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(" "),GUe={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:HUe,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:NUe,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:NUe,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:UUe,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:UUe,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:jHt,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"}},VUe=WHt(GUe);WUe.exports={requiredVersion:OUe,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:GUe,styleValuesNonMapbox:VUe,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@"+OUe+"."].join(`
`),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(`
`),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",VUe.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(`
`),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(`
`),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=Se((r_r,YUe)=>{"use strict";var jUe=Zr(),ZUe=Pl().defaultLine,ZHt=Ec().attributes,XHt=uc(),YHt=Zc().textposition,KHt=_c().overrideAll,JHt=_f().templatedArray,XK=f1(),XUe=XHt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});XUe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var $Ht=YUe.exports=KHt({_arrayAttrRegexps:[jUe.counterRegex("mapbox",".layers",!0)],domain:ZHt({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:XK.styleValuesMapbox.concat(XK.styleValuesNonMapbox),dflt:XK.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:JHt("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:ZUe},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:ZUe}},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:XUe,textposition:jUe.extendFlat({},YHt,{arrayOk:!1})}})},"plot","from-root");$Ht.uirevision={valType:"any",editType:"none"}});var Y9=Se((i_r,$Ue)=>{"use strict";var QHt=Du().hovertemplateAttrs,eGt=Du().texttemplateAttrs,tGt=Ey(),Pk=H2(),xS=Zc(),KUe=zk(),rGt=zf(),iGt=Xf(),ew=vu().extendFlat,nGt=_c().overrideAll,aGt=zk(),JUe=Pk.line,bS=Pk.marker;$Ue.exports=nGt({lon:Pk.lon,lat:Pk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:ew({},aGt.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:ew({},bS.opacity,{dflt:1})},mode:ew({},xS.mode,{dflt:"markers"}),text:ew({},xS.text,{}),texttemplate:eGt({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:ew({},xS.hovertext,{}),line:{color:JUe.color,width:JUe.width},connectgaps:xS.connectgaps,marker:ew({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:bS.opacity,size:bS.size,sizeref:bS.sizeref,sizemin:bS.sizemin,sizemode:bS.sizemode},iGt("marker")),fill:Pk.fill,fillcolor:tGt(),textfont:KUe.layers.symbol.textfont,textposition:KUe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:xS.selected.marker},unselected:{marker:xS.unselected.marker},hoverinfo:ew({},rGt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:QHt()},"calc","nested")});var YK=Se((n_r,QUe)=>{"use strict";var oGt=["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"];QUe.exports={isSupportedFont:function(e){return oGt.indexOf(e)!==-1}}});var rVe=Se((a_r,tVe)=>{"use strict";var Ik=Zr(),KK=ec(),sGt=$v(),lGt=I0(),uGt=D0(),fGt=Py(),eVe=Y9(),cGt=YK().isSupportedFont;tVe.exports=function(t,r,n,i){function a(y,k){return Ik.coerce(t,r,eVe,y,k)}function o(y,k){return Ik.coerce2(t,r,eVe,y,k)}var s=hGt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("hovertext"),a("hovertemplate"),a("mode"),a("below"),KK.hasMarkers(r)){sGt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var u=r.marker;u.symbol!=="circle"&&(Ik.isArrayOrTypedArray(u.size)&&(u.size=u.size[0]),Ik.isArrayOrTypedArray(u.color)&&(u.color=u.color[0]))}KK.hasLines(r)&&(lGt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var l=o("cluster.maxzoom"),f=o("cluster.step"),c=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),p=l!==!1||f!==!1||c!==!1||h!==!1||d!==!1,x=a("cluster.enabled",p);if(x||KK.hasText(r)){var b=i.font.family;uGt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:cGt(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"&&fGt(t,r,n,a),Ik.coerceSelectionMarkerOpacity(r,a)};function hGt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var JK=Se((o_r,nVe)=>{"use strict";var iVe=hu();nVe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=iVe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=iVe.tickText(o,o.c2l(s[1]),!0).text,i}});var $K=Se((s_r,oVe)=>{"use strict";var aVe=Zr();oVe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=aVe.isArrayOrTypedArray(r)?aVe.mean(r):r,s=.5+o/100,u=1.5+o/100,l=["",""],f=[0,0];switch(i){case"top":l[0]="top",f[1]=-u;break;case"bottom":l[0]="bottom",f[1]=u;break}switch(a){case"left":l[1]="right",f[0]=-s;break;case"right":l[1]="left",f[0]=s;break}var c;return l[0]&&l[1]?c=l.join("-"):l[0]?c=l[0]:l[1]?c=l[1]:c="center",{anchor:c,offset:f}}});var hVe=Se((l_r,cVe)=>{"use strict";var uVe=_u(),sp=Zr(),dGt=ju().BADNUM,J9=tx(),sVe=fc(),pGt=yu(),vGt=S3(),$9=ec(),yGt=YK().isSupportedFont,mGt=$K(),gGt=rv().appendArrayPointValue,_Gt=Bf().NEWLINES,xGt=Bf().BR_TAG_ALL;cVe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=$9.hasLines(n),s=$9.hasMarkers(n),u=$9.hasText(n),l=s&&n.marker.symbol==="circle",f=s&&n.marker.symbol!=="circle",c=n.cluster&&n.cluster.enabled,h=K9("fill"),d=K9("line"),p=K9("circle"),x=K9("symbol"),b={fill:h,line:d,circle:p,symbol:x};if(!i)return b;var y;if((a||o)&&(y=J9.calcTraceToLineCoords(r)),a&&(h.geojson=J9.makePolygon(y),h.layout.visibility="visible",sp.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=J9.makeLine(y),d.layout.visibility="visible",sp.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),l){var k=bGt(r);p.geojson=k.geojson,p.layout.visibility="visible",c&&(p.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":eJ(n.cluster.color,n.cluster.step),"circle-radius":eJ(n.cluster.size,n.cluster.step),"circle-opacity":eJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":lVe(n),"text-size":12}}),sp.extendFlat(p.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(l&&c&&(p.filter=["!",["has","point_count"]]),(f||u)&&(x.geojson=wGt(r,t),sp.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),f&&(sp.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&sp.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,sp.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),u)){var E=(n.marker||{}).size,A=mGt(n.textposition,E);sp.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":A.anchor,"text-offset":A.offset,"text-font":lVe(n)}),sp.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function K9(e){return{type:e,geojson:J9.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function bGt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=sp.isArrayOrTypedArray(r.color),a=sp.isArrayOrTypedArray(r.size),o=sp.isArrayOrTypedArray(r.opacity),s;function u(E){return t.opacity*E}function l(E){return E/2}var f;i&&(sVe.hasColorscale(t,"marker")?f=sVe.makeColorScaleFuncFromTrace(r):f=sp.identity);var c;a&&(c=vGt(t));var h;o&&(h=function(E){var A=uVe(E)?+sp.constrain(E,0,1):0;return u(A)});var d=[];for(s=0;s<e.length;s++){var p=e[s],x=p.lonlat;if(!fVe(x)){var b={};f&&(b.mcc=p.mcc=f(p.mc)),c&&(b.mrc=p.mrc=c(p.ms)),h&&(b.mo=h(p.mo)),n&&(b.selected=p.selected||0),d.push({type:"Feature",id:s+1,geometry:{type:"Point",coordinates:x},properties:b})}}var y;if(n)for(y=pGt.makeSelectedPointStyleFns(t),s=0;s<d.length;s++){var k=d[s].properties;y.selectedOpacityFn&&(k.mo=u(y.selectedOpacityFn(k))),y.selectedColorFn&&(k.mcc=y.selectedColorFn(k)),y.selectedSizeFn&&(k.mrc=y.selectedSizeFn(k))}return{geojson:{type:"FeatureCollection",features:d},mcc:i||y&&y.selectedColorFn?{type:"identity",property:"mcc"}:r.color,mrc:a||y&&y.selectedSizeFn?{type:"identity",property:"mrc"}:l(r.size),mo:o||y&&y.selectedOpacityFn?{type:"identity",property:"mo"}:u(r.opacity)}}function wGt(e,t){for(var r=t._fullLayout,n=e[0].trace,i=n.marker||{},a=i.symbol,o=i.angle,s=a!=="circle"?QK(a):Q9,u=o!=="auto"?QK(o,!0):Q9,l=$9.hasText(n)?QK(n.text):Q9,f=[],c=0;c<e.length;c++){var h=e[c];if(!fVe(h.lonlat)){var d=n.texttemplate,p;if(d){var x=Array.isArray(d)?d[c]||"":d,b=n._module.formatLabels(h,n,r),y={};gGt(y,n,h.i);var k=n._meta||{};p=sp.texttemplateString(x,b,r._d3locale,y,h,k)}else p=l(c);p&&(p=p.replace(_Gt,"").replace(xGt,`
`)),f.push({type:"Feature",geometry:{type:"Point",coordinates:h.lonlat},properties:{symbol:s(c),angle:u(c),text:p}})}}return{type:"FeatureCollection",features:f}}function QK(e,t){return sp.isArrayOrTypedArray(e)?t?function(r){return uVe(e[r])?+e[r]:0}:function(r){return e[r]}:e?function(){return e}:Q9}function Q9(){return""}function fVe(e){return e[0]===dGt}function eJ(e,t){var r;if(sp.isArrayOrTypedArray(e)&&sp.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 lVe(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"),yGt(s)||(s=r);var u=s.split(", ");return u}});var yVe=Se((u_r,vVe)=>{"use strict";var TGt=Zr(),dVe=hVe(),wS=f1().traceLayerPrefix,ry={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function pVe(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:wS+t+"-fill",line:wS+t+"-line",circle:wS+t+"-circle",symbol:wS+t+"-symbol",cluster:wS+t+"-cluster",clusterCount:wS+t+"-cluster-count"},this.below=null}var Dk=pVe.prototype;Dk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&TGt.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)};Dk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Dk.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)};Dk.update=function(t){var r=t[0].trace,n=this.subplot,i=n.map,a=dVe(n.gd,t),o=n.belowLookup["trace-"+this.uid],s=!!(r.cluster&&r.cluster.enabled),u=!!this.clusterEnabled,l=this;function f(E){E||l.addSource("circle",a.circle,r.cluster);for(var A=ry.cluster,L=0;L<A.length;L++){var _=A[L],C=a[_];l.addLayer(_,C,o)}}function c(E){for(var A=ry.cluster,L=A.length-1;L>=0;L--){var _=A[L];i.removeLayer(l.layerIds[_])}E||i.removeSource(l.sourceIds.circle)}function h(E){for(var A=ry.nonCluster,L=0;L<A.length;L++){var _=A[L],C=a[_];E||l.addSource(_,C),l.addLayer(_,C,o)}}function d(E){for(var A=ry.nonCluster,L=A.length-1;L>=0;L--){var _=A[L];i.removeLayer(l.layerIds[_]),E||i.removeSource(l.sourceIds[_])}}function p(E){u?c(E):d(E)}function x(E){s?f(E):h(E)}function b(){for(var E=s?ry.cluster:ry.nonCluster,A=0;A<E.length;A++){var L=E[A],_=a[L];_&&(n.setOptions(l.layerIds[L],"setLayoutProperty",_.layout),_.layout.visibility==="visible"&&(L!=="cluster"&&l.setSourceData(L,_),n.setOptions(l.layerIds[L],"setPaintProperty",_.paint)))}}var y=this.isHidden,k=r.visible!==!0;k?y||p():y?k||x():u!==s?(p(),x()):(this.below!==o&&(p(!0),x(!0)),b()),this.clusterEnabled=s,this.isHidden=k,this.below=o,t[0].trace._glTrace=this};Dk.dispose=function(){for(var t=this.subplot.map,r=this.clusterEnabled?ry.cluster:ry.nonCluster,n=r.length-1;n>=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};vVe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new pVe(t,n.uid,i,a),s=dVe(t.gd,r),u=o.below=t.belowLookup["trace-"+n.uid],l,f,c;if(i)for(o.addSource("circle",s.circle,n.cluster),l=0;l<ry.cluster.length;l++)f=ry.cluster[l],c=s[f],o.addLayer(f,c,u);else for(l=0;l<ry.nonCluster.length;l++)f=ry.nonCluster[l],c=s[f],o.addSource(f,c,n.cluster),o.addLayer(f,c,u);return r[0].trace._glTrace=o,o}});var eq=Se((f_r,gVe)=>{"use strict";var AGt=jc(),tJ=Zr(),SGt=oT(),MGt=tJ.fillText,EGt=ju().BADNUM,kGt=f1().traceLayerPrefix;function CGt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,u=[],l=kGt+i.uid+"-circle",f=i.cluster&&i.cluster.enabled;if(f){var c=s.map.queryRenderedFeatures(null,{layers:[l]});u=c.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,p=t-d;function x(M){var v=M.lonlat;if(v[0]===EGt||f&&u.indexOf(M.i+1)===-1)return 1/0;var z=tJ.modHalf(v[0],360),T=v[1],F=s.project([z,T]),q=F.x-a.c2p([p,T]),U=F.y-o.c2p([z,r]),H=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(q*q+U*U)-H,1-3/H)}if(AGt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],y=b.lonlat,k=[tJ.modHalf(y[0],360)+d,y[1]],E=a.c2p(k),A=o.c2p(k),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=A-L,e.y1=A+L;var _={};_[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,_);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=SGt(i,b),e.extraText=mVe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function mVe(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,u=t.lonlat,l=[];function f(c){return c+"\xB0"}return a||o&&s?l.push("("+f(u[1])+", "+f(u[0])+")"):o?l.push(r.lon+f(u[0])):s&&l.push(r.lat+f(u[1])),(a||i.indexOf("text")!==-1)&&MGt(t,e,l),l.join("<br>")}gVe.exports={hoverPoints:CGt,getExtraText:mVe}});var xVe=Se((c_r,_Ve)=>{"use strict";_Ve.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var wVe=Se((h_r,bVe)=>{"use strict";var LGt=Zr(),zGt=ec(),PGt=ju().BADNUM;bVe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u;if(!zGt.hasMarkers(s))return[];if(r===!1)for(u=0;u<n.length;u++)n[u].selected=0;else for(u=0;u<n.length;u++){var l=n[u],f=l.lonlat;if(f[0]!==PGt){var c=[LGt.modHalf(f[0],360),f[1]],h=[i.c2p(c),a.c2p(c)];r.contains(h,null,u,t)?(o.push({pointNumber:u,lon:f[0],lat:f[1]}),l.selected=1):l.selected=0}}return o}});var nJ=Se((rJ,iJ)=>{(function(e,t){typeof rJ=="object"&&typeof iJ!="undefined"?iJ.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.mapboxgl=t())})(rJ,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,g){return g={exports:{}},m(g,g.exports),g.exports}var o="1.13.4",s=u;function u(m,g,P,V){this.cx=3*m,this.bx=3*(P-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*g,this.by=3*(V-g)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=V,this.p2x=P,this.p2y=V}u.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},u.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},u.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},u.prototype.solveCurveX=function(m,g){typeof g=="undefined"&&(g=1e-6);var P,V,J,ae,ve;for(J=m,ve=0;ve<8;ve++){if(ae=this.sampleCurveX(J)-m,Math.abs(ae)<g)return J;var Ge=this.sampleCurveDerivativeX(J);if(Math.abs(Ge)<1e-6)break;J=J-ae/Ge}if(P=0,V=1,J=m,J<P)return P;if(J>V)return V;for(;P<V;){if(ae=this.sampleCurveX(J),Math.abs(ae-m)<g)return J;m>ae?P=J:V=J,J=(V-P)*.5+P}return J},u.prototype.solve=function(m,g){return this.sampleCurveY(this.solveCurveX(m,g))};var l=f;function f(m,g){this.x=m,this.y=g}f.prototype={clone:function(){return new f(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,g){return this.clone()._rotateAround(m,g)},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 g=m.x-this.x,P=m.y-this.y;return g*g+P*P},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,g){return Math.atan2(this.x*g-this.y*m,this.x*m+this.y*g)},_matMult:function(m){var g=m[0]*this.x+m[1]*this.y,P=m[2]*this.x+m[3]*this.y;return this.x=g,this.y=P,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 g=Math.cos(m),P=Math.sin(m),V=g*this.x-P*this.y,J=P*this.x+g*this.y;return this.x=V,this.y=J,this},_rotateAround:function(m,g){var P=Math.cos(m),V=Math.sin(m),J=g.x+P*(this.x-g.x)-V*(this.y-g.y),ae=g.y+V*(this.x-g.x)+P*(this.y-g.y);return this.x=J,this.y=ae,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},f.convert=function(m){return m instanceof f?m:Array.isArray(m)?new f(m[0],m[1]):m};var c=typeof self!="undefined"?self:{};function h(m,g){if(Array.isArray(m)){if(!Array.isArray(g)||m.length!==g.length)return!1;for(var P=0;P<m.length;P++)if(!h(m[P],g[P]))return!1;return!0}if(typeof m=="object"&&m!==null&&g!==null){if(typeof g!="object")return!1;var V=Object.keys(m);if(V.length!==Object.keys(g).length)return!1;for(var J in m)if(!h(m[J],g[J]))return!1;return!0}return m===g}var d=Math.pow(2,53)-1;function p(m){if(m<=0)return 0;if(m>=1)return 1;var g=m*m,P=g*m;return 4*(m<.5?P:3*(m-g)+P-.75)}function x(m,g,P,V){var J=new s(m,g,P,V);return function(ae){return J.solve(ae)}}var b=x(.25,.1,.25,1);function y(m,g,P){return Math.min(P,Math.max(g,m))}function k(m,g,P){var V=P-g,J=((m-g)%V+V)%V+g;return J===g?P:J}function E(m,g,P){if(!m.length)return P(null,[]);var V=m.length,J=new Array(m.length),ae=null;m.forEach(function(ve,Ge){g(ve,function(yt,kt){yt&&(ae=yt),J[Ge]=kt,--V===0&&P(ae,J)})})}function A(m){var g=[];for(var P in m)g.push(m[P]);return g}function L(m,g){var P=[];for(var V in m)V in g||P.push(V);return P}function _(m){for(var g=[],P=arguments.length-1;P-- >0;)g[P]=arguments[P+1];for(var V=0,J=g;V<J.length;V+=1){var ae=J[V];for(var ve in ae)m[ve]=ae[ve]}return m}function C(m,g){for(var P={},V=0;V<g.length;V++){var J=g[V];J in m&&(P[J]=m[J])}return P}var M=1;function v(){return M++}function z(){function m(g){return g?(g^Math.random()*16>>g/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,m)}return m()}function T(m){return m<=1?1:Math.pow(2,Math.ceil(Math.log(m)/Math.LN2))}function F(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 q(m,g){m.forEach(function(P){g[P]&&(g[P]=g[P].bind(g))})}function U(m,g){return m.indexOf(g,m.length-g.length)!==-1}function H(m,g,P){var V={};for(var J in m)V[J]=g.call(P||this,m[J],J,m);return V}function j(m,g,P){var V={};for(var J in m)g.call(P||this,m[J],J,m)&&(V[J]=m[J]);return V}function G(m){return Array.isArray(m)?m.map(G):typeof m=="object"&&m?H(m,G):m}function O(m,g){for(var P=0;P<m.length;P++)if(g.indexOf(m[P])>=0)return!0;return!1}var W={};function re(m){W[m]||(typeof console!="undefined"&&console.warn(m),W[m]=!0)}function ne(m,g,P){return(P.y-m.y)*(g.x-m.x)>(g.y-m.y)*(P.x-m.x)}function be(m){for(var g=0,P=0,V=m.length,J=V-1,ae=void 0,ve=void 0;P<V;J=P++)ae=m[P],ve=m[J],g+=(ve.x-ae.x)*(ae.y+ve.y);return g}function ze(m){var g=m[0],P=m[1],V=m[2];return P+=90,P*=Math.PI/180,V*=Math.PI/180,{x:g*Math.cos(P)*Math.sin(V),y:g*Math.sin(P)*Math.sin(V),z:g*Math.cos(V)}}function Ce(){return typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope}function he(m){var g=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,P={};if(m.replace(g,function(J,ae,ve,Ge){var yt=ve||Ge;return P[ae]=yt?yt.toLowerCase():!0,""}),P["max-age"]){var V=parseInt(P["max-age"],10);isNaN(V)?delete P["max-age"]:P["max-age"]=V}return P}var te=null;function ke(m){if(te==null){var g=m.navigator?m.navigator.userAgent:null;te=!!m.safari||!!(g&&(/\b(iPad|iPhone|iPod)\b/.test(g)||g.match("Safari")&&!g.match("Chrome")))}return te}function Ee(m){try{var g=c[m];return g.setItem("_mapbox_test_",1),g.removeItem("_mapbox_test_"),!0}catch(P){return!1}}function Me(m){return c.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(g,P){return String.fromCharCode(+("0x"+P))}))}function Oe(m){return decodeURIComponent(c.atob(m).split("").map(function(g){return"%"+("00"+g.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var Re=c.performance&&c.performance.now?c.performance.now.bind(c.performance):Date.now.bind(Date),me=c.requestAnimationFrame||c.mozRequestAnimationFrame||c.webkitRequestAnimationFrame||c.msRequestAnimationFrame,Be=c.cancelAnimationFrame||c.mozCancelAnimationFrame||c.webkitCancelAnimationFrame||c.msCancelAnimationFrame,fe,Ze,et={now:Re,frame:function(g){var P=me(g);return{cancel:function(){return Be(P)}}},getImageData:function(g,P){P===void 0&&(P=0);var V=c.document.createElement("canvas"),J=V.getContext("2d");if(!J)throw new Error("failed to create canvas 2d context");return V.width=g.width,V.height=g.height,J.drawImage(g,0,0,g.width,g.height),J.getImageData(-P,-P,g.width+2*P,g.height+2*P)},resolveURL:function(g){return fe||(fe=c.document.createElement("a")),fe.href=g,fe.href},hardwareConcurrency:c.navigator&&c.navigator.hardwareConcurrency||4,get devicePixelRatio(){return c.devicePixelRatio},get prefersReducedMotion(){return c.matchMedia?(Ze==null&&(Ze=c.matchMedia("(prefers-reduced-motion: reduce)")),Ze.matches):!1}},gt={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},Pt={supported:!1,testSupport:_t},Qe,Xe=!1,Tt,xt=!1;c.document&&(Tt=c.document.createElement("img"),Tt.onload=function(){Qe&&Ct(Qe),Qe=null,xt=!0},Tt.onerror=function(){Xe=!0,Qe=null},Tt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function _t(m){Xe||!Tt||(xt?Ct(m):Qe=m)}function Ct(m){var g=m.createTexture();m.bindTexture(m.TEXTURE_2D,g);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,Tt),m.isContextLost())return;Pt.supported=!0}catch(P){}m.deleteTexture(g),Xe=!0}var jt="01";function At(){for(var m="1",g="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",P="",V=0;V<10;V++)P+=g[Math.floor(Math.random()*62)];var J=12*60*60*1e3,ae=[m,jt,P].join(""),ve=Date.now()+J;return{token:ae,tokenExpiresAt:ve}}var Te=function(g,P){this._transformRequestFn=g,this._customAccessToken=P,this._createSkuToken()};Te.prototype._createSkuToken=function(){var g=At();this._skuToken=g.token,this._skuTokenExpiresAt=g.tokenExpiresAt},Te.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Te.prototype.transformRequest=function(g,P){return this._transformRequestFn?this._transformRequestFn(g,P)||{url:g}:{url:g}},Te.prototype.normalizeStyleURL=function(g,P){if(!nt(g))return g;var V=Je(g);return V.path="/styles/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||P)},Te.prototype.normalizeGlyphsURL=function(g,P){if(!nt(g))return g;var V=Je(g);return V.path="/fonts/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||P)},Te.prototype.normalizeSourceURL=function(g,P){if(!nt(g))return g;var V=Je(g);return V.path="/v4/"+V.authority+".json",V.params.push("secure"),this._makeAPIURL(V,this._customAccessToken||P)},Te.prototype.normalizeSpriteURL=function(g,P,V,J){var ae=Je(g);return nt(g)?(ae.path="/styles/v1"+ae.path+"/sprite"+P+V,this._makeAPIURL(ae,this._customAccessToken||J)):(ae.path+=""+P+V,Mt(ae))},Te.prototype.normalizeTileURL=function(g,P){if(this._isSkuTokenExpired()&&this._createSkuToken(),g&&!nt(g))return g;var V=Je(g),J=/(\.(png|jpg)\d*)(?=$)/,ae=/^.+\/v4\//,ve=et.devicePixelRatio>=2||P===512?"@2x":"",Ge=Pt.supported?".webp":"$1";V.path=V.path.replace(J,""+ve+Ge),V.path=V.path.replace(ae,"/"),V.path="/v4"+V.path;var yt=this._customAccessToken||je(V.params)||gt.ACCESS_TOKEN;return gt.REQUIRE_ACCESS_TOKEN&&yt&&this._skuToken&&V.params.push("sku="+this._skuToken),this._makeAPIURL(V,yt)},Te.prototype.canonicalizeTileURL=function(g,P){var V="/v4/",J=/\.[\w]+$/,ae=Je(g);if(!ae.path.match(/(^\/v4\/)/)||!ae.path.match(J))return g;var ve="mapbox://tiles/";ve+=ae.path.replace(V,"");var Ge=ae.params;return P&&(Ge=Ge.filter(function(yt){return!yt.match(/^access_token=/)})),Ge.length&&(ve+="?"+Ge.join("&")),ve},Te.prototype.canonicalizeTileset=function(g,P){for(var V=P?nt(P):!1,J=[],ae=0,ve=g.tiles||[];ae<ve.length;ae+=1){var Ge=ve[ae];ct(Ge)?J.push(this.canonicalizeTileURL(Ge,V)):J.push(Ge)}return J},Te.prototype._makeAPIURL=function(g,P){var V="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",J=Je(gt.API_URL);if(g.protocol=J.protocol,g.authority=J.authority,g.protocol==="http"){var ae=g.params.indexOf("secure");ae>=0&&g.params.splice(ae,1)}if(J.path!=="/"&&(g.path=""+J.path+g.path),!gt.REQUIRE_ACCESS_TOKEN)return Mt(g);if(P=P||gt.ACCESS_TOKEN,!P)throw new Error("An API access token is required to use Mapbox GL. "+V);if(P[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+V);return g.params=g.params.filter(function(ve){return ve.indexOf("access_token")===-1}),g.params.push("access_token="+P),Mt(g)};function nt(m){return m.indexOf("mapbox:")===0}var ut=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function ct(m){return ut.test(m)}function rt(m){return m.indexOf("sku=")>0&&ct(m)}function je(m){for(var g=0,P=m;g<P.length;g+=1){var V=P[g],J=V.match(/^access_token=(.*)$/);if(J)return J[1]}return null}var tt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Je(m){var g=m.match(tt);if(!g)throw new Error("Unable to parse URL object");return{protocol:g[1],authority:g[2],path:g[3]||"/",params:g[4]?g[4].split("&"):[]}}function Mt(m){var g=m.params.length?"?"+m.params.join("&"):"";return m.protocol+"://"+m.authority+m.path+g}var Vt="mapbox.eventData";function Kt(m){if(!m)return null;var g=m.split(".");if(!g||g.length!==3)return null;try{var P=JSON.parse(Oe(g[1]));return P}catch(V){return null}}var ir=function(g){this.type=g,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};ir.prototype.getStorageKey=function(g){var P=Kt(gt.ACCESS_TOKEN),V="";return P&&P.u?V=Me(P.u):V=gt.ACCESS_TOKEN||"",g?Vt+"."+g+":"+V:Vt+":"+V},ir.prototype.fetchEventData=function(){var g=Ee("localStorage"),P=this.getStorageKey(),V=this.getStorageKey("uuid");if(g)try{var J=c.localStorage.getItem(P);J&&(this.eventData=JSON.parse(J));var ae=c.localStorage.getItem(V);ae&&(this.anonId=ae)}catch(ve){re("Unable to read from LocalStorage")}},ir.prototype.saveEventData=function(){var g=Ee("localStorage"),P=this.getStorageKey(),V=this.getStorageKey("uuid");if(g)try{c.localStorage.setItem(V,this.anonId),Object.keys(this.eventData).length>=1&&c.localStorage.setItem(P,JSON.stringify(this.eventData))}catch(J){re("Unable to write to LocalStorage")}},ir.prototype.processRequests=function(g){},ir.prototype.postEvent=function(g,P,V,J){var ae=this;if(gt.EVENTS_URL){var ve=Je(gt.EVENTS_URL);ve.params.push("access_token="+(J||gt.ACCESS_TOKEN||""));var Ge={event:this.type,created:new Date(g).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:o,skuId:jt,userId:this.anonId},yt=P?_(Ge,P):Ge,kt={url:Mt(ve),headers:{"Content-Type":"text/plain"},body:JSON.stringify([yt])};this.pendingRequest=Tr(kt,function(Ut){ae.pendingRequest=null,V(Ut),ae.saveEventData(),ae.processRequests(J)})}},ir.prototype.queueRequest=function(g,P){this.queue.push(g),this.processRequests(P)};var fr=function(m){function g(){m.call(this,"map.load"),this.success={},this.skuToken=""}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.postMapLoadEvent=function(V,J,ae,ve){this.skuToken=ae,(gt.EVENTS_URL&&ve||gt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(Ge){return nt(Ge)||ct(Ge)}))&&this.queueRequest({id:J,timestamp:Date.now()},ve)},g.prototype.processRequests=function(V){var J=this;if(!(this.pendingRequest||this.queue.length===0)){var ae=this.queue.shift(),ve=ae.id,Ge=ae.timestamp;ve&&this.success[ve]||(this.anonId||this.fetchEventData(),F(this.anonId)||(this.anonId=z()),this.postEvent(Ge,{skuToken:this.skuToken},function(yt){yt||ve&&(J.success[ve]=!0)},V))}},g}(ir),Ot=function(m){function g(P){m.call(this,"appUserTurnstile"),this._customAccessToken=P}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.postTurnstileEvent=function(V,J){gt.EVENTS_URL&&gt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(ae){return nt(ae)||ct(ae)})&&this.queueRequest(Date.now(),J)},g.prototype.processRequests=function(V){var J=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ae=Kt(gt.ACCESS_TOKEN),ve=ae?ae.u:gt.ACCESS_TOKEN,Ge=ve!==this.eventData.tokenU;F(this.anonId)||(this.anonId=z(),Ge=!0);var yt=this.queue.shift();if(this.eventData.lastSuccess){var kt=new Date(this.eventData.lastSuccess),Ut=new Date(yt),lr=(yt-this.eventData.lastSuccess)/(24*60*60*1e3);Ge=Ge||lr>=1||lr<-1||kt.getDate()!==Ut.getDate()}else Ge=!0;if(!Ge)return this.processRequests();this.postEvent(yt,{"enabled.telemetry":!1},function(kr){kr||(J.eventData.lastSuccess=yt,J.eventData.tokenU=ve)},V)}},g}(ir),De=new Ot,_e=De.postTurnstileEvent.bind(De),Fe=new fr,Pe=Fe.postMapLoadEvent.bind(Fe),Ie="mapbox-tiles",lt=500,ye=50,ue=1e3*60*7,de;function ht(){c.caches&&!de&&(de=c.caches.open(Ie))}var Et;function St(m,g){if(Et===void 0)try{new Response(new ReadableStream),Et=!0}catch(P){Et=!1}Et?g(m.body):m.blob().then(g)}function Zt(m,g,P){if(ht(),!!de){var V={status:g.status,statusText:g.statusText,headers:new c.Headers};g.headers.forEach(function(ve,Ge){return V.headers.set(Ge,ve)});var J=he(g.headers.get("Cache-Control")||"");if(!J["no-store"]){J["max-age"]&&V.headers.set("Expires",new Date(P+J["max-age"]*1e3).toUTCString());var ae=new Date(V.headers.get("Expires")).getTime()-P;ae<ue||St(g,function(ve){var Ge=new c.Response(ve,V);ht(),de&&de.then(function(yt){return yt.put(qr(m.url),Ge)}).catch(function(yt){return re(yt.message)})})}}}function qr(m){var g=m.indexOf("?");return g<0?m:m.slice(0,g)}function Lr(m,g){if(ht(),!de)return g(null);var P=qr(m.url);de.then(function(V){V.match(P).then(function(J){var ae=vr(J);V.delete(P),ae&&V.put(P,J.clone()),g(null,J,ae)}).catch(g)}).catch(g)}function vr(m){if(!m)return!1;var g=new Date(m.headers.get("Expires")||0),P=he(m.headers.get("Cache-Control")||"");return g>Date.now()&&!P["no-cache"]}var Er=1/0;function si(m){Er++,Er>ye&&(m.getActor().send("enforceCacheSizeLimit",lt),Er=0)}function Ei(m){ht(),de&&de.then(function(g){g.keys().then(function(P){for(var V=0;V<P.length-m;V++)g.delete(P[V])})})}function Si(m){var g=c.caches.delete(Ie);m&&g.catch(m).then(function(){return m()})}function xi(m,g){lt=m,ye=g}var Hi;function Jr(){return Hi==null&&(Hi=c.OffscreenCanvas&&new c.OffscreenCanvas(1,1).getContext("2d")&&typeof c.createImageBitmap=="function"),Hi}var ci={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(ci);var Di=function(m){function g(P,V,J){V===401&&ct(J)&&(P+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),m.call(this,P),this.status=V,this.url=J,this.name=this.constructor.name,this.message=P}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},g}(Error),Lt=Ce()?function(){return self.worker&&self.worker.referrer}:function(){return(c.location.protocol==="blob:"?c.parent:c).location.href},vt=function(m){return/^file:/.test(m)||/^file:/.test(Lt())&&!/^\w+:/.test(m)};function Dt(m,g){var P=new c.AbortController,V=new c.Request(m.url,{method:m.method||"GET",body:m.body,credentials:m.credentials,headers:m.headers,referrer:Lt(),signal:P.signal}),J=!1,ae=!1,ve=rt(V.url);m.type==="json"&&V.headers.set("Accept","application/json");var Ge=function(kt,Ut,lr){if(!ae){if(kt&&kt.message!=="SecurityError"&&re(kt),Ut&&lr)return yt(Ut);var kr=Date.now();c.fetch(V).then(function(xr){if(xr.ok){var ei=ve?xr.clone():null;return yt(xr,ei,kr)}else return g(new Di(xr.statusText,xr.status,m.url))}).catch(function(xr){xr.code!==20&&g(new Error(xr.message))})}},yt=function(kt,Ut,lr){(m.type==="arrayBuffer"?kt.arrayBuffer():m.type==="json"?kt.json():kt.text()).then(function(kr){ae||(Ut&&lr&&Zt(V,Ut,lr),J=!0,g(null,kr,kt.headers.get("Cache-Control"),kt.headers.get("Expires")))}).catch(function(kr){ae||g(new Error(kr.message))})};return ve?Lr(V,Ge):Ge(null,null),{cancel:function(){ae=!0,J||P.abort()}}}function Bt(m,g){var P=new c.XMLHttpRequest;P.open(m.method||"GET",m.url,!0),m.type==="arrayBuffer"&&(P.responseType="arraybuffer");for(var V in m.headers)P.setRequestHeader(V,m.headers[V]);return m.type==="json"&&(P.responseType="text",P.setRequestHeader("Accept","application/json")),P.withCredentials=m.credentials==="include",P.onerror=function(){g(new Error(P.statusText))},P.onload=function(){if((P.status>=200&&P.status<300||P.status===0)&&P.response!==null){var J=P.response;if(m.type==="json")try{J=JSON.parse(P.response)}catch(ae){return g(ae)}g(null,J,P.getResponseHeader("Cache-Control"),P.getResponseHeader("Expires"))}else g(new Di(P.statusText,P.status,m.url))},P.send(m.body),{cancel:function(){return P.abort()}}}var sr=function(m,g){if(!vt(m.url)){if(c.fetch&&c.Request&&c.AbortController&&c.Request.prototype.hasOwnProperty("signal"))return Dt(m,g);if(Ce()&&self.worker&&self.worker.actor){var P=!0;return self.worker.actor.send("getResource",m,g,void 0,P)}}return Bt(m,g)},br=function(m,g){return sr(_(m,{type:"json"}),g)},zr=function(m,g){return sr(_(m,{type:"arrayBuffer"}),g)},Tr=function(m,g){return sr(_(m,{method:"POST"}),g)};function Rr(m){var g=c.document.createElement("a");return g.href=m,g.protocol===c.document.location.protocol&&g.host===c.document.location.host}var Br="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function oi(m,g,P,V){var J=new c.Image,ae=c.URL;J.onload=function(){g(null,J),ae.revokeObjectURL(J.src),J.onload=null,c.requestAnimationFrame(function(){J.src=Br})},J.onerror=function(){return g(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 ve=new c.Blob([new Uint8Array(m)],{type:"image/png"});J.cacheControl=P,J.expires=V,J.src=m.byteLength?ae.createObjectURL(ve):Br}function vi(m,g){var P=new c.Blob([new Uint8Array(m)],{type:"image/png"});c.createImageBitmap(P).then(function(V){g(null,V)}).catch(function(V){g(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 Pi,Yr,Ni=function(){Pi=[],Yr=0};Ni();var Ur=function(m,g){if(Pt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),Yr>=gt.MAX_PARALLEL_IMAGE_REQUESTS){var P={requestParameters:m,callback:g,cancelled:!1,cancel:function(){this.cancelled=!0}};return Pi.push(P),P}Yr++;var V=!1,J=function(){if(!V)for(V=!0,Yr--;Pi.length&&Yr<gt.MAX_PARALLEL_IMAGE_REQUESTS;){var ve=Pi.shift(),Ge=ve.requestParameters,yt=ve.callback,kt=ve.cancelled;kt||(ve.cancel=Ur(Ge,yt).cancel)}},ae=zr(m,function(ve,Ge,yt,kt){J(),ve?g(ve):Ge&&(Jr()?vi(Ge,g):oi(Ge,g,yt,kt))});return{cancel:function(){ae.cancel(),J()}}},ti=function(m,g){var P=c.document.createElement("video");P.muted=!0,P.onloadstart=function(){g(null,P)};for(var V=0;V<m.length;V++){var J=c.document.createElement("source");Rr(m[V])||(P.crossOrigin="Anonymous"),J.src=m[V],P.appendChild(J)}return{cancel:function(){}}};function ki(m,g,P){var V=P[m]&&P[m].indexOf(g)!==-1;V||(P[m]=P[m]||[],P[m].push(g))}function ji(m,g,P){if(P&&P[m]){var V=P[m].indexOf(g);V!==-1&&P[m].splice(V,1)}}var Vi=function(g,P){P===void 0&&(P={}),_(this,P),this.type=g},zi=function(m){function g(P,V){V===void 0&&(V={}),m.call(this,"error",_({error:P},V))}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g}(Vi),Mi=function(){};Mi.prototype.on=function(g,P){return this._listeners=this._listeners||{},ki(g,P,this._listeners),this},Mi.prototype.off=function(g,P){return ji(g,P,this._listeners),ji(g,P,this._oneTimeListeners),this},Mi.prototype.once=function(g,P){return this._oneTimeListeners=this._oneTimeListeners||{},ki(g,P,this._oneTimeListeners),this},Mi.prototype.fire=function(g,P){typeof g=="string"&&(g=new Vi(g,P||{}));var V=g.type;if(this.listens(V)){g.target=this;for(var J=this._listeners&&this._listeners[V]?this._listeners[V].slice():[],ae=0,ve=J;ae<ve.length;ae+=1){var Ge=ve[ae];Ge.call(this,g)}for(var yt=this._oneTimeListeners&&this._oneTimeListeners[V]?this._oneTimeListeners[V].slice():[],kt=0,Ut=yt;kt<Ut.length;kt+=1){var lr=Ut[kt];ji(V,lr,this._oneTimeListeners),lr.call(this,g)}var kr=this._eventedParent;kr&&(_(g,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),kr.fire(g))}else g instanceof zi&&console.error(g.error);return this},Mi.prototype.listens=function(g){return this._listeners&&this._listeners[g]&&this._listeners[g].length>0||this._oneTimeListeners&&this._oneTimeListeners[g]&&this._oneTimeListeners[g].length>0||this._eventedParent&&this._eventedParent.listens(g)},Mi.prototype.setEventedParent=function(g,P){return this._eventedParent=g,this._eventedParentData=P,this};var sn=8,fi={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"}},Or={"*":{type:"source"}},st=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Wt={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:"*"}},tr={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:"*"}},or={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:"*"}},Nr={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"}},hi={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"}}},Gi={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"}}},Qr={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"}},Ui=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],zn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},fn={"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"}},xn={"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"}},_a={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Wn={"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"}},Fn={"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"}},ia={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},za={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Hr={type:"array",value:"*"},na={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},go={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Dn={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},un={type:"array",value:"*",minimum:1},Zn={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}},Wo=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Ba={"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"}},Bo={"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"}},Ea={"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"}},Ha={"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"}},tn={"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"}},Cn={"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"}},Xn={"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"}},ts={"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"}},Ja={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},to={"*":{type:"string"}},Ri={$version:sn,$root:fi,sources:Or,source:st,source_vector:Wt,source_raster:tr,source_raster_dem:or,source_geojson:Nr,source_video:hi,source_image:Gi,layer:Qr,layout:Ui,layout_background:zn,layout_fill:fn,layout_circle:xn,layout_heatmap:_a,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Wn,layout_symbol:Fn,layout_raster:ia,layout_hillshade:za,filter:Hr,filter_operator:na,geometry_type:go,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:Dn,expression:un,light:Zn,paint:Wo,paint_fill:Ba,"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:Bo,paint_circle:Ea,paint_heatmap:Ha,paint_symbol:tn,paint_raster:Cn,paint_hillshade:Xn,paint_background:ts,transition:Ja,"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:to},an=function(g,P,V,J){this.message=(g?g+": ":"")+V,J&&(this.identifier=J),P!=null&&P.__line__&&(this.line=P.__line__)};function cs(m){var g=m.key,P=m.value;return P?[new an(g,P,"constants have been deprecated as of v8")]:[]}function pa(m){for(var g=[],P=arguments.length-1;P-- >0;)g[P]=arguments[P+1];for(var V=0,J=g;V<J.length;V+=1){var ae=J[V];for(var ve in ae)m[ve]=ae[ve]}return m}function ln(m){return m instanceof Number||m instanceof String||m instanceof Boolean?m.valueOf():m}function ka(m){if(Array.isArray(m))return m.map(ka);if(m instanceof Object&&!(m instanceof Number||m instanceof String||m instanceof Boolean)){var g={};for(var P in m)g[P]=ka(m[P]);return g}return ln(m)}var va=function(m){function g(P,V){m.call(this,V),this.message=V,this.key=P}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g}(Error),bo=function(g,P){P===void 0&&(P=[]),this.parent=g,this.bindings={};for(var V=0,J=P;V<J.length;V+=1){var ae=J[V],ve=ae[0],Ge=ae[1];this.bindings[ve]=Ge}};bo.prototype.concat=function(g){return new bo(this,g)},bo.prototype.get=function(g){if(this.bindings[g])return this.bindings[g];if(this.parent)return this.parent.get(g);throw new Error(g+" not found in scope.")},bo.prototype.has=function(g){return this.bindings[g]?!0:this.parent?this.parent.has(g):!1};var Co={kind:"null"},Fi={kind:"number"},Yn={kind:"string"},xa={kind:"boolean"},Qi={kind:"color"},Nn={kind:"object"},Pn={kind:"value"},qa={kind:"error"},jo={kind:"collator"},Vo={kind:"formatted"},Pa={kind:"resolvedImage"};function Oa(m,g){return{kind:"array",itemType:m,N:g}}function co(m){if(m.kind==="array"){var g=co(m.itemType);return typeof m.N=="number"?"array<"+g+", "+m.N+">":m.itemType.kind==="value"?"array":"array<"+g+">"}else return m.kind}var An=[Co,Fi,Yn,xa,Qi,Vo,Nn,Oa(Pn),Pa];function _o(m,g){if(g.kind==="error")return null;if(m.kind==="array"){if(g.kind==="array"&&(g.N===0&&g.itemType.kind==="value"||!_o(m.itemType,g.itemType))&&(typeof m.N!="number"||m.N===g.N))return null}else{if(m.kind===g.kind)return null;if(m.kind==="value")for(var P=0,V=An;P<V.length;P+=1){var J=V[P];if(!_o(J,g))return null}}return"Expected "+co(m)+" but found "+co(g)+" instead."}function ks(m,g){return g.some(function(P){return P.kind===m.kind})}function bs(m,g){return g.some(function(P){return P==="null"?m===null:P==="array"?Array.isArray(m):P==="object"?m&&!Array.isArray(m)&&typeof m=="object":P===typeof m})}var ps=a(function(m,g){var P={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(kt){return kt=Math.round(kt),kt<0?0:kt>255?255:kt}function J(kt){return kt<0?0:kt>1?1:kt}function ae(kt){return kt[kt.length-1]==="%"?V(parseFloat(kt)/100*255):V(parseInt(kt))}function ve(kt){return kt[kt.length-1]==="%"?J(parseFloat(kt)/100):J(parseFloat(kt))}function Ge(kt,Ut,lr){return lr<0?lr+=1:lr>1&&(lr-=1),lr*6<1?kt+(Ut-kt)*lr*6:lr*2<1?Ut:lr*3<2?kt+(Ut-kt)*(2/3-lr)*6:kt}function yt(kt){var Ut=kt.replace(/ /g,"").toLowerCase();if(Ut in P)return P[Ut].slice();if(Ut[0]==="#"){if(Ut.length===4){var lr=parseInt(Ut.substr(1),16);return lr>=0&&lr<=4095?[(lr&3840)>>4|(lr&3840)>>8,lr&240|(lr&240)>>4,lr&15|(lr&15)<<4,1]:null}else if(Ut.length===7){var lr=parseInt(Ut.substr(1),16);return lr>=0&&lr<=16777215?[(lr&16711680)>>16,(lr&65280)>>8,lr&255,1]:null}return null}var kr=Ut.indexOf("("),xr=Ut.indexOf(")");if(kr!==-1&&xr+1===Ut.length){var ei=Ut.substr(0,kr),Li=Ut.substr(kr+1,xr-(kr+1)).split(","),_n=1;switch(ei){case"rgba":if(Li.length!==4)return null;_n=ve(Li.pop());case"rgb":return Li.length!==3?null:[ae(Li[0]),ae(Li[1]),ae(Li[2]),_n];case"hsla":if(Li.length!==4)return null;_n=ve(Li.pop());case"hsl":if(Li.length!==3)return null;var rn=(parseFloat(Li[0])%360+360)%360/360,Fa=ve(Li[1]),On=ve(Li[2]),Ra=On<=.5?On*(Fa+1):On+Fa-On*Fa,so=On*2-Ra;return[V(Ge(so,Ra,rn+1/3)*255),V(Ge(so,Ra,rn)*255),V(Ge(so,Ra,rn-1/3)*255),_n];default:return null}}return null}try{g.parseCSSColor=yt}catch(kt){}}),sa=ps.parseCSSColor,Bn=function(g,P,V,J){J===void 0&&(J=1),this.r=g,this.g=P,this.b=V,this.a=J};Bn.parse=function(g){if(g){if(g instanceof Bn)return g;if(typeof g=="string"){var P=sa(g);if(P)return new Bn(P[0]/255*P[3],P[1]/255*P[3],P[2]/255*P[3],P[3])}}},Bn.prototype.toString=function(){var g=this.toArray(),P=g[0],V=g[1],J=g[2],ae=g[3];return"rgba("+Math.round(P)+","+Math.round(V)+","+Math.round(J)+","+ae+")"},Bn.prototype.toArray=function(){var g=this,P=g.r,V=g.g,J=g.b,ae=g.a;return ae===0?[0,0,0,0]:[P*255/ae,V*255/ae,J*255/ae,ae]},Bn.black=new Bn(0,0,0,1),Bn.white=new Bn(1,1,1,1),Bn.transparent=new Bn(0,0,0,0),Bn.red=new Bn(1,0,0,1);var ms=function(g,P,V){g?this.sensitivity=P?"variant":"case":this.sensitivity=P?"accent":"base",this.locale=V,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};ms.prototype.compare=function(g,P){return this.collator.compare(g,P)},ms.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ya=function(g,P,V,J,ae){this.text=g,this.image=P,this.scale=V,this.fontStack=J,this.textColor=ae},on=function(g){this.sections=g};on.fromString=function(g){return new on([new ya(g,null,null,null,null)])},on.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(g){return g.text.length!==0||g.image&&g.image.name.length!==0})},on.factory=function(g){return g instanceof on?g:on.fromString(g)},on.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(g){return g.text}).join("")},on.prototype.serialize=function(){for(var g=["format"],P=0,V=this.sections;P<V.length;P+=1){var J=V[P];if(J.image){g.push(["image",J.image.name]);continue}g.push(J.text);var ae={};J.fontStack&&(ae["text-font"]=["literal",J.fontStack.split(",")]),J.scale&&(ae["font-scale"]=J.scale),J.textColor&&(ae["text-color"]=["rgba"].concat(J.textColor.toArray())),g.push(ae)}return g};var mn=function(g){this.name=g.name,this.available=g.available};mn.prototype.toString=function(){return this.name},mn.fromString=function(g){return g?new mn({name:g,available:!1}):null},mn.prototype.serialize=function(){return["image",this.name]};function Ga(m,g,P,V){if(!(typeof m=="number"&&m>=0&&m<=255&&typeof g=="number"&&g>=0&&g<=255&&typeof P=="number"&&P>=0&&P<=255)){var J=typeof V=="number"?[m,g,P,V]:[m,g,P];return"Invalid rgba value ["+J.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,g,P,V].join(", ")+"]: 'a' must be between 0 and 1."}function ca(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 Bn)return!0;if(m instanceof ms)return!0;if(m instanceof on)return!0;if(m instanceof mn)return!0;if(Array.isArray(m)){for(var g=0,P=m;g<P.length;g+=1){var V=P[g];if(!ca(V))return!1}return!0}else if(typeof m=="object"){for(var J in m)if(!ca(m[J]))return!1;return!0}else return!1}function bn(m){if(m===null)return Co;if(typeof m=="string")return Yn;if(typeof m=="boolean")return xa;if(typeof m=="number")return Fi;if(m instanceof Bn)return Qi;if(m instanceof ms)return jo;if(m instanceof on)return Vo;if(m instanceof mn)return Pa;if(Array.isArray(m)){for(var g=m.length,P,V=0,J=m;V<J.length;V+=1){var ae=J[V],ve=bn(ae);if(!P)P=ve;else{if(P===ve)continue;P=Pn;break}}return Oa(P||Pn,g)}else return Nn}function Xi(m){var g=typeof m;return m===null?"":g==="string"||g==="number"||g==="boolean"?String(m):m instanceof Bn||m instanceof on||m instanceof mn?m.toString():JSON.stringify(m)}var qn=function(g,P){this.type=g,this.value=P};qn.parse=function(g,P){if(g.length!==2)return P.error("'literal' expression requires exactly one argument, but found "+(g.length-1)+" instead.");if(!ca(g[1]))return P.error("invalid value");var V=g[1],J=bn(V),ae=P.expectedType;return J.kind==="array"&&J.N===0&&ae&&ae.kind==="array"&&(typeof ae.N!="number"||ae.N===0)&&(J=ae),new qn(J,V)},qn.prototype.evaluate=function(){return this.value},qn.prototype.eachChild=function(){},qn.prototype.outputDefined=function(){return!0},qn.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Bn?["rgba"].concat(this.value.toArray()):this.value instanceof on?this.value.serialize():this.value};var Ia=function(g){this.name="ExpressionEvaluationError",this.message=g};Ia.prototype.toJSON=function(){return this.message};var yn={string:Yn,number:Fi,boolean:xa,object:Nn},Ya=function(g,P){this.type=g,this.args=P};Ya.parse=function(g,P){if(g.length<2)return P.error("Expected at least one argument.");var V=1,J,ae=g[0];if(ae==="array"){var ve;if(g.length>2){var Ge=g[1];if(typeof Ge!="string"||!(Ge in yn)||Ge==="object")return P.error('The item type argument of "array" must be one of string, number, boolean',1);ve=yn[Ge],V++}else ve=Pn;var yt;if(g.length>3){if(g[2]!==null&&(typeof g[2]!="number"||g[2]<0||g[2]!==Math.floor(g[2])))return P.error('The length argument to "array" must be a positive integer literal',2);yt=g[2],V++}J=Oa(ve,yt)}else J=yn[ae];for(var kt=[];V<g.length;V++){var Ut=P.parse(g[V],V,Pn);if(!Ut)return null;kt.push(Ut)}return new Ya(J,kt)},Ya.prototype.evaluate=function(g){for(var P=0;P<this.args.length;P++){var V=this.args[P].evaluate(g),J=_o(this.type,bn(V));if(J){if(P===this.args.length-1)throw new Ia("Expected value to be of type "+co(this.type)+", but found "+co(bn(V))+" instead.")}else return V}return null},Ya.prototype.eachChild=function(g){this.args.forEach(g)},Ya.prototype.outputDefined=function(){return this.args.every(function(g){return g.outputDefined()})},Ya.prototype.serialize=function(){var g=this.type,P=[g.kind];if(g.kind==="array"){var V=g.itemType;if(V.kind==="string"||V.kind==="number"||V.kind==="boolean"){P.push(V.kind);var J=g.N;(typeof J=="number"||this.args.length>1)&&P.push(J)}}return P.concat(this.args.map(function(ae){return ae.serialize()}))};var ba=function(g){this.type=Vo,this.sections=g};ba.parse=function(g,P){if(g.length<2)return P.error("Expected at least one argument.");var V=g[1];if(!Array.isArray(V)&&typeof V=="object")return P.error("First argument must be an image or text section.");for(var J=[],ae=!1,ve=1;ve<=g.length-1;++ve){var Ge=g[ve];if(ae&&typeof Ge=="object"&&!Array.isArray(Ge)){ae=!1;var yt=null;if(Ge["font-scale"]&&(yt=P.parse(Ge["font-scale"],1,Fi),!yt))return null;var kt=null;if(Ge["text-font"]&&(kt=P.parse(Ge["text-font"],1,Oa(Yn)),!kt))return null;var Ut=null;if(Ge["text-color"]&&(Ut=P.parse(Ge["text-color"],1,Qi),!Ut))return null;var lr=J[J.length-1];lr.scale=yt,lr.font=kt,lr.textColor=Ut}else{var kr=P.parse(g[ve],1,Pn);if(!kr)return null;var xr=kr.type.kind;if(xr!=="string"&&xr!=="value"&&xr!=="null"&&xr!=="resolvedImage")return P.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ae=!0,J.push({content:kr,scale:null,font:null,textColor:null})}}return new ba(J)},ba.prototype.evaluate=function(g){var P=function(V){var J=V.content.evaluate(g);return bn(J)===Pa?new ya("",J,null,null,null):new ya(Xi(J),null,V.scale?V.scale.evaluate(g):null,V.font?V.font.evaluate(g).join(","):null,V.textColor?V.textColor.evaluate(g):null)};return new on(this.sections.map(P))},ba.prototype.eachChild=function(g){for(var P=0,V=this.sections;P<V.length;P+=1){var J=V[P];g(J.content),J.scale&&g(J.scale),J.font&&g(J.font),J.textColor&&g(J.textColor)}},ba.prototype.outputDefined=function(){return!1},ba.prototype.serialize=function(){for(var g=["format"],P=0,V=this.sections;P<V.length;P+=1){var J=V[P];g.push(J.content.serialize());var ae={};J.scale&&(ae["font-scale"]=J.scale.serialize()),J.font&&(ae["text-font"]=J.font.serialize()),J.textColor&&(ae["text-color"]=J.textColor.serialize()),g.push(ae)}return g};var Da=function(g){this.type=Pa,this.input=g};Da.parse=function(g,P){if(g.length!==2)return P.error("Expected two arguments.");var V=P.parse(g[1],1,Yn);return V?new Da(V):P.error("No image name provided.")},Da.prototype.evaluate=function(g){var P=this.input.evaluate(g),V=mn.fromString(P);return V&&g.availableImages&&(V.available=g.availableImages.indexOf(P)>-1),V},Da.prototype.eachChild=function(g){g(this.input)},Da.prototype.outputDefined=function(){return!1},Da.prototype.serialize=function(){return["image",this.input.serialize()]};var Aa={"to-boolean":xa,"to-color":Qi,"to-number":Fi,"to-string":Yn},Ln=function(g,P){this.type=g,this.args=P};Ln.parse=function(g,P){if(g.length<2)return P.error("Expected at least one argument.");var V=g[0];if((V==="to-boolean"||V==="to-string")&&g.length!==2)return P.error("Expected one argument.");for(var J=Aa[V],ae=[],ve=1;ve<g.length;ve++){var Ge=P.parse(g[ve],ve,Pn);if(!Ge)return null;ae.push(Ge)}return new Ln(J,ae)},Ln.prototype.evaluate=function(g){if(this.type.kind==="boolean")return!!this.args[0].evaluate(g);if(this.type.kind==="color"){for(var P,V,J=0,ae=this.args;J<ae.length;J+=1){var ve=ae[J];if(P=ve.evaluate(g),V=null,P instanceof Bn)return P;if(typeof P=="string"){var Ge=g.parseColor(P);if(Ge)return Ge}else if(Array.isArray(P)&&(P.length<3||P.length>4?V="Invalid rbga value "+JSON.stringify(P)+": expected an array containing either three or four numeric values.":V=Ga(P[0],P[1],P[2],P[3]),!V))return new Bn(P[0]/255,P[1]/255,P[2]/255,P[3])}throw new Ia(V||"Could not parse color from value '"+(typeof P=="string"?P:String(JSON.stringify(P)))+"'")}else if(this.type.kind==="number"){for(var yt=null,kt=0,Ut=this.args;kt<Ut.length;kt+=1){var lr=Ut[kt];if(yt=lr.evaluate(g),yt===null)return 0;var kr=Number(yt);if(!isNaN(kr))return kr}throw new Ia("Could not convert "+JSON.stringify(yt)+" to number.")}else return this.type.kind==="formatted"?on.fromString(Xi(this.args[0].evaluate(g))):this.type.kind==="resolvedImage"?mn.fromString(Xi(this.args[0].evaluate(g))):Xi(this.args[0].evaluate(g))},Ln.prototype.eachChild=function(g){this.args.forEach(g)},Ln.prototype.outputDefined=function(){return this.args.every(function(g){return g.outputDefined()})},Ln.prototype.serialize=function(){if(this.type.kind==="formatted")return new ba([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Da(this.args[0]).serialize();var g=["to-"+this.type.kind];return this.eachChild(function(P){g.push(P.serialize())}),g};var wo=["Unknown","Point","LineString","Polygon"],wa=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};wa.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},wa.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?wo[this.feature.type]:this.feature.type:null},wa.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},wa.prototype.canonicalID=function(){return this.canonical},wa.prototype.properties=function(){return this.feature&&this.feature.properties||{}},wa.prototype.parseColor=function(g){var P=this._parseColorCache[g];return P||(P=this._parseColorCache[g]=Bn.parse(g)),P};var $i=function(g,P,V,J){this.name=g,this.type=P,this._evaluate=V,this.args=J};$i.prototype.evaluate=function(g){return this._evaluate(g,this.args)},$i.prototype.eachChild=function(g){this.args.forEach(g)},$i.prototype.outputDefined=function(){return!1},$i.prototype.serialize=function(){return[this.name].concat(this.args.map(function(g){return g.serialize()}))},$i.parse=function(g,P){var V,J=g[0],ae=$i.definitions[J];if(!ae)return P.error('Unknown expression "'+J+'". If you wanted a literal array, use ["literal", [...]].',0);for(var ve=Array.isArray(ae)?ae[0]:ae.type,Ge=Array.isArray(ae)?[[ae[1],ae[2]]]:ae.overloads,yt=Ge.filter(function(tu){var ou=tu[0];return!Array.isArray(ou)||ou.length===g.length-1}),kt=null,Ut=0,lr=yt;Ut<lr.length;Ut+=1){var kr=lr[Ut],xr=kr[0],ei=kr[1];kt=new Xa(P.registry,P.path,null,P.scope);for(var Li=[],_n=!1,rn=1;rn<g.length;rn++){var Fa=g[rn],On=Array.isArray(xr)?xr[rn-1]:xr.type,Ra=kt.parse(Fa,1+Li.length,On);if(!Ra){_n=!0;break}Li.push(Ra)}if(!_n){if(Array.isArray(xr)&&xr.length!==Li.length){kt.error("Expected "+xr.length+" arguments, but found "+Li.length+" instead.");continue}for(var so=0;so<Li.length;so++){var As=Array.isArray(xr)?xr[so]:xr.type,dl=Li[so];kt.concat(so+1).checkSubtype(As,dl.type)}if(kt.errors.length===0)return new $i(J,ve,ei,Li)}}if(yt.length===1)(V=P.errors).push.apply(V,kt.errors);else{for(var fl=yt.length?yt:Ge,eu=fl.map(function(tu){var ou=tu[0];return ea(ou)}).join(" | "),Ol=[],Xl=1;Xl<g.length;Xl++){var Cu=P.parse(g[Xl],1+Ol.length);if(!Cu)return null;Ol.push(co(Cu.type))}P.error("Expected arguments of type "+eu+", but found ("+Ol.join(", ")+") instead.")}return null},$i.register=function(g,P){$i.definitions=P;for(var V in P)g[V]=$i};function ea(m){return Array.isArray(m)?"("+m.map(co).join(", ")+")":"("+co(m.type)+"...)"}var Sa=function(g,P,V){this.type=jo,this.locale=V,this.caseSensitive=g,this.diacriticSensitive=P};Sa.parse=function(g,P){if(g.length!==2)return P.error("Expected one argument.");var V=g[1];if(typeof V!="object"||Array.isArray(V))return P.error("Collator options argument must be an object.");var J=P.parse(V["case-sensitive"]===void 0?!1:V["case-sensitive"],1,xa);if(!J)return null;var ae=P.parse(V["diacritic-sensitive"]===void 0?!1:V["diacritic-sensitive"],1,xa);if(!ae)return null;var ve=null;return V.locale&&(ve=P.parse(V.locale,1,Yn),!ve)?null:new Sa(J,ae,ve)},Sa.prototype.evaluate=function(g){return new ms(this.caseSensitive.evaluate(g),this.diacriticSensitive.evaluate(g),this.locale?this.locale.evaluate(g):null)},Sa.prototype.eachChild=function(g){g(this.caseSensitive),g(this.diacriticSensitive),this.locale&&g(this.locale)},Sa.prototype.outputDefined=function(){return!1},Sa.prototype.serialize=function(){var g={};return g["case-sensitive"]=this.caseSensitive.serialize(),g["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(g.locale=this.locale.serialize()),["collator",g]};var Za=8192;function xo(m,g){m[0]=Math.min(m[0],g[0]),m[1]=Math.min(m[1],g[1]),m[2]=Math.max(m[2],g[0]),m[3]=Math.max(m[3],g[1])}function Wa(m){return(180+m)/360}function hn(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function Un(m,g){return!(m[0]<=g[0]||m[2]>=g[2]||m[1]<=g[1]||m[3]>=g[3])}function Ss(m,g){var P=Wa(m[0]),V=hn(m[1]),J=Math.pow(2,g.z);return[Math.round(P*J*Za),Math.round(V*J*Za)]}function Kn(m,g,P){var V=m[0]-g[0],J=m[1]-g[1],ae=m[0]-P[0],ve=m[1]-P[1];return V*ve-ae*J===0&&V*ae<=0&&J*ve<=0}function ns(m,g,P){return g[1]>m[1]!=P[1]>m[1]&&m[0]<(P[0]-g[0])*(m[1]-g[1])/(P[1]-g[1])+g[0]}function Jo(m,g){for(var P=!1,V=0,J=g.length;V<J;V++)for(var ae=g[V],ve=0,Ge=ae.length;ve<Ge-1;ve++){if(Kn(m,ae[ve],ae[ve+1]))return!1;ns(m,ae[ve],ae[ve+1])&&(P=!P)}return P}function vo(m,g){for(var P=0;P<g.length;P++)if(Jo(m,g[P]))return!0;return!1}function ma(m,g){return m[0]*g[1]-m[1]*g[0]}function ja(m,g,P,V){var J=m[0]-P[0],ae=m[1]-P[1],ve=g[0]-P[0],Ge=g[1]-P[1],yt=V[0]-P[0],kt=V[1]-P[1],Ut=J*kt-yt*ae,lr=ve*kt-yt*Ge;return Ut>0&&lr<0||Ut<0&&lr>0}function To(m,g,P,V){var J=[g[0]-m[0],g[1]-m[1]],ae=[V[0]-P[0],V[1]-P[1]];return ma(ae,J)===0?!1:!!(ja(m,g,P,V)&&ja(P,V,m,g))}function Ao(m,g,P){for(var V=0,J=P;V<J.length;V+=1)for(var ae=J[V],ve=0;ve<ae.length-1;++ve)if(To(m,g,ae[ve],ae[ve+1]))return!0;return!1}function la(m,g){for(var P=0;P<m.length;++P)if(!Jo(m[P],g))return!1;for(var V=0;V<m.length-1;++V)if(Ao(m[V],m[V+1],g))return!1;return!0}function Ki(m,g){for(var P=0;P<g.length;P++)if(la(m,g[P]))return!0;return!1}function ho(m,g,P){for(var V=[],J=0;J<m.length;J++){for(var ae=[],ve=0;ve<m[J].length;ve++){var Ge=Ss(m[J][ve],P);xo(g,Ge),ae.push(Ge)}V.push(ae)}return V}function Ka(m,g,P){for(var V=[],J=0;J<m.length;J++){var ae=ho(m[J],g,P);V.push(ae)}return V}function Ca(m,g,P,V){if(m[0]<P[0]||m[0]>P[2]){var J=V*.5,ae=m[0]-P[0]>J?-V:P[0]-m[0]>J?V:0;ae===0&&(ae=m[0]-P[2]>J?-V:P[2]-m[0]>J?V:0),m[0]+=ae}xo(g,m)}function ta(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function En(m,g,P,V){for(var J=Math.pow(2,V.z)*Za,ae=[V.x*Za,V.y*Za],ve=[],Ge=0,yt=m;Ge<yt.length;Ge+=1)for(var kt=yt[Ge],Ut=0,lr=kt;Ut<lr.length;Ut+=1){var kr=lr[Ut],xr=[kr.x+ae[0],kr.y+ae[1]];Ca(xr,g,P,J),ve.push(xr)}return ve}function Mo(m,g,P,V){for(var J=Math.pow(2,V.z)*Za,ae=[V.x*Za,V.y*Za],ve=[],Ge=0,yt=m;Ge<yt.length;Ge+=1){for(var kt=yt[Ge],Ut=[],lr=0,kr=kt;lr<kr.length;lr+=1){var xr=kr[lr],ei=[xr.x+ae[0],xr.y+ae[1]];xo(g,ei),Ut.push(ei)}ve.push(Ut)}if(g[2]-g[0]<=J/2){ta(g);for(var Li=0,_n=ve;Li<_n.length;Li+=1)for(var rn=_n[Li],Fa=0,On=rn;Fa<On.length;Fa+=1){var Ra=On[Fa];Ca(Ra,g,P,J)}}return ve}function Ds(m,g){var P=[1/0,1/0,-1/0,-1/0],V=[1/0,1/0,-1/0,-1/0],J=m.canonicalID();if(g.type==="Polygon"){var ae=ho(g.coordinates,V,J),ve=En(m.geometry(),P,V,J);if(!Un(P,V))return!1;for(var Ge=0,yt=ve;Ge<yt.length;Ge+=1){var kt=yt[Ge];if(!Jo(kt,ae))return!1}}if(g.type==="MultiPolygon"){var Ut=Ka(g.coordinates,V,J),lr=En(m.geometry(),P,V,J);if(!Un(P,V))return!1;for(var kr=0,xr=lr;kr<xr.length;kr+=1){var ei=xr[kr];if(!vo(ei,Ut))return!1}}return!0}function Ro(m,g){var P=[1/0,1/0,-1/0,-1/0],V=[1/0,1/0,-1/0,-1/0],J=m.canonicalID();if(g.type==="Polygon"){var ae=ho(g.coordinates,V,J),ve=Mo(m.geometry(),P,V,J);if(!Un(P,V))return!1;for(var Ge=0,yt=ve;Ge<yt.length;Ge+=1){var kt=yt[Ge];if(!la(kt,ae))return!1}}if(g.type==="MultiPolygon"){var Ut=Ka(g.coordinates,V,J),lr=Mo(m.geometry(),P,V,J);if(!Un(P,V))return!1;for(var kr=0,xr=lr;kr<xr.length;kr+=1){var ei=xr[kr];if(!Ki(ei,Ut))return!1}}return!0}var vs=function(g,P){this.type=xa,this.geojson=g,this.geometries=P};vs.parse=function(g,P){if(g.length!==2)return P.error("'within' expression requires exactly one argument, but found "+(g.length-1)+" instead.");if(ca(g[1])){var V=g[1];if(V.type==="FeatureCollection")for(var J=0;J<V.features.length;++J){var ae=V.features[J].geometry.type;if(ae==="Polygon"||ae==="MultiPolygon")return new vs(V,V.features[J].geometry)}else if(V.type==="Feature"){var ve=V.geometry.type;if(ve==="Polygon"||ve==="MultiPolygon")return new vs(V,V.geometry)}else if(V.type==="Polygon"||V.type==="MultiPolygon")return new vs(V,V)}return P.error("'within' expression requires valid geojson object that contains polygon geometry type.")},vs.prototype.evaluate=function(g){if(g.geometry()!=null&&g.canonicalID()!=null){if(g.geometryType()==="Point")return Ds(g,this.geometries);if(g.geometryType()==="LineString")return Ro(g,this.geometries)}return!1},vs.prototype.eachChild=function(){},vs.prototype.outputDefined=function(){return!0},vs.prototype.serialize=function(){return["within",this.geojson]};function Ks(m){if(m instanceof $i){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 vs)return!1;var g=!0;return m.eachChild(function(P){g&&!Ks(P)&&(g=!1)}),g}function as(m){if(m instanceof $i&&m.name==="feature-state")return!1;var g=!0;return m.eachChild(function(P){g&&!as(P)&&(g=!1)}),g}function Jn(m,g){if(m instanceof $i&&g.indexOf(m.name)>=0)return!1;var P=!0;return m.eachChild(function(V){P&&!Jn(V,g)&&(P=!1)}),P}var Cs=function(g,P){this.type=P.type,this.name=g,this.boundExpression=P};Cs.parse=function(g,P){if(g.length!==2||typeof g[1]!="string")return P.error("'var' expression requires exactly one string literal argument.");var V=g[1];return P.scope.has(V)?new Cs(V,P.scope.get(V)):P.error('Unknown variable "'+V+'". Make sure "'+V+'" has been bound in an enclosing "let" expression before using it.',1)},Cs.prototype.evaluate=function(g){return this.boundExpression.evaluate(g)},Cs.prototype.eachChild=function(){},Cs.prototype.outputDefined=function(){return!1},Cs.prototype.serialize=function(){return["var",this.name]};var Xa=function(g,P,V,J,ae){P===void 0&&(P=[]),J===void 0&&(J=new bo),ae===void 0&&(ae=[]),this.registry=g,this.path=P,this.key=P.map(function(ve){return"["+ve+"]"}).join(""),this.scope=J,this.errors=ae,this.expectedType=V};Xa.prototype.parse=function(g,P,V,J,ae){return ae===void 0&&(ae={}),P?this.concat(P,V,J)._parse(g,ae):this._parse(g,ae)},Xa.prototype._parse=function(g,P){(g===null||typeof g=="string"||typeof g=="boolean"||typeof g=="number")&&(g=["literal",g]);function V(Ut,lr,kr){return kr==="assert"?new Ya(lr,[Ut]):kr==="coerce"?new Ln(lr,[Ut]):Ut}if(Array.isArray(g)){if(g.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var J=g[0];if(typeof J!="string")return this.error("Expression name must be a string, but found "+typeof J+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ae=this.registry[J];if(ae){var ve=ae.parse(g,this);if(!ve)return null;if(this.expectedType){var Ge=this.expectedType,yt=ve.type;if((Ge.kind==="string"||Ge.kind==="number"||Ge.kind==="boolean"||Ge.kind==="object"||Ge.kind==="array")&&yt.kind==="value")ve=V(ve,Ge,P.typeAnnotation||"assert");else if((Ge.kind==="color"||Ge.kind==="formatted"||Ge.kind==="resolvedImage")&&(yt.kind==="value"||yt.kind==="string"))ve=V(ve,Ge,P.typeAnnotation||"coerce");else if(this.checkSubtype(Ge,yt))return null}if(!(ve instanceof qn)&&ve.type.kind!=="resolvedImage"&&Zo(ve)){var kt=new wa;try{ve=new qn(ve.type,ve.evaluate(kt))}catch(Ut){return this.error(Ut.message),null}}return ve}return this.error('Unknown expression "'+J+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof g=="undefined"?this.error("'undefined' value invalid. Use null instead."):typeof g=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof g+" instead.")},Xa.prototype.concat=function(g,P,V){var J=typeof g=="number"?this.path.concat(g):this.path,ae=V?this.scope.concat(V):this.scope;return new Xa(this.registry,J,P||null,ae,this.errors)},Xa.prototype.error=function(g){for(var P=[],V=arguments.length-1;V-- >0;)P[V]=arguments[V+1];var J=""+this.key+P.map(function(ae){return"["+ae+"]"}).join("");this.errors.push(new va(J,g))},Xa.prototype.checkSubtype=function(g,P){var V=_o(g,P);return V&&this.error(V),V};function Zo(m){if(m instanceof Cs)return Zo(m.boundExpression);if(m instanceof $i&&m.name==="error")return!1;if(m instanceof Sa)return!1;if(m instanceof vs)return!1;var g=m instanceof Ln||m instanceof Ya,P=!0;return m.eachChild(function(V){g?P=P&&Zo(V):P=P&&V instanceof qn}),P?Ks(m)&&Jn(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Eo(m,g){for(var P=m.length-1,V=0,J=P,ae=0,ve,Ge;V<=J;)if(ae=Math.floor((V+J)/2),ve=m[ae],Ge=m[ae+1],ve<=g){if(ae===P||g<Ge)return ae;V=ae+1}else if(ve>g)J=ae-1;else throw new Ia("Input is not a number.");return 0}var lo=function(g,P,V){this.type=g,this.input=P,this.labels=[],this.outputs=[];for(var J=0,ae=V;J<ae.length;J+=1){var ve=ae[J],Ge=ve[0],yt=ve[1];this.labels.push(Ge),this.outputs.push(yt)}};lo.parse=function(g,P){if(g.length-1<4)return P.error("Expected at least 4 arguments, but found only "+(g.length-1)+".");if((g.length-1)%2!==0)return P.error("Expected an even number of arguments.");var V=P.parse(g[1],1,Fi);if(!V)return null;var J=[],ae=null;P.expectedType&&P.expectedType.kind!=="value"&&(ae=P.expectedType);for(var ve=1;ve<g.length;ve+=2){var Ge=ve===1?-1/0:g[ve],yt=g[ve+1],kt=ve,Ut=ve+1;if(typeof Ge!="number")return P.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',kt);if(J.length&&J[J.length-1][0]>=Ge)return P.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',kt);var lr=P.parse(yt,Ut,ae);if(!lr)return null;ae=ae||lr.type,J.push([Ge,lr])}return new lo(ae,V,J)},lo.prototype.evaluate=function(g){var P=this.labels,V=this.outputs;if(P.length===1)return V[0].evaluate(g);var J=this.input.evaluate(g);if(J<=P[0])return V[0].evaluate(g);var ae=P.length;if(J>=P[ae-1])return V[ae-1].evaluate(g);var ve=Eo(P,J);return V[ve].evaluate(g)},lo.prototype.eachChild=function(g){g(this.input);for(var P=0,V=this.outputs;P<V.length;P+=1){var J=V[P];g(J)}},lo.prototype.outputDefined=function(){return this.outputs.every(function(g){return g.outputDefined()})},lo.prototype.serialize=function(){for(var g=["step",this.input.serialize()],P=0;P<this.labels.length;P++)P>0&&g.push(this.labels[P]),g.push(this.outputs[P].serialize());return g};function $a(m,g,P){return m*(1-P)+g*P}function Xo(m,g,P){return new Bn($a(m.r,g.r,P),$a(m.g,g.g,P),$a(m.b,g.b,P),$a(m.a,g.a,P))}function rs(m,g,P){return m.map(function(V,J){return $a(V,g[J],P)})}var $n=Object.freeze({__proto__:null,number:$a,color:Xo,array:rs}),Sn=.95047,uo=1,Rs=1.08883,xs=4/29,Go=6/29,os=3*Go*Go,So=Go*Go*Go,Qn=Math.PI/180,zo=180/Math.PI;function rl(m){return m>So?Math.pow(m,1/3):m/os+xs}function $o(m){return m>Go?m*m*m:os*(m-xs)}function Na(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function Ua(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function Po(m){var g=Ua(m.r),P=Ua(m.g),V=Ua(m.b),J=rl((.4124564*g+.3575761*P+.1804375*V)/Sn),ae=rl((.2126729*g+.7151522*P+.072175*V)/uo),ve=rl((.0193339*g+.119192*P+.9503041*V)/Rs);return{l:116*ae-16,a:500*(J-ae),b:200*(ae-ve),alpha:m.a}}function fo(m){var g=(m.l+16)/116,P=isNaN(m.a)?g:g+m.a/500,V=isNaN(m.b)?g:g-m.b/200;return g=uo*$o(g),P=Sn*$o(P),V=Rs*$o(V),new Bn(Na(3.2404542*P-1.5371385*g-.4985314*V),Na(-.969266*P+1.8760108*g+.041556*V),Na(.0556434*P-.2040259*g+1.0572252*V),m.alpha)}function ro(m,g,P){return{l:$a(m.l,g.l,P),a:$a(m.a,g.a,P),b:$a(m.b,g.b,P),alpha:$a(m.alpha,g.alpha,P)}}function Ma(m){var g=Po(m),P=g.l,V=g.a,J=g.b,ae=Math.atan2(J,V)*zo;return{h:ae<0?ae+360:ae,c:Math.sqrt(V*V+J*J),l:P,alpha:m.a}}function io(m){var g=m.h*Qn,P=m.c,V=m.l;return fo({l:V,a:Math.cos(g)*P,b:Math.sin(g)*P,alpha:m.alpha})}function aa(m,g,P){var V=g-m;return m+P*(V>180||V<-180?V-360*Math.round(V/360):V)}function Oo(m,g,P){return{h:aa(m.h,g.h,P),c:$a(m.c,g.c,P),l:$a(m.l,g.l,P),alpha:$a(m.alpha,g.alpha,P)}}var No={forward:Po,reverse:fo,interpolate:ro},Zs={forward:Ma,reverse:io,interpolate:Oo},Fs=Object.freeze({__proto__:null,lab:No,hcl:Zs}),ws=function(g,P,V,J,ae){this.type=g,this.operator=P,this.interpolation=V,this.input=J,this.labels=[],this.outputs=[];for(var ve=0,Ge=ae;ve<Ge.length;ve+=1){var yt=Ge[ve],kt=yt[0],Ut=yt[1];this.labels.push(kt),this.outputs.push(Ut)}};ws.interpolationFactor=function(g,P,V,J){var ae=0;if(g.name==="exponential")ae=no(P,g.base,V,J);else if(g.name==="linear")ae=no(P,1,V,J);else if(g.name==="cubic-bezier"){var ve=g.controlPoints,Ge=new s(ve[0],ve[1],ve[2],ve[3]);ae=Ge.solve(no(P,1,V,J))}return ae},ws.parse=function(g,P){var V=g[0],J=g[1],ae=g[2],ve=g.slice(3);if(!Array.isArray(J)||J.length===0)return P.error("Expected an interpolation type expression.",1);if(J[0]==="linear")J={name:"linear"};else if(J[0]==="exponential"){var Ge=J[1];if(typeof Ge!="number")return P.error("Exponential interpolation requires a numeric base.",1,1);J={name:"exponential",base:Ge}}else if(J[0]==="cubic-bezier"){var yt=J.slice(1);if(yt.length!==4||yt.some(function(rn){return typeof rn!="number"||rn<0||rn>1}))return P.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);J={name:"cubic-bezier",controlPoints:yt}}else return P.error("Unknown interpolation type "+String(J[0]),1,0);if(g.length-1<4)return P.error("Expected at least 4 arguments, but found only "+(g.length-1)+".");if((g.length-1)%2!==0)return P.error("Expected an even number of arguments.");if(ae=P.parse(ae,2,Fi),!ae)return null;var kt=[],Ut=null;V==="interpolate-hcl"||V==="interpolate-lab"?Ut=Qi:P.expectedType&&P.expectedType.kind!=="value"&&(Ut=P.expectedType);for(var lr=0;lr<ve.length;lr+=2){var kr=ve[lr],xr=ve[lr+1],ei=lr+3,Li=lr+4;if(typeof kr!="number")return P.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ei);if(kt.length&&kt[kt.length-1][0]>=kr)return P.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ei);var _n=P.parse(xr,Li,Ut);if(!_n)return null;Ut=Ut||_n.type,kt.push([kr,_n])}return Ut.kind!=="number"&&Ut.kind!=="color"&&!(Ut.kind==="array"&&Ut.itemType.kind==="number"&&typeof Ut.N=="number")?P.error("Type "+co(Ut)+" is not interpolatable."):new ws(Ut,V,J,ae,kt)},ws.prototype.evaluate=function(g){var P=this.labels,V=this.outputs;if(P.length===1)return V[0].evaluate(g);var J=this.input.evaluate(g);if(J<=P[0])return V[0].evaluate(g);var ae=P.length;if(J>=P[ae-1])return V[ae-1].evaluate(g);var ve=Eo(P,J),Ge=P[ve],yt=P[ve+1],kt=ws.interpolationFactor(this.interpolation,J,Ge,yt),Ut=V[ve].evaluate(g),lr=V[ve+1].evaluate(g);return this.operator==="interpolate"?$n[this.type.kind.toLowerCase()](Ut,lr,kt):this.operator==="interpolate-hcl"?Zs.reverse(Zs.interpolate(Zs.forward(Ut),Zs.forward(lr),kt)):No.reverse(No.interpolate(No.forward(Ut),No.forward(lr),kt))},ws.prototype.eachChild=function(g){g(this.input);for(var P=0,V=this.outputs;P<V.length;P+=1){var J=V[P];g(J)}},ws.prototype.outputDefined=function(){return this.outputs.every(function(g){return g.outputDefined()})},ws.prototype.serialize=function(){var g;this.interpolation.name==="linear"?g=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?g=["linear"]:g=["exponential",this.interpolation.base]:g=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var P=[this.operator,g,this.input.serialize()],V=0;V<this.labels.length;V++)P.push(this.labels[V],this.outputs[V].serialize());return P};function no(m,g,P,V){var J=V-P,ae=m-P;return J===0?0:g===1?ae/J:(Math.pow(g,ae)-1)/(Math.pow(g,J)-1)}var Ls=function(g,P){this.type=g,this.args=P};Ls.parse=function(g,P){if(g.length<2)return P.error("Expectected at least one argument.");var V=null,J=P.expectedType;J&&J.kind!=="value"&&(V=J);for(var ae=[],ve=0,Ge=g.slice(1);ve<Ge.length;ve+=1){var yt=Ge[ve],kt=P.parse(yt,1+ae.length,V,void 0,{typeAnnotation:"omit"});if(!kt)return null;V=V||kt.type,ae.push(kt)}var Ut=J&&ae.some(function(lr){return _o(J,lr.type)});return Ut?new Ls(Pn,ae):new Ls(V,ae)},Ls.prototype.evaluate=function(g){for(var P=null,V=0,J,ae=0,ve=this.args;ae<ve.length;ae+=1){var Ge=ve[ae];if(V++,P=Ge.evaluate(g),P&&P instanceof mn&&!P.available&&(J||(J=P.name),P=null,V===this.args.length&&(P=J)),P!==null)break}return P},Ls.prototype.eachChild=function(g){this.args.forEach(g)},Ls.prototype.outputDefined=function(){return this.args.every(function(g){return g.outputDefined()})},Ls.prototype.serialize=function(){var g=["coalesce"];return this.eachChild(function(P){g.push(P.serialize())}),g};var ds=function(g,P){this.type=P.type,this.bindings=[].concat(g),this.result=P};ds.prototype.evaluate=function(g){return this.result.evaluate(g)},ds.prototype.eachChild=function(g){for(var P=0,V=this.bindings;P<V.length;P+=1){var J=V[P];g(J[1])}g(this.result)},ds.parse=function(g,P){if(g.length<4)return P.error("Expected at least 3 arguments, but found "+(g.length-1)+" instead.");for(var V=[],J=1;J<g.length-1;J+=2){var ae=g[J];if(typeof ae!="string")return P.error("Expected string, but found "+typeof ae+" instead.",J);if(/[^a-zA-Z0-9_]/.test(ae))return P.error("Variable names must contain only alphanumeric characters or '_'.",J);var ve=P.parse(g[J+1],J+1);if(!ve)return null;V.push([ae,ve])}var Ge=P.parse(g[g.length-1],g.length-1,P.expectedType,V);return Ge?new ds(V,Ge):null},ds.prototype.outputDefined=function(){return this.result.outputDefined()},ds.prototype.serialize=function(){for(var g=["let"],P=0,V=this.bindings;P<V.length;P+=1){var J=V[P],ae=J[0],ve=J[1];g.push(ae,ve.serialize())}return g.push(this.result.serialize()),g};var Xs=function(g,P,V){this.type=g,this.index=P,this.input=V};Xs.parse=function(g,P){if(g.length!==3)return P.error("Expected 2 arguments, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1,Fi),J=P.parse(g[2],2,Oa(P.expectedType||Pn));if(!V||!J)return null;var ae=J.type;return new Xs(ae.itemType,V,J)},Xs.prototype.evaluate=function(g){var P=this.index.evaluate(g),V=this.input.evaluate(g);if(P<0)throw new Ia("Array index out of bounds: "+P+" < 0.");if(P>=V.length)throw new Ia("Array index out of bounds: "+P+" > "+(V.length-1)+".");if(P!==Math.floor(P))throw new Ia("Array index must be an integer, but found "+P+" instead.");return V[P]},Xs.prototype.eachChild=function(g){g(this.index),g(this.input)},Xs.prototype.outputDefined=function(){return!1},Xs.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var oa=function(g,P){this.type=xa,this.needle=g,this.haystack=P};oa.parse=function(g,P){if(g.length!==3)return P.error("Expected 2 arguments, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1,Pn),J=P.parse(g[2],2,Pn);return!V||!J?null:ks(V.type,[xa,Yn,Fi,Co,Pn])?new oa(V,J):P.error("Expected first argument to be of type boolean, string, number or null, but found "+co(V.type)+" instead")},oa.prototype.evaluate=function(g){var P=this.needle.evaluate(g),V=this.haystack.evaluate(g);if(!V)return!1;if(!bs(P,["boolean","string","number","null"]))throw new Ia("Expected first argument to be of type boolean, string, number or null, but found "+co(bn(P))+" instead.");if(!bs(V,["string","array"]))throw new Ia("Expected second argument to be of type array or string, but found "+co(bn(V))+" instead.");return V.indexOf(P)>=0},oa.prototype.eachChild=function(g){g(this.needle),g(this.haystack)},oa.prototype.outputDefined=function(){return!0},oa.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Yo=function(g,P,V){this.type=Fi,this.needle=g,this.haystack=P,this.fromIndex=V};Yo.parse=function(g,P){if(g.length<=2||g.length>=5)return P.error("Expected 3 or 4 arguments, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1,Pn),J=P.parse(g[2],2,Pn);if(!V||!J)return null;if(!ks(V.type,[xa,Yn,Fi,Co,Pn]))return P.error("Expected first argument to be of type boolean, string, number or null, but found "+co(V.type)+" instead");if(g.length===4){var ae=P.parse(g[3],3,Fi);return ae?new Yo(V,J,ae):null}else return new Yo(V,J)},Yo.prototype.evaluate=function(g){var P=this.needle.evaluate(g),V=this.haystack.evaluate(g);if(!bs(P,["boolean","string","number","null"]))throw new Ia("Expected first argument to be of type boolean, string, number or null, but found "+co(bn(P))+" instead.");if(!bs(V,["string","array"]))throw new Ia("Expected second argument to be of type array or string, but found "+co(bn(V))+" instead.");if(this.fromIndex){var J=this.fromIndex.evaluate(g);return V.indexOf(P,J)}return V.indexOf(P)},Yo.prototype.eachChild=function(g){g(this.needle),g(this.haystack),this.fromIndex&&g(this.fromIndex)},Yo.prototype.outputDefined=function(){return!1},Yo.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var g=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),g]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var po=function(g,P,V,J,ae,ve){this.inputType=g,this.type=P,this.input=V,this.cases=J,this.outputs=ae,this.otherwise=ve};po.parse=function(g,P){if(g.length<5)return P.error("Expected at least 4 arguments, but found only "+(g.length-1)+".");if(g.length%2!==1)return P.error("Expected an even number of arguments.");var V,J;P.expectedType&&P.expectedType.kind!=="value"&&(J=P.expectedType);for(var ae={},ve=[],Ge=2;Ge<g.length-1;Ge+=2){var yt=g[Ge],kt=g[Ge+1];Array.isArray(yt)||(yt=[yt]);var Ut=P.concat(Ge);if(yt.length===0)return Ut.error("Expected at least one branch label.");for(var lr=0,kr=yt;lr<kr.length;lr+=1){var xr=kr[lr];if(typeof xr!="number"&&typeof xr!="string")return Ut.error("Branch labels must be numbers or strings.");if(typeof xr=="number"&&Math.abs(xr)>Number.MAX_SAFE_INTEGER)return Ut.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof xr=="number"&&Math.floor(xr)!==xr)return Ut.error("Numeric branch labels must be integer values.");if(!V)V=bn(xr);else if(Ut.checkSubtype(V,bn(xr)))return null;if(typeof ae[String(xr)]!="undefined")return Ut.error("Branch labels must be unique.");ae[String(xr)]=ve.length}var ei=P.parse(kt,Ge,J);if(!ei)return null;J=J||ei.type,ve.push(ei)}var Li=P.parse(g[1],1,Pn);if(!Li)return null;var _n=P.parse(g[g.length-1],g.length-1,J);return!_n||Li.type.kind!=="value"&&P.concat(1).checkSubtype(V,Li.type)?null:new po(V,J,Li,ae,ve,_n)},po.prototype.evaluate=function(g){var P=this.input.evaluate(g),V=bn(P)===this.inputType&&this.outputs[this.cases[P]]||this.otherwise;return V.evaluate(g)},po.prototype.eachChild=function(g){g(this.input),this.outputs.forEach(g),g(this.otherwise)},po.prototype.outputDefined=function(){return this.outputs.every(function(g){return g.outputDefined()})&&this.otherwise.outputDefined()},po.prototype.serialize=function(){for(var g=this,P=["match",this.input.serialize()],V=Object.keys(this.cases).sort(),J=[],ae={},ve=0,Ge=V;ve<Ge.length;ve+=1){var yt=Ge[ve],kt=ae[this.cases[yt]];kt===void 0?(ae[this.cases[yt]]=J.length,J.push([this.cases[yt],[yt]])):J[kt][1].push(yt)}for(var Ut=function(Li){return g.inputType.kind==="number"?Number(Li):Li},lr=0,kr=J;lr<kr.length;lr+=1){var xr=kr[lr],kt=xr[0],ei=xr[1];ei.length===1?P.push(Ut(ei[0])):P.push(ei.map(Ut)),P.push(this.outputs[outputIndex$1].serialize())}return P.push(this.otherwise.serialize()),P};var ss=function(g,P,V){this.type=g,this.branches=P,this.otherwise=V};ss.parse=function(g,P){if(g.length<4)return P.error("Expected at least 3 arguments, but found only "+(g.length-1)+".");if(g.length%2!==0)return P.error("Expected an odd number of arguments.");var V;P.expectedType&&P.expectedType.kind!=="value"&&(V=P.expectedType);for(var J=[],ae=1;ae<g.length-1;ae+=2){var ve=P.parse(g[ae],ae,xa);if(!ve)return null;var Ge=P.parse(g[ae+1],ae+1,V);if(!Ge)return null;J.push([ve,Ge]),V=V||Ge.type}var yt=P.parse(g[g.length-1],g.length-1,V);return yt?new ss(V,J,yt):null},ss.prototype.evaluate=function(g){for(var P=0,V=this.branches;P<V.length;P+=1){var J=V[P],ae=J[0],ve=J[1];if(ae.evaluate(g))return ve.evaluate(g)}return this.otherwise.evaluate(g)},ss.prototype.eachChild=function(g){for(var P=0,V=this.branches;P<V.length;P+=1){var J=V[P],ae=J[0],ve=J[1];g(ae),g(ve)}g(this.otherwise)},ss.prototype.outputDefined=function(){return this.branches.every(function(g){var P=g[0],V=g[1];return V.outputDefined()})&&this.otherwise.outputDefined()},ss.prototype.serialize=function(){var g=["case"];return this.eachChild(function(P){g.push(P.serialize())}),g};var ls=function(g,P,V,J){this.type=g,this.input=P,this.beginIndex=V,this.endIndex=J};ls.parse=function(g,P){if(g.length<=2||g.length>=5)return P.error("Expected 3 or 4 arguments, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1,Pn),J=P.parse(g[2],2,Fi);if(!V||!J)return null;if(!ks(V.type,[Oa(Pn),Yn,Pn]))return P.error("Expected first argument to be of type array or string, but found "+co(V.type)+" instead");if(g.length===4){var ae=P.parse(g[3],3,Fi);return ae?new ls(V.type,V,J,ae):null}else return new ls(V.type,V,J)},ls.prototype.evaluate=function(g){var P=this.input.evaluate(g),V=this.beginIndex.evaluate(g);if(!bs(P,["string","array"]))throw new Ia("Expected first argument to be of type array or string, but found "+co(bn(P))+" instead.");if(this.endIndex){var J=this.endIndex.evaluate(g);return P.slice(V,J)}return P.slice(V)},ls.prototype.eachChild=function(g){g(this.input),g(this.beginIndex),this.endIndex&&g(this.endIndex)},ls.prototype.outputDefined=function(){return!1},ls.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var g=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),g]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function gs(m,g){return m==="=="||m==="!="?g.kind==="boolean"||g.kind==="string"||g.kind==="number"||g.kind==="null"||g.kind==="value":g.kind==="string"||g.kind==="number"||g.kind==="value"}function bt(m,g,P){return g===P}function Ft(m,g,P){return g!==P}function hr(m,g,P){return g<P}function nr(m,g,P){return g>P}function Sr(m,g,P){return g<=P}function li(m,g,P){return g>=P}function di(m,g,P,V){return V.compare(g,P)===0}function mi(m,g,P,V){return!di(m,g,P,V)}function Oi(m,g,P,V){return V.compare(g,P)<0}function dn(m,g,P,V){return V.compare(g,P)>0}function wi(m,g,P,V){return V.compare(g,P)<=0}function ui(m,g,P,V){return V.compare(g,P)>=0}function Ai(m,g,P){var V=m!=="=="&&m!=="!=";return function(){function J(ae,ve,Ge){this.type=xa,this.lhs=ae,this.rhs=ve,this.collator=Ge,this.hasUntypedArgument=ae.type.kind==="value"||ve.type.kind==="value"}return J.parse=function(ve,Ge){if(ve.length!==3&&ve.length!==4)return Ge.error("Expected two or three arguments.");var yt=ve[0],kt=Ge.parse(ve[1],1,Pn);if(!kt)return null;if(!gs(yt,kt.type))return Ge.concat(1).error('"'+yt+`" comparisons are not supported for type '`+co(kt.type)+"'.");var Ut=Ge.parse(ve[2],2,Pn);if(!Ut)return null;if(!gs(yt,Ut.type))return Ge.concat(2).error('"'+yt+`" comparisons are not supported for type '`+co(Ut.type)+"'.");if(kt.type.kind!==Ut.type.kind&&kt.type.kind!=="value"&&Ut.type.kind!=="value")return Ge.error("Cannot compare types '"+co(kt.type)+"' and '"+co(Ut.type)+"'.");V&&(kt.type.kind==="value"&&Ut.type.kind!=="value"?kt=new Ya(Ut.type,[kt]):kt.type.kind!=="value"&&Ut.type.kind==="value"&&(Ut=new Ya(kt.type,[Ut])));var lr=null;if(ve.length===4){if(kt.type.kind!=="string"&&Ut.type.kind!=="string"&&kt.type.kind!=="value"&&Ut.type.kind!=="value")return Ge.error("Cannot use collator to compare non-string types.");if(lr=Ge.parse(ve[3],3,jo),!lr)return null}return new J(kt,Ut,lr)},J.prototype.evaluate=function(ve){var Ge=this.lhs.evaluate(ve),yt=this.rhs.evaluate(ve);if(V&&this.hasUntypedArgument){var kt=bn(Ge),Ut=bn(yt);if(kt.kind!==Ut.kind||!(kt.kind==="string"||kt.kind==="number"))throw new Ia('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+kt.kind+", "+Ut.kind+") instead.")}if(this.collator&&!V&&this.hasUntypedArgument){var lr=bn(Ge),kr=bn(yt);if(lr.kind!=="string"||kr.kind!=="string")return g(ve,Ge,yt)}return this.collator?P(ve,Ge,yt,this.collator.evaluate(ve)):g(ve,Ge,yt)},J.prototype.eachChild=function(ve){ve(this.lhs),ve(this.rhs),this.collator&&ve(this.collator)},J.prototype.outputDefined=function(){return!0},J.prototype.serialize=function(){var ve=[m];return this.eachChild(function(Ge){ve.push(Ge.serialize())}),ve},J}()}var gi=Ai("==",bt,di),gn=Ai("!=",Ft,mi),In=Ai("<",hr,Oi),Vn=Ai(">",nr,dn),Rn=Ai("<=",Sr,wi),Hn=Ai(">=",li,ui),Gn=function(g,P,V,J,ae){this.type=Yn,this.number=g,this.locale=P,this.currency=V,this.minFractionDigits=J,this.maxFractionDigits=ae};Gn.parse=function(g,P){if(g.length!==3)return P.error("Expected two arguments.");var V=P.parse(g[1],1,Fi);if(!V)return null;var J=g[2];if(typeof J!="object"||Array.isArray(J))return P.error("NumberFormat options argument must be an object.");var ae=null;if(J.locale&&(ae=P.parse(J.locale,1,Yn),!ae))return null;var ve=null;if(J.currency&&(ve=P.parse(J.currency,1,Yn),!ve))return null;var Ge=null;if(J["min-fraction-digits"]&&(Ge=P.parse(J["min-fraction-digits"],1,Fi),!Ge))return null;var yt=null;return J["max-fraction-digits"]&&(yt=P.parse(J["max-fraction-digits"],1,Fi),!yt)?null:new Gn(V,ae,ve,Ge,yt)},Gn.prototype.evaluate=function(g){return new Intl.NumberFormat(this.locale?this.locale.evaluate(g):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(g):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(g):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(g):void 0}).format(this.number.evaluate(g))},Gn.prototype.eachChild=function(g){g(this.number),this.locale&&g(this.locale),this.currency&&g(this.currency),this.minFractionDigits&&g(this.minFractionDigits),this.maxFractionDigits&&g(this.maxFractionDigits)},Gn.prototype.outputDefined=function(){return!1},Gn.prototype.serialize=function(){var g={};return this.locale&&(g.locale=this.locale.serialize()),this.currency&&(g.currency=this.currency.serialize()),this.minFractionDigits&&(g["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(g["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),g]};var pn=function(g){this.type=Fi,this.input=g};pn.parse=function(g,P){if(g.length!==2)return P.error("Expected 1 argument, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1);return V?V.type.kind!=="array"&&V.type.kind!=="string"&&V.type.kind!=="value"?P.error("Expected argument of type string or array, but found "+co(V.type)+" instead."):new pn(V):null},pn.prototype.evaluate=function(g){var P=this.input.evaluate(g);if(typeof P=="string")return P.length;if(Array.isArray(P))return P.length;throw new Ia("Expected value to be of type string or array, but found "+co(bn(P))+" instead.")},pn.prototype.eachChild=function(g){g(this.input)},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){var g=["length"];return this.eachChild(function(P){g.push(P.serialize())}),g};var Lo={"==":gi,"!=":gn,">":Vn,"<":In,">=":Hn,"<=":Rn,array:Ya,at:Xs,boolean:Ya,case:ss,coalesce:Ls,collator:Sa,format:ba,image:Da,in:oa,"index-of":Yo,interpolate:ws,"interpolate-hcl":ws,"interpolate-lab":ws,length:pn,let:ds,literal:qn,match:po,number:Ya,"number-format":Gn,object:Ya,slice:ls,step:lo,string:Ya,"to-boolean":Ln,"to-color":Ln,"to-number":Ln,"to-string":Ln,var:Cs,within:vs};function us(m,g){var P=g[0],V=g[1],J=g[2],ae=g[3];P=P.evaluate(m),V=V.evaluate(m),J=J.evaluate(m);var ve=ae?ae.evaluate(m):1,Ge=Ga(P,V,J,ve);if(Ge)throw new Ia(Ge);return new Bn(P/255*ve,V/255*ve,J/255*ve,ve)}function Bs(m,g){return m in g}function Js(m,g){var P=g[m];return typeof P=="undefined"?null:P}function ol(m,g,P,V){for(;P<=V;){var J=P+V>>1;if(g[J]===m)return!0;g[J]>m?V=J-1:P=J+1}return!1}function Cl(m){return{type:m}}$i.register(Lo,{error:[qa,[Yn],function(m,g){var P=g[0];throw new Ia(P.evaluate(m))}],typeof:[Yn,[Pn],function(m,g){var P=g[0];return co(bn(P.evaluate(m)))}],"to-rgba":[Oa(Fi,4),[Qi],function(m,g){var P=g[0];return P.evaluate(m).toArray()}],rgb:[Qi,[Fi,Fi,Fi],us],rgba:[Qi,[Fi,Fi,Fi,Fi],us],has:{type:xa,overloads:[[[Yn],function(m,g){var P=g[0];return Bs(P.evaluate(m),m.properties())}],[[Yn,Nn],function(m,g){var P=g[0],V=g[1];return Bs(P.evaluate(m),V.evaluate(m))}]]},get:{type:Pn,overloads:[[[Yn],function(m,g){var P=g[0];return Js(P.evaluate(m),m.properties())}],[[Yn,Nn],function(m,g){var P=g[0],V=g[1];return Js(P.evaluate(m),V.evaluate(m))}]]},"feature-state":[Pn,[Yn],function(m,g){var P=g[0];return Js(P.evaluate(m),m.featureState||{})}],properties:[Nn,[],function(m){return m.properties()}],"geometry-type":[Yn,[],function(m){return m.geometryType()}],id:[Pn,[],function(m){return m.id()}],zoom:[Fi,[],function(m){return m.globals.zoom}],"heatmap-density":[Fi,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[Fi,[],function(m){return m.globals.lineProgress||0}],accumulated:[Pn,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[Fi,Cl(Fi),function(m,g){for(var P=0,V=0,J=g;V<J.length;V+=1){var ae=J[V];P+=ae.evaluate(m)}return P}],"*":[Fi,Cl(Fi),function(m,g){for(var P=1,V=0,J=g;V<J.length;V+=1){var ae=J[V];P*=ae.evaluate(m)}return P}],"-":{type:Fi,overloads:[[[Fi,Fi],function(m,g){var P=g[0],V=g[1];return P.evaluate(m)-V.evaluate(m)}],[[Fi],function(m,g){var P=g[0];return-P.evaluate(m)}]]},"/":[Fi,[Fi,Fi],function(m,g){var P=g[0],V=g[1];return P.evaluate(m)/V.evaluate(m)}],"%":[Fi,[Fi,Fi],function(m,g){var P=g[0],V=g[1];return P.evaluate(m)%V.evaluate(m)}],ln2:[Fi,[],function(){return Math.LN2}],pi:[Fi,[],function(){return Math.PI}],e:[Fi,[],function(){return Math.E}],"^":[Fi,[Fi,Fi],function(m,g){var P=g[0],V=g[1];return Math.pow(P.evaluate(m),V.evaluate(m))}],sqrt:[Fi,[Fi],function(m,g){var P=g[0];return Math.sqrt(P.evaluate(m))}],log10:[Fi,[Fi],function(m,g){var P=g[0];return Math.log(P.evaluate(m))/Math.LN10}],ln:[Fi,[Fi],function(m,g){var P=g[0];return Math.log(P.evaluate(m))}],log2:[Fi,[Fi],function(m,g){var P=g[0];return Math.log(P.evaluate(m))/Math.LN2}],sin:[Fi,[Fi],function(m,g){var P=g[0];return Math.sin(P.evaluate(m))}],cos:[Fi,[Fi],function(m,g){var P=g[0];return Math.cos(P.evaluate(m))}],tan:[Fi,[Fi],function(m,g){var P=g[0];return Math.tan(P.evaluate(m))}],asin:[Fi,[Fi],function(m,g){var P=g[0];return Math.asin(P.evaluate(m))}],acos:[Fi,[Fi],function(m,g){var P=g[0];return Math.acos(P.evaluate(m))}],atan:[Fi,[Fi],function(m,g){var P=g[0];return Math.atan(P.evaluate(m))}],min:[Fi,Cl(Fi),function(m,g){return Math.min.apply(Math,g.map(function(P){return P.evaluate(m)}))}],max:[Fi,Cl(Fi),function(m,g){return Math.max.apply(Math,g.map(function(P){return P.evaluate(m)}))}],abs:[Fi,[Fi],function(m,g){var P=g[0];return Math.abs(P.evaluate(m))}],round:[Fi,[Fi],function(m,g){var P=g[0],V=P.evaluate(m);return V<0?-Math.round(-V):Math.round(V)}],floor:[Fi,[Fi],function(m,g){var P=g[0];return Math.floor(P.evaluate(m))}],ceil:[Fi,[Fi],function(m,g){var P=g[0];return Math.ceil(P.evaluate(m))}],"filter-==":[xa,[Yn,Pn],function(m,g){var P=g[0],V=g[1];return m.properties()[P.value]===V.value}],"filter-id-==":[xa,[Pn],function(m,g){var P=g[0];return m.id()===P.value}],"filter-type-==":[xa,[Yn],function(m,g){var P=g[0];return m.geometryType()===P.value}],"filter-<":[xa,[Yn,Pn],function(m,g){var P=g[0],V=g[1],J=m.properties()[P.value],ae=V.value;return typeof J==typeof ae&&J<ae}],"filter-id-<":[xa,[Pn],function(m,g){var P=g[0],V=m.id(),J=P.value;return typeof V==typeof J&&V<J}],"filter->":[xa,[Yn,Pn],function(m,g){var P=g[0],V=g[1],J=m.properties()[P.value],ae=V.value;return typeof J==typeof ae&&J>ae}],"filter-id->":[xa,[Pn],function(m,g){var P=g[0],V=m.id(),J=P.value;return typeof V==typeof J&&V>J}],"filter-<=":[xa,[Yn,Pn],function(m,g){var P=g[0],V=g[1],J=m.properties()[P.value],ae=V.value;return typeof J==typeof ae&&J<=ae}],"filter-id-<=":[xa,[Pn],function(m,g){var P=g[0],V=m.id(),J=P.value;return typeof V==typeof J&&V<=J}],"filter->=":[xa,[Yn,Pn],function(m,g){var P=g[0],V=g[1],J=m.properties()[P.value],ae=V.value;return typeof J==typeof ae&&J>=ae}],"filter-id->=":[xa,[Pn],function(m,g){var P=g[0],V=m.id(),J=P.value;return typeof V==typeof J&&V>=J}],"filter-has":[xa,[Pn],function(m,g){var P=g[0];return P.value in m.properties()}],"filter-has-id":[xa,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[xa,[Oa(Yn)],function(m,g){var P=g[0];return P.value.indexOf(m.geometryType())>=0}],"filter-id-in":[xa,[Oa(Pn)],function(m,g){var P=g[0];return P.value.indexOf(m.id())>=0}],"filter-in-small":[xa,[Yn,Oa(Pn)],function(m,g){var P=g[0],V=g[1];return V.value.indexOf(m.properties()[P.value])>=0}],"filter-in-large":[xa,[Yn,Oa(Pn)],function(m,g){var P=g[0],V=g[1];return ol(m.properties()[P.value],V.value,0,V.value.length-1)}],all:{type:xa,overloads:[[[xa,xa],function(m,g){var P=g[0],V=g[1];return P.evaluate(m)&&V.evaluate(m)}],[Cl(xa),function(m,g){for(var P=0,V=g;P<V.length;P+=1){var J=V[P];if(!J.evaluate(m))return!1}return!0}]]},any:{type:xa,overloads:[[[xa,xa],function(m,g){var P=g[0],V=g[1];return P.evaluate(m)||V.evaluate(m)}],[Cl(xa),function(m,g){for(var P=0,V=g;P<V.length;P+=1){var J=V[P];if(J.evaluate(m))return!0}return!1}]]},"!":[xa,[xa],function(m,g){var P=g[0];return!P.evaluate(m)}],"is-supported-script":[xa,[Yn],function(m,g){var P=g[0],V=m.globals&&m.globals.isSupportedScript;return V?V(P.evaluate(m)):!0}],upcase:[Yn,[Yn],function(m,g){var P=g[0];return P.evaluate(m).toUpperCase()}],downcase:[Yn,[Yn],function(m,g){var P=g[0];return P.evaluate(m).toLowerCase()}],concat:[Yn,Cl(Pn),function(m,g){return g.map(function(P){return Xi(P.evaluate(m))}).join("")}],"resolved-locale":[Yn,[jo],function(m,g){var P=g[0];return P.evaluate(m).resolvedLocale()}]});function ul(m){return{result:"success",value:m}}function Gl(m){return{result:"error",value:m}}function Vl(m){return m["property-type"]==="data-driven"||m["property-type"]==="cross-faded-data-driven"}function Fl(m){return!!m.expression&&m.expression.parameters.indexOf("zoom")>-1}function ga(m){return!!m.expression&&m.expression.interpolated}function ko(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function zs(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function Fo(m){return m}function Ys(m,g){var P=g.type==="color",V=m.stops&&typeof m.stops[0][0]=="object",J=V||m.property!==void 0,ae=V||!J,ve=m.type||(ga(g)?"exponential":"interval");if(P&&(m=pa({},m),m.stops&&(m.stops=m.stops.map(function(fl){return[fl[0],Bn.parse(fl[1])]})),m.default?m.default=Bn.parse(m.default):m.default=Bn.parse(g.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!Fs[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var Ge,yt,kt;if(ve==="exponential")Ge=_l;else if(ve==="interval")Ge=Sl;else if(ve==="categorical"){Ge=Us,yt=Object.create(null);for(var Ut=0,lr=m.stops;Ut<lr.length;Ut+=1){var kr=lr[Ut];yt[kr[0]]=kr[1]}kt=typeof m.stops[0][0]}else if(ve==="identity")Ge=kl;else throw new Error('Unknown function type "'+ve+'"');if(V){for(var xr={},ei=[],Li=0;Li<m.stops.length;Li++){var _n=m.stops[Li],rn=_n[0].zoom;xr[rn]===void 0&&(xr[rn]={zoom:rn,type:m.type,property:m.property,default:m.default,stops:[]},ei.push(rn)),xr[rn].stops.push([_n[0].value,_n[1]])}for(var Fa=[],On=0,Ra=ei;On<Ra.length;On+=1){var so=Ra[On];Fa.push([xr[so].zoom,Ys(xr[so],g)])}var As={name:"linear"};return{kind:"composite",interpolationType:As,interpolationFactor:ws.interpolationFactor.bind(void 0,As),zoomStops:Fa.map(function(fl){return fl[0]}),evaluate:function(eu,Ol){var Xl=eu.zoom;return _l({stops:Fa,base:m.base},g,Xl).evaluate(Xl,Ol)}}}else if(ae){var dl=ve==="exponential"?{name:"exponential",base:m.base!==void 0?m.base:1}:null;return{kind:"camera",interpolationType:dl,interpolationFactor:ws.interpolationFactor.bind(void 0,dl),zoomStops:m.stops.map(function(fl){return fl[0]}),evaluate:function(fl){var eu=fl.zoom;return Ge(m,g,eu,yt,kt)}}}else return{kind:"source",evaluate:function(eu,Ol){var Xl=Ol&&Ol.properties?Ol.properties[m.property]:void 0;return Xl===void 0?Gs(m.default,g.default):Ge(m,g,Xl,yt,kt)}}}function Gs(m,g,P){if(m!==void 0)return m;if(g!==void 0)return g;if(P!==void 0)return P}function Us(m,g,P,V,J){var ae=typeof P===J?V[P]:void 0;return Gs(ae,m.default,g.default)}function Sl(m,g,P){if(ko(P)!=="number")return Gs(m.default,g.default);var V=m.stops.length;if(V===1||P<=m.stops[0][0])return m.stops[0][1];if(P>=m.stops[V-1][0])return m.stops[V-1][1];var J=Eo(m.stops.map(function(ae){return ae[0]}),P);return m.stops[J][1]}function _l(m,g,P){var V=m.base!==void 0?m.base:1;if(ko(P)!=="number")return Gs(m.default,g.default);var J=m.stops.length;if(J===1||P<=m.stops[0][0])return m.stops[0][1];if(P>=m.stops[J-1][0])return m.stops[J-1][1];var ae=Eo(m.stops.map(function(lr){return lr[0]}),P),ve=cl(P,V,m.stops[ae][0],m.stops[ae+1][0]),Ge=m.stops[ae][1],yt=m.stops[ae+1][1],kt=$n[g.type]||Fo;if(m.colorSpace&&m.colorSpace!=="rgb"){var Ut=Fs[m.colorSpace];kt=function(lr,kr){return Ut.reverse(Ut.interpolate(Ut.forward(lr),Ut.forward(kr),ve))}}return typeof Ge.evaluate=="function"?{evaluate:function(){for(var kr=[],xr=arguments.length;xr--;)kr[xr]=arguments[xr];var ei=Ge.evaluate.apply(void 0,kr),Li=yt.evaluate.apply(void 0,kr);if(!(ei===void 0||Li===void 0))return kt(ei,Li,ve)}}:kt(Ge,yt,ve)}function kl(m,g,P){return g.type==="color"?P=Bn.parse(P):g.type==="formatted"?P=on.fromString(P.toString()):g.type==="resolvedImage"?P=mn.fromString(P.toString()):ko(P)!==g.type&&(g.type!=="enum"||!g.values[P])&&(P=void 0),Gs(P,m.default,g.default)}function cl(m,g,P,V){var J=V-P,ae=m-P;return J===0?0:g===1?ae/J:(Math.pow(g,ae)-1)/(Math.pow(g,J)-1)}var xl=function(g,P){this.expression=g,this._warningHistory={},this._evaluator=new wa,this._defaultValue=P?ee(P):null,this._enumValues=P&&P.type==="enum"?P.values:null};xl.prototype.evaluateWithoutErrorHandling=function(g,P,V,J,ae,ve){return this._evaluator.globals=g,this._evaluator.feature=P,this._evaluator.featureState=V,this._evaluator.canonical=J,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=ve,this.expression.evaluate(this._evaluator)},xl.prototype.evaluate=function(g,P,V,J,ae,ve){this._evaluator.globals=g,this._evaluator.feature=P||null,this._evaluator.featureState=V||null,this._evaluator.canonical=J,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=ve||null;try{var Ge=this.expression.evaluate(this._evaluator);if(Ge==null||typeof Ge=="number"&&Ge!==Ge)return this._defaultValue;if(this._enumValues&&!(Ge in this._enumValues))throw new Ia("Expected value to be one of "+Object.keys(this._enumValues).map(function(yt){return JSON.stringify(yt)}).join(", ")+", but found "+JSON.stringify(Ge)+" instead.");return Ge}catch(yt){return this._warningHistory[yt.message]||(this._warningHistory[yt.message]=!0,typeof console!="undefined"&&console.warn(yt.message)),this._defaultValue}};function Uo(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in Lo}function _s(m,g){var P=new Xa(Lo,[],g?Q(g):void 0),V=P.parse(m,void 0,void 0,void 0,g&&g.type==="string"?{typeAnnotation:"coerce"}:void 0);return V?ul(new xl(V,g)):Gl(P.errors)}var Bl=function(g,P){this.kind=g,this._styleExpression=P,this.isStateDependent=g!=="constant"&&!as(P.expression)};Bl.prototype.evaluateWithoutErrorHandling=function(g,P,V,J,ae,ve){return this._styleExpression.evaluateWithoutErrorHandling(g,P,V,J,ae,ve)},Bl.prototype.evaluate=function(g,P,V,J,ae,ve){return this._styleExpression.evaluate(g,P,V,J,ae,ve)};var Il=function(g,P,V,J){this.kind=g,this.zoomStops=V,this._styleExpression=P,this.isStateDependent=g!=="camera"&&!as(P.expression),this.interpolationType=J};Il.prototype.evaluateWithoutErrorHandling=function(g,P,V,J,ae,ve){return this._styleExpression.evaluateWithoutErrorHandling(g,P,V,J,ae,ve)},Il.prototype.evaluate=function(g,P,V,J,ae,ve){return this._styleExpression.evaluate(g,P,V,J,ae,ve)},Il.prototype.interpolationFactor=function(g,P,V){return this.interpolationType?ws.interpolationFactor(this.interpolationType,g,P,V):0};function Dl(m,g){if(m=_s(m,g),m.result==="error")return m;var P=m.value.expression,V=Ks(P);if(!V&&!Vl(g))return Gl([new va("","data expressions not supported")]);var J=Jn(P,["zoom"]);if(!J&&!Fl(g))return Gl([new va("","zoom expressions not supported")]);var ae=B(P);if(!ae&&!J)return Gl([new va("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ae instanceof va)return Gl([ae]);if(ae instanceof ws&&!ga(g))return Gl([new va("",'"interpolate" expressions cannot be used with this property')]);if(!ae)return ul(V?new Bl("constant",m.value):new Bl("source",m.value));var ve=ae instanceof ws?ae.interpolation:void 0;return ul(V?new Il("camera",m.value,ae.labels,ve):new Il("composite",m.value,ae.labels,ve))}var oe=function(g,P){this._parameters=g,this._specification=P,pa(this,Ys(this._parameters,this._specification))};oe.deserialize=function(g){return new oe(g._parameters,g._specification)},oe.serialize=function(g){return{_parameters:g._parameters,_specification:g._specification}};function w(m,g){if(zs(m))return new oe(m,g);if(Uo(m)){var P=Dl(m,g);if(P.result==="error")throw new Error(P.value.map(function(J){return J.key+": "+J.message}).join(", "));return P.value}else{var V=m;return typeof m=="string"&&g.type==="color"&&(V=Bn.parse(m)),{kind:"constant",evaluate:function(){return V}}}}function B(m){var g=null;if(m instanceof ds)g=B(m.result);else if(m instanceof Ls)for(var P=0,V=m.args;P<V.length;P+=1){var J=V[P];if(g=B(J),g)break}else(m instanceof lo||m instanceof ws)&&m.input instanceof $i&&m.input.name==="zoom"&&(g=m);return g instanceof va||m.eachChild(function(ae){var ve=B(ae);ve instanceof va?g=ve:!g&&ve?g=new va("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):g&&ve&&g!==ve&&(g=new va("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),g}function Q(m){var g={color:Qi,string:Yn,number:Fi,enum:Yn,boolean:xa,formatted:Vo,resolvedImage:Pa};return m.type==="array"?Oa(g[m.value]||Pn,m.length):g[m.type]}function ee(m){return m.type==="color"&&zs(m.default)?new Bn(0,0,0,0):m.type==="color"?Bn.parse(m.default)||null:m.default===void 0?null:m.default}function le(m){var g=m.key,P=m.value,V=m.valueSpec||{},J=m.objectElementValidators||{},ae=m.style,ve=m.styleSpec,Ge=[],yt=ko(P);if(yt!=="object")return[new an(g,P,"object expected, "+yt+" found")];for(var kt in P){var Ut=kt.split(".")[0],lr=V[Ut]||V["*"],kr=void 0;if(J[Ut])kr=J[Ut];else if(V[Ut])kr=pl;else if(J["*"])kr=J["*"];else if(V["*"])kr=pl;else{Ge.push(new an(g,P[kt],'unknown property "'+kt+'"'));continue}Ge=Ge.concat(kr({key:(g&&g+".")+kt,value:P[kt],valueSpec:lr,style:ae,styleSpec:ve,object:P,objectKey:kt},P))}for(var xr in V)J[xr]||V[xr].required&&V[xr].default===void 0&&P[xr]===void 0&&Ge.push(new an(g,P,'missing required property "'+xr+'"'));return Ge}function Ne(m){var g=m.value,P=m.valueSpec,V=m.style,J=m.styleSpec,ae=m.key,ve=m.arrayElementValidator||pl;if(ko(g)!=="array")return[new an(ae,g,"array expected, "+ko(g)+" found")];if(P.length&&g.length!==P.length)return[new an(ae,g,"array length "+P.length+" expected, length "+g.length+" found")];if(P["min-length"]&&g.length<P["min-length"])return[new an(ae,g,"array length at least "+P["min-length"]+" expected, length "+g.length+" found")];var Ge={type:P.value,values:P.values};J.$version<7&&(Ge.function=P.function),ko(P.value)==="object"&&(Ge=P.value);for(var yt=[],kt=0;kt<g.length;kt++)yt=yt.concat(ve({array:g,arrayIndex:kt,value:g[kt],valueSpec:Ge,style:V,styleSpec:J,key:ae+"["+kt+"]"}));return yt}function $e(m){var g=m.key,P=m.value,V=m.valueSpec,J=ko(P);return J==="number"&&P!==P&&(J="NaN"),J!=="number"?[new an(g,P,"number expected, "+J+" found")]:"minimum"in V&&P<V.minimum?[new an(g,P,P+" is less than the minimum value "+V.minimum)]:"maximum"in V&&P>V.maximum?[new an(g,P,P+" is greater than the maximum value "+V.maximum)]:[]}function pt(m){var g=m.valueSpec,P=ln(m.value.type),V,J={},ae,ve,Ge=P!=="categorical"&&m.value.property===void 0,yt=!Ge,kt=ko(m.value.stops)==="array"&&ko(m.value.stops[0])==="array"&&ko(m.value.stops[0][0])==="object",Ut=le({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:lr,default:ei}});return P==="identity"&&Ge&&Ut.push(new an(m.key,m.value,'missing required property "property"')),P!=="identity"&&!m.value.stops&&Ut.push(new an(m.key,m.value,'missing required property "stops"')),P==="exponential"&&m.valueSpec.expression&&!ga(m.valueSpec)&&Ut.push(new an(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(yt&&!Vl(m.valueSpec)?Ut.push(new an(m.key,m.value,"property functions not supported")):Ge&&!Fl(m.valueSpec)&&Ut.push(new an(m.key,m.value,"zoom functions not supported"))),(P==="categorical"||kt)&&m.value.property===void 0&&Ut.push(new an(m.key,m.value,'"property" property is required')),Ut;function lr(Li){if(P==="identity")return[new an(Li.key,Li.value,'identity function may not have a "stops" property')];var _n=[],rn=Li.value;return _n=_n.concat(Ne({key:Li.key,value:rn,valueSpec:Li.valueSpec,style:Li.style,styleSpec:Li.styleSpec,arrayElementValidator:kr})),ko(rn)==="array"&&rn.length===0&&_n.push(new an(Li.key,rn,"array must have at least one stop")),_n}function kr(Li){var _n=[],rn=Li.value,Fa=Li.key;if(ko(rn)!=="array")return[new an(Fa,rn,"array expected, "+ko(rn)+" found")];if(rn.length!==2)return[new an(Fa,rn,"array length 2 expected, length "+rn.length+" found")];if(kt){if(ko(rn[0])!=="object")return[new an(Fa,rn,"object expected, "+ko(rn[0])+" found")];if(rn[0].zoom===void 0)return[new an(Fa,rn,"object stop key must have zoom")];if(rn[0].value===void 0)return[new an(Fa,rn,"object stop key must have value")];if(ve&&ve>ln(rn[0].zoom))return[new an(Fa,rn[0].zoom,"stop zoom values must appear in ascending order")];ln(rn[0].zoom)!==ve&&(ve=ln(rn[0].zoom),ae=void 0,J={}),_n=_n.concat(le({key:Fa+"[0]",value:rn[0],valueSpec:{zoom:{}},style:Li.style,styleSpec:Li.styleSpec,objectElementValidators:{zoom:$e,value:xr}}))}else _n=_n.concat(xr({key:Fa+"[0]",value:rn[0],valueSpec:{},style:Li.style,styleSpec:Li.styleSpec},rn));return Uo(ka(rn[1]))?_n.concat([new an(Fa+"[1]",rn[1],"expressions are not allowed in function stops.")]):_n.concat(pl({key:Fa+"[1]",value:rn[1],valueSpec:g,style:Li.style,styleSpec:Li.styleSpec}))}function xr(Li,_n){var rn=ko(Li.value),Fa=ln(Li.value),On=Li.value!==null?Li.value:_n;if(!V)V=rn;else if(rn!==V)return[new an(Li.key,On,rn+" stop domain type must match previous stop domain type "+V)];if(rn!=="number"&&rn!=="string"&&rn!=="boolean")return[new an(Li.key,On,"stop domain value must be a number, string, or boolean")];if(rn!=="number"&&P!=="categorical"){var Ra="number expected, "+rn+" found";return Vl(g)&&P===void 0&&(Ra+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new an(Li.key,On,Ra)]}return P==="categorical"&&rn==="number"&&(!isFinite(Fa)||Math.floor(Fa)!==Fa)?[new an(Li.key,On,"integer expected, found "+Fa)]:P!=="categorical"&&rn==="number"&&ae!==void 0&&Fa<ae?[new an(Li.key,On,"stop domain values must appear in ascending order")]:(ae=Fa,P==="categorical"&&Fa in J?[new an(Li.key,On,"stop domain values must be unique")]:(J[Fa]=!0,[]))}function ei(Li){return pl({key:Li.key,value:Li.value,valueSpec:g,style:Li.style,styleSpec:Li.styleSpec})}}function zt(m){var g=(m.expressionContext==="property"?Dl:_s)(ka(m.value),m.valueSpec);if(g.result==="error")return g.value.map(function(V){return new an(""+m.key+V.key,m.value,V.message)});var P=g.value.expression||g.value._styleExpression.expression;if(m.expressionContext==="property"&&m.propertyKey==="text-font"&&!P.outputDefined())return[new an(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"&&!as(P))return[new an(m.key,m.value,'"feature-state" data expressions are not supported with layout properties.')];if(m.expressionContext==="filter"&&!as(P))return[new an(m.key,m.value,'"feature-state" data expressions are not supported with filters.')];if(m.expressionContext&&m.expressionContext.indexOf("cluster")===0){if(!Jn(P,["zoom","feature-state"]))return[new an(m.key,m.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(m.expressionContext==="cluster-initial"&&!Ks(P))return[new an(m.key,m.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Yt(m){var g=m.value,P=m.key,V=ko(g);return V!=="boolean"?[new an(P,g,"boolean expected, "+V+" found")]:[]}function Jt(m){var g=m.key,P=m.value,V=ko(P);return V!=="string"?[new an(g,P,"color expected, "+V+" found")]:sa(P)===null?[new an(g,P,'color expected, "'+P+'" found')]:[]}function yr(m){var g=m.key,P=m.value,V=m.valueSpec,J=[];return Array.isArray(V.values)?V.values.indexOf(ln(P))===-1&&J.push(new an(g,P,"expected one of ["+V.values.join(", ")+"], "+JSON.stringify(P)+" found")):Object.keys(V.values).indexOf(ln(P))===-1&&J.push(new an(g,P,"expected one of ["+Object.keys(V.values).join(", ")+"], "+JSON.stringify(P)+" found")),J}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 g=0,P=m.slice(1);g<P.length;g+=1){var V=P[g];if(!Ir(V)&&typeof V!="boolean")return!1}return!0;default:return!0}}var ce={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ae(m){if(m==null)return{filter:function(){return!0},needGeometry:!1};Ir(m)||(m=ot(m));var g=_s(m,ce);if(g.result==="error")throw new Error(g.value.map(function(V){return V.key+": "+V.message}).join(", "));var P=Ve(m);return{filter:function(V,J,ae){return g.value.evaluate(V,J,{},ae)},needGeometry:P}}function qe(m,g){return m<g?-1:m>g?1:0}function Ve(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var g=1;g<m.length;g++)if(Ve(m[g]))return!0;return!1}function ot(m){if(!m)return!0;var g=m[0];if(m.length<=1)return g!=="any";var P=g==="=="?Ke(m[1],m[2],"=="):g==="!="?$t(Ke(m[1],m[2],"==")):g==="<"||g===">"||g==="<="||g===">="?Ke(m[1],m[2],g):g==="any"?ft(m.slice(1)):g==="all"?["all"].concat(m.slice(1).map(ot)):g==="none"?["all"].concat(m.slice(1).map(ot).map($t)):g==="in"?qt(m[1],m.slice(2)):g==="!in"?$t(qt(m[1],m.slice(2))):g==="has"?Xt(m[1]):g==="!has"?$t(Xt(m[1])):g==="within"?m:!0;return P}function Ke(m,g,P){switch(m){case"$type":return["filter-type-"+P,g];case"$id":return["filter-id-"+P,g];default:return["filter-"+P,m,g]}}function ft(m){return["any"].concat(m.map(ot))}function qt(m,g){if(g.length===0)return!1;switch(m){case"$type":return["filter-type-in",["literal",g]];case"$id":return["filter-id-in",["literal",g]];default:return g.length>200&&!g.some(function(P){return typeof P!=typeof g[0]})?["filter-in-large",m,["literal",g.sort(qe)]]:["filter-in-small",m,["literal",g]]}}function Xt(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function $t(m){return["!",m]}function dr(m){return Ir(ka(m.value))?zt(pa({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Mr(m)}function Mr(m){var g=m.value,P=m.key;if(ko(g)!=="array")return[new an(P,g,"array expected, "+ko(g)+" found")];var V=m.styleSpec,J,ae=[];if(g.length<1)return[new an(P,g,"filter array must have at least 1 element")];switch(ae=ae.concat(yr({key:P+"[0]",value:g[0],valueSpec:V.filter_operator,style:m.style,styleSpec:m.styleSpec})),ln(g[0])){case"<":case"<=":case">":case">=":g.length>=2&&ln(g[1])==="$type"&&ae.push(new an(P,g,'"$type" cannot be use with operator "'+g[0]+'"'));case"==":case"!=":g.length!==3&&ae.push(new an(P,g,'filter array for operator "'+g[0]+'" must have 3 elements'));case"in":case"!in":g.length>=2&&(J=ko(g[1]),J!=="string"&&ae.push(new an(P+"[1]",g[1],"string expected, "+J+" found")));for(var ve=2;ve<g.length;ve++)J=ko(g[ve]),ln(g[1])==="$type"?ae=ae.concat(yr({key:P+"["+ve+"]",value:g[ve],valueSpec:V.geometry_type,style:m.style,styleSpec:m.styleSpec})):J!=="string"&&J!=="number"&&J!=="boolean"&&ae.push(new an(P+"["+ve+"]",g[ve],"string, number, or boolean expected, "+J+" found"));break;case"any":case"all":case"none":for(var Ge=1;Ge<g.length;Ge++)ae=ae.concat(Mr({key:P+"["+Ge+"]",value:g[Ge],style:m.style,styleSpec:m.styleSpec}));break;case"has":case"!has":J=ko(g[1]),g.length!==2?ae.push(new an(P,g,'filter array for "'+g[0]+'" operator must have 2 elements')):J!=="string"&&ae.push(new an(P+"[1]",g[1],"string expected, "+J+" found"));break;case"within":J=ko(g[1]),g.length!==2?ae.push(new an(P,g,'filter array for "'+g[0]+'" operator must have 2 elements')):J!=="object"&&ae.push(new an(P+"[1]",g[1],"object expected, "+J+" found"));break}return ae}function $r(m,g){var P=m.key,V=m.style,J=m.styleSpec,ae=m.value,ve=m.objectKey,Ge=J[g+"_"+m.layerType];if(!Ge)return[];var yt=ve.match(/^(.*)-transition$/);if(g==="paint"&&yt&&Ge[yt[1]]&&Ge[yt[1]].transition)return pl({key:P,value:ae,valueSpec:J.transition,style:V,styleSpec:J});var kt=m.valueSpec||Ge[ve];if(!kt)return[new an(P,ae,'unknown property "'+ve+'"')];var Ut;if(ko(ae)==="string"&&Vl(kt)&&!kt.tokens&&(Ut=/^{([^}]+)}$/.exec(ae)))return[new an(P,ae,'"'+ve+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(Ut[1])+" }`.")];var lr=[];return m.layerType==="symbol"&&(ve==="text-field"&&V&&!V.glyphs&&lr.push(new an(P,ae,'use of "text-field" requires a style "glyphs" property')),ve==="text-font"&&zs(ka(ae))&&ln(ae.type)==="identity"&&lr.push(new an(P,ae,'"text-font" does not support identity functions'))),lr.concat(pl({key:m.key,value:ae,valueSpec:kt,style:V,styleSpec:J,expressionContext:"property",propertyType:g,propertyKey:ve}))}function ii(m){return $r(m,"paint")}function pi(m){return $r(m,"layout")}function Yi(m){var g=[],P=m.value,V=m.key,J=m.style,ae=m.styleSpec;!P.type&&!P.ref&&g.push(new an(V,P,'either "type" or "ref" is required'));var ve=ln(P.type),Ge=ln(P.ref);if(P.id)for(var yt=ln(P.id),kt=0;kt<m.arrayIndex;kt++){var Ut=J.layers[kt];ln(Ut.id)===yt&&g.push(new an(V,P.id,'duplicate layer id "'+P.id+'", previously used at line '+Ut.id.__line__))}if("ref"in P){["type","source","source-layer","filter","layout"].forEach(function(ei){ei in P&&g.push(new an(V,P[ei],'"'+ei+'" is prohibited for ref layers'))});var lr;J.layers.forEach(function(ei){ln(ei.id)===Ge&&(lr=ei)}),lr?lr.ref?g.push(new an(V,P.ref,"ref cannot reference another ref layer")):ve=ln(lr.type):g.push(new an(V,P.ref,'ref layer "'+Ge+'" not found'))}else if(ve!=="background")if(!P.source)g.push(new an(V,P,'missing required property "source"'));else{var kr=J.sources&&J.sources[P.source],xr=kr&&ln(kr.type);kr?xr==="vector"&&ve==="raster"?g.push(new an(V,P.source,'layer "'+P.id+'" requires a raster source')):xr==="raster"&&ve!=="raster"?g.push(new an(V,P.source,'layer "'+P.id+'" requires a vector source')):xr==="vector"&&!P["source-layer"]?g.push(new an(V,P,'layer "'+P.id+'" must specify a "source-layer"')):xr==="raster-dem"&&ve!=="hillshade"?g.push(new an(V,P.source,"raster-dem source can only be used with layer type 'hillshade'.")):ve==="line"&&P.paint&&P.paint["line-gradient"]&&(xr!=="geojson"||!kr.lineMetrics)&&g.push(new an(V,P,'layer "'+P.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):g.push(new an(V,P.source,'source "'+P.source+'" not found'))}return g=g.concat(le({key:V,value:P,valueSpec:ae.layer,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return pl({key:V+".type",value:P.type,valueSpec:ae.layer.type,style:m.style,styleSpec:m.styleSpec,object:P,objectKey:"type"})},filter:dr,layout:function(Li){return le({layer:P,key:Li.key,value:Li.value,style:Li.style,styleSpec:Li.styleSpec,objectElementValidators:{"*":function(rn){return pi(pa({layerType:ve},rn))}}})},paint:function(Li){return le({layer:P,key:Li.key,value:Li.value,style:Li.style,styleSpec:Li.styleSpec,objectElementValidators:{"*":function(rn){return ii(pa({layerType:ve},rn))}}})}}})),g}function wn(m){var g=m.value,P=m.key,V=ko(g);return V!=="string"?[new an(P,g,"string expected, "+V+" found")]:[]}var Tn={promoteId:oo};function ua(m){var g=m.value,P=m.key,V=m.styleSpec,J=m.style;if(!g.type)return[new an(P,g,'"type" is required')];var ae=ln(g.type),ve;switch(ae){case"vector":case"raster":case"raster-dem":return ve=le({key:P,value:g,valueSpec:V["source_"+ae.replace("-","_")],style:m.style,styleSpec:V,objectElementValidators:Tn}),ve;case"geojson":if(ve=le({key:P,value:g,valueSpec:V.source_geojson,style:J,styleSpec:V,objectElementValidators:Tn}),g.cluster)for(var Ge in g.clusterProperties){var yt=g.clusterProperties[Ge],kt=yt[0],Ut=yt[1],lr=typeof kt=="string"?[kt,["accumulated"],["get",Ge]]:kt;ve.push.apply(ve,zt({key:P+"."+Ge+".map",value:Ut,expressionContext:"cluster-map"})),ve.push.apply(ve,zt({key:P+"."+Ge+".reduce",value:lr,expressionContext:"cluster-reduce"}))}return ve;case"video":return le({key:P,value:g,valueSpec:V.source_video,style:J,styleSpec:V});case"image":return le({key:P,value:g,valueSpec:V.source_image,style:J,styleSpec:V});case"canvas":return[new an(P,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return yr({key:P+".type",value:g.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:J,styleSpec:V})}}function oo(m){var g=m.key,P=m.value;if(ko(P)==="string")return wn({key:g,value:P});var V=[];for(var J in P)V.push.apply(V,wn({key:g+"."+J,value:P[J]}));return V}function el(m){var g=m.value,P=m.styleSpec,V=P.light,J=m.style,ae=[],ve=ko(g);if(g===void 0)return ae;if(ve!=="object")return ae=ae.concat([new an("light",g,"object expected, "+ve+" found")]),ae;for(var Ge in g){var yt=Ge.match(/^(.*)-transition$/);yt&&V[yt[1]]&&V[yt[1]].transition?ae=ae.concat(pl({key:Ge,value:g[Ge],valueSpec:P.transition,style:J,styleSpec:P})):V[Ge]?ae=ae.concat(pl({key:Ge,value:g[Ge],valueSpec:V[Ge],style:J,styleSpec:P})):ae=ae.concat([new an(Ge,g[Ge],'unknown property "'+Ge+'"')])}return ae}function ys(m){return wn(m).length===0?[]:zt(m)}function il(m){return wn(m).length===0?[]:zt(m)}var $l={"*":function(){return[]},array:Ne,boolean:Yt,number:$e,color:Jt,constants:cs,enum:yr,filter:dr,function:pt,layer:Yi,object:le,source:ua,light:el,string:wn,formatted:ys,resolvedImage:il};function pl(m){var g=m.value,P=m.valueSpec,V=m.styleSpec;if(P.expression&&zs(ln(g)))return pt(m);if(P.expression&&Uo(ka(g)))return zt(m);if(P.type&&$l[P.type])return $l[P.type](m);var J=le(pa({},m,{valueSpec:P.type?V[P.type]:P}));return J}function Hl(m){var g=m.value,P=m.key,V=wn(m);return V.length||(g.indexOf("{fontstack}")===-1&&V.push(new an(P,g,'"glyphs" url must include a "{fontstack}" token')),g.indexOf("{range}")===-1&&V.push(new an(P,g,'"glyphs" url must include a "{range}" token'))),V}function Ll(m,g){g===void 0&&(g=Ri);var P=[];return P=P.concat(pl({key:"",value:m,valueSpec:g.$root,styleSpec:g,style:m,objectElementValidators:{glyphs:Hl,"*":function(){return[]}}})),m.constants&&(P=P.concat(cs({key:"constants",value:m.constants,style:m,styleSpec:g}))),Ql(P)}Ll.source=ku(ua),Ll.light=ku(el),Ll.layer=ku(Yi),Ll.filter=ku(dr),Ll.paintProperty=ku(ii),Ll.layoutProperty=ku(pi);function Ql(m){return[].concat(m).sort(function(g,P){return g.line-P.line})}function ku(m){return function(){for(var g=[],P=arguments.length;P--;)g[P]=arguments[P];return Ql(m.apply(this,g))}}var Jl=Ll,Kl=Jl.light,Hu=Jl.paintProperty,tf=Jl.layoutProperty;function Ku(m,g){var P=!1;if(g&&g.length)for(var V=0,J=g;V<J.length;V+=1){var ae=J[V];m.fire(new zi(new Error(ae.message))),P=!0}return P}var Gu=sf,Wu=3;function sf(m,g,P){var V=this.cells=[];if(m instanceof ArrayBuffer){this.arrayBuffer=m;var J=new Int32Array(this.arrayBuffer);m=J[0],g=J[1],P=J[2],this.d=g+2*P;for(var ae=0;ae<this.d*this.d;ae++){var ve=J[Wu+ae],Ge=J[Wu+ae+1];V.push(ve===Ge?null:J.subarray(ve,Ge))}var yt=J[Wu+V.length],kt=J[Wu+V.length+1];this.keys=J.subarray(yt,kt),this.bboxes=J.subarray(kt),this.insert=this._insertReadonly}else{this.d=g+2*P;for(var Ut=0;Ut<this.d*this.d;Ut++)V.push([]);this.keys=[],this.bboxes=[]}this.n=g,this.extent=m,this.padding=P,this.scale=g/m,this.uid=0;var lr=P/g*m;this.min=-lr,this.max=m+lr}sf.prototype.insert=function(m,g,P,V,J){this._forEachCell(g,P,V,J,this._insertCell,this.uid++),this.keys.push(m),this.bboxes.push(g),this.bboxes.push(P),this.bboxes.push(V),this.bboxes.push(J)},sf.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},sf.prototype._insertCell=function(m,g,P,V,J,ae){this.cells[J].push(ae)},sf.prototype.query=function(m,g,P,V,J){var ae=this.min,ve=this.max;if(m<=ae&&g<=ae&&ve<=P&&ve<=V&&!J)return Array.prototype.slice.call(this.keys);var Ge=[],yt={};return this._forEachCell(m,g,P,V,this._queryCell,Ge,yt,J),Ge},sf.prototype._queryCell=function(m,g,P,V,J,ae,ve,Ge){var yt=this.cells[J];if(yt!==null)for(var kt=this.keys,Ut=this.bboxes,lr=0;lr<yt.length;lr++){var kr=yt[lr];if(ve[kr]===void 0){var xr=kr*4;(Ge?Ge(Ut[xr+0],Ut[xr+1],Ut[xr+2],Ut[xr+3]):m<=Ut[xr+2]&&g<=Ut[xr+3]&&P>=Ut[xr+0]&&V>=Ut[xr+1])?(ve[kr]=!0,ae.push(kt[kr])):ve[kr]=!1}}},sf.prototype._forEachCell=function(m,g,P,V,J,ae,ve,Ge){for(var yt=this._convertToCellCoord(m),kt=this._convertToCellCoord(g),Ut=this._convertToCellCoord(P),lr=this._convertToCellCoord(V),kr=yt;kr<=Ut;kr++)for(var xr=kt;xr<=lr;xr++){var ei=this.d*xr+kr;if(!(Ge&&!Ge(this._convertFromCellCoord(kr),this._convertFromCellCoord(xr),this._convertFromCellCoord(kr+1),this._convertFromCellCoord(xr+1)))&&J.call(this,m,g,P,V,ei,ae,ve,Ge))return}},sf.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},sf.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},sf.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,g=Wu+this.cells.length+1+1,P=0,V=0;V<this.cells.length;V++)P+=this.cells[V].length;var J=new Int32Array(g+P+this.keys.length+this.bboxes.length);J[0]=this.extent,J[1]=this.n,J[2]=this.padding;for(var ae=g,ve=0;ve<m.length;ve++){var Ge=m[ve];J[Wu+ve]=ae,J.set(Ge,ae),ae+=Ge.length}return J[Wu+m.length]=ae,J.set(this.keys,ae),ae+=this.keys.length,J[Wu+m.length+1]=ae,J.set(this.bboxes,ae),ae+=this.bboxes.length,J.buffer};var gf=c.ImageData,nf=c.ImageBitmap,af={};function X(m,g,P){P===void 0&&(P={}),Object.defineProperty(g,"_classRegistryKey",{value:m,writeable:!1}),af[m]={klass:g,omit:P.omit||[],shallow:P.shallow||[]}}X("Object",Object),Gu.serialize=function(g,P){var V=g.toArrayBuffer();return P&&P.push(V),{buffer:V}},Gu.deserialize=function(g){return new Gu(g.buffer)},X("Grid",Gu),X("Color",Bn),X("Error",Error),X("ResolvedImage",mn),X("StylePropertyFunction",oe),X("StyleExpression",xl,{omit:["_evaluator"]}),X("ZoomDependentExpression",Il),X("ZoomConstantExpression",Bl),X("CompoundExpression",$i,{omit:["_evaluate"]});for(var se in Lo)Lo[se]._classRegistryKey||X("Expression_"+se,Lo[se]);function Le(m){return m&&typeof ArrayBuffer!="undefined"&&(m instanceof ArrayBuffer||m.constructor&&m.constructor.name==="ArrayBuffer")}function We(m){return nf&&m instanceof nf}function Ye(m,g){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(Le(m)||We(m))return g&&g.push(m),m;if(ArrayBuffer.isView(m)){var P=m;return g&&g.push(P.buffer),P}if(m instanceof gf)return g&&g.push(m.data.buffer),m;if(Array.isArray(m)){for(var V=[],J=0,ae=m;J<ae.length;J+=1){var ve=ae[J];V.push(Ye(ve,g))}return V}if(typeof m=="object"){var Ge=m.constructor,yt=Ge._classRegistryKey;if(!yt)throw new Error("can't serialize object of unregistered class");var kt=Ge.serialize?Ge.serialize(m,g):{};if(!Ge.serialize){for(var Ut in m)if(m.hasOwnProperty(Ut)&&!(af[yt].omit.indexOf(Ut)>=0)){var lr=m[Ut];kt[Ut]=af[yt].shallow.indexOf(Ut)>=0?lr:Ye(lr,g)}m instanceof Error&&(kt.message=m.message)}if(kt.$name)throw new Error("$name property is reserved for worker serialization logic.");return yt!=="Object"&&(kt.$name=yt),kt}throw new Error("can't serialize object of type "+typeof m)}function it(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||Le(m)||We(m)||ArrayBuffer.isView(m)||m instanceof gf)return m;if(Array.isArray(m))return m.map(it);if(typeof m=="object"){var g=m.$name||"Object",P=af[g],V=P.klass;if(!V)throw new Error("can't deserialize unregistered class "+g);if(V.deserialize)return V.deserialize(m);for(var J=Object.create(V.prototype),ae=0,ve=Object.keys(m);ae<ve.length;ae+=1){var Ge=ve[ae];if(Ge!=="$name"){var yt=m[Ge];J[Ge]=af[g].shallow.indexOf(Ge)>=0?yt:it(yt)}}return J}throw new Error("can't deserialize object of type "+typeof m)}var Nt=function(){this.first=!0};Nt.prototype.update=function(g,P){var V=Math.floor(g);return this.first?(this.first=!1,this.lastIntegerZoom=V,this.lastIntegerZoomTime=0,this.lastZoom=g,this.lastFloorZoom=V,!0):(this.lastFloorZoom>V?(this.lastIntegerZoom=V+1,this.lastIntegerZoomTime=P):this.lastFloorZoom<V&&(this.lastIntegerZoom=V,this.lastIntegerZoomTime=P),g!==this.lastZoom?(this.lastZoom=g,this.lastFloorZoom=V,!0):!1)};var mt={"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 er(m){for(var g=0,P=m;g<P.length;g+=1){var V=P[g];if(Wr(V.charCodeAt(0)))return!0}return!1}function _r(m){for(var g=0,P=m;g<P.length;g+=1){var V=P[g];if(!wr(V.charCodeAt(0)))return!1}return!0}function wr(m){return!(mt.Arabic(m)||mt["Arabic Supplement"](m)||mt["Arabic Extended-A"](m)||mt["Arabic Presentation Forms-A"](m)||mt["Arabic Presentation Forms-B"](m))}function ni(m){return m<11904?!1:!!(mt["Bopomofo Extended"](m)||mt.Bopomofo(m)||mt["CJK Compatibility Forms"](m)||mt["CJK Compatibility Ideographs"](m)||mt["CJK Compatibility"](m)||mt["CJK Radicals Supplement"](m)||mt["CJK Strokes"](m)||mt["CJK Symbols and Punctuation"](m)||mt["CJK Unified Ideographs Extension A"](m)||mt["CJK Unified Ideographs"](m)||mt["Enclosed CJK Letters and Months"](m)||mt["Halfwidth and Fullwidth Forms"](m)||mt.Hiragana(m)||mt["Ideographic Description Characters"](m)||mt["Kangxi Radicals"](m)||mt["Katakana Phonetic Extensions"](m)||mt.Katakana(m)||mt["Vertical Forms"](m)||mt["Yi Radicals"](m)||mt["Yi Syllables"](m))}function Wr(m){return m===746||m===747?!0:m<4352?!1:!!(mt["Bopomofo Extended"](m)||mt.Bopomofo(m)||mt["CJK Compatibility Forms"](m)&&!(m>=65097&&m<=65103)||mt["CJK Compatibility Ideographs"](m)||mt["CJK Compatibility"](m)||mt["CJK Radicals Supplement"](m)||mt["CJK Strokes"](m)||mt["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||mt["CJK Unified Ideographs Extension A"](m)||mt["CJK Unified Ideographs"](m)||mt["Enclosed CJK Letters and Months"](m)||mt["Hangul Compatibility Jamo"](m)||mt["Hangul Jamo Extended-A"](m)||mt["Hangul Jamo Extended-B"](m)||mt["Hangul Jamo"](m)||mt["Hangul Syllables"](m)||mt.Hiragana(m)||mt["Ideographic Description Characters"](m)||mt.Kanbun(m)||mt["Kangxi Radicals"](m)||mt["Katakana Phonetic Extensions"](m)||mt.Katakana(m)&&m!==12540||mt["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)||mt["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||mt["Unified Canadian Aboriginal Syllabics"](m)||mt["Unified Canadian Aboriginal Syllabics Extended"](m)||mt["Vertical Forms"](m)||mt["Yijing Hexagram Symbols"](m)||mt["Yi Syllables"](m)||mt["Yi Radicals"](m))}function Ci(m){return!!(mt["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||mt["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)||mt["Letterlike Symbols"](m)||mt["Number Forms"](m)||mt["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)||mt["Control Pictures"](m)&&m!==9251||mt["Optical Character Recognition"](m)||mt["Enclosed Alphanumerics"](m)||mt["Geometric Shapes"](m)||mt["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||mt["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||mt["CJK Symbols and Punctuation"](m)||mt.Katakana(m)||mt["Private Use Area"](m)||mt["CJK Compatibility Forms"](m)||mt["Small Form Variants"](m)||mt["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function Ji(m){return!(Wr(m)||Ci(m))}function ai(m){return mt.Arabic(m)||mt["Arabic Supplement"](m)||mt["Arabic Extended-A"](m)||mt["Arabic Presentation Forms-A"](m)||mt["Arabic Presentation Forms-B"](m)}function Ti(m){return m>=1424&&m<=2303||mt["Arabic Presentation Forms-A"](m)||mt["Arabic Presentation Forms-B"](m)}function Bi(m,g){return!(!g&&Ti(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||mt.Khmer(m))}function en(m){for(var g=0,P=m;g<P.length;g+=1){var V=P[g];if(Ti(V.charCodeAt(0)))return!0}return!1}function Wi(m,g){for(var P=0,V=m;P<V.length;P+=1){var J=V[P];if(!Bi(J.charCodeAt(0),g))return!1}return!0}var bi={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},ao=null,yo=bi.unavailable,Ko=null,Ms=function(m){m&&typeof m=="string"&&m.indexOf("NetworkError")>-1&&(yo=bi.error),ao&&ao(m)};function vl(){wl.fire(new Vi("pluginStateChange",{pluginStatus:yo,pluginURL:Ko}))}var wl=new Mi,au=function(){return yo},Al=function(m){return m({pluginStatus:yo,pluginURL:Ko}),wl.on("pluginStateChange",m),m},nu=function(m,g,P){if(P===void 0&&(P=!1),yo===bi.deferred||yo===bi.loading||yo===bi.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Ko=et.resolveURL(m),yo=bi.deferred,ao=g,vl(),P||Bu()},Bu=function(){if(yo!==bi.deferred||!Ko)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");yo=bi.loading,vl(),Ko&&zr({url:Ko},function(m){m?Ms(m):(yo=bi.loaded,vl())})},qu={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return yo===bi.loaded||qu.applyArabicShaping!=null},isLoading:function(){return yo===bi.loading},setState:function(g){yo=g.pluginStatus,Ko=g.pluginURL},isParsed:function(){return qu.applyArabicShaping!=null&&qu.processBidirectionalText!=null&&qu.processStyledBidirectionalText!=null},getPluginURL:function(){return Ko}},Ju=function(){!qu.isLoading()&&!qu.isLoaded()&&au()==="deferred"&&Bu()},qo=function(g,P){this.zoom=g,P?(this.now=P.now,this.fadeDuration=P.fadeDuration,this.zoomHistory=P.zoomHistory,this.transition=P.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Nt,this.transition={})};qo.prototype.isSupportedScript=function(g){return Wi(g,qu.isLoaded())},qo.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},qo.prototype.getCrossfadeParameters=function(){var g=this.zoom,P=g-Math.floor(g),V=this.crossFadingFactor();return g>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:P+(1-P)*V}:{fromScale:.5,toScale:1,t:1-(1-V)*P}};var Rl=function(g,P){this.property=g,this.value=P,this.expression=w(P===void 0?g.specification.default:P,g.specification)};Rl.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Rl.prototype.possiblyEvaluate=function(g,P,V){return this.property.possiblyEvaluate(this,g,P,V)};var pu=function(g){this.property=g,this.value=new Rl(g,void 0)};pu.prototype.transitioned=function(g,P){return new of(this.property,this.value,P,_({},g.transition,this.transition),g.now)},pu.prototype.untransitioned=function(){return new of(this.property,this.value,null,{},0)};var xu=function(g){this._properties=g,this._values=Object.create(g.defaultTransitionablePropertyValues)};xu.prototype.getValue=function(g){return G(this._values[g].value.value)},xu.prototype.setValue=function(g,P){this._values.hasOwnProperty(g)||(this._values[g]=new pu(this._values[g].property)),this._values[g].value=new Rl(this._values[g].property,P===null?void 0:G(P))},xu.prototype.getTransition=function(g){return G(this._values[g].transition)},xu.prototype.setTransition=function(g,P){this._values.hasOwnProperty(g)||(this._values[g]=new pu(this._values[g].property)),this._values[g].transition=G(P)||void 0},xu.prototype.serialize=function(){for(var g={},P=0,V=Object.keys(this._values);P<V.length;P+=1){var J=V[P],ae=this.getValue(J);ae!==void 0&&(g[J]=ae);var ve=this.getTransition(J);ve!==void 0&&(g[J+"-transition"]=ve)}return g},xu.prototype.transitioned=function(g,P){for(var V=new ff(this._properties),J=0,ae=Object.keys(this._values);J<ae.length;J+=1){var ve=ae[J];V._values[ve]=this._values[ve].transitioned(g,P._values[ve])}return V},xu.prototype.untransitioned=function(){for(var g=new ff(this._properties),P=0,V=Object.keys(this._values);P<V.length;P+=1){var J=V[P];g._values[J]=this._values[J].untransitioned()}return g};var of=function(g,P,V,J,ae){this.property=g,this.value=P,this.begin=ae+J.delay||0,this.end=this.begin+J.duration||0,g.specification.transition&&(J.delay||J.duration)&&(this.prior=V)};of.prototype.possiblyEvaluate=function(g,P,V){var J=g.now||0,ae=this.value.possiblyEvaluate(g,P,V),ve=this.prior;if(ve){if(J>this.end)return this.prior=null,ae;if(this.value.isDataDriven())return this.prior=null,ae;if(J<this.begin)return ve.possiblyEvaluate(g,P,V);var Ge=(J-this.begin)/(this.end-this.begin);return this.property.interpolate(ve.possiblyEvaluate(g,P,V),ae,p(Ge))}else return ae};var ff=function(g){this._properties=g,this._values=Object.create(g.defaultTransitioningPropertyValues)};ff.prototype.possiblyEvaluate=function(g,P,V){for(var J=new dc(this._properties),ae=0,ve=Object.keys(this._values);ae<ve.length;ae+=1){var Ge=ve[ae];J._values[Ge]=this._values[Ge].possiblyEvaluate(g,P,V)}return J},ff.prototype.hasTransition=function(){for(var g=0,P=Object.keys(this._values);g<P.length;g+=1){var V=P[g];if(this._values[V].prior)return!0}return!1};var xf=function(g){this._properties=g,this._values=Object.create(g.defaultPropertyValues)};xf.prototype.getValue=function(g){return G(this._values[g].value)},xf.prototype.setValue=function(g,P){this._values[g]=new Rl(this._values[g].property,P===null?void 0:G(P))},xf.prototype.serialize=function(){for(var g={},P=0,V=Object.keys(this._values);P<V.length;P+=1){var J=V[P],ae=this.getValue(J);ae!==void 0&&(g[J]=ae)}return g},xf.prototype.possiblyEvaluate=function(g,P,V){for(var J=new dc(this._properties),ae=0,ve=Object.keys(this._values);ae<ve.length;ae+=1){var Ge=ve[ae];J._values[Ge]=this._values[Ge].possiblyEvaluate(g,P,V)}return J};var hf=function(g,P,V){this.property=g,this.value=P,this.parameters=V};hf.prototype.isConstant=function(){return this.value.kind==="constant"},hf.prototype.constantOr=function(g){return this.value.kind==="constant"?this.value.value:g},hf.prototype.evaluate=function(g,P,V,J){return this.property.evaluate(this.value,this.parameters,g,P,V,J)};var dc=function(g){this._properties=g,this._values=Object.create(g.defaultPossiblyEvaluatedValues)};dc.prototype.get=function(g){return this._values[g]};var Gt=function(g){this.specification=g};Gt.prototype.possiblyEvaluate=function(g,P){return g.expression.evaluate(P)},Gt.prototype.interpolate=function(g,P,V){var J=$n[this.specification.type];return J?J(g,P,V):g};var jr=function(g,P){this.specification=g,this.overrides=P};jr.prototype.possiblyEvaluate=function(g,P,V,J){return g.expression.kind==="constant"||g.expression.kind==="camera"?new hf(this,{kind:"constant",value:g.expression.evaluate(P,null,{},V,J)},P):new hf(this,g.expression,P)},jr.prototype.interpolate=function(g,P,V){if(g.value.kind!=="constant"||P.value.kind!=="constant")return g;if(g.value.value===void 0||P.value.value===void 0)return new hf(this,{kind:"constant",value:void 0},g.parameters);var J=$n[this.specification.type];return J?new hf(this,{kind:"constant",value:J(g.value.value,P.value.value,V)},g.parameters):g},jr.prototype.evaluate=function(g,P,V,J,ae,ve){return g.kind==="constant"?g.value:g.evaluate(P,V,J,ae,ve)};var _i=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.possiblyEvaluate=function(V,J,ae,ve){if(V.value===void 0)return new hf(this,{kind:"constant",value:void 0},J);if(V.expression.kind==="constant"){var Ge=V.expression.evaluate(J,null,{},ae,ve),yt=V.property.specification.type==="resolvedImage",kt=yt&&typeof Ge!="string"?Ge.name:Ge,Ut=this._calculate(kt,kt,kt,J);return new hf(this,{kind:"constant",value:Ut},J)}else if(V.expression.kind==="camera"){var lr=this._calculate(V.expression.evaluate({zoom:J.zoom-1}),V.expression.evaluate({zoom:J.zoom}),V.expression.evaluate({zoom:J.zoom+1}),J);return new hf(this,{kind:"constant",value:lr},J)}else return new hf(this,V.expression,J)},g.prototype.evaluate=function(V,J,ae,ve,Ge,yt){if(V.kind==="source"){var kt=V.evaluate(J,ae,ve,Ge,yt);return this._calculate(kt,kt,kt,J)}else return V.kind==="composite"?this._calculate(V.evaluate({zoom:Math.floor(J.zoom)-1},ae,ve),V.evaluate({zoom:Math.floor(J.zoom)},ae,ve),V.evaluate({zoom:Math.floor(J.zoom)+1},ae,ve),J):V.value},g.prototype._calculate=function(V,J,ae,ve){var Ge=ve.zoom;return Ge>ve.zoomHistory.lastIntegerZoom?{from:V,to:J}:{from:ae,to:J}},g.prototype.interpolate=function(V){return V},g}(jr),Mn=function(g){this.specification=g};Mn.prototype.possiblyEvaluate=function(g,P,V,J){if(g.value!==void 0)if(g.expression.kind==="constant"){var ae=g.expression.evaluate(P,null,{},V,J);return this._calculate(ae,ae,ae,P)}else return this._calculate(g.expression.evaluate(new qo(Math.floor(P.zoom-1),P)),g.expression.evaluate(new qo(Math.floor(P.zoom),P)),g.expression.evaluate(new qo(Math.floor(P.zoom+1),P)),P)},Mn.prototype._calculate=function(g,P,V,J){var ae=J.zoom;return ae>J.zoomHistory.lastIntegerZoom?{from:g,to:P}:{from:V,to:P}},Mn.prototype.interpolate=function(g){return g};var Ta=function(g){this.specification=g};Ta.prototype.possiblyEvaluate=function(g,P,V,J){return!!g.expression.evaluate(P,null,{},V,J)},Ta.prototype.interpolate=function(){return!1};var fa=function(g){this.properties=g,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var P in g){var V=g[P];V.specification.overridable&&this.overridableProperties.push(P);var J=this.defaultPropertyValues[P]=new Rl(V,void 0),ae=this.defaultTransitionablePropertyValues[P]=new pu(V);this.defaultTransitioningPropertyValues[P]=ae.untransitioned(),this.defaultPossiblyEvaluatedValues[P]=J.possiblyEvaluate({})}};X("DataDrivenProperty",jr),X("DataConstantProperty",Gt),X("CrossFadedDataDrivenProperty",_i),X("CrossFadedProperty",Mn),X("ColorRampProperty",Ta);var ha="-transition",Io=function(m){function g(P,V){if(m.call(this),this.id=P.id,this.type=P.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},P.type!=="custom"&&(P=P,this.metadata=P.metadata,this.minzoom=P.minzoom,this.maxzoom=P.maxzoom,P.type!=="background"&&(this.source=P.source,this.sourceLayer=P["source-layer"],this.filter=P.filter),V.layout&&(this._unevaluatedLayout=new xf(V.layout)),V.paint)){this._transitionablePaint=new xu(V.paint);for(var J in P.paint)this.setPaintProperty(J,P.paint[J],{validate:!1});for(var ae in P.layout)this.setLayoutProperty(ae,P.layout[ae],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new dc(V.paint)}}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},g.prototype.getLayoutProperty=function(V){return V==="visibility"?this.visibility:this._unevaluatedLayout.getValue(V)},g.prototype.setLayoutProperty=function(V,J,ae){if(ae===void 0&&(ae={}),J!=null){var ve="layers."+this.id+".layout."+V;if(this._validate(tf,ve,V,J,ae))return}if(V==="visibility"){this.visibility=J;return}this._unevaluatedLayout.setValue(V,J)},g.prototype.getPaintProperty=function(V){return U(V,ha)?this._transitionablePaint.getTransition(V.slice(0,-ha.length)):this._transitionablePaint.getValue(V)},g.prototype.setPaintProperty=function(V,J,ae){if(ae===void 0&&(ae={}),J!=null){var ve="layers."+this.id+".paint."+V;if(this._validate(Hu,ve,V,J,ae))return!1}if(U(V,ha))return this._transitionablePaint.setTransition(V.slice(0,-ha.length),J||void 0),!1;var Ge=this._transitionablePaint._values[V],yt=Ge.property.specification["property-type"]==="cross-faded-data-driven",kt=Ge.value.isDataDriven(),Ut=Ge.value;this._transitionablePaint.setValue(V,J),this._handleSpecialPaintPropertyUpdate(V);var lr=this._transitionablePaint._values[V].value,kr=lr.isDataDriven();return kr||kt||yt||this._handleOverridablePaintPropertyUpdate(V,Ut,lr)},g.prototype._handleSpecialPaintPropertyUpdate=function(V){},g.prototype._handleOverridablePaintPropertyUpdate=function(V,J,ae){return!1},g.prototype.isHidden=function(V){return this.minzoom&&V<this.minzoom||this.maxzoom&&V>=this.maxzoom?!0:this.visibility==="none"},g.prototype.updateTransitions=function(V){this._transitioningPaint=this._transitionablePaint.transitioned(V,this._transitioningPaint)},g.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},g.prototype.recalculate=function(V,J){V.getCrossfadeParameters&&(this._crossfadeParameters=V.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(V,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(V,void 0,J)},g.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),j(V,function(J,ae){return J!==void 0&&!(ae==="layout"&&!Object.keys(J).length)&&!(ae==="paint"&&!Object.keys(J).length)})},g.prototype._validate=function(V,J,ae,ve,Ge){return Ge===void 0&&(Ge={}),Ge&&Ge.validate===!1?!1:Ku(this,V.call(Jl,{key:J,layerType:this.type,objectKey:ae,value:ve,styleSpec:Ri,style:{glyphs:!0,sprite:!0}}))},g.prototype.is3D=function(){return!1},g.prototype.isTileClipped=function(){return!1},g.prototype.hasOffscreenPass=function(){return!1},g.prototype.resize=function(){},g.prototype.isStateDependent=function(){for(var V in this.paint._values){var J=this.paint.get(V);if(!(!(J instanceof hf)||!Vl(J.property.specification))&&(J.value.kind==="source"||J.value.kind==="composite")&&J.value.isStateDependent)return!0}return!1},g}(Mi),Vs={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Hs=function(g,P){this._structArray=g,this._pos1=P*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},is=128,su=5,Ps=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Ps.serialize=function(g,P){return g._trim(),P&&(g.isTransferred=!0,P.push(g.arrayBuffer)),{length:g.length,arrayBuffer:g.arrayBuffer}},Ps.deserialize=function(g){var P=Object.create(this.prototype);return P.arrayBuffer=g.arrayBuffer,P.length=g.length,P.capacity=g.arrayBuffer.byteLength/P.bytesPerElement,P._refreshViews(),P},Ps.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Ps.prototype.clear=function(){this.length=0},Ps.prototype.resize=function(g){this.reserve(g),this.length=g},Ps.prototype.reserve=function(g){if(g>this.capacity){this.capacity=Math.max(g,Math.floor(this.capacity*su),is),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var P=this.uint8;this._refreshViews(),P&&this.uint8.set(P)}},Ps.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function qs(m,g){g===void 0&&(g=1);var P=0,V=0,J=m.map(function(ve){var Ge=Do(ve.type),yt=P=kn(P,Math.max(g,Ge)),kt=ve.components||1;return V=Math.max(V,Ge),P+=Ge*kt,{name:ve.name,type:ve.type,components:kt,offset:yt}}),ae=kn(P,Math.max(V,g));return{members:J,size:ae,alignment:g}}function Do(m){return Vs[m].BYTES_PER_ELEMENT}function kn(m,g){return Math.ceil(m/g)*g}var La=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,J)},g.prototype.emplace=function(V,J,ae){var ve=V*2;return this.int16[ve+0]=J,this.int16[ve+1]=ae,V},g}(Ps);La.prototype.bytesPerElement=4,X("StructArrayLayout2i4",La);var Es=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,V,J,ae,ve)},g.prototype.emplace=function(V,J,ae,ve,Ge){var yt=V*4;return this.int16[yt+0]=J,this.int16[yt+1]=ae,this.int16[yt+2]=ve,this.int16[yt+3]=Ge,V},g}(Ps);Es.prototype.bytesPerElement=8,X("StructArrayLayout4i8",Es);var Ws=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt){var kt=this.length;return this.resize(kt+1),this.emplace(kt,V,J,ae,ve,Ge,yt)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt){var Ut=V*6;return this.int16[Ut+0]=J,this.int16[Ut+1]=ae,this.int16[Ut+2]=ve,this.int16[Ut+3]=Ge,this.int16[Ut+4]=yt,this.int16[Ut+5]=kt,V},g}(Ps);Ws.prototype.bytesPerElement=12,X("StructArrayLayout2i4i12",Ws);var Qo=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt){var kt=this.length;return this.resize(kt+1),this.emplace(kt,V,J,ae,ve,Ge,yt)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt){var Ut=V*4,lr=V*8;return this.int16[Ut+0]=J,this.int16[Ut+1]=ae,this.uint8[lr+4]=ve,this.uint8[lr+5]=Ge,this.uint8[lr+6]=yt,this.uint8[lr+7]=kt,V},g}(Ps);Qo.prototype.bytesPerElement=8,X("StructArrayLayout2i4ub8",Qo);var bl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,J)},g.prototype.emplace=function(V,J,ae){var ve=V*2;return this.float32[ve+0]=J,this.float32[ve+1]=ae,V},g}(Ps);bl.prototype.bytesPerElement=8,X("StructArrayLayout2f8",bl);var nl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr){var xr=this.length;return this.resize(xr+1),this.emplace(xr,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr){var ei=V*10;return this.uint16[ei+0]=J,this.uint16[ei+1]=ae,this.uint16[ei+2]=ve,this.uint16[ei+3]=Ge,this.uint16[ei+4]=yt,this.uint16[ei+5]=kt,this.uint16[ei+6]=Ut,this.uint16[ei+7]=lr,this.uint16[ei+8]=kr,this.uint16[ei+9]=xr,V},g}(Ps);nl.prototype.bytesPerElement=20,X("StructArrayLayout10ui20",nl);var ru=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei){var Li=this.length;return this.resize(Li+1),this.emplace(Li,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li){var _n=V*12;return this.int16[_n+0]=J,this.int16[_n+1]=ae,this.int16[_n+2]=ve,this.int16[_n+3]=Ge,this.uint16[_n+4]=yt,this.uint16[_n+5]=kt,this.uint16[_n+6]=Ut,this.uint16[_n+7]=lr,this.int16[_n+8]=kr,this.int16[_n+9]=xr,this.int16[_n+10]=ei,this.int16[_n+11]=Li,V},g}(Ps);ru.prototype.bytesPerElement=24,X("StructArrayLayout4i4ui4i24",ru);var hs=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*3;return this.float32[Ge+0]=J,this.float32[Ge+1]=ae,this.float32[Ge+2]=ve,V},g}(Ps);hs.prototype.bytesPerElement=12,X("StructArrayLayout3f12",hs);var Ho=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V){var J=this.length;return this.resize(J+1),this.emplace(J,V)},g.prototype.emplace=function(V,J){var ae=V*1;return this.uint32[ae+0]=J,V},g}(Ps);Ho.prototype.bytesPerElement=4,X("StructArrayLayout1ul4",Ho);var ql=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr){var kr=this.length;return this.resize(kr+1),this.emplace(kr,V,J,ae,ve,Ge,yt,kt,Ut,lr)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr){var xr=V*10,ei=V*5;return this.int16[xr+0]=J,this.int16[xr+1]=ae,this.int16[xr+2]=ve,this.int16[xr+3]=Ge,this.int16[xr+4]=yt,this.int16[xr+5]=kt,this.uint32[ei+3]=Ut,this.uint16[xr+8]=lr,this.uint16[xr+9]=kr,V},g}(Ps);ql.prototype.bytesPerElement=20,X("StructArrayLayout6i1ul2ui20",ql);var yl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt){var kt=this.length;return this.resize(kt+1),this.emplace(kt,V,J,ae,ve,Ge,yt)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt){var Ut=V*6;return this.int16[Ut+0]=J,this.int16[Ut+1]=ae,this.int16[Ut+2]=ve,this.int16[Ut+3]=Ge,this.int16[Ut+4]=yt,this.int16[Ut+5]=kt,V},g}(Ps);yl.prototype.bytesPerElement=12,X("StructArrayLayout2i2i2i12",yl);var tl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge){var yt=this.length;return this.resize(yt+1),this.emplace(yt,V,J,ae,ve,Ge)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt){var kt=V*4,Ut=V*8;return this.float32[kt+0]=J,this.float32[kt+1]=ae,this.float32[kt+2]=ve,this.int16[Ut+6]=Ge,this.int16[Ut+7]=yt,V},g}(Ps);tl.prototype.bytesPerElement=16,X("StructArrayLayout2f1f2i16",tl);var js=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,V,J,ae,ve)},g.prototype.emplace=function(V,J,ae,ve,Ge){var yt=V*12,kt=V*3;return this.uint8[yt+0]=J,this.uint8[yt+1]=ae,this.float32[kt+1]=ve,this.float32[kt+2]=Ge,V},g}(Ps);js.prototype.bytesPerElement=12,X("StructArrayLayout2ub2f12",js);var zl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*3;return this.uint16[Ge+0]=J,this.uint16[Ge+1]=ae,this.uint16[Ge+2]=ve,V},g}(Ps);zl.prototype.bytesPerElement=6,X("StructArrayLayout3ui6",zl);var lu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On){var Ra=this.length;return this.resize(Ra+1),this.emplace(Ra,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra){var so=V*24,As=V*12,dl=V*48;return this.int16[so+0]=J,this.int16[so+1]=ae,this.uint16[so+2]=ve,this.uint16[so+3]=Ge,this.uint32[As+2]=yt,this.uint32[As+3]=kt,this.uint32[As+4]=Ut,this.uint16[so+10]=lr,this.uint16[so+11]=kr,this.uint16[so+12]=xr,this.float32[As+7]=ei,this.float32[As+8]=Li,this.uint8[dl+36]=_n,this.uint8[dl+37]=rn,this.uint8[dl+38]=Fa,this.uint32[As+10]=On,this.int16[so+22]=Ra,V},g}(Ps);lu.prototype.bytesPerElement=48,X("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",lu);var bu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra,so,As,dl,fl,eu,Ol,Xl,Cu,tu,ou){var Qu=this.length;return this.resize(Qu+1),this.emplace(Qu,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra,so,As,dl,fl,eu,Ol,Xl,Cu,tu,ou)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra,so,As,dl,fl,eu,Ol,Xl,Cu,tu,ou,Qu){var Eu=V*34,Tf=V*17;return this.int16[Eu+0]=J,this.int16[Eu+1]=ae,this.int16[Eu+2]=ve,this.int16[Eu+3]=Ge,this.int16[Eu+4]=yt,this.int16[Eu+5]=kt,this.int16[Eu+6]=Ut,this.int16[Eu+7]=lr,this.uint16[Eu+8]=kr,this.uint16[Eu+9]=xr,this.uint16[Eu+10]=ei,this.uint16[Eu+11]=Li,this.uint16[Eu+12]=_n,this.uint16[Eu+13]=rn,this.uint16[Eu+14]=Fa,this.uint16[Eu+15]=On,this.uint16[Eu+16]=Ra,this.uint16[Eu+17]=so,this.uint16[Eu+18]=As,this.uint16[Eu+19]=dl,this.uint16[Eu+20]=fl,this.uint16[Eu+21]=eu,this.uint16[Eu+22]=Ol,this.uint32[Tf+12]=Xl,this.float32[Tf+13]=Cu,this.float32[Tf+14]=tu,this.float32[Tf+15]=ou,this.float32[Tf+16]=Qu,V},g}(Ps);bu.prototype.bytesPerElement=68,X("StructArrayLayout8i15ui1ul4f68",bu);var al=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V){var J=this.length;return this.resize(J+1),this.emplace(J,V)},g.prototype.emplace=function(V,J){var ae=V*1;return this.float32[ae+0]=J,V},g}(Ps);al.prototype.bytesPerElement=4,X("StructArrayLayout1f4",al);var jl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*3;return this.int16[Ge+0]=J,this.int16[Ge+1]=ae,this.int16[Ge+2]=ve,V},g}(Ps);jl.prototype.bytesPerElement=6,X("StructArrayLayout3i6",jl);var mu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*2,yt=V*4;return this.uint32[Ge+0]=J,this.uint16[yt+2]=ae,this.uint16[yt+3]=ve,V},g}(Ps);mu.prototype.bytesPerElement=8,X("StructArrayLayout1ul2ui8",mu);var Tu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,J)},g.prototype.emplace=function(V,J,ae){var ve=V*2;return this.uint16[ve+0]=J,this.uint16[ve+1]=ae,V},g}(Ps);Tu.prototype.bytesPerElement=4,X("StructArrayLayout2ui4",Tu);var Ru=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V){var J=this.length;return this.resize(J+1),this.emplace(J,V)},g.prototype.emplace=function(V,J){var ae=V*1;return this.uint16[ae+0]=J,V},g}(Ps);Ru.prototype.bytesPerElement=2,X("StructArrayLayout1ui2",Ru);var Rf=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,V,J,ae,ve)},g.prototype.emplace=function(V,J,ae,ve,Ge){var yt=V*4;return this.float32[yt+0]=J,this.float32[yt+1]=ae,this.float32[yt+2]=ve,this.float32[yt+3]=Ge,V},g}(Ps);Rf.prototype.bytesPerElement=16,X("StructArrayLayout4f16",Rf);var Cc=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={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 P.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},P.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},P.x1.get=function(){return this._structArray.int16[this._pos2+2]},P.y1.get=function(){return this._structArray.int16[this._pos2+3]},P.x2.get=function(){return this._structArray.int16[this._pos2+4]},P.y2.get=function(){return this._structArray.int16[this._pos2+5]},P.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},P.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},P.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},P.anchorPoint.get=function(){return new l(this.anchorPointX,this.anchorPointY)},Object.defineProperties(g.prototype,P),g}(Hs);Cc.prototype.size=20;var rf=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new Cc(this,V)},g}(ql);X("CollisionBoxArray",rf);var Lc=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={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 P.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},P.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},P.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},P.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},P.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},P.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},P.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},P.segment.get=function(){return this._structArray.uint16[this._pos2+10]},P.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},P.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},P.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},P.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},P.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},P.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},P.placedOrientation.set=function(V){this._structArray.uint8[this._pos1+37]=V},P.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},P.hidden.set=function(V){this._structArray.uint8[this._pos1+38]=V},P.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},P.crossTileID.set=function(V){this._structArray.uint32[this._pos4+10]=V},P.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(g.prototype,P),g}(Hs);Lc.prototype.size=48;var wf=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new Lc(this,V)},g}(lu);X("PlacedSymbolArray",wf);var pc=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={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 P.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},P.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},P.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},P.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},P.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},P.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},P.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},P.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},P.key.get=function(){return this._structArray.uint16[this._pos2+8]},P.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},P.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},P.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},P.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},P.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},P.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},P.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},P.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},P.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},P.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},P.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},P.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},P.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},P.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},P.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},P.crossTileID.set=function(V){this._structArray.uint32[this._pos4+12]=V},P.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},P.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},P.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},P.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(g.prototype,P),g}(Hs);pc.prototype.size=68;var vc=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new pc(this,V)},g}(bu);X("SymbolInstanceArray",vc);var qc=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.getoffsetX=function(V){return this.float32[V*1+0]},g}(al);X("GlyphOffsetArray",qc);var If=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.getx=function(V){return this.int16[V*3+0]},g.prototype.gety=function(V){return this.int16[V*3+1]},g.prototype.gettileUnitDistanceFromAnchor=function(V){return this.int16[V*3+2]},g}(jl);X("SymbolLineVertexArray",If);var Tc=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return P.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},P.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},P.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(g.prototype,P),g}(Hs);Tc.prototype.size=8;var zc=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new Tc(this,V)},g}(mu);X("FeatureIndexArray",zc);var Vu=qs([{name:"a_pos",components:2,type:"Int16"}],4),Bc=Vu.members,Ou=function(g){g===void 0&&(g=[]),this.segments=g};Ou.prototype.prepareSegment=function(g,P,V,J){var ae=this.segments[this.segments.length-1];return g>Ou.MAX_VERTEX_ARRAY_LENGTH&&re("Max vertices per segment is "+Ou.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+g),(!ae||ae.vertexLength+g>Ou.MAX_VERTEX_ARRAY_LENGTH||ae.sortKey!==J)&&(ae={vertexOffset:P.length,primitiveOffset:V.length,vertexLength:0,primitiveLength:0},J!==void 0&&(ae.sortKey=J),this.segments.push(ae)),ae},Ou.prototype.get=function(){return this.segments},Ou.prototype.destroy=function(){for(var g=0,P=this.segments;g<P.length;g+=1){var V=P[g];for(var J in V.vaos)V.vaos[J].destroy()}},Ou.simpleSegment=function(g,P,V,J){return new Ou([{vertexOffset:g,primitiveOffset:P,vertexLength:V,primitiveLength:J,vaos:{},sortKey:0}])},Ou.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,X("SegmentVector",Ou);function Y(m,g){return m=y(Math.floor(m),0,255),g=y(Math.floor(g),0,255),256*m+g}var R=qs([{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"}]),K=a(function(m){function g(P,V){var J,ae,ve,Ge,yt,kt,Ut,lr;for(J=P.length&3,ae=P.length-J,ve=V,yt=3432918353,kt=461845907,lr=0;lr<ae;)Ut=P.charCodeAt(lr)&255|(P.charCodeAt(++lr)&255)<<8|(P.charCodeAt(++lr)&255)<<16|(P.charCodeAt(++lr)&255)<<24,++lr,Ut=(Ut&65535)*yt+(((Ut>>>16)*yt&65535)<<16)&4294967295,Ut=Ut<<15|Ut>>>17,Ut=(Ut&65535)*kt+(((Ut>>>16)*kt&65535)<<16)&4294967295,ve^=Ut,ve=ve<<13|ve>>>19,Ge=(ve&65535)*5+(((ve>>>16)*5&65535)<<16)&4294967295,ve=(Ge&65535)+27492+(((Ge>>>16)+58964&65535)<<16);switch(Ut=0,J){case 3:Ut^=(P.charCodeAt(lr+2)&255)<<16;case 2:Ut^=(P.charCodeAt(lr+1)&255)<<8;case 1:Ut^=P.charCodeAt(lr)&255,Ut=(Ut&65535)*yt+(((Ut>>>16)*yt&65535)<<16)&4294967295,Ut=Ut<<15|Ut>>>17,Ut=(Ut&65535)*kt+(((Ut>>>16)*kt&65535)<<16)&4294967295,ve^=Ut}return ve^=P.length,ve^=ve>>>16,ve=(ve&65535)*2246822507+(((ve>>>16)*2246822507&65535)<<16)&4294967295,ve^=ve>>>13,ve=(ve&65535)*3266489909+(((ve>>>16)*3266489909&65535)<<16)&4294967295,ve^=ve>>>16,ve>>>0}m.exports=g}),N=a(function(m){function g(P,V){for(var J=P.length,ae=V^J,ve=0,Ge;J>=4;)Ge=P.charCodeAt(ve)&255|(P.charCodeAt(++ve)&255)<<8|(P.charCodeAt(++ve)&255)<<16|(P.charCodeAt(++ve)&255)<<24,Ge=(Ge&65535)*1540483477+(((Ge>>>16)*1540483477&65535)<<16),Ge^=Ge>>>24,Ge=(Ge&65535)*1540483477+(((Ge>>>16)*1540483477&65535)<<16),ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)^Ge,J-=4,++ve;switch(J){case 3:ae^=(P.charCodeAt(ve+2)&255)<<16;case 2:ae^=(P.charCodeAt(ve+1)&255)<<8;case 1:ae^=P.charCodeAt(ve)&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=g}),$=K,we=K,ge=N;$.murmur3=we,$.murmur2=ge;var Ue=function(){this.ids=[],this.positions=[],this.indexed=!1};Ue.prototype.add=function(g,P,V,J){this.ids.push(Rt(g)),this.positions.push(P,V,J)},Ue.prototype.getPositions=function(g){for(var P=Rt(g),V=0,J=this.ids.length-1;V<J;){var ae=V+J>>1;this.ids[ae]>=P?J=ae:V=ae+1}for(var ve=[];this.ids[V]===P;){var Ge=this.positions[3*V],yt=this.positions[3*V+1],kt=this.positions[3*V+2];ve.push({index:Ge,start:yt,end:kt}),V++}return ve},Ue.serialize=function(g,P){var V=new Float64Array(g.ids),J=new Uint32Array(g.positions);return ur(V,J,0,V.length-1),P&&P.push(V.buffer,J.buffer),{ids:V,positions:J}},Ue.deserialize=function(g){var P=new Ue;return P.ids=g.ids,P.positions=g.positions,P.indexed=!0,P};var dt=Math.pow(2,53)-1;function Rt(m){var g=+m;return!isNaN(g)&&g<=dt?g:$(String(m))}function ur(m,g,P,V){for(;P<V;){for(var J=m[P+V>>1],ae=P-1,ve=V+1;;){do ae++;while(m[ae]<J);do ve--;while(m[ve]>J);if(ae>=ve)break;gr(m,ae,ve),gr(g,3*ae,3*ve),gr(g,3*ae+1,3*ve+1),gr(g,3*ae+2,3*ve+2)}ve-P<V-ve?(ur(m,g,P,ve),P=ve+1):(ur(m,g,ve+1,V),V=ve)}}function gr(m,g,P){var V=m[g];m[g]=m[P],m[P]=V}X("FeaturePositionMap",Ue);var cr=function(g,P){this.gl=g.gl,this.location=P},It=function(m){function g(P,V){m.call(this,P,V),this.current=0}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.set=function(V){this.current!==V&&(this.current=V,this.gl.uniform1i(this.location,V))},g}(cr),Qt=function(m){function g(P,V){m.call(this,P,V),this.current=0}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.set=function(V){this.current!==V&&(this.current=V,this.gl.uniform1f(this.location,V))},g}(cr),ar=function(m){function g(P,V){m.call(this,P,V),this.current=[0,0]}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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]))},g}(cr),mr=function(m){function g(P,V){m.call(this,P,V),this.current=[0,0,0]}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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]))},g}(cr),Pr=function(m){function g(P,V){m.call(this,P,V),this.current=[0,0,0,0]}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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]))},g}(cr),Dr=function(m){function g(P,V){m.call(this,P,V),this.current=Bn.transparent}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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))},g}(cr),Xr=new Float32Array(16),Gr=function(m){function g(P,V){m.call(this,P,V),this.current=Xr}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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 J=1;J<16;J++)if(V[J]!==this.current[J]){this.current=V,this.gl.uniformMatrix4fv(this.location,!1,V);break}},g}(cr);function Fr(m){return[Y(255*m.r,255*m.g),Y(255*m.b,255*m.a)]}var Kr=function(g,P,V){this.value=g,this.uniformNames=P.map(function(J){return"u_"+J}),this.type=V};Kr.prototype.setUniform=function(g,P,V){g.set(V.constantOr(this.value))},Kr.prototype.getBinding=function(g,P,V){return this.type==="color"?new Dr(g,P):new Qt(g,P)};var Cr=function(g,P){this.uniformNames=P.map(function(V){return"u_"+V}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Cr.prototype.setConstantPatternPositions=function(g,P){this.pixelRatioFrom=P.pixelRatio,this.pixelRatioTo=g.pixelRatio,this.patternFrom=P.tlbr,this.patternTo=g.tlbr},Cr.prototype.setUniform=function(g,P,V,J){var ae=J==="u_pattern_to"?this.patternTo:J==="u_pattern_from"?this.patternFrom:J==="u_pixel_ratio_to"?this.pixelRatioTo:J==="u_pixel_ratio_from"?this.pixelRatioFrom:null;ae&&g.set(ae)},Cr.prototype.getBinding=function(g,P,V){return V.substr(0,9)==="u_pattern"?new Pr(g,P):new Qt(g,P)};var yi=function(g,P,V,J){this.expression=g,this.type=V,this.maxValue=0,this.paintVertexAttributes=P.map(function(ae){return{name:"a_"+ae,type:"Float32",components:V==="color"?2:1,offset:0}}),this.paintVertexArray=new J};yi.prototype.populatePaintArray=function(g,P,V,J,ae){var ve=this.paintVertexArray.length,Ge=this.expression.evaluate(new qo(0),P,{},J,[],ae);this.paintVertexArray.resize(g),this._setPaintValue(ve,g,Ge)},yi.prototype.updatePaintArray=function(g,P,V,J){var ae=this.expression.evaluate({zoom:0},V,J);this._setPaintValue(g,P,ae)},yi.prototype._setPaintValue=function(g,P,V){if(this.type==="color")for(var J=Fr(V),ae=g;ae<P;ae++)this.paintVertexArray.emplace(ae,J[0],J[1]);else{for(var ve=g;ve<P;ve++)this.paintVertexArray.emplace(ve,V);this.maxValue=Math.max(this.maxValue,Math.abs(V))}},yi.prototype.upload=function(g){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=g.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},yi.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var qi=function(g,P,V,J,ae,ve){this.expression=g,this.uniformNames=P.map(function(Ge){return"u_"+Ge+"_t"}),this.type=V,this.useIntegerZoom=J,this.zoom=ae,this.maxValue=0,this.paintVertexAttributes=P.map(function(Ge){return{name:"a_"+Ge,type:"Float32",components:V==="color"?4:2,offset:0}}),this.paintVertexArray=new ve};qi.prototype.populatePaintArray=function(g,P,V,J,ae){var ve=this.expression.evaluate(new qo(this.zoom),P,{},J,[],ae),Ge=this.expression.evaluate(new qo(this.zoom+1),P,{},J,[],ae),yt=this.paintVertexArray.length;this.paintVertexArray.resize(g),this._setPaintValue(yt,g,ve,Ge)},qi.prototype.updatePaintArray=function(g,P,V,J){var ae=this.expression.evaluate({zoom:this.zoom},V,J),ve=this.expression.evaluate({zoom:this.zoom+1},V,J);this._setPaintValue(g,P,ae,ve)},qi.prototype._setPaintValue=function(g,P,V,J){if(this.type==="color")for(var ae=Fr(V),ve=Fr(J),Ge=g;Ge<P;Ge++)this.paintVertexArray.emplace(Ge,ae[0],ae[1],ve[0],ve[1]);else{for(var yt=g;yt<P;yt++)this.paintVertexArray.emplace(yt,V,J);this.maxValue=Math.max(this.maxValue,Math.abs(V),Math.abs(J))}},qi.prototype.upload=function(g){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=g.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},qi.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},qi.prototype.setUniform=function(g,P){var V=this.useIntegerZoom?Math.floor(P.zoom):P.zoom,J=y(this.expression.interpolationFactor(V,this.zoom,this.zoom+1),0,1);g.set(J)},qi.prototype.getBinding=function(g,P,V){return new Qt(g,P)};var vn=function(g,P,V,J,ae,ve){this.expression=g,this.type=P,this.useIntegerZoom=V,this.zoom=J,this.layerId=ve,this.zoomInPaintVertexArray=new ae,this.zoomOutPaintVertexArray=new ae};vn.prototype.populatePaintArray=function(g,P,V){var J=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(g),this.zoomOutPaintVertexArray.resize(g),this._setPaintValues(J,g,P.patterns&&P.patterns[this.layerId],V)},vn.prototype.updatePaintArray=function(g,P,V,J,ae){this._setPaintValues(g,P,V.patterns&&V.patterns[this.layerId],ae)},vn.prototype._setPaintValues=function(g,P,V,J){if(!(!J||!V)){var ae=V.min,ve=V.mid,Ge=V.max,yt=J[ae],kt=J[ve],Ut=J[Ge];if(!(!yt||!kt||!Ut))for(var lr=g;lr<P;lr++)this.zoomInPaintVertexArray.emplace(lr,kt.tl[0],kt.tl[1],kt.br[0],kt.br[1],yt.tl[0],yt.tl[1],yt.br[0],yt.br[1],kt.pixelRatio,yt.pixelRatio),this.zoomOutPaintVertexArray.emplace(lr,kt.tl[0],kt.tl[1],kt.br[0],kt.br[1],Ut.tl[0],Ut.tl[1],Ut.br[0],Ut.br[1],kt.pixelRatio,Ut.pixelRatio)}},vn.prototype.upload=function(g){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=g.createVertexBuffer(this.zoomInPaintVertexArray,R.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=g.createVertexBuffer(this.zoomOutPaintVertexArray,R.members,this.expression.isStateDependent))},vn.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Qa=function(g,P,V){this.binders={},this._buffers=[];var J=[];for(var ae in g.paint._values)if(V(ae)){var ve=g.paint.get(ae);if(!(!(ve instanceof hf)||!Vl(ve.property.specification))){var Ge=mo(ae,g.type),yt=ve.value,kt=ve.property.specification.type,Ut=ve.property.useIntegerZoom,lr=ve.property.specification["property-type"],kr=lr==="cross-faded"||lr==="cross-faded-data-driven";if(yt.kind==="constant")this.binders[ae]=kr?new Cr(yt.value,Ge):new Kr(yt.value,Ge,kt),J.push("/u_"+ae);else if(yt.kind==="source"||kr){var xr=Os(ae,kt,"source");this.binders[ae]=kr?new vn(yt,kt,Ut,P,xr,g.id):new yi(yt,Ge,kt,xr),J.push("/a_"+ae)}else{var ei=Os(ae,kt,"composite");this.binders[ae]=new qi(yt,Ge,kt,Ut,P,ei),J.push("/z_"+ae)}}}this.cacheKey=J.sort().join("")};Qa.prototype.getMaxValue=function(g){var P=this.binders[g];return P instanceof yi||P instanceof qi?P.maxValue:0},Qa.prototype.populatePaintArrays=function(g,P,V,J,ae){for(var ve in this.binders){var Ge=this.binders[ve];(Ge instanceof yi||Ge instanceof qi||Ge instanceof vn)&&Ge.populatePaintArray(g,P,V,J,ae)}},Qa.prototype.setConstantPatternPositions=function(g,P){for(var V in this.binders){var J=this.binders[V];J instanceof Cr&&J.setConstantPatternPositions(g,P)}},Qa.prototype.updatePaintArrays=function(g,P,V,J,ae){var ve=!1;for(var Ge in g)for(var yt=P.getPositions(Ge),kt=0,Ut=yt;kt<Ut.length;kt+=1){var lr=Ut[kt],kr=V.feature(lr.index);for(var xr in this.binders){var ei=this.binders[xr];if((ei instanceof yi||ei instanceof qi||ei instanceof vn)&&ei.expression.isStateDependent===!0){var Li=J.paint.get(xr);ei.expression=Li.value,ei.updatePaintArray(lr.start,lr.end,kr,g[Ge],ae),ve=!0}}}return ve},Qa.prototype.defines=function(){var g=[];for(var P in this.binders){var V=this.binders[P];(V instanceof Kr||V instanceof Cr)&&g.push.apply(g,V.uniformNames.map(function(J){return"#define HAS_UNIFORM_"+J}))}return g},Qa.prototype.getBinderAttributes=function(){var g=[];for(var P in this.binders){var V=this.binders[P];if(V instanceof yi||V instanceof qi)for(var J=0;J<V.paintVertexAttributes.length;J++)g.push(V.paintVertexAttributes[J].name);else if(V instanceof vn)for(var ae=0;ae<R.members.length;ae++)g.push(R.members[ae].name)}return g},Qa.prototype.getBinderUniforms=function(){var g=[];for(var P in this.binders){var V=this.binders[P];if(V instanceof Kr||V instanceof Cr||V instanceof qi)for(var J=0,ae=V.uniformNames;J<ae.length;J+=1){var ve=ae[J];g.push(ve)}}return g},Qa.prototype.getPaintVertexBuffers=function(){return this._buffers},Qa.prototype.getUniforms=function(g,P){var V=[];for(var J in this.binders){var ae=this.binders[J];if(ae instanceof Kr||ae instanceof Cr||ae instanceof qi)for(var ve=0,Ge=ae.uniformNames;ve<Ge.length;ve+=1){var yt=Ge[ve];if(P[yt]){var kt=ae.getBinding(g,P[yt],yt);V.push({name:yt,property:J,binding:kt})}}}return V},Qa.prototype.setUniforms=function(g,P,V,J){for(var ae=0,ve=P;ae<ve.length;ae+=1){var Ge=ve[ae],yt=Ge.name,kt=Ge.property,Ut=Ge.binding;this.binders[kt].setUniform(Ut,J,V.get(kt),yt)}},Qa.prototype.updatePaintBuffers=function(g){this._buffers=[];for(var P in this.binders){var V=this.binders[P];if(g&&V instanceof vn){var J=g.fromScale===2?V.zoomInPaintVertexBuffer:V.zoomOutPaintVertexBuffer;J&&this._buffers.push(J)}else(V instanceof yi||V instanceof qi)&&V.paintVertexBuffer&&this._buffers.push(V.paintVertexBuffer)}},Qa.prototype.upload=function(g){for(var P in this.binders){var V=this.binders[P];(V instanceof yi||V instanceof qi||V instanceof vn)&&V.upload(g)}this.updatePaintBuffers()},Qa.prototype.destroy=function(){for(var g in this.binders){var P=this.binders[g];(P instanceof yi||P instanceof qi||P instanceof vn)&&P.destroy()}};var ra=function(g,P,V){V===void 0&&(V=function(){return!0}),this.programConfigurations={};for(var J=0,ae=g;J<ae.length;J+=1){var ve=ae[J];this.programConfigurations[ve.id]=new Qa(ve,P,V)}this.needsUpload=!1,this._featureMap=new Ue,this._bufferOffset=0};ra.prototype.populatePaintArrays=function(g,P,V,J,ae,ve){for(var Ge in this.programConfigurations)this.programConfigurations[Ge].populatePaintArrays(g,P,J,ae,ve);P.id!==void 0&&this._featureMap.add(P.id,V,this._bufferOffset,g),this._bufferOffset=g,this.needsUpload=!0},ra.prototype.updatePaintArrays=function(g,P,V,J){for(var ae=0,ve=V;ae<ve.length;ae+=1){var Ge=ve[ae];this.needsUpload=this.programConfigurations[Ge.id].updatePaintArrays(g,this._featureMap,P,Ge,J)||this.needsUpload}},ra.prototype.get=function(g){return this.programConfigurations[g]},ra.prototype.upload=function(g){if(this.needsUpload){for(var P in this.programConfigurations)this.programConfigurations[P].upload(g);this.needsUpload=!1}},ra.prototype.destroy=function(){for(var g in this.programConfigurations)this.programConfigurations[g].destroy()};function mo(m,g){var P={"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 P[m]||[m.replace(g+"-","").replace(/-/g,"_")]}function sl(m){var g={"line-pattern":{source:nl,composite:nl},"fill-pattern":{source:nl,composite:nl},"fill-extrusion-pattern":{source:nl,composite:nl}};return g[m]}function Os(m,g,P){var V={color:{source:bl,composite:Rf},number:{source:al,composite:bl}},J=sl(m);return J&&J[P]||V[g][P]}X("ConstantBinder",Kr),X("CrossFadedConstantBinder",Cr),X("SourceExpressionBinder",yi),X("CrossFadedCompositeBinder",vn),X("CompositeExpressionBinder",qi),X("ProgramConfiguration",Qa,{omit:["_buffers"]}),X("ProgramConfigurationSet",ra);var eo=8192,fs=15,es=Math.pow(2,fs-1)-1,$s=-es-1;function Ml(m){for(var g=eo/m.extent,P=m.loadGeometry(),V=0;V<P.length;V++)for(var J=P[V],ae=0;ae<J.length;ae++){var ve=J[ae],Ge=Math.round(ve.x*g),yt=Math.round(ve.y*g);ve.x=y(Ge,$s,es),ve.y=y(yt,$s,es),(Ge<ve.x||Ge>ve.x+1||yt<ve.y||yt>ve.y+1)&&re("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return P}function Mu(m,g){return{type:m.type,id:m.id,properties:m.properties,geometry:g?Ml(m):[]}}function Au(m,g,P,V,J){m.emplaceBack(g*2+(V+1)/2,P*2+(J+1)/2)}var $u=function(g){this.zoom=g.zoom,this.overscaling=g.overscaling,this.layers=g.layers,this.layerIds=this.layers.map(function(P){return P.id}),this.index=g.index,this.hasPattern=!1,this.layoutVertexArray=new La,this.indexArray=new zl,this.segments=new Ou,this.programConfigurations=new ra(g.layers,g.zoom),this.stateDependentLayerIds=this.layers.filter(function(P){return P.isStateDependent()}).map(function(P){return P.id})};$u.prototype.populate=function(g,P,V){var J=this.layers[0],ae=[],ve=null;J.type==="circle"&&(ve=J.layout.get("circle-sort-key"));for(var Ge=0,yt=g;Ge<yt.length;Ge+=1){var kt=yt[Ge],Ut=kt.feature,lr=kt.id,kr=kt.index,xr=kt.sourceLayerIndex,ei=this.layers[0]._featureFilter.needGeometry,Li=Mu(Ut,ei);if(this.layers[0]._featureFilter.filter(new qo(this.zoom),Li,V)){var _n=ve?ve.evaluate(Li,{},V):void 0,rn={id:lr,properties:Ut.properties,type:Ut.type,sourceLayerIndex:xr,index:kr,geometry:ei?Li.geometry:Ml(Ut),patterns:{},sortKey:_n};ae.push(rn)}}ve&&ae.sort(function(Ol,Xl){return Ol.sortKey-Xl.sortKey});for(var Fa=0,On=ae;Fa<On.length;Fa+=1){var Ra=On[Fa],so=Ra,As=so.geometry,dl=so.index,fl=so.sourceLayerIndex,eu=g[dl].feature;this.addFeature(Ra,As,dl,V),P.featureIndex.insert(eu,As,dl,fl,this.index)}},$u.prototype.update=function(g,P,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(g,P,this.stateDependentLayers,V)},$u.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},$u.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},$u.prototype.upload=function(g){this.uploaded||(this.layoutVertexBuffer=g.createVertexBuffer(this.layoutVertexArray,Bc),this.indexBuffer=g.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(g),this.uploaded=!0},$u.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},$u.prototype.addFeature=function(g,P,V,J){for(var ae=0,ve=P;ae<ve.length;ae+=1)for(var Ge=ve[ae],yt=0,kt=Ge;yt<kt.length;yt+=1){var Ut=kt[yt],lr=Ut.x,kr=Ut.y;if(!(lr<0||lr>=eo||kr<0||kr>=eo)){var xr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,g.sortKey),ei=xr.vertexLength;Au(this.layoutVertexArray,lr,kr,-1,-1),Au(this.layoutVertexArray,lr,kr,1,-1),Au(this.layoutVertexArray,lr,kr,1,1),Au(this.layoutVertexArray,lr,kr,-1,1),this.indexArray.emplaceBack(ei,ei+1,ei+2),this.indexArray.emplaceBack(ei,ei+3,ei+2),xr.vertexLength+=4,xr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,g,V,{},J)},X("CircleBucket",$u,{omit:["layers"]});function du(m,g){for(var P=0;P<m.length;P++)if(Sd(g,m[P]))return!0;for(var V=0;V<g.length;V++)if(Sd(m,g[V]))return!0;return!!Td(m,g)}function Nu(m,g,P){return!!(Sd(m,g)||Yp(g,m,P))}function yf(m,g){if(m.length===1)return pv(g,m[0]);for(var P=0;P<g.length;P++)for(var V=g[P],J=0;J<V.length;J++)if(Sd(m,V[J]))return!0;for(var ae=0;ae<m.length;ae++)if(pv(g,m[ae]))return!0;for(var ve=0;ve<g.length;ve++)if(Td(m,g[ve]))return!0;return!1}function Kf(m,g,P){for(var V=0;V<g.length;V++){var J=g[V];if(m.length>=3){for(var ae=0;ae<J.length;ae++)if(Sd(m,J[ae]))return!0}if(wd(m,J,P))return!0}return!1}function wd(m,g,P){if(m.length>1){if(Td(m,g))return!0;for(var V=0;V<g.length;V++)if(Yp(g[V],m,P))return!0}for(var J=0;J<m.length;J++)if(Yp(m[J],g,P))return!0;return!1}function Td(m,g){if(m.length===0||g.length===0)return!1;for(var P=0;P<m.length-1;P++)for(var V=m[P],J=m[P+1],ae=0;ae<g.length-1;ae++){var ve=g[ae],Ge=g[ae+1];if(Ad(V,J,ve,Ge))return!0}return!1}function Ad(m,g,P,V){return ne(m,P,V)!==ne(g,P,V)&&ne(m,g,P)!==ne(m,g,V)}function Yp(m,g,P){var V=P*P;if(g.length===1)return m.distSqr(g[0])<V;for(var J=1;J<g.length;J++){var ae=g[J-1],ve=g[J];if(fy(m,ae,ve)<V)return!0}return!1}function fy(m,g,P){var V=g.distSqr(P);if(V===0)return m.distSqr(g);var J=((m.x-g.x)*(P.x-g.x)+(m.y-g.y)*(P.y-g.y))/V;return J<0?m.distSqr(g):J>1?m.distSqr(P):m.distSqr(P.sub(g)._mult(J)._add(g))}function pv(m,g){for(var P=!1,V,J,ae,ve=0;ve<m.length;ve++){V=m[ve];for(var Ge=0,yt=V.length-1;Ge<V.length;yt=Ge++)J=V[Ge],ae=V[yt],J.y>g.y!=ae.y>g.y&&g.x<(ae.x-J.x)*(g.y-J.y)/(ae.y-J.y)+J.x&&(P=!P)}return P}function Sd(m,g){for(var P=!1,V=0,J=m.length-1;V<m.length;J=V++){var ae=m[V],ve=m[J];ae.y>g.y!=ve.y>g.y&&g.x<(ve.x-ae.x)*(g.y-ae.y)/(ve.y-ae.y)+ae.x&&(P=!P)}return P}function vv(m,g,P,V,J){for(var ae=0,ve=m;ae<ve.length;ae+=1){var Ge=ve[ae];if(g<=Ge.x&&P<=Ge.y&&V>=Ge.x&&J>=Ge.y)return!0}var yt=[new l(g,P),new l(g,J),new l(V,J),new l(V,P)];if(m.length>2)for(var kt=0,Ut=yt;kt<Ut.length;kt+=1){var lr=Ut[kt];if(Sd(m,lr))return!0}for(var kr=0;kr<m.length-1;kr++){var xr=m[kr],ei=m[kr+1];if(Gd(xr,ei,yt))return!0}return!1}function Gd(m,g,P){var V=P[0],J=P[2];if(m.x<V.x&&g.x<V.x||m.x>J.x&&g.x>J.x||m.y<V.y&&g.y<V.y||m.y>J.y&&g.y>J.y)return!1;var ae=ne(m,g,P[0]);return ae!==ne(m,g,P[1])||ae!==ne(m,g,P[2])||ae!==ne(m,g,P[3])}function Md(m,g,P){var V=g.paint.get(m).value;return V.kind==="constant"?V.value:P.programConfigurations.get(g.id).getMaxValue(m)}function kp(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function Kp(m,g,P,V,J){if(!g[0]&&!g[1])return m;var ae=l.convert(g)._mult(J);P==="viewport"&&ae._rotate(-V);for(var ve=[],Ge=0;Ge<m.length;Ge++){var yt=m[Ge];ve.push(yt.sub(ae))}return ve}var Cp=new fa({"circle-sort-key":new jr(Ri.layout_circle["circle-sort-key"])}),ng=new fa({"circle-radius":new jr(Ri.paint_circle["circle-radius"]),"circle-color":new jr(Ri.paint_circle["circle-color"]),"circle-blur":new jr(Ri.paint_circle["circle-blur"]),"circle-opacity":new jr(Ri.paint_circle["circle-opacity"]),"circle-translate":new Gt(Ri.paint_circle["circle-translate"]),"circle-translate-anchor":new Gt(Ri.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Gt(Ri.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Gt(Ri.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new jr(Ri.paint_circle["circle-stroke-width"]),"circle-stroke-color":new jr(Ri.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new jr(Ri.paint_circle["circle-stroke-opacity"])}),cy={paint:ng,layout:Cp},vh=typeof Float32Array!="undefined"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var m=arguments,g=0,P=arguments.length;P--;)g+=m[P]*m[P];return Math.sqrt(g)});function hy(){var m=new vh(4);return vh!=Float32Array&&(m[1]=0,m[2]=0),m[0]=1,m[3]=1,m}function ag(m,g,P){var V=g[0],J=g[1],ae=g[2],ve=g[3],Ge=Math.sin(P),yt=Math.cos(P);return m[0]=V*yt+ae*Ge,m[1]=J*yt+ve*Ge,m[2]=V*-Ge+ae*yt,m[3]=J*-Ge+ve*yt,m}function jh(){var m=new vh(9);return vh!=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 rm(m,g){var P=Math.sin(g),V=Math.cos(g);return m[0]=V,m[1]=P,m[2]=0,m[3]=-P,m[4]=V,m[5]=0,m[6]=0,m[7]=0,m[8]=1,m}function w1(){var m=new vh(16);return vh!=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 T1(m){var g=new vh(16);return g[0]=m[0],g[1]=m[1],g[2]=m[2],g[3]=m[3],g[4]=m[4],g[5]=m[5],g[6]=m[6],g[7]=m[7],g[8]=m[8],g[9]=m[9],g[10]=m[10],g[11]=m[11],g[12]=m[12],g[13]=m[13],g[14]=m[14],g[15]=m[15],g}function og(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 im(m,g){var P=g[0],V=g[1],J=g[2],ae=g[3],ve=g[4],Ge=g[5],yt=g[6],kt=g[7],Ut=g[8],lr=g[9],kr=g[10],xr=g[11],ei=g[12],Li=g[13],_n=g[14],rn=g[15],Fa=P*Ge-V*ve,On=P*yt-J*ve,Ra=P*kt-ae*ve,so=V*yt-J*Ge,As=V*kt-ae*Ge,dl=J*kt-ae*yt,fl=Ut*Li-lr*ei,eu=Ut*_n-kr*ei,Ol=Ut*rn-xr*ei,Xl=lr*_n-kr*Li,Cu=lr*rn-xr*Li,tu=kr*rn-xr*_n,ou=Fa*tu-On*Cu+Ra*Xl+so*Ol-As*eu+dl*fl;return ou?(ou=1/ou,m[0]=(Ge*tu-yt*Cu+kt*Xl)*ou,m[1]=(J*Cu-V*tu-ae*Xl)*ou,m[2]=(Li*dl-_n*As+rn*so)*ou,m[3]=(kr*As-lr*dl-xr*so)*ou,m[4]=(yt*Ol-ve*tu-kt*eu)*ou,m[5]=(P*tu-J*Ol+ae*eu)*ou,m[6]=(_n*Ra-ei*dl-rn*On)*ou,m[7]=(Ut*dl-kr*Ra+xr*On)*ou,m[8]=(ve*Cu-Ge*Ol+kt*fl)*ou,m[9]=(V*Ol-P*Cu-ae*fl)*ou,m[10]=(ei*As-Li*Ra+rn*Fa)*ou,m[11]=(lr*Ra-Ut*As-xr*Fa)*ou,m[12]=(Ge*eu-ve*Xl-yt*fl)*ou,m[13]=(P*Xl-V*eu+J*fl)*ou,m[14]=(Li*On-ei*so-_n*Fa)*ou,m[15]=(Ut*so-lr*On+kr*Fa)*ou,m):null}function nm(m,g,P){var V=g[0],J=g[1],ae=g[2],ve=g[3],Ge=g[4],yt=g[5],kt=g[6],Ut=g[7],lr=g[8],kr=g[9],xr=g[10],ei=g[11],Li=g[12],_n=g[13],rn=g[14],Fa=g[15],On=P[0],Ra=P[1],so=P[2],As=P[3];return m[0]=On*V+Ra*Ge+so*lr+As*Li,m[1]=On*J+Ra*yt+so*kr+As*_n,m[2]=On*ae+Ra*kt+so*xr+As*rn,m[3]=On*ve+Ra*Ut+so*ei+As*Fa,On=P[4],Ra=P[5],so=P[6],As=P[7],m[4]=On*V+Ra*Ge+so*lr+As*Li,m[5]=On*J+Ra*yt+so*kr+As*_n,m[6]=On*ae+Ra*kt+so*xr+As*rn,m[7]=On*ve+Ra*Ut+so*ei+As*Fa,On=P[8],Ra=P[9],so=P[10],As=P[11],m[8]=On*V+Ra*Ge+so*lr+As*Li,m[9]=On*J+Ra*yt+so*kr+As*_n,m[10]=On*ae+Ra*kt+so*xr+As*rn,m[11]=On*ve+Ra*Ut+so*ei+As*Fa,On=P[12],Ra=P[13],so=P[14],As=P[15],m[12]=On*V+Ra*Ge+so*lr+As*Li,m[13]=On*J+Ra*yt+so*kr+As*_n,m[14]=On*ae+Ra*kt+so*xr+As*rn,m[15]=On*ve+Ra*Ut+so*ei+As*Fa,m}function yc(m,g,P){var V=P[0],J=P[1],ae=P[2],ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn;return g===m?(m[12]=g[0]*V+g[4]*J+g[8]*ae+g[12],m[13]=g[1]*V+g[5]*J+g[9]*ae+g[13],m[14]=g[2]*V+g[6]*J+g[10]*ae+g[14],m[15]=g[3]*V+g[7]*J+g[11]*ae+g[15]):(ve=g[0],Ge=g[1],yt=g[2],kt=g[3],Ut=g[4],lr=g[5],kr=g[6],xr=g[7],ei=g[8],Li=g[9],_n=g[10],rn=g[11],m[0]=ve,m[1]=Ge,m[2]=yt,m[3]=kt,m[4]=Ut,m[5]=lr,m[6]=kr,m[7]=xr,m[8]=ei,m[9]=Li,m[10]=_n,m[11]=rn,m[12]=ve*V+Ut*J+ei*ae+g[12],m[13]=Ge*V+lr*J+Li*ae+g[13],m[14]=yt*V+kr*J+_n*ae+g[14],m[15]=kt*V+xr*J+rn*ae+g[15]),m}function Ff(m,g,P){var V=P[0],J=P[1],ae=P[2];return m[0]=g[0]*V,m[1]=g[1]*V,m[2]=g[2]*V,m[3]=g[3]*V,m[4]=g[4]*J,m[5]=g[5]*J,m[6]=g[6]*J,m[7]=g[7]*J,m[8]=g[8]*ae,m[9]=g[9]*ae,m[10]=g[10]*ae,m[11]=g[11]*ae,m[12]=g[12],m[13]=g[13],m[14]=g[14],m[15]=g[15],m}function Ed(m,g,P){var V=Math.sin(P),J=Math.cos(P),ae=g[4],ve=g[5],Ge=g[6],yt=g[7],kt=g[8],Ut=g[9],lr=g[10],kr=g[11];return g!==m&&(m[0]=g[0],m[1]=g[1],m[2]=g[2],m[3]=g[3],m[12]=g[12],m[13]=g[13],m[14]=g[14],m[15]=g[15]),m[4]=ae*J+kt*V,m[5]=ve*J+Ut*V,m[6]=Ge*J+lr*V,m[7]=yt*J+kr*V,m[8]=kt*J-ae*V,m[9]=Ut*J-ve*V,m[10]=lr*J-Ge*V,m[11]=kr*J-yt*V,m}function sg(m,g,P){var V=Math.sin(P),J=Math.cos(P),ae=g[0],ve=g[1],Ge=g[2],yt=g[3],kt=g[4],Ut=g[5],lr=g[6],kr=g[7];return g!==m&&(m[8]=g[8],m[9]=g[9],m[10]=g[10],m[11]=g[11],m[12]=g[12],m[13]=g[13],m[14]=g[14],m[15]=g[15]),m[0]=ae*J+kt*V,m[1]=ve*J+Ut*V,m[2]=Ge*J+lr*V,m[3]=yt*J+kr*V,m[4]=kt*J-ae*V,m[5]=Ut*J-ve*V,m[6]=lr*J-Ge*V,m[7]=kr*J-yt*V,m}function A1(m,g,P,V,J){var ae=1/Math.tan(g/2),ve;return m[0]=ae/P,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,J!=null&&J!==1/0?(ve=1/(V-J),m[10]=(J+V)*ve,m[14]=2*J*V*ve):(m[10]=-1,m[14]=-2*V),m}function Zf(m,g,P,V,J,ae,ve){var Ge=1/(g-P),yt=1/(V-J),kt=1/(ae-ve);return m[0]=-2*Ge,m[1]=0,m[2]=0,m[3]=0,m[4]=0,m[5]=-2*yt,m[6]=0,m[7]=0,m[8]=0,m[9]=0,m[10]=2*kt,m[11]=0,m[12]=(g+P)*Ge,m[13]=(J+V)*yt,m[14]=(ve+ae)*kt,m[15]=1,m}var Ox=nm;function am(){var m=new vh(3);return vh!=Float32Array&&(m[0]=0,m[1]=0,m[2]=0),m}function Mw(m){var g=new vh(3);return g[0]=m[0],g[1]=m[1],g[2]=m[2],g}function Lp(m,g,P){return m[0]=g[0]+P[0],m[1]=g[1]+P[1],m[2]=g[2]+P[2],m}function om(m,g,P){return m[0]=g[0]-P[0],m[1]=g[1]-P[1],m[2]=g[2]-P[2],m}function Ew(m,g,P){return m[0]=g[0]*P,m[1]=g[1]*P,m[2]=g[2]*P,m}function Nx(m,g){var P=g[0],V=g[1],J=g[2],ae=P*P+V*V+J*J;return ae>0&&(ae=1/Math.sqrt(ae)),m[0]=g[0]*ae,m[1]=g[1]*ae,m[2]=g[2]*ae,m}function N8(m,g){return m[0]*g[0]+m[1]*g[1]+m[2]*g[2]}function U8(m,g,P){var V=g[0],J=g[1],ae=g[2],ve=P[0],Ge=P[1],yt=P[2];return m[0]=J*yt-ae*Ge,m[1]=ae*ve-V*yt,m[2]=V*Ge-J*ve,m}function V8(m,g,P){var V=g[0],J=g[1],ae=g[2];return m[0]=V*P[0]+J*P[3]+ae*P[6],m[1]=V*P[1]+J*P[4]+ae*P[7],m[2]=V*P[2]+J*P[5]+ae*P[8],m}var H8=om,EQ=function(){var m=am();return function(g,P,V,J,ae,ve){var Ge,yt;for(P||(P=3),V||(V=0),J?yt=Math.min(J*P+V,g.length):yt=g.length,Ge=V;Ge<yt;Ge+=P)m[0]=g[Ge],m[1]=g[Ge+1],m[2]=g[Ge+2],ae(m,m,ve),g[Ge]=m[0],g[Ge+1]=m[1],g[Ge+2]=m[2];return g}}();function G8(){var m=new vh(4);return vh!=Float32Array&&(m[0]=0,m[1]=0,m[2]=0,m[3]=0),m}function W8(m,g,P){return m[0]=g[0]*P,m[1]=g[1]*P,m[2]=g[2]*P,m[3]=g[3]*P,m}function j8(m,g){return m[0]*g[0]+m[1]*g[1]+m[2]*g[2]+m[3]*g[3]}function lg(m,g,P){var V=g[0],J=g[1],ae=g[2],ve=g[3];return m[0]=P[0]*V+P[4]*J+P[8]*ae+P[12]*ve,m[1]=P[1]*V+P[5]*J+P[9]*ae+P[13]*ve,m[2]=P[2]*V+P[6]*J+P[10]*ae+P[14]*ve,m[3]=P[3]*V+P[7]*J+P[11]*ae+P[15]*ve,m}var Ux=function(){var m=G8();return function(g,P,V,J,ae,ve){var Ge,yt;for(P||(P=4),V||(V=0),J?yt=Math.min(J*P+V,g.length):yt=g.length,Ge=V;Ge<yt;Ge+=P)m[0]=g[Ge],m[1]=g[Ge+1],m[2]=g[Ge+2],m[3]=g[Ge+3],ae(m,m,ve),g[Ge]=m[0],g[Ge+1]=m[1],g[Ge+2]=m[2],g[Ge+3]=m[3];return g}}();function lC(){var m=new vh(2);return vh!=Float32Array&&(m[0]=0,m[1]=0),m}function tM(m){var g=m[0],P=m[1];return g*g+P*P}var rM=tM,kQ=function(){var m=lC();return function(g,P,V,J,ae,ve){var Ge,yt;for(P||(P=2),V||(V=0),J?yt=Math.min(J*P+V,g.length):yt=g.length,Ge=V;Ge<yt;Ge+=P)m[0]=g[Ge],m[1]=g[Ge+1],ae(m,m,ve),g[Ge]=m[0],g[Ge+1]=m[1];return g}}(),Z8=function(m){function g(P){m.call(this,P,cy)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.createBucket=function(V){return new $u(V)},g.prototype.queryRadius=function(V){var J=V;return Md("circle-radius",this,J)+Md("circle-stroke-width",this,J)+kp(this.paint.get("circle-translate"))},g.prototype.queryIntersectsFeature=function(V,J,ae,ve,Ge,yt,kt,Ut){for(var lr=Kp(V,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),yt.angle,kt),kr=this.paint.get("circle-radius").evaluate(J,ae),xr=this.paint.get("circle-stroke-width").evaluate(J,ae),ei=kr+xr,Li=this.paint.get("circle-pitch-alignment")==="map",_n=Li?lr:fC(lr,Ut),rn=Li?ei*kt:ei,Fa=0,On=ve;Fa<On.length;Fa+=1)for(var Ra=On[Fa],so=0,As=Ra;so<As.length;so+=1){var dl=As[so],fl=Li?dl:uC(dl,Ut),eu=rn,Ol=lg([],[dl.x,dl.y,0,1],Ut);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?eu*=Ol[3]/yt.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(eu*=yt.cameraToCenterDistance/Ol[3]),Nu(_n,fl,eu))return!0}return!1},g}(Io);function uC(m,g){var P=lg([],[m.x,m.y,0,1],g);return new l(P[0]/P[3],P[1]/P[3])}function fC(m,g){return m.map(function(P){return uC(P,g)})}var iM=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g}($u);X("HeatmapBucket",iM,{omit:["layers"]});function kd(m,g,P,V){var J=g.width,ae=g.height;if(!V)V=new Uint8Array(J*ae*P);else if(V instanceof Uint8ClampedArray)V=new Uint8Array(V.buffer);else if(V.length!==J*ae*P)throw new RangeError("mismatched image size");return m.width=J,m.height=ae,m.data=V,m}function kw(m,g,P){var V=g.width,J=g.height;if(!(V===m.width&&J===m.height)){var ae=kd({},{width:V,height:J},P);Cw(m,ae,{x:0,y:0},{x:0,y:0},{width:Math.min(m.width,V),height:Math.min(m.height,J)},P),m.width=V,m.height=J,m.data=ae.data}}function Cw(m,g,P,V,J,ae){if(J.width===0||J.height===0)return g;if(J.width>m.width||J.height>m.height||P.x>m.width-J.width||P.y>m.height-J.height)throw new RangeError("out of range source coordinates for image copy");if(J.width>g.width||J.height>g.height||V.x>g.width-J.width||V.y>g.height-J.height)throw new RangeError("out of range destination coordinates for image copy");for(var ve=m.data,Ge=g.data,yt=0;yt<J.height;yt++)for(var kt=((P.y+yt)*m.width+P.x)*ae,Ut=((V.y+yt)*g.width+V.x)*ae,lr=0;lr<J.width*ae;lr++)Ge[Ut+lr]=ve[kt+lr];return g}var zp=function(g,P){kd(this,g,1,P)};zp.prototype.resize=function(g){kw(this,g,1)},zp.prototype.clone=function(){return new zp({width:this.width,height:this.height},new Uint8Array(this.data))},zp.copy=function(g,P,V,J,ae){Cw(g,P,V,J,ae,1)};var kh=function(g,P){kd(this,g,4,P)};kh.prototype.resize=function(g){kw(this,g,4)},kh.prototype.replace=function(g,P){P?this.data.set(g):g instanceof Uint8ClampedArray?this.data=new Uint8Array(g.buffer):this.data=g},kh.prototype.clone=function(){return new kh({width:this.width,height:this.height},new Uint8Array(this.data))},kh.copy=function(g,P,V,J,ae){Cw(g,P,V,J,ae,4)},X("AlphaImage",zp),X("RGBAImage",kh);var Vx=new fa({"heatmap-radius":new jr(Ri.paint_heatmap["heatmap-radius"]),"heatmap-weight":new jr(Ri.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Gt(Ri.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ta(Ri.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Gt(Ri.paint_heatmap["heatmap-opacity"])}),S1={paint:Vx};function Hx(m){var g={},P=m.resolution||256,V=m.clips?m.clips.length:1,J=m.image||new kh({width:P,height:V}),ae=function(Fa,On,Ra){g[m.evaluationKey]=Ra;var so=m.expression.evaluate(g);J.data[Fa+On+0]=Math.floor(so.r*255/so.a),J.data[Fa+On+1]=Math.floor(so.g*255/so.a),J.data[Fa+On+2]=Math.floor(so.b*255/so.a),J.data[Fa+On+3]=Math.floor(so.a*255)};if(m.clips)for(var kt=0,Ut=0;kt<V;++kt,Ut+=P*4)for(var lr=0,kr=0;lr<P;lr++,kr+=4){var xr=lr/(P-1),ei=m.clips[kt],Li=ei.start,_n=ei.end,rn=Li*(1-xr)+_n*xr;ae(Ut,kr,rn)}else for(var ve=0,Ge=0;ve<P;ve++,Ge+=4){var yt=ve/(P-1);ae(0,Ge,yt)}return J}var Lw=function(m){function g(P){m.call(this,P,S1),this._updateColorRamp()}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.createBucket=function(V){return new iM(V)},g.prototype._handleSpecialPaintPropertyUpdate=function(V){V==="heatmap-color"&&this._updateColorRamp()},g.prototype._updateColorRamp=function(){var V=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=Hx({expression:V,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},g.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},g.prototype.queryRadius=function(){return 0},g.prototype.queryIntersectsFeature=function(){return!1},g.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},g}(Io),X8=new fa({"hillshade-illumination-direction":new Gt(Ri.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Gt(Ri.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Gt(Ri.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Gt(Ri.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Gt(Ri.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Gt(Ri.paint_hillshade["hillshade-accent-color"])}),Y8={paint:X8},cC=function(m){function g(P){m.call(this,P,Y8)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},g}(Io),hC=qs([{name:"a_pos",components:2,type:"Int16"}],4),K8=hC.members,zw=M1,dC=M1;function M1(m,g,P){P=P||2;var V=g&&g.length,J=V?g[0]*P:m.length,ae=Pw(m,0,J,P,!0),ve=[];if(!ae||ae.next===ae.prev)return ve;var Ge,yt,kt,Ut,lr,kr,xr;if(V&&(ae=lm(m,g,ae,P)),m.length>80*P){Ge=kt=m[0],yt=Ut=m[1];for(var ei=P;ei<J;ei+=P)lr=m[ei],kr=m[ei+1],lr<Ge&&(Ge=lr),kr<yt&&(yt=kr),lr>kt&&(kt=lr),kr>Ut&&(Ut=kr);xr=Math.max(kt-Ge,Ut-yt),xr=xr!==0?1/xr:0}return Gx(ae,ve,P,Ge,yt,xr),ve}function Pw(m,g,P,V,J){var ae,ve;if(J===fM(m,g,P,V)>0)for(ae=g;ae<P;ae+=V)ve=gC(ae,m[ae],m[ae+1],ve);else for(ae=P-V;ae>=g;ae-=V)ve=gC(ae,m[ae],m[ae+1],ve);return ve&&jx(ve,ve.next)&&(Yx(ve),ve=ve.next),ve}function sm(m,g){if(!m)return m;g||(g=m);var P=m,V;do if(V=!1,!P.steiner&&(jx(P,P.next)||Yc(P.prev,P,P.next)===0)){if(Yx(P),P=g=P.prev,P===P.next)break;V=!0}else P=P.next;while(V||P!==g);return g}function Gx(m,g,P,V,J,ae,ve){if(m){!ve&&ae&&Iw(m,V,J,ae);for(var Ge=m,yt,kt;m.prev!==m.next;){if(yt=m.prev,kt=m.next,ae?vC(m,V,J,ae):pC(m)){g.push(yt.i/P),g.push(m.i/P),g.push(kt.i/P),Yx(m),m=kt.next,Ge=kt.next;continue}if(m=kt,m===Ge){ve?ve===1?(m=Wx(sm(m),g,P),Gx(m,g,P,V,J,ae,2)):ve===2&&p0(m,g,P,V,J,ae):Gx(sm(m),g,P,V,J,ae,1);break}}}}function pC(m){var g=m.prev,P=m,V=m.next;if(Yc(g,P,V)>=0)return!1;for(var J=m.next.next;J!==m.prev;){if(um(g.x,g.y,P.x,P.y,V.x,V.y,J.x,J.y)&&Yc(J.prev,J,J.next)>=0)return!1;J=J.next}return!0}function vC(m,g,P,V){var J=m.prev,ae=m,ve=m.next;if(Yc(J,ae,ve)>=0)return!1;for(var Ge=J.x<ae.x?J.x<ve.x?J.x:ve.x:ae.x<ve.x?ae.x:ve.x,yt=J.y<ae.y?J.y<ve.y?J.y:ve.y:ae.y<ve.y?ae.y:ve.y,kt=J.x>ae.x?J.x>ve.x?J.x:ve.x:ae.x>ve.x?ae.x:ve.x,Ut=J.y>ae.y?J.y>ve.y?J.y:ve.y:ae.y>ve.y?ae.y:ve.y,lr=oM(Ge,yt,g,P,V),kr=oM(kt,Ut,g,P,V),xr=m.prevZ,ei=m.nextZ;xr&&xr.z>=lr&&ei&&ei.z<=kr;){if(xr!==m.prev&&xr!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,xr.x,xr.y)&&Yc(xr.prev,xr,xr.next)>=0||(xr=xr.prevZ,ei!==m.prev&&ei!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,ei.x,ei.y)&&Yc(ei.prev,ei,ei.next)>=0))return!1;ei=ei.nextZ}for(;xr&&xr.z>=lr;){if(xr!==m.prev&&xr!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,xr.x,xr.y)&&Yc(xr.prev,xr,xr.next)>=0)return!1;xr=xr.prevZ}for(;ei&&ei.z<=kr;){if(ei!==m.prev&&ei!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,ei.x,ei.y)&&Yc(ei.prev,ei,ei.next)>=0)return!1;ei=ei.nextZ}return!0}function Wx(m,g,P){var V=m;do{var J=V.prev,ae=V.next.next;!jx(J,ae)&&Dw(J,V,V.next,ae)&&Xx(J,ae)&&Xx(ae,J)&&(g.push(J.i/P),g.push(V.i/P),g.push(ae.i/P),Yx(V),Yx(V.next),V=m=ae),V=V.next}while(V!==m);return sm(V)}function p0(m,g,P,V,J,ae){var ve=m;do{for(var Ge=ve.next.next;Ge!==ve.prev;){if(ve.i!==Ge.i&&E1(ve,Ge)){var yt=lM(ve,Ge);ve=sm(ve,ve.next),yt=sm(yt,yt.next),Gx(ve,g,P,V,J,ae),Gx(yt,g,P,V,J,ae);return}Ge=Ge.next}ve=ve.next}while(ve!==m)}function lm(m,g,P,V){var J=[],ae,ve,Ge,yt,kt;for(ae=0,ve=g.length;ae<ve;ae++)Ge=g[ae]*V,yt=ae<ve-1?g[ae+1]*V:m.length,kt=Pw(m,Ge,yt,V,!1),kt===kt.next&&(kt.steiner=!0),J.push(sM(kt));for(J.sort(yC),ae=0;ae<J.length;ae++)nM(J[ae],P),P=sm(P,P.next);return P}function yC(m,g){return m.x-g.x}function nM(m,g){if(g=J8(m,g),g){var P=lM(g,m);sm(g,g.next),sm(P,P.next)}}function J8(m,g){var P=g,V=m.x,J=m.y,ae=-1/0,ve;do{if(J<=P.y&&J>=P.next.y&&P.next.y!==P.y){var Ge=P.x+(J-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(Ge<=V&&Ge>ae){if(ae=Ge,Ge===V){if(J===P.y)return P;if(J===P.next.y)return P.next}ve=P.x<P.next.x?P:P.next}}P=P.next}while(P!==g);if(!ve)return null;if(V===ae)return ve;var yt=ve,kt=ve.x,Ut=ve.y,lr=1/0,kr;P=ve;do V>=P.x&&P.x>=kt&&V!==P.x&&um(J<Ut?V:ae,J,kt,Ut,J<Ut?ae:V,J,P.x,P.y)&&(kr=Math.abs(J-P.y)/(V-P.x),Xx(P,m)&&(kr<lr||kr===lr&&(P.x>ve.x||P.x===ve.x&&$8(ve,P)))&&(ve=P,lr=kr)),P=P.next;while(P!==yt);return ve}function $8(m,g){return Yc(m.prev,m,g.prev)<0&&Yc(g.next,m,m.next)<0}function Iw(m,g,P,V){var J=m;do J.z===null&&(J.z=oM(J.x,J.y,g,P,V)),J.prevZ=J.prev,J.nextZ=J.next,J=J.next;while(J!==m);J.prevZ.nextZ=null,J.prevZ=null,aM(J)}function aM(m){var g,P,V,J,ae,ve,Ge,yt,kt=1;do{for(P=m,m=null,ae=null,ve=0;P;){for(ve++,V=P,Ge=0,g=0;g<kt&&(Ge++,V=V.nextZ,!!V);g++);for(yt=kt;Ge>0||yt>0&&V;)Ge!==0&&(yt===0||!V||P.z<=V.z)?(J=P,P=P.nextZ,Ge--):(J=V,V=V.nextZ,yt--),ae?ae.nextZ=J:m=J,J.prevZ=ae,ae=J;P=V}ae.nextZ=null,kt*=2}while(ve>1);return m}function oM(m,g,P,V,J){return m=32767*(m-P)*J,g=32767*(g-V)*J,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,g=(g|g<<8)&16711935,g=(g|g<<4)&252645135,g=(g|g<<2)&858993459,g=(g|g<<1)&1431655765,m|g<<1}function sM(m){var g=m,P=m;do(g.x<P.x||g.x===P.x&&g.y<P.y)&&(P=g),g=g.next;while(g!==m);return P}function um(m,g,P,V,J,ae,ve,Ge){return(J-ve)*(g-Ge)-(m-ve)*(ae-Ge)>=0&&(m-ve)*(V-Ge)-(P-ve)*(g-Ge)>=0&&(P-ve)*(ae-Ge)-(J-ve)*(V-Ge)>=0}function E1(m,g){return m.next.i!==g.i&&m.prev.i!==g.i&&!mC(m,g)&&(Xx(m,g)&&Xx(g,m)&&Q8(m,g)&&(Yc(m.prev,m,g.prev)||Yc(m,g.prev,g))||jx(m,g)&&Yc(m.prev,m,m.next)>0&&Yc(g.prev,g,g.next)>0)}function Yc(m,g,P){return(g.y-m.y)*(P.x-g.x)-(g.x-m.x)*(P.y-g.y)}function jx(m,g){return m.x===g.x&&m.y===g.y}function Dw(m,g,P,V){var J=ug(Yc(m,g,P)),ae=ug(Yc(m,g,V)),ve=ug(Yc(P,V,m)),Ge=ug(Yc(P,V,g));return!!(J!==ae&&ve!==Ge||J===0&&Zx(m,P,g)||ae===0&&Zx(m,V,g)||ve===0&&Zx(P,m,V)||Ge===0&&Zx(P,g,V))}function Zx(m,g,P){return g.x<=Math.max(m.x,P.x)&&g.x>=Math.min(m.x,P.x)&&g.y<=Math.max(m.y,P.y)&&g.y>=Math.min(m.y,P.y)}function ug(m){return m>0?1:m<0?-1:0}function mC(m,g){var P=m;do{if(P.i!==m.i&&P.next.i!==m.i&&P.i!==g.i&&P.next.i!==g.i&&Dw(P,P.next,m,g))return!0;P=P.next}while(P!==m);return!1}function Xx(m,g){return Yc(m.prev,m,m.next)<0?Yc(m,g,m.next)>=0&&Yc(m,m.prev,g)>=0:Yc(m,g,m.prev)<0||Yc(m,m.next,g)<0}function Q8(m,g){var P=m,V=!1,J=(m.x+g.x)/2,ae=(m.y+g.y)/2;do P.y>ae!=P.next.y>ae&&P.next.y!==P.y&&J<(P.next.x-P.x)*(ae-P.y)/(P.next.y-P.y)+P.x&&(V=!V),P=P.next;while(P!==m);return V}function lM(m,g){var P=new uM(m.i,m.x,m.y),V=new uM(g.i,g.x,g.y),J=m.next,ae=g.prev;return m.next=g,g.prev=m,P.next=J,J.prev=P,V.next=P,P.prev=V,ae.next=V,V.prev=ae,V}function gC(m,g,P,V){var J=new uM(m,g,P);return V?(J.next=V.next,J.prev=V,V.next.prev=J,V.next=J):(J.prev=J,J.next=J),J}function Yx(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 uM(m,g,P){this.i=m,this.x=g,this.y=P,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}M1.deviation=function(m,g,P,V){var J=g&&g.length,ae=J?g[0]*P:m.length,ve=Math.abs(fM(m,0,ae,P));if(J)for(var Ge=0,yt=g.length;Ge<yt;Ge++){var kt=g[Ge]*P,Ut=Ge<yt-1?g[Ge+1]*P:m.length;ve-=Math.abs(fM(m,kt,Ut,P))}var lr=0;for(Ge=0;Ge<V.length;Ge+=3){var kr=V[Ge]*P,xr=V[Ge+1]*P,ei=V[Ge+2]*P;lr+=Math.abs((m[kr]-m[ei])*(m[xr+1]-m[kr+1])-(m[kr]-m[xr])*(m[ei+1]-m[kr+1]))}return ve===0&&lr===0?0:Math.abs((lr-ve)/ve)};function fM(m,g,P,V){for(var J=0,ae=g,ve=P-V;ae<P;ae+=V)J+=(m[ve]-m[ae])*(m[ae+1]+m[ve+1]),ve=ae;return J}M1.flatten=function(m){for(var g=m[0][0].length,P={vertices:[],holes:[],dimensions:g},V=0,J=0;J<m.length;J++){for(var ae=0;ae<m[J].length;ae++)for(var ve=0;ve<g;ve++)P.vertices.push(m[J][ae][ve]);J>0&&(V+=m[J-1].length,P.holes.push(V))}return P},zw.default=dC;function cM(m,g,P,V,J){dy(m,g,P||0,V||m.length-1,J||_C)}function dy(m,g,P,V,J){for(;V>P;){if(V-P>600){var ae=V-P+1,ve=g-P+1,Ge=Math.log(ae),yt=.5*Math.exp(2*Ge/3),kt=.5*Math.sqrt(Ge*yt*(ae-yt)/ae)*(ve-ae/2<0?-1:1),Ut=Math.max(P,Math.floor(g-ve*yt/ae+kt)),lr=Math.min(V,Math.floor(g+(ae-ve)*yt/ae+kt));dy(m,g,Ut,lr,J)}var kr=m[g],xr=P,ei=V;for(k1(m,P,g),J(m[V],kr)>0&&k1(m,P,V);xr<ei;){for(k1(m,xr,ei),xr++,ei--;J(m[xr],kr)<0;)xr++;for(;J(m[ei],kr)>0;)ei--}J(m[P],kr)===0?k1(m,P,ei):(ei++,k1(m,ei,V)),ei<=g&&(P=ei+1),g<=ei&&(V=ei-1)}}function k1(m,g,P){var V=m[g];m[g]=m[P],m[P]=V}function _C(m,g){return m<g?-1:m>g?1:0}function Rw(m,g){var P=m.length;if(P<=1)return[m];for(var V=[],J,ae,ve=0;ve<P;ve++){var Ge=be(m[ve]);Ge!==0&&(m[ve].area=Math.abs(Ge),ae===void 0&&(ae=Ge<0),ae===Ge<0?(J&&V.push(J),J=[m[ve]]):J.push(m[ve]))}if(J&&V.push(J),g>1)for(var yt=0;yt<V.length;yt++)V[yt].length<=g||(cM(V[yt],g,1,V[yt].length-1,xC),V[yt]=V[yt].slice(0,g));return V}function xC(m,g){return g.area-m.area}function Fw(m,g,P){for(var V=P.patternDependencies,J=!1,ae=0,ve=g;ae<ve.length;ae+=1){var Ge=ve[ae],yt=Ge.paint.get(m+"-pattern");yt.isConstant()||(J=!0);var kt=yt.constantOr(null);kt&&(J=!0,V[kt.to]=!0,V[kt.from]=!0)}return J}function Kx(m,g,P,V,J){for(var ae=J.patternDependencies,ve=0,Ge=g;ve<Ge.length;ve+=1){var yt=Ge[ve],kt=yt.paint.get(m+"-pattern"),Ut=kt.value;if(Ut.kind!=="constant"){var lr=Ut.evaluate({zoom:V-1},P,{},J.availableImages),kr=Ut.evaluate({zoom:V},P,{},J.availableImages),xr=Ut.evaluate({zoom:V+1},P,{},J.availableImages);lr=lr&&lr.name?lr.name:lr,kr=kr&&kr.name?kr.name:kr,xr=xr&&xr.name?xr.name:xr,ae[lr]=!0,ae[kr]=!0,ae[xr]=!0,P.patterns[yt.id]={min:lr,mid:kr,max:xr}}}return P}var Jx=500,yv=function(g){this.zoom=g.zoom,this.overscaling=g.overscaling,this.layers=g.layers,this.layerIds=this.layers.map(function(P){return P.id}),this.index=g.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new La,this.indexArray=new zl,this.indexArray2=new Tu,this.programConfigurations=new ra(g.layers,g.zoom),this.segments=new Ou,this.segments2=new Ou,this.stateDependentLayerIds=this.layers.filter(function(P){return P.isStateDependent()}).map(function(P){return P.id})};yv.prototype.populate=function(g,P,V){this.hasPattern=Fw("fill",this.layers,P);for(var J=this.layers[0].layout.get("fill-sort-key"),ae=[],ve=0,Ge=g;ve<Ge.length;ve+=1){var yt=Ge[ve],kt=yt.feature,Ut=yt.id,lr=yt.index,kr=yt.sourceLayerIndex,xr=this.layers[0]._featureFilter.needGeometry,ei=Mu(kt,xr);if(this.layers[0]._featureFilter.filter(new qo(this.zoom),ei,V)){var Li=J?J.evaluate(ei,{},V,P.availableImages):void 0,_n={id:Ut,properties:kt.properties,type:kt.type,sourceLayerIndex:kr,index:lr,geometry:xr?ei.geometry:Ml(kt),patterns:{},sortKey:Li};ae.push(_n)}}J&&ae.sort(function(Ol,Xl){return Ol.sortKey-Xl.sortKey});for(var rn=0,Fa=ae;rn<Fa.length;rn+=1){var On=Fa[rn],Ra=On,so=Ra.geometry,As=Ra.index,dl=Ra.sourceLayerIndex;if(this.hasPattern){var fl=Kx("fill",this.layers,On,this.zoom,P);this.patternFeatures.push(fl)}else this.addFeature(On,so,As,V,{});var eu=g[As].feature;P.featureIndex.insert(eu,so,As,dl,this.index)}},yv.prototype.update=function(g,P,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(g,P,this.stateDependentLayers,V)},yv.prototype.addFeatures=function(g,P,V){for(var J=0,ae=this.patternFeatures;J<ae.length;J+=1){var ve=ae[J];this.addFeature(ve,ve.geometry,ve.index,P,V)}},yv.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},yv.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},yv.prototype.upload=function(g){this.uploaded||(this.layoutVertexBuffer=g.createVertexBuffer(this.layoutVertexArray,K8),this.indexBuffer=g.createIndexBuffer(this.indexArray),this.indexBuffer2=g.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(g),this.uploaded=!0},yv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},yv.prototype.addFeature=function(g,P,V,J,ae){for(var ve=0,Ge=Rw(P,Jx);ve<Ge.length;ve+=1){for(var yt=Ge[ve],kt=0,Ut=0,lr=yt;Ut<lr.length;Ut+=1){var kr=lr[Ut];kt+=kr.length}for(var xr=this.segments.prepareSegment(kt,this.layoutVertexArray,this.indexArray),ei=xr.vertexLength,Li=[],_n=[],rn=0,Fa=yt;rn<Fa.length;rn+=1){var On=Fa[rn];if(On.length!==0){On!==yt[0]&&_n.push(Li.length/2);var Ra=this.segments2.prepareSegment(On.length,this.layoutVertexArray,this.indexArray2),so=Ra.vertexLength;this.layoutVertexArray.emplaceBack(On[0].x,On[0].y),this.indexArray2.emplaceBack(so+On.length-1,so),Li.push(On[0].x),Li.push(On[0].y);for(var As=1;As<On.length;As++)this.layoutVertexArray.emplaceBack(On[As].x,On[As].y),this.indexArray2.emplaceBack(so+As-1,so+As),Li.push(On[As].x),Li.push(On[As].y);Ra.vertexLength+=On.length,Ra.primitiveLength+=On.length}}for(var dl=zw(Li,_n),fl=0;fl<dl.length;fl+=3)this.indexArray.emplaceBack(ei+dl[fl],ei+dl[fl+1],ei+dl[fl+2]);xr.vertexLength+=kt,xr.primitiveLength+=dl.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,g,V,ae,J)},X("FillBucket",yv,{omit:["layers","patternFeatures"]});var hM=new fa({"fill-sort-key":new jr(Ri.layout_fill["fill-sort-key"])}),bC=new fa({"fill-antialias":new Gt(Ri.paint_fill["fill-antialias"]),"fill-opacity":new jr(Ri.paint_fill["fill-opacity"]),"fill-color":new jr(Ri.paint_fill["fill-color"]),"fill-outline-color":new jr(Ri.paint_fill["fill-outline-color"]),"fill-translate":new Gt(Ri.paint_fill["fill-translate"]),"fill-translate-anchor":new Gt(Ri.paint_fill["fill-translate-anchor"]),"fill-pattern":new _i(Ri.paint_fill["fill-pattern"])}),Jp={paint:bC,layout:hM},$x=function(m){function g(P){m.call(this,P,Jp)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.recalculate=function(V,J){m.prototype.recalculate.call(this,V,J);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"])},g.prototype.createBucket=function(V){return new yv(V)},g.prototype.queryRadius=function(){return kp(this.paint.get("fill-translate"))},g.prototype.queryIntersectsFeature=function(V,J,ae,ve,Ge,yt,kt){var Ut=Kp(V,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),yt.angle,kt);return yf(Ut,ve)},g.prototype.isTileClipped=function(){return!0},g}(Io),wC=qs([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),TC=wC.members,dM=fg;function fg(m,g,P,V,J){this.properties={},this.extent=P,this.type=0,this._pbf=m,this._geometry=-1,this._keys=V,this._values=J,m.readFields(AC,this,g)}function AC(m,g,P){m==1?g.id=P.readVarint():m==2?SC(P,g):m==3?g.type=P.readVarint():m==4&&(g._geometry=P.pos)}function SC(m,g){for(var P=m.readVarint()+m.pos;m.pos<P;){var V=g._keys[m.readVarint()],J=g._values[m.readVarint()];g.properties[V]=J}}fg.types=["Unknown","Point","LineString","Polygon"],fg.prototype.loadGeometry=function(){var m=this._pbf;m.pos=this._geometry;for(var g=m.readVarint()+m.pos,P=1,V=0,J=0,ae=0,ve=[],Ge;m.pos<g;){if(V<=0){var yt=m.readVarint();P=yt&7,V=yt>>3}if(V--,P===1||P===2)J+=m.readSVarint(),ae+=m.readSVarint(),P===1&&(Ge&&ve.push(Ge),Ge=[]),Ge.push(new l(J,ae));else if(P===7)Ge&&Ge.push(Ge[0].clone());else throw new Error("unknown command "+P)}return Ge&&ve.push(Ge),ve},fg.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var g=m.readVarint()+m.pos,P=1,V=0,J=0,ae=0,ve=1/0,Ge=-1/0,yt=1/0,kt=-1/0;m.pos<g;){if(V<=0){var Ut=m.readVarint();P=Ut&7,V=Ut>>3}if(V--,P===1||P===2)J+=m.readSVarint(),ae+=m.readSVarint(),J<ve&&(ve=J),J>Ge&&(Ge=J),ae<yt&&(yt=ae),ae>kt&&(kt=ae);else if(P!==7)throw new Error("unknown command "+P)}return[ve,yt,Ge,kt]},fg.prototype.toGeoJSON=function(m,g,P){var V=this.extent*Math.pow(2,P),J=this.extent*m,ae=this.extent*g,ve=this.loadGeometry(),Ge=fg.types[this.type],yt,kt;function Ut(xr){for(var ei=0;ei<xr.length;ei++){var Li=xr[ei],_n=180-(Li.y+ae)*360/V;xr[ei]=[(Li.x+J)*360/V-180,360/Math.PI*Math.atan(Math.exp(_n*Math.PI/180))-90]}}switch(this.type){case 1:var lr=[];for(yt=0;yt<ve.length;yt++)lr[yt]=ve[yt][0];ve=lr,Ut(ve);break;case 2:for(yt=0;yt<ve.length;yt++)Ut(ve[yt]);break;case 3:for(ve=eB(ve),yt=0;yt<ve.length;yt++)for(kt=0;kt<ve[yt].length;kt++)Ut(ve[yt][kt]);break}ve.length===1?ve=ve[0]:Ge="Multi"+Ge;var kr={type:"Feature",geometry:{type:Ge,coordinates:ve},properties:this.properties};return"id"in this&&(kr.id=this.id),kr};function eB(m){var g=m.length;if(g<=1)return[m];for(var P=[],V,J,ae=0;ae<g;ae++){var ve=MC(m[ae]);ve!==0&&(J===void 0&&(J=ve<0),J===ve<0?(V&&P.push(V),V=[m[ae]]):V.push(m[ae]))}return V&&P.push(V),P}function MC(m){for(var g=0,P=0,V=m.length,J=V-1,ae,ve;P<V;J=P++)ae=m[P],ve=m[J],g+=(ve.x-ae.x)*(ae.y+ve.y);return g}var py=pM;function pM(m,g){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=m,this._keys=[],this._values=[],this._features=[],m.readFields(EC,this,g),this.length=this._features.length}function EC(m,g,P){m===15?g.version=P.readVarint():m===1?g.name=P.readString():m===5?g.extent=P.readVarint():m===2?g._features.push(P.pos):m===3?g._keys.push(P.readString()):m===4&&g._values.push(kC(P))}function kC(m){for(var g=null,P=m.readVarint()+m.pos;m.pos<P;){var V=m.readVarint()>>3;g=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 g}pM.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 g=this._pbf.readVarint()+this._pbf.pos;return new dM(this._pbf,g,this.extent,this._keys,this._values)};var CC=tB;function tB(m,g){this.layers=m.readFields(rB,{},g)}function rB(m,g,P){if(m===3){var V=new py(P,P.readVarint()+P.pos);V.length&&(g[V.name]=V)}}var LC=CC,C1=dM,zC=py,vy={VectorTile:LC,VectorTileFeature:C1,VectorTileLayer:zC},PC=vy.VectorTileFeature.types,qw=500,L1=Math.pow(2,13);function fm(m,g,P,V,J,ae,ve,Ge){m.emplaceBack(g,P,Math.floor(V*L1)*2+ve,J*L1*2,ae*L1*2,Math.round(Ge))}var Hv=function(g){this.zoom=g.zoom,this.overscaling=g.overscaling,this.layers=g.layers,this.layerIds=this.layers.map(function(P){return P.id}),this.index=g.index,this.hasPattern=!1,this.layoutVertexArray=new Ws,this.indexArray=new zl,this.programConfigurations=new ra(g.layers,g.zoom),this.segments=new Ou,this.stateDependentLayerIds=this.layers.filter(function(P){return P.isStateDependent()}).map(function(P){return P.id})};Hv.prototype.populate=function(g,P,V){this.features=[],this.hasPattern=Fw("fill-extrusion",this.layers,P);for(var J=0,ae=g;J<ae.length;J+=1){var ve=ae[J],Ge=ve.feature,yt=ve.id,kt=ve.index,Ut=ve.sourceLayerIndex,lr=this.layers[0]._featureFilter.needGeometry,kr=Mu(Ge,lr);if(this.layers[0]._featureFilter.filter(new qo(this.zoom),kr,V)){var xr={id:yt,sourceLayerIndex:Ut,index:kt,geometry:lr?kr.geometry:Ml(Ge),properties:Ge.properties,type:Ge.type,patterns:{}};this.hasPattern?this.features.push(Kx("fill-extrusion",this.layers,xr,this.zoom,P)):this.addFeature(xr,xr.geometry,kt,V,{}),P.featureIndex.insert(Ge,xr.geometry,kt,Ut,this.index,!0)}}},Hv.prototype.addFeatures=function(g,P,V){for(var J=0,ae=this.features;J<ae.length;J+=1){var ve=ae[J],Ge=ve.geometry;this.addFeature(ve,Ge,ve.index,P,V)}},Hv.prototype.update=function(g,P,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(g,P,this.stateDependentLayers,V)},Hv.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Hv.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Hv.prototype.upload=function(g){this.uploaded||(this.layoutVertexBuffer=g.createVertexBuffer(this.layoutVertexArray,TC),this.indexBuffer=g.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(g),this.uploaded=!0},Hv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Hv.prototype.addFeature=function(g,P,V,J,ae){for(var ve=0,Ge=Rw(P,qw);ve<Ge.length;ve+=1){for(var yt=Ge[ve],kt=0,Ut=0,lr=yt;Ut<lr.length;Ut+=1){var kr=lr[Ut];kt+=kr.length}for(var xr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),ei=0,Li=yt;ei<Li.length;ei+=1){var _n=Li[ei];if(_n.length!==0&&!nB(_n))for(var rn=0,Fa=0;Fa<_n.length;Fa++){var On=_n[Fa];if(Fa>=1){var Ra=_n[Fa-1];if(!iB(On,Ra)){xr.vertexLength+4>Ou.MAX_VERTEX_ARRAY_LENGTH&&(xr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var so=On.sub(Ra)._perp()._unit(),As=Ra.dist(On);rn+As>32768&&(rn=0),fm(this.layoutVertexArray,On.x,On.y,so.x,so.y,0,0,rn),fm(this.layoutVertexArray,On.x,On.y,so.x,so.y,0,1,rn),rn+=As,fm(this.layoutVertexArray,Ra.x,Ra.y,so.x,so.y,0,0,rn),fm(this.layoutVertexArray,Ra.x,Ra.y,so.x,so.y,0,1,rn);var dl=xr.vertexLength;this.indexArray.emplaceBack(dl,dl+2,dl+1),this.indexArray.emplaceBack(dl+1,dl+2,dl+3),xr.vertexLength+=4,xr.primitiveLength+=2}}}}if(xr.vertexLength+kt>Ou.MAX_VERTEX_ARRAY_LENGTH&&(xr=this.segments.prepareSegment(kt,this.layoutVertexArray,this.indexArray)),PC[g.type]==="Polygon"){for(var fl=[],eu=[],Ol=xr.vertexLength,Xl=0,Cu=yt;Xl<Cu.length;Xl+=1){var tu=Cu[Xl];if(tu.length!==0){tu!==yt[0]&&eu.push(fl.length/2);for(var ou=0;ou<tu.length;ou++){var Qu=tu[ou];fm(this.layoutVertexArray,Qu.x,Qu.y,0,0,1,1,0),fl.push(Qu.x),fl.push(Qu.y)}}}for(var Eu=zw(fl,eu),Tf=0;Tf<Eu.length;Tf+=3)this.indexArray.emplaceBack(Ol+Eu[Tf],Ol+Eu[Tf+2],Ol+Eu[Tf+1]);xr.primitiveLength+=Eu.length/3,xr.vertexLength+=kt}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,g,V,ae,J)},X("FillExtrusionBucket",Hv,{omit:["layers","features"]});function iB(m,g){return m.x===g.x&&(m.x<0||m.x>eo)||m.y===g.y&&(m.y<0||m.y>eo)}function nB(m){return m.every(function(g){return g.x<0})||m.every(function(g){return g.x>eo})||m.every(function(g){return g.y<0})||m.every(function(g){return g.y>eo})}var z1=new fa({"fill-extrusion-opacity":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new jr(Ri["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new _i(Ri["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new jr(Ri["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new jr(Ri["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),ld={paint:z1},cm=function(m){function g(P){m.call(this,P,ld)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.createBucket=function(V){return new Hv(V)},g.prototype.queryRadius=function(){return kp(this.paint.get("fill-extrusion-translate"))},g.prototype.is3D=function(){return!0},g.prototype.queryIntersectsFeature=function(V,J,ae,ve,Ge,yt,kt,Ut){var lr=Kp(V,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),yt.angle,kt),kr=this.paint.get("fill-extrusion-height").evaluate(J,ae),xr=this.paint.get("fill-extrusion-base").evaluate(J,ae),ei=aB(lr,Ut,yt,0),Li=yM(ve,xr,kr,Ut),_n=Li[0],rn=Li[1];return IC(_n,rn,ei)},g}(Io);function cg(m,g){return m.x*g.x+m.y*g.y}function vM(m,g){if(m.length===1){for(var P=0,V=g[P++],J;!J||V.equals(J);)if(J=g[P++],!J)return 1/0;for(;P<g.length;P++){var ae=g[P],ve=m[0],Ge=J.sub(V),yt=ae.sub(V),kt=ve.sub(V),Ut=cg(Ge,Ge),lr=cg(Ge,yt),kr=cg(yt,yt),xr=cg(kt,Ge),ei=cg(kt,yt),Li=Ut*kr-lr*lr,_n=(kr*xr-lr*ei)/Li,rn=(Ut*ei-lr*xr)/Li,Fa=1-_n-rn,On=V.z*Fa+J.z*_n+ae.z*rn;if(isFinite(On))return On}return 1/0}else{for(var Ra=1/0,so=0,As=g;so<As.length;so+=1){var dl=As[so];Ra=Math.min(Ra,dl.z)}return Ra}}function IC(m,g,P){var V=1/0;yf(P,g)&&(V=vM(P,g[0]));for(var J=0;J<g.length;J++)for(var ae=g[J],ve=m[J],Ge=0;Ge<ae.length-1;Ge++){var yt=ae[Ge],kt=ae[Ge+1],Ut=ve[Ge],lr=ve[Ge+1],kr=[yt,kt,lr,Ut,yt];du(P,kr)&&(V=Math.min(V,vM(P,kr)))}return V===1/0?!1:V}function yM(m,g,P,V){for(var J=[],ae=[],ve=V[8]*g,Ge=V[9]*g,yt=V[10]*g,kt=V[11]*g,Ut=V[8]*P,lr=V[9]*P,kr=V[10]*P,xr=V[11]*P,ei=0,Li=m;ei<Li.length;ei+=1){for(var _n=Li[ei],rn=[],Fa=[],On=0,Ra=_n;On<Ra.length;On+=1){var so=Ra[On],As=so.x,dl=so.y,fl=V[0]*As+V[4]*dl+V[12],eu=V[1]*As+V[5]*dl+V[13],Ol=V[2]*As+V[6]*dl+V[14],Xl=V[3]*As+V[7]*dl+V[15],Cu=fl+ve,tu=eu+Ge,ou=Ol+yt,Qu=Xl+kt,Eu=fl+Ut,Tf=eu+lr,$f=Ol+kr,Af=Xl+xr,Sf=new l(Cu/Qu,tu/Qu);Sf.z=ou/Qu,rn.push(Sf);var bf=new l(Eu/Af,Tf/Af);bf.z=$f/Af,Fa.push(bf)}J.push(rn),ae.push(Fa)}return[J,ae]}function aB(m,g,P,V){for(var J=[],ae=0,ve=m;ae<ve.length;ae+=1){var Ge=ve[ae],yt=[Ge.x,Ge.y,V,1];lg(yt,yt,g),J.push(new l(yt[0]/yt[3],yt[1]/yt[3]))}return J}var DC=qs([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),RC=DC.members,oB=qs([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),FC=oB.members,mM=vy.VectorTileFeature.types,Bw=63,qC=Math.cos(75/2*(Math.PI/180)),Qx=15,gM=20,BC=15,Ow=1/2,eb=Math.pow(2,BC-1)/Ow,yh=function(g){var P=this;this.zoom=g.zoom,this.overscaling=g.overscaling,this.layers=g.layers,this.layerIds=this.layers.map(function(V){return V.id}),this.index=g.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(V){P.gradients[V.id]={}}),this.layoutVertexArray=new Qo,this.layoutVertexArray2=new bl,this.indexArray=new zl,this.programConfigurations=new ra(g.layers,g.zoom),this.segments=new Ou,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(V){return V.isStateDependent()}).map(function(V){return V.id})};yh.prototype.populate=function(g,P,V){this.hasPattern=Fw("line",this.layers,P);for(var J=this.layers[0].layout.get("line-sort-key"),ae=[],ve=0,Ge=g;ve<Ge.length;ve+=1){var yt=Ge[ve],kt=yt.feature,Ut=yt.id,lr=yt.index,kr=yt.sourceLayerIndex,xr=this.layers[0]._featureFilter.needGeometry,ei=Mu(kt,xr);if(this.layers[0]._featureFilter.filter(new qo(this.zoom),ei,V)){var Li=J?J.evaluate(ei,{},V):void 0,_n={id:Ut,properties:kt.properties,type:kt.type,sourceLayerIndex:kr,index:lr,geometry:xr?ei.geometry:Ml(kt),patterns:{},sortKey:Li};ae.push(_n)}}J&&ae.sort(function(Ol,Xl){return Ol.sortKey-Xl.sortKey});for(var rn=0,Fa=ae;rn<Fa.length;rn+=1){var On=Fa[rn],Ra=On,so=Ra.geometry,As=Ra.index,dl=Ra.sourceLayerIndex;if(this.hasPattern){var fl=Kx("line",this.layers,On,this.zoom,P);this.patternFeatures.push(fl)}else this.addFeature(On,so,As,V,{});var eu=g[As].feature;P.featureIndex.insert(eu,so,As,dl,this.index)}},yh.prototype.update=function(g,P,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(g,P,this.stateDependentLayers,V)},yh.prototype.addFeatures=function(g,P,V){for(var J=0,ae=this.patternFeatures;J<ae.length;J+=1){var ve=ae[J];this.addFeature(ve,ve.geometry,ve.index,P,V)}},yh.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},yh.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},yh.prototype.upload=function(g){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=g.createVertexBuffer(this.layoutVertexArray2,FC)),this.layoutVertexBuffer=g.createVertexBuffer(this.layoutVertexArray,RC),this.indexBuffer=g.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(g),this.uploaded=!0},yh.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},yh.prototype.lineFeatureClips=function(g){if(g.properties&&g.properties.hasOwnProperty("mapbox_clip_start")&&g.properties.hasOwnProperty("mapbox_clip_end")){var P=+g.properties.mapbox_clip_start,V=+g.properties.mapbox_clip_end;return{start:P,end:V}}},yh.prototype.addFeature=function(g,P,V,J,ae){var ve=this.layers[0].layout,Ge=ve.get("line-join").evaluate(g,{}),yt=ve.get("line-cap"),kt=ve.get("line-miter-limit"),Ut=ve.get("line-round-limit");this.lineClips=this.lineFeatureClips(g);for(var lr=0,kr=P;lr<kr.length;lr+=1){var xr=kr[lr];this.addLine(xr,g,Ge,yt,kt,Ut)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,g,V,ae,J)},yh.prototype.addLine=function(g,P,V,J,ae,ve){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var Ge=0;Ge<g.length-1;Ge++)this.totalDistance+=g[Ge].dist(g[Ge+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var yt=mM[P.type]==="Polygon",kt=g.length;kt>=2&&g[kt-1].equals(g[kt-2]);)kt--;for(var Ut=0;Ut<kt-1&&g[Ut].equals(g[Ut+1]);)Ut++;if(!(kt<(yt?3:2))){V==="bevel"&&(ae=1.05);var lr=this.overscaling<=16?Qx*eo/(512*this.overscaling):0,kr=this.segments.prepareSegment(kt*10,this.layoutVertexArray,this.indexArray),xr,ei=void 0,Li=void 0,_n=void 0,rn=void 0;this.e1=this.e2=-1,yt&&(xr=g[kt-2],rn=g[Ut].sub(xr)._unit()._perp());for(var Fa=Ut;Fa<kt;Fa++)if(Li=Fa===kt-1?yt?g[Ut+1]:void 0:g[Fa+1],!(Li&&g[Fa].equals(Li))){rn&&(_n=rn),xr&&(ei=xr),xr=g[Fa],rn=Li?Li.sub(xr)._unit()._perp():_n,_n=_n||rn;var On=_n.add(rn);(On.x!==0||On.y!==0)&&On._unit();var Ra=_n.x*rn.x+_n.y*rn.y,so=On.x*rn.x+On.y*rn.y,As=so!==0?1/so:1/0,dl=2*Math.sqrt(2-2*so),fl=so<qC&&ei&&Li,eu=_n.x*rn.y-_n.y*rn.x>0;if(fl&&Fa>Ut){var Ol=xr.dist(ei);if(Ol>2*lr){var Xl=xr.sub(xr.sub(ei)._mult(lr/Ol)._round());this.updateDistance(ei,Xl),this.addCurrentVertex(Xl,_n,0,0,kr),ei=Xl}}var Cu=ei&&Li,tu=Cu?V:yt?"butt":J;if(Cu&&tu==="round"&&(As<ve?tu="miter":As<=2&&(tu="fakeround")),tu==="miter"&&As>ae&&(tu="bevel"),tu==="bevel"&&(As>2&&(tu="flipbevel"),As<ae&&(tu="miter")),ei&&this.updateDistance(ei,xr),tu==="miter")On._mult(As),this.addCurrentVertex(xr,On,0,0,kr);else if(tu==="flipbevel"){if(As>100)On=rn.mult(-1);else{var ou=As*_n.add(rn).mag()/_n.sub(rn).mag();On._perp()._mult(ou*(eu?-1:1))}this.addCurrentVertex(xr,On,0,0,kr),this.addCurrentVertex(xr,On.mult(-1),0,0,kr)}else if(tu==="bevel"||tu==="fakeround"){var Qu=-Math.sqrt(As*As-1),Eu=eu?Qu:0,Tf=eu?0:Qu;if(ei&&this.addCurrentVertex(xr,_n,Eu,Tf,kr),tu==="fakeround")for(var $f=Math.round(dl*180/Math.PI/gM),Af=1;Af<$f;Af++){var Sf=Af/$f;if(Sf!==.5){var bf=Sf-.5,lc=1.0904+Ra*(-3.2452+Ra*(3.55645-Ra*1.43519)),gc=.848013+Ra*(-1.06021+Ra*.215638);Sf=Sf+Sf*bf*(Sf-1)*(lc*bf*bf+gc)}var Jc=rn.sub(_n)._mult(Sf)._add(_n)._unit()._mult(eu?-1:1);this.addHalfVertex(xr,Jc.x,Jc.y,!1,eu,0,kr)}Li&&this.addCurrentVertex(xr,rn,-Eu,-Tf,kr)}else if(tu==="butt")this.addCurrentVertex(xr,On,0,0,kr);else if(tu==="square"){var ih=ei?1:-1;this.addCurrentVertex(xr,On,ih,ih,kr)}else tu==="round"&&(ei&&(this.addCurrentVertex(xr,_n,0,0,kr),this.addCurrentVertex(xr,_n,1,1,kr,!0)),Li&&(this.addCurrentVertex(xr,rn,-1,-1,kr,!0),this.addCurrentVertex(xr,rn,0,0,kr)));if(fl&&Fa<kt-1){var Kh=xr.dist(Li);if(Kh>2*lr){var _h=xr.add(Li.sub(xr)._mult(lr/Kh)._round());this.updateDistance(xr,_h),this.addCurrentVertex(_h,rn,0,0,kr),xr=_h}}}}},yh.prototype.addCurrentVertex=function(g,P,V,J,ae,ve){ve===void 0&&(ve=!1);var Ge=P.x+P.y*V,yt=P.y-P.x*V,kt=-P.x+P.y*J,Ut=-P.y-P.x*J;this.addHalfVertex(g,Ge,yt,ve,!1,V,ae),this.addHalfVertex(g,kt,Ut,ve,!0,-J,ae),this.distance>eb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(g,P,V,J,ae,ve))},yh.prototype.addHalfVertex=function(g,P,V,J,ae,ve,Ge){var yt=g.x,kt=g.y,Ut=this.lineClips?this.scaledDistance*(eb-1):this.scaledDistance,lr=Ut*Ow;if(this.layoutVertexArray.emplaceBack((yt<<1)+(J?1:0),(kt<<1)+(ae?1:0),Math.round(Bw*P)+128,Math.round(Bw*V)+128,(ve===0?0:ve<0?-1:1)+1|(lr&63)<<2,lr>>6),this.lineClips){var kr=this.scaledDistance-this.lineClips.start,xr=this.lineClips.end-this.lineClips.start,ei=kr/xr;this.layoutVertexArray2.emplaceBack(ei,this.lineClipsArray.length)}var Li=Ge.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Li),Ge.primitiveLength++),ae?this.e2=Li:this.e1=Li},yh.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},yh.prototype.updateDistance=function(g,P){this.distance+=g.dist(P),this.updateScaledDistance()},X("LineBucket",yh,{omit:["layers","patternFeatures"]});var _M=new fa({"line-cap":new Gt(Ri.layout_line["line-cap"]),"line-join":new jr(Ri.layout_line["line-join"]),"line-miter-limit":new Gt(Ri.layout_line["line-miter-limit"]),"line-round-limit":new Gt(Ri.layout_line["line-round-limit"]),"line-sort-key":new jr(Ri.layout_line["line-sort-key"])}),xM=new fa({"line-opacity":new jr(Ri.paint_line["line-opacity"]),"line-color":new jr(Ri.paint_line["line-color"]),"line-translate":new Gt(Ri.paint_line["line-translate"]),"line-translate-anchor":new Gt(Ri.paint_line["line-translate-anchor"]),"line-width":new jr(Ri.paint_line["line-width"]),"line-gap-width":new jr(Ri.paint_line["line-gap-width"]),"line-offset":new jr(Ri.paint_line["line-offset"]),"line-blur":new jr(Ri.paint_line["line-blur"]),"line-dasharray":new Mn(Ri.paint_line["line-dasharray"]),"line-pattern":new _i(Ri.paint_line["line-pattern"]),"line-gradient":new Ta(Ri.paint_line["line-gradient"])}),Nw={paint:xM,layout:_M},sB=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.possiblyEvaluate=function(V,J){return J=new qo(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),m.prototype.possiblyEvaluate.call(this,V,J)},g.prototype.evaluate=function(V,J,ae,ve){return J=_({},J,{zoom:Math.floor(J.zoom)}),m.prototype.evaluate.call(this,V,J,ae,ve)},g}(jr),I=new sB(Nw.paint.properties["line-width"].specification);I.useIntegerZoom=!0;var S=function(m){function g(P){m.call(this,P,Nw),this.gradientVersion=0}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._handleSpecialPaintPropertyUpdate=function(V){if(V==="line-gradient"){var J=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=J._styleExpression.expression instanceof lo,this.gradientVersion=(this.gradientVersion+1)%d}},g.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},g.prototype.recalculate=function(V,J){m.prototype.recalculate.call(this,V,J),this.paint._values["line-floorwidth"]=I.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,V)},g.prototype.createBucket=function(V){return new yh(V)},g.prototype.queryRadius=function(V){var J=V,ae=D(Md("line-width",this,J),Md("line-gap-width",this,J)),ve=Md("line-offset",this,J);return ae/2+Math.abs(ve)+kp(this.paint.get("line-translate"))},g.prototype.queryIntersectsFeature=function(V,J,ae,ve,Ge,yt,kt){var Ut=Kp(V,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),yt.angle,kt),lr=kt/2*D(this.paint.get("line-width").evaluate(J,ae),this.paint.get("line-gap-width").evaluate(J,ae)),kr=this.paint.get("line-offset").evaluate(J,ae);return kr&&(ve=Z(ve,kr*kt)),Kf(Ut,ve,lr)},g.prototype.isTileClipped=function(){return!0},g}(Io);function D(m,g){return g>0?g+2*m:m}function Z(m,g){for(var P=[],V=new l(0,0),J=0;J<m.length;J++){for(var ae=m[J],ve=[],Ge=0;Ge<ae.length;Ge++){var yt=ae[Ge-1],kt=ae[Ge],Ut=ae[Ge+1],lr=Ge===0?V:kt.sub(yt)._unit()._perp(),kr=Ge===ae.length-1?V:Ut.sub(kt)._unit()._perp(),xr=lr._add(kr)._unit(),ei=xr.x*kr.x+xr.y*kr.y;xr._mult(1/ei),ve.push(xr._mult(g)._add(kt))}P.push(ve)}return P}var ie=qs([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),pe=qs([{name:"a_projected_pos",components:3,type:"Float32"}],4),xe=qs([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),He=qs([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),at=qs([{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"}]),wt=qs([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Ht=qs([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4),rr=qs([{name:"triangle",components:3,type:"Uint16"}]),pr=qs([{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"}]),Ar=qs([{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"}]),Vr=qs([{type:"Float32",name:"offsetX"}]),ri=qs([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function Ii(m,g,P){var V=g.layout.get("text-transform").evaluate(P,{});return V==="uppercase"?m=m.toLocaleUpperCase():V==="lowercase"&&(m=m.toLocaleLowerCase()),qu.applyArabicShaping&&(m=qu.applyArabicShaping(m)),m}function Zi(m,g,P){return m.sections.forEach(function(V){V.text=Ii(V.text,g,P)}),m}function da(m){var g={},P={},V=[],J=0;function ae(rn){V.push(m[rn]),J++}function ve(rn,Fa,On){var Ra=P[rn];return delete P[rn],P[Fa]=Ra,V[Ra].geometry[0].pop(),V[Ra].geometry[0]=V[Ra].geometry[0].concat(On[0]),Ra}function Ge(rn,Fa,On){var Ra=g[Fa];return delete g[Fa],g[rn]=Ra,V[Ra].geometry[0].shift(),V[Ra].geometry[0]=On[0].concat(V[Ra].geometry[0]),Ra}function yt(rn,Fa,On){var Ra=On?Fa[0][Fa[0].length-1]:Fa[0][0];return rn+":"+Ra.x+":"+Ra.y}for(var kt=0;kt<m.length;kt++){var Ut=m[kt],lr=Ut.geometry,kr=Ut.text?Ut.text.toString():null;if(!kr){ae(kt);continue}var xr=yt(kr,lr),ei=yt(kr,lr,!0);if(xr in P&&ei in g&&P[xr]!==g[ei]){var Li=Ge(xr,ei,lr),_n=ve(xr,ei,V[Li].geometry);delete g[xr],delete P[ei],P[yt(kr,V[_n].geometry,!0)]=_n,V[Li].geometry=null}else xr in P?ve(xr,ei,lr):ei in g?Ge(xr,ei,lr):(ae(kt),g[xr]=J-1,P[ei]=J-1)}return V.filter(function(rn){return rn.geometry})}var cn={"!":"\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 jn(m){for(var g="",P=0;P<m.length;P++){var V=m.charCodeAt(P+1)||null,J=m.charCodeAt(P-1)||null,ae=(!V||!Ji(V)||cn[m[P+1]])&&(!J||!Ji(J)||cn[m[P-1]]);ae&&cn[m[P]]?g+=cn[m[P]]:g+=m[P]}return g}var Va=24,hl=function(m,g,P,V,J){var ae,ve,Ge=J*8-V-1,yt=(1<<Ge)-1,kt=yt>>1,Ut=-7,lr=P?J-1:0,kr=P?-1:1,xr=m[g+lr];for(lr+=kr,ae=xr&(1<<-Ut)-1,xr>>=-Ut,Ut+=Ge;Ut>0;ae=ae*256+m[g+lr],lr+=kr,Ut-=8);for(ve=ae&(1<<-Ut)-1,ae>>=-Ut,Ut+=V;Ut>0;ve=ve*256+m[g+lr],lr+=kr,Ut-=8);if(ae===0)ae=1-kt;else{if(ae===yt)return ve?NaN:(xr?-1:1)*(1/0);ve=ve+Math.pow(2,V),ae=ae-kt}return(xr?-1:1)*ve*Math.pow(2,ae-V)},iu=function(m,g,P,V,J,ae){var ve,Ge,yt,kt=ae*8-J-1,Ut=(1<<kt)-1,lr=Ut>>1,kr=J===23?Math.pow(2,-24)-Math.pow(2,-77):0,xr=V?0:ae-1,ei=V?1:-1,Li=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(Ge=isNaN(g)?1:0,ve=Ut):(ve=Math.floor(Math.log(g)/Math.LN2),g*(yt=Math.pow(2,-ve))<1&&(ve--,yt*=2),ve+lr>=1?g+=kr/yt:g+=kr*Math.pow(2,1-lr),g*yt>=2&&(ve++,yt/=2),ve+lr>=Ut?(Ge=0,ve=Ut):ve+lr>=1?(Ge=(g*yt-1)*Math.pow(2,J),ve=ve+lr):(Ge=g*Math.pow(2,lr-1)*Math.pow(2,J),ve=0));J>=8;m[P+xr]=Ge&255,xr+=ei,Ge/=256,J-=8);for(ve=ve<<J|Ge,kt+=J;kt>0;m[P+xr]=ve&255,xr+=ei,ve/=256,kt-=8);m[P+xr-ei]|=Li*128},Su={read:hl,write:iu},Zl=Qs;function Qs(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}Qs.Varint=0,Qs.Fixed64=1,Qs.Bytes=2,Qs.Fixed32=5;var gu=65536*65536,cu=1/gu,uu=12,Ts=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");Qs.prototype={destroy:function(){this.buf=null},readFields:function(m,g,P){for(P=P||this.length;this.pos<P;){var V=this.readVarint(),J=V>>3,ae=this.pos;this.type=V&7,m(J,g,this),this.pos===ae&&this.skip(V)}return g},readMessage:function(m,g){return this.readFields(m,g,this.readVarint()+this.pos)},readFixed32:function(){var m=Zh(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=Pp(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Zh(this.buf,this.pos)+Zh(this.buf,this.pos+4)*gu;return this.pos+=8,m},readSFixed64:function(){var m=Zh(this.buf,this.pos)+Pp(this.buf,this.pos+4)*gu;return this.pos+=8,m},readFloat:function(){var m=Su.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=Su.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var g=this.buf,P,V;return V=g[this.pos++],P=V&127,V<128||(V=g[this.pos++],P|=(V&127)<<7,V<128)||(V=g[this.pos++],P|=(V&127)<<14,V<128)||(V=g[this.pos++],P|=(V&127)<<21,V<128)?P:(V=g[this.pos],P|=(V&15)<<28,wu(P,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,g=this.pos;return this.pos=m,m-g>=uu&&Ts?qf(this.buf,g,m):fp(this.buf,g,m)},readBytes:function(){var m=this.readVarint()+this.pos,g=this.buf.subarray(this.pos,m);return this.pos=m,g},readPackedVarint:function(m,g){if(this.type!==Qs.Bytes)return m.push(this.readVarint(g));var P=fu(this);for(m=m||[];this.pos<P;)m.push(this.readVarint(g));return m},readPackedSVarint:function(m){if(this.type!==Qs.Bytes)return m.push(this.readSVarint());var g=fu(this);for(m=m||[];this.pos<g;)m.push(this.readSVarint());return m},readPackedBoolean:function(m){if(this.type!==Qs.Bytes)return m.push(this.readBoolean());var g=fu(this);for(m=m||[];this.pos<g;)m.push(this.readBoolean());return m},readPackedFloat:function(m){if(this.type!==Qs.Bytes)return m.push(this.readFloat());var g=fu(this);for(m=m||[];this.pos<g;)m.push(this.readFloat());return m},readPackedDouble:function(m){if(this.type!==Qs.Bytes)return m.push(this.readDouble());var g=fu(this);for(m=m||[];this.pos<g;)m.push(this.readDouble());return m},readPackedFixed32:function(m){if(this.type!==Qs.Bytes)return m.push(this.readFixed32());var g=fu(this);for(m=m||[];this.pos<g;)m.push(this.readFixed32());return m},readPackedSFixed32:function(m){if(this.type!==Qs.Bytes)return m.push(this.readSFixed32());var g=fu(this);for(m=m||[];this.pos<g;)m.push(this.readSFixed32());return m},readPackedFixed64:function(m){if(this.type!==Qs.Bytes)return m.push(this.readFixed64());var g=fu(this);for(m=m||[];this.pos<g;)m.push(this.readFixed64());return m},readPackedSFixed64:function(m){if(this.type!==Qs.Bytes)return m.push(this.readSFixed64());var g=fu(this);for(m=m||[];this.pos<g;)m.push(this.readSFixed64());return m},skip:function(m){var g=m&7;if(g===Qs.Varint)for(;this.buf[this.pos++]>127;);else if(g===Qs.Bytes)this.pos=this.readVarint()+this.pos;else if(g===Qs.Fixed32)this.pos+=4;else if(g===Qs.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+g)},writeTag:function(m,g){this.writeVarint(m<<3|g)},realloc:function(m){for(var g=this.length||16;g<this.pos+m;)g*=2;if(g!==this.length){var P=new Uint8Array(g);P.set(this.buf),this.buf=P,this.length=g}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(m){this.realloc(4),rh(this.buf,m,this.pos),this.pos+=4},writeSFixed32:function(m){this.realloc(4),rh(this.buf,m,this.pos),this.pos+=4},writeFixed64:function(m){this.realloc(8),rh(this.buf,m&-1,this.pos),rh(this.buf,Math.floor(m*cu),this.pos+4),this.pos+=8},writeSFixed64:function(m){this.realloc(8),rh(this.buf,m&-1,this.pos),rh(this.buf,Math.floor(m*cu),this.pos+4),this.pos+=8},writeVarint:function(m){if(m=+m||0,m>268435455||m<0){oc(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 g=this.pos;this.pos=mc(this.buf,m,this.pos);var P=this.pos-g;P>=128&&$p(g,P,this),this.pos=g-1,this.writeVarint(P),this.pos+=P},writeFloat:function(m){this.realloc(4),Su.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),Su.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var g=m.length;this.writeVarint(g),this.realloc(g);for(var P=0;P<g;P++)this.buf[this.pos++]=m[P]},writeRawMessage:function(m,g){this.pos++;var P=this.pos;m(g,this);var V=this.pos-P;V>=128&&$p(P,V,this),this.pos=P-1,this.writeVarint(V),this.pos+=V},writeMessage:function(m,g,P){this.writeTag(m,Qs.Bytes),this.writeRawMessage(g,P)},writePackedVarint:function(m,g){g.length&&this.writeMessage(m,ud,g)},writePackedSVarint:function(m,g){g.length&&this.writeMessage(m,Lh,g)},writePackedBoolean:function(m,g){g.length&&this.writeMessage(m,Zd,g)},writePackedFloat:function(m,g){g.length&&this.writeMessage(m,Wd,g)},writePackedDouble:function(m,g){g.length&&this.writeMessage(m,jd,g)},writePackedFixed32:function(m,g){g.length&&this.writeMessage(m,Kc,g)},writePackedSFixed32:function(m,g){g.length&&this.writeMessage(m,zh,g)},writePackedFixed64:function(m,g){g.length&&this.writeMessage(m,Cd,g)},writePackedSFixed64:function(m,g){g.length&&this.writeMessage(m,fd,g)},writeBytesField:function(m,g){this.writeTag(m,Qs.Bytes),this.writeBytes(g)},writeFixed32Field:function(m,g){this.writeTag(m,Qs.Fixed32),this.writeFixed32(g)},writeSFixed32Field:function(m,g){this.writeTag(m,Qs.Fixed32),this.writeSFixed32(g)},writeFixed64Field:function(m,g){this.writeTag(m,Qs.Fixed64),this.writeFixed64(g)},writeSFixed64Field:function(m,g){this.writeTag(m,Qs.Fixed64),this.writeSFixed64(g)},writeVarintField:function(m,g){this.writeTag(m,Qs.Varint),this.writeVarint(g)},writeSVarintField:function(m,g){this.writeTag(m,Qs.Varint),this.writeSVarint(g)},writeStringField:function(m,g){this.writeTag(m,Qs.Bytes),this.writeString(g)},writeFloatField:function(m,g){this.writeTag(m,Qs.Fixed32),this.writeFloat(g)},writeDoubleField:function(m,g){this.writeTag(m,Qs.Fixed64),this.writeDouble(g)},writeBooleanField:function(m,g){this.writeVarintField(m,!!g)}};function wu(m,g,P){var V=P.buf,J,ae;if(ae=V[P.pos++],J=(ae&112)>>4,ae<128||(ae=V[P.pos++],J|=(ae&127)<<3,ae<128)||(ae=V[P.pos++],J|=(ae&127)<<10,ae<128)||(ae=V[P.pos++],J|=(ae&127)<<17,ae<128)||(ae=V[P.pos++],J|=(ae&127)<<24,ae<128)||(ae=V[P.pos++],J|=(ae&1)<<31,ae<128))return Lu(m,J,g);throw new Error("Expected varint not more than 10 bytes")}function fu(m){return m.type===Qs.Bytes?m.readVarint()+m.pos:m.pos+1}function Lu(m,g,P){return P?g*4294967296+(m>>>0):(g>>>0)*4294967296+(m>>>0)}function oc(m,g){var P,V;if(m>=0?(P=m%4294967296|0,V=m/4294967296|0):(P=~(-m%4294967296),V=~(-m/4294967296),P^4294967295?P=P+1|0:(P=0,V=V+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");g.realloc(10),tc(P,V,g),Ch(V,g)}function tc(m,g,P){P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos]=m&127}function Ch(m,g){var P=(m&7)<<4;g.buf[g.pos++]|=P|((m>>>=3)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127)))))}function $p(m,g,P){var V=g<=16383?1:g<=2097151?2:g<=268435455?3:Math.floor(Math.log(g)/(Math.LN2*7));P.realloc(V);for(var J=P.pos-1;J>=m;J--)P.buf[J+V]=P.buf[J]}function ud(m,g){for(var P=0;P<m.length;P++)g.writeVarint(m[P])}function Lh(m,g){for(var P=0;P<m.length;P++)g.writeSVarint(m[P])}function Wd(m,g){for(var P=0;P<m.length;P++)g.writeFloat(m[P])}function jd(m,g){for(var P=0;P<m.length;P++)g.writeDouble(m[P])}function Zd(m,g){for(var P=0;P<m.length;P++)g.writeBoolean(m[P])}function Kc(m,g){for(var P=0;P<m.length;P++)g.writeFixed32(m[P])}function zh(m,g){for(var P=0;P<m.length;P++)g.writeSFixed32(m[P])}function Cd(m,g){for(var P=0;P<m.length;P++)g.writeFixed64(m[P])}function fd(m,g){for(var P=0;P<m.length;P++)g.writeSFixed64(m[P])}function Zh(m,g){return(m[g]|m[g+1]<<8|m[g+2]<<16)+m[g+3]*16777216}function rh(m,g,P){m[P]=g,m[P+1]=g>>>8,m[P+2]=g>>>16,m[P+3]=g>>>24}function Pp(m,g){return(m[g]|m[g+1]<<8|m[g+2]<<16)+(m[g+3]<<24)}function fp(m,g,P){for(var V="",J=g;J<P;){var ae=m[J],ve=null,Ge=ae>239?4:ae>223?3:ae>191?2:1;if(J+Ge>P)break;var yt,kt,Ut;Ge===1?ae<128&&(ve=ae):Ge===2?(yt=m[J+1],(yt&192)===128&&(ve=(ae&31)<<6|yt&63,ve<=127&&(ve=null))):Ge===3?(yt=m[J+1],kt=m[J+2],(yt&192)===128&&(kt&192)===128&&(ve=(ae&15)<<12|(yt&63)<<6|kt&63,(ve<=2047||ve>=55296&&ve<=57343)&&(ve=null))):Ge===4&&(yt=m[J+1],kt=m[J+2],Ut=m[J+3],(yt&192)===128&&(kt&192)===128&&(Ut&192)===128&&(ve=(ae&15)<<18|(yt&63)<<12|(kt&63)<<6|Ut&63,(ve<=65535||ve>=1114112)&&(ve=null))),ve===null?(ve=65533,Ge=1):ve>65535&&(ve-=65536,V+=String.fromCharCode(ve>>>10&1023|55296),ve=56320|ve&1023),V+=String.fromCharCode(ve),J+=Ge}return V}function qf(m,g,P){return Ts.decode(m.subarray(g,P))}function mc(m,g,P){for(var V=0,J,ae;V<g.length;V++){if(J=g.charCodeAt(V),J>55295&&J<57344)if(ae)if(J<56320){m[P++]=239,m[P++]=191,m[P++]=189,ae=J;continue}else J=ae-55296<<10|J-56320|65536,ae=null;else{J>56319||V+1===g.length?(m[P++]=239,m[P++]=191,m[P++]=189):ae=J;continue}else ae&&(m[P++]=239,m[P++]=191,m[P++]=189,ae=null);J<128?m[P++]=J:(J<2048?m[P++]=J>>6|192:(J<65536?m[P++]=J>>12|224:(m[P++]=J>>18|240,m[P++]=J>>12&63|128),m[P++]=J>>6&63|128),m[P++]=J&63|128)}return P}var sc=3;function Ip(m,g,P){m===1&&P.readMessage(Hc,g)}function Hc(m,g,P){if(m===3){var V=P.readMessage(P1,{}),J=V.id,ae=V.bitmap,ve=V.width,Ge=V.height,yt=V.left,kt=V.top,Ut=V.advance;g.push({id:J,bitmap:new zp({width:ve+2*sc,height:Ge+2*sc},ae),metrics:{width:ve,height:Ge,left:yt,top:kt,advance:Ut}})}}function P1(m,g,P){m===1?g.id=P.readVarint():m===2?g.bitmap=P.readBytes():m===3?g.width=P.readVarint():m===4?g.height=P.readVarint():m===5?g.left=P.readSVarint():m===6?g.top=P.readSVarint():m===7&&(g.advance=P.readVarint())}function v0(m){return new Zl(m).readFields(Ip,[])}var Gv=sc;function Qp(m){for(var g=0,P=0,V=0,J=m;V<J.length;V+=1){var ae=J[V];g+=ae.w*ae.h,P=Math.max(P,ae.w)}m.sort(function(_n,rn){return rn.h-_n.h});for(var ve=Math.max(Math.ceil(Math.sqrt(g/.95)),P),Ge=[{x:0,y:0,w:ve,h:1/0}],yt=0,kt=0,Ut=0,lr=m;Ut<lr.length;Ut+=1)for(var kr=lr[Ut],xr=Ge.length-1;xr>=0;xr--){var ei=Ge[xr];if(!(kr.w>ei.w||kr.h>ei.h)){if(kr.x=ei.x,kr.y=ei.y,kt=Math.max(kt,kr.y+kr.h),yt=Math.max(yt,kr.x+kr.w),kr.w===ei.w&&kr.h===ei.h){var Li=Ge.pop();xr<Ge.length&&(Ge[xr]=Li)}else kr.h===ei.h?(ei.x+=kr.w,ei.w-=kr.w):kr.w===ei.w?(ei.y+=kr.h,ei.h-=kr.h):(Ge.push({x:ei.x+kr.w,y:ei.y,w:ei.w-kr.w,h:kr.h}),ei.y+=kr.h,ei.h-=kr.h);break}}return{w:yt,h:kt,fill:g/(yt*kt)||0}}var Pc=1,uh=function(g,P){var V=P.pixelRatio,J=P.version,ae=P.stretchX,ve=P.stretchY,Ge=P.content;this.paddedRect=g,this.pixelRatio=V,this.stretchX=ae,this.stretchY=ve,this.content=Ge,this.version=J},ev={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};ev.tl.get=function(){return[this.paddedRect.x+Pc,this.paddedRect.y+Pc]},ev.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-Pc,this.paddedRect.y+this.paddedRect.h-Pc]},ev.tlbr.get=function(){return this.tl.concat(this.br)},ev.displaySize.get=function(){return[(this.paddedRect.w-Pc*2)/this.pixelRatio,(this.paddedRect.h-Pc*2)/this.pixelRatio]},Object.defineProperties(uh.prototype,ev);var yy=function(g,P){var V={},J={};this.haveRenderCallbacks=[];var ae=[];this.addImages(g,V,ae),this.addImages(P,J,ae);var ve=Qp(ae),Ge=ve.w,yt=ve.h,kt=new kh({width:Ge||1,height:yt||1});for(var Ut in g){var lr=g[Ut],kr=V[Ut].paddedRect;kh.copy(lr.data,kt,{x:0,y:0},{x:kr.x+Pc,y:kr.y+Pc},lr.data)}for(var xr in P){var ei=P[xr],Li=J[xr].paddedRect,_n=Li.x+Pc,rn=Li.y+Pc,Fa=ei.data.width,On=ei.data.height;kh.copy(ei.data,kt,{x:0,y:0},{x:_n,y:rn},ei.data),kh.copy(ei.data,kt,{x:0,y:On-1},{x:_n,y:rn-1},{width:Fa,height:1}),kh.copy(ei.data,kt,{x:0,y:0},{x:_n,y:rn+On},{width:Fa,height:1}),kh.copy(ei.data,kt,{x:Fa-1,y:0},{x:_n-1,y:rn},{width:1,height:On}),kh.copy(ei.data,kt,{x:0,y:0},{x:_n+Fa,y:rn},{width:1,height:On})}this.image=kt,this.iconPositions=V,this.patternPositions=J};yy.prototype.addImages=function(g,P,V){for(var J in g){var ae=g[J],ve={x:0,y:0,w:ae.data.width+2*Pc,h:ae.data.height+2*Pc};V.push(ve),P[J]=new uh(ve,ae),ae.hasRenderCallback&&this.haveRenderCallbacks.push(J)}},yy.prototype.patchUpdatedImages=function(g,P){g.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var V in g.updatedImages)this.patchUpdatedImage(this.iconPositions[V],g.getImage(V),P),this.patchUpdatedImage(this.patternPositions[V],g.getImage(V),P)},yy.prototype.patchUpdatedImage=function(g,P,V){if(!(!g||!P)&&g.version!==P.version){g.version=P.version;var J=g.tl,ae=J[0],ve=J[1];V.update(P.data,void 0,{x:ae,y:ve})}},X("ImagePosition",uh),X("ImageAtlas",yy);var cp={horizontal:1,vertical:2,horizontalOnly:3},I1=-17;function bM(m){for(var g=0,P=m;g<P.length;g+=1){var V=P[g];if(V.positionedGlyphs.length!==0)return!1}return!0}var Uw=57344,y0=63743,hg=function(){this.scale=1,this.fontStack="",this.imageName=null};hg.forText=function(g,P){var V=new hg;return V.scale=g||1,V.fontStack=P,V},hg.forImage=function(g){var P=new hg;return P.imageName=g,P};var Xh=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};Xh.fromFeature=function(g,P){for(var V=new Xh,J=0;J<g.sections.length;J++){var ae=g.sections[J];ae.image?V.addImageSection(ae):V.addTextSection(ae,P)}return V},Xh.prototype.length=function(){return this.text.length},Xh.prototype.getSection=function(g){return this.sections[this.sectionIndex[g]]},Xh.prototype.getSectionIndex=function(g){return this.sectionIndex[g]},Xh.prototype.getCharCode=function(g){return this.text.charCodeAt(g)},Xh.prototype.verticalizePunctuation=function(){this.text=jn(this.text)},Xh.prototype.trim=function(){for(var g=0,P=0;P<this.text.length&&m0[this.text.charCodeAt(P)];P++)g++;for(var V=this.text.length,J=this.text.length-1;J>=0&&J>=g&&m0[this.text.charCodeAt(J)];J--)V--;this.text=this.text.substring(g,V),this.sectionIndex=this.sectionIndex.slice(g,V)},Xh.prototype.substring=function(g,P){var V=new Xh;return V.text=this.text.substring(g,P),V.sectionIndex=this.sectionIndex.slice(g,P),V.sections=this.sections,V},Xh.prototype.toString=function(){return this.text},Xh.prototype.getMaxScale=function(){var g=this;return this.sectionIndex.reduce(function(P,V){return Math.max(P,g.sections[V].scale)},0)},Xh.prototype.addTextSection=function(g,P){this.text+=g.text,this.sections.push(hg.forText(g.scale,g.fontStack||P));for(var V=this.sections.length-1,J=0;J<g.text.length;++J)this.sectionIndex.push(V)},Xh.prototype.addImageSection=function(g){var P=g.image?g.image.name:"";if(P.length===0){re("Can't add FormattedSection with an empty image.");return}var V=this.getNextImageSectionCharCode();if(!V){re("Reached maximum number of images "+(y0-Uw+2));return}this.text+=String.fromCharCode(V),this.sections.push(hg.forImage(P)),this.sectionIndex.push(this.sections.length-1)},Xh.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=y0?null:++this.imageSectionID:(this.imageSectionID=Uw,this.imageSectionID)};function lB(m,g){for(var P=[],V=m.text,J=0,ae=0,ve=g;ae<ve.length;ae+=1){var Ge=ve[ae];P.push(m.substring(J,Ge)),J=Ge}return J<V.length&&P.push(m.substring(J,V.length)),P}function Vw(m,g,P,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li){var _n=Xh.fromFeature(m,J);lr===cp.vertical&&_n.verticalizePunctuation();var rn,Fa=qu.processBidirectionalText,On=qu.processStyledBidirectionalText;if(Fa&&_n.sections.length===1){rn=[];for(var Ra=Fa(_n.toString(),Hw(_n,kt,ae,g,V,xr,ei)),so=0,As=Ra;so<As.length;so+=1){var dl=As[so],fl=new Xh;fl.text=dl,fl.sections=_n.sections;for(var eu=0;eu<dl.length;eu++)fl.sectionIndex.push(0);rn.push(fl)}}else if(On){rn=[];for(var Ol=On(_n.text,_n.sectionIndex,Hw(_n,kt,ae,g,V,xr,ei)),Xl=0,Cu=Ol;Xl<Cu.length;Xl+=1){var tu=Cu[Xl],ou=new Xh;ou.text=tu[0],ou.sectionIndex=tu[1],ou.sections=_n.sections,rn.push(ou)}}else rn=lB(_n,Hw(_n,kt,ae,g,V,xr,ei));var Qu=[],Eu={positionedLines:Qu,text:_n.toString(),top:Ut[1],bottom:Ut[1],left:Ut[0],right:Ut[0],writingMode:lr,iconsInText:!1,verticalizable:!1};return cB(Eu,g,P,V,rn,ve,Ge,yt,lr,kt,kr,Li),bM(Qu)?!1:Eu}var m0={};m0[9]=!0,m0[10]=!0,m0[11]=!0,m0[12]=!0,m0[13]=!0,m0[32]=!0;var hp={};hp[10]=!0,hp[32]=!0,hp[38]=!0,hp[40]=!0,hp[41]=!0,hp[43]=!0,hp[45]=!0,hp[47]=!0,hp[173]=!0,hp[183]=!0,hp[8203]=!0,hp[8208]=!0,hp[8211]=!0,hp[8231]=!0;function OC(m,g,P,V,J,ae){if(g.imageName){var yt=V[g.imageName];return yt?yt.displaySize[0]*g.scale*Va/ae+J:0}else{var ve=P[g.fontStack],Ge=ve&&ve[m];return Ge?Ge.metrics.advance*g.scale+J:0}}function uB(m,g,P,V,J,ae){for(var ve=0,Ge=0;Ge<m.length();Ge++){var yt=m.getSection(Ge);ve+=OC(m.getCharCode(Ge),yt,V,J,g,ae)}var kt=Math.max(1,Math.ceil(ve/P));return ve/kt}function NC(m,g,P,V){var J=Math.pow(m-g,2);return V?m<g?J/2:J*2:J+Math.abs(P)*P}function fB(m,g,P){var V=0;return m===10&&(V-=1e4),P&&(V+=150),(m===40||m===65288)&&(V+=50),(g===41||g===65289)&&(V+=50),V}function mv(m,g,P,V,J,ae){for(var ve=null,Ge=NC(g,P,J,ae),yt=0,kt=V;yt<kt.length;yt+=1){var Ut=kt[yt],lr=g-Ut.x,kr=NC(lr,P,J,ae)+Ut.badness;kr<=Ge&&(ve=Ut,Ge=kr)}return{index:m,x:g,priorBreak:ve,badness:Ge}}function tb(m){return m?tb(m.priorBreak).concat(m.index):[]}function Hw(m,g,P,V,J,ae,ve){if(ae!=="point")return[];if(!m)return[];for(var Ge=[],yt=uB(m,g,P,V,J,ve),kt=m.text.indexOf("\u200B")>=0,Ut=0,lr=0;lr<m.length();lr++){var kr=m.getSection(lr),xr=m.getCharCode(lr);if(m0[xr]||(Ut+=OC(xr,kr,V,J,g,ve)),lr<m.length()-1){var ei=ni(xr);(hp[xr]||ei||kr.imageName)&&Ge.push(mv(lr+1,Ut,yt,Ge,fB(xr,m.getCharCode(lr+1),ei&&kt),!1))}}return tb(mv(m.length(),Ut,yt,Ge,0,!0))}function wM(m){var g=.5,P=.5;switch(m){case"right":case"top-right":case"bottom-right":g=1;break;case"left":case"top-left":case"bottom-left":g=0;break}switch(m){case"bottom":case"bottom-right":case"bottom-left":P=1;break;case"top":case"top-right":case"top-left":P=0;break}return{horizontalAlign:g,verticalAlign:P}}function cB(m,g,P,V,J,ae,ve,Ge,yt,kt,Ut,lr){for(var kr=0,xr=I1,ei=0,Li=0,_n=Ge==="right"?1:Ge==="left"?0:.5,rn=0,Fa=0,On=J;Fa<On.length;Fa+=1){var Ra=On[Fa];Ra.trim();var so=Ra.getMaxScale(),As=(so-1)*Va,dl={positionedGlyphs:[],lineOffset:0};m.positionedLines[rn]=dl;var fl=dl.positionedGlyphs,eu=0;if(!Ra.length()){xr+=ae,++rn;continue}for(var Ol=0;Ol<Ra.length();Ol++){var Xl=Ra.getSection(Ol),Cu=Ra.getSectionIndex(Ol),tu=Ra.getCharCode(Ol),ou=0,Qu=null,Eu=null,Tf=null,$f=Va,Af=!(yt===cp.horizontal||!Ut&&!Wr(tu)||Ut&&(m0[tu]||ai(tu)));if(Xl.imageName){var Jc=V[Xl.imageName];if(!Jc)continue;Tf=Xl.imageName,m.iconsInText=m.iconsInText||!0,Eu=Jc.paddedRect;var ih=Jc.displaySize;Xl.scale=Xl.scale*Va/lr,Qu={width:ih[0],height:ih[1],left:Pc,top:-Gv,advance:Af?ih[1]:ih[0]};var Kh=Va-ih[1]*Xl.scale;ou=As+Kh,$f=Qu.advance;var _h=Af?ih[0]*Xl.scale-Va*so:ih[1]*Xl.scale-Va*so;_h>0&&_h>eu&&(eu=_h)}else{var Sf=P[Xl.fontStack],bf=Sf&&Sf[tu];if(bf&&bf.rect)Eu=bf.rect,Qu=bf.metrics;else{var lc=g[Xl.fontStack],gc=lc&&lc[tu];if(!gc)continue;Qu=gc.metrics}ou=(so-Xl.scale)*Va}Af?(m.verticalizable=!0,fl.push({glyph:tu,imageName:Tf,x:kr,y:xr+ou,vertical:Af,scale:Xl.scale,fontStack:Xl.fontStack,sectionIndex:Cu,metrics:Qu,rect:Eu}),kr+=$f*Xl.scale+kt):(fl.push({glyph:tu,imageName:Tf,x:kr,y:xr+ou,vertical:Af,scale:Xl.scale,fontStack:Xl.fontStack,sectionIndex:Cu,metrics:Qu,rect:Eu}),kr+=Qu.advance*Xl.scale+kt)}if(fl.length!==0){var Yd=kr-kt;ei=Math.max(Yd,ei),hB(fl,0,fl.length-1,_n,eu)}kr=0;var Kd=ae*so+eu;dl.lineOffset=Math.max(eu,As),xr+=Kd,Li=Math.max(Kd,Li),++rn}var Jh=xr-I1,dp=wM(ve),pp=dp.horizontalAlign,Ph=dp.verticalAlign;Ld(m.positionedLines,_n,pp,Ph,ei,Li,ae,Jh,J.length),m.top+=-Ph*Jh,m.bottom=m.top+Jh,m.left+=-pp*ei,m.right=m.left+ei}function hB(m,g,P,V,J){if(!(!V&&!J))for(var ae=m[P],ve=ae.metrics.advance*ae.scale,Ge=(m[P].x+ve)*V,yt=g;yt<=P;yt++)m[yt].x-=Ge,m[yt].y+=J}function Ld(m,g,P,V,J,ae,ve,Ge,yt){var kt=(g-P)*J,Ut=0;ae!==ve?Ut=-Ge*V-I1:Ut=(-V*yt+.5)*ve;for(var lr=0,kr=m;lr<kr.length;lr+=1)for(var xr=kr[lr],ei=0,Li=xr.positionedGlyphs;ei<Li.length;ei+=1){var _n=Li[ei];_n.x+=kt,_n.y+=Ut}}function tv(m,g,P){var V=wM(P),J=V.horizontalAlign,ae=V.verticalAlign,ve=g[0],Ge=g[1],yt=ve-m.displaySize[0]*J,kt=yt+m.displaySize[0],Ut=Ge-m.displaySize[1]*ae,lr=Ut+m.displaySize[1];return{image:m,top:Ut,bottom:lr,left:yt,right:kt}}function hm(m,g,P,V,J,ae){var ve=m.image,Ge;if(ve.content){var yt=ve.content,kt=ve.pixelRatio||1;Ge=[yt[0]/kt,yt[1]/kt,ve.displaySize[0]-yt[2]/kt,ve.displaySize[1]-yt[3]/kt]}var Ut=g.left*ae,lr=g.right*ae,kr,xr,ei,Li;P==="width"||P==="both"?(Li=J[0]+Ut-V[3],xr=J[0]+lr+V[1]):(Li=J[0]+(Ut+lr-ve.displaySize[0])/2,xr=Li+ve.displaySize[0]);var _n=g.top*ae,rn=g.bottom*ae;return P==="height"||P==="both"?(kr=J[1]+_n-V[0],ei=J[1]+rn+V[2]):(kr=J[1]+(_n+rn-ve.displaySize[1])/2,ei=kr+ve.displaySize[1]),{image:ve,top:kr,right:xr,bottom:ei,left:Li,collisionPadding:Ge}}var Xd=function(m){function g(P,V,J,ae){m.call(this,P,V),this.angle=J,ae!==void 0&&(this.segment=ae)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.clone=function(){return new g(this.x,this.y,this.angle,this.segment)},g}(l);X("Anchor",Xd);var zd=128;function gv(m,g){var P=g.expression;if(P.kind==="constant"){var V=P.evaluate(new qo(m+1));return{kind:"constant",layoutSize:V}}else{if(P.kind==="source")return{kind:"source"};for(var J=P.zoomStops,ae=P.interpolationType,ve=0;ve<J.length&&J[ve]<=m;)ve++;ve=Math.max(0,ve-1);for(var Ge=ve;Ge<J.length&&J[Ge]<m+1;)Ge++;Ge=Math.min(J.length-1,Ge);var yt=J[ve],kt=J[Ge];if(P.kind==="composite")return{kind:"composite",minZoom:yt,maxZoom:kt,interpolationType:ae};var Ut=P.evaluate(new qo(yt)),lr=P.evaluate(new qo(kt));return{kind:"camera",minZoom:yt,maxZoom:kt,minSize:Ut,maxSize:lr,interpolationType:ae}}}function CQ(m,g,P){var V=g.uSize,J=g.uSizeT,ae=P.lowerSize,ve=P.upperSize;return m.kind==="source"?ae/zd:m.kind==="composite"?$a(ae/zd,ve/zd,J):V}function LQ(m,g){var P=0,V=0;if(m.kind==="constant")V=m.layoutSize;else if(m.kind!=="source"){var J=m.interpolationType,ae=m.minZoom,ve=m.maxZoom,Ge=J?y(ws.interpolationFactor(J,g,ae,ve),0,1):0;m.kind==="camera"?V=$a(m.minSize,m.maxSize,Ge):P=Ge}return{uSizeT:P,uSize:V}}var RQe=Object.freeze({__proto__:null,getSizeData:gv,evaluateSizeForFeature:CQ,evaluateSizeForZoom:LQ,SIZE_PACK_FACTOR:zd});function zQ(m,g,P,V,J){if(g.segment===void 0)return!0;for(var ae=g,ve=g.segment+1,Ge=0;Ge>-P/2;){if(ve--,ve<0)return!1;Ge-=m[ve].dist(ae),ae=m[ve]}Ge+=m[ve].dist(m[ve+1]),ve++;for(var yt=[],kt=0;Ge<P/2;){var Ut=m[ve-1],lr=m[ve],kr=m[ve+1];if(!kr)return!1;var xr=Ut.angleTo(lr)-lr.angleTo(kr);for(xr=Math.abs((xr+3*Math.PI)%(Math.PI*2)-Math.PI),yt.push({distance:Ge,angleDelta:xr}),kt+=xr;Ge-yt[0].distance>V;)kt-=yt.shift().angleDelta;if(kt>J)return!1;ve++,Ge+=lr.dist(kr)}return!0}function PQ(m){for(var g=0,P=0;P<m.length-1;P++)g+=m[P].dist(m[P+1]);return g}function IQ(m,g,P){return m?3/5*g*P:0}function DQ(m,g){return Math.max(m?m.right-m.left:0,g?g.right-g.left:0)}function FQe(m,g,P,V,J,ae){for(var ve=IQ(P,J,ae),Ge=DQ(P,V)*ae,yt=0,kt=PQ(m)/2,Ut=0;Ut<m.length-1;Ut++){var lr=m[Ut],kr=m[Ut+1],xr=lr.dist(kr);if(yt+xr>kt){var ei=(kt-yt)/xr,Li=$a(lr.x,kr.x,ei),_n=$a(lr.y,kr.y,ei),rn=new Xd(Li,_n,kr.angleTo(lr),Ut);return rn._round(),!ve||zQ(m,rn,Ge,ve,g)?rn:void 0}yt+=xr}}function qQe(m,g,P,V,J,ae,ve,Ge,yt){var kt=IQ(V,ae,ve),Ut=DQ(V,J),lr=Ut*ve,kr=m[0].x===0||m[0].x===yt||m[0].y===0||m[0].y===yt;g-lr<g/4&&(g=lr+g/4);var xr=ae*2,ei=kr?g/2*Ge%g:(Ut/2+xr)*ve*Ge%g;return RQ(m,ei,g,kt,P,lr,kr,!1,yt)}function RQ(m,g,P,V,J,ae,ve,Ge,yt){for(var kt=ae/2,Ut=PQ(m),lr=0,kr=g-P,xr=[],ei=0;ei<m.length-1;ei++){for(var Li=m[ei],_n=m[ei+1],rn=Li.dist(_n),Fa=_n.angleTo(Li);kr+P<lr+rn;){kr+=P;var On=(kr-lr)/rn,Ra=$a(Li.x,_n.x,On),so=$a(Li.y,_n.y,On);if(Ra>=0&&Ra<yt&&so>=0&&so<yt&&kr-kt>=0&&kr+kt<=Ut){var As=new Xd(Ra,so,Fa,ei);As._round(),(!V||zQ(m,As,ae,V,J))&&xr.push(As)}}lr+=rn}return!Ge&&!xr.length&&!ve&&(xr=RQ(m,lr/2,P,V,J,ae,ve,!0,yt)),xr}function FQ(m,g,P,V,J){for(var ae=[],ve=0;ve<m.length;ve++)for(var Ge=m[ve],yt=void 0,kt=0;kt<Ge.length-1;kt++){var Ut=Ge[kt],lr=Ge[kt+1];Ut.x<g&&lr.x<g||(Ut.x<g?Ut=new l(g,Ut.y+(lr.y-Ut.y)*((g-Ut.x)/(lr.x-Ut.x)))._round():lr.x<g&&(lr=new l(g,Ut.y+(lr.y-Ut.y)*((g-Ut.x)/(lr.x-Ut.x)))._round()),!(Ut.y<P&&lr.y<P)&&(Ut.y<P?Ut=new l(Ut.x+(lr.x-Ut.x)*((P-Ut.y)/(lr.y-Ut.y)),P)._round():lr.y<P&&(lr=new l(Ut.x+(lr.x-Ut.x)*((P-Ut.y)/(lr.y-Ut.y)),P)._round()),!(Ut.x>=V&&lr.x>=V)&&(Ut.x>=V?Ut=new l(V,Ut.y+(lr.y-Ut.y)*((V-Ut.x)/(lr.x-Ut.x)))._round():lr.x>=V&&(lr=new l(V,Ut.y+(lr.y-Ut.y)*((V-Ut.x)/(lr.x-Ut.x)))._round()),!(Ut.y>=J&&lr.y>=J)&&(Ut.y>=J?Ut=new l(Ut.x+(lr.x-Ut.x)*((J-Ut.y)/(lr.y-Ut.y)),J)._round():lr.y>=J&&(lr=new l(Ut.x+(lr.x-Ut.x)*((J-Ut.y)/(lr.y-Ut.y)),J)._round()),(!yt||!Ut.equals(yt[yt.length-1]))&&(yt=[Ut],ae.push(yt)),yt.push(lr)))))}return ae}var Gw=Pc;function qQ(m,g,P,V){var J=[],ae=m.image,ve=ae.pixelRatio,Ge=ae.paddedRect.w-2*Gw,yt=ae.paddedRect.h-2*Gw,kt=m.right-m.left,Ut=m.bottom-m.top,lr=ae.stretchX||[[0,Ge]],kr=ae.stretchY||[[0,yt]],xr=function(Sf,bf){return Sf+bf[1]-bf[0]},ei=lr.reduce(xr,0),Li=kr.reduce(xr,0),_n=Ge-ei,rn=yt-Li,Fa=0,On=ei,Ra=0,so=Li,As=0,dl=_n,fl=0,eu=rn;if(ae.content&&V){var Ol=ae.content;Fa=UC(lr,0,Ol[0]),Ra=UC(kr,0,Ol[1]),On=UC(lr,Ol[0],Ol[2]),so=UC(kr,Ol[1],Ol[3]),As=Ol[0]-Fa,fl=Ol[1]-Ra,dl=Ol[2]-Ol[0]-On,eu=Ol[3]-Ol[1]-so}var Xl=function(Sf,bf,lc,gc){var Jc=VC(Sf.stretch-Fa,On,kt,m.left),ih=HC(Sf.fixed-As,dl,Sf.stretch,ei),Kh=VC(bf.stretch-Ra,so,Ut,m.top),_h=HC(bf.fixed-fl,eu,bf.stretch,Li),Yd=VC(lc.stretch-Fa,On,kt,m.left),Kd=HC(lc.fixed-As,dl,lc.stretch,ei),Jh=VC(gc.stretch-Ra,so,Ut,m.top),dp=HC(gc.fixed-fl,eu,gc.stretch,Li),pp=new l(Jc,Kh),Ph=new l(Yd,Kh),vp=new l(Yd,Jh),_v=new l(Jc,Jh),vg=new l(ih/ve,_h/ve),F1=new l(Kd/ve,dp/ve),q1=g*Math.PI/180;if(q1){var B1=Math.sin(q1),$w=Math.cos(q1),g0=[$w,-B1,B1,$w];pp._matMult(g0),Ph._matMult(g0),_v._matMult(g0),vp._matMult(g0)}var YC=Sf.stretch+Sf.fixed,xB=lc.stretch+lc.fixed,KC=bf.stretch+bf.fixed,bB=gc.stretch+gc.fixed,Wv={x:ae.paddedRect.x+Gw+YC,y:ae.paddedRect.y+Gw+KC,w:xB-YC,h:bB-KC},Qw=dl/ve/kt,JC=eu/ve/Ut;return{tl:pp,tr:Ph,bl:_v,br:vp,tex:Wv,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:vg,pixelOffsetBR:F1,minFontScaleX:Qw,minFontScaleY:JC,isSDF:P}};if(!V||!ae.stretchX&&!ae.stretchY)J.push(Xl({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Ge+1},{fixed:0,stretch:yt+1}));else for(var Cu=BQ(lr,_n,ei),tu=BQ(kr,rn,Li),ou=0;ou<Cu.length-1;ou++)for(var Qu=Cu[ou],Eu=Cu[ou+1],Tf=0;Tf<tu.length-1;Tf++){var $f=tu[Tf],Af=tu[Tf+1];J.push(Xl(Qu,$f,Eu,Af))}return J}function UC(m,g,P){for(var V=0,J=0,ae=m;J<ae.length;J+=1){var ve=ae[J];V+=Math.max(g,Math.min(P,ve[1]))-Math.max(g,Math.min(P,ve[0]))}return V}function BQ(m,g,P){for(var V=[{fixed:-Gw,stretch:0}],J=0,ae=m;J<ae.length;J+=1){var ve=ae[J],Ge=ve[0],yt=ve[1],kt=V[V.length-1];V.push({fixed:Ge-kt.stretch,stretch:kt.stretch}),V.push({fixed:Ge-kt.stretch,stretch:kt.stretch+(yt-Ge)})}return V.push({fixed:g+Gw,stretch:P}),V}function VC(m,g,P,V){return m/g*P+V}function HC(m,g,P,V){return m-g*P/V}function BQe(m,g,P,V,J,ae,ve,Ge){for(var yt=V.layout.get("text-rotate").evaluate(ae,{})*Math.PI/180,kt=[],Ut=0,lr=g.positionedLines;Ut<lr.length;Ut+=1)for(var kr=lr[Ut],xr=0,ei=kr.positionedGlyphs;xr<ei.length;xr+=1){var Li=ei[xr];if(Li.rect){var _n=Li.rect||{},rn=1,Fa=Gv+rn,On=!0,Ra=1,so=0,As=(J||Ge)&&Li.vertical,dl=Li.metrics.advance*Li.scale/2;if(Ge&&g.verticalizable){var fl=(Li.scale-1)*Va,eu=(Va-Li.metrics.width*Li.scale)/2;so=kr.lineOffset/2-(Li.imageName?-eu:fl)}if(Li.imageName){var Ol=ve[Li.imageName];On=Ol.sdf,Ra=Ol.pixelRatio,Fa=Pc/Ra}var Xl=J?[Li.x+dl,Li.y]:[0,0],Cu=J?[0,0]:[Li.x+dl+P[0],Li.y+P[1]-so],tu=[0,0];As&&(tu=Cu,Cu=[0,0]);var ou=(Li.metrics.left-Fa)*Li.scale-dl+Cu[0],Qu=(-Li.metrics.top-Fa)*Li.scale+Cu[1],Eu=ou+_n.w*Li.scale/Ra,Tf=Qu+_n.h*Li.scale/Ra,$f=new l(ou,Qu),Af=new l(Eu,Qu),Sf=new l(ou,Tf),bf=new l(Eu,Tf);if(As){var lc=new l(-dl,dl-I1),gc=-Math.PI/2,Jc=Va/2-dl,ih=Li.imageName?Jc:0,Kh=new l(5-I1-Jc,-ih),_h=new(Function.prototype.bind.apply(l,[null].concat(tu)));$f._rotateAround(gc,lc)._add(Kh)._add(_h),Af._rotateAround(gc,lc)._add(Kh)._add(_h),Sf._rotateAround(gc,lc)._add(Kh)._add(_h),bf._rotateAround(gc,lc)._add(Kh)._add(_h)}if(yt){var Yd=Math.sin(yt),Kd=Math.cos(yt),Jh=[Kd,-Yd,Yd,Kd];$f._matMult(Jh),Af._matMult(Jh),Sf._matMult(Jh),bf._matMult(Jh)}var dp=new l(0,0),pp=new l(0,0),Ph=0,vp=0;kt.push({tl:$f,tr:Af,bl:Sf,br:bf,tex:_n,writingMode:g.writingMode,glyphOffset:Xl,sectionIndex:Li.sectionIndex,isSDF:On,pixelOffsetTL:dp,pixelOffsetBR:pp,minFontScaleX:Ph,minFontScaleY:vp})}}return kt}var GC=function(g,P,V,J,ae,ve,Ge,yt,kt,Ut){if(this.boxStartIndex=g.length,kt){var lr=ve.top,kr=ve.bottom,xr=ve.collisionPadding;xr&&(lr-=xr[1],kr+=xr[3]);var ei=kr-lr;ei>0&&(ei=Math.max(10,ei),this.circleDiameter=ei)}else{var Li=ve.top*Ge-yt,_n=ve.bottom*Ge+yt,rn=ve.left*Ge-yt,Fa=ve.right*Ge+yt,On=ve.collisionPadding;if(On&&(rn-=On[0]*Ge,Li-=On[1]*Ge,Fa+=On[2]*Ge,_n+=On[3]*Ge),Ut){var Ra=new l(rn,Li),so=new l(Fa,Li),As=new l(rn,_n),dl=new l(Fa,_n),fl=Ut*Math.PI/180;Ra._rotate(fl),so._rotate(fl),As._rotate(fl),dl._rotate(fl),rn=Math.min(Ra.x,so.x,As.x,dl.x),Fa=Math.max(Ra.x,so.x,As.x,dl.x),Li=Math.min(Ra.y,so.y,As.y,dl.y),_n=Math.max(Ra.y,so.y,As.y,dl.y)}g.emplaceBack(P.x,P.y,rn,Li,Fa,_n,V,J,ae)}this.boxEndIndex=g.length},Ww=function(g,P){if(g===void 0&&(g=[]),P===void 0&&(P=OQe),this.data=g,this.length=this.data.length,this.compare=P,this.length>0)for(var V=(this.length>>1)-1;V>=0;V--)this._down(V)};Ww.prototype.push=function(g){this.data.push(g),this.length++,this._up(this.length-1)},Ww.prototype.pop=function(){if(this.length!==0){var g=this.data[0],P=this.data.pop();return this.length--,this.length>0&&(this.data[0]=P,this._down(0)),g}},Ww.prototype.peek=function(){return this.data[0]},Ww.prototype._up=function(g){for(var P=this,V=P.data,J=P.compare,ae=V[g];g>0;){var ve=g-1>>1,Ge=V[ve];if(J(ae,Ge)>=0)break;V[g]=Ge,g=ve}V[g]=ae},Ww.prototype._down=function(g){for(var P=this,V=P.data,J=P.compare,ae=this.length>>1,ve=V[g];g<ae;){var Ge=(g<<1)+1,yt=V[Ge],kt=Ge+1;if(kt<this.length&&J(V[kt],yt)<0&&(Ge=kt,yt=V[kt]),J(yt,ve)>=0)break;V[g]=yt,g=Ge}V[g]=ve};function OQe(m,g){return m<g?-1:m>g?1:0}function NQe(m,g,P){g===void 0&&(g=1),P===void 0&&(P=!1);for(var V=1/0,J=1/0,ae=-1/0,ve=-1/0,Ge=m[0],yt=0;yt<Ge.length;yt++){var kt=Ge[yt];(!yt||kt.x<V)&&(V=kt.x),(!yt||kt.y<J)&&(J=kt.y),(!yt||kt.x>ae)&&(ae=kt.x),(!yt||kt.y>ve)&&(ve=kt.y)}var Ut=ae-V,lr=ve-J,kr=Math.min(Ut,lr),xr=kr/2,ei=new Ww([],UQe);if(kr===0)return new l(V,J);for(var Li=V;Li<ae;Li+=kr)for(var _n=J;_n<ve;_n+=kr)ei.push(new jw(Li+xr,_n+xr,xr,m));for(var rn=HQe(m),Fa=ei.length;ei.length;){var On=ei.pop();(On.d>rn.d||!rn.d)&&(rn=On,P&&console.log("found best %d after %d probes",Math.round(1e4*On.d)/1e4,Fa)),!(On.max-rn.d<=g)&&(xr=On.h/2,ei.push(new jw(On.p.x-xr,On.p.y-xr,xr,m)),ei.push(new jw(On.p.x+xr,On.p.y-xr,xr,m)),ei.push(new jw(On.p.x-xr,On.p.y+xr,xr,m)),ei.push(new jw(On.p.x+xr,On.p.y+xr,xr,m)),Fa+=4)}return P&&(console.log("num probes: "+Fa),console.log("best distance: "+rn.d)),rn.p}function UQe(m,g){return g.max-m.max}function jw(m,g,P,V){this.p=new l(m,g),this.h=P,this.d=VQe(this.p,V),this.max=this.d+this.h*Math.SQRT2}function VQe(m,g){for(var P=!1,V=1/0,J=0;J<g.length;J++)for(var ae=g[J],ve=0,Ge=ae.length,yt=Ge-1;ve<Ge;yt=ve++){var kt=ae[ve],Ut=ae[yt];kt.y>m.y!=Ut.y>m.y&&m.x<(Ut.x-kt.x)*(m.y-kt.y)/(Ut.y-kt.y)+kt.x&&(P=!P),V=Math.min(V,fy(m,kt,Ut))}return(P?1:-1)*Math.sqrt(V)}function HQe(m){for(var g=0,P=0,V=0,J=m[0],ae=0,ve=J.length,Ge=ve-1;ae<ve;Ge=ae++){var yt=J[ae],kt=J[Ge],Ut=yt.x*kt.y-kt.x*yt.y;P+=(yt.x+kt.x)*Ut,V+=(yt.y+kt.y)*Ut,g+=Ut*3}return new jw(P/g,V/g,0,m)}var Zw=7,dB=Number.POSITIVE_INFINITY;function OQ(m,g){function P(J,ae){var ve=0,Ge=0;ae<0&&(ae=0);var yt=ae/Math.sqrt(2);switch(J){case"top-right":case"top-left":Ge=yt-Zw;break;case"bottom-right":case"bottom-left":Ge=-yt+Zw;break;case"bottom":Ge=-ae+Zw;break;case"top":Ge=ae-Zw;break}switch(J){case"top-right":case"bottom-right":ve=-yt;break;case"top-left":case"bottom-left":ve=yt;break;case"left":ve=ae;break;case"right":ve=-ae;break}return[ve,Ge]}function V(J,ae,ve){var Ge=0,yt=0;switch(ae=Math.abs(ae),ve=Math.abs(ve),J){case"top-right":case"top-left":case"top":yt=ve-Zw;break;case"bottom-right":case"bottom-left":case"bottom":yt=-ve+Zw;break}switch(J){case"top-right":case"bottom-right":case"right":Ge=-ae;break;case"top-left":case"bottom-left":case"left":Ge=ae;break}return[Ge,yt]}return g[1]!==dB?V(m,g[0],g[1]):P(m,g[0])}function GQe(m,g,P,V,J,ae,ve){m.createArrays();var Ge=512*m.overscaling;m.tilePixelRatio=eo/Ge,m.compareText={},m.iconsNeedLinear=!1;var yt=m.layers[0].layout,kt=m.layers[0]._unevaluatedLayout._values,Ut={};if(m.textSizeData.kind==="composite"){var lr=m.textSizeData,kr=lr.minZoom,xr=lr.maxZoom;Ut.compositeTextSizes=[kt["text-size"].possiblyEvaluate(new qo(kr),ve),kt["text-size"].possiblyEvaluate(new qo(xr),ve)]}if(m.iconSizeData.kind==="composite"){var ei=m.iconSizeData,Li=ei.minZoom,_n=ei.maxZoom;Ut.compositeIconSizes=[kt["icon-size"].possiblyEvaluate(new qo(Li),ve),kt["icon-size"].possiblyEvaluate(new qo(_n),ve)]}Ut.layoutTextSize=kt["text-size"].possiblyEvaluate(new qo(m.zoom+1),ve),Ut.layoutIconSize=kt["icon-size"].possiblyEvaluate(new qo(m.zoom+1),ve),Ut.textMaxSize=kt["text-size"].possiblyEvaluate(new qo(18));for(var rn=yt.get("text-line-height")*Va,Fa=yt.get("text-rotation-alignment")==="map"&&yt.get("symbol-placement")!=="point",On=yt.get("text-keep-upright"),Ra=yt.get("text-size"),so=function(){var fl=dl[As],eu=yt.get("text-font").evaluate(fl,{},ve).join(","),Ol=Ra.evaluate(fl,{},ve),Xl=Ut.layoutTextSize.evaluate(fl,{},ve),Cu=Ut.layoutIconSize.evaluate(fl,{},ve),tu={horizontal:{},vertical:void 0},ou=fl.text,Qu=[0,0];if(ou){var Eu=ou.toString(),Tf=yt.get("text-letter-spacing").evaluate(fl,{},ve)*Va,$f=_r(Eu)?Tf:0,Af=yt.get("text-anchor").evaluate(fl,{},ve),Sf=yt.get("text-variable-anchor");if(!Sf){var bf=yt.get("text-radial-offset").evaluate(fl,{},ve);bf?Qu=OQ(Af,[bf*Va,dB]):Qu=yt.get("text-offset").evaluate(fl,{},ve).map(function(vg){return vg*Va})}var lc=Fa?"center":yt.get("text-justify").evaluate(fl,{},ve),gc=yt.get("symbol-placement"),Jc=gc==="point"?yt.get("text-max-width").evaluate(fl,{},ve)*Va:0,ih=function(){m.allowVerticalPlacement&&er(Eu)&&(tu.vertical=Vw(ou,g,P,J,eu,Jc,rn,Af,"left",$f,Qu,cp.vertical,!0,gc,Xl,Ol))};if(!Fa&&Sf){for(var Kh=lc==="auto"?Sf.map(function(vg){return pB(vg)}):[lc],_h=!1,Yd=0;Yd<Kh.length;Yd++){var Kd=Kh[Yd];if(!tu.horizontal[Kd])if(_h)tu.horizontal[Kd]=tu.horizontal[0];else{var Jh=Vw(ou,g,P,J,eu,Jc,rn,"center",Kd,$f,Qu,cp.horizontal,!1,gc,Xl,Ol);Jh&&(tu.horizontal[Kd]=Jh,_h=Jh.positionedLines.length===1)}}ih()}else{lc==="auto"&&(lc=pB(Af));var dp=Vw(ou,g,P,J,eu,Jc,rn,Af,lc,$f,Qu,cp.horizontal,!1,gc,Xl,Ol);dp&&(tu.horizontal[lc]=dp),ih(),er(Eu)&&Fa&&On&&(tu.vertical=Vw(ou,g,P,J,eu,Jc,rn,Af,lc,$f,Qu,cp.vertical,!1,gc,Xl,Ol))}}var pp=void 0,Ph=!1;if(fl.icon&&fl.icon.name){var vp=V[fl.icon.name];vp&&(pp=tv(J[fl.icon.name],yt.get("icon-offset").evaluate(fl,{},ve),yt.get("icon-anchor").evaluate(fl,{},ve)),Ph=vp.sdf,m.sdfIcons===void 0?m.sdfIcons=vp.sdf:m.sdfIcons!==vp.sdf&&re("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(vp.pixelRatio!==m.pixelRatio||yt.get("icon-rotate").constantOr(1)!==0)&&(m.iconsNeedLinear=!0))}var _v=UQ(tu.horizontal)||tu.vertical;m.iconsInText=_v?_v.iconsInText:!1,(_v||pp)&&WQe(m,fl,tu,pp,V,Ut,Xl,Cu,Qu,Ph,ve)},As=0,dl=m.features;As<dl.length;As+=1)so();ae&&m.generateCollisionDebugBuffers()}function pB(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 WQe(m,g,P,V,J,ae,ve,Ge,yt,kt,Ut){var lr=ae.textMaxSize.evaluate(g,{});lr===void 0&&(lr=ve);var kr=m.layers[0].layout,xr=kr.get("icon-offset").evaluate(g,{},Ut),ei=UQ(P.horizontal),Li=24,_n=ve/Li,rn=m.tilePixelRatio*_n,Fa=m.tilePixelRatio*lr/Li,On=m.tilePixelRatio*Ge,Ra=m.tilePixelRatio*kr.get("symbol-spacing"),so=kr.get("text-padding")*m.tilePixelRatio,As=kr.get("icon-padding")*m.tilePixelRatio,dl=kr.get("text-max-angle")/180*Math.PI,fl=kr.get("text-rotation-alignment")==="map"&&kr.get("symbol-placement")!=="point",eu=kr.get("icon-rotation-alignment")==="map"&&kr.get("symbol-placement")!=="point",Ol=kr.get("symbol-placement"),Xl=Ra/2,Cu=kr.get("icon-text-fit"),tu;V&&Cu!=="none"&&(m.allowVerticalPlacement&&P.vertical&&(tu=hm(V,P.vertical,Cu,kr.get("icon-text-fit-padding"),xr,_n)),ei&&(V=hm(V,ei,Cu,kr.get("icon-text-fit-padding"),xr,_n)));var ou=function($w,g0){g0.x<0||g0.x>=eo||g0.y<0||g0.y>=eo||jQe(m,g0,$w,P,V,J,tu,m.layers[0],m.collisionBoxArray,g.index,g.sourceLayerIndex,m.index,rn,so,fl,yt,On,As,eu,xr,g,ae,kt,Ut,ve)};if(Ol==="line")for(var Qu=0,Eu=FQ(g.geometry,0,0,eo,eo);Qu<Eu.length;Qu+=1)for(var Tf=Eu[Qu],$f=qQe(Tf,Ra,dl,P.vertical||ei,V,Li,Fa,m.overscaling,eo),Af=0,Sf=$f;Af<Sf.length;Af+=1){var bf=Sf[Af],lc=ei;(!lc||!ZQe(m,lc.text,Xl,bf))&&ou(Tf,bf)}else if(Ol==="line-center")for(var gc=0,Jc=g.geometry;gc<Jc.length;gc+=1){var ih=Jc[gc];if(ih.length>1){var Kh=FQe(ih,dl,P.vertical||ei,V,Li,Fa);Kh&&ou(ih,Kh)}}else if(g.type==="Polygon")for(var _h=0,Yd=Rw(g.geometry,0);_h<Yd.length;_h+=1){var Kd=Yd[_h],Jh=NQe(Kd,16);ou(Kd[0],new Xd(Jh.x,Jh.y,0))}else if(g.type==="LineString")for(var dp=0,pp=g.geometry;dp<pp.length;dp+=1){var Ph=pp[dp];ou(Ph,new Xd(Ph[0].x,Ph[0].y,0))}else if(g.type==="Point")for(var vp=0,_v=g.geometry;vp<_v.length;vp+=1)for(var vg=_v[vp],F1=0,q1=vg;F1<q1.length;F1+=1){var B1=q1[F1];ou([B1],new Xd(B1.x,B1.y,0))}}var TM=255,D1=TM*zd;function NQ(m,g,P,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei){var Li=BQe(g,P,Ge,J,ae,ve,V,m.allowVerticalPlacement),_n=m.textSizeData,rn=null;_n.kind==="source"?(rn=[zd*J.layout.get("text-size").evaluate(ve,{})],rn[0]>D1&&re(m.layerIds[0]+': Value for "text-size" is >= '+TM+'. Reduce your "text-size".')):_n.kind==="composite"&&(rn=[zd*xr.compositeTextSizes[0].evaluate(ve,{},ei),zd*xr.compositeTextSizes[1].evaluate(ve,{},ei)],(rn[0]>D1||rn[1]>D1)&&re(m.layerIds[0]+': Value for "text-size" is >= '+TM+'. Reduce your "text-size".')),m.addSymbols(m.text,Li,rn,Ge,ae,ve,kt,g,yt.lineStartIndex,yt.lineLength,kr,ei);for(var Fa=0,On=Ut;Fa<On.length;Fa+=1){var Ra=On[Fa];lr[Ra]=m.text.placedSymbolArray.length-1}return Li.length*4}function UQ(m){for(var g in m)return m[g];return null}function jQe(m,g,P,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra,so,As,dl,fl){var eu,Ol=m.addToLineVertexArray(g,P),Xl,Cu,tu,ou,Qu=0,Eu=0,Tf=0,$f=0,Af=-1,Sf=-1,bf={},lc=$(""),gc=0,Jc=0;if(Ge._unevaluatedLayout.getValue("text-radial-offset")===void 0?(eu=Ge.layout.get("text-offset").evaluate(Ra,{},dl).map(function(MM){return MM*Va}),gc=eu[0],Jc=eu[1]):(gc=Ge.layout.get("text-radial-offset").evaluate(Ra,{},dl)*Va,Jc=dB),m.allowVerticalPlacement&&V.vertical){var ih=Ge.layout.get("text-rotate").evaluate(Ra,{},dl),Kh=ih+90,_h=V.vertical;tu=new GC(yt,g,kt,Ut,lr,_h,kr,xr,ei,Kh),ve&&(ou=new GC(yt,g,kt,Ut,lr,ve,_n,rn,ei,Kh))}if(J){var Yd=Ge.layout.get("icon-rotate").evaluate(Ra,{}),Kd=Ge.layout.get("icon-text-fit")!=="none",Jh=qQ(J,Yd,As,Kd),dp=ve?qQ(ve,Yd,As,Kd):void 0;Cu=new GC(yt,g,kt,Ut,lr,J,_n,rn,!1,Yd),Qu=Jh.length*4;var pp=m.iconSizeData,Ph=null;pp.kind==="source"?(Ph=[zd*Ge.layout.get("icon-size").evaluate(Ra,{})],Ph[0]>D1&&re(m.layerIds[0]+': Value for "icon-size" is >= '+TM+'. Reduce your "icon-size".')):pp.kind==="composite"&&(Ph=[zd*so.compositeIconSizes[0].evaluate(Ra,{},dl),zd*so.compositeIconSizes[1].evaluate(Ra,{},dl)],(Ph[0]>D1||Ph[1]>D1)&&re(m.layerIds[0]+': Value for "icon-size" is >= '+TM+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Jh,Ph,On,Fa,Ra,!1,g,Ol.lineStartIndex,Ol.lineLength,-1,dl),Af=m.icon.placedSymbolArray.length-1,dp&&(Eu=dp.length*4,m.addSymbols(m.icon,dp,Ph,On,Fa,Ra,cp.vertical,g,Ol.lineStartIndex,Ol.lineLength,-1,dl),Sf=m.icon.placedSymbolArray.length-1)}for(var vp in V.horizontal){var _v=V.horizontal[vp];if(!Xl){lc=$(_v.text);var vg=Ge.layout.get("text-rotate").evaluate(Ra,{},dl);Xl=new GC(yt,g,kt,Ut,lr,_v,kr,xr,ei,vg)}var F1=_v.positionedLines.length===1;if(Tf+=NQ(m,g,_v,ae,Ge,ei,Ra,Li,Ol,V.vertical?cp.horizontal:cp.horizontalOnly,F1?Object.keys(V.horizontal):[vp],bf,Af,so,dl),F1)break}V.vertical&&($f+=NQ(m,g,V.vertical,ae,Ge,ei,Ra,Li,Ol,cp.vertical,["vertical"],bf,Sf,so,dl));var q1=Xl?Xl.boxStartIndex:m.collisionBoxArray.length,B1=Xl?Xl.boxEndIndex:m.collisionBoxArray.length,$w=tu?tu.boxStartIndex:m.collisionBoxArray.length,g0=tu?tu.boxEndIndex:m.collisionBoxArray.length,YC=Cu?Cu.boxStartIndex:m.collisionBoxArray.length,xB=Cu?Cu.boxEndIndex:m.collisionBoxArray.length,KC=ou?ou.boxStartIndex:m.collisionBoxArray.length,bB=ou?ou.boxEndIndex:m.collisionBoxArray.length,Wv=-1,Qw=function(MM,iee){return MM&&MM.circleDiameter?Math.max(MM.circleDiameter,iee):iee};Wv=Qw(Xl,Wv),Wv=Qw(tu,Wv),Wv=Qw(Cu,Wv),Wv=Qw(ou,Wv);var JC=Wv>-1?1:0;JC&&(Wv*=fl/Va),m.glyphOffsetArray.length>=Jf.MAX_GLYPHS&&re("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ra.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,Ra.sortKey),m.symbolInstances.emplaceBack(g.x,g.y,bf.right>=0?bf.right:-1,bf.center>=0?bf.center:-1,bf.left>=0?bf.left:-1,bf.vertical||-1,Af,Sf,lc,q1,B1,$w,g0,YC,xB,KC,bB,kt,Tf,$f,Qu,Eu,JC,0,kr,gc,Jc,Wv)}function ZQe(m,g,P,V){var J=m.compareText;if(!(g in J))J[g]=[];else for(var ae=J[g],ve=ae.length-1;ve>=0;ve--)if(V.dist(ae[ve])<P)return!0;return J[g].push(V),!1}var XQe=vy.VectorTileFeature.types,YQe=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function WC(m,g,P,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr){var xr=Ge?Math.min(D1,Math.round(Ge[0])):0,ei=Ge?Math.min(D1,Math.round(Ge[1])):0;m.emplaceBack(g,P,Math.round(V*32),Math.round(J*32),ae,ve,(xr<<1)+(yt?1:0),ei,kt*16,Ut*16,lr*256,kr*256)}function vB(m,g,P){m.emplaceBack(g.x,g.y,P),m.emplaceBack(g.x,g.y,P),m.emplaceBack(g.x,g.y,P),m.emplaceBack(g.x,g.y,P)}function KQe(m){for(var g=0,P=m.sections;g<P.length;g+=1){var V=P[g];if(en(V.text))return!0}return!1}var Xw=function(g){this.layoutVertexArray=new ru,this.indexArray=new zl,this.programConfigurations=g,this.segments=new Ou,this.dynamicLayoutVertexArray=new hs,this.opacityVertexArray=new Ho,this.placedSymbolArray=new wf};Xw.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},Xw.prototype.upload=function(g,P,V,J){this.isEmpty()||(V&&(this.layoutVertexBuffer=g.createVertexBuffer(this.layoutVertexArray,ie.members),this.indexBuffer=g.createIndexBuffer(this.indexArray,P),this.dynamicLayoutVertexBuffer=g.createVertexBuffer(this.dynamicLayoutVertexArray,pe.members,!0),this.opacityVertexBuffer=g.createVertexBuffer(this.opacityVertexArray,YQe,!0),this.opacityVertexBuffer.itemSize=1),(V||J)&&this.programConfigurations.upload(g))},Xw.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",Xw);var AM=function(g,P,V){this.layoutVertexArray=new g,this.layoutAttributes=P,this.indexArray=new V,this.segments=new Ou,this.collisionVertexArray=new js};AM.prototype.upload=function(g){this.layoutVertexBuffer=g.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=g.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=g.createVertexBuffer(this.collisionVertexArray,He.members,!0)},AM.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},X("CollisionBuffers",AM);var Jf=function(g){this.collisionBoxArray=g.collisionBoxArray,this.zoom=g.zoom,this.overscaling=g.overscaling,this.layers=g.layers,this.layerIds=this.layers.map(function(yt){return yt.id}),this.index=g.index,this.pixelRatio=g.pixelRatio,this.sourceLayerIndex=g.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=og([]),this.placementViewportMatrix=og([]);var P=this.layers[0],V=P._unevaluatedLayout._values;this.textSizeData=gv(this.zoom,V["text-size"]),this.iconSizeData=gv(this.zoom,V["icon-size"]);var J=this.layers[0].layout,ae=J.get("symbol-sort-key"),ve=J.get("symbol-z-order");this.canOverlap=J.get("text-allow-overlap")||J.get("icon-allow-overlap")||J.get("text-ignore-placement")||J.get("icon-ignore-placement"),this.sortFeaturesByKey=ve!=="viewport-y"&&ae.constantOr(1)!==void 0;var Ge=ve==="viewport-y"||ve==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=Ge&&this.canOverlap,J.get("symbol-placement")==="point"&&(this.writingModes=J.get("text-writing-mode").map(function(yt){return cp[yt]})),this.stateDependentLayerIds=this.layers.filter(function(yt){return yt.isStateDependent()}).map(function(yt){return yt.id}),this.sourceID=g.sourceID};Jf.prototype.createArrays=function(){this.text=new Xw(new ra(this.layers,this.zoom,function(g){return/^text/.test(g)})),this.icon=new Xw(new ra(this.layers,this.zoom,function(g){return/^icon/.test(g)})),this.glyphOffsetArray=new qc,this.lineVertexArray=new If,this.symbolInstances=new vc},Jf.prototype.calculateGlyphDependencies=function(g,P,V,J,ae){for(var ve=0;ve<g.length;ve++)if(P[g.charCodeAt(ve)]=!0,(V||J)&&ae){var Ge=cn[g.charAt(ve)];Ge&&(P[Ge.charCodeAt(0)]=!0)}},Jf.prototype.populate=function(g,P,V){var J=this.layers[0],ae=J.layout,ve=ae.get("text-font"),Ge=ae.get("text-field"),yt=ae.get("icon-image"),kt=(Ge.value.kind!=="constant"||Ge.value.value instanceof on&&!Ge.value.value.isEmpty()||Ge.value.value.toString().length>0)&&(ve.value.kind!=="constant"||ve.value.value.length>0),Ut=yt.value.kind!=="constant"||!!yt.value.value||Object.keys(yt.parameters).length>0,lr=ae.get("symbol-sort-key");if(this.features=[],!(!kt&&!Ut)){for(var kr=P.iconDependencies,xr=P.glyphDependencies,ei=P.availableImages,Li=new qo(this.zoom),_n=0,rn=g;_n<rn.length;_n+=1){var Fa=rn[_n],On=Fa.feature,Ra=Fa.id,so=Fa.index,As=Fa.sourceLayerIndex,dl=J._featureFilter.needGeometry,fl=Mu(On,dl);if(J._featureFilter.filter(Li,fl,V)){dl||(fl.geometry=Ml(On));var eu=void 0;if(kt){var Ol=J.getValueAndResolveTokens("text-field",fl,V,ei),Xl=on.factory(Ol);KQe(Xl)&&(this.hasRTLText=!0),(!this.hasRTLText||au()==="unavailable"||this.hasRTLText&&qu.isParsed())&&(eu=Zi(Xl,J,fl))}var Cu=void 0;if(Ut){var tu=J.getValueAndResolveTokens("icon-image",fl,V,ei);tu instanceof mn?Cu=tu:Cu=mn.fromString(tu)}if(!(!eu&&!Cu)){var ou=this.sortFeaturesByKey?lr.evaluate(fl,{},V):void 0,Qu={id:Ra,text:eu,icon:Cu,index:so,sourceLayerIndex:As,geometry:fl.geometry,properties:On.properties,type:XQe[On.type],sortKey:ou};if(this.features.push(Qu),Cu&&(kr[Cu.name]=!0),eu){var Eu=ve.evaluate(fl,{},V).join(","),Tf=ae.get("text-rotation-alignment")==="map"&&ae.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(cp.vertical)>=0;for(var $f=0,Af=eu.sections;$f<Af.length;$f+=1){var Sf=Af[$f];if(Sf.image)kr[Sf.image.name]=!0;else{var bf=er(eu.toString()),lc=Sf.fontStack||Eu,gc=xr[lc]=xr[lc]||{};this.calculateGlyphDependencies(Sf.text,gc,Tf,this.allowVerticalPlacement,bf)}}}}}}ae.get("symbol-placement")==="line"&&(this.features=da(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Jc,ih){return Jc.sortKey-ih.sortKey})}},Jf.prototype.update=function(g,P,V){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(g,P,this.layers,V),this.icon.programConfigurations.updatePaintArrays(g,P,this.layers,V))},Jf.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},Jf.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Jf.prototype.upload=function(g){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(g),this.iconCollisionBox.upload(g)),this.text.upload(g,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(g,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Jf.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Jf.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Jf.prototype.addToLineVertexArray=function(g,P){var V=this.lineVertexArray.length;if(g.segment!==void 0){for(var J=g.dist(P[g.segment+1]),ae=g.dist(P[g.segment]),ve={},Ge=g.segment+1;Ge<P.length;Ge++)ve[Ge]={x:P[Ge].x,y:P[Ge].y,tileUnitDistanceFromAnchor:J},Ge<P.length-1&&(J+=P[Ge+1].dist(P[Ge]));for(var yt=g.segment||0;yt>=0;yt--)ve[yt]={x:P[yt].x,y:P[yt].y,tileUnitDistanceFromAnchor:ae},yt>0&&(ae+=P[yt-1].dist(P[yt]));for(var kt=0;kt<P.length;kt++){var Ut=ve[kt];this.lineVertexArray.emplaceBack(Ut.x,Ut.y,Ut.tileUnitDistanceFromAnchor)}}return{lineStartIndex:V,lineLength:this.lineVertexArray.length-V}},Jf.prototype.addSymbols=function(g,P,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr){for(var xr=g.indexArray,ei=g.layoutVertexArray,Li=g.segments.prepareSegment(4*P.length,ei,xr,this.canOverlap?ve.sortKey:void 0),_n=this.glyphOffsetArray.length,rn=Li.vertexLength,Fa=this.allowVerticalPlacement&&Ge===cp.vertical?Math.PI/2:0,On=ve.text&&ve.text.sections,Ra=0;Ra<P.length;Ra++){var so=P[Ra],As=so.tl,dl=so.tr,fl=so.bl,eu=so.br,Ol=so.tex,Xl=so.pixelOffsetTL,Cu=so.pixelOffsetBR,tu=so.minFontScaleX,ou=so.minFontScaleY,Qu=so.glyphOffset,Eu=so.isSDF,Tf=so.sectionIndex,$f=Li.vertexLength,Af=Qu[1];WC(ei,yt.x,yt.y,As.x,Af+As.y,Ol.x,Ol.y,V,Eu,Xl.x,Xl.y,tu,ou),WC(ei,yt.x,yt.y,dl.x,Af+dl.y,Ol.x+Ol.w,Ol.y,V,Eu,Cu.x,Xl.y,tu,ou),WC(ei,yt.x,yt.y,fl.x,Af+fl.y,Ol.x,Ol.y+Ol.h,V,Eu,Xl.x,Cu.y,tu,ou),WC(ei,yt.x,yt.y,eu.x,Af+eu.y,Ol.x+Ol.w,Ol.y+Ol.h,V,Eu,Cu.x,Cu.y,tu,ou),vB(g.dynamicLayoutVertexArray,yt,Fa),xr.emplaceBack($f,$f+1,$f+2),xr.emplaceBack($f+1,$f+2,$f+3),Li.vertexLength+=4,Li.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Qu[0]),(Ra===P.length-1||Tf!==P[Ra+1].sectionIndex)&&g.programConfigurations.populatePaintArrays(ei.length,ve,ve.index,{},kr,On&&On[Tf])}g.placedSymbolArray.emplaceBack(yt.x,yt.y,_n,this.glyphOffsetArray.length-_n,rn,kt,Ut,yt.segment,V?V[0]:0,V?V[1]:0,J[0],J[1],Ge,0,!1,0,lr)},Jf.prototype._addCollisionDebugVertex=function(g,P,V,J,ae,ve){return P.emplaceBack(0,0),g.emplaceBack(V.x,V.y,J,ae,Math.round(ve.x),Math.round(ve.y))},Jf.prototype.addCollisionDebugVertices=function(g,P,V,J,ae,ve,Ge){var yt=ae.segments.prepareSegment(4,ae.layoutVertexArray,ae.indexArray),kt=yt.vertexLength,Ut=ae.layoutVertexArray,lr=ae.collisionVertexArray,kr=Ge.anchorX,xr=Ge.anchorY;this._addCollisionDebugVertex(Ut,lr,ve,kr,xr,new l(g,P)),this._addCollisionDebugVertex(Ut,lr,ve,kr,xr,new l(V,P)),this._addCollisionDebugVertex(Ut,lr,ve,kr,xr,new l(V,J)),this._addCollisionDebugVertex(Ut,lr,ve,kr,xr,new l(g,J)),yt.vertexLength+=4;var ei=ae.indexArray;ei.emplaceBack(kt,kt+1),ei.emplaceBack(kt+1,kt+2),ei.emplaceBack(kt+2,kt+3),ei.emplaceBack(kt+3,kt),yt.primitiveLength+=4},Jf.prototype.addDebugCollisionBoxes=function(g,P,V,J){for(var ae=g;ae<P;ae++){var ve=this.collisionBoxArray.get(ae),Ge=ve.x1,yt=ve.y1,kt=ve.x2,Ut=ve.y2;this.addCollisionDebugVertices(Ge,yt,kt,Ut,J?this.textCollisionBox:this.iconCollisionBox,ve.anchorPoint,V)}},Jf.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new AM(yl,wt.members,Tu),this.iconCollisionBox=new AM(yl,wt.members,Tu);for(var g=0;g<this.symbolInstances.length;g++){var P=this.symbolInstances.get(g);this.addDebugCollisionBoxes(P.textBoxStartIndex,P.textBoxEndIndex,P,!0),this.addDebugCollisionBoxes(P.verticalTextBoxStartIndex,P.verticalTextBoxEndIndex,P,!0),this.addDebugCollisionBoxes(P.iconBoxStartIndex,P.iconBoxEndIndex,P,!1),this.addDebugCollisionBoxes(P.verticalIconBoxStartIndex,P.verticalIconBoxEndIndex,P,!1)}},Jf.prototype._deserializeCollisionBoxesForSymbol=function(g,P,V,J,ae,ve,Ge,yt,kt){for(var Ut={},lr=P;lr<V;lr++){var kr=g.get(lr);Ut.textBox={x1:kr.x1,y1:kr.y1,x2:kr.x2,y2:kr.y2,anchorPointX:kr.anchorPointX,anchorPointY:kr.anchorPointY},Ut.textFeatureIndex=kr.featureIndex;break}for(var xr=J;xr<ae;xr++){var ei=g.get(xr);Ut.verticalTextBox={x1:ei.x1,y1:ei.y1,x2:ei.x2,y2:ei.y2,anchorPointX:ei.anchorPointX,anchorPointY:ei.anchorPointY},Ut.verticalTextFeatureIndex=ei.featureIndex;break}for(var Li=ve;Li<Ge;Li++){var _n=g.get(Li);Ut.iconBox={x1:_n.x1,y1:_n.y1,x2:_n.x2,y2:_n.y2,anchorPointX:_n.anchorPointX,anchorPointY:_n.anchorPointY},Ut.iconFeatureIndex=_n.featureIndex;break}for(var rn=yt;rn<kt;rn++){var Fa=g.get(rn);Ut.verticalIconBox={x1:Fa.x1,y1:Fa.y1,x2:Fa.x2,y2:Fa.y2,anchorPointX:Fa.anchorPointX,anchorPointY:Fa.anchorPointY},Ut.verticalIconFeatureIndex=Fa.featureIndex;break}return Ut},Jf.prototype.deserializeCollisionBoxes=function(g){this.collisionArrays=[];for(var P=0;P<this.symbolInstances.length;P++){var V=this.symbolInstances.get(P);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(g,V.textBoxStartIndex,V.textBoxEndIndex,V.verticalTextBoxStartIndex,V.verticalTextBoxEndIndex,V.iconBoxStartIndex,V.iconBoxEndIndex,V.verticalIconBoxStartIndex,V.verticalIconBoxEndIndex))}},Jf.prototype.hasTextData=function(){return this.text.segments.get().length>0},Jf.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Jf.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Jf.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Jf.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Jf.prototype.addIndicesForPlacedSymbol=function(g,P){for(var V=g.placedSymbolArray.get(P),J=V.vertexStartIndex+V.numGlyphs*4,ae=V.vertexStartIndex;ae<J;ae+=4)g.indexArray.emplaceBack(ae,ae+1,ae+2),g.indexArray.emplaceBack(ae+1,ae+2,ae+3)},Jf.prototype.getSortedSymbolIndexes=function(g){if(this.sortedAngle===g&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var P=Math.sin(g),V=Math.cos(g),J=[],ae=[],ve=[],Ge=0;Ge<this.symbolInstances.length;++Ge){ve.push(Ge);var yt=this.symbolInstances.get(Ge);J.push(Math.round(P*yt.anchorX+V*yt.anchorY)|0),ae.push(yt.featureIndex)}return ve.sort(function(kt,Ut){return J[kt]-J[Ut]||ae[Ut]-ae[kt]}),ve},Jf.prototype.addToSortKeyRanges=function(g,P){var V=this.sortKeyRanges[this.sortKeyRanges.length-1];V&&V.sortKey===P?V.symbolInstanceEnd=g+1:this.sortKeyRanges.push({sortKey:P,symbolInstanceStart:g,symbolInstanceEnd:g+1})},Jf.prototype.sortFeatures=function(g){var P=this;if(this.sortFeaturesByY&&this.sortedAngle!==g&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(g),this.sortedAngle=g,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var V=0,J=this.symbolInstanceIndexes;V<J.length;V+=1){var ae=J[V],ve=this.symbolInstances.get(ae);this.featureSortOrder.push(ve.featureIndex),[ve.rightJustifiedTextSymbolIndex,ve.centerJustifiedTextSymbolIndex,ve.leftJustifiedTextSymbolIndex].forEach(function(Ge,yt,kt){Ge>=0&&kt.indexOf(Ge)===yt&&P.addIndicesForPlacedSymbol(P.text,Ge)}),ve.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,ve.verticalPlacedTextSymbolIndex),ve.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.placedIconSymbolIndex),ve.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},X("SymbolBucket",Jf,{omit:["layers","collisionBoxArray","features","compareText"]}),Jf.MAX_GLYPHS=65535,Jf.addDynamicAttributes=vB;function JQe(m,g){return g.replace(/{([^{}]+)}/g,function(P,V){return V in m?String(m[V]):""})}var $Qe=new fa({"symbol-placement":new Gt(Ri.layout_symbol["symbol-placement"]),"symbol-spacing":new Gt(Ri.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Gt(Ri.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new jr(Ri.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Gt(Ri.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Gt(Ri.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Gt(Ri.layout_symbol["icon-ignore-placement"]),"icon-optional":new Gt(Ri.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Gt(Ri.layout_symbol["icon-rotation-alignment"]),"icon-size":new jr(Ri.layout_symbol["icon-size"]),"icon-text-fit":new Gt(Ri.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Gt(Ri.layout_symbol["icon-text-fit-padding"]),"icon-image":new jr(Ri.layout_symbol["icon-image"]),"icon-rotate":new jr(Ri.layout_symbol["icon-rotate"]),"icon-padding":new Gt(Ri.layout_symbol["icon-padding"]),"icon-keep-upright":new Gt(Ri.layout_symbol["icon-keep-upright"]),"icon-offset":new jr(Ri.layout_symbol["icon-offset"]),"icon-anchor":new jr(Ri.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Gt(Ri.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Gt(Ri.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Gt(Ri.layout_symbol["text-rotation-alignment"]),"text-field":new jr(Ri.layout_symbol["text-field"]),"text-font":new jr(Ri.layout_symbol["text-font"]),"text-size":new jr(Ri.layout_symbol["text-size"]),"text-max-width":new jr(Ri.layout_symbol["text-max-width"]),"text-line-height":new Gt(Ri.layout_symbol["text-line-height"]),"text-letter-spacing":new jr(Ri.layout_symbol["text-letter-spacing"]),"text-justify":new jr(Ri.layout_symbol["text-justify"]),"text-radial-offset":new jr(Ri.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Gt(Ri.layout_symbol["text-variable-anchor"]),"text-anchor":new jr(Ri.layout_symbol["text-anchor"]),"text-max-angle":new Gt(Ri.layout_symbol["text-max-angle"]),"text-writing-mode":new Gt(Ri.layout_symbol["text-writing-mode"]),"text-rotate":new jr(Ri.layout_symbol["text-rotate"]),"text-padding":new Gt(Ri.layout_symbol["text-padding"]),"text-keep-upright":new Gt(Ri.layout_symbol["text-keep-upright"]),"text-transform":new jr(Ri.layout_symbol["text-transform"]),"text-offset":new jr(Ri.layout_symbol["text-offset"]),"text-allow-overlap":new Gt(Ri.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Gt(Ri.layout_symbol["text-ignore-placement"]),"text-optional":new Gt(Ri.layout_symbol["text-optional"])}),QQe=new fa({"icon-opacity":new jr(Ri.paint_symbol["icon-opacity"]),"icon-color":new jr(Ri.paint_symbol["icon-color"]),"icon-halo-color":new jr(Ri.paint_symbol["icon-halo-color"]),"icon-halo-width":new jr(Ri.paint_symbol["icon-halo-width"]),"icon-halo-blur":new jr(Ri.paint_symbol["icon-halo-blur"]),"icon-translate":new Gt(Ri.paint_symbol["icon-translate"]),"icon-translate-anchor":new Gt(Ri.paint_symbol["icon-translate-anchor"]),"text-opacity":new jr(Ri.paint_symbol["text-opacity"]),"text-color":new jr(Ri.paint_symbol["text-color"],{runtimeType:Qi,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new jr(Ri.paint_symbol["text-halo-color"]),"text-halo-width":new jr(Ri.paint_symbol["text-halo-width"]),"text-halo-blur":new jr(Ri.paint_symbol["text-halo-blur"]),"text-translate":new Gt(Ri.paint_symbol["text-translate"]),"text-translate-anchor":new Gt(Ri.paint_symbol["text-translate-anchor"])}),yB={paint:QQe,layout:$Qe},Yw=function(g){this.type=g.property.overrides?g.property.overrides.runtimeType:Co,this.defaultValue=g};Yw.prototype.evaluate=function(g){if(g.formattedSection){var P=this.defaultValue.property.overrides;if(P&&P.hasOverride(g.formattedSection))return P.getOverride(g.formattedSection)}return g.feature&&g.featureState?this.defaultValue.evaluate(g.feature,g.featureState):this.defaultValue.property.specification.default},Yw.prototype.eachChild=function(g){if(!this.defaultValue.isConstant()){var P=this.defaultValue.value;g(P._styleExpression.expression)}},Yw.prototype.outputDefined=function(){return!1},Yw.prototype.serialize=function(){return null},X("FormatSectionOverride",Yw,{omit:["defaultValue"]});var eet=function(m){function g(P){m.call(this,P,yB)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.recalculate=function(V,J){if(m.prototype.recalculate.call(this,V,J),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 ve=[],Ge=0,yt=ae;Ge<yt.length;Ge+=1){var kt=yt[Ge];ve.indexOf(kt)<0&&ve.push(kt)}this.layout._values["text-writing-mode"]=ve}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},g.prototype.getValueAndResolveTokens=function(V,J,ae,ve){var Ge=this.layout.get(V).evaluate(J,{},ae,ve),yt=this._unevaluatedLayout._values[V];return!yt.isDataDriven()&&!Uo(yt.value)&&Ge?JQe(J.properties,Ge):Ge},g.prototype.createBucket=function(V){return new Jf(V)},g.prototype.queryRadius=function(){return 0},g.prototype.queryIntersectsFeature=function(){return!1},g.prototype._setPaintOverrides=function(){for(var V=0,J=yB.paint.overridableProperties;V<J.length;V+=1){var ae=J[V];if(g.hasPaintOverride(this.layout,ae)){var ve=this.paint.get(ae),Ge=new Yw(ve),yt=new xl(Ge,ve.property.specification),kt=null;ve.value.kind==="constant"||ve.value.kind==="source"?kt=new Bl("source",yt):kt=new Il("composite",yt,ve.value.zoomStops,ve.value._interpolationType),this.paint._values[ae]=new hf(ve.property,kt,ve.parameters)}}},g.prototype._handleOverridablePaintPropertyUpdate=function(V,J,ae){return!this.layout||J.isDataDriven()||ae.isDataDriven()?!1:g.hasPaintOverride(this.layout,V)},g.hasPaintOverride=function(V,J){var ae=V.get("text-field"),ve=yB.paint.properties[J],Ge=!1,yt=function(lr){for(var kr=0,xr=lr;kr<xr.length;kr+=1){var ei=xr[kr];if(ve.overrides&&ve.overrides.hasOverride(ei)){Ge=!0;return}}};if(ae.value.kind==="constant"&&ae.value.value instanceof on)yt(ae.value.value.sections);else if(ae.value.kind==="source"){var kt=function(lr){if(!Ge)if(lr instanceof qn&&bn(lr.value)===Vo){var kr=lr.value;yt(kr.sections)}else lr instanceof ba?yt(lr.sections):lr.eachChild(kt)},Ut=ae.value;Ut._styleExpression&&kt(Ut._styleExpression.expression)}return Ge},g}(Io),tet=new fa({"background-color":new Gt(Ri.paint_background["background-color"]),"background-pattern":new Mn(Ri.paint_background["background-pattern"]),"background-opacity":new Gt(Ri.paint_background["background-opacity"])}),ret={paint:tet},iet=function(m){function g(P){m.call(this,P,ret)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g}(Io),net=new fa({"raster-opacity":new Gt(Ri.paint_raster["raster-opacity"]),"raster-hue-rotate":new Gt(Ri.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Gt(Ri.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Gt(Ri.paint_raster["raster-brightness-max"]),"raster-saturation":new Gt(Ri.paint_raster["raster-saturation"]),"raster-contrast":new Gt(Ri.paint_raster["raster-contrast"]),"raster-resampling":new Gt(Ri.paint_raster["raster-resampling"]),"raster-fade-duration":new Gt(Ri.paint_raster["raster-fade-duration"])}),aet={paint:net},oet=function(m){function g(P){m.call(this,P,aet)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g}(Io);function set(m){var g=[],P=m.id;return P===void 0&&g.push({message:"layers."+P+': missing required property "id"'}),m.render===void 0&&g.push({message:"layers."+P+': missing required method "render"'}),m.renderingMode&&m.renderingMode!=="2d"&&m.renderingMode!=="3d"&&g.push({message:"layers."+P+': property "renderingMode" must be either "2d" or "3d"'}),g}var uet=function(m){function g(P){m.call(this,P,{}),this.implementation=P}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},g.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},g.prototype.recalculate=function(){},g.prototype.updateTransitions=function(){},g.prototype.hasTransition=function(){},g.prototype.serialize=function(){},g.prototype.onAdd=function(V){this.implementation.onAdd&&this.implementation.onAdd(V,V.painter.context.gl)},g.prototype.onRemove=function(V){this.implementation.onRemove&&this.implementation.onRemove(V,V.painter.context.gl)},g}(Io),fet={circle:Z8,heatmap:Lw,hillshade:cC,fill:$x,"fill-extrusion":cm,line:S,symbol:eet,background:iet,raster:oet};function cet(m){return m.type==="custom"?new uet(m):new fet[m.type](m)}var VQ=c.HTMLImageElement,HQ=c.HTMLCanvasElement,GQ=c.HTMLVideoElement,WQ=c.ImageData,jC=c.ImageBitmap,rb=function(g,P,V,J){this.context=g,this.format=V,this.texture=g.gl.createTexture(),this.update(P,J)};rb.prototype.update=function(g,P,V){var J=g.width,ae=g.height,ve=(!this.size||this.size[0]!==J||this.size[1]!==ae)&&!V,Ge=this,yt=Ge.context,kt=yt.gl;if(this.useMipmap=!!(P&&P.useMipmap),kt.bindTexture(kt.TEXTURE_2D,this.texture),yt.pixelStoreUnpackFlipY.set(!1),yt.pixelStoreUnpack.set(1),yt.pixelStoreUnpackPremultiplyAlpha.set(this.format===kt.RGBA&&(!P||P.premultiply!==!1)),ve)this.size=[J,ae],g instanceof VQ||g instanceof HQ||g instanceof GQ||g instanceof WQ||jC&&g instanceof jC?kt.texImage2D(kt.TEXTURE_2D,0,this.format,this.format,kt.UNSIGNED_BYTE,g):kt.texImage2D(kt.TEXTURE_2D,0,this.format,J,ae,0,this.format,kt.UNSIGNED_BYTE,g.data);else{var Ut=V||{x:0,y:0},lr=Ut.x,kr=Ut.y;g instanceof VQ||g instanceof HQ||g instanceof GQ||g instanceof WQ||jC&&g instanceof jC?kt.texSubImage2D(kt.TEXTURE_2D,0,lr,kr,kt.RGBA,kt.UNSIGNED_BYTE,g):kt.texSubImage2D(kt.TEXTURE_2D,0,lr,kr,J,ae,kt.RGBA,kt.UNSIGNED_BYTE,g.data)}this.useMipmap&&this.isSizePowerOfTwo()&&kt.generateMipmap(kt.TEXTURE_2D)},rb.prototype.bind=function(g,P,V){var J=this,ae=J.context,ve=ae.gl;ve.bindTexture(ve.TEXTURE_2D,this.texture),V===ve.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(V=ve.LINEAR),g!==this.filter&&(ve.texParameteri(ve.TEXTURE_2D,ve.TEXTURE_MAG_FILTER,g),ve.texParameteri(ve.TEXTURE_2D,ve.TEXTURE_MIN_FILTER,V||g),this.filter=g),P!==this.wrap&&(ve.texParameteri(ve.TEXTURE_2D,ve.TEXTURE_WRAP_S,P),ve.texParameteri(ve.TEXTURE_2D,ve.TEXTURE_WRAP_T,P),this.wrap=P)},rb.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},rb.prototype.destroy=function(){var g=this.context,P=g.gl;P.deleteTexture(this.texture),this.texture=null};var mB=function(g){var P=this;this._callback=g,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){P._triggered=!1,P._callback()})};mB.prototype.trigger=function(){var g=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){g._triggered=!1,g._callback()},0))},mB.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Kw=function(g,P,V){this.target=g,this.parent=P,this.mapId=V,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},q(["receive","process"],this),this.invoker=new mB(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=Ce()?g:c};Kw.prototype.send=function(g,P,V,J,ae){var ve=this;ae===void 0&&(ae=!1);var Ge=Math.round(Math.random()*1e18).toString(36).substring(0,10);V&&(this.callbacks[Ge]=V);var yt=ke(this.globalScope)?void 0:[];return this.target.postMessage({id:Ge,type:g,hasCallback:!!V,targetMapId:J,mustQueue:ae,sourceMapId:this.mapId,data:Ye(P,yt)},yt),{cancel:function(){V&&delete ve.callbacks[Ge],ve.target.postMessage({id:Ge,type:"<cancel>",targetMapId:J,sourceMapId:ve.mapId})}}},Kw.prototype.receive=function(g){var P=g.data,V=P.id;if(V&&!(P.targetMapId&&this.mapId!==P.targetMapId))if(P.type==="<cancel>"){delete this.tasks[V];var J=this.cancelCallbacks[V];delete this.cancelCallbacks[V],J&&J()}else Ce()||P.mustQueue?(this.tasks[V]=P,this.taskQueue.push(V),this.invoker.trigger()):this.processTask(V,P)},Kw.prototype.process=function(){if(this.taskQueue.length){var g=this.taskQueue.shift(),P=this.tasks[g];delete this.tasks[g],this.taskQueue.length&&this.invoker.trigger(),P&&this.processTask(g,P)}},Kw.prototype.processTask=function(g,P){var V=this;if(P.type==="<response>"){var J=this.callbacks[g];delete this.callbacks[g],J&&(P.error?J(it(P.error)):J(null,it(P.data)))}else{var ae=!1,ve=ke(this.globalScope)?void 0:[],Ge=P.hasCallback?function(kr,xr){ae=!0,delete V.cancelCallbacks[g],V.target.postMessage({id:g,type:"<response>",sourceMapId:V.mapId,error:kr?Ye(kr):null,data:Ye(xr,ve)},ve)}:function(kr){ae=!0},yt=null,kt=it(P.data);if(this.parent[P.type])yt=this.parent[P.type](P.sourceMapId,kt,Ge);else if(this.parent.getWorkerSource){var Ut=P.type.split("."),lr=this.parent.getWorkerSource(P.sourceMapId,Ut[0],kt.source);yt=lr[Ut[1]](kt,Ge)}else Ge(new Error("Could not find function "+P.type));!ae&&yt&&yt.cancel&&(this.cancelCallbacks[g]=yt.cancel)}},Kw.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function het(m,g,P){g=Math.pow(2,P)-g-1;var V=jQ(m*256,g*256,P),J=jQ((m+1)*256,(g+1)*256,P);return V[0]+","+V[1]+","+J[0]+","+J[1]}function jQ(m,g,P){var V=2*Math.PI*6378137/256/Math.pow(2,P),J=m*V-2*Math.PI*6378137/2,ae=g*V-2*Math.PI*6378137/2;return[J,ae]}var mh=function(g,P){g&&(P?this.setSouthWest(g).setNorthEast(P):g.length===4?this.setSouthWest([g[0],g[1]]).setNorthEast([g[2],g[3]]):this.setSouthWest(g[0]).setNorthEast(g[1]))};mh.prototype.setNorthEast=function(g){return this._ne=g instanceof Ic?new Ic(g.lng,g.lat):Ic.convert(g),this},mh.prototype.setSouthWest=function(g){return this._sw=g instanceof Ic?new Ic(g.lng,g.lat):Ic.convert(g),this},mh.prototype.extend=function(g){var P=this._sw,V=this._ne,J,ae;if(g instanceof Ic)J=g,ae=g;else if(g instanceof mh){if(J=g._sw,ae=g._ne,!J||!ae)return this}else{if(Array.isArray(g))if(g.length===4||g.every(Array.isArray)){var ve=g;return this.extend(mh.convert(ve))}else{var Ge=g;return this.extend(Ic.convert(Ge))}return this}return!P&&!V?(this._sw=new Ic(J.lng,J.lat),this._ne=new Ic(ae.lng,ae.lat)):(P.lng=Math.min(J.lng,P.lng),P.lat=Math.min(J.lat,P.lat),V.lng=Math.max(ae.lng,V.lng),V.lat=Math.max(ae.lat,V.lat)),this},mh.prototype.getCenter=function(){return new Ic((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},mh.prototype.getSouthWest=function(){return this._sw},mh.prototype.getNorthEast=function(){return this._ne},mh.prototype.getNorthWest=function(){return new Ic(this.getWest(),this.getNorth())},mh.prototype.getSouthEast=function(){return new Ic(this.getEast(),this.getSouth())},mh.prototype.getWest=function(){return this._sw.lng},mh.prototype.getSouth=function(){return this._sw.lat},mh.prototype.getEast=function(){return this._ne.lng},mh.prototype.getNorth=function(){return this._ne.lat},mh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},mh.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},mh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},mh.prototype.contains=function(g){var P=Ic.convert(g),V=P.lng,J=P.lat,ae=this._sw.lat<=J&&J<=this._ne.lat,ve=this._sw.lng<=V&&V<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ve=this._sw.lng>=V&&V>=this._ne.lng),ae&&ve},mh.convert=function(g){return!g||g instanceof mh?g:new mh(g)};var ZQ=63710088e-1,Ic=function(g,P){if(isNaN(g)||isNaN(P))throw new Error("Invalid LngLat object: ("+g+", "+P+")");if(this.lng=+g,this.lat=+P,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ic.prototype.wrap=function(){return new Ic(k(this.lng,-180,180),this.lat)},Ic.prototype.toArray=function(){return[this.lng,this.lat]},Ic.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ic.prototype.distanceTo=function(g){var P=Math.PI/180,V=this.lat*P,J=g.lat*P,ae=Math.sin(V)*Math.sin(J)+Math.cos(V)*Math.cos(J)*Math.cos((g.lng-this.lng)*P),ve=ZQ*Math.acos(Math.min(ae,1));return ve},Ic.prototype.toBounds=function(g){g===void 0&&(g=0);var P=40075017,V=360*g/P,J=V/Math.cos(Math.PI/180*this.lat);return new mh(new Ic(this.lng-J,this.lat-V),new Ic(this.lng+J,this.lat+V))},Ic.convert=function(g){if(g instanceof Ic)return g;if(Array.isArray(g)&&(g.length===2||g.length===3))return new Ic(Number(g[0]),Number(g[1]));if(!Array.isArray(g)&&typeof g=="object"&&g!==null)return new Ic(Number("lng"in g?g.lng:g.lon),Number(g.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 XQ=2*Math.PI*ZQ;function YQ(m){return XQ*Math.cos(m*Math.PI/180)}function KQ(m){return(180+m)/360}function JQ(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function $Q(m,g){return m/YQ(g)}function det(m){return m*360-180}function gB(m){var g=180-m*360;return 360/Math.PI*Math.atan(Math.exp(g*Math.PI/180))-90}function pet(m,g){return m*YQ(gB(g))}function vet(m){return 1/Math.cos(m*Math.PI/180)}var ib=function(g,P,V){V===void 0&&(V=0),this.x=+g,this.y=+P,this.z=+V};ib.fromLngLat=function(g,P){P===void 0&&(P=0);var V=Ic.convert(g);return new ib(KQ(V.lng),JQ(V.lat),$Q(P,V.lat))},ib.prototype.toLngLat=function(){return new Ic(det(this.x),gB(this.y))},ib.prototype.toAltitude=function(){return pet(this.z,this.y)},ib.prototype.meterInMercatorCoordinateUnits=function(){return 1/XQ*vet(gB(this.y))};var nb=function(g,P,V){this.z=g,this.x=P,this.y=V,this.key=SM(0,g,g,P,V)};nb.prototype.equals=function(g){return this.z===g.z&&this.x===g.x&&this.y===g.y},nb.prototype.url=function(g,P){var V=het(this.x,this.y,this.z),J=yet(this.z,this.x,this.y);return g[(this.x+this.y)%g.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(P==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",J).replace("{bbox-epsg-3857}",V)},nb.prototype.getTilePoint=function(g){var P=Math.pow(2,this.z);return new l((g.x*P-this.x)*eo,(g.y*P-this.y)*eo)},nb.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var QQ=function(g,P){this.wrap=g,this.canonical=P,this.key=SM(g,P.z,P.z,P.x,P.y)},gh=function(g,P,V,J,ae){this.overscaledZ=g,this.wrap=P,this.canonical=new nb(V,+J,+ae),this.key=SM(P,g,V,J,ae)};gh.prototype.equals=function(g){return this.overscaledZ===g.overscaledZ&&this.wrap===g.wrap&&this.canonical.equals(g.canonical)},gh.prototype.scaledTo=function(g){var P=this.canonical.z-g;return g>this.canonical.z?new gh(g,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new gh(g,this.wrap,g,this.canonical.x>>P,this.canonical.y>>P)},gh.prototype.calculateScaledKey=function(g,P){var V=this.canonical.z-g;return g>this.canonical.z?SM(this.wrap*+P,g,this.canonical.z,this.canonical.x,this.canonical.y):SM(this.wrap*+P,g,g,this.canonical.x>>V,this.canonical.y>>V)},gh.prototype.isChildOf=function(g){if(g.wrap!==this.wrap)return!1;var P=this.canonical.z-g.canonical.z;return g.overscaledZ===0||g.overscaledZ<this.overscaledZ&&g.canonical.x===this.canonical.x>>P&&g.canonical.y===this.canonical.y>>P},gh.prototype.children=function(g){if(this.overscaledZ>=g)return[new gh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var P=this.canonical.z+1,V=this.canonical.x*2,J=this.canonical.y*2;return[new gh(P,this.wrap,P,V,J),new gh(P,this.wrap,P,V+1,J),new gh(P,this.wrap,P,V,J+1),new gh(P,this.wrap,P,V+1,J+1)]},gh.prototype.isLessThan=function(g){return this.wrap<g.wrap?!0:this.wrap>g.wrap?!1:this.overscaledZ<g.overscaledZ?!0:this.overscaledZ>g.overscaledZ?!1:this.canonical.x<g.canonical.x?!0:this.canonical.x>g.canonical.x?!1:this.canonical.y<g.canonical.y},gh.prototype.wrapped=function(){return new gh(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},gh.prototype.unwrapTo=function(g){return new gh(this.overscaledZ,g,this.canonical.z,this.canonical.x,this.canonical.y)},gh.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},gh.prototype.toUnwrapped=function(){return new QQ(this.wrap,this.canonical)},gh.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},gh.prototype.getTilePoint=function(g){return this.canonical.getTilePoint(new ib(g.x-this.wrap,g.y))};function SM(m,g,P,V,J){m*=2,m<0&&(m=m*-1-1);var ae=1<<P;return(ae*ae*m+ae*J+V).toString(36)+P.toString(36)+g.toString(36)}function yet(m,g,P){for(var V="",J,ae=m;ae>0;ae--)J=1<<ae-1,V+=(g&J?1:0)+(P&J?2:0);return V}X("CanonicalTileID",nb),X("OverscaledTileID",gh,{omit:["posMatrix"]});var dg=function(g,P,V){if(this.uid=g,P.height!==P.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=P.height;var J=this.dim=P.height-2;this.data=new Uint32Array(P.data.buffer),this.encoding=V||"mapbox";for(var ae=0;ae<J;ae++)this.data[this._idx(-1,ae)]=this.data[this._idx(0,ae)],this.data[this._idx(J,ae)]=this.data[this._idx(J-1,ae)],this.data[this._idx(ae,-1)]=this.data[this._idx(ae,0)],this.data[this._idx(ae,J)]=this.data[this._idx(ae,J-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(J,-1)]=this.data[this._idx(J-1,0)],this.data[this._idx(-1,J)]=this.data[this._idx(0,J-1)],this.data[this._idx(J,J)]=this.data[this._idx(J-1,J-1)]};dg.prototype.get=function(g,P){var V=new Uint8Array(this.data.buffer),J=this._idx(g,P)*4,ae=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return ae(V[J],V[J+1],V[J+2])},dg.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},dg.prototype._idx=function(g,P){if(g<-1||g>=this.dim+1||P<-1||P>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(P+1)*this.stride+(g+1)},dg.prototype._unpackMapbox=function(g,P,V){return(g*256*256+P*256+V)/10-1e4},dg.prototype._unpackTerrarium=function(g,P,V){return g*256+P+V/256-32768},dg.prototype.getPixels=function(){return new kh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},dg.prototype.backfillBorder=function(g,P,V){if(this.dim!==g.dim)throw new Error("dem dimension mismatch");var J=P*this.dim,ae=P*this.dim+this.dim,ve=V*this.dim,Ge=V*this.dim+this.dim;switch(P){case-1:J=ae-1;break;case 1:ae=J+1;break}switch(V){case-1:ve=Ge-1;break;case 1:Ge=ve+1;break}for(var yt=-P*this.dim,kt=-V*this.dim,Ut=ve;Ut<Ge;Ut++)for(var lr=J;lr<ae;lr++)this.data[this._idx(lr,Ut)]=g.data[this._idx(lr+yt,Ut+kt)]},X("DEMData",dg);function met(m,g){var P={};if(!g)return P;for(var V=function(){var ve=ae[J],Ge=ve.layerIds.map(function(lr){return g.getLayer(lr)}).filter(Boolean);if(Ge.length!==0){ve.layers=Ge,ve.stateDependentLayerIds&&(ve.stateDependentLayers=ve.stateDependentLayerIds.map(function(lr){return Ge.filter(function(kr){return kr.id===lr})[0]}));for(var yt=0,kt=Ge;yt<kt.length;yt+=1){var Ut=kt[yt];P[Ut.id]=ve}}},J=0,ae=m;J<ae.length;J+=1)V();return P}var ZC=function(g){this._stringToNumber={},this._numberToString=[];for(var P=0;P<g.length;P++){var V=g[P];this._stringToNumber[V]=P,this._numberToString[P]=V}};ZC.prototype.encode=function(g){return this._stringToNumber[g]},ZC.prototype.decode=function(g){return this._numberToString[g]};var XC=function(g,P,V,J,ae){this.type="Feature",this._vectorTileFeature=g,g._z=P,g._x=V,g._y=J,this.properties=g.properties,this.id=ae},_B={geometry:{configurable:!0}};_B.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},_B.geometry.set=function(m){this._geometry=m},XC.prototype.toJSON=function(){var g={geometry:this.geometry};for(var P in this)P==="_geometry"||P==="_vectorTileFeature"||(g[P]=this[P]);return g},Object.defineProperties(XC.prototype,_B);var Jw=function(){this.state={},this.stateChanges={},this.deletedStates={}};Jw.prototype.updateState=function(g,P,V){var J=String(P);if(this.stateChanges[g]=this.stateChanges[g]||{},this.stateChanges[g][J]=this.stateChanges[g][J]||{},_(this.stateChanges[g][J],V),this.deletedStates[g]===null){this.deletedStates[g]={};for(var ae in this.state[g])ae!==J&&(this.deletedStates[g][ae]=null)}else{var ve=this.deletedStates[g]&&this.deletedStates[g][J]===null;if(ve){this.deletedStates[g][J]={};for(var Ge in this.state[g][J])V[Ge]||(this.deletedStates[g][J][Ge]=null)}else for(var yt in V){var kt=this.deletedStates[g]&&this.deletedStates[g][J]&&this.deletedStates[g][J][yt]===null;kt&&delete this.deletedStates[g][J][yt]}}},Jw.prototype.removeFeatureState=function(g,P,V){var J=this.deletedStates[g]===null;if(!J){var ae=String(P);if(this.deletedStates[g]=this.deletedStates[g]||{},V&&P!==void 0)this.deletedStates[g][ae]!==null&&(this.deletedStates[g][ae]=this.deletedStates[g][ae]||{},this.deletedStates[g][ae][V]=null);else if(P!==void 0){var ve=this.stateChanges[g]&&this.stateChanges[g][ae];if(ve){this.deletedStates[g][ae]={};for(V in this.stateChanges[g][ae])this.deletedStates[g][ae][V]=null}else this.deletedStates[g][ae]=null}else this.deletedStates[g]=null}},Jw.prototype.getState=function(g,P){var V=String(P),J=this.state[g]||{},ae=this.stateChanges[g]||{},ve=_({},J[V],ae[V]);if(this.deletedStates[g]===null)return{};if(this.deletedStates[g]){var Ge=this.deletedStates[g][P];if(Ge===null)return{};for(var yt in Ge)delete ve[yt]}return ve},Jw.prototype.initializeTileState=function(g,P){g.setFeatureState(this.state,P)},Jw.prototype.coalesceChanges=function(g,P){var V={};for(var J in this.stateChanges){this.state[J]=this.state[J]||{};var ae={};for(var ve in this.stateChanges[J])this.state[J][ve]||(this.state[J][ve]={}),_(this.state[J][ve],this.stateChanges[J][ve]),ae[ve]=this.state[J][ve];V[J]=ae}for(var Ge in this.deletedStates){this.state[Ge]=this.state[Ge]||{};var yt={};if(this.deletedStates[Ge]===null)for(var kt in this.state[Ge])yt[kt]={},this.state[Ge][kt]={};else for(var Ut in this.deletedStates[Ge]){var lr=this.deletedStates[Ge][Ut]===null;if(lr)this.state[Ge][Ut]={};else for(var kr=0,xr=Object.keys(this.deletedStates[Ge][Ut]);kr<xr.length;kr+=1){var ei=xr[kr];delete this.state[Ge][Ut][ei]}yt[Ut]=this.state[Ge][Ut]}V[Ge]=V[Ge]||{},_(V[Ge],yt)}if(this.stateChanges={},this.deletedStates={},Object.keys(V).length!==0)for(var Li in g){var _n=g[Li];_n.setFeatureState(V,P)}};var pg=function(g,P){this.tileID=g,this.x=g.canonical.x,this.y=g.canonical.y,this.z=g.canonical.z,this.grid=new Gu(eo,16,0),this.grid3D=new Gu(eo,16,0),this.featureIndexArray=new zc,this.promoteId=P};pg.prototype.insert=function(g,P,V,J,ae,ve){var Ge=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(V,J,ae);for(var yt=ve?this.grid3D:this.grid,kt=0;kt<P.length;kt++){for(var Ut=P[kt],lr=[1/0,1/0,-1/0,-1/0],kr=0;kr<Ut.length;kr++){var xr=Ut[kr];lr[0]=Math.min(lr[0],xr.x),lr[1]=Math.min(lr[1],xr.y),lr[2]=Math.max(lr[2],xr.x),lr[3]=Math.max(lr[3],xr.y)}lr[0]<eo&&lr[1]<eo&&lr[2]>=0&&lr[3]>=0&&yt.insert(Ge,lr[0],lr[1],lr[2],lr[3])}},pg.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new vy.VectorTile(new Zl(this.rawTileData)).layers,this.sourceLayerCoder=new ZC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},pg.prototype.query=function(g,P,V,J){var ae=this;this.loadVTLayers();for(var ve=g.params||{},Ge=eo/g.tileSize/g.scale,yt=Ae(ve.filter),kt=g.queryGeometry,Ut=g.queryPadding*Ge,lr=tee(kt),kr=this.grid.query(lr.minX-Ut,lr.minY-Ut,lr.maxX+Ut,lr.maxY+Ut),xr=tee(g.cameraQueryGeometry),ei=this.grid3D.query(xr.minX-Ut,xr.minY-Ut,xr.maxX+Ut,xr.maxY+Ut,function(As,dl,fl,eu){return vv(g.cameraQueryGeometry,As-Ut,dl-Ut,fl+Ut,eu+Ut)}),Li=0,_n=ei;Li<_n.length;Li+=1){var rn=_n[Li];kr.push(rn)}kr.sort(get);for(var Fa={},On,Ra=function(As){var dl=kr[As];if(dl!==On){On=dl;var fl=ae.featureIndexArray.get(dl),eu=null;ae.loadMatchingFeature(Fa,fl.bucketIndex,fl.sourceLayerIndex,fl.featureIndex,yt,ve.layers,ve.availableImages,P,V,J,function(Ol,Xl,Cu){return eu||(eu=Ml(Ol)),Xl.queryIntersectsFeature(kt,Ol,Cu,eu,ae.z,g.transform,Ge,g.pixelPosMatrix)})}},so=0;so<kr.length;so++)Ra(so);return Fa},pg.prototype.loadMatchingFeature=function(g,P,V,J,ae,ve,Ge,yt,kt,Ut,lr){var kr=this.bucketLayerIDs[P];if(!(ve&&!O(ve,kr))){var xr=this.sourceLayerCoder.decode(V),ei=this.vtLayers[xr],Li=ei.feature(J);if(ae.needGeometry){var _n=Mu(Li,!0);if(!ae.filter(new qo(this.tileID.overscaledZ),_n,this.tileID.canonical))return}else if(!ae.filter(new qo(this.tileID.overscaledZ),Li))return;for(var rn=this.getId(Li,xr),Fa=0;Fa<kr.length;Fa++){var On=kr[Fa];if(!(ve&&ve.indexOf(On)<0)){var Ra=yt[On];if(Ra){var so={};rn!==void 0&&Ut&&(so=Ut.getState(Ra.sourceLayer||"_geojsonTileLayer",rn));var As=_({},kt[On]);As.paint=eee(As.paint,Ra.paint,Li,so,Ge),As.layout=eee(As.layout,Ra.layout,Li,so,Ge);var dl=!lr||lr(Li,Ra,so);if(dl){var fl=new XC(Li,this.z,this.x,this.y,rn);fl.layer=As;var eu=g[On];eu===void 0&&(eu=g[On]=[]),eu.push({featureIndex:J,feature:fl,intersectionZ:dl})}}}}}},pg.prototype.lookupSymbolFeatures=function(g,P,V,J,ae,ve,Ge,yt){var kt={};this.loadVTLayers();for(var Ut=Ae(ae),lr=0,kr=g;lr<kr.length;lr+=1){var xr=kr[lr];this.loadMatchingFeature(kt,V,J,xr,Ut,ve,Ge,yt,P)}return kt},pg.prototype.hasLayer=function(g){for(var P=0,V=this.bucketLayerIDs;P<V.length;P+=1)for(var J=V[P],ae=0,ve=J;ae<ve.length;ae+=1){var Ge=ve[ae];if(g===Ge)return!0}return!1},pg.prototype.getId=function(g,P){var V=g.id;if(this.promoteId){var J=typeof this.promoteId=="string"?this.promoteId:this.promoteId[P];V=g.properties[J],typeof V=="boolean"&&(V=Number(V))}return V},X("FeatureIndex",pg,{omit:["rawTileData","sourceLayerCoder"]});function eee(m,g,P,V,J){return H(m,function(ae,ve){var Ge=g instanceof dc?g.get(ve):null;return Ge&&Ge.evaluate?Ge.evaluate(P,V,J):Ge})}function tee(m){for(var g=1/0,P=1/0,V=-1/0,J=-1/0,ae=0,ve=m;ae<ve.length;ae+=1){var Ge=ve[ae];g=Math.min(g,Ge.x),P=Math.min(P,Ge.y),V=Math.max(V,Ge.x),J=Math.max(J,Ge.y)}return{minX:g,minY:P,maxX:V,maxY:J}}function get(m,g){return g-m}var _et=3e4,Yh=function(g,P){this.tileID=g,this.uid=v(),this.uses=0,this.tileSize=P,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};Yh.prototype.registerFadeDuration=function(g){var P=g+this.timeAdded;P<et.now()||this.fadeEndTime&&P<this.fadeEndTime||(this.fadeEndTime=P)},Yh.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},Yh.prototype.loadVectorData=function(g,P,V){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!g){this.collisionBoxArray=new rf;return}g.featureIndex&&(this.latestFeatureIndex=g.featureIndex,g.rawTileData?(this.latestRawTileData=g.rawTileData,this.latestFeatureIndex.rawTileData=g.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=g.collisionBoxArray,this.buckets=met(g.buckets,P.style),this.hasSymbolBuckets=!1;for(var J in this.buckets){var ae=this.buckets[J];if(ae instanceof Jf)if(this.hasSymbolBuckets=!0,V)ae.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var ve in this.buckets){var Ge=this.buckets[ve];if(Ge instanceof Jf&&Ge.hasRTLText){this.hasRTLText=!0,Ju();break}}this.queryPadding=0;for(var yt in this.buckets){var kt=this.buckets[yt];this.queryPadding=Math.max(this.queryPadding,P.style.getLayer(yt).queryRadius(kt))}g.imageAtlas&&(this.imageAtlas=g.imageAtlas),g.glyphAtlasImage&&(this.glyphAtlasImage=g.glyphAtlasImage)},Yh.prototype.unloadVectorData=function(){for(var g in this.buckets)this.buckets[g].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},Yh.prototype.getBucket=function(g){return this.buckets[g.id]},Yh.prototype.upload=function(g){for(var P in this.buckets){var V=this.buckets[P];V.uploadPending()&&V.upload(g)}var J=g.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new rb(g,this.imageAtlas.image,J.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new rb(g,this.glyphAtlasImage,J.ALPHA),this.glyphAtlasImage=null)},Yh.prototype.prepare=function(g){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(g,this.imageAtlasTexture)},Yh.prototype.queryRenderedFeatures=function(g,P,V,J,ae,ve,Ge,yt,kt,Ut){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:J,cameraQueryGeometry:ae,scale:ve,tileSize:this.tileSize,pixelPosMatrix:Ut,transform:yt,params:Ge,queryPadding:this.queryPadding*kt},g,P,V)},Yh.prototype.querySourceFeatures=function(g,P){var V=this.latestFeatureIndex;if(!(!V||!V.rawTileData)){var J=V.loadVTLayers(),ae=P?P.sourceLayer:"",ve=J._geojsonTileLayer||J[ae];if(ve)for(var Ge=Ae(P&&P.filter),yt=this.tileID.canonical,kt=yt.z,Ut=yt.x,lr=yt.y,kr={z:kt,x:Ut,y:lr},xr=0;xr<ve.length;xr++){var ei=ve.feature(xr);if(Ge.needGeometry){var Li=Mu(ei,!0);if(!Ge.filter(new qo(this.tileID.overscaledZ),Li,this.tileID.canonical))continue}else if(!Ge.filter(new qo(this.tileID.overscaledZ),ei))continue;var _n=V.getId(ei,ae),rn=new XC(ei,kt,Ut,lr,_n);rn.tile=kr,g.push(rn)}}},Yh.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},Yh.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Yh.prototype.setExpiryData=function(g){var P=this.expirationTime;if(g.cacheControl){var V=he(g.cacheControl);V["max-age"]&&(this.expirationTime=Date.now()+V["max-age"]*1e3)}else g.expires&&(this.expirationTime=new Date(g.expires).getTime());if(this.expirationTime){var J=Date.now(),ae=!1;if(this.expirationTime>J)ae=!1;else if(!P)ae=!0;else if(this.expirationTime<P)ae=!0;else{var ve=this.expirationTime-P;ve?this.expirationTime=J+Math.max(ve,_et):ae=!0}ae?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},Yh.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)},Yh.prototype.setFeatureState=function(g,P){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(g).length===0)){var V=this.latestFeatureIndex.loadVTLayers();for(var J in this.buckets)if(P.style.hasLayer(J)){var ae=this.buckets[J],ve=ae.layers[0].sourceLayer||"_geojsonTileLayer",Ge=V[ve],yt=g[ve];if(!(!Ge||!yt||Object.keys(yt).length===0)){ae.update(yt,Ge,this.imageAtlas&&this.imageAtlas.patternPositions||{});var kt=P&&P.style&&P.style.getLayer(J);kt&&(this.queryPadding=Math.max(this.queryPadding,kt.queryRadius(ae)))}}}},Yh.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},Yh.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<et.now()},Yh.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Yh.prototype.setHoldDuration=function(g){this.symbolFadeHoldUntil=et.now()+g},Yh.prototype.setDependencies=function(g,P){for(var V={},J=0,ae=P;J<ae.length;J+=1){var ve=ae[J];V[ve]=!0}this.dependencies[g]=V},Yh.prototype.hasDependency=function(g,P){for(var V=0,J=g;V<J.length;V+=1){var ae=J[V],ve=this.dependencies[ae];if(ve)for(var Ge=0,yt=P;Ge<yt.length;Ge+=1){var kt=yt[Ge];if(ve[kt])return!0}}return!1};var xet=["type","source","source-layer","minzoom","maxzoom","filter","layout"],R1=c.performance,ree=function(g){this._marks={start:[g.url,"start"].join("#"),end:[g.url,"end"].join("#"),measure:g.url.toString()},R1.mark(this._marks.start)};ree.prototype.finish=function(){R1.mark(this._marks.end);var g=R1.getEntriesByName(this._marks.measure);return g.length===0&&(R1.measure(this._marks.measure,this._marks.start,this._marks.end),g=R1.getEntriesByName(this._marks.measure),R1.clearMarks(this._marks.start),R1.clearMarks(this._marks.end),R1.clearMeasures(this._marks.measure)),g},i.Actor=Kw,i.AlphaImage=zp,i.CanonicalTileID=nb,i.CollisionBoxArray=rf,i.Color=Bn,i.DEMData=dg,i.DataConstantProperty=Gt,i.DictionaryCoder=ZC,i.EXTENT=eo,i.ErrorEvent=zi,i.EvaluationParameters=qo,i.Event=Vi,i.Evented=Mi,i.FeatureIndex=pg,i.FillBucket=yv,i.FillExtrusionBucket=Hv,i.ImageAtlas=yy,i.ImagePosition=uh,i.LineBucket=yh,i.LngLat=Ic,i.LngLatBounds=mh,i.MercatorCoordinate=ib,i.ONE_EM=Va,i.OverscaledTileID=gh,i.Point=l,i.Point$1=l,i.Properties=fa,i.Protobuf=Zl,i.RGBAImage=kh,i.RequestManager=Te,i.RequestPerformance=ree,i.ResourceType=ci,i.SegmentVector=Ou,i.SourceFeatureState=Jw,i.StructArrayLayout1ui2=Ru,i.StructArrayLayout2f1f2i16=tl,i.StructArrayLayout2i4=La,i.StructArrayLayout3ui6=zl,i.StructArrayLayout4i8=Es,i.SymbolBucket=Jf,i.Texture=rb,i.Tile=Yh,i.Transitionable=xu,i.Uniform1f=Qt,i.Uniform1i=It,i.Uniform2f=ar,i.Uniform3f=mr,i.Uniform4f=Pr,i.UniformColor=Dr,i.UniformMatrix4f=Gr,i.UnwrappedTileID=QQ,i.ValidationError=an,i.WritingMode=cp,i.ZoomHistory=Nt,i.add=Lp,i.addDynamicAttributes=vB,i.asyncAll=E,i.bezier=x,i.bindAll=q,i.browser=et,i.cacheEntryPossiblyAdded=si,i.clamp=y,i.clearTileCache=Si,i.clipLine=FQ,i.clone=T1,i.clone$1=G,i.clone$2=Mw,i.collisionCircleLayout=Ht,i.config=gt,i.create=w1,i.create$1=jh,i.create$2=hy,i.createCommonjsModule=a,i.createExpression=_s,i.createLayout=qs,i.createStyleLayer=cet,i.cross=U8,i.deepEqual=h,i.dot=N8,i.dot$1=j8,i.ease=b,i.emitValidationErrors=Ku,i.endsWith=U,i.enforceCacheSizeLimit=Ei,i.evaluateSizeForFeature=CQ,i.evaluateSizeForZoom=LQ,i.evaluateVariableOffset=OQ,i.evented=wl,i.extend=_,i.featureFilter=Ae,i.filterObject=j,i.fromRotation=rm,i.getAnchorAlignment=wM,i.getAnchorJustification=pB,i.getArrayBuffer=zr,i.getImage=Ur,i.getJSON=br,i.getRTLTextPluginStatus=au,i.getReferrer=Lt,i.getVideo=ti,i.identity=og,i.invert=im,i.isChar=mt,i.isMapboxURL=nt,i.keysDifference=L,i.makeRequest=sr,i.mapObject=H,i.mercatorXfromLng=KQ,i.mercatorYfromLat=JQ,i.mercatorZfromAltitude=$Q,i.mul=Ox,i.multiply=nm,i.mvt=vy,i.nextPowerOfTwo=T,i.normalize=Nx,i.number=$a,i.offscreenCanvasSupported=Jr,i.ortho=Zf,i.parseGlyphPBF=v0,i.pbf=Zl,i.performSymbolLayout=GQe,i.perspective=A1,i.pick=C,i.plugin=qu,i.polygonIntersectsPolygon=du,i.postMapLoadEvent=Pe,i.postTurnstileEvent=_e,i.potpack=Qp,i.refProperties=xet,i.register=X,i.registerForPluginStateChange=Al,i.renderColorRamp=Hx,i.rotate=ag,i.rotateX=Ed,i.rotateZ=sg,i.scale=Ff,i.scale$1=W8,i.scale$2=Ew,i.setCacheLimits=xi,i.setRTLTextPlugin=nu,i.sphericalToCartesian=ze,i.sqrLen=rM,i.styleSpec=Ri,i.sub=H8,i.symbolSize=RQe,i.transformMat3=V8,i.transformMat4=lg,i.translate=yc,i.triggerPluginCompletionEvent=Ms,i.uniqueId=v,i.validateCustomStyleLayer=set,i.validateLight=Kl,i.validateStyle=Jl,i.values=A,i.vectorTile=vy,i.version=o,i.warnOnce=re,i.webpSupported=Pt,i.window=c,i.wrap=k}),n(["./shared"],function(i){"use strict";function a(Lt){var vt=typeof Lt;if(vt==="number"||vt==="boolean"||vt==="string"||Lt===void 0||Lt===null)return JSON.stringify(Lt);if(Array.isArray(Lt)){for(var Dt="[",Bt=0,sr=Lt;Bt<sr.length;Bt+=1){var br=sr[Bt];Dt+=a(br)+","}return Dt+"]"}for(var zr=Object.keys(Lt).sort(),Tr="{",Rr=0;Rr<zr.length;Rr++)Tr+=JSON.stringify(zr[Rr])+":"+a(Lt[zr[Rr]])+",";return Tr+"}"}function o(Lt){for(var vt="",Dt=0,Bt=i.refProperties;Dt<Bt.length;Dt+=1){var sr=Bt[Dt];vt+="/"+a(Lt[sr])}return vt}function s(Lt,vt){for(var Dt={},Bt=0;Bt<Lt.length;Bt++){var sr=vt&&vt[Lt[Bt].id]||o(Lt[Bt]);vt&&(vt[Lt[Bt].id]=sr);var br=Dt[sr];br||(br=Dt[sr]=[]),br.push(Lt[Bt])}var zr=[];for(var Tr in Dt)zr.push(Dt[Tr]);return zr}var u=function(vt){this.keyCache={},vt&&this.replace(vt)};u.prototype.replace=function(vt){this._layerConfigs={},this._layers={},this.update(vt,[])},u.prototype.update=function(vt,Dt){for(var Bt=this,sr=0,br=vt;sr<br.length;sr+=1){var zr=br[sr];this._layerConfigs[zr.id]=zr;var Tr=this._layers[zr.id]=i.createStyleLayer(zr);Tr._featureFilter=i.featureFilter(Tr.filter),this.keyCache[zr.id]&&delete this.keyCache[zr.id]}for(var Rr=0,Br=Dt;Rr<Br.length;Rr+=1){var oi=Br[Rr];delete this.keyCache[oi],delete this._layerConfigs[oi],delete this._layers[oi]}this.familiesBySource={};for(var vi=s(i.values(this._layerConfigs),this.keyCache),Pi=0,Yr=vi;Pi<Yr.length;Pi+=1){var Ni=Yr[Pi],Ur=Ni.map(function(Mi){return Bt._layers[Mi.id]}),ti=Ur[0];if(ti.visibility!=="none"){var ki=ti.source||"",ji=this.familiesBySource[ki];ji||(ji=this.familiesBySource[ki]={});var Vi=ti.sourceLayer||"_geojsonTileLayer",zi=ji[Vi];zi||(zi=ji[Vi]=[]),zi.push(Ur)}}};var l=1,f=function(vt){var Dt={},Bt=[];for(var sr in vt){var br=vt[sr],zr=Dt[sr]={};for(var Tr in br){var Rr=br[+Tr];if(!(!Rr||Rr.bitmap.width===0||Rr.bitmap.height===0)){var Br={x:0,y:0,w:Rr.bitmap.width+2*l,h:Rr.bitmap.height+2*l};Bt.push(Br),zr[Tr]={rect:Br,metrics:Rr.metrics}}}}var oi=i.potpack(Bt),vi=oi.w,Pi=oi.h,Yr=new i.AlphaImage({width:vi||1,height:Pi||1});for(var Ni in vt){var Ur=vt[Ni];for(var ti in Ur){var ki=Ur[+ti];if(!(!ki||ki.bitmap.width===0||ki.bitmap.height===0)){var ji=Dt[Ni][ti].rect;i.AlphaImage.copy(ki.bitmap,Yr,{x:0,y:0},{x:ji.x+l,y:ji.y+l},ki.bitmap)}}}this.image=Yr,this.positions=Dt};i.register("GlyphAtlas",f);var c=function(vt){this.tileID=new i.OverscaledTileID(vt.tileID.overscaledZ,vt.tileID.wrap,vt.tileID.canonical.z,vt.tileID.canonical.x,vt.tileID.canonical.y),this.uid=vt.uid,this.zoom=vt.zoom,this.pixelRatio=vt.pixelRatio,this.tileSize=vt.tileSize,this.source=vt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=vt.showCollisionBoxes,this.collectResourceTiming=!!vt.collectResourceTiming,this.returnDependencies=!!vt.returnDependencies,this.promoteId=vt.promoteId};c.prototype.parse=function(vt,Dt,Bt,sr,br){var zr=this;this.status="parsing",this.data=vt,this.collisionBoxArray=new i.CollisionBoxArray;var Tr=new i.DictionaryCoder(Object.keys(vt.layers).sort()),Rr=new i.FeatureIndex(this.tileID,this.promoteId);Rr.bucketLayerIDs=[];var Br={},oi={featureIndex:Rr,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Bt},vi=Dt.familiesBySource[this.source];for(var Pi in vi){var Yr=vt.layers[Pi];if(Yr){Yr.version===1&&i.warnOnce('Vector tile source "'+this.source+'" layer "'+Pi+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var Ni=Tr.encode(Pi),Ur=[],ti=0;ti<Yr.length;ti++){var ki=Yr.feature(ti),ji=Rr.getId(ki,Pi);Ur.push({feature:ki,id:ji,index:ti,sourceLayerIndex:Ni})}for(var Vi=0,zi=vi[Pi];Vi<zi.length;Vi+=1){var Mi=zi[Vi],sn=Mi[0];if(!(sn.minzoom&&this.zoom<Math.floor(sn.minzoom))&&!(sn.maxzoom&&this.zoom>=sn.maxzoom)&&sn.visibility!=="none"){h(Mi,this.zoom,Bt);var fi=Br[sn.id]=sn.createBucket({index:Rr.bucketLayerIDs.length,layers:Mi,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ni,sourceID:this.source});fi.populate(Ur,oi,this.tileID.canonical),Rr.bucketLayerIDs.push(Mi.map(function(Qr){return Qr.id}))}}}}var Or,st,Wt,tr,or=i.mapObject(oi.glyphDependencies,function(Qr){return Object.keys(Qr).map(Number)});Object.keys(or).length?sr.send("getGlyphs",{uid:this.uid,stacks:or},function(Qr,Ui){Or||(Or=Qr,st=Ui,Gi.call(zr))}):st={};var Nr=Object.keys(oi.iconDependencies);Nr.length?sr.send("getImages",{icons:Nr,source:this.source,tileID:this.tileID,type:"icons"},function(Qr,Ui){Or||(Or=Qr,Wt=Ui,Gi.call(zr))}):Wt={};var hi=Object.keys(oi.patternDependencies);hi.length?sr.send("getImages",{icons:hi,source:this.source,tileID:this.tileID,type:"patterns"},function(Qr,Ui){Or||(Or=Qr,tr=Ui,Gi.call(zr))}):tr={},Gi.call(this);function Gi(){if(Or)return br(Or);if(st&&Wt&&tr){var Qr=new f(st),Ui=new i.ImageAtlas(Wt,tr);for(var zn in Br){var fn=Br[zn];fn instanceof i.SymbolBucket?(h(fn.layers,this.zoom,Bt),i.performSymbolLayout(fn,st,Qr.positions,Wt,Ui.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):fn.hasPattern&&(fn instanceof i.LineBucket||fn instanceof i.FillBucket||fn instanceof i.FillExtrusionBucket)&&(h(fn.layers,this.zoom,Bt),fn.addFeatures(oi,this.tileID.canonical,Ui.patternPositions))}this.status="done",br(null,{buckets:i.values(Br).filter(function(xn){return!xn.isEmpty()}),featureIndex:Rr,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Qr.image,imageAtlas:Ui,glyphMap:this.returnDependencies?st:null,iconMap:this.returnDependencies?Wt:null,glyphPositions:this.returnDependencies?Qr.positions:null})}}};function h(Lt,vt,Dt){for(var Bt=new i.EvaluationParameters(vt),sr=0,br=Lt;sr<br.length;sr+=1){var zr=br[sr];zr.recalculate(Bt,Dt)}}function d(Lt,vt){var Dt=i.getArrayBuffer(Lt.request,function(Bt,sr,br,zr){Bt?vt(Bt):sr&&vt(null,{vectorTile:new i.vectorTile.VectorTile(new i.pbf(sr)),rawData:sr,cacheControl:br,expires:zr})});return function(){Dt.cancel(),vt()}}var p=function(vt,Dt,Bt,sr){this.actor=vt,this.layerIndex=Dt,this.availableImages=Bt,this.loadVectorData=sr||d,this.loading={},this.loaded={}};p.prototype.loadTile=function(vt,Dt){var Bt=this,sr=vt.uid;this.loading||(this.loading={});var br=vt&&vt.request&&vt.request.collectResourceTiming?new i.RequestPerformance(vt.request):!1,zr=this.loading[sr]=new c(vt);zr.abort=this.loadVectorData(vt,function(Tr,Rr){if(delete Bt.loading[sr],Tr||!Rr)return zr.status="done",Bt.loaded[sr]=zr,Dt(Tr);var Br=Rr.rawData,oi={};Rr.expires&&(oi.expires=Rr.expires),Rr.cacheControl&&(oi.cacheControl=Rr.cacheControl);var vi={};if(br){var Pi=br.finish();Pi&&(vi.resourceTiming=JSON.parse(JSON.stringify(Pi)))}zr.vectorTile=Rr.vectorTile,zr.parse(Rr.vectorTile,Bt.layerIndex,Bt.availableImages,Bt.actor,function(Yr,Ni){if(Yr||!Ni)return Dt(Yr);Dt(null,i.extend({rawTileData:Br.slice(0)},Ni,oi,vi))}),Bt.loaded=Bt.loaded||{},Bt.loaded[sr]=zr})},p.prototype.reloadTile=function(vt,Dt){var Bt=this,sr=this.loaded,br=vt.uid,zr=this;if(sr&&sr[br]){var Tr=sr[br];Tr.showCollisionBoxes=vt.showCollisionBoxes;var Rr=function(Br,oi){var vi=Tr.reloadCallback;vi&&(delete Tr.reloadCallback,Tr.parse(Tr.vectorTile,zr.layerIndex,Bt.availableImages,zr.actor,vi)),Dt(Br,oi)};Tr.status==="parsing"?Tr.reloadCallback=Rr:Tr.status==="done"&&(Tr.vectorTile?Tr.parse(Tr.vectorTile,this.layerIndex,this.availableImages,this.actor,Rr):Rr())}},p.prototype.abortTile=function(vt,Dt){var Bt=this.loading,sr=vt.uid;Bt&&Bt[sr]&&Bt[sr].abort&&(Bt[sr].abort(),delete Bt[sr]),Dt()},p.prototype.removeTile=function(vt,Dt){var Bt=this.loaded,sr=vt.uid;Bt&&Bt[sr]&&delete Bt[sr],Dt()};var x=i.window.ImageBitmap,b=function(){this.loaded={}};b.prototype.loadTile=function(vt,Dt){var Bt=vt.uid,sr=vt.encoding,br=vt.rawImageData,zr=x&&br instanceof x?this.getImageData(br):br,Tr=new i.DEMData(Bt,zr,sr);this.loaded=this.loaded||{},this.loaded[Bt]=Tr,Dt(null,Tr)},b.prototype.getImageData=function(vt){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(vt.width,vt.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=vt.width,this.offscreenCanvas.height=vt.height,this.offscreenCanvasContext.drawImage(vt,0,0,vt.width,vt.height);var Dt=this.offscreenCanvasContext.getImageData(-1,-1,vt.width+2,vt.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new i.RGBAImage({width:Dt.width,height:Dt.height},Dt.data)},b.prototype.removeTile=function(vt){var Dt=this.loaded,Bt=vt.uid;Dt&&Dt[Bt]&&delete Dt[Bt]};var y=k;function k(Lt,vt){var Dt=Lt&&Lt.type,Bt;if(Dt==="FeatureCollection")for(Bt=0;Bt<Lt.features.length;Bt++)k(Lt.features[Bt],vt);else if(Dt==="GeometryCollection")for(Bt=0;Bt<Lt.geometries.length;Bt++)k(Lt.geometries[Bt],vt);else if(Dt==="Feature")k(Lt.geometry,vt);else if(Dt==="Polygon")E(Lt.coordinates,vt);else if(Dt==="MultiPolygon")for(Bt=0;Bt<Lt.coordinates.length;Bt++)E(Lt.coordinates[Bt],vt);return Lt}function E(Lt,vt){if(Lt.length!==0){A(Lt[0],vt);for(var Dt=1;Dt<Lt.length;Dt++)A(Lt[Dt],!vt)}}function A(Lt,vt){for(var Dt=0,Bt=0,sr=Lt.length,br=sr-1;Bt<sr;br=Bt++)Dt+=(Lt[Bt][0]-Lt[br][0])*(Lt[br][1]+Lt[Bt][1]);Dt>=0!=!!vt&&Lt.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,_=function(vt){this._feature=vt,this.extent=i.EXTENT,this.type=vt.type,this.properties=vt.tags,"id"in vt&&!isNaN(vt.id)&&(this.id=parseInt(vt.id,10))};_.prototype.loadGeometry=function(){if(this._feature.type===1){for(var vt=[],Dt=0,Bt=this._feature.geometry;Dt<Bt.length;Dt+=1){var sr=Bt[Dt];vt.push([new i.Point$1(sr[0],sr[1])])}return vt}else{for(var br=[],zr=0,Tr=this._feature.geometry;zr<Tr.length;zr+=1){for(var Rr=Tr[zr],Br=[],oi=0,vi=Rr;oi<vi.length;oi+=1){var Pi=vi[oi];Br.push(new i.Point$1(Pi[0],Pi[1]))}br.push(Br)}return br}},_.prototype.toGeoJSON=function(vt,Dt,Bt){return L.call(this,vt,Dt,Bt)};var C=function(vt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=i.EXTENT,this.length=vt.length,this._features=vt};C.prototype.feature=function(vt){return new _(this._features[vt])};var M=i.vectorTile.VectorTileFeature,v=z;function z(Lt,vt){this.options=vt||{},this.features=Lt,this.length=Lt.length}z.prototype.feature=function(Lt){return new T(this.features[Lt],this.options.extent)};function T(Lt,vt){this.id=typeof Lt.id=="number"?Lt.id:void 0,this.type=Lt.type,this.rawGeometry=Lt.type===1?[Lt.geometry]:Lt.geometry,this.properties=Lt.tags,this.extent=vt||4096}T.prototype.loadGeometry=function(){var Lt=this.rawGeometry;this.geometry=[];for(var vt=0;vt<Lt.length;vt++){for(var Dt=Lt[vt],Bt=[],sr=0;sr<Dt.length;sr++)Bt.push(new i.Point$1(Dt[sr][0],Dt[sr][1]));this.geometry.push(Bt)}return this.geometry},T.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Lt=this.geometry,vt=1/0,Dt=-1/0,Bt=1/0,sr=-1/0,br=0;br<Lt.length;br++)for(var zr=Lt[br],Tr=0;Tr<zr.length;Tr++){var Rr=zr[Tr];vt=Math.min(vt,Rr.x),Dt=Math.max(Dt,Rr.x),Bt=Math.min(Bt,Rr.y),sr=Math.max(sr,Rr.y)}return[vt,Bt,Dt,sr]},T.prototype.toGeoJSON=M.prototype.toGeoJSON;var F=j,q=j,U=G,H=v;function j(Lt){var vt=new i.pbf;return O(Lt,vt),vt.finish()}function G(Lt,vt){vt=vt||{};var Dt={};for(var Bt in Lt)Dt[Bt]=new v(Lt[Bt].features,vt),Dt[Bt].name=Bt,Dt[Bt].version=vt.version,Dt[Bt].extent=vt.extent;return j({layers:Dt})}function O(Lt,vt){for(var Dt in Lt.layers)vt.writeMessage(3,W,Lt.layers[Dt])}function W(Lt,vt){vt.writeVarintField(15,Lt.version||1),vt.writeStringField(1,Lt.name||""),vt.writeVarintField(5,Lt.extent||4096);var Dt,Bt={keys:[],values:[],keycache:{},valuecache:{}};for(Dt=0;Dt<Lt.length;Dt++)Bt.feature=Lt.feature(Dt),vt.writeMessage(2,re,Bt);var sr=Bt.keys;for(Dt=0;Dt<sr.length;Dt++)vt.writeStringField(3,sr[Dt]);var br=Bt.values;for(Dt=0;Dt<br.length;Dt++)vt.writeMessage(4,he,br[Dt])}function re(Lt,vt){var Dt=Lt.feature;Dt.id!==void 0&&vt.writeVarintField(1,Dt.id),vt.writeMessage(2,ne,Lt),vt.writeVarintField(3,Dt.type),vt.writeMessage(4,Ce,Dt)}function ne(Lt,vt){var Dt=Lt.feature,Bt=Lt.keys,sr=Lt.values,br=Lt.keycache,zr=Lt.valuecache;for(var Tr in Dt.properties){var Rr=br[Tr];typeof Rr=="undefined"&&(Bt.push(Tr),Rr=Bt.length-1,br[Tr]=Rr),vt.writeVarint(Rr);var Br=Dt.properties[Tr],oi=typeof Br;oi!=="string"&&oi!=="boolean"&&oi!=="number"&&(Br=JSON.stringify(Br));var vi=oi+":"+Br,Pi=zr[vi];typeof Pi=="undefined"&&(sr.push(Br),Pi=sr.length-1,zr[vi]=Pi),vt.writeVarint(Pi)}}function be(Lt,vt){return(vt<<3)+(Lt&7)}function ze(Lt){return Lt<<1^Lt>>31}function Ce(Lt,vt){for(var Dt=Lt.loadGeometry(),Bt=Lt.type,sr=0,br=0,zr=Dt.length,Tr=0;Tr<zr;Tr++){var Rr=Dt[Tr],Br=1;Bt===1&&(Br=Rr.length),vt.writeVarint(be(1,Br));for(var oi=Bt===3?Rr.length-1:Rr.length,vi=0;vi<oi;vi++){vi===1&&Bt!==1&&vt.writeVarint(be(2,oi-1));var Pi=Rr[vi].x-sr,Yr=Rr[vi].y-br;vt.writeVarint(ze(Pi)),vt.writeVarint(ze(Yr)),sr+=Pi,br+=Yr}Bt===3&&vt.writeVarint(be(7,1))}}function he(Lt,vt){var Dt=typeof Lt;Dt==="string"?vt.writeStringField(1,Lt):Dt==="boolean"?vt.writeBooleanField(7,Lt):Dt==="number"&&(Lt%1!==0?vt.writeDoubleField(3,Lt):Lt<0?vt.writeSVarintField(6,Lt):vt.writeVarintField(5,Lt))}F.fromVectorTileJs=q,F.fromGeojsonVt=U,F.GeoJSONWrapper=H;function te(Lt,vt,Dt,Bt,sr,br){if(!(sr-Bt<=Dt)){var zr=Bt+sr>>1;ke(Lt,vt,zr,Bt,sr,br%2),te(Lt,vt,Dt,Bt,zr-1,br+1),te(Lt,vt,Dt,zr+1,sr,br+1)}}function ke(Lt,vt,Dt,Bt,sr,br){for(;sr>Bt;){if(sr-Bt>600){var zr=sr-Bt+1,Tr=Dt-Bt+1,Rr=Math.log(zr),Br=.5*Math.exp(2*Rr/3),oi=.5*Math.sqrt(Rr*Br*(zr-Br)/zr)*(Tr-zr/2<0?-1:1),vi=Math.max(Bt,Math.floor(Dt-Tr*Br/zr+oi)),Pi=Math.min(sr,Math.floor(Dt+(zr-Tr)*Br/zr+oi));ke(Lt,vt,Dt,vi,Pi,br)}var Yr=vt[2*Dt+br],Ni=Bt,Ur=sr;for(Ee(Lt,vt,Bt,Dt),vt[2*sr+br]>Yr&&Ee(Lt,vt,Bt,sr);Ni<Ur;){for(Ee(Lt,vt,Ni,Ur),Ni++,Ur--;vt[2*Ni+br]<Yr;)Ni++;for(;vt[2*Ur+br]>Yr;)Ur--}vt[2*Bt+br]===Yr?Ee(Lt,vt,Bt,Ur):(Ur++,Ee(Lt,vt,Ur,sr)),Ur<=Dt&&(Bt=Ur+1),Dt<=Ur&&(sr=Ur-1)}}function Ee(Lt,vt,Dt,Bt){Me(Lt,Dt,Bt),Me(vt,2*Dt,2*Bt),Me(vt,2*Dt+1,2*Bt+1)}function Me(Lt,vt,Dt){var Bt=Lt[vt];Lt[vt]=Lt[Dt],Lt[Dt]=Bt}function Oe(Lt,vt,Dt,Bt,sr,br,zr){for(var Tr=[0,Lt.length-1,0],Rr=[],Br,oi;Tr.length;){var vi=Tr.pop(),Pi=Tr.pop(),Yr=Tr.pop();if(Pi-Yr<=zr){for(var Ni=Yr;Ni<=Pi;Ni++)Br=vt[2*Ni],oi=vt[2*Ni+1],Br>=Dt&&Br<=sr&&oi>=Bt&&oi<=br&&Rr.push(Lt[Ni]);continue}var Ur=Math.floor((Yr+Pi)/2);Br=vt[2*Ur],oi=vt[2*Ur+1],Br>=Dt&&Br<=sr&&oi>=Bt&&oi<=br&&Rr.push(Lt[Ur]);var ti=(vi+1)%2;(vi===0?Dt<=Br:Bt<=oi)&&(Tr.push(Yr),Tr.push(Ur-1),Tr.push(ti)),(vi===0?sr>=Br:br>=oi)&&(Tr.push(Ur+1),Tr.push(Pi),Tr.push(ti))}return Rr}function Re(Lt,vt,Dt,Bt,sr,br){for(var zr=[0,Lt.length-1,0],Tr=[],Rr=sr*sr;zr.length;){var Br=zr.pop(),oi=zr.pop(),vi=zr.pop();if(oi-vi<=br){for(var Pi=vi;Pi<=oi;Pi++)me(vt[2*Pi],vt[2*Pi+1],Dt,Bt)<=Rr&&Tr.push(Lt[Pi]);continue}var Yr=Math.floor((vi+oi)/2),Ni=vt[2*Yr],Ur=vt[2*Yr+1];me(Ni,Ur,Dt,Bt)<=Rr&&Tr.push(Lt[Yr]);var ti=(Br+1)%2;(Br===0?Dt-sr<=Ni:Bt-sr<=Ur)&&(zr.push(vi),zr.push(Yr-1),zr.push(ti)),(Br===0?Dt+sr>=Ni:Bt+sr>=Ur)&&(zr.push(Yr+1),zr.push(oi),zr.push(ti))}return Tr}function me(Lt,vt,Dt,Bt){var sr=Lt-Dt,br=vt-Bt;return sr*sr+br*br}var Be=function(Lt){return Lt[0]},fe=function(Lt){return Lt[1]},Ze=function(vt,Dt,Bt,sr,br){Dt===void 0&&(Dt=Be),Bt===void 0&&(Bt=fe),sr===void 0&&(sr=64),br===void 0&&(br=Float64Array),this.nodeSize=sr,this.points=vt;for(var zr=vt.length<65536?Uint16Array:Uint32Array,Tr=this.ids=new zr(vt.length),Rr=this.coords=new br(vt.length*2),Br=0;Br<vt.length;Br++)Tr[Br]=Br,Rr[2*Br]=Dt(vt[Br]),Rr[2*Br+1]=Bt(vt[Br]);te(Tr,Rr,sr,0,Tr.length-1,0)};Ze.prototype.range=function(vt,Dt,Bt,sr){return Oe(this.ids,this.coords,vt,Dt,Bt,sr,this.nodeSize)},Ze.prototype.within=function(vt,Dt,Bt){return Re(this.ids,this.coords,vt,Dt,Bt,this.nodeSize)};var et={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Lt){return Lt}},gt=function(vt){this.options=At(Object.create(et),vt),this.trees=new Array(this.options.maxZoom+1)};gt.prototype.load=function(vt){var Dt=this.options,Bt=Dt.log,sr=Dt.minZoom,br=Dt.maxZoom,zr=Dt.nodeSize;Bt&&console.time("total time");var Tr="prepare "+vt.length+" points";Bt&&console.time(Tr),this.points=vt;for(var Rr=[],Br=0;Br<vt.length;Br++)vt[Br].geometry&&Rr.push(Qe(vt[Br],Br));this.trees[br+1]=new Ze(Rr,Te,nt,zr,Float32Array),Bt&&console.timeEnd(Tr);for(var oi=br;oi>=sr;oi--){var vi=+Date.now();Rr=this._cluster(Rr,oi),this.trees[oi]=new Ze(Rr,Te,nt,zr,Float32Array),Bt&&console.log("z%d: %d clusters in %dms",oi,Rr.length,+Date.now()-vi)}return Bt&&console.timeEnd("total time"),this},gt.prototype.getClusters=function(vt,Dt){var Bt=((vt[0]+180)%360+360)%360-180,sr=Math.max(-90,Math.min(90,vt[1])),br=vt[2]===180?180:((vt[2]+180)%360+360)%360-180,zr=Math.max(-90,Math.min(90,vt[3]));if(vt[2]-vt[0]>=360)Bt=-180,br=180;else if(Bt>br){var Tr=this.getClusters([Bt,sr,180,zr],Dt),Rr=this.getClusters([-180,sr,br,zr],Dt);return Tr.concat(Rr)}for(var Br=this.trees[this._limitZoom(Dt)],oi=Br.range(xt(Bt),_t(zr),xt(br),_t(sr)),vi=[],Pi=0,Yr=oi;Pi<Yr.length;Pi+=1){var Ni=Yr[Pi],Ur=Br.points[Ni];vi.push(Ur.numPoints?Xe(Ur):this.points[Ur.index])}return vi},gt.prototype.getChildren=function(vt){var Dt=this._getOriginId(vt),Bt=this._getOriginZoom(vt),sr="No cluster with the specified id.",br=this.trees[Bt];if(!br)throw new Error(sr);var zr=br.points[Dt];if(!zr)throw new Error(sr);for(var Tr=this.options.radius/(this.options.extent*Math.pow(2,Bt-1)),Rr=br.within(zr.x,zr.y,Tr),Br=[],oi=0,vi=Rr;oi<vi.length;oi+=1){var Pi=vi[oi],Yr=br.points[Pi];Yr.parentId===vt&&Br.push(Yr.numPoints?Xe(Yr):this.points[Yr.index])}if(Br.length===0)throw new Error(sr);return Br},gt.prototype.getLeaves=function(vt,Dt,Bt){Dt=Dt||10,Bt=Bt||0;var sr=[];return this._appendLeaves(sr,vt,Dt,Bt,0),sr},gt.prototype.getTile=function(vt,Dt,Bt){var sr=this.trees[this._limitZoom(vt)],br=Math.pow(2,vt),zr=this.options,Tr=zr.extent,Rr=zr.radius,Br=Rr/Tr,oi=(Bt-Br)/br,vi=(Bt+1+Br)/br,Pi={features:[]};return this._addTileFeatures(sr.range((Dt-Br)/br,oi,(Dt+1+Br)/br,vi),sr.points,Dt,Bt,br,Pi),Dt===0&&this._addTileFeatures(sr.range(1-Br/br,oi,1,vi),sr.points,br,Bt,br,Pi),Dt===br-1&&this._addTileFeatures(sr.range(0,oi,Br/br,vi),sr.points,-1,Bt,br,Pi),Pi.features.length?Pi:null},gt.prototype.getClusterExpansionZoom=function(vt){for(var Dt=this._getOriginZoom(vt)-1;Dt<=this.options.maxZoom;){var Bt=this.getChildren(vt);if(Dt++,Bt.length!==1)break;vt=Bt[0].properties.cluster_id}return Dt},gt.prototype._appendLeaves=function(vt,Dt,Bt,sr,br){for(var zr=this.getChildren(Dt),Tr=0,Rr=zr;Tr<Rr.length;Tr+=1){var Br=Rr[Tr],oi=Br.properties;if(oi&&oi.cluster?br+oi.point_count<=sr?br+=oi.point_count:br=this._appendLeaves(vt,oi.cluster_id,Bt,sr,br):br<sr?br++:vt.push(Br),vt.length===Bt)break}return br},gt.prototype._addTileFeatures=function(vt,Dt,Bt,sr,br,zr){for(var Tr=0,Rr=vt;Tr<Rr.length;Tr+=1){var Br=Rr[Tr],oi=Dt[Br],vi=oi.numPoints,Pi={type:1,geometry:[[Math.round(this.options.extent*(oi.x*br-Bt)),Math.round(this.options.extent*(oi.y*br-sr))]],tags:vi?Tt(oi):this.points[oi.index].properties},Yr=void 0;vi?Yr=oi.id:this.options.generateId?Yr=oi.index:this.points[oi.index].id&&(Yr=this.points[oi.index].id),Yr!==void 0&&(Pi.id=Yr),zr.features.push(Pi)}},gt.prototype._limitZoom=function(vt){return Math.max(this.options.minZoom,Math.min(+vt,this.options.maxZoom+1))},gt.prototype._cluster=function(vt,Dt){for(var Bt=[],sr=this.options,br=sr.radius,zr=sr.extent,Tr=sr.reduce,Rr=sr.minPoints,Br=br/(zr*Math.pow(2,Dt)),oi=0;oi<vt.length;oi++){var vi=vt[oi];if(!(vi.zoom<=Dt)){vi.zoom=Dt;for(var Pi=this.trees[Dt+1],Yr=Pi.within(vi.x,vi.y,Br),Ni=vi.numPoints||1,Ur=Ni,ti=0,ki=Yr;ti<ki.length;ti+=1){var ji=ki[ti],Vi=Pi.points[ji];Vi.zoom>Dt&&(Ur+=Vi.numPoints||1)}if(Ur>=Rr){for(var zi=vi.x*Ni,Mi=vi.y*Ni,sn=Tr&&Ni>1?this._map(vi,!0):null,fi=(oi<<5)+(Dt+1)+this.points.length,Or=0,st=Yr;Or<st.length;Or+=1){var Wt=st[Or],tr=Pi.points[Wt];if(!(tr.zoom<=Dt)){tr.zoom=Dt;var or=tr.numPoints||1;zi+=tr.x*or,Mi+=tr.y*or,tr.parentId=fi,Tr&&(sn||(sn=this._map(vi,!0)),Tr(sn,this._map(tr)))}}vi.parentId=fi,Bt.push(Pt(zi/Ur,Mi/Ur,fi,Ur,sn))}else if(Bt.push(vi),Ur>1)for(var Nr=0,hi=Yr;Nr<hi.length;Nr+=1){var Gi=hi[Nr],Qr=Pi.points[Gi];Qr.zoom<=Dt||(Qr.zoom=Dt,Bt.push(Qr))}}}return Bt},gt.prototype._getOriginId=function(vt){return vt-this.points.length>>5},gt.prototype._getOriginZoom=function(vt){return(vt-this.points.length)%32},gt.prototype._map=function(vt,Dt){if(vt.numPoints)return Dt?At({},vt.properties):vt.properties;var Bt=this.points[vt.index].properties,sr=this.options.map(Bt);return Dt&&sr===Bt?At({},sr):sr};function Pt(Lt,vt,Dt,Bt,sr){return{x:Lt,y:vt,zoom:1/0,id:Dt,parentId:-1,numPoints:Bt,properties:sr}}function Qe(Lt,vt){var Dt=Lt.geometry.coordinates,Bt=Dt[0],sr=Dt[1];return{x:xt(Bt),y:_t(sr),zoom:1/0,index:vt,parentId:-1}}function Xe(Lt){return{type:"Feature",id:Lt.id,properties:Tt(Lt),geometry:{type:"Point",coordinates:[Ct(Lt.x),jt(Lt.y)]}}}function Tt(Lt){var vt=Lt.numPoints,Dt=vt>=1e4?Math.round(vt/1e3)+"k":vt>=1e3?Math.round(vt/100)/10+"k":vt;return At(At({},Lt.properties),{cluster:!0,cluster_id:Lt.id,point_count:vt,point_count_abbreviated:Dt})}function xt(Lt){return Lt/360+.5}function _t(Lt){var vt=Math.sin(Lt*Math.PI/180),Dt=.5-.25*Math.log((1+vt)/(1-vt))/Math.PI;return Dt<0?0:Dt>1?1:Dt}function Ct(Lt){return(Lt-.5)*360}function jt(Lt){var vt=(180-Lt*360)*Math.PI/180;return 360*Math.atan(Math.exp(vt))/Math.PI-90}function At(Lt,vt){for(var Dt in vt)Lt[Dt]=vt[Dt];return Lt}function Te(Lt){return Lt.x}function nt(Lt){return Lt.y}function ut(Lt,vt,Dt,Bt){for(var sr=Bt,br=Dt-vt>>1,zr=Dt-vt,Tr,Rr=Lt[vt],Br=Lt[vt+1],oi=Lt[Dt],vi=Lt[Dt+1],Pi=vt+3;Pi<Dt;Pi+=3){var Yr=ct(Lt[Pi],Lt[Pi+1],Rr,Br,oi,vi);if(Yr>sr)Tr=Pi,sr=Yr;else if(Yr===sr){var Ni=Math.abs(Pi-br);Ni<zr&&(Tr=Pi,zr=Ni)}}sr>Bt&&(Tr-vt>3&&ut(Lt,vt,Tr,Bt),Lt[Tr+2]=sr,Dt-Tr>3&&ut(Lt,Tr,Dt,Bt))}function ct(Lt,vt,Dt,Bt,sr,br){var zr=sr-Dt,Tr=br-Bt;if(zr!==0||Tr!==0){var Rr=((Lt-Dt)*zr+(vt-Bt)*Tr)/(zr*zr+Tr*Tr);Rr>1?(Dt=sr,Bt=br):Rr>0&&(Dt+=zr*Rr,Bt+=Tr*Rr)}return zr=Lt-Dt,Tr=vt-Bt,zr*zr+Tr*Tr}function rt(Lt,vt,Dt,Bt){var sr={id:typeof Lt=="undefined"?null:Lt,type:vt,geometry:Dt,tags:Bt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return je(sr),sr}function je(Lt){var vt=Lt.geometry,Dt=Lt.type;if(Dt==="Point"||Dt==="MultiPoint"||Dt==="LineString")tt(Lt,vt);else if(Dt==="Polygon"||Dt==="MultiLineString")for(var Bt=0;Bt<vt.length;Bt++)tt(Lt,vt[Bt]);else if(Dt==="MultiPolygon")for(Bt=0;Bt<vt.length;Bt++)for(var sr=0;sr<vt[Bt].length;sr++)tt(Lt,vt[Bt][sr])}function tt(Lt,vt){for(var Dt=0;Dt<vt.length;Dt+=3)Lt.minX=Math.min(Lt.minX,vt[Dt]),Lt.minY=Math.min(Lt.minY,vt[Dt+1]),Lt.maxX=Math.max(Lt.maxX,vt[Dt]),Lt.maxY=Math.max(Lt.maxY,vt[Dt+1])}function Je(Lt,vt){var Dt=[];if(Lt.type==="FeatureCollection")for(var Bt=0;Bt<Lt.features.length;Bt++)Mt(Dt,Lt.features[Bt],vt,Bt);else Lt.type==="Feature"?Mt(Dt,Lt,vt):Mt(Dt,{geometry:Lt},vt);return Dt}function Mt(Lt,vt,Dt,Bt){if(vt.geometry){var sr=vt.geometry.coordinates,br=vt.geometry.type,zr=Math.pow(Dt.tolerance/((1<<Dt.maxZoom)*Dt.extent),2),Tr=[],Rr=vt.id;if(Dt.promoteId?Rr=vt.properties[Dt.promoteId]:Dt.generateId&&(Rr=Bt||0),br==="Point")Vt(sr,Tr);else if(br==="MultiPoint")for(var Br=0;Br<sr.length;Br++)Vt(sr[Br],Tr);else if(br==="LineString")Kt(sr,Tr,zr,!1);else if(br==="MultiLineString")if(Dt.lineMetrics){for(Br=0;Br<sr.length;Br++)Tr=[],Kt(sr[Br],Tr,zr,!1),Lt.push(rt(Rr,"LineString",Tr,vt.properties));return}else ir(sr,Tr,zr,!1);else if(br==="Polygon")ir(sr,Tr,zr,!0);else if(br==="MultiPolygon")for(Br=0;Br<sr.length;Br++){var oi=[];ir(sr[Br],oi,zr,!0),Tr.push(oi)}else if(br==="GeometryCollection"){for(Br=0;Br<vt.geometry.geometries.length;Br++)Mt(Lt,{id:Rr,geometry:vt.geometry.geometries[Br],properties:vt.properties},Dt,Bt);return}else throw new Error("Input data is not a valid GeoJSON object.");Lt.push(rt(Rr,br,Tr,vt.properties))}}function Vt(Lt,vt){vt.push(fr(Lt[0])),vt.push(Ot(Lt[1])),vt.push(0)}function Kt(Lt,vt,Dt,Bt){for(var sr,br,zr=0,Tr=0;Tr<Lt.length;Tr++){var Rr=fr(Lt[Tr][0]),Br=Ot(Lt[Tr][1]);vt.push(Rr),vt.push(Br),vt.push(0),Tr>0&&(Bt?zr+=(sr*Br-Rr*br)/2:zr+=Math.sqrt(Math.pow(Rr-sr,2)+Math.pow(Br-br,2))),sr=Rr,br=Br}var oi=vt.length-3;vt[2]=1,ut(vt,0,oi,Dt),vt[oi+2]=1,vt.size=Math.abs(zr),vt.start=0,vt.end=vt.size}function ir(Lt,vt,Dt,Bt){for(var sr=0;sr<Lt.length;sr++){var br=[];Kt(Lt[sr],br,Dt,Bt),vt.push(br)}}function fr(Lt){return Lt/360+.5}function Ot(Lt){var vt=Math.sin(Lt*Math.PI/180),Dt=.5-.25*Math.log((1+vt)/(1-vt))/Math.PI;return Dt<0?0:Dt>1?1:Dt}function De(Lt,vt,Dt,Bt,sr,br,zr,Tr){if(Dt/=vt,Bt/=vt,br>=Dt&&zr<Bt)return Lt;if(zr<Dt||br>=Bt)return null;for(var Rr=[],Br=0;Br<Lt.length;Br++){var oi=Lt[Br],vi=oi.geometry,Pi=oi.type,Yr=sr===0?oi.minX:oi.minY,Ni=sr===0?oi.maxX:oi.maxY;if(Yr>=Dt&&Ni<Bt){Rr.push(oi);continue}else if(Ni<Dt||Yr>=Bt)continue;var Ur=[];if(Pi==="Point"||Pi==="MultiPoint")_e(vi,Ur,Dt,Bt,sr);else if(Pi==="LineString")Fe(vi,Ur,Dt,Bt,sr,!1,Tr.lineMetrics);else if(Pi==="MultiLineString")Ie(vi,Ur,Dt,Bt,sr,!1);else if(Pi==="Polygon")Ie(vi,Ur,Dt,Bt,sr,!0);else if(Pi==="MultiPolygon")for(var ti=0;ti<vi.length;ti++){var ki=[];Ie(vi[ti],ki,Dt,Bt,sr,!0),ki.length&&Ur.push(ki)}if(Ur.length){if(Tr.lineMetrics&&Pi==="LineString"){for(ti=0;ti<Ur.length;ti++)Rr.push(rt(oi.id,Pi,Ur[ti],oi.tags));continue}(Pi==="LineString"||Pi==="MultiLineString")&&(Ur.length===1?(Pi="LineString",Ur=Ur[0]):Pi="MultiLineString"),(Pi==="Point"||Pi==="MultiPoint")&&(Pi=Ur.length===3?"Point":"MultiPoint"),Rr.push(rt(oi.id,Pi,Ur,oi.tags))}}return Rr.length?Rr:null}function _e(Lt,vt,Dt,Bt,sr){for(var br=0;br<Lt.length;br+=3){var zr=Lt[br+sr];zr>=Dt&&zr<=Bt&&(vt.push(Lt[br]),vt.push(Lt[br+1]),vt.push(Lt[br+2]))}}function Fe(Lt,vt,Dt,Bt,sr,br,zr){for(var Tr=Pe(Lt),Rr=sr===0?ye:ue,Br=Lt.start,oi,vi,Pi=0;Pi<Lt.length-3;Pi+=3){var Yr=Lt[Pi],Ni=Lt[Pi+1],Ur=Lt[Pi+2],ti=Lt[Pi+3],ki=Lt[Pi+4],ji=sr===0?Yr:Ni,Vi=sr===0?ti:ki,zi=!1;zr&&(oi=Math.sqrt(Math.pow(Yr-ti,2)+Math.pow(Ni-ki,2))),ji<Dt?Vi>Dt&&(vi=Rr(Tr,Yr,Ni,ti,ki,Dt),zr&&(Tr.start=Br+oi*vi)):ji>Bt?Vi<Bt&&(vi=Rr(Tr,Yr,Ni,ti,ki,Bt),zr&&(Tr.start=Br+oi*vi)):lt(Tr,Yr,Ni,Ur),Vi<Dt&&ji>=Dt&&(vi=Rr(Tr,Yr,Ni,ti,ki,Dt),zi=!0),Vi>Bt&&ji<=Bt&&(vi=Rr(Tr,Yr,Ni,ti,ki,Bt),zi=!0),!br&&zi&&(zr&&(Tr.end=Br+oi*vi),vt.push(Tr),Tr=Pe(Lt)),zr&&(Br+=oi)}var Mi=Lt.length-3;Yr=Lt[Mi],Ni=Lt[Mi+1],Ur=Lt[Mi+2],ji=sr===0?Yr:Ni,ji>=Dt&&ji<=Bt&&lt(Tr,Yr,Ni,Ur),Mi=Tr.length-3,br&&Mi>=3&&(Tr[Mi]!==Tr[0]||Tr[Mi+1]!==Tr[1])&&lt(Tr,Tr[0],Tr[1],Tr[2]),Tr.length&&vt.push(Tr)}function Pe(Lt){var vt=[];return vt.size=Lt.size,vt.start=Lt.start,vt.end=Lt.end,vt}function Ie(Lt,vt,Dt,Bt,sr,br){for(var zr=0;zr<Lt.length;zr++)Fe(Lt[zr],vt,Dt,Bt,sr,br,!1)}function lt(Lt,vt,Dt,Bt){Lt.push(vt),Lt.push(Dt),Lt.push(Bt)}function ye(Lt,vt,Dt,Bt,sr,br){var zr=(br-vt)/(Bt-vt);return Lt.push(br),Lt.push(Dt+(sr-Dt)*zr),Lt.push(1),zr}function ue(Lt,vt,Dt,Bt,sr,br){var zr=(br-Dt)/(sr-Dt);return Lt.push(vt+(Bt-vt)*zr),Lt.push(br),Lt.push(1),zr}function de(Lt,vt){var Dt=vt.buffer/vt.extent,Bt=Lt,sr=De(Lt,1,-1-Dt,Dt,0,-1,2,vt),br=De(Lt,1,1-Dt,2+Dt,0,-1,2,vt);return(sr||br)&&(Bt=De(Lt,1,-Dt,1+Dt,0,-1,2,vt)||[],sr&&(Bt=ht(sr,1).concat(Bt)),br&&(Bt=Bt.concat(ht(br,-1)))),Bt}function ht(Lt,vt){for(var Dt=[],Bt=0;Bt<Lt.length;Bt++){var sr=Lt[Bt],br=sr.type,zr;if(br==="Point"||br==="MultiPoint"||br==="LineString")zr=Et(sr.geometry,vt);else if(br==="MultiLineString"||br==="Polygon"){zr=[];for(var Tr=0;Tr<sr.geometry.length;Tr++)zr.push(Et(sr.geometry[Tr],vt))}else if(br==="MultiPolygon")for(zr=[],Tr=0;Tr<sr.geometry.length;Tr++){for(var Rr=[],Br=0;Br<sr.geometry[Tr].length;Br++)Rr.push(Et(sr.geometry[Tr][Br],vt));zr.push(Rr)}Dt.push(rt(sr.id,br,zr,sr.tags))}return Dt}function Et(Lt,vt){var Dt=[];Dt.size=Lt.size,Lt.start!==void 0&&(Dt.start=Lt.start,Dt.end=Lt.end);for(var Bt=0;Bt<Lt.length;Bt+=3)Dt.push(Lt[Bt]+vt,Lt[Bt+1],Lt[Bt+2]);return Dt}function St(Lt,vt){if(Lt.transformed)return Lt;var Dt=1<<Lt.z,Bt=Lt.x,sr=Lt.y,br,zr,Tr;for(br=0;br<Lt.features.length;br++){var Rr=Lt.features[br],Br=Rr.geometry,oi=Rr.type;if(Rr.geometry=[],oi===1)for(zr=0;zr<Br.length;zr+=2)Rr.geometry.push(Zt(Br[zr],Br[zr+1],vt,Dt,Bt,sr));else for(zr=0;zr<Br.length;zr++){var vi=[];for(Tr=0;Tr<Br[zr].length;Tr+=2)vi.push(Zt(Br[zr][Tr],Br[zr][Tr+1],vt,Dt,Bt,sr));Rr.geometry.push(vi)}}return Lt.transformed=!0,Lt}function Zt(Lt,vt,Dt,Bt,sr,br){return[Math.round(Dt*(Lt*Bt-sr)),Math.round(Dt*(vt*Bt-br))]}function qr(Lt,vt,Dt,Bt,sr){for(var br=vt===sr.maxZoom?0:sr.tolerance/((1<<vt)*sr.extent),zr={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:Dt,y:Bt,z:vt,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Tr=0;Tr<Lt.length;Tr++){zr.numFeatures++,Lr(zr,Lt[Tr],br,sr);var Rr=Lt[Tr].minX,Br=Lt[Tr].minY,oi=Lt[Tr].maxX,vi=Lt[Tr].maxY;Rr<zr.minX&&(zr.minX=Rr),Br<zr.minY&&(zr.minY=Br),oi>zr.maxX&&(zr.maxX=oi),vi>zr.maxY&&(zr.maxY=vi)}return zr}function Lr(Lt,vt,Dt,Bt){var sr=vt.geometry,br=vt.type,zr=[];if(br==="Point"||br==="MultiPoint")for(var Tr=0;Tr<sr.length;Tr+=3)zr.push(sr[Tr]),zr.push(sr[Tr+1]),Lt.numPoints++,Lt.numSimplified++;else if(br==="LineString")vr(zr,sr,Lt,Dt,!1,!1);else if(br==="MultiLineString"||br==="Polygon")for(Tr=0;Tr<sr.length;Tr++)vr(zr,sr[Tr],Lt,Dt,br==="Polygon",Tr===0);else if(br==="MultiPolygon")for(var Rr=0;Rr<sr.length;Rr++){var Br=sr[Rr];for(Tr=0;Tr<Br.length;Tr++)vr(zr,Br[Tr],Lt,Dt,!0,Tr===0)}if(zr.length){var oi=vt.tags||null;if(br==="LineString"&&Bt.lineMetrics){oi={};for(var vi in vt.tags)oi[vi]=vt.tags[vi];oi.mapbox_clip_start=sr.start/sr.size,oi.mapbox_clip_end=sr.end/sr.size}var Pi={geometry:zr,type:br==="Polygon"||br==="MultiPolygon"?3:br==="LineString"||br==="MultiLineString"?2:1,tags:oi};vt.id!==null&&(Pi.id=vt.id),Lt.features.push(Pi)}}function vr(Lt,vt,Dt,Bt,sr,br){var zr=Bt*Bt;if(Bt>0&&vt.size<(sr?zr:Bt)){Dt.numPoints+=vt.length/3;return}for(var Tr=[],Rr=0;Rr<vt.length;Rr+=3)(Bt===0||vt[Rr+2]>zr)&&(Dt.numSimplified++,Tr.push(vt[Rr]),Tr.push(vt[Rr+1])),Dt.numPoints++;sr&&Er(Tr,br),Lt.push(Tr)}function Er(Lt,vt){for(var Dt=0,Bt=0,sr=Lt.length,br=sr-2;Bt<sr;br=Bt,Bt+=2)Dt+=(Lt[Bt]-Lt[br])*(Lt[Bt+1]+Lt[br+1]);if(Dt>0===vt)for(Bt=0,sr=Lt.length;Bt<sr/2;Bt+=2){var zr=Lt[Bt],Tr=Lt[Bt+1];Lt[Bt]=Lt[sr-2-Bt],Lt[Bt+1]=Lt[sr-1-Bt],Lt[sr-2-Bt]=zr,Lt[sr-1-Bt]=Tr}}function si(Lt,vt){return new Ei(Lt,vt)}function Ei(Lt,vt){vt=this.options=xi(Object.create(this.options),vt);var Dt=vt.debug;if(Dt&&console.time("preprocess data"),vt.maxZoom<0||vt.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(vt.promoteId&&vt.generateId)throw new Error("promoteId and generateId cannot be used together.");var Bt=Je(Lt,vt);this.tiles={},this.tileCoords=[],Dt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",vt.indexMaxZoom,vt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Bt=de(Bt,vt),Bt.length&&this.splitTile(Bt,0,0,0),Dt&&(Bt.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)))}Ei.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Ei.prototype.splitTile=function(Lt,vt,Dt,Bt,sr,br,zr){for(var Tr=[Lt,vt,Dt,Bt],Rr=this.options,Br=Rr.debug;Tr.length;){Bt=Tr.pop(),Dt=Tr.pop(),vt=Tr.pop(),Lt=Tr.pop();var oi=1<<vt,vi=Si(vt,Dt,Bt),Pi=this.tiles[vi];if(!Pi&&(Br>1&&console.time("creation"),Pi=this.tiles[vi]=qr(Lt,vt,Dt,Bt,Rr),this.tileCoords.push({z:vt,x:Dt,y:Bt}),Br)){Br>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",vt,Dt,Bt,Pi.numFeatures,Pi.numPoints,Pi.numSimplified),console.timeEnd("creation"));var Yr="z"+vt;this.stats[Yr]=(this.stats[Yr]||0)+1,this.total++}if(Pi.source=Lt,sr){if(vt===Rr.maxZoom||vt===sr)continue;var Ni=1<<sr-vt;if(Dt!==Math.floor(br/Ni)||Bt!==Math.floor(zr/Ni))continue}else if(vt===Rr.indexMaxZoom||Pi.numPoints<=Rr.indexMaxPoints)continue;if(Pi.source=null,Lt.length!==0){Br>1&&console.time("clipping");var Ur=.5*Rr.buffer/Rr.extent,ti=.5-Ur,ki=.5+Ur,ji=1+Ur,Vi,zi,Mi,sn,fi,Or;Vi=zi=Mi=sn=null,fi=De(Lt,oi,Dt-Ur,Dt+ki,0,Pi.minX,Pi.maxX,Rr),Or=De(Lt,oi,Dt+ti,Dt+ji,0,Pi.minX,Pi.maxX,Rr),Lt=null,fi&&(Vi=De(fi,oi,Bt-Ur,Bt+ki,1,Pi.minY,Pi.maxY,Rr),zi=De(fi,oi,Bt+ti,Bt+ji,1,Pi.minY,Pi.maxY,Rr),fi=null),Or&&(Mi=De(Or,oi,Bt-Ur,Bt+ki,1,Pi.minY,Pi.maxY,Rr),sn=De(Or,oi,Bt+ti,Bt+ji,1,Pi.minY,Pi.maxY,Rr),Or=null),Br>1&&console.timeEnd("clipping"),Tr.push(Vi||[],vt+1,Dt*2,Bt*2),Tr.push(zi||[],vt+1,Dt*2,Bt*2+1),Tr.push(Mi||[],vt+1,Dt*2+1,Bt*2),Tr.push(sn||[],vt+1,Dt*2+1,Bt*2+1)}}},Ei.prototype.getTile=function(Lt,vt,Dt){var Bt=this.options,sr=Bt.extent,br=Bt.debug;if(Lt<0||Lt>24)return null;var zr=1<<Lt;vt=(vt%zr+zr)%zr;var Tr=Si(Lt,vt,Dt);if(this.tiles[Tr])return St(this.tiles[Tr],sr);br>1&&console.log("drilling down to z%d-%d-%d",Lt,vt,Dt);for(var Rr=Lt,Br=vt,oi=Dt,vi;!vi&&Rr>0;)Rr--,Br=Math.floor(Br/2),oi=Math.floor(oi/2),vi=this.tiles[Si(Rr,Br,oi)];return!vi||!vi.source?null:(br>1&&console.log("found parent tile z%d-%d-%d",Rr,Br,oi),br>1&&console.time("drilling down"),this.splitTile(vi.source,Rr,Br,oi,Lt,vt,Dt),br>1&&console.timeEnd("drilling down"),this.tiles[Tr]?St(this.tiles[Tr],sr):null)};function Si(Lt,vt,Dt){return((1<<Lt)*Dt+vt)*32+Lt}function xi(Lt,vt){for(var Dt in vt)Lt[Dt]=vt[Dt];return Lt}function Hi(Lt,vt){var Dt=Lt.tileID.canonical;if(!this._geoJSONIndex)return vt(null,null);var Bt=this._geoJSONIndex.getTile(Dt.z,Dt.x,Dt.y);if(!Bt)return vt(null,null);var sr=new C(Bt.features),br=F(sr);(br.byteOffset!==0||br.byteLength!==br.buffer.byteLength)&&(br=new Uint8Array(br)),vt(null,{vectorTile:sr,rawData:br.buffer})}var Jr=function(Lt){function vt(Dt,Bt,sr,br){Lt.call(this,Dt,Bt,sr,Hi),br&&(this.loadGeoJSON=br)}return Lt&&(vt.__proto__=Lt),vt.prototype=Object.create(Lt&&Lt.prototype),vt.prototype.constructor=vt,vt.prototype.loadData=function(Bt,sr){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=sr,this._pendingLoadDataParams=Bt,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},vt.prototype._loadData=function(){var Bt=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var sr=this._pendingCallback,br=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var zr=br&&br.request&&br.request.collectResourceTiming?new i.RequestPerformance(br.request):!1;this.loadGeoJSON(br,function(Tr,Rr){if(Tr||!Rr)return sr(Tr);if(typeof Rr!="object")return sr(new Error("Input data given to '"+br.source+"' is not a valid GeoJSON object."));y(Rr,!0);try{if(br.filter){var Br=i.createExpression(br.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Br.result==="error")throw new Error(Br.value.map(function(Yr){return Yr.key+": "+Yr.message}).join(", "));var oi=Rr.features.filter(function(Yr){return Br.value.evaluate({zoom:0},Yr)});Rr={type:"FeatureCollection",features:oi}}Bt._geoJSONIndex=br.cluster?new gt(ci(br)).load(Rr.features):si(Rr,br.geojsonVtOptions)}catch(Yr){return sr(Yr)}Bt.loaded={};var vi={};if(zr){var Pi=zr.finish();Pi&&(vi.resourceTiming={},vi.resourceTiming[br.source]=JSON.parse(JSON.stringify(Pi)))}sr(null,vi)})}},vt.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},vt.prototype.reloadTile=function(Bt,sr){var br=this.loaded,zr=Bt.uid;return br&&br[zr]?Lt.prototype.reloadTile.call(this,Bt,sr):this.loadTile(Bt,sr)},vt.prototype.loadGeoJSON=function(Bt,sr){if(Bt.request)i.getJSON(Bt.request,sr);else if(typeof Bt.data=="string")try{return sr(null,JSON.parse(Bt.data))}catch(br){return sr(new Error("Input data given to '"+Bt.source+"' is not a valid GeoJSON object."))}else return sr(new Error("Input data given to '"+Bt.source+"' is not a valid GeoJSON object."))},vt.prototype.removeSource=function(Bt,sr){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),sr()},vt.prototype.getClusterExpansionZoom=function(Bt,sr){try{sr(null,this._geoJSONIndex.getClusterExpansionZoom(Bt.clusterId))}catch(br){sr(br)}},vt.prototype.getClusterChildren=function(Bt,sr){try{sr(null,this._geoJSONIndex.getChildren(Bt.clusterId))}catch(br){sr(br)}},vt.prototype.getClusterLeaves=function(Bt,sr){try{sr(null,this._geoJSONIndex.getLeaves(Bt.clusterId,Bt.limit,Bt.offset))}catch(br){sr(br)}},vt}(p);function ci(Lt){var vt=Lt.superclusterOptions,Dt=Lt.clusterProperties;if(!Dt||!vt)return vt;for(var Bt={},sr={},br={accumulated:null,zoom:0},zr={properties:null},Tr=Object.keys(Dt),Rr=0,Br=Tr;Rr<Br.length;Rr+=1){var oi=Br[Rr],vi=Dt[oi],Pi=vi[0],Yr=vi[1],Ni=i.createExpression(Yr),Ur=i.createExpression(typeof Pi=="string"?[Pi,["accumulated"],["get",oi]]:Pi);Bt[oi]=Ni.value,sr[oi]=Ur.value}return vt.map=function(ti){zr.properties=ti;for(var ki={},ji=0,Vi=Tr;ji<Vi.length;ji+=1){var zi=Vi[ji];ki[zi]=Bt[zi].evaluate(br,zr)}return ki},vt.reduce=function(ti,ki){zr.properties=ki;for(var ji=0,Vi=Tr;ji<Vi.length;ji+=1){var zi=Vi[ji];br.accumulated=ti[zi],ti[zi]=sr[zi].evaluate(br,zr)}},vt}var Di=function(vt){var Dt=this;this.self=vt,this.actor=new i.Actor(vt,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:p,geojson:Jr},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(Bt,sr){if(Dt.workerSourceTypes[Bt])throw new Error('Worker source with name "'+Bt+'" already registered.');Dt.workerSourceTypes[Bt]=sr},this.self.registerRTLTextPlugin=function(Bt){if(i.plugin.isParsed())throw new Error("RTL text plugin already registered.");i.plugin.applyArabicShaping=Bt.applyArabicShaping,i.plugin.processBidirectionalText=Bt.processBidirectionalText,i.plugin.processStyledBidirectionalText=Bt.processStyledBidirectionalText}};return Di.prototype.setReferrer=function(vt,Dt){this.referrer=Dt},Di.prototype.setImages=function(vt,Dt,Bt){this.availableImages[vt]=Dt;for(var sr in this.workerSources[vt]){var br=this.workerSources[vt][sr];for(var zr in br)br[zr].availableImages=Dt}Bt()},Di.prototype.setLayers=function(vt,Dt,Bt){this.getLayerIndex(vt).replace(Dt),Bt()},Di.prototype.updateLayers=function(vt,Dt,Bt){this.getLayerIndex(vt).update(Dt.layers,Dt.removedIds),Bt()},Di.prototype.loadTile=function(vt,Dt,Bt){this.getWorkerSource(vt,Dt.type,Dt.source).loadTile(Dt,Bt)},Di.prototype.loadDEMTile=function(vt,Dt,Bt){this.getDEMWorkerSource(vt,Dt.source).loadTile(Dt,Bt)},Di.prototype.reloadTile=function(vt,Dt,Bt){this.getWorkerSource(vt,Dt.type,Dt.source).reloadTile(Dt,Bt)},Di.prototype.abortTile=function(vt,Dt,Bt){this.getWorkerSource(vt,Dt.type,Dt.source).abortTile(Dt,Bt)},Di.prototype.removeTile=function(vt,Dt,Bt){this.getWorkerSource(vt,Dt.type,Dt.source).removeTile(Dt,Bt)},Di.prototype.removeDEMTile=function(vt,Dt){this.getDEMWorkerSource(vt,Dt.source).removeTile(Dt)},Di.prototype.removeSource=function(vt,Dt,Bt){if(!(!this.workerSources[vt]||!this.workerSources[vt][Dt.type]||!this.workerSources[vt][Dt.type][Dt.source])){var sr=this.workerSources[vt][Dt.type][Dt.source];delete this.workerSources[vt][Dt.type][Dt.source],sr.removeSource!==void 0?sr.removeSource(Dt,Bt):Bt()}},Di.prototype.loadWorkerSource=function(vt,Dt,Bt){try{this.self.importScripts(Dt.url),Bt()}catch(sr){Bt(sr.toString())}},Di.prototype.syncRTLPluginState=function(vt,Dt,Bt){try{i.plugin.setState(Dt);var sr=i.plugin.getPluginURL();if(i.plugin.isLoaded()&&!i.plugin.isParsed()&&sr!=null){this.self.importScripts(sr);var br=i.plugin.isParsed(),zr=br?void 0:new Error("RTL Text Plugin failed to import scripts from "+sr);Bt(zr,br)}}catch(Tr){Bt(Tr.toString())}},Di.prototype.getAvailableImages=function(vt){var Dt=this.availableImages[vt];return Dt||(Dt=[]),Dt},Di.prototype.getLayerIndex=function(vt){var Dt=this.layerIndexes[vt];return Dt||(Dt=this.layerIndexes[vt]=new u),Dt},Di.prototype.getWorkerSource=function(vt,Dt,Bt){var sr=this;if(this.workerSources[vt]||(this.workerSources[vt]={}),this.workerSources[vt][Dt]||(this.workerSources[vt][Dt]={}),!this.workerSources[vt][Dt][Bt]){var br={send:function(zr,Tr,Rr){sr.actor.send(zr,Tr,Rr,vt)}};this.workerSources[vt][Dt][Bt]=new this.workerSourceTypes[Dt](br,this.getLayerIndex(vt),this.getAvailableImages(vt))}return this.workerSources[vt][Dt][Bt]},Di.prototype.getDEMWorkerSource=function(vt,Dt){return this.demWorkerSources[vt]||(this.demWorkerSources[vt]={}),this.demWorkerSources[vt][Dt]||(this.demWorkerSources[vt][Dt]=new b),this.demWorkerSources[vt][Dt]},Di.prototype.enforceCacheSizeLimit=function(vt,Dt){i.enforceCacheSizeLimit(Dt)},typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope&&(self.worker=new Di(self)),Di}),n(["./shared"],function(i){"use strict";var a=i.createCommonjsModule(function(Y){Y.exports?Y.exports=R:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=R,window.mapboxgl.notSupportedReason=K);function R(mr){return!K(mr)}function K(mr){if(!N())return"not a browser";if(!$())return"insufficent Array support";if(!we())return"insufficient Function support";if(!ge())return"insufficient Object support";if(!Ue())return"insufficient JSON support";if(!dt())return"insufficient worker support";if(!Rt())return"insufficient Uint8ClampedArray support";if(!ur())return"insufficient ArrayBuffer support";if(!gr())return"insufficient Canvas/getImageData support";if(!It(mr&&mr.failIfMajorPerformanceCaveat))return"insufficient WebGL support"}function N(){return typeof window!="undefined"&&typeof document!="undefined"}function $(){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 we(){return Function.prototype&&Function.prototype.bind}function ge(){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 Ue(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function dt(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var mr=new Blob([""],{type:"text/javascript"}),Pr=URL.createObjectURL(mr),Dr,Xr;try{Xr=new Worker(Pr),Dr=!0}catch(Gr){Dr=!1}return Xr&&Xr.terminate(),URL.revokeObjectURL(Pr),Dr}function Rt(){return"Uint8ClampedArray"in window}function ur(){return ArrayBuffer.isView}function gr(){var mr=document.createElement("canvas");mr.width=mr.height=1;var Pr=mr.getContext("2d");if(!Pr)return!1;var Dr=Pr.getImageData(0,0,1,1);return Dr&&Dr.width===mr.width}var cr={};function It(mr){return cr[mr]===void 0&&(cr[mr]=ar(mr)),cr[mr]}R.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function Qt(mr){var Pr=document.createElement("canvas"),Dr=Object.create(R.webGLContextAttributes);return Dr.failIfMajorPerformanceCaveat=mr,Pr.probablySupportsContext?Pr.probablySupportsContext("webgl",Dr)||Pr.probablySupportsContext("experimental-webgl",Dr):Pr.supportsContext?Pr.supportsContext("webgl",Dr)||Pr.supportsContext("experimental-webgl",Dr):Pr.getContext("webgl",Dr)||Pr.getContext("experimental-webgl",Dr)}function ar(mr){var Pr=Qt(mr);if(!Pr)return!1;var Dr=Pr.createShader(Pr.VERTEX_SHADER);return!Dr||Pr.isContextLost()?!1:(Pr.shaderSource(Dr,"void main() {}"),Pr.compileShader(Dr),Pr.getShaderParameter(Dr,Pr.COMPILE_STATUS)===!0)}}),o={};o.create=function(Y,R,K){var N=i.window.document.createElement(Y);return R!==void 0&&(N.className=R),K&&K.appendChild(N),N},o.createNS=function(Y,R){var K=i.window.document.createElementNS(Y,R);return K};var s=i.window.document&&i.window.document.documentElement.style;function u(Y){if(!s)return Y[0];for(var R=0;R<Y.length;R++)if(Y[R]in s)return Y[R];return Y[0]}var l=u(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),f;o.disableDrag=function(){s&&l&&(f=s[l],s[l]="none")},o.enableDrag=function(){s&&l&&(s[l]=f)};var c=u(["transform","WebkitTransform"]);o.setTransform=function(Y,R){Y.style[c]=R};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,R,K,N){N===void 0&&(N={}),"passive"in N&&h?Y.addEventListener(R,K,N):Y.addEventListener(R,K,N.capture)},o.removeEventListener=function(Y,R,K,N){N===void 0&&(N={}),"passive"in N&&h?Y.removeEventListener(R,K,N):Y.removeEventListener(R,K,N.capture)};var p=function(Y){Y.preventDefault(),Y.stopPropagation(),i.window.removeEventListener("click",p,!0)};o.suppressClick=function(){i.window.addEventListener("click",p,!0),i.window.setTimeout(function(){i.window.removeEventListener("click",p,!0)},0)},o.mousePos=function(Y,R){var K=Y.getBoundingClientRect();return new i.Point(R.clientX-K.left-Y.clientLeft,R.clientY-K.top-Y.clientTop)},o.touchPos=function(Y,R){for(var K=Y.getBoundingClientRect(),N=[],$=0;$<R.length;$++)N.push(new i.Point(R[$].clientX-K.left-Y.clientLeft,R[$].clientY-K.top-Y.clientTop));return N},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 x(Y,R,K){var N,$,we,ge=i.browser.devicePixelRatio>1?"@2x":"",Ue=i.getJSON(R.transformRequest(R.normalizeSpriteURL(Y,ge,".json"),i.ResourceType.SpriteJSON),function(ur,gr){Ue=null,we||(we=ur,N=gr,Rt())}),dt=i.getImage(R.transformRequest(R.normalizeSpriteURL(Y,ge,".png"),i.ResourceType.SpriteImage),function(ur,gr){dt=null,we||(we=ur,$=gr,Rt())});function Rt(){if(we)K(we);else if(N&&$){var ur=i.browser.getImageData($),gr={};for(var cr in N){var It=N[cr],Qt=It.width,ar=It.height,mr=It.x,Pr=It.y,Dr=It.sdf,Xr=It.pixelRatio,Gr=It.stretchX,Fr=It.stretchY,Kr=It.content,Cr=new i.RGBAImage({width:Qt,height:ar});i.RGBAImage.copy(ur,Cr,{x:mr,y:Pr},{x:0,y:0},{width:Qt,height:ar}),gr[cr]={data:Cr,pixelRatio:Xr,sdf:Dr,stretchX:Gr,stretchY:Fr,content:Kr}}K(null,gr)}}return{cancel:function(){Ue&&(Ue.cancel(),Ue=null),dt&&(dt.cancel(),dt=null)}}}function b(Y){var R=Y.userImage;if(R&&R.render){var K=R.render();if(K)return Y.data.replace(new Uint8Array(R.data.buffer)),!0}return!1}var y=1,k=function(Y){function R(){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&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.isLoaded=function(){return this.loaded},R.prototype.setLoaded=function(N){if(this.loaded!==N&&(this.loaded=N,N)){for(var $=0,we=this.requestors;$<we.length;$+=1){var ge=we[$],Ue=ge.ids,dt=ge.callback;this._notify(Ue,dt)}this.requestors=[]}},R.prototype.getImage=function(N){return this.images[N]},R.prototype.addImage=function(N,$){this._validate(N,$)&&(this.images[N]=$)},R.prototype._validate=function(N,$){var we=!0;return this._validateStretch($.stretchX,$.data&&$.data.width)||(this.fire(new i.ErrorEvent(new Error('Image "'+N+'" has invalid "stretchX" value'))),we=!1),this._validateStretch($.stretchY,$.data&&$.data.height)||(this.fire(new i.ErrorEvent(new Error('Image "'+N+'" has invalid "stretchY" value'))),we=!1),this._validateContent($.content,$)||(this.fire(new i.ErrorEvent(new Error('Image "'+N+'" has invalid "content" value'))),we=!1),we},R.prototype._validateStretch=function(N,$){if(!N)return!0;for(var we=0,ge=0,Ue=N;ge<Ue.length;ge+=1){var dt=Ue[ge];if(dt[0]<we||dt[1]<dt[0]||$<dt[1])return!1;we=dt[1]}return!0},R.prototype._validateContent=function(N,$){return N?!(N.length!==4||N[0]<0||$.data.width<N[0]||N[1]<0||$.data.height<N[1]||N[2]<0||$.data.width<N[2]||N[3]<0||$.data.height<N[3]||N[2]<N[0]||N[3]<N[1]):!0},R.prototype.updateImage=function(N,$){var we=this.images[N];$.version=we.version+1,this.images[N]=$,this.updatedImages[N]=!0},R.prototype.removeImage=function(N){var $=this.images[N];delete this.images[N],delete this.patterns[N],$.userImage&&$.userImage.onRemove&&$.userImage.onRemove()},R.prototype.listImages=function(){return Object.keys(this.images)},R.prototype.getImages=function(N,$){var we=!0;if(!this.isLoaded())for(var ge=0,Ue=N;ge<Ue.length;ge+=1){var dt=Ue[ge];this.images[dt]||(we=!1)}this.isLoaded()||we?this._notify(N,$):this.requestors.push({ids:N,callback:$})},R.prototype._notify=function(N,$){for(var we={},ge=0,Ue=N;ge<Ue.length;ge+=1){var dt=Ue[ge];this.images[dt]||this.fire(new i.Event("styleimagemissing",{id:dt}));var Rt=this.images[dt];Rt?we[dt]={data:Rt.data.clone(),pixelRatio:Rt.pixelRatio,sdf:Rt.sdf,version:Rt.version,stretchX:Rt.stretchX,stretchY:Rt.stretchY,content:Rt.content,hasRenderCallback:!!(Rt.userImage&&Rt.userImage.render)}:i.warnOnce('Image "'+dt+'" 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.')}$(null,we)},R.prototype.getPixelSize=function(){var N=this.atlasImage,$=N.width,we=N.height;return{width:$,height:we}},R.prototype.getPattern=function(N){var $=this.patterns[N],we=this.getImage(N);if(!we)return null;if($&&$.position.version===we.version)return $.position;if($)$.position.version=we.version;else{var ge=we.data.width+y*2,Ue=we.data.height+y*2,dt={w:ge,h:Ue,x:0,y:0},Rt=new i.ImagePosition(dt,we);this.patterns[N]={bin:dt,position:Rt}}return this._updatePatternAtlas(),this.patterns[N].position},R.prototype.bind=function(N){var $=N.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new i.Texture(N,this.atlasImage,$.RGBA),this.atlasTexture.bind($.LINEAR,$.CLAMP_TO_EDGE)},R.prototype._updatePatternAtlas=function(){var N=[];for(var $ in this.patterns)N.push(this.patterns[$].bin);var we=i.potpack(N),ge=we.w,Ue=we.h,dt=this.atlasImage;dt.resize({width:ge||1,height:Ue||1});for(var Rt in this.patterns){var ur=this.patterns[Rt],gr=ur.bin,cr=gr.x+y,It=gr.y+y,Qt=this.images[Rt].data,ar=Qt.width,mr=Qt.height;i.RGBAImage.copy(Qt,dt,{x:0,y:0},{x:cr,y:It},{width:ar,height:mr}),i.RGBAImage.copy(Qt,dt,{x:0,y:mr-1},{x:cr,y:It-1},{width:ar,height:1}),i.RGBAImage.copy(Qt,dt,{x:0,y:0},{x:cr,y:It+mr},{width:ar,height:1}),i.RGBAImage.copy(Qt,dt,{x:ar-1,y:0},{x:cr-1,y:It},{width:1,height:mr}),i.RGBAImage.copy(Qt,dt,{x:0,y:0},{x:cr+ar,y:It},{width:1,height:mr})}this.dirty=!0},R.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},R.prototype.dispatchRenderCallbacks=function(N){for(var $=0,we=N;$<we.length;$+=1){var ge=we[$];if(!this.callbackDispatchedThisFrame[ge]){this.callbackDispatchedThisFrame[ge]=!0;var Ue=this.images[ge],dt=b(Ue);dt&&this.updateImage(ge,Ue)}}},R}(i.Evented);function E(Y,R,K,N,$){var we=R*256,ge=we+255,Ue=N.transformRequest(N.normalizeGlyphsURL(K).replace("{fontstack}",Y).replace("{range}",we+"-"+ge),i.ResourceType.Glyphs);i.getArrayBuffer(Ue,function(dt,Rt){if(dt)$(dt);else if(Rt){for(var ur={},gr=0,cr=i.parseGlyphPBF(Rt);gr<cr.length;gr+=1){var It=cr[gr];ur[It.id]=It}$(null,ur)}})}var A=C,L=C,_=1e20;function C(Y,R,K,N,$,we){this.fontSize=Y||24,this.buffer=R===void 0?3:R,this.cutoff=N||.25,this.fontFamily=$||"sans-serif",this.fontWeight=we||"normal",this.radius=K||8;var ge=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=ge,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(ge*ge),this.gridInner=new Float64Array(ge*ge),this.f=new Float64Array(ge),this.d=new Float64Array(ge),this.z=new Float64Array(ge+1),this.v=new Int16Array(ge),this.middle=Math.round(ge/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 R=this.ctx.getImageData(0,0,this.size,this.size),K=new Uint8ClampedArray(this.size*this.size),N=0;N<this.size*this.size;N++){var $=R.data[N*4+3]/255;this.gridOuter[N]=$===1?0:$===0?_:Math.pow(Math.max(0,.5-$),2),this.gridInner[N]=$===1?_:$===0?0:Math.pow(Math.max(0,$-.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),N=0;N<this.size*this.size;N++){var we=this.gridOuter[N]-this.gridInner[N];K[N]=Math.max(0,Math.min(255,Math.round(255-255*(we/this.radius+this.cutoff))))}return K};function M(Y,R,K,N,$,we,ge){for(var Ue=0;Ue<R;Ue++){for(var dt=0;dt<K;dt++)N[dt]=Y[dt*R+Ue];for(v(N,$,we,ge,K),dt=0;dt<K;dt++)Y[dt*R+Ue]=$[dt]}for(dt=0;dt<K;dt++){for(Ue=0;Ue<R;Ue++)N[Ue]=Y[dt*R+Ue];for(v(N,$,we,ge,R),Ue=0;Ue<R;Ue++)Y[dt*R+Ue]=Math.sqrt($[Ue])}}function v(Y,R,K,N,$){K[0]=0,N[0]=-_,N[1]=+_;for(var we=1,ge=0;we<$;we++){for(var Ue=(Y[we]+we*we-(Y[K[ge]]+K[ge]*K[ge]))/(2*we-2*K[ge]);Ue<=N[ge];)ge--,Ue=(Y[we]+we*we-(Y[K[ge]]+K[ge]*K[ge]))/(2*we-2*K[ge]);ge++,K[ge]=we,N[ge]=Ue,N[ge+1]=+_}for(we=0,ge=0;we<$;we++){for(;N[ge+1]<we;)ge++;R[we]=(we-K[ge])*(we-K[ge])+Y[K[ge]]}}A.default=L;var z=function(R,K){this.requestManager=R,this.localIdeographFontFamily=K,this.entries={}};z.prototype.setURL=function(R){this.url=R},z.prototype.getGlyphs=function(R,K){var N=this,$=[];for(var we in R)for(var ge=0,Ue=R[we];ge<Ue.length;ge+=1){var dt=Ue[ge];$.push({stack:we,id:dt})}i.asyncAll($,function(Rt,ur){var gr=Rt.stack,cr=Rt.id,It=N.entries[gr];It||(It=N.entries[gr]={glyphs:{},requests:{},ranges:{}});var Qt=It.glyphs[cr];if(Qt!==void 0){ur(null,{stack:gr,id:cr,glyph:Qt});return}if(Qt=N._tinySDF(It,gr,cr),Qt){It.glyphs[cr]=Qt,ur(null,{stack:gr,id:cr,glyph:Qt});return}var ar=Math.floor(cr/256);if(ar*256>65535){ur(new Error("glyphs > 65535 not supported"));return}if(It.ranges[ar]){ur(null,{stack:gr,id:cr,glyph:Qt});return}var mr=It.requests[ar];mr||(mr=It.requests[ar]=[],z.loadGlyphRange(gr,ar,N.url,N.requestManager,function(Pr,Dr){if(Dr){for(var Xr in Dr)N._doesCharSupportLocalGlyph(+Xr)||(It.glyphs[+Xr]=Dr[+Xr]);It.ranges[ar]=!0}for(var Gr=0,Fr=mr;Gr<Fr.length;Gr+=1){var Kr=Fr[Gr];Kr(Pr,Dr)}delete It.requests[ar]})),mr.push(function(Pr,Dr){Pr?ur(Pr):Dr&&ur(null,{stack:gr,id:cr,glyph:Dr[cr]||null})})},function(Rt,ur){if(Rt)K(Rt);else if(ur){for(var gr={},cr=0,It=ur;cr<It.length;cr+=1){var Qt=It[cr],ar=Qt.stack,mr=Qt.id,Pr=Qt.glyph;(gr[ar]||(gr[ar]={}))[mr]=Pr&&{id:Pr.id,bitmap:Pr.bitmap.clone(),metrics:Pr.metrics}}K(null,gr)}})},z.prototype._doesCharSupportLocalGlyph=function(R){return!!this.localIdeographFontFamily&&(i.isChar["CJK Unified Ideographs"](R)||i.isChar["Hangul Syllables"](R)||i.isChar.Hiragana(R)||i.isChar.Katakana(R))},z.prototype._tinySDF=function(R,K,N){var $=this.localIdeographFontFamily;if($&&this._doesCharSupportLocalGlyph(N)){var we=R.tinySDF;if(!we){var ge="400";/bold/i.test(K)?ge="900":/medium/i.test(K)?ge="500":/light/i.test(K)&&(ge="200"),we=R.tinySDF=new z.TinySDF(24,3,8,.25,$,ge)}return{id:N,bitmap:new i.AlphaImage({width:30,height:30},we.draw(String.fromCharCode(N))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},z.loadGlyphRange=E,z.TinySDF=A;var T=function(){this.specification=i.styleSpec.light.position};T.prototype.possiblyEvaluate=function(R,K){return i.sphericalToCartesian(R.expression.evaluate(K))},T.prototype.interpolate=function(R,K,N){return{x:i.number(R.x,K.x,N),y:i.number(R.y,K.y,N),z:i.number(R.z,K.z,N)}};var F=new i.Properties({anchor:new i.DataConstantProperty(i.styleSpec.light.anchor),position:new T,color:new i.DataConstantProperty(i.styleSpec.light.color),intensity:new i.DataConstantProperty(i.styleSpec.light.intensity)}),q="-transition",U=function(Y){function R(K){Y.call(this),this._transitionable=new i.Transitionable(F),this.setLight(K),this._transitioning=this._transitionable.untransitioned()}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getLight=function(){return this._transitionable.serialize()},R.prototype.setLight=function(N,$){if($===void 0&&($={}),!this._validate(i.validateLight,N,$))for(var we in N){var ge=N[we];i.endsWith(we,q)?this._transitionable.setTransition(we.slice(0,-q.length),ge):this._transitionable.setValue(we,ge)}},R.prototype.updateTransitions=function(N){this._transitioning=this._transitionable.transitioned(N,this._transitioning)},R.prototype.hasTransition=function(){return this._transitioning.hasTransition()},R.prototype.recalculate=function(N){this.properties=this._transitioning.possiblyEvaluate(N)},R.prototype._validate=function(N,$,we){return we&&we.validate===!1?!1:i.emitValidationErrors(this,N.call(i.validateStyle,i.extend({value:$,style:{glyphs:!0,sprite:!0},styleSpec:i.styleSpec})))},R}(i.Evented),H=function(R,K){this.width=R,this.height=K,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};H.prototype.getDash=function(R,K){var N=R.join(",")+String(K);return this.dashEntry[N]||(this.dashEntry[N]=this.addDash(R,K)),this.dashEntry[N]},H.prototype.getDashRanges=function(R,K,N){var $=R.length%2===1,we=[],ge=$?-R[R.length-1]*N:0,Ue=R[0]*N,dt=!0;we.push({left:ge,right:Ue,isDash:dt,zeroLength:R[0]===0});for(var Rt=R[0],ur=1;ur<R.length;ur++){dt=!dt;var gr=R[ur];ge=Rt*N,Rt+=gr,Ue=Rt*N,we.push({left:ge,right:Ue,isDash:dt,zeroLength:gr===0})}return we},H.prototype.addRoundDash=function(R,K,N){for(var $=K/2,we=-N;we<=N;we++)for(var ge=this.nextRow+N+we,Ue=this.width*ge,dt=0,Rt=R[dt],ur=0;ur<this.width;ur++){ur/Rt.right>1&&(Rt=R[++dt]);var gr=Math.abs(ur-Rt.left),cr=Math.abs(ur-Rt.right),It=Math.min(gr,cr),Qt=void 0,ar=we/N*($+1);if(Rt.isDash){var mr=$-Math.abs(ar);Qt=Math.sqrt(It*It+mr*mr)}else Qt=$-Math.sqrt(It*It+ar*ar);this.data[Ue+ur]=Math.max(0,Math.min(255,Qt+128))}},H.prototype.addRegularDash=function(R){for(var K=R.length-1;K>=0;--K){var N=R[K],$=R[K+1];N.zeroLength?R.splice(K,1):$&&$.isDash===N.isDash&&($.left=N.left,R.splice(K,1))}var we=R[0],ge=R[R.length-1];we.isDash===ge.isDash&&(we.left=ge.left-this.width,ge.right=we.right+this.width);for(var Ue=this.width*this.nextRow,dt=0,Rt=R[dt],ur=0;ur<this.width;ur++){ur/Rt.right>1&&(Rt=R[++dt]);var gr=Math.abs(ur-Rt.left),cr=Math.abs(ur-Rt.right),It=Math.min(gr,cr),Qt=Rt.isDash?It:-It;this.data[Ue+ur]=Math.max(0,Math.min(255,Qt+128))}},H.prototype.addDash=function(R,K){var N=K?7:0,$=2*N+1;if(this.nextRow+$>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var we=0,ge=0;ge<R.length;ge++)we+=R[ge];if(we!==0){var Ue=this.width/we,dt=this.getDashRanges(R,this.width,Ue);K?this.addRoundDash(dt,Ue,N):this.addRegularDash(dt)}var Rt={y:(this.nextRow+N+.5)/this.height,height:2*N/this.height,width:we};return this.nextRow+=$,this.dirty=!0,Rt},H.prototype.bind=function(R){var K=R.gl;this.texture?(K.bindTexture(K.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,K.texSubImage2D(K.TEXTURE_2D,0,0,0,this.width,this.height,K.ALPHA,K.UNSIGNED_BYTE,this.data))):(this.texture=K.createTexture(),K.bindTexture(K.TEXTURE_2D,this.texture),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_WRAP_S,K.REPEAT),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_WRAP_T,K.REPEAT),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_MIN_FILTER,K.LINEAR),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_MAG_FILTER,K.LINEAR),K.texImage2D(K.TEXTURE_2D,0,K.ALPHA,this.width,this.height,0,K.ALPHA,K.UNSIGNED_BYTE,this.data))};var j=function Y(R,K){this.workerPool=R,this.actors=[],this.currentActor=0,this.id=i.uniqueId();for(var N=this.workerPool.acquire(this.id),$=0;$<N.length;$++){var we=N[$],ge=new Y.Actor(we,K,this.id);ge.name="Worker "+$,this.actors.push(ge)}};j.prototype.broadcast=function(R,K,N){N=N||function(){},i.asyncAll(this.actors,function($,we){$.send(R,K,we)},N)},j.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},j.prototype.remove=function(){this.actors.forEach(function(R){R.remove()}),this.actors=[],this.workerPool.release(this.id)},j.Actor=i.Actor;function G(Y,R,K){var N=function($,we){if($)return K($);if(we){var ge=i.pick(i.extend(we,Y),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);we.vector_layers&&(ge.vectorLayers=we.vector_layers,ge.vectorLayerIds=ge.vectorLayers.map(function(Ue){return Ue.id})),ge.tiles=R.canonicalizeTileset(ge,Y.url),K(null,ge)}};return Y.url?i.getJSON(R.transformRequest(R.normalizeSourceURL(Y.url),i.ResourceType.Source),N):i.browser.frame(function(){return N(null,Y)})}var O=function(R,K,N){this.bounds=i.LngLatBounds.convert(this.validateBounds(R)),this.minzoom=K||0,this.maxzoom=N||24};O.prototype.validateBounds=function(R){return!Array.isArray(R)||R.length!==4?[-180,-90,180,90]:[Math.max(-180,R[0]),Math.max(-90,R[1]),Math.min(180,R[2]),Math.min(90,R[3])]},O.prototype.contains=function(R){var K=Math.pow(2,R.z),N={minX:Math.floor(i.mercatorXfromLng(this.bounds.getWest())*K),minY:Math.floor(i.mercatorYfromLat(this.bounds.getNorth())*K),maxX:Math.ceil(i.mercatorXfromLng(this.bounds.getEast())*K),maxY:Math.ceil(i.mercatorYfromLat(this.bounds.getSouth())*K)},$=R.x>=N.minX&&R.x<N.maxX&&R.y>=N.minY&&R.y<N.maxY;return $};var W=function(Y){function R(K,N,$,we){if(Y.call(this),this.id=K,this.dispatcher=$,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(N,["url","scheme","tileSize","promoteId"])),this._options=i.extend({type:"vector"},N),this._collectResourceTiming=N.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(we)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.load=function(){var N=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=G(this._options,this.map._requestManager,function($,we){N._tileJSONRequest=null,N._loaded=!0,$?N.fire(new i.ErrorEvent($)):we&&(i.extend(N,we),we.bounds&&(N.tileBounds=new O(we.bounds,N.minzoom,N.maxzoom)),i.postTurnstileEvent(we.tiles,N.map._requestManager._customAccessToken),i.postMapLoadEvent(we.tiles,N.map._getMapId(),N.map._requestManager._skuToken,N.map._requestManager._customAccessToken),N.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})),N.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})))})},R.prototype.loaded=function(){return this._loaded},R.prototype.hasTile=function(N){return!this.tileBounds||this.tileBounds.contains(N.canonical)},R.prototype.onAdd=function(N){this.map=N,this.load()},R.prototype.setSourceProperty=function(N){this._tileJSONRequest&&this._tileJSONRequest.cancel(),N();var $=this.map.style.sourceCaches[this.id];$.clearTiles(),this.load()},R.prototype.setTiles=function(N){var $=this;return this.setSourceProperty(function(){$._options.tiles=N}),this},R.prototype.setUrl=function(N){var $=this;return this.setSourceProperty(function(){$.url=N,$._options.url=N}),this},R.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},R.prototype.serialize=function(){return i.extend({},this._options)},R.prototype.loadTile=function(N,$){var we=this.map._requestManager.normalizeTileURL(N.tileID.canonical.url(this.tiles,this.scheme)),ge={request:this.map._requestManager.transformRequest(we,i.ResourceType.Tile),uid:N.uid,tileID:N.tileID,zoom:N.tileID.overscaledZ,tileSize:this.tileSize*N.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};ge.request.collectResourceTiming=this._collectResourceTiming,!N.actor||N.state==="expired"?(N.actor=this.dispatcher.getActor(),N.request=N.actor.send("loadTile",ge,Ue.bind(this))):N.state==="loading"?N.reloadCallback=$:N.request=N.actor.send("reloadTile",ge,Ue.bind(this));function Ue(dt,Rt){if(delete N.request,N.aborted)return $(null);if(dt&&dt.status!==404)return $(dt);Rt&&Rt.resourceTiming&&(N.resourceTiming=Rt.resourceTiming),this.map._refreshExpiredTiles&&Rt&&N.setExpiryData(Rt),N.loadVectorData(Rt,this.map.painter),i.cacheEntryPossiblyAdded(this.dispatcher),$(null),N.reloadCallback&&(this.loadTile(N,N.reloadCallback),N.reloadCallback=null)}},R.prototype.abortTile=function(N){N.request&&(N.request.cancel(),delete N.request),N.actor&&N.actor.send("abortTile",{uid:N.uid,type:this.type,source:this.id},void 0)},R.prototype.unloadTile=function(N){N.unloadVectorData(),N.actor&&N.actor.send("removeTile",{uid:N.uid,type:this.type,source:this.id},void 0)},R.prototype.hasTransition=function(){return!1},R}(i.Evented),re=function(Y){function R(K,N,$,we){Y.call(this),this.id=K,this.dispatcher=$,this.setEventedParent(we),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"},N),i.extend(this,i.pick(N,["url","scheme","tileSize"]))}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.load=function(){var N=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=G(this._options,this.map._requestManager,function($,we){N._tileJSONRequest=null,N._loaded=!0,$?N.fire(new i.ErrorEvent($)):we&&(i.extend(N,we),we.bounds&&(N.tileBounds=new O(we.bounds,N.minzoom,N.maxzoom)),i.postTurnstileEvent(we.tiles),i.postMapLoadEvent(we.tiles,N.map._getMapId(),N.map._requestManager._skuToken),N.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})),N.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})))})},R.prototype.loaded=function(){return this._loaded},R.prototype.onAdd=function(N){this.map=N,this.load()},R.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},R.prototype.serialize=function(){return i.extend({},this._options)},R.prototype.hasTile=function(N){return!this.tileBounds||this.tileBounds.contains(N.canonical)},R.prototype.loadTile=function(N,$){var we=this,ge=this.map._requestManager.normalizeTileURL(N.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);N.request=i.getImage(this.map._requestManager.transformRequest(ge,i.ResourceType.Tile),function(Ue,dt){if(delete N.request,N.aborted)N.state="unloaded",$(null);else if(Ue)N.state="errored",$(Ue);else if(dt){we.map._refreshExpiredTiles&&N.setExpiryData(dt),delete dt.cacheControl,delete dt.expires;var Rt=we.map.painter.context,ur=Rt.gl;N.texture=we.map.painter.getTileTexture(dt.width),N.texture?N.texture.update(dt,{useMipmap:!0}):(N.texture=new i.Texture(Rt,dt,ur.RGBA,{useMipmap:!0}),N.texture.bind(ur.LINEAR,ur.CLAMP_TO_EDGE,ur.LINEAR_MIPMAP_NEAREST),Rt.extTextureFilterAnisotropic&&ur.texParameterf(ur.TEXTURE_2D,Rt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Rt.extTextureFilterAnisotropicMax)),N.state="loaded",i.cacheEntryPossiblyAdded(we.dispatcher),$(null)}})},R.prototype.abortTile=function(N,$){N.request&&(N.request.cancel(),delete N.request),$()},R.prototype.unloadTile=function(N,$){N.texture&&this.map.painter.saveTileTexture(N.texture),$()},R.prototype.hasTransition=function(){return!1},R}(i.Evented),ne=function(Y){function R(K,N,$,we){Y.call(this,K,N,$,we),this.type="raster-dem",this.maxzoom=22,this._options=i.extend({type:"raster-dem"},N),this.encoding=N.encoding||"mapbox"}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},R.prototype.loadTile=function(N,$){var we=this.map._requestManager.normalizeTileURL(N.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);N.request=i.getImage(this.map._requestManager.transformRequest(we,i.ResourceType.Tile),ge.bind(this)),N.neighboringTiles=this._getNeighboringTiles(N.tileID);function ge(dt,Rt){if(delete N.request,N.aborted)N.state="unloaded",$(null);else if(dt)N.state="errored",$(dt);else if(Rt){this.map._refreshExpiredTiles&&N.setExpiryData(Rt),delete Rt.cacheControl,delete Rt.expires;var ur=i.window.ImageBitmap&&Rt instanceof i.window.ImageBitmap&&i.offscreenCanvasSupported(),gr=ur?Rt:i.browser.getImageData(Rt,1),cr={uid:N.uid,coord:N.tileID,source:this.id,rawImageData:gr,encoding:this.encoding};(!N.actor||N.state==="expired")&&(N.actor=this.dispatcher.getActor(),N.actor.send("loadDEMTile",cr,Ue.bind(this)))}}function Ue(dt,Rt){dt&&(N.state="errored",$(dt)),Rt&&(N.dem=Rt,N.needsHillshadePrepare=!0,N.state="loaded",$(null))}},R.prototype._getNeighboringTiles=function(N){var $=N.canonical,we=Math.pow(2,$.z),ge=($.x-1+we)%we,Ue=$.x===0?N.wrap-1:N.wrap,dt=($.x+1+we)%we,Rt=$.x+1===we?N.wrap+1:N.wrap,ur={};return ur[new i.OverscaledTileID(N.overscaledZ,Ue,$.z,ge,$.y).key]={backfilled:!1},ur[new i.OverscaledTileID(N.overscaledZ,Rt,$.z,dt,$.y).key]={backfilled:!1},$.y>0&&(ur[new i.OverscaledTileID(N.overscaledZ,Ue,$.z,ge,$.y-1).key]={backfilled:!1},ur[new i.OverscaledTileID(N.overscaledZ,N.wrap,$.z,$.x,$.y-1).key]={backfilled:!1},ur[new i.OverscaledTileID(N.overscaledZ,Rt,$.z,dt,$.y-1).key]={backfilled:!1}),$.y+1<we&&(ur[new i.OverscaledTileID(N.overscaledZ,Ue,$.z,ge,$.y+1).key]={backfilled:!1},ur[new i.OverscaledTileID(N.overscaledZ,N.wrap,$.z,$.x,$.y+1).key]={backfilled:!1},ur[new i.OverscaledTileID(N.overscaledZ,Rt,$.z,dt,$.y+1).key]={backfilled:!1}),ur},R.prototype.unloadTile=function(N){N.demTexture&&this.map.painter.saveTileTexture(N.demTexture),N.fbo&&(N.fbo.destroy(),delete N.fbo),N.dem&&delete N.dem,delete N.neighboringTiles,N.state="unloaded",N.actor&&N.actor.send("removeDEMTile",{uid:N.uid,source:this.id})},R}(re),be=function(Y){function R(K,N,$,we){Y.call(this),this.id=K,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=$.getActor(),this.setEventedParent(we),this._data=N.data,this._options=i.extend({},N),this._collectResourceTiming=N.collectResourceTiming,this._resourceTiming=[],N.maxzoom!==void 0&&(this.maxzoom=N.maxzoom),N.type&&(this.type=N.type),N.attribution&&(this.attribution=N.attribution),this.promoteId=N.promoteId;var ge=i.EXTENT/this.tileSize;this.workerOptions=i.extend({source:this.id,cluster:N.cluster||!1,geojsonVtOptions:{buffer:(N.buffer!==void 0?N.buffer:128)*ge,tolerance:(N.tolerance!==void 0?N.tolerance:.375)*ge,extent:i.EXTENT,maxZoom:this.maxzoom,lineMetrics:N.lineMetrics||!1,generateId:N.generateId||!1},superclusterOptions:{maxZoom:N.clusterMaxZoom!==void 0?Math.min(N.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,N.clusterMinPoints||2),extent:i.EXTENT,radius:(N.clusterRadius||50)*ge,log:!1,generateId:N.generateId||!1},clusterProperties:N.clusterProperties,filter:N.filter},N.workerOptions)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.load=function(){var N=this;this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function($){if($){N.fire(new i.ErrorEvent($));return}var we={dataType:"source",sourceDataType:"metadata"};N._collectResourceTiming&&N._resourceTiming&&N._resourceTiming.length>0&&(we.resourceTiming=N._resourceTiming,N._resourceTiming=[]),N.fire(new i.Event("data",we))})},R.prototype.onAdd=function(N){this.map=N,this.load()},R.prototype.setData=function(N){var $=this;return this._data=N,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(we){if(we){$.fire(new i.ErrorEvent(we));return}var ge={dataType:"source",sourceDataType:"content"};$._collectResourceTiming&&$._resourceTiming&&$._resourceTiming.length>0&&(ge.resourceTiming=$._resourceTiming,$._resourceTiming=[]),$.fire(new i.Event("data",ge))}),this},R.prototype.getClusterExpansionZoom=function(N,$){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:N,source:this.id},$),this},R.prototype.getClusterChildren=function(N,$){return this.actor.send("geojson.getClusterChildren",{clusterId:N,source:this.id},$),this},R.prototype.getClusterLeaves=function(N,$,we,ge){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:N,limit:$,offset:we},ge),this},R.prototype._updateWorkerData=function(N){var $=this;this._loaded=!1;var we=i.extend({},this.workerOptions),ge=this._data;typeof ge=="string"?(we.request=this.map._requestManager.transformRequest(i.browser.resolveURL(ge),i.ResourceType.Source),we.request.collectResourceTiming=this._collectResourceTiming):we.data=JSON.stringify(ge),this.actor.send(this.type+".loadData",we,function(Ue,dt){$._removed||dt&&dt.abandoned||($._loaded=!0,dt&&dt.resourceTiming&&dt.resourceTiming[$.id]&&($._resourceTiming=dt.resourceTiming[$.id].slice(0)),$.actor.send($.type+".coalesce",{source:we.source},null),N(Ue))})},R.prototype.loaded=function(){return this._loaded},R.prototype.loadTile=function(N,$){var we=this,ge=N.actor?"reloadTile":"loadTile";N.actor=this.actor;var Ue={type:this.type,uid:N.uid,tileID:N.tileID,zoom:N.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};N.request=this.actor.send(ge,Ue,function(dt,Rt){return delete N.request,N.unloadVectorData(),N.aborted?$(null):dt?$(dt):(N.loadVectorData(Rt,we.map.painter,ge==="reloadTile"),$(null))})},R.prototype.abortTile=function(N){N.request&&(N.request.cancel(),delete N.request),N.aborted=!0},R.prototype.unloadTile=function(N){N.unloadVectorData(),this.actor.send("removeTile",{uid:N.uid,type:this.type,source:this.id})},R.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},R.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},R.prototype.hasTransition=function(){return!1},R}(i.Evented),ze=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Ce=function(Y){function R(K,N,$,we){Y.call(this),this.id=K,this.dispatcher=$,this.coordinates=N.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(we),this.options=N}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.load=function(N,$){var we=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(ge,Ue){we._loaded=!0,ge?we.fire(new i.ErrorEvent(ge)):Ue&&(we.image=Ue,N&&(we.coordinates=N),$&&$(),we._finishLoading())})},R.prototype.loaded=function(){return this._loaded},R.prototype.updateImage=function(N){var $=this;return!this.image||!N.url?this:(this.options.url=N.url,this.load(N.coordinates,function(){$.texture=null}),this)},R.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},R.prototype.onAdd=function(N){this.map=N,this.load()},R.prototype.setCoordinates=function(N){var $=this;this.coordinates=N;var we=N.map(i.MercatorCoordinate.fromLngLat);this.tileID=he(we),this.minzoom=this.maxzoom=this.tileID.z;var ge=we.map(function(Ue){return $.tileID.getTilePoint(Ue)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(ge[0].x,ge[0].y,0,0),this._boundsArray.emplaceBack(ge[1].x,ge[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(ge[3].x,ge[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(ge[2].x,ge[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},R.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var N=this.map.painter.context,$=N.gl;this.boundsBuffer||(this.boundsBuffer=N.createVertexBuffer(this._boundsArray,ze.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(N,this.image,$.RGBA),this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE));for(var we in this.tiles){var ge=this.tiles[we];ge.state!=="loaded"&&(ge.state="loaded",ge.texture=this.texture)}}},R.prototype.loadTile=function(N,$){this.tileID&&this.tileID.equals(N.tileID.canonical)?(this.tiles[String(N.tileID.wrap)]=N,N.buckets={},$(null)):(N.state="errored",$(null))},R.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},R.prototype.hasTransition=function(){return!1},R}(i.Evented);function he(Y){for(var R=1/0,K=1/0,N=-1/0,$=-1/0,we=0,ge=Y;we<ge.length;we+=1){var Ue=ge[we];R=Math.min(R,Ue.x),K=Math.min(K,Ue.y),N=Math.max(N,Ue.x),$=Math.max($,Ue.y)}var dt=N-R,Rt=$-K,ur=Math.max(dt,Rt),gr=Math.max(0,Math.floor(-Math.log(ur)/Math.LN2)),cr=Math.pow(2,gr);return new i.CanonicalTileID(gr,Math.floor((R+N)/2*cr),Math.floor((K+$)/2*cr))}var te=function(Y){function R(K,N,$,we){Y.call(this,K,N,$,we),this.roundZoom=!0,this.type="video",this.options=N}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.load=function(){var N=this;this._loaded=!1;var $=this.options;this.urls=[];for(var we=0,ge=$.urls;we<ge.length;we+=1){var Ue=ge[we];this.urls.push(this.map._requestManager.transformRequest(Ue,i.ResourceType.Source).url)}i.getVideo(this.urls,function(dt,Rt){N._loaded=!0,dt?N.fire(new i.ErrorEvent(dt)):Rt&&(N.video=Rt,N.video.loop=!0,N.video.addEventListener("playing",function(){N.map.triggerRepaint()}),N.map&&N.video.play(),N._finishLoading())})},R.prototype.pause=function(){this.video&&this.video.pause()},R.prototype.play=function(){this.video&&this.video.play()},R.prototype.seek=function(N){if(this.video){var $=this.video.seekable;N<$.start(0)||N>$.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+$.start(0)+" and "+$.end(0)+"-second mark."))):this.video.currentTime=N}},R.prototype.getVideo=function(){return this.video},R.prototype.onAdd=function(N){this.map||(this.map=N,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},R.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var N=this.map.painter.context,$=N.gl;this.boundsBuffer||(this.boundsBuffer=N.createVertexBuffer(this._boundsArray,ze.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE),$.texSubImage2D($.TEXTURE_2D,0,0,0,$.RGBA,$.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(N,this.video,$.RGBA),this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE));for(var we in this.tiles){var ge=this.tiles[we];ge.state!=="loaded"&&(ge.state="loaded",ge.texture=this.texture)}}},R.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},R.prototype.hasTransition=function(){return this.video&&!this.video.paused},R}(Ce),ke=function(Y){function R(K,N,$,we){Y.call(this,K,N,$,we),N.coordinates?(!Array.isArray(N.coordinates)||N.coordinates.length!==4||N.coordinates.some(function(ge){return!Array.isArray(ge)||ge.length!==2||ge.some(function(Ue){return typeof Ue!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'missing required property "coordinates"'))),N.animate&&typeof N.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'optional "animate" property must be a boolean value'))),N.canvas?typeof N.canvas!="string"&&!(N.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,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."+K,null,'missing required property "canvas"'))),this.options=N,this.animate=N.animate!==void 0?N.animate:!0}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.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()},R.prototype.getCanvas=function(){return this.canvas},R.prototype.onAdd=function(N){this.map=N,this.load(),this.canvas&&this.animate&&this.play()},R.prototype.onRemove=function(){this.pause()},R.prototype.prepare=function(){var N=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,N=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,N=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var $=this.map.painter.context,we=$.gl;this.boundsBuffer||(this.boundsBuffer=$.createVertexBuffer(this._boundsArray,ze.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(N||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture($,this.canvas,we.RGBA,{premultiply:!0});for(var ge in this.tiles){var Ue=this.tiles[ge];Ue.state!=="loaded"&&(Ue.state="loaded",Ue.texture=this.texture)}}},R.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},R.prototype.hasTransition=function(){return this._playing},R.prototype._hasInvalidDimensions=function(){for(var N=0,$=[this.canvas.width,this.canvas.height];N<$.length;N+=1){var we=$[N];if(isNaN(we)||we<=0)return!0}return!1},R}(Ce),Ee={vector:W,raster:re,"raster-dem":ne,geojson:be,video:te,image:Ce,canvas:ke},Me=function(Y,R,K,N){var $=new Ee[R.type](Y,R,K,N);if($.id!==Y)throw new Error("Expected Source id to be "+Y+" instead of "+$.id);return i.bindAll(["load","abort","unload","serialize","prepare"],$),$},Oe=function(Y){return Ee[Y]},Re=function(Y,R){Ee[Y]=R};function me(Y,R){var K=i.identity([]);return i.translate(K,K,[1,1,0]),i.scale(K,K,[Y.width*.5,Y.height*.5,1]),i.multiply(K,K,Y.calculatePosMatrix(R.toUnwrapped()))}function Be(Y,R,K){if(Y)for(var N=0,$=Y;N<$.length;N+=1){var we=$[N],ge=R[we];if(ge&&ge.source===K&&ge.type==="fill-extrusion")return!0}else for(var Ue in R){var dt=R[Ue];if(dt.source===K&&dt.type==="fill-extrusion")return!0}return!1}function fe(Y,R,K,N,$,we){var ge=Be($&&$.layers,R,Y.id),Ue=we.maxPitchScaleFactor(),dt=Y.tilesIn(N,Ue,ge);dt.sort(gt);for(var Rt=[],ur=0,gr=dt;ur<gr.length;ur+=1){var cr=gr[ur];Rt.push({wrappedTileID:cr.tileID.wrapped().key,queryResults:cr.tile.queryRenderedFeatures(R,K,Y._state,cr.queryGeometry,cr.cameraQueryGeometry,cr.scale,$,we,Ue,me(Y.transform,cr.tileID))})}var It=Pt(Rt);for(var Qt in It)It[Qt].forEach(function(ar){var mr=ar.feature,Pr=Y.getFeatureState(mr.layer["source-layer"],mr.id);mr.source=mr.layer.source,mr.layer["source-layer"]&&(mr.sourceLayer=mr.layer["source-layer"]),mr.state=Pr});return It}function Ze(Y,R,K,N,$,we,ge){for(var Ue={},dt=we.queryRenderedSymbols(N),Rt=[],ur=0,gr=Object.keys(dt).map(Number);ur<gr.length;ur+=1){var cr=gr[ur];Rt.push(ge[cr])}Rt.sort(gt);for(var It=function(){var Dr=ar[Qt],Xr=Dr.featureIndex.lookupSymbolFeatures(dt[Dr.bucketInstanceId],R,Dr.bucketIndex,Dr.sourceLayerIndex,$.filter,$.layers,$.availableImages,Y);for(var Gr in Xr){var Fr=Ue[Gr]=Ue[Gr]||[],Kr=Xr[Gr];Kr.sort(function(vn,Qa){var ra=Dr.featureSortOrder;if(ra){var mo=ra.indexOf(vn.featureIndex),sl=ra.indexOf(Qa.featureIndex);return sl-mo}else return Qa.featureIndex-vn.featureIndex});for(var Cr=0,yi=Kr;Cr<yi.length;Cr+=1){var qi=yi[Cr];Fr.push(qi)}}},Qt=0,ar=Rt;Qt<ar.length;Qt+=1)It();var mr=function(Dr){Ue[Dr].forEach(function(Xr){var Gr=Xr.feature,Fr=Y[Dr],Kr=K[Fr.source],Cr=Kr.getFeatureState(Gr.layer["source-layer"],Gr.id);Gr.source=Gr.layer.source,Gr.layer["source-layer"]&&(Gr.sourceLayer=Gr.layer["source-layer"]),Gr.state=Cr})};for(var Pr in Ue)mr(Pr);return Ue}function et(Y,R){for(var K=Y.getRenderableIds().map(function(dt){return Y.getTileByID(dt)}),N=[],$={},we=0;we<K.length;we++){var ge=K[we],Ue=ge.tileID.canonical.key;$[Ue]||($[Ue]=!0,ge.querySourceFeatures(N,R))}return N}function gt(Y,R){var K=Y.tileID,N=R.tileID;return K.overscaledZ-N.overscaledZ||K.canonical.y-N.canonical.y||K.wrap-N.wrap||K.canonical.x-N.canonical.x}function Pt(Y){for(var R={},K={},N=0,$=Y;N<$.length;N+=1){var we=$[N],ge=we.queryResults,Ue=we.wrappedTileID,dt=K[Ue]=K[Ue]||{};for(var Rt in ge)for(var ur=ge[Rt],gr=dt[Rt]=dt[Rt]||{},cr=R[Rt]=R[Rt]||[],It=0,Qt=ur;It<Qt.length;It+=1){var ar=Qt[It];gr[ar.featureIndex]||(gr[ar.featureIndex]=!0,cr.push(ar))}}return R}var Qe=function(R,K){this.max=R,this.onRemove=K,this.reset()};Qe.prototype.reset=function(){for(var R in this.data)for(var K=0,N=this.data[R];K<N.length;K+=1){var $=N[K];$.timeout&&clearTimeout($.timeout),this.onRemove($.value)}return this.data={},this.order=[],this},Qe.prototype.add=function(R,K,N){var $=this,we=R.wrapped().key;this.data[we]===void 0&&(this.data[we]=[]);var ge={value:K,timeout:void 0};if(N!==void 0&&(ge.timeout=setTimeout(function(){$.remove(R,ge)},N)),this.data[we].push(ge),this.order.push(we),this.order.length>this.max){var Ue=this._getAndRemoveByKey(this.order[0]);Ue&&this.onRemove(Ue)}return this},Qe.prototype.has=function(R){return R.wrapped().key in this.data},Qe.prototype.getAndRemove=function(R){return this.has(R)?this._getAndRemoveByKey(R.wrapped().key):null},Qe.prototype._getAndRemoveByKey=function(R){var K=this.data[R].shift();return K.timeout&&clearTimeout(K.timeout),this.data[R].length===0&&delete this.data[R],this.order.splice(this.order.indexOf(R),1),K.value},Qe.prototype.getByKey=function(R){var K=this.data[R];return K?K[0].value:null},Qe.prototype.get=function(R){if(!this.has(R))return null;var K=this.data[R.wrapped().key][0];return K.value},Qe.prototype.remove=function(R,K){if(!this.has(R))return this;var N=R.wrapped().key,$=K===void 0?0:this.data[N].indexOf(K),we=this.data[N][$];return this.data[N].splice($,1),we.timeout&&clearTimeout(we.timeout),this.data[N].length===0&&delete this.data[N],this.onRemove(we.value),this.order.splice(this.order.indexOf(N),1),this},Qe.prototype.setMaxSize=function(R){for(this.max=R;this.order.length>this.max;){var K=this._getAndRemoveByKey(this.order[0]);K&&this.onRemove(K)}return this},Qe.prototype.filter=function(R){var K=[];for(var N in this.data)for(var $=0,we=this.data[N];$<we.length;$+=1){var ge=we[$];R(ge.value)||K.push(ge)}for(var Ue=0,dt=K;Ue<dt.length;Ue+=1){var Rt=dt[Ue];this.remove(Rt.value.tileID,Rt)}};var Xe=function(R,K,N){this.context=R;var $=R.gl;this.buffer=$.createBuffer(),this.dynamicDraw=!!N,this.context.unbindVAO(),R.bindElementBuffer.set(this.buffer),$.bufferData($.ELEMENT_ARRAY_BUFFER,K.arrayBuffer,this.dynamicDraw?$.DYNAMIC_DRAW:$.STATIC_DRAW),this.dynamicDraw||delete K.arrayBuffer};Xe.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},Xe.prototype.updateData=function(R){var K=this.context.gl;this.context.unbindVAO(),this.bind(),K.bufferSubData(K.ELEMENT_ARRAY_BUFFER,0,R.arrayBuffer)},Xe.prototype.destroy=function(){var R=this.context.gl;this.buffer&&(R.deleteBuffer(this.buffer),delete this.buffer)};var Tt={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},xt=function(R,K,N,$){this.length=K.length,this.attributes=N,this.itemSize=K.bytesPerElement,this.dynamicDraw=$,this.context=R;var we=R.gl;this.buffer=we.createBuffer(),R.bindVertexBuffer.set(this.buffer),we.bufferData(we.ARRAY_BUFFER,K.arrayBuffer,this.dynamicDraw?we.DYNAMIC_DRAW:we.STATIC_DRAW),this.dynamicDraw||delete K.arrayBuffer};xt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},xt.prototype.updateData=function(R){var K=this.context.gl;this.bind(),K.bufferSubData(K.ARRAY_BUFFER,0,R.arrayBuffer)},xt.prototype.enableAttributes=function(R,K){for(var N=0;N<this.attributes.length;N++){var $=this.attributes[N],we=K.attributes[$.name];we!==void 0&&R.enableVertexAttribArray(we)}},xt.prototype.setVertexAttribPointers=function(R,K,N){for(var $=0;$<this.attributes.length;$++){var we=this.attributes[$],ge=K.attributes[we.name];ge!==void 0&&R.vertexAttribPointer(ge,we.components,R[Tt[we.type]],!1,this.itemSize,we.offset+this.itemSize*(N||0))}},xt.prototype.destroy=function(){var R=this.context.gl;this.buffer&&(R.deleteBuffer(this.buffer),delete this.buffer)};var _t=function(R){this.gl=R.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};_t.prototype.get=function(){return this.current},_t.prototype.set=function(R){},_t.prototype.getDefault=function(){return this.default},_t.prototype.setDefault=function(){this.set(this.default)};var Ct=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return i.Color.transparent},R.prototype.set=function(N){var $=this.current;N.r===$.r&&N.g===$.g&&N.b===$.b&&N.a===$.a&&!this.dirty||(this.gl.clearColor(N.r,N.g,N.b,N.a),this.current=N,this.dirty=!1)},R}(_t),jt=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return 1},R.prototype.set=function(N){N===this.current&&!this.dirty||(this.gl.clearDepth(N),this.current=N,this.dirty=!1)},R}(_t),At=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return 0},R.prototype.set=function(N){N===this.current&&!this.dirty||(this.gl.clearStencil(N),this.current=N,this.dirty=!1)},R}(_t),Te=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return[!0,!0,!0,!0]},R.prototype.set=function(N){var $=this.current;N[0]===$[0]&&N[1]===$[1]&&N[2]===$[2]&&N[3]===$[3]&&!this.dirty||(this.gl.colorMask(N[0],N[1],N[2],N[3]),this.current=N,this.dirty=!1)},R}(_t),nt=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return!0},R.prototype.set=function(N){N===this.current&&!this.dirty||(this.gl.depthMask(N),this.current=N,this.dirty=!1)},R}(_t),ut=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return 255},R.prototype.set=function(N){N===this.current&&!this.dirty||(this.gl.stencilMask(N),this.current=N,this.dirty=!1)},R}(_t),ct=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},R.prototype.set=function(N){var $=this.current;N.func===$.func&&N.ref===$.ref&&N.mask===$.mask&&!this.dirty||(this.gl.stencilFunc(N.func,N.ref,N.mask),this.current=N,this.dirty=!1)},R}(_t),rt=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){var N=this.gl;return[N.KEEP,N.KEEP,N.KEEP]},R.prototype.set=function(N){var $=this.current;N[0]===$[0]&&N[1]===$[1]&&N[2]===$[2]&&!this.dirty||(this.gl.stencilOp(N[0],N[1],N[2]),this.current=N,this.dirty=!1)},R}(_t),je=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return!1},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){var $=this.gl;N?$.enable($.STENCIL_TEST):$.disable($.STENCIL_TEST),this.current=N,this.dirty=!1}},R}(_t),tt=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return[0,1]},R.prototype.set=function(N){var $=this.current;N[0]===$[0]&&N[1]===$[1]&&!this.dirty||(this.gl.depthRange(N[0],N[1]),this.current=N,this.dirty=!1)},R}(_t),Je=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return!1},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){var $=this.gl;N?$.enable($.DEPTH_TEST):$.disable($.DEPTH_TEST),this.current=N,this.dirty=!1}},R}(_t),Mt=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return this.gl.LESS},R.prototype.set=function(N){N===this.current&&!this.dirty||(this.gl.depthFunc(N),this.current=N,this.dirty=!1)},R}(_t),Vt=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return!1},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){var $=this.gl;N?$.enable($.BLEND):$.disable($.BLEND),this.current=N,this.dirty=!1}},R}(_t),Kt=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){var N=this.gl;return[N.ONE,N.ZERO]},R.prototype.set=function(N){var $=this.current;N[0]===$[0]&&N[1]===$[1]&&!this.dirty||(this.gl.blendFunc(N[0],N[1]),this.current=N,this.dirty=!1)},R}(_t),ir=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return i.Color.transparent},R.prototype.set=function(N){var $=this.current;N.r===$.r&&N.g===$.g&&N.b===$.b&&N.a===$.a&&!this.dirty||(this.gl.blendColor(N.r,N.g,N.b,N.a),this.current=N,this.dirty=!1)},R}(_t),fr=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return this.gl.FUNC_ADD},R.prototype.set=function(N){N===this.current&&!this.dirty||(this.gl.blendEquation(N),this.current=N,this.dirty=!1)},R}(_t),Ot=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return!1},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){var $=this.gl;N?$.enable($.CULL_FACE):$.disable($.CULL_FACE),this.current=N,this.dirty=!1}},R}(_t),De=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return this.gl.BACK},R.prototype.set=function(N){N===this.current&&!this.dirty||(this.gl.cullFace(N),this.current=N,this.dirty=!1)},R}(_t),_e=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return this.gl.CCW},R.prototype.set=function(N){N===this.current&&!this.dirty||(this.gl.frontFace(N),this.current=N,this.dirty=!1)},R}(_t),Fe=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return null},R.prototype.set=function(N){N===this.current&&!this.dirty||(this.gl.useProgram(N),this.current=N,this.dirty=!1)},R}(_t),Pe=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return this.gl.TEXTURE0},R.prototype.set=function(N){N===this.current&&!this.dirty||(this.gl.activeTexture(N),this.current=N,this.dirty=!1)},R}(_t),Ie=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){var N=this.gl;return[0,0,N.drawingBufferWidth,N.drawingBufferHeight]},R.prototype.set=function(N){var $=this.current;N[0]===$[0]&&N[1]===$[1]&&N[2]===$[2]&&N[3]===$[3]&&!this.dirty||(this.gl.viewport(N[0],N[1],N[2],N[3]),this.current=N,this.dirty=!1)},R}(_t),lt=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return null},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){var $=this.gl;$.bindFramebuffer($.FRAMEBUFFER,N),this.current=N,this.dirty=!1}},R}(_t),ye=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return null},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){var $=this.gl;$.bindRenderbuffer($.RENDERBUFFER,N),this.current=N,this.dirty=!1}},R}(_t),ue=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return null},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){var $=this.gl;$.bindTexture($.TEXTURE_2D,N),this.current=N,this.dirty=!1}},R}(_t),de=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return null},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){var $=this.gl;$.bindBuffer($.ARRAY_BUFFER,N),this.current=N,this.dirty=!1}},R}(_t),ht=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return null},R.prototype.set=function(N){var $=this.gl;$.bindBuffer($.ELEMENT_ARRAY_BUFFER,N),this.current=N,this.dirty=!1},R}(_t),Et=function(Y){function R(K){Y.call(this,K),this.vao=K.extVertexArrayObject}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return null},R.prototype.set=function(N){!this.vao||N===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(N),this.current=N,this.dirty=!1)},R}(_t),St=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return 4},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){var $=this.gl;$.pixelStorei($.UNPACK_ALIGNMENT,N),this.current=N,this.dirty=!1}},R}(_t),Zt=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return!1},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){var $=this.gl;$.pixelStorei($.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N),this.current=N,this.dirty=!1}},R}(_t),qr=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return!1},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){var $=this.gl;$.pixelStorei($.UNPACK_FLIP_Y_WEBGL,N),this.current=N,this.dirty=!1}},R}(_t),Lr=function(Y){function R(K,N){Y.call(this,K),this.context=K,this.parent=N}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getDefault=function(){return null},R}(_t),vr=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.setDirty=function(){this.dirty=!0},R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var $=this.gl;$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_2D,N,0),this.current=N,this.dirty=!1}},R}(Lr),Er=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.set=function(N){if(!(N===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var $=this.gl;$.framebufferRenderbuffer($.FRAMEBUFFER,$.DEPTH_ATTACHMENT,$.RENDERBUFFER,N),this.current=N,this.dirty=!1}},R}(Lr),si=function(R,K,N,$){this.context=R,this.width=K,this.height=N;var we=R.gl,ge=this.framebuffer=we.createFramebuffer();this.colorAttachment=new vr(R,ge),$&&(this.depthAttachment=new Er(R,ge))};si.prototype.destroy=function(){var R=this.context.gl,K=this.colorAttachment.get();if(K&&R.deleteTexture(K),this.depthAttachment){var N=this.depthAttachment.get();N&&R.deleteRenderbuffer(N)}R.deleteFramebuffer(this.framebuffer)};var Ei=519,Si=function(R,K,N){this.func=R,this.mask=K,this.range=N};Si.ReadOnly=!1,Si.ReadWrite=!0,Si.disabled=new Si(Ei,Si.ReadOnly,[0,1]);var xi=519,Hi=7680,Jr=function(R,K,N,$,we,ge){this.test=R,this.ref=K,this.mask=N,this.fail=$,this.depthFail=we,this.pass=ge};Jr.disabled=new Jr({func:xi,mask:0},0,0,Hi,Hi,Hi);var ci=0,Di=1,Lt=771,vt=function(R,K,N){this.blendFunction=R,this.blendColor=K,this.mask=N};vt.Replace=[Di,ci],vt.disabled=new vt(vt.Replace,i.Color.transparent,[!1,!1,!1,!1]),vt.unblended=new vt(vt.Replace,i.Color.transparent,[!0,!0,!0,!0]),vt.alphaBlended=new vt([Di,Lt],i.Color.transparent,[!0,!0,!0,!0]);var Dt=1029,Bt=2305,sr=function(R,K,N){this.enable=R,this.mode=K,this.frontFace=N};sr.disabled=new sr(!1,Dt,Bt),sr.backCCW=new sr(!0,Dt,Bt);var br=function(R){this.gl=R,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Ct(this),this.clearDepth=new jt(this),this.clearStencil=new At(this),this.colorMask=new Te(this),this.depthMask=new nt(this),this.stencilMask=new ut(this),this.stencilFunc=new ct(this),this.stencilOp=new rt(this),this.stencilTest=new je(this),this.depthRange=new tt(this),this.depthTest=new Je(this),this.depthFunc=new Mt(this),this.blend=new Vt(this),this.blendFunc=new Kt(this),this.blendColor=new ir(this),this.blendEquation=new fr(this),this.cullFace=new Ot(this),this.cullFaceSide=new De(this),this.frontFace=new _e(this),this.program=new Fe(this),this.activeTexture=new Pe(this),this.viewport=new Ie(this),this.bindFramebuffer=new lt(this),this.bindRenderbuffer=new ye(this),this.bindTexture=new ue(this),this.bindVertexBuffer=new de(this),this.bindElementBuffer=new ht(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Et(this),this.pixelStoreUnpack=new St(this),this.pixelStoreUnpackPremultiplyAlpha=new Zt(this),this.pixelStoreUnpackFlipY=new qr(this),this.extTextureFilterAnisotropic=R.getExtension("EXT_texture_filter_anisotropic")||R.getExtension("MOZ_EXT_texture_filter_anisotropic")||R.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=R.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=R.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(R.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=R.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=R.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=R.getParameter(R.MAX_TEXTURE_SIZE)};br.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()},br.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},br.prototype.createIndexBuffer=function(R,K){return new Xe(this,R,K)},br.prototype.createVertexBuffer=function(R,K,N){return new xt(this,R,K,N)},br.prototype.createRenderbuffer=function(R,K,N){var $=this.gl,we=$.createRenderbuffer();return this.bindRenderbuffer.set(we),$.renderbufferStorage($.RENDERBUFFER,R,K,N),this.bindRenderbuffer.set(null),we},br.prototype.createFramebuffer=function(R,K,N){return new si(this,R,K,N)},br.prototype.clear=function(R){var K=R.color,N=R.depth,$=this.gl,we=0;K&&(we|=$.COLOR_BUFFER_BIT,this.clearColor.set(K),this.colorMask.set([!0,!0,!0,!0])),typeof N!="undefined"&&(we|=$.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(N),this.depthMask.set(!0)),$.clear(we)},br.prototype.setCullFace=function(R){R.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(R.mode),this.frontFace.set(R.frontFace))},br.prototype.setDepthMode=function(R){R.func===this.gl.ALWAYS&&!R.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(R.func),this.depthMask.set(R.mask),this.depthRange.set(R.range))},br.prototype.setStencilMode=function(R){R.test.func===this.gl.ALWAYS&&!R.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(R.mask),this.stencilOp.set([R.fail,R.depthFail,R.pass]),this.stencilFunc.set({func:R.test.func,ref:R.ref,mask:R.test.mask}))},br.prototype.setColorMode=function(R){i.deepEqual(R.blendFunction,vt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(R.blendFunction),this.blendColor.set(R.blendColor)),this.colorMask.set(R.mask)},br.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var zr=function(Y){function R(K,N,$){var we=this;Y.call(this),this.id=K,this.dispatcher=$,this.on("data",function(ge){ge.dataType==="source"&&ge.sourceDataType==="metadata"&&(we._sourceLoaded=!0),we._sourceLoaded&&!we._paused&&ge.dataType==="source"&&ge.sourceDataType==="content"&&(we.reload(),we.transform&&we.update(we.transform))}),this.on("error",function(){we._sourceErrored=!0}),this._source=Me(K,N,$,this),this._tiles={},this._cache=new Qe(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new i.SourceFeatureState}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.onAdd=function(N){this.map=N,this._maxTileCacheSize=N?N._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(N)},R.prototype.onRemove=function(N){this._source&&this._source.onRemove&&this._source.onRemove(N)},R.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var N in this._tiles){var $=this._tiles[N];if($.state!=="loaded"&&$.state!=="errored")return!1}return!0},R.prototype.getSource=function(){return this._source},R.prototype.pause=function(){this._paused=!0},R.prototype.resume=function(){if(this._paused){var N=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,N&&this.reload(),this.transform&&this.update(this.transform)}},R.prototype._loadTile=function(N,$){return this._source.loadTile(N,$)},R.prototype._unloadTile=function(N){if(this._source.unloadTile)return this._source.unloadTile(N,function(){})},R.prototype._abortTile=function(N){if(this._source.abortTile)return this._source.abortTile(N,function(){})},R.prototype.serialize=function(){return this._source.serialize()},R.prototype.prepare=function(N){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var $ in this._tiles){var we=this._tiles[$];we.upload(N),we.prepare(this.map.style.imageManager)}},R.prototype.getIds=function(){return i.values(this._tiles).map(function(N){return N.tileID}).sort(Tr).map(function(N){return N.key})},R.prototype.getRenderableIds=function(N){var $=this,we=[];for(var ge in this._tiles)this._isIdRenderable(ge,N)&&we.push(this._tiles[ge]);return N?we.sort(function(Ue,dt){var Rt=Ue.tileID,ur=dt.tileID,gr=new i.Point(Rt.canonical.x,Rt.canonical.y)._rotate($.transform.angle),cr=new i.Point(ur.canonical.x,ur.canonical.y)._rotate($.transform.angle);return Rt.overscaledZ-ur.overscaledZ||cr.y-gr.y||cr.x-gr.x}).map(function(Ue){return Ue.tileID.key}):we.map(function(Ue){return Ue.tileID}).sort(Tr).map(function(Ue){return Ue.key})},R.prototype.hasRenderableParent=function(N){var $=this.findLoadedParent(N,0);return $?this._isIdRenderable($.tileID.key):!1},R.prototype._isIdRenderable=function(N,$){return this._tiles[N]&&this._tiles[N].hasData()&&!this._coveredTiles[N]&&($||!this._tiles[N].holdingForFade())},R.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var N in this._tiles)this._tiles[N].state!=="errored"&&this._reloadTile(N,"reloading")},R.prototype._reloadTile=function(N,$){var we=this._tiles[N];we&&(we.state!=="loading"&&(we.state=$),this._loadTile(we,this._tileLoaded.bind(this,we,N,$)))},R.prototype._tileLoaded=function(N,$,we,ge){if(ge){N.state="errored",ge.status!==404?this._source.fire(new i.ErrorEvent(ge,{tile:N})):this.update(this.transform);return}N.timeAdded=i.browser.now(),we==="expired"&&(N.refreshedUponExpiration=!0),this._setTileReloadTimer($,N),this.getSource().type==="raster-dem"&&N.dem&&this._backfillDEM(N),this._state.initializeTileState(N,this.map?this.map.painter:null),this._source.fire(new i.Event("data",{dataType:"source",tile:N,coord:N.tileID}))},R.prototype._backfillDEM=function(N){for(var $=this.getRenderableIds(),we=0;we<$.length;we++){var ge=$[we];if(N.neighboringTiles&&N.neighboringTiles[ge]){var Ue=this.getTileByID(ge);dt(N,Ue),dt(Ue,N)}}function dt(Rt,ur){Rt.needsHillshadePrepare=!0;var gr=ur.tileID.canonical.x-Rt.tileID.canonical.x,cr=ur.tileID.canonical.y-Rt.tileID.canonical.y,It=Math.pow(2,Rt.tileID.canonical.z),Qt=ur.tileID.key;gr===0&&cr===0||Math.abs(cr)>1||(Math.abs(gr)>1&&(Math.abs(gr+It)===1?gr+=It:Math.abs(gr-It)===1&&(gr-=It)),!(!ur.dem||!Rt.dem)&&(Rt.dem.backfillBorder(ur.dem,gr,cr),Rt.neighboringTiles&&Rt.neighboringTiles[Qt]&&(Rt.neighboringTiles[Qt].backfilled=!0)))}},R.prototype.getTile=function(N){return this.getTileByID(N.key)},R.prototype.getTileByID=function(N){return this._tiles[N]},R.prototype._retainLoadedChildren=function(N,$,we,ge){for(var Ue in this._tiles){var dt=this._tiles[Ue];if(!(ge[Ue]||!dt.hasData()||dt.tileID.overscaledZ<=$||dt.tileID.overscaledZ>we)){for(var Rt=dt.tileID;dt&&dt.tileID.overscaledZ>$+1;){var ur=dt.tileID.scaledTo(dt.tileID.overscaledZ-1);dt=this._tiles[ur.key],dt&&dt.hasData()&&(Rt=ur)}for(var gr=Rt;gr.overscaledZ>$;)if(gr=gr.scaledTo(gr.overscaledZ-1),N[gr.key]){ge[Rt.key]=Rt;break}}}},R.prototype.findLoadedParent=function(N,$){if(N.key in this._loadedParentTiles){var we=this._loadedParentTiles[N.key];return we&&we.tileID.overscaledZ>=$?we:null}for(var ge=N.overscaledZ-1;ge>=$;ge--){var Ue=N.scaledTo(ge),dt=this._getLoadedTile(Ue);if(dt)return dt}},R.prototype._getLoadedTile=function(N){var $=this._tiles[N.key];if($&&$.hasData())return $;var we=this._cache.getByKey(N.wrapped().key);return we},R.prototype.updateCacheSize=function(N){var $=Math.ceil(N.width/this._source.tileSize)+1,we=Math.ceil(N.height/this._source.tileSize)+1,ge=$*we,Ue=5,dt=Math.floor(ge*Ue),Rt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,dt):dt;this._cache.setMaxSize(Rt)},R.prototype.handleWrapJump=function(N){var $=this._prevLng===void 0?N:this._prevLng,we=N-$,ge=we/360,Ue=Math.round(ge);if(this._prevLng=N,Ue){var dt={};for(var Rt in this._tiles){var ur=this._tiles[Rt];ur.tileID=ur.tileID.unwrapTo(ur.tileID.wrap+Ue),dt[ur.tileID.key]=ur}this._tiles=dt;for(var gr in this._timers)clearTimeout(this._timers[gr]),delete this._timers[gr];for(var cr in this._tiles){var It=this._tiles[cr];this._setTileReloadTimer(cr,It)}}},R.prototype.update=function(N){var $=this;if(this.transform=N,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(N),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var we;this.used?this._source.tileID?we=N.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(vn){return new i.OverscaledTileID(vn.canonical.z,vn.wrap,vn.canonical.z,vn.canonical.x,vn.canonical.y)}):(we=N.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(we=we.filter(function(vn){return $._source.hasTile(vn)}))):we=[];var ge=N.coveringZoomLevel(this._source),Ue=Math.max(ge-R.maxOverzooming,this._source.minzoom),dt=Math.max(ge+R.maxUnderzooming,this._source.minzoom),Rt=this._updateRetainedTiles(we,ge);if(Rr(this._source.type)){for(var ur={},gr={},cr=Object.keys(Rt),It=0,Qt=cr;It<Qt.length;It+=1){var ar=Qt[It],mr=Rt[ar],Pr=this._tiles[ar];if(!(!Pr||Pr.fadeEndTime&&Pr.fadeEndTime<=i.browser.now())){var Dr=this.findLoadedParent(mr,Ue);Dr&&(this._addTile(Dr.tileID),ur[Dr.tileID.key]=Dr.tileID),gr[ar]=mr}}this._retainLoadedChildren(gr,ge,dt,Rt);for(var Xr in ur)Rt[Xr]||(this._coveredTiles[Xr]=!0,Rt[Xr]=ur[Xr])}for(var Gr in Rt)this._tiles[Gr].clearFadeHold();for(var Fr=i.keysDifference(this._tiles,Rt),Kr=0,Cr=Fr;Kr<Cr.length;Kr+=1){var yi=Cr[Kr],qi=this._tiles[yi];qi.hasSymbolBuckets&&!qi.holdingForFade()?qi.setHoldDuration(this.map._fadeDuration):(!qi.hasSymbolBuckets||qi.symbolFadeFinished())&&this._removeTile(yi)}this._updateLoadedParentTileCache()}},R.prototype.releaseSymbolFadeTiles=function(){for(var N in this._tiles)this._tiles[N].holdingForFade()&&this._removeTile(N)},R.prototype._updateRetainedTiles=function(N,$){for(var we={},ge={},Ue=Math.max($-R.maxOverzooming,this._source.minzoom),dt=Math.max($+R.maxUnderzooming,this._source.minzoom),Rt={},ur=0,gr=N;ur<gr.length;ur+=1){var cr=gr[ur],It=this._addTile(cr);we[cr.key]=cr,!It.hasData()&&$<this._source.maxzoom&&(Rt[cr.key]=cr)}this._retainLoadedChildren(Rt,$,dt,we);for(var Qt=0,ar=N;Qt<ar.length;Qt+=1){var mr=ar[Qt],Pr=this._tiles[mr.key];if(!Pr.hasData()){if($+1>this._source.maxzoom){var Dr=mr.children(this._source.maxzoom)[0],Xr=this.getTile(Dr);if(Xr&&Xr.hasData()){we[Dr.key]=Dr;continue}}else{var Gr=mr.children(this._source.maxzoom);if(we[Gr[0].key]&&we[Gr[1].key]&&we[Gr[2].key]&&we[Gr[3].key])continue}for(var Fr=Pr.wasRequested(),Kr=mr.overscaledZ-1;Kr>=Ue;--Kr){var Cr=mr.scaledTo(Kr);if(ge[Cr.key]||(ge[Cr.key]=!0,Pr=this.getTile(Cr),!Pr&&Fr&&(Pr=this._addTile(Cr)),Pr&&(we[Cr.key]=Cr,Fr=Pr.wasRequested(),Pr.hasData())))break}}}return we},R.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var N in this._tiles){for(var $=[],we=void 0,ge=this._tiles[N].tileID;ge.overscaledZ>0;){if(ge.key in this._loadedParentTiles){we=this._loadedParentTiles[ge.key];break}$.push(ge.key);var Ue=ge.scaledTo(ge.overscaledZ-1);if(we=this._getLoadedTile(Ue),we)break;ge=Ue}for(var dt=0,Rt=$;dt<Rt.length;dt+=1){var ur=Rt[dt];this._loadedParentTiles[ur]=we}}},R.prototype._addTile=function(N){var $=this._tiles[N.key];if($)return $;$=this._cache.getAndRemove(N),$&&(this._setTileReloadTimer(N.key,$),$.tileID=N,this._state.initializeTileState($,this.map?this.map.painter:null),this._cacheTimers[N.key]&&(clearTimeout(this._cacheTimers[N.key]),delete this._cacheTimers[N.key],this._setTileReloadTimer(N.key,$)));var we=!!$;return we||($=new i.Tile(N,this._source.tileSize*N.overscaleFactor()),this._loadTile($,this._tileLoaded.bind(this,$,N.key,$.state))),$?($.uses++,this._tiles[N.key]=$,we||this._source.fire(new i.Event("dataloading",{tile:$,coord:$.tileID,dataType:"source"})),$):null},R.prototype._setTileReloadTimer=function(N,$){var we=this;N in this._timers&&(clearTimeout(this._timers[N]),delete this._timers[N]);var ge=$.getExpiryTimeout();ge&&(this._timers[N]=setTimeout(function(){we._reloadTile(N,"expired"),delete we._timers[N]},ge))},R.prototype._removeTile=function(N){var $=this._tiles[N];$&&($.uses--,delete this._tiles[N],this._timers[N]&&(clearTimeout(this._timers[N]),delete this._timers[N]),!($.uses>0)&&($.hasData()&&$.state!=="reloading"?this._cache.add($.tileID,$,$.getExpiryTimeout()):($.aborted=!0,this._abortTile($),this._unloadTile($))))},R.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var N in this._tiles)this._removeTile(N);this._cache.reset()},R.prototype.tilesIn=function(N,$,we){var ge=this,Ue=[],dt=this.transform;if(!dt)return Ue;for(var Rt=we?dt.getCameraQueryGeometry(N):N,ur=N.map(function(Kr){return dt.pointCoordinate(Kr)}),gr=Rt.map(function(Kr){return dt.pointCoordinate(Kr)}),cr=this.getIds(),It=1/0,Qt=1/0,ar=-1/0,mr=-1/0,Pr=0,Dr=gr;Pr<Dr.length;Pr+=1){var Xr=Dr[Pr];It=Math.min(It,Xr.x),Qt=Math.min(Qt,Xr.y),ar=Math.max(ar,Xr.x),mr=Math.max(mr,Xr.y)}for(var Gr=function(Kr){var Cr=ge._tiles[cr[Kr]];if(!Cr.holdingForFade()){var yi=Cr.tileID,qi=Math.pow(2,dt.zoom-Cr.tileID.overscaledZ),vn=$*Cr.queryPadding*i.EXTENT/Cr.tileSize/qi,Qa=[yi.getTilePoint(new i.MercatorCoordinate(It,Qt)),yi.getTilePoint(new i.MercatorCoordinate(ar,mr))];if(Qa[0].x-vn<i.EXTENT&&Qa[0].y-vn<i.EXTENT&&Qa[1].x+vn>=0&&Qa[1].y+vn>=0){var ra=ur.map(function(sl){return yi.getTilePoint(sl)}),mo=gr.map(function(sl){return yi.getTilePoint(sl)});Ue.push({tile:Cr,tileID:yi,queryGeometry:ra,cameraQueryGeometry:mo,scale:qi})}}},Fr=0;Fr<cr.length;Fr++)Gr(Fr);return Ue},R.prototype.getVisibleCoordinates=function(N){for(var $=this,we=this.getRenderableIds(N).map(function(Rt){return $._tiles[Rt].tileID}),ge=0,Ue=we;ge<Ue.length;ge+=1){var dt=Ue[ge];dt.posMatrix=this.transform.calculatePosMatrix(dt.toUnwrapped())}return we},R.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Rr(this._source.type))for(var N in this._tiles){var $=this._tiles[N];if($.fadeEndTime!==void 0&&$.fadeEndTime>=i.browser.now())return!0}return!1},R.prototype.setFeatureState=function(N,$,we){N=N||"_geojsonTileLayer",this._state.updateState(N,$,we)},R.prototype.removeFeatureState=function(N,$,we){N=N||"_geojsonTileLayer",this._state.removeFeatureState(N,$,we)},R.prototype.getFeatureState=function(N,$){return N=N||"_geojsonTileLayer",this._state.getState(N,$)},R.prototype.setDependencies=function(N,$,we){var ge=this._tiles[N];ge&&ge.setDependencies($,we)},R.prototype.reloadTilesForDependencies=function(N,$){for(var we in this._tiles){var ge=this._tiles[we];ge.hasDependency(N,$)&&this._reloadTile(we,"reloading")}this._cache.filter(function(Ue){return!Ue.hasDependency(N,$)})},R}(i.Evented);zr.maxOverzooming=10,zr.maxUnderzooming=3;function Tr(Y,R){var K=Math.abs(Y.wrap*2)-+(Y.wrap<0),N=Math.abs(R.wrap*2)-+(R.wrap<0);return Y.overscaledZ-R.overscaledZ||N-K||R.canonical.y-Y.canonical.y||R.canonical.x-Y.canonical.x}function Rr(Y){return Y==="raster"||Y==="image"||Y==="video"}function Br(){return new i.window.Worker(Ou.workerUrl)}var oi="mapboxgl_preloaded_worker_pool",vi=function(){this.active={}};vi.prototype.acquire=function(R){if(!this.workers)for(this.workers=[];this.workers.length<vi.workerCount;)this.workers.push(new Br);return this.active[R]=!0,this.workers.slice()},vi.prototype.release=function(R){delete this.active[R],this.numActive()===0&&(this.workers.forEach(function(K){K.terminate()}),this.workers=null)},vi.prototype.isPreloaded=function(){return!!this.active[oi]},vi.prototype.numActive=function(){return Object.keys(this.active).length};var Pi=Math.floor(i.browser.hardwareConcurrency/2);vi.workerCount=Math.max(Math.min(Pi,6),1);var Yr;function Ni(){return Yr||(Yr=new vi),Yr}function Ur(){var Y=Ni();Y.acquire(oi)}function ti(){var Y=Yr;Y&&(Y.isPreloaded()&&Y.numActive()===1?(Y.release(oi),Yr=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 ki(Y,R){var K={};for(var N in Y)N!=="ref"&&(K[N]=Y[N]);return i.refProperties.forEach(function($){$ in R&&(K[$]=R[$])}),K}function ji(Y){Y=Y.slice();for(var R=Object.create(null),K=0;K<Y.length;K++)R[Y[K].id]=Y[K];for(var N=0;N<Y.length;N++)"ref"in Y[N]&&(Y[N]=ki(Y[N],R[Y[N].ref]));return Y}function Vi(){var Y={},R=i.styleSpec.$version;for(var K in i.styleSpec.$root){var N=i.styleSpec.$root[K];if(N.required){var $=null;K==="version"?$=R:N.type==="array"?$=[]:$={},$!=null&&(Y[K]=$)}}return Y}var zi={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 Mi(Y,R,K){K.push({command:zi.addSource,args:[Y,R[Y]]})}function sn(Y,R,K){R.push({command:zi.removeSource,args:[Y]}),K[Y]=!0}function fi(Y,R,K,N){sn(Y,K,N),Mi(Y,R,K)}function Or(Y,R,K){var N;for(N in Y[K])if(Y[K].hasOwnProperty(N)&&N!=="data"&&!i.deepEqual(Y[K][N],R[K][N]))return!1;for(N in R[K])if(R[K].hasOwnProperty(N)&&N!=="data"&&!i.deepEqual(Y[K][N],R[K][N]))return!1;return!0}function st(Y,R,K,N){Y=Y||{},R=R||{};var $;for($ in Y)Y.hasOwnProperty($)&&(R.hasOwnProperty($)||sn($,K,N));for($ in R)R.hasOwnProperty($)&&(Y.hasOwnProperty($)?i.deepEqual(Y[$],R[$])||(Y[$].type==="geojson"&&R[$].type==="geojson"&&Or(Y,R,$)?K.push({command:zi.setGeoJSONSourceData,args:[$,R[$].data]}):fi($,R,K,N)):Mi($,R,K))}function Wt(Y,R,K,N,$,we){Y=Y||{},R=R||{};var ge;for(ge in Y)Y.hasOwnProperty(ge)&&(i.deepEqual(Y[ge],R[ge])||K.push({command:we,args:[N,ge,R[ge],$]}));for(ge in R)!R.hasOwnProperty(ge)||Y.hasOwnProperty(ge)||i.deepEqual(Y[ge],R[ge])||K.push({command:we,args:[N,ge,R[ge],$]})}function tr(Y){return Y.id}function or(Y,R){return Y[R.id]=R,Y}function Nr(Y,R,K){Y=Y||[],R=R||[];var N=Y.map(tr),$=R.map(tr),we=Y.reduce(or,{}),ge=R.reduce(or,{}),Ue=N.slice(),dt=Object.create(null),Rt,ur,gr,cr,It,Qt,ar;for(Rt=0,ur=0;Rt<N.length;Rt++)gr=N[Rt],ge.hasOwnProperty(gr)?ur++:(K.push({command:zi.removeLayer,args:[gr]}),Ue.splice(Ue.indexOf(gr,ur),1));for(Rt=0,ur=0;Rt<$.length;Rt++)gr=$[$.length-1-Rt],Ue[Ue.length-1-Rt]!==gr&&(we.hasOwnProperty(gr)?(K.push({command:zi.removeLayer,args:[gr]}),Ue.splice(Ue.lastIndexOf(gr,Ue.length-ur),1)):ur++,Qt=Ue[Ue.length-Rt],K.push({command:zi.addLayer,args:[ge[gr],Qt]}),Ue.splice(Ue.length-Rt,0,gr),dt[gr]=!0);for(Rt=0;Rt<$.length;Rt++)if(gr=$[Rt],cr=we[gr],It=ge[gr],!(dt[gr]||i.deepEqual(cr,It))){if(!i.deepEqual(cr.source,It.source)||!i.deepEqual(cr["source-layer"],It["source-layer"])||!i.deepEqual(cr.type,It.type)){K.push({command:zi.removeLayer,args:[gr]}),Qt=Ue[Ue.lastIndexOf(gr)+1],K.push({command:zi.addLayer,args:[It,Qt]});continue}Wt(cr.layout,It.layout,K,gr,null,zi.setLayoutProperty),Wt(cr.paint,It.paint,K,gr,null,zi.setPaintProperty),i.deepEqual(cr.filter,It.filter)||K.push({command:zi.setFilter,args:[gr,It.filter]}),(!i.deepEqual(cr.minzoom,It.minzoom)||!i.deepEqual(cr.maxzoom,It.maxzoom))&&K.push({command:zi.setLayerZoomRange,args:[gr,It.minzoom,It.maxzoom]});for(ar in cr)cr.hasOwnProperty(ar)&&(ar==="layout"||ar==="paint"||ar==="filter"||ar==="metadata"||ar==="minzoom"||ar==="maxzoom"||(ar.indexOf("paint.")===0?Wt(cr[ar],It[ar],K,gr,ar.slice(6),zi.setPaintProperty):i.deepEqual(cr[ar],It[ar])||K.push({command:zi.setLayerProperty,args:[gr,ar,It[ar]]})));for(ar in It)!It.hasOwnProperty(ar)||cr.hasOwnProperty(ar)||ar==="layout"||ar==="paint"||ar==="filter"||ar==="metadata"||ar==="minzoom"||ar==="maxzoom"||(ar.indexOf("paint.")===0?Wt(cr[ar],It[ar],K,gr,ar.slice(6),zi.setPaintProperty):i.deepEqual(cr[ar],It[ar])||K.push({command:zi.setLayerProperty,args:[gr,ar,It[ar]]}))}}function hi(Y,R){if(!Y)return[{command:zi.setStyle,args:[R]}];var K=[];try{if(!i.deepEqual(Y.version,R.version))return[{command:zi.setStyle,args:[R]}];i.deepEqual(Y.center,R.center)||K.push({command:zi.setCenter,args:[R.center]}),i.deepEqual(Y.zoom,R.zoom)||K.push({command:zi.setZoom,args:[R.zoom]}),i.deepEqual(Y.bearing,R.bearing)||K.push({command:zi.setBearing,args:[R.bearing]}),i.deepEqual(Y.pitch,R.pitch)||K.push({command:zi.setPitch,args:[R.pitch]}),i.deepEqual(Y.sprite,R.sprite)||K.push({command:zi.setSprite,args:[R.sprite]}),i.deepEqual(Y.glyphs,R.glyphs)||K.push({command:zi.setGlyphs,args:[R.glyphs]}),i.deepEqual(Y.transition,R.transition)||K.push({command:zi.setTransition,args:[R.transition]}),i.deepEqual(Y.light,R.light)||K.push({command:zi.setLight,args:[R.light]});var N={},$=[];st(Y.sources,R.sources,$,N);var we=[];Y.layers&&Y.layers.forEach(function(ge){N[ge.source]?K.push({command:zi.removeLayer,args:[ge.id]}):we.push(ge)}),K=K.concat($),Nr(we,R.layers,K)}catch(ge){console.warn("Unable to compute style diff:",ge),K=[{command:zi.setStyle,args:[R]}]}return K}var Gi=function(R,K){this.reset(R,K)};Gi.prototype.reset=function(R,K){this.points=R||[],this._distances=[0];for(var N=1;N<this.points.length;N++)this._distances[N]=this._distances[N-1]+this.points[N].dist(this.points[N-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(K||0,this.length*.5),this.paddedLength=this.length-this.padding*2},Gi.prototype.lerp=function(R){if(this.points.length===1)return this.points[0];R=i.clamp(R,0,1);for(var K=1,N=this._distances[K],$=R*this.paddedLength+this.padding;N<$&&K<this._distances.length;)N=this._distances[++K];var we=K-1,ge=this._distances[we],Ue=N-ge,dt=Ue>0?($-ge)/Ue:0;return this.points[we].mult(1-dt).add(this.points[K].mult(dt))};var Qr=function(R,K,N){var $=this.boxCells=[],we=this.circleCells=[];this.xCellCount=Math.ceil(R/N),this.yCellCount=Math.ceil(K/N);for(var ge=0;ge<this.xCellCount*this.yCellCount;ge++)$.push([]),we.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=R,this.height=K,this.xScale=this.xCellCount/R,this.yScale=this.yCellCount/K,this.boxUid=0,this.circleUid=0};Qr.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Qr.prototype.insert=function(R,K,N,$,we){this._forEachCell(K,N,$,we,this._insertBoxCell,this.boxUid++),this.boxKeys.push(R),this.bboxes.push(K),this.bboxes.push(N),this.bboxes.push($),this.bboxes.push(we)},Qr.prototype.insertCircle=function(R,K,N,$){this._forEachCell(K-$,N-$,K+$,N+$,this._insertCircleCell,this.circleUid++),this.circleKeys.push(R),this.circles.push(K),this.circles.push(N),this.circles.push($)},Qr.prototype._insertBoxCell=function(R,K,N,$,we,ge){this.boxCells[we].push(ge)},Qr.prototype._insertCircleCell=function(R,K,N,$,we,ge){this.circleCells[we].push(ge)},Qr.prototype._query=function(R,K,N,$,we,ge){if(N<0||R>this.width||$<0||K>this.height)return we?!1:[];var Ue=[];if(R<=0&&K<=0&&this.width<=N&&this.height<=$){if(we)return!0;for(var dt=0;dt<this.boxKeys.length;dt++)Ue.push({key:this.boxKeys[dt],x1:this.bboxes[dt*4],y1:this.bboxes[dt*4+1],x2:this.bboxes[dt*4+2],y2:this.bboxes[dt*4+3]});for(var Rt=0;Rt<this.circleKeys.length;Rt++){var ur=this.circles[Rt*3],gr=this.circles[Rt*3+1],cr=this.circles[Rt*3+2];Ue.push({key:this.circleKeys[Rt],x1:ur-cr,y1:gr-cr,x2:ur+cr,y2:gr+cr})}return ge?Ue.filter(ge):Ue}else{var It={hitTest:we,seenUids:{box:{},circle:{}}};return this._forEachCell(R,K,N,$,this._queryCell,Ue,It,ge),we?Ue.length>0:Ue}},Qr.prototype._queryCircle=function(R,K,N,$,we){var ge=R-N,Ue=R+N,dt=K-N,Rt=K+N;if(Ue<0||ge>this.width||Rt<0||dt>this.height)return $?!1:[];var ur=[],gr={hitTest:$,circle:{x:R,y:K,radius:N},seenUids:{box:{},circle:{}}};return this._forEachCell(ge,dt,Ue,Rt,this._queryCellCircle,ur,gr,we),$?ur.length>0:ur},Qr.prototype.query=function(R,K,N,$,we){return this._query(R,K,N,$,!1,we)},Qr.prototype.hitTest=function(R,K,N,$,we){return this._query(R,K,N,$,!0,we)},Qr.prototype.hitTestCircle=function(R,K,N,$){return this._queryCircle(R,K,N,!0,$)},Qr.prototype._queryCell=function(R,K,N,$,we,ge,Ue,dt){var Rt=Ue.seenUids,ur=this.boxCells[we];if(ur!==null)for(var gr=this.bboxes,cr=0,It=ur;cr<It.length;cr+=1){var Qt=It[cr];if(!Rt.box[Qt]){Rt.box[Qt]=!0;var ar=Qt*4;if(R<=gr[ar+2]&&K<=gr[ar+3]&&N>=gr[ar+0]&&$>=gr[ar+1]&&(!dt||dt(this.boxKeys[Qt]))){if(Ue.hitTest)return ge.push(!0),!0;ge.push({key:this.boxKeys[Qt],x1:gr[ar],y1:gr[ar+1],x2:gr[ar+2],y2:gr[ar+3]})}}}var mr=this.circleCells[we];if(mr!==null)for(var Pr=this.circles,Dr=0,Xr=mr;Dr<Xr.length;Dr+=1){var Gr=Xr[Dr];if(!Rt.circle[Gr]){Rt.circle[Gr]=!0;var Fr=Gr*3;if(this._circleAndRectCollide(Pr[Fr],Pr[Fr+1],Pr[Fr+2],R,K,N,$)&&(!dt||dt(this.circleKeys[Gr]))){if(Ue.hitTest)return ge.push(!0),!0;var Kr=Pr[Fr],Cr=Pr[Fr+1],yi=Pr[Fr+2];ge.push({key:this.circleKeys[Gr],x1:Kr-yi,y1:Cr-yi,x2:Kr+yi,y2:Cr+yi})}}}},Qr.prototype._queryCellCircle=function(R,K,N,$,we,ge,Ue,dt){var Rt=Ue.circle,ur=Ue.seenUids,gr=this.boxCells[we];if(gr!==null)for(var cr=this.bboxes,It=0,Qt=gr;It<Qt.length;It+=1){var ar=Qt[It];if(!ur.box[ar]){ur.box[ar]=!0;var mr=ar*4;if(this._circleAndRectCollide(Rt.x,Rt.y,Rt.radius,cr[mr+0],cr[mr+1],cr[mr+2],cr[mr+3])&&(!dt||dt(this.boxKeys[ar])))return ge.push(!0),!0}}var Pr=this.circleCells[we];if(Pr!==null)for(var Dr=this.circles,Xr=0,Gr=Pr;Xr<Gr.length;Xr+=1){var Fr=Gr[Xr];if(!ur.circle[Fr]){ur.circle[Fr]=!0;var Kr=Fr*3;if(this._circlesCollide(Dr[Kr],Dr[Kr+1],Dr[Kr+2],Rt.x,Rt.y,Rt.radius)&&(!dt||dt(this.circleKeys[Fr])))return ge.push(!0),!0}}},Qr.prototype._forEachCell=function(R,K,N,$,we,ge,Ue,dt){for(var Rt=this._convertToXCellCoord(R),ur=this._convertToYCellCoord(K),gr=this._convertToXCellCoord(N),cr=this._convertToYCellCoord($),It=Rt;It<=gr;It++)for(var Qt=ur;Qt<=cr;Qt++){var ar=this.xCellCount*Qt+It;if(we.call(this,R,K,N,$,ar,ge,Ue,dt))return}},Qr.prototype._convertToXCellCoord=function(R){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(R*this.xScale)))},Qr.prototype._convertToYCellCoord=function(R){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(R*this.yScale)))},Qr.prototype._circlesCollide=function(R,K,N,$,we,ge){var Ue=$-R,dt=we-K,Rt=N+ge;return Rt*Rt>Ue*Ue+dt*dt},Qr.prototype._circleAndRectCollide=function(R,K,N,$,we,ge,Ue){var dt=(ge-$)/2,Rt=Math.abs(R-($+dt));if(Rt>dt+N)return!1;var ur=(Ue-we)/2,gr=Math.abs(K-(we+ur));if(gr>ur+N)return!1;if(Rt<=dt||gr<=ur)return!0;var cr=Rt-dt,It=gr-ur;return cr*cr+It*It<=N*N};function Ui(Y,R,K,N,$){var we=i.create();return R?(i.scale(we,we,[1/$,1/$,1]),K||i.rotateZ(we,we,N.angle)):i.multiply(we,N.labelPlaneMatrix,Y),we}function zn(Y,R,K,N,$){if(R){var we=i.clone(Y);return i.scale(we,we,[$,$,1]),K||i.rotateZ(we,we,-N.angle),we}else return N.glCoordMatrix}function fn(Y,R){var K=[Y.x,Y.y,0,1];un(K,K,R);var N=K[3];return{point:new i.Point(K[0]/N,K[1]/N),signedDistanceFromCamera:N}}function xn(Y,R){return .5+.5*(Y/R)}function _a(Y,R){var K=Y[0]/Y[3],N=Y[1]/Y[3],$=K>=-R[0]&&K<=R[0]&&N>=-R[1]&&N<=R[1];return $}function Wn(Y,R,K,N,$,we,ge,Ue){var dt=N?Y.textSizeData:Y.iconSizeData,Rt=i.evaluateSizeForZoom(dt,K.transform.zoom),ur=[256/K.width*2+1,256/K.height*2+1],gr=N?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;gr.clear();for(var cr=Y.lineVertexArray,It=N?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Qt=K.transform.width/K.transform.height,ar=!1,mr=0;mr<It.length;mr++){var Pr=It.get(mr);if(Pr.hidden||Pr.writingMode===i.WritingMode.vertical&&!ar){Dn(Pr.numGlyphs,gr);continue}ar=!1;var Dr=[Pr.anchorX,Pr.anchorY,0,1];if(i.transformMat4(Dr,Dr,R),!_a(Dr,ur)){Dn(Pr.numGlyphs,gr);continue}var Xr=Dr[3],Gr=xn(K.transform.cameraToCenterDistance,Xr),Fr=i.evaluateSizeForFeature(dt,Rt,Pr),Kr=ge?Fr/Gr:Fr*Gr,Cr=new i.Point(Pr.anchorX,Pr.anchorY),yi=fn(Cr,$).point,qi={},vn=za(Pr,Kr,!1,Ue,R,$,we,Y.glyphOffsetArray,cr,gr,yi,Cr,qi,Qt);ar=vn.useVertical,(vn.notEnoughRoom||ar||vn.needsFlipping&&za(Pr,Kr,!0,Ue,R,$,we,Y.glyphOffsetArray,cr,gr,yi,Cr,qi,Qt).notEnoughRoom)&&Dn(Pr.numGlyphs,gr)}N?Y.text.dynamicLayoutVertexBuffer.updateData(gr):Y.icon.dynamicLayoutVertexBuffer.updateData(gr)}function Fn(Y,R,K,N,$,we,ge,Ue,dt,Rt,ur){var gr=Ue.glyphStartIndex+Ue.numGlyphs,cr=Ue.lineStartIndex,It=Ue.lineStartIndex+Ue.lineLength,Qt=R.getoffsetX(Ue.glyphStartIndex),ar=R.getoffsetX(gr-1),mr=na(Y*Qt,K,N,$,we,ge,Ue.segment,cr,It,dt,Rt,ur);if(!mr)return null;var Pr=na(Y*ar,K,N,$,we,ge,Ue.segment,cr,It,dt,Rt,ur);return Pr?{first:mr,last:Pr}:null}function ia(Y,R,K,N){if(Y===i.WritingMode.horizontal){var $=Math.abs(K.y-R.y),we=Math.abs(K.x-R.x)*N;if($>we)return{useVertical:!0}}return(Y===i.WritingMode.vertical?R.y<K.y:R.x>K.x)?{needsFlipping:!0}:null}function za(Y,R,K,N,$,we,ge,Ue,dt,Rt,ur,gr,cr,It){var Qt=R/24,ar=Y.lineOffsetX*Qt,mr=Y.lineOffsetY*Qt,Pr;if(Y.numGlyphs>1){var Dr=Y.glyphStartIndex+Y.numGlyphs,Xr=Y.lineStartIndex,Gr=Y.lineStartIndex+Y.lineLength,Fr=Fn(Qt,Ue,ar,mr,K,ur,gr,Y,dt,we,cr);if(!Fr)return{notEnoughRoom:!0};var Kr=fn(Fr.first.point,ge).point,Cr=fn(Fr.last.point,ge).point;if(N&&!K){var yi=ia(Y.writingMode,Kr,Cr,It);if(yi)return yi}Pr=[Fr.first];for(var qi=Y.glyphStartIndex+1;qi<Dr-1;qi++)Pr.push(na(Qt*Ue.getoffsetX(qi),ar,mr,K,ur,gr,Y.segment,Xr,Gr,dt,we,cr));Pr.push(Fr.last)}else{if(N&&!K){var vn=fn(gr,$).point,Qa=Y.lineStartIndex+Y.segment+1,ra=new i.Point(dt.getx(Qa),dt.gety(Qa)),mo=fn(ra,$),sl=mo.signedDistanceFromCamera>0?mo.point:Hr(gr,ra,vn,1,$),Os=ia(Y.writingMode,vn,sl,It);if(Os)return Os}var eo=na(Qt*Ue.getoffsetX(Y.glyphStartIndex),ar,mr,K,ur,gr,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,dt,we,cr);if(!eo)return{notEnoughRoom:!0};Pr=[eo]}for(var fs=0,es=Pr;fs<es.length;fs+=1){var $s=es[fs];i.addDynamicAttributes(Rt,$s.point,$s.angle)}return{}}function Hr(Y,R,K,N,$){var we=fn(Y.add(Y.sub(R)._unit()),$).point,ge=K.sub(we);return K.add(ge._mult(N/ge.mag()))}function na(Y,R,K,N,$,we,ge,Ue,dt,Rt,ur,gr){var cr=N?Y-R:Y+R,It=cr>0?1:-1,Qt=0;N&&(It*=-1,Qt=Math.PI),It<0&&(Qt+=Math.PI);for(var ar=It>0?Ue+ge:Ue+ge+1,mr=$,Pr=$,Dr=0,Xr=0,Gr=Math.abs(cr),Fr=[];Dr+Xr<=Gr;){if(ar+=It,ar<Ue||ar>=dt)return null;if(Pr=mr,Fr.push(mr),mr=gr[ar],mr===void 0){var Kr=new i.Point(Rt.getx(ar),Rt.gety(ar)),Cr=fn(Kr,ur);if(Cr.signedDistanceFromCamera>0)mr=gr[ar]=Cr.point;else{var yi=ar-It,qi=Dr===0?we:new i.Point(Rt.getx(yi),Rt.gety(yi));mr=Hr(qi,Kr,Pr,Gr-Dr+1,ur)}}Dr+=Xr,Xr=Pr.dist(mr)}var vn=(Gr-Dr)/Xr,Qa=mr.sub(Pr),ra=Qa.mult(vn)._add(Pr);ra._add(Qa._unit()._perp()._mult(K*It));var mo=Qt+Math.atan2(mr.y-Pr.y,mr.x-Pr.x);return Fr.push(ra),{point:ra,angle:mo,path:Fr}}var go=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Dn(Y,R){for(var K=0;K<Y;K++){var N=R.length;R.resize(N+4),R.float32.set(go,N*3)}}function un(Y,R,K){var N=R[0],$=R[1];return Y[0]=K[0]*N+K[4]*$+K[12],Y[1]=K[1]*N+K[5]*$+K[13],Y[3]=K[3]*N+K[7]*$+K[15],Y}var Zn=100,Wo=function(R,K,N){K===void 0&&(K=new Qr(R.width+2*Zn,R.height+2*Zn,25)),N===void 0&&(N=new Qr(R.width+2*Zn,R.height+2*Zn,25)),this.transform=R,this.grid=K,this.ignoredGrid=N,this.pitchfactor=Math.cos(R._pitch)*R.cameraToCenterDistance,this.screenRightBoundary=R.width+Zn,this.screenBottomBoundary=R.height+Zn,this.gridRightBoundary=R.width+2*Zn,this.gridBottomBoundary=R.height+2*Zn};Wo.prototype.placeCollisionBox=function(R,K,N,$,we){var ge=this.projectAndGetPerspectiveRatio($,R.anchorPointX,R.anchorPointY),Ue=N*ge.perspectiveRatio,dt=R.x1*Ue+ge.point.x,Rt=R.y1*Ue+ge.point.y,ur=R.x2*Ue+ge.point.x,gr=R.y2*Ue+ge.point.y;return!this.isInsideGrid(dt,Rt,ur,gr)||!K&&this.grid.hitTest(dt,Rt,ur,gr,we)?{box:[],offscreen:!1}:{box:[dt,Rt,ur,gr],offscreen:this.isOffscreen(dt,Rt,ur,gr)}},Wo.prototype.placeCollisionCircles=function(R,K,N,$,we,ge,Ue,dt,Rt,ur,gr,cr,It){var Qt=[],ar=new i.Point(K.anchorX,K.anchorY),mr=fn(ar,ge),Pr=xn(this.transform.cameraToCenterDistance,mr.signedDistanceFromCamera),Dr=ur?we/Pr:we*Pr,Xr=Dr/i.ONE_EM,Gr=fn(ar,Ue).point,Fr={},Kr=K.lineOffsetX*Xr,Cr=K.lineOffsetY*Xr,yi=Fn(Xr,$,Kr,Cr,!1,Gr,ar,K,N,Ue,Fr),qi=!1,vn=!1,Qa=!0;if(yi){for(var ra=cr*.5*Pr+It,mo=new i.Point(-Zn,-Zn),sl=new i.Point(this.screenRightBoundary,this.screenBottomBoundary),Os=new Gi,eo=yi.first,fs=yi.last,es=[],$s=eo.path.length-1;$s>=1;$s--)es.push(eo.path[$s]);for(var Ml=1;Ml<fs.path.length;Ml++)es.push(fs.path[Ml]);var Mu=ra*2.5;if(dt){var Au=es.map(function(Cp){return fn(Cp,dt)});Au.some(function(Cp){return Cp.signedDistanceFromCamera<=0})?es=[]:es=Au.map(function(Cp){return Cp.point})}var $u=[];if(es.length>0){for(var du=es[0].clone(),Nu=es[0].clone(),yf=1;yf<es.length;yf++)du.x=Math.min(du.x,es[yf].x),du.y=Math.min(du.y,es[yf].y),Nu.x=Math.max(Nu.x,es[yf].x),Nu.y=Math.max(Nu.y,es[yf].y);du.x>=mo.x&&Nu.x<=sl.x&&du.y>=mo.y&&Nu.y<=sl.y?$u=[es]:Nu.x<mo.x||du.x>sl.x||Nu.y<mo.y||du.y>sl.y?$u=[]:$u=i.clipLine([es],mo.x,mo.y,sl.x,sl.y)}for(var Kf=0,wd=$u;Kf<wd.length;Kf+=1){var Td=wd[Kf];Os.reset(Td,ra*.25);var Ad=0;Os.length<=.5*ra?Ad=1:Ad=Math.ceil(Os.paddedLength/Mu)+1;for(var Yp=0;Yp<Ad;Yp++){var fy=Yp/Math.max(Ad-1,1),pv=Os.lerp(fy),Sd=pv.x+Zn,vv=pv.y+Zn;Qt.push(Sd,vv,ra,0);var Gd=Sd-ra,Md=vv-ra,kp=Sd+ra,Kp=vv+ra;if(Qa=Qa&&this.isOffscreen(Gd,Md,kp,Kp),vn=vn||this.isInsideGrid(Gd,Md,kp,Kp),!R&&this.grid.hitTestCircle(Sd,vv,ra,gr)&&(qi=!0,!Rt))return{circles:[],offscreen:!1,collisionDetected:qi}}}}return{circles:!Rt&&qi||!vn?[]:Qt,offscreen:Qa,collisionDetected:qi}},Wo.prototype.queryRenderedSymbols=function(R){if(R.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var K=[],N=1/0,$=1/0,we=-1/0,ge=-1/0,Ue=0,dt=R;Ue<dt.length;Ue+=1){var Rt=dt[Ue],ur=new i.Point(Rt.x+Zn,Rt.y+Zn);N=Math.min(N,ur.x),$=Math.min($,ur.y),we=Math.max(we,ur.x),ge=Math.max(ge,ur.y),K.push(ur)}for(var gr=this.grid.query(N,$,we,ge).concat(this.ignoredGrid.query(N,$,we,ge)),cr={},It={},Qt=0,ar=gr;Qt<ar.length;Qt+=1){var mr=ar[Qt],Pr=mr.key;if(cr[Pr.bucketInstanceId]===void 0&&(cr[Pr.bucketInstanceId]={}),!cr[Pr.bucketInstanceId][Pr.featureIndex]){var Dr=[new i.Point(mr.x1,mr.y1),new i.Point(mr.x2,mr.y1),new i.Point(mr.x2,mr.y2),new i.Point(mr.x1,mr.y2)];i.polygonIntersectsPolygon(K,Dr)&&(cr[Pr.bucketInstanceId][Pr.featureIndex]=!0,It[Pr.bucketInstanceId]===void 0&&(It[Pr.bucketInstanceId]=[]),It[Pr.bucketInstanceId].push(Pr.featureIndex))}}return It},Wo.prototype.insertCollisionBox=function(R,K,N,$,we){var ge=K?this.ignoredGrid:this.grid,Ue={bucketInstanceId:N,featureIndex:$,collisionGroupID:we};ge.insert(Ue,R[0],R[1],R[2],R[3])},Wo.prototype.insertCollisionCircles=function(R,K,N,$,we){for(var ge=K?this.ignoredGrid:this.grid,Ue={bucketInstanceId:N,featureIndex:$,collisionGroupID:we},dt=0;dt<R.length;dt+=4)ge.insertCircle(Ue,R[dt],R[dt+1],R[dt+2])},Wo.prototype.projectAndGetPerspectiveRatio=function(R,K,N){var $=[K,N,0,1];un($,$,R);var we=new i.Point(($[0]/$[3]+1)/2*this.transform.width+Zn,(-$[1]/$[3]+1)/2*this.transform.height+Zn);return{point:we,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/$[3])}},Wo.prototype.isOffscreen=function(R,K,N,$){return N<Zn||R>=this.screenRightBoundary||$<Zn||K>this.screenBottomBoundary},Wo.prototype.isInsideGrid=function(R,K,N,$){return N>=0&&R<this.gridRightBoundary&&$>=0&&K<this.gridBottomBoundary},Wo.prototype.getViewportMatrix=function(){var R=i.identity([]);return i.translate(R,R,[-Zn,-Zn,0]),R};function Ba(Y,R,K){return R*(i.EXTENT/(Y.tileSize*Math.pow(2,K-Y.tileID.overscaledZ)))}var Bo=function(R,K,N,$){R?this.opacity=Math.max(0,Math.min(1,R.opacity+(R.placed?K:-K))):this.opacity=$&&N?1:0,this.placed=N};Bo.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Ea=function(R,K,N,$,we){this.text=new Bo(R?R.text:null,K,N,we),this.icon=new Bo(R?R.icon:null,K,$,we)};Ea.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Ha=function(R,K,N){this.text=R,this.icon=K,this.skipFade=N},tn=function(){this.invProjMatrix=i.create(),this.viewportMatrix=i.create(),this.circles=[]},Cn=function(R,K,N,$,we){this.bucketInstanceId=R,this.featureIndex=K,this.sourceLayerIndex=N,this.bucketIndex=$,this.tileID=we},Xn=function(R){this.crossSourceCollisions=R,this.maxGroupID=0,this.collisionGroups={}};Xn.prototype.get=function(R){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[R]){var K=++this.maxGroupID;this.collisionGroups[R]={ID:K,predicate:function(N){return N.collisionGroupID===K}}}return this.collisionGroups[R]};function ts(Y,R,K,N,$){var we=i.getAnchorAlignment(Y),ge=we.horizontalAlign,Ue=we.verticalAlign,dt=-(ge-.5)*R,Rt=-(Ue-.5)*K,ur=i.evaluateVariableOffset(Y,N);return new i.Point(dt+ur[0]*$,Rt+ur[1]*$)}function Ja(Y,R,K,N,$,we){var ge=Y.x1,Ue=Y.x2,dt=Y.y1,Rt=Y.y2,ur=Y.anchorPointX,gr=Y.anchorPointY,cr=new i.Point(R,K);return N&&cr._rotate($?we:-we),{x1:ge+cr.x,y1:dt+cr.y,x2:Ue+cr.x,y2:Rt+cr.y,anchorPointX:ur,anchorPointY:gr}}var to=function(R,K,N,$){this.transform=R.clone(),this.collisionIndex=new Wo(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=K,this.retainedQueryData={},this.collisionGroups=new Xn(N),this.collisionCircleArrays={},this.prevPlacement=$,$&&($.prevPlacement=void 0),this.placedOrientations={}};to.prototype.getBucketParts=function(R,K,N,$){var we=N.getBucket(K),ge=N.latestFeatureIndex;if(!(!we||!ge||K.id!==we.layerIds[0])){var Ue=N.collisionBoxArray,dt=we.layers[0].layout,Rt=Math.pow(2,this.transform.zoom-N.tileID.overscaledZ),ur=N.tileSize/i.EXTENT,gr=this.transform.calculatePosMatrix(N.tileID.toUnwrapped()),cr=dt.get("text-pitch-alignment")==="map",It=dt.get("text-rotation-alignment")==="map",Qt=Ba(N,1,this.transform.zoom),ar=Ui(gr,cr,It,this.transform,Qt),mr=null;if(cr){var Pr=zn(gr,cr,It,this.transform,Qt);mr=i.multiply([],this.transform.labelPlaneMatrix,Pr)}this.retainedQueryData[we.bucketInstanceId]=new Cn(we.bucketInstanceId,ge,we.sourceLayerIndex,we.index,N.tileID);var Dr={bucket:we,layout:dt,posMatrix:gr,textLabelPlaneMatrix:ar,labelToScreenMatrix:mr,scale:Rt,textPixelRatio:ur,holdingForFade:N.holdingForFade(),collisionBoxArray:Ue,partiallyEvaluatedTextSize:i.evaluateSizeForZoom(we.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(we.sourceID)};if($)for(var Xr=0,Gr=we.sortKeyRanges;Xr<Gr.length;Xr+=1){var Fr=Gr[Xr],Kr=Fr.sortKey,Cr=Fr.symbolInstanceStart,yi=Fr.symbolInstanceEnd;R.push({sortKey:Kr,symbolInstanceStart:Cr,symbolInstanceEnd:yi,parameters:Dr})}else R.push({symbolInstanceStart:0,symbolInstanceEnd:we.symbolInstances.length,parameters:Dr})}},to.prototype.attemptAnchorPlacement=function(R,K,N,$,we,ge,Ue,dt,Rt,ur,gr,cr,It,Qt,ar){var mr=[cr.textOffset0,cr.textOffset1],Pr=ts(R,N,$,mr,we),Dr=this.collisionIndex.placeCollisionBox(Ja(K,Pr.x,Pr.y,ge,Ue,this.transform.angle),gr,dt,Rt,ur.predicate);if(ar){var Xr=this.collisionIndex.placeCollisionBox(Ja(ar,Pr.x,Pr.y,ge,Ue,this.transform.angle),gr,dt,Rt,ur.predicate);if(Xr.box.length===0)return}if(Dr.box.length>0){var Gr;return this.prevPlacement&&this.prevPlacement.variableOffsets[cr.crossTileID]&&this.prevPlacement.placements[cr.crossTileID]&&this.prevPlacement.placements[cr.crossTileID].text&&(Gr=this.prevPlacement.variableOffsets[cr.crossTileID].anchor),this.variableOffsets[cr.crossTileID]={textOffset:mr,width:N,height:$,anchor:R,textBoxScale:we,prevAnchor:Gr},this.markUsedJustification(It,R,cr,Qt),It.allowVerticalPlacement&&(this.markUsedOrientation(It,Qt,cr),this.placedOrientations[cr.crossTileID]=Qt),{shift:Pr,placedGlyphBoxes:Dr}}},to.prototype.placeLayerBucketPart=function(R,K,N){var $=this,we=R.parameters,ge=we.bucket,Ue=we.layout,dt=we.posMatrix,Rt=we.textLabelPlaneMatrix,ur=we.labelToScreenMatrix,gr=we.textPixelRatio,cr=we.holdingForFade,It=we.collisionBoxArray,Qt=we.partiallyEvaluatedTextSize,ar=we.collisionGroup,mr=Ue.get("text-optional"),Pr=Ue.get("icon-optional"),Dr=Ue.get("text-allow-overlap"),Xr=Ue.get("icon-allow-overlap"),Gr=Ue.get("text-rotation-alignment")==="map",Fr=Ue.get("text-pitch-alignment")==="map",Kr=Ue.get("icon-text-fit")!=="none",Cr=Ue.get("symbol-z-order")==="viewport-y",yi=Dr&&(Xr||!ge.hasIconData()||Pr),qi=Xr&&(Dr||!ge.hasTextData()||mr);!ge.collisionArrays&&It&&ge.deserializeCollisionBoxes(It);var vn=function(eo,fs){if(!K[eo.crossTileID]){if(cr){$.placements[eo.crossTileID]=new Ha(!1,!1,!1);return}var es=!1,$s=!1,Ml=!0,Mu=null,Au={box:null,offscreen:null},$u={box:null,offscreen:null},du=null,Nu=null,yf=null,Kf=0,wd=0,Td=0;fs.textFeatureIndex?Kf=fs.textFeatureIndex:eo.useRuntimeCollisionCircles&&(Kf=eo.featureIndex),fs.verticalTextFeatureIndex&&(wd=fs.verticalTextFeatureIndex);var Ad=fs.textBox;if(Ad){var Yp=function(yc){var Ff=i.WritingMode.horizontal;if(ge.allowVerticalPlacement&&!yc&&$.prevPlacement){var Ed=$.prevPlacement.placedOrientations[eo.crossTileID];Ed&&($.placedOrientations[eo.crossTileID]=Ed,Ff=Ed,$.markUsedOrientation(ge,Ff,eo))}return Ff},fy=function(yc,Ff){if(ge.allowVerticalPlacement&&eo.numVerticalGlyphVertices>0&&fs.verticalTextBox)for(var Ed=0,sg=ge.writingModes;Ed<sg.length;Ed+=1){var A1=sg[Ed];if(A1===i.WritingMode.vertical?(Au=Ff(),$u=Au):Au=yc(),Au&&Au.box&&Au.box.length)break}else Au=yc()};if(Ue.get("text-variable-anchor")){var Gd=Ue.get("text-variable-anchor");if($.prevPlacement&&$.prevPlacement.variableOffsets[eo.crossTileID]){var Md=$.prevPlacement.variableOffsets[eo.crossTileID];Gd.indexOf(Md.anchor)>0&&(Gd=Gd.filter(function(yc){return yc!==Md.anchor}),Gd.unshift(Md.anchor))}var kp=function(yc,Ff,Ed){for(var sg=yc.x2-yc.x1,A1=yc.y2-yc.y1,Zf=eo.textBoxScale,Ox=Kr&&!Xr?Ff:null,am={box:[],offscreen:!1},Mw=Dr?Gd.length*2:Gd.length,Lp=0;Lp<Mw;++Lp){var om=Gd[Lp%Gd.length],Ew=Lp>=Gd.length,Nx=$.attemptAnchorPlacement(om,yc,sg,A1,Zf,Gr,Fr,gr,dt,ar,Ew,eo,ge,Ed,Ox);if(Nx&&(am=Nx.placedGlyphBoxes,am&&am.box&&am.box.length)){es=!0,Mu=Nx.shift;break}}return am},Kp=function(){return kp(Ad,fs.iconBox,i.WritingMode.horizontal)},Cp=function(){var yc=fs.verticalTextBox,Ff=Au&&Au.box&&Au.box.length;return ge.allowVerticalPlacement&&!Ff&&eo.numVerticalGlyphVertices>0&&yc?kp(yc,fs.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};fy(Kp,Cp),Au&&(es=Au.box,Ml=Au.offscreen);var ng=Yp(Au&&Au.box);if(!es&&$.prevPlacement){var cy=$.prevPlacement.variableOffsets[eo.crossTileID];cy&&($.variableOffsets[eo.crossTileID]=cy,$.markUsedJustification(ge,cy.anchor,eo,ng))}}else{var pv=function(yc,Ff){var Ed=$.collisionIndex.placeCollisionBox(yc,Dr,gr,dt,ar.predicate);return Ed&&Ed.box&&Ed.box.length&&($.markUsedOrientation(ge,Ff,eo),$.placedOrientations[eo.crossTileID]=Ff),Ed},Sd=function(){return pv(Ad,i.WritingMode.horizontal)},vv=function(){var yc=fs.verticalTextBox;return ge.allowVerticalPlacement&&eo.numVerticalGlyphVertices>0&&yc?pv(yc,i.WritingMode.vertical):{box:null,offscreen:null}};fy(Sd,vv),Yp(Au&&Au.box&&Au.box.length)}}if(du=Au,es=du&&du.box&&du.box.length>0,Ml=du&&du.offscreen,eo.useRuntimeCollisionCircles){var vh=ge.text.placedSymbolArray.get(eo.centerJustifiedTextSymbolIndex),hy=i.evaluateSizeForFeature(ge.textSizeData,Qt,vh),ag=Ue.get("text-padding"),jh=eo.collisionCircleDiameter;Nu=$.collisionIndex.placeCollisionCircles(Dr,vh,ge.lineVertexArray,ge.glyphOffsetArray,hy,dt,Rt,ur,N,Fr,ar.predicate,jh,ag),es=Dr||Nu.circles.length>0&&!Nu.collisionDetected,Ml=Ml&&Nu.offscreen}if(fs.iconFeatureIndex&&(Td=fs.iconFeatureIndex),fs.iconBox){var rm=function(yc){var Ff=Kr&&Mu?Ja(yc,Mu.x,Mu.y,Gr,Fr,$.transform.angle):yc;return $.collisionIndex.placeCollisionBox(Ff,Xr,gr,dt,ar.predicate)};$u&&$u.box&&$u.box.length&&fs.verticalIconBox?(yf=rm(fs.verticalIconBox),$s=yf.box.length>0):(yf=rm(fs.iconBox),$s=yf.box.length>0),Ml=Ml&&yf.offscreen}var w1=mr||eo.numHorizontalGlyphVertices===0&&eo.numVerticalGlyphVertices===0,T1=Pr||eo.numIconVertices===0;if(!w1&&!T1?$s=es=$s&&es:T1?w1||($s=$s&&es):es=$s&&es,es&&du&&du.box&&($u&&$u.box&&wd?$.collisionIndex.insertCollisionBox(du.box,Ue.get("text-ignore-placement"),ge.bucketInstanceId,wd,ar.ID):$.collisionIndex.insertCollisionBox(du.box,Ue.get("text-ignore-placement"),ge.bucketInstanceId,Kf,ar.ID)),$s&&yf&&$.collisionIndex.insertCollisionBox(yf.box,Ue.get("icon-ignore-placement"),ge.bucketInstanceId,Td,ar.ID),Nu&&(es&&$.collisionIndex.insertCollisionCircles(Nu.circles,Ue.get("text-ignore-placement"),ge.bucketInstanceId,Kf,ar.ID),N)){var og=ge.bucketInstanceId,im=$.collisionCircleArrays[og];im===void 0&&(im=$.collisionCircleArrays[og]=new tn);for(var nm=0;nm<Nu.circles.length;nm+=4)im.circles.push(Nu.circles[nm+0]),im.circles.push(Nu.circles[nm+1]),im.circles.push(Nu.circles[nm+2]),im.circles.push(Nu.collisionDetected?1:0)}$.placements[eo.crossTileID]=new Ha(es||yi,$s||qi,Ml||ge.justReloaded),K[eo.crossTileID]=!0}};if(Cr)for(var Qa=ge.getSortedSymbolIndexes(this.transform.angle),ra=Qa.length-1;ra>=0;--ra){var mo=Qa[ra];vn(ge.symbolInstances.get(mo),ge.collisionArrays[mo])}else for(var sl=R.symbolInstanceStart;sl<R.symbolInstanceEnd;sl++)vn(ge.symbolInstances.get(sl),ge.collisionArrays[sl]);if(N&&ge.bucketInstanceId in this.collisionCircleArrays){var Os=this.collisionCircleArrays[ge.bucketInstanceId];i.invert(Os.invProjMatrix,dt),Os.viewportMatrix=this.collisionIndex.getViewportMatrix()}ge.justReloaded=!1},to.prototype.markUsedJustification=function(R,K,N,$){var we={left:N.leftJustifiedTextSymbolIndex,center:N.centerJustifiedTextSymbolIndex,right:N.rightJustifiedTextSymbolIndex},ge;$===i.WritingMode.vertical?ge=N.verticalPlacedTextSymbolIndex:ge=we[i.getAnchorJustification(K)];for(var Ue=[N.leftJustifiedTextSymbolIndex,N.centerJustifiedTextSymbolIndex,N.rightJustifiedTextSymbolIndex,N.verticalPlacedTextSymbolIndex],dt=0,Rt=Ue;dt<Rt.length;dt+=1){var ur=Rt[dt];ur>=0&&(ge>=0&&ur!==ge?R.text.placedSymbolArray.get(ur).crossTileID=0:R.text.placedSymbolArray.get(ur).crossTileID=N.crossTileID)}},to.prototype.markUsedOrientation=function(R,K,N){for(var $=K===i.WritingMode.horizontal||K===i.WritingMode.horizontalOnly?K:0,we=K===i.WritingMode.vertical?K:0,ge=[N.leftJustifiedTextSymbolIndex,N.centerJustifiedTextSymbolIndex,N.rightJustifiedTextSymbolIndex],Ue=0,dt=ge;Ue<dt.length;Ue+=1){var Rt=dt[Ue];R.text.placedSymbolArray.get(Rt).placedOrientation=$}N.verticalPlacedTextSymbolIndex&&(R.text.placedSymbolArray.get(N.verticalPlacedTextSymbolIndex).placedOrientation=we)},to.prototype.commit=function(R){this.commitTime=R,this.zoomAtLastRecencyCheck=this.transform.zoom;var K=this.prevPlacement,N=!1;this.prevZoomAdjustment=K?K.zoomAdjustment(this.transform.zoom):0;var $=K?K.symbolFadeChange(R):1,we=K?K.opacities:{},ge=K?K.variableOffsets:{},Ue=K?K.placedOrientations:{};for(var dt in this.placements){var Rt=this.placements[dt],ur=we[dt];ur?(this.opacities[dt]=new Ea(ur,$,Rt.text,Rt.icon),N=N||Rt.text!==ur.text.placed||Rt.icon!==ur.icon.placed):(this.opacities[dt]=new Ea(null,$,Rt.text,Rt.icon,Rt.skipFade),N=N||Rt.text||Rt.icon)}for(var gr in we){var cr=we[gr];if(!this.opacities[gr]){var It=new Ea(cr,$,!1,!1);It.isHidden()||(this.opacities[gr]=It,N=N||cr.text.placed||cr.icon.placed)}}for(var Qt in ge)!this.variableOffsets[Qt]&&this.opacities[Qt]&&!this.opacities[Qt].isHidden()&&(this.variableOffsets[Qt]=ge[Qt]);for(var ar in Ue)!this.placedOrientations[ar]&&this.opacities[ar]&&!this.opacities[ar].isHidden()&&(this.placedOrientations[ar]=Ue[ar]);N?this.lastPlacementChangeTime=R:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=K?K.lastPlacementChangeTime:R)},to.prototype.updateLayerOpacities=function(R,K){for(var N={},$=0,we=K;$<we.length;$+=1){var ge=we[$],Ue=ge.getBucket(R);Ue&&ge.latestFeatureIndex&&R.id===Ue.layerIds[0]&&this.updateBucketOpacities(Ue,N,ge.collisionBoxArray)}},to.prototype.updateBucketOpacities=function(R,K,N){var $=this;R.hasTextData()&&R.text.opacityVertexArray.clear(),R.hasIconData()&&R.icon.opacityVertexArray.clear(),R.hasIconCollisionBoxData()&&R.iconCollisionBox.collisionVertexArray.clear(),R.hasTextCollisionBoxData()&&R.textCollisionBox.collisionVertexArray.clear();var we=R.layers[0].layout,ge=new Ea(null,0,!1,!1,!0),Ue=we.get("text-allow-overlap"),dt=we.get("icon-allow-overlap"),Rt=we.get("text-variable-anchor"),ur=we.get("text-rotation-alignment")==="map",gr=we.get("text-pitch-alignment")==="map",cr=we.get("icon-text-fit")!=="none",It=new Ea(null,0,Ue&&(dt||!R.hasIconData()||we.get("icon-optional")),dt&&(Ue||!R.hasTextData()||we.get("text-optional")),!0);!R.collisionArrays&&N&&(R.hasIconCollisionBoxData()||R.hasTextCollisionBoxData())&&R.deserializeCollisionBoxes(N);for(var Qt=function(Dr,Xr,Gr){for(var Fr=0;Fr<Xr/4;Fr++)Dr.opacityVertexArray.emplaceBack(Gr)},ar=function(Dr){var Xr=R.symbolInstances.get(Dr),Gr=Xr.numHorizontalGlyphVertices,Fr=Xr.numVerticalGlyphVertices,Kr=Xr.crossTileID,Cr=K[Kr],yi=$.opacities[Kr];Cr?yi=ge:yi||(yi=It,$.opacities[Kr]=yi),K[Kr]=!0;var qi=Gr>0||Fr>0,vn=Xr.numIconVertices>0,Qa=$.placedOrientations[Xr.crossTileID],ra=Qa===i.WritingMode.vertical,mo=Qa===i.WritingMode.horizontal||Qa===i.WritingMode.horizontalOnly;if(qi){var sl=Co(yi.text),Os=ra?Fi:sl;Qt(R.text,Gr,Os);var eo=mo?Fi:sl;Qt(R.text,Fr,eo);var fs=yi.text.isHidden();[Xr.rightJustifiedTextSymbolIndex,Xr.centerJustifiedTextSymbolIndex,Xr.leftJustifiedTextSymbolIndex].forEach(function(Td){Td>=0&&(R.text.placedSymbolArray.get(Td).hidden=fs||ra?1:0)}),Xr.verticalPlacedTextSymbolIndex>=0&&(R.text.placedSymbolArray.get(Xr.verticalPlacedTextSymbolIndex).hidden=fs||mo?1:0);var es=$.variableOffsets[Xr.crossTileID];es&&$.markUsedJustification(R,es.anchor,Xr,Qa);var $s=$.placedOrientations[Xr.crossTileID];$s&&($.markUsedJustification(R,"left",Xr,$s),$.markUsedOrientation(R,$s,Xr))}if(vn){var Ml=Co(yi.icon),Mu=!(cr&&Xr.verticalPlacedIconSymbolIndex&&ra);if(Xr.placedIconSymbolIndex>=0){var Au=Mu?Ml:Fi;Qt(R.icon,Xr.numIconVertices,Au),R.icon.placedSymbolArray.get(Xr.placedIconSymbolIndex).hidden=yi.icon.isHidden()}if(Xr.verticalPlacedIconSymbolIndex>=0){var $u=Mu?Fi:Ml;Qt(R.icon,Xr.numVerticalIconVertices,$u),R.icon.placedSymbolArray.get(Xr.verticalPlacedIconSymbolIndex).hidden=yi.icon.isHidden()}}if(R.hasIconCollisionBoxData()||R.hasTextCollisionBoxData()){var du=R.collisionArrays[Dr];if(du){var Nu=new i.Point(0,0);if(du.textBox||du.verticalTextBox){var yf=!0;if(Rt){var Kf=$.variableOffsets[Kr];Kf?(Nu=ts(Kf.anchor,Kf.width,Kf.height,Kf.textOffset,Kf.textBoxScale),ur&&Nu._rotate(gr?$.transform.angle:-$.transform.angle)):yf=!1}du.textBox&&Ri(R.textCollisionBox.collisionVertexArray,yi.text.placed,!yf||ra,Nu.x,Nu.y),du.verticalTextBox&&Ri(R.textCollisionBox.collisionVertexArray,yi.text.placed,!yf||mo,Nu.x,Nu.y)}var wd=!!(!mo&&du.verticalIconBox);du.iconBox&&Ri(R.iconCollisionBox.collisionVertexArray,yi.icon.placed,wd,cr?Nu.x:0,cr?Nu.y:0),du.verticalIconBox&&Ri(R.iconCollisionBox.collisionVertexArray,yi.icon.placed,!wd,cr?Nu.x:0,cr?Nu.y:0)}}},mr=0;mr<R.symbolInstances.length;mr++)ar(mr);if(R.sortFeatures(this.transform.angle),this.retainedQueryData[R.bucketInstanceId]&&(this.retainedQueryData[R.bucketInstanceId].featureSortOrder=R.featureSortOrder),R.hasTextData()&&R.text.opacityVertexBuffer&&R.text.opacityVertexBuffer.updateData(R.text.opacityVertexArray),R.hasIconData()&&R.icon.opacityVertexBuffer&&R.icon.opacityVertexBuffer.updateData(R.icon.opacityVertexArray),R.hasIconCollisionBoxData()&&R.iconCollisionBox.collisionVertexBuffer&&R.iconCollisionBox.collisionVertexBuffer.updateData(R.iconCollisionBox.collisionVertexArray),R.hasTextCollisionBoxData()&&R.textCollisionBox.collisionVertexBuffer&&R.textCollisionBox.collisionVertexBuffer.updateData(R.textCollisionBox.collisionVertexArray),R.bucketInstanceId in this.collisionCircleArrays){var Pr=this.collisionCircleArrays[R.bucketInstanceId];R.placementInvProjMatrix=Pr.invProjMatrix,R.placementViewportMatrix=Pr.viewportMatrix,R.collisionCircleArray=Pr.circles,delete this.collisionCircleArrays[R.bucketInstanceId]}},to.prototype.symbolFadeChange=function(R){return this.fadeDuration===0?1:(R-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},to.prototype.zoomAdjustment=function(R){return Math.max(0,(this.transform.zoom-R)/1.5)},to.prototype.hasTransitions=function(R){return this.stale||R-this.lastPlacementChangeTime<this.fadeDuration},to.prototype.stillRecent=function(R,K){var N=this.zoomAtLastRecencyCheck===K?1-this.zoomAdjustment(K):1;return this.zoomAtLastRecencyCheck=K,this.commitTime+this.fadeDuration*N>R},to.prototype.setStale=function(){this.stale=!0};function Ri(Y,R,K,N,$){Y.emplaceBack(R?1:0,K?1:0,N||0,$||0),Y.emplaceBack(R?1:0,K?1:0,N||0,$||0),Y.emplaceBack(R?1:0,K?1:0,N||0,$||0),Y.emplaceBack(R?1:0,K?1:0,N||0,$||0)}var an=Math.pow(2,25),cs=Math.pow(2,24),pa=Math.pow(2,17),ln=Math.pow(2,16),ka=Math.pow(2,9),va=Math.pow(2,8),bo=Math.pow(2,1);function Co(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var R=Y.placed?1:0,K=Math.floor(Y.opacity*127);return K*an+R*cs+K*pa+R*ln+K*ka+R*va+K*bo+R}var Fi=0,Yn=function(R){this._sortAcrossTiles=R.layout.get("symbol-z-order")!=="viewport-y"&&R.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Yn.prototype.continuePlacement=function(R,K,N,$,we){for(var ge=this._bucketParts;this._currentTileIndex<R.length;){var Ue=R[this._currentTileIndex];if(K.getBucketParts(ge,$,Ue,this._sortAcrossTiles),this._currentTileIndex++,we())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ge.sort(function(Rt,ur){return Rt.sortKey-ur.sortKey}));this._currentPartIndex<ge.length;){var dt=ge[this._currentPartIndex];if(K.placeLayerBucketPart(dt,this._seenCrossTileIDs,N),this._currentPartIndex++,we())return!0}return!1};var xa=function(R,K,N,$,we,ge,Ue){this.placement=new to(R,we,ge,Ue),this._currentPlacementIndex=K.length-1,this._forceFullPlacement=N,this._showCollisionBoxes=$,this._done=!1};xa.prototype.isDone=function(){return this._done},xa.prototype.continuePlacement=function(R,K,N){for(var $=this,we=i.browser.now(),ge=function(){var gr=i.browser.now()-we;return $._forceFullPlacement?!1:gr>2};this._currentPlacementIndex>=0;){var Ue=R[this._currentPlacementIndex],dt=K[Ue],Rt=this.placement.collisionIndex.transform.zoom;if(dt.type==="symbol"&&(!dt.minzoom||dt.minzoom<=Rt)&&(!dt.maxzoom||dt.maxzoom>Rt)){this._inProgressLayer||(this._inProgressLayer=new Yn(dt));var ur=this._inProgressLayer.continuePlacement(N[dt.source],this.placement,this._showCollisionBoxes,dt,ge);if(ur)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},xa.prototype.commit=function(R){return this.placement.commit(R),this.placement};var Qi=512/i.EXTENT/2,Nn=function(R,K,N){this.tileID=R,this.indexedSymbolInstances={},this.bucketInstanceId=N;for(var $=0;$<K.length;$++){var we=K.get($),ge=we.key;this.indexedSymbolInstances[ge]||(this.indexedSymbolInstances[ge]=[]),this.indexedSymbolInstances[ge].push({crossTileID:we.crossTileID,coord:this.getScaledCoordinates(we,R)})}};Nn.prototype.getScaledCoordinates=function(R,K){var N=K.canonical.z-this.tileID.canonical.z,$=Qi/Math.pow(2,N);return{x:Math.floor((K.canonical.x*i.EXTENT+R.anchorX)*$),y:Math.floor((K.canonical.y*i.EXTENT+R.anchorY)*$)}},Nn.prototype.findMatches=function(R,K,N){for(var $=this.tileID.canonical.z<K.canonical.z?1:Math.pow(2,this.tileID.canonical.z-K.canonical.z),we=0;we<R.length;we++){var ge=R.get(we);if(!ge.crossTileID){var Ue=this.indexedSymbolInstances[ge.key];if(Ue)for(var dt=this.getScaledCoordinates(ge,K),Rt=0,ur=Ue;Rt<ur.length;Rt+=1){var gr=ur[Rt];if(Math.abs(gr.coord.x-dt.x)<=$&&Math.abs(gr.coord.y-dt.y)<=$&&!N[gr.crossTileID]){N[gr.crossTileID]=!0,ge.crossTileID=gr.crossTileID;break}}}}};var Pn=function(){this.maxCrossTileID=0};Pn.prototype.generate=function(){return++this.maxCrossTileID};var qa=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};qa.prototype.handleWrapJump=function(R){var K=Math.round((R-this.lng)/360);if(K!==0)for(var N in this.indexes){var $=this.indexes[N],we={};for(var ge in $){var Ue=$[ge];Ue.tileID=Ue.tileID.unwrapTo(Ue.tileID.wrap+K),we[Ue.tileID.key]=Ue}this.indexes[N]=we}this.lng=R},qa.prototype.addBucket=function(R,K,N){if(this.indexes[R.overscaledZ]&&this.indexes[R.overscaledZ][R.key]){if(this.indexes[R.overscaledZ][R.key].bucketInstanceId===K.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(R.overscaledZ,this.indexes[R.overscaledZ][R.key])}for(var $=0;$<K.symbolInstances.length;$++){var we=K.symbolInstances.get($);we.crossTileID=0}this.usedCrossTileIDs[R.overscaledZ]||(this.usedCrossTileIDs[R.overscaledZ]={});var ge=this.usedCrossTileIDs[R.overscaledZ];for(var Ue in this.indexes){var dt=this.indexes[Ue];if(Number(Ue)>R.overscaledZ)for(var Rt in dt){var ur=dt[Rt];ur.tileID.isChildOf(R)&&ur.findMatches(K.symbolInstances,R,ge)}else{var gr=R.scaledTo(Number(Ue)),cr=dt[gr.key];cr&&cr.findMatches(K.symbolInstances,R,ge)}}for(var It=0;It<K.symbolInstances.length;It++){var Qt=K.symbolInstances.get(It);Qt.crossTileID||(Qt.crossTileID=N.generate(),ge[Qt.crossTileID]=!0)}return this.indexes[R.overscaledZ]===void 0&&(this.indexes[R.overscaledZ]={}),this.indexes[R.overscaledZ][R.key]=new Nn(R,K.symbolInstances,K.bucketInstanceId),!0},qa.prototype.removeBucketCrossTileIDs=function(R,K){for(var N in K.indexedSymbolInstances)for(var $=0,we=K.indexedSymbolInstances[N];$<we.length;$+=1){var ge=we[$];delete this.usedCrossTileIDs[R][ge.crossTileID]}},qa.prototype.removeStaleBuckets=function(R){var K=!1;for(var N in this.indexes){var $=this.indexes[N];for(var we in $)R[$[we].bucketInstanceId]||(this.removeBucketCrossTileIDs(N,$[we]),delete $[we],K=!0)}return K};var jo=function(){this.layerIndexes={},this.crossTileIDs=new Pn,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};jo.prototype.addLayer=function(R,K,N){var $=this.layerIndexes[R.id];$===void 0&&($=this.layerIndexes[R.id]=new qa);var we=!1,ge={};$.handleWrapJump(N);for(var Ue=0,dt=K;Ue<dt.length;Ue+=1){var Rt=dt[Ue],ur=Rt.getBucket(R);!ur||R.id!==ur.layerIds[0]||(ur.bucketInstanceId||(ur.bucketInstanceId=++this.maxBucketInstanceId),$.addBucket(Rt.tileID,ur,this.crossTileIDs)&&(we=!0),ge[ur.bucketInstanceId]=!0)}return $.removeStaleBuckets(ge)&&(we=!0),we},jo.prototype.pruneUnusedLayers=function(R){var K={};R.forEach(function($){K[$]=!0});for(var N in this.layerIndexes)K[N]||delete this.layerIndexes[N]};var Vo=function(Y,R){return i.emitValidationErrors(Y,R&&R.filter(function(K){return K.identifier!=="source.canvas"}))},Pa=i.pick(zi,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Oa=i.pick(zi,["setCenter","setZoom","setBearing","setPitch"]),co=Vi(),An=function(Y){function R(K,N){var $=this;N===void 0&&(N={}),Y.call(this),this.map=K,this.dispatcher=new j(Ni(),this),this.imageManager=new k,this.imageManager.setEventedParent(this),this.glyphManager=new z(K._requestManager,N.localIdeographFontFamily),this.lineAtlas=new H(256,512),this.crossTileSymbolIndex=new jo,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 we=this;this._rtlTextPluginCallback=R.registerForPluginStateChange(function(ge){var Ue={pluginStatus:ge.pluginStatus,pluginURL:ge.pluginURL};we.dispatcher.broadcast("syncRTLPluginState",Ue,function(dt,Rt){if(i.triggerPluginCompletionEvent(dt),Rt){var ur=Rt.every(function(cr){return cr});if(ur)for(var gr in we.sourceCaches)we.sourceCaches[gr].reload()}})}),this.on("data",function(ge){if(!(ge.dataType!=="source"||ge.sourceDataType!=="metadata")){var Ue=$.sourceCaches[ge.sourceId];if(Ue){var dt=Ue.getSource();if(!(!dt||!dt.vectorLayerIds))for(var Rt in $._layers){var ur=$._layers[Rt];ur.source===dt.id&&$._validateLayer(ur)}}}})}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.loadURL=function(N,$){var we=this;$===void 0&&($={}),this.fire(new i.Event("dataloading",{dataType:"style"}));var ge=typeof $.validate=="boolean"?$.validate:!i.isMapboxURL(N);N=this.map._requestManager.normalizeStyleURL(N,$.accessToken);var Ue=this.map._requestManager.transformRequest(N,i.ResourceType.Style);this._request=i.getJSON(Ue,function(dt,Rt){we._request=null,dt?we.fire(new i.ErrorEvent(dt)):Rt&&we._load(Rt,ge)})},R.prototype.loadJSON=function(N,$){var we=this;$===void 0&&($={}),this.fire(new i.Event("dataloading",{dataType:"style"})),this._request=i.browser.frame(function(){we._request=null,we._load(N,$.validate!==!1)})},R.prototype.loadEmpty=function(){this.fire(new i.Event("dataloading",{dataType:"style"})),this._load(co,!1)},R.prototype._load=function(N,$){if(!($&&Vo(this,i.validateStyle(N)))){this._loaded=!0,this.stylesheet=N;for(var we in N.sources)this.addSource(we,N.sources[we],{validate:!1});N.sprite?this._loadSprite(N.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(N.glyphs);var ge=ji(this.stylesheet.layers);this._order=ge.map(function(ur){return ur.id}),this._layers={},this._serializedLayers={};for(var Ue=0,dt=ge;Ue<dt.length;Ue+=1){var Rt=dt[Ue];Rt=i.createStyleLayer(Rt),Rt.setEventedParent(this,{layer:{id:Rt.id}}),this._layers[Rt.id]=Rt,this._serializedLayers[Rt.id]=Rt.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"))}},R.prototype._loadSprite=function(N){var $=this;this._spriteRequest=x(N,this.map._requestManager,function(we,ge){if($._spriteRequest=null,we)$.fire(new i.ErrorEvent(we));else if(ge)for(var Ue in ge)$.imageManager.addImage(Ue,ge[Ue]);$.imageManager.setLoaded(!0),$._availableImages=$.imageManager.listImages(),$.dispatcher.broadcast("setImages",$._availableImages),$.fire(new i.Event("data",{dataType:"style"}))})},R.prototype._validateLayer=function(N){var $=this.sourceCaches[N.source];if($){var we=N.sourceLayer;if(we){var ge=$.getSource();(ge.type==="geojson"||ge.vectorLayerIds&&ge.vectorLayerIds.indexOf(we)===-1)&&this.fire(new i.ErrorEvent(new Error('Source layer "'+we+'" does not exist on source "'+ge.id+'" as specified by style layer "'+N.id+'"')))}}},R.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var N in this.sourceCaches)if(!this.sourceCaches[N].loaded())return!1;return!!this.imageManager.isLoaded()},R.prototype._serializeLayers=function(N){for(var $=[],we=0,ge=N;we<ge.length;we+=1){var Ue=ge[we],dt=this._layers[Ue];dt.type!=="custom"&&$.push(dt.serialize())}return $},R.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var N in this.sourceCaches)if(this.sourceCaches[N].hasTransition())return!0;for(var $ in this._layers)if(this._layers[$].hasTransition())return!0;return!1},R.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},R.prototype.update=function(N){if(this._loaded){var $=this._changed;if(this._changed){var we=Object.keys(this._updatedLayers),ge=Object.keys(this._removedLayers);(we.length||ge.length)&&this._updateWorkerLayers(we,ge);for(var Ue in this._updatedSources){var dt=this._updatedSources[Ue];dt==="reload"?this._reloadSource(Ue):dt==="clear"&&this._clearSource(Ue)}this._updateTilesForChangedImages();for(var Rt in this._updatedPaintProps)this._layers[Rt].updateTransitions(N);this.light.updateTransitions(N),this._resetUpdates()}var ur={};for(var gr in this.sourceCaches){var cr=this.sourceCaches[gr];ur[gr]=cr.used,cr.used=!1}for(var It=0,Qt=this._order;It<Qt.length;It+=1){var ar=Qt[It],mr=this._layers[ar];mr.recalculate(N,this._availableImages),!mr.isHidden(N.zoom)&&mr.source&&(this.sourceCaches[mr.source].used=!0)}for(var Pr in ur){var Dr=this.sourceCaches[Pr];ur[Pr]!==Dr.used&&Dr.fire(new i.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:Pr}))}this.light.recalculate(N),this.z=N.zoom,$&&this.fire(new i.Event("data",{dataType:"style"}))}},R.prototype._updateTilesForChangedImages=function(){var N=Object.keys(this._changedImages);if(N.length){for(var $ in this.sourceCaches)this.sourceCaches[$].reloadTilesForDependencies(["icons","patterns"],N);this._changedImages={}}},R.prototype._updateWorkerLayers=function(N,$){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(N),removedIds:$})},R.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},R.prototype.setState=function(N){var $=this;if(this._checkLoaded(),Vo(this,i.validateStyle(N)))return!1;N=i.clone$1(N),N.layers=ji(N.layers);var we=hi(this.serialize(),N).filter(function(Ue){return!(Ue.command in Oa)});if(we.length===0)return!1;var ge=we.filter(function(Ue){return!(Ue.command in Pa)});if(ge.length>0)throw new Error("Unimplemented: "+ge.map(function(Ue){return Ue.command}).join(", ")+".");return we.forEach(function(Ue){Ue.command!=="setTransition"&&$[Ue.command].apply($,Ue.args)}),this.stylesheet=N,!0},R.prototype.addImage=function(N,$){if(this.getImage(N))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(N,$),this._afterImageUpdated(N)},R.prototype.updateImage=function(N,$){this.imageManager.updateImage(N,$)},R.prototype.getImage=function(N){return this.imageManager.getImage(N)},R.prototype.removeImage=function(N){if(!this.getImage(N))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(N),this._afterImageUpdated(N)},R.prototype._afterImageUpdated=function(N){this._availableImages=this.imageManager.listImages(),this._changedImages[N]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},R.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},R.prototype.addSource=function(N,$,we){var ge=this;if(we===void 0&&(we={}),this._checkLoaded(),this.sourceCaches[N]!==void 0)throw new Error("There is already a source with this ID");if(!$.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys($).join(", ")+".");var Ue=["vector","raster","geojson","video","image"],dt=Ue.indexOf($.type)>=0;if(!(dt&&this._validate(i.validateStyle.source,"sources."+N,$,null,we))){this.map&&this.map._collectResourceTiming&&($.collectResourceTiming=!0);var Rt=this.sourceCaches[N]=new zr(N,$,this.dispatcher);Rt.style=this,Rt.setEventedParent(this,function(){return{isSourceLoaded:ge.loaded(),source:Rt.serialize(),sourceId:N}}),Rt.onAdd(this.map),this._changed=!0}},R.prototype.removeSource=function(N){if(this._checkLoaded(),this.sourceCaches[N]===void 0)throw new Error("There is no source with this ID");for(var $ in this._layers)if(this._layers[$].source===N)return this.fire(new i.ErrorEvent(new Error('Source "'+N+'" cannot be removed while layer "'+$+'" is using it.')));var we=this.sourceCaches[N];delete this.sourceCaches[N],delete this._updatedSources[N],we.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:N})),we.setEventedParent(null),we.clearTiles(),we.onRemove&&we.onRemove(this.map),this._changed=!0},R.prototype.setGeoJSONSourceData=function(N,$){this._checkLoaded();var we=this.sourceCaches[N].getSource();we.setData($),this._changed=!0},R.prototype.getSource=function(N){return this.sourceCaches[N]&&this.sourceCaches[N].getSource()},R.prototype.addLayer=function(N,$,we){we===void 0&&(we={}),this._checkLoaded();var ge=N.id;if(this.getLayer(ge)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+ge+'" already exists on this map')));return}var Ue;if(N.type==="custom"){if(Vo(this,i.validateCustomStyleLayer(N)))return;Ue=i.createStyleLayer(N)}else{if(typeof N.source=="object"&&(this.addSource(ge,N.source),N=i.clone$1(N),N=i.extend(N,{source:ge})),this._validate(i.validateStyle.layer,"layers."+ge,N,{arrayIndex:-1},we))return;Ue=i.createStyleLayer(N),this._validateLayer(Ue),Ue.setEventedParent(this,{layer:{id:ge}}),this._serializedLayers[Ue.id]=Ue.serialize()}var dt=$?this._order.indexOf($):this._order.length;if($&&dt===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+$+'" does not exist on this map.')));return}if(this._order.splice(dt,0,ge),this._layerOrderChanged=!0,this._layers[ge]=Ue,this._removedLayers[ge]&&Ue.source&&Ue.type!=="custom"){var Rt=this._removedLayers[ge];delete this._removedLayers[ge],Rt.type!==Ue.type?this._updatedSources[Ue.source]="clear":(this._updatedSources[Ue.source]="reload",this.sourceCaches[Ue.source].pause())}this._updateLayer(Ue),Ue.onAdd&&Ue.onAdd(this.map)},R.prototype.moveLayer=function(N,$){this._checkLoaded(),this._changed=!0;var we=this._layers[N];if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be moved.")));return}if(N!==$){var ge=this._order.indexOf(N);this._order.splice(ge,1);var Ue=$?this._order.indexOf($):this._order.length;if($&&Ue===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+$+'" does not exist on this map.')));return}this._order.splice(Ue,0,N),this._layerOrderChanged=!0}},R.prototype.removeLayer=function(N){this._checkLoaded();var $=this._layers[N];if(!$){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be removed.")));return}$.setEventedParent(null);var we=this._order.indexOf(N);this._order.splice(we,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[N]=$,delete this._layers[N],delete this._serializedLayers[N],delete this._updatedLayers[N],delete this._updatedPaintProps[N],$.onRemove&&$.onRemove(this.map)},R.prototype.getLayer=function(N){return this._layers[N]},R.prototype.hasLayer=function(N){return N in this._layers},R.prototype.setLayerZoomRange=function(N,$,we){this._checkLoaded();var ge=this.getLayer(N);if(!ge){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot have zoom extent.")));return}ge.minzoom===$&&ge.maxzoom===we||($!=null&&(ge.minzoom=$),we!=null&&(ge.maxzoom=we),this._updateLayer(ge))},R.prototype.setFilter=function(N,$,we){we===void 0&&(we={}),this._checkLoaded();var ge=this.getLayer(N);if(!ge){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(ge.filter,$)){if($==null){ge.filter=void 0,this._updateLayer(ge);return}this._validate(i.validateStyle.filter,"layers."+ge.id+".filter",$,null,we)||(ge.filter=i.clone$1($),this._updateLayer(ge))}},R.prototype.getFilter=function(N){return i.clone$1(this.getLayer(N).filter)},R.prototype.setLayoutProperty=function(N,$,we,ge){ge===void 0&&(ge={}),this._checkLoaded();var Ue=this.getLayer(N);if(!Ue){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(Ue.getLayoutProperty($),we)||(Ue.setLayoutProperty($,we,ge),this._updateLayer(Ue))},R.prototype.getLayoutProperty=function(N,$){var we=this.getLayer(N);if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style.")));return}return we.getLayoutProperty($)},R.prototype.setPaintProperty=function(N,$,we,ge){ge===void 0&&(ge={}),this._checkLoaded();var Ue=this.getLayer(N);if(!Ue){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(Ue.getPaintProperty($),we)){var dt=Ue.setPaintProperty($,we,ge);dt&&this._updateLayer(Ue),this._changed=!0,this._updatedPaintProps[N]=!0}},R.prototype.getPaintProperty=function(N,$){return this.getLayer(N).getPaintProperty($)},R.prototype.setFeatureState=function(N,$){this._checkLoaded();var we=N.source,ge=N.sourceLayer,Ue=this.sourceCaches[we];if(Ue===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+we+"' does not exist in the map's style.")));return}var dt=Ue.getSource().type;if(dt==="geojson"&&ge){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(dt==="vector"&&!ge){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}N.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),Ue.setFeatureState(ge,N.id,$)},R.prototype.removeFeatureState=function(N,$){this._checkLoaded();var we=N.source,ge=this.sourceCaches[we];if(ge===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+we+"' does not exist in the map's style.")));return}var Ue=ge.getSource().type,dt=Ue==="vector"?N.sourceLayer:void 0;if(Ue==="vector"&&!dt){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if($&&typeof N.id!="string"&&typeof N.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ge.removeFeatureState(dt,N.id,$)},R.prototype.getFeatureState=function(N){this._checkLoaded();var $=N.source,we=N.sourceLayer,ge=this.sourceCaches[$];if(ge===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+$+"' does not exist in the map's style.")));return}var Ue=ge.getSource().type;if(Ue==="vector"&&!we){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return N.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ge.getFeatureState(we,N.id)},R.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},R.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(N){return N.serialize()}),layers:this._serializeLayers(this._order)},function(N){return N!==void 0})},R.prototype._updateLayer=function(N){this._updatedLayers[N.id]=!0,N.source&&!this._updatedSources[N.source]&&this.sourceCaches[N.source].getSource().type!=="raster"&&(this._updatedSources[N.source]="reload",this.sourceCaches[N.source].pause()),this._changed=!0},R.prototype._flattenAndSortRenderedFeatures=function(N){for(var $=this,we=function(mo){return $._layers[mo].type==="fill-extrusion"},ge={},Ue=[],dt=this._order.length-1;dt>=0;dt--){var Rt=this._order[dt];if(we(Rt)){ge[Rt]=dt;for(var ur=0,gr=N;ur<gr.length;ur+=1){var cr=gr[ur],It=cr[Rt];if(It)for(var Qt=0,ar=It;Qt<ar.length;Qt+=1){var mr=ar[Qt];Ue.push(mr)}}}}Ue.sort(function(mo,sl){return sl.intersectionZ-mo.intersectionZ});for(var Pr=[],Dr=this._order.length-1;Dr>=0;Dr--){var Xr=this._order[Dr];if(we(Xr))for(var Gr=Ue.length-1;Gr>=0;Gr--){var Fr=Ue[Gr].feature;if(ge[Fr.layer.id]<Dr)break;Pr.push(Fr),Ue.pop()}else for(var Kr=0,Cr=N;Kr<Cr.length;Kr+=1){var yi=Cr[Kr],qi=yi[Xr];if(qi)for(var vn=0,Qa=qi;vn<Qa.length;vn+=1){var ra=Qa[vn];Pr.push(ra.feature)}}}return Pr},R.prototype.queryRenderedFeatures=function(N,$,we){$&&$.filter&&this._validate(i.validateStyle.filter,"queryRenderedFeatures.filter",$.filter,null,$);var ge={};if($&&$.layers){if(!Array.isArray($.layers))return this.fire(new i.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var Ue=0,dt=$.layers;Ue<dt.length;Ue+=1){var Rt=dt[Ue],ur=this._layers[Rt];if(!ur)return this.fire(new i.ErrorEvent(new Error("The layer '"+Rt+"' does not exist in the map's style and cannot be queried for features."))),[];ge[ur.source]=!0}}var gr=[];$.availableImages=this._availableImages;for(var cr in this.sourceCaches)$.layers&&!ge[cr]||gr.push(fe(this.sourceCaches[cr],this._layers,this._serializedLayers,N,$,we));return this.placement&&gr.push(Ze(this._layers,this._serializedLayers,this.sourceCaches,N,$,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(gr)},R.prototype.querySourceFeatures=function(N,$){$&&$.filter&&this._validate(i.validateStyle.filter,"querySourceFeatures.filter",$.filter,null,$);var we=this.sourceCaches[N];return we?et(we,$):[]},R.prototype.addSourceType=function(N,$,we){if(R.getSourceType(N))return we(new Error('A source type called "'+N+'" already exists.'));if(R.setSourceType(N,$),!$.workerSourceURL)return we(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:N,url:$.workerSourceURL},we)},R.prototype.getLight=function(){return this.light.getLight()},R.prototype.setLight=function(N,$){$===void 0&&($={}),this._checkLoaded();var we=this.light.getLight(),ge=!1;for(var Ue in N)if(!i.deepEqual(N[Ue],we[Ue])){ge=!0;break}if(ge){var dt={now:i.browser.now(),transition:i.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(N,$),this.light.updateTransitions(dt)}},R.prototype._validate=function(N,$,we,ge,Ue){return Ue===void 0&&(Ue={}),Ue&&Ue.validate===!1?!1:Vo(this,N.call(i.validateStyle,i.extend({key:$,style:this.serialize(),value:we,styleSpec:i.styleSpec},ge)))},R.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 N in this._layers){var $=this._layers[N];$.setEventedParent(null)}for(var we in this.sourceCaches)this.sourceCaches[we].clearTiles(),this.sourceCaches[we].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},R.prototype._clearSource=function(N){this.sourceCaches[N].clearTiles()},R.prototype._reloadSource=function(N){this.sourceCaches[N].resume(),this.sourceCaches[N].reload()},R.prototype._updateSources=function(N){for(var $ in this.sourceCaches)this.sourceCaches[$].update(N)},R.prototype._generateCollisionBoxes=function(){for(var N in this.sourceCaches)this._reloadSource(N)},R.prototype._updatePlacement=function(N,$,we,ge,Ue){Ue===void 0&&(Ue=!1);for(var dt=!1,Rt=!1,ur={},gr=0,cr=this._order;gr<cr.length;gr+=1){var It=cr[gr],Qt=this._layers[It];if(Qt.type==="symbol"){if(!ur[Qt.source]){var ar=this.sourceCaches[Qt.source];ur[Qt.source]=ar.getRenderableIds(!0).map(function(Kr){return ar.getTileByID(Kr)}).sort(function(Kr,Cr){return Cr.tileID.overscaledZ-Kr.tileID.overscaledZ||(Kr.tileID.isLessThan(Cr.tileID)?-1:1)})}var mr=this.crossTileSymbolIndex.addLayer(Qt,ur[Qt.source],N.center.lng);dt=dt||mr}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),Ue=Ue||this._layerOrderChanged||we===0,(Ue||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(i.browser.now(),N.zoom))&&(this.pauseablePlacement=new xa(N,this._order,Ue,$,we,ge,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,ur),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(i.browser.now()),Rt=!0),dt&&this.pauseablePlacement.placement.setStale()),Rt||dt)for(var Pr=0,Dr=this._order;Pr<Dr.length;Pr+=1){var Xr=Dr[Pr],Gr=this._layers[Xr];Gr.type==="symbol"&&this.placement.updateLayerOpacities(Gr,ur[Gr.source])}var Fr=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(i.browser.now());return Fr},R.prototype._releaseSymbolFadeTiles=function(){for(var N in this.sourceCaches)this.sourceCaches[N].releaseSymbolFadeTiles()},R.prototype.getImages=function(N,$,we){this.imageManager.getImages($.icons,we),this._updateTilesForChangedImages();var ge=this.sourceCaches[$.source];ge&&ge.setDependencies($.tileID.key,$.type,$.icons)},R.prototype.getGlyphs=function(N,$,we){this.glyphManager.getGlyphs($.stacks,we)},R.prototype.getResource=function(N,$,we){return i.makeRequest($,we)},R}(i.Evented);An.getSourceType=Oe,An.setSourceType=Re,An.registerForPluginStateChange=i.registerForPluginStateChange;var _o=i.createLayout([{name:"a_pos",type:"Int16",components:2}]),ks=`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif`,bs=`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
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
);}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;}`,ps=`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,sa="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",Bn=`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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,ms="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);}",ya=`varying vec3 v_data;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,on=`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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
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);}`,mn="void main() {gl_FragColor=vec4(1.0);}",Ga="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",ca=`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,bn=`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;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
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;}`,Xi=`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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,qn="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;}",Ia="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;}}",yn="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;}",Ya="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;}",ba="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);}",Da="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);}",Aa="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);}",Ln=`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,wo=`attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`,wa=`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,$i=`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,ea=`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Sa=`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
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;}`,Za=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,xo=`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
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);}`,Wa=`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,hn=`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;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
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;}`,Un=`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;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ss=`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;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
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
? a_pos
: 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;}`,Kn=`#ifdef GL_ES
precision highp float;
#endif
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,ns="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;}",Jo=`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;
#define PI 3.141592653589793
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,vo="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;}",ma=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,ja=`
#define scale 0.015873016
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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
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);}`,To=`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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ao=`
#define scale 0.015873016
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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
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);}`,la=`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;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ki=`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
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;}`,ho=`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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ka=`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
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);}`,Ca=`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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,ta="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;}",En=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Mo=`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;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
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));}`,Ds=`#define SDF_PX 8.0
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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ro=`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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
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);}`,vs=`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Ks=`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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
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);}`,as=ro(ks,bs),Jn=ro(ps,sa),Cs=ro(Bn,ms),Xa=ro(ya,on),Zo=ro(mn,Ga),Eo=ro(ca,bn),lo=ro(Xi,qn),$a=ro(Ia,yn),Xo=ro(Ya,ba),rs=ro(Da,Aa),$n=ro(Ln,wo),Sn=ro(wa,$i),uo=ro(ea,Sa),Rs=ro(Za,xo),xs=ro(Wa,hn),Go=ro(Un,Ss),os=ro(Kn,ns),So=ro(Jo,vo),Qn=ro(ma,ja),zo=ro(To,Ao),rl=ro(la,Ki),$o=ro(ho,Ka),Na=ro(Ca,ta),Ua=ro(En,Mo),Po=ro(Ds,Ro),fo=ro(vs,Ks);function ro(Y,R){var K=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,N=R.match(/attribute ([\w]+) ([\w]+)/g),$=Y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),we=R.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ge=we?we.concat($):$,Ue={};return Y=Y.replace(K,function(dt,Rt,ur,gr,cr){return Ue[cr]=!0,Rt==="define"?`
#ifndef HAS_UNIFORM_u_`+cr+`
varying `+ur+" "+gr+" "+cr+`;
#else
uniform `+ur+" "+gr+" u_"+cr+`;
#endif
`:`
#ifdef HAS_UNIFORM_u_`+cr+`
    `+ur+" "+gr+" "+cr+" = u_"+cr+`;
#endif
`}),R=R.replace(K,function(dt,Rt,ur,gr,cr){var It=gr==="float"?"vec2":"vec4",Qt=cr.match(/color/)?"color":It;return Ue[cr]?Rt==="define"?`
#ifndef HAS_UNIFORM_u_`+cr+`
uniform lowp float u_`+cr+`_t;
attribute `+ur+" "+It+" a_"+cr+`;
varying `+ur+" "+gr+" "+cr+`;
#else
uniform `+ur+" "+gr+" u_"+cr+`;
#endif
`:Qt==="vec4"?`
#ifndef HAS_UNIFORM_u_`+cr+`
    `+cr+" = a_"+cr+`;
#else
    `+ur+" "+gr+" "+cr+" = u_"+cr+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+cr+`
    `+cr+" = unpack_mix_"+Qt+"(a_"+cr+", u_"+cr+`_t);
#else
    `+ur+" "+gr+" "+cr+" = u_"+cr+`;
#endif
`:Rt==="define"?`
#ifndef HAS_UNIFORM_u_`+cr+`
uniform lowp float u_`+cr+`_t;
attribute `+ur+" "+It+" a_"+cr+`;
#else
uniform `+ur+" "+gr+" u_"+cr+`;
#endif
`:Qt==="vec4"?`
#ifndef HAS_UNIFORM_u_`+cr+`
    `+ur+" "+gr+" "+cr+" = a_"+cr+`;
#else
    `+ur+" "+gr+" "+cr+" = u_"+cr+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+cr+`
    `+ur+" "+gr+" "+cr+" = unpack_mix_"+Qt+"(a_"+cr+", u_"+cr+`_t);
#else
    `+ur+" "+gr+" "+cr+" = u_"+cr+`;
#endif
`}),{fragmentSource:Y,vertexSource:R,staticAttributes:N,staticUniforms:ge}}var Ma=Object.freeze({__proto__:null,prelude:as,background:Jn,backgroundPattern:Cs,circle:Xa,clippingMask:Zo,heatmap:Eo,heatmapTexture:lo,collisionBox:$a,collisionCircle:Xo,debug:rs,fill:$n,fillOutline:Sn,fillOutlinePattern:uo,fillPattern:Rs,fillExtrusion:xs,fillExtrusionPattern:Go,hillshadePrepare:os,hillshade:So,line:Qn,lineGradient:zo,linePattern:rl,lineSDF:$o,raster:Na,symbolIcon:Ua,symbolSDF:Po,symbolTextAndIcon:fo}),io=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};io.prototype.bind=function(R,K,N,$,we,ge,Ue,dt){this.context=R;for(var Rt=this.boundPaintVertexBuffers.length!==$.length,ur=0;!Rt&&ur<$.length;ur++)this.boundPaintVertexBuffers[ur]!==$[ur]&&(Rt=!0);var gr=!this.vao||this.boundProgram!==K||this.boundLayoutVertexBuffer!==N||Rt||this.boundIndexBuffer!==we||this.boundVertexOffset!==ge||this.boundDynamicVertexBuffer!==Ue||this.boundDynamicVertexBuffer2!==dt;!R.extVertexArrayObject||gr?this.freshBind(K,N,$,we,ge,Ue,dt):(R.bindVertexArrayOES.set(this.vao),Ue&&Ue.bind(),we&&we.dynamicDraw&&we.bind(),dt&&dt.bind())},io.prototype.freshBind=function(R,K,N,$,we,ge,Ue){var dt,Rt=R.numAttributes,ur=this.context,gr=ur.gl;if(ur.extVertexArrayObject)this.vao&&this.destroy(),this.vao=ur.extVertexArrayObject.createVertexArrayOES(),ur.bindVertexArrayOES.set(this.vao),dt=0,this.boundProgram=R,this.boundLayoutVertexBuffer=K,this.boundPaintVertexBuffers=N,this.boundIndexBuffer=$,this.boundVertexOffset=we,this.boundDynamicVertexBuffer=ge,this.boundDynamicVertexBuffer2=Ue;else{dt=ur.currentNumAttributes||0;for(var cr=Rt;cr<dt;cr++)gr.disableVertexAttribArray(cr)}K.enableAttributes(gr,R);for(var It=0,Qt=N;It<Qt.length;It+=1){var ar=Qt[It];ar.enableAttributes(gr,R)}ge&&ge.enableAttributes(gr,R),Ue&&Ue.enableAttributes(gr,R),K.bind(),K.setVertexAttribPointers(gr,R,we);for(var mr=0,Pr=N;mr<Pr.length;mr+=1){var Dr=Pr[mr];Dr.bind(),Dr.setVertexAttribPointers(gr,R,we)}ge&&(ge.bind(),ge.setVertexAttribPointers(gr,R,we)),$&&$.bind(),Ue&&(Ue.bind(),Ue.setVertexAttribPointers(gr,R,we)),ur.currentNumAttributes=Rt},io.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function aa(Y){for(var R=[],K=0;K<Y.length;K++)if(Y[K]!==null){var N=Y[K].split(" ");R.push(N.pop())}return R}var Oo=function(R,K,N,$,we,ge){var Ue=R.gl;this.program=Ue.createProgram();for(var dt=aa(N.staticAttributes),Rt=$?$.getBinderAttributes():[],ur=dt.concat(Rt),gr=N.staticUniforms?aa(N.staticUniforms):[],cr=$?$.getBinderUniforms():[],It=gr.concat(cr),Qt=[],ar=0,mr=It;ar<mr.length;ar+=1){var Pr=mr[ar];Qt.indexOf(Pr)<0&&Qt.push(Pr)}var Dr=$?$.defines():[];ge&&Dr.push("#define OVERDRAW_INSPECTOR;");var Xr=Dr.concat(as.fragmentSource,N.fragmentSource).join(`
`),Gr=Dr.concat(as.vertexSource,N.vertexSource).join(`
`),Fr=Ue.createShader(Ue.FRAGMENT_SHADER);if(Ue.isContextLost()){this.failedToCreate=!0;return}Ue.shaderSource(Fr,Xr),Ue.compileShader(Fr),Ue.attachShader(this.program,Fr);var Kr=Ue.createShader(Ue.VERTEX_SHADER);if(Ue.isContextLost()){this.failedToCreate=!0;return}Ue.shaderSource(Kr,Gr),Ue.compileShader(Kr),Ue.attachShader(this.program,Kr),this.attributes={};var Cr={};this.numAttributes=ur.length;for(var yi=0;yi<this.numAttributes;yi++)ur[yi]&&(Ue.bindAttribLocation(this.program,yi,ur[yi]),this.attributes[ur[yi]]=yi);Ue.linkProgram(this.program),Ue.deleteShader(Kr),Ue.deleteShader(Fr);for(var qi=0;qi<Qt.length;qi++){var vn=Qt[qi];if(vn&&!Cr[vn]){var Qa=Ue.getUniformLocation(this.program,vn);Qa&&(Cr[vn]=Qa)}}this.fixedUniforms=we(R,Cr),this.binderUniforms=$?$.getUniforms(R,Cr):[]};Oo.prototype.draw=function(R,K,N,$,we,ge,Ue,dt,Rt,ur,gr,cr,It,Qt,ar,mr){var Pr,Dr=R.gl;if(!this.failedToCreate){R.program.set(this.program),R.setDepthMode(N),R.setStencilMode($),R.setColorMode(we),R.setCullFace(ge);for(var Xr in this.fixedUniforms)this.fixedUniforms[Xr].set(Ue[Xr]);Qt&&Qt.setUniforms(R,this.binderUniforms,cr,{zoom:It});for(var Gr=(Pr={},Pr[Dr.LINES]=2,Pr[Dr.TRIANGLES]=3,Pr[Dr.LINE_STRIP]=1,Pr)[K],Fr=0,Kr=gr.get();Fr<Kr.length;Fr+=1){var Cr=Kr[Fr],yi=Cr.vaos||(Cr.vaos={}),qi=yi[dt]||(yi[dt]=new io);qi.bind(R,this,Rt,Qt?Qt.getPaintVertexBuffers():[],ur,Cr.vertexOffset,ar,mr),Dr.drawElements(K,Cr.primitiveLength*Gr,Dr.UNSIGNED_SHORT,Cr.primitiveOffset*Gr*2)}}};function No(Y,R,K){var N=1/Ba(K,1,R.transform.tileZoom),$=Math.pow(2,K.tileID.overscaledZ),we=K.tileSize*Math.pow(2,R.transform.tileZoom)/$,ge=we*(K.tileID.canonical.x+K.tileID.wrap*$),Ue=we*K.tileID.canonical.y;return{u_image:0,u_texsize:K.imageAtlasTexture.size,u_scale:[N,Y.fromScale,Y.toScale],u_fade:Y.t,u_pixel_coord_upper:[ge>>16,Ue>>16],u_pixel_coord_lower:[ge&65535,Ue&65535]}}function Zs(Y,R,K,N){var $=K.imageManager.getPattern(Y.from.toString()),we=K.imageManager.getPattern(Y.to.toString()),ge=K.imageManager.getPixelSize(),Ue=ge.width,dt=ge.height,Rt=Math.pow(2,N.tileID.overscaledZ),ur=N.tileSize*Math.pow(2,K.transform.tileZoom)/Rt,gr=ur*(N.tileID.canonical.x+N.tileID.wrap*Rt),cr=ur*N.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:$.tl,u_pattern_br_a:$.br,u_pattern_tl_b:we.tl,u_pattern_br_b:we.br,u_texsize:[Ue,dt],u_mix:R.t,u_pattern_size_a:$.displaySize,u_pattern_size_b:we.displaySize,u_scale_a:R.fromScale,u_scale_b:R.toScale,u_tile_units_to_pixels:1/Ba(N,1,K.transform.tileZoom),u_pixel_coord_upper:[gr>>16,cr>>16],u_pixel_coord_lower:[gr&65535,cr&65535]}}var Fs=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_lightpos:new i.Uniform3f(Y,R.u_lightpos),u_lightintensity:new i.Uniform1f(Y,R.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,R.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,R.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,R.u_opacity)}},ws=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_lightpos:new i.Uniform3f(Y,R.u_lightpos),u_lightintensity:new i.Uniform1f(Y,R.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,R.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,R.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,R.u_height_factor),u_image:new i.Uniform1i(Y,R.u_image),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade),u_opacity:new i.Uniform1f(Y,R.u_opacity)}},no=function(Y,R,K,N){var $=R.style.light,we=$.properties.get("position"),ge=[we.x,we.y,we.z],Ue=i.create$1();$.properties.get("anchor")==="viewport"&&i.fromRotation(Ue,-R.transform.angle),i.transformMat3(ge,ge,Ue);var dt=$.properties.get("color");return{u_matrix:Y,u_lightpos:ge,u_lightintensity:$.properties.get("intensity"),u_lightcolor:[dt.r,dt.g,dt.b],u_vertical_gradient:+K,u_opacity:N}},Ls=function(Y,R,K,N,$,we,ge){return i.extend(no(Y,R,K,N),No(we,R,ge),{u_height_factor:-Math.pow(2,$.overscaledZ)/ge.tileSize/8})},ds=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},Xs=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_image:new i.Uniform1i(Y,R.u_image),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade)}},oa=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_world:new i.Uniform2f(Y,R.u_world)}},Yo=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_world:new i.Uniform2f(Y,R.u_world),u_image:new i.Uniform1i(Y,R.u_image),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade)}},po=function(Y){return{u_matrix:Y}},ss=function(Y,R,K,N){return i.extend(po(Y),No(K,R,N))},ls=function(Y,R){return{u_matrix:Y,u_world:R}},gs=function(Y,R,K,N,$){return i.extend(ss(Y,R,K,N),{u_world:$})},bt=function(Y,R){return{u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,R.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,R.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},Ft=function(Y,R,K,N){var $=Y.transform,we,ge;if(N.paint.get("circle-pitch-alignment")==="map"){var Ue=Ba(K,1,$.zoom);we=!0,ge=[Ue,Ue]}else we=!1,ge=$.pixelsToGLUnits;return{u_camera_to_center_distance:$.cameraToCenterDistance,u_scale_with_map:+(N.paint.get("circle-pitch-scale")==="map"),u_matrix:Y.translatePosMatrix(R.posMatrix,K,N.paint.get("circle-translate"),N.paint.get("circle-translate-anchor")),u_pitch_with_map:+we,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:ge}},hr=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,R.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,R.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,R.u_overscale_factor)}},nr=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,R.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,R.u_viewport_size)}},Sr=function(Y,R,K){var N=Ba(K,1,R.zoom),$=Math.pow(2,R.zoom-K.tileID.overscaledZ),we=K.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:R.cameraToCenterDistance,u_pixels_to_tile_units:N,u_extrude_scale:[R.pixelsToGLUnits[0]/(N*$),R.pixelsToGLUnits[1]/(N*$)],u_overscale_factor:we}},li=function(Y,R,K){return{u_matrix:Y,u_inv_matrix:R,u_camera_to_center_distance:K.cameraToCenterDistance,u_viewport_size:[K.width,K.height]}},di=function(Y,R){return{u_color:new i.UniformColor(Y,R.u_color),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_overlay:new i.Uniform1i(Y,R.u_overlay),u_overlay_scale:new i.Uniform1f(Y,R.u_overlay_scale)}},mi=function(Y,R,K){return K===void 0&&(K=1),{u_matrix:Y,u_color:R,u_overlay:0,u_overlay_scale:K}},Oi=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},dn=function(Y){return{u_matrix:Y}},wi=function(Y,R){return{u_extrude_scale:new i.Uniform1f(Y,R.u_extrude_scale),u_intensity:new i.Uniform1f(Y,R.u_intensity),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},ui=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_world:new i.Uniform2f(Y,R.u_world),u_image:new i.Uniform1i(Y,R.u_image),u_color_ramp:new i.Uniform1i(Y,R.u_color_ramp),u_opacity:new i.Uniform1f(Y,R.u_opacity)}},Ai=function(Y,R,K,N){return{u_matrix:Y,u_extrude_scale:Ba(R,1,K),u_intensity:N}},gi=function(Y,R,K,N){var $=i.create();i.ortho($,0,Y.width,Y.height,0,0,1);var we=Y.context.gl;return{u_matrix:$,u_world:[we.drawingBufferWidth,we.drawingBufferHeight],u_image:K,u_color_ramp:N,u_opacity:R.paint.get("heatmap-opacity")}},gn=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_image:new i.Uniform1i(Y,R.u_image),u_latrange:new i.Uniform2f(Y,R.u_latrange),u_light:new i.Uniform2f(Y,R.u_light),u_shadow:new i.UniformColor(Y,R.u_shadow),u_highlight:new i.UniformColor(Y,R.u_highlight),u_accent:new i.UniformColor(Y,R.u_accent)}},In=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_image:new i.Uniform1i(Y,R.u_image),u_dimension:new i.Uniform2f(Y,R.u_dimension),u_zoom:new i.Uniform1f(Y,R.u_zoom),u_unpack:new i.Uniform4f(Y,R.u_unpack)}},Vn=function(Y,R,K){var N=K.paint.get("hillshade-shadow-color"),$=K.paint.get("hillshade-highlight-color"),we=K.paint.get("hillshade-accent-color"),ge=K.paint.get("hillshade-illumination-direction")*(Math.PI/180);K.paint.get("hillshade-illumination-anchor")==="viewport"&&(ge-=Y.transform.angle);var Ue=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(R.tileID.toUnwrapped(),Ue),u_image:0,u_latrange:Hn(Y,R.tileID),u_light:[K.paint.get("hillshade-exaggeration"),ge],u_shadow:N,u_highlight:$,u_accent:we}},Rn=function(Y,R){var K=R.stride,N=i.create();return i.ortho(N,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(N,N,[0,-i.EXTENT,0]),{u_matrix:N,u_image:1,u_dimension:[K,K],u_zoom:Y.overscaledZ,u_unpack:R.getUnpackVector()}};function Hn(Y,R){var K=Math.pow(2,R.canonical.z),N=R.canonical.y;return[new i.MercatorCoordinate(0,N/K).toLngLat().lat,new i.MercatorCoordinate(0,(N+1)/K).toLngLat().lat]}var Gn=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels)}},pn=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels),u_image:new i.Uniform1i(Y,R.u_image),u_image_height:new i.Uniform1f(Y,R.u_image_height)}},Lo=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,R.u_image),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade)}},us=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,R.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,R.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,R.u_sdfgamma),u_image:new i.Uniform1i(Y,R.u_image),u_tex_y_a:new i.Uniform1f(Y,R.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,R.u_tex_y_b),u_mix:new i.Uniform1f(Y,R.u_mix)}},Bs=function(Y,R,K){var N=Y.transform;return{u_matrix:Gl(Y,R,K),u_ratio:1/Ba(R,1,N.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/N.pixelsToGLUnits[0],1/N.pixelsToGLUnits[1]]}},Js=function(Y,R,K,N){return i.extend(Bs(Y,R,K),{u_image:0,u_image_height:N})},ol=function(Y,R,K,N){var $=Y.transform,we=ul(R,$);return{u_matrix:Gl(Y,R,K),u_texsize:R.imageAtlasTexture.size,u_ratio:1/Ba(R,1,$.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[we,N.fromScale,N.toScale],u_fade:N.t,u_units_to_pixels:[1/$.pixelsToGLUnits[0],1/$.pixelsToGLUnits[1]]}},Cl=function(Y,R,K,N,$){var we=Y.transform,ge=Y.lineAtlas,Ue=ul(R,we),dt=K.layout.get("line-cap")==="round",Rt=ge.getDash(N.from,dt),ur=ge.getDash(N.to,dt),gr=Rt.width*$.fromScale,cr=ur.width*$.toScale;return i.extend(Bs(Y,R,K),{u_patternscale_a:[Ue/gr,-Rt.height/2],u_patternscale_b:[Ue/cr,-ur.height/2],u_sdfgamma:ge.width/(Math.min(gr,cr)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Rt.y,u_tex_y_b:ur.y,u_mix:$.t})};function ul(Y,R){return 1/Ba(Y,1,R.tileZoom)}function Gl(Y,R,K){return Y.translatePosMatrix(R.tileID.posMatrix,R,K.paint.get("line-translate"),K.paint.get("line-translate-anchor"))}var Vl=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_tl_parent:new i.Uniform2f(Y,R.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,R.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,R.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,R.u_fade_t),u_opacity:new i.Uniform1f(Y,R.u_opacity),u_image0:new i.Uniform1i(Y,R.u_image0),u_image1:new i.Uniform1i(Y,R.u_image1),u_brightness_low:new i.Uniform1f(Y,R.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,R.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,R.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,R.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,R.u_spin_weights)}},Fl=function(Y,R,K,N,$){return{u_matrix:Y,u_tl_parent:R,u_scale_parent:K,u_buffer_scale:1,u_fade_t:N.mix,u_opacity:N.opacity*$.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:$.paint.get("raster-brightness-min"),u_brightness_high:$.paint.get("raster-brightness-max"),u_saturation_factor:zs($.paint.get("raster-saturation")),u_contrast_factor:ko($.paint.get("raster-contrast")),u_spin_weights:ga($.paint.get("raster-hue-rotate"))}};function ga(Y){Y*=Math.PI/180;var R=Math.sin(Y),K=Math.cos(Y);return[(2*K+1)/3,(-Math.sqrt(3)*R-K+1)/3,(Math.sqrt(3)*R-K+1)/3]}function ko(Y){return Y>0?1/(1-Y):1+Y}function zs(Y){return Y>0?1-1/(1.001-Y):-Y}var Fo=function(Y,R){return{u_is_size_zoom_constant:new i.Uniform1i(Y,R.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,R.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,R.u_size_t),u_size:new i.Uniform1f(Y,R.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,R.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,R.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,R.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,R.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,R.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,R.u_coord_matrix),u_is_text:new i.Uniform1i(Y,R.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_texture:new i.Uniform1i(Y,R.u_texture)}},Ys=function(Y,R){return{u_is_size_zoom_constant:new i.Uniform1i(Y,R.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,R.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,R.u_size_t),u_size:new i.Uniform1f(Y,R.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,R.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,R.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,R.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,R.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,R.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,R.u_coord_matrix),u_is_text:new i.Uniform1i(Y,R.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_texture:new i.Uniform1i(Y,R.u_texture),u_gamma_scale:new i.Uniform1f(Y,R.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,R.u_is_halo)}},Gs=function(Y,R){return{u_is_size_zoom_constant:new i.Uniform1i(Y,R.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,R.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,R.u_size_t),u_size:new i.Uniform1f(Y,R.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,R.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,R.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,R.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,R.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,R.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,R.u_coord_matrix),u_is_text:new i.Uniform1i(Y,R.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_texsize_icon:new i.Uniform2f(Y,R.u_texsize_icon),u_texture:new i.Uniform1i(Y,R.u_texture),u_texture_icon:new i.Uniform1i(Y,R.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,R.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,R.u_is_halo)}},Us=function(Y,R,K,N,$,we,ge,Ue,dt,Rt){var ur=$.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:R?R.uSizeT:0,u_size:R?R.uSize:0,u_camera_to_center_distance:ur.cameraToCenterDistance,u_pitch:ur.pitch/360*2*Math.PI,u_rotate_symbol:+K,u_aspect_ratio:ur.width/ur.height,u_fade_change:$.options.fadeDuration?$.symbolFadeChange:1,u_matrix:we,u_label_plane_matrix:ge,u_coord_matrix:Ue,u_is_text:+dt,u_pitch_with_map:+N,u_texsize:Rt,u_texture:0}},Sl=function(Y,R,K,N,$,we,ge,Ue,dt,Rt,ur){var gr=$.transform;return i.extend(Us(Y,R,K,N,$,we,ge,Ue,dt,Rt),{u_gamma_scale:N?Math.cos(gr._pitch)*gr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+ur})},_l=function(Y,R,K,N,$,we,ge,Ue,dt,Rt){return i.extend(Sl(Y,R,K,N,$,we,ge,Ue,!0,dt,!0),{u_texsize_icon:Rt,u_texture_icon:1})},kl=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_opacity:new i.Uniform1f(Y,R.u_opacity),u_color:new i.UniformColor(Y,R.u_color)}},cl=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_opacity:new i.Uniform1f(Y,R.u_opacity),u_image:new i.Uniform1i(Y,R.u_image),u_pattern_tl_a:new i.Uniform2f(Y,R.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,R.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,R.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,R.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_mix:new i.Uniform1f(Y,R.u_mix),u_pattern_size_a:new i.Uniform2f(Y,R.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,R.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,R.u_scale_a),u_scale_b:new i.Uniform1f(Y,R.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,R.u_tile_units_to_pixels)}},xl=function(Y,R,K){return{u_matrix:Y,u_opacity:R,u_color:K}},Uo=function(Y,R,K,N,$,we){return i.extend(Zs(N,we,K,$),{u_matrix:Y,u_opacity:R})},_s={fillExtrusion:Fs,fillExtrusionPattern:ws,fill:ds,fillPattern:Xs,fillOutline:oa,fillOutlinePattern:Yo,circle:bt,collisionBox:hr,collisionCircle:nr,debug:di,clippingMask:Oi,heatmap:wi,heatmapTexture:ui,hillshade:gn,hillshadePrepare:In,line:Gn,lineGradient:pn,linePattern:Lo,lineSDF:us,raster:Vl,symbolIcon:Fo,symbolSDF:Ys,symbolTextAndIcon:Gs,background:kl,backgroundPattern:cl},Bl;function Il(Y,R,K,N,$,we,ge){for(var Ue=Y.context,dt=Ue.gl,Rt=Y.useProgram("collisionBox"),ur=[],gr=0,cr=0,It=0;It<N.length;It++){var Qt=N[It],ar=R.getTile(Qt),mr=ar.getBucket(K);if(mr){var Pr=Qt.posMatrix;($[0]!==0||$[1]!==0)&&(Pr=Y.translatePosMatrix(Qt.posMatrix,ar,$,we));var Dr=ge?mr.textCollisionBox:mr.iconCollisionBox,Xr=mr.collisionCircleArray;if(Xr.length>0){var Gr=i.create(),Fr=Pr;i.mul(Gr,mr.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(Gr,Gr,mr.placementViewportMatrix),ur.push({circleArray:Xr,circleOffset:cr,transform:Fr,invTransform:Gr}),gr+=Xr.length/4,cr=gr}Dr&&Rt.draw(Ue,dt.LINES,Si.disabled,Jr.disabled,Y.colorModeForRenderPass(),sr.disabled,Sr(Pr,Y.transform,ar),K.id,Dr.layoutVertexBuffer,Dr.indexBuffer,Dr.segments,null,Y.transform.zoom,null,null,Dr.collisionVertexBuffer)}}if(!(!ge||!ur.length)){var Kr=Y.useProgram("collisionCircle"),Cr=new i.StructArrayLayout2f1f2i16;Cr.resize(gr*4),Cr._trim();for(var yi=0,qi=0,vn=ur;qi<vn.length;qi+=1)for(var Qa=vn[qi],ra=0;ra<Qa.circleArray.length/4;ra++){var mo=ra*4,sl=Qa.circleArray[mo+0],Os=Qa.circleArray[mo+1],eo=Qa.circleArray[mo+2],fs=Qa.circleArray[mo+3];Cr.emplace(yi++,sl,Os,eo,fs,0),Cr.emplace(yi++,sl,Os,eo,fs,1),Cr.emplace(yi++,sl,Os,eo,fs,2),Cr.emplace(yi++,sl,Os,eo,fs,3)}(!Bl||Bl.length<gr*2)&&(Bl=Dl(gr));for(var es=Ue.createIndexBuffer(Bl,!0),$s=Ue.createVertexBuffer(Cr,i.collisionCircleLayout.members,!0),Ml=0,Mu=ur;Ml<Mu.length;Ml+=1){var Au=Mu[Ml],$u=li(Au.transform,Au.invTransform,Y.transform);Kr.draw(Ue,dt.TRIANGLES,Si.disabled,Jr.disabled,Y.colorModeForRenderPass(),sr.disabled,$u,K.id,$s,es,i.SegmentVector.simpleSegment(0,Au.circleOffset*2,Au.circleArray.length,Au.circleArray.length/2),null,Y.transform.zoom,null,null,null)}$s.destroy(),es.destroy()}}function Dl(Y){var R=Y*2,K=new i.StructArrayLayout3ui6;K.resize(R),K._trim();for(var N=0;N<R;N++){var $=N*6;K.uint16[$+0]=N*4+0,K.uint16[$+1]=N*4+1,K.uint16[$+2]=N*4+2,K.uint16[$+3]=N*4+2,K.uint16[$+4]=N*4+3,K.uint16[$+5]=N*4+0}return K}var oe=i.identity(new Float32Array(16));function w(Y,R,K,N,$){if(Y.renderPass==="translucent"){var we=Jr.disabled,ge=Y.colorModeForRenderPass(),Ue=K.layout.get("text-variable-anchor");Ue&&Q(N,Y,K,R,K.layout.get("text-rotation-alignment"),K.layout.get("text-pitch-alignment"),$),K.paint.get("icon-opacity").constantOr(1)!==0&&Ne(Y,R,K,N,!1,K.paint.get("icon-translate"),K.paint.get("icon-translate-anchor"),K.layout.get("icon-rotation-alignment"),K.layout.get("icon-pitch-alignment"),K.layout.get("icon-keep-upright"),we,ge),K.paint.get("text-opacity").constantOr(1)!==0&&Ne(Y,R,K,N,!0,K.paint.get("text-translate"),K.paint.get("text-translate-anchor"),K.layout.get("text-rotation-alignment"),K.layout.get("text-pitch-alignment"),K.layout.get("text-keep-upright"),we,ge),R.map.showCollisionBoxes&&(Il(Y,R,K,N,K.paint.get("text-translate"),K.paint.get("text-translate-anchor"),!0),Il(Y,R,K,N,K.paint.get("icon-translate"),K.paint.get("icon-translate-anchor"),!1))}}function B(Y,R,K,N,$,we){var ge=i.getAnchorAlignment(Y),Ue=ge.horizontalAlign,dt=ge.verticalAlign,Rt=-(Ue-.5)*R,ur=-(dt-.5)*K,gr=i.evaluateVariableOffset(Y,N);return new i.Point((Rt/$+gr[0])*we,(ur/$+gr[1])*we)}function Q(Y,R,K,N,$,we,ge){for(var Ue=R.transform,dt=$==="map",Rt=we==="map",ur=0,gr=Y;ur<gr.length;ur+=1){var cr=gr[ur],It=N.getTile(cr),Qt=It.getBucket(K);if(!(!Qt||!Qt.text||!Qt.text.segments.get().length)){var ar=Qt.textSizeData,mr=i.evaluateSizeForZoom(ar,Ue.zoom),Pr=Ba(It,1,R.transform.zoom),Dr=Ui(cr.posMatrix,Rt,dt,R.transform,Pr),Xr=K.layout.get("icon-text-fit")!=="none"&&Qt.hasIconData();if(mr){var Gr=Math.pow(2,Ue.zoom-It.tileID.overscaledZ);ee(Qt,dt,Rt,ge,i.symbolSize,Ue,Dr,cr.posMatrix,Gr,mr,Xr)}}}}function ee(Y,R,K,N,$,we,ge,Ue,dt,Rt,ur){var gr=Y.text.placedSymbolArray,cr=Y.text.dynamicLayoutVertexArray,It=Y.icon.dynamicLayoutVertexArray,Qt={};cr.clear();for(var ar=0;ar<gr.length;ar++){var mr=gr.get(ar),Pr=Y.allowVerticalPlacement&&!mr.placedOrientation,Dr=!mr.hidden&&mr.crossTileID&&!Pr?N[mr.crossTileID]:null;if(!Dr)Dn(mr.numGlyphs,cr);else{var Xr=new i.Point(mr.anchorX,mr.anchorY),Gr=fn(Xr,K?Ue:ge),Fr=xn(we.cameraToCenterDistance,Gr.signedDistanceFromCamera),Kr=$.evaluateSizeForFeature(Y.textSizeData,Rt,mr)*Fr/i.ONE_EM;K&&(Kr*=Y.tilePixelRatio/dt);for(var Cr=Dr.width,yi=Dr.height,qi=Dr.anchor,vn=Dr.textOffset,Qa=Dr.textBoxScale,ra=B(qi,Cr,yi,vn,Qa,Kr),mo=K?fn(Xr.add(ra),ge).point:Gr.point.add(R?ra.rotate(-we.angle):ra),sl=Y.allowVerticalPlacement&&mr.placedOrientation===i.WritingMode.vertical?Math.PI/2:0,Os=0;Os<mr.numGlyphs;Os++)i.addDynamicAttributes(cr,mo,sl);ur&&mr.associatedIconIndex>=0&&(Qt[mr.associatedIconIndex]={shiftedAnchor:mo,angle:sl})}}if(ur){It.clear();for(var eo=Y.icon.placedSymbolArray,fs=0;fs<eo.length;fs++){var es=eo.get(fs);if(es.hidden)Dn(es.numGlyphs,It);else{var $s=Qt[fs];if(!$s)Dn(es.numGlyphs,It);else for(var Ml=0;Ml<es.numGlyphs;Ml++)i.addDynamicAttributes(It,$s.shiftedAnchor,$s.angle)}}Y.icon.dynamicLayoutVertexBuffer.updateData(It)}Y.text.dynamicLayoutVertexBuffer.updateData(cr)}function le(Y,R,K){return K.iconsInText&&R?"symbolTextAndIcon":Y?"symbolSDF":"symbolIcon"}function Ne(Y,R,K,N,$,we,ge,Ue,dt,Rt,ur,gr){for(var cr=Y.context,It=cr.gl,Qt=Y.transform,ar=Ue==="map",mr=dt==="map",Pr=ar&&K.layout.get("symbol-placement")!=="point",Dr=ar&&!mr&&!Pr,Xr=K.layout.get("symbol-sort-key").constantOr(1)!==void 0,Gr=!1,Fr=Y.depthModeForSublayer(0,Si.ReadOnly),Kr=K.layout.get("text-variable-anchor"),Cr=[],yi=0,qi=N;yi<qi.length;yi+=1){var vn=qi[yi],Qa=R.getTile(vn),ra=Qa.getBucket(K);if(ra){var mo=$?ra.text:ra.icon;if(!(!mo||!mo.segments.get().length)){var sl=mo.programConfigurations.get(K.id),Os=$||ra.sdfIcons,eo=$?ra.textSizeData:ra.iconSizeData,fs=mr||Qt.pitch!==0,es=Y.useProgram(le(Os,$,ra),sl),$s=i.evaluateSizeForZoom(eo,Qt.zoom),Ml=void 0,Mu=[0,0],Au=void 0,$u=void 0,du=null,Nu=void 0;if($){if(Au=Qa.glyphAtlasTexture,$u=It.LINEAR,Ml=Qa.glyphAtlasTexture.size,ra.iconsInText){Mu=Qa.imageAtlasTexture.size,du=Qa.imageAtlasTexture;var yf=eo.kind==="composite"||eo.kind==="camera";Nu=fs||Y.options.rotating||Y.options.zooming||yf?It.LINEAR:It.NEAREST}}else{var Kf=K.layout.get("icon-size").constantOr(0)!==1||ra.iconsNeedLinear;Au=Qa.imageAtlasTexture,$u=Os||Y.options.rotating||Y.options.zooming||Kf||fs?It.LINEAR:It.NEAREST,Ml=Qa.imageAtlasTexture.size}var wd=Ba(Qa,1,Y.transform.zoom),Td=Ui(vn.posMatrix,mr,ar,Y.transform,wd),Ad=zn(vn.posMatrix,mr,ar,Y.transform,wd),Yp=Kr&&ra.hasTextData(),fy=K.layout.get("icon-text-fit")!=="none"&&Yp&&ra.hasIconData();Pr&&Wn(ra,vn.posMatrix,Y,$,Td,Ad,mr,Rt);var pv=Y.translatePosMatrix(vn.posMatrix,Qa,we,ge),Sd=Pr||$&&Kr||fy?oe:Td,vv=Y.translatePosMatrix(Ad,Qa,we,ge,!0),Gd=Os&&K.paint.get($?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Md=void 0;Os?ra.iconsInText?Md=_l(eo.kind,$s,Dr,mr,Y,pv,Sd,vv,Ml,Mu):Md=Sl(eo.kind,$s,Dr,mr,Y,pv,Sd,vv,$,Ml,!0):Md=Us(eo.kind,$s,Dr,mr,Y,pv,Sd,vv,$,Ml);var kp={program:es,buffers:mo,uniformValues:Md,atlasTexture:Au,atlasTextureIcon:du,atlasInterpolation:$u,atlasInterpolationIcon:Nu,isSDF:Os,hasHalo:Gd};if(Xr&&ra.canOverlap){Gr=!0;for(var Kp=mo.segments.get(),Cp=0,ng=Kp;Cp<ng.length;Cp+=1){var cy=ng[Cp];Cr.push({segments:new i.SegmentVector([cy]),sortKey:cy.sortKey,state:kp})}}else Cr.push({segments:mo.segments,sortKey:0,state:kp})}}}Gr&&Cr.sort(function(w1,T1){return w1.sortKey-T1.sortKey});for(var vh=0,hy=Cr;vh<hy.length;vh+=1){var ag=hy[vh],jh=ag.state;if(cr.activeTexture.set(It.TEXTURE0),jh.atlasTexture.bind(jh.atlasInterpolation,It.CLAMP_TO_EDGE),jh.atlasTextureIcon&&(cr.activeTexture.set(It.TEXTURE1),jh.atlasTextureIcon&&jh.atlasTextureIcon.bind(jh.atlasInterpolationIcon,It.CLAMP_TO_EDGE)),jh.isSDF){var rm=jh.uniformValues;jh.hasHalo&&(rm.u_is_halo=1,$e(jh.buffers,ag.segments,K,Y,jh.program,Fr,ur,gr,rm)),rm.u_is_halo=0}$e(jh.buffers,ag.segments,K,Y,jh.program,Fr,ur,gr,jh.uniformValues)}}function $e(Y,R,K,N,$,we,ge,Ue,dt){var Rt=N.context,ur=Rt.gl;$.draw(Rt,ur.TRIANGLES,we,ge,Ue,sr.disabled,dt,K.id,Y.layoutVertexBuffer,Y.indexBuffer,R,K.paint,N.transform.zoom,Y.programConfigurations.get(K.id),Y.dynamicLayoutVertexBuffer,Y.opacityVertexBuffer)}function pt(Y,R,K,N){if(Y.renderPass==="translucent"){var $=K.paint.get("circle-opacity"),we=K.paint.get("circle-stroke-width"),ge=K.paint.get("circle-stroke-opacity"),Ue=K.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!($.constantOr(1)===0&&(we.constantOr(1)===0||ge.constantOr(1)===0))){for(var dt=Y.context,Rt=dt.gl,ur=Y.depthModeForSublayer(0,Si.ReadOnly),gr=Jr.disabled,cr=Y.colorModeForRenderPass(),It=[],Qt=0;Qt<N.length;Qt++){var ar=N[Qt],mr=R.getTile(ar),Pr=mr.getBucket(K);if(Pr){var Dr=Pr.programConfigurations.get(K.id),Xr=Y.useProgram("circle",Dr),Gr=Pr.layoutVertexBuffer,Fr=Pr.indexBuffer,Kr=Ft(Y,ar,mr,K),Cr={programConfiguration:Dr,program:Xr,layoutVertexBuffer:Gr,indexBuffer:Fr,uniformValues:Kr};if(Ue)for(var yi=Pr.segments.get(),qi=0,vn=yi;qi<vn.length;qi+=1){var Qa=vn[qi];It.push({segments:new i.SegmentVector([Qa]),sortKey:Qa.sortKey,state:Cr})}else It.push({segments:Pr.segments,sortKey:0,state:Cr})}}Ue&&It.sort(function(Au,$u){return Au.sortKey-$u.sortKey});for(var ra=0,mo=It;ra<mo.length;ra+=1){var sl=mo[ra],Os=sl.state,eo=Os.programConfiguration,fs=Os.program,es=Os.layoutVertexBuffer,$s=Os.indexBuffer,Ml=Os.uniformValues,Mu=sl.segments;fs.draw(dt,Rt.TRIANGLES,ur,gr,cr,sr.disabled,Ml,K.id,es,$s,Mu,K.paint,Y.transform.zoom,eo)}}}}function zt(Y,R,K,N){if(K.paint.get("heatmap-opacity")!==0)if(Y.renderPass==="offscreen"){var $=Y.context,we=$.gl,ge=Jr.disabled,Ue=new vt([we.ONE,we.ONE],i.Color.transparent,[!0,!0,!0,!0]);Yt($,Y,K),$.clear({color:i.Color.transparent});for(var dt=0;dt<N.length;dt++){var Rt=N[dt];if(!R.hasRenderableParent(Rt)){var ur=R.getTile(Rt),gr=ur.getBucket(K);if(gr){var cr=gr.programConfigurations.get(K.id),It=Y.useProgram("heatmap",cr),Qt=Y.transform,ar=Qt.zoom;It.draw($,we.TRIANGLES,Si.disabled,ge,Ue,sr.disabled,Ai(Rt.posMatrix,ur,ar,K.paint.get("heatmap-intensity")),K.id,gr.layoutVertexBuffer,gr.indexBuffer,gr.segments,K.paint,Y.transform.zoom,cr)}}}$.viewport.set([0,0,Y.width,Y.height])}else Y.renderPass==="translucent"&&(Y.context.setColorMode(Y.colorModeForRenderPass()),yr(Y,K))}function Yt(Y,R,K){var N=Y.gl;Y.activeTexture.set(N.TEXTURE1),Y.viewport.set([0,0,R.width/4,R.height/4]);var $=K.heatmapFbo;if($)N.bindTexture(N.TEXTURE_2D,$.colorAttachment.get()),Y.bindFramebuffer.set($.framebuffer);else{var we=N.createTexture();N.bindTexture(N.TEXTURE_2D,we),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.LINEAR),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.LINEAR),$=K.heatmapFbo=Y.createFramebuffer(R.width/4,R.height/4,!1),Jt(Y,R,we,$)}}function Jt(Y,R,K,N){var $=Y.gl,we=Y.extRenderToTextureHalfFloat?Y.extTextureHalfFloat.HALF_FLOAT_OES:$.UNSIGNED_BYTE;$.texImage2D($.TEXTURE_2D,0,$.RGBA,R.width/4,R.height/4,0,$.RGBA,we,null),N.colorAttachment.set(K)}function yr(Y,R){var K=Y.context,N=K.gl,$=R.heatmapFbo;if($){K.activeTexture.set(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,$.colorAttachment.get()),K.activeTexture.set(N.TEXTURE1);var we=R.colorRampTexture;we||(we=R.colorRampTexture=new i.Texture(K,R.colorRamp,N.RGBA)),we.bind(N.LINEAR,N.CLAMP_TO_EDGE),Y.useProgram("heatmapTexture").draw(K,N.TRIANGLES,Si.disabled,Jr.disabled,Y.colorModeForRenderPass(),sr.disabled,gi(Y,R,0,1),R.id,Y.viewportBuffer,Y.quadTriangleIndexBuffer,Y.viewportSegments,R.paint,Y.transform.zoom)}}function Ir(Y,R,K,N){if(Y.renderPass==="translucent"){var $=K.paint.get("line-opacity"),we=K.paint.get("line-width");if(!($.constantOr(1)===0||we.constantOr(1)===0))for(var ge=Y.depthModeForSublayer(0,Si.ReadOnly),Ue=Y.colorModeForRenderPass(),dt=K.paint.get("line-dasharray"),Rt=K.paint.get("line-pattern"),ur=Rt.constantOr(1),gr=K.paint.get("line-gradient"),cr=K.getCrossfadeParameters(),It=ur?"linePattern":dt?"lineSDF":gr?"lineGradient":"line",Qt=Y.context,ar=Qt.gl,mr=!0,Pr=0,Dr=N;Pr<Dr.length;Pr+=1){var Xr=Dr[Pr],Gr=R.getTile(Xr);if(!(ur&&!Gr.patternsLoaded())){var Fr=Gr.getBucket(K);if(Fr){var Kr=Fr.programConfigurations.get(K.id),Cr=Y.context.program.get(),yi=Y.useProgram(It,Kr),qi=mr||yi.program!==Cr,vn=Rt.constantOr(null);if(vn&&Gr.imageAtlas){var Qa=Gr.imageAtlas,ra=Qa.patternPositions[vn.to.toString()],mo=Qa.patternPositions[vn.from.toString()];ra&&mo&&Kr.setConstantPatternPositions(ra,mo)}var sl=ur?ol(Y,Gr,K,cr):dt?Cl(Y,Gr,K,dt,cr):gr?Js(Y,Gr,K,Fr.lineClipsArray.length):Bs(Y,Gr,K);if(ur)Qt.activeTexture.set(ar.TEXTURE0),Gr.imageAtlasTexture.bind(ar.LINEAR,ar.CLAMP_TO_EDGE),Kr.updatePaintBuffers(cr);else if(dt&&(qi||Y.lineAtlas.dirty))Qt.activeTexture.set(ar.TEXTURE0),Y.lineAtlas.bind(Qt);else if(gr){var Os=Fr.gradients[K.id],eo=Os.texture;if(K.gradientVersion!==Os.version){var fs=256;if(K.stepInterpolant){var es=R.getSource().maxzoom,$s=Xr.canonical.z===es?Math.ceil(1<<Y.transform.maxZoom-Xr.canonical.z):1,Ml=Fr.maxLineLength/i.EXTENT,Mu=1024,Au=Ml*Mu*$s;fs=i.clamp(i.nextPowerOfTwo(Au),256,Qt.maxTextureSize)}Os.gradient=i.renderColorRamp({expression:K.gradientExpression(),evaluationKey:"lineProgress",resolution:fs,image:Os.gradient||void 0,clips:Fr.lineClipsArray}),Os.texture?Os.texture.update(Os.gradient):Os.texture=new i.Texture(Qt,Os.gradient,ar.RGBA),Os.version=K.gradientVersion,eo=Os.texture}Qt.activeTexture.set(ar.TEXTURE0),eo.bind(K.stepInterpolant?ar.NEAREST:ar.LINEAR,ar.CLAMP_TO_EDGE)}yi.draw(Qt,ar.TRIANGLES,ge,Y.stencilModeForClipping(Xr),Ue,sr.disabled,sl,K.id,Fr.layoutVertexBuffer,Fr.indexBuffer,Fr.segments,K.paint,Y.transform.zoom,Kr,Fr.layoutVertexBuffer2),mr=!1}}}}}function ce(Y,R,K,N){var $=K.paint.get("fill-color"),we=K.paint.get("fill-opacity");if(we.constantOr(1)!==0){var ge=Y.colorModeForRenderPass(),Ue=K.paint.get("fill-pattern"),dt=Y.opaquePassEnabledForLayer()&&!Ue.constantOr(1)&&$.constantOr(i.Color.transparent).a===1&&we.constantOr(0)===1?"opaque":"translucent";if(Y.renderPass===dt){var Rt=Y.depthModeForSublayer(1,Y.renderPass==="opaque"?Si.ReadWrite:Si.ReadOnly);Ae(Y,R,K,N,Rt,ge,!1)}if(Y.renderPass==="translucent"&&K.paint.get("fill-antialias")){var ur=Y.depthModeForSublayer(K.getPaintProperty("fill-outline-color")?2:0,Si.ReadOnly);Ae(Y,R,K,N,ur,ge,!0)}}}function Ae(Y,R,K,N,$,we,ge){var Ue=Y.context.gl,dt=K.paint.get("fill-pattern"),Rt=dt&&dt.constantOr(1),ur=K.getCrossfadeParameters(),gr,cr,It,Qt,ar;ge?(cr=Rt&&!K.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",gr=Ue.LINES):(cr=Rt?"fillPattern":"fill",gr=Ue.TRIANGLES);for(var mr=0,Pr=N;mr<Pr.length;mr+=1){var Dr=Pr[mr],Xr=R.getTile(Dr);if(!(Rt&&!Xr.patternsLoaded())){var Gr=Xr.getBucket(K);if(Gr){var Fr=Gr.programConfigurations.get(K.id),Kr=Y.useProgram(cr,Fr);Rt&&(Y.context.activeTexture.set(Ue.TEXTURE0),Xr.imageAtlasTexture.bind(Ue.LINEAR,Ue.CLAMP_TO_EDGE),Fr.updatePaintBuffers(ur));var Cr=dt.constantOr(null);if(Cr&&Xr.imageAtlas){var yi=Xr.imageAtlas,qi=yi.patternPositions[Cr.to.toString()],vn=yi.patternPositions[Cr.from.toString()];qi&&vn&&Fr.setConstantPatternPositions(qi,vn)}var Qa=Y.translatePosMatrix(Dr.posMatrix,Xr,K.paint.get("fill-translate"),K.paint.get("fill-translate-anchor"));if(!ge)Qt=Gr.indexBuffer,ar=Gr.segments,It=Rt?ss(Qa,Y,ur,Xr):po(Qa);else{Qt=Gr.indexBuffer2,ar=Gr.segments2;var ra=[Ue.drawingBufferWidth,Ue.drawingBufferHeight];It=cr==="fillOutlinePattern"&&Rt?gs(Qa,Y,ur,Xr,ra):ls(Qa,ra)}Kr.draw(Y.context,gr,$,Y.stencilModeForClipping(Dr),we,sr.disabled,It,K.id,Gr.layoutVertexBuffer,Qt,ar,K.paint,Y.transform.zoom,Fr)}}}}function qe(Y,R,K,N){var $=K.paint.get("fill-extrusion-opacity");if($!==0&&Y.renderPass==="translucent"){var we=new Si(Y.context.gl.LEQUAL,Si.ReadWrite,Y.depthRangeFor3D);if($===1&&!K.paint.get("fill-extrusion-pattern").constantOr(1)){var ge=Y.colorModeForRenderPass();Ve(Y,R,K,N,we,Jr.disabled,ge)}else Ve(Y,R,K,N,we,Jr.disabled,vt.disabled),Ve(Y,R,K,N,we,Y.stencilModeFor3D(),Y.colorModeForRenderPass())}}function Ve(Y,R,K,N,$,we,ge){for(var Ue=Y.context,dt=Ue.gl,Rt=K.paint.get("fill-extrusion-pattern"),ur=Rt.constantOr(1),gr=K.getCrossfadeParameters(),cr=K.paint.get("fill-extrusion-opacity"),It=0,Qt=N;It<Qt.length;It+=1){var ar=Qt[It],mr=R.getTile(ar),Pr=mr.getBucket(K);if(Pr){var Dr=Pr.programConfigurations.get(K.id),Xr=Y.useProgram(ur?"fillExtrusionPattern":"fillExtrusion",Dr);ur&&(Y.context.activeTexture.set(dt.TEXTURE0),mr.imageAtlasTexture.bind(dt.LINEAR,dt.CLAMP_TO_EDGE),Dr.updatePaintBuffers(gr));var Gr=Rt.constantOr(null);if(Gr&&mr.imageAtlas){var Fr=mr.imageAtlas,Kr=Fr.patternPositions[Gr.to.toString()],Cr=Fr.patternPositions[Gr.from.toString()];Kr&&Cr&&Dr.setConstantPatternPositions(Kr,Cr)}var yi=Y.translatePosMatrix(ar.posMatrix,mr,K.paint.get("fill-extrusion-translate"),K.paint.get("fill-extrusion-translate-anchor")),qi=K.paint.get("fill-extrusion-vertical-gradient"),vn=ur?Ls(yi,Y,qi,cr,ar,gr,mr):no(yi,Y,qi,cr);Xr.draw(Ue,Ue.gl.TRIANGLES,$,we,ge,sr.backCCW,vn,K.id,Pr.layoutVertexBuffer,Pr.indexBuffer,Pr.segments,K.paint,Y.transform.zoom,Dr)}}}function ot(Y,R,K,N){if(!(Y.renderPass!=="offscreen"&&Y.renderPass!=="translucent")){for(var $=Y.context,we=Y.depthModeForSublayer(0,Si.ReadOnly),ge=Y.colorModeForRenderPass(),Ue=Y.renderPass==="translucent"?Y.stencilConfigForOverlap(N):[{},N],dt=Ue[0],Rt=Ue[1],ur=0,gr=Rt;ur<gr.length;ur+=1){var cr=gr[ur],It=R.getTile(cr);It.needsHillshadePrepare&&Y.renderPass==="offscreen"?ft(Y,It,K,we,Jr.disabled,ge):Y.renderPass==="translucent"&&Ke(Y,It,K,we,dt[cr.overscaledZ],ge)}$.viewport.set([0,0,Y.width,Y.height])}}function Ke(Y,R,K,N,$,we){var ge=Y.context,Ue=ge.gl,dt=R.fbo;if(dt){var Rt=Y.useProgram("hillshade");ge.activeTexture.set(Ue.TEXTURE0),Ue.bindTexture(Ue.TEXTURE_2D,dt.colorAttachment.get());var ur=Vn(Y,R,K);Rt.draw(ge,Ue.TRIANGLES,N,$,we,sr.disabled,ur,K.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments)}}function ft(Y,R,K,N,$,we){var ge=Y.context,Ue=ge.gl,dt=R.dem;if(dt&&dt.data){var Rt=dt.dim,ur=dt.stride,gr=dt.getPixels();if(ge.activeTexture.set(Ue.TEXTURE1),ge.pixelStoreUnpackPremultiplyAlpha.set(!1),R.demTexture=R.demTexture||Y.getTileTexture(ur),R.demTexture){var cr=R.demTexture;cr.update(gr,{premultiply:!1}),cr.bind(Ue.NEAREST,Ue.CLAMP_TO_EDGE)}else R.demTexture=new i.Texture(ge,gr,Ue.RGBA,{premultiply:!1}),R.demTexture.bind(Ue.NEAREST,Ue.CLAMP_TO_EDGE);ge.activeTexture.set(Ue.TEXTURE0);var It=R.fbo;if(!It){var Qt=new i.Texture(ge,{width:Rt,height:Rt,data:null},Ue.RGBA);Qt.bind(Ue.LINEAR,Ue.CLAMP_TO_EDGE),It=R.fbo=ge.createFramebuffer(Rt,Rt,!0),It.colorAttachment.set(Qt.texture)}ge.bindFramebuffer.set(It.framebuffer),ge.viewport.set([0,0,Rt,Rt]),Y.useProgram("hillshadePrepare").draw(ge,Ue.TRIANGLES,N,$,we,sr.disabled,Rn(R.tileID,dt),K.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments),R.needsHillshadePrepare=!1}}function qt(Y,R,K,N){if(Y.renderPass==="translucent"&&K.paint.get("raster-opacity")!==0&&N.length)for(var $=Y.context,we=$.gl,ge=R.getSource(),Ue=Y.useProgram("raster"),dt=Y.colorModeForRenderPass(),Rt=ge instanceof Ce?[{},N]:Y.stencilConfigForOverlap(N),ur=Rt[0],gr=Rt[1],cr=gr[gr.length-1].overscaledZ,It=!Y.options.moving,Qt=0,ar=gr;Qt<ar.length;Qt+=1){var mr=ar[Qt],Pr=Y.depthModeForSublayer(mr.overscaledZ-cr,K.paint.get("raster-opacity")===1?Si.ReadWrite:Si.ReadOnly,we.LESS),Dr=R.getTile(mr),Xr=Y.transform.calculatePosMatrix(mr.toUnwrapped(),It);Dr.registerFadeDuration(K.paint.get("raster-fade-duration"));var Gr=R.findLoadedParent(mr,0),Fr=Xt(Dr,Gr,R,K,Y.transform),Kr=void 0,Cr=void 0,yi=K.paint.get("raster-resampling")==="nearest"?we.NEAREST:we.LINEAR;$.activeTexture.set(we.TEXTURE0),Dr.texture.bind(yi,we.CLAMP_TO_EDGE,we.LINEAR_MIPMAP_NEAREST),$.activeTexture.set(we.TEXTURE1),Gr?(Gr.texture.bind(yi,we.CLAMP_TO_EDGE,we.LINEAR_MIPMAP_NEAREST),Kr=Math.pow(2,Gr.tileID.overscaledZ-Dr.tileID.overscaledZ),Cr=[Dr.tileID.canonical.x*Kr%1,Dr.tileID.canonical.y*Kr%1]):Dr.texture.bind(yi,we.CLAMP_TO_EDGE,we.LINEAR_MIPMAP_NEAREST);var qi=Fl(Xr,Cr||[0,0],Kr||1,Fr,K);ge instanceof Ce?Ue.draw($,we.TRIANGLES,Pr,Jr.disabled,dt,sr.disabled,qi,K.id,ge.boundsBuffer,Y.quadTriangleIndexBuffer,ge.boundsSegments):Ue.draw($,we.TRIANGLES,Pr,ur[mr.overscaledZ],dt,sr.disabled,qi,K.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments)}}function Xt(Y,R,K,N,$){var we=N.paint.get("raster-fade-duration");if(we>0){var ge=i.browser.now(),Ue=(ge-Y.timeAdded)/we,dt=R?(ge-R.timeAdded)/we:-1,Rt=K.getSource(),ur=$.coveringZoomLevel({tileSize:Rt.tileSize,roundZoom:Rt.roundZoom}),gr=!R||Math.abs(R.tileID.overscaledZ-ur)>Math.abs(Y.tileID.overscaledZ-ur),cr=gr&&Y.refreshedUponExpiration?1:i.clamp(gr?Ue:1-dt,0,1);return Y.refreshedUponExpiration&&Ue>=1&&(Y.refreshedUponExpiration=!1),R?{opacity:1,mix:1-cr}:{opacity:cr,mix:0}}else return{opacity:1,mix:0}}function $t(Y,R,K){var N=K.paint.get("background-color"),$=K.paint.get("background-opacity");if($!==0){var we=Y.context,ge=we.gl,Ue=Y.transform,dt=Ue.tileSize,Rt=K.paint.get("background-pattern");if(!Y.isPatternMissing(Rt)){var ur=!Rt&&N.a===1&&$===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass===ur){var gr=Jr.disabled,cr=Y.depthModeForSublayer(0,ur==="opaque"?Si.ReadWrite:Si.ReadOnly),It=Y.colorModeForRenderPass(),Qt=Y.useProgram(Rt?"backgroundPattern":"background"),ar=Ue.coveringTiles({tileSize:dt});Rt&&(we.activeTexture.set(ge.TEXTURE0),Y.imageManager.bind(Y.context));for(var mr=K.getCrossfadeParameters(),Pr=0,Dr=ar;Pr<Dr.length;Pr+=1){var Xr=Dr[Pr],Gr=Y.transform.calculatePosMatrix(Xr.toUnwrapped()),Fr=Rt?Uo(Gr,$,Y,Rt,{tileID:Xr,tileSize:dt},mr):xl(Gr,$,N);Qt.draw(we,ge.TRIANGLES,cr,gr,It,sr.disabled,Fr,K.id,Y.tileExtentBuffer,Y.quadTriangleIndexBuffer,Y.tileExtentSegments)}}}}}var dr=new i.Color(1,0,0,1),Mr=new i.Color(0,1,0,1),$r=new i.Color(0,0,1,1),ii=new i.Color(1,0,1,1),pi=new i.Color(0,1,1,1);function Yi(Y){var R=Y.transform.padding,K=3;Tn(Y,Y.transform.height-(R.top||0),K,dr),Tn(Y,R.bottom||0,K,Mr),ua(Y,R.left||0,K,$r),ua(Y,Y.transform.width-(R.right||0),K,ii);var N=Y.transform.centerPoint;wn(Y,N.x,Y.transform.height-N.y,pi)}function wn(Y,R,K,N){var $=20,we=2;oo(Y,R-we/2,K-$/2,we,$,N),oo(Y,R-$/2,K-we/2,$,we,N)}function Tn(Y,R,K,N){oo(Y,0,R+K/2,Y.transform.width,K,N)}function ua(Y,R,K,N){oo(Y,R-K/2,0,K,Y.transform.height,N)}function oo(Y,R,K,N,$,we){var ge=Y.context,Ue=ge.gl;Ue.enable(Ue.SCISSOR_TEST),Ue.scissor(R*i.browser.devicePixelRatio,K*i.browser.devicePixelRatio,N*i.browser.devicePixelRatio,$*i.browser.devicePixelRatio),ge.clear({color:we}),Ue.disable(Ue.SCISSOR_TEST)}function el(Y,R,K){for(var N=0;N<K.length;N++)ys(Y,R,K[N])}function ys(Y,R,K){var N=Y.context,$=N.gl,we=K.posMatrix,ge=Y.useProgram("debug"),Ue=Si.disabled,dt=Jr.disabled,Rt=Y.colorModeForRenderPass(),ur="$debug";N.activeTexture.set($.TEXTURE0),Y.emptyTexture.bind($.LINEAR,$.CLAMP_TO_EDGE),ge.draw(N,$.LINE_STRIP,Ue,dt,Rt,sr.disabled,mi(we,i.Color.red),ur,Y.debugBuffer,Y.tileBorderIndexBuffer,Y.debugSegments);var gr=R.getTileByID(K.key).latestRawTileData,cr=gr&&gr.byteLength||0,It=Math.floor(cr/1024),Qt=R.getTile(K).tileSize,ar=512/Math.min(Qt,512)*(K.overscaledZ/Y.transform.zoom)*.5,mr=K.canonical.toString();K.overscaledZ!==K.canonical.z&&(mr+=" => "+K.overscaledZ);var Pr=mr+" "+It+"kb";il(Y,Pr),ge.draw(N,$.TRIANGLES,Ue,dt,vt.alphaBlended,sr.disabled,mi(we,i.Color.transparent,ar),ur,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function il(Y,R){Y.initDebugOverlayCanvas();var K=Y.debugOverlayCanvas,N=Y.context.gl,$=Y.debugOverlayCanvas.getContext("2d");$.clearRect(0,0,K.width,K.height),$.shadowColor="white",$.shadowBlur=2,$.lineWidth=1.5,$.strokeStyle="white",$.textBaseline="top",$.font="bold 36px Open Sans, sans-serif",$.fillText(R,5,5),$.strokeText(R,5,5),Y.debugOverlayTexture.update(K),Y.debugOverlayTexture.bind(N.LINEAR,N.CLAMP_TO_EDGE)}function $l(Y,R,K){var N=Y.context,$=K.implementation;if(Y.renderPass==="offscreen"){var we=$.prerender;we&&(Y.setCustomLayerDefaults(),N.setColorMode(Y.colorModeForRenderPass()),we.call($,N.gl,Y.transform.customLayerMatrix()),N.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),N.setColorMode(Y.colorModeForRenderPass()),N.setStencilMode(Jr.disabled);var ge=$.renderingMode==="3d"?new Si(Y.context.gl.LEQUAL,Si.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,Si.ReadOnly);N.setDepthMode(ge),$.render(N.gl,Y.transform.customLayerMatrix()),N.setDirty(),Y.setBaseState(),N.bindFramebuffer.set(null)}}var pl={symbol:w,circle:pt,heatmap:zt,line:Ir,fill:ce,"fill-extrusion":qe,hillshade:ot,raster:qt,background:$t,debug:el,custom:$l},Hl=function(R,K){this.context=new br(R),this.transform=K,this._tileTextures={},this.setup(),this.numSublayers=zr.maxUnderzooming+zr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new jo,this.gpuTimers={}};Hl.prototype.resize=function(R,K){if(this.width=R*i.browser.devicePixelRatio,this.height=K*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var N=0,$=this.style._order;N<$.length;N+=1){var we=$[N];this.style._layers[we].resize()}},Hl.prototype.setup=function(){var R=this.context,K=new i.StructArrayLayout2i4;K.emplaceBack(0,0),K.emplaceBack(i.EXTENT,0),K.emplaceBack(0,i.EXTENT),K.emplaceBack(i.EXTENT,i.EXTENT),this.tileExtentBuffer=R.createVertexBuffer(K,_o.members),this.tileExtentSegments=i.SegmentVector.simpleSegment(0,0,4,2);var N=new i.StructArrayLayout2i4;N.emplaceBack(0,0),N.emplaceBack(i.EXTENT,0),N.emplaceBack(0,i.EXTENT),N.emplaceBack(i.EXTENT,i.EXTENT),this.debugBuffer=R.createVertexBuffer(N,_o.members),this.debugSegments=i.SegmentVector.simpleSegment(0,0,4,5);var $=new i.StructArrayLayout4i8;$.emplaceBack(0,0,0,0),$.emplaceBack(i.EXTENT,0,i.EXTENT,0),$.emplaceBack(0,i.EXTENT,0,i.EXTENT),$.emplaceBack(i.EXTENT,i.EXTENT,i.EXTENT,i.EXTENT),this.rasterBoundsBuffer=R.createVertexBuffer($,ze.members),this.rasterBoundsSegments=i.SegmentVector.simpleSegment(0,0,4,2);var we=new i.StructArrayLayout2i4;we.emplaceBack(0,0),we.emplaceBack(1,0),we.emplaceBack(0,1),we.emplaceBack(1,1),this.viewportBuffer=R.createVertexBuffer(we,_o.members),this.viewportSegments=i.SegmentVector.simpleSegment(0,0,4,2);var ge=new i.StructArrayLayout1ui2;ge.emplaceBack(0),ge.emplaceBack(1),ge.emplaceBack(3),ge.emplaceBack(2),ge.emplaceBack(0),this.tileBorderIndexBuffer=R.createIndexBuffer(ge);var Ue=new i.StructArrayLayout3ui6;Ue.emplaceBack(0,1,2),Ue.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=R.createIndexBuffer(Ue),this.emptyTexture=new i.Texture(R,{width:1,height:1,data:new Uint8Array([0,0,0,0])},R.gl.RGBA);var dt=this.context.gl;this.stencilClearMode=new Jr({func:dt.ALWAYS,mask:0},0,255,dt.ZERO,dt.ZERO,dt.ZERO)},Hl.prototype.clearStencil=function(){var R=this.context,K=R.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var N=i.create();i.ortho(N,0,this.width,this.height,0,0,1),i.scale(N,N,[K.drawingBufferWidth,K.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(R,K.TRIANGLES,Si.disabled,this.stencilClearMode,vt.disabled,sr.disabled,dn(N),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Hl.prototype._renderTileClippingMasks=function(R,K){if(!(this.currentStencilSource===R.source||!R.isTileClipped()||!K||!K.length)){this.currentStencilSource=R.source;var N=this.context,$=N.gl;this.nextStencilID+K.length>256&&this.clearStencil(),N.setColorMode(vt.disabled),N.setDepthMode(Si.disabled);var we=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ge=0,Ue=K;ge<Ue.length;ge+=1){var dt=Ue[ge],Rt=this._tileClippingMaskIDs[dt.key]=this.nextStencilID++;we.draw(N,$.TRIANGLES,Si.disabled,new Jr({func:$.ALWAYS,mask:0},Rt,255,$.KEEP,$.KEEP,$.REPLACE),vt.disabled,sr.disabled,dn(dt.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Hl.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var R=this.nextStencilID++,K=this.context.gl;return new Jr({func:K.NOTEQUAL,mask:255},R,255,K.KEEP,K.KEEP,K.REPLACE)},Hl.prototype.stencilModeForClipping=function(R){var K=this.context.gl;return new Jr({func:K.EQUAL,mask:255},this._tileClippingMaskIDs[R.key],0,K.KEEP,K.KEEP,K.REPLACE)},Hl.prototype.stencilConfigForOverlap=function(R){var K,N=this.context.gl,$=R.sort(function(Rt,ur){return ur.overscaledZ-Rt.overscaledZ}),we=$[$.length-1].overscaledZ,ge=$[0].overscaledZ-we+1;if(ge>1){this.currentStencilSource=void 0,this.nextStencilID+ge>256&&this.clearStencil();for(var Ue={},dt=0;dt<ge;dt++)Ue[dt+we]=new Jr({func:N.GEQUAL,mask:255},dt+this.nextStencilID,255,N.KEEP,N.KEEP,N.REPLACE);return this.nextStencilID+=ge,[Ue,$]}return[(K={},K[we]=Jr.disabled,K),$]},Hl.prototype.colorModeForRenderPass=function(){var R=this.context.gl;if(this._showOverdrawInspector){var K=8,N=1/K;return new vt([R.CONSTANT_COLOR,R.ONE],new i.Color(N,N,N,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?vt.unblended:vt.alphaBlended},Hl.prototype.depthModeForSublayer=function(R,K,N){if(!this.opaquePassEnabledForLayer())return Si.disabled;var $=1-((1+this.currentLayer)*this.numSublayers+R)*this.depthEpsilon;return new Si(N||this.context.gl.LEQUAL,K,[$,$])},Hl.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Hl.prototype.render=function(R,K){var N=this;this.style=R,this.options=K,this.lineAtlas=R.lineAtlas,this.imageManager=R.imageManager,this.glyphManager=R.glyphManager,this.symbolFadeChange=R.placement.symbolFadeChange(i.browser.now()),this.imageManager.beginFrame();var $=this.style._order,we=this.style.sourceCaches;for(var ge in we){var Ue=we[ge];Ue.used&&Ue.prepare(this.context)}var dt={},Rt={},ur={};for(var gr in we){var cr=we[gr];dt[gr]=cr.getVisibleCoordinates(),Rt[gr]=dt[gr].slice().reverse(),ur[gr]=cr.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var It=0;It<$.length;It++){var Qt=$[It];if(this.style._layers[Qt].is3D()){this.opaquePassCutoff=It;break}}this.renderPass="offscreen";for(var ar=0,mr=$;ar<mr.length;ar+=1){var Pr=mr[ar],Dr=this.style._layers[Pr];if(!(!Dr.hasOffscreenPass()||Dr.isHidden(this.transform.zoom))){var Xr=Rt[Dr.source];Dr.type!=="custom"&&!Xr.length||this.renderLayer(this,we[Dr.source],Dr,Xr)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:K.showOverdrawInspector?i.Color.black:i.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=K.showOverdrawInspector,this.depthRangeFor3D=[0,1-(R._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=$.length-1;this.currentLayer>=0;this.currentLayer--){var Gr=this.style._layers[$[this.currentLayer]],Fr=we[Gr.source],Kr=dt[Gr.source];this._renderTileClippingMasks(Gr,Kr),this.renderLayer(this,Fr,Gr,Kr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<$.length;this.currentLayer++){var Cr=this.style._layers[$[this.currentLayer]],yi=we[Cr.source],qi=(Cr.type==="symbol"?ur:Rt)[Cr.source];this._renderTileClippingMasks(Cr,dt[Cr.source]),this.renderLayer(this,yi,Cr,qi)}if(this.options.showTileBoundaries){var vn,Qa,ra=i.values(this.style._layers);ra.forEach(function(mo){mo.source&&!mo.isHidden(N.transform.zoom)&&(mo.source!==(Qa&&Qa.id)&&(Qa=N.style.sourceCaches[mo.source]),(!vn||vn.getSource().maxzoom<Qa.getSource().maxzoom)&&(vn=Qa))}),vn&&pl.debug(this,vn,vn.getVisibleCoordinates())}this.options.showPadding&&Yi(this),this.context.setDefault()},Hl.prototype.renderLayer=function(R,K,N,$){N.isHidden(this.transform.zoom)||N.type!=="background"&&N.type!=="custom"&&!$.length||(this.id=N.id,this.gpuTimingStart(N),pl[N.type](R,K,N,$,this.style.placement.variableOffsets),this.gpuTimingEnd())},Hl.prototype.gpuTimingStart=function(R){if(this.options.gpuTiming){var K=this.context.extTimerQuery,N=this.gpuTimers[R.id];N||(N=this.gpuTimers[R.id]={calls:0,cpuTime:0,query:K.createQueryEXT()}),N.calls++,K.beginQueryEXT(K.TIME_ELAPSED_EXT,N.query)}},Hl.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var R=this.context.extTimerQuery;R.endQueryEXT(R.TIME_ELAPSED_EXT)}},Hl.prototype.collectGpuTimers=function(){var R=this.gpuTimers;return this.gpuTimers={},R},Hl.prototype.queryGpuTimers=function(R){var K={};for(var N in R){var $=R[N],we=this.context.extTimerQuery,ge=we.getQueryObjectEXT($.query,we.QUERY_RESULT_EXT)/(1e3*1e3);we.deleteQueryEXT($.query),K[N]=ge}return K},Hl.prototype.translatePosMatrix=function(R,K,N,$,we){if(!N[0]&&!N[1])return R;var ge=we?$==="map"?this.transform.angle:0:$==="viewport"?-this.transform.angle:0;if(ge){var Ue=Math.sin(ge),dt=Math.cos(ge);N=[N[0]*dt-N[1]*Ue,N[0]*Ue+N[1]*dt]}var Rt=[we?N[0]:Ba(K,N[0],this.transform.zoom),we?N[1]:Ba(K,N[1],this.transform.zoom),0],ur=new Float32Array(16);return i.translate(ur,R,Rt),ur},Hl.prototype.saveTileTexture=function(R){var K=this._tileTextures[R.size[0]];K?K.push(R):this._tileTextures[R.size[0]]=[R]},Hl.prototype.getTileTexture=function(R){var K=this._tileTextures[R];return K&&K.length>0?K.pop():null},Hl.prototype.isPatternMissing=function(R){if(!R)return!1;if(!R.from||!R.to)return!0;var K=this.imageManager.getPattern(R.from.toString()),N=this.imageManager.getPattern(R.to.toString());return!K||!N},Hl.prototype.useProgram=function(R,K){this.cache=this.cache||{};var N=""+R+(K?K.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[N]||(this.cache[N]=new Oo(this.context,R,Ma[R],K,_s[R],this._showOverdrawInspector)),this.cache[N]},Hl.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()},Hl.prototype.setBaseState=function(){var R=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(R.FUNC_ADD)},Hl.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var R=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,R.RGBA)}},Hl.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Ll=function(R,K){this.points=R,this.planes=K};Ll.fromInvProjectionMatrix=function(R,K,N){var $=[[-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]],we=Math.pow(2,N),ge=$.map(function(Rt){return i.transformMat4([],Rt,R)}).map(function(Rt){return i.scale$1([],Rt,1/Rt[3]/K*we)}),Ue=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],dt=Ue.map(function(Rt){var ur=i.sub([],ge[Rt[0]],ge[Rt[1]]),gr=i.sub([],ge[Rt[2]],ge[Rt[1]]),cr=i.normalize([],i.cross([],ur,gr)),It=-i.dot(cr,ge[Rt[1]]);return cr.concat(It)});return new Ll(ge,dt)};var Ql=function(R,K){this.min=R,this.max=K,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ql.prototype.quadrant=function(R){for(var K=[R%2===0,R<2],N=i.clone$2(this.min),$=i.clone$2(this.max),we=0;we<K.length;we++)N[we]=K[we]?this.min[we]:this.center[we],$[we]=K[we]?this.center[we]:this.max[we];return $[2]=this.max[2],new Ql(N,$)},Ql.prototype.distanceX=function(R){var K=Math.max(Math.min(this.max[0],R[0]),this.min[0]);return K-R[0]},Ql.prototype.distanceY=function(R){var K=Math.max(Math.min(this.max[1],R[1]),this.min[1]);return K-R[1]},Ql.prototype.intersects=function(R){for(var K=[[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]],N=!0,$=0;$<R.planes.length;$++){for(var we=R.planes[$],ge=0,Ue=0;Ue<K.length;Ue++)ge+=i.dot$1(we,K[Ue])>=0;if(ge===0)return 0;ge!==K.length&&(N=!1)}if(N)return 2;for(var dt=0;dt<3;dt++){for(var Rt=Number.MAX_VALUE,ur=-Number.MAX_VALUE,gr=0;gr<R.points.length;gr++){var cr=R.points[gr][dt]-this.min[dt];Rt=Math.min(Rt,cr),ur=Math.max(ur,cr)}if(ur<0||Rt>this.max[dt]-this.min[dt])return 0}return 1};var ku=function(R,K,N,$){if(R===void 0&&(R=0),K===void 0&&(K=0),N===void 0&&(N=0),$===void 0&&($=0),isNaN(R)||R<0||isNaN(K)||K<0||isNaN(N)||N<0||isNaN($)||$<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=R,this.bottom=K,this.left=N,this.right=$};ku.prototype.interpolate=function(R,K,N){return K.top!=null&&R.top!=null&&(this.top=i.number(R.top,K.top,N)),K.bottom!=null&&R.bottom!=null&&(this.bottom=i.number(R.bottom,K.bottom,N)),K.left!=null&&R.left!=null&&(this.left=i.number(R.left,K.left,N)),K.right!=null&&R.right!=null&&(this.right=i.number(R.right,K.right,N)),this},ku.prototype.getCenter=function(R,K){var N=i.clamp((this.left+R-this.right)/2,0,R),$=i.clamp((this.top+K-this.bottom)/2,0,K);return new i.Point(N,$)},ku.prototype.equals=function(R){return this.top===R.top&&this.bottom===R.bottom&&this.left===R.left&&this.right===R.right},ku.prototype.clone=function(){return new ku(this.top,this.bottom,this.left,this.right)},ku.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Jl=function(R,K,N,$,we){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=we===void 0?!0:we,this._minZoom=R||0,this._maxZoom=K||22,this._minPitch=N==null?0:N,this._maxPitch=$==null?60:$,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 ku,this._posMatrixCache={},this._alignedPosMatrixCache={}},Kl={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}};Jl.prototype.clone=function(){var R=new Jl(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return R.tileSize=this.tileSize,R.latRange=this.latRange,R.width=this.width,R.height=this.height,R._center=this._center,R.zoom=this.zoom,R.angle=this.angle,R._fov=this._fov,R._pitch=this._pitch,R._unmodified=this._unmodified,R._edgeInsets=this._edgeInsets.clone(),R._calcMatrices(),R},Kl.minZoom.get=function(){return this._minZoom},Kl.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},Kl.maxZoom.get=function(){return this._maxZoom},Kl.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},Kl.minPitch.get=function(){return this._minPitch},Kl.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},Kl.maxPitch.get=function(){return this._maxPitch},Kl.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},Kl.renderWorldCopies.get=function(){return this._renderWorldCopies},Kl.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},Kl.worldSize.get=function(){return this.tileSize*this.scale},Kl.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Kl.size.get=function(){return new i.Point(this.width,this.height)},Kl.bearing.get=function(){return-this.angle/Math.PI*180},Kl.bearing.set=function(Y){var R=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==R&&(this._unmodified=!1,this.angle=R,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Kl.pitch.get=function(){return this._pitch/Math.PI*180},Kl.pitch.set=function(Y){var R=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==R&&(this._unmodified=!1,this._pitch=R,this._calcMatrices())},Kl.fov.get=function(){return this._fov/Math.PI*180},Kl.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())},Kl.zoom.get=function(){return this._zoom},Kl.zoom.set=function(Y){var R=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==R&&(this._unmodified=!1,this._zoom=R,this.scale=this.zoomScale(R),this.tileZoom=Math.floor(R),this.zoomFraction=R-this.tileZoom,this._constrain(),this._calcMatrices())},Kl.center.get=function(){return this._center},Kl.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},Kl.padding.get=function(){return this._edgeInsets.toJSON()},Kl.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},Kl.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Jl.prototype.isPaddingEqual=function(R){return this._edgeInsets.equals(R)},Jl.prototype.interpolatePadding=function(R,K,N){this._unmodified=!1,this._edgeInsets.interpolate(R,K,N),this._constrain(),this._calcMatrices()},Jl.prototype.coveringZoomLevel=function(R){var K=(R.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/R.tileSize));return Math.max(0,K)},Jl.prototype.getVisibleUnwrappedCoordinates=function(R){var K=[new i.UnwrappedTileID(0,R)];if(this._renderWorldCopies)for(var N=this.pointCoordinate(new i.Point(0,0)),$=this.pointCoordinate(new i.Point(this.width,0)),we=this.pointCoordinate(new i.Point(this.width,this.height)),ge=this.pointCoordinate(new i.Point(0,this.height)),Ue=Math.floor(Math.min(N.x,$.x,we.x,ge.x)),dt=Math.floor(Math.max(N.x,$.x,we.x,ge.x)),Rt=1,ur=Ue-Rt;ur<=dt+Rt;ur++)ur!==0&&K.push(new i.UnwrappedTileID(ur,R));return K},Jl.prototype.coveringTiles=function(R){var K=this.coveringZoomLevel(R),N=K;if(R.minzoom!==void 0&&K<R.minzoom)return[];R.maxzoom!==void 0&&K>R.maxzoom&&(K=R.maxzoom);var $=i.MercatorCoordinate.fromLngLat(this.center),we=Math.pow(2,K),ge=[we*$.x,we*$.y,0],Ue=Ll.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,K),dt=R.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(dt=K);var Rt=3,ur=function(ra){return{aabb:new Ql([ra*we,0,0],[(ra+1)*we,we,0]),zoom:0,x:0,y:0,wrap:ra,fullyVisible:!1}},gr=[],cr=[],It=K,Qt=R.reparseOverscaled?N:K;if(this._renderWorldCopies)for(var ar=1;ar<=3;ar++)gr.push(ur(-ar)),gr.push(ur(ar));for(gr.push(ur(0));gr.length>0;){var mr=gr.pop(),Pr=mr.x,Dr=mr.y,Xr=mr.fullyVisible;if(!Xr){var Gr=mr.aabb.intersects(Ue);if(Gr===0)continue;Xr=Gr===2}var Fr=mr.aabb.distanceX(ge),Kr=mr.aabb.distanceY(ge),Cr=Math.max(Math.abs(Fr),Math.abs(Kr)),yi=Rt+(1<<It-mr.zoom)-2;if(mr.zoom===It||Cr>yi&&mr.zoom>=dt){cr.push({tileID:new i.OverscaledTileID(mr.zoom===It?Qt:mr.zoom,mr.wrap,mr.zoom,Pr,Dr),distanceSq:i.sqrLen([ge[0]-.5-Pr,ge[1]-.5-Dr])});continue}for(var qi=0;qi<4;qi++){var vn=(Pr<<1)+qi%2,Qa=(Dr<<1)+(qi>>1);gr.push({aabb:mr.aabb.quadrant(qi),zoom:mr.zoom+1,x:vn,y:Qa,wrap:mr.wrap,fullyVisible:Xr})}}return cr.sort(function(ra,mo){return ra.distanceSq-mo.distanceSq}).map(function(ra){return ra.tileID})},Jl.prototype.resize=function(R,K){this.width=R,this.height=K,this.pixelsToGLUnits=[2/R,-2/K],this._constrain(),this._calcMatrices()},Kl.unmodified.get=function(){return this._unmodified},Jl.prototype.zoomScale=function(R){return Math.pow(2,R)},Jl.prototype.scaleZoom=function(R){return Math.log(R)/Math.LN2},Jl.prototype.project=function(R){var K=i.clamp(R.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(R.lng)*this.worldSize,i.mercatorYfromLat(K)*this.worldSize)},Jl.prototype.unproject=function(R){return new i.MercatorCoordinate(R.x/this.worldSize,R.y/this.worldSize).toLngLat()},Kl.point.get=function(){return this.project(this.center)},Jl.prototype.setLocationAtPoint=function(R,K){var N=this.pointCoordinate(K),$=this.pointCoordinate(this.centerPoint),we=this.locationCoordinate(R),ge=new i.MercatorCoordinate(we.x-(N.x-$.x),we.y-(N.y-$.y));this.center=this.coordinateLocation(ge),this._renderWorldCopies&&(this.center=this.center.wrap())},Jl.prototype.locationPoint=function(R){return this.coordinatePoint(this.locationCoordinate(R))},Jl.prototype.pointLocation=function(R){return this.coordinateLocation(this.pointCoordinate(R))},Jl.prototype.locationCoordinate=function(R){return i.MercatorCoordinate.fromLngLat(R)},Jl.prototype.coordinateLocation=function(R){return R.toLngLat()},Jl.prototype.pointCoordinate=function(R){var K=0,N=[R.x,R.y,0,1],$=[R.x,R.y,1,1];i.transformMat4(N,N,this.pixelMatrixInverse),i.transformMat4($,$,this.pixelMatrixInverse);var we=N[3],ge=$[3],Ue=N[0]/we,dt=$[0]/ge,Rt=N[1]/we,ur=$[1]/ge,gr=N[2]/we,cr=$[2]/ge,It=gr===cr?0:(K-gr)/(cr-gr);return new i.MercatorCoordinate(i.number(Ue,dt,It)/this.worldSize,i.number(Rt,ur,It)/this.worldSize)},Jl.prototype.coordinatePoint=function(R){var K=[R.x*this.worldSize,R.y*this.worldSize,0,1];return i.transformMat4(K,K,this.pixelMatrix),new i.Point(K[0]/K[3],K[1]/K[3])},Jl.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)))},Jl.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]])},Jl.prototype.setMaxBounds=function(R){R?(this.lngRange=[R.getWest(),R.getEast()],this.latRange=[R.getSouth(),R.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Jl.prototype.calculatePosMatrix=function(R,K){K===void 0&&(K=!1);var N=R.key,$=K?this._alignedPosMatrixCache:this._posMatrixCache;if($[N])return $[N];var we=R.canonical,ge=this.worldSize/this.zoomScale(we.z),Ue=we.x+Math.pow(2,we.z)*R.wrap,dt=i.identity(new Float64Array(16));return i.translate(dt,dt,[Ue*ge,we.y*ge,0]),i.scale(dt,dt,[ge/i.EXTENT,ge/i.EXTENT,1]),i.multiply(dt,K?this.alignedProjMatrix:this.projMatrix,dt),$[N]=new Float32Array(dt),$[N]},Jl.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Jl.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var R=-90,K=90,N=-180,$=180,we,ge,Ue,dt,Rt=this.size,ur=this._unmodified;if(this.latRange){var gr=this.latRange;R=i.mercatorYfromLat(gr[1])*this.worldSize,K=i.mercatorYfromLat(gr[0])*this.worldSize,we=K-R<Rt.y?Rt.y/(K-R):0}if(this.lngRange){var cr=this.lngRange;N=i.mercatorXfromLng(cr[0])*this.worldSize,$=i.mercatorXfromLng(cr[1])*this.worldSize,ge=$-N<Rt.x?Rt.x/($-N):0}var It=this.point,Qt=Math.max(ge||0,we||0);if(Qt){this.center=this.unproject(new i.Point(ge?($+N)/2:It.x,we?(K+R)/2:It.y)),this.zoom+=this.scaleZoom(Qt),this._unmodified=ur,this._constraining=!1;return}if(this.latRange){var ar=It.y,mr=Rt.y/2;ar-mr<R&&(dt=R+mr),ar+mr>K&&(dt=K-mr)}if(this.lngRange){var Pr=It.x,Dr=Rt.x/2;Pr-Dr<N&&(Ue=N+Dr),Pr+Dr>$&&(Ue=$-Dr)}(Ue!==void 0||dt!==void 0)&&(this.center=this.unproject(new i.Point(Ue!==void 0?Ue:It.x,dt!==void 0?dt:It.y))),this._unmodified=ur,this._constraining=!1}},Jl.prototype._calcMatrices=function(){if(this.height){var R=this._fov/2,K=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(R)*this.height;var N=Math.PI/2+this._pitch,$=this._fov*(.5+K.y/this.height),we=Math.sin($)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-N-$,.01,Math.PI-.01)),ge=this.point,Ue=ge.x,dt=ge.y,Rt=Math.cos(Math.PI/2-this._pitch)*we+this.cameraToCenterDistance,ur=Rt*1.01,gr=this.height/50,cr=new Float64Array(16);i.perspective(cr,this._fov,this.width/this.height,gr,ur),cr[8]=-K.x*2/this.width,cr[9]=K.y*2/this.height,i.scale(cr,cr,[1,-1,1]),i.translate(cr,cr,[0,0,-this.cameraToCenterDistance]),i.rotateX(cr,cr,this._pitch),i.rotateZ(cr,cr,this.angle),i.translate(cr,cr,[-Ue,-dt,0]),this.mercatorMatrix=i.scale([],cr,[this.worldSize,this.worldSize,this.worldSize]),i.scale(cr,cr,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=cr,this.invProjMatrix=i.invert([],this.projMatrix);var It=this.width%2/2,Qt=this.height%2/2,ar=Math.cos(this.angle),mr=Math.sin(this.angle),Pr=Ue-Math.round(Ue)+ar*It+mr*Qt,Dr=dt-Math.round(dt)+ar*Qt+mr*It,Xr=new Float64Array(cr);if(i.translate(Xr,Xr,[Pr>.5?Pr-1:Pr,Dr>.5?Dr-1:Dr,0]),this.alignedProjMatrix=Xr,cr=i.create(),i.scale(cr,cr,[this.width/2,-this.height/2,1]),i.translate(cr,cr,[1,-1,0]),this.labelPlaneMatrix=cr,cr=i.create(),i.scale(cr,cr,[1,-1,1]),i.translate(cr,cr,[-1,-1,0]),i.scale(cr,cr,[2/this.width,2/this.height,1]),this.glCoordMatrix=cr,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),cr=i.invert(new Float64Array(16),this.pixelMatrix),!cr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=cr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Jl.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var R=this.pointCoordinate(new i.Point(0,0)),K=[R.x*this.worldSize,R.y*this.worldSize,0,1],N=i.transformMat4(K,K,this.pixelMatrix);return N[3]/this.cameraToCenterDistance},Jl.prototype.getCameraPoint=function(){var R=this._pitch,K=Math.tan(R)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,K))},Jl.prototype.getCameraQueryGeometry=function(R){var K=this.getCameraPoint();if(R.length===1)return[R[0],K];for(var N=K.x,$=K.y,we=K.x,ge=K.y,Ue=0,dt=R;Ue<dt.length;Ue+=1){var Rt=dt[Ue];N=Math.min(N,Rt.x),$=Math.min($,Rt.y),we=Math.max(we,Rt.x),ge=Math.max(ge,Rt.y)}return[new i.Point(N,$),new i.Point(we,$),new i.Point(we,ge),new i.Point(N,ge),new i.Point(N,$)]},Object.defineProperties(Jl.prototype,Kl);function Hu(Y,R){var K=!1,N=null,$=function(){N=null,K&&(Y(),N=setTimeout($,R),K=!1)};return function(){return K=!0,N||$(),N}}var tf=function(R){this._hashName=R&&encodeURIComponent(R),i.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=Hu(this._updateHashUnthrottled.bind(this),30*1e3/100)};tf.prototype.addTo=function(R){return this._map=R,i.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},tf.prototype.remove=function(){return i.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},tf.prototype.getHashString=function(R){var K=this._map.getCenter(),N=Math.round(this._map.getZoom()*100)/100,$=Math.ceil((N*Math.LN2+Math.log(512/360/.5))/Math.LN10),we=Math.pow(10,$),ge=Math.round(K.lng*we)/we,Ue=Math.round(K.lat*we)/we,dt=this._map.getBearing(),Rt=this._map.getPitch(),ur="";if(R?ur+="/"+ge+"/"+Ue+"/"+N:ur+=N+"/"+Ue+"/"+ge,(dt||Rt)&&(ur+="/"+Math.round(dt*10)/10),Rt&&(ur+="/"+Math.round(Rt)),this._hashName){var gr=this._hashName,cr=!1,It=i.window.location.hash.slice(1).split("&").map(function(Qt){var ar=Qt.split("=")[0];return ar===gr?(cr=!0,ar+"="+ur):Qt}).filter(function(Qt){return Qt});return cr||It.push(gr+"="+ur),"#"+It.join("&")}return"#"+ur},tf.prototype._getCurrentHash=function(){var R=this,K=i.window.location.hash.replace("#","");if(this._hashName){var N;return K.split("&").map(function($){return $.split("=")}).forEach(function($){$[0]===R._hashName&&(N=$)}),(N&&N[1]||"").split("/")}return K.split("/")},tf.prototype._onHashChange=function(){var R=this._getCurrentHash();if(R.length>=3&&!R.some(function(N){return isNaN(N)})){var K=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(R[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+R[2],+R[1]],zoom:+R[0],bearing:K,pitch:+(R[4]||0)}),!0}return!1},tf.prototype._updateHashUnthrottled=function(){var R=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,R)}catch(K){}};var Ku={linearity:.3,easing:i.bezier(0,0,.3,1)},Gu=i.extend({deceleration:2500,maxSpeed:1400},Ku),Wu=i.extend({deceleration:20,maxSpeed:1400},Ku),sf=i.extend({deceleration:1e3,maxSpeed:360},Ku),gf=i.extend({deceleration:1e3,maxSpeed:90},Ku),nf=function(R){this._map=R,this.clear()};nf.prototype.clear=function(){this._inertiaBuffer=[]},nf.prototype.record=function(R){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:R})},nf.prototype._drainInertiaBuffer=function(){for(var R=this._inertiaBuffer,K=i.browser.now(),N=160;R.length>0&&K-R[0].time>N;)R.shift()},nf.prototype._onMoveEnd=function(R){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var K={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},N=0,$=this._inertiaBuffer;N<$.length;N+=1){var we=$[N],ge=we.settings;K.zoom+=ge.zoomDelta||0,K.bearing+=ge.bearingDelta||0,K.pitch+=ge.pitchDelta||0,ge.panDelta&&K.pan._add(ge.panDelta),ge.around&&(K.around=ge.around),ge.pinchAround&&(K.pinchAround=ge.pinchAround)}var Ue=this._inertiaBuffer[this._inertiaBuffer.length-1],dt=Ue.time-this._inertiaBuffer[0].time,Rt={};if(K.pan.mag()){var ur=X(K.pan.mag(),dt,i.extend({},Gu,R||{}));Rt.offset=K.pan.mult(ur.amount/K.pan.mag()),Rt.center=this._map.transform.center,af(Rt,ur)}if(K.zoom){var gr=X(K.zoom,dt,Wu);Rt.zoom=this._map.transform.zoom+gr.amount,af(Rt,gr)}if(K.bearing){var cr=X(K.bearing,dt,sf);Rt.bearing=this._map.transform.bearing+i.clamp(cr.amount,-179,179),af(Rt,cr)}if(K.pitch){var It=X(K.pitch,dt,gf);Rt.pitch=this._map.transform.pitch+It.amount,af(Rt,It)}if(Rt.zoom||Rt.bearing){var Qt=K.pinchAround===void 0?K.around:K.pinchAround;Rt.around=Qt?this._map.unproject(Qt):this._map.getCenter()}return this.clear(),i.extend(Rt,{noMoveStart:!0})}};function af(Y,R){(!Y.duration||Y.duration<R.duration)&&(Y.duration=R.duration,Y.easing=R.easing)}function X(Y,R,K){var N=K.maxSpeed,$=K.linearity,we=K.deceleration,ge=i.clamp(Y*$/(R/1e3),-N,N),Ue=Math.abs(ge)/(we*$);return{easing:K.easing,duration:Ue*1e3,amount:ge*(Ue/2)}}var se=function(Y){function R(N,$,we,ge){ge===void 0&&(ge={});var Ue=o.mousePos($.getCanvasContainer(),we),dt=$.unproject(Ue);Y.call(this,N,i.extend({point:Ue,lngLat:dt,originalEvent:we},ge)),this._defaultPrevented=!1,this.target=$}Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R;var K={defaultPrevented:{configurable:!0}};return R.prototype.preventDefault=function(){this._defaultPrevented=!0},K.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(R.prototype,K),R}(i.Event),Le=function(Y){function R(N,$,we){var ge=N==="touchend"?we.changedTouches:we.touches,Ue=o.touchPos($.getCanvasContainer(),ge),dt=Ue.map(function(gr){return $.unproject(gr)}),Rt=Ue.reduce(function(gr,cr,It,Qt){return gr.add(cr.div(Qt.length))},new i.Point(0,0)),ur=$.unproject(Rt);Y.call(this,N,{points:Ue,point:Rt,lngLats:dt,lngLat:ur,originalEvent:we}),this._defaultPrevented=!1}Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R;var K={defaultPrevented:{configurable:!0}};return R.prototype.preventDefault=function(){this._defaultPrevented=!0},K.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(R.prototype,K),R}(i.Event),We=function(Y){function R(N,$,we){Y.call(this,N,{originalEvent:we}),this._defaultPrevented=!1}Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R;var K={defaultPrevented:{configurable:!0}};return R.prototype.preventDefault=function(){this._defaultPrevented=!0},K.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(R.prototype,K),R}(i.Event),Ye=function(R,K){this._map=R,this._clickTolerance=K.clickTolerance};Ye.prototype.reset=function(){delete this._mousedownPos},Ye.prototype.wheel=function(R){return this._firePreventable(new We(R.type,this._map,R))},Ye.prototype.mousedown=function(R,K){return this._mousedownPos=K,this._firePreventable(new se(R.type,this._map,R))},Ye.prototype.mouseup=function(R){this._map.fire(new se(R.type,this._map,R))},Ye.prototype.click=function(R,K){this._mousedownPos&&this._mousedownPos.dist(K)>=this._clickTolerance||this._map.fire(new se(R.type,this._map,R))},Ye.prototype.dblclick=function(R){return this._firePreventable(new se(R.type,this._map,R))},Ye.prototype.mouseover=function(R){this._map.fire(new se(R.type,this._map,R))},Ye.prototype.mouseout=function(R){this._map.fire(new se(R.type,this._map,R))},Ye.prototype.touchstart=function(R){return this._firePreventable(new Le(R.type,this._map,R))},Ye.prototype.touchmove=function(R){this._map.fire(new Le(R.type,this._map,R))},Ye.prototype.touchend=function(R){this._map.fire(new Le(R.type,this._map,R))},Ye.prototype.touchcancel=function(R){this._map.fire(new Le(R.type,this._map,R))},Ye.prototype._firePreventable=function(R){if(this._map.fire(R),R.defaultPrevented)return{}},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var it=function(R){this._map=R};it.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},it.prototype.mousemove=function(R){this._map.fire(new se(R.type,this._map,R))},it.prototype.mousedown=function(){this._delayContextMenu=!0},it.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new se("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},it.prototype.contextmenu=function(R){this._delayContextMenu?this._contextMenuEvent=R:this._map.fire(new se(R.type,this._map,R)),this._map.listens("contextmenu")&&R.preventDefault()},it.prototype.isEnabled=function(){return!0},it.prototype.isActive=function(){return!1},it.prototype.enable=function(){},it.prototype.disable=function(){};var Nt=function(R,K){this._map=R,this._el=R.getCanvasContainer(),this._container=R.getContainer(),this._clickTolerance=K.clickTolerance||1};Nt.prototype.isEnabled=function(){return!!this._enabled},Nt.prototype.isActive=function(){return!!this._active},Nt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Nt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Nt.prototype.mousedown=function(R,K){this.isEnabled()&&R.shiftKey&&R.button===0&&(o.disableDrag(),this._startPos=this._lastPos=K,this._active=!0)},Nt.prototype.mousemoveWindow=function(R,K){if(this._active){var N=K;if(!(this._lastPos.equals(N)||!this._box&&N.dist(this._startPos)<this._clickTolerance)){var $=this._startPos;this._lastPos=N,this._box||(this._box=o.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",R));var we=Math.min($.x,N.x),ge=Math.max($.x,N.x),Ue=Math.min($.y,N.y),dt=Math.max($.y,N.y);o.setTransform(this._box,"translate("+we+"px,"+Ue+"px)"),this._box.style.width=ge-we+"px",this._box.style.height=dt-Ue+"px"}}},Nt.prototype.mouseupWindow=function(R,K){var N=this;if(this._active&&R.button===0){var $=this._startPos,we=K;if(this.reset(),o.suppressClick(),$.x===we.x&&$.y===we.y)this._fireEvent("boxzoomcancel",R);else return this._map.fire(new i.Event("boxzoomend",{originalEvent:R})),{cameraAnimation:function(ge){return ge.fitScreenCoordinates($,we,N._map.getBearing(),{linear:!0})}}}},Nt.prototype.keydown=function(R){this._active&&R.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",R))},Nt.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},Nt.prototype._fireEvent=function(R,K){return this._map.fire(new i.Event(R,{originalEvent:K}))};function mt(Y,R){for(var K={},N=0;N<Y.length;N++)K[Y[N].identifier]=R[N];return K}function er(Y){for(var R=new i.Point(0,0),K=0,N=Y;K<N.length;K+=1){var $=N[K];R._add($)}return R.div(Y.length)}var _r=500,wr=500,ni=30,Wr=function(R){this.reset(),this.numTouches=R.numTouches};Wr.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Wr.prototype.touchstart=function(R,K,N){(this.centroid||N.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=R.timeStamp),N.length===this.numTouches&&(this.centroid=er(K),this.touches=mt(N,K)))},Wr.prototype.touchmove=function(R,K,N){if(!(this.aborted||!this.centroid)){var $=mt(N,K);for(var we in this.touches){var ge=this.touches[we],Ue=$[we];(!Ue||Ue.dist(ge)>ni)&&(this.aborted=!0)}}},Wr.prototype.touchend=function(R,K,N){if((!this.centroid||R.timeStamp-this.startTime>wr)&&(this.aborted=!0),N.length===0){var $=!this.aborted&&this.centroid;if(this.reset(),$)return $}};var Ci=function(R){this.singleTap=new Wr(R),this.numTaps=R.numTaps,this.reset()};Ci.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ci.prototype.touchstart=function(R,K,N){this.singleTap.touchstart(R,K,N)},Ci.prototype.touchmove=function(R,K,N){this.singleTap.touchmove(R,K,N)},Ci.prototype.touchend=function(R,K,N){var $=this.singleTap.touchend(R,K,N);if($){var we=R.timeStamp-this.lastTime<_r,ge=!this.lastTap||this.lastTap.dist($)<ni;if((!we||!ge)&&this.reset(),this.count++,this.lastTime=R.timeStamp,this.lastTap=$,this.count===this.numTaps)return this.reset(),$}};var Ji=function(){this._zoomIn=new Ci({numTouches:1,numTaps:2}),this._zoomOut=new Ci({numTouches:2,numTaps:1}),this.reset()};Ji.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Ji.prototype.touchstart=function(R,K,N){this._zoomIn.touchstart(R,K,N),this._zoomOut.touchstart(R,K,N)},Ji.prototype.touchmove=function(R,K,N){this._zoomIn.touchmove(R,K,N),this._zoomOut.touchmove(R,K,N)},Ji.prototype.touchend=function(R,K,N){var $=this,we=this._zoomIn.touchend(R,K,N),ge=this._zoomOut.touchend(R,K,N);if(we)return this._active=!0,R.preventDefault(),setTimeout(function(){return $.reset()},0),{cameraAnimation:function(Ue){return Ue.easeTo({duration:300,zoom:Ue.getZoom()+1,around:Ue.unproject(we)},{originalEvent:R})}};if(ge)return this._active=!0,R.preventDefault(),setTimeout(function(){return $.reset()},0),{cameraAnimation:function(Ue){return Ue.easeTo({duration:300,zoom:Ue.getZoom()-1,around:Ue.unproject(ge)},{originalEvent:R})}}},Ji.prototype.touchcancel=function(){this.reset()},Ji.prototype.enable=function(){this._enabled=!0},Ji.prototype.disable=function(){this._enabled=!1,this.reset()},Ji.prototype.isEnabled=function(){return this._enabled},Ji.prototype.isActive=function(){return this._active};var ai=0,Ti=2,Bi={};Bi[ai]=1,Bi[Ti]=2;function en(Y,R){var K=Bi[R];return Y.buttons===void 0||(Y.buttons&K)!==K}var Wi=function(R){this.reset(),this._clickTolerance=R.clickTolerance||1};Wi.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Wi.prototype._correctButton=function(R,K){return!1},Wi.prototype._move=function(R,K){return{}},Wi.prototype.mousedown=function(R,K){if(!this._lastPoint){var N=o.mouseButton(R);this._correctButton(R,N)&&(this._lastPoint=K,this._eventButton=N)}},Wi.prototype.mousemoveWindow=function(R,K){var N=this._lastPoint;if(N){if(R.preventDefault(),en(R,this._eventButton)){this.reset();return}if(!(!this._moved&&K.dist(N)<this._clickTolerance))return this._moved=!0,this._lastPoint=K,this._move(N,K)}},Wi.prototype.mouseupWindow=function(R){if(this._lastPoint){var K=o.mouseButton(R);K===this._eventButton&&(this._moved&&o.suppressClick(),this.reset())}},Wi.prototype.enable=function(){this._enabled=!0},Wi.prototype.disable=function(){this._enabled=!1,this.reset()},Wi.prototype.isEnabled=function(){return this._enabled},Wi.prototype.isActive=function(){return this._active};var bi=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.mousedown=function(N,$){Y.prototype.mousedown.call(this,N,$),this._lastPoint&&(this._active=!0)},R.prototype._correctButton=function(N,$){return $===ai&&!N.ctrlKey},R.prototype._move=function(N,$){return{around:$,panDelta:$.sub(N)}},R}(Wi),ao=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype._correctButton=function(N,$){return $===ai&&N.ctrlKey||$===Ti},R.prototype._move=function(N,$){var we=.8,ge=($.x-N.x)*we;if(ge)return this._active=!0,{bearingDelta:ge}},R.prototype.contextmenu=function(N){N.preventDefault()},R}(Wi),yo=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype._correctButton=function(N,$){return $===ai&&N.ctrlKey||$===Ti},R.prototype._move=function(N,$){var we=-.5,ge=($.y-N.y)*we;if(ge)return this._active=!0,{pitchDelta:ge}},R.prototype.contextmenu=function(N){N.preventDefault()},R}(Wi),Ko=function(R){this._minTouches=1,this._clickTolerance=R.clickTolerance||1,this.reset()};Ko.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new i.Point(0,0)},Ko.prototype.touchstart=function(R,K,N){return this._calculateTransform(R,K,N)},Ko.prototype.touchmove=function(R,K,N){if(!(!this._active||N.length<this._minTouches))return R.preventDefault(),this._calculateTransform(R,K,N)},Ko.prototype.touchend=function(R,K,N){this._calculateTransform(R,K,N),this._active&&N.length<this._minTouches&&this.reset()},Ko.prototype.touchcancel=function(){this.reset()},Ko.prototype._calculateTransform=function(R,K,N){N.length>0&&(this._active=!0);var $=mt(N,K),we=new i.Point(0,0),ge=new i.Point(0,0),Ue=0;for(var dt in $){var Rt=$[dt],ur=this._touches[dt];ur&&(we._add(Rt),ge._add(Rt.sub(ur)),Ue++,$[dt]=Rt)}if(this._touches=$,!(Ue<this._minTouches||!ge.mag())){var gr=ge.div(Ue);if(this._sum._add(gr),!(this._sum.mag()<this._clickTolerance)){var cr=we.div(Ue);return{around:cr,panDelta:gr}}}},Ko.prototype.enable=function(){this._enabled=!0},Ko.prototype.disable=function(){this._enabled=!1,this.reset()},Ko.prototype.isEnabled=function(){return this._enabled},Ko.prototype.isActive=function(){return this._active};var Ms=function(){this.reset()};Ms.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Ms.prototype._start=function(R){},Ms.prototype._move=function(R,K,N){return{}},Ms.prototype.touchstart=function(R,K,N){this._firstTwoTouches||N.length<2||(this._firstTwoTouches=[N[0].identifier,N[1].identifier],this._start([K[0],K[1]]))},Ms.prototype.touchmove=function(R,K,N){if(this._firstTwoTouches){R.preventDefault();var $=this._firstTwoTouches,we=$[0],ge=$[1],Ue=vl(N,K,we),dt=vl(N,K,ge);if(!(!Ue||!dt)){var Rt=this._aroundCenter?null:Ue.add(dt).div(2);return this._move([Ue,dt],Rt,R)}}},Ms.prototype.touchend=function(R,K,N){if(this._firstTwoTouches){var $=this._firstTwoTouches,we=$[0],ge=$[1],Ue=vl(N,K,we),dt=vl(N,K,ge);Ue&&dt||(this._active&&o.suppressClick(),this.reset())}},Ms.prototype.touchcancel=function(){this.reset()},Ms.prototype.enable=function(R){this._enabled=!0,this._aroundCenter=!!R&&R.around==="center"},Ms.prototype.disable=function(){this._enabled=!1,this.reset()},Ms.prototype.isEnabled=function(){return this._enabled},Ms.prototype.isActive=function(){return this._active};function vl(Y,R,K){for(var N=0;N<Y.length;N++)if(Y[N].identifier===K)return R[N]}var wl=.1;function au(Y,R){return Math.log(Y/R)/Math.LN2}var Al=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.reset=function(){Y.prototype.reset.call(this),delete this._distance,delete this._startDistance},R.prototype._start=function(N){this._startDistance=this._distance=N[0].dist(N[1])},R.prototype._move=function(N,$){var we=this._distance;if(this._distance=N[0].dist(N[1]),!(!this._active&&Math.abs(au(this._distance,this._startDistance))<wl))return this._active=!0,{zoomDelta:au(this._distance,we),pinchAround:$}},R}(Ms),nu=25;function Bu(Y,R){return Y.angleWith(R)*180/Math.PI}var qu=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.reset=function(){Y.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},R.prototype._start=function(N){this._startVector=this._vector=N[0].sub(N[1]),this._minDiameter=N[0].dist(N[1])},R.prototype._move=function(N,$){var we=this._vector;if(this._vector=N[0].sub(N[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:Bu(this._vector,we),pinchAround:$}},R.prototype._isBelowThreshold=function(N){this._minDiameter=Math.min(this._minDiameter,N.mag());var $=Math.PI*this._minDiameter,we=nu/$*360,ge=Bu(N,this._startVector);return Math.abs(ge)<we},R}(Ms);function Ju(Y){return Math.abs(Y.y)>Math.abs(Y.x)}var qo=100,Rl=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},R.prototype._start=function(N){this._lastPoints=N,Ju(N[0].sub(N[1]))&&(this._valid=!1)},R.prototype._move=function(N,$,we){var ge=N[0].sub(this._lastPoints[0]),Ue=N[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ge,Ue,we.timeStamp),!!this._valid){this._lastPoints=N,this._active=!0;var dt=(ge.y+Ue.y)/2,Rt=-.5;return{pitchDelta:dt*Rt}}},R.prototype.gestureBeginsVertically=function(N,$,we){if(this._valid!==void 0)return this._valid;var ge=2,Ue=N.mag()>=ge,dt=$.mag()>=ge;if(!(!Ue&&!dt)){if(!Ue||!dt)return this._firstMove===void 0&&(this._firstMove=we),we-this._firstMove<qo?void 0:!1;var Rt=N.y>0==$.y>0;return Ju(N)&&Ju($)&&Rt}},R}(Ms),pu={panStep:100,bearingStep:15,pitchStep:10},xu=function(){var R=pu;this._panStep=R.panStep,this._bearingStep=R.bearingStep,this._pitchStep=R.pitchStep,this._rotationDisabled=!1};xu.prototype.reset=function(){this._active=!1},xu.prototype.keydown=function(R){var K=this;if(!(R.altKey||R.ctrlKey||R.metaKey)){var N=0,$=0,we=0,ge=0,Ue=0;switch(R.keyCode){case 61:case 107:case 171:case 187:N=1;break;case 189:case 109:case 173:N=-1;break;case 37:R.shiftKey?$=-1:(R.preventDefault(),ge=-1);break;case 39:R.shiftKey?$=1:(R.preventDefault(),ge=1);break;case 38:R.shiftKey?we=1:(R.preventDefault(),Ue=-1);break;case 40:R.shiftKey?we=-1:(R.preventDefault(),Ue=1);break;default:return}return this._rotationDisabled&&($=0,we=0),{cameraAnimation:function(dt){var Rt=dt.getZoom();dt.easeTo({duration:300,easeId:"keyboardHandler",easing:of,zoom:N?Math.round(Rt)+N*(R.shiftKey?2:1):Rt,bearing:dt.getBearing()+$*K._bearingStep,pitch:dt.getPitch()+we*K._pitchStep,offset:[-ge*K._panStep,-Ue*K._panStep],center:dt.getCenter()},{originalEvent:R})}}}},xu.prototype.enable=function(){this._enabled=!0},xu.prototype.disable=function(){this._enabled=!1,this.reset()},xu.prototype.isEnabled=function(){return this._enabled},xu.prototype.isActive=function(){return this._active},xu.prototype.disableRotation=function(){this._rotationDisabled=!0},xu.prototype.enableRotation=function(){this._rotationDisabled=!1};function of(Y){return Y*(2-Y)}var ff=4.000244140625,xf=1/100,hf=1/450,dc=2,Gt=function(R,K){this._map=R,this._el=R.getCanvasContainer(),this._handler=K,this._delta=0,this._defaultZoomRate=xf,this._wheelZoomRate=hf,i.bindAll(["_onTimeout"],this)};Gt.prototype.setZoomRate=function(R){this._defaultZoomRate=R},Gt.prototype.setWheelZoomRate=function(R){this._wheelZoomRate=R},Gt.prototype.isEnabled=function(){return!!this._enabled},Gt.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Gt.prototype.isZooming=function(){return!!this._zooming},Gt.prototype.enable=function(R){this.isEnabled()||(this._enabled=!0,this._aroundCenter=R&&R.around==="center")},Gt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Gt.prototype.wheel=function(R){if(this.isEnabled()){var K=R.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?R.deltaY*40:R.deltaY,N=i.browser.now(),$=N-(this._lastWheelEventTime||0);this._lastWheelEventTime=N,K!==0&&K%ff===0?this._type="wheel":K!==0&&Math.abs(K)<4?this._type="trackpad":$>400?(this._type=null,this._lastValue=K,this._timeout=setTimeout(this._onTimeout,40,R)):this._type||(this._type=Math.abs($*K)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,K+=this._lastValue)),R.shiftKey&&K&&(K=K/4),this._type&&(this._lastWheelEvent=R,this._delta-=K,this._active||this._start(R)),R.preventDefault()}},Gt.prototype._onTimeout=function(R){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(R)},Gt.prototype._start=function(R){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 K=o.mousePos(this._el,R);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(K)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Gt.prototype.renderFrame=function(){var R=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var K=this._map.transform;if(this._delta!==0){var N=this._type==="wheel"&&Math.abs(this._delta)>ff?this._wheelZoomRate:this._defaultZoomRate,$=dc/(1+Math.exp(-Math.abs(this._delta*N)));this._delta<0&&$!==0&&($=1/$);var we=typeof this._targetZoom=="number"?K.zoomScale(this._targetZoom):K.scale;this._targetZoom=Math.min(K.maxZoom,Math.max(K.minZoom,K.scaleZoom(we*$))),this._type==="wheel"&&(this._startZoom=K.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ge=typeof this._targetZoom=="number"?this._targetZoom:K.zoom,Ue=this._startZoom,dt=this._easing,Rt=!1,ur;if(this._type==="wheel"&&Ue&&dt){var gr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),cr=dt(gr);ur=i.number(Ue,ge,cr),gr<1?this._frameId||(this._frameId=!0):Rt=!0}else ur=ge,Rt=!0;return this._active=!0,Rt&&(this._active=!1,this._finishTimeout=setTimeout(function(){R._zooming=!1,R._handler._triggerRenderFrame(),delete R._targetZoom,delete R._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Rt,zoomDelta:ur-K.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Gt.prototype._smoothOutEasing=function(R){var K=i.ease;if(this._prevEase){var N=this._prevEase,$=(i.browser.now()-N.start)/N.duration,we=N.easing($+.01)-N.easing($),ge=.27/Math.sqrt(we*we+1e-4)*.01,Ue=Math.sqrt(.27*.27-ge*ge);K=i.bezier(ge,Ue,.25,1)}return this._prevEase={start:i.browser.now(),duration:R,easing:K},K},Gt.prototype.reset=function(){this._active=!1};var jr=function(R,K){this._clickZoom=R,this._tapZoom=K};jr.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},jr.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},jr.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},jr.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var _i=function(){this.reset()};_i.prototype.reset=function(){this._active=!1},_i.prototype.dblclick=function(R,K){return R.preventDefault(),{cameraAnimation:function(N){N.easeTo({duration:300,zoom:N.getZoom()+(R.shiftKey?-1:1),around:N.unproject(K)},{originalEvent:R})}}},_i.prototype.enable=function(){this._enabled=!0},_i.prototype.disable=function(){this._enabled=!1,this.reset()},_i.prototype.isEnabled=function(){return this._enabled},_i.prototype.isActive=function(){return this._active};var Mn=function(){this._tap=new Ci({numTouches:1,numTaps:1}),this.reset()};Mn.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Mn.prototype.touchstart=function(R,K,N){this._swipePoint||(this._tapTime&&R.timeStamp-this._tapTime>_r&&this.reset(),this._tapTime?N.length>0&&(this._swipePoint=K[0],this._swipeTouch=N[0].identifier):this._tap.touchstart(R,K,N))},Mn.prototype.touchmove=function(R,K,N){if(!this._tapTime)this._tap.touchmove(R,K,N);else if(this._swipePoint){if(N[0].identifier!==this._swipeTouch)return;var $=K[0],we=$.y-this._swipePoint.y;return this._swipePoint=$,R.preventDefault(),this._active=!0,{zoomDelta:we/128}}},Mn.prototype.touchend=function(R,K,N){if(this._tapTime)this._swipePoint&&N.length===0&&this.reset();else{var $=this._tap.touchend(R,K,N);$&&(this._tapTime=R.timeStamp)}},Mn.prototype.touchcancel=function(){this.reset()},Mn.prototype.enable=function(){this._enabled=!0},Mn.prototype.disable=function(){this._enabled=!1,this.reset()},Mn.prototype.isEnabled=function(){return this._enabled},Mn.prototype.isActive=function(){return this._active};var Ta=function(R,K,N){this._el=R,this._mousePan=K,this._touchPan=N};Ta.prototype.enable=function(R){this._inertiaOptions=R||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ta.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ta.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ta.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var fa=function(R,K,N){this._pitchWithRotate=R.pitchWithRotate,this._mouseRotate=K,this._mousePitch=N};fa.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},fa.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},fa.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},fa.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var ha=function(R,K,N,$){this._el=R,this._touchZoom=K,this._touchRotate=N,this._tapDragZoom=$,this._rotationDisabled=!1,this._enabled=!0};ha.prototype.enable=function(R){this._touchZoom.enable(R),this._rotationDisabled||this._touchRotate.enable(R),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},ha.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},ha.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},ha.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},ha.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},ha.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Io=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},Vs=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R}(i.Event);function Hs(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var is=function(R,K){this._map=R,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new nf(R),this._bearingSnap=K.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(K),i.bindAll(["handleEvent","handleWindowEvent"],this);var N=this._el;this._listeners=[[N,"touchstart",{passive:!0}],[N,"touchmove",{passive:!1}],[N,"touchend",void 0],[N,"touchcancel",void 0],[N,"mousedown",void 0],[N,"mousemove",void 0],[N,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[N,"mouseover",void 0],[N,"mouseout",void 0],[N,"dblclick",void 0],[N,"click",void 0],[N,"keydown",{capture:!1}],[N,"keyup",void 0],[N,"wheel",{passive:!1}],[N,"contextmenu",void 0],[i.window,"blur",void 0]];for(var $=0,we=this._listeners;$<we.length;$+=1){var ge=we[$],Ue=ge[0],dt=ge[1],Rt=ge[2];o.addEventListener(Ue,dt,Ue===i.window.document?this.handleWindowEvent:this.handleEvent,Rt)}};is.prototype.destroy=function(){for(var R=0,K=this._listeners;R<K.length;R+=1){var N=K[R],$=N[0],we=N[1],ge=N[2];o.removeEventListener($,we,$===i.window.document?this.handleWindowEvent:this.handleEvent,ge)}},is.prototype._addDefaultHandlers=function(R){var K=this._map,N=K.getCanvasContainer();this._add("mapEvent",new Ye(K,R));var $=K.boxZoom=new Nt(K,R);this._add("boxZoom",$);var we=new Ji,ge=new _i;K.doubleClickZoom=new jr(ge,we),this._add("tapZoom",we),this._add("clickZoom",ge);var Ue=new Mn;this._add("tapDragZoom",Ue);var dt=K.touchPitch=new Rl;this._add("touchPitch",dt);var Rt=new ao(R),ur=new yo(R);K.dragRotate=new fa(R,Rt,ur),this._add("mouseRotate",Rt,["mousePitch"]),this._add("mousePitch",ur,["mouseRotate"]);var gr=new bi(R),cr=new Ko(R);K.dragPan=new Ta(N,gr,cr),this._add("mousePan",gr),this._add("touchPan",cr,["touchZoom","touchRotate"]);var It=new qu,Qt=new Al;K.touchZoomRotate=new ha(N,Qt,It,Ue),this._add("touchRotate",It,["touchPan","touchZoom"]),this._add("touchZoom",Qt,["touchPan","touchRotate"]);var ar=K.scrollZoom=new Gt(K,this);this._add("scrollZoom",ar,["mousePan"]);var mr=K.keyboard=new xu;this._add("keyboard",mr),this._add("blockableMapEvent",new it(K));for(var Pr=0,Dr=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];Pr<Dr.length;Pr+=1){var Xr=Dr[Pr];R.interactive&&R[Xr]&&K[Xr].enable(R[Xr])}},is.prototype._add=function(R,K,N){this._handlers.push({handlerName:R,handler:K,allowed:N}),this._handlersById[R]=K},is.prototype.stop=function(R){if(!this._updatingCamera){for(var K=0,N=this._handlers;K<N.length;K+=1){var $=N[K],we=$.handler;we.reset()}this._inertia.clear(),this._fireEvents({},{},R),this._changes=[]}},is.prototype.isActive=function(){for(var R=0,K=this._handlers;R<K.length;R+=1){var N=K[R],$=N.handler;if($.isActive())return!0}return!1},is.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},is.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},is.prototype.isMoving=function(){return!!Io(this._eventsInProgress)||this.isZooming()},is.prototype._blockedByActive=function(R,K,N){for(var $ in R)if($!==N&&(!K||K.indexOf($)<0))return!0;return!1},is.prototype.handleWindowEvent=function(R){this.handleEvent(R,R.type+"Window")},is.prototype._getMapTouches=function(R){for(var K=[],N=0,$=R;N<$.length;N+=1){var we=$[N],ge=we.target;this._el.contains(ge)&&K.push(we)}return K},is.prototype.handleEvent=function(R,K){if(R.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;for(var N=R.type==="renderFrame"?void 0:R,$={needsRenderFrame:!1},we={},ge={},Ue=R.touches?this._getMapTouches(R.touches):void 0,dt=Ue?o.touchPos(this._el,Ue):o.mousePos(this._el,R),Rt=0,ur=this._handlers;Rt<ur.length;Rt+=1){var gr=ur[Rt],cr=gr.handlerName,It=gr.handler,Qt=gr.allowed;if(It.isEnabled()){var ar=void 0;this._blockedByActive(ge,Qt,cr)?It.reset():It[K||R.type]&&(ar=It[K||R.type](R,dt,Ue),this.mergeHandlerResult($,we,ar,cr,N),ar&&ar.needsRenderFrame&&this._triggerRenderFrame()),(ar||It.isActive())&&(ge[cr]=It)}}var mr={};for(var Pr in this._previousActiveHandlers)ge[Pr]||(mr[Pr]=N);this._previousActiveHandlers=ge,(Object.keys(mr).length||Hs($))&&(this._changes.push([$,we,mr]),this._triggerRenderFrame()),(Object.keys(ge).length||Hs($))&&this._map._stop(!0),this._updatingCamera=!1;var Dr=$.cameraAnimation;Dr&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Dr(this._map))},is.prototype.mergeHandlerResult=function(R,K,N,$,we){if(N){i.extend(R,N);var ge={handlerName:$,originalEvent:N.originalEvent||we};N.zoomDelta!==void 0&&(K.zoom=ge),N.panDelta!==void 0&&(K.drag=ge),N.pitchDelta!==void 0&&(K.pitch=ge),N.bearingDelta!==void 0&&(K.rotate=ge)}},is.prototype._applyChanges=function(){for(var R={},K={},N={},$=0,we=this._changes;$<we.length;$+=1){var ge=we[$],Ue=ge[0],dt=ge[1],Rt=ge[2];Ue.panDelta&&(R.panDelta=(R.panDelta||new i.Point(0,0))._add(Ue.panDelta)),Ue.zoomDelta&&(R.zoomDelta=(R.zoomDelta||0)+Ue.zoomDelta),Ue.bearingDelta&&(R.bearingDelta=(R.bearingDelta||0)+Ue.bearingDelta),Ue.pitchDelta&&(R.pitchDelta=(R.pitchDelta||0)+Ue.pitchDelta),Ue.around!==void 0&&(R.around=Ue.around),Ue.pinchAround!==void 0&&(R.pinchAround=Ue.pinchAround),Ue.noInertia&&(R.noInertia=Ue.noInertia),i.extend(K,dt),i.extend(N,Rt)}this._updateMapTransform(R,K,N),this._changes=[]},is.prototype._updateMapTransform=function(R,K,N){var $=this._map,we=$.transform;if(!Hs(R))return this._fireEvents(K,N,!0);var ge=R.panDelta,Ue=R.zoomDelta,dt=R.bearingDelta,Rt=R.pitchDelta,ur=R.around,gr=R.pinchAround;gr!==void 0&&(ur=gr),$._stop(!0),ur=ur||$.transform.centerPoint;var cr=we.pointLocation(ge?ur.sub(ge):ur);dt&&(we.bearing+=dt),Rt&&(we.pitch+=Rt),Ue&&(we.zoom+=Ue),we.setLocationAtPoint(cr,ur),this._map._update(),R.noInertia||this._inertia.record(R),this._fireEvents(K,N,!0)},is.prototype._fireEvents=function(R,K,N){var $=this,we=Io(this._eventsInProgress),ge=Io(R),Ue={};for(var dt in R){var Rt=R[dt],ur=Rt.originalEvent;this._eventsInProgress[dt]||(Ue[dt+"start"]=ur),this._eventsInProgress[dt]=R[dt]}!we&&ge&&this._fireEvent("movestart",ge.originalEvent);for(var gr in Ue)this._fireEvent(gr,Ue[gr]);ge&&this._fireEvent("move",ge.originalEvent);for(var cr in R){var It=R[cr],Qt=It.originalEvent;this._fireEvent(cr,Qt)}var ar={},mr;for(var Pr in this._eventsInProgress){var Dr=this._eventsInProgress[Pr],Xr=Dr.handlerName,Gr=Dr.originalEvent;this._handlersById[Xr].isActive()||(delete this._eventsInProgress[Pr],mr=K[Xr]||Gr,ar[Pr+"end"]=mr)}for(var Fr in ar)this._fireEvent(Fr,ar[Fr]);var Kr=Io(this._eventsInProgress);if(N&&(we||ge)&&!Kr){this._updatingCamera=!0;var Cr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),yi=function(qi){return qi!==0&&-$._bearingSnap<qi&&qi<$._bearingSnap};Cr?(yi(Cr.bearing||this._map.getBearing())&&(Cr.bearing=0),this._map.easeTo(Cr,{originalEvent:mr})):(this._map.fire(new i.Event("moveend",{originalEvent:mr})),yi(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},is.prototype._fireEvent=function(R,K){this._map.fire(new i.Event(R,K?{originalEvent:K}:{}))},is.prototype._requestFrame=function(){var R=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(K){delete R._frameId,R.handleEvent(new Vs("renderFrame",{timeStamp:K})),R._applyChanges()})},is.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var su=function(Y){function R(K,N){Y.call(this),this._moving=!1,this._zooming=!1,this.transform=K,this._bearingSnap=N.bearingSnap,i.bindAll(["_renderFrameCallback"],this)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.getCenter=function(){return new i.LngLat(this.transform.center.lng,this.transform.center.lat)},R.prototype.setCenter=function(N,$){return this.jumpTo({center:N},$)},R.prototype.panBy=function(N,$,we){return N=i.Point.convert(N).mult(-1),this.panTo(this.transform.center,i.extend({offset:N},$),we)},R.prototype.panTo=function(N,$,we){return this.easeTo(i.extend({center:N},$),we)},R.prototype.getZoom=function(){return this.transform.zoom},R.prototype.setZoom=function(N,$){return this.jumpTo({zoom:N},$),this},R.prototype.zoomTo=function(N,$,we){return this.easeTo(i.extend({zoom:N},$),we)},R.prototype.zoomIn=function(N,$){return this.zoomTo(this.getZoom()+1,N,$),this},R.prototype.zoomOut=function(N,$){return this.zoomTo(this.getZoom()-1,N,$),this},R.prototype.getBearing=function(){return this.transform.bearing},R.prototype.setBearing=function(N,$){return this.jumpTo({bearing:N},$),this},R.prototype.getPadding=function(){return this.transform.padding},R.prototype.setPadding=function(N,$){return this.jumpTo({padding:N},$),this},R.prototype.rotateTo=function(N,$,we){return this.easeTo(i.extend({bearing:N},$),we)},R.prototype.resetNorth=function(N,$){return this.rotateTo(0,i.extend({duration:1e3},N),$),this},R.prototype.resetNorthPitch=function(N,$){return this.easeTo(i.extend({bearing:0,pitch:0,duration:1e3},N),$),this},R.prototype.snapToNorth=function(N,$){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(N,$):this},R.prototype.getPitch=function(){return this.transform.pitch},R.prototype.setPitch=function(N,$){return this.jumpTo({pitch:N},$),this},R.prototype.cameraForBounds=function(N,$){N=i.LngLatBounds.convert(N);var we=$&&$.bearing||0;return this._cameraForBoxAndBearing(N.getNorthWest(),N.getSouthEast(),we,$)},R.prototype._cameraForBoxAndBearing=function(N,$,we,ge){var Ue={top:0,bottom:0,right:0,left:0};if(ge=i.extend({padding:Ue,offset:[0,0],maxZoom:this.transform.maxZoom},ge),typeof ge.padding=="number"){var dt=ge.padding;ge.padding={top:dt,bottom:dt,right:dt,left:dt}}ge.padding=i.extend(Ue,ge.padding);var Rt=this.transform,ur=Rt.padding,gr=Rt.project(i.LngLat.convert(N)),cr=Rt.project(i.LngLat.convert($)),It=gr.rotate(-we*Math.PI/180),Qt=cr.rotate(-we*Math.PI/180),ar=new i.Point(Math.max(It.x,Qt.x),Math.max(It.y,Qt.y)),mr=new i.Point(Math.min(It.x,Qt.x),Math.min(It.y,Qt.y)),Pr=ar.sub(mr),Dr=(Rt.width-(ur.left+ur.right+ge.padding.left+ge.padding.right))/Pr.x,Xr=(Rt.height-(ur.top+ur.bottom+ge.padding.top+ge.padding.bottom))/Pr.y;if(Xr<0||Dr<0){i.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var Gr=Math.min(Rt.scaleZoom(Rt.scale*Math.min(Dr,Xr)),ge.maxZoom),Fr=typeof ge.offset.x=="number"?new i.Point(ge.offset.x,ge.offset.y):i.Point.convert(ge.offset),Kr=(ge.padding.left-ge.padding.right)/2,Cr=(ge.padding.top-ge.padding.bottom)/2,yi=new i.Point(Kr,Cr),qi=yi.rotate(we*Math.PI/180),vn=Fr.add(qi),Qa=vn.mult(Rt.scale/Rt.zoomScale(Gr)),ra=Rt.unproject(gr.add(cr).div(2).sub(Qa));return{center:ra,zoom:Gr,bearing:we}},R.prototype.fitBounds=function(N,$,we){return this._fitInternal(this.cameraForBounds(N,$),$,we)},R.prototype.fitScreenCoordinates=function(N,$,we,ge,Ue){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(i.Point.convert(N)),this.transform.pointLocation(i.Point.convert($)),we,ge),ge,Ue)},R.prototype._fitInternal=function(N,$,we){return N?($=i.extend(N,$),delete $.padding,$.linear?this.easeTo($,we):this.flyTo($,we)):this},R.prototype.jumpTo=function(N,$){this.stop();var we=this.transform,ge=!1,Ue=!1,dt=!1;return"zoom"in N&&we.zoom!==+N.zoom&&(ge=!0,we.zoom=+N.zoom),N.center!==void 0&&(we.center=i.LngLat.convert(N.center)),"bearing"in N&&we.bearing!==+N.bearing&&(Ue=!0,we.bearing=+N.bearing),"pitch"in N&&we.pitch!==+N.pitch&&(dt=!0,we.pitch=+N.pitch),N.padding!=null&&!we.isPaddingEqual(N.padding)&&(we.padding=N.padding),this.fire(new i.Event("movestart",$)).fire(new i.Event("move",$)),ge&&this.fire(new i.Event("zoomstart",$)).fire(new i.Event("zoom",$)).fire(new i.Event("zoomend",$)),Ue&&this.fire(new i.Event("rotatestart",$)).fire(new i.Event("rotate",$)).fire(new i.Event("rotateend",$)),dt&&this.fire(new i.Event("pitchstart",$)).fire(new i.Event("pitch",$)).fire(new i.Event("pitchend",$)),this.fire(new i.Event("moveend",$))},R.prototype.easeTo=function(N,$){var we=this;this._stop(!1,N.easeId),N=i.extend({offset:[0,0],duration:500,easing:i.ease},N),(N.animate===!1||!N.essential&&i.browser.prefersReducedMotion)&&(N.duration=0);var ge=this.transform,Ue=this.getZoom(),dt=this.getBearing(),Rt=this.getPitch(),ur=this.getPadding(),gr="zoom"in N?+N.zoom:Ue,cr="bearing"in N?this._normalizeBearing(N.bearing,dt):dt,It="pitch"in N?+N.pitch:Rt,Qt="padding"in N?N.padding:ge.padding,ar=i.Point.convert(N.offset),mr=ge.centerPoint.add(ar),Pr=ge.pointLocation(mr),Dr=i.LngLat.convert(N.center||Pr);this._normalizeCenter(Dr);var Xr=ge.project(Pr),Gr=ge.project(Dr).sub(Xr),Fr=ge.zoomScale(gr-Ue),Kr,Cr;N.around&&(Kr=i.LngLat.convert(N.around),Cr=ge.locationPoint(Kr));var yi={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||gr!==Ue,this._rotating=this._rotating||dt!==cr,this._pitching=this._pitching||It!==Rt,this._padding=!ge.isPaddingEqual(Qt),this._easeId=N.easeId,this._prepareEase($,N.noMoveStart,yi),this._ease(function(qi){if(we._zooming&&(ge.zoom=i.number(Ue,gr,qi)),we._rotating&&(ge.bearing=i.number(dt,cr,qi)),we._pitching&&(ge.pitch=i.number(Rt,It,qi)),we._padding&&(ge.interpolatePadding(ur,Qt,qi),mr=ge.centerPoint.add(ar)),Kr)ge.setLocationAtPoint(Kr,Cr);else{var vn=ge.zoomScale(ge.zoom-Ue),Qa=gr>Ue?Math.min(2,Fr):Math.max(.5,Fr),ra=Math.pow(Qa,1-qi),mo=ge.unproject(Xr.add(Gr.mult(qi*ra)).mult(vn));ge.setLocationAtPoint(ge.renderWorldCopies?mo.wrap():mo,mr)}we._fireMoveEvents($)},function(qi){we._afterEase($,qi)},N),this},R.prototype._prepareEase=function(N,$,we){we===void 0&&(we={}),this._moving=!0,!$&&!we.moving&&this.fire(new i.Event("movestart",N)),this._zooming&&!we.zooming&&this.fire(new i.Event("zoomstart",N)),this._rotating&&!we.rotating&&this.fire(new i.Event("rotatestart",N)),this._pitching&&!we.pitching&&this.fire(new i.Event("pitchstart",N))},R.prototype._fireMoveEvents=function(N){this.fire(new i.Event("move",N)),this._zooming&&this.fire(new i.Event("zoom",N)),this._rotating&&this.fire(new i.Event("rotate",N)),this._pitching&&this.fire(new i.Event("pitch",N))},R.prototype._afterEase=function(N,$){if(!(this._easeId&&$&&this._easeId===$)){delete this._easeId;var we=this._zooming,ge=this._rotating,Ue=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,we&&this.fire(new i.Event("zoomend",N)),ge&&this.fire(new i.Event("rotateend",N)),Ue&&this.fire(new i.Event("pitchend",N)),this.fire(new i.Event("moveend",N))}},R.prototype.flyTo=function(N,$){var we=this;if(!N.essential&&i.browser.prefersReducedMotion){var ge=i.pick(N,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ge,$)}this.stop(),N=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},N);var Ue=this.transform,dt=this.getZoom(),Rt=this.getBearing(),ur=this.getPitch(),gr=this.getPadding(),cr="zoom"in N?i.clamp(+N.zoom,Ue.minZoom,Ue.maxZoom):dt,It="bearing"in N?this._normalizeBearing(N.bearing,Rt):Rt,Qt="pitch"in N?+N.pitch:ur,ar="padding"in N?N.padding:Ue.padding,mr=Ue.zoomScale(cr-dt),Pr=i.Point.convert(N.offset),Dr=Ue.centerPoint.add(Pr),Xr=Ue.pointLocation(Dr),Gr=i.LngLat.convert(N.center||Xr);this._normalizeCenter(Gr);var Fr=Ue.project(Xr),Kr=Ue.project(Gr).sub(Fr),Cr=N.curve,yi=Math.max(Ue.width,Ue.height),qi=yi/mr,vn=Kr.mag();if("minZoom"in N){var Qa=i.clamp(Math.min(N.minZoom,dt,cr),Ue.minZoom,Ue.maxZoom),ra=yi/Ue.zoomScale(Qa-dt);Cr=Math.sqrt(ra/vn*2)}var mo=Cr*Cr;function sl(du){var Nu=(qi*qi-yi*yi+(du?-1:1)*mo*mo*vn*vn)/(2*(du?qi:yi)*mo*vn);return Math.log(Math.sqrt(Nu*Nu+1)-Nu)}function Os(du){return(Math.exp(du)-Math.exp(-du))/2}function eo(du){return(Math.exp(du)+Math.exp(-du))/2}function fs(du){return Os(du)/eo(du)}var es=sl(0),$s=function(du){return eo(es)/eo(es+Cr*du)},Ml=function(du){return yi*((eo(es)*fs(es+Cr*du)-Os(es))/mo)/vn},Mu=(sl(1)-es)/Cr;if(Math.abs(vn)<1e-6||!isFinite(Mu)){if(Math.abs(yi-qi)<1e-6)return this.easeTo(N,$);var Au=qi<yi?-1:1;Mu=Math.abs(Math.log(qi/yi))/Cr,Ml=function(){return 0},$s=function(du){return Math.exp(Au*Cr*du)}}if("duration"in N)N.duration=+N.duration;else{var $u="screenSpeed"in N?+N.screenSpeed/Cr:+N.speed;N.duration=1e3*Mu/$u}return N.maxDuration&&N.duration>N.maxDuration&&(N.duration=0),this._zooming=!0,this._rotating=Rt!==It,this._pitching=Qt!==ur,this._padding=!Ue.isPaddingEqual(ar),this._prepareEase($,!1),this._ease(function(du){var Nu=du*Mu,yf=1/$s(Nu);Ue.zoom=du===1?cr:dt+Ue.scaleZoom(yf),we._rotating&&(Ue.bearing=i.number(Rt,It,du)),we._pitching&&(Ue.pitch=i.number(ur,Qt,du)),we._padding&&(Ue.interpolatePadding(gr,ar,du),Dr=Ue.centerPoint.add(Pr));var Kf=du===1?Gr:Ue.unproject(Fr.add(Kr.mult(Ml(Nu))).mult(yf));Ue.setLocationAtPoint(Ue.renderWorldCopies?Kf.wrap():Kf,Dr),we._fireMoveEvents($)},function(){return we._afterEase($)},N),this},R.prototype.isEasing=function(){return!!this._easeFrameId},R.prototype.stop=function(){return this._stop()},R.prototype._stop=function(N,$){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var we=this._onEaseEnd;delete this._onEaseEnd,we.call(this,$)}if(!N){var ge=this.handlers;ge&&ge.stop(!1)}return this},R.prototype._ease=function(N,$,we){we.animate===!1||we.duration===0?(N(1),$()):(this._easeStart=i.browser.now(),this._easeOptions=we,this._onEaseFrame=N,this._onEaseEnd=$,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},R.prototype._renderFrameCallback=function(){var N=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(N)),N<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},R.prototype._normalizeBearing=function(N,$){N=i.wrap(N,-180,180);var we=Math.abs(N-$);return Math.abs(N-360-$)<we&&(N-=360),Math.abs(N+360-$)<we&&(N+=360),N},R.prototype._normalizeCenter=function(N){var $=this.transform;if(!(!$.renderWorldCopies||$.lngRange)){var we=N.lng-$.center.lng;N.lng+=we>180?-360:we<-180?360:0}},R}(i.Evented),Ps=function(R){R===void 0&&(R={}),this.options=R,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Ps.prototype.getDefaultPosition=function(){return"bottom-right"},Ps.prototype.onAdd=function(R){var K=this.options&&this.options.compact;return this._map=R,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"),K&&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),K===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ps.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},Ps.prototype._setElementTitle=function(R,K){var N=this._map._getUIString("AttributionControl."+K);R.title=N,R.setAttribute("aria-label",N)},Ps.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"))},Ps.prototype._updateEditLink=function(){var R=this._editLink;R||(R=this._editLink=this._container.querySelector(".mapbox-improve-map"));var K=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(R){var N=K.reduce(function($,we,ge){return we.value&&($+=we.key+"="+we.value+(ge<K.length-1?"&":"")),$},"?");R.href=i.config.FEEDBACK_URL+"/"+N+(this._map._hash?this._map._hash.getHashString(!0):""),R.rel="noopener nofollow",this._setElementTitle(R,"MapFeedback")}},Ps.prototype._updateData=function(R){R&&(R.sourceDataType==="metadata"||R.sourceDataType==="visibility"||R.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},Ps.prototype._updateAttributions=function(){if(this._map.style){var R=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?R=R.concat(this.options.customAttribution.map(function(dt){return typeof dt!="string"?"":dt})):typeof this.options.customAttribution=="string"&&R.push(this.options.customAttribution)),this._map.style.stylesheet){var K=this._map.style.stylesheet;this.styleOwner=K.owner,this.styleId=K.id}var N=this._map.style.sourceCaches;for(var $ in N){var we=N[$];if(we.used){var ge=we.getSource();ge.attribution&&R.indexOf(ge.attribution)<0&&R.push(ge.attribution)}}R.sort(function(dt,Rt){return dt.length-Rt.length}),R=R.filter(function(dt,Rt){for(var ur=Rt+1;ur<R.length;ur++)if(R[ur].indexOf(dt)>=0)return!1;return!0});var Ue=R.join(" | ");Ue!==this._attribHTML&&(this._attribHTML=Ue,R.length?(this._innerContainer.innerHTML=Ue,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ps.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var qs=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};qs.prototype.onAdd=function(R){this._map=R,this._container=o.create("div","mapboxgl-ctrl");var K=o.create("a","mapboxgl-ctrl-logo");return K.target="_blank",K.rel="noopener nofollow",K.href="https://www.mapbox.com/",K.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),K.setAttribute("rel","noopener nofollow"),this._container.appendChild(K),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},qs.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},qs.prototype.getDefaultPosition=function(){return"bottom-left"},qs.prototype._updateLogo=function(R){(!R||R.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},qs.prototype._logoRequired=function(){if(this._map.style){var R=this._map.style.sourceCaches;for(var K in R){var N=R[K].getSource();if(N.mapbox_logo)return!0}return!1}},qs.prototype._updateCompact=function(){var R=this._container.children;if(R.length){var K=R[0];this._map.getCanvasContainer().offsetWidth<250?K.classList.add("mapboxgl-compact"):K.classList.remove("mapboxgl-compact")}};var Do=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Do.prototype.add=function(R){var K=++this._id,N=this._queue;return N.push({callback:R,id:K,cancelled:!1}),K},Do.prototype.remove=function(R){for(var K=this._currentlyRunning,N=K?this._queue.concat(K):this._queue,$=0,we=N;$<we.length;$+=1){var ge=we[$];if(ge.id===R){ge.cancelled=!0;return}}},Do.prototype.run=function(R){R===void 0&&(R=0);var K=this._currentlyRunning=this._queue;this._queue=[];for(var N=0,$=K;N<$.length;N+=1){var we=$[N];if(!we.cancelled&&(we.callback(R),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Do.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var kn={"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"},La=i.window.HTMLImageElement,Es=i.window.HTMLElement,Ws=i.window.ImageBitmap,Qo=-2,bl=22,nl=0,ru=60,hs={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:Qo,maxZoom:bl,minPitch:nl,maxPitch:ru,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},Ho=function(Y){function R(N){var $=this;if(N=i.extend({},hs,N),N.minZoom!=null&&N.maxZoom!=null&&N.minZoom>N.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(N.minPitch!=null&&N.maxPitch!=null&&N.minPitch>N.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(N.minPitch!=null&&N.minPitch<nl)throw new Error("minPitch must be greater than or equal to "+nl);if(N.maxPitch!=null&&N.maxPitch>ru)throw new Error("maxPitch must be less than or equal to "+ru);var we=new Jl(N.minZoom,N.maxZoom,N.minPitch,N.maxPitch,N.renderWorldCopies);if(Y.call(this,we,N),this._interactive=N.interactive,this._maxTileCacheSize=N.maxTileCacheSize,this._failIfMajorPerformanceCaveat=N.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=N.preserveDrawingBuffer,this._antialias=N.antialias,this._trackResize=N.trackResize,this._bearingSnap=N.bearingSnap,this._refreshExpiredTiles=N.refreshExpiredTiles,this._fadeDuration=N.fadeDuration,this._crossSourceCollisions=N.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=N.collectResourceTiming,this._renderTaskQueue=new Do,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},kn,N.locale),this._clickTolerance=N.clickTolerance,this._requestManager=new i.RequestManager(N.transformRequest,N.accessToken),typeof N.container=="string"){if(this._container=i.window.document.getElementById(N.container),!this._container)throw new Error("Container '"+N.container+"' not found.")}else if(N.container instanceof Es)this._container=N.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(N.maxBounds&&this.setMaxBounds(N.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 $._update(!1)}),this.on("moveend",function(){return $._update(!1)}),this.on("zoom",function(){return $._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 is(this,N);var ge=typeof N.hash=="string"&&N.hash||void 0;this._hash=N.hash&&new tf(ge).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:N.center,zoom:N.zoom,bearing:N.bearing,pitch:N.pitch}),N.bounds&&(this.resize(),this.fitBounds(N.bounds,i.extend({},N.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=N.localIdeographFontFamily,N.style&&this.setStyle(N.style,{localIdeographFontFamily:N.localIdeographFontFamily}),N.attributionControl&&this.addControl(new Ps({customAttribution:N.customAttribution})),this.addControl(new qs,N.logoPosition),this.on("style.load",function(){$.transform.unmodified&&$.jumpTo($.style.stylesheet)}),this.on("data",function(Ue){$._update(Ue.dataType==="style"),$.fire(new i.Event(Ue.dataType+"data",Ue))}),this.on("dataloading",function(Ue){$.fire(new i.Event(Ue.dataType+"dataloading",Ue))})}Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R;var K={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return R.prototype._getMapId=function(){return this._mapId},R.prototype.addControl=function($,we){if(we===void 0&&($.getDefaultPosition?we=$.getDefaultPosition():we="top-right"),!$||!$.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 ge=$.onAdd(this);this._controls.push($);var Ue=this._controlPositions[we];return we.indexOf("bottom")!==-1?Ue.insertBefore(ge,Ue.firstChild):Ue.appendChild(ge),this},R.prototype.removeControl=function($){if(!$||!$.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 we=this._controls.indexOf($);return we>-1&&this._controls.splice(we,1),$.onRemove(this),this},R.prototype.hasControl=function($){return this._controls.indexOf($)>-1},R.prototype.resize=function($){var we=this._containerDimensions(),ge=we[0],Ue=we[1];this._resizeCanvas(ge,Ue),this.transform.resize(ge,Ue),this.painter.resize(ge,Ue);var dt=!this._moving;return dt&&(this.stop(),this.fire(new i.Event("movestart",$)).fire(new i.Event("move",$))),this.fire(new i.Event("resize",$)),dt&&this.fire(new i.Event("moveend",$)),this},R.prototype.getBounds=function(){return this.transform.getBounds()},R.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},R.prototype.setMaxBounds=function($){return this.transform.setMaxBounds(i.LngLatBounds.convert($)),this._update()},R.prototype.setMinZoom=function($){if($=$==null?Qo:$,$>=Qo&&$<=this.transform.maxZoom)return this.transform.minZoom=$,this._update(),this.getZoom()<$&&this.setZoom($),this;throw new Error("minZoom must be between "+Qo+" and the current maxZoom, inclusive")},R.prototype.getMinZoom=function(){return this.transform.minZoom},R.prototype.setMaxZoom=function($){if($=$==null?bl:$,$>=this.transform.minZoom)return this.transform.maxZoom=$,this._update(),this.getZoom()>$&&this.setZoom($),this;throw new Error("maxZoom must be greater than the current minZoom")},R.prototype.getMaxZoom=function(){return this.transform.maxZoom},R.prototype.setMinPitch=function($){if($=$==null?nl:$,$<nl)throw new Error("minPitch must be greater than or equal to "+nl);if($>=nl&&$<=this.transform.maxPitch)return this.transform.minPitch=$,this._update(),this.getPitch()<$&&this.setPitch($),this;throw new Error("minPitch must be between "+nl+" and the current maxPitch, inclusive")},R.prototype.getMinPitch=function(){return this.transform.minPitch},R.prototype.setMaxPitch=function($){if($=$==null?ru:$,$>ru)throw new Error("maxPitch must be less than or equal to "+ru);if($>=this.transform.minPitch)return this.transform.maxPitch=$,this._update(),this.getPitch()>$&&this.setPitch($),this;throw new Error("maxPitch must be greater than the current minPitch")},R.prototype.getMaxPitch=function(){return this.transform.maxPitch},R.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},R.prototype.setRenderWorldCopies=function($){return this.transform.renderWorldCopies=$,this._update()},R.prototype.project=function($){return this.transform.locationPoint(i.LngLat.convert($))},R.prototype.unproject=function($){return this.transform.pointLocation(i.Point.convert($))},R.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},R.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},R.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},R.prototype._createDelegatedListener=function($,we,ge){var Ue=this,dt;if($==="mouseenter"||$==="mouseover"){var Rt=!1,ur=function(mr){var Pr=Ue.getLayer(we)?Ue.queryRenderedFeatures(mr.point,{layers:[we]}):[];Pr.length?Rt||(Rt=!0,ge.call(Ue,new se($,Ue,mr.originalEvent,{features:Pr}))):Rt=!1},gr=function(){Rt=!1};return{layer:we,listener:ge,delegates:{mousemove:ur,mouseout:gr}}}else if($==="mouseleave"||$==="mouseout"){var cr=!1,It=function(mr){var Pr=Ue.getLayer(we)?Ue.queryRenderedFeatures(mr.point,{layers:[we]}):[];Pr.length?cr=!0:cr&&(cr=!1,ge.call(Ue,new se($,Ue,mr.originalEvent)))},Qt=function(mr){cr&&(cr=!1,ge.call(Ue,new se($,Ue,mr.originalEvent)))};return{layer:we,listener:ge,delegates:{mousemove:It,mouseout:Qt}}}else{var ar=function(mr){var Pr=Ue.getLayer(we)?Ue.queryRenderedFeatures(mr.point,{layers:[we]}):[];Pr.length&&(mr.features=Pr,ge.call(Ue,mr),delete mr.features)};return{layer:we,listener:ge,delegates:(dt={},dt[$]=ar,dt)}}},R.prototype.on=function($,we,ge){if(ge===void 0)return Y.prototype.on.call(this,$,we);var Ue=this._createDelegatedListener($,we,ge);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[$]=this._delegatedListeners[$]||[],this._delegatedListeners[$].push(Ue);for(var dt in Ue.delegates)this.on(dt,Ue.delegates[dt]);return this},R.prototype.once=function($,we,ge){if(ge===void 0)return Y.prototype.once.call(this,$,we);var Ue=this._createDelegatedListener($,we,ge);for(var dt in Ue.delegates)this.once(dt,Ue.delegates[dt]);return this},R.prototype.off=function($,we,ge){var Ue=this;if(ge===void 0)return Y.prototype.off.call(this,$,we);var dt=function(Rt){for(var ur=Rt[$],gr=0;gr<ur.length;gr++){var cr=ur[gr];if(cr.layer===we&&cr.listener===ge){for(var It in cr.delegates)Ue.off(It,cr.delegates[It]);return ur.splice(gr,1),Ue}}};return this._delegatedListeners&&this._delegatedListeners[$]&&dt(this._delegatedListeners),this},R.prototype.queryRenderedFeatures=function($,we){if(!this.style)return[];we===void 0&&$!==void 0&&!($ instanceof i.Point)&&!Array.isArray($)&&(we=$,$=void 0),we=we||{},$=$||[[0,0],[this.transform.width,this.transform.height]];var ge;if($ instanceof i.Point||typeof $[0]=="number")ge=[i.Point.convert($)];else{var Ue=i.Point.convert($[0]),dt=i.Point.convert($[1]);ge=[Ue,new i.Point(dt.x,Ue.y),dt,new i.Point(Ue.x,dt.y),Ue]}return this.style.queryRenderedFeatures(ge,we,this.transform)},R.prototype.querySourceFeatures=function($,we){return this.style.querySourceFeatures($,we)},R.prototype.setStyle=function($,we){return we=i.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},we),we.diff!==!1&&we.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&$?(this._diffStyle($,we),this):(this._localIdeographFontFamily=we.localIdeographFontFamily,this._updateStyle($,we))},R.prototype._getUIString=function($){var we=this._locale[$];if(we==null)throw new Error("Missing UI string '"+$+"'");return we},R.prototype._updateStyle=function($,we){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),$)this.style=new An(this,we||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof $=="string"?this.style.loadURL($):this.style.loadJSON($),this},R.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new An(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},R.prototype._diffStyle=function($,we){var ge=this;if(typeof $=="string"){var Ue=this._requestManager.normalizeStyleURL($),dt=this._requestManager.transformRequest(Ue,i.ResourceType.Style);i.getJSON(dt,function(Rt,ur){Rt?ge.fire(new i.ErrorEvent(Rt)):ur&&ge._updateDiff(ur,we)})}else typeof $=="object"&&this._updateDiff($,we)},R.prototype._updateDiff=function($,we){try{this.style.setState($)&&this._update(!0)}catch(ge){i.warnOnce("Unable to perform style diff: "+(ge.message||ge.error||ge)+".  Rebuilding the style from scratch."),this._updateStyle($,we)}},R.prototype.getStyle=function(){if(this.style)return this.style.serialize()},R.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():i.warnOnce("There is no style added to the map.")},R.prototype.addSource=function($,we){return this._lazyInitEmptyStyle(),this.style.addSource($,we),this._update(!0)},R.prototype.isSourceLoaded=function($){var we=this.style&&this.style.sourceCaches[$];if(we===void 0){this.fire(new i.ErrorEvent(new Error("There is no source with ID '"+$+"'")));return}return we.loaded()},R.prototype.areTilesLoaded=function(){var $=this.style&&this.style.sourceCaches;for(var we in $){var ge=$[we],Ue=ge._tiles;for(var dt in Ue){var Rt=Ue[dt];if(!(Rt.state==="loaded"||Rt.state==="errored"))return!1}}return!0},R.prototype.addSourceType=function($,we,ge){return this._lazyInitEmptyStyle(),this.style.addSourceType($,we,ge)},R.prototype.removeSource=function($){return this.style.removeSource($),this._update(!0)},R.prototype.getSource=function($){return this.style.getSource($)},R.prototype.addImage=function($,we,ge){ge===void 0&&(ge={});var Ue=ge.pixelRatio;Ue===void 0&&(Ue=1);var dt=ge.sdf;dt===void 0&&(dt=!1);var Rt=ge.stretchX,ur=ge.stretchY,gr=ge.content;this._lazyInitEmptyStyle();var cr=0;if(we instanceof La||Ws&&we instanceof Ws){var It=i.browser.getImageData(we),Qt=It.width,ar=It.height,mr=It.data;this.style.addImage($,{data:new i.RGBAImage({width:Qt,height:ar},mr),pixelRatio:Ue,stretchX:Rt,stretchY:ur,content:gr,sdf:dt,version:cr})}else{if(we.width===void 0||we.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 Pr=we.width,Dr=we.height,Xr=we.data,Gr=we;this.style.addImage($,{data:new i.RGBAImage({width:Pr,height:Dr},new Uint8Array(Xr)),pixelRatio:Ue,stretchX:Rt,stretchY:ur,content:gr,sdf:dt,version:cr,userImage:Gr}),Gr.onAdd&&Gr.onAdd(this,$)}},R.prototype.updateImage=function($,we){var ge=this.style.getImage($);if(!ge)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 Ue=we instanceof La||Ws&&we instanceof Ws?i.browser.getImageData(we):we,dt=Ue.width,Rt=Ue.height,ur=Ue.data;if(dt===void 0||Rt===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(dt!==ge.data.width||Rt!==ge.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 gr=!(we instanceof La||Ws&&we instanceof Ws);ge.data.replace(ur,gr),this.style.updateImage($,ge)},R.prototype.hasImage=function($){return $?!!this.style.getImage($):(this.fire(new i.ErrorEvent(new Error("Missing required image id"))),!1)},R.prototype.removeImage=function($){this.style.removeImage($)},R.prototype.loadImage=function($,we){i.getImage(this._requestManager.transformRequest($,i.ResourceType.Image),we)},R.prototype.listImages=function(){return this.style.listImages()},R.prototype.addLayer=function($,we){return this._lazyInitEmptyStyle(),this.style.addLayer($,we),this._update(!0)},R.prototype.moveLayer=function($,we){return this.style.moveLayer($,we),this._update(!0)},R.prototype.removeLayer=function($){return this.style.removeLayer($),this._update(!0)},R.prototype.getLayer=function($){return this.style.getLayer($)},R.prototype.setLayerZoomRange=function($,we,ge){return this.style.setLayerZoomRange($,we,ge),this._update(!0)},R.prototype.setFilter=function($,we,ge){return ge===void 0&&(ge={}),this.style.setFilter($,we,ge),this._update(!0)},R.prototype.getFilter=function($){return this.style.getFilter($)},R.prototype.setPaintProperty=function($,we,ge,Ue){return Ue===void 0&&(Ue={}),this.style.setPaintProperty($,we,ge,Ue),this._update(!0)},R.prototype.getPaintProperty=function($,we){return this.style.getPaintProperty($,we)},R.prototype.setLayoutProperty=function($,we,ge,Ue){return Ue===void 0&&(Ue={}),this.style.setLayoutProperty($,we,ge,Ue),this._update(!0)},R.prototype.getLayoutProperty=function($,we){return this.style.getLayoutProperty($,we)},R.prototype.setLight=function($,we){return we===void 0&&(we={}),this._lazyInitEmptyStyle(),this.style.setLight($,we),this._update(!0)},R.prototype.getLight=function(){return this.style.getLight()},R.prototype.setFeatureState=function($,we){return this.style.setFeatureState($,we),this._update()},R.prototype.removeFeatureState=function($,we){return this.style.removeFeatureState($,we),this._update()},R.prototype.getFeatureState=function($){return this.style.getFeatureState($)},R.prototype.getContainer=function(){return this._container},R.prototype.getCanvasContainer=function(){return this._canvasContainer},R.prototype.getCanvas=function(){return this._canvas},R.prototype._containerDimensions=function(){var $=0,we=0;return this._container&&($=this._container.clientWidth||400,we=this._container.clientHeight||300),[$,we]},R.prototype._detectMissingCSS=function(){var $=i.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");$!=="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/.")},R.prototype._setupContainer=function(){var $=this._container;$.classList.add("mapboxgl-map");var we=this._missingCSSCanary=o.create("div","mapboxgl-canary",$);we.style.visibility="hidden",this._detectMissingCSS();var ge=this._canvasContainer=o.create("div","mapboxgl-canvas-container",$);this._interactive&&ge.classList.add("mapboxgl-interactive"),this._canvas=o.create("canvas","mapboxgl-canvas",ge),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 Ue=this._containerDimensions();this._resizeCanvas(Ue[0],Ue[1]);var dt=this._controlContainer=o.create("div","mapboxgl-control-container",$),Rt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(ur){Rt[ur]=o.create("div","mapboxgl-ctrl-"+ur,dt)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},R.prototype._resizeCanvas=function($,we){var ge=i.browser.devicePixelRatio||1;this._canvas.width=ge*$,this._canvas.height=ge*we,this._canvas.style.width=$+"px",this._canvas.style.height=we+"px"},R.prototype._setupPainter=function(){var $=i.extend({},a.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),we=this._canvas.getContext("webgl",$)||this._canvas.getContext("experimental-webgl",$);if(!we){this.fire(new i.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new Hl(we,this.transform),i.webpSupported.testSupport(we)},R.prototype._contextLost=function($){$.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new i.Event("webglcontextlost",{originalEvent:$}))},R.prototype._contextRestored=function($){this._setupPainter(),this.resize(),this._update(),this.fire(new i.Event("webglcontextrestored",{originalEvent:$}))},R.prototype._onMapScroll=function($){if($.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},R.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},R.prototype._update=function($){return this.style?(this._styleDirty=this._styleDirty||$,this._sourcesDirty=!0,this.triggerRepaint(),this):this},R.prototype._requestRenderFrame=function($){return this._update(),this._renderTaskQueue.add($)},R.prototype._cancelRenderFrame=function($){this._renderTaskQueue.remove($)},R.prototype._render=function($){var we=this,ge,Ue=0,dt=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(ge=dt.createQueryEXT(),dt.beginQueryEXT(dt.TIME_ELAPSED_EXT,ge),Ue=i.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run($),!this._removed){var Rt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var ur=this.transform.zoom,gr=i.browser.now();this.style.zoomHistory.update(ur,gr);var cr=new i.EvaluationParameters(ur,{now:gr,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),It=cr.crossFadingFactor();(It!==1||It!==this._crossFadingFactor)&&(Rt=!0,this._crossFadingFactor=It),this.style.update(cr)}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()||Rt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var Qt=i.browser.now()-Ue;dt.endQueryEXT(dt.TIME_ELAPSED_EXT,ge),setTimeout(function(){var Pr=dt.getQueryObjectEXT(ge,dt.QUERY_RESULT_EXT)/1e6;dt.deleteQueryEXT(ge),we.fire(new i.Event("gpu-timing-frame",{cpuTime:Qt,gpuTime:Pr}))},50)}if(this.listens("gpu-timing-layer")){var ar=this.painter.collectGpuTimers();setTimeout(function(){var Pr=we.painter.queryGpuTimers(ar);we.fire(new i.Event("gpu-timing-layer",{layerTimes:Pr}))},50)}var mr=this._sourcesDirty||this._styleDirty||this._placementDirty;return mr||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new i.Event("idle")),this._loaded&&!this._fullyLoaded&&!mr&&(this._fullyLoaded=!0),this}},R.prototype.remove=function(){this._hash&&this._hash.remove();for(var $=0,we=this._controls;$<we.length;$+=1){var ge=we[$];ge.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 Ue=this.painter.context.gl.getExtension("WEBGL_lose_context");Ue&&Ue.loseContext&&Ue.loseContext(),ql(this._canvasContainer),ql(this._controlContainer),ql(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new i.Event("remove"))},R.prototype.triggerRepaint=function(){var $=this;this.style&&!this._frame&&(this._frame=i.browser.frame(function(we){$._frame=null,$._render(we)}))},R.prototype._onWindowOnline=function(){this._update()},R.prototype._onWindowResize=function($){this._trackResize&&this.resize({originalEvent:$})._update()},K.showTileBoundaries.get=function(){return!!this._showTileBoundaries},K.showTileBoundaries.set=function(N){this._showTileBoundaries!==N&&(this._showTileBoundaries=N,this._update())},K.showPadding.get=function(){return!!this._showPadding},K.showPadding.set=function(N){this._showPadding!==N&&(this._showPadding=N,this._update())},K.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},K.showCollisionBoxes.set=function(N){this._showCollisionBoxes!==N&&(this._showCollisionBoxes=N,N?this.style._generateCollisionBoxes():this._update())},K.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},K.showOverdrawInspector.set=function(N){this._showOverdrawInspector!==N&&(this._showOverdrawInspector=N,this._update())},K.repaint.get=function(){return!!this._repaint},K.repaint.set=function(N){this._repaint!==N&&(this._repaint=N,this.triggerRepaint())},K.vertices.get=function(){return!!this._vertices},K.vertices.set=function(N){this._vertices=N,this._update()},R.prototype._setCacheLimits=function($,we){i.setCacheLimits($,we)},K.version.get=function(){return i.version},Object.defineProperties(R.prototype,K),R}(su);function ql(Y){Y.parentNode&&Y.parentNode.removeChild(Y)}var yl={showCompass:!0,showZoom:!0,visualizePitch:!1},tl=function(R){var K=this;this.options=i.extend({},yl,R),this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(N){return N.preventDefault()}),this.options.showZoom&&(i.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(N){return K._map.zoomIn({},{originalEvent:N})}),o.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(N){return K._map.zoomOut({},{originalEvent:N})}),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(N){K.options.visualizePitch?K._map.resetNorthPitch({},{originalEvent:N}):K._map.resetNorth({},{originalEvent:N})}),this._compassIcon=o.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};tl.prototype._updateZoomButtons=function(){var R=this._map.getZoom(),K=R===this._map.getMaxZoom(),N=R===this._map.getMinZoom();this._zoomInButton.disabled=K,this._zoomOutButton.disabled=N,this._zoomInButton.setAttribute("aria-disabled",K.toString()),this._zoomOutButton.setAttribute("aria-disabled",N.toString())},tl.prototype._rotateCompassArrow=function(){var R=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=R},tl.prototype.onAdd=function(R){return this._map=R,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 js(this._map,this._compass,this.options.visualizePitch)),this._container},tl.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},tl.prototype._createButton=function(R,K){var N=o.create("button",R,this._container);return N.type="button",N.addEventListener("click",K),N},tl.prototype._setButtonTitle=function(R,K){var N=this._map._getUIString("NavigationControl."+K);R.title=N,R.setAttribute("aria-label",N)};var js=function(R,K,N){N===void 0&&(N=!1),this._clickTolerance=10,this.element=K,this.mouseRotate=new ao({clickTolerance:R.dragRotate._mouseRotate._clickTolerance}),this.map=R,N&&(this.mousePitch=new yo({clickTolerance:R.dragRotate._mousePitch._clickTolerance})),i.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),o.addEventListener(K,"mousedown",this.mousedown),o.addEventListener(K,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(K,"touchmove",this.touchmove),o.addEventListener(K,"touchend",this.touchend),o.addEventListener(K,"touchcancel",this.reset)};js.prototype.down=function(R,K){this.mouseRotate.mousedown(R,K),this.mousePitch&&this.mousePitch.mousedown(R,K),o.disableDrag()},js.prototype.move=function(R,K){var N=this.map,$=this.mouseRotate.mousemoveWindow(R,K);if($&&$.bearingDelta&&N.setBearing(N.getBearing()+$.bearingDelta),this.mousePitch){var we=this.mousePitch.mousemoveWindow(R,K);we&&we.pitchDelta&&N.setPitch(N.getPitch()+we.pitchDelta)}},js.prototype.off=function(){var R=this.element;o.removeEventListener(R,"mousedown",this.mousedown),o.removeEventListener(R,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(R,"touchmove",this.touchmove),o.removeEventListener(R,"touchend",this.touchend),o.removeEventListener(R,"touchcancel",this.reset),this.offTemp()},js.prototype.offTemp=function(){o.enableDrag(),o.removeEventListener(i.window,"mousemove",this.mousemove),o.removeEventListener(i.window,"mouseup",this.mouseup)},js.prototype.mousedown=function(R){this.down(i.extend({},R,{ctrlKey:!0,preventDefault:function(){return R.preventDefault()}}),o.mousePos(this.element,R)),o.addEventListener(i.window,"mousemove",this.mousemove),o.addEventListener(i.window,"mouseup",this.mouseup)},js.prototype.mousemove=function(R){this.move(R,o.mousePos(this.element,R))},js.prototype.mouseup=function(R){this.mouseRotate.mouseupWindow(R),this.mousePitch&&this.mousePitch.mouseupWindow(R),this.offTemp()},js.prototype.touchstart=function(R){R.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,R.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return R.preventDefault()}},this._startPos))},js.prototype.touchmove=function(R){R.targetTouches.length!==1?this.reset():(this._lastPos=o.touchPos(this.element,R.targetTouches)[0],this.move({preventDefault:function(){return R.preventDefault()}},this._lastPos))},js.prototype.touchend=function(R){R.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},js.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function zl(Y,R,K){if(Y=new i.LngLat(Y.lng,Y.lat),R){var N=new i.LngLat(Y.lng-360,Y.lat),$=new i.LngLat(Y.lng+360,Y.lat),we=K.locationPoint(Y).distSqr(R);K.locationPoint(N).distSqr(R)<we?Y=N:K.locationPoint($).distSqr(R)<we&&(Y=$)}for(;Math.abs(Y.lng-K.center.lng)>180;){var ge=K.locationPoint(Y);if(ge.x>=0&&ge.y>=0&&ge.x<=K.width&&ge.y<=K.height)break;Y.lng>K.center.lng?Y.lng-=360:Y.lng+=360}return Y}var lu={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 bu(Y,R,K){var N=Y.classList;for(var $ in lu)N.remove("mapboxgl-"+K+"-anchor-"+$);N.add("mapboxgl-"+K+"-anchor-"+R)}var al=function(Y){function R(K,N){if(Y.call(this),(K instanceof i.window.HTMLElement||N)&&(K=i.extend({element:K},N)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=K&&K.anchor||"center",this._color=K&&K.color||"#3FB1CE",this._scale=K&&K.scale||1,this._draggable=K&&K.draggable||!1,this._clickTolerance=K&&K.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=K&&K.rotation||0,this._rotationAlignment=K&&K.rotationAlignment||"auto",this._pitchAlignment=K&&K.pitchAlignment&&K.pitchAlignment!=="auto"?K.pitchAlignment:this._rotationAlignment,!K||!K.element){this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");var $=o.createNS("http://www.w3.org/2000/svg","svg"),we=41,ge=27;$.setAttributeNS(null,"display","block"),$.setAttributeNS(null,"height",we+"px"),$.setAttributeNS(null,"width",ge+"px"),$.setAttributeNS(null,"viewBox","0 0 "+ge+" "+we);var Ue=o.createNS("http://www.w3.org/2000/svg","g");Ue.setAttributeNS(null,"stroke","none"),Ue.setAttributeNS(null,"stroke-width","1"),Ue.setAttributeNS(null,"fill","none"),Ue.setAttributeNS(null,"fill-rule","evenodd");var dt=o.createNS("http://www.w3.org/2000/svg","g");dt.setAttributeNS(null,"fill-rule","nonzero");var Rt=o.createNS("http://www.w3.org/2000/svg","g");Rt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Rt.setAttributeNS(null,"fill","#000000");for(var ur=[{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"}],gr=0,cr=ur;gr<cr.length;gr+=1){var It=cr[gr],Qt=o.createNS("http://www.w3.org/2000/svg","ellipse");Qt.setAttributeNS(null,"opacity","0.04"),Qt.setAttributeNS(null,"cx","10.5"),Qt.setAttributeNS(null,"cy","5.80029008"),Qt.setAttributeNS(null,"rx",It.rx),Qt.setAttributeNS(null,"ry",It.ry),Rt.appendChild(Qt)}var ar=o.createNS("http://www.w3.org/2000/svg","g");ar.setAttributeNS(null,"fill",this._color);var mr=o.createNS("http://www.w3.org/2000/svg","path");mr.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"),ar.appendChild(mr);var Pr=o.createNS("http://www.w3.org/2000/svg","g");Pr.setAttributeNS(null,"opacity","0.25"),Pr.setAttributeNS(null,"fill","#000000");var Dr=o.createNS("http://www.w3.org/2000/svg","path");Dr.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"),Pr.appendChild(Dr);var Xr=o.createNS("http://www.w3.org/2000/svg","g");Xr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Xr.setAttributeNS(null,"fill","#FFFFFF");var Gr=o.createNS("http://www.w3.org/2000/svg","g");Gr.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Fr=o.createNS("http://www.w3.org/2000/svg","circle");Fr.setAttributeNS(null,"fill","#000000"),Fr.setAttributeNS(null,"opacity","0.25"),Fr.setAttributeNS(null,"cx","5.5"),Fr.setAttributeNS(null,"cy","5.5"),Fr.setAttributeNS(null,"r","5.4999962");var Kr=o.createNS("http://www.w3.org/2000/svg","circle");Kr.setAttributeNS(null,"fill","#FFFFFF"),Kr.setAttributeNS(null,"cx","5.5"),Kr.setAttributeNS(null,"cy","5.5"),Kr.setAttributeNS(null,"r","5.4999962"),Gr.appendChild(Fr),Gr.appendChild(Kr),dt.appendChild(Rt),dt.appendChild(ar),dt.appendChild(Pr),dt.appendChild(Xr),dt.appendChild(Gr),$.appendChild(dt),$.setAttributeNS(null,"height",we*this._scale+"px"),$.setAttributeNS(null,"width",ge*this._scale+"px"),this._element.appendChild($),this._offset=i.Point.convert(K&&K.offset||[0,-14])}else this._element=K.element,this._offset=i.Point.convert(K&&K.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(Cr){Cr.preventDefault()}),this._element.addEventListener("mousedown",function(Cr){Cr.preventDefault()}),bu(this._element,this._anchor,"marker"),this._popup=null}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.addTo=function(N){return this.remove(),this._map=N,N.getCanvasContainer().appendChild(this._element),N.on("move",this._update),N.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},R.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},R.prototype.getLngLat=function(){return this._lngLat},R.prototype.setLngLat=function(N){return this._lngLat=i.LngLat.convert(N),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},R.prototype.getElement=function(){return this._element},R.prototype.setPopup=function(N){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),N){if(!("offset"in N.options)){var $=38.1,we=13.5,ge=Math.sqrt(Math.pow(we,2)/2);N.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-$],"bottom-left":[ge,($-we+ge)*-1],"bottom-right":[-ge,($-we+ge)*-1],left:[we,($-we)*-1],right:[-we,($-we)*-1]}:this._offset}this._popup=N,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},R.prototype._onKeyPress=function(N){var $=N.code,we=N.charCode||N.keyCode;($==="Space"||$==="Enter"||we===32||we===13)&&this.togglePopup()},R.prototype._onMapClick=function(N){var $=N.originalEvent.target,we=this._element;this._popup&&($===we||we.contains($))&&this.togglePopup()},R.prototype.getPopup=function(){return this._popup},R.prototype.togglePopup=function(){var N=this._popup;if(N)N.isOpen()?N.remove():N.addTo(this._map);else return this;return this},R.prototype._update=function(N){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=zl(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var $="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?$="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&($="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var we="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?we="rotateX(0deg)":this._pitchAlignment==="map"&&(we="rotateX("+this._map.getPitch()+"deg)"),(!N||N.type==="moveend")&&(this._pos=this._pos.round()),o.setTransform(this._element,lu[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+we+" "+$)}},R.prototype.getOffset=function(){return this._offset},R.prototype.setOffset=function(N){return this._offset=i.Point.convert(N),this._update(),this},R.prototype._onMove=function(N){if(!this._isDragging){var $=this._clickTolerance||this._map._clickTolerance;this._isDragging=N.point.dist(this._pointerdownPos)>=$}this._isDragging&&(this._pos=N.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")))},R.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"},R.prototype._addDragHandler=function(N){this._element.contains(N.originalEvent.target)&&(N.preventDefault(),this._positionDelta=N.point.sub(this._pos).add(this._offset),this._pointerdownPos=N.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))},R.prototype.setDraggable=function(N){return this._draggable=!!N,this._map&&(N?(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},R.prototype.isDraggable=function(){return this._draggable},R.prototype.setRotation=function(N){return this._rotation=N||0,this._update(),this},R.prototype.getRotation=function(){return this._rotation},R.prototype.setRotationAlignment=function(N){return this._rotationAlignment=N||"auto",this._update(),this},R.prototype.getRotationAlignment=function(){return this._rotationAlignment},R.prototype.setPitchAlignment=function(N){return this._pitchAlignment=N&&N!=="auto"?N:this._rotationAlignment,this._update(),this},R.prototype.getPitchAlignment=function(){return this._pitchAlignment},R}(i.Evented),jl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},mu;function Tu(Y){mu!==void 0?Y(mu):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(R){mu=R.state!=="denied",Y(mu)}):(mu=!!i.window.navigator.geolocation,Y(mu))}var Ru=0,Rf=!1,Cc=function(Y){function R(K){Y.call(this),this.options=i.extend({},jl,K),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.onAdd=function(N){return this._map=N,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Tu(this._setupUI),this._container},R.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,Ru=0,Rf=!1},R.prototype._isOutOfMapMaxBounds=function(N){var $=this._map.getMaxBounds(),we=N.coords;return $&&(we.longitude<$.getWest()||we.longitude>$.getEast()||we.latitude<$.getSouth()||we.latitude>$.getNorth())},R.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}},R.prototype._onSuccess=function(N){if(this._map){if(this._isOutOfMapMaxBounds(N)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",N)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=N,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(N),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(N),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",N)),this._finish()}},R.prototype._updateCamera=function(N){var $=new i.LngLat(N.coords.longitude,N.coords.latitude),we=N.coords.accuracy,ge=this._map.getBearing(),Ue=i.extend({bearing:ge},this.options.fitBoundsOptions);this._map.fitBounds($.toBounds(we),Ue,{geolocateSource:!0})},R.prototype._updateMarker=function(N){if(N){var $=new i.LngLat(N.coords.longitude,N.coords.latitude);this._accuracyCircleMarker.setLngLat($).addTo(this._map),this._userLocationDotMarker.setLngLat($).addTo(this._map),this._accuracy=N.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},R.prototype._updateCircleRadius=function(){var N=this._map._container.clientHeight/2,$=this._map.unproject([0,N]),we=this._map.unproject([1,N]),ge=$.distanceTo(we),Ue=Math.ceil(2*this._accuracy/ge);this._circleElement.style.width=Ue+"px",this._circleElement.style.height=Ue+"px"},R.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},R.prototype._onError=function(N){if(this._map){if(this.options.trackUserLocation)if(N.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 $=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=$,this._geolocateButton.setAttribute("aria-label",$),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(N.code===3&&Rf)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",N)),this._finish()}},R.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},R.prototype._setupUI=function(N){var $=this;if(this._container.addEventListener("contextmenu",function(Ue){return Ue.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",N===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var we=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=we,this._geolocateButton.setAttribute("aria-label",we)}else{var ge=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ge,this._geolocateButton.setAttribute("aria-label",ge)}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 al(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new al({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(Ue){var dt=Ue.originalEvent&&Ue.originalEvent.type==="resize";!Ue.geolocateSource&&$._watchState==="ACTIVE_LOCK"&&!dt&&($._watchState="BACKGROUND",$._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),$._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),$.fire(new i.Event("trackuserlocationend")))})},R.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":Ru--,Rf=!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"),Ru++;var N;Ru>1?(N={maximumAge:6e5,timeout:0},Rf=!0):(N=this.options.positionOptions,Rf=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,N)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},R.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)},R}(i.Evented),rf={maxWidth:100,unit:"metric"},Lc=function(R){this.options=i.extend({},rf,R),i.bindAll(["_onMove","setUnit"],this)};Lc.prototype.getDefaultPosition=function(){return"bottom-left"},Lc.prototype._onMove=function(){wf(this._map,this._container,this.options)},Lc.prototype.onAdd=function(R){return this._map=R,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",R.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Lc.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Lc.prototype.setUnit=function(R){this.options.unit=R,wf(this._map,this._container,this.options)};function wf(Y,R,K){var N=K&&K.maxWidth||100,$=Y._container.clientHeight/2,we=Y.unproject([0,$]),ge=Y.unproject([N,$]),Ue=we.distanceTo(ge);if(K&&K.unit==="imperial"){var dt=3.2808*Ue;if(dt>5280){var Rt=dt/5280;pc(R,N,Rt,Y._getUIString("ScaleControl.Miles"))}else pc(R,N,dt,Y._getUIString("ScaleControl.Feet"))}else if(K&&K.unit==="nautical"){var ur=Ue/1852;pc(R,N,ur,Y._getUIString("ScaleControl.NauticalMiles"))}else Ue>=1e3?pc(R,N,Ue/1e3,Y._getUIString("ScaleControl.Kilometers")):pc(R,N,Ue,Y._getUIString("ScaleControl.Meters"))}function pc(Y,R,K,N){var $=qc(K),we=$/K;Y.style.width=R*we+"px",Y.innerHTML=$+"&nbsp;"+N}function vc(Y){var R=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*R)/R}function qc(Y){var R=Math.pow(10,(""+Math.floor(Y)).length-1),K=Y/R;return K=K>=10?10:K>=5?5:K>=3?3:K>=2?2:K>=1?1:vc(K),R*K}var If=function(R){this._fullscreen=!1,R&&R.container&&(R.container instanceof i.window.HTMLElement?this._container=R.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")};If.prototype.onAdd=function(R){return this._map=R,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},If.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},If.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},If.prototype._setupUI=function(){var R=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",R).setAttribute("aria-hidden",!0),R.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},If.prototype._updateTitle=function(){var R=this._getTitle();this._fullscreenButton.setAttribute("aria-label",R),this._fullscreenButton.title=R},If.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},If.prototype._isFullscreen=function(){return this._fullscreen},If.prototype._changeIcon=function(){var R=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;R===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},If.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 Tc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},zc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Vu=function(Y){function R(K){Y.call(this),this.options=i.extend(Object.create(Tc),K),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.addTo=function(N){return this._map&&this.remove(),this._map=N,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},R.prototype.isOpen=function(){return!!this._map},R.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},R.prototype.getLngLat=function(){return this._lngLat},R.prototype.setLngLat=function(N){return this._lngLat=i.LngLat.convert(N),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},R.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},R.prototype.getElement=function(){return this._container},R.prototype.setText=function(N){return this.setDOMContent(i.window.document.createTextNode(N))},R.prototype.setHTML=function(N){var $=i.window.document.createDocumentFragment(),we=i.window.document.createElement("body"),ge;for(we.innerHTML=N;ge=we.firstChild,!!ge;)$.appendChild(ge);return this.setDOMContent($)},R.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},R.prototype.setMaxWidth=function(N){return this.options.maxWidth=N,this._update(),this},R.prototype.setDOMContent=function(N){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(N),this._createCloseButton(),this._update(),this._focusFirstElement(),this},R.prototype.addClassName=function(N){this._container&&this._container.classList.add(N)},R.prototype.removeClassName=function(N){this._container&&this._container.classList.remove(N)},R.prototype.setOffset=function(N){return this.options.offset=N,this._update(),this},R.prototype.toggleClassName=function(N){if(this._container)return this._container.classList.toggle(N)},R.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))},R.prototype._onMouseUp=function(N){this._update(N.point)},R.prototype._onMouseMove=function(N){this._update(N.point)},R.prototype._onDrag=function(N){this._update(N.point)},R.prototype._update=function(N){var $=this,we=this._lngLat||this._trackPointer;if(!(!this._map||!we||!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(It){return $._container.classList.add(It)}),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=zl(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!N))){var ge=this._pos=this._trackPointer&&N?N:this._map.project(this._lngLat),Ue=this.options.anchor,dt=Bc(this.options.offset);if(!Ue){var Rt=this._container.offsetWidth,ur=this._container.offsetHeight,gr;ge.y+dt.bottom.y<ur?gr=["top"]:ge.y>this._map.transform.height-ur?gr=["bottom"]:gr=[],ge.x<Rt/2?gr.push("left"):ge.x>this._map.transform.width-Rt/2&&gr.push("right"),gr.length===0?Ue="bottom":Ue=gr.join("-")}var cr=ge.add(dt[Ue]).round();o.setTransform(this._container,lu[Ue]+" translate("+cr.x+"px,"+cr.y+"px)"),bu(this._container,Ue,"popup")}},R.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var N=this._container.querySelector(zc);N&&N.focus()}},R.prototype._onClose=function(){this.remove()},R}(i.Evented);function Bc(Y){if(Y)if(typeof Y=="number"){var R=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(R,R),"top-right":new i.Point(-R,R),bottom:new i.Point(0,-Y),"bottom-left":new i.Point(R,-R),"bottom-right":new i.Point(-R,-R),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var K=i.Point.convert(Y);return{center:K,top:K,"top-left":K,"top-right":K,bottom:K,"bottom-left":K,"bottom-right":K,left:K,right:K}}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 Bc(new i.Point(0,0))}var Ou={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:Ho,NavigationControl:tl,GeolocateControl:Cc,AttributionControl:Ps,ScaleControl:Lc,FullscreenControl:If,Popup:Vu,Marker:al,Style:An,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:Ur,clearPrewarmedResources:ti,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 vi.workerCount},set workerCount(Y){vi.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(R){i.clearTileCache(R)},workerUrl:""};return Ou}),r})});var EVe=Se((d_r,MVe)=>{"use strict";var tw=Zr(),IGt=Bf().sanitizeHTML,DGt=$K(),TVe=f1();function AVe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=TVe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var iy=AVe.prototype;iy.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=tq(t)};iy.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))};iy.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};iy.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};iy.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};iy.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)};iy.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,!!tq(e)){var r=RGt(e);t.addSource(this.idSource,r)}};iy.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(TVe.traceLayerPrefix)===0){e=n;break}}return e};iy.updateLayer=function(e){var t=this.subplot,r=SVe(e),n=this.lookupBelow(),i=this.findFollowingMapboxLayerId(n);this.removeLayer(),tq(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};iy.updateStyle=function(e){if(tq(e)){var t=SVe(e);this.subplot.setOptions(this.idLayer,"setLayoutProperty",t.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",t.paint)}};iy.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)};iy.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)};function tq(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 tw.isPlainObject(t)||typeof t=="string"&&t.length>0}function SVe(e){var t={},r={};switch(e.type){case"circle":tw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":tw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":tw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=DGt(n.textposition,n.iconsize);tw.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}),tw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":tw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function RGt(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=IGt(e.sourceattribution)),n}MVe.exports=function(t,r,n){var i=new AVe(t,r);return i.update(n),i}});var FVe=Se((p_r,RVe)=>{"use strict";var aJ=nJ(),oJ=Zr(),zVe=ix(),kVe=Ul(),FGt=hu(),qGt=gp(),rq=jc(),PVe=Sy(),BGt=PVe.drawMode,OGt=PVe.selectMode,NGt=nh().prepSelect,UGt=nh().clearOutline,VGt=nh().clearSelectionsCache,HGt=nh().selectOnClick,gx=f1(),GGt=EVe();function IVe(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=IVe.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=DVe(a.style,t);i.accessToken=a.accesstoken;var s=a.bounds,u=s?[[s.west,s.south],[s.east,s.north]]:null,l=i.map=new aJ.Map({container:i.div,style:o.style,center:sJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:u,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new aJ.AttributionControl({compact:!0}));l._canvas.style.left="0px",l._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var f=[];f.push(new Promise(function(c){l.once("load",c)})),f=f.concat(zVe.fetchTraceGeoData(e)),Promise.all(f).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=[],u=DVe(o.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(u)&&(i.styleObj=u,a.setStyle(u.style),i.traceHash={},s.push(new Promise(function(l){a.once("styledata",l)}))),s=s.concat(zVe.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 u=e[i][0].trace,l=u._module;typeof u.below=="string"?a=u.below:l.getBelow&&(a=l.getBelow(u,this)),a===""&&(s=!0),o["trace-"+u.uid]=a||""}for(i=0;i<n.length;i++){var f=n[i];typeof f.below=="string"?a=f.below:s?a="traces":a="",o["layout-"+i]=a}var c={},h,d;for(h in o)a=o[h],c[a]?c[a].push(h):c[a]=[h];for(a in c){var p=c[a];if(p.length>1)for(i=0;i<p.length;i++)h=p[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 CVe={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};Gh.updateData=function(e){var t=this.traceHash,r,n,i,a,o=e.slice().sort(function(c,h){return CVe[c[0].trace.type]-CVe[h[0].trace.type]});for(i=0;i<o.length;i++){var s=o[i];n=s[0].trace,r=t[n.uid];var u=!1;r&&(r.type===n.type?(r.update(s),u=!0):r.dispose()),!u&&n._module&&(t[n.uid]=n._module.plot(this,s))}var l=Object.keys(t);e:for(i=0;i<l.length;i++){var f=l[i];for(a=0;a<e.length;a++)if(n=e[a][0].trace,f===n.uid)continue e;r=t[f],r.dispose(),delete t[f]}};Gh.updateLayout=function(e){var t=this.map,r=e[this.id];!this.dragging&&!this.wheeling&&(t.setCenter(sJ(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(gx.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"},FGt.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 u=n._fullLayout;if(s.originalEvent||r.wheeling){var l=u[r.id];kVe.call("_storeDirectGUIEdit",n.layout,u._preGUI,r.getViewEdits(l));var f=r.getView();l._input.center=l.center=f.center,l._input.zoom=l.zoom=f.zoom,l._input.bearing=l.bearing=f.bearing,l._input.pitch=l.pitch=f.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(f))}s.originalEvent&&s.originalEvent.type==="mouseup"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),u._rehover&&u._rehover()}}),i.on("wheel",function(){r.wheeling=!0}),i.on("mousemove",function(s){var u=r.div.getBoundingClientRect(),l=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return u},r.xaxis.p2c=function(){return i.unproject(l).lng},r.yaxis.p2c=function(){return i.unproject(l).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&rq.hover(n,s,r.id)},rq.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function a(){rq.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];kVe.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var u=r.viewInitial;i.setCenter(sJ(u.center)),i.setZoom(u.zoom),i.setBearing(u.bearing),i.setPitch(u.pitch);var l=r.getView();s._input.center=s.center=l.center,s._input.zoom=s.zoom=l.zoom,s._input.bearing=s.bearing=l.bearing,s._input.pitch=s.pitch=l.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(l))}),r.clearOutline=function(){VGt(r.dragOptions),UGt(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(u){var l=n._fullLayout.clickmode;l.indexOf("select")>-1&&HGt(u.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),l.indexOf("event")>-1&&rq.click(n,u.originalEvent)}}};Gh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(u){var l=t.map.unproject(u);return[l.lng,l.lat]}var a=e.dragmode,o;o=function(u,l){if(l.isRect){var f=u.range={};f[t.id]=[i([l.xmin,l.ymin]),i([l.xmax,l.ymax])]}else{var c=u.lassoPoints={};c[t.id]=l.map(i)}};var s=t.dragOptions;t.dragOptions=oJ.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),OGt(a)||BGt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(u,l,f){NGt(u,l,f,t.dragOptions,a)},qGt.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(GGt(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}oJ.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 aJ.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 DVe(e,t){var r={};if(oJ.isPlainObject(e))r.id=e.id,r.style=e;else if(typeof e=="string")if(r.id=e,gx.styleValuesMapbox.indexOf(e)!==-1)r.style=LVe(e);else if(gx.stylesNonMapbox[e]){r.style=gx.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=gx.styleValueDflt,r.style=LVe(gx.styleValueDflt);return r.transition={duration:0,delay:0},r}function LVe(e){return gx.styleUrlPrefix+e+"-"+gx.styleUrlSuffix}function sJ(e){return[e.lon,e.lat]}RVe.exports=IVe});var OVe=Se((v_r,BVe)=>{"use strict";var lJ=Zr(),WGt=k_(),jGt=Jd(),qVe=zk();BVe.exports=function(t,r,n){WGt(t,r,n,{type:"mapbox",attributes:qVe,handleDefaults:ZGt,partition:"y",accessToken:r._mapboxAccessToken})};function ZGt(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,jGt(e,t,{name:"layers",handleItemDefaults:XGt}),t._input=e}function XGt(e,t){function r(u,l){return lJ.coerce(e,t,qVe.layers,u,l)}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",lJ.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"),lJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var iq=Se(Nv=>{"use strict";var NVe=nJ(),tm=Zr(),uJ=tm.strTranslate,YGt=tm.strScale,KGt=Dd().getSubplotCalcData,JGt=Zv(),$Gt=Nl(),UVe=yu(),QGt=Bf(),eWt=FVe(),_x="mapbox",Qm=Nv.constants=f1();Nv.name=_x;Nv.attr="subplot";Nv.idRoot=_x;Nv.idRegex=Nv.attrRegex=tm.counterRegex(_x);var tWt=["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(" ");Nv.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}};Nv.layoutAttributes=zk();Nv.supplyLayoutDefaults=OVe();var VVe=!0;Nv.plot=function(t){VVe&&(VVe=!1,tm.warn(tWt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[_x];if(NVe.version!==Qm.requiredVersion)throw new Error(Qm.wrongVersionErrorMsg);var a=rWt(t,i);NVe.accessToken=a;for(var o=0;o<i.length;o++){var s=i[o],u=KGt(n,_x,s),l=r[s],f=l._subplot;f||(f=new eWt(t,s),r[s]._subplot=f),f.viewInitial||(f.viewInitial={center:tm.extendFlat({},l.center),zoom:l.zoom,bearing:l.bearing,pitch:l.pitch}),f.plot(u,r,t._promises)}};Nv.clean=function(e,t,r,n){for(var i=n._subplots[_x]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._subplot&&n[o]._subplot.destroy()}};Nv.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[_x],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._subplot,u=s.toImage("png"),l=t._glimages.append("svg:image");l.attr({xmlns:JGt.svg,"xlink:href":u,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 f=$Gt.select(a._subplot.div),c=f.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!c){var h=t._glimages.append("g");h.attr("transform",uJ(n.l+n.w*o.x[0]+10,n.t+n.h*(1-o.y[0])-31)),h.append("path").attr("d",Qm.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),h.append("path").attr("d",Qm.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),h.append("path").attr("d",Qm.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),h.append("polygon").attr("points",Qm.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var d=f.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),p=t._glimages.append("g"),x=p.append("text");x.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=UVe.bBox(x.node()),y=n.w*(o.x[1]-o.x[0]);if(b.width>y/2){var k=d.split("|").join("<br>");x.text(k).attr("data-unformatted",k).call(QGt.convertToTspans,e),b=UVe.bBox(x.node())}x.attr("transform",uJ(-3,-b.height+8)),p.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>y&&(E=y/(b.width+6));var A=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];p.attr("transform",uJ(A[0],A[1])+YGt(E))}};function rWt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken==="")return"";for(var i=[],a=[],o=!1,s=!1,u=0;u<t.length;u++){var l=r[t[u]],f=l.accesstoken;HVe(l.style)&&(f?tm.pushUnique(i,f):(HVe(l._input.style)&&(tm.error("Uses Mapbox map style, but did not set an access token."),o=!0),s=!0)),f&&tm.pushUnique(a,f)}if(s){var c=o?Qm.noAccessTokenErrorMsg:Qm.missingStyleErrorMsg;throw tm.error(c),new Error(c)}return i.length?(i.length>1&&tm.warn(Qm.multipleTokensErrorMsg),i[0]):(a.length&&tm.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function HVe(e){return typeof e=="string"&&(Qm.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Nv.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[_x],n=0;n<r.length;n++){var i=t[r[n]]._subplot;i.updateFx(t)}}});var WVe=Se((g_r,GVe)=>{"use strict";var m_r=["*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(" ");GVe.exports={attributes:Y9(),supplyDefaults:rVe(),colorbar:ep(),formatLabels:JK(),calc:lF(),plot:yVe(),hoverPoints:eq().hoverPoints,eventData:xVe(),selectPoints:wVe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:iq(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var ZVe=Se((__r,jVe)=>{"use strict";jVe.exports=WVe()});var fJ=Se((x_r,XVe)=>{"use strict";var c1=JA(),iWt=Xf(),nWt=Du().hovertemplateAttrs,aWt=zf(),xx=vu().extendFlat;XVe.exports=xx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:xx({},c1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c1.text,hovertext:c1.hovertext,marker:{line:{color:xx({},c1.marker.line.color,{editType:"plot"}),width:xx({},c1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:xx({},c1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:xx({},c1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:xx({},c1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c1.hoverinfo,hovertemplate:nWt({},{keys:["properties"]}),showlegend:xx({},aWt.showlegend,{dflt:!1})},iWt("",{cLetter:"z",editTypeOverride:"calc"}))});var KVe=Se((b_r,YVe)=>{"use strict";var Rk=Zr(),oWt=ed(),sWt=fJ();YVe.exports=function(t,r,n,i){function a(f,c){return Rk.coerce(t,r,sWt,f,c)}var o=a("locations"),s=a("z"),u=a("geojson");if(!Rk.isArrayOrTypedArray(o)||!o.length||!Rk.isArrayOrTypedArray(s)||!s.length||!(typeof u=="string"&&u!==""||Rk.isPlainObject(u))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),oWt(t,r,i,a,{prefix:"",cLetter:"z"}),Rk.coerceSelectionMarkerOpacity(r,a)}});var cJ=Se((w_r,QVe)=>{"use strict";var lWt=_u(),h1=Zr(),uWt=fc(),fWt=yu(),cWt=tx().makeBlank,JVe=ix();function hWt(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:cWt()};if(!r)return a;var o=JVe.extractTraceFeature(e);if(!o)return a;var s=uWt.makeColorScaleFuncFromTrace(t),u=t.marker,l=u.line||{},f;h1.isArrayOrTypedArray(u.opacity)&&(f=function(k){var E=k.mo;return lWt(E)?+h1.constrain(E,0,1):0});var c;h1.isArrayOrTypedArray(l.color)&&(c=function(k){return k.mlc});var h;h1.isArrayOrTypedArray(l.width)&&(h=function(k){return k.mlw});for(var d=0;d<e.length;d++){var p=e[d],x=p.fOut;if(x){var b=x.properties;b.fc=s(p.z),f&&(b.mo=f(p)),c&&(b.mlc=c(p)),h&&(b.mlw=h(p)),p.ct=b.ct,p._polygons=JVe.feature2polygons(x)}}var y=f?{type:"identity",property:"mo"}:u.opacity;return h1.extendFlat(n.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":y}),h1.extendFlat(i.paint,{"line-color":c?{type:"identity",property:"mlc"}:l.color,"line-width":h?{type:"identity",property:"mlw"}:l.width,"line-opacity":y}),n.layout.visibility="visible",i.layout.visibility="visible",a.geojson={type:"FeatureCollection",features:o},$Ve(e),a}function $Ve(e){var t=e[0].trace,r=t._opts,n;if(t.selectedpoints){for(var i=fWt.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=h1.isArrayOrTypedArray(t.marker.opacity)?{type:"identity",property:"mo"}:t.marker.opacity;return h1.extendFlat(r.fill.paint,{"fill-opacity":n}),h1.extendFlat(r.line.paint,{"line-opacity":n}),r}QVe.exports={convert:hWt,convertOnSelect:$Ve}});var nHe=Se((T_r,iHe)=>{"use strict";var tHe=cJ().convert,dWt=cJ().convertOnSelect,eHe=f1().traceLayerPrefix;function rHe(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",eHe+t+"-fill"],["line",eHe+t+"-line"]],this.below=null}var TS=rHe.prototype;TS.update=function(e){this._update(tHe(e)),e[0].trace._glTrace=this};TS.updateOnSelect=function(e){this._update(dWt(e))};TS._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],u=e[o];t.setOptions(s,"setLayoutProperty",u.layout),u.layout.visibility==="visible"&&t.setOptions(s,"setPaintProperty",u.paint)}};TS._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],u=e[s];r.addLayer({type:s,id:o[1],source:i,layout:u.layout,paint:u.paint},t)}};TS._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};TS.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};iHe.exports=function(t,r){var n=r[0].trace,i=new rHe(t,n.uid),a=i.sourceId,o=tHe(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 oHe=Se((S_r,aHe)=>{"use strict";var A_r=["*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(" ");aHe.exports={attributes:fJ(),supplyDefaults:KVe(),colorbar:S_(),calc:LF(),plot:nHe(),hoverPoints:PF(),eventData:IF(),selectPoints:DF(),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:iq(),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}});var lHe=Se((M_r,sHe)=>{"use strict";sHe.exports=oHe()});var dJ=Se((E_r,fHe)=>{"use strict";var pWt=Xf(),vWt=Du().hovertemplateAttrs,uHe=zf(),nq=Y9(),hJ=vu().extendFlat;fHe.exports=hJ({lon:nq.lon,lat:nq.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:nq.text,hovertext:nq.hovertext,hoverinfo:hJ({},uHe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:vWt(),showlegend:hJ({},uHe.showlegend,{dflt:!1})},pWt("",{cLetter:"z",editTypeOverride:"calc"}))});var hHe=Se((k_r,cHe)=>{"use strict";var yWt=Zr(),mWt=ed(),gWt=dJ();cHe.exports=function(t,r,n,i){function a(l,f){return yWt.coerce(t,r,gWt,l,f)}var o=a("lon")||[],s=a("lat")||[],u=Math.min(o.length,s.length);if(!u){r.visible=!1;return}r._length=u,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),mWt(t,r,i,a,{prefix:"",cLetter:"z"})}});var vHe=Se((C_r,pHe)=>{"use strict";var pJ=_u(),_Wt=Zr().isArrayOrTypedArray,vJ=ju().BADNUM,xWt=Rp(),dHe=Zr()._;pHe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=_Wt(a)&&a.length,s=0;s<n;s++){var u=i[s]={},l=r.lon[s],f=r.lat[s];if(u.lonlat=pJ(l)&&pJ(f)?[+l,+f]:[vJ,vJ],o){var c=a[s];u.z=pJ(c)?c:vJ}}return xWt(t,r,{vals:o?a:[0,1],containerStr:"",cLetter:"z"}),n&&(i[0].t={labels:{lat:dHe(t,"lat:")+" ",lon:dHe(t,"lon:")+" "}}),i}});var xHe=Se((L_r,_He)=>{"use strict";var bWt=_u(),yJ=Zr(),yHe=Pl(),mHe=fc(),gHe=ju().BADNUM,wWt=tx().makeBlank;_He.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:wWt()};if(!n)return a;var o=[],s,u=r.z,l=r.radius,f=yJ.isArrayOrTypedArray(u)&&u.length,c=yJ.isArrayOrTypedArray(l);for(s=0;s<t.length;s++){var h=t[s],d=h.lonlat;if(d[0]!==gHe){var p={};if(f){var x=h.z;p.z=x!==gHe?x:0}c&&(p.r=bWt(l[s])&&l[s]>0?+l[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:p})}}var b=mHe.extractOpts(r),y=b.reversescale?mHe.flipScale(b.colorscale):b.colorscale,k=y[0][1],E=yHe.opacity(k)<1?k:yHe.addOpacity(k,0),A=["interpolate",["linear"],["heatmap-density"],0,E];for(s=1;s<y.length;s++)A.push(y[s][0],y[s][1]);var L=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return yJ.extendFlat(a.heatmap.paint,{"heatmap-weight":f?L:1/(b.max-b.min),"heatmap-color":A,"heatmap-radius":c?{type:"identity",property:"r"}:r.radius,"heatmap-opacity":r.opacity}),a.geojson={type:"FeatureCollection",features:o},a.heatmap.layout.visibility="visible",a}});var AHe=Se((z_r,THe)=>{"use strict";var bHe=xHe(),TWt=f1().traceLayerPrefix;function wHe(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",TWt+t+"-heatmap"]],this.below=null}var aq=wHe.prototype;aq.update=function(e){var t=this.subplot,r=this.layerList,n=bHe(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],u=o[1],l=n[s];t.setOptions(u,"setLayoutProperty",l.layout),l.layout.visibility==="visible"&&t.setOptions(u,"setPaintProperty",l.paint)}};aq._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],u=e[s];r.addLayer({type:s,id:o[1],source:i,layout:u.layout,paint:u.paint},t)}};aq._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};aq.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};THe.exports=function(t,r){var n=r[0].trace,i=new wHe(t,n.uid),a=i.sourceId,o=bHe(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=Se((P_r,SHe)=>{"use strict";var AWt=hu(),SWt=eq().hoverPoints,MWt=eq().getExtraText;SHe.exports=function(t,r,n){var i=SWt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,u=o[a.index];if(delete a.color,"z"in u){var l=a.subplot.mockAxis;a.z=u.z,a.zLabel=AWt.tickText(l,l.c2l(u.z),"hover").text}return a.extraText=MWt(s,u,o[0].t.labels),[a]}}});var kHe=Se((I_r,EHe)=>{"use strict";EHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var LHe=Se((R_r,CHe)=>{"use strict";var D_r=["*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(" ");CHe.exports={attributes:dJ(),supplyDefaults:hHe(),colorbar:S_(),formatLabels:JK(),calc:vHe(),plot:AHe(),hoverPoints:MHe(),eventData:kHe(),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:iq(),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}});var PHe=Se((F_r,zHe)=>{"use strict";zHe.exports=LHe()});var DHe=Se((q_r,IHe)=>{IHe.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}
{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}
{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}
{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}
{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}
{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}
{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}
{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}
{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}
{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}
{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}
{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 FHe=Se((B_r,RHe)=>{RHe.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 bx=Se((O_r,UHe)=>{"use strict";var EWt=X1(),kWt=DHe(),CWt=FHe(),LWt='\xA9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',qHe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",BHe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",oq="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",zWt="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",PWt="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",IWt="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",NHe={basic:oq,streets:oq,outdoors:oq,light:qHe,dark:BHe,satellite:CWt,"satellite-streets":kWt,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:LWt,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":qHe,"carto-darkmatter":BHe,"carto-voyager":oq,"carto-positron-nolabels":zWt,"carto-darkmatter-nolabels":PWt,"carto-voyager-nolabels":IWt},OHe=EWt(NHe);UHe.exports={styleValueDflt:"basic",stylesMap:NHe,styleValuesMap:OHe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",OHe.join(", "),"or use a tile service."].join(`
`),mapOnErrorMsg:"Map error."}});var Fk=Se((N_r,jHe)=>{"use strict";var VHe=Zr(),HHe=Pl().defaultLine,DWt=Ec().attributes,RWt=uc(),FWt=Zc().textposition,qWt=_c().overrideAll,BWt=_f().templatedArray,GHe=bx(),WHe=RWt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});WHe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var OWt=jHe.exports=qWt({_arrayAttrRegexps:[VHe.counterRegex("map",".layers",!0)],domain:DWt({name:"map"}),style:{valType:"any",values:GHe.styleValuesMap,dflt:GHe.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:BWt("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:HHe},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:HHe}},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:WHe,textposition:VHe.extendFlat({},FWt,{arrayOk:!1})}})},"plot","from-root");OWt.uirevision={valType:"any",editType:"none"}});var sq=Se((U_r,YHe)=>{"use strict";var NWt=Du().hovertemplateAttrs,UWt=Du().texttemplateAttrs,VWt=Ey(),qk=H2(),AS=Zc(),ZHe=Fk(),HWt=zf(),GWt=Xf(),rw=vu().extendFlat,WWt=_c().overrideAll,jWt=Fk(),XHe=qk.line,SS=qk.marker;YHe.exports=WWt({lon:qk.lon,lat:qk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:rw({},jWt.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:rw({},SS.opacity,{dflt:1})},mode:rw({},AS.mode,{dflt:"markers"}),text:rw({},AS.text,{}),texttemplate:UWt({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:rw({},AS.hovertext,{}),line:{color:XHe.color,width:XHe.width},connectgaps:AS.connectgaps,marker:rw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:SS.opacity,size:SS.size,sizeref:SS.sizeref,sizemin:SS.sizemin,sizemode:SS.sizemode},GWt("marker")),fill:qk.fill,fillcolor:VWt(),textfont:ZHe.layers.symbol.textfont,textposition:ZHe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:AS.selected.marker},unselected:{marker:AS.unselected.marker},hoverinfo:rw({},HWt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:NWt()},"calc","nested")});var mJ=Se((V_r,KHe)=>{"use strict";var ZWt=["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"];KHe.exports={isSupportedFont:function(e){return ZWt.indexOf(e)!==-1}}});var QHe=Se((H_r,$He)=>{"use strict";var Bk=Zr(),gJ=ec(),XWt=$v(),YWt=I0(),KWt=D0(),JWt=Py(),JHe=sq(),$Wt=mJ().isSupportedFont;$He.exports=function(t,r,n,i){function a(y,k){return Bk.coerce(t,r,JHe,y,k)}function o(y,k){return Bk.coerce2(t,r,JHe,y,k)}var s=QWt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("hovertext"),a("hovertemplate"),a("mode"),a("below"),gJ.hasMarkers(r)){XWt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var u=r.marker;u.symbol!=="circle"&&(Bk.isArrayOrTypedArray(u.size)&&(u.size=u.size[0]),Bk.isArrayOrTypedArray(u.color)&&(u.color=u.color[0]))}gJ.hasLines(r)&&(YWt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var l=o("cluster.maxzoom"),f=o("cluster.step"),c=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),p=l!==!1||f!==!1||c!==!1||h!==!1||d!==!1,x=a("cluster.enabled",p);if(x||gJ.hasText(r)){var b=i.font.family;KWt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:$Wt(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"&&JWt(t,r,n,a),Bk.coerceSelectionMarkerOpacity(r,a)};function QWt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var _J=Se((G_r,tGe)=>{"use strict";var eGe=hu();tGe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=eGe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=eGe.tickText(o,o.c2l(s[1]),!0).text,i}});var xJ=Se((W_r,iGe)=>{"use strict";var rGe=Zr();iGe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=rGe.isArrayOrTypedArray(r)?rGe.mean(r):r,s=.5+o/100,u=1.5+o/100,l=["",""],f=[0,0];switch(i){case"top":l[0]="top",f[1]=-u;break;case"bottom":l[0]="bottom",f[1]=u;break}switch(a){case"left":l[1]="right",f[0]=-s;break;case"right":l[1]="left",f[0]=s;break}var c;return l[0]&&l[1]?c=l.join("-"):l[0]?c=l[0]:l[1]?c=l[1]:c="center",{anchor:c,offset:f}}});var uGe=Se((j_r,lGe)=>{"use strict";var oGe=_u(),lp=Zr(),ejt=ju().BADNUM,uq=tx(),nGe=fc(),tjt=yu(),rjt=S3(),fq=ec(),ijt=mJ().isSupportedFont,njt=xJ(),ajt=rv().appendArrayPointValue,ojt=Bf().NEWLINES,sjt=Bf().BR_TAG_ALL;lGe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=fq.hasLines(n),s=fq.hasMarkers(n),u=fq.hasText(n),l=s&&n.marker.symbol==="circle",f=s&&n.marker.symbol!=="circle",c=n.cluster&&n.cluster.enabled,h=lq("fill"),d=lq("line"),p=lq("circle"),x=lq("symbol"),b={fill:h,line:d,circle:p,symbol:x};if(!i)return b;var y;if((a||o)&&(y=uq.calcTraceToLineCoords(r)),a&&(h.geojson=uq.makePolygon(y),h.layout.visibility="visible",lp.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=uq.makeLine(y),d.layout.visibility="visible",lp.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),l){var k=ljt(r);p.geojson=k.geojson,p.layout.visibility="visible",c&&(p.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":wJ(n.cluster.color,n.cluster.step),"circle-radius":wJ(n.cluster.size,n.cluster.step),"circle-opacity":wJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":aGe(n),"text-size":12}}),lp.extendFlat(p.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(l&&c&&(p.filter=["!",["has","point_count"]]),(f||u)&&(x.geojson=ujt(r,t),lp.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),f&&(lp.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&lp.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,lp.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),u)){var E=(n.marker||{}).size,A=njt(n.textposition,E);lp.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":A.anchor,"text-offset":A.offset,"text-font":aGe(n)}),lp.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function lq(e){return{type:e,geojson:uq.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function ljt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=lp.isArrayOrTypedArray(r.color),a=lp.isArrayOrTypedArray(r.size),o=lp.isArrayOrTypedArray(r.opacity),s;function u(E){return t.opacity*E}function l(E){return E/2}var f;i&&(nGe.hasColorscale(t,"marker")?f=nGe.makeColorScaleFuncFromTrace(r):f=lp.identity);var c;a&&(c=rjt(t));var h;o&&(h=function(E){var A=oGe(E)?+lp.constrain(E,0,1):0;return u(A)});var d=[];for(s=0;s<e.length;s++){var p=e[s],x=p.lonlat;if(!sGe(x)){var b={};f&&(b.mcc=p.mcc=f(p.mc)),c&&(b.mrc=p.mrc=c(p.ms)),h&&(b.mo=h(p.mo)),n&&(b.selected=p.selected||0),d.push({type:"Feature",id:s+1,geometry:{type:"Point",coordinates:x},properties:b})}}var y;if(n)for(y=tjt.makeSelectedPointStyleFns(t),s=0;s<d.length;s++){var k=d[s].properties;y.selectedOpacityFn&&(k.mo=u(y.selectedOpacityFn(k))),y.selectedColorFn&&(k.mcc=y.selectedColorFn(k)),y.selectedSizeFn&&(k.mrc=y.selectedSizeFn(k))}return{geojson:{type:"FeatureCollection",features:d},mcc:i||y&&y.selectedColorFn?{type:"identity",property:"mcc"}:r.color,mrc:a||y&&y.selectedSizeFn?{type:"identity",property:"mrc"}:l(r.size),mo:o||y&&y.selectedOpacityFn?{type:"identity",property:"mo"}:u(r.opacity)}}function ujt(e,t){for(var r=t._fullLayout,n=e[0].trace,i=n.marker||{},a=i.symbol,o=i.angle,s=a!=="circle"?bJ(a):cq,u=o!=="auto"?bJ(o,!0):cq,l=fq.hasText(n)?bJ(n.text):cq,f=[],c=0;c<e.length;c++){var h=e[c];if(!sGe(h.lonlat)){var d=n.texttemplate,p;if(d){var x=Array.isArray(d)?d[c]||"":d,b=n._module.formatLabels(h,n,r),y={};ajt(y,n,h.i);var k=n._meta||{};p=lp.texttemplateString(x,b,r._d3locale,y,h,k)}else p=l(c);p&&(p=p.replace(ojt,"").replace(sjt,`
`)),f.push({type:"Feature",geometry:{type:"Point",coordinates:h.lonlat},properties:{symbol:s(c),angle:u(c),text:p}})}}return{type:"FeatureCollection",features:f}}function bJ(e,t){return lp.isArrayOrTypedArray(e)?t?function(r){return oGe(e[r])?+e[r]:0}:function(r){return e[r]}:e?function(){return e}:cq}function cq(){return""}function sGe(e){return e[0]===ejt}function wJ(e,t){var r;if(lp.isArrayOrTypedArray(e)&&lp.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 aGe(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"),ijt(s)||(s=r);var u=s.split(", ");return u}});var dGe=Se((Z_r,hGe)=>{"use strict";var fjt=Zr(),fGe=uGe(),MS=bx().traceLayerPrefix,ny={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function cGe(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:MS+t+"-fill",line:MS+t+"-line",circle:MS+t+"-circle",symbol:MS+t+"-symbol",cluster:MS+t+"-cluster",clusterCount:MS+t+"-cluster-count"},this.below=null}var Ok=cGe.prototype;Ok.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&fjt.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)};Ok.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Ok.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)};Ok.update=function(t){var r=t[0].trace,n=this.subplot,i=n.map,a=fGe(n.gd,t),o=n.belowLookup["trace-"+this.uid],s=!!(r.cluster&&r.cluster.enabled),u=!!this.clusterEnabled,l=this;function f(E){E||l.addSource("circle",a.circle,r.cluster);for(var A=ny.cluster,L=0;L<A.length;L++){var _=A[L],C=a[_];l.addLayer(_,C,o)}}function c(E){for(var A=ny.cluster,L=A.length-1;L>=0;L--){var _=A[L];i.removeLayer(l.layerIds[_])}E||i.removeSource(l.sourceIds.circle)}function h(E){for(var A=ny.nonCluster,L=0;L<A.length;L++){var _=A[L],C=a[_];E||l.addSource(_,C),l.addLayer(_,C,o)}}function d(E){for(var A=ny.nonCluster,L=A.length-1;L>=0;L--){var _=A[L];i.removeLayer(l.layerIds[_]),E||i.removeSource(l.sourceIds[_])}}function p(E){u?c(E):d(E)}function x(E){s?f(E):h(E)}function b(){for(var E=s?ny.cluster:ny.nonCluster,A=0;A<E.length;A++){var L=E[A],_=a[L];_&&(n.setOptions(l.layerIds[L],"setLayoutProperty",_.layout),_.layout.visibility==="visible"&&(L!=="cluster"&&l.setSourceData(L,_),n.setOptions(l.layerIds[L],"setPaintProperty",_.paint)))}}var y=this.isHidden,k=r.visible!==!0;k?y||p():y?k||x():u!==s?(p(),x()):(this.below!==o&&(p(!0),x(!0)),b()),this.clusterEnabled=s,this.isHidden=k,this.below=o,t[0].trace._glTrace=this};Ok.dispose=function(){for(var t=this.subplot.map,r=this.clusterEnabled?ny.cluster:ny.nonCluster,n=r.length-1;n>=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};hGe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new cGe(t,n.uid,i,a),s=fGe(t.gd,r),u=o.below=t.belowLookup["trace-"+n.uid],l,f,c;if(i)for(o.addSource("circle",s.circle,n.cluster),l=0;l<ny.cluster.length;l++)f=ny.cluster[l],c=s[f],o.addLayer(f,c,u);else for(l=0;l<ny.nonCluster.length;l++)f=ny.nonCluster[l],c=s[f],o.addSource(f,c,n.cluster),o.addLayer(f,c,u);return r[0].trace._glTrace=o,o}});var hq=Se((X_r,vGe)=>{"use strict";var cjt=jc(),TJ=Zr(),hjt=oT(),djt=TJ.fillText,pjt=ju().BADNUM,vjt=bx().traceLayerPrefix;function yjt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,u=[],l=vjt+i.uid+"-circle",f=i.cluster&&i.cluster.enabled;if(f){var c=s.map.queryRenderedFeatures(null,{layers:[l]});u=c.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,p=t-d;function x(M){var v=M.lonlat;if(v[0]===pjt||f&&u.indexOf(M.i+1)===-1)return 1/0;var z=TJ.modHalf(v[0],360),T=v[1],F=s.project([z,T]),q=F.x-a.c2p([p,T]),U=F.y-o.c2p([z,r]),H=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(q*q+U*U)-H,1-3/H)}if(cjt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],y=b.lonlat,k=[TJ.modHalf(y[0],360)+d,y[1]],E=a.c2p(k),A=o.c2p(k),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=A-L,e.y1=A+L;var _={};_[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,_);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=hjt(i,b),e.extraText=pGe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function pGe(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,u=t.lonlat,l=[];function f(c){return c+"\xB0"}return a||o&&s?l.push("("+f(u[1])+", "+f(u[0])+")"):o?l.push(r.lon+f(u[0])):s&&l.push(r.lat+f(u[1])),(a||i.indexOf("text")!==-1)&&djt(t,e,l),l.join("<br>")}vGe.exports={hoverPoints:yjt,getExtraText:pGe}});var mGe=Se((Y_r,yGe)=>{"use strict";yGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var _Ge=Se((K_r,gGe)=>{"use strict";var mjt=Zr(),gjt=ec(),_jt=ju().BADNUM;gGe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u;if(!gjt.hasMarkers(s))return[];if(r===!1)for(u=0;u<n.length;u++)n[u].selected=0;else for(u=0;u<n.length;u++){var l=n[u],f=l.lonlat;if(f[0]!==_jt){var c=[mjt.modHalf(f[0],360),f[1]],h=[i.c2p(c),a.c2p(c)];r.contains(h,null,u,t)?(o.push({pointNumber:u,lon:f[0],lat:f[1]}),l.selected=1):l.selected=0}}return o}});var bGe=Se((AJ,SJ)=>{(function(e,t){typeof AJ=="object"&&typeof SJ!="undefined"?SJ.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(AJ,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);",u={};return t.shared(u),t.index(e,u),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],function(i){"use strict";function a(I,S,D,Z){return new(D||(D=Promise))(function(ie,pe){function xe(wt){try{at(Z.next(wt))}catch(Ht){pe(Ht)}}function He(wt){try{at(Z.throw(wt))}catch(Ht){pe(Ht)}}function at(wt){var Ht;wt.done?ie(wt.value):(Ht=wt.value,Ht instanceof D?Ht:new D(function(rr){rr(Ht)})).then(xe,He)}at((Z=Z.apply(I,S||[])).next())})}function o(I){return I&&I.__esModule&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I}typeof SuppressedError=="function"&&SuppressedError;var s=u;function u(I,S){this.x=I,this.y=S}u.prototype={clone:function(){return new u(this.x,this.y)},add:function(I){return this.clone()._add(I)},sub:function(I){return this.clone()._sub(I)},multByPoint:function(I){return this.clone()._multByPoint(I)},divByPoint:function(I){return this.clone()._divByPoint(I)},mult:function(I){return this.clone()._mult(I)},div:function(I){return this.clone()._div(I)},rotate:function(I){return this.clone()._rotate(I)},rotateAround:function(I,S){return this.clone()._rotateAround(I,S)},matMult:function(I){return this.clone()._matMult(I)},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(I){return this.x===I.x&&this.y===I.y},dist:function(I){return Math.sqrt(this.distSqr(I))},distSqr:function(I){var S=I.x-this.x,D=I.y-this.y;return S*S+D*D},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(I){return Math.atan2(this.y-I.y,this.x-I.x)},angleWith:function(I){return this.angleWithSep(I.x,I.y)},angleWithSep:function(I,S){return Math.atan2(this.x*S-this.y*I,this.x*I+this.y*S)},_matMult:function(I){var S=I[2]*this.x+I[3]*this.y;return this.x=I[0]*this.x+I[1]*this.y,this.y=S,this},_add:function(I){return this.x+=I.x,this.y+=I.y,this},_sub:function(I){return this.x-=I.x,this.y-=I.y,this},_mult:function(I){return this.x*=I,this.y*=I,this},_div:function(I){return this.x/=I,this.y/=I,this},_multByPoint:function(I){return this.x*=I.x,this.y*=I.y,this},_divByPoint:function(I){return this.x/=I.x,this.y/=I.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var I=this.y;return this.y=this.x,this.x=-I,this},_rotate:function(I){var S=Math.cos(I),D=Math.sin(I),Z=D*this.x+S*this.y;return this.x=S*this.x-D*this.y,this.y=Z,this},_rotateAround:function(I,S){var D=Math.cos(I),Z=Math.sin(I),ie=S.y+Z*(this.x-S.x)+D*(this.y-S.y);return this.x=S.x+D*(this.x-S.x)-Z*(this.y-S.y),this.y=ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},u.convert=function(I){return I instanceof u?I:Array.isArray(I)?new u(I[0],I[1]):I};var l=o(s),f=c;function c(I,S,D,Z){this.cx=3*I,this.bx=3*(D-I)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(Z-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=I,this.p1y=S,this.p2x=D,this.p2y=Z}c.prototype={sampleCurveX:function(I){return((this.ax*I+this.bx)*I+this.cx)*I},sampleCurveY:function(I){return((this.ay*I+this.by)*I+this.cy)*I},sampleCurveDerivativeX:function(I){return(3*this.ax*I+2*this.bx)*I+this.cx},solveCurveX:function(I,S){if(S===void 0&&(S=1e-6),I<0)return 0;if(I>1)return 1;for(var D=I,Z=0;Z<8;Z++){var ie=this.sampleCurveX(D)-I;if(Math.abs(ie)<S)return D;var pe=this.sampleCurveDerivativeX(D);if(Math.abs(pe)<1e-6)break;D-=ie/pe}var xe=0,He=1;for(D=I,Z=0;Z<20&&(ie=this.sampleCurveX(D),!(Math.abs(ie-I)<S));Z++)I>ie?xe=D:He=D,D=.5*(He-xe)+xe;return D},solve:function(I,S){return this.sampleCurveY(this.solveCurveX(I,S))}};var h=o(f);let d,p;function x(){return d==null&&(d=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),d}function b(){if(p==null&&(p=!1,x())){let S=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(S){for(let Z=0;Z<5*5;Z++){let ie=4*Z;S.fillStyle=`rgb(${ie},${ie+1},${ie+2})`,S.fillRect(Z%5,Math.floor(Z/5),1,1)}let D=S.getImageData(0,0,5,5).data;for(let Z=0;Z<5*5*4;Z++)if(Z%4!=3&&D[Z]!==Z){p=!0;break}}}return p||!1}function y(I,S,D,Z){let ie=new h(I,S,D,Z);return pe=>ie.solve(pe)}let k=y(.25,.1,.25,1);function E(I,S,D){return Math.min(D,Math.max(S,I))}function A(I,S,D){let Z=D-S,ie=((I-S)%Z+Z)%Z+S;return ie===S?D:ie}function L(I,...S){for(let D of S)for(let Z in D)I[Z]=D[Z];return I}let _=1;function C(I,S,D){let Z={};for(let ie in I)Z[ie]=S.call(this,I[ie],ie,I);return Z}function M(I,S,D){let Z={};for(let ie in I)S.call(this,I[ie],ie,I)&&(Z[ie]=I[ie]);return Z}function v(I){return Array.isArray(I)?I.map(v):typeof I=="object"&&I?C(I,v):I}let z={};function T(I){z[I]||(typeof console!="undefined"&&console.warn(I),z[I]=!0)}function F(I,S,D){return(D.y-I.y)*(S.x-I.x)>(S.y-I.y)*(D.x-I.x)}function q(I){return typeof WorkerGlobalScope!="undefined"&&I!==void 0&&I instanceof WorkerGlobalScope}let U=null;function H(I){return typeof ImageBitmap!="undefined"&&I instanceof ImageBitmap}let j="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function G(I,S,D,Z,ie){return a(this,void 0,void 0,function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let pe=new VideoFrame(I,{timestamp:0});try{let xe=pe==null?void 0:pe.format;if(!xe||!xe.startsWith("BGR")&&!xe.startsWith("RGB"))throw new Error(`Unrecognized format ${xe}`);let He=xe.startsWith("BGR"),at=new Uint8ClampedArray(Z*ie*4);if(yield pe.copyTo(at,function(wt,Ht,rr,pr,Ar){let Vr=4*Math.max(-Ht,0),ri=(Math.max(0,rr)-rr)*pr*4+Vr,Ii=4*pr,Zi=Math.max(0,Ht),da=Math.max(0,rr);return{rect:{x:Zi,y:da,width:Math.min(wt.width,Ht+pr)-Zi,height:Math.min(wt.height,rr+Ar)-da},layout:[{offset:ri,stride:Ii}]}}(I,S,D,Z,ie)),He)for(let wt=0;wt<at.length;wt+=4){let Ht=at[wt];at[wt]=at[wt+2],at[wt+2]=Ht}return at}finally{pe.close()}})}let O,W,re="AbortError";function ne(){return new Error(re)}let be={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function ze(I){return be.REGISTERED_PROTOCOLS[I.substring(0,I.indexOf("://"))]}let Ce="global-dispatcher";class he extends Error{constructor(S,D,Z,ie){super(`AJAXError: ${D} (${S}): ${Z}`),this.status=S,this.statusText=D,this.url=Z,this.body=ie}}let te=()=>q(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,ke=function(I,S){if(/:\/\//.test(I.url)&&!/^https?:|^file:/.test(I.url)){let Z=ze(I.url);if(Z)return Z(I,S);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:I,targetMapId:Ce},S)}if(!(/^file:/.test(D=I.url)||/^file:/.test(te())&&!/^\w+:/.test(D))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(Z,ie){return a(this,void 0,void 0,function*(){let pe=new Request(Z.url,{method:Z.method||"GET",body:Z.body,credentials:Z.credentials,headers:Z.headers,cache:Z.cache,referrer:te(),signal:ie.signal});Z.type!=="json"||pe.headers.has("Accept")||pe.headers.set("Accept","application/json");let xe=yield fetch(pe);if(!xe.ok){let wt=yield xe.blob();throw new he(xe.status,xe.statusText,Z.url,wt)}let He;He=Z.type==="arrayBuffer"||Z.type==="image"?xe.arrayBuffer():Z.type==="json"?xe.json():xe.text();let at=yield He;if(ie.signal.aborted)throw ne();return{data:at,cacheControl:xe.headers.get("Cache-Control"),expires:xe.headers.get("Expires")}})}(I,S);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:I,mustQueue:!0,targetMapId:Ce},S)}var D;return function(Z,ie){return new Promise((pe,xe)=>{var He;let at=new XMLHttpRequest;at.open(Z.method||"GET",Z.url,!0),Z.type!=="arrayBuffer"&&Z.type!=="image"||(at.responseType="arraybuffer");for(let wt in Z.headers)at.setRequestHeader(wt,Z.headers[wt]);Z.type==="json"&&(at.responseType="text",!((He=Z.headers)===null||He===void 0)&&He.Accept||at.setRequestHeader("Accept","application/json")),at.withCredentials=Z.credentials==="include",at.onerror=()=>{xe(new Error(at.statusText))},at.onload=()=>{if(!ie.signal.aborted)if((at.status>=200&&at.status<300||at.status===0)&&at.response!==null){let wt=at.response;if(Z.type==="json")try{wt=JSON.parse(at.response)}catch(Ht){return void xe(Ht)}pe({data:wt,cacheControl:at.getResponseHeader("Cache-Control"),expires:at.getResponseHeader("Expires")})}else{let wt=new Blob([at.response],{type:at.getResponseHeader("Content-Type")});xe(new he(at.status,at.statusText,Z.url,wt))}},ie.signal.addEventListener("abort",()=>{at.abort(),xe(ne())}),at.send(Z.body)})}(I,S)};function Ee(I){if(!I||I.indexOf("://")<=0||I.indexOf("data:image/")===0||I.indexOf("blob:")===0)return!0;let S=new URL(I),D=window.location;return S.protocol===D.protocol&&S.host===D.host}function Me(I,S,D){D[I]&&D[I].indexOf(S)!==-1||(D[I]=D[I]||[],D[I].push(S))}function Oe(I,S,D){if(D&&D[I]){let Z=D[I].indexOf(S);Z!==-1&&D[I].splice(Z,1)}}class Re{constructor(S,D={}){L(this,D),this.type=S}}class me extends Re{constructor(S,D={}){super("error",L({error:S},D))}}class Be{on(S,D){return this._listeners=this._listeners||{},Me(S,D,this._listeners),this}off(S,D){return Oe(S,D,this._listeners),Oe(S,D,this._oneTimeListeners),this}once(S,D){return D?(this._oneTimeListeners=this._oneTimeListeners||{},Me(S,D,this._oneTimeListeners),this):new Promise(Z=>this.once(S,Z))}fire(S,D){typeof S=="string"&&(S=new Re(S,D||{}));let Z=S.type;if(this.listens(Z)){S.target=this;let ie=this._listeners&&this._listeners[Z]?this._listeners[Z].slice():[];for(let He of ie)He.call(this,S);let pe=this._oneTimeListeners&&this._oneTimeListeners[Z]?this._oneTimeListeners[Z].slice():[];for(let He of pe)Oe(Z,He,this._oneTimeListeners),He.call(this,S);let xe=this._eventedParent;xe&&(L(S,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),xe.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,D){return this._eventedParent=S,this._eventedParentData=D,this}}var fe={$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 Ze=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function et(I,S){let D={};for(let Z in I)Z!=="ref"&&(D[Z]=I[Z]);return Ze.forEach(Z=>{Z in S&&(D[Z]=S[Z])}),D}function gt(I,S){if(Array.isArray(I)){if(!Array.isArray(S)||I.length!==S.length)return!1;for(let D=0;D<I.length;D++)if(!gt(I[D],S[D]))return!1;return!0}if(typeof I=="object"&&I!==null&&S!==null){if(typeof S!="object"||Object.keys(I).length!==Object.keys(S).length)return!1;for(let D in I)if(!gt(I[D],S[D]))return!1;return!0}return I===S}function Pt(I,S){I.push(S)}function Qe(I,S,D){Pt(D,{command:"addSource",args:[I,S[I]]})}function Xe(I,S,D){Pt(S,{command:"removeSource",args:[I]}),D[I]=!0}function Tt(I,S,D,Z){Xe(I,D,Z),Qe(I,S,D)}function xt(I,S,D){let Z;for(Z in I[D])if(Object.prototype.hasOwnProperty.call(I[D],Z)&&Z!=="data"&&!gt(I[D][Z],S[D][Z]))return!1;for(Z in S[D])if(Object.prototype.hasOwnProperty.call(S[D],Z)&&Z!=="data"&&!gt(I[D][Z],S[D][Z]))return!1;return!0}function _t(I,S,D,Z,ie,pe){I=I||{},S=S||{};for(let xe in I)Object.prototype.hasOwnProperty.call(I,xe)&&(gt(I[xe],S[xe])||D.push({command:pe,args:[Z,xe,S[xe],ie]}));for(let xe in S)Object.prototype.hasOwnProperty.call(S,xe)&&!Object.prototype.hasOwnProperty.call(I,xe)&&(gt(I[xe],S[xe])||D.push({command:pe,args:[Z,xe,S[xe],ie]}))}function Ct(I){return I.id}function jt(I,S){return I[S.id]=S,I}class At{constructor(S,D,Z,ie){this.message=(S?`${S}: `:"")+Z,ie&&(this.identifier=ie),D!=null&&D.__line__&&(this.line=D.__line__)}}function Te(I,...S){for(let D of S)for(let Z in D)I[Z]=D[Z];return I}class nt extends Error{constructor(S,D){super(D),this.message=D,this.key=S}}class ut{constructor(S,D=[]){this.parent=S,this.bindings={};for(let[Z,ie]of D)this.bindings[Z]=ie}concat(S){return new ut(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 ct={kind:"null"},rt={kind:"number"},je={kind:"string"},tt={kind:"boolean"},Je={kind:"color"},Mt={kind:"object"},Vt={kind:"value"},Kt={kind:"collator"},ir={kind:"formatted"},fr={kind:"padding"},Ot={kind:"resolvedImage"},De={kind:"variableAnchorOffsetCollection"};function _e(I,S){return{kind:"array",itemType:I,N:S}}function Fe(I){if(I.kind==="array"){let S=Fe(I.itemType);return typeof I.N=="number"?`array<${S}, ${I.N}>`:I.itemType.kind==="value"?"array":`array<${S}>`}return I.kind}let Pe=[ct,rt,je,tt,Je,ir,Mt,_e(Vt),fr,Ot,De];function Ie(I,S){if(S.kind==="error")return null;if(I.kind==="array"){if(S.kind==="array"&&(S.N===0&&S.itemType.kind==="value"||!Ie(I.itemType,S.itemType))&&(typeof I.N!="number"||I.N===S.N))return null}else{if(I.kind===S.kind)return null;if(I.kind==="value"){for(let D of Pe)if(!Ie(D,S))return null}}return`Expected ${Fe(I)} but found ${Fe(S)} instead.`}function lt(I,S){return S.some(D=>D.kind===I.kind)}function ye(I,S){return S.some(D=>D==="null"?I===null:D==="array"?Array.isArray(I):D==="object"?I&&!Array.isArray(I)&&typeof I=="object":D===typeof I)}function ue(I,S){return I.kind==="array"&&S.kind==="array"?I.itemType.kind===S.itemType.kind&&typeof I.N=="number":I.kind===S.kind}let de=.96422,ht=.82521,Et=4/29,St=6/29,Zt=3*St*St,qr=St*St*St,Lr=Math.PI/180,vr=180/Math.PI;function Er(I){return(I%=360)<0&&(I+=360),I}function si([I,S,D,Z]){let ie,pe,xe=Si((.2225045*(I=Ei(I))+.7168786*(S=Ei(S))+.0606169*(D=Ei(D)))/1);I===S&&S===D?ie=pe=xe:(ie=Si((.4360747*I+.3850649*S+.1430804*D)/de),pe=Si((.0139322*I+.0971045*S+.7141733*D)/ht));let He=116*xe-16;return[He<0?0:He,500*(ie-xe),200*(xe-pe),Z]}function Ei(I){return I<=.04045?I/12.92:Math.pow((I+.055)/1.055,2.4)}function Si(I){return I>qr?Math.pow(I,1/3):I/Zt+Et}function xi([I,S,D,Z]){let ie=(I+16)/116,pe=isNaN(S)?ie:ie+S/500,xe=isNaN(D)?ie:ie-D/200;return ie=1*Jr(ie),pe=de*Jr(pe),xe=ht*Jr(xe),[Hi(3.1338561*pe-1.6168667*ie-.4906146*xe),Hi(-.9787684*pe+1.9161415*ie+.033454*xe),Hi(.0719453*pe-.2289914*ie+1.4052427*xe),Z]}function Hi(I){return(I=I<=.00304?12.92*I:1.055*Math.pow(I,1/2.4)-.055)<0?0:I>1?1:I}function Jr(I){return I>St?I*I*I:Zt*(I-Et)}function ci(I){return parseInt(I.padEnd(2,I),16)/255}function Di(I,S){return Lt(S?I/100:I,0,1)}function Lt(I,S,D){return Math.min(Math.max(S,I),D)}function vt(I){return!I.some(Number.isNaN)}let Dt={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 Bt{constructor(S,D,Z,ie=1,pe=!0){this.r=S,this.g=D,this.b=Z,this.a=ie,pe||(this.r*=ie,this.g*=ie,this.b*=ie,ie||this.overwriteGetter("rgb",[S,D,Z,ie]))}static parse(S){if(S instanceof Bt)return S;if(typeof S!="string")return;let D=function(Z){if((Z=Z.toLowerCase().trim())==="transparent")return[0,0,0,0];let ie=Dt[Z];if(ie){let[xe,He,at]=ie;return[xe/255,He/255,at/255,1]}if(Z.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(Z)){let xe=Z.length<6?1:2,He=1;return[ci(Z.slice(He,He+=xe)),ci(Z.slice(He,He+=xe)),ci(Z.slice(He,He+=xe)),ci(Z.slice(He,He+xe)||"ff")]}if(Z.startsWith("rgb")){let xe=Z.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(xe){let[He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da]=xe,cn=[Ht||" ",Ar||" ",Ii].join("");if(cn==="  "||cn==="  /"||cn===",,"||cn===",,,"){let jn=[wt,pr,ri].join(""),Va=jn==="%%%"?100:jn===""?255:0;if(Va){let hl=[Lt(+at/Va,0,1),Lt(+rr/Va,0,1),Lt(+Vr/Va,0,1),Zi?Di(+Zi,da):1];if(vt(hl))return hl}}return}}let pe=Z.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(pe){let[xe,He,at,wt,Ht,rr,pr,Ar,Vr]=pe,ri=[at||" ",Ht||" ",pr].join("");if(ri==="  "||ri==="  /"||ri===",,"||ri===",,,"){let Ii=[+He,Lt(+wt,0,100),Lt(+rr,0,100),Ar?Di(+Ar,Vr):1];if(vt(Ii))return function([Zi,da,cn,jn]){function Va(hl){let iu=(hl+Zi/30)%12,Su=da*Math.min(cn,1-cn);return cn-Su*Math.max(-1,Math.min(iu-3,9-iu,1))}return Zi=Er(Zi),da/=100,cn/=100,[Va(0),Va(8),Va(4),jn]}(Ii)}}}(S);return D?new Bt(...D,!1):void 0}get rgb(){let{r:S,g:D,b:Z,a:ie}=this,pe=ie||1/0;return this.overwriteGetter("rgb",[S/pe,D/pe,Z/pe,ie])}get hcl(){return this.overwriteGetter("hcl",function(S){let[D,Z,ie,pe]=si(S),xe=Math.sqrt(Z*Z+ie*ie);return[Math.round(1e4*xe)?Er(Math.atan2(ie,Z)*vr):NaN,xe,D,pe]}(this.rgb))}get lab(){return this.overwriteGetter("lab",si(this.rgb))}overwriteGetter(S,D){return Object.defineProperty(this,S,{value:D}),D}toString(){let[S,D,Z,ie]=this.rgb;return`rgba(${[S,D,Z].map(pe=>Math.round(255*pe)).join(",")},${ie})`}}Bt.black=new Bt(0,0,0,1),Bt.white=new Bt(1,1,1,1),Bt.transparent=new Bt(0,0,0,0),Bt.red=new Bt(1,0,0,1);class sr{constructor(S,D,Z){this.sensitivity=S?D?"variant":"case":D?"accent":"base",this.locale=Z,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(S,D){return this.collator.compare(S,D)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class br{constructor(S,D,Z,ie,pe){this.text=S,this.image=D,this.scale=Z,this.fontStack=ie,this.textColor=pe}}class zr{constructor(S){this.sections=S}static fromString(S){return new zr([new br(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 zr?S:zr.fromString(S)}toString(){return this.sections.length===0?"":this.sections.map(S=>S.text).join("")}}class Tr{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof Tr)return S;if(typeof S=="number")return new Tr([S,S,S,S]);if(Array.isArray(S)&&!(S.length<1||S.length>4)){for(let D of S)if(typeof D!="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 Tr(S)}}toString(){return JSON.stringify(this.values)}}let Rr=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Br{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof Br)return S;if(Array.isArray(S)&&!(S.length<1)&&S.length%2==0){for(let D=0;D<S.length;D+=2){let Z=S[D],ie=S[D+1];if(typeof Z!="string"||!Rr.has(Z)||!Array.isArray(ie)||ie.length!==2||typeof ie[0]!="number"||typeof ie[1]!="number")return}return new Br(S)}}toString(){return JSON.stringify(this.values)}}class oi{constructor(S){this.name=S.name,this.available=S.available}toString(){return this.name}static fromString(S){return S?new oi({name:S,available:!1}):null}}function vi(I,S,D,Z){return typeof I=="number"&&I>=0&&I<=255&&typeof S=="number"&&S>=0&&S<=255&&typeof D=="number"&&D>=0&&D<=255?Z===void 0||typeof Z=="number"&&Z>=0&&Z<=1?null:`Invalid rgba value [${[I,S,D,Z].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof Z=="number"?[I,S,D,Z]:[I,S,D]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Pi(I){if(I===null||typeof I=="string"||typeof I=="boolean"||typeof I=="number"||I instanceof Bt||I instanceof sr||I instanceof zr||I instanceof Tr||I instanceof Br||I instanceof oi)return!0;if(Array.isArray(I)){for(let S of I)if(!Pi(S))return!1;return!0}if(typeof I=="object"){for(let S in I)if(!Pi(I[S]))return!1;return!0}return!1}function Yr(I){if(I===null)return ct;if(typeof I=="string")return je;if(typeof I=="boolean")return tt;if(typeof I=="number")return rt;if(I instanceof Bt)return Je;if(I instanceof sr)return Kt;if(I instanceof zr)return ir;if(I instanceof Tr)return fr;if(I instanceof Br)return De;if(I instanceof oi)return Ot;if(Array.isArray(I)){let S=I.length,D;for(let Z of I){let ie=Yr(Z);if(D){if(D===ie)continue;D=Vt;break}D=ie}return _e(D||Vt,S)}return Mt}function Ni(I){let S=typeof I;return I===null?"":S==="string"||S==="number"||S==="boolean"?String(I):I instanceof Bt||I instanceof zr||I instanceof Tr||I instanceof Br||I instanceof oi?I.toString():JSON.stringify(I)}class Ur{constructor(S,D){this.type=S,this.value=D}static parse(S,D){if(S.length!==2)return D.error(`'literal' expression requires exactly one argument, but found ${S.length-1} instead.`);if(!Pi(S[1]))return D.error("invalid value");let Z=S[1],ie=Yr(Z),pe=D.expectedType;return ie.kind!=="array"||ie.N!==0||!pe||pe.kind!=="array"||typeof pe.N=="number"&&pe.N!==0||(ie=pe),new Ur(ie,Z)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ti{constructor(S){this.name="ExpressionEvaluationError",this.message=S}toJSON(){return this.message}}let ki={string:je,number:rt,boolean:tt,object:Mt};class ji{constructor(S,D){this.type=S,this.args=D}static parse(S,D){if(S.length<2)return D.error("Expected at least one argument.");let Z,ie=1,pe=S[0];if(pe==="array"){let He,at;if(S.length>2){let wt=S[1];if(typeof wt!="string"||!(wt in ki)||wt==="object")return D.error('The item type argument of "array" must be one of string, number, boolean',1);He=ki[wt],ie++}else He=Vt;if(S.length>3){if(S[2]!==null&&(typeof S[2]!="number"||S[2]<0||S[2]!==Math.floor(S[2])))return D.error('The length argument to "array" must be a positive integer literal',2);at=S[2],ie++}Z=_e(He,at)}else{if(!ki[pe])throw new Error(`Types doesn't contain name = ${pe}`);Z=ki[pe]}let xe=[];for(;ie<S.length;ie++){let He=D.parse(S[ie],ie,Vt);if(!He)return null;xe.push(He)}return new ji(Z,xe)}evaluate(S){for(let D=0;D<this.args.length;D++){let Z=this.args[D].evaluate(S);if(!Ie(this.type,Yr(Z)))return Z;if(D===this.args.length-1)throw new ti(`Expected value to be of type ${Fe(this.type)}, but found ${Fe(Yr(Z))} instead.`)}throw new Error}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}let Vi={"to-boolean":tt,"to-color":Je,"to-number":rt,"to-string":je};class zi{constructor(S,D){this.type=S,this.args=D}static parse(S,D){if(S.length<2)return D.error("Expected at least one argument.");let Z=S[0];if(!Vi[Z])throw new Error(`Can't parse ${Z} as it is not part of the known types`);if((Z==="to-boolean"||Z==="to-string")&&S.length!==2)return D.error("Expected one argument.");let ie=Vi[Z],pe=[];for(let xe=1;xe<S.length;xe++){let He=D.parse(S[xe],xe,Vt);if(!He)return null;pe.push(He)}return new zi(ie,pe)}evaluate(S){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(S);case"color":{let D,Z;for(let ie of this.args){if(D=ie.evaluate(S),Z=null,D instanceof Bt)return D;if(typeof D=="string"){let pe=S.parseColor(D);if(pe)return pe}else if(Array.isArray(D)&&(Z=D.length<3||D.length>4?`Invalid rbga value ${JSON.stringify(D)}: expected an array containing either three or four numeric values.`:vi(D[0],D[1],D[2],D[3]),!Z))return new Bt(D[0]/255,D[1]/255,D[2]/255,D[3])}throw new ti(Z||`Could not parse color from value '${typeof D=="string"?D:JSON.stringify(D)}'`)}case"padding":{let D;for(let Z of this.args){D=Z.evaluate(S);let ie=Tr.parse(D);if(ie)return ie}throw new ti(`Could not parse padding from value '${typeof D=="string"?D:JSON.stringify(D)}'`)}case"variableAnchorOffsetCollection":{let D;for(let Z of this.args){D=Z.evaluate(S);let ie=Br.parse(D);if(ie)return ie}throw new ti(`Could not parse variableAnchorOffsetCollection from value '${typeof D=="string"?D:JSON.stringify(D)}'`)}case"number":{let D=null;for(let Z of this.args){if(D=Z.evaluate(S),D===null)return 0;let ie=Number(D);if(!isNaN(ie))return ie}throw new ti(`Could not convert ${JSON.stringify(D)} to number.`)}case"formatted":return zr.fromString(Ni(this.args[0].evaluate(S)));case"resolvedImage":return oi.fromString(Ni(this.args[0].evaluate(S)));default:return Ni(this.args[0].evaluate(S))}}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}let Mi=["Unknown","Point","LineString","Polygon"];class sn{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"?Mi[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 D=this._parseColorCache[S];return D||(D=this._parseColorCache[S]=Bt.parse(S)),D}}class fi{constructor(S,D,Z=[],ie,pe=new ut,xe=[]){this.registry=S,this.path=Z,this.key=Z.map(He=>`[${He}]`).join(""),this.scope=pe,this.errors=xe,this.expectedType=ie,this._isConstant=D}parse(S,D,Z,ie,pe={}){return D?this.concat(D,Z,ie)._parse(S,pe):this._parse(S,pe)}_parse(S,D){function Z(ie,pe,xe){return xe==="assert"?new ji(pe,[ie]):xe==="coerce"?new zi(pe,[ie]):ie}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 ie=S[0];if(typeof ie!="string")return this.error(`Expression name must be a string, but found ${typeof ie} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let pe=this.registry[ie];if(pe){let xe=pe.parse(S,this);if(!xe)return null;if(this.expectedType){let He=this.expectedType,at=xe.type;if(He.kind!=="string"&&He.kind!=="number"&&He.kind!=="boolean"&&He.kind!=="object"&&He.kind!=="array"||at.kind!=="value")if(He.kind!=="color"&&He.kind!=="formatted"&&He.kind!=="resolvedImage"||at.kind!=="value"&&at.kind!=="string")if(He.kind!=="padding"||at.kind!=="value"&&at.kind!=="number"&&at.kind!=="array")if(He.kind!=="variableAnchorOffsetCollection"||at.kind!=="value"&&at.kind!=="array"){if(this.checkSubtype(He,at))return null}else xe=Z(xe,He,D.typeAnnotation||"coerce");else xe=Z(xe,He,D.typeAnnotation||"coerce");else xe=Z(xe,He,D.typeAnnotation||"coerce");else xe=Z(xe,He,D.typeAnnotation||"assert")}if(!(xe instanceof Ur)&&xe.type.kind!=="resolvedImage"&&this._isConstant(xe)){let He=new sn;try{xe=new Ur(xe.type,xe.evaluate(He))}catch(at){return this.error(at.message),null}}return xe}return this.error(`Unknown expression "${ie}". 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,D,Z){let ie=typeof S=="number"?this.path.concat(S):this.path,pe=Z?this.scope.concat(Z):this.scope;return new fi(this.registry,this._isConstant,ie,D||null,pe,this.errors)}error(S,...D){let Z=`${this.key}${D.map(ie=>`[${ie}]`).join("")}`;this.errors.push(new nt(Z,S))}checkSubtype(S,D){let Z=Ie(S,D);return Z&&this.error(Z),Z}}class Or{constructor(S,D){this.type=D.type,this.bindings=[].concat(S),this.result=D}evaluate(S){return this.result.evaluate(S)}eachChild(S){for(let D of this.bindings)S(D[1]);S(this.result)}static parse(S,D){if(S.length<4)return D.error(`Expected at least 3 arguments, but found ${S.length-1} instead.`);let Z=[];for(let pe=1;pe<S.length-1;pe+=2){let xe=S[pe];if(typeof xe!="string")return D.error(`Expected string, but found ${typeof xe} instead.`,pe);if(/[^a-zA-Z0-9_]/.test(xe))return D.error("Variable names must contain only alphanumeric characters or '_'.",pe);let He=D.parse(S[pe+1],pe+1);if(!He)return null;Z.push([xe,He])}let ie=D.parse(S[S.length-1],S.length-1,D.expectedType,Z);return ie?new Or(Z,ie):null}outputDefined(){return this.result.outputDefined()}}class st{constructor(S,D){this.type=D.type,this.name=S,this.boundExpression=D}static parse(S,D){if(S.length!==2||typeof S[1]!="string")return D.error("'var' expression requires exactly one string literal argument.");let Z=S[1];return D.scope.has(Z)?new st(Z,D.scope.get(Z)):D.error(`Unknown variable "${Z}". Make sure "${Z}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(S){return this.boundExpression.evaluate(S)}eachChild(){}outputDefined(){return!1}}class Wt{constructor(S,D,Z){this.type=S,this.index=D,this.input=Z}static parse(S,D){if(S.length!==3)return D.error(`Expected 2 arguments, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1,rt),ie=D.parse(S[2],2,_e(D.expectedType||Vt));return Z&&ie?new Wt(ie.type.itemType,Z,ie):null}evaluate(S){let D=this.index.evaluate(S),Z=this.input.evaluate(S);if(D<0)throw new ti(`Array index out of bounds: ${D} < 0.`);if(D>=Z.length)throw new ti(`Array index out of bounds: ${D} > ${Z.length-1}.`);if(D!==Math.floor(D))throw new ti(`Array index must be an integer, but found ${D} instead.`);return Z[D]}eachChild(S){S(this.index),S(this.input)}outputDefined(){return!1}}class tr{constructor(S,D){this.type=tt,this.needle=S,this.haystack=D}static parse(S,D){if(S.length!==3)return D.error(`Expected 2 arguments, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1,Vt),ie=D.parse(S[2],2,Vt);return Z&&ie?lt(Z.type,[tt,je,rt,ct,Vt])?new tr(Z,ie):D.error(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Z.type)} instead`):null}evaluate(S){let D=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!Z)return!1;if(!ye(D,["boolean","string","number","null"]))throw new ti(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Yr(D))} instead.`);if(!ye(Z,["string","array"]))throw new ti(`Expected second argument to be of type array or string, but found ${Fe(Yr(Z))} instead.`);return Z.indexOf(D)>=0}eachChild(S){S(this.needle),S(this.haystack)}outputDefined(){return!0}}class or{constructor(S,D,Z){this.type=rt,this.needle=S,this.haystack=D,this.fromIndex=Z}static parse(S,D){if(S.length<=2||S.length>=5)return D.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1,Vt),ie=D.parse(S[2],2,Vt);if(!Z||!ie)return null;if(!lt(Z.type,[tt,je,rt,ct,Vt]))return D.error(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Z.type)} instead`);if(S.length===4){let pe=D.parse(S[3],3,rt);return pe?new or(Z,ie,pe):null}return new or(Z,ie)}evaluate(S){let D=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!ye(D,["boolean","string","number","null"]))throw new ti(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Yr(D))} instead.`);let ie;if(this.fromIndex&&(ie=this.fromIndex.evaluate(S)),ye(Z,["string"])){let pe=Z.indexOf(D,ie);return pe===-1?-1:[...Z.slice(0,pe)].length}if(ye(Z,["array"]))return Z.indexOf(D,ie);throw new ti(`Expected second argument to be of type array or string, but found ${Fe(Yr(Z))} instead.`)}eachChild(S){S(this.needle),S(this.haystack),this.fromIndex&&S(this.fromIndex)}outputDefined(){return!1}}class Nr{constructor(S,D,Z,ie,pe,xe){this.inputType=S,this.type=D,this.input=Z,this.cases=ie,this.outputs=pe,this.otherwise=xe}static parse(S,D){if(S.length<5)return D.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if(S.length%2!=1)return D.error("Expected an even number of arguments.");let Z,ie;D.expectedType&&D.expectedType.kind!=="value"&&(ie=D.expectedType);let pe={},xe=[];for(let wt=2;wt<S.length-1;wt+=2){let Ht=S[wt],rr=S[wt+1];Array.isArray(Ht)||(Ht=[Ht]);let pr=D.concat(wt);if(Ht.length===0)return pr.error("Expected at least one branch label.");for(let Vr of Ht){if(typeof Vr!="number"&&typeof Vr!="string")return pr.error("Branch labels must be numbers or strings.");if(typeof Vr=="number"&&Math.abs(Vr)>Number.MAX_SAFE_INTEGER)return pr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Vr=="number"&&Math.floor(Vr)!==Vr)return pr.error("Numeric branch labels must be integer values.");if(Z){if(pr.checkSubtype(Z,Yr(Vr)))return null}else Z=Yr(Vr);if(pe[String(Vr)]!==void 0)return pr.error("Branch labels must be unique.");pe[String(Vr)]=xe.length}let Ar=D.parse(rr,wt,ie);if(!Ar)return null;ie=ie||Ar.type,xe.push(Ar)}let He=D.parse(S[1],1,Vt);if(!He)return null;let at=D.parse(S[S.length-1],S.length-1,ie);return at?He.type.kind!=="value"&&D.concat(1).checkSubtype(Z,He.type)?null:new Nr(Z,ie,He,pe,xe,at):null}evaluate(S){let D=this.input.evaluate(S);return(Yr(D)===this.inputType&&this.outputs[this.cases[D]]||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 hi{constructor(S,D,Z){this.type=S,this.branches=D,this.otherwise=Z}static parse(S,D){if(S.length<4)return D.error(`Expected at least 3 arguments, but found only ${S.length-1}.`);if(S.length%2!=0)return D.error("Expected an odd number of arguments.");let Z;D.expectedType&&D.expectedType.kind!=="value"&&(Z=D.expectedType);let ie=[];for(let xe=1;xe<S.length-1;xe+=2){let He=D.parse(S[xe],xe,tt);if(!He)return null;let at=D.parse(S[xe+1],xe+1,Z);if(!at)return null;ie.push([He,at]),Z=Z||at.type}let pe=D.parse(S[S.length-1],S.length-1,Z);if(!pe)return null;if(!Z)throw new Error("Can't infer output type");return new hi(Z,ie,pe)}evaluate(S){for(let[D,Z]of this.branches)if(D.evaluate(S))return Z.evaluate(S);return this.otherwise.evaluate(S)}eachChild(S){for(let[D,Z]of this.branches)S(D),S(Z);S(this.otherwise)}outputDefined(){return this.branches.every(([S,D])=>D.outputDefined())&&this.otherwise.outputDefined()}}class Gi{constructor(S,D,Z,ie){this.type=S,this.input=D,this.beginIndex=Z,this.endIndex=ie}static parse(S,D){if(S.length<=2||S.length>=5)return D.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1,Vt),ie=D.parse(S[2],2,rt);if(!Z||!ie)return null;if(!lt(Z.type,[_e(Vt),je,Vt]))return D.error(`Expected first argument to be of type array or string, but found ${Fe(Z.type)} instead`);if(S.length===4){let pe=D.parse(S[3],3,rt);return pe?new Gi(Z.type,Z,ie,pe):null}return new Gi(Z.type,Z,ie)}evaluate(S){let D=this.input.evaluate(S),Z=this.beginIndex.evaluate(S),ie;if(this.endIndex&&(ie=this.endIndex.evaluate(S)),ye(D,["string"]))return[...D].slice(Z,ie).join("");if(ye(D,["array"]))return D.slice(Z,ie);throw new ti(`Expected first argument to be of type array or string, but found ${Fe(Yr(D))} instead.`)}eachChild(S){S(this.input),S(this.beginIndex),this.endIndex&&S(this.endIndex)}outputDefined(){return!1}}function Qr(I,S){let D=I.length-1,Z,ie,pe=0,xe=D,He=0;for(;pe<=xe;)if(He=Math.floor((pe+xe)/2),Z=I[He],ie=I[He+1],Z<=S){if(He===D||S<ie)return He;pe=He+1}else{if(!(Z>S))throw new ti("Input is not a number.");xe=He-1}return 0}class Ui{constructor(S,D,Z){this.type=S,this.input=D,this.labels=[],this.outputs=[];for(let[ie,pe]of Z)this.labels.push(ie),this.outputs.push(pe)}static parse(S,D){if(S.length-1<4)return D.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return D.error("Expected an even number of arguments.");let Z=D.parse(S[1],1,rt);if(!Z)return null;let ie=[],pe=null;D.expectedType&&D.expectedType.kind!=="value"&&(pe=D.expectedType);for(let xe=1;xe<S.length;xe+=2){let He=xe===1?-1/0:S[xe],at=S[xe+1],wt=xe,Ht=xe+1;if(typeof He!="number")return D.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',wt);if(ie.length&&ie[ie.length-1][0]>=He)return D.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',wt);let rr=D.parse(at,Ht,pe);if(!rr)return null;pe=pe||rr.type,ie.push([He,rr])}return new Ui(pe,Z,ie)}evaluate(S){let D=this.labels,Z=this.outputs;if(D.length===1)return Z[0].evaluate(S);let ie=this.input.evaluate(S);if(ie<=D[0])return Z[0].evaluate(S);let pe=D.length;return ie>=D[pe-1]?Z[pe-1].evaluate(S):Z[Qr(D,ie)].evaluate(S)}eachChild(S){S(this.input);for(let D of this.outputs)S(D)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function zn(I){return I&&I.__esModule&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I}var fn=xn;function xn(I,S,D,Z){this.cx=3*I,this.bx=3*(D-I)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(Z-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=I,this.p1y=S,this.p2x=D,this.p2y=Z}xn.prototype={sampleCurveX:function(I){return((this.ax*I+this.bx)*I+this.cx)*I},sampleCurveY:function(I){return((this.ay*I+this.by)*I+this.cy)*I},sampleCurveDerivativeX:function(I){return(3*this.ax*I+2*this.bx)*I+this.cx},solveCurveX:function(I,S){if(S===void 0&&(S=1e-6),I<0)return 0;if(I>1)return 1;for(var D=I,Z=0;Z<8;Z++){var ie=this.sampleCurveX(D)-I;if(Math.abs(ie)<S)return D;var pe=this.sampleCurveDerivativeX(D);if(Math.abs(pe)<1e-6)break;D-=ie/pe}var xe=0,He=1;for(D=I,Z=0;Z<20&&(ie=this.sampleCurveX(D),!(Math.abs(ie-I)<S));Z++)I>ie?xe=D:He=D,D=.5*(He-xe)+xe;return D},solve:function(I,S){return this.sampleCurveY(this.solveCurveX(I,S))}};var _a=zn(fn);function Wn(I,S,D){return I+D*(S-I)}function Fn(I,S,D){return I.map((Z,ie)=>Wn(Z,S[ie],D))}let ia={number:Wn,color:function(I,S,D,Z="rgb"){switch(Z){case"rgb":{let[ie,pe,xe,He]=Fn(I.rgb,S.rgb,D);return new Bt(ie,pe,xe,He,!1)}case"hcl":{let[ie,pe,xe,He]=I.hcl,[at,wt,Ht,rr]=S.hcl,pr,Ar;if(isNaN(ie)||isNaN(at))isNaN(ie)?isNaN(at)?pr=NaN:(pr=at,xe!==1&&xe!==0||(Ar=wt)):(pr=ie,Ht!==1&&Ht!==0||(Ar=pe));else{let da=at-ie;at>ie&&da>180?da-=360:at<ie&&ie-at>180&&(da+=360),pr=ie+D*da}let[Vr,ri,Ii,Zi]=function([da,cn,jn,Va]){return da=isNaN(da)?0:da*Lr,xi([jn,Math.cos(da)*cn,Math.sin(da)*cn,Va])}([pr,Ar!=null?Ar:Wn(pe,wt,D),Wn(xe,Ht,D),Wn(He,rr,D)]);return new Bt(Vr,ri,Ii,Zi,!1)}case"lab":{let[ie,pe,xe,He]=xi(Fn(I.lab,S.lab,D));return new Bt(ie,pe,xe,He,!1)}}},array:Fn,padding:function(I,S,D){return new Tr(Fn(I.values,S.values,D))},variableAnchorOffsetCollection:function(I,S,D){let Z=I.values,ie=S.values;if(Z.length!==ie.length)throw new ti(`Cannot interpolate values of different length. from: ${I.toString()}, to: ${S.toString()}`);let pe=[];for(let xe=0;xe<Z.length;xe+=2){if(Z[xe]!==ie[xe])throw new ti(`Cannot interpolate values containing mismatched anchors. from[${xe}]: ${Z[xe]}, to[${xe}]: ${ie[xe]}`);pe.push(Z[xe]);let[He,at]=Z[xe+1],[wt,Ht]=ie[xe+1];pe.push([Wn(He,wt,D),Wn(at,Ht,D)])}return new Br(pe)}};class za{constructor(S,D,Z,ie,pe){this.type=S,this.operator=D,this.interpolation=Z,this.input=ie,this.labels=[],this.outputs=[];for(let[xe,He]of pe)this.labels.push(xe),this.outputs.push(He)}static interpolationFactor(S,D,Z,ie){let pe=0;if(S.name==="exponential")pe=Hr(D,S.base,Z,ie);else if(S.name==="linear")pe=Hr(D,1,Z,ie);else if(S.name==="cubic-bezier"){let xe=S.controlPoints;pe=new _a(xe[0],xe[1],xe[2],xe[3]).solve(Hr(D,1,Z,ie))}return pe}static parse(S,D){let[Z,ie,pe,...xe]=S;if(!Array.isArray(ie)||ie.length===0)return D.error("Expected an interpolation type expression.",1);if(ie[0]==="linear")ie={name:"linear"};else if(ie[0]==="exponential"){let wt=ie[1];if(typeof wt!="number")return D.error("Exponential interpolation requires a numeric base.",1,1);ie={name:"exponential",base:wt}}else{if(ie[0]!=="cubic-bezier")return D.error(`Unknown interpolation type ${String(ie[0])}`,1,0);{let wt=ie.slice(1);if(wt.length!==4||wt.some(Ht=>typeof Ht!="number"||Ht<0||Ht>1))return D.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ie={name:"cubic-bezier",controlPoints:wt}}}if(S.length-1<4)return D.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return D.error("Expected an even number of arguments.");if(pe=D.parse(pe,2,rt),!pe)return null;let He=[],at=null;Z==="interpolate-hcl"||Z==="interpolate-lab"?at=Je:D.expectedType&&D.expectedType.kind!=="value"&&(at=D.expectedType);for(let wt=0;wt<xe.length;wt+=2){let Ht=xe[wt],rr=xe[wt+1],pr=wt+3,Ar=wt+4;if(typeof Ht!="number")return D.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',pr);if(He.length&&He[He.length-1][0]>=Ht)return D.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',pr);let Vr=D.parse(rr,Ar,at);if(!Vr)return null;at=at||Vr.type,He.push([Ht,Vr])}return ue(at,rt)||ue(at,Je)||ue(at,fr)||ue(at,De)||ue(at,_e(rt))?new za(at,Z,ie,pe,He):D.error(`Type ${Fe(at)} is not interpolatable.`)}evaluate(S){let D=this.labels,Z=this.outputs;if(D.length===1)return Z[0].evaluate(S);let ie=this.input.evaluate(S);if(ie<=D[0])return Z[0].evaluate(S);let pe=D.length;if(ie>=D[pe-1])return Z[pe-1].evaluate(S);let xe=Qr(D,ie),He=za.interpolationFactor(this.interpolation,ie,D[xe],D[xe+1]),at=Z[xe].evaluate(S),wt=Z[xe+1].evaluate(S);switch(this.operator){case"interpolate":return ia[this.type.kind](at,wt,He);case"interpolate-hcl":return ia.color(at,wt,He,"hcl");case"interpolate-lab":return ia.color(at,wt,He,"lab")}}eachChild(S){S(this.input);for(let D of this.outputs)S(D)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function Hr(I,S,D,Z){let ie=Z-D,pe=I-D;return ie===0?0:S===1?pe/ie:(Math.pow(S,pe)-1)/(Math.pow(S,ie)-1)}class na{constructor(S,D){this.type=S,this.args=D}static parse(S,D){if(S.length<2)return D.error("Expectected at least one argument.");let Z=null,ie=D.expectedType;ie&&ie.kind!=="value"&&(Z=ie);let pe=[];for(let He of S.slice(1)){let at=D.parse(He,1+pe.length,Z,void 0,{typeAnnotation:"omit"});if(!at)return null;Z=Z||at.type,pe.push(at)}if(!Z)throw new Error("No output type");let xe=ie&&pe.some(He=>Ie(ie,He.type));return new na(xe?Vt:Z,pe)}evaluate(S){let D,Z=null,ie=0;for(let pe of this.args)if(ie++,Z=pe.evaluate(S),Z&&Z instanceof oi&&!Z.available&&(D||(D=Z.name),Z=null,ie===this.args.length&&(Z=D)),Z!==null)break;return Z}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}function go(I,S){return I==="=="||I==="!="?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 Dn(I,S,D,Z){return Z.compare(S,D)===0}function un(I,S,D){let Z=I!=="=="&&I!=="!=";return class xGe{constructor(pe,xe,He){this.type=tt,this.lhs=pe,this.rhs=xe,this.collator=He,this.hasUntypedArgument=pe.type.kind==="value"||xe.type.kind==="value"}static parse(pe,xe){if(pe.length!==3&&pe.length!==4)return xe.error("Expected two or three arguments.");let He=pe[0],at=xe.parse(pe[1],1,Vt);if(!at)return null;if(!go(He,at.type))return xe.concat(1).error(`"${He}" comparisons are not supported for type '${Fe(at.type)}'.`);let wt=xe.parse(pe[2],2,Vt);if(!wt)return null;if(!go(He,wt.type))return xe.concat(2).error(`"${He}" comparisons are not supported for type '${Fe(wt.type)}'.`);if(at.type.kind!==wt.type.kind&&at.type.kind!=="value"&&wt.type.kind!=="value")return xe.error(`Cannot compare types '${Fe(at.type)}' and '${Fe(wt.type)}'.`);Z&&(at.type.kind==="value"&&wt.type.kind!=="value"?at=new ji(wt.type,[at]):at.type.kind!=="value"&&wt.type.kind==="value"&&(wt=new ji(at.type,[wt])));let Ht=null;if(pe.length===4){if(at.type.kind!=="string"&&wt.type.kind!=="string"&&at.type.kind!=="value"&&wt.type.kind!=="value")return xe.error("Cannot use collator to compare non-string types.");if(Ht=xe.parse(pe[3],3,Kt),!Ht)return null}return new xGe(at,wt,Ht)}evaluate(pe){let xe=this.lhs.evaluate(pe),He=this.rhs.evaluate(pe);if(Z&&this.hasUntypedArgument){let at=Yr(xe),wt=Yr(He);if(at.kind!==wt.kind||at.kind!=="string"&&at.kind!=="number")throw new ti(`Expected arguments for "${I}" to be (string, string) or (number, number), but found (${at.kind}, ${wt.kind}) instead.`)}if(this.collator&&!Z&&this.hasUntypedArgument){let at=Yr(xe),wt=Yr(He);if(at.kind!=="string"||wt.kind!=="string")return S(pe,xe,He)}return this.collator?D(pe,xe,He,this.collator.evaluate(pe)):S(pe,xe,He)}eachChild(pe){pe(this.lhs),pe(this.rhs),this.collator&&pe(this.collator)}outputDefined(){return!0}}}let Zn=un("==",function(I,S,D){return S===D},Dn),Wo=un("!=",function(I,S,D){return S!==D},function(I,S,D,Z){return!Dn(0,S,D,Z)}),Ba=un("<",function(I,S,D){return S<D},function(I,S,D,Z){return Z.compare(S,D)<0}),Bo=un(">",function(I,S,D){return S>D},function(I,S,D,Z){return Z.compare(S,D)>0}),Ea=un("<=",function(I,S,D){return S<=D},function(I,S,D,Z){return Z.compare(S,D)<=0}),Ha=un(">=",function(I,S,D){return S>=D},function(I,S,D,Z){return Z.compare(S,D)>=0});class tn{constructor(S,D,Z){this.type=Kt,this.locale=Z,this.caseSensitive=S,this.diacriticSensitive=D}static parse(S,D){if(S.length!==2)return D.error("Expected one argument.");let Z=S[1];if(typeof Z!="object"||Array.isArray(Z))return D.error("Collator options argument must be an object.");let ie=D.parse(Z["case-sensitive"]!==void 0&&Z["case-sensitive"],1,tt);if(!ie)return null;let pe=D.parse(Z["diacritic-sensitive"]!==void 0&&Z["diacritic-sensitive"],1,tt);if(!pe)return null;let xe=null;return Z.locale&&(xe=D.parse(Z.locale,1,je),!xe)?null:new tn(ie,pe,xe)}evaluate(S){return new sr(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 Cn{constructor(S,D,Z,ie,pe){this.type=je,this.number=S,this.locale=D,this.currency=Z,this.minFractionDigits=ie,this.maxFractionDigits=pe}static parse(S,D){if(S.length!==3)return D.error("Expected two arguments.");let Z=D.parse(S[1],1,rt);if(!Z)return null;let ie=S[2];if(typeof ie!="object"||Array.isArray(ie))return D.error("NumberFormat options argument must be an object.");let pe=null;if(ie.locale&&(pe=D.parse(ie.locale,1,je),!pe))return null;let xe=null;if(ie.currency&&(xe=D.parse(ie.currency,1,je),!xe))return null;let He=null;if(ie["min-fraction-digits"]&&(He=D.parse(ie["min-fraction-digits"],1,rt),!He))return null;let at=null;return ie["max-fraction-digits"]&&(at=D.parse(ie["max-fraction-digits"],1,rt),!at)?null:new Cn(Z,pe,xe,He,at)}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 Xn{constructor(S){this.type=ir,this.sections=S}static parse(S,D){if(S.length<2)return D.error("Expected at least one argument.");let Z=S[1];if(!Array.isArray(Z)&&typeof Z=="object")return D.error("First argument must be an image or text section.");let ie=[],pe=!1;for(let xe=1;xe<=S.length-1;++xe){let He=S[xe];if(pe&&typeof He=="object"&&!Array.isArray(He)){pe=!1;let at=null;if(He["font-scale"]&&(at=D.parse(He["font-scale"],1,rt),!at))return null;let wt=null;if(He["text-font"]&&(wt=D.parse(He["text-font"],1,_e(je)),!wt))return null;let Ht=null;if(He["text-color"]&&(Ht=D.parse(He["text-color"],1,Je),!Ht))return null;let rr=ie[ie.length-1];rr.scale=at,rr.font=wt,rr.textColor=Ht}else{let at=D.parse(S[xe],1,Vt);if(!at)return null;let wt=at.type.kind;if(wt!=="string"&&wt!=="value"&&wt!=="null"&&wt!=="resolvedImage")return D.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");pe=!0,ie.push({content:at,scale:null,font:null,textColor:null})}}return new Xn(ie)}evaluate(S){return new zr(this.sections.map(D=>{let Z=D.content.evaluate(S);return Yr(Z)===Ot?new br("",Z,null,null,null):new br(Ni(Z),null,D.scale?D.scale.evaluate(S):null,D.font?D.font.evaluate(S).join(","):null,D.textColor?D.textColor.evaluate(S):null)}))}eachChild(S){for(let D of this.sections)S(D.content),D.scale&&S(D.scale),D.font&&S(D.font),D.textColor&&S(D.textColor)}outputDefined(){return!1}}class ts{constructor(S){this.type=Ot,this.input=S}static parse(S,D){if(S.length!==2)return D.error("Expected two arguments.");let Z=D.parse(S[1],1,je);return Z?new ts(Z):D.error("No image name provided.")}evaluate(S){let D=this.input.evaluate(S),Z=oi.fromString(D);return Z&&S.availableImages&&(Z.available=S.availableImages.indexOf(D)>-1),Z}eachChild(S){S(this.input)}outputDefined(){return!1}}class Ja{constructor(S){this.type=rt,this.input=S}static parse(S,D){if(S.length!==2)return D.error(`Expected 1 argument, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1);return Z?Z.type.kind!=="array"&&Z.type.kind!=="string"&&Z.type.kind!=="value"?D.error(`Expected argument of type string or array, but found ${Fe(Z.type)} instead.`):new Ja(Z):null}evaluate(S){let D=this.input.evaluate(S);if(typeof D=="string")return[...D].length;if(Array.isArray(D))return D.length;throw new ti(`Expected value to be of type string or array, but found ${Fe(Yr(D))} instead.`)}eachChild(S){S(this.input)}outputDefined(){return!1}}let to=8192;function Ri(I,S){let D=(180+I[0])/360,Z=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+I[1]*Math.PI/360)))/360,ie=Math.pow(2,S.z);return[Math.round(D*ie*to),Math.round(Z*ie*to)]}function an(I,S){let D=Math.pow(2,S.z);return[(ie=(I[0]/to+S.x)/D,360*ie-180),(Z=(I[1]/to+S.y)/D,360/Math.PI*Math.atan(Math.exp((180-360*Z)*Math.PI/180))-90)];var Z,ie}function cs(I,S){I[0]=Math.min(I[0],S[0]),I[1]=Math.min(I[1],S[1]),I[2]=Math.max(I[2],S[0]),I[3]=Math.max(I[3],S[1])}function pa(I,S){return!(I[0]<=S[0]||I[2]>=S[2]||I[1]<=S[1]||I[3]>=S[3])}function ln(I,S,D){let Z=I[0]-S[0],ie=I[1]-S[1],pe=I[0]-D[0],xe=I[1]-D[1];return Z*xe-pe*ie==0&&Z*pe<=0&&ie*xe<=0}function ka(I,S,D,Z){return(ie=[Z[0]-D[0],Z[1]-D[1]])[0]*(pe=[S[0]-I[0],S[1]-I[1]])[1]-ie[1]*pe[0]!=0&&!(!xa(I,S,D,Z)||!xa(D,Z,I,S));var ie,pe}function va(I,S,D){for(let Z of D)for(let ie=0;ie<Z.length-1;++ie)if(ka(I,S,Z[ie],Z[ie+1]))return!0;return!1}function bo(I,S,D=!1){let Z=!1;for(let He of S)for(let at=0;at<He.length-1;at++){if(ln(I,He[at],He[at+1]))return D;(pe=He[at])[1]>(ie=I)[1]!=(xe=He[at+1])[1]>ie[1]&&ie[0]<(xe[0]-pe[0])*(ie[1]-pe[1])/(xe[1]-pe[1])+pe[0]&&(Z=!Z)}var ie,pe,xe;return Z}function Co(I,S){for(let D of S)if(bo(I,D))return!0;return!1}function Fi(I,S){for(let D of I)if(!bo(D,S))return!1;for(let D=0;D<I.length-1;++D)if(va(I[D],I[D+1],S))return!1;return!0}function Yn(I,S){for(let D of S)if(Fi(I,D))return!0;return!1}function xa(I,S,D,Z){let ie=Z[0]-D[0],pe=Z[1]-D[1],xe=(I[0]-D[0])*pe-ie*(I[1]-D[1]),He=(S[0]-D[0])*pe-ie*(S[1]-D[1]);return xe>0&&He<0||xe<0&&He>0}function Qi(I,S,D){let Z=[];for(let ie=0;ie<I.length;ie++){let pe=[];for(let xe=0;xe<I[ie].length;xe++){let He=Ri(I[ie][xe],D);cs(S,He),pe.push(He)}Z.push(pe)}return Z}function Nn(I,S,D){let Z=[];for(let ie=0;ie<I.length;ie++){let pe=Qi(I[ie],S,D);Z.push(pe)}return Z}function Pn(I,S,D,Z){if(I[0]<D[0]||I[0]>D[2]){let ie=.5*Z,pe=I[0]-D[0]>ie?-Z:D[0]-I[0]>ie?Z:0;pe===0&&(pe=I[0]-D[2]>ie?-Z:D[2]-I[0]>ie?Z:0),I[0]+=pe}cs(S,I)}function qa(I,S,D,Z){let ie=Math.pow(2,Z.z)*to,pe=[Z.x*to,Z.y*to],xe=[];for(let He of I)for(let at of He){let wt=[at.x+pe[0],at.y+pe[1]];Pn(wt,S,D,ie),xe.push(wt)}return xe}function jo(I,S,D,Z){let ie=Math.pow(2,Z.z)*to,pe=[Z.x*to,Z.y*to],xe=[];for(let at of I){let wt=[];for(let Ht of at){let rr=[Ht.x+pe[0],Ht.y+pe[1]];cs(S,rr),wt.push(rr)}xe.push(wt)}if(S[2]-S[0]<=ie/2){(He=S)[0]=He[1]=1/0,He[2]=He[3]=-1/0;for(let at of xe)for(let wt of at)Pn(wt,S,D,ie)}var He;return xe}class Vo{constructor(S,D){this.type=tt,this.geojson=S,this.geometries=D}static parse(S,D){if(S.length!==2)return D.error(`'within' expression requires exactly one argument, but found ${S.length-1} instead.`);if(Pi(S[1])){let Z=S[1];if(Z.type==="FeatureCollection"){let ie=[];for(let pe of Z.features){let{type:xe,coordinates:He}=pe.geometry;xe==="Polygon"&&ie.push(He),xe==="MultiPolygon"&&ie.push(...He)}if(ie.length)return new Vo(Z,{type:"MultiPolygon",coordinates:ie})}else if(Z.type==="Feature"){let ie=Z.geometry.type;if(ie==="Polygon"||ie==="MultiPolygon")return new Vo(Z,Z.geometry)}else if(Z.type==="Polygon"||Z.type==="MultiPolygon")return new Vo(Z,Z)}return D.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(D,Z){let ie=[1/0,1/0,-1/0,-1/0],pe=[1/0,1/0,-1/0,-1/0],xe=D.canonicalID();if(Z.type==="Polygon"){let He=Qi(Z.coordinates,pe,xe),at=qa(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!bo(wt,He))return!1}if(Z.type==="MultiPolygon"){let He=Nn(Z.coordinates,pe,xe),at=qa(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!Co(wt,He))return!1}return!0}(S,this.geometries);if(S.geometryType()==="LineString")return function(D,Z){let ie=[1/0,1/0,-1/0,-1/0],pe=[1/0,1/0,-1/0,-1/0],xe=D.canonicalID();if(Z.type==="Polygon"){let He=Qi(Z.coordinates,pe,xe),at=jo(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!Fi(wt,He))return!1}if(Z.type==="MultiPolygon"){let He=Nn(Z.coordinates,pe,xe),at=jo(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!Yn(wt,He))return!1}return!0}(S,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Pa=class{constructor(I=[],S=(D,Z)=>D<Z?-1:D>Z?1:0){if(this.data=I,this.length=this.data.length,this.compare=S,this.length>0)for(let D=(this.length>>1)-1;D>=0;D--)this._down(D)}push(I){this.data.push(I),this._up(this.length++)}pop(){if(this.length===0)return;let I=this.data[0],S=this.data.pop();return--this.length>0&&(this.data[0]=S,this._down(0)),I}peek(){return this.data[0]}_up(I){let{data:S,compare:D}=this,Z=S[I];for(;I>0;){let ie=I-1>>1,pe=S[ie];if(D(Z,pe)>=0)break;S[I]=pe,I=ie}S[I]=Z}_down(I){let{data:S,compare:D}=this,Z=this.length>>1,ie=S[I];for(;I<Z;){let pe=1+(I<<1),xe=pe+1;if(xe<this.length&&D(S[xe],S[pe])<0&&(pe=xe),D(S[pe],ie)>=0)break;S[I]=S[pe],I=pe}S[I]=ie}};function Oa(I,S,D,Z,ie){co(I,S,D,Z||I.length-1,ie||_o)}function co(I,S,D,Z,ie){for(;Z>D;){if(Z-D>600){var pe=Z-D+1,xe=S-D+1,He=Math.log(pe),at=.5*Math.exp(2*He/3),wt=.5*Math.sqrt(He*at*(pe-at)/pe)*(xe-pe/2<0?-1:1);co(I,S,Math.max(D,Math.floor(S-xe*at/pe+wt)),Math.min(Z,Math.floor(S+(pe-xe)*at/pe+wt)),ie)}var Ht=I[S],rr=D,pr=Z;for(An(I,D,S),ie(I[Z],Ht)>0&&An(I,D,Z);rr<pr;){for(An(I,rr,pr),rr++,pr--;ie(I[rr],Ht)<0;)rr++;for(;ie(I[pr],Ht)>0;)pr--}ie(I[D],Ht)===0?An(I,D,pr):An(I,++pr,Z),pr<=S&&(D=pr+1),S<=pr&&(Z=pr-1)}}function An(I,S,D){var Z=I[S];I[S]=I[D],I[D]=Z}function _o(I,S){return I<S?-1:I>S?1:0}function ks(I,S){if(I.length<=1)return[I];let D=[],Z,ie;for(let pe of I){let xe=ps(pe);xe!==0&&(pe.area=Math.abs(xe),ie===void 0&&(ie=xe<0),ie===xe<0?(Z&&D.push(Z),Z=[pe]):Z.push(pe))}if(Z&&D.push(Z),S>1)for(let pe=0;pe<D.length;pe++)D[pe].length<=S||(Oa(D[pe],S,1,D[pe].length-1,bs),D[pe]=D[pe].slice(0,S));return D}function bs(I,S){return S.area-I.area}function ps(I){let S=0;for(let D,Z,ie=0,pe=I.length,xe=pe-1;ie<pe;xe=ie++)D=I[ie],Z=I[xe],S+=(Z.x-D.x)*(D.y+Z.y);return S}let sa=1/298.257223563,Bn=sa*(2-sa),ms=Math.PI/180;class ya{constructor(S){let D=6378.137*ms*1e3,Z=Math.cos(S*ms),ie=1/(1-Bn*(1-Z*Z)),pe=Math.sqrt(ie);this.kx=D*pe*Z,this.ky=D*pe*ie*(1-Bn)}distance(S,D){let Z=this.wrap(S[0]-D[0])*this.kx,ie=(S[1]-D[1])*this.ky;return Math.sqrt(Z*Z+ie*ie)}pointOnLine(S,D){let Z,ie,pe,xe,He=1/0;for(let at=0;at<S.length-1;at++){let wt=S[at][0],Ht=S[at][1],rr=this.wrap(S[at+1][0]-wt)*this.kx,pr=(S[at+1][1]-Ht)*this.ky,Ar=0;rr===0&&pr===0||(Ar=(this.wrap(D[0]-wt)*this.kx*rr+(D[1]-Ht)*this.ky*pr)/(rr*rr+pr*pr),Ar>1?(wt=S[at+1][0],Ht=S[at+1][1]):Ar>0&&(wt+=rr/this.kx*Ar,Ht+=pr/this.ky*Ar)),rr=this.wrap(D[0]-wt)*this.kx,pr=(D[1]-Ht)*this.ky;let Vr=rr*rr+pr*pr;Vr<He&&(He=Vr,Z=wt,ie=Ht,pe=at,xe=Ar)}return{point:[Z,ie],index:pe,t:Math.max(0,Math.min(1,xe))}}wrap(S){for(;S<-180;)S+=360;for(;S>180;)S-=360;return S}}function on(I,S){return S[0]-I[0]}function mn(I){return I[1]-I[0]+1}function Ga(I,S){return I[1]>=I[0]&&I[1]<S}function ca(I,S){if(I[0]>I[1])return[null,null];let D=mn(I);if(S){if(D===2)return[I,null];let ie=Math.floor(D/2);return[[I[0],I[0]+ie],[I[0]+ie,I[1]]]}if(D===1)return[I,null];let Z=Math.floor(D/2)-1;return[[I[0],I[0]+Z],[I[0]+Z+1,I[1]]]}function bn(I,S){if(!Ga(S,I.length))return[1/0,1/0,-1/0,-1/0];let D=[1/0,1/0,-1/0,-1/0];for(let Z=S[0];Z<=S[1];++Z)cs(D,I[Z]);return D}function Xi(I){let S=[1/0,1/0,-1/0,-1/0];for(let D of I)for(let Z of D)cs(S,Z);return S}function qn(I){return I[0]!==-1/0&&I[1]!==-1/0&&I[2]!==1/0&&I[3]!==1/0}function Ia(I,S,D){if(!qn(I)||!qn(S))return NaN;let Z=0,ie=0;return I[2]<S[0]&&(Z=S[0]-I[2]),I[0]>S[2]&&(Z=I[0]-S[2]),I[1]>S[3]&&(ie=I[1]-S[3]),I[3]<S[1]&&(ie=S[1]-I[3]),D.distance([0,0],[Z,ie])}function yn(I,S,D){let Z=D.pointOnLine(S,I);return D.distance(I,Z.point)}function Ya(I,S,D,Z,ie){let pe=Math.min(yn(I,[D,Z],ie),yn(S,[D,Z],ie)),xe=Math.min(yn(D,[I,S],ie),yn(Z,[I,S],ie));return Math.min(pe,xe)}function ba(I,S,D,Z,ie){if(!Ga(S,I.length)||!Ga(Z,D.length))return 1/0;let pe=1/0;for(let xe=S[0];xe<S[1];++xe){let He=I[xe],at=I[xe+1];for(let wt=Z[0];wt<Z[1];++wt){let Ht=D[wt],rr=D[wt+1];if(ka(He,at,Ht,rr))return 0;pe=Math.min(pe,Ya(He,at,Ht,rr,ie))}}return pe}function Da(I,S,D,Z,ie){if(!Ga(S,I.length)||!Ga(Z,D.length))return NaN;let pe=1/0;for(let xe=S[0];xe<=S[1];++xe)for(let He=Z[0];He<=Z[1];++He)if(pe=Math.min(pe,ie.distance(I[xe],D[He])),pe===0)return pe;return pe}function Aa(I,S,D){if(bo(I,S,!0))return 0;let Z=1/0;for(let ie of S){let pe=ie[0],xe=ie[ie.length-1];if(pe!==xe&&(Z=Math.min(Z,yn(I,[xe,pe],D)),Z===0))return Z;let He=D.pointOnLine(ie,I);if(Z=Math.min(Z,D.distance(I,He.point)),Z===0)return Z}return Z}function Ln(I,S,D,Z){if(!Ga(S,I.length))return NaN;for(let pe=S[0];pe<=S[1];++pe)if(bo(I[pe],D,!0))return 0;let ie=1/0;for(let pe=S[0];pe<S[1];++pe){let xe=I[pe],He=I[pe+1];for(let at of D)for(let wt=0,Ht=at.length,rr=Ht-1;wt<Ht;rr=wt++){let pr=at[rr],Ar=at[wt];if(ka(xe,He,pr,Ar))return 0;ie=Math.min(ie,Ya(xe,He,pr,Ar,Z))}}return ie}function wo(I,S){for(let D of I)for(let Z of D)if(bo(Z,S,!0))return!0;return!1}function wa(I,S,D,Z=1/0){let ie=Xi(I),pe=Xi(S);if(Z!==1/0&&Ia(ie,pe,D)>=Z)return Z;if(pa(ie,pe)){if(wo(I,S))return 0}else if(wo(S,I))return 0;let xe=1/0;for(let He of I)for(let at=0,wt=He.length,Ht=wt-1;at<wt;Ht=at++){let rr=He[Ht],pr=He[at];for(let Ar of S)for(let Vr=0,ri=Ar.length,Ii=ri-1;Vr<ri;Ii=Vr++){let Zi=Ar[Ii],da=Ar[Vr];if(ka(rr,pr,Zi,da))return 0;xe=Math.min(xe,Ya(rr,pr,Zi,da,D))}}return xe}function $i(I,S,D,Z,ie,pe){if(!pe)return;let xe=Ia(bn(Z,pe),ie,D);xe<S&&I.push([xe,pe,[0,0]])}function ea(I,S,D,Z,ie,pe,xe){if(!pe||!xe)return;let He=Ia(bn(Z,pe),bn(ie,xe),D);He<S&&I.push([He,pe,xe])}function Sa(I,S,D,Z,ie=1/0){let pe=Math.min(Z.distance(I[0],D[0][0]),ie);if(pe===0)return pe;let xe=new Pa([[0,[0,I.length-1],[0,0]]],on),He=Xi(D);for(;xe.length>0;){let at=xe.pop();if(at[0]>=pe)continue;let wt=at[1],Ht=S?50:100;if(mn(wt)<=Ht){if(!Ga(wt,I.length))return NaN;if(S){let rr=Ln(I,wt,D,Z);if(isNaN(rr)||rr===0)return rr;pe=Math.min(pe,rr)}else for(let rr=wt[0];rr<=wt[1];++rr){let pr=Aa(I[rr],D,Z);if(pe=Math.min(pe,pr),pe===0)return 0}}else{let rr=ca(wt,S);$i(xe,pe,Z,I,He,rr[0]),$i(xe,pe,Z,I,He,rr[1])}}return pe}function Za(I,S,D,Z,ie,pe=1/0){let xe=Math.min(pe,ie.distance(I[0],D[0]));if(xe===0)return xe;let He=new Pa([[0,[0,I.length-1],[0,D.length-1]]],on);for(;He.length>0;){let at=He.pop();if(at[0]>=xe)continue;let wt=at[1],Ht=at[2],rr=S?50:100,pr=Z?50:100;if(mn(wt)<=rr&&mn(Ht)<=pr){if(!Ga(wt,I.length)&&Ga(Ht,D.length))return NaN;let Ar;if(S&&Z)Ar=ba(I,wt,D,Ht,ie),xe=Math.min(xe,Ar);else if(S&&!Z){let Vr=I.slice(wt[0],wt[1]+1);for(let ri=Ht[0];ri<=Ht[1];++ri)if(Ar=yn(D[ri],Vr,ie),xe=Math.min(xe,Ar),xe===0)return xe}else if(!S&&Z){let Vr=D.slice(Ht[0],Ht[1]+1);for(let ri=wt[0];ri<=wt[1];++ri)if(Ar=yn(I[ri],Vr,ie),xe=Math.min(xe,Ar),xe===0)return xe}else Ar=Da(I,wt,D,Ht,ie),xe=Math.min(xe,Ar)}else{let Ar=ca(wt,S),Vr=ca(Ht,Z);ea(He,xe,ie,I,D,Ar[0],Vr[0]),ea(He,xe,ie,I,D,Ar[0],Vr[1]),ea(He,xe,ie,I,D,Ar[1],Vr[0]),ea(He,xe,ie,I,D,Ar[1],Vr[1])}}return xe}function xo(I){return I.type==="MultiPolygon"?I.coordinates.map(S=>({type:"Polygon",coordinates:S})):I.type==="MultiLineString"?I.coordinates.map(S=>({type:"LineString",coordinates:S})):I.type==="MultiPoint"?I.coordinates.map(S=>({type:"Point",coordinates:S})):[I]}class Wa{constructor(S,D){this.type=rt,this.geojson=S,this.geometries=D}static parse(S,D){if(S.length!==2)return D.error(`'distance' expression requires exactly one argument, but found ${S.length-1} instead.`);if(Pi(S[1])){let Z=S[1];if(Z.type==="FeatureCollection")return new Wa(Z,Z.features.map(ie=>xo(ie.geometry)).flat());if(Z.type==="Feature")return new Wa(Z,xo(Z.geometry));if("type"in Z&&"coordinates"in Z)return new Wa(Z,xo(Z))}return D.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(D,Z){let ie=D.geometry(),pe=ie.flat().map(at=>an([at.x,at.y],D.canonical));if(ie.length===0)return NaN;let xe=new ya(pe[0][1]),He=1/0;for(let at of Z){switch(at.type){case"Point":He=Math.min(He,Za(pe,!1,[at.coordinates],!1,xe,He));break;case"LineString":He=Math.min(He,Za(pe,!1,at.coordinates,!0,xe,He));break;case"Polygon":He=Math.min(He,Sa(pe,!1,at.coordinates,xe,He))}if(He===0)return He}return He}(S,this.geometries);if(S.geometryType()==="LineString")return function(D,Z){let ie=D.geometry(),pe=ie.flat().map(at=>an([at.x,at.y],D.canonical));if(ie.length===0)return NaN;let xe=new ya(pe[0][1]),He=1/0;for(let at of Z){switch(at.type){case"Point":He=Math.min(He,Za(pe,!0,[at.coordinates],!1,xe,He));break;case"LineString":He=Math.min(He,Za(pe,!0,at.coordinates,!0,xe,He));break;case"Polygon":He=Math.min(He,Sa(pe,!0,at.coordinates,xe,He))}if(He===0)return He}return He}(S,this.geometries);if(S.geometryType()==="Polygon")return function(D,Z){let ie=D.geometry();if(ie.length===0||ie[0].length===0)return NaN;let pe=ks(ie,0).map(at=>at.map(wt=>wt.map(Ht=>an([Ht.x,Ht.y],D.canonical)))),xe=new ya(pe[0][0][0][1]),He=1/0;for(let at of Z)for(let wt of pe){switch(at.type){case"Point":He=Math.min(He,Sa([at.coordinates],!1,wt,xe,He));break;case"LineString":He=Math.min(He,Sa(at.coordinates,!0,wt,xe,He));break;case"Polygon":He=Math.min(He,wa(wt,at.coordinates,xe,He))}if(He===0)return He}return He}(S,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let hn={"==":Zn,"!=":Wo,">":Bo,"<":Ba,">=":Ha,"<=":Ea,array:ji,at:Wt,boolean:ji,case:hi,coalesce:na,collator:tn,format:Xn,image:ts,in:tr,"index-of":or,interpolate:za,"interpolate-hcl":za,"interpolate-lab":za,length:Ja,let:Or,literal:Ur,match:Nr,number:ji,"number-format":Cn,object:ji,slice:Gi,step:Ui,string:ji,"to-boolean":zi,"to-color":zi,"to-number":zi,"to-string":zi,var:st,within:Vo,distance:Wa};class Un{constructor(S,D,Z,ie){this.name=S,this.type=D,this._evaluate=Z,this.args=ie}evaluate(S){return this._evaluate(S,this.args)}eachChild(S){this.args.forEach(S)}outputDefined(){return!1}static parse(S,D){let Z=S[0],ie=Un.definitions[Z];if(!ie)return D.error(`Unknown expression "${Z}". If you wanted a literal array, use ["literal", [...]].`,0);let pe=Array.isArray(ie)?ie[0]:ie.type,xe=Array.isArray(ie)?[[ie[1],ie[2]]]:ie.overloads,He=xe.filter(([wt])=>!Array.isArray(wt)||wt.length===S.length-1),at=null;for(let[wt,Ht]of He){at=new fi(D.registry,vo,D.path,null,D.scope);let rr=[],pr=!1;for(let Ar=1;Ar<S.length;Ar++){let Vr=S[Ar],ri=Array.isArray(wt)?wt[Ar-1]:wt.type,Ii=at.parse(Vr,1+rr.length,ri);if(!Ii){pr=!0;break}rr.push(Ii)}if(!pr)if(Array.isArray(wt)&&wt.length!==rr.length)at.error(`Expected ${wt.length} arguments, but found ${rr.length} instead.`);else{for(let Ar=0;Ar<rr.length;Ar++){let Vr=Array.isArray(wt)?wt[Ar]:wt.type,ri=rr[Ar];at.concat(Ar+1).checkSubtype(Vr,ri.type)}if(at.errors.length===0)return new Un(Z,pe,Ht,rr)}}if(He.length===1)D.errors.push(...at.errors);else{let wt=(He.length?He:xe).map(([rr])=>{return pr=rr,Array.isArray(pr)?`(${pr.map(Fe).join(", ")})`:`(${Fe(pr.type)}...)`;var pr}).join(" | "),Ht=[];for(let rr=1;rr<S.length;rr++){let pr=D.parse(S[rr],1+Ht.length);if(!pr)return null;Ht.push(Fe(pr.type))}D.error(`Expected arguments of type ${wt}, but found (${Ht.join(", ")}) instead.`)}return null}static register(S,D){Un.definitions=D;for(let Z in D)S[Z]=Un}}function Ss(I,[S,D,Z,ie]){S=S.evaluate(I),D=D.evaluate(I),Z=Z.evaluate(I);let pe=ie?ie.evaluate(I):1,xe=vi(S,D,Z,pe);if(xe)throw new ti(xe);return new Bt(S/255,D/255,Z/255,pe,!1)}function Kn(I,S){return I in S}function ns(I,S){let D=S[I];return D===void 0?null:D}function Jo(I){return{type:I}}function vo(I){if(I instanceof st)return vo(I.boundExpression);if(I instanceof Un&&I.name==="error"||I instanceof tn||I instanceof Vo||I instanceof Wa)return!1;let S=I instanceof zi||I instanceof ji,D=!0;return I.eachChild(Z=>{D=S?D&&vo(Z):D&&Z instanceof Ur}),!!D&&ma(I)&&To(I,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function ma(I){if(I instanceof Un&&(I.name==="get"&&I.args.length===1||I.name==="feature-state"||I.name==="has"&&I.args.length===1||I.name==="properties"||I.name==="geometry-type"||I.name==="id"||/^filter-/.test(I.name))||I instanceof Vo||I instanceof Wa)return!1;let S=!0;return I.eachChild(D=>{S&&!ma(D)&&(S=!1)}),S}function ja(I){if(I instanceof Un&&I.name==="feature-state")return!1;let S=!0;return I.eachChild(D=>{S&&!ja(D)&&(S=!1)}),S}function To(I,S){if(I instanceof Un&&S.indexOf(I.name)>=0)return!1;let D=!0;return I.eachChild(Z=>{D&&!To(Z,S)&&(D=!1)}),D}function Ao(I){return{result:"success",value:I}}function la(I){return{result:"error",value:I}}function Ki(I){return I["property-type"]==="data-driven"||I["property-type"]==="cross-faded-data-driven"}function ho(I){return!!I.expression&&I.expression.parameters.indexOf("zoom")>-1}function Ka(I){return!!I.expression&&I.expression.interpolated}function Ca(I){return I instanceof Number?"number":I instanceof String?"string":I instanceof Boolean?"boolean":Array.isArray(I)?"array":I===null?"null":typeof I}function ta(I){return typeof I=="object"&&I!==null&&!Array.isArray(I)}function En(I){return I}function Mo(I,S){let D=S.type==="color",Z=I.stops&&typeof I.stops[0][0]=="object",ie=Z||!(Z||I.property!==void 0),pe=I.type||(Ka(S)?"exponential":"interval");if(D||S.type==="padding"){let Ht=D?Bt.parse:Tr.parse;(I=Te({},I)).stops&&(I.stops=I.stops.map(rr=>[rr[0],Ht(rr[1])])),I.default=Ht(I.default?I.default:S.default)}if(I.colorSpace&&(xe=I.colorSpace)!=="rgb"&&xe!=="hcl"&&xe!=="lab")throw new Error(`Unknown color space: "${I.colorSpace}"`);var xe;let He,at,wt;if(pe==="exponential")He=Ks;else if(pe==="interval")He=vs;else if(pe==="categorical"){He=Ro,at=Object.create(null);for(let Ht of I.stops)at[Ht[0]]=Ht[1];wt=typeof I.stops[0][0]}else{if(pe!=="identity")throw new Error(`Unknown function type "${pe}"`);He=as}if(Z){let Ht={},rr=[];for(let Vr=0;Vr<I.stops.length;Vr++){let ri=I.stops[Vr],Ii=ri[0].zoom;Ht[Ii]===void 0&&(Ht[Ii]={zoom:Ii,type:I.type,property:I.property,default:I.default,stops:[]},rr.push(Ii)),Ht[Ii].stops.push([ri[0].value,ri[1]])}let pr=[];for(let Vr of rr)pr.push([Ht[Vr].zoom,Mo(Ht[Vr],S)]);let Ar={name:"linear"};return{kind:"composite",interpolationType:Ar,interpolationFactor:za.interpolationFactor.bind(void 0,Ar),zoomStops:pr.map(Vr=>Vr[0]),evaluate:({zoom:Vr},ri)=>Ks({stops:pr,base:I.base},S,Vr).evaluate(Vr,ri)}}if(ie){let Ht=pe==="exponential"?{name:"exponential",base:I.base!==void 0?I.base:1}:null;return{kind:"camera",interpolationType:Ht,interpolationFactor:za.interpolationFactor.bind(void 0,Ht),zoomStops:I.stops.map(rr=>rr[0]),evaluate:({zoom:rr})=>He(I,S,rr,at,wt)}}return{kind:"source",evaluate(Ht,rr){let pr=rr&&rr.properties?rr.properties[I.property]:void 0;return pr===void 0?Ds(I.default,S.default):He(I,S,pr,at,wt)}}}function Ds(I,S,D){return I!==void 0?I:S!==void 0?S:D!==void 0?D:void 0}function Ro(I,S,D,Z,ie){return Ds(typeof D===ie?Z[D]:void 0,I.default,S.default)}function vs(I,S,D){if(Ca(D)!=="number")return Ds(I.default,S.default);let Z=I.stops.length;if(Z===1||D<=I.stops[0][0])return I.stops[0][1];if(D>=I.stops[Z-1][0])return I.stops[Z-1][1];let ie=Qr(I.stops.map(pe=>pe[0]),D);return I.stops[ie][1]}function Ks(I,S,D){let Z=I.base!==void 0?I.base:1;if(Ca(D)!=="number")return Ds(I.default,S.default);let ie=I.stops.length;if(ie===1||D<=I.stops[0][0])return I.stops[0][1];if(D>=I.stops[ie-1][0])return I.stops[ie-1][1];let pe=Qr(I.stops.map(Ht=>Ht[0]),D),xe=function(Ht,rr,pr,Ar){let Vr=Ar-pr,ri=Ht-pr;return Vr===0?0:rr===1?ri/Vr:(Math.pow(rr,ri)-1)/(Math.pow(rr,Vr)-1)}(D,Z,I.stops[pe][0],I.stops[pe+1][0]),He=I.stops[pe][1],at=I.stops[pe+1][1],wt=ia[S.type]||En;return typeof He.evaluate=="function"?{evaluate(...Ht){let rr=He.evaluate.apply(void 0,Ht),pr=at.evaluate.apply(void 0,Ht);if(rr!==void 0&&pr!==void 0)return wt(rr,pr,xe,I.colorSpace)}}:wt(He,at,xe,I.colorSpace)}function as(I,S,D){switch(S.type){case"color":D=Bt.parse(D);break;case"formatted":D=zr.fromString(D.toString());break;case"resolvedImage":D=oi.fromString(D.toString());break;case"padding":D=Tr.parse(D);break;default:Ca(D)===S.type||S.type==="enum"&&S.values[D]||(D=void 0)}return Ds(D,I.default,S.default)}Un.register(hn,{error:[{kind:"error"},[je],(I,[S])=>{throw new ti(S.evaluate(I))}],typeof:[je,[Vt],(I,[S])=>Fe(Yr(S.evaluate(I)))],"to-rgba":[_e(rt,4),[Je],(I,[S])=>{let[D,Z,ie,pe]=S.evaluate(I).rgb;return[255*D,255*Z,255*ie,pe]}],rgb:[Je,[rt,rt,rt],Ss],rgba:[Je,[rt,rt,rt,rt],Ss],has:{type:tt,overloads:[[[je],(I,[S])=>Kn(S.evaluate(I),I.properties())],[[je,Mt],(I,[S,D])=>Kn(S.evaluate(I),D.evaluate(I))]]},get:{type:Vt,overloads:[[[je],(I,[S])=>ns(S.evaluate(I),I.properties())],[[je,Mt],(I,[S,D])=>ns(S.evaluate(I),D.evaluate(I))]]},"feature-state":[Vt,[je],(I,[S])=>ns(S.evaluate(I),I.featureState||{})],properties:[Mt,[],I=>I.properties()],"geometry-type":[je,[],I=>I.geometryType()],id:[Vt,[],I=>I.id()],zoom:[rt,[],I=>I.globals.zoom],"heatmap-density":[rt,[],I=>I.globals.heatmapDensity||0],"line-progress":[rt,[],I=>I.globals.lineProgress||0],accumulated:[Vt,[],I=>I.globals.accumulated===void 0?null:I.globals.accumulated],"+":[rt,Jo(rt),(I,S)=>{let D=0;for(let Z of S)D+=Z.evaluate(I);return D}],"*":[rt,Jo(rt),(I,S)=>{let D=1;for(let Z of S)D*=Z.evaluate(I);return D}],"-":{type:rt,overloads:[[[rt,rt],(I,[S,D])=>S.evaluate(I)-D.evaluate(I)],[[rt],(I,[S])=>-S.evaluate(I)]]},"/":[rt,[rt,rt],(I,[S,D])=>S.evaluate(I)/D.evaluate(I)],"%":[rt,[rt,rt],(I,[S,D])=>S.evaluate(I)%D.evaluate(I)],ln2:[rt,[],()=>Math.LN2],pi:[rt,[],()=>Math.PI],e:[rt,[],()=>Math.E],"^":[rt,[rt,rt],(I,[S,D])=>Math.pow(S.evaluate(I),D.evaluate(I))],sqrt:[rt,[rt],(I,[S])=>Math.sqrt(S.evaluate(I))],log10:[rt,[rt],(I,[S])=>Math.log(S.evaluate(I))/Math.LN10],ln:[rt,[rt],(I,[S])=>Math.log(S.evaluate(I))],log2:[rt,[rt],(I,[S])=>Math.log(S.evaluate(I))/Math.LN2],sin:[rt,[rt],(I,[S])=>Math.sin(S.evaluate(I))],cos:[rt,[rt],(I,[S])=>Math.cos(S.evaluate(I))],tan:[rt,[rt],(I,[S])=>Math.tan(S.evaluate(I))],asin:[rt,[rt],(I,[S])=>Math.asin(S.evaluate(I))],acos:[rt,[rt],(I,[S])=>Math.acos(S.evaluate(I))],atan:[rt,[rt],(I,[S])=>Math.atan(S.evaluate(I))],min:[rt,Jo(rt),(I,S)=>Math.min(...S.map(D=>D.evaluate(I)))],max:[rt,Jo(rt),(I,S)=>Math.max(...S.map(D=>D.evaluate(I)))],abs:[rt,[rt],(I,[S])=>Math.abs(S.evaluate(I))],round:[rt,[rt],(I,[S])=>{let D=S.evaluate(I);return D<0?-Math.round(-D):Math.round(D)}],floor:[rt,[rt],(I,[S])=>Math.floor(S.evaluate(I))],ceil:[rt,[rt],(I,[S])=>Math.ceil(S.evaluate(I))],"filter-==":[tt,[je,Vt],(I,[S,D])=>I.properties()[S.value]===D.value],"filter-id-==":[tt,[Vt],(I,[S])=>I.id()===S.value],"filter-type-==":[tt,[je],(I,[S])=>I.geometryType()===S.value],"filter-<":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z<ie}],"filter-id-<":[tt,[Vt],(I,[S])=>{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D<Z}],"filter->":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z>ie}],"filter-id->":[tt,[Vt],(I,[S])=>{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D>Z}],"filter-<=":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z<=ie}],"filter-id-<=":[tt,[Vt],(I,[S])=>{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D<=Z}],"filter->=":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z>=ie}],"filter-id->=":[tt,[Vt],(I,[S])=>{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D>=Z}],"filter-has":[tt,[Vt],(I,[S])=>S.value in I.properties()],"filter-has-id":[tt,[],I=>I.id()!==null&&I.id()!==void 0],"filter-type-in":[tt,[_e(je)],(I,[S])=>S.value.indexOf(I.geometryType())>=0],"filter-id-in":[tt,[_e(Vt)],(I,[S])=>S.value.indexOf(I.id())>=0],"filter-in-small":[tt,[je,_e(Vt)],(I,[S,D])=>D.value.indexOf(I.properties()[S.value])>=0],"filter-in-large":[tt,[je,_e(Vt)],(I,[S,D])=>function(Z,ie,pe,xe){for(;pe<=xe;){let He=pe+xe>>1;if(ie[He]===Z)return!0;ie[He]>Z?xe=He-1:pe=He+1}return!1}(I.properties()[S.value],D.value,0,D.value.length-1)],all:{type:tt,overloads:[[[tt,tt],(I,[S,D])=>S.evaluate(I)&&D.evaluate(I)],[Jo(tt),(I,S)=>{for(let D of S)if(!D.evaluate(I))return!1;return!0}]]},any:{type:tt,overloads:[[[tt,tt],(I,[S,D])=>S.evaluate(I)||D.evaluate(I)],[Jo(tt),(I,S)=>{for(let D of S)if(D.evaluate(I))return!0;return!1}]]},"!":[tt,[tt],(I,[S])=>!S.evaluate(I)],"is-supported-script":[tt,[je],(I,[S])=>{let D=I.globals&&I.globals.isSupportedScript;return!D||D(S.evaluate(I))}],upcase:[je,[je],(I,[S])=>S.evaluate(I).toUpperCase()],downcase:[je,[je],(I,[S])=>S.evaluate(I).toLowerCase()],concat:[je,Jo(Vt),(I,S)=>S.map(D=>Ni(D.evaluate(I))).join("")],"resolved-locale":[je,[Kt],(I,[S])=>S.evaluate(I).resolvedLocale()]});class Jn{constructor(S,D){var Z;this.expression=S,this._warningHistory={},this._evaluator=new sn,this._defaultValue=D?(Z=D).type==="color"&&ta(Z.default)?new Bt(0,0,0,0):Z.type==="color"?Bt.parse(Z.default)||null:Z.type==="padding"?Tr.parse(Z.default)||null:Z.type==="variableAnchorOffsetCollection"?Br.parse(Z.default)||null:Z.default===void 0?null:Z.default:null,this._enumValues=D&&D.type==="enum"?D.values:null}evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe){return this._evaluator.globals=S,this._evaluator.feature=D,this._evaluator.featureState=Z,this._evaluator.canonical=ie,this._evaluator.availableImages=pe||null,this._evaluator.formattedSection=xe,this.expression.evaluate(this._evaluator)}evaluate(S,D,Z,ie,pe,xe){this._evaluator.globals=S,this._evaluator.feature=D||null,this._evaluator.featureState=Z||null,this._evaluator.canonical=ie,this._evaluator.availableImages=pe||null,this._evaluator.formattedSection=xe||null;try{let He=this.expression.evaluate(this._evaluator);if(He==null||typeof He=="number"&&He!=He)return this._defaultValue;if(this._enumValues&&!(He in this._enumValues))throw new ti(`Expected value to be one of ${Object.keys(this._enumValues).map(at=>JSON.stringify(at)).join(", ")}, but found ${JSON.stringify(He)} instead.`);return He}catch(He){return this._warningHistory[He.message]||(this._warningHistory[He.message]=!0,typeof console!="undefined"&&console.warn(He.message)),this._defaultValue}}}function Cs(I){return Array.isArray(I)&&I.length>0&&typeof I[0]=="string"&&I[0]in hn}function Xa(I,S){let D=new fi(hn,vo,[],S?function(ie){let pe={color:Je,string:je,number:rt,enum:je,boolean:tt,formatted:ir,padding:fr,resolvedImage:Ot,variableAnchorOffsetCollection:De};return ie.type==="array"?_e(pe[ie.value]||Vt,ie.length):pe[ie.type]}(S):void 0),Z=D.parse(I,void 0,void 0,void 0,S&&S.type==="string"?{typeAnnotation:"coerce"}:void 0);return Z?Ao(new Jn(Z,S)):la(D.errors)}class Zo{constructor(S,D){this.kind=S,this._styleExpression=D,this.isStateDependent=S!=="constant"&&!ja(D.expression)}evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe){return this._styleExpression.evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe)}evaluate(S,D,Z,ie,pe,xe){return this._styleExpression.evaluate(S,D,Z,ie,pe,xe)}}class Eo{constructor(S,D,Z,ie){this.kind=S,this.zoomStops=Z,this._styleExpression=D,this.isStateDependent=S!=="camera"&&!ja(D.expression),this.interpolationType=ie}evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe){return this._styleExpression.evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe)}evaluate(S,D,Z,ie,pe,xe){return this._styleExpression.evaluate(S,D,Z,ie,pe,xe)}interpolationFactor(S,D,Z){return this.interpolationType?za.interpolationFactor(this.interpolationType,S,D,Z):0}}function lo(I,S){let D=Xa(I,S);if(D.result==="error")return D;let Z=D.value.expression,ie=ma(Z);if(!ie&&!Ki(S))return la([new nt("","data expressions not supported")]);let pe=To(Z,["zoom"]);if(!pe&&!ho(S))return la([new nt("","zoom expressions not supported")]);let xe=Xo(Z);return xe||pe?xe instanceof nt?la([xe]):xe instanceof za&&!Ka(S)?la([new nt("",'"interpolate" expressions cannot be used with this property')]):Ao(xe?new Eo(ie?"camera":"composite",D.value,xe.labels,xe instanceof za?xe.interpolation:void 0):new Zo(ie?"constant":"source",D.value)):la([new nt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class $a{constructor(S,D){this._parameters=S,this._specification=D,Te(this,Mo(this._parameters,this._specification))}static deserialize(S){return new $a(S._parameters,S._specification)}static serialize(S){return{_parameters:S._parameters,_specification:S._specification}}}function Xo(I){let S=null;if(I instanceof Or)S=Xo(I.result);else if(I instanceof na){for(let D of I.args)if(S=Xo(D),S)break}else(I instanceof Ui||I instanceof za)&&I.input instanceof Un&&I.input.name==="zoom"&&(S=I);return S instanceof nt||I.eachChild(D=>{let Z=Xo(D);Z instanceof nt?S=Z:!S&&Z?S=new nt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):S&&Z&&S!==Z&&(S=new nt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),S}function rs(I){if(I===!0||I===!1)return!0;if(!Array.isArray(I)||I.length===0)return!1;switch(I[0]){case"has":return I.length>=2&&I[1]!=="$id"&&I[1]!=="$type";case"in":return I.length>=3&&(typeof I[1]!="string"||Array.isArray(I[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return I.length!==3||Array.isArray(I[1])||Array.isArray(I[2]);case"any":case"all":for(let S of I.slice(1))if(!rs(S)&&typeof S!="boolean")return!1;return!0;default:return!0}}let $n={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Sn(I){if(I==null)return{filter:()=>!0,needGeometry:!1};rs(I)||(I=xs(I));let S=Xa(I,$n);if(S.result==="error")throw new Error(S.value.map(D=>`${D.key}: ${D.message}`).join(", "));return{filter:(D,Z,ie)=>S.value.evaluate(D,Z,{},ie),needGeometry:Rs(I)}}function uo(I,S){return I<S?-1:I>S?1:0}function Rs(I){if(!Array.isArray(I))return!1;if(I[0]==="within"||I[0]==="distance")return!0;for(let S=1;S<I.length;S++)if(Rs(I[S]))return!0;return!1}function xs(I){if(!I)return!0;let S=I[0];return I.length<=1?S!=="any":S==="=="?Go(I[1],I[2],"=="):S==="!="?Qn(Go(I[1],I[2],"==")):S==="<"||S===">"||S==="<="||S===">="?Go(I[1],I[2],S):S==="any"?(D=I.slice(1),["any"].concat(D.map(xs))):S==="all"?["all"].concat(I.slice(1).map(xs)):S==="none"?["all"].concat(I.slice(1).map(xs).map(Qn)):S==="in"?os(I[1],I.slice(2)):S==="!in"?Qn(os(I[1],I.slice(2))):S==="has"?So(I[1]):S!=="!has"||Qn(So(I[1]));var D}function Go(I,S,D){switch(I){case"$type":return[`filter-type-${D}`,S];case"$id":return[`filter-id-${D}`,S];default:return[`filter-${D}`,I,S]}}function os(I,S){if(S.length===0)return!1;switch(I){case"$type":return["filter-type-in",["literal",S]];case"$id":return["filter-id-in",["literal",S]];default:return S.length>200&&!S.some(D=>typeof D!=typeof S[0])?["filter-in-large",I,["literal",S.sort(uo)]]:["filter-in-small",I,["literal",S]]}}function So(I){switch(I){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",I]}}function Qn(I){return["!",I]}function zo(I){let S=typeof I;if(S==="number"||S==="boolean"||S==="string"||I==null)return JSON.stringify(I);if(Array.isArray(I)){let ie="[";for(let pe of I)ie+=`${zo(pe)},`;return`${ie}]`}let D=Object.keys(I).sort(),Z="{";for(let ie=0;ie<D.length;ie++)Z+=`${JSON.stringify(D[ie])}:${zo(I[D[ie]])},`;return`${Z}}`}function rl(I){let S="";for(let D of Ze)S+=`/${zo(I[D])}`;return S}function $o(I){let S=I.value;return S?[new At(I.key,S,"constants have been deprecated as of v8")]:[]}function Na(I){return I instanceof Number||I instanceof String||I instanceof Boolean?I.valueOf():I}function Ua(I){if(Array.isArray(I))return I.map(Ua);if(I instanceof Object&&!(I instanceof Number||I instanceof String||I instanceof Boolean)){let S={};for(let D in I)S[D]=Ua(I[D]);return S}return Na(I)}function Po(I){let S=I.key,D=I.value,Z=I.valueSpec||{},ie=I.objectElementValidators||{},pe=I.style,xe=I.styleSpec,He=I.validateSpec,at=[],wt=Ca(D);if(wt!=="object")return[new At(S,D,`object expected, ${wt} found`)];for(let Ht in D){let rr=Ht.split(".")[0],pr=Z[rr]||Z["*"],Ar;if(ie[rr])Ar=ie[rr];else if(Z[rr])Ar=He;else if(ie["*"])Ar=ie["*"];else{if(!Z["*"]){at.push(new At(S,D[Ht],`unknown property "${Ht}"`));continue}Ar=He}at=at.concat(Ar({key:(S&&`${S}.`)+Ht,value:D[Ht],valueSpec:pr,style:pe,styleSpec:xe,object:D,objectKey:Ht,validateSpec:He},D))}for(let Ht in Z)ie[Ht]||Z[Ht].required&&Z[Ht].default===void 0&&D[Ht]===void 0&&at.push(new At(S,D,`missing required property "${Ht}"`));return at}function fo(I){let S=I.value,D=I.valueSpec,Z=I.style,ie=I.styleSpec,pe=I.key,xe=I.arrayElementValidator||I.validateSpec;if(Ca(S)!=="array")return[new At(pe,S,`array expected, ${Ca(S)} found`)];if(D.length&&S.length!==D.length)return[new At(pe,S,`array length ${D.length} expected, length ${S.length} found`)];if(D["min-length"]&&S.length<D["min-length"])return[new At(pe,S,`array length at least ${D["min-length"]} expected, length ${S.length} found`)];let He={type:D.value,values:D.values};ie.$version<7&&(He.function=D.function),Ca(D.value)==="object"&&(He=D.value);let at=[];for(let wt=0;wt<S.length;wt++)at=at.concat(xe({array:S,arrayIndex:wt,value:S[wt],valueSpec:He,validateSpec:I.validateSpec,style:Z,styleSpec:ie,key:`${pe}[${wt}]`}));return at}function ro(I){let S=I.key,D=I.value,Z=I.valueSpec,ie=Ca(D);return ie==="number"&&D!=D&&(ie="NaN"),ie!=="number"?[new At(S,D,`number expected, ${ie} found`)]:"minimum"in Z&&D<Z.minimum?[new At(S,D,`${D} is less than the minimum value ${Z.minimum}`)]:"maximum"in Z&&D>Z.maximum?[new At(S,D,`${D} is greater than the maximum value ${Z.maximum}`)]:[]}function Ma(I){let S=I.valueSpec,D=Na(I.value.type),Z,ie,pe,xe={},He=D!=="categorical"&&I.value.property===void 0,at=!He,wt=Ca(I.value.stops)==="array"&&Ca(I.value.stops[0])==="array"&&Ca(I.value.stops[0][0])==="object",Ht=Po({key:I.key,value:I.value,valueSpec:I.styleSpec.function,validateSpec:I.validateSpec,style:I.style,styleSpec:I.styleSpec,objectElementValidators:{stops:function(Ar){if(D==="identity")return[new At(Ar.key,Ar.value,'identity function may not have a "stops" property')];let Vr=[],ri=Ar.value;return Vr=Vr.concat(fo({key:Ar.key,value:ri,valueSpec:Ar.valueSpec,validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec,arrayElementValidator:rr})),Ca(ri)==="array"&&ri.length===0&&Vr.push(new At(Ar.key,ri,"array must have at least one stop")),Vr},default:function(Ar){return Ar.validateSpec({key:Ar.key,value:Ar.value,valueSpec:S,validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec})}}});return D==="identity"&&He&&Ht.push(new At(I.key,I.value,'missing required property "property"')),D==="identity"||I.value.stops||Ht.push(new At(I.key,I.value,'missing required property "stops"')),D==="exponential"&&I.valueSpec.expression&&!Ka(I.valueSpec)&&Ht.push(new At(I.key,I.value,"exponential functions not supported")),I.styleSpec.$version>=8&&(at&&!Ki(I.valueSpec)?Ht.push(new At(I.key,I.value,"property functions not supported")):He&&!ho(I.valueSpec)&&Ht.push(new At(I.key,I.value,"zoom functions not supported"))),D!=="categorical"&&!wt||I.value.property!==void 0||Ht.push(new At(I.key,I.value,'"property" property is required')),Ht;function rr(Ar){let Vr=[],ri=Ar.value,Ii=Ar.key;if(Ca(ri)!=="array")return[new At(Ii,ri,`array expected, ${Ca(ri)} found`)];if(ri.length!==2)return[new At(Ii,ri,`array length 2 expected, length ${ri.length} found`)];if(wt){if(Ca(ri[0])!=="object")return[new At(Ii,ri,`object expected, ${Ca(ri[0])} found`)];if(ri[0].zoom===void 0)return[new At(Ii,ri,"object stop key must have zoom")];if(ri[0].value===void 0)return[new At(Ii,ri,"object stop key must have value")];if(pe&&pe>Na(ri[0].zoom))return[new At(Ii,ri[0].zoom,"stop zoom values must appear in ascending order")];Na(ri[0].zoom)!==pe&&(pe=Na(ri[0].zoom),ie=void 0,xe={}),Vr=Vr.concat(Po({key:`${Ii}[0]`,value:ri[0],valueSpec:{zoom:{}},validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec,objectElementValidators:{zoom:ro,value:pr}}))}else Vr=Vr.concat(pr({key:`${Ii}[0]`,value:ri[0],valueSpec:{},validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec},ri));return Cs(Ua(ri[1]))?Vr.concat([new At(`${Ii}[1]`,ri[1],"expressions are not allowed in function stops.")]):Vr.concat(Ar.validateSpec({key:`${Ii}[1]`,value:ri[1],valueSpec:S,validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec}))}function pr(Ar,Vr){let ri=Ca(Ar.value),Ii=Na(Ar.value),Zi=Ar.value!==null?Ar.value:Vr;if(Z){if(ri!==Z)return[new At(Ar.key,Zi,`${ri} stop domain type must match previous stop domain type ${Z}`)]}else Z=ri;if(ri!=="number"&&ri!=="string"&&ri!=="boolean")return[new At(Ar.key,Zi,"stop domain value must be a number, string, or boolean")];if(ri!=="number"&&D!=="categorical"){let da=`number expected, ${ri} found`;return Ki(S)&&D===void 0&&(da+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new At(Ar.key,Zi,da)]}return D!=="categorical"||ri!=="number"||isFinite(Ii)&&Math.floor(Ii)===Ii?D!=="categorical"&&ri==="number"&&ie!==void 0&&Ii<ie?[new At(Ar.key,Zi,"stop domain values must appear in ascending order")]:(ie=Ii,D==="categorical"&&Ii in xe?[new At(Ar.key,Zi,"stop domain values must be unique")]:(xe[Ii]=!0,[])):[new At(Ar.key,Zi,`integer expected, found ${Ii}`)]}}function io(I){let S=(I.expressionContext==="property"?lo:Xa)(Ua(I.value),I.valueSpec);if(S.result==="error")return S.value.map(Z=>new At(`${I.key}${Z.key}`,I.value,Z.message));let D=S.value.expression||S.value._styleExpression.expression;if(I.expressionContext==="property"&&I.propertyKey==="text-font"&&!D.outputDefined())return[new At(I.key,I.value,`Invalid data expression for "${I.propertyKey}". Output values must be contained as literals within the expression.`)];if(I.expressionContext==="property"&&I.propertyType==="layout"&&!ja(D))return[new At(I.key,I.value,'"feature-state" data expressions are not supported with layout properties.')];if(I.expressionContext==="filter"&&!ja(D))return[new At(I.key,I.value,'"feature-state" data expressions are not supported with filters.')];if(I.expressionContext&&I.expressionContext.indexOf("cluster")===0){if(!To(D,["zoom","feature-state"]))return[new At(I.key,I.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(I.expressionContext==="cluster-initial"&&!ma(D))return[new At(I.key,I.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function aa(I){let S=I.key,D=I.value,Z=I.valueSpec,ie=[];return Array.isArray(Z.values)?Z.values.indexOf(Na(D))===-1&&ie.push(new At(S,D,`expected one of [${Z.values.join(", ")}], ${JSON.stringify(D)} found`)):Object.keys(Z.values).indexOf(Na(D))===-1&&ie.push(new At(S,D,`expected one of [${Object.keys(Z.values).join(", ")}], ${JSON.stringify(D)} found`)),ie}function Oo(I){return rs(Ua(I.value))?io(Te({},I,{expressionContext:"filter",valueSpec:{value:"boolean"}})):No(I)}function No(I){let S=I.value,D=I.key;if(Ca(S)!=="array")return[new At(D,S,`array expected, ${Ca(S)} found`)];let Z=I.styleSpec,ie,pe=[];if(S.length<1)return[new At(D,S,"filter array must have at least 1 element")];switch(pe=pe.concat(aa({key:`${D}[0]`,value:S[0],valueSpec:Z.filter_operator,style:I.style,styleSpec:I.styleSpec})),Na(S[0])){case"<":case"<=":case">":case">=":S.length>=2&&Na(S[1])==="$type"&&pe.push(new At(D,S,`"$type" cannot be use with operator "${S[0]}"`));case"==":case"!=":S.length!==3&&pe.push(new At(D,S,`filter array for operator "${S[0]}" must have 3 elements`));case"in":case"!in":S.length>=2&&(ie=Ca(S[1]),ie!=="string"&&pe.push(new At(`${D}[1]`,S[1],`string expected, ${ie} found`)));for(let xe=2;xe<S.length;xe++)ie=Ca(S[xe]),Na(S[1])==="$type"?pe=pe.concat(aa({key:`${D}[${xe}]`,value:S[xe],valueSpec:Z.geometry_type,style:I.style,styleSpec:I.styleSpec})):ie!=="string"&&ie!=="number"&&ie!=="boolean"&&pe.push(new At(`${D}[${xe}]`,S[xe],`string, number, or boolean expected, ${ie} found`));break;case"any":case"all":case"none":for(let xe=1;xe<S.length;xe++)pe=pe.concat(No({key:`${D}[${xe}]`,value:S[xe],style:I.style,styleSpec:I.styleSpec}));break;case"has":case"!has":ie=Ca(S[1]),S.length!==2?pe.push(new At(D,S,`filter array for "${S[0]}" operator must have 2 elements`)):ie!=="string"&&pe.push(new At(`${D}[1]`,S[1],`string expected, ${ie} found`))}return pe}function Zs(I,S){let D=I.key,Z=I.validateSpec,ie=I.style,pe=I.styleSpec,xe=I.value,He=I.objectKey,at=pe[`${S}_${I.layerType}`];if(!at)return[];let wt=He.match(/^(.*)-transition$/);if(S==="paint"&&wt&&at[wt[1]]&&at[wt[1]].transition)return Z({key:D,value:xe,valueSpec:pe.transition,style:ie,styleSpec:pe});let Ht=I.valueSpec||at[He];if(!Ht)return[new At(D,xe,`unknown property "${He}"`)];let rr;if(Ca(xe)==="string"&&Ki(Ht)&&!Ht.tokens&&(rr=/^{([^}]+)}$/.exec(xe)))return[new At(D,xe,`"${He}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(rr[1])} }\`.`)];let pr=[];return I.layerType==="symbol"&&(He==="text-field"&&ie&&!ie.glyphs&&pr.push(new At(D,xe,'use of "text-field" requires a style "glyphs" property')),He==="text-font"&&ta(Ua(xe))&&Na(xe.type)==="identity"&&pr.push(new At(D,xe,'"text-font" does not support identity functions'))),pr.concat(Z({key:I.key,value:xe,valueSpec:Ht,style:ie,styleSpec:pe,expressionContext:"property",propertyType:S,propertyKey:He}))}function Fs(I){return Zs(I,"paint")}function ws(I){return Zs(I,"layout")}function no(I){let S=[],D=I.value,Z=I.key,ie=I.style,pe=I.styleSpec;D.type||D.ref||S.push(new At(Z,D,'either "type" or "ref" is required'));let xe=Na(D.type),He=Na(D.ref);if(D.id){let at=Na(D.id);for(let wt=0;wt<I.arrayIndex;wt++){let Ht=ie.layers[wt];Na(Ht.id)===at&&S.push(new At(Z,D.id,`duplicate layer id "${D.id}", previously used at line ${Ht.id.__line__}`))}}if("ref"in D){let at;["type","source","source-layer","filter","layout"].forEach(wt=>{wt in D&&S.push(new At(Z,D[wt],`"${wt}" is prohibited for ref layers`))}),ie.layers.forEach(wt=>{Na(wt.id)===He&&(at=wt)}),at?at.ref?S.push(new At(Z,D.ref,"ref cannot reference another ref layer")):xe=Na(at.type):S.push(new At(Z,D.ref,`ref layer "${He}" not found`))}else if(xe!=="background")if(D.source){let at=ie.sources&&ie.sources[D.source],wt=at&&Na(at.type);at?wt==="vector"&&xe==="raster"?S.push(new At(Z,D.source,`layer "${D.id}" requires a raster source`)):wt!=="raster-dem"&&xe==="hillshade"?S.push(new At(Z,D.source,`layer "${D.id}" requires a raster-dem source`)):wt==="raster"&&xe!=="raster"?S.push(new At(Z,D.source,`layer "${D.id}" requires a vector source`)):wt!=="vector"||D["source-layer"]?wt==="raster-dem"&&xe!=="hillshade"?S.push(new At(Z,D.source,"raster-dem source can only be used with layer type 'hillshade'.")):xe!=="line"||!D.paint||!D.paint["line-gradient"]||wt==="geojson"&&at.lineMetrics||S.push(new At(Z,D,`layer "${D.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):S.push(new At(Z,D,`layer "${D.id}" must specify a "source-layer"`)):S.push(new At(Z,D.source,`source "${D.source}" not found`))}else S.push(new At(Z,D,'missing required property "source"'));return S=S.concat(Po({key:Z,value:D,valueSpec:pe.layer,style:I.style,styleSpec:I.styleSpec,validateSpec:I.validateSpec,objectElementValidators:{"*":()=>[],type:()=>I.validateSpec({key:`${Z}.type`,value:D.type,valueSpec:pe.layer.type,style:I.style,styleSpec:I.styleSpec,validateSpec:I.validateSpec,object:D,objectKey:"type"}),filter:Oo,layout:at=>Po({layer:D,key:at.key,value:at.value,style:at.style,styleSpec:at.styleSpec,validateSpec:at.validateSpec,objectElementValidators:{"*":wt=>ws(Te({layerType:xe},wt))}}),paint:at=>Po({layer:D,key:at.key,value:at.value,style:at.style,styleSpec:at.styleSpec,validateSpec:at.validateSpec,objectElementValidators:{"*":wt=>Fs(Te({layerType:xe},wt))}})}})),S}function Ls(I){let S=I.value,D=I.key,Z=Ca(S);return Z!=="string"?[new At(D,S,`string expected, ${Z} found`)]:[]}let ds={promoteId:function({key:I,value:S}){if(Ca(S)==="string")return Ls({key:I,value:S});{let D=[];for(let Z in S)D.push(...Ls({key:`${I}.${Z}`,value:S[Z]}));return D}}};function Xs(I){let S=I.value,D=I.key,Z=I.styleSpec,ie=I.style,pe=I.validateSpec;if(!S.type)return[new At(D,S,'"type" is required')];let xe=Na(S.type),He;switch(xe){case"vector":case"raster":return He=Po({key:D,value:S,valueSpec:Z[`source_${xe.replace("-","_")}`],style:I.style,styleSpec:Z,objectElementValidators:ds,validateSpec:pe}),He;case"raster-dem":return He=function(at){var wt;let Ht=(wt=at.sourceName)!==null&&wt!==void 0?wt:"",rr=at.value,pr=at.styleSpec,Ar=pr.source_raster_dem,Vr=at.style,ri=[],Ii=Ca(rr);if(rr===void 0)return ri;if(Ii!=="object")return ri.push(new At("source_raster_dem",rr,`object expected, ${Ii} found`)),ri;let Zi=Na(rr.encoding)==="custom",da=["redFactor","greenFactor","blueFactor","baseShift"],cn=at.value.encoding?`"${at.value.encoding}"`:"Default";for(let jn in rr)!Zi&&da.includes(jn)?ri.push(new At(jn,rr[jn],`In "${Ht}": "${jn}" is only valid when "encoding" is set to "custom". ${cn} encoding found`)):Ar[jn]?ri=ri.concat(at.validateSpec({key:jn,value:rr[jn],valueSpec:Ar[jn],validateSpec:at.validateSpec,style:Vr,styleSpec:pr})):ri.push(new At(jn,rr[jn],`unknown property "${jn}"`));return ri}({sourceName:D,value:S,style:I.style,styleSpec:Z,validateSpec:pe}),He;case"geojson":if(He=Po({key:D,value:S,valueSpec:Z.source_geojson,style:ie,styleSpec:Z,validateSpec:pe,objectElementValidators:ds}),S.cluster)for(let at in S.clusterProperties){let[wt,Ht]=S.clusterProperties[at],rr=typeof wt=="string"?[wt,["accumulated"],["get",at]]:wt;He.push(...io({key:`${D}.${at}.map`,value:Ht,validateSpec:pe,expressionContext:"cluster-map"})),He.push(...io({key:`${D}.${at}.reduce`,value:rr,validateSpec:pe,expressionContext:"cluster-reduce"}))}return He;case"video":return Po({key:D,value:S,valueSpec:Z.source_video,style:ie,validateSpec:pe,styleSpec:Z});case"image":return Po({key:D,value:S,valueSpec:Z.source_image,style:ie,validateSpec:pe,styleSpec:Z});case"canvas":return[new At(D,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return aa({key:`${D}.type`,value:S.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:ie,validateSpec:pe,styleSpec:Z})}}function oa(I){let S=I.value,D=I.styleSpec,Z=D.light,ie=I.style,pe=[],xe=Ca(S);if(S===void 0)return pe;if(xe!=="object")return pe=pe.concat([new At("light",S,`object expected, ${xe} found`)]),pe;for(let He in S){let at=He.match(/^(.*)-transition$/);pe=pe.concat(at&&Z[at[1]]&&Z[at[1]].transition?I.validateSpec({key:He,value:S[He],valueSpec:D.transition,validateSpec:I.validateSpec,style:ie,styleSpec:D}):Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],validateSpec:I.validateSpec,style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)])}return pe}function Yo(I){let S=I.value,D=I.styleSpec,Z=D.sky,ie=I.style,pe=Ca(S);if(S===void 0)return[];if(pe!=="object")return[new At("sky",S,`object expected, ${pe} found`)];let xe=[];for(let He in S)xe=xe.concat(Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)]);return xe}function po(I){let S=I.value,D=I.styleSpec,Z=D.terrain,ie=I.style,pe=[],xe=Ca(S);if(S===void 0)return pe;if(xe!=="object")return pe=pe.concat([new At("terrain",S,`object expected, ${xe} found`)]),pe;for(let He in S)pe=pe.concat(Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],validateSpec:I.validateSpec,style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)]);return pe}function ss(I){let S=[],D=I.value,Z=I.key;if(Array.isArray(D)){let ie=[],pe=[];for(let xe in D)D[xe].id&&ie.includes(D[xe].id)&&S.push(new At(Z,D,`all the sprites' ids must be unique, but ${D[xe].id} is duplicated`)),ie.push(D[xe].id),D[xe].url&&pe.includes(D[xe].url)&&S.push(new At(Z,D,`all the sprites' URLs must be unique, but ${D[xe].url} is duplicated`)),pe.push(D[xe].url),S=S.concat(Po({key:`${Z}[${xe}]`,value:D[xe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:I.validateSpec}));return S}return Ls({key:Z,value:D})}let ls={"*":()=>[],array:fo,boolean:function(I){let S=I.value,D=I.key,Z=Ca(S);return Z!=="boolean"?[new At(D,S,`boolean expected, ${Z} found`)]:[]},number:ro,color:function(I){let S=I.key,D=I.value,Z=Ca(D);return Z!=="string"?[new At(S,D,`color expected, ${Z} found`)]:Bt.parse(String(D))?[]:[new At(S,D,`color expected, "${D}" found`)]},constants:$o,enum:aa,filter:Oo,function:Ma,layer:no,object:Po,source:Xs,light:oa,sky:Yo,terrain:po,projection:function(I){let S=I.value,D=I.styleSpec,Z=D.projection,ie=I.style,pe=Ca(S);if(S===void 0)return[];if(pe!=="object")return[new At("projection",S,`object expected, ${pe} found`)];let xe=[];for(let He in S)xe=xe.concat(Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)]);return xe},string:Ls,formatted:function(I){return Ls(I).length===0?[]:io(I)},resolvedImage:function(I){return Ls(I).length===0?[]:io(I)},padding:function(I){let S=I.key,D=I.value;if(Ca(D)==="array"){if(D.length<1||D.length>4)return[new At(S,D,`padding requires 1 to 4 values; ${D.length} values found`)];let Z={type:"number"},ie=[];for(let pe=0;pe<D.length;pe++)ie=ie.concat(I.validateSpec({key:`${S}[${pe}]`,value:D[pe],validateSpec:I.validateSpec,valueSpec:Z}));return ie}return ro({key:S,value:D,valueSpec:{}})},variableAnchorOffsetCollection:function(I){let S=I.key,D=I.value,Z=Ca(D),ie=I.styleSpec;if(Z!=="array"||D.length<1||D.length%2!=0)return[new At(S,D,"variableAnchorOffsetCollection requires a non-empty array of even length")];let pe=[];for(let xe=0;xe<D.length;xe+=2)pe=pe.concat(aa({key:`${S}[${xe}]`,value:D[xe],valueSpec:ie.layout_symbol["text-anchor"]})),pe=pe.concat(fo({key:`${S}[${xe+1}]`,value:D[xe+1],valueSpec:{length:2,value:"number"},validateSpec:I.validateSpec,style:I.style,styleSpec:ie}));return pe},sprite:ss};function gs(I){let S=I.value,D=I.valueSpec,Z=I.styleSpec;return I.validateSpec=gs,D.expression&&ta(Na(S))?Ma(I):D.expression&&Cs(Ua(S))?io(I):D.type&&ls[D.type]?ls[D.type](I):Po(Te({},I,{valueSpec:D.type?Z[D.type]:D}))}function bt(I){let S=I.value,D=I.key,Z=Ls(I);return Z.length||(S.indexOf("{fontstack}")===-1&&Z.push(new At(D,S,'"glyphs" url must include a "{fontstack}" token')),S.indexOf("{range}")===-1&&Z.push(new At(D,S,'"glyphs" url must include a "{range}" token'))),Z}function Ft(I,S=fe){let D=[];return D=D.concat(gs({key:"",value:I,valueSpec:S.$root,styleSpec:S,style:I,validateSpec:gs,objectElementValidators:{glyphs:bt,"*":()=>[]}})),I.constants&&(D=D.concat($o({key:"constants",value:I.constants,style:I,styleSpec:S,validateSpec:gs}))),nr(D)}function hr(I){return function(S){return I(lee(see({},S),{validateSpec:gs}))}}function nr(I){return[].concat(I).sort((S,D)=>S.line-D.line)}function Sr(I){return function(...S){return nr(I.apply(this,S))}}Ft.source=Sr(hr(Xs)),Ft.sprite=Sr(hr(ss)),Ft.glyphs=Sr(hr(bt)),Ft.light=Sr(hr(oa)),Ft.sky=Sr(hr(Yo)),Ft.terrain=Sr(hr(po)),Ft.layer=Sr(hr(no)),Ft.filter=Sr(hr(Oo)),Ft.paintProperty=Sr(hr(Fs)),Ft.layoutProperty=Sr(hr(ws));let li=Ft,di=li.light,mi=li.sky,Oi=li.paintProperty,dn=li.layoutProperty;function wi(I,S){let D=!1;if(S&&S.length)for(let Z of S)I.fire(new me(new Error(Z.message))),D=!0;return D}class ui{constructor(S,D,Z){let ie=this.cells=[];if(S instanceof ArrayBuffer){this.arrayBuffer=S;let xe=new Int32Array(this.arrayBuffer);S=xe[0],this.d=(D=xe[1])+2*(Z=xe[2]);for(let at=0;at<this.d*this.d;at++){let wt=xe[3+at],Ht=xe[3+at+1];ie.push(wt===Ht?null:xe.subarray(wt,Ht))}let He=xe[3+ie.length+1];this.keys=xe.subarray(xe[3+ie.length],He),this.bboxes=xe.subarray(He),this.insert=this._insertReadonly}else{this.d=D+2*Z;for(let xe=0;xe<this.d*this.d;xe++)ie.push([]);this.keys=[],this.bboxes=[]}this.n=D,this.extent=S,this.padding=Z,this.scale=D/S,this.uid=0;let pe=Z/D*S;this.min=-pe,this.max=S+pe}insert(S,D,Z,ie,pe){this._forEachCell(D,Z,ie,pe,this._insertCell,this.uid++,void 0,void 0),this.keys.push(S),this.bboxes.push(D),this.bboxes.push(Z),this.bboxes.push(ie),this.bboxes.push(pe)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(S,D,Z,ie,pe,xe){this.cells[pe].push(xe)}query(S,D,Z,ie,pe){let xe=this.min,He=this.max;if(S<=xe&&D<=xe&&He<=Z&&He<=ie&&!pe)return Array.prototype.slice.call(this.keys);{let at=[];return this._forEachCell(S,D,Z,ie,this._queryCell,at,{},pe),at}}_queryCell(S,D,Z,ie,pe,xe,He,at){let wt=this.cells[pe];if(wt!==null){let Ht=this.keys,rr=this.bboxes;for(let pr=0;pr<wt.length;pr++){let Ar=wt[pr];if(He[Ar]===void 0){let Vr=4*Ar;(at?at(rr[Vr+0],rr[Vr+1],rr[Vr+2],rr[Vr+3]):S<=rr[Vr+2]&&D<=rr[Vr+3]&&Z>=rr[Vr+0]&&ie>=rr[Vr+1])?(He[Ar]=!0,xe.push(Ht[Ar])):He[Ar]=!1}}}}_forEachCell(S,D,Z,ie,pe,xe,He,at){let wt=this._convertToCellCoord(S),Ht=this._convertToCellCoord(D),rr=this._convertToCellCoord(Z),pr=this._convertToCellCoord(ie);for(let Ar=wt;Ar<=rr;Ar++)for(let Vr=Ht;Vr<=pr;Vr++){let ri=this.d*Vr+Ar;if((!at||at(this._convertFromCellCoord(Ar),this._convertFromCellCoord(Vr),this._convertFromCellCoord(Ar+1),this._convertFromCellCoord(Vr+1)))&&pe.call(this,S,D,Z,ie,ri,xe,He,at))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,D=3+this.cells.length+1+1,Z=0;for(let xe=0;xe<this.cells.length;xe++)Z+=this.cells[xe].length;let ie=new Int32Array(D+Z+this.keys.length+this.bboxes.length);ie[0]=this.extent,ie[1]=this.n,ie[2]=this.padding;let pe=D;for(let xe=0;xe<S.length;xe++){let He=S[xe];ie[3+xe]=pe,ie.set(He,pe),pe+=He.length}return ie[3+S.length]=pe,ie.set(this.keys,pe),pe+=this.keys.length,ie[3+S.length+1]=pe,ie.set(this.bboxes,pe),pe+=this.bboxes.length,ie.buffer}static serialize(S,D){let Z=S.toArrayBuffer();return D&&D.push(Z),{buffer:Z}}static deserialize(S){return new ui(S.buffer)}}let Ai={};function gi(I,S,D={}){if(Ai[I])throw new Error(`${I} is already registered.`);Object.defineProperty(S,"_classRegistryKey",{value:I,writeable:!1}),Ai[I]={klass:S,omit:D.omit||[],shallow:D.shallow||[]}}gi("Object",Object),gi("TransferableGridIndex",ui),gi("Color",Bt),gi("Error",Error),gi("AJAXError",he),gi("ResolvedImage",oi),gi("StylePropertyFunction",$a),gi("StyleExpression",Jn,{omit:["_evaluator"]}),gi("ZoomDependentExpression",Eo),gi("ZoomConstantExpression",Zo),gi("CompoundExpression",Un,{omit:["_evaluate"]});for(let I in hn)hn[I]._classRegistryKey||gi(`Expression_${I}`,hn[I]);function gn(I){return I&&typeof ArrayBuffer!="undefined"&&(I instanceof ArrayBuffer||I.constructor&&I.constructor.name==="ArrayBuffer")}function In(I){return I.$name||I.constructor._classRegistryKey}function Vn(I){return!function(S){if(S===null||typeof S!="object")return!1;let D=In(S);return!(!D||D==="Object")}(I)&&(I==null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||I instanceof Boolean||I instanceof Number||I instanceof String||I instanceof Date||I instanceof RegExp||I instanceof Blob||I instanceof Error||gn(I)||H(I)||ArrayBuffer.isView(I)||I instanceof ImageData)}function Rn(I,S){if(Vn(I))return(gn(I)||H(I))&&S&&S.push(I),ArrayBuffer.isView(I)&&S&&S.push(I.buffer),I instanceof ImageData&&S&&S.push(I.data.buffer),I;if(Array.isArray(I)){let pe=[];for(let xe of I)pe.push(Rn(xe,S));return pe}if(typeof I!="object")throw new Error("can't serialize object of type "+typeof I);let D=In(I);if(!D)throw new Error(`can't serialize object of unregistered class ${I.constructor.name}`);if(!Ai[D])throw new Error(`${D} is not registered.`);let{klass:Z}=Ai[D],ie=Z.serialize?Z.serialize(I,S):{};if(Z.serialize){if(S&&ie===S[S.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(let pe in I){if(!I.hasOwnProperty(pe)||Ai[D].omit.indexOf(pe)>=0)continue;let xe=I[pe];ie[pe]=Ai[D].shallow.indexOf(pe)>=0?xe:Rn(xe,S)}I instanceof Error&&(ie.message=I.message)}if(ie.$name)throw new Error("$name property is reserved for worker serialization logic.");return D!=="Object"&&(ie.$name=D),ie}function Hn(I){if(Vn(I))return I;if(Array.isArray(I))return I.map(Hn);if(typeof I!="object")throw new Error("can't deserialize object of type "+typeof I);let S=In(I)||"Object";if(!Ai[S])throw new Error(`can't deserialize unregistered class ${S}`);let{klass:D}=Ai[S];if(!D)throw new Error(`can't deserialize unregistered class ${S}`);if(D.deserialize)return D.deserialize(I);let Z=Object.create(D.prototype);for(let ie of Object.keys(I)){if(ie==="$name")continue;let pe=I[ie];Z[ie]=Ai[S].shallow.indexOf(ie)>=0?pe:Hn(pe)}return Z}class Gn{constructor(){this.first=!0}update(S,D){let Z=Math.floor(S);return this.first?(this.first=!1,this.lastIntegerZoom=Z,this.lastIntegerZoomTime=0,this.lastZoom=S,this.lastFloorZoom=Z,!0):(this.lastFloorZoom>Z?(this.lastIntegerZoom=Z+1,this.lastIntegerZoomTime=D):this.lastFloorZoom<Z&&(this.lastIntegerZoom=Z,this.lastIntegerZoomTime=D),S!==this.lastZoom&&(this.lastZoom=S,this.lastFloorZoom=Z,!0))}}let pn={"Latin-1 Supplement":I=>I>=128&&I<=255,"Hangul Jamo":I=>I>=4352&&I<=4607,Khmer:I=>I>=6016&&I<=6143,"General Punctuation":I=>I>=8192&&I<=8303,"Letterlike Symbols":I=>I>=8448&&I<=8527,"Number Forms":I=>I>=8528&&I<=8591,"Miscellaneous Technical":I=>I>=8960&&I<=9215,"Control Pictures":I=>I>=9216&&I<=9279,"Optical Character Recognition":I=>I>=9280&&I<=9311,"Enclosed Alphanumerics":I=>I>=9312&&I<=9471,"Geometric Shapes":I=>I>=9632&&I<=9727,"Miscellaneous Symbols":I=>I>=9728&&I<=9983,"Miscellaneous Symbols and Arrows":I=>I>=11008&&I<=11263,"Ideographic Description Characters":I=>I>=12272&&I<=12287,"CJK Symbols and Punctuation":I=>I>=12288&&I<=12351,Katakana:I=>I>=12448&&I<=12543,Kanbun:I=>I>=12688&&I<=12703,"CJK Strokes":I=>I>=12736&&I<=12783,"Enclosed CJK Letters and Months":I=>I>=12800&&I<=13055,"CJK Compatibility":I=>I>=13056&&I<=13311,"Yijing Hexagram Symbols":I=>I>=19904&&I<=19967,"Private Use Area":I=>I>=57344&&I<=63743,"Vertical Forms":I=>I>=65040&&I<=65055,"CJK Compatibility Forms":I=>I>=65072&&I<=65103,"Small Form Variants":I=>I>=65104&&I<=65135,"Halfwidth and Fullwidth Forms":I=>I>=65280&&I<=65519};function Lo(I){for(let S of I)if(ul(S.charCodeAt(0)))return!0;return!1}function us(I){for(let S of I)if(!ol(S.charCodeAt(0)))return!1;return!0}function Bs(I){let S=I.map(D=>{try{return new RegExp(`\\p{sc=${D}}`,"u").source}catch(Z){return null}}).filter(D=>D);return new RegExp(S.join("|"),"u")}let Js=Bs(["Arab","Dupl","Mong","Ougr","Syrc"]);function ol(I){return!Js.test(String.fromCodePoint(I))}let Cl=Bs(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ul(I){return!(I!==746&&I!==747&&(I<4352||!(pn["CJK Compatibility Forms"](I)&&!(I>=65097&&I<=65103)||pn["CJK Compatibility"](I)||pn["CJK Strokes"](I)||!(!pn["CJK Symbols and Punctuation"](I)||I>=12296&&I<=12305||I>=12308&&I<=12319||I===12336)||pn["Enclosed CJK Letters and Months"](I)||pn["Ideographic Description Characters"](I)||pn.Kanbun(I)||pn.Katakana(I)&&I!==12540||!(!pn["Halfwidth and Fullwidth Forms"](I)||I===65288||I===65289||I===65293||I>=65306&&I<=65310||I===65339||I===65341||I===65343||I>=65371&&I<=65503||I===65507||I>=65512&&I<=65519)||!(!pn["Small Form Variants"](I)||I>=65112&&I<=65118||I>=65123&&I<=65126)||pn["Vertical Forms"](I)||pn["Yijing Hexagram Symbols"](I)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(I))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(I))||Cl.test(String.fromCodePoint(I)))))}function Gl(I){return!(ul(I)||function(S){return!!(pn["Latin-1 Supplement"](S)&&(S===167||S===169||S===174||S===177||S===188||S===189||S===190||S===215||S===247)||pn["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)||pn["Letterlike Symbols"](S)||pn["Number Forms"](S)||pn["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)||pn["Control Pictures"](S)&&S!==9251||pn["Optical Character Recognition"](S)||pn["Enclosed Alphanumerics"](S)||pn["Geometric Shapes"](S)||pn["Miscellaneous Symbols"](S)&&!(S>=9754&&S<=9759)||pn["Miscellaneous Symbols and Arrows"](S)&&(S>=11026&&S<=11055||S>=11088&&S<=11097||S>=11192&&S<=11243)||pn["CJK Symbols and Punctuation"](S)||pn.Katakana(S)||pn["Private Use Area"](S)||pn["CJK Compatibility Forms"](S)||pn["Small Form Variants"](S)||pn["Halfwidth and Fullwidth Forms"](S)||S===8734||S===8756||S===8757||S>=9984&&S<=10087||S>=10102&&S<=10131||S===65532||S===65533)}(I))}let Vl=Bs(["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 Fl(I){return Vl.test(String.fromCodePoint(I))}function ga(I,S){return!(!S&&Fl(I)||I>=2304&&I<=3583||I>=3840&&I<=4255||pn.Khmer(I))}function ko(I){for(let S of I)if(Fl(S.charCodeAt(0)))return!0;return!1}let zs=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(I){this.pluginStatus=I.pluginStatus,this.pluginURL=I.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(I){this.applyArabicShaping=I.applyArabicShaping,this.processBidirectionalText=I.processBidirectionalText,this.processStyledBidirectionalText=I.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Fo{constructor(S,D){this.zoom=S,D?(this.now=D.now,this.fadeDuration=D.fadeDuration,this.zoomHistory=D.zoomHistory,this.transition=D.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Gn,this.transition={})}isSupportedScript(S){return function(D,Z){for(let ie of D)if(!ga(ie.charCodeAt(0),Z))return!1;return!0}(S,zs.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let S=this.zoom,D=S-Math.floor(S),Z=this.crossFadingFactor();return S>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:D+(1-D)*Z}:{fromScale:.5,toScale:1,t:1-(1-Z)*D}}}class Ys{constructor(S,D){this.property=S,this.value=D,this.expression=function(Z,ie){if(ta(Z))return new $a(Z,ie);if(Cs(Z)){let pe=lo(Z,ie);if(pe.result==="error")throw new Error(pe.value.map(xe=>`${xe.key}: ${xe.message}`).join(", "));return pe.value}{let pe=Z;return ie.type==="color"&&typeof Z=="string"?pe=Bt.parse(Z):ie.type!=="padding"||typeof Z!="number"&&!Array.isArray(Z)?ie.type==="variableAnchorOffsetCollection"&&Array.isArray(Z)&&(pe=Br.parse(Z)):pe=Tr.parse(Z),{kind:"constant",evaluate:()=>pe}}}(D===void 0?S.specification.default:D,S.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(S,D,Z){return this.property.possiblyEvaluate(this,S,D,Z)}}class Gs{constructor(S){this.property=S,this.value=new Ys(S,void 0)}transitioned(S,D){return new Sl(this.property,this.value,D,L({},S.transition,this.transition),S.now)}untransitioned(){return new Sl(this.property,this.value,null,{},0)}}class Us{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitionablePropertyValues)}getValue(S){return v(this._values[S].value.value)}setValue(S,D){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Gs(this._values[S].property)),this._values[S].value=new Ys(this._values[S].property,D===null?void 0:v(D))}getTransition(S){return v(this._values[S].transition)}setTransition(S,D){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Gs(this._values[S].property)),this._values[S].transition=v(D)||void 0}serialize(){let S={};for(let D of Object.keys(this._values)){let Z=this.getValue(D);Z!==void 0&&(S[D]=Z);let ie=this.getTransition(D);ie!==void 0&&(S[`${D}-transition`]=ie)}return S}transitioned(S,D){let Z=new _l(this._properties);for(let ie of Object.keys(this._values))Z._values[ie]=this._values[ie].transitioned(S,D._values[ie]);return Z}untransitioned(){let S=new _l(this._properties);for(let D of Object.keys(this._values))S._values[D]=this._values[D].untransitioned();return S}}class Sl{constructor(S,D,Z,ie,pe){this.property=S,this.value=D,this.begin=pe+ie.delay||0,this.end=this.begin+ie.duration||0,S.specification.transition&&(ie.delay||ie.duration)&&(this.prior=Z)}possiblyEvaluate(S,D,Z){let ie=S.now||0,pe=this.value.possiblyEvaluate(S,D,Z),xe=this.prior;if(xe){if(ie>this.end)return this.prior=null,pe;if(this.value.isDataDriven())return this.prior=null,pe;if(ie<this.begin)return xe.possiblyEvaluate(S,D,Z);{let He=(ie-this.begin)/(this.end-this.begin);return this.property.interpolate(xe.possiblyEvaluate(S,D,Z),pe,function(at){if(at<=0)return 0;if(at>=1)return 1;let wt=at*at,Ht=wt*at;return 4*(at<.5?Ht:3*(at-wt)+Ht-.75)}(He))}}return pe}}class _l{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitioningPropertyValues)}possiblyEvaluate(S,D,Z){let ie=new xl(this._properties);for(let pe of Object.keys(this._values))ie._values[pe]=this._values[pe].possiblyEvaluate(S,D,Z);return ie}hasTransition(){for(let S of Object.keys(this._values))if(this._values[S].prior)return!0;return!1}}class kl{constructor(S){this._properties=S,this._values=Object.create(S.defaultPropertyValues)}hasValue(S){return this._values[S].value!==void 0}getValue(S){return v(this._values[S].value)}setValue(S,D){this._values[S]=new Ys(this._values[S].property,D===null?void 0:v(D))}serialize(){let S={};for(let D of Object.keys(this._values)){let Z=this.getValue(D);Z!==void 0&&(S[D]=Z)}return S}possiblyEvaluate(S,D,Z){let ie=new xl(this._properties);for(let pe of Object.keys(this._values))ie._values[pe]=this._values[pe].possiblyEvaluate(S,D,Z);return ie}}class cl{constructor(S,D,Z){this.property=S,this.value=D,this.parameters=Z}isConstant(){return this.value.kind==="constant"}constantOr(S){return this.value.kind==="constant"?this.value.value:S}evaluate(S,D,Z,ie){return this.property.evaluate(this.value,this.parameters,S,D,Z,ie)}}class xl{constructor(S){this._properties=S,this._values=Object.create(S.defaultPossiblyEvaluatedValues)}get(S){return this._values[S]}}class Uo{constructor(S){this.specification=S}possiblyEvaluate(S,D){if(S.isDataDriven())throw new Error("Value should not be data driven");return S.expression.evaluate(D)}interpolate(S,D,Z){let ie=ia[this.specification.type];return ie?ie(S,D,Z):S}}class _s{constructor(S,D){this.specification=S,this.overrides=D}possiblyEvaluate(S,D,Z,ie){return new cl(this,S.expression.kind==="constant"||S.expression.kind==="camera"?{kind:"constant",value:S.expression.evaluate(D,null,{},Z,ie)}:S.expression,D)}interpolate(S,D,Z){if(S.value.kind!=="constant"||D.value.kind!=="constant")return S;if(S.value.value===void 0||D.value.value===void 0)return new cl(this,{kind:"constant",value:void 0},S.parameters);let ie=ia[this.specification.type];if(ie){let pe=ie(S.value.value,D.value.value,Z);return new cl(this,{kind:"constant",value:pe},S.parameters)}return S}evaluate(S,D,Z,ie,pe,xe){return S.kind==="constant"?S.value:S.evaluate(D,Z,ie,pe,xe)}}class Bl extends _s{possiblyEvaluate(S,D,Z,ie){if(S.value===void 0)return new cl(this,{kind:"constant",value:void 0},D);if(S.expression.kind==="constant"){let pe=S.expression.evaluate(D,null,{},Z,ie),xe=S.property.specification.type==="resolvedImage"&&typeof pe!="string"?pe.name:pe,He=this._calculate(xe,xe,xe,D);return new cl(this,{kind:"constant",value:He},D)}if(S.expression.kind==="camera"){let pe=this._calculate(S.expression.evaluate({zoom:D.zoom-1}),S.expression.evaluate({zoom:D.zoom}),S.expression.evaluate({zoom:D.zoom+1}),D);return new cl(this,{kind:"constant",value:pe},D)}return new cl(this,S.expression,D)}evaluate(S,D,Z,ie,pe,xe){if(S.kind==="source"){let He=S.evaluate(D,Z,ie,pe,xe);return this._calculate(He,He,He,D)}return S.kind==="composite"?this._calculate(S.evaluate({zoom:Math.floor(D.zoom)-1},Z,ie),S.evaluate({zoom:Math.floor(D.zoom)},Z,ie),S.evaluate({zoom:Math.floor(D.zoom)+1},Z,ie),D):S.value}_calculate(S,D,Z,ie){return ie.zoom>ie.zoomHistory.lastIntegerZoom?{from:S,to:D}:{from:Z,to:D}}interpolate(S){return S}}class Il{constructor(S){this.specification=S}possiblyEvaluate(S,D,Z,ie){if(S.value!==void 0){if(S.expression.kind==="constant"){let pe=S.expression.evaluate(D,null,{},Z,ie);return this._calculate(pe,pe,pe,D)}return this._calculate(S.expression.evaluate(new Fo(Math.floor(D.zoom-1),D)),S.expression.evaluate(new Fo(Math.floor(D.zoom),D)),S.expression.evaluate(new Fo(Math.floor(D.zoom+1),D)),D)}}_calculate(S,D,Z,ie){return ie.zoom>ie.zoomHistory.lastIntegerZoom?{from:S,to:D}:{from:Z,to:D}}interpolate(S){return S}}class Dl{constructor(S){this.specification=S}possiblyEvaluate(S,D,Z,ie){return!!S.expression.evaluate(D,null,{},Z,ie)}interpolate(){return!1}}class oe{constructor(S){this.properties=S,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let D in S){let Z=S[D];Z.specification.overridable&&this.overridableProperties.push(D);let ie=this.defaultPropertyValues[D]=new Ys(Z,void 0),pe=this.defaultTransitionablePropertyValues[D]=new Gs(Z);this.defaultTransitioningPropertyValues[D]=pe.untransitioned(),this.defaultPossiblyEvaluatedValues[D]=ie.possiblyEvaluate({})}}}gi("DataDrivenProperty",_s),gi("DataConstantProperty",Uo),gi("CrossFadedDataDrivenProperty",Bl),gi("CrossFadedProperty",Il),gi("ColorRampProperty",Dl);let w="-transition";class B extends Be{constructor(S,D){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),D.layout&&(this._unevaluatedLayout=new kl(D.layout)),D.paint)){this._transitionablePaint=new Us(D.paint);for(let Z in S.paint)this.setPaintProperty(Z,S.paint[Z],{validate:!1});for(let Z in S.layout)this.setLayoutProperty(Z,S.layout[Z],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new xl(D.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(S){return S==="visibility"?this.visibility:this._unevaluatedLayout.getValue(S)}setLayoutProperty(S,D,Z={}){D!=null&&this._validate(dn,`layers.${this.id}.layout.${S}`,S,D,Z)||(S!=="visibility"?this._unevaluatedLayout.setValue(S,D):this.visibility=D)}getPaintProperty(S){return S.endsWith(w)?this._transitionablePaint.getTransition(S.slice(0,-11)):this._transitionablePaint.getValue(S)}setPaintProperty(S,D,Z={}){if(D!=null&&this._validate(Oi,`layers.${this.id}.paint.${S}`,S,D,Z))return!1;if(S.endsWith(w))return this._transitionablePaint.setTransition(S.slice(0,-11),D||void 0),!1;{let ie=this._transitionablePaint._values[S],pe=ie.property.specification["property-type"]==="cross-faded-data-driven",xe=ie.value.isDataDriven(),He=ie.value;this._transitionablePaint.setValue(S,D),this._handleSpecialPaintPropertyUpdate(S);let at=this._transitionablePaint._values[S].value;return at.isDataDriven()||xe||pe||this._handleOverridablePaintPropertyUpdate(S,He,at)}}_handleSpecialPaintPropertyUpdate(S){}_handleOverridablePaintPropertyUpdate(S,D,Z){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,D){S.getCrossfadeParameters&&(this._crossfadeParameters=S.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(S,void 0,D)),this.paint=this._transitioningPaint.possiblyEvaluate(S,void 0,D)}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,(D,Z)=>!(D===void 0||Z==="layout"&&!Object.keys(D).length||Z==="paint"&&!Object.keys(D).length))}_validate(S,D,Z,ie,pe={}){return(!pe||pe.validate!==!1)&&wi(this,S.call(li,{key:D,layerType:this.type,objectKey:Z,value:ie,styleSpec:fe,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let S in this.paint._values){let D=this.paint.get(S);if(D instanceof cl&&Ki(D.property.specification)&&(D.value.kind==="source"||D.value.kind==="composite")&&D.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,D){this._structArray=S,this._pos1=D*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,D){return S._trim(),D&&(S.isTransferred=!0,D.push(S.arrayBuffer)),{length:S.length,arrayBuffer:S.arrayBuffer}}static deserialize(S){let D=Object.create(this.prototype);return D.arrayBuffer=S.arrayBuffer,D.length=S.length,D.capacity=S.arrayBuffer.byteLength/D.bytesPerElement,D._refreshViews(),D}_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 D=this.uint8;this._refreshViews(),D&&this.uint8.set(D)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Ne(I,S=1){let D=0,Z=0;return{members:I.map(ie=>{let pe=Q[ie.type].BYTES_PER_ELEMENT,xe=D=$e(D,Math.max(S,pe)),He=ie.components||1;return Z=Math.max(Z,pe),D+=pe*He,{name:ie.name,type:ie.type,components:He,offset:xe}}),size:$e(D,Math.max(Z,S)),alignment:S}}function $e(I,S){return Math.ceil(I/S)*S}class pt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D){let Z=this.length;return this.resize(Z+1),this.emplace(Z,S,D)}emplace(S,D,Z){let ie=2*S;return this.int16[ie+0]=D,this.int16[ie+1]=Z,S}}pt.prototype.bytesPerElement=4,gi("StructArrayLayout2i4",pt);class zt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.int16[pe+0]=D,this.int16[pe+1]=Z,this.int16[pe+2]=ie,S}}zt.prototype.bytesPerElement=6,gi("StructArrayLayout3i6",zt);class Yt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie){let pe=this.length;return this.resize(pe+1),this.emplace(pe,S,D,Z,ie)}emplace(S,D,Z,ie,pe){let xe=4*S;return this.int16[xe+0]=D,this.int16[xe+1]=Z,this.int16[xe+2]=ie,this.int16[xe+3]=pe,S}}Yt.prototype.bytesPerElement=8,gi("StructArrayLayout4i8",Yt);class Jt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=6*S;return this.int16[at+0]=D,this.int16[at+1]=Z,this.int16[at+2]=ie,this.int16[at+3]=pe,this.int16[at+4]=xe,this.int16[at+5]=He,S}}Jt.prototype.bytesPerElement=12,gi("StructArrayLayout2i4i12",Jt);class yr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=4*S,wt=8*S;return this.int16[at+0]=D,this.int16[at+1]=Z,this.uint8[wt+4]=ie,this.uint8[wt+5]=pe,this.uint8[wt+6]=xe,this.uint8[wt+7]=He,S}}yr.prototype.bytesPerElement=8,gi("StructArrayLayout2i4ub8",yr);class Ir extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D){let Z=this.length;return this.resize(Z+1),this.emplace(Z,S,D)}emplace(S,D,Z){let ie=2*S;return this.float32[ie+0]=D,this.float32[ie+1]=Z,S}}Ir.prototype.bytesPerElement=8,gi("StructArrayLayout2f8",Ir);class ce extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe,He,at,wt,Ht){let rr=this.length;return this.resize(rr+1),this.emplace(rr,S,D,Z,ie,pe,xe,He,at,wt,Ht)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr){let pr=10*S;return this.uint16[pr+0]=D,this.uint16[pr+1]=Z,this.uint16[pr+2]=ie,this.uint16[pr+3]=pe,this.uint16[pr+4]=xe,this.uint16[pr+5]=He,this.uint16[pr+6]=at,this.uint16[pr+7]=wt,this.uint16[pr+8]=Ht,this.uint16[pr+9]=rr,S}}ce.prototype.bytesPerElement=20,gi("StructArrayLayout10ui20",ce);class Ae extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr){let Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar){let Vr=12*S;return this.int16[Vr+0]=D,this.int16[Vr+1]=Z,this.int16[Vr+2]=ie,this.int16[Vr+3]=pe,this.uint16[Vr+4]=xe,this.uint16[Vr+5]=He,this.uint16[Vr+6]=at,this.uint16[Vr+7]=wt,this.int16[Vr+8]=Ht,this.int16[Vr+9]=rr,this.int16[Vr+10]=pr,this.int16[Vr+11]=Ar,S}}Ae.prototype.bytesPerElement=24,gi("StructArrayLayout4i4ui4i24",Ae);class qe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.float32[pe+0]=D,this.float32[pe+1]=Z,this.float32[pe+2]=ie,S}}qe.prototype.bytesPerElement=12,gi("StructArrayLayout3f12",qe);class Ve extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(S){let D=this.length;return this.resize(D+1),this.emplace(D,S)}emplace(S,D){return this.uint32[1*S+0]=D,S}}Ve.prototype.bytesPerElement=4,gi("StructArrayLayout1ul4",Ve);class ot 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,D,Z,ie,pe,xe,He,at,wt){let Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,S,D,Z,ie,pe,xe,He,at,wt)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht){let rr=10*S,pr=5*S;return this.int16[rr+0]=D,this.int16[rr+1]=Z,this.int16[rr+2]=ie,this.int16[rr+3]=pe,this.int16[rr+4]=xe,this.int16[rr+5]=He,this.uint32[pr+3]=at,this.uint16[rr+8]=wt,this.uint16[rr+9]=Ht,S}}ot.prototype.bytesPerElement=20,gi("StructArrayLayout6i1ul2ui20",ot);class Ke extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=6*S;return this.int16[at+0]=D,this.int16[at+1]=Z,this.int16[at+2]=ie,this.int16[at+3]=pe,this.int16[at+4]=xe,this.int16[at+5]=He,S}}Ke.prototype.bytesPerElement=12,gi("StructArrayLayout2i2i2i12",Ke);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,D,Z,ie,pe){let xe=this.length;return this.resize(xe+1),this.emplace(xe,S,D,Z,ie,pe)}emplace(S,D,Z,ie,pe,xe){let He=4*S,at=8*S;return this.float32[He+0]=D,this.float32[He+1]=Z,this.float32[He+2]=ie,this.int16[at+6]=pe,this.int16[at+7]=xe,S}}ft.prototype.bytesPerElement=16,gi("StructArrayLayout2f1f2i16",ft);class qt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=16*S,wt=4*S,Ht=8*S;return this.uint8[at+0]=D,this.uint8[at+1]=Z,this.float32[wt+1]=ie,this.float32[wt+2]=pe,this.int16[Ht+6]=xe,this.int16[Ht+7]=He,S}}qt.prototype.bytesPerElement=16,gi("StructArrayLayout2ub2f2i16",qt);class Xt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.uint16[pe+0]=D,this.uint16[pe+1]=Z,this.uint16[pe+2]=ie,S}}Xt.prototype.bytesPerElement=6,gi("StructArrayLayout3ui6",Xt);class $t 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,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi){let da=this.length;return this.resize(da+1),this.emplace(da,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da){let cn=24*S,jn=12*S,Va=48*S;return this.int16[cn+0]=D,this.int16[cn+1]=Z,this.uint16[cn+2]=ie,this.uint16[cn+3]=pe,this.uint32[jn+2]=xe,this.uint32[jn+3]=He,this.uint32[jn+4]=at,this.uint16[cn+10]=wt,this.uint16[cn+11]=Ht,this.uint16[cn+12]=rr,this.float32[jn+7]=pr,this.float32[jn+8]=Ar,this.uint8[Va+36]=Vr,this.uint8[Va+37]=ri,this.uint8[Va+38]=Ii,this.uint32[jn+10]=Zi,this.int16[cn+22]=da,S}}$t.prototype.bytesPerElement=48,gi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",$t);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,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da,cn,jn,Va,hl,iu,Su,Zl,Qs,gu,cu){let uu=this.length;return this.resize(uu+1),this.emplace(uu,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da,cn,jn,Va,hl,iu,Su,Zl,Qs,gu,cu)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da,cn,jn,Va,hl,iu,Su,Zl,Qs,gu,cu,uu){let Ts=32*S,wu=16*S;return this.int16[Ts+0]=D,this.int16[Ts+1]=Z,this.int16[Ts+2]=ie,this.int16[Ts+3]=pe,this.int16[Ts+4]=xe,this.int16[Ts+5]=He,this.int16[Ts+6]=at,this.int16[Ts+7]=wt,this.uint16[Ts+8]=Ht,this.uint16[Ts+9]=rr,this.uint16[Ts+10]=pr,this.uint16[Ts+11]=Ar,this.uint16[Ts+12]=Vr,this.uint16[Ts+13]=ri,this.uint16[Ts+14]=Ii,this.uint16[Ts+15]=Zi,this.uint16[Ts+16]=da,this.uint16[Ts+17]=cn,this.uint16[Ts+18]=jn,this.uint16[Ts+19]=Va,this.uint16[Ts+20]=hl,this.uint16[Ts+21]=iu,this.uint16[Ts+22]=Su,this.uint32[wu+12]=Zl,this.float32[wu+13]=Qs,this.float32[wu+14]=gu,this.uint16[Ts+30]=cu,this.uint16[Ts+31]=uu,S}}dr.prototype.bytesPerElement=64,gi("StructArrayLayout8i15ui1ul2f2ui64",dr);class Mr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S){let D=this.length;return this.resize(D+1),this.emplace(D,S)}emplace(S,D){return this.float32[1*S+0]=D,S}}Mr.prototype.bytesPerElement=4,gi("StructArrayLayout1f4",Mr);class $r extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.uint16[6*S+0]=D,this.float32[pe+1]=Z,this.float32[pe+2]=ie,S}}$r.prototype.bytesPerElement=12,gi("StructArrayLayout1ui2f12",$r);class ii extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=4*S;return this.uint32[2*S+0]=D,this.uint16[pe+2]=Z,this.uint16[pe+3]=ie,S}}ii.prototype.bytesPerElement=8,gi("StructArrayLayout1ul2ui8",ii);class pi extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D){let Z=this.length;return this.resize(Z+1),this.emplace(Z,S,D)}emplace(S,D,Z){let ie=2*S;return this.uint16[ie+0]=D,this.uint16[ie+1]=Z,S}}pi.prototype.bytesPerElement=4,gi("StructArrayLayout2ui4",pi);class Yi extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S){let D=this.length;return this.resize(D+1),this.emplace(D,S)}emplace(S,D){return this.uint16[1*S+0]=D,S}}Yi.prototype.bytesPerElement=2,gi("StructArrayLayout1ui2",Yi);class wn extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie){let pe=this.length;return this.resize(pe+1),this.emplace(pe,S,D,Z,ie)}emplace(S,D,Z,ie,pe){let xe=4*S;return this.float32[xe+0]=D,this.float32[xe+1]=Z,this.float32[xe+2]=ie,this.float32[xe+3]=pe,S}}wn.prototype.bytesPerElement=16,gi("StructArrayLayout4f16",wn);class Tn 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 l(this.anchorPointX,this.anchorPointY)}}Tn.prototype.size=20;class ua extends ot{get(S){return new Tn(this,S)}}gi("CollisionBoxArray",ua);class oo 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]}}oo.prototype.size=48;class el extends $t{get(S){return new oo(this,S)}}gi("PlacedSymbolArray",el);class ys 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]}}ys.prototype.size=64;class il extends dr{get(S){return new ys(this,S)}}gi("SymbolInstanceArray",il);class $l extends Mr{getoffsetX(S){return this.float32[1*S+0]}}gi("GlyphOffsetArray",$l);class pl extends zt{getx(S){return this.int16[3*S+0]}gety(S){return this.int16[3*S+1]}gettileUnitDistanceFromAnchor(S){return this.int16[3*S+2]}}gi("SymbolLineVertexArray",pl);class Hl 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]}}Hl.prototype.size=12;class Ll extends $r{get(S){return new Hl(this,S)}}gi("TextAnchorOffsetArray",Ll);class Ql 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]}}Ql.prototype.size=8;class ku extends ii{get(S){return new Ql(this,S)}}gi("FeatureIndexArray",ku);class Jl extends pt{}class Kl extends pt{}class Hu extends pt{}class tf extends Jt{}class Ku extends yr{}class Gu extends Ir{}class Wu extends ce{}class sf extends Ae{}class gf extends qe{}class nf extends Ve{}class af extends Ke{}class X extends qt{}class se extends Xt{}class Le extends pi{}let We=Ne([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ye}=We;class it{constructor(S=[]){this.segments=S}prepareSegment(S,D,Z,ie){let pe=this.segments[this.segments.length-1];return S>it.MAX_VERTEX_ARRAY_LENGTH&&T(`Max vertices per segment is ${it.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${S}`),(!pe||pe.vertexLength+S>it.MAX_VERTEX_ARRAY_LENGTH||pe.sortKey!==ie)&&(pe={vertexOffset:D.length,primitiveOffset:Z.length,vertexLength:0,primitiveLength:0},ie!==void 0&&(pe.sortKey=ie),this.segments.push(pe)),pe}get(){return this.segments}destroy(){for(let S of this.segments)for(let D in S.vaos)S.vaos[D].destroy()}static simpleSegment(S,D,Z,ie){return new it([{vertexOffset:S,primitiveOffset:D,vertexLength:Z,primitiveLength:ie,vaos:{},sortKey:0}])}}function Nt(I,S){return 256*(I=E(Math.floor(I),0,255))+E(Math.floor(S),0,255)}it.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,gi("SegmentVector",it);let mt=Ne([{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 er={exports:{}},_r={exports:{}};_r.exports=function(I,S){var D,Z,ie,pe,xe,He,at,wt;for(Z=I.length-(D=3&I.length),ie=S,xe=3432918353,He=461845907,wt=0;wt<Z;)at=255&I.charCodeAt(wt)|(255&I.charCodeAt(++wt))<<8|(255&I.charCodeAt(++wt))<<16|(255&I.charCodeAt(++wt))<<24,++wt,ie=27492+(65535&(pe=5*(65535&(ie=(ie^=at=(65535&(at=(at=(65535&at)*xe+(((at>>>16)*xe&65535)<<16)&4294967295)<<15|at>>>17))*He+(((at>>>16)*He&65535)<<16)&4294967295)<<13|ie>>>19))+((5*(ie>>>16)&65535)<<16)&4294967295))+((58964+(pe>>>16)&65535)<<16);switch(at=0,D){case 3:at^=(255&I.charCodeAt(wt+2))<<16;case 2:at^=(255&I.charCodeAt(wt+1))<<8;case 1:ie^=at=(65535&(at=(at=(65535&(at^=255&I.charCodeAt(wt)))*xe+(((at>>>16)*xe&65535)<<16)&4294967295)<<15|at>>>17))*He+(((at>>>16)*He&65535)<<16)&4294967295}return ie^=I.length,ie=2246822507*(65535&(ie^=ie>>>16))+((2246822507*(ie>>>16)&65535)<<16)&4294967295,ie=3266489909*(65535&(ie^=ie>>>13))+((3266489909*(ie>>>16)&65535)<<16)&4294967295,(ie^=ie>>>16)>>>0};var wr=_r.exports,ni={exports:{}};ni.exports=function(I,S){for(var D,Z=I.length,ie=S^Z,pe=0;Z>=4;)D=1540483477*(65535&(D=255&I.charCodeAt(pe)|(255&I.charCodeAt(++pe))<<8|(255&I.charCodeAt(++pe))<<16|(255&I.charCodeAt(++pe))<<24))+((1540483477*(D>>>16)&65535)<<16),ie=1540483477*(65535&ie)+((1540483477*(ie>>>16)&65535)<<16)^(D=1540483477*(65535&(D^=D>>>24))+((1540483477*(D>>>16)&65535)<<16)),Z-=4,++pe;switch(Z){case 3:ie^=(255&I.charCodeAt(pe+2))<<16;case 2:ie^=(255&I.charCodeAt(pe+1))<<8;case 1:ie=1540483477*(65535&(ie^=255&I.charCodeAt(pe)))+((1540483477*(ie>>>16)&65535)<<16)}return ie=1540483477*(65535&(ie^=ie>>>13))+((1540483477*(ie>>>16)&65535)<<16),(ie^=ie>>>15)>>>0};var Wr=wr,Ci=ni.exports;er.exports=Wr,er.exports.murmur3=Wr,er.exports.murmur2=Ci;var Ji=o(er.exports);class ai{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(S,D,Z,ie){this.ids.push(Ti(S)),this.positions.push(D,Z,ie)}getPositions(S){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let D=Ti(S),Z=0,ie=this.ids.length-1;for(;Z<ie;){let xe=Z+ie>>1;this.ids[xe]>=D?ie=xe:Z=xe+1}let pe=[];for(;this.ids[Z]===D;)pe.push({index:this.positions[3*Z],start:this.positions[3*Z+1],end:this.positions[3*Z+2]}),Z++;return pe}static serialize(S,D){let Z=new Float64Array(S.ids),ie=new Uint32Array(S.positions);return Bi(Z,ie,0,Z.length-1),D&&D.push(Z.buffer,ie.buffer),{ids:Z,positions:ie}}static deserialize(S){let D=new ai;return D.ids=S.ids,D.positions=S.positions,D.indexed=!0,D}}function Ti(I){let S=+I;return!isNaN(S)&&S<=Number.MAX_SAFE_INTEGER?S:Ji(String(I))}function Bi(I,S,D,Z){for(;D<Z;){let ie=I[D+Z>>1],pe=D-1,xe=Z+1;for(;;){do pe++;while(I[pe]<ie);do xe--;while(I[xe]>ie);if(pe>=xe)break;en(I,pe,xe),en(S,3*pe,3*xe),en(S,3*pe+1,3*xe+1),en(S,3*pe+2,3*xe+2)}xe-D<Z-xe?(Bi(I,S,D,xe),D=xe+1):(Bi(I,S,xe+1,Z),Z=xe)}}function en(I,S,D){let Z=I[S];I[S]=I[D],I[D]=Z}gi("FeaturePositionMap",ai);class Wi{constructor(S,D){this.gl=S.gl,this.location=D}}class bi extends Wi{constructor(S,D){super(S,D),this.current=0}set(S){this.current!==S&&(this.current=S,this.gl.uniform1f(this.location,S))}}class ao extends Wi{constructor(S,D){super(S,D),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 yo extends Wi{constructor(S,D){super(S,D),this.current=Bt.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 Ko=new Float32Array(16);function Ms(I){return[Nt(255*I.r,255*I.g),Nt(255*I.b,255*I.a)]}class vl{constructor(S,D,Z){this.value=S,this.uniformNames=D.map(ie=>`u_${ie}`),this.type=Z}setUniform(S,D,Z){S.set(Z.constantOr(this.value))}getBinding(S,D,Z){return this.type==="color"?new yo(S,D):new bi(S,D)}}class wl{constructor(S,D){this.uniformNames=D.map(Z=>`u_${Z}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(S,D){this.pixelRatioFrom=D.pixelRatio,this.pixelRatioTo=S.pixelRatio,this.patternFrom=D.tlbr,this.patternTo=S.tlbr}setUniform(S,D,Z,ie){let pe=ie==="u_pattern_to"?this.patternTo:ie==="u_pattern_from"?this.patternFrom:ie==="u_pixel_ratio_to"?this.pixelRatioTo:ie==="u_pixel_ratio_from"?this.pixelRatioFrom:null;pe&&S.set(pe)}getBinding(S,D,Z){return Z.substr(0,9)==="u_pattern"?new ao(S,D):new bi(S,D)}}class au{constructor(S,D,Z,ie){this.expression=S,this.type=Z,this.maxValue=0,this.paintVertexAttributes=D.map(pe=>({name:`a_${pe}`,type:"Float32",components:Z==="color"?2:1,offset:0})),this.paintVertexArray=new ie}populatePaintArray(S,D,Z,ie,pe){let xe=this.paintVertexArray.length,He=this.expression.evaluate(new Fo(0),D,{},ie,[],pe);this.paintVertexArray.resize(S),this._setPaintValue(xe,S,He)}updatePaintArray(S,D,Z,ie){let pe=this.expression.evaluate({zoom:0},Z,ie);this._setPaintValue(S,D,pe)}_setPaintValue(S,D,Z){if(this.type==="color"){let ie=Ms(Z);for(let pe=S;pe<D;pe++)this.paintVertexArray.emplace(pe,ie[0],ie[1])}else{for(let ie=S;ie<D;ie++)this.paintVertexArray.emplace(ie,Z);this.maxValue=Math.max(this.maxValue,Math.abs(Z))}}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 Al{constructor(S,D,Z,ie,pe,xe){this.expression=S,this.uniformNames=D.map(He=>`u_${He}_t`),this.type=Z,this.useIntegerZoom=ie,this.zoom=pe,this.maxValue=0,this.paintVertexAttributes=D.map(He=>({name:`a_${He}`,type:"Float32",components:Z==="color"?4:2,offset:0})),this.paintVertexArray=new xe}populatePaintArray(S,D,Z,ie,pe){let xe=this.expression.evaluate(new Fo(this.zoom),D,{},ie,[],pe),He=this.expression.evaluate(new Fo(this.zoom+1),D,{},ie,[],pe),at=this.paintVertexArray.length;this.paintVertexArray.resize(S),this._setPaintValue(at,S,xe,He)}updatePaintArray(S,D,Z,ie){let pe=this.expression.evaluate({zoom:this.zoom},Z,ie),xe=this.expression.evaluate({zoom:this.zoom+1},Z,ie);this._setPaintValue(S,D,pe,xe)}_setPaintValue(S,D,Z,ie){if(this.type==="color"){let pe=Ms(Z),xe=Ms(ie);for(let He=S;He<D;He++)this.paintVertexArray.emplace(He,pe[0],pe[1],xe[0],xe[1])}else{for(let pe=S;pe<D;pe++)this.paintVertexArray.emplace(pe,Z,ie);this.maxValue=Math.max(this.maxValue,Math.abs(Z),Math.abs(ie))}}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,D){let Z=this.useIntegerZoom?Math.floor(D.zoom):D.zoom,ie=E(this.expression.interpolationFactor(Z,this.zoom,this.zoom+1),0,1);S.set(ie)}getBinding(S,D,Z){return new bi(S,D)}}class nu{constructor(S,D,Z,ie,pe,xe){this.expression=S,this.type=D,this.useIntegerZoom=Z,this.zoom=ie,this.layerId=xe,this.zoomInPaintVertexArray=new pe,this.zoomOutPaintVertexArray=new pe}populatePaintArray(S,D,Z){let ie=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(S),this.zoomOutPaintVertexArray.resize(S),this._setPaintValues(ie,S,D.patterns&&D.patterns[this.layerId],Z)}updatePaintArray(S,D,Z,ie,pe){this._setPaintValues(S,D,Z.patterns&&Z.patterns[this.layerId],pe)}_setPaintValues(S,D,Z,ie){if(!ie||!Z)return;let{min:pe,mid:xe,max:He}=Z,at=ie[pe],wt=ie[xe],Ht=ie[He];if(at&&wt&&Ht)for(let rr=S;rr<D;rr++)this.zoomInPaintVertexArray.emplace(rr,wt.tl[0],wt.tl[1],wt.br[0],wt.br[1],at.tl[0],at.tl[1],at.br[0],at.br[1],wt.pixelRatio,at.pixelRatio),this.zoomOutPaintVertexArray.emplace(rr,wt.tl[0],wt.tl[1],wt.br[0],wt.br[1],Ht.tl[0],Ht.tl[1],Ht.br[0],Ht.br[1],wt.pixelRatio,Ht.pixelRatio)}upload(S){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=S.createVertexBuffer(this.zoomInPaintVertexArray,mt.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=S.createVertexBuffer(this.zoomOutPaintVertexArray,mt.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Bu{constructor(S,D,Z){this.binders={},this._buffers=[];let ie=[];for(let pe in S.paint._values){if(!Z(pe))continue;let xe=S.paint.get(pe);if(!(xe instanceof cl&&Ki(xe.property.specification)))continue;let He=Ju(pe,S.type),at=xe.value,wt=xe.property.specification.type,Ht=xe.property.useIntegerZoom,rr=xe.property.specification["property-type"],pr=rr==="cross-faded"||rr==="cross-faded-data-driven";if(at.kind==="constant")this.binders[pe]=pr?new wl(at.value,He):new vl(at.value,He,wt),ie.push(`/u_${pe}`);else if(at.kind==="source"||pr){let Ar=qo(pe,wt,"source");this.binders[pe]=pr?new nu(at,wt,Ht,D,Ar,S.id):new au(at,He,wt,Ar),ie.push(`/a_${pe}`)}else{let Ar=qo(pe,wt,"composite");this.binders[pe]=new Al(at,He,wt,Ht,D,Ar),ie.push(`/z_${pe}`)}}this.cacheKey=ie.sort().join("")}getMaxValue(S){let D=this.binders[S];return D instanceof au||D instanceof Al?D.maxValue:0}populatePaintArrays(S,D,Z,ie,pe){for(let xe in this.binders){let He=this.binders[xe];(He instanceof au||He instanceof Al||He instanceof nu)&&He.populatePaintArray(S,D,Z,ie,pe)}}setConstantPatternPositions(S,D){for(let Z in this.binders){let ie=this.binders[Z];ie instanceof wl&&ie.setConstantPatternPositions(S,D)}}updatePaintArrays(S,D,Z,ie,pe){let xe=!1;for(let He in S){let at=D.getPositions(He);for(let wt of at){let Ht=Z.feature(wt.index);for(let rr in this.binders){let pr=this.binders[rr];if((pr instanceof au||pr instanceof Al||pr instanceof nu)&&pr.expression.isStateDependent===!0){let Ar=ie.paint.get(rr);pr.expression=Ar.value,pr.updatePaintArray(wt.start,wt.end,Ht,S[He],pe),xe=!0}}}}return xe}defines(){let S=[];for(let D in this.binders){let Z=this.binders[D];(Z instanceof vl||Z instanceof wl)&&S.push(...Z.uniformNames.map(ie=>`#define HAS_UNIFORM_${ie}`))}return S}getBinderAttributes(){let S=[];for(let D in this.binders){let Z=this.binders[D];if(Z instanceof au||Z instanceof Al)for(let ie=0;ie<Z.paintVertexAttributes.length;ie++)S.push(Z.paintVertexAttributes[ie].name);else if(Z instanceof nu)for(let ie=0;ie<mt.members.length;ie++)S.push(mt.members[ie].name)}return S}getBinderUniforms(){let S=[];for(let D in this.binders){let Z=this.binders[D];if(Z instanceof vl||Z instanceof wl||Z instanceof Al)for(let ie of Z.uniformNames)S.push(ie)}return S}getPaintVertexBuffers(){return this._buffers}getUniforms(S,D){let Z=[];for(let ie in this.binders){let pe=this.binders[ie];if(pe instanceof vl||pe instanceof wl||pe instanceof Al){for(let xe of pe.uniformNames)if(D[xe]){let He=pe.getBinding(S,D[xe],xe);Z.push({name:xe,property:ie,binding:He})}}}return Z}setUniforms(S,D,Z,ie){for(let{name:pe,property:xe,binding:He}of D)this.binders[xe].setUniform(He,ie,Z.get(xe),pe)}updatePaintBuffers(S){this._buffers=[];for(let D in this.binders){let Z=this.binders[D];if(S&&Z instanceof nu){let ie=S.fromScale===2?Z.zoomInPaintVertexBuffer:Z.zoomOutPaintVertexBuffer;ie&&this._buffers.push(ie)}else(Z instanceof au||Z instanceof Al)&&Z.paintVertexBuffer&&this._buffers.push(Z.paintVertexBuffer)}}upload(S){for(let D in this.binders){let Z=this.binders[D];(Z instanceof au||Z instanceof Al||Z instanceof nu)&&Z.upload(S)}this.updatePaintBuffers()}destroy(){for(let S in this.binders){let D=this.binders[S];(D instanceof au||D instanceof Al||D instanceof nu)&&D.destroy()}}}class qu{constructor(S,D,Z=()=>!0){this.programConfigurations={};for(let ie of S)this.programConfigurations[ie.id]=new Bu(ie,D,Z);this.needsUpload=!1,this._featureMap=new ai,this._bufferOffset=0}populatePaintArrays(S,D,Z,ie,pe,xe){for(let He in this.programConfigurations)this.programConfigurations[He].populatePaintArrays(S,D,ie,pe,xe);D.id!==void 0&&this._featureMap.add(D.id,Z,this._bufferOffset,S),this._bufferOffset=S,this.needsUpload=!0}updatePaintArrays(S,D,Z,ie){for(let pe of Z)this.needsUpload=this.programConfigurations[pe.id].updatePaintArrays(S,this._featureMap,D,pe,ie)||this.needsUpload}get(S){return this.programConfigurations[S]}upload(S){if(this.needsUpload){for(let D in this.programConfigurations)this.programConfigurations[D].upload(S);this.needsUpload=!1}}destroy(){for(let S in this.programConfigurations)this.programConfigurations[S].destroy()}}function Ju(I,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"]}[I]||[I.replace(`${S}-`,"").replace(/-/g,"_")]}function qo(I,S,D){let Z={color:{source:Ir,composite:wn},number:{source:Mr,composite:Ir}},ie=function(pe){return{"line-pattern":{source:Wu,composite:Wu},"fill-pattern":{source:Wu,composite:Wu},"fill-extrusion-pattern":{source:Wu,composite:Wu}}[pe]}(I);return ie&&ie[D]||Z[S][D]}gi("ConstantBinder",vl),gi("CrossFadedConstantBinder",wl),gi("SourceExpressionBinder",au),gi("CrossFadedCompositeBinder",nu),gi("CompositeExpressionBinder",Al),gi("ProgramConfiguration",Bu,{omit:["_buffers"]}),gi("ProgramConfigurationSet",qu);let Rl=8192,pu=Math.pow(2,14)-1,xu=-pu-1;function of(I){let S=Rl/I.extent,D=I.loadGeometry();for(let Z=0;Z<D.length;Z++){let ie=D[Z];for(let pe=0;pe<ie.length;pe++){let xe=ie[pe],He=Math.round(xe.x*S),at=Math.round(xe.y*S);xe.x=E(He,xu,pu),xe.y=E(at,xu,pu),(He<xe.x||He>xe.x+1||at<xe.y||at>xe.y+1)&&T("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return D}function ff(I,S){return{type:I.type,id:I.id,properties:I.properties,geometry:S?of(I):[]}}function xf(I,S,D,Z,ie){I.emplaceBack(2*S+(Z+1)/2,2*D+(ie+1)/2)}class hf{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(D=>D.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new Kl,this.indexArray=new se,this.segments=new it,this.programConfigurations=new qu(S.layers,S.zoom),this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){let ie=this.layers[0],pe=[],xe=null,He=!1;ie.type==="circle"&&(xe=ie.layout.get("circle-sort-key"),He=!xe.isConstant());for(let{feature:at,id:wt,index:Ht,sourceLayerIndex:rr}of S){let pr=this.layers[0]._featureFilter.needGeometry,Ar=ff(at,pr);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),Ar,Z))continue;let Vr=He?xe.evaluate(Ar,{},Z):void 0,ri={id:wt,properties:at.properties,type:at.type,sourceLayerIndex:rr,index:Ht,geometry:pr?Ar.geometry:of(at),patterns:{},sortKey:Vr};pe.push(ri)}He&&pe.sort((at,wt)=>at.sortKey-wt.sortKey);for(let at of pe){let{geometry:wt,index:Ht,sourceLayerIndex:rr}=at,pr=S[Ht].feature;this.addFeature(at,wt,Ht,Z),D.featureIndex.insert(pr,wt,Ht,rr,this.index)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,Ye),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,D,Z,ie){for(let pe of D)for(let xe of pe){let He=xe.x,at=xe.y;if(He<0||He>=Rl||at<0||at>=Rl)continue;let wt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,S.sortKey),Ht=wt.vertexLength;xf(this.layoutVertexArray,He,at,-1,-1),xf(this.layoutVertexArray,He,at,1,-1),xf(this.layoutVertexArray,He,at,1,1),xf(this.layoutVertexArray,He,at,-1,1),this.indexArray.emplaceBack(Ht,Ht+1,Ht+2),this.indexArray.emplaceBack(Ht,Ht+3,Ht+2),wt.vertexLength+=4,wt.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,{},ie)}}function dc(I,S){for(let D=0;D<I.length;D++)if(Vs(S,I[D]))return!0;for(let D=0;D<S.length;D++)if(Vs(I,S[D]))return!0;return!!Mn(I,S)}function Gt(I,S,D){return!!Vs(I,S)||!!fa(S,I,D)}function jr(I,S){if(I.length===1)return Io(S,I[0]);for(let D=0;D<S.length;D++){let Z=S[D];for(let ie=0;ie<Z.length;ie++)if(Vs(I,Z[ie]))return!0}for(let D=0;D<I.length;D++)if(Io(S,I[D]))return!0;for(let D=0;D<S.length;D++)if(Mn(I,S[D]))return!0;return!1}function _i(I,S,D){if(I.length>1){if(Mn(I,S))return!0;for(let Z=0;Z<S.length;Z++)if(fa(S[Z],I,D))return!0}for(let Z=0;Z<I.length;Z++)if(fa(I[Z],S,D))return!0;return!1}function Mn(I,S){if(I.length===0||S.length===0)return!1;for(let D=0;D<I.length-1;D++){let Z=I[D],ie=I[D+1];for(let pe=0;pe<S.length-1;pe++)if(Ta(Z,ie,S[pe],S[pe+1]))return!0}return!1}function Ta(I,S,D,Z){return F(I,D,Z)!==F(S,D,Z)&&F(I,S,D)!==F(I,S,Z)}function fa(I,S,D){let Z=D*D;if(S.length===1)return I.distSqr(S[0])<Z;for(let ie=1;ie<S.length;ie++)if(ha(I,S[ie-1],S[ie])<Z)return!0;return!1}function ha(I,S,D){let Z=S.distSqr(D);if(Z===0)return I.distSqr(S);let ie=((I.x-S.x)*(D.x-S.x)+(I.y-S.y)*(D.y-S.y))/Z;return I.distSqr(ie<0?S:ie>1?D:D.sub(S)._mult(ie)._add(S))}function Io(I,S){let D,Z,ie,pe=!1;for(let xe=0;xe<I.length;xe++){D=I[xe];for(let He=0,at=D.length-1;He<D.length;at=He++)Z=D[He],ie=D[at],Z.y>S.y!=ie.y>S.y&&S.x<(ie.x-Z.x)*(S.y-Z.y)/(ie.y-Z.y)+Z.x&&(pe=!pe)}return pe}function Vs(I,S){let D=!1;for(let Z=0,ie=I.length-1;Z<I.length;ie=Z++){let pe=I[Z],xe=I[ie];pe.y>S.y!=xe.y>S.y&&S.x<(xe.x-pe.x)*(S.y-pe.y)/(xe.y-pe.y)+pe.x&&(D=!D)}return D}function Hs(I,S,D){let Z=D[0],ie=D[2];if(I.x<Z.x&&S.x<Z.x||I.x>ie.x&&S.x>ie.x||I.y<Z.y&&S.y<Z.y||I.y>ie.y&&S.y>ie.y)return!1;let pe=F(I,S,D[0]);return pe!==F(I,S,D[1])||pe!==F(I,S,D[2])||pe!==F(I,S,D[3])}function is(I,S,D){let Z=S.paint.get(I).value;return Z.kind==="constant"?Z.value:D.programConfigurations.get(S.id).getMaxValue(I)}function su(I){return Math.sqrt(I[0]*I[0]+I[1]*I[1])}function Ps(I,S,D,Z,ie){if(!S[0]&&!S[1])return I;let pe=l.convert(S)._mult(ie);D==="viewport"&&pe._rotate(-Z);let xe=[];for(let He=0;He<I.length;He++)xe.push(I[He].sub(pe));return xe}let qs,Do;gi("CircleBucket",hf,{omit:["layers"]});var kn={get paint(){return Do=Do||new oe({"circle-radius":new _s(fe.paint_circle["circle-radius"]),"circle-color":new _s(fe.paint_circle["circle-color"]),"circle-blur":new _s(fe.paint_circle["circle-blur"]),"circle-opacity":new _s(fe.paint_circle["circle-opacity"]),"circle-translate":new Uo(fe.paint_circle["circle-translate"]),"circle-translate-anchor":new Uo(fe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Uo(fe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Uo(fe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new _s(fe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new _s(fe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new _s(fe.paint_circle["circle-stroke-opacity"])})},get layout(){return qs=qs||new oe({"circle-sort-key":new _s(fe.layout_circle["circle-sort-key"])})}},La=1e-6,Es=typeof Float32Array!="undefined"?Float32Array:Array;function Ws(I){return I[0]=1,I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[5]=1,I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[10]=1,I[11]=0,I[12]=0,I[13]=0,I[14]=0,I[15]=1,I}function Qo(I,S,D){var Z=S[0],ie=S[1],pe=S[2],xe=S[3],He=S[4],at=S[5],wt=S[6],Ht=S[7],rr=S[8],pr=S[9],Ar=S[10],Vr=S[11],ri=S[12],Ii=S[13],Zi=S[14],da=S[15],cn=D[0],jn=D[1],Va=D[2],hl=D[3];return I[0]=cn*Z+jn*He+Va*rr+hl*ri,I[1]=cn*ie+jn*at+Va*pr+hl*Ii,I[2]=cn*pe+jn*wt+Va*Ar+hl*Zi,I[3]=cn*xe+jn*Ht+Va*Vr+hl*da,I[4]=(cn=D[4])*Z+(jn=D[5])*He+(Va=D[6])*rr+(hl=D[7])*ri,I[5]=cn*ie+jn*at+Va*pr+hl*Ii,I[6]=cn*pe+jn*wt+Va*Ar+hl*Zi,I[7]=cn*xe+jn*Ht+Va*Vr+hl*da,I[8]=(cn=D[8])*Z+(jn=D[9])*He+(Va=D[10])*rr+(hl=D[11])*ri,I[9]=cn*ie+jn*at+Va*pr+hl*Ii,I[10]=cn*pe+jn*wt+Va*Ar+hl*Zi,I[11]=cn*xe+jn*Ht+Va*Vr+hl*da,I[12]=(cn=D[12])*Z+(jn=D[13])*He+(Va=D[14])*rr+(hl=D[15])*ri,I[13]=cn*ie+jn*at+Va*pr+hl*Ii,I[14]=cn*pe+jn*wt+Va*Ar+hl*Zi,I[15]=cn*xe+jn*Ht+Va*Vr+hl*da,I}Math.hypot||(Math.hypot=function(){for(var I=0,S=arguments.length;S--;)I+=arguments[S]*arguments[S];return Math.sqrt(I)});var bl,nl=Qo;function ru(I,S,D){var Z=S[0],ie=S[1],pe=S[2],xe=S[3];return I[0]=D[0]*Z+D[4]*ie+D[8]*pe+D[12]*xe,I[1]=D[1]*Z+D[5]*ie+D[9]*pe+D[13]*xe,I[2]=D[2]*Z+D[6]*ie+D[10]*pe+D[14]*xe,I[3]=D[3]*Z+D[7]*ie+D[11]*pe+D[15]*xe,I}bl=new Es(4),Es!=Float32Array&&(bl[0]=0,bl[1]=0,bl[2]=0,bl[3]=0);class hs extends B{constructor(S){super(S,kn)}createBucket(S){return new hf(S)}queryRadius(S){let D=S;return is("circle-radius",this,D)+is("circle-stroke-width",this,D)+su(this.paint.get("circle-translate"))}queryIntersectsFeature(S,D,Z,ie,pe,xe,He,at){let wt=Ps(S,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),xe.angle,He),Ht=this.paint.get("circle-radius").evaluate(D,Z)+this.paint.get("circle-stroke-width").evaluate(D,Z),rr=this.paint.get("circle-pitch-alignment")==="map",pr=rr?wt:function(Vr,ri){return Vr.map(Ii=>Ho(Ii,ri))}(wt,at),Ar=rr?Ht*He:Ht;for(let Vr of ie)for(let ri of Vr){let Ii=rr?ri:Ho(ri,at),Zi=Ar,da=ru([],[ri.x,ri.y,0,1],at);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Zi*=da[3]/xe.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Zi*=xe.cameraToCenterDistance/da[3]),Gt(pr,Ii,Zi))return!0}return!1}}function Ho(I,S){let D=ru([],[I.x,I.y,0,1],S);return new l(D[0]/D[3],D[1]/D[3])}class ql extends hf{}let yl;gi("HeatmapBucket",ql,{omit:["layers"]});var tl={get paint(){return yl=yl||new oe({"heatmap-radius":new _s(fe.paint_heatmap["heatmap-radius"]),"heatmap-weight":new _s(fe.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Uo(fe.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Dl(fe.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Uo(fe.paint_heatmap["heatmap-opacity"])})}};function js(I,{width:S,height:D},Z,ie){if(ie){if(ie instanceof Uint8ClampedArray)ie=new Uint8Array(ie.buffer);else if(ie.length!==S*D*Z)throw new RangeError(`mismatched image size. expected: ${ie.length} but got: ${S*D*Z}`)}else ie=new Uint8Array(S*D*Z);return I.width=S,I.height=D,I.data=ie,I}function zl(I,{width:S,height:D},Z){if(S===I.width&&D===I.height)return;let ie=js({},{width:S,height:D},Z);lu(I,ie,{x:0,y:0},{x:0,y:0},{width:Math.min(I.width,S),height:Math.min(I.height,D)},Z),I.width=S,I.height=D,I.data=ie.data}function lu(I,S,D,Z,ie,pe){if(ie.width===0||ie.height===0)return S;if(ie.width>I.width||ie.height>I.height||D.x>I.width-ie.width||D.y>I.height-ie.height)throw new RangeError("out of range source coordinates for image copy");if(ie.width>S.width||ie.height>S.height||Z.x>S.width-ie.width||Z.y>S.height-ie.height)throw new RangeError("out of range destination coordinates for image copy");let xe=I.data,He=S.data;if(xe===He)throw new Error("srcData equals dstData, so image is already copied");for(let at=0;at<ie.height;at++){let wt=((D.y+at)*I.width+D.x)*pe,Ht=((Z.y+at)*S.width+Z.x)*pe;for(let rr=0;rr<ie.width*pe;rr++)He[Ht+rr]=xe[wt+rr]}return S}class bu{constructor(S,D){js(this,S,1,D)}resize(S){zl(this,S,1)}clone(){return new bu({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(S,D,Z,ie,pe){lu(S,D,Z,ie,pe,1)}}class al{constructor(S,D){js(this,S,4,D)}resize(S){zl(this,S,4)}replace(S,D){D?this.data.set(S):this.data=S instanceof Uint8ClampedArray?new Uint8Array(S.buffer):S}clone(){return new al({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(S,D,Z,ie,pe){lu(S,D,Z,ie,pe,4)}}function jl(I){let S={},D=I.resolution||256,Z=I.clips?I.clips.length:1,ie=I.image||new al({width:D,height:Z});if(Math.log(D)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${D}`);let pe=(xe,He,at)=>{S[I.evaluationKey]=at;let wt=I.expression.evaluate(S);ie.data[xe+He+0]=Math.floor(255*wt.r/wt.a),ie.data[xe+He+1]=Math.floor(255*wt.g/wt.a),ie.data[xe+He+2]=Math.floor(255*wt.b/wt.a),ie.data[xe+He+3]=Math.floor(255*wt.a)};if(I.clips)for(let xe=0,He=0;xe<Z;++xe,He+=4*D)for(let at=0,wt=0;at<D;at++,wt+=4){let Ht=at/(D-1),{start:rr,end:pr}=I.clips[xe];pe(He,wt,rr*(1-Ht)+pr*Ht)}else for(let xe=0,He=0;xe<D;xe++,He+=4)pe(0,He,xe/(D-1));return ie}gi("AlphaImage",bu),gi("RGBAImage",al);let mu="big-fb";class Tu extends B{createBucket(S){return new ql(S)}constructor(S){super(S,tl),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(S){S==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=jl({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(mu)&&this.heatmapFbos.delete(mu)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Ru;var Rf={get paint(){return Ru=Ru||new oe({"hillshade-illumination-direction":new Uo(fe.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Uo(fe.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Uo(fe.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Uo(fe.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Uo(fe.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Uo(fe.paint_hillshade["hillshade-accent-color"])})}};class Cc extends B{constructor(S){super(S,Rf)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}let rf=Ne([{name:"a_pos",components:2,type:"Int16"}],4),{members:Lc}=rf;function wf(I,S,D=2){let Z=S&&S.length,ie=Z?S[0]*D:I.length,pe=pc(I,0,ie,D,!0),xe=[];if(!pe||pe.next===pe.prev)return xe;let He,at,wt;if(Z&&(pe=function(Ht,rr,pr,Ar){let Vr=[];for(let ri=0,Ii=rr.length;ri<Ii;ri++){let Zi=pc(Ht,rr[ri]*Ar,ri<Ii-1?rr[ri+1]*Ar:Ht.length,Ar,!1);Zi===Zi.next&&(Zi.steiner=!0),Vr.push(K(Zi))}Vr.sort(Bc);for(let ri=0;ri<Vr.length;ri++)pr=Ou(Vr[ri],pr);return pr}(I,S,pe,D)),I.length>80*D){He=1/0,at=1/0;let Ht=-1/0,rr=-1/0;for(let pr=D;pr<ie;pr+=D){let Ar=I[pr],Vr=I[pr+1];Ar<He&&(He=Ar),Vr<at&&(at=Vr),Ar>Ht&&(Ht=Ar),Vr>rr&&(rr=Vr)}wt=Math.max(Ht-He,rr-at),wt=wt!==0?32767/wt:0}return qc(pe,xe,D,He,at,wt,0),xe}function pc(I,S,D,Z,ie){let pe;if(ie===function(xe,He,at,wt){let Ht=0;for(let rr=He,pr=at-wt;rr<at;rr+=wt)Ht+=(xe[pr]-xe[rr])*(xe[rr+1]+xe[pr+1]),pr=rr;return Ht}(I,S,D,Z)>0)for(let xe=S;xe<D;xe+=Z)pe=cr(xe/Z|0,I[xe],I[xe+1],pe);else for(let xe=D-Z;xe>=S;xe-=Z)pe=cr(xe/Z|0,I[xe],I[xe+1],pe);return pe&&ge(pe,pe.next)&&(It(pe),pe=pe.next),pe}function vc(I,S){if(!I)return I;S||(S=I);let D,Z=I;do if(D=!1,Z.steiner||!ge(Z,Z.next)&&we(Z.prev,Z,Z.next)!==0)Z=Z.next;else{if(It(Z),Z=S=Z.prev,Z===Z.next)break;D=!0}while(D||Z!==S);return S}function qc(I,S,D,Z,ie,pe,xe){if(!I)return;!xe&&pe&&function(at,wt,Ht,rr){let pr=at;do pr.z===0&&(pr.z=R(pr.x,pr.y,wt,Ht,rr)),pr.prevZ=pr.prev,pr.nextZ=pr.next,pr=pr.next;while(pr!==at);pr.prevZ.nextZ=null,pr.prevZ=null,function(Ar){let Vr,ri=1;do{let Ii,Zi=Ar;Ar=null;let da=null;for(Vr=0;Zi;){Vr++;let cn=Zi,jn=0;for(let hl=0;hl<ri&&(jn++,cn=cn.nextZ,cn);hl++);let Va=ri;for(;jn>0||Va>0&&cn;)jn!==0&&(Va===0||!cn||Zi.z<=cn.z)?(Ii=Zi,Zi=Zi.nextZ,jn--):(Ii=cn,cn=cn.nextZ,Va--),da?da.nextZ=Ii:Ar=Ii,Ii.prevZ=da,da=Ii;Zi=cn}da.nextZ=null,ri*=2}while(Vr>1)}(pr)}(I,Z,ie,pe);let He=I;for(;I.prev!==I.next;){let at=I.prev,wt=I.next;if(pe?Tc(I,Z,ie,pe):If(I))S.push(at.i,I.i,wt.i),It(I),I=wt.next,He=wt.next;else if((I=wt)===He){xe?xe===1?qc(I=zc(vc(I),S),S,D,Z,ie,pe,2):xe===2&&Vu(I,S,D,Z,ie,pe):qc(vc(I),S,D,Z,ie,pe,1);break}}}function If(I){let S=I.prev,D=I,Z=I.next;if(we(S,D,Z)>=0)return!1;let ie=S.x,pe=D.x,xe=Z.x,He=S.y,at=D.y,wt=Z.y,Ht=ie<pe?ie<xe?ie:xe:pe<xe?pe:xe,rr=He<at?He<wt?He:wt:at<wt?at:wt,pr=ie>pe?ie>xe?ie:xe:pe>xe?pe:xe,Ar=He>at?He>wt?He:wt:at>wt?at:wt,Vr=Z.next;for(;Vr!==S;){if(Vr.x>=Ht&&Vr.x<=pr&&Vr.y>=rr&&Vr.y<=Ar&&N(ie,He,pe,at,xe,wt,Vr.x,Vr.y)&&we(Vr.prev,Vr,Vr.next)>=0)return!1;Vr=Vr.next}return!0}function Tc(I,S,D,Z){let ie=I.prev,pe=I,xe=I.next;if(we(ie,pe,xe)>=0)return!1;let He=ie.x,at=pe.x,wt=xe.x,Ht=ie.y,rr=pe.y,pr=xe.y,Ar=He<at?He<wt?He:wt:at<wt?at:wt,Vr=Ht<rr?Ht<pr?Ht:pr:rr<pr?rr:pr,ri=He>at?He>wt?He:wt:at>wt?at:wt,Ii=Ht>rr?Ht>pr?Ht:pr:rr>pr?rr:pr,Zi=R(Ar,Vr,S,D,Z),da=R(ri,Ii,S,D,Z),cn=I.prevZ,jn=I.nextZ;for(;cn&&cn.z>=Zi&&jn&&jn.z<=da;){if(cn.x>=Ar&&cn.x<=ri&&cn.y>=Vr&&cn.y<=Ii&&cn!==ie&&cn!==xe&&N(He,Ht,at,rr,wt,pr,cn.x,cn.y)&&we(cn.prev,cn,cn.next)>=0||(cn=cn.prevZ,jn.x>=Ar&&jn.x<=ri&&jn.y>=Vr&&jn.y<=Ii&&jn!==ie&&jn!==xe&&N(He,Ht,at,rr,wt,pr,jn.x,jn.y)&&we(jn.prev,jn,jn.next)>=0))return!1;jn=jn.nextZ}for(;cn&&cn.z>=Zi;){if(cn.x>=Ar&&cn.x<=ri&&cn.y>=Vr&&cn.y<=Ii&&cn!==ie&&cn!==xe&&N(He,Ht,at,rr,wt,pr,cn.x,cn.y)&&we(cn.prev,cn,cn.next)>=0)return!1;cn=cn.prevZ}for(;jn&&jn.z<=da;){if(jn.x>=Ar&&jn.x<=ri&&jn.y>=Vr&&jn.y<=Ii&&jn!==ie&&jn!==xe&&N(He,Ht,at,rr,wt,pr,jn.x,jn.y)&&we(jn.prev,jn,jn.next)>=0)return!1;jn=jn.nextZ}return!0}function zc(I,S){let D=I;do{let Z=D.prev,ie=D.next.next;!ge(Z,ie)&&Ue(Z,D,D.next,ie)&&ur(Z,ie)&&ur(ie,Z)&&(S.push(Z.i,D.i,ie.i),It(D),It(D.next),D=I=ie),D=D.next}while(D!==I);return vc(D)}function Vu(I,S,D,Z,ie,pe){let xe=I;do{let He=xe.next.next;for(;He!==xe.prev;){if(xe.i!==He.i&&$(xe,He)){let at=gr(xe,He);return xe=vc(xe,xe.next),at=vc(at,at.next),qc(xe,S,D,Z,ie,pe,0),void qc(at,S,D,Z,ie,pe,0)}He=He.next}xe=xe.next}while(xe!==I)}function Bc(I,S){return I.x-S.x}function Ou(I,S){let D=function(ie,pe){let xe=pe,He=ie.x,at=ie.y,wt,Ht=-1/0;do{if(at<=xe.y&&at>=xe.next.y&&xe.next.y!==xe.y){let ri=xe.x+(at-xe.y)*(xe.next.x-xe.x)/(xe.next.y-xe.y);if(ri<=He&&ri>Ht&&(Ht=ri,wt=xe.x<xe.next.x?xe:xe.next,ri===He))return wt}xe=xe.next}while(xe!==pe);if(!wt)return null;let rr=wt,pr=wt.x,Ar=wt.y,Vr=1/0;xe=wt;do{if(He>=xe.x&&xe.x>=pr&&He!==xe.x&&N(at<Ar?He:Ht,at,pr,Ar,at<Ar?Ht:He,at,xe.x,xe.y)){let ri=Math.abs(at-xe.y)/(He-xe.x);ur(xe,ie)&&(ri<Vr||ri===Vr&&(xe.x>wt.x||xe.x===wt.x&&Y(wt,xe)))&&(wt=xe,Vr=ri)}xe=xe.next}while(xe!==rr);return wt}(I,S);if(!D)return S;let Z=gr(D,I);return vc(Z,Z.next),vc(D,D.next)}function Y(I,S){return we(I.prev,I,S.prev)<0&&we(S.next,I,I.next)<0}function R(I,S,D,Z,ie){return(I=1431655765&((I=858993459&((I=252645135&((I=16711935&((I=(I-D)*ie|0)|I<<8))|I<<4))|I<<2))|I<<1))|(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=(S-Z)*ie|0)|S<<8))|S<<4))|S<<2))|S<<1))<<1}function K(I){let S=I,D=I;do(S.x<D.x||S.x===D.x&&S.y<D.y)&&(D=S),S=S.next;while(S!==I);return D}function N(I,S,D,Z,ie,pe,xe,He){return(ie-xe)*(S-He)>=(I-xe)*(pe-He)&&(I-xe)*(Z-He)>=(D-xe)*(S-He)&&(D-xe)*(pe-He)>=(ie-xe)*(Z-He)}function $(I,S){return I.next.i!==S.i&&I.prev.i!==S.i&&!function(D,Z){let ie=D;do{if(ie.i!==D.i&&ie.next.i!==D.i&&ie.i!==Z.i&&ie.next.i!==Z.i&&Ue(ie,ie.next,D,Z))return!0;ie=ie.next}while(ie!==D);return!1}(I,S)&&(ur(I,S)&&ur(S,I)&&function(D,Z){let ie=D,pe=!1,xe=(D.x+Z.x)/2,He=(D.y+Z.y)/2;do ie.y>He!=ie.next.y>He&&ie.next.y!==ie.y&&xe<(ie.next.x-ie.x)*(He-ie.y)/(ie.next.y-ie.y)+ie.x&&(pe=!pe),ie=ie.next;while(ie!==D);return pe}(I,S)&&(we(I.prev,I,S.prev)||we(I,S.prev,S))||ge(I,S)&&we(I.prev,I,I.next)>0&&we(S.prev,S,S.next)>0)}function we(I,S,D){return(S.y-I.y)*(D.x-S.x)-(S.x-I.x)*(D.y-S.y)}function ge(I,S){return I.x===S.x&&I.y===S.y}function Ue(I,S,D,Z){let ie=Rt(we(I,S,D)),pe=Rt(we(I,S,Z)),xe=Rt(we(D,Z,I)),He=Rt(we(D,Z,S));return ie!==pe&&xe!==He||!(ie!==0||!dt(I,D,S))||!(pe!==0||!dt(I,Z,S))||!(xe!==0||!dt(D,I,Z))||!(He!==0||!dt(D,S,Z))}function dt(I,S,D){return S.x<=Math.max(I.x,D.x)&&S.x>=Math.min(I.x,D.x)&&S.y<=Math.max(I.y,D.y)&&S.y>=Math.min(I.y,D.y)}function Rt(I){return I>0?1:I<0?-1:0}function ur(I,S){return we(I.prev,I,I.next)<0?we(I,S,I.next)>=0&&we(I,I.prev,S)>=0:we(I,S,I.prev)<0||we(I,I.next,S)<0}function gr(I,S){let D=Qt(I.i,I.x,I.y),Z=Qt(S.i,S.x,S.y),ie=I.next,pe=S.prev;return I.next=S,S.prev=I,D.next=ie,ie.prev=D,Z.next=D,D.prev=Z,pe.next=Z,Z.prev=pe,Z}function cr(I,S,D,Z){let ie=Qt(I,S,D);return Z?(ie.next=Z.next,ie.prev=Z,Z.next.prev=ie,Z.next=ie):(ie.prev=ie,ie.next=ie),ie}function It(I){I.next.prev=I.prev,I.prev.next=I.next,I.prevZ&&(I.prevZ.nextZ=I.nextZ),I.nextZ&&(I.nextZ.prevZ=I.prevZ)}function Qt(I,S,D){return{i:I,x:S,y:D,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function ar(I,S,D){let Z=D.patternDependencies,ie=!1;for(let pe of S){let xe=pe.paint.get(`${I}-pattern`);xe.isConstant()||(ie=!0);let He=xe.constantOr(null);He&&(ie=!0,Z[He.to]=!0,Z[He.from]=!0)}return ie}function mr(I,S,D,Z,ie){let pe=ie.patternDependencies;for(let xe of S){let He=xe.paint.get(`${I}-pattern`).value;if(He.kind!=="constant"){let at=He.evaluate({zoom:Z-1},D,{},ie.availableImages),wt=He.evaluate({zoom:Z},D,{},ie.availableImages),Ht=He.evaluate({zoom:Z+1},D,{},ie.availableImages);at=at&&at.name?at.name:at,wt=wt&&wt.name?wt.name:wt,Ht=Ht&&Ht.name?Ht.name:Ht,pe[at]=!0,pe[wt]=!0,pe[Ht]=!0,D.patterns[xe.id]={min:at,mid:wt,max:Ht}}}return D}class Pr{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(D=>D.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Hu,this.indexArray=new se,this.indexArray2=new Le,this.programConfigurations=new qu(S.layers,S.zoom),this.segments=new it,this.segments2=new it,this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){this.hasPattern=ar("fill",this.layers,D);let ie=this.layers[0].layout.get("fill-sort-key"),pe=!ie.isConstant(),xe=[];for(let{feature:He,id:at,index:wt,sourceLayerIndex:Ht}of S){let rr=this.layers[0]._featureFilter.needGeometry,pr=ff(He,rr);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),pr,Z))continue;let Ar=pe?ie.evaluate(pr,{},Z,D.availableImages):void 0,Vr={id:at,properties:He.properties,type:He.type,sourceLayerIndex:Ht,index:wt,geometry:rr?pr.geometry:of(He),patterns:{},sortKey:Ar};xe.push(Vr)}pe&&xe.sort((He,at)=>He.sortKey-at.sortKey);for(let He of xe){let{geometry:at,index:wt,sourceLayerIndex:Ht}=He;if(this.hasPattern){let rr=mr("fill",this.layers,He,this.zoom,D);this.patternFeatures.push(rr)}else this.addFeature(He,at,wt,Z,{});D.featureIndex.insert(S[wt].feature,at,wt,Ht,this.index)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}addFeatures(S,D,Z){for(let ie of this.patternFeatures)this.addFeature(ie,ie.geometry,ie.index,D,Z)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,Lc),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,D,Z,ie,pe){for(let xe of ks(D,500)){let He=0;for(let Ar of xe)He+=Ar.length;let at=this.segments.prepareSegment(He,this.layoutVertexArray,this.indexArray),wt=at.vertexLength,Ht=[],rr=[];for(let Ar of xe){if(Ar.length===0)continue;Ar!==xe[0]&&rr.push(Ht.length/2);let Vr=this.segments2.prepareSegment(Ar.length,this.layoutVertexArray,this.indexArray2),ri=Vr.vertexLength;this.layoutVertexArray.emplaceBack(Ar[0].x,Ar[0].y),this.indexArray2.emplaceBack(ri+Ar.length-1,ri),Ht.push(Ar[0].x),Ht.push(Ar[0].y);for(let Ii=1;Ii<Ar.length;Ii++)this.layoutVertexArray.emplaceBack(Ar[Ii].x,Ar[Ii].y),this.indexArray2.emplaceBack(ri+Ii-1,ri+Ii),Ht.push(Ar[Ii].x),Ht.push(Ar[Ii].y);Vr.vertexLength+=Ar.length,Vr.primitiveLength+=Ar.length}let pr=wf(Ht,rr);for(let Ar=0;Ar<pr.length;Ar+=3)this.indexArray.emplaceBack(wt+pr[Ar],wt+pr[Ar+1],wt+pr[Ar+2]);at.vertexLength+=He,at.primitiveLength+=pr.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,pe,ie)}}let Dr,Xr;gi("FillBucket",Pr,{omit:["layers","patternFeatures"]});var Gr={get paint(){return Xr=Xr||new oe({"fill-antialias":new Uo(fe.paint_fill["fill-antialias"]),"fill-opacity":new _s(fe.paint_fill["fill-opacity"]),"fill-color":new _s(fe.paint_fill["fill-color"]),"fill-outline-color":new _s(fe.paint_fill["fill-outline-color"]),"fill-translate":new Uo(fe.paint_fill["fill-translate"]),"fill-translate-anchor":new Uo(fe.paint_fill["fill-translate-anchor"]),"fill-pattern":new Bl(fe.paint_fill["fill-pattern"])})},get layout(){return Dr=Dr||new oe({"fill-sort-key":new _s(fe.layout_fill["fill-sort-key"])})}};class Fr extends B{constructor(S){super(S,Gr)}recalculate(S,D){super.recalculate(S,D);let Z=this.paint._values["fill-outline-color"];Z.value.kind==="constant"&&Z.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(S){return new Pr(S)}queryRadius(){return su(this.paint.get("fill-translate"))}queryIntersectsFeature(S,D,Z,ie,pe,xe,He){return jr(Ps(S,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),xe.angle,He),ie)}isTileClipped(){return!0}}let Kr=Ne([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Cr=Ne([{name:"a_centroid",components:2,type:"Int16"}],4),{members:yi}=Kr;var qi={},vn=s,Qa=ra;function ra(I,S,D,Z,ie){this.properties={},this.extent=D,this.type=0,this._pbf=I,this._geometry=-1,this._keys=Z,this._values=ie,I.readFields(mo,this,S)}function mo(I,S,D){I==1?S.id=D.readVarint():I==2?function(Z,ie){for(var pe=Z.readVarint()+Z.pos;Z.pos<pe;){var xe=ie._keys[Z.readVarint()],He=ie._values[Z.readVarint()];ie.properties[xe]=He}}(D,S):I==3?S.type=D.readVarint():I==4&&(S._geometry=D.pos)}function sl(I){for(var S,D,Z=0,ie=0,pe=I.length,xe=pe-1;ie<pe;xe=ie++)Z+=((D=I[xe]).x-(S=I[ie]).x)*(S.y+D.y);return Z}ra.types=["Unknown","Point","LineString","Polygon"],ra.prototype.loadGeometry=function(){var I=this._pbf;I.pos=this._geometry;for(var S,D=I.readVarint()+I.pos,Z=1,ie=0,pe=0,xe=0,He=[];I.pos<D;){if(ie<=0){var at=I.readVarint();Z=7&at,ie=at>>3}if(ie--,Z===1||Z===2)pe+=I.readSVarint(),xe+=I.readSVarint(),Z===1&&(S&&He.push(S),S=[]),S.push(new vn(pe,xe));else{if(Z!==7)throw new Error("unknown command "+Z);S&&S.push(S[0].clone())}}return S&&He.push(S),He},ra.prototype.bbox=function(){var I=this._pbf;I.pos=this._geometry;for(var S=I.readVarint()+I.pos,D=1,Z=0,ie=0,pe=0,xe=1/0,He=-1/0,at=1/0,wt=-1/0;I.pos<S;){if(Z<=0){var Ht=I.readVarint();D=7&Ht,Z=Ht>>3}if(Z--,D===1||D===2)(ie+=I.readSVarint())<xe&&(xe=ie),ie>He&&(He=ie),(pe+=I.readSVarint())<at&&(at=pe),pe>wt&&(wt=pe);else if(D!==7)throw new Error("unknown command "+D)}return[xe,at,He,wt]},ra.prototype.toGeoJSON=function(I,S,D){var Z,ie,pe=this.extent*Math.pow(2,D),xe=this.extent*I,He=this.extent*S,at=this.loadGeometry(),wt=ra.types[this.type];function Ht(Ar){for(var Vr=0;Vr<Ar.length;Vr++){var ri=Ar[Vr];Ar[Vr]=[360*(ri.x+xe)/pe-180,360/Math.PI*Math.atan(Math.exp((180-360*(ri.y+He)/pe)*Math.PI/180))-90]}}switch(this.type){case 1:var rr=[];for(Z=0;Z<at.length;Z++)rr[Z]=at[Z][0];Ht(at=rr);break;case 2:for(Z=0;Z<at.length;Z++)Ht(at[Z]);break;case 3:for(at=function(Ar){var Vr=Ar.length;if(Vr<=1)return[Ar];for(var ri,Ii,Zi=[],da=0;da<Vr;da++){var cn=sl(Ar[da]);cn!==0&&(Ii===void 0&&(Ii=cn<0),Ii===cn<0?(ri&&Zi.push(ri),ri=[Ar[da]]):ri.push(Ar[da]))}return ri&&Zi.push(ri),Zi}(at),Z=0;Z<at.length;Z++)for(ie=0;ie<at[Z].length;ie++)Ht(at[Z][ie])}at.length===1?at=at[0]:wt="Multi"+wt;var pr={type:"Feature",geometry:{type:wt,coordinates:at},properties:this.properties};return"id"in this&&(pr.id=this.id),pr};var Os=Qa,eo=fs;function fs(I,S){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=I,this._keys=[],this._values=[],this._features=[],I.readFields(es,this,S),this.length=this._features.length}function es(I,S,D){I===15?S.version=D.readVarint():I===1?S.name=D.readString():I===5?S.extent=D.readVarint():I===2?S._features.push(D.pos):I===3?S._keys.push(D.readString()):I===4&&S._values.push(function(Z){for(var ie=null,pe=Z.readVarint()+Z.pos;Z.pos<pe;){var xe=Z.readVarint()>>3;ie=xe===1?Z.readString():xe===2?Z.readFloat():xe===3?Z.readDouble():xe===4?Z.readVarint64():xe===5?Z.readVarint():xe===6?Z.readSVarint():xe===7?Z.readBoolean():null}return ie}(D))}fs.prototype.feature=function(I){if(I<0||I>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[I];var S=this._pbf.readVarint()+this._pbf.pos;return new Os(this._pbf,S,this.extent,this._keys,this._values)};var $s=eo;function Ml(I,S,D){if(I===3){var Z=new $s(D,D.readVarint()+D.pos);Z.length&&(S[Z.name]=Z)}}qi.VectorTile=function(I,S){this.layers=I.readFields(Ml,{},S)},qi.VectorTileFeature=Qa,qi.VectorTileLayer=eo;let Mu=qi.VectorTileFeature.types,Au=Math.pow(2,13);function $u(I,S,D,Z,ie,pe,xe,He){I.emplaceBack(S,D,2*Math.floor(Z*Au)+xe,ie*Au*2,pe*Au*2,Math.round(He))}class du{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(D=>D.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new tf,this.centroidVertexArray=new Jl,this.indexArray=new se,this.programConfigurations=new qu(S.layers,S.zoom),this.segments=new it,this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){this.features=[],this.hasPattern=ar("fill-extrusion",this.layers,D);for(let{feature:ie,id:pe,index:xe,sourceLayerIndex:He}of S){let at=this.layers[0]._featureFilter.needGeometry,wt=ff(ie,at);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),wt,Z))continue;let Ht={id:pe,sourceLayerIndex:He,index:xe,geometry:at?wt.geometry:of(ie),properties:ie.properties,type:ie.type,patterns:{}};this.hasPattern?this.features.push(mr("fill-extrusion",this.layers,Ht,this.zoom,D)):this.addFeature(Ht,Ht.geometry,xe,Z,{}),D.featureIndex.insert(ie,Ht.geometry,xe,He,this.index,!0)}}addFeatures(S,D,Z){for(let ie of this.features){let{geometry:pe}=ie;this.addFeature(ie,pe,ie.index,D,Z)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}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,yi),this.centroidVertexBuffer=S.createVertexBuffer(this.centroidVertexArray,Cr.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,D,Z,ie,pe){for(let xe of ks(D,500)){let He={x:0,y:0,vertexCount:0},at=0;for(let Vr of xe)at+=Vr.length;let wt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let Vr of xe){if(Vr.length===0||yf(Vr))continue;let ri=0;for(let Ii=0;Ii<Vr.length;Ii++){let Zi=Vr[Ii];if(Ii>=1){let da=Vr[Ii-1];if(!Nu(Zi,da)){wt.vertexLength+4>it.MAX_VERTEX_ARRAY_LENGTH&&(wt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let cn=Zi.sub(da)._perp()._unit(),jn=da.dist(Zi);ri+jn>32768&&(ri=0),$u(this.layoutVertexArray,Zi.x,Zi.y,cn.x,cn.y,0,0,ri),$u(this.layoutVertexArray,Zi.x,Zi.y,cn.x,cn.y,0,1,ri),He.x+=2*Zi.x,He.y+=2*Zi.y,He.vertexCount+=2,ri+=jn,$u(this.layoutVertexArray,da.x,da.y,cn.x,cn.y,0,0,ri),$u(this.layoutVertexArray,da.x,da.y,cn.x,cn.y,0,1,ri),He.x+=2*da.x,He.y+=2*da.y,He.vertexCount+=2;let Va=wt.vertexLength;this.indexArray.emplaceBack(Va,Va+2,Va+1),this.indexArray.emplaceBack(Va+1,Va+2,Va+3),wt.vertexLength+=4,wt.primitiveLength+=2}}}}if(wt.vertexLength+at>it.MAX_VERTEX_ARRAY_LENGTH&&(wt=this.segments.prepareSegment(at,this.layoutVertexArray,this.indexArray)),Mu[S.type]!=="Polygon")continue;let Ht=[],rr=[],pr=wt.vertexLength;for(let Vr of xe)if(Vr.length!==0){Vr!==xe[0]&&rr.push(Ht.length/2);for(let ri=0;ri<Vr.length;ri++){let Ii=Vr[ri];$u(this.layoutVertexArray,Ii.x,Ii.y,0,0,1,1,0),He.x+=Ii.x,He.y+=Ii.y,He.vertexCount+=1,Ht.push(Ii.x),Ht.push(Ii.y)}}let Ar=wf(Ht,rr);for(let Vr=0;Vr<Ar.length;Vr+=3)this.indexArray.emplaceBack(pr+Ar[Vr],pr+Ar[Vr+2],pr+Ar[Vr+1]);wt.primitiveLength+=Ar.length/3,wt.vertexLength+=at;for(let Vr=0;Vr<He.vertexCount;Vr++){let ri=Math.floor(He.x/He.vertexCount),Ii=Math.floor(He.y/He.vertexCount);this.centroidVertexArray.emplaceBack(ri,Ii)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,pe,ie)}}function Nu(I,S){return I.x===S.x&&(I.x<0||I.x>Rl)||I.y===S.y&&(I.y<0||I.y>Rl)}function yf(I){return I.every(S=>S.x<0)||I.every(S=>S.x>Rl)||I.every(S=>S.y<0)||I.every(S=>S.y>Rl)}let Kf;gi("FillExtrusionBucket",du,{omit:["layers","features"]});var wd={get paint(){return Kf=Kf||new oe({"fill-extrusion-opacity":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new _s(fe["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Bl(fe["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new _s(fe["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new _s(fe["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Td extends B{constructor(S){super(S,wd)}createBucket(S){return new du(S)}queryRadius(){return su(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(S,D,Z,ie,pe,xe,He,at){let wt=Ps(S,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),xe.angle,He),Ht=this.paint.get("fill-extrusion-height").evaluate(D,Z),rr=this.paint.get("fill-extrusion-base").evaluate(D,Z),pr=function(Vr,ri,Ii,Zi){let da=[];for(let cn of Vr){let jn=[cn.x,cn.y,0,1];ru(jn,jn,ri),da.push(new l(jn[0]/jn[3],jn[1]/jn[3]))}return da}(wt,at),Ar=function(Vr,ri,Ii,Zi){let da=[],cn=[],jn=Zi[8]*ri,Va=Zi[9]*ri,hl=Zi[10]*ri,iu=Zi[11]*ri,Su=Zi[8]*Ii,Zl=Zi[9]*Ii,Qs=Zi[10]*Ii,gu=Zi[11]*Ii;for(let cu of Vr){let uu=[],Ts=[];for(let wu of cu){let fu=wu.x,Lu=wu.y,oc=Zi[0]*fu+Zi[4]*Lu+Zi[12],tc=Zi[1]*fu+Zi[5]*Lu+Zi[13],Ch=Zi[2]*fu+Zi[6]*Lu+Zi[14],$p=Zi[3]*fu+Zi[7]*Lu+Zi[15],ud=Ch+hl,Lh=$p+iu,Wd=oc+Su,jd=tc+Zl,Zd=Ch+Qs,Kc=$p+gu,zh=new l((oc+jn)/Lh,(tc+Va)/Lh);zh.z=ud/Lh,uu.push(zh);let Cd=new l(Wd/Kc,jd/Kc);Cd.z=Zd/Kc,Ts.push(Cd)}da.push(uu),cn.push(Ts)}return[da,cn]}(ie,rr,Ht,at);return function(Vr,ri,Ii){let Zi=1/0;jr(Ii,ri)&&(Zi=Yp(Ii,ri[0]));for(let da=0;da<ri.length;da++){let cn=ri[da],jn=Vr[da];for(let Va=0;Va<cn.length-1;Va++){let hl=cn[Va],iu=[hl,cn[Va+1],jn[Va+1],jn[Va],hl];dc(Ii,iu)&&(Zi=Math.min(Zi,Yp(Ii,iu)))}}return Zi!==1/0&&Zi}(Ar[0],Ar[1],pr)}}function Ad(I,S){return I.x*S.x+I.y*S.y}function Yp(I,S){if(I.length===1){let D=0,Z=S[D++],ie;for(;!ie||Z.equals(ie);)if(ie=S[D++],!ie)return 1/0;for(;D<S.length;D++){let pe=S[D],xe=I[0],He=ie.sub(Z),at=pe.sub(Z),wt=xe.sub(Z),Ht=Ad(He,He),rr=Ad(He,at),pr=Ad(at,at),Ar=Ad(wt,He),Vr=Ad(wt,at),ri=Ht*pr-rr*rr,Ii=(pr*Ar-rr*Vr)/ri,Zi=(Ht*Vr-rr*Ar)/ri,da=Z.z*(1-Ii-Zi)+ie.z*Ii+pe.z*Zi;if(isFinite(da))return da}return 1/0}{let D=1/0;for(let Z of S)D=Math.min(D,Z.z);return D}}let fy=Ne([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:pv}=fy,Sd=Ne([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:vv}=Sd,Gd=qi.VectorTileFeature.types,Md=Math.cos(Math.PI/180*37.5),kp=Math.pow(2,14)/.5;class Kp{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(D=>D.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(D=>{this.gradients[D.id]={}}),this.layoutVertexArray=new Ku,this.layoutVertexArray2=new Gu,this.indexArray=new se,this.programConfigurations=new qu(S.layers,S.zoom),this.segments=new it,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){this.hasPattern=ar("line",this.layers,D);let ie=this.layers[0].layout.get("line-sort-key"),pe=!ie.isConstant(),xe=[];for(let{feature:He,id:at,index:wt,sourceLayerIndex:Ht}of S){let rr=this.layers[0]._featureFilter.needGeometry,pr=ff(He,rr);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),pr,Z))continue;let Ar=pe?ie.evaluate(pr,{},Z):void 0,Vr={id:at,properties:He.properties,type:He.type,sourceLayerIndex:Ht,index:wt,geometry:rr?pr.geometry:of(He),patterns:{},sortKey:Ar};xe.push(Vr)}pe&&xe.sort((He,at)=>He.sortKey-at.sortKey);for(let He of xe){let{geometry:at,index:wt,sourceLayerIndex:Ht}=He;if(this.hasPattern){let rr=mr("line",this.layers,He,this.zoom,D);this.patternFeatures.push(rr)}else this.addFeature(He,at,wt,Z,{});D.featureIndex.insert(S[wt].feature,at,wt,Ht,this.index)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}addFeatures(S,D,Z){for(let ie of this.patternFeatures)this.addFeature(ie,ie.geometry,ie.index,D,Z)}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,vv)),this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,pv),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,D,Z,ie,pe){let xe=this.layers[0].layout,He=xe.get("line-join").evaluate(S,{}),at=xe.get("line-cap"),wt=xe.get("line-miter-limit"),Ht=xe.get("line-round-limit");this.lineClips=this.lineFeatureClips(S);for(let rr of D)this.addLine(rr,S,He,at,wt,Ht);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,pe,ie)}addLine(S,D,Z,ie,pe,xe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Zi=0;Zi<S.length-1;Zi++)this.totalDistance+=S[Zi].dist(S[Zi+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let He=Gd[D.type]==="Polygon",at=S.length;for(;at>=2&&S[at-1].equals(S[at-2]);)at--;let wt=0;for(;wt<at-1&&S[wt].equals(S[wt+1]);)wt++;if(at<(He?3:2))return;Z==="bevel"&&(pe=1.05);let Ht=this.overscaling<=16?15*Rl/(512*this.overscaling):0,rr=this.segments.prepareSegment(10*at,this.layoutVertexArray,this.indexArray),pr,Ar,Vr,ri,Ii;this.e1=this.e2=-1,He&&(pr=S[at-2],Ii=S[wt].sub(pr)._unit()._perp());for(let Zi=wt;Zi<at;Zi++){if(Vr=Zi===at-1?He?S[wt+1]:void 0:S[Zi+1],Vr&&S[Zi].equals(Vr))continue;Ii&&(ri=Ii),pr&&(Ar=pr),pr=S[Zi],Ii=Vr?Vr.sub(pr)._unit()._perp():ri,ri=ri||Ii;let da=ri.add(Ii);da.x===0&&da.y===0||da._unit();let cn=ri.x*Ii.x+ri.y*Ii.y,jn=da.x*Ii.x+da.y*Ii.y,Va=jn!==0?1/jn:1/0,hl=2*Math.sqrt(2-2*jn),iu=jn<Md&&Ar&&Vr,Su=ri.x*Ii.y-ri.y*Ii.x>0;if(iu&&Zi>wt){let gu=pr.dist(Ar);if(gu>2*Ht){let cu=pr.sub(pr.sub(Ar)._mult(Ht/gu)._round());this.updateDistance(Ar,cu),this.addCurrentVertex(cu,ri,0,0,rr),Ar=cu}}let Zl=Ar&&Vr,Qs=Zl?Z:He?"butt":ie;if(Zl&&Qs==="round"&&(Va<xe?Qs="miter":Va<=2&&(Qs="fakeround")),Qs==="miter"&&Va>pe&&(Qs="bevel"),Qs==="bevel"&&(Va>2&&(Qs="flipbevel"),Va<pe&&(Qs="miter")),Ar&&this.updateDistance(Ar,pr),Qs==="miter")da._mult(Va),this.addCurrentVertex(pr,da,0,0,rr);else if(Qs==="flipbevel"){if(Va>100)da=Ii.mult(-1);else{let gu=Va*ri.add(Ii).mag()/ri.sub(Ii).mag();da._perp()._mult(gu*(Su?-1:1))}this.addCurrentVertex(pr,da,0,0,rr),this.addCurrentVertex(pr,da.mult(-1),0,0,rr)}else if(Qs==="bevel"||Qs==="fakeround"){let gu=-Math.sqrt(Va*Va-1),cu=Su?gu:0,uu=Su?0:gu;if(Ar&&this.addCurrentVertex(pr,ri,cu,uu,rr),Qs==="fakeround"){let Ts=Math.round(180*hl/Math.PI/20);for(let wu=1;wu<Ts;wu++){let fu=wu/Ts;if(fu!==.5){let oc=fu-.5;fu+=fu*oc*(fu-1)*((1.0904+cn*(cn*(3.55645-1.43519*cn)-3.2452))*oc*oc+(.848013+cn*(.215638*cn-1.06021)))}let Lu=Ii.sub(ri)._mult(fu)._add(ri)._unit()._mult(Su?-1:1);this.addHalfVertex(pr,Lu.x,Lu.y,!1,Su,0,rr)}}Vr&&this.addCurrentVertex(pr,Ii,-cu,-uu,rr)}else if(Qs==="butt")this.addCurrentVertex(pr,da,0,0,rr);else if(Qs==="square"){let gu=Ar?1:-1;this.addCurrentVertex(pr,da,gu,gu,rr)}else Qs==="round"&&(Ar&&(this.addCurrentVertex(pr,ri,0,0,rr),this.addCurrentVertex(pr,ri,1,1,rr,!0)),Vr&&(this.addCurrentVertex(pr,Ii,-1,-1,rr,!0),this.addCurrentVertex(pr,Ii,0,0,rr)));if(iu&&Zi<at-1){let gu=pr.dist(Vr);if(gu>2*Ht){let cu=pr.add(Vr.sub(pr)._mult(Ht/gu)._round());this.updateDistance(pr,cu),this.addCurrentVertex(cu,Ii,0,0,rr),pr=cu}}}}addCurrentVertex(S,D,Z,ie,pe,xe=!1){let He=D.y*ie-D.x,at=-D.y-D.x*ie;this.addHalfVertex(S,D.x+D.y*Z,D.y-D.x*Z,xe,!1,Z,pe),this.addHalfVertex(S,He,at,xe,!0,-ie,pe),this.distance>kp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(S,D,Z,ie,pe,xe))}addHalfVertex({x:S,y:D},Z,ie,pe,xe,He,at){let wt=.5*(this.lineClips?this.scaledDistance*(kp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((S<<1)+(pe?1:0),(D<<1)+(xe?1:0),Math.round(63*Z)+128,Math.round(63*ie)+128,1+(He===0?0:He<0?-1:1)|(63&wt)<<2,wt>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Ht=at.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Ht),at.primitiveLength++),xe?this.e2=Ht:this.e1=Ht}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(S,D){this.distance+=S.dist(D),this.updateScaledDistance()}}let Cp,ng;gi("LineBucket",Kp,{omit:["layers","patternFeatures"]});var cy={get paint(){return ng=ng||new oe({"line-opacity":new _s(fe.paint_line["line-opacity"]),"line-color":new _s(fe.paint_line["line-color"]),"line-translate":new Uo(fe.paint_line["line-translate"]),"line-translate-anchor":new Uo(fe.paint_line["line-translate-anchor"]),"line-width":new _s(fe.paint_line["line-width"]),"line-gap-width":new _s(fe.paint_line["line-gap-width"]),"line-offset":new _s(fe.paint_line["line-offset"]),"line-blur":new _s(fe.paint_line["line-blur"]),"line-dasharray":new Il(fe.paint_line["line-dasharray"]),"line-pattern":new Bl(fe.paint_line["line-pattern"]),"line-gradient":new Dl(fe.paint_line["line-gradient"])})},get layout(){return Cp=Cp||new oe({"line-cap":new Uo(fe.layout_line["line-cap"]),"line-join":new _s(fe.layout_line["line-join"]),"line-miter-limit":new Uo(fe.layout_line["line-miter-limit"]),"line-round-limit":new Uo(fe.layout_line["line-round-limit"]),"line-sort-key":new _s(fe.layout_line["line-sort-key"])})}};class vh extends _s{possiblyEvaluate(S,D){return D=new Fo(Math.floor(D.zoom),{now:D.now,fadeDuration:D.fadeDuration,zoomHistory:D.zoomHistory,transition:D.transition}),super.possiblyEvaluate(S,D)}evaluate(S,D,Z,ie){return D=L({},D,{zoom:Math.floor(D.zoom)}),super.evaluate(S,D,Z,ie)}}let hy;class ag extends B{constructor(S){super(S,cy),this.gradientVersion=0,hy||(hy=new vh(cy.paint.properties["line-width"].specification),hy.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(S){if(S==="line-gradient"){let D=this.gradientExpression();this.stepInterpolant=!!function(Z){return Z._styleExpression!==void 0}(D)&&D._styleExpression.expression instanceof Ui,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(S,D){super.recalculate(S,D),this.paint._values["line-floorwidth"]=hy.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,S)}createBucket(S){return new Kp(S)}queryRadius(S){let D=S,Z=jh(is("line-width",this,D),is("line-gap-width",this,D)),ie=is("line-offset",this,D);return Z/2+Math.abs(ie)+su(this.paint.get("line-translate"))}queryIntersectsFeature(S,D,Z,ie,pe,xe,He){let at=Ps(S,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),xe.angle,He),wt=He/2*jh(this.paint.get("line-width").evaluate(D,Z),this.paint.get("line-gap-width").evaluate(D,Z)),Ht=this.paint.get("line-offset").evaluate(D,Z);return Ht&&(ie=function(rr,pr){let Ar=[];for(let Vr=0;Vr<rr.length;Vr++){let ri=rr[Vr],Ii=[];for(let Zi=0;Zi<ri.length;Zi++){let da=ri[Zi-1],cn=ri[Zi],jn=ri[Zi+1],Va=Zi===0?new l(0,0):cn.sub(da)._unit()._perp(),hl=Zi===ri.length-1?new l(0,0):jn.sub(cn)._unit()._perp(),iu=Va._add(hl)._unit(),Su=iu.x*hl.x+iu.y*hl.y;Su!==0&&iu._mult(1/Su),Ii.push(iu._mult(pr)._add(cn))}Ar.push(Ii)}return Ar}(ie,Ht*He)),function(rr,pr,Ar){for(let Vr=0;Vr<pr.length;Vr++){let ri=pr[Vr];if(rr.length>=3){for(let Ii=0;Ii<ri.length;Ii++)if(Vs(rr,ri[Ii]))return!0}if(_i(rr,ri,Ar))return!0}return!1}(at,ie,wt)}isTileClipped(){return!0}}function jh(I,S){return S>0?S+2*I:I}let rm=Ne([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),w1=Ne([{name:"a_projected_pos",components:3,type:"Float32"}],4);Ne([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let T1=Ne([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Ne([{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 og=Ne([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),im=Ne([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function nm(I,S,D){return I.sections.forEach(Z=>{Z.text=function(ie,pe,xe){let He=pe.layout.get("text-transform").evaluate(xe,{});return He==="uppercase"?ie=ie.toLocaleUpperCase():He==="lowercase"&&(ie=ie.toLocaleLowerCase()),zs.applyArabicShaping&&(ie=zs.applyArabicShaping(ie)),ie}(Z.text,S,D)}),I}Ne([{name:"triangle",components:3,type:"Uint16"}]),Ne([{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"}]),Ne([{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"}]),Ne([{type:"Float32",name:"offsetX"}]),Ne([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Ne([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let yc={"!":"\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 Ff=24,Ed=Zf,sg=function(I,S,D,Z,ie){var pe,xe,He=8*ie-Z-1,at=(1<<He)-1,wt=at>>1,Ht=-7,rr=D?ie-1:0,pr=D?-1:1,Ar=I[S+rr];for(rr+=pr,pe=Ar&(1<<-Ht)-1,Ar>>=-Ht,Ht+=He;Ht>0;pe=256*pe+I[S+rr],rr+=pr,Ht-=8);for(xe=pe&(1<<-Ht)-1,pe>>=-Ht,Ht+=Z;Ht>0;xe=256*xe+I[S+rr],rr+=pr,Ht-=8);if(pe===0)pe=1-wt;else{if(pe===at)return xe?NaN:1/0*(Ar?-1:1);xe+=Math.pow(2,Z),pe-=wt}return(Ar?-1:1)*xe*Math.pow(2,pe-Z)},A1=function(I,S,D,Z,ie,pe){var xe,He,at,wt=8*pe-ie-1,Ht=(1<<wt)-1,rr=Ht>>1,pr=ie===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ar=Z?0:pe-1,Vr=Z?1:-1,ri=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(He=isNaN(S)?1:0,xe=Ht):(xe=Math.floor(Math.log(S)/Math.LN2),S*(at=Math.pow(2,-xe))<1&&(xe--,at*=2),(S+=xe+rr>=1?pr/at:pr*Math.pow(2,1-rr))*at>=2&&(xe++,at/=2),xe+rr>=Ht?(He=0,xe=Ht):xe+rr>=1?(He=(S*at-1)*Math.pow(2,ie),xe+=rr):(He=S*Math.pow(2,rr-1)*Math.pow(2,ie),xe=0));ie>=8;I[D+Ar]=255&He,Ar+=Vr,He/=256,ie-=8);for(xe=xe<<ie|He,wt+=ie;wt>0;I[D+Ar]=255&xe,Ar+=Vr,xe/=256,wt-=8);I[D+Ar-Vr]|=128*ri};function Zf(I){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(I)?I:new Uint8Array(I||0),this.pos=0,this.type=0,this.length=this.buf.length}Zf.Varint=0,Zf.Fixed64=1,Zf.Bytes=2,Zf.Fixed32=5;var Ox=4294967296,am=1/Ox,Mw=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");function Lp(I){return I.type===Zf.Bytes?I.readVarint()+I.pos:I.pos+1}function om(I,S,D){return D?4294967296*S+(I>>>0):4294967296*(S>>>0)+(I>>>0)}function Ew(I,S,D){var Z=S<=16383?1:S<=2097151?2:S<=268435455?3:Math.floor(Math.log(S)/(7*Math.LN2));D.realloc(Z);for(var ie=D.pos-1;ie>=I;ie--)D.buf[ie+Z]=D.buf[ie]}function Nx(I,S){for(var D=0;D<I.length;D++)S.writeVarint(I[D])}function N8(I,S){for(var D=0;D<I.length;D++)S.writeSVarint(I[D])}function U8(I,S){for(var D=0;D<I.length;D++)S.writeFloat(I[D])}function V8(I,S){for(var D=0;D<I.length;D++)S.writeDouble(I[D])}function H8(I,S){for(var D=0;D<I.length;D++)S.writeBoolean(I[D])}function EQ(I,S){for(var D=0;D<I.length;D++)S.writeFixed32(I[D])}function G8(I,S){for(var D=0;D<I.length;D++)S.writeSFixed32(I[D])}function W8(I,S){for(var D=0;D<I.length;D++)S.writeFixed64(I[D])}function j8(I,S){for(var D=0;D<I.length;D++)S.writeSFixed64(I[D])}function lg(I,S){return(I[S]|I[S+1]<<8|I[S+2]<<16)+16777216*I[S+3]}function Ux(I,S,D){I[D]=S,I[D+1]=S>>>8,I[D+2]=S>>>16,I[D+3]=S>>>24}function lC(I,S){return(I[S]|I[S+1]<<8|I[S+2]<<16)+(I[S+3]<<24)}Zf.prototype={destroy:function(){this.buf=null},readFields:function(I,S,D){for(D=D||this.length;this.pos<D;){var Z=this.readVarint(),ie=Z>>3,pe=this.pos;this.type=7&Z,I(ie,S,this),this.pos===pe&&this.skip(Z)}return S},readMessage:function(I,S){return this.readFields(I,S,this.readVarint()+this.pos)},readFixed32:function(){var I=lg(this.buf,this.pos);return this.pos+=4,I},readSFixed32:function(){var I=lC(this.buf,this.pos);return this.pos+=4,I},readFixed64:function(){var I=lg(this.buf,this.pos)+lg(this.buf,this.pos+4)*Ox;return this.pos+=8,I},readSFixed64:function(){var I=lg(this.buf,this.pos)+lC(this.buf,this.pos+4)*Ox;return this.pos+=8,I},readFloat:function(){var I=sg(this.buf,this.pos,!0,23,4);return this.pos+=4,I},readDouble:function(){var I=sg(this.buf,this.pos,!0,52,8);return this.pos+=8,I},readVarint:function(I){var S,D,Z=this.buf;return S=127&(D=Z[this.pos++]),D<128?S:(S|=(127&(D=Z[this.pos++]))<<7,D<128?S:(S|=(127&(D=Z[this.pos++]))<<14,D<128?S:(S|=(127&(D=Z[this.pos++]))<<21,D<128?S:function(ie,pe,xe){var He,at,wt=xe.buf;if(He=(112&(at=wt[xe.pos++]))>>4,at<128||(He|=(127&(at=wt[xe.pos++]))<<3,at<128)||(He|=(127&(at=wt[xe.pos++]))<<10,at<128)||(He|=(127&(at=wt[xe.pos++]))<<17,at<128)||(He|=(127&(at=wt[xe.pos++]))<<24,at<128)||(He|=(1&(at=wt[xe.pos++]))<<31,at<128))return om(ie,He,pe);throw new Error("Expected varint not more than 10 bytes")}(S|=(15&(D=Z[this.pos]))<<28,I,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var I=this.readVarint();return I%2==1?(I+1)/-2:I/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var I=this.readVarint()+this.pos,S=this.pos;return this.pos=I,I-S>=12&&Mw?function(D,Z,ie){return Mw.decode(D.subarray(Z,ie))}(this.buf,S,I):function(D,Z,ie){for(var pe="",xe=Z;xe<ie;){var He,at,wt,Ht=D[xe],rr=null,pr=Ht>239?4:Ht>223?3:Ht>191?2:1;if(xe+pr>ie)break;pr===1?Ht<128&&(rr=Ht):pr===2?(192&(He=D[xe+1]))==128&&(rr=(31&Ht)<<6|63&He)<=127&&(rr=null):pr===3?(at=D[xe+2],(192&(He=D[xe+1]))==128&&(192&at)==128&&((rr=(15&Ht)<<12|(63&He)<<6|63&at)<=2047||rr>=55296&&rr<=57343)&&(rr=null)):pr===4&&(at=D[xe+2],wt=D[xe+3],(192&(He=D[xe+1]))==128&&(192&at)==128&&(192&wt)==128&&((rr=(15&Ht)<<18|(63&He)<<12|(63&at)<<6|63&wt)<=65535||rr>=1114112)&&(rr=null)),rr===null?(rr=65533,pr=1):rr>65535&&(rr-=65536,pe+=String.fromCharCode(rr>>>10&1023|55296),rr=56320|1023&rr),pe+=String.fromCharCode(rr),xe+=pr}return pe}(this.buf,S,I)},readBytes:function(){var I=this.readVarint()+this.pos,S=this.buf.subarray(this.pos,I);return this.pos=I,S},readPackedVarint:function(I,S){if(this.type!==Zf.Bytes)return I.push(this.readVarint(S));var D=Lp(this);for(I=I||[];this.pos<D;)I.push(this.readVarint(S));return I},readPackedSVarint:function(I){if(this.type!==Zf.Bytes)return I.push(this.readSVarint());var S=Lp(this);for(I=I||[];this.pos<S;)I.push(this.readSVarint());return I},readPackedBoolean:function(I){if(this.type!==Zf.Bytes)return I.push(this.readBoolean());var S=Lp(this);for(I=I||[];this.pos<S;)I.push(this.readBoolean());return I},readPackedFloat:function(I){if(this.type!==Zf.Bytes)return I.push(this.readFloat());var S=Lp(this);for(I=I||[];this.pos<S;)I.push(this.readFloat());return I},readPackedDouble:function(I){if(this.type!==Zf.Bytes)return I.push(this.readDouble());var S=Lp(this);for(I=I||[];this.pos<S;)I.push(this.readDouble());return I},readPackedFixed32:function(I){if(this.type!==Zf.Bytes)return I.push(this.readFixed32());var S=Lp(this);for(I=I||[];this.pos<S;)I.push(this.readFixed32());return I},readPackedSFixed32:function(I){if(this.type!==Zf.Bytes)return I.push(this.readSFixed32());var S=Lp(this);for(I=I||[];this.pos<S;)I.push(this.readSFixed32());return I},readPackedFixed64:function(I){if(this.type!==Zf.Bytes)return I.push(this.readFixed64());var S=Lp(this);for(I=I||[];this.pos<S;)I.push(this.readFixed64());return I},readPackedSFixed64:function(I){if(this.type!==Zf.Bytes)return I.push(this.readSFixed64());var S=Lp(this);for(I=I||[];this.pos<S;)I.push(this.readSFixed64());return I},skip:function(I){var S=7&I;if(S===Zf.Varint)for(;this.buf[this.pos++]>127;);else if(S===Zf.Bytes)this.pos=this.readVarint()+this.pos;else if(S===Zf.Fixed32)this.pos+=4;else{if(S!==Zf.Fixed64)throw new Error("Unimplemented type: "+S);this.pos+=8}},writeTag:function(I,S){this.writeVarint(I<<3|S)},realloc:function(I){for(var S=this.length||16;S<this.pos+I;)S*=2;if(S!==this.length){var D=new Uint8Array(S);D.set(this.buf),this.buf=D,this.length=S}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(I){this.realloc(4),Ux(this.buf,I,this.pos),this.pos+=4},writeSFixed32:function(I){this.realloc(4),Ux(this.buf,I,this.pos),this.pos+=4},writeFixed64:function(I){this.realloc(8),Ux(this.buf,-1&I,this.pos),Ux(this.buf,Math.floor(I*am),this.pos+4),this.pos+=8},writeSFixed64:function(I){this.realloc(8),Ux(this.buf,-1&I,this.pos),Ux(this.buf,Math.floor(I*am),this.pos+4),this.pos+=8},writeVarint:function(I){(I=+I||0)>268435455||I<0?function(S,D){var Z,ie;if(S>=0?(Z=S%4294967296|0,ie=S/4294967296|0):(ie=~(-S/4294967296),4294967295^(Z=~(-S%4294967296))?Z=Z+1|0:(Z=0,ie=ie+1|0)),S>=18446744073709552e3||S<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");D.realloc(10),function(pe,xe,He){He.buf[He.pos++]=127&pe|128,pe>>>=7,He.buf[He.pos++]=127&pe|128,pe>>>=7,He.buf[He.pos++]=127&pe|128,pe>>>=7,He.buf[He.pos++]=127&pe|128,He.buf[He.pos]=127&(pe>>>=7)}(Z,0,D),function(pe,xe){var He=(7&pe)<<4;xe.buf[xe.pos++]|=He|((pe>>>=3)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe)))))}(ie,D)}(I,this):(this.realloc(4),this.buf[this.pos++]=127&I|(I>127?128:0),I<=127||(this.buf[this.pos++]=127&(I>>>=7)|(I>127?128:0),I<=127||(this.buf[this.pos++]=127&(I>>>=7)|(I>127?128:0),I<=127||(this.buf[this.pos++]=I>>>7&127))))},writeSVarint:function(I){this.writeVarint(I<0?2*-I-1:2*I)},writeBoolean:function(I){this.writeVarint(!!I)},writeString:function(I){I=String(I),this.realloc(4*I.length),this.pos++;var S=this.pos;this.pos=function(Z,ie,pe){for(var xe,He,at=0;at<ie.length;at++){if((xe=ie.charCodeAt(at))>55295&&xe<57344){if(!He){xe>56319||at+1===ie.length?(Z[pe++]=239,Z[pe++]=191,Z[pe++]=189):He=xe;continue}if(xe<56320){Z[pe++]=239,Z[pe++]=191,Z[pe++]=189,He=xe;continue}xe=He-55296<<10|xe-56320|65536,He=null}else He&&(Z[pe++]=239,Z[pe++]=191,Z[pe++]=189,He=null);xe<128?Z[pe++]=xe:(xe<2048?Z[pe++]=xe>>6|192:(xe<65536?Z[pe++]=xe>>12|224:(Z[pe++]=xe>>18|240,Z[pe++]=xe>>12&63|128),Z[pe++]=xe>>6&63|128),Z[pe++]=63&xe|128)}return pe}(this.buf,I,this.pos);var D=this.pos-S;D>=128&&Ew(S,D,this),this.pos=S-1,this.writeVarint(D),this.pos+=D},writeFloat:function(I){this.realloc(4),A1(this.buf,I,this.pos,!0,23,4),this.pos+=4},writeDouble:function(I){this.realloc(8),A1(this.buf,I,this.pos,!0,52,8),this.pos+=8},writeBytes:function(I){var S=I.length;this.writeVarint(S),this.realloc(S);for(var D=0;D<S;D++)this.buf[this.pos++]=I[D]},writeRawMessage:function(I,S){this.pos++;var D=this.pos;I(S,this);var Z=this.pos-D;Z>=128&&Ew(D,Z,this),this.pos=D-1,this.writeVarint(Z),this.pos+=Z},writeMessage:function(I,S,D){this.writeTag(I,Zf.Bytes),this.writeRawMessage(S,D)},writePackedVarint:function(I,S){S.length&&this.writeMessage(I,Nx,S)},writePackedSVarint:function(I,S){S.length&&this.writeMessage(I,N8,S)},writePackedBoolean:function(I,S){S.length&&this.writeMessage(I,H8,S)},writePackedFloat:function(I,S){S.length&&this.writeMessage(I,U8,S)},writePackedDouble:function(I,S){S.length&&this.writeMessage(I,V8,S)},writePackedFixed32:function(I,S){S.length&&this.writeMessage(I,EQ,S)},writePackedSFixed32:function(I,S){S.length&&this.writeMessage(I,G8,S)},writePackedFixed64:function(I,S){S.length&&this.writeMessage(I,W8,S)},writePackedSFixed64:function(I,S){S.length&&this.writeMessage(I,j8,S)},writeBytesField:function(I,S){this.writeTag(I,Zf.Bytes),this.writeBytes(S)},writeFixed32Field:function(I,S){this.writeTag(I,Zf.Fixed32),this.writeFixed32(S)},writeSFixed32Field:function(I,S){this.writeTag(I,Zf.Fixed32),this.writeSFixed32(S)},writeFixed64Field:function(I,S){this.writeTag(I,Zf.Fixed64),this.writeFixed64(S)},writeSFixed64Field:function(I,S){this.writeTag(I,Zf.Fixed64),this.writeSFixed64(S)},writeVarintField:function(I,S){this.writeTag(I,Zf.Varint),this.writeVarint(S)},writeSVarintField:function(I,S){this.writeTag(I,Zf.Varint),this.writeSVarint(S)},writeStringField:function(I,S){this.writeTag(I,Zf.Bytes),this.writeString(S)},writeFloatField:function(I,S){this.writeTag(I,Zf.Fixed32),this.writeFloat(S)},writeDoubleField:function(I,S){this.writeTag(I,Zf.Fixed64),this.writeDouble(S)},writeBooleanField:function(I,S){this.writeVarintField(I,!!S)}};var tM=o(Ed);let rM=3;function kQ(I,S,D){I===1&&D.readMessage(Z8,S)}function Z8(I,S,D){if(I===3){let{id:Z,bitmap:ie,width:pe,height:xe,left:He,top:at,advance:wt}=D.readMessage(uC,{});S.push({id:Z,bitmap:new bu({width:pe+2*rM,height:xe+2*rM},ie),metrics:{width:pe,height:xe,left:He,top:at,advance:wt}})}}function uC(I,S,D){I===1?S.id=D.readVarint():I===2?S.bitmap=D.readBytes():I===3?S.width=D.readVarint():I===4?S.height=D.readVarint():I===5?S.left=D.readSVarint():I===6?S.top=D.readSVarint():I===7&&(S.advance=D.readVarint())}let fC=rM;function iM(I){let S=0,D=0;for(let xe of I)S+=xe.w*xe.h,D=Math.max(D,xe.w);I.sort((xe,He)=>He.h-xe.h);let Z=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(S/.95)),D),h:1/0}],ie=0,pe=0;for(let xe of I)for(let He=Z.length-1;He>=0;He--){let at=Z[He];if(!(xe.w>at.w||xe.h>at.h)){if(xe.x=at.x,xe.y=at.y,pe=Math.max(pe,xe.y+xe.h),ie=Math.max(ie,xe.x+xe.w),xe.w===at.w&&xe.h===at.h){let wt=Z.pop();He<Z.length&&(Z[He]=wt)}else xe.h===at.h?(at.x+=xe.w,at.w-=xe.w):xe.w===at.w?(at.y+=xe.h,at.h-=xe.h):(Z.push({x:at.x+xe.w,y:at.y,w:at.w-xe.w,h:xe.h}),at.y+=xe.h,at.h-=xe.h);break}}return{w:ie,h:pe,fill:S/(ie*pe)||0}}let kd=1;class kw{constructor(S,{pixelRatio:D,version:Z,stretchX:ie,stretchY:pe,content:xe,textFitWidth:He,textFitHeight:at}){this.paddedRect=S,this.pixelRatio=D,this.stretchX=ie,this.stretchY=pe,this.content=xe,this.version=Z,this.textFitWidth=He,this.textFitHeight=at}get tl(){return[this.paddedRect.x+kd,this.paddedRect.y+kd]}get br(){return[this.paddedRect.x+this.paddedRect.w-kd,this.paddedRect.y+this.paddedRect.h-kd]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*kd)/this.pixelRatio,(this.paddedRect.h-2*kd)/this.pixelRatio]}}class Cw{constructor(S,D){let Z={},ie={};this.haveRenderCallbacks=[];let pe=[];this.addImages(S,Z,pe),this.addImages(D,ie,pe);let{w:xe,h:He}=iM(pe),at=new al({width:xe||1,height:He||1});for(let wt in S){let Ht=S[wt],rr=Z[wt].paddedRect;al.copy(Ht.data,at,{x:0,y:0},{x:rr.x+kd,y:rr.y+kd},Ht.data)}for(let wt in D){let Ht=D[wt],rr=ie[wt].paddedRect,pr=rr.x+kd,Ar=rr.y+kd,Vr=Ht.data.width,ri=Ht.data.height;al.copy(Ht.data,at,{x:0,y:0},{x:pr,y:Ar},Ht.data),al.copy(Ht.data,at,{x:0,y:ri-1},{x:pr,y:Ar-1},{width:Vr,height:1}),al.copy(Ht.data,at,{x:0,y:0},{x:pr,y:Ar+ri},{width:Vr,height:1}),al.copy(Ht.data,at,{x:Vr-1,y:0},{x:pr-1,y:Ar},{width:1,height:ri}),al.copy(Ht.data,at,{x:0,y:0},{x:pr+Vr,y:Ar},{width:1,height:ri})}this.image=at,this.iconPositions=Z,this.patternPositions=ie}addImages(S,D,Z){for(let ie in S){let pe=S[ie],xe={x:0,y:0,w:pe.data.width+2*kd,h:pe.data.height+2*kd};Z.push(xe),D[ie]=new kw(xe,pe),pe.hasRenderCallback&&this.haveRenderCallbacks.push(ie)}}patchUpdatedImages(S,D){S.dispatchRenderCallbacks(this.haveRenderCallbacks);for(let Z in S.updatedImages)this.patchUpdatedImage(this.iconPositions[Z],S.getImage(Z),D),this.patchUpdatedImage(this.patternPositions[Z],S.getImage(Z),D)}patchUpdatedImage(S,D,Z){if(!S||!D||S.version===D.version)return;S.version=D.version;let[ie,pe]=S.tl;Z.update(D.data,void 0,{x:ie,y:pe})}}var zp;gi("ImagePosition",kw),gi("ImageAtlas",Cw),i.ah=void 0,(zp=i.ah||(i.ah={}))[zp.none=0]="none",zp[zp.horizontal=1]="horizontal",zp[zp.vertical=2]="vertical",zp[zp.horizontalOnly=3]="horizontalOnly";let kh=-17;class Vx{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(S,D){let Z=new Vx;return Z.scale=S||1,Z.fontStack=D,Z}static forImage(S){let D=new Vx;return D.imageName=S,D}}class S1{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(S,D){let Z=new S1;for(let ie=0;ie<S.sections.length;ie++){let pe=S.sections[ie];pe.image?Z.addImageSection(pe):Z.addTextSection(pe,D)}return Z}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 D="";for(let Z=0;Z<S.length;Z++){let ie=S.charCodeAt(Z+1)||null,pe=S.charCodeAt(Z-1)||null;D+=ie&&Gl(ie)&&!yc[S[Z+1]]||pe&&Gl(pe)&&!yc[S[Z-1]]||!yc[S[Z]]?S[Z]:yc[S[Z]]}return D}(this.text)}trim(){let S=0;for(let Z=0;Z<this.text.length&&Lw[this.text.charCodeAt(Z)];Z++)S++;let D=this.text.length;for(let Z=this.text.length-1;Z>=0&&Z>=S&&Lw[this.text.charCodeAt(Z)];Z--)D--;this.text=this.text.substring(S,D),this.sectionIndex=this.sectionIndex.slice(S,D)}substring(S,D){let Z=new S1;return Z.text=this.text.substring(S,D),Z.sectionIndex=this.sectionIndex.slice(S,D),Z.sections=this.sections,Z}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((S,D)=>Math.max(S,this.sections[D].scale),0)}addTextSection(S,D){this.text+=S.text,this.sections.push(Vx.forText(S.scale,S.fontStack||D));let Z=this.sections.length-1;for(let ie=0;ie<S.text.length;++ie)this.sectionIndex.push(Z)}addImageSection(S){let D=S.image?S.image.name:"";if(D.length===0)return void T("Can't add FormattedSection with an empty image.");let Z=this.getNextImageSectionCharCode();Z?(this.text+=String.fromCharCode(Z),this.sections.push(Vx.forImage(D)),this.sectionIndex.push(this.sections.length-1)):T("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Hx(I,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr){let ri=S1.fromFeature(I,ie),Ii;rr===i.ah.vertical&&ri.verticalizePunctuation();let{processBidirectionalText:Zi,processStyledBidirectionalText:da}=zs;if(Zi&&ri.sections.length===1){Ii=[];let Va=Zi(ri.toString(),M1(ri,wt,pe,S,Z,Ar));for(let hl of Va){let iu=new S1;iu.text=hl,iu.sections=ri.sections;for(let Su=0;Su<hl.length;Su++)iu.sectionIndex.push(0);Ii.push(iu)}}else if(da){Ii=[];let Va=da(ri.text,ri.sectionIndex,M1(ri,wt,pe,S,Z,Ar));for(let hl of Va){let iu=new S1;iu.text=hl[0],iu.sectionIndex=hl[1],iu.sections=ri.sections,Ii.push(iu)}}else Ii=function(Va,hl){let iu=[],Su=Va.text,Zl=0;for(let Qs of hl)iu.push(Va.substring(Zl,Qs)),Zl=Qs;return Zl<Su.length&&iu.push(Va.substring(Zl,Su.length)),iu}(ri,M1(ri,wt,pe,S,Z,Ar));let cn=[],jn={positionedLines:cn,text:ri.toString(),top:Ht[1],bottom:Ht[1],left:Ht[0],right:Ht[0],writingMode:rr,iconsInText:!1,verticalizable:!1};return function(Va,hl,iu,Su,Zl,Qs,gu,cu,uu,Ts,wu,fu){let Lu=0,oc=kh,tc=0,Ch=0,$p=cu==="right"?1:cu==="left"?0:.5,ud=0;for(let Kc of Zl){Kc.trim();let zh=Kc.getMaxScale(),Cd=(zh-1)*Ff,fd={positionedGlyphs:[],lineOffset:0};Va.positionedLines[ud]=fd;let Zh=fd.positionedGlyphs,rh=0;if(!Kc.length()){oc+=Qs,++ud;continue}for(let fp=0;fp<Kc.length();fp++){let qf=Kc.getSection(fp),mc=Kc.getSectionIndex(fp),sc=Kc.getCharCode(fp),Ip=0,Hc=null,P1=null,v0=null,Gv=Ff,Qp=!(uu===i.ah.horizontal||!wu&&!ul(sc)||wu&&(Lw[sc]||(Lh=sc,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(Lh)))));if(qf.imageName){let Pc=Su[qf.imageName];if(!Pc)continue;v0=qf.imageName,Va.iconsInText=Va.iconsInText||!0,P1=Pc.paddedRect;let uh=Pc.displaySize;qf.scale=qf.scale*Ff/fu,Hc={width:uh[0],height:uh[1],left:kd,top:-fC,advance:Qp?uh[1]:uh[0]},Ip=Cd+(Ff-uh[1]*qf.scale),Gv=Hc.advance;let ev=Qp?uh[0]*qf.scale-Ff*zh:uh[1]*qf.scale-Ff*zh;ev>0&&ev>rh&&(rh=ev)}else{let Pc=iu[qf.fontStack],uh=Pc&&Pc[sc];if(uh&&uh.rect)P1=uh.rect,Hc=uh.metrics;else{let ev=hl[qf.fontStack],yy=ev&&ev[sc];if(!yy)continue;Hc=yy.metrics}Ip=(zh-qf.scale)*Ff}Qp?(Va.verticalizable=!0,Zh.push({glyph:sc,imageName:v0,x:Lu,y:oc+Ip,vertical:Qp,scale:qf.scale,fontStack:qf.fontStack,sectionIndex:mc,metrics:Hc,rect:P1}),Lu+=Gv*qf.scale+Ts):(Zh.push({glyph:sc,imageName:v0,x:Lu,y:oc+Ip,vertical:Qp,scale:qf.scale,fontStack:qf.fontStack,sectionIndex:mc,metrics:Hc,rect:P1}),Lu+=Hc.advance*qf.scale+Ts)}Zh.length!==0&&(tc=Math.max(Lu-Ts,tc),sm(Zh,0,Zh.length-1,$p,rh)),Lu=0;let Pp=Qs*zh+rh;fd.lineOffset=Math.max(rh,Cd),oc+=Pp,Ch=Math.max(Pp,Ch),++ud}var Lh;let Wd=oc-kh,{horizontalAlign:jd,verticalAlign:Zd}=Pw(gu);(function(Kc,zh,Cd,fd,Zh,rh,Pp,fp,qf){let mc=(zh-Cd)*Zh,sc=0;sc=rh!==Pp?-fp*fd-kh:(-fd*qf+.5)*Pp;for(let Ip of Kc)for(let Hc of Ip.positionedGlyphs)Hc.x+=mc,Hc.y+=sc})(Va.positionedLines,$p,jd,Zd,tc,Ch,Qs,Wd,Zl.length),Va.top+=-Zd*Wd,Va.bottom=Va.top+Wd,Va.left+=-jd*tc,Va.right=Va.left+tc}(jn,S,D,Z,Ii,xe,He,at,rr,wt,pr,Vr),!function(Va){for(let hl of Va)if(hl.positionedGlyphs.length!==0)return!1;return!0}(cn)&&jn}let Lw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},X8={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},Y8={40:!0};function cC(I,S,D,Z,ie,pe){if(S.imageName){let xe=Z[S.imageName];return xe?xe.displaySize[0]*S.scale*Ff/pe+ie:0}{let xe=D[S.fontStack],He=xe&&xe[I];return He?He.metrics.advance*S.scale+ie:0}}function hC(I,S,D,Z){let ie=Math.pow(I-S,2);return Z?I<S?ie/2:2*ie:ie+Math.abs(D)*D}function K8(I,S,D){let Z=0;return I===10&&(Z-=1e4),D&&(Z+=150),I!==40&&I!==65288||(Z+=50),S!==41&&S!==65289||(Z+=50),Z}function zw(I,S,D,Z,ie,pe){let xe=null,He=hC(S,D,ie,pe);for(let at of Z){let wt=hC(S-at.x,D,ie,pe)+at.badness;wt<=He&&(xe=at,He=wt)}return{index:I,x:S,priorBreak:xe,badness:He}}function dC(I){return I?dC(I.priorBreak).concat(I.index):[]}function M1(I,S,D,Z,ie,pe){if(!I)return[];let xe=[],He=function(rr,pr,Ar,Vr,ri,Ii){let Zi=0;for(let da=0;da<rr.length();da++){let cn=rr.getSection(da);Zi+=cC(rr.getCharCode(da),cn,Vr,ri,pr,Ii)}return Zi/Math.max(1,Math.ceil(Zi/Ar))}(I,S,D,Z,ie,pe),at=I.text.indexOf("\u200B")>=0,wt=0;for(let rr=0;rr<I.length();rr++){let pr=I.getSection(rr),Ar=I.getCharCode(rr);if(Lw[Ar]||(wt+=cC(Ar,pr,Z,ie,S,pe)),rr<I.length()-1){let Vr=!((Ht=Ar)<11904)&&(!!pn["CJK Compatibility Forms"](Ht)||!!pn["CJK Compatibility"](Ht)||!!pn["CJK Strokes"](Ht)||!!pn["CJK Symbols and Punctuation"](Ht)||!!pn["Enclosed CJK Letters and Months"](Ht)||!!pn["Halfwidth and Fullwidth Forms"](Ht)||!!pn["Ideographic Description Characters"](Ht)||!!pn["Vertical Forms"](Ht)||Cl.test(String.fromCodePoint(Ht)));(X8[Ar]||Vr||pr.imageName||rr!==I.length()-2&&Y8[I.getCharCode(rr+1)])&&xe.push(zw(rr+1,wt,He,xe,K8(Ar,I.getCharCode(rr+1),Vr&&at),!1))}}var Ht;return dC(zw(I.length(),wt,He,xe,0,!0))}function Pw(I){let S=.5,D=.5;switch(I){case"right":case"top-right":case"bottom-right":S=1;break;case"left":case"top-left":case"bottom-left":S=0}switch(I){case"bottom":case"bottom-right":case"bottom-left":D=1;break;case"top":case"top-right":case"top-left":D=0}return{horizontalAlign:S,verticalAlign:D}}function sm(I,S,D,Z,ie){if(!Z&&!ie)return;let pe=I[D],xe=(I[D].x+pe.metrics.advance*pe.scale)*Z;for(let He=S;He<=D;He++)I[He].x-=xe,I[He].y+=ie}function Gx(I,S,D){let{horizontalAlign:Z,verticalAlign:ie}=Pw(D),pe=S[0]-I.displaySize[0]*Z,xe=S[1]-I.displaySize[1]*ie;return{image:I,top:xe,bottom:xe+I.displaySize[1],left:pe,right:pe+I.displaySize[0]}}function pC(I){var S,D;let Z=I.left,ie=I.top,pe=I.right-Z,xe=I.bottom-ie,He=(S=I.image.textFitWidth)!==null&&S!==void 0?S:"stretchOrShrink",at=(D=I.image.textFitHeight)!==null&&D!==void 0?D:"stretchOrShrink",wt=(I.image.content[2]-I.image.content[0])/(I.image.content[3]-I.image.content[1]);if(at==="proportional"){if(He==="stretchOnly"&&pe/xe<wt||He==="proportional"){let Ht=Math.ceil(xe*wt);Z*=Ht/pe,pe=Ht}}else if(He==="proportional"&&at==="stretchOnly"&&wt!==0&&pe/xe>wt){let Ht=Math.ceil(pe/wt);ie*=Ht/xe,xe=Ht}return{x1:Z,y1:ie,x2:Z+pe,y2:ie+xe}}function vC(I,S,D,Z,ie,pe){let xe=I.image,He;if(xe.content){let Ii=xe.content,Zi=xe.pixelRatio||1;He=[Ii[0]/Zi,Ii[1]/Zi,xe.displaySize[0]-Ii[2]/Zi,xe.displaySize[1]-Ii[3]/Zi]}let at=S.left*pe,wt=S.right*pe,Ht,rr,pr,Ar;D==="width"||D==="both"?(Ar=ie[0]+at-Z[3],rr=ie[0]+wt+Z[1]):(Ar=ie[0]+(at+wt-xe.displaySize[0])/2,rr=Ar+xe.displaySize[0]);let Vr=S.top*pe,ri=S.bottom*pe;return D==="height"||D==="both"?(Ht=ie[1]+Vr-Z[0],pr=ie[1]+ri+Z[2]):(Ht=ie[1]+(Vr+ri-xe.displaySize[1])/2,pr=Ht+xe.displaySize[1]),{image:xe,top:Ht,right:rr,bottom:pr,left:Ar,collisionPadding:He}}let Wx=255,p0=128,lm=Wx*p0;function yC(I,S){let{expression:D}=S;if(D.kind==="constant")return{kind:"constant",layoutSize:D.evaluate(new Fo(I+1))};if(D.kind==="source")return{kind:"source"};{let{zoomStops:Z,interpolationType:ie}=D,pe=0;for(;pe<Z.length&&Z[pe]<=I;)pe++;pe=Math.max(0,pe-1);let xe=pe;for(;xe<Z.length&&Z[xe]<I+1;)xe++;xe=Math.min(Z.length-1,xe);let He=Z[pe],at=Z[xe];return D.kind==="composite"?{kind:"composite",minZoom:He,maxZoom:at,interpolationType:ie}:{kind:"camera",minZoom:He,maxZoom:at,minSize:D.evaluate(new Fo(He)),maxSize:D.evaluate(new Fo(at)),interpolationType:ie}}}function nM(I,S,D){let Z="never",ie=I.get(S);return ie?Z=ie:I.get(D)&&(Z="always"),Z}let J8=qi.VectorTileFeature.types,$8=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Iw(I,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr){let Ar=He?Math.min(lm,Math.round(He[0])):0,Vr=He?Math.min(lm,Math.round(He[1])):0;I.emplaceBack(S,D,Math.round(32*Z),Math.round(32*ie),pe,xe,(Ar<<1)+(at?1:0),Vr,16*wt,16*Ht,256*rr,256*pr)}function aM(I,S,D){I.emplaceBack(S.x,S.y,D),I.emplaceBack(S.x,S.y,D),I.emplaceBack(S.x,S.y,D),I.emplaceBack(S.x,S.y,D)}function oM(I){for(let S of I.sections)if(ko(S.text))return!0;return!1}class sM{constructor(S){this.layoutVertexArray=new sf,this.indexArray=new se,this.programConfigurations=S,this.segments=new it,this.dynamicLayoutVertexArray=new gf,this.opacityVertexArray=new nf,this.hasVisibleVertices=!1,this.placedSymbolArray=new el}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(S,D,Z,ie){this.isEmpty()||(Z&&(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,rm.members),this.indexBuffer=S.createIndexBuffer(this.indexArray,D),this.dynamicLayoutVertexBuffer=S.createVertexBuffer(this.dynamicLayoutVertexArray,w1.members,!0),this.opacityVertexBuffer=S.createVertexBuffer(this.opacityVertexArray,$8,!0),this.opacityVertexBuffer.itemSize=1),(Z||ie)&&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())}}gi("SymbolBuffers",sM);class um{constructor(S,D,Z){this.layoutVertexArray=new S,this.layoutAttributes=D,this.indexArray=new Z,this.segments=new it,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,T1.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}gi("CollisionBuffers",um);class E1{constructor(S){this.collisionBoxArray=S.collisionBoxArray,this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(xe=>xe.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=Ws([]),this.placementViewportMatrix=Ws([]);let D=this.layers[0]._unevaluatedLayout._values;this.textSizeData=yC(this.zoom,D["text-size"]),this.iconSizeData=yC(this.zoom,D["icon-size"]);let Z=this.layers[0].layout,ie=Z.get("symbol-sort-key"),pe=Z.get("symbol-z-order");this.canOverlap=nM(Z,"text-overlap","text-allow-overlap")!=="never"||nM(Z,"icon-overlap","icon-allow-overlap")!=="never"||Z.get("text-ignore-placement")||Z.get("icon-ignore-placement"),this.sortFeaturesByKey=pe!=="viewport-y"&&!ie.isConstant(),this.sortFeaturesByY=(pe==="viewport-y"||pe==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,Z.get("symbol-placement")==="point"&&(this.writingModes=Z.get("text-writing-mode").map(xe=>i.ah[xe])),this.stateDependentLayerIds=this.layers.filter(xe=>xe.isStateDependent()).map(xe=>xe.id),this.sourceID=S.sourceID}createArrays(){this.text=new sM(new qu(this.layers,this.zoom,S=>/^text/.test(S))),this.icon=new sM(new qu(this.layers,this.zoom,S=>/^icon/.test(S))),this.glyphOffsetArray=new $l,this.lineVertexArray=new pl,this.symbolInstances=new il,this.textAnchorOffsets=new Ll}calculateGlyphDependencies(S,D,Z,ie,pe){for(let xe=0;xe<S.length;xe++)if(D[S.charCodeAt(xe)]=!0,(Z||ie)&&pe){let He=yc[S.charAt(xe)];He&&(D[He.charCodeAt(0)]=!0)}}populate(S,D,Z){let ie=this.layers[0],pe=ie.layout,xe=pe.get("text-font"),He=pe.get("text-field"),at=pe.get("icon-image"),wt=(He.value.kind!=="constant"||He.value.value instanceof zr&&!He.value.value.isEmpty()||He.value.value.toString().length>0)&&(xe.value.kind!=="constant"||xe.value.value.length>0),Ht=at.value.kind!=="constant"||!!at.value.value||Object.keys(at.parameters).length>0,rr=pe.get("symbol-sort-key");if(this.features=[],!wt&&!Ht)return;let pr=D.iconDependencies,Ar=D.glyphDependencies,Vr=D.availableImages,ri=new Fo(this.zoom);for(let{feature:Ii,id:Zi,index:da,sourceLayerIndex:cn}of S){let jn=ie._featureFilter.needGeometry,Va=ff(Ii,jn);if(!ie._featureFilter.filter(ri,Va,Z))continue;let hl,iu;if(jn||(Va.geometry=of(Ii)),wt){let Zl=ie.getValueAndResolveTokens("text-field",Va,Z,Vr),Qs=zr.factory(Zl),gu=this.hasRTLText=this.hasRTLText||oM(Qs);(!gu||zs.getRTLTextPluginStatus()==="unavailable"||gu&&zs.isParsed())&&(hl=nm(Qs,ie,Va))}if(Ht){let Zl=ie.getValueAndResolveTokens("icon-image",Va,Z,Vr);iu=Zl instanceof oi?Zl:oi.fromString(Zl)}if(!hl&&!iu)continue;let Su=this.sortFeaturesByKey?rr.evaluate(Va,{},Z):void 0;if(this.features.push({id:Zi,text:hl,icon:iu,index:da,sourceLayerIndex:cn,geometry:Va.geometry,properties:Ii.properties,type:J8[Ii.type],sortKey:Su}),iu&&(pr[iu.name]=!0),hl){let Zl=xe.evaluate(Va,{},Z).join(","),Qs=pe.get("text-rotation-alignment")!=="viewport"&&pe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let gu of hl.sections)if(gu.image)pr[gu.image.name]=!0;else{let cu=Lo(hl.toString()),uu=gu.fontStack||Zl,Ts=Ar[uu]=Ar[uu]||{};this.calculateGlyphDependencies(gu.text,Ts,Qs,this.allowVerticalPlacement,cu)}}}pe.get("symbol-placement")==="line"&&(this.features=function(Ii){let Zi={},da={},cn=[],jn=0;function Va(Zl){cn.push(Ii[Zl]),jn++}function hl(Zl,Qs,gu){let cu=da[Zl];return delete da[Zl],da[Qs]=cu,cn[cu].geometry[0].pop(),cn[cu].geometry[0]=cn[cu].geometry[0].concat(gu[0]),cu}function iu(Zl,Qs,gu){let cu=Zi[Qs];return delete Zi[Qs],Zi[Zl]=cu,cn[cu].geometry[0].shift(),cn[cu].geometry[0]=gu[0].concat(cn[cu].geometry[0]),cu}function Su(Zl,Qs,gu){let cu=gu?Qs[0][Qs[0].length-1]:Qs[0][0];return`${Zl}:${cu.x}:${cu.y}`}for(let Zl=0;Zl<Ii.length;Zl++){let Qs=Ii[Zl],gu=Qs.geometry,cu=Qs.text?Qs.text.toString():null;if(!cu){Va(Zl);continue}let uu=Su(cu,gu),Ts=Su(cu,gu,!0);if(uu in da&&Ts in Zi&&da[uu]!==Zi[Ts]){let wu=iu(uu,Ts,gu),fu=hl(uu,Ts,cn[wu].geometry);delete Zi[uu],delete da[Ts],da[Su(cu,cn[fu].geometry,!0)]=fu,cn[wu].geometry=null}else uu in da?hl(uu,Ts,gu):Ts in Zi?iu(uu,Ts,gu):(Va(Zl),Zi[uu]=jn-1,da[Ts]=jn-1)}return cn.filter(Zl=>Zl.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Ii,Zi)=>Ii.sortKey-Zi.sortKey)}update(S,D,Z){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(S,D,this.layers,Z),this.icon.programConfigurations.updatePaintArrays(S,D,this.layers,Z))}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,D){let Z=this.lineVertexArray.length;if(S.segment!==void 0){let ie=S.dist(D[S.segment+1]),pe=S.dist(D[S.segment]),xe={};for(let He=S.segment+1;He<D.length;He++)xe[He]={x:D[He].x,y:D[He].y,tileUnitDistanceFromAnchor:ie},He<D.length-1&&(ie+=D[He+1].dist(D[He]));for(let He=S.segment||0;He>=0;He--)xe[He]={x:D[He].x,y:D[He].y,tileUnitDistanceFromAnchor:pe},He>0&&(pe+=D[He-1].dist(D[He]));for(let He=0;He<D.length;He++){let at=xe[He];this.lineVertexArray.emplaceBack(at.x,at.y,at.tileUnitDistanceFromAnchor)}}return{lineStartIndex:Z,lineLength:this.lineVertexArray.length-Z}}addSymbols(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr){let Ar=S.indexArray,Vr=S.layoutVertexArray,ri=S.segments.prepareSegment(4*D.length,Vr,Ar,this.canOverlap?xe.sortKey:void 0),Ii=this.glyphOffsetArray.length,Zi=ri.vertexLength,da=this.allowVerticalPlacement&&He===i.ah.vertical?Math.PI/2:0,cn=xe.text&&xe.text.sections;for(let jn=0;jn<D.length;jn++){let{tl:Va,tr:hl,bl:iu,br:Su,tex:Zl,pixelOffsetTL:Qs,pixelOffsetBR:gu,minFontScaleX:cu,minFontScaleY:uu,glyphOffset:Ts,isSDF:wu,sectionIndex:fu}=D[jn],Lu=ri.vertexLength,oc=Ts[1];Iw(Vr,at.x,at.y,Va.x,oc+Va.y,Zl.x,Zl.y,Z,wu,Qs.x,Qs.y,cu,uu),Iw(Vr,at.x,at.y,hl.x,oc+hl.y,Zl.x+Zl.w,Zl.y,Z,wu,gu.x,Qs.y,cu,uu),Iw(Vr,at.x,at.y,iu.x,oc+iu.y,Zl.x,Zl.y+Zl.h,Z,wu,Qs.x,gu.y,cu,uu),Iw(Vr,at.x,at.y,Su.x,oc+Su.y,Zl.x+Zl.w,Zl.y+Zl.h,Z,wu,gu.x,gu.y,cu,uu),aM(S.dynamicLayoutVertexArray,at,da),Ar.emplaceBack(Lu,Lu+1,Lu+2),Ar.emplaceBack(Lu+1,Lu+2,Lu+3),ri.vertexLength+=4,ri.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Ts[0]),jn!==D.length-1&&fu===D[jn+1].sectionIndex||S.programConfigurations.populatePaintArrays(Vr.length,xe,xe.index,{},pr,cn&&cn[fu])}S.placedSymbolArray.emplaceBack(at.x,at.y,Ii,this.glyphOffsetArray.length-Ii,Zi,wt,Ht,at.segment,Z?Z[0]:0,Z?Z[1]:0,ie[0],ie[1],He,0,!1,0,rr)}_addCollisionDebugVertex(S,D,Z,ie,pe,xe){return D.emplaceBack(0,0),S.emplaceBack(Z.x,Z.y,ie,pe,Math.round(xe.x),Math.round(xe.y))}addCollisionDebugVertices(S,D,Z,ie,pe,xe,He){let at=pe.segments.prepareSegment(4,pe.layoutVertexArray,pe.indexArray),wt=at.vertexLength,Ht=pe.layoutVertexArray,rr=pe.collisionVertexArray,pr=He.anchorX,Ar=He.anchorY;this._addCollisionDebugVertex(Ht,rr,xe,pr,Ar,new l(S,D)),this._addCollisionDebugVertex(Ht,rr,xe,pr,Ar,new l(Z,D)),this._addCollisionDebugVertex(Ht,rr,xe,pr,Ar,new l(Z,ie)),this._addCollisionDebugVertex(Ht,rr,xe,pr,Ar,new l(S,ie)),at.vertexLength+=4;let Vr=pe.indexArray;Vr.emplaceBack(wt,wt+1),Vr.emplaceBack(wt+1,wt+2),Vr.emplaceBack(wt+2,wt+3),Vr.emplaceBack(wt+3,wt),at.primitiveLength+=4}addDebugCollisionBoxes(S,D,Z,ie){for(let pe=S;pe<D;pe++){let xe=this.collisionBoxArray.get(pe);this.addCollisionDebugVertices(xe.x1,xe.y1,xe.x2,xe.y2,ie?this.textCollisionBox:this.iconCollisionBox,xe.anchorPoint,Z)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new um(af,og.members,Le),this.iconCollisionBox=new um(af,og.members,Le);for(let S=0;S<this.symbolInstances.length;S++){let D=this.symbolInstances.get(S);this.addDebugCollisionBoxes(D.textBoxStartIndex,D.textBoxEndIndex,D,!0),this.addDebugCollisionBoxes(D.verticalTextBoxStartIndex,D.verticalTextBoxEndIndex,D,!0),this.addDebugCollisionBoxes(D.iconBoxStartIndex,D.iconBoxEndIndex,D,!1),this.addDebugCollisionBoxes(D.verticalIconBoxStartIndex,D.verticalIconBoxEndIndex,D,!1)}}_deserializeCollisionBoxesForSymbol(S,D,Z,ie,pe,xe,He,at,wt){let Ht={};for(let rr=D;rr<Z;rr++){let pr=S.get(rr);Ht.textBox={x1:pr.x1,y1:pr.y1,x2:pr.x2,y2:pr.y2,anchorPointX:pr.anchorPointX,anchorPointY:pr.anchorPointY},Ht.textFeatureIndex=pr.featureIndex;break}for(let rr=ie;rr<pe;rr++){let pr=S.get(rr);Ht.verticalTextBox={x1:pr.x1,y1:pr.y1,x2:pr.x2,y2:pr.y2,anchorPointX:pr.anchorPointX,anchorPointY:pr.anchorPointY},Ht.verticalTextFeatureIndex=pr.featureIndex;break}for(let rr=xe;rr<He;rr++){let pr=S.get(rr);Ht.iconBox={x1:pr.x1,y1:pr.y1,x2:pr.x2,y2:pr.y2,anchorPointX:pr.anchorPointX,anchorPointY:pr.anchorPointY},Ht.iconFeatureIndex=pr.featureIndex;break}for(let rr=at;rr<wt;rr++){let pr=S.get(rr);Ht.verticalIconBox={x1:pr.x1,y1:pr.y1,x2:pr.x2,y2:pr.y2,anchorPointX:pr.anchorPointX,anchorPointY:pr.anchorPointY},Ht.verticalIconFeatureIndex=pr.featureIndex;break}return Ht}deserializeCollisionBoxes(S){this.collisionArrays=[];for(let D=0;D<this.symbolInstances.length;D++){let Z=this.symbolInstances.get(D);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(S,Z.textBoxStartIndex,Z.textBoxEndIndex,Z.verticalTextBoxStartIndex,Z.verticalTextBoxEndIndex,Z.iconBoxStartIndex,Z.iconBoxEndIndex,Z.verticalIconBoxStartIndex,Z.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,D){let Z=S.placedSymbolArray.get(D),ie=Z.vertexStartIndex+4*Z.numGlyphs;for(let pe=Z.vertexStartIndex;pe<ie;pe+=4)S.indexArray.emplaceBack(pe,pe+1,pe+2),S.indexArray.emplaceBack(pe+1,pe+2,pe+3)}getSortedSymbolIndexes(S){if(this.sortedAngle===S&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;let D=Math.sin(S),Z=Math.cos(S),ie=[],pe=[],xe=[];for(let He=0;He<this.symbolInstances.length;++He){xe.push(He);let at=this.symbolInstances.get(He);ie.push(0|Math.round(D*at.anchorX+Z*at.anchorY)),pe.push(at.featureIndex)}return xe.sort((He,at)=>ie[He]-ie[at]||pe[at]-pe[He]),xe}addToSortKeyRanges(S,D){let Z=this.sortKeyRanges[this.sortKeyRanges.length-1];Z&&Z.sortKey===D?Z.symbolInstanceEnd=S+1:this.sortKeyRanges.push({sortKey:D,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 D of this.symbolInstanceIndexes){let Z=this.symbolInstances.get(D);this.featureSortOrder.push(Z.featureIndex),[Z.rightJustifiedTextSymbolIndex,Z.centerJustifiedTextSymbolIndex,Z.leftJustifiedTextSymbolIndex].forEach((ie,pe,xe)=>{ie>=0&&xe.indexOf(ie)===pe&&this.addIndicesForPlacedSymbol(this.text,ie)}),Z.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Z.verticalPlacedTextSymbolIndex),Z.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Z.placedIconSymbolIndex),Z.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Z.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Yc,jx;gi("SymbolBucket",E1,{omit:["layers","collisionBoxArray","features","compareText"]}),E1.MAX_GLYPHS=65535,E1.addDynamicAttributes=aM;var Dw={get paint(){return jx=jx||new oe({"icon-opacity":new _s(fe.paint_symbol["icon-opacity"]),"icon-color":new _s(fe.paint_symbol["icon-color"]),"icon-halo-color":new _s(fe.paint_symbol["icon-halo-color"]),"icon-halo-width":new _s(fe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _s(fe.paint_symbol["icon-halo-blur"]),"icon-translate":new Uo(fe.paint_symbol["icon-translate"]),"icon-translate-anchor":new Uo(fe.paint_symbol["icon-translate-anchor"]),"text-opacity":new _s(fe.paint_symbol["text-opacity"]),"text-color":new _s(fe.paint_symbol["text-color"],{runtimeType:Je,getOverride:I=>I.textColor,hasOverride:I=>!!I.textColor}),"text-halo-color":new _s(fe.paint_symbol["text-halo-color"]),"text-halo-width":new _s(fe.paint_symbol["text-halo-width"]),"text-halo-blur":new _s(fe.paint_symbol["text-halo-blur"]),"text-translate":new Uo(fe.paint_symbol["text-translate"]),"text-translate-anchor":new Uo(fe.paint_symbol["text-translate-anchor"])})},get layout(){return Yc=Yc||new oe({"symbol-placement":new Uo(fe.layout_symbol["symbol-placement"]),"symbol-spacing":new Uo(fe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Uo(fe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _s(fe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Uo(fe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Uo(fe.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Uo(fe.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Uo(fe.layout_symbol["icon-ignore-placement"]),"icon-optional":new Uo(fe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Uo(fe.layout_symbol["icon-rotation-alignment"]),"icon-size":new _s(fe.layout_symbol["icon-size"]),"icon-text-fit":new Uo(fe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Uo(fe.layout_symbol["icon-text-fit-padding"]),"icon-image":new _s(fe.layout_symbol["icon-image"]),"icon-rotate":new _s(fe.layout_symbol["icon-rotate"]),"icon-padding":new _s(fe.layout_symbol["icon-padding"]),"icon-keep-upright":new Uo(fe.layout_symbol["icon-keep-upright"]),"icon-offset":new _s(fe.layout_symbol["icon-offset"]),"icon-anchor":new _s(fe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Uo(fe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Uo(fe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Uo(fe.layout_symbol["text-rotation-alignment"]),"text-field":new _s(fe.layout_symbol["text-field"]),"text-font":new _s(fe.layout_symbol["text-font"]),"text-size":new _s(fe.layout_symbol["text-size"]),"text-max-width":new _s(fe.layout_symbol["text-max-width"]),"text-line-height":new Uo(fe.layout_symbol["text-line-height"]),"text-letter-spacing":new _s(fe.layout_symbol["text-letter-spacing"]),"text-justify":new _s(fe.layout_symbol["text-justify"]),"text-radial-offset":new _s(fe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Uo(fe.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new _s(fe.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new _s(fe.layout_symbol["text-anchor"]),"text-max-angle":new Uo(fe.layout_symbol["text-max-angle"]),"text-writing-mode":new Uo(fe.layout_symbol["text-writing-mode"]),"text-rotate":new _s(fe.layout_symbol["text-rotate"]),"text-padding":new Uo(fe.layout_symbol["text-padding"]),"text-keep-upright":new Uo(fe.layout_symbol["text-keep-upright"]),"text-transform":new _s(fe.layout_symbol["text-transform"]),"text-offset":new _s(fe.layout_symbol["text-offset"]),"text-allow-overlap":new Uo(fe.layout_symbol["text-allow-overlap"]),"text-overlap":new Uo(fe.layout_symbol["text-overlap"]),"text-ignore-placement":new Uo(fe.layout_symbol["text-ignore-placement"]),"text-optional":new Uo(fe.layout_symbol["text-optional"])})}};class Zx{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:ct,this.defaultValue=S}evaluate(S){if(S.formattedSection){let D=this.defaultValue.property.overrides;if(D&&D.hasOverride(S.formattedSection))return D.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}}gi("FormatSectionOverride",Zx,{omit:["defaultValue"]});class ug extends B{constructor(S){super(S,Dw)}recalculate(S,D){if(super.recalculate(S,D),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 Z=this.layout.get("text-writing-mode");if(Z){let ie=[];for(let pe of Z)ie.indexOf(pe)<0&&ie.push(pe);this.layout._values["text-writing-mode"]=ie}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(S,D,Z,ie){let pe=this.layout.get(S).evaluate(D,{},Z,ie),xe=this._unevaluatedLayout._values[S];return xe.isDataDriven()||Cs(xe.value)||!pe?pe:function(He,at){return at.replace(/{([^{}]+)}/g,(wt,Ht)=>He&&Ht in He?String(He[Ht]):"")}(D.properties,pe)}createBucket(S){return new E1(S)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let S of Dw.paint.overridableProperties){if(!ug.hasPaintOverride(this.layout,S))continue;let D=this.paint.get(S),Z=new Zx(D),ie=new Jn(Z,D.property.specification),pe=null;pe=D.value.kind==="constant"||D.value.kind==="source"?new Zo("source",ie):new Eo("composite",ie,D.value.zoomStops),this.paint._values[S]=new cl(D.property,pe,D.parameters)}}_handleOverridablePaintPropertyUpdate(S,D,Z){return!(!this.layout||D.isDataDriven()||Z.isDataDriven())&&ug.hasPaintOverride(this.layout,S)}static hasPaintOverride(S,D){let Z=S.get("text-field"),ie=Dw.paint.properties[D],pe=!1,xe=He=>{for(let at of He)if(ie.overrides&&ie.overrides.hasOverride(at))return void(pe=!0)};if(Z.value.kind==="constant"&&Z.value.value instanceof zr)xe(Z.value.value.sections);else if(Z.value.kind==="source"){let He=wt=>{pe||(wt instanceof Ur&&Yr(wt.value)===ir?xe(wt.value.sections):wt instanceof Xn?xe(wt.sections):wt.eachChild(He))},at=Z.value;at._styleExpression&&He(at._styleExpression.expression)}return pe}}let mC;var Xx={get paint(){return mC=mC||new oe({"background-color":new Uo(fe.paint_background["background-color"]),"background-pattern":new Il(fe.paint_background["background-pattern"]),"background-opacity":new Uo(fe.paint_background["background-opacity"])})}};class Q8 extends B{constructor(S){super(S,Xx)}}let lM;var gC={get paint(){return lM=lM||new oe({"raster-opacity":new Uo(fe.paint_raster["raster-opacity"]),"raster-hue-rotate":new Uo(fe.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Uo(fe.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Uo(fe.paint_raster["raster-brightness-max"]),"raster-saturation":new Uo(fe.paint_raster["raster-saturation"]),"raster-contrast":new Uo(fe.paint_raster["raster-contrast"]),"raster-resampling":new Uo(fe.paint_raster["raster-resampling"]),"raster-fade-duration":new Uo(fe.paint_raster["raster-fade-duration"])})}};class Yx extends B{constructor(S){super(S,gC)}}class uM extends B{constructor(S){super(S,{}),this.onAdd=D=>{this.implementation.onAdd&&this.implementation.onAdd(D,D.painter.context.gl)},this.onRemove=D=>{this.implementation.onRemove&&this.implementation.onRemove(D,D.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 fM{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 cM=63710088e-1;class dy{constructor(S,D){if(isNaN(S)||isNaN(D))throw new Error(`Invalid LngLat object: (${S}, ${D})`);if(this.lng=+S,this.lat=+D,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new dy(A(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(S){let D=Math.PI/180,Z=this.lat*D,ie=S.lat*D,pe=Math.sin(Z)*Math.sin(ie)+Math.cos(Z)*Math.cos(ie)*Math.cos((S.lng-this.lng)*D);return cM*Math.acos(Math.min(pe,1))}static convert(S){if(S instanceof dy)return S;if(Array.isArray(S)&&(S.length===2||S.length===3))return new dy(Number(S[0]),Number(S[1]));if(!Array.isArray(S)&&typeof S=="object"&&S!==null)return new dy(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 k1=2*Math.PI*cM;function _C(I){return k1*Math.cos(I*Math.PI/180)}function Rw(I){return(180+I)/360}function xC(I){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+I*Math.PI/360)))/360}function Fw(I,S){return I/_C(S)}function Kx(I){return 360/Math.PI*Math.atan(Math.exp((180-360*I)*Math.PI/180))-90}class Jx{constructor(S,D,Z=0){this.x=+S,this.y=+D,this.z=+Z}static fromLngLat(S,D=0){let Z=dy.convert(S);return new Jx(Rw(Z.lng),xC(Z.lat),Fw(D,Z.lat))}toLngLat(){return new dy(360*this.x-180,Kx(this.y))}toAltitude(){return this.z*_C(Kx(this.y))}meterInMercatorCoordinateUnits(){return 1/k1*(S=Kx(this.y),1/Math.cos(S*Math.PI/180));var S}}function yv(I,S,D){var Z=2*Math.PI*6378137/256/Math.pow(2,D);return[I*Z-2*Math.PI*6378137/2,S*Z-2*Math.PI*6378137/2]}class hM{constructor(S,D,Z){if(!function(ie,pe,xe){return!(ie<0||ie>25||xe<0||xe>=Math.pow(2,ie)||pe<0||pe>=Math.pow(2,ie))}(S,D,Z))throw new Error(`x=${D}, y=${Z}, 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=D,this.y=Z,this.key=$x(0,S,S,D,Z)}equals(S){return this.z===S.z&&this.x===S.x&&this.y===S.y}url(S,D,Z){let ie=(xe=this.y,He=this.z,at=yv(256*(pe=this.x),256*(xe=Math.pow(2,He)-xe-1),He),wt=yv(256*(pe+1),256*(xe+1),He),at[0]+","+at[1]+","+wt[0]+","+wt[1]);var pe,xe,He,at,wt;let Ht=function(rr,pr,Ar){let Vr,ri="";for(let Ii=rr;Ii>0;Ii--)Vr=1<<Ii-1,ri+=(pr&Vr?1:0)+(Ar&Vr?2:0);return ri}(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(Z==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,D>1?"@2x":"").replace(/{quadkey}/g,Ht).replace(/{bbox-epsg-3857}/g,ie)}isChildOf(S){let D=this.z-S.z;return D>0&&S.x===this.x>>D&&S.y===this.y>>D}getTilePoint(S){let D=Math.pow(2,this.z);return new l((S.x*D-this.x)*Rl,(S.y*D-this.y)*Rl)}toString(){return`${this.z}/${this.x}/${this.y}`}}class bC{constructor(S,D){this.wrap=S,this.canonical=D,this.key=$x(S,D.z,D.z,D.x,D.y)}}class Jp{constructor(S,D,Z,ie,pe){if(S<Z)throw new Error(`overscaledZ should be >= z; overscaledZ = ${S}; z = ${Z}`);this.overscaledZ=S,this.wrap=D,this.canonical=new hM(Z,+ie,+pe),this.key=$x(D,S,Z,ie,pe)}clone(){return new Jp(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 D=this.canonical.z-S;return S>this.canonical.z?new Jp(S,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Jp(S,this.wrap,S,this.canonical.x>>D,this.canonical.y>>D)}calculateScaledKey(S,D){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let Z=this.canonical.z-S;return S>this.canonical.z?$x(this.wrap*+D,S,this.canonical.z,this.canonical.x,this.canonical.y):$x(this.wrap*+D,S,S,this.canonical.x>>Z,this.canonical.y>>Z)}isChildOf(S){if(S.wrap!==this.wrap)return!1;let D=this.canonical.z-S.canonical.z;return S.overscaledZ===0||S.overscaledZ<this.overscaledZ&&S.canonical.x===this.canonical.x>>D&&S.canonical.y===this.canonical.y>>D}children(S){if(this.overscaledZ>=S)return[new Jp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let D=this.canonical.z+1,Z=2*this.canonical.x,ie=2*this.canonical.y;return[new Jp(D,this.wrap,D,Z,ie),new Jp(D,this.wrap,D,Z+1,ie),new Jp(D,this.wrap,D,Z,ie+1),new Jp(D,this.wrap,D,Z+1,ie+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 Jp(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(S){return new Jp(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 bC(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(S){return this.canonical.getTilePoint(new Jx(S.x-this.wrap,S.y))}}function $x(I,S,D,Z,ie){(I*=2)<0&&(I=-1*I-1);let pe=1<<D;return(pe*pe*I+pe*ie+Z).toString(36)+D.toString(36)+S.toString(36)}gi("CanonicalTileID",hM),gi("OverscaledTileID",Jp,{omit:["posMatrix"]});class wC{constructor(S,D,Z,ie=1,pe=1,xe=1,He=0){if(this.uid=S,D.height!==D.width)throw new RangeError("DEM tiles must be square");if(Z&&!["mapbox","terrarium","custom"].includes(Z))return void T(`"${Z}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=D.height;let at=this.dim=D.height-2;switch(this.data=new Uint32Array(D.data.buffer),Z){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=ie,this.greenFactor=pe,this.blueFactor=xe,this.baseShift=He;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let wt=0;wt<at;wt++)this.data[this._idx(-1,wt)]=this.data[this._idx(0,wt)],this.data[this._idx(at,wt)]=this.data[this._idx(at-1,wt)],this.data[this._idx(wt,-1)]=this.data[this._idx(wt,0)],this.data[this._idx(wt,at)]=this.data[this._idx(wt,at-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(at,-1)]=this.data[this._idx(at-1,0)],this.data[this._idx(-1,at)]=this.data[this._idx(0,at-1)],this.data[this._idx(at,at)]=this.data[this._idx(at-1,at-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let wt=0;wt<at;wt++)for(let Ht=0;Ht<at;Ht++){let rr=this.get(wt,Ht);rr>this.max&&(this.max=rr),rr<this.min&&(this.min=rr)}}get(S,D){let Z=new Uint8Array(this.data.buffer),ie=4*this._idx(S,D);return this.unpack(Z[ie],Z[ie+1],Z[ie+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(S,D){if(S<-1||S>=this.dim+1||D<-1||D>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(D+1)*this.stride+(S+1)}unpack(S,D,Z){return S*this.redFactor+D*this.greenFactor+Z*this.blueFactor-this.baseShift}getPixels(){return new al({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(S,D,Z){if(this.dim!==S.dim)throw new Error("dem dimension mismatch");let ie=D*this.dim,pe=D*this.dim+this.dim,xe=Z*this.dim,He=Z*this.dim+this.dim;switch(D){case-1:ie=pe-1;break;case 1:pe=ie+1}switch(Z){case-1:xe=He-1;break;case 1:He=xe+1}let at=-D*this.dim,wt=-Z*this.dim;for(let Ht=xe;Ht<He;Ht++)for(let rr=ie;rr<pe;rr++)this.data[this._idx(rr,Ht)]=S.data[this._idx(rr+at,Ht+wt)]}}gi("DEMData",wC);class TC{constructor(S){this._stringToNumber={},this._numberToString=[];for(let D=0;D<S.length;D++){let Z=S[D];this._stringToNumber[Z]=D,this._numberToString[D]=Z}}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 dM{constructor(S,D,Z,ie,pe){this.type="Feature",this._vectorTileFeature=S,S._z=D,S._x=Z,S._y=ie,this.properties=S.properties,this.id=pe}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 D in this)D!=="_geometry"&&D!=="_vectorTileFeature"&&(S[D]=this[D]);return S}}class fg{constructor(S,D){this.tileID=S,this.x=S.canonical.x,this.y=S.canonical.y,this.z=S.canonical.z,this.grid=new ui(Rl,16,0),this.grid3D=new ui(Rl,16,0),this.featureIndexArray=new ku,this.promoteId=D}insert(S,D,Z,ie,pe,xe){let He=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(Z,ie,pe);let at=xe?this.grid3D:this.grid;for(let wt=0;wt<D.length;wt++){let Ht=D[wt],rr=[1/0,1/0,-1/0,-1/0];for(let pr=0;pr<Ht.length;pr++){let Ar=Ht[pr];rr[0]=Math.min(rr[0],Ar.x),rr[1]=Math.min(rr[1],Ar.y),rr[2]=Math.max(rr[2],Ar.x),rr[3]=Math.max(rr[3],Ar.y)}rr[0]<Rl&&rr[1]<Rl&&rr[2]>=0&&rr[3]>=0&&at.insert(He,rr[0],rr[1],rr[2],rr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new qi.VectorTile(new tM(this.rawTileData)).layers,this.sourceLayerCoder=new TC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(S,D,Z,ie){this.loadVTLayers();let pe=S.params||{},xe=Rl/S.tileSize/S.scale,He=Sn(pe.filter),at=S.queryGeometry,wt=S.queryPadding*xe,Ht=SC(at),rr=this.grid.query(Ht.minX-wt,Ht.minY-wt,Ht.maxX+wt,Ht.maxY+wt),pr=SC(S.cameraQueryGeometry),Ar=this.grid3D.query(pr.minX-wt,pr.minY-wt,pr.maxX+wt,pr.maxY+wt,(Ii,Zi,da,cn)=>function(jn,Va,hl,iu,Su){for(let Qs of jn)if(Va<=Qs.x&&hl<=Qs.y&&iu>=Qs.x&&Su>=Qs.y)return!0;let Zl=[new l(Va,hl),new l(Va,Su),new l(iu,Su),new l(iu,hl)];if(jn.length>2){for(let Qs of Zl)if(Vs(jn,Qs))return!0}for(let Qs=0;Qs<jn.length-1;Qs++)if(Hs(jn[Qs],jn[Qs+1],Zl))return!0;return!1}(S.cameraQueryGeometry,Ii-wt,Zi-wt,da+wt,cn+wt));for(let Ii of Ar)rr.push(Ii);rr.sort(eB);let Vr={},ri;for(let Ii=0;Ii<rr.length;Ii++){let Zi=rr[Ii];if(Zi===ri)continue;ri=Zi;let da=this.featureIndexArray.get(Zi),cn=null;this.loadMatchingFeature(Vr,da.bucketIndex,da.sourceLayerIndex,da.featureIndex,He,pe.layers,pe.availableImages,D,Z,ie,(jn,Va,hl)=>(cn||(cn=of(jn)),Va.queryIntersectsFeature(at,jn,hl,cn,this.z,S.transform,xe,S.pixelPosMatrix)))}return Vr}loadMatchingFeature(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr){let pr=this.bucketLayerIDs[D];if(xe&&!function(Ii,Zi){for(let da=0;da<Ii.length;da++)if(Zi.indexOf(Ii[da])>=0)return!0;return!1}(xe,pr))return;let Ar=this.sourceLayerCoder.decode(Z),Vr=this.vtLayers[Ar].feature(ie);if(pe.needGeometry){let Ii=ff(Vr,!0);if(!pe.filter(new Fo(this.tileID.overscaledZ),Ii,this.tileID.canonical))return}else if(!pe.filter(new Fo(this.tileID.overscaledZ),Vr))return;let ri=this.getId(Vr,Ar);for(let Ii=0;Ii<pr.length;Ii++){let Zi=pr[Ii];if(xe&&xe.indexOf(Zi)<0)continue;let da=at[Zi];if(!da)continue;let cn={};ri&&Ht&&(cn=Ht.getState(da.sourceLayer||"_geojsonTileLayer",ri));let jn=L({},wt[Zi]);jn.paint=AC(jn.paint,da.paint,Vr,cn,He),jn.layout=AC(jn.layout,da.layout,Vr,cn,He);let Va=!rr||rr(Vr,da,cn);if(!Va)continue;let hl=new dM(Vr,this.z,this.x,this.y,ri);hl.layer=jn;let iu=S[Zi];iu===void 0&&(iu=S[Zi]=[]),iu.push({featureIndex:ie,feature:hl,intersectionZ:Va})}}lookupSymbolFeatures(S,D,Z,ie,pe,xe,He,at){let wt={};this.loadVTLayers();let Ht=Sn(pe);for(let rr of S)this.loadMatchingFeature(wt,Z,ie,rr,Ht,xe,He,at,D);return wt}hasLayer(S){for(let D of this.bucketLayerIDs)for(let Z of D)if(S===Z)return!0;return!1}getId(S,D){let Z=S.id;return this.promoteId&&(Z=S.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[D]],typeof Z=="boolean"&&(Z=Number(Z))),Z}}function AC(I,S,D,Z,ie){return C(I,(pe,xe)=>{let He=S instanceof xl?S.get(xe):null;return He&&He.evaluate?He.evaluate(D,Z,ie):He})}function SC(I){let S=1/0,D=1/0,Z=-1/0,ie=-1/0;for(let pe of I)S=Math.min(S,pe.x),D=Math.min(D,pe.y),Z=Math.max(Z,pe.x),ie=Math.max(ie,pe.y);return{minX:S,minY:D,maxX:Z,maxY:ie}}function eB(I,S){return S-I}function MC(I,S,D,Z,ie){let pe=[];for(let xe=0;xe<I.length;xe++){let He=I[xe],at;for(let wt=0;wt<He.length-1;wt++){let Ht=He[wt],rr=He[wt+1];Ht.x<S&&rr.x<S||(Ht.x<S?Ht=new l(S,Ht.y+(S-Ht.x)/(rr.x-Ht.x)*(rr.y-Ht.y))._round():rr.x<S&&(rr=new l(S,Ht.y+(S-Ht.x)/(rr.x-Ht.x)*(rr.y-Ht.y))._round()),Ht.y<D&&rr.y<D||(Ht.y<D?Ht=new l(Ht.x+(D-Ht.y)/(rr.y-Ht.y)*(rr.x-Ht.x),D)._round():rr.y<D&&(rr=new l(Ht.x+(D-Ht.y)/(rr.y-Ht.y)*(rr.x-Ht.x),D)._round()),Ht.x>=Z&&rr.x>=Z||(Ht.x>=Z?Ht=new l(Z,Ht.y+(Z-Ht.x)/(rr.x-Ht.x)*(rr.y-Ht.y))._round():rr.x>=Z&&(rr=new l(Z,Ht.y+(Z-Ht.x)/(rr.x-Ht.x)*(rr.y-Ht.y))._round()),Ht.y>=ie&&rr.y>=ie||(Ht.y>=ie?Ht=new l(Ht.x+(ie-Ht.y)/(rr.y-Ht.y)*(rr.x-Ht.x),ie)._round():rr.y>=ie&&(rr=new l(Ht.x+(ie-Ht.y)/(rr.y-Ht.y)*(rr.x-Ht.x),ie)._round()),at&&Ht.equals(at[at.length-1])||(at=[Ht],pe.push(at)),at.push(rr)))))}}return pe}gi("FeatureIndex",fg,{omit:["rawTileData","sourceLayerCoder"]});class py extends l{constructor(S,D,Z,ie){super(S,D),this.angle=Z,ie!==void 0&&(this.segment=ie)}clone(){return new py(this.x,this.y,this.angle,this.segment)}}function pM(I,S,D,Z,ie){if(S.segment===void 0||D===0)return!0;let pe=S,xe=S.segment+1,He=0;for(;He>-D/2;){if(xe--,xe<0)return!1;He-=I[xe].dist(pe),pe=I[xe]}He+=I[xe].dist(I[xe+1]),xe++;let at=[],wt=0;for(;He<D/2;){let Ht=I[xe],rr=I[xe+1];if(!rr)return!1;let pr=I[xe-1].angleTo(Ht)-Ht.angleTo(rr);for(pr=Math.abs((pr+3*Math.PI)%(2*Math.PI)-Math.PI),at.push({distance:He,angleDelta:pr}),wt+=pr;He-at[0].distance>Z;)wt-=at.shift().angleDelta;if(wt>ie)return!1;xe++,He+=Ht.dist(rr)}return!0}function EC(I){let S=0;for(let D=0;D<I.length-1;D++)S+=I[D].dist(I[D+1]);return S}function kC(I,S,D){return I?.6*S*D:0}function CC(I,S){return Math.max(I?I.right-I.left:0,S?S.right-S.left:0)}function tB(I,S,D,Z,ie,pe){let xe=kC(D,ie,pe),He=CC(D,Z)*pe,at=0,wt=EC(I)/2;for(let Ht=0;Ht<I.length-1;Ht++){let rr=I[Ht],pr=I[Ht+1],Ar=rr.dist(pr);if(at+Ar>wt){let Vr=(wt-at)/Ar,ri=ia.number(rr.x,pr.x,Vr),Ii=ia.number(rr.y,pr.y,Vr),Zi=new py(ri,Ii,pr.angleTo(rr),Ht);return Zi._round(),!xe||pM(I,Zi,He,xe,S)?Zi:void 0}at+=Ar}}function rB(I,S,D,Z,ie,pe,xe,He,at){let wt=kC(Z,pe,xe),Ht=CC(Z,ie),rr=Ht*xe,pr=I[0].x===0||I[0].x===at||I[0].y===0||I[0].y===at;return S-rr<S/4&&(S=rr+S/4),LC(I,pr?S/2*He%S:(Ht/2+2*pe)*xe*He%S,S,wt,D,rr,pr,!1,at)}function LC(I,S,D,Z,ie,pe,xe,He,at){let wt=pe/2,Ht=EC(I),rr=0,pr=S-D,Ar=[];for(let Vr=0;Vr<I.length-1;Vr++){let ri=I[Vr],Ii=I[Vr+1],Zi=ri.dist(Ii),da=Ii.angleTo(ri);for(;pr+D<rr+Zi;){pr+=D;let cn=(pr-rr)/Zi,jn=ia.number(ri.x,Ii.x,cn),Va=ia.number(ri.y,Ii.y,cn);if(jn>=0&&jn<at&&Va>=0&&Va<at&&pr-wt>=0&&pr+wt<=Ht){let hl=new py(jn,Va,da,Vr);hl._round(),Z&&!pM(I,hl,pe,Z,ie)||Ar.push(hl)}}rr+=Zi}return He||Ar.length||xe||(Ar=LC(I,rr/2,D,Z,ie,pe,xe,!0,at)),Ar}gi("Anchor",py);let C1=kd;function zC(I,S,D,Z){let ie=[],pe=I.image,xe=pe.pixelRatio,He=pe.paddedRect.w-2*C1,at=pe.paddedRect.h-2*C1,wt={x1:I.left,y1:I.top,x2:I.right,y2:I.bottom},Ht=pe.stretchX||[[0,He]],rr=pe.stretchY||[[0,at]],pr=(Ts,wu)=>Ts+wu[1]-wu[0],Ar=Ht.reduce(pr,0),Vr=rr.reduce(pr,0),ri=He-Ar,Ii=at-Vr,Zi=0,da=Ar,cn=0,jn=Vr,Va=0,hl=ri,iu=0,Su=Ii;if(pe.content&&Z){let Ts=pe.content,wu=Ts[2]-Ts[0],fu=Ts[3]-Ts[1];(pe.textFitWidth||pe.textFitHeight)&&(wt=pC(I)),Zi=vy(Ht,0,Ts[0]),cn=vy(rr,0,Ts[1]),da=vy(Ht,Ts[0],Ts[2]),jn=vy(rr,Ts[1],Ts[3]),Va=Ts[0]-Zi,iu=Ts[1]-cn,hl=wu-da,Su=fu-jn}let Zl=wt.x1,Qs=wt.y1,gu=wt.x2-Zl,cu=wt.y2-Qs,uu=(Ts,wu,fu,Lu)=>{let oc=qw(Ts.stretch-Zi,da,gu,Zl),tc=L1(Ts.fixed-Va,hl,Ts.stretch,Ar),Ch=qw(wu.stretch-cn,jn,cu,Qs),$p=L1(wu.fixed-iu,Su,wu.stretch,Vr),ud=qw(fu.stretch-Zi,da,gu,Zl),Lh=L1(fu.fixed-Va,hl,fu.stretch,Ar),Wd=qw(Lu.stretch-cn,jn,cu,Qs),jd=L1(Lu.fixed-iu,Su,Lu.stretch,Vr),Zd=new l(oc,Ch),Kc=new l(ud,Ch),zh=new l(ud,Wd),Cd=new l(oc,Wd),fd=new l(tc/xe,$p/xe),Zh=new l(Lh/xe,jd/xe),rh=S*Math.PI/180;if(rh){let qf=Math.sin(rh),mc=Math.cos(rh),sc=[mc,-qf,qf,mc];Zd._matMult(sc),Kc._matMult(sc),Cd._matMult(sc),zh._matMult(sc)}let Pp=Ts.stretch+Ts.fixed,fp=wu.stretch+wu.fixed;return{tl:Zd,tr:Kc,bl:Cd,br:zh,tex:{x:pe.paddedRect.x+C1+Pp,y:pe.paddedRect.y+C1+fp,w:fu.stretch+fu.fixed-Pp,h:Lu.stretch+Lu.fixed-fp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:fd,pixelOffsetBR:Zh,minFontScaleX:hl/xe/gu,minFontScaleY:Su/xe/cu,isSDF:D}};if(Z&&(pe.stretchX||pe.stretchY)){let Ts=PC(Ht,ri,Ar),wu=PC(rr,Ii,Vr);for(let fu=0;fu<Ts.length-1;fu++){let Lu=Ts[fu],oc=Ts[fu+1];for(let tc=0;tc<wu.length-1;tc++)ie.push(uu(Lu,wu[tc],oc,wu[tc+1]))}}else ie.push(uu({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:He+1},{fixed:0,stretch:at+1}));return ie}function vy(I,S,D){let Z=0;for(let ie of I)Z+=Math.max(S,Math.min(D,ie[1]))-Math.max(S,Math.min(D,ie[0]));return Z}function PC(I,S,D){let Z=[{fixed:-C1,stretch:0}];for(let[ie,pe]of I){let xe=Z[Z.length-1];Z.push({fixed:ie-xe.stretch,stretch:xe.stretch}),Z.push({fixed:ie-xe.stretch,stretch:xe.stretch+(pe-ie)})}return Z.push({fixed:S+C1,stretch:D}),Z}function qw(I,S,D,Z){return I/S*D+Z}function L1(I,S,D,Z){return I-S*D/Z}class fm{constructor(S,D,Z,ie,pe,xe,He,at,wt,Ht){var rr;if(this.boxStartIndex=S.length,wt){let pr=xe.top,Ar=xe.bottom,Vr=xe.collisionPadding;Vr&&(pr-=Vr[1],Ar+=Vr[3]);let ri=Ar-pr;ri>0&&(ri=Math.max(10,ri),this.circleDiameter=ri)}else{let pr=!((rr=xe.image)===null||rr===void 0)&&rr.content&&(xe.image.textFitWidth||xe.image.textFitHeight)?pC(xe):{x1:xe.left,y1:xe.top,x2:xe.right,y2:xe.bottom};pr.y1=pr.y1*He-at[0],pr.y2=pr.y2*He+at[2],pr.x1=pr.x1*He-at[3],pr.x2=pr.x2*He+at[1];let Ar=xe.collisionPadding;if(Ar&&(pr.x1-=Ar[0]*He,pr.y1-=Ar[1]*He,pr.x2+=Ar[2]*He,pr.y2+=Ar[3]*He),Ht){let Vr=new l(pr.x1,pr.y1),ri=new l(pr.x2,pr.y1),Ii=new l(pr.x1,pr.y2),Zi=new l(pr.x2,pr.y2),da=Ht*Math.PI/180;Vr._rotate(da),ri._rotate(da),Ii._rotate(da),Zi._rotate(da),pr.x1=Math.min(Vr.x,ri.x,Ii.x,Zi.x),pr.x2=Math.max(Vr.x,ri.x,Ii.x,Zi.x),pr.y1=Math.min(Vr.y,ri.y,Ii.y,Zi.y),pr.y2=Math.max(Vr.y,ri.y,Ii.y,Zi.y)}S.emplaceBack(D.x,D.y,pr.x1,pr.y1,pr.x2,pr.y2,Z,ie,pe)}this.boxEndIndex=S.length}}class Hv{constructor(S=[],D=(Z,ie)=>Z<ie?-1:Z>ie?1:0){if(this.data=S,this.length=this.data.length,this.compare=D,this.length>0)for(let Z=(this.length>>1)-1;Z>=0;Z--)this._down(Z)}push(S){this.data.push(S),this._up(this.length++)}pop(){if(this.length===0)return;let S=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),S}peek(){return this.data[0]}_up(S){let{data:D,compare:Z}=this,ie=D[S];for(;S>0;){let pe=S-1>>1,xe=D[pe];if(Z(ie,xe)>=0)break;D[S]=xe,S=pe}D[S]=ie}_down(S){let{data:D,compare:Z}=this,ie=this.length>>1,pe=D[S];for(;S<ie;){let xe=1+(S<<1),He=xe+1;if(He<this.length&&Z(D[He],D[xe])<0&&(xe=He),Z(D[xe],pe)>=0)break;D[S]=D[xe],S=xe}D[S]=pe}}function iB(I,S=1,D=!1){let Z=1/0,ie=1/0,pe=-1/0,xe=-1/0,He=I[0];for(let Ar=0;Ar<He.length;Ar++){let Vr=He[Ar];(!Ar||Vr.x<Z)&&(Z=Vr.x),(!Ar||Vr.y<ie)&&(ie=Vr.y),(!Ar||Vr.x>pe)&&(pe=Vr.x),(!Ar||Vr.y>xe)&&(xe=Vr.y)}let at=Math.min(pe-Z,xe-ie),wt=at/2,Ht=new Hv([],nB);if(at===0)return new l(Z,ie);for(let Ar=Z;Ar<pe;Ar+=at)for(let Vr=ie;Vr<xe;Vr+=at)Ht.push(new z1(Ar+wt,Vr+wt,wt,I));let rr=function(Ar){let Vr=0,ri=0,Ii=0,Zi=Ar[0];for(let da=0,cn=Zi.length,jn=cn-1;da<cn;jn=da++){let Va=Zi[da],hl=Zi[jn],iu=Va.x*hl.y-hl.x*Va.y;ri+=(Va.x+hl.x)*iu,Ii+=(Va.y+hl.y)*iu,Vr+=3*iu}return new z1(ri/Vr,Ii/Vr,0,Ar)}(I),pr=Ht.length;for(;Ht.length;){let Ar=Ht.pop();(Ar.d>rr.d||!rr.d)&&(rr=Ar,D&&console.log("found best %d after %d probes",Math.round(1e4*Ar.d)/1e4,pr)),Ar.max-rr.d<=S||(wt=Ar.h/2,Ht.push(new z1(Ar.p.x-wt,Ar.p.y-wt,wt,I)),Ht.push(new z1(Ar.p.x+wt,Ar.p.y-wt,wt,I)),Ht.push(new z1(Ar.p.x-wt,Ar.p.y+wt,wt,I)),Ht.push(new z1(Ar.p.x+wt,Ar.p.y+wt,wt,I)),pr+=4)}return D&&(console.log(`num probes: ${pr}`),console.log(`best distance: ${rr.d}`)),rr.p}function nB(I,S){return S.max-I.max}function z1(I,S,D,Z){this.p=new l(I,S),this.h=D,this.d=function(ie,pe){let xe=!1,He=1/0;for(let at=0;at<pe.length;at++){let wt=pe[at];for(let Ht=0,rr=wt.length,pr=rr-1;Ht<rr;pr=Ht++){let Ar=wt[Ht],Vr=wt[pr];Ar.y>ie.y!=Vr.y>ie.y&&ie.x<(Vr.x-Ar.x)*(ie.y-Ar.y)/(Vr.y-Ar.y)+Ar.x&&(xe=!xe),He=Math.min(He,ha(ie,Ar,Vr))}}return(xe?1:-1)*Math.sqrt(He)}(this.p,Z),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 cm=7,cg=Number.POSITIVE_INFINITY;function vM(I,S){return S[1]!==cg?function(D,Z,ie){let pe=0,xe=0;switch(Z=Math.abs(Z),ie=Math.abs(ie),D){case"top-right":case"top-left":case"top":xe=ie-cm;break;case"bottom-right":case"bottom-left":case"bottom":xe=-ie+cm}switch(D){case"top-right":case"bottom-right":case"right":pe=-Z;break;case"top-left":case"bottom-left":case"left":pe=Z}return[pe,xe]}(I,S[0],S[1]):function(D,Z){let ie=0,pe=0;Z<0&&(Z=0);let xe=Z/Math.SQRT2;switch(D){case"top-right":case"top-left":pe=xe-cm;break;case"bottom-right":case"bottom-left":pe=-xe+cm;break;case"bottom":pe=-Z+cm;break;case"top":pe=Z-cm}switch(D){case"top-right":case"bottom-right":ie=-xe;break;case"top-left":case"bottom-left":ie=xe;break;case"left":ie=Z;break;case"right":ie=-Z}return[ie,pe]}(I,S[0])}function IC(I,S,D){var Z;let ie=I.layout,pe=(Z=ie.get("text-variable-anchor-offset"))===null||Z===void 0?void 0:Z.evaluate(S,{},D);if(pe){let He=pe.values,at=[];for(let wt=0;wt<He.length;wt+=2){let Ht=at[wt]=He[wt],rr=He[wt+1].map(pr=>pr*Ff);Ht.startsWith("top")?rr[1]-=cm:Ht.startsWith("bottom")&&(rr[1]+=cm),at[wt+1]=rr}return new Br(at)}let xe=ie.get("text-variable-anchor");if(xe){let He;He=I._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[ie.get("text-radial-offset").evaluate(S,{},D)*Ff,cg]:ie.get("text-offset").evaluate(S,{},D).map(wt=>wt*Ff);let at=[];for(let wt of xe)at.push(wt,vM(wt,He));return new Br(at)}return null}function yM(I){switch(I){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function aB(I,S,D,Z,ie,pe,xe,He,at,wt,Ht){let rr=pe.textMaxSize.evaluate(S,{});rr===void 0&&(rr=xe);let pr=I.layers[0].layout,Ar=pr.get("icon-offset").evaluate(S,{},Ht),Vr=RC(D.horizontal),ri=xe/24,Ii=I.tilePixelRatio*ri,Zi=I.tilePixelRatio*rr/24,da=I.tilePixelRatio*He,cn=I.tilePixelRatio*pr.get("symbol-spacing"),jn=pr.get("text-padding")*I.tilePixelRatio,Va=function(Ts,wu,fu,Lu=1){let oc=Ts.get("icon-padding").evaluate(wu,{},fu),tc=oc&&oc.values;return[tc[0]*Lu,tc[1]*Lu,tc[2]*Lu,tc[3]*Lu]}(pr,S,Ht,I.tilePixelRatio),hl=pr.get("text-max-angle")/180*Math.PI,iu=pr.get("text-rotation-alignment")!=="viewport"&&pr.get("symbol-placement")!=="point",Su=pr.get("icon-rotation-alignment")==="map"&&pr.get("symbol-placement")!=="point",Zl=pr.get("symbol-placement"),Qs=cn/2,gu=pr.get("icon-text-fit"),cu;Z&&gu!=="none"&&(I.allowVerticalPlacement&&D.vertical&&(cu=vC(Z,D.vertical,gu,pr.get("icon-text-fit-padding"),Ar,ri)),Vr&&(Z=vC(Z,Vr,gu,pr.get("icon-text-fit-padding"),Ar,ri)));let uu=(Ts,wu)=>{wu.x<0||wu.x>=Rl||wu.y<0||wu.y>=Rl||function(fu,Lu,oc,tc,Ch,$p,ud,Lh,Wd,jd,Zd,Kc,zh,Cd,fd,Zh,rh,Pp,fp,qf,mc,sc,Ip,Hc,P1){let v0=fu.addToLineVertexArray(Lu,oc),Gv,Qp,Pc,uh,ev=0,yy=0,cp=0,I1=0,bM=-1,Uw=-1,y0={},hg=Ji("");if(fu.allowVerticalPlacement&&tc.vertical){let Ld=Lh.layout.get("text-rotate").evaluate(mc,{},Hc)+90;Pc=new fm(Wd,Lu,jd,Zd,Kc,tc.vertical,zh,Cd,fd,Ld),ud&&(uh=new fm(Wd,Lu,jd,Zd,Kc,ud,rh,Pp,fd,Ld))}if(Ch){let Ld=Lh.layout.get("icon-rotate").evaluate(mc,{}),tv=Lh.layout.get("icon-text-fit")!=="none",hm=zC(Ch,Ld,Ip,tv),Xd=ud?zC(ud,Ld,Ip,tv):void 0;Qp=new fm(Wd,Lu,jd,Zd,Kc,Ch,rh,Pp,!1,Ld),ev=4*hm.length;let zd=fu.iconSizeData,gv=null;zd.kind==="source"?(gv=[p0*Lh.layout.get("icon-size").evaluate(mc,{})],gv[0]>lm&&T(`${fu.layerIds[0]}: Value for "icon-size" is >= ${Wx}. Reduce your "icon-size".`)):zd.kind==="composite"&&(gv=[p0*sc.compositeIconSizes[0].evaluate(mc,{},Hc),p0*sc.compositeIconSizes[1].evaluate(mc,{},Hc)],(gv[0]>lm||gv[1]>lm)&&T(`${fu.layerIds[0]}: Value for "icon-size" is >= ${Wx}. Reduce your "icon-size".`)),fu.addSymbols(fu.icon,hm,gv,qf,fp,mc,i.ah.none,Lu,v0.lineStartIndex,v0.lineLength,-1,Hc),bM=fu.icon.placedSymbolArray.length-1,Xd&&(yy=4*Xd.length,fu.addSymbols(fu.icon,Xd,gv,qf,fp,mc,i.ah.vertical,Lu,v0.lineStartIndex,v0.lineLength,-1,Hc),Uw=fu.icon.placedSymbolArray.length-1)}let Xh=Object.keys(tc.horizontal);for(let Ld of Xh){let tv=tc.horizontal[Ld];if(!Gv){hg=Ji(tv.text);let Xd=Lh.layout.get("text-rotate").evaluate(mc,{},Hc);Gv=new fm(Wd,Lu,jd,Zd,Kc,tv,zh,Cd,fd,Xd)}let hm=tv.positionedLines.length===1;if(cp+=DC(fu,Lu,tv,$p,Lh,fd,mc,Zh,v0,tc.vertical?i.ah.horizontal:i.ah.horizontalOnly,hm?Xh:[Ld],y0,bM,sc,Hc),hm)break}tc.vertical&&(I1+=DC(fu,Lu,tc.vertical,$p,Lh,fd,mc,Zh,v0,i.ah.vertical,["vertical"],y0,Uw,sc,Hc));let lB=Gv?Gv.boxStartIndex:fu.collisionBoxArray.length,Vw=Gv?Gv.boxEndIndex:fu.collisionBoxArray.length,m0=Pc?Pc.boxStartIndex:fu.collisionBoxArray.length,hp=Pc?Pc.boxEndIndex:fu.collisionBoxArray.length,OC=Qp?Qp.boxStartIndex:fu.collisionBoxArray.length,uB=Qp?Qp.boxEndIndex:fu.collisionBoxArray.length,NC=uh?uh.boxStartIndex:fu.collisionBoxArray.length,fB=uh?uh.boxEndIndex:fu.collisionBoxArray.length,mv=-1,tb=(Ld,tv)=>Ld&&Ld.circleDiameter?Math.max(Ld.circleDiameter,tv):tv;mv=tb(Gv,mv),mv=tb(Pc,mv),mv=tb(Qp,mv),mv=tb(uh,mv);let Hw=mv>-1?1:0;Hw&&(mv*=P1/Ff),fu.glyphOffsetArray.length>=E1.MAX_GLYPHS&&T("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),mc.sortKey!==void 0&&fu.addToSortKeyRanges(fu.symbolInstances.length,mc.sortKey);let wM=IC(Lh,mc,Hc),[cB,hB]=function(Ld,tv){let hm=Ld.length,Xd=tv==null?void 0:tv.values;if((Xd==null?void 0:Xd.length)>0)for(let zd=0;zd<Xd.length;zd+=2){let gv=Xd[zd+1];Ld.emplaceBack(i.aq[Xd[zd]],gv[0],gv[1])}return[hm,Ld.length]}(fu.textAnchorOffsets,wM);fu.symbolInstances.emplaceBack(Lu.x,Lu.y,y0.right>=0?y0.right:-1,y0.center>=0?y0.center:-1,y0.left>=0?y0.left:-1,y0.vertical||-1,bM,Uw,hg,lB,Vw,m0,hp,OC,uB,NC,fB,jd,cp,I1,ev,yy,Hw,0,zh,mv,cB,hB)}(I,wu,Ts,D,Z,ie,cu,I.layers[0],I.collisionBoxArray,S.index,S.sourceLayerIndex,I.index,Ii,[jn,jn,jn,jn],iu,at,da,Va,Su,Ar,S,pe,wt,Ht,xe)};if(Zl==="line")for(let Ts of MC(S.geometry,0,0,Rl,Rl)){let wu=rB(Ts,cn,hl,D.vertical||Vr,Z,24,Zi,I.overscaling,Rl);for(let fu of wu)Vr&&oB(I,Vr.text,Qs,fu)||uu(Ts,fu)}else if(Zl==="line-center"){for(let Ts of S.geometry)if(Ts.length>1){let wu=tB(Ts,hl,D.vertical||Vr,Z,24,Zi);wu&&uu(Ts,wu)}}else if(S.type==="Polygon")for(let Ts of ks(S.geometry,0)){let wu=iB(Ts,16);uu(Ts[0],new py(wu.x,wu.y,0))}else if(S.type==="LineString")for(let Ts of S.geometry)uu(Ts,new py(Ts[0].x,Ts[0].y,0));else if(S.type==="Point")for(let Ts of S.geometry)for(let wu of Ts)uu([wu],new py(wu.x,wu.y,0))}function DC(I,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr){let ri=function(da,cn,jn,Va,hl,iu,Su,Zl){let Qs=Va.layout.get("text-rotate").evaluate(iu,{})*Math.PI/180,gu=[];for(let cu of cn.positionedLines)for(let uu of cu.positionedGlyphs){if(!uu.rect)continue;let Ts=uu.rect||{},wu=fC+1,fu=!0,Lu=1,oc=0,tc=(hl||Zl)&&uu.vertical,Ch=uu.metrics.advance*uu.scale/2;if(Zl&&cn.verticalizable&&(oc=cu.lineOffset/2-(uu.imageName?-(Ff-uu.metrics.width*uu.scale)/2:(uu.scale-1)*Ff)),uu.imageName){let qf=Su[uu.imageName];fu=qf.sdf,Lu=qf.pixelRatio,wu=kd/Lu}let $p=hl?[uu.x+Ch,uu.y]:[0,0],ud=hl?[0,0]:[uu.x+Ch+jn[0],uu.y+jn[1]-oc],Lh=[0,0];tc&&(Lh=ud,ud=[0,0]);let Wd=uu.metrics.isDoubleResolution?2:1,jd=(uu.metrics.left-wu)*uu.scale-Ch+ud[0],Zd=(-uu.metrics.top-wu)*uu.scale+ud[1],Kc=jd+Ts.w/Wd*uu.scale/Lu,zh=Zd+Ts.h/Wd*uu.scale/Lu,Cd=new l(jd,Zd),fd=new l(Kc,Zd),Zh=new l(jd,zh),rh=new l(Kc,zh);if(tc){let qf=new l(-Ch,Ch-kh),mc=-Math.PI/2,sc=Ff/2-Ch,Ip=new l(5-kh-sc,-(uu.imageName?sc:0)),Hc=new l(...Lh);Cd._rotateAround(mc,qf)._add(Ip)._add(Hc),fd._rotateAround(mc,qf)._add(Ip)._add(Hc),Zh._rotateAround(mc,qf)._add(Ip)._add(Hc),rh._rotateAround(mc,qf)._add(Ip)._add(Hc)}if(Qs){let qf=Math.sin(Qs),mc=Math.cos(Qs),sc=[mc,-qf,qf,mc];Cd._matMult(sc),fd._matMult(sc),Zh._matMult(sc),rh._matMult(sc)}let Pp=new l(0,0),fp=new l(0,0);gu.push({tl:Cd,tr:fd,bl:Zh,br:rh,tex:Ts,writingMode:cn.writingMode,glyphOffset:$p,sectionIndex:uu.sectionIndex,isSDF:fu,pixelOffsetTL:Pp,pixelOffsetBR:fp,minFontScaleX:0,minFontScaleY:0})}return gu}(0,D,He,ie,pe,xe,Z,I.allowVerticalPlacement),Ii=I.textSizeData,Zi=null;Ii.kind==="source"?(Zi=[p0*ie.layout.get("text-size").evaluate(xe,{})],Zi[0]>lm&&T(`${I.layerIds[0]}: Value for "text-size" is >= ${Wx}. Reduce your "text-size".`)):Ii.kind==="composite"&&(Zi=[p0*Ar.compositeTextSizes[0].evaluate(xe,{},Vr),p0*Ar.compositeTextSizes[1].evaluate(xe,{},Vr)],(Zi[0]>lm||Zi[1]>lm)&&T(`${I.layerIds[0]}: Value for "text-size" is >= ${Wx}. Reduce your "text-size".`)),I.addSymbols(I.text,ri,Zi,He,pe,xe,wt,S,at.lineStartIndex,at.lineLength,pr,Vr);for(let da of Ht)rr[da]=I.text.placedSymbolArray.length-1;return 4*ri.length}function RC(I){for(let S in I)return I[S];return null}function oB(I,S,D,Z){let ie=I.compareText;if(S in ie){let pe=ie[S];for(let xe=pe.length-1;xe>=0;xe--)if(Z.dist(pe[xe])<D)return!0}else ie[S]=[];return ie[S].push(Z),!1}let FC=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class mM{static from(S){if(!(S instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[D,Z]=new Uint8Array(S,0,2);if(D!==219)throw new Error("Data does not appear to be in a KDBush format.");let ie=Z>>4;if(ie!==1)throw new Error(`Got v${ie} data when expected v1.`);let pe=FC[15&Z];if(!pe)throw new Error("Unrecognized array type.");let[xe]=new Uint16Array(S,2,1),[He]=new Uint32Array(S,4,1);return new mM(He,xe,pe,S)}constructor(S,D=64,Z=Float64Array,ie){if(isNaN(S)||S<0)throw new Error(`Unpexpected numItems value: ${S}.`);this.numItems=+S,this.nodeSize=Math.min(Math.max(+D,2),65535),this.ArrayType=Z,this.IndexArrayType=S<65536?Uint16Array:Uint32Array;let pe=FC.indexOf(this.ArrayType),xe=2*S*this.ArrayType.BYTES_PER_ELEMENT,He=S*this.IndexArrayType.BYTES_PER_ELEMENT,at=(8-He%8)%8;if(pe<0)throw new Error(`Unexpected typed array class: ${Z}.`);ie&&ie instanceof ArrayBuffer?(this.data=ie,this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+He+at,2*S),this._pos=2*S,this._finished=!0):(this.data=new ArrayBuffer(8+xe+He+at),this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+He+at,2*S),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+pe]),new Uint16Array(this.data,2,1)[0]=D,new Uint32Array(this.data,4,1)[0]=S)}add(S,D){let Z=this._pos>>1;return this.ids[Z]=Z,this.coords[this._pos++]=S,this.coords[this._pos++]=D,Z}finish(){let S=this._pos>>1;if(S!==this.numItems)throw new Error(`Added ${S} items when expected ${this.numItems}.`);return Bw(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(S,D,Z,ie){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:pe,coords:xe,nodeSize:He}=this,at=[0,pe.length-1,0],wt=[];for(;at.length;){let Ht=at.pop()||0,rr=at.pop()||0,pr=at.pop()||0;if(rr-pr<=He){for(let Ii=pr;Ii<=rr;Ii++){let Zi=xe[2*Ii],da=xe[2*Ii+1];Zi>=S&&Zi<=Z&&da>=D&&da<=ie&&wt.push(pe[Ii])}continue}let Ar=pr+rr>>1,Vr=xe[2*Ar],ri=xe[2*Ar+1];Vr>=S&&Vr<=Z&&ri>=D&&ri<=ie&&wt.push(pe[Ar]),(Ht===0?S<=Vr:D<=ri)&&(at.push(pr),at.push(Ar-1),at.push(1-Ht)),(Ht===0?Z>=Vr:ie>=ri)&&(at.push(Ar+1),at.push(rr),at.push(1-Ht))}return wt}within(S,D,Z){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ie,coords:pe,nodeSize:xe}=this,He=[0,ie.length-1,0],at=[],wt=Z*Z;for(;He.length;){let Ht=He.pop()||0,rr=He.pop()||0,pr=He.pop()||0;if(rr-pr<=xe){for(let Ii=pr;Ii<=rr;Ii++)BC(pe[2*Ii],pe[2*Ii+1],S,D)<=wt&&at.push(ie[Ii]);continue}let Ar=pr+rr>>1,Vr=pe[2*Ar],ri=pe[2*Ar+1];BC(Vr,ri,S,D)<=wt&&at.push(ie[Ar]),(Ht===0?S-Z<=Vr:D-Z<=ri)&&(He.push(pr),He.push(Ar-1),He.push(1-Ht)),(Ht===0?S+Z>=Vr:D+Z>=ri)&&(He.push(Ar+1),He.push(rr),He.push(1-Ht))}return at}}function Bw(I,S,D,Z,ie,pe){if(ie-Z<=D)return;let xe=Z+ie>>1;qC(I,S,xe,Z,ie,pe),Bw(I,S,D,Z,xe-1,1-pe),Bw(I,S,D,xe+1,ie,1-pe)}function qC(I,S,D,Z,ie,pe){for(;ie>Z;){if(ie-Z>600){let wt=ie-Z+1,Ht=D-Z+1,rr=Math.log(wt),pr=.5*Math.exp(2*rr/3),Ar=.5*Math.sqrt(rr*pr*(wt-pr)/wt)*(Ht-wt/2<0?-1:1);qC(I,S,D,Math.max(Z,Math.floor(D-Ht*pr/wt+Ar)),Math.min(ie,Math.floor(D+(wt-Ht)*pr/wt+Ar)),pe)}let xe=S[2*D+pe],He=Z,at=ie;for(Qx(I,S,Z,D),S[2*ie+pe]>xe&&Qx(I,S,Z,ie);He<at;){for(Qx(I,S,He,at),He++,at--;S[2*He+pe]<xe;)He++;for(;S[2*at+pe]>xe;)at--}S[2*Z+pe]===xe?Qx(I,S,Z,at):(at++,Qx(I,S,at,ie)),at<=D&&(Z=at+1),D<=at&&(ie=at-1)}}function Qx(I,S,D,Z){gM(I,D,Z),gM(S,2*D,2*Z),gM(S,2*D+1,2*Z+1)}function gM(I,S,D){let Z=I[S];I[S]=I[D],I[D]=Z}function BC(I,S,D,Z){let ie=I-D,pe=S-Z;return ie*ie+pe*pe}var Ow;i.bg=void 0,(Ow=i.bg||(i.bg={})).create="create",Ow.load="load",Ow.fullLoad="fullLoad";let eb=null,yh=[],_M=1e3/60,xM="loadTime",Nw="fullLoadTime",sB={mark(I){performance.mark(I)},frame(I){let S=I;eb!=null&&yh.push(S-eb),eb=S},clearMetrics(){eb=null,yh=[],performance.clearMeasures(xM),performance.clearMeasures(Nw);for(let I in i.bg)performance.clearMarks(i.bg[I])},getPerformanceMetrics(){performance.measure(xM,i.bg.create,i.bg.load),performance.measure(Nw,i.bg.create,i.bg.fullLoad);let I=performance.getEntriesByName(xM)[0].duration,S=performance.getEntriesByName(Nw)[0].duration,D=yh.length,Z=1/(yh.reduce((pe,xe)=>pe+xe,0)/D/1e3),ie=yh.filter(pe=>pe>_M).reduce((pe,xe)=>pe+(xe-_M)/_M,0);return{loadTime:I,fullLoadTime:S,fps:Z,percentDroppedFrames:ie/(D+ie)*100,totalFrames:D}}};i.$=class extends Yt{},i.A=Es,i.B=mi,i.C=function(I){if(U==null){let S=I.navigator?I.navigator.userAgent:null;U=!!I.safari||!(!S||!(/\b(iPad|iPhone|iPod)\b/.test(S)||S.match("Safari")&&!S.match("Chrome")))}return U},i.D=Uo,i.E=Be,i.F=class{constructor(I,S){this.target=I,this.mapId=S,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new fM(()=>this.process()),this.subscription=function(D,Z,ie,pe){return D.addEventListener(Z,ie,!1),{unsubscribe:()=>{D.removeEventListener(Z,ie,!1)}}}(this.target,"message",D=>this.receive(D)),this.globalScope=q(self)?I:window}registerMessageHandler(I,S){this.messageHandlers[I]=S}sendAsync(I,S){return new Promise((D,Z)=>{let ie=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[ie]={resolve:D,reject:Z},S&&S.signal.addEventListener("abort",()=>{delete this.resolveRejects[ie];let He={id:ie,type:"<cancel>",origin:location.origin,targetMapId:I.targetMapId,sourceMapId:this.mapId};this.target.postMessage(He)},{once:!0});let pe=[],xe=Object.assign(Object.assign({},I),{id:ie,sourceMapId:this.mapId,origin:location.origin,data:Rn(I.data,pe)});this.target.postMessage(xe,{transfer:pe})})}receive(I){let S=I.data,D=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[D];let Z=this.abortControllers[D];return delete this.abortControllers[D],void(Z&&Z.abort())}if(q(self)||S.mustQueue)return this.tasks[D]=S,this.taskQueue.push(D),void this.invoker.trigger();this.processTask(D,S)}}process(){if(this.taskQueue.length===0)return;let I=this.taskQueue.shift(),S=this.tasks[I];delete this.tasks[I],this.taskQueue.length>0&&this.invoker.trigger(),S&&this.processTask(I,S)}processTask(I,S){return a(this,void 0,void 0,function*(){if(S.type==="<response>"){let ie=this.resolveRejects[I];return delete this.resolveRejects[I],ie?void(S.error?ie.reject(Hn(S.error)):ie.resolve(Hn(S.data))):void 0}if(!this.messageHandlers[S.type])return void this.completeTask(I,new Error(`Could not find a registered handler for ${S.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let D=Hn(S.data),Z=new AbortController;this.abortControllers[I]=Z;try{let ie=yield this.messageHandlers[S.type](S.sourceMapId,D,Z);this.completeTask(I,null,ie)}catch(ie){this.completeTask(I,ie)}})}completeTask(I,S,D){let Z=[];delete this.abortControllers[I];let ie={id:I,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:S?Rn(S):null,data:Rn(D,Z)};this.target.postMessage(ie,{transfer:Z})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=Ce,i.H=function(){var I=new Es(16);return Es!=Float32Array&&(I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[11]=0,I[12]=0,I[13]=0,I[14]=0),I[0]=1,I[5]=1,I[10]=1,I[15]=1,I},i.I=kw,i.J=function(I,S,D){var Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri=D[0],Ii=D[1],Zi=D[2];return S===I?(I[12]=S[0]*ri+S[4]*Ii+S[8]*Zi+S[12],I[13]=S[1]*ri+S[5]*Ii+S[9]*Zi+S[13],I[14]=S[2]*ri+S[6]*Ii+S[10]*Zi+S[14],I[15]=S[3]*ri+S[7]*Ii+S[11]*Zi+S[15]):(ie=S[1],pe=S[2],xe=S[3],He=S[4],at=S[5],wt=S[6],Ht=S[7],rr=S[8],pr=S[9],Ar=S[10],Vr=S[11],I[0]=Z=S[0],I[1]=ie,I[2]=pe,I[3]=xe,I[4]=He,I[5]=at,I[6]=wt,I[7]=Ht,I[8]=rr,I[9]=pr,I[10]=Ar,I[11]=Vr,I[12]=Z*ri+He*Ii+rr*Zi+S[12],I[13]=ie*ri+at*Ii+pr*Zi+S[13],I[14]=pe*ri+wt*Ii+Ar*Zi+S[14],I[15]=xe*ri+Ht*Ii+Vr*Zi+S[15]),I},i.K=function(I,S,D){var Z=D[0],ie=D[1],pe=D[2];return I[0]=S[0]*Z,I[1]=S[1]*Z,I[2]=S[2]*Z,I[3]=S[3]*Z,I[4]=S[4]*ie,I[5]=S[5]*ie,I[6]=S[6]*ie,I[7]=S[7]*ie,I[8]=S[8]*pe,I[9]=S[9]*pe,I[10]=S[10]*pe,I[11]=S[11]*pe,I[12]=S[12],I[13]=S[13],I[14]=S[14],I[15]=S[15],I},i.L=Qo,i.M=function(I,S){let D={};for(let Z=0;Z<S.length;Z++){let ie=S[Z];ie in I&&(D[ie]=I[ie])}return D},i.N=dy,i.O=Rw,i.P=l,i.Q=xC,i.R=al,i.S=Jp,i.T=Us,i.U=x,i.V=b,i.W=G,i.X=Rl,i.Y=Ne,i.Z=Jx,i._=a,i.a=be,i.a$=function(I,S){var D=I[0],Z=I[1],ie=I[2],pe=I[3],xe=I[4],He=I[5],at=I[6],wt=I[7],Ht=I[8],rr=I[9],pr=I[10],Ar=I[11],Vr=I[12],ri=I[13],Ii=I[14],Zi=I[15],da=S[0],cn=S[1],jn=S[2],Va=S[3],hl=S[4],iu=S[5],Su=S[6],Zl=S[7],Qs=S[8],gu=S[9],cu=S[10],uu=S[11],Ts=S[12],wu=S[13],fu=S[14],Lu=S[15];return Math.abs(D-da)<=La*Math.max(1,Math.abs(D),Math.abs(da))&&Math.abs(Z-cn)<=La*Math.max(1,Math.abs(Z),Math.abs(cn))&&Math.abs(ie-jn)<=La*Math.max(1,Math.abs(ie),Math.abs(jn))&&Math.abs(pe-Va)<=La*Math.max(1,Math.abs(pe),Math.abs(Va))&&Math.abs(xe-hl)<=La*Math.max(1,Math.abs(xe),Math.abs(hl))&&Math.abs(He-iu)<=La*Math.max(1,Math.abs(He),Math.abs(iu))&&Math.abs(at-Su)<=La*Math.max(1,Math.abs(at),Math.abs(Su))&&Math.abs(wt-Zl)<=La*Math.max(1,Math.abs(wt),Math.abs(Zl))&&Math.abs(Ht-Qs)<=La*Math.max(1,Math.abs(Ht),Math.abs(Qs))&&Math.abs(rr-gu)<=La*Math.max(1,Math.abs(rr),Math.abs(gu))&&Math.abs(pr-cu)<=La*Math.max(1,Math.abs(pr),Math.abs(cu))&&Math.abs(Ar-uu)<=La*Math.max(1,Math.abs(Ar),Math.abs(uu))&&Math.abs(Vr-Ts)<=La*Math.max(1,Math.abs(Vr),Math.abs(Ts))&&Math.abs(ri-wu)<=La*Math.max(1,Math.abs(ri),Math.abs(wu))&&Math.abs(Ii-fu)<=La*Math.max(1,Math.abs(Ii),Math.abs(fu))&&Math.abs(Zi-Lu)<=La*Math.max(1,Math.abs(Zi),Math.abs(Lu))},i.a0=it,i.a1=hM,i.a2=At,i.a3=I=>{let S=window.document.createElement("video");return S.muted=!0,new Promise(D=>{S.onloadstart=()=>{D(S)};for(let Z of I){let ie=window.document.createElement("source");Ee(Z)||(S.crossOrigin="Anonymous"),ie.src=Z,S.appendChild(ie)}})},i.a4=function(){return _++},i.a5=ua,i.a6=E1,i.a7=Sn,i.a8=ff,i.a9=dM,i.aA=function(I){if(I.type==="custom")return new uM(I);switch(I.type){case"background":return new Q8(I);case"circle":return new hs(I);case"fill":return new Fr(I);case"fill-extrusion":return new Td(I);case"heatmap":return new Tu(I);case"hillshade":return new Cc(I);case"line":return new ag(I);case"raster":return new Yx(I);case"symbol":return new ug(I)}},i.aB=v,i.aC=function(I,S){if(!I)return[{command:"setStyle",args:[S]}];let D=[];try{if(!gt(I.version,S.version))return[{command:"setStyle",args:[S]}];gt(I.center,S.center)||D.push({command:"setCenter",args:[S.center]}),gt(I.zoom,S.zoom)||D.push({command:"setZoom",args:[S.zoom]}),gt(I.bearing,S.bearing)||D.push({command:"setBearing",args:[S.bearing]}),gt(I.pitch,S.pitch)||D.push({command:"setPitch",args:[S.pitch]}),gt(I.sprite,S.sprite)||D.push({command:"setSprite",args:[S.sprite]}),gt(I.glyphs,S.glyphs)||D.push({command:"setGlyphs",args:[S.glyphs]}),gt(I.transition,S.transition)||D.push({command:"setTransition",args:[S.transition]}),gt(I.light,S.light)||D.push({command:"setLight",args:[S.light]}),gt(I.terrain,S.terrain)||D.push({command:"setTerrain",args:[S.terrain]}),gt(I.sky,S.sky)||D.push({command:"setSky",args:[S.sky]}),gt(I.projection,S.projection)||D.push({command:"setProjection",args:[S.projection]});let Z={},ie=[];(function(xe,He,at,wt){let Ht;for(Ht in He=He||{},xe=xe||{})Object.prototype.hasOwnProperty.call(xe,Ht)&&(Object.prototype.hasOwnProperty.call(He,Ht)||Xe(Ht,at,wt));for(Ht in He)Object.prototype.hasOwnProperty.call(He,Ht)&&(Object.prototype.hasOwnProperty.call(xe,Ht)?gt(xe[Ht],He[Ht])||(xe[Ht].type==="geojson"&&He[Ht].type==="geojson"&&xt(xe,He,Ht)?Pt(at,{command:"setGeoJSONSourceData",args:[Ht,He[Ht].data]}):Tt(Ht,He,at,wt)):Qe(Ht,He,at))})(I.sources,S.sources,ie,Z);let pe=[];I.layers&&I.layers.forEach(xe=>{"source"in xe&&Z[xe.source]?D.push({command:"removeLayer",args:[xe.id]}):pe.push(xe)}),D=D.concat(ie),function(xe,He,at){He=He||[];let wt=(xe=xe||[]).map(Ct),Ht=He.map(Ct),rr=xe.reduce(jt,{}),pr=He.reduce(jt,{}),Ar=wt.slice(),Vr=Object.create(null),ri,Ii,Zi,da,cn;for(let jn=0,Va=0;jn<wt.length;jn++)ri=wt[jn],Object.prototype.hasOwnProperty.call(pr,ri)?Va++:(Pt(at,{command:"removeLayer",args:[ri]}),Ar.splice(Ar.indexOf(ri,Va),1));for(let jn=0,Va=0;jn<Ht.length;jn++)ri=Ht[Ht.length-1-jn],Ar[Ar.length-1-jn]!==ri&&(Object.prototype.hasOwnProperty.call(rr,ri)?(Pt(at,{command:"removeLayer",args:[ri]}),Ar.splice(Ar.lastIndexOf(ri,Ar.length-Va),1)):Va++,da=Ar[Ar.length-jn],Pt(at,{command:"addLayer",args:[pr[ri],da]}),Ar.splice(Ar.length-jn,0,ri),Vr[ri]=!0);for(let jn=0;jn<Ht.length;jn++)if(ri=Ht[jn],Ii=rr[ri],Zi=pr[ri],!Vr[ri]&&!gt(Ii,Zi))if(gt(Ii.source,Zi.source)&&gt(Ii["source-layer"],Zi["source-layer"])&&gt(Ii.type,Zi.type)){for(cn in _t(Ii.layout,Zi.layout,at,ri,null,"setLayoutProperty"),_t(Ii.paint,Zi.paint,at,ri,null,"setPaintProperty"),gt(Ii.filter,Zi.filter)||Pt(at,{command:"setFilter",args:[ri,Zi.filter]}),gt(Ii.minzoom,Zi.minzoom)&&gt(Ii.maxzoom,Zi.maxzoom)||Pt(at,{command:"setLayerZoomRange",args:[ri,Zi.minzoom,Zi.maxzoom]}),Ii)Object.prototype.hasOwnProperty.call(Ii,cn)&&cn!=="layout"&&cn!=="paint"&&cn!=="filter"&&cn!=="metadata"&&cn!=="minzoom"&&cn!=="maxzoom"&&(cn.indexOf("paint.")===0?_t(Ii[cn],Zi[cn],at,ri,cn.slice(6),"setPaintProperty"):gt(Ii[cn],Zi[cn])||Pt(at,{command:"setLayerProperty",args:[ri,cn,Zi[cn]]}));for(cn in Zi)Object.prototype.hasOwnProperty.call(Zi,cn)&&!Object.prototype.hasOwnProperty.call(Ii,cn)&&cn!=="layout"&&cn!=="paint"&&cn!=="filter"&&cn!=="metadata"&&cn!=="minzoom"&&cn!=="maxzoom"&&(cn.indexOf("paint.")===0?_t(Ii[cn],Zi[cn],at,ri,cn.slice(6),"setPaintProperty"):gt(Ii[cn],Zi[cn])||Pt(at,{command:"setLayerProperty",args:[ri,cn,Zi[cn]]}))}else Pt(at,{command:"removeLayer",args:[ri]}),da=Ar[Ar.lastIndexOf(ri)+1],Pt(at,{command:"addLayer",args:[Zi,da]})}(pe,S.layers,D)}catch(Z){console.warn("Unable to compute style diff:",Z),D=[{command:"setStyle",args:[S]}]}return D},i.aD=function(I){let S=[],D=I.id;return D===void 0&&S.push({message:`layers.${D}: missing required property "id"`}),I.render===void 0&&S.push({message:`layers.${D}: missing required method "render"`}),I.renderingMode&&I.renderingMode!=="2d"&&I.renderingMode!=="3d"&&S.push({message:`layers.${D}: property "renderingMode" must be either "2d" or "3d"`}),S},i.aE=function I(S,D){if(Array.isArray(S)){if(!Array.isArray(D)||S.length!==D.length)return!1;for(let Z=0;Z<S.length;Z++)if(!I(S[Z],D[Z]))return!1;return!0}if(typeof S=="object"&&S!==null&&D!==null){if(typeof D!="object"||Object.keys(S).length!==Object.keys(D).length)return!1;for(let Z in S)if(!I(S[Z],D[Z]))return!1;return!0}return S===D},i.aF=C,i.aG=M,i.aH=class extends Wi{constructor(I,S){super(I,S),this.current=0}set(I){this.current!==I&&(this.current=I,this.gl.uniform1i(this.location,I))}},i.aI=bi,i.aJ=class extends Wi{constructor(I,S){super(I,S),this.current=Ko}set(I){if(I[12]!==this.current[12]||I[0]!==this.current[0])return this.current=I,void this.gl.uniformMatrix4fv(this.location,!1,I);for(let S=1;S<16;S++)if(I[S]!==this.current[S]){this.current=I,this.gl.uniformMatrix4fv(this.location,!1,I);break}}},i.aK=ao,i.aL=yo,i.aM=Bt,i.aN=class extends Wi{constructor(I,S){super(I,S),this.current=[0,0,0]}set(I){I[0]===this.current[0]&&I[1]===this.current[1]&&I[2]===this.current[2]||(this.current=I,this.gl.uniform3f(this.location,I[0],I[1],I[2]))}},i.aO=class extends Wi{constructor(I,S){super(I,S),this.current=[0,0]}set(I){I[0]===this.current[0]&&I[1]===this.current[1]||(this.current=I,this.gl.uniform2f(this.location,I[0],I[1]))}},i.aP=function(I,S,D,Z,ie,pe,xe){var He=1/(S-D),at=1/(Z-ie),wt=1/(pe-xe);return I[0]=-2*He,I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[5]=-2*at,I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[10]=2*wt,I[11]=0,I[12]=(S+D)*He,I[13]=(ie+Z)*at,I[14]=(xe+pe)*wt,I[15]=1,I},i.aQ=nl,i.aR=class extends ft{},i.aS=im,i.aT=class extends Xt{},i.aU=mu,i.aV=function(I){return I<=1?1:Math.pow(2,Math.ceil(Math.log(I)/Math.LN2))},i.aW=jl,i.aX=Jl,i.aY=se,i.aZ=class extends Yi{},i.a_=function(I,S){return I[0]===S[0]&&I[1]===S[1]&&I[2]===S[2]&&I[3]===S[3]&&I[4]===S[4]&&I[5]===S[5]&&I[6]===S[6]&&I[7]===S[7]&&I[8]===S[8]&&I[9]===S[9]&&I[10]===S[10]&&I[11]===S[11]&&I[12]===S[12]&&I[13]===S[13]&&I[14]===S[14]&&I[15]===S[15]},i.aa=function(I){let S={};if(I.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(D,Z,ie,pe)=>{let xe=ie||pe;return S[Z]=!xe||xe.toLowerCase(),""}),S["max-age"]){let D=parseInt(S["max-age"],10);isNaN(D)?delete S["max-age"]:S["max-age"]=D}return S},i.ab=function(I,S){let D=[];for(let Z in I)Z in S||D.push(Z);return D},i.ac=E,i.ad=function(I,S,D){var Z=Math.sin(D),ie=Math.cos(D),pe=S[0],xe=S[1],He=S[2],at=S[3],wt=S[4],Ht=S[5],rr=S[6],pr=S[7];return S!==I&&(I[8]=S[8],I[9]=S[9],I[10]=S[10],I[11]=S[11],I[12]=S[12],I[13]=S[13],I[14]=S[14],I[15]=S[15]),I[0]=pe*ie+wt*Z,I[1]=xe*ie+Ht*Z,I[2]=He*ie+rr*Z,I[3]=at*ie+pr*Z,I[4]=wt*ie-pe*Z,I[5]=Ht*ie-xe*Z,I[6]=rr*ie-He*Z,I[7]=pr*ie-at*Z,I},i.ae=function(I){var S=new Es(16);return S[0]=I[0],S[1]=I[1],S[2]=I[2],S[3]=I[3],S[4]=I[4],S[5]=I[5],S[6]=I[6],S[7]=I[7],S[8]=I[8],S[9]=I[9],S[10]=I[10],S[11]=I[11],S[12]=I[12],S[13]=I[13],S[14]=I[14],S[15]=I[15],S},i.af=ru,i.ag=function(I,S){let D=0,Z=0;if(I.kind==="constant")Z=I.layoutSize;else if(I.kind!=="source"){let{interpolationType:ie,minZoom:pe,maxZoom:xe}=I,He=ie?E(za.interpolationFactor(ie,S,pe,xe),0,1):0;I.kind==="camera"?Z=ia.number(I.minSize,I.maxSize,He):D=He}return{uSizeT:D,uSize:Z}},i.ai=function(I,{uSize:S,uSizeT:D},{lowerSize:Z,upperSize:ie}){return I.kind==="source"?Z/p0:I.kind==="composite"?ia.number(Z/p0,ie/p0,D):S},i.aj=aM,i.ak=function(I,S,D,Z){let ie=S.y-I.y,pe=S.x-I.x,xe=Z.y-D.y,He=Z.x-D.x,at=xe*pe-He*ie;if(at===0)return null;let wt=(He*(I.y-D.y)-xe*(I.x-D.x))/at;return new l(I.x+wt*pe,I.y+wt*ie)},i.al=MC,i.am=dc,i.an=Ws,i.ao=function(I){let S=1/0,D=1/0,Z=-1/0,ie=-1/0;for(let pe of I)S=Math.min(S,pe.x),D=Math.min(D,pe.y),Z=Math.max(Z,pe.x),ie=Math.max(ie,pe.y);return[S,D,Z,ie]},i.ap=Ff,i.ar=nM,i.as=function(I,S){var D=S[0],Z=S[1],ie=S[2],pe=S[3],xe=S[4],He=S[5],at=S[6],wt=S[7],Ht=S[8],rr=S[9],pr=S[10],Ar=S[11],Vr=S[12],ri=S[13],Ii=S[14],Zi=S[15],da=D*He-Z*xe,cn=D*at-ie*xe,jn=D*wt-pe*xe,Va=Z*at-ie*He,hl=Z*wt-pe*He,iu=ie*wt-pe*at,Su=Ht*ri-rr*Vr,Zl=Ht*Ii-pr*Vr,Qs=Ht*Zi-Ar*Vr,gu=rr*Ii-pr*ri,cu=rr*Zi-Ar*ri,uu=pr*Zi-Ar*Ii,Ts=da*uu-cn*cu+jn*gu+Va*Qs-hl*Zl+iu*Su;return Ts?(I[0]=(He*uu-at*cu+wt*gu)*(Ts=1/Ts),I[1]=(ie*cu-Z*uu-pe*gu)*Ts,I[2]=(ri*iu-Ii*hl+Zi*Va)*Ts,I[3]=(pr*hl-rr*iu-Ar*Va)*Ts,I[4]=(at*Qs-xe*uu-wt*Zl)*Ts,I[5]=(D*uu-ie*Qs+pe*Zl)*Ts,I[6]=(Ii*jn-Vr*iu-Zi*cn)*Ts,I[7]=(Ht*iu-pr*jn+Ar*cn)*Ts,I[8]=(xe*cu-He*Qs+wt*Su)*Ts,I[9]=(Z*Qs-D*cu-pe*Su)*Ts,I[10]=(Vr*hl-ri*jn+Zi*da)*Ts,I[11]=(rr*jn-Ht*hl-Ar*da)*Ts,I[12]=(He*Zl-xe*gu-at*Su)*Ts,I[13]=(D*gu-Z*Zl+ie*Su)*Ts,I[14]=(ri*cn-Vr*Va-Ii*da)*Ts,I[15]=(Ht*Va-rr*cn+pr*da)*Ts,I):null},i.at=yM,i.au=Pw,i.av=mM,i.aw=function(){let I={},S=fe.$version;for(let D in fe.$root){let Z=fe.$root[D];if(Z.required){let ie=null;ie=D==="version"?S:Z.type==="array"?[]:{},ie!=null&&(I[D]=ie)}}return I},i.ax=Gn,i.ay=te,i.az=function(I){I=I.slice();let S=Object.create(null);for(let D=0;D<I.length;D++)S[I[D].id]=I[D];for(let D=0;D<I.length;D++)"ref"in I[D]&&(I[D]=et(I[D],S[I[D].ref]));return I},i.b=H,i.b0=function(I,S){return I[0]=S[0],I[1]=S[1],I[2]=S[2],I[3]=S[3],I[4]=S[4],I[5]=S[5],I[6]=S[6],I[7]=S[7],I[8]=S[8],I[9]=S[9],I[10]=S[10],I[11]=S[11],I[12]=S[12],I[13]=S[13],I[14]=S[14],I[15]=S[15],I},i.b1=function(I,S,D){return I[0]=S[0]*D[0],I[1]=S[1]*D[1],I[2]=S[2]*D[2],I[3]=S[3]*D[3],I},i.b2=function(I,S){return I[0]*S[0]+I[1]*S[1]+I[2]*S[2]+I[3]*S[3]},i.b3=A,i.b4=bC,i.b5=Fw,i.b6=function(I,S,D,Z,ie){var pe,xe=1/Math.tan(S/2);return I[0]=xe/D,I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[5]=xe,I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[11]=-1,I[12]=0,I[13]=0,I[15]=0,ie!=null&&ie!==1/0?(I[10]=(ie+Z)*(pe=1/(Z-ie)),I[14]=2*ie*Z*pe):(I[10]=-1,I[14]=-2*Z),I},i.b7=function(I,S,D){var Z=Math.sin(D),ie=Math.cos(D),pe=S[4],xe=S[5],He=S[6],at=S[7],wt=S[8],Ht=S[9],rr=S[10],pr=S[11];return S!==I&&(I[0]=S[0],I[1]=S[1],I[2]=S[2],I[3]=S[3],I[12]=S[12],I[13]=S[13],I[14]=S[14],I[15]=S[15]),I[4]=pe*ie+wt*Z,I[5]=xe*ie+Ht*Z,I[6]=He*ie+rr*Z,I[7]=at*ie+pr*Z,I[8]=wt*ie-pe*Z,I[9]=Ht*ie-xe*Z,I[10]=rr*ie-He*Z,I[11]=pr*ie-at*Z,I},i.b8=y,i.b9=k,i.bA=Ed,i.bB=function(I){return I.message===re},i.bC=Xa,i.bD=zs,i.ba=function(I){return I*Math.PI/180},i.bb=function(I,S){let{x:D,y:Z}=Jx.fromLngLat(S);return!(I<0||I>25||Z<0||Z>=1||D<0||D>=1)},i.bc=function(I,S){return I[0]=S[0],I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[5]=S[1],I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[10]=S[2],I[11]=0,I[12]=0,I[13]=0,I[14]=0,I[15]=1,I},i.bd=class extends zt{},i.be=cM,i.bf=sB,i.bh=he,i.bi=function(I,S){be.REGISTERED_PROTOCOLS[I]=S},i.bj=function(I){delete be.REGISTERED_PROTOCOLS[I]},i.bk=function(I,S){let D={};for(let ie=0;ie<I.length;ie++){let pe=S&&S[I[ie].id]||rl(I[ie]);S&&(S[I[ie].id]=pe);let xe=D[pe];xe||(xe=D[pe]=[]),xe.push(I[ie])}let Z=[];for(let ie in D)Z.push(D[ie]);return Z},i.bl=gi,i.bm=TC,i.bn=fg,i.bo=Cw,i.bp=function(I){I.bucket.createArrays(),I.bucket.tilePixelRatio=Rl/(512*I.bucket.overscaling),I.bucket.compareText={},I.bucket.iconsNeedLinear=!1;let S=I.bucket.layers[0],D=S.layout,Z=S._unevaluatedLayout._values,ie={layoutIconSize:Z["icon-size"].possiblyEvaluate(new Fo(I.bucket.zoom+1),I.canonical),layoutTextSize:Z["text-size"].possiblyEvaluate(new Fo(I.bucket.zoom+1),I.canonical),textMaxSize:Z["text-size"].possiblyEvaluate(new Fo(18))};if(I.bucket.textSizeData.kind==="composite"){let{minZoom:wt,maxZoom:Ht}=I.bucket.textSizeData;ie.compositeTextSizes=[Z["text-size"].possiblyEvaluate(new Fo(wt),I.canonical),Z["text-size"].possiblyEvaluate(new Fo(Ht),I.canonical)]}if(I.bucket.iconSizeData.kind==="composite"){let{minZoom:wt,maxZoom:Ht}=I.bucket.iconSizeData;ie.compositeIconSizes=[Z["icon-size"].possiblyEvaluate(new Fo(wt),I.canonical),Z["icon-size"].possiblyEvaluate(new Fo(Ht),I.canonical)]}let pe=D.get("text-line-height")*Ff,xe=D.get("text-rotation-alignment")!=="viewport"&&D.get("symbol-placement")!=="point",He=D.get("text-keep-upright"),at=D.get("text-size");for(let wt of I.bucket.features){let Ht=D.get("text-font").evaluate(wt,{},I.canonical).join(","),rr=at.evaluate(wt,{},I.canonical),pr=ie.layoutTextSize.evaluate(wt,{},I.canonical),Ar=ie.layoutIconSize.evaluate(wt,{},I.canonical),Vr={horizontal:{},vertical:void 0},ri=wt.text,Ii,Zi=[0,0];if(ri){let jn=ri.toString(),Va=D.get("text-letter-spacing").evaluate(wt,{},I.canonical)*Ff,hl=us(jn)?Va:0,iu=D.get("text-anchor").evaluate(wt,{},I.canonical),Su=IC(S,wt,I.canonical);if(!Su){let cu=D.get("text-radial-offset").evaluate(wt,{},I.canonical);Zi=cu?vM(iu,[cu*Ff,cg]):D.get("text-offset").evaluate(wt,{},I.canonical).map(uu=>uu*Ff)}let Zl=xe?"center":D.get("text-justify").evaluate(wt,{},I.canonical),Qs=D.get("symbol-placement")==="point"?D.get("text-max-width").evaluate(wt,{},I.canonical)*Ff:1/0,gu=()=>{I.bucket.allowVerticalPlacement&&Lo(jn)&&(Vr.vertical=Hx(ri,I.glyphMap,I.glyphPositions,I.imagePositions,Ht,Qs,pe,iu,"left",hl,Zi,i.ah.vertical,!0,pr,rr))};if(!xe&&Su){let cu=new Set;if(Zl==="auto")for(let Ts=0;Ts<Su.values.length;Ts+=2)cu.add(yM(Su.values[Ts]));else cu.add(Zl);let uu=!1;for(let Ts of cu)if(!Vr.horizontal[Ts])if(uu)Vr.horizontal[Ts]=Vr.horizontal[0];else{let wu=Hx(ri,I.glyphMap,I.glyphPositions,I.imagePositions,Ht,Qs,pe,"center",Ts,hl,Zi,i.ah.horizontal,!1,pr,rr);wu&&(Vr.horizontal[Ts]=wu,uu=wu.positionedLines.length===1)}gu()}else{Zl==="auto"&&(Zl=yM(iu));let cu=Hx(ri,I.glyphMap,I.glyphPositions,I.imagePositions,Ht,Qs,pe,iu,Zl,hl,Zi,i.ah.horizontal,!1,pr,rr);cu&&(Vr.horizontal[Zl]=cu),gu(),Lo(jn)&&xe&&He&&(Vr.vertical=Hx(ri,I.glyphMap,I.glyphPositions,I.imagePositions,Ht,Qs,pe,iu,Zl,hl,Zi,i.ah.vertical,!1,pr,rr))}}let da=!1;if(wt.icon&&wt.icon.name){let jn=I.imageMap[wt.icon.name];jn&&(Ii=Gx(I.imagePositions[wt.icon.name],D.get("icon-offset").evaluate(wt,{},I.canonical),D.get("icon-anchor").evaluate(wt,{},I.canonical)),da=!!jn.sdf,I.bucket.sdfIcons===void 0?I.bucket.sdfIcons=da:I.bucket.sdfIcons!==da&&T("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(jn.pixelRatio!==I.bucket.pixelRatio||D.get("icon-rotate").constantOr(1)!==0)&&(I.bucket.iconsNeedLinear=!0))}let cn=RC(Vr.horizontal)||Vr.vertical;I.bucket.iconsInText=!!cn&&cn.iconsInText,(cn||Ii)&&aB(I.bucket,wt,Vr,Ii,I.imageMap,ie,pr,Ar,Zi,da,I.canonical)}I.showCollisionBoxes&&I.bucket.generateCollisionDebugBuffers()},i.bq=Kp,i.br=Pr,i.bs=du,i.bt=qi,i.bu=tM,i.bv=class{constructor(I){this._marks={start:[I.url,"start"].join("#"),end:[I.url,"end"].join("#"),measure:I.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let I=performance.getEntriesByName(this._marks.measure);return I.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),I=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),I}},i.bw=function(I,S,D,Z,ie){return a(this,void 0,void 0,function*(){if(b())try{return yield G(I,S,D,Z,ie)}catch(pe){}return function(pe,xe,He,at,wt){let Ht=pe.width,rr=pe.height;O&&W||(O=new OffscreenCanvas(Ht,rr),W=O.getContext("2d",{willReadFrequently:!0})),O.width=Ht,O.height=rr,W.drawImage(pe,0,0,Ht,rr);let pr=W.getImageData(xe,He,at,wt);return W.clearRect(0,0,Ht,rr),pr.data}(I,S,D,Z,ie)})},i.bx=wC,i.by=o,i.bz=s,i.c=ne,i.d=I=>a(void 0,void 0,void 0,function*(){if(I.byteLength===0)return createImageBitmap(new ImageData(1,1));let S=new Blob([new Uint8Array(I)],{type:"image/png"});try{return createImageBitmap(S)}catch(D){throw new Error(`Could not load image because of ${D.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=I=>new Promise((S,D)=>{let Z=new Image;Z.onload=()=>{S(Z),URL.revokeObjectURL(Z.src),Z.onload=null,window.requestAnimationFrame(()=>{Z.src=j})},Z.onerror=()=>D(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 ie=new Blob([new Uint8Array(I)],{type:"image/png"});Z.src=I.byteLength?URL.createObjectURL(ie):j}),i.g=ze,i.h=(I,S)=>ke(L(I,{type:"json"}),S),i.i=q,i.j=me,i.k=Re,i.l=(I,S)=>ke(L(I,{type:"arrayBuffer"}),S),i.m=ke,i.n=function(I){return new tM(I).readFields(kQ,[])},i.o=bu,i.p=iM,i.q=oe,i.r=di,i.s=Ee,i.t=wi,i.u=li,i.v=fe,i.w=T,i.x=function([I,S,D]){return S+=90,S*=Math.PI/180,D*=Math.PI/180,{x:I*Math.cos(S)*Math.sin(D),y:I*Math.sin(S)*Math.sin(D),z:I*Math.cos(D)}},i.y=ia,i.z=Fo}),r("worker",["./shared"],function(i){"use strict";class a{constructor(_e){this.keyCache={},_e&&this.replace(_e)}replace(_e){this._layerConfigs={},this._layers={},this.update(_e,[])}update(_e,Fe){for(let Ie of _e){this._layerConfigs[Ie.id]=Ie;let lt=this._layers[Ie.id]=i.aA(Ie);lt._featureFilter=i.a7(lt.filter),this.keyCache[Ie.id]&&delete this.keyCache[Ie.id]}for(let Ie of Fe)delete this.keyCache[Ie],delete this._layerConfigs[Ie],delete this._layers[Ie];this.familiesBySource={};let Pe=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let Ie of Pe){let lt=Ie.map(St=>this._layers[St.id]),ye=lt[0];if(ye.visibility==="none")continue;let ue=ye.source||"",de=this.familiesBySource[ue];de||(de=this.familiesBySource[ue]={});let ht=ye.sourceLayer||"_geojsonTileLayer",Et=de[ht];Et||(Et=de[ht]=[]),Et.push(lt)}}}class o{constructor(_e){let Fe={},Pe=[];for(let ue in _e){let de=_e[ue],ht=Fe[ue]={};for(let Et in de){let St=de[+Et];if(!St||St.bitmap.width===0||St.bitmap.height===0)continue;let Zt={x:0,y:0,w:St.bitmap.width+2,h:St.bitmap.height+2};Pe.push(Zt),ht[Et]={rect:Zt,metrics:St.metrics}}}let{w:Ie,h:lt}=i.p(Pe),ye=new i.o({width:Ie||1,height:lt||1});for(let ue in _e){let de=_e[ue];for(let ht in de){let Et=de[+ht];if(!Et||Et.bitmap.width===0||Et.bitmap.height===0)continue;let St=Fe[ue][ht].rect;i.o.copy(Et.bitmap,ye,{x:0,y:0},{x:St.x+1,y:St.y+1},Et.bitmap)}}this.image=ye,this.positions=Fe}}i.bl("GlyphAtlas",o);class s{constructor(_e){this.tileID=new i.S(_e.tileID.overscaledZ,_e.tileID.wrap,_e.tileID.canonical.z,_e.tileID.canonical.x,_e.tileID.canonical.y),this.uid=_e.uid,this.zoom=_e.zoom,this.pixelRatio=_e.pixelRatio,this.tileSize=_e.tileSize,this.source=_e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=_e.showCollisionBoxes,this.collectResourceTiming=!!_e.collectResourceTiming,this.returnDependencies=!!_e.returnDependencies,this.promoteId=_e.promoteId,this.inFlightDependencies=[]}parse(_e,Fe,Pe,Ie){return i._(this,void 0,void 0,function*(){this.status="parsing",this.data=_e,this.collisionBoxArray=new i.a5;let lt=new i.bm(Object.keys(_e.layers).sort()),ye=new i.bn(this.tileID,this.promoteId);ye.bucketLayerIDs=[];let ue={},de={featureIndex:ye,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Pe},ht=Fe.familiesBySource[this.source];for(let Hi in ht){let Jr=_e.layers[Hi];if(!Jr)continue;Jr.version===1&&i.w(`Vector tile source "${this.source}" layer "${Hi}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ci=lt.encode(Hi),Di=[];for(let Lt=0;Lt<Jr.length;Lt++){let vt=Jr.feature(Lt),Dt=ye.getId(vt,Hi);Di.push({feature:vt,id:Dt,index:Lt,sourceLayerIndex:ci})}for(let Lt of ht[Hi]){let vt=Lt[0];vt.source!==this.source&&i.w(`layer.source = ${vt.source} does not equal this.source = ${this.source}`),vt.minzoom&&this.zoom<Math.floor(vt.minzoom)||vt.maxzoom&&this.zoom>=vt.maxzoom||vt.visibility!=="none"&&(u(Lt,this.zoom,Pe),(ue[vt.id]=vt.createBucket({index:ye.bucketLayerIDs.length,layers:Lt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ci,sourceID:this.source})).populate(Di,de,this.tileID.canonical),ye.bucketLayerIDs.push(Lt.map(Dt=>Dt.id)))}}let Et=i.aF(de.glyphDependencies,Hi=>Object.keys(Hi).map(Number));this.inFlightDependencies.forEach(Hi=>Hi==null?void 0:Hi.abort()),this.inFlightDependencies=[];let St=Promise.resolve({});if(Object.keys(Et).length){let Hi=new AbortController;this.inFlightDependencies.push(Hi),St=Ie.sendAsync({type:"GG",data:{stacks:Et,source:this.source,tileID:this.tileID,type:"glyphs"}},Hi)}let Zt=Object.keys(de.iconDependencies),qr=Promise.resolve({});if(Zt.length){let Hi=new AbortController;this.inFlightDependencies.push(Hi),qr=Ie.sendAsync({type:"GI",data:{icons:Zt,source:this.source,tileID:this.tileID,type:"icons"}},Hi)}let Lr=Object.keys(de.patternDependencies),vr=Promise.resolve({});if(Lr.length){let Hi=new AbortController;this.inFlightDependencies.push(Hi),vr=Ie.sendAsync({type:"GI",data:{icons:Lr,source:this.source,tileID:this.tileID,type:"patterns"}},Hi)}let[Er,si,Ei]=yield Promise.all([St,qr,vr]),Si=new o(Er),xi=new i.bo(si,Ei);for(let Hi in ue){let Jr=ue[Hi];Jr instanceof i.a6?(u(Jr.layers,this.zoom,Pe),i.bp({bucket:Jr,glyphMap:Er,glyphPositions:Si.positions,imageMap:si,imagePositions:xi.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Jr.hasPattern&&(Jr instanceof i.bq||Jr instanceof i.br||Jr instanceof i.bs)&&(u(Jr.layers,this.zoom,Pe),Jr.addFeatures(de,this.tileID.canonical,xi.patternPositions))}return this.status="done",{buckets:Object.values(ue).filter(Hi=>!Hi.isEmpty()),featureIndex:ye,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Si.image,imageAtlas:xi,glyphMap:this.returnDependencies?Er:null,iconMap:this.returnDependencies?si:null,glyphPositions:this.returnDependencies?Si.positions:null}})}}function u(De,_e,Fe){let Pe=new i.z(_e);for(let Ie of De)Ie.recalculate(Pe,Fe)}class l{constructor(_e,Fe,Pe){this.actor=_e,this.layerIndex=Fe,this.availableImages=Pe,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(_e,Fe){return i._(this,void 0,void 0,function*(){let Pe=yield i.l(_e.request,Fe);try{return{vectorTile:new i.bt.VectorTile(new i.bu(Pe.data)),rawData:Pe.data,cacheControl:Pe.cacheControl,expires:Pe.expires}}catch(Ie){let lt=new Uint8Array(Pe.data),ye=`Unable to parse the tile at ${_e.request.url}, `;throw ye+=lt[0]===31&&lt[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Ie.message}`,new Error(ye)}})}loadTile(_e){return i._(this,void 0,void 0,function*(){let Fe=_e.uid,Pe=!!(_e&&_e.request&&_e.request.collectResourceTiming)&&new i.bv(_e.request),Ie=new s(_e);this.loading[Fe]=Ie;let lt=new AbortController;Ie.abort=lt;try{let ye=yield this.loadVectorTile(_e,lt);if(delete this.loading[Fe],!ye)return null;let ue=ye.rawData,de={};ye.expires&&(de.expires=ye.expires),ye.cacheControl&&(de.cacheControl=ye.cacheControl);let ht={};if(Pe){let St=Pe.finish();St&&(ht.resourceTiming=JSON.parse(JSON.stringify(St)))}Ie.vectorTile=ye.vectorTile;let Et=Ie.parse(ye.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Fe]=Ie,this.fetching[Fe]={rawTileData:ue,cacheControl:de,resourceTiming:ht};try{let St=yield Et;return i.e({rawTileData:ue.slice(0)},St,de,ht)}finally{delete this.fetching[Fe]}}catch(ye){throw delete this.loading[Fe],Ie.status="done",this.loaded[Fe]=Ie,ye}})}reloadTile(_e){return i._(this,void 0,void 0,function*(){let Fe=_e.uid;if(!this.loaded||!this.loaded[Fe])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Pe=this.loaded[Fe];if(Pe.showCollisionBoxes=_e.showCollisionBoxes,Pe.status==="parsing"){let Ie=yield Pe.parse(Pe.vectorTile,this.layerIndex,this.availableImages,this.actor),lt;if(this.fetching[Fe]){let{rawTileData:ye,cacheControl:ue,resourceTiming:de}=this.fetching[Fe];delete this.fetching[Fe],lt=i.e({rawTileData:ye.slice(0)},Ie,ue,de)}else lt=Ie;return lt}if(Pe.status==="done"&&Pe.vectorTile)return Pe.parse(Pe.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(_e){return i._(this,void 0,void 0,function*(){let Fe=this.loading,Pe=_e.uid;Fe&&Fe[Pe]&&Fe[Pe].abort&&(Fe[Pe].abort.abort(),delete Fe[Pe])})}removeTile(_e){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[_e.uid]&&delete this.loaded[_e.uid]})}}class f{constructor(){this.loaded={}}loadTile(_e){return i._(this,void 0,void 0,function*(){let{uid:Fe,encoding:Pe,rawImageData:Ie,redFactor:lt,greenFactor:ye,blueFactor:ue,baseShift:de}=_e,ht=Ie.width+2,Et=Ie.height+2,St=i.b(Ie)?new i.R({width:ht,height:Et},yield i.bw(Ie,-1,-1,ht,Et)):Ie,Zt=new i.bx(Fe,St,Pe,lt,ye,ue,de);return this.loaded=this.loaded||{},this.loaded[Fe]=Zt,Zt})}removeTile(_e){let Fe=this.loaded,Pe=_e.uid;Fe&&Fe[Pe]&&delete Fe[Pe]}}function c(De,_e){if(De.length!==0){h(De[0],_e);for(var Fe=1;Fe<De.length;Fe++)h(De[Fe],!_e)}}function h(De,_e){for(var Fe=0,Pe=0,Ie=0,lt=De.length,ye=lt-1;Ie<lt;ye=Ie++){var ue=(De[Ie][0]-De[ye][0])*(De[ye][1]+De[Ie][1]),de=Fe+ue;Pe+=Math.abs(Fe)>=Math.abs(ue)?Fe-de+ue:ue-de+Fe,Fe=de}Fe+Pe>=0!=!!_e&&De.reverse()}var d=i.by(function De(_e,Fe){var Pe,Ie=_e&&_e.type;if(Ie==="FeatureCollection")for(Pe=0;Pe<_e.features.length;Pe++)De(_e.features[Pe],Fe);else if(Ie==="GeometryCollection")for(Pe=0;Pe<_e.geometries.length;Pe++)De(_e.geometries[Pe],Fe);else if(Ie==="Feature")De(_e.geometry,Fe);else if(Ie==="Polygon")c(_e.coordinates,Fe);else if(Ie==="MultiPolygon")for(Pe=0;Pe<_e.coordinates.length;Pe++)c(_e.coordinates[Pe],Fe);return _e});let p=i.bt.VectorTileFeature.prototype.toGeoJSON;var x={exports:{}},b=i.bz,y=i.bt.VectorTileFeature,k=E;function E(De,_e){this.options=_e||{},this.features=De,this.length=De.length}function A(De,_e){this.id=typeof De.id=="number"?De.id:void 0,this.type=De.type,this.rawGeometry=De.type===1?[De.geometry]:De.geometry,this.properties=De.tags,this.extent=_e||4096}E.prototype.feature=function(De){return new A(this.features[De],this.options.extent)},A.prototype.loadGeometry=function(){var De=this.rawGeometry;this.geometry=[];for(var _e=0;_e<De.length;_e++){for(var Fe=De[_e],Pe=[],Ie=0;Ie<Fe.length;Ie++)Pe.push(new b(Fe[Ie][0],Fe[Ie][1]));this.geometry.push(Pe)}return this.geometry},A.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var De=this.geometry,_e=1/0,Fe=-1/0,Pe=1/0,Ie=-1/0,lt=0;lt<De.length;lt++)for(var ye=De[lt],ue=0;ue<ye.length;ue++){var de=ye[ue];_e=Math.min(_e,de.x),Fe=Math.max(Fe,de.x),Pe=Math.min(Pe,de.y),Ie=Math.max(Ie,de.y)}return[_e,Pe,Fe,Ie]},A.prototype.toGeoJSON=y.prototype.toGeoJSON;var L=i.bA,_=k;function C(De){var _e=new L;return function(Fe,Pe){for(var Ie in Fe.layers)Pe.writeMessage(3,M,Fe.layers[Ie])}(De,_e),_e.finish()}function M(De,_e){var Fe;_e.writeVarintField(15,De.version||1),_e.writeStringField(1,De.name||""),_e.writeVarintField(5,De.extent||4096);var Pe={keys:[],values:[],keycache:{},valuecache:{}};for(Fe=0;Fe<De.length;Fe++)Pe.feature=De.feature(Fe),_e.writeMessage(2,v,Pe);var Ie=Pe.keys;for(Fe=0;Fe<Ie.length;Fe++)_e.writeStringField(3,Ie[Fe]);var lt=Pe.values;for(Fe=0;Fe<lt.length;Fe++)_e.writeMessage(4,U,lt[Fe])}function v(De,_e){var Fe=De.feature;Fe.id!==void 0&&_e.writeVarintField(1,Fe.id),_e.writeMessage(2,z,De),_e.writeVarintField(3,Fe.type),_e.writeMessage(4,q,Fe)}function z(De,_e){var Fe=De.feature,Pe=De.keys,Ie=De.values,lt=De.keycache,ye=De.valuecache;for(var ue in Fe.properties){var de=Fe.properties[ue],ht=lt[ue];if(de!==null){ht===void 0&&(Pe.push(ue),lt[ue]=ht=Pe.length-1),_e.writeVarint(ht);var Et=typeof de;Et!=="string"&&Et!=="boolean"&&Et!=="number"&&(de=JSON.stringify(de));var St=Et+":"+de,Zt=ye[St];Zt===void 0&&(Ie.push(de),ye[St]=Zt=Ie.length-1),_e.writeVarint(Zt)}}}function T(De,_e){return(_e<<3)+(7&De)}function F(De){return De<<1^De>>31}function q(De,_e){for(var Fe=De.loadGeometry(),Pe=De.type,Ie=0,lt=0,ye=Fe.length,ue=0;ue<ye;ue++){var de=Fe[ue],ht=1;Pe===1&&(ht=de.length),_e.writeVarint(T(1,ht));for(var Et=Pe===3?de.length-1:de.length,St=0;St<Et;St++){St===1&&Pe!==1&&_e.writeVarint(T(2,Et-1));var Zt=de[St].x-Ie,qr=de[St].y-lt;_e.writeVarint(F(Zt)),_e.writeVarint(F(qr)),Ie+=Zt,lt+=qr}Pe===3&&_e.writeVarint(T(7,1))}}function U(De,_e){var Fe=typeof De;Fe==="string"?_e.writeStringField(1,De):Fe==="boolean"?_e.writeBooleanField(7,De):Fe==="number"&&(De%1!=0?_e.writeDoubleField(3,De):De<0?_e.writeSVarintField(6,De):_e.writeVarintField(5,De))}x.exports=C,x.exports.fromVectorTileJs=C,x.exports.fromGeojsonVt=function(De,_e){_e=_e||{};var Fe={};for(var Pe in De)Fe[Pe]=new _(De[Pe].features,_e),Fe[Pe].name=Pe,Fe[Pe].version=_e.version,Fe[Pe].extent=_e.extent;return C({layers:Fe})},x.exports.GeoJSONWrapper=_;var H=i.by(x.exports);let j={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:De=>De},G=Math.fround||(O=new Float32Array(1),De=>(O[0]=+De,O[0]));var O;let W=3,re=5,ne=6;class be{constructor(_e){this.options=Object.assign(Object.create(j),_e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(_e){let{log:Fe,minZoom:Pe,maxZoom:Ie}=this.options;Fe&&console.time("total time");let lt=`prepare ${_e.length} points`;Fe&&console.time(lt),this.points=_e;let ye=[];for(let de=0;de<_e.length;de++){let ht=_e[de];if(!ht.geometry)continue;let[Et,St]=ht.geometry.coordinates,Zt=G(he(Et)),qr=G(te(St));ye.push(Zt,qr,1/0,de,-1,1),this.options.reduce&&ye.push(0)}let ue=this.trees[Ie+1]=this._createTree(ye);Fe&&console.timeEnd(lt);for(let de=Ie;de>=Pe;de--){let ht=+Date.now();ue=this.trees[de]=this._createTree(this._cluster(ue,de)),Fe&&console.log("z%d: %d clusters in %dms",de,ue.numItems,+Date.now()-ht)}return Fe&&console.timeEnd("total time"),this}getClusters(_e,Fe){let Pe=((_e[0]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,_e[1])),lt=_e[2]===180?180:((_e[2]+180)%360+360)%360-180,ye=Math.max(-90,Math.min(90,_e[3]));if(_e[2]-_e[0]>=360)Pe=-180,lt=180;else if(Pe>lt){let St=this.getClusters([Pe,Ie,180,ye],Fe),Zt=this.getClusters([-180,Ie,lt,ye],Fe);return St.concat(Zt)}let ue=this.trees[this._limitZoom(Fe)],de=ue.range(he(Pe),te(ye),he(lt),te(Ie)),ht=ue.data,Et=[];for(let St of de){let Zt=this.stride*St;Et.push(ht[Zt+re]>1?ze(ht,Zt,this.clusterProps):this.points[ht[Zt+W]])}return Et}getChildren(_e){let Fe=this._getOriginId(_e),Pe=this._getOriginZoom(_e),Ie="No cluster with the specified id.",lt=this.trees[Pe];if(!lt)throw new Error(Ie);let ye=lt.data;if(Fe*this.stride>=ye.length)throw new Error(Ie);let ue=this.options.radius/(this.options.extent*Math.pow(2,Pe-1)),de=lt.within(ye[Fe*this.stride],ye[Fe*this.stride+1],ue),ht=[];for(let Et of de){let St=Et*this.stride;ye[St+4]===_e&&ht.push(ye[St+re]>1?ze(ye,St,this.clusterProps):this.points[ye[St+W]])}if(ht.length===0)throw new Error(Ie);return ht}getLeaves(_e,Fe,Pe){let Ie=[];return this._appendLeaves(Ie,_e,Fe=Fe||10,Pe=Pe||0,0),Ie}getTile(_e,Fe,Pe){let Ie=this.trees[this._limitZoom(_e)],lt=Math.pow(2,_e),{extent:ye,radius:ue}=this.options,de=ue/ye,ht=(Pe-de)/lt,Et=(Pe+1+de)/lt,St={features:[]};return this._addTileFeatures(Ie.range((Fe-de)/lt,ht,(Fe+1+de)/lt,Et),Ie.data,Fe,Pe,lt,St),Fe===0&&this._addTileFeatures(Ie.range(1-de/lt,ht,1,Et),Ie.data,lt,Pe,lt,St),Fe===lt-1&&this._addTileFeatures(Ie.range(0,ht,de/lt,Et),Ie.data,-1,Pe,lt,St),St.features.length?St:null}getClusterExpansionZoom(_e){let Fe=this._getOriginZoom(_e)-1;for(;Fe<=this.options.maxZoom;){let Pe=this.getChildren(_e);if(Fe++,Pe.length!==1)break;_e=Pe[0].properties.cluster_id}return Fe}_appendLeaves(_e,Fe,Pe,Ie,lt){let ye=this.getChildren(Fe);for(let ue of ye){let de=ue.properties;if(de&&de.cluster?lt+de.point_count<=Ie?lt+=de.point_count:lt=this._appendLeaves(_e,de.cluster_id,Pe,Ie,lt):lt<Ie?lt++:_e.push(ue),_e.length===Pe)break}return lt}_createTree(_e){let Fe=new i.av(_e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let Pe=0;Pe<_e.length;Pe+=this.stride)Fe.add(_e[Pe],_e[Pe+1]);return Fe.finish(),Fe.data=_e,Fe}_addTileFeatures(_e,Fe,Pe,Ie,lt,ye){for(let ue of _e){let de=ue*this.stride,ht=Fe[de+re]>1,Et,St,Zt;if(ht)Et=Ce(Fe,de,this.clusterProps),St=Fe[de],Zt=Fe[de+1];else{let vr=this.points[Fe[de+W]];Et=vr.properties;let[Er,si]=vr.geometry.coordinates;St=he(Er),Zt=te(si)}let qr={type:1,geometry:[[Math.round(this.options.extent*(St*lt-Pe)),Math.round(this.options.extent*(Zt*lt-Ie))]],tags:Et},Lr;Lr=ht||this.options.generateId?Fe[de+W]:this.points[Fe[de+W]].id,Lr!==void 0&&(qr.id=Lr),ye.features.push(qr)}}_limitZoom(_e){return Math.max(this.options.minZoom,Math.min(Math.floor(+_e),this.options.maxZoom+1))}_cluster(_e,Fe){let{radius:Pe,extent:Ie,reduce:lt,minPoints:ye}=this.options,ue=Pe/(Ie*Math.pow(2,Fe)),de=_e.data,ht=[],Et=this.stride;for(let St=0;St<de.length;St+=Et){if(de[St+2]<=Fe)continue;de[St+2]=Fe;let Zt=de[St],qr=de[St+1],Lr=_e.within(de[St],de[St+1],ue),vr=de[St+re],Er=vr;for(let si of Lr){let Ei=si*Et;de[Ei+2]>Fe&&(Er+=de[Ei+re])}if(Er>vr&&Er>=ye){let si,Ei=Zt*vr,Si=qr*vr,xi=-1,Hi=((St/Et|0)<<5)+(Fe+1)+this.points.length;for(let Jr of Lr){let ci=Jr*Et;if(de[ci+2]<=Fe)continue;de[ci+2]=Fe;let Di=de[ci+re];Ei+=de[ci]*Di,Si+=de[ci+1]*Di,de[ci+4]=Hi,lt&&(si||(si=this._map(de,St,!0),xi=this.clusterProps.length,this.clusterProps.push(si)),lt(si,this._map(de,ci)))}de[St+4]=Hi,ht.push(Ei/Er,Si/Er,1/0,Hi,-1,Er),lt&&ht.push(xi)}else{for(let si=0;si<Et;si++)ht.push(de[St+si]);if(Er>1)for(let si of Lr){let Ei=si*Et;if(!(de[Ei+2]<=Fe)){de[Ei+2]=Fe;for(let Si=0;Si<Et;Si++)ht.push(de[Ei+Si])}}}}return ht}_getOriginId(_e){return _e-this.points.length>>5}_getOriginZoom(_e){return(_e-this.points.length)%32}_map(_e,Fe,Pe){if(_e[Fe+re]>1){let ye=this.clusterProps[_e[Fe+ne]];return Pe?Object.assign({},ye):ye}let Ie=this.points[_e[Fe+W]].properties,lt=this.options.map(Ie);return Pe&&lt===Ie?Object.assign({},lt):lt}}function ze(De,_e,Fe){return{type:"Feature",id:De[_e+W],properties:Ce(De,_e,Fe),geometry:{type:"Point",coordinates:[(Pe=De[_e],360*(Pe-.5)),ke(De[_e+1])]}};var Pe}function Ce(De,_e,Fe){let Pe=De[_e+re],Ie=Pe>=1e4?`${Math.round(Pe/1e3)}k`:Pe>=1e3?Math.round(Pe/100)/10+"k":Pe,lt=De[_e+ne],ye=lt===-1?{}:Object.assign({},Fe[lt]);return Object.assign(ye,{cluster:!0,cluster_id:De[_e+W],point_count:Pe,point_count_abbreviated:Ie})}function he(De){return De/360+.5}function te(De){let _e=Math.sin(De*Math.PI/180),Fe=.5-.25*Math.log((1+_e)/(1-_e))/Math.PI;return Fe<0?0:Fe>1?1:Fe}function ke(De){let _e=(180-360*De)*Math.PI/180;return 360*Math.atan(Math.exp(_e))/Math.PI-90}function Ee(De,_e,Fe,Pe){let Ie=Pe,lt=_e+(Fe-_e>>1),ye,ue=Fe-_e,de=De[_e],ht=De[_e+1],Et=De[Fe],St=De[Fe+1];for(let Zt=_e+3;Zt<Fe;Zt+=3){let qr=Me(De[Zt],De[Zt+1],de,ht,Et,St);if(qr>Ie)ye=Zt,Ie=qr;else if(qr===Ie){let Lr=Math.abs(Zt-lt);Lr<ue&&(ye=Zt,ue=Lr)}}Ie>Pe&&(ye-_e>3&&Ee(De,_e,ye,Pe),De[ye+2]=Ie,Fe-ye>3&&Ee(De,ye,Fe,Pe))}function Me(De,_e,Fe,Pe,Ie,lt){let ye=Ie-Fe,ue=lt-Pe;if(ye!==0||ue!==0){let de=((De-Fe)*ye+(_e-Pe)*ue)/(ye*ye+ue*ue);de>1?(Fe=Ie,Pe=lt):de>0&&(Fe+=ye*de,Pe+=ue*de)}return ye=De-Fe,ue=_e-Pe,ye*ye+ue*ue}function Oe(De,_e,Fe,Pe){let Ie={id:De==null?null:De,type:_e,geometry:Fe,tags:Pe,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(_e==="Point"||_e==="MultiPoint"||_e==="LineString")Re(Ie,Fe);else if(_e==="Polygon")Re(Ie,Fe[0]);else if(_e==="MultiLineString")for(let lt of Fe)Re(Ie,lt);else if(_e==="MultiPolygon")for(let lt of Fe)Re(Ie,lt[0]);return Ie}function Re(De,_e){for(let Fe=0;Fe<_e.length;Fe+=3)De.minX=Math.min(De.minX,_e[Fe]),De.minY=Math.min(De.minY,_e[Fe+1]),De.maxX=Math.max(De.maxX,_e[Fe]),De.maxY=Math.max(De.maxY,_e[Fe+1])}function me(De,_e,Fe,Pe){if(!_e.geometry)return;let Ie=_e.geometry.coordinates;if(Ie&&Ie.length===0)return;let lt=_e.geometry.type,ye=Math.pow(Fe.tolerance/((1<<Fe.maxZoom)*Fe.extent),2),ue=[],de=_e.id;if(Fe.promoteId?de=_e.properties[Fe.promoteId]:Fe.generateId&&(de=Pe||0),lt==="Point")Be(Ie,ue);else if(lt==="MultiPoint")for(let ht of Ie)Be(ht,ue);else if(lt==="LineString")fe(Ie,ue,ye,!1);else if(lt==="MultiLineString"){if(Fe.lineMetrics){for(let ht of Ie)ue=[],fe(ht,ue,ye,!1),De.push(Oe(de,"LineString",ue,_e.properties));return}Ze(Ie,ue,ye,!1)}else if(lt==="Polygon")Ze(Ie,ue,ye,!0);else{if(lt!=="MultiPolygon"){if(lt==="GeometryCollection"){for(let ht of _e.geometry.geometries)me(De,{id:de,geometry:ht,properties:_e.properties},Fe,Pe);return}throw new Error("Input data is not a valid GeoJSON object.")}for(let ht of Ie){let Et=[];Ze(ht,Et,ye,!0),ue.push(Et)}}De.push(Oe(de,lt,ue,_e.properties))}function Be(De,_e){_e.push(et(De[0]),gt(De[1]),0)}function fe(De,_e,Fe,Pe){let Ie,lt,ye=0;for(let de=0;de<De.length;de++){let ht=et(De[de][0]),Et=gt(De[de][1]);_e.push(ht,Et,0),de>0&&(ye+=Pe?(Ie*Et-ht*lt)/2:Math.sqrt(Math.pow(ht-Ie,2)+Math.pow(Et-lt,2))),Ie=ht,lt=Et}let ue=_e.length-3;_e[2]=1,Ee(_e,0,ue,Fe),_e[ue+2]=1,_e.size=Math.abs(ye),_e.start=0,_e.end=_e.size}function Ze(De,_e,Fe,Pe){for(let Ie=0;Ie<De.length;Ie++){let lt=[];fe(De[Ie],lt,Fe,Pe),_e.push(lt)}}function et(De){return De/360+.5}function gt(De){let _e=Math.sin(De*Math.PI/180),Fe=.5-.25*Math.log((1+_e)/(1-_e))/Math.PI;return Fe<0?0:Fe>1?1:Fe}function Pt(De,_e,Fe,Pe,Ie,lt,ye,ue){if(Pe/=_e,lt>=(Fe/=_e)&&ye<Pe)return De;if(ye<Fe||lt>=Pe)return null;let de=[];for(let ht of De){let Et=ht.geometry,St=ht.type,Zt=Ie===0?ht.minX:ht.minY,qr=Ie===0?ht.maxX:ht.maxY;if(Zt>=Fe&&qr<Pe){de.push(ht);continue}if(qr<Fe||Zt>=Pe)continue;let Lr=[];if(St==="Point"||St==="MultiPoint")Qe(Et,Lr,Fe,Pe,Ie);else if(St==="LineString")Xe(Et,Lr,Fe,Pe,Ie,!1,ue.lineMetrics);else if(St==="MultiLineString")xt(Et,Lr,Fe,Pe,Ie,!1);else if(St==="Polygon")xt(Et,Lr,Fe,Pe,Ie,!0);else if(St==="MultiPolygon")for(let vr of Et){let Er=[];xt(vr,Er,Fe,Pe,Ie,!0),Er.length&&Lr.push(Er)}if(Lr.length){if(ue.lineMetrics&&St==="LineString"){for(let vr of Lr)de.push(Oe(ht.id,St,vr,ht.tags));continue}St!=="LineString"&&St!=="MultiLineString"||(Lr.length===1?(St="LineString",Lr=Lr[0]):St="MultiLineString"),St!=="Point"&&St!=="MultiPoint"||(St=Lr.length===3?"Point":"MultiPoint"),de.push(Oe(ht.id,St,Lr,ht.tags))}}return de.length?de:null}function Qe(De,_e,Fe,Pe,Ie){for(let lt=0;lt<De.length;lt+=3){let ye=De[lt+Ie];ye>=Fe&&ye<=Pe&&_t(_e,De[lt],De[lt+1],De[lt+2])}}function Xe(De,_e,Fe,Pe,Ie,lt,ye){let ue=Tt(De),de=Ie===0?Ct:jt,ht,Et,St=De.start;for(let Er=0;Er<De.length-3;Er+=3){let si=De[Er],Ei=De[Er+1],Si=De[Er+2],xi=De[Er+3],Hi=De[Er+4],Jr=Ie===0?si:Ei,ci=Ie===0?xi:Hi,Di=!1;ye&&(ht=Math.sqrt(Math.pow(si-xi,2)+Math.pow(Ei-Hi,2))),Jr<Fe?ci>Fe&&(Et=de(ue,si,Ei,xi,Hi,Fe),ye&&(ue.start=St+ht*Et)):Jr>Pe?ci<Pe&&(Et=de(ue,si,Ei,xi,Hi,Pe),ye&&(ue.start=St+ht*Et)):_t(ue,si,Ei,Si),ci<Fe&&Jr>=Fe&&(Et=de(ue,si,Ei,xi,Hi,Fe),Di=!0),ci>Pe&&Jr<=Pe&&(Et=de(ue,si,Ei,xi,Hi,Pe),Di=!0),!lt&&Di&&(ye&&(ue.end=St+ht*Et),_e.push(ue),ue=Tt(De)),ye&&(St+=ht)}let Zt=De.length-3,qr=De[Zt],Lr=De[Zt+1],vr=Ie===0?qr:Lr;vr>=Fe&&vr<=Pe&&_t(ue,qr,Lr,De[Zt+2]),Zt=ue.length-3,lt&&Zt>=3&&(ue[Zt]!==ue[0]||ue[Zt+1]!==ue[1])&&_t(ue,ue[0],ue[1],ue[2]),ue.length&&_e.push(ue)}function Tt(De){let _e=[];return _e.size=De.size,_e.start=De.start,_e.end=De.end,_e}function xt(De,_e,Fe,Pe,Ie,lt){for(let ye of De)Xe(ye,_e,Fe,Pe,Ie,lt,!1)}function _t(De,_e,Fe,Pe){De.push(_e,Fe,Pe)}function Ct(De,_e,Fe,Pe,Ie,lt){let ye=(lt-_e)/(Pe-_e);return _t(De,lt,Fe+(Ie-Fe)*ye,1),ye}function jt(De,_e,Fe,Pe,Ie,lt){let ye=(lt-Fe)/(Ie-Fe);return _t(De,_e+(Pe-_e)*ye,lt,1),ye}function At(De,_e){let Fe=[];for(let Pe=0;Pe<De.length;Pe++){let Ie=De[Pe],lt=Ie.type,ye;if(lt==="Point"||lt==="MultiPoint"||lt==="LineString")ye=Te(Ie.geometry,_e);else if(lt==="MultiLineString"||lt==="Polygon"){ye=[];for(let ue of Ie.geometry)ye.push(Te(ue,_e))}else if(lt==="MultiPolygon"){ye=[];for(let ue of Ie.geometry){let de=[];for(let ht of ue)de.push(Te(ht,_e));ye.push(de)}}Fe.push(Oe(Ie.id,lt,ye,Ie.tags))}return Fe}function Te(De,_e){let Fe=[];Fe.size=De.size,De.start!==void 0&&(Fe.start=De.start,Fe.end=De.end);for(let Pe=0;Pe<De.length;Pe+=3)Fe.push(De[Pe]+_e,De[Pe+1],De[Pe+2]);return Fe}function nt(De,_e){if(De.transformed)return De;let Fe=1<<De.z,Pe=De.x,Ie=De.y;for(let lt of De.features){let ye=lt.geometry,ue=lt.type;if(lt.geometry=[],ue===1)for(let de=0;de<ye.length;de+=2)lt.geometry.push(ut(ye[de],ye[de+1],_e,Fe,Pe,Ie));else for(let de=0;de<ye.length;de++){let ht=[];for(let Et=0;Et<ye[de].length;Et+=2)ht.push(ut(ye[de][Et],ye[de][Et+1],_e,Fe,Pe,Ie));lt.geometry.push(ht)}}return De.transformed=!0,De}function ut(De,_e,Fe,Pe,Ie,lt){return[Math.round(Fe*(De*Pe-Ie)),Math.round(Fe*(_e*Pe-lt))]}function ct(De,_e,Fe,Pe,Ie){let lt=_e===Ie.maxZoom?0:Ie.tolerance/((1<<_e)*Ie.extent),ye={features:[],numPoints:0,numSimplified:0,numFeatures:De.length,source:null,x:Fe,y:Pe,z:_e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(let ue of De)rt(ye,ue,lt,Ie);return ye}function rt(De,_e,Fe,Pe){let Ie=_e.geometry,lt=_e.type,ye=[];if(De.minX=Math.min(De.minX,_e.minX),De.minY=Math.min(De.minY,_e.minY),De.maxX=Math.max(De.maxX,_e.maxX),De.maxY=Math.max(De.maxY,_e.maxY),lt==="Point"||lt==="MultiPoint")for(let ue=0;ue<Ie.length;ue+=3)ye.push(Ie[ue],Ie[ue+1]),De.numPoints++,De.numSimplified++;else if(lt==="LineString")je(ye,Ie,De,Fe,!1,!1);else if(lt==="MultiLineString"||lt==="Polygon")for(let ue=0;ue<Ie.length;ue++)je(ye,Ie[ue],De,Fe,lt==="Polygon",ue===0);else if(lt==="MultiPolygon")for(let ue=0;ue<Ie.length;ue++){let de=Ie[ue];for(let ht=0;ht<de.length;ht++)je(ye,de[ht],De,Fe,!0,ht===0)}if(ye.length){let ue=_e.tags||null;if(lt==="LineString"&&Pe.lineMetrics){ue={};for(let ht in _e.tags)ue[ht]=_e.tags[ht];ue.mapbox_clip_start=Ie.start/Ie.size,ue.mapbox_clip_end=Ie.end/Ie.size}let de={geometry:ye,type:lt==="Polygon"||lt==="MultiPolygon"?3:lt==="LineString"||lt==="MultiLineString"?2:1,tags:ue};_e.id!==null&&(de.id=_e.id),De.features.push(de)}}function je(De,_e,Fe,Pe,Ie,lt){let ye=Pe*Pe;if(Pe>0&&_e.size<(Ie?ye:Pe))return void(Fe.numPoints+=_e.length/3);let ue=[];for(let de=0;de<_e.length;de+=3)(Pe===0||_e[de+2]>ye)&&(Fe.numSimplified++,ue.push(_e[de],_e[de+1])),Fe.numPoints++;Ie&&function(de,ht){let Et=0;for(let St=0,Zt=de.length,qr=Zt-2;St<Zt;qr=St,St+=2)Et+=(de[St]-de[qr])*(de[St+1]+de[qr+1]);if(Et>0===ht)for(let St=0,Zt=de.length;St<Zt/2;St+=2){let qr=de[St],Lr=de[St+1];de[St]=de[Zt-2-St],de[St+1]=de[Zt-1-St],de[Zt-2-St]=qr,de[Zt-1-St]=Lr}}(ue,lt),De.push(ue)}let tt={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Je{constructor(_e,Fe){let Pe=(Fe=this.options=function(lt,ye){for(let ue in ye)lt[ue]=ye[ue];return lt}(Object.create(tt),Fe)).debug;if(Pe&&console.time("preprocess data"),Fe.maxZoom<0||Fe.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Fe.promoteId&&Fe.generateId)throw new Error("promoteId and generateId cannot be used together.");let Ie=function(lt,ye){let ue=[];if(lt.type==="FeatureCollection")for(let de=0;de<lt.features.length;de++)me(ue,lt.features[de],ye,de);else me(ue,lt.type==="Feature"?lt:{geometry:lt},ye);return ue}(_e,Fe);this.tiles={},this.tileCoords=[],Pe&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Fe.indexMaxZoom,Fe.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ie=function(lt,ye){let ue=ye.buffer/ye.extent,de=lt,ht=Pt(lt,1,-1-ue,ue,0,-1,2,ye),Et=Pt(lt,1,1-ue,2+ue,0,-1,2,ye);return(ht||Et)&&(de=Pt(lt,1,-ue,1+ue,0,-1,2,ye)||[],ht&&(de=At(ht,1).concat(de)),Et&&(de=de.concat(At(Et,-1)))),de}(Ie,Fe),Ie.length&&this.splitTile(Ie,0,0,0),Pe&&(Ie.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(_e,Fe,Pe,Ie,lt,ye,ue){let de=[_e,Fe,Pe,Ie],ht=this.options,Et=ht.debug;for(;de.length;){Ie=de.pop(),Pe=de.pop(),Fe=de.pop(),_e=de.pop();let St=1<<Fe,Zt=Mt(Fe,Pe,Ie),qr=this.tiles[Zt];if(!qr&&(Et>1&&console.time("creation"),qr=this.tiles[Zt]=ct(_e,Fe,Pe,Ie,ht),this.tileCoords.push({z:Fe,x:Pe,y:Ie}),Et)){Et>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Fe,Pe,Ie,qr.numFeatures,qr.numPoints,qr.numSimplified),console.timeEnd("creation"));let Di=`z${Fe}`;this.stats[Di]=(this.stats[Di]||0)+1,this.total++}if(qr.source=_e,lt==null){if(Fe===ht.indexMaxZoom||qr.numPoints<=ht.indexMaxPoints)continue}else{if(Fe===ht.maxZoom||Fe===lt)continue;if(lt!=null){let Di=lt-Fe;if(Pe!==ye>>Di||Ie!==ue>>Di)continue}}if(qr.source=null,_e.length===0)continue;Et>1&&console.time("clipping");let Lr=.5*ht.buffer/ht.extent,vr=.5-Lr,Er=.5+Lr,si=1+Lr,Ei=null,Si=null,xi=null,Hi=null,Jr=Pt(_e,St,Pe-Lr,Pe+Er,0,qr.minX,qr.maxX,ht),ci=Pt(_e,St,Pe+vr,Pe+si,0,qr.minX,qr.maxX,ht);_e=null,Jr&&(Ei=Pt(Jr,St,Ie-Lr,Ie+Er,1,qr.minY,qr.maxY,ht),Si=Pt(Jr,St,Ie+vr,Ie+si,1,qr.minY,qr.maxY,ht),Jr=null),ci&&(xi=Pt(ci,St,Ie-Lr,Ie+Er,1,qr.minY,qr.maxY,ht),Hi=Pt(ci,St,Ie+vr,Ie+si,1,qr.minY,qr.maxY,ht),ci=null),Et>1&&console.timeEnd("clipping"),de.push(Ei||[],Fe+1,2*Pe,2*Ie),de.push(Si||[],Fe+1,2*Pe,2*Ie+1),de.push(xi||[],Fe+1,2*Pe+1,2*Ie),de.push(Hi||[],Fe+1,2*Pe+1,2*Ie+1)}}getTile(_e,Fe,Pe){_e=+_e,Fe=+Fe,Pe=+Pe;let Ie=this.options,{extent:lt,debug:ye}=Ie;if(_e<0||_e>24)return null;let ue=1<<_e,de=Mt(_e,Fe=Fe+ue&ue-1,Pe);if(this.tiles[de])return nt(this.tiles[de],lt);ye>1&&console.log("drilling down to z%d-%d-%d",_e,Fe,Pe);let ht,Et=_e,St=Fe,Zt=Pe;for(;!ht&&Et>0;)Et--,St>>=1,Zt>>=1,ht=this.tiles[Mt(Et,St,Zt)];return ht&&ht.source?(ye>1&&(console.log("found parent tile z%d-%d-%d",Et,St,Zt),console.time("drilling down")),this.splitTile(ht.source,Et,St,Zt,_e,Fe,Pe),ye>1&&console.timeEnd("drilling down"),this.tiles[de]?nt(this.tiles[de],lt):null):null}}function Mt(De,_e,Fe){return 32*((1<<De)*Fe+_e)+De}function Vt(De,_e){return _e?De.properties[_e]:De.id}function Kt(De,_e){if(De==null)return!0;if(De.type==="Feature")return Vt(De,_e)!=null;if(De.type==="FeatureCollection"){let Fe=new Set;for(let Pe of De.features){let Ie=Vt(Pe,_e);if(Ie==null||Fe.has(Ie))return!1;Fe.add(Ie)}return!0}return!1}function ir(De,_e){let Fe=new Map;if(De!=null)if(De.type==="Feature")Fe.set(Vt(De,_e),De);else for(let Pe of De.features)Fe.set(Vt(Pe,_e),Pe);return Fe}class fr extends l{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(_e,Fe){return i._(this,void 0,void 0,function*(){let Pe=_e.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let Ie=this._geoJSONIndex.getTile(Pe.z,Pe.x,Pe.y);if(!Ie)return null;let lt=new class{constructor(ue){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=i.X,this.length=ue.length,this._features=ue}feature(ue){return new class{constructor(de){this._feature=de,this.extent=i.X,this.type=de.type,this.properties=de.tags,"id"in de&&!isNaN(de.id)&&(this.id=parseInt(de.id,10))}loadGeometry(){if(this._feature.type===1){let de=[];for(let ht of this._feature.geometry)de.push([new i.P(ht[0],ht[1])]);return de}{let de=[];for(let ht of this._feature.geometry){let Et=[];for(let St of ht)Et.push(new i.P(St[0],St[1]));de.push(Et)}return de}}toGeoJSON(de,ht,Et){return p.call(this,de,ht,Et)}}(this._features[ue])}}(Ie.features),ye=H(lt);return ye.byteOffset===0&&ye.byteLength===ye.buffer.byteLength||(ye=new Uint8Array(ye)),{vectorTile:lt,rawData:ye.buffer}})}loadData(_e){return i._(this,void 0,void 0,function*(){var Fe;(Fe=this._pendingRequest)===null||Fe===void 0||Fe.abort();let Pe=!!(_e&&_e.request&&_e.request.collectResourceTiming)&&new i.bv(_e.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(_e,this._pendingRequest),this._geoJSONIndex=_e.cluster?new be(function({superclusterOptions:ye,clusterProperties:ue}){if(!ue||!ye)return ye;let de={},ht={},Et={accumulated:null,zoom:0},St={properties:null},Zt=Object.keys(ue);for(let qr of Zt){let[Lr,vr]=ue[qr],Er=i.bC(vr),si=i.bC(typeof Lr=="string"?[Lr,["accumulated"],["get",qr]]:Lr);de[qr]=Er.value,ht[qr]=si.value}return ye.map=qr=>{St.properties=qr;let Lr={};for(let vr of Zt)Lr[vr]=de[vr].evaluate(Et,St);return Lr},ye.reduce=(qr,Lr)=>{St.properties=Lr;for(let vr of Zt)Et.accumulated=qr[vr],qr[vr]=ht[vr].evaluate(Et,St)},ye}(_e)).load((yield this._pendingData).features):(Ie=yield this._pendingData,new Je(Ie,_e.geojsonVtOptions)),this.loaded={};let lt={};if(Pe){let ye=Pe.finish();ye&&(lt.resourceTiming={},lt.resourceTiming[_e.source]=JSON.parse(JSON.stringify(ye)))}return lt}catch(lt){if(delete this._pendingRequest,i.bB(lt))return{abandoned:!0};throw lt}var Ie})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(_e){let Fe=this.loaded;return Fe&&Fe[_e.uid]?super.reloadTile(_e):this.loadTile(_e)}loadAndProcessGeoJSON(_e,Fe){return i._(this,void 0,void 0,function*(){let Pe=yield this.loadGeoJSON(_e,Fe);if(delete this._pendingRequest,typeof Pe!="object")throw new Error(`Input data given to '${_e.source}' is not a valid GeoJSON object.`);if(d(Pe,!0),_e.filter){let Ie=i.bC(_e.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Ie.result==="error")throw new Error(Ie.value.map(ye=>`${ye.key}: ${ye.message}`).join(", "));Pe={type:"FeatureCollection",features:Pe.features.filter(ye=>Ie.value.evaluate({zoom:0},ye))}}return Pe})}loadGeoJSON(_e,Fe){return i._(this,void 0,void 0,function*(){let{promoteId:Pe}=_e;if(_e.request){let Ie=yield i.h(_e.request,Fe);return this._dataUpdateable=Kt(Ie.data,Pe)?ir(Ie.data,Pe):void 0,Ie.data}if(typeof _e.data=="string")try{let Ie=JSON.parse(_e.data);return this._dataUpdateable=Kt(Ie,Pe)?ir(Ie,Pe):void 0,Ie}catch(Ie){throw new Error(`Input data given to '${_e.source}' is not a valid GeoJSON object.`)}if(!_e.dataDiff)throw new Error(`Input data given to '${_e.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${_e.source}`);return function(Ie,lt,ye){var ue,de,ht,Et;if(lt.removeAll&&Ie.clear(),lt.remove)for(let St of lt.remove)Ie.delete(St);if(lt.add)for(let St of lt.add){let Zt=Vt(St,ye);Zt!=null&&Ie.set(Zt,St)}if(lt.update)for(let St of lt.update){let Zt=Ie.get(St.id);if(Zt==null)continue;let qr=!St.removeAllProperties&&(((ue=St.removeProperties)===null||ue===void 0?void 0:ue.length)>0||((de=St.addOrUpdateProperties)===null||de===void 0?void 0:de.length)>0);if((St.newGeometry||St.removeAllProperties||qr)&&(Zt=Object.assign({},Zt),Ie.set(St.id,Zt),qr&&(Zt.properties=Object.assign({},Zt.properties))),St.newGeometry&&(Zt.geometry=St.newGeometry),St.removeAllProperties)Zt.properties={};else if(((ht=St.removeProperties)===null||ht===void 0?void 0:ht.length)>0)for(let Lr of St.removeProperties)Object.prototype.hasOwnProperty.call(Zt.properties,Lr)&&delete Zt.properties[Lr];if(((Et=St.addOrUpdateProperties)===null||Et===void 0?void 0:Et.length)>0)for(let{key:Lr,value:vr}of St.addOrUpdateProperties)Zt.properties[Lr]=vr}}(this._dataUpdateable,_e.dataDiff,Pe),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(_e){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(_e){return this._geoJSONIndex.getClusterExpansionZoom(_e.clusterId)}getClusterChildren(_e){return this._geoJSONIndex.getChildren(_e.clusterId)}getClusterLeaves(_e){return this._geoJSONIndex.getLeaves(_e.clusterId,_e.limit,_e.offset)}}class Ot{constructor(_e){this.self=_e,this.actor=new i.F(_e),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Fe,Pe)=>{if(this.externalWorkerSourceTypes[Fe])throw new Error(`Worker source with name "${Fe}" already registered.`);this.externalWorkerSourceTypes[Fe]=Pe},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Fe=>{if(i.bD.isParsed())throw new Error("RTL text plugin already registered.");i.bD.setMethods(Fe)},this.actor.registerMessageHandler("LDT",(Fe,Pe)=>this._getDEMWorkerSource(Fe,Pe.source).loadTile(Pe)),this.actor.registerMessageHandler("RDT",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Fe,Pe.source).removeTile(Pe)})),this.actor.registerMessageHandler("GCEZ",(Fe,Pe)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Fe,Pe.type,Pe.source).getClusterExpansionZoom(Pe)})),this.actor.registerMessageHandler("GCC",(Fe,Pe)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Fe,Pe.type,Pe.source).getClusterChildren(Pe)})),this.actor.registerMessageHandler("GCL",(Fe,Pe)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Fe,Pe.type,Pe.source).getClusterLeaves(Pe)})),this.actor.registerMessageHandler("LD",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).loadData(Pe)),this.actor.registerMessageHandler("GD",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).getData()),this.actor.registerMessageHandler("LT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).loadTile(Pe)),this.actor.registerMessageHandler("RT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).reloadTile(Pe)),this.actor.registerMessageHandler("AT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).abortTile(Pe)),this.actor.registerMessageHandler("RMT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).removeTile(Pe)),this.actor.registerMessageHandler("RS",(Fe,Pe)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Fe]||!this.workerSources[Fe][Pe.type]||!this.workerSources[Fe][Pe.type][Pe.source])return;let Ie=this.workerSources[Fe][Pe.type][Pe.source];delete this.workerSources[Fe][Pe.type][Pe.source],Ie.removeSource!==void 0&&Ie.removeSource(Pe)})),this.actor.registerMessageHandler("RM",Fe=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Fe],delete this.availableImages[Fe],delete this.workerSources[Fe],delete this.demWorkerSources[Fe]})),this.actor.registerMessageHandler("SR",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this.referrer=Pe})),this.actor.registerMessageHandler("SRPS",(Fe,Pe)=>this._syncRTLPluginState(Fe,Pe)),this.actor.registerMessageHandler("IS",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this.self.importScripts(Pe)})),this.actor.registerMessageHandler("SI",(Fe,Pe)=>this._setImages(Fe,Pe)),this.actor.registerMessageHandler("UL",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Fe).update(Pe.layers,Pe.removedIds)})),this.actor.registerMessageHandler("SL",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Fe).replace(Pe)}))}_setImages(_e,Fe){return i._(this,void 0,void 0,function*(){this.availableImages[_e]=Fe;for(let Pe in this.workerSources[_e]){let Ie=this.workerSources[_e][Pe];for(let lt in Ie)Ie[lt].availableImages=Fe}})}_syncRTLPluginState(_e,Fe){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Fe.pluginStatus!=="loading")return i.bD.setState(Fe),Fe;let Pe=Fe.pluginURL;if(this.self.importScripts(Pe),i.bD.isParsed()){let Ie={pluginStatus:"loaded",pluginURL:Pe};return i.bD.setState(Ie),Ie}throw i.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Pe}`)})}_getAvailableImages(_e){let Fe=this.availableImages[_e];return Fe||(Fe=[]),Fe}_getLayerIndex(_e){let Fe=this.layerIndexes[_e];return Fe||(Fe=this.layerIndexes[_e]=new a),Fe}_getWorkerSource(_e,Fe,Pe){if(this.workerSources[_e]||(this.workerSources[_e]={}),this.workerSources[_e][Fe]||(this.workerSources[_e][Fe]={}),!this.workerSources[_e][Fe][Pe]){let Ie={sendAsync:(lt,ye)=>(lt.targetMapId=_e,this.actor.sendAsync(lt,ye))};switch(Fe){case"vector":this.workerSources[_e][Fe][Pe]=new l(Ie,this._getLayerIndex(_e),this._getAvailableImages(_e));break;case"geojson":this.workerSources[_e][Fe][Pe]=new fr(Ie,this._getLayerIndex(_e),this._getAvailableImages(_e));break;default:this.workerSources[_e][Fe][Pe]=new this.externalWorkerSourceTypes[Fe](Ie,this._getLayerIndex(_e),this._getAvailableImages(_e))}}return this.workerSources[_e][Fe][Pe]}_getDEMWorkerSource(_e,Fe){return this.demWorkerSources[_e]||(this.demWorkerSources[_e]={}),this.demWorkerSources[_e][Fe]||(this.demWorkerSources[_e][Fe]=new f),this.demWorkerSources[_e][Fe]}}return i.i(self)&&(self.worker=new Ot(self)),Ot}),r("index",["exports","./shared"],function(i,a){"use strict";var o="4.7.1";let s,u,l={now:typeof performance!="undefined"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:oe=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);oe.signal.addEventListener("abort",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(oe,w=0){return this.getImageCanvasContext(oe).getImageData(-w,-w,oe.width+2*w,oe.height+2*w)},getImageCanvasContext(oe){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=oe.width,w.height=oe.height,B.drawImage(oe,0,0,oe.width,oe.height),B},resolveURL:oe=>(s||(s=document.createElement("a")),s.href=oe,s.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(u==null&&(u=matchMedia("(prefers-reduced-motion: reduce)")),u.matches)}};class f{static testProp(w){if(!f.docStyle)return w[0];for(let B=0;B<w.length;B++)if(w[B]in f.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(){f.docStyle&&f.selectProp&&(f.userSelect=f.docStyle[f.selectProp],f.docStyle[f.selectProp]="none")}static enableDrag(){f.docStyle&&f.selectProp&&(f.docStyle[f.selectProp]=f.userSelect)}static setTransform(w,B){w.style[f.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",f.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",f.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",f.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=f.getScale(w);return f.getPoint(w,Q,B)}static touchPos(w,B){let Q=[],ee=f.getScale(w);for(let le=0;le<B.length;le++)Q.push(f.getPoint(w,ee,B[le]));return Q}static mouseButton(w){return w.button}static remove(w){w.parentNode&&w.parentNode.removeChild(w)}}f.docStyle=typeof window!="undefined"&&window.document&&window.document.documentElement.style,f.selectProp=f.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),f.transformProp=f.testProp(["transform","WebkitTransform"]);let c={supported:!1,testSupport:function(oe){!p&&d&&(x?b(oe):h=oe)}},h,d,p=!1,x=!1;function b(oe){let w=oe.createTexture();oe.bindTexture(oe.TEXTURE_2D,w);try{if(oe.texImage2D(oe.TEXTURE_2D,0,oe.RGBA,oe.RGBA,oe.UNSIGNED_BYTE,d),oe.isContextLost())return;c.supported=!0}catch(B){}oe.deleteTexture(w),p=!0}var y;typeof document!="undefined"&&(d=document.createElement("img"),d.onload=()=>{h&&b(h),h=null,x=!0},d.onerror=()=>{p=!0,h=null},d.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(oe){let w,B,Q,ee;oe.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},oe.addThrottleControl=pt=>{let zt=Q++;return ee[zt]=pt,zt},oe.removeThrottleControl=pt=>{delete ee[pt],Ne()},oe.getImage=(pt,zt,Yt=!0)=>new Promise((Jt,yr)=>{c.supported&&(pt.headers||(pt.headers={}),pt.headers.accept="image/webp,*/*"),a.e(pt,{type:"image"}),w.push({abortController:zt,requestParameters:pt,supportImageRefresh:Yt,state:"queued",onError:Ir=>{yr(Ir)},onSuccess:Ir=>{Jt(Ir)}}),Ne()});let le=pt=>a._(this,void 0,void 0,function*(){pt.state="running";let{requestParameters:zt,supportImageRefresh:Yt,onError:Jt,onSuccess:yr,abortController:Ir}=pt,ce=Yt===!1&&!a.i(self)&&!a.g(zt.url)&&(!zt.headers||Object.keys(zt.headers).reduce((Ve,ot)=>Ve&&ot==="accept",!0));B++;let Ae=ce?$e(zt,Ir):a.m(zt,Ir);try{let Ve=yield Ae;delete pt.abortController,pt.state="completed",Ve.data instanceof HTMLImageElement||a.b(Ve.data)?yr(Ve):Ve.data&&yr({data:yield(qe=Ve.data,typeof createImageBitmap=="function"?a.d(qe):a.f(qe)),cacheControl:Ve.cacheControl,expires:Ve.expires})}catch(Ve){delete pt.abortController,Jt(Ve)}finally{B--,Ne()}var qe}),Ne=()=>{let pt=(()=>{for(let zt of Object.keys(ee))if(ee[zt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let zt=B;zt<pt&&w.length>0;zt++){let Yt=w.shift();Yt.abortController.signal.aborted?zt--:le(Yt)}},$e=(pt,zt)=>new Promise((Yt,Jt)=>{let yr=new Image,Ir=pt.url,ce=pt.credentials;ce&&ce==="include"?yr.crossOrigin="use-credentials":(ce&&ce==="same-origin"||!a.s(Ir))&&(yr.crossOrigin="anonymous"),zt.signal.addEventListener("abort",()=>{yr.src="",Jt(a.c())}),yr.fetchPriority="high",yr.onload=()=>{yr.onerror=yr.onload=null,Yt({data:yr})},yr.onerror=()=>{yr.onerror=yr.onload=null,zt.signal.aborted||Jt(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."))},yr.src=Ir})}(y||(y={})),y.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(oe){var w=new a.A(3);return w[0]=oe[0],w[1]=oe[1],w[2]=oe[2],w}var A,L=function(oe,w,B){return oe[0]=w[0]-B[0],oe[1]=w[1]-B[1],oe[2]=w[2]-B[2],oe};A=new a.A(3),a.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var _=function(oe){var w=oe[0],B=oe[1];return w*w+B*B};function C(oe){let w=[];if(typeof oe=="string")w.push({id:"default",url:oe});else if(oe&&oe.length>0){let B=[];for(let{id:Q,url:ee}of oe){let le=`${Q}${ee}`;B.indexOf(le)===-1&&(B.push(le),w.push({id:Q,url:ee}))}}return w}function M(oe,w,B){let Q=oe.split("?");return Q[0]+=`${w}${B}`,Q.join("?")}(function(){var oe=new a.A(2);a.A!=Float32Array&&(oe[0]=0,oe[1]=0)})();class v{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,Ne=!(this.size&&this.size[0]===ee&&this.size[1]===le||Q),{context:$e}=this,{gl:pt}=$e;if(this.useMipmap=!!(B&&B.useMipmap),pt.bindTexture(pt.TEXTURE_2D,this.texture),$e.pixelStoreUnpackFlipY.set(!1),$e.pixelStoreUnpack.set(1),$e.pixelStoreUnpackPremultiplyAlpha.set(this.format===pt.RGBA&&(!B||B.premultiply!==!1)),Ne)this.size=[ee,le],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?pt.texImage2D(pt.TEXTURE_2D,0,this.format,this.format,pt.UNSIGNED_BYTE,w):pt.texImage2D(pt.TEXTURE_2D,0,this.format,ee,le,0,this.format,pt.UNSIGNED_BYTE,w.data);else{let{x:zt,y:Yt}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?pt.texSubImage2D(pt.TEXTURE_2D,0,zt,Yt,pt.RGBA,pt.UNSIGNED_BYTE,w):pt.texSubImage2D(pt.TEXTURE_2D,0,zt,Yt,ee,le,pt.RGBA,pt.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&pt.generateMipmap(pt.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 z(oe){let{userImage:w}=oe;return!!(w&&w.render&&w.render())&&(oe.data.replace(new Uint8Array(w.data.buffer)),!0)}class T 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 v(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:Ne}=this.patterns[le],$e=Ne.x+1,pt=Ne.y+1,zt=this.getImage(le).data,Yt=zt.width,Jt=zt.height;a.R.copy(zt,ee,{x:0,y:0},{x:$e,y:pt},{width:Yt,height:Jt}),a.R.copy(zt,ee,{x:0,y:Jt-1},{x:$e,y:pt-1},{width:Yt,height:1}),a.R.copy(zt,ee,{x:0,y:0},{x:$e,y:pt+Jt},{width:Yt,height:1}),a.R.copy(zt,ee,{x:Yt-1,y:0},{x:$e-1,y:pt},{width:1,height:Jt}),a.R.copy(zt,ee,{x:0,y:0},{x:$e+Yt,y:pt},{width:1,height:Jt})}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`),z(Q)&&this.updateImage(B,Q)}}}let F=1e20;function q(oe,w,B,Q,ee,le,Ne,$e,pt){for(let zt=w;zt<w+Q;zt++)U(oe,B*le+zt,le,ee,Ne,$e,pt);for(let zt=B;zt<B+ee;zt++)U(oe,zt*le+w,1,Q,Ne,$e,pt)}function U(oe,w,B,Q,ee,le,Ne){le[0]=0,Ne[0]=-F,Ne[1]=F,ee[0]=oe[w];for(let $e=1,pt=0,zt=0;$e<Q;$e++){ee[$e]=oe[w+$e*B];let Yt=$e*$e;do{let Jt=le[pt];zt=(ee[$e]-ee[Jt]+Yt-Jt*Jt)/($e-Jt)/2}while(zt<=Ne[pt]&&--pt>-1);pt++,le[pt]=$e,Ne[pt]=zt,Ne[pt+1]=F}for(let $e=0,pt=0;$e<Q;$e++){for(;Ne[pt+1]<$e;)pt++;let zt=le[pt],Yt=$e-zt;oe[w+$e*B]=ee[zt]+Yt*Yt}}class H{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 Ne of w[le])B.push(this._getAndCacheGlyphsPromise(le,Ne));let Q=yield Promise.all(B),ee={};for(let{stack:le,id:Ne,glyph:$e}of Q)ee[le]||(ee[le]={}),ee[le][Ne]=$e&&{id:$e.id,bitmap:$e.bitmap.clone(),metrics:$e.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 $e=H.loadGlyphRange(w,le,this.url,this.requestManager);Q.requests[le]=$e}let Ne=yield Q.requests[le];for(let $e in Ne)this._doesCharSupportLocalGlyph(+$e)||(Q.glyphs[+$e]=Ne[+$e]);return Q.ranges[le]=!0,{stack:w,id:B,glyph:Ne[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 $e="400";/bold/i.test(B)?$e="900":/medium/i.test(B)?$e="500":/light/i.test(B)&&($e="200"),le=w.tinySDF=new H.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:$e})}let Ne=le.draw(String.fromCharCode(Q));return{id:Q,bitmap:new a.o({width:Ne.width||60,height:Ne.height||60},Ne.data),metrics:{width:Ne.glyphWidth/2||24,height:Ne.glyphHeight/2||24,left:Ne.glyphLeft/2+.5||0,top:Ne.glyphTop/2-27.5||-8,advance:Ne.glyphAdvance/2||24,isDoubleResolution:!0}}}}H.loadGlyphRange=function(oe,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,le=ee+255,Ne=Q.transformRequest(B.replace("{fontstack}",oe).replace("{range}",`${ee}-${le}`),"Glyphs"),$e=yield a.l(Ne,new AbortController);if(!$e||!$e.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${le}`);let pt={};for(let zt of a.n($e.data))pt[zt.id]=zt;return pt})},H.TinySDF=class{constructor({fontSize:oe=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee="sans-serif",fontWeight:le="normal",fontStyle:Ne="normal"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let $e=this.size=oe+4*w,pt=this._createCanvas($e),zt=this.ctx=pt.getContext("2d",{willReadFrequently:!0});zt.font=`${Ne} ${le} ${oe}px ${ee}`,zt.textBaseline="alphabetic",zt.textAlign="left",zt.fillStyle="black",this.gridOuter=new Float64Array($e*$e),this.gridInner=new Float64Array($e*$e),this.f=new Float64Array($e),this.z=new Float64Array($e+1),this.v=new Uint16Array($e)}_createCanvas(oe){let w=document.createElement("canvas");return w.width=w.height=oe,w}draw(oe){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:le}=this.ctx.measureText(oe),Ne=Math.ceil(B),$e=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(le-ee))),pt=Math.min(this.size-this.buffer,Ne+Math.ceil(Q)),zt=$e+2*this.buffer,Yt=pt+2*this.buffer,Jt=Math.max(zt*Yt,0),yr=new Uint8ClampedArray(Jt),Ir={data:yr,width:zt,height:Yt,glyphWidth:$e,glyphHeight:pt,glyphTop:Ne,glyphLeft:0,glyphAdvance:w};if($e===0||pt===0)return Ir;let{ctx:ce,buffer:Ae,gridInner:qe,gridOuter:Ve}=this;ce.clearRect(Ae,Ae,$e,pt),ce.fillText(oe,Ae,Ae+Ne);let ot=ce.getImageData(Ae,Ae,$e,pt);Ve.fill(F,0,Jt),qe.fill(0,0,Jt);for(let Ke=0;Ke<pt;Ke++)for(let ft=0;ft<$e;ft++){let qt=ot.data[4*(Ke*$e+ft)+3]/255;if(qt===0)continue;let Xt=(Ke+Ae)*zt+ft+Ae;if(qt===1)Ve[Xt]=0,qe[Xt]=F;else{let $t=.5-qt;Ve[Xt]=$t>0?$t*$t:0,qe[Xt]=$t<0?$t*$t:0}}q(Ve,0,0,zt,Yt,zt,this.f,this.v,this.z),q(qe,Ae,Ae,$e,pt,zt,this.f,this.v,this.z);for(let Ke=0;Ke<Jt;Ke++){let ft=Math.sqrt(Ve[Ke])-Math.sqrt(qe[Ke]);yr[Ke]=Math.round(255-255*(ft/this.radius+this.cutoff))}return Ir}};class j{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 G;class O extends a.E{constructor(w){super(),G=G||new a.q({anchor:new a.D(a.v.light.anchor),position:new j,color:new a.D(a.v.light.color),intensity:new a.D(a.v.light.intensity)}),this._transitionable=new a.T(G),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 W=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(W),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 ne{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,Ne=w[0]*Q,$e=!0;ee.push({left:le,right:Ne,isDash:$e,zeroLength:w[0]===0});let pt=w[0];for(let zt=1;zt<w.length;zt++){$e=!$e;let Yt=w[zt];le=pt*Q,pt+=Yt,Ne=pt*Q,ee.push({left:le,right:Ne,isDash:$e,zeroLength:Yt===0})}return ee}addRoundDash(w,B,Q){let ee=B/2;for(let le=-Q;le<=Q;le++){let Ne=this.width*(this.nextRow+Q+le),$e=0,pt=w[$e];for(let zt=0;zt<this.width;zt++){zt/pt.right>1&&(pt=w[++$e]);let Yt=Math.abs(zt-pt.left),Jt=Math.abs(zt-pt.right),yr=Math.min(Yt,Jt),Ir,ce=le/Q*(ee+1);if(pt.isDash){let Ae=ee-Math.abs(ce);Ir=Math.sqrt(yr*yr+Ae*Ae)}else Ir=ee-Math.sqrt(yr*yr+ce*ce);this.data[Ne+zt]=Math.max(0,Math.min(255,Ir+128))}}}addRegularDash(w){for(let $e=w.length-1;$e>=0;--$e){let pt=w[$e],zt=w[$e+1];pt.zeroLength?w.splice($e,1):zt&&zt.isDash===pt.isDash&&(zt.left=pt.left,w.splice($e,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,Ne=w[le];for(let $e=0;$e<this.width;$e++){$e/Ne.right>1&&(Ne=w[++le]);let pt=Math.abs($e-Ne.left),zt=Math.abs($e-Ne.right),Yt=Math.min(pt,zt);this.data[ee+$e]=Math.max(0,Math.min(255,(Ne.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 $e=0;$e<w.length;$e++)le+=w[$e];if(le!==0){let $e=this.width/le,pt=this.getDashRanges(w,this.width,$e);B?this.addRoundDash(pt,$e,Q):this.addRegularDash(pt)}let Ne={y:(this.nextRow+Q+.5)/this.height,height:2*Q/this.height,width:le};return this.nextRow+=ee,this.dirty=!0,Ne}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 be="maplibre_preloaded_worker_pool";class ze{constructor(){this.active={}}acquire(w){if(!this.workers)for(this.workers=[];this.workers.length<ze.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[be]}numActive(){return Object.keys(this.active).length}}let Ce=Math.floor(l.hardwareConcurrency/2),he,te;function ke(){return he||(he=new ze),he}ze.workerCount=a.C(globalThis)?Math.max(Math.min(Ce,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 Me(){return te||(te=new Ee(ke(),a.G),te.registerMessageHandler("GR",(oe,w,B)=>a.m(w,B))),te}function Oe(oe,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*oe.width,.5*oe.height,1]),a.L(B,B,oe.calculatePosMatrix(w.toUnwrapped()))}function Re(oe,w,B,Q,ee,le){let Ne=function(Jt,yr,Ir){if(Jt)for(let ce of Jt){let Ae=yr[ce];if(Ae&&Ae.source===Ir&&Ae.type==="fill-extrusion")return!0}else for(let ce in yr){let Ae=yr[ce];if(Ae.source===Ir&&Ae.type==="fill-extrusion")return!0}return!1}(ee&&ee.layers,w,oe.id),$e=le.maxPitchScaleFactor(),pt=oe.tilesIn(Q,$e,Ne);pt.sort(me);let zt=[];for(let Jt of pt)zt.push({wrappedTileID:Jt.tileID.wrapped().key,queryResults:Jt.tile.queryRenderedFeatures(w,B,oe._state,Jt.queryGeometry,Jt.cameraQueryGeometry,Jt.scale,ee,le,$e,Oe(oe.transform,Jt.tileID))});let Yt=function(Jt){let yr={},Ir={};for(let ce of Jt){let Ae=ce.queryResults,qe=ce.wrappedTileID,Ve=Ir[qe]=Ir[qe]||{};for(let ot in Ae){let Ke=Ae[ot],ft=Ve[ot]=Ve[ot]||{},qt=yr[ot]=yr[ot]||[];for(let Xt of Ke)ft[Xt.featureIndex]||(ft[Xt.featureIndex]=!0,qt.push(Xt))}}return yr}(zt);for(let Jt in Yt)Yt[Jt].forEach(yr=>{let Ir=yr.feature,ce=oe.getFeatureState(Ir.layer["source-layer"],Ir.id);Ir.source=Ir.layer.source,Ir.layer["source-layer"]&&(Ir.sourceLayer=Ir.layer["source-layer"]),Ir.state=ce});return Yt}function me(oe,w){let B=oe.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 Be(oe,w,B){return a._(this,void 0,void 0,function*(){let Q=oe;if(oe.url?Q=(yield a.h(w.transformRequest(oe.url,"Source"),B)).data:yield l.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,oe),["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 fe{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 fe))return Array.isArray(w)?w.length===4||w.every(Array.isArray)?this.extend(fe.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 fe?w:w&&new fe(w)}static fromLngLat(w,B=0){let Q=360*B/40075017,ee=Q/Math.cos(Math.PI/180*w.lat);return new fe(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 fe(w,w.lng>B.lng?new a.N(B.lng+360,B.lat):B)}}class Ze{constructor(w,B,Q){this.bounds=fe.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),Ne=Math.ceil(a.Q(this.bounds.getSouth())*B);return w.x>=Q&&w.x<le&&w.y>=ee&&w.y<Ne}}class et 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 Be(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 Ze(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,Ne)=>{w.reloadPromise={resolve:le,reject:Ne}})}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 gt 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 Be(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,w&&(a.e(this,w),w.bounds&&(this.tileBounds=new Ze(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 y.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,Ne=Q.data;w.texture=this.map.painter.getTileTexture(Ne.width),w.texture?w.texture.update(Ne,{useMipmap:!0}):(w.texture=new v(ee,Ne,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 Pt extends gt{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 y.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 Ne=a.b(le)&&a.U()?le:yield this.readImageNow(le),$e={type:this.type,uid:w.uid,source:this.id,rawImageData:Ne,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 pt=yield w.actor.sendAsync({type:"LDT",data:$e});w.dem=pt,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 l.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,Ne=(B.x+1+Q)%Q,$e=B.x+1===Q?w.wrap+1:w.wrap,pt={};return pt[new a.S(w.overscaledZ,le,B.z,ee,B.y).key]={backfilled:!1},pt[new a.S(w.overscaledZ,$e,B.z,Ne,B.y).key]={backfilled:!1},B.y>0&&(pt[new a.S(w.overscaledZ,le,B.z,ee,B.y-1).key]={backfilled:!1},pt[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},pt[new a.S(w.overscaledZ,$e,B.z,Ne,B.y-1).key]={backfilled:!1}),B.y+1<Q&&(pt[new a.S(w.overscaledZ,le,B.z,ee,B.y+1).key]={backfilled:!1},pt[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y+1).key]={backfilled:!1},pt[new a.S(w.overscaledZ,$e,B.z,Ne,B.y+1).key]={backfilled:!1}),pt}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 Qe 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(l.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 Xe=a.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Tt 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 y.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,Ne=1/0,$e=-1/0,pt=-1/0;for(let yr of ee)le=Math.min(le,yr.x),Ne=Math.min(Ne,yr.y),$e=Math.max($e,yr.x),pt=Math.max(pt,yr.y);let zt=Math.max($e-le,pt-Ne),Yt=Math.max(0,Math.floor(-Math.log(zt)/Math.LN2)),Jt=Math.pow(2,Yt);return new a.a1(Yt,Math.floor((le+$e)/2*Jt),Math.floor((Ne+pt)/2*Jt))}(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,Xe.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new v(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 xt extends Tt{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,Xe.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 v(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 Tt{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(Ne=>typeof Ne!="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,Xe.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 v(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let le in this.tiles){let Ne=this.tiles[le];Ne.state!=="loaded"&&(Ne.state="loaded",Ne.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 Ct={},jt=oe=>{switch(oe){case"geojson":return Qe;case"image":return Tt;case"raster":return gt;case"raster-dem":return Pt;case"vector":return et;case"video":return xt;case"canvas":return _t}return Ct[oe]},At="RTLPluginLoaded";class Te extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Me()}_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=l.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(At))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let nt=null;function ut(){return nt||(nt=new Te),nt}class ct{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 Ne={};if(!le)return Ne;for(let $e of ee){let pt=$e.layerIds.map(zt=>le.getLayer(zt)).filter(Boolean);if(pt.length!==0){$e.layers=pt,$e.stateDependentLayerIds&&($e.stateDependentLayers=$e.stateDependentLayerIds.map(zt=>pt.filter(Yt=>Yt.id===zt)[0]));for(let zt of pt)Ne[zt.id]=$e}}return Ne}(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,ut().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 v(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new v(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,le,Ne,$e,pt,zt,Yt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:le,scale:Ne,tileSize:this.tileSize,pixelPosMatrix:Yt,transform:pt,params:$e,queryPadding:this.queryPadding*zt},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:"",Ne=ee._geojsonTileLayer||ee[le];if(!Ne)return;let $e=a.a7(B&&B.filter),{z:pt,x:zt,y:Yt}=this.tileID.canonical,Jt={z:pt,x:zt,y:Yt};for(let yr=0;yr<Ne.length;yr++){let Ir=Ne.feature(yr);if($e.needGeometry){let qe=a.a8(Ir,!0);if(!$e.filter(new a.z(this.tileID.overscaledZ),qe,this.tileID.canonical))continue}else if(!$e.filter(new a.z(this.tileID.overscaledZ),Ir))continue;let ce=Q.getId(Ir,le),Ae=new a.a9(Ir,pt,zt,Yt,ce);Ae.tile=Jt,w.push(Ae)}}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],Ne=le.layers[0].sourceLayer||"_geojsonTileLayer",$e=Q[Ne],pt=w[Ne];if(!$e||!pt||Object.keys(pt).length===0)continue;le.update(pt,$e,this.imageAtlas&&this.imageAtlas.patternPositions||{});let zt=B&&B.style&&B.style.getLayer(ee);zt&&(this.queryPadding=Math.max(this.queryPadding,zt.queryRadius(le)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<l.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(w){this.symbolFadeHoldUntil=l.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 rt{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 Ne=this._getAndRemoveByKey(this.order[0]);Ne&&this.onRemove(Ne)}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 je{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 Ne in le)delete ee[Ne]}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 Ne in this.stateChanges[ee])this.state[ee][Ne]||(this.state[ee][Ne]={}),a.e(this.state[ee][Ne],this.stateChanges[ee][Ne]),le[Ne]=this.state[ee][Ne];Q[ee]=le}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let le={};if(this.deletedStates[ee]===null)for(let Ne in this.state[ee])le[Ne]={},this.state[ee][Ne]={};else for(let Ne in this.deletedStates[ee]){if(this.deletedStates[ee][Ne]===null)this.state[ee][Ne]={};else for(let $e of Object.keys(this.deletedStates[ee][Ne]))delete this.state[ee][Ne][$e];le[Ne]=this.state[ee][Ne]}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 tt 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,Ne,$e)=>{let pt=new(jt(le.type))(ee,le,Ne,$e);if(pt.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${pt.id}`);return pt})(w,B,Q,this),this._tiles={},this._cache=new rt(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new je,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(Je).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,Ne=ee.tileID,$e=new a.P(le.canonical.x,le.canonical.y)._rotate(this.transform.angle),pt=new a.P(Ne.canonical.x,Ne.canonical.y)._rotate(this.transform.angle);return le.overscaledZ-Ne.overscaledZ||pt.y-$e.y||pt.x-$e.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(Je).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=l.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 Ne=this.getTileByID(le);Q(w,Ne),Q(Ne,w)}}function Q(ee,le){ee.needsHillshadePrepare=!0,ee.needsTerrainPrepare=!0;let Ne=le.tileID.canonical.x-ee.tileID.canonical.x,$e=le.tileID.canonical.y-ee.tileID.canonical.y,pt=Math.pow(2,ee.tileID.canonical.z),zt=le.tileID.key;Ne===0&&$e===0||Math.abs($e)>1||(Math.abs(Ne)>1&&(Math.abs(Ne+pt)===1?Ne+=pt:Math.abs(Ne-pt)===1&&(Ne-=pt)),le.dem&&ee.dem&&(ee.dem.backfillBorder(le.dem,Ne,$e),ee.neighboringTiles&&ee.neighboringTiles[zt]&&(ee.neighboringTiles[zt].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 Ne=this._tiles[le];if(ee[le]||!Ne.hasData()||Ne.tileID.overscaledZ<=B||Ne.tileID.overscaledZ>Q)continue;let $e=Ne.tileID;for(;Ne&&Ne.tileID.overscaledZ>B+1;){let zt=Ne.tileID.scaledTo(Ne.tileID.overscaledZ-1);Ne=this._tiles[zt.key],Ne&&Ne.hasData()&&($e=zt)}let pt=$e;for(;pt.overscaledZ>B;)if(pt=pt.scaledTo(pt.overscaledZ-1),w[pt.key]){ee[$e.key]=$e;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,Ne){let $e={},pt={},zt=Object.keys(w),Yt=l.now();for(let Jt of zt){let yr=w[Jt],Ir=this._tiles[Jt];if(!Ir||Ir.fadeEndTime!==0&&Ir.fadeEndTime<=Yt)continue;let ce=this.findLoadedParent(yr,B),Ae=this.findLoadedSibling(yr),qe=ce||Ae||null;qe&&(this._addTile(qe.tileID),$e[qe.tileID.key]=qe.tileID),pt[Jt]=yr}this._retainLoadedChildren(pt,ee,Q,w);for(let Jt in $e)w[Jt]||(this._coveredTiles[Jt]=!0,w[Jt]=$e[Jt]);if(Ne){let Jt={},yr={};for(let Ir of le)this._tiles[Ir.key].hasData()?Jt[Ir.key]=Ir:yr[Ir.key]=Ir;for(let Ir in yr){let ce=yr[Ir].children(this._source.maxzoom);this._tiles[ce[0].key]&&this._tiles[ce[1].key]&&this._tiles[ce[2].key]&&this._tiles[ce[3].key]&&(Jt[ce[0].key]=w[ce[0].key]=ce[0],Jt[ce[1].key]=w[ce[1].key]=ce[1],Jt[ce[2].key]=w[ce[2].key]=ce[2],Jt[ce[3].key]=w[ce[3].key]=ce[3],delete yr[Ir])}for(let Ir in yr){let ce=yr[Ir],Ae=this.findLoadedParent(ce,this._source.minzoom),qe=this.findLoadedSibling(ce),Ve=Ae||qe||null;if(Ve){Jt[Ve.tileID.key]=w[Ve.tileID.key]=Ve.tileID;for(let ot in Jt)Jt[ot].isChildOf(Ve.tileID)&&delete Jt[ot]}}for(let Ir in this._tiles)Jt[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-tt.maxOverzooming,this._source.minzoom),Ne=Math.max(ee+tt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Yt={};for(let Jt of Q)if(Jt.canonical.z>this._source.minzoom){let yr=Jt.scaledTo(Jt.canonical.z-1);Yt[yr.key]=yr;let Ir=Jt.scaledTo(Math.max(this._source.minzoom,Math.min(Jt.canonical.z,5)));Yt[Ir.key]=Ir}Q=Q.concat(Object.values(Yt))}let $e=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,$e&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let pt=this._updateRetainedTiles(Q,ee);Mt(this._source.type)&&this._updateCoveredAndRetainedTiles(pt,le,Ne,ee,Q,B);for(let Yt in pt)this._tiles[Yt].clearFadeHold();let zt=a.ab(this._tiles,pt);for(let Yt of zt){let Jt=this._tiles[Yt];Jt.hasSymbolBuckets&&!Jt.holdingForFade()?Jt.setHoldDuration(this.map._fadeDuration):Jt.hasSymbolBuckets&&!Jt.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={},Ne=Math.max(B-tt.maxOverzooming,this._source.minzoom),$e=Math.max(B+tt.maxUnderzooming,this._source.minzoom),pt={};for(let zt of w){let Yt=this._addTile(zt);ee[zt.key]=zt,Yt.hasData()||B<this._source.maxzoom&&(pt[zt.key]=zt)}this._retainLoadedChildren(pt,B,$e,ee);for(let zt of w){let Yt=this._tiles[zt.key];if(Yt.hasData())continue;if(B+1>this._source.maxzoom){let yr=zt.children(this._source.maxzoom)[0],Ir=this.getTile(yr);if(Ir&&Ir.hasData()){ee[yr.key]=yr;continue}}else{let yr=zt.children(this._source.maxzoom);if(ee[yr[0].key]&&ee[yr[1].key]&&ee[yr[2].key]&&ee[yr[3].key])continue}let Jt=Yt.wasRequested();for(let yr=zt.overscaledZ-1;yr>=Ne;--yr){let Ir=zt.scaledTo(yr);if(le[Ir.key])break;if(le[Ir.key]=!0,Yt=this.getTile(Ir),!Yt&&Jt&&(Yt=this._addTile(Ir)),Yt){let ce=Yt.hasData();if((ce||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||Jt)&&(ee[Ir.key]=Ir),Jt=Yt.wasRequested(),ce)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 ct(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 Ne=Q?le.getCameraQueryGeometry(w):w,$e=w.map(ce=>le.pointCoordinate(ce,this.terrain)),pt=Ne.map(ce=>le.pointCoordinate(ce,this.terrain)),zt=this.getIds(),Yt=1/0,Jt=1/0,yr=-1/0,Ir=-1/0;for(let ce of pt)Yt=Math.min(Yt,ce.x),Jt=Math.min(Jt,ce.y),yr=Math.max(yr,ce.x),Ir=Math.max(Ir,ce.y);for(let ce=0;ce<zt.length;ce++){let Ae=this._tiles[zt[ce]];if(Ae.holdingForFade())continue;let qe=Ae.tileID,Ve=Math.pow(2,le.zoom-Ae.tileID.overscaledZ),ot=B*Ae.queryPadding*a.X/Ae.tileSize/Ve,Ke=[qe.getTilePoint(new a.Z(Yt,Jt)),qe.getTilePoint(new a.Z(yr,Ir))];if(Ke[0].x-ot<a.X&&Ke[0].y-ot<a.X&&Ke[1].x+ot>=0&&Ke[1].y+ot>=0){let ft=$e.map(Xt=>qe.getTilePoint(Xt)),qt=pt.map(Xt=>qe.getTilePoint(Xt));ee.push({tile:Ae,tileID:qe,queryGeometry:ft,cameraQueryGeometry:qt,scale:Ve})}}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(Mt(this._source.type)){let w=l.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 Je(oe,w){let B=Math.abs(2*oe.wrap)-+(oe.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return oe.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-oe.canonical.y||w.canonical.x-oe.canonical.x}function Mt(oe){return oe==="raster"||oe==="image"||oe==="video"}tt.maxOverzooming=10,tt.maxUnderzooming=3;class Vt{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,Ne=this._distances[le],$e=Q-Ne,pt=$e>0?(ee-Ne)/$e:0;return this.points[le].mult(1-pt).add(this.points[B].mult(pt))}}function Kt(oe,w){let B=!0;return oe==="always"||oe!=="never"&&w!=="never"||(B=!1),B}class ir{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 Ne=0;Ne<this.xCellCount*this.yCellCount;Ne++)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,Ne){this.boxCells[le].push(Ne)}_insertCircleCell(w,B,Q,ee,le,Ne){this.circleCells[le].push(Ne)}_query(w,B,Q,ee,le,Ne,$e){if(Q<0||w>this.width||ee<0||B>this.height)return[];let pt=[];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 zt=0;zt<this.boxKeys.length;zt++)pt.push({key:this.boxKeys[zt],x1:this.bboxes[4*zt],y1:this.bboxes[4*zt+1],x2:this.bboxes[4*zt+2],y2:this.bboxes[4*zt+3]});for(let zt=0;zt<this.circleKeys.length;zt++){let Yt=this.circles[3*zt],Jt=this.circles[3*zt+1],yr=this.circles[3*zt+2];pt.push({key:this.circleKeys[zt],x1:Yt-yr,y1:Jt-yr,x2:Yt+yr,y2:Jt+yr})}}else this._forEachCell(w,B,Q,ee,this._queryCell,pt,{hitTest:le,overlapMode:Ne,seenUids:{box:{},circle:{}}},$e);return pt}query(w,B,Q,ee){return this._query(w,B,Q,ee,!1,null)}hitTest(w,B,Q,ee,le,Ne){return this._query(w,B,Q,ee,!0,le,Ne).length>0}hitTestCircle(w,B,Q,ee,le){let Ne=w-Q,$e=w+Q,pt=B-Q,zt=B+Q;if($e<0||Ne>this.width||zt<0||pt>this.height)return!1;let Yt=[];return this._forEachCell(Ne,pt,$e,zt,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,Ne,$e,pt){let{seenUids:zt,hitTest:Yt,overlapMode:Jt}=$e,yr=this.boxCells[le];if(yr!==null){let ce=this.bboxes;for(let Ae of yr)if(!zt.box[Ae]){zt.box[Ae]=!0;let qe=4*Ae,Ve=this.boxKeys[Ae];if(w<=ce[qe+2]&&B<=ce[qe+3]&&Q>=ce[qe+0]&&ee>=ce[qe+1]&&(!pt||pt(Ve))&&(!Yt||!Kt(Jt,Ve.overlapMode))&&(Ne.push({key:Ve,x1:ce[qe],y1:ce[qe+1],x2:ce[qe+2],y2:ce[qe+3]}),Yt))return!0}}let Ir=this.circleCells[le];if(Ir!==null){let ce=this.circles;for(let Ae of Ir)if(!zt.circle[Ae]){zt.circle[Ae]=!0;let qe=3*Ae,Ve=this.circleKeys[Ae];if(this._circleAndRectCollide(ce[qe],ce[qe+1],ce[qe+2],w,B,Q,ee)&&(!pt||pt(Ve))&&(!Yt||!Kt(Jt,Ve.overlapMode))){let ot=ce[qe],Ke=ce[qe+1],ft=ce[qe+2];if(Ne.push({key:Ve,x1:ot-ft,y1:Ke-ft,x2:ot+ft,y2:Ke+ft}),Yt)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,le,Ne,$e,pt){let{circle:zt,seenUids:Yt,overlapMode:Jt}=$e,yr=this.boxCells[le];if(yr!==null){let ce=this.bboxes;for(let Ae of yr)if(!Yt.box[Ae]){Yt.box[Ae]=!0;let qe=4*Ae,Ve=this.boxKeys[Ae];if(this._circleAndRectCollide(zt.x,zt.y,zt.radius,ce[qe+0],ce[qe+1],ce[qe+2],ce[qe+3])&&(!pt||pt(Ve))&&!Kt(Jt,Ve.overlapMode))return Ne.push(!0),!0}}let Ir=this.circleCells[le];if(Ir!==null){let ce=this.circles;for(let Ae of Ir)if(!Yt.circle[Ae]){Yt.circle[Ae]=!0;let qe=3*Ae,Ve=this.circleKeys[Ae];if(this._circlesCollide(ce[qe],ce[qe+1],ce[qe+2],zt.x,zt.y,zt.radius)&&(!pt||pt(Ve))&&!Kt(Jt,Ve.overlapMode))return Ne.push(!0),!0}}}_forEachCell(w,B,Q,ee,le,Ne,$e,pt){let zt=this._convertToXCellCoord(w),Yt=this._convertToYCellCoord(B),Jt=this._convertToXCellCoord(Q),yr=this._convertToYCellCoord(ee);for(let Ir=zt;Ir<=Jt;Ir++)for(let ce=Yt;ce<=yr;ce++)if(le.call(this,w,B,Q,ee,this.xCellCount*ce+Ir,Ne,$e,pt))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,Ne){let $e=ee-w,pt=le-B,zt=Q+Ne;return zt*zt>$e*$e+pt*pt}_circleAndRectCollide(w,B,Q,ee,le,Ne,$e){let pt=(Ne-ee)/2,zt=Math.abs(w-(ee+pt));if(zt>pt+Q)return!1;let Yt=($e-le)/2,Jt=Math.abs(B-(le+Yt));if(Jt>Yt+Q)return!1;if(zt<=pt||Jt<=Yt)return!0;let yr=zt-pt,Ir=Jt-Yt;return yr*yr+Ir*Ir<=Q*Q}}function fr(oe,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,oe),le}function Ot(oe,w,B,Q,ee){if(w){let le=a.ae(oe);return a.K(le,le,[ee,ee,1]),B||a.ad(le,le,-Q.angle),le}return Q.glCoordMatrix}function De(oe,w,B,Q){let ee;Q?(ee=[oe,w,Q(oe,w),1],a.af(ee,ee,B)):(ee=[oe,w,0,1],vr(ee,ee,B));let le=ee[3];return{point:new a.P(ee[0]/le,ee[1]/le),signedDistanceFromCamera:le,isOccluded:!1}}function _e(oe,w){return .5+oe/w*.5}function Fe(oe,w){return oe.x>=-w[0]&&oe.x<=w[0]&&oe.y>=-w[1]&&oe.y<=w[1]}function Pe(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce){let Ae=Q?oe.textSizeData:oe.iconSizeData,qe=a.ag(Ae,B.transform.zoom),Ve=[256/B.width*2+1,256/B.height*2+1],ot=Q?oe.text.dynamicLayoutVertexArray:oe.icon.dynamicLayoutVertexArray;ot.clear();let Ke=oe.lineVertexArray,ft=Q?oe.text.placedSymbolArray:oe.icon.placedSymbolArray,qt=B.transform.width/B.transform.height,Xt=!1;for(let $t=0;$t<ft.length;$t++){let dr=ft.get($t);if(dr.hidden||dr.writingMode===a.ah.vertical&&!Xt){Lr(dr.numGlyphs,ot);continue}Xt=!1;let Mr=De(dr.anchorX,dr.anchorY,w,ce);if(!Fe(Mr.point,Ve)){Lr(dr.numGlyphs,ot);continue}let $r=_e(B.transform.cameraToCenterDistance,Mr.signedDistanceFromCamera),ii=a.ai(Ae,qe,dr),pi=Ne?ii/$r:ii*$r,Yi={getElevation:ce,labelPlaneMatrix:ee,lineVertexArray:Ke,pitchWithMap:Ne,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:zt,tileAnchorPoint:new a.P(dr.anchorX,dr.anchorY),unwrappedTileID:Yt,width:Jt,height:yr,translation:Ir},wn=ye(Yi,dr,pi,!1,$e,w,le,oe.glyphOffsetArray,ot,qt,pt);Xt=wn.useVertical,(wn.notEnoughRoom||Xt||wn.needsFlipping&&ye(Yi,dr,pi,!0,$e,w,le,oe.glyphOffsetArray,ot,qt,pt).notEnoughRoom)&&Lr(dr.numGlyphs,ot)}Q?oe.text.dynamicLayoutVertexBuffer.updateData(ot):oe.icon.dynamicLayoutVertexBuffer.updateData(ot)}function Ie(oe,w,B,Q,ee,le,Ne,$e){let pt=le.glyphStartIndex+le.numGlyphs,zt=le.lineStartIndex,Yt=le.lineStartIndex+le.lineLength,Jt=w.getoffsetX(le.glyphStartIndex),yr=w.getoffsetX(pt-1),Ir=Zt(oe*Jt,B,Q,ee,le.segment,zt,Yt,$e,Ne);if(!Ir)return null;let ce=Zt(oe*yr,B,Q,ee,le.segment,zt,Yt,$e,Ne);return ce?$e.projectionCache.anyProjectionOccluded?null:{first:Ir,last:ce}:null}function lt(oe,w,B,Q){return oe===a.ah.horizontal&&Math.abs(B.y-w.y)>Math.abs(B.x-w.x)*Q?{useVertical:!0}:(oe===a.ah.vertical?w.y<B.y:w.x>B.x)?{needsFlipping:!0}:null}function ye(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt){let Jt=B/24,yr=w.lineOffsetX*Jt,Ir=w.lineOffsetY*Jt,ce;if(w.numGlyphs>1){let Ae=w.glyphStartIndex+w.numGlyphs,qe=w.lineStartIndex,Ve=w.lineStartIndex+w.lineLength,ot=Ie(Jt,$e,yr,Ir,Q,w,Yt,oe);if(!ot)return{notEnoughRoom:!0};let Ke=De(ot.first.point.x,ot.first.point.y,Ne,oe.getElevation).point,ft=De(ot.last.point.x,ot.last.point.y,Ne,oe.getElevation).point;if(ee&&!Q){let qt=lt(w.writingMode,Ke,ft,zt);if(qt)return qt}ce=[ot.first];for(let qt=w.glyphStartIndex+1;qt<Ae-1;qt++)ce.push(Zt(Jt*$e.getoffsetX(qt),yr,Ir,Q,w.segment,qe,Ve,oe,Yt));ce.push(ot.last)}else{if(ee&&!Q){let qe=De(oe.tileAnchorPoint.x,oe.tileAnchorPoint.y,le,oe.getElevation).point,Ve=w.lineStartIndex+w.segment+1,ot=new a.P(oe.lineVertexArray.getx(Ve),oe.lineVertexArray.gety(Ve)),Ke=De(ot.x,ot.y,le,oe.getElevation),ft=Ke.signedDistanceFromCamera>0?Ke.point:function(Xt,$t,dr,Mr,$r,ii){return ue(Xt,$t,dr,1,$r,ii)}(oe.tileAnchorPoint,ot,qe,0,le,oe),qt=lt(w.writingMode,qe,ft,zt);if(qt)return qt}let Ae=Zt(Jt*$e.getoffsetX(w.glyphStartIndex),yr,Ir,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,oe,Yt);if(!Ae||oe.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ce=[Ae]}for(let Ae of ce)a.aj(pt,Ae.point,Ae.angle);return{}}function ue(oe,w,B,Q,ee,le){let Ne=oe.add(oe.sub(w)._unit()),$e=ee!==void 0?De(Ne.x,Ne.y,ee,le.getElevation).point:ht(Ne.x,Ne.y,le).point,pt=B.sub($e);return B.add(pt._mult(Q/pt.mag()))}function de(oe,w,B){let Q=w.projectionCache;if(Q.projections[oe])return Q.projections[oe];let ee=new a.P(w.lineVertexArray.getx(oe),w.lineVertexArray.gety(oe)),le=ht(ee.x,ee.y,w);if(le.signedDistanceFromCamera>0)return Q.projections[oe]=le.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||le.isOccluded,le.point;let Ne=oe-B.direction;return function($e,pt,zt,Yt,Jt){return ue($e,pt,zt,Yt,void 0,Jt)}(B.distanceFromAnchor===0?w.tileAnchorPoint:new a.P(w.lineVertexArray.getx(Ne),w.lineVertexArray.gety(Ne)),ee,B.previousVertex,B.absOffsetX-B.distanceFromAnchor+1,w)}function ht(oe,w,B){let Q=oe+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=De(Q,ee,B.labelPlaneMatrix,B.getElevation),le.isOccluded=!1),le}function Et(oe,w,B){return oe._unit()._perp()._mult(w*B)}function St(oe,w,B,Q,ee,le,Ne,$e,pt){if($e.projectionCache.offsets[oe])return $e.projectionCache.offsets[oe];let zt=B.add(w);if(oe+pt.direction<Q||oe+pt.direction>=ee)return $e.projectionCache.offsets[oe]=zt,zt;let Yt=de(oe+pt.direction,$e,pt),Jt=Et(Yt.sub(B),Ne,pt.direction),yr=B.add(Jt),Ir=Yt.add(Jt);return $e.projectionCache.offsets[oe]=a.ak(le,zt,yr,Ir)||zt,$e.projectionCache.offsets[oe]}function Zt(oe,w,B,Q,ee,le,Ne,$e,pt){let zt=Q?oe-w:oe+w,Yt=zt>0?1:-1,Jt=0;Q&&(Yt*=-1,Jt=Math.PI),Yt<0&&(Jt+=Math.PI);let yr,Ir=Yt>0?le+ee:le+ee+1;$e.projectionCache.cachedAnchorPoint?yr=$e.projectionCache.cachedAnchorPoint:(yr=ht($e.tileAnchorPoint.x,$e.tileAnchorPoint.y,$e).point,$e.projectionCache.cachedAnchorPoint=yr);let ce,Ae,qe=yr,Ve=yr,ot=0,Ke=0,ft=Math.abs(zt),qt=[],Xt;for(;ot+Ke<=ft;){if(Ir+=Yt,Ir<le||Ir>=Ne)return null;ot+=Ke,Ve=qe,Ae=ce;let Mr={absOffsetX:ft,direction:Yt,distanceFromAnchor:ot,previousVertex:Ve};if(qe=de(Ir,$e,Mr),B===0)qt.push(Ve),Xt=qe.sub(Ve);else{let $r,ii=qe.sub(Ve);$r=ii.mag()===0?Et(de(Ir+Yt,$e,Mr).sub(qe),B,Yt):Et(ii,B,Yt),Ae||(Ae=Ve.add($r)),ce=St(Ir,$r,qe,le,Ne,Ae,B,$e,Mr),qt.push(Ae),Xt=ce.sub(Ae)}Ke=Xt.mag()}let $t=Xt._mult((ft-ot)/Ke)._add(Ae||Ve),dr=Jt+Math.atan2(qe.y-Ve.y,qe.x-Ve.x);return qt.push($t),{point:$t,angle:pt?dr:0,path:qt}}let qr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Lr(oe,w){for(let B=0;B<oe;B++){let Q=w.length;w.resize(Q+4),w.float32.set(qr,3*Q)}}function vr(oe,w,B){let Q=w[0],ee=w[1];return oe[0]=B[0]*Q+B[4]*ee+B[12],oe[1]=B[1]*Q+B[5]*ee+B[13],oe[3]=B[3]*Q+B[7]*ee+B[15],oe}let Er=100;class si{constructor(w,B,Q=new ir(w.width+200,w.height+200,25),ee=new ir(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+Er,this.screenBottomBoundary=w.height+Er,this.gridRightBoundary=w.width+200,this.gridBottomBoundary=w.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt){let yr=w.anchorPointX+pt[0],Ir=w.anchorPointY+pt[1],ce=this.projectAndGetPerspectiveRatio(ee,yr,Ir,le,Yt),Ae=Q*ce.perspectiveRatio,qe;if(Ne||$e)qe=this._projectCollisionBox(w,Ae,ee,le,Ne,$e,pt,ce,Yt,Jt);else{let qt=ce.point.x+(Jt?Jt.x*Ae:0),Xt=ce.point.y+(Jt?Jt.y*Ae:0);qe={allPointsOccluded:!1,box:[qt+w.x1*Ae,Xt+w.y1*Ae,qt+w.x2*Ae,Xt+w.y2*Ae]}}let[Ve,ot,Ke,ft]=qe.box;return this.mapProjection.useSpecialProjectionForSymbols&&(Ne?qe.allPointsOccluded:this.mapProjection.isOccluded(yr,Ir,le))||ce.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(Ve,ot,Ke,ft)||B!=="always"&&this.grid.hitTest(Ve,ot,Ke,ft,B,zt)?{box:[Ve,ot,Ke,ft],placeable:!1,offscreen:!1}:{box:[Ve,ot,Ke,ft],placeable:!0,offscreen:this.isOffscreen(Ve,ot,Ke,ft)}}placeCollisionCircles(w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe){let Ve=[],ot=new a.P(B.anchorX,B.anchorY),Ke=this.getPerspectiveRatio(Ne,ot.x,ot.y,$e,qe),ft=(Jt?le/Ke:le*Ke)/a.ap,qt={getElevation:qe,labelPlaneMatrix:pt,lineVertexArray:Q,pitchWithMap:Jt,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:ot,unwrappedTileID:$e,width:this.transform.width,height:this.transform.height,translation:Ae},Xt=Ie(ft,ee,B.lineOffsetX*ft,B.lineOffsetY*ft,!1,B,!1,qt),$t=!1,dr=!1,Mr=!0;if(Xt){let $r=.5*Ir*Ke+ce,ii=new a.P(-100,-100),pi=new a.P(this.screenRightBoundary,this.screenBottomBoundary),Yi=new Vt,wn=Xt.first,Tn=Xt.last,ua=[];for(let ys=wn.path.length-1;ys>=1;ys--)ua.push(wn.path[ys]);for(let ys=1;ys<Tn.path.length;ys++)ua.push(Tn.path[ys]);let oo=2.5*$r;if(zt){let ys=this.projectPathToScreenSpace(ua,qt,zt);ua=ys.some(il=>il.signedDistanceFromCamera<=0)?[]:ys.map(il=>il.point)}let el=[];if(ua.length>0){let ys=ua[0].clone(),il=ua[0].clone();for(let $l=1;$l<ua.length;$l++)ys.x=Math.min(ys.x,ua[$l].x),ys.y=Math.min(ys.y,ua[$l].y),il.x=Math.max(il.x,ua[$l].x),il.y=Math.max(il.y,ua[$l].y);el=ys.x>=ii.x&&il.x<=pi.x&&ys.y>=ii.y&&il.y<=pi.y?[ua]:il.x<ii.x||ys.x>pi.x||il.y<ii.y||ys.y>pi.y?[]:a.al([ua],ii.x,ii.y,pi.x,pi.y)}for(let ys of el){Yi.reset(ys,.25*$r);let il=0;il=Yi.length<=.5*$r?1:Math.ceil(Yi.paddedLength/oo)+1;for(let $l=0;$l<il;$l++){let pl=$l/Math.max(il-1,1),Hl=Yi.lerp(pl),Ll=Hl.x+Er,Ql=Hl.y+Er;Ve.push(Ll,Ql,$r,0);let ku=Ll-$r,Jl=Ql-$r,Kl=Ll+$r,Hu=Ql+$r;if(Mr=Mr&&this.isOffscreen(ku,Jl,Kl,Hu),dr=dr||this.isInsideGrid(ku,Jl,Kl,Hu),w!=="always"&&this.grid.hitTestCircle(Ll,Ql,$r,w,yr)&&($t=!0,!Yt))return{circles:[],offscreen:!1,collisionDetected:$t}}}}return{circles:!Yt&&$t||!dr||Ke<this.perspectiveRatioCutoff?[]:Ve,offscreen:Mr,collisionDetected:$t}}projectPathToScreenSpace(w,B,Q){return w.map(ee=>De(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,Ne=-1/0;for(let Yt of w){let Jt=new a.P(Yt.x+Er,Yt.y+Er);Q=Math.min(Q,Jt.x),ee=Math.min(ee,Jt.y),le=Math.max(le,Jt.x),Ne=Math.max(Ne,Jt.y),B.push(Jt)}let $e=this.grid.query(Q,ee,le,Ne).concat(this.ignoredGrid.query(Q,ee,le,Ne)),pt={},zt={};for(let Yt of $e){let Jt=Yt.key;if(pt[Jt.bucketInstanceId]===void 0&&(pt[Jt.bucketInstanceId]={}),pt[Jt.bucketInstanceId][Jt.featureIndex])continue;let yr=[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,yr)&&(pt[Jt.bucketInstanceId][Jt.featureIndex]=!0,zt[Jt.bucketInstanceId]===void 0&&(zt[Jt.bucketInstanceId]=[]),zt[Jt.bucketInstanceId].push(Jt.featureIndex))}return zt}insertCollisionBox(w,B,Q,ee,le,Ne){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:le,collisionGroupID:Ne,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,le,Ne){let $e=Q?this.ignoredGrid:this.grid,pt={bucketInstanceId:ee,featureIndex:le,collisionGroupID:Ne,overlapMode:B};for(let zt=0;zt<w.length;zt+=4)$e.insertCircle(pt,w[zt],w[zt+1],w[zt+2])}projectAndGetPerspectiveRatio(w,B,Q,ee,le){let Ne;le?(Ne=[B,Q,le(B,Q),1],a.af(Ne,Ne,w)):(Ne=[B,Q,0,1],vr(Ne,Ne,w));let $e=Ne[3];return{point:new a.P((Ne[0]/$e+1)/2*this.transform.width+Er,(-Ne[1]/$e+1)/2*this.transform.height+Er),perspectiveRatio:.5+this.transform.cameraToCenterDistance/$e*.5,isOccluded:!1,signedDistanceFromCamera:$e}}getPerspectiveRatio(w,B,Q,ee,le){let Ne=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(B,Q,ee,le):De(B,Q,w,le);return .5+this.transform.cameraToCenterDistance/Ne.signedDistanceFromCamera*.5}isOffscreen(w,B,Q,ee){return Q<Er||w>=this.screenRightBoundary||ee<Er||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,Ne,$e,pt,zt,Yt){let Jt=new a.P(1,0),yr=new a.P(0,1),Ir=new a.P(w.anchorPointX+$e[0],w.anchorPointY+$e[1]);if(Ne&&!le){let Mr=this.projectAndGetPerspectiveRatio(Q,Ir.x+1,Ir.y,ee,zt).point.sub(pt.point).unit(),$r=Math.atan(Mr.y/Mr.x)+(Mr.x<0?Math.PI:0),ii=Math.sin($r),pi=Math.cos($r);Jt=new a.P(pi,ii),yr=new a.P(-ii,pi)}else if(!Ne&&le){let Mr=-this.transform.angle,$r=Math.sin(Mr),ii=Math.cos(Mr);Jt=new a.P(ii,$r),yr=new a.P(-$r,ii)}let ce=pt.point,Ae=B;if(le){ce=Ir;let Mr=this.transform.zoom-Math.floor(this.transform.zoom);Ae=Math.pow(2,-Mr),Ae*=this.mapProjection.getPitchedTextCorrection(this.transform,Ir,ee),Yt||(Ae*=a.ac(.5+pt.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}Yt&&(ce=ce.add(Jt.mult(Yt.x*Ae)).add(yr.mult(Yt.y*Ae)));let qe=w.x1*Ae,Ve=w.x2*Ae,ot=(qe+Ve)/2,Ke=w.y1*Ae,ft=w.y2*Ae,qt=(Ke+ft)/2,Xt=[{offsetX:qe,offsetY:Ke},{offsetX:ot,offsetY:Ke},{offsetX:Ve,offsetY:Ke},{offsetX:Ve,offsetY:qt},{offsetX:Ve,offsetY:ft},{offsetX:ot,offsetY:ft},{offsetX:qe,offsetY:ft},{offsetX:qe,offsetY:qt}],$t=[];for(let{offsetX:Mr,offsetY:$r}of Xt)$t.push(new a.P(ce.x+Jt.x*Mr+yr.x*$r,ce.y+Jt.y*Mr+yr.y*$r));let dr=!1;if(le){let Mr=$t.map($r=>this.projectAndGetPerspectiveRatio(Q,$r.x,$r.y,ee,zt));dr=Mr.some($r=>!$r.isOccluded),$t=Mr.map($r=>$r.point)}else dr=!0;return{box:a.ao($t),allPointsOccluded:!dr}}}function Ei(oe,w,B){return w*(a.X/(oe.tileSize*Math.pow(2,B-oe.tileID.overscaledZ)))}class Si{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 xi{constructor(w,B,Q,ee,le){this.text=new Si(w?w.text:null,B,Q,le),this.icon=new Si(w?w.icon:null,B,ee,le)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Hi{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class Jr{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class ci{constructor(w,B,Q,ee,le){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=le}}class Di{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 Lt(oe,w,B,Q,ee){let{horizontalAlign:le,verticalAlign:Ne}=a.au(oe);return new a.P(-(le-.5)*w+Q[0]*ee,-(Ne-.5)*B+Q[1]*ee)}class vt{constructor(w,B,Q,ee,le,Ne){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new si(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new Di(le),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=Ne,Ne&&(Ne.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),Ne=Q.latestFeatureIndex;if(!le||!Ne||B.id!==le.layerIds[0])return;let $e=Q.collisionBoxArray,pt=le.layers[0].layout,zt=le.layers[0].paint,Yt=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),Jt=Q.tileSize/a.X,yr=Q.tileID.toUnwrapped(),Ir=this.transform.calculatePosMatrix(yr),ce=pt.get("text-pitch-alignment")==="map",Ae=pt.get("text-rotation-alignment")==="map",qe=Ei(Q,1,this.transform.zoom),Ve=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,zt.get("text-translate"),zt.get("text-translate-anchor")),ot=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,zt.get("icon-translate"),zt.get("icon-translate-anchor")),Ke=fr(Ir,ce,Ae,this.transform,qe),ft=null;if(ce){let Xt=Ot(Ir,ce,Ae,this.transform,qe);ft=a.L([],this.transform.labelPlaneMatrix,Xt)}this.retainedQueryData[le.bucketInstanceId]=new ci(le.bucketInstanceId,Ne,le.sourceLayerIndex,le.index,Q.tileID);let qt={bucket:le,layout:pt,translationText:Ve,translationIcon:ot,posMatrix:Ir,unwrappedTileID:yr,textLabelPlaneMatrix:Ke,labelToScreenMatrix:ft,scale:Yt,textPixelRatio:Jt,holdingForFade:Q.holdingForFade(),collisionBoxArray:$e,partiallyEvaluatedTextSize:a.ag(le.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(le.sourceID)};if(ee)for(let Xt of le.sortKeyRanges){let{sortKey:$t,symbolInstanceStart:dr,symbolInstanceEnd:Mr}=Xt;w.push({sortKey:$t,symbolInstanceStart:dr,symbolInstanceEnd:Mr,parameters:qt})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:le.symbolInstances.length,parameters:qt})}attemptAnchorPlacement(w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke){let ft=a.aq[w.textAnchor],qt=[w.textOffset0,w.textOffset1],Xt=Lt(ft,Q,ee,qt,le),$t=this.collisionIndex.placeCollisionBox(B,yr,pt,zt,Yt,$e,Ne,qe,Jt.predicate,Ke,Xt);if((!ot||this.collisionIndex.placeCollisionBox(ot,yr,pt,zt,Yt,$e,Ne,Ve,Jt.predicate,Ke,Xt).placeable)&&$t.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:qt,width:Q,height:ee,anchor:ft,textBoxScale:le,prevAnchor:dr},this.markUsedJustification(ce,ft,Ir,Ae),ce.allowVerticalPlacement&&(this.markUsedOrientation(ce,Ae,Ir),this.placedOrientations[Ir.crossTileID]=Ae),{shift:Xt,placedGlyphBoxes:$t}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:le,translationText:Ne,translationIcon:$e,posMatrix:pt,unwrappedTileID:zt,textLabelPlaneMatrix:Yt,labelToScreenMatrix:Jt,textPixelRatio:yr,holdingForFade:Ir,collisionBoxArray:ce,partiallyEvaluatedTextSize:Ae,collisionGroup:qe}=w.parameters,Ve=le.get("text-optional"),ot=le.get("icon-optional"),Ke=a.ar(le,"text-overlap","text-allow-overlap"),ft=Ke==="always",qt=a.ar(le,"icon-overlap","icon-allow-overlap"),Xt=qt==="always",$t=le.get("text-rotation-alignment")==="map",dr=le.get("text-pitch-alignment")==="map",Mr=le.get("icon-text-fit")!=="none",$r=le.get("symbol-z-order")==="viewport-y",ii=ft&&(Xt||!ee.hasIconData()||ot),pi=Xt&&(ft||!ee.hasTextData()||Ve);!ee.collisionArrays&&ce&&ee.deserializeCollisionBoxes(ce);let Yi=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),wn=(Tn,ua,oo)=>{var el,ys;if(B[Tn.crossTileID])return;if(Ir)return void(this.placements[Tn.crossTileID]=new Hi(!1,!1,!1));let il=!1,$l=!1,pl=!0,Hl=null,Ll={box:null,placeable:!1,offscreen:null},Ql={box:null,placeable:!1,offscreen:null},ku=null,Jl=null,Kl=null,Hu=0,tf=0,Ku=0;ua.textFeatureIndex?Hu=ua.textFeatureIndex:Tn.useRuntimeCollisionCircles&&(Hu=Tn.featureIndex),ua.verticalTextFeatureIndex&&(tf=ua.verticalTextFeatureIndex);let Gu=ua.textBox;if(Gu){let nf=Le=>{let We=a.ah.horizontal;if(ee.allowVerticalPlacement&&!Le&&this.prevPlacement){let Ye=this.prevPlacement.placedOrientations[Tn.crossTileID];Ye&&(this.placedOrientations[Tn.crossTileID]=Ye,We=Ye,this.markUsedOrientation(ee,We,Tn))}return We},af=(Le,We)=>{if(ee.allowVerticalPlacement&&Tn.numVerticalGlyphVertices>0&&ua.verticalTextBox){for(let Ye of ee.writingModes)if(Ye===a.ah.vertical?(Ll=We(),Ql=Ll):Ll=Le(),Ll&&Ll.placeable)break}else Ll=Le()},X=Tn.textAnchorOffsetStartIndex,se=Tn.textAnchorOffsetEndIndex;if(se===X){let Le=(We,Ye)=>{let it=this.collisionIndex.placeCollisionBox(We,Ke,yr,pt,zt,dr,$t,Ne,qe.predicate,Yi);return it&&it.placeable&&(this.markUsedOrientation(ee,Ye,Tn),this.placedOrientations[Tn.crossTileID]=Ye),it};af(()=>Le(Gu,a.ah.horizontal),()=>{let We=ua.verticalTextBox;return ee.allowVerticalPlacement&&Tn.numVerticalGlyphVertices>0&&We?Le(We,a.ah.vertical):{box:null,offscreen:null}}),nf(Ll&&Ll.placeable)}else{let Le=a.aq[(ys=(el=this.prevPlacement)===null||el===void 0?void 0:el.variableOffsets[Tn.crossTileID])===null||ys===void 0?void 0:ys.anchor],We=(it,Nt,mt)=>{let er=it.x2-it.x1,_r=it.y2-it.y1,wr=Tn.textBoxScale,ni=Mr&&qt==="never"?Nt:null,Wr=null,Ci=Ke==="never"?1:2,Ji="never";Le&&Ci++;for(let ai=0;ai<Ci;ai++){for(let Ti=X;Ti<se;Ti++){let Bi=ee.textAnchorOffsets.get(Ti);if(Le&&Bi.textAnchor!==Le)continue;let en=this.attemptAnchorPlacement(Bi,it,er,_r,wr,$t,dr,yr,pt,zt,qe,Ji,Tn,ee,mt,Ne,$e,ni,Yi);if(en&&(Wr=en.placedGlyphBoxes,Wr&&Wr.placeable))return il=!0,Hl=en.shift,Wr}Le?Le=null:Ji=Ke}return Q&&!Wr&&(Wr={box:this.collisionIndex.placeCollisionBox(Gu,"always",yr,pt,zt,dr,$t,Ne,qe.predicate,Yi,new a.P(0,0)).box,offscreen:!1,placeable:!1}),Wr};af(()=>We(Gu,ua.iconBox,a.ah.horizontal),()=>{let it=ua.verticalTextBox;return ee.allowVerticalPlacement&&(!Ll||!Ll.placeable)&&Tn.numVerticalGlyphVertices>0&&it?We(it,ua.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Ll&&(il=Ll.placeable,pl=Ll.offscreen);let Ye=nf(Ll&&Ll.placeable);if(!il&&this.prevPlacement){let it=this.prevPlacement.variableOffsets[Tn.crossTileID];it&&(this.variableOffsets[Tn.crossTileID]=it,this.markUsedJustification(ee,it.anchor,Tn,Ye))}}}if(ku=Ll,il=ku&&ku.placeable,pl=ku&&ku.offscreen,Tn.useRuntimeCollisionCircles){let nf=ee.text.placedSymbolArray.get(Tn.centerJustifiedTextSymbolIndex),af=a.ai(ee.textSizeData,Ae,nf),X=le.get("text-padding");Jl=this.collisionIndex.placeCollisionCircles(Ke,nf,ee.lineVertexArray,ee.glyphOffsetArray,af,pt,zt,Yt,Jt,Q,dr,qe.predicate,Tn.collisionCircleDiameter,X,Ne,Yi),Jl.circles.length&&Jl.collisionDetected&&!Q&&a.w("Collisions detected, but collision boxes are not shown"),il=ft||Jl.circles.length>0&&!Jl.collisionDetected,pl=pl&&Jl.offscreen}if(ua.iconFeatureIndex&&(Ku=ua.iconFeatureIndex),ua.iconBox){let nf=af=>this.collisionIndex.placeCollisionBox(af,qt,yr,pt,zt,dr,$t,$e,qe.predicate,Yi,Mr&&Hl?Hl:void 0);Ql&&Ql.placeable&&ua.verticalIconBox?(Kl=nf(ua.verticalIconBox),$l=Kl.placeable):(Kl=nf(ua.iconBox),$l=Kl.placeable),pl=pl&&Kl.offscreen}let Wu=Ve||Tn.numHorizontalGlyphVertices===0&&Tn.numVerticalGlyphVertices===0,sf=ot||Tn.numIconVertices===0;Wu||sf?sf?Wu||($l=$l&&il):il=$l&&il:$l=il=$l&&il;let gf=$l&&Kl.placeable;if(il&&ku.placeable&&this.collisionIndex.insertCollisionBox(ku.box,Ke,le.get("text-ignore-placement"),ee.bucketInstanceId,Ql&&Ql.placeable&&tf?tf:Hu,qe.ID),gf&&this.collisionIndex.insertCollisionBox(Kl.box,qt,le.get("icon-ignore-placement"),ee.bucketInstanceId,Ku,qe.ID),Jl&&il&&this.collisionIndex.insertCollisionCircles(Jl.circles,Ke,le.get("text-ignore-placement"),ee.bucketInstanceId,Hu,qe.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,oo,ua,ku,Kl,Jl),Tn.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[Tn.crossTileID]=new Hi(il||ii,$l||pi,pl||ee.justReloaded),B[Tn.crossTileID]=!0};if($r){if(w.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Tn=ee.getSortedSymbolIndexes(this.transform.angle);for(let ua=Tn.length-1;ua>=0;--ua){let oo=Tn[ua];wn(ee.symbolInstances.get(oo),ee.collisionArrays[oo],oo)}}else for(let Tn=w.symbolInstanceStart;Tn<w.symbolInstanceEnd;Tn++)wn(ee.symbolInstances.get(Tn),ee.collisionArrays[Tn],Tn);if(Q&&ee.bucketInstanceId in this.collisionCircleArrays){let Tn=this.collisionCircleArrays[ee.bucketInstanceId];a.as(Tn.invProjMatrix,pt),Tn.viewportMatrix=this.collisionIndex.getViewportMatrix()}ee.justReloaded=!1}storeCollisionData(w,B,Q,ee,le,Ne){if(Q.textBox||Q.iconBox){let $e,pt;this.collisionBoxArrays.has(w)?$e=this.collisionBoxArrays.get(w):($e=new Map,this.collisionBoxArrays.set(w,$e)),$e.has(B)?pt=$e.get(B):(pt={text:null,icon:null},$e.set(B,pt)),Q.textBox&&(pt.text=ee.box),Q.iconBox&&(pt.icon=le.box)}if(Ne){let $e=this.collisionCircleArrays[w];$e===void 0&&($e=this.collisionCircleArrays[w]=new Jr);for(let pt=0;pt<Ne.circles.length;pt+=4)$e.circles.push(Ne.circles[pt+0]),$e.circles.push(Ne.circles[pt+1]),$e.circles.push(Ne.circles[pt+2]),$e.circles.push(Ne.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 Ne=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex,Q.verticalPlacedTextSymbolIndex];for(let $e of Ne)$e>=0&&(w.text.placedSymbolArray.get($e).crossTileID=le>=0&&$e!==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,Ne=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let $e of Ne)w.text.placedSymbolArray.get($e).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:{},Ne=B?B.variableOffsets:{},$e=B?B.placedOrientations:{};for(let pt in this.placements){let zt=this.placements[pt],Yt=le[pt];Yt?(this.opacities[pt]=new xi(Yt,ee,zt.text,zt.icon),Q=Q||zt.text!==Yt.text.placed||zt.icon!==Yt.icon.placed):(this.opacities[pt]=new xi(null,ee,zt.text,zt.icon,zt.skipFade),Q=Q||zt.text||zt.icon)}for(let pt in le){let zt=le[pt];if(!this.opacities[pt]){let Yt=new xi(zt,ee,!1,!1);Yt.isHidden()||(this.opacities[pt]=Yt,Q=Q||zt.text.placed||zt.icon.placed)}}for(let pt in Ne)this.variableOffsets[pt]||!this.opacities[pt]||this.opacities[pt].isHidden()||(this.variableOffsets[pt]=Ne[pt]);for(let pt in $e)this.placedOrientations[pt]||!this.opacities[pt]||this.opacities[pt].isHidden()||(this.placedOrientations[pt]=$e[pt]);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],Ne=le.layout,$e=new xi(null,0,!1,!1,!0),pt=Ne.get("text-allow-overlap"),zt=Ne.get("icon-allow-overlap"),Yt=le._unevaluatedLayout.hasValue("text-variable-anchor")||le._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Jt=Ne.get("text-rotation-alignment")==="map",yr=Ne.get("text-pitch-alignment")==="map",Ir=Ne.get("icon-text-fit")!=="none",ce=new xi(null,0,pt&&(zt||!w.hasIconData()||Ne.get("icon-optional")),zt&&(pt||!w.hasTextData()||Ne.get("text-optional")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let Ae=(Ve,ot,Ke)=>{for(let ft=0;ft<ot/4;ft++)Ve.opacityVertexArray.emplaceBack(Ke);Ve.hasVisibleVertices=Ve.hasVisibleVertices||Ke!==vi},qe=this.collisionBoxArrays.get(w.bucketInstanceId);for(let Ve=0;Ve<w.symbolInstances.length;Ve++){let ot=w.symbolInstances.get(Ve),{numHorizontalGlyphVertices:Ke,numVerticalGlyphVertices:ft,crossTileID:qt}=ot,Xt=this.opacities[qt];Q[qt]?Xt=$e:Xt||(Xt=ce,this.opacities[qt]=Xt),Q[qt]=!0;let $t=ot.numIconVertices>0,dr=this.placedOrientations[ot.crossTileID],Mr=dr===a.ah.vertical,$r=dr===a.ah.horizontal||dr===a.ah.horizontalOnly;if(Ke>0||ft>0){let pi=oi(Xt.text);Ae(w.text,Ke,Mr?vi:pi),Ae(w.text,ft,$r?vi:pi);let Yi=Xt.text.isHidden();[ot.rightJustifiedTextSymbolIndex,ot.centerJustifiedTextSymbolIndex,ot.leftJustifiedTextSymbolIndex].forEach(ua=>{ua>=0&&(w.text.placedSymbolArray.get(ua).hidden=Yi||Mr?1:0)}),ot.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(ot.verticalPlacedTextSymbolIndex).hidden=Yi||$r?1:0);let wn=this.variableOffsets[ot.crossTileID];wn&&this.markUsedJustification(w,wn.anchor,ot,dr);let Tn=this.placedOrientations[ot.crossTileID];Tn&&(this.markUsedJustification(w,"left",ot,Tn),this.markUsedOrientation(w,Tn,ot))}if($t){let pi=oi(Xt.icon),Yi=!(Ir&&ot.verticalPlacedIconSymbolIndex&&Mr);ot.placedIconSymbolIndex>=0&&(Ae(w.icon,ot.numIconVertices,Yi?pi:vi),w.icon.placedSymbolArray.get(ot.placedIconSymbolIndex).hidden=Xt.icon.isHidden()),ot.verticalPlacedIconSymbolIndex>=0&&(Ae(w.icon,ot.numVerticalIconVertices,Yi?vi:pi),w.icon.placedSymbolArray.get(ot.verticalPlacedIconSymbolIndex).hidden=Xt.icon.isHidden())}let ii=qe&&qe.has(Ve)?qe.get(Ve):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let pi=w.collisionArrays[Ve];if(pi){let Yi=new a.P(0,0);if(pi.textBox||pi.verticalTextBox){let wn=!0;if(Yt){let Tn=this.variableOffsets[qt];Tn?(Yi=Lt(Tn.anchor,Tn.width,Tn.height,Tn.textOffset,Tn.textBoxScale),Jt&&Yi._rotate(yr?this.transform.angle:-this.transform.angle)):wn=!1}if(pi.textBox||pi.verticalTextBox){let Tn;pi.textBox&&(Tn=Mr),pi.verticalTextBox&&(Tn=$r),Dt(w.textCollisionBox.collisionVertexArray,Xt.text.placed,!wn||Tn,ii.text,Yi.x,Yi.y)}}if(pi.iconBox||pi.verticalIconBox){let wn=!!(!$r&&pi.verticalIconBox),Tn;pi.iconBox&&(Tn=wn),pi.verticalIconBox&&(Tn=!wn),Dt(w.iconCollisionBox.collisionVertexArray,Xt.icon.placed,Tn,ii.icon,Ir?Yi.x:0,Ir?Yi.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 Ve=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=Ve.invProjMatrix,w.placementViewportMatrix=Ve.viewportMatrix,w.collisionCircleArray=Ve.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 Dt(oe,w,B,Q,ee,le){Q&&Q.length!==0||(Q=[0,0,0,0]);let Ne=Q[0]-Er,$e=Q[1]-Er,pt=Q[2]-Er,zt=Q[3]-Er;oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Ne,$e),oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,pt,$e),oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,pt,zt),oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Ne,zt)}let Bt=Math.pow(2,25),sr=Math.pow(2,24),br=Math.pow(2,17),zr=Math.pow(2,16),Tr=Math.pow(2,9),Rr=Math.pow(2,8),Br=Math.pow(2,1);function oi(oe){if(oe.opacity===0&&!oe.placed)return 0;if(oe.opacity===1&&oe.placed)return 4294967295;let w=oe.placed?1:0,B=Math.floor(127*oe.opacity);return B*Bt+w*sr+B*br+w*zr+B*Tr+w*Rr+B*Br+w}let vi=0;function Pi(){return{isOccluded:(oe,w,B)=>!1,getPitchedTextCorrection:(oe,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(oe,w,B,Q){throw new Error("Not implemented.")},translatePosition:(oe,w,B,Q)=>function(ee,le,Ne,$e,pt=!1){if(!Ne[0]&&!Ne[1])return[0,0];let zt=pt?$e==="map"?ee.angle:0:$e==="viewport"?-ee.angle:0;if(zt){let Yt=Math.sin(zt),Jt=Math.cos(zt);Ne=[Ne[0]*Jt-Ne[1]*Yt,Ne[0]*Yt+Ne[1]*Jt]}return[pt?Ne[0]:Ei(le,Ne[0],ee.zoom),pt?Ne[1]:Ei(le,Ne[1],ee.zoom)]}(oe,w,B,Q),getCircleRadiusCorrection:oe=>1}}class Yr{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 Ne=this._bucketParts;for(;this._currentTileIndex<w.length;)if(B.getBucketParts(Ne,ee,w[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,le())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,Ne.sort(($e,pt)=>$e.sortKey-pt.sortKey));this._currentPartIndex<Ne.length;)if(B.placeLayerBucketPart(Ne[this._currentPartIndex],this._seenCrossTileIDs,Q),this._currentPartIndex++,le())return!0;return!1}}class Ni{constructor(w,B,Q,ee,le,Ne,$e,pt){this.placement=new vt(w,Pi(),B,Ne,$e,pt),this._currentPlacementIndex=Q.length-1,this._forceFullPlacement=ee,this._showCollisionBoxes=le,this._done=!1}isDone(){return this._done}continuePlacement(w,B,Q){let ee=l.now(),le=()=>!this._forceFullPlacement&&l.now()-ee>2;for(;this._currentPlacementIndex>=0;){let Ne=B[w[this._currentPlacementIndex]],$e=this.placement.collisionIndex.transform.zoom;if(Ne.type==="symbol"&&(!Ne.minzoom||Ne.minzoom<=$e)&&(!Ne.maxzoom||Ne.maxzoom>$e)){if(this._inProgressLayer||(this._inProgressLayer=new Yr(Ne)),this._inProgressLayer.continuePlacement(Q[Ne.source],this.placement,this._showCollisionBoxes,Ne,le))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let Ur=512/a.X/2;class ti{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 Ne=B.get(le),$e=Ne.key,pt=ee.get($e);pt?pt.push(Ne):ee.set($e,[Ne])}for(let[le,Ne]of ee){let $e={positions:Ne.map(pt=>({x:Math.floor(pt.anchorX*Ur),y:Math.floor(pt.anchorY*Ur)})),crossTileIDs:Ne.map(pt=>pt.crossTileID)};if($e.positions.length>128){let pt=new a.av($e.positions.length,16,Uint16Array);for(let{x:zt,y:Yt}of $e.positions)pt.add(zt,Yt);pt.finish(),delete $e.positions,$e.index=pt}this._symbolsByKey[le]=$e}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:le}=this.tileID.canonical,{x:Ne,y:$e,z:pt}=B.canonical,zt=Ur/Math.pow(2,pt-le),Yt=($e*a.X+w.anchorY)*zt,Jt=ee*a.X*Ur;return{x:Math.floor((Ne*a.X+w.anchorX)*zt-Q*a.X*Ur),y:Math.floor(Yt-Jt)}}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 Ne=w.get(le);if(Ne.crossTileID)continue;let $e=this._symbolsByKey[Ne.key];if(!$e)continue;let pt=this.getScaledCoordinates(Ne,B);if($e.index){let zt=$e.index.range(pt.x-ee,pt.y-ee,pt.x+ee,pt.y+ee).sort();for(let Yt of zt){let Jt=$e.crossTileIDs[Yt];if(!Q[Jt]){Q[Jt]=!0,Ne.crossTileID=Jt;break}}}else if($e.positions)for(let zt=0;zt<$e.positions.length;zt++){let Yt=$e.positions[zt],Jt=$e.crossTileIDs[zt];if(Math.abs(Yt.x-pt.x)<=ee&&Math.abs(Yt.y-pt.y)<=ee&&!Q[Jt]){Q[Jt]=!0,Ne.crossTileID=Jt;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:w})=>w)}}class ki{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ji{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 Ne in ee){let $e=ee[Ne];$e.tileID=$e.tileID.unwrapTo($e.tileID.wrap+B),le[$e.tileID.key]=$e}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 Ne=this.indexes[le];if(Number(le)>w.overscaledZ)for(let $e in Ne){let pt=Ne[$e];pt.tileID.isChildOf(w)&&pt.findMatches(B.symbolInstances,w,ee)}else{let $e=Ne[w.scaledTo(Number(le)).key];$e&&$e.findMatches(B.symbolInstances,w,ee)}}for(let le=0;le<B.symbolInstances.length;le++){let Ne=B.symbolInstances.get(le);Ne.crossTileID||(Ne.crossTileID=Q.generate(),ee[Ne.crossTileID]=!0)}return this.indexes[w.overscaledZ]===void 0&&(this.indexes[w.overscaledZ]={}),this.indexes[w.overscaledZ][w.key]=new ti(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 Vi{constructor(){this.layerIndexes={},this.crossTileIDs=new ki,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(w,B,Q){let ee=this.layerIndexes[w.id];ee===void 0&&(ee=this.layerIndexes[w.id]=new ji);let le=!1,Ne={};ee.handleWrapJump(Q);for(let $e of B){let pt=$e.getBucket(w);pt&&w.id===pt.layerIds[0]&&(pt.bucketInstanceId||(pt.bucketInstanceId=++this.maxBucketInstanceId),ee.addBucket($e.tileID,pt,this.crossTileIDs)&&(le=!0),Ne[pt.bucketInstanceId]=!0)}return ee.removeStaleBuckets(Ne)&&(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 zi=(oe,w)=>a.t(oe,w&&w.filter(B=>B.identifier!=="source.canvas")),Mi=a.aw();class sn 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(ke(),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 T,this.imageManager.setEventedParent(this),this.glyphManager=new H(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new ne(256,512),this.crossTileSymbolIndex=new Vi,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()),ut().on(At,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 Ne in this._layers){let $e=this._layers[Ne];$e.source===le.id&&this._validateLayer($e)}})}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(Ne=>{this._loadStyleRequest=null,this._load(Ne.data,B,Q)}).catch(Ne=>{this._loadStyleRequest=null,Ne&&!le.signal.aborted&&this.fire(new a.j(Ne))})}loadJSON(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,l.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(Mi,{validate:!1})}_load(w,B,Q){var ee;let le=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!zi(this,a.u(le))){this._loaded=!0,this.stylesheet=le;for(let Ne in le.sources)this.addSource(Ne,le.sources[Ne],{validate:!1});le.sprite?this._loadSprite(le.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(le.glyphs),this._createLayers(),this.light=new O(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,Ne,$e,pt){return a._(this,void 0,void 0,function*(){let zt=C(le),Yt=$e>1?"@2x":"",Jt={},yr={};for(let{id:Ir,url:ce}of zt){let Ae=Ne.transformRequest(M(ce,Yt,".json"),"SpriteJSON");Jt[Ir]=a.h(Ae,pt);let qe=Ne.transformRequest(M(ce,Yt,".png"),"SpriteImage");yr[Ir]=y.getImage(qe,pt)}return yield Promise.all([...Object.values(Jt),...Object.values(yr)]),function(Ir,ce){return a._(this,void 0,void 0,function*(){let Ae={};for(let qe in Ir){Ae[qe]={};let Ve=l.getImageCanvasContext((yield ce[qe]).data),ot=(yield Ir[qe]).data;for(let Ke in ot){let{width:ft,height:qt,x:Xt,y:$t,sdf:dr,pixelRatio:Mr,stretchX:$r,stretchY:ii,content:pi,textFitWidth:Yi,textFitHeight:wn}=ot[Ke];Ae[qe][Ke]={data:null,pixelRatio:Mr,sdf:dr,stretchX:$r,stretchY:ii,content:pi,textFitWidth:Yi,textFitHeight:wn,spriteData:{width:ft,height:qt,x:Xt,y:$t,context:Ve}}}}return Ae})}(Jt,yr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(le=>{if(this._spriteRequest=null,le)for(let Ne in le){this._spritesImagesIds[Ne]=[];let $e=this._spritesImagesIds[Ne]?this._spritesImagesIds[Ne].filter(pt=>!(pt in le)):[];for(let pt of $e)this.imageManager.removeImage(pt),this._changedImages[pt]=!0;for(let pt in le[Ne]){let zt=Ne==="default"?pt:`${Ne}:${pt}`;this._spritesImagesIds[Ne].push(zt),zt in this.imageManager.images?this.imageManager.updateImage(zt,le[Ne][pt],!1):this.imageManager.addImage(zt,le[Ne][pt]),B&&(this._changedImages[zt]=!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 Ne=B?a.aB(Q[le]):Q[le];ee.push(Ne)}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 Ne in this._updatedSources){let $e=this._updatedSources[Ne];if($e==="reload")this._reloadSource(Ne);else{if($e!=="clear")throw new Error(`Invalid action ${$e}`);this._clearSource(Ne)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Ne in this._updatedPaintProps)this._layers[Ne].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)&&zi(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let le=a.aC(ee,w),Ne=this._getOperationsToPerform(le);if(Ne.unimplemented.length>0)throw new Error(`Unimplemented: ${Ne.unimplemented.join(", ")}.`);if(Ne.operations.length===0)return!1;for(let $e of Ne.operations)$e();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 tt(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(zi(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 Ne=B?this._order.indexOf(B):this._order.length;if(B&&Ne===-1)this.fire(new a.j(new Error(`Cannot add layer "${ee}" before non-existing layer "${B}".`)));else{if(this._order.splice(Ne,0,ee),this._layerOrderChanged=!0,this._layers[ee]=le,this._removedLayers[ee]&&le.source&&le.type!=="custom"){let $e=this._removedLayers[ee];delete this._removedLayers[ee],$e.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 Ne=le.getSource().type;Ne==="geojson"&&ee?this.fire(new a.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Ne!=="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,Ne=le==="vector"?w.sourceLayer:void 0;le!=="vector"||Ne?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(Ne,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=Ne=>this._layers[Ne].type==="fill-extrusion",Q={},ee=[];for(let Ne=this._order.length-1;Ne>=0;Ne--){let $e=this._order[Ne];if(B($e)){Q[$e]=Ne;for(let pt of w){let zt=pt[$e];if(zt)for(let Yt of zt)ee.push(Yt)}}}ee.sort((Ne,$e)=>$e.intersectionZ-Ne.intersectionZ);let le=[];for(let Ne=this._order.length-1;Ne>=0;Ne--){let $e=this._order[Ne];if(B($e))for(let pt=ee.length-1;pt>=0;pt--){let zt=ee[pt].feature;if(Q[zt.layer.id]<Ne)break;le.push(zt),ee.pop()}else for(let pt of w){let zt=pt[$e];if(zt)for(let Yt of zt)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 $e of B.layers){let pt=this._layers[$e];if(!pt)return this.fire(new a.j(new Error(`The layer '${$e}' does not exist in the map's style and cannot be queried for features.`))),[];ee[pt.source]=!0}}let le=[];B.availableImages=this._availableImages;let Ne=this._serializedAllLayers();for(let $e in this.sourceCaches)B.layers&&!ee[$e]||le.push(Re(this.sourceCaches[$e],this._layers,Ne,w,B,Q));return this.placement&&le.push(function($e,pt,zt,Yt,Jt,yr,Ir){let ce={},Ae=yr.queryRenderedSymbols(Yt),qe=[];for(let Ve of Object.keys(Ae).map(Number))qe.push(Ir[Ve]);qe.sort(me);for(let Ve of qe){let ot=Ve.featureIndex.lookupSymbolFeatures(Ae[Ve.bucketInstanceId],pt,Ve.bucketIndex,Ve.sourceLayerIndex,Jt.filter,Jt.layers,Jt.availableImages,$e);for(let Ke in ot){let ft=ce[Ke]=ce[Ke]||[],qt=ot[Ke];qt.sort((Xt,$t)=>{let dr=Ve.featureSortOrder;if(dr){let Mr=dr.indexOf(Xt.featureIndex);return dr.indexOf($t.featureIndex)-Mr}return $t.featureIndex-Xt.featureIndex});for(let Xt of qt)ft.push(Xt)}}for(let Ve in ce)ce[Ve].forEach(ot=>{let Ke=ot.feature,ft=zt[$e[Ve].source].getFeatureState(Ke.layer["source-layer"],Ke.id);Ke.source=Ke.layer.source,Ke.layer["source-layer"]&&(Ke.sourceLayer=Ke.layer["source-layer"]),Ke.state=ft});return ce}(this._layers,Ne,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 Ne=ee.getRenderableIds().map(zt=>ee.getTileByID(zt)),$e=[],pt={};for(let zt=0;zt<Ne.length;zt++){let Yt=Ne[zt],Jt=Yt.tileID.canonical.key;pt[Jt]||(pt[Jt]=!0,Yt.querySourceFeatures($e,le))}return $e}(Q,B):[]}getLight(){return this.light.getLight()}setLight(w,B={}){this._checkLoaded();let Q=this.light.getLight(),ee=!1;for(let Ne in w)if(!a.aE(w[Ne],Q[Ne])){ee=!0;break}if(!ee)return;let le={now:l.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 Ne in w)if(!a.aE(w[Ne],Q[Ne])){ee=!0;break}if(!ee)return;let le={now:l.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)&&zi(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),ut().off(At,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 Ne=!1,$e=!1,pt={};for(let zt of this._order){let Yt=this._layers[zt];if(Yt.type!=="symbol")continue;if(!pt[Yt.source]){let yr=this.sourceCaches[Yt.source];pt[Yt.source]=yr.getRenderableIds(!0).map(Ir=>yr.getTileByID(Ir)).sort((Ir,ce)=>ce.tileID.overscaledZ-Ir.tileID.overscaledZ||(Ir.tileID.isLessThan(ce.tileID)?-1:1))}let Jt=this.crossTileSymbolIndex.addLayer(Yt,pt[Yt.source],w.center.lng);Ne=Ne||Jt}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((le=le||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(l.now(),w.zoom))&&(this.pauseablePlacement=new Ni(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,pt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(l.now()),$e=!0),Ne&&this.pauseablePlacement.placement.setStale()),$e||Ne)for(let zt of this._order){let Yt=this._layers[zt];Yt.type==="symbol"&&this.placement.updateLayerOpacities(Yt,pt[Yt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(l.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}],Ne=[...C(this.stylesheet.sprite),...le];this._validate(a.u.sprite,"sprite",Ne,null,Q)||(this.stylesheet.sprite=Ne,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 fi=a.Y([{name:"a_pos",type:"Int16",components:2}]);let Or={prelude:st(`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
`,`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
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
);}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;}
#ifdef TERRAIN3D
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;
#endif
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) {
#ifdef TERRAIN3D
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));
#else
return 1.0;
#endif
}float calculate_visibility(vec4 pos) {
#ifdef TERRAIN3D
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;
#else
return 1.0;
#endif
}float ele(vec2 pos) {
#ifdef TERRAIN3D
vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
#else
return 0.0;
#endif
}float get_elevation(vec2 pos) {
#ifdef TERRAIN3D
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;
#else
return 0.0;
#endif
}`),background:st(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:st(`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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"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:st(`varying vec3 v_data;varying float v_visibility;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
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:st("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:st(`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
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:st(`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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,"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:st("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:st("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:st("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:st(`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:st(`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:st(`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
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:st(`#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
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:st(`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
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:st(`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;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
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;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
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
? a_pos
: 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:st(`#ifdef GL_ES
precision highp float;
#endif
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"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:st(`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;
#define PI 3.141592653589793
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"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:st(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
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;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
v_width2=vec2(outset,inset);}`),lineGradient:st(`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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
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;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
v_width2=vec2(outset,inset);}`),linePattern:st(`#ifdef GL_ES
precision highp float;
#endif
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;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
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;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:st(`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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
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;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
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:st(`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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"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:st(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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);}
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
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:st(`#define SDF_PX 8.0
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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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);}
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
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:st(`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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);}
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
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:st("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:st("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:st("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:st("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 st(oe,w){let B=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Q=w.match(/attribute ([\w]+) ([\w]+)/g),ee=oe.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),le=w.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ne=le?le.concat(ee):ee,$e={};return{fragmentSource:oe=oe.replace(B,(pt,zt,Yt,Jt,yr)=>($e[yr]=!0,zt==="define"?`
#ifndef HAS_UNIFORM_u_${yr}
varying ${Yt} ${Jt} ${yr};
#else
uniform ${Yt} ${Jt} u_${yr};
#endif
`:`
#ifdef HAS_UNIFORM_u_${yr}
    ${Yt} ${Jt} ${yr} = u_${yr};
#endif
`)),vertexSource:w=w.replace(B,(pt,zt,Yt,Jt,yr)=>{let Ir=Jt==="float"?"vec2":"vec4",ce=yr.match(/color/)?"color":Ir;return $e[yr]?zt==="define"?`
#ifndef HAS_UNIFORM_u_${yr}
uniform lowp float u_${yr}_t;
attribute ${Yt} ${Ir} a_${yr};
varying ${Yt} ${Jt} ${yr};
#else
uniform ${Yt} ${Jt} u_${yr};
#endif
`:ce==="vec4"?`
#ifndef HAS_UNIFORM_u_${yr}
    ${yr} = a_${yr};
#else
    ${Yt} ${Jt} ${yr} = u_${yr};
#endif
`:`
#ifndef HAS_UNIFORM_u_${yr}
    ${yr} = unpack_mix_${ce}(a_${yr}, u_${yr}_t);
#else
    ${Yt} ${Jt} ${yr} = u_${yr};
#endif
`:zt==="define"?`
#ifndef HAS_UNIFORM_u_${yr}
uniform lowp float u_${yr}_t;
attribute ${Yt} ${Ir} a_${yr};
#else
uniform ${Yt} ${Jt} u_${yr};
#endif
`:ce==="vec4"?`
#ifndef HAS_UNIFORM_u_${yr}
    ${Yt} ${Jt} ${yr} = a_${yr};
#else
    ${Yt} ${Jt} ${yr} = u_${yr};
#endif
`:`
#ifndef HAS_UNIFORM_u_${yr}
    ${Yt} ${Jt} ${yr} = unpack_mix_${ce}(a_${yr}, u_${yr}_t);
#else
    ${Yt} ${Jt} ${yr} = u_${yr};
#endif
`}),staticAttributes:Q,staticUniforms:Ne}}class Wt{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,Ne,$e,pt,zt){this.context=w;let Yt=this.boundPaintVertexBuffers.length!==ee.length;for(let Jt=0;!Yt&&Jt<ee.length;Jt++)this.boundPaintVertexBuffers[Jt]!==ee[Jt]&&(Yt=!0);!this.vao||this.boundProgram!==B||this.boundLayoutVertexBuffer!==Q||Yt||this.boundIndexBuffer!==le||this.boundVertexOffset!==Ne||this.boundDynamicVertexBuffer!==$e||this.boundDynamicVertexBuffer2!==pt||this.boundDynamicVertexBuffer3!==zt?this.freshBind(B,Q,ee,le,Ne,$e,pt,zt):(w.bindVertexArray.set(this.vao),$e&&$e.bind(),le&&le.dynamicDraw&&le.bind(),pt&&pt.bind(),zt&&zt.bind())}freshBind(w,B,Q,ee,le,Ne,$e,pt){let zt=w.numAttributes,Yt=this.context,Jt=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=Ne,this.boundDynamicVertexBuffer2=$e,this.boundDynamicVertexBuffer3=pt,B.enableAttributes(Jt,w);for(let yr of Q)yr.enableAttributes(Jt,w);Ne&&Ne.enableAttributes(Jt,w),$e&&$e.enableAttributes(Jt,w),pt&&pt.enableAttributes(Jt,w),B.bind(),B.setVertexAttribPointers(Jt,w,le);for(let yr of Q)yr.bind(),yr.setVertexAttribPointers(Jt,w,le);Ne&&(Ne.bind(),Ne.setVertexAttribPointers(Jt,w,le)),ee&&ee.bind(),$e&&($e.bind(),$e.setVertexAttribPointers(Jt,w,le)),pt&&(pt.bind(),pt.setVertexAttribPointers(Jt,w,le)),Yt.currentNumAttributes=zt}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let tr=(oe,w,B,Q,ee)=>({u_matrix:oe,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 or(oe){let w=[];for(let B=0;B<oe.length;B++){if(oe[B]===null)continue;let Q=oe[B].split(" ");w.push(Q.pop())}return w}class Nr{constructor(w,B,Q,ee,le,Ne){let $e=w.gl;this.program=$e.createProgram();let pt=or(B.staticAttributes),zt=Q?Q.getBinderAttributes():[],Yt=pt.concat(zt),Jt=Or.prelude.staticUniforms?or(Or.prelude.staticUniforms):[],yr=B.staticUniforms?or(B.staticUniforms):[],Ir=Q?Q.getBinderUniforms():[],ce=Jt.concat(yr).concat(Ir),Ae=[];for(let Xt of ce)Ae.indexOf(Xt)<0&&Ae.push(Xt);let qe=Q?Q.defines():[];le&&qe.push("#define OVERDRAW_INSPECTOR;"),Ne&&qe.push("#define TERRAIN3D;");let Ve=qe.concat(Or.prelude.fragmentSource,B.fragmentSource).join(`
`),ot=qe.concat(Or.prelude.vertexSource,B.vertexSource).join(`
`),Ke=$e.createShader($e.FRAGMENT_SHADER);if($e.isContextLost())return void(this.failedToCreate=!0);if($e.shaderSource(Ke,Ve),$e.compileShader(Ke),!$e.getShaderParameter(Ke,$e.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${$e.getShaderInfoLog(Ke)}`);$e.attachShader(this.program,Ke);let ft=$e.createShader($e.VERTEX_SHADER);if($e.isContextLost())return void(this.failedToCreate=!0);if($e.shaderSource(ft,ot),$e.compileShader(ft),!$e.getShaderParameter(ft,$e.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${$e.getShaderInfoLog(ft)}`);$e.attachShader(this.program,ft),this.attributes={};let qt={};this.numAttributes=Yt.length;for(let Xt=0;Xt<this.numAttributes;Xt++)Yt[Xt]&&($e.bindAttribLocation(this.program,Xt,Yt[Xt]),this.attributes[Yt[Xt]]=Xt);if($e.linkProgram(this.program),!$e.getProgramParameter(this.program,$e.LINK_STATUS))throw new Error(`Program failed to link: ${$e.getProgramInfoLog(this.program)}`);$e.deleteShader(ft),$e.deleteShader(Ke);for(let Xt=0;Xt<Ae.length;Xt++){let $t=Ae[Xt];if($t&&!qt[$t]){let dr=$e.getUniformLocation(this.program,$t);dr&&(qt[$t]=dr)}}this.fixedUniforms=ee(w,qt),this.terrainUniforms=((Xt,$t)=>({u_depth:new a.aH(Xt,$t.u_depth),u_terrain:new a.aH(Xt,$t.u_terrain),u_terrain_dim:new a.aI(Xt,$t.u_terrain_dim),u_terrain_matrix:new a.aJ(Xt,$t.u_terrain_matrix),u_terrain_unpack:new a.aK(Xt,$t.u_terrain_unpack),u_terrain_exaggeration:new a.aI(Xt,$t.u_terrain_exaggeration)}))(w,qt),this.binderUniforms=Q?Q.getUniforms(w,qt):[]}draw(w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot){let Ke=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(le),w.setCullFace(Ne),pt){w.activeTexture.set(Ke.TEXTURE2),Ke.bindTexture(Ke.TEXTURE_2D,pt.depthTexture),w.activeTexture.set(Ke.TEXTURE3),Ke.bindTexture(Ke.TEXTURE_2D,pt.texture);for(let qt in this.terrainUniforms)this.terrainUniforms[qt].set(pt[qt])}for(let qt in this.fixedUniforms)this.fixedUniforms[qt].set($e[qt]);Ae&&Ae.setUniforms(w,this.binderUniforms,Ir,{zoom:ce});let ft=0;switch(B){case Ke.LINES:ft=2;break;case Ke.TRIANGLES:ft=3;break;case Ke.LINE_STRIP:ft=1}for(let qt of yr.get()){let Xt=qt.vaos||(qt.vaos={});(Xt[zt]||(Xt[zt]=new Wt)).bind(w,this,Yt,Ae?Ae.getPaintVertexBuffers():[],Jt,qt.vertexOffset,qe,Ve,ot),Ke.drawElements(B,qt.primitiveLength*ft,Ke.UNSIGNED_SHORT,qt.primitiveOffset*ft*2)}}}function hi(oe,w,B){let Q=1/Ei(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),le=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,Ne=le*(B.tileID.canonical.x+B.tileID.wrap*ee),$e=le*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,oe.fromScale,oe.toScale],u_fade:oe.t,u_pixel_coord_upper:[Ne>>16,$e>>16],u_pixel_coord_lower:[65535&Ne,65535&$e]}}let Gi=(oe,w,B,Q)=>{let ee=w.style.light,le=ee.properties.get("position"),Ne=[le.x,le.y,le.z],$e=function(){var zt=new a.A(9);return a.A!=Float32Array&&(zt[1]=0,zt[2]=0,zt[3]=0,zt[5]=0,zt[6]=0,zt[7]=0),zt[0]=1,zt[4]=1,zt[8]=1,zt}();ee.properties.get("anchor")==="viewport"&&function(zt,Yt){var Jt=Math.sin(Yt),yr=Math.cos(Yt);zt[0]=yr,zt[1]=Jt,zt[2]=0,zt[3]=-Jt,zt[4]=yr,zt[5]=0,zt[6]=0,zt[7]=0,zt[8]=1}($e,-w.transform.angle),function(zt,Yt,Jt){var yr=Yt[0],Ir=Yt[1],ce=Yt[2];zt[0]=yr*Jt[0]+Ir*Jt[3]+ce*Jt[6],zt[1]=yr*Jt[1]+Ir*Jt[4]+ce*Jt[7],zt[2]=yr*Jt[2]+Ir*Jt[5]+ce*Jt[8]}(Ne,Ne,$e);let pt=ee.properties.get("color");return{u_matrix:oe,u_lightpos:Ne,u_lightintensity:ee.properties.get("intensity"),u_lightcolor:[pt.r,pt.g,pt.b],u_vertical_gradient:+B,u_opacity:Q}},Qr=(oe,w,B,Q,ee,le,Ne)=>a.e(Gi(oe,w,B,Q),hi(le,w,Ne),{u_height_factor:-Math.pow(2,ee.overscaledZ)/Ne.tileSize/8}),Ui=oe=>({u_matrix:oe}),zn=(oe,w,B,Q)=>a.e(Ui(oe),hi(B,w,Q)),fn=(oe,w)=>({u_matrix:oe,u_world:w}),xn=(oe,w,B,Q,ee)=>a.e(zn(oe,w,B,Q),{u_world:ee}),_a=(oe,w,B,Q)=>{let ee=oe.transform,le,Ne;if(Q.paint.get("circle-pitch-alignment")==="map"){let $e=Ei(B,1,ee.zoom);le=!0,Ne=[$e,$e]}else le=!1,Ne=ee.pixelsToGLUnits;return{u_camera_to_center_distance:ee.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get("circle-pitch-scale")==="map"),u_matrix:oe.translatePosMatrix(w.posMatrix,B,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+le,u_device_pixel_ratio:oe.pixelRatio,u_extrude_scale:Ne}},Wn=(oe,w,B)=>({u_matrix:oe,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),Fn=(oe,w,B=1)=>({u_matrix:oe,u_color:w,u_overlay:0,u_overlay_scale:B}),ia=oe=>({u_matrix:oe}),za=(oe,w,B,Q)=>({u_matrix:oe,u_extrude_scale:Ei(w,1,B),u_intensity:Q}),Hr=(oe,w,B,Q)=>{let ee=a.H();a.aP(ee,0,oe.width,oe.height,0,0,1);let le=oe.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 na(oe,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 go=(oe,w,B,Q)=>{let ee=oe.transform;return{u_matrix:Ba(oe,w,B,Q),u_ratio:1/Ei(w,1,ee.zoom),u_device_pixel_ratio:oe.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},Dn=(oe,w,B,Q,ee)=>a.e(go(oe,w,B,ee),{u_image:0,u_image_height:Q}),un=(oe,w,B,Q,ee)=>{let le=oe.transform,Ne=Wo(w,le);return{u_matrix:Ba(oe,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/Ei(w,1,le.zoom),u_device_pixel_ratio:oe.pixelRatio,u_image:0,u_scale:[Ne,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/le.pixelsToGLUnits[0],1/le.pixelsToGLUnits[1]]}},Zn=(oe,w,B,Q,ee,le)=>{let Ne=oe.lineAtlas,$e=Wo(w,oe.transform),pt=B.layout.get("line-cap")==="round",zt=Ne.getDash(Q.from,pt),Yt=Ne.getDash(Q.to,pt),Jt=zt.width*ee.fromScale,yr=Yt.width*ee.toScale;return a.e(go(oe,w,B,le),{u_patternscale_a:[$e/Jt,-zt.height/2],u_patternscale_b:[$e/yr,-Yt.height/2],u_sdfgamma:Ne.width/(256*Math.min(Jt,yr)*oe.pixelRatio)/2,u_image:0,u_tex_y_a:zt.y,u_tex_y_b:Yt.y,u_mix:ee.t})};function Wo(oe,w){return 1/Ei(oe,1,w.tileZoom)}function Ba(oe,w,B,Q){return oe.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}let Bo=(oe,w,B,Q,ee)=>{return{u_matrix:oe,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:(Ne=ee.paint.get("raster-saturation"),Ne>0?1-1/(1.001-Ne):-Ne),u_contrast_factor:(le=ee.paint.get("raster-contrast"),le>0?1/(1-le):1+le),u_spin_weights:Ea(ee.paint.get("raster-hue-rotate"))};var le,Ne};function Ea(oe){oe*=Math.PI/180;let w=Math.sin(oe),B=Math.cos(oe);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let Ha=(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir)=>{let ce=Ne.transform;return{u_is_size_zoom_constant:+(oe==="constant"||oe==="source"),u_is_size_feature_constant:+(oe==="constant"||oe==="camera"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:ce.cameraToCenterDistance,u_pitch:ce.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:ce.width/ce.height,u_fade_change:Ne.options.fadeDuration?Ne.symbolFadeChange:1,u_matrix:$e,u_label_plane_matrix:pt,u_coord_matrix:zt,u_is_text:+Jt,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:le,u_texsize:yr,u_texture:0,u_translation:Yt,u_pitched_scale:Ir}},tn=(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce)=>{let Ae=Ne.transform;return a.e(Ha(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,ce),{u_gamma_scale:Q?Math.cos(Ae._pitch)*Ae.cameraToCenterDistance:1,u_device_pixel_ratio:Ne.pixelRatio,u_is_halo:+Ir})},Cn=(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir)=>a.e(tn(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,!0,Jt,!0,Ir),{u_texsize_icon:yr,u_texture_icon:1}),Xn=(oe,w,B)=>({u_matrix:oe,u_opacity:w,u_color:B}),ts=(oe,w,B,Q,ee,le)=>a.e(function(Ne,$e,pt,zt){let Yt=pt.imageManager.getPattern(Ne.from.toString()),Jt=pt.imageManager.getPattern(Ne.to.toString()),{width:yr,height:Ir}=pt.imageManager.getPixelSize(),ce=Math.pow(2,zt.tileID.overscaledZ),Ae=zt.tileSize*Math.pow(2,pt.transform.tileZoom)/ce,qe=Ae*(zt.tileID.canonical.x+zt.tileID.wrap*ce),Ve=Ae*zt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Yt.tl,u_pattern_br_a:Yt.br,u_pattern_tl_b:Jt.tl,u_pattern_br_b:Jt.br,u_texsize:[yr,Ir],u_mix:$e.t,u_pattern_size_a:Yt.displaySize,u_pattern_size_b:Jt.displaySize,u_scale_a:$e.fromScale,u_scale_b:$e.toScale,u_tile_units_to_pixels:1/Ei(zt,1,pt.transform.tileZoom),u_pixel_coord_upper:[qe>>16,Ve>>16],u_pixel_coord_lower:[65535&qe,65535&Ve]}}(Q,le,B,ee),{u_matrix:oe,u_opacity:w}),Ja={fillExtrusion:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_lightpos:new a.aN(oe,w.u_lightpos),u_lightintensity:new a.aI(oe,w.u_lightintensity),u_lightcolor:new a.aN(oe,w.u_lightcolor),u_vertical_gradient:new a.aI(oe,w.u_vertical_gradient),u_opacity:new a.aI(oe,w.u_opacity)}),fillExtrusionPattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_lightpos:new a.aN(oe,w.u_lightpos),u_lightintensity:new a.aI(oe,w.u_lightintensity),u_lightcolor:new a.aN(oe,w.u_lightcolor),u_vertical_gradient:new a.aI(oe,w.u_vertical_gradient),u_height_factor:new a.aI(oe,w.u_height_factor),u_image:new a.aH(oe,w.u_image),u_texsize:new a.aO(oe,w.u_texsize),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade),u_opacity:new a.aI(oe,w.u_opacity)}),fill:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix)}),fillPattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_image:new a.aH(oe,w.u_image),u_texsize:new a.aO(oe,w.u_texsize),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade)}),fillOutline:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_world:new a.aO(oe,w.u_world)}),fillOutlinePattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_world:new a.aO(oe,w.u_world),u_image:new a.aH(oe,w.u_image),u_texsize:new a.aO(oe,w.u_texsize),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade)}),circle:(oe,w)=>({u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(oe,w.u_scale_with_map),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_extrude_scale:new a.aO(oe,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_matrix:new a.aJ(oe,w.u_matrix)}),collisionBox:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_pixel_extrude_scale:new a.aO(oe,w.u_pixel_extrude_scale)}),collisionCircle:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_inv_matrix:new a.aJ(oe,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_viewport_size:new a.aO(oe,w.u_viewport_size)}),debug:(oe,w)=>({u_color:new a.aL(oe,w.u_color),u_matrix:new a.aJ(oe,w.u_matrix),u_overlay:new a.aH(oe,w.u_overlay),u_overlay_scale:new a.aI(oe,w.u_overlay_scale)}),clippingMask:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix)}),heatmap:(oe,w)=>({u_extrude_scale:new a.aI(oe,w.u_extrude_scale),u_intensity:new a.aI(oe,w.u_intensity),u_matrix:new a.aJ(oe,w.u_matrix)}),heatmapTexture:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_world:new a.aO(oe,w.u_world),u_image:new a.aH(oe,w.u_image),u_color_ramp:new a.aH(oe,w.u_color_ramp),u_opacity:new a.aI(oe,w.u_opacity)}),hillshade:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_image:new a.aH(oe,w.u_image),u_latrange:new a.aO(oe,w.u_latrange),u_light:new a.aO(oe,w.u_light),u_shadow:new a.aL(oe,w.u_shadow),u_highlight:new a.aL(oe,w.u_highlight),u_accent:new a.aL(oe,w.u_accent)}),hillshadePrepare:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_image:new a.aH(oe,w.u_image),u_dimension:new a.aO(oe,w.u_dimension),u_zoom:new a.aI(oe,w.u_zoom),u_unpack:new a.aK(oe,w.u_unpack)}),line:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels)}),lineGradient:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels),u_image:new a.aH(oe,w.u_image),u_image_height:new a.aI(oe,w.u_image_height)}),linePattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_texsize:new a.aO(oe,w.u_texsize),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_image:new a.aH(oe,w.u_image),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade)}),lineSDF:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels),u_patternscale_a:new a.aO(oe,w.u_patternscale_a),u_patternscale_b:new a.aO(oe,w.u_patternscale_b),u_sdfgamma:new a.aI(oe,w.u_sdfgamma),u_image:new a.aH(oe,w.u_image),u_tex_y_a:new a.aI(oe,w.u_tex_y_a),u_tex_y_b:new a.aI(oe,w.u_tex_y_b),u_mix:new a.aI(oe,w.u_mix)}),raster:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_tl_parent:new a.aO(oe,w.u_tl_parent),u_scale_parent:new a.aI(oe,w.u_scale_parent),u_buffer_scale:new a.aI(oe,w.u_buffer_scale),u_fade_t:new a.aI(oe,w.u_fade_t),u_opacity:new a.aI(oe,w.u_opacity),u_image0:new a.aH(oe,w.u_image0),u_image1:new a.aH(oe,w.u_image1),u_brightness_low:new a.aI(oe,w.u_brightness_low),u_brightness_high:new a.aI(oe,w.u_brightness_high),u_saturation_factor:new a.aI(oe,w.u_saturation_factor),u_contrast_factor:new a.aI(oe,w.u_contrast_factor),u_spin_weights:new a.aN(oe,w.u_spin_weights)}),symbolIcon:(oe,w)=>({u_is_size_zoom_constant:new a.aH(oe,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(oe,w.u_is_size_feature_constant),u_size_t:new a.aI(oe,w.u_size_t),u_size:new a.aI(oe,w.u_size),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_pitch:new a.aI(oe,w.u_pitch),u_rotate_symbol:new a.aH(oe,w.u_rotate_symbol),u_aspect_ratio:new a.aI(oe,w.u_aspect_ratio),u_fade_change:new a.aI(oe,w.u_fade_change),u_matrix:new a.aJ(oe,w.u_matrix),u_label_plane_matrix:new a.aJ(oe,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(oe,w.u_coord_matrix),u_is_text:new a.aH(oe,w.u_is_text),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_is_along_line:new a.aH(oe,w.u_is_along_line),u_is_variable_anchor:new a.aH(oe,w.u_is_variable_anchor),u_texsize:new a.aO(oe,w.u_texsize),u_texture:new a.aH(oe,w.u_texture),u_translation:new a.aO(oe,w.u_translation),u_pitched_scale:new a.aI(oe,w.u_pitched_scale)}),symbolSDF:(oe,w)=>({u_is_size_zoom_constant:new a.aH(oe,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(oe,w.u_is_size_feature_constant),u_size_t:new a.aI(oe,w.u_size_t),u_size:new a.aI(oe,w.u_size),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_pitch:new a.aI(oe,w.u_pitch),u_rotate_symbol:new a.aH(oe,w.u_rotate_symbol),u_aspect_ratio:new a.aI(oe,w.u_aspect_ratio),u_fade_change:new a.aI(oe,w.u_fade_change),u_matrix:new a.aJ(oe,w.u_matrix),u_label_plane_matrix:new a.aJ(oe,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(oe,w.u_coord_matrix),u_is_text:new a.aH(oe,w.u_is_text),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_is_along_line:new a.aH(oe,w.u_is_along_line),u_is_variable_anchor:new a.aH(oe,w.u_is_variable_anchor),u_texsize:new a.aO(oe,w.u_texsize),u_texture:new a.aH(oe,w.u_texture),u_gamma_scale:new a.aI(oe,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_is_halo:new a.aH(oe,w.u_is_halo),u_translation:new a.aO(oe,w.u_translation),u_pitched_scale:new a.aI(oe,w.u_pitched_scale)}),symbolTextAndIcon:(oe,w)=>({u_is_size_zoom_constant:new a.aH(oe,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(oe,w.u_is_size_feature_constant),u_size_t:new a.aI(oe,w.u_size_t),u_size:new a.aI(oe,w.u_size),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_pitch:new a.aI(oe,w.u_pitch),u_rotate_symbol:new a.aH(oe,w.u_rotate_symbol),u_aspect_ratio:new a.aI(oe,w.u_aspect_ratio),u_fade_change:new a.aI(oe,w.u_fade_change),u_matrix:new a.aJ(oe,w.u_matrix),u_label_plane_matrix:new a.aJ(oe,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(oe,w.u_coord_matrix),u_is_text:new a.aH(oe,w.u_is_text),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_is_along_line:new a.aH(oe,w.u_is_along_line),u_is_variable_anchor:new a.aH(oe,w.u_is_variable_anchor),u_texsize:new a.aO(oe,w.u_texsize),u_texsize_icon:new a.aO(oe,w.u_texsize_icon),u_texture:new a.aH(oe,w.u_texture),u_texture_icon:new a.aH(oe,w.u_texture_icon),u_gamma_scale:new a.aI(oe,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_is_halo:new a.aH(oe,w.u_is_halo),u_translation:new a.aO(oe,w.u_translation),u_pitched_scale:new a.aI(oe,w.u_pitched_scale)}),background:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_opacity:new a.aI(oe,w.u_opacity),u_color:new a.aL(oe,w.u_color)}),backgroundPattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_opacity:new a.aI(oe,w.u_opacity),u_image:new a.aH(oe,w.u_image),u_pattern_tl_a:new a.aO(oe,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(oe,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(oe,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(oe,w.u_pattern_br_b),u_texsize:new a.aO(oe,w.u_texsize),u_mix:new a.aI(oe,w.u_mix),u_pattern_size_a:new a.aO(oe,w.u_pattern_size_a),u_pattern_size_b:new a.aO(oe,w.u_pattern_size_b),u_scale_a:new a.aI(oe,w.u_scale_a),u_scale_b:new a.aI(oe,w.u_scale_b),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(oe,w.u_tile_units_to_pixels)}),terrain:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_texture:new a.aH(oe,w.u_texture),u_ele_delta:new a.aI(oe,w.u_ele_delta),u_fog_matrix:new a.aJ(oe,w.u_fog_matrix),u_fog_color:new a.aL(oe,w.u_fog_color),u_fog_ground_blend:new a.aI(oe,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(oe,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(oe,w.u_horizon_color),u_horizon_fog_blend:new a.aI(oe,w.u_horizon_fog_blend)}),terrainDepth:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ele_delta:new a.aI(oe,w.u_ele_delta)}),terrainCoords:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_texture:new a.aH(oe,w.u_texture),u_terrain_coords_id:new a.aI(oe,w.u_terrain_coords_id),u_ele_delta:new a.aI(oe,w.u_ele_delta)}),sky:(oe,w)=>({u_sky_color:new a.aL(oe,w.u_sky_color),u_horizon_color:new a.aL(oe,w.u_horizon_color),u_horizon:new a.aI(oe,w.u_horizon),u_sky_horizon_blend:new a.aI(oe,w.u_sky_horizon_blend)})};class to{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 Ri={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class an{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],Ne=B.attributes[le.name];Ne!==void 0&&w.vertexAttribPointer(Ne,le.components,w[Ri[le.type]],!1,this.itemSize,le.offset+this.itemSize*(Q||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let cs=new WeakMap;function pa(oe){var w;if(cs.has(oe))return cs.get(oe);{let B=(w=oe.getParameter(oe.VERSION))===null||w===void 0?void 0:w.startsWith("WebGL 2.0");return cs.set(oe,B),B}}class ln{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 ka extends ln{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 va extends ln{getDefault(){return 1}set(w){(w!==this.current||this.dirty)&&(this.gl.clearDepth(w),this.current=w,this.dirty=!1)}}class bo extends ln{getDefault(){return 0}set(w){(w!==this.current||this.dirty)&&(this.gl.clearStencil(w),this.current=w,this.dirty=!1)}}class Co extends ln{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 Fi extends ln{getDefault(){return!0}set(w){(w!==this.current||this.dirty)&&(this.gl.depthMask(w),this.current=w,this.dirty=!1)}}class Yn extends ln{getDefault(){return 255}set(w){(w!==this.current||this.dirty)&&(this.gl.stencilMask(w),this.current=w,this.dirty=!1)}}class xa extends ln{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 Qi extends ln{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 Nn extends ln{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 Pn extends ln{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 qa extends ln{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 jo extends ln{getDefault(){return this.gl.LESS}set(w){(w!==this.current||this.dirty)&&(this.gl.depthFunc(w),this.current=w,this.dirty=!1)}}class Vo extends ln{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 Pa extends ln{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 Oa extends ln{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 co extends ln{getDefault(){return this.gl.FUNC_ADD}set(w){(w!==this.current||this.dirty)&&(this.gl.blendEquation(w),this.current=w,this.dirty=!1)}}class An extends ln{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 _o extends ln{getDefault(){return this.gl.BACK}set(w){(w!==this.current||this.dirty)&&(this.gl.cullFace(w),this.current=w,this.dirty=!1)}}class ks extends ln{getDefault(){return this.gl.CCW}set(w){(w!==this.current||this.dirty)&&(this.gl.frontFace(w),this.current=w,this.dirty=!1)}}class bs extends ln{getDefault(){return null}set(w){(w!==this.current||this.dirty)&&(this.gl.useProgram(w),this.current=w,this.dirty=!1)}}class ps extends ln{getDefault(){return this.gl.TEXTURE0}set(w){(w!==this.current||this.dirty)&&(this.gl.activeTexture(w),this.current=w,this.dirty=!1)}}class sa extends ln{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 Bn extends ln{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 ms extends ln{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 ya extends ln{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 on extends ln{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 mn extends ln{getDefault(){return null}set(w){let B=this.gl;B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,w),this.current=w,this.dirty=!1}}class Ga extends ln{getDefault(){return null}set(w){var B;if(w===this.current&&!this.dirty)return;let Q=this.gl;pa(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 ca extends ln{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 bn extends ln{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 Xi extends ln{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 qn extends ln{constructor(w,B){super(w),this.context=w,this.parent=B}getDefault(){return null}}class Ia extends qn{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 yn extends qn{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 Ya extends qn{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 ba{constructor(w,B,Q,ee,le){this.context=w,this.width=B,this.height=Q;let Ne=w.gl,$e=this.framebuffer=Ne.createFramebuffer();if(this.colorAttachment=new Ia(w,$e),ee)this.depthAttachment=le?new Ya(w,$e):new yn(w,$e);else if(le)throw new Error("Stencil cannot be set without depth");if(Ne.checkFramebufferStatus(Ne.FRAMEBUFFER)!==Ne.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 Da{constructor(w,B,Q){this.blendFunction=w,this.blendColor=B,this.mask=Q}}Da.Replace=[1,0],Da.disabled=new Da(Da.Replace,a.aM.transparent,[!1,!1,!1,!1]),Da.unblended=new Da(Da.Replace,a.aM.transparent,[!0,!0,!0,!0]),Da.alphaBlended=new Da([1,771],a.aM.transparent,[!0,!0,!0,!0]);class Aa{constructor(w){var B,Q;if(this.gl=w,this.clearColor=new ka(this),this.clearDepth=new va(this),this.clearStencil=new bo(this),this.colorMask=new Co(this),this.depthMask=new Fi(this),this.stencilMask=new Yn(this),this.stencilFunc=new xa(this),this.stencilOp=new Qi(this),this.stencilTest=new Nn(this),this.depthRange=new Pn(this),this.depthTest=new qa(this),this.depthFunc=new jo(this),this.blend=new Vo(this),this.blendFunc=new Pa(this),this.blendColor=new Oa(this),this.blendEquation=new co(this),this.cullFace=new An(this),this.cullFaceSide=new _o(this),this.frontFace=new ks(this),this.program=new bs(this),this.activeTexture=new ps(this),this.viewport=new sa(this),this.bindFramebuffer=new Bn(this),this.bindRenderbuffer=new ms(this),this.bindTexture=new ya(this),this.bindVertexBuffer=new on(this),this.bindElementBuffer=new mn(this),this.bindVertexArray=new Ga(this),this.pixelStoreUnpack=new ca(this),this.pixelStoreUnpackPremultiplyAlpha=new bn(this),this.pixelStoreUnpackFlipY=new Xi(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),pa(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 to(this,w,B)}createVertexBuffer(w,B,Q){return new an(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 ba(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,Da.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 pa(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 pa(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 Ln{constructor(w,B,Q){this.func=w,this.mask=B,this.range=Q}}Ln.ReadOnly=!1,Ln.ReadWrite=!0,Ln.disabled=new Ln(519,Ln.ReadOnly,[0,1]);let wo=7680;class wa{constructor(w,B,Q,ee,le,Ne){this.test=w,this.ref=B,this.mask=Q,this.fail=ee,this.depthFail=le,this.pass=Ne}}wa.disabled=new wa({func:519,mask:0},0,0,wo,wo,wo);class $i{constructor(w,B,Q){this.enable=w,this.mode=B,this.frontFace=Q}}let ea;function Sa(oe,w,B,Q,ee){let le=oe.context,Ne=le.gl,$e=oe.useProgram("collisionBox"),pt=[],zt=0,Yt=0;for(let Ve=0;Ve<Q.length;Ve++){let ot=Q[Ve],Ke=w.getTile(ot).getBucket(B);if(!Ke)continue;let ft=ee?Ke.textCollisionBox:Ke.iconCollisionBox,qt=Ke.collisionCircleArray;if(qt.length>0){let Xt=a.H();a.aQ(Xt,Ke.placementInvProjMatrix,oe.transform.glCoordMatrix),a.aQ(Xt,Xt,Ke.placementViewportMatrix),pt.push({circleArray:qt,circleOffset:Yt,transform:ot.posMatrix,invTransform:Xt,coord:ot}),zt+=qt.length/4,Yt=zt}ft&&$e.draw(le,Ne.LINES,Ln.disabled,wa.disabled,oe.colorModeForRenderPass(),$i.disabled,{u_matrix:ot.posMatrix,u_pixel_extrude_scale:[1/(Jt=oe.transform).width,1/Jt.height]},oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(ot),B.id,ft.layoutVertexBuffer,ft.indexBuffer,ft.segments,null,oe.transform.zoom,null,null,ft.collisionVertexBuffer)}var Jt;if(!ee||!pt.length)return;let yr=oe.useProgram("collisionCircle"),Ir=new a.aR;Ir.resize(4*zt),Ir._trim();let ce=0;for(let Ve of pt)for(let ot=0;ot<Ve.circleArray.length/4;ot++){let Ke=4*ot,ft=Ve.circleArray[Ke+0],qt=Ve.circleArray[Ke+1],Xt=Ve.circleArray[Ke+2],$t=Ve.circleArray[Ke+3];Ir.emplace(ce++,ft,qt,Xt,$t,0),Ir.emplace(ce++,ft,qt,Xt,$t,1),Ir.emplace(ce++,ft,qt,Xt,$t,2),Ir.emplace(ce++,ft,qt,Xt,$t,3)}(!ea||ea.length<2*zt)&&(ea=function(Ve){let ot=2*Ve,Ke=new a.aT;Ke.resize(ot),Ke._trim();for(let ft=0;ft<ot;ft++){let qt=6*ft;Ke.uint16[qt+0]=4*ft+0,Ke.uint16[qt+1]=4*ft+1,Ke.uint16[qt+2]=4*ft+2,Ke.uint16[qt+3]=4*ft+2,Ke.uint16[qt+4]=4*ft+3,Ke.uint16[qt+5]=4*ft+0}return Ke}(zt));let Ae=le.createIndexBuffer(ea,!0),qe=le.createVertexBuffer(Ir,a.aS.members,!0);for(let Ve of pt){let ot=Wn(Ve.transform,Ve.invTransform,oe.transform);yr.draw(le,Ne.TRIANGLES,Ln.disabled,wa.disabled,oe.colorModeForRenderPass(),$i.disabled,ot,oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(Ve.coord),B.id,qe,Ae,a.a0.simpleSegment(0,2*Ve.circleOffset,Ve.circleArray.length,Ve.circleArray.length/2),null,oe.transform.zoom,null,null,null)}qe.destroy(),Ae.destroy()}$i.disabled=new $i(!1,1029,2305),$i.backCCW=new $i(!0,1029,2305);let Za=a.an(new Float32Array(16));function xo(oe,w,B,Q,ee,le){let{horizontalAlign:Ne,verticalAlign:$e}=a.au(oe);return new a.P((-(Ne-.5)*w/ee+Q[0])*le,(-($e-.5)*B/ee+Q[1])*le)}function Wa(oe,w,B,Q,ee,le){let Ne=w.tileAnchorPoint.add(new a.P(w.translation[0],w.translation[1]));if(w.pitchWithMap){let $e=Q.mult(le);B||($e=$e.rotate(-ee));let pt=Ne.add($e);return De(pt.x,pt.y,w.labelPlaneMatrix,w.getElevation).point}if(B){let $e=ht(w.tileAnchorPoint.x+1,w.tileAnchorPoint.y,w).point.sub(oe),pt=Math.atan($e.y/$e.x)+($e.x<0?Math.PI:0);return oe.add(Q.rotate(pt))}return oe.add(Q)}function hn(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir){let ce=oe.text.placedSymbolArray,Ae=oe.text.dynamicLayoutVertexArray,qe=oe.icon.dynamicLayoutVertexArray,Ve={};Ae.clear();for(let ot=0;ot<ce.length;ot++){let Ke=ce.get(ot),ft=Ke.hidden||!Ke.crossTileID||oe.allowVerticalPlacement&&!Ke.placedOrientation?null:Q[Ke.crossTileID];if(ft){let qt=new a.P(Ke.anchorX,Ke.anchorY),Xt={getElevation:Ir,width:ee.width,height:ee.height,labelPlaneMatrix:le,lineVertexArray:null,pitchWithMap:B,projection:Yt,projectionCache:null,tileAnchorPoint:qt,translation:Jt,unwrappedTileID:yr},$t=B?De(qt.x,qt.y,Ne,Ir):ht(qt.x,qt.y,Xt),dr=_e(ee.cameraToCenterDistance,$t.signedDistanceFromCamera),Mr=a.ai(oe.textSizeData,pt,Ke)*dr/a.ap;B&&(Mr*=oe.tilePixelRatio/$e);let{width:$r,height:ii,anchor:pi,textOffset:Yi,textBoxScale:wn}=ft,Tn=xo(pi,$r,ii,Yi,wn,Mr),ua=Yt.getPitchedTextCorrection(ee,qt.add(new a.P(Jt[0],Jt[1])),yr),oo=Wa($t.point,Xt,w,Tn,ee.angle,ua),el=oe.allowVerticalPlacement&&Ke.placedOrientation===a.ah.vertical?Math.PI/2:0;for(let ys=0;ys<Ke.numGlyphs;ys++)a.aj(Ae,oo,el);zt&&Ke.associatedIconIndex>=0&&(Ve[Ke.associatedIconIndex]={shiftedAnchor:oo,angle:el})}else Lr(Ke.numGlyphs,Ae)}if(zt){qe.clear();let ot=oe.icon.placedSymbolArray;for(let Ke=0;Ke<ot.length;Ke++){let ft=ot.get(Ke);if(ft.hidden)Lr(ft.numGlyphs,qe);else{let qt=Ve[Ke];if(qt)for(let Xt=0;Xt<ft.numGlyphs;Xt++)a.aj(qe,qt.shiftedAnchor,qt.angle);else Lr(ft.numGlyphs,qe)}}oe.icon.dynamicLayoutVertexBuffer.updateData(qe)}oe.text.dynamicLayoutVertexBuffer.updateData(Ae)}function Un(oe,w,B){return B.iconsInText&&w?"symbolTextAndIcon":oe?"symbolSDF":"symbolIcon"}function Ss(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt){let yr=oe.context,Ir=yr.gl,ce=oe.transform,Ae=Pi(),qe=$e==="map",Ve=pt==="map",ot=$e!=="viewport"&&B.layout.get("symbol-placement")!=="point",Ke=qe&&!Ve&&!ot,ft=!Ve&&ot,qt=!B.layout.get("symbol-sort-key").isConstant(),Xt=!1,$t=oe.depthModeForSublayer(0,Ln.ReadOnly),dr=B._unevaluatedLayout.hasValue("text-variable-anchor")||B._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Mr=[],$r=Ae.getCircleRadiusCorrection(ce);for(let ii of Q){let pi=w.getTile(ii),Yi=pi.getBucket(B);if(!Yi)continue;let wn=ee?Yi.text:Yi.icon;if(!wn||!wn.segments.get().length||!wn.hasVisibleVertices)continue;let Tn=wn.programConfigurations.get(B.id),ua=ee||Yi.sdfIcons,oo=ee?Yi.textSizeData:Yi.iconSizeData,el=Ve||ce.pitch!==0,ys=oe.useProgram(Un(ua,ee,Yi),Tn),il=a.ag(oo,ce.zoom),$l=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(ii),pl,Hl,Ll,Ql,ku=[0,0],Jl=null;if(ee)Hl=pi.glyphAtlasTexture,Ll=Ir.LINEAR,pl=pi.glyphAtlasTexture.size,Yi.iconsInText&&(ku=pi.imageAtlasTexture.size,Jl=pi.imageAtlasTexture,Ql=el||oe.options.rotating||oe.options.zooming||oo.kind==="composite"||oo.kind==="camera"?Ir.LINEAR:Ir.NEAREST);else{let it=B.layout.get("icon-size").constantOr(0)!==1||Yi.iconsNeedLinear;Hl=pi.imageAtlasTexture,Ll=ua||oe.options.rotating||oe.options.zooming||it||el?Ir.LINEAR:Ir.NEAREST,pl=pi.imageAtlasTexture.size}let Kl=Ei(pi,1,oe.transform.zoom),Hu=ft?ii.posMatrix:Za,tf=fr(Hu,Ve,qe,oe.transform,Kl),Ku=Ot(Hu,Ve,qe,oe.transform,Kl),Gu=Ot(ii.posMatrix,Ve,qe,oe.transform,Kl),Wu=Ae.translatePosition(oe.transform,pi,le,Ne),sf=dr&&Yi.hasTextData(),gf=B.layout.get("icon-text-fit")!=="none"&&sf&&Yi.hasIconData();if(ot){let it=oe.style.map.terrain?(mt,er)=>oe.style.map.terrain.getElevation(ii,mt,er):null,Nt=B.layout.get("text-rotation-alignment")==="map";Pe(Yi,ii.posMatrix,oe,ee,tf,Gu,Ve,zt,Nt,Ae,ii.toUnwrapped(),ce.width,ce.height,Wu,it)}let nf=ii.posMatrix,af=ee&&dr||gf,X=ot||af?Za:tf,se=Ku,Le=ua&&B.paint.get(ee?"text-halo-width":"icon-halo-width").constantOr(1)!==0,We;We=ua?Yi.iconsInText?Cn(oo.kind,il,Ke,Ve,ot,af,oe,nf,X,se,Wu,pl,ku,$r):tn(oo.kind,il,Ke,Ve,ot,af,oe,nf,X,se,Wu,ee,pl,!0,$r):Ha(oo.kind,il,Ke,Ve,ot,af,oe,nf,X,se,Wu,ee,pl,$r);let Ye={program:ys,buffers:wn,uniformValues:We,atlasTexture:Hl,atlasTextureIcon:Jl,atlasInterpolation:Ll,atlasInterpolationIcon:Ql,isSDF:ua,hasHalo:Le};if(qt&&Yi.canOverlap){Xt=!0;let it=wn.segments.get();for(let Nt of it)Mr.push({segments:new a.a0([Nt]),sortKey:Nt.sortKey,state:Ye,terrainData:$l})}else Mr.push({segments:wn.segments,sortKey:0,state:Ye,terrainData:$l})}Xt&&Mr.sort((ii,pi)=>ii.sortKey-pi.sortKey);for(let ii of Mr){let pi=ii.state;if(yr.activeTexture.set(Ir.TEXTURE0),pi.atlasTexture.bind(pi.atlasInterpolation,Ir.CLAMP_TO_EDGE),pi.atlasTextureIcon&&(yr.activeTexture.set(Ir.TEXTURE1),pi.atlasTextureIcon&&pi.atlasTextureIcon.bind(pi.atlasInterpolationIcon,Ir.CLAMP_TO_EDGE)),pi.isSDF){let Yi=pi.uniformValues;pi.hasHalo&&(Yi.u_is_halo=1,Kn(pi.buffers,ii.segments,B,oe,pi.program,$t,Yt,Jt,Yi,ii.terrainData)),Yi.u_is_halo=0}Kn(pi.buffers,ii.segments,B,oe,pi.program,$t,Yt,Jt,pi.uniformValues,ii.terrainData)}}function Kn(oe,w,B,Q,ee,le,Ne,$e,pt,zt){let Yt=Q.context;ee.draw(Yt,Yt.gl.TRIANGLES,le,Ne,$e,$i.disabled,pt,zt,B.id,oe.layoutVertexBuffer,oe.indexBuffer,w,B.paint,Q.transform.zoom,oe.programConfigurations.get(B.id),oe.dynamicLayoutVertexBuffer,oe.opacityVertexBuffer)}function ns(oe,w,B,Q){let ee=oe.context,le=ee.gl,Ne=wa.disabled,$e=new Da([le.ONE,le.ONE],a.aM.transparent,[!0,!0,!0,!0]),pt=w.getBucket(B);if(!pt)return;let zt=Q.key,Yt=B.heatmapFbos.get(zt);Yt||(Yt=vo(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(zt,Yt)),ee.bindFramebuffer.set(Yt.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let Jt=pt.programConfigurations.get(B.id),yr=oe.useProgram("heatmap",Jt),Ir=oe.style.map.terrain.getTerrainData(Q);yr.draw(ee,le.TRIANGLES,Ln.disabled,Ne,$e,$i.disabled,za(Q.posMatrix,w,oe.transform.zoom,B.paint.get("heatmap-intensity")),Ir,B.id,pt.layoutVertexBuffer,pt.indexBuffer,pt.segments,B.paint,oe.transform.zoom,Jt)}function Jo(oe,w,B){let Q=oe.context,ee=Q.gl;Q.setColorMode(oe.colorModeForRenderPass());let le=ma(Q,w),Ne=B.key,$e=w.heatmapFbos.get(Ne);$e&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,$e.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),le.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),oe.useProgram("heatmapTexture").draw(Q,ee.TRIANGLES,Ln.disabled,wa.disabled,oe.colorModeForRenderPass(),$i.disabled,Hr(oe,w,0,1),null,w.id,oe.rasterBoundsBuffer,oe.quadTriangleIndexBuffer,oe.rasterBoundsSegments,w.paint,oe.transform.zoom),$e.destroy(),w.heatmapFbos.delete(Ne))}function vo(oe,w,B){var Q,ee;let le=oe.gl,Ne=le.createTexture();le.bindTexture(le.TEXTURE_2D,Ne),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 $e=(Q=oe.HALF_FLOAT)!==null&&Q!==void 0?Q:le.UNSIGNED_BYTE,pt=(ee=oe.RGBA16F)!==null&&ee!==void 0?ee:le.RGBA;le.texImage2D(le.TEXTURE_2D,0,pt,w,B,0,le.RGBA,$e,null);let zt=oe.createFramebuffer(w,B,!1,!1);return zt.colorAttachment.set(Ne),zt}function ma(oe,w){return w.colorRampTexture||(w.colorRampTexture=new v(oe,w.colorRamp,oe.gl.RGBA)),w.colorRampTexture}function ja(oe,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let le=Q.imageAtlas.patternPositions,Ne=le[B.to.toString()],$e=le[B.from.toString()];if(!Ne&&$e&&(Ne=$e),!$e&&Ne&&($e=Ne),!Ne||!$e){let pt=ee.getPaintProperty(w);Ne=le[pt],$e=le[pt]}Ne&&$e&&oe.setConstantPatternPositions(Ne,$e)}function To(oe,w,B,Q,ee,le,Ne){let $e=oe.context.gl,pt="fill-pattern",zt=B.paint.get(pt),Yt=zt&&zt.constantOr(1),Jt=B.getCrossfadeParameters(),yr,Ir,ce,Ae,qe;Ne?(Ir=Yt&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",yr=$e.LINES):(Ir=Yt?"fillPattern":"fill",yr=$e.TRIANGLES);let Ve=zt.constantOr(null);for(let ot of Q){let Ke=w.getTile(ot);if(Yt&&!Ke.patternsLoaded())continue;let ft=Ke.getBucket(B);if(!ft)continue;let qt=ft.programConfigurations.get(B.id),Xt=oe.useProgram(Ir,qt),$t=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(ot);Yt&&(oe.context.activeTexture.set($e.TEXTURE0),Ke.imageAtlasTexture.bind($e.LINEAR,$e.CLAMP_TO_EDGE),qt.updatePaintBuffers(Jt)),ja(qt,pt,Ve,Ke,B);let dr=$t?ot:null,Mr=oe.translatePosMatrix(dr?dr.posMatrix:ot.posMatrix,Ke,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(Ne){Ae=ft.indexBuffer2,qe=ft.segments2;let $r=[$e.drawingBufferWidth,$e.drawingBufferHeight];ce=Ir==="fillOutlinePattern"&&Yt?xn(Mr,oe,Jt,Ke,$r):fn(Mr,$r)}else Ae=ft.indexBuffer,qe=ft.segments,ce=Yt?zn(Mr,oe,Jt,Ke):Ui(Mr);Xt.draw(oe.context,yr,ee,oe.stencilModeForClipping(ot),le,$i.disabled,ce,$t,B.id,ft.layoutVertexBuffer,Ae,qe,B.paint,oe.transform.zoom,qt)}}function Ao(oe,w,B,Q,ee,le,Ne){let $e=oe.context,pt=$e.gl,zt="fill-extrusion-pattern",Yt=B.paint.get(zt),Jt=Yt.constantOr(1),yr=B.getCrossfadeParameters(),Ir=B.paint.get("fill-extrusion-opacity"),ce=Yt.constantOr(null);for(let Ae of Q){let qe=w.getTile(Ae),Ve=qe.getBucket(B);if(!Ve)continue;let ot=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(Ae),Ke=Ve.programConfigurations.get(B.id),ft=oe.useProgram(Jt?"fillExtrusionPattern":"fillExtrusion",Ke);Jt&&(oe.context.activeTexture.set(pt.TEXTURE0),qe.imageAtlasTexture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE),Ke.updatePaintBuffers(yr)),ja(Ke,zt,ce,qe,B);let qt=oe.translatePosMatrix(Ae.posMatrix,qe,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),Xt=B.paint.get("fill-extrusion-vertical-gradient"),$t=Jt?Qr(qt,oe,Xt,Ir,Ae,yr,qe):Gi(qt,oe,Xt,Ir);ft.draw($e,$e.gl.TRIANGLES,ee,le,Ne,$i.backCCW,$t,ot,B.id,Ve.layoutVertexBuffer,Ve.indexBuffer,Ve.segments,B.paint,oe.transform.zoom,Ke,oe.style.map.terrain&&Ve.centroidVertexBuffer)}}function la(oe,w,B,Q,ee,le,Ne){let $e=oe.context,pt=$e.gl,zt=B.fbo;if(!zt)return;let Yt=oe.useProgram("hillshade"),Jt=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(w);$e.activeTexture.set(pt.TEXTURE0),pt.bindTexture(pt.TEXTURE_2D,zt.colorAttachment.get()),Yt.draw($e,pt.TRIANGLES,ee,le,Ne,$i.disabled,((yr,Ir,ce,Ae)=>{let qe=ce.paint.get("hillshade-shadow-color"),Ve=ce.paint.get("hillshade-highlight-color"),ot=ce.paint.get("hillshade-accent-color"),Ke=ce.paint.get("hillshade-illumination-direction")*(Math.PI/180);ce.paint.get("hillshade-illumination-anchor")==="viewport"&&(Ke-=yr.transform.angle);let ft=!yr.options.moving;return{u_matrix:Ae?Ae.posMatrix:yr.transform.calculatePosMatrix(Ir.tileID.toUnwrapped(),ft),u_image:0,u_latrange:na(0,Ir.tileID),u_light:[ce.paint.get("hillshade-exaggeration"),Ke],u_shadow:qe,u_highlight:Ve,u_accent:ot}})(oe,B,Q,Jt?w:null),Jt,Q.id,oe.rasterBoundsBuffer,oe.quadTriangleIndexBuffer,oe.rasterBoundsSegments)}function Ki(oe,w,B,Q,ee,le){let Ne=oe.context,$e=Ne.gl,pt=w.dem;if(pt&&pt.data){let zt=pt.dim,Yt=pt.stride,Jt=pt.getPixels();if(Ne.activeTexture.set($e.TEXTURE1),Ne.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||oe.getTileTexture(Yt),w.demTexture){let Ir=w.demTexture;Ir.update(Jt,{premultiply:!1}),Ir.bind($e.NEAREST,$e.CLAMP_TO_EDGE)}else w.demTexture=new v(Ne,Jt,$e.RGBA,{premultiply:!1}),w.demTexture.bind($e.NEAREST,$e.CLAMP_TO_EDGE);Ne.activeTexture.set($e.TEXTURE0);let yr=w.fbo;if(!yr){let Ir=new v(Ne,{width:zt,height:zt,data:null},$e.RGBA);Ir.bind($e.LINEAR,$e.CLAMP_TO_EDGE),yr=w.fbo=Ne.createFramebuffer(zt,zt,!0,!1),yr.colorAttachment.set(Ir.texture)}Ne.bindFramebuffer.set(yr.framebuffer),Ne.viewport.set([0,0,zt,zt]),oe.useProgram("hillshadePrepare").draw(Ne,$e.TRIANGLES,Q,ee,le,$i.disabled,((Ir,ce)=>{let Ae=ce.stride,qe=a.H();return a.aP(qe,0,a.X,-a.X,0,0,1),a.J(qe,qe,[0,-a.X,0]),{u_matrix:qe,u_image:1,u_dimension:[Ae,Ae],u_zoom:Ir.overscaledZ,u_unpack:ce.getUnpackVector()}})(w.tileID,pt),null,B.id,oe.rasterBoundsBuffer,oe.quadTriangleIndexBuffer,oe.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function ho(oe,w,B,Q,ee,le){let Ne=Q.paint.get("raster-fade-duration");if(!le&&Ne>0){let $e=l.now(),pt=($e-oe.timeAdded)/Ne,zt=w?($e-w.timeAdded)/Ne:-1,Yt=B.getSource(),Jt=ee.coveringZoomLevel({tileSize:Yt.tileSize,roundZoom:Yt.roundZoom}),yr=!w||Math.abs(w.tileID.overscaledZ-Jt)>Math.abs(oe.tileID.overscaledZ-Jt),Ir=yr&&oe.refreshedUponExpiration?1:a.ac(yr?pt:1-zt,0,1);return oe.refreshedUponExpiration&&pt>=1&&(oe.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Ir}:{opacity:Ir,mix:0}}return{opacity:1,mix:0}}let Ka=new a.aM(1,0,0,1),Ca=new a.aM(0,1,0,1),ta=new a.aM(0,0,1,1),En=new a.aM(1,0,1,1),Mo=new a.aM(0,1,1,1);function Ds(oe,w,B,Q){vs(oe,0,w+B/2,oe.transform.width,B,Q)}function Ro(oe,w,B,Q){vs(oe,w-B/2,0,B,oe.transform.height,Q)}function vs(oe,w,B,Q,ee,le){let Ne=oe.context,$e=Ne.gl;$e.enable($e.SCISSOR_TEST),$e.scissor(w*oe.pixelRatio,B*oe.pixelRatio,Q*oe.pixelRatio,ee*oe.pixelRatio),Ne.clear({color:le}),$e.disable($e.SCISSOR_TEST)}function Ks(oe,w,B){let Q=oe.context,ee=Q.gl,le=B.posMatrix,Ne=oe.useProgram("debug"),$e=Ln.disabled,pt=wa.disabled,zt=oe.colorModeForRenderPass(),Yt="$debug",Jt=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let yr=w.getTileByID(B.key).latestRawTileData,Ir=Math.floor((yr&&yr.byteLength||0)/1024),ce=w.getTile(B).tileSize,Ae=512/Math.min(ce,512)*(B.overscaledZ/oe.transform.zoom)*.5,qe=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(qe+=` => ${B.overscaledZ}`),function(Ve,ot){Ve.initDebugOverlayCanvas();let Ke=Ve.debugOverlayCanvas,ft=Ve.context.gl,qt=Ve.debugOverlayCanvas.getContext("2d");qt.clearRect(0,0,Ke.width,Ke.height),qt.shadowColor="white",qt.shadowBlur=2,qt.lineWidth=1.5,qt.strokeStyle="white",qt.textBaseline="top",qt.font="bold 36px Open Sans, sans-serif",qt.fillText(ot,5,5),qt.strokeText(ot,5,5),Ve.debugOverlayTexture.update(Ke),Ve.debugOverlayTexture.bind(ft.LINEAR,ft.CLAMP_TO_EDGE)}(oe,`${qe} ${Ir}kB`),Ne.draw(Q,ee.TRIANGLES,$e,pt,Da.alphaBlended,$i.disabled,Fn(le,a.aM.transparent,Ae),null,Yt,oe.debugBuffer,oe.quadTriangleIndexBuffer,oe.debugSegments),Ne.draw(Q,ee.LINE_STRIP,$e,pt,zt,$i.disabled,Fn(le,a.aM.red),Jt,Yt,oe.debugBuffer,oe.tileBorderIndexBuffer,oe.debugSegments)}function as(oe,w,B){let Q=oe.context,ee=Q.gl,le=oe.colorModeForRenderPass(),Ne=new Ln(ee.LEQUAL,Ln.ReadWrite,oe.depthRangeFor3D),$e=oe.useProgram("terrain"),pt=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,oe.width,oe.height]);for(let zt of B){let Yt=oe.renderToTexture.getTexture(zt),Jt=w.getTerrainData(zt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Yt.texture);let yr=oe.transform.calculatePosMatrix(zt.tileID.toUnwrapped()),Ir=w.getMeshFrameDelta(oe.transform.zoom),ce=oe.transform.calculateFogMatrix(zt.tileID.toUnwrapped()),Ae=tr(yr,Ir,ce,oe.style.sky,oe.transform.pitch);$e.draw(Q,ee.TRIANGLES,Ne,wa.disabled,le,$i.backCCW,Ae,Jt,"terrain",pt.vertexBuffer,pt.indexBuffer,pt.segments)}}class Jn{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 Cs{constructor(w,B){this.context=new Aa(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=tt.maxUnderzooming+tt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Vi}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,fi.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,fi.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,Xe.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,fi.members),this.viewportSegments=a.a0.simpleSegment(0,0,4,2);let Ne=new a.aZ;Ne.emplaceBack(0),Ne.emplaceBack(1),Ne.emplaceBack(3),Ne.emplaceBack(2),Ne.emplaceBack(0),this.tileBorderIndexBuffer=w.createIndexBuffer(Ne);let $e=new a.aY;$e.emplaceBack(0,1,2),$e.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer($e);let pt=this.context.gl;this.stencilClearMode=new wa({func:pt.ALWAYS,mask:0},0,255,pt.ZERO,pt.ZERO,pt.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,Ln.disabled,this.stencilClearMode,Da.disabled,$i.disabled,ia(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(Da.disabled),Q.setDepthMode(Ln.disabled);let le=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let Ne of B){let $e=this._tileClippingMaskIDs[Ne.key]=this.nextStencilID++,pt=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Ne);le.draw(Q,ee.TRIANGLES,Ln.disabled,new wa({func:ee.ALWAYS,mask:0},$e,255,ee.KEEP,ee.KEEP,ee.REPLACE),Da.disabled,$i.disabled,ia(Ne.posMatrix),pt,"$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 wa({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new wa({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((Ne,$e)=>$e.overscaledZ-Ne.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 Ne={};for(let $e=0;$e<le;$e++)Ne[$e+ee]=new wa({func:B.GEQUAL,mask:255},$e+this.nextStencilID,255,B.KEEP,B.KEEP,B.REPLACE);return this.nextStencilID+=le,[Ne,Q]}return[{[ee]:wa.disabled},Q]}colorModeForRenderPass(){let w=this.context.gl;return this._showOverdrawInspector?new Da([w.CONSTANT_COLOR,w.ONE],new a.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Da.unblended:Da.alphaBlended}depthModeForSublayer(w,B,Q){if(!this.opaquePassEnabledForLayer())return Ln.disabled;let ee=1-((1+this.currentLayer)*this.numSublayers+w)*this.depthEpsilon;return new Ln(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(l.now()),this.imageManager.beginFrame();let Q=this.style._order,ee=this.style.sourceCaches,le={},Ne={},$e={};for(let pt in ee){let zt=ee[pt];zt.used&&zt.prepare(this.context),le[pt]=zt.getVisibleCoordinates(),Ne[pt]=le[pt].slice().reverse(),$e[pt]=zt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let pt=0;pt<Q.length;pt++)if(this.style._layers[Q[pt]].is3D()){this.opaquePassCutoff=pt;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(let pt of Q){let zt=this.style._layers[pt];if(!zt.hasOffscreenPass()||zt.isHidden(this.transform.zoom))continue;let Yt=Ne[zt.source];(zt.type==="custom"||Yt.length)&&this.renderLayer(this,ee[zt.source],zt,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(pt,zt){let Yt=pt.context,Jt=Yt.gl,yr=((Ve,ot,Ke)=>({u_sky_color:Ve.properties.get("sky-color"),u_horizon_color:Ve.properties.get("horizon-color"),u_horizon:(ot.height/2+ot.getHorizon())*Ke,u_sky_horizon_blend:Ve.properties.get("sky-horizon-blend")*ot.height/2*Ke}))(zt,pt.style.map.transform,pt.pixelRatio),Ir=new Ln(Jt.LEQUAL,Ln.ReadWrite,[0,1]),ce=wa.disabled,Ae=pt.colorModeForRenderPass(),qe=pt.useProgram("sky");if(!zt.mesh){let Ve=new a.aX;Ve.emplaceBack(-1,-1),Ve.emplaceBack(1,-1),Ve.emplaceBack(1,1),Ve.emplaceBack(-1,1);let ot=new a.aY;ot.emplaceBack(0,1,2),ot.emplaceBack(0,2,3),zt.mesh=new Jn(Yt.createVertexBuffer(Ve,fi.members),Yt.createIndexBuffer(ot),a.a0.simpleSegment(0,0,Ve.length,ot.length))}qe.draw(Yt,Jt.TRIANGLES,Ir,ce,Ae,$i.disabled,yr,void 0,"sky",zt.mesh.vertexBuffer,zt.mesh.indexBuffer,zt.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 pt=this.style._layers[Q[this.currentLayer]],zt=ee[pt.source],Yt=le[pt.source];this._renderTileClippingMasks(pt,Yt),this.renderLayer(this,zt,pt,Yt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Q.length;this.currentLayer++){let pt=this.style._layers[Q[this.currentLayer]],zt=ee[pt.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(pt))continue;let Yt=(pt.type==="symbol"?$e:Ne)[pt.source];this._renderTileClippingMasks(pt,le[pt.source]),this.renderLayer(this,zt,pt,Yt)}if(this.options.showTileBoundaries){let pt=function(zt,Yt){let Jt=null,yr=Object.values(zt._layers).flatMap(qe=>qe.source&&!qe.isHidden(Yt)?[zt.sourceCaches[qe.source]]:[]),Ir=yr.filter(qe=>qe.getSource().type==="vector"),ce=yr.filter(qe=>qe.getSource().type!=="vector"),Ae=qe=>{(!Jt||Jt.getSource().maxzoom<qe.getSource().maxzoom)&&(Jt=qe)};return Ir.forEach(qe=>Ae(qe)),Jt||ce.forEach(qe=>Ae(qe)),Jt}(this.style,this.transform.zoom);pt&&function(zt,Yt,Jt){for(let yr=0;yr<Jt.length;yr++)Ks(zt,Yt,Jt[yr])}(this,pt,pt.getVisibleCoordinates())}this.options.showPadding&&function(pt){let zt=pt.transform.padding;Ds(pt,pt.transform.height-(zt.top||0),3,Ka),Ds(pt,zt.bottom||0,3,Ca),Ro(pt,zt.left||0,3,ta),Ro(pt,pt.transform.width-(zt.right||0),3,En);let Yt=pt.transform.centerPoint;(function(Jt,yr,Ir,ce){vs(Jt,yr-1,Ir-10,2,20,ce),vs(Jt,yr-10,Ir-1,20,2,ce)})(pt,Yt.x,pt.transform.height-Yt.y,Mo)}(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,Ne){let $e=le.context,pt=$e.gl,zt=Da.unblended,Yt=new Ln(pt.LEQUAL,Ln.ReadWrite,[0,1]),Jt=Ne.getTerrainMesh(),yr=Ne.sourceCache.getRenderableTiles(),Ir=le.useProgram("terrainDepth");$e.bindFramebuffer.set(Ne.getFramebuffer("depth").framebuffer),$e.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),$e.clear({color:a.aM.transparent,depth:1});for(let ce of yr){let Ae=Ne.getTerrainData(ce.tileID),qe={u_matrix:le.transform.calculatePosMatrix(ce.tileID.toUnwrapped()),u_ele_delta:Ne.getMeshFrameDelta(le.transform.zoom)};Ir.draw($e,pt.TRIANGLES,Yt,wa.disabled,zt,$i.backCCW,qe,Ae,"terrain",Jt.vertexBuffer,Jt.indexBuffer,Jt.segments)}$e.bindFramebuffer.set(null),$e.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain),function(le,Ne){let $e=le.context,pt=$e.gl,zt=Da.unblended,Yt=new Ln(pt.LEQUAL,Ln.ReadWrite,[0,1]),Jt=Ne.getTerrainMesh(),yr=Ne.getCoordsTexture(),Ir=Ne.sourceCache.getRenderableTiles(),ce=le.useProgram("terrainCoords");$e.bindFramebuffer.set(Ne.getFramebuffer("coords").framebuffer),$e.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),$e.clear({color:a.aM.transparent,depth:1}),Ne.coordsIndex=[];for(let Ae of Ir){let qe=Ne.getTerrainData(Ae.tileID);$e.activeTexture.set(pt.TEXTURE0),pt.bindTexture(pt.TEXTURE_2D,yr.texture);let Ve={u_matrix:le.transform.calculatePosMatrix(Ae.tileID.toUnwrapped()),u_terrain_coords_id:(255-Ne.coordsIndex.length)/255,u_texture:0,u_ele_delta:Ne.getMeshFrameDelta(le.transform.zoom)};ce.draw($e,pt.TRIANGLES,Yt,wa.disabled,zt,$i.backCCW,Ve,qe,"terrain",Jt.vertexBuffer,Jt.indexBuffer,Jt.segments),Ne.coordsIndex.push(Ae.tileID.key)}$e.bindFramebuffer.set(null),$e.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,Ne,$e,pt,zt){if(le.renderPass!=="translucent")return;let Yt=wa.disabled,Jt=le.colorModeForRenderPass();($e._unevaluatedLayout.hasValue("text-variable-anchor")||$e._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft){let qt=Ir.transform,Xt=Pi(),$t=qe==="map",dr=Ve==="map";for(let Mr of yr){let $r=Ae.getTile(Mr),ii=$r.getBucket(ce);if(!ii||!ii.text||!ii.text.segments.get().length)continue;let pi=a.ag(ii.textSizeData,qt.zoom),Yi=Ei($r,1,Ir.transform.zoom),wn=fr(Mr.posMatrix,dr,$t,Ir.transform,Yi),Tn=ce.layout.get("icon-text-fit")!=="none"&&ii.hasIconData();if(pi){let ua=Math.pow(2,qt.zoom-$r.tileID.overscaledZ),oo=Ir.style.map.terrain?(ys,il)=>Ir.style.map.terrain.getElevation(Mr,ys,il):null,el=Xt.translatePosition(qt,$r,ot,Ke);hn(ii,$t,dr,ft,qt,wn,Mr.posMatrix,ua,pi,Tn,Xt,el,Mr.toUnwrapped(),oo)}}}(pt,le,$e,Ne,$e.layout.get("text-rotation-alignment"),$e.layout.get("text-pitch-alignment"),$e.paint.get("text-translate"),$e.paint.get("text-translate-anchor"),zt),$e.paint.get("icon-opacity").constantOr(1)!==0&&Ss(le,Ne,$e,pt,!1,$e.paint.get("icon-translate"),$e.paint.get("icon-translate-anchor"),$e.layout.get("icon-rotation-alignment"),$e.layout.get("icon-pitch-alignment"),$e.layout.get("icon-keep-upright"),Yt,Jt),$e.paint.get("text-opacity").constantOr(1)!==0&&Ss(le,Ne,$e,pt,!0,$e.paint.get("text-translate"),$e.paint.get("text-translate-anchor"),$e.layout.get("text-rotation-alignment"),$e.layout.get("text-pitch-alignment"),$e.layout.get("text-keep-upright"),Yt,Jt),Ne.map.showCollisionBoxes&&(Sa(le,Ne,$e,pt,!0),Sa(le,Ne,$e,pt,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case"circle":(function(le,Ne,$e,pt){if(le.renderPass!=="translucent")return;let zt=$e.paint.get("circle-opacity"),Yt=$e.paint.get("circle-stroke-width"),Jt=$e.paint.get("circle-stroke-opacity"),yr=!$e.layout.get("circle-sort-key").isConstant();if(zt.constantOr(1)===0&&(Yt.constantOr(1)===0||Jt.constantOr(1)===0))return;let Ir=le.context,ce=Ir.gl,Ae=le.depthModeForSublayer(0,Ln.ReadOnly),qe=wa.disabled,Ve=le.colorModeForRenderPass(),ot=[];for(let Ke=0;Ke<pt.length;Ke++){let ft=pt[Ke],qt=Ne.getTile(ft),Xt=qt.getBucket($e);if(!Xt)continue;let $t=Xt.programConfigurations.get($e.id),dr=le.useProgram("circle",$t),Mr=Xt.layoutVertexBuffer,$r=Xt.indexBuffer,ii=le.style.map.terrain&&le.style.map.terrain.getTerrainData(ft),pi={programConfiguration:$t,program:dr,layoutVertexBuffer:Mr,indexBuffer:$r,uniformValues:_a(le,ft,qt,$e),terrainData:ii};if(yr){let Yi=Xt.segments.get();for(let wn of Yi)ot.push({segments:new a.a0([wn]),sortKey:wn.sortKey,state:pi})}else ot.push({segments:Xt.segments,sortKey:0,state:pi})}yr&&ot.sort((Ke,ft)=>Ke.sortKey-ft.sortKey);for(let Ke of ot){let{programConfiguration:ft,program:qt,layoutVertexBuffer:Xt,indexBuffer:$t,uniformValues:dr,terrainData:Mr}=Ke.state;qt.draw(Ir,ce.TRIANGLES,Ae,qe,Ve,$i.disabled,dr,Mr,$e.id,Xt,$t,Ke.segments,$e.paint,le.transform.zoom,ft)}})(w,B,Q,ee);break;case"heatmap":(function(le,Ne,$e,pt){if($e.paint.get("heatmap-opacity")===0)return;let zt=le.context;if(le.style.map.terrain){for(let Yt of pt){let Jt=Ne.getTile(Yt);Ne.hasRenderableParent(Yt)||(le.renderPass==="offscreen"?ns(le,Jt,$e,Yt):le.renderPass==="translucent"&&Jo(le,$e,Yt))}zt.viewport.set([0,0,le.width,le.height])}else le.renderPass==="offscreen"?function(Yt,Jt,yr,Ir){let ce=Yt.context,Ae=ce.gl,qe=wa.disabled,Ve=new Da([Ae.ONE,Ae.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(ot,Ke,ft){let qt=ot.gl;ot.activeTexture.set(qt.TEXTURE1),ot.viewport.set([0,0,Ke.width/4,Ke.height/4]);let Xt=ft.heatmapFbos.get(a.aU);Xt?(qt.bindTexture(qt.TEXTURE_2D,Xt.colorAttachment.get()),ot.bindFramebuffer.set(Xt.framebuffer)):(Xt=vo(ot,Ke.width/4,Ke.height/4),ft.heatmapFbos.set(a.aU,Xt))})(ce,Yt,yr),ce.clear({color:a.aM.transparent});for(let ot=0;ot<Ir.length;ot++){let Ke=Ir[ot];if(Jt.hasRenderableParent(Ke))continue;let ft=Jt.getTile(Ke),qt=ft.getBucket(yr);if(!qt)continue;let Xt=qt.programConfigurations.get(yr.id),$t=Yt.useProgram("heatmap",Xt),{zoom:dr}=Yt.transform;$t.draw(ce,Ae.TRIANGLES,Ln.disabled,qe,Ve,$i.disabled,za(Ke.posMatrix,ft,dr,yr.paint.get("heatmap-intensity")),null,yr.id,qt.layoutVertexBuffer,qt.indexBuffer,qt.segments,yr.paint,Yt.transform.zoom,Xt)}ce.viewport.set([0,0,Yt.width,Yt.height])}(le,Ne,$e,pt):le.renderPass==="translucent"&&function(Yt,Jt){let yr=Yt.context,Ir=yr.gl;yr.setColorMode(Yt.colorModeForRenderPass());let ce=Jt.heatmapFbos.get(a.aU);ce&&(yr.activeTexture.set(Ir.TEXTURE0),Ir.bindTexture(Ir.TEXTURE_2D,ce.colorAttachment.get()),yr.activeTexture.set(Ir.TEXTURE1),ma(yr,Jt).bind(Ir.LINEAR,Ir.CLAMP_TO_EDGE),Yt.useProgram("heatmapTexture").draw(yr,Ir.TRIANGLES,Ln.disabled,wa.disabled,Yt.colorModeForRenderPass(),$i.disabled,Hr(Yt,Jt,0,1),null,Jt.id,Yt.viewportBuffer,Yt.quadTriangleIndexBuffer,Yt.viewportSegments,Jt.paint,Yt.transform.zoom))}(le,$e)})(w,B,Q,ee);break;case"line":(function(le,Ne,$e,pt){if(le.renderPass!=="translucent")return;let zt=$e.paint.get("line-opacity"),Yt=$e.paint.get("line-width");if(zt.constantOr(1)===0||Yt.constantOr(1)===0)return;let Jt=le.depthModeForSublayer(0,Ln.ReadOnly),yr=le.colorModeForRenderPass(),Ir=$e.paint.get("line-dasharray"),ce=$e.paint.get("line-pattern"),Ae=ce.constantOr(1),qe=$e.paint.get("line-gradient"),Ve=$e.getCrossfadeParameters(),ot=Ae?"linePattern":Ir?"lineSDF":qe?"lineGradient":"line",Ke=le.context,ft=Ke.gl,qt=!0;for(let Xt of pt){let $t=Ne.getTile(Xt);if(Ae&&!$t.patternsLoaded())continue;let dr=$t.getBucket($e);if(!dr)continue;let Mr=dr.programConfigurations.get($e.id),$r=le.context.program.get(),ii=le.useProgram(ot,Mr),pi=qt||ii.program!==$r,Yi=le.style.map.terrain&&le.style.map.terrain.getTerrainData(Xt),wn=ce.constantOr(null);if(wn&&$t.imageAtlas){let oo=$t.imageAtlas,el=oo.patternPositions[wn.to.toString()],ys=oo.patternPositions[wn.from.toString()];el&&ys&&Mr.setConstantPatternPositions(el,ys)}let Tn=Yi?Xt:null,ua=Ae?un(le,$t,$e,Ve,Tn):Ir?Zn(le,$t,$e,Ir,Ve,Tn):qe?Dn(le,$t,$e,dr.lineClipsArray.length,Tn):go(le,$t,$e,Tn);if(Ae)Ke.activeTexture.set(ft.TEXTURE0),$t.imageAtlasTexture.bind(ft.LINEAR,ft.CLAMP_TO_EDGE),Mr.updatePaintBuffers(Ve);else if(Ir&&(pi||le.lineAtlas.dirty))Ke.activeTexture.set(ft.TEXTURE0),le.lineAtlas.bind(Ke);else if(qe){let oo=dr.gradients[$e.id],el=oo.texture;if($e.gradientVersion!==oo.version){let ys=256;if($e.stepInterpolant){let il=Ne.getSource().maxzoom,$l=Xt.canonical.z===il?Math.ceil(1<<le.transform.maxZoom-Xt.canonical.z):1;ys=a.ac(a.aV(dr.maxLineLength/a.X*1024*$l),256,Ke.maxTextureSize)}oo.gradient=a.aW({expression:$e.gradientExpression(),evaluationKey:"lineProgress",resolution:ys,image:oo.gradient||void 0,clips:dr.lineClipsArray}),oo.texture?oo.texture.update(oo.gradient):oo.texture=new v(Ke,oo.gradient,ft.RGBA),oo.version=$e.gradientVersion,el=oo.texture}Ke.activeTexture.set(ft.TEXTURE0),el.bind($e.stepInterpolant?ft.NEAREST:ft.LINEAR,ft.CLAMP_TO_EDGE)}ii.draw(Ke,ft.TRIANGLES,Jt,le.stencilModeForClipping(Xt),yr,$i.disabled,ua,Yi,$e.id,dr.layoutVertexBuffer,dr.indexBuffer,dr.segments,$e.paint,le.transform.zoom,Mr,dr.layoutVertexBuffer2),qt=!1}})(w,B,Q,ee);break;case"fill":(function(le,Ne,$e,pt){let zt=$e.paint.get("fill-color"),Yt=$e.paint.get("fill-opacity");if(Yt.constantOr(1)===0)return;let Jt=le.colorModeForRenderPass(),yr=$e.paint.get("fill-pattern"),Ir=le.opaquePassEnabledForLayer()&&!yr.constantOr(1)&&zt.constantOr(a.aM.transparent).a===1&&Yt.constantOr(0)===1?"opaque":"translucent";if(le.renderPass===Ir){let ce=le.depthModeForSublayer(1,le.renderPass==="opaque"?Ln.ReadWrite:Ln.ReadOnly);To(le,Ne,$e,pt,ce,Jt,!1)}if(le.renderPass==="translucent"&&$e.paint.get("fill-antialias")){let ce=le.depthModeForSublayer($e.getPaintProperty("fill-outline-color")?2:0,Ln.ReadOnly);To(le,Ne,$e,pt,ce,Jt,!0)}})(w,B,Q,ee);break;case"fill-extrusion":(function(le,Ne,$e,pt){let zt=$e.paint.get("fill-extrusion-opacity");if(zt!==0&&le.renderPass==="translucent"){let Yt=new Ln(le.context.gl.LEQUAL,Ln.ReadWrite,le.depthRangeFor3D);if(zt!==1||$e.paint.get("fill-extrusion-pattern").constantOr(1))Ao(le,Ne,$e,pt,Yt,wa.disabled,Da.disabled),Ao(le,Ne,$e,pt,Yt,le.stencilModeFor3D(),le.colorModeForRenderPass());else{let Jt=le.colorModeForRenderPass();Ao(le,Ne,$e,pt,Yt,wa.disabled,Jt)}}})(w,B,Q,ee);break;case"hillshade":(function(le,Ne,$e,pt){if(le.renderPass!=="offscreen"&&le.renderPass!=="translucent")return;let zt=le.context,Yt=le.depthModeForSublayer(0,Ln.ReadOnly),Jt=le.colorModeForRenderPass(),[yr,Ir]=le.renderPass==="translucent"?le.stencilConfigForOverlap(pt):[{},pt];for(let ce of Ir){let Ae=Ne.getTile(ce);Ae.needsHillshadePrepare!==void 0&&Ae.needsHillshadePrepare&&le.renderPass==="offscreen"?Ki(le,Ae,$e,Yt,wa.disabled,Jt):le.renderPass==="translucent"&&la(le,ce,Ae,$e,Yt,yr[ce.overscaledZ],Jt)}zt.viewport.set([0,0,le.width,le.height])})(w,B,Q,ee);break;case"raster":(function(le,Ne,$e,pt){if(le.renderPass!=="translucent"||$e.paint.get("raster-opacity")===0||!pt.length)return;let zt=le.context,Yt=zt.gl,Jt=Ne.getSource(),yr=le.useProgram("raster"),Ir=le.colorModeForRenderPass(),[ce,Ae]=Jt instanceof Tt?[{},pt]:le.stencilConfigForOverlap(pt),qe=Ae[Ae.length-1].overscaledZ,Ve=!le.options.moving;for(let ot of Ae){let Ke=le.depthModeForSublayer(ot.overscaledZ-qe,$e.paint.get("raster-opacity")===1?Ln.ReadWrite:Ln.ReadOnly,Yt.LESS),ft=Ne.getTile(ot);ft.registerFadeDuration($e.paint.get("raster-fade-duration"));let qt=Ne.findLoadedParent(ot,0),Xt=Ne.findLoadedSibling(ot),$t=ho(ft,qt||Xt||null,Ne,$e,le.transform,le.style.map.terrain),dr,Mr,$r=$e.paint.get("raster-resampling")==="nearest"?Yt.NEAREST:Yt.LINEAR;zt.activeTexture.set(Yt.TEXTURE0),ft.texture.bind($r,Yt.CLAMP_TO_EDGE,Yt.LINEAR_MIPMAP_NEAREST),zt.activeTexture.set(Yt.TEXTURE1),qt?(qt.texture.bind($r,Yt.CLAMP_TO_EDGE,Yt.LINEAR_MIPMAP_NEAREST),dr=Math.pow(2,qt.tileID.overscaledZ-ft.tileID.overscaledZ),Mr=[ft.tileID.canonical.x*dr%1,ft.tileID.canonical.y*dr%1]):ft.texture.bind($r,Yt.CLAMP_TO_EDGE,Yt.LINEAR_MIPMAP_NEAREST),ft.texture.useMipmap&&zt.extTextureFilterAnisotropic&&le.transform.pitch>20&&Yt.texParameterf(Yt.TEXTURE_2D,zt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,zt.extTextureFilterAnisotropicMax);let ii=le.style.map.terrain&&le.style.map.terrain.getTerrainData(ot),pi=ii?ot:null,Yi=pi?pi.posMatrix:le.transform.calculatePosMatrix(ot.toUnwrapped(),Ve),wn=Bo(Yi,Mr||[0,0],dr||1,$t,$e);Jt instanceof Tt?yr.draw(zt,Yt.TRIANGLES,Ke,wa.disabled,Ir,$i.disabled,wn,ii,$e.id,Jt.boundsBuffer,le.quadTriangleIndexBuffer,Jt.boundsSegments):yr.draw(zt,Yt.TRIANGLES,Ke,ce[ot.overscaledZ],Ir,$i.disabled,wn,ii,$e.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}})(w,B,Q,ee);break;case"background":(function(le,Ne,$e,pt){let zt=$e.paint.get("background-color"),Yt=$e.paint.get("background-opacity");if(Yt===0)return;let Jt=le.context,yr=Jt.gl,Ir=le.transform,ce=Ir.tileSize,Ae=$e.paint.get("background-pattern");if(le.isPatternMissing(Ae))return;let qe=!Ae&&zt.a===1&&Yt===1&&le.opaquePassEnabledForLayer()?"opaque":"translucent";if(le.renderPass!==qe)return;let Ve=wa.disabled,ot=le.depthModeForSublayer(0,qe==="opaque"?Ln.ReadWrite:Ln.ReadOnly),Ke=le.colorModeForRenderPass(),ft=le.useProgram(Ae?"backgroundPattern":"background"),qt=pt||Ir.coveringTiles({tileSize:ce,terrain:le.style.map.terrain});Ae&&(Jt.activeTexture.set(yr.TEXTURE0),le.imageManager.bind(le.context));let Xt=$e.getCrossfadeParameters();for(let $t of qt){let dr=pt?$t.posMatrix:le.transform.calculatePosMatrix($t.toUnwrapped()),Mr=Ae?ts(dr,Yt,le,Ae,{tileID:$t,tileSize:ce},Xt):Xn(dr,Yt,zt),$r=le.style.map.terrain&&le.style.map.terrain.getTerrainData($t);ft.draw(Jt,yr.TRIANGLES,ot,Ve,Ke,$i.disabled,Mr,$r,$e.id,le.tileExtentBuffer,le.quadTriangleIndexBuffer,le.tileExtentSegments)}})(w,0,Q,ee);break;case"custom":(function(le,Ne,$e){let pt=le.context,zt=$e.implementation;if(le.renderPass==="offscreen"){let Yt=zt.prerender;Yt&&(le.setCustomLayerDefaults(),pt.setColorMode(le.colorModeForRenderPass()),Yt.call(zt,pt.gl,le.transform.customLayerMatrix()),pt.setDirty(),le.setBaseState())}else if(le.renderPass==="translucent"){le.setCustomLayerDefaults(),pt.setColorMode(le.colorModeForRenderPass()),pt.setStencilMode(wa.disabled);let Yt=zt.renderingMode==="3d"?new Ln(le.context.gl.LEQUAL,Ln.ReadWrite,le.depthRangeFor3D):le.depthModeForSublayer(0,Ln.ReadOnly);pt.setDepthMode(Yt),zt.render(pt.gl,le.transform.customLayerMatrix(),{farZ:le.transform.farZ,nearZ:le.transform.nearZ,fov:le.transform._fov,modelViewProjectionMatrix:le.transform.modelViewProjectionMatrix,projectionMatrix:le.transform.projectionMatrix}),pt.setDirty(),le.setBaseState(),pt.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,le){if(!Q[0]&&!Q[1])return w;let Ne=le?ee==="map"?this.transform.angle:0:ee==="viewport"?-this.transform.angle:0;if(Ne){let zt=Math.sin(Ne),Yt=Math.cos(Ne);Q=[Q[0]*Yt-Q[1]*zt,Q[0]*zt+Q[1]*Yt]}let $e=[le?Q[0]:Ei(B,Q[0],this.transform.zoom),le?Q[1]:Ei(B,Q[1],this.transform.zoom),0],pt=new Float32Array(16);return a.J(pt,w,$e),pt}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 Nr(this.context,Or[w],B,Ja[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 v(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 Xa{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($e=>{let pt=1/($e=a.af([],$e,w))[3]/B*ee;return a.b1($e,$e,[pt,pt,1/$e[3],pt])}),Ne=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map($e=>{let pt=function(yr,Ir){var ce=Ir[0],Ae=Ir[1],qe=Ir[2],Ve=ce*ce+Ae*Ae+qe*qe;return Ve>0&&(Ve=1/Math.sqrt(Ve)),yr[0]=Ir[0]*Ve,yr[1]=Ir[1]*Ve,yr[2]=Ir[2]*Ve,yr}([],function(yr,Ir,ce){var Ae=Ir[0],qe=Ir[1],Ve=Ir[2],ot=ce[0],Ke=ce[1],ft=ce[2];return yr[0]=qe*ft-Ve*Ke,yr[1]=Ve*ot-Ae*ft,yr[2]=Ae*Ke-qe*ot,yr}([],L([],le[$e[0]],le[$e[1]]),L([],le[$e[2]],le[$e[1]]))),zt=-((Yt=pt)[0]*(Jt=le[$e[1]])[0]+Yt[1]*Jt[1]+Yt[2]*Jt[2]);var Yt,Jt;return pt.concat(zt)});return new Xa(le,Ne)}}class Zo{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 Zo(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],Ne=0;for(let $e=0;$e<B.length;$e++)a.b2(le,B[$e])>=0&&Ne++;if(Ne===0)return 0;Ne!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let le=Number.MAX_VALUE,Ne=-Number.MAX_VALUE;for(let $e=0;$e<w.points.length;$e++){let pt=w.points[$e][ee]-this.min[ee];le=Math.min(le,pt),Ne=Math.max(Ne,pt)}if(Ne<0||le>this.max[ee]-this.min[ee])return 0}return 1}}class Eo{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 Eo(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let lo=85.051129;class $a{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 Eo,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new $a(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 Ne=ee[0],$e=ee[1],pt=ee[2],zt=ee[3],Yt=Math.sin(le),Jt=Math.cos(le);Q[0]=Ne*Jt+pt*Yt,Q[1]=$e*Jt+zt*Yt,Q[2]=Ne*-Yt+pt*Jt,Q[3]=$e*-Yt+zt*Jt}(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)),Ne=this.pointCoordinate(new a.P(0,this.height)),$e=Math.floor(Math.min(Q.x,ee.x,le.x,Ne.x)),pt=Math.floor(Math.max(Q.x,ee.x,le.x,Ne.x)),zt=1;for(let Yt=$e-zt;Yt<=pt+zt;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 Ne=this.pointCoordinate(this.getCameraPoint()),$e=a.Z.fromLngLat(this.center),pt=Math.pow(2,ee),zt=[pt*Ne.x,pt*Ne.y,0],Yt=[pt*$e.x,pt*$e.y,0],Jt=Xa.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),yr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(yr=ee);let Ir=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,ce=Ke=>({aabb:new Zo([Ke*pt,0,0],[(Ke+1)*pt,pt,0]),zoom:0,x:0,y:0,wrap:Ke,fullyVisible:!1}),Ae=[],qe=[],Ve=ee,ot=w.reparseOverscaled?le:ee;if(this._renderWorldCopies)for(let Ke=1;Ke<=3;Ke++)Ae.push(ce(-Ke)),Ae.push(ce(Ke));for(Ae.push(ce(0));Ae.length>0;){let Ke=Ae.pop(),ft=Ke.x,qt=Ke.y,Xt=Ke.fullyVisible;if(!Xt){let ii=Ke.aabb.intersects(Jt);if(ii===0)continue;Xt=ii===2}let $t=w.terrain?zt:Yt,dr=Ke.aabb.distanceX($t),Mr=Ke.aabb.distanceY($t),$r=Math.max(Math.abs(dr),Math.abs(Mr));if(Ke.zoom===Ve||$r>Ir+(1<<Ve-Ke.zoom)-2&&Ke.zoom>=yr){let ii=Ve-Ke.zoom,pi=zt[0]-.5-(ft<<ii),Yi=zt[1]-.5-(qt<<ii);qe.push({tileID:new a.S(Ke.zoom===Ve?ot:Ke.zoom,Ke.wrap,Ke.zoom,ft,qt),distanceSq:_([Yt[0]-.5-ft,Yt[1]-.5-qt]),tileDistanceToCamera:Math.sqrt(pi*pi+Yi*Yi)})}else for(let ii=0;ii<4;ii++){let pi=(ft<<1)+ii%2,Yi=(qt<<1)+(ii>>1),wn=Ke.zoom+1,Tn=Ke.aabb.quadrant(ii);if(w.terrain){let ua=new a.S(wn,Ke.wrap,wn,pi,Yi),oo=w.terrain.getMinMaxElevation(ua),el=(B=oo.minElevation)!==null&&B!==void 0?B:this.elevation,ys=(Q=oo.maxElevation)!==null&&Q!==void 0?Q:this.elevation;Tn=new Zo([Tn.min[0],Tn.min[1],el],[Tn.max[0],Tn.max[1],ys])}Ae.push({aabb:Tn,zoom:wn,x:pi,y:Yi,wrap:Ke.wrap,fullyVisible:Xt})}}return qe.sort((Ke,ft)=>Ke.distanceSq-ft.distanceSq).map(Ke=>Ke.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,lo);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 Ne=Q+B-le,$e=Math.cos(this._pitch)*this.cameraToCenterDistance/Ne/a.b5(1,ee.lat),pt=this.scaleZoom($e/this.tileSize);this._elevation=le,this._center=ee,this.zoom=pt}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),le=this.locationCoordinate(w),Ne=new a.Z(le.x-(Q.x-ee.x),le.y-(Q.y-ee.y));this.center=this.coordinateLocation(Ne),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 yr=B.pointCoordinate(w);if(yr!=null)return yr}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],Ne=ee[3],$e=Q[1]/le,pt=ee[1]/Ne,zt=Q[2]/le,Yt=ee[2]/Ne,Jt=zt===Yt?0:(0-zt)/(Yt-zt);return new a.Z(a.y.number(Q[0]/le,ee[0]/Ne,Jt)/this.worldSize,a.y.number($e,pt,Jt)/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 fe().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 fe([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,lo])}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 Ke=179.9999999999;ee=[-Ke,Ke]}let le=this.tileSize*this.zoomScale(Q.zoom),Ne=0,$e=le,pt=0,zt=le,Yt=0,Jt=0,{x:yr,y:Ir}=this.size;if(this.latRange){let Ke=this.latRange;Ne=a.Q(Ke[1])*le,$e=a.Q(Ke[0])*le,$e-Ne<Ir&&(Yt=Ir/($e-Ne))}ee&&(pt=a.b3(a.O(ee[0])*le,0,le),zt=a.b3(a.O(ee[1])*le,0,le),zt<pt&&(zt+=le),zt-pt<yr&&(Jt=yr/(zt-pt)));let{x:ce,y:Ae}=this.project.call({worldSize:le},w),qe,Ve,ot=Math.max(Jt||0,Yt||0);if(ot){let Ke=new a.P(Jt?(zt+pt)/2:ce,Yt?($e+Ne)/2:Ae);return Q.center=this.unproject.call({worldSize:le},Ke).wrap(),Q.zoom+=this.scaleZoom(ot),Q}if(this.latRange){let Ke=Ir/2;Ae-Ke<Ne&&(Ve=Ne+Ke),Ae+Ke>$e&&(Ve=$e-Ke)}if(ee){let Ke=(pt+zt)/2,ft=ce;this._renderWorldCopies&&(ft=a.b3(ce,Ke-le/2,Ke+le/2));let qt=yr/2;ft-qt<pt&&(qe=pt+qt),ft+qt>zt&&(qe=zt-qt)}if(qe!==void 0||Ve!==void 0){let Ke=new a.P(qe!=null?qe:ce,Ve!=null?Ve:Ae);Q.center=this.unproject.call({worldSize:le},Ke).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),Ne=Math.min(this.elevation,this.minElevationForCurrentTile),$e=le-Ne*this._pixelPerMeter/Math.cos(this._pitch),pt=Ne<0?$e:le,zt=Math.PI/2+this._pitch,Yt=this._fov*(.5+w.y/this.height),Jt=Math.sin(Yt)*pt/Math.sin(a.ac(Math.PI-zt-Yt,.01,Math.PI-.01)),yr=this.getHorizon(),Ir=2*Math.atan(yr/this.cameraToCenterDistance)*(.5+w.y/(2*yr)),ce=Math.sin(Ir)*pt/Math.sin(a.ac(Math.PI-zt-Ir,.01,Math.PI-.01)),Ae=Math.min(Jt,ce);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Ae+pt),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 qe=this.width%2/2,Ve=this.height%2/2,ot=Math.cos(this.angle),Ke=Math.sin(this.angle),ft=B-Math.round(B)+ot*qe+Ke*Ve,qt=Q-Math.round(Q)+ot*Ve+Ke*qe,Xt=new Float64Array(ee);if(a.J(Xt,Xt,[ft>.5?ft-1:ft,qt>.5?qt-1:qt,0]),this.alignedModelViewProjectionMatrix=Xt,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,Ne=B.y;for(let $e of w)Q=Math.min(Q,$e.x),ee=Math.min(ee,$e.y),le=Math.max(le,$e.x),Ne=Math.max(Ne,$e.y);return[new a.P(Q,ee),new a.P(le,ee),new a.P(le,Ne),new a.P(Q,Ne),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 Xo(oe,w){let B,Q=!1,ee=null,le=null,Ne=()=>{ee=null,Q&&(oe.apply(le,B),ee=setTimeout(Ne,w),Q=!1)};return(...$e)=>(Q=!0,le=this,B=$e,ee||Ne(),ee)}class rs{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 Ne=window.location.href.replace(/(#.+)?$/,le);Ne=Ne.replace("&&","&"),window.history.replaceState(window.history.state,null,Ne)},this._updateHash=Xo(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),Ne=Math.round(B.lng*le)/le,$e=Math.round(B.lat*le)/le,pt=this._map.getBearing(),zt=this._map.getPitch(),Yt="";if(Yt+=w?`/${Ne}/${$e}/${Q}`:`${Q}/${$e}/${Ne}`,(pt||zt)&&(Yt+="/"+Math.round(10*pt)/10),zt&&(Yt+=`/${Math.round(zt)}`),this._hashName){let Jt=this._hashName,yr=!1,Ir=window.location.hash.slice(1).split("&").map(ce=>{let Ae=ce.split("=")[0];return Ae===Jt?(yr=!0,`${Ae}=${Yt}`):ce}).filter(ce=>ce);return yr||Ir.push(`${Jt}=${Yt}`),`#${Ir.join("&")}`}return`#${Yt}`}}let $n={linearity:.3,easing:a.b8(0,0,.3,1)},Sn=a.e({deceleration:2500,maxSpeed:1400},$n),uo=a.e({deceleration:20,maxSpeed:1400},$n),Rs=a.e({deceleration:1e3,maxSpeed:360},$n),xs=a.e({deceleration:1e3,maxSpeed:90},$n);class Go{constructor(w){this._map=w,this.clear()}clear(){this._inertiaBuffer=[]}record(w){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:l.now(),settings:w})}_drainInertiaBuffer(){let w=this._inertiaBuffer,B=l.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=So(B.pan.mag(),Q,a.e({},Sn,w||{}));ee.offset=B.pan.mult(le.amount/B.pan.mag()),ee.center=this._map.transform.center,os(ee,le)}if(B.zoom){let le=So(B.zoom,Q,uo);ee.zoom=this._map.transform.zoom+le.amount,os(ee,le)}if(B.bearing){let le=So(B.bearing,Q,Rs);ee.bearing=this._map.transform.bearing+a.ac(le.amount,-179,179),os(ee,le)}if(B.pitch){let le=So(B.pitch,Q,xs);ee.pitch=this._map.transform.pitch+le.amount,os(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 os(oe,w){(!oe.duration||oe.duration<w.duration)&&(oe.duration=w.duration,oe.easing=w.easing)}function So(oe,w,B){let{maxSpeed:Q,linearity:ee,deceleration:le}=B,Ne=a.ac(oe*ee/(w/1e3),-Q,Q),$e=Math.abs(Ne)/(le*ee);return{easing:B.easing,duration:1e3*$e,amount:Ne*($e/2)}}class Qn extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q,ee={}){let le=f.mousePos(B.getCanvas(),Q),Ne=B.unproject(le);super(w,a.e({point:le,lngLat:Ne,originalEvent:Q},ee)),this._defaultPrevented=!1,this.target=B}}class zo 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=f.touchPos(B.getCanvasContainer(),ee),Ne=le.map(pt=>B.unproject(pt)),$e=le.reduce((pt,zt,Yt,Jt)=>pt.add(zt.div(Jt.length)),new a.P(0,0));super(w,{points:le,point:$e,lngLats:Ne,lngLat:B.unproject($e),originalEvent:Q}),this._defaultPrevented=!1}}class rl extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class $o{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new rl(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new Qn(w.type,this._map,w))}mouseup(w){this._map.fire(new Qn(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new Qn(w.type,this._map,w))}dblclick(w){return this._firePreventable(new Qn(w.type,this._map,w))}mouseover(w){this._map.fire(new Qn(w.type,this._map,w))}mouseout(w){this._map.fire(new Qn(w.type,this._map,w))}touchstart(w){return this._firePreventable(new zo(w.type,this._map,w))}touchmove(w){this._map.fire(new zo(w.type,this._map,w))}touchend(w){this._map.fire(new zo(w.type,this._map,w))}touchcancel(w){this._map.fire(new zo(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Na{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new Qn(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new Qn(w.type,this._map,w)),this._map.listens("contextmenu")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ua{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 Po{constructor(w,B){this._map=w,this._tr=new Ua(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&&(f.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=f.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",w));let le=Math.min(ee.x,Q.x),Ne=Math.max(ee.x,Q.x),$e=Math.min(ee.y,Q.y),pt=Math.max(ee.y,Q.y);f.setTransform(this._box,`translate(${le}px,${$e}px)`),this._box.style.width=Ne-le+"px",this._box.style.height=pt-$e+"px"}mouseupWindow(w,B){if(!this._active||w.button!==0)return;let Q=this._startPos,ee=B;if(this.reset(),f.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&&(f.remove(this._box),this._box=null),f.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(w,B){return this._map.fire(new a.k(w,{originalEvent:B}))}}function fo(oe,w){if(oe.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${oe.length}, points ${w.length}`);let B={};for(let Q=0;Q<oe.length;Q++)B[oe[Q].identifier]=w[Q];return B}class ro{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 Ne of ee)le._add(Ne);return le.div(ee.length)}(B),this.touches=fo(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=fo(Q,B);for(let le in this.touches){let Ne=ee[le];(!Ne||Ne.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 Ma{constructor(w){this.singleTap=new ro(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,Ne=!this.lastTap||this.lastTap.dist(ee)<30;if(le&&Ne||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class io{constructor(w){this._tr=new Ua(w),this._zoomIn=new Ma({numTouches:1,numTaps:2}),this._zoomOut=new Ma({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),Ne=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:$e=>$e.easeTo({duration:300,zoom:Ne.zoom+1,around:Ne.unproject(ee)},{originalEvent:w})}):le?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:$e=>$e.easeTo({duration:300,zoom:Ne.zoom-1,around:Ne.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 aa{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&&f.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 Oo={0:1,2:2};class No{constructor(w){this._correctEvent=w.checkCorrectEvent}startMove(w){let B=f.mouseButton(w);this._eventButton=B}endMove(w){delete this._eventButton}isValidStartEvent(w){return this._correctEvent(w)}isValidMoveEvent(w){return!function(B,Q){let ee=Oo[Q];return B.buttons===void 0||(B.buttons&ee)!==ee}(w,this._eventButton)}isValidEndEvent(w){return f.mouseButton(w)===this._eventButton}}class Zs{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 Fs=oe=>{oe.mousedown=oe.dragStart,oe.mousemoveWindow=oe.dragMove,oe.mouseup=oe.dragEnd,oe.contextmenu=w=>{w.preventDefault()}},ws=({enable:oe,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new No({checkCorrectEvent:ee=>f.mouseButton(ee)===0&&ee.ctrlKey||f.mouseButton(ee)===2});return new aa({clickTolerance:w,move:(ee,le)=>({bearingDelta:(le.x-ee.x)*B}),moveStateManager:Q,enable:oe,assignEvents:Fs})},no=({enable:oe,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new No({checkCorrectEvent:ee=>f.mouseButton(ee)===0&&ee.ctrlKey||f.mouseButton(ee)===2});return new aa({clickTolerance:w,move:(ee,le)=>({pitchDelta:(le.y-ee.y)*B}),moveStateManager:Q,enable:oe,assignEvents:Fs})};class Ls{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=fo(Q,B),le=new a.P(0,0),Ne=new a.P(0,0),$e=0;for(let zt in ee){let Yt=ee[zt],Jt=this._touches[zt];Jt&&(le._add(Yt),Ne._add(Yt.sub(Jt)),$e++,ee[zt]=Yt)}if(this._touches=ee,this._shouldBePrevented($e)||!Ne.mag())return;let pt=Ne.div($e);return this._sum._add(pt),this._sum.mag()<this._clickTolerance?void 0:{around:le.div($e),panDelta:pt}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ds{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,Ne=Xs(Q,B,ee),$e=Xs(Q,B,le);if(!Ne||!$e)return;let pt=this._aroundCenter?null:Ne.add($e).div(2);return this._move([Ne,$e],pt,w)}touchend(w,B,Q){if(!this._firstTwoTouches)return;let[ee,le]=this._firstTwoTouches,Ne=Xs(Q,B,ee),$e=Xs(Q,B,le);Ne&&$e||(this._active&&f.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 Xs(oe,w,B){for(let Q=0;Q<oe.length;Q++)if(oe[Q].identifier===B)return w[Q]}function oa(oe,w){return Math.log(oe/w)/Math.LN2}class Yo extends ds{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(oa(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:oa(this._distance,Q),pinchAround:B}}}function po(oe,w){return 180*oe.angleWith(w)/Math.PI}class ss extends ds{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:po(this._vector,ee),pinchAround:B}}_isBelowThreshold(w){this._minDiameter=Math.min(this._minDiameter,w.mag());let B=25/(Math.PI*this._minDiameter)*360,Q=po(w,this._startVector);return Math.abs(Q)<B}}function ls(oe){return Math.abs(oe.y)>Math.abs(oe.x)}class gs extends ds{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,ls(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 Ne=w.y>0==B.y>0;return ls(w)&&ls(B)&&Ne}}let bt={panStep:100,bearingStep:15,pitchStep:10};class Ft{constructor(w){this._tr=new Ua(w);let B=bt;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,Ne=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(),Ne=-1);break;case 40:w.shiftKey?ee=-1:(w.preventDefault(),Ne=1);break;default:return}return this._rotationDisabled&&(Q=0,ee=0),{cameraAnimation:$e=>{let pt=this._tr;$e.easeTo({duration:300,easeId:"keyboardHandler",easing:hr,zoom:B?Math.round(pt.zoom)+B*(w.shiftKey?2:1):pt.zoom,bearing:pt.bearing+Q*this._bearingStep,pitch:pt.pitch+ee*this._pitchStep,offset:[-le*this._panStep,-Ne*this._panStep],center:pt.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 hr(oe){return oe*(2-oe)}let nr=4.000244140625;class Sr{constructor(w,B){this._onTimeout=Q=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new Ua(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=l.now(),ee=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,B!==0&&B%nr==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=f.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 pt=this._type==="wheel"&&Math.abs(this._delta)>nr?this._wheelZoomRate:this._defaultZoomRate,zt=2/(1+Math.exp(-Math.abs(this._delta*pt)));this._delta<0&&zt!==0&&(zt=1/zt);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*zt))),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,Ne=!1,$e=l.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Q&&ee&&$e){let pt=Math.min($e/200,1),zt=ee(pt);le=a.y.number(Q,B,zt),pt<1?this._frameId||(this._frameId=!0):Ne=!0}else le=B,Ne=!0;return this._active=!0,Ne&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Ne,zoomDelta:le-w.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(w){let B=a.b9;if(this._prevEase){let Q=this._prevEase,ee=(l.now()-Q.start)/Q.duration,le=Q.easing(ee+.01)-Q.easing(ee),Ne=.27/Math.sqrt(le*le+1e-4)*.01,$e=Math.sqrt(.0729-Ne*Ne);B=a.b8(Ne,$e,.25,1)}return this._prevEase={start:l.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 li{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 di{constructor(w){this._tr=new Ua(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 mi{constructor(){this._tap=new Ma({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,Ne=this._tapPoint.dist(ee)<30;le&&Ne?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 Oi{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 dn{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 wi{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 ui{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=f.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&&(f.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 Ai=oe=>oe.zoom||oe.drag||oe.pitch||oe.rotate;class gi extends a.k{}function gn(oe){return oe.panDelta&&oe.panDelta.mag()||oe.zoomDelta||oe.bearingDelta||oe.pitchDelta}class In{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 Ne=ee.type==="renderFrame"?void 0:ee,$e={needsRenderFrame:!1},pt={},zt={},Yt=ee.touches,Jt=Yt?this._getMapTouches(Yt):void 0,yr=Jt?f.touchPos(this._map.getCanvas(),Jt):f.mousePos(this._map.getCanvas(),ee);for(let{handlerName:Ae,handler:qe,allowed:Ve}of this._handlers){if(!qe.isEnabled())continue;let ot;this._blockedByActive(zt,Ve,Ae)?qe.reset():qe[le||ee.type]&&(ot=qe[le||ee.type](ee,yr,Jt),this.mergeHandlerResult($e,pt,ot,Ae,Ne),ot&&ot.needsRenderFrame&&this._triggerRenderFrame()),(ot||qe.isActive())&&(zt[Ae]=qe)}let Ir={};for(let Ae in this._previousActiveHandlers)zt[Ae]||(Ir[Ae]=Ne);this._previousActiveHandlers=zt,(Object.keys(Ir).length||gn($e))&&(this._changes.push([$e,pt,Ir]),this._triggerRenderFrame()),(Object.keys(zt).length||gn($e))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:ce}=$e;ce&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ce(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Go(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,Ne]of this._listeners)f.addEventListener(ee,le,ee===document?this.handleWindowEvent:this.handleEvent,Ne)}destroy(){for(let[w,B,Q]of this._listeners)f.removeEventListener(w,B,w===document?this.handleWindowEvent:this.handleEvent,Q)}_addDefaultHandlers(w){let B=this._map,Q=B.getCanvasContainer();this._add("mapEvent",new $o(B,w));let ee=B.boxZoom=new Po(B,w);this._add("boxZoom",ee),w.interactive&&w.boxZoom&&ee.enable();let le=B.cooperativeGestures=new ui(B,w.cooperativeGestures);this._add("cooperativeGestures",le),w.cooperativeGestures&&le.enable();let Ne=new io(B),$e=new di(B);B.doubleClickZoom=new li($e,Ne),this._add("tapZoom",Ne),this._add("clickZoom",$e),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let pt=new mi;this._add("tapDragZoom",pt);let zt=B.touchPitch=new gs(B);this._add("touchPitch",zt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Yt=ws(w),Jt=no(w);B.dragRotate=new dn(w,Yt,Jt),this._add("mouseRotate",Yt,["mousePitch"]),this._add("mousePitch",Jt,["mouseRotate"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let yr=(({enable:ot,clickTolerance:Ke})=>{let ft=new No({checkCorrectEvent:qt=>f.mouseButton(qt)===0&&!qt.ctrlKey});return new aa({clickTolerance:Ke,move:(qt,Xt)=>({around:Xt,panDelta:Xt.sub(qt)}),activateOnStart:!0,moveStateManager:ft,enable:ot,assignEvents:Fs})})(w),Ir=new Ls(w,B);B.dragPan=new Oi(Q,yr,Ir),this._add("mousePan",yr),this._add("touchPan",Ir,["touchZoom","touchRotate"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let ce=new ss,Ae=new Yo;B.touchZoomRotate=new wi(Q,Ae,ce,pt),this._add("touchRotate",ce,["touchPan","touchZoom"]),this._add("touchZoom",Ae,["touchPan","touchRotate"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let qe=B.scrollZoom=new Sr(B,()=>this._triggerRenderFrame());this._add("scrollZoom",qe,["mousePan"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let Ve=B.keyboard=new Ft(B);this._add("keyboard",Ve),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add("blockableMapEvent",new Na(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!!Ai(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 Ne={handlerName:ee,originalEvent:Q.originalEvent||le};Q.zoomDelta!==void 0&&(B.zoom=Ne),Q.panDelta!==void 0&&(B.drag=Ne),Q.pitchDelta!==void 0&&(B.pitch=Ne),Q.bearingDelta!==void 0&&(B.rotate=Ne)}_applyChanges(){let w={},B={},Q={};for(let[ee,le,Ne]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,Ne);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,le=ee._getTransformForUpdate(),Ne=ee.terrain;if(!(gn(w)||Ne&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:$e,zoomDelta:pt,bearingDelta:zt,pitchDelta:Yt,around:Jt,pinchAround:yr}=w;yr!==void 0&&(Jt=yr),ee._stop(!0),Jt=Jt||ee.transform.centerPoint;let Ir=le.pointLocation($e?Jt.sub($e):Jt);zt&&(le.bearing+=zt),Yt&&(le.pitch+=Yt),pt&&(le.zoom+=pt),Ne?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?le.center=le.pointLocation(le.centerPoint.sub($e)):le.setLocationAtPoint(Ir,Jt):(this._terrainMovement=!0,this._map._elevationFreeze=!0,le.setLocationAtPoint(Ir,Jt)):le.setLocationAtPoint(Ir,Jt),ee._applyUpdatedTransform(le),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=Ai(this._eventsInProgress),le=Ai(w),Ne={};for(let Jt in w){let{originalEvent:yr}=w[Jt];this._eventsInProgress[Jt]||(Ne[`${Jt}start`]=yr),this._eventsInProgress[Jt]=w[Jt]}!ee&&le&&this._fireEvent("movestart",le.originalEvent);for(let Jt in Ne)this._fireEvent(Jt,Ne[Jt]);le&&this._fireEvent("move",le.originalEvent);for(let Jt in w){let{originalEvent:yr}=w[Jt];this._fireEvent(Jt,yr)}let $e={},pt;for(let Jt in this._eventsInProgress){let{handlerName:yr,originalEvent:Ir}=this._eventsInProgress[Jt];this._handlersById[yr].isActive()||(delete this._eventsInProgress[Jt],pt=B[yr]||Ir,$e[`${Jt}end`]=pt)}for(let Jt in $e)this._fireEvent(Jt,$e[Jt]);let zt=Ai(this._eventsInProgress),Yt=(ee||le)&&!zt;if(Yt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Jt=this._map._getTransformForUpdate();Jt.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Jt)}if(Q&&Yt){this._updatingCamera=!0;let Jt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),yr=Ir=>Ir!==0&&-this._bearingSnap<Ir&&Ir<this._bearingSnap;!Jt||!Jt.essential&&l.prefersReducedMotion?(this._map.fire(new a.k("moveend",{originalEvent:pt})),yr(this._map.getBearing())&&this._map.resetNorth()):(yr(Jt.bearing||this._map.getBearing())&&(Jt.bearing=0),Jt.freezeElevation=!0,this._map.easeTo(Jt,{originalEvent:pt})),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 gi("renderFrame",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Vn extends a.E{constructor(w,B){super(),this._renderFrameCallback=()=>{let Q=Math.min((l.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=fe.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 ii=ee.padding;ee.padding={top:ii,bottom:ii,right:ii,left:ii}}ee.padding=a.e(le,ee.padding);let Ne=this.transform,$e=Ne.padding,pt=new fe(w,B),zt=Ne.project(pt.getNorthWest()),Yt=Ne.project(pt.getNorthEast()),Jt=Ne.project(pt.getSouthEast()),yr=Ne.project(pt.getSouthWest()),Ir=a.ba(-Q),ce=zt.rotate(Ir),Ae=Yt.rotate(Ir),qe=Jt.rotate(Ir),Ve=yr.rotate(Ir),ot=new a.P(Math.max(ce.x,Ae.x,Ve.x,qe.x),Math.max(ce.y,Ae.y,Ve.y,qe.y)),Ke=new a.P(Math.min(ce.x,Ae.x,Ve.x,qe.x),Math.min(ce.y,Ae.y,Ve.y,qe.y)),ft=ot.sub(Ke),qt=(Ne.width-($e.left+$e.right+ee.padding.left+ee.padding.right))/ft.x,Xt=(Ne.height-($e.top+$e.bottom+ee.padding.top+ee.padding.bottom))/ft.y;if(Xt<0||qt<0)return void a.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");let $t=Math.min(Ne.scaleZoom(Ne.scale*Math.min(qt,Xt)),ee.maxZoom),dr=a.P.convert(ee.offset),Mr=new a.P((ee.padding.left-ee.padding.right)/2,(ee.padding.top-ee.padding.bottom)/2).rotate(a.ba(Q)),$r=dr.add(Mr).mult(Ne.scale/Ne.zoomScale($t));return{center:Ne.unproject(zt.add(Jt).div(2).sub($r)),zoom:$t,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,Ne=!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&&(Ne=!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)),Ne&&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),Ne=a.Z.fromLngLat(Q,ee),$e=Ne.x-le.x,pt=Ne.y-le.y,zt=Ne.z-le.z,Yt=Math.hypot($e,pt,zt);if(Yt===0)throw new Error("Can't calculate camera options with same From and To");let Jt=Math.hypot($e,pt),yr=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Yt/this.transform.tileSize),Ir=180*Math.atan2($e,-pt)/Math.PI,ce=180*Math.acos(Jt/Yt)/Math.PI;return ce=zt<0?90-ce:90+ce,{center:Ne.toLngLat(),zoom:yr,pitch:ce,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&&l.prefersReducedMotion)&&(w.duration=0);let ee=this._getTransformForUpdate(),le=ee.zoom,Ne=ee.bearing,$e=ee.pitch,pt=ee.padding,zt="bearing"in w?this._normalizeBearing(w.bearing,Ne):Ne,Yt="pitch"in w?+w.pitch:$e,Jt="padding"in w?w.padding:ee.padding,yr=a.P.convert(w.offset),Ir=ee.centerPoint.add(yr),ce=ee.pointLocation(Ir),{center:Ae,zoom:qe}=ee.getConstrained(a.N.convert(w.center||ce),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(Ae,ee);let Ve=ee.project(ce),ot=ee.project(Ae).sub(Ve),Ke=ee.zoomScale(qe-le),ft,qt;w.around&&(ft=a.N.convert(w.around),qt=ee.locationPoint(ft));let Xt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||qe!==le,this._rotating=this._rotating||Ne!==zt,this._pitching=this._pitching||Yt!==$e,this._padding=!ee.isPaddingEqual(Jt),this._easeId=w.easeId,this._prepareEase(B,w.noMoveStart,Xt),this.terrain&&this._prepareElevation(Ae),this._ease($t=>{if(this._zooming&&(ee.zoom=a.y.number(le,qe,$t)),this._rotating&&(ee.bearing=a.y.number(Ne,zt,$t)),this._pitching&&(ee.pitch=a.y.number($e,Yt,$t)),this._padding&&(ee.interpolatePadding(pt,Jt,$t),Ir=ee.centerPoint.add(yr)),this.terrain&&!w.freezeElevation&&this._updateElevation($t),ft)ee.setLocationAtPoint(ft,qt);else{let dr=ee.zoomScale(ee.zoom-le),Mr=qe>le?Math.min(2,Ke):Math.max(.5,Ke),$r=Math.pow(Mr,1-$t),ii=ee.unproject(Ve.add(ot.mult($t*$r)).mult(dr));ee.setLocationAtPoint(ee.renderWorldCopies?ii.wrap():ii,Ir)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},$t=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,$t)},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:Ne,zoom:$e,pitch:pt,bearing:zt,elevation:Yt}=ee(le);Ne&&(le.center=Ne),$e!==void 0&&(le.zoom=$e),pt!==void 0&&(le.pitch=pt),zt!==void 0&&(le.bearing=zt),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&&l.prefersReducedMotion){let ua=a.M(w,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ua,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,Ne=ee.bearing,$e=ee.pitch,pt=ee.padding,zt="bearing"in w?this._normalizeBearing(w.bearing,Ne):Ne,Yt="pitch"in w?+w.pitch:$e,Jt="padding"in w?w.padding:ee.padding,yr=a.P.convert(w.offset),Ir=ee.centerPoint.add(yr),ce=ee.pointLocation(Ir),{center:Ae,zoom:qe}=ee.getConstrained(a.N.convert(w.center||ce),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(Ae,ee);let Ve=ee.zoomScale(qe-le),ot=ee.project(ce),Ke=ee.project(Ae).sub(ot),ft=w.curve,qt=Math.max(ee.width,ee.height),Xt=qt/Ve,$t=Ke.mag();if("minZoom"in w){let ua=a.ac(Math.min(w.minZoom,le,qe),ee.minZoom,ee.maxZoom),oo=qt/ee.zoomScale(ua-le);ft=Math.sqrt(oo/$t*2)}let dr=ft*ft;function Mr(ua){let oo=(Xt*Xt-qt*qt+(ua?-1:1)*dr*dr*$t*$t)/(2*(ua?Xt:qt)*dr*$t);return Math.log(Math.sqrt(oo*oo+1)-oo)}function $r(ua){return(Math.exp(ua)-Math.exp(-ua))/2}function ii(ua){return(Math.exp(ua)+Math.exp(-ua))/2}let pi=Mr(!1),Yi=function(ua){return ii(pi)/ii(pi+ft*ua)},wn=function(ua){return qt*((ii(pi)*($r(oo=pi+ft*ua)/ii(oo))-$r(pi))/dr)/$t;var oo},Tn=(Mr(!0)-pi)/ft;if(Math.abs($t)<1e-6||!isFinite(Tn)){if(Math.abs(qt-Xt)<1e-6)return this.easeTo(w,B);let ua=Xt<qt?-1:1;Tn=Math.abs(Math.log(Xt/qt))/ft,wn=()=>0,Yi=oo=>Math.exp(ua*ft*oo)}return w.duration="duration"in w?+w.duration:1e3*Tn/("screenSpeed"in w?+w.screenSpeed/ft:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=Ne!==zt,this._pitching=Yt!==$e,this._padding=!ee.isPaddingEqual(Jt),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(Ae),this._ease(ua=>{let oo=ua*Tn,el=1/Yi(oo);ee.zoom=ua===1?qe:le+ee.scaleZoom(el),this._rotating&&(ee.bearing=a.y.number(Ne,zt,ua)),this._pitching&&(ee.pitch=a.y.number($e,Yt,ua)),this._padding&&(ee.interpolatePadding(pt,Jt,ua),Ir=ee.centerPoint.add(yr)),this.terrain&&!w.freezeElevation&&this._updateElevation(ua);let ys=ua===1?Ae:ee.unproject(ot.add(Ke.mult(wn(oo))).mult(el));ee.setLocationAtPoint(ee.renderWorldCopies?ys.wrap():ys,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=l.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 Rn={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Hn{constructor(w=Rn){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=f.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=f.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=f.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(){f.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 Ne=le.getSource();Ne.attribution&&w.indexOf(Ne.attribution)<0&&w.push(Ne.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,le)=>ee.length-le.length),w=w.filter((ee,le)=>{for(let Ne=le+1;Ne<w.length;Ne++)if(w[Ne].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 Gn{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=f.create("div","maplibregl-ctrl");let B=f.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(){f.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class pn{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 Lo=a.Y([{name:"a_pos3d",type:"Int16",components:3}]);class us 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 ct(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 Ne=ee.canonical.z-w.canonical.z,$e=ee.canonical.x-(ee.canonical.x>>Ne<<Ne),pt=ee.canonical.y-(ee.canonical.y>>Ne<<Ne),zt=a.X>>Ne;a.aP(le.posMatrix,0,zt,0,zt,0,1),a.J(le.posMatrix,le.posMatrix,[-$e*zt,-pt*zt,0]),B[Q]=le}else if(w.canonical.isChildOf(ee.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let Ne=w.canonical.z-ee.canonical.z,$e=w.canonical.x-(w.canonical.x>>Ne<<Ne),pt=w.canonical.y-(w.canonical.y>>Ne<<Ne),zt=a.X>>Ne;a.aP(le.posMatrix,0,a.X,0,a.X,0,1),a.J(le.posMatrix,le.posMatrix,[$e*zt,pt*zt,0]),a.K(le.posMatrix,le.posMatrix,[1/2**Ne,1/2**Ne,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 Bs{constructor(w,B,Q){this.painter=w,this.sourceCache=new us(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 Ne=this.getTerrainData(w),$e=(le=Ne.tile)===null||le===void 0?void 0:le.dem;if(!$e)return 0;let pt=function(ce,Ae,qe){var Ve=Ae[0],ot=Ae[1];return ce[0]=qe[0]*Ve+qe[4]*ot+qe[12],ce[1]=qe[1]*Ve+qe[5]*ot+qe[13],ce}([],[B/ee*a.X,Q/ee*a.X],Ne.u_terrain_matrix),zt=[pt[0]*$e.dim,pt[1]*$e.dim],Yt=Math.floor(zt[0]),Jt=Math.floor(zt[1]),yr=zt[0]-Yt,Ir=zt[1]-Jt;return $e.get(Yt,Jt)*(1-yr)*(1-Ir)+$e.get(Yt+1,Jt)*yr*(1-Ir)+$e.get(Yt,Jt+1)*(1-yr)*Ir+$e.get(Yt+1,Jt+1)*yr*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 v(ee,le,ee.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new v(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 v(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 Ne=w.canonical.x-(w.canonical.x>>le<<le),$e=w.canonical.y-(w.canonical.y>>le<<le),pt=a.bc(new Float64Array(16),[1/(a.X<<le),1/(a.X<<le),0]);a.J(pt,pt,[Ne*a.X,$e*a.X,0]),this._demMatrixCache[w.key]={matrix:pt,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 v(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 v(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,Ne=0;le<this._coordsTextureSize;le++)for(let $e=0;$e<this._coordsTextureSize;$e++,Ne+=4)B[Ne+0]=255&$e,B[Ne+1]=255&le,B[Ne+2]=$e>>8<<4|le>>8,B[Ne+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new v(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),Ne=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),$e=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ee.readPixels(le,$e-Ne-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let pt=B[0]+(B[2]>>4<<8),zt=B[1]+((15&B[2])<<8),Yt=this.coordsIndex[255-B[3]],Jt=Yt&&this.sourceCache.getTileByID(Yt);if(!Jt)return null;let yr=this._coordsTextureSize,Ir=(1<<Jt.tileID.canonical.z)*yr;return new a.Z((Jt.tileID.canonical.x*yr+pt)/Ir+Jt.tileID.wrap,(Jt.tileID.canonical.y*yr+zt)/Ir,this.getElevation(Jt.tileID,pt,zt,yr))}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,Ne=ee*ee;for(let Jt=0;Jt<=ee;Jt++)for(let yr=0;yr<=ee;yr++)B.emplaceBack(yr*le,Jt*le,0);for(let Jt=0;Jt<Ne;Jt+=ee+1)for(let yr=0;yr<ee;yr++)Q.emplaceBack(yr+Jt,ee+yr+Jt+1,ee+yr+Jt+2),Q.emplaceBack(yr+Jt,ee+yr+Jt+2,yr+Jt+1);let $e=B.length,pt=$e+2*(ee+1);for(let Jt of[0,1])for(let yr=0;yr<=ee;yr++)for(let Ir of[0,1])B.emplaceBack(yr*le,Jt*a.X,Ir);for(let Jt=0;Jt<2*ee;Jt+=2)Q.emplaceBack(pt+Jt,pt+Jt+1,pt+Jt+3),Q.emplaceBack(pt+Jt,pt+Jt+3,pt+Jt+2),Q.emplaceBack($e+Jt,$e+Jt+3,$e+Jt+1),Q.emplaceBack($e+Jt,$e+Jt+2,$e+Jt+3);let zt=B.length,Yt=zt+2*(ee+1);for(let Jt of[0,1])for(let yr=0;yr<=ee;yr++)for(let Ir of[0,1])B.emplaceBack(Jt*a.X,yr*le,Ir);for(let Jt=0;Jt<2*ee;Jt+=2)Q.emplaceBack(zt+Jt,zt+Jt+1,zt+Jt+3),Q.emplaceBack(zt+Jt,zt+Jt+3,zt+Jt+2),Q.emplaceBack(Yt+Jt,Yt+Jt+3,Yt+Jt+1),Q.emplaceBack(Yt+Jt,Yt+Jt+2,Yt+Jt+3);return this._mesh=new Jn(w.createVertexBuffer(B,Lo.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,Ne=Q.y*ee,$e=Math.floor(le/a.X),pt=Math.floor(Ne/a.X);return{tileID:new a.S(B,0,B,$e,pt),mercatorX:le,mercatorY:Ne}}}class Js{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 v(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 ol={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Cl{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Js(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 Ne=this.terrain.sourceCache.getTerrainCoords(le);for(let $e in Ne)this._coordsDescendingInv[Q][$e]||(this._coordsDescendingInv[Q][$e]=[]),this._coordsDescendingInv[Q][$e].push(Ne[$e])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],le=ee.source;if(ol[ee.type]&&!this._coordsDescendingInvStr[le]){this._coordsDescendingInvStr[le]={};for(let Ne in this._coordsDescendingInv[le])this._coordsDescendingInvStr[le][Ne]=this._coordsDescendingInv[le][Ne].map($e=>$e.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(ol[B]&&(this._prevType&&ol[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(ol[this._prevType]||ol[B]&&ee){this._prevType=B;let le=this._stacks.length-1,Ne=this._stacks[le]||[];for(let $e of this._renderableTiles){if(this.pool.isFull()&&(as(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push($e),$e.rtt[le]){let zt=this.pool.getObjectForId($e.rtt[le].id);if(zt.stamp===$e.rtt[le].stamp){this.pool.useObject(zt);continue}}let pt=this.pool.getOrCreateFreeObject();this.pool.useObject(pt),this.pool.stampObject(pt),$e.rtt[le]={id:pt.id,stamp:pt.stamp},Q.context.bindFramebuffer.set(pt.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let zt=0;zt<Ne.length;zt++){let Yt=Q.style._layers[Ne[zt]],Jt=Yt.source?this._coordsDescendingInv[Yt.source][$e.tileID.key]:[$e.tileID];Q.context.viewport.set([0,0,pt.fbo.width,pt.fbo.height]),Q._renderTileClippingMasks(Yt,Jt),Q.renderLayer(Q,Q.style.sourceCaches[Yt.source],Yt,Jt),Yt.source&&($e.rttCoords[Yt.source]=this._coordsDescendingInvStr[Yt.source][$e.tileID.key])}}return as(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),ol[B]}return!1}}let ul={"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"},Gl=o,Vl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Rn,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},Fl=oe=>{oe.touchstart=oe.dragStart,oe.touchmoveWindow=oe.dragMove,oe.touchend=oe.dragEnd},ga={showCompass:!0,showZoom:!0,visualizePitch:!1};class ko{constructor(w,B,Q=!1){this.mousedown=Ne=>{this.startMouse(a.e({},Ne,{ctrlKey:!0,preventDefault:()=>Ne.preventDefault()}),f.mousePos(this.element,Ne)),f.addEventListener(window,"mousemove",this.mousemove),f.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=Ne=>{this.moveMouse(Ne,f.mousePos(this.element,Ne))},this.mouseup=Ne=>{this.mouseRotate.dragEnd(Ne),this.mousePitch&&this.mousePitch.dragEnd(Ne),this.offTemp()},this.touchstart=Ne=>{Ne.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=f.touchPos(this.element,Ne.targetTouches)[0],this.startTouch(Ne,this._startPos),f.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),f.addEventListener(window,"touchend",this.touchend))},this.touchmove=Ne=>{Ne.targetTouches.length!==1?this.reset():(this._lastPos=f.touchPos(this.element,Ne.targetTouches)[0],this.moveTouch(Ne,this._lastPos))},this.touchend=Ne=>{Ne.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=ws({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:Ne,clickTolerance:$e,bearingDegreesPerPixelMoved:pt=.8})=>{let zt=new Zs;return new aa({clickTolerance:$e,move:(Yt,Jt)=>({bearingDelta:(Jt.x-Yt.x)*pt}),moveStateManager:zt,enable:Ne,assignEvents:Fl})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=no({clickTolerance:le,enable:!0}),this.touchPitch=(({enable:Ne,clickTolerance:$e,pitchDegreesPerPixelMoved:pt=-.5})=>{let zt=new Zs;return new aa({clickTolerance:$e,move:(Yt,Jt)=>({pitchDelta:(Jt.y-Yt.y)*pt}),moveStateManager:zt,enable:Ne,assignEvents:Fl})})({clickTolerance:le,enable:!0})),f.addEventListener(B,"mousedown",this.mousedown),f.addEventListener(B,"touchstart",this.touchstart,{passive:!1}),f.addEventListener(B,"touchcancel",this.reset)}startMouse(w,B){this.mouseRotate.dragStart(w,B),this.mousePitch&&this.mousePitch.dragStart(w,B),f.disableDrag()}startTouch(w,B){this.touchRotate.dragStart(w,B),this.touchPitch&&this.touchPitch.dragStart(w,B),f.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;f.removeEventListener(w,"mousedown",this.mousedown),f.removeEventListener(w,"touchstart",this.touchstart,{passive:!1}),f.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),f.removeEventListener(window,"touchend",this.touchend),f.removeEventListener(w,"touchcancel",this.reset),this.offTemp()}offTemp(){f.enableDrag(),f.removeEventListener(window,"mousemove",this.mousemove),f.removeEventListener(window,"mouseup",this.mouseup),f.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),f.removeEventListener(window,"touchend",this.touchend)}}let zs;function Fo(oe,w,B){let Q=new a.N(oe.lng,oe.lat);if(oe=new a.N(oe.lng,oe.lat),w){let ee=new a.N(oe.lng-360,oe.lat),le=new a.N(oe.lng+360,oe.lat),Ne=B.locationPoint(oe).distSqr(w);B.locationPoint(ee).distSqr(w)<Ne?oe=ee:B.locationPoint(le).distSqr(w)<Ne&&(oe=le)}for(;Math.abs(oe.lng-B.center.lng)>180;){let ee=B.locationPoint(oe);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;oe.lng>B.center.lng?oe.lng-=360:oe.lng+=360}return oe.lng!==Q.lng&&B.locationPoint(oe).y>B.height/2-B.getHorizon()?oe:Q}let Ys={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 Gs(oe,w,B){let Q=oe.classList;for(let ee in Ys)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class Us 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?Fo(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 Ne="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Ne="rotateX(0deg)":this._pitchAlignment==="map"&&(Ne=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||B&&B.type!=="moveend"||(this._pos=this._pos.round()),f.setTransform(this._element,`${Ys[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${Ne} ${le}`),l.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=f.create("div");let B=f.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=f.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 Ne=f.createNS("http://www.w3.org/2000/svg","g");Ne.setAttributeNS(null,"fill-rule","nonzero");let $e=f.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"transform","translate(3.0, 29.0)"),$e.setAttributeNS(null,"fill","#000000");let pt=[{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 Ve of pt){let ot=f.createNS("http://www.w3.org/2000/svg","ellipse");ot.setAttributeNS(null,"opacity","0.04"),ot.setAttributeNS(null,"cx","10.5"),ot.setAttributeNS(null,"cy","5.80029008"),ot.setAttributeNS(null,"rx",Ve.rx),ot.setAttributeNS(null,"ry",Ve.ry),$e.appendChild(ot)}let zt=f.createNS("http://www.w3.org/2000/svg","g");zt.setAttributeNS(null,"fill",this._color);let Yt=f.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"),zt.appendChild(Yt);let Jt=f.createNS("http://www.w3.org/2000/svg","g");Jt.setAttributeNS(null,"opacity","0.25"),Jt.setAttributeNS(null,"fill","#000000");let yr=f.createNS("http://www.w3.org/2000/svg","path");yr.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"),Jt.appendChild(yr);let Ir=f.createNS("http://www.w3.org/2000/svg","g");Ir.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ir.setAttributeNS(null,"fill","#FFFFFF");let ce=f.createNS("http://www.w3.org/2000/svg","g");ce.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Ae=f.createNS("http://www.w3.org/2000/svg","circle");Ae.setAttributeNS(null,"fill","#000000"),Ae.setAttributeNS(null,"opacity","0.25"),Ae.setAttributeNS(null,"cx","5.5"),Ae.setAttributeNS(null,"cy","5.5"),Ae.setAttributeNS(null,"r","5.4999962");let qe=f.createNS("http://www.w3.org/2000/svg","circle");qe.setAttributeNS(null,"fill","#FFFFFF"),qe.setAttributeNS(null,"cx","5.5"),qe.setAttributeNS(null,"cy","5.5"),qe.setAttributeNS(null,"r","5.4999962"),ce.appendChild(Ae),ce.appendChild(qe),Ne.appendChild($e),Ne.appendChild(zt),Ne.appendChild(Jt),Ne.appendChild(Ir),Ne.appendChild(ce),B.appendChild(Ne),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()}),Gs(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),f.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),Ne=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,Ne)-le<.006)return void(this._element.style.opacity=this._opacity);let $e=-this._offset.y/ee.transform._pixelPerMeter,pt=Math.sin(ee.getPitch()*Math.PI/180)*$e,zt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Yt=ee.transform.lngLatToCameraDepth(this._lngLat,Ne+pt)-zt>.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 Sl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},_l=0,kl=!1,cl={maxWidth:100,unit:"metric"};function xl(oe,w,B){let Q=B&&B.maxWidth||100,ee=oe._container.clientHeight/2,le=oe.unproject([0,ee]),Ne=oe.unproject([Q,ee]),$e=le.distanceTo(Ne);if(B&&B.unit==="imperial"){let pt=3.2808*$e;pt>5280?Uo(w,Q,pt/5280,oe._getUIString("ScaleControl.Miles")):Uo(w,Q,pt,oe._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?Uo(w,Q,$e/1852,oe._getUIString("ScaleControl.NauticalMiles")):$e>=1e3?Uo(w,Q,$e/1e3,oe._getUIString("ScaleControl.Kilometers")):Uo(w,Q,$e,oe._getUIString("ScaleControl.Meters"))}function Uo(oe,w,B,Q){let ee=function(le){let Ne=Math.pow(10,`${Math.floor(le)}`.length-1),$e=le/Ne;return $e=$e>=10?10:$e>=5?5:$e>=3?3:$e>=2?2:$e>=1?1:function(pt){let zt=Math.pow(10,Math.ceil(-Math.log(pt)/Math.LN10));return Math.round(pt*zt)/zt}($e),Ne*$e}(B);oe.style.width=w*(ee/B)+"px",oe.innerHTML=`${ee}&nbsp;${Q}`}let _s={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Bl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Il(oe){if(oe){if(typeof oe=="number"){let w=Math.round(Math.abs(oe)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,oe),"top-left":new a.P(w,w),"top-right":new a.P(-w,w),bottom:new a.P(0,-oe),"bottom-left":new a.P(w,-w),"bottom-right":new a.P(-w,-w),left:new a.P(oe,0),right:new a.P(-oe,0)}}if(oe instanceof a.P||Array.isArray(oe)){let w=a.P.convert(oe);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(oe.center||[0,0]),top:a.P.convert(oe.top||[0,0]),"top-left":a.P.convert(oe["top-left"]||[0,0]),"top-right":a.P.convert(oe["top-right"]||[0,0]),bottom:a.P.convert(oe.bottom||[0,0]),"bottom-left":a.P.convert(oe["bottom-left"]||[0,0]),"bottom-right":a.P.convert(oe["bottom-right"]||[0,0]),left:a.P.convert(oe.left||[0,0]),right:a.P.convert(oe.right||[0,0])}}return Il(new a.P(0,0))}let Dl=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=Hn,i.BoxZoomHandler=Po,i.CanvasSource=_t,i.CooperativeGesturesHandler=ui,i.DoubleClickZoomHandler=li,i.DragPanHandler=Oi,i.DragRotateHandler=dn,i.EdgeInsets=Eo,i.FullscreenControl=class extends a.E{constructor(oe={}){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,oe&&oe.container&&(oe.container instanceof HTMLElement?this._container=oe.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(oe){return this._map=oe,this._container||(this._container=this._map.getContainer()),this._controlContainer=f.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){f.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let oe=this._fullscreenButton=f.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);f.create("span","maplibregl-ctrl-icon",oe).setAttribute("aria-hidden","true"),oe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let oe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",oe),this._fullscreenButton.title=oe}_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=Qe,i.GeolocateControl=class extends a.E{constructor(oe){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),Ne=fe.fromLngLat(B,Q);this._map.fitBounds(Ne,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&&kl)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=f.create("button","maplibregl-ctrl-geolocate",this._container),f.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=f.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Us({element:this._dotElement}),this._circleElement=f.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Us({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({},Sl,oe)}onAdd(oe){return this._map=oe,this._container=f.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(zs!==void 0&&!w)return zs;if(window.navigator.permissions===void 0)return zs=!!window.navigator.geolocation,zs;try{zs=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(B){zs=!!window.navigator.geolocation}return zs})}().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(),f.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,_l=0,kl=!1}_isOutOfMapMaxBounds(oe){let w=this._map.getMaxBounds(),B=oe.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 oe=this._map.getBounds(),w=oe.getSouthEast(),B=oe.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":_l--,kl=!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 oe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),_l++,_l>1?(oe={maximumAge:6e5,timeout:0},kl=!0):(oe=this.options.positionOptions,kl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,oe)}}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=rs,i.ImageSource=Tt,i.KeyboardHandler=Ft,i.LngLatBounds=fe,i.LogoControl=Gn,i.Map=class extends Vn{constructor(oe){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Vl),oe);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 $a(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new pn,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({},ul),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=y.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=Xo(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 In(this,w),this._hash=w.hash&&new rs(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 Hn(typeof w.attributionControl=="boolean"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Gn,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(oe,w){if(w===void 0&&(w=oe.getDefaultPosition?oe.getDefaultPosition():"top-right"),!oe||!oe.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=oe.onAdd(this);this._controls.push(oe);let Q=this._controlPositions[w];return w.indexOf("bottom")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(oe){if(!oe||!oe.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(oe);return w>-1&&this._controls.splice(w,1),oe.onRemove(this),this}hasControl(oe){return this._controls.indexOf(oe)>-1}calculateCameraOptionsFromTo(oe,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(oe,w,B,Q)}resize(oe){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 $e=this.painter.context.gl;this._maxCanvasSize=[$e.drawingBufferWidth,$e.drawingBufferHeight];let pt=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,pt),this.painter.resize(Q,ee,pt)}this.transform.resize(Q,ee),(w=this._requestedCameraState)===null||w===void 0||w.resize(Q,ee);let Ne=!this._moving;return Ne&&(this.stop(),this.fire(new a.k("movestart",oe)).fire(new a.k("move",oe))),this.fire(new a.k("resize",oe)),Ne&&this.fire(new a.k("moveend",oe)),this}_getClampedPixelRatio(oe,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),le=oe*ee,Ne=w*ee;return Math.min(le>B?B/le:1,Ne>Q?Q/Ne:1)*ee}getPixelRatio(){var oe;return(oe=this._overridePixelRatio)!==null&&oe!==void 0?oe:devicePixelRatio}setPixelRatio(oe){this._overridePixelRatio=oe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(oe){return this.transform.setMaxBounds(fe.convert(oe)),this._update()}setMinZoom(oe){if((oe=oe==null?-2:oe)>=-2&&oe<=this.transform.maxZoom)return this.transform.minZoom=oe,this._update(),this.getZoom()<oe&&this.setZoom(oe),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(oe){if((oe=oe==null?22:oe)>=this.transform.minZoom)return this.transform.maxZoom=oe,this._update(),this.getZoom()>oe&&this.setZoom(oe),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(oe){if((oe=oe==null?0:oe)<0)throw new Error("minPitch must be greater than or equal to 0");if(oe>=0&&oe<=this.transform.maxPitch)return this.transform.minPitch=oe,this._update(),this.getPitch()<oe&&this.setPitch(oe),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(oe){if((oe=oe==null?60:oe)>85)throw new Error("maxPitch must be less than or equal to 85");if(oe>=this.transform.minPitch)return this.transform.maxPitch=oe,this._update(),this.getPitch()>oe&&this.setPitch(oe),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(oe){return this.transform.renderWorldCopies=oe,this._update()}project(oe){return this.transform.locationPoint(a.N.convert(oe),this.style&&this.terrain)}unproject(oe){return this.transform.pointLocation(a.P.convert(oe),this.terrain)}isMoving(){var oe;return this._moving||((oe=this.handlers)===null||oe===void 0?void 0:oe.isMoving())}isZooming(){var oe;return this._zooming||((oe=this.handlers)===null||oe===void 0?void 0:oe.isZooming())}isRotating(){var oe;return this._rotating||((oe=this.handlers)===null||oe===void 0?void 0:oe.isRotating())}_createDelegatedListener(oe,w,B){if(oe==="mouseenter"||oe==="mouseover"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:le=>{let Ne=w.filter(pt=>this.getLayer(pt)),$e=Ne.length!==0?this.queryRenderedFeatures(le.point,{layers:Ne}):[];$e.length?Q||(Q=!0,B.call(this,new Qn(oe,this,le.originalEvent,{features:$e}))):Q=!1},mouseout:()=>{Q=!1}}}}if(oe==="mouseleave"||oe==="mouseout"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:Ne=>{let $e=w.filter(pt=>this.getLayer(pt));($e.length!==0?this.queryRenderedFeatures(Ne.point,{layers:$e}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new Qn(oe,this,Ne.originalEvent)))},mouseout:Ne=>{Q&&(Q=!1,B.call(this,new Qn(oe,this,Ne.originalEvent)))}}}}{let Q=ee=>{let le=w.filter($e=>this.getLayer($e)),Ne=le.length!==0?this.queryRenderedFeatures(ee.point,{layers:le}):[];Ne.length&&(ee.features=Ne,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[oe]:Q}}}}_saveDelegatedListener(oe,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[oe]=this._delegatedListeners[oe]||[],this._delegatedListeners[oe].push(w)}_removeDelegatedListener(oe,w,B){if(!this._delegatedListeners||!this._delegatedListeners[oe])return;let Q=this._delegatedListeners[oe];for(let ee=0;ee<Q.length;ee++){let le=Q[ee];if(le.listener===B&&le.layers.length===w.length&&le.layers.every(Ne=>w.includes(Ne))){for(let Ne in le.delegates)this.off(Ne,le.delegates[Ne]);return void Q.splice(ee,1)}}}on(oe,w,B){if(B===void 0)return super.on(oe,w);let Q=this._createDelegatedListener(oe,typeof w=="string"?[w]:w,B);this._saveDelegatedListener(oe,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(oe,w,B){if(B===void 0)return super.once(oe,w);let Q=typeof w=="string"?[w]:w,ee=this._createDelegatedListener(oe,Q,B);for(let le in ee.delegates){let Ne=ee.delegates[le];ee.delegates[le]=(...$e)=>{this._removeDelegatedListener(oe,Q,B),Ne(...$e)}}this._saveDelegatedListener(oe,ee);for(let le in ee.delegates)this.once(le,ee.delegates[le]);return this}off(oe,w,B){return B===void 0?super.off(oe,w):(this._removeDelegatedListener(oe,typeof w=="string"?[w]:w,B),this)}queryRenderedFeatures(oe,w){if(!this.style)return[];let B,Q=oe instanceof a.P||Array.isArray(oe),ee=Q?oe:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:oe)||{},ee instanceof a.P||typeof ee[0]=="number")B=[a.P.convert(ee)];else{let le=a.P.convert(ee[0]),Ne=a.P.convert(ee[1]);B=[le,new a.P(Ne.x,le.y),Ne,new a.P(le.x,Ne.y),le]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(oe,w){return this.style.querySourceFeatures(oe,w)}setStyle(oe,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&oe?(this._diffStyle(oe,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(oe,w))}setTransformRequest(oe){return this._requestManager.setTransformRequest(oe),this}_getUIString(oe){let w=this._locale[oe];if(w==null)throw new Error(`Missing UI string '${oe}'`);return w}_updateStyle(oe,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(oe,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!oe)),oe?(this.style=new sn(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof oe=="string"?this.style.loadURL(oe,w,B):this.style.loadJSON(oe,w,B),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new sn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(oe,w){if(typeof oe=="string"){let B=this._requestManager.transformRequest(oe,"Style");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof oe=="object"&&this._updateDiff(oe,w)}_updateDiff(oe,w){try{this.style.setState(oe,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(oe,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(oe,w){return this._lazyInitEmptyStyle(),this.style.addSource(oe,w),this._update(!0)}isSourceLoaded(oe){let w=this.style&&this.style.sourceCaches[oe];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${oe}'`)))}setTerrain(oe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),oe){let w=this.style.sourceCaches[oe.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${oe.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type==="hillshade"&&Q.source===oe.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 Bs(this.painter,w,oe),this.painter.renderToTexture=new Cl(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!==oe.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:oe})),this}getTerrain(){var oe,w;return(w=(oe=this.terrain)===null||oe===void 0?void 0:oe.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let oe=this.style&&this.style.sourceCaches;for(let w in oe){let B=oe[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!=="loaded"&&ee.state!=="errored")return!1}}return!0}removeSource(oe){return this.style.removeSource(oe),this._update(!0)}getSource(oe){return this.style.getSource(oe)}addImage(oe,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:le,stretchY:Ne,content:$e,textFitWidth:pt,textFitHeight:zt}=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:Jt,data:yr}=w,Ir=w;return this.style.addImage(oe,{data:new a.R({width:Yt,height:Jt},new Uint8Array(yr)),pixelRatio:Q,stretchX:le,stretchY:Ne,content:$e,textFitWidth:pt,textFitHeight:zt,sdf:ee,version:0,userImage:Ir}),Ir.onAdd&&Ir.onAdd(this,oe),this}}{let{width:Yt,height:Jt,data:yr}=l.getImageData(w);this.style.addImage(oe,{data:new a.R({width:Yt,height:Jt},yr),pixelRatio:Q,stretchX:le,stretchY:Ne,content:$e,textFitWidth:pt,textFitHeight:zt,sdf:ee,version:0})}}updateImage(oe,w){let B=this.style.getImage(oe);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)?l.getImageData(w):w,{width:ee,height:le,data:Ne}=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 $e=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(Ne,$e),this.style.updateImage(oe,B),this}getImage(oe){return this.style.getImage(oe)}hasImage(oe){return oe?!!this.style.getImage(oe):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(oe){this.style.removeImage(oe)}loadImage(oe){return y.getImage(this._requestManager.transformRequest(oe,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(oe,w){return this._lazyInitEmptyStyle(),this.style.addLayer(oe,w),this._update(!0)}moveLayer(oe,w){return this.style.moveLayer(oe,w),this._update(!0)}removeLayer(oe){return this.style.removeLayer(oe),this._update(!0)}getLayer(oe){return this.style.getLayer(oe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(oe,w,B){return this.style.setLayerZoomRange(oe,w,B),this._update(!0)}setFilter(oe,w,B={}){return this.style.setFilter(oe,w,B),this._update(!0)}getFilter(oe){return this.style.getFilter(oe)}setPaintProperty(oe,w,B,Q={}){return this.style.setPaintProperty(oe,w,B,Q),this._update(!0)}getPaintProperty(oe,w){return this.style.getPaintProperty(oe,w)}setLayoutProperty(oe,w,B,Q={}){return this.style.setLayoutProperty(oe,w,B,Q),this._update(!0)}getLayoutProperty(oe,w){return this.style.getLayoutProperty(oe,w)}setGlyphs(oe,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(oe,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(oe,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(oe,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(oe){return this._lazyInitEmptyStyle(),this.style.removeSprite(oe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(oe,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(oe,w,B=>{B||this._update(!0)}),this}setLight(oe,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(oe,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(oe){return this._lazyInitEmptyStyle(),this.style.setSky(oe),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(oe,w){return this.style.setFeatureState(oe,w),this._update()}removeFeatureState(oe,w){return this.style.removeFeatureState(oe,w),this._update()}getFeatureState(oe){return this.style.getFeatureState(oe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let oe=0,w=0;return this._container&&(oe=this._container.clientWidth||400,w=this._container.clientHeight||300),[oe,w]}_setupContainer(){let oe=this._container;oe.classList.add("maplibregl-map");let w=this._canvasContainer=f.create("div","maplibregl-canvas-container",oe);this._interactive&&w.classList.add("maplibregl-interactive"),this._canvas=f.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=f.create("div","maplibregl-control-container",oe),le=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(Ne=>{le[Ne]=f.create("div",`maplibregl-ctrl-${Ne} `,ee)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(oe,w,B){this._canvas.width=Math.floor(B*oe),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${oe}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let oe={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:oe},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext("webgl2",oe)||this._canvas.getContext("webgl",oe);if(!B){let Q="Failed to initialize WebGL";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Cs(B,this.transform),c.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(oe){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||oe,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(oe){return this._update(),this._renderTaskQueue.add(oe)}_cancelRenderFrame(oe){this._renderTaskQueue.remove(oe)}_render(oe){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(oe),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,le=l.now();this.style.zoomHistory.update(ee,le);let Ne=new a.z(ee,{now:le,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),$e=Ne.crossFadingFactor();$e===1&&$e===this._crossFadingFactor||(B=!0,this._crossFadingFactor=$e),this.style.update(Ne)}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 oe;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),y.removeThrottleControl(this._imageQueueHandle),(oe=this._resizeObserver)===null||oe===void 0||oe.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),f.remove(this._canvasContainer),f.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,l.frameAsync(this._frameRequest).then(oe=>{a.bf.frame(oe),this._frameRequest=null,this._render(oe)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(oe){this._showTileBoundaries!==oe&&(this._showTileBoundaries=oe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(oe){this._showPadding!==oe&&(this._showPadding=oe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(oe){this._showCollisionBoxes!==oe&&(this._showCollisionBoxes=oe,oe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(oe){this._showOverdrawInspector!==oe&&(this._showOverdrawInspector=oe,this._update())}get repaint(){return!!this._repaint}set repaint(oe){this._repaint!==oe&&(this._repaint=oe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(oe){this._vertices=oe,this._update()}get version(){return Gl}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=Qn,i.MapTouchEvent=zo,i.MapWheelEvent=rl,i.Marker=Us,i.NavigationControl=class{constructor(oe){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({},ga,oe),this._container=f.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})),f.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})),f.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=f.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(oe){return this._map=oe,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 ko(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){f.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(oe,w){let B=f.create("button",oe,this._container);return B.type="button",B.addEventListener("click",w),B}},i.Popup=class extends a.E{constructor(oe){super(),this.remove=()=>(this._content&&f.remove(this._content),this._container&&(f.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=f.create("div","maplibregl-popup",this._map.getContainer()),this._tip=f.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let $e of this.options.className.split(" "))this._container.classList.add($e);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?Fo(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=Il(this.options.offset);if(!ee){let $e=this._container.offsetWidth,pt=this._container.offsetHeight,zt;zt=Q.y+le.bottom.y<pt?["top"]:Q.y>this._map.transform.height-pt?["bottom"]:[],Q.x<$e/2?zt.push("left"):Q.x>this._map.transform.width-$e/2&&zt.push("right"),ee=zt.length===0?"bottom":zt.join("-")}let Ne=Q.add(le[ee]);this.options.subpixelPositioning||(Ne=Ne.round()),f.setTransform(this._container,`${Ys[ee]} translate(${Ne.x}px,${Ne.y}px)`),Gs(this._container,ee,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(_s),oe)}addTo(oe){return this._map&&this.remove(),this._map=oe,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(oe){return this._lngLat=a.N.convert(oe),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(oe){return this.setDOMContent(document.createTextNode(oe))}setHTML(oe){let w=document.createDocumentFragment(),B=document.createElement("body"),Q;for(B.innerHTML=oe;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var oe;return(oe=this._container)===null||oe===void 0?void 0:oe.style.maxWidth}setMaxWidth(oe){return this.options.maxWidth=oe,this._update(),this}setDOMContent(oe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=f.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(oe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(oe){return this._container&&this._container.classList.add(oe),this}removeClassName(oe){return this._container&&this._container.classList.remove(oe),this}setOffset(oe){return this.options.offset=oe,this._update(),this}toggleClassName(oe){if(this._container)return this._container.classList.toggle(oe)}setSubpixelPositioning(oe){this.options.subpixelPositioning=oe}_createCloseButton(){this.options.closeButton&&(this._closeButton=f.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 oe=this._container.querySelector(Bl);oe&&oe.focus()}},i.RasterDEMTileSource=Pt,i.RasterTileSource=gt,i.ScaleControl=class{constructor(oe){this._onMove=()=>{xl(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,xl(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},cl),oe)}getDefaultPosition(){return"bottom-left"}onAdd(oe){return this._map=oe,this._container=f.create("div","maplibregl-ctrl maplibregl-ctrl-scale",oe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){f.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},i.ScrollZoomHandler=Sr,i.Style=sn,i.TerrainControl=class{constructor(oe){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=oe}onAdd(oe){return this._map=oe,this._container=f.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=f.create("button","maplibregl-ctrl-terrain",this._container),f.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(){f.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},i.TwoFingersTouchPitchHandler=gs,i.TwoFingersTouchRotateHandler=ss,i.TwoFingersTouchZoomHandler=Yo,i.TwoFingersTouchZoomRotateHandler=wi,i.VectorTileSource=et,i.VideoSource=xt,i.addSourceType=(oe,w)=>a._(void 0,void 0,void 0,function*(){if(jt(oe))throw new Error(`A source type called "${oe}" already exists.`);((B,Q)=>{Ct[B]=Q})(oe,w)}),i.clearPrewarmedResources=function(){let oe=he;oe&&(oe.isPreloaded()&&oe.numActive()===1?(oe.release(be),he=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 ut().getRTLTextPluginStatus()},i.getVersion=function(){return Dl},i.getWorkerCount=function(){return ze.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(oe){return Me().broadcast("IS",oe)},i.prewarm=function(){ke().acquire(be)},i.setMaxParallelImageRequests=function(oe){a.a.MAX_PARALLEL_IMAGE_REQUESTS=oe},i.setRTLTextPlugin=function(oe,w){return ut().setRTLTextPlugin(oe,w)},i.setWorkerCount=function(oe){ze.workerCount=oe},i.setWorkerUrl=function(oe){a.a.WORKER_URL=oe}});var n=e;return n})});var MGe=Se((bxr,SGe)=>{"use strict";var iw=Zr(),xjt=Bf().sanitizeHTML,bjt=xJ(),wGe=bx();function TGe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=wGe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ay=TGe.prototype;ay.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=dq(t)};ay.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))};ay.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ay.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};ay.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};ay.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)};ay.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,!!dq(e)){var r=wjt(e);t.addSource(this.idSource,r)}};ay.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(wGe.traceLayerPrefix)===0){e=n;break}}return e};ay.updateLayer=function(e){var t=this.subplot,r=AGe(e),n=this.lookupBelow(),i=this.findFollowingMapLayerId(n);this.removeLayer(),dq(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};ay.updateStyle=function(e){if(dq(e)){var t=AGe(e);this.subplot.setOptions(this.idLayer,"setLayoutProperty",t.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",t.paint)}};ay.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)};ay.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)};function dq(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 iw.isPlainObject(t)||typeof t=="string"&&t.length>0}function AGe(e){var t={},r={};switch(e.type){case"circle":iw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":iw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":iw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=bjt(n.textposition,n.iconsize);iw.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}),iw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":iw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function wjt(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=xjt(e.sourceattribution)),n}SGe.exports=function(t,r,n){var i=new TGe(t,r);return i.update(n),i}});var DGe=Se((wxr,IGe)=>{"use strict";var MJ=bGe(),EJ=Zr(),CGe=ix(),EGe=Ul(),Tjt=hu(),Ajt=gp(),pq=jc(),LGe=Sy(),Sjt=LGe.drawMode,Mjt=LGe.selectMode,Ejt=nh().prepSelect,kjt=nh().clearOutline,Cjt=nh().clearSelectionsCache,Ljt=nh().selectOnClick,nw=bx(),zjt=MGe();function zGe(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 Wh=zGe.prototype;Wh.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)};Wh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=PGe(a.style),s=a.bounds,u=s?[[s.west,s.south],[s.east,s.north]]:null,l=i.map=new MJ.Map({container:i.div,style:o.style,center:kJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:u,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new MJ.AttributionControl({compact:!0})),f={};l.on("styleimagemissing",function(h){var d=h.id;if(!f[d]&&d.includes("-15")){f[d]=!0;var p=new Image(15,15);p.onload=function(){l.addImage(d,p)},p.crossOrigin="Anonymous",p.src="https://unpkg.com/maki@2.1.0/icons/"+d+".svg"}}),l.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}}),l._canvas.style.left="0px",l._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise(function(h){l.once("load",h)})),c=c.concat(CGe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Wh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],u=PGe(o.style);JSON.stringify(i.styleObj)!==JSON.stringify(u)&&(i.styleObj=u,a.setStyle(u.style),i.traceHash={},s.push(new Promise(function(l){a.once("styledata",l)}))),s=s.concat(CGe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Wh.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 u=e[i][0].trace,l=u._module;typeof u.below=="string"?a=u.below:l.getBelow&&(a=l.getBelow(u,this)),a===""&&(s=!0),o["trace-"+u.uid]=a||""}for(i=0;i<n.length;i++){var f=n[i];typeof f.below=="string"?a=f.below:s?a="traces":a="",o["layout-"+i]=a}var c={},h,d;for(h in o)a=o[h],c[a]?c[a].push(h):c[a]=[h];for(a in c){var p=c[a];if(p.length>1)for(i=0;i<p.length;i++)h=p[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 kGe={choroplethmap:0,densitymap:1,scattermap:2};Wh.updateData=function(e){var t=this.traceHash,r,n,i,a,o=e.slice().sort(function(c,h){return kGe[c[0].trace.type]-kGe[h[0].trace.type]});for(i=0;i<o.length;i++){var s=o[i];n=s[0].trace,r=t[n.uid];var u=!1;r&&(r.type===n.type?(r.update(s),u=!0):r.dispose()),!u&&n._module&&(t[n.uid]=n._module.plot(this,s))}var l=Object.keys(t);e:for(i=0;i<l.length;i++){var f=l[i];for(a=0;a<e.length;a++)if(n=e[a][0].trace,f===n.uid)continue e;r=t[f],r.dispose(),delete t[f]}};Wh.updateLayout=function(e){var t=this.map,r=e[this.id];!this.dragging&&!this.wheeling&&(t.setCenter(kJ(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()};Wh.resolveOnRender=function(e){var t=this.map;t.on("render",function r(){t.loaded()&&(t.off("render",r),setTimeout(e,10))})};Wh.rejectOnError=function(e){var t=this.map;function r(){e(new Error(nw.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)};Wh.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"},Tjt.setConvert(t.mockAxis,e)};Wh.initFx=function(e,t){var r=this,n=r.gd,i=r.map;i.on("moveend",function(s){if(r.map){var u=n._fullLayout;if(s.originalEvent||r.wheeling){var l=u[r.id];EGe.call("_storeDirectGUIEdit",n.layout,u._preGUI,r.getViewEdits(l));var f=r.getView();l._input.center=l.center=f.center,l._input.zoom=l.zoom=f.zoom,l._input.bearing=l.bearing=f.bearing,l._input.pitch=l.pitch=f.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(f))}s.originalEvent&&s.originalEvent.type==="mouseup"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),u&&u._rehover&&u._rehover()}}),i.on("wheel",function(){r.wheeling=!0}),i.on("mousemove",function(s){var u=r.div.getBoundingClientRect(),l=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return u},r.xaxis.p2c=function(){return i.unproject(l).lng},r.yaxis.p2c=function(){return i.unproject(l).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&pq.hover(n,s,r.id)},pq.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function a(){pq.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];EGe.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var u=r.viewInitial;i.setCenter(kJ(u.center)),i.setZoom(u.zoom),i.setBearing(u.bearing),i.setPitch(u.pitch);var l=r.getView();s._input.center=s.center=l.center,s._input.zoom=s.zoom=l.zoom,s._input.bearing=s.bearing=l.bearing,s._input.pitch=s.pitch=l.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(l))}),r.clearOutline=function(){Cjt(r.dragOptions),kjt(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(u){var l=n._fullLayout.clickmode;l.indexOf("select")>-1&&Ljt(u.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),l.indexOf("event")>-1&&pq.click(n,u.originalEvent)}}};Wh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(u){var l=t.map.unproject(u);return[l.lng,l.lat]}var a=e.dragmode,o;o=function(u,l){if(l.isRect){var f=u.range={};f[t.id]=[i([l.xmin,l.ymin]),i([l.xmax,l.ymax])]}else{var c=u.lassoPoints={};c[t.id]=l.map(i)}};var s=t.dragOptions;t.dragOptions=EJ.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),Mjt(a)||Sjt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(u,l,f){Ejt(u,l,f,t.dragOptions,a)},Ajt.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))};Wh.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])};Wh.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(zjt(this,i,r[i]))}else for(i=0;i<r.length;i++)n[i].update(r[i])};Wh.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))};Wh.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()};Wh.setOptions=function(e,t,r){for(var n in r)this.map[t](e,n,r[n])};Wh.getMapLayers=function(){return this.map.getStyle().layers};Wh.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}EJ.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)};Wh.project=function(e){return this.map.project(new MJ.LngLat(e[0],e[1]))};Wh.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()]}}};Wh.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};Wh.getViewEditsWithDerived=function(e){var t=this.id,r=this.getViewEdits(e);return r[t+"._derived"]=e._derived,r};function PGe(e){var t={};return EJ.isPlainObject(e)?(t.id=e.id,t.style=e):typeof e=="string"?(t.id=e,nw.stylesMap[e]?t.style=nw.stylesMap[e]:t.style=e):(t.id=nw.styleValueDflt,t.style=Pjt(nw.styleValueDflt)),t.transition={duration:0,delay:0},t}function Pjt(e){return nw.styleUrlPrefix+e+"-"+nw.styleUrlSuffix}function kJ(e){return[e.lon,e.lat]}IGe.exports=zGe});var qGe=Se((Txr,FGe)=>{"use strict";var CJ=Zr(),Ijt=k_(),Djt=Jd(),RGe=Fk();FGe.exports=function(t,r,n){Ijt(t,r,n,{type:"map",attributes:RGe,handleDefaults:Rjt,partition:"y"})};function Rjt(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,Djt(e,t,{name:"layers",handleItemDefaults:Fjt}),t._input=e}function Fjt(e,t){function r(u,l){return CJ.coerce(e,t,RGe.layers,u,l)}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",CJ.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"),CJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var yq=Se(l0=>{"use strict";var vq=Zr(),BGe=vq.strTranslate,qjt=vq.strScale,Bjt=Dd().getSubplotCalcData,Ojt=Zv(),Njt=Nl(),OGe=yu(),Ujt=Bf(),Vjt=DGe(),wx="map";l0.name=wx;l0.attr="subplot";l0.idRoot=wx;l0.idRegex=l0.attrRegex=vq.counterRegex(wx);l0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};l0.layoutAttributes=Fk();l0.supplyLayoutDefaults=qGe();l0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[wx],a=0;a<i.length;a++){var o=i[a],s=Bjt(n,wx,o),u=r[o],l=u._subplot;l||(l=new Vjt(t,o),r[o]._subplot=l),l.viewInitial||(l.viewInitial={center:vq.extendFlat({},u.center),zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),l.plot(s,r,t._promises)}};l0.clean=function(e,t,r,n){for(var i=n._subplots[wx]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._subplot&&n[o]._subplot.destroy()}};l0.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[wx],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._subplot,u=s.toImage("png"),l=t._glimages.append("svg:image");l.attr({xmlns:Ojt.svg,"xlink:href":u,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 f=Njt.select(a._subplot.div),c=f.select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),h=t._glimages.append("g"),d=h.append("text");d.text(c).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":c});var p=OGe.bBox(d.node()),x=n.w*(o.x[1]-o.x[0]);if(p.width>x/2){var b=c.split("|").join("<br>");d.text(b).attr("data-unformatted",b).call(Ujt.convertToTspans,e),p=OGe.bBox(d.node())}d.attr("transform",BGe(-3,-p.height+8)),h.insert("rect",".static-attribution").attr({x:-p.width-6,y:-p.height-3,width:p.width+6,height:p.height+3,fill:"rgba(255, 255, 255, 0.75)"});var y=1;p.width+6>x&&(y=x/(p.width+6));var k=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr("transform",BGe(k[0],k[1])+qjt(y))}};l0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[wx],n=0;n<r.length;n++){var i=t[r[n]]._subplot;i.updateFx(t)}}});var UGe=Se((Sxr,NGe)=>{"use strict";NGe.exports={attributes:sq(),supplyDefaults:QHe(),colorbar:ep(),formatLabels:_J(),calc:lF(),plot:dGe(),hoverPoints:hq().hoverPoints,eventData:mGe(),selectPoints:_Ge(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:yq(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var HGe=Se((Mxr,VGe)=>{"use strict";VGe.exports=UGe()});var LJ=Se((Exr,GGe)=>{"use strict";var d1=JA(),Hjt=Xf(),Gjt=Du().hovertemplateAttrs,Wjt=zf(),Tx=vu().extendFlat;GGe.exports=Tx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Tx({},d1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:d1.text,hovertext:d1.hovertext,marker:{line:{color:Tx({},d1.marker.line.color,{editType:"plot"}),width:Tx({},d1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Tx({},d1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Tx({},d1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Tx({},d1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:d1.hoverinfo,hovertemplate:Gjt({},{keys:["properties"]}),showlegend:Tx({},Wjt.showlegend,{dflt:!1})},Hjt("",{cLetter:"z",editTypeOverride:"calc"}))});var jGe=Se((kxr,WGe)=>{"use strict";var Nk=Zr(),jjt=ed(),Zjt=LJ();WGe.exports=function(t,r,n,i){function a(f,c){return Nk.coerce(t,r,Zjt,f,c)}var o=a("locations"),s=a("z"),u=a("geojson");if(!Nk.isArrayOrTypedArray(o)||!o.length||!Nk.isArrayOrTypedArray(s)||!s.length||!(typeof u=="string"&&u!==""||Nk.isPlainObject(u))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),jjt(t,r,i,a,{prefix:"",cLetter:"z"}),Nk.coerceSelectionMarkerOpacity(r,a)}});var zJ=Se((Cxr,YGe)=>{"use strict";var Xjt=_u(),p1=Zr(),Yjt=fc(),Kjt=yu(),Jjt=tx().makeBlank,ZGe=ix();function $jt(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:Jjt()};if(!r)return a;var o=ZGe.extractTraceFeature(e);if(!o)return a;var s=Yjt.makeColorScaleFuncFromTrace(t),u=t.marker,l=u.line||{},f;p1.isArrayOrTypedArray(u.opacity)&&(f=function(k){var E=k.mo;return Xjt(E)?+p1.constrain(E,0,1):0});var c;p1.isArrayOrTypedArray(l.color)&&(c=function(k){return k.mlc});var h;p1.isArrayOrTypedArray(l.width)&&(h=function(k){return k.mlw});for(var d=0;d<e.length;d++){var p=e[d],x=p.fOut;if(x){var b=x.properties;b.fc=s(p.z),f&&(b.mo=f(p)),c&&(b.mlc=c(p)),h&&(b.mlw=h(p)),p.ct=b.ct,p._polygons=ZGe.feature2polygons(x)}}var y=f?{type:"identity",property:"mo"}:u.opacity;return p1.extendFlat(n.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":y}),p1.extendFlat(i.paint,{"line-color":c?{type:"identity",property:"mlc"}:l.color,"line-width":h?{type:"identity",property:"mlw"}:l.width,"line-opacity":y}),n.layout.visibility="visible",i.layout.visibility="visible",a.geojson={type:"FeatureCollection",features:o},XGe(e),a}function XGe(e){var t=e[0].trace,r=t._opts,n;if(t.selectedpoints){for(var i=Kjt.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=p1.isArrayOrTypedArray(t.marker.opacity)?{type:"identity",property:"mo"}:t.marker.opacity;return p1.extendFlat(r.fill.paint,{"fill-opacity":n}),p1.extendFlat(r.line.paint,{"line-opacity":n}),r}YGe.exports={convert:$jt,convertOnSelect:XGe}});var eWe=Se((Lxr,QGe)=>{"use strict";var JGe=zJ().convert,Qjt=zJ().convertOnSelect,KGe=bx().traceLayerPrefix;function $Ge(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",KGe+t+"-fill"],["line",KGe+t+"-line"]],this.below=null}var ES=$Ge.prototype;ES.update=function(e){this._update(JGe(e)),e[0].trace._glTrace=this};ES.updateOnSelect=function(e){this._update(Qjt(e))};ES._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],u=e[o];t.setOptions(s,"setLayoutProperty",u.layout),u.layout.visibility==="visible"&&t.setOptions(s,"setPaintProperty",u.paint)}};ES._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],u=e[s];r.addLayer({type:s,id:o[1],source:i,layout:u.layout,paint:u.paint},t)}};ES._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};ES.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};QGe.exports=function(t,r){var n=r[0].trace,i=new $Ge(t,n.uid),a=i.sourceId,o=JGe(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 rWe=Se((zxr,tWe)=>{"use strict";tWe.exports={attributes:LJ(),supplyDefaults:jGe(),colorbar:S_(),calc:LF(),plot:eWe(),hoverPoints:PF(),eventData:IF(),selectPoints:DF(),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:yq(),categories:["map","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_map"}}});var nWe=Se((Pxr,iWe)=>{"use strict";iWe.exports=rWe()});var IJ=Se((Ixr,oWe)=>{"use strict";var eZt=Xf(),tZt=Du().hovertemplateAttrs,aWe=zf(),mq=sq(),PJ=vu().extendFlat;oWe.exports=PJ({lon:mq.lon,lat:mq.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:mq.text,hovertext:mq.hovertext,hoverinfo:PJ({},aWe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:tZt(),showlegend:PJ({},aWe.showlegend,{dflt:!1})},eZt("",{cLetter:"z",editTypeOverride:"calc"}))});var lWe=Se((Dxr,sWe)=>{"use strict";var rZt=Zr(),iZt=ed(),nZt=IJ();sWe.exports=function(t,r,n,i){function a(l,f){return rZt.coerce(t,r,nZt,l,f)}var o=a("lon")||[],s=a("lat")||[],u=Math.min(o.length,s.length);if(!u){r.visible=!1;return}r._length=u,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),iZt(t,r,i,a,{prefix:"",cLetter:"z"})}});var cWe=Se((Rxr,fWe)=>{"use strict";var DJ=_u(),aZt=Zr().isArrayOrTypedArray,RJ=ju().BADNUM,oZt=Rp(),uWe=Zr()._;fWe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=aZt(a)&&a.length,s=0;s<n;s++){var u=i[s]={},l=r.lon[s],f=r.lat[s];if(u.lonlat=DJ(l)&&DJ(f)?[+l,+f]:[RJ,RJ],o){var c=a[s];u.z=DJ(c)?c:RJ}}return oZt(t,r,{vals:o?a:[0,1],containerStr:"",cLetter:"z"}),n&&(i[0].t={labels:{lat:uWe(t,"lat:")+" ",lon:uWe(t,"lon:")+" "}}),i}});var yWe=Se((Fxr,vWe)=>{"use strict";var sZt=_u(),FJ=Zr(),hWe=Pl(),dWe=fc(),pWe=ju().BADNUM,lZt=tx().makeBlank;vWe.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:lZt()};if(!n)return a;var o=[],s,u=r.z,l=r.radius,f=FJ.isArrayOrTypedArray(u)&&u.length,c=FJ.isArrayOrTypedArray(l);for(s=0;s<t.length;s++){var h=t[s],d=h.lonlat;if(d[0]!==pWe){var p={};if(f){var x=h.z;p.z=x!==pWe?x:0}c&&(p.r=sZt(l[s])&&l[s]>0?+l[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:p})}}var b=dWe.extractOpts(r),y=b.reversescale?dWe.flipScale(b.colorscale):b.colorscale,k=y[0][1],E=hWe.opacity(k)<1?k:hWe.addOpacity(k,0),A=["interpolate",["linear"],["heatmap-density"],0,E];for(s=1;s<y.length;s++)A.push(y[s][0],y[s][1]);var L=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return FJ.extendFlat(a.heatmap.paint,{"heatmap-weight":f?L:1/(b.max-b.min),"heatmap-color":A,"heatmap-radius":c?{type:"identity",property:"r"}:r.radius,"heatmap-opacity":r.opacity}),a.geojson={type:"FeatureCollection",features:o},a.heatmap.layout.visibility="visible",a}});var xWe=Se((qxr,_We)=>{"use strict";var mWe=yWe(),uZt=bx().traceLayerPrefix;function gWe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",uZt+t+"-heatmap"]],this.below=null}var gq=gWe.prototype;gq.update=function(e){var t=this.subplot,r=this.layerList,n=mWe(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],u=o[1],l=n[s];t.setOptions(u,"setLayoutProperty",l.layout),l.layout.visibility==="visible"&&t.setOptions(u,"setPaintProperty",l.paint)}};gq._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],u=e[s];r.addLayer({type:s,id:o[1],source:i,layout:u.layout,paint:u.paint},t)}};gq._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};gq.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};_We.exports=function(t,r){var n=r[0].trace,i=new gWe(t,n.uid),a=i.sourceId,o=mWe(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 wWe=Se((Bxr,bWe)=>{"use strict";var fZt=hu(),cZt=hq().hoverPoints,hZt=hq().getExtraText;bWe.exports=function(t,r,n){var i=cZt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,u=o[a.index];if(delete a.color,"z"in u){var l=a.subplot.mockAxis;a.z=u.z,a.zLabel=fZt.tickText(l,l.c2l(u.z),"hover").text}return a.extraText=hZt(s,u,o[0].t.labels),[a]}}});var AWe=Se((Oxr,TWe)=>{"use strict";TWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var MWe=Se((Nxr,SWe)=>{"use strict";SWe.exports={attributes:IJ(),supplyDefaults:lWe(),colorbar:S_(),formatLabels:_J(),calc:cWe(),plot:xWe(),hoverPoints:wWe(),eventData:AWe(),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:yq(),categories:["map","gl","showLegend"],meta:{hr_name:"density_map"}}});var kWe=Se((Uxr,EWe)=>{"use strict";EWe.exports=MWe()});var BJ=Se((Hxr,PWe)=>{"use strict";var dZt=uc(),pZt=zf(),CWe=Ih(),qJ=i3(),vZt=Ec().attributes,LWe=Du().hovertemplateAttrs,yZt=Xf(),mZt=_f().templatedArray,gZt=Gc().descriptionOnlyNumbers,zWe=vu().extendFlat,_Zt=_c().overrideAll,Vxr=PWe.exports=_Zt({hoverinfo:zWe({},pZt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:qJ.hoverlabel,domain:vZt({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:gZt("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:dZt({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:CWe.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:qJ.hoverlabel,hovertemplate:LWe({},{keys:["value","label"]}),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:CWe.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:qJ.hoverlabel,hovertemplate:LWe({},{keys:["value","label"]}),colorscales:mZt("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:zWe(yZt().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")});var qWe=Se((Gxr,FWe)=>{"use strict";var kS=Zr(),_q=BJ(),xZt=Pl(),IWe=cd(),bZt=Ec().defaults,DWe=o5(),RWe=_f(),wZt=Jd();FWe.exports=function(t,r,n,i){function a(A,L){return kS.coerce(t,r,_q,A,L)}var o=kS.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,u=RWe.newContainer(r,"node");function l(A,L){return kS.coerce(s,u,_q.node,A,L)}l("label"),l("groups"),l("x"),l("y"),l("pad"),l("thickness"),l("line.color"),l("line.width"),l("hoverinfo",t.hoverinfo),DWe(s,u,l,o),l("hovertemplate"),l("align");var f=i.colorway,c=function(A){return f[A%f.length]};l("color",u.label.map(function(A,L){return xZt.addOpacity(c(L),.8)})),l("customdata");var h=t.link||{},d=RWe.newContainer(r,"link");function p(A,L){return kS.coerce(h,d,_q.link,A,L)}p("label"),p("arrowlen"),p("source"),p("target"),p("value"),p("line.color"),p("line.width"),p("hoverinfo",t.hoverinfo),DWe(h,d,p,o),p("hovertemplate");var x=IWe(i.paper_bgcolor).getLuminance()<.333,b=x?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",y=p("color",b);function k(A){var L=IWe(A);if(!L.isValid())return A;var _=L.getAlpha();return _<=.8?L.setAlpha(_+.2):L=x?L.brighten():L.darken(),L.toRgbString()}p("hovercolor",Array.isArray(y)?y.map(k):k(y)),p("customdata"),wZt(h,d,{name:"colorscales",handleItemDefaults:TZt}),bZt(r,i,a),a("orientation"),a("valueformat"),a("valuesuffix");var E;u.x.length&&u.y.length&&(E="freeform"),a("arrangement",E),kS.coerceFont(a,"textfont",i.font,{autoShadowDflt:!0}),r._length=null};function TZt(e,t){function r(n,i){return kS.coerce(e,t,_q.link.colorscales,n,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var OJ=Se((Wxr,BWe)=>{"use strict";BWe.exports=AZt;function AZt(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),u=0;u<t;++u)r[u]=-1,n[u]=0,i[u]=!1,a[u]=0,o[u]=-1,s[u]=[];var l=0,f=[],c=[];function h(b){var y=[b],k=[b];for(r[b]=n[b]=l,i[b]=!0,l+=1;k.length>0;){b=k[k.length-1];var E=e[b];if(a[b]<E.length){for(var A=a[b];A<E.length;++A){var L=E[A];if(r[L]<0){r[L]=n[L]=l,i[L]=!0,l+=1,y.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]=A}else{if(n[b]===r[b]){for(var _=[],C=[],M=0,A=y.length-1;A>=0;--A){var v=y[A];if(i[v]=!1,_.push(v),C.push(s[v]),M+=s[v].length,o[v]=f.length,v===b){y.length=A;break}}f.push(_);for(var z=new Array(M),A=0;A<C.length;A++)for(var T=0;T<C[A].length;T++)z[--M]=C[A][T];c.push(z)}k.pop()}}}for(var u=0;u<t;++u)r[u]<0&&h(u);for(var d,u=0;u<c.length;u++){var p=c[u];if(p.length!==0){p.sort(function(y,k){return y-k}),d=[p[0]];for(var x=1;x<p.length;x++)p[x]!==p[x-1]&&d.push(p[x]);c[u]=d}}return{components:f,adjacencyList:c}}});var VWe=Se((jxr,UWe)=>{"use strict";var SZt=OJ(),CS=Zr(),MZt=Km().wrap,Uk=CS.isArrayOrTypedArray,OWe=CS.isIndex,NWe=fc();function EZt(e){var t=e.node,r=e.link,n=[],i=Uk(r.color),a=Uk(r.hovercolor),o=Uk(r.customdata),s={},u={},l=r.colorscales.length,f;for(f=0;f<l;f++){var c=r.colorscales[f],h=NWe.extractScale(c,{cLetter:"c"}),d=NWe.makeColorScaleFunc(h);u[c.label]=d}var p=0;for(f=0;f<r.value.length;f++)r.source[f]>p&&(p=r.source[f]),r.target[f]>p&&(p=r.target[f]);var x=p+1;e.node._count=x;var b,y=e.node.groups,k={};for(f=0;f<y.length;f++){var E=y[f];for(b=0;b<E.length;b++){var A=E[b],L=x+f;k.hasOwnProperty(A)?CS.warn("Node "+A+" is already part of a group."):k[A]=L}}var _={source:[],target:[]};for(f=0;f<r.value.length;f++){var C=r.value[f],M=r.source[f],v=r.target[f];if(C>0&&OWe(M,x)&&OWe(v,x)&&!(k.hasOwnProperty(M)&&k.hasOwnProperty(v)&&k[M]===k[v])){k.hasOwnProperty(v)&&(v=k[v]),k.hasOwnProperty(M)&&(M=k[M]),M=+M,v=+v,s[M]=s[v]=!0;var z="";r.label&&r.label[f]&&(z=r.label[f]);var T=null;z&&u.hasOwnProperty(z)&&(T=u[z]),n.push({pointNumber:f,label:z,color:i?r.color[f]:r.color,hovercolor:a?r.hovercolor[f]:r.hovercolor,customdata:o?r.customdata[f]:r.customdata,concentrationscale:T,source:M,target:v,value:+C}),_.source.push(M),_.target.push(v)}}var F=x+y.length,q=Uk(t.color),U=Uk(t.customdata),H=[];for(f=0;f<F;f++)if(s[f]){var j=t.label[f];H.push({group:f>x-1,childrenNodes:[],pointNumber:f,label:j,color:q?t.color[f]:t.color,customdata:U?t.customdata[f]:t.customdata})}var G=!1;return kZt(F,_.source,_.target)&&(G=!0),{circular:G,links:n,nodes:H,groups:y,groupLookup:k}}function kZt(e,t,r){for(var n=CS.init2dArray(e,0),i=0;i<Math.min(t.length,r.length);i++)if(CS.isIndex(t[i],e)&&CS.isIndex(r[i],e)){if(t[i]===r[i])return!0;n[t[i]].push(r[i])}var a=SZt(n);return a.components.some(function(o){return o.length>1})}UWe.exports=function(t,r){var n=EZt(r);return MZt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var GWe=Se((xq,HWe)=>{(function(e,t){typeof xq=="object"&&typeof HWe!="undefined"?t(xq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(xq,function(e){"use strict";function t(C){var M=+this._x.call(null,C),v=+this._y.call(null,C);return r(this.cover(M,v),M,v,C)}function r(C,M,v,z){if(isNaN(M)||isNaN(v))return C;var T,F=C._root,q={data:z},U=C._x0,H=C._y0,j=C._x1,G=C._y1,O,W,re,ne,be,ze,Ce,he;if(!F)return C._root=q,C;for(;F.length;)if((be=M>=(O=(U+j)/2))?U=O:j=O,(ze=v>=(W=(H+G)/2))?H=W:G=W,T=F,!(F=F[Ce=ze<<1|be]))return T[Ce]=q,C;if(re=+C._x.call(null,F.data),ne=+C._y.call(null,F.data),M===re&&v===ne)return q.next=F,T?T[Ce]=q:C._root=q,C;do T=T?T[Ce]=new Array(4):C._root=new Array(4),(be=M>=(O=(U+j)/2))?U=O:j=O,(ze=v>=(W=(H+G)/2))?H=W:G=W;while((Ce=ze<<1|be)===(he=(ne>=W)<<1|re>=O));return T[he]=F,T[Ce]=q,C}function n(C){var M,v,z=C.length,T,F,q=new Array(z),U=new Array(z),H=1/0,j=1/0,G=-1/0,O=-1/0;for(v=0;v<z;++v)isNaN(T=+this._x.call(null,M=C[v]))||isNaN(F=+this._y.call(null,M))||(q[v]=T,U[v]=F,T<H&&(H=T),T>G&&(G=T),F<j&&(j=F),F>O&&(O=F));if(H>G||j>O)return this;for(this.cover(H,j).cover(G,O),v=0;v<z;++v)r(this,q[v],U[v],C[v]);return this}function i(C,M){if(isNaN(C=+C)||isNaN(M=+M))return this;var v=this._x0,z=this._y0,T=this._x1,F=this._y1;if(isNaN(v))T=(v=Math.floor(C))+1,F=(z=Math.floor(M))+1;else{for(var q=T-v,U=this._root,H,j;v>C||C>=T||z>M||M>=F;)switch(j=(M<z)<<1|C<v,H=new Array(4),H[j]=U,U=H,q*=2,j){case 0:T=v+q,F=z+q;break;case 1:v=T-q,F=z+q;break;case 2:T=v+q,z=F-q;break;case 3:v=T-q,z=F-q;break}this._root&&this._root.length&&(this._root=U)}return this._x0=v,this._y0=z,this._x1=T,this._y1=F,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,v,z,T){this.node=C,this.x0=M,this.y0=v,this.x1=z,this.y1=T}function u(C,M,v){var z,T=this._x0,F=this._y0,q,U,H,j,G=this._x1,O=this._y1,W=[],re=this._root,ne,be;for(re&&W.push(new s(re,T,F,G,O)),v==null?v=1/0:(T=C-v,F=M-v,G=C+v,O=M+v,v*=v);ne=W.pop();)if(!(!(re=ne.node)||(q=ne.x0)>G||(U=ne.y0)>O||(H=ne.x1)<T||(j=ne.y1)<F))if(re.length){var ze=(q+H)/2,Ce=(U+j)/2;W.push(new s(re[3],ze,Ce,H,j),new s(re[2],q,Ce,ze,j),new s(re[1],ze,U,H,Ce),new s(re[0],q,U,ze,Ce)),(be=(M>=Ce)<<1|C>=ze)&&(ne=W[W.length-1],W[W.length-1]=W[W.length-1-be],W[W.length-1-be]=ne)}else{var he=C-+this._x.call(null,re.data),te=M-+this._y.call(null,re.data),ke=he*he+te*te;if(ke<v){var Ee=Math.sqrt(v=ke);T=C-Ee,F=M-Ee,G=C+Ee,O=M+Ee,z=re.data}}return z}function l(C){if(isNaN(G=+this._x.call(null,C))||isNaN(O=+this._y.call(null,C)))return this;var M,v=this._root,z,T,F,q=this._x0,U=this._y0,H=this._x1,j=this._y1,G,O,W,re,ne,be,ze,Ce;if(!v)return this;if(v.length)for(;;){if((ne=G>=(W=(q+H)/2))?q=W:H=W,(be=O>=(re=(U+j)/2))?U=re:j=re,M=v,!(v=v[ze=be<<1|ne]))return this;if(!v.length)break;(M[ze+1&3]||M[ze+2&3]||M[ze+3&3])&&(z=M,Ce=ze)}for(;v.data!==C;)if(T=v,!(v=v.next))return this;return(F=v.next)&&delete v.next,T?(F?T.next=F:delete T.next,this):M?(F?M[ze]=F:delete M[ze],(v=M[0]||M[1]||M[2]||M[3])&&v===(M[3]||M[2]||M[1]||M[0])&&!v.length&&(z?z[Ce]=v:this._root=v),this):(this._root=F,this)}function f(C){for(var M=0,v=C.length;M<v;++M)this.remove(C[M]);return this}function c(){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=[],v,z=this._root,T,F,q,U,H;for(z&&M.push(new s(z,this._x0,this._y0,this._x1,this._y1));v=M.pop();)if(!C(z=v.node,F=v.x0,q=v.y0,U=v.x1,H=v.y1)&&z.length){var j=(F+U)/2,G=(q+H)/2;(T=z[3])&&M.push(new s(T,j,G,U,H)),(T=z[2])&&M.push(new s(T,F,G,j,H)),(T=z[1])&&M.push(new s(T,j,q,U,G)),(T=z[0])&&M.push(new s(T,F,q,j,G))}return this}function p(C){var M=[],v=[],z;for(this._root&&M.push(new s(this._root,this._x0,this._y0,this._x1,this._y1));z=M.pop();){var T=z.node;if(T.length){var F,q=z.x0,U=z.y0,H=z.x1,j=z.y1,G=(q+H)/2,O=(U+j)/2;(F=T[0])&&M.push(new s(F,q,U,G,O)),(F=T[1])&&M.push(new s(F,G,U,H,O)),(F=T[2])&&M.push(new s(F,q,O,G,j)),(F=T[3])&&M.push(new s(F,G,O,H,j))}v.push(z)}for(;z=v.pop();)C(z.node,z.x0,z.y0,z.x1,z.y1);return this}function x(C){return C[0]}function b(C){return arguments.length?(this._x=C,this):this._x}function y(C){return C[1]}function k(C){return arguments.length?(this._y=C,this):this._y}function E(C,M,v){var z=new A(M==null?x:M,v==null?y:v,NaN,NaN,NaN,NaN);return C==null?z:z.addAll(C)}function A(C,M,v,z,T,F){this._x=C,this._y=M,this._x0=v,this._y0=z,this._x1=T,this._y1=F,this._root=void 0}function L(C){for(var M={data:C.data},v=M;C=C.next;)v=v.next={data:C.data};return M}var _=E.prototype=A.prototype;_.copy=function(){var C=new A(this._x,this._y,this._x0,this._y0,this._x1,this._y1),M=this._root,v,z;if(!M)return C;if(!M.length)return C._root=L(M),C;for(v=[{source:M,target:C._root=new Array(4)}];M=v.pop();)for(var T=0;T<4;++T)(z=M.source[T])&&(z.length?v.push({source:z,target:M.target[T]=new Array(4)}):M.target[T]=L(z));return C},_.add=t,_.addAll=n,_.cover=i,_.data=a,_.extent=o,_.find=u,_.remove=l,_.removeAll=f,_.root=c,_.size=h,_.visit=d,_.visitAfter=p,_.x=b,_.y=k,e.quadtree=E,Object.defineProperty(e,"__esModule",{value:!0})})});var wq=Se((bq,WWe)=>{(function(e,t){typeof bq=="object"&&typeof WWe!="undefined"?t(bq):typeof define=="function"&&define.amd?define(["exports"],t):t(e.d3=e.d3||{})})(bq,function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(x){return t+x in this},get:function(x){return this[t+x]},set:function(x,b){return this[t+x]=b,this},remove:function(x){var b=t+x;return b in this&&delete this[b]},clear:function(){for(var x in this)x[0]===t&&delete this[x]},keys:function(){var x=[];for(var b in this)b[0]===t&&x.push(b.slice(1));return x},values:function(){var x=[];for(var b in this)b[0]===t&&x.push(this[b]);return x},entries:function(){var x=[];for(var b in this)b[0]===t&&x.push({key:b.slice(1),value:this[b]});return x},size:function(){var x=0;for(var b in this)b[0]===t&&++x;return x},empty:function(){for(var x in this)if(x[0]===t)return!1;return!0},each:function(x){for(var b in this)b[0]===t&&x(this[b],b.slice(1),this)}};function n(x,b){var y=new r;if(x instanceof r)x.each(function(_,C){y.set(C,_)});else if(Array.isArray(x)){var k=-1,E=x.length,A;if(b==null)for(;++k<E;)y.set(k,x[k]);else for(;++k<E;)y.set(b(A=x[k],k,x),A)}else if(x)for(var L in x)y.set(L,x[L]);return y}function i(){var x=[],b=[],y,k,E;function A(_,C,M,v){if(C>=x.length)return y!=null&&_.sort(y),k!=null?k(_):_;for(var z=-1,T=_.length,F=x[C++],q,U,H=n(),j,G=M();++z<T;)(j=H.get(q=F(U=_[z])+""))?j.push(U):H.set(q,[U]);return H.each(function(O,W){v(G,W,A(O,C,M,v))}),G}function L(_,C){if(++C>x.length)return _;var M,v=b[C-1];return k!=null&&C>=x.length?M=_.entries():(M=[],_.each(function(z,T){M.push({key:T,values:L(z,C)})})),v!=null?M.sort(function(z,T){return v(z.key,T.key)}):M}return E={object:function(_){return A(_,0,a,o)},map:function(_){return A(_,0,s,u)},entries:function(_){return L(A(_,0,s,u),0)},key:function(_){return x.push(_),E},sortKeys:function(_){return b[x.length-1]=_,E},sortValues:function(_){return y=_,E},rollup:function(_){return k=_,E}}}function a(){return{}}function o(x,b,y){x[b]=y}function s(){return n()}function u(x,b,y){x.set(b,y)}function l(){}var f=n.prototype;l.prototype=c.prototype={constructor:l,has:f.has,add:function(x){return x+="",this[t+x]=x,this},remove:f.remove,clear:f.clear,values:f.keys,size:f.size,empty:f.empty,each:f.each};function c(x,b){var y=new l;if(x instanceof l)x.each(function(A){y.add(A)});else if(x){var k=-1,E=x.length;if(b==null)for(;++k<E;)y.add(x[k]);else for(;++k<E;)y.add(b(x[k],k,x))}return y}function h(x){var b=[];for(var y in x)b.push(y);return b}function d(x){var b=[];for(var y in x)b.push(x[y]);return b}function p(x){var b=[];for(var y in x)b.push({key:y,value:x[y]});return b}e.nest=i,e.set=c,e.map=n,e.keys=h,e.values=d,e.entries=p,Object.defineProperty(e,"__esModule",{value:!0})})});var ZWe=Se((Tq,jWe)=>{(function(e,t){typeof Tq=="object"&&typeof jWe!="undefined"?t(Tq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(Tq,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,u=arguments.length,l={},f;s<u;++s){if(!(f=arguments[s]+"")||f in l||/[\s.]/.test(f))throw new Error("illegal type: "+f);l[f]=[]}return new n(l)}function n(s){this._=s}function i(s,u){return s.trim().split(/^|\s+/).map(function(l){var f="",c=l.indexOf(".");if(c>=0&&(f=l.slice(c+1),l=l.slice(0,c)),l&&!u.hasOwnProperty(l))throw new Error("unknown type: "+l);return{type:l,name:f}})}n.prototype=r.prototype={constructor:n,on:function(s,u){var l=this._,f=i(s+"",l),c,h=-1,d=f.length;if(arguments.length<2){for(;++h<d;)if((c=(s=f[h]).type)&&(c=a(l[c],s.name)))return c;return}if(u!=null&&typeof u!="function")throw new Error("invalid callback: "+u);for(;++h<d;)if(c=(s=f[h]).type)l[c]=o(l[c],s.name,u);else if(u==null)for(c in l)l[c]=o(l[c],s.name,null);return this},copy:function(){var s={},u=this._;for(var l in u)s[l]=u[l].slice();return new n(s)},call:function(s,u){if((c=arguments.length-2)>0)for(var l=new Array(c),f=0,c,h;f<c;++f)l[f]=arguments[f+2];if(!this._.hasOwnProperty(s))throw new Error("unknown type: "+s);for(h=this._[s],f=0,c=h.length;f<c;++f)h[f].value.apply(u,l)},apply:function(s,u,l){if(!this._.hasOwnProperty(s))throw new Error("unknown type: "+s);for(var f=this._[s],c=0,h=f.length;c<h;++c)f[c].value.apply(u,l)}};function a(s,u){for(var l=0,f=s.length,c;l<f;++l)if((c=s[l]).name===u)return c.value}function o(s,u,l){for(var f=0,c=s.length;f<c;++f)if(s[f].name===u){s[f]=t,s=s.slice(0,f).concat(s.slice(f+1));break}return l!=null&&s.push({name:u,value:l}),s}e.dispatch=r,Object.defineProperty(e,"__esModule",{value:!0})})});var YWe=Se((Aq,XWe)=>{(function(e,t){typeof Aq=="object"&&typeof XWe!="undefined"?t(Aq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(Aq,function(e){"use strict";var t=0,r=0,n=0,i=1e3,a,o,s=0,u=0,l=0,f=typeof performance=="object"&&performance.now?performance:Date,c=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(C){setTimeout(C,17)};function h(){return u||(c(d),u=f.now()+l)}function d(){u=0}function p(){this._call=this._time=this._next=null}p.prototype=x.prototype={constructor:p,restart:function(C,M,v){if(typeof C!="function")throw new TypeError("callback is not a function");v=(v==null?h():+v)+(M==null?0:+M),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=C,this._time=v,A()},stop:function(){this._call&&(this._call=null,this._time=1/0,A())}};function x(C,M,v){var z=new p;return z.restart(C,M,v),z}function b(){h(),++t;for(var C=a,M;C;)(M=u-C._time)>=0&&C._call.call(null,M),C=C._next;--t}function y(){u=(s=f.now())+l,t=r=0;try{b()}finally{t=0,E(),u=0}}function k(){var C=f.now(),M=C-s;M>i&&(l-=M,s=C)}function E(){for(var C,M=a,v,z=1/0;M;)M._call?(z>M._time&&(z=M._time),C=M,M=M._next):(v=M._next,M._next=null,M=C?C._next=v:a=v);o=C,A(z)}function A(C){if(!t){r&&(r=clearTimeout(r));var M=C-u;M>24?(C<1/0&&(r=setTimeout(y,C-f.now()-l)),n&&(n=clearInterval(n))):(n||(s=f.now(),n=setInterval(k,i)),t=1,c(y))}}function L(C,M,v){var z=new p;return M=M==null?0:+M,z.restart(function(T){z.stop(),C(T+M)},M,v),z}function _(C,M,v){var z=new p,T=M;return M==null?(z.restart(C,M,v),z):(M=+M,v=v==null?h():+v,z.restart(function F(q){q+=T,z.restart(F,T+=M,v),C(q)},M,v),z)}e.interval=_,e.now=h,e.timeout=L,e.timer=x,e.timerFlush=b,Object.defineProperty(e,"__esModule",{value:!0})})});var JWe=Se((Sq,KWe)=>{(function(e,t){typeof Sq=="object"&&typeof KWe!="undefined"?t(Sq,GWe(),wq(),ZWe(),YWe()):typeof define=="function"&&define.amd?define(["exports","d3-quadtree","d3-collection","d3-dispatch","d3-timer"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(Sq,function(e,t,r,n,i){"use strict";function a(C,M){var v;C==null&&(C=0),M==null&&(M=0);function z(){var T,F=v.length,q,U=0,H=0;for(T=0;T<F;++T)q=v[T],U+=q.x,H+=q.y;for(U=U/F-C,H=H/F-M,T=0;T<F;++T)q=v[T],q.x-=U,q.y-=H}return z.initialize=function(T){v=T},z.x=function(T){return arguments.length?(C=+T,z):C},z.y=function(T){return arguments.length?(M=+T,z):M},z}function o(C){return function(){return C}}function s(){return(Math.random()-.5)*1e-6}function u(C){return C.x+C.vx}function l(C){return C.y+C.vy}function f(C){var M,v,z=1,T=1;typeof C!="function"&&(C=o(C==null?1:+C));function F(){for(var H,j=M.length,G,O,W,re,ne,be,ze=0;ze<T;++ze)for(G=t.quadtree(M,u,l).visitAfter(q),H=0;H<j;++H)O=M[H],ne=v[O.index],be=ne*ne,W=O.x+O.vx,re=O.y+O.vy,G.visit(Ce);function Ce(he,te,ke,Ee,Me){var Oe=he.data,Re=he.r,me=ne+Re;if(Oe){if(Oe.index>O.index){var Be=W-Oe.x-Oe.vx,fe=re-Oe.y-Oe.vy,Ze=Be*Be+fe*fe;Ze<me*me&&(Be===0&&(Be=s(),Ze+=Be*Be),fe===0&&(fe=s(),Ze+=fe*fe),Ze=(me-(Ze=Math.sqrt(Ze)))/Ze*z,O.vx+=(Be*=Ze)*(me=(Re*=Re)/(be+Re)),O.vy+=(fe*=Ze)*me,Oe.vx-=Be*(me=1-me),Oe.vy-=fe*me)}return}return te>W+me||Ee<W-me||ke>re+me||Me<re-me}}function q(H){if(H.data)return H.r=v[H.data.index];for(var j=H.r=0;j<4;++j)H[j]&&H[j].r>H.r&&(H.r=H[j].r)}function U(){if(M){var H,j=M.length,G;for(v=new Array(j),H=0;H<j;++H)G=M[H],v[G.index]=+C(G,H,M)}}return F.initialize=function(H){M=H,U()},F.iterations=function(H){return arguments.length?(T=+H,F):T},F.strength=function(H){return arguments.length?(z=+H,F):z},F.radius=function(H){return arguments.length?(C=typeof H=="function"?H:o(+H),U(),F):C},F}function c(C){return C.index}function h(C,M){var v=C.get(M);if(!v)throw new Error("missing: "+M);return v}function d(C){var M=c,v=G,z,T=o(30),F,q,U,H,j=1;C==null&&(C=[]);function G(be){return 1/Math.min(U[be.source.index],U[be.target.index])}function O(be){for(var ze=0,Ce=C.length;ze<j;++ze)for(var he=0,te,ke,Ee,Me,Oe,Re,me;he<Ce;++he)te=C[he],ke=te.source,Ee=te.target,Me=Ee.x+Ee.vx-ke.x-ke.vx||s(),Oe=Ee.y+Ee.vy-ke.y-ke.vy||s(),Re=Math.sqrt(Me*Me+Oe*Oe),Re=(Re-F[he])/Re*be*z[he],Me*=Re,Oe*=Re,Ee.vx-=Me*(me=H[he]),Ee.vy-=Oe*me,ke.vx+=Me*(me=1-me),ke.vy+=Oe*me}function W(){if(q){var be,ze=q.length,Ce=C.length,he=r.map(q,M),te;for(be=0,U=new Array(ze);be<Ce;++be)te=C[be],te.index=be,typeof te.source!="object"&&(te.source=h(he,te.source)),typeof te.target!="object"&&(te.target=h(he,te.target)),U[te.source.index]=(U[te.source.index]||0)+1,U[te.target.index]=(U[te.target.index]||0)+1;for(be=0,H=new Array(Ce);be<Ce;++be)te=C[be],H[be]=U[te.source.index]/(U[te.source.index]+U[te.target.index]);z=new Array(Ce),re(),F=new Array(Ce),ne()}}function re(){if(q)for(var be=0,ze=C.length;be<ze;++be)z[be]=+v(C[be],be,C)}function ne(){if(q)for(var be=0,ze=C.length;be<ze;++be)F[be]=+T(C[be],be,C)}return O.initialize=function(be){q=be,W()},O.links=function(be){return arguments.length?(C=be,W(),O):C},O.id=function(be){return arguments.length?(M=be,O):M},O.iterations=function(be){return arguments.length?(j=+be,O):j},O.strength=function(be){return arguments.length?(v=typeof be=="function"?be:o(+be),re(),O):v},O.distance=function(be){return arguments.length?(T=typeof be=="function"?be:o(+be),ne(),O):T},O}function p(C){return C.x}function x(C){return C.y}var b=10,y=Math.PI*(3-Math.sqrt(5));function k(C){var M,v=1,z=.001,T=1-Math.pow(z,1/300),F=0,q=.6,U=r.map(),H=i.timer(G),j=n.dispatch("tick","end");C==null&&(C=[]);function G(){O(),j.call("tick",M),v<z&&(H.stop(),j.call("end",M))}function O(ne){var be,ze=C.length,Ce;ne===void 0&&(ne=1);for(var he=0;he<ne;++he)for(v+=(F-v)*T,U.each(function(te){te(v)}),be=0;be<ze;++be)Ce=C[be],Ce.fx==null?Ce.x+=Ce.vx*=q:(Ce.x=Ce.fx,Ce.vx=0),Ce.fy==null?Ce.y+=Ce.vy*=q:(Ce.y=Ce.fy,Ce.vy=0);return M}function W(){for(var ne=0,be=C.length,ze;ne<be;++ne){if(ze=C[ne],ze.index=ne,ze.fx!=null&&(ze.x=ze.fx),ze.fy!=null&&(ze.y=ze.fy),isNaN(ze.x)||isNaN(ze.y)){var Ce=b*Math.sqrt(ne),he=ne*y;ze.x=Ce*Math.cos(he),ze.y=Ce*Math.sin(he)}(isNaN(ze.vx)||isNaN(ze.vy))&&(ze.vx=ze.vy=0)}}function re(ne){return ne.initialize&&ne.initialize(C),ne}return W(),M={tick:O,restart:function(){return H.restart(G),M},stop:function(){return H.stop(),M},nodes:function(ne){return arguments.length?(C=ne,W(),U.each(re),M):C},alpha:function(ne){return arguments.length?(v=+ne,M):v},alphaMin:function(ne){return arguments.length?(z=+ne,M):z},alphaDecay:function(ne){return arguments.length?(T=+ne,M):+T},alphaTarget:function(ne){return arguments.length?(F=+ne,M):F},velocityDecay:function(ne){return arguments.length?(q=1-ne,M):1-q},force:function(ne,be){return arguments.length>1?(be==null?U.remove(ne):U.set(ne,re(be)),M):U.get(ne)},find:function(ne,be,ze){var Ce=0,he=C.length,te,ke,Ee,Me,Oe;for(ze==null?ze=1/0:ze*=ze,Ce=0;Ce<he;++Ce)Me=C[Ce],te=ne-Me.x,ke=be-Me.y,Ee=te*te+ke*ke,Ee<ze&&(Oe=Me,ze=Ee);return Oe},on:function(ne,be){return arguments.length>1?(j.on(ne,be),M):j.on(ne)}}}function E(){var C,M,v,z=o(-30),T,F=1,q=1/0,U=.81;function H(W){var re,ne=C.length,be=t.quadtree(C,p,x).visitAfter(G);for(v=W,re=0;re<ne;++re)M=C[re],be.visit(O)}function j(){if(C){var W,re=C.length,ne;for(T=new Array(re),W=0;W<re;++W)ne=C[W],T[ne.index]=+z(ne,W,C)}}function G(W){var re=0,ne,be,ze=0,Ce,he,te;if(W.length){for(Ce=he=te=0;te<4;++te)(ne=W[te])&&(be=Math.abs(ne.value))&&(re+=ne.value,ze+=be,Ce+=be*ne.x,he+=be*ne.y);W.x=Ce/ze,W.y=he/ze}else{ne=W,ne.x=ne.data.x,ne.y=ne.data.y;do re+=T[ne.data.index];while(ne=ne.next)}W.value=re}function O(W,re,ne,be){if(!W.value)return!0;var ze=W.x-M.x,Ce=W.y-M.y,he=be-re,te=ze*ze+Ce*Ce;if(he*he/U<te)return te<q&&(ze===0&&(ze=s(),te+=ze*ze),Ce===0&&(Ce=s(),te+=Ce*Ce),te<F&&(te=Math.sqrt(F*te)),M.vx+=ze*W.value*v/te,M.vy+=Ce*W.value*v/te),!0;if(W.length||te>=q)return;(W.data!==M||W.next)&&(ze===0&&(ze=s(),te+=ze*ze),Ce===0&&(Ce=s(),te+=Ce*Ce),te<F&&(te=Math.sqrt(F*te)));do W.data!==M&&(he=T[W.data.index]*v/te,M.vx+=ze*he,M.vy+=Ce*he);while(W=W.next)}return H.initialize=function(W){C=W,j()},H.strength=function(W){return arguments.length?(z=typeof W=="function"?W:o(+W),j(),H):z},H.distanceMin=function(W){return arguments.length?(F=W*W,H):Math.sqrt(F)},H.distanceMax=function(W){return arguments.length?(q=W*W,H):Math.sqrt(q)},H.theta=function(W){return arguments.length?(U=W*W,H):Math.sqrt(U)},H}function A(C,M,v){var z,T=o(.1),F,q;typeof C!="function"&&(C=o(+C)),M==null&&(M=0),v==null&&(v=0);function U(j){for(var G=0,O=z.length;G<O;++G){var W=z[G],re=W.x-M||1e-6,ne=W.y-v||1e-6,be=Math.sqrt(re*re+ne*ne),ze=(q[G]-be)*F[G]*j/be;W.vx+=re*ze,W.vy+=ne*ze}}function H(){if(z){var j,G=z.length;for(F=new Array(G),q=new Array(G),j=0;j<G;++j)q[j]=+C(z[j],j,z),F[j]=isNaN(q[j])?0:+T(z[j],j,z)}}return U.initialize=function(j){z=j,H()},U.strength=function(j){return arguments.length?(T=typeof j=="function"?j:o(+j),H(),U):T},U.radius=function(j){return arguments.length?(C=typeof j=="function"?j:o(+j),H(),U):C},U.x=function(j){return arguments.length?(M=+j,U):M},U.y=function(j){return arguments.length?(v=+j,U):v},U}function L(C){var M=o(.1),v,z,T;typeof C!="function"&&(C=o(C==null?0:+C));function F(U){for(var H=0,j=v.length,G;H<j;++H)G=v[H],G.vx+=(T[H]-G.x)*z[H]*U}function q(){if(v){var U,H=v.length;for(z=new Array(H),T=new Array(H),U=0;U<H;++U)z[U]=isNaN(T[U]=+C(v[U],U,v))?0:+M(v[U],U,v)}}return F.initialize=function(U){v=U,q()},F.strength=function(U){return arguments.length?(M=typeof U=="function"?U:o(+U),q(),F):M},F.x=function(U){return arguments.length?(C=typeof U=="function"?U:o(+U),q(),F):C},F}function _(C){var M=o(.1),v,z,T;typeof C!="function"&&(C=o(C==null?0:+C));function F(U){for(var H=0,j=v.length,G;H<j;++H)G=v[H],G.vy+=(T[H]-G.y)*z[H]*U}function q(){if(v){var U,H=v.length;for(z=new Array(H),T=new Array(H),U=0;U<H;++U)z[U]=isNaN(T[U]=+C(v[U],U,v))?0:+M(v[U],U,v)}}return F.initialize=function(U){v=U,q()},F.strength=function(U){return arguments.length?(M=typeof U=="function"?U:o(+U),q(),F):M},F.y=function(U){return arguments.length?(C=typeof U=="function"?U:o(+U),q(),F):C},F}e.forceCenter=a,e.forceCollide=f,e.forceLink=d,e.forceManyBody=E,e.forceRadial=A,e.forceSimulation=k,e.forceX=L,e.forceY=_,Object.defineProperty(e,"__esModule",{value:!0})})});var QWe=Se((Mq,$We)=>{(function(e,t){typeof Mq=="object"&&typeof $We!="undefined"?t(Mq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(Mq,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,u){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+u)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,u){this._+="L"+(this._x1=+s)+","+(this._y1=+u)},quadraticCurveTo:function(s,u,l,f){this._+="Q"+ +s+","+ +u+","+(this._x1=+l)+","+(this._y1=+f)},bezierCurveTo:function(s,u,l,f,c,h){this._+="C"+ +s+","+ +u+","+ +l+","+ +f+","+(this._x1=+c)+","+(this._y1=+h)},arcTo:function(s,u,l,f,c){s=+s,u=+u,l=+l,f=+f,c=+c;var h=this._x1,d=this._y1,p=l-s,x=f-u,b=h-s,y=d-u,k=b*b+y*y;if(c<0)throw new Error("negative radius: "+c);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=u);else if(k>n)if(!(Math.abs(y*p-x*b)>n)||!c)this._+="L"+(this._x1=s)+","+(this._y1=u);else{var E=l-h,A=f-d,L=p*p+x*x,_=E*E+A*A,C=Math.sqrt(L),M=Math.sqrt(k),v=c*Math.tan((t-Math.acos((L+k-_)/(2*C*M)))/2),z=v/M,T=v/C;Math.abs(z-1)>n&&(this._+="L"+(s+z*b)+","+(u+z*y)),this._+="A"+c+","+c+",0,0,"+ +(y*E>b*A)+","+(this._x1=s+T*p)+","+(this._y1=u+T*x)}},arc:function(s,u,l,f,c,h){s=+s,u=+u,l=+l,h=!!h;var d=l*Math.cos(f),p=l*Math.sin(f),x=s+d,b=u+p,y=1^h,k=h?f-c:c-f;if(l<0)throw new Error("negative radius: "+l);this._x1===null?this._+="M"+x+","+b:(Math.abs(this._x1-x)>n||Math.abs(this._y1-b)>n)&&(this._+="L"+x+","+b),l&&(k<0&&(k=k%r+r),k>i?this._+="A"+l+","+l+",0,1,"+y+","+(s-d)+","+(u-p)+"A"+l+","+l+",0,1,"+y+","+(this._x1=x)+","+(this._y1=b):k>n&&(this._+="A"+l+","+l+",0,"+ +(k>=t)+","+y+","+(this._x1=s+l*Math.cos(c))+","+(this._y1=u+l*Math.sin(c))))},rect:function(s,u,l,f){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+u)+"h"+ +l+"v"+ +f+"h"+-l+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var NJ=Se((Eq,eje)=>{(function(e,t){typeof Eq=="object"&&typeof eje!="undefined"?t(Eq,QWe()):typeof define=="function"&&define.amd?define(["exports","d3-path"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(Eq,function(e,t){"use strict";function r(st){return function(){return st}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,u=Math.sin,l=Math.sqrt,f=1e-12,c=Math.PI,h=c/2,d=2*c;function p(st){return st>1?0:st<-1?c:Math.acos(st)}function x(st){return st>=1?h:st<=-1?-h:Math.asin(st)}function b(st){return st.innerRadius}function y(st){return st.outerRadius}function k(st){return st.startAngle}function E(st){return st.endAngle}function A(st){return st&&st.padAngle}function L(st,Wt,tr,or,Nr,hi,Gi,Qr){var Ui=tr-st,zn=or-Wt,fn=Gi-Nr,xn=Qr-hi,_a=xn*Ui-fn*zn;if(!(_a*_a<f))return _a=(fn*(Wt-hi)-xn*(st-Nr))/_a,[st+_a*Ui,Wt+_a*zn]}function _(st,Wt,tr,or,Nr,hi,Gi){var Qr=st-tr,Ui=Wt-or,zn=(Gi?hi:-hi)/l(Qr*Qr+Ui*Ui),fn=zn*Ui,xn=-zn*Qr,_a=st+fn,Wn=Wt+xn,Fn=tr+fn,ia=or+xn,za=(_a+Fn)/2,Hr=(Wn+ia)/2,na=Fn-_a,go=ia-Wn,Dn=na*na+go*go,un=Nr-hi,Zn=_a*ia-Fn*Wn,Wo=(go<0?-1:1)*l(o(0,un*un*Dn-Zn*Zn)),Ba=(Zn*go-na*Wo)/Dn,Bo=(-Zn*na-go*Wo)/Dn,Ea=(Zn*go+na*Wo)/Dn,Ha=(-Zn*na+go*Wo)/Dn,tn=Ba-za,Cn=Bo-Hr,Xn=Ea-za,ts=Ha-Hr;return tn*tn+Cn*Cn>Xn*Xn+ts*ts&&(Ba=Ea,Bo=Ha),{cx:Ba,cy:Bo,x01:-fn,y01:-xn,x11:Ba*(Nr/un-1),y11:Bo*(Nr/un-1)}}function C(){var st=b,Wt=y,tr=r(0),or=null,Nr=k,hi=E,Gi=A,Qr=null;function Ui(){var zn,fn,xn=+st.apply(this,arguments),_a=+Wt.apply(this,arguments),Wn=Nr.apply(this,arguments)-h,Fn=hi.apply(this,arguments)-h,ia=n(Fn-Wn),za=Fn>Wn;if(Qr||(Qr=zn=t.path()),_a<xn&&(fn=_a,_a=xn,xn=fn),!(_a>f))Qr.moveTo(0,0);else if(ia>d-f)Qr.moveTo(_a*a(Wn),_a*u(Wn)),Qr.arc(0,0,_a,Wn,Fn,!za),xn>f&&(Qr.moveTo(xn*a(Fn),xn*u(Fn)),Qr.arc(0,0,xn,Fn,Wn,za));else{var Hr=Wn,na=Fn,go=Wn,Dn=Fn,un=ia,Zn=ia,Wo=Gi.apply(this,arguments)/2,Ba=Wo>f&&(or?+or.apply(this,arguments):l(xn*xn+_a*_a)),Bo=s(n(_a-xn)/2,+tr.apply(this,arguments)),Ea=Bo,Ha=Bo,tn,Cn;if(Ba>f){var Xn=x(Ba/xn*u(Wo)),ts=x(Ba/_a*u(Wo));(un-=Xn*2)>f?(Xn*=za?1:-1,go+=Xn,Dn-=Xn):(un=0,go=Dn=(Wn+Fn)/2),(Zn-=ts*2)>f?(ts*=za?1:-1,Hr+=ts,na-=ts):(Zn=0,Hr=na=(Wn+Fn)/2)}var Ja=_a*a(Hr),to=_a*u(Hr),Ri=xn*a(Dn),an=xn*u(Dn);if(Bo>f){var cs=_a*a(na),pa=_a*u(na),ln=xn*a(go),ka=xn*u(go),va;if(ia<c&&(va=L(Ja,to,ln,ka,cs,pa,Ri,an))){var bo=Ja-va[0],Co=to-va[1],Fi=cs-va[0],Yn=pa-va[1],xa=1/u(p((bo*Fi+Co*Yn)/(l(bo*bo+Co*Co)*l(Fi*Fi+Yn*Yn)))/2),Qi=l(va[0]*va[0]+va[1]*va[1]);Ea=s(Bo,(xn-Qi)/(xa-1)),Ha=s(Bo,(_a-Qi)/(xa+1))}}Zn>f?Ha>f?(tn=_(ln,ka,Ja,to,_a,Ha,za),Cn=_(cs,pa,Ri,an,_a,Ha,za),Qr.moveTo(tn.cx+tn.x01,tn.cy+tn.y01),Ha<Bo?Qr.arc(tn.cx,tn.cy,Ha,i(tn.y01,tn.x01),i(Cn.y01,Cn.x01),!za):(Qr.arc(tn.cx,tn.cy,Ha,i(tn.y01,tn.x01),i(tn.y11,tn.x11),!za),Qr.arc(0,0,_a,i(tn.cy+tn.y11,tn.cx+tn.x11),i(Cn.cy+Cn.y11,Cn.cx+Cn.x11),!za),Qr.arc(Cn.cx,Cn.cy,Ha,i(Cn.y11,Cn.x11),i(Cn.y01,Cn.x01),!za))):(Qr.moveTo(Ja,to),Qr.arc(0,0,_a,Hr,na,!za)):Qr.moveTo(Ja,to),!(xn>f)||!(un>f)?Qr.lineTo(Ri,an):Ea>f?(tn=_(Ri,an,cs,pa,xn,-Ea,za),Cn=_(Ja,to,ln,ka,xn,-Ea,za),Qr.lineTo(tn.cx+tn.x01,tn.cy+tn.y01),Ea<Bo?Qr.arc(tn.cx,tn.cy,Ea,i(tn.y01,tn.x01),i(Cn.y01,Cn.x01),!za):(Qr.arc(tn.cx,tn.cy,Ea,i(tn.y01,tn.x01),i(tn.y11,tn.x11),!za),Qr.arc(0,0,xn,i(tn.cy+tn.y11,tn.cx+tn.x11),i(Cn.cy+Cn.y11,Cn.cx+Cn.x11),za),Qr.arc(Cn.cx,Cn.cy,Ea,i(Cn.y11,Cn.x11),i(Cn.y01,Cn.x01),!za))):Qr.arc(0,0,xn,Dn,go,za)}if(Qr.closePath(),zn)return Qr=null,zn+""||null}return Ui.centroid=function(){var zn=(+st.apply(this,arguments)+ +Wt.apply(this,arguments))/2,fn=(+Nr.apply(this,arguments)+ +hi.apply(this,arguments))/2-c/2;return[a(fn)*zn,u(fn)*zn]},Ui.innerRadius=function(zn){return arguments.length?(st=typeof zn=="function"?zn:r(+zn),Ui):st},Ui.outerRadius=function(zn){return arguments.length?(Wt=typeof zn=="function"?zn:r(+zn),Ui):Wt},Ui.cornerRadius=function(zn){return arguments.length?(tr=typeof zn=="function"?zn:r(+zn),Ui):tr},Ui.padRadius=function(zn){return arguments.length?(or=zn==null?null:typeof zn=="function"?zn:r(+zn),Ui):or},Ui.startAngle=function(zn){return arguments.length?(Nr=typeof zn=="function"?zn:r(+zn),Ui):Nr},Ui.endAngle=function(zn){return arguments.length?(hi=typeof zn=="function"?zn:r(+zn),Ui):hi},Ui.padAngle=function(zn){return arguments.length?(Gi=typeof zn=="function"?zn:r(+zn),Ui):Gi},Ui.context=function(zn){return arguments.length?(Qr=zn==null?null:zn,Ui):Qr},Ui}function M(st){this._context=st}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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2;default:this._context.lineTo(st,Wt);break}}};function v(st){return new M(st)}function z(st){return st[0]}function T(st){return st[1]}function F(){var st=z,Wt=T,tr=r(!0),or=null,Nr=v,hi=null;function Gi(Qr){var Ui,zn=Qr.length,fn,xn=!1,_a;for(or==null&&(hi=Nr(_a=t.path())),Ui=0;Ui<=zn;++Ui)!(Ui<zn&&tr(fn=Qr[Ui],Ui,Qr))===xn&&((xn=!xn)?hi.lineStart():hi.lineEnd()),xn&&hi.point(+st(fn,Ui,Qr),+Wt(fn,Ui,Qr));if(_a)return hi=null,_a+""||null}return Gi.x=function(Qr){return arguments.length?(st=typeof Qr=="function"?Qr:r(+Qr),Gi):st},Gi.y=function(Qr){return arguments.length?(Wt=typeof Qr=="function"?Qr:r(+Qr),Gi):Wt},Gi.defined=function(Qr){return arguments.length?(tr=typeof Qr=="function"?Qr:r(!!Qr),Gi):tr},Gi.curve=function(Qr){return arguments.length?(Nr=Qr,or!=null&&(hi=Nr(or)),Gi):Nr},Gi.context=function(Qr){return arguments.length?(Qr==null?or=hi=null:hi=Nr(or=Qr),Gi):or},Gi}function q(){var st=z,Wt=null,tr=r(0),or=T,Nr=r(!0),hi=null,Gi=v,Qr=null;function Ui(fn){var xn,_a,Wn,Fn=fn.length,ia,za=!1,Hr,na=new Array(Fn),go=new Array(Fn);for(hi==null&&(Qr=Gi(Hr=t.path())),xn=0;xn<=Fn;++xn){if(!(xn<Fn&&Nr(ia=fn[xn],xn,fn))===za)if(za=!za)_a=xn,Qr.areaStart(),Qr.lineStart();else{for(Qr.lineEnd(),Qr.lineStart(),Wn=xn-1;Wn>=_a;--Wn)Qr.point(na[Wn],go[Wn]);Qr.lineEnd(),Qr.areaEnd()}za&&(na[xn]=+st(ia,xn,fn),go[xn]=+tr(ia,xn,fn),Qr.point(Wt?+Wt(ia,xn,fn):na[xn],or?+or(ia,xn,fn):go[xn]))}if(Hr)return Qr=null,Hr+""||null}function zn(){return F().defined(Nr).curve(Gi).context(hi)}return Ui.x=function(fn){return arguments.length?(st=typeof fn=="function"?fn:r(+fn),Wt=null,Ui):st},Ui.x0=function(fn){return arguments.length?(st=typeof fn=="function"?fn:r(+fn),Ui):st},Ui.x1=function(fn){return arguments.length?(Wt=fn==null?null:typeof fn=="function"?fn:r(+fn),Ui):Wt},Ui.y=function(fn){return arguments.length?(tr=typeof fn=="function"?fn:r(+fn),or=null,Ui):tr},Ui.y0=function(fn){return arguments.length?(tr=typeof fn=="function"?fn:r(+fn),Ui):tr},Ui.y1=function(fn){return arguments.length?(or=fn==null?null:typeof fn=="function"?fn:r(+fn),Ui):or},Ui.lineX0=Ui.lineY0=function(){return zn().x(st).y(tr)},Ui.lineY1=function(){return zn().x(st).y(or)},Ui.lineX1=function(){return zn().x(Wt).y(tr)},Ui.defined=function(fn){return arguments.length?(Nr=typeof fn=="function"?fn:r(!!fn),Ui):Nr},Ui.curve=function(fn){return arguments.length?(Gi=fn,hi!=null&&(Qr=Gi(hi)),Ui):Gi},Ui.context=function(fn){return arguments.length?(fn==null?hi=Qr=null:Qr=Gi(hi=fn),Ui):hi},Ui}function U(st,Wt){return Wt<st?-1:Wt>st?1:Wt>=st?0:NaN}function H(st){return st}function j(){var st=H,Wt=U,tr=null,or=r(0),Nr=r(d),hi=r(0);function Gi(Qr){var Ui,zn=Qr.length,fn,xn,_a=0,Wn=new Array(zn),Fn=new Array(zn),ia=+or.apply(this,arguments),za=Math.min(d,Math.max(-d,Nr.apply(this,arguments)-ia)),Hr,na=Math.min(Math.abs(za)/zn,hi.apply(this,arguments)),go=na*(za<0?-1:1),Dn;for(Ui=0;Ui<zn;++Ui)(Dn=Fn[Wn[Ui]=Ui]=+st(Qr[Ui],Ui,Qr))>0&&(_a+=Dn);for(Wt!=null?Wn.sort(function(un,Zn){return Wt(Fn[un],Fn[Zn])}):tr!=null&&Wn.sort(function(un,Zn){return tr(Qr[un],Qr[Zn])}),Ui=0,xn=_a?(za-zn*go)/_a:0;Ui<zn;++Ui,ia=Hr)fn=Wn[Ui],Dn=Fn[fn],Hr=ia+(Dn>0?Dn*xn:0)+go,Fn[fn]={data:Qr[fn],index:Ui,value:Dn,startAngle:ia,endAngle:Hr,padAngle:na};return Fn}return Gi.value=function(Qr){return arguments.length?(st=typeof Qr=="function"?Qr:r(+Qr),Gi):st},Gi.sortValues=function(Qr){return arguments.length?(Wt=Qr,tr=null,Gi):Wt},Gi.sort=function(Qr){return arguments.length?(tr=Qr,Wt=null,Gi):tr},Gi.startAngle=function(Qr){return arguments.length?(or=typeof Qr=="function"?Qr:r(+Qr),Gi):or},Gi.endAngle=function(Qr){return arguments.length?(Nr=typeof Qr=="function"?Qr:r(+Qr),Gi):Nr},Gi.padAngle=function(Qr){return arguments.length?(hi=typeof Qr=="function"?Qr:r(+Qr),Gi):hi},Gi}var G=W(v);function O(st){this._curve=st}O.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(st,Wt){this._curve.point(Wt*Math.sin(st),Wt*-Math.cos(st))}};function W(st){function Wt(tr){return new O(st(tr))}return Wt._curve=st,Wt}function re(st){var Wt=st.curve;return st.angle=st.x,delete st.x,st.radius=st.y,delete st.y,st.curve=function(tr){return arguments.length?Wt(W(tr)):Wt()._curve},st}function ne(){return re(F().curve(G))}function be(){var st=q().curve(G),Wt=st.curve,tr=st.lineX0,or=st.lineX1,Nr=st.lineY0,hi=st.lineY1;return st.angle=st.x,delete st.x,st.startAngle=st.x0,delete st.x0,st.endAngle=st.x1,delete st.x1,st.radius=st.y,delete st.y,st.innerRadius=st.y0,delete st.y0,st.outerRadius=st.y1,delete st.y1,st.lineStartAngle=function(){return re(tr())},delete st.lineX0,st.lineEndAngle=function(){return re(or())},delete st.lineX1,st.lineInnerRadius=function(){return re(Nr())},delete st.lineY0,st.lineOuterRadius=function(){return re(hi())},delete st.lineY1,st.curve=function(Gi){return arguments.length?Wt(W(Gi)):Wt()._curve},st}function ze(st,Wt){return[(Wt=+Wt)*Math.cos(st-=Math.PI/2),Wt*Math.sin(st)]}var Ce=Array.prototype.slice;function he(st){return st.source}function te(st){return st.target}function ke(st){var Wt=he,tr=te,or=z,Nr=T,hi=null;function Gi(){var Qr,Ui=Ce.call(arguments),zn=Wt.apply(this,Ui),fn=tr.apply(this,Ui);if(hi||(hi=Qr=t.path()),st(hi,+or.apply(this,(Ui[0]=zn,Ui)),+Nr.apply(this,Ui),+or.apply(this,(Ui[0]=fn,Ui)),+Nr.apply(this,Ui)),Qr)return hi=null,Qr+""||null}return Gi.source=function(Qr){return arguments.length?(Wt=Qr,Gi):Wt},Gi.target=function(Qr){return arguments.length?(tr=Qr,Gi):tr},Gi.x=function(Qr){return arguments.length?(or=typeof Qr=="function"?Qr:r(+Qr),Gi):or},Gi.y=function(Qr){return arguments.length?(Nr=typeof Qr=="function"?Qr:r(+Qr),Gi):Nr},Gi.context=function(Qr){return arguments.length?(hi=Qr==null?null:Qr,Gi):hi},Gi}function Ee(st,Wt,tr,or,Nr){st.moveTo(Wt,tr),st.bezierCurveTo(Wt=(Wt+or)/2,tr,Wt,Nr,or,Nr)}function Me(st,Wt,tr,or,Nr){st.moveTo(Wt,tr),st.bezierCurveTo(Wt,tr=(tr+Nr)/2,or,tr,or,Nr)}function Oe(st,Wt,tr,or,Nr){var hi=ze(Wt,tr),Gi=ze(Wt,tr=(tr+Nr)/2),Qr=ze(or,tr),Ui=ze(or,Nr);st.moveTo(hi[0],hi[1]),st.bezierCurveTo(Gi[0],Gi[1],Qr[0],Qr[1],Ui[0],Ui[1])}function Re(){return ke(Ee)}function me(){return ke(Me)}function Be(){var st=ke(Oe);return st.angle=st.x,delete st.x,st.radius=st.y,delete st.y,st}var fe={draw:function(st,Wt){var tr=Math.sqrt(Wt/c);st.moveTo(tr,0),st.arc(0,0,tr,0,d)}},Ze={draw:function(st,Wt){var tr=Math.sqrt(Wt/5)/2;st.moveTo(-3*tr,-tr),st.lineTo(-tr,-tr),st.lineTo(-tr,-3*tr),st.lineTo(tr,-3*tr),st.lineTo(tr,-tr),st.lineTo(3*tr,-tr),st.lineTo(3*tr,tr),st.lineTo(tr,tr),st.lineTo(tr,3*tr),st.lineTo(-tr,3*tr),st.lineTo(-tr,tr),st.lineTo(-3*tr,tr),st.closePath()}},et=Math.sqrt(1/3),gt=et*2,Pt={draw:function(st,Wt){var tr=Math.sqrt(Wt/gt),or=tr*et;st.moveTo(0,-tr),st.lineTo(or,0),st.lineTo(0,tr),st.lineTo(-or,0),st.closePath()}},Qe=.8908130915292852,Xe=Math.sin(c/10)/Math.sin(7*c/10),Tt=Math.sin(d/10)*Xe,xt=-Math.cos(d/10)*Xe,_t={draw:function(st,Wt){var tr=Math.sqrt(Wt*Qe),or=Tt*tr,Nr=xt*tr;st.moveTo(0,-tr),st.lineTo(or,Nr);for(var hi=1;hi<5;++hi){var Gi=d*hi/5,Qr=Math.cos(Gi),Ui=Math.sin(Gi);st.lineTo(Ui*tr,-Qr*tr),st.lineTo(Qr*or-Ui*Nr,Ui*or+Qr*Nr)}st.closePath()}},Ct={draw:function(st,Wt){var tr=Math.sqrt(Wt),or=-tr/2;st.rect(or,or,tr,tr)}},jt=Math.sqrt(3),At={draw:function(st,Wt){var tr=-Math.sqrt(Wt/(jt*3));st.moveTo(0,tr*2),st.lineTo(-jt*tr,-tr),st.lineTo(jt*tr,-tr),st.closePath()}},Te=-.5,nt=Math.sqrt(3)/2,ut=1/Math.sqrt(12),ct=(ut/2+1)*3,rt={draw:function(st,Wt){var tr=Math.sqrt(Wt/ct),or=tr/2,Nr=tr*ut,hi=or,Gi=tr*ut+tr,Qr=-hi,Ui=Gi;st.moveTo(or,Nr),st.lineTo(hi,Gi),st.lineTo(Qr,Ui),st.lineTo(Te*or-nt*Nr,nt*or+Te*Nr),st.lineTo(Te*hi-nt*Gi,nt*hi+Te*Gi),st.lineTo(Te*Qr-nt*Ui,nt*Qr+Te*Ui),st.lineTo(Te*or+nt*Nr,Te*Nr-nt*or),st.lineTo(Te*hi+nt*Gi,Te*Gi-nt*hi),st.lineTo(Te*Qr+nt*Ui,Te*Ui-nt*Qr),st.closePath()}},je=[fe,Ze,Pt,Ct,_t,At,rt];function tt(){var st=r(fe),Wt=r(64),tr=null;function or(){var Nr;if(tr||(tr=Nr=t.path()),st.apply(this,arguments).draw(tr,+Wt.apply(this,arguments)),Nr)return tr=null,Nr+""||null}return or.type=function(Nr){return arguments.length?(st=typeof Nr=="function"?Nr:r(Nr),or):st},or.size=function(Nr){return arguments.length?(Wt=typeof Nr=="function"?Nr:r(+Nr),or):Wt},or.context=function(Nr){return arguments.length?(tr=Nr==null?null:Nr,or):tr},or}function Je(){}function Mt(st,Wt,tr){st._context.bezierCurveTo((2*st._x0+st._x1)/3,(2*st._y0+st._y1)/3,(st._x0+2*st._x1)/3,(st._y0+2*st._y1)/3,(st._x0+4*st._x1+Wt)/6,(st._y0+4*st._y1+tr)/6)}function Vt(st){this._context=st}Vt.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:Mt(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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);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:Mt(this,st,Wt);break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt}};function Kt(st){return new Vt(st)}function ir(st){this._context=st}ir.prototype={areaStart:Je,areaEnd:Je,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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._x2=st,this._y2=Wt;break;case 1:this._point=2,this._x3=st,this._y3=Wt;break;case 2:this._point=3,this._x4=st,this._y4=Wt,this._context.moveTo((this._x0+4*this._x1+st)/6,(this._y0+4*this._y1+Wt)/6);break;default:Mt(this,st,Wt);break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt}};function fr(st){return new ir(st)}function Ot(st){this._context=st}Ot.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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var tr=(this._x0+4*this._x1+st)/6,or=(this._y0+4*this._y1+Wt)/6;this._line?this._context.lineTo(tr,or):this._context.moveTo(tr,or);break;case 3:this._point=4;default:Mt(this,st,Wt);break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt}};function De(st){return new Ot(st)}function _e(st,Wt){this._basis=new Vt(st),this._beta=Wt}_e.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var st=this._x,Wt=this._y,tr=st.length-1;if(tr>0)for(var or=st[0],Nr=Wt[0],hi=st[tr]-or,Gi=Wt[tr]-Nr,Qr=-1,Ui;++Qr<=tr;)Ui=Qr/tr,this._basis.point(this._beta*st[Qr]+(1-this._beta)*(or+Ui*hi),this._beta*Wt[Qr]+(1-this._beta)*(Nr+Ui*Gi));this._x=this._y=null,this._basis.lineEnd()},point:function(st,Wt){this._x.push(+st),this._y.push(+Wt)}};var Fe=function st(Wt){function tr(or){return Wt===1?new Vt(or):new _e(or,Wt)}return tr.beta=function(or){return st(+or)},tr}(.85);function Pe(st,Wt,tr){st._context.bezierCurveTo(st._x1+st._k*(st._x2-st._x0),st._y1+st._k*(st._y2-st._y0),st._x2+st._k*(st._x1-Wt),st._y2+st._k*(st._y1-tr),st._x2,st._y2)}function Ie(st,Wt){this._context=st,this._k=(1-Wt)/6}Ie.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:Pe(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2,this._x1=st,this._y1=Wt;break;case 2:this._point=3;default:Pe(this,st,Wt);break}this._x0=this._x1,this._x1=this._x2,this._x2=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var lt=function st(Wt){function tr(or){return new Ie(or,Wt)}return tr.tension=function(or){return st(+or)},tr}(0);function ye(st,Wt){this._context=st,this._k=(1-Wt)/6}ye.prototype={areaStart:Je,areaEnd:Je,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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._x3=st,this._y3=Wt;break;case 1:this._point=2,this._context.moveTo(this._x4=st,this._y4=Wt);break;case 2:this._point=3,this._x5=st,this._y5=Wt;break;default:Pe(this,st,Wt);break}this._x0=this._x1,this._x1=this._x2,this._x2=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var ue=function st(Wt){function tr(or){return new ye(or,Wt)}return tr.tension=function(or){return st(+or)},tr}(0);function de(st,Wt){this._context=st,this._k=(1-Wt)/6}de.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(st,Wt){switch(st=+st,Wt=+Wt,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:Pe(this,st,Wt);break}this._x0=this._x1,this._x1=this._x2,this._x2=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var ht=function st(Wt){function tr(or){return new de(or,Wt)}return tr.tension=function(or){return st(+or)},tr}(0);function Et(st,Wt,tr){var or=st._x1,Nr=st._y1,hi=st._x2,Gi=st._y2;if(st._l01_a>f){var Qr=2*st._l01_2a+3*st._l01_a*st._l12_a+st._l12_2a,Ui=3*st._l01_a*(st._l01_a+st._l12_a);or=(or*Qr-st._x0*st._l12_2a+st._x2*st._l01_2a)/Ui,Nr=(Nr*Qr-st._y0*st._l12_2a+st._y2*st._l01_2a)/Ui}if(st._l23_a>f){var zn=2*st._l23_2a+3*st._l23_a*st._l12_a+st._l12_2a,fn=3*st._l23_a*(st._l23_a+st._l12_a);hi=(hi*zn+st._x1*st._l23_2a-Wt*st._l12_2a)/fn,Gi=(Gi*zn+st._y1*st._l23_2a-tr*st._l12_2a)/fn}st._context.bezierCurveTo(or,Nr,hi,Gi,st._x2,st._y2)}function St(st,Wt){this._context=st,this._alpha=Wt}St.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(st,Wt){if(st=+st,Wt=+Wt,this._point){var tr=this._x2-st,or=this._y2-Wt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(tr*tr+or*or,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2;break;case 2:this._point=3;default:Et(this,st,Wt);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=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var Zt=function st(Wt){function tr(or){return Wt?new St(or,Wt):new Ie(or,0)}return tr.alpha=function(or){return st(+or)},tr}(.5);function qr(st,Wt){this._context=st,this._alpha=Wt}qr.prototype={areaStart:Je,areaEnd:Je,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(st,Wt){if(st=+st,Wt=+Wt,this._point){var tr=this._x2-st,or=this._y2-Wt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(tr*tr+or*or,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=st,this._y3=Wt;break;case 1:this._point=2,this._context.moveTo(this._x4=st,this._y4=Wt);break;case 2:this._point=3,this._x5=st,this._y5=Wt;break;default:Et(this,st,Wt);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=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var Lr=function st(Wt){function tr(or){return Wt?new qr(or,Wt):new ye(or,0)}return tr.alpha=function(or){return st(+or)},tr}(.5);function vr(st,Wt){this._context=st,this._alpha=Wt}vr.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(st,Wt){if(st=+st,Wt=+Wt,this._point){var tr=this._x2-st,or=this._y2-Wt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(tr*tr+or*or,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:Et(this,st,Wt);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=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var Er=function st(Wt){function tr(or){return Wt?new vr(or,Wt):new de(or,0)}return tr.alpha=function(or){return st(+or)},tr}(.5);function si(st){this._context=st}si.prototype={areaStart:Je,areaEnd:Je,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(st,Wt){st=+st,Wt=+Wt,this._point?this._context.lineTo(st,Wt):(this._point=1,this._context.moveTo(st,Wt))}};function Ei(st){return new si(st)}function Si(st){return st<0?-1:1}function xi(st,Wt,tr){var or=st._x1-st._x0,Nr=Wt-st._x1,hi=(st._y1-st._y0)/(or||Nr<0&&-0),Gi=(tr-st._y1)/(Nr||or<0&&-0),Qr=(hi*Nr+Gi*or)/(or+Nr);return(Si(hi)+Si(Gi))*Math.min(Math.abs(hi),Math.abs(Gi),.5*Math.abs(Qr))||0}function Hi(st,Wt){var tr=st._x1-st._x0;return tr?(3*(st._y1-st._y0)/tr-Wt)/2:Wt}function Jr(st,Wt,tr){var or=st._x0,Nr=st._y0,hi=st._x1,Gi=st._y1,Qr=(hi-or)/3;st._context.bezierCurveTo(or+Qr,Nr+Qr*Wt,hi-Qr,Gi-Qr*tr,hi,Gi)}function ci(st){this._context=st}ci.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:Jr(this,this._t0,Hi(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(st,Wt){var tr=NaN;if(st=+st,Wt=+Wt,!(st===this._x1&&Wt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2;break;case 2:this._point=3,Jr(this,Hi(this,tr=xi(this,st,Wt)),tr);break;default:Jr(this,this._t0,tr=xi(this,st,Wt));break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt,this._t0=tr}}};function Di(st){this._context=new Lt(st)}(Di.prototype=Object.create(ci.prototype)).point=function(st,Wt){ci.prototype.point.call(this,Wt,st)};function Lt(st){this._context=st}Lt.prototype={moveTo:function(st,Wt){this._context.moveTo(Wt,st)},closePath:function(){this._context.closePath()},lineTo:function(st,Wt){this._context.lineTo(Wt,st)},bezierCurveTo:function(st,Wt,tr,or,Nr,hi){this._context.bezierCurveTo(Wt,st,or,tr,hi,Nr)}};function vt(st){return new ci(st)}function Dt(st){return new Di(st)}function Bt(st){this._context=st}Bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var st=this._x,Wt=this._y,tr=st.length;if(tr)if(this._line?this._context.lineTo(st[0],Wt[0]):this._context.moveTo(st[0],Wt[0]),tr===2)this._context.lineTo(st[1],Wt[1]);else for(var or=sr(st),Nr=sr(Wt),hi=0,Gi=1;Gi<tr;++hi,++Gi)this._context.bezierCurveTo(or[0][hi],Nr[0][hi],or[1][hi],Nr[1][hi],st[Gi],Wt[Gi]);(this._line||this._line!==0&&tr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(st,Wt){this._x.push(+st),this._y.push(+Wt)}};function sr(st){var Wt,tr=st.length-1,or,Nr=new Array(tr),hi=new Array(tr),Gi=new Array(tr);for(Nr[0]=0,hi[0]=2,Gi[0]=st[0]+2*st[1],Wt=1;Wt<tr-1;++Wt)Nr[Wt]=1,hi[Wt]=4,Gi[Wt]=4*st[Wt]+2*st[Wt+1];for(Nr[tr-1]=2,hi[tr-1]=7,Gi[tr-1]=8*st[tr-1]+st[tr],Wt=1;Wt<tr;++Wt)or=Nr[Wt]/hi[Wt-1],hi[Wt]-=or,Gi[Wt]-=or*Gi[Wt-1];for(Nr[tr-1]=Gi[tr-1]/hi[tr-1],Wt=tr-2;Wt>=0;--Wt)Nr[Wt]=(Gi[Wt]-Nr[Wt+1])/hi[Wt];for(hi[tr-1]=(st[tr]+Nr[tr-1])/2,Wt=0;Wt<tr-1;++Wt)hi[Wt]=2*st[Wt+1]-Nr[Wt+1];return[Nr,hi]}function br(st){return new Bt(st)}function zr(st,Wt){this._context=st,this._t=Wt}zr.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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Wt),this._context.lineTo(st,Wt);else{var tr=this._x*(1-this._t)+st*this._t;this._context.lineTo(tr,this._y),this._context.lineTo(tr,Wt)}break}}this._x=st,this._y=Wt}};function Tr(st){return new zr(st,.5)}function Rr(st){return new zr(st,0)}function Br(st){return new zr(st,1)}function oi(st,Wt){if((Gi=st.length)>1)for(var tr=1,or,Nr,hi=st[Wt[0]],Gi,Qr=hi.length;tr<Gi;++tr)for(Nr=hi,hi=st[Wt[tr]],or=0;or<Qr;++or)hi[or][1]+=hi[or][0]=isNaN(Nr[or][1])?Nr[or][0]:Nr[or][1]}function vi(st){for(var Wt=st.length,tr=new Array(Wt);--Wt>=0;)tr[Wt]=Wt;return tr}function Pi(st,Wt){return st[Wt]}function Yr(){var st=r([]),Wt=vi,tr=oi,or=Pi;function Nr(hi){var Gi=st.apply(this,arguments),Qr,Ui=hi.length,zn=Gi.length,fn=new Array(zn),xn;for(Qr=0;Qr<zn;++Qr){for(var _a=Gi[Qr],Wn=fn[Qr]=new Array(Ui),Fn=0,ia;Fn<Ui;++Fn)Wn[Fn]=ia=[0,+or(hi[Fn],_a,Fn,hi)],ia.data=hi[Fn];Wn.key=_a}for(Qr=0,xn=Wt(fn);Qr<zn;++Qr)fn[xn[Qr]].index=Qr;return tr(fn,xn),fn}return Nr.keys=function(hi){return arguments.length?(st=typeof hi=="function"?hi:r(Ce.call(hi)),Nr):st},Nr.value=function(hi){return arguments.length?(or=typeof hi=="function"?hi:r(+hi),Nr):or},Nr.order=function(hi){return arguments.length?(Wt=hi==null?vi:typeof hi=="function"?hi:r(Ce.call(hi)),Nr):Wt},Nr.offset=function(hi){return arguments.length?(tr=hi==null?oi:hi,Nr):tr},Nr}function Ni(st,Wt){if((or=st.length)>0){for(var tr,or,Nr=0,hi=st[0].length,Gi;Nr<hi;++Nr){for(Gi=tr=0;tr<or;++tr)Gi+=st[tr][Nr][1]||0;if(Gi)for(tr=0;tr<or;++tr)st[tr][Nr][1]/=Gi}oi(st,Wt)}}function Ur(st,Wt){if((Ui=st.length)>0)for(var tr,or=0,Nr,hi,Gi,Qr,Ui,zn=st[Wt[0]].length;or<zn;++or)for(Gi=Qr=0,tr=0;tr<Ui;++tr)(hi=(Nr=st[Wt[tr]][or])[1]-Nr[0])>0?(Nr[0]=Gi,Nr[1]=Gi+=hi):hi<0?(Nr[1]=Qr,Nr[0]=Qr+=hi):(Nr[0]=0,Nr[1]=hi)}function ti(st,Wt){if((Nr=st.length)>0){for(var tr=0,or=st[Wt[0]],Nr,hi=or.length;tr<hi;++tr){for(var Gi=0,Qr=0;Gi<Nr;++Gi)Qr+=st[Gi][tr][1]||0;or[tr][1]+=or[tr][0]=-Qr/2}oi(st,Wt)}}function ki(st,Wt){if(!(!((Gi=st.length)>0)||!((hi=(Nr=st[Wt[0]]).length)>0))){for(var tr=0,or=1,Nr,hi,Gi;or<hi;++or){for(var Qr=0,Ui=0,zn=0;Qr<Gi;++Qr){for(var fn=st[Wt[Qr]],xn=fn[or][1]||0,_a=fn[or-1][1]||0,Wn=(xn-_a)/2,Fn=0;Fn<Qr;++Fn){var ia=st[Wt[Fn]],za=ia[or][1]||0,Hr=ia[or-1][1]||0;Wn+=za-Hr}Ui+=xn,zn+=Wn*xn}Nr[or-1][1]+=Nr[or-1][0]=tr,Ui&&(tr-=zn/Ui)}Nr[or-1][1]+=Nr[or-1][0]=tr,oi(st,Wt)}}function ji(st){var Wt=st.map(Vi);return vi(st).sort(function(tr,or){return Wt[tr]-Wt[or]})}function Vi(st){for(var Wt=-1,tr=0,or=st.length,Nr,hi=-1/0;++Wt<or;)(Nr=+st[Wt][1])>hi&&(hi=Nr,tr=Wt);return tr}function zi(st){var Wt=st.map(Mi);return vi(st).sort(function(tr,or){return Wt[tr]-Wt[or]})}function Mi(st){for(var Wt=0,tr=-1,or=st.length,Nr;++tr<or;)(Nr=+st[tr][1])&&(Wt+=Nr);return Wt}function sn(st){return zi(st).reverse()}function fi(st){var Wt=st.length,tr,or,Nr=st.map(Mi),hi=ji(st),Gi=0,Qr=0,Ui=[],zn=[];for(tr=0;tr<Wt;++tr)or=hi[tr],Gi<Qr?(Gi+=Nr[or],Ui.push(or)):(Qr+=Nr[or],zn.push(or));return zn.reverse().concat(Ui)}function Or(st){return vi(st).reverse()}e.arc=C,e.area=q,e.areaRadial=be,e.curveBasis=Kt,e.curveBasisClosed=fr,e.curveBasisOpen=De,e.curveBundle=Fe,e.curveCardinal=lt,e.curveCardinalClosed=ue,e.curveCardinalOpen=ht,e.curveCatmullRom=Zt,e.curveCatmullRomClosed=Lr,e.curveCatmullRomOpen=Er,e.curveLinear=v,e.curveLinearClosed=Ei,e.curveMonotoneX=vt,e.curveMonotoneY=Dt,e.curveNatural=br,e.curveStep=Tr,e.curveStepAfter=Br,e.curveStepBefore=Rr,e.line=F,e.lineRadial=ne,e.linkHorizontal=Re,e.linkRadial=Be,e.linkVertical=me,e.pie=j,e.pointRadial=ze,e.radialArea=be,e.radialLine=ne,e.stack=Yr,e.stackOffsetDiverging=Ur,e.stackOffsetExpand=Ni,e.stackOffsetNone=oi,e.stackOffsetSilhouette=ti,e.stackOffsetWiggle=ki,e.stackOrderAppearance=ji,e.stackOrderAscending=zi,e.stackOrderDescending=sn,e.stackOrderInsideOut=fi,e.stackOrderNone=vi,e.stackOrderReverse=Or,e.symbol=tt,e.symbolCircle=fe,e.symbolCross=Ze,e.symbolDiamond=Pt,e.symbolSquare=Ct,e.symbolStar=_t,e.symbolTriangle=At,e.symbolWye=rt,e.symbols=je,Object.defineProperty(e,"__esModule",{value:!0})})});var rje=Se((kq,tje)=>{(function(e,t){typeof kq=="object"&&typeof tje!="undefined"?t(kq,JE(),wq(),NJ()):typeof define=="function"&&define.amd?define(["exports","d3-array","d3-collection","d3-shape"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(kq,function(e,t,r,n){"use strict";function i(v){return v.target.depth}function a(v){return v.depth}function o(v,z){return z-1-v.height}function s(v,z){return v.sourceLinks.length?v.depth:z-1}function u(v){return v.targetLinks.length?v.depth:v.sourceLinks.length?t.min(v.sourceLinks,i)-1:0}function l(v){return function(){return v}}function f(v,z){return h(v.source,z.source)||v.index-z.index}function c(v,z){return h(v.target,z.target)||v.index-z.index}function h(v,z){return v.y0-z.y0}function d(v){return v.value}function p(v){return(v.y0+v.y1)/2}function x(v){return p(v.source)*v.value}function b(v){return p(v.target)*v.value}function y(v){return v.index}function k(v){return v.nodes}function E(v){return v.links}function A(v,z){var T=v.get(z);if(!T)throw new Error("missing: "+z);return T}var L=function(){var v=0,z=0,T=1,F=1,q=24,U=8,H=y,j=s,G=k,O=E,W=32,re=2/3;function ne(){var ke={nodes:G.apply(null,arguments),links:O.apply(null,arguments)};return be(ke),ze(ke),Ce(ke),he(ke,W),te(ke),ke}ne.update=function(ke){return te(ke),ke},ne.nodeId=function(ke){return arguments.length?(H=typeof ke=="function"?ke:l(ke),ne):H},ne.nodeAlign=function(ke){return arguments.length?(j=typeof ke=="function"?ke:l(ke),ne):j},ne.nodeWidth=function(ke){return arguments.length?(q=+ke,ne):q},ne.nodePadding=function(ke){return arguments.length?(U=+ke,ne):U},ne.nodes=function(ke){return arguments.length?(G=typeof ke=="function"?ke:l(ke),ne):G},ne.links=function(ke){return arguments.length?(O=typeof ke=="function"?ke:l(ke),ne):O},ne.size=function(ke){return arguments.length?(v=z=0,T=+ke[0],F=+ke[1],ne):[T-v,F-z]},ne.extent=function(ke){return arguments.length?(v=+ke[0][0],T=+ke[1][0],z=+ke[0][1],F=+ke[1][1],ne):[[v,z],[T,F]]},ne.iterations=function(ke){return arguments.length?(W=+ke,ne):W};function be(ke){ke.nodes.forEach(function(Me,Oe){Me.index=Oe,Me.sourceLinks=[],Me.targetLinks=[]});var Ee=r.map(ke.nodes,H);ke.links.forEach(function(Me,Oe){Me.index=Oe;var Re=Me.source,me=Me.target;typeof Re!="object"&&(Re=Me.source=A(Ee,Re)),typeof me!="object"&&(me=Me.target=A(Ee,me)),Re.sourceLinks.push(Me),me.targetLinks.push(Me)})}function ze(ke){ke.nodes.forEach(function(Ee){Ee.value=Math.max(t.sum(Ee.sourceLinks,d),t.sum(Ee.targetLinks,d))})}function Ce(ke){var Ee,Me,Oe;for(Ee=ke.nodes,Me=[],Oe=0;Ee.length;++Oe,Ee=Me,Me=[])Ee.forEach(function(me){me.depth=Oe,me.sourceLinks.forEach(function(Be){Me.indexOf(Be.target)<0&&Me.push(Be.target)})});for(Ee=ke.nodes,Me=[],Oe=0;Ee.length;++Oe,Ee=Me,Me=[])Ee.forEach(function(me){me.height=Oe,me.targetLinks.forEach(function(Be){Me.indexOf(Be.source)<0&&Me.push(Be.source)})});var Re=(T-v-q)/(Oe-1);ke.nodes.forEach(function(me){me.x1=(me.x0=v+Math.max(0,Math.min(Oe-1,Math.floor(j.call(null,me,Oe))))*Re)+q})}function he(ke){var Ee=r.nest().key(function(Ze){return Ze.x0}).sortKeys(t.ascending).entries(ke.nodes).map(function(Ze){return Ze.values});Re(),fe();for(var Me=1,Oe=W;Oe>0;--Oe)Be(Me*=.99),fe(),me(Me),fe();function Re(){var Ze=t.max(Ee,function(Pt){return Pt.length}),et=re*(F-z)/(Ze-1);U>et&&(U=et);var gt=t.min(Ee,function(Pt){return(F-z-(Pt.length-1)*U)/t.sum(Pt,d)});Ee.forEach(function(Pt){Pt.forEach(function(Qe,Xe){Qe.y1=(Qe.y0=Xe)+Qe.value*gt})}),ke.links.forEach(function(Pt){Pt.width=Pt.value*gt})}function me(Ze){Ee.forEach(function(et){et.forEach(function(gt){if(gt.targetLinks.length){var Pt=(t.sum(gt.targetLinks,x)/t.sum(gt.targetLinks,d)-p(gt))*Ze;gt.y0+=Pt,gt.y1+=Pt}})})}function Be(Ze){Ee.slice().reverse().forEach(function(et){et.forEach(function(gt){if(gt.sourceLinks.length){var Pt=(t.sum(gt.sourceLinks,b)/t.sum(gt.sourceLinks,d)-p(gt))*Ze;gt.y0+=Pt,gt.y1+=Pt}})})}function fe(){Ee.forEach(function(Ze){var et,gt,Pt=z,Qe=Ze.length,Xe;for(Ze.sort(h),Xe=0;Xe<Qe;++Xe)et=Ze[Xe],gt=Pt-et.y0,gt>0&&(et.y0+=gt,et.y1+=gt),Pt=et.y1+U;if(gt=Pt-U-F,gt>0)for(Pt=et.y0-=gt,et.y1-=gt,Xe=Qe-2;Xe>=0;--Xe)et=Ze[Xe],gt=et.y1+U-Pt,gt>0&&(et.y0-=gt,et.y1-=gt),Pt=et.y0})}}function te(ke){ke.nodes.forEach(function(Ee){Ee.sourceLinks.sort(c),Ee.targetLinks.sort(f)}),ke.nodes.forEach(function(Ee){var Me=Ee.y0,Oe=Me;Ee.sourceLinks.forEach(function(Re){Re.y0=Me+Re.width/2,Me+=Re.width}),Ee.targetLinks.forEach(function(Re){Re.y1=Oe+Re.width/2,Oe+=Re.width})})}return ne};function _(v){return[v.source.x1,v.y0]}function C(v){return[v.target.x0,v.y1]}var M=function(){return n.linkHorizontal().source(_).target(C)};e.sankey=L,e.sankeyCenter=u,e.sankeyLeft=a,e.sankeyRight=o,e.sankeyJustify=s,e.sankeyLinkHorizontal=M,Object.defineProperty(e,"__esModule",{value:!0})})});var nje=Se((Zxr,ije)=>{var CZt=OJ();ije.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],u;function l(E){a[E]=!1,o.hasOwnProperty(E)&&Object.keys(o[E]).forEach(function(A){delete o[E][A],a[A]&&l(A)})}function f(E){var A=!1;i.push(E),a[E]=!0;var L,_;for(L=0;L<s[E].length;L++)_=s[E][L],_===u?(c(u,i),A=!0):a[_]||(A=f(_));if(A)l(E);else for(L=0;L<s[E].length;L++){_=s[E][L];var C=o[_];C||(C={},o[_]=C),C[_]=!0}return i.pop(),A}function c(E,A){var L=[].concat(A).concat(E);r?r(f):n.push(L)}function h(E){for(var A=0;A<t.length;A++)A<E&&(t[A]=[]),t[A]=t[A].filter(function(L){return L>=E})}function d(E){h(E);for(var A=t,L=CZt(A),_=L.components.filter(function(q){return q.length>1}),C=1/0,M,v=0;v<_.length;v++)for(var z=0;z<_[v].length;z++)_[v][z]<C&&(C=_[v][z],M=v);var T=_[M];if(!T)return!1;var F=t.map(function(q,U){return T.indexOf(U)===-1?[]:q.filter(function(H){return T.indexOf(H)!==-1})});return{leastVertex:C,adjList:F}}u=0;for(var p=t.length;u<p;){var x=d(u);if(u=x.leastVertex,s=x.adjList,s){for(var b=0;b<s.length;b++)for(var y=0;y<s[b].length;y++){var k=s[b][y];a[+k]=!1,o[k]={}}f(u),u=u+1}else u=p}if(!r)return n}});var oje=Se((Cq,aje)=>{(function(e,t){typeof Cq=="object"&&typeof aje!="undefined"?t(Cq,JE(),wq(),NJ(),nje()):typeof define=="function"&&define.amd?define(["exports","d3-array","d3-collection","d3-shape","elementary-circuits-directed-graph"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(Cq,function(e,t,r,n,i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;function a(Qe){return Qe.target.depth}function o(Qe){return Qe.depth}function s(Qe,Xe){return Xe-1-Qe.height}function u(Qe,Xe){return Qe.sourceLinks.length?Qe.depth:Xe-1}function l(Qe){return Qe.targetLinks.length?Qe.depth:Qe.sourceLinks.length?t.min(Qe.sourceLinks,a)-1:0}function f(Qe){return function(){return Qe}}var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Qe){return typeof Qe}:function(Qe){return Qe&&typeof Symbol=="function"&&Qe.constructor===Symbol&&Qe!==Symbol.prototype?"symbol":typeof Qe};function h(Qe,Xe){return p(Qe.source,Xe.source)||Qe.index-Xe.index}function d(Qe,Xe){return p(Qe.target,Xe.target)||Qe.index-Xe.index}function p(Qe,Xe){return Qe.partOfCycle===Xe.partOfCycle?Qe.y0-Xe.y0:Qe.circularLinkType==="top"||Xe.circularLinkType==="bottom"?-1:1}function x(Qe){return Qe.value}function b(Qe){return(Qe.y0+Qe.y1)/2}function y(Qe){return b(Qe.source)}function k(Qe){return b(Qe.target)}function E(Qe){return Qe.index}function A(Qe){return Qe.nodes}function L(Qe){return Qe.links}function _(Qe,Xe){var Tt=Qe.get(Xe);if(!Tt)throw new Error("missing: "+Xe);return Tt}function C(Qe,Xe){return Xe(Qe)}var M=25,v=10,z=.3;function T(){var Qe=0,Xe=0,Tt=1,xt=1,_t=24,Ct,jt=E,At=u,Te=A,nt=L,ut=32,ct=2,rt,je=null;function tt(){var De={nodes:Te.apply(null,arguments),links:nt.apply(null,arguments)};Je(De),F(De,jt,je),Mt(De),ir(De),q(De,jt),fr(De,ut,jt),Ot(De);for(var _e=4,Fe=0;Fe<_e;Fe++)Be(De,xt,jt),fe(De,xt,jt),Oe(De,Xe,xt,jt),Be(De,xt,jt),fe(De,xt,jt);return Pt(De,Xe,xt),W(De,ct,xt,jt),De}tt.nodeId=function(De){return arguments.length?(jt=typeof De=="function"?De:f(De),tt):jt},tt.nodeAlign=function(De){return arguments.length?(At=typeof De=="function"?De:f(De),tt):At},tt.nodeWidth=function(De){return arguments.length?(_t=+De,tt):_t},tt.nodePadding=function(De){return arguments.length?(Ct=+De,tt):Ct},tt.nodes=function(De){return arguments.length?(Te=typeof De=="function"?De:f(De),tt):Te},tt.links=function(De){return arguments.length?(nt=typeof De=="function"?De:f(De),tt):nt},tt.size=function(De){return arguments.length?(Qe=Xe=0,Tt=+De[0],xt=+De[1],tt):[Tt-Qe,xt-Xe]},tt.extent=function(De){return arguments.length?(Qe=+De[0][0],Tt=+De[1][0],Xe=+De[0][1],xt=+De[1][1],tt):[[Qe,Xe],[Tt,xt]]},tt.iterations=function(De){return arguments.length?(ut=+De,tt):ut},tt.circularLinkGap=function(De){return arguments.length?(ct=+De,tt):ct},tt.nodePaddingRatio=function(De){return arguments.length?(rt=+De,tt):rt},tt.sortNodes=function(De){return arguments.length?(je=De,tt):je},tt.update=function(De){return q(De,jt),Ot(De),De.links.forEach(function(_e){_e.circular&&(_e.circularLinkType=_e.y0+_e.y1<xt?"top":"bottom",_e.source.circularLinkType=_e.circularLinkType,_e.target.circularLinkType=_e.circularLinkType)}),Be(De,xt,jt,!1),fe(De,xt,jt),W(De,ct,xt,jt),De};function Je(De){De.nodes.forEach(function(Fe,Pe){Fe.index=Pe,Fe.sourceLinks=[],Fe.targetLinks=[]});var _e=r.map(De.nodes,jt);return De.links.forEach(function(Fe,Pe){Fe.index=Pe;var Ie=Fe.source,lt=Fe.target;(typeof Ie=="undefined"?"undefined":c(Ie))!=="object"&&(Ie=Fe.source=_(_e,Ie)),(typeof lt=="undefined"?"undefined":c(lt))!=="object"&&(lt=Fe.target=_(_e,lt)),Ie.sourceLinks.push(Fe),lt.targetLinks.push(Fe)}),De}function Mt(De){De.nodes.forEach(function(_e){_e.partOfCycle=!1,_e.value=Math.max(t.sum(_e.sourceLinks,x),t.sum(_e.targetLinks,x)),_e.sourceLinks.forEach(function(Fe){Fe.circular&&(_e.partOfCycle=!0,_e.circularLinkType=Fe.circularLinkType)}),_e.targetLinks.forEach(function(Fe){Fe.circular&&(_e.partOfCycle=!0,_e.circularLinkType=Fe.circularLinkType)})})}function Vt(De){var _e=0,Fe=0,Pe=0,Ie=0,lt=t.max(De.nodes,function(ye){return ye.column});return De.links.forEach(function(ye){ye.circular&&(ye.circularLinkType=="top"?_e=_e+ye.width:Fe=Fe+ye.width,ye.target.column==0&&(Ie=Ie+ye.width),ye.source.column==lt&&(Pe=Pe+ye.width))}),_e=_e>0?_e+M+v:_e,Fe=Fe>0?Fe+M+v:Fe,Pe=Pe>0?Pe+M+v:Pe,Ie=Ie>0?Ie+M+v:Ie,{top:_e,bottom:Fe,left:Ie,right:Pe}}function Kt(De,_e){var Fe=t.max(De.nodes,function(ht){return ht.column}),Pe=Tt-Qe,Ie=xt-Xe,lt=Pe+_e.right+_e.left,ye=Ie+_e.top+_e.bottom,ue=Pe/lt,de=Ie/ye;return Qe=Qe*ue+_e.left,Tt=_e.right==0?Tt:Tt*ue,Xe=Xe*de+_e.top,xt=xt*de,De.nodes.forEach(function(ht){ht.x0=Qe+ht.column*((Tt-Qe-_t)/Fe),ht.x1=ht.x0+_t}),de}function ir(De){var _e,Fe,Pe;for(_e=De.nodes,Fe=[],Pe=0;_e.length;++Pe,_e=Fe,Fe=[])_e.forEach(function(Ie){Ie.depth=Pe,Ie.sourceLinks.forEach(function(lt){Fe.indexOf(lt.target)<0&&!lt.circular&&Fe.push(lt.target)})});for(_e=De.nodes,Fe=[],Pe=0;_e.length;++Pe,_e=Fe,Fe=[])_e.forEach(function(Ie){Ie.height=Pe,Ie.targetLinks.forEach(function(lt){Fe.indexOf(lt.source)<0&&!lt.circular&&Fe.push(lt.source)})});De.nodes.forEach(function(Ie){Ie.column=Math.floor(At.call(null,Ie,Pe))})}function fr(De,_e,Fe){var Pe=r.nest().key(function(ht){return ht.column}).sortKeys(t.ascending).entries(De.nodes).map(function(ht){return ht.values});ye(Fe),de();for(var Ie=1,lt=_e;lt>0;--lt)ue(Ie*=.99,Fe),de();function ye(ht){if(rt){var Et=1/0;Pe.forEach(function(Lr){var vr=xt*rt/(Lr.length+1);Et=vr<Et?vr:Et}),Ct=Et}var St=t.min(Pe,function(Lr){return(xt-Xe-(Lr.length-1)*Ct)/t.sum(Lr,x)});St=St*z,De.links.forEach(function(Lr){Lr.width=Lr.value*St});var Zt=Vt(De),qr=Kt(De,Zt);St=St*qr,De.links.forEach(function(Lr){Lr.width=Lr.value*St}),Pe.forEach(function(Lr){var vr=Lr.length;Lr.forEach(function(Er,si){Er.depth==Pe.length-1&&vr==1||Er.depth==0&&vr==1?(Er.y0=xt/2-Er.value*St,Er.y1=Er.y0+Er.value*St):Er.partOfCycle?j(Er,ht)==0?(Er.y0=xt/2+si,Er.y1=Er.y0+Er.value*St):Er.circularLinkType=="top"?(Er.y0=Xe+si,Er.y1=Er.y0+Er.value*St):(Er.y0=xt-Er.value*St-si,Er.y1=Er.y0+Er.value*St):Zt.top==0||Zt.bottom==0?(Er.y0=(xt-Xe)/vr*si,Er.y1=Er.y0+Er.value*St):(Er.y0=(xt-Xe)/2-vr/2+si,Er.y1=Er.y0+Er.value*St)})})}function ue(ht,Et){var St=Pe.length;Pe.forEach(function(Zt){var qr=Zt.length,Lr=Zt[0].depth;Zt.forEach(function(vr){var Er;if((vr.sourceLinks.length||vr.targetLinks.length)&&!(vr.partOfCycle&&j(vr,Et)>0))if(Lr==0&&qr==1)Er=vr.y1-vr.y0,vr.y0=xt/2-Er/2,vr.y1=xt/2+Er/2;else if(Lr==St-1&&qr==1)Er=vr.y1-vr.y0,vr.y0=xt/2-Er/2,vr.y1=xt/2+Er/2;else{var si=0,Ei=t.mean(vr.sourceLinks,k),Si=t.mean(vr.targetLinks,y);Ei&&Si?si=(Ei+Si)/2:si=Ei||Si;var xi=(si-b(vr))*ht;vr.y0+=xi,vr.y1+=xi}})})}function de(){Pe.forEach(function(ht){var Et,St,Zt=Xe,qr=ht.length,Lr;for(ht.sort(p),Lr=0;Lr<qr;++Lr)Et=ht[Lr],St=Zt-Et.y0,St>0&&(Et.y0+=St,Et.y1+=St),Zt=Et.y1+Ct;if(St=Zt-Ct-xt,St>0)for(Zt=Et.y0-=St,Et.y1-=St,Lr=qr-2;Lr>=0;--Lr)Et=ht[Lr],St=Et.y1+Ct-Zt,St>0&&(Et.y0-=St,Et.y1-=St),Zt=Et.y0})}}function Ot(De){De.nodes.forEach(function(_e){_e.sourceLinks.sort(d),_e.targetLinks.sort(h)}),De.nodes.forEach(function(_e){var Fe=_e.y0,Pe=Fe,Ie=_e.y1,lt=Ie;_e.sourceLinks.forEach(function(ye){ye.circular?(ye.y0=Ie-ye.width/2,Ie=Ie-ye.width):(ye.y0=Fe+ye.width/2,Fe+=ye.width)}),_e.targetLinks.forEach(function(ye){ye.circular?(ye.y1=lt-ye.width/2,lt=lt-ye.width):(ye.y1=Pe+ye.width/2,Pe+=ye.width)})})}return tt}function F(Qe,Xe,Tt){var xt=0;if(Tt===null){for(var _t=[],Ct=0;Ct<Qe.links.length;Ct++){var jt=Qe.links[Ct],At=jt.source.index,Te=jt.target.index;_t[At]||(_t[At]=[]),_t[Te]||(_t[Te]=[]),_t[At].indexOf(Te)===-1&&_t[At].push(Te)}var nt=i(_t);nt.sort(function(je,tt){return je.length-tt.length});var ut={};for(Ct=0;Ct<nt.length;Ct++){var ct=nt[Ct],rt=ct.slice(-2);ut[rt[0]]||(ut[rt[0]]={}),ut[rt[0]][rt[1]]=!0}Qe.links.forEach(function(je){var tt=je.target.index,Je=je.source.index;tt===Je||ut[Je]&&ut[Je][tt]?(je.circular=!0,je.circularLinkID=xt,xt=xt+1):je.circular=!1})}else Qe.links.forEach(function(je){je.source[Tt]<je.target[Tt]?je.circular=!1:(je.circular=!0,je.circularLinkID=xt,xt=xt+1)})}function q(Qe,Xe){var Tt=0,xt=0;Qe.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=Tt<xt?"top":"bottom",_t.circularLinkType=="top"?Tt=Tt+1:xt=xt+1,Qe.nodes.forEach(function(Ct){(C(Ct,Xe)==C(_t.source,Xe)||C(Ct,Xe)==C(_t.target,Xe))&&(Ct.circularLinkType=_t.circularLinkType)}))}),Qe.links.forEach(function(_t){_t.circular&&(_t.source.circularLinkType==_t.target.circularLinkType&&(_t.circularLinkType=_t.source.circularLinkType),gt(_t,Xe)&&(_t.circularLinkType=_t.source.circularLinkType))})}function U(Qe){var Xe=Math.abs(Qe.y1-Qe.y0),Tt=Math.abs(Qe.target.x0-Qe.source.x1);return Math.atan(Tt/Xe)}function H(Qe,Xe){return Qe.source.column<Xe.target.column?!1:!(Qe.target.column>Xe.source.column)}function j(Qe,Xe){var Tt=0;Qe.sourceLinks.forEach(function(_t){Tt=_t.circular&&!gt(_t,Xe)?Tt+1:Tt});var xt=0;return Qe.targetLinks.forEach(function(_t){xt=_t.circular&&!gt(_t,Xe)?xt+1:xt}),Tt+xt}function G(Qe){var Xe=Qe.source.sourceLinks,Tt=0;Xe.forEach(function(Ct){Tt=Ct.circular?Tt+1:Tt});var xt=Qe.target.targetLinks,_t=0;return xt.forEach(function(Ct){_t=Ct.circular?_t+1:_t}),!(Tt>1||_t>1)}function O(Qe,Xe,Tt){return Qe.sort(ne),Qe.forEach(function(xt,_t){var Ct=0;if(gt(xt,Tt)&&G(xt))xt.circularPathData.verticalBuffer=Ct+xt.width/2;else{var jt=0;for(jt;jt<_t;jt++)if(H(Qe[_t],Qe[jt])){var At=Qe[jt].circularPathData.verticalBuffer+Qe[jt].width/2+Xe;Ct=At>Ct?At:Ct}xt.circularPathData.verticalBuffer=Ct+xt.width/2}}),Qe}function W(Qe,Xe,Tt,xt){var _t=5,Ct=t.min(Qe.links,function(Te){return Te.source.y0});Qe.links.forEach(function(Te){Te.circular&&(Te.circularPathData={})});var jt=Qe.links.filter(function(Te){return Te.circularLinkType=="top"});O(jt,Xe,xt);var At=Qe.links.filter(function(Te){return Te.circularLinkType=="bottom"});O(At,Xe,xt),Qe.links.forEach(function(Te){if(Te.circular){if(Te.circularPathData.arcRadius=Te.width+v,Te.circularPathData.leftNodeBuffer=_t,Te.circularPathData.rightNodeBuffer=_t,Te.circularPathData.sourceWidth=Te.source.x1-Te.source.x0,Te.circularPathData.sourceX=Te.source.x0+Te.circularPathData.sourceWidth,Te.circularPathData.targetX=Te.target.x0,Te.circularPathData.sourceY=Te.y0,Te.circularPathData.targetY=Te.y1,gt(Te,xt)&&G(Te))Te.circularPathData.leftSmallArcRadius=v+Te.width/2,Te.circularPathData.leftLargeArcRadius=v+Te.width/2,Te.circularPathData.rightSmallArcRadius=v+Te.width/2,Te.circularPathData.rightLargeArcRadius=v+Te.width/2,Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Te.source.y1+M+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=Te.source.y0-M-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius);else{var nt=Te.source.column,ut=Te.circularLinkType,ct=Qe.links.filter(function(tt){return tt.source.column==nt&&tt.circularLinkType==ut});Te.circularLinkType=="bottom"?ct.sort(ze):ct.sort(be);var rt=0;ct.forEach(function(tt,Je){tt.circularLinkID==Te.circularLinkID&&(Te.circularPathData.leftSmallArcRadius=v+Te.width/2+rt,Te.circularPathData.leftLargeArcRadius=v+Te.width/2+Je*Xe+rt),rt=rt+tt.width}),nt=Te.target.column,ct=Qe.links.filter(function(tt){return tt.target.column==nt&&tt.circularLinkType==ut}),Te.circularLinkType=="bottom"?ct.sort(he):ct.sort(Ce),rt=0,ct.forEach(function(tt,Je){tt.circularLinkID==Te.circularLinkID&&(Te.circularPathData.rightSmallArcRadius=v+Te.width/2+rt,Te.circularPathData.rightLargeArcRadius=v+Te.width/2+Je*Xe+rt),rt=rt+tt.width}),Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Math.max(Tt,Te.source.y1,Te.target.y1)+M+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=Ct-M-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius)}Te.circularPathData.leftInnerExtent=Te.circularPathData.sourceX+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightInnerExtent=Te.circularPathData.targetX-Te.circularPathData.rightNodeBuffer,Te.circularPathData.leftFullExtent=Te.circularPathData.sourceX+Te.circularPathData.leftLargeArcRadius+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightFullExtent=Te.circularPathData.targetX-Te.circularPathData.rightLargeArcRadius-Te.circularPathData.rightNodeBuffer}if(Te.circular)Te.path=re(Te);else{var je=n.linkHorizontal().source(function(tt){var Je=tt.source.x0+(tt.source.x1-tt.source.x0),Mt=tt.y0;return[Je,Mt]}).target(function(tt){var Je=tt.target.x0,Mt=tt.y1;return[Je,Mt]});Te.path=je(Te)}})}function re(Qe){var Xe="";return Qe.circularLinkType=="top"?Xe="M"+Qe.circularPathData.sourceX+" "+Qe.circularPathData.sourceY+" L"+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.sourceY+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Qe.circularPathData.leftFullExtent+" "+(Qe.circularPathData.sourceY-Qe.circularPathData.leftSmallArcRadius)+" L"+Qe.circularPathData.leftFullExtent+" "+Qe.circularPathData.verticalLeftInnerExtent+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" L"+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Qe.circularPathData.rightFullExtent+" "+Qe.circularPathData.verticalRightInnerExtent+" L"+Qe.circularPathData.rightFullExtent+" "+(Qe.circularPathData.targetY-Qe.circularPathData.rightSmallArcRadius)+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.targetY+" L"+Qe.circularPathData.targetX+" "+Qe.circularPathData.targetY:Xe="M"+Qe.circularPathData.sourceX+" "+Qe.circularPathData.sourceY+" L"+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.sourceY+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Qe.circularPathData.leftFullExtent+" "+(Qe.circularPathData.sourceY+Qe.circularPathData.leftSmallArcRadius)+" L"+Qe.circularPathData.leftFullExtent+" "+Qe.circularPathData.verticalLeftInnerExtent+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" L"+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Qe.circularPathData.rightFullExtent+" "+Qe.circularPathData.verticalRightInnerExtent+" L"+Qe.circularPathData.rightFullExtent+" "+(Qe.circularPathData.targetY+Qe.circularPathData.rightSmallArcRadius)+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.targetY+" L"+Qe.circularPathData.targetX+" "+Qe.circularPathData.targetY,Xe}function ne(Qe,Xe){return te(Qe)==te(Xe)?Qe.circularLinkType=="bottom"?ze(Qe,Xe):be(Qe,Xe):te(Xe)-te(Qe)}function be(Qe,Xe){return Qe.y0-Xe.y0}function ze(Qe,Xe){return Xe.y0-Qe.y0}function Ce(Qe,Xe){return Qe.y1-Xe.y1}function he(Qe,Xe){return Xe.y1-Qe.y1}function te(Qe){return Qe.target.column-Qe.source.column}function ke(Qe){return Qe.target.x0-Qe.source.x1}function Ee(Qe,Xe){var Tt=U(Qe),xt=ke(Xe)/Math.tan(Tt),_t=et(Qe)=="up"?Qe.y1+xt:Qe.y1-xt;return _t}function Me(Qe,Xe){var Tt=U(Qe),xt=ke(Xe)/Math.tan(Tt),_t=et(Qe)=="up"?Qe.y1-xt:Qe.y1+xt;return _t}function Oe(Qe,Xe,Tt,xt){Qe.links.forEach(function(_t){if(!_t.circular&&_t.target.column-_t.source.column>1){var Ct=_t.source.column+1,jt=_t.target.column-1,At=1,Te=jt-Ct+1;for(At=1;Ct<=jt;Ct++,At++)Qe.nodes.forEach(function(nt){if(nt.column==Ct){var ut=At/(Te+1),ct=Math.pow(1-ut,3),rt=3*ut*Math.pow(1-ut,2),je=3*Math.pow(ut,2)*(1-ut),tt=Math.pow(ut,3),Je=ct*_t.y0+rt*_t.y0+je*_t.y1+tt*_t.y1,Mt=Je-_t.width/2,Vt=Je+_t.width/2,Kt;Mt>nt.y0&&Mt<nt.y1?(Kt=nt.y1-Mt+10,Kt=nt.circularLinkType=="bottom"?Kt:-Kt,nt=me(nt,Kt,Xe,Tt),Qe.nodes.forEach(function(ir){C(ir,xt)==C(nt,xt)||ir.column!=nt.column||Re(nt,ir)&&me(ir,Kt,Xe,Tt)})):Vt>nt.y0&&Vt<nt.y1?(Kt=Vt-nt.y0+10,nt=me(nt,Kt,Xe,Tt),Qe.nodes.forEach(function(ir){C(ir,xt)==C(nt,xt)||ir.column!=nt.column||ir.y0<nt.y1&&ir.y1>nt.y1&&me(ir,Kt,Xe,Tt)})):Mt<nt.y0&&Vt>nt.y1&&(Kt=Vt-nt.y0+10,nt=me(nt,Kt,Xe,Tt),Qe.nodes.forEach(function(ir){C(ir,xt)==C(nt,xt)||ir.column!=nt.column||ir.y0<nt.y1&&ir.y1>nt.y1&&me(ir,Kt,Xe,Tt)}))}})}})}function Re(Qe,Xe){return Qe.y0>Xe.y0&&Qe.y0<Xe.y1||Qe.y1>Xe.y0&&Qe.y1<Xe.y1?!0:Qe.y0<Xe.y0&&Qe.y1>Xe.y1}function me(Qe,Xe,Tt,xt){return Qe.y0+Xe>=Tt&&Qe.y1+Xe<=xt&&(Qe.y0=Qe.y0+Xe,Qe.y1=Qe.y1+Xe,Qe.targetLinks.forEach(function(_t){_t.y1=_t.y1+Xe}),Qe.sourceLinks.forEach(function(_t){_t.y0=_t.y0+Xe})),Qe}function Be(Qe,Xe,Tt,xt){Qe.nodes.forEach(function(_t){xt&&_t.y+(_t.y1-_t.y0)>Xe&&(_t.y=_t.y-(_t.y+(_t.y1-_t.y0)-Xe));var Ct=Qe.links.filter(function(Te){return C(Te.source,Tt)==C(_t,Tt)}),jt=Ct.length;jt>1&&Ct.sort(function(Te,nt){if(!Te.circular&&!nt.circular){if(Te.target.column==nt.target.column)return Te.y1-nt.y1;if(Ze(Te,nt)){if(Te.target.column>nt.target.column){var ut=Me(nt,Te);return Te.y1-ut}if(nt.target.column>Te.target.column){var ct=Me(Te,nt);return ct-nt.y1}}else return Te.y1-nt.y1}if(Te.circular&&!nt.circular)return Te.circularLinkType=="top"?-1:1;if(nt.circular&&!Te.circular)return nt.circularLinkType=="top"?1:-1;if(Te.circular&&nt.circular)return Te.circularLinkType===nt.circularLinkType&&Te.circularLinkType=="top"?Te.target.column===nt.target.column?Te.target.y1-nt.target.y1:nt.target.column-Te.target.column:Te.circularLinkType===nt.circularLinkType&&Te.circularLinkType=="bottom"?Te.target.column===nt.target.column?nt.target.y1-Te.target.y1:Te.target.column-nt.target.column:Te.circularLinkType=="top"?-1:1});var At=_t.y0;Ct.forEach(function(Te){Te.y0=At+Te.width/2,At=At+Te.width}),Ct.forEach(function(Te,nt){if(Te.circularLinkType=="bottom"){var ut=nt+1,ct=0;for(ut;ut<jt;ut++)ct=ct+Ct[ut].width;Te.y0=_t.y1-ct-Te.width/2}})})}function fe(Qe,Xe,Tt){Qe.nodes.forEach(function(xt){var _t=Qe.links.filter(function(At){return C(At.target,Tt)==C(xt,Tt)}),Ct=_t.length;Ct>1&&_t.sort(function(At,Te){if(!At.circular&&!Te.circular){if(At.source.column==Te.source.column)return At.y0-Te.y0;if(Ze(At,Te)){if(Te.source.column<At.source.column){var nt=Ee(Te,At);return At.y0-nt}if(At.source.column<Te.source.column){var ut=Ee(At,Te);return ut-Te.y0}}else return At.y0-Te.y0}if(At.circular&&!Te.circular)return At.circularLinkType=="top"?-1:1;if(Te.circular&&!At.circular)return Te.circularLinkType=="top"?1:-1;if(At.circular&&Te.circular)return At.circularLinkType===Te.circularLinkType&&At.circularLinkType=="top"?At.source.column===Te.source.column?At.source.y1-Te.source.y1:At.source.column-Te.source.column:At.circularLinkType===Te.circularLinkType&&At.circularLinkType=="bottom"?At.source.column===Te.source.column?At.source.y1-Te.source.y1:Te.source.column-At.source.column:At.circularLinkType=="top"?-1:1});var jt=xt.y0;_t.forEach(function(At){At.y1=jt+At.width/2,jt=jt+At.width}),_t.forEach(function(At,Te){if(At.circularLinkType=="bottom"){var nt=Te+1,ut=0;for(nt;nt<Ct;nt++)ut=ut+_t[nt].width;At.y1=xt.y1-ut-At.width/2}})})}function Ze(Qe,Xe){return et(Qe)==et(Xe)}function et(Qe){return Qe.y0-Qe.y1>0?"up":"down"}function gt(Qe,Xe){return C(Qe.source,Xe)==C(Qe.target,Xe)}function Pt(Qe,Xe,Tt){var xt=Qe.nodes,_t=Qe.links,Ct=!1,jt=!1;if(_t.forEach(function(rt){rt.circularLinkType=="top"?Ct=!0:rt.circularLinkType=="bottom"&&(jt=!0)}),Ct==!1||jt==!1){var At=t.min(xt,function(rt){return rt.y0}),Te=t.max(xt,function(rt){return rt.y1}),nt=Te-At,ut=Tt-Xe,ct=ut/nt;xt.forEach(function(rt){var je=(rt.y1-rt.y0)*ct;rt.y0=(rt.y0-At)*ct,rt.y1=rt.y0+je}),_t.forEach(function(rt){rt.y0=(rt.y0-At)*ct,rt.y1=(rt.y1-At)*ct,rt.width=rt.width*ct})}}e.sankeyCircular=T,e.sankeyCenter=l,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=u,Object.defineProperty(e,"__esModule",{value:!0})})});var UJ=Se((Xxr,sje)=>{"use strict";sje.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 xje=Se((Yxr,_je)=>{"use strict";var lje=JWe(),LZt=(I2(),ab(P2)).interpolateNumber,LS=Nl(),Vk=rje(),zZt=oje(),nc=UJ(),zS=cd(),aw=Pl(),PZt=yu(),v1=Zr(),GJ=v1.strTranslate,IZt=v1.strRotate,WJ=Km(),Hk=WJ.keyFun,Lq=WJ.repeat,pje=WJ.unwrap,uje=Bf(),DZt=Ul(),vje=Qh(),RZt=vje.CAP_SHIFT,FZt=vje.LINE_SPACING,qZt=3;function BZt(e,t,r){var n=pje(t),i=n.trace,a=i.domain,o=i.orientation==="h",s=i.node.pad,u=i.node.thickness,l={justify:Vk.sankeyJustify,left:Vk.sankeyLeft,right:Vk.sankeyRight,center:Vk.sankeyCenter}[i.node.align],f=e.width*(a.x[1]-a.x[0]),c=e.height*(a.y[1]-a.y[0]),h=n._nodes,d=n._links,p=n.circular,x;p?x=zZt.sankeyCircular().circularLinkGap(0):x=Vk.sankey(),x.iterations(nc.sankeyIterations).size(o?[f,c]:[c,f]).nodeWidth(u).nodePadding(s).nodeId(function(U){return U.pointNumber}).nodeAlign(l).nodes(h).links(d);var b=x();x.nodePadding()<s&&v1.warn("node.pad was reduced to ",x.nodePadding()," to fit within the figure.");var y,k,E;for(var A in n._groupLookup){var L=parseInt(n._groupLookup[A]),_;for(y=0;y<b.nodes.length;y++)if(b.nodes[y].pointNumber===L){_=b.nodes[y];break}if(_){var C={pointNumber:parseInt(A),x0:_.x0,x1:_.x1,y0:_.y0,y1:_.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};b.nodes.unshift(C),_.childrenNodes.unshift(C)}}function M(){for(y=0;y<b.nodes.length;y++){var U=b.nodes[y],H={},j,G;for(k=0;k<U.targetLinks.length;k++)G=U.targetLinks[k],j=G.source.pointNumber+":"+G.target.pointNumber,H.hasOwnProperty(j)||(H[j]=[]),H[j].push(G);var O=Object.keys(H);for(k=0;k<O.length;k++){j=O[k];var W=H[j],re=0,ne={};for(E=0;E<W.length;E++)G=W[E],ne[G.label]||(ne[G.label]=0),ne[G.label]+=G.value,re+=G.value;for(E=0;E<W.length;E++)G=W[E],G.flow={value:re,labelConcentration:ne[G.label]/re,concentration:G.value/re,links:W},G.concentrationscale&&(G.color=zS(G.concentrationscale(G.flow.labelConcentration)))}var be=0;for(k=0;k<U.sourceLinks.length;k++)be+=U.sourceLinks[k].value;for(k=0;k<U.sourceLinks.length;k++)G=U.sourceLinks[k],G.concentrationOut=G.value/be;var ze=0;for(k=0;k<U.targetLinks.length;k++)ze+=U.targetLinks[k].value;for(k=0;k<U.targetLinks.length;k++)G=U.targetLinks[k],G.concenrationIn=G.value/ze}}M();function v(U){U.forEach(function(H){var j,G,O=0,W=H.length,re;for(H.sort(function(ne,be){return ne.y0-be.y0}),re=0;re<W;++re)j=H[re],j.y0>=O||(G=O-j.y0,G>1e-6&&(j.y0+=G,j.y1+=G)),O=j.y1+s})}function z(U){var H=U.map(function(be,ze){return{x0:be.x0,index:ze}}).sort(function(be,ze){return be.x0-ze.x0}),j=[],G=-1,O,W=-1/0,re;for(y=0;y<H.length;y++){var ne=U[H[y].index];ne.x0>W+u&&(G+=1,O=ne.x0),W=ne.x0,j[G]||(j[G]=[]),j[G].push(ne),re=O-ne.x0,ne.x0+=re,ne.x1+=re}return j}if(i.node.x.length&&i.node.y.length){for(y=0;y<Math.min(i.node.x.length,i.node.y.length,b.nodes.length);y++)if(i.node.x[y]&&i.node.y[y]){var T=[i.node.x[y]*f,i.node.y[y]*c];b.nodes[y].x0=T[0]-u/2,b.nodes[y].x1=T[0]+u/2;var F=b.nodes[y].y1-b.nodes[y].y0;b.nodes[y].y0=T[1]-F/2,b.nodes[y].y1=T[1]+F/2}if(i.arrangement==="snap"){h=b.nodes;var q=z(h);v(q)}x.update(b)}return{circular:p,key:r,trace:i,guid:v1.randstr(),horizontal:o,width:f,height:c,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?c:f,dragPerpendicular:o?f:c,arrangement:i.arrangement,sankey:x,graph:b,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function OZt(e,t,r){var n=zS(t.color),i=zS(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:aw.tinyRGB(n),tinyColorAlpha:n.getAlpha(),tinyColorHoverHue:aw.tinyRGB(i),tinyColorHoverAlpha:i.getAlpha(),linkPath:jJ,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 NZt(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 jJ(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return NZt(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=LZt(a,o),u=s(e),l=s(1-e),f=r.link.y0-r.link.width/2,c=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,p="M"+a+","+f,x="C"+u+","+f+" "+l+","+h+" "+o+","+h,b="C"+l+","+d+" "+u+","+c+" "+a+","+c,y=n>0?"L"+(o+n)+","+(h+r.link.width/2):"";return y+="L"+o+","+d,p+x+y+b+"Z"}return t}function UZt(e,t){var r=zS(t.color),n=nc.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=v1.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:aw.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 HJ(e){e.attr("transform",function(t){return GJ(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function VZt(e){e.call(HJ)}function yje(e,t){e.call(VZt),t.attr("d",jJ())}function fje(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function VJ(e){return e.link.width>1||e.linkLineWidth>0}function cje(e){var t=GJ(e.translateX,e.translateY);return t+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function hje(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 HZt(e,t,r,n){var i=LS.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"&&(v1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),v1.raiseToTop(this),a.interactionState.dragInProgress=a.node,dje(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):GZt(e,o,a,n),WZt(e,t,a,o,n)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=LS.event.x,s=LS.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),dje(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),yje(e.filter(gje(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"&&mje(a,n)}});e.on(".drag",null).call(i)}function GZt(e,t,r,n){XZt(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]=lje.forceSimulation(i).alphaDecay(0).force("collide",lje.forceCollide().radius(function(a){return a.dy/2+r.nodePad/2}).strength(1).iterations(nc.forceIterations)).force("constrain",jZt(e,t,i,r,n)).stop()}function WZt(e,t,r,n,i){window.requestAnimationFrame(function a(){var o;for(o=0;o<nc.forceTicksPerFrame;o++)r.forceLayouts[n].tick();var s=r.graph.nodes;if(YZt(s),r.sankey.update(r.graph),yje(e.filter(gje(r)),t),r.forceLayouts[n].alpha()>0)window.requestAnimationFrame(a);else{var u=r.node.originalX;r.node.x0=u-r.visibleWidth/2,r.node.x1=u+r.visibleWidth/2,mje(r,i)}})}function jZt(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)/nc.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 mje(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)}DZt.call("_guiRestyle",t,{"node.x":[r],"node.y":[n]},e.trace.index).then(function(){t._fullLayout._dragCover&&t._fullLayout._dragCover.remove()})}function ZZt(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 dje(e){e.lastDraggedX=e.x0+e.dx/2,e.lastDraggedY=e.y0+e.dy/2}function gje(e){return function(t){return t.node.originalX===e.node.originalX}}function XZt(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 YZt(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}_je.exports=function(e,t,r,n,i){var a=e._context.staticPlot,o=!1;v1.ensureSingle(e._fullLayout._infolayer,"g","first-render",function(){o=!0});var s=e._fullLayout._dragCover,u=r.filter(function(b){return pje(b).trace.visible}).map(BZt.bind(null,n)),l=t.selectAll("."+nc.cn.sankey).data(u,Hk);l.exit().remove(),l.enter().append("g").classed(nc.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",cje),l.each(function(b,y){e._fullData[y]._sankey=b;var k="bgsankey-"+b.trace.uid+"-"+y;v1.ensureSingle(e._fullLayout._draggers,"rect",k),e._fullData[y]._bgRect=LS.select("."+k),e._fullData[y]._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})}),l.transition().ease(nc.ease).duration(nc.duration).attr("transform",cje);var f=l.selectAll("."+nc.cn.sankeyLinks).data(Lq,Hk);f.enter().append("g").classed(nc.cn.sankeyLinks,!0).style("fill","none");var c=f.selectAll("."+nc.cn.sankeyLink).data(function(b){var y=b.graph.links;return y.filter(function(k){return k.value}).map(OZt.bind(null,b))},Hk);c.enter().append("path").classed(nc.cn.sankeyLink,!0).call(hje,l,i.linkEvents),c.style("stroke",function(b){return VJ(b)?aw.tinyRGB(zS(b.linkLineColor)):b.tinyColorHue}).style("stroke-opacity",function(b){return VJ(b)?aw.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 VJ(b)?b.linkLineWidth:1}).attr("d",jJ()),c.style("opacity",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(nc.ease).duration(nc.duration).style("opacity",1),c.exit().transition().ease(nc.ease).duration(nc.duration).style("opacity",0).remove();var h=l.selectAll("."+nc.cn.sankeyNodeSet).data(Lq,Hk);h.enter().append("g").classed(nc.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("."+nc.cn.sankeyNode).data(function(b){var y=b.graph.nodes;return ZZt(y),y.map(UZt.bind(null,b))},Hk);d.enter().append("g").classed(nc.cn.sankeyNode,!0).call(HJ).style("opacity",function(b){return(e._context.staticPlot||o)&&!b.partOfGroup?1:0}),d.call(hje,l,i.nodeEvents).call(HZt,c,i,e),d.transition().ease(nc.ease).duration(nc.duration).call(HJ).style("opacity",function(b){return b.partOfGroup?0:1}),d.exit().transition().ease(nc.ease).duration(nc.duration).style("opacity",0).remove();var p=d.selectAll("."+nc.cn.nodeRect).data(Lq);p.enter().append("rect").classed(nc.cn.nodeRect,!0).call(fje),p.style("stroke-width",function(b){return b.nodeLineWidth}).style("stroke",function(b){return aw.tinyRGB(zS(b.nodeLineColor))}).style("stroke-opacity",function(b){return aw.opacity(b.nodeLineColor)}).style("fill",function(b){return b.tinyColorHue}).style("fill-opacity",function(b){return b.tinyColorAlpha}),p.transition().ease(nc.ease).duration(nc.duration).call(fje);var x=d.selectAll("."+nc.cn.nodeLabel).data(Lq);x.enter().append("text").classed(nc.cn.nodeLabel,!0).style("cursor","default"),x.attr("data-notex",1).text(function(b){return b.node.label}).each(function(b){var y=LS.select(this);PZt.font(y,b.textFont),uje.convertToTspans(y,e)}).attr("text-anchor",function(b){return b.horizontal&&b.left?"end":"start"}).attr("transform",function(b){var y=LS.select(this),k=uje.lineCount(y),E=b.textFont.size*((k-1)*FZt-RZt),A=b.nodeLineWidth/2+qZt,L=((b.horizontal?b.visibleHeight:b.visibleWidth)-E)/2;b.horizontal&&(b.left?A=-A:A+=b.visibleWidth);var _=b.horizontal?"":"scale(-1,1)"+IZt(90);return GJ(b.horizontal?A:L,b.horizontal?L:A)+_}),x.transition().ease(nc.ease).duration(nc.duration)}});var YJ=Se((Kxr,Cje)=>{"use strict";var Zp=Nl(),XJ=Zr(),zq=XJ.numberFormat,KZt=xje(),PS=jc(),JZt=Pl(),Ax=UJ().cn,Gk=XJ._;function bje(e){return e!==""}function IS(e,t){return e.filter(function(r){return r.key===t.traceId})}function wje(e,t){Zp.select(e).select("path").style("fill-opacity",t),Zp.select(e).select("rect").style("fill-opacity",t)}function Tje(e){Zp.select(e).select("text.name").style("fill","black")}function Aje(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function Sje(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function Mje(e,t,r){t&&r&&IS(r,t).selectAll("."+Ax.sankeyLink).filter(Aje(t)).call(Eje.bind(0,t,r,!1))}function ZJ(e,t,r){t&&r&&IS(r,t).selectAll("."+Ax.sankeyLink).filter(Aje(t)).call(kje.bind(0,t,r,!1))}function Eje(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!==""&&IS(t,e).selectAll("."+Ax.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&&IS(t,e).selectAll("."+Ax.sankeyNode).filter(Sje(e)).call(Mje)}function kje(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!==""&&IS(t,e).selectAll("."+Ax.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&&IS(t,e).selectAll(Ax.sankeyNode).filter(Sje(e)).call(ZJ)}function th(e,t){var r=e.hoverlabel||{},n=XJ.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}Cje.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===Ax.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 u=function(L,_){var C=_.link;C.originalEvent=Zp.event,t._hoverdata=[C],PS.click(t,{target:!0})},l=function(L,_,C){t._fullLayout.hovermode!==!1&&(Zp.select(L).call(Eje.bind(0,_,C,!0)),_.link.trace.link.hoverinfo!=="skip"&&(_.link.fullData=_.link.trace,t.emit("plotly_hover",{event:Zp.event,points:[_.link]})))},f=Gk(t,"source:")+" ",c=Gk(t,"target:")+" ",h=Gk(t,"concentration:")+" ",d=Gk(t,"incoming flow count:")+" ",p=Gk(t,"outgoing flow count:")+" ",x=function(L,_){if(t._fullLayout.hovermode===!1)return;var C=_.link.trace.link;if(C.hoverinfo==="none"||C.hoverinfo==="skip")return;var M=[];function v(j){var G,O;j.circular?(G=(j.circularPathData.leftInnerExtent+j.circularPathData.rightInnerExtent)/2,O=j.circularPathData.verticalFullExtent):(G=(j.source.x1+j.target.x0)/2,O=(j.y0+j.y1)/2);var W=[G,O];return j.trace.orientation==="v"&&W.reverse(),W[0]+=_.parent.translateX,W[1]+=_.parent.translateY,W}for(var z=0,T=0;T<_.flow.links.length;T++){var F=_.flow.links[T];if(!(t._fullLayout.hovermode==="closest"&&_.link.pointNumber!==F.pointNumber)){_.link.pointNumber===F.pointNumber&&(z=T),F.fullData=F.trace,C=_.link.trace.link;var q=v(F),U={valueLabel:zq(_.valueFormat)(F.value)+_.valueSuffix};M.push({x:q[0],y:q[1],name:U.valueLabel,text:[F.label||"",f+F.source.label,c+F.target.label,F.concentrationscale?h+zq("%0.2f")(F.flow.labelConcentration):""].filter(bje).join("<br>"),color:th(C,"bgcolor")||JZt.addOpacity(F.color,1),borderColor:th(C,"bordercolor"),fontFamily:th(C,"font.family"),fontSize:th(C,"font.size"),fontColor:th(C,"font.color"),fontWeight:th(C,"font.weight"),fontStyle:th(C,"font.style"),fontVariant:th(C,"font.variant"),fontTextcase:th(C,"font.textcase"),fontLineposition:th(C,"font.lineposition"),fontShadow:th(C,"font.shadow"),nameLength:th(C,"namelength"),textAlign:th(C,"align"),idealAlign:Zp.event.x<q[0]?"right":"left",hovertemplate:C.hovertemplate,hovertemplateLabels:U,eventData:[F]})}}var H=PS.loneHover(M,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t,anchorIndex:z});H.each(function(){var j=this;_.link.concentrationscale||wje(j,.65),Tje(j)})},b=function(L,_,C){t._fullLayout.hovermode!==!1&&(Zp.select(L).call(kje.bind(0,_,C,!0)),_.link.trace.link.hoverinfo!=="skip"&&(_.link.fullData=_.link.trace,t.emit("plotly_unhover",{event:Zp.event,points:[_.link]})),PS.loneUnhover(n._hoverlayer.node()))},y=function(L,_,C){var M=_.node;M.originalEvent=Zp.event,t._hoverdata=[M],Zp.select(L).call(ZJ,_,C),PS.click(t,{target:!0})},k=function(L,_,C){t._fullLayout.hovermode!==!1&&(Zp.select(L).call(Mje,_,C),_.node.trace.node.hoverinfo!=="skip"&&(_.node.fullData=_.node.trace,t.emit("plotly_hover",{event:Zp.event,points:[_.node]})))},E=function(L,_){if(t._fullLayout.hovermode!==!1){var C=_.node.trace.node;if(!(C.hoverinfo==="none"||C.hoverinfo==="skip")){var M=Zp.select(L).select("."+Ax.nodeRect),v=t._fullLayout._paperdiv.node().getBoundingClientRect(),z=M.node().getBoundingClientRect(),T=z.left-2-v.left,F=z.right+2-v.left,q=z.top+z.height/4-v.top,U={valueLabel:zq(_.valueFormat)(_.node.value)+_.valueSuffix};_.node.fullData=_.node.trace,t._fullLayout._calcInverseTransform(t);var H=t._fullLayout._invScaleX,j=t._fullLayout._invScaleY,G=PS.loneHover({x0:H*T,x1:H*F,y:j*q,name:zq(_.valueFormat)(_.node.value)+_.valueSuffix,text:[_.node.label,d+_.node.targetLinks.length,p+_.node.sourceLinks.length].filter(bje).join("<br>"),color:th(C,"bgcolor")||_.tinyColorHue,borderColor:th(C,"bordercolor"),fontFamily:th(C,"font.family"),fontSize:th(C,"font.size"),fontColor:th(C,"font.color"),fontWeight:th(C,"font.weight"),fontStyle:th(C,"font.style"),fontVariant:th(C,"font.variant"),fontTextcase:th(C,"font.textcase"),fontLineposition:th(C,"font.lineposition"),fontShadow:th(C,"font.shadow"),nameLength:th(C,"namelength"),textAlign:th(C,"align"),idealAlign:"left",hovertemplate:C.hovertemplate,hovertemplateLabels:U,eventData:[_.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});wje(G,.85),Tje(G)}}},A=function(L,_,C){t._fullLayout.hovermode!==!1&&(Zp.select(L).call(ZJ,_,C),_.node.trace.node.hoverinfo!=="skip"&&(_.node.fullData=_.node.trace,t.emit("plotly_unhover",{event:Zp.event,points:[_.node]})),PS.loneUnhover(n._hoverlayer.node()))};KZt(t,i,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:l,follow:x,unhover:b,select:u},nodeEvents:{hover:k,follow:E,unhover:A,select:y}})}});var Lje=Se(ow=>{"use strict";var $Zt=_c().overrideAll,QZt=Dd().getModuleCalcData,eXt=YJ(),tXt=O1(),rXt=Ty(),iXt=gp(),nXt=nh().prepSelect,KJ=Zr(),aXt=Ul(),Pq="sankey";ow.name=Pq;ow.baseLayoutAttrOverrides=$Zt({hoverlabel:tXt.hoverlabel},"plot","nested");ow.plot=function(e){var t=QZt(e.calcdata,Pq)[0];eXt(e,t),ow.updateFx(e)};ow.clean=function(e,t,r,n){var i=n._has&&n._has(Pq),a=t._has&&t._has(Pq);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};ow.updateFx=function(e){for(var t=0;t<e._fullData.length;t++)oXt(e,t)};function oXt(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")){rXt(o,a);var s={_id:"x",c2p:KJ.identity,_offset:r._sankey.translateX,_length:r._sankey.width},u={_id:"y",c2p:KJ.identity,_offset:r._sankey.translateY,_length:r._sankey.height},l={gd:e,element:o.node(),plotinfo:{id:t,xaxis:s,yaxis:u,fillRangeItems:KJ.noop},subplot:t,xaxes:[s],yaxes:[u],doneFnCompleted:function(f){var c=e._fullData[t],h,d=c.node.groups.slice(),p=[];function x(E){for(var A=c._sankey.graph.nodes,L=0;L<A.length;L++)if(A[L].pointNumber===E)return A[L]}for(var b=0;b<f.length;b++){var y=x(f[b].pointNumber);if(y)if(y.group){for(var k=0;k<y.childrenNodes.length;k++)p.push(y.childrenNodes[k].pointNumber);d[y.pointNumber-c.node._count]=!1}else p.push(y.pointNumber)}h=d.filter(Boolean).concat([p]),aXt.call("_guiRestyle",e,{"node.groups":[h]},t)}};l.prepFn=function(f,c,h){nXt(f,c,h,l,i)},iXt.init(l)}}});var Pje=Se(($xr,zje)=>{"use strict";zje.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 u=o[s];if(!u.partOfGroup){var l=[(u.x0+u.x1)/2,(u.y0+u.y1)/2];a.orientation==="v"&&l.reverse(),r&&r.contains(l,!1,s,t)&&i.push({pointNumber:u.pointNumber})}}return i}});var Dje=Se((Qxr,Ije)=>{"use strict";Ije.exports={attributes:BJ(),supplyDefaults:qWe(),calc:VWe(),plot:YJ(),moduleType:"trace",name:"sankey",basePlotModule:Lje(),selectPoints:Pje(),categories:["noOpacity"],meta:{}}});var Fje=Se((ebr,Rje)=>{"use strict";Rje.exports=Dje()});var Bje=Se(DS=>{"use strict";var qje=Ac();DS.name="indicator";DS.plot=function(e,t,r,n){qje.plotBasePlot(DS.name,e,t,r,n)};DS.clean=function(e,t,r,n){qje.cleanBasePlot(DS.name,e,t,r,n)}});var $J=Se((rbr,Gje)=>{"use strict";var Sx=vu().extendFlat,Nje=vu().extendDeep,sXt=_c().overrideAll,Uje=uc(),Vje=Ih(),lXt=Ec().attributes,sh=Rd(),uXt=_f().templatedArray,Iq=HT(),Oje=Gc().descriptionOnlyNumbers,JJ=Uje({editType:"plot",colorEditType:"plot"}),Wk={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:Vje.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"},Hje={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},fXt=uXt("step",Nje({},Wk,{range:Hje}));Gje.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:lXt({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Sx({},JJ,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:Oje("value")},font:Sx({},JJ,{}),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:Oje("value")},increasing:{symbol:{valType:"string",dflt:Iq.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:Iq.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:Iq.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:Iq.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Sx({},JJ,{}),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:Nje({},Wk,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Vje.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:sXt({range:Hje,visible:Sx({},sh.visible,{dflt:!0}),tickmode:sh.minor.tickmode,nticks:sh.nticks,tick0:sh.tick0,dtick:sh.dtick,tickvals:sh.tickvals,ticktext:sh.ticktext,ticks:Sx({},sh.ticks,{dflt:"outside"}),ticklen:sh.ticklen,tickwidth:sh.tickwidth,tickcolor:sh.tickcolor,ticklabelstep:sh.ticklabelstep,showticklabels:sh.showticklabels,labelalias:sh.labelalias,tickfont:Uje({}),tickangle:sh.tickangle,tickformat:sh.tickformat,tickformatstops:sh.tickformatstops,tickprefix:sh.tickprefix,showtickprefix:sh.showtickprefix,ticksuffix:sh.ticksuffix,showticksuffix:sh.showticksuffix,separatethousands:sh.separatethousands,exponentformat:sh.exponentformat,minexponent:sh.minexponent,showexponent:sh.showexponent,editType:"plot"},"plot"),steps:fXt,threshold:{line:{color:Sx({},Wk.line.color,{}),width:Sx({},Wk.line.width,{dflt:1}),editType:"plot"},thickness:Sx({},Wk.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var QJ=Se((ibr,Wje)=>{"use strict";Wje.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var Xje=Se((nbr,Zje)=>{"use strict";var eg=Zr(),Rq=$J(),cXt=Ec().defaults,jje=_f(),hXt=Jd(),Dq=QJ(),dXt=xb(),pXt=T3(),vXt=e_(),yXt=t_();function mXt(e,t,r,n){function i(_,C){return eg.coerce(e,t,Rq,_,C)}cXt(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 u=eg.extendFlat({},n.font);u.size=void 0,eg.coerceFont(i,"number.font",u),t.number.font.size===void 0&&(t.number.font.size=Dq.defaultNumberFontSize,o[0]=!0),i("number.prefix"),i("number.suffix"),s=t.number.font.size}var l;if(t._hasDelta){var f=eg.extendFlat({},n.font);f.size=void 0,eg.coerceFont(i,"delta.font",f),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||Dq.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"),l=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var c=eg.extendFlat({},n.font);c.size=.25*(s||l||Dq.defaultNumberFontSize),eg.coerceFont(i,"title.font",c),i("title.text");var h,d,p,x;function b(_,C){return eg.coerce(h,d,Rq.gauge,_,C)}function y(_,C){return eg.coerce(p,x,Rq.gauge.axis,_,C)}if(t._hasGauge){h=e.gauge,h||(h={}),d=jje.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 A=Dq.valueThickness*(t.gauge.shape==="bullet"?.5:1);b("bar.thickness",A),hXt(h,d,{name:"steps",handleItemDefaults:gXt}),b("threshold.value"),b("threshold.thickness"),b("threshold.line.width"),b("threshold.line.color"),p={},h&&(p=h.axis||{}),x=jje.newContainer(d,"axis"),y("visible"),t._range=y("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};dXt(p,x,y,"linear"),yXt(p,x,y,"linear",L),vXt(p,x,y,"linear",L),pXt(p,x,y,L)}else i("title.align","center"),i("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function gXt(e,t){function r(n,i){return eg.coerce(e,t,Rq.gauge.steps,n,i)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}Zje.exports={supplyDefaults:mXt}});var Kje=Se((abr,Yje)=>{"use strict";function _Xt(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}Yje.exports={calc:_Xt}});var rZe=Se((obr,tZe)=>{"use strict";var cw=Nl(),xXt=(I2(),ab(P2)).interpolate,Jje=(I2(),ab(P2)).interpolateNumber,Mx=Zr(),bXt=Mx.strScale,Zk=Mx.strTranslate,wXt=Mx.rad2deg,TXt=Qh().MID_SHIFT,fw=yu(),sw=QJ(),qq=Bf(),up=hu(),AXt=J5(),SXt=rI(),MXt=Rd(),RS=Pl(),e$={left:"start",center:"middle",right:"end"},lw={left:0,center:.5,right:1},$je=/[yzafpnµmkMGTPEZY]/;function Xk(e){return e&&e.duration>0}tZe.exports=function(t,r,n,i){var a=t._fullLayout,o;Xk(n)&&i&&(o=i()),Mx.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var u=s[0],l=u.trace,f=cw.select(this),c=l._hasGauge,h=l._isAngular,d=l._isBullet,p=l.domain,x={w:a._size.w*(p.x[1]-p.x[0]),h:a._size.h*(p.y[1]-p.y[0]),l:a._size.l+a._size.w*p.x[0],r:a._size.r+a._size.w*(1-p.x[1]),t:a._size.t+a._size.h*(1-p.y[1]),b:a._size.b+a._size.h*p.y[0]},b=x.l+x.w/2,y=x.t+x.h/2,k=Math.min(x.w/2,x.h),E=sw.innerRadius*k,A,L,_,C=l.align||"center";if(L=y,!c)A=x.l+lw[C]*x.w,_=function(G){return Qje(G,x.w,x.h)};else if(h&&(A=b,L=y+k/2,_=function(G){return zXt(G,.9*E)}),d){var M=sw.bulletPadding,v=1-sw.bulletNumberDomainSize+M;A=x.l+(v+(1-v)*lw[C])*x.w,_=function(G){return Qje(G,(sw.bulletNumberDomainSize-M)*x.w,x.h)}}CXt(t,f,s,{numbersX:A,numbersY:L,numbersScaler:_,transitionOpts:n,onComplete:o});var z,T;c&&(z={range:l.gauge.axis.range,color:l.gauge.bgcolor,line:{color:l.gauge.bordercolor,width:0},thickness:1},T={range:l.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:l.gauge.bordercolor,width:l.gauge.borderwidth},thickness:1});var F=f.selectAll("g.angular").data(h?s:[]);F.exit().remove();var q=f.selectAll("g.angularaxis").data(h?s:[]);q.exit().remove(),h&&kXt(t,f,s,{radius:k,innerRadius:E,gauge:F,layer:q,size:x,gaugeBg:z,gaugeOutline:T,transitionOpts:n,onComplete:o});var U=f.selectAll("g.bullet").data(d?s:[]);U.exit().remove();var H=f.selectAll("g.bulletaxis").data(d?s:[]);H.exit().remove(),d&&EXt(t,f,s,{gauge:U,layer:H,size:x,gaugeBg:z,gaugeOutline:T,transitionOpts:n,onComplete:o});var j=f.selectAll("text.title").data(s);j.exit().remove(),j.enter().append("text").classed("title",!0),j.attr("text-anchor",function(){return d?e$.right:e$[l.title.align]}).text(l.title.text).call(fw.font,l.title.font).call(qq.convertToTspans,t),j.attr("transform",function(){var G=x.l+x.w*lw[l.title.align],O,W=sw.titlePadding,re=fw.bBox(j.node());if(c){if(h)if(l.gauge.axis.visible){var ne=fw.bBox(q.node());O=ne.top-W-re.bottom}else O=x.t+x.h/2-k/2-re.bottom-W;d&&(O=L-(re.top+re.bottom)/2,G=x.l-sw.bulletPadding*x.w)}else O=l._numbersTop-W-re.bottom;return Zk(G,O)})})};function EXt(e,t,r,n){var i=r[0].trace,a=n.gauge,o=n.layer,s=n.gaugeBg,u=n.gaugeOutline,l=n.size,f=i.domain,c=n.transitionOpts,h=n.onComplete,d,p,x,b,y;a.enter().append("g").classed("bullet",!0),a.attr("transform",Zk(l.l,l.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var k=l.h,E=i.gauge.bar.thickness*k,A=f.x[0],L=f.x[0]+(f.x[1]-f.x[0])*(i._hasNumber||i._hasDelta?1-sw.bulletNumberDomainSize:1);d=jk(e,i.gauge.axis),d._id="xbulletaxis",d.domain=[A,L],d.setScale(),p=up.calcTicks(d),x=up.makeTransTickFn(d),b=up.getTickSigns(d)[2],y=l.t+l.h,d.visible&&(up.drawTicks(e,d,{vals:d.ticks==="inside"?up.clipEnds(d,p):p,layer:o,path:up.makeTickPath(d,y,b),transFn:x}),up.drawLabels(e,d,{vals:p,layer:o,transFn:x,labelFns:up.makeLabelFns(d,y)}));function _(q){q.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(_).call(uw),M.exit().remove();var v=a.selectAll("g.value-bullet").data([i.gauge.bar]);v.enter().append("g").classed("value-bullet",!0).append("rect"),v.select("rect").attr("height",E).attr("y",(k-E)/2).call(uw),Xk(c)?v.select("rect").transition().duration(c.duration).ease(c.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)))):v.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),v.exit().remove();var z=r.filter(function(){return i.gauge.threshold.value||i.gauge.threshold.value===0}),T=a.selectAll("g.threshold-bullet").data(z);T.enter().append("g").classed("threshold-bullet",!0).append("line"),T.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(RS.stroke,i.gauge.threshold.line.color).style("stroke-width",i.gauge.threshold.line.width),T.exit().remove();var F=a.selectAll("g.gauge-outline").data([u]);F.enter().append("g").classed("gauge-outline",!0).append("rect"),F.select("rect").call(_).call(uw),F.exit().remove()}function kXt(e,t,r,n){var i=r[0].trace,a=n.size,o=n.radius,s=n.innerRadius,u=n.gaugeBg,l=n.gaugeOutline,f=[a.l+a.w/2,a.t+a.h/2+o/2],c=n.gauge,h=n.layer,d=n.transitionOpts,p=n.onComplete,x=Math.PI/2;function b(be){var ze=i.gauge.axis.range[0],Ce=i.gauge.axis.range[1],he=(be-ze)/(Ce-ze)*Math.PI-x;return he<-x?-x:he>x?x:he}function y(be){return cw.svg.arc().innerRadius((s+o)/2-be/2*(o-s)).outerRadius((s+o)/2+be/2*(o-s)).startAngle(-x)}function k(be){be.attr("d",function(ze){return y(ze.thickness).startAngle(b(ze.range[0])).endAngle(b(ze.range[1]))()})}var E,A,L,_;c.enter().append("g").classed("angular",!0),c.attr("transform",Zk(f[0],f[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),E=jk(e,i.gauge.axis),E.type="linear",E.range=i.gauge.axis.range,E._id="xangularaxis",E.ticklabeloverflow="allow",E.setScale();var C=function(be){return(E.range[0]-be.x)/(E.range[1]-E.range[0])*Math.PI+Math.PI},M={},v=up.makeLabelFns(E,0),z=v.labelStandoff;M.xFn=function(be){var ze=C(be);return Math.cos(ze)*z},M.yFn=function(be){var ze=C(be),Ce=Math.sin(ze)>0?.2:1;return-Math.sin(ze)*(z+be.fontSize*Ce)+Math.abs(Math.cos(ze))*(be.fontSize*TXt)},M.anchorFn=function(be){var ze=C(be),Ce=Math.cos(ze);return Math.abs(Ce)<.1?"middle":Ce>0?"start":"end"},M.heightFn=function(be,ze,Ce){var he=C(be);return-.5*(1+Math.sin(he))*Ce};var T=function(be){return Zk(f[0]+o*Math.cos(be),f[1]-o*Math.sin(be))};L=function(be){return T(C(be))};var F=function(be){var ze=C(be);return T(ze)+"rotate("+-wXt(ze)+")"};if(A=up.calcTicks(E),_=up.getTickSigns(E)[2],E.visible){_=E.ticks==="inside"?-1:1;var q=(E.linewidth||1)/2;up.drawTicks(e,E,{vals:A,layer:h,path:"M"+_*q+",0h"+_*E.ticklen,transFn:F}),up.drawLabels(e,E,{vals:A,layer:h,transFn:L,labelFns:M})}var U=[u].concat(i.gauge.steps),H=c.selectAll("g.bg-arc").data(U);H.enter().append("g").classed("bg-arc",!0).append("path"),H.select("path").call(k).call(uw),H.exit().remove();var j=y(i.gauge.bar.thickness),G=c.selectAll("g.value-arc").data([i.gauge.bar]);G.enter().append("g").classed("value-arc",!0).append("path");var O=G.select("path");Xk(d)?(O.transition().duration(d.duration).ease(d.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).attrTween("d",LXt(j,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):O.attr("d",typeof r[0].y=="number"?j.endAngle(b(r[0].y)):"M0,0Z"),O.call(uw),G.exit().remove(),U=[];var W=i.gauge.threshold.value;(W||W===0)&&U.push({range:[W,W],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=c.selectAll("g.threshold-arc").data(U);re.enter().append("g").classed("threshold-arc",!0).append("path"),re.select("path").call(k).call(uw),re.exit().remove();var ne=c.selectAll("g.gauge-outline").data([l]);ne.enter().append("g").classed("gauge-outline",!0).append("path"),ne.select("path").call(k).call(uw),ne.exit().remove()}function CXt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||"center",u=e$[s],l=n.transitionOpts,f=n.onComplete,c=Mx.ensureSingle(t,"g","numbers"),h,d,p,x=[];i._hasNumber&&x.push("number"),i._hasDelta&&(x.push("delta"),i.delta.position==="left"&&x.reverse());var b=c.selectAll("text").data(x);b.enter().append("text"),b.attr("text-anchor",function(){return u}).attr("class",function(T){return T}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),b.exit().remove();function y(T,F,q,U){if(T.match("s")&&q>=0!=U>=0&&!F(q).slice(-1).match($je)&&!F(U).slice(-1).match($je)){var H=T.slice().replace("s","f").replace(/\d+/,function(G){return parseInt(G)-1}),j=jk(e,{tickformat:H});return function(G){return Math.abs(G)<1?up.tickText(j,G).text:F(G)}}else return F}function k(){var T=jk(e,{tickformat:i.number.valueformat},i._range);T.setScale(),up.prepTicks(T);var F=function(G){return up.tickText(T,G).text},q=i.number.suffix,U=i.number.prefix,H=c.select("text.number");function j(){var G=typeof r[0].y=="number"?U+F(r[0].y)+q:"-";H.text(G).call(fw.font,i.number.font).call(qq.convertToTspans,e)}return Xk(l)?H.transition().duration(l.duration).ease(l.easing).each("end",function(){j(),f&&f()}).each("interrupt",function(){j(),f&&f()}).attrTween("text",function(){var G=cw.select(this),O=Jje(r[0].lastY,r[0].y);i._lastValue=r[0].y;var W=y(i.number.valueformat,F,r[0].lastY,r[0].y);return function(re){G.text(U+W(O(re))+q)}}):j(),h=eZe(U+F(r[0].y)+q,i.number.font,u,e),H}function E(){var T=jk(e,{tickformat:i.delta.valueformat},i._range);T.setScale(),up.prepTicks(T);var F=function(re){return up.tickText(T,re).text},q=i.delta.suffix,U=i.delta.prefix,H=function(re){var ne=i.delta.relative?re.relativeDelta:re.delta;return ne},j=function(re,ne){return re===0||typeof re!="number"||isNaN(re)?"-":(re>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+U+ne(re)+q},G=function(re){return re.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=H(r[0]));var O=c.select("text.delta");O.call(fw.font,i.delta.font).call(RS.fill,G({delta:i._deltaLastValue}));function W(){O.text(j(H(r[0]),F)).call(RS.fill,G(r[0])).call(qq.convertToTspans,e)}return Xk(l)?O.transition().duration(l.duration).ease(l.easing).tween("text",function(){var re=cw.select(this),ne=H(r[0]),be=i._deltaLastValue,ze=y(i.delta.valueformat,F,be,ne),Ce=Jje(be,ne);return i._deltaLastValue=ne,function(he){re.text(j(Ce(he),ze)),re.call(RS.fill,G({delta:Ce(he)}))}}).each("end",function(){W(),f&&f()}).each("interrupt",function(){W(),f&&f()}):W(),d=eZe(j(H(r[0]),F),i.delta.font,u,e),O}var A=i.mode+i.align,L;if(i._hasDelta&&(L=E(),A+=i.delta.position+i.delta.font.size+i.delta.font.family+i.delta.valueformat,A+=i.delta.increasing.symbol+i.delta.decreasing.symbol,p=d),i._hasNumber&&(k(),A+=i.number.font.size+i.number.font.family+i.number.valueformat+i.number.suffix+i.number.prefix,p=h),i._hasDelta&&i._hasNumber){var _=[(h.left+h.right)/2,(h.top+h.bottom)/2],C=[(d.left+d.right)/2,(d.top+d.bottom)/2],M,v,z=.75*i.delta.font.size;i.delta.position==="left"&&(M=Fq(i,"deltaPos",0,-1*(h.width*lw[i.align]+d.width*(1-lw[i.align])+z),A,Math.min),v=_[1]-C[1],p={width:h.width+d.width+z,height:Math.max(h.height,d.height),left:d.left+M,right:h.right,top:Math.min(h.top,d.top+v),bottom:Math.max(h.bottom,d.bottom+v)}),i.delta.position==="right"&&(M=Fq(i,"deltaPos",0,h.width*(1-lw[i.align])+d.width*lw[i.align]+z,A,Math.max),v=_[1]-C[1],p={width:h.width+d.width+z,height:Math.max(h.height,d.height),left:h.left,right:d.right+M,top:Math.min(h.top,d.top+v),bottom:Math.max(h.bottom,d.bottom+v)}),i.delta.position==="bottom"&&(M=null,v=d.height,p={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,v=h.top,p={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:v})}(i._hasNumber||i._hasDelta)&&c.attr("transform",function(){var T=n.numbersScaler(p);A+=T[2];var F=Fq(i,"numbersScale",1,T[0],A,Math.min),q;i._scaleNumbers||(F=1),i._isAngular?q=o-F*p.bottom:q=o-F*(p.top+p.bottom)/2,i._numbersTop=F*p.top+q;var U=p[s];s==="center"&&(U=(p.left+p.right)/2);var H=a-F*U;return H=Fq(i,"numbersTranslate",0,H,A,Math.max),Zk(H,q)+bXt(F)})}function uw(e){e.each(function(t){RS.stroke(cw.select(this),t.line.color)}).each(function(t){RS.fill(cw.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function LXt(e,t,r){return function(){var n=xXt(t,r);return function(i){return e.endAngle(n(i))()}}}function jk(e,t,r){var n=e._fullLayout,i=Mx.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(u,l){return Mx.coerce(i,a,MXt,u,l)}return AXt(i,a,s,o,n),SXt(i,a,s,o),a}function Qje(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function zXt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function eZe(e,t,r,n){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),a=cw.select(i);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(qq.convertToTspans,n).call(fw.font,t),fw.bBox(a.node())}function Fq(e,t,r,n,i,a){var o="_cache"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=Mx.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var nZe=Se((sbr,iZe)=>{"use strict";iZe.exports={moduleType:"trace",name:"indicator",basePlotModule:Bje(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:$J(),supplyDefaults:Xje().supplyDefaults,calc:Kje().calc,plot:rZe(),meta:{}}});var oZe=Se((lbr,aZe)=>{"use strict";aZe.exports=nZe()});var t$=Se((fbr,fZe)=>{"use strict";var sZe=Nb(),Bq=vu().extendFlat,PXt=_c().overrideAll,lZe=uc(),IXt=Ec().attributes,uZe=Gc().descriptionOnlyNumbers,ubr=fZe.exports=PXt({domain:IXt({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:uZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:Bq({},sZe.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:Bq({},lZe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:uZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:Bq({},sZe.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:Bq({},lZe({arrayOk:!0}))}},"calc","from-root")});var hZe=Se((cbr,cZe)=>{"use strict";var r$=Zr(),DXt=t$(),RXt=Ec().defaults;function FXt(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(u,l){return u-l}),o=i.map(function(u){return a.indexOf(u)}),s=o.length;s<n;s++)o.push(s);t("columnorder",o)}cZe.exports=function(t,r,n,i){function a(o,s){return r$.coerce(t,r,DXt,o,s)}RXt(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"),r$.coerceFont(a,"header.font",i.font),FXt(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"),r$.coerceFont(a,"cells.font",i.font),r._length=null}});var pZe=Se((hbr,dZe)=>{"use strict";var qXt=Km().wrap;dZe.exports=function(){return qXt({})}});var i$=Se((dbr,vZe)=>{"use strict";vZe.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 AZe=Se((pbr,TZe)=>{"use strict";var yZe=i$(),a$=vu().extendFlat,BXt=_u(),OXt=yp().isTypedArray,Oq=yp().isArrayOrTypedArray;TZe.exports=function(t,r){var n=n$(r.cells.values),i=function(v){return v.slice(r.header.values.length,v.length)},a=n$(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=n$(a));var o=a.concat(i(n).map(function(){return wZe((a[0]||[""]).length)})),s=r.domain,u=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),l=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),f=r.header.values.length?o[0].map(function(){return r.header.height}):[yZe.emptyHeaderHeight],c=n.length?n[0].map(function(){return r.cells.height}):[],h=f.reduce(mZe,0),d=l-h,p=d+yZe.uplift,x=xZe(c,p),b=xZe(f,h),y=_Ze(b,[]),k=_Ze(x,y),E={},A=r._fullInput.columnorder;Oq(A)&&(A=Array.from(A)),A=A.concat(i(n.map(function(v,z){return z})));var L=o.map(function(v,z){var T=Oq(r.columnwidth)?r.columnwidth[Math.min(z,r.columnwidth.length-1)]:r.columnwidth;return BXt(T)?Number(T):1}),_=L.reduce(mZe,0);L=L.map(function(v){return v/_*u});var C=Math.max(o$(r.header.line.width),o$(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:u,maxLineWidth:C,height:l,columnOrder:A,groupHeight:l,rowBlocks:k,headerRowBlocks:y,scrollY:0,cells:a$({},r.cells,{values:n}),headerCells:a$({},r.header,{values:o}),gdColumns:o.map(function(v){return v[0]}),gdColumnsOriginalOrder:o.map(function(v){return v[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(v,z){var T=E[v];E[v]=(T||0)+1;var F=v+"__"+E[v];return{key:F,label:v,specIndex:z,xIndex:A[z],xScale:gZe,x:void 0,calcdata:void 0,columnWidth:L[z]}})};return M.columns.forEach(function(v){v.calcdata=M,v.x=gZe(v)}),M};function o$(e){if(Oq(e)){for(var t=0,r=0;r<e.length;r++)t=Math.max(t,o$(e[r]));return t}return e}function mZe(e,t){return e+t}function n$(e){var t=e.slice(),r=1/0,n=0,i;for(i=0;i<t.length;i++)OXt(t[i])?t[i]=Array.from(t[i]):Oq(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(wZe(a)))}return t}function wZe(e){for(var t=new Array(e),r=0;r<e;r++)t[r]="";return t}function gZe(e){return e.calcdata.columns.reduce(function(t,r){return r.xIndex<e.xIndex?t+r.columnWidth:t},0)}function _Ze(e,t){var r=Object.keys(e);return r.map(function(n){return a$({},e[n],{auxiliaryBlocks:t})})}function xZe(e,t){for(var r={},n,i=0,a=0,o=bZe(),s=0,u=0,l=0;l<e.length;l++)n=e[l],o.rows.push({rowIndex:l,rowHeight:n}),a+=n,(a>=t||l===e.length-1)&&(r[i]=o,o.key=u++,o.firstRowIndex=s,o.lastRowIndex=l,o=bZe(),i+=a,s=l+1,a=0);return r}function bZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var SZe=Se(s$=>{"use strict";var Nq=vu().extendFlat;s$.splitToPanels=function(e){var t=[0,0],r=Nq({},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:Nq({},e.calcdata,{cells:e.calcdata.headerCells})}),n=Nq({},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=Nq({},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]};s$.splitToCells=function(e){var t=NXt(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 NXt(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 m$=Se((ybr,FZe)=>{"use strict";var Yl=i$(),Vc=Nl(),l$=Zr(),UXt=l$.numberFormat,ac=Km(),u$=yu(),VXt=Bf(),HXt=Zr().raiseToTop,oy=Zr().strTranslate,GXt=Zr().cancelTransition,WXt=AZe(),PZe=SZe(),MZe=Pl();FZe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll("."+Yl.cn.table).data(r.map(function(k){var E=ac.unwrap(k),A=E.trace;return WXt(t,A)}),ac.keyFun);i.exit().remove(),i.enter().append("g").classed(Yl.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 oy(k.translateX,k.translateY)});var a=i.selectAll("."+Yl.cn.tableControlView).data(ac.repeat,ac.keyFun),o=a.enter().append("g").classed(Yl.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(Yk,t)}).on(s,function(k){if(!k.scrollbarState.wheeling){k.scrollbarState.wheeling=!0;var E=k.scrollY+Vc.event.deltaY,A=Vq(t,a,null,E)(k);A||(Vc.event.stopPropagation(),Vc.event.preventDefault()),k.scrollbarState.wheeling=!1}}).call(Yk,t,!0)}a.attr("transform",function(k){return oy(k.size.l,k.size.t)});var u=a.selectAll("."+Yl.cn.scrollBackground).data(ac.repeat,ac.keyFun);u.enter().append("rect").classed(Yl.cn.scrollBackground,!0).attr("fill","none"),u.attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),a.each(function(k){u$.setClipUrl(Vc.select(this),EZe(t,k),t)});var l=a.selectAll("."+Yl.cn.yColumn).data(function(k){return k.columns},ac.keyFun);l.enter().append("g").classed(Yl.cn.yColumn,!0),l.exit().remove(),l.attr("transform",function(k){return oy(k.x,0)}),n&&l.call(Vc.behavior.drag().origin(function(k){var E=Vc.select(this);return LZe(E,k,-Yl.uplift),HXt(this),k.calcdata.columnDragInProgress=!0,Yk(a.filter(function(A){return k.calcdata.key===A.key}),t),k}).on("drag",function(k){var E=Vc.select(this),A=function(C){return(k===C?Vc.event.x:C.x)+C.columnWidth/2};k.x=Math.max(-Yl.overdrag,Math.min(k.calcdata.width+Yl.overdrag-k.columnWidth,Vc.event.x));var L=IZe(l).filter(function(C){return C.calcdata.key===k.calcdata.key}),_=L.sort(function(C,M){return A(C)-A(M)});_.forEach(function(C,M){C.xIndex=M,C.x=k===C?C.x:C.xScale(C)}),l.filter(function(C){return k!==C}).transition().ease(Yl.transitionEase).duration(Yl.transitionDuration).attr("transform",function(C){return oy(C.x,0)}),E.call(GXt).attr("transform",oy(k.x,-Yl.uplift))}).on("dragend",function(k){var E=Vc.select(this),A=k.calcdata;k.x=k.xScale(k),k.calcdata.columnDragInProgress=!1,LZe(E,k,0),tYt(t,A,A.columns.map(function(L){return L.xIndex}))})),l.each(function(k){u$.setClipUrl(Vc.select(this),kZe(t,k),t)});var f=l.selectAll("."+Yl.cn.columnBlock).data(PZe.splitToPanels,ac.keyFun);f.enter().append("g").classed(Yl.cn.columnBlock,!0).attr("id",function(k){return k.key}),f.style("cursor",function(k){return k.dragHandle?"ew-resize":k.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var c=f.filter(rYt),h=f.filter(p$);n&&h.call(Vc.behavior.drag().origin(function(k){return Vc.event.stopPropagation(),k}).on("drag",Vq(t,a,-1)).on("dragend",function(){})),f$(t,a,c,f),f$(t,a,h,f);var d=a.selectAll("."+Yl.cn.scrollAreaClip).data(ac.repeat,ac.keyFun);d.enter().append("clipPath").classed(Yl.cn.scrollAreaClip,!0).attr("id",function(k){return EZe(t,k)});var p=d.selectAll("."+Yl.cn.scrollAreaClipRect).data(ac.repeat,ac.keyFun);p.enter().append("rect").classed(Yl.cn.scrollAreaClipRect,!0).attr("x",-Yl.overdrag).attr("y",-Yl.uplift).attr("fill","none"),p.attr("width",function(k){return k.width+2*Yl.overdrag}).attr("height",function(k){return k.height+Yl.uplift});var x=l.selectAll("."+Yl.cn.columnBoundary).data(ac.repeat,ac.keyFun);x.enter().append("g").classed(Yl.cn.columnBoundary,!0);var b=l.selectAll("."+Yl.cn.columnBoundaryClippath).data(ac.repeat,ac.keyFun);b.enter().append("clipPath").classed(Yl.cn.columnBoundaryClippath,!0),b.attr("id",function(k){return kZe(t,k)});var y=b.selectAll("."+Yl.cn.columnBoundaryRect).data(ac.repeat,ac.keyFun);y.enter().append("rect").classed(Yl.cn.columnBoundaryRect,!0).attr("fill","none"),y.attr("width",function(k){return k.columnWidth+2*Uq(k)}).attr("height",function(k){return k.calcdata.height+2*Uq(k)+Yl.uplift}).attr("x",function(k){return-Uq(k)}).attr("y",function(k){return-Uq(k)}),v$(null,h,a)};function Uq(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function EZe(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function kZe(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function IZe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function Yk(e,t,r){function n(l){var f=l.rowBlocks;return h$(f,f.length-1)+(f.length?Hq(f[f.length-1],1/0):1)}var i=e.selectAll("."+Yl.cn.scrollbarKit).data(ac.repeat,ac.keyFun);i.enter().append("g").classed(Yl.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),i.each(function(l){var f=l.scrollbarState;f.totalHeight=n(l),f.scrollableAreaHeight=l.groupHeight-c$(l),f.currentlyVisibleHeight=Math.min(f.totalHeight,f.scrollableAreaHeight),f.ratio=f.currentlyVisibleHeight/f.totalHeight,f.barLength=Math.max(f.ratio*f.currentlyVisibleHeight,Yl.goldenRatio*Yl.scrollbarWidth),f.barWiggleRoom=f.currentlyVisibleHeight-f.barLength,f.wiggleRoom=Math.max(0,f.totalHeight-f.scrollableAreaHeight),f.topY=f.barWiggleRoom===0?0:l.scrollY/f.wiggleRoom*f.barWiggleRoom,f.bottomY=f.topY+f.barLength,f.dragMultiplier=f.wiggleRoom/f.barWiggleRoom}).attr("transform",function(l){var f=l.width+Yl.scrollbarWidth/2+Yl.scrollbarOffset;return oy(f,c$(l))});var a=i.selectAll("."+Yl.cn.scrollbar).data(ac.repeat,ac.keyFun);a.enter().append("g").classed(Yl.cn.scrollbar,!0);var o=a.selectAll("."+Yl.cn.scrollbarSlider).data(ac.repeat,ac.keyFun);o.enter().append("g").classed(Yl.cn.scrollbarSlider,!0),o.attr("transform",function(l){return oy(0,l.scrollbarState.topY||0)});var s=o.selectAll("."+Yl.cn.scrollbarGlyph).data(ac.repeat,ac.keyFun);s.enter().append("line").classed(Yl.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Yl.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Yl.scrollbarWidth/2),s.attr("y2",function(l){return l.scrollbarState.barLength-Yl.scrollbarWidth/2}).attr("stroke-opacity",function(l){return l.columnDragInProgress||!l.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Yl.scrollbarHideDelay).duration(Yl.scrollbarHideDuration).attr("stroke-opacity",0);var u=a.selectAll("."+Yl.cn.scrollbarCaptureZone).data(ac.repeat,ac.keyFun);u.enter().append("line").classed(Yl.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Yl.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(l){var f=Vc.event.y,c=this.getBoundingClientRect(),h=l.scrollbarState,d=f-c.top,p=Vc.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||Vq(t,e,null,p(d-h.barLength/2))(l)}).call(Vc.behavior.drag().origin(function(l){return Vc.event.stopPropagation(),l.scrollbarState.scrollbarScrollInProgress=!0,l}).on("drag",Vq(t,e)).on("dragend",function(){})),u.attr("y2",function(l){return l.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),u.remove())}function f$(e,t,r,n){var i=jXt(r),a=ZXt(i);JXt(a);var o=XXt(a);QXt(o);var s=KXt(a),u=YXt(s);$Xt(u),DZe(u,t,n,e),y$(a)}function jXt(e){var t=e.selectAll("."+Yl.cn.columnCells).data(ac.repeat,ac.keyFun);return t.enter().append("g").classed(Yl.cn.columnCells,!0),t.exit().remove(),t}function ZXt(e){var t=e.selectAll("."+Yl.cn.columnCell).data(PZe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Yl.cn.columnCell,!0),t.exit().remove(),t}function XXt(e){var t=e.selectAll("."+Yl.cn.cellRect).data(ac.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Yl.cn.cellRect,!0),t}function YXt(e){var t=e.selectAll("."+Yl.cn.cellText).data(ac.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Yl.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){Vc.event.stopPropagation()}),t}function KXt(e){var t=e.selectAll("."+Yl.cn.cellTextHolder).data(ac.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Yl.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function JXt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Xp(n.size,i,r),color:Xp(n.color,i,r),family:Xp(n.family,i,r),weight:Xp(n.weight,i,r),style:Xp(n.style,i,r),variant:Xp(n.variant,i,r),textcase:Xp(n.textcase,i,r),lineposition:Xp(n.lineposition,i,r),shadow:Xp(n.shadow,i,r)};t.rowNumber=t.key,t.align=Xp(t.calcdata.cells.align,i,r),t.cellBorderWidth=Xp(t.calcdata.cells.line.width,i,r),t.font=a})}function $Xt(e){e.each(function(t){u$.font(Vc.select(this),t.font)})}function QXt(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=Vc.select(this);MZe.stroke(r,Xp(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),MZe.fill(r,Xp(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function DZe(e,t,r,n){e.text(function(i){var a=i.column.specIndex,o=i.rowNumber,s=i.value,u=typeof s=="string",l=u&&s.match(/<br>/i),f=!u||l;i.mayHaveMarkup=u&&s.match(/[<&>]/);var c=eYt(s);i.latex=c;var h=c?"":Xp(i.calcdata.cells.prefix,a,o)||"",d=c?"":Xp(i.calcdata.cells.suffix,a,o)||"",p=c?null:Xp(i.calcdata.cells.format,a,o)||null,x=h+(p?UXt(p)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!f&&!c&&(b=CZe(x)),i.cellHeightMayIncrease=l||c||i.mayHaveMarkup||(b===void 0?CZe(x):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var y;if(i.wrappingNeeded){var k=Yl.wrapSplitCharacter===" "?x.replace(/<a href=/ig,"<a_href="):x,E=k.split(Yl.wrapSplitCharacter),A=Yl.wrapSplitCharacter===" "?E.map(function(L){return L.replace(/<a_href=/ig,"<a href=")}):E;i.fragments=A.map(function(L){return{text:L,width:null}}),i.fragments.push({fragment:Yl.wrapSpacer,width:null}),y=A.join(Yl.lineBreaker)+Yl.lineBreaker+Yl.wrapSpacer}else delete i.fragments,y=x;return y}).attr("dy",function(i){return i.needsConvertToTspans?0:"0.75em"}).each(function(i){var a=this,o=Vc.select(a),s=i.wrappingNeeded?nYt:aYt;i.needsConvertToTspans?VXt.convertToTspans(o,n,s(r,a,t,n,i)):Vc.select(a.parentNode).attr("transform",function(u){return oy(RZe(u),Yl.cellPad)}).attr("text-anchor",function(u){return{left:"start",center:"middle",right:"end"}[u.align]})})}function eYt(e){return typeof e=="string"&&e.match(Yl.latexCheck)}function CZe(e){return e.indexOf(Yl.wrapSplitCharacter)!==-1}function tYt(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 Xp(e,t,r){if(l$.isArrayOrTypedArray(e)){var n=e[Math.min(t,e.length-1)];return l$.isArrayOrTypedArray(n)?n[Math.min(r,n.length-1)]:n}else return e}function LZe(e,t,r){e.transition().ease(Yl.releaseTransitionEase).duration(Yl.releaseTransitionDuration).attr("transform",oy(t.x,r))}function p$(e){return e.type==="cells"}function rYt(e){return e.type==="header"}function c$(e){var t=e.rowBlocks.length?e.rowBlocks[0].auxiliaryBlocks:[];return t.reduce(function(r,n){return r+Hq(n,1/0)},0)}function iYt(e,t,r){for(var n=[],i=0,a=0;a<e.length;a++){for(var o=e[a],s=o.rows,u=0,l=0;l<s.length;l++)u+=s[l].rowHeight;o.allRowsHeight=u;var f=i+u,c=t,h=c+r;c<f&&h>i&&n.push(a),i+=u}return n}function v$(e,t,r){var n=IZe(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=h$(i,i.length),s=n.calcdata.groupHeight-c$(n),u=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),l=iYt(i,u,s);l.length===1&&(l[0]===i.length-1?l.unshift(l[0]-1):l.push(l[0]+1)),l[0]%2&&l.reverse(),t.each(function(f,c){f.page=l[c],f.scrollY=u}),t.attr("transform",function(f){var c=h$(f.rowBlocks,f.page)-f.scrollY;return oy(0,c)}),e&&(zZe(e,r,t,l,n.prevPages,n,0),zZe(e,r,t,l,n.prevPages,n,1),Yk(r,e))}}function Vq(e,t,r,n){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(c){return o.key===c.key}),u=r||o.scrollbarState.dragMultiplier,l=o.scrollY;o.scrollY=n===void 0?o.scrollY+u*Vc.event.dy:n;var f=s.selectAll("."+Yl.cn.yColumn).selectAll("."+Yl.cn.columnBlock).filter(p$);return v$(e,f,s),o.scrollY===l}}function zZe(e,t,r,n,i,a,o){var s=n[o]!==i[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var u=r.filter(function(l,f){return f===o&&n[f]!==i[f]});f$(e,t,u,r),i[o]=n[o]}))}function nYt(e,t,r,n){return function(){var a=Vc.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(x,b){s[b].width=this.getComputedTextLength()});var u=s[s.length-1].width,l=s.slice(0,-1),f=[],c,h,d=0,p=o.column.columnWidth-2*Yl.cellPad;for(o.value="";l.length;)c=l.shift(),h=c.width+u,d+h>p&&(o.value+=f.join(Yl.wrapSpacer)+Yl.lineBreaker,f=[],d=0),f.push(c.text),d+=h;d&&(o.value+=f.join(Yl.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),DZe(a.select("."+Yl.cn.cellText),r,e,n),Vc.select(t.parentNode.parentNode).call(y$)}}function aYt(e,t,r,n,i){return function(){if(!i.settledY){var o=Vc.select(t.parentNode),s=d$(i),u=i.key-s.firstRowIndex,l=s.rows[u].rowHeight,f=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Yl.cellPad:l,c=Math.max(f,l),h=c-s.rows[u].rowHeight;h&&(s.rows[u].rowHeight=c,e.selectAll("."+Yl.cn.columnCell).call(y$),v$(null,e.filter(p$),0),Yk(r,n,!0)),o.attr("transform",function(){var d=this,p=d.parentNode,x=p.getBoundingClientRect(),b=Vc.select(d.parentNode).select("."+Yl.cn.cellRect).node().getBoundingClientRect(),y=d.transform.baseVal.consolidate(),k=b.top-x.top+(y?y.matrix.f:Yl.cellPad);return oy(RZe(i,Vc.select(d.parentNode).select("."+Yl.cn.cellTextHolder).node().getBoundingClientRect().width),k)}),i.settledY=!0}}}function RZe(e,t){switch(e.align){case"left":return Yl.cellPad;case"right":return e.column.columnWidth-(t||0)-Yl.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Yl.cellPad}}function y$(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+Hq(s,1/0)},0),n=d$(t),i=Hq(n,t.key),a=i+r;return oy(0,a)}).selectAll("."+Yl.cn.cellRect).attr("height",function(t){return sYt(d$(t),t.key).rowHeight})}function h$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=oYt(e[n]);return r}function Hq(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 oYt(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 d$(e){return e.rowBlocks[e.page]}function sYt(e,t){return e.rows[t-e.firstRowIndex]}});var qZe=Se(Wq=>{"use strict";var lYt=Dd().getModuleCalcData,uYt=m$(),Gq="table";Wq.name=Gq;Wq.plot=function(e){var t=lYt(e.calcdata,Gq)[0];t.length&&uYt(e,t)};Wq.clean=function(e,t,r,n){var i=n._has&&n._has(Gq),a=t._has&&t._has(Gq);i&&!a&&n._paperdiv.selectAll(".table").remove()}});var OZe=Se((gbr,BZe)=>{"use strict";BZe.exports={attributes:t$(),supplyDefaults:hZe(),calc:pZe(),plot:m$(),moduleType:"trace",name:"table",basePlotModule:qZe(),categories:["noOpacity"],meta:{}}});var UZe=Se((_br,NZe)=>{"use strict";NZe.exports=OZe()});var jZe=Se((xbr,WZe)=>{"use strict";var VZe=uc(),HZe=Ih(),g$=Rd(),fYt=Gc().descriptionWithDates,cYt=_c().overrideAll,GZe=Id().dash,_$=vu().extendFlat;WZe.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:VZe({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:g$.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:_$({},g$.labelalias,{editType:"calc"}),tickfont:VZe({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"],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:fYt("tick label")},tickformatstops:cYt(g$.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:HZe.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:_$({},GZe,{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:_$({},GZe,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:HZe.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 Zq=Se((bbr,YZe)=>{"use strict";var hYt=uc(),ZZe=jZe(),XZe=Ih(),jq=hYt({editType:"calc"}),dYt=Zc().zorder;jq.family.dflt='"Open Sans", verdana, arial, sans-serif';jq.size.dflt=12;jq.color.dflt=XZe.defaultLine;YZe.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:ZZe,baxis:ZZe,font:jq,color:{valType:"color",dflt:XZe.defaultLine,editType:"plot"},zorder:dYt}});var $Ze=Se((wbr,JZe)=>{"use strict";var KZe=Zr().isArray1D;JZe.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||KZe(i))&&(!s||KZe(o))){var u=a?i.length:1/0;s&&(u=Math.min(u,o.length)),r.a&&r.a.length&&(u=Math.min(u,r.a.length)),r.b&&r.b.length&&(u=Math.min(u,r.b.length)),r._length=u}else r._length=null;return!0}});var tXe=Se((Tbr,eXe)=>{"use strict";var pYt=Zq(),QZe=Pl().addOpacity,vYt=Ul(),Kk=Zr(),yYt=xb(),mYt=e_(),gYt=t_(),_Yt=QP(),xYt=gm(),bYt=L3();eXe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=pYt[i+"axis"];function s(v,z){return Kk.coerce(t,r,o,v,z)}function u(v,z){return Kk.coerce2(t,r,o,v,z)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var l=s("type");if(l==="-"&&(n.data&&wYt(r,n.data),r.type==="-"?r.type="linear":l=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,l==="date"){var f=vYt.getComponentMethod("calendars","handleDefaults");f(t,r,"calendar",n.calendar)}xYt(r,n.fullLayout),r.c2p=Kk.identity;var c=s("color",n.dfltColor),h=c===t.color?c:a.color,d=s("title.text");d&&(Kk.coerceFont(s,"title.font",a,{overrideDflt:{size:Kk.bigFont(a.size),color:h}}),s("title.offset")),s("tickangle");var p=s("autorange",!r.isValidRange(t.range));p&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),yYt(t,r,s,l),gYt(t,r,s,l,n),mYt(t,r,s,l,n),_Yt(t,r,s,{data:n.data,dataAttr:i});var x=u("gridcolor",QZe(c,.3)),b=u("gridwidth"),y=u("griddash"),k=s("showgrid");k||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var E=u("startlinecolor",c),A=u("startlinewidth",b),L=s("startline",r.showgrid||!!E||!!A);L||(delete r.startlinecolor,delete r.startlinewidth);var _=u("endlinecolor",c),C=u("endlinewidth",b),M=s("endline",r.showgrid||!!_||!!C);return M||(delete r.endlinecolor,delete r.endlinewidth),k?(s("minorgridcount"),s("minorgridwidth",b),s("minorgriddash",y),s("minorgridcolor",QZe(x,.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 wYt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i=n+"calendar",a=e[i];e.type=bYt(t,a,{autotypenumbers:e.autotypenumbers})}}});var iXe=Se((Abr,rXe)=>{"use strict";var TYt=tXe(),AYt=_f();rXe.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")),SYt(t,r,n,a)};function SYt(e,t,r,n){var i=["aaxis","baxis"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},u=AYt.newContainer(t,a),l={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};TYt(s,u,l),u._categories=u._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var oXe=Se((Sbr,aXe)=>{"use strict";var nXe=Zr(),MYt=$Ze(),EYt=iXe(),kYt=Zq(),CYt=Ih();aXe.exports=function(t,r,n,i){function a(u,l){return nXe.coerce(t,r,kYt,u,l)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",CYt.defaultLine);if(nXe.coerceFont(a,"font",i.font),a("carpet"),EYt(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=MYt(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var x$=Se((Mbr,sXe)=>{"use strict";var LYt=Zr().isArrayOrTypedArray;sXe.exports=function(t,r,n){var i;for(LYt(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 b$=Se((Ebr,lXe)=>{"use strict";lXe.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 fXe=Se((kbr,uXe)=>{"use strict";uXe.exports=function(t,r,n,i,a,o){var s=a[0]*t.dpdx(r),u=a[1]*t.dpdy(n),l=1,f=1;if(o){var c=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])/c/h;f=Math.max(0,d)}var p=Math.atan2(u,s)*180/Math.PI;return p<-90?(p+=180,l=-l):p>90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(i,r,n),offsetMultplier:f}}});var gXe=Se((Cbr,mXe)=>{"use strict";var Jq=Nl(),Xq=yu(),Yq=x$(),dXe=b$(),Jk=fXe(),w$=Bf(),Uv=Zr(),pXe=Uv.strRotate,Kq=Uv.strTranslate,vXe=Qh();mXe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,u=t._fullLayout,l=u._clips;Uv.makeTraceGroups(i,n,"trace").each(function(f){var c=Jq.select(this),h=f[0],d=h.trace,p=d.aaxis,x=d.baxis,b=Uv.ensureSingle(c,"g","minorlayer"),y=Uv.ensureSingle(c,"g","majorlayer"),k=Uv.ensureSingle(c,"g","boundarylayer"),E=Uv.ensureSingle(c,"g","labellayer");c.style("opacity",d.opacity),FS(o,s,y,p,"a",p._gridlines,!0,a),FS(o,s,y,x,"b",x._gridlines,!0,a),FS(o,s,b,p,"a",p._minorgridlines,!0,a),FS(o,s,b,x,"b",x._minorgridlines,!0,a),FS(o,s,k,p,"a-boundary",p._boundarylines,a),FS(o,s,k,x,"b-boundary",x._boundarylines,a);var A=cXe(t,o,s,d,h,E,p._labels,"a-label"),L=cXe(t,o,s,d,h,E,x._labels,"b-label");PYt(t,E,d,h,o,s,A,L),zYt(d,h,l,o,s)})};function zYt(e,t,r,n,i){var a,o,s,u,l=r.select("#"+e._clipPathId);l.size()||(l=r.append("clipPath").classed("carpetclip",!0));var f=Uv.ensureSingle(l,"path","carpetboundary"),c=t.clipsegments,h=[];for(u=0;u<c.length;u++)a=c[u],o=Yq([],a.x,n.c2p),s=Yq([],a.y,i.c2p),h.push(dXe(o,s,a.bicubic));var d="M"+h.join("L")+"Z";l.attr("id",e._clipPathId),f.attr("d",d)}function FS(e,t,r,n,i,a,o){var s="const-"+i+"-lines",u=r.selectAll("."+s).data(a);u.enter().append("path").classed(s,!0).style("vector-effect",o?"none":"non-scaling-stroke"),u.each(function(l){var f=l,c=f.x,h=f.y,d=Yq([],c,e.c2p),p=Yq([],h,t.c2p),x="M"+dXe(d,p,f.smoothing),b=Jq.select(this);b.attr("d",x).style("stroke-width",f.width).style("stroke",f.color).style("stroke-dasharray",Xq.dashStyle(f.dash,f.width)).style("fill","none")}),u.exit().remove()}function cXe(e,t,r,n,i,a,o,s){var u=a.selectAll("text."+s).data(o);u.enter().append("text").classed(s,!0);var l=0,f={};return u.each(function(c,h){var d;if(c.axis.tickangle==="auto")d=Jk(n,t,r,c.xy,c.dxy);else{var p=(c.axis.tickangle+180)*Math.PI/180;d=Jk(n,t,r,c.xy,[Math.cos(p),Math.sin(p)])}h||(f={angle:d.angle,flip:d.flip});var x=(c.endAnchor?-1:1)*d.flip,b=Jq.select(this).attr({"text-anchor":x>0?"start":"end","data-notex":1}).call(Xq.font,c.font).text(c.text).call(w$.convertToTspans,e),y=Xq.bBox(this);b.attr("transform",Kq(d.p[0],d.p[1])+pXe(d.angle)+Kq(c.axis.labelpadding*x,y.height*.3)),l=Math.max(l,y.width+c.axis.labelpadding)}),u.exit().remove(),f.maxExtent=l,f}function PYt(e,t,r,n,i,a,o,s){var u,l,f,c,h=Uv.aggNums(Math.min,null,r.a),d=Uv.aggNums(Math.max,null,r.a),p=Uv.aggNums(Math.min,null,r.b),x=Uv.aggNums(Math.max,null,r.b);u=.5*(h+d),l=p,f=r.ab2xy(u,l,!0),c=r.dxyda_rough(u,l),o.angle===void 0&&Uv.extendFlat(o,Jk(r,i,a,f,r.dxydb_rough(u,l))),hXe(e,t,r,n,f,c,r.aaxis,i,a,o,"a-title"),u=h,l=.5*(p+x),f=r.ab2xy(u,l,!0),c=r.dxydb_rough(u,l),s.angle===void 0&&Uv.extendFlat(s,Jk(r,i,a,f,r.dxyda_rough(u,l))),hXe(e,t,r,n,f,c,r.baxis,i,a,s,"b-title")}var yXe=vXe.LINE_SPACING,IYt=(1-vXe.MID_SHIFT)/yXe+1;function hXe(e,t,r,n,i,a,o,s,u,l,f){var c=[];o.title.text&&c.push(o.title.text);var h=t.selectAll("text."+f).data(c),d=l.maxExtent;h.enter().append("text").classed(f,!0),h.each(function(){var p=Jk(r,s,u,i,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var x=o.title.font.size;d+=x+o.title.offset;var b=l.angle+(l.flip<0?180:0),y=(b-p.angle+450)%360,k=y>90&&y<270,E=Jq.select(this);E.text(o.title.text).call(w$.convertToTspans,e),k&&(d=(-w$.lineCount(E)+IYt)*yXe*x-d),E.attr("transform",Kq(p.p[0],p.p[1])+pXe(p.angle)+Kq(0,d)).attr("text-anchor","middle").call(Xq.font,o.title.font)}),h.exit().remove()}});var xXe=Se((Lbr,_Xe)=>{"use strict";var $q=Zr().isArrayOrTypedArray;_Xe.exports=function(e,t,r){var n,i,a,o,s,u,l=[],f=$q(e)?e.length:e,c=$q(t)?t.length:t,h=$q(e)?e:null,d=$q(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(f-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(c-1));var p,x=1/0,b=-1/0;for(i=0;i<c;i++)for(l[i]=[],u=d?(d[i]-d[0])*o:i/(c-1),n=0;n<f;n++)s=h?(h[n]-h[0])*a:n/(f-1),p=s-u*r,x=Math.min(p,x),b=Math.max(p,b),l[i][n]=p;var y=1/(b-x),k=-x*y;for(i=0;i<c;i++)for(n=0;n<f;n++)l[i][n]=y*l[i][n]+k;return l}});var AXe=Se((zbr,TXe)=>{"use strict";var bXe=Zr().isArrayOrTypedArray;TXe.exports=function(e){return wXe(e,0)};function wXe(e,t){if(!bXe(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(bXe(o)){var s=wXe(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 MXe=Se((Pbr,SXe)=>{"use strict";var DYt=hu(),Ex=vu().extendFlat;SXe.exports=function(t,r,n){var i,a,o,s,u,l,f,c,h,d,p,x,b,y,k=t["_"+r],E=t[r+"axis"],A=E._gridlines=[],L=E._minorgridlines=[],_=E._boundarylines=[],C=t["_"+n],M=t[n+"axis"];E.tickmode==="array"&&(E.tickvals=k.slice());var v=t._xctrl,z=t._yctrl,T=v[0].length,F=v.length,q=t._a.length,U=t._b.length;DYt.prepTicks(E),E.tickmode==="array"&&delete E.tickvals;var H=E.smoothing?3:1;function j(O){var W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re=[],me=[],Be={};if(r==="b")for(re=t.b2j(O),ne=Math.floor(Math.max(0,Math.min(U-2,re))),be=re-ne,Be.length=U,Be.crossLength=q,Be.xy=function(fe){return t.evalxy([],fe,re)},Be.dxy=function(fe,Ze){return t.dxydi([],fe,ne,Ze,be)},W=0;W<q;W++)Ce=Math.min(q-2,W),he=W-Ce,te=t.evalxy([],W,re),M.smoothing&&W>0&&(ke=t.dxydi([],W-1,ne,0,be),Re.push(ze[0]+ke[0]/3),me.push(ze[1]+ke[1]/3),Ee=t.dxydi([],W-1,ne,1,be),Re.push(te[0]-Ee[0]/3),me.push(te[1]-Ee[1]/3)),Re.push(te[0]),me.push(te[1]),ze=te;else for(W=t.a2i(O),Ce=Math.floor(Math.max(0,Math.min(q-2,W))),he=W-Ce,Be.length=q,Be.crossLength=U,Be.xy=function(fe){return t.evalxy([],W,fe)},Be.dxy=function(fe,Ze){return t.dxydj([],Ce,fe,he,Ze)},re=0;re<U;re++)ne=Math.min(U-2,re),be=re-ne,te=t.evalxy([],W,re),M.smoothing&&re>0&&(Me=t.dxydj([],Ce,re-1,he,0),Re.push(ze[0]+Me[0]/3),me.push(ze[1]+Me[1]/3),Oe=t.dxydj([],Ce,re-1,he,1),Re.push(te[0]-Oe[0]/3),me.push(te[1]-Oe[1]/3)),Re.push(te[0]),me.push(te[1]),ze=te;return Be.axisLetter=r,Be.axis=E,Be.crossAxis=M,Be.value=O,Be.constvar=n,Be.index=c,Be.x=Re,Be.y=me,Be.smoothing=M.smoothing,Be}function G(O){var W,re,ne,be,ze,Ce=[],he=[],te={};if(te.length=k.length,te.crossLength=C.length,r==="b")for(ne=Math.max(0,Math.min(U-2,O)),ze=Math.min(1,Math.max(0,O-ne)),te.xy=function(ke){return t.evalxy([],ke,O)},te.dxy=function(ke,Ee){return t.dxydi([],ke,ne,Ee,ze)},W=0;W<T;W++)Ce[W]=v[O*H][W],he[W]=z[O*H][W];else for(re=Math.max(0,Math.min(q-2,O)),be=Math.min(1,Math.max(0,O-re)),te.xy=function(ke){return t.evalxy([],O,ke)},te.dxy=function(ke,Ee){return t.dxydj([],re,ke,be,Ee)},W=0;W<F;W++)Ce[W]=v[W][O*H],he[W]=z[W][O*H];return te.axisLetter=r,te.axis=E,te.crossAxis=M,te.value=k[O],te.constvar=n,te.index=O,te.x=Ce,te.y=he,te.smoothing=M.smoothing,te}if(E.tickmode==="array"){for(s=5e-15,u=[Math.floor((k.length-1-E.arraytick0)/E.arraydtick*(1+s)),Math.ceil(-E.arraytick0/E.arraydtick/(1+s))].sort(function(O,W){return O-W}),l=u[0]-1,f=u[1]+1,c=l;c<f;c++)a=E.arraytick0+E.arraydtick*c,!(a<0||a>k.length-1)&&A.push(Ex(G(a),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(c=l;c<f;c++)if(o=E.arraytick0+E.arraydtick*c,p=Math.min(o+E.arraydtick,k.length-1),!(o<0||o>k.length-1)&&!(p<0||p>k.length-1))for(x=k[o],b=k[p],i=0;i<E.minorgridcount;i++)y=p-o,!(y<=0)&&(d=x+(b-x)*(i+1)/(E.minorgridcount+1)*(E.arraydtick/y),!(d<k[0]||d>k[k.length-1])&&L.push(Ex(j(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&_.push(Ex(G(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&_.push(Ex(G(k.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(s=5e-15,u=[Math.floor((k[k.length-1]-E.tick0)/E.dtick*(1+s)),Math.ceil((k[0]-E.tick0)/E.dtick/(1+s))].sort(function(O,W){return O-W}),l=u[0],f=u[1],c=l;c<=f;c++)h=E.tick0+E.dtick*c,A.push(Ex(j(h),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(c=l-1;c<f+1;c++)for(h=E.tick0+E.dtick*c,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(Ex(j(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&_.push(Ex(j(k[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&_.push(Ex(j(k[k.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}});var LXe=Se((Ibr,CXe)=>{"use strict";var EXe=hu(),kXe=vu().extendFlat;CXe.exports=function(t,r){var n,i,a,o,s,u=r._labels=[],l=r._gridlines;for(n=0;n<l.length;n++)s=l[n],["start","both"].indexOf(r.showticklabels)!==-1&&(i=EXe.tickText(r,s.value),kXe(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===l.length-1}),u.push(i)),["end","both"].indexOf(r.showticklabels)!==-1&&(i=EXe.tickText(r,s.value),kXe(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===l.length-1}),u.push(i))}});var PXe=Se((Dbr,zXe)=>{"use strict";zXe.exports=function(t,r,n,i){var a,o,s,u=[],l=!!n.smoothing,f=!!i.smoothing,c=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=c;a++)o[a]=t[0][a],s[a]=r[0][a];for(u.push({x:o,y:s,bicubic:l}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][c],s[a]=r[a][c];for(u.push({x:o,y:s,bicubic:f}),a=c,o=[],s=[];a>=0;a--)o[c-a]=t[h][a],s[c-a]=r[h][a];for(u.push({x:o,y:s,bicubic:l}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return u.push({x:o,y:s,bicubic:f}),u}});var DXe=Se((Rbr,IXe)=>{"use strict";var RYt=Zr();IXe.exports=function(t,r,n){var i,a,o,s=[],u=[],l=t[0].length,f=t.length;function c(ne,be){var ze=0,Ce,he=0;return ne>0&&(Ce=t[be][ne-1])!==void 0&&(he++,ze+=Ce),ne<l-1&&(Ce=t[be][ne+1])!==void 0&&(he++,ze+=Ce),be>0&&(Ce=t[be-1][ne])!==void 0&&(he++,ze+=Ce),be<f-1&&(Ce=t[be+1][ne])!==void 0&&(he++,ze+=Ce),ze/Math.max(1,he)}var h=0;for(i=0;i<l;i++)for(a=0;a<f;a++)t[a][i]===void 0&&(s.push(i),u.push(a),t[a][i]=c(i,a)),h=Math.max(h,Math.abs(t[a][i]));if(!s.length)return t;var d,p,x,b,y,k,E,A,L,_,C,M=1e-5,v=0,z=100,T=0,F=s.length;do{for(v=0,o=0;o<F;o++){i=s[o],a=u[o];var q=0,U=0,H,j,G,O,W,re;i===0?(W=Math.min(l-1,2),G=r[W],O=r[1],H=t[a][W],j=t[a][1],U+=j+(j-H)*(r[0]-O)/(O-G),q++):i===l-1&&(W=Math.max(0,l-3),G=r[W],O=r[l-2],H=t[a][W],j=t[a][l-2],U+=j+(j-H)*(r[l-1]-O)/(O-G),q++),(i===0||i===l-1)&&a>0&&a<f-1&&(d=n[a+1]-n[a],p=n[a]-n[a-1],U+=(p*t[a+1][i]+d*t[a-1][i])/(p+d),q++),a===0?(re=Math.min(f-1,2),G=n[re],O=n[1],H=t[re][i],j=t[1][i],U+=j+(j-H)*(n[0]-O)/(O-G),q++):a===f-1&&(re=Math.max(0,f-3),G=n[re],O=n[f-2],H=t[re][i],j=t[f-2][i],U+=j+(j-H)*(n[f-1]-O)/(O-G),q++),(a===0||a===f-1)&&i>0&&i<l-1&&(d=r[i+1]-r[i],p=r[i]-r[i-1],U+=(p*t[a][i+1]+d*t[a][i-1])/(p+d),q++),q?U/=q:(x=r[i+1]-r[i],b=r[i]-r[i-1],y=n[a+1]-n[a],k=n[a]-n[a-1],E=x*b*(x+b),A=y*k*(y+k),U=(E*(k*t[a+1][i]+y*t[a-1][i])+A*(b*t[a][i+1]+x*t[a][i-1]))/(A*(b+x)+E*(k+y))),L=U-t[a][i],_=L/h,v+=_*_,C=q?0:.85,t[a][i]+=L*(1+C)}v=Math.sqrt(v)}while(T++<z&&v>M);return RYt.log("Smoother converged to",v,"after",T,"iterations"),t}});var FXe=Se((Fbr,RXe)=>{"use strict";RXe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var OXe=Se((qbr,BXe)=>{"use strict";var qXe=.5;BXe.exports=function(t,r,n,i){var a=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],u=n[1]-r[1],l=Math.pow(a*a+o*o,qXe/2),f=Math.pow(s*s+u*u,qXe/2),c=(f*f*a-l*l*s)*i,h=(f*f*o-l*l*u)*i,d=f*(l+f)*3,p=l*(l+f)*3;return[[r[0]+(d&&c/d),r[1]+(d&&h/d)],[r[0]-(p&&c/p),r[1]-(p&&h/p)]]}});var UXe=Se((Bbr,NXe)=>{"use strict";var T$=OXe(),Qq=Zr().ensureArray;function qS(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]}NXe.exports=function(t,r,n,i,a,o){var s,u,l,f,c,h,d,p,x,b,y=n[0].length,k=n.length,E=a?3*y-2:y,A=o?3*k-2:k;for(t=Qq(t,A),r=Qq(r,A),l=0;l<A;l++)t[l]=Qq(t[l],E),r[l]=Qq(r[l],E);for(u=0,f=0;u<k;u++,f+=o?3:1)for(c=t[f],h=r[f],d=n[u],p=i[u],s=0,l=0;s<y;s++,l+=a?3:1)c[l]=d[s],h[l]=p[s];if(a)for(u=0,f=0;u<k;u++,f+=o?3:1){for(s=1,l=3;s<y-1;s++,l+=3)x=T$([n[u][s-1],i[u][s-1]],[n[u][s],i[u][s]],[n[u][s+1],i[u][s+1]],a),t[f][l-1]=x[0][0],r[f][l-1]=x[0][1],t[f][l+1]=x[1][0],r[f][l+1]=x[1][1];b=qS([t[f][0],r[f][0]],[t[f][2],r[f][2]],[t[f][3],r[f][3]]),t[f][1]=b[0],r[f][1]=b[1],b=qS([t[f][E-1],r[f][E-1]],[t[f][E-3],r[f][E-3]],[t[f][E-4],r[f][E-4]]),t[f][E-2]=b[0],r[f][E-2]=b[1]}if(o)for(l=0;l<E;l++){for(f=3;f<A-3;f+=3)x=T$([t[f-3][l],r[f-3][l]],[t[f][l],r[f][l]],[t[f+3][l],r[f+3][l]],o),t[f-1][l]=x[0][0],r[f-1][l]=x[0][1],t[f+1][l]=x[1][0],r[f+1][l]=x[1][1];b=qS([t[0][l],r[0][l]],[t[2][l],r[2][l]],[t[3][l],r[3][l]]),t[1][l]=b[0],r[1][l]=b[1],b=qS([t[A-1][l],r[A-1][l]],[t[A-3][l],r[A-3][l]],[t[A-4][l],r[A-4][l]]),t[A-2][l]=b[0],r[A-2][l]=b[1]}if(a&&o)for(f=1;f<A;f+=(f+1)%3===0?2:1){for(l=3;l<E-3;l+=3)x=T$([t[f][l-3],r[f][l-3]],[t[f][l],r[f][l]],[t[f][l+3],r[f][l+3]],a),t[f][l-1]=.5*(t[f][l-1]+x[0][0]),r[f][l-1]=.5*(r[f][l-1]+x[0][1]),t[f][l+1]=.5*(t[f][l+1]+x[1][0]),r[f][l+1]=.5*(r[f][l+1]+x[1][1]);b=qS([t[f][0],r[f][0]],[t[f][2],r[f][2]],[t[f][3],r[f][3]]),t[f][1]=.5*(t[f][1]+b[0]),r[f][1]=.5*(r[f][1]+b[1]),b=qS([t[f][E-1],r[f][E-1]],[t[f][E-3],r[f][E-3]],[t[f][E-4],r[f][E-4]]),t[f][E-2]=.5*(t[f][E-2]+b[0]),r[f][E-2]=.5*(r[f][E-2]+b[1])}return[t,r]}});var HXe=Se((Obr,VXe)=>{"use strict";VXe.exports=function(e,t,r,n,i){var a=t-2,o=r-2;return n&&i?function(s,u,l){s||(s=[]);var f,c,h,d,p,x,b=Math.max(0,Math.min(Math.floor(u),a)),y=Math.max(0,Math.min(Math.floor(l),o)),k=Math.max(0,Math.min(1,u-b)),E=Math.max(0,Math.min(1,l-y));b*=3,y*=3;var A=k*k,L=A*k,_=1-k,C=_*_,M=C*_,v=E*E,z=v*E,T=1-E,F=T*T,q=F*T;for(x=0;x<e.length;x++)p=e[x],f=M*p[y][b]+3*(C*k*p[y][b+1]+_*A*p[y][b+2])+L*p[y][b+3],c=M*p[y+1][b]+3*(C*k*p[y+1][b+1]+_*A*p[y+1][b+2])+L*p[y+1][b+3],h=M*p[y+2][b]+3*(C*k*p[y+2][b+1]+_*A*p[y+2][b+2])+L*p[y+2][b+3],d=M*p[y+3][b]+3*(C*k*p[y+3][b+1]+_*A*p[y+3][b+2])+L*p[y+3][b+3],s[x]=q*f+3*(F*E*c+T*v*h)+z*d;return s}:n?function(s,u,l){s||(s=[]);var f=Math.max(0,Math.min(Math.floor(u),a)),c=Math.max(0,Math.min(Math.floor(l),o)),h=Math.max(0,Math.min(1,u-f)),d=Math.max(0,Math.min(1,l-c)),p,x,b,y,k,E;f*=3;var A=h*h,L=A*h,_=1-h,C=_*_,M=C*_,v=1-d;for(k=0;k<e.length;k++)E=e[k],p=v*E[c][f]+d*E[c+1][f],x=v*E[c][f+1]+d*E[c+1][f+1],b=v*E[c][f+2]+d*E[c+1][f+1],y=v*E[c][f+3]+d*E[c+1][f+1],s[k]=M*p+3*(C*h*x+_*A*b)+L*y;return s}:i?function(s,u,l){s||(s=[]);var f=Math.max(0,Math.min(Math.floor(u),a)),c=Math.max(0,Math.min(Math.floor(l),o)),h=Math.max(0,Math.min(1,u-f)),d=Math.max(0,Math.min(1,l-c)),p,x,b,y,k,E;c*=3;var A=d*d,L=A*d,_=1-d,C=_*_,M=C*_,v=1-h;for(k=0;k<e.length;k++)E=e[k],p=v*E[c][f]+h*E[c][f+1],x=v*E[c+1][f]+h*E[c+1][f+1],b=v*E[c+2][f]+h*E[c+2][f+1],y=v*E[c+3][f]+h*E[c+3][f+1],s[k]=M*p+3*(C*d*x+_*A*b)+L*y;return s}:function(s,u,l){s||(s=[]);var f=Math.max(0,Math.min(Math.floor(u),a)),c=Math.max(0,Math.min(Math.floor(l),o)),h=Math.max(0,Math.min(1,u-f)),d=Math.max(0,Math.min(1,l-c)),p,x,b,y,k=1-d,E=1-h;for(b=0;b<e.length;b++)y=e[b],p=E*y[c][f]+h*y[c][f+1],x=E*y[c+1][f]+h*y[c+1][f+1],s[b]=k*p+d*x;return s}}});var WXe=Se((Nbr,GXe)=>{"use strict";GXe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var u,l,f,c,h,d;i*=3,a*=3;var p=o*o,x=1-o,b=x*x,y=x*o*2,k=-3*b,E=3*(b-y),A=3*(y-p),L=3*p,_=s*s,C=_*s,M=1-s,v=M*M,z=v*M;for(d=0;d<e.length;d++)h=e[d],u=k*h[a][i]+E*h[a][i+1]+A*h[a][i+2]+L*h[a][i+3],l=k*h[a+1][i]+E*h[a+1][i+1]+A*h[a+1][i+2]+L*h[a+1][i+3],f=k*h[a+2][i]+E*h[a+2][i+1]+A*h[a+2][i+2]+L*h[a+2][i+3],c=k*h[a+3][i]+E*h[a+3][i+1]+A*h[a+3][i+2]+L*h[a+3][i+3],n[d]=z*u+3*(v*s*l+M*_*f)+C*c;return n}:t?function(n,i,a,o,s){n||(n=[]);var u,l,f,c;i*=3;var h=o*o,d=1-o,p=d*d,x=d*o*2,b=-3*p,y=3*(p-x),k=3*(x-h),E=3*h,A=1-s;for(f=0;f<e.length;f++)c=e[f],u=b*c[a][i]+y*c[a][i+1]+k*c[a][i+2]+E*c[a][i+3],l=b*c[a+1][i]+y*c[a+1][i+1]+k*c[a+1][i+2]+E*c[a+1][i+3],n[f]=A*u+s*l;return n}:r?function(n,i,a,o,s){n||(n=[]);var u,l,f,c,h,d;a*=3;var p=s*s,x=p*s,b=1-s,y=b*b,k=y*b;for(h=0;h<e.length;h++)d=e[h],u=d[a][i+1]-d[a][i],l=d[a+1][i+1]-d[a+1][i],f=d[a+2][i+1]-d[a+2][i],c=d[a+3][i+1]-d[a+3][i],n[h]=k*u+3*(y*s*l+b*p*f)+x*c;return n}:function(n,i,a,o,s){n||(n=[]);var u,l,f,c,h=1-s;for(f=0;f<e.length;f++)c=e[f],u=c[a][i+1]-c[a][i],l=c[a+1][i+1]-c[a+1][i],n[f]=h*u+s*l;return n}}});var ZXe=Se((Ubr,jXe)=>{"use strict";jXe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var u,l,f,c,h,d;i*=3,a*=3;var p=o*o,x=p*o,b=1-o,y=b*b,k=y*b,E=s*s,A=1-s,L=A*A,_=A*s*2,C=-3*L,M=3*(L-_),v=3*(_-E),z=3*E;for(d=0;d<e.length;d++)h=e[d],u=C*h[a][i]+M*h[a+1][i]+v*h[a+2][i]+z*h[a+3][i],l=C*h[a][i+1]+M*h[a+1][i+1]+v*h[a+2][i+1]+z*h[a+3][i+1],f=C*h[a][i+2]+M*h[a+1][i+2]+v*h[a+2][i+2]+z*h[a+3][i+2],c=C*h[a][i+3]+M*h[a+1][i+3]+v*h[a+2][i+3]+z*h[a+3][i+3],n[d]=k*u+3*(y*o*l+b*p*f)+x*c;return n}:t?function(n,i,a,o,s){n||(n=[]);var u,l,f,c,h,d;i*=3;var p=s*s,x=p*s,b=1-s,y=b*b,k=y*b;for(h=0;h<e.length;h++)d=e[h],u=d[a+1][i]-d[a][i],l=d[a+1][i+1]-d[a][i+1],f=d[a+1][i+2]-d[a][i+2],c=d[a+1][i+3]-d[a][i+3],n[h]=k*u+3*(y*s*l+b*p*f)+x*c;return n}:r?function(n,i,a,o,s){n||(n=[]);var u,l,f,c;a*=3;var h=1-o,d=s*s,p=1-s,x=p*p,b=p*s*2,y=-3*x,k=3*(x-b),E=3*(b-d),A=3*d;for(f=0;f<e.length;f++)c=e[f],u=y*c[a][i]+k*c[a+1][i]+E*c[a+2][i]+A*c[a+3][i],l=y*c[a][i+1]+k*c[a+1][i+1]+E*c[a+2][i+1]+A*c[a+3][i+1],n[f]=h*u+o*l;return n}:function(n,i,a,o,s){n||(n=[]);var u,l,f,c,h=1-o;for(f=0;f<e.length;f++)c=e[f],u=c[a+1][i]-c[a][i],l=c[a+1][i+1]-c[a][i+1],n[f]=h*u+o*l;return n}}});var JXe=Se((Vbr,KXe)=>{"use strict";var XXe=FXe(),YXe=EL().findBin,FYt=UXe(),qYt=HXe(),BYt=WXe(),OYt=ZXe();KXe.exports=function(t){var r=t._a,n=t._b,i=r.length,a=n.length,o=t.aaxis,s=t.baxis,u=r[0],l=r[i-1],f=n[0],c=n[a-1],h=r[r.length-1]-r[0],d=n[n.length-1]-n[0],p=h*XXe.RELATIVE_CULL_TOLERANCE,x=d*XXe.RELATIVE_CULL_TOLERANCE;u-=p,l+=p,f-=x,c+=x,t.isVisible=function(b,y){return b>u&&b<l&&y>f&&y<c},t.isOccluded=function(b,y){return b<u||b>l||y<f||y>c},t.setScale=function(){var b=t._x,y=t._y,k=FYt(t._xctrl,t._yctrl,b,y,o.smoothing,s.smoothing);t._xctrl=k[0],t._yctrl=k[1],t.evalxy=qYt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=BYt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=OYt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var y=Math.max(0,Math.floor(b[0]),i-2),k=b[0]-y;return(1-k)*r[y]+k*r[y+1]},t.j2b=function(b){var y=Math.max(0,Math.floor(b[1]),i-2),k=b[1]-y;return(1-k)*n[y]+k*n[y+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var y=Math.max(0,Math.min(YXe(b,r),i-2)),k=r[y],E=r[y+1];return Math.max(0,Math.min(i-1,y+(b-k)/(E-k)))},t.b2j=function(b){var y=Math.max(0,Math.min(YXe(b,n),a-2)),k=n[y],E=n[y+1];return Math.max(0,Math.min(a-1,y+(b-k)/(E-k)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,y){return t.evalxy([],b,y)},t.ab2xy=function(b,y,k){if(!k&&(b<r[0]||b>r[i-1]|y<n[0]||y>n[a-1]))return[!1,!1];var E=t.a2i(b),A=t.b2j(y),L=t.evalxy([],E,A);if(k){var _=0,C=0,M=[],v,z,T,F;b<r[0]?(v=0,z=0,_=(b-r[0])/(r[1]-r[0])):b>r[i-1]?(v=i-2,z=1,_=(b-r[i-1])/(r[i-1]-r[i-2])):(v=Math.max(0,Math.min(i-2,Math.floor(E))),z=E-v),y<n[0]?(T=0,F=0,C=(y-n[0])/(n[1]-n[0])):y>n[a-1]?(T=a-2,F=1,C=(y-n[a-1])/(n[a-1]-n[a-2])):(T=Math.max(0,Math.min(a-2,Math.floor(A))),F=A-T),_&&(t.dxydi(M,v,T,z,F),L[0]+=M[0]*_,L[1]+=M[1]*_),C&&(t.dxydj(M,v,T,z,F),L[0]+=M[0]*C,L[1]+=M[1]*C)}return L},t.c2p=function(b,y,k){return[y.c2p(b[0]),k.c2p(b[1])]},t.p2x=function(b,y,k){return[y.p2c(b[0]),k.p2c(b[1])]},t.dadi=function(b){var y=Math.max(0,Math.min(r.length-2,b));return r[y+1]-r[y]},t.dbdj=function(b){var y=Math.max(0,Math.min(n.length-2,b));return n[y+1]-n[y]},t.dxyda=function(b,y,k,E){var A=t.dxydi(null,b,y,k,E),L=t.dadi(b,k);return[A[0]/L,A[1]/L]},t.dxydb=function(b,y,k,E){var A=t.dxydj(null,b,y,k,E),L=t.dbdj(y,E);return[A[0]/L,A[1]/L]},t.dxyda_rough=function(b,y,k){var E=h*(k||.1),A=t.ab2xy(b+E,y,!0),L=t.ab2xy(b-E,y,!0);return[(A[0]-L[0])*.5/E,(A[1]-L[1])*.5/E]},t.dxydb_rough=function(b,y,k){var E=d*(k||.1),A=t.ab2xy(b,y+E,!0),L=t.ab2xy(b,y-E,!0);return[(A[0]-L[0])*.5/E,(A[1]-L[1])*.5/E]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var aYe=Se((Hbr,nYe)=>{"use strict";var e8=hu(),$Xe=Zr().isArray1D,NYt=xXe(),QXe=AXe(),eYe=MXe(),tYe=LXe(),UYt=PXe(),rYe=$I(),iYe=DXe(),VYt=KI(),HYt=JXe();nYe.exports=function(t,r){var n=e8.getFromId(t,r.xaxis),i=e8.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,u=r.y,l=[];s&&$Xe(s)&&l.push("x"),u&&$Xe(u)&&l.push("y"),l.length&&VYt(r,a,o,"a","b",l);var f=r._a=r._a||r.a,c=r._b=r._b||r.b;s=r._x||r.x,u=r._y||r.y;var h={};if(r._cheater){var d=a.cheatertype==="index"?f.length:f,p=o.cheatertype==="index"?c.length:c;s=NYt(d,p,r.cheaterslope)}r._x=s=rYe(s),r._y=u=rYe(u),iYe(s,f,c),iYe(u,f,c),HYt(r),r.setScale();var x=QXe(s),b=QXe(u),y=.5*(x[1]-x[0]),k=.5*(x[1]+x[0]),E=.5*(b[1]-b[0]),A=.5*(b[1]+b[0]),L=1.3;return x=[k-y*L,k+y*L],b=[A-E*L,A+E*L],r._extremes[n._id]=e8.findExtremes(n,x,{padded:!0}),r._extremes[i._id]=e8.findExtremes(i,b,{padded:!0}),eYe(r,"a","b"),eYe(r,"b","a"),tYe(r,a),tYe(r,o),h.clipsegments=UYt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=u,h.a=f,h.b=c,[h]}});var sYe=Se((Gbr,oYe)=>{"use strict";oYe.exports={attributes:Zq(),supplyDefaults:oXe(),plot:gXe(),calc:aYe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Th(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var uYe=Se((Wbr,lYe)=>{"use strict";lYe.exports=sYe()});var A$=Se((jbr,cYe)=>{"use strict";var GYt=Ey(),u0=Zc(),WYt=zf(),jYt=Du().hovertemplateAttrs,ZYt=Du().texttemplateAttrs,fYe=Xf(),kx=vu().extendFlat,sy=u0.marker,BS=u0.line,XYt=sy.line;cYe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:kx({},u0.mode,{dflt:"markers"}),text:kx({},u0.text,{}),texttemplate:ZYt({editType:"plot"},{keys:["a","b","text"]}),hovertext:kx({},u0.hovertext,{}),line:{color:BS.color,width:BS.width,dash:BS.dash,backoff:BS.backoff,shape:kx({},BS.shape,{values:["linear","spline"]}),smoothing:BS.smoothing,editType:"calc"},connectgaps:u0.connectgaps,fill:kx({},u0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:GYt(),marker:kx({symbol:sy.symbol,opacity:sy.opacity,maxdisplayed:sy.maxdisplayed,angle:sy.angle,angleref:sy.angleref,standoff:sy.standoff,size:sy.size,sizeref:sy.sizeref,sizemin:sy.sizemin,sizemode:sy.sizemode,line:kx({width:XYt.width,editType:"calc"},fYe("marker.line")),gradient:sy.gradient,editType:"calc"},fYe("marker")),textfont:u0.textfont,textposition:u0.textposition,selected:u0.selected,unselected:u0.unselected,hoverinfo:kx({},WYt.hoverinfo,{flags:["a","b","text","name"]}),hoveron:u0.hoveron,hovertemplate:jYt(),zorder:u0.zorder}});var vYe=Se((Zbr,pYe)=>{"use strict";var hYe=Zr(),YYt=Sm(),OS=ec(),KYt=$v(),JYt=I0(),dYe=J3(),$Yt=D0(),QYt=Py(),eKt=A$();pYe.exports=function(t,r,n,i){function a(h,d){return hYe.coerce(t,r,eKt,h,d)}a("carpet"),r.xaxis="x",r.yaxis="y";var o=a("a"),s=a("b"),u=Math.min(o.length,s.length);if(!u){r.visible=!1;return}r._length=u,a("text"),a("texttemplate"),a("hovertext");var l=u<YYt.PTS_LINESONLY?"lines+markers":"lines";a("mode",l),OS.hasMarkers(r)&&KYt(t,r,n,i,a,{gradient:!0}),OS.hasLines(r)&&(JYt(t,r,n,i,a,{backoff:!0}),dYe(t,r,a),a("connectgaps")),OS.hasText(r)&&$Yt(t,r,i,a);var f=[];(OS.hasMarkers(r)||OS.hasText(r))&&(a("marker.maxdisplayed"),f.push("points")),a("fill"),r.fill!=="none"&&(QYt(t,r,n,a),OS.hasLines(r)||dYe(t,r,a)),(r.fill==="tonext"||r.fill==="toself")&&f.push("fills");var c=a("hoveron",f.join("+")||"points");c!=="fills"&&a("hovertemplate"),a("zorder"),hYe.coerceSelectionMarkerOpacity(r,a)}});var mYe=Se((Xbr,yYe)=>{"use strict";yYe.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,u=Math.floor(a[1]),l=a[1]-u,f=i.evalxy([],o,u,s,l);return n.yLabel=f[1].toFixed(3),n}});var t8=Se((Ybr,gYe)=>{"use strict";gYe.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 bYe=Se((Kbr,xYe)=>{"use strict";var _Ye=_u(),tKt=R0(),rKt=km(),iKt=F0(),nKt=q0().calcMarkerSize,aKt=t8();xYe.exports=function(t,r){var n=r._carpetTrace=aKt(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,u,l=!1;for(i=0;i<a;i++)if(s=r.a[i],u=r.b[i],_Ye(s)&&_Ye(u)){var f=n.ab2xy(+s,+u,!0),c=n.isVisible(+s,+u);c||(l=!0),o[i]={x:f[0],y:f[1],a:s,b:u,vis:c}}else o[i]={x:!1,y:!1};return r._needsCull=l,o[0].carpet=n,o[0].trace=r,nKt(r,a),tKt(t,r),rKt(o,r),iKt(o,r),o}}});var AYe=Se((Jbr,TYe)=>{"use strict";var oKt=iT(),wYe=hu(),sKt=yu();TYe.exports=function(t,r,n,i){var a,o,s,u=n[0][0].carpet,l=wYe.getFromId(t,u.xaxis||"x"),f=wYe.getFromId(t,u.yaxis||"y"),c={xaxis:l,yaxis:f,plot:r.plot};for(a=0;a<n.length;a++)o=n[a][0].trace,o._xA=l,o._yA=f;for(oKt(t,c,n,i),a=0;a<n.length;a++)o=n[a][0].trace,s=i.selectAll("g.trace"+o.uid+" .js-line"),sKt.setClipUrl(s,n[a][0].carpet._clipPathId,t)}});var MYe=Se(($br,SYe)=>{"use strict";var lKt=sT(),uKt=Zr().fillText;SYe.exports=function(t,r,n,i){var a=lKt(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,u=t.xa._length,l=u*s/2,f=u-l;return o.x0=Math.max(Math.min(o.x0,f),l),o.x1=Math.max(Math.min(o.x1,f),l),a}var c=o.cd[o.index];o.a=c.a,o.b=c.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,d=h._carpet,p=h._module.formatLabels(c,h);o.yLabel=p.yLabel,delete o.text;var x=[];function b(E,A){var L;E.labelprefix&&E.labelprefix.length>0?L=E.labelprefix.replace(/ = $/,""):L=E._hovertitle,x.push(L+": "+A.toFixed(3)+E.labelsuffix)}if(!h.hovertemplate){var y=c.hi||h.hoverinfo,k=y.split("+");k.indexOf("all")!==-1&&(k=["a","b","text"]),k.indexOf("a")!==-1&&b(d.aaxis,c.a),k.indexOf("b")!==-1&&b(d.baxis,c.b),x.push("y: "+o.yLabel),k.indexOf("text")!==-1&&uKt(c,h,x),o.extraText=x.join("<br>")}return a}});var kYe=Se((Qbr,EYe)=>{"use strict";EYe.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 LYe=Se((e2r,CYe)=>{"use strict";CYe.exports={attributes:A$(),supplyDefaults:vYe(),colorbar:ep(),formatLabels:mYe(),calc:bYe(),plot:AYe(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:MYe(),selectPoints:lT(),eventData:kYe(),moduleType:"trace",name:"scattercarpet",basePlotModule:Th(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var PYe=Se((t2r,zYe)=>{"use strict";zYe.exports=LYe()});var S$=Se((r2r,IYe)=>{"use strict";var ly=ET(),y1=T4(),fKt=Xf(),cKt=vu().extendFlat,tg=y1.contours;IYe.exports=cKt({carpet:{valType:"string",editType:"calc"},z:ly.z,a:ly.x,a0:ly.x0,da:ly.dx,b:ly.y,b0:ly.y0,db:ly.dy,text:ly.text,hovertext:ly.hovertext,transpose:ly.transpose,atype:ly.xtype,btype:ly.ytype,fillcolor:y1.fillcolor,autocontour:y1.autocontour,ncontours:y1.ncontours,contours:{type:tg.type,start:tg.start,end:tg.end,size:tg.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:tg.showlines,showlabels:tg.showlabels,labelfont:tg.labelfont,labelformat:tg.labelformat,operation:tg.operation,value:tg.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:y1.line.color,width:y1.line.width,dash:y1.line.dash,smoothing:y1.line.smoothing,editType:"plot"},zorder:y1.zorder},fKt("",{cLetter:"z",autoColorDflt:!1}))});var M$=Se((i2r,FYe)=>{"use strict";var DYe=Zr(),hKt=ZI(),RYe=S$(),dKt=kH(),pKt=mD(),vKt=gD();FYe.exports=function(t,r,n,i){function a(l,f){return DYe.coerce(t,r,RYe,l,f)}function o(l){return DYe.coerce2(t,r,RYe,l)}if(a("carpet"),t.a&&t.b){var s=hKt(t,r,a,i,"a","b");if(!s){r.visible=!1;return}a("text");var u=a("contours.type")==="constraint";u?dKt(t,r,a,i,n,{hasHover:!1}):(pKt(t,r,a,o),vKt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a("zorder")}});var NYe=Se((n2r,OYe)=>{"use strict";var yKt=Rp(),qYe=Zr(),mKt=KI(),gKt=$I(),_Kt=QI(),xKt=eD(),BYe=$V(),bKt=M$(),wKt=t8(),TKt=yH();OYe.exports=function(t,r){var n=r._carpetTrace=wKt(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),bKt(a,r,r._defaultColor,t._fullLayout)}var o=AKt(t,r);return TKt(r,r._z),o}};function AKt(e,t){var r=t._carpetTrace,n=r.aaxis,i=r.baxis,a,o,s,u,l,f,c;n._minDtick=0,i._minDtick=0,qYe.isArray1D(t.z)&&mKt(t,n,i,"a","b",["z"]),a=t._a=t._a||t.a,u=t._b=t._b||t.b,a=a?n.makeCalcdata(t,"_a"):[],u=u?i.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,l=t.b0||0,f=t.db||1,c=t._z=gKt(t._z||t.z,t.transpose),t._emptypoints=xKt(c),_Kt(c,t._emptypoints);var h=qYe.maxRowLength(c),d=t.xtype==="scaled"?"":a,p=BYe(t,d,o,s,h,n),x=t.ytype==="scaled"?"":u,b=BYe(t,x,l,f,c.length,i),y={a:p,b,z:c};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&yKt(e,t,{vals:c,containerStr:"",cLetter:"z"}),[y]}});var VYe=Se((a2r,UYe)=>{"use strict";var SKt=Zr().isArrayOrTypedArray;UYe.exports=function(e,t,r,n){var i,a,o,s,u,l,f,c,h,d,p,x,b,y=SKt(r)?"a":"b",k=y==="a"?e.aaxis:e.baxis,E=k.smoothing,A=y==="a"?e.a2i:e.b2j,L=y==="a"?r:n,_=y==="a"?n:r,C=y==="a"?t.a.length:t.b.length,M=y==="a"?t.b.length:t.a.length,v=Math.floor(y==="a"?e.b2j(_):e.a2i(_)),z=y==="a"?function(be){return e.evalxy([],be,v)}:function(be){return e.evalxy([],v,be)};E&&(o=Math.max(0,Math.min(M-2,v)),s=v-o,a=y==="a"?function(be,ze){return e.dxydi([],be,o,ze,s)}:function(be,ze){return e.dxydj([],o,be,s,ze)});var T=A(L[0]),F=A(L[1]),q=T<F?1:-1,U=(F-T)*1e-8,H=q>0?Math.floor:Math.ceil,j=q>0?Math.ceil:Math.floor,G=q>0?Math.min:Math.max,O=q>0?Math.max:Math.min,W=H(T+U),re=j(F-U);f=z(T);var ne=[[f]];for(i=W;i*q<re*q;i+=q)u=[],p=O(T,i),x=G(F,i+q),b=x-p,l=Math.max(0,Math.min(C-2,Math.floor(.5*(p+x)))),c=z(x),E&&(h=a(l,p-l),d=a(l,x-l),u.push([f[0]+h[0]/3*b,f[1]+h[1]/3*b]),u.push([c[0]-d[0]/3*b,c[1]-d[1]/3*b])),u.push(c),ne.push(u),f=c;return ne}});var YYe=Se((o2r,XYe)=>{"use strict";var i8=Nl(),n8=x$(),ZYe=b$(),$k=yu(),m1=Zr(),MKt=gH(),EKt=_H(),hw=bD(),r8=S4(),kKt=TH(),CKt=wH(),LKt=AH(),zKt=t8(),HYe=VYe();XYe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;m1.makeTraceGroups(i,n,"contour").each(function(s){var u=i8.select(this),l=s[0],f=l.trace,c=f._carpetTrace=zKt(t,f),h=t.calcdata[c.index][0];if(!c.visible||c.visible==="legendonly")return;var d=l.a,p=l.b,x=f.contours,b=CKt(x,r,l),y=x.type==="constraint",k=x._operation,E=y?k==="="?"lines":"fill":x.coloring;function A(H){var j=c.ab2xy(H[0],H[1],!0);return[a.c2p(j[0]),o.c2p(j[1])]}var L=[[d[0],p[p.length-1]],[d[d.length-1],p[p.length-1]],[d[d.length-1],p[0]],[d[0],p[0]]];MKt(b);var _=(d[d.length-1]-d[0])*1e-8,C=(p[p.length-1]-p[0])*1e-8;EKt(b,_,C);var M=b;x.type==="constraint"&&(M=kKt(b,k)),PKt(b,A);var v,z,T,F,q=[];for(F=h.clipsegments.length-1;F>=0;F--)v=h.clipsegments[F],z=n8([],v.x,a.c2p),T=n8([],v.y,o.c2p),z.reverse(),T.reverse(),q.push(ZYe(z,T,v.bicubic));var U="M"+q.join("L")+"Z";RKt(u,h.clipsegments,a,o,y,E),FKt(f,u,a,o,M,L,A,c,h,E,U),IKt(u,b,t,l,x,r,c),$k.setClipUrl(u,c._clipPathId,t)})};function PKt(e,t){var r,n,i,a,o,s,u,l,f;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(f=a.edgepaths[n],u=[],i=0;i<f.length;i++)u[i]=t(f[i]);o.push(u)}for(n=0;n<a.paths.length;n++){for(f=a.paths[n],l=[],i=0;i<f.length;i++)l[i]=t(f[i]);s.push(l)}}}function IKt(e,t,r,n,i,a,o){var s=r._context.staticPlot,u=m1.ensureSingle(e,"g","contourlines"),l=i.showlines!==!1,f=i.showlabels,c=l&&f,h=hw.createLines(u,l||f,t,s),d=hw.createLineClip(u,c,r,n.trace.uid),p=e.selectAll("g.contourlabels").data(f?[0]:[]);if(p.exit().remove(),p.enter().append("g").classed("contourlabels",!0),f){var x=a.xaxis,b=a.yaxis,y=x._length,k=b._length,E=[[[0,0],[y,0],[y,k],[0,k]]],A=[];m1.clearLocationCache();var L=hw.labelFormatter(r,n),_=$k.tester.append("text").attr("data-notex",1).call($k.font,i.labelfont),C={left:0,right:y,center:y/2,top:0,bottom:k,middle:k/2},M=Math.sqrt(y*y+k*k),v=r8.LABELDISTANCE*M/Math.max(1,t.length/r8.LABELINCREASE);h.each(function(z){var T=hw.calcTextOpts(z.level,L,_,r);i8.select(this).selectAll("path").each(function(F){var q=this,U=m1.getVisibleSegment(q,C,T.height/2);if(U&&(DKt(q,F,z,U,o,T.height),!(U.len<(T.width+T.height)*r8.LABELMIN)))for(var H=Math.min(Math.ceil(U.len/v),r8.LABELMAX),j=0;j<H;j++){var G=hw.findBestTextLocation(q,U,T,A,C);if(!G)break;hw.addLabelData(G,T,A,E)}})}),_.remove(),hw.drawLabels(p,A,r,d,c?E:null)}f&&!l&&h.remove()}function DKt(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 u=i.a[0],l=i.a[i.a.length-1],f=i.b[0],c=i.b[i.b.length-1];function h(y,k){var E=0,A,L=.1;return(Math.abs(y[0]-u)<L||Math.abs(y[0]-l)<L)&&(A=WYe(i.dxydb_rough(y[0],y[1],L)),E=Math.max(E,a*jYe(k,A)/2)),(Math.abs(y[1]-f)<L||Math.abs(y[1]-c)<L)&&(A=WYe(i.dxyda_rough(y[0],y[1],L)),E=Math.max(E,a*jYe(k,A)/2)),E}var d=GYe(e,0,1),p=GYe(e,n.total,n.total-1),x=h(o[0],d),b=n.total-h(o[o.length-1],p);n.min<x&&(n.min=x),n.max>b&&(n.max=b),n.len=n.max-n.min}function GYe(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 WYe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function jYe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function RKt(e,t,r,n,i,a){var o,s,u,l,f=m1.ensureSingle(e,"g","contourbg"),c=f.selectAll("path").data(a==="fill"&&!i?[0]:[]);c.enter().append("path"),c.exit().remove();var h=[];for(l=0;l<t.length;l++)o=t[l],s=n8([],o.x,r.c2p),u=n8([],o.y,n.c2p),h.push(ZYe(s,u,o.bicubic));c.attr("d","M"+h.join("L")+"Z").style("stroke","none")}function FKt(e,t,r,n,i,a,o,s,u,l,f){var c=l==="fill";c&&LKt(i,e.contours);var h=m1.ensureSingle(t,"g","contourfill"),d=h.selectAll("path").data(c?i:[]);d.enter().append("path"),d.exit().remove(),d.each(function(p){var x=(p.prefixBoundary?f:"")+qKt(e,p,a,o,s,u,r,n);x?i8.select(this).attr("d",x).style("stroke","none"):i8.select(this).remove()})}function qKt(e,t,r,n,i,a,o,s){var u,l="",f=t.edgepaths.map(function(T,F){return F}),c=!0,h,d,p,x,b,y,k=Math.abs(r[0][0]-r[2][0])*1e-4,E=Math.abs(r[0][1]-r[2][1])*1e-4;function A(T){return Math.abs(T[1]-r[0][1])<E}function L(T){return Math.abs(T[1]-r[2][1])<E}function _(T){return Math.abs(T[0]-r[0][0])<k}function C(T){return Math.abs(T[0]-r[2][0])<k}function M(T,F){var q,U,H,j,G="";for(A(T)&&!C(T)||L(T)&&!_(T)?(j=i.aaxis,H=HYe(i,a,[T[0],F[0]],.5*(T[1]+F[1]))):(j=i.baxis,H=HYe(i,a,.5*(T[0]+F[0]),[T[1],F[1]])),q=1;q<H.length;q++)for(G+=j.smoothing?"C":"L",U=0;U<H[q].length;U++){var O=H[q][U];G+=[o.c2p(O[0]),s.c2p(O[1])]+" "}return G}for(u=0,h=null;f.length;){var v=t.edgepaths[u][0];for(h&&(l+=M(h,v)),y=$k.smoothopen(t.edgepaths[u].map(n),t.smoothing),l+=c?y:y.replace(/^M/,"L"),f.splice(f.indexOf(u),1),h=t.edgepaths[u][t.edgepaths[u].length-1],x=-1,p=0;p<4;p++){if(!h){m1.log("Missing end?",u,t);break}for(A(h)&&!C(h)?d=r[1]:_(h)?d=r[0]:L(h)?d=r[3]:C(h)&&(d=r[2]),b=0;b<t.edgepaths.length;b++){var z=t.edgepaths[b][0];Math.abs(h[0]-d[0])<k?Math.abs(h[0]-z[0])<k&&(z[1]-h[1])*(d[1]-z[1])>=0&&(d=z,x=b):Math.abs(h[1]-d[1])<E?Math.abs(h[1]-z[1])<E&&(z[0]-h[0])*(d[0]-z[0])>=0&&(d=z,x=b):m1.log("endpt to newendpt is not vert. or horz.",h,d,z)}if(x>=0)break;l+=M(h,d),h=d}if(x===t.edgepaths.length){m1.log("unclosed perimeter path");break}u=x,c=f.indexOf(u)===-1,c&&(u=f[0],l+=M(h,d)+"Z",h=null)}for(u=0;u<t.paths.length;u++)l+=$k.smoothclosed(t.paths[u].map(n),t.smoothing);return l}});var JYe=Se((s2r,KYe)=>{"use strict";KYe.exports={attributes:S$(),supplyDefaults:M$(),colorbar:AD(),calc:NYe(),plot:YYe(),style:TD(),moduleType:"trace",name:"contourcarpet",basePlotModule:Th(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var QYe=Se((l2r,$Ye)=>{"use strict";$Ye.exports=JYe()});var o8=Se((u2r,nKe)=>{"use strict";var a8=Zr().extendFlat,Qk=Zc(),eKe=Gc().axisHoverFormat,rKe=Id().dash,BKt=i3(),iKe=HT(),OKt=iKe.INCREASING.COLOR,NKt=iKe.DECREASING.COLOR,E$=Qk.line;function tKe(e){return{line:{color:a8({},E$.color,{dflt:e}),width:E$.width,dash:rKe,editType:"style"},editType:"style"}}nKe.exports={xperiod:Qk.xperiod,xperiod0:Qk.xperiod0,xperiodalignment:Qk.xperiodalignment,xhoverformat:eKe("x"),yhoverformat:eKe("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:a8({},E$.width,{}),dash:a8({},rKe,{}),editType:"style"},increasing:tKe(OKt),decreasing:tKe(NKt),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:a8({},BKt.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:Qk.zorder}});var k$=Se((f2r,aKe)=>{"use strict";var UKt=Ul(),VKt=Zr();aKe.exports=function(t,r,n,i){var a=n("x"),o=n("open"),s=n("high"),u=n("low"),l=n("close");n("hoverlabel.split");var f=UKt.getComponentMethod("calendars","handleTraceDefaults");if(f(t,r,["x"],i),!!(o&&s&&u&&l)){var c=Math.min(o.length,s.length,u.length,l.length);return a&&(c=Math.min(c,VKt.minRowLength(a))),r._length=c,c}}});var lKe=Se((c2r,sKe)=>{"use strict";var HKt=Zr(),GKt=k$(),WKt=zy(),jKt=o8();sKe.exports=function(t,r,n,i){function a(s,u){return HKt.coerce(t,r,jKt,s,u)}var o=GKt(t,r,a,i);if(!o){r.visible=!1;return}WKt(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),oKe(t,r,a,"increasing"),oKe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("tickwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function oKe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var C$=Se((h2r,fKe)=>{"use strict";var NS=Zr(),s8=NS._,l8=hu(),ZKt=Iy(),eC=ju().BADNUM;function XKt(e,t){var r=l8.getFromId(e,t.xaxis),n=l8.getFromId(e,t.yaxis),i=KKt(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var u=uKe(e,t,o,s,n,YKt);return t._extremes[r._id]=l8.findExtremes(r,s,{vpad:a/2}),u.length?(NS.extendFlat(u[0].t,{wHover:a/2,tickLen:i}),u):[{t:{empty:!0}}]}function YKt(e,t,r,n){return{o:e,h:t,l:r,c:n}}function uKe(e,t,r,n,i,a){for(var o=i.makeCalcdata(t,"open"),s=i.makeCalcdata(t,"high"),u=i.makeCalcdata(t,"low"),l=i.makeCalcdata(t,"close"),f=NS.isArrayOrTypedArray(t.text),c=NS.isArrayOrTypedArray(t.hovertext),h=!0,d=null,p=!!t.xperiodalignment,x=[],b=0;b<n.length;b++){var y=n[b],k=o[b],E=s[b],A=u[b],L=l[b];if(y!==eC&&k!==eC&&E!==eC&&A!==eC&&L!==eC){L===k?d!==null&&L!==d&&(h=L>d):h=L>k,d=L;var _=a(k,E,A,L);_.pos=y,_.yc=(k+L)/2,_.i=b,_.dir=h?"increasing":"decreasing",_.x=_.pos,_.y=[A,E],p&&(_.orig_p=r[b]),f&&(_.tx=t.text[b]),c&&(_.htx=t.hovertext[b]),x.push(_)}else x.push({pos:y,empty:!0})}return t._extremes[i._id]=l8.findExtremes(i,NS.concat(u,s),{padded:!0}),x.length&&(x[0].t={labels:{open:s8(e,"open:")+" ",high:s8(e,"high:")+" ",low:s8(e,"low:")+" ",close:s8(e,"close:")+" "}}),x}function KKt(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 u=t.makeCalcdata(s,"x");s._origX=u;var l=ZKt(r,t,"x",u).vals;s._xcalc=l;var f=NS.distinctVals(l).minDiff;f&&isFinite(f)&&(n=Math.min(n,f))}}for(n===1/0&&(n=1),o=0;o<a.length;o++)a[o]._minDiff=n}return n*r.tickwidth}fKe.exports={calc:XKt,calcCommon:uKe}});var dKe=Se((d2r,hKe)=>{"use strict";var JKt=Nl(),cKe=Zr();hKe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;cKe.makeTraceGroups(i,n,"trace ohlc").each(function(u){var l=JKt.select(this),f=u[0],c=f.t,h=f.trace;if(h.visible!==!0||c.empty){l.remove();return}var d=c.tickLen,p=l.selectAll("path").data(cKe.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(x){if(x.empty)return"M0,0Z";var b=o.c2p(x.pos-d,!0),y=o.c2p(x.pos+d,!0),k=s?(b+y)/2:o.c2p(x.pos,!0),E=a.c2p(x.o,!0),A=a.c2p(x.h,!0),L=a.c2p(x.l,!0),_=a.c2p(x.c,!0);return"M"+b+","+E+"H"+k+"M"+k+","+A+"V"+L+"M"+y+","+_+"H"+k})})}});var vKe=Se((p2r,pKe)=>{"use strict";var L$=Nl(),$Kt=yu(),QKt=Pl();pKe.exports=function(t,r,n){var i=n||L$.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;L$.select(this).selectAll("path").each(function(s){if(!s.empty){var u=o[s.dir].line;L$.select(this).style("fill","none").call(QKt.stroke,u.color).call($Kt.dashLine,u.dash,u.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var P$=Se((v2r,xKe)=>{"use strict";var z$=hu(),eJt=Zr(),u8=jc(),tJt=Pl(),rJt=Zr().fillText,yKe=HT(),iJt={increasing:yKe.INCREASING.SYMBOL,decreasing:yKe.DECREASING.SYMBOL};function nJt(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?gKe(e,t,r,n):_Ke(e,t,r,n)}function mKe(e,t,r,n){var i=e.cd,a=e.xa,o=i[0].trace,s=i[0].t,u=o.type,l=u==="ohlc"?"l":"min",f=u==="ohlc"?"h":"max",c,h,d=s.bPos||0,p=function(z){return z.pos+d-t},x=s.bdPos||s.tickLen,b=s.wHover,y=Math.min(1,x/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));c=e.maxHoverDistance-y,h=e.maxSpikeDistance-y;function k(z){var T=p(z);return u8.inbox(T-b,T+b,c)}function E(z){var T=z[l],F=z[f];return T===F||u8.inbox(T-r,F-r,c)}function A(z){return(k(z)+E(z))/2}var L=u8.getDistanceFunction(n,k,E,A);if(u8.getClosest(i,L,e),e.index===!1)return null;var _=i[e.index];if(_.empty)return null;var C=_.dir,M=o[C],v=M.line.color;return tJt.opacity(v)&&M.line.width?e.color=v:e.color=M.fillcolor,e.x0=a.c2p(_.pos+d-x,!0),e.x1=a.c2p(_.pos+d+x,!0),e.xLabelVal=_.orig_p!==void 0?_.orig_p:_.pos,e.spikeDistance=A(_)*h/c,e.xSpike=a.c2p(_.pos,!0),e}function gKe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,u=[],l=mKe(e,t,r,n);if(!l)return[];var f=l.index,c=i[f],h=c.hi||o.hoverinfo,d=h.split("+"),p=h==="all",x=p||d.indexOf("y")!==-1;if(!x)return[];for(var b=["high","open","close","low"],y={},k=0;k<b.length;k++){var E=b[k],A=o[E][l.index],L=a.c2p(A,!0),_;A in y?(_=y[A],_.yLabel+="<br>"+s.labels[E]+z$.hoverLabelText(a,A,o.yhoverformat)):(_=eJt.extendFlat({},l),_.y0=_.y1=L,_.yLabelVal=A,_.yLabel=s.labels[E]+z$.hoverLabelText(a,A,o.yhoverformat),_.name="",u.push(_),y[A]=_)}return u}function _Ke(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,u=mKe(e,t,r,n);if(!u)return[];var l=u.index,f=i[l],c=u.index=f.i,h=f.dir;function d(A){return s.labels[A]+z$.hoverLabelText(a,o[A][c],o.yhoverformat)}var p=f.hi||o.hoverinfo,x=p.split("+"),b=p==="all",y=b||x.indexOf("y")!==-1,k=b||x.indexOf("text")!==-1,E=y?[d("open"),d("high"),d("low"),d("close")+"  "+iJt[h]]:[];return k&&rJt(f,o,E),u.extraText=E.join("<br>"),u.y0=u.y1=a.c2p(f.yc,!0),[u]}xKe.exports={hoverPoints:nJt,hoverSplit:gKe,hoverOnPoints:_Ke}});var I$=Se((y2r,bKe)=>{"use strict";bKe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,u=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 l=n[s];r.contains([i.c2p(l.pos+u),a.c2p(l.yc)],null,l.i,t)?(o.push({pointNumber:l.i,x:i.c2d(l.pos),y:a.c2d(l.yc)}),l.selected=1):l.selected=0}return o}});var TKe=Se((m2r,wKe)=>{"use strict";wKe.exports={moduleType:"trace",name:"ohlc",basePlotModule:Th(),categories:["cartesian","svg","showLegend"],meta:{},attributes:o8(),supplyDefaults:lKe(),calc:C$().calc,plot:dKe(),style:vKe(),hoverPoints:P$().hoverPoints,selectPoints:I$()}});var SKe=Se((g2r,AKe)=>{"use strict";AKe.exports=TKe()});var R$=Se((_2r,kKe)=>{"use strict";var D$=Zr().extendFlat,MKe=Gc().axisHoverFormat,f0=o8(),US=p4();function EKe(e){return{line:{color:D$({},US.line.color,{dflt:e}),width:US.line.width,editType:"style"},fillcolor:US.fillcolor,editType:"style"}}kKe.exports={xperiod:f0.xperiod,xperiod0:f0.xperiod0,xperiodalignment:f0.xperiodalignment,xhoverformat:MKe("x"),yhoverformat:MKe("y"),x:f0.x,open:f0.open,high:f0.high,low:f0.low,close:f0.close,line:{width:D$({},US.line.width,{}),editType:"style"},increasing:EKe(f0.increasing.line.color.dflt),decreasing:EKe(f0.decreasing.line.color.dflt),text:f0.text,hovertext:f0.hovertext,whiskerwidth:D$({},US.whiskerwidth,{dflt:0}),hoverlabel:f0.hoverlabel,zorder:US.zorder}});var zKe=Se((x2r,LKe)=>{"use strict";var aJt=Zr(),oJt=Pl(),sJt=k$(),lJt=zy(),uJt=R$();LKe.exports=function(t,r,n,i){function a(s,u){return aJt.coerce(t,r,uJt,s,u)}var o=sJt(t,r,a,i);if(!o){r.visible=!1;return}lJt(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),CKe(t,r,a,"increasing"),CKe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("whiskerwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function CKe(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",oJt.addOpacity(i,.5))}});var RKe=Se((b2r,DKe)=>{"use strict";var PKe=Zr(),IKe=hu(),fJt=Iy(),cJt=C$().calcCommon;DKe.exports=function(e,t){var r=e._fullLayout,n=IKe.getFromId(e,t.xaxis),i=IKe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,"x"),o=fJt(t,n,"x",a).vals,s=cJt(e,t,a,o,i,hJt);return s.length?(PKe.extendFlat(s[0].t,{num:r._numBoxes,dPos:PKe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function hJt(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var qKe=Se((w2r,FKe)=>{"use strict";FKe.exports={moduleType:"trace",name:"candlestick",basePlotModule:Th(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:R$(),layoutAttributes:v4(),supplyLayoutDefaults:UI().supplyLayoutDefaults,crossTraceCalc:HI().crossTraceCalc,supplyDefaults:zKe(),calc:RKe(),plot:GI().plot,layerName:"boxlayer",style:WI().style,hoverPoints:P$().hoverPoints,selectPoints:I$()}});var OKe=Se((T2r,BKe)=>{"use strict";BKe.exports=qKe()});var q$=Se((A2r,NKe)=>{"use strict";var c8=Zr(),dJt=gm(),f8=c8.deg2rad,F$=c8.rad2deg;NKe.exports=function(t,r,n){switch(dJt(t,n),t._id){case"x":case"radialaxis":pJt(t,r);break;case"angularaxis":mJt(t,r);break}};function pJt(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,u=n>i?function(l){return l<=0}:function(l){return l>=0};e.c2g=function(l){var f=e.c2l(l)-n;return(u(f)?f:0)+s},e.g2c=function(l){return e.l2c(l+n-s)},e.g2p=function(l){return l*o},e.c2p=function(l){return e.g2p(e.c2g(l))}}}function vJt(e,t){return t==="degrees"?f8(e):e}function yJt(e,t){return t==="degrees"?F$(e):e}function mJt(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return vJt(n(a),o)},e.c2d=function(a,o){return i(yJt(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],u=a._length,l,f,c=function(b){return e.d2c(b,a.thetaunit)};if(s)for(l=new Array(u),f=0;f<u;f++)l[f]=c(s[f]);else{var h=o+"0",d="d"+o,p=h in a?c(a[h]):0,x=a[d]?c(a[d]):(e.period||2*Math.PI)/u;for(l=new Array(u),f=0;f<u;f++)l[f]=p+f*x}return l},e.setGeometry=function(){var a=t.sector,o=a.map(f8),s={clockwise:-1,counterclockwise:1}[e.direction],u=f8(e.rotation),l=function(y){return s*y+u},f=function(y){return(y-u)/s},c,h,d,p;switch(r){case"linear":h=c=c8.identity,p=f8,d=F$,e.range=c8.isFullCircle(o)?[a[0],a[0]+360]:o.map(f).map(F$);break;case"category":var x=e._categories.length,b=e.period?Math.max(e.period,x):x;b===0&&(b=1),h=p=function(y){return y*2*Math.PI/b},c=d=function(y){return y*b/Math.PI/2},e.range=[0,b];break}e.c2g=function(y){return l(h(y))},e.g2c=function(y){return c(f(y))},e.t2g=function(y){return l(p(y))},e.g2t=function(y){return d(f(y))}}}});var h8=Se((S2r,UKe)=>{"use strict";UKe.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 p8=Se((M2r,jKe)=>{"use strict";var dw=Zr(),VKe=w5().tester,B$=dw.findIndexOfMin,GKe=dw.isAngleInsideSector,gJt=dw.angleDelta,HKe=dw.angleDist;function _Jt(e,t,r,n,i){if(!GKe(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=VKe(VS(a,n[0],n[1],i)),u=VKe(VS(o,n[0],n[1],i)),l=[e*Math.cos(t),e*Math.sin(t)];return u.contains(l)&&!s.contains(l)}function WKe(e,t,r,n){var i,a,o=n[0],s=n[1],u=d8(Math.sin(t)-Math.sin(e)),l=d8(Math.cos(t)-Math.cos(e)),f=Math.tan(r),c=d8(1/f),h=u/l,d=s-h*o;return c?u&&l?(i=d/(f-h),a=f*i):l?(i=s*c,a=s):(i=o,a=o*f):u&&l?(i=0,a=d):l?(i=0,a=s):i=a=NaN,[i,a]}function xJt(e,t,r,n){var i=-t*r,a=t*t+1,o=2*(t*i-r),s=i*i+r*r-e*e,u=Math.sqrt(o*o-4*a*s),l=(-o+u)/(2*a),f=(-o-u)/(2*a);return[[l,t*l+i+n],[f,t*f+i+n]]}function bJt(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 wJt(e,t,r,n){var i=n.length,a=[],o,s;function u(y){return[e*Math.cos(y),e*Math.sin(y)]}function l(y,k,E){return WKe(y,k,E,u(y))}function f(y){return dw.mod(y,i)}function c(y){return GKe(y,[t,r])}var h=B$(n,function(y){return c(y)?HKe(y,t):1/0}),d=l(n[h],n[f(h-1)],t);for(a.push(d),o=h,s=0;s<i;o++,s++){var p=n[f(o)];if(!c(p))break;a.push(u(p))}var x=B$(n,function(y){return c(y)?HKe(y,r):1/0}),b=l(n[x],n[f(x+1)],r);return a.push(b),a.push([0,0]),a.push(a[0].slice()),a}function VS(e,t,r,n){return dw.isFullCircle([t,r])?bJt(e,n):wJt(e,t,r,n)}function TJt(e,t,r,n){for(var i=1/0,a=1/0,o=VS(e,t,r,n),s=0;s<o.length;s++){var u=o[s];i=Math.min(i,u[0]),a=Math.min(a,-u[1])}return[i,a]}function AJt(e,t){var r=function(a){var o=gJt(a,e);return o>0?o:1/0},n=B$(t,r),i=dw.mod(n+1,t.length);return[t[n],t[i]]}function d8(e){return Math.abs(e)>1e-10?e:0}function O$(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 SJt(e,t,r,n,i,a){var o=VS(e,t,r,n);return"M"+O$(o,i,a).join("L")}function MJt(e,t,r,n,i,a,o){var s,u;e<t?(s=e,u=t):(s=t,u=e);var l=O$(VS(s,r,n,i),a,o),f=O$(VS(u,r,n,i),a,o);return"M"+f.reverse().join("L")+"M"+l.join("L")}jKe.exports={isPtInsidePolygon:_Jt,findPolygonOffset:TJt,findEnclosingVertexAngles:AJt,findIntersectionXY:WKe,findXYatLength:xJt,clampTiny:d8,pathPolygon:SJt,pathPolygonAnnulus:MJt}});var N$=Se((E2r,YKe)=>{"use strict";function ZKe(e){return e<0?-1:e>0?1:0}function HS(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 GS(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function XKe(e,t){return t*e.radius}function EJt(e,t,r,n){var i=GS(e,HS([r,t])),a=i[0],o=i[1],s=GS(e,HS([n,t])),u=s[0],l=s[1];if(t===0)return["M"+a+","+o,"L"+u+","+l].join(" ");var f=XKe(e,1/Math.abs(t));return["M"+a+","+o,"A"+f+","+f+" 0 0,"+(t<0?1:0)+" "+u+","+l].join(" ")}function kJt(e,t,r,n){var i=XKe(e,1/(t+1)),a=GS(e,HS([t,r])),o=a[0],s=a[1],u=GS(e,HS([t,n])),l=u[0],f=u[1];if(ZKe(r)!==ZKe(n)){var c=GS(e,HS([t,0])),h=c[0],d=c[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)+l+","+f].join(" ")}return["M"+o+","+s,"A"+i+","+i+" 0 0,"+(n<r?0:1)+" "+l+","+f].join(" ")}YKe.exports={smith:HS,reactanceArc:EJt,resistanceArc:kJt,smithTransform:GS}});var H$=Se((k2r,nJe)=>{"use strict";var pw=Nl(),CJt=cd(),yw=Ul(),Fc=Zr(),rg=Fc.strRotate,bd=Fc.strTranslate,U$=Pl(),tC=yu(),LJt=Ac(),dv=hu(),zJt=gm(),PJt=q$(),IJt=wy().doAutoRange,g1=G7(),m8=gp(),KKe=jc(),DJt=Mb(),RJt=nh().prepSelect,FJt=nh().selectOnClick,V$=nh().clearOutline,JKe=Ty(),$Ke=l5(),QKe=y5().redrawReglTraces,qJt=Qh().MID_SHIFT,Cx=h8(),_1=p8(),g8=N$(),v8=g8.smith,BJt=g8.reactanceArc,OJt=g8.resistanceArc,y8=g8.smithTransform,NJt=Fc._,eJe=Fc.mod,Lx=Fc.deg2rad,vw=Fc.rad2deg;function tJe(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 Vd=tJe.prototype;nJe.exports=function(t,r,n){return new tJe(t,r,n)};Vd.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),LJt.generalUpdatePerTraceModule(r.gd,r,e,n),r.updateFx(t,n),r.isSmith&&(delete n.realaxis.range,delete n.imaginaryaxis.range)};Vd.updateLayers=function(e,t){var r=this,n=r.isSmith,i=r.layers,a=r.getRadial(t),o=r.getAngular(t),s=Cx.layerNames,u=s.indexOf("frontplot"),l=s.slice(0,u),f=o.layer==="below traces",c=a.layer==="below traces";f&&l.push("angular-line"),c&&l.push("radial-line"),f&&l.push("angular-axis"),c&&l.push("radial-axis"),l.push("frontplot"),f||l.push("angular-line"),c||l.push("radial-line"),f||l.push("angular-axis"),c||l.push("radial-axis");var h=(n?"smith":"polar")+"sublayer",d=r.framework.selectAll("."+h).data(l,String);d.enter().append("g").attr("class",function(p){return h+" "+p}).each(function(p){var x=i[p]=pw.select(this);switch(p){case"frontplot":n||x.append("g").classed("barlayer",!0),x.append("g").classed("scatterlayer",!0);break;case"backplot":x.append("g").classed("maplayer",!0);break;case"plotbg":i.bg=x.append("path");break;case"radial-grid":x.style("fill","none");break;case"angular-grid":x.style("fill","none");break;case"radial-line":x.append("line").style("fill","none");break;case"angular-line":x.append("path").style("fill","none");break}}),d.order()};Vd.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,u=t.domain.y;r.xOffset=i.l+i.w*s[0],r.yOffset=i.t+i.h*(1-u[1]);var l=r.xLength=i.w*(s[1]-s[0]),f=r.yLength=i.h*(u[1]-u[0]),c=r.getSector(t);r.sectorInRad=c.map(Lx);var h=r.sectorBBox=UJt(c),d=h[2]-h[0],p=h[3]-h[1],x=f/l,b=Math.abs(p/d),y,k,E,A,L;x>b?(y=l,k=l*b,L=(f-k)/i.h/2,E=[s[0],s[1]],A=[u[0]+L,u[1]-L]):(y=f/b,k=f,L=(l-y)/i.w/2,E=[s[0]+L,s[1]-L],A=[u[0],u[1]]),r.xLength2=y,r.yLength2=k,r.xDomain2=E,r.yDomain2=A;var _=r.xOffset2=i.l+i.w*E[0],C=r.yOffset2=i.t+i.h*(1-A[1]),M=r.radius=y/d,v=r.innerRadius=r.getHole(t)*M,z=r.cx=_-M*h[0],T=r.cy=C+M*h[3],F=r.cxx=z-_,q=r.cyy=T-C,U=a.side,H;U==="counterclockwise"?(H=U,U="top"):U==="clockwise"&&(H=U,U="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:U,_trueSide:H,domain:[v/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:A});var j=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",j).attr("transform",bd(F,q)),n.frontplot.attr("transform",bd(_,C)).call(tC.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",j).attr("transform",bd(z,T)).call(U$.fill,t.bgcolor)};Vd.mockAxis=function(e,t,r,n){var i=Fc.extendFlat({},r,n);return PJt(i,t,e),i};Vd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=Fc.extendFlat({type:"linear"},r);zJt(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var u=n.sectorBBox,l=s[a],f=n.radialAxis._rl,c=(f[1]-f[0])/(1-n.getHole(t));o.range=[u[l[0]]*c,u[l[1]]*c]},o.isPtWithinRange=a==="x"&&!i?function(u){return n.isPtInside(u)}:function(){return!0},o.setRange(),o.setScale(),o};Vd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);IJt(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 u=i.r2l(i.maxallowed);i._rl[0]<i._rl[1]?i._rl[1]=Math.min(i._rl[1],u):i._rl[0]=Math.min(i._rl[0],u)}};Vd.updateRadialAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,u=r.cy,l=r.getRadial(t),f=eJe(r.getSector(t)[0],360),c=r.radialAxis,h=o<a,d=r.isSmith;d||(r.fillViewInitialKey("radialaxis.angle",l.angle),r.fillViewInitialKey("radialaxis.range",c.range.slice()),c.setGeometry()),c.tickangle==="auto"&&f>90&&f<=270&&(c.tickangle=180);var p=d?function(M){var v=y8(r,v8([M.x,0]));return bd(v[0]-s,v[1]-u)}:function(M){return bd(c.l2p(M.x)+o,0)},x=d?function(M){return OJt(r,M.x,-1/0,1/0)}:function(M){return r.pathArc(c.r2p(M.x)+o)},b=rJe(l);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),h){c.setScale();var y=0,k=d?(c.tickvals||[]).filter(function(M){return M>=0}).map(function(M){return dv.tickText(c,M,!0,!1)}):dv.calcTicks(c),E=d?k:dv.clipEnds(c,k),A=dv.getTickSigns(c)[2];d&&((c.ticks==="top"&&c.side==="bottom"||c.ticks==="bottom"&&c.side==="top")&&(A=-A),c.ticks==="top"&&c.side==="top"&&(y=-c.ticklen),c.ticks==="bottom"&&c.side==="bottom"&&(y=c.ticklen)),dv.drawTicks(n,c,{vals:k,layer:i["radial-axis"],path:dv.makeTickPath(c,0,A),transFn:p,crisp:!1}),dv.drawGrid(n,c,{vals:E,layer:i["radial-grid"],path:x,transFn:Fc.noop,crisp:!1}),dv.drawLabels(n,c,{vals:k,layer:i["radial-axis"],transFn:p,labelFns:dv.makeLabelFns(c,y)})}var L=r.radialAxisAngle=r.vangles?vw(iJe(Lx(l.angle),r.vangles)):l.angle,_=bd(s,u),C=_+rg(-L);rC(i["radial-axis"],h&&(l.showticklabels||l.ticks),{transform:C}),rC(i["radial-grid"],h&&l.showgrid,{transform:d?"":_}),rC(i["radial-line"].select("line"),h&&l.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:C}).attr("stroke-width",l.linewidth).call(U$.stroke,l.linecolor)};Vd.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,u=n.getRadial(t),l=n.id+"title",f=0;if(u.title){var c=tC.bBox(n.layers["radial-axis"].node()).height,h=u.title.font.size,d=u.side;f=d==="top"?h:d==="counterclockwise"?-(c+h*.4):c+h*.8}var p=r!==void 0?r:n.radialAxisAngle,x=Lx(p),b=Math.cos(x),y=Math.sin(x),k=o+a/2*b+f*y,E=s-a/2*y+f*b;n.layers["radial-axis-title"]=DJt.draw(i,l,{propContainer:u,propName:n.id+".radialaxis.title",placeholder:NJt(i,"Click to enter radial axis title"),attributes:{x:k,y:E,"text-anchor":"middle"},transform:{rotate:-p}})}};Vd.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,u=r.cy,l=r.getAngular(t),f=r.angularAxis,c=r.isSmith;c||(r.fillViewInitialKey("angularaxis.rotation",l.rotation),f.setGeometry(),f.setScale());var h=c?function(v){var z=y8(r,v8([0,v.x]));return Math.atan2(z[0]-s,z[1]-u)-Math.PI/2}:function(v){return f.t2g(v.x)};f.type==="linear"&&f.thetaunit==="radians"&&(f.tick0=vw(f.tick0),f.dtick=vw(f.dtick));var d=function(v){return bd(s+a*Math.cos(v),u-a*Math.sin(v))},p=c?function(v){var z=y8(r,v8([0,v.x]));return bd(z[0],z[1])}:function(v){return d(h(v))},x=c?function(v){var z=y8(r,v8([0,v.x])),T=Math.atan2(z[0]-s,z[1]-u)-Math.PI/2;return bd(z[0],z[1])+rg(-vw(T))}:function(v){var z=h(v);return d(z)+rg(-vw(z))},b=c?function(v){return BJt(r,v.x,0,1/0)}:function(v){var z=h(v),T=Math.cos(z),F=Math.sin(z);return"M"+[s+o*T,u-o*F]+"L"+[s+a*T,u-a*F]},y=dv.makeLabelFns(f,0),k=y.labelStandoff,E={};E.xFn=function(v){var z=h(v);return Math.cos(z)*k},E.yFn=function(v){var z=h(v),T=Math.sin(z)>0?.2:1;return-Math.sin(z)*(k+v.fontSize*T)+Math.abs(Math.cos(z))*(v.fontSize*qJt)},E.anchorFn=function(v){var z=h(v),T=Math.cos(z);return Math.abs(T)<.1?"middle":T>0?"start":"end"},E.heightFn=function(v,z,T){var F=h(v);return-.5*(1+Math.sin(F))*T};var A=rJe(l);r.angularTickLayout!==A&&(i["angular-axis"].selectAll("."+f._id+"tick").remove(),r.angularTickLayout=A);var L=c?[1/0].concat(f.tickvals||[]).map(function(v){return dv.tickText(f,v,!0,!1)}):dv.calcTicks(f);c&&(L[0].text="\u221E",L[0].fontSize*=1.75);var _;if(t.gridshape==="linear"?(_=L.map(h),Fc.angleDelta(_[0],_[1])<0&&(_=_.slice().reverse())):_=null,r.vangles=_,f.type==="category"&&(L=L.filter(function(v){return Fc.isAngleInsideSector(h(v),r.sectorInRad)})),f.visible){var C=f.ticks==="inside"?-1:1,M=(f.linewidth||1)/2;dv.drawTicks(n,f,{vals:L,layer:i["angular-axis"],path:"M"+C*M+",0h"+C*f.ticklen,transFn:x,crisp:!1}),dv.drawGrid(n,f,{vals:L,layer:i["angular-grid"],path:b,transFn:Fc.noop,crisp:!1}),dv.drawLabels(n,f,{vals:L,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:p,labelFns:E})}rC(i["angular-line"].select("path"),l.showline,{d:r.pathSubplot(),transform:bd(s,u)}).attr("stroke-width",l.linewidth).call(U$.stroke,l.linecolor)};Vd.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)}};Vd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=Cx.MINZOOM,s=Cx.OFFEDGE,u=t.radius,l=t.innerRadius,f=t.cx,c=t.cy,h=t.cxx,d=t.cyy,p=t.sectorInRad,x=t.vangles,b=t.radialAxis,y=_1.clampTiny,k=_1.findXYatLength,E=_1.findEnclosingVertexAngles,A=Cx.cornerHalfWidth,L=Cx.cornerLen/2,_,C,M=g1.makeDragger(i,"path","maindrag",e.dragmode===!1?"none":"crosshair");pw.select(M).attr("d",t.pathSubplot()).attr("transform",bd(f,c)),M.onmousemove=function(fe){KKe.hover(n,fe,t.id),n._fullLayout._lasthover=M,n._fullLayout._hoversubplot=t.id},M.onmouseout=function(fe){n._dragging||m8.unhover(n,fe)};var v={element:M,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},z,T,F,q,U,H,j,G,O;function W(fe,Ze){return Math.sqrt(fe*fe+Ze*Ze)}function re(fe,Ze){return W(fe-h,Ze-d)}function ne(fe,Ze){return Math.atan2(d-Ze,fe-h)}function be(fe,Ze){return[fe*Math.cos(Ze),fe*Math.sin(-Ze)]}function ze(fe,Ze){if(fe===0)return t.pathSector(2*A);var et=L/fe,gt=Ze-et,Pt=Ze+et,Qe=Math.max(0,Math.min(fe,u)),Xe=Qe-A,Tt=Qe+A;return"M"+be(Xe,gt)+"A"+[Xe,Xe]+" 0,0,0 "+be(Xe,Pt)+"L"+be(Tt,Pt)+"A"+[Tt,Tt]+" 0,0,1 "+be(Tt,gt)+"Z"}function Ce(fe,Ze,et){if(fe===0)return t.pathSector(2*A);var gt=be(fe,Ze),Pt=be(fe,et),Qe=y((gt[0]+Pt[0])/2),Xe=y((gt[1]+Pt[1])/2),Tt,xt;if(Qe&&Xe){var _t=Xe/Qe,Ct=-1/_t,jt=k(A,_t,Qe,Xe);Tt=k(L,Ct,jt[0][0],jt[0][1]),xt=k(L,Ct,jt[1][0],jt[1][1])}else{var At,Te;Xe?(At=L,Te=A):(At=A,Te=L),Tt=[[Qe-At,Xe-Te],[Qe+At,Xe-Te]],xt=[[Qe-At,Xe+Te],[Qe+At,Xe+Te]]}return"M"+Tt.join("L")+"L"+xt.reverse().join("L")+"Z"}function he(){F=null,q=null,U=t.pathSubplot(),H=!1;var fe=n._fullLayout[t.id];j=CJt(fe.bgcolor).getLuminance(),G=g1.makeZoombox(a,j,f,c,U),G.attr("fill-rule","evenodd"),O=g1.makeCorners(a,f,c),V$(n)}function te(fe,Ze){return Ze=Math.max(Math.min(Ze,u),l),fe<s?fe=0:u-fe<s?fe=u:Ze<s?Ze=0:u-Ze<s&&(Ze=u),Math.abs(Ze-fe)>o?(fe<Ze?(F=fe,q=Ze):(F=Ze,q=fe),!0):(F=null,q=null,!1)}function ke(fe,Ze){fe=fe||U,Ze=Ze||"M0,0Z",G.attr("d",fe),O.attr("d",Ze),g1.transitionZoombox(G,O,H,j),H=!0;var et={};me(et),n.emit("plotly_relayouting",et)}function Ee(fe,Ze){fe=fe*_,Ze=Ze*C;var et=z+fe,gt=T+Ze,Pt=re(z,T),Qe=Math.min(re(et,gt),u),Xe=ne(z,T),Tt,xt;te(Pt,Qe)&&(Tt=U+t.pathSector(q),F&&(Tt+=t.pathSector(F)),xt=ze(F,Xe)+ze(q,Xe)),ke(Tt,xt)}function Me(fe,Ze,et,gt){var Pt=_1.findIntersectionXY(et,gt,et,[fe-h,d-Ze]);return W(Pt[0],Pt[1])}function Oe(fe,Ze){var et=z+fe,gt=T+Ze,Pt=ne(z,T),Qe=ne(et,gt),Xe=E(Pt,x),Tt=E(Qe,x),xt=Me(z,T,Xe[0],Xe[1]),_t=Math.min(Me(et,gt,Tt[0],Tt[1]),u),Ct,jt;te(xt,_t)&&(Ct=U+t.pathSector(q),F&&(Ct+=t.pathSector(F)),jt=[Ce(F,Xe[0],Xe[1]),Ce(q,Xe[0],Xe[1])].join(" ")),ke(Ct,jt)}function Re(){if(g1.removeZoombox(n),!(F===null||q===null)){var fe={};me(fe),g1.showDoubleClickNotifier(n),yw.call("_guiRelayout",n,fe)}}function me(fe){var Ze=b._rl,et=(Ze[1]-Ze[0])/(1-l/u)/u,gt=[Ze[0]+(F-l)*et,Ze[0]+(q-l)*et];fe[t.id+".radialaxis.range"]=gt}function Be(fe,Ze){var et=n._fullLayout.clickmode;if(g1.removeZoombox(n),fe===2){var gt={};for(var Pt in t.viewInitial)gt[t.id+"."+Pt]=t.viewInitial[Pt];n.emit("plotly_doubleclick",null),yw.call("_guiRelayout",n,gt)}et.indexOf("select")>-1&&fe===1&&FJt(Ze,n,[t.xaxis],[t.yaxis],t.id,v),et.indexOf("event")>-1&&KKe.click(n,Ze,t.id)}v.prepFn=function(fe,Ze,et){var gt=n._fullLayout.dragmode,Pt=M.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var Qe=n._fullLayout._invTransform;_=n._fullLayout._invScaleX,C=n._fullLayout._invScaleY;var Xe=Fc.apply3DTransform(Qe)(Ze-Pt.left,et-Pt.top);if(z=Xe[0],T=Xe[1],x){var Tt=_1.findPolygonOffset(u,p[0],p[1],x);z+=h+Tt[0],T+=d+Tt[1]}switch(gt){case"zoom":v.clickFn=Be,r||(x?v.moveFn=Oe:v.moveFn=Ee,v.doneFn=Re,he(fe,Ze,et));break;case"select":case"lasso":RJt(fe,Ze,et,v,gt);break}},m8.init(v)};Vd.updateRadialDrag=function(e,t,r){var n=this,i=n.gd,a=n.layers,o=n.radius,s=n.innerRadius,u=n.cx,l=n.cy,f=n.radialAxis,c=Cx.radialDragBoxSize,h=c/2;if(!f.visible)return;var d=Lx(n.radialAxisAngle),p=f._rl,x=p[0],b=p[1],y=p[r],k=.75*(p[1]-p[0])/(1-n.getHole(t))/o,E,A,L;r?(E=u+(o+h)*Math.cos(d),A=l-(o+h)*Math.sin(d),L="radialdrag"):(E=u+(s-h)*Math.cos(d),A=l-(s-h)*Math.sin(d),L="radialdrag-inner");var _=g1.makeRectDragger(a,L,"crosshair",-h,-h,c,c),C={element:_,gd:i};e.dragmode===!1&&(C.dragmode=!1),rC(pw.select(_),f.visible&&s<o,{transform:bd(E,A)});var M,v,z;function T(j,G){if(M)M(j,G);else{var O=[j,-G],W=[Math.cos(d),Math.sin(d)],re=Math.abs(Fc.dot(O,W)/Math.sqrt(Fc.dot(O,O)));isNaN(re)||(M=re<.5?U:H)}var ne={};F(ne),i.emit("plotly_relayouting",ne)}function F(j){v!==null?j[n.id+".radialaxis.angle"]=v:z!==null&&(j[n.id+".radialaxis.range["+r+"]"]=z)}function q(){v!==null?yw.call("_guiRelayout",i,n.id+".radialaxis.angle",v):z!==null&&yw.call("_guiRelayout",i,n.id+".radialaxis.range["+r+"]",z)}function U(j,G){if(r!==0){var O=E+j,W=A+G;v=Math.atan2(l-W,O-u),n.vangles&&(v=iJe(v,n.vangles)),v=vw(v);var re=bd(u,l)+rg(-v);a["radial-axis"].attr("transform",re),a["radial-line"].select("line").attr("transform",re);var ne=n.gd._fullLayout,be=ne[n.id];n.updateRadialAxisTitle(ne,be,v)}}function H(j,G){var O=Fc.dot([j,-G],[Math.cos(d),Math.sin(d)]);if(z=y-k*O,k>0!=(r?z>x:z<b)){z=null;return}var W=i._fullLayout,re=W[n.id];f.range[r]=z,f._rl[r]=z,n.updateRadialAxis(W,re),n.xaxis.setRange(),n.xaxis.setScale(),n.yaxis.setRange(),n.yaxis.setScale();var ne=!1;for(var be in n.traceHash){var ze=n.traceHash[be],Ce=Fc.filterVisible(ze),he=ze[0][0].trace._module;he.plot(i,n,Ce,re),yw.traceIs(be,"gl")&&Ce.length&&(ne=!0)}ne&&($Ke(i),QKe(i))}C.prepFn=function(){M=null,v=null,z=null,C.moveFn=T,C.doneFn=q,V$(i)},C.clampFn=function(j,G){return Math.sqrt(j*j+G*G)<Cx.MINDRAG&&(j=0,G=0),[j,G]},m8.init(C)};Vd.updateAngularDrag=function(e){var t=this,r=t.gd,n=t.layers,i=t.radius,a=t.angularAxis,o=t.cx,s=t.cy,u=t.cxx,l=t.cyy,f=Cx.angularDragBoxSize,c=g1.makeDragger(n,"path","angulardrag",e.dragmode===!1?"none":"move"),h={element:c,gd:r};e.dragmode===!1?h.dragmode=!1:pw.select(c).attr("d",t.pathAnnulus(i,i+f)).attr("transform",bd(o,s)).call(JKe,"move");function d(z,T){return Math.atan2(l+f-T,z-u-f)}var p=n.frontplot.select(".scatterlayer").selectAll(".trace"),x=p.selectAll(".point"),b=p.selectAll(".textpoint"),y,k,E,A,L,_;function C(z,T){var F=t.gd._fullLayout,q=F[t.id],U=y+z*e._invScaleX,H=k+T*e._invScaleY,j=d(U,H),G=vw(j-_);if(A=E+G,n.frontplot.attr("transform",bd(t.xOffset2,t.yOffset2)+rg([-G,u,l])),t.vangles){L=t.radialAxisAngle+G;var O=bd(o,s)+rg(-G),W=bd(o,s)+rg(-L);n.bg.attr("transform",O),n["radial-grid"].attr("transform",O),n["radial-axis"].attr("transform",W),n["radial-line"].select("line").attr("transform",W),t.updateRadialAxisTitle(F,q,L)}else t.clipPaths.forTraces.select("path").attr("transform",bd(u,l)+rg(G));x.each(function(){var te=pw.select(this),ke=tC.getTranslate(te);te.attr("transform",bd(ke.x,ke.y)+rg([G]))}),b.each(function(){var te=pw.select(this),ke=te.select("text"),Ee=tC.getTranslate(te);te.attr("transform",rg([G,ke.attr("x"),ke.attr("y")])+bd(Ee.x,Ee.y))}),a.rotation=Fc.modHalf(A,360),t.updateAngularAxis(F,q),t._hasClipOnAxisFalse&&!Fc.isFullCircle(t.sectorInRad)&&p.call(tC.hideOutsideRangePoints,t);var re=!1;for(var ne in t.traceHash)if(yw.traceIs(ne,"gl")){var be=t.traceHash[ne],ze=Fc.filterVisible(be),Ce=be[0][0].trace._module;Ce.plot(r,t,ze,q),ze.length&&(re=!0)}re&&($Ke(r),QKe(r));var he={};M(he),r.emit("plotly_relayouting",he)}function M(z){z[t.id+".angularaxis.rotation"]=A,t.vangles&&(z[t.id+".radialaxis.angle"]=L)}function v(){b.select("text").attr("transform",null);var z={};M(z),yw.call("_guiRelayout",r,z)}h.prepFn=function(z,T,F){var q=e[t.id];E=q.angularaxis.rotation;var U=c.getBoundingClientRect();y=T-U.left,k=F-U.top,r._fullLayout._calcInverseTransform(r);var H=Fc.apply3DTransform(e._invTransform)(y,k);y=H[0],k=H[1],_=d(y,k),h.moveFn=C,h.doneFn=v,V$(r)},t.vangles&&!Fc.isFullCircle(t.sectorInRad)&&(h.prepFn=Fc.noop,JKe(pw.select(c),null)),m8.init(h)};Vd.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?_1.isPtInsidePolygon:Fc.isPtInsideSector;return s(a,n,o,t,r)};Vd.pathArc=function(e){var t=this.sectorInRad,r=this.vangles,n=r?_1.pathPolygon:Fc.pathArc;return n(e,t[0],t[1],r)};Vd.pathSector=function(e){var t=this.sectorInRad,r=this.vangles,n=r?_1.pathPolygon:Fc.pathSector;return n(e,t[0],t[1],r)};Vd.pathAnnulus=function(e,t){var r=this.sectorInRad,n=this.vangles,i=n?_1.pathPolygonAnnulus:Fc.pathAnnulus;return i(e,t,r[0],r[1],n)};Vd.pathSubplot=function(){var e=this.innerRadius,t=this.radius;return e?this.pathAnnulus(e,t):this.pathSector(t)};Vd.fillViewInitialKey=function(e,t){e in this.viewInitial||(this.viewInitial[e]=t)};function rJe(e){var t=e.ticks+String(e.ticklen)+String(e.showticklabels);return"side"in e&&(t+=e.side),t}function UJt(e){var t=e[0],r=e[1],n=r-t,i=eJe(t,360),a=i+n,o=Math.cos(Lx(i)),s=Math.sin(Lx(i)),u=Math.cos(Lx(a)),l=Math.sin(Lx(a)),f,c,h,d;return i<=90&&a>=90||i>90&&a>=450?d=1:s<=0&&l<=0?d=0:d=Math.max(s,l),i<=180&&a>=180||i>180&&a>=540?f=-1:o>=0&&u>=0?f=0:f=Math.min(o,u),i<=270&&a>=270||i>270&&a>=630?c=-1:s>=0&&l>=0?c=0:c=Math.min(s,l),a>=360?h=1:o<=0&&u<=0?h=0:h=Math.max(o,u),[f,c,h,d]}function iJe(e,t){var r=function(i){return Fc.angleDist(e,i)},n=Fc.findIndexOfMin(t,r);return t[n]}function rC(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var G$=Se((C2r,fJe)=>{"use strict";var VJt=Ih(),Uu=Rd(),HJt=Ec().attributes,c0=Zr().extendFlat,aJe=_c().overrideAll,oJe=aJe({color:Uu.color,showline:c0({},Uu.showline,{dflt:!0}),linecolor:Uu.linecolor,linewidth:Uu.linewidth,showgrid:c0({},Uu.showgrid,{dflt:!0}),gridcolor:Uu.gridcolor,gridwidth:Uu.gridwidth,griddash:Uu.griddash},"plot","from-root"),sJe=aJe({tickmode:Uu.minor.tickmode,nticks:Uu.nticks,tick0:Uu.tick0,dtick:Uu.dtick,tickvals:Uu.tickvals,ticktext:Uu.ticktext,ticks:Uu.ticks,ticklen:Uu.ticklen,tickwidth:Uu.tickwidth,tickcolor:Uu.tickcolor,ticklabelstep:Uu.ticklabelstep,showticklabels:Uu.showticklabels,labelalias:Uu.labelalias,showtickprefix:Uu.showtickprefix,tickprefix:Uu.tickprefix,showticksuffix:Uu.showticksuffix,ticksuffix:Uu.ticksuffix,showexponent:Uu.showexponent,exponentformat:Uu.exponentformat,minexponent:Uu.minexponent,separatethousands:Uu.separatethousands,tickfont:Uu.tickfont,tickangle:Uu.tickangle,tickformat:Uu.tickformat,tickformatstops:Uu.tickformatstops,layer:Uu.layer},"plot","from-root"),lJe={visible:c0({},Uu.visible,{dflt:!0}),type:c0({},Uu.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Uu.autotypenumbers,autorangeoptions:{minallowed:Uu.autorangeoptions.minallowed,maxallowed:Uu.autorangeoptions.maxallowed,clipmin:Uu.autorangeoptions.clipmin,clipmax:Uu.autorangeoptions.clipmax,include:Uu.autorangeoptions.include,editType:"plot"},autorange:c0({},Uu.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:c0({},Uu.minallowed,{editType:"plot"}),maxallowed:c0({},Uu.maxallowed,{editType:"plot"}),range:c0({},Uu.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Uu.categoryorder,categoryarray:Uu.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Uu.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:c0({},Uu.title.text,{editType:"plot",dflt:""}),font:c0({},Uu.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Uu.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};c0(lJe,oJe,sJe);var uJe={visible:c0({},Uu.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Uu.autotypenumbers,categoryorder:Uu.categoryorder,categoryarray:Uu.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:Uu.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};c0(uJe,oJe,sJe);fJe.exports={domain:HJt({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:VJt.background},radialaxis:lJe,angularaxis:uJe,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var pJe=Se((L2r,dJe)=>{"use strict";var _8=Zr(),GJt=Pl(),WJt=_f(),jJt=k_(),ZJt=Dd().getSubplotData,XJt=xb(),YJt=T3(),KJt=e_(),JJt=t_(),$Jt=QP(),QJt=Y5(),e$t=bN(),t$t=L3(),hJe=G$(),r$t=q$(),x8=h8(),cJe=x8.axisNames;function i$t(e,t,r,n){var i=r("bgcolor");n.bgColor=GJt.combine(i,n.paper_bgcolor);var a=r("sector");r("hole");var o=ZJt(n.fullData,x8.name,n.id),s=n.layoutOut,u;function l(G,O){return r(u+"."+G,O)}for(var f=0;f<cJe.length;f++){u=cJe[f],_8.isPlainObject(e[u])||(e[u]={});var c=e[u],h=WJt.newContainer(t,u);h._id=h._name=u,h._attr=n.id+"."+u,h._traceIndices=o.map(function(G){return G.index});var d=x8.axisName2dataArray[u],p=n$t(c,h,l,o,d,n);$Jt(c,h,l,{axData:o,dataAttr:d});var x=l("visible");switch(r$t(h,t,s),l("uirevision",t.uirevision),h._m=1,u){case"radialaxis":l("minallowed"),l("maxallowed");var b=l("range"),y=h.getAutorangeDflt(b),k=l("autorange",y),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||(y=h.getAutorangeDflt(b),k=l("autorange",y)),c.autorange=k,k&&(e$t(l,k,b),(p==="linear"||p==="-")&&l("rangemode"),h.isReversed()&&(h._m=-1)),h.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(p==="date"){_8.log("Polar plots do not support date angular axes yet.");for(var A=0;A<o.length;A++)o[A].visible=!1;p=c.type=h.type="linear"}l(p==="linear"?"thetaunit":"period");var L=l("direction");l("rotation",{counterclockwise:0,clockwise:90}[L]);break}if(JJt(c,h,l,h.type,{tickSuffixDflt:h.thetaunit==="degrees"?"\xB0":void 0}),x){var _,C,M,v,z,T,F,q,U,H,j=n.font||{};_=l("color"),C=_===c.color?_:j.color,M=j.size,v=j.family,z=j.weight,T=j.style,F=j.variant,q=j.textcase,U=j.lineposition,H=j.shadow,XJt(c,h,l,h.type),KJt(c,h,l,h.type,{font:{weight:z,style:T,variant:F,textcase:q,lineposition:U,shadow:H,color:C,size:M,family:v},noAutotickangles:u==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),YJt(c,h,l,{outerTicks:!0}),QJt(c,h,l,{dfltColor:_,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:hJe[u]}),l("layer"),u==="radialaxis"&&(l("side"),l("angle",a[0]),l("title.text"),_8.coerceFont(l,"title.font",{weight:z,style:T,variant:F,textcase:q,lineposition:U,shadow:H,color:C,size:_8.bigFont(M),family:v}))}p!=="category"&&l("hoverformat"),h._input=c}t.angularaxis.type==="category"&&r("gridshape")}function n$t(e,t,r,n,i,a){var o=r("autotypenumbers",a.autotypenumbersDflt),s=r("type");if(s==="-"){for(var u,l=0;l<n.length;l++)if(n[l].visible){u=n[l];break}u&&u[i]&&(t.type=t$t(u[i],"gregorian",{noMultiCategory:!0,autotypenumbers:o})),t.type==="-"?t.type="linear":e.type=t.type}return t.type}dJe.exports=function(t,r,n){jJt(t,r,n,{type:x8.name,attributes:hJe,handleDefaults:i$t,font:r.font,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,fullData:n,layoutOut:r})}});var b8=Se((z2r,_Je)=>{"use strict";var a$t=Dd().getSubplotCalcData,o$t=Zr().counterRegex,s$t=H$(),yJe=h8(),mJe=yJe.attr,mw=yJe.name,vJe=o$t(mw),gJe={};gJe[mJe]={valType:"subplotid",dflt:mw,editType:"calc"};function l$t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[mw],i=0;i<n.length;i++){var a=n[i],o=a$t(r,mw,a),s=t[a]._subplot;s||(s=s$t(e,a),t[a]._subplot=s),s.plot(o,t,e._promises)}}function u$t(e,t,r,n){for(var i=n._subplots[mw]||[],a=n._has&&n._has("gl"),o=t._has&&t._has("gl"),s=a&&!o,u=0;u<i.length;u++){var l=i[u],f=n[l]._subplot;if(!t[l]&&f){f.framework.remove(),f.layers["radial-axis-title"].remove();for(var c in f.clipPaths)f.clipPaths[c].remove()}s&&f._scene&&(f._scene.destroy(),f._scene=null)}}_Je.exports={attr:mJe,name:mw,idRoot:mw,idRegex:vJe,attrRegex:vJe,attributes:gJe,layoutAttributes:G$(),supplyLayoutDefaults:pJe(),plot:l$t,clean:u$t,toSVG:Th().toSVG}});var iC=Se((P2r,xJe)=>{"use strict";var f$t=Du().hovertemplateAttrs,c$t=Du().texttemplateAttrs,w8=vu().extendFlat,h$t=Ey(),h0=Zc(),d$t=zf(),WS=h0.line;xJe.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:c$t({editType:"plot"},{keys:["r","theta","text"]}),hovertext:h0.hovertext,line:{color:WS.color,width:WS.width,dash:WS.dash,backoff:WS.backoff,shape:w8({},WS.shape,{values:["linear","spline"]}),smoothing:WS.smoothing,editType:"calc"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:w8({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:w8({},h0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:h$t(),hoverinfo:w8({},d$t.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:h0.hoveron,hovertemplate:f$t(),selected:h0.selected,unselected:h0.unselected}});var A8=Se((I2r,TJe)=>{"use strict";var T8=Zr(),jS=ec(),p$t=$v(),v$t=I0(),bJe=J3(),y$t=D0(),m$t=Py(),g$t=Sm().PTS_LINESONLY,_$t=iC();function x$t(e,t,r,n){function i(s,u){return T8.coerce(e,t,_$t,s,u)}var a=wJe(e,t,n,i);if(!a){t.visible=!1;return}i("thetaunit"),i("mode",a<g$t?"lines+markers":"lines"),i("text"),i("hovertext"),t.hoveron!=="fills"&&i("hovertemplate"),jS.hasMarkers(t)&&p$t(e,t,r,n,i,{gradient:!0}),jS.hasLines(t)&&(v$t(e,t,r,n,i,{backoff:!0}),bJe(e,t,i),i("connectgaps")),jS.hasText(t)&&(i("texttemplate"),y$t(e,t,n,i));var o=[];(jS.hasMarkers(t)||jS.hasText(t))&&(i("cliponaxis"),i("marker.maxdisplayed"),o.push("points")),i("fill"),t.fill!=="none"&&(m$t(e,t,r,i),jS.hasLines(t)||bJe(e,t,i)),(t.fill==="tonext"||t.fill==="toself")&&o.push("fills"),i("hoveron",o.join("+")||"points"),T8.coerceSelectionMarkerOpacity(t,i)}function wJe(e,t,r,n){var i=n("r"),a=n("theta");T8.isTypedArray(i)&&(t.r=i=Array.from(i)),T8.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}TJe.exports={handleRThetaDefaults:wJe,supplyDefaults:x$t}});var S8=Se((D2r,SJe)=>{"use strict";var b$t=Zr(),AJe=hu();SJe.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 u=o.c2l(t.r);i.rLabel=AJe.tickText(o,u,!0).text;var l=s.thetaunit==="degrees"?b$t.rad2deg(t.theta):t.theta;return i.thetaLabel=AJe.tickText(s,l,!0).text,i}});var kJe=Se((R2r,EJe)=>{"use strict";var MJe=_u(),w$t=ju().BADNUM,T$t=hu(),A$t=R0(),S$t=km(),M$t=F0(),E$t=q0().calcMarkerSize;EJe.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"),u=o.makeCalcdata(r,"theta"),l=r._length,f=new Array(l),c=0;c<l;c++){var h=s[c],d=u[c],p=f[c]={};MJe(h)&&MJe(d)?(p.r=h,p.theta=d):p.r=w$t}var x=E$t(r,l);return r._extremes.x=T$t.findExtremes(a,s,{ppad:x}),A$t(t,r),S$t(f,r),M$t(f,r),f}});var zJe=Se((F2r,LJe)=>{"use strict";var k$t=iT(),CJe=ju().BADNUM;LJe.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},u=r.radialAxis,l=r.angularAxis,f=0;f<n.length;f++)for(var c=n[f],h=0;h<c.length;h++){h===0&&(c[0].trace._xA=a,c[0].trace._yA=o);var d=c[h],p=d.r;if(p===CJe)d.x=d.y=CJe;else{var x=u.c2g(p),b=l.c2g(d.theta);d.x=x*Math.cos(b),d.y=x*Math.sin(b)}}k$t(t,s,n,i)}});var M8=Se((q2r,IJe)=>{"use strict";var C$t=sT();function L$t(e,t,r,n){var i=C$t(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],u=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,PJe(s,u,o,a),a.hovertemplate=u.hovertemplate,i}}function PJe(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 u=e.hi||t.hoverinfo,l=[];function f(h,d){l.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var c=u.split("+");c.indexOf("all")!==-1&&(c=["r","theta","text"]),c.indexOf("r")!==-1&&f(i,n.rLabel),c.indexOf("theta")!==-1&&f(a,n.thetaLabel),c.indexOf("text")!==-1&&n.text&&(l.push(n.text),delete n.text),n.extraText=l.join("<br>")}}IJe.exports={hoverPoints:L$t,makeHoverPointText:PJe}});var RJe=Se((B2r,DJe)=>{"use strict";DJe.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:b8(),categories:["polar","symbols","showLegend","scatter-like"],attributes:iC(),supplyDefaults:A8().supplyDefaults,colorbar:ep(),formatLabels:S8(),calc:kJe(),plot:zJe(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:M8().hoverPoints,selectPoints:lT(),meta:{}}});var qJe=Se((O2r,FJe)=>{"use strict";FJe.exports=RJe()});var W$=Se((N2r,BJe)=>{"use strict";var Vv=iC(),x1=ek(),z$t=Du().texttemplateAttrs;BJe.exports={mode:Vv.mode,r:Vv.r,theta:Vv.theta,r0:Vv.r0,dr:Vv.dr,theta0:Vv.theta0,dtheta:Vv.dtheta,thetaunit:Vv.thetaunit,text:Vv.text,texttemplate:z$t({editType:"plot"},{keys:["r","theta","text"]}),hovertext:Vv.hovertext,hovertemplate:Vv.hovertemplate,line:{color:x1.line.color,width:x1.line.width,dash:x1.line.dash,editType:"calc"},connectgaps:x1.connectgaps,marker:x1.marker,fill:x1.fill,fillcolor:x1.fillcolor,textposition:x1.textposition,textfont:x1.textfont,hoverinfo:Vv.hoverinfo,selected:Vv.selected,unselected:Vv.unselected}});var UJe=Se((U2r,NJe)=>{"use strict";var OJe=Zr(),j$=ec(),P$t=A8().handleRThetaDefaults,I$t=$v(),D$t=I0(),R$t=D0(),F$t=Py(),q$t=Sm().PTS_LINESONLY,B$t=W$();NJe.exports=function(t,r,n,i){function a(s,u){return OJe.coerce(t,r,B$t,s,u)}var o=P$t(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o<q$t?"lines+markers":"lines"),a("text"),a("hovertext"),r.hoveron!=="fills"&&a("hovertemplate"),j$.hasMarkers(r)&&I$t(t,r,n,i,a,{noAngleRef:!0,noStandOff:!0}),j$.hasLines(r)&&(D$t(t,r,n,i,a),a("connectgaps")),j$.hasText(r)&&(a("texttemplate"),R$t(t,r,i,a,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),a("fill"),r.fill!=="none"&&F$t(t,r,n,a),OJe.coerceSelectionMarkerOpacity(r,a)}});var HJe=Se((V2r,VJe)=>{"use strict";var O$t=S8();VJe.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]),O$t(t,r,n)}});var WJe=Se((H2r,GJe)=>{"use strict";var N$t=R0(),U$t=q0().calcMarkerSize,V$t=Y2(),H$t=hu(),G$t=ox().TOO_MANY_POINTS;GJe.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"),u=r._theta=o.makeCalcdata(r,"theta"),l=r._length,f={};l<s.length&&(s=s.slice(0,l)),l<u.length&&(u=u.slice(0,l)),f.r=s,f.theta=u,N$t(t,r);var c=f.opts=V$t.style(t,r),h;return l<G$t?h=U$t(r,l):c.marker&&(h=2*(c.marker.sizeAvg||Math.max(c.marker.size,3))),r._extremes.x=H$t.findExtremes(a,s,{ppad:h}),[{x:!1,y:!1,t:f,trace:r}]}});var ZJe=Se((G2r,jJe)=>{"use strict";var W$t=RF(),j$t=M8().makeHoverPointText;function Z$t(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,u=W$t.hoverPoints(e,t,r,n);if(!(!u||u[0].index===!1)){var l=u[0];if(l.index===void 0)return u;var f=e.subplot,c=l.cd[l.index],h=l.trace;if(c.r=o[l.index],c.theta=s[l.index],!!f.isPtInside(c))return l.xLabelVal=void 0,l.yLabelVal=void 0,j$t(c,h,f,l),u}}jJe.exports={hoverPoints:Z$t}});var YJe=Se((W2r,XJe)=>{"use strict";XJe.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:b8(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:W$(),supplyDefaults:UJe(),colorbar:ep(),formatLabels:HJe(),calc:WJe(),hoverPoints:ZJe().hoverPoints,selectPoints:oY(),meta:{}}});var KJe=Se((j2r,Z$)=>{"use strict";var X$t=BF(),Y$t=_u(),K$t=uK(),J$t=iY(),E8=Y2(),k8=Zr(),$$t=ox().TOO_MANY_POINTS,Q$t={};Z$.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=J$t(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var u=s[0],l=u.trace,f=u.t,c=l._length,h=f.r,d=f.theta,p=f.opts,x,b=h.slice(),y=d.slice();for(x=0;x<h.length;x++)r.isPtInside({r:h[x],theta:d[x]})||(b[x]=NaN,y[x]=NaN);var k=new Array(c*2),E=Array(c),A=Array(c);for(x=0;x<c;x++){var L=b[x],_,C;if(Y$t(L)){var M=i.c2g(L),v=a.c2g(y[x],l.thetaunit);_=M*Math.cos(v),C=M*Math.sin(v)}else _=C=NaN;E[x]=k[x*2]=_,A[x]=k[x*2+1]=C}f.tree=X$t(k),p.marker&&c>=$$t&&(p.marker.cluster=f.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=k),p.line&&k.length>1&&k8.extendFlat(p.line,E8.linePositions(t,l,k)),p.text&&(k8.extendFlat(p.text,{positions:k},E8.textPosition(t,l,p.text,p.marker)),k8.extendFlat(p.textSel,{positions:k},E8.textPosition(t,l,p.text,p.markerSel)),k8.extendFlat(p.textUnsel,{positions:k},E8.textPosition(t,l,p.text,p.markerUnsel))),p.fill&&!o.fill2d&&(o.fill2d=!0),p.marker&&!o.scatter2d&&(o.scatter2d=!0),p.line&&!o.line2d&&(o.line2d=!0),p.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(p.line),o.fillOptions.push(p.fill),o.markerOptions.push(p.marker),o.markerSelectedOptions.push(p.markerSel),o.markerUnselectedOptions.push(p.markerUnsel),o.textOptions.push(p.text),o.textSelectedOptions.push(p.textSel),o.textUnselectedOptions.push(p.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),f.x=E,f.y=A,f.rawx=E,f.rawy=A,f.r=h,f.theta=d,f.positions=k,f._scene=o,f.index=o.count,o.count++}}),K$t(t,r,n)}};Z$.exports.reglPrecompiled=Q$t});var $Je=Se((Z2r,JJe)=>{"use strict";var eQt=b9(),tQt=w9(),rQt=T9(),iQt=A9(),nQt=S9(),aQt=M9(),oQt=E9(),sQt=k9(),lQt=C9(),uQt=L9();JJe.exports={"3e771157d23b4793771f65d83e6387262ed73d488209157f19a7fa027bddd71b":eQt,cbf700f001fff25b649fba9c37fa0dc6631c1cdee318ad49473d28ec10dcee81:tQt,"8fad2284703471df7c0e0d0a7b96d983e8c53f6d707dd55d5921c1eab71f6623":rQt,fe5b6844077cde1bdd7273f4495969fad93500c26a69b62e74ec2664c447bcc7:iQt,db1b82c68771e7f5012fad1fbdae7ff23b526e58d2995bf6dd2cf30024e0f41d:nQt,"49e82bba439f1d9d441c17ba252d05640bc63fefdf22d1219993633af7730210":aQt,dbd1cc9126a137a605df67dc0706e55116f04e33b4545a80042031752de5aef5:oQt,bfc540da96a87fcc039073cb37b45e6b81ef5ee6ef3529d726ceed8336354019:sQt,"6a5d6bd29c15cf7614221b94c3f384df47c2c46fbe4456e8c57b5cd14c84d923":lQt,"8902aff2b23b600f8103bcc84a8af2999d28795208aedadc2db06f921f9c7034":uQt}});var e$e=Se((X2r,QJe)=>{"use strict";var X$=KJe(),fQt=$Je(),cQt=fK();Object.assign(X$.reglPrecompiled,fQt);Object.assign(X$.reglPrecompiled,cQt);QJe.exports=X$});var i$e=Se((Y2r,r$e)=>{"use strict";var t$e=YJe();t$e.plot=e$e();r$e.exports=t$e});var Y$=Se((K2r,n$e)=>{"use strict";var hQt=Du().hovertemplateAttrs,ZS=vu().extendFlat,zx=iC(),Px=Lm();n$e.exports={r:zx.r,theta:zx.theta,r0:zx.r0,dr:zx.dr,theta0:zx.theta0,dtheta:zx.dtheta,thetaunit:zx.thetaunit,base:ZS({},Px.base,{}),offset:ZS({},Px.offset,{}),width:ZS({},Px.width,{}),text:ZS({},Px.text,{}),hovertext:ZS({},Px.hovertext,{}),marker:dQt(),hoverinfo:zx.hoverinfo,hovertemplate:hQt(),selected:Px.selected,unselected:Px.unselected};function dQt(){var e=ZS({},Px.marker);return delete e.cornerradius,e}});var K$=Se((J2r,a$e)=>{"use strict";a$e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var l$e=Se(($2r,s$e)=>{"use strict";var o$e=Zr(),pQt=A8().handleRThetaDefaults,vQt=RI(),yQt=Y$();s$e.exports=function(t,r,n,i){function a(s,u){return o$e.coerce(t,r,yQt,s,u)}var o=pQt(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),vQt(t,r,a,n,i),o$e.coerceSelectionMarkerOpacity(r,a)}});var f$e=Se((Q2r,u$e)=>{"use strict";var mQt=Zr(),gQt=K$();u$e.exports=function(e,t,r){var n={},i;function a(u,l){return mQt.coerce(e[i]||{},t[i],gQt,u,l)}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 J$=Se((ewr,d$e)=>{"use strict";var c$e=Dp().hasColorscale,h$e=Rp(),_Qt=Zr().isArrayOrTypedArray,xQt=f4(),bQt=Gb().setGroupPositions,wQt=F0(),TQt=Ul().traceIs,AQt=Zr().extendFlat;function SQt(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"),u=t._length,l=new Array(u),f=o,c=s,h=0;h<u;h++)l[h]={p:c[h],s:f[h]};function d(p){var x=t[p];x!==void 0&&(t["_"+p]=_Qt(x)?a.makeCalcdata(t,p):a.d2c(x,t.thetaunit))}return a.type==="linear"&&(d("width"),d("offset")),c$e(t,"marker")&&h$e(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),c$e(t,"marker.line")&&h$e(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),xQt(l,t),wQt(l,t),l}function MQt(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&&TQt(s,"bar")&&s.subplot===r&&i.push(o)}var u=AQt({},t.radialaxis,{_id:"x"}),l=t.angularaxis;bQt(e,l,u,i,{mode:t.barmode,norm:t.barnorm,gap:t.bargap,groupgap:t.bargroupgap})}d$e.exports={calc:SQt,crossTraceCalc:MQt}});var y$e=Se((twr,v$e)=>{"use strict";var p$e=Nl(),C8=_u(),XS=Zr(),EQt=yu(),$$=p8();v$e.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,u=r.angularAxis,l=kQt(r),f=r.layers.frontplot.select("g.barlayer");XS.makeTraceGroups(f,n,"trace bars").each(function(){var c=p$e.select(this),h=XS.ensureSingle(c,"g","points"),d=h.selectAll("g.point").data(XS.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(p){var x=p$e.select(this),b=p.rp0=s.c2p(p.s0),y=p.rp1=s.c2p(p.s1),k=p.thetag0=u.c2g(p.p0),E=p.thetag1=u.c2g(p.p1),A;if(!C8(b)||!C8(y)||!C8(k)||!C8(E)||b===y||k===E)A="M0,0Z";else{var L=s.c2g(p.s1),_=(k+E)/2;p.ct=[a.c2p(L*Math.cos(_)),o.c2p(L*Math.sin(_))],A=l(b,y,k,E)}XS.ensureSingle(x,"path").attr("d",A)}),EQt.setClipUrl(c,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function kQt(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,u;XS.angleDelta(a,o)>0?(s=a,u=o):(s=o,u=a);var l=$$.findEnclosingVertexAngles(s,e.vangles)[0],f=$$.findEnclosingVertexAngles(u,e.vangles)[1],c=[l,(s+u)/2,f];return $$.pathPolygonAnnulus(n,i,s,u,c,t,r)}:function(n,i,a,o){return XS.pathAnnulus(n,i,a,o,t,r)}}});var g$e=Se((rwr,m$e)=>{"use strict";var CQt=jc(),Q$=Zr(),LQt=TT().getTraceColor,zQt=Q$.fillText,PQt=M8().makeHoverPointText,IQt=p8().isPtInsidePolygon;m$e.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s=o.radialAxis,u=o.angularAxis,l=o.vangles,f=l?IQt:Q$.isPtInsideSector,c=t.maxHoverDistance,h=u._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),p=Math.atan2(n,r);s.range[0]>s.range[1]&&(p+=Math.PI);var x=function(E){return f(d,p,[E.rp0,E.rp1],[E.thetag0,E.thetag1],l)?c+Math.min(1,Math.abs(E.thetag1-E.thetag0)/h)-1+(E.rp1-d)/(E.rp1-E.rp0)-1:1/0};if(CQt.getClosest(i,x,t),t.index!==!1){var b=t.index,y=i[b];t.x0=t.x1=y.ct[0],t.y0=t.y1=y.ct[1];var k=Q$.extendFlat({},y,{r:y.s,theta:y.p});return zQt(y,a,t),PQt(k,a,o,t),t.hovertemplate=a.hovertemplate,t.color=LQt(a,y),t.xLabelVal=t.yLabelVal=void 0,y.s<0&&(t.idealAlign="left"),[t]}}});var x$e=Se((iwr,_$e)=>{"use strict";_$e.exports={moduleType:"trace",name:"barpolar",basePlotModule:b8(),categories:["polar","bar","showLegend"],attributes:Y$(),layoutAttributes:K$(),supplyDefaults:l$e(),supplyLayoutDefaults:f$e(),calc:J$().calc,crossTraceCalc:J$().crossTraceCalc,plot:y$e(),colorbar:ep(),formatLabels:S8(),style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:g$e(),selectPoints:AT(),meta:{}}});var w$e=Se((nwr,b$e)=>{"use strict";b$e.exports=x$e()});var eQ=Se((awr,T$e)=>{"use strict";T$e.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var tQ=Se((owr,E$e)=>{"use strict";var DQt=Ih(),lh=Rd(),RQt=Ec().attributes,Ix=Zr().extendFlat,A$e=_c().overrideAll,S$e=A$e({color:lh.color,showline:Ix({},lh.showline,{dflt:!0}),linecolor:lh.linecolor,linewidth:lh.linewidth,showgrid:Ix({},lh.showgrid,{dflt:!0}),gridcolor:lh.gridcolor,gridwidth:lh.gridwidth,griddash:lh.griddash},"plot","from-root"),M$e=A$e({ticklen:lh.ticklen,tickwidth:Ix({},lh.tickwidth,{dflt:2}),tickcolor:lh.tickcolor,showticklabels:lh.showticklabels,labelalias:lh.labelalias,showtickprefix:lh.showtickprefix,tickprefix:lh.tickprefix,showticksuffix:lh.showticksuffix,ticksuffix:lh.ticksuffix,tickfont:lh.tickfont,tickformat:lh.tickformat,hoverformat:lh.hoverformat,layer:lh.layer},"plot","from-root"),FQt=Ix({visible:Ix({},lh.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Ix({},lh.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},S$e,M$e),qQt=Ix({visible:Ix({},lh.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:lh.ticks,editType:"calc"},S$e,M$e);E$e.exports={domain:RQt({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:DQt.background},realaxis:FQt,imaginaryaxis:qQt,editType:"calc"}});var L$e=Se((swr,C$e)=>{"use strict";var YS=Zr(),BQt=Pl(),OQt=_f(),NQt=k_(),UQt=Dd().getSubplotData,VQt=t_(),HQt=e_(),GQt=Y5(),WQt=gm(),KS=tQ(),rQ=eQ(),k$e=rQ.axisNames,jQt=XQt(function(e){return YS.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function ZQt(e,t,r,n){var i=r("bgcolor");n.bgColor=BQt.combine(i,n.paper_bgcolor);var a=UQt(n.fullData,rQ.name,n.id),o=n.layoutOut,s;function u(L,_){return r(s+"."+L,_)}for(var l=0;l<k$e.length;l++){s=k$e[l],YS.isPlainObject(e[s])||(e[s]={});var f=e[s],c=OQt.newContainer(t,s);c._id=c._name=s,c._attr=n.id+"."+s,c._traceIndices=a.map(function(L){return L.index});var h=u("visible");if(c.type="linear",WQt(c,o),VQt(f,c,u,c.type),h){var d=s==="realaxis";if(d&&u("side"),d)u("tickvals");else{var p=jQt(t.realaxis.tickvals||KS.realaxis.tickvals.dflt);u("tickvals",p)}YS.isTypedArray(c.tickvals)&&(c.tickvals=Array.from(c.tickvals));var x,b,y,k,E=n.font||{};h&&(x=u("color"),b=x===f.color?x:E.color,y=E.size,k=E.family),HQt(f,c,u,c.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!d,noExp:!0,font:{color:b,size:y,family:k}}),YS.coerce2(e,t,KS,s+".ticklen"),YS.coerce2(e,t,KS,s+".tickwidth"),YS.coerce2(e,t,KS,s+".tickcolor",t.color);var A=u("ticks");A||(delete t[s].ticklen,delete t[s].tickwidth,delete t[s].tickcolor),GQt(f,c,u,{dfltColor:x,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:KS[s]}),u("layer")}u("hoverformat"),delete c.type,c._input=f}}C$e.exports=function(t,r,n){NQt(t,r,n,{noUirevision:!0,type:rQ.name,attributes:KS,handleDefaults:ZQt,font:r.font,paper_bgcolor:r.paper_bgcolor,fullData:n,layoutOut:r})};function XQt(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 F$e=Se((lwr,R$e)=>{"use strict";var YQt=Dd().getSubplotCalcData,KQt=Zr().counterRegex,JQt=H$(),P$e=eQ(),I$e=P$e.attr,gw=P$e.name,z$e=KQt(gw),D$e={};D$e[I$e]={valType:"subplotid",dflt:gw,editType:"calc"};function $Qt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[gw],i=0;i<n.length;i++){var a=n[i],o=YQt(r,gw,a),s=t[a]._subplot;s||(s=JQt(e,a,!0),t[a]._subplot=s),s.plot(o,t,e._promises)}}function QQt(e,t,r,n){for(var i=n._subplots[gw]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;if(!t[o]&&s){s.framework.remove();for(var u in s.clipPaths)s.clipPaths[u].remove()}}}R$e.exports={attr:I$e,name:gw,idRoot:gw,idRegex:z$e,attrRegex:z$e,attributes:D$e,layoutAttributes:tQ(),supplyLayoutDefaults:L$e(),plot:$Qt,clean:QQt,toSVG:Th().toSVG}});var iQ=Se((uwr,q$e)=>{"use strict";var eer=Du().hovertemplateAttrs,ter=Du().texttemplateAttrs,L8=vu().extendFlat,rer=Ey(),d0=Zc(),ier=zf(),JS=d0.line;q$e.exports={mode:d0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:d0.text,texttemplate:ter({editType:"plot"},{keys:["real","imag","text"]}),hovertext:d0.hovertext,line:{color:JS.color,width:JS.width,dash:JS.dash,backoff:JS.backoff,shape:L8({},JS.shape,{values:["linear","spline"]}),smoothing:JS.smoothing,editType:"calc"},connectgaps:d0.connectgaps,marker:d0.marker,cliponaxis:L8({},d0.cliponaxis,{dflt:!1}),textposition:d0.textposition,textfont:d0.textfont,fill:L8({},d0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:rer(),hoverinfo:L8({},ier.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:d0.hoveron,hovertemplate:eer(),selected:d0.selected,unselected:d0.unselected}});var N$e=Se((fwr,O$e)=>{"use strict";var z8=Zr(),$S=ec(),ner=$v(),aer=I0(),B$e=J3(),oer=D0(),ser=Py(),ler=Sm().PTS_LINESONLY,uer=iQ();O$e.exports=function(t,r,n,i){function a(u,l){return z8.coerce(t,r,uer,u,l)}var o=fer(t,r,i,a);if(!o){r.visible=!1;return}a("mode",o<ler?"lines+markers":"lines"),a("text"),a("hovertext"),r.hoveron!=="fills"&&a("hovertemplate"),$S.hasMarkers(r)&&ner(t,r,n,i,a,{gradient:!0}),$S.hasLines(r)&&(aer(t,r,n,i,a,{backoff:!0}),B$e(t,r,a),a("connectgaps")),$S.hasText(r)&&(a("texttemplate"),oer(t,r,i,a));var s=[];($S.hasMarkers(r)||$S.hasText(r))&&(a("cliponaxis"),a("marker.maxdisplayed"),s.push("points")),a("fill"),r.fill!=="none"&&(ser(t,r,n,a),$S.hasLines(r)||B$e(t,r,a)),(r.fill==="tonext"||r.fill==="toself")&&s.push("fills"),a("hoveron",s.join("+")||"points"),z8.coerceSelectionMarkerOpacity(r,a)};function fer(e,t,r,n){var i=n("real"),a=n("imag"),o;return i&&a&&(o=Math.min(i.length,a.length)),z8.isTypedArray(i)&&(t.real=i=Array.from(i)),z8.isTypedArray(a)&&(t.imag=a=Array.from(a)),t._length=o,o}});var H$e=Se((cwr,V$e)=>{"use strict";var U$e=hu();V$e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=U$e.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=U$e.tickText(a.angularAxis,t.imag,!0).text,i}});var j$e=Se((hwr,W$e)=>{"use strict";var G$e=_u(),cer=ju().BADNUM,her=R0(),der=km(),per=F0(),ver=q0().calcMarkerSize;W$e.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"),u=o.makeCalcdata(r,"imag"),l=r._length,f=new Array(l),c=0;c<l;c++){var h=s[c],d=u[c],p=f[c]={};G$e(h)&&G$e(d)?(p.real=h,p.imag=d):p.real=cer}return ver(r,l),her(t,r),der(f,r),per(f,r),f}});var Y$e=Se((dwr,X$e)=>{"use strict";var yer=iT(),Z$e=ju().BADNUM,mer=N$(),ger=mer.smith;X$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},u=0;u<n.length;u++)for(var l=n[u],f=0;f<l.length;f++){f===0&&(l[0].trace._xA=a,l[0].trace._yA=o);var c=l[f],h=c.real;if(h===Z$e)c.x=c.y=Z$e;else{var d=ger([h,c.imag]);c.x=d[0],c.y=d[1]}}yer(t,s,n,i)}});var $$e=Se((pwr,J$e)=>{"use strict";var _er=sT();function xer(e,t,r,n){var i=_er(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],u=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,K$e(s,u,o,a),a.hovertemplate=u.hovertemplate,i}}function K$e(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 u=e.hi||t.hoverinfo,l=[];function f(h,d){l.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var c=u.split("+");c.indexOf("all")!==-1&&(c=["real","imag","text"]),c.indexOf("real")!==-1&&f(i,n.realLabel),c.indexOf("imag")!==-1&&f(a,n.imagLabel),c.indexOf("text")!==-1&&n.text&&(l.push(n.text),delete n.text),n.extraText=l.join("<br>")}}J$e.exports={hoverPoints:xer,makeHoverPointText:K$e}});var eQe=Se((vwr,Q$e)=>{"use strict";Q$e.exports={moduleType:"trace",name:"scattersmith",basePlotModule:F$e(),categories:["smith","symbols","showLegend","scatter-like"],attributes:iQ(),supplyDefaults:N$e(),colorbar:ep(),formatLabels:H$e(),calc:j$e(),plot:Y$e(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:$$e().hoverPoints,selectPoints:lT(),meta:{}}});var rQe=Se((ywr,tQe)=>{"use strict";tQe.exports=eQe()});var Ep=Se((mwr,nQe)=>{var I8=Uh();function iQe(){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={}}I8(iQe.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 nQ(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(cf.local.invalidDate||cf.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function P8(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}I8(nQ.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(cf.local.invalidDate||cf.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(cf.local.differentCalendars||cf.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?"-":"")+P8(Math.abs(this.year()),4)+"-"+P8(this.month(),2)+"-"+P8(this.day(),2)}});function aQ(){this.shortYearCutoff="+10"}I8(aQ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,cf.local.invalidDate||cf.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new nQ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,cf.local.invalidYear||cf.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,cf.local.invalidYear||cf.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+P8(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,cf.local.invalidYear||cf.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,cf.local.invalidMonth||cf.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,cf.local.invalidMonth||cf.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,cf.local.invalidYear||cf.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,cf.local.invalidDate||cf.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,cf.local.invalidDate||cf.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,cf.local.invalidDate||cf.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,cf.local.invalidDate||cf.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(f){for(;o<f.minMonth;)a--,o+=f.monthsInYear(a);for(var c=f.monthsInYear(a);o>c-1+f.minMonth;)a++,o-=c,c=f.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 u=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,u}catch(l){throw this._validateLevel--,l}},_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,cf.local.invalidDate||cf.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,cf.local.invalidDate||cf.regionalOptions[""].invalidDate);return cf.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(e){return this.fromJD(cf.instance().fromJSDate(e).toJD())},_validate:function(e,t,r,n){if(e.year){if(this._validateLevel===0&&this.name!==e.calendar().name)throw(cf.local.differentCalendars||cf.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 oQ(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}oQ.prototype=new aQ;I8(oQ.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,cf.local.invalidYear||cf.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,cf.local.invalidMonth||cf.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,cf.local.invalidDate||cf.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),u=o-(o>13.5?13:1),l=i-(u>2.5?4716:4715);return l<=0&&l--,this.newDate(l,u,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,cf.local.invalidDate||cf.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 cf=nQe.exports=new iQe;cf.cdate=nQ;cf.baseCalendar=aQ;cf.calendars.gregorian=oQ});var aQe=Se(()=>{var sQ=Uh(),Hd=Ep();sQ(Hd.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"});Hd.local=Hd.regionalOptions[""];sQ(Hd.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});sQ(Hd.baseCalendar.prototype,{UNIX_EPOCH:Hd.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Hd.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 Hd.local.invalidFormat||Hd.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,u=r.calculateWeek||this.local.calculateWeek,l=function(A,L){for(var _=1;E+_<e.length&&e.charAt(E+_)===A;)_++;return E+=_-1,Math.floor(_/(L||1))>1},f=function(A,L,_,C){var M=""+L;if(l(A,C))for(;M.length<_;)M="0"+M;return M},c=function(A,L,_,C){return l(A)?C[L]:_[L]},h=this,d=function(A){return typeof a=="function"?a.call(h,A,l("m")):b(f("m",A.month(),2))},p=function(A,L){return L?typeof s=="function"?s.call(h,A):s[A.month()-h.minMonth]:typeof o=="function"?o.call(h,A):o[A.month()-h.minMonth]},x=this.local.digits,b=function(A){return r.localNumbers&&x?x(A):A},y="",k=!1,E=0;E<e.length;E++)if(k)e.charAt(E)==="'"&&!l("'")?k=!1:y+=e.charAt(E);else switch(e.charAt(E)){case"d":y+=b(f("d",t.day(),2));break;case"D":y+=c("D",t.dayOfWeek(),n,i);break;case"o":y+=f("o",t.dayOfYear(),3);break;case"w":y+=f("w",t.weekOfYear(),2);break;case"m":y+=d(t);break;case"M":y+=p(t,l("M"));break;case"y":y+=l("y",2)?t.year():(t.year()%100<10?"0":"")+t.year()%100;break;case"Y":l("Y",2),y+=t.formatYear();break;case"J":y+=t.toJD();break;case"@":y+=(t.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":y+=(t.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":l("'")?y+="'":k=!0;break;default:y+=e.charAt(E)}return y},parseDate:function(e,t,r){if(t==null)throw Hd.local.invalidArguments||Hd.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,u=r.monthNamesShort||this.local.monthNamesShort,l=r.monthNames||this.local.monthNames,f=-1,c=-1,h=-1,d=-1,p=-1,x=!1,b=!1,y=function(F,q){for(var U=1;v+U<e.length&&e.charAt(v+U)===F;)U++;return v+=U-1,Math.floor(U/(q||1))>1},k=function(F,q){var U=y(F,q),H=[2,3,U?4:2,U?4:2,10,11,20]["oyYJ@!".indexOf(F)+1],j=new RegExp("^-?\\d{1,"+H+"}"),G=t.substring(M).match(j);if(!G)throw(Hd.local.missingNumberAt||Hd.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=G[0].length,parseInt(G[0],10)},E=this,A=function(){if(typeof s=="function"){y("m");var F=s.call(E,t.substring(M));return M+=F.length,F}return k("m")},L=function(F,q,U,H){for(var j=y(F,H)?U:q,G=0;G<j.length;G++)if(t.substr(M,j[G].length).toLowerCase()===j[G].toLowerCase())return M+=j[G].length,G+E.minMonth;throw(Hd.local.unknownNameAt||Hd.regionalOptions[""].unknownNameAt).replace(/\{0\}/,M)},_=function(){if(typeof l=="function"){var F=y("M")?l.call(E,t.substring(M)):u.call(E,t.substring(M));return M+=F.length,F}return L("M",u,l)},C=function(){if(t.charAt(M)!==e.charAt(v))throw(Hd.local.unexpectedLiteralAt||Hd.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,M);M++},M=0,v=0;v<e.length;v++)if(b)e.charAt(v)==="'"&&!y("'")?b=!1:C();else switch(e.charAt(v)){case"d":d=k("d");break;case"D":L("D",i,a);break;case"o":p=k("o");break;case"w":k("w");break;case"m":h=A();break;case"M":h=_();break;case"y":var z=v;x=!y("y",2),v=z,c=k("y",2);break;case"Y":c=k("Y",2);break;case"J":f=k("J")+.5,t.charAt(M)==="."&&(M++,k("J"));break;case"@":f=k("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":f=k("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":M=t.length;break;case"'":y("'")?C():b=!0;break;default:C()}if(M<t.length)throw Hd.local.unexpectedText||Hd.regionalOptions[""].unexpectedText;if(c===-1?c=this.today().year():c<100&&x&&(c+=n===-1?1900:this.today().year()-this.today().year()%100-(c<=n?0:100)),typeof h=="string"&&(h=o.call(this,c,h)),p>-1){h=1,d=p;for(var T=this.daysInMonth(c,h);d>T;T=this.daysInMonth(c,h))h++,d-=T}return f>-1?this.fromJD(f):this.newDate(c,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(c){}s=s.toLowerCase();for(var u=(s.match(/^c/)&&r?r.newDate():null)||a.today(),l=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=l.exec(s);f;)u.add(parseInt(f[1],10),f[2]||"d"),f=l.exec(s);return u};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 oQe=Se(()=>{var Dx=Ep(),ber=Uh(),lQ=Dx.instance();function D8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}D8.prototype=new Dx.baseCalendar;ber(D8.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(Ter);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(Aer);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(Ser);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 Dx.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 Dx.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=Rx[e-Rx[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,Dx.local.invalidyear),i=Fx[n-Fx[0]],a=i>>9&4095,o=i>>5&15,s=i&31,u;u=lQ.newDate(a,o,s),u.add(4-(u.dayOfWeek()||7),"d");var l=this.toJD(e,t,r)-u.toJD();return 1+Math.floor(l/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=Rx[e-Rx[0]],n=r>>13,i=n?12:11;if(t>i)throw Dx.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,Dx.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=Eer(e,a,r,i);return lQ.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=lQ.fromJD(e),r=Mer(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(wer),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(D8.prototype).add.call(this,e,t,r);if(r==="y"){var u=s.year(),l=s.month(),f=this.isIntercalaryMonth(u,o),c=a&&f?this.toMonthIndex(u,o,!0):this.toMonthIndex(u,o,!1);c!==l&&s.month(c)}return s}});var wer=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,Ter=/^\d?\d[iI]?/m,Aer=/^闰?十?[一二三四五六七八九]?月/m,Ser=/^闰?十?[一二三四五六七八九]?/m;Dx.calendars.chinese=D8;var Rx=[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],Fx=[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 Mer(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 u=typeof r=="number"&&r>=1&&r<=31;if(!u)throw new Error("Solar day outside range 1 - 31");i={year:e,month:t,day:r},a=n||{}}var l=Fx[i.year-Fx[0]],f=i.year<<9|i.month<<5|i.day;a.year=f>=l?i.year:i.year-1,l=Fx[a.year-Fx[0]];var c=l>>9&4095,h=l>>5&15,d=l&31,p,x=new Date(c,h-1,d),b=new Date(i.year,i.month-1,i.day);p=Math.round((b-x)/(24*3600*1e3));var y=Rx[a.year-Rx[0]],k;for(k=0;k<13;k++){var E=y&1<<12-k?30:29;if(p<E)break;p-=E}var A=y>>13;return!A||k<A?(a.isIntercalary=!1,a.month=1+k):k===A?(a.isIntercalary=!0,a.month=k):(a.isIntercalary=!1,a.month=k),a.day=1+p,a}function Eer(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 u=typeof t=="number"&&t>=1&&t<=12;if(!u)throw new Error("Lunar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=30;if(!l)throw new Error("Lunar day outside range 1 - 30");var f;typeof n=="object"?(f=!1,a=n):(f=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:f}}var c;c=o.day-1;var h=Rx[o.year-Rx[0]],d=h>>13,p;d&&(o.month>d||o.isIntercalary)?p=o.month:p=o.month-1;for(var x=0;x<p;x++){var b=h&1<<12-x?30:29;c+=b}var y=Fx[o.year-Fx[0]],k=y>>9&4095,E=y>>5&15,A=y&31,L=new Date(k,E-1,A+c);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var sQe=Se(()=>{var _w=Ep(),ker=Uh();function uQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}uQ.prototype=new _w.baseCalendar;ker(uQ.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,_w.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,_w.local.invalidYear||_w.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,_w.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,_w.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)}});_w.calendars.coptic=uQ});var lQe=Se(()=>{var b1=Ep(),Cer=Uh();function fQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}fQ.prototype=new b1.baseCalendar;Cer(fQ.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,b1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.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,b1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,b1.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,b1.local.invalidDate);return{century:Ler[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,b1.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 Ler={20:"Fruitbat",21:"Anchovy"};b1.calendars.discworld=fQ});var uQe=Se(()=>{var xw=Ep(),zer=Uh();function cQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}cQ.prototype=new xw.baseCalendar;zer(cQ.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,xw.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,xw.local.invalidYear||xw.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,xw.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,xw.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)}});xw.calendars.ethiopian=cQ});var fQe=Se(()=>{var qx=Ep(),Per=Uh();function hQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}hQ.prototype=new qx.baseCalendar;Per(hQ.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,qx.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,R8(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,qx.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,qx.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,qx.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&R8(this.daysInYear(e),10)===5?30:t===9&&R8(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,qx.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,qx.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 R8(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 R8(e,t){return e-t*Math.floor(e/t)}qx.calendars.hebrew=hQ});var cQe=Se(()=>{var nC=Ep(),Ier=Uh();function dQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}dQ.prototype=new nC.baseCalendar;Ier(dQ.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,nC.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,nC.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,nC.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)}});nC.calendars.islamic=dQ});var hQe=Se(()=>{var aC=Ep(),Der=Uh();function pQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}pQ.prototype=new aC.baseCalendar;Der(pQ.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,aC.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,aC.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,aC.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),u=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,u)}});aC.calendars.julian=pQ});var pQe=Se(()=>{var uy=Ep(),Rer=Uh();function yQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}yQ.prototype=new uy.baseCalendar;Rer(yQ.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,uy.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,uy.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,uy.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,uy.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,uy.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,uy.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,uy.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,uy.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,uy.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=vQ(e+8+17*20,365);return[Math.floor(t/20)+1,vQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[dQe(e+20,20),dQe(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,uy.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 vQ(e,t){return e-t*Math.floor(e/t)}function dQe(e,t){return vQ(e-1,t)+1}uy.calendars.mayan=yQ});var yQe=Se(()=>{var bw=Ep(),Fer=Uh();function mQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}mQ.prototype=new bw.baseCalendar;var vQe=bw.instance("gregorian");Fer(mQ.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,bw.local.invalidYear||bw.regionalOptions[""].invalidYear);return vQe.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,bw.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,bw.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+vQe.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)}});bw.calendars.nanakshahi=mQ});var mQe=Se(()=>{var ww=Ep(),qer=Uh();function gQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}gQ.prototype=new ww.baseCalendar;qer(gQ.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,ww.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,ww.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,ww.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=ww.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var u=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(u))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(u,1,1).add(a,"d").toJD()},fromJD:function(e){var t=ww.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],u=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>u;)o++,o>12&&(o=1,a++),u+=this.NEPALI_CALENDAR_DATA[a][o];var l=this.NEPALI_CALENDAR_DATA[a][o]-(u-i);return this.newDate(a,o,l)},_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]}});ww.calendars.nepali=gQ});var gQe=Se(()=>{var QS=Ep(),Ber=Uh();function F8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}F8.prototype=new QS.baseCalendar;Ber(F8.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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,QS.local.invalidYear);return((t.year()-(t.year()>0?474:473))%2820+474+38)*682%2816<682},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,QS.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,QS.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e-(e>=0?474:473),a=474+_Q(i,2820);return r+(t<=7?(t-1)*31:(t-1)*30+6)+Math.floor((a*682-110)/2816)+(a-1)*365+Math.floor(i/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=e-this.toJD(475,1,1),r=Math.floor(t/1029983),n=_Q(t,1029983),i=2820;if(n!==1029982){var a=Math.floor(n/366),o=_Q(n,366);i=Math.floor((2134*a+2816*o+2815)/1028522)+a+1}var s=i+2820*r+474;s=s<=0?s-1:s;var u=e-this.toJD(s,1,1)+1,l=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),f=e-this.toJD(s,l,1)+1;return this.newDate(s,l,f)}});function _Q(e,t){return e-t*Math.floor(e/t)}QS.calendars.persian=F8;QS.calendars.jalali=F8});var _Qe=Se(()=>{var Tw=Ep(),Oer=Uh(),q8=Tw.instance();function xQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}xQ.prototype=new Tw.baseCalendar;Oer(xQ.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,Tw.local.invalidYear),r=this._t2gYear(t.year());return q8.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Tw.local.invalidYear),i=this._t2gYear(n.year());return q8.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Tw.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,Tw.local.invalidDate),i=this._t2gYear(n.year());return q8.toJD(i,n.month(),n.day())},fromJD:function(e){var t=q8.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)}});Tw.calendars.taiwan=xQ});var xQe=Se(()=>{var Aw=Ep(),Ner=Uh(),B8=Aw.instance();function bQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}bQ.prototype=new Aw.baseCalendar;Ner(bQ.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,Aw.local.invalidYear),r=this._t2gYear(t.year());return B8.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Aw.local.invalidYear),i=this._t2gYear(n.year());return B8.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Aw.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,Aw.local.invalidDate),i=this._t2gYear(n.year());return B8.toJD(i,n.month(),n.day())},fromJD:function(e){var t=B8.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)}});Aw.calendars.thai=bQ});var bQe=Se(()=>{var Sw=Ep(),Uer=Uh();function wQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}wQ.prototype=new Sw.baseCalendar;Uer(wQ.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,Sw.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,Sw.local.invalidMonth),n=r.toJD()-24e5+.5,i=0,a=0;a<Bx.length;a++){if(Bx[a]>n)return Bx[i]-Bx[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,Sw.local.invalidDate),i=12*(n.year()-1)+n.month()-15292,a=n.day()+Bx[i-1]-1;return a+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;n<Bx.length&&!(Bx[n]>t);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),o=a+1,s=i-12*a,u=t-Bx[r-1]+1;return this.newDate(o,s,u)},isValid:function(e,t,r){var n=Sw.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=Sw.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\{0\}/,this.local.name);return i}});Sw.calendars.ummalqura=wQ;var Bx=[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 TQe=Se((Xwr,wQe)=>{"use strict";wQe.exports=Ep();aQe();oQe();sQe();lQe();uQe();fQe();cQe();hQe();pQe();yQe();mQe();gQe();_Qe();xQe();bQe()});var LQe=Se((Ywr,CQe)=>{"use strict";var SQe=TQe(),oC=Zr(),MQe=ju(),Ver=MQe.EPOCHJD,Her=MQe.ONEDAY,SQ={valType:"enumerated",values:oC.sortObjectKeys(SQe.calendars),editType:"calc",dflt:"gregorian"},EQe=function(e,t,r,n){var i={};return i[r]=SQ,oC.coerce(e,t,i,r,n)},Ger=function(e,t,r,n){for(var i=0;i<r.length;i++)EQe(e,t,r[i]+"calendar",n.calendar)},Wer={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"},jer={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"},Zer={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"]},O8="##",Xer={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:O8,w:O8,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function Yer(e,t,r){for(var n=Math.floor((t+.05)/Her)+Ver,i=kQe(r).fromJD(n),a=0,o,s,u,l,f;(a=e.indexOf("%",a))!==-1;)o=e.charAt(a+1),o==="0"||o==="-"||o==="_"?(u=3,s=e.charAt(a+2),o==="_"&&(o="-")):(s=o,o="0",u=2),l=Xer[s],l?(l===O8?f=O8:f=i.formatDate(l[o]),e=e.substr(0,a)+f+e.substr(a+u),a+=f.length):a+=u;return e}var AQe={};function kQe(e){var t=AQe[e];return t||(t=AQe[e]=SQe.instance(e),t)}function sC(e){return oC.extendFlat({},SQ,{description:e})}function MQ(e){return"Sets the calendar system to use with `"+e+"` date data."}var AQ={xcalendar:sC(MQ("x"))},ig=oC.extendFlat({},AQ,{ycalendar:sC(MQ("y"))}),TQ=oC.extendFlat({},ig,{zcalendar:sC(MQ("z"))}),eM=sC(["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(" "));CQe.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:ig,bar:ig,box:ig,heatmap:ig,contour:ig,histogram:ig,histogram2d:ig,histogram2dcontour:ig,scatter3d:TQ,surface:TQ,mesh3d:TQ,scattergl:ig,ohlc:AQ,candlestick:AQ},layout:{calendar:sC(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:eM},yaxis:{calendar:eM},scene:{xaxis:{calendar:eM},yaxis:{calendar:eM},zaxis:{calendar:eM}},polar:{radialaxis:{calendar:eM}}}},layoutAttributes:SQ,handleDefaults:EQe,handleTraceDefaults:Ger,CANONICAL_SUNDAY:jer,CANONICAL_TICK:Wer,DFLTRANGE:Zer,getCal:kQe,worldCalFmt:Yer}});var PQe=Se((Kwr,zQe)=>{"use strict";zQe.exports=LQe()});var Ker=Se((Jwr,DQe)=>{var IQe=Qme();IQe.register([t1e(),V1e(),exe(),xxe(),Ixe(),Cbe(),Vbe(),k2e(),iwe(),Bwe(),A3e(),$4e(),NEe(),LCe(),mLe(),ZLe(),yze(),GPe(),uIe(),EIe(),OIe(),QIe(),pDe(),LDe(),iRe(),TRe(),KOe(),QNe(),dUe(),BUe(),ZVe(),lHe(),PHe(),HGe(),nWe(),kWe(),Fje(),oZe(),UZe(),uYe(),PYe(),QYe(),SKe(),OKe(),qJe(),i$e(),w$e(),rQe(),PQe()]);DQe.exports=IQe});return Ker();})();
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
/*!
 * pad-left <https://github.com/jonschlinkert/pad-left>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT license.
 */
/*!
 * repeat-string <https://github.com/jonschlinkert/repeat-string>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT License.
 */
/*! Bundled license information:

native-promise-only/lib/npo.src.js:
  (*! Native Promise Only
      v0.8.1 (c) Kyle Simpson
      MIT License: http://getify.mit-license.org
  *)

polybooljs/index.js:
  (*
   * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
   * @license MIT
   * @preserve Project Home: https://github.com/voidqk/polybooljs
   *)

ieee754/index.js:
  (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)

buffer/index.js:
  (*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   *)

safe-buffer/index.js:
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)

assert/build/internal/util/comparisons.js:
  (*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
   * @license  MIT
   *)

object-assign/index.js:
  (*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  *)

maplibre-gl/dist/maplibre-gl.js:
  (**
   * MapLibre GL JS
   * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt
   *)
*/

window.Plotly = Plotly;
return Plotly;
}));
