3882 lines
No EOL
4.6 MiB
3882 lines
No EOL
4.6 MiB
/**
|
||
* plotly.js v3.5.0
|
||
* Copyright 2012-2026, 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 xtt=Object.create;var DS=Object.defineProperty,btt=Object.defineProperties,wtt=Object.getOwnPropertyDescriptor,Ttt=Object.getOwnPropertyDescriptors,Att=Object.getOwnPropertyNames,p6=Object.getOwnPropertySymbols,Stt=Object.getPrototypeOf,Aq=Object.prototype.hasOwnProperty,pee=Object.prototype.propertyIsEnumerable;var vee=(e,t,r)=>t in e?DS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_g=(e,t)=>{for(var r in t||(t={}))Aq.call(t,r)&&vee(e,r,t[r]);if(p6)for(var r of p6(t))pee.call(t,r)&&vee(e,r,t[r]);return e},j1=(e,t)=>btt(e,Ttt(t));var gee=(e,t)=>{var r={};for(var n in e)Aq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&p6)for(var n of p6(e))t.indexOf(n)<0&&pee.call(e,n)&&(r[n]=e[n]);return r};var gu=(e,t)=>()=>(e&&(t=e(e=0)),t);var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mee=(e,t)=>{for(var r in t)DS(e,r,{get:t[r],enumerable:!0})},yee=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Att(t))!Aq.call(e,i)&&i!==r&&DS(e,i,{get:()=>t[i],enumerable:!(n=wtt(t,i))||n.enumerable});return e};var Mtt=(e,t,r)=>(r=e!=null?xtt(Stt(e)):{},yee(t||!e||!e.__esModule?DS(r,"default",{value:e,enumerable:!0}):r,e)),pb=e=>yee(DS({},"__esModule",{value:!0}),e);var g6=ye(_ee=>{"use strict";_ee.version="3.5.0"});var bee=ye((xee,m6)=>{(function(t,r,n){r[t]=r[t]||n(),typeof m6!="undefined"&&m6.exports&&(m6.exports=r[t])})("Promise",typeof window!="undefined"?window:xee,function(){"use strict";var t,r,n,i=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(k){return setImmediate(k)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(k,M,T,L){return Object.defineProperty(k,M,{value:T,writable:!0,configurable:L!==!1})}}catch(p){t=function(M,T,L){return M[T]=L,M}}n=function(){var k,M,T;function L(x,C){this.fn=x,this.self=C,this.next=void 0}return{add:function(C,S){T=new L(C,S),M?M.next=T:k=T,M=T,T=void 0},drain:function(){var C=k;for(k=M=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(p,k){n.add(p,k),r||(r=a(n.drain))}function s(p){var k,M=typeof p;return p!=null&&(M=="object"||M=="function")&&(k=p.then),typeof k=="function"?k:!1}function l(){for(var p=0;p<this.chain.length;p++)u(this,this.state===1?this.chain[p].success:this.chain[p].failure,this.chain[p]);this.chain.length=0}function u(p,k,M){var T,L;try{k===!1?M.reject(p.msg):(k===!0?T=p.msg:T=k.call(void 0,p.msg),T===M.promise?M.reject(TypeError("Promise-chain cycle")):(L=s(T))?L.call(T,M.resolve,M.reject):M.resolve(T))}catch(x){M.reject(x)}}function c(p){var k,M=this;if(!M.triggered){M.triggered=!0,M.def&&(M=M.def);try{(k=s(p))?o(function(){var T=new d(M);try{k.call(p,function(){c.apply(T,arguments)},function(){f.apply(T,arguments)})}catch(L){f.call(T,L)}}):(M.msg=p,M.state=1,M.chain.length>0&&o(l,M))}catch(T){f.call(new d(M),T)}}}function f(p){var k=this;k.triggered||(k.triggered=!0,k.def&&(k=k.def),k.msg=p,k.state=2,k.chain.length>0&&o(l,k))}function h(p,k,M,T){for(var L=0;L<k.length;L++)(function(C){p.resolve(k[C]).then(function(g){M(C,g)},T)})(L)}function d(p){this.def=p,this.triggered=!1}function v(p){this.promise=p,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function m(p){if(typeof p!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var k=new v(this);this.then=function(T,L){var x={success:typeof T=="function"?T:!0,failure:typeof L=="function"?L:!1};return x.promise=new this.constructor(function(S,g){if(typeof S!="function"||typeof g!="function")throw TypeError("Not a function");x.resolve=S,x.reject=g}),k.chain.push(x),k.state!==0&&o(l,k),x.promise},this.catch=function(T){return this.then(void 0,T)};try{p.call(void 0,function(T){c.call(k,T)},function(T){f.call(k,T)})}catch(M){f.call(k,M)}}var b=t({},"constructor",m,!1);return m.prototype=b,t(b,"__NPO__",0,!1),t(m,"resolve",function(k){var M=this;return k&&typeof k=="object"&&k.__NPO__===1?k:new M(function(L,x){if(typeof L!="function"||typeof x!="function")throw TypeError("Not a function");L(k)})}),t(m,"reject",function(k){return new this(function(T,L){if(typeof T!="function"||typeof L!="function")throw TypeError("Not a function");L(k)})}),t(m,"all",function(k){var M=this;return i.call(k)!="[object Array]"?M.reject(TypeError("Not an array")):k.length===0?M.resolve([]):new M(function(L,x){if(typeof L!="function"||typeof x!="function")throw TypeError("Not a function");var C=k.length,S=Array(C),g=0;h(M,k,function(E,z){S[E]=z,++g===C&&L(S)},x)})}),t(m,"race",function(k){var M=this;return i.call(k)!="[object Array]"?M.reject(TypeError("Not an array")):new M(function(L,x){if(typeof L!="function"||typeof x!="function")throw TypeError("Not a function");h(M,k,function(S,g){L(g)},x)})}),m})});var qa=ye((wrr,y6)=>{(function(){var e={version:"3.8.2"},t=[].slice,r=function(X){return t.call(X)},n=self.document;function i(X){return X&&(X.ownerDocument||X.document||X).documentElement}function a(X){return X&&(X.ownerDocument&&X.ownerDocument.defaultView||X.document&&X||X.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(X){r=function(se){for(var Te=se.length,Oe=new Array(Te);Te--;)Oe[Te]=se[Te];return Oe}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(X){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(se,Te){s.call(this,se,Te+"")},o.setAttributeNS=function(se,Te,Oe){l.call(this,se,Te,Oe+"")},u.setProperty=function(se,Te,Oe){c.call(this,se,Te+"",Oe)}}e.ascending=f;function f(X,se){return X<se?-1:X>se?1:X>=se?0:NaN}e.descending=function(X,se){return se<X?-1:se>X?1:se>=X?0:NaN},e.min=function(X,se){var Te=-1,Oe=X.length,Ve,Ye;if(arguments.length===1){for(;++Te<Oe;)if((Ye=X[Te])!=null&&Ye>=Ye){Ve=Ye;break}for(;++Te<Oe;)(Ye=X[Te])!=null&&Ve>Ye&&(Ve=Ye)}else{for(;++Te<Oe;)if((Ye=se.call(X,X[Te],Te))!=null&&Ye>=Ye){Ve=Ye;break}for(;++Te<Oe;)(Ye=se.call(X,X[Te],Te))!=null&&Ve>Ye&&(Ve=Ye)}return Ve},e.max=function(X,se){var Te=-1,Oe=X.length,Ve,Ye;if(arguments.length===1){for(;++Te<Oe;)if((Ye=X[Te])!=null&&Ye>=Ye){Ve=Ye;break}for(;++Te<Oe;)(Ye=X[Te])!=null&&Ye>Ve&&(Ve=Ye)}else{for(;++Te<Oe;)if((Ye=se.call(X,X[Te],Te))!=null&&Ye>=Ye){Ve=Ye;break}for(;++Te<Oe;)(Ye=se.call(X,X[Te],Te))!=null&&Ye>Ve&&(Ve=Ye)}return Ve},e.extent=function(X,se){var Te=-1,Oe=X.length,Ve,Ye,Pt;if(arguments.length===1){for(;++Te<Oe;)if((Ye=X[Te])!=null&&Ye>=Ye){Ve=Pt=Ye;break}for(;++Te<Oe;)(Ye=X[Te])!=null&&(Ve>Ye&&(Ve=Ye),Pt<Ye&&(Pt=Ye))}else{for(;++Te<Oe;)if((Ye=se.call(X,X[Te],Te))!=null&&Ye>=Ye){Ve=Pt=Ye;break}for(;++Te<Oe;)(Ye=se.call(X,X[Te],Te))!=null&&(Ve>Ye&&(Ve=Ye),Pt<Ye&&(Pt=Ye))}return[Ve,Pt]};function h(X){return X===null?NaN:+X}function d(X){return!isNaN(X)}e.sum=function(X,se){var Te=0,Oe=X.length,Ve,Ye=-1;if(arguments.length===1)for(;++Ye<Oe;)d(Ve=+X[Ye])&&(Te+=Ve);else for(;++Ye<Oe;)d(Ve=+se.call(X,X[Ye],Ye))&&(Te+=Ve);return Te},e.mean=function(X,se){var Te=0,Oe=X.length,Ve,Ye=-1,Pt=Oe;if(arguments.length===1)for(;++Ye<Oe;)d(Ve=h(X[Ye]))?Te+=Ve:--Pt;else for(;++Ye<Oe;)d(Ve=h(se.call(X,X[Ye],Ye)))?Te+=Ve:--Pt;if(Pt)return Te/Pt},e.quantile=function(X,se){var Te=(X.length-1)*se+1,Oe=Math.floor(Te),Ve=+X[Oe-1],Ye=Te-Oe;return Ye?Ve+Ye*(X[Oe]-Ve):Ve},e.median=function(X,se){var Te=[],Oe=X.length,Ve,Ye=-1;if(arguments.length===1)for(;++Ye<Oe;)d(Ve=h(X[Ye]))&&Te.push(Ve);else for(;++Ye<Oe;)d(Ve=h(se.call(X,X[Ye],Ye)))&&Te.push(Ve);if(Te.length)return e.quantile(Te.sort(f),.5)},e.variance=function(X,se){var Te=X.length,Oe=0,Ve,Ye,Pt=0,at=-1,Wt=0;if(arguments.length===1)for(;++at<Te;)d(Ve=h(X[at]))&&(Ye=Ve-Oe,Oe+=Ye/++Wt,Pt+=Ye*(Ve-Oe));else for(;++at<Te;)d(Ve=h(se.call(X,X[at],at)))&&(Ye=Ve-Oe,Oe+=Ye/++Wt,Pt+=Ye*(Ve-Oe));if(Wt>1)return Pt/(Wt-1)},e.deviation=function(){var X=e.variance.apply(this,arguments);return X&&Math.sqrt(X)};function v(X){return{left:function(se,Te,Oe,Ve){for(arguments.length<3&&(Oe=0),arguments.length<4&&(Ve=se.length);Oe<Ve;){var Ye=Oe+Ve>>>1;X(se[Ye],Te)<0?Oe=Ye+1:Ve=Ye}return Oe},right:function(se,Te,Oe,Ve){for(arguments.length<3&&(Oe=0),arguments.length<4&&(Ve=se.length);Oe<Ve;){var Ye=Oe+Ve>>>1;X(se[Ye],Te)>0?Ve=Ye:Oe=Ye+1}return Oe}}}var m=v(f);e.bisectLeft=m.left,e.bisect=e.bisectRight=m.right,e.bisector=function(X){return v(X.length===1?function(se,Te){return f(X(se),Te)}:X)},e.shuffle=function(X,se,Te){(Oe=arguments.length)<3&&(Te=X.length,Oe<2&&(se=0));for(var Oe=Te-se,Ve,Ye;Oe;)Ye=Math.random()*Oe--|0,Ve=X[Oe+se],X[Oe+se]=X[Ye+se],X[Ye+se]=Ve;return X},e.permute=function(X,se){for(var Te=se.length,Oe=new Array(Te);Te--;)Oe[Te]=X[se[Te]];return Oe},e.pairs=function(X){for(var se=0,Te=X.length-1,Oe,Ve=X[0],Ye=new Array(Te<0?0:Te);se<Te;)Ye[se]=[Oe=Ve,Ve=X[++se]];return Ye},e.transpose=function(X){if(!(Ye=X.length))return[];for(var se=-1,Te=e.min(X,b),Oe=new Array(Te);++se<Te;)for(var Ve=-1,Ye,Pt=Oe[se]=new Array(Ye);++Ve<Ye;)Pt[Ve]=X[Ve][se];return Oe};function b(X){return X.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(X){var se=[];for(var Te in X)se.push(Te);return se},e.values=function(X){var se=[];for(var Te in X)se.push(X[Te]);return se},e.entries=function(X){var se=[];for(var Te in X)se.push({key:Te,value:X[Te]});return se},e.merge=function(X){for(var se=X.length,Te,Oe=-1,Ve=0,Ye,Pt;++Oe<se;)Ve+=X[Oe].length;for(Ye=new Array(Ve);--se>=0;)for(Pt=X[se],Te=Pt.length;--Te>=0;)Ye[--Ve]=Pt[Te];return Ye};var p=Math.abs;e.range=function(X,se,Te){if(arguments.length<3&&(Te=1,arguments.length<2&&(se=X,X=0)),(se-X)/Te===1/0)throw new Error("infinite range");var Oe=[],Ve=k(p(Te)),Ye=-1,Pt;if(X*=Ve,se*=Ve,Te*=Ve,Te<0)for(;(Pt=X+Te*++Ye)>se;)Oe.push(Pt/Ve);else for(;(Pt=X+Te*++Ye)<se;)Oe.push(Pt/Ve);return Oe};function k(X){for(var se=1;X*se%1;)se*=10;return se}function M(X,se){for(var Te in se)Object.defineProperty(X.prototype,Te,{value:se[Te],enumerable:!1})}e.map=function(X,se){var Te=new T;if(X instanceof T)X.forEach(function(at,Wt){Te.set(at,Wt)});else if(Array.isArray(X)){var Oe=-1,Ve=X.length,Ye;if(arguments.length===1)for(;++Oe<Ve;)Te.set(Oe,X[Oe]);else for(;++Oe<Ve;)Te.set(se.call(X,Ye=X[Oe],Oe),Ye)}else for(var Pt in X)Te.set(Pt,X[Pt]);return Te};function T(){this._=Object.create(null)}var L="__proto__",x="\0";M(T,{has:g,get:function(X){return this._[C(X)]},set:function(X,se){return this._[C(X)]=se},remove:P,keys:E,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:S(se),value:this._[se]});return X},size:z,empty:q,forEach:function(X){for(var se in this._)X.call(this,S(se),this._[se])}});function C(X){return(X+="")===L||X[0]===x?x+X:X}function S(X){return(X+="")[0]===x?X.slice(1):X}function g(X){return C(X)in this._}function P(X){return(X=C(X))in this._&&delete this._[X]}function E(){var X=[];for(var se in this._)X.push(S(se));return X}function z(){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=[],Te=[],Oe,Ve;function Ye(at,Wt,dr){if(dr>=se.length)return Ve?Ve.call(X,Wt):Oe?Wt.sort(Oe):Wt;for(var pr=-1,Ur=Wt.length,zr=se[dr++],gi,xi,Wr,ii=new T,di;++pr<Ur;)(di=ii.get(gi=zr(xi=Wt[pr])))?di.push(xi):ii.set(gi,[xi]);return at?(xi=at(),Wr=function(Li,Ti){xi.set(Li,Ye(at,Ti,dr))}):(xi={},Wr=function(Li,Ti){xi[Li]=Ye(at,Ti,dr)}),ii.forEach(Wr),xi}function Pt(at,Wt){if(Wt>=se.length)return at;var dr=[],pr=Te[Wt++];return at.forEach(function(Ur,zr){dr.push({key:Ur,values:Pt(zr,Wt)})}),pr?dr.sort(function(Ur,zr){return pr(Ur.key,zr.key)}):dr}return X.map=function(at,Wt){return Ye(Wt,at,0)},X.entries=function(at){return Pt(Ye(e.map,at,0),0)},X.key=function(at){return se.push(at),X},X.sortKeys=function(at){return Te[se.length-1]=at,X},X.sortValues=function(at){return Oe=at,X},X.rollup=function(at){return Ve=at,X},X},e.set=function(X){var se=new U;if(X)for(var Te=0,Oe=X.length;Te<Oe;++Te)se.add(X[Te]);return se};function U(){this._=Object.create(null)}M(U,{has:g,add:function(X){return this._[C(X+="")]=!0,X},remove:P,values:E,size:z,empty:q,forEach:function(X){for(var se in this._)X.call(this,S(se))}}),e.behavior={};function G(X){return X}e.rebind=function(X,se){for(var Te=1,Oe=arguments.length,Ve;++Te<Oe;)X[Ve=arguments[Te]]=Z(X,se,se[Ve]);return X};function Z(X,se,Te){return function(){var Oe=Te.apply(se,arguments);return Oe===se?X:Oe}}function j(X,se){if(se in X)return se;se=se.charAt(0).toUpperCase()+se.slice(1);for(var Te=0,Oe=N.length;Te<Oe;++Te){var Ve=N[Te]+se;if(Ve in X)return Ve}}var N=["webkit","ms","moz","Moz","o","O"];function H(){}e.dispatch=function(){for(var X=new re,se=-1,Te=arguments.length;++se<Te;)X[arguments[se]]=oe(X);return X};function re(){}re.prototype.on=function(X,se){var Te=X.indexOf("."),Oe="";if(Te>=0&&(Oe=X.slice(Te+1),X=X.slice(0,Te)),X)return arguments.length<2?this[X].on(Oe):this[X].on(Oe,se);if(arguments.length===2){if(se==null)for(X in this)this.hasOwnProperty(X)&&this[X].on(Oe,null);return this}};function oe(X){var se=[],Te=new T;function Oe(){for(var Ve=se,Ye=-1,Pt=Ve.length,at;++Ye<Pt;)(at=Ve[Ye].on)&&at.apply(this,arguments);return X}return Oe.on=function(Ve,Ye){var Pt=Te.get(Ve),at;return arguments.length<2?Pt&&Pt.on:(Pt&&(Pt.on=null,se=se.slice(0,at=se.indexOf(Pt)).concat(se.slice(at+1)),Te.remove(Ve)),Ye&&se.push(Te.set(Ve,{on:Ye})),X)},Oe}e.event=null;function _e(){e.event.preventDefault()}function ke(){for(var X=e.event,se;se=X.sourceEvent;)X=se;return X}function Ce(X){for(var se=new re,Te=0,Oe=arguments.length;++Te<Oe;)se[arguments[Te]]=oe(se);return se.of=function(Ve,Ye){return function(Pt){try{var at=Pt.sourceEvent=e.event;Pt.target=X,e.event=Pt,se[Pt.type].apply(Ve,Ye)}finally{e.event=at}}},se}e.requote=function(X){return X.replace(ge,"\\$&")};var ge=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ie={}.__proto__?function(X,se){X.__proto__=se}:function(X,se){for(var Te in se)X[Te]=se[Te]};function Se(X){return ie(X,Le),X}var Ee=function(X,se){return se.querySelector(X)},we=function(X,se){return se.querySelectorAll(X)},De=function(X,se){var Te=X.matches||X[j(X,"matchesSelector")];return De=function(Oe,Ve){return Te.call(Oe,Ve)},De(X,se)};typeof Sizzle=="function"&&(Ee=function(X,se){return Sizzle(X,se)[0]||null},we=Sizzle,De=Sizzle.matchesSelector),e.selection=function(){return e.select(n.documentElement)};var Le=e.selection.prototype=[];Le.select=function(X){var se=[],Te,Oe,Ve,Ye;X=me(X);for(var Pt=-1,at=this.length;++Pt<at;){se.push(Te=[]),Te.parentNode=(Ve=this[Pt]).parentNode;for(var Wt=-1,dr=Ve.length;++Wt<dr;)(Ye=Ve[Wt])?(Te.push(Oe=X.call(Ye,Ye.__data__,Wt,Pt)),Oe&&"__data__"in Ye&&(Oe.__data__=Ye.__data__)):Te.push(null)}return Se(se)};function me(X){return typeof X=="function"?X:function(){return Ee(X,this)}}Le.selectAll=function(X){var se=[],Te,Oe;X=Pe(X);for(var Ve=-1,Ye=this.length;++Ve<Ye;)for(var Pt=this[Ve],at=-1,Wt=Pt.length;++at<Wt;)(Oe=Pt[at])&&(se.push(Te=r(X.call(Oe,Oe.__data__,at,Ve))),Te.parentNode=Oe);return Se(se)};function Pe(X){return typeof X=="function"?X:function(){return we(X,this)}}var ce="http://www.w3.org/1999/xhtml",He={svg:"http://www.w3.org/2000/svg",xhtml:ce,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};e.ns={prefix:He,qualify:function(X){var se=X.indexOf(":"),Te=X;return se>=0&&(Te=X.slice(0,se))!=="xmlns"&&(X=X.slice(se+1)),He.hasOwnProperty(Te)?{space:He[Te],local:X}:X}},Le.attr=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Te=this.node();return X=e.ns.qualify(X),X.local?Te.getAttributeNS(X.space,X.local):Te.getAttribute(X)}for(se in X)this.each(lt(se,X[se]));return this}return this.each(lt(X,se))};function lt(X,se){X=e.ns.qualify(X);function Te(){this.removeAttribute(X)}function Oe(){this.removeAttributeNS(X.space,X.local)}function Ve(){this.setAttribute(X,se)}function Ye(){this.setAttributeNS(X.space,X.local,se)}function Pt(){var Wt=se.apply(this,arguments);Wt==null?this.removeAttribute(X):this.setAttribute(X,Wt)}function at(){var Wt=se.apply(this,arguments);Wt==null?this.removeAttributeNS(X.space,X.local):this.setAttributeNS(X.space,X.local,Wt)}return se==null?X.local?Oe:Te:typeof se=="function"?X.local?at:Pt:X.local?Ye:Ve}function mt(X){return X.trim().replace(/\s+/g," ")}Le.classed=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Te=this.node(),Oe=(X=st(X)).length,Ve=-1;if(se=Te.classList){for(;++Ve<Oe;)if(!se.contains(X[Ve]))return!1}else for(se=Te.getAttribute("class");++Ve<Oe;)if(!Vt(X[Ve]).test(se))return!1;return!0}for(se in X)this.each(ct(se,X[se]));return this}return this.each(ct(X,se))};function Vt(X){return new RegExp("(?:^|\\s+)"+e.requote(X)+"(?:\\s+|$)","g")}function st(X){return(X+"").trim().split(/^|\s+/)}function ct(X,se){X=st(X).map(Qt);var Te=X.length;function Oe(){for(var Ye=-1;++Ye<Te;)X[Ye](this,se)}function Ve(){for(var Ye=-1,Pt=se.apply(this,arguments);++Ye<Te;)X[Ye](this,Pt)}return typeof se=="function"?Ve:Oe}function Qt(X){var se=Vt(X);return function(Te,Oe){if(Ve=Te.classList)return Oe?Ve.add(X):Ve.remove(X);var Ve=Te.getAttribute("class")||"";Oe?(se.lastIndex=0,se.test(Ve)||Te.setAttribute("class",mt(Ve+" "+X))):Te.setAttribute("class",mt(Ve.replace(se," ")))}}Le.style=function(X,se,Te){var Oe=arguments.length;if(Oe<3){if(typeof X!="string"){Oe<2&&(se="");for(Te in X)this.each(Ht(Te,X[Te],se));return this}if(Oe<2){var Ve=this.node();return a(Ve).getComputedStyle(Ve,null).getPropertyValue(X)}Te=""}return this.each(Ht(X,se,Te))};function Ht(X,se,Te){function Oe(){this.style.removeProperty(X)}function Ve(){this.style.setProperty(X,se,Te)}function Ye(){var Pt=se.apply(this,arguments);Pt==null?this.style.removeProperty(X):this.style.setProperty(X,Pt,Te)}return se==null?Oe:typeof se=="function"?Ye:Ve}Le.property=function(X,se){if(arguments.length<2){if(typeof X=="string")return this.node()[X];for(se in X)this.each(nr(se,X[se]));return this}return this.each(nr(X,se))};function nr(X,se){function Te(){delete this[X]}function Oe(){this[X]=se}function Ve(){var Ye=se.apply(this,arguments);Ye==null?delete this[X]:this[X]=Ye}return se==null?Te:typeof se=="function"?Ve:Oe}Le.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},Le.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},Le.append=function(X){return X=tt(X),this.select(function(){return this.appendChild(X.apply(this,arguments))})};function tt(X){function se(){var Oe=this.ownerDocument,Ve=this.namespaceURI;return Ve===ce&&Oe.documentElement.namespaceURI===ce?Oe.createElement(X):Oe.createElementNS(Ve,X)}function Te(){return this.ownerDocument.createElementNS(X.space,X.local)}return typeof X=="function"?X:(X=e.ns.qualify(X)).local?Te:se}Le.insert=function(X,se){return X=tt(X),se=me(se),this.select(function(){return this.insertBefore(X.apply(this,arguments),se.apply(this,arguments)||null)})},Le.remove=function(){return this.each(je)};function je(){var X=this.parentNode;X&&X.removeChild(this)}Le.data=function(X,se){var Te=-1,Oe=this.length,Ve,Ye;if(!arguments.length){for(X=new Array(Oe=(Ve=this[0]).length);++Te<Oe;)(Ye=Ve[Te])&&(X[Te]=Ye.__data__);return X}function Pt(pr,Ur){var zr,gi=pr.length,xi=Ur.length,Wr=Math.min(gi,xi),ii=new Array(xi),di=new Array(xi),Li=new Array(gi),Ti,Qr;if(se){var Pn=new T,kn=new Array(gi),Bn;for(zr=-1;++zr<gi;)(Ti=pr[zr])&&(Pn.has(Bn=se.call(Ti,Ti.__data__,zr))?Li[zr]=Ti:Pn.set(Bn,Ti),kn[zr]=Bn);for(zr=-1;++zr<xi;)(Ti=Pn.get(Bn=se.call(Ur,Qr=Ur[zr],zr)))?Ti!==!0&&(ii[zr]=Ti,Ti.__data__=Qr):di[zr]=Ue(Qr),Pn.set(Bn,!0);for(zr=-1;++zr<gi;)zr in kn&&Pn.get(kn[zr])!==!0&&(Li[zr]=pr[zr])}else{for(zr=-1;++zr<Wr;)Ti=pr[zr],Qr=Ur[zr],Ti?(Ti.__data__=Qr,ii[zr]=Ti):di[zr]=Ue(Qr);for(;zr<xi;++zr)di[zr]=Ue(Ur[zr]);for(;zr<gi;++zr)Li[zr]=pr[zr]}di.update=ii,di.parentNode=ii.parentNode=Li.parentNode=pr.parentNode,at.push(di),Wt.push(ii),dr.push(Li)}var at=Tt([]),Wt=Se([]),dr=Se([]);if(typeof X=="function")for(;++Te<Oe;)Pt(Ve=this[Te],X.call(Ve,Ve.parentNode.__data__,Te));else for(;++Te<Oe;)Pt(Ve=this[Te],X);return Wt.enter=function(){return at},Wt.exit=function(){return dr},Wt};function Ue(X){return{__data__:X}}Le.datum=function(X){return arguments.length?this.property("__data__",X):this.property("__data__")},Le.filter=function(X){var se=[],Te,Oe,Ve;typeof X!="function"&&(X=Ae(X));for(var Ye=0,Pt=this.length;Ye<Pt;Ye++){se.push(Te=[]),Te.parentNode=(Oe=this[Ye]).parentNode;for(var at=0,Wt=Oe.length;at<Wt;at++)(Ve=Oe[at])&&X.call(Ve,Ve.__data__,at,Ye)&&Te.push(Ve)}return Se(se)};function Ae(X){return function(){return De(this,X)}}Le.order=function(){for(var X=-1,se=this.length;++X<se;)for(var Te=this[X],Oe=Te.length-1,Ve=Te[Oe],Ye;--Oe>=0;)(Ye=Te[Oe])&&(Ve&&Ve!==Ye.nextSibling&&Ve.parentNode.insertBefore(Ye,Ve),Ve=Ye);return this},Le.sort=function(X){X=rt.apply(this,arguments);for(var se=-1,Te=this.length;++se<Te;)this[se].sort(X);return this.order()};function rt(X){return arguments.length||(X=f),function(se,Te){return se&&Te?X(se.__data__,Te.__data__):!se-!Te}}Le.each=function(X){return St(this,function(se,Te,Oe){X.call(se,se.__data__,Te,Oe)})};function St(X,se){for(var Te=0,Oe=X.length;Te<Oe;Te++)for(var Ve=X[Te],Ye=0,Pt=Ve.length,at;Ye<Pt;Ye++)(at=Ve[Ye])&&se(at,Ye,Te);return X}Le.call=function(X){var se=r(arguments);return X.apply(se[0]=this,se),this},Le.empty=function(){return!this.node()},Le.node=function(){for(var X=0,se=this.length;X<se;X++)for(var Te=this[X],Oe=0,Ve=Te.length;Oe<Ve;Oe++){var Ye=Te[Oe];if(Ye)return Ye}return null},Le.size=function(){var X=0;return St(this,function(){++X}),X};function Tt(X){return ie(X,dt),X}var dt=[];e.selection.enter=Tt,e.selection.enter.prototype=dt,dt.append=Le.append,dt.empty=Le.empty,dt.node=Le.node,dt.call=Le.call,dt.size=Le.size,dt.select=function(X){for(var se=[],Te,Oe,Ve,Ye,Pt,at=-1,Wt=this.length;++at<Wt;){Ve=(Ye=this[at]).update,se.push(Te=[]),Te.parentNode=Ye.parentNode;for(var dr=-1,pr=Ye.length;++dr<pr;)(Pt=Ye[dr])?(Te.push(Ve[dr]=Oe=X.call(Ye.parentNode,Pt.__data__,dr,at)),Oe.__data__=Pt.__data__):Te.push(null)}return Se(se)},dt.insert=function(X,se){return arguments.length<2&&(se=Et(this)),Le.insert.call(this,X,se)};function Et(X){var se,Te;return function(Oe,Ve,Ye){var Pt=X[Ye].update,at=Pt.length,Wt;for(Ye!=Te&&(Te=Ye,se=0),Ve>=se&&(se=Ve+1);!(Wt=Pt[se])&&++se<at;);return Wt}}e.select=function(X){var se;return typeof X=="string"?(se=[Ee(X,n)],se.parentNode=n.documentElement):(se=[X],se.parentNode=i(X)),Se([se])},e.selectAll=function(X){var se;return typeof X=="string"?(se=r(we(X,n)),se.parentNode=n.documentElement):(se=r(X),se.parentNode=null),Se([se])},Le.on=function(X,se,Te){var Oe=arguments.length;if(Oe<3){if(typeof X!="string"){Oe<2&&(se=!1);for(Te in X)this.each(pt(Te,X[Te],se));return this}if(Oe<2)return(Oe=this.node()["__on"+X])&&Oe._;Te=!1}return this.each(pt(X,se,Te))};function pt(X,se,Te){var Oe="__on"+X,Ve=X.indexOf("."),Ye=or;Ve>0&&(X=X.slice(0,Ve));var Pt=Xt.get(X);Pt&&(X=Pt,Ye=_r);function at(){var pr=this[Oe];pr&&(this.removeEventListener(X,pr,pr.$),delete this[Oe])}function Wt(){var pr=Ye(se,r(arguments));at.call(this),this.addEventListener(X,this[Oe]=pr,pr.$=Te),pr._=se}function dr(){var pr=new RegExp("^__on([^.]+)"+e.requote(X)+"$"),Ur;for(var zr in this)if(Ur=zr.match(pr)){var gi=this[zr];this.removeEventListener(Ur[1],gi,gi.$),delete this[zr]}}return Ve?se?Wt:at:se?H:dr}var Xt=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&Xt.forEach(function(X){"on"+X in n&&Xt.remove(X)});function or(X,se){return function(Te){var Oe=e.event;e.event=Te,se[0]=this.__data__;try{X.apply(this,se)}finally{e.event=Oe}}}function _r(X,se){var Te=or(X,se);return function(Oe){var Ve=this,Ye=Oe.relatedTarget;(!Ye||Ye!==Ve&&!(Ye.compareDocumentPosition(Ve)&8))&&Te.call(Ve,Oe)}}var Er,ei=0;function qr(X){var se=".dragsuppress-"+ ++ei,Te="click"+se,Oe=e.select(a(X)).on("touchmove"+se,_e).on("dragstart"+se,_e).on("selectstart"+se,_e);if(Er==null&&(Er="onselectstart"in X?!1:j(X.style,"userSelect")),Er){var Ve=i(X).style,Ye=Ve[Er];Ve[Er]="none"}return function(Pt){if(Oe.on(se,null),Er&&(Ve[Er]=Ye),Pt){var at=function(){Oe.on(Te,null)};Oe.on(Te,function(){_e(),at()},!0),setTimeout(at,0)}}}e.mouse=function(X){return gt(X,ke())};var jr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function gt(X,se){se.changedTouches&&(se=se.changedTouches[0]);var Te=X.ownerSVGElement||X;if(Te.createSVGPoint){var Oe=Te.createSVGPoint();if(jr<0){var Ve=a(X);if(Ve.scrollX||Ve.scrollY){Te=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ye=Te[0][0].getScreenCTM();jr=!(Ye.f||Ye.e),Te.remove()}}return jr?(Oe.x=se.pageX,Oe.y=se.pageY):(Oe.x=se.clientX,Oe.y=se.clientY),Oe=Oe.matrixTransform(X.getScreenCTM().inverse()),[Oe.x,Oe.y]}var Pt=X.getBoundingClientRect();return[se.clientX-Pt.left-X.clientLeft,se.clientY-Pt.top-X.clientTop]}e.touch=function(X,se,Te){if(arguments.length<3&&(Te=se,se=ke().changedTouches),se){for(var Oe=0,Ve=se.length,Ye;Oe<Ve;++Oe)if((Ye=se[Oe]).identifier===Te)return gt(X,Ye)}},e.behavior.drag=function(){var X=Ce(Ve,"drag","dragstart","dragend"),se=null,Te=Ye(H,e.mouse,a,"mousemove","mouseup"),Oe=Ye(Ge,e.touch,G,"touchmove","touchend");function Ve(){this.on("mousedown.drag",Te).on("touchstart.drag",Oe)}function Ye(Pt,at,Wt,dr,pr){return function(){var Ur=this,zr=e.event.target.correspondingElement||e.event.target,gi=Ur.parentNode,xi=X.of(Ur,arguments),Wr=0,ii=Pt(),di=".drag"+(ii==null?"":"-"+ii),Li,Ti=e.select(Wt(zr)).on(dr+di,kn).on(pr+di,Bn),Qr=qr(zr),Pn=at(gi,ii);se?(Li=se.apply(Ur,arguments),Li=[Li.x-Pn[0],Li.y-Pn[1]]):Li=[0,0],xi({type:"dragstart"});function kn(){var na=at(gi,ii),Ea,Ia;na&&(Ea=na[0]-Pn[0],Ia=na[1]-Pn[1],Wr|=Ea|Ia,Pn=na,xi({type:"drag",x:na[0]+Li[0],y:na[1]+Li[1],dx:Ea,dy:Ia}))}function Bn(){at(gi,ii)&&(Ti.on(dr+di,null).on(pr+di,null),Qr(Wr),xi({type:"dragend"}))}}}return Ve.origin=function(Pt){return arguments.length?(se=Pt,Ve):se},e.rebind(Ve,X,"on")};function Ge(){return e.event.changedTouches[0].identifier}e.touches=function(X,se){return arguments.length<2&&(se=ke().touches),se?r(se).map(function(Te){var Oe=gt(X,Te);return Oe.identifier=Te.identifier,Oe}):[]};var Je=1e-6,We=Je*Je,et=Math.PI,xt=2*et,At=xt-Je,Kt=et/2,er=et/180,Sr=180/et;function Gr(X){return X>0?1:X<0?-1:0}function Ir(X,se,Te){return(se[0]-X[0])*(Te[1]-X[1])-(se[1]-X[1])*(Te[0]-X[0])}function Yr(X){return X>1?0:X<-1?et:Math.acos(X)}function _i(X){return X>1?Kt:X<-1?-Kt:Math.asin(X)}function Pi(X){return((X=Math.exp(X))-1/X)/2}function ai(X){return((X=Math.exp(X))+1/X)/2}function mi(X){return((X=Math.exp(2*X))-1)/(X+1)}function un(X){return(X=Math.sin(X/2))*X}var Fn=Math.SQRT2,An=2,Hn=4;e.interpolateZoom=function(X,se){var Te=X[0],Oe=X[1],Ve=X[2],Ye=se[0],Pt=se[1],at=se[2],Wt=Ye-Te,dr=Pt-Oe,pr=Wt*Wt+dr*dr,Ur,zr;if(pr<We)zr=Math.log(at/Ve)/Fn,Ur=function(Li){return[Te+Li*Wt,Oe+Li*dr,Ve*Math.exp(Fn*Li*zr)]};else{var gi=Math.sqrt(pr),xi=(at*at-Ve*Ve+Hn*pr)/(2*Ve*An*gi),Wr=(at*at-Ve*Ve-Hn*pr)/(2*at*An*gi),ii=Math.log(Math.sqrt(xi*xi+1)-xi),di=Math.log(Math.sqrt(Wr*Wr+1)-Wr);zr=(di-ii)/Fn,Ur=function(Li){var Ti=Li*zr,Qr=ai(ii),Pn=Ve/(An*gi)*(Qr*mi(Fn*Ti+ii)-Pi(ii));return[Te+Pn*Wt,Oe+Pn*dr,Ve*Qr/ai(Fn*Ti+ii)]}}return Ur.duration=zr*1e3,Ur},e.behavior.zoom=function(){var X={x:0,y:0,k:1},se,Te,Oe,Ve=[960,500],Ye=Qn,Pt=250,at=0,Wt="mousedown.zoom",dr="mousemove.zoom",pr="mouseup.zoom",Ur,zr="touchstart.zoom",gi,xi=Ce(Ti,"zoomstart","zoom","zoomend"),Wr,ii,di,Li;Kn||(Kn="onwheel"in n?(Vi=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in n?(Vi=function(){return e.event.wheelDelta},"mousewheel"):(Vi=function(){return-e.event.detail},"MozMousePixelScroll"));function Ti(Un){Un.on(Wt,go).on(Kn+".zoom",Ms).on("dblclick.zoom",Xs).on(zr,Is)}Ti.event=function(Un){Un.each(function(){var ja=xi.of(this,arguments),Fo=X;Bo?e.select(this).transition().each("start.zoom",function(){X=this.__chart__||{x:0,y:0,k:1},Ia(ja)}).tween("zoom:zoom",function(){var Uo=Ve[0],$s=Ve[1],Sl=Te?Te[0]:Uo/2,bu=Te?Te[1]:$s/2,dl=e.interpolateZoom([(Sl-X.x)/X.k,(bu-X.y)/X.k,Uo/X.k],[(Sl-Fo.x)/Fo.k,(bu-Fo.y)/Fo.k,Uo/Fo.k]);return function(Sc){var Me=dl(Sc),bt=Uo/Me[2];this.__chart__=X={x:Sl-Me[0]*bt,y:bu-Me[1]*bt,k:bt},yo(ja)}}).each("interrupt.zoom",function(){Da(ja)}).each("end.zoom",function(){Da(ja)}):(this.__chart__=X,Ia(ja),yo(ja),Da(ja))})},Ti.translate=function(Un){return arguments.length?(X={x:+Un[0],y:+Un[1],k:X.k},Ea(),Ti):[X.x,X.y]},Ti.scale=function(Un){return arguments.length?(X={x:X.x,y:X.y,k:null},kn(+Un),Ea(),Ti):X.k},Ti.scaleExtent=function(Un){return arguments.length?(Ye=Un==null?Qn:[+Un[0],+Un[1]],Ti):Ye},Ti.center=function(Un){return arguments.length?(Oe=Un&&[+Un[0],+Un[1]],Ti):Oe},Ti.size=function(Un){return arguments.length?(Ve=Un&&[+Un[0],+Un[1]],Ti):Ve},Ti.duration=function(Un){return arguments.length?(Pt=+Un,Ti):Pt},Ti.x=function(Un){return arguments.length?(ii=Un,Wr=Un.copy(),X={x:0,y:0,k:1},Ti):ii},Ti.y=function(Un){return arguments.length?(Li=Un,di=Un.copy(),X={x:0,y:0,k:1},Ti):Li};function Qr(Un){return[(Un[0]-X.x)/X.k,(Un[1]-X.y)/X.k]}function Pn(Un){return[Un[0]*X.k+X.x,Un[1]*X.k+X.y]}function kn(Un){X.k=Math.max(Ye[0],Math.min(Ye[1],Un))}function Bn(Un,ja){ja=Pn(ja),X.x+=Un[0]-ja[0],X.y+=Un[1]-ja[1]}function na(Un,ja,Fo,Uo){Un.__chart__={x:X.x,y:X.y,k:X.k},kn(Math.pow(2,Uo)),Bn(Te=ja,Fo),Un=e.select(Un),Pt>0&&(Un=Un.transition().duration(Pt)),Un.call(Ti.event)}function Ea(){ii&&ii.domain(Wr.range().map(function(Un){return(Un-X.x)/X.k}).map(Wr.invert)),Li&&Li.domain(di.range().map(function(Un){return(Un-X.y)/X.k}).map(di.invert))}function Ia(Un){at++||Un({type:"zoomstart"})}function yo(Un){Ea(),Un({type:"zoom",scale:X.k,translate:[X.x,X.y]})}function Da(Un){--at||(Un({type:"zoomend"}),Te=null)}function go(){var Un=this,ja=xi.of(Un,arguments),Fo=0,Uo=e.select(a(Un)).on(dr,bu).on(pr,dl),$s=Qr(e.mouse(Un)),Sl=qr(Un);fa.call(Un),Ia(ja);function bu(){Fo=1,Bn(e.mouse(Un),$s),yo(ja)}function dl(){Uo.on(dr,null).on(pr,null),Sl(Fo),Da(ja)}}function Is(){var Un=this,ja=xi.of(Un,arguments),Fo={},Uo=0,$s,Sl=".zoom-"+e.event.changedTouches[0].identifier,bu="touchmove"+Sl,dl="touchend"+Sl,Sc=[],Me=e.select(Un),bt=qr(Un);Lr(),Ia(ja),Me.on(Wt,null).on(zr,Lr);function Ot(){var Nr=e.touches(Un);return $s=X.k,Nr.forEach(function(vi){vi.identifier in Fo&&(Fo[vi.identifier]=Qr(vi))}),Nr}function Lr(){var Nr=e.event.target;e.select(Nr).on(bu,Vr).on(dl,Or),Sc.push(Nr);for(var vi=e.event.changedTouches,Ni=0,qi=vi.length;Ni<qi;++Ni)Fo[vi[Ni].identifier]=null;var Si=Ot(),Vn=Date.now();if(Si.length===1){if(Vn-gi<500){var Qi=Si[0];na(Un,Qi,Fo[Qi.identifier],Math.floor(Math.log(X.k)/Math.LN2)+1),_e()}gi=Vn}else if(Si.length>1){var Qi=Si[0],ji=Si[1],oi=Qi[0]-ji[0],Tr=Qi[1]-ji[1];Uo=oi*oi+Tr*Tr}}function Vr(){var Nr=e.touches(Un),vi,Ni,qi,Si;fa.call(Un);for(var Vn=0,Qi=Nr.length;Vn<Qi;++Vn,Si=null)if(qi=Nr[Vn],Si=Fo[qi.identifier]){if(Ni)break;vi=qi,Ni=Si}if(Si){var ji=(ji=qi[0]-vi[0])*ji+(ji=qi[1]-vi[1])*ji,oi=Uo&&Math.sqrt(ji/Uo);vi=[(vi[0]+qi[0])/2,(vi[1]+qi[1])/2],Ni=[(Ni[0]+Si[0])/2,(Ni[1]+Si[1])/2],kn(oi*$s)}gi=null,Bn(vi,Ni),yo(ja)}function Or(){if(e.event.touches.length){for(var Nr=e.event.changedTouches,vi=0,Ni=Nr.length;vi<Ni;++vi)delete Fo[Nr[vi].identifier];for(var qi in Fo)return void Ot()}e.selectAll(Sc).on(Sl,null),Me.on(Wt,go).on(zr,Is),bt(),Da(ja)}}function Ms(){var Un=xi.of(this,arguments);Ur?clearTimeout(Ur):(fa.call(this),se=Qr(Te=Oe||e.mouse(this)),Ia(Un)),Ur=setTimeout(function(){Ur=null,Da(Un)},50),_e(),kn(Math.pow(2,Vi()*.002)*X.k),Bn(Te,se),yo(Un)}function Xs(){var Un=e.mouse(this),ja=Math.log(X.k)/Math.LN2;na(this,Un,Qr(Un),e.event.shiftKey?Math.ceil(ja)-1:Math.floor(ja)+1)}return e.rebind(Ti,xi,"on")};var Qn=[0,1/0],Vi,Kn;e.color=Jn;function Jn(){}Jn.prototype.toString=function(){return this.rgb()+""},e.hsl=Gt;function Gt(X,se,Te){return this instanceof Gt?(this.h=+X,this.s=+se,void(this.l=+Te)):arguments.length<2?X instanceof Gt?new Gt(X.h,X.s,X.l):Ha(""+X,vo,Gt):new Gt(X,se,Te)}var wt=Gt.prototype=new Jn;wt.brighter=function(X){return X=Math.pow(.7,arguments.length?X:1),new Gt(this.h,this.s,this.l/X)},wt.darker=function(X){return X=Math.pow(.7,arguments.length?X:1),new Gt(this.h,this.s,X*this.l)},wt.rgb=function(){return rr(this.h,this.s,this.l)};function rr(X,se,Te){var Oe,Ve;X=isNaN(X)?0:(X%=360)<0?X+360:X,se=isNaN(se)||se<0?0:se>1?1:se,Te=Te<0?0:Te>1?1:Te,Ve=Te<=.5?Te*(1+se):Te+se-Te*se,Oe=2*Te-Ve;function Ye(at){return at>360?at-=360:at<0&&(at+=360),at<60?Oe+(Ve-Oe)*at/60:at<180?Ve:at<240?Oe+(Ve-Oe)*(240-at)/60:Oe}function Pt(at){return Math.round(Ye(at)*255)}return new Wa(Pt(X+120),Pt(X),Pt(X-120))}e.hcl=ir;function ir(X,se,Te){return this instanceof ir?(this.h=+X,this.c=+se,void(this.l=+Te)):arguments.length<2?X instanceof ir?new ir(X.h,X.c,X.l):X instanceof ti?Mn(X.l,X.a,X.b):Mn((X=Gn((X=e.rgb(X)).r,X.g,X.b)).l,X.a,X.b):new ir(X,se,Te)}var wr=ir.prototype=new Jn;wr.brighter=function(X){return new ir(this.h,this.c,Math.min(100,this.l+$r*(arguments.length?X:1)))},wr.darker=function(X){return new ir(this.h,this.c,Math.max(0,this.l-$r*(arguments.length?X:1)))},wr.rgb=function(){return Xr(this.h,this.c,this.l).rgb()};function Xr(X,se,Te){return isNaN(X)&&(X=0),isNaN(se)&&(se=0),new ti(Te,Math.cos(X*=er)*se,Math.sin(X)*se)}e.lab=ti;function ti(X,se,Te){return this instanceof ti?(this.l=+X,this.a=+se,void(this.b=+Te)):arguments.length<2?X instanceof ti?new ti(X.l,X.a,X.b):X instanceof ir?Xr(X.h,X.c,X.l):Gn((X=Wa(X)).r,X.g,X.b):new ti(X,se,Te)}var $r=18,Ri=.95047,Zi=1,en=1.08883,fn=ti.prototype=new Jn;fn.brighter=function(X){return new ti(Math.min(100,this.l+$r*(arguments.length?X:1)),this.a,this.b)},fn.darker=function(X){return new ti(Math.max(0,this.l-$r*(arguments.length?X:1)),this.a,this.b)},fn.rgb=function(){return yn(this.l,this.a,this.b)};function yn(X,se,Te){var Oe=(X+16)/116,Ve=Oe+se/500,Ye=Oe-Te/200;return Ve=Ba(Ve)*Ri,Oe=Ba(Oe)*Zi,Ye=Ba(Ye)*en,new Wa(ma(3.2404542*Ve-1.5371385*Oe-.4985314*Ye),ma(-.969266*Ve+1.8760108*Oe+.041556*Ye),ma(.0556434*Ve-.2040259*Oe+1.0572252*Ye))}function Mn(X,se,Te){return X>0?new ir(Math.atan2(Te,se)*Sr,Math.sqrt(se*se+Te*Te),X):new ir(NaN,NaN,X)}function Ba(X){return X>.206893034?X*X*X:(X-4/29)/7.787037}function ua(X){return X>.008856?Math.pow(X,1/3):7.787037*X+4/29}function ma(X){return Math.round(255*(X<=.00304?12.92*X:1.055*Math.pow(X,1/2.4)-.055))}e.rgb=Wa;function Wa(X,se,Te){return this instanceof Wa?(this.r=~~X,this.g=~~se,void(this.b=~~Te)):arguments.length<2?X instanceof Wa?new Wa(X.r,X.g,X.b):Ha(""+X,Wa,rr):new Wa(X,se,Te)}function Fa(X){return new Wa(X>>16,X>>8&255,X&255)}function Xo(X){return Fa(X)+""}var da=Wa.prototype=new Jn;da.brighter=function(X){X=Math.pow(.7,arguments.length?X:1);var se=this.r,Te=this.g,Oe=this.b,Ve=30;return!se&&!Te&&!Oe?new Wa(Ve,Ve,Ve):(se&&se<Ve&&(se=Ve),Te&&Te<Ve&&(Te=Ve),Oe&&Oe<Ve&&(Oe=Ve),new Wa(Math.min(255,se/X),Math.min(255,Te/X),Math.min(255,Oe/X)))},da.darker=function(X){return X=Math.pow(.7,arguments.length?X:1),new Wa(X*this.r,X*this.g,X*this.b)},da.hsl=function(){return vo(this.r,this.g,this.b)},da.toString=function(){return"#"+jn(this.r)+jn(this.g)+jn(this.b)};function jn(X){return X<16?"0"+Math.max(0,X).toString(16):Math.min(255,X).toString(16)}function Ha(X,se,Te){var Oe=0,Ve=0,Ye=0,Pt,at,Wt;if(Pt=/([a-z]+)\((.*)\)/.exec(X=X.toLowerCase()),Pt)switch(at=Pt[2].split(","),Pt[1]){case"hsl":return Te(parseFloat(at[0]),parseFloat(at[1])/100,parseFloat(at[2])/100);case"rgb":return se(Ar(at[0]),Ar(at[1]),Ar(at[2]))}return(Wt=Jr.get(X))?se(Wt.r,Wt.g,Wt.b):(X!=null&&X.charAt(0)==="#"&&!isNaN(Wt=parseInt(X.slice(1),16))&&(X.length===4?(Oe=(Wt&3840)>>4,Oe=Oe>>4|Oe,Ve=Wt&240,Ve=Ve>>4|Ve,Ye=Wt&15,Ye=Ye<<4|Ye):X.length===7&&(Oe=(Wt&16711680)>>16,Ve=(Wt&65280)>>8,Ye=Wt&255)),se(Oe,Ve,Ye))}function vo(X,se,Te){var Oe=Math.min(X/=255,se/=255,Te/=255),Ve=Math.max(X,se,Te),Ye=Ve-Oe,Pt,at,Wt=(Ve+Oe)/2;return Ye?(at=Wt<.5?Ye/(Ve+Oe):Ye/(2-Ve-Oe),X==Ve?Pt=(se-Te)/Ye+(se<Te?6:0):se==Ve?Pt=(Te-X)/Ye+2:Pt=(X-se)/Ye+4,Pt*=60):(Pt=NaN,at=Wt>0&&Wt<1?0:Pt),new Gt(Pt,at,Wt)}function Gn(X,se,Te){X=Ct(X),se=Ct(se),Te=Ct(Te);var Oe=ua((.4124564*X+.3575761*se+.1804375*Te)/Ri),Ve=ua((.2126729*X+.7151522*se+.072175*Te)/Zi),Ye=ua((.0193339*X+.119192*se+.9503041*Te)/en);return ti(116*Ve-16,500*(Oe-Ve),200*(Ve-Ye))}function Ct(X){return(X/=255)<=.04045?X/12.92:Math.pow((X+.055)/1.055,2.4)}function Ar(X){var se=parseFloat(X);return X.charAt(X.length-1)==="%"?Math.round(se*2.55):se}var Jr=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Jr.forEach(function(X,se){Jr.set(X,Fa(se))});function hi(X){return typeof X=="function"?X:function(){return X}}e.functor=hi,e.xhr=hn(G);function hn(X){return function(se,Te,Oe){return arguments.length===2&&typeof Te=="function"&&(Oe=Te,Te=null),Sn(se,Te,X,Oe)}}function Sn(X,se,Te,Oe){var Ve={},Ye=e.dispatch("beforesend","progress","load","error"),Pt={},at=new XMLHttpRequest,Wt=null;self.XDomainRequest&&!("withCredentials"in at)&&/^(http(s)?:)?\/\//.test(X)&&(at=new XDomainRequest),"onload"in at?at.onload=at.onerror=dr:at.onreadystatechange=function(){at.readyState>3&&dr()};function dr(){var pr=at.status,Ur;if(!pr&&ki(at)||pr>=200&&pr<300||pr===304){try{Ur=Te.call(Ve,at)}catch(zr){Ye.error.call(Ve,zr);return}Ye.load.call(Ve,Ur)}else Ye.error.call(Ve,at)}return at.onprogress=function(pr){var Ur=e.event;e.event=pr;try{Ye.progress.call(Ve,at)}finally{e.event=Ur}},Ve.header=function(pr,Ur){return pr=(pr+"").toLowerCase(),arguments.length<2?Pt[pr]:(Ur==null?delete Pt[pr]:Pt[pr]=Ur+"",Ve)},Ve.mimeType=function(pr){return arguments.length?(se=pr==null?null:pr+"",Ve):se},Ve.responseType=function(pr){return arguments.length?(Wt=pr,Ve):Wt},Ve.response=function(pr){return Te=pr,Ve},["get","post"].forEach(function(pr){Ve[pr]=function(){return Ve.send.apply(Ve,[pr].concat(r(arguments)))}}),Ve.send=function(pr,Ur,zr){if(arguments.length===2&&typeof Ur=="function"&&(zr=Ur,Ur=null),at.open(pr,X,!0),se!=null&&!("accept"in Pt)&&(Pt.accept=se+",*/*"),at.setRequestHeader)for(var gi in Pt)at.setRequestHeader(gi,Pt[gi]);return se!=null&&at.overrideMimeType&&at.overrideMimeType(se),Wt!=null&&(at.responseType=Wt),zr!=null&&Ve.on("error",zr).on("load",function(xi){zr(null,xi)}),Ye.beforesend.call(Ve,at),at.send(Ur==null?null:Ur),Ve},Ve.abort=function(){return at.abort(),Ve},e.rebind(Ve,Ye,"on"),Oe==null?Ve:Ve.get(En(Oe))}function En(X){return X.length===1?function(se,Te){X(se==null?Te:null)}:X}function ki(X){var se=X.responseType;return se&&se!=="text"?X.response:X.responseText}e.dsv=function(X,se){var Te=new RegExp('["'+X+`
|
||
]`),Oe=X.charCodeAt(0);function Ve(dr,pr,Ur){arguments.length<3&&(Ur=pr,pr=null);var zr=Sn(dr,se,pr==null?Ye:Pt(pr),Ur);return zr.row=function(gi){return arguments.length?zr.response((pr=gi)==null?Ye:Pt(gi)):pr},zr}function Ye(dr){return Ve.parse(dr.responseText)}function Pt(dr){return function(pr){return Ve.parse(pr.responseText,dr)}}Ve.parse=function(dr,pr){var Ur;return Ve.parseRows(dr,function(zr,gi){if(Ur)return Ur(zr,gi-1);var xi=function(Wr){for(var ii={},di=zr.length,Li=0;Li<di;++Li)ii[zr[Li]]=Wr[Li];return ii};Ur=pr?function(Wr,ii){return pr(xi(Wr),ii)}:xi})},Ve.parseRows=function(dr,pr){var Ur={},zr={},gi=[],xi=dr.length,Wr=0,ii=0,di,Li;function Ti(){if(Wr>=xi)return zr;if(Li)return Li=!1,Ur;var Pn=Wr;if(dr.charCodeAt(Pn)===34){for(var kn=Pn;kn++<xi;)if(dr.charCodeAt(kn)===34){if(dr.charCodeAt(kn+1)!==34)break;++kn}Wr=kn+2;var Bn=dr.charCodeAt(kn+1);return Bn===13?(Li=!0,dr.charCodeAt(kn+2)===10&&++Wr):Bn===10&&(Li=!0),dr.slice(Pn+1,kn).replace(/""/g,'"')}for(;Wr<xi;){var Bn=dr.charCodeAt(Wr++),na=1;if(Bn===10)Li=!0;else if(Bn===13)Li=!0,dr.charCodeAt(Wr)===10&&(++Wr,++na);else if(Bn!==Oe)continue;return dr.slice(Pn,Wr-na)}return dr.slice(Pn)}for(;(di=Ti())!==zr;){for(var Qr=[];di!==Ur&&di!==zr;)Qr.push(di),di=Ti();pr&&(Qr=pr(Qr,ii++))==null||gi.push(Qr)}return gi},Ve.format=function(dr){if(Array.isArray(dr[0]))return Ve.formatRows(dr);var pr=new U,Ur=[];return dr.forEach(function(zr){for(var gi in zr)pr.has(gi)||Ur.push(pr.add(gi))}),[Ur.map(Wt).join(X)].concat(dr.map(function(zr){return Ur.map(function(gi){return Wt(zr[gi])}).join(X)})).join(`
|
||
`)},Ve.formatRows=function(dr){return dr.map(at).join(`
|
||
`)};function at(dr){return dr.map(Wt).join(X)}function Wt(dr){return Te.test(dr)?'"'+dr.replace(/\"/g,'""')+'"':dr}return Ve},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var _n,ya,ea,Ma,_o=this[j(this,"requestAnimationFrame")]||function(X){setTimeout(X,17)};e.timer=function(){No.apply(this,arguments)};function No(X,se,Te){var Oe=arguments.length;Oe<2&&(se=0),Oe<3&&(Te=Date.now());var Ve=Te+se,Ye={c:X,t:Ve,n:null};return ya?ya.n=Ye:_n=Ye,ya=Ye,ea||(Ma=clearTimeout(Ma),ea=1,_o(po)),Ye}function po(){var X=Lo(),se=ko()-X;se>24?(isFinite(se)&&(clearTimeout(Ma),Ma=setTimeout(po,se)),ea=0):(ea=1,_o(po))}e.timer.flush=function(){Lo(),ko()};function Lo(){for(var X=Date.now(),se=_n;se;)X>=se.t&&se.c(X-se.t)&&(se.c=null),se=se.n;return X}function ko(){for(var X,se=_n,Te=1/0;se;)se.c?(se.t<Te&&(Te=se.t),se=(X=se).n):se=X?X.n=se.n:_n=se.n;return ya=X,Te}e.round=function(X,se){return se?Math.round(X*(se=Math.pow(10,se)))/se:Math.round(X)},e.geom={};function Ds(X){return X[0]}function Fs(X){return X[1]}e.geom.hull=function(X){var se=Ds,Te=Fs;if(arguments.length)return Oe(X);function Oe(Ve){if(Ve.length<3)return[];var Ye=hi(se),Pt=hi(Te),at,Wt=Ve.length,dr=[],pr=[];for(at=0;at<Wt;at++)dr.push([+Ye.call(this,Ve[at],at),+Pt.call(this,Ve[at],at),at]);for(dr.sort(ul),at=0;at<Wt;at++)pr.push([dr[at][0],-dr[at][1]]);var Ur=ll(dr),zr=ll(pr),gi=zr[0]===Ur[0],xi=zr[zr.length-1]===Ur[Ur.length-1],Wr=[];for(at=Ur.length-1;at>=0;--at)Wr.push(Ve[dr[Ur[at]][2]]);for(at=+gi;at<zr.length-xi;++at)Wr.push(Ve[dr[zr[at]][2]]);return Wr}return Oe.x=function(Ve){return arguments.length?(se=Ve,Oe):se},Oe.y=function(Ve){return arguments.length?(Te=Ve,Oe):Te},Oe};function ll(X){for(var se=X.length,Te=[0,1],Oe=2,Ve=2;Ve<se;Ve++){for(;Oe>1&&Ir(X[Te[Oe-2]],X[Te[Oe-1]],X[Ve])<=0;)--Oe;Te[Oe++]=Ve}return Te.slice(0,Oe)}function ul(X,se){return X[0]-se[0]||X[1]-se[1]}e.geom.polygon=function(X){return ie(X,zl),X};var zl=e.geom.polygon.prototype=[];zl.area=function(){for(var X=-1,se=this.length,Te,Oe=this[se-1],Ve=0;++X<se;)Te=Oe,Oe=this[X],Ve+=Te[1]*Oe[0]-Te[0]*Oe[1];return Ve*.5},zl.centroid=function(X){var se=-1,Te=this.length,Oe=0,Ve=0,Ye,Pt=this[Te-1],at;for(arguments.length||(X=-1/(6*this.area()));++se<Te;)Ye=Pt,Pt=this[se],at=Ye[0]*Pt[1]-Pt[0]*Ye[1],Oe+=(Ye[0]+Pt[0])*at,Ve+=(Ye[1]+Pt[1])*at;return[Oe*X,Ve*X]},zl.clip=function(X){for(var se,Te=As(X),Oe=-1,Ve=this.length-As(this),Ye,Pt,at=this[Ve-1],Wt,dr,pr;++Oe<Ve;){for(se=X.slice(),X.length=0,Wt=this[Oe],dr=se[(Pt=se.length-Te)-1],Ye=-1;++Ye<Pt;)pr=se[Ye],us(pr,at,Wt)?(us(dr,at,Wt)||X.push(il(dr,pr,at,Wt)),X.push(pr)):us(dr,at,Wt)&&X.push(il(dr,pr,at,Wt)),dr=pr;Te&&X.push(X[0]),at=Wt}return X};function us(X,se,Te){return(Te[0]-se[0])*(X[1]-se[1])<(Te[1]-se[1])*(X[0]-se[0])}function il(X,se,Te,Oe){var Ve=X[0],Ye=Te[0],Pt=se[0]-Ve,at=Oe[0]-Ye,Wt=X[1],dr=Te[1],pr=se[1]-Wt,Ur=Oe[1]-dr,zr=(at*(Wt-dr)-Ur*(Ve-Ye))/(Ur*Pt-at*pr);return[Ve+zr*Pt,Wt+zr*pr]}function As(X){var se=X[0],Te=X[X.length-1];return!(se[0]-Te[0]||se[1]-Te[1])}var cl,Ks,zs,Io=[],ls,Yl,Su=[];function nc(){qs(this),this.edge=this.site=this.circle=null}function bs(X){var se=Io.pop()||new nc;return se.site=X,se}function Rn(X){qo(X),zs.remove(X),Io.push(X),qs(X)}function _a(X){var se=X.circle,Te=se.x,Oe=se.cy,Ve={x:Te,y:Oe},Ye=X.P,Pt=X.N,at=[X];Rn(X);for(var Wt=Ye;Wt.circle&&p(Te-Wt.circle.x)<Je&&p(Oe-Wt.circle.cy)<Je;)Ye=Wt.P,at.unshift(Wt),Rn(Wt),Wt=Ye;at.unshift(Wt),qo(Wt);for(var dr=Pt;dr.circle&&p(Te-dr.circle.x)<Je&&p(Oe-dr.circle.cy)<Je;)Pt=dr.N,at.push(dr),Rn(dr),dr=Pt;at.push(dr),qo(dr);var pr=at.length,Ur;for(Ur=1;Ur<pr;++Ur)dr=at[Ur],Wt=at[Ur-1],pl(dr.edge,Wt.site,dr.site,Ve);Wt=at[0],dr=at[pr-1],dr.edge=rf(Wt.site,dr.site,null,Ve),oa(Wt),oa(dr)}function Vu(X){for(var se=X.x,Te=X.y,Oe,Ve,Ye,Pt,at=zs._;at;)if(Ye=ql(at,Te)-se,Ye>Je)at=at.L;else if(Pt=se-xo(at,Te),Pt>Je){if(!at.R){Oe=at;break}at=at.R}else{Ye>-Je?(Oe=at.P,Ve=at):Pt>-Je?(Oe=at,Ve=at.N):Oe=Ve=at;break}var Wt=bs(X);if(zs.insert(Oe,Wt),!(!Oe&&!Ve)){if(Oe===Ve){qo(Oe),Ve=bs(Oe.site),zs.insert(Wt,Ve),Wt.edge=Ve.edge=rf(Oe.site,Wt.site),oa(Oe),oa(Ve);return}if(!Ve){Wt.edge=rf(Oe.site,Wt.site);return}qo(Oe),qo(Ve);var dr=Oe.site,pr=dr.x,Ur=dr.y,zr=X.x-pr,gi=X.y-Ur,xi=Ve.site,Wr=xi.x-pr,ii=xi.y-Ur,di=2*(zr*ii-gi*Wr),Li=zr*zr+gi*gi,Ti=Wr*Wr+ii*ii,Qr={x:(ii*Li-gi*Ti)/di+pr,y:(zr*Ti-Wr*Li)/di+Ur};pl(Ve.edge,dr,xi,Qr),Wt.edge=rf(dr,X,null,Qr),Ve.edge=rf(X,xi,null,Qr),oa(Oe),oa(Ve)}}function ql(X,se){var Te=X.site,Oe=Te.x,Ve=Te.y,Ye=Ve-se;if(!Ye)return Oe;var Pt=X.P;if(!Pt)return-1/0;Te=Pt.site;var at=Te.x,Wt=Te.y,dr=Wt-se;if(!dr)return at;var pr=at-Oe,Ur=1/Ye-1/dr,zr=pr/dr;return Ur?(-zr+Math.sqrt(zr*zr-2*Ur*(pr*pr/(-2*dr)-Wt+dr/2+Ve-Ye/2)))/Ur+Oe:(Oe+at)/2}function xo(X,se){var Te=X.N;if(Te)return ql(Te,se);var Oe=X.site;return Oe.y===se?Oe.x:1/0}function Kl(X){this.site=X,this.edges=[]}Kl.prototype.prepare=function(){for(var X=this.edges,se=X.length,Te;se--;)Te=X[se].edge,(!Te.b||!Te.a)&&X.splice(se,1);return X.sort(Hl),X.length};function Ns(X){for(var se=X[0][0],Te=X[1][0],Oe=X[0][1],Ve=X[1][1],Ye,Pt,at,Wt,dr=Ks,pr=dr.length,Ur,zr,gi,xi,Wr,ii;pr--;)if(Ur=dr[pr],!(!Ur||!Ur.prepare()))for(gi=Ur.edges,xi=gi.length,zr=0;zr<xi;)ii=gi[zr].end(),at=ii.x,Wt=ii.y,Wr=gi[++zr%xi].start(),Ye=Wr.x,Pt=Wr.y,(p(at-Ye)>Je||p(Wt-Pt)>Je)&&(gi.splice(zr,0,new Zc(Vf(Ur.site,ii,p(at-se)<Je&&Ve-Wt>Je?{x:se,y:p(Ye-se)<Je?Pt:Ve}:p(Wt-Ve)<Je&&Te-at>Je?{x:p(Pt-Ve)<Je?Ye:Te,y:Ve}:p(at-Te)<Je&&Wt-Oe>Je?{x:Te,y:p(Ye-Te)<Je?Pt:Oe}:p(Wt-Oe)<Je&&at-se>Je?{x:p(Pt-Oe)<Je?Ye:se,y:Oe}:null),Ur.site,null)),++xi)}function Hl(X,se){return se.angle-X.angle}function ac(){qs(this),this.x=this.y=this.arc=this.site=this.cy=null}function oa(X){var se=X.P,Te=X.N;if(!(!se||!Te)){var Oe=se.site,Ve=X.site,Ye=Te.site;if(Oe!==Ye){var Pt=Ve.x,at=Ve.y,Wt=Oe.x-Pt,dr=Oe.y-at,pr=Ye.x-Pt,ii=Ye.y-at,Ur=2*(Wt*ii-dr*pr);if(!(Ur>=-We)){var zr=Wt*Wt+dr*dr,gi=pr*pr+ii*ii,xi=(ii*zr-dr*gi)/Ur,Wr=(Wt*gi-pr*zr)/Ur,ii=Wr+at,di=Su.pop()||new ac;di.arc=X,di.site=Ve,di.x=xi+Pt,di.y=ii+Math.sqrt(xi*xi+Wr*Wr),di.cy=ii,X.circle=di;for(var Li=null,Ti=Yl._;Ti;)if(di.y<Ti.y||di.y===Ti.y&&di.x<=Ti.x)if(Ti.L)Ti=Ti.L;else{Li=Ti.P;break}else if(Ti.R)Ti=Ti.R;else{Li=Ti;break}Yl.insert(Li,di),Li||(ls=di)}}}}function qo(X){var se=X.circle;se&&(se.P||(ls=se.N),Yl.remove(se),Su.push(se),qs(se),X.circle=null)}function Oo(X,se,Te,Oe){return function(Ve){var Ye=Ve.a,Pt=Ve.b,at=Ye.x,Wt=Ye.y,dr=Pt.x,pr=Pt.y,Ur=0,zr=1,gi=dr-at,xi=pr-Wt,Wr;if(Wr=X-at,!(!gi&&Wr>0)){if(Wr/=gi,gi<0){if(Wr<Ur)return;Wr<zr&&(zr=Wr)}else if(gi>0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}if(Wr=Te-at,!(!gi&&Wr<0)){if(Wr/=gi,gi<0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}else if(gi>0){if(Wr<Ur)return;Wr<zr&&(zr=Wr)}if(Wr=se-Wt,!(!xi&&Wr>0)){if(Wr/=xi,xi<0){if(Wr<Ur)return;Wr<zr&&(zr=Wr)}else if(xi>0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}if(Wr=Oe-Wt,!(!xi&&Wr<0)){if(Wr/=xi,xi<0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}else if(xi>0){if(Wr<Ur)return;Wr<zr&&(zr=Wr)}return Ur>0&&(Ve.a={x:at+Ur*gi,y:Wt+Ur*xi}),zr<1&&(Ve.b={x:at+zr*gi,y:Wt+zr*xi}),Ve}}}}}}function Ol(X){for(var se=cl,Te=Oo(X[0][0],X[0][1],X[1][0],X[1][1]),Oe=se.length,Ve;Oe--;)Ve=se[Oe],(!Pc(Ve,X)||!Te(Ve)||p(Ve.a.x-Ve.b.x)<Je&&p(Ve.a.y-Ve.b.y)<Je)&&(Ve.a=Ve.b=null,se.splice(Oe,1))}function Pc(X,se){var Te=X.b;if(Te)return!0;var Oe=X.a,Ve=se[0][0],Ye=se[1][0],Pt=se[0][1],at=se[1][1],Wt=X.l,dr=X.r,pr=Wt.x,Ur=Wt.y,zr=dr.x,gi=dr.y,xi=(pr+zr)/2,Wr=(Ur+gi)/2,ii,di;if(gi===Ur){if(xi<Ve||xi>=Ye)return;if(pr>zr){if(!Oe)Oe={x:xi,y:Pt};else if(Oe.y>=at)return;Te={x:xi,y:at}}else{if(!Oe)Oe={x:xi,y:at};else if(Oe.y<Pt)return;Te={x:xi,y:Pt}}}else if(ii=(pr-zr)/(gi-Ur),di=Wr-ii*xi,ii<-1||ii>1)if(pr>zr){if(!Oe)Oe={x:(Pt-di)/ii,y:Pt};else if(Oe.y>=at)return;Te={x:(at-di)/ii,y:at}}else{if(!Oe)Oe={x:(at-di)/ii,y:at};else if(Oe.y<Pt)return;Te={x:(Pt-di)/ii,y:Pt}}else if(Ur<gi){if(!Oe)Oe={x:Ve,y:ii*Ve+di};else if(Oe.x>=Ye)return;Te={x:Ye,y:ii*Ye+di}}else{if(!Oe)Oe={x:Ye,y:ii*Ye+di};else if(Oe.x<Ve)return;Te={x:Ve,y:ii*Ve+di}}return X.a=Oe,X.b=Te,!0}function Do(X,se){this.l=X,this.r=se,this.a=this.b=null}function rf(X,se,Te,Oe){var Ve=new Do(X,se);return cl.push(Ve),Te&&pl(Ve,X,se,Te),Oe&&pl(Ve,se,X,Oe),Ks[X.i].edges.push(new Zc(Ve,X,se)),Ks[se.i].edges.push(new Zc(Ve,se,X)),Ve}function Vf(X,se,Te){var Oe=new Do(X,null);return Oe.a=se,Oe.b=Te,cl.push(Oe),Oe}function pl(X,se,Te,Oe){!X.a&&!X.b?(X.a=Oe,X.l=se,X.r=Te):X.l===Te?X.b=Oe:X.a=Oe}function Zc(X,se,Te){var Oe=X.a,Ve=X.b;this.edge=X,this.site=se,this.angle=Te?Math.atan2(Te.y-se.y,Te.x-se.x):X.l===se?Math.atan2(Ve.x-Oe.x,Oe.y-Ve.y):Math.atan2(Oe.x-Ve.x,Ve.y-Oe.y)}Zc.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function Jl(){this._=null}function qs(X){X.U=X.C=X.L=X.R=X.P=X.N=null}Jl.prototype={insert:function(X,se){var Te,Oe,Ve;if(X){if(se.P=X,se.N=X.N,X.N&&(X.N.P=se),X.N=se,X.R){for(X=X.R;X.L;)X=X.L;X.L=se}else X.R=se;Te=X}else this._?(X=Cf(this._),se.P=null,se.N=X,X.P=X.L=se,Te=X):(se.P=se.N=null,this._=se,Te=null);for(se.L=se.R=null,se.U=Te,se.C=!0,X=se;Te&&Te.C;)Oe=Te.U,Te===Oe.L?(Ve=Oe.R,Ve&&Ve.C?(Te.C=Ve.C=!1,Oe.C=!0,X=Oe):(X===Te.R&&(yu(this,Te),X=Te,Te=X.U),Te.C=!1,Oe.C=!0,oc(this,Oe))):(Ve=Oe.L,Ve&&Ve.C?(Te.C=Ve.C=!1,Oe.C=!0,X=Oe):(X===Te.L&&(oc(this,Te),X=Te,Te=X.U),Te.C=!1,Oe.C=!0,yu(this,Oe))),Te=X.U;this._.C=!1},remove:function(X){X.N&&(X.N.P=X.P),X.P&&(X.P.N=X.N),X.N=X.P=null;var se=X.U,Te,Oe=X.L,Ve=X.R,Ye,Pt;if(Oe?Ve?Ye=Cf(Ve):Ye=Oe:Ye=Ve,se?se.L===X?se.L=Ye:se.R=Ye:this._=Ye,Oe&&Ve?(Pt=Ye.C,Ye.C=X.C,Ye.L=Oe,Oe.U=Ye,Ye!==Ve?(se=Ye.U,Ye.U=X.U,X=Ye.R,se.L=X,Ye.R=Ve,Ve.U=Ye):(Ye.U=se,se=Ye,X=Ye.R)):(Pt=X.C,X=Ye),X&&(X.U=se),!Pt){if(X&&X.C){X.C=!1;return}do{if(X===this._)break;if(X===se.L){if(Te=se.R,Te.C&&(Te.C=!1,se.C=!0,yu(this,se),Te=se.R),Te.L&&Te.L.C||Te.R&&Te.R.C){(!Te.R||!Te.R.C)&&(Te.L.C=!1,Te.C=!0,oc(this,Te),Te=se.R),Te.C=se.C,se.C=Te.R.C=!1,yu(this,se),X=this._;break}}else if(Te=se.L,Te.C&&(Te.C=!1,se.C=!0,oc(this,se),Te=se.L),Te.L&&Te.L.C||Te.R&&Te.R.C){(!Te.L||!Te.L.C)&&(Te.R.C=!1,Te.C=!0,yu(this,Te),Te=se.L),Te.C=se.C,se.C=Te.L.C=!1,oc(this,se),X=this._;break}Te.C=!0,X=se,se=se.U}while(!X.C);X&&(X.C=!1)}}};function yu(X,se){var Te=se,Oe=se.R,Ve=Te.U;Ve?Ve.L===Te?Ve.L=Oe:Ve.R=Oe:X._=Oe,Oe.U=Ve,Te.U=Oe,Te.R=Oe.L,Te.R&&(Te.R.U=Te),Oe.L=Te}function oc(X,se){var Te=se,Oe=se.L,Ve=Te.U;Ve?Ve.L===Te?Ve.L=Oe:Ve.R=Oe:X._=Oe,Oe.U=Ve,Te.U=Oe,Te.L=Oe.R,Te.L&&(Te.L.U=Te),Oe.R=Te}function Cf(X){for(;X.L;)X=X.L;return X}function sc(X,se){var Te=X.sort(jh).pop(),Oe,Ve,Ye;for(cl=[],Ks=new Array(X.length),zs=new Jl,Yl=new Jl;;)if(Ye=ls,Te&&(!Ye||Te.y<Ye.y||Te.y===Ye.y&&Te.x<Ye.x))(Te.x!==Oe||Te.y!==Ve)&&(Ks[Te.i]=new Kl(Te),Vu(Te),Oe=Te.x,Ve=Te.y),Te=X.pop();else if(Ye)_a(Ye.arc);else break;se&&(Ol(se),Ns(se));var Pt={cells:Ks,edges:cl};return zs=Yl=cl=Ks=null,Pt}function jh(X,se){return se.y-X.y||se.x-X.x}e.geom.voronoi=function(X){var se=Ds,Te=Fs,Oe=se,Ve=Te,Ye=Lf;if(X)return Pt(X);function Pt(Wt){var dr=new Array(Wt.length),pr=Ye[0][0],Ur=Ye[0][1],zr=Ye[1][0],gi=Ye[1][1];return sc(at(Wt),Ye).cells.forEach(function(xi,Wr){var ii=xi.edges,di=xi.site,Li=dr[Wr]=ii.length?ii.map(function(Ti){var Qr=Ti.start();return[Qr.x,Qr.y]}):di.x>=pr&&di.x<=zr&&di.y>=Ur&&di.y<=gi?[[pr,gi],[zr,gi],[zr,Ur],[pr,Ur]]:[];Li.point=Wt[Wr]}),dr}function at(Wt){return Wt.map(function(dr,pr){return{x:Math.round(Oe(dr,pr)/Je)*Je,y:Math.round(Ve(dr,pr)/Je)*Je,i:pr}})}return Pt.links=function(Wt){return sc(at(Wt)).edges.filter(function(dr){return dr.l&&dr.r}).map(function(dr){return{source:Wt[dr.l.i],target:Wt[dr.r.i]}})},Pt.triangles=function(Wt){var dr=[];return sc(at(Wt)).cells.forEach(function(pr,Ur){for(var zr=pr.site,gi=pr.edges.sort(Hl),xi=-1,Wr=gi.length,ii,di,Li=gi[Wr-1].edge,Ti=Li.l===zr?Li.r:Li.l;++xi<Wr;)ii=Li,di=Ti,Li=gi[xi].edge,Ti=Li.l===zr?Li.r:Li.l,Ur<di.i&&Ur<Ti.i&&cs(zr,di,Ti)<0&&dr.push([Wt[Ur],Wt[di.i],Wt[Ti.i]])}),dr},Pt.x=function(Wt){return arguments.length?(Oe=hi(se=Wt),Pt):se},Pt.y=function(Wt){return arguments.length?(Ve=hi(Te=Wt),Pt):Te},Pt.clipExtent=function(Wt){return arguments.length?(Ye=Wt==null?Lf:Wt,Pt):Ye===Lf?null:Ye},Pt.size=function(Wt){return arguments.length?Pt.clipExtent(Wt&&[[0,0],Wt]):Ye===Lf?null:Ye&&Ye[1]},Pt};var Lf=[[-1e6,-1e6],[1e6,1e6]];function cs(X,se,Te){return(X.x-Te.x)*(se.y-X.y)-(X.x-se.x)*(Te.y-X.y)}e.geom.delaunay=function(X){return e.geom.voronoi().triangles(X)},e.geom.quadtree=function(X,se,Te,Oe,Ve){var Ye=Ds,Pt=Fs,at;if(at=arguments.length)return Ye=nf,Pt=Gf,at===3&&(Ve=Te,Oe=se,Te=se=0),Wt(X);function Wt(dr){var pr,Ur=hi(Ye),zr=hi(Pt),gi,xi,Wr,ii,di,Li,Ti,Qr;if(se!=null)di=se,Li=Te,Ti=Oe,Qr=Ve;else if(Ti=Qr=-(di=Li=1/0),gi=[],xi=[],ii=dr.length,at)for(Wr=0;Wr<ii;++Wr)pr=dr[Wr],pr.x<di&&(di=pr.x),pr.y<Li&&(Li=pr.y),pr.x>Ti&&(Ti=pr.x),pr.y>Qr&&(Qr=pr.y),gi.push(pr.x),xi.push(pr.y);else for(Wr=0;Wr<ii;++Wr){var Pn=+Ur(pr=dr[Wr],Wr),kn=+zr(pr,Wr);Pn<di&&(di=Pn),kn<Li&&(Li=kn),Pn>Ti&&(Ti=Pn),kn>Qr&&(Qr=kn),gi.push(Pn),xi.push(kn)}var Bn=Ti-di,na=Qr-Li;Bn>na?Qr=Li+Bn:Ti=di+na;function Ea(Da,go,Is,Ms,Xs,Un,ja,Fo){if(!(isNaN(Is)||isNaN(Ms)))if(Da.leaf){var Uo=Da.x,$s=Da.y;if(Uo!=null)if(p(Uo-Is)+p($s-Ms)<.01)Ia(Da,go,Is,Ms,Xs,Un,ja,Fo);else{var Sl=Da.point;Da.x=Da.y=Da.point=null,Ia(Da,Sl,Uo,$s,Xs,Un,ja,Fo),Ia(Da,go,Is,Ms,Xs,Un,ja,Fo)}else Da.x=Is,Da.y=Ms,Da.point=go}else Ia(Da,go,Is,Ms,Xs,Un,ja,Fo)}function Ia(Da,go,Is,Ms,Xs,Un,ja,Fo){var Uo=(Xs+ja)*.5,$s=(Un+Fo)*.5,Sl=Is>=Uo,bu=Ms>=$s,dl=bu<<1|Sl;Da.leaf=!1,Da=Da.nodes[dl]||(Da.nodes[dl]=$l()),Sl?Xs=Uo:ja=Uo,bu?Un=$s:Fo=$s,Ea(Da,go,Is,Ms,Xs,Un,ja,Fo)}var yo=$l();if(yo.add=function(Da){Ea(yo,Da,+Ur(Da,++Wr),+zr(Da,Wr),di,Li,Ti,Qr)},yo.visit=function(Da){fl(Da,yo,di,Li,Ti,Qr)},yo.find=function(Da){return lc(yo,Da[0],Da[1],di,Li,Ti,Qr)},Wr=-1,se==null){for(;++Wr<ii;)Ea(yo,dr[Wr],gi[Wr],xi[Wr],di,Li,Ti,Qr);--Wr}else dr.forEach(yo.add);return gi=xi=dr=pr=null,yo}return Wt.x=function(dr){return arguments.length?(Ye=dr,Wt):Ye},Wt.y=function(dr){return arguments.length?(Pt=dr,Wt):Pt},Wt.extent=function(dr){return arguments.length?(dr==null?se=Te=Oe=Ve=null:(se=+dr[0][0],Te=+dr[0][1],Oe=+dr[1][0],Ve=+dr[1][1]),Wt):se==null?null:[[se,Te],[Oe,Ve]]},Wt.size=function(dr){return arguments.length?(dr==null?se=Te=Oe=Ve=null:(se=Te=0,Oe=+dr[0],Ve=+dr[1]),Wt):se==null?null:[Oe-se,Ve-Te]},Wt};function nf(X){return X.x}function Gf(X){return X.y}function $l(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function fl(X,se,Te,Oe,Ve,Ye){if(!X(se,Te,Oe,Ve,Ye)){var Pt=(Te+Ve)*.5,at=(Oe+Ye)*.5,Wt=se.nodes;Wt[0]&&fl(X,Wt[0],Te,Oe,Pt,at),Wt[1]&&fl(X,Wt[1],Pt,Oe,Ve,at),Wt[2]&&fl(X,Wt[2],Te,at,Pt,Ye),Wt[3]&&fl(X,Wt[3],Pt,at,Ve,Ye)}}function lc(X,se,Te,Oe,Ve,Ye,Pt){var at=1/0,Wt;return function dr(pr,Ur,zr,gi,xi){if(!(Ur>Ye||zr>Pt||gi<Oe||xi<Ve)){if(Wr=pr.point){var Wr,ii=se-pr.x,di=Te-pr.y,Li=ii*ii+di*di;if(Li<at){var Ti=Math.sqrt(at=Li);Oe=se-Ti,Ve=Te-Ti,Ye=se+Ti,Pt=Te+Ti,Wt=Wr}}for(var Qr=pr.nodes,Pn=(Ur+gi)*.5,kn=(zr+xi)*.5,Bn=se>=Pn,na=Te>=kn,Ea=na<<1|Bn,Ia=Ea+4;Ea<Ia;++Ea)if(pr=Qr[Ea&3])switch(Ea&3){case 0:dr(pr,Ur,zr,Pn,kn);break;case 1:dr(pr,Pn,zr,gi,kn);break;case 2:dr(pr,Ur,kn,Pn,xi);break;case 3:dr(pr,Pn,kn,gi,xi);break}}}(X,Oe,Ve,Ye,Pt),Wt}e.interpolateRgb=Fu;function Fu(X,se){X=e.rgb(X),se=e.rgb(se);var Te=X.r,Oe=X.g,Ve=X.b,Ye=se.r-Te,Pt=se.g-Oe,at=se.b-Ve;return function(Wt){return"#"+jn(Math.round(Te+Ye*Wt))+jn(Math.round(Oe+Pt*Wt))+jn(Math.round(Ve+at*Wt))}}e.interpolateObject=Es;function Es(X,se){var Te={},Oe={},Ve;for(Ve in X)Ve in se?Te[Ve]=xl(X[Ve],se[Ve]):Oe[Ve]=X[Ve];for(Ve in se)Ve in X||(Oe[Ve]=se[Ve]);return function(Ye){for(Ve in Te)Oe[Ve]=Te[Ve](Ye);return Oe}}e.interpolateNumber=Hs;function Hs(X,se){return X=+X,se=+se,function(Te){return X*(1-Te)+se*Te}}e.interpolateString=Go;function Go(X,se){var Te=ps.lastIndex=uc.lastIndex=0,Oe,Ve,Ye,Pt=-1,at=[],Wt=[];for(X=X+"",se=se+"";(Oe=ps.exec(X))&&(Ve=uc.exec(se));)(Ye=Ve.index)>Te&&(Ye=se.slice(Te,Ye),at[Pt]?at[Pt]+=Ye:at[++Pt]=Ye),(Oe=Oe[0])===(Ve=Ve[0])?at[Pt]?at[Pt]+=Ve:at[++Pt]=Ve:(at[++Pt]=null,Wt.push({i:Pt,x:Hs(Oe,Ve)})),Te=uc.lastIndex;return Te<se.length&&(Ye=se.slice(Te),at[Pt]?at[Pt]+=Ye:at[++Pt]=Ye),at.length<2?Wt[0]?(se=Wt[0].x,function(dr){return se(dr)+""}):function(){return se}:(se=Wt.length,function(dr){for(var pr=0,Ur;pr<se;++pr)at[(Ur=Wt[pr]).i]=Ur.x(dr);return at.join("")})}var ps=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uc=new RegExp(ps.source,"g");e.interpolate=xl;function xl(X,se){for(var Te=e.interpolators.length,Oe;--Te>=0&&!(Oe=e.interpolators[Te](X,se)););return Oe}e.interpolators=[function(X,se){var Te=typeof se;return(Te==="string"?Jr.has(se.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(se)?Fu:Go:se instanceof Jn?Fu:Array.isArray(se)?Gu:Te==="object"&&isNaN(se)?Es:Hs)(X,se)}],e.interpolateArray=Gu;function Gu(X,se){var Te=[],Oe=[],Ve=X.length,Ye=se.length,Pt=Math.min(X.length,se.length),at;for(at=0;at<Pt;++at)Te.push(xl(X[at],se[at]));for(;at<Ve;++at)Oe[at]=X[at];for(;at<Ye;++at)Oe[at]=se[at];return function(Wt){for(at=0;at<Pt;++at)Oe[at]=Te[at](Wt);return Oe}}var Os=function(){return G},od=e.map({linear:Os,poly:Hf,quad:function(){return af},cubic:function(){return Hu},sin:function(){return Ic},exp:function(){return yf},circle:function(){return Bl},elastic:Ah,back:Qf,bounce:function(){return _f}}),Po=e.map({in:G,out:Ko,"in-out":Pa,"out-in":function(X){return Pa(Ko(X))}});e.ease=function(X){var se=X.indexOf("-"),Te=se>=0?X.slice(0,se):X,Oe=se>=0?X.slice(se+1):"in";return Te=od.get(Te)||Os,Oe=Po.get(Oe)||G,sd(Oe(Te.apply(null,t.call(arguments,1))))};function sd(X){return function(se){return se<=0?0:se>=1?1:X(se)}}function Ko(X){return function(se){return 1-X(1-se)}}function Pa(X){return function(se){return .5*(se<.5?X(2*se):2-X(2-2*se))}}function af(X){return X*X}function Hu(X){return X*X*X}function bl(X){if(X<=0)return 0;if(X>=1)return 1;var se=X*X,Te=se*X;return 4*(X<.5?Te:3*(X-se)+Te-.75)}function Hf(X){return function(se){return Math.pow(se,X)}}function Ic(X){return 1-Math.cos(X*Kt)}function yf(X){return Math.pow(2,10*(X-1))}function Bl(X){return 1-Math.sqrt(1-X*X)}function Ah(X,se){var Te;return arguments.length<2&&(se=.45),arguments.length?Te=se/xt*Math.asin(1/X):(X=1,Te=se/4),function(Oe){return 1+X*Math.pow(2,-10*Oe)*Math.sin((Oe-Te)*xt/se)}}function Qf(X){return X||(X=1.70158),function(se){return se*se*((X+1)*se-X)}}function _f(X){return X<1/2.75?7.5625*X*X:X<2/2.75?7.5625*(X-=1.5/2.75)*X+.75:X<2.5/2.75?7.5625*(X-=2.25/2.75)*X+.9375:7.5625*(X-=2.625/2.75)*X+.984375}e.interpolateHcl=Yc;function Yc(X,se){X=e.hcl(X),se=e.hcl(se);var Te=X.h,Oe=X.c,Ve=X.l,Ye=se.h-Te,Pt=se.c-Oe,at=se.l-Ve;return isNaN(Pt)&&(Pt=0,Oe=isNaN(Oe)?se.c:Oe),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(Wt){return Xr(Te+Ye*Wt,Oe+Pt*Wt,Ve+at*Wt)+""}}e.interpolateHsl=eh;function eh(X,se){X=e.hsl(X),se=e.hsl(se);var Te=X.h,Oe=X.s,Ve=X.l,Ye=se.h-Te,Pt=se.s-Oe,at=se.l-Ve;return isNaN(Pt)&&(Pt=0,Oe=isNaN(Oe)?se.s:Oe),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(Wt){return rr(Te+Ye*Wt,Oe+Pt*Wt,Ve+at*Wt)+""}}e.interpolateLab=th;function th(X,se){X=e.lab(X),se=e.lab(se);var Te=X.l,Oe=X.a,Ve=X.b,Ye=se.l-Te,Pt=se.a-Oe,at=se.b-Ve;return function(Wt){return yn(Te+Ye*Wt,Oe+Pt*Wt,Ve+at*Wt)+""}}e.interpolateRound=ju;function ju(X,se){return se-=X,function(Te){return Math.round(X+se*Te)}}e.transform=function(X){var se=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(Te){if(Te!=null){se.setAttribute("transform",Te);var Oe=se.transform.baseVal.consolidate()}return new jf(Oe?Oe.matrix:Kc)})(X)};function jf(X){var se=[X.a,X.b],Te=[X.c,X.d],Oe=of(se),Ve=cc(se,Te),Ye=of(Nl(Te,se,-Ve))||0;se[0]*Te[1]<Te[0]*se[1]&&(se[0]*=-1,se[1]*=-1,Oe*=-1,Ve*=-1),this.rotate=(Oe?Math.atan2(se[1],se[0]):Math.atan2(-Te[0],Te[1]))*Sr,this.translate=[X.e,X.f],this.scale=[Oe,Ye],this.skew=Ye?Math.atan2(Ve,Ye)*Sr:0}jf.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function cc(X,se){return X[0]*se[0]+X[1]*se[1]}function of(X){var se=Math.sqrt(cc(X,X));return se&&(X[0]/=se,X[1]/=se),se}function Nl(X,se,Te){return X[0]+=Te*se[0],X[1]+=Te*se[1],X}var Kc={a:1,b:0,c:0,d:1,e:0,f:0};e.interpolateTransform=sf;function Rc(X){return X.length?X.pop()+",":""}function gs(X,se,Te,Oe){if(X[0]!==se[0]||X[1]!==se[1]){var Ve=Te.push("translate(",null,",",null,")");Oe.push({i:Ve-4,x:Hs(X[0],se[0])},{i:Ve-2,x:Hs(X[1],se[1])})}else(se[0]||se[1])&&Te.push("translate("+se+")")}function Wf(X,se,Te,Oe){X!==se?(X-se>180?se+=360:se-X>180&&(X+=360),Oe.push({i:Te.push(Rc(Te)+"rotate(",null,")")-2,x:Hs(X,se)})):se&&Te.push(Rc(Te)+"rotate("+se+")")}function Wh(X,se,Te,Oe){X!==se?Oe.push({i:Te.push(Rc(Te)+"skewX(",null,")")-2,x:Hs(X,se)}):se&&Te.push(Rc(Te)+"skewX("+se+")")}function rh(X,se,Te,Oe){if(X[0]!==se[0]||X[1]!==se[1]){var Ve=Te.push(Rc(Te)+"scale(",null,",",null,")");Oe.push({i:Ve-4,x:Hs(X[0],se[0])},{i:Ve-2,x:Hs(X[1],se[1])})}else(se[0]!==1||se[1]!==1)&&Te.push(Rc(Te)+"scale("+se+")")}function sf(X,se){var Te=[],Oe=[];return X=e.transform(X),se=e.transform(se),gs(X.translate,se.translate,Te,Oe),Wf(X.rotate,se.rotate,Te,Oe),Wh(X.skew,se.skew,Te,Oe),rh(X.scale,se.scale,Te,Oe),X=se=null,function(Ve){for(var Ye=-1,Pt=Oe.length,at;++Ye<Pt;)Te[(at=Oe[Ye]).i]=at.x(Ve);return Te.join("")}}function Sh(X,se){return se=(se-=X=+X)||1/se,function(Te){return(Te-X)/se}}function Mu(X,se){return se=(se-=X=+X)||1/se,function(Te){return Math.max(0,Math.min(1,(Te-X)/se))}}e.layout={},e.layout.bundle=function(){return function(X){for(var se=[],Te=-1,Oe=X.length;++Te<Oe;)se.push(ih(X[Te]));return se}};function ih(X){for(var se=X.source,Te=X.target,Oe=Eu(se,Te),Ve=[se];se!==Oe;)se=se.parent,Ve.push(se);for(var Ye=Ve.length;Te!==Oe;)Ve.splice(Ye,0,Te),Te=Te.parent;return Ve}function js(X){for(var se=[],Te=X.parent;Te!=null;)se.push(X),X=Te,Te=Te.parent;return se.push(X),se}function Eu(X,se){if(X===se)return X;for(var Te=js(X),Oe=js(se),Ve=Te.pop(),Ye=Oe.pop(),Pt=null;Ve===Ye;)Pt=Ve,Ve=Te.pop(),Ye=Oe.pop();return Pt}e.layout.chord=function(){var X={},se,Te,Oe,Ve,Ye=0,Pt,at,Wt;function dr(){var Ur={},zr=[],gi=e.range(Ve),xi=[],Wr,ii,di,Li,Ti;for(se=[],Te=[],Wr=0,Li=-1;++Li<Ve;){for(ii=0,Ti=-1;++Ti<Ve;)ii+=Oe[Li][Ti];zr.push(ii),xi.push(e.range(Ve)),Wr+=ii}for(Pt&&gi.sort(function(yo,Da){return Pt(zr[yo],zr[Da])}),at&&xi.forEach(function(yo,Da){yo.sort(function(go,Is){return at(Oe[Da][go],Oe[Da][Is])})}),Wr=(xt-Ye*Ve)/Wr,ii=0,Li=-1;++Li<Ve;){for(di=ii,Ti=-1;++Ti<Ve;){var Qr=gi[Li],Pn=xi[Qr][Ti],kn=Oe[Qr][Pn],Bn=ii,na=ii+=kn*Wr;Ur[Qr+"-"+Pn]={index:Qr,subindex:Pn,startAngle:Bn,endAngle:na,value:kn}}Te[Qr]={index:Qr,startAngle:di,endAngle:ii,value:zr[Qr]},ii+=Ye}for(Li=-1;++Li<Ve;)for(Ti=Li-1;++Ti<Ve;){var Ea=Ur[Li+"-"+Ti],Ia=Ur[Ti+"-"+Li];(Ea.value||Ia.value)&&se.push(Ea.value<Ia.value?{source:Ia,target:Ea}:{source:Ea,target:Ia})}Wt&&pr()}function pr(){se.sort(function(Ur,zr){return Wt((Ur.source.value+Ur.target.value)/2,(zr.source.value+zr.target.value)/2)})}return X.matrix=function(Ur){return arguments.length?(Ve=(Oe=Ur)&&Oe.length,se=Te=null,X):Oe},X.padding=function(Ur){return arguments.length?(Ye=Ur,se=Te=null,X):Ye},X.sortGroups=function(Ur){return arguments.length?(Pt=Ur,se=Te=null,X):Pt},X.sortSubgroups=function(Ur){return arguments.length?(at=Ur,se=null,X):at},X.sortChords=function(Ur){return arguments.length?(Wt=Ur,se&&pr(),X):Wt},X.chords=function(){return se||dr(),se},X.groups=function(){return Te||dr(),Te},X},e.layout.force=function(){var X={},se=e.dispatch("start","tick","end"),Te,Oe=[1,1],Ve,Ye,Pt=.9,at=nl,Wt=nh,dr=-30,pr=Mh,Ur=.1,zr=.64,gi=[],xi=[],Wr,ii,di;function Li(Qr){return function(Pn,kn,Bn,na){if(Pn.point!==Qr){var Ea=Pn.cx-Qr.x,Ia=Pn.cy-Qr.y,yo=na-kn,Da=Ea*Ea+Ia*Ia;if(yo*yo/zr<Da){if(Da<pr){var go=Pn.charge/Da;Qr.px-=Ea*go,Qr.py-=Ia*go}return!0}if(Pn.point&&Da&&Da<pr){var go=Pn.pointCharge/Da;Qr.px-=Ea*go,Qr.py-=Ia*go}}return!Pn.charge}}X.tick=function(){if((Ye*=.99)<.005)return Te=null,se.end({type:"end",alpha:Ye=0}),!0;var Qr=gi.length,Pn=xi.length,kn,Bn,na,Ea,Ia,yo,Da,go,Is;for(Bn=0;Bn<Pn;++Bn)na=xi[Bn],Ea=na.source,Ia=na.target,go=Ia.x-Ea.x,Is=Ia.y-Ea.y,(yo=go*go+Is*Is)&&(yo=Ye*ii[Bn]*((yo=Math.sqrt(yo))-Wr[Bn])/yo,go*=yo,Is*=yo,Ia.x-=go*(Da=Ea.weight+Ia.weight?Ea.weight/(Ea.weight+Ia.weight):.5),Ia.y-=Is*Da,Ea.x+=go*(Da=1-Da),Ea.y+=Is*Da);if((Da=Ye*Ur)&&(go=Oe[0]/2,Is=Oe[1]/2,Bn=-1,Da))for(;++Bn<Qr;)na=gi[Bn],na.x+=(go-na.x)*Da,na.y+=(Is-na.y)*Da;if(dr)for(_u(kn=e.geom.quadtree(gi),Ye,di),Bn=-1;++Bn<Qr;)(na=gi[Bn]).fixed||kn.visit(Li(na));for(Bn=-1;++Bn<Qr;)na=gi[Bn],na.fixed?(na.x=na.px,na.y=na.py):(na.x-=(na.px-(na.px=na.x))*Pt,na.y-=(na.py-(na.py=na.y))*Pt);se.tick({type:"tick",alpha:Ye})},X.nodes=function(Qr){return arguments.length?(gi=Qr,X):gi},X.links=function(Qr){return arguments.length?(xi=Qr,X):xi},X.size=function(Qr){return arguments.length?(Oe=Qr,X):Oe},X.linkDistance=function(Qr){return arguments.length?(at=typeof Qr=="function"?Qr:+Qr,X):at},X.distance=X.linkDistance,X.linkStrength=function(Qr){return arguments.length?(Wt=typeof Qr=="function"?Qr:+Qr,X):Wt},X.friction=function(Qr){return arguments.length?(Pt=+Qr,X):Pt},X.charge=function(Qr){return arguments.length?(dr=typeof Qr=="function"?Qr:+Qr,X):dr},X.chargeDistance=function(Qr){return arguments.length?(pr=Qr*Qr,X):Math.sqrt(pr)},X.gravity=function(Qr){return arguments.length?(Ur=+Qr,X):Ur},X.theta=function(Qr){return arguments.length?(zr=Qr*Qr,X):Math.sqrt(zr)},X.alpha=function(Qr){return arguments.length?(Qr=+Qr,Ye?Qr>0?Ye=Qr:(Te.c=null,Te.t=NaN,Te=null,se.end({type:"end",alpha:Ye=0})):Qr>0&&(se.start({type:"start",alpha:Ye=Qr}),Te=No(X.tick)),X):Ye},X.start=function(){var Qr,Pn=gi.length,kn=xi.length,Bn=Oe[0],na=Oe[1],Ea,Ia;for(Qr=0;Qr<Pn;++Qr)(Ia=gi[Qr]).index=Qr,Ia.weight=0;for(Qr=0;Qr<kn;++Qr)Ia=xi[Qr],typeof Ia.source=="number"&&(Ia.source=gi[Ia.source]),typeof Ia.target=="number"&&(Ia.target=gi[Ia.target]),++Ia.source.weight,++Ia.target.weight;for(Qr=0;Qr<Pn;++Qr)Ia=gi[Qr],isNaN(Ia.x)&&(Ia.x=yo("x",Bn)),isNaN(Ia.y)&&(Ia.y=yo("y",na)),isNaN(Ia.px)&&(Ia.px=Ia.x),isNaN(Ia.py)&&(Ia.py=Ia.y);if(Wr=[],typeof at=="function")for(Qr=0;Qr<kn;++Qr)Wr[Qr]=+at.call(this,xi[Qr],Qr);else for(Qr=0;Qr<kn;++Qr)Wr[Qr]=at;if(ii=[],typeof Wt=="function")for(Qr=0;Qr<kn;++Qr)ii[Qr]=+Wt.call(this,xi[Qr],Qr);else for(Qr=0;Qr<kn;++Qr)ii[Qr]=Wt;if(di=[],typeof dr=="function")for(Qr=0;Qr<Pn;++Qr)di[Qr]=+dr.call(this,gi[Qr],Qr);else for(Qr=0;Qr<Pn;++Qr)di[Qr]=dr;function yo(Da,go){if(!Ea){for(Ea=new Array(Pn),Xs=0;Xs<Pn;++Xs)Ea[Xs]=[];for(Xs=0;Xs<kn;++Xs){var Is=xi[Xs];Ea[Is.source.index].push(Is.target),Ea[Is.target.index].push(Is.source)}}for(var Ms=Ea[Qr],Xs=-1,Un=Ms.length,ja;++Xs<Un;)if(!isNaN(ja=Ms[Xs][Da]))return ja;return Math.random()*go}return X.resume()},X.resume=function(){return X.alpha(.1)},X.stop=function(){return X.alpha(0)},X.drag=function(){if(Ve||(Ve=e.behavior.drag().origin(G).on("dragstart.force",Dc).on("drag.force",Ti).on("dragend.force",ks)),!arguments.length)return Ve;this.on("mouseover.force",bc).on("mouseout.force",hu).call(Ve)};function Ti(Qr){Qr.px=e.event.x,Qr.py=e.event.y,X.resume()}return e.rebind(X,se,"on")};function Dc(X){X.fixed|=2}function ks(X){X.fixed&=-7}function bc(X){X.fixed|=4,X.px=X.x,X.py=X.y}function hu(X){X.fixed&=-5}function _u(X,se,Te){var Oe=0,Ve=0;if(X.charge=0,!X.leaf)for(var Ye=X.nodes,Pt=Ye.length,at=-1,Wt;++at<Pt;)Wt=Ye[at],Wt!=null&&(_u(Wt,se,Te),X.charge+=Wt.charge,Oe+=Wt.charge*Wt.cx,Ve+=Wt.charge*Wt.cy);if(X.point){X.leaf||(X.point.x+=Math.random()-.5,X.point.y+=Math.random()-.5);var dr=se*Te[X.point.index];X.charge+=X.pointCharge=dr,Oe+=dr*X.point.x,Ve+=dr*X.point.y}X.cx=Oe/X.charge,X.cy=Ve/X.charge}var nl=20,nh=1,Mh=1/0;e.layout.hierarchy=function(){var X=Pf,se=bd,Te=xf;function Oe(Ve){var Ye=[Ve],Pt=[],at;for(Ve.depth=0;(at=Ye.pop())!=null;)if(Pt.push(at),(dr=se.call(Oe,at,at.depth))&&(Wt=dr.length)){for(var Wt,dr,pr;--Wt>=0;)Ye.push(pr=dr[Wt]),pr.parent=at,pr.depth=at.depth+1;Te&&(at.value=0),at.children=dr}else Te&&(at.value=+Te.call(Oe,at,at.depth)||0),delete at.children;return wc(Ve,function(Ur){var zr,gi;X&&(zr=Ur.children)&&zr.sort(X),Te&&(gi=Ur.parent)&&(gi.value+=Ur.value)}),Pt}return Oe.sort=function(Ve){return arguments.length?(X=Ve,Oe):X},Oe.children=function(Ve){return arguments.length?(se=Ve,Oe):se},Oe.value=function(Ve){return arguments.length?(Te=Ve,Oe):Te},Oe.revalue=function(Ve){return Te&&(Fc(Ve,function(Ye){Ye.children&&(Ye.value=0)}),wc(Ve,function(Ye){var Pt;Ye.children||(Ye.value=+Te.call(Oe,Ye,Ye.depth)||0),(Pt=Ye.parent)&&(Pt.value+=Ye.value)})),Ve},Oe};function zu(X,se){return e.rebind(X,se,"sort","children","value"),X.nodes=X,X.links=qu,X}function Fc(X,se){for(var Te=[X];(X=Te.pop())!=null;)if(se(X),(Ve=X.children)&&(Oe=Ve.length))for(var Oe,Ve;--Oe>=0;)Te.push(Ve[Oe])}function wc(X,se){for(var Te=[X],Oe=[];(X=Te.pop())!=null;)if(Oe.push(X),(Pt=X.children)&&(Ye=Pt.length))for(var Ve=-1,Ye,Pt;++Ve<Ye;)Te.push(Pt[Ve]);for(;(X=Oe.pop())!=null;)se(X)}function bd(X){return X.children}function xf(X){return X.value}function Pf(X,se){return se.value-X.value}function qu(X){return e.merge(X.map(function(se){return(se.children||[]).map(function(Te){return{source:se,target:Te}})}))}e.layout.partition=function(){var X=e.layout.hierarchy(),se=[1,1];function Te(Ye,Pt,at,Wt){var dr=Ye.children;if(Ye.x=Pt,Ye.y=Ye.depth*Wt,Ye.dx=at,Ye.dy=Wt,dr&&(Ur=dr.length)){var pr=-1,Ur,zr,gi;for(at=Ye.value?at/Ye.value:0;++pr<Ur;)Te(zr=dr[pr],Pt,gi=zr.value*at,Wt),Pt+=gi}}function Oe(Ye){var Pt=Ye.children,at=0;if(Pt&&(dr=Pt.length))for(var Wt=-1,dr;++Wt<dr;)at=Math.max(at,Oe(Pt[Wt]));return 1+at}function Ve(Ye,Pt){var at=X.call(this,Ye,Pt);return Te(at[0],0,se[0],se[1]/Oe(at[0])),at}return Ve.size=function(Ye){return arguments.length?(se=Ye,Ve):se},zu(Ve,X)},e.layout.pie=function(){var X=Number,se=bf,Te=0,Oe=xt,Ve=0;function Ye(Pt){var at=Pt.length,Wt=Pt.map(function(Li,Ti){return+X.call(Ye,Li,Ti)}),dr=+(typeof Te=="function"?Te.apply(this,arguments):Te),pr=(typeof Oe=="function"?Oe.apply(this,arguments):Oe)-dr,Ur=Math.min(Math.abs(pr)/at,+(typeof Ve=="function"?Ve.apply(this,arguments):Ve)),zr=Ur*(pr<0?-1:1),gi=e.sum(Wt),xi=gi?(pr-at*zr)/gi:0,Wr=e.range(at),ii=[],di;return se!=null&&Wr.sort(se===bf?function(Li,Ti){return Wt[Ti]-Wt[Li]}:function(Li,Ti){return se(Pt[Li],Pt[Ti])}),Wr.forEach(function(Li){ii[Li]={data:Pt[Li],value:di=Wt[Li],startAngle:dr,endAngle:dr+=di*xi+zr,padAngle:Ur}}),ii}return Ye.value=function(Pt){return arguments.length?(X=Pt,Ye):X},Ye.sort=function(Pt){return arguments.length?(se=Pt,Ye):se},Ye.startAngle=function(Pt){return arguments.length?(Te=Pt,Ye):Te},Ye.endAngle=function(Pt){return arguments.length?(Oe=Pt,Ye):Oe},Ye.padAngle=function(Pt){return arguments.length?(Ve=Pt,Ye):Ve},Ye};var bf={};e.layout.stack=function(){var X=G,se=du,Te=ku,Oe=Xh,Ve=jl,Ye=lf;function Pt(at,Wt){if(!(xi=at.length))return at;var dr=at.map(function(Li,Ti){return X.call(Pt,Li,Ti)}),pr=dr.map(function(Li){return Li.map(function(Ti,Qr){return[Ve.call(Pt,Ti,Qr),Ye.call(Pt,Ti,Qr)]})}),Ur=se.call(Pt,pr,Wt);dr=e.permute(dr,Ur),pr=e.permute(pr,Ur);var zr=Te.call(Pt,pr,Wt),gi=dr[0].length,xi,Wr,ii,di;for(ii=0;ii<gi;++ii)for(Oe.call(Pt,dr[0][ii],di=zr[ii],pr[0][ii][1]),Wr=1;Wr<xi;++Wr)Oe.call(Pt,dr[Wr][ii],di+=pr[Wr-1][ii][1],pr[Wr][ii][1]);return at}return Pt.values=function(at){return arguments.length?(X=at,Pt):X},Pt.order=function(at){return arguments.length?(se=typeof at=="function"?at:If.get(at)||du,Pt):se},Pt.offset=function(at){return arguments.length?(Te=typeof at=="function"?at:Cs.get(at)||ku,Pt):Te},Pt.x=function(at){return arguments.length?(Ve=at,Pt):Ve},Pt.y=function(at){return arguments.length?(Ye=at,Pt):Ye},Pt.out=function(at){return arguments.length?(Oe=at,Pt):Oe},Pt};function jl(X){return X.x}function lf(X){return X.y}function Xh(X,se,Te){X.y0=se,X.y=Te}var If=e.map({"inside-out":function(X){var se=X.length,Te,Oe,Ve=X.map(Xf),Ye=X.map(Us),Pt=e.range(se).sort(function(Ur,zr){return Ve[Ur]-Ve[zr]}),at=0,Wt=0,dr=[],pr=[];for(Te=0;Te<se;++Te)Oe=Pt[Te],at<Wt?(at+=Ye[Oe],dr.push(Oe)):(Wt+=Ye[Oe],pr.push(Oe));return pr.reverse().concat(dr)},reverse:function(X){return e.range(X.length).reverse()},default:du}),Cs=e.map({silhouette:function(X){var se=X.length,Te=X[0].length,Oe=[],Ve=0,Ye,Pt,at,Wt=[];for(Pt=0;Pt<Te;++Pt){for(Ye=0,at=0;Ye<se;Ye++)at+=X[Ye][Pt][1];at>Ve&&(Ve=at),Oe.push(at)}for(Pt=0;Pt<Te;++Pt)Wt[Pt]=(Ve-Oe[Pt])/2;return Wt},wiggle:function(X){var se=X.length,Te=X[0],Oe=Te.length,Ve,Ye,Pt,at,Wt,dr,pr,Ur,zr,gi=[];for(gi[0]=Ur=zr=0,Ye=1;Ye<Oe;++Ye){for(Ve=0,at=0;Ve<se;++Ve)at+=X[Ve][Ye][1];for(Ve=0,Wt=0,pr=Te[Ye][0]-Te[Ye-1][0];Ve<se;++Ve){for(Pt=0,dr=(X[Ve][Ye][1]-X[Ve][Ye-1][1])/(2*pr);Pt<Ve;++Pt)dr+=(X[Pt][Ye][1]-X[Pt][Ye-1][1])/pr;Wt+=dr*X[Ve][Ye][1]}gi[Ye]=Ur-=at?Wt/at*pr:0,Ur<zr&&(zr=Ur)}for(Ye=0;Ye<Oe;++Ye)gi[Ye]-=zr;return gi},expand:function(X){var se=X.length,Te=X[0].length,Oe=1/se,Ve,Ye,Pt,at=[];for(Ye=0;Ye<Te;++Ye){for(Ve=0,Pt=0;Ve<se;Ve++)Pt+=X[Ve][Ye][1];if(Pt)for(Ve=0;Ve<se;Ve++)X[Ve][Ye][1]/=Pt;else for(Ve=0;Ve<se;Ve++)X[Ve][Ye][1]=Oe}for(Ye=0;Ye<Te;++Ye)at[Ye]=0;return at},zero:ku});function du(X){return e.range(X.length)}function ku(X){for(var se=-1,Te=X[0].length,Oe=[];++se<Te;)Oe[se]=0;return Oe}function Xf(X){for(var se=1,Te=0,Oe=X[0][1],Ve,Ye=X.length;se<Ye;++se)(Ve=X[se][1])>Oe&&(Te=se,Oe=Ve);return Te}function Us(X){return X.reduce(wf,0)}function wf(X,se){return X+se[1]}e.layout.histogram=function(){var X=!0,se=Number,Te=Rf,Oe=zc;function Ve(Ye,zr){for(var at=[],Wt=Ye.map(se,this),dr=Te.call(this,Wt,zr),pr=Oe.call(this,dr,Wt,zr),Ur,zr=-1,gi=Wt.length,xi=pr.length-1,Wr=X?1:1/gi,ii;++zr<xi;)Ur=at[zr]=[],Ur.dx=pr[zr+1]-(Ur.x=pr[zr]),Ur.y=0;if(xi>0)for(zr=-1;++zr<gi;)ii=Wt[zr],ii>=dr[0]&&ii<=dr[1]&&(Ur=at[e.bisect(pr,ii,1,xi)-1],Ur.y+=Wr,Ur.push(Ye[zr]));return at}return Ve.value=function(Ye){return arguments.length?(se=Ye,Ve):se},Ve.range=function(Ye){return arguments.length?(Te=hi(Ye),Ve):Te},Ve.bins=function(Ye){return arguments.length?(Oe=typeof Ye=="number"?function(Pt){return Wu(Pt,Ye)}:hi(Ye),Ve):Oe},Ve.frequency=function(Ye){return arguments.length?(X=!!Ye,Ve):X},Ve};function zc(X,se){return Wu(X,Math.ceil(Math.log(se.length)/Math.LN2+1))}function Wu(X,se){for(var Te=-1,Oe=+X[0],Ve=(X[1]-Oe)/se,Ye=[];++Te<=se;)Ye[Te]=Ve*Te+Oe;return Ye}function Rf(X){return[e.min(X),e.max(X)]}e.layout.pack=function(){var X=e.layout.hierarchy().sort(Xu),se=0,Te=[1,1],Oe;function Ve(Ye,Pt){var at=X.call(this,Ye,Pt),Wt=at[0],dr=Te[0],pr=Te[1],Ur=Oe==null?Math.sqrt:typeof Oe=="function"?Oe:function(){return Oe};if(Wt.x=Wt.y=0,wc(Wt,function(gi){gi.r=+Ur(gi.value)}),wc(Wt,ah),se){var zr=se*(Oe?1:Math.max(2*Wt.r/dr,2*Wt.r/pr))/2;wc(Wt,function(gi){gi.r+=zr}),wc(Wt,ah),wc(Wt,function(gi){gi.r-=zr})}return Tc(Wt,dr/2,pr/2,Oe?1:1/Math.max(2*Wt.r/dr,2*Wt.r/pr)),at}return Ve.size=function(Ye){return arguments.length?(Te=Ye,Ve):Te},Ve.radius=function(Ye){return arguments.length?(Oe=Ye==null||typeof Ye=="function"?Ye:+Ye,Ve):Oe},Ve.padding=function(Ye){return arguments.length?(se=+Ye,Ve):se},zu(Ve,X)};function Xu(X,se){return X.value-se.value}function uf(X,se){var Te=X._pack_next;X._pack_next=se,se._pack_prev=X,se._pack_next=Te,Te._pack_prev=se}function Zf(X,se){X._pack_next=se,se._pack_prev=X}function Wl(X,se){var Te=se.x-X.x,Oe=se.y-X.y,Ve=X.r+se.r;return .999*Ve*Ve>Te*Te+Oe*Oe}function ah(X){if(!(se=X.children)||!(zr=se.length))return;var se,Te=1/0,Oe=-1/0,Ve=1/0,Ye=-1/0,Pt,at,Wt,dr,pr,Ur,zr;function gi(Qr){Te=Math.min(Qr.x-Qr.r,Te),Oe=Math.max(Qr.x+Qr.r,Oe),Ve=Math.min(Qr.y-Qr.r,Ve),Ye=Math.max(Qr.y+Qr.r,Ye)}if(se.forEach(Zu),Pt=se[0],Pt.x=-Pt.r,Pt.y=0,gi(Pt),zr>1&&(at=se[1],at.x=at.r,at.y=0,gi(at),zr>2))for(Wt=se[2],wl(Pt,at,Wt),gi(Wt),uf(Pt,Wt),Pt._pack_prev=Wt,uf(Wt,at),at=Pt._pack_next,dr=3;dr<zr;dr++){wl(Pt,at,Wt=se[dr]);var xi=0,Wr=1,ii=1;for(pr=at._pack_next;pr!==at;pr=pr._pack_next,Wr++)if(Wl(pr,Wt)){xi=1;break}if(xi==1)for(Ur=Pt._pack_prev;Ur!==pr._pack_prev&&!Wl(Ur,Wt);Ur=Ur._pack_prev,ii++);xi?(Wr<ii||Wr==ii&&at.r<Pt.r?Zf(Pt,at=pr):Zf(Pt=Ur,at),dr--):(uf(Pt,Wt),at=Wt,gi(Wt))}var di=(Te+Oe)/2,Li=(Ve+Ye)/2,Ti=0;for(dr=0;dr<zr;dr++)Wt=se[dr],Wt.x-=di,Wt.y-=Li,Ti=Math.max(Ti,Wt.r+Math.sqrt(Wt.x*Wt.x+Wt.y*Wt.y));X.r=Ti,se.forEach(qc)}function Zu(X){X._pack_next=X._pack_prev=X}function qc(X){delete X._pack_next,delete X._pack_prev}function Tc(X,se,Te,Oe){var Ve=X.children;if(X.x=se+=Oe*X.x,X.y=Te+=Oe*X.y,X.r*=Oe,Ve)for(var Ye=-1,Pt=Ve.length;++Ye<Pt;)Tc(Ve[Ye],se,Te,Oe)}function wl(X,se,Te){var Oe=X.r+Te.r,Ve=se.x-X.x,Ye=se.y-X.y;if(Oe&&(Ve||Ye)){var Pt=se.r+Te.r,at=Ve*Ve+Ye*Ye;Pt*=Pt,Oe*=Oe;var Wt=.5+(Oe-Pt)/(2*at),dr=Math.sqrt(Math.max(0,2*Pt*(Oe+at)-(Oe-=at)*Oe-Pt*Pt))/(2*at);Te.x=X.x+Wt*Ve+dr*Ye,Te.y=X.y+Wt*Ye-dr*Ve}else Te.x=X.x+Oe,Te.y=X.y}e.layout.tree=function(){var X=e.layout.hierarchy().sort(null).value(null),se=vu,Te=[1,1],Oe=null;function Ve(pr,Ur){var zr=X.call(this,pr,Ur),gi=zr[0],xi=Ye(gi);if(wc(xi,Pt),xi.parent.m=-xi.z,Fc(xi,at),Oe)Fc(gi,dr);else{var Wr=gi,ii=gi,di=gi;Fc(gi,function(Pn){Pn.x<Wr.x&&(Wr=Pn),Pn.x>ii.x&&(ii=Pn),Pn.depth>di.depth&&(di=Pn)});var Li=se(Wr,ii)/2-Wr.x,Ti=Te[0]/(ii.x+se(ii,Wr)/2+Li),Qr=Te[1]/(di.depth||1);Fc(gi,function(Pn){Pn.x=(Pn.x+Li)*Ti,Pn.y=Pn.depth*Qr})}return zr}function Ye(pr){for(var Ur={A:null,children:[pr]},zr=[Ur],gi;(gi=zr.pop())!=null;)for(var xi=gi.children,Wr,ii=0,di=xi.length;ii<di;++ii)zr.push((xi[ii]=Wr={_:xi[ii],parent:gi,children:(Wr=xi[ii].children)&&Wr.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:ii}).a=Wr);return Ur.children[0]}function Pt(pr){var Ur=pr.children,zr=pr.parent.children,gi=pr.i?zr[pr.i-1]:null;if(Ur.length){Bc(pr);var xi=(Ur[0].z+Ur[Ur.length-1].z)/2;gi?(pr.z=gi.z+se(pr._,gi._),pr.m=pr.z-xi):pr.z=xi}else gi&&(pr.z=gi.z+se(pr._,gi._));pr.parent.A=Wt(pr,gi,pr.parent.A||zr[0])}function at(pr){pr._.x=pr.z+pr.parent.m,pr.m+=pr.parent.m}function Wt(pr,Ur,zr){if(Ur){for(var gi=pr,xi=pr,Wr=Ur,ii=gi.parent.children[0],di=gi.m,Li=xi.m,Ti=Wr.m,Qr=ii.m,Pn;Wr=cf(Wr),gi=Oc(gi),Wr&&gi;)ii=Oc(ii),xi=cf(xi),xi.a=pr,Pn=Wr.z+Ti-gi.z-di+se(Wr._,gi._),Pn>0&&(fc(kt(Wr,pr,zr),pr,Pn),di+=Pn,Li+=Pn),Ti+=Wr.m,di+=gi.m,Qr+=ii.m,Li+=xi.m;Wr&&!cf(xi)&&(xi.t=Wr,xi.m+=Ti-Li),gi&&!Oc(ii)&&(ii.t=gi,ii.m+=di-Qr,zr=pr)}return zr}function dr(pr){pr.x*=Te[0],pr.y=pr.depth*Te[1]}return Ve.separation=function(pr){return arguments.length?(se=pr,Ve):se},Ve.size=function(pr){return arguments.length?(Oe=(Te=pr)==null?dr:null,Ve):Oe?null:Te},Ve.nodeSize=function(pr){return arguments.length?(Oe=(Te=pr)==null?null:dr,Ve):Oe?Te:null},zu(Ve,X)};function vu(X,se){return X.parent==se.parent?1:2}function Oc(X){var se=X.children;return se.length?se[0]:X.t}function cf(X){var se=X.children,Te;return(Te=se.length)?se[Te-1]:X.t}function fc(X,se,Te){var Oe=Te/(se.i-X.i);se.c-=Oe,se.s+=Te,X.c+=Oe,se.z+=Te,se.m+=Te}function Bc(X){for(var se=0,Te=0,Oe=X.children,Ve=Oe.length,Ye;--Ve>=0;)Ye=Oe[Ve],Ye.z+=se,Ye.m+=se,se+=Ye.s+(Te+=Ye.c)}function kt(X,se,Te){return X.a.parent===se.parent?X.a:Te}e.layout.cluster=function(){var X=e.layout.hierarchy().sort(null).value(null),se=vu,Te=[1,1],Oe=!1;function Ve(Ye,Pt){var at=X.call(this,Ye,Pt),Wt=at[0],dr,pr=0;wc(Wt,function(Wr){var ii=Wr.children;ii&&ii.length?(Wr.x=Mr(ii),Wr.y=Zt(ii)):(Wr.x=dr?pr+=se(Wr,dr):0,Wr.y=0,dr=Wr)});var Ur=xr(Wt),zr=Kr(Wt),gi=Ur.x-se(Ur,zr)/2,xi=zr.x+se(zr,Ur)/2;return wc(Wt,Oe?function(Wr){Wr.x=(Wr.x-Wt.x)*Te[0],Wr.y=(Wt.y-Wr.y)*Te[1]}:function(Wr){Wr.x=(Wr.x-gi)/(xi-gi)*Te[0],Wr.y=(1-(Wt.y?Wr.y/Wt.y:1))*Te[1]}),at}return Ve.separation=function(Ye){return arguments.length?(se=Ye,Ve):se},Ve.size=function(Ye){return arguments.length?(Oe=(Te=Ye)==null,Ve):Oe?null:Te},Ve.nodeSize=function(Ye){return arguments.length?(Oe=(Te=Ye)!=null,Ve):Oe?Te:null},zu(Ve,X)};function Zt(X){return 1+e.max(X,function(se){return se.y})}function Mr(X){return X.reduce(function(se,Te){return se+Te.x},0)/X.length}function xr(X){var se=X.children;return se&&se.length?xr(se[0]):X}function Kr(X){var se=X.children,Te;return se&&(Te=se.length)?Kr(se[Te-1]):X}e.layout.treemap=function(){var X=e.layout.hierarchy(),se=Math.round,Te=[1,1],Oe=null,Ve=Mi,Ye=!1,Pt,at="squarify",Wt=.5*(1+Math.sqrt(5));function dr(Wr,ii){for(var di=-1,Li=Wr.length,Ti,Qr;++di<Li;)Qr=(Ti=Wr[di]).value*(ii<0?0:ii),Ti.area=isNaN(Qr)||Qr<=0?0:Qr}function pr(Wr){var ii=Wr.children;if(ii&&ii.length){var di=Ve(Wr),Li=[],Ti=ii.slice(),Qr,Pn=1/0,kn,Bn=at==="slice"?di.dx:at==="dice"?di.dy:at==="slice-dice"?Wr.depth&1?di.dy:di.dx:Math.min(di.dx,di.dy),na;for(dr(Ti,di.dx*di.dy/Wr.value),Li.area=0;(na=Ti.length)>0;)Li.push(Qr=Ti[na-1]),Li.area+=Qr.area,at!=="squarify"||(kn=zr(Li,Bn))<=Pn?(Ti.pop(),Pn=kn):(Li.area-=Li.pop().area,gi(Li,Bn,di,!1),Bn=Math.min(di.dx,di.dy),Li.length=Li.area=0,Pn=1/0);Li.length&&(gi(Li,Bn,di,!0),Li.length=Li.area=0),ii.forEach(pr)}}function Ur(Wr){var ii=Wr.children;if(ii&&ii.length){var di=Ve(Wr),Li=ii.slice(),Ti,Qr=[];for(dr(Li,di.dx*di.dy/Wr.value),Qr.area=0;Ti=Li.pop();)Qr.push(Ti),Qr.area+=Ti.area,Ti.z!=null&&(gi(Qr,Ti.z?di.dx:di.dy,di,!Li.length),Qr.length=Qr.area=0);ii.forEach(Ur)}}function zr(Wr,ii){for(var di=Wr.area,Li,Ti=0,Qr=1/0,Pn=-1,kn=Wr.length;++Pn<kn;)(Li=Wr[Pn].area)&&(Li<Qr&&(Qr=Li),Li>Ti&&(Ti=Li));return di*=di,ii*=ii,di?Math.max(ii*Ti*Wt/di,di/(ii*Qr*Wt)):1/0}function gi(Wr,ii,di,Li){var Ti=-1,Qr=Wr.length,Pn=di.x,kn=di.y,Bn=ii?se(Wr.area/ii):0,na;if(ii==di.dx){for((Li||Bn>di.dy)&&(Bn=di.dy);++Ti<Qr;)na=Wr[Ti],na.x=Pn,na.y=kn,na.dy=Bn,Pn+=na.dx=Math.min(di.x+di.dx-Pn,Bn?se(na.area/Bn):0);na.z=!0,na.dx+=di.x+di.dx-Pn,di.y+=Bn,di.dy-=Bn}else{for((Li||Bn>di.dx)&&(Bn=di.dx);++Ti<Qr;)na=Wr[Ti],na.x=Pn,na.y=kn,na.dx=Bn,kn+=na.dy=Math.min(di.y+di.dy-kn,Bn?se(na.area/Bn):0);na.z=!1,na.dy+=di.y+di.dy-kn,di.x+=Bn,di.dx-=Bn}}function xi(Wr){var ii=Pt||X(Wr),di=ii[0];return di.x=di.y=0,di.value?(di.dx=Te[0],di.dy=Te[1]):di.dx=di.dy=0,Pt&&X.revalue(di),dr([di],di.dx*di.dy/di.value),(Pt?Ur:pr)(di),Ye&&(Pt=ii),ii}return xi.size=function(Wr){return arguments.length?(Te=Wr,xi):Te},xi.padding=function(Wr){if(!arguments.length)return Oe;function ii(Ti){var Qr=Wr.call(xi,Ti,Ti.depth);return Qr==null?Mi(Ti):Wi(Ti,typeof Qr=="number"?[Qr,Qr,Qr,Qr]:Qr)}function di(Ti){return Wi(Ti,Wr)}var Li;return Ve=(Oe=Wr)==null?Mi:(Li=typeof Wr)=="function"?ii:(Li==="number"&&(Wr=[Wr,Wr,Wr,Wr]),di),xi},xi.round=function(Wr){return arguments.length?(se=Wr?Math.round:Number,xi):se!=Number},xi.sticky=function(Wr){return arguments.length?(Ye=Wr,Pt=null,xi):Ye},xi.ratio=function(Wr){return arguments.length?(Wt=Wr,xi):Wt},xi.mode=function(Wr){return arguments.length?(at=Wr+"",xi):at},zu(xi,X)};function Mi(X){return{x:X.x,y:X.y,dx:X.dx,dy:X.dy}}function Wi(X,se){var Te=X.x+se[3],Oe=X.y+se[0],Ve=X.dx-se[1]-se[3],Ye=X.dy-se[0]-se[2];return Ve<0&&(Te+=Ve/2,Ve=0),Ye<0&&(Oe+=Ye/2,Ye=0),{x:Te,y:Oe,dx:Ve,dy:Ye}}e.random={normal:function(X,se){var Te=arguments.length;return Te<2&&(se=1),Te<1&&(X=0),function(){var Oe,Ve,Ye;do Oe=Math.random()*2-1,Ve=Math.random()*2-1,Ye=Oe*Oe+Ve*Ve;while(!Ye||Ye>1);return X+se*Oe*Math.sqrt(-2*Math.log(Ye)/Ye)}},logNormal:function(){var X=e.random.normal.apply(e,arguments);return function(){return Math.exp(X())}},bates:function(X){var se=e.random.irwinHall(X);return function(){return se()/X}},irwinHall:function(X){return function(){for(var se=0,Te=0;Te<X;Te++)se+=Math.random();return se}}},e.scale={};function dn(X){var se=X[0],Te=X[X.length-1];return se<Te?[se,Te]:[Te,se]}function wn(X){return X.rangeExtent?X.rangeExtent():dn(X.range())}function On(X,se,Te,Oe){var Ve=Te(X[0],X[1]),Ye=Oe(se[0],se[1]);return function(Pt){return Ye(Ve(Pt))}}function Yi(X,se){var Te=0,Oe=X.length-1,Ve=X[Te],Ye=X[Oe],Pt;return Ye<Ve&&(Pt=Te,Te=Oe,Oe=Pt,Pt=Ve,Ve=Ye,Ye=Pt),X[Te]=se.floor(Ve),X[Oe]=se.ceil(Ye),X}function $i(X){return X?{floor:function(se){return Math.floor(se/X)*X},ceil:function(se){return Math.ceil(se/X)*X}}:an}var an={floor:G,ceil:G};function Fi(X,se,Te,Oe){var Ve=[],Ye=[],Pt=0,at=Math.min(X.length,se.length)-1;for(X[at]<X[0]&&(X=X.slice().reverse(),se=se.slice().reverse());++Pt<=at;)Ve.push(Te(X[Pt-1],X[Pt])),Ye.push(Oe(se[Pt-1],se[Pt]));return function(Wt){var dr=e.bisect(X,Wt,1,at)-1;return Ye[dr](Ve[dr](Wt))}}e.scale.linear=function(){return ta([0,1],[0,1],xl,!1)};function ta(X,se,Te,Oe){var Ve,Ye;function Pt(){var Wt=Math.min(X.length,se.length)>2?Fi:On,dr=Oe?Mu:Sh;return Ve=Wt(X,se,dr,Te),Ye=Wt(se,X,dr,xl),at}function at(Wt){return Ve(Wt)}return at.invert=function(Wt){return Ye(Wt)},at.domain=function(Wt){return arguments.length?(X=Wt.map(Number),Pt()):X},at.range=function(Wt){return arguments.length?(se=Wt,Pt()):se},at.rangeRound=function(Wt){return at.range(Wt).interpolate(ju)},at.clamp=function(Wt){return arguments.length?(Oe=Wt,Pt()):Oe},at.interpolate=function(Wt){return arguments.length?(Te=Wt,Pt()):Te},at.ticks=function(Wt){return Na(X,Wt)},at.tickFormat=function(Wt,dr){return d3_scale_linearTickFormat(X,Wt,dr)},at.nice=function(Wt){return Ra(X,Wt),Pt()},at.copy=function(){return ta(X,se,Te,Oe)},Pt()}function Ca(X,se){return e.rebind(X,se,"range","rangeRound","interpolate","clamp")}function Ra(X,se){return Yi(X,$i(La(X,se)[2])),Yi(X,$i(La(X,se)[2])),X}function La(X,se){se==null&&(se=10);var Te=dn(X),Oe=Te[1]-Te[0],Ve=Math.pow(10,Math.floor(Math.log(Oe/se)/Math.LN10)),Ye=se/Oe*Ve;return Ye<=.15?Ve*=10:Ye<=.35?Ve*=5:Ye<=.75&&(Ve*=2),Te[0]=Math.ceil(Te[0]/Ve)*Ve,Te[1]=Math.floor(Te[1]/Ve)*Ve+Ve*.5,Te[2]=Ve,Te}function Na(X,se){return e.range.apply(e,La(X,se))}var Zn={s:1,g:1,p:1,r:1,e:1};function Dn(X){return-Math.floor(Math.log(X)/Math.LN10+.01)}function Ka(X,se){var Te=Dn(se[2]);return X in Zn?Math.abs(Te-Dn(Math.max(p(se[0]),p(se[1]))))+ +(X!=="e"):Te-(X==="%")*2}e.scale.log=function(){return bo(e.scale.linear().domain([0,1]),10,!0,[1,10])};function bo(X,se,Te,Oe){function Ve(at){return(Te?Math.log(at<0?0:at):-Math.log(at>0?0:-at))/Math.log(se)}function Ye(at){return Te?Math.pow(se,at):-Math.pow(se,-at)}function Pt(at){return X(Ve(at))}return Pt.invert=function(at){return Ye(X.invert(at))},Pt.domain=function(at){return arguments.length?(Te=at[0]>=0,X.domain((Oe=at.map(Number)).map(Ve)),Pt):Oe},Pt.base=function(at){return arguments.length?(se=+at,X.domain(Oe.map(Ve)),Pt):se},Pt.nice=function(){var at=Yi(Oe.map(Ve),Te?Math:Zo);return X.domain(at),Oe=at.map(Ye),Pt},Pt.ticks=function(){var at=dn(Oe),Wt=[],dr=at[0],pr=at[1],Ur=Math.floor(Ve(dr)),zr=Math.ceil(Ve(pr)),gi=se%1?2:se;if(isFinite(zr-Ur)){if(Te){for(;Ur<zr;Ur++)for(var xi=1;xi<gi;xi++)Wt.push(Ye(Ur)*xi);Wt.push(Ye(Ur))}else for(Wt.push(Ye(Ur));Ur++<zr;)for(var xi=gi-1;xi>0;xi--)Wt.push(Ye(Ur)*xi);for(Ur=0;Wt[Ur]<dr;Ur++);for(zr=Wt.length;Wt[zr-1]>pr;zr--);Wt=Wt.slice(Ur,zr)}return Wt},Pt.copy=function(){return bo(X.copy(),se,Te,Oe)},Ca(Pt,X)}var Zo={floor:function(X){return-Math.ceil(-X)},ceil:function(X){return-Math.floor(-X)}};e.scale.pow=function(){return Ss(e.scale.linear(),1,[0,1])};function Ss(X,se,Te){var Oe=as(se),Ve=as(1/se);function Ye(Pt){return X(Oe(Pt))}return Ye.invert=function(Pt){return Ve(X.invert(Pt))},Ye.domain=function(Pt){return arguments.length?(X.domain((Te=Pt.map(Number)).map(Oe)),Ye):Te},Ye.ticks=function(Pt){return Na(Te,Pt)},Ye.tickFormat=function(Pt,at){return d3_scale_linearTickFormat(Te,Pt,at)},Ye.nice=function(Pt){return Ye.domain(Ra(Te,Pt))},Ye.exponent=function(Pt){return arguments.length?(Oe=as(se=Pt),Ve=as(1/se),X.domain(Te.map(Oe)),Ye):se},Ye.copy=function(){return Ss(X.copy(),se,Te)},Ca(Ye,X)}function as(X){return function(se){return se<0?-Math.pow(-se,X):Math.pow(se,X)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ws([],{t:"range",a:[[]]})};function ws(X,se){var Te,Oe,Ve;function Ye(at){return Oe[((Te.get(at)||(se.t==="range"?Te.set(at,X.push(at)):NaN))-1)%Oe.length]}function Pt(at,Wt){return e.range(X.length).map(function(dr){return at+Wt*dr})}return Ye.domain=function(at){if(!arguments.length)return X;X=[],Te=new T;for(var Wt=-1,dr=at.length,pr;++Wt<dr;)Te.has(pr=at[Wt])||Te.set(pr,X.push(pr));return Ye[se.t].apply(Ye,se.a)},Ye.range=function(at){return arguments.length?(Oe=at,Ve=0,se={t:"range",a:arguments},Ye):Oe},Ye.rangePoints=function(at,Wt){arguments.length<2&&(Wt=0);var dr=at[0],pr=at[1],Ur=X.length<2?(dr=(dr+pr)/2,0):(pr-dr)/(X.length-1+Wt);return Oe=Pt(dr+Ur*Wt/2,Ur),Ve=0,se={t:"rangePoints",a:arguments},Ye},Ye.rangeRoundPoints=function(at,Wt){arguments.length<2&&(Wt=0);var dr=at[0],pr=at[1],Ur=X.length<2?(dr=pr=Math.round((dr+pr)/2),0):(pr-dr)/(X.length-1+Wt)|0;return Oe=Pt(dr+Math.round(Ur*Wt/2+(pr-dr-(X.length-1+Wt)*Ur)/2),Ur),Ve=0,se={t:"rangeRoundPoints",a:arguments},Ye},Ye.rangeBands=function(at,Wt,dr){arguments.length<2&&(Wt=0),arguments.length<3&&(dr=Wt);var pr=at[1]<at[0],Ur=at[pr-0],zr=at[1-pr],gi=(zr-Ur)/(X.length-Wt+2*dr);return Oe=Pt(Ur+gi*dr,gi),pr&&Oe.reverse(),Ve=gi*(1-Wt),se={t:"rangeBands",a:arguments},Ye},Ye.rangeRoundBands=function(at,Wt,dr){arguments.length<2&&(Wt=0),arguments.length<3&&(dr=Wt);var pr=at[1]<at[0],Ur=at[pr-0],zr=at[1-pr],gi=Math.floor((zr-Ur)/(X.length-Wt+2*dr));return Oe=Pt(Ur+Math.round((zr-Ur-(X.length-Wt)*gi)/2),gi),pr&&Oe.reverse(),Ve=Math.round(gi*(1-Wt)),se={t:"rangeRoundBands",a:arguments},Ye},Ye.rangeBand=function(){return Ve},Ye.rangeExtent=function(){return dn(se.a[0])},Ye.copy=function(){return ws(X,se)},Ye.domain(X)}e.scale.category10=function(){return e.scale.ordinal().range(Ho)},e.scale.category20=function(){return e.scale.ordinal().range(ml)},e.scale.category20b=function(){return e.scale.ordinal().range(Ws)},e.scale.category20c=function(){return e.scale.ordinal().range(Ls)};var Ho=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Xo),ml=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Xo),Ws=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Xo),Ls=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Xo);e.scale.quantile=function(){return va([],[])};function va(X,se){var Te;function Oe(){var Ye=0,Pt=se.length;for(Te=[];++Ye<Pt;)Te[Ye-1]=e.quantile(X,Ye/Pt);return Ve}function Ve(Ye){if(!isNaN(Ye=+Ye))return se[e.bisect(Te,Ye)]}return Ve.domain=function(Ye){return arguments.length?(X=Ye.map(h).filter(d).sort(f),Oe()):X},Ve.range=function(Ye){return arguments.length?(se=Ye,Oe()):se},Ve.quantiles=function(){return Te},Ve.invertExtent=function(Ye){return Ye=se.indexOf(Ye),Ye<0?[NaN,NaN]:[Ye>0?Te[Ye-1]:X[0],Ye<Te.length?Te[Ye]:X[X.length-1]]},Ve.copy=function(){return va(X,se)},Oe()}e.scale.quantize=function(){return no(0,1,[0,1])};function no(X,se,Te){var Oe,Ve;function Ye(at){return Te[Math.max(0,Math.min(Ve,Math.floor(Oe*(at-X))))]}function Pt(){return Oe=Te.length/(se-X),Ve=Te.length-1,Ye}return Ye.domain=function(at){return arguments.length?(X=+at[0],se=+at[at.length-1],Pt()):[X,se]},Ye.range=function(at){return arguments.length?(Te=at,Pt()):Te},Ye.invertExtent=function(at){return at=Te.indexOf(at),at=at<0?NaN:at/Oe+X,[at,at+1/Oe]},Ye.copy=function(){return no(X,se,Te)},Pt()}e.scale.threshold=function(){return ys([.5],[0,1])};function ys(X,se){function Te(Oe){if(Oe<=Oe)return se[e.bisect(X,Oe)]}return Te.domain=function(Oe){return arguments.length?(X=Oe,Te):X},Te.range=function(Oe){return arguments.length?(se=Oe,Te):se},Te.invertExtent=function(Oe){return Oe=se.indexOf(Oe),[X[Oe-1],X[Oe]]},Te.copy=function(){return ys(X,se)},Te}e.scale.identity=function(){return rs([0,1])};function rs(X){function se(Te){return+Te}return se.invert=se,se.domain=se.range=function(Te){return arguments.length?(X=Te.map(se),se):X},se.ticks=function(Te){return Na(X,Te)},se.tickFormat=function(Te,Oe){return d3_scale_linearTickFormat(X,Te,Oe)},se.copy=function(){return rs(X)},se}e.svg={};function Ql(){return 0}e.svg.arc=function(){var X=Yu,se=Nc,Te=Ql,Oe=Cu,Ve=pu,Ye=Uc,Pt=xu;function at(){var dr=Math.max(0,+X.apply(this,arguments)),pr=Math.max(0,+se.apply(this,arguments)),Ur=Ve.apply(this,arguments)-Kt,zr=Ye.apply(this,arguments)-Kt,gi=Math.abs(zr-Ur),xi=Ur>zr?0:1;if(pr<dr&&(Wr=pr,pr=dr,dr=Wr),gi>=At)return Wt(pr,xi)+(dr?Wt(dr,1-xi):"")+"Z";var Wr,ii,di,Li,Ti=0,Qr=0,Pn,kn,Bn,na,Ea,Ia,yo,Da,go=[];if((Li=(+Pt.apply(this,arguments)||0)/2)&&(di=Oe===Cu?Math.sqrt(dr*dr+pr*pr):+Oe.apply(this,arguments),xi||(Qr*=-1),pr&&(Qr=_i(di/pr*Math.sin(Li))),dr&&(Ti=_i(di/dr*Math.sin(Li)))),pr){Pn=pr*Math.cos(Ur+Qr),kn=pr*Math.sin(Ur+Qr),Bn=pr*Math.cos(zr-Qr),na=pr*Math.sin(zr-Qr);var Is=Math.abs(zr-Ur-2*Qr)<=et?0:1;if(Qr&&Ac(Pn,kn,Bn,na)===xi^Is){var Ms=(Ur+zr)/2;Pn=pr*Math.cos(Ms),kn=pr*Math.sin(Ms),Bn=na=null}}else Pn=kn=0;if(dr){Ea=dr*Math.cos(zr-Ti),Ia=dr*Math.sin(zr-Ti),yo=dr*Math.cos(Ur+Ti),Da=dr*Math.sin(Ur+Ti);var Xs=Math.abs(Ur-zr+2*Ti)<=et?0:1;if(Ti&&Ac(Ea,Ia,yo,Da)===1-xi^Xs){var Un=(Ur+zr)/2;Ea=dr*Math.cos(Un),Ia=dr*Math.sin(Un),yo=Da=null}}else Ea=Ia=0;if(gi>Je&&(Wr=Math.min(Math.abs(pr-dr)/2,+Te.apply(this,arguments)))>.001){ii=dr<pr^xi?0:1;var ja=Wr,Fo=Wr;if(gi<et){var Uo=yo==null?[Ea,Ia]:Bn==null?[Pn,kn]:il([Pn,kn],[yo,Da],[Bn,na],[Ea,Ia]),$s=Pn-Uo[0],Sl=kn-Uo[1],bu=Bn-Uo[0],dl=na-Uo[1],Sc=1/Math.sin(Math.acos(($s*bu+Sl*dl)/(Math.sqrt($s*$s+Sl*Sl)*Math.sqrt(bu*bu+dl*dl)))/2),Me=Math.sqrt(Uo[0]*Uo[0]+Uo[1]*Uo[1]);Fo=Math.min(Wr,(dr-Me)/(Sc-1)),ja=Math.min(Wr,(pr-Me)/(Sc+1))}if(Bn!=null){var bt=Ua(yo==null?[Ea,Ia]:[yo,Da],[Pn,kn],pr,ja,xi),Ot=Ua([Bn,na],[Ea,Ia],pr,ja,xi);Wr===ja?go.push("M",bt[0],"A",ja,",",ja," 0 0,",ii," ",bt[1],"A",pr,",",pr," 0 ",1-xi^Ac(bt[1][0],bt[1][1],Ot[1][0],Ot[1][1]),",",xi," ",Ot[1],"A",ja,",",ja," 0 0,",ii," ",Ot[0]):go.push("M",bt[0],"A",ja,",",ja," 0 1,",ii," ",Ot[0])}else go.push("M",Pn,",",kn);if(yo!=null){var Lr=Ua([Pn,kn],[yo,Da],dr,-Fo,xi),Vr=Ua([Ea,Ia],Bn==null?[Pn,kn]:[Bn,na],dr,-Fo,xi);Wr===Fo?go.push("L",Vr[0],"A",Fo,",",Fo," 0 0,",ii," ",Vr[1],"A",dr,",",dr," 0 ",xi^Ac(Vr[1][0],Vr[1][1],Lr[1][0],Lr[1][1]),",",1-xi," ",Lr[1],"A",Fo,",",Fo," 0 0,",ii," ",Lr[0]):go.push("L",Vr[0],"A",Fo,",",Fo," 0 0,",ii," ",Lr[0])}else go.push("L",Ea,",",Ia)}else go.push("M",Pn,",",kn),Bn!=null&&go.push("A",pr,",",pr," 0 ",Is,",",xi," ",Bn,",",na),go.push("L",Ea,",",Ia),yo!=null&&go.push("A",dr,",",dr," 0 ",Xs,",",1-xi," ",yo,",",Da);return go.push("Z"),go.join("")}function Wt(dr,pr){return"M0,"+dr+"A"+dr+","+dr+" 0 1,"+pr+" 0,"+-dr+"A"+dr+","+dr+" 0 1,"+pr+" 0,"+dr}return at.innerRadius=function(dr){return arguments.length?(X=hi(dr),at):X},at.outerRadius=function(dr){return arguments.length?(se=hi(dr),at):se},at.cornerRadius=function(dr){return arguments.length?(Te=hi(dr),at):Te},at.padRadius=function(dr){return arguments.length?(Oe=dr==Cu?Cu:hi(dr),at):Oe},at.startAngle=function(dr){return arguments.length?(Ve=hi(dr),at):Ve},at.endAngle=function(dr){return arguments.length?(Ye=hi(dr),at):Ye},at.padAngle=function(dr){return arguments.length?(Pt=hi(dr),at):Pt},at.centroid=function(){var dr=(+X.apply(this,arguments)+ +se.apply(this,arguments))/2,pr=(+Ve.apply(this,arguments)+ +Ye.apply(this,arguments))/2-Kt;return[Math.cos(pr)*dr,Math.sin(pr)*dr]},at};var Cu="auto";function Yu(X){return X.innerRadius}function Nc(X){return X.outerRadius}function pu(X){return X.startAngle}function Uc(X){return X.endAngle}function xu(X){return X&&X.padAngle}function Ac(X,se,Te,Oe){return(X-Te)*se-(se-Oe)*X>0?0:1}function Ua(X,se,Te,Oe,Ve){var Ye=X[0]-se[0],Pt=X[1]-se[1],at=(Ve?Oe:-Oe)/Math.sqrt(Ye*Ye+Pt*Pt),Wt=at*Pt,dr=-at*Ye,pr=X[0]+Wt,Ur=X[1]+dr,zr=se[0]+Wt,gi=se[1]+dr,xi=(pr+zr)/2,Wr=(Ur+gi)/2,ii=zr-pr,di=gi-Ur,Li=ii*ii+di*di,Ti=Te-Oe,Qr=pr*gi-zr*Ur,Pn=(di<0?-1:1)*Math.sqrt(Math.max(0,Ti*Ti*Li-Qr*Qr)),kn=(Qr*di-ii*Pn)/Li,Bn=(-Qr*ii-di*Pn)/Li,na=(Qr*di+ii*Pn)/Li,Ea=(-Qr*ii+di*Pn)/Li,Ia=kn-xi,yo=Bn-Wr,Da=na-xi,go=Ea-Wr;return Ia*Ia+yo*yo>Da*Da+go*go&&(kn=na,Bn=Ea),[[kn-Wt,Bn-dr],[kn*Te/Ti,Bn*Te/Ti]]}function oo(){return!0}function Vc(X){var se=Ds,Te=Fs,Oe=oo,Ve=Ku,Ye=Ve.key,Pt=.7;function at(Wt){var dr=[],pr=[],Ur=-1,zr=Wt.length,gi,xi=hi(se),Wr=hi(Te);function ii(){dr.push("M",Ve(X(pr),Pt))}for(;++Ur<zr;)Oe.call(this,gi=Wt[Ur],Ur)?pr.push([+xi.call(this,gi,Ur),+Wr.call(this,gi,Ur)]):pr.length&&(ii(),pr=[]);return pr.length&&ii(),dr.length?dr.join(""):null}return at.x=function(Wt){return arguments.length?(se=Wt,at):se},at.y=function(Wt){return arguments.length?(Te=Wt,at):Te},at.defined=function(Wt){return arguments.length?(Oe=Wt,at):Oe},at.interpolate=function(Wt){return arguments.length?(typeof Wt=="function"?Ye=Ve=Wt:Ye=(Ve=hc.get(Wt)||Ku).key,at):Ye},at.tension=function(Wt){return arguments.length?(Pt=Wt,at):Pt},at}e.svg.line=function(){return Vc(G)};var hc=e.map({linear:Ku,"linear-closed":ue,step:w,"step-before":B,"step-after":Q,basis:Mt,"basis-open":Jt,"basis-closed":$t,bundle:mr,cardinal:ze,"cardinal-open":ee,"cardinal-closed":le,monotone:qt});hc.forEach(function(X,se){se.key=X,se.closed=/-closed$/.test(X)});function Ku(X){return X.length>1?X.join("L"):X+"Z"}function ue(X){return X.join("L")+"Z"}function w(X){for(var se=0,Te=X.length,Oe=X[0],Ve=[Oe[0],",",Oe[1]];++se<Te;)Ve.push("H",(Oe[0]+(Oe=X[se])[0])/2,"V",Oe[1]);return Te>1&&Ve.push("H",Oe[0]),Ve.join("")}function B(X){for(var se=0,Te=X.length,Oe=X[0],Ve=[Oe[0],",",Oe[1]];++se<Te;)Ve.push("V",(Oe=X[se])[1],"H",Oe[0]);return Ve.join("")}function Q(X){for(var se=0,Te=X.length,Oe=X[0],Ve=[Oe[0],",",Oe[1]];++se<Te;)Ve.push("H",(Oe=X[se])[0],"V",Oe[1]);return Ve.join("")}function ee(X,se){return X.length<4?Ku(X):X[1]+Ze(X.slice(1,-1),ut(X,se))}function le(X,se){return X.length<3?ue(X):X[0]+Ze((X.push(X[0]),X),ut([X[X.length-2]].concat(X,[X[1]]),se))}function ze(X,se){return X.length<3?Ku(X):X[0]+Ze(X,ut(X,se))}function Ze(X,se){if(se.length<1||X.length!=se.length&&X.length!=se.length+2)return Ku(X);var Te=X.length!=se.length,Oe="",Ve=X[0],Ye=X[1],Pt=se[0],at=Pt,Wt=1;if(Te&&(Oe+="Q"+(Ye[0]-Pt[0]*2/3)+","+(Ye[1]-Pt[1]*2/3)+","+Ye[0]+","+Ye[1],Ve=X[1],Wt=2),se.length>1){at=se[1],Ye=X[Wt],Wt++,Oe+="C"+(Ve[0]+Pt[0])+","+(Ve[1]+Pt[1])+","+(Ye[0]-at[0])+","+(Ye[1]-at[1])+","+Ye[0]+","+Ye[1];for(var dr=2;dr<se.length;dr++,Wt++)Ye=X[Wt],at=se[dr],Oe+="S"+(Ye[0]-at[0])+","+(Ye[1]-at[1])+","+Ye[0]+","+Ye[1]}if(Te){var pr=X[Wt];Oe+="Q"+(Ye[0]+at[0]*2/3)+","+(Ye[1]+at[1]*2/3)+","+pr[0]+","+pr[1]}return Oe}function ut(X,se){for(var Te=[],Oe=(1-se)/2,Ve,Ye=X[0],Pt=X[1],at=1,Wt=X.length;++at<Wt;)Ve=Ye,Ye=Pt,Pt=X[at],Te.push([Oe*(Pt[0]-Ve[0]),Oe*(Pt[1]-Ve[1])]);return Te}function Mt(X){if(X.length<3)return Ku(X);var se=1,Te=X.length,Oe=X[0],Ve=Oe[0],Ye=Oe[1],Pt=[Ve,Ve,Ve,(Oe=X[1])[0]],at=[Ye,Ye,Ye,Oe[1]],Wt=[Ve,",",Ye,"L",Cr(Ie,Pt),",",Cr(Ie,at)];for(X.push(X[Te-1]);++se<=Te;)Oe=X[se],Pt.shift(),Pt.push(Oe[0]),at.shift(),at.push(Oe[1]),qe(Wt,Pt,at);return X.pop(),Wt.push("L",Oe),Wt.join("")}function Jt(X){if(X.length<4)return Ku(X);for(var se=[],Te=-1,Oe=X.length,Ve,Ye=[0],Pt=[0];++Te<3;)Ve=X[Te],Ye.push(Ve[0]),Pt.push(Ve[1]);for(se.push(Cr(Ie,Ye)+","+Cr(Ie,Pt)),--Te;++Te<Oe;)Ve=X[Te],Ye.shift(),Ye.push(Ve[0]),Pt.shift(),Pt.push(Ve[1]),qe(se,Ye,Pt);return se.join("")}function $t(X){for(var se,Te=-1,Oe=X.length,Ve=Oe+4,Ye,Pt=[],at=[];++Te<4;)Ye=X[Te%Oe],Pt.push(Ye[0]),at.push(Ye[1]);for(se=[Cr(Ie,Pt),",",Cr(Ie,at)],--Te;++Te<Ve;)Ye=X[Te%Oe],Pt.shift(),Pt.push(Ye[0]),at.shift(),at.push(Ye[1]),qe(se,Pt,at);return se.join("")}function mr(X,se){var Te=X.length-1;if(Te)for(var Oe=X[0][0],Ve=X[0][1],Ye=X[Te][0]-Oe,Pt=X[Te][1]-Ve,at=-1,Wt,dr;++at<=Te;)Wt=X[at],dr=at/Te,Wt[0]=se*Wt[0]+(1-se)*(Oe+dr*Ye),Wt[1]=se*Wt[1]+(1-se)*(Ve+dr*Pt);return Mt(X)}function Cr(X,se){return X[0]*se[0]+X[1]*se[1]+X[2]*se[2]+X[3]*se[3]}var ve=[0,2/3,1/3,0],xe=[0,1/3,2/3,0],Ie=[0,1/6,2/3,1/6];function qe(X,se,Te){X.push("C",Cr(ve,se),",",Cr(ve,Te),",",Cr(xe,se),",",Cr(xe,Te),",",Cr(Ie,se),",",Cr(Ie,Te))}function Qe(X,se){return(se[1]-X[1])/(se[0]-X[0])}function Xe(X){for(var se=0,Te=X.length-1,Oe=[],Ve=X[0],Ye=X[1],Pt=Oe[0]=Qe(Ve,Ye);++se<Te;)Oe[se]=(Pt+(Pt=Qe(Ve=Ye,Ye=X[se+1])))/2;return Oe[se]=Pt,Oe}function nt(X){for(var se=[],Te,Oe,Ve,Ye,Pt=Xe(X),at=-1,Wt=X.length-1;++at<Wt;)Te=Qe(X[at],X[at+1]),p(Te)<Je?Pt[at]=Pt[at+1]=0:(Oe=Pt[at]/Te,Ve=Pt[at+1]/Te,Ye=Oe*Oe+Ve*Ve,Ye>9&&(Ye=Te*3/Math.sqrt(Ye),Pt[at]=Ye*Oe,Pt[at+1]=Ye*Ve));for(at=-1;++at<=Wt;)Ye=(X[Math.min(Wt,at+1)][0]-X[Math.max(0,at-1)][0])/(6*(1+Pt[at]*Pt[at])),se.push([Ye||0,Pt[at]*Ye||0]);return se}function qt(X){return X.length<3?Ku(X):X[0]+Ze(X,nt(X))}e.svg.line.radial=function(){var X=Vc(jt);return X.radius=X.x,delete X.x,X.angle=X.y,delete X.y,X};function jt(X){for(var se,Te=-1,Oe=X.length,Ve,Ye;++Te<Oe;)se=X[Te],Ve=se[0],Ye=se[1]-Kt,se[0]=Ve*Math.cos(Ye),se[1]=Ve*Math.sin(Ye);return X}function ar(X){var se=Ds,Te=Ds,Oe=0,Ve=Fs,Ye=oo,Pt=Ku,at=Pt.key,Wt=Pt,dr="L",pr=.7;function Ur(zr){var gi=[],xi=[],Wr=[],ii=-1,di=zr.length,Li,Ti=hi(se),Qr=hi(Oe),Pn=se===Te?function(){return Bn}:hi(Te),kn=Oe===Ve?function(){return na}:hi(Ve),Bn,na;function Ea(){gi.push("M",Pt(X(Wr),pr),dr,Wt(X(xi.reverse()),pr),"Z")}for(;++ii<di;)Ye.call(this,Li=zr[ii],ii)?(xi.push([Bn=+Ti.call(this,Li,ii),na=+Qr.call(this,Li,ii)]),Wr.push([+Pn.call(this,Li,ii),+kn.call(this,Li,ii)])):xi.length&&(Ea(),xi=[],Wr=[]);return xi.length&&Ea(),gi.length?gi.join(""):null}return Ur.x=function(zr){return arguments.length?(se=Te=zr,Ur):Te},Ur.x0=function(zr){return arguments.length?(se=zr,Ur):se},Ur.x1=function(zr){return arguments.length?(Te=zr,Ur):Te},Ur.y=function(zr){return arguments.length?(Oe=Ve=zr,Ur):Ve},Ur.y0=function(zr){return arguments.length?(Oe=zr,Ur):Oe},Ur.y1=function(zr){return arguments.length?(Ve=zr,Ur):Ve},Ur.defined=function(zr){return arguments.length?(Ye=zr,Ur):Ye},Ur.interpolate=function(zr){return arguments.length?(typeof zr=="function"?at=Pt=zr:at=(Pt=hc.get(zr)||Ku).key,Wt=Pt.reverse||Pt,dr=Pt.closed?"M":"L",Ur):at},Ur.tension=function(zr){return arguments.length?(pr=zr,Ur):pr},Ur}B.reverse=Q,Q.reverse=B,e.svg.area=function(){return ar(G)},e.svg.area.radial=function(){var X=ar(jt);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 fr(X){return X.source}function br(X){return X.target}e.svg.chord=function(){var X=fr,se=br,Te=Fr,Oe=pu,Ve=Uc;function Ye(pr,Ur){var zr=Pt(this,X,pr,Ur),gi=Pt(this,se,pr,Ur);return"M"+zr.p0+Wt(zr.r,zr.p1,zr.a1-zr.a0)+(at(zr,gi)?dr(zr.r,zr.p1,zr.r,zr.p0):dr(zr.r,zr.p1,gi.r,gi.p0)+Wt(gi.r,gi.p1,gi.a1-gi.a0)+dr(gi.r,gi.p1,zr.r,zr.p0))+"Z"}function Pt(pr,Ur,zr,gi){var xi=Ur.call(pr,zr,gi),Wr=Te.call(pr,xi,gi),ii=Oe.call(pr,xi,gi)-Kt,di=Ve.call(pr,xi,gi)-Kt;return{r:Wr,a0:ii,a1:di,p0:[Wr*Math.cos(ii),Wr*Math.sin(ii)],p1:[Wr*Math.cos(di),Wr*Math.sin(di)]}}function at(pr,Ur){return pr.a0==Ur.a0&&pr.a1==Ur.a1}function Wt(pr,Ur,zr){return"A"+pr+","+pr+" 0 "+ +(zr>et)+",1 "+Ur}function dr(pr,Ur,zr,gi){return"Q 0,0 "+gi}return Ye.radius=function(pr){return arguments.length?(Te=hi(pr),Ye):Te},Ye.source=function(pr){return arguments.length?(X=hi(pr),Ye):X},Ye.target=function(pr){return arguments.length?(se=hi(pr),Ye):se},Ye.startAngle=function(pr){return arguments.length?(Oe=hi(pr),Ye):Oe},Ye.endAngle=function(pr){return arguments.length?(Ve=hi(pr),Ye):Ve},Ye};function Fr(X){return X.radius}e.svg.diagonal=function(){var X=fr,se=br,Te=Hr;function Oe(Ve,Ye){var Pt=X.call(this,Ve,Ye),at=se.call(this,Ve,Ye),Wt=(Pt.y+at.y)/2,dr=[Pt,{x:Pt.x,y:Wt},{x:at.x,y:Wt},at];return dr=dr.map(Te),"M"+dr[0]+"C"+dr[1]+" "+dr[2]+" "+dr[3]}return Oe.source=function(Ve){return arguments.length?(X=hi(Ve),Oe):X},Oe.target=function(Ve){return arguments.length?(se=hi(Ve),Oe):se},Oe.projection=function(Ve){return arguments.length?(Te=Ve,Oe):Te},Oe};function Hr(X){return[X.x,X.y]}e.svg.diagonal.radial=function(){var X=e.svg.diagonal(),se=Hr,Te=X.projection;return X.projection=function(Oe){return arguments.length?Te(ri(se=Oe)):se},X};function ri(X){return function(){var se=X.apply(this,arguments),Te=se[0],Oe=se[1]-Kt;return[Te*Math.cos(Oe),Te*Math.sin(Oe)]}}e.svg.symbol=function(){var X=cn,se=Ci;function Te(Oe,Ve){return(Ln.get(X.call(this,Oe,Ve))||sn)(se.call(this,Oe,Ve))}return Te.type=function(Oe){return arguments.length?(X=hi(Oe),Te):X},Te.size=function(Oe){return arguments.length?(se=hi(Oe),Te):se},Te};function Ci(){return 64}function cn(){return"circle"}function sn(X){var se=Math.sqrt(X/et);return"M0,"+se+"A"+se+","+se+" 0 1,1 0,"+-se+"A"+se+","+se+" 0 1,1 0,"+se+"Z"}var Ln=e.map({circle:sn,cross:function(X){var se=Math.sqrt(X/5)/2;return"M"+-3*se+","+-se+"H"+-se+"V"+-3*se+"H"+se+"V"+-se+"H"+3*se+"V"+se+"H"+se+"V"+3*se+"H"+-se+"V"+se+"H"+-3*se+"Z"},diamond:function(X){var se=Math.sqrt(X/(2*Aa)),Te=se*Aa;return"M0,"+-se+"L"+Te+",0 0,"+se+" "+-Te+",0Z"},square:function(X){var se=Math.sqrt(X)/2;return"M"+-se+","+-se+"L"+se+","+-se+" "+se+","+se+" "+-se+","+se+"Z"},"triangle-down":function(X){var se=Math.sqrt(X/Yn),Te=se*Yn/2;return"M0,"+Te+"L"+se+","+-Te+" "+-se+","+-Te+"Z"},"triangle-up":function(X){var se=Math.sqrt(X/Yn),Te=se*Yn/2;return"M0,"+-Te+"L"+se+","+Te+" "+-se+","+Te+"Z"}});e.svg.symbolTypes=Ln.keys();var Yn=Math.sqrt(3),Aa=Math.tan(30*er);Le.transition=function(X){for(var se=Bo||++mo,Te=To(X),Oe=[],Ve,Ye,Pt=Ps||{time:Date.now(),ease:bl,delay:0,duration:250},at=-1,Wt=this.length;++at<Wt;){Oe.push(Ve=[]);for(var dr=this[at],pr=-1,Ur=dr.length;++pr<Ur;)(Ye=dr[pr])&&hl(Ye,pr,Te,se,Pt),Ve.push(Ye)}return Co(Oe,Te,se)},Le.interrupt=function(X){return this.each(X==null?fa:$a(To(X)))};var fa=$a(To());function $a(X){return function(){var se,Te,Oe;(se=this[X])&&(Oe=se[Te=se.active])&&(Oe.timer.c=null,Oe.timer.t=NaN,--se.count?delete se[Te]:delete this[X],se.active+=.5,Oe.event&&Oe.event.interrupt.call(this,this.__data__,Oe.index))}}function Co(X,se,Te){return ie(X,Qa),X.namespace=se,X.id=Te,X}var Qa=[],mo=0,Bo,Ps;Qa.call=Le.call,Qa.empty=Le.empty,Qa.node=Le.node,Qa.size=Le.size,e.transition=function(X,se){return X&&X.transition?Bo?X.transition(se):X:e.selection().transition(X)},e.transition.prototype=Qa,Qa.select=function(X){var se=this.id,Te=this.namespace,Oe=[],Ve,Ye,Pt;X=me(X);for(var at=-1,Wt=this.length;++at<Wt;){Oe.push(Ve=[]);for(var dr=this[at],pr=-1,Ur=dr.length;++pr<Ur;)(Pt=dr[pr])&&(Ye=X.call(Pt,Pt.__data__,pr,at))?("__data__"in Pt&&(Ye.__data__=Pt.__data__),hl(Ye,pr,Te,se,Pt[Te][se]),Ve.push(Ye)):Ve.push(null)}return Co(Oe,Te,se)},Qa.selectAll=function(X){var se=this.id,Te=this.namespace,Oe=[],Ve,Ye,Pt,at,Wt;X=Pe(X);for(var dr=-1,pr=this.length;++dr<pr;)for(var Ur=this[dr],zr=-1,gi=Ur.length;++zr<gi;)if(Pt=Ur[zr]){Wt=Pt[Te][se],Ye=X.call(Pt,Pt.__data__,zr,dr),Oe.push(Ve=[]);for(var xi=-1,Wr=Ye.length;++xi<Wr;)(at=Ye[xi])&&hl(at,xi,Te,se,Wt),Ve.push(at)}return Co(Oe,Te,se)},Qa.filter=function(X){var se=[],Te,Oe,Ve;typeof X!="function"&&(X=Ae(X));for(var Ye=0,Pt=this.length;Ye<Pt;Ye++){se.push(Te=[]);for(var Oe=this[Ye],at=0,Wt=Oe.length;at<Wt;at++)(Ve=Oe[at])&&X.call(Ve,Ve.__data__,at,Ye)&&Te.push(Ve)}return Co(se,this.namespace,this.id)},Qa.tween=function(X,se){var Te=this.id,Oe=this.namespace;return arguments.length<2?this.node()[Oe][Te].tween.get(X):St(this,se==null?function(Ve){Ve[Oe][Te].tween.remove(X)}:function(Ve){Ve[Oe][Te].tween.set(X,se)})};function Ts(X,se,Te,Oe){var Ve=X.id,Ye=X.namespace;return St(X,typeof Te=="function"?function(Pt,at,Wt){Pt[Ye][Ve].tween.set(se,Oe(Te.call(Pt,Pt.__data__,at,Wt)))}:(Te=Oe(Te),function(Pt){Pt[Ye][Ve].tween.set(se,Te)}))}Qa.attr=function(X,se){if(arguments.length<2){for(se in X)this.attr(se,X[se]);return this}var Te=X=="transform"?sf:xl,Oe=e.ns.qualify(X);function Ve(){this.removeAttribute(Oe)}function Ye(){this.removeAttributeNS(Oe.space,Oe.local)}function Pt(Wt){return Wt==null?Ve:(Wt+="",function(){var dr=this.getAttribute(Oe),pr;return dr!==Wt&&(pr=Te(dr,Wt),function(Ur){this.setAttribute(Oe,pr(Ur))})})}function at(Wt){return Wt==null?Ye:(Wt+="",function(){var dr=this.getAttributeNS(Oe.space,Oe.local),pr;return dr!==Wt&&(pr=Te(dr,Wt),function(Ur){this.setAttributeNS(Oe.space,Oe.local,pr(Ur))})})}return Ts(this,"attr."+X,se,Oe.local?at:Pt)},Qa.attrTween=function(X,se){var Te=e.ns.qualify(X);function Oe(Ye,Pt){var at=se.call(this,Ye,Pt,this.getAttribute(Te));return at&&function(Wt){this.setAttribute(Te,at(Wt))}}function Ve(Ye,Pt){var at=se.call(this,Ye,Pt,this.getAttributeNS(Te.space,Te.local));return at&&function(Wt){this.setAttributeNS(Te.space,Te.local,at(Wt))}}return this.tween("attr."+X,Te.local?Ve:Oe)},Qa.style=function(X,se,Te){var Oe=arguments.length;if(Oe<3){if(typeof X!="string"){Oe<2&&(se="");for(Te in X)this.style(Te,X[Te],se);return this}Te=""}function Ve(){this.style.removeProperty(X)}function Ye(Pt){return Pt==null?Ve:(Pt+="",function(){var at=a(this).getComputedStyle(this,null).getPropertyValue(X),Wt;return at!==Pt&&(Wt=xl(at,Pt),function(dr){this.style.setProperty(X,Wt(dr),Te)})})}return Ts(this,"style."+X,se,Ye)},Qa.styleTween=function(X,se,Te){arguments.length<3&&(Te="");function Oe(Ve,Ye){var Pt=se.call(this,Ve,Ye,a(this).getComputedStyle(this,null).getPropertyValue(X));return Pt&&function(at){this.style.setProperty(X,Pt(at),Te)}}return this.tween("style."+X,Oe)},Qa.text=function(X){return Ts(this,"text",X,wo)};function wo(X){return X==null&&(X=""),function(){this.textContent=X}}Qa.remove=function(){var X=this.namespace;return this.each("end.transition",function(){var se;this[X].count<2&&(se=this.parentNode)&&se.removeChild(this)})},Qa.ease=function(X){var se=this.id,Te=this.namespace;return arguments.length<1?this.node()[Te][se].ease:(typeof X!="function"&&(X=e.ease.apply(e,arguments)),St(this,function(Oe){Oe[Te][se].ease=X}))},Qa.delay=function(X){var se=this.id,Te=this.namespace;return arguments.length<1?this.node()[Te][se].delay:St(this,typeof X=="function"?function(Oe,Ve,Ye){Oe[Te][se].delay=+X.call(Oe,Oe.__data__,Ve,Ye)}:(X=+X,function(Oe){Oe[Te][se].delay=X}))},Qa.duration=function(X){var se=this.id,Te=this.namespace;return arguments.length<1?this.node()[Te][se].duration:St(this,typeof X=="function"?function(Oe,Ve,Ye){Oe[Te][se].duration=Math.max(1,X.call(Oe,Oe.__data__,Ve,Ye))}:(X=Math.max(1,X),function(Oe){Oe[Te][se].duration=X}))},Qa.each=function(X,se){var Te=this.id,Oe=this.namespace;if(arguments.length<2){var Ve=Ps,Ye=Bo;try{Bo=Te,St(this,function(Pt,at,Wt){Ps=Pt[Oe][Te],X.call(Pt,Pt.__data__,at,Wt)})}finally{Ps=Ve,Bo=Ye}}else St(this,function(Pt){var at=Pt[Oe][Te];(at.event||(at.event=e.dispatch("start","end","interrupt"))).on(X,se)});return this},Qa.transition=function(){for(var X=this.id,se=++mo,Te=this.namespace,Oe=[],Ve,Ye,Pt,at,Wt=0,dr=this.length;Wt<dr;Wt++){Oe.push(Ve=[]);for(var Ye=this[Wt],pr=0,Ur=Ye.length;pr<Ur;pr++)(Pt=Ye[pr])&&(at=Pt[Te][X],hl(Pt,pr,Te,se,{time:at.time,ease:at.ease,delay:at.delay+at.duration,duration:at.duration})),Ve.push(Pt)}return Co(Oe,Te,se)};function To(X){return X==null?"__transition__":"__transition_"+X+"__"}function hl(X,se,Te,Oe,Ve){var Ye=X[Te]||(X[Te]={active:0,count:0}),Pt=Ye[Oe],at,Wt,dr,pr,Ur;function zr(Wr){var ii=Pt.delay;if(Wt.t=ii+at,ii<=Wr)return gi(Wr-ii);Wt.c=gi}function gi(Wr){var ii=Ye.active,di=Ye[ii];di&&(di.timer.c=null,di.timer.t=NaN,--Ye.count,delete Ye[ii],di.event&&di.event.interrupt.call(X,X.__data__,di.index));for(var Li in Ye)if(+Li<Oe){var Ti=Ye[Li];Ti.timer.c=null,Ti.timer.t=NaN,--Ye.count,delete Ye[Li]}Wt.c=xi,No(function(){return Wt.c&&xi(Wr||1)&&(Wt.c=null,Wt.t=NaN),1},0,at),Ye.active=Oe,Pt.event&&Pt.event.start.call(X,X.__data__,se),Ur=[],Pt.tween.forEach(function(Qr,Pn){(Pn=Pn.call(X,X.__data__,se))&&Ur.push(Pn)}),pr=Pt.ease,dr=Pt.duration}function xi(Wr){for(var ii=Wr/dr,di=pr(ii),Li=Ur.length;Li>0;)Ur[--Li].call(X,di);if(ii>=1)return Pt.event&&Pt.event.end.call(X,X.__data__,se),--Ye.count?delete Ye[Oe]:delete X[Te],1}Pt||(at=Ve.time,Wt=No(zr,0,at),Pt=Ye[Oe]={tween:new T,time:at,timer:Wt,delay:Ve.delay,duration:Ve.duration,ease:Ve.ease,index:se},Ve=null,++Ye.count)}e.svg.axis=function(){var X=e.scale.linear(),se=Ul,Te=6,Oe=6,Ve=3,Ye=[10],Pt=null,at;function Wt(dr){dr.each(function(){var pr=e.select(this),Ur=this.__chart__||X,zr=this.__chart__=X.copy(),gi=Pt==null?zr.ticks?zr.ticks.apply(zr,Ye):zr.domain():Pt,xi=at==null?zr.tickFormat?zr.tickFormat.apply(zr,Ye):G:at,Wr=pr.selectAll(".tick").data(gi,zr),ii=Wr.enter().insert("g",".domain").attr("class","tick").style("opacity",Je),di=e.transition(Wr.exit()).style("opacity",Je).remove(),Li=e.transition(Wr.order()).style("opacity",1),Ti=Math.max(Te,0)+Ve,Qr,Pn=wn(zr),kn=pr.selectAll(".domain").data([0]),Bn=(kn.enter().append("path").attr("class","domain"),e.transition(kn));ii.append("line"),ii.append("text");var na=ii.select("line"),Ea=Li.select("line"),Ia=Wr.select("text").text(xi),yo=ii.select("text"),Da=Li.select("text"),go=se==="top"||se==="left"?-1:1,Is,Ms,Xs,Un;if(se==="bottom"||se==="top"?(Qr=au,Is="x",Xs="y",Ms="x2",Un="y2",Ia.attr("dy",go<0?"0em":".71em").style("text-anchor","middle"),Bn.attr("d","M"+Pn[0]+","+go*Oe+"V0H"+Pn[1]+"V"+go*Oe)):(Qr=Js,Is="y",Xs="x",Ms="y2",Un="x2",Ia.attr("dy",".32em").style("text-anchor",go<0?"end":"start"),Bn.attr("d","M"+go*Oe+","+Pn[0]+"H0V"+Pn[1]+"H"+go*Oe)),na.attr(Un,go*Te),yo.attr(Xs,go*Ti),Ea.attr(Ms,0).attr(Un,go*Te),Da.attr(Is,0).attr(Xs,go*Ti),zr.rangeBand){var ja=zr,Fo=ja.rangeBand()/2;Ur=zr=function(Uo){return ja(Uo)+Fo}}else Ur.rangeBand?Ur=zr:di.call(Qr,zr,Ur);ii.call(Qr,Ur,zr),Li.call(Qr,zr,zr)})}return Wt.scale=function(dr){return arguments.length?(X=dr,Wt):X},Wt.orient=function(dr){return arguments.length?(se=dr in Lu?dr+"":Ul,Wt):se},Wt.ticks=function(){return arguments.length?(Ye=r(arguments),Wt):Ye},Wt.tickValues=function(dr){return arguments.length?(Pt=dr,Wt):Pt},Wt.tickFormat=function(dr){return arguments.length?(at=dr,Wt):at},Wt.tickSize=function(dr){var pr=arguments.length;return pr?(Te=+dr,Oe=+arguments[pr-1],Wt):Te},Wt.innerTickSize=function(dr){return arguments.length?(Te=+dr,Wt):Te},Wt.outerTickSize=function(dr){return arguments.length?(Oe=+dr,Wt):Oe},Wt.tickPadding=function(dr){return arguments.length?(Ve=+dr,Wt):Ve},Wt.tickSubdivide=function(){return arguments.length&&Wt},Wt};var Ul="bottom",Lu={top:1,right:1,bottom:1,left:1};function au(X,se,Te){X.attr("transform",function(Oe){var Ve=se(Oe);return"translate("+(isFinite(Ve)?Ve:Te(Oe))+",0)"})}function Js(X,se,Te){X.attr("transform",function(Oe){var Ve=se(Oe);return"translate(0,"+(isFinite(Ve)?Ve:Te(Oe))+")"})}e.svg.brush=function(){var X=Ce(pr,"brushstart","brush","brushend"),se=null,Te=null,Oe=[0,0],Ve=[0,0],Ye,Pt,at=!0,Wt=!0,dr=dc[0];function pr(Wr){Wr.each(function(){var ii=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",xi).on("touchstart.brush",xi),di=ii.selectAll(".background").data([0]);di.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),ii.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Li=ii.selectAll(".resize").data(dr,G);Li.exit().remove(),Li.enter().append("g").attr("class",function(kn){return"resize "+kn}).style("cursor",function(kn){return eu[kn]}).append("rect").attr("x",function(kn){return/[ew]$/.test(kn)?-3:null}).attr("y",function(kn){return/^[ns]/.test(kn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Li.style("display",pr.empty()?"none":null);var Ti=e.transition(ii),Qr=e.transition(di),Pn;se&&(Pn=wn(se),Qr.attr("x",Pn[0]).attr("width",Pn[1]-Pn[0]),zr(Ti)),Te&&(Pn=wn(Te),Qr.attr("y",Pn[0]).attr("height",Pn[1]-Pn[0]),gi(Ti)),Ur(Ti)})}pr.event=function(Wr){Wr.each(function(){var ii=X.of(this,arguments),di={x:Oe,y:Ve,i:Ye,j:Pt},Li=this.__chart__||di;this.__chart__=di,Bo?e.select(this).transition().each("start.brush",function(){Ye=Li.i,Pt=Li.j,Oe=Li.x,Ve=Li.y,ii({type:"brushstart"})}).tween("brush:brush",function(){var Ti=Gu(Oe,di.x),Qr=Gu(Ve,di.y);return Ye=Pt=null,function(Pn){Oe=di.x=Ti(Pn),Ve=di.y=Qr(Pn),ii({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ye=di.i,Pt=di.j,ii({type:"brush",mode:"resize"}),ii({type:"brushend"})}):(ii({type:"brushstart"}),ii({type:"brush",mode:"resize"}),ii({type:"brushend"}))})};function Ur(Wr){Wr.selectAll(".resize").attr("transform",function(ii){return"translate("+Oe[+/e$/.test(ii)]+","+Ve[+/^s/.test(ii)]+")"})}function zr(Wr){Wr.select(".extent").attr("x",Oe[0]),Wr.selectAll(".extent,.n>rect,.s>rect").attr("width",Oe[1]-Oe[0])}function gi(Wr){Wr.select(".extent").attr("y",Ve[0]),Wr.selectAll(".extent,.e>rect,.w>rect").attr("height",Ve[1]-Ve[0])}function xi(){var Wr=this,ii=e.select(e.event.target),di=X.of(Wr,arguments),Li=e.select(Wr),Ti=ii.datum(),Qr=!/^(n|s)$/.test(Ti)&&se,Pn=!/^(e|w)$/.test(Ti)&&Te,kn=ii.classed("extent"),Bn=qr(Wr),na,Ea=e.mouse(Wr),Ia,yo=e.select(a(Wr)).on("keydown.brush",Is).on("keyup.brush",Ms);if(e.event.changedTouches?yo.on("touchmove.brush",Xs).on("touchend.brush",ja):yo.on("mousemove.brush",Xs).on("mouseup.brush",ja),Li.interrupt().selectAll("*").interrupt(),kn)Ea[0]=Oe[0]-Ea[0],Ea[1]=Ve[0]-Ea[1];else if(Ti){var Da=+/w$/.test(Ti),go=+/^n/.test(Ti);Ia=[Oe[1-Da]-Ea[0],Ve[1-go]-Ea[1]],Ea[0]=Oe[Da],Ea[1]=Ve[go]}else e.event.altKey&&(na=Ea.slice());Li.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",ii.style("cursor")),di({type:"brushstart"}),Xs();function Is(){e.event.keyCode==32&&(kn||(na=null,Ea[0]-=Oe[1],Ea[1]-=Ve[1],kn=2),_e())}function Ms(){e.event.keyCode==32&&kn==2&&(Ea[0]+=Oe[1],Ea[1]+=Ve[1],kn=0,_e())}function Xs(){var Fo=e.mouse(Wr),Uo=!1;Ia&&(Fo[0]+=Ia[0],Fo[1]+=Ia[1]),kn||(e.event.altKey?(na||(na=[(Oe[0]+Oe[1])/2,(Ve[0]+Ve[1])/2]),Ea[0]=Oe[+(Fo[0]<na[0])],Ea[1]=Ve[+(Fo[1]<na[1])]):na=null),Qr&&Un(Fo,se,0)&&(zr(Li),Uo=!0),Pn&&Un(Fo,Te,1)&&(gi(Li),Uo=!0),Uo&&(Ur(Li),di({type:"brush",mode:kn?"move":"resize"}))}function Un(Fo,Uo,$s){var Sl=wn(Uo),bu=Sl[0],dl=Sl[1],Sc=Ea[$s],Me=$s?Ve:Oe,bt=Me[1]-Me[0],Ot,Lr;if(kn&&(bu-=Sc,dl-=bt+Sc),Ot=($s?Wt:at)?Math.max(bu,Math.min(dl,Fo[$s])):Fo[$s],kn?Lr=(Ot+=Sc)+bt:(na&&(Sc=Math.max(bu,Math.min(dl,2*na[$s]-Ot))),Sc<Ot?(Lr=Ot,Ot=Sc):Lr=Sc),Me[0]!=Ot||Me[1]!=Lr)return $s?Pt=null:Ye=null,Me[0]=Ot,Me[1]=Lr,!0}function ja(){Xs(),Li.style("pointer-events","all").selectAll(".resize").style("display",pr.empty()?"none":null),e.select("body").style("cursor",null),yo.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),Bn(),di({type:"brushend"})}}return pr.x=function(Wr){return arguments.length?(se=Wr,dr=dc[!se<<1|!Te],pr):se},pr.y=function(Wr){return arguments.length?(Te=Wr,dr=dc[!se<<1|!Te],pr):Te},pr.clamp=function(Wr){return arguments.length?(se&&Te?(at=!!Wr[0],Wt=!!Wr[1]):se?at=!!Wr:Te&&(Wt=!!Wr),pr):se&&Te?[at,Wt]:se?at:Te?Wt:null},pr.extent=function(Wr){var ii,di,Li,Ti,Qr;return arguments.length?(se&&(ii=Wr[0],di=Wr[1],Te&&(ii=ii[0],di=di[0]),Ye=[ii,di],se.invert&&(ii=se(ii),di=se(di)),di<ii&&(Qr=ii,ii=di,di=Qr),(ii!=Oe[0]||di!=Oe[1])&&(Oe=[ii,di])),Te&&(Li=Wr[0],Ti=Wr[1],se&&(Li=Li[1],Ti=Ti[1]),Pt=[Li,Ti],Te.invert&&(Li=Te(Li),Ti=Te(Ti)),Ti<Li&&(Qr=Li,Li=Ti,Ti=Qr),(Li!=Ve[0]||Ti!=Ve[1])&&(Ve=[Li,Ti])),pr):(se&&(Ye?(ii=Ye[0],di=Ye[1]):(ii=Oe[0],di=Oe[1],se.invert&&(ii=se.invert(ii),di=se.invert(di)),di<ii&&(Qr=ii,ii=di,di=Qr))),Te&&(Pt?(Li=Pt[0],Ti=Pt[1]):(Li=Ve[0],Ti=Ve[1],Te.invert&&(Li=Te.invert(Li),Ti=Te.invert(Ti)),Ti<Li&&(Qr=Li,Li=Ti,Ti=Qr))),se&&Te?[[ii,Li],[di,Ti]]:se?[ii,di]:Te&&[Li,Ti])},pr.clear=function(){return pr.empty()||(Oe=[0,0],Ve=[0,0],Ye=Pt=null),pr},pr.empty=function(){return!!se&&Oe[0]==Oe[1]||!!Te&&Ve[0]==Ve[1]},e.rebind(pr,X,"on")};var eu={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},dc=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];e.text=hn(function(X){return X.responseText}),e.json=function(X,se){return Sn(X,"application/json",Tl,se)};function Tl(X){return JSON.parse(X.responseText)}e.html=function(X,se){return Sn(X,"text/html",Al,se)};function Al(X){var se=n.createRange();return se.selectNode(n.body),se.createContextualFragment(X.responseText)}e.xml=hn(function(X){return X.responseXML}),typeof y6=="object"&&y6.exports?y6.exports=e:this.d3=e}).apply(self)});var Sq=ye((_6,wee)=>{(function(e,t){typeof _6=="object"&&typeof wee!="undefined"?t(_6):(e=e||self,t(e.d3=e.d3||{}))})(_6,function(e){"use strict";var t=new Date,r=new Date;function n(Ae,rt,St,Tt){function dt(Et){return Ae(Et=arguments.length===0?new Date:new Date(+Et)),Et}return dt.floor=function(Et){return Ae(Et=new Date(+Et)),Et},dt.ceil=function(Et){return Ae(Et=new Date(Et-1)),rt(Et,1),Ae(Et),Et},dt.round=function(Et){var pt=dt(Et),Xt=dt.ceil(Et);return Et-pt<Xt-Et?pt:Xt},dt.offset=function(Et,pt){return rt(Et=new Date(+Et),pt==null?1:Math.floor(pt)),Et},dt.range=function(Et,pt,Xt){var or=[],_r;if(Et=dt.ceil(Et),Xt=Xt==null?1:Math.floor(Xt),!(Et<pt)||!(Xt>0))return or;do or.push(_r=new Date(+Et)),rt(Et,Xt),Ae(Et);while(_r<Et&&Et<pt);return or},dt.filter=function(Et){return n(function(pt){if(pt>=pt)for(;Ae(pt),!Et(pt);)pt.setTime(pt-1)},function(pt,Xt){if(pt>=pt)if(Xt<0)for(;++Xt<=0;)for(;rt(pt,-1),!Et(pt););else for(;--Xt>=0;)for(;rt(pt,1),!Et(pt););})},St&&(dt.count=function(Et,pt){return t.setTime(+Et),r.setTime(+pt),Ae(t),Ae(r),Math.floor(St(t,r))},dt.every=function(Et){return Et=Math.floor(Et),!isFinite(Et)||!(Et>0)?null:Et>1?dt.filter(Tt?function(pt){return Tt(pt)%Et===0}:function(pt){return dt.count(0,pt)%Et===0}):dt}),dt}var i=n(function(){},function(Ae,rt){Ae.setTime(+Ae+rt)},function(Ae,rt){return rt-Ae});i.every=function(Ae){return Ae=Math.floor(Ae),!isFinite(Ae)||!(Ae>0)?null:Ae>1?n(function(rt){rt.setTime(Math.floor(rt/Ae)*Ae)},function(rt,St){rt.setTime(+rt+St*Ae)},function(rt,St){return(St-rt)/Ae}):i};var a=i.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds())},function(Ae,rt){Ae.setTime(+Ae+rt*o)},function(Ae,rt){return(rt-Ae)/o},function(Ae){return Ae.getUTCSeconds()}),h=f.range,d=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds()-Ae.getSeconds()*o)},function(Ae,rt){Ae.setTime(+Ae+rt*s)},function(Ae,rt){return(rt-Ae)/s},function(Ae){return Ae.getMinutes()}),v=d.range,m=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds()-Ae.getSeconds()*o-Ae.getMinutes()*s)},function(Ae,rt){Ae.setTime(+Ae+rt*l)},function(Ae,rt){return(rt-Ae)/l},function(Ae){return Ae.getHours()}),b=m.range,p=n(function(Ae){Ae.setHours(0,0,0,0)},function(Ae,rt){Ae.setDate(Ae.getDate()+rt)},function(Ae,rt){return(rt-Ae-(rt.getTimezoneOffset()-Ae.getTimezoneOffset())*s)/u},function(Ae){return Ae.getDate()-1}),k=p.range;function M(Ae){return n(function(rt){rt.setDate(rt.getDate()-(rt.getDay()+7-Ae)%7),rt.setHours(0,0,0,0)},function(rt,St){rt.setDate(rt.getDate()+St*7)},function(rt,St){return(St-rt-(St.getTimezoneOffset()-rt.getTimezoneOffset())*s)/c})}var T=M(0),L=M(1),x=M(2),C=M(3),S=M(4),g=M(5),P=M(6),E=T.range,z=L.range,q=x.range,U=C.range,G=S.range,Z=g.range,j=P.range,N=n(function(Ae){Ae.setDate(1),Ae.setHours(0,0,0,0)},function(Ae,rt){Ae.setMonth(Ae.getMonth()+rt)},function(Ae,rt){return rt.getMonth()-Ae.getMonth()+(rt.getFullYear()-Ae.getFullYear())*12},function(Ae){return Ae.getMonth()}),H=N.range,re=n(function(Ae){Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,rt){Ae.setFullYear(Ae.getFullYear()+rt)},function(Ae,rt){return rt.getFullYear()-Ae.getFullYear()},function(Ae){return Ae.getFullYear()});re.every=function(Ae){return!isFinite(Ae=Math.floor(Ae))||!(Ae>0)?null:n(function(rt){rt.setFullYear(Math.floor(rt.getFullYear()/Ae)*Ae),rt.setMonth(0,1),rt.setHours(0,0,0,0)},function(rt,St){rt.setFullYear(rt.getFullYear()+St*Ae)})};var oe=re.range,_e=n(function(Ae){Ae.setUTCSeconds(0,0)},function(Ae,rt){Ae.setTime(+Ae+rt*s)},function(Ae,rt){return(rt-Ae)/s},function(Ae){return Ae.getUTCMinutes()}),ke=_e.range,Ce=n(function(Ae){Ae.setUTCMinutes(0,0,0)},function(Ae,rt){Ae.setTime(+Ae+rt*l)},function(Ae,rt){return(rt-Ae)/l},function(Ae){return Ae.getUTCHours()}),ge=Ce.range,ie=n(function(Ae){Ae.setUTCHours(0,0,0,0)},function(Ae,rt){Ae.setUTCDate(Ae.getUTCDate()+rt)},function(Ae,rt){return(rt-Ae)/u},function(Ae){return Ae.getUTCDate()-1}),Se=ie.range;function Ee(Ae){return n(function(rt){rt.setUTCDate(rt.getUTCDate()-(rt.getUTCDay()+7-Ae)%7),rt.setUTCHours(0,0,0,0)},function(rt,St){rt.setUTCDate(rt.getUTCDate()+St*7)},function(rt,St){return(St-rt)/c})}var we=Ee(0),De=Ee(1),Le=Ee(2),me=Ee(3),Pe=Ee(4),ce=Ee(5),He=Ee(6),lt=we.range,mt=De.range,Vt=Le.range,st=me.range,ct=Pe.range,Qt=ce.range,Ht=He.range,nr=n(function(Ae){Ae.setUTCDate(1),Ae.setUTCHours(0,0,0,0)},function(Ae,rt){Ae.setUTCMonth(Ae.getUTCMonth()+rt)},function(Ae,rt){return rt.getUTCMonth()-Ae.getUTCMonth()+(rt.getUTCFullYear()-Ae.getUTCFullYear())*12},function(Ae){return Ae.getUTCMonth()}),tt=nr.range,je=n(function(Ae){Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,rt){Ae.setUTCFullYear(Ae.getUTCFullYear()+rt)},function(Ae,rt){return rt.getUTCFullYear()-Ae.getUTCFullYear()},function(Ae){return Ae.getUTCFullYear()});je.every=function(Ae){return!isFinite(Ae=Math.floor(Ae))||!(Ae>0)?null:n(function(rt){rt.setUTCFullYear(Math.floor(rt.getUTCFullYear()/Ae)*Ae),rt.setUTCMonth(0,1),rt.setUTCHours(0,0,0,0)},function(rt,St){rt.setUTCFullYear(rt.getUTCFullYear()+St*Ae)})};var Ue=je.range;e.timeDay=p,e.timeDays=k,e.timeFriday=g,e.timeFridays=Z,e.timeHour=m,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=v,e.timeMonday=L,e.timeMondays=z,e.timeMonth=N,e.timeMonths=H,e.timeSaturday=P,e.timeSaturdays=j,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=T,e.timeSundays=E,e.timeThursday=S,e.timeThursdays=G,e.timeTuesday=x,e.timeTuesdays=q,e.timeWednesday=C,e.timeWednesdays=U,e.timeWeek=T,e.timeWeeks=E,e.timeYear=re,e.timeYears=oe,e.utcDay=ie,e.utcDays=Se,e.utcFriday=ce,e.utcFridays=Qt,e.utcHour=Ce,e.utcHours=ge,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=_e,e.utcMinutes=ke,e.utcMonday=De,e.utcMondays=mt,e.utcMonth=nr,e.utcMonths=tt,e.utcSaturday=He,e.utcSaturdays=Ht,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=we,e.utcSundays=lt,e.utcThursday=Pe,e.utcThursdays=ct,e.utcTuesday=Le,e.utcTuesdays=Vt,e.utcWednesday=me,e.utcWednesdays=st,e.utcWeek=we,e.utcWeeks=lt,e.utcYear=je,e.utcYears=Ue,Object.defineProperty(e,"__esModule",{value:!0})})});var h3=ye((x6,Tee)=>{(function(e,t){typeof x6=="object"&&typeof Tee!="undefined"?t(x6,Sq()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(x6,function(e,t){"use strict";function r(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L);return Je.setFullYear(Ge.y),Je}return new Date(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L)}function n(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(Date.UTC(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L));return Je.setUTCFullYear(Ge.y),Je}return new Date(Date.UTC(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L))}function i(Ge,Je,We){return{y:Ge,m:Je,d:We,H:0,M:0,S:0,L:0}}function a(Ge){var Je=Ge.dateTime,We=Ge.date,et=Ge.time,xt=Ge.periods,At=Ge.days,Kt=Ge.shortDays,er=Ge.months,Sr=Ge.shortMonths,Gr=h(xt),Ir=d(xt),Yr=h(At),_i=d(At),Pi=h(Kt),ai=d(Kt),mi=h(er),un=d(er),Fn=h(Sr),An=d(Sr),Hn={a:Zi,A:en,b:fn,B:yn,c:null,d:N,e:N,f:ke,H,I:re,j:oe,L:_e,m:Ce,M:ge,p:Mn,q:Ba,Q:pt,s:Xt,S:ie,u:Se,U:Ee,V:we,w:De,W:Le,x:null,X:null,y:me,Y:Pe,Z:ce,"%":Et},Qn={a:ua,A:ma,b:Wa,B:Fa,c:null,d:He,e:He,f:ct,H:lt,I:mt,j:Vt,L:st,m:Qt,M:Ht,p:Xo,q:da,Q:pt,s:Xt,S:nr,u:tt,U:je,V:Ue,w:Ae,W:rt,x:null,X:null,y:St,Y:Tt,Z:dt,"%":Et},Vi={a:rr,A:ir,b:wr,B:Xr,c:ti,d:S,e:S,f:U,H:P,I:P,j:g,L:q,m:C,M:E,p:wt,q:x,Q:Z,s:j,S:z,u:m,U:b,V:p,w:v,W:k,x:$r,X:Ri,y:T,Y:M,Z:L,"%":G};Hn.x=Kn(We,Hn),Hn.X=Kn(et,Hn),Hn.c=Kn(Je,Hn),Qn.x=Kn(We,Qn),Qn.X=Kn(et,Qn),Qn.c=Kn(Je,Qn);function Kn(jn,Ha){return function(vo){var Gn=[],Ct=-1,Ar=0,Jr=jn.length,hi,hn,Sn;for(vo instanceof Date||(vo=new Date(+vo));++Ct<Jr;)jn.charCodeAt(Ct)===37&&(Gn.push(jn.slice(Ar,Ct)),(hn=o[hi=jn.charAt(++Ct)])!=null?hi=jn.charAt(++Ct):hn=hi==="e"?" ":"0",(Sn=Ha[hi])&&(hi=Sn(vo,hn)),Gn.push(hi),Ar=Ct+1);return Gn.push(jn.slice(Ar,Ct)),Gn.join("")}}function Jn(jn,Ha){return function(vo){var Gn=i(1900,void 0,1),Ct=Gt(Gn,jn,vo+="",0),Ar,Jr;if(Ct!=vo.length)return null;if("Q"in Gn)return new Date(Gn.Q);if("s"in Gn)return new Date(Gn.s*1e3+("L"in Gn?Gn.L:0));if(Ha&&!("Z"in Gn)&&(Gn.Z=0),"p"in Gn&&(Gn.H=Gn.H%12+Gn.p*12),Gn.m===void 0&&(Gn.m="q"in Gn?Gn.q:0),"V"in Gn){if(Gn.V<1||Gn.V>53)return null;"w"in Gn||(Gn.w=1),"Z"in Gn?(Ar=n(i(Gn.y,0,1)),Jr=Ar.getUTCDay(),Ar=Jr>4||Jr===0?t.utcMonday.ceil(Ar):t.utcMonday(Ar),Ar=t.utcDay.offset(Ar,(Gn.V-1)*7),Gn.y=Ar.getUTCFullYear(),Gn.m=Ar.getUTCMonth(),Gn.d=Ar.getUTCDate()+(Gn.w+6)%7):(Ar=r(i(Gn.y,0,1)),Jr=Ar.getDay(),Ar=Jr>4||Jr===0?t.timeMonday.ceil(Ar):t.timeMonday(Ar),Ar=t.timeDay.offset(Ar,(Gn.V-1)*7),Gn.y=Ar.getFullYear(),Gn.m=Ar.getMonth(),Gn.d=Ar.getDate()+(Gn.w+6)%7)}else("W"in Gn||"U"in Gn)&&("w"in Gn||(Gn.w="u"in Gn?Gn.u%7:"W"in Gn?1:0),Jr="Z"in Gn?n(i(Gn.y,0,1)).getUTCDay():r(i(Gn.y,0,1)).getDay(),Gn.m=0,Gn.d="W"in Gn?(Gn.w+6)%7+Gn.W*7-(Jr+5)%7:Gn.w+Gn.U*7-(Jr+6)%7);return"Z"in Gn?(Gn.H+=Gn.Z/100|0,Gn.M+=Gn.Z%100,n(Gn)):r(Gn)}}function Gt(jn,Ha,vo,Gn){for(var Ct=0,Ar=Ha.length,Jr=vo.length,hi,hn;Ct<Ar;){if(Gn>=Jr)return-1;if(hi=Ha.charCodeAt(Ct++),hi===37){if(hi=Ha.charAt(Ct++),hn=Vi[hi in o?Ha.charAt(Ct++):hi],!hn||(Gn=hn(jn,vo,Gn))<0)return-1}else if(hi!=vo.charCodeAt(Gn++))return-1}return Gn}function wt(jn,Ha,vo){var Gn=Gr.exec(Ha.slice(vo));return Gn?(jn.p=Ir[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function rr(jn,Ha,vo){var Gn=Pi.exec(Ha.slice(vo));return Gn?(jn.w=ai[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function ir(jn,Ha,vo){var Gn=Yr.exec(Ha.slice(vo));return Gn?(jn.w=_i[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function wr(jn,Ha,vo){var Gn=Fn.exec(Ha.slice(vo));return Gn?(jn.m=An[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function Xr(jn,Ha,vo){var Gn=mi.exec(Ha.slice(vo));return Gn?(jn.m=un[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function ti(jn,Ha,vo){return Gt(jn,Je,Ha,vo)}function $r(jn,Ha,vo){return Gt(jn,We,Ha,vo)}function Ri(jn,Ha,vo){return Gt(jn,et,Ha,vo)}function Zi(jn){return Kt[jn.getDay()]}function en(jn){return At[jn.getDay()]}function fn(jn){return Sr[jn.getMonth()]}function yn(jn){return er[jn.getMonth()]}function Mn(jn){return xt[+(jn.getHours()>=12)]}function Ba(jn){return 1+~~(jn.getMonth()/3)}function ua(jn){return Kt[jn.getUTCDay()]}function ma(jn){return At[jn.getUTCDay()]}function Wa(jn){return Sr[jn.getUTCMonth()]}function Fa(jn){return er[jn.getUTCMonth()]}function Xo(jn){return xt[+(jn.getUTCHours()>=12)]}function da(jn){return 1+~~(jn.getUTCMonth()/3)}return{format:function(jn){var Ha=Kn(jn+="",Hn);return Ha.toString=function(){return jn},Ha},parse:function(jn){var Ha=Jn(jn+="",!1);return Ha.toString=function(){return jn},Ha},utcFormat:function(jn){var Ha=Kn(jn+="",Qn);return Ha.toString=function(){return jn},Ha},utcParse:function(jn){var Ha=Jn(jn+="",!0);return Ha.toString=function(){return jn},Ha}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(Ge,Je,We){var et=Ge<0?"-":"",xt=(et?-Ge:Ge)+"",At=xt.length;return et+(At<We?new Array(We-At+1).join(Je)+xt:xt)}function f(Ge){return Ge.replace(u,"\\$&")}function h(Ge){return new RegExp("^(?:"+Ge.map(f).join("|")+")","i")}function d(Ge){for(var Je={},We=-1,et=Ge.length;++We<et;)Je[Ge[We].toLowerCase()]=We;return Je}function v(Ge,Je,We){var et=s.exec(Je.slice(We,We+1));return et?(Ge.w=+et[0],We+et[0].length):-1}function m(Ge,Je,We){var et=s.exec(Je.slice(We,We+1));return et?(Ge.u=+et[0],We+et[0].length):-1}function b(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.U=+et[0],We+et[0].length):-1}function p(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.V=+et[0],We+et[0].length):-1}function k(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.W=+et[0],We+et[0].length):-1}function M(Ge,Je,We){var et=s.exec(Je.slice(We,We+4));return et?(Ge.y=+et[0],We+et[0].length):-1}function T(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.y=+et[0]+(+et[0]>68?1900:2e3),We+et[0].length):-1}function L(Ge,Je,We){var et=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Je.slice(We,We+6));return et?(Ge.Z=et[1]?0:-(et[2]+(et[3]||"00")),We+et[0].length):-1}function x(Ge,Je,We){var et=s.exec(Je.slice(We,We+1));return et?(Ge.q=et[0]*3-3,We+et[0].length):-1}function C(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.m=et[0]-1,We+et[0].length):-1}function S(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.d=+et[0],We+et[0].length):-1}function g(Ge,Je,We){var et=s.exec(Je.slice(We,We+3));return et?(Ge.m=0,Ge.d=+et[0],We+et[0].length):-1}function P(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.H=+et[0],We+et[0].length):-1}function E(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.M=+et[0],We+et[0].length):-1}function z(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.S=+et[0],We+et[0].length):-1}function q(Ge,Je,We){var et=s.exec(Je.slice(We,We+3));return et?(Ge.L=+et[0],We+et[0].length):-1}function U(Ge,Je,We){var et=s.exec(Je.slice(We,We+6));return et?(Ge.L=Math.floor(et[0]/1e3),We+et[0].length):-1}function G(Ge,Je,We){var et=l.exec(Je.slice(We,We+1));return et?We+et[0].length:-1}function Z(Ge,Je,We){var et=s.exec(Je.slice(We));return et?(Ge.Q=+et[0],We+et[0].length):-1}function j(Ge,Je,We){var et=s.exec(Je.slice(We));return et?(Ge.s=+et[0],We+et[0].length):-1}function N(Ge,Je){return c(Ge.getDate(),Je,2)}function H(Ge,Je){return c(Ge.getHours(),Je,2)}function re(Ge,Je){return c(Ge.getHours()%12||12,Je,2)}function oe(Ge,Je){return c(1+t.timeDay.count(t.timeYear(Ge),Ge),Je,3)}function _e(Ge,Je){return c(Ge.getMilliseconds(),Je,3)}function ke(Ge,Je){return _e(Ge,Je)+"000"}function Ce(Ge,Je){return c(Ge.getMonth()+1,Je,2)}function ge(Ge,Je){return c(Ge.getMinutes(),Je,2)}function ie(Ge,Je){return c(Ge.getSeconds(),Je,2)}function Se(Ge){var Je=Ge.getDay();return Je===0?7:Je}function Ee(Ge,Je){return c(t.timeSunday.count(t.timeYear(Ge)-1,Ge),Je,2)}function we(Ge,Je){var We=Ge.getDay();return Ge=We>=4||We===0?t.timeThursday(Ge):t.timeThursday.ceil(Ge),c(t.timeThursday.count(t.timeYear(Ge),Ge)+(t.timeYear(Ge).getDay()===4),Je,2)}function De(Ge){return Ge.getDay()}function Le(Ge,Je){return c(t.timeMonday.count(t.timeYear(Ge)-1,Ge),Je,2)}function me(Ge,Je){return c(Ge.getFullYear()%100,Je,2)}function Pe(Ge,Je){return c(Ge.getFullYear()%1e4,Je,4)}function ce(Ge){var Je=Ge.getTimezoneOffset();return(Je>0?"-":(Je*=-1,"+"))+c(Je/60|0,"0",2)+c(Je%60,"0",2)}function He(Ge,Je){return c(Ge.getUTCDate(),Je,2)}function lt(Ge,Je){return c(Ge.getUTCHours(),Je,2)}function mt(Ge,Je){return c(Ge.getUTCHours()%12||12,Je,2)}function Vt(Ge,Je){return c(1+t.utcDay.count(t.utcYear(Ge),Ge),Je,3)}function st(Ge,Je){return c(Ge.getUTCMilliseconds(),Je,3)}function ct(Ge,Je){return st(Ge,Je)+"000"}function Qt(Ge,Je){return c(Ge.getUTCMonth()+1,Je,2)}function Ht(Ge,Je){return c(Ge.getUTCMinutes(),Je,2)}function nr(Ge,Je){return c(Ge.getUTCSeconds(),Je,2)}function tt(Ge){var Je=Ge.getUTCDay();return Je===0?7:Je}function je(Ge,Je){return c(t.utcSunday.count(t.utcYear(Ge)-1,Ge),Je,2)}function Ue(Ge,Je){var We=Ge.getUTCDay();return Ge=We>=4||We===0?t.utcThursday(Ge):t.utcThursday.ceil(Ge),c(t.utcThursday.count(t.utcYear(Ge),Ge)+(t.utcYear(Ge).getUTCDay()===4),Je,2)}function Ae(Ge){return Ge.getUTCDay()}function rt(Ge,Je){return c(t.utcMonday.count(t.utcYear(Ge)-1,Ge),Je,2)}function St(Ge,Je){return c(Ge.getUTCFullYear()%100,Je,2)}function Tt(Ge,Je){return c(Ge.getUTCFullYear()%1e4,Je,4)}function dt(){return"+0000"}function Et(){return"%"}function pt(Ge){return+Ge}function Xt(Ge){return Math.floor(+Ge/1e3)}var or;_r({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 _r(Ge){return or=a(Ge),e.timeFormat=or.format,e.timeParse=or.parse,e.utcFormat=or.utcFormat,e.utcParse=or.utcParse,or}var Er="%Y-%m-%dT%H:%M:%S.%LZ";function ei(Ge){return Ge.toISOString()}var qr=Date.prototype.toISOString?ei:e.utcFormat(Er);function jr(Ge){var Je=new Date(Ge);return isNaN(Je)?null:Je}var gt=+new Date("2000-01-01T00:00:00.000Z")?jr:e.utcParse(Er);e.isoFormat=qr,e.isoParse=gt,e.timeFormatDefaultLocale=_r,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var Mq=ye((b6,Aee)=>{(function(e,t){typeof b6=="object"&&typeof Aee!="undefined"?t(b6):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(b6,function(e){"use strict";function t(C){return Math.abs(C=Math.round(C))>=1e21?C.toLocaleString("en").replace(/,/g,""):C.toString(10)}function r(C,S){if((g=(C=S?C.toExponential(S-1):C.toExponential()).indexOf("e"))<0)return null;var g,P=C.slice(0,g);return[P.length>1?P[0]+P.slice(2):P,+C.slice(g+1)]}function n(C){return C=r(Math.abs(C)),C?C[1]:NaN}function i(C,S){return function(g,P){for(var E=g.length,z=[],q=0,U=C[0],G=0;E>0&&U>0&&(G+U+1>P&&(U=Math.max(1,P-G)),z.push(g.substring(E-=U,E+U)),!((G+=U+1)>P));)U=C[q=(q+1)%C.length];return z.reverse().join(S)}}function a(C){return function(S){return S.replace(/[0-9]/g,function(g){return C[+g]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(C){if(!(S=o.exec(C)))throw new Error("invalid format: "+C);var S;return new l({fill:S[1],align:S[2],sign:S[3],symbol:S[4],zero:S[5],width:S[6],comma:S[7],precision:S[8]&&S[8].slice(1),trim:S[9],type:S[10]})}s.prototype=l.prototype;function l(C){this.fill=C.fill===void 0?" ":C.fill+"",this.align=C.align===void 0?">":C.align+"",this.sign=C.sign===void 0?"-":C.sign+"",this.symbol=C.symbol===void 0?"":C.symbol+"",this.zero=!!C.zero,this.width=C.width===void 0?void 0:+C.width,this.comma=!!C.comma,this.precision=C.precision===void 0?void 0:+C.precision,this.trim=!!C.trim,this.type=C.type===void 0?"":C.type+""}l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function u(C){e:for(var S=C.length,g=1,P=-1,E;g<S;++g)switch(C[g]){case".":P=E=g;break;case"0":P===0&&(P=g),E=g;break;default:if(!+C[g])break e;P>0&&(P=0);break}return P>0?C.slice(0,P)+C.slice(E+1):C}var c;function f(C,S){var g=r(C,S);if(!g)return C+"";var P=g[0],E=g[1],z=E-(c=Math.max(-8,Math.min(8,Math.floor(E/3)))*3)+1,q=P.length;return z===q?P:z>q?P+new Array(z-q+1).join("0"):z>0?P.slice(0,z)+"."+P.slice(z):"0."+new Array(1-z).join("0")+r(C,Math.max(0,S+z-1))[0]}function h(C,S){var g=r(C,S);if(!g)return C+"";var P=g[0],E=g[1];return E<0?"0."+new Array(-E).join("0")+P:P.length>E+1?P.slice(0,E+1)+"."+P.slice(E+1):P+new Array(E-P.length+2).join("0")}var d={"%":function(C,S){return(C*100).toFixed(S)},b:function(C){return Math.round(C).toString(2)},c:function(C){return C+""},d:t,e:function(C,S){return C.toExponential(S)},f:function(C,S){return C.toFixed(S)},g:function(C,S){return C.toPrecision(S)},o:function(C){return Math.round(C).toString(8)},p:function(C,S){return h(C*100,S)},r:h,s:f,X:function(C){return Math.round(C).toString(16).toUpperCase()},x:function(C){return Math.round(C).toString(16)}};function v(C){return C}var m=Array.prototype.map,b=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function p(C){var S=C.grouping===void 0||C.thousands===void 0?v:i(m.call(C.grouping,Number),C.thousands+""),g=C.currency===void 0?"":C.currency[0]+"",P=C.currency===void 0?"":C.currency[1]+"",E=C.decimal===void 0?".":C.decimal+"",z=C.numerals===void 0?v:a(m.call(C.numerals,String)),q=C.percent===void 0?"%":C.percent+"",U=C.minus===void 0?"-":C.minus+"",G=C.nan===void 0?"NaN":C.nan+"";function Z(N){N=s(N);var H=N.fill,re=N.align,oe=N.sign,_e=N.symbol,ke=N.zero,Ce=N.width,ge=N.comma,ie=N.precision,Se=N.trim,Ee=N.type;Ee==="n"?(ge=!0,Ee="g"):d[Ee]||(ie===void 0&&(ie=12),Se=!0,Ee="g"),(ke||H==="0"&&re==="=")&&(ke=!0,H="0",re="=");var we=_e==="$"?g:_e==="#"&&/[boxX]/.test(Ee)?"0"+Ee.toLowerCase():"",De=_e==="$"?P:/[%p]/.test(Ee)?q:"",Le=d[Ee],me=/[defgprs%]/.test(Ee);ie=ie===void 0?6:/[gprs]/.test(Ee)?Math.max(1,Math.min(21,ie)):Math.max(0,Math.min(20,ie));function Pe(ce){var He=we,lt=De,mt,Vt,st;if(Ee==="c")lt=Le(ce)+lt,ce="";else{ce=+ce;var ct=ce<0||1/ce<0;if(ce=isNaN(ce)?G:Le(Math.abs(ce),ie),Se&&(ce=u(ce)),ct&&+ce==0&&oe!=="+"&&(ct=!1),He=(ct?oe==="("?oe:U:oe==="-"||oe==="("?"":oe)+He,lt=(Ee==="s"?b[8+c/3]:"")+lt+(ct&&oe==="("?")":""),me){for(mt=-1,Vt=ce.length;++mt<Vt;)if(st=ce.charCodeAt(mt),48>st||st>57){lt=(st===46?E+ce.slice(mt+1):ce.slice(mt))+lt,ce=ce.slice(0,mt);break}}}ge&&!ke&&(ce=S(ce,1/0));var Qt=He.length+ce.length+lt.length,Ht=Qt<Ce?new Array(Ce-Qt+1).join(H):"";switch(ge&&ke&&(ce=S(Ht+ce,Ht.length?Ce-lt.length:1/0),Ht=""),re){case"<":ce=He+ce+lt+Ht;break;case"=":ce=He+Ht+ce+lt;break;case"^":ce=Ht.slice(0,Qt=Ht.length>>1)+He+ce+lt+Ht.slice(Qt);break;default:ce=Ht+He+ce+lt;break}return z(ce)}return Pe.toString=function(){return N+""},Pe}function j(N,H){var re=Z((N=s(N),N.type="f",N)),oe=Math.max(-8,Math.min(8,Math.floor(n(H)/3)))*3,_e=Math.pow(10,-oe),ke=b[8+oe/3];return function(Ce){return re(_e*Ce)+ke}}return{format:Z,formatPrefix:j}}var k;M({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function M(C){return k=p(C),e.format=k.format,e.formatPrefix=k.formatPrefix,k}function T(C){return Math.max(0,-n(Math.abs(C)))}function L(C,S){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(S)/3)))*3-n(Math.abs(C)))}function x(C,S){return C=Math.abs(C),S=Math.abs(S)-C,Math.max(0,n(S)-n(C))+1}e.FormatSpecifier=l,e.formatDefaultLocale=M,e.formatLocale=p,e.formatSpecifier=s,e.precisionFixed=T,e.precisionPrefix=L,e.precisionRound=x,Object.defineProperty(e,"__esModule",{value:!0})})});var Mee=ye((Trr,See)=>{"use strict";See.exports=function(e){for(var t=e.length,r,n=0;n<t;n++)if(r=e.charCodeAt(n),(r<9||r>13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var Eo=ye((Arr,Eee)=>{"use strict";var Ett=Mee();Eee.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&Ett(r))return!1}else if(t!=="number")return!1;return e-e<1}});var fs=ye((Srr,kee)=>{"use strict";kee.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}});var Eq=ye((w6,Cee)=>{(function(e,t){typeof w6=="object"&&typeof Cee!="undefined"?t(w6):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(w6,function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n<t.length;n++)r[t.charCodeAt(n)]=n;var i=function(o){var s=new Uint8Array(o),l,u=s.length,c="";for(l=0;l<u;l+=3)c+=t[s[l]>>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},a=function(o){var s=o.length*.75,l=o.length,u,c=0,f,h,d,v;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var m=new ArrayBuffer(s),b=new Uint8Array(m);for(u=0;u<l;u+=4)f=r[o.charCodeAt(u)],h=r[o.charCodeAt(u+1)],d=r[o.charCodeAt(u+2)],v=r[o.charCodeAt(u+3)],b[c++]=f<<2|h>>4,b[c++]=(h&15)<<4|d>>2,b[c++]=(d&3)<<6|v&63;return m};e.decode=a,e.encode=i,Object.defineProperty(e,"__esModule",{value:!0})})});var Ty=ye((Mrr,Lee)=>{"use strict";Lee.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var vv=ye(xg=>{"use strict";var ktt=Eq().decode,Ctt=Ty(),kq=Array.isArray,Ltt=ArrayBuffer,Ptt=DataView;function Pee(e){return Ltt.isView(e)&&!(e instanceof Ptt)}xg.isTypedArray=Pee;function T6(e){return kq(e)||Pee(e)}xg.isArrayOrTypedArray=T6;function Itt(e){return!T6(e[0])}xg.isArray1D=Itt;xg.ensureArray=function(e,t){return kq(e)||(e=[]),e.length=t,e};var Ld={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};Ld.uint8c=Ld.u1c;Ld.uint8=Ld.u1;Ld.int8=Ld.i1;Ld.uint16=Ld.u2;Ld.int16=Ld.i2;Ld.uint32=Ld.u4;Ld.int32=Ld.i4;Ld.float32=Ld.f4;Ld.float64=Ld.f8;function Cq(e){return e.constructor===ArrayBuffer}xg.isArrayBuffer=Cq;xg.decodeTypedArraySpec=function(e){var t=[],r=Rtt(e),n=r.dtype,i=Ld[n];if(!i)throw new Error('Error in dtype: "'+n+'"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;Cq(o)||(o=ktt(o));var s=r.shape===void 0?[o.byteLength/a]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],h=a*f,d=0;if(l===1)t=new i(o);else if(l===2)for(u=+s[1],c=0;c<u;c++)t[c]=new i(o,d,f),d+=h;else if(l===3){u=+s[1];for(var v=+s[2],m=0;m<v;m++)for(t[m]=[],c=0;c<u;c++)t[m][c]=new i(o,d,f),d+=h}else throw new Error("ndim: "+l+'is not supported with the shape:"'+r.shape+'"');return t.bdata=r.bdata,t.dtype=r.dtype,t.shape=s.reverse().join(","),e._inputArray=t,t};xg.isTypedArraySpec=function(e){return Ctt(e)&&e.hasOwnProperty("dtype")&&typeof e.dtype=="string"&&e.hasOwnProperty("bdata")&&(typeof e.bdata=="string"||Cq(e.bdata))&&(e.shape===void 0||e.hasOwnProperty("shape")&&(typeof e.shape=="string"||typeof e.shape=="number"))};function Rtt(e){return{bdata:e.bdata,dtype:e.dtype,shape:e.shape}}xg.concat=function(){var e=[],t=!0,r=0,n,i,a,o,s,l,u,c;for(a=0;a<arguments.length;a++)o=arguments[a],l=o.length,l&&(i?e.push(o):(i=o,s=l),kq(o)?n=!1:(t=!1,r?n!==o.constructor&&(n=!1):n=o.constructor),r+=l);if(!r)return[];if(!e.length)return i;if(t)return i.concat.apply(i,e);if(n){for(u=new n(r),u.set(i),a=0;a<e.length;a++)o=e[a],u.set(o,s),s+=o.length;return u}for(u=new Array(r),c=0;c<i.length;c++)u[c]=i[c];for(a=0;a<e.length;a++){for(o=e[a],c=0;c<o.length;c++)u[s+c]=o[c];s+=c}return u};xg.maxRowLength=function(e){return Iee(e,Math.max,0)};xg.minRowLength=function(e){return Iee(e,Math.min,1/0)};function Iee(e,t,r){if(T6(e))if(T6(e[0])){for(var n=r,i=0;i<e.length;i++)n=t(n,e[i].length);return n}else return e.length;return 0}});var FS=ye((krr,qee)=>{"use strict";var Ree=Eo(),Pq=vv().isArrayOrTypedArray;qee.exports=function(t,r){if(Ree(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var n=r.split("."),i,a,o,s;for(s=0;s<n.length;s++)if(String(n[s]).slice(0,2)==="__")throw"bad property string";for(s=0;s<n.length;){if(i=String(n[s]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),i){if(i[1])n[s]=i[1];else if(s===0)n.splice(0,1);else throw"bad property string";for(a=i[2].slice(1,-1).split("]["),o=0;o<a.length;o++)s++,n.splice(s,0,Number(a[o]))}s++}return typeof t!="object"?qtt(t,r,n):{set:Fee(t,n,r),get:Dee(t,n),astr:r,parts:n,obj:t}};function Dee(e,t){return function(r){var n=e,i,a,o,s,l;for(s=0;s<t.length-1;s++){if(i=t[s],i===-1){for(a=!0,o=[],l=0;l<n.length;l++)o[l]=Dee(n[l],t.slice(s+1))(r),o[l]!==o[0]&&(a=!1);return a?o[0]:o}if(typeof i=="number"&&!Pq(n)||(n=n[i],typeof n!="object"||n===null))return}if(!(typeof n!="object"||n===null)&&(o=n[t[s]],!(!r&&o===null)))return o}}var Dtt=/(^|\.)args\[/;function Lq(e,t){return e===void 0||e===null&&!t.match(Dtt)}function Fee(e,t,r){return function(n){var i=e,a="",o=[[e,a]],s=Lq(n,r),l,u;for(u=0;u<t.length-1;u++){if(l=t[u],typeof l=="number"&&!Pq(i))throw"array index but container is not an array";if(l===-1){if(s=!ztt(i,t.slice(u+1),n,r),s)break;return}if(!zee(i,l,t[u+1],s))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";a=Ftt(a,l),o.push([i,a])}if(s){if(u===t.length-1&&(delete i[t[u]],Array.isArray(i)&&+t[u]===i.length-1))for(;i.length&&i[i.length-1]===void 0;)i.pop()}else i[t[u]]=n}}function Ftt(e,t){var r=t;return Ree(t)?r="["+t+"]":e&&(r="."+t),e+r}function ztt(e,t,r,n){var i=Pq(r),a=!0,o=r,s=n.replace("-1",0),l=i?!1:Lq(r,s),u=t[0],c;for(c=0;c<e.length;c++)s=n.replace("-1",c),i&&(o=r[c%r.length],l=Lq(o,s)),l&&(a=!1),zee(e,c,u,l)&&Fee(e[c],t,n.replace("-1",c))(o);return a}function zee(e,t,r,n){if(e[t]===void 0){if(n)return!1;typeof r=="number"?e[t]=[]:e[t]={}}return!0}function qtt(e,t,r){return{set:function(){throw"bad container"},get:function(){},astr:t,parts:r,obj:e}}});var Uee=ye((Crr,Nee)=>{"use strict";var d3=FS(),Ott=/^\w*$/,Btt=0,Oee=1,A6=2,Bee=3,gb=4;Nee.exports=function(t,r,n,i){n=n||"name",i=i||"value";var a,o,s,l={};r&&r.length?(s=d3(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(a=0;a<o.length;a++)u[o[a][n]]=a;var c=Ott.test(i),f={set:function(h,d){var v=d===null?gb:Btt;if(!o){if(!s||v===gb)return;o=[],s.set(o)}var m=u[h];if(m===void 0){if(v===gb)return;v=v|Bee,m=o.length,u[h]=m}else d!==(c?o[m][i]:d3(o[m],i).get())&&(v=v|A6);var b=o[m]=o[m]||{};return b[n]=h,c?b[i]=d:d3(b,i).set(d),d!==null&&(v=v&~gb),l[m]=l[m]|v,f},get:function(h){if(o){var d=u[h];if(d!==void 0)return c?o[d][i]:d3(o[d],i).get()}},rename:function(h,d){var v=u[h];return v===void 0||(l[v]=l[v]|Oee,u[d]=v,delete u[h],o[v][n]=d),f},remove:function(h){var d=u[h];if(d===void 0)return f;var v=o[d];if(Object.keys(v).length>2)return l[d]=l[d]|A6,f.set(h,null);if(c){for(a=d;a<o.length;a++)l[a]=l[a]|Bee;for(a=d;a<o.length;a++)u[o[a][n]]--;o.splice(d,1),delete u[h]}else d3(v,i).set(null),l[d]=l[d]|A6|gb;return f},constructUpdate:function(){for(var h,d,v={},m=Object.keys(l),b=0;b<m.length;b++)d=m[b],h=r+"["+d+"]",o[d]?(l[d]&Oee&&(v[h+"."+n]=o[d][n]),l[d]&A6&&(c?v[h+"."+i]=l[d]&gb?null:o[d][i]:v[h+"."+i]=l[d]&gb?null:d3(o[d],i).get())):v[h]=null;return v}};return f}});var Gee=ye((Lrr,Vee)=>{"use strict";var Ntt=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Utt=/^[^\.\[\]]+$/;Vee.exports=function(e,t){for(;t;){var r=e.match(Ntt);if(r)e=r[1];else if(e.match(Utt))e="";else throw new Error("bad relativeAttr call:"+[e,t]);if(t.charAt(0)==="^")t=t.slice(1);else break}return e&&t.charAt(0)!=="["?e+"."+t:e+t}});var S6=ye((Prr,Hee)=>{"use strict";var Vtt=Eo();Hee.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return Vtt(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var Xee=ye((Irr,Wee)=>{"use strict";var jee=vv().isArrayOrTypedArray,zS=Ty();Wee.exports=function e(t,r){for(var n in r){var i=r[n],a=t[n];if(a!==i)if(n.charAt(0)==="_"||typeof i=="function"){if(n in t)continue;t[n]=i}else if(jee(i)&&jee(a)&&zS(i[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(i.length,a.length),s=0;s<o;s++)a[s]!==i[s]&&zS(i[s])&&zS(a[s])&&e(a[s],i[s])}else zS(i)&&zS(a)&&(e(a,i),Object.keys(a).length||delete t[n])}}});var v3=ye((Rrr,Zee)=>{"use strict";function Gtt(e,t){var r=e%t;return r<0?r+t:r}function Htt(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Zee.exports={mod:Gtt,modHalf:Htt}});var fd=ye((Drr,M6)=>{(function(e){var t=/^\s+/,r=/\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function l(me,Pe){if(me=me||"",Pe=Pe||{},me instanceof l)return me;if(!(this instanceof l))return new l(me,Pe);var ce=u(me);this._originalInput=me,this._r=ce.r,this._g=ce.g,this._b=ce.b,this._a=ce.a,this._roundA=i(100*this._a)/100,this._format=Pe.format||ce.format,this._gradientType=Pe.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=ce.ok,this._tc_id=n++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var me=this.toRgb();return(me.r*299+me.g*587+me.b*114)/1e3},getLuminance:function(){var me=this.toRgb(),Pe,ce,He,lt,mt,Vt;return Pe=me.r/255,ce=me.g/255,He=me.b/255,Pe<=.03928?lt=Pe/12.92:lt=e.pow((Pe+.055)/1.055,2.4),ce<=.03928?mt=ce/12.92:mt=e.pow((ce+.055)/1.055,2.4),He<=.03928?Vt=He/12.92:Vt=e.pow((He+.055)/1.055,2.4),.2126*lt+.7152*mt+.0722*Vt},setAlpha:function(me){return this._a=N(me),this._roundA=i(100*this._a)/100,this},toHsv:function(){var me=d(this._r,this._g,this._b);return{h:me.h*360,s:me.s,v:me.v,a:this._a}},toHsvString:function(){var me=d(this._r,this._g,this._b),Pe=i(me.h*360),ce=i(me.s*100),He=i(me.v*100);return this._a==1?"hsv("+Pe+", "+ce+"%, "+He+"%)":"hsva("+Pe+", "+ce+"%, "+He+"%, "+this._roundA+")"},toHsl:function(){var me=f(this._r,this._g,this._b);return{h:me.h*360,s:me.s,l:me.l,a:this._a}},toHslString:function(){var me=f(this._r,this._g,this._b),Pe=i(me.h*360),ce=i(me.s*100),He=i(me.l*100);return this._a==1?"hsl("+Pe+", "+ce+"%, "+He+"%)":"hsla("+Pe+", "+ce+"%, "+He+"%, "+this._roundA+")"},toHex:function(me){return m(this._r,this._g,this._b,me)},toHexString:function(me){return"#"+this.toHex(me)},toHex8:function(me){return b(this._r,this._g,this._b,this._a,me)},toHex8String:function(me){return"#"+this.toHex8(me)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(H(this._r,255)*100)+"%",g:i(H(this._g,255)*100)+"%",b:i(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(H(this._r,255)*100)+"%, "+i(H(this._g,255)*100)+"%, "+i(H(this._b,255)*100)+"%)":"rgba("+i(H(this._r,255)*100)+"%, "+i(H(this._g,255)*100)+"%, "+i(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Z[m(this._r,this._g,this._b,!0)]||!1},toFilter:function(me){var Pe="#"+p(this._r,this._g,this._b,this._a),ce=Pe,He=this._gradientType?"GradientType = 1, ":"";if(me){var lt=l(me);ce="#"+p(lt._r,lt._g,lt._b,lt._a)}return"progid:DXImageTransform.Microsoft.gradient("+He+"startColorstr="+Pe+",endColorstr="+ce+")"},toString:function(me){var Pe=!!me;me=me||this._format;var ce=!1,He=this._a<1&&this._a>=0,lt=!Pe&&He&&(me==="hex"||me==="hex6"||me==="hex3"||me==="hex4"||me==="hex8"||me==="name");return lt?me==="name"&&this._a===0?this.toName():this.toRgbString():(me==="rgb"&&(ce=this.toRgbString()),me==="prgb"&&(ce=this.toPercentageRgbString()),(me==="hex"||me==="hex6")&&(ce=this.toHexString()),me==="hex3"&&(ce=this.toHexString(!0)),me==="hex4"&&(ce=this.toHex8String(!0)),me==="hex8"&&(ce=this.toHex8String()),me==="name"&&(ce=this.toName()),me==="hsl"&&(ce=this.toHslString()),me==="hsv"&&(ce=this.toHsvString()),ce||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(me,Pe){var ce=me.apply(null,[this].concat([].slice.call(Pe)));return this._r=ce._r,this._g=ce._g,this._b=ce._b,this.setAlpha(ce._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(k,arguments)},saturate:function(){return this._applyModification(M,arguments)},greyscale:function(){return this._applyModification(T,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(me,Pe){return me.apply(null,[this].concat([].slice.call(Pe)))},analogous:function(){return this._applyCombination(q,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(U,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},l.fromRatio=function(me,Pe){if(typeof me=="object"){var ce={};for(var He in me)me.hasOwnProperty(He)&&(He==="a"?ce[He]=me[He]:ce[He]=ge(me[He]));me=ce}return l(me,Pe)};function u(me){var Pe={r:0,g:0,b:0},ce=1,He=null,lt=null,mt=null,Vt=!1,st=!1;return typeof me=="string"&&(me=De(me)),typeof me=="object"&&(we(me.r)&&we(me.g)&&we(me.b)?(Pe=c(me.r,me.g,me.b),Vt=!0,st=String(me.r).substr(-1)==="%"?"prgb":"rgb"):we(me.h)&&we(me.s)&&we(me.v)?(He=ge(me.s),lt=ge(me.v),Pe=v(me.h,He,lt),Vt=!0,st="hsv"):we(me.h)&&we(me.s)&&we(me.l)&&(He=ge(me.s),mt=ge(me.l),Pe=h(me.h,He,mt),Vt=!0,st="hsl"),me.hasOwnProperty("a")&&(ce=me.a)),ce=N(ce),{ok:Vt,format:me.format||st,r:a(255,o(Pe.r,0)),g:a(255,o(Pe.g,0)),b:a(255,o(Pe.b,0)),a:ce}}function c(me,Pe,ce){return{r:H(me,255)*255,g:H(Pe,255)*255,b:H(ce,255)*255}}function f(me,Pe,ce){me=H(me,255),Pe=H(Pe,255),ce=H(ce,255);var He=o(me,Pe,ce),lt=a(me,Pe,ce),mt,Vt,st=(He+lt)/2;if(He==lt)mt=Vt=0;else{var ct=He-lt;switch(Vt=st>.5?ct/(2-He-lt):ct/(He+lt),He){case me:mt=(Pe-ce)/ct+(Pe<ce?6:0);break;case Pe:mt=(ce-me)/ct+2;break;case ce:mt=(me-Pe)/ct+4;break}mt/=6}return{h:mt,s:Vt,l:st}}function h(me,Pe,ce){var He,lt,mt;me=H(me,360),Pe=H(Pe,100),ce=H(ce,100);function Vt(Qt,Ht,nr){return nr<0&&(nr+=1),nr>1&&(nr-=1),nr<1/6?Qt+(Ht-Qt)*6*nr:nr<1/2?Ht:nr<2/3?Qt+(Ht-Qt)*(2/3-nr)*6:Qt}if(Pe===0)He=lt=mt=ce;else{var st=ce<.5?ce*(1+Pe):ce+Pe-ce*Pe,ct=2*ce-st;He=Vt(ct,st,me+1/3),lt=Vt(ct,st,me),mt=Vt(ct,st,me-1/3)}return{r:He*255,g:lt*255,b:mt*255}}function d(me,Pe,ce){me=H(me,255),Pe=H(Pe,255),ce=H(ce,255);var He=o(me,Pe,ce),lt=a(me,Pe,ce),mt,Vt,st=He,ct=He-lt;if(Vt=He===0?0:ct/He,He==lt)mt=0;else{switch(He){case me:mt=(Pe-ce)/ct+(Pe<ce?6:0);break;case Pe:mt=(ce-me)/ct+2;break;case ce:mt=(me-Pe)/ct+4;break}mt/=6}return{h:mt,s:Vt,v:st}}function v(me,Pe,ce){me=H(me,360)*6,Pe=H(Pe,100),ce=H(ce,100);var He=e.floor(me),lt=me-He,mt=ce*(1-Pe),Vt=ce*(1-lt*Pe),st=ce*(1-(1-lt)*Pe),ct=He%6,Qt=[ce,Vt,mt,mt,st,ce][ct],Ht=[st,ce,ce,Vt,mt,mt][ct],nr=[mt,mt,st,ce,ce,Vt][ct];return{r:Qt*255,g:Ht*255,b:nr*255}}function m(me,Pe,ce,He){var lt=[Ce(i(me).toString(16)),Ce(i(Pe).toString(16)),Ce(i(ce).toString(16))];return He&<[0].charAt(0)==lt[0].charAt(1)&<[1].charAt(0)==lt[1].charAt(1)&<[2].charAt(0)==lt[2].charAt(1)?lt[0].charAt(0)+lt[1].charAt(0)+lt[2].charAt(0):lt.join("")}function b(me,Pe,ce,He,lt){var mt=[Ce(i(me).toString(16)),Ce(i(Pe).toString(16)),Ce(i(ce).toString(16)),Ce(ie(He))];return lt&&mt[0].charAt(0)==mt[0].charAt(1)&&mt[1].charAt(0)==mt[1].charAt(1)&&mt[2].charAt(0)==mt[2].charAt(1)&&mt[3].charAt(0)==mt[3].charAt(1)?mt[0].charAt(0)+mt[1].charAt(0)+mt[2].charAt(0)+mt[3].charAt(0):mt.join("")}function p(me,Pe,ce,He){var lt=[Ce(ie(He)),Ce(i(me).toString(16)),Ce(i(Pe).toString(16)),Ce(i(ce).toString(16))];return lt.join("")}l.equals=function(me,Pe){return!me||!Pe?!1:l(me).toRgbString()==l(Pe).toRgbString()},l.random=function(){return l.fromRatio({r:s(),g:s(),b:s()})};function k(me,Pe){Pe=Pe===0?0:Pe||10;var ce=l(me).toHsl();return ce.s-=Pe/100,ce.s=re(ce.s),l(ce)}function M(me,Pe){Pe=Pe===0?0:Pe||10;var ce=l(me).toHsl();return ce.s+=Pe/100,ce.s=re(ce.s),l(ce)}function T(me){return l(me).desaturate(100)}function L(me,Pe){Pe=Pe===0?0:Pe||10;var ce=l(me).toHsl();return ce.l+=Pe/100,ce.l=re(ce.l),l(ce)}function x(me,Pe){Pe=Pe===0?0:Pe||10;var ce=l(me).toRgb();return ce.r=o(0,a(255,ce.r-i(255*-(Pe/100)))),ce.g=o(0,a(255,ce.g-i(255*-(Pe/100)))),ce.b=o(0,a(255,ce.b-i(255*-(Pe/100)))),l(ce)}function C(me,Pe){Pe=Pe===0?0:Pe||10;var ce=l(me).toHsl();return ce.l-=Pe/100,ce.l=re(ce.l),l(ce)}function S(me,Pe){var ce=l(me).toHsl(),He=(ce.h+Pe)%360;return ce.h=He<0?360+He:He,l(ce)}function g(me){var Pe=l(me).toHsl();return Pe.h=(Pe.h+180)%360,l(Pe)}function P(me){var Pe=l(me).toHsl(),ce=Pe.h;return[l(me),l({h:(ce+120)%360,s:Pe.s,l:Pe.l}),l({h:(ce+240)%360,s:Pe.s,l:Pe.l})]}function E(me){var Pe=l(me).toHsl(),ce=Pe.h;return[l(me),l({h:(ce+90)%360,s:Pe.s,l:Pe.l}),l({h:(ce+180)%360,s:Pe.s,l:Pe.l}),l({h:(ce+270)%360,s:Pe.s,l:Pe.l})]}function z(me){var Pe=l(me).toHsl(),ce=Pe.h;return[l(me),l({h:(ce+72)%360,s:Pe.s,l:Pe.l}),l({h:(ce+216)%360,s:Pe.s,l:Pe.l})]}function q(me,Pe,ce){Pe=Pe||6,ce=ce||30;var He=l(me).toHsl(),lt=360/ce,mt=[l(me)];for(He.h=(He.h-(lt*Pe>>1)+720)%360;--Pe;)He.h=(He.h+lt)%360,mt.push(l(He));return mt}function U(me,Pe){Pe=Pe||6;for(var ce=l(me).toHsv(),He=ce.h,lt=ce.s,mt=ce.v,Vt=[],st=1/Pe;Pe--;)Vt.push(l({h:He,s:lt,v:mt})),mt=(mt+st)%1;return Vt}l.mix=function(me,Pe,ce){ce=ce===0?0:ce||50;var He=l(me).toRgb(),lt=l(Pe).toRgb(),mt=ce/100,Vt={r:(lt.r-He.r)*mt+He.r,g:(lt.g-He.g)*mt+He.g,b:(lt.b-He.b)*mt+He.b,a:(lt.a-He.a)*mt+He.a};return l(Vt)},l.readability=function(me,Pe){var ce=l(me),He=l(Pe);return(e.max(ce.getLuminance(),He.getLuminance())+.05)/(e.min(ce.getLuminance(),He.getLuminance())+.05)},l.isReadable=function(me,Pe,ce){var He=l.readability(me,Pe),lt,mt;switch(mt=!1,lt=Le(ce),lt.level+lt.size){case"AAsmall":case"AAAlarge":mt=He>=4.5;break;case"AAlarge":mt=He>=3;break;case"AAAsmall":mt=He>=7;break}return mt},l.mostReadable=function(me,Pe,ce){var He=null,lt=0,mt,Vt,st,ct;ce=ce||{},Vt=ce.includeFallbackColors,st=ce.level,ct=ce.size;for(var Qt=0;Qt<Pe.length;Qt++)mt=l.readability(me,Pe[Qt]),mt>lt&&(lt=mt,He=l(Pe[Qt]));return l.isReadable(me,He,{level:st,size:ct})||!Vt?He:(ce.includeFallbackColors=!1,l.mostReadable(me,["#fff","#000"],ce))};var G=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Z=l.hexNames=j(G);function j(me){var Pe={};for(var ce in me)me.hasOwnProperty(ce)&&(Pe[me[ce]]=ce);return Pe}function N(me){return me=parseFloat(me),(isNaN(me)||me<0||me>1)&&(me=1),me}function H(me,Pe){_e(me)&&(me="100%");var ce=ke(me);return me=a(Pe,o(0,parseFloat(me))),ce&&(me=parseInt(me*Pe,10)/100),e.abs(me-Pe)<1e-6?1:me%Pe/parseFloat(Pe)}function re(me){return a(1,o(0,me))}function oe(me){return parseInt(me,16)}function _e(me){return typeof me=="string"&&me.indexOf(".")!=-1&&parseFloat(me)===1}function ke(me){return typeof me=="string"&&me.indexOf("%")!=-1}function Ce(me){return me.length==1?"0"+me:""+me}function ge(me){return me<=1&&(me=me*100+"%"),me}function ie(me){return e.round(parseFloat(me)*255).toString(16)}function Se(me){return oe(me)/255}var Ee=function(){var me="[-\\+]?\\d+%?",Pe="[-\\+]?\\d*\\.\\d+%?",ce="(?:"+Pe+")|(?:"+me+")",He="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?",lt="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?";return{CSS_UNIT:new RegExp(ce),rgb:new RegExp("rgb"+He),rgba:new RegExp("rgba"+lt),hsl:new RegExp("hsl"+He),hsla:new RegExp("hsla"+lt),hsv:new RegExp("hsv"+He),hsva:new RegExp("hsva"+lt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function we(me){return!!Ee.CSS_UNIT.exec(me)}function De(me){me=me.replace(t,"").replace(r,"").toLowerCase();var Pe=!1;if(G[me])me=G[me],Pe=!0;else if(me=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ce;return(ce=Ee.rgb.exec(me))?{r:ce[1],g:ce[2],b:ce[3]}:(ce=Ee.rgba.exec(me))?{r:ce[1],g:ce[2],b:ce[3],a:ce[4]}:(ce=Ee.hsl.exec(me))?{h:ce[1],s:ce[2],l:ce[3]}:(ce=Ee.hsla.exec(me))?{h:ce[1],s:ce[2],l:ce[3],a:ce[4]}:(ce=Ee.hsv.exec(me))?{h:ce[1],s:ce[2],v:ce[3]}:(ce=Ee.hsva.exec(me))?{h:ce[1],s:ce[2],v:ce[3],a:ce[4]}:(ce=Ee.hex8.exec(me))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),a:Se(ce[4]),format:Pe?"name":"hex8"}:(ce=Ee.hex6.exec(me))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),format:Pe?"name":"hex"}:(ce=Ee.hex4.exec(me))?{r:oe(ce[1]+""+ce[1]),g:oe(ce[2]+""+ce[2]),b:oe(ce[3]+""+ce[3]),a:Se(ce[4]+""+ce[4]),format:Pe?"name":"hex8"}:(ce=Ee.hex3.exec(me))?{r:oe(ce[1]+""+ce[1]),g:oe(ce[2]+""+ce[2]),b:oe(ce[3]+""+ce[3]),format:Pe?"name":"hex"}:!1}function Le(me){var Pe,ce;return me=me||{level:"AA",size:"small"},Pe=(me.level||"AA").toUpperCase(),ce=(me.size||"small").toLowerCase(),Pe!=="AA"&&Pe!=="AAA"&&(Pe="AA"),ce!=="small"&&ce!=="large"&&(ce="small"),{level:Pe,size:ce}}typeof M6!="undefined"&&M6.exports?M6.exports=l:window.tinycolor=l})(Math)});var Ao=ye(BS=>{"use strict";var Yee=Ty(),qS=Array.isArray;function jtt(e,t){var r,n;for(r=0;r<e.length;r++){if(n=e[r],n!==null&&typeof n=="object")return!1;n!==void 0&&(t[r]=n)}return!0}BS.extendFlat=function(){return OS(arguments,!1,!1,!1)};BS.extendDeep=function(){return OS(arguments,!0,!1,!1)};BS.extendDeepAll=function(){return OS(arguments,!0,!0,!1)};BS.extendDeepNoArrays=function(){return OS(arguments,!0,!1,!0)};function OS(e,t,r,n){var i=e[0],a=e.length,o,s,l,u,c,f,h;if(a===2&&qS(i)&&qS(e[1])&&i.length===0){if(h=jtt(e[1],i),h)return i;i.splice(0,i.length)}for(var d=1;d<a;d++){o=e[d];for(s in o)l=i[s],u=o[s],n&&qS(u)?i[s]=u:t&&u&&(Yee(u)||(c=qS(u)))?(c?(c=!1,f=l&&qS(l)?l:[]):f=l&&Yee(l)?l:{},i[s]=OS([f,u],t,r,n)):(typeof u!="undefined"||r)&&(i[s]=u)}return i}});var ec=ye((zrr,Kee)=>{"use strict";Kee.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}});var NS=ye((qrr,Jee)=>{"use strict";Jee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var W1=ye((Orr,ete)=>{"use strict";var $ee=NS(),Qee=ec(),Iq=Qee({editType:"none"});Iq.family.dflt=$ee.HOVERFONT;Iq.size.dflt=$ee.HOVERFONTSIZE;ete.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,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:Iq,grouptitlefont:Qee({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var p3=ye((Brr,tte)=>{"use strict";var Wtt=ec(),US=W1().hoverlabel,VS=Ao().extendFlat;tte.exports={hoverlabel:{bgcolor:VS({},US.bgcolor,{arrayOk:!0}),bordercolor:VS({},US.bordercolor,{arrayOk:!0}),font:Wtt({arrayOk:!0,editType:"none"}),align:VS({},US.align,{arrayOk:!0}),namelength:VS({},US.namelength,{arrayOk:!0}),showarrow:VS({},US.showarrow),editType:"none"}}});var Gl=ye((Nrr,rte)=>{"use strict";var Xtt=ec(),Ztt=p3();rte.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:Xtt({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:Ztt.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}});var mb=ye((Urr,ate)=>{"use strict";var Ytt=fd(),E6={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},ite=E6.RdBu;function Ktt(e,t){if(t||(t=ite),!e)return t;function r(){try{e=E6[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),nte(e)?e:t}function nte(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r<e.length;r++){var n=e[r];if(n.length!==2||+n[0]<t||!Ytt(n[1]).isValid())return!1;t=+n[0]}return!0}function Jtt(e){return E6[e]!==void 0?!0:nte(e)}ate.exports={scales:E6,defaultScale:ite,get:Ktt,isValid:Jtt}});var Ih=ye(yb=>{"use strict";yb.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];yb.defaultLine="#444";yb.lightLine="#eee";yb.background="#fff";yb.borderLine="#BEC8D9";yb.lightFraction=100*10/11});var ka=ye((Grr,ote)=>{"use strict";var wp=fd(),$tt=Eo(),Qtt=vv().isTypedArray,hd=ote.exports={},k6=Ih();hd.defaults=k6.defaults;var ert=hd.defaultLine=k6.defaultLine;hd.lightLine=k6.lightLine;var Dq=hd.background=k6.background;hd.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"};hd.rgb=function(e){return hd.tinyRGB(wp(e))};hd.opacity=function(e){return e?wp(e).getAlpha():0};hd.addOpacity=function(e,t){var r=wp(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};hd.combine=function(e,t){var r=wp(e).toRgb();if(r.a===1)return wp(e).toRgbString();var n=wp(t||Dq).toRgb(),i=n.a===1?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},a={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return wp(a).toRgbString()};hd.interpolate=function(e,t,r){var n=wp(e).toRgb(),i=wp(t).toRgb(),a={r:r*n.r+(1-r)*i.r,g:r*n.g+(1-r)*i.g,b:r*n.b+(1-r)*i.b};return wp(a).toRgbString()};hd.contrast=function(e,t,r){var n=wp(e);n.getAlpha()!==1&&(n=wp(hd.combine(e,Dq)));var i=n.isDark()?t?n.lighten(t):Dq:r?n.darken(r):ert;return i.toString()};hd.stroke=function(e,t){var r=wp(t);e.style({stroke:hd.tinyRGB(r),"stroke-opacity":r.getAlpha()})};hd.fill=function(e,t){var r=wp(t);e.style({fill:hd.tinyRGB(r),"fill-opacity":r.getAlpha()})};hd.clean=function(e){if(!(!e||typeof e!="object")){var t=Object.keys(e),r,n,i,a;for(r=0;r<t.length;r++)if(i=t[r],a=e[i],i.slice(-5)==="color")if(Array.isArray(a))for(n=0;n<a.length;n++)a[n]=Rq(a[n]);else e[i]=Rq(a);else if(i.slice(-10)==="colorscale"&&Array.isArray(a))for(n=0;n<a.length;n++)Array.isArray(a[n])&&(a[n][1]=Rq(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"&&!Qtt(a)&&hd.clean(a)}};function Rq(e){if($tt(e)||typeof e!="string")return e;var t=e.trim();if(t.slice(0,3)!=="rgb")return e;var r=t.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return e;var n=r[1].trim().split(/\s*[\s,]\s*/),i=t.charAt(3)==="a"&&n.length===4;if(!i&&n.length!==3)return e;for(var a=0;a<n.length;a++){if(!n[a].length||(n[a]=Number(n[a]),!(n[a]>=0)))return e;if(a===3)n[a]>1&&(n[a]=1);else if(n[a]>=1)return e}var o=Math.round(n[0]*255)+", "+Math.round(n[1]*255)+", "+Math.round(n[2]*255);return i?"rgba("+o+", "+n[3]+")":"rgb("+o+")"}});var X1=ye((Hrr,ste)=>{"use strict";ste.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var g3=ye(lte=>{"use strict";lte.counter=function(e,t,r,n){var i=(t||"")+(r?"":"$"),a=n===!1?"":"^";return e==="xy"?new RegExp(a+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(a+e+"([2-9]|[1-9][0-9]+)?"+i)}});var hte=ye(Tp=>{"use strict";var Fq=Eo(),ute=fd(),cte=Ao().extendFlat,trt=Gl(),rrt=mb(),irt=ka(),nrt=X1().DESELECTDIM,m3=FS(),fte=g3().counter,art=v3().modHalf,bg=vv().isArrayOrTypedArray,Z1=vv().isTypedArraySpec,Y1=vv().decodeTypedArraySpec;Tp.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(bg(e)?e:Z1(e)?Y1(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;n<r.length;n++){var i=String(r[n]);if(i.charAt(0)==="/"&&i.charAt(i.length-1)==="/"){var a=new RegExp(i.slice(1,-1));if(a.test(e))return!0}else if(e===r[n])return!0}return!1}},boolean:{coerceFunction:function(e,t,r,n){let i=a=>a===!0||a===!1;i(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){Z1(e)&&(e=Y1(e)),!Fq(e)||n.min!==void 0&&e<n.min||n.max!==void 0&&e>n.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}Z1(e)&&(e=Y1(e)),e%1||!Fq(e)||n.min!==void 0&&e<n.min||n.max!==void 0&&e>n.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!="string"){var i=typeof e=="number";n.strict===!0||!i?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){Z1(e)&&(e=Y1(e)),ute(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return ute(i).isValid()}!Array.isArray(e)||!e.length?t.set(r):e.every(n)?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(rrt.get(e,r))}},angle:{coerceFunction:function(e,t,r){Z1(e)&&(e=Y1(e)),e==="auto"?t.set("auto"):Fq(e)?t.set(art(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||fte(r);let a=o=>typeof o=="string"&&i.test(o);a(e)||n.arrayOk&&bg(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!fte(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var i=e.split("+"),a=0;a<i.length;){var o=i[a];n.flags.indexOf(o)===-1||i.indexOf(o)<a?i.splice(a,1):a++}i.length?t.set(i.join("+")):t.set(r)}},any:{coerceFunction:function(e,t,r){e===void 0?t.set(r):t.set(Z1(e)?Y1(e):e)}},info_array:{coerceFunction:function(e,t,r,n){function i(k,M,T){var L,x={set:function(C){L=C}};return T===void 0&&(T=M.dflt),Tp.valObjectMeta[M.valType].coerceFunction(k,x,T,M),L}if(Z1(e)&&(e=Y1(e)),!bg(e)){t.set(r);return}var a=n.dimensions===2||n.dimensions==="1-2"&&Array.isArray(e)&&bg(e[0]),o=n.items,s=[],l=Array.isArray(o),u=l&&a&&bg(o[0]),c=a&&l&&!u,f=l&&!c?o.length:e.length,h,d,v,m,b,p;if(r=Array.isArray(r)?r:[],a)for(h=0;h<f;h++)for(s[h]=[],v=bg(e[h])?e[h]:[],c?b=o.length:l?b=o[h].length:b=v.length,d=0;d<b;d++)c?m=o[d]:l?m=o[h][d]:m=o,p=i(v[d],m,(r[h]||[])[d]),p!==void 0&&(s[h][d]=p);else for(h=0;h<f;h++)p=i(e[h],l?o[h]:o,r[h]),p!==void 0&&(s[h]=p);t.set(s)},validateFunction:function(e,t){if(!bg(e))return!1;var r=t.items,n=Array.isArray(r),i=t.dimensions===2;if(!t.freeLength&&e.length!==r.length)return!1;for(var a=0;a<e.length;a++)if(i){if(!bg(e[a])||!t.freeLength&&e[a].length!==r[a].length)return!1;for(var o=0;o<e[a].length;o++)if(!C6(e[a][o],n?r[a][o]:r))return!1}else if(!C6(e[a],n?r[a]:r))return!1;return!0}}};Tp.coerce=function(e,t,r,n,i){var a=m3(r,n).get(),o=m3(e,n),s=m3(t,n),l=o.get(),u=t._template;if(l===void 0&&u&&(l=m3(u,n).get(),u=0),i===void 0&&(i=a.dflt),a.arrayOk){if(bg(l))return s.set(l),l;if(Z1(l))return l=Y1(l),s.set(l),l}var c=Tp.valObjectMeta[a.valType].coerceFunction;c(l,s,i,a);var f=s.get();return u&&f===i&&!C6(l,a)&&(l=m3(u,n).get(),c(l,s,i,a),f=s.get()),f};Tp.coerce2=function(e,t,r,n,i){var a=m3(e,n),o=Tp.coerce(e,t,r,n,i),s=a.get();return s!=null?o:!1};Tp.coerceFont=function(e,t,r,n){n||(n={}),r=cte({},r),r=cte(r,n.overrideDflt||{});var i={family:e(t+".family",r.family),size:e(t+".size",r.size),color:e(t+".color",r.color),weight:e(t+".weight",r.weight),style:e(t+".style",r.style)};if(n.noFontVariant||(i.variant=e(t+".variant",r.variant)),n.noFontLineposition||(i.lineposition=e(t+".lineposition",r.lineposition)),n.noFontTextcase||(i.textcase=e(t+".textcase",r.textcase)),!n.noFontShadow){var a=r.shadow;a==="none"&&n.autoShadowDflt&&(a="auto"),i.shadow=e(t+".shadow",a)}return i};Tp.coercePattern=function(e,t,r,n){var i=e(t+".shape"),a;if(i||(a=e(t+".path")),i||a){i&&e(t+".solidity"),e(t+".size");var o=e(t+".fillmode"),s=o==="overlay";if(!n){var l=e(t+".bgcolor",s?r:void 0);e(t+".fgcolor",s?irt.contrast(l):r)}e(t+".fgopacity",s?.5:1)}};Tp.coerceHoverinfo=function(e,t,r){var n=t._module.attributes,i=n.hoverinfo?n:trt,a=i.hoverinfo,o;if(r._dataLength===1){var s=a.dflt==="all"?a.flags.slice():a.dflt.split("+");s.splice(s.indexOf("name"),1),o=s.join("+")}return Tp.coerce(e,t,i,"hoverinfo",o)};Tp.coerceSelectionMarkerOpacity=function(e,t){if(e.marker){var r=e.marker.opacity;if(r!==void 0){var n,i;!bg(r)&&!e.selected&&!e.unselected&&(n=r,i=nrt*r),t("selected.marker.opacity",n),t("unselected.marker.opacity",i)}}};function C6(e,t){var r=Tp.valObjectMeta[t.valType];if(t.arrayOk&&bg(e))return!0;if(r.validateFunction)return r.validateFunction(e,t);var n={},i=n,a={set:function(o){i=o}};return r.coerceFunction(e,a,n,t),i!==n}Tp.validate=C6});var _b=ye((Xrr,gte)=>{"use strict";var dte={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},vte={};function pte(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),pte(n,t[r]))}}pte(dte,vte);gte.exports={configAttributes:dte,dfltConfig:vte}});var qq=ye((Zrr,mte)=>{"use strict";var zq=qa(),ort=Eo(),GS=[];mte.exports=function(e,t,r){var s;if(((s=r==null?void 0:r._context)==null?void 0:s.displayNotifier)===!1||GS.indexOf(e)!==-1)return;GS.push(e);var n=1e3;ort(t)?n=t:t==="long"&&(n=3e3);var i=zq.select("body").selectAll(".plotly-notifier").data([0]);i.enter().append("div").classed("plotly-notifier",!0);var a=i.selectAll(".notifier-note").data(GS);function o(l){l.duration(700).style("opacity",0).each("end",function(u){var c=GS.indexOf(u);c!==-1&&GS.splice(c,1),zq.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=zq.select(this);u.append("button").classed("notifier-close",!0).html("×").on("click",function(){u.transition().call(o)});for(var c=u.append("p"),f=l.split(/<br\s*\/?>/g),h=0;h<f.length;h++)h&&c.append("br"),c.append("span").text(f[h]);t==="stick"?u.transition().duration(350).style("opacity",1):u.transition().duration(700).style("opacity",1).transition().delay(n).call(o)})}});var K1=ye((Yrr,yte)=>{"use strict";var y3=_b().dfltConfig,Oq=qq(),Bq=yte.exports={};Bq.log=function(){var e;if(y3.logging>1){var t=["LOG:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(y3.notifyOnLogging>1){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);Oq(r.join("<br>"),"long")}};Bq.warn=function(){var e;if(y3.logging>0){var t=["WARN:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(y3.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);Oq(r.join("<br>"),"stick")}};Bq.error=function(){var e;if(y3.logging>0){var t=["ERROR:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.error.apply(console,t)}if(y3.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);Oq(r.join("<br>"),"stick")}}});var L6=ye((Krr,_te)=>{"use strict";_te.exports=function(){}});var Nq=ye((Jrr,xte)=>{"use strict";xte.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),i=0;i<t.length;i++)if(t[i]instanceof RegExp&&t[i].toString()===n)return t;t.push(r)}else(r||r===0)&&t.indexOf(r)===-1&&t.push(r);return t}});var wte=ye(($rr,bte)=>{bte.exports=srt;function srt(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Ate=ye((Qrr,Tte)=>{Tte.exports=lrt;function lrt(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}});var Mte=ye((eir,Ste)=>{Ste.exports=urt;function urt(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 Uq=ye((tir,Ete)=>{Ete.exports=crt;function crt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Cte=ye((rir,kte)=>{kte.exports=frt;function frt(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var Pte=ye((iir,Lte)=>{Lte.exports=hrt;function hrt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],m=t[13],b=t[14],p=t[15],k=r*s-n*o,M=r*l-i*o,T=r*u-a*o,L=n*l-i*s,x=n*u-a*s,C=i*u-a*l,S=c*m-f*v,g=c*b-h*v,P=c*p-d*v,E=f*b-h*m,z=f*p-d*m,q=h*p-d*b,U=k*q-M*z+T*E+L*P-x*g+C*S;return U?(U=1/U,e[0]=(s*q-l*z+u*E)*U,e[1]=(i*z-n*q-a*E)*U,e[2]=(m*C-b*x+p*L)*U,e[3]=(h*x-f*C-d*L)*U,e[4]=(l*P-o*q-u*g)*U,e[5]=(r*q-i*P+a*g)*U,e[6]=(b*T-v*C-p*M)*U,e[7]=(c*C-h*T+d*M)*U,e[8]=(o*z-s*P+u*S)*U,e[9]=(n*P-r*z-a*S)*U,e[10]=(v*x-m*T+p*k)*U,e[11]=(f*T-c*x-d*k)*U,e[12]=(s*g-o*E-l*S)*U,e[13]=(r*E-n*g+i*S)*U,e[14]=(m*M-v*L-b*k)*U,e[15]=(c*L-f*M+h*k)*U,e):null}});var Rte=ye((nir,Ite)=>{Ite.exports=drt;function drt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],m=t[13],b=t[14],p=t[15];return e[0]=s*(h*p-d*b)-f*(l*p-u*b)+m*(l*d-u*h),e[1]=-(n*(h*p-d*b)-f*(i*p-a*b)+m*(i*d-a*h)),e[2]=n*(l*p-u*b)-s*(i*p-a*b)+m*(i*u-a*l),e[3]=-(n*(l*d-u*h)-s*(i*d-a*h)+f*(i*u-a*l)),e[4]=-(o*(h*p-d*b)-c*(l*p-u*b)+v*(l*d-u*h)),e[5]=r*(h*p-d*b)-c*(i*p-a*b)+v*(i*d-a*h),e[6]=-(r*(l*p-u*b)-o*(i*p-a*b)+v*(i*u-a*l)),e[7]=r*(l*d-u*h)-o*(i*d-a*h)+c*(i*u-a*l),e[8]=o*(f*p-d*m)-c*(s*p-u*m)+v*(s*d-u*f),e[9]=-(r*(f*p-d*m)-c*(n*p-a*m)+v*(n*d-a*f)),e[10]=r*(s*p-u*m)-o*(n*p-a*m)+v*(n*u-a*s),e[11]=-(r*(s*d-u*f)-o*(n*d-a*f)+c*(n*u-a*s)),e[12]=-(o*(f*b-h*m)-c*(s*b-l*m)+v*(s*h-l*f)),e[13]=r*(f*b-h*m)-c*(n*b-i*m)+v*(n*h-i*f),e[14]=-(r*(s*b-l*m)-o*(n*b-i*m)+v*(n*l-i*s)),e[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),e}});var Fte=ye((air,Dte)=>{Dte.exports=vrt;function vrt(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11],d=e[12],v=e[13],m=e[14],b=e[15],p=t*o-r*a,k=t*s-n*a,M=t*l-i*a,T=r*s-n*o,L=r*l-i*o,x=n*l-i*s,C=u*v-c*d,S=u*m-f*d,g=u*b-h*d,P=c*m-f*v,E=c*b-h*v,z=f*b-h*m;return p*z-k*E+M*P+T*g-L*S+x*C}});var qte=ye((oir,zte)=>{zte.exports=prt;function prt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],d=t[10],v=t[11],m=t[12],b=t[13],p=t[14],k=t[15],M=r[0],T=r[1],L=r[2],x=r[3];return e[0]=M*n+T*s+L*f+x*m,e[1]=M*i+T*l+L*h+x*b,e[2]=M*a+T*u+L*d+x*p,e[3]=M*o+T*c+L*v+x*k,M=r[4],T=r[5],L=r[6],x=r[7],e[4]=M*n+T*s+L*f+x*m,e[5]=M*i+T*l+L*h+x*b,e[6]=M*a+T*u+L*d+x*p,e[7]=M*o+T*c+L*v+x*k,M=r[8],T=r[9],L=r[10],x=r[11],e[8]=M*n+T*s+L*f+x*m,e[9]=M*i+T*l+L*h+x*b,e[10]=M*a+T*u+L*d+x*p,e[11]=M*o+T*c+L*v+x*k,M=r[12],T=r[13],L=r[14],x=r[15],e[12]=M*n+T*s+L*f+x*m,e[13]=M*i+T*l+L*h+x*b,e[14]=M*a+T*u+L*d+x*p,e[15]=M*o+T*c+L*v+x*k,e}});var Bte=ye((sir,Ote)=>{Ote.exports=grt;function grt(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,l,u,c,f,h,d,v,m,b,p;return t===e?(e[12]=t[0]*n+t[4]*i+t[8]*a+t[12],e[13]=t[1]*n+t[5]*i+t[9]*a+t[13],e[14]=t[2]*n+t[6]*i+t[10]*a+t[14],e[15]=t[3]*n+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],d=t[7],v=t[8],m=t[9],b=t[10],p=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=v,e[9]=m,e[10]=b,e[11]=p,e[12]=o*n+c*i+v*a+t[12],e[13]=s*n+f*i+m*a+t[13],e[14]=l*n+h*i+b*a+t[14],e[15]=u*n+d*i+p*a+t[15]),e}});var Ute=ye((lir,Nte)=>{Nte.exports=mrt;function mrt(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var Gte=ye((uir,Vte)=>{Vte.exports=yrt;function yrt(e,t,r,n){var i=n[0],a=n[1],o=n[2],s=Math.sqrt(i*i+a*a+o*o),l,u,c,f,h,d,v,m,b,p,k,M,T,L,x,C,S,g,P,E,z,q,U,G;return Math.abs(s)<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],h=t[1],d=t[2],v=t[3],m=t[4],b=t[5],p=t[6],k=t[7],M=t[8],T=t[9],L=t[10],x=t[11],C=i*i*c+u,S=a*i*c+o*l,g=o*i*c-a*l,P=i*a*c-o*l,E=a*a*c+u,z=o*a*c+i*l,q=i*o*c+a*l,U=a*o*c-i*l,G=o*o*c+u,e[0]=f*C+m*S+M*g,e[1]=h*C+b*S+T*g,e[2]=d*C+p*S+L*g,e[3]=v*C+k*S+x*g,e[4]=f*P+m*E+M*z,e[5]=h*P+b*E+T*z,e[6]=d*P+p*E+L*z,e[7]=v*P+k*E+x*z,e[8]=f*q+m*U+M*G,e[9]=h*q+b*U+T*G,e[10]=d*q+p*U+L*G,e[11]=v*q+k*U+x*G,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var jte=ye((cir,Hte)=>{Hte.exports=_rt;function _rt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*n,e[5]=o*i+c*n,e[6]=s*i+f*n,e[7]=l*i+h*n,e[8]=u*i-a*n,e[9]=c*i-o*n,e[10]=f*i-s*n,e[11]=h*i-l*n,e}});var Xte=ye((fir,Wte)=>{Wte.exports=xrt;function xrt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*n,e[1]=o*i-c*n,e[2]=s*i-f*n,e[3]=l*i-h*n,e[8]=a*n+u*i,e[9]=o*n+c*i,e[10]=s*n+f*i,e[11]=l*n+h*i,e}});var Yte=ye((hir,Zte)=>{Zte.exports=brt;function brt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+u*n,e[1]=o*i+c*n,e[2]=s*i+f*n,e[3]=l*i+h*n,e[4]=u*i-a*n,e[5]=c*i-o*n,e[6]=f*i-s*n,e[7]=h*i-l*n,e}});var Jte=ye((dir,Kte)=>{Kte.exports=wrt;function wrt(e,t,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+l*n,e[2]=l*o*a-s*n,e[3]=0,e[4]=o*s*a-l*n,e[5]=s*s*a+i,e[6]=l*s*a+o*n,e[7]=0,e[8]=o*l*a+s*n,e[9]=s*l*a-o*n,e[10]=l*l*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Qte=ye((vir,$te)=>{$te.exports=Trt;function Trt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,d=i*l,v=i*u,m=a*u,b=o*s,p=o*l,k=o*u;return e[0]=1-(d+m),e[1]=f+k,e[2]=h-p,e[3]=0,e[4]=f-k,e[5]=1-(c+m),e[6]=v+b,e[7]=0,e[8]=h+p,e[9]=v-b,e[10]=1-(c+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var tre=ye((pir,ere)=>{ere.exports=Art;function Art(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var ire=ye((gir,rre)=>{rre.exports=Srt;function Srt(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var are=ye((mir,nre)=>{nre.exports=Mrt;function Mrt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var sre=ye((yir,ore)=>{ore.exports=Ert;function Ert(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var ure=ye((_ir,lre)=>{lre.exports=krt;function krt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var fre=ye((xir,cre)=>{cre.exports=Crt;function Crt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,d=i*s,v=i*l,m=a*o,b=a*s,p=a*l;return e[0]=1-f-v,e[1]=c+p,e[2]=h-b,e[3]=0,e[4]=c-p,e[5]=1-u-v,e[6]=d+m,e[7]=0,e[8]=h+b,e[9]=d-m,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var dre=ye((bir,hre)=>{hre.exports=Lrt;function Lrt(e,t,r,n,i,a,o){var s=1/(r-t),l=1/(i-n),u=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}});var pre=ye((wir,vre)=>{vre.exports=Prt;function Prt(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}});var mre=ye((Tir,gre)=>{gre.exports=Irt;function Irt(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(i-a)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var _re=ye((Air,yre)=>{yre.exports=Rrt;function Rrt(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*u,e[15]=1,e}});var bre=ye((Sir,xre)=>{var Drt=Uq();xre.exports=Frt;function Frt(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v=t[0],m=t[1],b=t[2],p=n[0],k=n[1],M=n[2],T=r[0],L=r[1],x=r[2];return Math.abs(v-T)<1e-6&&Math.abs(m-L)<1e-6&&Math.abs(b-x)<1e-6?Drt(e):(c=v-T,f=m-L,h=b-x,d=1/Math.sqrt(c*c+f*f+h*h),c*=d,f*=d,h*=d,i=k*h-M*f,a=M*c-p*h,o=p*f-k*c,d=Math.sqrt(i*i+a*a+o*o),d?(d=1/d,i*=d,a*=d,o*=d):(i=0,a=0,o=0),s=f*o-h*a,l=h*i-c*o,u=c*a-f*i,d=Math.sqrt(s*s+l*l+u*u),d?(d=1/d,s*=d,l*=d,u*=d):(s=0,l=0,u=0),e[0]=i,e[1]=s,e[2]=c,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*v+a*m+o*b),e[13]=-(s*v+l*m+u*b),e[14]=-(c*v+f*m+h*b),e[15]=1,e)}});var Tre=ye((Mir,wre)=>{wre.exports=zrt;function zrt(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 Vq=ye((Eir,Are)=>{Are.exports={create:wte(),clone:Ate(),copy:Mte(),identity:Uq(),transpose:Cte(),invert:Pte(),adjoint:Rte(),determinant:Fte(),multiply:qte(),translate:Bte(),scale:Ute(),rotate:Gte(),rotateX:jte(),rotateY:Xte(),rotateZ:Yte(),fromRotation:Jte(),fromRotationTranslation:Qte(),fromScaling:tre(),fromTranslation:ire(),fromXRotation:are(),fromYRotation:sre(),fromZRotation:ure(),fromQuat:fre(),frustum:dre(),perspective:pre(),perspectiveFromFieldOfView:mre(),ortho:_re(),lookAt:bre(),str:Tre()}});var P6=ye(fh=>{"use strict";var qrt=Vq();fh.init2dArray=function(e,t){for(var r=new Array(e),n=0;n<e;n++)r[n]=new Array(t);return r};fh.transposeRagged=function(e){var t=0,r=e.length,n,i;for(n=0;n<r;n++)t=Math.max(t,e[n].length);var a=new Array(t);for(n=0;n<t;n++)for(a[n]=new Array(r),i=0;i<r;i++)a[n][i]=e[i][n];return a};fh.dot=function(e,t){if(!(e.length&&t.length)||e.length!==t.length)return null;var r=e.length,n,i;if(e[0].length)for(n=new Array(r),i=0;i<r;i++)n[i]=fh.dot(e[i],t);else if(t[0].length){var a=fh.transposeRagged(t);for(n=new Array(a.length),i=0;i<a.length;i++)n[i]=fh.dot(e,a[i])}else for(n=0,i=0;i<r;i++)n+=e[i]*t[i];return n};fh.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]};fh.rotationMatrix=function(e){var t=e*Math.PI/180;return[[Math.cos(t),-Math.sin(t),0],[Math.sin(t),Math.cos(t),0],[0,0,1]]};fh.rotationXYMatrix=function(e,t,r){return fh.dot(fh.dot(fh.translationMatrix(t,r),fh.rotationMatrix(e)),fh.translationMatrix(-t,-r))};fh.apply3DTransform=function(e){return function(){var t=arguments,r=arguments.length===1?t[0]:[t[0],t[1],t[2]||0];return fh.dot(e,[r[0],r[1],r[2],1]).slice(0,3)}};fh.apply2DTransform=function(e){return function(){var t=arguments;t.length===3&&(t=t[0]);var r=arguments.length===1?t[0]:[t[0],t[1]];return fh.dot(e,[r[0],r[1],1]).slice(0,2)}};fh.apply2DTransform2=function(e){var t=fh.apply2DTransform(e);return function(r){return t(r.slice(0,2)).concat(t(r.slice(2,4)))}};fh.convertCssMatrix=function(e){if(e){var t=e.length;if(t===16)return e;if(t===6)return[e[0],e[1],0,0,e[2],e[3],0,0,0,0,1,0,e[4],e[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]};fh.inverseTransformMatrix=function(e){var t=[];return qrt.invert(t,e),[[t[0],t[1],t[2],t[3]],[t[4],t[5],t[6],t[7]],[t[8],t[9],t[10],t[11]],[t[12],t[13],t[14],t[15]]]}});var HS=ye((Cir,Lre)=>{"use strict";var Ort=qa(),Sre=K1(),Brt=P6(),Nrt=Vq();function Urt(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 Vrt(e){var t=Ort.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function Mre(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function Grt(e,t){Ere("global",e,t)}function Ere(e,t,r){var n="plotly.js-style-"+e,i=document.getElementById(n);if(!(i&&i.matches(".no-inline-styles"))){i||(i=document.createElement("style"),i.setAttribute("id",n),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var a=i.sheet;a?a.insertRule?a.insertRule(t+"{"+r+"}",0):a.addRule?a.addRule(t,r,0):Sre.warn("addStyleRule failed"):Sre.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function Hrt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&Mre(r)}function jrt(e,t,r,n,i,a){var o=n.split(":"),s=i.split(":"),l="data-btn-style-event-added";a||(a=document),a.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function Wrt(e){var t=Cre(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var i=kre(n);if(i){var a=Brt.convertCssMatrix(i);r=Nrt.multiply(r,r,a)}}),r}function kre(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function Cre(e){for(var t=[];Xrt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function Xrt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Zrt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}Lre.exports={getGraphDiv:Urt,isPlotDiv:Vrt,removeElement:Mre,addStyleRule:Grt,addRelatedStyleRule:Ere,deleteRelatedStyleRule:Hrt,setStyleOnHover:jrt,getFullTransformMatrix:Wrt,getElementTransformMatrix:kre,getElementAndAncestors:Cre,equalDomRects:Zrt}});var jS=ye((Lir,Pre)=>{"use strict";Pre.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var mc=ye((Pir,Ore)=>{"use strict";var Rre=Ao().extendFlat,Yrt=Ty(),Dre={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},Fre={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},Krt=Dre.flags.slice().concat(["fullReplot"]),Jrt=Fre.flags.slice().concat("layoutReplot");Ore.exports={traces:Dre,layout:Fre,traceFlags:function(){return Ire(Krt)},layoutFlags:function(){return Ire(Jrt)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),i=0;i<n.length;i++)e[n[i]]=!0},overrideAll:zre};function Ire(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!1;return t}function zre(e,t,r){var n=Rre({},e);for(var i in n){var a=n[i];Yrt(a)&&(n[i]=qre(a,t,r,i))}return r==="from-root"&&(n.editType=t),n}function qre(e,t,r,n){if(e.valType){var i=Rre({},e);if(i.editType=t,Array.isArray(e.items)){i.items=new Array(e.items.length);for(var a=0;a<e.items.length;a++)i.items[a]=qre(e.items[a],t,"from-root")}return i}else return zre(e,t,n.charAt(0)==="_"?"nested":"from-root")}});var Pd=ye(Gq=>{"use strict";Gq.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Gq.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}});var Hq=ye((Rir,Bre)=>{"use strict";Bre.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}});var Ll=ye(_3=>{"use strict";var{DATE_FORMAT_LINK:$rt,FORMAT_LINK:Qrt}=Hq(),eit=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function tit({supportOther:e}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,Qrt,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,$rt,"for details on the date formatting syntax.",eit].join(" ")}_3.templateFormatStringDescription=tit;_3.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>_g({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});_3.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>_g({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});_3.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});_3.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var D6=ye((zir,jre)=>{"use strict";function J1(e,t){return t?t.d2l(e):e}function Nre(e,t){return t?t.l2d(e):e}function rit(e){return e.x0}function iit(e){return e.x1}function nit(e){return e.y0}function ait(e){return e.y1}function Ure(e){return e.x0shift||0}function Vre(e){return e.x1shift||0}function Gre(e){return e.y0shift||0}function Hre(e){return e.y1shift||0}function I6(e,t){return J1(e.x1,t)+Vre(e)-J1(e.x0,t)-Ure(e)}function R6(e,t,r){return J1(e.y1,r)+Hre(e)-J1(e.y0,r)-Gre(e)}function oit(e,t){return Math.abs(I6(e,t))}function sit(e,t,r){return Math.abs(R6(e,t,r))}function lit(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(I6(e,t),2)+Math.pow(R6(e,t,r),2))}function uit(e,t){return Nre((J1(e.x1,t)+Vre(e)+J1(e.x0,t)+Ure(e))/2,t)}function cit(e,t,r){return Nre((J1(e.y1,r)+Hre(e)+J1(e.y0,r)+Gre(e))/2,r)}function fit(e,t,r){return e.type!=="line"?void 0:R6(e,t,r)/I6(e,t)}var hit=["x0","x1","y0","y1","dy","height","ycenter"],dit=["x0","x1","y0","y1","dx","width","xcenter"];jre.exports={x0:rit,x1:iit,y0:nit,y1:ait,slope:fit,dx:I6,dy:R6,width:oit,height:sit,length:lit,xcenter:uit,ycenter:cit,simpleXVariables:hit,simpleYVariables:dit}});var Zre=ye((qir,Xre)=>{"use strict";var vit=mc().overrideAll,xb=Gl(),Wre=ec(),pit=Pd().dash,$1=Ao().extendFlat,{shapeTexttemplateAttrs:git,templatefallbackAttrs:mit}=Ll(),yit=D6();Xre.exports=vit({newshape:{visible:$1({},xb.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:$1({},xb.legend,{}),legendgroup:$1({},xb.legendgroup,{}),legendgrouptitle:{text:$1({},xb.legendgrouptitle.text,{}),font:Wre({})},legendrank:$1({},xb.legendrank,{}),legendwidth:$1({},xb.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:$1({},pit,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:$1({},xb.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:git({newshape:!0},{keys:Object.keys(yit)}),texttemplatefallback:mit({editType:"arraydraw"}),font:Wre({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var Kre=ye((Oir,Yre)=>{"use strict";var _it=Pd().dash,xit=Ao().extendFlat;Yre.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:xit({},_it,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}});var F6=ye((Bir,Jre)=>{"use strict";Jre.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}});var x3=ye((Nir,tie)=>{"use strict";var jq=ec(),bit=jS(),z6=Ih(),$re=Zre(),Qre=Kre(),wit=F6(),eie=Ao().extendFlat,q6=jq({editType:"calc"});q6.family.dflt='"Open Sans", verdana, arial, sans-serif';q6.size.dflt=12;q6.color.dflt=z6.defaultLine;tie.exports={font:q6,title:{text:{valType:"string",editType:"layoutstyle"},font:jq({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:jq({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:eie(wit({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:z6.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:z6.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:z6.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:$re.newshape,activeshape:$re.activeshape,newselection:Qre.newselection,activeselection:Qre.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:eie({},bit.transition,{editType:"none"})}});var rie=ye(()=>{(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var e=document.createElement("style");e.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",e.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var Oa=ye(el=>{"use strict";var b3=K1(),iie=L6(),nie=Nq(),Tit=Ty(),Ait=HS().addStyleRule,aie=Ao(),Sit=Gl(),Mit=x3(),Eit=aie.extendFlat,Wq=aie.extendDeepAll;el.modules={};el.allCategories={};el.allTypes=[];el.subplotsRegistry={};el.componentsRegistry={};el.layoutArrayContainers=[];el.layoutArrayRegexes=[];el.traceLayoutAttributes={};el.localeRegistry={};el.apiMethodRegistry={};el.collectableSubplotTypes=null;el.register=function(t){if(el.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r<t.length;r++){var n=t[r];if(!n)throw new Error("Invalid module was attempted to be registered!");switch(n.moduleType){case"trace":kit(n);break;case"transform":Pit(n);break;case"component":Lit(n);break;case"locale":Iit(n);break;case"apiMethod":var i=n.name;el.apiMethodRegistry[i]=n.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}};el.getModule=function(e){var t=el.modules[uie(e)];return t?t._module:!1};el.traceIs=function(e,t){if(e=uie(e),e==="various")return!1;var r=el.modules[e];return r||(e&&b3.log("Unrecognized trace type "+e+"."),r=el.modules[Sit.type.dflt]),!!r.categories[t]};el.getComponentMethod=function(e,t){var r=el.componentsRegistry[e];return r&&r[t]||iie};el.call=function(){var e=arguments[0],t=[].slice.call(arguments,1);return el.apiMethodRegistry[e].apply(null,t)};function kit(e){var t=e.name,r=e.categories,n=e.meta;if(el.modules[t]){b3.log("Type "+t+" already registered");return}el.subplotsRegistry[e.basePlotModule.name]||Cit(e.basePlotModule);for(var i={},a=0;a<r.length;a++)i[r[a]]=!0,el.allCategories[r[a]]=!0;el.modules[t]={_module:e,categories:i},n&&Object.keys(n).length&&(el.modules[t].meta=n),el.allTypes.push(t);for(var o in el.componentsRegistry)sie(o,t);e.layoutAttributes&&Eit(el.traceLayoutAttributes,e.layoutAttributes);var s=e.basePlotModule,l=s.name;if(l==="mapbox"){var u=s.constants.styleRules;for(var c in u)Ait(".js-plotly-plot .plotly .mapboxgl-"+c,u[c])}l==="map"&&rie(),(l==="geo"||l==="mapbox"||l==="map")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function Cit(e){var t=e.name;if(el.subplotsRegistry[t]){b3.log("Plot type "+t+" already registered.");return}oie(e),el.subplotsRegistry[t]=e;for(var r in el.componentsRegistry)lie(r,e.name)}function Lit(e){if(typeof e.name!="string")throw new Error("Component module *name* must be a string.");var t=e.name;el.componentsRegistry[t]=e,e.layoutAttributes&&(e.layoutAttributes._isLinkedToArray&&nie(el.layoutArrayContainers,t),oie(e));for(var r in el.modules)sie(t,r);for(var n in el.subplotsRegistry)lie(t,n);e.schema&&e.schema.layout&&Wq(Mit,e.schema.layout)}function Pit(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&&b3.log([t+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),Tit(e.attributes)||b3.log(t+" registered without an *attributes* object."),typeof e.supplyDefaults!="function"&&b3.log(t+" registered without a *supplyDefaults* method.")}function Iit(e){var t=e.name,r=t.split("-")[0],n=e.dictionary,i=e.format,a=n&&Object.keys(n).length,o=i&&Object.keys(i).length,s=el.localeRegistry,l=s[t];if(l||(s[t]=l={}),r!==t){var u=s[r];u||(s[r]=u={}),a&&u.dictionary===l.dictionary&&(u.dictionary=n),o&&u.format===l.format&&(u.format=i)}a&&(l.dictionary=n),o&&(l.format=i)}function oie(e){if(e.layoutAttributes){var t=e.layoutAttributes._arrayAttrRegexps;if(t)for(var r=0;r<t.length;r++)nie(el.layoutArrayRegexes,t[r])}}function sie(e,t){var r=el.componentsRegistry[e].schema;if(!(!r||!r.traces)){var n=r.traces[t];n&&Wq(el.modules[t]._module.attributes,n)}}function lie(e,t){var r=el.componentsRegistry[e].schema;if(!(!r||!r.subplots)){var n=el.subplotsRegistry[t],i=n.layoutAttributes,a=n.attr==="subplot"?n.name:n.attr;Array.isArray(a)&&(a=a[0]);var o=r.subplots[a];i&&o&&Wq(i,o)}}function uie(e){return typeof e=="object"&&(e=e.type),e}});var yie=ye(hh=>{"use strict";var Rit=h3().timeFormat,gie=Eo(),Xq=K1(),e_=v3().mod,A3=fs(),_0=A3.BADNUM,Ap=A3.ONEDAY,WS=A3.ONEHOUR,Q1=A3.ONEMIN,T3=A3.ONESEC,XS=A3.EPOCHJD,Ay=Oa(),cie=h3().utcFormat,Dit=/^\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,Fit=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,fie=new Date().getFullYear()-70;function Sy(e){return e&&Ay.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}hh.dateTick0=function(e,t){var r=zit(e,!!t);if(t<2)return r;var n=hh.dateTime2ms(r,e);return n+=Ap*(t-1),hh.ms2DateTime(n,0,e)};function zit(e,t){return Sy(e)?t?Ay.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Ay.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}hh.dfltRange=function(e){return Sy(e)?Ay.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};hh.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var B6,N6;hh.dateTime2ms=function(e,t){if(hh.isJSDate(e)){var r=e.getTimezoneOffset()*Q1,n=(e.getUTCMinutes()-e.getMinutes())*Q1+(e.getUTCSeconds()-e.getSeconds())*T3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*Q1;r=r-i/2+e_(n-r+i/2,i)}return e=Number(e)-r,e>=B6&&e<=N6?e:_0}if(typeof e!="string"&&typeof e!="number")return _0;e=String(e);var a=Sy(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=a&&t.slice(0,7)==="chinese",l=e.match(s?Fit:Dit);if(!l)return _0;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),h=Number(l[7]||0),d=Number(l[9]||0),v=Number(l[11]||0);if(a){if(u.length===2)return _0;u=Number(u);var m;try{var b=Ay.getComponentMethod("calendars","getCal")(t);if(s){var p=c.charAt(c.length-1)==="i";c=parseInt(c,10),m=b.newDate(u,b.toMonthIndex(u,c,p),f)}else m=b.newDate(u,Number(c),f)}catch(M){return _0}return m?(m.toJD()-XS)*Ap+h*WS+d*Q1+v*T3:_0}u.length===2?u=(Number(u)+2e3-fie)%100+fie:u=Number(u),c-=1;var k=new Date(Date.UTC(2e3,c,f,h,d));return k.setUTCFullYear(u),k.getUTCMonth()!==c||k.getUTCDate()!==f?_0:k.getTime()+v*T3};B6=hh.MIN_MS=hh.dateTime2ms("-9999");N6=hh.MAX_MS=hh.dateTime2ms("9999-12-31 23:59:59.9999");hh.isDateTime=function(e,t){return hh.dateTime2ms(e,t)!==_0};function w3(e,t){return String(e+Math.pow(10,t)).slice(1)}var O6=90*Ap,hie=3*WS,die=5*Q1;hh.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=B6&&e<=N6))return _0;t||(t=0);var n=Math.floor(e_(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,l,u,c;if(Sy(r)){var f=Math.floor(i/Ap)+XS,h=Math.floor(e_(e,Ap));try{a=Ay.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(d){a=cie("G%Y-%m-%d")(new Date(i))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;o=t<O6?Math.floor(h/WS):0,s=t<O6?Math.floor(h%WS/Q1):0,l=t<hie?Math.floor(h%Q1/T3):0,u=t<die?h%T3*10+n:0}else c=new Date(i),a=cie("%Y-%m-%d")(c),o=t<O6?c.getUTCHours():0,s=t<O6?c.getUTCMinutes():0,l=t<hie?c.getUTCSeconds():0,u=t<die?c.getUTCMilliseconds()*10+n:0;return mie(a,o,s,l,u)};hh.ms2DateTimeLocal=function(e){if(!(e>=B6+Ap&&e<=N6-Ap))return _0;var t=Math.floor(e_(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Rit("%Y-%m-%d")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return mie(n,i,a,o,s)};function mie(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+w3(t,2)+":"+w3(r,2),(n||i)&&(e+=":"+w3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+w3(i,a)}return e}hh.cleanDate=function(e,t,r){if(e===_0)return t;if(hh.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Sy(r))return Xq.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=hh.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!hh.isDateTime(e,r))return Xq.error("unrecognized date",e),t;return e};var qit=/%\d?f/g,Oit=/%h/g,Bit={1:"1",2:"1",3:"2",4:"2"};function vie(e,t,r,n){e=e.replace(qit,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(Oit,function(){return Bit[r("%q")(i)]}),Sy(n))try{e=Ay.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var Nit=[59,59.9,59.99,59.999,59.9999];function Uit(e,t){var r=e_(e+.05,Ap),n=w3(Math.floor(r/WS),2)+":"+w3(e_(Math.floor(r/Q1),60),2);if(t!=="M"){gie(t)||(t=0);var i=Math.min(e_(e/T3,60),Nit[t]),a=(100+i).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}hh.formatDate=function(e,t,r,n,i,a){if(i=Sy(i)&&i,!t)if(r==="y")t=a.year;else if(r==="m")t=a.month;else if(r==="d")t=a.dayMonth+`
|
||
`+a.year;else return Uit(e,r)+`
|
||
`+vie(a.dayMonthYear,e,n,i);return vie(t,e,n,i)};var pie=3*Ap;hh.incrementMonth=function(e,t,r){r=Sy(r)&&r;var n=e_(e,Ap);if(e=Math.round(e-n),r)try{var i=Math.round(e/Ap)+XS,a=Ay.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-XS)*Ap+n}catch(l){Xq.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+pie);return s.setUTCMonth(s.getUTCMonth()+t)+n-pie};hh.findExactDates=function(e,t){for(var r=0,n=0,i=0,a=0,o,s,l=Sy(t)&&Ay.getComponentMethod("calendars","getCal")(t),u=0;u<e.length;u++){if(s=e[u],!gie(s)){a++;continue}if(!(s%Ap))if(l)try{o=l.fromJD(s/Ap+XS),o.day()===1?o.month()===1?r++:n++:i++}catch(f){}else o=new Date(s),o.getUTCDate()===1?o.getUTCMonth()===0?r++:n++:i++}n+=r,i+=n;var c=e.length-a;return{exactYears:r/c,exactMonths:n/c,exactDays:i/c}}});var ZS=ye((jir,_ie)=>{"use strict";_ie.exports=function(t){return t}});var U6=ye(My=>{"use strict";var Vit=Eo(),Git=K1(),Hit=ZS(),jit=fs().BADNUM,Zq=1e-9;My.findBin=function(e,t,r){if(Vit(t.start))return r?Math.ceil((e-t.start)/t.size-Zq)-1:Math.floor((e-t.start)/t.size+Zq);var n=0,i=t.length,a=0,o=i>1?(t[i-1]-t[0])/(i-1):1,s,l;for(o>=0?l=r?Wit:Xit:l=r?Yit:Zit,e+=o*Zq*(r?-1:1)*(o>=0?1:-1);n<i&&a++<100;)s=Math.floor((n+i)/2),l(t[s],e)?n=s+1:i=s;return a>90&&Git.log("Long binary search..."),n-1};function Wit(e,t){return e<t}function Xit(e,t){return e<=t}function Zit(e,t){return e>t}function Yit(e,t){return e>=t}My.sorterAsc=function(e,t){return e-t};My.sorterDes=function(e,t){return t-e};My.distinctVals=function(e){var t=e.slice();t.sort(My.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===jit;r--);for(var n=t[r]-t[0]||1,i=n/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(a.push(l),o=l):u>i&&(n=Math.min(n,u),a.push(l),o=l)}return{vals:a,minDiff:n}};My.roundUp=function(e,t,r){for(var n=0,i=t.length-1,a,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n<i&&o++<100;)a=u((n+i)/2),t[a]<=e?n=a+s:i=a-l;return t[n]};My.sort=function(e,t){for(var r=0,n=0,i=1;i<e.length;i++){var a=t(e[i],e[i-1]);if(a<0?r=1:a>0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};My.findIndexOfMin=function(e,t){t=t||Hit;for(var r=1/0,n,i=0;i<e.length;i++){var a=t(e[i]);a<r&&(r=a,n=i)}return n}});var t_=ye((Xir,xie)=>{"use strict";xie.exports=function(t){return Object.keys(t).sort()}});var bie=ye(dh=>{"use strict";var YS=Eo(),Kit=vv().isArrayOrTypedArray;dh.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),YS(t)||(t=!1),Kit(r[0])){for(a=new Array(n),i=0;i<n;i++)a[i]=dh.aggNums(e,t,r[i]);r=a}for(i=0;i<n;i++)YS(t)?YS(r[i])&&(t=e(+t,+r[i])):t=r[i];return t};dh.len=function(e){return dh.aggNums(function(t){return t+1},0,e)};dh.mean=function(e,t){return t||(t=dh.len(e)),dh.aggNums(function(r,n){return r+n},0,e)/t};dh.geometricMean=function(e,t){return t||(t=dh.len(e)),Math.pow(dh.aggNums(function(r,n){return r*n},1,e),1/t)};dh.midRange=function(e){if(!(e===void 0||e.length===0))return(dh.aggNums(Math.max,null,e)+dh.aggNums(Math.min,null,e))/2};dh.variance=function(e,t,r){return t||(t=dh.len(e)),YS(r)||(r=dh.mean(e,t)),dh.aggNums(function(n,i){return n+Math.pow(i-r,2)},0,e)/t};dh.stdev=function(e,t,r){return Math.sqrt(dh.variance(e,t,r))};dh.median=function(e){var t=e.slice().sort();return dh.interp(t,.5)};dh.interp=function(e,t){if(!YS(t))throw"n should be a finite number";if(t=t*e.length-.5,t<0)return e[0];if(t>e.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var Mie=ye((Yir,Sie)=>{"use strict";var wie=v3(),Yq=wie.mod,Jit=wie.modHalf,KS=Math.PI,r_=2*KS;function $it(e){return e/180*KS}function Qit(e){return e/KS*180}function Kq(e){return Math.abs(e[1]-e[0])>r_-1e-14}function Tie(e,t){return Jit(t-e,r_)}function ent(e,t){return Math.abs(Tie(e,t))}function Aie(e,t){if(Kq(t))return!0;var r,n;t[0]<t[1]?(r=t[0],n=t[1]):(r=t[1],n=t[0]),r=Yq(r,r_),n=Yq(n,r_),r>n&&(n+=r_);var i=Yq(e,r_),a=i+r_;return i>=r&&i<=n||a>=r&&a<=n}function tnt(e,t,r,n){if(!Aie(t,n))return!1;var i,a;return r[0]<r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),e>=i&&e<=a}function Jq(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=Kq([r,n]),l,u,c,f,h;s?(l=0,u=KS,c=r_):r<n?(l=r,c=n):(l=n,c=r),e<t?(f=e,h=t):(f=t,h=e);function d(p,k){return[p*Math.cos(k)+i,a-p*Math.sin(k)]}var v=Math.abs(c-l)<=KS?0:1;function m(p,k,M){return"A"+[p,p]+" "+[0,v,M]+" "+d(p,k)}var b;return s?f===null?b="M"+d(h,l)+m(h,u,0)+m(h,c,0)+"Z":b="M"+d(f,l)+m(f,u,0)+m(f,c,0)+"ZM"+d(h,l)+m(h,u,1)+m(h,c,1)+"Z":f===null?(b="M"+d(h,l)+m(h,c,0),o&&(b+="L0,0Z")):b="M"+d(f,l)+"L"+d(h,l)+m(h,c,0)+"L"+d(f,c)+m(f,l,1)+"Z",b}function rnt(e,t,r,n,i){return Jq(null,e,t,r,n,i,0)}function int(e,t,r,n,i){return Jq(null,e,t,r,n,i,1)}function nnt(e,t,r,n,i,a){return Jq(e,t,r,n,i,a,1)}Sie.exports={deg2rad:$it,rad2deg:Qit,angleDelta:Tie,angleDist:ent,isFullCircle:Kq,isAngleInsideSector:Aie,isPtInsideSector:tnt,pathArc:rnt,pathSector:int,pathAnnulus:nnt}});var Eie=ye(bb=>{"use strict";bb.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};bb.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};bb.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};bb.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};bb.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};bb.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var Lie=ye(wb=>{"use strict";var $q=v3().mod;wb.segmentsIntersect=Cie;function Cie(e,t,r,n,i,a,o,s){var l=r-e,u=i-e,c=o-i,f=n-t,h=a-t,d=s-a,v=l*d-c*f;if(v===0)return null;var m=(u*d-c*h)/v,b=(u*f-l*h)/v;return b<0||b>1||m<0||m>1?null:{x:e+l*m,y:t+f*m}}wb.segmentDistance=function(t,r,n,i,a,o,s,l){if(Cie(t,r,n,i,a,o,s,l))return 0;var u=n-t,c=i-r,f=s-a,h=l-o,d=u*u+c*c,v=f*f+h*h,m=Math.min(V6(u,c,d,a-t,o-r),V6(u,c,d,s-t,l-r),V6(f,h,v,t-a,r-o),V6(f,h,v,n-a,i-o));return Math.sqrt(m)};function V6(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}else{var l=n*t-i*e;return l*l/r}}var G6,Qq,kie;wb.getTextLocation=function(t,r,n,i){if((t!==Qq||i!==kie)&&(G6={},Qq=t,kie=i),G6[n])return G6[n];var a=t.getPointAtLength($q(n-i/2,r)),o=t.getPointAtLength($q(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength($q(n,r)),u=(l.x*4+a.x+o.x)/6,c=(l.y*4+a.y+o.y)/6,f={x:u,y:c,theta:s};return G6[n]=f,f};wb.clearLocationCache=function(){Qq=null};wb.getVisibleSegment=function(t,r,n){var i=r.left,a=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,h;function d(m){var b=t.getPointAtLength(m);m===0?f=b:m===u&&(h=b);var p=b.x<i?i-b.x:b.x>a?b.x-a:0,k=b.y<o?o-b.y:b.y>s?b.y-s:0;return Math.sqrt(p*p+k*k)}for(var v=d(l);v;){if(l+=v+n,l>c)return;v=d(l)}for(v=d(c);v;){if(c-=v+n,l>c)return;v=d(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-h.x)<.1&&Math.abs(f.y-h.y)<.1}};wb.findPointOnPath=function(t,r,n,i){i=i||{};for(var a=i.pathLength||t.getTotalLength(),o=i.tolerance||.001,s=i.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(a)[n]?-1:1,u=0,c=0,f=a,h,d,v;u<s;){if(h=(c+f)/2,d=t.getPointAtLength(h),v=d[n]-r,Math.abs(v)<o)return d;l*v>0?f=h:c=h,u++}return d}});var H6=ye(JS=>{"use strict";var Ey={};JS.throttle=function(t,r,n){var i=Ey[t],a=Date.now();if(!i){for(var o in Ey)Ey[o].ts<a-6e4&&delete Ey[o];i=Ey[t]={ts:0,timer:null}}Pie(i);function s(){n(),i.ts=Date.now(),i.onDone&&(i.onDone(),i.onDone=null)}if(a>i.ts+r){s();return}i.timer=setTimeout(function(){s(),i.timer=null},r)};JS.done=function(e){var t=Ey[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};JS.clear=function(e){if(e)Pie(Ey[e]),delete Ey[e];else for(var t in Ey)JS.clear(t)};function Pie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Rie=ye((Qir,Iie)=>{"use strict";Iie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Die=ye((enr,j6)=>{"use strict";j6.exports=eO;j6.exports.isMobile=eO;j6.exports.default=eO;var ant=/(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,ont=/CrOS/,snt=/android|ipad|playbook|silk/i;function eO(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=ant.test(t)&&!ont.test(t)||!!e.tablet&&snt.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var zie=ye((tnr,Fie)=>{"use strict";var lnt=Eo(),unt=Die();Fie.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=cnt(),typeof r!="string")return!0;var n=unt({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var i=r.split(" "),a=1;a<i.length;a++){var o=i[a];if(o.indexOf("Safari")!==-1)for(var s=a-1;s>-1;s--){var l=i[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(lnt(u)&&(u=+u),u>=13)return!0}}}return n};function cnt(){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 Oie=ye((rnr,qie)=>{"use strict";var fnt=qa();qie.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]=fnt.select(this)}),i}});var Nie=ye((inr,Bie)=>{"use strict";var hnt=Oa();Bie.exports=function(t,r){for(var n=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}a=hnt.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var tO=ye((nnr,Uie)=>{"use strict";Uie.exports=function(t){for(var r={},n=[],i=0,a=0;a<t.length;a++){var o=t[a];r[o]!==1&&(r[o]=1,n[i++]=o)}return n}});var Gie=ye((anr,Vie)=>{"use strict";Vie.exports=function(t){for(var r=pnt(t)?vnt:dnt,n=[],i=0;i<t.length;i++){var a=t[i];r(a)&&n.push(a)}return n};function dnt(e){return e.visible===!0}function vnt(e){var t=e[0].trace;return t.visible===!0&&t._length!==0}function pnt(e){return Array.isArray(e)&&Array.isArray(e[0])&&e[0][0]&&e[0][0].trace}});var jie=ye((onr,Hie)=>{"use strict";Hie.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),i=n>1?(n*t+n*r)/n:t+r,a=String(i).length;if(a>16){var o=String(r).length,s=String(t).length;if(a>=s+o){var l=parseFloat(i).toPrecision(12);l.indexOf("e+")===-1&&(i=+l)}}return i}});var Xie=ye((snr,Wie)=>{"use strict";var gnt=Eo(),mnt=fs().BADNUM,ynt=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Wie.exports=function(t){return typeof t=="string"&&(t=t.replace(ynt,"")),gnt(t)?Number(t):mnt}});var Pr=ye((lnr,one)=>{"use strict";var $S=qa(),_nt=h3().utcFormat,xnt=Mq().format,Qie=Eo(),ene=fs(),tne=ene.FP_SAFE,bnt=-tne,Zie=ene.BADNUM,Ai=one.exports={};Ai.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:t==="0.f"?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var Yie={};Ai.warnBadFormat=function(e){var t=String(e);Yie[t]||(Yie[t]=1,Ai.warn('encountered bad format: "'+t+'"'))};Ai.noFormat=function(e){return String(e)};Ai.numberFormat=function(e){var t;try{t=xnt(Ai.adjustFormat(e))}catch(r){return Ai.warnBadFormat(e),Ai.noFormat}return t};Ai.nestedProperty=FS();Ai.keyedContainer=Uee();Ai.relativeAttr=Gee();Ai.isPlainObject=Ty();Ai.toLogRange=S6();Ai.relinkPrivateKeys=Xee();var i_=vv();Ai.isArrayBuffer=i_.isArrayBuffer;Ai.isTypedArray=i_.isTypedArray;Ai.isArrayOrTypedArray=i_.isArrayOrTypedArray;Ai.isArray1D=i_.isArray1D;Ai.ensureArray=i_.ensureArray;Ai.concat=i_.concat;Ai.maxRowLength=i_.maxRowLength;Ai.minRowLength=i_.minRowLength;var rne=v3();Ai.mod=rne.mod;Ai.modHalf=rne.modHalf;var n_=hte();Ai.valObjectMeta=n_.valObjectMeta;Ai.coerce=n_.coerce;Ai.coerce2=n_.coerce2;Ai.coerceFont=n_.coerceFont;Ai.coercePattern=n_.coercePattern;Ai.coerceHoverinfo=n_.coerceHoverinfo;Ai.coerceSelectionMarkerOpacity=n_.coerceSelectionMarkerOpacity;Ai.validate=n_.validate;var jp=yie();Ai.dateTime2ms=jp.dateTime2ms;Ai.isDateTime=jp.isDateTime;Ai.ms2DateTime=jp.ms2DateTime;Ai.ms2DateTimeLocal=jp.ms2DateTimeLocal;Ai.cleanDate=jp.cleanDate;Ai.isJSDate=jp.isJSDate;Ai.formatDate=jp.formatDate;Ai.incrementMonth=jp.incrementMonth;Ai.dateTick0=jp.dateTick0;Ai.dfltRange=jp.dfltRange;Ai.findExactDates=jp.findExactDates;Ai.MIN_MS=jp.MIN_MS;Ai.MAX_MS=jp.MAX_MS;var Tb=U6();Ai.findBin=Tb.findBin;Ai.sorterAsc=Tb.sorterAsc;Ai.sorterDes=Tb.sorterDes;Ai.distinctVals=Tb.distinctVals;Ai.roundUp=Tb.roundUp;Ai.sort=Tb.sort;Ai.findIndexOfMin=Tb.findIndexOfMin;Ai.sortObjectKeys=t_();var ky=bie();Ai.aggNums=ky.aggNums;Ai.len=ky.len;Ai.mean=ky.mean;Ai.geometricMean=ky.geometricMean;Ai.median=ky.median;Ai.midRange=ky.midRange;Ai.variance=ky.variance;Ai.stdev=ky.stdev;Ai.interp=ky.interp;var wg=P6();Ai.init2dArray=wg.init2dArray;Ai.transposeRagged=wg.transposeRagged;Ai.dot=wg.dot;Ai.translationMatrix=wg.translationMatrix;Ai.rotationMatrix=wg.rotationMatrix;Ai.rotationXYMatrix=wg.rotationXYMatrix;Ai.apply3DTransform=wg.apply3DTransform;Ai.apply2DTransform=wg.apply2DTransform;Ai.apply2DTransform2=wg.apply2DTransform2;Ai.convertCssMatrix=wg.convertCssMatrix;Ai.inverseTransformMatrix=wg.inverseTransformMatrix;var gm=Mie();Ai.deg2rad=gm.deg2rad;Ai.rad2deg=gm.rad2deg;Ai.angleDelta=gm.angleDelta;Ai.angleDist=gm.angleDist;Ai.isFullCircle=gm.isFullCircle;Ai.isAngleInsideSector=gm.isAngleInsideSector;Ai.isPtInsideSector=gm.isPtInsideSector;Ai.pathArc=gm.pathArc;Ai.pathSector=gm.pathSector;Ai.pathAnnulus=gm.pathAnnulus;var M3=Eie();Ai.isLeftAnchor=M3.isLeftAnchor;Ai.isCenterAnchor=M3.isCenterAnchor;Ai.isRightAnchor=M3.isRightAnchor;Ai.isTopAnchor=M3.isTopAnchor;Ai.isMiddleAnchor=M3.isMiddleAnchor;Ai.isBottomAnchor=M3.isBottomAnchor;var E3=Lie();Ai.segmentsIntersect=E3.segmentsIntersect;Ai.segmentDistance=E3.segmentDistance;Ai.getTextLocation=E3.getTextLocation;Ai.clearLocationCache=E3.clearLocationCache;Ai.getVisibleSegment=E3.getVisibleSegment;Ai.findPointOnPath=E3.findPointOnPath;var Z6=Ao();Ai.extendFlat=Z6.extendFlat;Ai.extendDeep=Z6.extendDeep;Ai.extendDeepAll=Z6.extendDeepAll;Ai.extendDeepNoArrays=Z6.extendDeepNoArrays;var rO=K1();Ai.log=rO.log;Ai.warn=rO.warn;Ai.error=rO.error;var wnt=g3();Ai.counterRegex=wnt.counter;var iO=H6();Ai.throttle=iO.throttle;Ai.throttleDone=iO.done;Ai.clearThrottle=iO.clear;var Tg=HS();Ai.getGraphDiv=Tg.getGraphDiv;Ai.isPlotDiv=Tg.isPlotDiv;Ai.removeElement=Tg.removeElement;Ai.addStyleRule=Tg.addStyleRule;Ai.addRelatedStyleRule=Tg.addRelatedStyleRule;Ai.deleteRelatedStyleRule=Tg.deleteRelatedStyleRule;Ai.setStyleOnHover=Tg.setStyleOnHover;Ai.getFullTransformMatrix=Tg.getFullTransformMatrix;Ai.getElementTransformMatrix=Tg.getElementTransformMatrix;Ai.getElementAndAncestors=Tg.getElementAndAncestors;Ai.equalDomRects=Tg.equalDomRects;Ai.clearResponsive=Rie();Ai.preserveDrawingBuffer=zie();Ai.makeTraceGroups=Oie();Ai._=Nie();Ai.notifier=qq();Ai.filterUnique=tO();Ai.filterVisible=Gie();Ai.pushUnique=Nq();Ai.increment=jie();Ai.cleanNumber=Xie();Ai.ensureNumber=function(t){return Qie(t)?(t=Number(t),t>tne||t<bnt?Zie:t):Zie};Ai.isIndex=function(e,t){return t!==void 0&&e>=t?!1:Qie(e)&&e>=0&&e%1===0};Ai.noop=L6();Ai.identity=ZS();Ai.repeat=function(e,t){for(var r=new Array(t),n=0;n<t;n++)r[n]=e;return r};Ai.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=Ai.nestedProperty(e,a.replace("?",r)),s=Ai.nestedProperty(e,a.replace("?",n)),l=o.get();o.set(s.get()),s.set(l)}};Ai.raiseToTop=function(t){t.parentNode.appendChild(t)};Ai.cancelTransition=function(e){return e.transition().duration(0)};Ai.constrain=function(e,t,r){return t>r?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};Ai.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};Ai.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};Ai.randstr=function e(t,r,n,i){if(n||(n=16),r===void 0&&(r=24),r<=0)return"0";var a=Math.log(Math.pow(2,r))/Math.log(n),o="",s,l,u;for(s=2;a===1/0;s*=2)a=Math.log(Math.pow(2,r/s))/Math.log(n)*s;var c=a-Math.floor(a);for(s=0;s<Math.floor(a);s++)u=Math.floor(Math.random()*n).toString(n),o=u+o;c&&(l=Math.pow(n,c),u=Math.floor(Math.random()*l).toString(n),o=u+o);var f=parseInt(o,n);return t&&t[o]||f!==1/0&&f>=Math.pow(2,r)?i>10?(Ai.warn("randstr failed uniqueness"),o):e(t,r,n,(i||0)+1):o};Ai.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};Ai.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,i=2*t-1,a=new Array(i),o=new Array(r),s,l,u,c;for(s=0;s<i;s++)a[s]=(1-Math.cos(Math.PI*(s+1)/t))/(2*t);for(s=0;s<r;s++){for(c=0,l=0;l<i;l++)u=s+l+1-t,u<-r?u-=n*Math.round(u/n):u>=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*a[l];o[s]=c}return o};Ai.syncOrAsync=function(e,t,r){var n,i;function a(){return Ai.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)};Ai.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};Ai.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]]}};Ai.mergeArray=function(e,t,r,n){var i=typeof n=="function";if(Ai.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}};Ai.mergeArrayCastPositive=function(e,t,r){return Ai.mergeArray(e,t,r,function(n){var i=+n;return isFinite(i)&&i>0?i:0})};Ai.fillArray=function(e,t,r,n){if(n=n||Ai.identity,Ai.isArrayOrTypedArray(e))for(var i=0;i<t.length;i++)t[i][r]=n(e[i])};Ai.castOption=function(e,t,r,n){n=n||Ai.identity;var i=Ai.nestedProperty(e,r).get();return Ai.isArrayOrTypedArray(i)?Array.isArray(t)&&Ai.isArrayOrTypedArray(i[t[0]])?n(i[t[0]][t[1]]):n(i[t]):i};Ai.extractOption=function(e,t,r,n){if(r in e)return e[r];var i=Ai.nestedProperty(t,n).get();if(!Array.isArray(i))return i};function ine(e){var t={};for(var r in e)for(var n=e[r],i=0;i<n.length;i++)t[n[i]]=+r;return t}Ai.tagSelected=function(e,t,r){var n=t.selectedpoints,i=t._indexToPoints,a;i&&(a=ine(i));function o(f){return f!==void 0&&f<e.length}for(var s=0;s<n.length;s++){var l=n[s];if(Ai.isIndex(l)||Ai.isArrayOrTypedArray(l)&&Ai.isIndex(l[0])&&Ai.isIndex(l[1])){var u=a?a[l]:l,c=r?r[u]:u;o(c)&&(e[c].selected=1)}}};Ai.selIndices2selPoints=function(e){var t=e.selectedpoints,r=e._indexToPoints;if(r){for(var n=ine(r),i=[],a=0;a<t.length;a++){var o=t[a];if(Ai.isIndex(o)){var s=n[o];Ai.isIndex(s)&&i.push(s)}}return i}else return t};Ai.getTargetArray=function(e,t){var r=t.target;if(typeof r=="string"&&r){var n=Ai.nestedProperty(e,r).get();return Ai.isArrayOrTypedArray(n)?n:!1}else if(Ai.isArrayOrTypedArray(r))return r;return!1};function nne(e,t,r){var n={};typeof t!="object"&&(t={});var i=r==="pieLike"?-1:3,a=Object.keys(e),o,s,l;for(o=0;o<a.length;o++)s=a[o],l=e[s],!(s.charAt(0)==="_"||typeof l=="function")&&(s==="module"?n[s]=l:Array.isArray(l)?s==="colorscale"||i===-1?n[s]=l.slice():n[s]=l.slice(0,i):Ai.isTypedArray(l)?i===-1?n[s]=l.subarray():n[s]=l.subarray(0,i):l&&typeof l=="object"?n[s]=nne(e[s],t[s],r):n[s]=l);for(a=Object.keys(t),o=0;o<a.length;o++)s=a[o],l=t[s],(typeof l!="object"||!(s in n)||typeof n[s]!="object")&&(n[s]=l);return n}Ai.minExtend=nne;Ai.titleCase=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};Ai.containsAny=function(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])!==-1)return!0;return!1};var Tnt=/Version\/[\d\.]+.*Safari/;Ai.isSafari=function(){return Tnt.test(window.navigator.userAgent)};var Ant=/iPad|iPhone|iPod/;Ai.isIOS=function(){return Ant.test(window.navigator.userAgent)};var Snt=/Macintosh.+AppleWebKit.+Gecko\)$/;Ai.isMacWKWebView=()=>Snt.test(window.navigator.userAgent);var Mnt=/Firefox\/(\d+)\.\d+/;Ai.getFirefoxVersion=function(){var e=Mnt.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};Ai.isD3Selection=function(e){return e instanceof $S.selection};Ai.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};Ai.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};Ai.objectFromPath=function(e,t){for(var r=e.split("."),n,i=n={},a=0;a<r.length;a++){var o=r[a],s=null,l=r[a].match(/(.*)\[([0-9]+)\]/);l?(o=l[1],s=l[2],n=n[o]=[],a===r.length-1?n[s]=t:n[s]={},n=n[s]):(a===r.length-1?n[o]=t:n[o]={},n=n[o])}return i};var Ent=/^([^\[\.]+)\.(.+)?/,knt=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function W6(e){return e.slice(0,2)==="__"}Ai.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(Ent)){if(i=e[r],n=t[1],W6(n))continue;delete e[r],e[n]=Ai.extendDeepNoArrays(e[n]||{},Ai.objectFromPath(r,Ai.expandObjectPaths(i))[n])}else if(t=r.match(knt)){if(i=e[r],n=t[1],W6(n))continue;if(a=parseInt(t[2]),delete e[r],e[n]=e[n]||[],t[3]===".")s=t[4],o=e[n][a]=e[n][a]||{},Ai.extendDeepNoArrays(o,Ai.objectFromPath(s,Ai.expandObjectPaths(i)));else{if(W6(n))continue;e[n][a]=Ai.expandObjectPaths(i)}}else{if(W6(r))continue;e[r]=Ai.expandObjectPaths(e[r])}}return e};Ai.numSeparate=function(e,t,r){if(r||(r=!1),typeof t!="string"||t.length===0)throw new Error("Separator string required for formatting!");typeof e=="number"&&(e=String(e));var n=/(\d+)(\d{3})/,i=t.charAt(0),a=t.charAt(1),o=e.split("."),s=o[0],l=o.length>1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l};Ai.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var ane=/^\w*$/;Ai.templateString=function(e,t){var r={};return e.replace(Ai.TEMPLATE_STRING_REGEX,function(n,i){var a;return ane.test(i)?a=t[i]:(r[i]=r[i]||Ai.nestedProperty(t,i).get,a=r[i](!0)),a!==void 0?a:""})};var Cnt={max:10,count:0,name:"hovertemplate"};Ai.hovertemplateString=e=>nO(j1(_g({},e),{opts:Cnt}));var Lnt={max:10,count:0,name:"texttemplate"};Ai.texttemplateString=e=>nO(j1(_g({},e),{opts:Lnt}));var Pnt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Int(e){var t=e.match(Pnt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Rnt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ai.texttemplateStringForShapes=e=>nO(j1(_g({},e),{opts:Rnt}));var Kie=/^[:|\|]/;function nO({data:e=[],locale:t,fallback:r,labels:n={},opts:i,template:a}){return a.replace(Ai.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),h=["xother_","yother_"].includes(s),d=u||c||h||f;(c||f)&&(s=s.substring(1)),(h||f)&&(s=s.substring(0,s.length-1));let v=null,m=null;if(i.parseMultDiv){var b=Int(s);s=b.key,v=b.op,m=b.number}let p;if(d){if(n[s]===void 0)return"";p=n[s]}else for(let L of e)if(L){if(L.hasOwnProperty(s)){p=L[s];break}if(ane.test(s)||(p=Ai.nestedProperty(L,s).get(!0)),p!==void 0)break}if(p===void 0){let{count:L,max:x,name:C}=i,S=r===!1?o:r;return L<x&&Ai.warn([`Variable '${s}' in ${C} could not be found!`,"Please verify that the template is correct.",`Using value: '${S}'.`].join(" ")),L===x&&Ai.warn(`Too many '${C}' warnings - additional warnings will be suppressed.`),i.count++,S}if(v==="*"&&(p*=m),v==="/"&&(p/=m),l){var k;if(l[0]===":"&&(k=t?t.numberFormat:Ai.numberFormat,p!==""&&(p=k(l.replace(Kie,""))(p))),l[0]==="|"){k=t?t.timeFormat:_nt;var M=Ai.dateTime2ms(p);p=Ai.formatDate(M,l.replace(Kie,""),!1,k)}}else{var T=s+"Label";n.hasOwnProperty(T)&&(p=n[T])}return d&&(p="("+p+")",(c||f)&&(p=" "+p),(h||f)&&(p=p+" ")),p})}var X6=48,Jie=57;Ai.subplotSort=function(e,t){for(var r=Math.min(e.length,t.length)+1,n=0,i=0,a=0;a<r;a++){var o=e.charCodeAt(a)||0,s=t.charCodeAt(a)||0,l=o>=X6&&o<=Jie,u=s>=X6&&s<=Jie;if(l&&(n=10*n+o-X6),u&&(i=10*i+s-X6),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var S3=2e9;Ai.seedPseudoRandom=function(){S3=2e9};Ai.pseudoRandom=function(){var e=S3;return S3=(69069*S3+1)%4294967296,Math.abs(S3-e)<429496729?Ai.pseudoRandom():S3/4294967296};Ai.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=Ai.extractOption(e,t,"htx","hovertext");if(Ai.isValidTextValue(i))return n(i);var a=Ai.extractOption(e,t,"tx","text");if(Ai.isValidTextValue(a))return n(a)};Ai.isValidTextValue=function(e){return e||e===0};Ai.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};Ai.isHidden=function(e){var t=window.getComputedStyle(e).display;return!t||t==="none"};Ai.strTranslate=function(e,t){return e||t?"translate("+e+","+t+")":""};Ai.strRotate=function(e){return e?"rotate("+e+")":""};Ai.strScale=function(e){return e!==1?"scale("+e+")":""};Ai.getTextTransform=function(e){var t=e.noCenter,r=e.textX,n=e.textY,i=e.targetX,a=e.targetY,o=e.anchorX||0,s=e.anchorY||0,l=e.rotate,u=e.scale;return u?u>1&&(u=1):u=0,Ai.strTranslate(i-u*(r+o),a-u*(n+s))+Ai.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};Ai.setTransormAndDisplay=function(e,t){e.attr("transform",Ai.getTextTransform(t)),e.style("display",t.scale?null:"none")};Ai.ensureUniformFontSize=function(e,t){var r=Ai.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};Ai.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)};Ai.bigFont=function(e){return Math.round(1.2*e)};var $ie=Ai.getFirefoxVersion(),Dnt=$ie!==null&&$ie<86;Ai.getPositionFromD3Event=function(){return Dnt?[$S.event.layerX,$S.event.layerY]:[$S.event.offsetX,$S.event.offsetY]}});var une=ye(()=>{"use strict";var Fnt=Pr(),sne={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(aO in sne)lne=aO.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Fnt.addStyleRule(lne,sne[aO]);var lne,aO});var oO=ye((hnr,cne)=>{cne.exports=!0});var lO=ye((dnr,fne)=>{"use strict";var znt=oO(),sO;typeof window.matchMedia=="function"?sO=!window.matchMedia("(hover: none)").matches:sO=znt;fne.exports=sO});var Ab=ye((vnr,uO)=>{"use strict";var k3=typeof Reflect=="object"?Reflect:null,hne=k3&&typeof k3.apply=="function"?k3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Y6;k3&&typeof k3.ownKeys=="function"?Y6=k3.ownKeys:Object.getOwnPropertySymbols?Y6=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Y6=function(t){return Object.getOwnPropertyNames(t)};function qnt(e){console&&console.warn&&console.warn(e)}var vne=Number.isNaN||function(t){return t!==t};function Jc(){Jc.init.call(this)}uO.exports=Jc;uO.exports.once=Unt;Jc.EventEmitter=Jc;Jc.prototype._events=void 0;Jc.prototype._eventsCount=0;Jc.prototype._maxListeners=void 0;var dne=10;function K6(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Jc,"defaultMaxListeners",{enumerable:!0,get:function(){return dne},set:function(e){if(typeof e!="number"||e<0||vne(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");dne=e}});Jc.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Jc.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||vne(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function pne(e){return e._maxListeners===void 0?Jc.defaultMaxListeners:e._maxListeners}Jc.prototype.getMaxListeners=function(){return pne(this)};Jc.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=t==="error",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[t];if(l===void 0)return!1;if(typeof l=="function")hne(l,this,r);else for(var u=l.length,c=xne(l,u),n=0;n<u;++n)hne(c[n],this,r);return!0};function gne(e,t,r,n){var i,a,o;if(K6(r),a=e._events,a===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),o===void 0)o=a[t]=r,++e._eventsCount;else if(typeof o=="function"?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),i=pne(e),i>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,qnt(s)}return e}Jc.prototype.addListener=function(t,r){return gne(this,t,r,!1)};Jc.prototype.on=Jc.prototype.addListener;Jc.prototype.prependListener=function(t,r){return gne(this,t,r,!0)};function Ont(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function mne(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=Ont.bind(n);return i.listener=r,n.wrapFn=i,i}Jc.prototype.once=function(t,r){return K6(r),this.on(t,mne(this,t,r)),this};Jc.prototype.prependOnceListener=function(t,r){return K6(r),this.prependListener(t,mne(this,t,r)),this};Jc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(K6(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,a=o;break}if(a<0)return this;a===0?n.shift():Bnt(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Jc.prototype.off=Jc.prototype.removeListener;Jc.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var a=Object.keys(n),o;for(i=0;i<a.length;++i)o=a[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(t,r[i]);return this};function yne(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?Nnt(i):xne(i,i.length)}Jc.prototype.listeners=function(t){return yne(this,t,!0)};Jc.prototype.rawListeners=function(t){return yne(this,t,!1)};Jc.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):_ne.call(e,t)};Jc.prototype.listenerCount=_ne;function _ne(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Jc.prototype.eventNames=function(){return this._eventsCount>0?Y6(this._events):[]};function xne(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function Bnt(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function Nnt(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function Unt(e,t){return new Promise(function(r,n){function i(o){e.removeListener(t,a),n(o)}function a(){typeof e.removeListener=="function"&&e.removeListener("error",i),r([].slice.call(arguments))}bne(e,t,a,{once:!0}),t!=="error"&&Vnt(e,i,{once:!0})})}function Vnt(e,t,r){typeof e.on=="function"&&bne(e,"error",t,r)}function bne(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(a){n.once&&e.removeEventListener(t,i),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}});var C3=ye((pnr,wne)=>{"use strict";var cO=Ab().EventEmitter,Gnt={init:function(e){if(e._ev instanceof cO)return e;var t=new cO,r=new cO;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,i){t.emit(n,i),r.emit(n,i)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,i=e._ev;if(!i)return;var a=i._events[t];if(!a)return;function o(l){if(l.listener){if(i.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(i,[r])}else return l.apply(i,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s<a.length-1;s++)o(a[s]);return n=o(a[s]),n},purge:function(e){return delete e._ev,delete e.on,delete e.once,delete e.removeListener,delete e.removeAllListeners,delete e.emit,delete e._ev,delete e._internalEv,delete e._internalOn,delete e._internalOnce,delete e._removeInternalListener,delete e._removeAllInternalListeners,e}};wne.exports=Gnt});var Sne=ye((gnr,Ane)=>{"use strict";var Tne=Pr(),Hnt=_b().dfltConfig;function jnt(e,t){for(var r=[],n,i=0;i<t.length;i++)n=t[i],n===e?r[i]=n:typeof n=="object"?r[i]=Array.isArray(n)?Tne.extendDeep([],n):Tne.extendDeepAll({},n):r[i]=n;return r}var Cy={};Cy.add=function(e,t,r,n,i){var a,o;if(e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},o=e.undoQueue.index,e.autoplay){e.undoQueue.inSequence||(e.autoplay=!1);return}!e.undoQueue.sequence||e.undoQueue.beginSequence?(a={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(o,e.undoQueue.queue.length-o,a),e.undoQueue.index+=1):a=e.undoQueue.queue[o-1],e.undoQueue.beginSequence=!1,a&&(a.undo.calls.unshift(t),a.undo.args.unshift(r),a.redo.calls.push(n),a.redo.args.push(i)),e.undoQueue.queue.length>Hnt.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Cy.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Cy.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Cy.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n<r.undo.calls.length;n++)Cy.plotDo(t,r.undo.calls[n],r.undo.args[n]);t.undoQueue.inSequence=!1,t.autoplay=!1}};Cy.redo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n<r.redo.calls.length;n++)Cy.plotDo(t,r.redo.calls[n],r.redo.args[n]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}};Cy.plotDo=function(e,t,r){e.autoplay=!0,r=jnt(e,r),t.apply(null,r)};Ane.exports=Cy});var fO=ye((mnr,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 I3=ye(ed=>{"use strict";var x0=Oa(),QS=Pr(),$6=Gl(),hO=x3(),Wnt=fO(),Xnt=jS(),Znt=_b().configAttributes,Ene=mc(),Ag=QS.extendDeepAll,L3=QS.isPlainObject,Ynt=QS.isArrayOrTypedArray,Q6=QS.nestedProperty,Knt=QS.valObjectMeta,dO="_isSubplotObj",eL="_isLinkedToArray",Jnt="_arrayAttrRegexps",Cne="_deprecated",vO=[dO,eL,Jnt,Cne];ed.IS_SUBPLOT_OBJ=dO;ed.IS_LINKED_TO_ARRAY=eL;ed.DEPRECATED=Cne;ed.UNDERSCORE_ATTRS=vO;ed.get=function(){var e={};return x0.allTypes.forEach(function(t){e[t]=Qnt(t)}),{defs:{valObjects:Knt,metaKeys:vO.concat(["description","role","editType","impliedEdits"]),editType:{traces:Ene.traces,layout:Ene.layout},impliedEdits:{}},traces:e,layout:eat(),frames:tat(),animation:P3(Xnt),config:P3(Znt)}};ed.crawl=function(e,t,r,n){var i=r||0;n=n||"",Object.keys(e).forEach(function(a){var o=e[a];if(vO.indexOf(a)===-1){var s=(n?n+".":"")+a;t(o,a,e,i,s),!ed.isValObject(o)&&L3(o)&&a!=="impliedEdits"&&ed.crawl(o,t,i+1,s)}})};ed.isValObject=function(e){return e&&e.valType!==void 0};ed.findArrayAttributes=function(e){var t=[],r=[],n=[],i,a;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var h=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&s(i,0,"")}function s(l,u,c){var f=l[r[u]],h=c+r[u];if(u===r.length-1)Ynt(f)&&t.push(a+h);else if(n[u]){if(Array.isArray(f))for(var d=0;d<f.length;d++)L3(f[d])&&s(f[d],u+1,h+"["+d+"].")}else L3(f)&&s(f,u+1,h+".")}return i=e,a="",ed.crawl($6,o),e._module&&e._module.attributes&&ed.crawl(e._module.attributes,o),t};ed.getTraceValObject=function(e,t){var r=t[0],n=1,i,a,o=e._module;if(o||(o=(x0.modules[e.type||$6.type.dflt]||{})._module),!o)return!1;if(i=o.attributes,a=i&&i[r],!a){var s=o.basePlotModule;s&&s.attributes&&(a=s.attributes[r])}return a||(a=$6[r]),Lne(a,t,n)};ed.getLayoutValObject=function(e,t){var r=$nt(e,t[0]);return Lne(r,t,1)};function $nt(e,t){var r,n,i,a,o=e._basePlotModules;if(o){var s;for(r=0;r<o.length;r++){if(i=o[r],i.attrRegex&&i.attrRegex.test(t)){if(i.layoutAttrOverrides)return i.layoutAttrOverrides;!s&&i.layoutAttributes&&(s=i.layoutAttributes)}var l=i.baseLayoutAttrOverrides;if(l&&t in l)return l[t]}if(s)return s}var u=e._modules;if(u){for(r=0;r<u.length;r++)if(a=u[r].layoutAttributes,a&&t in a)return a[t]}for(n in x0.componentsRegistry){if(i=x0.componentsRegistry[n],i.name==="colorscale"&&t.indexOf("coloraxis")===0)return i.layoutAttributes[t];if(!i.schema&&t===i.name)return i.layoutAttributes}return t in hO?hO[t]:!1}function Lne(e,t,r){if(!e)return!1;if(e._isLinkedToArray){if(J6(t[r]))r++;else if(r<t.length)return!1}for(;r<t.length;r++){var n=e[t[r]];if(L3(n))e=n;else break;if(r===t.length-1)break;if(e._isLinkedToArray){if(r++,!J6(t[r]))return!1}else if(e.valType==="info_array"){r++;var i=t[r];if(!J6(i))return!1;var a=e.items;if(Array.isArray(a)){if(i>=a.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!J6(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function J6(e){return e===Math.round(e)&&e>=0}function Qnt(e){var t,r;t=x0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=Ag({},$6),a=Ag({},t.attributes);ed.crawl(a,function(l,u,c,f,h){Q6(i,h).set(void 0),l===void 0&&Q6(a,h).set(void 0)}),Ag(n,i),x0.traceIs(e,"noOpacity")&&delete n.opacity,x0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),x0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,Ag(n,a),r.attributes&&Ag(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:P3(n)};if(t.layoutAttributes){var s={};Ag(s,t.layoutAttributes),o.layoutAttributes=P3(s)}return t.animatable||ed.crawl(o,function(l){ed.isValObject(l)&&"anim"in l&&delete l.anim}),o}function eat(){var e={},t,r;Ag(e,hO);for(t in x0.subplotsRegistry)if(r=x0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n<r.attr.length;n++)kne(e,r,r.attr[n]);else{var i=r.attr==="subplot"?r.name:r.attr;kne(e,r,i)}for(t in x0.componentsRegistry){r=x0.componentsRegistry[t];var a=r.schema;if(a&&(a.subplots||a.layout)){var o=a.subplots;if(o&&o.xaxis&&!o.yaxis)for(var s in o.xaxis)delete e.yaxis[s];delete e.xaxis.shift,delete e.xaxis.autoshift}else r.name==="colorscale"?Ag(e,r.layoutAttributes):r.layoutAttributes&&aat(e,r.layoutAttributes,r.name)}return{layoutAttributes:P3(e)}}function tat(){var e={frames:Ag({},Wnt)};return P3(e),e.frames}function P3(e){return rat(e),iat(e),nat(e),e}function rat(e){function t(n){return{valType:"string",editType:"none"}}function r(n,i,a){ed.isValObject(n)?(n.arrayOk===!0||n.valType==="data_array")&&(a[i+"src"]=t(i)):L3(n)&&(n.role="object")}ed.crawl(e,r)}function iat(e){function t(r,n,i){if(r){var a=r[eL];a&&(delete r[eL],i[n]={items:{}},i[n].items[a]=r,i[n].role="object")}}ed.crawl(e,t)}function nat(e){function t(r){for(var n in r)if(L3(r[n]))t(r[n]);else if(Array.isArray(r[n]))for(var i=0;i<r[n].length;i++)t(r[n][i]);else r[n]instanceof RegExp&&(r[n]=r[n].toString())}t(e)}function kne(e,t,r){var n=Q6(e,r),i=Ag({},t.layoutAttributes);i[dO]=!0,n.set(i)}function aat(e,t,r){var n=Q6(e,r);n.set(Ag(n.get()||{},t))}});var vl=ye(Sb=>{"use strict";var R3=Pr(),oat=Gl(),a_="templateitemname",pO={name:{valType:"string",editType:"none"}};pO[a_]={valType:"string",editType:"calc"};Sb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=pO.name,t[a_]=pO[a_],t};Sb.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function i(a){r=R3.coerce(a,{},oat,"type");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:i}};Sb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);R3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};Sb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[Ine(t)],a=n&&n[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[a_]=u[a_];if(!Pne(f))return c._template=i,c;for(var h=0;h<a.length;h++){var d=a[h];if(d.name===f)return o[f]=1,c._template=d,c}return c[r]=u[r]||!1,c._template=!1,c}function l(){for(var u=[],c=0;c<a.length;c++){var f=a[c],h=f.name;if(Pne(h)&&!o[h]){var d={_template:f,name:h,_input:{_templateitemname:h}};d[a_]=f[a_],u.push(d),o[h]=1}}return u}return{newItem:s,defaultItems:l}};function Pne(e){return e&&typeof e=="string"}function Ine(e){var t=e.length-1;return e.charAt(t)!=="s"&&R3.warn("bad argument to arrayDefaultKey: "+e),e.slice(0,-1)+"defaults"}Sb.arrayDefaultKey=Ine;Sb.arrayEditor=function(e,t,r){var n=(R3.nestedProperty(e,t).get()||[]).length,i=r._index,a=i>=n&&(r._input||{})._templateitemname;a&&(i=n);var o=t+"["+i+"]",s;function l(){s={},a&&(s[o]={},s[o][a_]=a)}l();function u(d,v){s[d]=v}function c(d,v){a?R3.nestedProperty(s[o],d).set(v):s[o+"."+d]=v}function f(){var d=s;return l(),d}function h(d,v){d&&c(d,v);var m=f();for(var b in m)R3.nestedProperty(e,b).set(m[b])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var Rh=ye((xnr,Rne)=>{"use strict";var eM=g3().counter;Rne.exports={idRegex:{x:eM("x","( domain)?"),y:eM("y","( domain)?")},attrRegex:eM("[xy]axis"),xAxisMatch:eM("xaxis"),yAxisMatch:eM("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}});var hf=ye(Sp=>{"use strict";var sat=Oa(),gO=Rh();Sp.id2name=function(t){if(!(typeof t!="string"||!t.match(gO.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Sp.name2id=function(t){if(t.match(gO.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Sp.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(gO.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(i&&n?" domain":"")}};Sp.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=Sp.listIds(e,t),a=new Array(i.length),o;for(o=0;o<i.length;o++){var s=i[o];a[o]=n[s.charAt(0)+"axis"+s.slice(1)]}if(!r){var l=n._subplots.gl3d||[];for(o=0;o<l.length;o++){var u=n[l[o]];t?a.push(u[t+"axis"]):a.push(u.xaxis,u.yaxis,u.zaxis)}}return a};Sp.listIds=function(e,t){var r=e._fullLayout;if(!r)return[];var n=r._subplots;return t?n[t+"axis"]:n.xaxis.concat(n.yaxis)};Sp.getFromId=function(e,t,r){var n=e._fullLayout;return t=t===void 0||typeof t!="string"?t:t.replace(" domain",""),r==="x"?t=t.replace(/y[0-9]*/,""):r==="y"&&(t=t.replace(/x[0-9]*/,"")),n[Sp.id2name(t)]};Sp.getFromTrace=function(e,t,r){var n=e._fullLayout,i=null;if(sat.traceIs(t,"gl3d")){var a=t.scene;a.slice(0,5)==="scene"&&(i=n[a][r+"axis"])}else i=Sp.getFromId(e,t[r+"axis"]||r);return i};Sp.idSort=function(e,t){var r=e.charAt(0),n=t.charAt(0);return r!==n?r>n?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Sp.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Dne(e,t){if(t&&t.length){for(var r=0;r<t.length;r++)if(t[r][e])return!0}return!1}Sp.isLinked=function(e,t){return Dne(t,e._axisMatchGroups)||Dne(t,e._axisConstraintGroups)}});var o_=ye((wnr,Fne)=>{"use strict";function lat(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function uat(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}Fne.exports={clearOutlineControllers:lat,clearOutline:uat}});var tL=ye((Tnr,zne)=>{"use strict";zne.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var Id=ye(iL=>{"use strict";var rL=Oa(),Anr=Rh().SUBPLOT_PATTERN;iL.getSubplotCalcData=function(e,t,r){var n=rL.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o<e.length;o++){var s=e[o],l=s[0].trace;l[i]===r&&a.push(s)}return a};iL.getModuleCalcData=function(e,t,r){var n=[],i=[],a;if(typeof t=="string"?a=rL.getModule(t).plot:typeof t=="function"?a=t:a=t.plot,!a)return[n,e];for(var o=r,s=0;s<e.length;s++){var l=e[s],u=l[0].trace,c=u.zorder!==void 0;u.visible!==!0||u._length===0||(u._module&&u._module.plot===a&&(!c||u.zorder===o)?n.push(l):i.push(l))}return[n,i]};iL.getSubplotData=function(t,r,n){if(!rL.subplotsRegistry[r])return[];for(var i=rL.subplotsRegistry[r].attr,a=[],o,s,l,u=0;u<t.length;u++)o=t[u],o[i]===n&&a.push(o);return a}});var Nne=ye(Mb=>{"use strict";var cat=Oa(),D3=Pr();Mb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=Mb.hasSimpleAPICommandBindings(e,r,i.lookupTable);if(t&&t._commandObserver){if(o)return i;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,i}if(o){qne(e,o,i.cache),i.check=function(){if(a){var c=qne(e,o,i.cache);return c.changed&&n&&i.lookupTable[c.value]!==void 0&&(i.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:i.lookupTable[c.value]})).then(i.enable,i.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l<s.length;l++)e._internalOn(s[l],i.check);i.remove=function(){for(var u=0;u<s.length;u++)e._removeInternalListener(s[u],i.check)}}else D3.log("Unable to automatically bind plot updates to API command"),i.lookupTable={},i.remove=function(){};return i.disable=function(){a=!1},i.enable=function(){a=!0},t&&(t._commandObserver=i),i};Mb.hasSimpleAPICommandBindings=function(e,t,r){var n,i=t.length,a;for(n=0;n<i;n++){var o,s=t[n],l=s.method,u=s.args;if(Array.isArray(u)||(u=[]),!l)return!1;var c=Mb.computeAPICommandBindings(e,l,u);if(c.length!==1)return!1;if(!a)a=c[0],Array.isArray(a.traces)&&a.traces.sort();else{if(o=c[0],o.type!==a.type||o.prop!==a.prop)return!1;if(Array.isArray(a.traces))if(Array.isArray(o.traces)){o.traces.sort();for(var f=0;f<a.traces.length;f++)if(a.traces[f]!==o.traces[f])return!1}else return!1;else if(o.prop!==a.prop)return!1}o=c[0];var h=o.value;if(Array.isArray(h))if(h.length===1)h=h[0];else return!1;r&&(r[h]=n)}return a};function qne(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=D3.nestedProperty(n,t.prop).get(),a=r[t.type]=r[t.type]||{},a.hasOwnProperty(t.prop)&&a[t.prop]!==i&&(o=!0),a[t.prop]=i,{changed:o,value:i}}Mb.executeAPICommand=function(e,t,r){if(t==="skip")return Promise.resolve();var n=cat.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 D3.warn("API call to Plotly."+t+" rejected.",o),Promise.reject(o)})};Mb.computeAPICommandBindings=function(e,t,r){var n;switch(Array.isArray(r)||(r=[]),t){case"restyle":n=Bne(e,r);break;case"relayout":n=One(e,r);break;case"update":n=Bne(e,[r[0],r[2]]).concat(One(e,[r[1]]));break;case"animate":n=fat(e,r);break;default:n=[]}return n};function fat(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 One(e,t){var r=[],n=t[0],i={};if(typeof n=="string")i[n]=t[1];else if(D3.isPlainObject(n))i=n;else return r;return mO(i,function(a,o,s){r.push({type:"layout",prop:a,value:s})},"",0),r}function Bne(e,t){var r,n,i,a,o=[];if(n=t[0],i=t[1],r=t[2],a={},typeof n=="string")a[n]=i;else if(D3.isPlainObject(n))a=n,r===void 0&&(r=i);else return o;return r===void 0&&(r=null),mO(a,function(s,l,u){var c,f;if(Array.isArray(u)){f=u.slice();var h=Math.min(f.length,e.data.length);r&&(h=Math.min(h,r.length)),c=[];for(var d=0;d<h;d++)c[d]=r?r[d]:d}else f=u,c=r?r.slice():null;if(c===null)Array.isArray(f)&&(f=f[0]);else if(Array.isArray(c)){if(!Array.isArray(f)){var v=f;f=[];for(var m=0;m<c.length;m++)f[m]=v}f.length=Math.min(c.length,f.length)}o.push({type:"data",prop:s,traces:c,value:f})},"",0),o}function mO(e,t,r,n){Object.keys(e).forEach(function(i){var a=e[i];if(i[0]!=="_"){var o=r+(n>0?".":"")+i;D3.isPlainObject(a)?mO(a,t,o,n+1):t(o,i,a)}})}});var Mc=ye((Enr,eae)=>{"use strict";var Xne=qa(),hat=h3().timeFormatLocale,dat=Mq().formatLocale,tM=Eo(),vat=Eq(),Xl=Oa(),Zne=I3(),pat=vl(),Ga=Pr(),Yne=ka(),Une=fs().BADNUM,Mp=hf(),gat=o_().clearOutline,mat=tL(),yO=jS(),yat=fO(),_at=Id().getModuleCalcData,Vne=Ga.relinkPrivateKeys,Eb=Ga._,xa=eae.exports={};Ga.extendFlat(xa,Xl);xa.attributes=Gl();xa.attributes.type.values=xa.allTypes;xa.fontAttrs=ec();xa.layoutAttributes=x3();var aL=Nne();xa.executeAPICommand=aL.executeAPICommand;xa.computeAPICommandBindings=aL.computeAPICommandBindings;xa.manageCommandObserver=aL.manageCommandObserver;xa.hasSimpleAPICommandBindings=aL.hasSimpleAPICommandBindings;xa.redrawText=function(e){return e=Ga.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Xl.getComponentMethod("annotations","draw")(e),Xl.getComponentMethod("legend","draw")(e),Xl.getComponentMethod("colorbar","draw")(e),t(xa.previousPromises(e)))},300)})};xa.resize=function(e){e=Ga.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||Ga.isHidden(e))&&i(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Ga.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Xl.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};xa.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};xa.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Ga.ensureSingle(t._paper,"text","js-plot-link-container",function(l){l.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Yne.defaultLine,"pointer-events":"all"}).each(function(){var u=Xne.select(this);u.append("tspan").classed("js-link-to-tool",!0),u.append("tspan").classed("js-link-spacer",!0),u.append("tspan").classed("js-sourcelinks",!0)})}),n=r.node(),i={y:t._paper.attr("height")-9};document.body.contains(n)&&n.getComputedTextLength()>=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var a=r.select(".js-link-to-tool"),o=r.select(".js-link-spacer"),s=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&xat(e,a),o.text(a.text()&&s.text()?" - ":"")}};function xat(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)r.on("click",function(){xa.sendDataToCloud(e)});else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}xa.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Xne.select(e).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"}),i=n.append("input").attr({type:"text",name:"data"});return i.node().value=xa.graphJson(e,!1,"keepdata"),n.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var bat=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],wat=["year","month","dayMonth","dayMonthYear"];xa.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var i=e._fullLayout={},a=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||xa.createTransitionData(e),i._dfltTitle={plot:Eb(e,"Click to enter Plot title"),subtitle:Eb(e,"Click to enter Plot subtitle"),x:Eb(e,"Click to enter X axis title"),y:Eb(e,"Click to enter Y axis title"),colorbar:Eb(e,"Click to enter Colorscale title"),annotation:Eb(e,"new text")},i._traceWord=Eb(e,"trace");var h=Gne(e,bat);if(i._mapboxAccessToken=c.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,v=n.height;xa.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=v),xa.sanitizeMargins(i)}else{xa.supplyLayoutGlobalDefaults(a,i,h);var m=!a.width||!a.height,b=i.autosize,p=c.autosizable,k=m&&(b||p);k?xa.plotAutoSize(e,a,i):m&&xa.sanitizeMargins(i),!b&&m&&(a.width=i.width,a.height=i.height)}i._d3locale=Sat(h,i.separators),i._extraFormat=Gne(e,wat),i._initialAutoSizeIsDone=!0,i._dataLength=l.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var M=i._subplots=Aat(),T=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=Tat(o,l),xa.supplyDataDefaults(l,s,a,i);var x=Object.keys(T.x),C=Object.keys(T.y);if(x.length>1&&C.length>1){for(Xl.getComponentMethod("grid","sizeDefaults")(a,i),f=0;f<x.length;f++)Ga.pushUnique(M.xaxis,x[f]);for(f=0;f<C.length;f++)Ga.pushUnique(M.yaxis,C[f]);for(var S in L)Ga.pushUnique(M.cartesian,S)}if(i._has=xa._hasPlotType.bind(i),o.length===s.length)for(f=0;f<s.length;f++)Vne(s[f],o[f]);xa.supplyLayoutModuleDefaults(a,i,s,e._transitionData);var g=i._visibleModules,P=[];for(f=0;f<g.length;f++){var E=g[f].crossTraceDefaults;E&&Ga.pushUnique(P,E)}for(f=0;f<P.length;f++)P[f](s,i);i._hasOnlyLargeSploms=i._basePlotModules.length===1&&i._basePlotModules[0].name==="splom"&&x.length>15&&C.length>15&&i.shapes.length===0&&i.images.length===0,xa.linkSubplots(s,i,o,n),xa.cleanPlot(s,i,o,n);var z=!!(n._has&&n._has("cartesian")),q=!!(i._has&&i._has("cartesian")),U=z,G=q;U&&!G?n._bgLayer.remove():G&&!U&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&gat({_fullLayout:n}),Mat(s,i),Vne(i,n),Xl.getComponentMethod("colorscale","crossTraceDefaults")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var Z=i._tracePreGUI,j={},N;for(N in Z)j[N]="old";for(f=0;f<s.length;f++)N=s[f]._fullInput.uid,j[N]||(Z[N]={}),j[N]="new";for(N in j)j[N]==="old"&&delete Z[N];Kne(i),Xl.getComponentMethod("rangeslider","makeData")(i),!r&&u.length===s.length&&xa.supplyDefaultsUpdateCalc(u,s)};xa.supplyDefaultsUpdateCalc=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=(e[r]||[])[0];if(i&&i.trace){var a=i.trace;if(a._hasCalcTransform){var o=a._arrayAttrs,s,l,u;for(s=0;s<o.length;s++)l=o[s],u=Ga.nestedProperty(a,l).get().slice(),Ga.nestedProperty(n,l).set(u)}i.trace=n}}};function Tat(e,t){var r=t.length,n=[],i,a;for(i=0;i<e.length;i++){var o=e[i]._fullInput;o!==a&&n.push(o),a=o}var s=n.length,l=new Array(r),u={};function c(d,v){l[v]=d,u[d]=1}function f(d,v){if(d&&typeof d=="string"&&!u[d])return c(d,v),!0}for(i=0;i<r;i++){var h=t[i].uid;typeof h=="number"&&(h=String(h)),!f(h,i)&&(i<s&&f(n[i].uid,i)||c(Ga.randstr(u),i))}return l}function Aat(){var e=Xl.collectableSubplotTypes,t={},r,n;if(!e){e=[];var i=Xl.subplotsRegistry;for(var a in i){var o=i[a],s=o.attr;if(s&&(e.push(a),Array.isArray(s)))for(n=0;n<s.length;n++)Ga.pushUnique(e,s[n])}}for(r=0;r<e.length;r++)t[e[r]]=[];return t}function Gne(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,i={};function a(f){for(var h=!0,d=0;d<t.length;d++){var v=t[d];i[v]||(f[v]?i[v]=f[v]:h=!1)}h&&(n=!0)}for(var o=0;o<2;o++){for(var s=e._context.locales,l=0;l<2;l++){var u=(s[r]||{}).format;if(u&&(a(u),n))break;s=Xl.localeRegistry}var c=r.split("-")[0];if(n||c===r)break;r=c}return n||a(Xl.localeRegistry.en.format),i}function Sat(e,t){return e.decimal=t.charAt(0),e.thousands=t.charAt(1),{numberFormat:function(r){try{r=dat(e).format(Ga.adjustFormat(r))}catch(n){return Ga.warnBadFormat(r),Ga.noFormat}return r},timeFormat:hat(e).utcFormat}}function Mat(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i<e.length;i++){var a=e[i];a.meta?n[a.index]=a._meta={meta:a.meta}:t.meta&&(a._meta={meta:t.meta}),t.meta&&(a._meta.layout={meta:t.meta})}n.length&&(r||(r=t._meta={}),r.data=n)}xa.createTransitionData=function(e){e._transitionData||(e._transitionData={}),e._transitionData._frames||(e._transitionData._frames=[]),e._transitionData._frameHash||(e._transitionData._frameHash={}),e._transitionData._counter||(e._transitionData._counter=0),e._transitionData._interruptCallbacks||(e._transitionData._interruptCallbacks=[])};xa._hasPlotType=function(e){var t,r=this._basePlotModules||[];for(t=0;t<r.length;t++)if(r[t].name===e)return!0;var n=this._modules||[];for(t=0;t<n.length;t++){var i=n[t].name;if(i===e)return!0;var a=Xl.modules[i];if(a&&a.categories[e])return!0}return!1};xa.cleanPlot=function(e,t,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(e,t,r,n)}var l=n._has&&n._has("gl"),u=t._has&&t._has("gl");l&&!u&&n._glcontainer!==void 0&&(n._glcontainer.selectAll(".gl-canvas").remove(),n._glcontainer.selectAll(".no-webgl").remove(),n._glcanvas=null);var c=!!n._infolayer;e:for(i=0;i<r.length;i++){var f=r[i],h=f.uid;for(a=0;a<e.length;a++){var d=e[a];if(h===d.uid)continue e}c&&n._infolayer.select(".cb"+h).remove()}};xa.linkSubplots=function(e,t,r,n){var i,a,o=n._plots||{},s=t._plots={},l=t._subplots,u={_fullData:e,_fullLayout:t},c=l.cartesian||[];for(i=0;i<c.length;i++){var f=c[i],h=o[f],d=Mp.getFromId(u,f,"x"),v=Mp.getFromId(u,f,"y"),m;for(h?m=s[f]=h:(m=s[f]={},m.id=f),d._counterAxes.push(v._id),v._counterAxes.push(d._id),d._subplotsWith.push(f),v._subplotsWith.push(f),m.xaxis=d,m.yaxis=v,m._hasClipOnAxisFalse=!1,a=0;a<e.length;a++){var b=e[a];if(b.xaxis===m.xaxis._id&&b.yaxis===m.yaxis._id&&b.cliponaxis===!1){m._hasClipOnAxisFalse=!0;break}}}var p=Mp.list(u,null,!0),k;for(i=0;i<p.length;i++){k=p[i];var M=null;k.overlaying&&(M=Mp.getFromId(u,k.overlaying),M&&M.overlaying&&(k.overlaying=!1,M=null)),k._mainAxis=M||k,M&&(k.domain=M.domain.slice()),k._anchorAxis=k.anchor==="free"?null:Mp.getFromId(u,k.anchor)}for(i=0;i<p.length;i++)if(k=p[i],k._counterAxes.sort(Mp.idSort),k._subplotsWith.sort(Ga.subplotSort),k._mainSubplot=Eat(k,t),k._counterAxes.length&&(k.spikemode&&k.spikemode.indexOf("across")!==-1||k.automargin&&k.mirror&&k.anchor!=="free"||Xl.getComponentMethod("rangeslider","isVisible")(k))){var T=1,L=0;for(a=0;a<k._counterAxes.length;a++){var x=Mp.getFromId(u,k._counterAxes[a]);T=Math.min(T,x.domain[0]),L=Math.max(L,x.domain[1])}T<L&&(k._counterDomainMin=T,k._counterDomainMax=L)}};function Eat(e,t){var r={_fullLayout:t},n=e._id.charAt(0)==="x",i=e._mainAxis._anchorAxis,a="",o="",s="";if(i&&(s=i._mainAxis._id,a=n?e._id+s:s+e._id),!a||!t._plots[a]){a="";for(var l=e._counterAxes,u=0;u<l.length;u++){var c=l[u],f=n?e._id+c:c+e._id;o||(o=f);var h=Mp.getFromId(r,c);if(s&&h.overlaying===s){a=f;break}}}return a||o}xa.clearExpandedTraceDefaultColors=function(e){var t,r,n;function i(o,s,l,u){r[u]=s,r.length=u+1,o.valType==="color"&&o.dflt===void 0&&t.push(r.join("."))}for(r=[],t=e._module._colorAttrs,t||(e._module._colorAttrs=t=[],Zne.crawl(e._module.attributes,i)),n=0;n<t.length;n++){var a=Ga.nestedProperty(e,"_input."+t[n]);a.get()||Ga.nestedProperty(e,t[n]).set(null)}};xa.supplyDataDefaults=function(e,t,r,n){var i=n._modules,a=n._visibleModules,o=n._basePlotModules,s=0,l=0,u,c,f;n._transformModules=[];function h(k){t.push(k);var M=k._module;M&&(Ga.pushUnique(i,M),k.visible===!0&&Ga.pushUnique(a,M),Ga.pushUnique(o,k._module.basePlotModule),s++,k._input.visible!==!1&&l++)}var d={},v=[],m=(r.template||{}).data||{},b=pat.traceTemplater(m);for(u=0;u<e.length;u++)f=e[u],c=b.newTrace(f),c.uid=n._traceUids[u],xa.supplyTraceDefaults(f,c,l,n,u),c.index=u,c._input=f,c._fullInput=c,h(c),Xl.traceIs(c,"carpetAxis")&&(d[c.carpet]=c),Xl.traceIs(c,"carpetDependent")&&v.push(u);for(u=0;u<v.length;u++)if(c=t[v[u]],!!c.visible){var p=d[c.carpet];if(c._carpet=p,!p||!p.visible){c.visible=!1;continue}c.xaxis=p.xaxis,c.yaxis=p.yaxis}};xa.supplyAnimationDefaults=function(e){e=e||{};var t,r={};function n(i,a){return Ga.coerce(e||{},r,yO,i,a)}if(n("mode"),n("direction"),n("fromcurrent"),Array.isArray(e.frame))for(r.frame=[],t=0;t<e.frame.length;t++)r.frame[t]=xa.supplyAnimationFrameDefaults(e.frame[t]||{});else r.frame=xa.supplyAnimationFrameDefaults(e.frame||{});if(Array.isArray(e.transition))for(r.transition=[],t=0;t<e.transition.length;t++)r.transition[t]=xa.supplyAnimationTransitionDefaults(e.transition[t]||{});else r.transition=xa.supplyAnimationTransitionDefaults(e.transition||{});return r};xa.supplyAnimationFrameDefaults=function(e){var t={};function r(n,i){return Ga.coerce(e||{},t,yO.frame,n,i)}return r("duration"),r("redraw"),t};xa.supplyAnimationTransitionDefaults=function(e){var t={};function r(n,i){return Ga.coerce(e||{},t,yO.transition,n,i)}return r("duration"),r("easing"),t};xa.supplyFrameDefaults=function(e){var t={};function r(n,i){return Ga.coerce(e,t,yat,n,i)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),t};xa.supplyTraceDefaults=function(e,t,r,n,i){var a=n.colorway||Yne.defaults,o=a[r%a.length],s;function l(M,T){return Ga.coerce(e,t,xa.attributes,M,T)}var u=l("visible");l("type"),l("name",n._traceWord+" "+i),l("uirevision",n.uirevision);var c=xa.getModule(t);if(t._module=c,c){var f=c.basePlotModule,h=f.attr,d=f.attributes;if(h&&d){var v=n._subplots,m="";if(Array.isArray(h))for(s=0;s<h.length;s++){var b=h[s],p=Ga.coerce(e,t,d,b);v[b]&&Ga.pushUnique(v[b],p),m+=p}else m=Ga.coerce(e,t,d,h);v[f.name]&&Ga.pushUnique(v[f.name],m)}}if(u&&(l("customdata"),l("ids"),l("meta"),Xl.traceIs(t,"showLegend")?(Ga.coerce(e,t,c.attributes.showlegend?c.attributes:xa.attributes,"showlegend"),Ga.coerce(e,t,c.attributes.legend?c.attributes:xa.attributes,"legend"),l("legendwidth"),l("legendgroup"),l("legendgrouptitle.text"),l("legendrank"),t._dfltShowLegend=!0):t._dfltShowLegend=!1,c&&c.supplyDefaults(e,t,o,n),Xl.traceIs(t,"noOpacity")||l("opacity"),Xl.traceIs(t,"notLegendIsolatable")&&(t.visible=!!t.visible),Xl.traceIs(t,"noHover")||(t.hovertemplate||Ga.coerceHoverinfo(e,t,n),t.type!=="parcats"&&Xl.getComponentMethod("fx","supplyDefaults")(e,t,o,n)),c&&c.selectPoints)){var k=l("selectedpoints");Ga.isTypedArray(k)&&(t.selectedpoints=Array.from(k))}return t};xa.supplyLayoutGlobalDefaults=function(e,t,r){function n(f,h){return Ga.coerce(e,t,xa.layoutAttributes,f,h)}var i=e.template;Ga.isPlainObject(i)&&(t.template=i,t._template=i.layout,t._dataTemplate=i.data),n("autotypenumbers");var a=Ga.coerceFont(n,"font"),o=a.size;Ga.coerceFont(n,"title.font",a,{overrideDflt:{size:Math.round(o*1.4)}}),n("title.text",t._dfltTitle.plot),n("title.xref");var s=n("title.yref");n("title.pad.t"),n("title.pad.r"),n("title.pad.b"),n("title.pad.l");var l=n("title.automargin");n("title.x"),n("title.xanchor"),n("title.y"),n("title.yanchor"),n("title.subtitle.text",t._dfltTitle.subtitle),Ga.coerceFont(n,"title.subtitle.font",a,{overrideDflt:{size:Math.round(t.title.font.size*.7)}}),l&&(s==="paper"&&(t.title.y!==0&&(t.title.y=1),t.title.yanchor==="auto"&&(t.title.yanchor=t.title.y===0?"top":"bottom")),s==="container"&&(t.title.y==="auto"&&(t.title.y=1),t.title.yanchor==="auto"&&(t.title.yanchor=t.title.y<.5?"bottom":"top")));var u=n("uniformtext.mode");u&&n("uniformtext.minsize"),n("autosize",!(e.width&&e.height)),n("width"),n("height"),n("minreducedwidth"),n("minreducedheight"),n("margin.l"),n("margin.r"),n("margin.t"),n("margin.b"),n("margin.pad"),n("margin.autoexpand"),e.width&&e.height&&xa.sanitizeMargins(t),Xl.getComponentMethod("grid","sizeDefaults")(e,t),n("paper_bgcolor"),n("separators",r.decimal+r.thousands),n("hidesources"),n("colorway"),n("datarevision");var c=n("uirevision");n("editrevision",c),n("selectionrevision",c),Xl.getComponentMethod("modebar","supplyLayoutDefaults")(e,t),Xl.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(e,t,n),Xl.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(e,t,n),n("meta"),Ga.isPlainObject(e.transition)&&(n("transition.duration"),n("transition.easing"),n("transition.ordering")),Xl.getComponentMethod("calendars","handleDefaults")(e,t,"calendar"),Xl.getComponentMethod("fx","supplyLayoutGlobalDefaults")(e,t,n),Ga.coerce(e,t,mat,"scattermode")};function nL(e){return typeof e=="string"&&e.slice(-2)==="px"&&parseFloat(e)}xa.plotAutoSize=function(t,r,n){var i=t._context||{},a=i.frameMargins,o,s,l=Ga.isPlotDiv(t);if(l&&t.emit("plotly_autosize"),i.fillFrame)o=window.innerWidth,s=window.innerHeight,document.body.style.overflow="hidden";else{var u=l?window.getComputedStyle(t):{};if(o=nL(u.width)||nL(u.maxWidth)||n.width,s=nL(u.height)||nL(u.maxHeight)||n.height,tM(a)&&a>0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=xa.layoutAttributes.width.min,h=xa.layoutAttributes.height.min;o<f&&(o=f),s<h&&(s=h);var d=!r.width&&Math.abs(n.width-o)>1,v=!r.height&&Math.abs(n.height-s)>1;(v||d)&&(d&&(n.width=o),v&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),xa.sanitizeMargins(n)};xa.supplyLayoutModuleDefaults=function(e,t,r,n){var i=Xl.componentsRegistry,a=t._basePlotModules,o,s,l,u=Xl.subplotsRegistry.cartesian;for(o in i)l=i[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has("cartesian")&&(Xl.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ga.subplotSort);for(s=0;s<a.length;s++)l=a[s],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r);var f=t._modules;for(s=0;s<f.length;s++)l=f[s],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r);var h=t._transformModules;for(s=0;s<h.length;s++)l=h[s],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r,n);for(o in i)l=i[o],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r)};xa.purge=function(e){var t=e._fullLayout||{};t._glcontainer!==void 0&&(t._glcontainer.selectAll(".gl-canvas").remove(),t._glcontainer.remove(),t._glcanvas=null),t._modeBar&&t._modeBar.destroy(),e._transitionData&&(e._transitionData._interruptCallbacks&&(e._transitionData._interruptCallbacks.length=0),e._transitionData._animationRaf&&window.cancelAnimationFrame(e._transitionData._animationRaf)),Ga.clearThrottle(),Ga.clearResponsive(e),delete e.data,delete e.layout,delete e._fullData,delete e._fullLayout,delete e.calcdata,delete e.empty,delete e.fid,delete e.undoqueue,delete e.undonum,delete e.autoplay,delete e.changed,delete e._promises,delete e._redrawTimer,delete e._hmlumcount,delete e._hmpixcount,delete e._transitionData,delete e._transitioning,delete e._initialAutoSize,delete e._transitioningWithDuration,delete e._dragging,delete e._dragged,delete e._dragdata,delete e._hoverdata,delete e._snapshotInProgress,delete e._editing,delete e._mouseDownTime,delete e._legendMouseDownTime,e.removeAllListeners&&e.removeAllListeners()};xa.style=function(e){var t=e._fullLayout._visibleModules,r=[],n;for(n=0;n<t.length;n++){var i=t[n];i.style&&Ga.pushUnique(r,i.style)}for(n=0;n<r.length;n++)r[n](e)};xa.sanitizeMargins=function(e){if(!(!e||!e.margin)){var t=e.width,r=e.height,n=e.margin,i=t-(n.l+n.r),a=r-(n.t+n.b),o;i<0&&(o=(t-1)/(n.l+n.r),n.l=Math.floor(o*n.l),n.r=Math.floor(o*n.r)),a<0&&(o=(r-1)/(n.t+n.b),n.t=Math.floor(o*n.t),n.b=Math.floor(o*n.b))}};xa.clearAutoMarginIds=function(e){e._fullLayout._pushmarginIds={}};xa.allowAutoMargin=function(e,t){e._fullLayout._pushmarginIds[t]=1};function Kne(e){var t=e.margin;if(!e._size){var r=e._size={l:Math.round(t.l),r:Math.round(t.r),t:Math.round(t.t),b:Math.round(t.b),p:Math.round(t.pad)};r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b}e._pushmargin||(e._pushmargin={}),e._pushmarginIds||(e._pushmarginIds={}),e._reservedMargin||(e._reservedMargin={})}var Jne=2,$ne=2;xa.autoMargin=function(e,t,r){var n=e._fullLayout,i=n.width,a=n.height,o=n.margin,s=n.minreducedwidth,l=n.minreducedheight,u=Ga.constrain(i-o.l-o.r,Jne,s),c=Ga.constrain(a-o.t-o.b,$ne,l),f=Math.max(0,i-u),h=Math.max(0,a-c),d=n._pushmargin,v=n._pushmarginIds;if(o.autoexpand!==!1){if(!r)delete d[t],delete v[t];else{var m=r.pad;if(m===void 0&&(m=Math.min(12,o.l,o.r,o.t,o.b)),f){var b=(r.l+r.r)/f;b>1&&(r.l/=b,r.r/=b)}if(h){var p=(r.t+r.b)/h;p>1&&(r.t/=p,r.b/=p)}var k=r.xl!==void 0?r.xl:r.x,M=r.xr!==void 0?r.xr:r.x,T=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;d[t]={l:{val:k,size:r.l+m},r:{val:M,size:r.r+m},b:{val:L,size:r.b+m},t:{val:T,size:r.t+m}},v[t]=1}if(!n._replotting)return xa.doAutoMargin(e)}};function kat(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Mp.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}xa.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Kne(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Ga.extendFlat({},i),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,d=t._pushmarginIds,v=t.minreducedwidth,m=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var p=e._fullLayout._reservedMargin;for(var k in p)for(var M in p[k]){var T=p[k][M];o[M]=Math.max(o[M],T)}h.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var L in o){var x=0;for(var C in h)C!=="base"&&tM(h[C][L].size)&&(x=h[C][L].size>x?h[C][L].size:x);var S=Math.max(0,a[L]-x);o[L]=Math.max(0,o[L]-S)}for(var g in h){var P=h[g].l||{},E=h[g].b||{},z=P.val,q=P.size,U=E.val,G=E.size,Z=r-o.r-o.l,j=n-o.t-o.b;for(var N in h){if(tM(q)&&h[N].r){var H=h[N].r.val,re=h[N].r.size;if(H>z){var oe=(q*H+(re-Z)*z)/(H-z),_e=(re*(1-z)+(q-Z)*(1-H))/(H-z);oe+_e>l+u&&(l=oe,u=_e)}}if(tM(G)&&h[N].t){var ke=h[N].t.val,Ce=h[N].t.size;if(ke>U){var ge=(G*ke+(Ce-j)*U)/(ke-U),ie=(Ce*(1-U)+(G-j)*(1-ke))/(ke-U);ge+ie>f+c&&(f=ge,c=ie)}}}}}var Se=Ga.constrain(r-a.l-a.r,Jne,v),Ee=Ga.constrain(n-a.t-a.b,$ne,m),we=Math.max(0,r-Se),De=Math.max(0,n-Ee);if(we){var Le=(l+u)/we;Le>1&&(l/=Le,u/=Le)}if(De){var me=(f+c)/De;me>1&&(f/=me,c/=me)}if(i.l=Math.round(l)+o.l,i.r=Math.round(u)+o.r,i.t=Math.round(c)+o.t,i.b=Math.round(f)+o.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(xa.didMarginChange(s,i)||kat(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Pe=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount<Pe)return Xl.call("_doPlot",e);t._size=s,Ga.warn("Too many auto-margin redraws.")}Cat(e)};function Cat(e){var t=Mp.list(e,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var n=0;n<t.length;n++){var i=t[n][r];i&&i()}})}var Hne=["l","r","t","b","p","w","h"];xa.didMarginChange=function(e,t){for(var r=0;r<Hne.length;r++){var n=Hne[r],i=e[n],a=t[n];if(!tM(i)||Math.abs(a-i)>1)return!0}return!1};xa.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&xa.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(Ga.isPlainObject(h)){var v={},m;return Object.keys(h).sort().forEach(function(M){if(["_","["].indexOf(M.charAt(0))===-1){if(typeof h[M]=="function"){d&&(v[M]="_function");return}if(r==="keepdata"){if(M.slice(-3)==="src")return}else if(r==="keepstream"){if(m=h[M+"src"],typeof m=="string"&&m.indexOf(":")>0&&!Ga.isPlainObject(h.stream))return}else if(r!=="keepall"&&(m=h[M+"src"],typeof m=="string"&&m.indexOf(":")>0))return;v[M]=u(h[M],d)}}),v}var b=Array.isArray(h),p=Ga.isTypedArray(h);if((b||p)&&h.dtype&&h.shape){var k=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Ga.isArrayBuffer(k)?vat.encode(k):k},d)}return b?h.map(function(M){return u(M,d)}):p?Ga.simpleMap(h,Ga.identity):Ga.isJSDate(h)?Ga.ms2DateTimeLocal(+h):h}var c={data:(o||[]).map(function(h){var d=u(h);return t&&delete d.fit,d})};if(!t&&(c.layout=u(s),i)){var f=s._size;c.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return l&&(c.frames=u(l)),a&&(c.config=u(e._context,!0)),n==="object"?c:JSON.stringify(c)};xa.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r<t.length;r++)switch(n=t[r],n.type){case"replace":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case"insert":i=n.value,o[i.name]=i,a.splice(n.index,0,i);break;case"delete":i=a[n.index],delete o[i.name],a.splice(n.index,1);break}return Promise.resolve()};xa.computeFrame=function(e,t){var r=e._transitionData._frameHash,n,i,a,o;if(!t)throw new Error("computeFrame must be given a string frame name");var s=r[t.toString()];if(!s)return!1;for(var l=[s],u=[s.name];s.baseframe&&(s=r[s.baseframe.toString()])&&u.indexOf(s.name)===-1;)l.push(s),u.push(s.name);for(var c={};s=l.pop();)if(s.layout&&(c.layout=xa.extendLayout(c.layout,s.layout)),s.data){if(c.data||(c.data=[]),i=s.traces,!i)for(i=[],n=0;n<s.data.length;n++)i[n]=n;for(c.traces||(c.traces=[]),n=0;n<s.data.length;n++)a=i[n],a!=null&&(o=c.traces.indexOf(a),o===-1&&(o=c.data.length,c.traces[o]=a),c.data[o]=xa.extendTrace(c.data[o],s.data[n]))}return c};xa.recomputeFrameHash=function(e){for(var t=e._transitionData._frameHash={},r=e._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(t[i.name]=i)}};xa.extendObjectWithContainers=function(e,t,r){var n,i,a,o,s,l,u,c,f=Ga.extendDeepNoArrays({},t||{}),h=Ga.expandObjectPaths(f),d={};if(r&&r.length)for(a=0;a<r.length;a++)n=Ga.nestedProperty(h,r[a]),i=n.get(),i===void 0?Ga.nestedProperty(d,r[a]).set(null):(n.set(null),Ga.nestedProperty(d,r[a]).set(i));if(e=Ga.extendDeepNoArrays(e||{},h),r&&r.length){for(a=0;a<r.length;a++)if(s=Ga.nestedProperty(d,r[a]),u=s.get(),!!u){for(l=Ga.nestedProperty(e,r[a]),c=l.get(),Array.isArray(c)||(c=[],l.set(c)),o=0;o<u.length;o++){var v=u[o];v===null?c[o]=null:c[o]=xa.extendObjectWithContainers(c[o],v)}l.set(c)}}return e};xa.dataArrayContainers=["transforms","dimensions"];xa.layoutArrayContainers=Xl.layoutArrayContainers;xa.extendTrace=function(e,t){return xa.extendObjectWithContainers(e,t,xa.dataArrayContainers)};xa.extendLayout=function(e,t){return xa.extendObjectWithContainers(e,t,xa.layoutArrayContainers)};xa.transition=function(e,t,r,n,i,a){var o={redraw:i.redraw},s={},l=[];return o.prepareFn=function(){for(var u=Array.isArray(t)?t.length:0,c=n.slice(0,u),f=0;f<c.length;f++){var h=c[f],d=e._fullData[h],v=d._module;if(v){if(v.animatable){var m=v.basePlotModule.name;s[m]||(s[m]=[]),s[m].push(h)}e.data[c[f]]=xa.extendTrace(e.data[c[f]],t[f])}}var b=Ga.expandObjectPaths(Ga.extendDeepNoArrays({},r)),p=/^[xy]axis[0-9]*$/;for(var k in b)p.test(k)&&delete b[k].range;xa.extendLayout(e.layout,b),delete e.calcdata,xa.supplyDefaults(e),xa.doCalcdata(e);var M=Ga.expandObjectPaths(r);if(M){var T=e._fullLayout._plots;for(var L in T){var x=T[L],C=x.xaxis,S=x.yaxis,g=C.range.slice(),P=S.range.slice(),E=null,z=null,q=null,U=null;Array.isArray(M[C._name+".range"])?E=M[C._name+".range"].slice():Array.isArray((M[C._name]||{}).range)&&(E=M[C._name].range.slice()),Array.isArray(M[S._name+".range"])?z=M[S._name+".range"].slice():Array.isArray((M[S._name]||{}).range)&&(z=M[S._name].range.slice()),g&&E&&(C.r2l(g[0])!==C.r2l(E[0])||C.r2l(g[1])!==C.r2l(E[1]))&&(q={xr0:g,xr1:E}),P&&z&&(S.r2l(P[0])!==S.r2l(z[0])||S.r2l(P[1])!==S.r2l(z[1]))&&(U={yr0:P,yr1:z}),(q||U)&&l.push(Ga.extendFlat({plotinfo:x},q,U))}}return Promise.resolve()},o.runFn=function(u){var c,f=e._fullLayout._basePlotModules,h=l.length,d;if(r)for(d=0;d<f.length;d++)f[d].transitionAxes&&f[d].transitionAxes(e,l,a,u);h?(c=Ga.extendFlat({},a),c.duration=0,delete s.cartesian):c=a;for(var v in s){var m=s[v],b=e._fullData[m[0]]._module;b.basePlotModule.plot(e,m,c,u)}},Qne(e,a,o)};xa.transitionFromReact=function(e,t,r,n){var i=e._fullLayout,a=i.transition,o={},s=[];return o.prepareFn=function(){var l=i._plots;o.redraw=!1,t.anim==="some"&&(o.redraw=!0),r.anim==="some"&&(o.redraw=!0);for(var u in l){var c=l[u],f=c.xaxis,h=c.yaxis,d=n[f._name].range.slice(),v=n[h._name].range.slice(),m=f.range.slice(),b=h.range.slice();f.setScale(),h.setScale();var p=null,k=null;(f.r2l(d[0])!==f.r2l(m[0])||f.r2l(d[1])!==f.r2l(m[1]))&&(p={xr0:d,xr1:m}),(h.r2l(v[0])!==h.r2l(b[0])||h.r2l(v[1])!==h.r2l(b[1]))&&(k={yr0:v,yr1:b}),(p||k)&&s.push(Ga.extendFlat({plotinfo:c},p,k))}return Promise.resolve()},o.runFn=function(l){for(var u=e._fullData,c=e._fullLayout,f=c._basePlotModules,h,d,v,m=[],b=0;b<u.length;b++)m.push(b);function p(){if(e._fullLayout)for(var M=0;M<f.length;M++)f[M].transitionAxes&&f[M].transitionAxes(e,s,h,l)}function k(){if(e._fullLayout)for(var M=0;M<f.length;M++)f[M].plot(e,v,d,l)}s.length&&t.anim?a.ordering==="traces first"?(h=Ga.extendFlat({},a,{duration:0}),v=m,d=a,setTimeout(p,a.duration),k()):(h=a,v=null,d=Ga.extendFlat({},a,{duration:0}),setTimeout(k,h.duration),p()):s.length?(h=a,p()):t.anim&&(v=m,d=a,k())},Qne(e,a,o)};function Qne(e,t,r){var n=!1;function i(f){var h=Promise.resolve();if(!f)return h;for(;f.length;)h=h.then(f.shift());return h}function a(f){if(f)for(;f.length;)f.shift()}function o(){return e.emit("plotly_transitioning",[]),new Promise(function(f){e._transitioning=!0,t.duration>0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return Xl.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function v(){return h++,function(){d++,!n&&d===h&&s(f)}}r.runFn(v),setTimeout(v())})}function s(f){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Xl.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,i(e._transitionData._interruptCallbacks)}var u=[xa.previousPromises,l,r.prepareFn,xa.rehover,xa.reselect,o],c=Ga.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}xa.doCalcdata=function(e,t){var r=Mp.list(e),n=e._fullData,i=e._fullLayout,a,o,s,l,u=new Array(n.length),c=(e.calcdata||[]).slice();for(e.calcdata=u,i._numBoxes=0,i._numViolins=0,i._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,i._piecolormap={},i._sunburstcolormap={},i._treemapcolormap={},i._iciclecolormap={},i._funnelareacolormap={},s=0;s<n.length;s++)if(Array.isArray(t)&&t.indexOf(s)===-1){u[s]=c[s];continue}for(s=0;s<n.length;s++)a=n[s],a._arrayAttrs=Zne.findArrayAttributes(a),a._extremes={};var f=i._subplots.polar||[];for(s=0;s<f.length;s++)r.push(i[f[s]].radialaxis,i[f[s]].angularaxis);for(var h in i._colorAxes){var d=i[h];d.cauto!==!1&&(delete d.cmin,delete d.cmax)}var v=!1;function m(k){if(a=n[k],o=a._module,a.visible===!0&&a.transforms){if(o&&o.calc){var M=o.calc(e,a);M[0]&&M[0].t&&M[0].t._scene&&delete M[0].t._scene.dirty}for(l=0;l<a.transforms.length;l++){var T=a.transforms[l];o=transformsRegistry[T.type],o&&o.calcTransform&&(a._hasCalcTransform=!0,v=!0,o.calcTransform(e,a,T))}}}function b(k,M){if(a=n[k],o=a._module,!!o.isContainer===M){var T=[];if(a.visible===!0&&a._length!==0){delete a._indexToPoints;var L=a.transforms||[];for(l=L.length-1;l>=0;l--)if(L[l].enabled){a._indexToPoints=L[l]._indexToPoints;break}o&&o.calc&&(T=o.calc(e,a))}(!Array.isArray(T)||!T[0])&&(T=[{x:Une,y:Une}]),T[0].t||(T[0].t={}),T[0].trace=a,u[k]=T}}for(jne(r,n,i),s=0;s<n.length;s++)b(s,!0);for(s=0;s<n.length;s++)m(s);for(v&&jne(r,n,i),s=0;s<n.length;s++)b(s,!0);for(s=0;s<n.length;s++)b(s,!1);Wne(e);var p=Pat(r,e);if(p.length){for(i._numBoxes=0,i._numViolins=0,s=0;s<p.length;s++)b(p[s],!0);for(s=0;s<p.length;s++)b(p[s],!1);Wne(e)}Xl.getComponentMethod("fx","calc")(e),Xl.getComponentMethod("errorbars","calc")(e)};var Lat=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function Pat(e,t){var r=[],n,i,a,o,s;function l(N,H,re){var oe=H._id.charAt(0);if(N==="histogram2dcontour"){var _e=H._counterAxes[0],ke=Mp.getFromId(t,_e),Ce=oe==="x"||_e==="x"&&ke.type==="category",ge=oe==="y"||_e==="y"&&ke.type==="category";return function(ie,Se){return ie===0||Se===0||Ce&&ie===re[Se].length-1||ge&&Se===re.length-1?-1:(oe==="y"?Se:ie)-1}}else return function(ie,Se){return oe==="y"?Se:ie}}var u={min:function(N){return Ga.aggNums(Math.min,null,N)},max:function(N){return Ga.aggNums(Math.max,null,N)},sum:function(N){return Ga.aggNums(function(H,re){return H+re},null,N)},total:function(N){return Ga.aggNums(function(H,re){return H+re},null,N)},mean:function(N){return Ga.mean(N)},"geometric mean":function(N){return Ga.geometricMean(N)},median:function(N){return Ga.median(N)}};function c(N,H){return N[1]-H[1]}function f(N,H){return H[1]-N[1]}for(n=0;n<e.length;n++){var h=e[n];if(h.type==="category"){var d=h.categoryorder.match(Lat);if(d){var v=d[1],m=d[2],b=h._id.charAt(0),p=b==="x",k=[];for(i=0;i<h._categories.length;i++)k.push([h._categories[i],[]]);for(i=0;i<h._traceIndices.length;i++){var M=h._traceIndices[i],T=t._fullData[M];if(T.visible===!0){var L=T.type;Xl.traceIs(T,"histogram")&&(delete T._xautoBinFinished,delete T._yautoBinFinished);var x=L==="splom",C=L==="scattergl",S=t.calcdata[M];for(a=0;a<S.length;a++){var g=S[a],P,E;if(x){var z=T._axesDim[h._id];if(!p){var q=T._diag[z][0];q&&(h=t._fullLayout[Mp.id2name(q)])}var U=g.trace.dimensions[z].values;for(o=0;o<U.length;o++)for(P=h._categoriesMap[U[o]],s=0;s<g.trace.dimensions.length;s++)if(s!==z){var G=g.trace.dimensions[s];k[P][1].push(G.values[o])}}else if(C){for(o=0;o<g.t.x.length;o++)p?(P=g.t.x[o],E=g.t.y[o]):(P=g.t.y[o],E=g.t.x[o]),k[P][1].push(E);g.t&&g.t._scene&&delete g.t._scene.dirty}else if(g.hasOwnProperty("z")){E=g.z;var Z=l(T.type,h,E);for(o=0;o<E.length;o++)for(s=0;s<E[o].length;s++)P=Z(s,o),P+1&&k[P][1].push(E[o][s])}else for(P=g.p,P===void 0&&(P=g[b]),E=g.s,E===void 0&&(E=g.v),E===void 0&&(E=p?g.y:g.x),Array.isArray(E)||(E===void 0?E=[]:E=[E]),o=0;o<E.length;o++)k[P][1].push(E[o])}}}h._categoriesValue=k;var j=[];for(i=0;i<k.length;i++)j.push([k[i][0],u[v](k[i][1])]);j.sort(m==="descending"?f:c),h._categoriesAggregatedValue=j,h._initialCategories=j.map(function(N){return N[0]}),r=r.concat(h.sortByInitialCategories())}}}return r}function jne(e,t,r){var n={};function i(l){l.clearCalc(),l.type==="multicategory"&&l.setupMultiCategory(t),n[l._id]=1}Ga.simpleMap(e,i);for(var a=r._axisMatchGroups||[],o=0;o<a.length;o++)for(var s in a[o])n[s]||i(r[Mp.id2name(s)])}function Wne(e){var t=e._fullLayout,r=t._visibleModules,n={},i,a,o;for(a=0;a<r.length;a++){var s=r[a],l=s.crossTraceCalc;if(l){var u=s.basePlotModule.name;n[u]?Ga.pushUnique(n[u],l):n[u]=[l]}}for(o in n){var c=n[o],f=t._subplots[o];if(Array.isArray(f))for(i=0;i<f.length;i++){var h=f[i],d=o==="cartesian"?t._plots[h]:t[h];for(a=0;a<c.length;a++)c[a](e,d,h)}else for(a=0;a<c.length;a++)c[a](e)}}xa.rehover=function(e){e._fullLayout._rehover&&e._fullLayout._rehover()};xa.redrag=function(e){e._fullLayout._redrag&&e._fullLayout._redrag()};xa.reselect=function(e){var t=e._fullLayout,r=(e.layout||{}).selections,n=t._previousSelections;t._previousSelections=r;var i=t._reselect||JSON.stringify(r)!==JSON.stringify(n);Xl.getComponentMethod("selections","reselect")(e,i)};xa.generalUpdatePerTraceModule=function(e,t,r,n){var i=t.traceHash,a={},o;for(o=0;o<r.length;o++){var s=r[o],l=s[0].trace;l.visible&&(a[l.type]=a[l.type]||[],a[l.type].push(s))}for(var u in i)if(!a[u]){var c=i[u][0],f=c[0].trace;f.visible=!1,a[u]=[c]}for(var h in a){var d=a[h],v=d[0][0].trace._module;v.plot(e,t,Ga.filterVisible(d),n)}t.traceHash=a};xa.plotBasePlot=function(e,t,r,n,i){var a=Xl.getModule(e),o=_at(t.calcdata,a)[0];a.plot(t,o,n,i)};xa.cleanBasePlot=function(e,t,r,n,i){var a=i._has&&i._has(e),o=r._has&&r._has(e);a&&!o&&i["_"+e+"layer"].selectAll("g.trace").remove()}});var Wp=ye(kb=>{"use strict";kb.xmlns="http://www.w3.org/2000/xmlns/";kb.svg="http://www.w3.org/2000/svg";kb.xlink="http://www.w3.org/1999/xlink";kb.svgAttrs={xmlns:kb.svg,"xmlns:xlink":kb.xlink}});var Dh=ye((Cnr,tae)=>{"use strict";tae.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}});var Zl=ye(b0=>{"use strict";var Fh=qa(),Ly=Pr(),Iat=Ly.strTranslate,_O=Wp(),Rat=Dh().LINE_SPACING,Dat=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;b0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&n.match(Dat),a=Fh.select(e.node().parentNode);if(a.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function s(){a.empty()||(o=e.attr("class")+"-math",a.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=Xat(e.node(),n);l&&e.style("pointer-events","all"),b0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u};Oat(i[2],c,function(f,h,d){a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove();var v=f&&f.select("svg");if(!v||!v.node()){s(),l();return}var m=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});m.node().appendChild(v.node()),h&&h.node()&&v.node().insertBefore(h.node().cloneNode(!0),v.node().firstChild);var b=d.width,p=d.height;v.attr({class:o,height:p,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var k=e.node().style.fill||"black",M=v.select("g");M.attr({fill:k,stroke:k});var T=M.node().getBoundingClientRect(),L=T.width,x=T.height;(L>b||x>p)&&(v.style("overflow","hidden"),T=v.node().getBoundingClientRect(),L=T.width,x=T.height);var C=+e.attr("x"),S=+e.attr("y"),g=u||e.node().getBoundingClientRect().height,P=-g/4;if(o[0]==="y")m.attr({transform:"rotate("+[-90,C,S]+")"+Iat(-L/2,P-x/2)});else if(o[0]==="l")S=P-x/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)C=0,S=P;else{var E=e.attr("text-anchor");C=C-L*(E==="middle"?.5:E==="end"?1:0),S=S+P-x/2}v.attr({x:C,y:S}),r&&r.call(e,m),l(m)})})):s(),e};var Fat=/(<|<|<)/g,zat=/(>|>|>)/g;function qat(e){return e.replace(Fat,"\\lt ").replace(zat,"\\gt ")}var rae=[["$","$"],["\\(","\\)"]];function Oat(e,t,r){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){Ly.warn("No MathJax version:",MathJax.version);return}var i,a,o,s,l=function(){return a=Ly.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:rae},displayAlign:"left"})},u=function(){a=Ly.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=rae},c=function(){if(i=MathJax.Hub.config.menuSettings.renderer,i!=="SVG")return MathJax.Hub.setRenderer("SVG")},f=function(){i=MathJax.config.startup.output,i!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var k="math-output-"+Ly.randstr({},64);s=Fh.select("body").append("div").attr({id:k}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(qat(e));var M=s.node();return n===2?MathJax.Hub.Typeset(M):MathJax.typeset([M])},d=function(){var k=s.select(n===2?".MathJax_SVG":".MathJax"),M=!k.empty()&&s.select("svg").node();if(!M)Ly.log("There was an error in the tex syntax.",e),r();else{var T=M.getBoundingClientRect(),L;n===2?L=Fh.select("body").select("#MathJax_SVG_glyphs"):L=k.select("defs"),r(k,L,T)}s.remove()},v=function(){if(i!=="SVG")return MathJax.Hub.setRenderer(i)},m=function(){i!=="svg"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},p=function(){MathJax.config=a};n===2?MathJax.Hub.Queue(l,c,h,d,v,b):n===3&&(u(),f(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),m(),p()}))}var oae={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},Bat={sub:"0.3em",sup:"-0.6em"},Nat={sub:"-0.21em",sup:"0.42em"},iae="\u200B",nae=["http:","https:","mailto:","",void 0,":"],sae=b0.NEWLINES=/(\r\n?|\n)/g,bO=/(<[^<>]*>)/,wO=/<(\/?)([^ >]*)(\s+(.*))?>/i,Uat=/<br(\s+.*)?>/i;b0.BR_TAG_ALL=/<br(\s+.*)?>/gi;var lae=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,uae=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,cae=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,Vat=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Cb(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&oL(n)}var Gat=/(^|;)\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(bO),s=[],l="",u=0,c=0;c<o.length;c++){var f=o[c],h=f.match(wO),d=h&&h[2].toLowerCase();if(d)n.indexOf(d)!==-1&&(s.push(f),l=d);else{var v=f.length;if(u+v<r)s.push(f),u+=v;else if(u<r){var m=r-u;l&&(l!=="br"||m<=a||v<=a)&&s.pop(),r>a?s.push(f.slice(0,Math.max(0,m-a))+i):s.push(f.slice(0,m));break}l=""}}return s.join("")};var Hat={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},jat=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function oL(e){return e.replace(jat,function(t,r){var n;return r.charAt(0)==="#"?n=Wat(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):n=Hat[r],n||t})}b0.convertEntities=oL;function Wat(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 Xat(e,t){t=t.replace(sae," ");var r=!1,n=[],i,a=-1;function o(){a++;var x=document.createElementNS(_O.svg,"tspan");Fh.select(x).attr({class:"line",dy:a*Rat+"em"}),e.appendChild(x),i=x;var C=n;if(n=[{node:x}],C.length>1)for(var S=1;S<C.length;S++)s(C[S])}function s(x){var C=x.type,S={},g;if(C==="a"){g="a";var P=x.target,E=x.href,z=x.popup;E&&(S={"xlink:xlink:show":P==="_blank"||P.charAt(0)!=="_"?"new":"replace",target:P,"xlink:xlink:href":E},z&&(S.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+z+'");return false;'))}else g="tspan";x.style&&(S.style=x.style);var q=document.createElementNS(_O.svg,g);if(C==="sup"||C==="sub"){l(i,iae),i.appendChild(q);var U=document.createElementNS(_O.svg,"tspan");l(U,iae),Fh.select(U).attr("dy",Nat[C]),S.dy=Bat[C],i.appendChild(q),i.appendChild(U)}else i.appendChild(q);Fh.select(q).attr(S),i=x.node=q,n.push(x)}function l(x,C){x.appendChild(document.createTextNode(C))}function u(x){if(n.length===1){Ly.log("Ignoring unexpected end tag </"+x+">.",t);return}var C=n.pop();x!==C.type&&Ly.log("Start tag <"+C.type+"> doesnt match end tag <"+x+">. Pretending it did match.",t),i=n[n.length-1].node}var c=Uat.test(t);c?o():(i=e,n=[{node:e}]);for(var f=t.split(bO),h=0;h<f.length;h++){var d=f[h],v=d.match(wO),m=v&&v[2].toLowerCase(),b=oae[m];if(m==="br")o();else if(b===void 0)l(i,oL(d));else if(v[1])u(m);else{var p=v[4],k={type:m},M=Cb(p,lae);if(M?(M=M.replace(Gat,"$1 fill:"),b&&(M+=";"+b)):b&&(M=b),M&&(k.style=M),m==="a"){r=!0;var T=Cb(p,uae);if(T){var L=fae(T);L&&(k.href=L,k.target=Cb(p,cae)||"_blank",k.popup=Cb(p,Vat))}}s(k)}}return r}function fae(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var i=r.protocol,a=n.protocol;return nae.indexOf(i)!==-1&&nae.indexOf(a)!==-1?t:""}b0.sanitizeHTML=function(t){t=t.replace(sae," ");for(var r=document.createElement("p"),n=r,i=[],a=t.split(bO),o=0;o<a.length;o++){var s=a[o],l=s.match(wO),u=l&&l[2].toLowerCase();if(u in oae)if(l[1])i.length&&(n=i.pop());else{var c=l[4],f=Cb(c,lae),h=f?{style:f}:{};if(u==="a"){var d=Cb(c,uae);if(d){var v=fae(d);if(v){h.href=v;var m=Cb(c,cae);m&&(h.target=m)}}}var b=document.createElement(u);n.appendChild(b),Fh.select(b).attr(h),n=b,i.push(b)}else n.appendChild(document.createTextNode(oL(s)))}var p="innerHTML";return r[p]};b0.lineCount=function(t){return t.selectAll("tspan.line").size()||1};b0.positionText=function(t,r,n){return t.each(function(){var i=Fh.select(this);function a(l,u){return u===void 0?(u=i.attr(l),u===null&&(i.attr(l,0),u=0)):i.attr(l,u),u}var o=a("x",r),s=a("y",n);this.nodeName==="text"&&i.selectAll("tspan.line").attr({x:o,y:s})})};function aae(e,t,r){var n=r.horizontalAlign,i=r.verticalAlign||"top",a=e.node().getBoundingClientRect(),o=t.node().getBoundingClientRect(),s,l,u;return i==="bottom"?l=function(){return a.bottom-s.height}:i==="middle"?l=function(){return a.top+(a.height-s.height)/2}:l=function(){return a.top},n==="right"?u=function(){return a.right-s.width}:n==="center"?u=function(){return a.left+(a.width-s.width)/2}:u=function(){return a.left},function(){s=this.node().getBoundingClientRect();var c=u()-o.left,f=l()-o.top,h=r.gd||{};if(r.gd){h._fullLayout._calcInverseTransform(h);var d=Ly.apply3DTransform(h._fullLayout._invTransform)(c,f);c=d[0],f=d[1]}return this.style({top:f+"px",left:c+"px","z-index":1e3}),this}}var xO="1px ";b0.makeTextShadow=function(e){var t=xO,r=xO,n=xO;return t+r+n+e+", -"+t+"-"+r+n+e+", "+t+"-"+r+n+e+", -"+t+r+n+e};b0.makeEditable=function(e,t){var r=t.gd,n=t.delegate,i=Fh.dispatch("edit","input","cancel"),a=n||e;if(e.style({"pointer-events":n?"none":"all"}),e.size()!==1)throw new Error("boo");function o(){l(),e.style({opacity:0});var u=a.attr("class"),c;u?c="."+u.split(" ")[0]+"-math-group":c="[class*=-math-group]",c&&Fh.select(e.node().parentNode).select(c).style({opacity:0})}function s(u){var c=u.node(),f=document.createRange();f.selectNodeContents(c);var h=window.getSelection();h.removeAllRanges(),h.addRange(f),c.focus()}function l(){var u=Fh.select(r),c=u.select(".svg-container"),f=c.append("div"),h=e.node().style,d=parseFloat(h.fontSize||12),v=t.text;v===void 0&&(v=e.attr("data-unformatted")),f.classed("plugin-editable editable",!0).style({position:"absolute","font-family":h.fontFamily||"Arial","font-size":d,color:t.fill||h.fill||"black",opacity:1,"background-color":t.background||"transparent",outline:"#ffffff33 1px solid",margin:[-d/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(v).call(aae(e,c,t)).on("blur",function(){r._editing=!1,e.text(this.textContent).style({opacity:1});var m=Fh.select(this).attr("class"),b;m?b="."+m.split(" ")[0]+"-math-group":b="[class*=-math-group]",b&&Fh.select(e.node().parentNode).select(b).style({opacity:0});var p=this.textContent;Fh.select(this).transition().duration(0).remove(),Fh.select(document).on("mouseup",null),i.edit.call(e,p)}).on("focus",function(){var m=this;r._editing=!0,Fh.select(document).on("mouseup",function(){if(Fh.event.target===m)return!1;document.activeElement===f.node()&&f.node().blur()})}).on("keyup",function(){Fh.event.which===27?(r._editing=!1,e.style({opacity:1}),Fh.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),i.cancel.call(e,this.textContent)):(i.input.call(e,this.textContent),Fh.select(this).call(aae(e,c,t)))}).on("keydown",function(){Fh.event.which===13&&this.blur()}).call(s)}return t.immediate?o():a.on("click",o),Fh.rebind(e,i,"on")}});var pv=ye((Pnr,_ae)=>{"use strict";var Zat=qa(),lL=fd(),iM=Eo(),sL=Pr(),hae=ka(),Yat=mb().isValid;function Kat(e,t,r){var n=t?sL.nestedProperty(e,t).get()||{}:e,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(sL.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(iM(i[o])){a=!0;break}}return sL.isPlainObject(n)&&(a||n.showscale===!0||iM(n.cmin)&&iM(n.cmax)||Yat(n.colorscale)||sL.isPlainObject(n.colorbar))}var dae=["showscale","autocolorscale","colorscale","reversescale","colorbar"],rM=["min","max","mid","auto"];function pae(e){var t=e._colorAx,r=t||e,n={},i,a,o;for(a=0;a<dae.length;a++)o=dae[a],n[o]=r[o];if(t)for(i="c",a=0;a<rM.length;a++)o=rM[a],n[o]=r["c"+o];else{var s;for(a=0;a<rM.length;a++){if(o=rM[a],s="c"+o,s in r){n[o]=r[s];continue}s="z"+o,s in r&&(n[o]=r[s])}i=s.charAt(0)}return n._sync=function(l,u){var c=rM.indexOf(l)!==-1?i+l:l;r[c]=r["_"+c]=u},n}function gae(e){for(var t=pae(e),r=t.min,n=t.max,i=t.reversescale?mae(t.colorscale):t.colorscale,a=i.length,o=new Array(a),s=new Array(a),l=0;l<a;l++){var u=i[l];o[l]=r+u[0]*(n-r),s[l]=u[1]}return{domain:o,range:s}}function mae(e){for(var t=e.length,r=new Array(t),n=t-1,i=0;n>=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function yae(e,t){t=t||{};for(var r=e.domain,n=e.range,i=n.length,a=new Array(i),o=0;o<i;o++){var s=lL(n[o]).toRgb();a[o]=[s.r,s.g,s.b,s.a]}var l=Zat.scale.linear().domain(r).range(a).clamp(!0),u=t.noNumericCheck,c=t.returnArray,f;return u&&c?f=l:u?f=function(h){return vae(l(h))}:c?f=function(h){return iM(h)?l(h):lL(h).isValid()?h:hae.defaultLine}:f=function(h){return iM(h)?vae(l(h)):lL(h).isValid()?h:hae.defaultLine},f.domain=l.domain,f.range=function(){return n},f}function Jat(e,t){return yae(gae(e),t)}function vae(e){var t={r:e[0],g:e[1],b:e[2],a:e[3]};return lL(t).toRgbString()}_ae.exports={hasColorscale:Kat,extractOpts:pae,extractScale:gae,flipScale:mae,makeColorScaleFunc:yae,makeColorScaleFuncFromTrace:Jat}});var df=ye((Inr,wae)=>{"use strict";var xae=Hq(),$at=xae.FORMAT_LINK,Qat=xae.DATE_FORMAT_LINK;function eot(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?TO:bae)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function TO(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: "+$at+"."].join(" ")}function bae(e,t){return TO(e,t)+[" And for dates see: "+Qat+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}wae.exports={axisHoverFormat:eot,descriptionOnlyNumbers:TO,descriptionWithDates:bae}});var Rd=ye((Dnr,Bae)=>{"use strict";var Tae=ec(),F3=Ih(),Oae=Pd().dash,SO=Ao().extendFlat,Aae=vl().templatedArray,Rnr=Ll().templateFormatStringDescription,Sae=df().descriptionWithDates,tot=fs().ONEDAY,mm=Rh(),rot=mm.HOUR_PATTERN,iot=mm.WEEKDAY_PATTERN,AO={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},not=SO({},AO,{values:AO.values.slice().concat(["sync"])});function Mae(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Eae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},kae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Cae={valType:"data_array",editType:"ticks"},Lae={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Pae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Iae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Rae={valType:"color",dflt:F3.defaultLine,editType:"ticks"},Dae={valType:"color",dflt:F3.lightLine,editType:"ticks"};function Fae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var zae=SO({},Oae,{editType:"ticks"}),qae={valType:"boolean",editType:"ticks"};Bae.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:F3.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Tae({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[mm.idRegex.x.toString(),mm.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"calc"},rangebreaks:Aae("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[iot,rot,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:tot},editType:"calc"}),tickmode:not,nticks:Mae(),tick0:Eae,dtick:kae,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:Cae,ticktext:{valType:"data_array",editType:"ticks"},ticks:Lae,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:Pae(),tickwidth:Iae(),tickcolor:Rae,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:SO({},Oae,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:Tae({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Sae("tick label")},tickformatstops:Aae("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Sae("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:F3.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:qae,gridcolor:Dae,gridwidth:Fae(),griddash:zae,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:F3.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:F3.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"plot"},minor:{tickmode:AO,nticks:Mae("minor"),tick0:Eae,dtick:kae,tickvals:Cae,ticks:Lae,ticklen:Pae("minor"),tickwidth:Iae("minor"),tickcolor:Rae,gridcolor:Dae,gridwidth:Fae("minor"),griddash:zae,showgrid:qae,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var uL=ye((Fnr,Vae)=>{"use strict";var $c=Rd(),Nae=ec(),Uae=Ao().extendFlat,aot=mc().overrideAll;Vae.exports=aot({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:$c.linecolor,outlinewidth:$c.linewidth,bordercolor:$c.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:$c.minor.tickmode,nticks:$c.nticks,tick0:$c.tick0,dtick:$c.dtick,tickvals:$c.tickvals,ticktext:$c.ticktext,ticks:Uae({},$c.ticks,{dflt:""}),ticklabeloverflow:Uae({},$c.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:$c.ticklen,tickwidth:$c.tickwidth,tickcolor:$c.tickcolor,ticklabelstep:$c.ticklabelstep,showticklabels:$c.showticklabels,labelalias:$c.labelalias,tickfont:Nae({}),tickangle:$c.tickangle,tickformat:$c.tickformat,tickformatstops:$c.tickformatstops,tickprefix:$c.tickprefix,showtickprefix:$c.showtickprefix,ticksuffix:$c.ticksuffix,showticksuffix:$c.showticksuffix,separatethousands:$c.separatethousands,exponentformat:$c.exponentformat,minexponent:$c.minexponent,showexponent:$c.showexponent,title:{text:{valType:"string"},font:Nae({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Tu=ye((qnr,Hae)=>{"use strict";var oot=uL(),sot=g3().counter,lot=t_(),Gae=mb().scales,znr=lot(Gae);function cL(e){return"`"+e+"`"}Hae.exports=function(t,r){t=t||"",r=r||{};var n=r.cLetter||"c",i="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,a="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:n==="z",s=typeof r.colorscaleDflt=="string"?Gae[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[n],f="in "+cL(u+c));var h=i?" Has an effect only if "+f+" is set to a numerical array.":"",d=n+"auto",v=n+"min",m=n+"max",b=n+"mid",p=cL(u+d),k=cL(u+v),M=cL(u+m),T=k+" and "+M,L={};L[v]=L[m]=void 0;var x={};x[d]=!1;var C={};return c==="color"&&(C.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(C.color.anim=!0)),C[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},C[v]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},C[m]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},C[b]={valType:"number",dflt:null,editType:"calc",impliedEdits:L},C.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},C.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},C.reversescale={valType:"boolean",dflt:!1,editType:"plot"},a||(C.showscale={valType:"boolean",dflt:o,editType:"calc"},C.colorbar=oot),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:sot("coloraxis"),dflt:null,editType:"calc"}),C}});var EO=ye((Onr,jae)=>{"use strict";var uot=Ao().extendFlat,cot=Tu(),MO=mb().scales;jae.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:MO.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:MO.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:MO.RdBu,editType:"calc"}},coloraxis:uot({_isSubplotObj:!0,editType:"calc"},cot("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var kO=ye((Bnr,Wae)=>{"use strict";var fot=Pr();Wae.exports=function(t){return fot.isPlainObject(t.colorbar)}});var PO=ye(LO=>{"use strict";var CO=Eo(),Xae=Pr(),Zae=fs(),hot=Zae.ONEDAY,dot=Zae.ONEWEEK;LO.dtick=function(e,t){var r=t==="log",n=t==="date",i=t==="category",a=n?hot:1;if(!e)return a;if(CO(e))return e=Number(e),e<=0?a:i?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||r))return a;var o=e.charAt(0),s=e.slice(1);return s=CO(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};LO.tick0=function(e,t,r,n){if(t==="date")return Xae.cleanDate(e,Xae.dateTick0(r,n%dot===0?1:0));if(!(n==="D1"||n==="D2"))return CO(e)?Number(e):0}});var Lb=ye((Unr,Kae)=>{"use strict";var Yae=PO(),vot=Pr().isArrayOrTypedArray,pot=vv().isTypedArraySpec,got=vv().decodeTypedArraySpec;Kae.exports=function(t,r,n,i,a){a||(a={});var o=a.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(k){var M=s[k];return pot(M)&&(M=got(M)),M!==void 0?M:(l._template||{})[k]}var f=c("tick0"),h=c("dtick"),d=c("tickvals"),v=vot(d)?"array":h?"linear":"auto",m=n(u+"tickmode",v);if(m==="auto"||m==="sync")n(u+"nticks");else if(m==="linear"){var b=l.dtick=Yae.dtick(h,i);l.tick0=Yae.tick0(f,i,r.calendar,b)}else if(i!=="multicategory"){var p=n(u+"tickvals");p===void 0?l.tickmode="auto":o||n("ticktext")}}});var z3=ye((Vnr,$ae)=>{"use strict";var IO=Pr(),Jae=Rd();$ae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?Jae.minor:Jae,u=a?"minor.":"",c=IO.coerce2(o,s,l,"ticklen",a?(r.ticklen||5)*.6:void 0),f=IO.coerce2(o,s,l,"tickwidth",a?r.tickwidth||1:void 0),h=IO.coerce2(o,s,l,"tickcolor",(a?r.tickcolor:void 0)||s.color),d=n(u+"ticks",!a&&i.outerTicks||c||f||h?"outside":"");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var RO=ye((Gnr,Qae)=>{"use strict";Qae.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(a){return t[a]!==void 0}),i=function(a){return t[a]===t[n[0]]};if(n.every(i)||n.length===1)return t[n[0]]}});var Zd=ye((Hnr,eoe)=>{"use strict";var fL=Pr(),mot=vl();eoe.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||"visible",o=r[i],s=fL.isArrayOrTypedArray(t[i])?t[i]:[],l=r[i]=[],u=mot.arrayTemplater(r,i,a),c,f;for(c=0;c<s.length;c++){var h=s[c];fL.isPlainObject(h)?f=u.newItem(h):(f=u.newItem({}),f[a]=!1),f._index=c,f[a]!==!1&&n.handleItemDefaults(h,f,r,n),l.push(f)}var d=u.defaultItems();for(c=0;c<d.length;c++)f=d[c],f._index=l.length,n.handleItemDefaults({},f,r,n,{}),l.push(f);if(fL.isArrayOrTypedArray(o)){var v=Math.min(o.length,l.length);for(c=0;c<v;c++)fL.relinkPrivateKeys(l[c],o[c])}return l}});var s_=ye((jnr,roe)=>{"use strict";var DO=Pr(),yot=ka().contrast,toe=Rd(),_ot=RO(),xot=Zd();roe.exports=function(t,r,n,i,a){a||(a={});var o=n("labelalias");DO.isPlainObject(o)||delete r.labelalias;var s=_ot(t),l=n("showticklabels");if(l){a.noTicklabelshift||n("ticklabelshift"),a.noTicklabelstandoff||n("ticklabelstandoff");var u=a.font||{},c=r.color,f=r.ticklabelposition||"",h=f.indexOf("inside")!==-1?yot(a.bgColor):c&&c!==toe.color.dflt?c:u.color;if(DO.coerceFont(n,"tickfont",u,{overrideDflt:{color:h}}),!a.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&n("ticklabelstep"),!a.noAng){var d=n("tickangle");!a.noAutotickangles&&d==="auto"&&n("autotickangles")}if(i!=="category"){var v=n("tickformat");xot(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:bot}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!v&&i!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}!a.noMinorloglabels&&i==="log"&&n("minorloglabels")}};function bot(e,t){function r(i,a){return DO.coerce(e,t,toe.tickformatstops,i,a)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var l_=ye((Wnr,ioe)=>{"use strict";var wot=RO();ioe.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=wot(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var FO=ye((Xnr,noe)=>{"use strict";var u_=Pr(),Tot=vl(),Aot=Lb(),Sot=z3(),Mot=s_(),Eot=l_(),kot=uL();noe.exports=function(t,r,n){var i=Tot.newContainer(r,"colorbar"),a=t.colorbar||{};function o(E,z){return u_.coerce(a,i,kot,E,z)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o("orientation"),f=c==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(f?l:u):30);var d=o("lenmode");o("len",d==="fraction"?1:f?u:l);var v=o("yref"),m=o("xref"),b=v==="paper",p=m==="paper",k,M,T,L="left";f?(T="middle",L=p?"left":"right",k=p?1.02:1,M=.5):(T=b?"bottom":"top",L="center",k=.5,M=b?1.02:1),u_.coerce(a,i,{x:{valType:"number",min:p?-2:0,max:p?3:1,dflt:k}},"x"),u_.coerce(a,i,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:M}},"y"),o("xanchor",L),o("xpad"),o("yanchor",T),o("ypad"),u_.noneOrAll(a,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var x=u_.coerce(a,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",x.indexOf("inside")!==-1?"hide past domain":"hide past div"),Aot(a,i,o,"linear");var C=n.font,S={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};x.indexOf("inside")!==-1&&(S.bgColor="black"),Eot(a,i,o,"linear",S),Mot(a,i,o,"linear",S),Sot(a,i,o,"linear",S),o("title.text",n._dfltTitle.colorbar);var g=i.showticklabels?i.tickfont:C,P=u_.extendFlat({},C,{family:g.family,size:u_.bigFont(g.size)});u_.coerceFont(o,"title.font",P),o("title.side",f?"top":"right")}});var td=ye((Znr,soe)=>{"use strict";var aoe=Eo(),qO=Pr(),Cot=kO(),Lot=FO(),ooe=mb().isValid,Pot=Oa().traceIs;function zO(e,t){var r=t.slice(0,t.length-1);return t?qO.nestedProperty(e,r).get()||{}:e}soe.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,l="_module"in r,u=zO(t,o),c=zO(r,o),f=zO(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,i,a)};if(l){var d=n._colorAxes||{},v=i(o+"coloraxis");if(v){var m=Pot(r,"contour")&&qO.nestedProperty(r,"contours.coloring").get()||"heatmap",b=d[v];b?(b[2].push(h),b[0]!==m&&(b[0]=!1,qO.warn(["Ignoring coloraxis:",v,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[v]=[m,r,[h]];return}}var p=u[s+"min"],k=u[s+"max"],M=aoe(p)&&aoe(k)&&p<k,T=i(o+s+"auto",!M);T?i(o+s+"mid"):(i(o+s+"min"),i(o+s+"max"));var L=u.colorscale,x=f.colorscale,C;if(L!==void 0&&(C=!ooe(L)),x!==void 0&&(C=!ooe(x)),i(o+"autocolorscale",C),i(o+"colorscale"),i(o+"reversescale"),o!=="marker.line."){var S;o&&l&&(S=Cot(u));var g=i(o+"showscale",S);g&&(o&&f&&(c._template=f),Lot(u,c,n))}}});var foe=ye((Ynr,coe)=>{"use strict";var loe=Pr(),Iot=vl(),uoe=EO(),Rot=td();coe.exports=function(t,r){function n(f,h){return loe.coerce(t,r,uoe,f,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var i=r._colorAxes,a,o;function s(f,h){return loe.coerce(a,o,uoe.coloraxis,f,h)}for(var l in i){var u=i[l];if(u[0])a=t[l]||{},o=Iot.newContainer(r,l,"coloraxis"),o._name=l,Rot(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c<u[2].length;c++)u[2][c]();delete r._colorAxes[l]}}}});var doe=ye((Knr,hoe)=>{"use strict";var Dot=Pr(),Fot=pv().hasColorscale,zot=pv().extractOpts;hoe.exports=function(t,r){function n(c,f){var h=c["_"+f];h!==void 0&&(c[f]=h)}function i(c,f){var h=f.container?Dot.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=zot(h),v=d.auto;(v||d.min===void 0)&&n(h,f.min),(v||d.max===void 0)&&n(h,f.max),d.autocolorscale&&n(h,"colorscale")}}for(var a=0;a<t.length;a++){var o=t[a],s=o._module.colorbar;if(s)if(Array.isArray(s))for(var l=0;l<s.length;l++)i(o,s[l]);else i(o,s);Fot(o,"marker.line")&&i(o,{container:"marker.line",min:"cmin",max:"cmax"})}for(var u in r._colorAxes)i(r[u],{min:"cmin",max:"cmax"})}});var gv=ye((Jnr,poe)=>{"use strict";var voe=Eo(),OO=Pr(),qot=pv().extractOpts;poe.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?OO.nestedProperty(r,o).get():r,l=qot(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,d=function(){return OO.aggNums(Math.min,null,a)},v=function(){return OO.aggNums(Math.max,null,a)};if(c===void 0?c=d():u&&(s._colorAx&&voe(c)?c=Math.min(c,d()):c=d()),f===void 0?f=v():u&&(s._colorAx&&voe(f)?f=Math.max(f,v()):f=v()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h<h-c&&(f=h+(h-c))),c===f&&(c-=.5,f+=.5),l._sync("min",c),l._sync("max",f),l.autocolorscale){var m;c*f<0?m=i.colorscale.diverging:c>=0?m=i.colorscale.sequential:m=i.colorscale.sequentialminus,l._sync("colorscale",m)}}});var tc=ye(($nr,goe)=>{"use strict";var hL=mb(),q3=pv();goe.exports={moduleType:"component",name:"colorscale",attributes:Tu(),layoutAttributes:EO(),supplyLayoutDefaults:foe(),handleDefaults:td(),crossTraceDefaults:doe(),calc:gv(),scales:hL.scales,defaultScale:hL.defaultScale,getScale:hL.get,isValidScale:hL.isValid,hasColorscale:q3.hasColorscale,extractOpts:q3.extractOpts,extractScale:q3.extractScale,flipScale:q3.flipScale,makeColorScaleFunc:q3.makeColorScaleFunc,makeColorScaleFuncFromTrace:q3.makeColorScaleFuncFromTrace}});var Ru=ye((Qnr,yoe)=>{"use strict";var moe=Pr(),Oot=vv().isTypedArraySpec;yoe.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf("lines")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf("markers")!==-1||e.type==="splom")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf("text")!==-1},isBubble:function(e){var t=e.marker;return moe.isPlainObject(t)&&(moe.isArrayOrTypedArray(t.size)||Oot(t.size))}}});var O3=ye((ear,_oe)=>{"use strict";var Bot=Eo();_oe.exports=function(t,r){r||(r=2);var n=t.marker,i=n.sizeref||1,a=n.sizemin||0,o=n.sizemode==="area"?function(s){return Math.sqrt(s/i)}:function(s){return s/i};return function(s){var l=o(s/r);return Bot(l)&&l>0?Math.max(l,a):0}}});var ip=ye(mv=>{"use strict";var dL=Pr();mv.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};mv.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],i=0;i<r.length;i++)for(var a=0;a<n.length;a++)if(t.indexOf(r[i]+n[a])!==-1)return!0;return!1}return t.indexOf(mv.getSubplot(e))!==-1};mv.flat=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=t;return r};mv.p2c=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=e[n].p2c(t);return r};mv.getDistanceFunction=function(e,t,r,n){return e==="closest"?n||mv.quadrature(t,r):e.charAt(0)==="x"?t:r};mv.getClosest=function(e,t,r){if(r.index!==!1)r.index>=0&&r.index<e.length?r.distance=0:r.index=!1;else for(var n=1/0,i=e.length,a=0;a<i;a++)n=t(e[a]),n<=r.distance&&(r.index=a,r.distance=n);return r};mv.inbox=function(e,t,r){return e*t<0||e===0?r:1/0};mv.quadrature=function(e,t){return function(r){var n=e(r),i=t(r);return Math.sqrt(n*n+i*i)}};mv.makeEventData=function(e,t,r){var n="index"in e?e.index:e.pointNumber,i={data:t._input,fullData:t,curveNumber:t.index,pointNumber:n};if(t._indexToPoints){var a=t._indexToPoints[n];a.length===1?i.pointIndex=a[0]:i.pointIndices=a}else i.pointIndex=n;return t._module.eventData?i=t._module.eventData(i,e,t,r,n):("xVal"in e?i.x=e.xVal:"x"in e&&(i.x=e.x),"yVal"in e?i.y=e.yVal:"y"in e&&(i.y=e.y),e.xa&&(i.xaxis=e.xa),e.ya&&(i.yaxis=e.ya),e.zLabelVal!==void 0&&(i.z=e.zLabelVal)),mv.appendArrayPointValue(i,t,n),i};mv.appendArrayPointValue=function(e,t,r){var n=t._arrayAttrs;if(n)for(var i=0;i<n.length;i++){var a=n[i],o=xoe(a);if(e[o]===void 0){var s=dL.nestedProperty(t,a).get(),l=boe(s,r);l!==void 0&&(e[o]=l)}}};mv.appendArrayMultiPointValues=function(e,t,r){var n=t._arrayAttrs;if(n)for(var i=0;i<n.length;i++){var a=n[i],o=xoe(a);if(e[o]===void 0){for(var s=dL.nestedProperty(t,a).get(),l=new Array(r.length),u=0;u<r.length;u++)l[u]=boe(s,r[u]);e[o]=l}}};var Not={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function xoe(e){return Not[e]||e}function boe(e,t){if(Array.isArray(t)){if(dL.isArrayOrTypedArray(e)&&dL.isArrayOrTypedArray(e[t[0]]))return e[t[0]][t[1]]}else return e[t]}var Uot={x:!0,y:!0},Vot={"x unified":!0,"y unified":!0};mv.isUnifiedHover=function(e){return typeof e!="string"?!1:!!Vot[e]};mv.isXYhover=function(e){return typeof e!="string"?!1:!!Uot[e]}});var nM=ye((rar,woe)=>{woe.exports=Hot;var BO={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Got=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function Hot(e){var t=[];return e.replace(Got,function(r,n,i){var a=n.toLowerCase();for(i=Wot(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 jot=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function Wot(e){var t=e.match(jot);return t?t.map(Number):[]}});var Coe=ye((iar,koe)=>{"use strict";var Xot=nM(),ca=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},hs="M0,0Z",Toe=Math.sqrt(2),c_=Math.sqrt(3),NO=Math.PI,UO=Math.cos,VO=Math.sin;koe.exports={circle:{n:0,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?vs(t,r,i):i}},square:{n:1,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.4,2),i=ca(e*1.2,2);return vs(t,r,"M"+i+","+n+"H"+n+"V"+i+"H-"+n+"V"+n+"H-"+i+"V-"+n+"H-"+n+"V-"+i+"H"+n+"V-"+n+"H"+i+"Z")}},x:{n:4,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.8/Toe,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return vs(t,r,"M0,"+n+i+a+o+a+o+s+o+s+i+s+i+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+n+","+i+"H"+n+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+n+",-"+i+"H"+n+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M"+i+",-"+n+"V"+n+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+i+",-"+n+"V"+n+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.951,2),i=ca(e*.588,2),a=ca(-e,2),o=ca(e*-.309,2),s=ca(e*.809,2);return vs(t,r,"M"+n+","+o+"L"+i+","+s+"H-"+i+"L-"+n+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*c_/2,2);return vs(t,r,"M"+a+",-"+i+"V"+i+"L0,"+n+"L-"+a+","+i+"V-"+i+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*c_/2,2);return vs(t,r,"M-"+i+","+a+"H"+i+"L"+n+",0L"+i+",-"+a+"H-"+i+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.924,2),i=ca(e*.383,2);return vs(t,r,"M-"+i+",-"+n+"H"+i+"L"+n+",-"+i+"V"+i+"L"+i+","+n+"H-"+i+"L-"+n+","+i+"V-"+i+"Z")}},star:{n:17,f:function(e,t,r){if(ds(t))return hs;var n=e*1.4,i=ca(n*.225,2),a=ca(n*.951,2),o=ca(n*.363,2),s=ca(n*.588,2),l=ca(-n,2),u=ca(n*-.309,2),c=ca(n*.118,2),f=ca(n*.809,2),h=ca(n*.382,2);return vs(t,r,"M"+i+","+u+"H"+a+"L"+o+","+c+"L"+s+","+f+"L0,"+h+"L-"+s+","+f+"L-"+o+","+c+"L-"+a+","+u+"H-"+i+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.66,2),i=ca(e*.38,2),a=ca(e*.76,2);return vs(t,r,"M-"+a+",0l-"+i+",-"+n+"h"+a+"l"+i+",-"+n+"l"+i+","+n+"h"+a+"l-"+i+","+n+"l"+i+","+n+"h-"+a+"l-"+i+","+n+"l-"+i+",-"+n+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*c_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s="A "+o+","+o+" 0 0 1 ";return vs(t,r,"M-"+n+","+i+s+n+","+i+s+"0,-"+a+s+"-"+n+","+i+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*c_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s="A "+o+","+o+" 0 0 1 ";return vs(t,r,"M"+n+",-"+i+s+"-"+n+",-"+i+s+"0,"+a+s+n+",-"+i+"Z")}},"star-square":{n:21,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.1,2),i=ca(e*2,2),a="A "+i+","+i+" 0 0 1 ";return vs(t,r,"M-"+n+",-"+n+a+"-"+n+","+n+a+n+","+n+a+n+",-"+n+a+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*1.9,2),a="A "+i+","+i+" 0 0 1 ";return vs(t,r,"M-"+n+",0"+a+"0,"+n+a+n+",0"+a+"0,-"+n+a+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.7,2),i=ca(e*1.4,2);return vs(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*.7,2);return vs(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/Toe,2);return vs(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2),i=ca(e*.65,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+i+",-"+i+"L"+i+","+i+"M-"+i+","+i+"L"+i+",-"+i)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*.85,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(ds(t))return hs;var n=ca(e/2,2),i=ca(e,2);return vs(t,r,"M"+n+","+i+"V-"+i+"M"+(n-i)+",-"+i+"V"+i+"M"+i+","+n+"H-"+i+"M-"+i+","+(n-i)+"H"+i)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+n+","+a+"L0,0M"+n+","+a+"L0,0M0,-"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+n+",-"+a+"L0,0M"+n+",-"+a+"L0,0M0,"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M"+a+","+n+"L0,0M"+a+",-"+n+"L0,0M-"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+a+","+n+"L0,0M-"+a+",-"+n+"L0,0M"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M0,0L-"+n+",-"+i+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+i+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,-"+i+"V"+i+"M0,0L"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,-"+i+"V"+i+"M0,0L-"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(ds(t))return hs;var n=NO/2.5,i=2*e*UO(n),a=2*e*VO(n);return vs(t,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(ds(t))return hs;var n=NO/4,i=2*e*UO(n),a=2*e*VO(n);return vs(t,r,"M0,0L"+-i+","+a+"A "+2*e+","+2*e+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}};function ds(e){return e===null}var Aoe,Soe,Moe,Eoe;function vs(e,t,r){if((!e||e%360===0)&&!t)return r;if(Moe===e&&Eoe===t&&Aoe===r)return Soe;Moe=e,Eoe=t,Aoe=r;function n(b,p){var k=UO(b),M=VO(b),T=p[0],L=p[1]+(t||0);return[T*k-L*M,T*M+L*k]}for(var i=e/180*NO,a=0,o=0,s=Xot(r),l="",u=0;u<s.length;u++){var c=s[u],f=c[0],h=a,d=o;if(f==="M"||f==="L")a=+c[1],o=+c[2];else if(f==="m"||f==="l")a+=+c[1],o+=+c[2];else if(f==="H")a=+c[1];else if(f==="h")a+=+c[1];else if(f==="V")o=+c[1];else if(f==="v")o+=+c[1];else if(f==="A"){a=+c[1],o=+c[2];var v=n(i,[+c[6],+c[7]]);c[6]=v[0],c[7]=v[1],c[3]=+c[3]+e}(f==="H"||f==="V")&&(f="L"),(f==="h"||f==="v")&&(f="l"),(f==="m"||f==="l")&&(a-=h,o-=d);var m=n(i,[a,o]);(f==="H"||f==="V")&&(f="L"),(f==="M"||f==="L"||f==="m"||f==="l")&&(c[1]=m[0],c[2]=m[1]),c[0]=f,l+=c[0]+c.slice(1).join(",")}return Soe=l,l}});var So=ye((nar,Yoe)=>{"use strict";var dd=qa(),Du=Pr(),Zot=Du.numberFormat,Db=Eo(),ZO=fd(),pL=Oa(),Yd=ka(),Yot=tc(),oM=Du.strTranslate,gL=Zl(),Kot=Wp(),Jot=Dh(),$ot=Jot.LINE_SPACING,Boe=X1().DESELECTDIM,Qot=Ru(),est=O3(),tst=ip().appendArrayPointValue,Ta=Yoe.exports={};Ta.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call(Yd.fill,a),i&&e.style("font-weight",i),n&&e.style("font-style",n),r&&e.style("font-variant",r),c&&e.style("text-transform",GO(ist(c))),l&&e.style("text-shadow",l==="auto"?gL.makeTextShadow(Yd.contrast(a)):GO(l)),u&&e.style("text-decoration-line",GO(nst(u)))};function GO(e){return e==="none"?void 0:e}var rst={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function ist(e){return rst[e]}function nst(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Ta.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};Ta.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};Ta.setRect=function(e,t,r,n,i){e.call(Ta.setPosition,t,r).call(Ta.setSize,n,i)};Ta.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Db(i)&&Db(a)&&t.node())t.node().nodeName==="text"?t.attr("x",i).attr("y",a):t.attr("transform",oM(i,a));else return!1;return!0};Ta.translatePoints=function(e,t,r){e.each(function(n){var i=dd.select(this);Ta.translatePoint(n,i,t,r)})};Ta.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")};Ta.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(i){var a=i[0].trace,o=a.xcalendar,s=a.ycalendar,l=pL.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){Ta.hideOutsideRangePoint(u,dd.select(this),r,n,o,s)})})}};Ta.crispRound=function(e,t,r){return!t||!Db(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};Ta.singleLineStyle=function(e,t,r,n,i){t.style("fill","none");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";Yd.stroke(t,n||a.color),Ta.dashLine(t,s,o)};Ta.lineGroupStyle=function(e,t,r,n){e.style("fill","none").each(function(i){var a=(((i||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=n||a.dash||"";dd.select(this).call(Yd.stroke,r||a.color).call(Ta.dashLine,s,o)})};Ta.dashLine=function(e,t,r){r=+r||0,t=Ta.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};Ta.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e==="solid"?e="":e==="dot"?e=r+"px,"+r+"px":e==="dash"?e=3*r+"px,"+3*r+"px":e==="longdash"?e=5*r+"px,"+5*r+"px":e==="dashdot"?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":e==="longdashdot"&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e};function Noe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=Ta.getPatternAttr,s=i&&(o(i.shape,0,"")||o(i.path,0,""));if(s){var l=o(i.bgcolor,0,null),u=o(i.fgcolor,0,null),c=i.fgopacity,f=o(i.size,0,8),h=o(i.solidity,0,.3),d=t.uid;Ta.pattern(e,"point",r,d,s,f,h,void 0,i.fillmode,l,u,c)}else if(a&&a.type!=="none"){var v=a.type,m="scatterfill-"+t.uid;if(n&&(m="legendfill-"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var b,p;v==="horizontal"?(b={x:a.start,y:0},p={x:a.stop,y:0}):v==="vertical"&&(b={x:0,y:a.start},p={x:0,y:a.stop}),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.min[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.min[0].val:b.y,!0),p.x=t._xA.c2p(p.x===void 0?t._extremes.x.max[0].val:p.x,!0),p.y=t._yA.c2p(p.y===void 0?t._extremes.y.max[0].val:p.y,!0),e.call(Goe,r,m,"linear",a.colorscale,"fill",b,p,!0,!1)}else v==="horizontal"&&(v=v+"reversed"),e.call(Ta.gradient,r,m,v,a.colorscale,"fill")}else t.fillcolor&&e.call(Yd.fill,t.fillcolor)}Ta.singleFillStyle=function(e,t){var r=dd.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};Noe(e,i,t,!1)};Ta.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var i=dd.select(this);n[0].trace&&Noe(i,n[0].trace,t,r)})};var Loe=Coe();Ta.symbolNames=[];Ta.symbolFuncs=[];Ta.symbolBackOffs=[];Ta.symbolNeedLines={};Ta.symbolNoDot={};Ta.symbolNoFill={};Ta.symbolList=[];Object.keys(Loe).forEach(function(e){var t=Loe[e],r=t.n;Ta.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),Ta.symbolNames[r]=e,Ta.symbolFuncs[r]=t.f,Ta.symbolBackOffs[r]=t.backoff||0,t.needLine&&(Ta.symbolNeedLines[r]=!0),t.noDot?Ta.symbolNoDot[r]=!0:Ta.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(Ta.symbolNoFill[r]=!0)});var ast=Ta.symbolNames.length,ost="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ta.symbolNumber=function(e){if(Db(e))e=+e;else if(typeof e=="string"){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),e=Ta.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=ast||e>=400?0:Math.floor(Math.max(e,0))};function Uoe(e,t,r,n){var i=e%100;return Ta.symbolFuncs[i](t,r,n)+(e>=200?ost:"")}var Poe=Zot("~f"),Voe={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};Ta.gradient=function(e,t,r,n,i,a){var o=Voe[n];return Goe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function Goe(e,t,r,n,i,a,o,s,l,u){var c=i.length,f;n==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(f={node:"radialGradient",reversed:u});for(var h=new Array(c),d=0;d<c;d++)f.reversed?h[c-1-d]=[Poe((1-i[d][0])*100),i[d][1]]:h[d]=[Poe(i[d][0]*100),i[d][1]];var v=t._fullLayout,m="g"+v._uid+"-"+r,b=v._defs.select(".gradients").selectAll("#"+m).data([n+h.join(";")],Du.identity);b.exit().remove(),b.enter().append(f.node).each(function(){var p=dd.select(this);f.attrs&&p.attr(f.attrs),p.attr("id",m);var k=p.selectAll("stop").data(h);k.exit().remove(),k.enter().append("stop"),k.each(function(M){var T=ZO(M[1]);dd.select(this).attr({offset:M[0]+"%","stop-color":Yd.tinyRGB(T),"stop-opacity":T.getAlpha()})})}),e.style(a,YO(m,t)).style(a+"-opacity",null),e.classed("gradient_filled",!0)}Ta.pattern=function(e,t,r,n,i,a,o,s,l,u,c,f){var h=t==="legend";s&&(l==="overlay"?(u=s,c=Yd.contrast(u)):(u=void 0,c=s));var d=r._fullLayout,v="p"+d._uid+"-"+n,m,b,p=function(q,U,G,Z,j){return Z+(j-Z)*(q-U)/(G-U)},k,M,T,L,x={},C=ZO(c),S=Yd.tinyRGB(C),g=C.getAlpha(),P=f*g;switch(i){case"/":m=a*Math.sqrt(2),b=a*Math.sqrt(2),k="M-"+m/4+","+b/4+"l"+m/2+",-"+b/2+"M0,"+b+"L"+m+",0M"+m/4*3+","+b/4*5+"l"+m/2+",-"+b/2,M=o*a,L="path",x={d:k,opacity:P,stroke:S,"stroke-width":M+"px"};break;case"\\":m=a*Math.sqrt(2),b=a*Math.sqrt(2),k="M"+m/4*3+",-"+b/4+"l"+m/2+","+b/2+"M0,0L"+m+","+b+"M-"+m/4+","+b/4*3+"l"+m/2+","+b/2,M=o*a,L="path",x={d:k,opacity:P,stroke:S,"stroke-width":M+"px"};break;case"x":m=a*Math.sqrt(2),b=a*Math.sqrt(2),k="M-"+m/4+","+b/4+"l"+m/2+",-"+b/2+"M0,"+b+"L"+m+",0M"+m/4*3+","+b/4*5+"l"+m/2+",-"+b/2+"M"+m/4*3+",-"+b/4+"l"+m/2+","+b/2+"M0,0L"+m+","+b+"M-"+m/4+","+b/4*3+"l"+m/2+","+b/2,M=a-a*Math.sqrt(1-o),L="path",x={d:k,opacity:P,stroke:S,"stroke-width":M+"px"};break;case"|":m=a,b=a,L="path",k="M"+m/2+",0L"+m/2+","+b,M=o*a,L="path",x={d:k,opacity:P,stroke:S,"stroke-width":M+"px"};break;case"-":m=a,b=a,L="path",k="M0,"+b/2+"L"+m+","+b/2,M=o*a,L="path",x={d:k,opacity:P,stroke:S,"stroke-width":M+"px"};break;case"+":m=a,b=a,L="path",k="M"+m/2+",0L"+m/2+","+b+"M0,"+b/2+"L"+m+","+b/2,M=a-a*Math.sqrt(1-o),L="path",x={d:k,opacity:P,stroke:S,"stroke-width":M+"px"};break;case".":m=a,b=a,o<Math.PI/4?T=Math.sqrt(o*a*a/Math.PI):T=p(o,Math.PI/4,1,a/2,a/Math.sqrt(2)),L="circle",x={cx:m/2,cy:b/2,r:T,opacity:P,fill:S};break;default:m=a,b=a,L="path",x={d:i,opacity:P,fill:S};break}var E=[i||"noSh",u||"noBg",c||"noFg",a,o].join(";"),z=d._defs.select(".patterns").selectAll("#"+v).data([E],Du.identity);z.exit().remove(),z.enter().append("pattern").each(function(){var q=dd.select(this);if(q.attr({id:v,width:m+"px",height:b+"px",patternUnits:"userSpaceOnUse",patternTransform:h?"scale(0.8)":""}),u){var U=ZO(u),G=Yd.tinyRGB(U),Z=U.getAlpha(),j=q.selectAll("rect").data([0]);j.exit().remove(),j.enter().append("rect").attr({width:m+"px",height:b+"px",fill:G,"fill-opacity":Z})}var N=q.selectAll(L).data([0]);N.exit().remove(),N.enter().append(L).attr(x)}),e.style("fill",YO(v,r)).style("fill-opacity",null),e.classed("pattern_filled",!0)};Ta.initGradients=function(e){var t=e._fullLayout,r=Du.ensureSingle(t._defs,"g","gradients");r.selectAll("linearGradient,radialGradient").remove(),dd.select(e).selectAll(".gradient_filled").classed("gradient_filled",!1)};Ta.initPatterns=function(e){var t=e._fullLayout,r=Du.ensureSingle(t._defs,"g","patterns");r.selectAll("pattern").remove(),dd.select(e).selectAll(".pattern_filled").classed("pattern_filled",!1)};Ta.getPatternAttr=function(e,t,r){return e&&Du.isArrayOrTypedArray(e)?t<e.length?e[t]:r:e};Ta.pointStyle=function(e,t,r,n){if(e.size()){var i=Ta.makePointStyleFns(t);e.each(function(a){Ta.singlePointStyle(a,dd.select(this),t,i,r,n)})}};Ta.singlePointStyle=function(e,t,r,n,i,a){var o=r.marker,s=o.line;if(a&&a.i>=0&&e.i===void 0&&(e.i=a.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=Ta.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=JO(e,r),f=KO(e,r);t.attr("d",Uoe(u,l,c,f))}var h=!1,d,v,m;if(e.so)m=s.outlierwidth,v=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;m=(e.mlw+1||b+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?v=e.mlcc=n.lineScale(e.mlc):Du.isArrayOrTypedArray(s.color)?v=Yd.defaultLine:v=s.color,Du.isArrayOrTypedArray(o.color)&&(d=Yd.defaultLine,h=!0),"mc"in e?d=e.mcc=n.markerScale(e.mc):d=o.color||o.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(e))}let p=e.mld||(s||{}).dash;if(p&&Ta.dashLine(t,p,m),e.om)t.call(Yd.stroke,d).style({"stroke-width":(m||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:m)+"px");var k=o.gradient,M=e.mgt;M?h=!0:M=k&&k.type,Du.isArrayOrTypedArray(M)&&(M=M[0],Voe[M]||(M=0));var T=o.pattern,L=Ta.getPatternAttr,x=T&&(L(T.shape,e.i,"")||L(T.path,e.i,""));if(M&&M!=="none"){var C=e.mgc;C?h=!0:C=k.color;var S=r.uid;h&&(S+="-"+e.i),Ta.gradient(t,i,S,M,[[0,C],[1,d]],"fill")}else if(x){var g=!1,P=T.fgcolor;!P&&a&&a.color&&(P=a.color,g=!0);var E=L(P,e.i,a&&a.color||null),z=L(T.bgcolor,e.i,null),q=T.fgopacity,U=L(T.size,e.i,8),G=L(T.solidity,e.i,.3);g=g||e.mcc||Du.isArrayOrTypedArray(T.shape)||Du.isArrayOrTypedArray(T.path)||Du.isArrayOrTypedArray(T.bgcolor)||Du.isArrayOrTypedArray(T.fgcolor)||Du.isArrayOrTypedArray(T.size)||Du.isArrayOrTypedArray(T.solidity);var Z=r.uid;g&&(Z+="-"+e.i),Ta.pattern(t,"point",i,Z,x,U,G,e.mcc,T.fillmode,z,E,q)}else Du.isArrayOrTypedArray(d)?Yd.fill(t,d[e.i]):Yd.fill(t,d);m&&Yd.stroke(t,v)}};Ta.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=Ta.tryColorscale(r,""),t.lineScale=Ta.tryColorscale(r,"line"),pL.traceIs(e,"symbols")&&(t.ms2mrc=Qot.isBubble(e)?est(e):function(){return(r.size||6)/2}),e.selectedpoints&&Du.extendFlat(t,Ta.makeSelectedPointStyleFns(e)),t};Ta.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,l=a.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(Du.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(T){var L=T.mo===void 0?i.opacity:T.mo;return T.selected?c?l:L:f?u:Boe*L});var h=i.color,d=a.color,v=o.color;(d||v)&&(t.selectedColorFn=function(T){var L=T.mcc||h;return T.selected?d||L:v||L});var m=i.size,b=a.size,p=o.size,k=b!==void 0,M=p!==void 0;return pL.traceIs(e,"symbols")&&(k||M)&&(t.selectedSizeFn=function(T){var L=T.mrc||m/2;return T.selected?k?b/2:L:M?p/2:L}),t};Ta.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Yd.addOpacity(f,Boe))},t};Ta.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedPointStyleFns(t),n=t.marker||{},i=[];r.selectedOpacityFn&&i.push(function(a,o){a.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&i.push(function(a,o){Yd.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(a,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);a.attr("d",Uoe(Ta.symbolNumber(s),l,JO(o,t),KO(o,t))),o.mrc2=l}),i.length&&e.each(function(a){for(var o=dd.select(this),s=0;s<i.length;s++)i[s](o,a)})}};Ta.tryColorscale=function(e,t){var r=t?Du.nestedProperty(e,t).get():e;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&Du.isArrayOrTypedArray(n))return Yot.makeColorScaleFuncFromTrace(r)}return Du.identity};var HO={start:1,end:-1,middle:0,bottom:1,top:-1};function Hoe(e,t,r,n,i){var a=dd.select(e.node().parentNode),o=t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle",s=t.indexOf("left")!==-1?"end":t.indexOf("right")!==-1?"start":"middle",l=n?n/.8+1:0,u=(gL.lineCount(e)-1)*$ot+1,c=HO[s]*l,f=r*.75+HO[o]*l+(HO[o]-1)*u*r/2;e.attr("text-anchor",s),i||a.attr("transform",oM(c,f))}function joe(e,t){var r=e.ts||t.textfont.size;return Db(r)&&r>0?r:0}Ta.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=Ta.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=dd.select(this),u=a?Du.extractOption(s,t,"txt","texttemplate"):Du.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(a){var c=t._module.formatLabels,f=c?c(s,t,o):{},h={};tst(h,t,s.i),u=Du.texttemplateString({data:[h,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var d=s.tp||t.textposition,v=joe(s,t),m=n?n(s):s.tc||t.textfont.color;l.call(Ta.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:v,color:m}).text(u).call(gL.convertToTspans,r).call(Hoe,d,v,s.mrc)})}};Ta.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedTextStyleFns(t);e.each(function(n){var i=dd.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=joe(n,t);Yd.fill(i,a);var l=pL.traceIs(t,"bar-like");Hoe(i,o,s,n.mrc2||n.mrc,l)})}};var Ioe=.5;Ta.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],i;for(i=1;i<e.length-1;i++)n.push(vL(e[i-1],e[i],e[i+1],t));for(r+="Q"+n[0][0]+" "+e[1],i=2;i<e.length-1;i++)r+="C"+n[i-2][1]+" "+n[i-1][0]+" "+e[i];return r+="Q"+n[e.length-3][1]+" "+e[e.length-1],r};Ta.smoothclosed=function(e,t){if(e.length<3)return"M"+e.join("L")+"Z";var r="M"+e[0],n=e.length-1,i=[vL(e[n],e[0],e[1],t)],a;for(a=1;a<n;a++)i.push(vL(e[a-1],e[a],e[a+1],t));for(i.push(vL(e[n-1],e[n],e[0],t)),a=1;a<=n;a++)r+="C"+i[a-1][1]+" "+i[a][0]+" "+e[a];return r+="C"+i[n][1]+" "+i[0][0]+" "+e[0]+"Z",r};var Woe,Xoe;function B3(e,t,r){return r&&(e=Zoe(e)),t?Rb(e[1]):Ib(e[0])}function Ib(e){var t=dd.round(e,2);return Woe=t,t}function Rb(e){var t=dd.round(e,2);return Xoe=t,t}function vL(e,t,r,n){var i=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+a*a,Ioe/2),u=Math.pow(o*o+s*s,Ioe/2),c=(u*u*i-l*l*o)*n,f=(u*u*a-l*l*s)*n,h=3*u*(l+u),d=3*l*(l+u);return[[Ib(t[0]+(h&&c/h)),Rb(t[1]+(h&&f/h))],[Ib(t[0]-(d&&c/d)),Rb(t[1]-(d&&f/d))]]}var sst={hv:function(e,t,r){return"H"+Ib(t[0])+"V"+B3(t,1,r)},vh:function(e,t,r){return"V"+Rb(t[1])+"H"+B3(t,0,r)},hvh:function(e,t,r){return"H"+Ib((e[0]+t[0])/2)+"V"+Rb(t[1])+"H"+B3(t,0,r)},vhv:function(e,t,r){return"V"+Rb((e[1]+t[1])/2)+"H"+Ib(t[0])+"V"+B3(t,1,r)}},lst=function(e,t,r){return"L"+B3(t,0,r)+","+B3(t,1,r)};Ta.steps=function(e){var t=sst[e]||lst;return function(r){for(var n="M"+Ib(r[0][0])+","+Rb(r[0][1]),i=r.length,a=1;a<i;a++)n+=t(r[a-1],r[a],a===i-1);return n}};function Zoe(e,t){var r=e.backoff,n=e.trace,i=e.d,a=e.i;if(r&&n&&n.marker&&n.marker.angle%360===0&&n.line&&n.line.shape!=="spline"){var o=Du.isArrayOrTypedArray(r),s=e,l=t?t[0]:Woe||0,u=t?t[1]:Xoe||0,c=s[0],f=s[1],h=c-l,d=f-u,v=Math.atan2(d,h),m=o?r[a]:r;if(m==="auto"){var b=s.i;n.type==="scatter"&&b--;var p=s.marker,k=p.symbol;Du.isArrayOrTypedArray(k)&&(k=k[b]);var M=p.size;Du.isArrayOrTypedArray(M)&&(M=M[b]),m=p?Ta.symbolBackOffs[Ta.symbolNumber(k)]*M:0,m+=Ta.getMarkerStandoff(i[b],n)||0}var T=c-m*Math.cos(v),L=f-m*Math.sin(v);(T<=c&&T>=l||T>=c&&T<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[T,L])}return e}Ta.applyBackoff=Zoe;Ta.makeTester=function(){var e=Du.ensureSingleById(dd.select("body"),"svg","js-plotly-tester",function(r){r.attr(Kot.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=Du.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ta.tester=e,Ta.testref=t};Ta.savedBBoxes={};var jO=0,ust=1e4;Ta.bBox=function(e,t,r){r||(r=Roe(e));var n;if(r){if(n=Ta.savedBBoxes[r],n)return Du.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=Roe(i),r){var a=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,s=i.getAttribute("transform");if(!s){var l=Ta.bBox(i,!1,r);return a&&(l.left+=a,l.right+=a),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+a+"~"+o+"~"+s,n=Ta.savedBBoxes[r],n)return Du.extendFlat({},n)}}var u,c;t?u=e:(c=Ta.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),dd.select(u).attr("transform",null).call(gL.positionText,0,0);var f=u.getBoundingClientRect(),h=Ta.testref.node().getBoundingClientRect();t||c.removeChild(u);var d={height:f.height,width:f.width,left:f.left-h.left,top:f.top-h.top,right:f.right-h.left,bottom:f.bottom-h.top};return jO>=ust&&(Ta.savedBBoxes={},jO=0),r&&(Ta.savedBBoxes[r]=d),jO++,Du.extendFlat({},d)};function Roe(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Ta.setClipUrl=function(e,t,r){e.attr("clip-path",YO(t,r))};function YO(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}Ta.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",i=n.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+i[0]||0,y:+i[1]||0}};Ta.setTranslate=function(e,t,r){var n=/(\btranslate\(.*?\);?)/,i=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[i]("transform")||"";return t=t||0,r=r||0,o=o.replace(n,"").trim(),o+=oM(t,r),o=o.trim(),e[a]("transform",o),o};Ta.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",i=n.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+i[0]||1,y:+i[1]||1}};Ta.setScale=function(e,t,r){var n=/(\bscale\(.*?\);?)/,i=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[i]("transform")||"";return t=t||1,r=r||1,o=o.replace(n,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[a]("transform",o),o};var cst=/\s*sc.*/;Ta.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var i=(this.getAttribute("transform")||"").replace(cst,"");i+=n,i=i.trim(),this.setAttribute("transform",i)})}};var fst=/translate\([^)]*\)\s*$/;Ta.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=dd.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(fst);t===1&&r===1?n=[]:n=[oM(o,s),"scale("+t+","+r+")",oM(-o,-s)],l&&n.push(l),i.attr("transform",n.join(""))}})};function KO(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}Ta.getMarkerStandoff=KO;var aM=Math.atan2,Pb=Math.cos,N3=Math.sin;function Doe(e,t){var r=t[0],n=t[1];return[r*Pb(e)-n*N3(e),r*N3(e)+n*Pb(e)]}var Foe,zoe,qoe,Ooe,WO,XO;function JO(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||Du.isArrayOrTypedArray(r))&&(r=0));var n,i,a=t.marker.angleref;if(a==="previous"||a==="north"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],i=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),i=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),h=t._geo.project([u+1e-5,c]),d=aM(h[1]-i,h[0]-n),v=aM(f[1]-i,f[0]-n),m;if(a==="north")m=r/180*Math.PI;else if(a==="previous"){var b=u/180*Math.PI,p=c/180*Math.PI,k=Foe/180*Math.PI,M=zoe/180*Math.PI,T=k-b,L=Pb(M)*N3(T),x=N3(M)*Pb(p)-Pb(M)*N3(p)*Pb(T);m=-aM(L,x)-Math.PI,Foe=u,zoe=c}var C=Doe(d,[Pb(m),0]),S=Doe(v,[N3(m),0]);r=aM(C[1]+S[1],C[0]+S[0])/Math.PI*180,a==="previous"&&!(XO===t.uid&&e.i===WO+1)&&(r=null)}if(a==="previous"&&!t._geo)if(XO===t.uid&&e.i===WO+1&&Db(n)&&Db(i)){var g=n-qoe,P=i-Ooe,E=t.line&&t.line.shape||"",z=E.slice(E.length-1);z==="h"&&(P=0),z==="v"&&(g=0),r+=aM(P,g)/Math.PI*180+90}else r=null}return qoe=n,Ooe=i,WO=e.i,XO=t.uid,r}Ta.getMarkerAngle=JO});var zb=ye((aar,Qoe)=>{"use strict";var U3=qa(),hst=Eo(),dst=Mc(),$O=Oa(),Fb=Pr(),Koe=Fb.strTranslate,mL=So(),yL=ka(),V3=Zl(),Joe=X1(),vst=Dh().OPPOSITE_SIDE,$oe=/ [XY][0-9]* /,QO=1.6,eB=1.6;function pst(e,t,r){var n=e._fullLayout,i=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,h=1,d=i.title,v=(d&&d.text?d.text:"").trim(),m=!1,b=d&&d.font?d.font:{},p=b.family,k=b.size,M=b.color,T=b.weight,L=b.style,x=b.variant,C=b.textcase,S=b.lineposition,g=b.shadow,P=r.subtitlePropName,E=!!P,z=r.subtitlePlaceholder,q=(i.title||{}).subtitle||{text:"",font:{}},U=(q.text||"").trim(),G=!1,Z=1,j=q.font,N=j.family,H=j.size,re=j.color,oe=j.weight,_e=j.style,ke=j.variant,Ce=j.textcase,ge=j.lineposition,ie=j.shadow,Se;a==="title.text"?Se="titleText":a.indexOf("axis")!==-1?Se="axisTitleText":a.indexOf("colorbar")!==-1&&(Se="colorbarTitleText");var Ee=e._context.edits[Se];function we(Ht,nr){return Ht===void 0||nr===void 0?!1:Ht.replace($oe," % ")===nr.replace($oe," % ")}v===""?h=0:we(v,o)&&(Ee||(v=""),h=.2,m=!0),E&&(U===""?Z=0:we(U,z)&&(Ee||(U=""),Z=.2,G=!0)),r._meta?v=Fb.templateString(v,r._meta):n._meta&&(v=Fb.templateString(v,n._meta));var De=v||U||Ee,Le;f||(f=Fb.ensureSingle(n._infolayer,"g","g-"+t),Le=n._hColorbarMoveTitle);var me=f.selectAll("text."+t).data(De?[0]:[]);me.enter().append("text"),me.text(v).attr("class",t),me.exit().remove();var Pe=null,ce=t+"-subtitle",He=U||Ee;if(E&&(Pe=f.selectAll("text."+ce).data(He?[0]:[]),Pe.enter().append("text"),Pe.text(U).attr("class",ce),Pe.exit().remove()),!De)return f;function lt(Ht,nr){Fb.syncOrAsync([mt,Vt],{title:Ht,subtitle:nr})}function mt(Ht){var nr=Ht.title,tt=Ht.subtitle,je;!c&&Le&&(c={}),c?(je="",c.rotate&&(je+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||Le)&&(je+=Koe(0,(c.offset||0)-(Le||0)))):je=null,nr.attr("transform",je);function Ue(Et){if(Et){var pt=U3.select(Et.node().parentNode).select("."+ce);if(!pt.empty()){var Xt=Et.node().getBBox();if(Xt.height){var or=Xt.y+Xt.height+QO*H;pt.attr("y",or)}}}}if(nr.style("opacity",h*yL.opacity(M)).call(mL.font,{color:yL.rgb(M),size:U3.round(k,2),family:p,weight:T,style:L,variant:x,textcase:C,shadow:g,lineposition:S}).attr(u).call(V3.convertToTspans,e,Ue),tt&&!tt.empty()){var Ae=f.select("."+t+"-math-group"),rt=nr.node().getBBox(),St=Ae.node()?Ae.node().getBBox():void 0,Tt=St?St.y+St.height+QO*H:rt.y+rt.height+eB*H,dt=Fb.extendFlat({},u,{y:Tt});tt.attr("transform",je),tt.style("opacity",Z*yL.opacity(re)).call(mL.font,{color:yL.rgb(re),size:U3.round(H,2),family:N,weight:oe,style:_e,variant:ke,textcase:Ce,shadow:ie,lineposition:ge}).attr(dt).call(V3.convertToTspans,e)}return dst.previousPromises(e)}function Vt(Ht){var nr=Ht.title,tt=U3.select(nr.node().parentNode);if(l&&l.selection&&l.side&&v){tt.attr("transform",null);var je=vst[l.side],Ue=l.side==="left"||l.side==="top"?-1:1,Ae=hst(l.pad)?l.pad:2,rt=mL.bBox(tt.node()),St={t:0,b:0,l:0,r:0},Tt=e._fullLayout._reservedMargin;for(var dt in Tt)for(var Et in Tt[dt]){var pt=Tt[dt][Et];St[Et]=Math.max(St[Et],pt)}var Xt={left:St.l,top:St.t,right:n.width-St.r,bottom:n.height-St.b},or=l.maxShift||Ue*(Xt[l.side]-rt[l.side]),_r=0;if(or<0)_r=or;else{var Er=l.offsetLeft||0,ei=l.offsetTop||0;rt.left-=Er,rt.right-=Er,rt.top-=ei,rt.bottom-=ei,l.selection.each(function(){var jr=mL.bBox(this);Fb.bBoxIntersect(rt,jr,Ae)&&(_r=Math.max(_r,Ue*(jr[l.side]-rt[je])+Ae))}),_r=Math.min(or,_r),i._titleScoot=Math.abs(_r)}if(_r>0||or<0){var qr={left:[-_r,0],right:[_r,0],top:[0,-_r],bottom:[0,_r]}[l.side];tt.attr("transform",Koe(qr[0],qr[1]))}}}me.call(lt,Pe);function st(Ht,nr){Ht.text(nr).on("mouseover.opacity",function(){U3.select(this).transition().duration(Joe.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){U3.select(this).transition().duration(Joe.HIDE_PLACEHOLDER).style("opacity",0)})}if(Ee&&(v?me.on(".opacity",null):(st(me,o),m=!0),me.call(V3.makeEditable,{gd:e}).on("edit",function(Ht){s!==void 0?$O.call("_guiRestyle",e,a,Ht,s):$O.call("_guiRelayout",e,a,Ht)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(lt)}).on("input",function(Ht){this.text(Ht||" ").call(V3.positionText,u.x,u.y)}),E)){if(E&&!v){var ct=me.node().getBBox(),Qt=ct.y+ct.height+eB*H;Pe.attr("y",Qt)}U?Pe.on(".opacity",null):(st(Pe,z),G=!0),Pe.call(V3.makeEditable,{gd:e}).on("edit",function(Ht){$O.call("_guiRelayout",e,"title.subtitle.text",Ht)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(lt)}).on("input",function(Ht){this.text(Ht||" ").call(V3.positionText,Pe.attr("x"),Pe.attr("y"))})}return me.classed("js-placeholder",m),Pe&&!Pe.empty()&&Pe.classed("js-placeholder",G),f}Qoe.exports={draw:pst,SUBTITLE_PADDING_EM:eB,SUBTITLE_PADDING_MATHJAX_EM:QO}});var xm=ye((oar,nse)=>{"use strict";var gst=qa(),mst=h3().utcFormat,yc=Pr(),yst=yc.numberFormat,ym=Eo(),f_=yc.cleanNumber,_st=yc.ms2DateTime,ese=yc.dateTime2ms,_m=yc.ensureNumber,tse=yc.isArrayOrTypedArray,h_=fs(),_L=h_.FP_SAFE,Sg=h_.BADNUM,xst=h_.LOG_CLIP,bst=h_.ONEWEEK,xL=h_.ONEDAY,bL=h_.ONEHOUR,rse=h_.ONEMIN,ise=h_.ONESEC,wL=hf(),SL=Rh(),TL=SL.HOUR_PATTERN,AL=SL.WEEKDAY_PATTERN;function sM(e){return Math.pow(10,e)}function tB(e){return e!=null}nse.exports=function(t,r){r=r||{};var n=t._id||"x",i=n.charAt(0);function a(T,L){if(T>0)return Math.log(T)/Math.LN10;if(T<=0&&L&&t.range&&t.range.length===2){var x=t.range[0],C=t.range[1];return .5*(x+C-2*xst*Math.abs(x-C))}else return Sg}function o(T,L,x,C){if((C||{}).msUTC&&ym(T))return+T;var S=ese(T,x||t.calendar);if(S===Sg)if(ym(T)){T=+T;var g=Math.floor(yc.mod(T+.05,1)*10),P=Math.round(T-g/10);S=ese(new Date(P))+g/10}else return Sg;return S}function s(T,L,x){return _st(T,L,x||t.calendar)}function l(T){return t._categories[Math.round(T)]}function u(T){if(tB(T)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[T]!==void 0)return t._categoriesMap[T];t._categories.push(typeof T=="number"?String(T):T);var L=t._categories.length-1;return t._categoriesMap[T]=L,L}return Sg}function c(T,L){for(var x=new Array(L),C=0;C<L;C++){var S=(T[0]||[])[C],g=(T[1]||[])[C];x[C]=f([S,g])}return x}function f(T){if(t._categoriesMap)return t._categoriesMap[T]}function h(T){var L=f(T);if(L!==void 0)return L;if(ym(T))return+T}function d(T){return ym(T)?+T:f(T)}function v(T,L,x){return gst.round(x+L*T,2)}function m(T,L,x){return(T-x)/L}var b=function(L){return ym(L)?v(L,t._m,t._b):Sg},p=function(T){return m(T,t._m,t._b)};if(t.rangebreaks){var k=i==="y";b=function(T){if(!ym(T))return Sg;var L=t._rangebreaks.length;if(!L)return v(T,t._m,t._b);var x=k;t.range[0]>t.range[1]&&(x=!x);for(var C=x?-1:1,S=C*T,g=0,P=0;P<L;P++){var E=C*t._rangebreaks[P].min,z=C*t._rangebreaks[P].max;if(S<E)break;if(S>z)g=P+1;else{g=S<(E+z)/2?P:P+1;break}}var q=t._B[g]||0;return isFinite(q)?v(T,t._m2,q):0},p=function(T){var L=t._rangebreaks.length;if(!L)return m(T,t._m,t._b);for(var x=0,C=0;C<L&&!(T<t._rangebreaks[C].pmin);C++)T>t._rangebreaks[C].pmax&&(x=C+1);return m(T,t._m2,t._B[x])}}t.c2l=t.type==="log"?a:_m,t.l2c=t.type==="log"?sM:_m,t.l2p=b,t.p2l=p,t.c2p=t.type==="log"?function(T,L){return b(a(T,L))}:b,t.p2c=t.type==="log"?function(T){return sM(p(T))}:p,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=f_,t.c2d=t.c2r=t.l2d=t.l2r=_m,t.d2p=t.r2p=function(T){return t.l2p(f_(T))},t.p2d=t.p2r=p,t.cleanPos=_m):t.type==="log"?(t.d2r=t.d2l=function(T,L){return a(f_(T),L)},t.r2d=t.r2c=function(T){return sM(f_(T))},t.d2c=t.r2l=f_,t.c2d=t.l2r=_m,t.c2r=a,t.l2d=sM,t.d2p=function(T,L){return t.l2p(t.d2r(T,L))},t.p2d=function(T){return sM(p(T))},t.r2p=function(T){return t.l2p(f_(T))},t.p2r=p,t.cleanPos=_m):t.type==="date"?(t.d2r=t.r2d=yc.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(T,L,x){return t.l2p(o(T,0,x))},t.p2d=t.p2r=function(T,L,x){return s(p(T),L,x)},t.cleanPos=function(T){return yc.cleanDate(T,Sg,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(T){var L=d(T);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=_m,t.r2l=d,t.d2p=function(T){return t.l2p(t.r2c(T))},t.p2d=function(T){return l(p(T))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(T){return typeof T=="string"&&T!==""?T:_m(T)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(T){var L=h(T);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=_m,t.r2l=h,t.d2p=function(T){return t.l2p(t.r2c(T))},t.p2d=function(T){return l(p(T))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(T){return Array.isArray(T)||typeof T=="string"&&T!==""?T:_m(T)},t.setupMultiCategory=function(T){var L=t._traceIndices,x,C,S=t._matchGroup;if(S&&t._categories.length===0){for(var g in S)if(g!==n){var P=r[wL.id2name(g)];L=L.concat(P._traceIndices)}}var E=[[0,{}],[0,{}]],z=[];for(x=0;x<L.length;x++){var q=T[L[x]];if(i in q){var U=q[i],G=q._length||yc.minRowLength(U);if(tse(U[0])&&tse(U[1]))for(C=0;C<G;C++){var Z=U[0][C],j=U[1][C];tB(Z)&&tB(j)&&(z.push([Z,j]),Z in E[0][1]||(E[0][1][Z]=E[0][0]++),j in E[1][1]||(E[1][1][j]=E[1][0]++))}}}for(z.sort(function(N,H){var re=E[0][1],oe=re[N[0]]-re[H[0]];if(oe)return oe;var _e=E[1][1];return _e[N[1]]-_e[H[1]]}),x=0;x<z.length;x++)u(z[x])}),t.fraction2r=function(T){var L=t.r2l(t.range[0]),x=t.r2l(t.range[1]);return t.l2r(L+T*(x-L))},t.r2fraction=function(T){var L=t.r2l(t.range[0]),x=t.r2l(t.range[1]);return(t.r2l(T)-L)/(x-L)},t.limitRange=function(T){var L=t.minallowed,x=t.maxallowed;if(!(L===void 0&&x===void 0)){T||(T="range");var C=yc.nestedProperty(t,T).get(),S=yc.simpleMap(C,t.r2l),g=S[1]<S[0];g&&S.reverse();var P=yc.simpleMap([L,x],t.r2l);if(L!==void 0&&S[0]<P[0]&&(C[g?1:0]=L),x!==void 0&&S[1]>P[1]&&(C[g?0:1]=x),C[0]===C[1]){var E=t.l2r(L),z=t.l2r(x);if(L!==void 0){var q=E+1;x!==void 0&&(q=Math.min(q,z)),C[g?1:0]=q}if(x!==void 0){var U=z+1;L!==void 0&&(U=Math.max(U,E)),C[g?0:1]=U}}}},t.cleanRange=function(T,L){t._cleanRange(T,L),t.limitRange(T)},t._cleanRange=function(T,L){L||(L={}),T||(T="range");var x=yc.nestedProperty(t,T).get(),C,S;if(t.type==="date"?S=yc.dfltRange(t.calendar):i==="y"?S=SL.DFLTRANGEY:t._name==="realaxis"?S=[0,1]:S=L.dfltRange||SL.DFLTRANGEX,S=S.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(S[0]=0),!x||x.length!==2){yc.nestedProperty(t,T).set(S);return}var g=x[0]===null,P=x[1]===null;for(t.type==="date"&&!t.autorange&&(x[0]=yc.cleanDate(x[0],Sg,t.calendar),x[1]=yc.cleanDate(x[1],Sg,t.calendar)),C=0;C<2;C++)if(t.type==="date"){if(!yc.isDateTime(x[C],t.calendar)){t[T]=S;break}if(t.r2l(x[0])===t.r2l(x[1])){var E=yc.constrain(t.r2l(x[0]),yc.MIN_MS+1e3,yc.MAX_MS-1e3);x[0]=t.l2r(E-1e3),x[1]=t.l2r(E+1e3);break}}else{if(!ym(x[C]))if(!(g||P)&&ym(x[1-C]))x[C]=x[1-C]*(C?10:.1);else{t[T]=S;break}if(x[C]<-_L?x[C]=-_L:x[C]>_L&&(x[C]=_L),x[0]===x[1]){var z=Math.max(1,Math.abs(x[0]*1e-6));x[0]-=z,x[1]+=z}}},t.setScale=function(T){var L=r._size;if(t.overlaying){var x=wL.getFromId({_fullLayout:r},t.overlaying);t.domain=x.domain}var C=T&&t._r?"_r":"range",S=t.calendar;t.cleanRange(C);var g=t.r2l(t[C][0],S),P=t.r2l(t[C][1],S),E=i==="y";if(E?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(g-P),t._b=-t._m*P):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(P-g),t._b=-t._m*g),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var z,q;if(t._rangebreaks=t.locateBreaks(Math.min(g,P),Math.max(g,P)),t._rangebreaks.length){for(z=0;z<t._rangebreaks.length;z++)q=t._rangebreaks[z],t._lBreaks+=Math.abs(q.max-q.min);var U=E;g>P&&(U=!U),U&&t._rangebreaks.reverse();var G=U?-1:1;for(t._m2=G*t._length/(Math.abs(P-g)-t._lBreaks),t._B.push(-t._m2*(E?P:g)),z=0;z<t._rangebreaks.length;z++)q=t._rangebreaks[z],t._B.push(t._B[t._B.length-1]-G*t._m2*(q.max-q.min));for(z=0;z<t._rangebreaks.length;z++)q=t._rangebreaks[z],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(T){var L=t.rangebreaks||[],x,C,S,g,P;L._cachedPatterns||(L._cachedPatterns=L.map(function(re){return re.enabled&&re.bounds?yc.simpleMap(re.bounds,re.pattern?f_:t.d2c):null})),L._cachedValues||(L._cachedValues=L.map(function(re){return re.enabled&&re.values?yc.simpleMap(re.values,t.d2c).sort(yc.sorterAsc):null}));for(var E=0;E<L.length;E++){var z=L[E];if(z.enabled){if(z.bounds){var q=z.pattern;switch(x=L._cachedPatterns[E],C=x[0],S=x[1],q){case AL:P=new Date(T),g=P.getUTCDay(),C>S&&(S+=7,g<C&&(g+=7));break;case TL:P=new Date(T);var U=P.getUTCHours(),G=P.getUTCMinutes(),Z=P.getUTCSeconds(),j=P.getUTCMilliseconds();g=U+(G/60+Z/3600+j/36e5),C>S&&(S+=24,g<C&&(g+=24));break;case"":g=T;break}if(g>=C&&g<S)return Sg}else for(var N=L._cachedValues[E],H=0;H<N.length;H++)if(C=N[H],S=C+z.dvalue,T>=C&&T<S)return Sg}}return T},t.locateBreaks=function(T,L){var x,C,S,g,P=[];if(!t.rangebreaks)return P;var E=t.rangebreaks.slice().sort(function(_e,ke){return _e.pattern===AL&&ke.pattern===TL?-1:ke.pattern===AL&&_e.pattern===TL?1:0}),z=function(_e,ke){if(_e=yc.constrain(_e,T,L),ke=yc.constrain(ke,T,L),_e!==ke){for(var Ce=!0,ge=0;ge<P.length;ge++){var ie=P[ge];_e<ie.max&&ke>=ie.min&&(_e<ie.min&&(ie.min=_e),ke>ie.max&&(ie.max=ke),Ce=!1)}Ce&&P.push({min:_e,max:ke})}};for(x=0;x<E.length;x++){var q=E[x];if(q.enabled)if(q.bounds){var U=T,G=L;q.pattern&&(U=Math.floor(U)),C=yc.simpleMap(q.bounds,q.pattern?f_:t.r2l),S=C[0],g=C[1];var Z=new Date(U),j,N;switch(q.pattern){case AL:N=bst,j=((g<S?7:0)+(g-S))*xL,U+=S*xL-(Z.getUTCDay()*xL+Z.getUTCHours()*bL+Z.getUTCMinutes()*rse+Z.getUTCSeconds()*ise+Z.getUTCMilliseconds());break;case TL:N=xL,j=((g<S?24:0)+(g-S))*bL,U+=S*bL-(Z.getUTCHours()*bL+Z.getUTCMinutes()*rse+Z.getUTCSeconds()*ise+Z.getUTCMilliseconds());break;default:U=Math.min(C[0],C[1]),G=Math.max(C[0],C[1]),N=G-U,j=N}for(var H=U;H<G;H+=N)z(H,H+j)}else for(var re=yc.simpleMap(q.values,t.d2c),oe=0;oe<re.length;oe++)S=re[oe],g=S+q.dvalue,z(S,g)}return P.sort(function(_e,ke){return _e.min-ke.min}),P},t.makeCalcdata=function(T,L,x){var C,S,g,P,E=t.type,z=E==="date"&&T[L+"calendar"];if(L in T){if(C=T[L],P=T._length||yc.minRowLength(C),yc.isTypedArray(C)&&(E==="linear"||E==="log")){if(P===C.length)return C;if(C.subarray)return C.subarray(0,P)}if(E==="multicategory")return c(C,P);for(S=new Array(P),g=0;g<P;g++)S[g]=t.d2c(C[g],0,z,x)}else{var q=L+"0"in T?t.d2c(T[L+"0"],0,z):0,U=T["d"+L]?Number(T["d"+L]):1;for(C=T[{x:"y",y:"x"}[L]],P=T._length||C.length,S=new Array(P),g=0;g<P;g++)S[g]=q+g*U}if(t.rangebreaks)for(g=0;g<P;g++)S[g]=t.maskBreaks(S[g]);return S},t.isValidRange=function(T,L){return Array.isArray(T)&&T.length===2&&(L&&T[0]===null||ym(t.r2l(T[0])))&&(L&&T[1]===null||ym(t.r2l(T[1])))},t.getAutorangeDflt=function(T,L){var x=!t.isValidRange(T,"nullOk");return x&&L&&L.reverseDflt?x="reversed":T&&(T[0]===null&&T[1]===null?x=!0:T[0]===null&&T[1]!==null?x="min":T[0]!==null&&T[1]===null&&(x="max")),x},t.isReversed=function(){var T=t.autorange;return T==="reversed"||T==="min reversed"||T==="max reversed"},t.isPtWithinRange=function(T,L){var x=t.c2l(T[i],null,L),C=t.r2l(t.range[0]),S=t.r2l(t.range[1]);return C<S?C<=x&&x<=S:S<=x&&x<=C},t._emptyCategories=function(){t._categories=[],t._categoriesMap={}},t.clearCalc=function(){var T=t._matchGroup;if(T){var L=null,x=null;for(var C in T){var S=r[wL.id2name(C)];if(S._categories){L=S._categories,x=S._categoriesMap;break}}L&&x?(t._categories=L,t._categoriesMap=x):t._emptyCategories()}else t._emptyCategories();if(t._initialCategories)for(var g=0;g<t._initialCategories.length;g++)u(t._initialCategories[g])},t.sortByInitialCategories=function(){var T=[];if(t._emptyCategories(),t._initialCategories)for(var L=0;L<t._initialCategories.length;L++)u(t._initialCategories[L]);T=T.concat(t._traceIndices);var x=t._matchGroup;for(var C in x)if(n!==C){var S=r[wL.id2name(C)];S._categories=t._categories,S._categoriesMap=t._categoriesMap,T=T.concat(S._traceIndices)}return T};var M=r._d3locale;t.type==="date"&&(t._dateFormat=M?M.timeFormat:mst,t._extraFormat=r._extraFormat),t._separators=r.separators,t._numFormat=M?M.numberFormat:yst,delete t._minDtick,delete t._forceTick0}});var G3=ye((sar,lse)=>{"use strict";var ase=Eo(),rB=Pr(),wst=fs().BADNUM,ML=rB.isArrayOrTypedArray,Tst=rB.isDateTime,Ast=rB.cleanNumber,ose=Math.round;lse.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(ML(i)&&!i.length)return"-";if(!a&&Cst(i))return"multicategory";if(a&&Array.isArray(i[0])){for(var o=[],s=0;s<i.length;s++)if(ML(i[s]))for(var l=0;l<i[s].length;l++)o.push(i[s][l]);i=o}if(Est(i,r))return"date";var u=n.autotypenumbers!=="strict";return kst(i,u)?"category":Mst(i,u)?"linear":"-"};function Sst(e,t){return t?ase(e):typeof e=="number"}function Mst(e,t){for(var r=e.length,n=0;n<r;n++)if(Sst(e[n],t))return!0;return!1}function Est(e,t){for(var r=e.length,n=sse(r),i=0,a=0,o={},s=0;s<r;s+=n){var l=ose(s),u=e[l],c=String(u);o[c]||(o[c]=1,Tst(u,t)&&i++,ase(u)&&a++)}return i>a*2}function sse(e){return Math.max(1,(e-1)/1e3)}function kst(e,t){for(var r=e.length,n=sse(r),i=0,a=0,o={},s=0;s<r;s+=n){var l=ose(s),u=e[l],c=String(u);if(!o[c]){o[c]=1;var f=typeof u;f==="boolean"?a++:(t?Ast(u)!==wst:f==="number")?i++:f==="string"&&a++}}return a>i*2}function Cst(e){return ML(e[0])&&ML(e[1])}});var Mg=ye((lar,gse)=>{"use strict";var Lst=qa(),hse=Eo(),d_=Pr(),EL=fs().FP_SAFE,Pst=Oa(),Ist=So(),dse=hf(),Rst=dse.getFromId,Dst=dse.isLinked;gse.exports={applyAutorangeOptions:pse,getAutoRange:iB,makePadFn:nB,doAutoRange:zst,findExtremes:qst,concatExtremes:sB};function iB(e,t){var r,n,i=[],a=e._fullLayout,o=nB(a,t,0),s=nB(a,t,1),l=sB(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return d_.simpleMap(t.range,t.r2l);var f=u[0].val,h=c[0].val;for(r=1;r<u.length&&f===h;r++)f=Math.min(f,u[r].val);for(r=1;r<c.length&&f===h;r++)h=Math.max(h,c[r].val);var d=t.autorange,v=d==="reversed"||d==="min reversed"||d==="max reversed";if(!v&&t.range){var m=d_.simpleMap(t.range,t.r2l);v=m[1]<m[0]}t.autorange==="reversed"&&(t.autorange=!0);var b=t.rangemode,p=b==="tozero",k=b==="nonnegative",M=t._length,T=M/10,L=0,x,C,S,g,P,E;for(r=0;r<u.length;r++)for(x=u[r],n=0;n<c.length;n++)C=c[n],E=C.val-x.val-use(t,x.val,C.val),E>0&&(P=M-o(x)-s(C),P>T?E/P>L&&(S=x,g=C,L=E/P):E/M>L&&(S={val:x.val,nopad:1},g={val:C.val,nopad:1},L=E/M));function z(j,N){return Math.max(j,s(N))}if(f===h){var q=f-1,U=f+1;if(p)if(f===0)i=[0,1];else{var G=(f>0?c:u).reduce(z,0),Z=f/(1-Math.min(.5,G/M));i=f>0?[0,Z]:[Z,0]}else k?i=[Math.max(0,q),Math.max(1,U)]:i=[q,U]}else p?(S.val>=0&&(S={val:0,nopad:1}),g.val<=0&&(g={val:0,nopad:1})):k&&(S.val-L*o(S)<0&&(S={val:0,nopad:1}),g.val<=0&&(g={val:1,nopad:1})),L=(g.val-S.val-use(t,x.val,C.val))/(M-o(S)-s(g)),i=[S.val-L*o(S),g.val+L*s(g)];return i=pse(i,t),t.limitRange&&t.limitRange(),v&&i.reverse(),d_.simpleMap(i,t.l2r||Number)}function use(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a<i.length;a++){var o=i[a];n+=o.max-o.min}return n}function nB(e,t,r){var n=.05*t._length,i=t._anchorAxis||{};if((t.ticklabelposition||"").indexOf("inside")!==-1||(i.ticklabelposition||"").indexOf("inside")!==-1){var a=t.isReversed();if(!a){var o=d_.simpleMap(t.range,t.r2l);a=o[1]<o[0]}a&&(r=!r)}var s=0;return Dst(e,t._id)||(s=Fst(e,t,r)),n=Math.max(s,n),t.constrain==="domain"&&t._inputDomain&&(n*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(u){return u.nopad?0:u.pad+(u.extrapad?n:s)}}var cse=3;function Fst(e,t,r){var n=0,i=t._id.charAt(0)==="x";for(var a in e._plots){var o=e._plots[a];if(!(t._id!==o.xaxis._id&&t._id!==o.yaxis._id)){var s=(i?o.yaxis:o.xaxis)||{};if((s.ticklabelposition||"").indexOf("inside")!==-1&&(!r&&(s.side==="left"||s.side==="bottom")||r&&(s.side==="top"||s.side==="right"))){if(s._vals){var l=d_.deg2rad(s._tickAngles[s._id+"tick"]||0),u=Math.abs(Math.cos(l)),c=Math.abs(Math.sin(l));if(!s._vals[0].bb){var f=s._id+"tick",h=s._selections[f];h.each(function(k){var M=Lst.select(this),T=M.select(".text-math-group");T.empty()&&(k.bb=Ist.bBox(M.node()))})}for(var d=0;d<s._vals.length;d++){var v=s._vals[d],m=v.bb;if(m){var b=2*cse+m.width,p=2*cse+m.height;n=Math.max(n,i?Math.max(b*u,p*c):Math.max(p*u,b*c))}}}s.ticks==="inside"&&s.ticklabelposition==="inside"&&(n+=s.ticklen||0)}}}return n}function sB(e,t,r){var n=t._id,i=e._fullData,a=e._fullLayout,o=[],s=[],l,u,c;function f(b,p){for(l=0;l<p.length;l++){var k=b[p[l]],M=(k._extremes||{})[n];if(k.visible===!0&&M){for(u=0;u<M.min.length;u++)c=M.min[u],aB(o,c.val,c.pad,{extrapad:c.extrapad});for(u=0;u<M.max.length;u++)c=M.max[u],oB(s,c.val,c.pad,{extrapad:c.extrapad})}}}if(f(i,t._traceIndices),f(a.annotations||[],t._annIndices||[]),f(a.shapes||[],t._shapeIndices||[]),t._matchGroup&&!r){for(var h in t._matchGroup)if(h!==t._id){var d=Rst(e,h),v=sB(e,d,!0),m=t._length/d._length;for(u=0;u<v.min.length;u++)c=v.min[u],aB(o,c.val,c.pad*m,{extrapad:c.extrapad});for(u=0;u<v.max.length;u++)c=v.max[u],oB(s,c.val,c.pad*m,{extrapad:c.extrapad})}}return{min:o,max:s}}function zst(e,t,r){if(t.setScale(),t.autorange){t.range=r?r.slice():iB(e,t),t._r=t.range.slice(),t._rl=d_.simpleMap(t._r,t.r2l);var n=t._input,i={};i[t._attr+".range"]=t.range,i[t._attr+".autorange"]=t.autorange,Pst.call("_storeDirectGUIEdit",e.layout,e._fullLayout._preGUI,i),n.range=t.range.slice(),n.autorange=t.autorange}var a=t._anchorAxis;if(a&&a.rangeslider){var o=a.rangeslider[t._name];o&&o.rangemode==="auto"&&(o.range=iB(e,t)),a._input.rangeslider[t._name]=d_.extendFlat({},o)}}function qst(e,t,r){r||(r={}),e._m||e.setScale();var n=[],i=[],a=t.length,o=r.padded||!1,s=r.tozero&&(e.type==="linear"||e.type==="-"),l=e.type==="log",u=!1,c=r.vpadLinearized||!1,f,h,d,v,m,b,p,k,M;function T(z){if(Array.isArray(z))return u=!0,function(U){return Math.max(Number(z[U]||0),0)};var q=Math.max(Number(z||0),0);return function(){return q}}var L=T((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),x=T((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=T(r.vpadplus||r.vpad),S=T(r.vpadminus||r.vpad);if(!u){if(k=1/0,M=-1/0,l)for(f=0;f<a;f++)h=t[f],h<k&&h>0&&(k=h),h>M&&h<EL&&(M=h);else for(f=0;f<a;f++)h=t[f],h<k&&h>-EL&&(k=h),h>M&&h<EL&&(M=h);t=[k,M],a=2}var g={tozero:s,extrapad:o};function P(z){d=t[z],hse(d)&&(b=L(z),p=x(z),c?(v=e.c2l(d)-S(z),m=e.c2l(d)+C(z)):(k=d-S(z),M=d+C(z),l&&k<M/10&&(k=M/10),v=e.c2l(k),m=e.c2l(M)),s&&(v=Math.min(0,v),m=Math.max(0,m)),fse(v)&&aB(n,v,p,g),fse(m)&&oB(i,m,b,g))}var E=Math.min(6,a);for(f=0;f<E;f++)P(f);for(f=a-1;f>=E;f--)P(f);return{min:n,max:i,opts:r}}function aB(e,t,r,n){vse(e,t,r,n,Ost)}function oB(e,t,r,n){vse(e,t,r,n,Bst)}function vse(e,t,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<e.length&&s;l++){var u=e[l];if(i(u.val,t)&&u.pad>=r&&(u.extrapad||!o)){s=!1;break}else i(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function fse(e){return hse(e)&&Math.abs(e)<EL}function Ost(e,t){return e<=t}function Bst(e,t){return e>=t}function Nst(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&kL(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&kL(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function Ust(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&kL(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&kL(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function kL(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t<r):!0}function pse(e,t){if(!t||!t.autorangeoptions)return e;var r=e[0],n=e[1],i=t.autorangeoptions.include;if(i!==void 0){var a=t.d2l(r),o=t.d2l(n);d_.isArrayOrTypedArray(i)||(i=[i]);for(var s=0;s<i.length;s++){var l=t.d2l(i[s]);a>=l&&(a=l,r=l),o<=l&&(o=l,n=l)}}return r=Nst(r,t),n=Ust(n,t),[r,n]}});var ho=ye((car,Bse)=>{"use strict";var w0=qa(),zh=Eo(),H3=Mc(),uM=Oa(),Wo=Pr(),j3=Wo.strTranslate,qb=Zl(),Vst=zb(),cM=ka(),Xp=So(),Gst=Rd(),mse=PO(),uar=Rh(),Kd=fs(),Hst=Kd.ONEMAXYEAR,PL=Kd.ONEAVGYEAR,IL=Kd.ONEMINYEAR,jst=Kd.ONEMAXQUARTER,fB=Kd.ONEAVGQUARTER,RL=Kd.ONEMINQUARTER,Wst=Kd.ONEMAXMONTH,W3=Kd.ONEAVGMONTH,DL=Kd.ONEMINMONTH,Zp=Kd.ONEWEEK,qv=Kd.ONEDAY,v_=qv/2,wm=Kd.ONEHOUR,fM=Kd.ONEMIN,FL=Kd.ONESEC,Xst=Kd.ONEMILLI,Zst=Kd.ONEMICROSEC,Ob=Kd.MINUS_SIGN,qL=Kd.BADNUM,hB={K:"zeroline"},dB={K:"gridline",L:"path"},vB={K:"minor-gridline",L:"path"},kse={K:"tick",L:"path"},yse={K:"tick",L:"text"},_se={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},OL=Dh(),lM=OL.MID_SHIFT,Bb=OL.CAP_SHIFT,hM=OL.LINE_SPACING,Yst=OL.OPPOSITE_SIDE,zL=3,$n=Bse.exports={};$n.setConvert=xm();var Kst=G3(),Tm=hf(),Jst=Tm.idSort,$st=Tm.isLinked;$n.id2name=Tm.id2name;$n.name2id=Tm.name2id;$n.cleanId=Tm.cleanId;$n.list=Tm.list;$n.listIds=Tm.listIds;$n.getFromId=Tm.getFromId;$n.getFromTrace=Tm.getFromTrace;var Cse=Mg();$n.getAutoRange=Cse.getAutoRange;$n.findExtremes=Cse.findExtremes;var Qst=1e-4;function yB(e){var t=(e[1]-e[0])*Qst;return[e[0]-t,e[1]+t]}$n.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],l=n+"ref",u={};return i||(i=s[0]||(typeof a=="string"?a:a[0])),a||(a=i),s=s.concat(s.map(function(c){return c+" domain"})),u[l]={valType:"enumerated",values:s.concat(a?typeof a=="string"?[a]:a:[]),dflt:i},Wo.coerce(e,t,u,l)};$n.coerceRefArray=function(e,t,r,n,i,a,o){let s=n.charAt(n.length-1);var l=r._fullLayout._subplots[s+"axis"];let u=n+"ref";var c=e[u];i||(i=l[0]||(typeof a=="string"?a:a[0])),l=l.concat(l.map(h=>h+" domain")),l=l.concat(a||[]),c.length>o?(Wo.warn("Array attribute "+u+" has more entries than expected, truncating to "+o),c=c.slice(0,o)):c.length<o&&(Wo.warn("Array attribute "+u+" has fewer entries than expected, extending with default value"),c=c.concat(Array(o-c.length).fill(i)));for(var f=0;f<c.length;f++)c[f]=Tm.cleanId(c[f],s,!0)||c[f],l.includes(c[f])||(c[f]=i);return t[u]=c,c};$n.getRefType=function(e){return e===void 0?e:Array.isArray(e)?"array":e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};$n.coercePosition=function(e,t,r,n,i,a){var o,s,l=$n.getRefType(n);if(l!=="range")o=Wo.ensureNumber,s=r(i,a);else{var u=$n.getFromId(t,n);a=u.fraction2r(a),s=r(i,a),o=u.cleanPos}e[i]=o(s)};$n.cleanPosition=function(e,t,r){var n=r==="paper"||r==="pixel"?Wo.ensureNumber:$n.getFromId(t,r).cleanPos;return n(e)};$n.redrawComponents=function(e,t){t=t||$n.listIds(e);var r=e._fullLayout;function n(i,a,o,s){for(var l=uM.getComponentMethod(i,a),u={},c=0;c<t.length;c++)for(var f=r[$n.id2name(t[c])],h=f[o],d=0;d<h.length;d++){var v=h[d];if(!u[v]&&(l(e,v),u[v]=1,s))return}}n("annotations","drawOne","_annIndices"),n("shapes","drawOne","_shapeIndices"),n("images","draw","_imgIndices",!0),n("selections","drawOne","_selectionIndices")};var elt=$n.getDataConversions=function(e,t,r,n){var i,a=r==="x"||r==="y"||r==="z"?r:n;if(Wo.isArrayOrTypedArray(a)){if(i={type:Kst(n,void 0,{autotypenumbers:e._fullLayout.autotypenumbers}),_categories:[]},$n.setConvert(i),i.type==="category")for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=$n.getFromTrace(e,t,a);return i?{d2c:i.d2c,c2d:i.c2d}:a==="ids"?{d2c:bse,c2d:bse}:{d2c:xse,c2d:xse}};function xse(e){return+e}function bse(e){return String(e)}$n.getDataToCoordFunc=function(e,t,r,n){return elt(e,t,r,n).d2c};$n.counterLetter=function(e){var t=e.charAt(0);if(t==="x")return"y";if(t==="y")return"x"};$n.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))};$n.saveRangeInitial=function(e,t){for(var r=$n.list(e,"",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=a._rangeInitial0===void 0&&a._rangeInitial1===void 0,s=o||a.range[0]!==a._rangeInitial0||a.range[1]!==a._rangeInitial1,l=a.autorange;(o&&l!==!0||t&&s)&&(a._rangeInitial0=l==="min"||l==="max reversed"?void 0:a.range[0],a._rangeInitial1=l==="max"||l==="min reversed"?void 0:a.range[1],a._autorangeInitial=l,n=!0)}return n};$n.saveShowSpikeInitial=function(e,t){for(var r=$n.list(e,"",!0),n=!1,i="on",a=0;a<r.length;a++){var o=r[a],s=o._showSpikeInitial===void 0,l=s||o.showspikes!==o._showspikes;(s||t&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),i==="on"&&!o.showspikes&&(i="off")}return e._fullLayout._cartesianSpikesEnabled=i,n};$n.autoBin=function(e,t,r,n,i,a){var o=Wo.aggNums(Math.min,null,e),s=Wo.aggNums(Math.max,null,e);if(t.type==="category"||t.type==="multicategory")return{start:o-.5,end:s+.5,size:Math.max(1,Math.round(a)||1),_dataSpan:s-o};i||(i=t.calendar);var l;if(t.type==="log"?l={type:"linear",range:[o,s]}:l={type:t.type,range:Wo.simpleMap([o,s],t.c2r,0,i),calendar:i},$n.setConvert(l),a=a&&mse.dtick(a,l.type),a)l.dtick=a,l.tick0=mse.tick0(void 0,l.type,i);else{var u;if(r)u=(s-o)/r;else{var c=Wo.distinctVals(e),f=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),h=f*Wo.roundUp(c.minDiff/f,[.9,1.9,4.9,9.9],!0);u=Math.max(h,2*Wo.stdev(e)/Math.pow(e.length,n?.25:.4)),zh(u)||(u=1)}$n.autoTicks(l,u)}var d=l.dtick,v=$n.tickIncrement($n.tickFirst(l),d,"reverse",i),m,b;if(typeof d=="number")v=tlt(v,e,l,o,s),b=1+Math.floor((s-v)/d),m=v+b*d;else for(l.dtick.charAt(0)==="M"&&(v=rlt(v,e,d,o,i)),m=v,b=0;m<=s;)m=$n.tickIncrement(m,d,!1,i),b++;return{start:t.c2r(v,0,i),end:t.c2r(m,0,i),size:d,_dataSpan:s-o}};function tlt(e,t,r,n,i){var a=0,o=0,s=0,l=0;function u(d){return(1+(d-e)*100/r.dtick)%100<2}for(var c=0;c<t.length;c++)t[c]%1===0?s++:zh(t[c])||l++,u(t[c])&&a++,u(t[c]+r.dtick/2)&&o++;var f=t.length-l;if(s===f&&r.type!=="date")r.dtick<1?e=n-.5*r.dtick:(e-=.5,e+r.dtick<n&&(e+=r.dtick));else if(o<f*.1&&(a>f*.3||u(n)||u(i))){var h=r.dtick/2;e+=e+h<n?h:-h}return e}function rlt(e,t,r,n,i){var a=Wo.findExactDates(t,i),o=.8;if(a.exactDays>o){var s=Number(r.slice(1));a.exactYears>o&&s%12===0?e=$n.tickIncrement(e,"M6","reverse")+qv*1.5:a.exactMonths>o?e=$n.tickIncrement(e,"M1","reverse")+qv*15.5:e-=v_;var l=$n.tickIncrement(e,r);if(l<=n)return l}return e}$n.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n=t.dtick&&zh(t._tmin),i;if(n){var a=$n.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=Wo.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Wo.simpleMap(i,t.l2r),e._isMinor=!0,$n.prepTicks(e,r),n){var s=zh(t.dtick),l=zh(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?lB(u,c)?u===2*Zp&&c===2*qv&&(e.dtick=Zp):u===2*Zp&&c===3*qv?e.dtick=Zp:u===Zp&&!(t._input.minor||{}).nticks?e.dtick=qv:wse(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":lB(u,c)?u>=12&&c===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?lB(u,c)||(e.dtick=wse(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}t.minor._tick0Init===void 0&&(e.tick0=t.tick0)};function lB(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function wse(e,t){return Math.abs(e/t-1)<.001}$n.prepTicks=function(e,t){var r=Wo.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,i;n||(e.type==="category"||e.type==="multicategory"?(i=e.tickfont?Wo.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)==="y"?40:80,n=Wo.constrain(e._length/i,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,$n.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"&&ilt(e),e.tick0||(e.tick0=e.type==="date"?"2000-01-01":0),e.type==="date"&&e.dtick<.1&&(e.dtick=.1),Rse(e)};function uB(e){return+e.substring(1)}function ilt(e){var t;function r(){return!(zh(e.dtick)||e.dtick.charAt(0)!=="M")}var n=r(),i=$n.getTickFormat(e);if(i){var a=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=wm,a&&!n&&e.dtick<wm&&(e.dtick=wm)):/%p/.test(i)?(t=v_,a&&!n&&e.dtick<v_&&(e.dtick=v_)):/%[Aadejuwx]/.test(i)?(t=qv,a&&!n&&e.dtick<qv&&(e.dtick=qv)):/%[UVW]/.test(i)?(t=Zp,a&&!n&&e.dtick<Zp&&(e.dtick=Zp)):/%[Bbm]/.test(i)?(t=W3,a&&(n?uB(e.dtick)<1:e.dtick<DL)&&(e.dtick="M1")):/%[q]/.test(i)?(t=fB,a&&(n?uB(e.dtick)<3:e.dtick<RL)&&(e.dtick="M3")):/%[Yy]/.test(i)&&(t=PL,a&&(n?uB(e.dtick)<12:e.dtick<IL)&&(e.dtick="M12")))}n=r(),n&&e.tick0===e._dowTick0&&(e.tick0=e._rawTick0),e._definedDelta=t}function nlt(e,t,r){for(var n=0;n<e.length;n++){var i=e[n].value,a=n,o=n+1;n<e.length-1?(a=n,o=n+1):n>0?(a=n-1,o=n):(a=n,o=n);var s=e[a].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=IL?u>=IL&&u<=Hst?f=u:f=PL:r===fB&&c>=RL?u>=RL&&u<=jst?f=u:f=fB:c>=DL?u>=DL&&u<=Wst?f=u:f=W3:r===Zp&&c>=Zp?f=Zp:c>=qv?f=qv:r===v_&&c>=v_?f=v_:r===wm&&c>=wm&&(f=wm);var h;f>=u&&(f=u,h=!0);var d=i+f;if(t.rangebreaks&&f>0){for(var v=84,m=0,b=0;b<v;b++){var p=(b+.5)/v;t.maskBreaks(i*(1-p)+p*d)!==qL&&m++}f*=m/v,f||(e[n].drop=!0),h&&u>Zp&&(f=u)}(f>0||n===0)&&(e[n].periodX=i+f/2)}}$n.calcTicks=function(t,r){for(var n=t.type,i=t.calendar,a=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||Wo.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=Wo.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]<u[0],f=Math.min(u[0],u[1]),h=Math.max(u[0],u[1]),d=Math.max(1e3,t._length||0),v=[],m=[],b=[],p=[],k=[],M=t.minor&&(t.minor.ticks||t.minor.showgrid),T=1;T>=(M?0:1);T--){var L=!T;T?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var x=T?t:Wo.extendFlat({},t,t.minor);if(L?$n.prepMinorTicks(x,t,r):$n.prepTicks(x,r),x.tickmode==="array"){T?(b=[],v=Tse(t,!L)):(p=[],m=Tse(t,!L));continue}if(x.tickmode==="sync"){b=[],v=alt(t);continue}var C=yB(u),S=C[0],g=C[1],P=zh(x.dtick),E=n==="log"&&!(P||x.dtick.charAt(0)==="L"),z=$n.tickFirst(x,r);if(T){if(t._tmin=z,z<S!==c)break;(n==="category"||n==="multicategory")&&(g=c?Math.max(-.5,g):Math.min(t._categories.length-.5,g))}var q=null,U=z,G;if(T){var Z;P?Z=t.dtick:n==="date"?typeof t.dtick=="string"&&t.dtick.charAt(0)==="M"&&(Z=W3*t.dtick.substring(1)):Z=t._roughDTick,G=Math.round((t.r2l(U)-t.r2l(t.tick0))/Z)-1}var j=x.dtick;for(x.rangebreaks&&x._tick0Init!==x.tick0&&(U=cB(U,t),c||(U=$n.tickIncrement(U,j,!c,i))),T&&o&&(U=$n.tickIncrement(U,j,!c,i),G--);c?U>=g:U<=g;U=$n.tickIncrement(U,j,c,i)){if(T&&G++,x.rangebreaks&&!c){if(U<S)continue;if(x.maskBreaks(U)===qL&&cB(U,x)>=h)break}if(b.length>d||U===q)break;q=U;var N={value:U};T?(E&&U!==(U|0)&&(N.simpleLabel=!0),a>1&&G%a&&(N.skipLabel=!0),b.push(N)):(N.minor=!0,p.push(N))}}if(!p||p.length<2)l=!1;else{var H=(p[1].value-p[0].value)*(s?-1:1);Llt(H,t.tickformat)||(l=!1)}if(!l)k=b;else{var re=b.concat(p);o&&b.length&&(re=re.slice(1)),re=re.sort(function(Qt,Ht){return Qt.value-Ht.value}).filter(function(Qt,Ht,nr){return Ht===0||Qt.value!==nr[Ht-1].value});var oe=re.map(function(Qt,Ht){return Qt.minor===void 0&&!Qt.skipLabel?Ht:null}).filter(function(Qt){return Qt!==null});oe.forEach(function(Qt){l.map(function(Ht){var nr=Qt+Ht;nr>=0&&nr<re.length&&Wo.pushUnique(k,re[nr])})})}if(M){var _e=t.minor.ticks==="inside"&&t.ticks==="outside"||t.minor.ticks==="outside"&&t.ticks==="inside";if(!_e){for(var ke=b.map(function(Qt){return Qt.value}),Ce=[],ge=0;ge<p.length;ge++){var ie=p[ge],Se=ie.value;if(ke.indexOf(Se)===-1){for(var Ee=!1,we=0;!Ee&&we<b.length;we++)1e7+b[we].value===1e7+Se&&(Ee=!0);Ee||Ce.push(ie)}}p=Ce}}o&&nlt(k,t,t._definedDelta);var De;if(t.rangebreaks){var Le=t._id.charAt(0)==="y",me=1;t.tickmode==="auto"&&(me=t.tickfont?t.tickfont.size:12);var Pe=NaN;for(De=b.length-1;De>-1;De--){if(b[De].drop){b.splice(De,1);continue}b[De].value=cB(b[De].value,t);var ce=t.c2p(b[De].value);(Le?Pe>ce-me:Pe<ce+me)?b.splice(c?De+1:De,1):Pe=ce}}wB(t)&&Math.abs(u[1]-u[0])===360&&b.pop(),t._tmax=(b[b.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;var He,lt=function(Qt){Qt.text="",t._prevDateHead=He};b=b.concat(p);function mt(Qt,Ht){var nr=$n.tickText(Qt,Ht.value,!1,Ht.simpleLabel),tt=Ht.periodX;return tt!==void 0&&(nr.periodX=tt,(tt>h||tt<f)&&(tt>h&&(nr.periodX=h),tt<f&&(nr.periodX=f),lt(nr))),nr}var Vt;for(De=0;De<b.length;De++){var st=b[De].minor,ct=b[De].value;st?(l&&k.indexOf(b[De])!==-1?Vt=mt(t,b[De]):Vt={x:ct},Vt.minor=!0,m.push(Vt)):(He=t._prevDateHead,Vt=mt(t,b[De]),(b[De].skipLabel||l&&k.indexOf(b[De])===-1)&<(Vt),v.push(Vt))}return v=v.concat(m),t._inCalcTicks=!1,o&&v.length&&(v[0].noTick=!0),v};function Lse(e,t){return e.rangebreaks&&(t=t.filter(function(r){return e.maskBreaks(r.x)!==qL})),t}function alt(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=$n.tickText(e,a);t._vals[n].minor&&(o.minor=!0,o.text=""),r.push(o)}}return r=Lse(e,r),r}function Tse(e,t){var r=Wo.simpleMap(e.range,e.r2l),n=yB(r),i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),o=e.type==="category"?e.d2l_noadd:e.d2l;e.type==="log"&&String(e.dtick).charAt(0)!=="L"&&(e.dtick="L"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var s=[],l=0;l<=1;l++)if(!(t!==void 0&&(t&&l||t===!1&&!l))&&!(l&&!e.minor)){var u=l?e.minor.tickvals:e.tickvals,c=l?[]:e.ticktext;if(u){Wo.isArrayOrTypedArray(c)||(c=[]);for(var f=0;f<u.length;f++){var h=o(u[f]);if(h>i&&h<a){var d=$n.tickText(e,h,!1,String(c[f]));l&&(d.minor=!0,d.text=""),s.push(d)}}}}return s=Lse(e,s),s}var CL=[2,5,10],Ase=[1,2,3,6,12],Sse=[1,2,5,10,15,30],olt=[1,2,3,7,14],Pse=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Ise=[-.301,0,.301,.699,1],slt=[15,30,45,90,180];function bm(e,t,r){return t*Wo.roundUp(e/t,r)}$n.autoTicks=function(e,t,r){var n;function i(f){return Math.pow(f,Math.floor(Math.log(t)/Math.LN10))}if(e.type==="date"){e.tick0=Wo.dateTick0(e.calendar,0);var a=2*t;if(a>PL)t/=PL,n=i(10),e.dtick="M"+12*bm(t,n,CL);else if(a>W3)t/=W3,e.dtick="M"+bm(t,1,Ase);else if(a>qv){if(e.dtick=bm(t,qv,e._hasDayOfWeekBreaks?[1,2,7,14]:olt),!r){var o=$n.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Wo.dateTick0(e.calendar,2):e.tick0=Wo.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>wm?e.dtick=bm(t,wm,Ase):a>fM?e.dtick=bm(t,fM,Sse):a>FL?e.dtick=bm(t,FL,Sse):(n=i(10),e.dtick=bm(t,n,CL))}else if(e.type==="log"){e.tick0=0;var l=Wo.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=i(10),e.dtick="L"+bm(t,n,CL)}else e.dtick=t>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):wB(e)?(e.tick0=0,n=1,e.dtick=bm(t,n,slt)):(e.tick0=0,n=i(10),e.dtick=bm(t,n,CL));if(e.dtick===0&&(e.dtick=1),!zh(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function Rse(e){var t=e.dtick;if(e._tickexponent=0,!zh(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),i=n.length;if(String(t).charAt(0)==="M")i>10||n.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=qv&&i<=10||t>=qv*15)e._tickround="d";else if(t>=fM&&i<=16||t>=wm)e._tickround="M";else if(t>=FL&&i<=19||t>=fM)e._tickround="S";else{var a=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,a)-20,e._tickround<0&&(e._tickround=4)}}else if(zh(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);zh(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(X3(e.exponentformat)&&e.exponentformat!=="SI extended"&&!_B(l)||X3(e.exponentformat)&&e.exponentformat==="SI extended"&&!xB(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}$n.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(zh(t))return Wo.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.slice(1));if(a==="M")return Wo.incrementMonth(e,o,n);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?Ise:Pse,l=e+i*.01,u=Wo.roundUp(Wo.mod(l,1),s,r);return Math.floor(l)+Math.log(w0.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};$n.tickFirst=function(e,t){var r=e.r2l||Number,n=Wo.simpleMap(e.range,r,void 0,void 0,t),i=n[1]<n[0],a=i?Math.floor:Math.ceil,o=yB(n)[0],s=e.dtick,l=r(e.tick0);if(zh(s)){var u=a((o-l)/s)*s+l;return(e.type==="category"||e.type==="multicategory")&&(u=Wo.constrain(u,0,e._categories.length-1)),u}var c=s.charAt(0),f=Number(s.slice(1));if(c==="M"){for(var h=0,d=l,v,m,b;h<10;){if(v=$n.tickIncrement(d,s,i,e.calendar),(v-o)*(d-o)<=0)return i?Math.min(d,v):Math.max(d,v);m=(o-(d+v)/2)/(v-d),b=c+(Math.abs(Math.round(m))||1)*f,d=$n.tickIncrement(d,b,m<0?!i:i,e.calendar),h++}return Wo.error("tickFirst did not converge",e),d}else{if(c==="L")return Math.log(a((Math.pow(10,o)-l)/f)*f+l)/Math.LN10;if(c==="D"){var p=s==="D2"?Ise:Pse,k=Wo.roundUp(Wo.mod(o,1),p,i);return Math.floor(o)+Math.log(w0.round(Math.pow(10,k),1))/Math.LN10}else throw"unrecognized dtick "+String(s)}};$n.tickText=function(e,t,r,n){var i=Dse(e,t),a=e.tickmode==="array",o=r||a,s=e.type,l=s==="category"?e.d2l_noadd:e.d2l,u,c=function(b){var p=e.l2p(b);return p>=0&&p<=e._length?b:null};if(a&&Wo.isArrayOrTypedArray(e.ticktext)){var f=Wo.simpleMap(e.range,e.r2l),h=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(u=0;u<e.ticktext.length&&!(Math.abs(t-l(e.tickvals[u]))<h);u++);if(u<e.ticktext.length)return i.text=String(e.ticktext[u]),i.xbnd=[c(i.x-.5),c(i.x+e.dtick-.5)],i}function d(b){if(b===void 0)return!0;if(r)return b==="none";var p={first:e._tmin,last:e._tmax}[b];return b!=="all"&&t!==p}var v=r?"never":e.exponentformat!=="none"&&d(e.showexponent)?"hide":"";if(s==="date"?llt(e,i,r,o):s==="log"?ult(e,i,r,o,v):s==="category"?clt(e,i):s==="multicategory"?flt(e,i,r):wB(e)?dlt(e,i,r,o,v):hlt(e,i,r,o,v),n||(e.tickprefix&&!d(e.showtickprefix)&&(i.text=e.tickprefix+i.text),e.ticksuffix&&!d(e.showticksuffix)&&(i.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(i.text)){var m=e.labelalias[i.text];typeof m=="string"&&(i.text=m)}return(e.tickson==="boundaries"||e.showdividers)&&(i.xbnd=[c(i.x-.5),c(i.x+e.dtick-.5)]),i};$n.hoverLabelText=function(e,t,r){r&&(e=Wo.extendFlat({},e,{hoverformat:r}));var n=Wo.isArrayOrTypedArray(t)?t[0]:t,i=Wo.isArrayOrTypedArray(t)?t[1]:void 0;if(i!==void 0&&i!==n)return $n.hoverLabelText(e,n,r)+" - "+$n.hoverLabelText(e,i,r);var a=e.type==="log"&&n<=0,o=$n.tickText(e,e.c2l(a?-n:n),"hover").text;return a?n===0?"0":Ob+o:o};function Dse(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}function llt(e,t,r,n){var i=e._tickround,a=r&&e.hoverformat||$n.getTickFormat(e);n=!a&&n,n&&(zh(i)?i=4:i={y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o=Wo.formatDate(t.x,a,i,e._dateFormat,e.calendar,e._extraFormat),s,l=o.indexOf(`
|
||
`);if(l!==-1&&(s=o.slice(l+1),o=o.slice(0,l)),n&&(s!==void 0&&(o==="00:00:00"||o==="00:00")?(o=s,s=""):o.length===8&&(o=o.replace(/:00$/,""))),s)if(r)i==="d"?o+=", "+s:o=s+(o?", "+o:"");else if(!e._inCalcTicks||e._prevDateHead!==s)e._prevDateHead=s,o+="<br>"+s;else{var u=vM(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="<br> ")}t.text=o}function ult(e,t,r,n,i){var a=e.dtick,o=t.x,s=e.tickformat,l=typeof a=="string"&&a.charAt(0);if(i==="never"&&(i=""),n&&l!=="L"&&(a="L3",l="L"),s||l==="L")t.text=dM(Math.pow(10,o),e,i,n);else if(zh(a)||l==="D"&&(e.minorloglabels==="complete"||Wo.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(Wo.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),h=+f[1],d=Math.abs(h),v=e.exponentformat;v==="power"||X3(v)&&v!=="SI extended"&&_B(h)||X3(v)&&v==="SI extended"&&xB(h)?(t.text=f[0],d>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),h!==0&&h!==1&&(t.text+="<sup>"+(h>0?"":Ob)+d+"</sup>"),t.fontSize*=1.25):(v==="e"||v==="E")&&d>2?t.text=f[0]+v+(h>0?"+":Ob)+d:(t.text=dM(Math.pow(10,o),e,"","fakehover"),a==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,Wo.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var m=String(t.text).charAt(0);(m==="0"||m==="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 clt(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function flt(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 hlt(e,t,r,n,i){i==="never"?i="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=dM(t.x,e,i,n)}function dlt(e,t,r,n,i){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=vlt(a);if(o[1]>=100)t.text=dM(Wo.deg2rad(t.x),e,i,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["<sup>",o[0],"</sup>","\u2044","<sub>",o[1],"</sub>","\u03C0"].join(""),s&&(t.text=Ob+t.text)}}}else t.text=dM(t.x,e,i,n)}function vlt(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}var Fse=["f","p","n","\u03BC","m","","k","M","G","T"],plt=["q","r","y","z","a",...Fse,"P","E","Z","Y","R","Q"],X3=e=>["SI","SI extended","B"].includes(e);function _B(e){return e>14||e<-15}function xB(e){return e>32||e<-30}function glt(e,t){return X3(t)?!!(t==="SI extended"&&xB(e)||t!=="SI extended"&&_B(e)):!1}function dM(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=$n.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:zh(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Rse(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,Ob);var f=Math.pow(10,-a)/2;if(o==="none"&&(s=0),e=Math.abs(e),e<f)e="0",i=!1;else{if(e+=f,s&&(e*=Math.pow(10,-s),a+=s),a===0)e=String(Math.floor(e));else if(a<0){e=String(Math.round(e)),e=e.slice(0,Math.max(0,e.length+a));for(var h=a;h<0;h++)e+="0"}else{e=String(e);var d=e.indexOf(".")+1;d&&(e=e.slice(0,d+a).replace(/\.?0+$/,""))}e=Wo.numSeparate(e,t._separators,u)}if(s&&o!=="hide"){glt(s,o)&&(o="power");var v;s<0?v=Ob+-s:o!=="power"?v="+"+s:v=String(s),o==="e"||o==="E"?e+=o+v:o==="power"?e+="\xD710<sup>"+v+"</sup>":o==="B"&&s===9?e+="B":X3(o)&&(e+=o==="SI extended"?plt[s/3+10]:Fse[s/3+5])}return i?Ob+e:e}$n.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*W3}function n(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),h=c.indexOf(u.charAt(0));return f===h?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-h}else return typeof l=="number"?1:-1}function i(l,u,c){var f=c||function(v){return v},h=u[0],d=u[1];return(!h&&typeof h!="number"||f(h)<=f(l))&&(!d&&typeof d!="number"||f(d)>=f(l))}function a(l,u){var c=u[0]===null,f=u[1]===null,h=n(l,u[0])>=0,d=n(l,u[1])<=0;return(c||h)&&(f||d)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t<e.tickformatstops.length;t++)if(s=e.tickformatstops[t],s.enabled&&i(e.dtick,s.dtickrange,r)){o=s;break}break}case"log":{for(t=0;t<e.tickformatstops.length;t++)if(s=e.tickformatstops[t],s.enabled&&a(e.dtick,s.dtickrange)){o=s;break}break}default:}return o?o.value:e.tickformat};$n.getSubplots=function(e,t){var r=e._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=t?$n.findSubplotsWithAxis(n,t):n;return i.sort(function(a,o){var s=a.slice(1).split("y"),l=o.slice(1).split("y");return s[0]===l[0]?+s[1]-+l[1]:+s[0]-+l[0]}),i};$n.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};$n.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=$n.list(e,"x",!0),a=$n.list(e,"y",!0),o=[],s,l;for(s=0;s<i.length;s++)for(o.push({x:i[s],y:n}),l=0;l<a.length;l++)s===0&&o.push({x:r,y:a[l]}),o.push({x:i[s],y:a[l]});var u=t._clips.selectAll(".axesclip").data(o,function(c){return c.x._id+c.y._id});u.enter().append("clipPath").classed("axesclip",!0).attr("id",function(c){return"clip"+t._uid+c.x._id+c.y._id}).append("rect"),u.exit().remove(),u.each(function(c){w0.select(this).select("rect").attr({x:c.x._offset||0,y:c.y._offset||0,width:c.x._length||1,height:c.y._length||1})})}};$n.draw=function(e,t,r){var n=e._fullLayout;t==="redraw"&&n._paper.selectAll("g.subplot").each(function(l){var u=l[0],c=n._plots[u];if(c){var f=c.xaxis,h=c.yaxis;c.xaxislayer.selectAll("."+f._id+"tick").remove(),c.yaxislayer.selectAll("."+h._id+"tick").remove(),c.xaxislayer.selectAll("."+f._id+"tick2").remove(),c.yaxislayer.selectAll("."+h._id+"tick2").remove(),c.xaxislayer.selectAll("."+f._id+"divider").remove(),c.yaxislayer.selectAll("."+h._id+"divider").remove(),c.minorGridlayer&&c.minorGridlayer.selectAll("path").remove(),c.gridlayer&&c.gridlayer.selectAll("path").remove(),c.zerolinelayer&&c.zerolinelayer.selectAll("path").remove(),c.zerolinelayerAbove&&c.zerolinelayerAbove.selectAll("path").remove(),n._infolayer.select(".g-"+f._id+"title").remove(),n._infolayer.select(".g-"+h._id+"title").remove()}});var i=!t||t==="redraw"?$n.listIds(e):t,a=$n.list(e),o=a.filter(function(l){return l.autoshift}).map(function(l){return l.overlaying});i.map(function(l){var u=$n.getFromId(e,l);if(u.tickmode==="sync"&&u.overlaying){var c=i.findIndex(function(f){return f===u.overlaying});c>=0&&i.unshift(i.splice(c,1).shift())}});var s={false:{left:0,right:0}};return Wo.syncOrAsync(i.map(function(l){return function(){if(l){var u=$n.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=$n.drawOne(e,u,r);return u._shiftPusher&&mB(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=Wo.simpleMap(u._r,u.r2l),c}}}))};$n.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},i=r.overlayingShiftedAx||[],a,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=$n.counterLetter(u),h=l._plots[t._mainSubplot],d=t.zerolinelayer==="above traces";if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var v=t.linewidth/2||0;t.ticks==="inside"&&(v+=t.ticklen),mB(t,v,n,!0),mB(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Clt(t,n));var m=h[c+"axislayer"],b=t._mainLinePosition,p=b+=t._shift,k=t._mainMirrorPosition,M=t._vals=$n.calcTicks(t),T=[t.mirror,p,k].join("_");for(a=0;a<M.length;a++)M[a].axInfo=T;t._selections={},t._tickAngles&&(t._prevTickAngles=t._tickAngles),t._tickAngles={},t._depth=null;var L={};function x(ct){var Qt=u+(ct||"tick");return L[Qt]||(L[Qt]=xlt(t,Qt,p)),L[Qt]}if(t.visible){var C=$n.makeTransTickFn(t),S=$n.makeTransTickLabelFn(t),g,P,E=t.ticks==="inside",z=t.ticks==="outside";if(t.tickson==="boundaries"){var q=mlt(t,M);P=$n.clipEnds(t,q),g=E?P:q}else P=$n.clipEnds(t,M),g=E&&t.ticklabelmode!=="period"?P:M;var U=t._gridVals=P,G=_lt(t,M);if(!l._hasOnlyLargeSploms){var Z=t._subplotsWith,j={};for(a=0;a<Z.length;a++){o=Z[a],s=l._plots[o];var N=s[f+"axis"],H=N._mainAxis._id;if(!j[H]){j[H]=1;var re=c==="x"?"M0,"+N._offset+"v"+N._length:"M"+N._offset+",0h"+N._length;$n.drawGrid(e,t,{vals:U,counterAxis:N,layer:s.gridlayer.select("."+u),minorLayer:s.minorGridlayer.select("."+u),path:re,transFn:C}),$n.drawZeroLine(e,t,{counterAxis:N,layer:d?s.zerolinelayerAbove:s.zerolinelayer,path:re,transFn:C})}}}var oe,_e=$n.getTickSigns(t),ke=$n.getTickSigns(t,"minor");if(t.ticks||t.minor&&t.minor.ticks){var Ce=$n.makeTickPath(t,p,_e[2]),ge=$n.makeTickPath(t,p,ke[2],{minor:!0}),ie,Se,Ee,we;if(t._anchorAxis&&t.mirror&&t.mirror!==!0?(ie=$n.makeTickPath(t,k,_e[3]),Se=$n.makeTickPath(t,k,ke[3],{minor:!0}),Ee=Ce+ie,we=ge+Se):(ie="",Se="",Ee=Ce,we=ge),t.showdividers&&z&&t.tickson==="boundaries"){var De={};for(a=0;a<G.length;a++)De[G[a].x]=1;oe=function(ct){return De[ct.x]?ie:Ee}}else oe=function(ct){return ct.minor?we:Ee}}if($n.drawTicks(e,t,{vals:g,layer:m,path:oe,transFn:C}),t.mirror==="allticks"){var Le=Object.keys(t._linepositions||{});for(a=0;a<Le.length;a++){o=Le[a],s=l._plots[o];var me=t._linepositions[o]||[],Pe=me[0],ce=me[1],He=me[2],lt=$n.makeTickPath(t,Pe,He?_e[0]:ke[0],{minor:He})+$n.makeTickPath(t,ce,He?_e[1]:ke[1],{minor:He});$n.drawTicks(e,t,{vals:g,layer:s[c+"axislayer"],path:lt,transFn:C})}}var mt=[];if(mt.push(function(){return $n.drawLabels(e,t,{vals:M,layer:m,plotinfo:s,transFn:S,labelFns:$n.makeLabelFns(t,p)})}),t.type==="multicategory"){var Vt={x:2,y:10}[c];mt.push(function(){var ct={x:"height",y:"width"}[c],Qt=x()[ct]+Vt+(t._tickAngles[u+"tick"]?t.tickfont.size*hM:0);return $n.drawLabels(e,t,{vals:ylt(t,M),layer:m,cls:u+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:C,labelFns:$n.makeLabelFns(t,p+Qt*_e[4])})}),mt.push(function(){return t._depth=_e[4]*(x("tick2")[t.side]-p),wlt(e,t,{vals:G,layer:m,path:$n.makeTickPath(t,p,_e[4],{len:t._depth}),transFn:C})})}else t.title.hasOwnProperty("standoff")&&mt.push(function(){t._depth=_e[4]*(x()[t.side]-p)});var st=uM.getComponentMethod("rangeslider","isVisible")(t);return!r.skipTitle&&!(st&&t.side==="bottom")&&mt.push(function(){return Tlt(e,t)}),mt.push(function(){var ct=t.side.charAt(0),Qt=Yst[t.side].charAt(0),Ht=$n.getPxPosition(e,t),nr=z?t.ticklen:0,tt,je,Ue,Ae;(t.automargin||st||t._shiftPusher)&&(t.type==="multicategory"?tt=x("tick2"):(tt=x(),c==="x"&&ct==="b"&&(t._depth=Math.max(tt.width>0?tt.bottom-Ht:0,nr))));var rt=0,St=0;if(t._shiftPusher&&(rt=Math.max(nr,tt.height>0?ct==="l"?Ht-tt.left:tt.right-Ht:0),t.title.text!==l._dfltTitle[c]&&(St=(t._titleStandoff||0)+(t._titleScoot||0),ct==="l"&&(St+=Ese(t))),t._fullDepth=Math.max(rt,St)),t.automargin){je={x:0,y:0,r:0,l:0,t:0,b:0};var Tt=[0,1],dt=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(ct==="b"?je[ct]=t._depth:(je[ct]=t._depth=Math.max(tt.width>0?Ht-tt.top:0,nr),Tt.reverse()),tt.width>0){var Et=tt.right-(t._offset+t._length);Et>0&&(je.xr=1,je.r=Et);var pt=t._offset-tt.left;pt>0&&(je.xl=0,je.l=pt)}}else if(ct==="l"?(t._depth=Math.max(tt.height>0?Ht-tt.left:0,nr),je[ct]=t._depth-dt):(t._depth=Math.max(tt.height>0?tt.right-Ht:0,nr),je[ct]=t._depth+dt,Tt.reverse()),tt.height>0){var Xt=tt.bottom-(t._offset+t._length);Xt>0&&(je.yb=0,je.b=Xt);var or=t._offset-tt.top;or>0&&(je.yt=1,je.t=or)}je[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[Tt[0]],t.title.text!==l._dfltTitle[c]&&(je[ct]+=Ese(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(Ue={x:0,y:0,r:0,l:0,t:0,b:0},Ue[Qt]=t.linewidth,t.mirror&&t.mirror!==!0&&(Ue[Qt]+=nr),t.mirror===!0||t.mirror==="ticks"?Ue[f]=t._anchorAxis.domain[Tt[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(Ue[f]=[t._counterDomainMin,t._counterDomainMax][Tt[1]]))}st&&(Ae=uM.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Mse(je,t.automargin),Mse(Ue,t.automargin)),H3.autoMargin(e,bB(t),je),H3.autoMargin(e,qse(t),Ue),H3.autoMargin(e,Ose(t),Ae)}),Wo.syncOrAsync(mt)}};function Mse(e,t){if(e){var r=Object.keys(_se).reduce(function(n,i){return t.indexOf(i)!==-1&&_se[i].forEach(function(a){n[a]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function mlt(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(Wo.extendFlat({},a,{x:s}))};if(t.length){for(n=0;n<t.length;n++)i(t[n],0);i(t[n-1],1)}return r}function ylt(e,t){for(var r=[],n={},i=0;i<t.length;i++){var a=t[i];n[a.text2]?n[a.text2].push(a.x):n[a.text2]=[a.x]}for(var o in n)r.push(Dse(e,Wo.interp(n[o],.5),o));return r}function _lt(e,t){var r=[],n,i,a=t.length&&t[t.length-1].x<t[0].x,o=function(l,u){var c=l.xbnd[u];c!==null&&r.push(Wo.extendFlat({},l,{x:c}))};if(e.showdividers&&t.length){for(n=0;n<t.length;n++){var s=t[n];s.text2!==i&&o(s,a?1:0),i=s.text2}o(t[n-1],a?0:1)}return r}function xlt(e,t,r){var n,i,a,o;if(e._selections[t].size())n=1/0,i=-1/0,a=1/0,o=-1/0,e._selections[t].each(function(){var l=gB(this);if(l.node().style.display!=="none"){var u=Xp.bBox(l.node().parentNode);n=Math.min(n,u.top),i=Math.max(i,u.bottom),a=Math.min(a,u.left),o=Math.max(o,u.right)}});else{var s=$n.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}}$n.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};$n.makeTransTickFn=function(e){return e._id.charAt(0)==="x"?function(t){return j3(e._offset+e.l2p(t.x),0)}:function(t){return j3(0,e._offset+e.l2p(t.x))}};$n.makeTransTickLabelFn=function(e){var t=blt(e),r=e.ticklabelshift||0,n=e.ticklabelstandoff||0,i=t[0],a=t[1],o=e.range[0]>e.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;n=n*f}return e._id.charAt(0)==="x"?function(h){return j3(i+e._offset+e.l2p(pB(h))+r,a+n)}:function(h){return j3(a+n,i+e._offset+e.l2p(pB(h))+r)}};function pB(e){return e.periodX!==void 0?e.periodX:e.x}function blt(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(v){return t.indexOf(v)!==-1},i=n("top"),a=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),u=r!=="boundaries"&&(s||a||i||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,h=zL,d=e.tickfont?e.tickfont.size:12;return(s||i)&&(f+=d*Bb,h+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,h+=zL),l&&c==="top"&&(h-=d*(1-Bb)),(a||i)&&(f=-f),(c==="bottom"||c==="right")&&(h=-h),[u?f:0,l?h:0]}$n.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};$n.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=e.tickson||"",a=function(q){return n.indexOf(q)!==-1},o=a("top"),s=a("left"),l=a("right"),u=a("bottom"),c=i!=="boundaries"&&(u||s||o||l),f=a("inside"),h=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&i!=="boundaries",d=0,v=0,m=h?e.ticklen:0;if(f?m*=-1:c&&(m=0),h&&(d+=m,r)){var b=Wo.deg2rad(r);d=m*Math.cos(b)+1,v=m*Math.sin(b)}e.showticklabels&&(h||e.showline)&&(d+=.2*e.tickfont.size),d+=(e.linewidth||1)/2*(f?-1:1);var p={labelStandoff:d,labelShift:v},k,M,T,L,x=0,C=e.side,S=e._id.charAt(0),g=e.tickangle,P;if(S==="x")P=!f&&C==="bottom"||f&&C==="top",L=P?1:-1,f&&(L*=-1),k=v*L,M=t+d*L,T=P?1:-.2,Math.abs(g)===90&&(f?T+=lM:g===-90&&C==="bottom"?T=Bb:g===90&&C==="top"?T=lM:T=.5,x=lM/2*(g/90)),p.xFn=function(q){return q.dx+k+x*q.fontSize},p.yFn=function(q){return q.dy+M+q.fontSize*T},p.anchorFn=function(q,U){if(c){if(s)return"end";if(l)return"start"}return!zh(U)||U===0||U===180?"middle":U*L<0!==f?"end":"start"},p.heightFn=function(q,U,G){return U<-60||U>60?-.5*G:e.side==="top"!==f?-G:0};else if(S==="y"){if(P=!f&&C==="left"||f&&C==="right",L=P?1:-1,f&&(L*=-1),k=d,M=v*L,T=0,!f&&Math.abs(g)===90&&(g===-90&&C==="left"||g===90&&C==="right"?T=Bb:T=.5),f){var E=zh(g)?+g:0;if(E!==0){var z=Wo.deg2rad(E);x=Math.abs(Math.sin(z))*Bb*L,T=0}}p.xFn=function(q){return q.dx+t-(k+q.fontSize*T)*L+x*q.fontSize},p.yFn=function(q){return q.dy+M+q.fontSize*lM},p.anchorFn=function(q,U){return zh(U)&&Math.abs(U)===90?"middle":P?"end":"start"},p.heightFn=function(q,U,G){return e.side==="right"&&(U*=-1),U<-30?-G:U<30?-.5*G:0}}return p};function BL(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}$n.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),a=r.layer.selectAll("path."+n).data(i,BL);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return cM.stroke(w0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return Xp.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),NL(t,[kse]),a.attr("transform",r.transFn)};$n.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var n=t._id+"grid",i=t.minor&&t.minor.showgrid,a=i?r.vals.filter(function(p){return p.minor}):[],o=t.showgrid?r.vals.filter(function(p){return!p.minor}):[],s=r.counterAxis;if(s&&$n.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u<o.length;u++){var c=o[u].x;if(l?!c:Math.abs(c)<t.dtick/100)if(o=o.slice(0,u).concat(o.slice(u+1)),l)u--;else break}t._gw=Xp.crispRound(e,t.gridwidth,1);for(var f=i?Xp.crispRound(e,t.minor.gridwidth,1):0,h=r.layer,d=r.minorLayer,v=1;v>=0;v--){var m=v?h:d;if(m){var b=m.selectAll("path."+n).data(v?o:a,BL);b.exit().remove(),b.enter().append("path").classed(n,1).classed("crisp",r.crisp!==!1),b.attr("transform",r.transFn).attr("d",r.path).each(function(p){return cM.stroke(w0.select(this),p.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(p){return Xp.dashStyle(p.minor?t.minor.griddash:t.griddash,p.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(p){return(p.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&b.attr("d",r.path)}}NL(t,[dB,vB])}};$n.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=$n.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 Jst(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(cM.stroke,t.zerolinecolor||cM.defaultLine).style("stroke-width",Xp.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),NL(t,[hB])};$n.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=t.zerolinelayer==="above traces",o=r.cls||i+"tick",s=r.vals.filter(function(H){return H.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],BL),h=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(H){var re=w0.select(this),oe=e._promises.length;re.call(qb.positionText,l.xFn(H),l.yFn(H)).call(Xp.font,{family:H.font,size:H.fontSize,color:H.fontColor,weight:H.fontWeight,style:H.fontStyle,variant:H.fontVariant,textcase:H.fontTextcase,lineposition:H.fontLineposition,shadow:H.fontShadow}).text(H.text).call(qb.convertToTspans,e),e._promises[oe]?h.push(e._promises.pop().then(function(){d(re,u)})):d(re,u)}),NL(t,[yse]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(H){w0.select(this).select("text").call(qb.positionText,l.xFn(H),l.yFn(H))});function d(H,re){H.each(function(oe){var _e=w0.select(this),ke=_e.select(".text-math-group"),Ce=l.anchorFn(oe,re),ge=r.transFn.call(_e.node(),oe)+(zh(re)&&+re!=0?" rotate("+re+","+l.xFn(oe)+","+(l.yFn(oe)-oe.fontSize/2)+")":""),ie=qb.lineCount(_e),Se=hM*oe.fontSize,Ee=l.heightFn(oe,zh(re)?+re:0,(ie-1)*Se);if(Ee&&(ge+=j3(0,Ee)),ke.empty()){var we=_e.select("text");we.attr({transform:ge,"text-anchor":Ce}),we.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var De=Xp.bBox(ke.node()).width,Le=De*{end:-.5,start:.5}[Ce];ke.attr("transform",ge+j3(Le,0))}})}t._adjustTickLabelsOverflow=function(){var H=t.ticklabeloverflow;if(!(!H||H==="allow")){var re=H.indexOf("hide")!==-1,oe=t._id.charAt(0)==="x",_e=0,ke=oe?e._fullLayout.width:e._fullLayout.height;if(H.indexOf("domain")!==-1){var Ce=Wo.simpleMap(t.range,t.r2l);_e=t.l2p(Ce[0])+t._offset,ke=t.l2p(Ce[1])+t._offset}var ge=Math.min(_e,ke),ie=Math.max(_e,ke),Se=t.side,Ee=1/0,we=-1/0;f.each(function(Pe){var ce=w0.select(this),He=ce.select(".text-math-group");if(He.empty()){var lt=Xp.bBox(ce.node()),mt=0;oe?(lt.right>ie||lt.left<ge)&&(mt=1):(lt.bottom>ie||lt.top+(t.tickangle?0:Pe.fontSize/4)<ge)&&(mt=1);var Vt=ce.select("text");mt?re&&Vt.style("display","none"):Vt.node().style.display!=="none"&&(Vt.style("display",null),Se==="bottom"||Se==="right"?Ee=Math.min(Ee,oe?lt.top:lt.left):Ee=-1/0,Se==="top"||Se==="left"?we=Math.max(we,oe?lt.bottom:lt.right):we=1/0)}});for(var De in n._plots){var Le=n._plots[De];if(!(t._id!==Le.xaxis._id&&t._id!==Le.yaxis._id)){var me=oe?Le.yaxis:Le.xaxis;me&&(me["_visibleLabelMin_"+t._id]=Ee,me["_visibleLabelMax_"+t._id]=we)}}}},t._hideCounterAxisInsideTickLabels=function(H){var re=t._id.charAt(0)==="x",oe=[];for(var _e in n._plots){var ke=n._plots[_e];t._id!==ke.xaxis._id&&t._id!==ke.yaxis._id||oe.push(re?ke.yaxis:ke.xaxis)}oe.forEach(function(Ce,ge){Ce&&vM(Ce)&&(H||[hB,vB,dB,kse,yse]).forEach(function(ie){var Se=ie.K==="tick"&&ie.L==="text"&&t.ticklabelmode==="period",Ee=n._plots[t._mainSubplot],we;if(ie.K===hB.K){var De=a?Ee.zerolinelayerAbove:Ee.zerolinelayer;we=De.selectAll("."+t._id+"zl")}else ie.K===vB.K?we=Ee.minorGridlayer.selectAll("."+t._id):ie.K===dB.K?we=Ee.gridlayer.selectAll("."+t._id):we=Ee[t._id.charAt(0)+"axislayer"];we.each(function(){var Le=w0.select(this);ie.L&&(Le=Le.selectAll(ie.L)),Le.each(function(me){var Pe=t.l2p(Se?pB(me):me.x)+t._offset,ce=w0.select(this);Pe<t["_visibleLabelMax_"+Ce._id]&&Pe>t["_visibleLabelMin_"+Ce._id]?ce.style("display","none"):ie.K==="tick"&&!ge&&ce.node().style.display!=="none"&&ce.style("display",null)})})})})},d(f,c+1?c:u);function v(){return h.length&&Promise.all(h)}var m=null;function b(){if(d(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){m=t.autotickangles[0];var H=0,re=[],oe,_e=1;f.each(function(je){H=Math.max(H,je.fontSize);var Ue=t.l2p(je.x),Ae=gB(this),rt=Xp.bBox(Ae.node());_e=Math.max(_e,qb.lineCount(Ae)),re.push({top:0,bottom:10,height:10,left:Ue-rt.width/2,right:Ue+rt.width/2+2,width:rt.width+2})});var ke=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,Ce=s.length,ge=Math.abs((s[Ce-1].x-s[0].x)*t._m)/(Ce-1),ie=ke?ge/2:ge,Se=ke?t.ticklen:H*1.25*_e,Ee=Math.sqrt(Math.pow(ie,2)+Math.pow(Se,2)),we=ie/Ee,De=t.autotickangles.map(function(je){return je*Math.PI/180}),Le=De.find(function(je){return Math.abs(Math.cos(je))<=we});Le===void 0&&(Le=De.reduce(function(je,Ue){return Math.abs(Math.cos(je))<Math.abs(Math.cos(Ue))?je:Ue},De[0]));var me=Le*(180/Math.PI);if(ke){var Pe=2;for(t.ticks&&(Pe+=t.tickwidth/2),oe=0;oe<re.length;oe++){var ce=s[oe].xbnd,He=re[oe];if(ce[0]!==null&&He.left-t.l2p(ce[0])<Pe||ce[1]!==null&&t.l2p(ce[1])-He.right<Pe){m=me;break}}}else{var lt=t.ticklabelposition||"",mt=t.tickson||"",Vt=function(je){return lt.indexOf(je)!==-1},st=Vt("top"),ct=Vt("left"),Qt=Vt("right"),Ht=Vt("bottom"),nr=mt!=="boundaries"&&(Ht||ct||st||Qt),tt=nr?(t.tickwidth||0)+2*zL:0;for(oe=0;oe<re.length-1;oe++)if(Wo.bBoxIntersect(re[oe],re[oe+1],tt)){m=me;break}}m&&d(f,m)}}t._selections&&(t._selections[o]=f);var p=[v];t.automargin&&n._redrawFromAutoMarginCount&&c===90?(m=c,p.push(function(){d(f,c)})):p.push(b),t._tickAngles&&p.push(function(){t._tickAngles[o]=m===null?zh(u)?u:0:m});var k=function(){var H=0,re=0;return f.each(function(oe,_e){var ke=gB(this),Ce=ke.select(".text-math-group");if(Ce.empty()){var ge;t._vals[_e]&&(ge=t._vals[_e].bb||Xp.bBox(ke.node()),t._vals[_e].bb=ge),H=Math.max(H,ge.width),re=Math.max(re,ge.height)}}),{labelsMaxW:H,labelsMaxH:re}},M=t._anchorAxis;if(M&&(M.autorange||M.insiderange)&&vM(t)&&!$st(n,t._id)&&(n._insideTickLabelsUpdaterange||(n._insideTickLabelsUpdaterange={}),M.autorange&&(n._insideTickLabelsUpdaterange[M._name+".autorange"]=M.autorange,p.push(k)),M.insiderange)){var T=k(),L=t._id.charAt(0)==="y"?T.labelsMaxW:T.labelsMaxH;L+=2*zL,t.ticklabelposition==="inside"&&(L+=t.ticklen||0);var x=t.side==="right"||t.side==="top"?1:-1,C=x===1?1:0,S=x===1?0:1,g=[];g[S]=M.range[S];var P=M.range,E=M.r2p(P[C]),z=M.r2p(P[S]),q=n._insideTickLabelsUpdaterange[M._name+".range"];if(q){var U=M.r2p(q[C]),G=M.r2p(q[S]),Z=x*(t._id.charAt(0)==="y"?1:-1);Z*E<Z*U&&(E=U,g[C]=P[C]=q[C]),Z*z>Z*G&&(z=G,g[S]=P[S]=q[S])}var j=Math.abs(z-E);j-L>0?(j-=L,L*=1+L/j):L=0,t._id.charAt(0)!=="y"&&(L=-L),g[C]=M.p2r(M.r2p(P[C])+x*L),M.autorange==="min"||M.autorange==="max reversed"?(g[0]=null,M._rangeInitial0=void 0,M._rangeInitial1=void 0):(M.autorange==="max"||M.autorange==="min reversed")&&(g[1]=null,M._rangeInitial0=void 0,M._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[M._name+".range"]=g}var N=Wo.syncOrAsync(p);return N&&N.then&&e._promises.push(N),N};function wlt(e,t,r){var n=t._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,BL);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(cM.stroke,t.dividercolor).style("stroke-width",Xp.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}$n.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),i=t.side,a;if(t.anchor!=="free"?a=t._anchorAxis:n==="x"?a={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n==="y"&&(a={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),i==="top"||i==="left")return a._offset;if(i==="bottom"||i==="right")return a._offset+a._length};function Ese(e){var t=e.title.font.size,r=(e.title.text.match(qb.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Bb+r*hM):r?t*(r+1)*hM:t}function Tlt(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(qb.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*Bb:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*(lM+s*hM));else{var l=vM(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*a;l&&(u=.5*a,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(i==="x"?o+=t.side==="top"?a*(t.showticklabels?1:0):a*(t.showticklabels?1.5:.5):o+=t.side==="right"?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var c=$n.getPxPosition(e,t),f,h,d;i==="x"?(h=t._offset+t._length/2,d=t.side==="top"?c-o:c+o):(d=t._offset+t._length/2,h=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var v;if(t.type!=="multicategory"){var m=t._selections[t._id+"tick"];if(v={selection:m,side:t.side},m&&m.node()&&m.node().parentNode){var b=Xp.getTranslate(m.node().parentNode);v.offsetLeft=b.x,v.offsetTop=b.y}t.title.hasOwnProperty("standoff")&&(v.pad=0)}return t._titleStandoff=o,Vst.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[i],avoid:v,transform:f,attributes:{x:h,y:d,"text-anchor":"middle"}})}$n.shouldShowZeroLine=function(e,t,r){var n=Wo.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===qL)&&(zse(t,0)||!Alt(e,t,r,n)||Slt(e,t))};$n.clipEnds=function(e,t){return t.filter(function(r){return zse(e,r.x)})};function zse(e,t){var r=e.l2p(t);return r>1&&r<e._length-1}function Alt(e,t,r,n){var i=r._mainAxis;if(!i)return;var a=e._fullLayout,o=t._id.charAt(0),s=$n.counterLetter(t._id),l=t._offset+(Math.abs(n[0])<Math.abs(n[1])==(o==="x")?0:t._length);function u(v){if(!v.showline||!v.linewidth)return!1;var m=Math.max((v.linewidth+t.zerolinewidth)/2,1);function b(M){return typeof M=="number"&&Math.abs(M-l)<m}if(b(v._mainLinePosition)||b(v._mainMirrorPosition))return!0;var p=v._linepositions||{};for(var k in p)if(b(p[k][0])||b(p[k][1]))return!0}var c=a._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return u(r,l);for(var f=$n.list(e,s),h=0;h<f.length;h++){var d=f[h];if(d._mainAxis===i&&u(d,l))return!0}}function Slt(e,t){for(var r=e._fullData,n=t._mainSubplot,i=t._id.charAt(0),a=0;a<r.length;a++){var o=r[a];if(o.visible===!0&&o.xaxis+o.yaxis===n&&(uM.traceIs(o,"bar-like")&&o.orientation==={x:"h",y:"v"}[i]||o.fill&&o.fill.charAt(o.fill.length-1)===i))return!0}return!1}function gB(e){var t=w0.select(e),r=t.select(".text-math-group");return r.empty()?t.select("text"):r}$n.allowAutoMargin=function(e){for(var t=$n.list(e,"",!0),r=0;r<t.length;r++){var n=t[r];n.automargin&&(H3.allowAutoMargin(e,bB(n)),n.mirror&&H3.allowAutoMargin(e,qse(n))),uM.getComponentMethod("rangeslider","isVisible")(n)&&H3.allowAutoMargin(e,Ose(n))}};function bB(e){return e._id+".automargin"}function qse(e){return bB(e)+".mirror"}function Ose(e){return e._id+".rangeslider"}$n.swap=function(e,t){for(var r=Mlt(e,t),n=0;n<r.length;n++)Elt(e,r[n].x,r[n].y)};function Mlt(e,t){var r=[],n,i;for(n=0;n<t.length;n++){var a=[],o=e._fullData[t[n]].xaxis,s=e._fullData[t[n]].yaxis;if(!(!o||!s)){for(i=0;i<r.length;i++)(r[i].x.indexOf(o)!==-1||r[i].y.indexOf(s)!==-1)&&a.push(i);if(!a.length){r.push({x:[o],y:[s]});continue}var l=r[a[0]],u;if(a.length>1)for(i=1;i<a.length;i++)u=r[a[i]],LL(l.x,u.x),LL(l.y,u.y);LL(l.x,[o]),LL(l.y,[s])}}return r}function LL(e,t){for(var r=0;r<t.length;r++)e.indexOf(t[r])===-1&&e.push(t[r])}function Elt(e,t,r){var n=[],i=[],a=e.layout,o,s;for(o=0;o<t.length;o++)n.push($n.getFromId(e,t[o]));for(o=0;o<r.length;o++)i.push($n.getFromId(e,r[o]));var l=Object.keys(Gst),u=["anchor","domain","overlaying","position","side","tickangle","editType"],c=["linear","log"];for(o=0;o<l.length;o++){var f=l[o],h=n[0][f],d=i[0][f],v=!0,m=!1,b=!1;if(!(f.charAt(0)==="_"||typeof h=="function"||u.indexOf(f)!==-1)){for(s=1;s<n.length&&v;s++){var p=n[s][f];f==="type"&&c.indexOf(h)!==-1&&c.indexOf(p)!==-1&&h!==p?m=!0:p!==h&&(v=!1)}for(s=1;s<i.length&&v;s++){var k=i[s][f];f==="type"&&c.indexOf(d)!==-1&&c.indexOf(k)!==-1&&d!==k?b=!0:i[s][f]!==d&&(v=!1)}v&&(m&&(a[n[0]._name].type="linear"),b&&(a[i[0]._name].type="linear"),klt(a,f,n,i,e._fullLayout._dfltTitle))}}for(o=0;o<e._fullLayout.annotations.length;o++){var M=e._fullLayout.annotations[o];t.indexOf(M.xref)!==-1&&r.indexOf(M.yref)!==-1&&Wo.swapAttrs(a.annotations[o],["?"])}}function klt(e,t,r,n,i){var a=Wo.nestedProperty,o=a(e[r[0]._name],t).get(),s=a(e[n[0]._name],t).get(),l;for(t==="title"&&(o&&o.text===i.x&&(o.text=i.y),s&&s.text===i.y&&(s.text=i.x)),l=0;l<r.length;l++)a(e,r[l]._name+"."+t).set(s);for(l=0;l<n.length;l++)a(e,n[l]._name+"."+t).set(o)}function wB(e){return e._id==="angularaxis"}function cB(e,t){for(var r=t._rangebreaks.length,n=0;n<r;n++){var i=t._rangebreaks[n];if(e>=i.min&&e<i.max)return i.max}return e}function vM(e){return(e.ticklabelposition||"").indexOf("inside")!==-1}function NL(e,t){vM(e._anchorAxis||{})&&e._hideCounterAxisInsideTickLabels&&e._hideCounterAxisInsideTickLabels(t)}function mB(e,t,r,n){var i=e.anchor!=="free"&&(e.overlaying===void 0||e.overlaying===!1)?e._id:e.overlaying,a;n?a=e.side==="right"?t:-t:a=t,i in r||(r[i]={}),e.side in r[i]||(r[i][e.side]=0),r[i][e.side]+=a}function Clt(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}function Llt(e,t){return/%f/.test(t)?e>=Zst:/%L/.test(t)?e>=Xst:/%[SX]/.test(t)?e>=FL:/%M/.test(t)?e>=fM:/%[HI]/.test(t)?e>=wm:/%p/.test(t)?e>=v_:/%[Aadejuwx]/.test(t)?e>=qv:/%[UVW]/.test(t)?e>=Zp:/%[Bbm]/.test(t)?e>=DL:/%[q]/.test(t)?e>=RL:/%[Yy]/.test(t)?e>=IL:!0}});var TB=ye((far,Nse)=>{"use strict";Nse.exports=function(t,r,n){var i,a;if(n){var o=r==="reversed"||r==="min reversed"||r==="max reversed";i=n[o?1:0],a=n[o?0:1]}var s=t("autorangeoptions.minallowed",a===null?i:void 0),l=t("autorangeoptions.maxallowed",i===null?a:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var AB=ye((har,Use)=>{"use strict";var Plt=TB();Use.exports=function(t,r,n,i){var a=r._template||{},o=r.type||a.type||"-";n("minallowed"),n("maxallowed");var s=n("range");if(!s){var l;!i.noInsiderange&&o!=="log"&&(l=n("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n("range",l)))}var u=r.getAutorangeDflt(s,i),c=n("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,i),c=n("autorange",u)),c&&(Plt(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var Gse=ye((dar,Vse)=>{var Ilt={left:0,top:0};Vse.exports=Rlt;function Rlt(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=Dlt(t);return r[0]=n-a.left,r[1]=i-a.top,r}function Dlt(e){return e===window||e===document||e===document.body?Ilt:e.getBoundingClientRect()}});var UL=ye((par,Hse)=>{"use strict";var Flt=oO();function zlt(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}Hse.exports=Flt&&zlt()});var Wse=ye((gar,jse)=>{"use strict";jse.exports=function(t,r,n,i,a){var o=(t-n)/(i-n),s=o+r/(i-n),l=(o+s)/2;return a==="left"||a==="bottom"?o:a==="center"||a==="middle"?l:a==="right"||a==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var Yse=ye((mar,Zse)=>{"use strict";var Xse=Pr(),qlt=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Zse.exports=function(t,r,n,i){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=Xse.constrain(Math.floor(t*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Xse.constrain(Math.floor(r*3),0,2),qlt[r][t]}});var Jse=ye((yar,Kse)=>{"use strict";var Olt=C3(),Blt=H6(),Nlt=HS().getGraphDiv,Ult=NS(),SB=Kse.exports={};SB.wrapped=function(e,t,r){e=Nlt(e),e._fullLayout&&Blt.clear(e._fullLayout._uid+Ult.HOVERID),SB.raw(e,t,r)};SB.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&Olt.triggerHandler(t,"plotly_beforehover",r)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&i&&t.emit("plotly_unhover",{event:r,points:i}))}});var yv=ye((_ar,tle)=>{"use strict";var Vlt=Gse(),MB=lO(),Glt=UL(),Hlt=Pr().removeElement,jlt=Rh(),Nb=tle.exports={};Nb.align=Wse();Nb.getCursor=Yse();var Qse=Jse();Nb.unhover=Qse.wrapped;Nb.unhoverRaw=Qse.raw;Nb.init=function(t){var r=t.gd,n=1,i=r._context.doubleClickDelay,a=t.element,o,s,l,u,c,f,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents="all",a.onmousedown=b,Glt?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=b,a.addEventListener("touchstart",b,{passive:!1})):a.ontouchstart=b;function v(M,T,L){return Math.abs(M)<L&&(M=0),Math.abs(T)<L&&(T=0),[M,T]}var m=t.clampFn||v;function b(M){r._dragged=!1,r._dragging=!0;var T=$se(M);o=T[0],s=T[1],h=M.target,f=M,d=M.buttons===2||M.ctrlKey,typeof M.clientX=="undefined"&&typeof M.clientY=="undefined"&&(M.clientX=o,M.clientY=s),l=new Date().getTime(),l-r._mouseDownTime<i?n+=1:(n=1,r._mouseDownTime=l),t.prepFn&&t.prepFn(M,o,s),MB&&!d?(c=ele(),c.style.cursor=window.getComputedStyle(a).cursor):MB||(c=document,u=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(a).cursor),document.addEventListener("mouseup",k),document.addEventListener("touchend",k),t.dragmode!==!1&&(M.preventDefault(),document.addEventListener("mousemove",p),document.addEventListener("touchmove",p,{passive:!1}))}function p(M){M.preventDefault();var T=$se(M),L=t.minDrag||jlt.MINDRAG,x=m(T[0]-o,T[1]-s,L),C=x[0],S=x[1];(C||S)&&(r._dragged=!0,Nb.unhover(r,M)),r._dragged&&t.moveFn&&!d&&(r._dragdata={element:a,dx:C,dy:S},t.moveFn(C,S))}function k(M){if(delete r._dragdata,t.dragmode!==!1&&(M.preventDefault(),document.removeEventListener("mousemove",p),document.removeEventListener("touchmove",p)),document.removeEventListener("mouseup",k),document.removeEventListener("touchend",k),MB?Hlt(c):u&&(c.documentElement.style.cursor=u,u=null),!r._dragging){r._dragged=!1;return}if(r._dragging=!1,new Date().getTime()-r._mouseDownTime>i&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var T;f.target===h?T=f:(T={target:h,srcElement:h,toElement:h},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(L=>{var x=f[L];!T[L]&&typeof x!="function"&&(T[L]=x)})),t.clickFn&&t.clickFn(n,T),d||h.dispatchEvent(new MouseEvent("click",M))}r._dragging=!1,r._dragged=!1}};function ele(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}Nb.coverSlip=ele;function $se(e){return Vlt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Eg=ye((xar,rle)=>{"use strict";rle.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&t.classed(n,!1)}),r&&t.classed("cursor-"+r,!0)}});var ale=ye((bar,nle)=>{"use strict";var EB=Eg(),pM="data-savedcursor",ile="!!";nle.exports=function(t,r){var n=t.attr(pM);if(r){if(!n){for(var i=(t.attr("class")||"").split(" "),a=0;a<i.length;a++){var o=i[a];o.indexOf("cursor-")===0&&t.attr(pM,o.slice(7)).classed(o,!1)}t.attr(pM)||t.attr(pM,ile)}EB(t,r)}else n&&(t.attr(pM,null),n===ile?EB(t):EB(t,n))}});var CB=ye((war,ole)=>{"use strict";var kB=ec(),Wlt=Ih();ole.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:Wlt.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:kB({editType:"legend"}),grouptitlefont:kB({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},titleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},titledoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:kB({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var mM=ye(gM=>{"use strict";gM.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};gM.isVertical=function(t){return t.orientation!=="h"};gM.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};gM.getId=function(t){return t._id||"legend"}});var PB=ye((Aar,sle)=>{"use strict";var VL=Oa(),Yp=Pr(),Xlt=vl(),Zlt=Gl(),Ylt=CB(),Klt=x3(),LB=mM();function Jlt(e,t,r,n,i){var a=t[e]||{},o=Xlt.newContainer(r,e);function s(H,re){return Yp.coerce(a,o,Ylt,H,re)}var l=Yp.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(H,re){var oe=c._input,_e=c;return Yp.coerce(oe,_e,Zlt,H,re)},h=r.font||{},d=Yp.coerceFont(s,"grouptitlefont",h,{overrideDflt:{size:Math.round(h.size*1.1)}}),v=0,m=!1,b="normal",p=(r.shapes||[]).filter(function(H){return H.showlegend});function k(H){return VL.traceIs(H,"pie-like")&&H._length!=null&&(Array.isArray(H.legend)||Array.isArray(H.showlegend))}n.filter(k).forEach(function(H){H.visible&&v++;for(var re=0;re<H._length;re++){var oe=(Array.isArray(H.legend)?H.legend[re]:H.legend)||"legend";oe===e&&((Array.isArray(H.showlegend)?H.showlegend[re]:H.showlegend)||H._dfltShowLegend)&&(m=!0,v++)}if(e==="legend"&&H._length>H.legend.length)for(var _e=H.legend.length;_e<H._length;_e++)m=!0,v++});for(var M=n.concat(p).filter(function(H){return!k(c)&&e===(H.legend||"legend")}),T=0;T<M.length;T++)if(c=M[T],!!c.visible){var L=c._isShape;(c.showlegend||c._dfltShowLegend&&!(c._module&&c._module.attributes&&c._module.attributes.showlegend&&c._module.attributes.showlegend.dflt===!1))&&(v++,c.showlegend&&(m=!0,(!L&&VL.traceIs(c,"pie-like")||c._input.showlegend===!0)&&v++),Yp.coerceFont(f,"legendgrouptitle.font",d)),(!L&&VL.traceIs(c,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(c.fill)!==-1)&&(b=LB.isGrouped({traceorder:b})?"grouped+reversed":"reversed"),c.legendgroup!==void 0&&c.legendgroup!==""&&(b=LB.isReversed({traceorder:b})?"reversed+grouped":"grouped")}var x=Yp.coerce(t,r,Klt,"showlegend",r.showlegend||m&&v>(e==="legend"?1:0));if(x===!1&&(r[e]=void 0),!(x===!1&&!a.uirevision)&&(s("uirevision",r.uirevision),x!==!1)){s("borderwidth");var C=s("orientation"),S=s("yref"),g=s("xref"),P=C==="h",E=S==="paper",z=g==="paper",q,U,G,Z="left";P?(q=0,VL.getComponentMethod("rangeslider","isVisible")(t.xaxis)?E?(U=1.1,G="bottom"):(U=1,G="top"):E?(U=-.1,G="top"):(U=0,G="bottom")):(U=1,G="auto",z?q=1.02:(q=1,Z="right")),Yp.coerce(a,o,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:q}},"x"),Yp.coerce(a,o,{y:{valType:"number",editType:"legend",min:E?-2:0,max:E?3:1,dflt:U}},"y"),s("traceorder",b),LB.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick"),s("groupclick"),s("xanchor",Z),s("yanchor",G),s("maxheight"),s("valign"),Yp.noneOrAll(a,o,["x","y"]);var j=s("title.text");if(j){s("title.side",P?"left":"top");var N=Yp.extendFlat({},l,{size:Yp.bigFont(l.size)});Yp.coerceFont(s,"title.font",N);let H=i>1;s("titleclick",H?"toggle":!1),s("titledoubleclick",H?"toggleothers":!1)}}}sle.exports=function(t,r,n){var i,a=n.slice(),o=r.shapes;if(o)for(i=0;i<o.length;i++){var s=o[i];if(s.showlegend){var l={_input:s._input,visible:s.visible,showlegend:s.showlegend,legend:s.legend};a.push(l)}}var u=["legend"];for(i=0;i<a.length;i++)Array.isArray(a[i].legend)?u=u.concat(a[i].legend):Yp.pushUnique(u,a[i].legend);for(r._legends=[],i=0;i<u.length;i++){var c=u[i];Jlt(c,t,r,a,u.length),r[c]&&(r[c]._id=c),r._legends.push(c)}}});var DB=ye(RB=>{"use strict";var p_=Oa(),IB=Pr(),$lt=IB.pushUnique,Qlt=mM(),lle=!0;RB.handleItemClick=function(t,r,n,i){var a=r._fullLayout;if(r._dragged||r._editing)return;var o=t.data()[0][0];if(o.groupTitle&&o.noClick)return;var s=n.groupclick;i==="toggle"&&n.itemdoubleclick==="toggleothers"&&lle&&r.data&&r._context.showTips&&(IB.notifier(IB._(r,"Double-click on legend to isolate one trace"),"long",r),lle=!1);var l=s==="togglegroup",u=a.hiddenlabels?a.hiddenlabels.slice():[],c=r._fullData,f=(a.shapes||[]).filter(function(st){return st.showlegend}),h=c.concat(f),d=o.trace;d._isShape&&(d=d._fullInput);var v=d.legendgroup,m,b,p,k,M,T,L={},x=[],C=[],S=[];function g(st,ct){var Qt=x.indexOf(st),Ht=L.visible;return Ht||(Ht=L.visible=[]),x.indexOf(st)===-1&&(x.push(st),Qt=x.length-1),Ht[Qt]=ct,Qt}var P=(a.shapes||[]).map(function(st){return st._input}),E=!1;function z(st,ct){P[st].visible=ct,E=!0}function q(st,ct){if(!(o.groupTitle&&!l)){var Qt=st._fullInput||st,Ht=Qt._isShape,nr=Qt.index;nr===void 0&&(nr=Qt._index);var tt=Qt.visible===!1?!1:ct;Ht?z(nr,tt):g(nr,tt)}}var U=d.legend,G=d._fullInput,Z=G&&G._isShape;if(!Z&&p_.traceIs(d,"pie-like")){var j=o.label,N=u.indexOf(j);if(i==="toggle")N===-1?u.push(j):u.splice(N,1);else if(i==="toggleothers"){var H=N!==-1,re=[];for(m=0;m<r.calcdata.length;m++){var oe=r.calcdata[m];for(b=0;b<oe.length;b++){var _e=oe[b],ke=_e.label;U===oe[0].trace.legend&&j!==ke&&(u.indexOf(ke)===-1&&(H=!0),$lt(u,ke),re.push(ke))}}if(!H)for(var Ce=0;Ce<re.length;Ce++){var ge=u.indexOf(re[Ce]);ge!==-1&&u.splice(ge,1)}}p_.call("_guiRelayout",r,"hiddenlabels",u)}else{var ie=v&&v.length,Se=[],Ee;if(ie)for(m=0;m<h.length;m++)Ee=h[m],Ee.visible&&Ee.legendgroup===v&&Se.push(m);if(i==="toggle"){var we;switch(d.visible){case!0:we="legendonly";break;case!1:we=!1;break;case"legendonly":we=!0;break}if(ie)if(l)for(m=0;m<h.length;m++){var De=h[m];De.visible!==!1&&De.legendgroup===v&&q(De,we)}else q(d,we);else q(d,we)}else if(i==="toggleothers"){var Le,me,Pe,ce,He,lt=!0;for(m=0;m<h.length;m++)if(He=h[m],Le=He===d,Pe=He.showlegend!==!0,!(Le||Pe)&&(me=ie&&He.legendgroup===v,!me&&He.legend===U&&He.visible===!0&&!p_.traceIs(He,"notLegendIsolatable"))){lt=!1;break}for(m=0;m<h.length;m++)if(He=h[m],!(He.visible===!1||He.legend!==U)&&!p_.traceIs(He,"notLegendIsolatable"))switch(d.visible){case"legendonly":q(He,!0);break;case!0:ce=lt?!0:"legendonly",Le=He===d,Pe=He.showlegend!==!0&&!He.legendgroup,me=Le||ie&&He.legendgroup===v,q(He,me||Pe?!0:ce);break}}for(m=0;m<C.length;m++)if(p=C[m],!!p){var mt=p.constructUpdate(),Vt=Object.keys(mt);for(b=0;b<Vt.length;b++)k=Vt[b],T=L[k]=L[k]||[],T[S[m]]=mt[k]}for(M=Object.keys(L),m=0;m<M.length;m++)for(k=M[m],b=0;b<x.length;b++)L[k].hasOwnProperty(b)||(L[k][b]=void 0);E?p_.call("_guiUpdate",r,L,{shapes:P},x):p_.call("_guiRestyle",r,L,x)}};RB.handleTitleClick=function(t,r,n){let i=t._fullLayout,a=t._fullData,o=Qlt.getId(r),s=(i.shapes||[]).filter(function(p){return p.showlegend}),l=a.concat(s);function u(p){return(p.legend||"legend")===o}var c,f;if(n==="toggle")c=!l.some(function(k){return u(k)&&k.visible===!0}),f=!1;else{let p=l.some(function(k){return!u(k)&&k.visible===!0&&k.showlegend!==!1});c=!0,f=!p}let h={visible:[]},d=[],v=(i.shapes||[]).map(function(p){return p._input});for(var m=!1,b=0;b<l.length;b++){let p=l[b],k=u(p);if(!k){let L=p.showlegend!==!0&&!p.legendgroup;if(n==="toggle"||L)continue}let T=(k?c:f)?!0:"legendonly";p.visible!==!1&&p.visible!==T&&(p._isShape?(v[p._index].visible=T,m=!0):(d.push(p.index),h.visible.push(T)))}m?p_.call("_guiUpdate",t,h,{shapes:v},d):d.length&&p_.call("_guiRestyle",t,h,d)}});var FB=ye((Mar,ule)=>{"use strict";ule.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var hle=ye((Ear,fle)=>{"use strict";var cle=Oa(),zB=mM();fle.exports=function(t,r,n){var i=r._inHover,a=zB.isGrouped(r),o=zB.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,d,v;function m(H,re,oe){if(r.visible!==!1&&!(n&&H!==r._id))if(re===""||!zB.isGrouped(r)){var _e="~~i"+f;l.push(_e),s[_e]=[oe],f++}else l.indexOf(re)===-1?(l.push(re),u=!0,s[re]=[oe]):s[re].push(oe)}for(d=0;d<t.length;d++){var b=t[d],p=b[0],k=p.trace,M=k.legend,T=k.legendgroup;if(!(!i&&(!k.visible||!k.showlegend)))if(cle.traceIs(k,"pie-like")){var L=Array.isArray(k.legend),x=Array.isArray(k.showlegend);for(c[T]||(c[T]={}),v=0;v<b.length;v++)if(!(x&&k.showlegend[b[v].i]===!1)){L&&(M=k.legend[b[v].i]||"legend");var C=b[v].label;c[T][C]||(m(M,T,{label:C,color:b[v].color,i:b[v].i,trace:k,pts:b[v].pts}),c[T][C]=!0,h=Math.max(h,(C||"").length))}}else m(M,T,p),h=Math.max(h,(k.name||"").length)}if(!l.length)return[];var S=!u||!a,g=[];for(d=0;d<l.length;d++){var P=s[l[d]];S?g.push(P[0]):g.push(P)}for(S&&(g=[g]),d=0;d<g.length;d++){var E=1/0;for(v=0;v<g[d].length;v++){var z=g[d][v].trace.legendrank;E>z&&(E=z)}g[d][0]._groupMinRank=E,g[d][0]._preGroupSort=d}var q=function(H,re){return H[0]._groupMinRank-re[0]._groupMinRank||H[0]._preGroupSort-re[0]._preGroupSort},U=function(H,re){return H.trace.legendrank-re.trace.legendrank||H._preSort-re._preSort};for(g.forEach(function(H,re){H[0]._preGroupSort=re}),g.sort(q),d=0;d<g.length;d++){g[d].forEach(function(H,re){H._preSort=re}),g[d].sort(U);var G=g[d][0].trace,Z=null;for(v=0;v<g[d].length;v++){var j=g[d][v].trace.legendgrouptitle;if(j&&j.text){Z=j,i&&(j.font=r._groupTitleFont);break}}if(o&&g[d].reverse(),Z){var N=!1;for(v=0;v<g[d].length;v++)if(cle.traceIs(g[d][v].trace,"pie-like")){N=!0;break}g[d].unshift({i:-1,groupTitle:Z,noClick:N,trace:{showlegend:G.showlegend,legendgroup:G.legendgroup,legend:G.legend,visible:r.groupclick==="toggleitem"?!0:G.visible}})}for(v=0;v<g[d].length;v++)g[d][v]=[g[d][v]]}return r._lgroupsLength=g.length,r._maxNameLength=h,g}});var g_=ye(Ub=>{"use strict";var GL=Pr();function dle(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Ub.formatPiePercent=function(t,r){var n=dle((t*100).toPrecision(3));return GL.numSeparate(n,r)+"%"};Ub.formatPieValue=function(t,r){var n=dle(t.toPrecision(10));return GL.numSeparate(n,r)};Ub.getFirstFilled=function(t,r){if(GL.isArrayOrTypedArray(t))for(var n=0;n<r.length;n++){var i=t[r[n]];if(i||i===0||i==="")return i}};Ub.castOption=function(t,r){if(GL.isArrayOrTypedArray(t))return Ub.getFirstFilled(t,r);if(t)return t};Ub.getRotationAngle=function(e){return(e==="auto"?0:e)*Math.PI/180}});var ple=ye((Car,vle)=>{"use strict";var eut=So(),tut=ka();vle.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?eut.pointStyle(t,n,i,r):tut.fill(t,r.color)}});var Z3=ye((Lar,yle)=>{"use strict";var gle=ka(),mle=g_().castOption,rut=ple();yle.exports=function(t,r,n,i){var a=n.marker.line,o=mle(a.color,r.pts)||gle.defaultLine,s=mle(a.width,r.pts)||0;t.call(rut,r,n,i).style("stroke-width",s).call(gle.stroke,o)}});var NB=ye((Par,Ale)=>{"use strict";var Ov=qa(),qB=Oa(),_v=Pr(),_le=_v.strTranslate,Kp=So(),T0=ka(),OB=pv().extractOpts,HL=Ru(),iut=Z3(),nut=g_().castOption,aut=FB(),xle=12,ble=5,Vb=2,out=10,Y3=5;Ale.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing==="constant",o=n.itemwidth,s=(o+aut.itemGap*2)/2,l=_le(s,0),u=function(C,S,g,P){var E;if(C+1)E=C;else if(S&&S.width>0)E=S.width;else return 0;return a?P:Math.min(E,g)};t.each(function(C){var S=Ov.select(this),g=_v.ensureSingle(S,"g","layers");g.style("opacity",C[0].trace.opacity);var P=n.indentation,E=n.valign,z=C[0].lineHeight,q=C[0].height;if(E==="middle"&&P===0||!z||!q)g.attr("transform",null);else{var U={top:1,bottom:-1}[E],G=U*(.5*(z-q+3))||0,Z=n.indentation;g.attr("transform",_le(Z,G))}var j=g.selectAll("g.legendfill").data([C]);j.enter().append("g").classed("legendfill",!0);var N=g.selectAll("g.legendlines").data([C]);N.enter().append("g").classed("legendlines",!0);var H=g.selectAll("g.legendsymbols").data([C]);H.enter().append("g").classed("legendsymbols",!0),H.selectAll("g.legendpoints").data([C]).enter().append("g").classed("legendpoints",!0)}).each(x).each(h).each(v).each(d).each(b).each(T).each(M).each(c).each(f).each(p).each(k);function c(C){var S=wle(C),g=S.showFill,P=S.showLine,E=S.showGradientLine,z=S.showGradientFill,q=S.anyFill,U=S.anyLine,G=C[0],Z=G.trace,j,N,H=OB(Z),re=H.colorscale,oe=H.reversescale,_e=function(we){if(we.size())if(g)Kp.fillGroupStyle(we,r,!0);else{var De="legendfill-"+Z.uid;Kp.gradient(we,r,De,BB(oe),re,"fill")}},ke=function(we){if(we.size()){var De="legendline-"+Z.uid;Kp.lineGroupStyle(we),Kp.gradient(we,r,De,BB(oe),re,"stroke")}},Ce=HL.hasMarkers(Z)||!q?"M5,0":U?"M5,-2":"M5,-3",ge=Ov.select(this),ie=ge.select(".legendfill").selectAll("path").data(g||z?[C]:[]);if(ie.enter().append("path").classed("js-fill",!0),ie.exit().remove(),ie.attr("d",Ce+"h"+o+"v6h-"+o+"z").call(_e),P||E){var Se=u(void 0,Z.line,out,ble);N=_v.minExtend(Z,{line:{width:Se}}),j=[_v.minExtend(G,{trace:N})]}var Ee=ge.select(".legendlines").selectAll("path").data(P||E?[j]:[]);Ee.enter().append("path").classed("js-line",!0),Ee.exit().remove(),Ee.attr("d",Ce+(E?"l"+o+",0.0001":"h"+o)).call(P?Kp.lineGroupStyle:ke)}function f(C){var S=wle(C),g=S.anyFill,P=S.anyLine,E=S.showLine,z=S.showMarker,q=C[0],U=q.trace,G=!z&&!P&&!g&&HL.hasText(U),Z,j;function N(ie,Se,Ee,we){var De=_v.nestedProperty(U,ie).get(),Le=_v.isArrayOrTypedArray(De)&&Se?Se(De):De;if(a&&Le&&we!==void 0&&(Le=we),Ee){if(Le<Ee[0])return Ee[0];if(Le>Ee[1])return Ee[1]}return Le}function H(ie){return q._distinct&&q.index&&ie[q.index]?ie[q.index]:ie[0]}if(z||G||E){var re={},oe={};if(z){re.mc=N("marker.color",H),re.mx=N("marker.symbol",H),re.mo=N("marker.opacity",_v.mean,[.2,1]),re.mlc=N("marker.line.color",H),re.mlw=N("marker.line.width",_v.mean,[0,5],Vb),re.mld=U._isShape?"solid":N("marker.line.dash",H),oe.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var _e=N("marker.size",_v.mean,[2,16],xle);re.ms=_e,oe.marker.size=_e}E&&(oe.line={width:N("line.width",H,[0,10],ble)}),G&&(re.tx="Aa",re.tp=N("textposition",H),re.ts=10,re.tc=N("textfont.color",H),re.tf=N("textfont.family",H),re.tw=N("textfont.weight",H),re.ty=N("textfont.style",H),re.tv=N("textfont.variant",H),re.tC=N("textfont.textcase",H),re.tE=N("textfont.lineposition",H),re.tS=N("textfont.shadow",H)),Z=[_v.minExtend(q,re)],j=_v.minExtend(U,oe),j.selectedpoints=null,j.texttemplate=null}var ke=Ov.select(this).select("g.legendpoints"),Ce=ke.selectAll("path.scatterpts").data(z?Z:[]);Ce.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),Ce.exit().remove(),Ce.call(Kp.pointStyle,j,r),z&&(Z[0].mrc=3);var ge=ke.selectAll("g.pointtext").data(G?Z:[]);ge.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),ge.exit().remove(),ge.selectAll("text").call(Kp.textPointStyle,j,r)}function h(C){var S=C[0].trace,g=S.type==="waterfall";if(C[0]._distinct&&g){var P=C[0].trace[C[0].dir].marker;return C[0].mc=P.color,C[0].mlw=P.line.width,C[0].mlc=P.line.color,m(C,this,"waterfall")}var E=[];S.visible&&g&&(E=C[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var z=Ov.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(E);z.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(q){var U=Ov.select(this),G=S[q[0]].marker,Z=u(void 0,G.line,Y3,Vb);U.attr("d",q[1]).style("stroke-width",Z+"px").call(T0.fill,G.color),Z&&U.call(T0.stroke,G.line.color)})}function d(C){m(C,this)}function v(C){m(C,this,"funnel")}function m(C,S,g){var P=C[0].trace,E=P.marker||{},z=E.line||{},q=E.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",U=g?P.visible&&P.type===g:qB.traceIs(P,"bar"),G=Ov.select(S).select("g.legendpoints").selectAll("path.legend"+g).data(U?[C]:[]);G.enter().append("path").classed("legend"+g,!0).attr("d",q).attr("transform",l),G.exit().remove(),G.each(function(Z){var j=Ov.select(this),N=Z[0],H=u(N.mlw,E.line,Y3,Vb);j.style("stroke-width",H+"px");var re=N.mcc;if(!n._inHover&&"mc"in N){var oe=OB(E),_e=oe.mid;_e===void 0&&(_e=(oe.max+oe.min)/2),re=Kp.tryColorscale(E,"")(_e)}var ke=re||N.mc||E.color,Ce=E.pattern,ge=Kp.getPatternAttr,ie=Ce&&(ge(Ce.shape,0,"")||ge(Ce.path,0,""));if(ie){var Se=ge(Ce.bgcolor,0,null),Ee=ge(Ce.fgcolor,0,null),we=Ce.fgopacity,De=Tle(Ce.size,8,10),Le=Tle(Ce.solidity,.5,1),me="legend-"+P.uid;j.call(Kp.pattern,"legend",r,me,ie,De,Le,re,Ce.fillmode,Se,Ee,we)}else j.call(T0.fill,ke);H&&T0.stroke(j,N.mlc||z.color)})}function b(C){var S=C[0].trace,g=Ov.select(this).select("g.legendpoints").selectAll("path.legendbox").data(S.visible&&qB.traceIs(S,"box-violin")?[C]:[]);g.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),g.exit().remove(),g.each(function(){var P=Ov.select(this);if((S.boxpoints==="all"||S.points==="all")&&T0.opacity(S.fillcolor)===0&&T0.opacity((S.line||{}).color)===0){var E=_v.minExtend(S,{marker:{size:a?xle:_v.constrain(S.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});g.call(Kp.pointStyle,E,r)}else{var z=u(void 0,S.line,Y3,Vb);P.style("stroke-width",z+"px").call(T0.fill,S.fillcolor),z&&T0.stroke(P,S.line.color)}})}function p(C){var S=C[0].trace,g=Ov.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(S.visible&&S.type==="candlestick"?[C,C]:[]);g.enter().append("path").classed("legendcandle",!0).attr("d",function(P,E){return E?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),g.exit().remove(),g.each(function(P,E){var z=Ov.select(this),q=S[E?"increasing":"decreasing"],U=u(void 0,q.line,Y3,Vb);z.style("stroke-width",U+"px").call(T0.fill,q.fillcolor),U&&T0.stroke(z,q.line.color)})}function k(C){var S=C[0].trace,g=Ov.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(S.visible&&S.type==="ohlc"?[C,C]:[]);g.enter().append("path").classed("legendohlc",!0).attr("d",function(P,E){return E?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),g.exit().remove(),g.each(function(P,E){var z=Ov.select(this),q=S[E?"increasing":"decreasing"],U=u(void 0,q.line,Y3,Vb);z.style("fill","none").call(Kp.dashLine,q.line.dash,U),U&&T0.stroke(z,q.line.color)})}function M(C){L(C,this,"pie")}function T(C){L(C,this,"funnelarea")}function L(C,S,g){var P=C[0],E=P.trace,z=g?E.visible&&E.type===g:qB.traceIs(E,g),q=Ov.select(S).select("g.legendpoints").selectAll("path.legend"+g).data(z?[C]:[]);if(q.enter().append("path").classed("legend"+g,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),q.exit().remove(),q.size()){var U=E.marker||{},G=u(nut(U.line.width,P.pts),U.line,Y3,Vb),Z="pieLike",j=_v.minExtend(E,{marker:{line:{width:G}}},Z),N=_v.minExtend(P,{trace:j},Z);iut(q,N,j,r)}}function x(C){var S=C[0].trace,g,P=[];if(S.visible)switch(S.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],g=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],g=!0;break;case"densitymapbox":case"densitymap":P=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],g="radial";break;case"cone":P=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],g=!1;break;case"streamtube":P=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],g=!1;break;case"surface":P=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],g=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],g=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],g=!0;break;case"isosurface":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],g=!1;break}var E=Ov.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);E.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(z,q){var U=Ov.select(this),G=OB(S),Z=G.colorscale,j=G.reversescale,N=function(_e){if(_e.size()){var ke="legendfill-"+S.uid;Kp.gradient(_e,r,ke,BB(j,g==="radial"),Z,"fill")}},H;if(Z){if(!g){var oe=Z.length;H=q===0?Z[j?oe-1:0][1]:q===1?Z[j?0:oe-1][1]:Z[Math.floor((oe-1)/2)][1]}}else{var re=S.vertexcolor||S.facecolor||S.color;H=_v.isArrayOrTypedArray(re)?re[q]||re[0]:re}U.attr("d",z[0]),H?U.call(T0.fill,H):U.call(N)})}};function BB(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function wle(e){var t=e[0].trace,r=t.contours,n=HL.hasLines(t),i=HL.hasMarkers(t),a=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:n=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?a=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function Tle(e,t,r){return e&&_v.isArrayOrTypedArray(e)?t:e>r?r:e}});var HB=ye((Iar,Rle)=>{"use strict";var np=qa(),vh=Pr(),VB=Mc(),Gb=Oa(),XL=C3(),UB=yv(),ph=So(),yM=ka(),Hb=Zl(),Sle=DB().handleItemClick,Mle=DB().handleTitleClick,qh=FB(),GB=Dh(),Ple=GB.LINE_SPACING,J3=GB.FROM_TL,Ele=GB.FROM_BR,kle=hle(),sut=NB(),$3=mM(),K3=1,lut=/^legend[0-9]*$/;Rle.exports=function(t,r){if(r)Cle(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^="legend"]');a.each(function(){var u=np.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(lut)&&i.indexOf(f)===-1&&u.remove()});for(var o=0;o<i.length;o++){var s=i[o],l=t._fullLayout[s];Cle(t,l)}}};function uut(e,t,r){if(!(t.title.side!=="top center"&&t.title.side!=="top right")){var n=t.title.font,i=n.size*Ple,a=0,o=e.node(),s=ph.bBox(o).width;t.title.side==="top center"?a=.5*(t._width-2*r-2*qh.titlePad-s):t.title.side==="top right"&&(a=t._width-2*r-2*qh.titlePad-s),Hb.positionText(e,r+qh.titlePad+a,r+i)}}function Cle(e,t){var r=t||{},n=e._fullLayout,i=$3.getId(r),a,o,s=r._inHover;if(s?(o=r.layer,a="hover"):(o=n._infolayer,a=i),!!o){a+=n._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0);var l;if(s){if(!r.entries)return;l=kle(r.entries,r)}else{for(var u=(e.calcdata||[]).slice(),c=n.shapes,f=0;f<c.length;f++){var h=c[f];if(h.showlegend){var d={_isShape:!0,_fullInput:h,index:h._index,name:h.name||h.label.text||"shape "+h._index,legend:h.legend,legendgroup:h.legendgroup,legendgrouptitle:h.legendgrouptitle,legendrank:h.legendrank,legendwidth:h.legendwidth,showlegend:h.showlegend,visible:h.visible,opacity:h.opacity,mode:h.type==="line"?"lines":"markers",line:h.line,marker:{line:h.line,color:h.fillcolor,size:12,symbol:h.type==="rect"?"square":h.type==="circle"?"circle":"hexagon2"}};u.push([{trace:d}])}}l=n.showlegend&&kle(u,r,n._legends.length>1)}var v=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll("."+i).remove(),n._topdefs.select("#"+a).remove(),VB.autoMargin(e,i);var m=vh.ensureSingle(o,"g",i,function(S){s||S.attr("pointer-events","all")}),b=vh.ensureSingleById(n._topdefs,"clipPath",a,function(S){S.append("rect")}),p=vh.ensureSingle(m,"rect","bg",function(S){S.attr("shape-rendering","crispEdges")});p.call(yM.stroke,r.bordercolor).call(yM.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var k=vh.ensureSingle(m,"g","scrollbox"),M=r.title;r._titleWidth=0,r._titleHeight=0;var T;M.text?(T=vh.ensureSingle(k,"text",i+"titletext"),T.attr("text-anchor","start").call(ph.font,M.font).text(M.text),WL(T,k,e,r,K3),!s&&(r.titleclick||r.titledoubleclick)&&hut(k,e,r,i)):(k.selectAll("."+i+"titletext").remove(),k.selectAll("."+i+"titletoggle").remove());var L=vh.ensureSingle(m,"rect","scrollbar",function(S){S.attr(qh.scrollBarEnterAttrs).call(yM.fill,qh.scrollBarColor)}),x=k.selectAll("g.groups").data(l);x.enter().append("g").attr("class","groups"),x.exit().remove();var C=x.selectAll("g.traces").data(vh.identity);C.enter().append("g").attr("class","traces"),C.exit().remove(),C.style("opacity",function(S){let g=S[0],P=g.trace;if(g.groupTitle){let E=P.legendgroup,z=(n.shapes||[]).filter(function(U){return U.showlegend});return e._fullData.concat(z).some(function(U){return U.legendgroup===E&&(U.legend||"legend")===i&&U.visible===!0})?1:.5}return Gb.traceIs(P,"pie-like")?v.indexOf(S[0].label)!==-1?.5:1:P.visible==="legendonly"?.5:1}).each(function(){np.select(this).call(cut,e,r)}).call(sut,e,r).each(function(S){s||S[0].groupTitle&&r.groupclick==="toggleitem"||np.select(this).call(fut,e,i)}),vh.syncOrAsync([VB.previousPromises,function(){return put(e,x,C,r,k)},function(){var S=n._size,g=r.borderwidth,P=r.xref==="paper",E=r.yref==="paper";if(M.text){let He=(n.shapes||[]).filter(function(mt){return mt.showlegend}),lt=e._fullData.concat(He).some(function(mt){let Vt=mt.legend||"legend";var st=Array.isArray(Vt)?Vt.includes(i):Vt===i;return st&&mt.visible===!0});T.style("opacity",lt?1:.5)}if(!s){var z,q;P?z=S.l+S.w*r.x-J3[ZL(r)]*r._width:z=n.width*r.x-J3[ZL(r)]*r._width,E?q=S.t+S.h*(1-r.y)-J3[YL(r)]*r._effHeight:q=n.height*(1-r.y)-J3[YL(r)]*r._effHeight;var U=gut(e,i,z,q);if(U)return;if(n.margin.autoexpand){var G=z,Z=q;z=P?vh.constrain(z,0,n.width-r._width):G,q=E?vh.constrain(q,0,n.height-r._effHeight):Z,z!==G&&vh.log("Constrain "+i+".x to make legend fit inside graph"),q!==Z&&vh.log("Constrain "+i+".y to make legend fit inside graph")}ph.setTranslate(m,z,q)}if(L.on(".drag",null),m.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var j=r._effHeight;s&&(j=r._height),p.attr({width:r._width-g,height:j-g,x:g/2,y:g/2}),ph.setTranslate(k,0,0),b.select("rect").attr({width:r._width-2*g,height:j-2*g,x:g,y:g}),ph.setClipUrl(k,a,e),ph.setRect(L,0,0,0,0),delete r._scrollY}else{var N=Math.max(qh.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),H=r._effHeight-N-2*qh.scrollBarMargin,re=r._height-r._effHeight,oe=H/re,_e=Math.min(r._scrollY||0,re);p.attr({width:r._width-2*g+qh.scrollBarWidth+qh.scrollBarMargin,height:r._effHeight-g,x:g/2,y:g/2}),b.select("rect").attr({width:r._width-2*g+qh.scrollBarWidth+qh.scrollBarMargin,height:r._effHeight-2*g,x:g,y:g+_e}),ph.setClipUrl(k,a,e),De(_e,N,oe),m.on("wheel",function(){_e=vh.constrain(r._scrollY+np.event.deltaY/re*H,0,re),De(_e,N,oe),_e!==0&&_e!==re&&np.event.preventDefault()});var ke,Ce,ge,ie=function(He,lt,mt){var Vt=(mt-lt)/oe+He;return vh.constrain(Vt,0,re)},Se=function(He,lt,mt){var Vt=(lt-mt)/oe+He;return vh.constrain(Vt,0,re)},Ee=np.behavior.drag().on("dragstart",function(){var He=np.event.sourceEvent;He.type==="touchstart"?ke=He.changedTouches[0].clientY:ke=He.clientY,ge=_e}).on("drag",function(){var He=np.event.sourceEvent;He.buttons===2||He.ctrlKey||(He.type==="touchmove"?Ce=He.changedTouches[0].clientY:Ce=He.clientY,_e=ie(ge,ke,Ce),De(_e,N,oe))});L.call(Ee);var we=np.behavior.drag().on("dragstart",function(){var He=np.event.sourceEvent;He.type==="touchstart"&&(ke=He.changedTouches[0].clientY,ge=_e)}).on("drag",function(){var He=np.event.sourceEvent;He.type==="touchmove"&&(Ce=He.changedTouches[0].clientY,_e=Se(ge,ke,Ce),De(_e,N,oe))});k.call(we)}function De(He,lt,mt){r._scrollY=e._fullLayout[i]._scrollY=He,ph.setTranslate(k,0,-He),ph.setRect(L,r._width,qh.scrollBarMargin+He*mt,qh.scrollBarWidth,lt),b.select("rect").attr("y",g+He)}if(e._context.edits.legendPosition){var Le,me,Pe,ce;m.classed("cursor-move",!0),UB.init({element:m.node(),gd:e,prepFn:function(He){if(He.target!==L.node()){var lt=ph.getTranslate(m);Pe=lt.x,ce=lt.y}},moveFn:function(He,lt){if(Pe!==void 0&&ce!==void 0){var mt=Pe+He,Vt=ce+lt;ph.setTranslate(m,mt,Vt),Le=UB.align(mt,r._width,S.l,S.l+S.w,r.xanchor),me=UB.align(Vt+r._height,-r._height,S.t+S.h,S.t,r.yanchor)}},doneFn:function(){if(Le!==void 0&&me!==void 0){var He={};He[i+".x"]=Le,He[i+".y"]=me,Gb.call("_guiRelayout",e,He)}},clickFn:function(He,lt){var mt=o.selectAll("g.traces").filter(function(){var Vt=this.getBoundingClientRect();return lt.clientX>=Vt.left&<.clientX<=Vt.right&<.clientY>=Vt.top&<.clientY<=Vt.bottom});mt.size()>0&&Ile(e,r,mt,He,lt)}})}}],e)}}function jL(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return a==="fraction"?t._maxWidth*o:r+(o||i)}function Ile(e,t,r,n,i){var a=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:i,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:a};o._group&&(u.group=o._group),Gb.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=XL.triggerHandler(e,"plotly_legendclick",u);if(n===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&Sle(r,e,t,s)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=XL.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&Sle(r,e,t,l)}}function cut(e,t,r){var n=$3.getId(r),i=e.data()[0][0],a=i.trace,o=Gb.traceIs(a,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;i.groupTitle?(u=i.groupTitle.text,c=i.groupTitle.font):(c=r.font,r.entries?u=i.text:(u=o?i.label:a.name,a._meta&&(u=vh.templateString(u,a._meta))));var f=vh.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(ph.font,c).text(s?Lle(u,l):u);var h=r.indentation+r.itemwidth+qh.itemGap*2;Hb.positionText(f,h,0),s?f.call(Hb.makeEditable,{gd:t,text:u}).call(WL,e,t,r).on("edit",function(d){this.text(Lle(d,l)).call(WL,e,t,r);var v=i.trace._fullInput||{},m={};return m.name=d,v._isShape?Gb.call("_guiRelayout",t,"shapes["+a.index+"].name",m.name):Gb.call("_guiRestyle",t,m,a.index)}):WL(f,e,t,r)}function Lle(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var n=r-e.length;n>0;n--)e+=" ";return e}function fut(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=vh.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(yM.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){i=new Date().getTime(),i-t._legendMouseDownTime<n?a+=1:(a=1,t._legendMouseDownTime=i)}),o.on("mouseup",function(){if(!(t._dragged||t._editing)){var s=t._fullLayout[r];new Date().getTime()-t._legendMouseDownTime>n&&(a=Math.max(a-1,1)),Ile(t,s,e,a,np.event)}}))}function hut(e,t,r,n){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(n):c===n)&&Gb.traceIs(u,"pie-like")}))return;let a=t._context.doubleClickDelay;var o,s=1;let l=vh.ensureSingle(e,"rect",n+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(yM.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTime<a?s+=1:(s=1,t._legendMouseDownTime=o)}),l.on("mouseup",function(){if(t._dragged||t._editing)return;new Date().getTime()-t._legendMouseDownTime>a&&(s=Math.max(s-1,1));let u={event:np.event,legendId:n,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(XL.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Mle(t,r,r.titleclick)},a)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,XL.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Mle(t,r,r.titledoubleclick))}))}function WL(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),Hb.convertToTspans(e,r,function(){dut(t,r,n,i)})}function dut(e,t,r,n){var i=e.data()[0][0],a=i&&i.trace.showlegend;if(Array.isArray(a)&&(a=a[i.i]!==!1),!r._inHover&&i&&!a){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=$3.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;n===K3?c=r.title.font:i.groupTitle?c=i.groupTitle.font:c=r.font;var f=c.size*Ple,h,d;if(s){var v=ph.bBox(s);h=v.height,d=v.width,n===K3?ph.setTranslate(o,u,u+h*.75):ph.setTranslate(o,0,h*.25)}else{var m="."+l+(n===K3?"title":"")+"text",b=e.select(m),p=Hb.lineCount(b),k=b.node();if(h=f*p,d=k?ph.bBox(k).width:0,n===K3)r.title.side==="left"&&(d+=qh.itemGap*2),Hb.positionText(b,u+qh.titlePad,u+f);else{var M=qh.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(M=qh.itemGap,d-=r.indentation+r.itemwidth),Hb.positionText(b,M,-f*((p-1)/2-.3))}}n===K3?(r._titleWidth=d,r._titleHeight=h):(i.lineHeight=f,i.height=Math.max(h,16)+3,i.width=d)}function vut(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 put(e,t,r,n,i){var a=e._fullLayout,o=$3.getId(n);n||(n=a[o]);var s=a._size,l=$3.isVertical(n),u=$3.isGrouped(n),c=n.entrywidthmode==="fraction",f=n.borderwidth,h=2*f,d=qh.itemGap,v=n.indentation+n.itemwidth+d*2,m=2*(f+d),b=YL(n),p=n.y<0||n.y===0&&b==="top",k=n.y>1||n.y===1&&b==="bottom",M=n.tracegroupgap,T={};let{orientation:L,yref:x}=n,{maxheight:C}=n,S=p||k||L!=="v"||x!=="paper";C||(C=S?.5:1);let g=S?a.height:s.h;n._maxHeight=Math.max(C>1?C:C*g,30);var P=0;n._width=0,n._height=0;var E=vut(n);if(l)r.each(function(He){var lt=He[0].height;ph.setTranslate(this,f+E[0],f+E[1]+n._height+lt/2+d),n._height+=lt,n._width=Math.max(n._width,He[0].width)}),P=v+n._width,n._width+=d+v+h,n._height+=m,u&&(t.each(function(He,lt){ph.setTranslate(this,0,lt*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var z=ZL(n),q=n.x<0||n.x===0&&z==="right",U=n.x>1||n.x===1&&z==="left",G=k||p,Z=a.width/2;n._maxWidth=Math.max(q?G&&z==="left"?s.l+s.w:Z:U?G&&z==="right"?s.r+s.w:Z:s.w,2*v);var j=0,N=0;r.each(function(He){var lt=jL(He,n,v);j=Math.max(j,lt),N+=lt}),P=null;var H=0;if(u){var re=0,oe=0,_e=0;t.each(function(){var He=0,lt=0;np.select(this).selectAll("g.traces").each(function(Vt){var st=jL(Vt,n,v),ct=Vt[0].height;ph.setTranslate(this,E[0],E[1]+f+d+ct/2+lt),lt+=ct,He=Math.max(He,st),T[Vt[0].trace.legendgroup]=He});var mt=He+d;oe>0&&mt+f+oe>n._maxWidth?(H=Math.max(H,oe),oe=0,_e+=re+M,re=lt):re=Math.max(re,lt),ph.setTranslate(this,oe,_e),oe+=mt}),n._width=Math.max(H,oe)+f,n._height=_e+re+m}else{var ke=r.size(),Ce=N+h+(ke-1)*d<n._maxWidth,ge=0,ie=0,Se=0,Ee=0;r.each(function(He){var lt=He[0].height,mt=jL(He,n,v,u),Vt=Ce?mt:j;c||(Vt+=d),Vt+f+ie-d>=n._maxWidth&&(H=Math.max(H,Ee),ie=0,Se+=ge,n._height+=ge,ge=0),ph.setTranslate(this,E[0]+f+ie,E[1]+f+Se+lt/2+d),Ee=ie+mt+d,ie+=Vt,ge=Math.max(ge,lt)}),Ce?(n._width=ie+h,n._height=ge+m):(n._width=Math.max(H,Ee)+h,n._height+=ge+m)}}n._width=Math.ceil(Math.max(n._width+E[0],n._titleWidth+2*(f+qh.titlePad))),n._height=Math.ceil(Math.max(n._height+E[1],n._titleHeight+2*(f+qh.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var we=e._context.edits,De=we.legendText||we.legendPosition;r.each(function(He){var lt=np.select(this).select("."+o+"toggle"),mt=He[0].height,Vt=He[0].trace.legendgroup,st=jL(He,n,v);u&&Vt!==""&&(st=T[Vt]);var ct=De?v:P||st;!l&&!c&&(ct+=d/2),ph.setRect(lt,0,-mt/2,ct,mt)});var Le=i.select("."+o+"titletext");Le.node()&&uut(Le,n,f);var me=i.select("."+o+"titletoggle");if(me.size()&&Le.node()){var Pe=Le.attr("x")||0,ce=qh.titlePad;ph.setRect(me,Pe-ce,f,n._titleWidth+2*ce,n._titleHeight+2*ce)}}function gut(e,t,r,n){var i=e._fullLayout,a=i[t],o=ZL(a),s=YL(a),l=a.xref==="paper",u=a.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=a.y<.5?"b":"t",f=a.x<.5?"l":"r",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(l&&u)return VB.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*J3[o],r:a._width*Ele[o],b:a._effHeight*Ele[s],t:a._effHeight*J3[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||a.orientation==="v"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function ZL(e){return vh.isRightAnchor(e)?"right":vh.isCenterAnchor(e)?"center":"left"}function YL(e){return vh.isBottomAnchor(e)?"bottom":vh.isMiddleAnchor(e)?"middle":"top"}});var ZB=ye(XB=>{"use strict";var jb=qa(),Py=Eo(),Dle=fd(),zf=Pr(),mut=zf.pushUnique,jB=zf.strTranslate,yut=zf.strRotate,_ut=C3(),A0=Zl(),xut=ale(),Am=So(),vd=ka(),KL=yv(),Sm=ho(),but=Rh().zindexSeparator,eT=Oa(),kg=ip(),Wb=NS(),wut=PB(),Tut=HB(),Vle=Wb.YANGLE,WB=Math.PI*Vle/180,Aut=1/Math.sin(WB),Sut=Math.cos(WB),Mut=Math.sin(WB),Qc=Wb.HOVERARROWSIZE,sl=Wb.HOVERTEXTPAD,Fle={box:!0,ohlc:!0,violin:!0,candlestick:!0},Eut={scatter:!0,scattergl:!0,splom:!0};function zle(e,t){return e.distance-t.distance}XB.hover=function(t,r,n,i){t=zf.getGraphDiv(t);var a=r.target;zf.throttle(t._fullLayout._uid+Wb.HOVERID,Wb.HOVERMINTIME,function(){kut(t,r,n,i,a)})};XB.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Xle(i),o=Zle(i),s=t.map(function(b){var p=b._x0||b.x0||b.x||0,k=b._x1||b.x1||b.x||0,M=b._y0||b.y0||b.y||0,T=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var x=Math.min(p,k),C=Math.max(p,k),S=Math.min(M,T),g=Math.max(M,T),P=b.trace;if(eT.traceIs(P,"gl3d")){var E=i._fullLayout[P.scene]._scene.container,z=E.offsetLeft,q=E.offsetTop;x+=z,C+=z,S+=q,g+=q}L.bbox={x0:x+o,x1:C+o,y0:S+a,y1:g+a},L.xPixel=(p+k)/2,L.yPixel=(M+T)/2,r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:b.color||vd.defaultLine,x0:b.x0||b.x||0,x1:b.x1||b.x||0,y0:b.y0||b.y||0,y1:b.y1||b.y||0,xLabel:b.xLabel,yLabel:b.yLabel,zLabel:b.zLabel,text:b.text,name:b.name,idealAlign:b.idealAlign,borderColor:b.borderColor,fontFamily:b.fontFamily,fontSize:b.fontSize,fontColor:b.fontColor,fontWeight:b.fontWeight,fontStyle:b.fontStyle,fontVariant:b.fontVariant,nameLength:b.nameLength,textAlign:b.textAlign,trace:b.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:b.hovertemplate||!1,hovertemplateLabels:b.hovertemplateLabels||!1,eventData:L}}),l=!1,u=Hle(s,{gd:i,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||vd.background,container:jb.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,d=0;c.sort(function(b,p){return b.y0-p.y0}).each(function(b,p){var k=b.y0-b.by/2;k-f<h?b.offset=h-k+f:b.offset=0,h=k+b.by+b.offset,p===r.anchorIndex&&(d=b.offset)}).each(function(b){b.offset-=d});var v=i._fullLayout._invScaleX,m=i._fullLayout._invScaleY;return Wle(c,l,v,m),n?c:c.node()};function kut(e,t,r,n,i){r||(r="xy"),typeof r=="string"&&(r=r.split(but)[0]);var a=Array.isArray(r)?r:[r],o,s=e._fullLayout,l=s.hoversubplots,u=s._plots||[],c=u[r],f=s._has("cartesian"),h=t.hovermode||s.hovermode,d=(h||"").charAt(0)==="x",v=(h||"").charAt(0)==="y",m,b;if(f&&(d||v)&&l==="axis"){for(var p=a.length,k=0;k<p;k++)if(o=a[k],u[o]){m=Sm.getFromId(e,o,"x"),b=Sm.getFromId(e,o,"y");var M=(d?m:b)._subplotsWith;if(M&&M.length)for(var T=0;T<M.length;T++)mut(a,M[T])}}if(c&&l!=="single"){var L=c.overlays.map(function(Vi){return Vi.id});a=a.concat(L)}for(var x=a.length,C=new Array(x),S=new Array(x),g=!1,P=0;P<x;P++)if(o=a[P],u[o])g=!0,C[P]=u[o].xaxis,S[P]=u[o].yaxis;else if(s[o]&&s[o]._subplot){var E=s[o]._subplot;C[P]=E.xaxis,S[P]=E.yaxis}else{zf.warn("Unrecognized subplot: "+o);return}if(h&&!g&&(h="closest"),["x","y","closest","x unified","y unified"].indexOf(h)===-1||!e.calcdata||e.querySelector(".zoombox")||e._dragging)return KL.unhoverRaw(e,t);var z=s.hoverdistance;z===-1&&(z=1/0);var q=s.spikedistance;q===-1&&(q=1/0);var U=[],G=[],Z,j,N,H,re,oe,_e,ke,Ce,ge,ie,Se,Ee,we={hLinePoint:null,vLinePoint:null},De=!1;if(Array.isArray(t))for(h="array",N=0;N<t.length;N++)re=e.calcdata[t[N].curveNumber||0],re&&(oe=re[0].trace,re[0].trace.hoverinfo!=="skip"&&(G.push(re),oe.orientation==="h"&&(De=!0)));else{var Le=e.calcdata.slice();for(Le.sort(function(Vi,Kn){var Jn=Vi[0].trace.zorder||0,Gt=Kn[0].trace.zorder||0;return Jn-Gt}),H=0;H<Le.length;H++)re=Le[H],oe=re[0].trace,oe.hoverinfo!=="skip"&&kg.isTraceInSubplots(oe,a)&&(G.push(re),oe.orientation==="h"&&(De=!0));var me=!i,Pe,ce;if(me)"xpx"in t?Pe=t.xpx:Pe=C[0]._length/2,"ypx"in t?ce=t.ypx:ce=S[0]._length/2;else{if(_ut.triggerHandler(e,"plotly_beforehover",t)===!1)return;var He=i.getBoundingClientRect();Pe=t.clientX-He.left,ce=t.clientY-He.top,s._calcInverseTransform(e);var lt=zf.apply3DTransform(s._invTransform)(Pe,ce);if(Pe=lt[0],ce=lt[1],Pe<0||Pe>C[0]._length||ce<0||ce>S[0]._length)return KL.unhoverRaw(e,t)}if(t.pointerX=Pe+C[0]._offset,t.pointerY=ce+S[0]._offset,"xval"in t?Z=kg.flat(a,t.xval):Z=kg.p2c(C,Pe),"yval"in t?j=kg.flat(a,t.yval):j=kg.p2c(S,ce),!Py(Z[0])||!Py(j[0]))return zf.warn("Fx.hover failed",t,e),KL.unhoverRaw(e,t)}s.clickanywhere&&(e._hoverXVals=Z,e._hoverYVals=j,e._hoverXAxes=C,e._hoverYAxes=S);var mt=1/0;function Vt(Vi,Kn){for(H=0;H<G.length;H++)if(re=G[H],!(!re||!re[0]||!re[0].trace)&&(oe=re[0].trace,!(oe.visible!==!0||oe._length===0)&&["carpet","contourcarpet"].indexOf(oe._module.name)===-1)){if(Ce=h,kg.isUnifiedHover(Ce)&&(Ce=Ce.charAt(0)),oe.type==="splom"?(ke=0,_e=a[ke]):(_e=kg.getSubplot(oe),ke=a.indexOf(_e)),Se={cd:re,trace:oe,xa:C[ke],ya:S[ke],maxHoverDistance:z,maxSpikeDistance:q,index:!1,distance:Math.min(mt,z),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:vd.defaultLine,name:oe.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},s[_e]&&(Se.subplot=s[_e]._subplot),s._splomScenes&&s._splomScenes[oe.uid]&&(Se.scene=s._splomScenes[oe.uid]),Ce==="array"){var Jn=t[H];"pointNumber"in Jn?(Se.index=Jn.pointNumber,Ce="closest"):(Ce="","xval"in Jn&&(ge=Jn.xval,Ce="x"),"yval"in Jn&&(ie=Jn.yval,Ce=Ce?"closest":"y"))}else Vi!==void 0&&Kn!==void 0?(ge=Vi,ie=Kn):(ge=Z[ke],ie=j[ke]);if(Ee=U.length,z!==0)if(oe._module&&oe._module.hoverPoints){var Gt=oe._module.hoverPoints(Se,ge,ie,Ce,{finiteRange:!0,hoverLayer:s._hoverlayer,hoversubplots:l,gd:e});if(Gt)for(var wt,rr=0;rr<Gt.length;rr++)wt=Gt[rr],Py(wt.x0)&&Py(wt.y0)&&U.push(Iut(wt,h))}else zf.log("Unrecognized trace type in hover:",oe);if(h==="closest"&&U.length>Ee&&(U.splice(0,Ee),mt=U[0].distance),f&&q!==0&&U.length===0){Se.distance=q,Se.index=!1;var ir=oe._module.hoverPoints(Se,ge,ie,"closest",{hoverLayer:s._hoverlayer});if(ir&&(ir=ir.filter(function(Zi){return Zi.spikeDistance<=q})),ir&&ir.length){var wr,Xr=ir.filter(function(Zi){return Zi.xa.showspikes&&Zi.xa.spikesnap!=="hovered data"});if(Xr.length){var ti=Xr[0];Py(ti.x0)&&Py(ti.y0)&&(wr=ct(ti),(!we.vLinePoint||we.vLinePoint.spikeDistance>wr.spikeDistance)&&(we.vLinePoint=wr))}var $r=ir.filter(function(Zi){return Zi.ya.showspikes&&Zi.ya.spikesnap!=="hovered data"});if($r.length){var Ri=$r[0];Py(Ri.x0)&&Py(Ri.y0)&&(wr=ct(Ri),(!we.hLinePoint||we.hLinePoint.spikeDistance>wr.spikeDistance)&&(we.hLinePoint=wr))}}}}}Vt();function st(Vi,Kn,Jn){for(var Gt=null,wt=1/0,rr,ir=0;ir<Vi.length;ir++)m&&m._id!==Vi[ir].xa._id||b&&b._id!==Vi[ir].ya._id||(rr=Vi[ir].spikeDistance,Jn&&ir===0&&(rr=-1/0),rr<=wt&&rr<=Kn&&(Gt=Vi[ir],wt=rr));return Gt}function ct(Vi){return Vi?{xa:Vi.xa,ya:Vi.ya,x:Vi.xSpike!==void 0?Vi.xSpike:(Vi.x0+Vi.x1)/2,y:Vi.ySpike!==void 0?Vi.ySpike:(Vi.y0+Vi.y1)/2,distance:Vi.distance,spikeDistance:Vi.spikeDistance,curveNumber:Vi.trace.index,color:Vi.color,pointNumber:Vi.index}:null}var Qt={fullLayout:s,container:s._hoverlayer,event:t},Ht=e._spikepoints,nr={vLinePoint:we.vLinePoint,hLinePoint:we.hLinePoint};e._spikepoints=nr;var tt=function(){var Vi=U.filter(function(Jn){return m&&m._id===Jn.xa._id&&b&&b._id===Jn.ya._id}),Kn=U.filter(function(Jn){return!(m&&m._id===Jn.xa._id&&b&&b._id===Jn.ya._id)});Vi.sort(zle),Kn.sort(zle),U=Vi.concat(Kn),U=Dut(U,h)};tt();var je=h.charAt(0),Ue=(je==="x"||je==="y")&&U[0]&&Eut[U[0].trace.type];if(f&&q!==0&&U.length!==0){var Ae=U.filter(function(Vi){return Vi.ya.showspikes}),rt=st(Ae,q,Ue);we.hLinePoint=ct(rt);var St=U.filter(function(Vi){return Vi.xa.showspikes}),Tt=st(St,q,Ue);we.vLinePoint=ct(Tt)}if(U.length===0){var dt=KL.unhoverRaw(e,t);if(f&&(we.hLinePoint!==null||we.vLinePoint!==null)&&Ble(Ht)&&Ole(e,we,Qt),s.hoveranywhere&&!n&&i){var Et=e._hoverdata;Et&&Et.length&&(e.emit("plotly_unhover",{event:t,points:Et}),e._hoverdata=[]),Qn([])}return dt}if(f&&Ble(Ht)&&Ole(e,we,Qt),kg.isXYhover(Ce)&&U[0].length!==0&&U[0].trace.type!=="splom"){var pt=U[0];Fle[pt.trace.type]?U=U.filter(Vi=>Vi.trace.index===pt.trace.index):U=[pt];var Xt=U.length,or=Ule("x",pt,s),_r=Ule("y",pt,s);Vt(or,_r);var Er=[],ei={},qr=0,jr=function(Vi){var Kn=Fle[Vi.trace.type]?Gle(Vi):Vi.trace.index;if(!ei[Kn])qr++,ei[Kn]=qr,Er.push(Vi);else{var Jn=ei[Kn]-1,Gt=Er[Jn];Jn>0&&Math.abs(Vi.distance)<Math.abs(Gt.distance)&&(Er[Jn]=Vi)}},gt;for(gt=0;gt<Xt;gt++)jr(U[gt]);for(gt=U.length-1;gt>Xt-1;gt--)jr(U[gt]);U=Er,tt()}var Ge=e._hoverdata,Je=[],We=Xle(e),et=Zle(e);for(let Vi of U){var xt=kg.makeEventData(Vi,Vi.trace,Vi.cd);if(Vi.hovertemplate!==!1){var At=!1;Vi.cd[Vi.index]&&Vi.cd[Vi.index].ht&&(At=Vi.cd[Vi.index].ht),Vi.hovertemplate=At||Vi.trace.hovertemplate||!1}if(Vi.xa&&Vi.ya){var Kt=Vi.x0+Vi.xa._offset,er=Vi.x1+Vi.xa._offset,Sr=Vi.y0+Vi.ya._offset,Gr=Vi.y1+Vi.ya._offset,Ir=Math.min(Kt,er),Yr=Math.max(Kt,er),_i=Math.min(Sr,Gr),Pi=Math.max(Sr,Gr);xt.bbox={x0:Ir+et,x1:Yr+et,y0:_i+We,y1:Pi+We},xt.xPixel=(Kt+er)/2,xt.yPixel=(Sr+Gr)/2}Vi.eventData=[xt],Je.push(xt)}e._hoverdata=Je;var ai=h==="y"&&(G.length>1||U.length>1)||h==="closest"&&De&&U.length>1,mi=vd.combine(s.plot_bgcolor||vd.background,s.paper_bgcolor),un=Hle(U,{gd:e,hovermode:h,rotateLabels:ai,bgColor:mi,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Fn=un.hoverLabels;if(kg.isUnifiedHover(h)||(Lut(Fn,ai,s,un.commonLabelBoundingBox),Wle(Fn,ai,s._invScaleX,s._invScaleY)),i&&i.tagName){var An=eT.getComponentMethod("annotations","hasClickToShow")(e,Je);xut(jb.select(i),An?"pointer":"")}var Hn=Rut(e,t,Ge);if(!i||n||!Hn&&!s.hoveranywhere)return;Ge&&Hn&&e.emit("plotly_unhover",{event:t,points:Ge}),Qn(e._hoverdata);function Qn(Vi){e.emit("plotly_hover",{event:t,points:Vi,xaxes:C,yaxes:S,xvals:Z,yvals:j})}}function Gle(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}var Cut=/<extra>([\s\S]*)<\/extra>/;function Hle(e,t){var r=t.gd,n=r._fullLayout,i=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||Wb.HOVERFONT,f=t.fontSize||Wb.HOVERFONTSIZE,h=t.fontWeight||n.font.weight,d=t.fontStyle||n.font.style,v=t.fontVariant||n.font.variant,m=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,p=t.fontShadow||n.font.shadow,k=e[0],M=k.xa,T=k.ya,L=i.charAt(0),x=L+"Label",C=k[x];if(C===void 0&&M.type==="multicategory")for(var S=0;S<e.length&&(C=e[S][x],C===void 0);S++);var g=Q3(r,l),P=g.top,E=g.width,z=g.height,q=C!==void 0&&k.distance<=t.hoverdistance&&(i==="x"||i==="y");if(q){var U=!0,G,Z;for(G=0;G<e.length;G++)if(U&&e[G].zLabel===void 0&&(U=!1),Z=e[G].hoverinfo||e[G].trace.hoverinfo,Z){var j=Array.isArray(Z)?Z:Z.split("+");if(j.indexOf("all")===-1&&j.indexOf(i)===-1){q=!1;break}}U&&(q=!1)}var N=s.selectAll("g.axistext").data(q?[0]:[]);N.enter().append("g").classed("axistext",!0),N.exit().remove();var H={minX:0,maxX:0,minY:0,maxY:0};if(N.each(function(){var dt=jb.select(this),Et=zf.ensureSingle(dt,"path","",function(_i){_i.style({"stroke-width":"1px"})}),pt=zf.ensureSingle(dt,"text","",function(_i){_i.attr("data-notex",1)}),Xt=u.bgcolor||vd.defaultLine,or=u.bordercolor||vd.contrast(Xt),_r=vd.contrast(Xt),Er=u.font,ei={weight:Er.weight||h,style:Er.style||d,variant:Er.variant||v,textcase:Er.textcase||m,lineposition:Er.lineposition||b,shadow:Er.shadow||p,family:Er.family||c,size:Er.size||f,color:Er.color||_r};Et.style({fill:Xt,stroke:or}),pt.text(C).call(Am.font,ei).call(A0.positionText,0,0).call(A0.convertToTspans,r),dt.attr("transform","");var qr=Q3(r,pt.node()),jr,gt;if(i==="x"){var Ge=M.side==="top"?"-":"";pt.attr("text-anchor","middle").call(A0.positionText,0,M.side==="top"?P-qr.bottom-Qc-sl:P-qr.top+Qc+sl),jr=M._offset+(k.x0+k.x1)/2,gt=T._offset+(M.side==="top"?0:T._length);var Je=qr.width/2+sl,We=jr;jr<Je?We=Je:jr>n.width-Je&&(We=n.width-Je),Et.attr("d","M"+(jr-We)+",0L"+(jr-We+Qc)+","+Ge+Qc+"H"+Je+"v"+Ge+(sl*2+qr.height)+"H"+-Je+"V"+Ge+Qc+"H"+(jr-We-Qc)+"Z"),jr=We,H.minX=jr-Je,H.maxX=jr+Je,M.side==="top"?(H.minY=gt-(sl*2+qr.height),H.maxY=gt-sl):(H.minY=gt+sl,H.maxY=gt+(sl*2+qr.height))}else{var et,xt,At;T.side==="right"?(et="start",xt=1,At="",jr=M._offset+M._length):(et="end",xt=-1,At="-",jr=M._offset),gt=T._offset+(k.y0+k.y1)/2,pt.attr("text-anchor",et),Et.attr("d","M0,0L"+At+Qc+","+Qc+"V"+(sl+qr.height/2)+"h"+At+(sl*2+qr.width)+"V-"+(sl+qr.height/2)+"H"+At+Qc+"V-"+Qc+"Z"),H.minY=gt-(sl+qr.height/2),H.maxY=gt+(sl+qr.height/2),T.side==="right"?(H.minX=jr+Qc,H.maxX=jr+Qc+(sl*2+qr.width)):(H.minX=jr-Qc-(sl*2+qr.width),H.maxX=jr-Qc);var Kt=qr.height/2,er=P-qr.top-Kt,Sr="clip"+n._uid+"commonlabel"+T._id,Gr;if(jr<qr.width+2*sl+Qc){Gr="M-"+(Qc+sl)+"-"+Kt+"h-"+(qr.width-sl)+"V"+Kt+"h"+(qr.width-sl)+"Z";var Ir=qr.width-jr+sl;A0.positionText(pt,Ir,er),et==="end"&&pt.selectAll("tspan").each(function(){var _i=jb.select(this),Pi=Am.tester.append("text").text(_i.text()).call(Am.font,ei),ai=Q3(r,Pi.node());Math.round(ai.width)<Math.round(qr.width)&&_i.attr("x",Ir-ai.width),Pi.remove()})}else A0.positionText(pt,xt*(sl+Qc),er),Gr=null;var Yr=n._topclips.selectAll("#"+Sr).data(Gr?[0]:[]);Yr.enter().append("clipPath").attr("id",Sr).append("path"),Yr.exit().remove(),Yr.select("path").attr("d",Gr),Am.setClipUrl(pt,Gr?Sr:null,r)}dt.attr("transform",jB(jr,gt))}),kg.isUnifiedHover(i)){s.selectAll("g.hovertext").remove();let dt=e.filter(Et=>Et.hoverinfo!=="none");if(dt.length===0)return[];var re=n.hoverlabel,oe=re.font,_e=dt[0],ke=((i==="x unified"?_e.xa:_e.ya).unifiedhovertitle||{}).text,Ce=ke?zf.hovertemplateString({data:i==="x unified"?[{xa:_e.xa,x:_e.xVal}]:[{ya:_e.ya,y:_e.yVal}],fallback:_e.trace.hovertemplatefallback,locale:n._d3locale,template:ke}):C,ge={showlegend:!0,legend:{title:{text:Ce,font:oe},font:oe,bgcolor:re.bgcolor,bordercolor:re.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:"v"}},ie={font:oe};wut(ge,ie,r._fullData);var Se=ie.legend;Se.entries=[];for(var Ee=0;Ee<dt.length;Ee++){var we=dt[Ee];if(we.hoverinfo!=="none"){var De=qle(we,!0,i,n,C),Le=De[0],me=De[1];we.name=me,me!==""?we.text=me+" : "+Le:we.text=Le;var Pe=we.cd[we.index];Pe&&(Pe.mc&&(we.mc=Pe.mc),Pe.mcc&&(we.mc=Pe.mcc),Pe.mlc&&(we.mlc=Pe.mlc),Pe.mlcc&&(we.mlc=Pe.mlcc),Pe.mlw&&(we.mlw=Pe.mlw),Pe.mrc&&(we.mrc=Pe.mrc),Pe.dir&&(we.dir=Pe.dir)),we._distinct=!0,Se.entries.push([we])}}Se.entries.sort(function(Et,pt){return Et[0].trace.index-pt[0].trace.index}),Se.layer=s,Se._inHover=!0,Se._groupTitleFont=re.grouptitlefont,Tut(r,Se);var ce=s.select("g.legend"),He=Q3(r,ce.node()),lt=He.width+2*sl,mt=He.height+2*sl,Vt=dt[0],st=(Vt.x0+Vt.x1)/2,ct=(Vt.y0+Vt.y1)/2,Qt=!(eT.traceIs(Vt.trace,"bar-like")||eT.traceIs(Vt.trace,"box-violin")),Ht,nr;L==="y"?Qt?(nr=ct-sl,Ht=ct+sl):(nr=Math.min.apply(null,dt.map(function(Et){return Math.min(Et.y0,Et.y1)})),Ht=Math.max.apply(null,dt.map(function(Et){return Math.max(Et.y0,Et.y1)}))):nr=Ht=zf.mean(dt.map(function(Et){return(Et.y0+Et.y1)/2}))-mt/2;var tt,je;L==="x"?Qt?(tt=st+sl,je=st-sl):(tt=Math.max.apply(null,dt.map(function(Et){return Math.max(Et.x0,Et.x1)})),je=Math.min.apply(null,dt.map(function(Et){return Math.min(Et.x0,Et.x1)}))):tt=je=zf.mean(dt.map(function(Et){return(Et.x0+Et.x1)/2}))-lt/2;var Ue=M._offset,Ae=T._offset;Ht+=Ae,tt+=Ue,je+=Ue-lt,nr+=Ae-mt;var rt,St;return tt+lt<E&&tt>=0?rt=tt:je+lt<E&&je>=0?rt=je:Ue+lt<E?rt=Ue:tt-st<st-je+lt?rt=E-lt:rt=0,rt+=sl,Ht+mt<z&&Ht>=0?St=Ht:nr+mt<z&&nr>=0?St=nr:Ae+mt<z?St=Ae:Ht-ct<ct-nr+mt?St=z-mt:St=0,St+=sl,ce.attr("transform",jB(rt-1,St-1)),ce}var Tt=s.selectAll("g.hovertext").data(e,function(dt){return Gle(dt)});return Tt.enter().append("g").classed("hovertext",!0).each(function(){var dt=jb.select(this);dt.append("rect").call(vd.fill,vd.addOpacity(o,.8)),dt.append("text").classed("name",!0),dt.append("path").style("stroke-width","1px"),dt.append("text").classed("nums",!0).call(Am.font,{weight:h,style:d,variant:v,textcase:m,lineposition:b,shadow:p,family:c,size:f})}),Tt.exit().remove(),Tt.each(function(dt){var Et=jb.select(this).attr("transform",""),pt=dt.color;Array.isArray(pt)&&(pt=pt[dt.eventData[0].pointNumber]);var Xt=dt.bgcolor||pt,or=vd.combine(vd.opacity(Xt)?Xt:vd.defaultLine,o),_r=vd.combine(vd.opacity(pt)?pt:vd.defaultLine,o),Er=dt.borderColor||vd.contrast(or),ei=qle(dt,q,i,n,C,Et),qr=ei[0],jr=ei[1],gt=Et.select("text.nums").call(Am.font,{family:dt.fontFamily||c,size:dt.fontSize||f,color:dt.fontColor||Er,weight:dt.fontWeight||h,style:dt.fontStyle||d,variant:dt.fontVariant||v,textcase:dt.fontTextcase||m,lineposition:dt.fontLineposition||b,shadow:dt.fontShadow||p}).text(qr).attr("data-notex",1).call(A0.positionText,0,0).call(A0.convertToTspans,r),Ge=Et.select("text.name"),Je=0,We=0;if(jr&&jr!==qr){Ge.call(Am.font,{family:dt.fontFamily||c,size:dt.fontSize||f,color:_r,weight:dt.fontWeight||h,style:dt.fontStyle||d,variant:dt.fontVariant||v,textcase:dt.fontTextcase||m,lineposition:dt.fontLineposition||b,shadow:dt.fontShadow||p}).text(jr).attr("data-notex",1).call(A0.positionText,0,0).call(A0.convertToTspans,r);var et=Q3(r,Ge.node());Je=et.width+2*sl,We=et.height+2*sl}else Ge.remove(),Et.select("rect").remove();Et.select("path").style({fill:or,stroke:Er});var xt=dt.xa._offset+(dt.x0+dt.x1)/2,At=dt.ya._offset+(dt.y0+dt.y1)/2,Kt=Math.abs(dt.x1-dt.x0),er=Math.abs(dt.y1-dt.y0),Sr=Q3(r,gt.node()),Gr=Sr.width/n._invScaleX,Ir=Sr.height/n._invScaleY;dt.ty0=(P-Sr.top)/n._invScaleY,dt.bx=Gr+2*sl,dt.by=Math.max(Ir+2*sl,We),dt.anchor="start",dt.txwidth=Gr,dt.tx2width=Je,dt.offset=0;var Yr=(Gr+Qc+sl+Je)*n._invScaleX,_i,Pi;if(a)dt.pos=xt,_i=At+er/2+Yr<=z,Pi=At-er/2-Yr>=0,(dt.idealAlign==="top"||!_i)&&Pi?(At-=er/2,dt.anchor="end"):_i?(At+=er/2,dt.anchor="start"):dt.anchor="middle",dt.crossPos=At;else{if(dt.pos=At,_i=xt+Kt/2+Yr<=E,Pi=xt-Kt/2-Yr>=0,(dt.idealAlign==="left"||!_i)&&Pi)xt-=Kt/2,dt.anchor="end";else if(_i)xt+=Kt/2,dt.anchor="start";else{dt.anchor="middle";var ai=Yr/2,mi=xt+ai-E,un=xt-ai;mi>0&&(xt-=mi),un<0&&(xt+=-un)}dt.crossPos=xt}gt.attr("text-anchor",dt.anchor),Je&&Ge.attr("text-anchor",dt.anchor),Et.attr("transform",jB(xt,At)+(a?yut(Vle):""))}),{hoverLabels:Tt,commonLabelBoundingBox:H}}function qle(e,t,r,n,i,a){var f,h;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=zf.templateString(e.name,e.trace._meta)),o=Nle(e.name,e.nameLength));var l=r.charAt(0),u=l==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+="x: "+e.xLabel+"<br>"),e.yLabel!==void 0&&(s+="y: "+e.yLabel+"<br>"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===i?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"<br>":"")+e.text),e.extraText!==void 0&&(s+=(s?"<br>":"")+e.extraText),a&&s===""&&!e.hovertemplate&&(o===""&&a.remove(),s=o),(h=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&h.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let d=e.hovertemplateLabels||e;e[l+"Label"]!==i&&(d[l+"other"]=d[l+"Val"],d[l+"otherLabel"]=d[l+"Label"]),s=zf.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:d,locale:n._d3locale,template:c}),s=s.replace(Cut,(v,m)=>(o=Nle(m,e.nameLength),""))}return[s,o]}function Lut(e,t,r,n){var i=t?"xa":"ya",a=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,h=n.maxX,d=n.minY,v=n.maxY,m=function(Z){return Z*r._invScaleX},b=function(Z){return Z*r._invScaleY};e.each(function(Z){var j=Z[i],N=Z[a],H=j._id.charAt(0)==="x",re=j.range;c===0&&re&&re[0]>re[1]!==H&&(s=-1);var oe=0,_e=H?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var ke=jle(Z,t),Ce=Z.anchor,ge=Ce==="end"?-1:1,ie,Se;if(Ce==="middle")ie=Z.crossPos+(H?b(ke.y-Z.by/2):m(Z.bx/2+Z.tx2width/2)),Se=ie+(H?b(Z.by):m(Z.bx));else if(H)ie=Z.crossPos+b(Qc+ke.y)-b(Z.by/2-Qc),Se=ie+b(Z.by);else{var Ee=m(ge*Qc+ke.x),we=Ee+m(ge*Z.bx);ie=Z.crossPos+Math.min(Ee,we),Se=Z.crossPos+Math.max(Ee,we)}H?d!==void 0&&v!==void 0&&Math.min(Se,v)-Math.max(ie,d)>1&&(N.side==="left"?(oe=N._mainLinePosition,_e=r.width):_e=N._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(Se,h)-Math.max(ie,f)>1&&(N.side==="top"?(oe=N._mainLinePosition,_e=r.height):_e=N._mainLinePosition)}u[c++]=[{datum:Z,traceIndex:Z.trace.index,dp:0,pos:Z.pos,posref:Z.posref,size:Z.by*(H?Aut:1)/2,pmin:oe,pmax:_e}]}),u.sort(function(Z,j){return Z[0].posref-j[0].posref||s*(j[0].traceIndex-Z[0].traceIndex)});var p,k,M,T,L,x,C;function S(Z){var j=Z[0],N=Z[Z.length-1];if(k=j.pmin-j.pos-j.dp+j.size,M=N.pos+N.dp+N.size-j.pmax,k>.01){for(L=Z.length-1;L>=0;L--)Z[L].dp+=k;p=!1}if(!(M<.01)){if(k<-.01){for(L=Z.length-1;L>=0;L--)Z[L].dp-=M;p=!1}if(p){var H=0;for(T=0;T<Z.length;T++)x=Z[T],x.pos+x.dp+x.size>j.pmax&&H++;for(T=Z.length-1;T>=0&&!(H<=0);T--)x=Z[T],x.pos>j.pmax-1&&(x.del=!0,H--);for(T=0;T<Z.length&&!(H<=0);T++)if(x=Z[T],x.pos<j.pmin+1)for(x.del=!0,H--,M=x.size*2,L=Z.length-1;L>=0;L--)Z[L].dp-=M;for(T=Z.length-1;T>=0&&!(H<=0);T--)x=Z[T],x.pos+x.dp+x.size>j.pmax&&(x.del=!0,H--)}}}for(;!p&&o<=l;){for(o++,p=!0,T=0;T<u.length-1;){var g=u[T],P=u[T+1],E=g[g.length-1],z=P[0];if(k=E.pos+E.dp+E.size-z.pos-z.dp+z.size,k>.01){for(L=P.length-1;L>=0;L--)P[L].dp+=k;for(g.push.apply(g,P),u.splice(T+1,1),C=0,L=g.length-1;L>=0;L--)C+=g[L].dp;for(M=C/g.length,L=g.length-1;L>=0;L--)g[L].dp-=M;p=!1}else T++}u.forEach(S)}for(T=u.length-1;T>=0;T--){var q=u[T];for(L=q.length-1;L>=0;L--){var U=q[L],G=U.datum;G.offset=U.dp,G.del=U.del}}}function jle(e,t){var r=0,n=e.offset;return t&&(n*=-Mut,r=e.offset*Sut),{x:r,y:n}}function Put(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Qc+sl),n=r+t*(e.txwidth+sl),i=e.anchor==="middle";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+sl),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Wle(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=jb.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=Put(o),h=jle(o,t),d=h.x,v=h.y,m=u==="middle",b="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,p;m?p="M-"+i(o.bx/2+o.tx2width/2)+","+a(v-o.by/2)+"h"+i(o.bx)+"v"+a(o.by)+"h-"+i(o.bx)+"Z":b?p="M0,0L"+i(c*Qc+d)+","+a(Qc+v)+"v"+a(o.by/2-Qc)+"h"+i(c*o.bx)+"v-"+a(o.by)+"H"+i(c*Qc+d)+"V"+a(v-Qc)+"Z":p="M"+i(c*Qc+d)+","+a(v-o.by/2)+"h"+i(c*o.bx)+"v"+a(o.by)+"h"+i(-c*o.bx)+"Z",s.select("path").attr("d",p);var k=d+f.textShiftX,M=v+o.ty0-o.by/2+sl,T=o.textAlign||"auto";T!=="auto"&&(T==="left"&&u!=="start"?(l.attr("text-anchor","start"),k=m?-o.bx/2-o.tx2width/2+sl:-o.bx-sl):T==="right"&&u!=="end"&&(l.attr("text-anchor","end"),k=m?o.bx/2-o.tx2width/2-sl:o.bx+sl)),l.call(A0.positionText,i(k),a(M)),o.tx2width&&(s.select("text.name").call(A0.positionText,i(f.text2ShiftX+f.alignShift*sl+d),a(v+o.ty0-o.by/2+sl)),s.select("rect").call(Am.setRect,i(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+d),a(v-o.by/2-1),i(o.tx2width),a(o.by+2)))})}function Iut(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||Py(h)&&h===0}var s=Array.isArray(r)?function(h,d){var v=zf.castOption(i,r,h);return o(v)?v:zf.extractOption({},n,"",d)}:function(h,d){return zf.extractOption(a,n,h,d)};function l(h,d,v){var m=s(d,v);o(m)&&(e[h]=m)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=zf.constrain(e.x0,0,e.xa._length),e.x1=zf.constrain(e.x1,0,e.xa._length),e.y0=zf.constrain(e.y0,0,e.ya._length),e.y1=zf.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Sm.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Sm.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=Sm.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Sm.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var c=Sm.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+Sm.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+c,t==="y"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!=="all"&&(f=Array.isArray(f)?f:f.split("+"),f.indexOf("x")===-1&&(e.xLabel=void 0),f.indexOf("y")===-1&&(e.yLabel=void 0),f.indexOf("z")===-1&&(e.zLabel=void 0),f.indexOf("text")===-1&&(e.text=void 0),f.indexOf("name")===-1&&(e.name=void 0)),e}function Ole(e,t,r){var n=r.container,i=r.fullLayout,a=i._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(".spikeline").remove(),!!(l||s)){var f=vd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,v;u=h&&h.xa,c=h&&h.ya;var m=c.spikesnap;m==="cursor"?(d=o.pointerX,v=o.pointerY):(d=u._offset+h.x,v=c._offset+h.y);var b=Dle.readability(h.color,f)<1.5?vd.contrast(f):h.color,p=c.spikemode,k=c.spikethickness,M=c.spikecolor||b,T=Sm.getPxPosition(e,c),L,x;if(p.indexOf("toaxis")!==-1||p.indexOf("across")!==-1){if(p.indexOf("toaxis")!==-1&&(L=T,x=d),p.indexOf("across")!==-1){var C=c._counterDomainMin,S=c._counterDomainMax;c.anchor==="free"&&(C=Math.min(C,c.position),S=Math.max(S,c.position)),L=a.l+C*a.w,x=a.l+S*a.w}n.insert("line",":first-child").attr({x1:L,x2:x,y1:v,y2:v,"stroke-width":k,stroke:M,"stroke-dasharray":Am.dashStyle(c.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:x,y1:v,y2:v,"stroke-width":k+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}p.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:T+(c.side!=="right"?k:-k),cy:v,r:k,fill:M}).classed("spikeline",!0)}if(l){var g=t.vLinePoint,P,E;u=g&&g.xa,c=g&&g.ya;var z=u.spikesnap;z==="cursor"?(P=o.pointerX,E=o.pointerY):(P=u._offset+g.x,E=c._offset+g.y);var q=Dle.readability(g.color,f)<1.5?vd.contrast(f):g.color,U=u.spikemode,G=u.spikethickness,Z=u.spikecolor||q,j=Sm.getPxPosition(e,u),N,H;if(U.indexOf("toaxis")!==-1||U.indexOf("across")!==-1){if(U.indexOf("toaxis")!==-1&&(N=j,H=E),U.indexOf("across")!==-1){var re=u._counterDomainMin,oe=u._counterDomainMax;u.anchor==="free"&&(re=Math.min(re,u.position),oe=Math.max(oe,u.position)),N=a.t+(1-oe)*a.h,H=a.t+(1-re)*a.h}n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:H,"stroke-width":G,stroke:Z,"stroke-dasharray":Am.dashStyle(u.spikedash,G)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:H,"stroke-width":G+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}U.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:P,cy:j-(u.side!=="top"?G:-G),r:G,fill:Z}).classed("spikeline",!0)}}}function Rut(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=e._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers)||i.binNumber!==a.binNumber)return!0}return!1}function Ble(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Nle(e,t){return A0.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Dut(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;o<e.length;o++){var s=e[o];eT.traceIs(s.trace,"bar-like")||eT.traceIs(s.trace,"box-violin")?a.push(s):s.trace[r+"period"]?i.push(s):n.push(s)}return n.concat(i).concat(a)}function Ule(e,t,r){var n=t[e+"a"],i=t[e+"Val"],a=t.cd[0];if(n.type==="category"||n.type==="multicategory")i=n._categoriesMap[i];else if(n.type==="date"){var o=t.trace[e+"periodalignment"];if(o){var s=t.cd[t.index],l=s[e+"Start"];l===void 0&&(l=s[e]);var u=s[e+"End"];u===void 0&&(u=s[e]);var c=u-l;o==="end"?i+=c:o==="middle"&&(i+=c/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&(r.boxmode==="group"||r.violinmode==="group")&&(i+=a.t.dPos),i}var Xle=e=>e.offsetTop+e.clientTop,Zle=e=>e.offsetLeft+e.clientLeft;function Q3(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,a=n.top,o=i+n.width,s=a+n.height,l=zf.apply3DTransform(r._invTransform)(i,a),u=zf.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],h=u[0],d=u[1];return{x:c,y:f,width:h-c,height:d-f,top:Math.min(f,d),left:Math.min(c,h),right:Math.max(c,h),bottom:Math.max(f,d)}}});var _M=ye((Dar,Yle)=>{"use strict";var Fut=Pr(),zut=ka(),qut=ip().isUnifiedHover;Yle.exports=function(t,r,n,i){i=i||{};var a=r.legend;function o(s){i.font[s]||(i.font[s]=a?r.legend.font[s]:r.font[s])}r&&qut(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(i.bgcolor||(i.bgcolor=zut.combine(r.legend.bgcolor,r.paper_bgcolor)),i.bordercolor||(i.bordercolor=r.legend.bordercolor)):i.bgcolor||(i.bgcolor=r.paper_bgcolor)),n("hoverlabel.bgcolor",i.bgcolor),n("hoverlabel.bordercolor",i.bordercolor),n("hoverlabel.namelength",i.namelength),n("hoverlabel.showarrow",i.showarrow),Fut.coerceFont(n,"hoverlabel.font",i.font),n("hoverlabel.align",i.align)}});var Jle=ye((Far,Kle)=>{"use strict";var Out=Pr(),But=_M(),Nut=W1();Kle.exports=function(t,r){function n(i,a){return Out.coerce(t,r,Nut,i,a)}But(t,r,n)}});var eue=ye((zar,Qle)=>{"use strict";var $le=Pr(),Uut=p3(),Vut=_M();Qle.exports=function(t,r,n,i){function a(s,l){return $le.coerce(t,r,Uut,s,l)}var o=$le.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Vut(t,r,a,o)}});var YB=ye((qar,tue)=>{"use strict";var Gut=Pr(),Hut=W1();tue.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:Gut.coerce(t,r,Hut,i,a)}return n("clickmode"),n("hoversubplots"),n("hoveranywhere"),n("clickanywhere"),n("hovermode")}});var nue=ye((Oar,iue)=>{"use strict";var rue=Pr(),jut=W1(),Wut=YB(),Xut=_M();iue.exports=function(t,r){function n(c,f){return rue.coerce(t,r,jut,c,f)}var i=Wut(t,r);i&&(n("hoverdistance"),n("spikedistance"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=r._has("mapbox"),s=r._has("map"),l=r._has("geo"),u=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s||l)&&u===1||(o||s)&&l&&u===2)&&(r.dragmode="pan"),Xut(t,r,n),rue.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var sue=ye((Bar,oue)=>{"use strict";var KB=Pr(),aue=Oa();oue.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(u){return function(c){return KB.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var a=0;a<r.length;a++){var o=r[a],s=o[0].trace;if(!aue.traceIs(s,"pie-like")){var l=aue.traceIs(s,"2dMap")?Zut:KB.fillArray;l(s.hoverinfo,o,"hi",i(s)),s.hovertemplate&&l(s.hovertemplate,o,"ht"),s.hoverlabel&&(l(s.hoverlabel.bgcolor,o,"hbg"),l(s.hoverlabel.bordercolor,o,"hbc"),l(s.hoverlabel.font.size,o,"hts"),l(s.hoverlabel.font.color,o,"htc"),l(s.hoverlabel.font.family,o,"htf"),l(s.hoverlabel.font.weight,o,"htw"),l(s.hoverlabel.font.style,o,"hty"),l(s.hoverlabel.font.variant,o,"htv"),l(s.hoverlabel.namelength,o,"hnl"),l(s.hoverlabel.align,o,"hta"),l(s.hoverlabel.showarrow,o,"htsa"))}}};function Zut(e,t,r,n){n=n||KB.identity,Array.isArray(e)&&(t[0][r]=n(e))}});var uue=ye((Nar,lue)=>{"use strict";var Yut=Oa(),Kut=ZB().hover;lue.exports=function(t,r,n){var i=Yut.getComponentMethod("annotations","onClick")(t,t._hoverdata),a=t._fullLayout;n!==void 0&&Kut(t,r,n,!0);function o(){var l,u,c,f;var s={points:t._hoverdata,event:r};(l=s.xaxes)!=null||(s.xaxes=t._hoverXAxes),(u=s.yaxes)!=null||(s.yaxes=t._hoverYAxes),(c=s.xvals)!=null||(s.xvals=t._hoverXVals),(f=s.yvals)!=null||(s.yvals=t._hoverYVals),t.emit("plotly_click",s)}(t._hoverdata||a.clickanywhere)&&r&&r.target&&(t._hoverdata||(t._hoverdata=[]),i&&i.then?i.then(o):o(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var vf=ye((Uar,hue)=>{"use strict";var Jut=qa(),JL=Pr(),$ut=yv(),xM=ip(),cue=W1(),fue=ZB();hue.exports={moduleType:"component",name:"fx",constants:NS(),schema:{layout:cue},attributes:p3(),layoutAttributes:cue,supplyLayoutGlobalDefaults:Jle(),supplyDefaults:eue(),supplyLayoutDefaults:nue(),calc:sue(),getDistanceFunction:xM.getDistanceFunction,getClosest:xM.getClosest,inbox:xM.inbox,quadrature:xM.quadrature,appendArrayPointValue:xM.appendArrayPointValue,castHoverOption:ect,castHoverinfo:tct,hover:fue.hover,unhover:$ut.unhover,loneHover:fue.loneHover,loneUnhover:Qut,click:uue()};function Qut(e){var t=JL.isD3Selection(e)?e:Jut.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function ect(e,t,r){return JL.castOption(e,t,"hoverlabel."+r)}function tct(e,t,r){function n(i){return JL.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return JL.castOption(e,r,"hoverinfo",n)}});var Cg=ye(Iy=>{"use strict";Iy.selectMode=function(e){return e==="lasso"||e==="select"};Iy.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Iy.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Iy.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Iy.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Iy.selectingOrDrawing=function(e){return Iy.freeMode(e)||Iy.rectMode(e)}});var bM=ye((Gar,due)=>{"use strict";due.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var $L=ye((Har,vue)=>{"use strict";vue.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect fill='#000' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle fill='#9EF' cx='102' cy='30' r='6'/>"," <circle fill='#BAC' cx='78' cy='30' r='6'/>"," <circle fill='#BAC' cx='78' cy='54' r='6'/>"," <circle fill='#D69' cx='54' cy='30' r='6'/>"," <circle fill='#F26' cx='30' cy='30' r='6'/>"," <circle fill='#F26' cx='30' cy='54' r='6'/>"," <path fill='#FFF' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path fill='#FFF' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path fill='#FFF' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path fill='#FFF' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}});var eP=ye((jar,pue)=>{"use strict";var QL=32;pue.exports={CIRCLE_SIDES:QL,i000:0,i090:QL/4,i180:QL/2,i270:QL/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var tP=ye((War,mue)=>{"use strict";var rct=Pr().strTranslate;function gue(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function ict(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 nct(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return gue(e,r[t])}}function act(e){return rct(e.xaxis._offset,e.yaxis._offset)}mue.exports={p2r:gue,r2p:ict,axValue:nct,getTransform:act}});var m_=ye(Ry=>{"use strict";var oct=nM(),xue=eP(),tT=xue.CIRCLE_SIDES,JB=xue.SQRT2,bue=tP(),yue=bue.p2r,_ue=bue.r2p,sct=[0,3,4,5,6,1,2],lct=[0,3,4,1,2];Ry.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n<t;n++)for(var i=e[n].length,a=0;a<i;a++){var o=e[n][a][0];if(o==="Z")r+="Z";else for(var s=e[n][a].length,l=0;l<s;l++){var u=l;o==="Q"||o==="S"?u=lct[l]:o==="C"&&(u=sct[l]),r+=e[n][a][u],l>0&&l<s-1&&(r+=",")}}return r};Ry.readPaths=function(e,t,r,n){var i=oct(e),a=[],o=-1,s=function(){o++,a[o]=[]},l,u=0,c=0,f,h,d=function(){f=u,h=c};d();for(var v=0;v<i.length;v++){var m=[],b,p,k,M,T=i[v][0],L=T;switch(T){case"M":s(),u=+i[v][1],c=+i[v][2],m.push([L,u,c]),d();break;case"Q":case"S":b=+i[v][1],k=+i[v][2],u=+i[v][3],c=+i[v][4],m.push([L,u,c,b,k]);break;case"C":b=+i[v][1],k=+i[v][2],p=+i[v][3],M=+i[v][4],u=+i[v][5],c=+i[v][6],m.push([L,u,c,b,k,p,M]);break;case"T":case"L":u=+i[v][1],c=+i[v][2],m.push([L,u,c]);break;case"H":L="L",u=+i[v][1],m.push([L,u,c]);break;case"V":L="L",c=+i[v][1],m.push([L,u,c]);break;case"A":L="L";var x=+i[v][1],C=+i[v][2];+i[v][4]||(x=-x,C=-C);var S=u-x,g=c;for(l=1;l<=tT/2;l++){var P=2*Math.PI*l/tT;m.push([L,S+x*Math.cos(P),g+C*Math.sin(P)])}break;case"Z":(u!==f||c!==h)&&(u=f,c=h,m.push([L,u,c]));break}for(var E=(r||{}).domain,z=t._fullLayout._size,q=r&&r.xsizemode==="pixel",U=r&&r.ysizemode==="pixel",G=n===!1,Z=0;Z<m.length;Z++){for(l=0;l+2<7;l+=2){var j=m[Z][l+1],N=m[Z][l+2];j===void 0||N===void 0||(u=j,c=N,r&&(r.xaxis&&r.xaxis.p2r?(G&&(j-=r.xaxis._offset),q?j=_ue(r.xaxis,r.xanchor)+j:j=yue(r.xaxis,j)):(G&&(j-=z.l),E?j=E.x[0]+j/z.w:j=j/z.w),r.yaxis&&r.yaxis.p2r?(G&&(N-=r.yaxis._offset),U?N=_ue(r.yaxis,r.yanchor)-N:N=yue(r.yaxis,N)):(G&&(N-=z.t),E?N=E.y[1]-N/z.h:N=1-N/z.h)),m[Z][l+1]=j,m[Z][l+2]=N)}a[o].push(m[Z].slice())}}return a};function wM(e,t){return Math.abs(e-t)<=1e-6}function rP(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}Ry.pointsOnRectangle=function(e){var t=e.length;if(t!==5)return!1;for(var r=1;r<3;r++){var n=e[0][r]-e[1][r],i=e[3][r]-e[2][r];if(!wM(n,i))return!1;var a=e[0][r]-e[3][r],o=e[1][r]-e[2][r];if(!wM(a,o))return!1}return!wM(e[0][1],e[1][1])&&!wM(e[0][1],e[3][1])?!1:!!(rP(e[0],e[1])*rP(e[0],e[3]))};Ry.pointsOnEllipse=function(e){var t=e.length;if(t!==tT+1)return!1;t=tT;for(var r=0;r<t;r++){var n=(t*2-r)%t,i=(t/2+n)%t,a=(t/2+r)%t;if(!wM(rP(e[r],e[a]),rP(e[n],e[i])))return!1}return!0};Ry.handleEllipse=function(e,t,r){if(!e)return[t,r];var n=Ry.ellipseOver({x0:t[0],y0:t[1],x1:r[0],y1:r[1]}),i=(n.x1+n.x0)/2,a=(n.y1+n.y0)/2,o=(n.x1-n.x0)/2,s=(n.y1-n.y0)/2;o||(o=s=s/JB),s||(s=o=o/JB);for(var l=[],u=0;u<tT;u++){var c=u*2*Math.PI/tT;l.push([i+o*Math.cos(c),a+s*Math.sin(c)])}return l};Ry.ellipseOver=function(e){var t=e.x0,r=e.y0,n=e.x1,i=e.y1,a=n-t,o=i-r;t-=a,r-=o;var s=(t+n)/2,l=(r+i)/2,u=JB;return a*=u,o*=u,{x0:s-a,y0:l-o,x1:s+a,y1:l+o}};Ry.fixDatesForPaths=function(e,t,r){var n=t.type==="date",i=r.type==="date";if(!n&&!i)return e;for(var a=0;a<e.length;a++)for(var o=0;o<e[a].length;o++)for(var s=0;s+2<e[a][o].length;s+=2)n&&(e[a][o][s+1]=e[a][o][s+1].replace(" ","_")),i&&(e[a][o][s+2]=e[a][o][s+2].replace(" ","_"));return e}});var aP=ye((Zar,Lue)=>{"use strict";var wue=hf(),Eue=Cg(),uct=Eue.drawMode,cct=Eue.openMode,rT=eP(),Tue=rT.i000,Aue=rT.i090,Sue=rT.i180,Mue=rT.i270,fct=rT.cos45,hct=rT.sin45,kue=tP(),iP=kue.p2r,y_=kue.r2p,dct=o_(),vct=dct.clearOutline,nP=m_(),pct=nP.readPaths,gct=nP.writePaths,mct=nP.ellipseOver,yct=nP.fixDatesForPaths;function _ct(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(!uct(a)&&i!==void 0){var s=n._fullLayout._activeShapeIndex;if(s<o.length)switch(n._fullLayout.shapes[s].type){case"rect":a="drawrect";break;case"circle":a="drawcircle";break;case"line":a="drawline";break;case"path":var l=o[s].path||"";l[l.length-1]==="Z"?a="drawclosedpath":a="drawopenpath";break}}var u=Cue(e,t,a);vct(n);for(var c=t.editHelpers,f=(c||{}).modifyItem,h=[],d=0;d<o.length;d++){var v=n._fullLayout.shapes[d];if(h[d]=v._input,i!==void 0&&d===n._fullLayout._activeShapeIndex){var m=u;switch(v.type){case"line":case"rect":case"circle":var b=wue.getFromId(n,v.xref);v.xref.charAt(0)==="x"&&b.type.includes("category")?(f("x0",m.x0-(v.x0shift||0)),f("x1",m.x1-(v.x1shift||0))):(f("x0",m.x0),f("x1",m.x1));var p=wue.getFromId(n,v.yref);v.yref.charAt(0)==="y"&&p.type.includes("category")?(f("y0",m.y0-(v.y0shift||0)),f("y1",m.y1-(v.y1shift||0))):(f("y0",m.y0),f("y1",m.y1));break;case"path":f("path",m.path);break}}}return i===void 0?(h.push(u),h):c?c.getUpdateObj():{}}}}function Cue(e,t,r){var n=e[0][0],i=t.gd,a=n.getAttribute("d"),o=i._fullLayout.newshape,s=t.plotinfo,l=t.isActiveShape,u=s.xaxis,c=s.yaxis,f=!!s.domain||!s.xaxis,h=!!s.domain||!s.yaxis,d=cct(r),v=pct(a,i,s,l),m={editable:!0,visible:o.visible,name:o.name,showlegend:o.showlegend,legend:o.legend,legendwidth:o.legendwidth,legendgroup:o.legendgroup,legendgrouptitle:{text:o.legendgrouptitle.text,font:o.legendgrouptitle.font},legendrank:o.legendrank,label:o.label,xref:f?"paper":u._id,yref:h?"paper":c._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};d||(m.fillcolor=o.fillcolor,m.fillrule=o.fillrule);var b;if(v.length===1&&(b=v[0]),b&&b.length===5&&r==="drawrect")m.type="rect",m.x0=b[0][1],m.y0=b[0][2],m.x1=b[2][1],m.y1=b[2][2];else if(b&&r==="drawline")m.type="line",m.x0=b[0][1],m.y0=b[0][2],m.x1=b[1][1],m.y1=b[1][2];else if(b&&r==="drawcircle"){m.type="circle";var p=b[Tue][1],k=b[Aue][1],M=b[Sue][1],T=b[Mue][1],L=b[Tue][2],x=b[Aue][2],C=b[Sue][2],S=b[Mue][2],g=s.xaxis&&(s.xaxis.type==="date"||s.xaxis.type==="log"),P=s.yaxis&&(s.yaxis.type==="date"||s.yaxis.type==="log");g&&(p=y_(s.xaxis,p),k=y_(s.xaxis,k),M=y_(s.xaxis,M),T=y_(s.xaxis,T)),P&&(L=y_(s.yaxis,L),x=y_(s.yaxis,x),C=y_(s.yaxis,C),S=y_(s.yaxis,S));var E=(k+T)/2,z=(L+C)/2,q=(T-k+M-p)/2,U=(S-x+C-L)/2,G=mct({x0:E,y0:z,x1:E+q*fct,y1:z+U*hct});g&&(G.x0=iP(s.xaxis,G.x0),G.x1=iP(s.xaxis,G.x1)),P&&(G.y0=iP(s.yaxis,G.y0),G.y1=iP(s.yaxis,G.y1)),m.x0=G.x0,m.y0=G.y0,m.x1=G.x1,m.y1=G.y1}else m.type="path",u&&c&&yct(v,u,c),m.path=gct(v),b=null;return m}Lue.exports={newShapes:_ct,createShapeObj:Cue}});var QB=ye((Yar,Pue)=>{"use strict";var xct=Cg(),bct=xct.selectMode,wct=o_(),Tct=wct.clearOutline,$B=m_(),Act=$B.readPaths,Sct=$B.writePaths,Mct=$B.fixDatesForPaths;Pue.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var i=n.getAttribute("d"),a=r.gd,o=a._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,h=(a.layout||{}).selections||[];if(!bct(f)&&c!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d<h.length)switch(a._fullLayout.selections[d].type){case"rect":f="select";break;case"path":f="lasso";break}}var v=Act(i,a,s,c),m={xref:l._id,yref:u._id,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}},b;v.length===1&&(b=v[0]),b&&b.length===5&&f==="select"?(m.type="rect",m.x0=b[0][1],m.y0=b[0][2],m.x1=b[2][1],m.y1=b[2][2]):(m.type="path",l&&u&&Mct(v,l,u),m.path=Sct(v),b=null),Tct(a);for(var p=r.editHelpers,k=(p||{}).modifyItem,M=[],T=0;T<h.length;T++){var L=a._fullLayout.selections[T];if(!L){M[T]=L;continue}if(M[T]=L._input,c!==void 0&&T===a._fullLayout._activeSelectionIndex){var x=m;switch(L.type){case"rect":k("x0",x.x0),k("x1",x.x1),k("y0",x.y0),k("y1",x.y1);break;case"path":k("path",x.path);break}}}return c===void 0?(M.push(m),M):p?p.getUpdateObj():{}}}}});var TM=ye((Kar,Iue)=>{"use strict";Iue.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var x_=ye(Jd=>{"use strict";var Mm=TM(),Rue=Pr(),__=ho();Jd.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};Jd.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};Jd.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};Jd.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};Jd.extractPathCoords=function(e,t,r){var n=[],i=e.match(Mm.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.slice(1).match(Mm.paramRE);if(!(!s||s.length<o)){var l=s[o],u=r?l:Rue.cleanNumber(l);n.push(u)}}}),n};Jd.countDefiningCoords=function(e,t,r){if(e!=="path")return 2;if(!t)return 0;let n=t.match(Mm.segmentRE);if(!n)return 0;let i=r==="x"?Mm.paramIsX:Mm.paramIsY;return n.reduce((a,o)=>{let s=o.charAt(0),l=i[s].drawn!==void 0;return a+(l?1:0)},0)};Jd.getDataToPixel=function(e,t,r,n,i){var a=e._fullLayout._size,o;if(t)if(i==="domain")o=function(l){return t._length*(n?1-l:l)+t._offset};else{var s=Jd.shapePositionToRange(t);o=function(l){var u=Dy(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=Jd.decodeDate(o))}else n?o=function(l){return a.t+a.h*(1-l)}:o=function(l){return a.l+a.w*l};return o};Jd.getPixelToData=function(e,t,r,n){var i=e._fullLayout._size,a;if(t)if(n==="domain")a=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=Jd.rangeToShapePosition(t);a=function(s){return o(t.p2r(s-t._offset))}}else r?a=function(s){return 1-(s-i.t)/i.h}:a=function(s){return(s-i.l)/i.w};return a};Jd.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};Jd.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&r.xref!=="paper"&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}};Jd.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}};Jd.getPathString=function(e,t){let r=t.type,n=__.getRefType(t.xref),i=__.getRefType(t.yref),a=e._fullLayout._size;var o,s,l,u,c,f,h,d,v,m,b,p;function k(P,E,z,q){var U;if(P)if(E==="domain")q?U=function(G){return P._offset+P._length*(1-G)}:U=function(G){return P._offset+P._length*G};else{let G=Jd.shapePositionToRange(P);U=function(Z){return P._offset+P.r2p(G(Z,!0))},z==="path"&&P.type==="date"&&(U=Jd.decodeDate(U))}else q?U=function(G){return a.t+a.h*(1-G)}:U=function(G){return a.l+a.w*G};return U}if(n==="array"?(h=[],o=t.xref.map(function(P){return __.getFromId(e,P)}),h=t.xref.map(function(P,E){return k(o[E],__.getRefType(P),r,!1)})):(o=__.getFromId(e,t.xref),h=k(o,n,r,!1)),i==="array"?(d=[],s=t.yref.map(function(P){return __.getFromId(e,P)}),d=t.yref.map(function(P,E){return k(s[E],__.getRefType(P),r,!0)})):(s=__.getFromId(e,t.yref),d=k(s,i,r,!0)),r==="path")return Ect(t,h,d);if(n==="array")l=Dy(o[0],t.x0shift),u=Dy(o[1],t.x1shift),v=h[0](t.x0)+l,m=h[1](t.x1)+u;else if(l=Dy(o,t.x0shift),u=Dy(o,t.x1shift),t.xsizemode==="pixel"){let P=h(t.xanchor);v=P+t.x0+l,m=P+t.x1+u}else v=h(t.x0)+l,m=h(t.x1)+u;if(i==="array")c=Dy(s[0],t.y0shift),f=Dy(s[1],t.y1shift),b=d[0](t.y0)+c,p=d[1](t.y1)+f;else if(c=Dy(s,t.y0shift),f=Dy(s,t.y1shift),t.ysizemode==="pixel"){let P=d(t.yanchor);b=P-t.y0+c,p=P-t.y1+f}else b=d(t.y0)+c,p=d(t.y1)+f;if(r==="line")return"M"+v+","+b+"L"+m+","+p;if(r==="rect")return"M"+v+","+b+"H"+m+"V"+p+"H"+v+"Z";var M=(v+m)/2,T=(b+p)/2,L=Math.abs(M-v),x=Math.abs(T-b),C="A"+L+","+x,S=M+L+","+T,g=M+","+(T-x);return"M"+S+C+" 0 1,1 "+g+C+" 0 0,1 "+S+"Z"};function Ect(e,t,r){let n=e.path,i=e.xsizemode,a=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return n.replace(Mm.segmentRE,function(h){var d=0,v=h.charAt(0),m=Mm.paramIsX[v],b=Mm.paramIsY[v],p=Mm.numParams[v];let k=m.drawn!==void 0,M=b.drawn!==void 0,T=l?t[c]:t,L=u?r[f]:r;var x=h.slice(1).replace(Mm.paramRE,function(C){return m[d]?i==="pixel"?C=T(o)+Number(C):C=T(C):b[d]&&(a==="pixel"?C=L(s)-Number(C):C=L(C)),d++,d>p&&(C="X"),C});return d>p&&(x=x.replace(/[\s,]*X.*/,""),Rue.log("Ignoring extra params in segment "+h)),k&&c++,M&&f++,v+x})}function Dy(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var tN=ye(($ar,zue)=>{"use strict";var kct=Pr(),Em=ho(),Due=Zl(),Fue=So(),Cct=m_().readPaths,eN=x_(),Lct=eN.getPathString,AM=D6(),Pct=Dh().FROM_TL;zue.exports=function(t,r,n,i){if(i.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var a;if(n.label.texttemplate){var o={};if(n.type!=="path"){var s=Em.getFromId(t,n.xref),l=Em.getFromId(t,n.yref);let oe=Array.isArray(n.xref),_e=Array.isArray(n.yref);for(var u in AM){var c=typeof AM[u]=="function",f=!oe||AM.simpleXVariables.includes(u),h=!_e||AM.simpleYVariables.includes(u);if(c&&f&&h){var d=AM[u](n,s,l);d!==void 0&&(o[u]=d)}}}a=kct.texttemplateStringForShapes({data:[o],fallback:n.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:n.label.texttemplate})}else a=n.label.text;var v={"data-index":r},m=n.label.font,b={"data-notex":1},p=i.append("g").attr(v).classed("shape-label",!0),k=p.append("text").attr(b).classed("shape-label-text",!0).text(a),M,T,L,x;if(n.path){var C=Lct(t,n),S=Cct(C,t);M=1/0,L=1/0,T=-1/0,x=-1/0;for(var g=0;g<S.length;g++)for(var P=0;P<S[g].length;P++)for(var E=S[g][P],z=1;z<E.length;z+=2){var q=E[z],U=E[z+1];M=Math.min(M,q),T=Math.max(T,q),L=Math.min(L,U),x=Math.max(x,U)}}else{let oe=Array.isArray(n.xref),_e=Array.isArray(n.yref),ke=Em.getFromId(t,oe?n.xref[0]:n.xref),Ce=Em.getFromId(t,oe?n.xref[1]:n.xref),ge=Em.getFromId(t,_e?n.yref[0]:n.yref),ie=Em.getFromId(t,_e?n.yref[1]:n.yref),Se=Em.getRefType(oe?n.xref[0]:n.xref),Ee=Em.getRefType(oe?n.xref[1]:n.xref),we=Em.getRefType(_e?n.yref[0]:n.yref),De=Em.getRefType(_e?n.yref[1]:n.yref),Le=function(Pe,ce,He,lt){return eN.getDataToPixel(t,He,ce,!1,lt)(Pe)},me=function(Pe,ce,He,lt){return eN.getDataToPixel(t,He,ce,!0,lt)(Pe)};M=Le(n.x0,n.x0shift,ke,Se),T=Le(n.x1,n.x1shift,Ce,Ee),L=me(n.y0,n.y0shift,ge,we),x=me(n.y1,n.y1shift,ie,De)}var G=n.label.textangle;G==="auto"&&(n.type==="line"?G=Ict(M,L,T,x):G=0),k.call(function(oe){return oe.call(Fue.font,m).attr({}),Due.convertToTspans(oe,t),oe});var Z=Fue.bBox(k.node()),j=Rct(M,L,T,x,n,G,Z),N=j.textx,H=j.texty,re=j.xanchor;k.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[re],y:H,x:N,transform:"rotate("+G+","+N+","+H+")"}).call(Due.positionText,N,H)}};function Ict(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 Rct(e,t,r,n,i,a,o){var s=i.label.textposition,l=i.label.textangle,u=i.label.padding,c=i.type,f=Math.PI/180*a,h=Math.sin(f),d=Math.cos(f),v=i.label.xanchor,m=i.label.yanchor,b,p,k,M;if(c==="line"){s==="start"?(b=e,p=t):s==="end"?(b=r,p=n):(b=(e+r)/2,p=(t+n)/2),v==="auto"&&(s==="start"?l==="auto"?r>e?v="left":r<e?v="right":v="center":r>e?v="right":r<e?v="left":v="center":s==="end"?l==="auto"?r>e?v="right":r<e?v="left":v="center":r>e?v="left":r<e?v="right":v="center":v="center");var T={left:1,center:0,right:-1},L={bottom:-1,middle:0,top:1};if(l==="auto"){var x=L[m];k=-u*h*x,M=u*d*x}else{var C=T[v],S=L[m];k=u*C,M=u*S}b=b+k,p=p+M}else k=u+3,s.indexOf("right")!==-1?(b=Math.max(e,r)-k,v==="auto"&&(v="right")):s.indexOf("left")!==-1?(b=Math.min(e,r)+k,v==="auto"&&(v="left")):(b=(e+r)/2,v==="auto"&&(v="center")),s.indexOf("top")!==-1?p=Math.min(t,n):s.indexOf("bottom")!==-1?p=Math.max(t,n):p=(t+n)/2,M=u,m==="bottom"?p=p-M:m==="top"&&(p=p+M);var g=Pct[m],P=i.label.font.size,E=o.height,z=(E*g-P)*h,q=-(E*g-P)*d;return{textx:b+z,texty:p+q,xanchor:v}}});var lP=ye((Qar,Hue)=>{"use strict";var Dct=Pr(),Fct=Dct.strTranslate,que=yv(),Nue=Cg(),zct=Nue.drawMode,Uue=Nue.selectMode,Vue=Oa(),Oue=ka(),sP=eP(),qct=sP.i000,Oct=sP.i090,Bct=sP.i180,Nct=sP.i270,Uct=o_(),Gue=Uct.clearOutlineControllers,iN=m_(),oP=iN.pointsOnRectangle,rN=iN.pointsOnEllipse,Vct=iN.writePaths,Gct=aP().newShapes,Hct=aP().createShapeObj,jct=QB(),Wct=tN();Hue.exports=function e(t,r,n,i){i||(i=0);var a=n.gd;function o(){e(t,r,n,i++),(rN(t[0])||n.hasText)&&s({redrawing:!0})}function s(j){var N={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,N=Gct(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,N=jct(r,n),a._fullLayout._reselect=!0),Object.keys(N).length&&Vue.call((j||{}).redrawing?"relayout":"_guiRelayout",a,N)}var l=a._fullLayout,u=l._zoomlayer,c=n.dragmode,f=zct(c),h=Uue(c);(f||h)&&(a._fullLayout._outlining=!0),Gue(a),r.attr("d",Vct(t));var d,v,m,b,p;if(!i&&(n.isActiveShape||n.isActiveSelection)){p=Xct([],t);var k=u.append("g").attr("class","outline-controllers");P(k),Z()}if(f&&n.hasText){var M=u.select(".label-temp"),T=Hct(r,n,n.dragmode);Wct(a,"label-temp",T,M)}function L(j){m=+j.srcElement.getAttribute("data-i"),b=+j.srcElement.getAttribute("data-j"),d[m][b].moveFn=x}function x(j,N){if(t.length){var H=p[m][b][1],re=p[m][b][2],oe=t[m],_e=oe.length;if(oP(oe)){var ke=j,Ce=N;if(n.isActiveSelection){var ge=Bue(oe,b);ge[1]===oe[b][1]?Ce=0:ke=0}for(var ie=0;ie<_e;ie++)if(ie!==b){var Se=oe[ie];Se[1]===oe[b][1]&&(Se[1]=H+ke),Se[2]===oe[b][2]&&(Se[2]=re+Ce)}if(oe[b][1]=H+ke,oe[b][2]=re+Ce,!oP(oe))for(var Ee=0;Ee<_e;Ee++)for(var we=0;we<oe[Ee].length;we++)oe[Ee][we]=p[m][Ee][we]}else oe[b][1]=H+j,oe[b][2]=re+N;o()}}function C(){s()}function S(){if(t.length&&t[m]&&t[m].length){for(var j=[],N=0;N<t[m].length;N++)N!==b&&j.push(t[m][N]);j.length>1&&!(j.length===2&&j[1][0]==="Z")&&(b===0&&(j[0][0]="M"),t[m]=j,o(),s())}}function g(j,N){if(j===2){m=+N.srcElement.getAttribute("data-i"),b=+N.srcElement.getAttribute("data-j");var H=t[m];!oP(H)&&!rN(H)&&S()}}function P(j){d=[];for(var N=0;N<t.length;N++){var H=t[N],re=oP(H),oe=!re&&rN(H);d[N]=[];for(var _e=H.length,ke=0;ke<_e;ke++)if(H[ke][0]!=="Z"&&!(oe&&ke!==qct&&ke!==Oct&&ke!==Bct&&ke!==Nct)){var Ce=re&&n.isActiveSelection,ge;Ce&&(ge=Bue(H,ke));var ie=H[ke][1],Se=H[ke][2],Ee=j.append(Ce?"rect":"circle").attr("data-i",N).attr("data-j",ke).style({fill:Oue.background,stroke:Oue.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(Ce){var we=ge[1]-ie,De=ge[2]-Se,Le=De?5:Math.max(Math.min(25,Math.abs(we)-5),5),me=we?5:Math.max(Math.min(25,Math.abs(De)-5),5);Ee.classed(De?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",Le).attr("height",me).attr("x",ie-Le/2).attr("y",Se-me/2).attr("transform",Fct(we/2,De/2))}else Ee.classed("cursor-grab",!0).attr("r",5).attr("cx",ie).attr("cy",Se);d[N][ke]={element:Ee.node(),gd:a,prepFn:L,doneFn:C,clickFn:g},que.init(d[N][ke])}}}function E(j,N){if(t.length)for(var H=0;H<t.length;H++)for(var re=0;re<t[H].length;re++)for(var oe=0;oe+2<t[H][re].length;oe+=2)t[H][re][oe+1]=p[H][re][oe+1]+j,t[H][re][oe+2]=p[H][re][oe+2]+N}function z(j,N){E(j,N),o()}function q(j){m=+j.srcElement.getAttribute("data-i"),m||(m=0),v[m].moveFn=z}function U(){s()}function G(j){j===2&&Zct(a)}function Z(){if(v=[],!!t.length){var j=0;v[j]={element:r[0][0],gd:a,prepFn:q,doneFn:U,clickFn:G},que.init(v[j])}}};function Xct(e,t){for(var r=0;r<t.length;r++){var n=t[r];e[r]=[];for(var i=0;i<n.length;i++){e[r][i]=[];for(var a=0;a<n[i].length;a++)e[r][i][a]=n[i][a]}}return e}function Bue(e,t){var r=e[t][1],n=e[t][2],i=e.length,a,o,s;return a=(t+1)%i,o=e[a][1],s=e[a][2],o===r&&s===n&&(a=(t+2)%i,o=e[a][1],s=e[a][2]),[a,o,s]}function Zct(e){if(Uue(e._fullLayout.dragmode)){Gue(e);var t=e._fullLayout._activeSelectionIndex,r=(e.layout||{}).selections||[];if(t<r.length){for(var n=[],i=0;i<r.length;i++)i!==t&&n.push(r[i]);delete e._fullLayout._activeSelectionIndex;var a=e._fullLayout.selections[t];e._fullLayout._deselect={xref:a.xref,yref:a.yref},Vue.call("_guiRelayout",e,{selections:n})}}}});var dP=ye((eor,Que)=>{"use strict";var Yct=qa(),Yue=Oa(),aN=Pr(),Xb=ho(),Kct=m_().readPaths,Jct=lP(),cP=tN(),Kue=o_().clearOutlineControllers,nN=ka(),fP=So(),$ct=vl().arrayEditor,jue=yv(),Wue=Eg(),Zb=TM(),Ep=x_(),oN=Ep.getPathString;Que.exports={draw:sN,drawOne:Jue,eraseActiveShape:rft,drawLabel:cP};function sN(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;i<t.shapes.length;i++)t.shapes[i].visible===!0&&Jue(e,i)}function uP(e){return!!e._fullLayout._outlining}function hP(e){return!e._context.edits.shapePosition}function Jue(e,t){e._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+t+'"]').remove();var r=Ep.makeShapesOptionsAndPlotinfo(e,t),n=r.options,i=r.plotinfo;if(!n._input||n.visible!==!0)return;let a=Array.isArray(n.xref)||Array.isArray(n.yref);if(n.layer==="above")s(e._fullLayout._shapeUpperLayer);else if(n.xref.includes("paper")||n.yref.includes("paper"))s(e._fullLayout._shapeLowerLayer);else if(n.layer==="between"&&!a)s(i.shapelayerBetween);else if(i._hadPlotinfo){var o=i.mainplotinfo||i;s(o.shapelayer)}else s(e._fullLayout._shapeLowerLayer);function s(l){var u=oN(e,n),c={"data-index":t,"fill-rule":n.fillrule,d:u},f=n.opacity,h=n.fillcolor,d=n.line.width?n.line.color:"rgba(0,0,0,0)",v=n.line.width,m=n.line.dash;!v&&n.editable===!0&&(v=5,m="solid");var b=u[u.length-1]!=="Z",p=hP(e)&&n.editable&&e._fullLayout._activeShapeIndex===t;p&&(h=b?"rgba(0,0,0,0)":e._fullLayout.activeshape.fillcolor,f=e._fullLayout.activeshape.opacity);var k=l.append("g").classed("shape-group",!0).attr({"data-index":t}),M=k.append("path").attr(c).style("opacity",f).call(nN.stroke,d).call(nN.fill,h).call(fP.dashLine,m,v);$ue(k,e,n),cP(e,t,n,k);var T;if((p||e._context.edits.shapePosition)&&(T=$ct(e.layout,"shapes",n)),p){M.style({cursor:"move"});var L={element:M.node(),plotinfo:i,gd:e,editHelpers:T,hasText:n.label.text||n.label.texttemplate,isActiveShape:!0},x=Kct(u,e);Jct(x,M,L)}else e._context.edits.shapePosition?eft(e,M,n,t,l,T):n.editable===!0&&M.style("pointer-events",b||nN.opacity(h)*f<=.5?"stroke":"all");M.node().addEventListener("click",function(){return tft(e,M)})}}function $ue(e,t,r){let n=r.xref,i=r.yref;if(Array.isArray(n)||Array.isArray(i)){let a="clip"+t._fullLayout._uid+"shape"+r._index,o=Qct(t,n,i);aN.ensureSingleById(t._fullLayout._clips,"clipPath",a,function(s){s.append("rect")}).select("rect").attr(o),fP.setClipUrl(e,a,t)}else{let a=(n+i).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");fP.setClipUrl(e,a?"clip"+t._fullLayout._uid+a:null,t)}}function Qct(e,t,r){let n=e._fullLayout._size;function i(s,l){let u=(Array.isArray(s)?s:[s]).map(h=>Xb.getFromId(e,h)).filter(Boolean);if(!u.length)return l?[n.t,n.t+n.h]:[n.l,n.l+n.w];let c=u.map(function(h){return h._offset}),f=u.map(function(h){return h._offset+h._length});return[Math.min(...c),Math.max(...f)]}let a=i(t,!1),o=i(r,!0);return{x:a[0],y:o[0],width:a[1]-a[0],height:o[1]-o[0]}}function eft(e,t,r,n,i,a){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",h=a.modifyItem,d,v,m,b,p,k,M,T,L,x,C,S,g,P,E,z=Yct.select(t.node().parentNode),q=Xb.getFromId(e,r.xref),U=Xb.getRefType(r.xref),G=Xb.getFromId(e,r.yref),Z=Xb.getRefType(r.yref),j=r.x0shift,N=r.x1shift,H=r.y0shift,re=r.y1shift,oe=function(st,ct){var Qt=Ep.getDataToPixel(e,q,ct,!1,U);return Qt(st)},_e=function(st,ct){var Qt=Ep.getDataToPixel(e,G,ct,!0,Z);return Qt(st)},ke=Ep.getPixelToData(e,q,!1,U),Ce=Ep.getPixelToData(e,G,!0,Z),ge=Ee(),ie={element:ge.node(),gd:e,prepFn:Le,doneFn:me,clickFn:Pe},Se;jue.init(ie),ge.node().onmousemove=De;function Ee(){return c?we():t}function we(){var st=10,ct=Math.max(r.line.width,st),Qt=i.append("g").attr("data-index",n).attr("drag-helper",!0);Qt.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":ct,"stroke-opacity":"0"});var Ht={"fill-opacity":"0"},nr=Math.max(ct/2,st);return Qt.append("circle").attr({"data-line-point":"start-point",cx:l?oe(r.xanchor)+r.x0:oe(r.x0,j),cy:u?_e(r.yanchor)-r.y0:_e(r.y0,H),r:nr}).style(Ht).classed("cursor-grab",!0),Qt.append("circle").attr({"data-line-point":"end-point",cx:l?oe(r.xanchor)+r.x1:oe(r.x1,N),cy:u?_e(r.yanchor)-r.y1:_e(r.y1,re),r:nr}).style(Ht).classed("cursor-grab",!0),Qt}function De(st){if(uP(e)){Se=null;return}if(c)st.target.tagName==="path"?Se="move":Se=st.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ct=ie.element.getBoundingClientRect(),Qt=ct.right-ct.left,Ht=ct.bottom-ct.top,nr=st.clientX-ct.left,tt=st.clientY-ct.top,je=!f&&Qt>o&&Ht>s&&!st.shiftKey?jue.getCursor(nr/Qt,1-tt/Ht):"move";Wue(t,je),Se=je.split("-")[0]}}function Le(st){uP(e)||(l&&(p=oe(r.xanchor)),u&&(k=_e(r.yanchor)),r.type==="path"?E=r.path:(d=l?r.x0:oe(r.x0),v=u?r.y0:_e(r.y0),m=l?r.x1:oe(r.x1),b=u?r.y1:_e(r.y1)),d<m?(L=d,g="x0",x=m,P="x1"):(L=m,g="x1",x=d,P="x0"),!u&&v<b||u&&v>b?(M=v,C="y0",T=b,S="y1"):(M=b,C="y1",T=v,S="y0"),De(st),lt(i,r),Vt(t,r,e),ie.moveFn=Se==="move"?ce:He,ie.altKey=st.altKey)}function me(){uP(e)||(Wue(t),mt(i),$ue(t,e,r),Yue.call("_guiRelayout",e,a.getUpdateObj()))}function Pe(){uP(e)||mt(i)}function ce(st,ct){if(r.type==="path"){var Qt=function(tt){return tt},Ht=Qt,nr=Qt;l?h("xanchor",r.xanchor=ke(p+st)):(Ht=function(je){return ke(oe(je)+st)},q&&q.type==="date"&&(Ht=Ep.encodeDate(Ht))),u?h("yanchor",r.yanchor=Ce(k+ct)):(nr=function(je){return Ce(_e(je)+ct)},G&&G.type==="date"&&(nr=Ep.encodeDate(nr))),h("path",r.path=Xue(E,Ht,nr))}else l?h("xanchor",r.xanchor=ke(p+st)):(h("x0",r.x0=ke(d+st)),h("x1",r.x1=ke(m+st))),u?h("yanchor",r.yanchor=Ce(k+ct)):(h("y0",r.y0=Ce(v+ct)),h("y1",r.y1=Ce(b+ct)));t.attr("d",oN(e,r)),lt(i,r),cP(e,n,r,z)}function He(st,ct){if(f){var Qt=function(Er){return Er},Ht=Qt,nr=Qt;l?h("xanchor",r.xanchor=ke(p+st)):(Ht=function(ei){return ke(oe(ei)+st)},q&&q.type==="date"&&(Ht=Ep.encodeDate(Ht))),u?h("yanchor",r.yanchor=Ce(k+ct)):(nr=function(ei){return Ce(_e(ei)+ct)},G&&G.type==="date"&&(nr=Ep.encodeDate(nr))),h("path",r.path=Xue(E,Ht,nr))}else if(c){if(Se==="resize-over-start-point"){var tt=d+st,je=u?v-ct:v+ct;h("x0",r.x0=l?tt:ke(tt)),h("y0",r.y0=u?je:Ce(je))}else if(Se==="resize-over-end-point"){var Ue=m+st,Ae=u?b-ct:b+ct;h("x1",r.x1=l?Ue:ke(Ue)),h("y1",r.y1=u?Ae:Ce(Ae))}}else{var rt=function(Er){return Se.indexOf(Er)!==-1},St=rt("n"),Tt=rt("s"),dt=rt("w"),Et=rt("e"),pt=St?M+ct:M,Xt=Tt?T+ct:T,or=dt?L+st:L,_r=Et?x+st:x;u&&(St&&(pt=M-ct),Tt&&(Xt=T-ct)),(!u&&Xt-pt>s||u&&pt-Xt>s)&&(h(C,r[C]=u?pt:Ce(pt)),h(S,r[S]=u?Xt:Ce(Xt))),_r-or>o&&(h(g,r[g]=l?or:ke(or)),h(P,r[P]=l?_r:ke(_r)))}t.attr("d",oN(e,r)),lt(i,r),cP(e,n,r,z)}function lt(st,ct){(l||u)&&Qt();function Qt(){var Ht=ct.type!=="path",nr=st.selectAll(".visual-cue").data([0]),tt=1;nr.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":tt}).classed("visual-cue",!0);var je=oe(l?ct.xanchor:aN.midRange(Ht?[ct.x0,ct.x1]:Ep.extractPathCoords(ct.path,Zb.paramIsX))),Ue=_e(u?ct.yanchor:aN.midRange(Ht?[ct.y0,ct.y1]:Ep.extractPathCoords(ct.path,Zb.paramIsY)));if(je=Ep.roundPositionForSharpStrokeRendering(je,tt),Ue=Ep.roundPositionForSharpStrokeRendering(Ue,tt),l&&u){var Ae="M"+(je-1-tt)+","+(Ue-1-tt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";nr.attr("d",Ae)}else if(l){var rt="M"+(je-1-tt)+","+(Ue-9-tt)+"v18 h2 v-18 Z";nr.attr("d",rt)}else{var St="M"+(je-9-tt)+","+(Ue-1-tt)+"h18 v2 h-18 Z";nr.attr("d",St)}}}function mt(st){st.selectAll(".visual-cue").remove()}function Vt(st,ct,Qt){var Ht=ct.xref,nr=ct.yref,tt=Xb.getFromId(Qt,Ht),je=Xb.getFromId(Qt,nr),Ue="";Ht!=="paper"&&!tt.autorange&&(Ue+=Ht),nr!=="paper"&&!je.autorange&&(Ue+=nr),fP.setClipUrl(st,Ue?"clip"+Qt._fullLayout._uid+Ue:null,Qt)}}function Xue(e,t,r){return e.replace(Zb.segmentRE,function(n){var i=0,a=n.charAt(0),o=Zb.paramIsX[a],s=Zb.paramIsY[a],l=Zb.numParams[a],u=n.slice(1).replace(Zb.paramRE,function(c){return i>=l||(o[i]?c=t(c):s[i]&&(c=r(c)),i++),c});return a+u})}function tft(e,t){if(hP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Zue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Zue,sN(e)}}}function Zue(e){if(hP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(Kue(e),delete e._fullLayout._activeShapeIndex,sN(e))}}function rft(e){if(hP(e)){Kue(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t<r.length){for(var n=[],i=0;i<r.length;i++)i!==t&&n.push(r[i]);return delete e._fullLayout._activeShapeIndex,Yue.call("_guiRelayout",e,{shapes:n})}}}});var cN=ye((tor,lce)=>{"use strict";var S0=Oa(),ece=Mc(),tce=hf(),Pl=$L(),ift=dP().eraseActiveShape,vP=Pr(),tl=vP._,Il=lce.exports={};Il.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?tl(e,"Download plot as a PNG"):tl(e,"Download plot")},icon:Pl.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};vP.notifier(tl(e,"Taking snapshot - this may take a few seconds"),"long",e),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),S0.call("downloadImage",e,r).then(function(n){vP.notifier(tl(e,"Snapshot succeeded")+" - "+n,"long",e)}).catch(function(){vP.notifier(tl(e,"Sorry, there was a problem downloading your snapshot!"),"long",e)})}};Il.sendDataToCloud={name:"sendDataToCloud",title:function(e){return tl(e,"Edit in Chart Studio")},icon:Pl.disk,click:function(e){ece.sendDataToCloud(e)}};Il.editInChartStudio={name:"editInChartStudio",title:function(e){return tl(e,"Edit in Chart Studio")},icon:Pl.pencil,click:function(e){ece.sendDataToCloud(e)}};Il.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return tl(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Pl.zoombox,click:Bv};Il.pan2d={name:"pan2d",_cat:"pan",title:function(e){return tl(e,"Pan")},attr:"dragmode",val:"pan",icon:Pl.pan,click:Bv};Il.select2d={name:"select2d",_cat:"select",title:function(e){return tl(e,"Box Select")},attr:"dragmode",val:"select",icon:Pl.selectbox,click:Bv};Il.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return tl(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Pl.lasso,click:Bv};Il.drawclosedpath={name:"drawclosedpath",title:function(e){return tl(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Pl.drawclosedpath,click:Bv};Il.drawopenpath={name:"drawopenpath",title:function(e){return tl(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Pl.drawopenpath,click:Bv};Il.drawline={name:"drawline",title:function(e){return tl(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Pl.drawline,click:Bv};Il.drawrect={name:"drawrect",title:function(e){return tl(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Pl.drawrect,click:Bv};Il.drawcircle={name:"drawcircle",title:function(e){return tl(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Pl.drawcircle,click:Bv};Il.eraseshape={name:"eraseshape",title:function(e){return tl(e,"Erase active shape")},icon:Pl.eraseshape,click:ift};Il.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return tl(e,"Zoom in")},attr:"zoom",val:"in",icon:Pl.zoom_plus,click:Bv};Il.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return tl(e,"Zoom out")},attr:"zoom",val:"out",icon:Pl.zoom_minus,click:Bv};Il.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return tl(e,"Autoscale")},attr:"zoom",val:"auto",icon:Pl.autoscale,click:Bv};Il.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return tl(e,"Reset axes")},attr:"zoom",val:"reset",icon:Pl.home,click:Bv};Il.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return tl(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Pl.tooltip_basic,gravity:"ne",click:Bv};Il.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return tl(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Pl.tooltip_compare,gravity:"ne",click:Bv};function Bv(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=tce.list(e,null,!0),l=a._cartesianSpikesEnabled,u,c;if(n==="zoom"){var f=i==="in"?.5:2,h=(1+f)/2,d=(1-f)/2,v,m;for(c=0;c<s.length;c++)if(u=s[c],m=u.modebardisable==="none"||u.modebardisable.indexOf(i==="auto"||i==="reset"?"autoscale":"zoominout")===-1,m&&!u.fixedrange)if(v=u._name,i==="auto")o[v+".autorange"]=!0;else if(i==="reset")u._rangeInitial0===void 0&&u._rangeInitial1===void 0?o[v+".autorange"]=!0:u._rangeInitial0===void 0?(o[v+".autorange"]=u._autorangeInitial,o[v+".range"]=[null,u._rangeInitial1]):u._rangeInitial1===void 0?(o[v+".range"]=[u._rangeInitial0,null],o[v+".autorange"]=u._autorangeInitial):o[v+".range"]=[u._rangeInitial0,u._rangeInitial1],u._showSpikeInitial!==void 0&&(o[v+".showspikes"]=u._showSpikeInitial,l==="on"&&!u._showSpikeInitial&&(l="off"));else{var b=[u.r2l(u.range[0]),u.r2l(u.range[1])],p=[h*b[0]+d*b[1],h*b[1]+d*b[0]];o[v+".range[0]"]=u.l2r(p[0]),o[v+".range[1]"]=u.l2r(p[1])}}else n==="hovermode"&&(i==="x"||i==="y")&&(i=a._isHoriz?"y":"x",r.setAttribute("data-val",i)),o[n]=i;a._cartesianSpikesEnabled=l,S0.call("_guiRelayout",e,o)}Il.zoom3d={name:"zoom3d",_cat:"zoom",title:function(e){return tl(e,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:Pl.zoombox,click:pP};Il.pan3d={name:"pan3d",_cat:"pan",title:function(e){return tl(e,"Pan")},attr:"scene.dragmode",val:"pan",icon:Pl.pan,click:pP};Il.orbitRotation={name:"orbitRotation",title:function(e){return tl(e,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:Pl["3d_rotate"],click:pP};Il.tableRotation={name:"tableRotation",title:function(e){return tl(e,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:Pl["z-axis"],click:pP};function pP(e,t){for(var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout._subplots.gl3d||[],o={},s=n.split("."),l=0;l<a.length;l++)o[a[l]+"."+s[1]]=i;var u=i==="pan"?i:"zoom";o.dragmode=u,S0.call("_guiRelayout",e,o)}Il.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(e){return tl(e,"Reset camera to default")},attr:"resetDefault",icon:Pl.home,click:lN};Il.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(e){return tl(e,"Reset camera to last save")},attr:"resetLastSave",icon:Pl.movie,click:lN};function lN(e,t){for(var r=t.currentTarget,n=r.getAttribute("data-attr"),i=n==="resetLastSave",a=n==="resetDefault",o=e._fullLayout,s=o._subplots.gl3d||[],l={},u=0;u<s.length;u++){var c=s[u],f=c+".camera",h=c+".aspectratio",d=c+".aspectmode",v=o[c]._scene,m;i?(l[f+".up"]=v.viewInitial.up,l[f+".eye"]=v.viewInitial.eye,l[f+".center"]=v.viewInitial.center,m=!0):a&&(l[f+".up"]=null,l[f+".eye"]=null,l[f+".center"]=null,m=!0),m&&(l[h+".x"]=v.viewInitial.aspectratio.x,l[h+".y"]=v.viewInitial.aspectratio.y,l[h+".z"]=v.viewInitial.aspectratio.z,l[d]=v.viewInitial.aspectmode)}S0.call("_guiRelayout",e,l)}Il.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(e){return tl(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Pl.tooltip_basic,gravity:"ne",click:nft};function rce(e,t){var r=t.currentTarget,n=r._previousVal,i=e._fullLayout,a=i._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],s={},l={};if(n)l=n,r._previousVal=null;else{for(var u=0;u<a.length;u++){var c=a[u],f=i[c],h=c+".hovermode";s[h]=f.hovermode,l[h]=!1;for(var d=0;d<3;d++){var v=o[d],m=c+"."+v+".showspikes";l[m]=!1,s[m]=f[v].showspikes}}r._previousVal=s}return l}function nft(e,t){var r=rce(e,t);S0.call("_guiRelayout",e,r)}Il.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(e){return tl(e,"Zoom in")},attr:"zoom",val:"in",icon:Pl.zoom_plus,click:uN};Il.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(e){return tl(e,"Zoom out")},attr:"zoom",val:"out",icon:Pl.zoom_minus,click:uN};Il.resetGeo={name:"resetGeo",_cat:"reset",title:function(e){return tl(e,"Reset")},attr:"reset",val:null,icon:Pl.autoscale,click:uN};Il.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(e){return tl(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Pl.tooltip_basic,gravity:"ne",click:nce};function uN(e,t){for(var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout,o=a._subplots.geo||[],s=0;s<o.length;s++){var l=o[s],u=a[l];if(n==="zoom"){var c=u.projection.scale,f=i==="in"?2*c:.5*c;S0.call("_guiRelayout",e,l+".projection.scale",f)}}n==="reset"&&iT(e,"geo")}Il.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(e){return tl(e,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:Pl.tooltip_basic,gravity:"ne",click:nce};function ice(e){var t=e._fullLayout;return t.hovermode?!1:t._has("cartesian")?t._isHoriz?"y":"x":"closest"}function nce(e){var t=ice(e);S0.call("_guiRelayout",e,"hovermode",t)}Il.resetViewSankey={name:"resetSankeyGroup",title:function(e){return tl(e,"Reset view")},icon:Pl.home,click:function(e){for(var t={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<e._fullData.length;r++){var n=e._fullData[r]._viewInitial;t["node.groups"].push(n.node.groups.slice()),t["node.x"].push(n.node.x.slice()),t["node.y"].push(n.node.y.slice())}S0.call("restyle",e,t)}};Il.toggleHover={name:"toggleHover",title:function(e){return tl(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Pl.tooltip_basic,gravity:"ne",click:function(e,t){var r=rce(e,t);r.hovermode=ice(e),S0.call("_guiRelayout",e,r)}};Il.resetViews={name:"resetViews",title:function(e){return tl(e,"Reset views")},icon:Pl.home,click:function(e,t){var r=t.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),Bv(e,t),r.setAttribute("data-attr","resetLastSave"),lN(e,t),iT(e,"geo"),iT(e,"mapbox"),iT(e,"map")}};Il.toggleSpikelines={name:"toggleSpikelines",title:function(e){return tl(e,"Toggle Spike Lines")},icon:Pl.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(e){var t=e._fullLayout,r=t._cartesianSpikesEnabled;t._cartesianSpikesEnabled=r==="on"?"off":"on",S0.call("_guiRelayout",e,aft(e))}};function aft(e){for(var t=e._fullLayout,r=t._cartesianSpikesEnabled==="on",n=tce.list(e,null,!0),i={},a=0;a<n.length;a++){var o=n[a];i[o._name+".showspikes"]=r?!0:o._showSpikeInitial}return i}Il.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(e){return tl(e,"Reset view")},attr:"reset",icon:Pl.home,click:function(e){iT(e,"mapbox")}};Il.resetViewMap={name:"resetViewMap",_cat:"resetView",title:function(e){return tl(e,"Reset view")},attr:"reset",icon:Pl.home,click:function(e){iT(e,"map")}};Il.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(e){return tl(e,"Zoom in")},attr:"zoom",val:"in",icon:Pl.zoom_plus,click:ace};Il.zoomInMap={name:"zoomInMap",_cat:"zoomin",title:function(e){return tl(e,"Zoom in")},attr:"zoom",val:"in",icon:Pl.zoom_plus,click:oce};Il.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(e){return tl(e,"Zoom out")},attr:"zoom",val:"out",icon:Pl.zoom_minus,click:ace};Il.zoomOutMap={name:"zoomOutMap",_cat:"zoomout",title:function(e){return tl(e,"Zoom out")},attr:"zoom",val:"out",icon:Pl.zoom_minus,click:oce};function ace(e,t){sce(e,t,"mapbox")}function oce(e,t){sce(e,t,"map")}function sce(e,t,r){for(var n=t.currentTarget,i=n.getAttribute("data-val"),a=e._fullLayout,o=a._subplots[r]||[],s=1.05,l={},u=0;u<o.length;u++){var c=o[u],f=a[c].zoom,h=i==="in"?s*f:f/s;l[c+".zoom"]=h}S0.call("_guiRelayout",e,l)}function iT(e,t){for(var r=e._fullLayout,n=r._subplots[t]||[],i={},a=0;a<n.length;a++)for(var o=n[a],s=r[o]._subplot,l=s.viewInitial,u=Object.keys(l),c=0;c<u.length;c++){var f=u[c];i[o+"."+f]=l[f]}S0.call("_guiRelayout",e,i)}});var fN=ye((ror,hce)=>{"use strict";var uce=cN(),oft=Object.keys(uce),cce=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],fce=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(cce),nT=[],sft=function(e){if(fce.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();nT.indexOf(t)===-1&&nT.push(t),nT.indexOf(r)===-1&&nT.push(r)}};oft.forEach(function(e){sft(uce[e])});nT.sort();hce.exports={DRAW_MODES:cce,backButtons:fce,foreButtons:nT}});var hN=ye((nor,dce)=>{"use strict";var ior=fN();dce.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}});var pce=ye((aor,vce)=>{"use strict";var lft=Pr(),SM=ka(),uft=vl(),cft=hN();vce.exports=function(t,r){var n=t.modebar||{},i=uft.newContainer(r,"modebar");function a(s,l){return lft.coerce(n,i,cft,s,l)}a("orientation"),a("bgcolor",SM.addOpacity(r.paper_bgcolor,.5));var o=SM.contrast(SM.rgb(r.modebar.bgcolor));a("color",SM.addOpacity(o,.3)),a("activecolor",SM.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var _ce=ye((oor,yce)=>{"use strict";var dN=qa(),fft=Eo(),gP=Pr(),gce=$L(),hft=g6().version,dft=new DOMParser;function mce(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var km=mce.prototype;km.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this.element.setAttribute("role","toolbar"),this._uid=i,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var a=n.modebar,o="#"+i+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=a.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),gP.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color,this.element)};km.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(i){var a=i.name;if(!a)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(a)!==-1)throw new Error("button name '"+a+"' is taken");t.buttonsNames.push(a);var o=t.createButton(i);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};km.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};km.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute("data-title",n),r.setAttribute("aria-label",n)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var i=e.val;i!==void 0&&(typeof i=="function"&&(i=i(this.graphInfo)),r.setAttribute("data-val",i));var a=e.click;if(typeof a!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&dN.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||gce.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};km.createIcon=function(e){var t=fft(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=dft.parseFromString(e.svg,"application/xml");n=a.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};km.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var i=n.getAttribute("data-val")||!0,a=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",s=dN.select(n),l=function(f,h){var d=t.modebar,v=f.querySelector(".icon path");v&&(h||f.matches(":hover")?v.style.fill=d.activecolor:v.style.fill=d.color)};if(o){if(a===r){var u=!s.classed("active");s.classed("active",u),l(n,u)}}else{var c=a===null?a:gP.nestedProperty(t,a).get();s.classed("active",c===i),l(n,c===i)}})};km.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r<e.length;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;n<e[r].length;n++)if(e[r][n].name!==t[r][n].name)return!1}return!0};function vft(e){return e+" (v"+hft+")"}km.getLogo=function(){var e=this.createGroup(),t=document.createElement("a");return t.href="https://plotly.com/",t.target="_blank",t.setAttribute("data-title",vft(gP._(this.graphInfo,"Produced with Plotly.js"))),t.className="modebar-btn plotlyjsicon modebar-btn--logo",t.appendChild(this.createIcon(gce.newplotlylogo)),e.appendChild(t),e};km.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};km.destroy=function(){gP.removeElement(this.container.querySelector(".modebar"))};function pft(e,t){var r=e._fullLayout,n=new mce({graphInfo:e,container:r._modebardiv.node(),buttons:t});return r._privateplot&&dN.select(n.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),n}yce.exports=pft});var wce=ye((sor,bce)=>{"use strict";var gft=hf(),xce=Ru(),vN=Oa(),mft=ip().isUnifiedHover,yft=_ce(),mP=cN(),_ft=fN().DRAW_MODES,xft=Pr().extendDeep;bce.exports=function(t){var r=t._fullLayout,n=t._context,i=r._modeBar;if(!n.displayModeBar&&!n.watermark){i&&(i.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var a=n.modeBarButtons,o;Array.isArray(a)&&a.length?o=Mft(a):!n.displayModeBar&&n.watermark?o=[]:o=bft(t),i?i.update(t,o):r._modeBar=yft(t,o)};function bft(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(N,H){if(typeof H=="string"){if(H.toLowerCase()===N.toLowerCase())return!0}else{var re=H.name,oe=H._cat||H.name;if(re===N||oe===N.toLowerCase())return!0}return!1}var a=t.modebar.add;typeof a=="string"&&(a=[a]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(a.filter(function(N){for(var H=0;H<n.modeBarButtonsToRemove.length;H++)if(i(N,n.modeBarButtonsToRemove[H]))return!1;return!0})),l=n.modeBarButtonsToRemove.concat(o.filter(function(N){for(var H=0;H<n.modeBarButtonsToAdd.length;H++)if(i(N,n.modeBarButtonsToAdd[H]))return!1;return!0})),u=t._has("cartesian"),c=t._has("gl3d"),f=t._has("geo"),h=t._has("pie"),d=t._has("funnelarea"),v=t._has("ternary"),m=t._has("mapbox"),b=t._has("map"),p=t._has("polar"),k=t._has("smith"),M=t._has("sankey"),T=wft(t),L=mft(t.hovermode),x=[];function C(N){if(N.length){for(var H=[],re=0;re<N.length;re++){for(var oe=N[re],_e=mP[oe],ke=_e.name.toLowerCase(),Ce=(_e._cat||_e.name).toLowerCase(),ge=!1,ie=0;ie<l.length;ie++){var Se=l[ie].toLowerCase();if(Se===ke||Se===Ce){ge=!0;break}}ge||H.push(mP[oe])}x.push(H)}}var S=["toImage"];n.showEditInChartStudio?S.push("editInChartStudio"):n.showSendToCloud&&S.push("sendDataToCloud"),C(S);var g=[],P=[],E=[],z=[];(u||h||d||v)+f+c+m+b+p+k>1?(P=["toggleHover"],E=["resetViews"]):f?(g=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],E=["resetGeo"]):c?(P=["hoverClosest3d"],E=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(g=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],E=["resetViewMapbox"]):b?(g=["zoomInMap","zoomOutMap"],P=["toggleHover"],E=["resetViewMap"]):h?P=["hoverClosestPie"]:M?(P=["hoverClosestCartesian","hoverCompareCartesian"],E=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Aft(r)||L)&&(P=[]),u&&!T&&(g=["zoomIn2d","zoomOut2d","autoScale2d"],E[0]!=="resetViews"&&(E=["resetScale2d"])),c?z=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!T||v?z=["zoom2d","pan2d"]:m||b||f?z=["pan2d"]:p&&(z=["zoom2d"]),Tft(r)&&z.push("select2d","lasso2d");var q=[],U=function(N){q.indexOf(N)===-1&&P.indexOf(N)!==-1&&q.push(N)};if(Array.isArray(s)){for(var G=[],Z=0;Z<s.length;Z++){var j=s[Z];typeof j=="string"?(j=j.toLowerCase(),_ft.indexOf(j)!==-1?(t._has("mapbox")||t._has("map")||t._has("cartesian"))&&z.push(j):j==="togglespikelines"?U("toggleSpikelines"):j==="togglehover"?U("toggleHover"):j==="hovercompare"?U("hoverCompareCartesian"):j==="hoverclosest"?(U("hoverClosestCartesian"),U("hoverClosestGeo"),U("hoverClosest3d"),U("hoverClosestPie")):j==="v1hovermode"&&(U("hoverClosestCartesian"),U("hoverCompareCartesian"),U("hoverClosestGeo"),U("hoverClosest3d"),U("hoverClosestPie"))):G.push(j)}s=G}return C(z),C(g.concat(E)),C(q),Sft(x,s)}function wft(e){for(var t=gft.list({_fullLayout:e},null,!0),r=0;r<t.length;r++){var n=t[r].modebardisable;if(!t[r].fixedrange&&n!=="autoscale+zoominout"&&n!=="zoominout+autoscale")return!1}return!0}function Tft(e){for(var t=!1,r=0;r<e.length&&!t;r++){var n=e[r];!n._module||!n._module.selectPoints||(vN.traceIs(n,"scatter-like")?(xce.hasMarkers(n)||xce.hasText(n))&&(t=!0):vN.traceIs(n,"box-violin")?(n.boxpoints==="all"||n.points==="all")&&(t=!0):t=!0)}return t}function Aft(e){for(var t=0;t<e.length;t++)if(!vN.traceIs(e[t],"noHover"))return!1;return!0}function Sft(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=xft([],e),r=0;r<t.length;r++)for(var n=t[r],i=0;i<n.length;i++){var a=n[i];if(typeof a=="string")if(mP[a]!==void 0)t[r][i]=mP[a];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return t}});var pN=ye((lor,Tce)=>{"use strict";Tce.exports={moduleType:"component",name:"modebar",layoutAttributes:hN(),supplyLayoutDefaults:pce(),manage:wce()}});var gN=ye((uor,Ace)=>{"use strict";var Eft=Dh().FROM_BL;Ace.exports=function(t,r,n){n===void 0&&(n=Eft[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*n;t.range=t._input.range=[t.l2r(a+(i[0]-a)*r),t.l2r(a+(i[1]-a)*r)],t.setScale()}});var Kb=ye(MM=>{"use strict";var Yb=Pr(),mN=Mg(),Lg=hf().id2name,kft=Rd(),Sce=gN(),Cft=xm(),Lft=fs().ALMOST_EQUAL,Pft=Dh().FROM_BL;MM.handleDefaults=function(e,t,r){var n=r.axIds,i=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,h,d,v;for(s=0;s<n.length;s++)c=Lg(n[s]),f=e[c],h=t[c],Ift(f,h,{axIds:n,layoutOut:t,hasImage:i[c]});function m(S,g){for(s=0;s<S.length;s++){l=S[s];for(u in l)t[Lg(u)][g]=l}}for(m(o,"_matchGroup"),s=0;s<a.length;s++){l=a[s];for(u in l)if(h=t[Lg(u)],h.fixedrange){for(var b in l){var p=Lg(b);(e[p]||{}).fixedrange===!1&&Yb.warn("fixedrange was specified as false for axis "+p+" but was overridden because another axis in its constraint group has fixedrange true"),t[p].fixedrange=!0}break}}for(s=0;s<a.length;){l=a[s];for(u in l){h=t[Lg(u)],h._matchGroup&&Object.keys(h._matchGroup).length===Object.keys(l).length&&(a.splice(s,1),s--);break}s++}m(a,"_constraintGroup");var k=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],M=!1,T=!1;function L(){v=h[d],d==="rangebreaks"&&(T=h._hasDayOfWeekBreaks)}for(s=0;s<o.length;s++){l=o[s];for(var x=0;x<k.length;x++){d=k[x],v=null;var C;for(u in l)if(c=Lg(u),f=e[c],h=t[c],d in h){if(!h.matches&&(C=h,d in f)){L();break}v===null&&d in f&&L()}if(d==="range"&&v&&f.range&&f.range.length===2&&f.range[0]!==null&&f.range[1]!==null&&(M=!0),d==="autorange"&&v===null&&M&&(v=!1),v===null&&d in C&&(v=C[d]),v!==null)for(u in l)h=t[Lg(u)],h[d]=d==="range"?v.slice():v,d==="rangebreaks"&&(h._hasDayOfWeekBreaks=T,Cft(h,t))}}};function Ift(e,t,r){var n=r.axIds,i=r.layoutOut,a=r.hasImage,o=i._axisConstraintGroups,s=i._axisMatchGroups,l=t._id,u=l.charAt(0),c=((i._splomAxes||{})[u]||{})[l]||{},f=t._id,h=f.charAt(0)==="x";t._matchGroup=null,t._constraintGroup=null;function d(z,q){return Yb.coerce(e,t,kft,z,q)}d("constrain",a?"domain":"range"),Yb.coerce(e,t,{constraintoward:{valType:"enumerated",values:h?["left","center","right"]:["bottom","middle","top"],dflt:h?"center":"middle"}},"constraintoward");var v=t.type,m,b,p=[];for(m=0;m<n.length;m++)if(b=n[m],b!==f){var k=i[Lg(b)];k.type===v&&p.push(b)}var M=kce(o,f);if(M){var T=[];for(m=0;m<p.length;m++)b=p[m],M[b]||T.push(b);p=T}var L=p.length,x,C;L&&(e.matches||c.matches)&&(x=Yb.coerce(e,t,{matches:{valType:"enumerated",values:p,dflt:p.indexOf(c.matches)!==-1?c.matches:void 0}},"matches"));var S=a&&!h?t.anchor:void 0;if(L&&!x&&(e.scaleanchor||S)&&(C=Yb.coerce(e,t,{scaleanchor:{valType:"enumerated",values:p.concat([!1])}},"scaleanchor",S)),x){t._matchGroup=yN(s,f,x,1);var g=i[Lg(x)],P=Mce(i,t)/Mce(i,g);h!==(x.charAt(0)==="x")&&(P=(h?"x":"y")+P),yN(o,f,x,P)}else e.matches&&n.indexOf(e.matches)!==-1&&Yb.warn("ignored "+t._name+'.matches: "'+e.matches+'" to avoid an infinite loop');if(C){var E=d("scaleratio");E||(E=t.scaleratio=1),yN(o,f,C,E)}else e.scaleanchor&&n.indexOf(e.scaleanchor)!==-1&&Yb.warn("ignored "+t._name+'.scaleanchor: "'+e.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function Mce(e,t){var r=t.domain;return r||(r=e[Lg(t.overlaying)].domain),r[1]-r[0]}function kce(e,t){for(var r=0;r<e.length;r++)if(e[r][t])return e[r];return null}function yN(e,t,r,n){var i,a,o,s,l,u=kce(e,t);u===null?(u={},u[t]=1,l=e.length,e.push(u)):l=e.indexOf(u);var c=Object.keys(u);for(i=0;i<e.length;i++)if(o=e[i],i!==l&&o[r]){var f=o[r];for(a=0;a<c.length;a++)s=c[a],o[s]=_N(f,_N(n,u[s]));e.splice(l,1);return}if(n!==1)for(a=0;a<c.length;a++){var h=c[a];u[h]=_N(n,u[h])}u[r]=1}function _N(e,t){var r="",n="",i,a;typeof e=="string"&&(r=e.match(/^[xy]*/)[0],i=r.length,e=+e.slice(i)),typeof t=="string"&&(n=t.match(/^[xy]*/)[0],a=n.length,t=+t.slice(a));var o=e*t;return!i&&!a?o:!i||!a||r.charAt(0)===n.charAt(0)?r+n+e*t:i===a?o:(i>a?r.slice(a):n.slice(i))+o}function Rft(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;o<a.length;o++){var s=a[o],l=e[s];if(typeof l=="string"){var u=l.match(/^[xy]*/)[0],c=u.length;l=+l.slice(c);for(var f=u.charAt(0)==="y"?n:1/n,h=0;h<c;h++)l*=f}i[s]=l}return i}MM.enforce=function(t){var r=t._fullLayout,n=r._axisConstraintGroups||[],i,a,o,s,l,u,c,f;for(i=0;i<n.length;i++){o=Rft(n[i],r);var h=Object.keys(o),d=1/0,v=0,m=1/0,b={},p={},k=!1;for(a=0;a<h.length;a++)s=h[a],p[s]=l=r[Lg(s)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),b[s]=u=Math.abs(l._m)/o[s],d=Math.min(d,u),(l.constrain==="domain"||!l._constraintShrinkable)&&(m=Math.min(m,u)),delete l._constraintShrinkable,v=Math.max(v,u),l.constrain==="domain"&&(k=!0);if(!(d>Lft*v&&!k)){for(a=0;a<h.length;a++)if(s=h[a],u=b[s],l=p[s],c=l.constrain,u!==m||c==="domain")if(f=u/m,c==="range")Sce(l,f);else{var M=l._inputDomain,T=(l.domain[1]-l.domain[0])/(M[1]-M[0]),L=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if(f/=T,f*L<1){l.domain=l._input.domain=M.slice(),Sce(l,f);continue}if(L<1&&(l.range=l._input.range=l._inputRange.slice(),f*=L),l.autorange){var x=l.r2l(l.range[0]),C=l.r2l(l.range[1]),S=(x+C)/2,g=S,P=S,E=Math.abs(C-S),z=S-E*f*1.0001,q=S+E*f*1.0001,U=mN.makePadFn(r,l,0),G=mN.makePadFn(r,l,1);Ece(l,f);var Z=Math.abs(l._m),j=mN.concatExtremes(t,l),N=j.min,H=j.max,re,oe;for(oe=0;oe<N.length;oe++)re=N[oe].val-U(N[oe])/Z,re>z&&re<g&&(g=re);for(oe=0;oe<H.length;oe++)re=H[oe].val+G(H[oe])/Z,re<q&&re>P&&(P=re);var _e=(P-g)/(2*E);f/=_e,g=l.l2r(g),P=l.l2r(P),l.range=l._input.range=x<C?[g,P]:[P,g]}Ece(l,f)}}}};MM.getAxisGroup=function(t,r){for(var n=t._axisMatchGroups,i=0;i<n.length;i++){var a=n[i];if(a[r])return"g"+i}return r};MM.clean=function(t,r){if(r._inputDomain){for(var n=!1,i=r._id,a=t._fullLayout._axisConstraintGroups,o=0;o<a.length;o++)if(a[o][i]){n=!0;break}(!n||r.constrain!=="domain")&&(r._input.domain=r.domain=r._inputDomain,delete r._inputDomain)}};function Ece(e,t){var r=e._inputDomain,n=Pft[e.constraintoward],i=r[0]+(r[1]-r[0])*n;e.domain=e._input.domain=[i+(r[0]-i)/t,i+(r[1]-i)/t],e.setScale()}});var CM=ye(pd=>{"use strict";var _P=qa(),Nv=Oa(),Jp=Mc(),M0=Pr(),xN=Zl(),bN=bM(),EM=ka(),aT=So(),Cce=zb(),Dce=pN(),kM=ho(),Fy=Dh(),Fce=Kb(),Dft=Fce.enforce,Fft=Fce.clean,Lce=Mg().doAutoRange,zce="start",zft="middle",qce="end",qft=Rh().zindexSeparator;pd.layoutStyles=function(e){return M0.syncOrAsync([Jp.doAutoMargin,Bft],e)};function Oft(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 Bft(e){var t=e._fullLayout,r=t._size,n=r.p,i=kM.list(e,"",!0),a,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":t.width+"px",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":t.height+"px"}).selectAll(".main-svg").call(aT.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),pd.drawMainTitle(e),Dce.manage(e),!t._has("cartesian"))return Jp.previousPromises(e);function f(Le,me,Pe){var ce=Le._lw/2;if(Le._id.charAt(0)==="x"){if(me){if(Pe==="top")return me._offset-n-ce}else return r.t+r.h*(1-(Le.position||0))+ce%1;return me._offset+me._length+n+ce}if(me){if(Pe==="right")return me._offset+me._length+n+ce}else return r.l+r.w*(Le.position||0)+ce%1;return me._offset-n-ce}for(a=0;a<i.length;a++){l=i[a];var h=l._anchorAxis;l._linepositions={},l._lw=aT.crispRound(e,l.linewidth,1),l._mainLinePosition=f(l,h,l.side),l._mainMirrorPosition=l.mirror&&h?f(l,h,Fy.OPPOSITE_SIDE[l.side]):null}var d=[],v=[],m=[],b=EM.opacity(t.paper_bgcolor)===1&&EM.opacity(t.plot_bgcolor)===1&&t.paper_bgcolor===t.plot_bgcolor;for(o in t._plots)if(s=t._plots[o],s.mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var p=s.xaxis.domain,k=s.yaxis.domain,M=s.plotgroup;if(Oft(p,k,m)&&o.indexOf(qft)===-1){var T=M.node(),L=s.bg=M0.ensureSingle(M,"rect","bg");T.insertBefore(L.node(),T.childNodes[0]),v.push(o)}else M.select("rect.bg").remove(),m.push([p,k]),b||(d.push(o),v.push(o))}var x=t._bgLayer.selectAll(".bg").data(d);for(x.enter().append("rect").classed("bg",!0),x.exit().remove(),x.each(function(Le){t._plots[Le].bg=_P.select(this)}),a=0;a<v.length;a++)s=t._plots[v[a]],u=s.xaxis,c=s.yaxis,s.bg&&u._offset!==void 0&&c._offset!==void 0&&s.bg.call(aT.setRect,u._offset-n,c._offset-n,u._length+2*n,c._length+2*n).call(EM.fill,t.plot_bgcolor).style("stroke-width",0);if(!t._hasOnlyLargeSploms)for(o in t._plots){s=t._plots[o],u=s.xaxis,c=s.yaxis;var C=s.clipId="clip"+t._uid+o+"plot",S=M0.ensureSingleById(t._clips,"clipPath",C,function(Le){Le.classed("plotclip",!0).append("rect")});s.clipRect=S.select("rect").attr({width:u._length,height:c._length}),aT.setTranslate(s.plot,u._offset,c._offset);var g,P;s._hasClipOnAxisFalse?(g=null,P=C):(g=C,P=null),aT.setClipUrl(s.plot,g,e),s.layerClipId=P}var E,z,q,U,G,Z,j,N,H,re,oe,_e,ke;function Ce(Le){return"M"+E+","+Le+"H"+z}function ge(Le){return"M"+u._offset+","+Le+"h"+u._length}function ie(Le){return"M"+Le+","+N+"V"+j}function Se(Le){return c._shift!==void 0&&(Le+=c._shift),"M"+Le+","+c._offset+"v"+c._length}function Ee(Le,me,Pe){if(!Le.showline||o!==Le._mainSubplot)return"";if(!Le._anchorAxis)return Pe(Le._mainLinePosition);var ce=me(Le._mainLinePosition);return Le.mirror&&(ce+=me(Le._mainMirrorPosition)),ce}for(o in t._plots){s=t._plots[o],u=s.xaxis,c=s.yaxis;var we="M0,0";Pce(u,o)&&(G=yP(u,"left",c,i),E=u._offset-(G?n+G:0),Z=yP(u,"right",c,i),z=u._offset+u._length+(Z?n+Z:0),q=f(u,c,"bottom"),U=f(u,c,"top"),ke=!u._anchorAxis||o!==u._mainSubplot,ke&&(u.mirror==="allticks"||u.mirror==="all")&&(u._linepositions[o]=[q,U]),we=Ee(u,Ce,ge),ke&&u.showline&&(u.mirror==="all"||u.mirror==="allticks")&&(we+=Ce(q)+Ce(U)),s.xlines.style("stroke-width",u._lw+"px").call(EM.stroke,u.showline?u.linecolor:"rgba(0,0,0,0)")),s.xlines.attr("d",we);var De="M0,0";Pce(c,o)&&(oe=yP(c,"bottom",u,i),j=c._offset+c._length+(oe?n:0),_e=yP(c,"top",u,i),N=c._offset-(_e?n:0),H=f(c,u,"left"),re=f(c,u,"right"),ke=!c._anchorAxis||o!==c._mainSubplot,ke&&(c.mirror==="allticks"||c.mirror==="all")&&(c._linepositions[o]=[H,re]),De=Ee(c,ie,Se),ke&&c.showline&&(c.mirror==="all"||c.mirror==="allticks")&&(De+=ie(H)+ie(re)),s.ylines.style("stroke-width",c._lw+"px").call(EM.stroke,c.showline?c.linecolor:"rgba(0,0,0,0)")),s.ylines.attr("d",De)}return kM.makeClipPaths(e),Jp.previousPromises(e)}function Pce(e,t){return(e.ticks||e.showline)&&(t===e._mainSubplot||e.mirror==="all"||e.mirror==="allticks")}function Ice(e,t,r){if(!r.showline||!r._lw)return!1;if(r.mirror==="all"||r.mirror==="allticks")return!0;var n=r._anchorAxis;if(!n)return!1;var i=Fy.FROM_BL[t];return r.side===t?n.domain[i]===e.domain[i]:r.mirror&&n.domain[1-i]===e.domain[1-i]}function yP(e,t,r,n){if(Ice(e,t,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&Ice(e,t,a))return a._lw}return 0}pd.drawMainTitle=function(e){var t=e._fullLayout.title,r=e._fullLayout,n=Wft(r),i=Xft(r),a=jft(r,i),o=Hft(r,n);if(Cce.draw(e,"gtitle",{propContainer:r,propName:"title.text",subtitlePropName:"title.subtitle.text",placeholder:r._dfltTitle.plot,subtitlePlaceholder:r._dfltTitle.subtitle,attributes:{x:o,y:a,"text-anchor":n,dy:i}}),t.text&&t.automargin){var s=_P.select(e).selectAll(".gtitle"),l=aT.bBox(_P.select(e).selectAll(".g-gtitle").node()).height,u=Vft(e,t,l);if(u>0){Gft(e,a,u,l),s.attr({x:o,y:a,"text-anchor":n,dy:Rce(t.yanchor)}).call(xN.positionText,o,a);var c=(t.text.match(xN.BR_TAG_ALL)||[]).length;if(c){var f=Fy.LINE_SPACING*c+Fy.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var b=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",b)})}var h=_P.select(e).selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),v=d.y+d.height,m=v+Cce.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:m,"text-anchor":n,dy:Rce(t.yanchor)}).call(xN.positionText,o,m)}}}};function Nft(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 Uft(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 Vft(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=Uft(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function Gft(e,t,r,n){var i="title.automargin",a=e._fullLayout.title,o=a.y>.5?"t":"b",s={x:a.x,y:a.y,t:0,b:0},l={};a.yref==="paper"&&Nft(e,a,o,t,n)?s[o]=r:a.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[i]=l),Jp.allowAutoMargin(e,i),Jp.autoMargin(e,i,s)}function Hft(e,t){var r=e.title,n=e._size,i=0;switch(t===zce?i=r.pad.l:t===qce&&(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 jft(e,t){var r=e.title,n=e._size,i=0;if(t==="0em"||!t?i=-r.pad.b:t===Fy.CAP_SHIFT+"em"&&(i=r.pad.t),r.y==="auto")return n.t/2;switch(r.yref){case"paper":return n.t+n.h-n.h*r.y+i;case"container":default:return e.height-e.height*r.y+i}}function Rce(e){return e==="top"?Fy.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Fy.MID_SHIFT+"em"}function Wft(e){var t=e.title,r=zft;return M0.isRightAnchor(t)?r=qce:M0.isLeftAnchor(t)&&(r=zce),r}function Xft(e){var t=e.title,r="0em";return M0.isTopAnchor(t)?r=Fy.CAP_SHIFT+"em":M0.isMiddleAnchor(t)&&(r=Fy.MID_SHIFT+"em"),r}pd.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n<t.length;n++){var i=t[n],a=i[0]||{},o=a.trace||{},s=o._module||{},l=s.arraysToCalcdata;l&&l(i,o);var u=s.editStyle;u&&r.push({fn:u,cd0:a})}if(r.length){for(n=0;n<r.length;n++){var c=r[n];c.fn(e,c.cd0)}bN(e),pd.redrawReglTraces(e)}return Jp.style(e),Nv.getComponentMethod("legend","draw")(e),Jp.previousPromises(e)};pd.doColorBars=function(e){return Nv.getComponentMethod("colorbar","draw")(e),Jp.previousPromises(e)};pd.layoutReplot=function(e){var t=e.layout;return e.layout=void 0,Nv.call("_doPlot",e,"",t)};pd.doLegend=function(e){return Nv.getComponentMethod("legend","draw")(e),Jp.previousPromises(e)};pd.doTicksRelayout=function(e){return kM.draw(e,"redraw"),e._fullLayout._hasOnlyLargeSploms&&(Nv.subplotsRegistry.splom.updateGrid(e),bN(e),pd.redrawReglTraces(e)),pd.drawMainTitle(e),Jp.previousPromises(e)};pd.doModeBar=function(e){var t=e._fullLayout;Dce.manage(e);for(var r=0;r<t._basePlotModules.length;r++){var n=t._basePlotModules[r].updateFx;n&&n(e)}return Jp.previousPromises(e)};pd.doCamera=function(e){for(var t=e._fullLayout,r=t._subplots.gl3d,n=0;n<r.length;n++){var i=t[r[n]],a=i._scene;a.setViewport(i)}};pd.drawData=function(e){var t=e._fullLayout;bN(e);for(var r=t._basePlotModules,n=0;n<r.length;n++)r[n].plot(e);return pd.redrawReglTraces(e),Jp.style(e),Nv.getComponentMethod("selections","draw")(e),Nv.getComponentMethod("shapes","draw")(e),Nv.getComponentMethod("annotations","draw")(e),Nv.getComponentMethod("images","draw")(e),t._replotting=!1,Jp.previousPromises(e)};pd.redrawReglTraces=function(e){var t=e._fullLayout;if(t._has("regl")){var r=e._fullData,n=[],i=[],a,o;for(t._hasOnlyLargeSploms&&t._splomGrid.draw(),a=0;a<r.length;a++){var s=r[a];s.visible===!0&&s._length!==0&&(s.type==="splom"?t._splomScenes[s.uid].draw():s.type==="scattergl"?M0.pushUnique(n,s.xaxis+s.yaxis):s.type==="scatterpolargl"&&M0.pushUnique(i,s.subplot))}for(a=0;a<n.length;a++)o=t._plots[n[a]],o._scene&&o._scene.draw();for(a=0;a<i.length;a++)o=t[i[a]]._subplot,o._scene&&o._scene.draw()}};pd.doAutoRangeAndConstraints=function(e){for(var t=kM.list(e,"",!0),r,n={},i=0;i<t.length;i++)if(r=t[i],!n[r._id]){n[r._id]=1,Fft(e,r),Lce(e,r);var a=r._matchGroup;if(a)for(var o in a){var s=kM.getFromId(e,o);Lce(e,s,r.range),n[o]=1}}Dft(e)};pd.finalDraw=function(e){Nv.getComponentMethod("rangeslider","draw")(e),Nv.getComponentMethod("rangeselector","draw")(e)};pd.drawMarginPushers=function(e){Nv.getComponentMethod("legend","draw")(e),Nv.getComponentMethod("rangeselector","draw")(e),Nv.getComponentMethod("sliders","draw")(e),Nv.getComponentMethod("updatemenus","draw")(e),Nv.getComponentMethod("colorbar","draw")(e)}});var AN=ye((dor,Vce)=>{"use strict";var Zft=m_().readPaths,Yft=lP(),Oce=o_().clearOutlineControllers,wN=ka(),Bce=So(),Kft=vl().arrayEditor,Nce=x_(),Jft=Nce.getPathString;Vce.exports={draw:xP,drawOne:Uce,activateLastSelection:eht};function xP(e){var t=e._fullLayout;Oce(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i<t.selections.length;i++)Uce(e,i)}function bP(e){return e._context.editSelection}function Uce(e,t){e._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+t+'"]').remove();var r=Nce.makeSelectionsOptionsAndPlotinfo(e,t),n=r.options,i=r.plotinfo;if(!n._input)return;a(e._fullLayout._selectionLayer);function a(o){var s=Jft(e,n),l={"data-index":t,"fill-rule":"evenodd",d:s},u=n.opacity,c="rgba(0,0,0,0)",f=n.line.color||wN.contrast(e._fullLayout.plot_bgcolor),h=n.line.width,d=n.line.dash;h||(h=5,d="solid");var v=bP(e)&&e._fullLayout._activeSelectionIndex===t;v&&(c=e._fullLayout.activeselection.fillcolor,u=e._fullLayout.activeselection.opacity);for(var m=[],b=1;b>=0;b--){var p=o.append("path").attr(l).style("opacity",b?.1:u).call(wN.stroke,f).call(wN.fill,c).call(Bce.dashLine,b?"solid":d,b?4+h:h);if($ft(p,e,n),v){var k=Kft(e.layout,"selections",n);p.style({cursor:"move"});var M={element:p.node(),plotinfo:i,gd:e,editHelpers:k,isActiveSelection:!0},T=Zft(s,e);Yft(T,p,M)}else p.style("pointer-events",b?"all":"none");m[b]=p}var L=m[0],x=m[1];x.node().addEventListener("click",function(){return Qft(e,L)})}}function $ft(e,t,r){var n=r.xref+r.yref;Bce.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function Qft(e,t){if(bP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){TN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=TN,xP(e)}}}function eht(e){if(bP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=TN,xP(e)}}function TN(e){if(bP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(Oce(e),delete e._fullLayout._activeSelectionIndex,xP(e))}}});var Hce=ye((vor,Gce)=>{function tht(){var e,t=0,r=!1;function n(i,a){return e.list.push({type:i,data:a?JSON.parse(JSON.stringify(a)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(i,a){return n("check",{seg1:i,seg2:a})},segmentChop:function(i,a){return n("div_seg",{seg:i,pt:a}),n("chop",{seg:i,pt:a})},statusRemove:function(i){return n("pop_seg",{seg:i})},segmentUpdate:function(i){return n("seg_update",{seg:i})},segmentNew:function(i,a){return n("new_seg",{seg:i,primary:a})},segmentRemove:function(i){return n("rem_seg",{seg:i})},tempStatus:function(i,a,o){return n("temp_status",{seg:i,above:a,below:o})},rewind:function(i){return n("rewind",{seg:i})},status:function(i,a,o){return n("status",{seg:i,above:a,below:o})},vert:function(i){return i===r?e:(r=i,n("vert",{x:i}))},log:function(i){return typeof i!="string"&&(i=JSON.stringify(i,!1," ")),n("log",{txt:i})},reset:function(){return n("reset")},selected:function(i){return n("selected",{segs:i})},chainStart:function(i){return n("chain_start",{seg:i})},chainRemoveHead:function(i,a){return n("chain_rem_head",{index:i,pt:a})},chainRemoveTail:function(i,a){return n("chain_rem_tail",{index:i,pt:a})},chainNew:function(i,a){return n("chain_new",{pt1:i,pt2:a})},chainMatch:function(i){return n("chain_match",{index:i})},chainClose:function(i){return n("chain_close",{index:i})},chainAddHead:function(i,a){return n("chain_add_head",{index:i,pt:a})},chainAddTail:function(i,a){return n("chain_add_tail",{index:i,pt:a})},chainConnect:function(i,a){return n("chain_con",{index1:i,index2:a})},chainReverse:function(i){return n("chain_rev",{index:i})},chainJoin:function(i,a){return n("chain_join",{index1:i,index2:a})},done:function(){return n("done")}},e}Gce.exports=tht});var Wce=ye((por,jce)=>{function rht(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,n,i){var a=n[0],o=n[1],s=i[0],l=i[1],u=r[0],c=r[1];return(s-a)*(c-o)-(l-o)*(u-a)>=-e},pointBetween:function(r,n,i){var a=r[1]-n[1],o=i[0]-n[0],s=r[0]-n[0],l=i[1]-n[1],u=s*o+a*l;if(u<e)return!1;var c=o*o+l*l;return!(u-c>-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])<e},pointsSameY:function(r,n){return Math.abs(r[1]-n[1])<e},pointsSame:function(r,n){return t.pointsSameX(r,n)&&t.pointsSameY(r,n)},pointsCompare:function(r,n){return t.pointsSameX(r,n)?t.pointsSameY(r,n)?0:r[1]<n[1]?-1:1:r[0]<n[0]?-1:1},pointsCollinear:function(r,n,i){var a=r[0]-n[0],o=r[1]-n[1],s=n[0]-i[0],l=n[1]-i[1];return Math.abs(a*l-s*o)<e},linesIntersect:function(r,n,i,a){var o=n[0]-r[0],s=n[1]-r[1],l=a[0]-i[0],u=a[1]-i[1],c=o*u-s*l;if(Math.abs(c)<e)return!1;var f=r[0]-i[0],h=r[1]-i[1],d=(l*h-u*f)/c,v=(o*h-s*f)/c,m={alongA:0,alongB:0,pt:[r[0]+d*o,r[1]+d*s]};return d<=-e?m.alongA=-2:d<e?m.alongA=-1:d-1<=-e?m.alongA=0:d-1<e?m.alongA=1:m.alongA=2,v<=-e?m.alongB=-2:v<e?m.alongB=-1:v-1<=-e?m.alongB=0:v-1<e?m.alongB=1:m.alongB=2,m},pointInsideRegion:function(r,n){for(var i=r[0],a=r[1],o=n[n.length-1][0],s=n[n.length-1][1],l=!1,u=0;u<n.length;u++){var c=n[u][0],f=n[u][1];f-a>e!=s-a>e&&(o-c)*(a-f)/(s-f)+c-i>e&&(l=!l),o=c,s=f}return l}};return t}jce.exports=rht});var Zce=ye((gor,Xce)=>{var iht={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;i!==null;){if(r(i)){t.prev=i.prev,t.next=i,i.prev.next=t,i.prev=t;return}n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(i){return i.prev=r,i.next=n,r.next=i,n!==null&&(n.prev=i),i}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};Xce.exports=iht});var Kce=ye((mor,Yce)=>{var LM=Zce();function nht(e,t,r){function n(v,m){return{id:r?r.segmentId():-1,start:v,end:m,myFill:{above:null,below:null},otherFill:null}}function i(v,m,b){return{id:r?r.segmentId():-1,start:v,end:m,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=LM.create();function o(v,m,b,p,k,M){var T=t.pointsCompare(m,k);return T!==0?T:t.pointsSame(b,M)?0:v!==p?v?1:-1:t.pointAboveOrOnLine(b,p?k:M,p?M:k)?1:-1}function s(v,m){a.insertBefore(v,function(b){var p=o(v.isStart,v.pt,m,b.isStart,b.pt,b.other.pt);return p<0})}function l(v,m){var b=LM.node({isStart:!0,pt:v.start,seg:v,primary:m,other:null,status:null});return s(b,v.end),b}function u(v,m,b){var p=LM.node({isStart:!1,pt:m.end,seg:m,primary:b,other:v,status:null});v.other=p,s(p,v.pt)}function c(v,m){var b=l(v,m);return u(b,v,m),b}function f(v,m){r&&r.segmentChop(v.seg,m),v.other.remove(),v.seg.end=m,v.other.pt=m,s(v.other,v.pt)}function h(v,m){var b=i(m,v.seg.end,v.seg);return f(v,m),c(b,v.primary)}function d(v,m){var b=LM.create();function p(G,Z){var j=G.seg.start,N=G.seg.end,H=Z.seg.start,re=Z.seg.end;return t.pointsCollinear(j,H,re)?t.pointsCollinear(N,H,re)||t.pointAboveOrOnLine(N,H,re)?1:-1:t.pointAboveOrOnLine(j,H,re)?1:-1}function k(G){return b.findTransition(function(Z){var j=p(G,Z.ev);return j>0})}function M(G,Z){var j=G.seg,N=Z.seg,H=j.start,re=j.end,oe=N.start,_e=N.end;r&&r.checkIntersection(j,N);var ke=t.linesIntersect(H,re,oe,_e);if(ke===!1){if(!t.pointsCollinear(H,re,oe)||t.pointsSame(H,_e)||t.pointsSame(re,oe))return!1;var Ce=t.pointsSame(H,oe),ge=t.pointsSame(re,_e);if(Ce&&ge)return Z;var ie=!Ce&&t.pointBetween(H,oe,_e),Se=!ge&&t.pointBetween(re,oe,_e);if(Ce)return Se?h(Z,re):h(G,_e),Z;ie&&(ge||(Se?h(Z,re):h(G,_e)),h(Z,H))}else ke.alongA===0&&(ke.alongB===-1?h(G,oe):ke.alongB===0?h(G,ke.pt):ke.alongB===1&&h(G,_e)),ke.alongB===0&&(ke.alongA===-1?h(Z,H):ke.alongA===0?h(Z,ke.pt):ke.alongA===1&&h(Z,re));return!1}for(var T=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let G=function(){if(C){var Z=M(L,C);if(Z)return Z}return S?M(L,S):!1};var U=G;r&&r.segmentNew(L.seg,L.primary);var x=k(L),C=x.before?x.before.ev:null,S=x.after?x.after.ev:null;r&&r.tempStatus(L.seg,C?C.seg:!1,S?S.seg:!1);var g=G();if(g){if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,P&&(g.seg.myFill.above=!g.seg.myFill.above)}else g.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(g.seg),L.other.remove(),L.remove()}if(a.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,S?L.seg.myFill.below=S.seg.myFill.above:L.seg.myFill.below=v,P?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var E;S?L.primary===S.primary?E=S.seg.otherFill.above:E=S.seg.myFill.above:E=L.primary?m:v,L.seg.otherFill={above:E,below:E}}r&&r.status(L.seg,C?C.seg:!1,S?S.seg:!1),L.other.status=x.insert(LM.node({ev:L}))}else{var z=L.status;if(z===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(z.prev)&&b.exists(z.next)&&M(z.prev.ev,z.next.ev),r&&r.statusRemove(z.ev.seg),z.remove(),!L.primary){var q=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=q}T.push(L.seg)}a.getHead().remove()}return r&&r.done(),T}return e?{addRegion:function(v){for(var m,b=v[v.length-1],p=0;p<v.length;p++){m=b,b=v[p];var k=t.pointsCompare(m,b);k!==0&&c(n(k<0?m:b,k<0?b:m),!0)}},calculate:function(v){return d(v,!1)}}:{calculate:function(v,m,b,p){return v.forEach(function(k){c(i(k.start,k.end,k),!0)}),b.forEach(function(k){c(i(k.start,k.end,k),!1)}),d(m,p)}}}Yce.exports=nht});var $ce=ye((yor,Jce)=>{function aht(e,t,r){var n=[],i=[];return e.forEach(function(a){var o=a.start,s=a.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(a);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(U,G,Z){return c.index=U,c.matches_head=G,c.matches_pt1=Z,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h<n.length;h++){var d=n[h],v=d[0],m=d[1],b=d[d.length-1],p=d[d.length-2];if(t.pointsSame(v,o)){if(f(h,!0,!0))break}else if(t.pointsSame(v,s)){if(f(h,!0,!1))break}else if(t.pointsSame(b,o)){if(f(h,!1,!0))break}else if(t.pointsSame(b,s)&&f(h,!1,!1))break}if(c===l){n.push([o,s]),r&&r.chainNew(o,s);return}if(c===u){r&&r.chainMatch(l.index);var k=l.index,M=l.matches_pt1?s:o,T=l.matches_head,d=n[k],L=T?d[0]:d[d.length-1],x=T?d[1]:d[d.length-2],C=T?d[d.length-1]:d[0],S=T?d[d.length-2]:d[1];if(t.pointsCollinear(x,L,M)&&(T?(r&&r.chainRemoveHead(l.index,M),d.shift()):(r&&r.chainRemoveTail(l.index,M),d.pop()),L=x),t.pointsSame(C,M)){n.splice(k,1),t.pointsCollinear(S,C,L)&&(T?(r&&r.chainRemoveTail(l.index,L),d.pop()):(r&&r.chainRemoveHead(l.index,L),d.shift())),r&&r.chainClose(l.index),i.push(d);return}T?(r&&r.chainAddHead(l.index,M),d.unshift(M)):(r&&r.chainAddTail(l.index,M),d.push(M));return}function g(U){r&&r.chainReverse(U),n[U].reverse()}function P(U,G){var Z=n[U],j=n[G],N=Z[Z.length-1],H=Z[Z.length-2],re=j[0],oe=j[1];t.pointsCollinear(H,N,re)&&(r&&r.chainRemoveTail(U,N),Z.pop(),N=H),t.pointsCollinear(N,re,oe)&&(r&&r.chainRemoveHead(G,re),j.shift()),r&&r.chainJoin(U,G),n[U]=Z.concat(j),n.splice(G,1)}var E=l.index,z=u.index;r&&r.chainConnect(E,z);var q=n[E].length<n[z].length;l.matches_head?u.matches_head?q?(g(E),P(E,z)):(g(z),P(z,E)):P(z,E):u.matches_head?P(E,z):q?(g(E),P(z,E)):(g(z),P(E,z))}),i}Jce.exports=aht});var efe=ye((_or,Qce)=>{function PM(e,t,r){var n=[];return e.forEach(function(i){var a=(i.myFill.above?8:0)+(i.myFill.below?4:0)+(i.otherFill&&i.otherFill.above?2:0)+(i.otherFill&&i.otherFill.below?1:0);t[a]!==0&&n.push({id:r?r.segmentId():-1,start:i.start,end:i.end,myFill:{above:t[a]===1,below:t[a]===2},otherFill:null})}),r&&r.selected(n),n}var oht={union:function(e,t){return PM(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return PM(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return PM(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return PM(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return PM(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};Qce.exports=oht});var rfe=ye((xor,tfe)=>{var sht={toPolygon:function(e,t){function r(a){if(a.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(a[0]),l=1;l<a.length;l++)s=e.selectDifference(e.combine(s,o(a[l])));return s}if(t.type==="Polygon")return e.polygon(r(t.coordinates));if(t.type==="MultiPolygon"){for(var n=e.segments({inverted:!1,regions:[]}),i=0;i<t.coordinates.length;i++)n=e.selectUnion(e.combine(n,r(t.coordinates[i])));return e.polygon(n)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(e,t,r){r=e.polygon(e.segments(r));function n(d,v){return t.pointInsideRegion([(d[0][0]+d[1][0])*.5,(d[0][1]+d[1][1])*.5],v)}function i(d){return{region:d,children:[]}}var a=i(null);function o(d,v){for(var m=0;m<d.children.length;m++){var b=d.children[m];if(n(v,b.region)){o(b,v);return}}for(var p=i(v),m=0;m<d.children.length;m++){var b=d.children[m];n(b.region,v)&&(p.children.push(b),d.children.splice(m,1),m--)}d.children.push(p)}for(var s=0;s<r.regions.length;s++){var l=r.regions[s];l.length<3||o(a,l)}function u(d,v){for(var m=0,b=d[d.length-1][0],p=d[d.length-1][1],k=[],M=0;M<d.length;M++){var T=d[M][0],L=d[M][1];k.push([T,L]),m+=L*b-T*p,b=T,p=L}var x=m<0;return x!==v&&k.reverse(),k.push([k[0][0],k[0][1]]),k}var c=[];function f(d){var v=[u(d.region,!1)];c.push(v);for(var m=0;m<d.children.length;m++)v.push(h(d.children[m]))}function h(d){for(var v=0;v<d.children.length;v++)f(d.children[v]);return u(d.region,!0)}for(var s=0;s<a.children.length;s++)f(a.children[s]);return c.length<=0?{type:"Polygon",coordinates:[]}:c.length==1?{type:"Polygon",coordinates:c[0]}:{type:"MultiPolygon",coordinates:c}}};tfe.exports=sht});var ofe=ye((bor,afe)=>{var lht=Hce(),uht=Wce(),ife=Kce(),cht=$ce(),IM=efe(),nfe=rfe(),E0=!1,RM=uht(),kp;kp={buildLog:function(e){return e===!0?E0=lht():e===!1&&(E0=!1),E0===!1?!1:E0.list},epsilon:function(e){return RM.epsilon(e)},segments:function(e){var t=ife(!0,RM,E0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=ife(!1,RM,E0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:IM.union(e.combined,E0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:IM.intersect(e.combined,E0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:IM.difference(e.combined,E0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:IM.differenceRev(e.combined,E0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:IM.xor(e.combined,E0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:cht(e.segments,RM,E0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return nfe.toPolygon(kp,e)},polygonToGeoJSON:function(e){return nfe.fromPolygon(kp,RM,e)},union:function(e,t){return DM(e,t,kp.selectUnion)},intersect:function(e,t){return DM(e,t,kp.selectIntersect)},difference:function(e,t){return DM(e,t,kp.selectDifference)},differenceRev:function(e,t){return DM(e,t,kp.selectDifferenceRev)},xor:function(e,t){return DM(e,t,kp.selectXor)}};function DM(e,t,r){var n=kp.segments(e),i=kp.segments(t),a=kp.combine(n,i),o=r(a);return kp.polygon(o)}typeof window=="object"&&(window.PolyBool=kp);afe.exports=kp});var lfe=ye((wor,sfe)=>{sfe.exports=function(t,r,n,i){var a=t[0],o=t[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=r.length);for(var l=i-n,u=0,c=l-1;u<l;c=u++){var f=r[u+n][0],h=r[u+n][1],d=r[c+n][0],v=r[c+n][1],m=h>o!=v>o&&a<(d-f)*(o-h)/(v-h)+f;m&&(s=!s)}return s}});var FM=ye((Tor,ufe)=>{"use strict";var SN=P6().dot,wP=fs().BADNUM,TP=ufe.exports={};TP.tester=function(t){var r=t.slice(),n=r[0][0],i=n,a=r[0][1],o=a,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;s<r.length;s++)n=Math.min(n,r[s][0]),i=Math.max(i,r[s][0]),a=Math.min(a,r[s][1]),o=Math.max(o,r[s][1]);var l=!1,u;r.length===5&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(l=!0,u=function(v){return v[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(l=!0,u=function(v){return v[1]===r[0][1]}));function c(v,m){var b=v[0],p=v[1];return!(b===wP||b<n||b>i||p===wP||p<a||p>o||m&&u(v))}function f(v,m){var b=v[0],p=v[1];if(b===wP||b<n||b>i||p===wP||p<a||p>o)return!1;var k=r.length,M=r[0][0],T=r[0][1],L=0,x,C,S,g,P;for(x=1;x<k;x++)if(C=M,S=T,M=r[x][0],T=r[x][1],g=Math.min(C,M),!(b<g||b>Math.max(C,M)||p>Math.max(S,T)))if(p<Math.min(S,T))b!==g&&L++;else{if(M===C?P=p:P=S+(b-C)*(T-S)/(M-C),p===P)return!(x===1&&m);p<=P&&b!==g&&L++}return L%2===1}var h=!0,d=r[0];for(s=1;s<r.length;s++)if(d[0]!==r[s][0]||d[1]!==r[s][1]){h=!1;break}return{xmin:n,xmax:i,ymin:a,ymax:o,pts:r,contains:l?c:f,isRect:l,degenerate:h}};TP.isSegmentBent=function(t,r,n,i){var a=t[r],o=[t[n][0]-a[0],t[n][1]-a[1]],s=SN(o,o),l=Math.sqrt(s),u=[-o[1]/l,o[0]/l],c,f,h;for(c=r+1;c<n;c++)if(f=[t[c][0]-a[0],t[c][1]-a[1]],h=SN(f,o),h<0||h>s||Math.abs(SN(f,u))>i)return!0;return!1};TP.filter=function(t,r){var n=[t[0]],i=0,a=0;function o(l){t.push(l);var u=n.length,c=i;n.splice(a+1);for(var f=c+1;f<t.length;f++)(f===t.length-1||TP.isSegmentBent(t,c,f+1,r))&&(n.push(t[f]),n.length<u-2&&(i=f,a=n.length-1),c=f)}if(t.length>1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var ffe=ye((Aor,cfe)=>{"use strict";cfe.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var Rfe=ye((Sor,Ife)=>{"use strict";var hfe=ofe(),fht=lfe(),OM=Oa(),hht=So().dashStyle,zM=ka(),dht=vf(),vht=ip().makeEventData,GM=Cg(),pht=GM.freeMode,ght=GM.rectMode,BM=GM.drawMode,CN=GM.openMode,LN=GM.selectMode,dfe=x_(),vfe=TM(),_fe=lP(),xfe=o_().clearOutline,bfe=m_(),MN=bfe.handleEllipse,mht=bfe.readPaths,yht=aP().newShapes,_ht=QB(),xht=AN().activateLastSelection,SP=Pr(),bht=SP.sorterAsc,wfe=FM(),qM=H6(),k0=hf().getFromId,wht=bM(),Tht=CM().redrawReglTraces,MP=ffe(),Cm=MP.MINSELECT,Aht=wfe.filter,PN=wfe.tester,IN=tP(),pfe=IN.p2r,Sht=IN.axValue,Mht=IN.getTransform;function RN(e){return e.subplot!==void 0}function Eht(e,t,r,n,i){var a=!RN(n),o=pht(i),s=ght(i),l=CN(i),u=BM(i),c=LN(i),f=i==="drawline",h=i==="drawcircle",d=f||h,v=n.gd,m=v._fullLayout,b=c&&m.newselection.mode==="immediate"&&a,p=m._zoomlayer,k=n.element.getBoundingClientRect(),M=n.plotinfo,T=Mht(M),L=t-k.left,x=r-k.top;m._calcInverseTransform(v);var C=SP.apply3DTransform(m._invTransform)(L,x);L=C[0],x=C[1];var S=m._invScaleX,g=m._invScaleY,P=L,E=x,z="M"+L+","+x,q=n.xaxes[0],U=n.yaxes[0],G=q._length,Z=U._length,j=e.altKey&&!(BM(i)&&l),N,H,re,oe,_e,ke,Ce;Afe(e,v,n),o&&(N=Aht([[L,x]],MP.BENDPX));var ge=p.selectAll("path.select-outline-"+M.id).data([1]),ie=u?m.newshape:m.newselection;u&&(n.hasText=ie.label.text||ie.label.texttemplate);var Se=u&&!l?ie.fillcolor:"rgba(0,0,0,0)",Ee=ie.line.color||(a?zM.contrast(v._fullLayout.plot_bgcolor):"#7f7f7f");ge.enter().append("path").attr("class","select-outline select-outline-"+M.id).style({opacity:u?ie.opacity/2:1,"stroke-dasharray":hht(ie.line.dash,ie.line.width),"stroke-width":ie.line.width+"px","shape-rendering":"crispEdges"}).call(zM.stroke,Ee).call(zM.fill,Se).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",T).attr("d",z+"Z");var we=p.append("path").attr("class","zoombox-corners").style({fill:zM.background,stroke:zM.defaultLine,"stroke-width":1}).attr("transform",T).attr("d","M0,0Z");if(u&&n.hasText){var De=p.select(".label-temp");De.empty()&&(De=p.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Le=m._uid+MP.SELECTID,me=[],Pe=EP(v,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var He=q._id,lt=U._id;Cfe(v,He,lt,Pe);for(var mt=(v.layout||{}).selections||[],Vt=[],st=!1,ct=0;ct<mt.length;ct++){var Qt=m.selections[ct];!Qt||Qt.xref!==He||Qt.yref!==lt?Vt.push(mt[ct]):st=!0}st&&(v._fullLayout._noEmitSelectedAtStart=!0,OM.call("_guiRelayout",v,{selections:Vt}))}});var ce=Uht(n);n.moveFn=function(He,lt){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),P=Math.max(0,Math.min(G,S*He+L)),E=Math.max(0,Math.min(Z,g*lt+x));var mt=Math.abs(P-L),Vt=Math.abs(E-x);if(s){var st,ct,Qt;if(c){var Ht=m.selectdirection;switch(Ht==="any"?Vt<Math.min(mt*.6,Cm)?st="h":mt<Math.min(Vt*.6,Cm)?st="v":st="d":st=Ht,st){case"h":ct=h?Z/2:0,Qt=Z;break;case"v":ct=h?G/2:0,Qt=G;break}}if(u)switch(m.newshape.drawdirection){case"vertical":st="h",ct=h?Z/2:0,Qt=Z;break;case"horizontal":st="v",ct=h?G/2:0,Qt=G;break;case"ortho":mt<Vt?(st="h",ct=x,Qt=E):(st="v",ct=L,Qt=P);break;default:st="d"}st==="h"?(oe=d?MN(h,[P,ct],[P,Qt]):[[L,ct],[L,Qt],[P,Qt],[P,ct]],oe.xmin=d?P:Math.min(L,P),oe.xmax=d?P:Math.max(L,P),oe.ymin=Math.min(ct,Qt),oe.ymax=Math.max(ct,Qt),we.attr("d","M"+oe.xmin+","+(x-Cm)+"h-4v"+2*Cm+"h4ZM"+(oe.xmax-1)+","+(x-Cm)+"h4v"+2*Cm+"h-4Z")):st==="v"?(oe=d?MN(h,[ct,E],[Qt,E]):[[ct,x],[ct,E],[Qt,E],[Qt,x]],oe.xmin=Math.min(ct,Qt),oe.xmax=Math.max(ct,Qt),oe.ymin=d?E:Math.min(x,E),oe.ymax=d?E:Math.max(x,E),we.attr("d","M"+(L-Cm)+","+oe.ymin+"v-4h"+2*Cm+"v4ZM"+(L-Cm)+","+(oe.ymax-1)+"v4h"+2*Cm+"v-4Z")):st==="d"&&(oe=d?MN(h,[L,x],[P,E]):[[L,x],[L,E],[P,E],[P,x]],oe.xmin=Math.min(L,P),oe.xmax=Math.max(L,P),oe.ymin=Math.min(x,E),oe.ymax=Math.max(x,E),we.attr("d","M0,0Z"))}else o&&(N.addPt([P,E]),oe=N.filtered);if(n.selectionDefs&&n.selectionDefs.length?(re=Sfe(n.mergedPolygons,oe,j),oe.subtract=j,H=DN(n.selectionDefs.concat([oe]))):(re=[oe],H=PN(oe)),_fe(Efe(re,l),ge,n),c){var nr=kN(v,!1),tt=nr.eventData?nr.eventData.points.slice():[];nr=kN(v,!1,H,Pe,n),H=nr.selectionTesters,Ce=nr.eventData;var je;N?je=N.filtered:je=Lfe(re),qM.throttle(Le,MP.SELECTDELAY,function(){me=kfe(H,Pe);for(var Ue=me.slice(),Ae=0;Ae<tt.length;Ae++){for(var rt=tt[Ae],St=!1,Tt=0;Tt<Ue.length;Tt++)if(Ue[Tt].curveNumber===rt.curveNumber&&Ue[Tt].pointNumber===rt.pointNumber){St=!0;break}St||Ue.push(rt)}Ue.length&&(Ce||(Ce={}),Ce.points=Ue),ce(Ce,je),Vht(v,Ce)})}},n.clickFn=function(He,lt){if(we.remove(),v._fullLayout._activeShapeIndex>=0){v._fullLayout._deactivateShape(v);return}if(!u){var mt=m.clickmode;qM.done(Le).then(function(){if(qM.clear(Le),He===2){for(ge.remove(),_e=0;_e<Pe.length;_e++)ke=Pe[_e],ke._module.selectPoints(ke,!1);if(UM(v,Pe),NM(n),zN(v),Pe.length){var Vt=Pe[0].xaxis,st=Pe[0].yaxis;if(Vt&&st){for(var ct=[],Qt=v._fullLayout.selections,Ht=0;Ht<Qt.length;Ht++){var nr=Qt[Ht];nr&&(nr.xref!==Vt._id||nr.yref!==st._id)&&ct.push(nr)}ct.length<Qt.length&&(v._fullLayout._noEmitSelectedAtStart=!0,OM.call("_guiRelayout",v,{selections:ct}))}}}else mt.indexOf("select")>-1&&Tfe(lt,v,n.xaxes,n.yaxes,n.subplot,n,ge),mt==="event"&&VM(v,void 0);dht.click(v,lt,M.id)}).catch(SP.error)}},n.doneFn=function(){we.remove(),qM.done(Le).then(function(){qM.clear(Le),!b&&oe&&n.selectionDefs&&(oe.subtract=j,n.selectionDefs.push(oe),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,re)),(b||u)&&NM(n,b),n.doneFnCompleted&&n.doneFnCompleted(me),c&&VM(v,Ce)}).catch(SP.error)}}function Tfe(e,t,r,n,i,a,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],h,d,v,m,b,p,k,M,T,L;if(Iht(s)){Afe(e,t,a),h=EP(t,r,n,i);var x=Rht(s,h),C=x.pointNumbers.length>0;if(C?Dht(h,x):Fht(h)&&(k=mfe(x))){for(o&&o.remove(),L=0;L<h.length;L++)d=h[L],d._module.selectPoints(d,!1);UM(t,h),NM(a),c&&zN(t)}else{M=e.shiftKey&&(k!==void 0?k:mfe(x)),v=kht(x.pointNumber,x.searchInfo,M);var S=a.selectionDefs.concat([v]);for(m=DN(S,m),L=0;L<h.length;L++)if(b=h[L]._module.selectPoints(h[L],m),p=Mfe(b,h[L]),f.length)for(var g=0;g<p.length;g++)f.push(p[g]);else f=p;if(T={points:f},UM(t,h,T),v&&a&&a.selectionDefs.push(v),o){var P=a.mergedPolygons,E=CN(a.dragmode);_fe(Efe(P,E),o,a)}c&&VM(t,T)}}}function kht(e,t,r){return{pointNumber:e,searchInfo:t,subtract:!!r}}function EN(e){return"pointNumber"in e&&"searchInfo"in e}function Cht(e){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(t,r,n,i){var a=e.searchInfo.cd[0].trace.index,o=i.cd[0].trace.index;return o===a&&n===e.pointNumber},isRect:!1,degenerate:!1,subtract:!!e.subtract}}function DN(e){if(!e.length)return;for(var t=[],r=EN(e[0])?0:e[0][0][0],n=r,i=EN(e[0])?0:e[0][0][1],a=i,o=0;o<e.length;o++)if(EN(e[o]))t.push(Cht(e[o]));else{var s=PN(e[o]);s.subtract=!!e[o].subtract,t.push(s),r=Math.min(r,s.xmin),n=Math.max(n,s.xmax),i=Math.min(i,s.ymin),a=Math.max(a,s.ymax)}function l(u,c,f,h){for(var d=!1,v=0;v<t.length;v++)t[v].contains(u,c,f,h)&&(d=!t[v].subtract);return d}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:l,isRect:!1,degenerate:!1}}function Afe(e,t,r){var n=t._fullLayout,i=r.plotinfo,a=r.dragmode,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===i.id,s=(e.shiftKey||e.altKey)&&!(BM(a)&&CN(a));o&&s&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!s||!i.selection)&&NM(r),o||(xfe(t),n._lastSelectedSubplot=i.id)}function Lht(e){return e._fullLayout._activeShapeIndex>=0}function Pht(e){return e._fullLayout._activeSelectionIndex>=0}function NM(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;Lht(i)&&i._fullLayout._deactivateShape(i),Pht(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=BM(r),l=LN(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&i._fullLayout._outlining){var c;s&&(c=yht(u,e)),c&&OM.call("_guiRelayout",i,{shapes:c});var f;l&&!RN(e)&&(f=_ht(u,e)),f&&(i._fullLayout._noEmitSelectedAtStart=!0,OM.call("_guiRelayout",i,{selections:f}).then(function(){t&&xht(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function gfe(e){return e._id}function EP(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(gfe),o=r.map(gfe),s,l,u;for(u=0;u<e.calcdata.length;u++)if(s=e.calcdata[u],l=s[0].trace,!(l.visible!==!0||!l._module||!l._module.selectPoints))if(RN({subplot:n})&&(l.subplot===n||l.geo===n))i.push(AP(l._module,s,t[0],r[0]));else if(l.type==="splom"){if(l._xaxes[a[0]]&&l._yaxes[o[0]]){var c=AP(l._module,s,t[0],r[0]);c.scene=e._fullLayout._splomScenes[l.uid],i.push(c)}}else if(l.type==="sankey"){var f=AP(l._module,s,t[0],r[0]);i.push(f)}else{if(a.indexOf(l.xaxis)===-1&&(!l._xA||!l._xA.overlaying)||o.indexOf(l.yaxis)===-1&&(!l._yA||!l._yA.overlaying))continue;i.push(AP(l._module,s,k0(e,l.xaxis),k0(e,l.yaxis)))}return i}function AP(e,t,r,n){return{_module:e,cd:t,xaxis:r,yaxis:n}}function Iht(e){return e&&Array.isArray(e)&&e[0].hoverOnBox!==!0}function Rht(e,t){var r=e[0],n=-1,i=[],a,o;for(o=0;o<t.length;o++)if(a=t[o],r.fullData.index===a.cd[0].trace.index){if(r.hoverOnBox===!0)break;r.pointNumber!==void 0?n=r.pointNumber:r.binNumber!==void 0&&(n=r.binNumber,i=r.pointNumbers);break}return{pointNumber:n,pointNumbers:i,searchInfo:a}}function mfe(e){var t=e.searchInfo.cd[0].trace,r=e.pointNumber,n=e.pointNumbers,i=n.length>0,a=i?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function Dht(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 Fht(e){var t=0,r,n,i;for(i=0;i<e.length;i++)if(r=e[i],n=r.cd[0].trace,n.selectedpoints&&(n.selectedpoints.length>1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function UM(e,t,r){var n;for(n=0;n<t.length;n++){var i=t[n].cd[0].trace._fullInput,a=e._fullLayout._tracePreGUI[i.uid]||{};a.selectedpoints===void 0&&(a.selectedpoints=i._input.selectedpoints||null)}var o;if(r){var s=r.points||[];for(n=0;n<t.length;n++)o=t[n].cd[0].trace,o._input.selectedpoints=o._fullInput.selectedpoints=[],o._fullInput!==o&&(o.selectedpoints=[]);for(var l=0;l<s.length;l++){var u=s[l],c=u.data,f=u.fullData,h=u.pointIndex,d=u.pointIndices;d?([].push.apply(c.selectedpoints,d),o._fullInput!==o&&[].push.apply(f.selectedpoints,d)):(c.selectedpoints.push(h),o._fullInput!==o&&f.selectedpoints.push(h))}}else for(n=0;n<t.length;n++)o=t[n].cd[0].trace,delete o.selectedpoints,delete o._input.selectedpoints,o._fullInput!==o&&delete o._fullInput.selectedpoints;zht(e,t)}function zht(e,t){for(var r=!1,n=0;n<t.length;n++){var i=t[n],a=i.cd;OM.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&&(wht(e),Tht(e))}function Sfe(e,t,r){for(var n=r?hfe.difference:hfe.union,i=n({regions:e},{regions:[t]}),a=i.regions.reverse(),o=0;o<a.length;o++){var s=a[o];s.subtract=FN(s,a.slice(0,o))}return a}function Mfe(e,t){if(Array.isArray(e))for(var r=t.cd,n=t.cd[0].trace,i=0;i<e.length;i++)e[i]=vht(e[i],n,r);return e}function Efe(e,t){for(var r=[],n=0;n<e.length;n++){r[n]=[];for(var i=0;i<e[n].length;i++){r[n][i]=[],r[n][i][0]=i?"L":"M";for(var a=0;a<e[n][i].length;a++)r[n][i].push(e[n][i][a])}t||r[n].push(["Z",r[n][0][1],r[n][0][2]])}return r}function kfe(e,t){for(var r=[],n,i=[],a,o=0;o<t.length;o++){var s=t[o];a=s._module.selectPoints(s,e),i.push(a),n=Mfe(a,s),r=r.concat(n)}return r}function kN(e,t,r,n,i){var a=!!n,o,s,l;i&&(o=i.plotinfo,s=i.xaxes[0]._id,l=i.yaxes[0]._id);var u=[],c=[],f=yfe(e),h=e._fullLayout;if(o){var d=h._zoomlayer,v=h.dragmode,m=BM(v),b=LN(v);if(m||b){var p=k0(e,s,"x"),k=k0(e,l,"y");if(p&&k){var M=d.selectAll(".select-outline-"+o.id);if(M&&e._fullLayout._outlining&&M.length){for(var T=M[0][0],L=T.getAttribute("d"),x=mht(L,e,o),C=[],S=0;S<x.length;S++){for(var g=x[S],P=[],E=0;E<g.length;E++)P.push([b_(p,g[E][1]),b_(k,g[E][2])]);P.xref=s,P.yref=l,P.subtract=FN(P,C),C.push(P)}f=f.concat(C)}}}}var z=s&&l?[s+l]:h._subplots.cartesian;qht(e);for(var q={},U=0;U<z.length;U++){var G=z[U],Z=G.indexOf("y"),j=G.slice(0,Z),N=G.slice(Z),H=s&&l?r:void 0;if(H=Bht(f,j,N,H),H){var re=n;if(!a){var oe=k0(e,j,"x"),_e=k0(e,N,"y");re=EP(e,[oe],[_e],G);for(var ke=0;ke<re.length;ke++){var Ce=re[ke],ge=Ce.cd[0],ie=ge.trace;if(Ce._module.name==="scattergl"&&!ge.t.xpx){var Se=ie.x,Ee=ie.y,we=ie._length;ge.t.xpx=[],ge.t.ypx=[];for(var De=0;De<we;De++)ge.t.xpx[De]=oe.c2p(Se[De]),ge.t.ypx[De]=_e.c2p(Ee[De])}Ce._module.name==="splom"&&(q[ie.uid]||(q[ie.uid]=!0))}}var Le=kfe(H,re);u=u.concat(Le),c=c.concat(re)}}var me={points:u};UM(e,c,me);var Pe=h.clickmode,ce=Pe.indexOf("event")>-1&&t;if(!o&&t){var He=yfe(e,!0);if(He.length){var lt=He[0].xref,mt=He[0].yref;if(lt&&mt){var Vt=Lfe(He),st=Pfe([k0(e,lt,"x"),k0(e,mt,"y")]);st(me,Vt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ce&&VM(e,me),h._reselect=!1}if(!o&&h._deselect){var ct=h._deselect;s=ct.xref,l=ct.yref,Oht(s,l,c)||Cfe(e,s,l,n),ce&&(me.points.length?VM(e,me):zN(e)),h._deselect=!1}return{eventData:me,selectionTesters:r}}function qht(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 Oht(e,t,r){for(var n=0;n<r.length;n++){var i=r[n];if(i.xaxis&&i.xaxis._id===e&&i.yaxis&&i.yaxis._id===t)return!0}return!1}function Cfe(e,t,r,n){n=EP(e,[k0(e,t,"x")],[k0(e,r,"y")],t+r);for(var i=0;i<n.length;i++){var a=n[i];a._module.selectPoints(a,!1)}UM(e,n)}function Bht(e,t,r,n){for(var i,a=0;a<e.length;a++){var o=e[a];if(!(t!==o.xref||r!==o.yref))if(i){var s=!!o.subtract;i=Sfe(i,o,s),n=DN(i)}else i=[o],n=PN(o)}return n}function yfe(e,t){for(var r=[],n=e._fullLayout,i=n.selections,a=i.length,o=0;o<a;o++)if(!(t&&o!==n._activeSelectionIndex)){var s=i[o];if(s){var l=s.xref,u=s.yref,c=k0(e,l,"x"),f=k0(e,u,"y"),h,d,v,m,b;if(s.type==="rect"){b=[];var p=b_(c,s.x0),k=b_(c,s.x1),M=b_(f,s.y0),T=b_(f,s.y1);b=[[p,M],[p,T],[k,T],[k,M]],h=Math.min(p,k),d=Math.max(p,k),v=Math.min(M,T),m=Math.max(M,T),b.xmin=h,b.xmax=d,b.ymin=v,b.ymax=m,b.xref=l,b.yref=u,b.subtract=!1,b.isRect=!0,r.push(b)}else if(s.type==="path")for(var L=s.path.split("Z"),x=[],C=0;C<L.length;C++){var S=L[C];if(S){S+="Z";var g=dfe.extractPathCoords(S,vfe.paramIsX,"raw"),P=dfe.extractPathCoords(S,vfe.paramIsY,"raw");h=1/0,d=-1/0,v=1/0,m=-1/0,b=[];for(var E=0;E<g.length;E++){var z=b_(c,g[E]),q=b_(f,P[E]);b.push([z,q]),h=Math.min(z,h),d=Math.max(z,d),v=Math.min(q,v),m=Math.max(q,m)}b.xmin=h,b.xmax=d,b.ymin=v,b.ymax=m,b.xref=l,b.yref=u,b.subtract=FN(b,x),x.push(b),r.push(b)}}}}return r}function FN(e,t){for(var r=!1,n=0;n<t.length;n++)for(var i=t[n],a=0;a<e.length;a++)if(fht(e[a],i)){r=!r;break}return r}function b_(e,t){return e.type==="date"&&(t=t.replace("_"," ")),e.type==="log"?e.c2p(t):e.r2p(t,null,e.calendar)}function Lfe(e){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];r=r.concat(i),r=r.concat([i[0]])}return Nht(r)}function Nht(e){return e.isRect=e.length===5&&e[0][0]===e[4][0]&&e[0][1]===e[4][1]&&e[0][0]===e[1][0]&&e[2][0]===e[3][0]&&e[0][1]===e[3][1]&&e[1][1]===e[2][1]||e[0][1]===e[1][1]&&e[2][1]===e[3][1]&&e[0][0]===e[3][0]&&e[1][0]===e[2][0],e.isRect&&(e.xmin=Math.min(e[0][0],e[2][0]),e.xmax=Math.max(e[0][0],e[2][0]),e.ymin=Math.min(e[0][1],e[2][1]),e.ymax=Math.max(e[0][1],e[2][1])),e}function Pfe(e){return function(t,r){for(var n,i,a=0;a<e.length;a++){var o=e[a],s=o._id,l=s.charAt(0);if(r.isRect){n||(n={});var u=r[l+"min"],c=r[l+"max"];u!==void 0&&c!==void 0&&(n[s]=[pfe(o,u),pfe(o,c)].sort(bht))}else i||(i={}),i[s]=r.map(Sht(o))}n&&(t.range=n),i&&(t.lassoPoints=i)}}function Uht(e){var t=e.plotinfo;return t.fillRangeItems||Pfe(e.xaxes.concat(e.yaxes))}function Vht(e,t){e.emit("plotly_selecting",t)}function VM(e,t){t&&(t.selections=(e.layout||{}).selections||[]),e.emit("plotly_selected",t)}function zN(e){e.emit("plotly_deselect",null)}Ife.exports={reselect:kN,prepSelect:Eht,clearOutline:xfe,clearSelectionsCache:NM,selectOnClick:Tfe}});var qN=ye((Mor,Dfe)=>{"use strict";Dfe.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]});var HM=ye((Eor,Ffe)=>{"use strict";Ffe.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}});var Jb=ye((Cor,Ofe)=>{"use strict";var zfe=qN(),qfe=ec(),kP=Rh(),Ght=vl().templatedArray,kor=HM();Ofe.exports=Ght("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:qfe({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:zfe.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:zfe.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",kP.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",kP.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",kP.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",kP.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:qfe({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Lm=ye((Lor,Bfe)=>{"use strict";Bfe.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Pg=ye((Por,Nfe)=>{"use strict";Nfe.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var pf=ye((Ior,Zfe)=>{"use strict";var Ufe=df().axisHoverFormat,{hovertemplateAttrs:Hht,texttemplateAttrs:jht,templatefallbackAttrs:Vfe}=Ll(),Gfe=Tu(),Wht=ec(),Hfe=Pd().dash,Xht=Pd().pattern,Zht=So(),Yht=Lm(),jM=Ao().extendFlat,Kht=Pg();function jfe(e){return{valType:"any",dflt:0,editType:"calc"}}function Wfe(e){return{valType:"any",editType:"calc"}}function Xfe(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Zfe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:jfe("x"),yperiod:jfe("y"),xperiod0:Wfe("x0"),yperiod0:Wfe("y0"),xperiodalignment:Xfe("x"),yperiodalignment:Xfe("y"),xhoverformat:Ufe("x"),yhoverformat:Ufe("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:jht(),texttemplatefallback:Vfe({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:Hht({},{keys:Yht.eventDataKeys}),hovertemplatefallback:Vfe(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:jM({},Hfe,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:Kht(!0),fillgradient:jM({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:Xht,marker:jM({symbol:{valType:"enumerated",values:Zht.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:jM({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:jM({},Hfe,{arrayOk:!0}),editType:"calc"},Gfe("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},Gfe("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:Wht({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var ON=ye((Dor,Jfe)=>{"use strict";var Yfe=Jb(),Kfe=pf().line,Jht=Pd().dash,CP=Ao().extendFlat,$ht=mc().overrideAll,Qht=vl().templatedArray,Ror=HM();Jfe.exports=$ht(Qht("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:CP({},Yfe.xref,{}),yref:CP({},Yfe.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:Kfe.color,width:CP({},Kfe.width,{min:1,dflt:1}),dash:CP({},Jht,{dflt:"dot"})}}),"arraydraw","from-root")});var the=ye((For,ehe)=>{"use strict";var $fe=Pr(),LP=ho(),edt=Zd(),tdt=ON(),Qfe=x_();ehe.exports=function(t,r){edt(t,r,{name:"selections",handleItemDefaults:rdt});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 rdt(e,t,r){function n(x,C){return $fe.coerce(e,t,tdt,x,C)}var i=n("path"),a=i?"path":"rect",o=n("type",a),s=o!=="path";s&&delete t.path,n("opacity"),n("line.color"),n("line.width"),n("line.dash");for(var l=["x","y"],u=0;u<2;u++){var c=l[u],f={_fullLayout:r},h,d,v,m=LP.coerceRef(e,t,f,c);if(h=LP.getFromId(f,m),h._selectionIndices.push(t._index),v=Qfe.rangeToShapePosition(h),d=Qfe.shapePositionToRange(h),s){var b=c+"0",p=c+"1",k=e[b],M=e[p];e[b]=d(e[b],!0),e[p]=d(e[p],!0),LP.coercePosition(t,f,n,m,b),LP.coercePosition(t,f,n,m,p);var T=t[b],L=t[p];T!==void 0&&L!==void 0&&(t[b]=v(T),t[p]=v(L),e[b]=k,e[p]=M)}}s&&$fe.noneOrAll(e,t,["x0","x1","y0","y1"])}});var ihe=ye((zor,rhe)=>{"use strict";rhe.exports=function(t,r,n){n("newselection.mode");var i=n("newselection.line.width");i&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var WM=ye((qor,ohe)=>{"use strict";var idt=Oa(),nhe=Pr(),ahe=hf();ohe.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=idt.subplotsRegistry.cartesian,s=o.idRegex,l=i._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,h=i._has("cartesian"),d=0;d<a.length;d++){var v=a[d];if(nhe.isPlainObject(v)){var m=ahe.cleanId(v.xref,"x",!1),b=ahe.cleanId(v.yref,"y",!1),p=s.x.test(m),k=s.y.test(b);if(p||k){h||nhe.pushUnique(i._basePlotModules,o);var M=!1;p&&u.indexOf(m)===-1&&(u.push(m),M=!0),k&&c.indexOf(b)===-1&&(c.push(b),M=!0),M&&p&&k&&f.push(m+b)}}}}}});var qf=ye((Oor,lhe)=>{"use strict";var she=AN(),XM=Rfe();lhe.exports={moduleType:"component",name:"selections",layoutAttributes:ON(),supplyLayoutDefaults:the(),supplyDrawNewSelectionDefaults:ihe(),includeBasePlot:WM()("selections"),draw:she.draw,drawOne:she.drawOne,reselect:XM.reselect,prepSelect:XM.prepSelect,clearOutline:XM.clearOutline,clearSelectionsCache:XM.clearSelectionsCache,selectOnClick:XM.selectOnClick}});var jN=ye((Bor,khe)=>{"use strict";var GN=qa(),C0=Pr(),uhe=C0.numberFormat,ndt=fd(),adt=UL(),PP=Oa(),yhe=C0.strTranslate,odt=Zl(),che=ka(),w_=So(),sdt=vf(),fhe=ho(),ldt=Eg(),udt=yv(),_he=Cg(),IP=_he.selectingOrDrawing,cdt=_he.freeMode,fdt=Dh().FROM_TL,hdt=bM(),ddt=CM().redrawReglTraces,vdt=Mc(),NN=hf().getFromId,pdt=qf().prepSelect,gdt=qf().clearOutline,mdt=qf().selectOnClick,BN=gN(),HN=Rh(),hhe=HN.MINDRAG,ap=HN.MINZOOM,dhe=!0;function ydt(e,t,r,n,i,a,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,h,d,v,m,b,p,k,M,T,L,x,C,S,g,P,E,z,q,U,G,Z,j;r+=t.yaxis._shift;function N(){if(f=t.xaxis,h=t.yaxis,M=f._length,T=h._length,p=f._offset,k=h._offset,d={},d[f._id]=f,v={},v[h._id]=h,o&&s)for(var Et=t.overlays,pt=0;pt<Et.length;pt++){var Xt=Et[pt].xaxis;d[Xt._id]=Xt;var or=Et[pt].yaxis;v[or._id]=or}m=mhe(d),b=mhe(v),C=vhe(m,s),S=vhe(b,o),g=!S&&!C,x=ghe(e,e._fullLayout._axisMatchGroups,d,v),L=ghe(e,e._fullLayout._axisConstraintGroups,d,v,x);var _r=L.isSubplotConstrained||x.isSubplotConstrained;P=s||_r,E=o||_r;var Er=e._fullLayout;z=Er._has("scattergl"),q=Er._has("splom"),U=Er._has("svg")}N();var H=bdt(S+C,e._fullLayout.dragmode,u),re=bhe(t,o+s+"drag",H,r,n,i,a);if(g&&!u)return re.onmousedown=null,re.style.pointerEvents="none",re;var oe={element:re,gd:e,plotinfo:t};oe.prepFn=function(Et,pt,Xt){var or=oe.dragmode,_r=e._fullLayout.dragmode;_r!==or&&(oe.dragmode=_r),N(),Z=e._fullLayout._invScaleX,j=e._fullLayout._invScaleY,g||(u?Et.shiftKey?_r==="pan"?_r="zoom":IP(_r)||(_r="pan"):Et.ctrlKey&&(_r="pan"):_r="pan"),cdt(_r)?oe.minDrag=1:oe.minDrag=void 0,IP(_r)?(oe.xaxes=m,oe.yaxes=b,pdt(Et,pt,Xt,oe,_r)):(oe.clickFn=ke,IP(or)&&_e(),g||(_r==="zoom"?(oe.moveFn=He,oe.doneFn=mt,oe.minDrag=1,ce(Et,pt,Xt)):_r==="pan"&&(oe.moveFn=nr,oe.doneFn=Ae))),e._fullLayout._redrag=function(){var Er=e._dragdata;if(Er&&Er.element===re){var ei=e._fullLayout.dragmode;IP(ei)||(N(),rt([0,0,M,T]),oe.moveFn(Er.dx,Er.dy))}}};function _e(){oe.plotinfo.selection=!1,gdt(e)}function ke(Et,pt){var Xt=oe.gd;if(Xt._fullLayout._activeShapeIndex>=0){Xt._fullLayout._deactivateShape(Xt);return}var or=Xt._fullLayout.clickmode;if(VN(Xt),Et===2&&!c&&Ue(),u)or.indexOf("select")>-1&&mdt(pt,Xt,m,b,t.id,oe),or.indexOf("event")>-1&&sdt.click(Xt,pt,t.id);else if(Et===1&&c){var _r=o?h:f,Er=o==="s"||s==="w"?0:1,ei=_r._name+".range["+Er+"]",qr=_dt(_r,Er),jr="left",gt="middle";if(_r.fixedrange)return;o?(gt=o==="n"?"top":"bottom",_r.side==="right"&&(jr="right")):s==="e"&&(jr="right"),Xt._context.showAxisRangeEntryBoxes&&GN.select(re).call(odt.makeEditable,{gd:Xt,immediate:!0,background:Xt._fullLayout.paper_bgcolor,text:String(qr),fill:_r.tickfont?_r.tickfont.color:"#444",horizontalAlign:jr,verticalAlign:gt}).on("edit",function(Ge){var Je=_r.d2r(Ge);Je!==void 0&&PP.call("_guiRelayout",Xt,ei,Je)})}}udt.init(oe);var Ce,ge,ie,Se,Ee,we,De,Le,me,Pe;function ce(Et,pt,Xt){var or=re.getBoundingClientRect();Ce=pt-or.left,ge=Xt-or.top,e._fullLayout._calcInverseTransform(e);var _r=C0.apply3DTransform(e._fullLayout._invTransform)(Ce,ge);Ce=_r[0],ge=_r[1],ie={l:Ce,r:Ce,w:0,t:ge,b:ge,h:0},Se=e._hmpixcount?e._hmlumcount/e._hmpixcount:ndt(e._fullLayout.plot_bgcolor).getLuminance(),Ee="M0,0H"+M+"V"+T+"H0V0",we=!1,De="xy",Pe=!1,Le=whe(l,Se,p,k,Ee),me=The(l,p,k)}function He(Et,pt){if(e._transitioningWithDuration)return!1;var Xt=Math.max(0,Math.min(M,Z*Et+Ce)),or=Math.max(0,Math.min(T,j*pt+ge)),_r=Math.abs(Xt-Ce),Er=Math.abs(or-ge);ie.l=Math.min(Ce,Xt),ie.r=Math.max(Ce,Xt),ie.t=Math.min(ge,or),ie.b=Math.max(ge,or);function ei(){De="",ie.r=ie.l,ie.t=ie.b,me.attr("d","M0,0Z")}if(L.isSubplotConstrained)_r>ap||Er>ap?(De="xy",_r/M>Er/T?(Er=_r*T/M,ge>or?ie.t=ge-Er:ie.b=ge+Er):(_r=Er*M/T,Ce>Xt?ie.l=Ce-_r:ie.r=Ce+_r),me.attr("d",RP(ie))):ei();else if(x.isSubplotConstrained)if(_r>ap||Er>ap){De="xy";var qr=Math.min(ie.l/M,(T-ie.b)/T),jr=Math.max(ie.r/M,(T-ie.t)/T);ie.l=qr*M,ie.r=jr*M,ie.b=(1-qr)*T,ie.t=(1-jr)*T,me.attr("d",RP(ie))}else ei();else!S||Er<Math.min(Math.max(_r*.6,hhe),ap)?_r<hhe||!C?ei():(ie.t=0,ie.b=T,De="x",me.attr("d",wdt(ie,ge))):!C||_r<Math.min(Er*.6,ap)?(ie.l=0,ie.r=M,De="y",me.attr("d",Tdt(ie,Ce))):(De="xy",me.attr("d",RP(ie)));ie.w=ie.r-ie.l,ie.h=ie.b-ie.t,De&&(Pe=!0),e._dragged=Pe,Ahe(Le,me,ie,Ee,we,Se),lt(),e.emit("plotly_relayouting",G),we=!0}function lt(){G={},(De==="xy"||De==="x")&&(UN(m,ie.l/M,ie.r/M,G,L.xaxes),tt("x",G)),(De==="xy"||De==="y")&&(UN(b,(T-ie.b)/T,(T-ie.t)/T,G,L.yaxes),tt("y",G))}function mt(){lt(),VN(e),Ae(),Mhe(e)}var Vt=[0,0,M,T],st=null,ct=HN.REDRAWDELAY,Qt=t.mainplot?e._fullLayout._plots[t.mainplot]:t;function Ht(Et){if(!e._context._scrollZoom.cartesian&&!e._fullLayout._enablescrollzoom)return;if(_e(),e._transitioningWithDuration){Et.preventDefault(),Et.stopPropagation();return}N(),clearTimeout(st);var pt=-Et.deltaY;if(isFinite(pt)||(pt=Et.wheelDelta/10),!isFinite(pt)){C0.log("Did not find wheel motion attributes: ",Et);return}var Xt=Math.exp(-Math.min(Math.max(pt,-20),20)/200),or=Qt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),_r=(Et.clientX-or.left)/or.width,Er=(or.bottom-Et.clientY)/or.height,ei;function qr(jr,gt,Ge){if(jr.fixedrange)return;var Je=C0.simpleMap(jr.range,jr.r2l),We=Je[0]+(Je[1]-Je[0])*gt;function et(xt){return jr.l2r(We+(xt-We)*Ge)}jr.range=Je.map(et)}if(P){for(s||(_r=.5),ei=0;ei<m.length;ei++)qr(m[ei],_r,Xt);tt("x"),Vt[2]*=Xt,Vt[0]+=Vt[2]*_r*(1/Xt-1)}if(E){for(o||(Er=.5),ei=0;ei<b.length;ei++)qr(b[ei],Er,Xt);tt("y"),Vt[3]*=Xt,Vt[1]+=Vt[3]*(1-Er)*(1/Xt-1)}rt(Vt),je(),e.emit("plotly_relayouting",G),st=setTimeout(function(){e._fullLayout&&(Vt=[0,0,M,T],Ae())},ct),Et.preventDefault()}o.length*s.length!==1&&Ehe(re,Ht);function nr(Et,pt){if(Et=Et*Z,pt=pt*j,e._transitioningWithDuration)return;if(e._fullLayout._replotting=!0,C==="ew"||S==="ns"){var Xt=C?-Et:0,or=S?-pt:0;if(x.isSubplotConstrained){if(C&&S){var _r=(Et/M-pt/T)/2;Et=_r*M,pt=-_r*T,Xt=-Et,or=-pt}S?Xt=-or*M/T:or=-Xt*T/M}C&&(phe(m,Et),tt("x")),S&&(phe(b,pt),tt("y")),rt([Xt,or,M,T]),je(),e.emit("plotly_relayouting",G);return}function Er(et,xt,At){for(var Kt=1-xt,er,Sr,Gr=0;Gr<et.length;Gr++){var Ir=et[Gr];if(!Ir.fixedrange){er=Ir,Sr=Ir._rl[Kt]+(Ir._rl[xt]-Ir._rl[Kt])/xdt(At/Ir._length);var Yr=Ir.l2r(Sr);Yr!==!1&&Yr!==void 0&&(Ir.range[xt]=Yr)}}return er._length*(er._rl[xt]-Sr)/(er._rl[xt]-er._rl[Kt])}var ei=C==="w"==(S==="n")?1:-1;if(C&&S&&(L.isSubplotConstrained||x.isSubplotConstrained)){var qr=(Et/M+ei*pt/T)/2;Et=qr*M,pt=ei*qr*T}var jr,gt;if(C==="w"?Et=Er(m,0,Et):C==="e"?Et=Er(m,1,-Et):C||(Et=0),S==="n"?pt=Er(b,1,pt):S==="s"?pt=Er(b,0,-pt):S||(pt=0),jr=C==="w"?Et:0,gt=S==="n"?pt:0,L.isSubplotConstrained&&!x.isSubplotConstrained||x.isSubplotConstrained&&C&&S&&ei>0){var Ge;if(x.isSubplotConstrained||!C&&S.length===1){for(Ge=0;Ge<m.length;Ge++)m[Ge].range=m[Ge]._r.slice(),BN(m[Ge],1-pt/T);Et=pt*M/T,jr=Et/2}if(x.isSubplotConstrained||!S&&C.length===1){for(Ge=0;Ge<b.length;Ge++)b[Ge].range=b[Ge]._r.slice(),BN(b[Ge],1-Et/M);pt=Et*T/M,gt=pt/2}}(!x.isSubplotConstrained||!S)&&tt("x"),(!x.isSubplotConstrained||!C)&&tt("y");var Je=M-Et,We=T-pt;x.isSubplotConstrained&&!(C&&S)&&(C?(gt=jr?0:Et*T/M,We=Je*T/M):(jr=gt?0:pt*M/T,Je=We*M/T)),rt([jr,gt,Je,We]),je(),e.emit("plotly_relayouting",G)}function tt(Et,pt){for(var Xt=x.isSubplotConstrained?{x:b,y:m}[Et]:x[Et+"axes"],or=x.isSubplotConstrained?{x:m,y:b}[Et]:[],_r=0;_r<Xt.length;_r++){var Er=Xt[_r],ei=Er._id,qr=x.xLinks[ei]||x.yLinks[ei],jr=or[0]||d[qr]||v[qr];jr&&(pt?(pt[Er._name+".range[0]"]=pt[jr._name+".range[0]"],pt[Er._name+".range[1]"]=pt[jr._name+".range[1]"]):Er.range=jr.range.slice())}}function je(){var Et=[],pt;function Xt(ei){for(pt=0;pt<ei.length;pt++)ei[pt].fixedrange||Et.push(ei[pt]._id)}function or(ei,qr){for(pt=0;pt<ei.length;pt++){var jr=ei[pt],gt=jr[qr];!jr.fixedrange&>.tickmode==="sync"&&Et.push(gt._id)}}for(P&&(Xt(m),Xt(L.xaxes),Xt(x.xaxes),or(t.overlays,"xaxis")),E&&(Xt(b),Xt(L.yaxes),Xt(x.yaxes),or(t.overlays,"yaxis")),G={},pt=0;pt<Et.length;pt++){var _r=Et[pt],Er=NN(e,_r);fhe.drawOne(e,Er,{skipTitle:!0}),G[Er._name+".range[0]"]=Er.range[0],G[Er._name+".range[1]"]=Er.range[1]}fhe.redrawComponents(e,Et)}function Ue(){if(!e._transitioningWithDuration){var Et=e._context.doubleClick,pt=[];C&&(pt=pt.concat(m)),S&&(pt=pt.concat(b)),x.xaxes&&(pt=pt.concat(x.xaxes)),x.yaxes&&(pt=pt.concat(x.yaxes));var Xt={},or,_r;if(Et==="reset+autosize")for(Et="autosize",_r=0;_r<pt.length;_r++){or=pt[_r];var Er=or._rangeInitial0,ei=or._rangeInitial1,qr=Er!==void 0||ei!==void 0;if(qr&&(Er!==void 0&&Er!==or.range[0]||ei!==void 0&&ei!==or.range[1])||!qr&&or.autorange!==!0){Et="reset";break}}if(Et==="autosize")for(_r=0;_r<pt.length;_r++)or=pt[_r],or.fixedrange||(Xt[or._name+".autorange"]=!0);else if(Et==="reset"){for((C||L.isSubplotConstrained)&&(pt=pt.concat(L.xaxes)),S&&!L.isSubplotConstrained&&(pt=pt.concat(L.yaxes)),L.isSubplotConstrained&&(C?S||(pt=pt.concat(b)):pt=pt.concat(m)),_r=0;_r<pt.length;_r++)if(or=pt[_r],!or.fixedrange){var jr=or._name,gt=or._autorangeInitial;or._rangeInitial0===void 0&&or._rangeInitial1===void 0?Xt[jr+".autorange"]=!0:or._rangeInitial0===void 0?(Xt[jr+".autorange"]=gt,Xt[jr+".range"]=[null,or._rangeInitial1]):or._rangeInitial1===void 0?(Xt[jr+".range"]=[or._rangeInitial0,null],Xt[jr+".autorange"]=gt):Xt[jr+".range"]=[or._rangeInitial0,or._rangeInitial1]}}e.emit("plotly_doubleclick",null),PP.call("_guiRelayout",e,Xt)}}function Ae(){rt([0,0,M,T]),C0.syncOrAsync([vdt.previousPromises,function(){e._fullLayout._replotting=!1,PP.call("_guiRelayout",e,G)}],e)}function rt(Et){var pt=e._fullLayout,Xt=pt._plots,or=pt._subplots.cartesian,_r,Er,ei,qr;if(q&&PP.subplotsRegistry.splom.drag(e),z){for(_r=0;_r<or.length;_r++)if(Er=Xt[or[_r]],ei=Er.xaxis,qr=Er.yaxis,Er._scene){ei.limitRange&&ei.limitRange(),qr.limitRange&&qr.limitRange();var jr=C0.simpleMap(ei.range,ei.r2l),gt=C0.simpleMap(qr.range,qr.r2l);Er._scene.update({range:[jr[0],gt[0],jr[1],gt[1]]})}}if((q||z)&&(hdt(e),ddt(e)),U){var Ge=Et[2]/f._length,Je=Et[3]/h._length;for(_r=0;_r<or.length;_r++){Er=Xt[or[_r]],ei=Er.xaxis,qr=Er.yaxis;var We=(P||x.isSubplotConstrained)&&!ei.fixedrange&&d[ei._id],et=(E||x.isSubplotConstrained)&&!qr.fixedrange&&v[qr._id],xt,At,Kt,er;if(We?(xt=Ge,Kt=s||x.isSubplotConstrained?Et[0]:dt(ei,xt)):x.xaHash[ei._id]?(xt=Ge,Kt=Et[0]*ei._length/f._length):x.yaHash[ei._id]?(xt=Je,Kt=S==="ns"?-Et[1]*ei._length/h._length:dt(ei,xt,{n:"top",s:"bottom"}[S])):(xt=St(ei,Ge,Je),Kt=Tt(ei,xt)),xt>1&&(ei.maxallowed!==void 0&&P===(ei.range[0]<ei.range[1]?"e":"w")||ei.minallowed!==void 0&&P===(ei.range[0]<ei.range[1]?"w":"e"))&&(xt=1,Kt=0),et?(At=Je,er=o||x.isSubplotConstrained?Et[1]:dt(qr,At)):x.yaHash[qr._id]?(At=Je,er=Et[1]*qr._length/h._length):x.xaHash[qr._id]?(At=Ge,er=C==="ew"?-Et[0]*qr._length/f._length:dt(qr,At,{e:"right",w:"left"}[C])):(At=St(qr,Ge,Je),er=Tt(qr,At)),At>1&&(qr.maxallowed!==void 0&&E===(qr.range[0]<qr.range[1]?"n":"s")||qr.minallowed!==void 0&&E===(qr.range[0]<qr.range[1]?"s":"n"))&&(At=1,er=0),!(!xt&&!At)){xt||(xt=1),At||(At=1);var Sr=ei._offset-Kt/xt,Gr=qr._offset-er/At;Er.clipRect.call(w_.setTranslate,Kt,er).call(w_.setScale,xt,At),Er.plot.call(w_.setTranslate,Sr,Gr).call(w_.setScale,1/xt,1/At),(xt!==Er.xScaleFactor||At!==Er.yScaleFactor)&&(w_.setPointGroupScale(Er.zoomScalePts,xt,At),w_.setTextPointsScale(Er.zoomScaleTxt,xt,At)),w_.hideOutsideRangePoints(Er.clipOnAxisFalseTraces,Er),Er.xScaleFactor=xt,Er.yScaleFactor=At}}}}function St(Et,pt,Xt){return Et.fixedrange?0:P&&L.xaHash[Et._id]?pt:E&&(L.isSubplotConstrained?L.xaHash:L.yaHash)[Et._id]?Xt:0}function Tt(Et,pt){return pt?(Et.range=Et._r.slice(),BN(Et,pt),dt(Et,pt)):0}function dt(Et,pt,Xt){return Et._length*(1-pt)*fdt[Xt||Et.constraintoward||"middle"]}return re}function xhe(e,t,r,n){var i=C0.ensureSingle(e.draglayer,t,r,function(a){a.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",e.id)});return i.call(ldt,n),i.node()}function bhe(e,t,r,n,i,a,o){var s=xhe(e,"rect",t,r);return GN.select(s).call(w_.setRect,n,i,a,o),s}function vhe(e,t){for(var r=0;r<e.length;r++)if(!e[r].fixedrange)return t;return""}function _dt(e,t){var r=e.range[t],n=Math.abs(r-e.range[1-t]),i;return e.type==="date"?r:e.type==="log"?(i=Math.ceil(Math.max(0,-Math.log(n)/Math.LN10))+3,uhe("."+i+"g")(Math.pow(10,r))):(i=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(n)/Math.LN10)+4,uhe("."+String(i)+"g")(r))}function UN(e,t,r,n,i){for(var a=0;a<e.length;a++){var o=e[a];if(!o.fixedrange)if(o.rangebreaks){var s=o._id.charAt(0)==="y",l=s?1-t:t,u=s?1-r:r;n[o._name+".range[0]"]=o.l2r(o.p2l(l*o._length)),n[o._name+".range[1]"]=o.l2r(o.p2l(u*o._length))}else{var c=o._rl[0],f=o._rl[1]-c;n[o._name+".range[0]"]=o.l2r(c+f*t),n[o._name+".range[1]"]=o.l2r(c+f*r)}}if(i&&i.length){var h=(t+(1-r))/2;UN(i,h,1-h,n,[])}}function phe(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(!n.fixedrange){if(n.rangebreaks){var i=0,a=n._length,o=n.p2l(i+t)-n.p2l(i),s=n.p2l(a+t)-n.p2l(a),l=(o+s)/2;n.range=[n.l2r(n._rl[0]-l),n.l2r(n._rl[1]-l)]}else n.range=[n.l2r(n._rl[0]-t/n._m),n.l2r(n._rl[1]-t/n._m)];n.limitRange&&n.limitRange()}}}function xdt(e){return 1-(e>=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function bdt(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function whe(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",yhe(r,n)).attr("d",i+"Z")}function The(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:che.background,stroke:che.defaultLine,"stroke-width":1,opacity:0}).attr("transform",yhe(t,r)).attr("d","M0,0Z")}function Ahe(e,t,r,n,i,a){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),She(e,t,i,a)}function She(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function VN(e){GN.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Mhe(e){dhe&&e.data&&e._context.showTips&&(C0.notifier(C0._(e,"Double-click to zoom back out"),"long",e),dhe=!1)}function wdt(e,t){return"M"+(e.l-.5)+","+(t-ap-.5)+"h-3v"+(2*ap+1)+"h3ZM"+(e.r+.5)+","+(t-ap-.5)+"h3v"+(2*ap+1)+"h-3Z"}function Tdt(e,t){return"M"+(t-ap-.5)+","+(e.t-.5)+"v-3h"+(2*ap+1)+"v3ZM"+(t-ap-.5)+","+(e.b+.5)+"v3h"+(2*ap+1)+"v-3Z"}function RP(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,ap)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function ghe(e,t,r,n,i){for(var a=!1,o={},s={},l,u,c,f,h=(i||{}).xaHash,d=(i||{}).yaHash,v=0;v<t.length;v++){var m=t[v];for(l in r)if(m[l]){for(c in m)!(i&&(h[c]||d[c]))&&!(c.charAt(0)==="x"?r:n)[c]&&(o[c]=l);for(u in n)!(i&&(h[u]||d[u]))&&m[u]&&(a=!0)}for(u in n)if(m[u])for(f in m)!(i&&(h[f]||d[f]))&&!(f.charAt(0)==="x"?r:n)[f]&&(s[f]=u)}a&&(C0.extendFlat(o,s),s={});var b={},p=[];for(c in o){var k=NN(e,c);p.push(k),b[k._id]=k}var M={},T=[];for(f in s){var L=NN(e,f);T.push(L),M[L._id]=L}return{xaHash:b,yaHash:M,xaxes:p,yaxes:T,xLinks:o,yLinks:s,isSubplotConstrained:a}}function Ehe(e,t){if(!adt)e.onwheel!==void 0?e.onwheel=t:e.onmousewheel!==void 0?e.onmousewheel=t:e.isAddedWheelEvent||(e.isAddedWheelEvent=!0,e.addEventListener("wheel",t,{passive:!1}));else{var r=e.onwheel!==void 0?"wheel":"mousewheel";e._onwheel&&e.removeEventListener(r,e._onwheel),e._onwheel=t,e.addEventListener(r,t,{passive:!1})}}function mhe(e){var t=[];for(var r in e)t.push(e[r]);return t}khe.exports={makeDragBox:ydt,makeDragger:xhe,makeRectDragger:bhe,makeZoombox:whe,makeCorners:The,updateZoombox:Ahe,xyCorners:RP,transitionZoombox:She,removeZoombox:VN,showDoubleClickNotifier:Mhe,attachWheelEventHandler:Ehe}});var WN=ye(FP=>{"use strict";var Adt=qa(),DP=vf(),Sdt=yv(),Mdt=Eg(),Ig=jN().makeDragBox,gd=Rh().DRAGGERSIZE;FP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){Adt.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var n=Object.keys(r._plots||{}).sort(function(a,o){if((r._plots[a].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=a.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[a].mainplot?1:-1});n.forEach(function(a){var o=r._plots[a],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=Ig(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&DP.hover(t,h,a)},DP.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,Sdt.unhover(t,h))},t._context.showAxisDragHandles&&(Ig(t,o,s._offset-gd,l._offset-gd,gd,gd,"n","w"),Ig(t,o,s._offset+s._length,l._offset-gd,gd,gd,"n","e"),Ig(t,o,s._offset-gd,l._offset+l._length,gd,gd,"s","w"),Ig(t,o,s._offset+s._length,l._offset+l._length,gd,gd,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=gd),Ig(t,o,s._offset+s._length*.1,c,s._length*.8,gd,"","ew"),Ig(t,o,s._offset,c,s._length*.1,gd,"","w"),Ig(t,o,s._offset+s._length*.9,c,s._length*.1,gd,"","e")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=gd),Ig(t,o,f,l._offset+l._length*.1,gd,l._length*.8,"ns",""),Ig(t,o,f,l._offset+l._length*.9,gd,l._length*.1,"s",""),Ig(t,o,f,l._offset,gd,l._length*.1,"n","")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,DP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,DP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},FP.updateFx(t)}};FP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";Mdt(t._draggers,r)}});var Phe=ye((Uor,Lhe)=>{"use strict";var Che=Oa();Lhe.exports=function(t){for(var r=Che.layoutArrayContainers,n=Che.layoutArrayRegexes,i=t.split("[")[0],a,o,s=0;s<n.length;s++)if(o=t.match(n[s]),o&&o.index===0){a=o[0];break}if(a||(a=r[r.indexOf(i)]),!a)return!1;var l=t.slice(a.length);return l?(o=l.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),o?{array:a,index:Number(o[1]),property:o[3]||""}:!1):{array:a,index:"",property:""}}});var Rhe=ye(YM=>{"use strict";var Edt=Ty(),XN=L6(),ZM=K1(),kdt=U6().sorterAsc,ZN=Oa();YM.containerArrayMatch=Phe();var Cdt=YM.isAddVal=function(t){return t==="add"||Edt(t)},Ihe=YM.isRemoveVal=function(t){return t===null||t==="remove"};YM.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=ZN.getComponentMethod(o,"supplyLayoutDefaults"),l=ZN.getComponentMethod(o,"draw"),u=ZN.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||s===XN||l===XN,f=t.layout,h=t._fullLayout;if(n[""]){Object.keys(n).length>1&&ZM.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(Ihe(d))r.set(null);else if(Array.isArray(d))r.set(d);else return ZM.warn("Unrecognized full array edit value",o,d),!0;return c?!1:(s(f,h),l(t),!0)}var v=Object.keys(n).map(Number).sort(kdt),m=r.get(),b=m||[],p=a(h,o).get(),k=[],M=-1,T=b.length,L,x,C,S,g,P,E,z;for(L=0;L<v.length;L++){if(C=v[L],S=n[C],g=Object.keys(S),P=S[""],E=Cdt(P),C<0||C>b.length-(E?0:1)){ZM.warn("index out of range",o,C);continue}if(P!==void 0)g.length>1&&ZM.warn("Insertion & removal are incompatible with edits to the same index.",o,C),Ihe(P)?k.push(C):E?(P==="add"&&(P={}),b.splice(C,0,P),p&&p.splice(C,0,{})):ZM.warn("Unrecognized full object edit value",o,C,P),M===-1&&(M=C);else for(x=0;x<g.length;x++)z=o+"["+C+"].",a(b[C],g[x],z).set(S[g[x]])}for(L=k.length-1;L>=0;L--)b.splice(k[L],1),p&&p.splice(k[L],1);if(b.length?m||r.set(b):r.set(null),c)return!1;if(s(f,h),u!==XN){var q;if(M===-1)q=v;else{for(T=Math.max(b.length,T),q=[],L=0;L<v.length&&(C=v[L],!(C>=M));L++)q.push(C);for(L=M;L<T;L++)q.push(L)}for(L=0;L<q.length;L++)u(t,q[L])}else l(t);return!0}});var Uhe=ye(L0=>{"use strict";var qhe=Eo(),Ohe=Oa(),Uv=Pr(),KM=Mc(),Bhe=hf(),Nhe=ka(),JM=Bhe.cleanId,Ldt=Bhe.getFromTrace,YN=Ohe.traceIs,Pdt=["x","y","z"];L0.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Uv.log("Clearing previous rejected promises from queue."),e._promises=[]};L0.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(KM.subplotsRegistry.cartesian||{}).attrRegex,i=(KM.subplotsRegistry.polar||{}).attrRegex,a=(KM.subplotsRegistry.ternary||{}).attrRegex,o=(KM.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t<s.length;t++){var l=s[t];if(n&&n.test(l)){var u=e[l];u.anchor&&u.anchor!=="free"&&(u.anchor=JM(u.anchor)),u.overlaying&&(u.overlaying=JM(u.overlaying)),u.type||(u.isdate?u.type="date":u.islog?u.type="log":u.isdate===!1&&u.islog===!1&&(u.type="linear")),(u.autorange==="withzero"||u.autorange==="tozero")&&(u.autorange=!0,u.rangemode="tozero"),u.insiderange&&delete u.range,delete u.islog,delete u.isdate,delete u.categories,zP(u,"domain")&&delete u.domain}}var c=Array.isArray(e.annotations)?e.annotations.length:0;for(t=0;t<c;t++){var f=e.annotations[t];Uv.isPlainObject(f)&&(oT(f,"xref"),oT(f,"yref"))}var h=Array.isArray(e.shapes)?e.shapes.length:0;for(t=0;t<h;t++){var d=e.shapes[t];Uv.isPlainObject(d)&&(oT(d,"xref",!0),oT(d,"yref",!0))}var v=Array.isArray(e.images)?e.images.length:0;for(t=0;t<v;t++){var m=e.images[t];Uv.isPlainObject(m)&&(oT(m,"xref"),oT(m,"yref"))}var b=e.legend;return b&&(b.x>3?(b.x=1.02,b.xanchor="left"):b.x<-2&&(b.x=-.02,b.xanchor="right"),b.y>3?(b.y=1.02,b.yanchor="bottom"):b.y<-2&&(b.y=-.02,b.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),Nhe.clean(e),e.template&&e.template.layout&&L0.cleanLayout(e.template.layout),e};function oT(e,t,r=!1){var n=e[t],i=t.charAt(0);r&&Array.isArray(n)||n&&n!=="paper"&&(e[t]=JM(n,i,!0))}L0.cleanData=function(e){for(var t=0;t<e.length;t++){var r=e[t],n;if(r.type==="histogramy"&&"xbins"in r&&!("ybins"in r)&&(r.ybins=r.xbins,delete r.xbins),r.type==="histogramy"&&L0.swapXYData(r),(r.type==="histogramx"||r.type==="histogramy")&&(r.type="histogram"),"scl"in r&&!("colorscale"in r)&&(r.colorscale=r.scl,delete r.scl),"reversescl"in r&&!("reversescale"in r)&&(r.reversescale=r.reversescl,delete r.reversescl),r.xaxis&&(r.xaxis=JM(r.xaxis,"x")),r.yaxis&&(r.yaxis=JM(r.yaxis,"y")),YN(r,"gl3d")&&r.scene&&(r.scene=KM.subplotsRegistry.gl3d.cleanId(r.scene)),!YN(r,"pie-like")&&!YN(r,"bar-like"))if(Array.isArray(r.textposition))for(n=0;n<r.textposition.length;n++)r.textposition[n]=Fhe(r.textposition[n]);else r.textposition&&(r.textposition=Fhe(r.textposition));var i=Ohe.getModule(r);if(i&&i.colorbar){var a=i.colorbar.container,o=a?r[a]:r;o&&o.colorscale&&(o.colorscale==="YIGnBu"&&(o.colorscale="YlGnBu"),o.colorscale==="YIOrRd"&&(o.colorscale="YlOrRd"))}if(r.type==="surface"&&Uv.isPlainObject(r.contours)){var s=["x","y","z"];for(n=0;n<s.length;n++){var l=r.contours[s[n]];Uv.isPlainObject(l)&&(l.highlightColor&&(l.highlightcolor=l.highlightColor,delete l.highlightColor),l.highlightWidth&&(l.highlightwidth=l.highlightWidth,delete l.highlightWidth))}}if(r.type==="candlestick"||r.type==="ohlc"){var u=(r.increasing||{}).showlegend!==!1,c=(r.decreasing||{}).showlegend!==!1,f=Dhe(r.increasing),h=Dhe(r.decreasing);if(f!==!1&&h!==!1){var d=Idt(f,h,u,c);d&&(r.name=d)}else(f||h)&&!r.name&&(r.name=f||h)}zP(r,"line")&&delete r.line,"marker"in r&&(zP(r.marker,"line")&&delete r.marker.line,zP(r,"marker")&&delete r.marker),Nhe.clean(r),r.autobinx&&(delete r.autobinx,delete r.xbins),r.autobiny&&(delete r.autobiny,delete r.ybins)}};function Dhe(e){if(!Uv.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,(typeof t=="string"||typeof t=="number")&&String(t)}function Idt(e,t,r,n){if(r&&!n)return e;if(n&&!r||!e.trim())return t;if(!t.trim())return e;var i=Math.min(e.length,t.length),a;for(a=0;a<i&&e.charAt(a)===t.charAt(a);a++);var o=e.slice(0,a);return o.trim()}function Fhe(e){var t="middle",r="center";return typeof e=="string"&&(e.indexOf("top")!==-1?t="top":e.indexOf("bottom")!==-1&&(t="bottom"),e.indexOf("left")!==-1?r="left":e.indexOf("right")!==-1&&(r="right")),t+" "+r}function zP(e,t){return t in e&&typeof e[t]=="object"&&Object.keys(e[t]).length===0}L0.swapXYData=function(e){var t;if(Uv.swapAttrs(e,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(e.z)&&Array.isArray(e.z[0])&&(e.transpose?delete e.transpose:e.transpose=!0),e.error_x&&e.error_y){var r=e.error_y,n="copy_ystyle"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);Uv.swapAttrs(e,["error_?.copy_ystyle"]),n&&Uv.swapAttrs(e,["error_?.color","error_?.thickness","error_?.width"])}if(typeof e.hoverinfo=="string"){var i=e.hoverinfo.split("+");for(t=0;t<i.length;t++)i[t]==="x"?i[t]="y":i[t]==="y"&&(i[t]="x");e.hoverinfo=i.join("+")}};L0.coerceTraceIndices=function(e,t){if(qhe(t))return[t];if(!Array.isArray(t)||!t.length)return e.data.map(function(i,a){return a});if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++)Uv.isIndex(t[n],e.data.length)?r.push(t[n]):Uv.warn("trace index (",t[n],") is not a number or is out of bounds");return r}return t};L0.manageArrayContainers=function(e,t,r){var n=e.obj,i=e.parts,a=i.length,o=i[a-1],s=qhe(o);if(s&&t===null){var l=i.slice(0,a-1).join("."),u=Uv.nestedProperty(n,l).get();u.splice(o,1)}else s&&e.get()===void 0&&e.get()===void 0&&(r[e.astr]=null),e.set(t)};var Rdt=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function zhe(e){var t=e.search(Rdt);if(t>0)return e.slice(0,t)}L0.hasParent=function(e,t){for(var r=zhe(t);r;){if(r in e)return!0;r=zhe(r)}return!1};L0.clearAxisTypes=function(e,t,r){for(var n=0;n<t.length;n++)for(var i=e._fullData[n],a=0;a<3;a++){var o=Ldt(e,i,Pdt[a]);if(o&&o.type!=="log"){var s=o._name,l=o._id.slice(1);if(l.slice(0,5)==="scene"){if(r[l]!==void 0)continue;s=l+"."+s}var u=s+".type";r[s]===void 0&&r[u]===void 0&&Uv.nestedProperty(e.layout,u).set(null)}}};var KN=(e,t)=>{let r=(...n)=>n.every(i=>Uv.isPlainObject(i))||n.every(i=>Array.isArray(i));if([e,t].every(n=>Array.isArray(n))){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],a=t[n];if(i!==a&&!(r(i,a)?KN(i,a):!1))return!1}return!0}else if([e,t].every(n=>Uv.isPlainObject(n))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let i=e[n],a=t[n];if(i!==a&&!(r(i,a)?KN(i,a):!1))return!1}return!0}return!1};L0.collectionsAreEqual=KN});var ZP=ye(_l=>{"use strict";var BP=qa(),Ddt=Eo(),Fdt=lO(),Sa=Pr(),Ec=Sa.nestedProperty,QN=C3(),op=Sne(),P0=Oa(),WP=I3(),Qo=Mc(),Vv=ho(),zdt=AB(),qdt=Rd(),JN=So(),Odt=ka(),Bdt=WN().initInteractions,Ndt=Wp(),Udt=qf().clearOutline,Whe=_b().dfltConfig,qP=Rhe(),gh=Uhe(),Au=CM(),T_=mc(),Vdt=Rh().AX_NAME_PATTERN,$N=0,Vhe=5;function Gdt(e,t,r,n){var i;if(e=Sa.getGraphDiv(e),QN.init(e),Sa.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=QN.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!Sa.isPlotDiv(e)&&Sa.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(i)return _l.addFrames(e,i)}Zhe(e,n),r||(r={}),BP.select(e).classed("js-plotly-plot",!0),JN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(gh.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=gh.cleanLayout(r)),Qo.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(hvt(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),JN.initGradients(e),JN.initPatterns(e),l&&Vv.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&Qo.doCalcdata(e);for(var h=0;h<e.calcdata.length;h++)e.calcdata[h][0].trace=e._fullData[h];e._context.responsive?e._responsiveChartHandler||(e._responsiveChartHandler=function(){Sa.isHidden(e)||Qo.resize(e)},window.addEventListener("resize",e._responsiveChartHandler)):Sa.clearResponsive(e);var d=Sa.extendFlat({},u._size),v=0;function m(){for(var C=u._basePlotModules,S=0;S<C.length;S++)C[S].drawFramework&&C[S].drawFramework(e);!u._glcanvas&&u._has("gl")&&(u._glcanvas=u._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(z){return z.key}),u._glcanvas.enter().append("canvas").attr("class",function(z){return"gl-canvas gl-canvas-"+z.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var g=e._context.plotGlPixelRatio;if(u._glcanvas){u._glcanvas.attr("width",u.width*g).attr("height",u.height*g).style("width",u.width+"px").style("height",u.height+"px");var P=u._glcanvas.data()[0].regl;if(P&&(Math.floor(u.width*g)!==P._gl.drawingBufferWidth||Math.floor(u.height*g)!==P._gl.drawingBufferHeight)){var E="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(v)Sa.error(E);else return Sa.log(E+" Clearing graph and plotting again."),Qo.cleanPlot([],{},e._fullData,u),Qo.supplyDefaults(e),u=e._fullLayout,Qo.doCalcdata(e),v++,m()}}return u.modebar.orientation==="h"?u._modebardiv.style("height",null).style("width","100%"):u._modebardiv.style("width",null).style("height",u.height+"px"),Qo.previousPromises(e)}function b(){if(Qo.clearAutoMarginIds(e),Au.drawMarginPushers(e),Vv.allowAutoMargin(e),e._fullLayout.title.text&&e._fullLayout.title.automargin&&Qo.allowAutoMargin(e,"title.automargin"),u._has("pie"))for(var C=e._fullData,S=0;S<C.length;S++){var g=C[S];g.type==="pie"&&g.automargin&&Qo.allowAutoMargin(e,"pie."+g.uid+".automargin")}return Qo.doAutoMargin(e),Qo.previousPromises(e)}function p(){if(Qo.didMarginChange(d,u._size))return Sa.syncOrAsync([b,Au.layoutStyles],e)}function k(){if(!f){M();return}return Sa.syncOrAsync([P0.getComponentMethod("shapes","calcAutorange"),P0.getComponentMethod("annotations","calcAutorange"),M],e)}function M(){e._transitioning||(Au.doAutoRangeAndConstraints(e),l&&Vv.saveRangeInitial(e),P0.getComponentMethod("rangeslider","calcAutorange")(e))}function T(){return Vv.draw(e,l?"":"redraw")}var L=[Qo.previousPromises,s,m,b,p];c&&L.push(k),L.push(Au.layoutStyles),c&&L.push(T,function(S){var g=S._fullLayout._insideTickLabelsUpdaterange;if(g)return S._fullLayout._insideTickLabelsUpdaterange=void 0,$M(S,g).then(function(){Vv.saveRangeInitial(S,!0)})}),L.push(Au.drawData,Au.finalDraw,Bdt,Qo.addLinks,Qo.rehover,Qo.redrag,Qo.reselect,Qo.doAutoMargin,Qo.previousPromises);var x=Sa.syncOrAsync(L,e);return(!x||!x.then)&&(x=Promise.resolve()),x.then(function(){return QM(e),e})}function QM(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function Hdt(e){return Sa.extendFlat(Whe,e)}function Xhe(e,t){try{e._fullLayout._paper.style("background",t)}catch(r){Sa.error(r)}}function jdt(e,t){var r=Odt.combine(t,"white");Xhe(e,r)}function Zhe(e,t){if(!e._context){e._context=Sa.extendDeep({},Whe);var r=BP.select("base");e._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var n=e._context,i,a,o;if(t){for(a=Object.keys(t),i=0;i<a.length;i++)o=a[i],!(o==="editable"||o==="edits")&&o in n&&(o==="setBackground"&&t[o]==="opaque"?n[o]=jdt: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"&&!Fdt&&(n.displayModeBar=!0),(n.setBackground==="transparent"||typeof n.setBackground!="function")&&(n.setBackground=Xhe),n._hasZeroHeight=n._hasZeroHeight||e.clientHeight===0,n._hasZeroWidth=n._hasZeroWidth||e.clientWidth===0;var l=n.scrollZoom,u=n._scrollZoom={};if(l===!0)u.cartesian=1,u.gl3d=1,u.geo=1,u.mapbox=1,u.map=1;else if(typeof l=="string"){var c=l.split("+");for(i=0;i<c.length;i++)u[c[i]]=1}else l!==!1&&(u.gl3d=1,u.geo=1,u.mapbox=1,u.map=1)}function Wdt(e){if(e=Sa.getGraphDiv(e),!Sa.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);return gh.cleanData(e.data),gh.cleanLayout(e.layout),e.calcdata=void 0,_l._doPlot(e).then(function(){return e.emit("plotly_redraw"),e})}function Xdt(e,t,r,n){return e=Sa.getGraphDiv(e),Qo.cleanPlot([],{},e._fullData||[],e._fullLayout||{}),Qo.purge(e),_l._doPlot(e,t,r,n)}function NP(e,t){var r=t+1,n=[],i,a;for(i=0;i<e.length;i++)a=e[i],a<0?n.push(r+a):n.push(a);return n}function UP(e,t,r){var n,i;for(n=0;n<t.length;n++){if(i=t[n],i!==parseInt(i,10))throw new Error("all values in "+r+" must be integers");if(i>=e.data.length||i<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function Yhe(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),UP(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&UP(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function Zdt(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 Ydt(e,t,r,n){var i=Sa.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!Sa.isPlainObject(t))throw new Error("update must be a key:value object");if(typeof r=="undefined")throw new Error("indices must be an integer or array of integers");UP(e,r,"indices");for(var a in t){if(!Array.isArray(t[a])||t[a].length!==r.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==t[a].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function Kdt(e,t,r,n){var i=Sa.isPlainObject(n),a=[],o,s,l,u,c;Array.isArray(r)||(r=[r]),r=NP(r,e.data.length-1);for(var f in t)for(var h=0;h<r.length;h++){if(o=e.data[r[h]],l=Ec(o,f),s=l.get(),u=t[f][h],!Sa.isArrayOrTypedArray(u))throw new Error("attribute: "+f+" index: "+h+" must be an array");if(!Sa.isArrayOrTypedArray(s))throw new Error("cannot extend missing or non-array attribute: "+f);if(s.constructor!==u.constructor)throw new Error("cannot extend array with an array of a different type: "+f);c=i?n[f][h]:n,Ddt(c)||(c=-1),a.push({prop:l,target:s,insert:u,maxp:Math.floor(c)})}return a}function Khe(e,t,r,n,i){Ydt(e,t,r,n);for(var a=Kdt(e,t,r,n),o={},s={},l=0;l<a.length;l++){var u=a[l].prop,c=a[l].maxp,f=i(a[l].target,a[l].insert,c);u.set(f[0]),Array.isArray(o[u.astr])||(o[u.astr]=[]),o[u.astr].push(f[1]),Array.isArray(s[u.astr])||(s[u.astr]=[]),s[u.astr].push(a[l].target.length)}return{update:o,maxPoints:s}}function Jhe(e,t){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}function $he(e,t,r,n){e=Sa.getGraphDiv(e);function i(l,u,c){var f,h;if(Sa.isTypedArray(l))if(c<0){var d=new l.constructor(0),v=Jhe(l,u);c<0?(f=v,h=d):(f=d,h=v)}else if(f=new l.constructor(c),h=new l.constructor(l.length+u.length-c),c===u.length)f.set(u),h.set(l);else if(c<u.length){var m=u.length-c;f.set(u.subarray(m)),h.set(l),h.set(u.subarray(0,m),l.length)}else{var b=c-u.length,p=l.length-b;f.set(l.subarray(p)),f.set(u,b),h.set(l.subarray(0,p))}else f=l.concat(u),h=c>=0&&c<f.length?f.splice(0,f.length-c):[];return[f,h]}var a=Khe(e,t,r,n,i),o=_l.redraw(e),s=[e,a.update,r,a.maxPoints];return op.add(e,_l.prependTraces,s,$he,arguments),o}function Qhe(e,t,r,n){e=Sa.getGraphDiv(e);function i(l,u,c){var f,h;if(Sa.isTypedArray(l))if(c<=0){var d=new l.constructor(0),v=Jhe(u,l);c<0?(f=v,h=d):(f=d,h=v)}else if(f=new l.constructor(c),h=new l.constructor(l.length+u.length-c),c===u.length)f.set(u),h.set(l);else if(c<u.length){var m=u.length-c;f.set(u.subarray(0,m)),h.set(u.subarray(m)),h.set(l,m)}else{var b=c-u.length;f.set(u),f.set(l.subarray(0,b),u.length),h.set(l.subarray(b))}else f=u.concat(l),h=c>=0&&c<f.length?f.splice(c,f.length):[];return[f,h]}var a=Khe(e,t,r,n,i),o=_l.redraw(e),s=[e,a.update,r,a.maxPoints];return op.add(e,_l.extendTraces,s,Qhe,arguments),o}function ede(e,t,r){e=Sa.getGraphDiv(e);var n=[],i=_l.deleteTraces,a=ede,o=[e,n],s=[e,t],l,u;for(Zdt(e,t,r),Array.isArray(t)||(t=[t]),t=t.map(function(c){return Sa.extendFlat({},c)}),gh.cleanData(t),l=0;l<t.length;l++)e.data.push(t[l]);for(l=0;l<t.length;l++)n.push(-t.length+l);if(typeof r=="undefined")return u=_l.redraw(e),op.add(e,i,o,a,s),u;Array.isArray(r)||(r=[r]);try{Yhe(e,n,r)}catch(c){throw e.data.splice(e.data.length-t.length,t.length),c}return op.startSequence(e),op.add(e,i,o,a,s),u=_l.moveTraces(e,n,r),op.stopSequence(e),u}function tde(e,t){e=Sa.getGraphDiv(e);var r=[],n=_l.addTraces,i=tde,a=[e,r,t],o=[e,t],s,l;if(typeof t=="undefined")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(t)||(t=[t]),UP(e,t,"indices"),t=NP(t,e.data.length-1),t.sort(Sa.sorterDes),s=0;s<t.length;s+=1)l=e.data.splice(t[s],1)[0],r.push(l);var u=_l.redraw(e);return op.add(e,n,a,i,o),u}function eU(e,t,r){e=Sa.getGraphDiv(e);var n=[],i=[],a=eU,o=eU,s=[e,r,t],l=[e,t,r],u;if(Yhe(e,t,r),t=Array.isArray(t)?t:[t],typeof r=="undefined")for(r=[],u=0;u<t.length;u++)r.push(-t.length+u);for(r=Array.isArray(r)?r:[r],t=NP(t,e.data.length-1),r=NP(r,e.data.length-1),u=0;u<e.data.length;u++)t.indexOf(u)===-1&&n.push(e.data[u]);for(u=0;u<t.length;u++)i.push({newIndex:r[u],trace:e.data[t[u]]});for(i.sort(function(f,h){return f.newIndex-h.newIndex}),u=0;u<i.length;u+=1)n.splice(i[u].newIndex,0,i[u].trace);e.data=n;var c=_l.redraw(e);return op.add(e,a,s,o,l),c}function VP(e,t,r,n){e=Sa.getGraphDiv(e),gh.clearPromiseQueue(e);var i={};if(typeof t=="string")i[t]=r;else if(Sa.isPlainObject(t))i=Sa.extendFlat({},t),n===void 0&&(n=r);else return Sa.warn("Restyle fail.",t,r,n),Promise.reject();Object.keys(i).length&&(e.changed=!0);var a=gh.coerceTraceIndices(e,n),o=rde(e,i,a),s=o.flags;s.calc&&(e.calcdata=void 0),s.clearAxisTypes&&gh.clearAxisTypes(e,a,{});var l=[];s.fullReplot?l.push(_l._doPlot):(l.push(Qo.previousPromises),Qo.supplyDefaults(e),s.markerSize&&(Qo.doCalcdata(e),XP(l)),s.style&&l.push(Au.doTraceStyle),s.colorbars&&l.push(Au.doColorBars),l.push(QM)),l.push(Qo.rehover,Qo.redrag,Qo.reselect),op.add(e,VP,[e,o.undoit,o.traces],VP,[e,o.redoit,o.traces]);var u=Sa.syncOrAsync(l,e);return(!u||!u.then)&&(u=Promise.resolve()),u.then(function(){return e.emit("plotly_restyle",o.eventData),e})}function zy(e){return e===void 0?null:e}function OP(e,t){return t?function(r,n,i){var a=Ec(r,n),o=a.set;return a.set=function(s){var l=(i||"")+n;GP(l,a.get(),s,e),o(s)},a}:Ec}function GP(e,t,r,n){if(Array.isArray(t)||Array.isArray(r))for(var i=Array.isArray(t)?t:[],a=Array.isArray(r)?r:[],o=Math.max(i.length,a.length),s=0;s<o;s++)GP(e+"["+s+"]",i[s],a[s],n);else if(Sa.isPlainObject(t)||Sa.isPlainObject(r)){var l=Sa.isPlainObject(t)?t:{},u=Sa.isPlainObject(r)?r:{},c=Sa.extendFlat({},l,u);for(var f in c)GP(e+"."+f,l[f],u[f],n)}else n[e]===void 0&&(n[e]=zy(t))}function Jdt(e,t,r){for(var n in r){var i=Ec(e,n);GP(n,i.get(),r[n],t)}}function rde(e,t,r){var n=e._fullLayout,i=e._fullData,a=e.data,o=n._guiEditing,s=OP(n._preGUI,o),l=Sa.extendDeepAll({},t),u,c=T_.traceFlags(),f={},h={},d;function v(){return r.map(function(){})}function m(me){var Pe=Vv.id2name(me);d.indexOf(Pe)===-1&&d.push(Pe)}function b(me){return"LAYOUT"+me+".autorange"}function p(me){return"LAYOUT"+me+".range"}function k(me){for(var Pe=me;Pe<i.length;Pe++)if(i[Pe]._input===a[me])return i[Pe]}function M(me,Pe,ce){if(Array.isArray(me)){me.forEach(function(Vt){M(Vt,Pe,ce)});return}if(!(me in t||gh.hasParent(t,me))){var He;if(me.slice(0,6)==="LAYOUT")He=s(e.layout,me.replace("LAYOUT",""));else{var lt=r[ce],mt=n._tracePreGUI[k(lt)._fullInput.uid];He=OP(mt,o)(a[lt],me)}me in h||(h[me]=v()),h[me][ce]===void 0&&(h[me][ce]=zy(He.get())),Pe!==void 0&&He.set(Pe)}}function T(me){return function(Pe){return i[Pe][me]}}function L(me){return function(Pe,ce){return Pe===!1?i[r[ce]][me]:null}}for(var x in t){if(gh.hasParent(t,x))throw new Error("cannot set "+x+" and a parent attribute simultaneously");var C=t[x],S,g,P,E,z,q;if((x==="autobinx"||x==="autobiny")&&(x=x.charAt(x.length-1)+"bins",Array.isArray(C)?C=C.map(L(x)):C===!1?C=r.map(T(x)):C=null),f[x]=C,x.slice(0,6)==="LAYOUT"){P=s(e.layout,x.replace("LAYOUT","")),h[x]=[zy(P.get())],P.set(Array.isArray(C)?C[0]:C),c.calc=!0;continue}for(h[x]=v(),u=0;u<r.length;u++){S=a[r[u]],g=k(r[u]);var U=n._tracePreGUI[g._fullInput.uid];if(P=OP(U,o)(S,x),E=P.get(),z=Array.isArray(C)?C[u%C.length]:C,z!==void 0){var G=P.parts[P.parts.length-1],Z=x.slice(0,x.length-G.length-1),j=Z?Z+".":"",N=Z?Ec(g,Z).get():g;if(q=WP.getTraceValObject(g,P.parts),q&&q.impliedEdits&&z!==null)for(var H in q.impliedEdits)M(Sa.relativeAttr(x,H),q.impliedEdits[H],u);else if((G==="thicknessmode"||G==="lenmode")&&E!==z&&(z==="fraction"||z==="pixels")&&N){var re=n._size,oe=N.orient,_e=oe==="top"||oe==="bottom";if(G==="thicknessmode"){var ke=_e?re.h:re.w;M(j+"thickness",N.thickness*(z==="fraction"?1/ke:ke),u)}else{var Ce=_e?re.w:re.h;M(j+"len",N.len*(z==="fraction"?1/Ce:Ce),u)}}else if(x==="type"&&(z==="pie"!=(E==="pie")||z==="funnelarea"!=(E==="funnelarea"))){var ge="x",ie="y";(z==="bar"||E==="bar")&&S.orientation==="h"&&(ge="y",ie="x"),Sa.swapAttrs(S,["?","?src"],"labels",ge),Sa.swapAttrs(S,["d?","?0"],"label",ge),Sa.swapAttrs(S,["?","?src"],"values",ie),E==="pie"||E==="funnelarea"?(Ec(S,"marker.color").set(Ec(S,"marker.colors").get()),n._pielayer.selectAll("g.trace").remove()):P0.traceIs(S,"cartesian")&&Ec(S,"marker.colors").set(Ec(S,"marker.color").get())}h[x][u]=zy(E);var Se=["swapxy","swapxyaxes","orientation","orientationaxes"];if(Se.indexOf(x)!==-1){if(x==="orientation"){P.set(z);var Ee=S.x&&!S.y?"h":"v";if((P.get()||Ee)===g.orientation)continue}else x==="orientationaxes"&&(S.orientation={v:"h",h:"v"}[g.orientation]);gh.swapXYData(S),c.calc=c.clearAxisTypes=!0}else Qo.dataArrayContainers.indexOf(P.parts[0])!==-1?(gh.manageArrayContainers(P,z,h),c.calc=!0):(q?q.arrayOk&&!P0.traceIs(g,"regl")&&(Sa.isArrayOrTypedArray(z)||Sa.isArrayOrTypedArray(E))?c.calc=!0:T_.update(c,q):c.calc=!0,P.set(z))}}if(["swapxyaxes","orientationaxes"].indexOf(x)!==-1&&Vv.swap(e,r),x==="orientationaxes"){var we=Ec(e.layout,"hovermode"),De=we.get();De==="x"?we.set("y"):De==="y"?we.set("x"):De==="x unified"?we.set("y unified"):De==="y unified"&&we.set("x unified")}if(["orientation","type"].indexOf(x)!==-1){for(d=[],u=0;u<r.length;u++){var Le=a[r[u]];P0.traceIs(Le,"cartesian")&&(m(Le.xaxis||"x"),m(Le.yaxis||"y"))}M(d.map(b),!0,0),M(d.map(p),[0,1],0)}}return(c.calc||c.plot)&&(c.fullReplot=!0),{flags:c,undoit:h,redoit:f,traces:r,eventData:Sa.extendDeepNoArrays([],[l,r])}}function $M(e,t,r){e=Sa.getGraphDiv(e),gh.clearPromiseQueue(e);var n={};if(typeof t=="string")n[t]=r;else if(Sa.isPlainObject(t))n=Sa.extendFlat({},t);else return Sa.warn("Relayout fail.",t,r),Promise.reject();Object.keys(n).length&&(e.changed=!0);var i=ode(e,n),a=i.flags;a.calc&&(e.calcdata=void 0);var o=[Qo.previousPromises];a.layoutReplot?o.push(Au.layoutReplot):Object.keys(n).length&&(ide(e,a,i)||Qo.supplyDefaults(e),a.legend&&o.push(Au.doLegend),a.layoutstyle&&o.push(Au.layoutStyles),a.axrange&&XP(o,i.rangesAltered),a.ticks&&o.push(Au.doTicksRelayout),a.modebar&&o.push(Au.doModeBar),a.camera&&o.push(Au.doCamera),a.colorbars&&o.push(Au.doColorBars),o.push(QM)),o.push(Qo.rehover,Qo.redrag,Qo.reselect),op.add(e,$M,[e,i.undoit],$M,[e,i.redoit]);var s=Sa.syncOrAsync(o,e);return(!s||!s.then)&&(s=Promise.resolve(e)),s.then(function(){return e.emit("plotly_relayout",i.eventData),e})}function ide(e,t,r){var n=e._fullLayout;if(!t.axrange)return!1;for(var i in t)if(i!=="axrange"&&t[i])return!1;var a,o,s=function(d,v){return Sa.coerce(a,o,qdt,d,v)},l={};for(var u in r.rangesAltered){var c=Vv.id2name(u);if(a=e.layout[c],o=n[c],zdt(a,o,s,l),o._matchGroup){for(var f in o._matchGroup)if(f!==u){var h=n[Vv.id2name(f)];h.autorange=o.autorange,h.range=o.range.slice(),h._input.range=o.range.slice()}}}return!0}function XP(e,t){var r=t?function(n){var i=[],a=!0;for(var o in t){var s=Vv.getFromId(n,o);if(i.push(o),(s.ticklabelposition||"").indexOf("inside")!==-1&&s._anchorAxis&&i.push(s._anchorAxis._id),s._matchGroup)for(var l in s._matchGroup)t[l]||i.push(l)}return Vv.draw(n,i,{skipTitle:a})}:function(n){return Vv.draw(n,"redraw")};e.push(Udt,Au.doAutoRangeAndConstraints,r,Au.drawData,Au.finalDraw)}var nde=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,ade=/^[xyz]axis[0-9]*\.autorange$/,$dt=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function ode(e,t){var r=e.layout,n=e._fullLayout,i=n._guiEditing,a=OP(n._preGUI,i),o=Object.keys(t),s=Vv.list(e),l=Sa.extendDeepAll({},t),u={},c,f,h;for(o=Object.keys(t),f=0;f<o.length;f++)if(o[f].indexOf("allaxes")===0){for(h=0;h<s.length;h++){var d=s[h]._id.slice(1),v=d.indexOf("scene")!==-1?d+".":"",m=o[f].replace("allaxes",v+s[h]._name);t[m]||(t[m]=t[o[f]])}delete t[o[f]]}var b=T_.layoutFlags(),p={},k={};function M(mt,Vt){if(Array.isArray(mt)){mt.forEach(function(ct){M(ct,Vt)});return}if(!(mt in t||gh.hasParent(t,mt))){var st=a(r,mt);mt in k||(k[mt]=zy(st.get())),Vt!==void 0&&st.set(Vt)}}var T={},L;function x(mt){var Vt=Vv.name2id(mt.split(".")[0]);return T[Vt]=1,Vt}for(var C in t){if(gh.hasParent(t,C))throw new Error("cannot set "+C+" and a parent attribute simultaneously");for(var S=a(r,C),g=t[C],P=S.parts.length,E=P-1;E>0&&typeof S.parts[E]!="string";)E--;var z=S.parts[E],q=S.parts[E-1]+"."+z,U=S.parts.slice(0,E).join("."),G=Ec(e.layout,U).get(),Z=Ec(n,U).get(),j=S.get();if(g!==void 0){p[C]=g,k[C]=z==="reverse"?g:zy(j);var N=WP.getLayoutValObject(n,S.parts);if(N&&N.impliedEdits&&g!==null)for(var H in N.impliedEdits)M(Sa.relativeAttr(C,H),N.impliedEdits[H]);if(["width","height"].indexOf(C)!==-1)if(g){M("autosize",null);var re=C==="height"?"width":"height";M(re,n[re])}else n[C]=e._initialAutoSize[C];else if(C==="autosize")M("width",g?null:n.width),M("height",g?null:n.height);else if(q.match(nde))x(q),Ec(n,U+"._inputRange").set(null);else if(q.match(ade)){x(q),Ec(n,U+"._inputRange").set(null);var oe=Ec(n,U).get();oe._inputDomain&&(oe._input.domain=oe._inputDomain.slice())}else q.match($dt)&&Ec(n,U+"._inputDomain").set(null);if(z==="type"){L=G;var _e=Z.type==="linear"&&g==="log",ke=Z.type==="log"&&g==="linear";if(_e||ke){if(!L||!L.range)M(U+".autorange",!0);else if(Z.autorange)_e&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var Ce=L.range[0],ge=L.range[1];_e?(Ce<=0&&ge<=0&&M(U+".autorange",!0),Ce<=0?Ce=ge/1e6:ge<=0&&(ge=Ce/1e6),M(U+".range[0]",Math.log(Ce)/Math.LN10),M(U+".range[1]",Math.log(ge)/Math.LN10)):(M(U+".range[0]",Math.pow(10,Ce)),M(U+".range[1]",Math.pow(10,ge)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[S.parts[0]]&&S.parts[1]==="radialaxis"&&delete n[S.parts[0]]._subplot.viewInitial["radialaxis.range"],P0.getComponentMethod("annotations","convertCoords")(e,Z,g,M),P0.getComponentMethod("images","convertCoords")(e,Z,g,M)}else M(U+".autorange",!0),M(U+".range",null);Ec(n,U+"._inputRange").set(null)}else if(z.match(Vdt)){var ie=Ec(n,C).get(),Se=(g||{}).type;(!Se||Se==="-")&&(Se="linear"),P0.getComponentMethod("annotations","convertCoords")(e,ie,Se,M),P0.getComponentMethod("images","convertCoords")(e,ie,Se,M)}var Ee=qP.containerArrayMatch(C);if(Ee){c=Ee.array,f=Ee.index;var we=Ee.property,De=N||{editType:"calc"};f!==""&&we===""&&(qP.isAddVal(g)?k[C]=null:qP.isRemoveVal(g)?k[C]=(Ec(r,c).get()||[])[f]:Sa.warn("unrecognized full object value",t)),T_.update(b,De),u[c]||(u[c]={});var Le=u[c][f];Le||(Le=u[c][f]={}),Le[we]=g,delete t[C]}else z==="reverse"?(G.range?G.range.reverse():(M(U+".autorange",!0),G.range=[1,0]),Z.autorange?b.calc=!0:b.plot=!0):(C==="dragmode"&&(g===!1&&j!==!1||g!==!1&&j===!1)||n._has("scatter-like")&&n._has("regl")&&C==="dragmode"&&(g==="lasso"||g==="select")&&!(j==="lasso"||j==="select")?b.plot=!0:N?T_.update(b,N):b.calc=!0,S.set(g))}}for(c in u){var me=qP.applyContainerArrayChanges(e,a(r,c),u[c],b,a);me||(b.plot=!0)}for(var Pe in T){L=Vv.getFromId(e,Pe);var ce=L&&L._constraintGroup;if(ce){b.calc=!0;for(var He in ce)T[He]||(Vv.getFromId(e,He)._constraintShrinkable=!0)}}(sde(e)||t.height||t.width)&&(b.plot=!0);var lt=n.shapes;for(f=0;f<lt.length;f++)if(lt[f].showlegend){b.calc=!0;break}return(b.plot||b.calc)&&(b.layoutReplot=!0),{flags:b,rangesAltered:T,undoit:k,redoit:p,eventData:l}}function sde(e){var t=e._fullLayout,r=t.width,n=t.height;return e.layout.autosize&&Qo.plotAutoSize(e,e.layout,t),t.width!==r||t.height!==n}function HP(e,t,r,n){e=Sa.getGraphDiv(e),gh.clearPromiseQueue(e),Sa.isPlainObject(t)||(t={}),Sa.isPlainObject(r)||(r={}),Object.keys(t).length&&(e.changed=!0),Object.keys(r).length&&(e.changed=!0);var i=gh.coerceTraceIndices(e,n),a=rde(e,Sa.extendFlat({},t),i),o=a.flags,s=ode(e,Sa.extendFlat({},r)),l=s.flags;(o.calc||l.calc)&&(e.calcdata=void 0),o.clearAxisTypes&&gh.clearAxisTypes(e,i,r);var u=[];l.layoutReplot?u.push(Au.layoutReplot):o.fullReplot?u.push(_l._doPlot):(u.push(Qo.previousPromises),ide(e,l,s)||Qo.supplyDefaults(e),o.style&&u.push(Au.doTraceStyle),(o.colorbars||l.colorbars)&&u.push(Au.doColorBars),l.legend&&u.push(Au.doLegend),l.layoutstyle&&u.push(Au.layoutStyles),l.axrange&&XP(u,s.rangesAltered),l.ticks&&u.push(Au.doTicksRelayout),l.modebar&&u.push(Au.doModeBar),l.camera&&u.push(Au.doCamera),u.push(QM)),u.push(Qo.rehover,Qo.redrag,Qo.reselect),op.add(e,HP,[e,a.undoit,s.undoit,a.traces],HP,[e,a.redoit,s.redoit,a.traces]);var c=Sa.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve(e)),c.then(function(){return e.emit("plotly_update",{data:a.eventData,layout:s.eventData}),e})}function tU(e){return function(r){r._fullLayout._guiEditing=!0;var n=e.apply(null,arguments);return r._fullLayout._guiEditing=!1,n}}var Qdt=[{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"}],evt=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function Ghe(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=e.match(n.pattern);if(i){var a=i[1]||"";return{head:a,tail:e.slice(a.length+1),attr:n.attr}}}}function Hhe(e,t){var r=Ec(t,e).get();if(r!==void 0)return r;var n=e.split(".");for(n.pop();n.length>1;)if(n.pop(),r=Ec(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function tvt(e,t){for(var r=0;r<t.length;r++)if(t[r]._fullInput.uid===e)return r;return-1}function rvt(e,t,r){for(var n=0;n<t.length;n++)if(t[n].uid===e)return n;return!t[r]||t[r].uid?-1:r}function jhe(e,t){var r=Sa.isPlainObject(e),n=Array.isArray(e);return r||n?(r&&Sa.isPlainObject(t)||n&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function ivt(e,t,r,n){var i=n._preGUI,a,o,s,l,u,c,f,h,d,v,m=[],b={},p={};for(a in i){if(u=Ghe(a,Qdt),u){if(d=u.head,v=u.tail,o=u.attr||d+".uirevision",s=Ec(n,o).get(),l=s&&Hhe(o,t),l&&l===s){if(c=i[a],c===null&&(c=void 0),f=Ec(t,a),h=f.get(),jhe(h,c)){h===void 0&&v==="autorange"&&m.push(d),f.set(zy(Ec(n,a).get()));continue}else if(v==="autorange"||v.slice(0,6)==="range["){var k=i[d+".range[0]"],M=i[d+".range[1]"],T=i[d+".autorange"];if(T||T===null&&k===null&&M===null){if(!(d in b)){var L=Ec(t,d).get();b[d]=L&&(L.autorange||L.autorange!==!1&&(!L.range||L.range.length!==2))}if(b[d]){f.set(zy(Ec(n,a).get()));continue}}}}}else Sa.warn("unrecognized GUI edit: "+a);delete i[a],u&&u.tail.slice(0,6)==="range["&&(p[u.head]=1)}for(var x=0;x<m.length;x++){var C=m[x];if(p[C]){var S=Ec(t,C).get();S&&delete S.autorange}}var g=n._tracePreGUI;for(var P in g){var E=g[P],z=null,q;for(a in E){if(!z){var U=tvt(P,r);if(U<0){delete g[P];break}var G=r[U];q=G._fullInput;var Z=rvt(P,e,q.index);if(Z<0){delete g[P];break}z=e[Z]}if(u=Ghe(a,evt),u){if(u.attr?(s=Ec(n,u.attr).get(),l=s&&Hhe(u.attr,t)):(s=q.uirevision,l=z.uirevision,l===void 0&&(l=t.uirevision)),l&&l===s&&(c=E[a],c===null&&(c=void 0),f=Ec(z,a),h=f.get(),jhe(h,c))){f.set(zy(Ec(q,a).get()));continue}}else Sa.warn("unrecognized GUI edit: "+a+" in trace uid "+P);delete E[a]}}}function nvt(e,t,r,n){var i,a;function o(){return _l.addFrames(e,i)}e=Sa.getGraphDiv(e),gh.clearPromiseQueue(e);var s=e._fullData,l=e._fullLayout;if(!Sa.isPlotDiv(e)||!s||!l)a=_l.newPlot(e,t,r,n);else{if(Sa.isPlainObject(t)){var u=t;t=u.data,r=u.layout,n=u.config,i=u.frames}var c=!1;if(n){let q=Sa.extendDeepAll({},e._context);e._context=void 0,Zhe(e,n),c=!gh.collectionsAreEqual(q,e._context)}if(c){let q=e._ev.eventNames().map(U=>[U,e._ev.listeners(U)]);a=_l.newPlot(e,t,r,n).then(()=>{for(let[U,G]of q)G.forEach(Z=>e.on(U,Z));return _l.react(e,t,r,n)})}else{e.data=t||[],gh.cleanData(e.data),e.layout=r||{},gh.cleanLayout(e.layout),ivt(e.data,e.layout,s,l),Qo.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,h=e._fullLayout,d=h.datarevision===void 0,v=h.transition,m=ovt(e,l,h,d,v),b=m.newDataRevision,p=avt(e,s,f,d,v,b);if(sde(e)&&(m.layoutReplot=!0),p.calc||m.calc){e.calcdata=void 0;for(var k=Object.getOwnPropertyNames(h),M=0;M<k.length;M++){var T=k[M],L=T.substring(0,5);if(L==="xaxis"||L==="yaxis"){var x=h[T]._emptyCategories;x&&x()}}}else Qo.supplyDefaultsUpdateCalc(e.calcdata,f);var C=[];if(i&&(e._transitionData={},Qo.createTransitionData(e),C.push(o)),h.transition&&(p.anim||m.anim))m.ticks&&C.push(Au.doTicksRelayout),Qo.doCalcdata(e),Au.doAutoRangeAndConstraints(e),C.push(function(){return Qo.transitionFromReact(e,p,m,l)});else if(p.fullReplot||m.layoutReplot)e._fullLayout._skipDefaults=!0,C.push(_l._doPlot);else{for(var S in m.arrays){var g=m.arrays[S];if(g.length){var P=P0.getComponentMethod(S,"drawOne");if(P!==Sa.noop)for(var E=0;E<g.length;E++)P(e,g[E]);else{var z=P0.getComponentMethod(S,"draw");if(z===Sa.noop)throw new Error("cannot draw components: "+S);z(e)}}}C.push(Qo.previousPromises),p.style&&C.push(Au.doTraceStyle),(p.colorbars||m.colorbars)&&C.push(Au.doColorBars),m.legend&&C.push(Au.doLegend),m.layoutstyle&&C.push(Au.layoutStyles),m.axrange&&XP(C),m.ticks&&C.push(Au.doTicksRelayout),m.modebar&&C.push(Au.doModeBar),m.camera&&C.push(Au.doCamera),C.push(QM)}C.push(Qo.rehover,Qo.redrag,Qo.reselect),a=Sa.syncOrAsync(C,e),(!a||!a.then)&&(a=Promise.resolve(e))}}return a.then(()=>(c||e.emit("plotly_react",{config:n,data:t,layout:r}),e))}function avt(e,t,r,n,i,a){var o=t.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s=T_.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(d){var v=WP.getTraceValObject(u,d);return!u._module.animatable&&v.anim&&(v.anim=!1),v}var f={getValObject:c,flags:s,immutable:n,transition:i,newDataRevision:a,gd:e},h={};for(l=0;l<t.length;l++)if(r[l]){if(u=r[l]._fullInput,h[u.uid])continue;h[u.uid]=1,jP(t[l]._fullInput,u,[],f)}return(s.calc||s.plot)&&(s.fullReplot=!0),i&&s.nChanges&&s.nChangesAnim&&(s.anim=s.nChanges===s.nChangesAnim&&o?"all":"some"),s}function ovt(e,t,r,n,i){var a=T_.layoutFlags();a.arrays={},a.rangesAltered={},a.nChanges=0,a.nChangesAnim=0;function o(h){return WP.getLayoutValObject(r,h)}for(var s in r)if(!(!s.startsWith("xaxis")&&!s.startsWith("yaxis"))&&t[s]){var l=r[s].domain,u=t[s].domain,c=t[s]._inputDomain;t[s]._inputDomain&&(l[0]===c[0]&&l[1]===c[1]?r[s].domain=t[s].domain:(l[0]!==u[0]||l[1]!==u[1])&&(r[s]._inputDomain=null))}var f={getValObject:o,flags:a,immutable:n,transition:i,gd:e};return jP(t,r,[],f),(a.plot||a.calc)&&(a.layoutReplot=!0),i&&a.nChanges&&a.nChangesAnim&&(a.anim=a.nChanges===a.nChangesAnim?"all":"some"),a}function jP(e,t,r,n){var i,a,o,s=n.getValObject,l=n.flags,u=n.immutable,c=n.inArray,f=n.arrayIndex;function h(){var U=i.editType;if(c&&U.indexOf("arraydraw")!==-1){Sa.pushUnique(l.arrays[c],f);return}T_.update(l,i),U!=="none"&&l.nChanges++,n.transition&&i.anim&&l.nChangesAnim++,(nde.test(o)||ade.test(o))&&(l.rangesAltered[r[0]]=1),a==="datarevision"&&(l.newDataRevision=1)}function d(U){return U.valType==="data_array"||U.arrayOk}for(a in e){if(l.calc&&!n.transition)return;var v=e[a],m=t[a],b=r.concat(a);if(o=b.join("."),!(a.charAt(0)==="_"||typeof v=="function"||v===m)){if((a==="tick0"||a==="dtick")&&r[0]!=="geo"){var p=t.tickmode;if(p==="auto"||p==="array"||!p)continue}if(!(a==="range"&&t.autorange)&&!((a==="zmin"||a==="zmax")&&t.type==="contourcarpet")&&(i=s(b),!!i&&!(i._compareAsJSON&&JSON.stringify(v)===JSON.stringify(m)))){var k=i.valType,M,T=d(i),L=Array.isArray(v),x=Array.isArray(m);if(L&&x){var C="_input_"+a,S=e[C],g=t[C];if(Array.isArray(S)&&S===g)continue}if(m===void 0)T&&L?l.calc=!0:h();else if(i._isLinkedToArray){var P=[],E=!1;c||(l.arrays[a]=P);var z=Math.min(v.length,m.length),q=Math.max(v.length,m.length);if(z!==q)if(i.editType==="arraydraw")E=!0;else{h();continue}for(M=0;M<z;M++)jP(v[M],m[M],b.concat(M),Sa.extendFlat({inArray:a,arrayIndex:M},n));if(E)for(M=z;M<q;M++)P.push(M)}else!k&&Sa.isPlainObject(v)?jP(v,m,b,n):T?L&&x?(u&&(l.calc=!0),(u||n.newDataRevision)&&h()):L!==x?l.calc=!0:h():L&&x?(v.length!==m.length||String(v)!==String(m))&&h():h()}}}for(a in t)if(!(a in e||a.charAt(0)==="_"||typeof t[a]=="function"))if(i=s(r.concat(a)),d(i)&&Array.isArray(t[a])){l.calc=!0;return}else h()}function svt(e,t,r){if(e=Sa.getGraphDiv(e),!Sa.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var n=e._transitionData;n._frameQueue||(n._frameQueue=[]),r=Qo.supplyAnimationDefaults(r);var i=r.transition,a=r.frame;n._frameWaitingCnt===void 0&&(n._frameWaitingCnt=0);function o(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u){return Array.isArray(a)?u>=a.length?a[0]:a[u]:a}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var z=n._frameQueue.pop();z.onInterrupt&&z.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(z){if(z.length!==0){for(var q=0;q<z.length;q++){var U;z[q].type==="byname"?U=Qo.computeFrame(e,z[q].name):U=z[q].data;var G=s(q),Z=o(q);Z.duration=Math.min(Z.duration,G.duration);var j={frame:U,name:z[q].name,frameOpts:G,transitionOpts:Z};q===z.length-1&&(j.onComplete=l(u,2),j.onInterrupt=c),n._frameQueue.push(j)}r.mode==="immediate"&&(n._lastFrameAt=-1/0),n._animationRaf||m()}}function d(){e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function v(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var z=n._currentFrame=n._frameQueue.shift();if(z){var q=z.name?z.name.toString():null;e._fullLayout._currentFrame=q,n._lastFrameAt=Date.now(),n._timeToNext=z.frameOpts.duration,Qo.transition(e,z.frame.data,z.frame.layout,gh.coerceTraceIndices(e,z.frame.traces),z.frameOpts,z.transitionOpts).then(function(){z.onComplete&&z.onComplete()}),e.emit("plotly_animatingframe",{name:q,frame:z.frame,animation:{frame:z.frameOpts,transition:z.transitionOpts}})}else d()}function m(){e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var z=function(){n._animationRaf=window.requestAnimationFrame(z),Date.now()-n._lastFrameAt>n._timeToNext&&v()};z()}var b=0;function p(z){return Array.isArray(i)?b>=i.length?z.transitionOpts=i[b]:z.transitionOpts=i[0]:z.transitionOpts=i,b++,z}var k,M,T=[],L=t==null,x=Array.isArray(t),C=!L&&!x&&Sa.isPlainObject(t);if(C)T.push({type:"object",data:p(Sa.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(k=0;k<n._frames.length;k++)M=n._frames[k],M&&(L||String(M.group)===String(t))&&T.push({type:"byname",name:String(M.name),data:p({name:M.name})});else if(x)for(k=0;k<t.length;k++){var S=t[k];["number","string"].indexOf(typeof S)!==-1?(S=String(S),T.push({type:"byname",name:S,data:p({name:S})})):Sa.isPlainObject(S)&&T.push({type:"object",data:p(Sa.extendFlat({},S))})}for(k=0;k<T.length;k++)if(M=T[k],M.type==="byname"&&!n._frameHash[M.data.name]){Sa.warn('animate failure: frame not found: "'+M.data.name+'"'),c();return}["next","immediate"].indexOf(r.mode)!==-1&&f(),r.direction==="reverse"&&T.reverse();var g=e._fullLayout._currentFrame;if(g&&r.fromcurrent){var P=-1;for(k=0;k<T.length;k++)if(M=T[k],M.type==="byname"&&M.name===g){P=k;break}if(P>0&&P<T.length-1){var E=[];for(k=0;k<T.length;k++)M=T[k],(T[k].type!=="byname"||k>P)&&E.push(M);T=E}}T.length>0?h(T):(e.emit("plotly_animated"),u())})}function lvt(e,t,r){if(e=Sa.getGraphDiv(e),t==null)return Promise.resolve();if(!Sa.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,a,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(Sa.isPlainObject(t[n])){var h=t[n].name,d=(l[h]||f[h]||{}).name,v=t[n].name,m=l[d]||f[d];d&&v&&typeof v=="number"&&m&&$N<Vhe&&($N++,Sa.warn('addFrames: overwriting frame "'+(l[d]||f[d]).name+'" with a frame whose name of type "number" also equates to "'+d+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),$N===Vhe&&Sa.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),f[h]={name:h},c.push({frame:Qo.supplyFrameDefaults(t[n]),index:r&&r[n]!==void 0&&r[n]!==null?r[n]:u+n})}c.sort(function(C,S){return C.index>S.index?-1:C.index<S.index?1:0});var b=[],p=[],k=s.length;for(n=c.length-1;n>=0;n--){if(i=c[n].frame,typeof i.name=="number"&&Sa.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;l[i.name="frame "+e._transitionData._counter++];);if(l[i.name]){for(a=0;a<s.length&&(s[a]||{}).name!==i.name;a++);b.push({type:"replace",index:a,value:i}),p.unshift({type:"replace",index:a,value:s[a]})}else o=Math.max(0,Math.min(c[n].index,k)),b.push({type:"insert",index:o,value:i}),p.unshift({type:"delete",index:o}),k++}var M=Qo.modifyFrames,T=Qo.modifyFrames,L=[e,p],x=[e,b];return op&&op.add(e,M,L,T,x),Qo.modifyFrames(e,b)}function uvt(e,t){if(e=Sa.getGraphDiv(e),!Sa.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);var r,n,i=e._transitionData._frames,a=[],o=[];if(!t)for(t=[],r=0;r<i.length;r++)t.push(r);for(t=t.slice(),t.sort(),r=t.length-1;r>=0;r--)n=t[r],a.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:i[n]});var s=Qo.modifyFrames,l=Qo.modifyFrames,u=[e,o],c=[e,a];return op&&op.add(e,s,u,l,c),Qo.modifyFrames(e,a)}function cvt(e){e=Sa.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Qo.cleanPlot([],{},r,t),Qo.purge(e),QN.purge(e),t._container&&t._container.remove(),delete e._context,e}function fvt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!Sa.equalDomRects(r,t._lastBBox)){var n=t._invTransform=Sa.inverseTransformMatrix(Sa.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function hvt(e){var t=BP.select(e),r=e._fullLayout;if(r._calcInverseTransform=fvt,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n={};BP.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=Sa.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(Ndt.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var a=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}_l.animate=svt;_l.addFrames=lvt;_l.deleteFrames=uvt;_l.addTraces=ede;_l.deleteTraces=tde;_l.extendTraces=$he;_l.moveTraces=eU;_l.prependTraces=Qhe;_l.newPlot=Xdt;_l._doPlot=Gdt;_l.purge=cvt;_l.react=nvt;_l.redraw=Wdt;_l.relayout=$M;_l.restyle=VP;_l.setPlotConfig=Hdt;_l.update=HP;_l._guiRelayout=tU($M);_l._guiRestyle=tU(VP);_l._guiUpdate=tU(HP);_l._storeDirectGUIEdit=Jdt});var qy=ye(Pm=>{"use strict";var dvt=Oa();Pm.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Pm.getRedrawFunc=function(e){return function(){dvt.getComponentMethod("colorbar","draw")(e)}};Pm.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Pm.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var lde=window.URL||window.webkitURL;Pm.createObjectURL=function(e){return lde.createObjectURL(e)};Pm.revokeObjectURL=function(e){return lde.revokeObjectURL(e)};Pm.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=vvt(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Pm.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function vvt(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}Pm.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/});var YP=ye((Zor,ude)=>{"use strict";var iU=qa(),Wor=Pr(),pvt=So(),gvt=ka(),Xor=Wp(),rU=/"/g,e4="TOBESTRIPPED",mvt=new RegExp('("'+e4+")|("+e4+'")',"g");function yvt(e){var t=iU.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,function(n){return n==="<"?"<":n==="&rt;"?">":n.indexOf("<")!==-1||n.indexOf(">")!==-1?"":t.html(n).text()});return t.remove(),r}function _vt(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}ude.exports=function(t,r,n){var i=t._fullLayout,a=i._paper,o=i._toppaper,s=i.width,l=i.height,u;a.insert("rect",":first-child").call(pvt.setRect,0,0,s,l).call(gvt.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(u=0;u<c.length;u++){var f=c[u];f.toSVG&&f.toSVG(t)}if(o){var h=o.node().childNodes,d=Array.prototype.slice.call(h);for(u=0;u<d.length;u++){var v=d[u];v.childNodes.length&&a.node().appendChild(v)}}i._draggers&&i._draggers.remove(),a.node().style.background="",a.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var b=iU.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){b.remove();return}else b.style({visibility:null,display:null});var p=this.style.fontFamily;p&&p.indexOf('"')!==-1&&b.style("font-family",p.replace(rU,e4));var k=this.style.fontWeight;k&&(k==="normal"||k==="400")&&b.style("font-weight",void 0);var M=this.style.fontStyle;M&&M==="normal"&&b.style("font-style",void 0);var T=this.style.fontVariant;T&&T==="normal"&&b.style("font-variant",void 0)}),a.selectAll(".gradient_filled,.pattern_filled").each(function(){var b=iU.select(this),p=this.style.fill;p&&p.indexOf("url(")!==-1&&b.style("fill",p.replace(rU,e4));var k=this.style.stroke;k&&k.indexOf("url(")!==-1&&b.style("stroke",k.replace(rU,e4))}),(r==="pdf"||r==="eps")&&a.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),r==="svg"&&n&&(a.attr("width",n*s),a.attr("height",n*l),a.attr("viewBox","0 0 "+s+" "+l));var m=new window.XMLSerializer().serializeToString(a.node());return m=yvt(m),m=_vt(m),m=m.replace(mvt,"'"),m}});var KP=ye((Yor,cde)=>{"use strict";var xvt=Pr(),bvt=Ab().EventEmitter,t4=qy();function wvt(e){var t=e.emitter||new bvt,r=new Promise(function(n,i){var a=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,h=u*c,d=u*f,v=l.getContext("2d",{willReadFrequently:!0}),m=new a,b,p;s==="svg"||xvt.isSafari()?p=t4.encodeSVG(o):(b=t4.createBlob(o,"svg"),p=t4.createObjectURL(b)),l.width=h,l.height=d,m.onload=function(){var k;switch(b=null,t4.revokeObjectURL(p),s!=="svg"&&v.drawImage(m,0,0,h,d),s){case"jpeg":k=l.toDataURL("image/jpeg");break;case"png":k=l.toDataURL("image/png");break;case"webp":k=l.toDataURL("image/webp");break;case"svg":k=p;break;default:var M="Image format is not jpeg, png, svg or webp.";if(i(new Error(M)),!e.promise)return t.emit("error",M)}n(k),e.promise||t.emit("success",k)},m.onerror=function(k){if(b=null,t4.revokeObjectURL(p),i(k),!e.promise)return t.emit("error",k)},m.src=p});return e.promise?r:t}cde.exports=wvt});var aU=ye((Kor,dde)=>{"use strict";var fde=Eo(),hde=ZP(),Tvt=Mc(),Im=Pr(),r4=qy(),Avt=YP(),Svt=KP(),Mvt=g6().version,nU={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function Evt(e,t){t=t||{};var r,n,i,a;Im.isPlainObject(e)?(r=e.data||[],n=e.layout||{},i=e.config||{},a={}):(e=Im.getGraphDiv(e),r=Im.extendDeep([],e.data),n=Im.extendDeep({},e.layout),i=e._context,a=e._fullLayout||{});function o(x){return!(x in t)||Im.validate(t[x],nU[x])}if(!o("width")&&t.width!==null||!o("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+Im.join2(nU.format.values,", "," or ")+".");var s={};function l(x,C){return Im.coerce(t,s,nU,x,C)}var u=l("format"),c=l("width"),f=l("height"),h=l("scale"),d=l("setBackground"),v=l("imageDataOnly"),m=document.createElement("div");m.style.position="absolute",m.style.left="-5000px",document.body.appendChild(m);var b=Im.extendFlat({},n);c?b.width=c:t.width===null&&fde(a.width)&&(b.width=a.width),f?b.height=f:t.height===null&&fde(a.height)&&(b.height=a.height);var p=Im.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),k=r4.getRedrawFunc(m);function M(){return new Promise(function(x){setTimeout(x,r4.getDelay(m._fullLayout))})}function T(){return new Promise(function(x,C){var S=Avt(m,u,h),g=m._fullLayout.width,P=m._fullLayout.height;function E(){hde.purge(m),document.body.removeChild(m)}if(u==="full-json"){var z=Tvt.graphJson(m,!1,"keepdata","object",!0,!0);return z.version=Mvt,z=JSON.stringify(z),E(),x(v?z:r4.encodeJSON(z))}if(E(),u==="svg")return x(v?S:r4.encodeSVG(S));var q=document.createElement("canvas");q.id=Im.randstr(),Svt({format:u,width:g,height:P,scale:h,canvas:q,svg:S,promise:!0}).then(x).catch(C)})}function L(x){return v?x.replace(r4.IMAGE_URL_PREFIX,""):x}return new Promise(function(x,C){hde.newPlot(m,r,b,p).then(k).then(M).then(T).then(function(S){x(L(S))}).catch(function(S){C(S)})})}dde.exports=Evt});var gde=ye((Jor,pde)=>{"use strict";var I0=Pr(),kvt=Mc(),Cvt=I3(),Lvt=_b().dfltConfig,Rg=I0.isPlainObject,Qb=Array.isArray,oU=I0.isArrayOrTypedArray;pde.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=Cvt.get(),i=[],a={_context:I0.extendFlat({},Lvt)},o,s;Qb(t)?(a.data=I0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(md("array","data"))),Rg(r)?(a.layout=I0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(md("object","layout"))),kvt.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;c<u;c++){var f=o[c],h=["data",c];if(!Rg(f)){i.push(md("object",h));continue}var d=l[c],v=d.type,m=n.traces[v].attributes;m.type={valType:"enumerated",values:[v]},d.visible===!1&&f.visible!==!1&&i.push(md("invisible",h)),JP(f,d,m,i,h)}var b=a._fullLayout,p=Pvt(n,l);return JP(s,b,p,i,"layout"),i.length===0?void 0:i};function JP(e,t,r,n,i,a){a=a||[];for(var o=Object.keys(e),s=0;s<o.length;s++){var l=o[s],u=a.slice();u.push(l);var c=e[l],f=t[l],h=Dvt(r,l),d=(h||{}).valType,v=d==="info_array",m=d==="colorscale",b=(h||{}).items;if(!Rvt(r,l))n.push(md("schema",i,u));else if(Rg(c)&&Rg(f)&&d!=="any")JP(c,f,h,n,i,u);else if(v&&Qb(c)){c.length>f.length&&n.push(md("unused",i,u.concat(f.length)));var p=f.length,k=Array.isArray(b);k&&(p=Math.min(p,b.length));var M,T,L,x,C;if(h.dimensions===2)for(T=0;T<p;T++)if(Qb(c[T])){c[T].length>f[T].length&&n.push(md("unused",i,u.concat(T,f[T].length)));var S=f[T].length;for(M=0;M<(k?Math.min(S,b[T].length):S);M++)L=k?b[T][M]:b,x=c[T][M],C=f[T][M],I0.validate(x,L)?C!==x&&C!==+x&&n.push(md("dynamic",i,u.concat(T,M),x,C)):n.push(md("value",i,u.concat(T,M),x))}else n.push(md("array",i,u.concat(T),c[T]));else for(T=0;T<p;T++)L=k?b[T]:b,x=c[T],C=f[T],I0.validate(x,L)?C!==x&&C!==+x&&n.push(md("dynamic",i,u.concat(T),x,C)):n.push(md("value",i,u.concat(T),x))}else if(h.items&&!v&&Qb(c)){var g=b[Object.keys(b)[0]],P=[],E,z;for(E=0;E<f.length;E++){var q=f[E]._index||E;if(z=u.slice(),z.push(q),Rg(c[q])&&Rg(f[E])){P.push(q);var U=c[q],G=f[E];Rg(U)&&U.visible!==!1&&G.visible===!1?n.push(md("invisible",i,z)):JP(U,G,g,n,i,z)}}for(E=0;E<c.length;E++)z=u.slice(),z.push(E),Rg(c[E])?P.indexOf(E)===-1&&n.push(md("unused",i,z)):n.push(md("object",i,z,c[E]))}else!Rg(c)&&Rg(f)?n.push(md("object",i,u,c)):!oU(c)&&oU(f)&&!v&&!m?n.push(md("array",i,u,c)):l in t?I0.validate(c,h)?h.valType==="enumerated"&&(h.coerceNumber&&c!==+f||!oU(c)&&c!==f||String(c)!==String(f))&&n.push(md("dynamic",i,u,c,f)):n.push(md("value",i,u,c)):n.push(md("unused",i,u,c))}return n}function Pvt(e,t){for(var r=e.layout.layoutAttributes,n=0;n<t.length;n++){var i=t[n],a=e.traces[i.type],o=a.layoutAttributes;o&&(i.subplot?I0.extendFlat(r[a.attributes.subplot.dflt],o):I0.extendFlat(r,o))}return r}var Ivt={object:function(e,t){var r;return e==="layout"&&t===""?r="The layout argument":e[0]==="data"&&t===""?r="Trace "+e[1]+" in the data argument":r=$b(e)+"key "+t,r+" must be linked to an object container"},array:function(e,t){var r;return e==="data"?r="The data argument":r=$b(e)+"key "+t,r+" must be linked to an array container"},schema:function(e,t){return $b(e)+"key "+t+" is not part of the schema"},unused:function(e,t,r){var n=Rg(r)?"container":"key";return $b(e)+n+" "+t+" did not get coerced"},dynamic:function(e,t,r,n){return[$b(e)+"key",t,"(set to '"+r+"')","got reset to","'"+n+"'","during defaults."].join(" ")},invisible:function(e,t){return(t?$b(e)+"item "+t:"Trace "+e[1])+" got defaulted to be not visible"},value:function(e,t,r){return[$b(e)+"key "+t,"is set to an invalid value ("+r+")"].join(" ")}};function $b(e){return Qb(e)?"In data trace "+e[1]+", ":"In "+e+", "}function md(e,t,r,n,i){r=r||"";var a,o;Qb(t)?(a=t[0],o=t[1]):(a=t,o=null);var s=zvt(r),l=Ivt[e](t,s,n,i);return I0.log(l),{code:e,container:a,trace:o,path:r,astr:s,msg:l}}function Rvt(e,t){var r=vde(t),n=r.keyMinusId,i=r.id;return n in e&&e[n]._isSubplotObj&&i?!0:t in e}function Dvt(e,t){if(t in e)return e[t];var r=vde(t);return e[r.keyMinusId]}var Fvt=I0.counterRegex("([a-z]+)");function vde(e){var t=e.match(Fvt);return{keyMinusId:t&&t[1],id:t&&t[2]}}function zvt(e){if(!Qb(e))return String(e);for(var t="",r=0;r<e.length;r++){var n=e[r];typeof n=="number"?t=t.slice(0,-1)+"["+n+"]":t+=n,r<e.length-1&&(t+=".")}return t}});var yde=ye(($or,mde)=>{"use strict";var qvt=Pr(),$P=qy();function Ovt(e,t,r){var n=document.createElement("a"),i="download"in n,a=new Promise(function(o,s){var l,u;if(i)return l=$P.createBlob(e,r),u=$P.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),$P.revokeObjectURL(u),l=null,o(t);if(qvt.isSafari()){var c=r==="svg"?",":";base64,";return $P.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}mde.exports=Ovt});var sU=ye((esr,xde)=>{"use strict";var _de=Pr(),Bvt=aU(),Nvt=yde(),Qor=qy();function Uvt(e,t){var r;return _de.isPlainObject(e)||(r=_de.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,i){r&&r._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var a=Bvt(e,t),o=t.filename||e.fn||"newplot";o+="."+t.format.replace("-","."),a.then(function(s){return r&&(r._snapshotInProgress=!1),Nvt(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}xde.exports=Uvt});var Sde=ye(lU=>{"use strict";var Cp=Pr(),Lp=Cp.isPlainObject,bde=I3(),wde=Mc(),Vvt=Gl(),Tde=vl(),Ade=_b().dfltConfig;lU.makeTemplate=function(e){e=Cp.isPlainObject(e)?e:Cp.getGraphDiv(e),e=Cp.extendDeep({_context:Ade},{data:e.data,layout:e.layout}),wde.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(d){var v={};i4(d,v,Hvt.bind(null,d));var m=Cp.coerce(d,{},Vvt,"type"),b=n.data[m];b||(b=n.data[m]=[]),b.push(v)}),i4(r,n.layout,Gvt.bind(null,r)),delete n.layout.template;var i=r.template;if(Lp(i)){var a=i.layout,o,s,l,u,c,f;Lp(a)&&QP(a,n.layout);var h=i.data;if(Lp(h)){for(s in n.data)if(l=h[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;o<f;o++)QP(l[o%u],c[o]);for(o=f;o<u;o++)c.push(Cp.extendDeep({},l[o]))}for(s in h)s in n.data||(n.data[s]=Cp.extendDeep([],h[s]))}}return n};function QP(e,t){e=Cp.extendDeep({},e);var r=Object.keys(e).sort(),n,i;function a(c,f,h){if(Lp(f)&&Lp(c))QP(c,f);else if(Array.isArray(f)&&Array.isArray(c)){var d=Tde.arrayTemplater({_template:e},h);for(i=0;i<f.length;i++){var v=f[i],m=d.newItem(v)._template;m&&QP(m,v)}var b=d.defaultItems();for(i=0;i<b.length;i++)f.push(b[i]._template);for(i=0;i<f.length;i++)delete f[i].templateitemname}}for(n=0;n<r.length;n++){var o=r[n],s=e[o];if(o in t?a(s,t[o],o):t[o]=s,eI(o)===o)for(var l in t){var u=eI(l);l!==u&&u===o&&!(l in e)&&a(s,t[l],o)}}}function eI(e){return e.replace(/[0-9]+$/,"")}function i4(e,t,r,n,i){var a=i&&r(i);for(var o in e){var s=e[o],l=R0(e,o,n),u=R0(e,o,i),c=r(u);if(!c){var f=eI(o);f!==o&&(u=R0(e,f,i),c=r(u))}if(!(a&&a===c)&&!(!c||c._noTemplating||c.valType==="data_array"||c.arrayOk&&Array.isArray(s)))if(!c.valType&&Lp(s))i4(s,t,r,l,u);else if(c._isLinkedToArray&&Array.isArray(s))for(var h=!1,d=0,v={},m=0;m<s.length;m++){var b=s[m];if(Lp(b)){var p=b.name;if(p)v[p]||(i4(b,t,r,R0(s,d,l),R0(s,d,u)),d++,v[p]=1);else if(!h){var k=Tde.arrayDefaultKey(o),M=R0(e,k,n),T=R0(s,d,l);i4(b,t,r,T,R0(s,d,u));var L=Cp.nestedProperty(t,T),x=Cp.nestedProperty(t,M);x.set(L.get()),L.set(null),h=!0}}}else{var C=Cp.nestedProperty(t,l);C.set(s)}}}function Gvt(e,t){return bde.getLayoutValObject(e,Cp.nestedProperty({},t).parts)}function Hvt(e,t){return bde.getTraceValObject(e,Cp.nestedProperty({},t).parts)}function R0(e,t,r){var n;return r?Array.isArray(e)?n=r+"["+t+"]":n=r+"."+t:n=t,n}lU.validateTemplate=function(e,t){var r=Cp.extendDeep({},{_context:Ade,data:e.data,layout:e.layout}),n=r.layout||{};Lp(t)||(t=n.template||{});var i=t.layout,a=t.data,o=[];r.layout=n,r.layout.template=t,wde.supplyDefaults(r);var s=r._fullLayout,l=r._fullData,u={};function c(M,T){for(var L in M)if(L.charAt(0)!=="_"&&Lp(M[L])){var x=eI(L),C=[],S;for(S=0;S<T.length;S++)C.push(R0(M,L,T[S])),x!==L&&C.push(R0(M,x,T[S]));for(S=0;S<C.length;S++)u[C[S]]=1;c(M[L],C)}}function f(M,T){for(var L in M)if(L.indexOf("defaults")===-1&&Lp(M[L])){var x=R0(M,L,T);u[x]?f(M[L],x):o.push({code:"unused",path:x})}}if(Lp(i)?(c(s,["layout"]),f(i,"layout")):o.push({code:"layout"}),!Lp(a))o.push({code:"data"});else{for(var h={},d,v=0;v<l.length;v++){var m=l[v];d=m.type,h[d]=(h[d]||0)+1,m._fullInput._template||o.push({code:"missing",index:m.index,traceType:d})}for(d in a){var b=a[d].length,p=h[d]||0;b>p?o.push({code:"unused",traceType:d,templateCount:b,dataCount:p}):p>b&&o.push({code:"reused",traceType:d,templateCount:b,dataCount:p})}}function k(M,T){for(var L in M)if(L.charAt(0)!=="_"){var x=M[L],C=R0(M,L,T);Lp(x)?(Array.isArray(M)&&x._template===!1&&x.templateitemname&&o.push({code:"missing",path:C,templateitemname:x.templateitemname}),k(x,C)):Array.isArray(x)&&jvt(x)&&k(x,C)}}if(k({data:l,layout:s},""),o.length)return o.map(Wvt)};function jvt(e){for(var t=0;t<e.length;t++)if(Lp(e[t]))return!0}function Wvt(e){var t;switch(e.code){case"data":t="The template has no key data.";break;case"layout":t="The template has no key layout.";break;case"missing":e.path?t="There are no templates for item "+e.path+" with name "+e.templateitemname:t="There are no templates for trace "+e.index+", of type "+e.traceType+".";break;case"unused":e.path?t="The template item at "+e.path+" was not used in constructing the plot.":e.dataCount?t="Some of the templates of type "+e.traceType+" were not used. The template has "+e.templateCount+" traces, the data only has "+e.dataCount+" of this type.":t="The template has "+e.templateCount+" traces of type "+e.traceType+" but there are none in the data.";break;case"reused":t="Some of the templates of type "+e.traceType+" were used more than once. The template has "+e.templateCount+" traces, the data has "+e.dataCount+" of this type.";break}return e.msg=t,e}});var Ede=ye(ef=>{"use strict";var rd=ZP();ef._doPlot=rd._doPlot;ef.newPlot=rd.newPlot;ef.restyle=rd.restyle;ef.relayout=rd.relayout;ef.redraw=rd.redraw;ef.update=rd.update;ef._guiRestyle=rd._guiRestyle;ef._guiRelayout=rd._guiRelayout;ef._guiUpdate=rd._guiUpdate;ef._storeDirectGUIEdit=rd._storeDirectGUIEdit;ef.react=rd.react;ef.extendTraces=rd.extendTraces;ef.prependTraces=rd.prependTraces;ef.addTraces=rd.addTraces;ef.deleteTraces=rd.deleteTraces;ef.moveTraces=rd.moveTraces;ef.purge=rd.purge;ef.addFrames=rd.addFrames;ef.deleteFrames=rd.deleteFrames;ef.animate=rd.animate;ef.setPlotConfig=rd.setPlotConfig;var Xvt=HS().getGraphDiv,Zvt=dP().eraseActiveShape;ef.deleteActiveShape=function(e){return Zvt(Xvt(e))};ef.toImage=aU();ef.validate=gde();ef.downloadImage=sU();var Mde=Sde();ef.makeTemplate=Mde.makeTemplate;ef.validateTemplate=Mde.validateTemplate});var sT=ye((isr,kde)=>{"use strict";var uU=Pr(),Yvt=Oa();kde.exports=function(t,r,n,i){var a=i("x"),o=i("y"),s,l=Yvt.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),a){var u=uU.minRowLength(a);o?s=Math.min(u,uU.minRowLength(o)):(s=u,i("y0"),i("dy"))}else{if(!o)return 0;s=uU.minRowLength(o),i("x0"),i("dx")}return r._length=s,s}});var Dg=ye((nsr,Pde)=>{"use strict";var Cde=Pr().dateTick0,Kvt=fs(),Jvt=Kvt.ONEWEEK;function Lde(e,t){return e%Jvt===0?Cde(t,1):Cde(t,0)}Pde.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",Lde(o,r.xcalendar)),i("xperiodalignment"))}if(a.y){var s=i("yperiod");s&&(i("yperiod0",Lde(s,r.ycalendar)),i("yperiodalignment"))}}});var Dde=ye((asr,Rde)=>{"use strict";var Ide=["orientation","groupnorm","stackgaps"];Rde.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},h=0;h<Ide.length;h++){var d=Ide[h],v=d+"Found";if(!u[v]){var m=t[d]!==void 0,b=d==="orientation";if((m||c)&&(u[d]=i(d,f[d]),b&&(u.fillDflt=u[d]==="h"?"tonextx":"tonexty"),m&&(u[v]=!0,!c&&(delete u.traces[0][d],b))))for(var p=0;p<u.traces.length-1;p++){var k=u.traces[p];k._input.fill!==k.fill&&(k.fill=u.fillDflt)}}}return u}}});var $p=ye((osr,Ode)=>{"use strict";var Fde=ka(),zde=pv().hasColorscale,qde=td(),$vt=Ru();Ode.exports=function(t,r,n,i,a,o={}){var s=$vt.isBubble(t),l=(t.line||{}).color,u;if(l&&(n=l),a("marker.symbol"),a("marker.opacity",s?.7:1),a("marker.size"),o.noAngle||(a("marker.angle"),o.noAngleRef||a("marker.angleref"),o.noStandOff||a("marker.standoff")),a("marker.color",n),zde(t,"marker")&&qde(t,r,i,a,{prefix:"marker.",cLetter:"c"}),o.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=Fde.background:u=Fde.defaultLine,a("marker.line.color",u),zde(t,"marker.line")&&qde(t,r,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",s?1:0),o.noLineDash||a("marker.line.dash")),s&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),o.gradient){var c=a("marker.gradient.type");c!=="none"&&a("marker.gradient.color")}}});var D0=ye((ssr,Bde)=>{"use strict";var Qvt=Pr().isArrayOrTypedArray,ept=pv().hasColorscale,tpt=td();Bde.exports=function(t,r,n,i,a,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),a("line.color",n),ept(t,"line"))tpt(t,r,i,a,{prefix:"line.",cLetter:"c"});else{var l=(Qvt(s)?!1:s)||n;a("line.color",l)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var lT=ye((lsr,Nde)=>{"use strict";Nde.exports=function(t,r,n){var i=n("line.shape");i==="spline"&&n("line.smoothing")}});var F0=ye((usr,Ude)=>{"use strict";var rpt=Pr();Ude.exports=function(e,t,r,n,i){i=i||{},n("textposition"),rpt.coerceFont(n,"textfont",i.font||r.font,i),i.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var Fg=ye((csr,Gde)=>{"use strict";var tI=ka(),Vde=Pr().isArrayOrTypedArray;function ipt(e){for(var t=tI.interpolate(e[0][1],e[1][1],.5),r=2;r<e.length;r++){var n=tI.interpolate(e[r-1][1],e[r][1],.5);t=tI.interpolate(t,n,e[r-1][0]/e[r][0])}return t}Gde.exports=function(t,r,n,i,a){a||(a={});var o=!1;if(r.marker){var s=r.marker.color,l=(r.marker.line||{}).color;s&&!Vde(s)?o=s:l&&!Vde(l)&&(o=l)}var u;if(a.moduleHasFillgradient){var c=i("fillgradient.type");if(c!=="none"){i("fillgradient.start"),i("fillgradient.stop");var f=i("fillgradient.colorscale");f&&(u=ipt(f))}}i("fillcolor",tI.addOpacity((r.line||{}).color||o||u||n,.5))}});var Xde=ye((fsr,Wde)=>{"use strict";var Hde=Pr(),npt=Oa(),apt=pf(),opt=Lm(),uT=Ru(),spt=sT(),lpt=Dg(),upt=Dde(),cpt=$p(),fpt=D0(),jde=lT(),hpt=F0(),dpt=Fg(),vpt=Pr().coercePattern;Wde.exports=function(t,r,n,i){function a(d,v){return Hde.coerce(t,r,apt,d,v)}var o=spt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){lpt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=upt(t,r,i,a);i.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var l=!s&&o<opt.PTS_LINESONLY?"lines+markers":"lines";a("text"),a("hovertext"),a("mode",l),uT.hasMarkers(r)&&cpt(t,r,n,i,a,{gradient:!0}),uT.hasLines(r)&&(fpt(t,r,n,i,a,{backoff:!0}),jde(t,r,a),a("connectgaps"),a("line.simplify")),uT.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),hpt(t,r,i,a));var u=[];(uT.hasMarkers(r)||uT.hasText(r))&&(a("cliponaxis"),a("marker.maxdisplayed"),u.push("points")),a("fill",s?s.fillDflt:"none"),r.fill!=="none"&&(dpt(t,r,n,a,{moduleHasFillgradient:!0}),uT.hasLines(r)||jde(t,r,a),vpt(a,"fillpattern",r.fillcolor,!1));var c=(r.line||{}).color,f=(r.marker||{}).color;(r.fill==="tonext"||r.fill==="toself")&&u.push("fills"),a("hoveron",u.join("+")||"points"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback"));var h=npt.getComponentMethod("errorbars","supplyDefaults");h(t,r,c||f||n,{axis:"y"}),h(t,r,c||f||n,{axis:"x",inherit:"y"}),Hde.coerceSelectionMarkerOpacity(r,a)}}});var e2=ye((hsr,Zde)=>{"use strict";var ppt=Kb().getAxisGroup;Zde.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=ppt(n,s)+o,u=n._alignmentOpts||{},c=i("alignmentgroup"),f=u[l];f||(f=u[l]={});var h=f[c];h?h.traces.push(r):h=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var d=i("offsetgroup")||"",v=h.offsetGroups,m=v[d];r._offsetIndex=0,(a!=="group"||d)&&(m||(m=v[d]={offsetIndex:Object.keys(v).length}),r._offsetIndex=m.offsetIndex)}});var cU=ye((dsr,Yde)=>{"use strict";var gpt=Pr(),mpt=e2(),ypt=pf();Yde.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return gpt.coerce(i._input,i,ypt,h)}if(r.scattermode==="group")for(a=0;a<t.length;a++)i=t[a],i.type==="scatter"&&(n=i._input,mpt(n,i,r,s,o));for(a=0;a<t.length;a++){var l=t[a];if(l.type==="scatter"){var u=l.fill;if(!(u==="none"||u==="toself")&&(l.opacity=void 0,u==="tonexty"||u==="tonextx"))for(var c=a-1;c>=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var Jde=ye((vsr,Kde)=>{"use strict";var _pt=Pr(),xpt=tL();Kde.exports=function(e,t){function r(i,a){return _pt.coerce(e,t,xpt,i,a)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var zg=ye((psr,Qde)=>{"use strict";var bpt=Eo(),$de=Pr(),wpt=$de.dateTime2ms,rI=$de.incrementMonth,Tpt=fs(),Apt=Tpt.ONEAVGMONTH;Qde.exports=function(t,r,n,i){if(r.type!=="date")return{vals:i};var a=t[n+"periodalignment"];if(!a)return{vals:i};var o=t[n+"period"],s;if(bpt(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:i}}for(var u=r.calendar,c=a==="start",f=a==="end",h=t[n+"period0"],d=wpt(h,u)||0,v=[],m=[],b=[],p=i.length,k=0;k<p;k++){var M=i[k],T,L,x;if(s){for(T=Math.round((M-d)/(s*Apt)),x=rI(d,s*T,u);x>M;)x=rI(x,-s,u);for(;x<=M;)x=rI(x,s,u);L=rI(x,-s,u)}else{for(T=Math.round((M-d)/o),x=d+T*o;x>M;)x-=o;for(;x<=M;)x+=o;L=x-o}v[k]=c?L:f?x:(L+x)/2,m[k]=L,b[k]=x}return{vals:v,starts:m,ends:b}}});var z0=ye((gsr,tve)=>{"use strict";var fU=pv().hasColorscale,hU=gv(),eve=Ru();tve.exports=function(t,r){eve.hasLines(r)&&fU(r,"line")&&hU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),eve.hasMarkers(r)&&(fU(r,"marker")&&hU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),fU(r,"marker.line")&&hU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var Rm=ye((msr,rve)=>{"use strict";var Of=Pr();rve.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;Of.mergeArray(r.text,t,"tx"),Of.mergeArray(r.texttemplate,t,"txt"),Of.mergeArray(r.hovertext,t,"htx"),Of.mergeArray(r.customdata,t,"data"),Of.mergeArray(r.textposition,t,"tp"),r.textfont&&(Of.mergeArrayCastPositive(r.textfont.size,t,"ts"),Of.mergeArray(r.textfont.color,t,"tc"),Of.mergeArray(r.textfont.family,t,"tf"),Of.mergeArray(r.textfont.weight,t,"tw"),Of.mergeArray(r.textfont.style,t,"ty"),Of.mergeArray(r.textfont.variant,t,"tv"),Of.mergeArray(r.textfont.textcase,t,"tC"),Of.mergeArray(r.textfont.lineposition,t,"tE"),Of.mergeArray(r.textfont.shadow,t,"tS"));var i=r.marker;if(i){Of.mergeArrayCastPositive(i.size,t,"ms"),Of.mergeArrayCastPositive(i.opacity,t,"mo"),Of.mergeArray(i.symbol,t,"mx"),Of.mergeArray(i.angle,t,"ma"),Of.mergeArray(i.standoff,t,"mf"),Of.mergeArray(i.color,t,"mc");var a=i.line;i.line&&(Of.mergeArray(a.color,t,"mlc"),Of.mergeArrayCastPositive(a.width,t,"mlw"),Of.mergeArray(a.dash,t,"mld"));var o=i.gradient;o&&o.type!=="none"&&(Of.mergeArray(o.type,t,"mgt"),Of.mergeArray(o.color,t,"mgc"))}}});var q0=ye((ysr,nve)=>{"use strict";var ive=Pr();nve.exports=function(t,r){ive.isArrayOrTypedArray(r.selectedpoints)&&ive.tagSelected(t,r)}});var O0=ye((_sr,fve)=>{"use strict";var ave=Eo(),vU=Pr(),n4=ho(),ove=zg(),dU=fs().BADNUM,pU=Ru(),Spt=z0(),Mpt=Rm(),Ept=q0();function kpt(e,t){var r=e._fullLayout,n=t._xA=n4.getFromId(e,t.xaxis||"x","x"),i=t._yA=n4.getFromId(e,t.yaxis||"y","y"),a=n.makeCalcdata(t,"x"),o=i.makeCalcdata(t,"y"),s=ove(t,n,"x",a),l=ove(t,i,"y",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),d=t.ids,v=gU(t,r,n,i),m=!1,b,p,k,M,T,L;uve(r,t);var x="x",C="y",S;if(v)vU.pushUnique(v.traceIndices,t.index),b=v.orientation==="v",b?(C="s",S="x"):(x="s",S="y"),T=v.stackgaps==="interpolate";else{var g=lve(t,f);sve(e,t,n,i,u,c,g)}var P=!!t.xperiodalignment,E=!!t.yperiodalignment;for(p=0;p<f;p++){var z=h[p]={},q=ave(u[p]),U=ave(c[p]);q&&U?(z[x]=u[p],z[C]=c[p],P&&(z.orig_x=a[p],z.xEnd=s.ends[p],z.xStart=s.starts[p]),E&&(z.orig_y=o[p],z.yEnd=l.ends[p],z.yStart=l.starts[p])):v&&(b?q:U)?(z[S]=b?u[p]:c[p],z.gap=!0,T?(z.s=dU,m=!0):z.s=0):z[x]=z[C]=dU,d&&(z.id=String(d[p]))}if(Mpt(h,t),Spt(e,t),Ept(h,t),v){for(p=0;p<h.length;)h[p][S]===dU?h.splice(p,1):p++;if(vU.sort(h,function(N,H){return N[S]-H[S]||N.i-H.i}),m){for(p=0;p<h.length-1&&h[p].gap;)p++;for(L=h[p].s,L||(L=h[p].s=0),k=0;k<p;k++)h[k].s=L;for(M=h.length-1;M>p&&h[M].gap;)M--;for(L=h[M].s,k=h.length-1;k>M;k--)h[k].s=L;for(;p<M;)if(p++,h[p].gap){for(k=p+1;h[k].gap;)k++;for(var G=h[p-1][S],Z=h[p-1].s,j=(h[k].s-Z)/(h[k][S]-G);p<k;)h[p].s=Z+(h[p][S]-G)*j,p++}}}return h}function sve(e,t,r,n,i,a,o){var s=t._length,l=e._fullLayout,u=r._id,c=n._id,f=l._firstScatter[cve(t)]===t.uid,h=(gU(t,l,r,n)||{}).orientation,d=t.fill;r._minDtick=0,n._minDtick=0;var v={padded:!0},m={padded:!0};o&&(v.ppad=m.ppad=o);var b=s<2||i[0]!==i[s-1]||a[0]!==a[s-1];b&&(d==="tozerox"||d==="tonextx"&&(f||h==="h"))?v.tozero=!0:!(t.error_y||{}).visible&&(d==="tonexty"||d==="tozeroy"||!pU.hasMarkers(t)&&!pU.hasText(t))&&(v.padded=!1,v.ppad=0),b&&(d==="tozeroy"||d==="tonexty"&&(f||h==="v"))?m.tozero=!0:(d==="tonextx"||d==="tozerox")&&(m.padded=!1),u&&(t._extremes[u]=n4.findExtremes(r,i,v)),c&&(t._extremes[c]=n4.findExtremes(n,a,m))}function lve(e,t){if(pU.hasMarkers(e)){var r=e.marker,n=1.6*(e.marker.sizeref||1),i;if(e.marker.sizemode==="area"?i=function(u){return Math.max(Math.sqrt((u||0)/n),3)}:i=function(u){return Math.max((u||0)/n,3)},vU.isArrayOrTypedArray(r.size)){var a={type:"linear"};n4.setConvert(a);for(var o=a.makeCalcdata(e.marker,"size"),s=new Array(t),l=0;l<t;l++)s[l]=i(o[l]);return s}else return i(r.size)}}function uve(e,t){var r=cve(t),n=e._firstScatter;n[r]||(n[r]=t.uid)}function cve(e){var t=e.stackgroup;return e.xaxis+e.yaxis+e.type+(t?"-"+t:"")}function gU(e,t,r,n){var i=e.stackgroup;if(i){var a=t._scatterStackOpts[r._id+n._id][i],o=a.orientation==="v"?n:r;if(o.type==="linear"||o.type==="log")return a}}fve.exports={calc:kpt,calcMarkerSize:lve,calcAxisExpansion:sve,setFirstScatter:uve,getStackOpts:gU}});var dve=ye((xsr,hve)=>{"use strict";hve.exports=iI;var Cpt=Pr().distinctVals;function iI(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),i=[],a=0;a<e.length;a++){for(var o=e[a],s=0;s<o.length;s++){var l=o[s],u=l.p;u===void 0&&(u=l[n]),u!==void 0&&i.push(u)}o[0]&&o[0].width1&&(r=Math.min(o[0].width1,r))}this.positions=i;var c=Cpt(i);this.distinctPositions=c.vals,c.vals.length===1&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(c.minDiff,r);var f=(t.posAxis||{}).type;(f==="category"||f==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}iI.prototype.put=function(t,r,n){var i=this.getLabel(t,r,n),a=this.bins[i]||0;return this.bins[i]=a+n,a};iI.prototype.get=function(t,r,n){var i=this.getLabel(t,r,n);return this.bins[i]||0};iI.prototype.getLabel=function(t,r,n){var i=n<0&&this.sepNegVal?"v":"^",a=this.overlapNoMerge?t:Math.round(t/this.binWidth);return i+a+"g"+r}});var A_=ye((bsr,vve)=>{"use strict";vve.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var t2=ye((wsr,yve)=>{"use strict";var B0=Eo(),{isArrayOrTypedArray:Oy}=Pr(),{BADNUM:cT}=fs(),Lpt=Oa(),a4=ho(),{getAxisGroup:Ppt}=Kb(),nI=dve(),{TEXTPAD:Ipt}=A_(),{LINE_SPACING:Rpt}=Dh(),{BR_TAG_ALL:Dpt}=Zl();function Fpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;u<a.length;u++){var c=a[u];if(c.visible===!0&&Lpt.traceIs(c,"bar")&&c.xaxis===r._id&&c.yaxis===n._id&&(c.orientation==="h"?s.push(o[u]):l.push(o[u]),c._computePh))for(var f=e.calcdata[u],h=0;h<f.length;h++)typeof f[h].ph0=="function"&&(f[h].ph0=f[h].ph0()),typeof f[h].ph1=="function"&&(f[h].ph1=f[h].ph1())}var d={xCat:r.type==="category"||r.type==="multicategory",yCat:n.type==="category"||n.type==="multicategory",mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};yU(e,r,n,l,d),yU(e,n,r,s,d)}function yU(e,t,r,n,i){if(n.length){var a,o,s,l,u;switch(Opt(r,n),i.mode){case"overlay":mU(e,t,r,n,i);break;case"group":for(a=[],o=[],s=0;s<n.length;s++)l=n[s],u=l[0].trace,u.offset===void 0?o.push(l):a.push(l);o.length&&Bpt(e,t,r,o,i),a.length&&mU(e,t,r,a,i);break;case"stack":case"relative":for(a=[],o=[],s=0;s<n.length;s++)l=n[s],u=l[0].trace,u.base===void 0?o.push(l):a.push(l);qpt(o),o.length&&Npt(e,t,r,o,i),a.length&&mU(e,t,r,a,i);break}zpt(n),Wpt(n,t)}}function zpt(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 qpt(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 Opt(e,t){var r,n;for(r=0;r<t.length;r++){var i=t[r],a=i[0].trace,o=a.type==="funnel"?a._base:a.base,s,l=a.orientation==="h"?a.xcalendar:a.ycalendar,u=e.type==="category"||e.type==="multicategory"?function(){return null}:e.d2c;if(Oy(o)){for(n=0;n<Math.min(o.length,i.length);n++)s=u(o[n],0,l),B0(s)?(i[n].b=+s,i[n].hasB=1):i[n].b=0;for(;n<i.length;n++)i[n].b=0}else{s=u(o,0,l);var c=B0(s);for(s=c?s:0,n=0;n<i.length;n++)i[n].b=s,c&&(i[n].hasB=1)}}}function mU(e,t,r,n,i){for(var a=0;a<n.length;a++){var o=n[a],s=new nI([o],{posAxis:t,sepNegVal:!1,overlapNoMerge:!i.norm});_U(e,t,s,i),i.norm?(mve(s),xU(r,s,i)):gve(r,s)}}function Bpt(e,t,r,n,i){var a=new nI(n,{posAxis:t,sepNegVal:!1,overlapNoMerge:!i.norm});_U(e,t,a,i),Hpt(a,t),i.norm?(mve(a),xU(r,a,i)):gve(r,a)}function Npt(e,t,r,n,i){var a=new nI(n,{posAxis:t,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});_U(e,t,a,i),Gpt(r,a,i);for(var o=0;o<n.length;o++)for(var s=n[o],l=s[0].t.offsetindex,u=0;u<s.length;u++){var c=s[u];if(c.s!==cT){var f=c.b+c.s===a.get(c.p,l,c.s);f&&(c._outmost=!0)}}i.norm&&xU(r,a,i)}function _U(e,t,r,n){var i=e._fullLayout,a=r.positions,o=r.distinctPositions,s=r.minDiff,l=r.traces,u=l.length,c=a.length!==o.length,f=s*(1-n.gap),h,d,v,m;if(t._id==="angularaxis")h=f,d=h*(1-(n.groupgap||0)),v=-d/2;else{var b=Ppt(i,t._id)+l[0][0].trace.orientation;m=i._alignmentOpts[b]||{}}for(var p=0;p<u;p++){var k=l[p],M=k[0].trace;if(t._id!=="angularaxis"){var T=m[M.alignmentgroup]||{},L=Object.keys(T.offsetGroups||{}).length;L?h=f/L:h=c?f/u:f,d=h*(1-(n.groupgap||0)),L?v=((2*M._offsetIndex+1-L)*h-d)/2:v=c?((2*p+1-u)*h-d)/2:-d/2}var x=k[0].t;x.barwidth=d,x.offsetindex=M._offsetIndex||0,x.poffset=v,x.bargroupwidth=f,x.bardelta=s}r.binWidth=l[0][0].t.barwidth/100,Upt(r),Vpt(t,r),t._id==="angularaxis"?pve(t,r):pve(t,r,c)}function Upt(e){var t=e.traces,r,n;for(r=0;r<t.length;r++){var i=t[r],a=i[0],o=a.trace,s=a.t,l=o._offset||o.offset,u=s.poffset,c;if(Oy(l)){for(c=Array.prototype.slice.call(l,0,i.length),n=0;n<c.length;n++)B0(c[n])||(c[n]=u);for(n=c.length;n<i.length;n++)c.push(u);s.poffset=c}else l!==void 0&&(s.poffset=l);var f=o._width||o.width,h=s.barwidth;if(Oy(f)){var d=Array.prototype.slice.call(f,0,i.length);for(n=0;n<d.length;n++)B0(d[n])||(d[n]=h);for(n=d.length;n<i.length;n++)d.push(h);if(s.barwidth=d,l===void 0){for(c=[],n=0;n<i.length;n++)c.push(u+(h-d[n])/2);s.poffset=c}}else f!==void 0&&(s.barwidth=f,l===void 0&&(s.poffset=u+(h-f)/2))}}function Vpt(e,t){for(var r=t.traces,n=fT(e),i=0;i<r.length;i++)for(var a=r[i],o=a[0].t,s=o.poffset,l=Oy(s),u=o.barwidth,c=Oy(u),f=0;f<a.length;f++){var h=a[f],d=h.w=c?u[f]:u;h.p===void 0&&(h.p=h[n],h["orig_"+n]=h[n]);var v=(l?s[f]:s)+d/2;h[n]=h.p+v}}function pve(e,t,r){var n=t.traces,i=t.minDiff,a=i/2;a4.minDtick(e,t.minDiff,t.distinctPositions[0],r);for(var o=0;o<n.length;o++){var s=n[o],l=s[0],u=l.trace,c=[],f,h,d,v;for(v=0;v<s.length;v++)f=s[v],h=f.p-a,d=f.p+a,c.push(h,d);if(u.width||u.offset){var m=l.t,b=m.poffset,p=m.barwidth,k=Oy(b),M=Oy(p);for(v=0;v<s.length;v++){f=s[v];var T=k?b[v]:b,L=M?p[v]:p;h=f.p+T,d=h+L,c.push(h,d)}}u._extremes[e._id]=a4.findExtremes(e,c,{padded:!1})}}function gve(e,t){for(var r=t.traces,n=fT(e),i=0;i<r.length;i++){for(var a=r[i],o=a[0].trace,s=o.type==="scatter",l=o.orientation==="v",u=[],c=!1,f=0;f<a.length;f++){var h=a[f],d=s?0:h.b,v=s?l?h.y:h.x:d+h.s;h[n]=v,u.push(v),h.hasB&&u.push(d),(!h.hasB||!h.b)&&(c=!0)}let{ppadminus:m,ppadplus:b}=bU(o,a);o._extremes[e._id]=a4.findExtremes(e,u,{tozero:c,padded:!0,ppadplus:b,ppadminus:m})}}function Gpt(e,t,r){var n=fT(e),i=t.traces,a,o,s,l,u,c,f;for(l=0;l<i.length;l++)if(a=i[l],o=a[0].trace,o.type==="funnel")for(f=a[0].t.offsetindex,u=0;u<a.length;u++)c=a[u],c.s!==cT&&t.put(c.p,f,-.5*c.s);for(l=0;l<i.length;l++){a=i[l],o=a[0].trace,s=o.type==="funnel",f=o.type==="barpolar"?0:a[0].t.offsetindex;var h=[];for(u=0;u<a.length;u++)if(c=a[u],c.s!==cT){var d;s?d=c.s:d=c.s+c.b;var v=t.put(c.p,f,d),m=v+d;c.b=v,c[n]=m,r.norm||(h.push(m),c.hasB&&h.push(v))}if(!r.norm){let{ppadminus:b,ppadplus:p}=bU(o,a);o._extremes[e._id]=a4.findExtremes(e,h,{tozero:!0,padded:!0,ppadplus:p,ppadminus:b})}}}function mve(e){for(var t=e.traces,r=0;r<t.length;r++)for(var n=t[r],i=n[0].t.offsetindex,a=0;a<n.length;a++){var o=n[a];o.s!==cT&&e.put(o.p,i,o.b+o.s)}}function Hpt(e,t){for(var r=e.traces,n=0;n<r.length;n++){var i=r[n],a=i[0].trace,o=i[0].t.offsetindex;if(a.base===void 0)for(var s=new nI([i],{posAxis:t,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<i.length;l++){var u=i[l];if(u.p!==cT){var c=s.put(u.p,o,u.b+u.s);c&&(u.b=c)}}}}function xU(e,t,r){var n=t.traces,i=fT(e),a=r.norm==="fraction"?1:100,o=a/1e9,s=e.l2c(e.c2l(0)),l=r.mode==="stack"?a:s;function u(x){return B0(e.c2l(x))&&(x<s-o||x>l+o||!B0(s))}for(var c=0;c<n.length;c++){for(var f=n[c],h=f[0].t.offsetindex,d=f[0].trace,v=[],m=!1,b=!1,p=0;p<f.length;p++){var k=f[p];if(k.s!==cT){var M=Math.abs(a/t.get(k.p,h,k.s));k.b*=M,k.s*=M;var T=k.b,L=T+k.s;k[i]=L,v.push(L),b=b||u(L),k.hasB&&(v.push(T),b=b||u(T)),(!k.hasB||!k.b)&&(m=!0)}}let{ppadminus:x,ppadplus:C}=bU(d,f);d._extremes[e._id]=a4.findExtremes(e,v,{tozero:m,padded:b,ppadplus:C,ppadminus:x})}}function bU(e,t){if(e.orientation==="v"&&(e.text||e.texttemplate)&&e.textposition==="outside"&&(e.textangle==="auto"||e.textangle===0)){let n=function(a){return!a||typeof a!="string"?0:(a.match(Dpt)||[]).length+1};var r;e.texttemplate?r=n(e.texttemplate):r=Oy(e.text)?Math.max(...e.text.map(a=>n(a))):n(e.text);let i=e.outsidetextfont.size*Rpt*r+Ipt;return{ppadplus:t.some(a=>a.s<0)?i:0,ppadminus:t.some(a=>a.s>=0)?i:0}}return{ppadplus:void 0,ppadminus:void 0}}function jpt(e,t,r,n){for(var i=fT(n),a=0;a<e.length;a++)for(var o=e[a],s=0;s<o.length;s++){var l=o[s],u=l[i];l._sMin=t[u],l._sMax=r[u]}}function Wpt(e,t){var r=fT(t),n={},i,a,o,s=1/0,l=-1/0;for(i=0;i<e.length;i++)for(o=e[i],a=0;a<o.length;a++){var u=o[a].p;B0(u)&&(s=Math.min(s,u),l=Math.max(l,u))}var c=1e4/(l-s),f=n.round=function(S){return String(Math.round(c*(S-s)))},h={},d={},v=e.some(function(S){var g=S[0].trace;return"marker"in g&&g.marker.cornerradius});for(i=0;i<e.length;i++){o=e[i],o[0].t.extents=n;var m=o[0].t.poffset,b=Oy(m);for(a=0;a<o.length;a++){var p=o[a],k=p[r]-p.w/2;if(B0(k)){var M=p[r]+p.w/2,T=f(p.p);n[T]?n[T]=[Math.min(k,n[T][0]),Math.max(M,n[T][1])]:n[T]=[k,M]}if(p.p0=p.p+(b?m[a]:m),p.p1=p.p0+p.w,p.s0=p.b,p.s1=p.s0+p.s,v){var L=Math.min(p.s0,p.s1)||0,x=Math.max(p.s0,p.s1)||0,C=p[r];h[C]=C in h?Math.min(h[C],L):L,d[C]=C in d?Math.max(d[C],x):x}}}v&&jpt(e,h,d,t)}function fT(e){return e._id.charAt(0)}yve.exports={crossTraceCalc:Fpt,setGroupPositions:yU}});var wve=ye((Tsr,bve)=>{"use strict";var _ve=O0(),xve=t2().setGroupPositions;function Xpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;u<a.length;u++){var c=a[u];c.visible===!0&&c.type==="scatter"&&c.xaxis===r._id&&c.yaxis===n._id&&(c.orientation==="h"?s.push(o[u]):c.orientation==="v"&&l.push(o[u]))}var f={mode:i.scattermode,gap:i.scattergap};xve(e,r,n,l,f),xve(e,n,r,s,f)}bve.exports=function(t,r){t._fullLayout.scattermode==="group"&&Xpt(t,r);var n=r.xaxis,i=r.yaxis,a=n._id+i._id,o=t._fullLayout._scatterStackOpts[a];if(o){var s=t.calcdata,l,u,c,f,h,d,v,m,b,p,k,M,T,L,x;for(var C in o){p=o[C];var S=p.traceIndices;if(S.length){for(k=p.stackgaps==="interpolate",M=p.groupnorm,p.orientation==="v"?(T="x",L="y"):(T="y",L="x"),x=new Array(S.length),l=0;l<x.length;l++)x[l]=!1;d=s[S[0]];var g=new Array(d.length);for(l=0;l<d.length;l++)g[l]=d[l][T];for(l=1;l<S.length;l++){for(h=s[S[l]],u=c=0;u<h.length;u++){for(v=h[u][T];v>g[c]&&c<g.length;c++)wU(h,u,g[c],l,x,k,T),u++;if(v!==g[c]){for(f=0;f<l;f++)wU(s[S[f]],c,v,f,x,k,T);g.splice(c,0,v)}c++}for(;c<g.length;c++)wU(h,u,g[c],l,x,k,T),u++}var P=g.length;for(u=0;u<d.length;u++){for(m=d[u][L]=d[u].s,l=1;l<S.length;l++)h=s[S[l]],h[0].trace._rawLength=h[0].trace._length,h[0].trace._length=P,m+=h[u].s,h[u][L]=m;if(M)for(b=(M==="fraction"?m:m/100)||1,l=0;l<S.length;l++){var E=s[S[l]][u];E[L]/=b,E.sNorm=E.s/b}}for(l=0;l<S.length;l++){h=s[S[l]];var z=h[0].trace,q=_ve.calcMarkerSize(z,z._rawLength),U=Array.isArray(q);if(q&&x[l]||U){var G=q;for(q=new Array(P),u=0;u<P;u++)q[u]=h[u].gap?0:U?G[h[u].i]:G}var Z=new Array(P),j=new Array(P);for(u=0;u<P;u++)Z[u]=h[u].x,j[u]=h[u].y;_ve.calcAxisExpansion(t,z,n,i,Z,j,q),h[0].t.orientation=p.orientation}}}}};function wU(e,t,r,n,i,a,o){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[o]=r,e.splice(t,0,s),t&&r===e[t-1][o]){var l=e[t-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else a&&(s.s=Zpt(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 Zpt(e,t,r,n){var i=e[t-1],a=e[t+1];return a?i?i.s+(a.s-i.s)*(r-i[n])/(a[n]-i[n]):a.s:i.s}});var AU=ye((Asr,kve)=>{"use strict";var Ypt=So(),Mve=fs(),o4=Mve.BADNUM,Eve=Mve.LOG_CLIP,Tve=Eve+.5,Ave=Eve-.5,aI=Pr(),Kpt=aI.segmentsIntersect,Sve=aI.constrain,TU=Lm();kve.exports=function(t,r){var n=r.trace||{},i=r.xaxis,a=r.yaxis,o=i.type==="log",s=a.type==="log",l=i._length,u=a._length,c=r.backoff,f=n.marker,h=r.connectGaps,d=r.baseTolerance,v=r.shape,m=v==="linear",b=n.fill&&n.fill!=="none",p=[],k=TU.minTolerance,M=t.length,T=new Array(M),L=0,x,C,S,g,P,E,z,q,U,G,Z,j,N,H,re,oe;function _e(gt){var Ge=t[gt];if(!Ge)return!1;var Je=r.linearized?i.l2p(Ge.x):i.c2p(Ge.x),We=r.linearized?a.l2p(Ge.y):a.c2p(Ge.y);if(Je===o4){if(o&&(Je=i.c2p(Ge.x,!0)),Je===o4)return!1;s&&We===o4&&(Je*=Math.abs(i._m*u*(i._m>0?Tve:Ave)/(a._m*l*(a._m>0?Tve:Ave)))),Je*=1e3}if(We===o4){if(s&&(We=a.c2p(Ge.y,!0)),We===o4)return!1;We*=1e3}return[Je,We]}function ke(gt,Ge,Je,We){var et=Je-gt,xt=We-Ge,At=.5-gt,Kt=.5-Ge,er=et*et+xt*xt,Sr=et*At+xt*Kt;if(Sr>0&&Sr<er){var Gr=At*xt-Kt*et;if(Gr*Gr<er)return!0}}var Ce,ge;function ie(gt,Ge){var Je=gt[0]/l,We=gt[1]/u,et=Math.max(0,-Je,Je-1,-We,We-1);return et&&Ce!==void 0&&ke(Je,We,Ce,ge)&&(et=0),et&&Ge&&ke(Je,We,Ge[0]/l,Ge[1]/u)&&(et=0),(1+TU.toleranceGrowth*et)*d}function Se(gt,Ge){var Je=gt[0]-Ge[0],We=gt[1]-Ge[1];return Math.sqrt(Je*Je+We*We)}var Ee=TU.maxScreensAway,we=-l*Ee,De=l*(1+Ee),Le=-u*Ee,me=u*(1+Ee),Pe=[[we,Le,De,Le],[De,Le,De,me],[De,me,we,me],[we,me,we,Le]],ce,He,lt,mt,Vt,st;function ct(gt,Ge){for(var Je=[],We=0,et=0;et<4;et++){var xt=Pe[et],At=Kpt(gt[0],gt[1],Ge[0],Ge[1],xt[0],xt[1],xt[2],xt[3]);At&&(!We||Math.abs(At.x-Je[0][0])>1||Math.abs(At.y-Je[0][1])>1)&&(At=[At.x,At.y],We&&Se(At,gt)<Se(Je[0],gt)?Je.unshift(At):Je.push(At),We++)}return Je}function Qt(gt){if(gt[0]<we||gt[0]>De||gt[1]<Le||gt[1]>me)return[Sve(gt[0],we,De),Sve(gt[1],Le,me)]}function Ht(gt,Ge){if(gt[0]===Ge[0]&&(gt[0]===we||gt[0]===De)||gt[1]===Ge[1]&&(gt[1]===Le||gt[1]===me))return!0}function nr(gt,Ge){var Je=[],We=Qt(gt),et=Qt(Ge);return We&&et&&Ht(We,et)||(We&&Je.push(We),et&&Je.push(et)),Je}function tt(gt,Ge,Je){return function(We,et){var xt=Qt(We),At=Qt(et),Kt=[];if(xt&&At&&Ht(xt,At))return Kt;xt&&Kt.push(xt),At&&Kt.push(At);var er=2*aI.constrain((We[gt]+et[gt])/2,Ge,Je)-((xt||We)[gt]+(At||et)[gt]);if(er){var Sr;xt&&At?Sr=er>0==xt[gt]>At[gt]?xt:At:Sr=xt||At,Sr[gt]+=er}return Kt}}var je;v==="linear"||v==="spline"?je=ct:v==="hv"||v==="vh"?je=nr:v==="hvh"?je=tt(0,we,De):v==="vhv"&&(je=tt(1,Le,me));function Ue(gt,Ge){var Je=Ge[0]-gt[0],We=(Ge[1]-gt[1])/Je,et=(gt[1]*Ge[0]-Ge[1]*gt[0])/Je;return et>0?[We>0?we:De,me]:[We>0?De:we,Le]}function Ae(gt){var Ge=gt[0],Je=gt[1],We=Ge===T[L-1][0],et=Je===T[L-1][1];if(!(We&&et))if(L>1){var xt=Ge===T[L-2][0],At=Je===T[L-2][1];We&&(Ge===we||Ge===De)&&xt?At?L--:T[L-1]=gt:et&&(Je===Le||Je===me)&&At?xt?L--:T[L-1]=gt:T[L++]=gt}else T[L++]=gt}function rt(gt){T[L-1][0]!==gt[0]&&T[L-1][1]!==gt[1]&&Ae([lt,mt]),Ae(gt),Vt=null,lt=mt=0}var St=aI.isArrayOrTypedArray(f);function Tt(gt){if(gt&&c&&(gt.i=x,gt.d=t,gt.trace=n,gt.marker=St?f[gt.i]:f,gt.backoff=c),Ce=gt[0]/l,ge=gt[1]/u,ce=gt[0]<we?we:gt[0]>De?De:0,He=gt[1]<Le?Le:gt[1]>me?me:0,ce||He){if(!L)T[L++]=[ce||gt[0],He||gt[1]];else if(Vt){var Ge=je(Vt,gt);Ge.length>1&&(rt(Ge[0]),T[L++]=Ge[1])}else st=je(T[L-1],gt)[0],T[L++]=st;var Je=T[L-1];ce&&He&&(Je[0]!==ce||Je[1]!==He)?(Vt&&(lt!==ce&&mt!==He?Ae(lt&&mt?Ue(Vt,gt):[lt||ce,mt||He]):lt&&mt&&Ae([lt,mt])),Ae([ce,He])):lt-ce&&mt-He&&Ae([ce||lt,He||mt]),Vt=gt,lt=ce,mt=He}else Vt&&rt(je(Vt,gt)[0]),T[L++]=gt}for(x=0;x<M;x++)if(C=_e(x),!!C){for(L=0,Vt=null,Tt(C),x++;x<M;x++){if(g=_e(x),!g){if(h)continue;break}if(!m||!r.simplify){Tt(g);continue}var dt=_e(x+1);if(G=Se(g,C),!(!(b&&(L===0||L===M-1))&&G<ie(g,dt)*k)){for(q=[(g[0]-C[0])/G,(g[1]-C[1])/G],P=C,Z=G,j=H=re=0,z=!1,S=g,x++;x<t.length;x++){if(E=dt,dt=_e(x+1),!E){if(h)continue;break}if(U=[E[0]-C[0],E[1]-C[1]],oe=U[0]*q[1]-U[1]*q[0],H=Math.min(H,oe),re=Math.max(re,oe),re-H>ie(E,dt))break;S=E,N=U[0]*q[0]+U[1]*q[1],N>Z?(Z=N,g=E,z=!1):N<j&&(j=N,P=E,z=!0)}if(z?(Tt(g),S!==P&&Tt(P)):(P!==C&&Tt(P),S!==g&&Tt(g)),Tt(S),x>=t.length||!E)break;Tt(E),C=E}}Vt&&Ae([lt||Vt[0],mt||Vt[1]]),p.push(T.slice(0,L))}var Et=v.slice(v.length-1);if(c&&Et!=="h"&&Et!=="v"){for(var pt=!1,Xt=-1,or=[],_r=0;_r<p.length;_r++)for(var Er=0;Er<p[_r].length-1;Er++){var ei=p[_r][Er],qr=p[_r][Er+1],jr=Ypt.applyBackoff(qr,ei);(jr[0]!==qr[0]||jr[1]!==qr[1])&&(pt=!0),or[Xt+1]||(Xt++,or[Xt]=[ei,[jr[0],jr[1]]])}return pt?or:p}return p}});var SU=ye((Ssr,Lve)=>{"use strict";var Cve={tonextx:1,tonexty:1,tonext:1};Lve.exports=function(t,r,n){var i,a,o,s,l,u={},c=!1,f=-1,h=0,d=-1;for(a=0;a<n.length;a++)i=n[a][0].trace,o=i.stackgroup||"",o?o in u?l=u[o]:(l=u[o]=h,h++):i.fill in Cve&&d>=0?l=d:(l=d=h,h++),l<f&&(c=!0),i._groupIndex=f=l;var v=n.slice();c&&v.sort(function(b,p){var k=b[0].trace,M=p[0].trace;return k._groupIndex-M._groupIndex||k.index-M.index});var m={};for(a=0;a<v.length;a++)i=v[a][0].trace,o=i.stackgroup||"",i.visible===!0?(i._nexttrace=null,i.fill in Cve&&(s=m[o],i._prevtrace=s||null,s&&(s._nexttrace=i)),i._ownfill=i.fill&&(i.fill.slice(0,6)==="tozero"||i.fill==="toself"||i.fill.slice(0,2)==="to"&&!i._prevtrace),m[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return v}});var vT=ye((Msr,Rve)=>{"use strict";var qg=qa(),Jpt=Oa(),s4=Pr(),hT=s4.ensureSingle,Ive=s4.identity,Kf=So(),dT=Ru(),$pt=AU(),Qpt=SU(),oI=FM().tester;Rve.exports=function(t,r,n,i,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=Qpt(t,r,n);if(s=i.selectAll("g.trace").data(f,function(d){return d[0].trace.uid}),s.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),s.order(),e0t(t,s,r),c){o&&(l=o());var h=qg.transition().duration(a.duration).ease(a.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});h.each(function(){i.selectAll("g.trace").each(function(d,v){Pve(t,v,r,d,f,this,a)})})}else s.each(function(d,v){Pve(t,v,r,d,f,this,a)});u&&s.exit().remove(),i.selectAll("path:not([d])").remove()};function e0t(e,t,r){t.each(function(n){var i=hT(qg.select(this),"g","fills");Kf.setClipUrl(i,r.layerClipId,e);var a=n[0].trace;a._ownFill=null,a._nextFill=null;var o=[];a._ownfill&&o.push("_ownFill"),a._nexttrace&&o.push("_nextFill");var s=i.selectAll("g").data(o,Ive);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){a[l]=hT(qg.select(this),"path","js-fill")})})}function Pve(e,t,r,n,i,a,o){var s=e._context.staticPlot,l;t0t(e,t,r,n,i);var u=!!o&&o.duration>0;function c(tt){return u?tt.transition():tt}var f=r.xaxis,h=r.yaxis,d=n[0].trace,v=d.line,m=qg.select(a),b=hT(m,"g","errorbars"),p=hT(m,"g","lines"),k=hT(m,"g","points"),M=hT(m,"g","text");if(Jpt.getComponentMethod("errorbars","plot")(e,b,r,o),d.visible!==!0)return;c(m).style("opacity",d.opacity);var T,L,x=d.fill.charAt(d.fill.length-1);x!=="x"&&x!=="y"&&(x="");var C,S;x==="y"?(C=1,S=h.c2p(0,!0)):x==="x"&&(C=0,S=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=m;var g="",P=[],E=d._prevtrace,z=null,q=null;E&&(g=E._prevRevpath||"",L=E._nextFill,P=E._ownPolygons,z=E._fillsegments,q=E._fillElement);var U,G,Z="",j="",N,H,re,oe,_e,ke,Ce=[];d._polygons=[];var ge=[],ie=[],Se=s4.noop;if(T=d._ownFill,dT.hasLines(d)||d.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(v.shape)!==-1?(N=Kf.steps(v.shape),H=Kf.steps(v.shape.split("").reverse().join(""))):v.shape==="spline"?N=H=function(tt){var je=tt[tt.length-1];return tt.length>1&&tt[0][0]===je[0]&&tt[0][1]===je[1]?Kf.smoothclosed(tt.slice(1),v.smoothing):Kf.smoothopen(tt,v.smoothing)}:N=H=function(tt){return"M"+tt.join("L")},re=function(tt){return H(tt.reverse())},ie=$pt(n,{xaxis:f,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(v.width||1,3)/4,shape:v.shape,backoff:v.backoff,simplify:v.simplify,fill:d.fill}),ge=new Array(ie.length);var Ee=0;for(l=0;l<ie.length;l++){var we,De=ie[l];!we||!x?(we=De.slice(),ge[Ee]=we,Ee++):we.push.apply(we,De)}d._fillElement=null,d._fillExclusionElement=q,d._fillsegments=ge.slice(0,Ee),ge=d._fillsegments,ie.length&&(oe=ie[0][0].slice(),_e=ie[ie.length-1],ke=_e[_e.length-1].slice()),Se=function(tt){return function(je){if(U=N(je),G=re(je),Z?x?(Z+="L"+U.slice(1),j=G+("L"+j.slice(1))):(Z+="Z"+U,j=G+"Z"+j):(Z=U,j=G),dT.hasLines(d)){var Ue=qg.select(this);if(Ue.datum(n),tt)c(Ue.style("opacity",0).attr("d",U).call(Kf.lineGroupStyle)).style("opacity",1);else{var Ae=c(Ue);Ae.attr("d",U),Kf.singleLineStyle(n,Ae)}}}}}var Le=p.selectAll(".js-line").data(ie);c(Le.exit()).style("opacity",0).remove(),Le.each(Se(!1)),Le.enter().append("path").classed("js-line",!0).style("vector-effect",s?"none":"non-scaling-stroke").call(Kf.lineGroupStyle).each(Se(!0)),Kf.setClipUrl(Le,r.layerClipId,e);function me(tt){c(tt).attr("d","M0,0Z")}var Pe=function(){var tt=new Array(ge.length);for(l=0;l<ge.length;l++)tt[l]=oI(ge[l]);return tt},ce=function(tt){var je,Ue;if(!tt||tt.length===0)for(je=new Array(ge.length),Ue=0;Ue<ge.length;Ue++){var Ae=ge[Ue][0].slice(),rt=ge[Ue][ge[Ue].length-1].slice();Ae[C]=rt[C]=S;var St=[rt,Ae],Tt=St.concat(ge[Ue]);je[Ue]=oI(Tt)}else{for(je=new Array(tt.length-1+ge.length),Ue=0;Ue<tt.length-1;Ue++)je[Ue]=oI(tt[Ue]);var dt=tt[tt.length-1].slice();for(dt.reverse(),Ue=0;Ue<ge.length;Ue++)je[tt.length-1+Ue]=oI(ge[Ue].concat(dt))}return je};ie.length?(T?(T.datum(n),oe&&ke&&(x?(oe[C]=ke[C]=S,c(T).attr("d","M"+ke+"L"+oe+"L"+Z.slice(1)).call(Kf.singleFillStyle,e),Ce=ce(null)):(c(T).attr("d",Z+"Z").call(Kf.singleFillStyle,e),Ce=Pe())),d._polygons=Ce,d._fillElement=T):L&&(d.fill.slice(0,6)==="tonext"&&Z&&g?(d.fill==="tonext"?(c(L).attr("d",Z+"Z"+g+"Z").call(Kf.singleFillStyle,e),Ce=Pe(),d._polygons=Ce.concat(P)):(c(L).attr("d",Z+"L"+g.slice(1)+"Z").call(Kf.singleFillStyle,e),Ce=ce(z),d._polygons=Ce),d._fillElement=L):me(L)),d._prevRevpath=j):(T?me(T):L&&me(L),d._prevRevpath=null),d._ownPolygons=Ce;function He(tt){return tt.filter(function(je){return!je.gap&&je.vis})}function lt(tt){return tt.filter(function(je){return je.vis})}function mt(tt){return tt.filter(function(je){return!je.gap})}function Vt(tt){return tt.id}function st(tt){if(tt.ids)return Vt}function ct(){return!1}function Qt(tt,je,Ue){var Ae,rt,St,Tt=Ue[0].trace,dt=dT.hasMarkers(Tt),Et=dT.hasText(Tt),pt=st(Tt),Xt=ct,or=ct;if(dt||Et){var _r=Ive,Er=Tt.stackgroup,ei=Er&&e._fullLayout._scatterStackOpts[f._id+h._id][Er].stackgaps==="infer zero";Tt.marker.maxdisplayed||Tt._needsCull?_r=ei?lt:He:Er&&!ei&&(_r=mt),dt&&(Xt=_r),Et&&(or=_r)}rt=tt.selectAll("path.point"),Ae=rt.data(Xt,pt);var qr=Ae.enter().append("path").classed("point",!0);u&&qr.call(Kf.pointStyle,Tt,e).call(Kf.translatePoints,f,h).style("opacity",0).transition().style("opacity",1),Ae.order();var jr;dt&&(jr=Kf.makePointStyleFns(Tt)),Ae.each(function(gt){var Ge=qg.select(this),Je=c(Ge);St=Kf.translatePoint(gt,Je,f,h),St?(Kf.singlePointStyle(gt,Je,Tt,jr,e),r.layerClipId&&Kf.hideOutsideRangePoint(gt,Je,f,h,Tt.xcalendar,Tt.ycalendar),Tt.customdata&&Ge.classed("plotly-customdata",gt.data!==null&>.data!==void 0)):Je.remove()}),u?Ae.exit().transition().style("opacity",0).remove():Ae.exit().remove(),rt=je.selectAll("g"),Ae=rt.data(or,pt),Ae.enter().append("g").classed("textpoint",!0).append("text"),Ae.order(),Ae.each(function(gt){var Ge=qg.select(this),Je=c(Ge.select("text"));St=Kf.translatePoint(gt,Je,f,h),St?r.layerClipId&&Kf.hideOutsideRangePoint(gt,Ge,f,h,Tt.xcalendar,Tt.ycalendar):Ge.remove()}),Ae.selectAll("text").call(Kf.textPointStyle,Tt,e).each(function(gt){var Ge=f.c2p(gt.x),Je=h.c2p(gt.y);qg.select(this).selectAll("tspan.line").each(function(){c(qg.select(this)).attr({x:Ge,y:Je})})}),Ae.exit().remove()}k.datum(n),M.datum(n),Qt(k,M,n);var Ht=d.cliponaxis===!1,nr=Ht?null:r.layerClipId;Kf.setClipUrl(k,nr,e),Kf.setClipUrl(M,nr,e)}function t0t(e,t,r,n,i){var a=r.xaxis,o=r.yaxis,s=qg.extent(s4.simpleMap(a.range,a.r2c)),l=qg.extent(s4.simpleMap(o.range,o.r2c)),u=n[0].trace;if(dT.hasMarkers(u)){var c=u.marker.maxdisplayed;if(c!==0){var f=n.filter(function(m){return m.x>=s[0]&&m.x<=s[1]&&m.y>=l[0]&&m.y<=l[1]}),h=Math.ceil(f.length/c),d=0;i.forEach(function(m,b){var p=m[0].trace;dT.hasMarkers(p)&&p.marker.maxdisplayed>0&&b<t&&d++});var v=Math.round(d*h/3+Math.floor(d/3)*h/7.1);n.forEach(function(m){delete m.vis}),f.forEach(function(m,b){Math.round((b+v)%h)===0&&(m.vis=!0)})}}}});var $d=ye((Esr,Dve)=>{"use strict";Dve.exports={container:"marker",min:"cmin",max:"cmax"}});var lI=ye((ksr,Fve)=>{"use strict";var sI=ho();Fve.exports=function(t,r,n){var i={},a={_fullLayout:n},o=sI.getFromTrace(a,r,"x"),s=sI.getFromTrace(a,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),i.xLabel=sI.tickText(o,o.c2l(l),!0).text,i.yLabel=sI.tickText(s,s.c2l(u),!0).text,i}});var sp=ye((Csr,zve)=>{"use strict";var MU=qa(),pT=So(),r0t=Oa();function i0t(e){var t=MU.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var n=MU.select(this),i=r.trace||r[0].trace;EU(n,i,e)}),t.selectAll("g.text").each(function(r){var n=MU.select(this),i=r.trace||r[0].trace;kU(n,i,e)}),t.selectAll("g.trace path.js-line").call(pT.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(pT.fillGroupStyle,e,!1),r0t.getComponentMethod("errorbars","style")(t)}function EU(e,t,r){pT.pointStyle(e.selectAll("path.point"),t,r)}function kU(e,t,r){pT.textPointStyle(e.selectAll("text"),t,r)}function n0t(e,t,r){var n=t[0].trace;n.selectedpoints?(pT.selectedPointStyle(r.selectAll("path.point"),n),pT.selectedTextStyle(r.selectAll("text"),n)):(EU(r,n,e),kU(r,n,e))}zve.exports={style:i0t,stylePoints:EU,styleText:kU,styleOnSelect:n0t}});var mT=ye((Lsr,qve)=>{"use strict";var gT=ka(),a0t=Ru();qve.exports=function(t,r){var n,i;if(t.mode==="lines")return n=t.line.color,n&&gT.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&&gT.opacity(a)?a:o&&gT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",i?gT.opacity(i)<.3?gT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&gT.opacity(n)&&a0t.hasLines(t)&&t.line.width?n:t.fillcolor)}});var yT=ye((Psr,Bve)=>{"use strict";var uI=Pr(),Ove=vf(),o0t=Oa(),s0t=mT(),CU=ka(),l0t=uI.fillText;Bve.exports=function(t,r,n,i){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,v=!!o.xperiodalignment,m=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var b=function(j){if(v){var N=s.c2p(j.xStart),H=s.c2p(j.xEnd);return u>=Math.min(N,H)&&u<=Math.max(N,H)?0:1/0}var re=Math.max(3,j.mrc||0),oe=1-1/re,_e=Math.abs(s.c2p(j.x)-u);return _e<re?oe*_e/re:_e-re+oe},p=function(j){if(m){var N=l.c2p(j.yStart),H=l.c2p(j.yEnd);return c>=Math.min(N,H)&&c<=Math.max(N,H)?0:1/0}var re=Math.max(3,j.mrc||0),oe=1-1/re,_e=Math.abs(l.c2p(j.y)-c);return _e<re?oe*_e/re:_e-re+oe},k=function(j){var N=Math.max(d,j.mrc||0),H=s.c2p(j.x)-u,re=l.c2p(j.y)-c;return Math.max(Math.sqrt(H*H+re*re)-N,1-d/N)},M=Ove.getDistanceFunction(i,b,p,k);if(Ove.getClosest(a,M,t),t.index!==!1){var T=a[t.index],L=s.c2p(T.x,!0),x=l.c2p(T.y,!0),C=T.mrc||1;t.index=T.i;var S=a[0].t.orientation,g=S&&(T.sNorm||T.s),P=S==="h"?g:T.orig_x!==void 0?T.orig_x:T.x,E=S==="v"?g:T.orig_y!==void 0?T.orig_y:T.y;return uI.extendFlat(t,{color:s0t(o,T),x0:L-C,x1:L+C,xLabelVal:P,y0:x-C,y1:x+C,yLabelVal:E,spikeDistance:k(T),hovertemplate:o.hovertemplate}),l0t(T,o,t),o0t.getComponentMethod("errorbars","hoverInfo")(T,o,t),[t]}}function z(j){if(!j)return!1;var N=j.node();try{var H=new DOMPoint(f[0],f[1]);return N.isPointInFill(H)}catch(oe){var re=N.ownerSVGElement.createSVGPoint();return re.x=f[0],re.y=f[1],N.isPointInFill(re)}}function q(j){var N,H=[],re=1/0,oe=-1/0,_e=1/0,ke=-1/0,Ce;for(N=0;N<j.length;N++){var ge=j[N];ge.contains(f)&&(H.push(ge),_e=Math.min(_e,ge.ymin),ke=Math.max(ke,ge.ymax))}if(H.length===0)return null;_e=Math.max(_e,0),ke=Math.min(ke,l._length),Ce=(_e+ke)/2;var ie,Se,Ee,we,De,Le,me;for(N=0;N<H.length;N++)for(Se=H[N].pts,ie=1;ie<Se.length;ie++)Le=Se[ie-1][1],me=Se[ie][1],Le>Ce!=me>=Ce&&(we=Se[ie-1][0],De=Se[ie][0],me-Le&&(Ee=we+(De-we)*(Ce-Le)/(me-Le),re=Math.min(re,Ee),oe=Math.max(oe,Ee)));return re=Math.max(re,0),oe=Math.min(oe,s._length),{x0:re,x1:oe,y0:Ce,y1:Ce}}if(h.indexOf("fills")!==-1&&o._fillElement){var U=z(o._fillElement)&&!z(o._fillExclusionElement);if(U){var G=q(o._polygons);G===null&&(G={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var Z=CU.defaultLine;return CU.opacity(o.fillcolor)?Z=o.fillcolor:CU.opacity((o.line||{}).color)&&(Z=o.line.color),uI.extendFlat(t,{distance:t.maxHoverDistance,x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1,color:Z,hovertemplate:!1}),delete t.index,o.text&&!uI.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var _T=ye((Isr,Uve)=>{"use strict";var Nve=Ru();Uve.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h=!Nve.hasMarkers(s)&&!Nve.hasText(s);if(h)return[];if(r===!1)for(l=0;l<n.length;l++)n[l].selected=0;else for(l=0;l<n.length;l++)u=n[l],c=i.c2p(u.x),f=a.c2p(u.y),u.i!==null&&r.contains([c,f],!1,l,t)?(o.push({pointNumber:u.i,x:i.c2d(u.x),y:a.c2d(u.y)}),u.selected=1):u.selected=0;return o}});var Gve=ye((Rsr,Vve)=>{"use strict";Vve.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var PU=ye((Dsr,Wve)=>{"use strict";var l4=Oa().traceIs,LU=G3();Wve.exports=function(t,r,n,i){n("autotypenumbers",i.autotypenumbersDflt);var a=n("type",(i.splomStash||{}).type);a==="-"&&(u0t(r,i.data),r.type==="-"?r.type="linear":t.type=r.type)};function u0t(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i;r.indexOf("scene")!==-1&&(r=n);var a=c0t(t,r,n);if(a){if(a.type==="histogram"&&n==={v:"y",h:"x"}[a.orientation||"v"]){e.type="linear";return}var o=n+"calendar",s=a[o],l={noMultiCategory:!l4(a,"cartesian")||l4(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&n==={h:"x",v:"y"}[a.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,jve(a,n)){var u=Hve(a),c=[];for(i=0;i<t.length;i++){var f=t[i];!l4(f,"box-violin")||(f[n+"axis"]||n)!==r||(f[u]!==void 0?c.push(f[u][0]):f.name!==void 0?c.push(f.name):c.push("text"),f[o]!==s&&(s=void 0))}e.type=LU(c,s,l)}else if(a.type==="splom"){var h=a.dimensions,d=h[a._axesDim[r]];d.visible&&(e.type=LU(d.values,s,l))}else e.type=LU(a[n]||[a[n+"0"]],s,l)}}}function c0t(e,t,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.type==="splom"&&i._length>0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(jve(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function Hve(e){return{v:"x",h:"y"}[e.orientation||"v"]}function jve(e,t){var r=Hve(e),n=l4(e,"box-violin"),i=l4(e._fullInput||{},"candlestick");return n&&!i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var cI=ye((Fsr,Xve)=>{"use strict";var f0t=vv().isTypedArraySpec;function h0t(e,t){var r=t.dataAttr||e._id.charAt(0),n={},i,a,o;if(t.axData)i=t.axData;else for(i=[],a=0;a<t.data.length;a++){var s=t.data[a];s[r+"axis"]===e._id&&i.push(s)}for(a=0;a<i.length;a++){var l=i[a][r];for(o=0;o<l.length;o++){var u=l[o];u!=null&&(n[u]=1)}}return Object.keys(n)}Xve.exports=function(t,r,n,i){if(r.type==="category"){var a=t.categoryarray,o=Array.isArray(a)&&a.length>0||f0t(a),s;o&&(s="array");var l=n("categoryorder",s),u;l==="array"&&(u=n("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=h0t(r,i).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var u4=ye((zsr,Yve)=>{"use strict";var Zve=fd().mix,d0t=Ih(),v0t=Pr();Yve.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(S,g){return v0t.coerce2(t,r,i.attributes,S,g)}var s=o("linecolor",a),l=o("linewidth"),u=n("showline",i.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=Zve(a,i.bgColor,i.blend||d0t.lightFraction).toRgbString(),f=o("gridcolor",c),h=o("gridwidth"),d=o("griddash"),v=n("showgrid",i.showGrid||!!f||!!h||!!d);if(v||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var m=Zve(r.gridcolor,i.bgColor,67).toRgbString(),b=o("minor.gridcolor",m),p=o("minor.gridwidth",r.gridwidth||1),k=o("minor.griddash",r.griddash||"solid"),M=n("minor.showgrid",!!b||!!p||!!k);M||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var T=o("zerolinelayer"),L=o("zerolinecolor",a),x=o("zerolinewidth"),C=n("zeroline",i.showGrid||!!L||!!x);C||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var f4=ye((qsr,tpe)=>{"use strict";var Kve=Eo(),p0t=Oa(),c4=Pr(),g0t=vl(),m0t=Zd(),IU=Rd(),Jve=Lb(),$ve=z3(),y0t=s_(),_0t=l_(),x0t=cI(),b0t=u4(),w0t=AB(),Qve=xm(),fI=Rh().WEEKDAY_PATTERN,T0t=Rh().HOUR_PATTERN;tpe.exports=function(t,r,n,i,a){var o=i.letter,s=i.font||{},l=i.splomStash||{},u=n("visible",!i.visibleDflt),c=r._template||{},f=r.type||c.type||"-",h;if(f==="date"){var d=p0t.getComponentMethod("calendars","handleDefaults");d(t,r,"calendar",i.calendar),i.noTicklabelmode||(h=n("ticklabelmode"))}!i.noTicklabelindex&&(f==="date"||f==="linear")&&n("ticklabelindex");var v="";(!i.noTicklabelposition||f==="multicategory")&&(v=c4.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),i.noTicklabeloverflow||n("ticklabeloverflow",v.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),Qve(r,a),w0t(t,r,n,i),x0t(t,r,n,i),i.noHover||(f!=="category"&&n("hoverformat"),i.noUnifiedhovertitle||n("unifiedhovertitle.text"));var m=n("color"),b=m!==IU.color.dflt?m:s.color,p=l.label||a._dfltTitle[o];if(_0t(t,r,n,f,i),!u)return r;n("title.text",p),c4.coerceFont(n,"title.font",s,{overrideDflt:{size:c4.bigFont(s.size),color:b}}),Jve(t,r,n,f);var k=i.hasMinor;if(k&&(g0t.newContainer(r,"minor"),Jve(t,r,n,f,{isMinor:!0})),y0t(t,r,n,f,i),$ve(t,r,n,i),k){var M=i.isMinor;i.isMinor=!0,$ve(t,r,n,i),i.isMinor=M}b0t(t,r,n,{dfltColor:m,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:k,attributes:IU}),k&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var T=f==="multicategory";if(!i.noTickson&&(f==="category"||T)&&(r.ticks||r.showgrid)&&(T?(n("tickson","boundaries"),delete r.ticklabelposition):n("tickson")),T){var L=n("showdividers");L&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(m0t(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:A0t}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var x=0;x<r.rangebreaks.length;x++)if(r.rangebreaks[x].pattern===fI){r._hasDayOfWeekBreaks=!0;break}if(Qve(r,a),a._has("scattergl")||a._has("splom"))for(var C=0;C<i.data.length;C++){var S=i.data[C];(S.type==="scattergl"||S.type==="splom")&&(S.visible=!1,c4.warn(S.type+" traces do not work on axes with rangebreaks. Setting trace "+S.index+" to `visible: false`."))}}return r};function A0t(e,t,r){function n(h,d){return c4.coerce(e,t,IU.rangebreaks,h,d)}var i=n("enabled");if(i){var a=n("bounds");if(a&&a.length>=2){var o="",s,l;if(a.length===2){for(s=0;s<2;s++)if(l=epe(a[s]),l){o=fI;break}}var u=n("pattern",o);if(u===fI)for(s=0;s<2;s++)l=epe(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case fI:if(!Kve(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=a[s]=l;break;case T0t:if(!Kve(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=a[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]<c[1]){if(a[0]<c[0]&&a[1]>c[1]){t.enabled=!1;return}}else if(a[0]>c[0]&&a[1]<c[1]){t.enabled=!1;return}}}else{var f=n("values");if(f&&f.length)n("dvalue");else{t.enabled=!1;return}}}}var S0t={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function epe(e){if(typeof e=="string")return S0t[e.slice(0,3).toLowerCase()]}});var dI=ye((Osr,rpe)=>{"use strict";var M0t=Eo(),hI=Pr();rpe.exports=function(t,r,n,i){var a=i.counterAxes||[],o=i.overlayableAxes||[],s=i.letter,l=i.grid,u=i.overlayingDomain,c,f,h,d,v,m;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(h=l[s+"side"].split(" ")[0],d=l.domain[s][h==="right"||h==="top"?1:0])),f=f||[0,1],c=c||(M0t(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,v=0,m=!1;var b=hI.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:c}},"anchor"),p=hI.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(b==="free"){if(s==="y"){var k=n("autoshift");k&&(d=p==="left"?u[0]:u[1],m=r.automargin?r.automargin:!0,v=p==="left"?-3:3),n("shift",v)}n("position",d)}n("automargin",m);var M=!1;if(o.length&&(M=hI.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!M){var T=n("domain",f);T[0]>T[1]-1/4096&&(r.domain=f),hI.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var fpe=ye((Bsr,cpe)=>{"use strict";var r2=Pr(),ipe=ka(),E0t=ip().isUnifiedHover,k0t=YB(),npe=vl(),C0t=x3(),ape=Rd(),L0t=PU(),ope=f4(),P0t=Kb(),spe=dI(),DU=hf(),Dm=DU.id2name,lpe=DU.name2id,I0t=Rh().AX_ID_PATTERN,upe=Oa(),vI=upe.traceIs,RU=upe.getComponentMethod;function pI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}cpe.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},d={},v={},m,b;for(m=0;m<n.length;m++){var p=n[m];if(vI(p,"cartesian")){var k;if(p.xaxis)k=Dm(p.xaxis),pI(a,k,p);else if(p.xaxes)for(b=0;b<p.xaxes.length;b++)pI(a,Dm(p.xaxes[b]),p);var M;if(p.yaxis)M=Dm(p.yaxis),pI(a,M,p);else if(p.yaxes)for(b=0;b<p.yaxes.length;b++)pI(a,Dm(p.yaxes[b]),p);if(p.type==="funnel"?p.orientation==="h"?(k&&(o[k]=!0),M&&(f[M]=!0)):M&&(s[M]=!0):p.type==="image"?(M&&(h[M]=!0),k&&(h[k]=!0)):(M&&(u[M]=!0,c[M]=!0),(!vI(p,"carpet")||p.type==="carpet"&&!p._cheater)&&k&&(l[k]=!0)),p.type==="carpet"&&p._cheater&&k&&(o[k]=!0),vI(p,"2dMap")&&(d[k]=!0,d[M]=!0),vI(p,"oriented")){var T=p.orientation==="h"?M:k;v[T]=!0}}}var L=r._subplots,x=L.xaxis,C=L.yaxis,S=r2.simpleMap(x,Dm),g=r2.simpleMap(C,Dm),P=S.concat(g),E=ipe.background;x.length&&C.length&&(E=r2.coerce(t,r,C0t,"plot_bgcolor"));var z=ipe.combine(E,r.paper_bgcolor),q,U,G,Z,j;function N(){var rt=a[q]||[];j._traceIndices=rt.map(function(St){return St.index}),j._annIndices=[],j._shapeIndices=[],j._selectionIndices=[],j._imgIndices=[],j._subplotsWith=[],j._counterAxes=[],j._name=j._attr=q,j._id=U}function H(rt,St){return r2.coerce(Z,j,ape,rt,St)}function re(rt,St){return r2.coerce2(Z,j,ape,rt,St)}function oe(rt){return rt==="x"?C:x}function _e(rt,St){for(var Tt=rt==="x"?S:g,dt=[],Et=0;Et<Tt.length;Et++){var pt=Tt[Et];pt!==St&&!(t[pt]||{}).overlaying&&dt.push(lpe(pt))}return dt}var ke={x:oe("x"),y:oe("y")},Ce=ke.x.concat(ke.y),ge={},ie=[];function Se(){var rt=Z.matches;I0t.test(rt)&&Ce.indexOf(rt)===-1&&(ge[rt]=Z.type,ie=Object.keys(ge))}var Ee=k0t(t,r),we=E0t(Ee);for(m=0;m<P.length;m++){q=P[m],U=lpe(q),G=q.charAt(0),r2.isPlainObject(t[q])||(t[q]={}),Z=t[q],j=npe.newContainer(r,q,G+"axis"),N();var De=G==="x"&&!l[q]&&o[q]||G==="y"&&!u[q]&&s[q],Le=G==="y"&&(!c[q]&&f[q]||h[q]),me={hasMinor:!0,letter:G,font:r.font,outerTicks:d[q],showGrid:!v[q],data:a[q]||[],bgColor:z,calendar:r.calendar,automargin:!0,visibleDflt:De,reverseDflt:Le,autotypenumbersDflt:i,splomStash:((r._splomAxes||{})[G]||{})[U],noAutotickangles:G==="y"};H("uirevision",r.uirevision),L0t(Z,j,H,me),ope(Z,j,H,me,r);var Pe=we&&G===Ee.charAt(0),ce=re("spikecolor",we?j.color:void 0),He=re("spikethickness",we?1.5:void 0),lt=re("spikedash",we?"dot":void 0),mt=re("spikemode",we?"across":void 0),Vt=re("spikesnap"),st=H("showspikes",!!Pe||!!ce||!!He||!!lt||!!mt||!!Vt);st||(delete j.spikecolor,delete j.spikethickness,delete j.spikedash,delete j.spikemode,delete j.spikesnap);var ct=Dm(Z.overlaying),Qt=[0,1];if(r[ct]!==void 0){var Ht=Dm(r[ct].anchor);r[Ht]!==void 0&&(Qt=r[Ht].domain)}spe(Z,j,H,{letter:G,counterAxes:ke[G],overlayableAxes:_e(G,q),grid:r.grid,overlayingDomain:Qt}),H("title.standoff"),Se(),j._input=Z}for(m=0;m<ie.length;){U=ie[m++],q=Dm(U),G=q.charAt(0),r2.isPlainObject(t[q])||(t[q]={}),Z=t[q],j=npe.newContainer(r,q,G+"axis"),N();var nr={letter:G,font:r.font,outerTicks:d[q],showGrid:!v[q],data:[],bgColor:z,calendar:r.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:i,splomStash:((r._splomAxes||{})[G]||{})[U]};H("uirevision",r.uirevision),j.type=ge[U]||"linear",ope(Z,j,H,nr,r),spe(Z,j,H,{letter:G,counterAxes:ke[G],overlayableAxes:_e(G,q),grid:r.grid}),H("fixedrange"),H("modebardisable"),Se(),j._input=Z}var tt=RU("rangeslider","handleDefaults"),je=RU("rangeselector","handleDefaults");for(m=0;m<S.length;m++)q=S[m],Z=t[q],j=r[q],tt(t,r,q),j.type==="date"&&je(Z,j,r,g,j.calendar),H("fixedrange"),H("modebardisable");for(m=0;m<g.length;m++){q=g[m],Z=t[q],j=r[q];var Ue=r[Dm(j.anchor)],Ae=RU("rangeslider","isVisible")(Ue);H("fixedrange",Ae),H("modebardisable")}P0t.handleDefaults(t,r,{axIds:Ce.concat(ie).sort(DU.idSort),axHasImage:h})}});var vpe=ye((Nsr,dpe)=>{"use strict";var R0t=qa(),hpe=Oa(),gI=Pr(),Qp=So(),mI=ho();dpe.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){mI.redrawComponents(t);return}function o(b){var p=b.xaxis,k=b.yaxis;a._defs.select("#"+b.clipId+"> rect").call(Qp.setTranslate,0,0).call(Qp.setScale,1,1),b.plot.call(Qp.setTranslate,p._offset,k._offset).call(Qp.setScale,1,1);var M=b.plot.selectAll(".scatterlayer .trace");M.selectAll(".point").call(Qp.setPointGroupScale,1,1),M.selectAll(".textpoint").call(Qp.setTextPointsScale,1,1),M.call(Qp.hideOutsideRangePoints,b)}function s(b,p){var k=b.plotinfo,M=k.xaxis,T=k.yaxis,L=M._length,x=T._length,C=!!b.xr1,S=!!b.yr1,g=[];if(C){var P=gI.simpleMap(b.xr0,M.r2l),E=gI.simpleMap(b.xr1,M.r2l),z=P[1]-P[0],q=E[1]-E[0];g[0]=(P[0]*(1-p)+p*E[0]-P[0])/(P[1]-P[0])*L,g[2]=L*(1-p+p*q/z),M.range[0]=M.l2r(P[0]*(1-p)+p*E[0]),M.range[1]=M.l2r(P[1]*(1-p)+p*E[1])}else g[0]=0,g[2]=L;if(S){var U=gI.simpleMap(b.yr0,T.r2l),G=gI.simpleMap(b.yr1,T.r2l),Z=U[1]-U[0],j=G[1]-G[0];g[1]=(U[1]*(1-p)+p*G[1]-U[1])/(U[0]-U[1])*x,g[3]=x*(1-p+p*j/Z),T.range[0]=M.l2r(U[0]*(1-p)+p*G[0]),T.range[1]=T.l2r(U[1]*(1-p)+p*G[1])}else g[1]=0,g[3]=x;mI.drawOne(t,M,{skipTitle:!0}),mI.drawOne(t,T,{skipTitle:!0}),mI.redrawComponents(t,[M._id,T._id]);var N=C?L/g[2]:1,H=S?x/g[3]:1,re=C?g[0]:0,oe=S?g[1]:0,_e=C?g[0]/g[2]*L:0,ke=S?g[1]/g[3]*x:0,Ce=M._offset-_e,ge=T._offset-ke;k.clipRect.call(Qp.setTranslate,re,oe).call(Qp.setScale,1/N,1/H),k.plot.call(Qp.setTranslate,Ce,ge).call(Qp.setScale,N,H),Qp.setPointGroupScale(k.zoomScalePts,1/N,1/H),Qp.setTextPointsScale(k.zoomScaleTxt,1/N,1/H)}var l;i&&(l=i());function u(){for(var b={},p=0;p<r.length;p++){var k=r[p],M=k.plotinfo.xaxis,T=k.plotinfo.yaxis;k.xr1&&(b[M._name+".range"]=k.xr1.slice()),k.yr1&&(b[T._name+".range"]=k.yr1.slice())}return l&&l(),hpe.call("relayout",t,b).then(function(){for(var L=0;L<r.length;L++)o(r[L].plotinfo)})}function c(){for(var b={},p=0;p<r.length;p++){var k=r[p],M=k.plotinfo.xaxis,T=k.plotinfo.yaxis;k.xr0&&(b[M._name+".range"]=k.xr0.slice()),k.yr0&&(b[T._name+".range"]=k.yr0.slice())}return hpe.call("relayout",t,b).then(function(){for(var L=0;L<r.length;L++)o(r[L].plotinfo)})}var f,h,d,v=R0t.ease(n.easing);t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(d),d=null,c()});function m(){h=Date.now();for(var b=Math.min(1,(h-f)/n.duration),p=v(b),k=0;k<r.length;k++)s(r[k],p);h-f>n.duration?(u(),d=window.cancelAnimationFrame(m)):d=window.requestAnimationFrame(m)}return f=Date.now(),d=window.requestAnimationFrame(m),Promise.resolve()}});var mh=ye(xv=>{"use strict";var _I=qa(),ppe=Oa(),i2=Pr(),D0t=Mc(),F0t=So(),gpe=Id().getModuleCalcData,S_=hf(),Og=Rh(),z0t=Wp(),iu=i2.ensureSingle;function yI(e,t,r){return i2.ensureSingle(e,t,r,function(n){n.datum(r)})}var n2=Og.zindexSeparator;xv.name="cartesian";xv.attr=["xaxis","yaxis"];xv.idRoot=["x","y"];xv.idRegex=Og.idRegex;xv.attrRegex=Og.attrRegex;xv.attributes=Gve();xv.layoutAttributes=Rd();xv.supplyLayoutDefaults=fpe();xv.transitionAxes=vpe();xv.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,i=r.yaxis,a=r.cartesian,o=a,s={},l={},u,c,f;for(u=0;u<o.length;u++){var h=o[u].split("y");s[h[0]]=1,l["y"+h[1]]=1}for(u=0;u<n.length;u++)c=n[u],s[c]||(f=(e[S_.id2name(c)]||{}).anchor,Og.idRegex.y.test(f)||(f="y"),a.push(c+f),o.push(c+f),l[f]||(l[f]=1,i2.pushUnique(i,f)));for(u=0;u<i.length;u++)f=i[u],l[f]||(c=(e[S_.id2name(f)]||{}).anchor,Og.idRegex.x.test(c)||(c="x"),a.push(c+f),o.push(c+f),s[c]||(s[c]=1,i2.pushUnique(n,c)));if(!o.length){c="",f="";for(var d in e)if(Og.attrRegex.test(d)){var v=d.charAt(0);v==="x"?(!c||+d.slice(5)<+c.slice(5))&&(c=d):(!f||+d.slice(5)<+f.slice(5))&&(f=d)}c=c?S_.name2id(c):"x",f=f?S_.name2id(f):"y",n.push(c),i.push(f),a.push(c+f)}};xv.plot=function(e,t,r,n){var i=e._fullLayout,a=i._subplots.cartesian,o=e.calcdata,s;if(!Array.isArray(t))for(t=[],s=0;s<o.length;s++)t.push(s);for(var l=i._zindices,u=0;u<l.length;u++){var c=l[u];for(s=0;s<a.length;s++){var f=a[s],h=i._plots[f];if(u>0){var d=h.id;if(d.indexOf(n2)!==-1)continue;d+=n2+(u+1),h=i2.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var v=[],m,b=0;b<o.length;b++){var p=o[b],k=p[0].trace;c===(k.zorder||0)&&k.xaxis+k.yaxis===f&&((t.indexOf(k.index)!==-1||k.carpet)&&(m&&m[0].trace.xaxis+m[0].trace.yaxis===f&&["tonextx","tonexty","tonext"].indexOf(k.fill)!==-1&&v.indexOf(m)===-1&&v.push(m),v.push(p)),m=p)}mpe(e,h,v,r,n)}}};function mpe(e,t,r,n,i){for(var a=Og.traceLayerClasses,o=e._fullLayout,s=o._zindices,l=o._modules,u,c,f,h=[],d=[],v=0;v<s.length;v++)for(var m=s[v],b=0;b<l.length;b++){u=l[b];var p=u.name,k=ppe.modules[p].categories;if(k.svg){var M=u.layerName||p+"layer",T=M+(v?Number(v)+1:""),L=u.plot;c=gpe(r,L,m),f=c[0],r=c[1],f.length&&h.push({i:a.indexOf(M),zindex:v,className:T,plotMethod:L,cdModule:f}),k.zoomScale&&d.push("."+T)}}h.sort(function(S,g){return(S.zindex||0)-(g.zindex||0)||S.i-g.i});var x=t.plot.selectAll("g.mlayer").data(h,function(S){return S.className});if(x.enter().append("g").attr("class",function(S){return S.className}).classed("mlayer",!0).classed("rangeplot",t.isRangePlot),x.exit().remove(),x.order(),x.each(function(S){var g=_I.select(this),P=S.className;S.plotMethod(e,t,S.cdModule,g,n,i),Og.clipOnAxisFalseQuery.indexOf("."+P)===-1&&F0t.setClipUrl(g,t.layerClipId,e)}),o._has("scattergl")&&(u=ppe.getModule("scattergl"),f=gpe(r,u)[0],u.plot(e,t,f)),!e._context.staticPlot&&(t._hasClipOnAxisFalse&&(t.clipOnAxisFalseTraces=t.plot.selectAll(Og.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),d.length)){var C=t.plot.selectAll(d.join(",")).selectAll(".trace");t.zoomScalePts=C.selectAll("path.point"),t.zoomScaleTxt=C.selectAll(".textpoint")}}xv.clean=function(e,t,r,n){var i=n._plots||{},a=t._plots||{},o=n._subplots||{},s,l,u;if(n._hasOnlyLargeSploms&&!t._hasOnlyLargeSploms)for(u in i)s=i[u],s.plotgroup&&s.plotgroup.remove();var c=n._has&&n._has("gl"),f=t._has&&t._has("gl");if(c&&!f)for(u in i)s=i[u],s._scene&&s._scene.destroy();if(o.xaxis&&o.yaxis){var h=S_.listIds({_fullLayout:n});for(l=0;l<h.length;l++){var d=h[l];t[S_.id2name(d)]||n._infolayer.selectAll(".g-"+d+"title").remove()}}var v=n._has&&n._has("cartesian"),m=t._has&&t._has("cartesian");if(v&&!m)_pe(n._cartesianlayer.selectAll(".subplot"),n),n._defs.selectAll(".axesclip").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(o.cartesian)for(l=0;l<o.cartesian.length;l++){var b=o.cartesian[l];if(b.indexOf(n2)===-1&&!a[b]){var p="."+b+",."+b+"-x,."+b+"-y";n._cartesianlayer.selectAll(p).remove(),xpe(b,n)}}};xv.drawFramework=function(e){var t=e._fullLayout,r=e.calcdata,n,i={};for(n=0;n<r.length;n++){var a=r[n][0],o=a.trace,s=o.zorder||0;i[s]||(i[s]=[]),i[s].push(a)}var l=Object.keys(i).map(Number).sort(i2.sorterAsc);l.length||(l=[0]),t._zindices=l;var u=q0t(e),c=u.length,f=[];for(n=0;n<c;n++)f[n]=u[n].slice();for(var h=1;h<l.length;h++){var d=[];for(n=0;n<c;n++)d[n]=u[n].slice(),d[n][0]+=n2+(h+1);f=f.concat(d)}var v=t._cartesianlayer.selectAll(".subplot").data(f,String);v.enter().append("g").attr("class",function(m){return"subplot "+m[0]}),v.order(),v.exit().call(_pe,t),v.each(function(m){var b=m[0],p=b.indexOf(n2),k=p!==-1,M=k?b.slice(0,p):b,T=t._plots[b];T||(T=i2.extendFlat({},t._plots[M]),T&&(T.id=b,t._plots[b]=T,t._subplots.cartesian.push(b))),T&&(T.plotgroup=_I.select(this),ype(e,T),k||(T.draglayer=iu(t._draggers,"g",b)))})};xv.rangePlot=function(e,t,r){ype(e,t),mpe(e,t,r),D0t.style(e)};function q0t(e){var t=e._fullLayout,r=t._zindices.length,n=t._subplots.cartesian,i=n.length,a,o,s,l,u,c,f=[],h=[];for(a=0;a<i;a++){s=n[a],l=t._plots[s],u=l.xaxis,c=l.yaxis;var d=u._mainAxis,v=c._mainAxis,m=d._id+v._id,b=t._plots[m];l.overlays=[],m!==s&&b?(l.mainplot=m,l.mainplotinfo=b,h.push(s)):(l.mainplot=void 0,l.mainplotinfo=void 0,f.push(s))}for(a=0;a<h.length;a++)s=h[a],l=t._plots[s],l.mainplotinfo.overlays.push(l);var p=f.concat(h),k=[];for(a=0;a<i;a++){s=p[a],l=t._plots[s],u=l.xaxis,c=l.yaxis;for(var M=[],T=1;T<=r;T++){var L="";for(T>1&&(L+=n2+T),M.push(s+L),o=0;o<l.overlays.length;o++)M.push(l.overlays[o].id+L)}M=M.concat([u.layer,c.layer,u.overlaying||"",c.overlaying||""]),k.push(M)}return k}function ype(e,t){var r=e._fullLayout,n=t.plotgroup,i=t.id,a=i.indexOf(n2),o=a!==-1,s=Og.layerValue2layerClass[t.xaxis.layer],l=Og.layerValue2layerClass[t.yaxis.layer],u=r._hasOnlyLargeSploms,c=r._zindices.length>1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=iu(n,"path","xlines-above"),t.ylines=iu(n,"path","ylines-above"),t.xaxislayer=iu(n,"g","xaxislayer-above"),t.yaxislayer=iu(n,"g","yaxislayer-above");else{if(!o){var h=iu(n,"g","layer-subplot");t.shapelayer=iu(h,"g","shapelayer"),t.imagelayer=iu(h,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=iu(n,"g","minor-gridlayer"),t.gridlayer=iu(n,"g","gridlayer"),t.zerolinelayer=iu(n,"g","zerolinelayer"));var d=iu(n,"g","layer-between");t.shapelayerBetween=iu(d,"g","shapelayer"),t.imagelayerBetween=iu(d,"g","imagelayer"),iu(n,"path","xlines-below"),iu(n,"path","ylines-below"),t.overlinesBelow=iu(n,"g","overlines-below"),iu(n,"g","xaxislayer-below"),iu(n,"g","yaxislayer-below"),t.overaxesBelow=iu(n,"g","overaxes-below")}t.overplot=iu(n,"g","overplot"),t.plot=iu(t.overplot,"g",i),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=iu(n,"g","zerolinelayer-above"),o||(t.xlines=iu(n,"path","xlines-above"),t.ylines=iu(n,"path","ylines-above"),t.overlinesAbove=iu(n,"g","overlines-above"),iu(n,"g","xaxislayer-above"),iu(n,"g","yaxislayer-above"),t.overaxesAbove=iu(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+l),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+l))}else{var v=f.plotgroup,m=i+"-x",b=i+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,iu(f.overlinesBelow,"path",m),iu(f.overlinesBelow,"path",b),iu(f.overaxesBelow,"g",m),iu(f.overaxesBelow,"g",b),t.plot=iu(f.overplot,"g",i),iu(f.overlinesAbove,"path",m),iu(f.overlinesAbove,"path",b),iu(f.overaxesAbove,"g",m),iu(f.overaxesAbove,"g",b),t.xlines=v.select(".overlines-"+s).select("."+m),t.ylines=v.select(".overlines-"+l).select("."+b),t.xaxislayer=v.select(".overaxes-"+s).select("."+m),t.yaxislayer=v.select(".overaxes-"+l).select("."+b)}o||(u||(yI(t.minorGridlayer,"g",t.xaxis._id),yI(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(p){return p[0]}).sort(S_.idSort),yI(t.gridlayer,"g",t.xaxis._id),yI(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(p){return p[0]}).sort(S_.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function _pe(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=_I.select(this);c.remove(),xpe(u,t),r[u]=!0});for(var n in t._plots)for(var i=t._plots[n],a=i.overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(".trace").remove()}}}function xpe(e,t){t._draggers.selectAll("g."+e).remove(),t._defs.select("#clip"+t._uid+e+"plot").remove()}xv.toSVG=function(e){var t=e._fullLayout._glimages,r=_I.select(e).selectAll(".svg-container"),n=r.filter(function(a,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function i(){var a=this,o=a.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:z0t.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i)};xv.updateFx=WN().updateFx});var wpe=ye((Vsr,bpe)=>{"use strict";var xI=Ru();bpe.exports={hasLines:xI.hasLines,hasMarkers:xI.hasMarkers,hasText:xI.hasText,isBubble:xI.isBubble,attributes:pf(),layoutAttributes:tL(),supplyDefaults:Xde(),crossTraceDefaults:cU(),supplyLayoutDefaults:Jde(),calc:O0().calc,crossTraceCalc:wve(),arraysToCalcdata:Rm(),plot:vT(),colorbar:$d(),formatLabels:lI(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:yT(),selectPoints:_T(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:mh(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var Spe=ye((Gsr,Ape)=>{"use strict";var O0t=qa(),B0t=ka(),Tpe=qN(),FU=Pr(),N0t=FU.strScale,U0t=FU.strRotate,V0t=FU.strTranslate;Ape.exports=function(t,r,n){var i=t.node(),a=Tpe[n.arrowhead||0],o=Tpe[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=a.backoff*s+n.standoff,h=o.backoff*l+n.startstandoff,d,v,m,b;if(i.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},v={x:+t.attr("x2"),y:+t.attr("y2")};var p=d.x-v.x,k=d.y-v.y;if(m=Math.atan2(k,p),b=m+Math.PI,f&&h&&f+h>Math.sqrt(p*p+k*k)){U();return}if(f){if(f*f>p*p+k*k){U();return}var M=f*Math.cos(m),T=f*Math.sin(m);v.x+=M,v.y+=T,t.attr({x2:v.x,y2:v.y})}if(h){if(h*h>p*p+k*k){U();return}var L=h*Math.cos(m),x=h*Math.sin(m);d.x-=L,d.y-=x,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var C=i.getTotalLength(),S="";if(C<f+h){U();return}var g=i.getPointAtLength(0),P=i.getPointAtLength(.1);m=Math.atan2(g.y-P.y,g.x-P.x),d=i.getPointAtLength(Math.min(h,C)),S="0px,"+h+"px,";var E=i.getPointAtLength(C),z=i.getPointAtLength(C-.1);b=Math.atan2(E.y-z.y,E.x-z.x),v=i.getPointAtLength(Math.max(0,C-f));var q=S?h+f:f;S+=C-q+"px,"+C+"px",t.style("stroke-dasharray",S)}function U(){t.style("stroke-dasharray","0px,100px")}function G(Z,j,N,H){Z.path&&(Z.noRotate&&(N=0),O0t.select(i.parentNode).append("path").attr({class:t.attr("class"),d:Z.path,transform:V0t(j.x,j.y)+U0t(N*180/Math.PI)+N0t(H)}).style({fill:B0t.rgb(n.arrowcolor),"stroke-width":0}))}u&&G(o,d,m,l),c&&G(a,v,b,s)}});var bI=ye((Hsr,Lpe)=>{"use strict";var Mpe=qa(),zU=Oa(),G0t=Mc(),E_=Pr(),qU=E_.strTranslate,d4=ho(),a2=ka(),By=So(),Epe=vf(),OU=Zl(),BU=Eg(),h4=yv(),H0t=vl().arrayEditor,j0t=Spe();Lpe.exports={draw:W0t,drawOne:kpe,drawRaw:Cpe};function W0t(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r<t.annotations.length;r++)t.annotations[r].visible&&kpe(e,r);return G0t.previousPromises(e)}function kpe(e,t){var r=e._fullLayout,n=r.annotations[t]||{},i=d4.getFromId(e,n.xref),a=d4.getFromId(e,n.yref);i&&i.setScale(),a&&a.setScale(),Cpe(e,n,t,!1,i,a)}function M_(e,t,r,n,i){var a=i[r],o=i[r+"ref"],s=r.indexOf("y")!==-1,l=d4.getRefType(o)==="domain",u=s?n.h:n.w;return e?l?a+(s?-t:t)/e._length:e.p2r(e.r2p(a)+t):a+(s?-t:t)/u}function Cpe(e,t,r,n,i,a){var o=e._fullLayout,s=e._fullLayout._size,l=e._context.edits,u,c;n?(u="annotation-"+n,c=n+".annotations"):(u="annotation",c="annotations");var f=H0t(e.layout,c,t),h=f.modifyBase,d=f.modifyItem,v=f.getUpdateObj;o._infolayer.selectAll("."+u+'[data-index="'+r+'"]').remove();var m="clip"+o._uid+"_ann"+r;if(!t._input||t.visible===!1){Mpe.selectAll("#"+m).remove();return}var b={x:{},y:{}},p=+t.textangle||0,k=o._infolayer.append("g").classed(u,!0).attr("data-index",String(r)).style("opacity",t.opacity),M=k.append("g").classed("annotation-text-g",!0),T=l[t.showarrow?"annotationTail":"annotationPosition"],L=t.captureevents||l.annotationText||T;function x(H){var re={index:r,annotation:t._input,fullAnnotation:t,event:H};return n&&(re.subplotId=n),re}var C=M.append("g").style("pointer-events",L?"all":null).call(BU,"pointer").on("click",function(){e._dragging=!1,e.emit("plotly_clickannotation",x(Mpe.event))});t.hovertext&&C.on("mouseover",function(){var H=t.hoverlabel,re=H.font,oe=this.getBoundingClientRect(),_e=e.getBoundingClientRect();Epe.loneHover({x0:oe.left-_e.left,x1:oe.right-_e.left,y:(oe.top+oe.bottom)/2-_e.top,text:t.hovertext,color:H.bgcolor,borderColor:H.bordercolor,fontFamily:re.family,fontSize:re.size,fontColor:re.color,fontWeight:re.weight,fontStyle:re.style,fontVariant:re.variant,fontShadow:re.fontShadow,fontLineposition:re.fontLineposition,fontTextcase:re.fontTextcase},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:e})}).on("mouseout",function(){Epe.loneUnhover(o._hoverlayer.node())});var S=t.borderwidth,g=t.borderpad,P=S+g,E=C.append("rect").attr("class","bg").style("stroke-width",S+"px").call(a2.stroke,t.bordercolor).call(a2.fill,t.bgcolor),z=t.width||t.height,q=o._topclips.selectAll("#"+m).data(z?[0]:[]);q.enter().append("clipPath").classed("annclip",!0).attr("id",m).append("rect"),q.exit().remove();var U=t.font,G=o._meta?E_.templateString(t.text,o._meta):t.text,Z=C.append("text").classed("annotation-text",!0).text(G);function j(H){return H.call(By.font,U).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),OU.convertToTspans(H,e,N),H}function N(){var H=Z.selectAll("a");if(H.size()===1&&H.text()===Z.text()){var re=C.insert("a",":first-child").attr({"xlink:xlink:href":H.attr("xlink:href"),"xlink:xlink:show":H.attr("xlink:show")}).style({cursor:"pointer"});re.node().appendChild(E.node())}var oe=C.select(".annotation-text-math-group"),_e=!oe.empty(),ke=By.bBox((_e?oe:Z).node()),Ce=ke.width,ge=ke.height,ie=t.width||Ce,Se=t.height||ge,Ee=Math.round(ie+2*P),we=Math.round(Se+2*P);function De(We,et){return et==="auto"&&(We<1/3?et="left":We>2/3?et="right":et="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[et]}for(var Le=!1,me=["x","y"],Pe=0;Pe<me.length;Pe++){var ce=me[Pe],He=t[ce+"ref"]||ce,lt=t["a"+ce+"ref"],mt={x:i,y:a}[ce],Vt=(p+(ce==="x"?0:-90))*Math.PI/180,st=Ee*Math.cos(Vt),ct=we*Math.sin(Vt),Qt=Math.abs(st)+Math.abs(ct),Ht=t[ce+"anchor"],nr=t[ce+"shift"]*(ce==="x"?1:-1),tt=b[ce],je,Ue,Ae,rt,St,Tt=d4.getRefType(He);if(mt&&Tt!=="domain"){var dt=mt.r2fraction(t[ce]);(dt<0||dt>1)&&(lt===He?(dt=mt.r2fraction(t["a"+ce]),(dt<0||dt>1)&&(Le=!0)):Le=!0),je=mt._offset+mt.r2p(t[ce]),rt=.5}else{var Et=Tt==="domain";ce==="x"?(Ae=t[ce],je=Et?mt._offset+mt._length*Ae:je=s.l+s.w*Ae):(Ae=1-t[ce],je=Et?mt._offset+mt._length*Ae:je=s.t+s.h*Ae),rt=t.showarrow?.5:Ae}if(t.showarrow){tt.head=je;var pt=t["a"+ce];if(St=st*De(.5,t.xanchor)-ct*De(.5,t.yanchor),lt===He){var Xt=d4.getRefType(lt);Xt==="domain"?(ce==="y"&&(pt=1-pt),tt.tail=mt._offset+mt._length*pt):Xt==="paper"?ce==="y"?(pt=1-pt,tt.tail=s.t+s.h*pt):tt.tail=s.l+s.w*pt:tt.tail=mt._offset+mt.r2p(pt),Ue=St}else tt.tail=je+pt,Ue=St+pt;tt.text=tt.tail+St;var or=o[ce==="x"?"width":"height"];if(He==="paper"&&(tt.head=E_.constrain(tt.head,1,or-1)),lt==="pixel"){var _r=-Math.max(tt.tail-3,tt.text),Er=Math.min(tt.tail+3,tt.text)-or;_r>0?(tt.tail+=_r,tt.text+=_r):Er>0&&(tt.tail-=Er,tt.text-=Er)}tt.tail+=nr,tt.head+=nr}else St=Qt*De(rt,Ht),Ue=St,tt.text=je+St;tt.text+=nr,St+=nr,Ue+=nr,t["_"+ce+"padplus"]=Qt/2+Ue,t["_"+ce+"padminus"]=Qt/2-Ue,t["_"+ce+"size"]=Qt,t["_"+ce+"shift"]=St}if(Le){C.remove();return}var ei=0,qr=0;if(t.align!=="left"&&(ei=(ie-Ce)*(t.align==="center"?.5:1)),t.valign!=="top"&&(qr=(Se-ge)*(t.valign==="middle"?.5:1)),_e)oe.select("svg").attr({x:P+ei-1,y:P+qr}).call(By.setClipUrl,z?m:null,e);else{var jr=P+qr-ke.top,gt=P+ei-ke.left;Z.call(OU.positionText,gt,jr).call(By.setClipUrl,z?m:null,e)}q.select("rect").call(By.setRect,P,P,ie,Se),E.call(By.setRect,S/2,S/2,Ee-S,we-S),C.call(By.setTranslate,Math.round(b.x.text-Ee/2),Math.round(b.y.text-we/2)),M.attr({transform:"rotate("+p+","+b.x.text+","+b.y.text+")"});var Ge=function(We,et){k.selectAll(".annotation-arrow-g").remove();var xt=b.x.head,At=b.y.head,Kt=b.x.tail+We,er=b.y.tail+et,Sr=b.x.text+We,Gr=b.y.text+et,Ir=E_.rotationXYMatrix(p,Sr,Gr),Yr=E_.apply2DTransform(Ir),_i=E_.apply2DTransform2(Ir),Pi=+E.attr("width"),ai=+E.attr("height"),mi=Sr-.5*Pi,un=mi+Pi,Fn=Gr-.5*ai,An=Fn+ai,Hn=[[mi,Fn,mi,An],[mi,An,un,An],[un,An,un,Fn],[un,Fn,mi,Fn]].map(_i);if(!Hn.reduce(function($r,Ri){return $r^!!E_.segmentsIntersect(xt,At,xt+1e6,At+1e6,Ri[0],Ri[1],Ri[2],Ri[3])},!1)){Hn.forEach(function($r){var Ri=E_.segmentsIntersect(Kt,er,xt,At,$r[0],$r[1],$r[2],$r[3]);Ri&&(Kt=Ri.x,er=Ri.y)});var Qn=t.arrowwidth,Vi=t.arrowcolor,Kn=t.arrowside,Jn=k.append("g").style({opacity:a2.opacity(Vi)}).classed("annotation-arrow-g",!0),Gt=Jn.append("path").attr("d","M"+Kt+","+er+"L"+xt+","+At).style("stroke-width",Qn+"px").call(a2.stroke,a2.rgb(Vi));if(j0t(Gt,Kn,t),l.annotationPosition&&Gt.node().parentNode&&!n){var wt=xt,rr=At;if(t.standoff){var ir=Math.sqrt(Math.pow(xt-Kt,2)+Math.pow(At-er,2));wt+=t.standoff*(Kt-xt)/ir,rr+=t.standoff*(er-At)/ir}var wr=Jn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Kt-wt)+","+(er-rr),transform:qU(wt,rr)}).style("stroke-width",Qn+6+"px").call(a2.stroke,"rgba(0,0,0,0)").call(a2.fill,"rgba(0,0,0,0)"),Xr,ti;h4.init({element:wr.node(),gd:e,prepFn:function(){var $r=By.getTranslate(C);Xr=$r.x,ti=$r.y,i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function($r,Ri){var Zi=Yr(Xr,ti),en=Zi[0]+$r,fn=Zi[1]+Ri;C.call(By.setTranslate,en,fn),d("x",M_(i,$r,"x",s,t)),d("y",M_(a,Ri,"y",s,t)),t.axref===t.xref&&d("ax",M_(i,$r,"ax",s,t)),t.ayref===t.yref&&d("ay",M_(a,Ri,"ay",s,t)),Jn.attr("transform",qU($r,Ri)),M.attr({transform:"rotate("+p+","+en+","+fn+")"})},doneFn:function(){zU.call("_guiRelayout",e,v());var $r=document.querySelector(".js-notes-box-panel");$r&&$r.redraw($r.selectedObj)}})}}};if(t.showarrow&&Ge(0,0),T){var Je;h4.init({element:C.node(),gd:e,prepFn:function(){Je=M.attr("transform")},moveFn:function(We,et){var xt="pointer";if(t.showarrow)t.axref===t.xref?d("ax",M_(i,We,"ax",s,t)):d("ax",t.ax+We),t.ayref===t.yref?d("ay",M_(a,et,"ay",s.w,t)):d("ay",t.ay+et),Ge(We,et);else{if(n)return;var At,Kt;if(i)At=M_(i,We,"x",s,t);else{var er=t._xsize/s.w,Sr=t.x+(t._xshift-t.xshift)/s.w-er/2;At=h4.align(Sr+We/s.w,er,0,1,t.xanchor)}if(a)Kt=M_(a,et,"y",s,t);else{var Gr=t._ysize/s.h,Ir=t.y-(t._yshift+t.yshift)/s.h-Gr/2;Kt=h4.align(Ir-et/s.h,Gr,0,1,t.yanchor)}d("x",At),d("y",Kt),(!i||!a)&&(xt=h4.getCursor(i?.5:At,a?.5:Kt,t.xanchor,t.yanchor))}M.attr({transform:qU(We,et)+Je}),BU(C,xt)},clickFn:function(We,et){t.captureevents&&e.emit("plotly_clickannotation",x(et))},doneFn:function(){BU(C),zU.call("_guiRelayout",e,v());var We=document.querySelector(".js-notes-box-panel");We&&We.redraw(We.selectedObj)}})}}l.annotationText?Z.call(OU.makeEditable,{delegate:C,gd:e}).call(j).on("edit",function(H){t.text=H,this.call(j),d("text",H),i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),zU.call("_guiRelayout",e,v())}):Z.call(j)}});var zpe=ye((jsr,Fpe)=>{"use strict";var Ppe=Pr(),X0t=Oa(),Ipe=vl().arrayEditor;Fpe.exports={hasClickToShow:Z0t,onClick:Y0t};function Z0t(e,t){var r=Dpe(e,t);return r.on.length>0||r.explicitOff.length>0}function Y0t(e,t){var r=Dpe(e,t),n=r.on,i=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,l;if(n.length||i.length){for(s=0;s<n.length;s++)l=Ipe(e.layout,"annotations",o[n[s]]),l.modifyItem("visible",!0),Ppe.extendFlat(a,l.getUpdateObj());for(s=0;s<i.length;s++)l=Ipe(e.layout,"annotations",o[i[s]]),l.modifyItem("visible",!1),Ppe.extendFlat(a,l.getUpdateObj());return X0t.call("update",e,{},a)}}function Dpe(e,t){var r=e._fullLayout.annotations,n=[],i=[],a=[],o=(t||[]).length,s,l,u,c,f,h,d,v;for(s=0;s<r.length;s++)if(u=r[s],c=u.clicktoshow,c){for(l=0;l<o;l++)if(f=t[l],h=f.xaxis,d=f.yaxis,h._id===u.xref&&d._id===u.yref&&h.d2r(f.x)===Rpe(u._xclick,h)&&d.d2r(f.y)===Rpe(u._yclick,d)){u.visible?c==="onout"?v=i:v=a:v=n,v.push(s);break}l===o&&u.visible&&c==="onout"&&i.push(s)}return{on:n,off:i,explicitOff:a}}function Rpe(e,t){return t.type==="log"?t.l2r(e):t.d2r(e)}});var UU=ye((Wsr,qpe)=>{"use strict";var NU=Pr(),xT=ka();qpe.exports=function(t,r,n,i){i("opacity");var a=i("bgcolor"),o=i("bordercolor"),s=xT.opacity(o);i("borderpad");var l=i("borderwidth"),u=i("showarrow");i("text",u?" ":n._dfltTitle.annotation),i("textangle"),NU.coerceFont(i,"font",n.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),u){var f=i("arrowside"),h,d;f.indexOf("end")!==-1&&(h=i("arrowhead"),d=i("arrowsize")),f.indexOf("start")!==-1&&(i("startarrowhead",h),i("startarrowsize",d)),i("arrowcolor",s?r.bordercolor:xT.defaultLine),i("arrowwidth",(s&&l||1)*2),i("standoff"),i("startstandoff")}var v=i("hovertext"),m=n.hoverlabel||{};if(v){var b=i("hoverlabel.bgcolor",m.bgcolor||(xT.opacity(a)?xT.rgb(a):xT.defaultLine)),p=i("hoverlabel.bordercolor",m.bordercolor||xT.contrast(b)),k=NU.extendFlat({},m.font);k.color||(k.color=p),NU.coerceFont(i,"hoverlabel.font",k)}i("captureevents",!!v)}});var Bpe=ye((Xsr,Ope)=>{"use strict";var VU=Pr(),o2=ho(),K0t=Zd(),J0t=UU(),$0t=Jb();Ope.exports=function(t,r){K0t(t,r,{name:"annotations",handleItemDefaults:Q0t})};function Q0t(e,t,r){function n(M,T){return VU.coerce(e,t,$0t,M,T)}var i=n("visible"),a=n("clicktoshow");if(i||a){J0t(e,t,r,n);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],h=o2.coerceRef(e,t,u,f,"","paper");if(h!=="paper"){var d=o2.getFromId(u,h);d._annIndices.push(t._index)}if(o2.coercePosition(t,u,n,h,f,.5),o){var v="a"+f,m=o2.coerceRef(e,t,u,v,"pixel",["pixel","paper"]);m!=="pixel"&&m!==h&&(m=t[v]="pixel");var b=m==="pixel"?l[c]:.4;o2.coercePosition(t,u,n,m,v,b)}n(f+"anchor"),n(f+"shift")}if(VU.noneOrAll(e,t,["x","y"]),o&&VU.noneOrAll(e,t,["ax","ay"]),a){var p=n("xclick"),k=n("yclick");t._xclick=p===void 0?t.x:o2.cleanPosition(p,u,t.xref),t._yclick=k===void 0?t.y:o2.cleanPosition(k,u,t.yref)}}}});var Vpe=ye((Zsr,Upe)=>{"use strict";var GU=Pr(),s2=ho(),egt=bI().draw;Upe.exports=function(t){var r=t._fullLayout,n=GU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return GU.syncOrAsync([egt,tgt],t)};function tgt(e){var t=e._fullLayout;GU.filterVisible(t.annotations).forEach(function(r){var n=s2.getFromId(e,r.xref),i=s2.getFromId(e,r.yref),a=s2.getRefType(r.xref),o=s2.getRefType(r.yref);r._extremes={},a==="range"&&Npe(r,n),o==="range"&&Npe(r,i)})}function Npe(e,t){var r=t._id,n=r.charAt(0),i=e[n],a=e["a"+n],o=e[n+"ref"],s=e["a"+n+"ref"],l=e["_"+n+"padplus"],u=e["_"+n+"padminus"],c={x:1,y:-1}[n]*e[n+"shift"],f=3*e.arrowsize*e.arrowwidth||0,h=f+c,d=f-c,v=3*e.startarrowsize*e.arrowwidth||0,m=v+c,b=v-c,p;if(s===o){var k=s2.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),M=s2.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,m),ppadminus:Math.max(u,b)});p={min:[k.min[0],M.min[0]],max:[k.max[0],M.max[0]]}}else m=a?m+a:m,b=a?b-a:b,p=s2.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,h,m),ppadminus:Math.max(u,d,b)});e._extremes[r]=p}});var Hpe=ye((Ysr,Gpe)=>{"use strict";var rgt=Eo(),igt=S6();Gpe.exports=function(t,r,n,i){r=r||{};var a=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(!(a||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(d){var v=u[d],m=null;a?m=igt(v,r.range):m=Math.pow(10,v),rgt(m)||(m=null),i(c+d,m)}for(var h=0;h<s.length;h++)u=s[h],c="annotations["+h+"].",u[l+"ref"]===r._id&&f(l),u["a"+l+"ref"]===r._id&&f("a"+l)}});var Xpe=ye((Ksr,Wpe)=>{"use strict";var HU=bI(),jpe=zpe();Wpe.exports={moduleType:"component",name:"annotations",layoutAttributes:Jb(),supplyLayoutDefaults:Bpe(),includeBasePlot:WM()("annotations"),calcAutorange:Vpe(),draw:HU.draw,drawOne:HU.drawOne,drawRaw:HU.drawRaw,hasClickToShow:jpe.hasClickToShow,onClick:jpe.onClick,convertCoords:Hpe()}});var wI=ye((Jsr,Zpe)=>{"use strict";var kc=Jb(),ngt=mc().overrideAll,agt=vl().templatedArray;Zpe.exports=ngt(agt("annotation",{visible:kc.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:kc.xanchor,xshift:kc.xshift,yanchor:kc.yanchor,yshift:kc.yshift,text:kc.text,textangle:kc.textangle,font:kc.font,width:kc.width,height:kc.height,opacity:kc.opacity,align:kc.align,valign:kc.valign,bgcolor:kc.bgcolor,bordercolor:kc.bordercolor,borderpad:kc.borderpad,borderwidth:kc.borderwidth,showarrow:kc.showarrow,arrowcolor:kc.arrowcolor,arrowhead:kc.arrowhead,startarrowhead:kc.startarrowhead,arrowside:kc.arrowside,arrowsize:kc.arrowsize,startarrowsize:kc.startarrowsize,arrowwidth:kc.arrowwidth,standoff:kc.standoff,startstandoff:kc.startstandoff,hovertext:kc.hovertext,hoverlabel:kc.hoverlabel,captureevents:kc.captureevents}),"calc","from-root")});var Kpe=ye(($sr,Ype)=>{"use strict";var jU=Pr(),ogt=ho(),sgt=Zd(),lgt=UU(),ugt=wI();Ype.exports=function(t,r,n){sgt(t,r,{name:"annotations",handleItemDefaults:cgt,fullLayout:n.fullLayout})};function cgt(e,t,r,n){function i(s,l){return jU.coerce(e,t,ugt,s,l)}function a(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],ogt.coercePosition(t,u,i,s,s,.5)}var o=i("visible");o&&(lgt(e,t,n.fullLayout,i),a("x"),a("y"),a("z"),jU.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",i("ax",-10),i("ay",-30),jU.noneOrAll(e,t,["ax","ay"])))}});var e0e=ye((Qsr,Qpe)=>{"use strict";var Jpe=Pr(),$pe=ho();Qpe.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i<n.length;i++)fgt(n[i],t);t.fullLayout._infolayer.selectAll(".annotation-"+t.id).remove()};function fgt(e,t){var r=t.fullSceneLayout,n=r.domain,i=t.fullLayout._size,a={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};e._xa={},Jpe.extendFlat(e._xa,a),$pe.setConvert(e._xa),e._xa._offset=i.l+n.x[0]*i.w,e._xa.l2p=function(){return .5*(1+e._pdata[0]/e._pdata[3])*i.w*(n.x[1]-n.x[0])},e._ya={},Jpe.extendFlat(e._ya,a),$pe.setConvert(e._ya),e._ya._offset=i.t+(1-n.y[1])*i.h,e._ya.l2p=function(){return .5*(1-e._pdata[1]/e._pdata[3])*i.h*(n.y[1]-n.y[0])}}});var XU=ye((elr,t0e)=>{"use strict";function WU(e,t){var r=[0,0,0,0],n,i;for(n=0;n<4;++n)for(i=0;i<4;++i)r[i]+=e[4*n+i]*t[n];return r}function hgt(e,t){var r=WU(e.projection,WU(e.view,WU(e.model,[t[0],t[1],t[2],1])));return r}t0e.exports=hgt});var i0e=ye((tlr,r0e)=>{"use strict";var dgt=bI().drawRaw,vgt=XU(),pgt=["x","y","z"];r0e.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,i=r.annotations,a=0;a<i.length;a++){for(var o=i[a],s=!1,l=0;l<3;l++){var u=pgt[l],c=o[u],f=r[u+"axis"],h=f.r2fraction(c);if(h<0||h>1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+a+'"]').remove():(o._pdata=vgt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),dgt(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var o0e=ye((rlr,a0e)=>{"use strict";var ggt=Oa(),n0e=Pr();a0e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:wI()}}},layoutAttributes:wI(),handleDefaults:Kpe(),includeBasePlot:mgt,convert:e0e(),draw:i0e()};function mgt(e,t){var r=ggt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,i=Object.keys(e),a=0;a<i.length;a++){var o=i[a];n.test(o)&&(e[o].annotations||[]).length&&(n0e.pushUnique(t._basePlotModules,r),n0e.pushUnique(t._subplots.gl3d,o))}}});var ZU=ye((alr,c0e)=>{"use strict";var ilr=Rh(),s0e=ec(),l0e=pf().line,ygt=Pd().dash,Bg=Ao().extendFlat,_gt=vl().templatedArray,nlr=HM(),bT=Gl(),u0e=Jb(),{shapeTexttemplateAttrs:xgt,templatefallbackAttrs:bgt}=Ll(),wgt=D6();c0e.exports=_gt("shape",{visible:Bg({},bT.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Bg({},bT.legend,{editType:"calc+arraydraw"}),legendgroup:Bg({},bT.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Bg({},bT.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:s0e({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Bg({},bT.legendrank,{editType:"calc+arraydraw"}),legendwidth:Bg({},bT.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:Bg({},u0e.xref,{arrayOk:!0}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:Bg({},u0e.yref,{arrayOk:!0}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:Bg({},l0e.color,{editType:"arraydraw"}),width:Bg({},l0e.width,{editType:"calc+arraydraw"}),dash:Bg({},ygt,{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:xgt({},{keys:Object.keys(wgt)}),texttemplatefallback:bgt({editType:"arraydraw"}),font:s0e({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})});var h0e=ye((olr,f0e)=>{"use strict";var wT=Pr(),e0=ho(),Tgt=Zd(),Agt=ZU(),v4=x_();f0e.exports=function(t,r){Tgt(t,r,{name:"shapes",handleItemDefaults:Mgt})};function Sgt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function Mgt(e,t,r){function n(M,T){return wT.coerce(e,t,Agt,M,T)}t._isShape=!0;var i=n("visible");if(!i)return;var a=n("showlegend");a&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),wT.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",l=n("type",s),u=l!=="path";u&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var c=n("line.width");c&&(n("line.color"),n("line.dash"));var f=n("xsizemode"),h=n("ysizemode");let d=[.25,.75],v=[0,10];["x","y"].forEach(M=>{var T=M+"anchor",L=M==="x"?f:h,x={_fullLayout:r},C,S,g,P;let E=M+"ref",z=e[E];if(Array.isArray(z)&&z.length>0){let q=v4.countDefiningCoords(l,o,M);P=e0.coerceRefArray(e,t,x,M,void 0,"paper",q),t["_"+M+"refArray"]=!0}else P=e0.coerceRef(e,t,x,M,void 0,"paper");if(Array.isArray(P))P.forEach(function(q){e0.getRefType(q)==="range"&&(C=e0.getFromId(x,q),C&&C._shapeIndices.indexOf(t._index)===-1&&C._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(q){let U=P[q];e0.getRefType(U)==="range"?(C=e0.getFromId(x,U),S=v4.shapePositionToRange(C),g=v4.rangeToShapePosition(C),(C.type==="category"||C.type==="multicategory")&&n(M+q+"shift")):S=g=wT.identity;let Z=M+q,j=e[Z];if(e[Z]=S(e[Z],!0),L==="pixel"?n(Z,v[q]):e0.coercePosition(t,x,n,U,Z,d[q]),t[Z]=g(t[Z]),e[Z]=j,q===0&&L==="pixel"){let N=e[T];e[T]=S(e[T],!0),e0.coercePosition(t,x,n,U,T,.25),t[T]=g(t[T]),e[T]=N}});else{if(e0.getRefType(P)==="range"?(C=e0.getFromId(x,P),C._shapeIndices.push(t._index),g=v4.rangeToShapePosition(C),S=v4.shapePositionToRange(C),u&&(C.type==="category"||C.type==="multicategory")&&(n(M+"0shift"),n(M+"1shift"))):S=g=wT.identity,u){let U=M+"0",G=M+"1",Z=e[U],j=e[G];e[U]=S(e[U],!0),e[G]=S(e[G],!0),L==="pixel"?(n(U,v[0]),n(G,v[1])):(e0.coercePosition(t,x,n,P,U,d[0]),e0.coercePosition(t,x,n,P,G,d[1])),t[U]=g(t[U]),t[G]=g(t[G]),e[U]=Z,e[G]=j}if(L==="pixel"){let U=e[T];e[T]=S(e[T],!0),e0.coercePosition(t,x,n,P,T,.25),t[T]=g(t[T]),e[T]=U}}}),u&&wT.noneOrAll(e,t,["x0","x1","y0","y1"]);var m=l==="line",b,p;if(u&&(b=n("label.texttemplate"),n("label.texttemplatefallback")),b||(p=n("label.text")),p||b){n("label.textangle");var k=n("label.textposition",m?"middle":"middle center");n("label.xanchor"),n("label.yanchor",Sgt(m,k)),n("label.padding"),wT.coerceFont(n,"label.font",r.font)}}});var p0e=ye((slr,v0e)=>{"use strict";var Egt=ka(),d0e=Pr();function kgt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}v0e.exports=function(t,r,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),d0e.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var i=n("newshape.line.width");if(i){var a=(t||{}).plot_bgcolor||"#FFF";n("newshape.line.color",Egt.contrast(a)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",kgt(o,u)),n("newshape.label.padding"),d0e.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var w0e=ye((llr,b0e)=>{"use strict";var YU=Pr(),N0=ho(),Fm=TM(),KU=x_();b0e.exports=function(t){var r=t._fullLayout,n=YU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var i=0;i<n.length;i++){var a=n[i];a._extremes={};var o,s,l=N0.getRefType(a.xref),u=N0.getRefType(a.yref);if(l==="array"){let c=g0e(t,a,"x");Object.entries(c).forEach(([f,h])=>{o=N0.getFromId(t,f),a._extremes[o._id]=N0.findExtremes(o,h,m0e(a))})}else a.xref!=="paper"&&l!=="domain"&&(o=N0.getFromId(t,a.xref),s=_0e(o,a,Fm.paramIsX),s&&(a._extremes[o._id]=N0.findExtremes(o,s,m0e(a))));if(u==="array"){let c=g0e(t,a,"y");Object.entries(c).forEach(([f,h])=>{o=N0.getFromId(t,f),a._extremes[o._id]=N0.findExtremes(o,h,y0e(a))})}else a.yref!=="paper"&&u!=="domain"&&(o=N0.getFromId(t,a.yref),s=_0e(o,a,Fm.paramIsY),s&&(a._extremes[o._id]=N0.findExtremes(o,s,y0e(a))))}};function g0e(e,t,r){let n=t[r+"ref"],i=r==="x"?Fm.paramIsX:Fm.paramIsY;function a(f,h){f==="paper"||N0.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(h))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(Fm.segmentRE)||[];for(var s=0,l=0;l<f.length;l++){let h=f[l],d=h.charAt(0),v=i[d].drawn;if(v===void 0)continue;let m=h.slice(1).match(Fm.paramRE);m&&m.length>v&&(a(n[s],m[v]),s++)}}else a(n[0],t[r+"0"]),a(n[1],t[r+"1"]);let u={};for(let f in o){let h=N0.getFromId(e,f);if(h){var c=h.type==="category"||h.type==="multicategory"?h.r2c:h.d2c;h.type==="date"&&(c=KU.decodeDate(c)),u[h._id]=o[f].map(c)}}return u}function m0e(e){return x0e(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function y0e(e){return x0e(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function x0e(e,t,r,n,i,a){var o=e/2,s=a;if(t==="pixel"){var l=i?KU.extractPathCoords(i,a?Fm.paramIsY:Fm.paramIsX):[r,n],u=YU.aggNums(Math.max,null,l),c=YU.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,h=u>0?u+o:o;return{ppad:o,ppadplus:s?f:h,ppadminus:s?h:f}}else return{ppad:o}}function _0e(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",i=e.type==="category"||e.type==="multicategory",a,o,s=0,l=0,u=i?e.r2c:e.d2c,c=t[n+"sizemode"]==="scaled";if(c?(a=t[n+"0"],o=t[n+"1"],i&&(s=t[n+"0shift"],l=t[n+"1shift"])):(a=t[n+"anchor"],o=t[n+"anchor"]),a!==void 0)return[u(a)+s,u(o)+l];if(t.path){var f=1/0,h=-1/0,d=t.path.match(Fm.segmentRE),v,m,b,p,k;for(e.type==="date"&&(u=KU.decodeDate(u)),v=0;v<d.length;v++)m=d[v],b=r[m.charAt(0)].drawn,b!==void 0&&(p=d[v].slice(1).match(Fm.paramRE),!(!p||p.length<b)&&(k=u(p[b]),k<f&&(f=k),k>h&&(h=k)));if(h>=f)return[f,h]}}});var S0e=ye((ulr,A0e)=>{"use strict";var T0e=dP();A0e.exports={moduleType:"component",name:"shapes",layoutAttributes:ZU(),supplyLayoutDefaults:h0e(),supplyDrawNewShapeDefaults:p0e(),includeBasePlot:WM()("shapes"),calcAutorange:w0e(),draw:T0e.draw,drawOne:T0e.drawOne}});var JU=ye((flr,E0e)=>{"use strict";var M0e=Rh(),Cgt=vl().templatedArray,clr=HM();E0e.exports=Cgt("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",M0e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",M0e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var C0e=ye((hlr,k0e)=>{"use strict";var Lgt=Pr(),$U=ho(),Pgt=Zd(),Igt=JU(),Rgt="images";k0e.exports=function(t,r){var n={name:Rgt,handleItemDefaults:Dgt};Pgt(t,r,n)};function Dgt(e,t,r){function n(h,d){return Lgt.coerce(e,t,Igt,h,d)}var i=n("source"),a=n("visible",!!i);if(!a)return t;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=$U.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=$U.getFromId(o,c);f._imgIndices.push(t._index)}$U.coercePosition(t,o,n,c,u,0)}return t}});var R0e=ye((dlr,I0e)=>{"use strict";var L0e=qa(),Fgt=So(),TT=ho(),P0e=hf(),zgt=Wp();I0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s<r.images.length;s++){var l=r.images[s];if(l.visible)if(l.layer==="below"&&l.xref!=="paper"&&l.yref!=="paper"){o=P0e.ref2id(l.xref)+P0e.ref2id(l.yref);var u=r._plots[o];if(!u){a.push(l);continue}u.mainplot&&(o=u.mainplot.id),i[o]||(i[o]=[]),i[o].push(l)}else l.layer==="above"?n.push(l):a.push(l)}var c={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function f(T){var L=L0e.select(this);if(this._imgSrc!==T.source)if(L.attr("xmlns",zgt.svg),!t._context.staticPlot||T.source&&T.source.slice(0,5)==="data:")L.attr("xlink:href",T.source),this._imgSrc=T.source;else{var x=new Promise(function(C){var S=new Image;this.img=S,S.setAttribute("crossOrigin","anonymous"),S.onerror=g,S.onload=function(){var P=document.createElement("canvas");P.width=this.width,P.height=this.height;var E=P.getContext("2d",{willReadFrequently:!0});E.drawImage(this,0,0);var z=P.toDataURL("image/png");L.attr("xlink:href",z),C()},L.on("error",g),S.src=T.source,this._imgSrc=T.source;function g(){L.remove(),C()}}.bind(this));t._promises.push(x)}}function h(T){var L=L0e.select(this),x=TT.getFromId(t,T.xref),C=TT.getFromId(t,T.yref),S=TT.getRefType(T.xref)==="domain",g=TT.getRefType(T.yref)==="domain",P=r._size,E,z;x!==void 0?E=typeof T.xref=="string"&&S?x._length*T.sizex:Math.abs(x.l2p(T.sizex)-x.l2p(0)):E=T.sizex*P.w,C!==void 0?z=typeof T.yref=="string"&&g?C._length*T.sizey:Math.abs(C.l2p(T.sizey)-C.l2p(0)):z=T.sizey*P.h;var q=E*c.x[T.xanchor].offset,U=z*c.y[T.yanchor].offset,G=c.x[T.xanchor].sizing+c.y[T.yanchor].sizing,Z,j;switch(x!==void 0?Z=typeof T.xref=="string"&&S?x._length*T.x+x._offset:x.r2p(T.x)+x._offset:Z=T.x*P.w+P.l,Z+=q,C!==void 0?j=typeof T.yref=="string"&&g?C._length*(1-T.y)+C._offset:C.r2p(T.y)+C._offset:j=P.h-T.y*P.h+P.t,j+=U,T.sizing){case"fill":G+=" slice";break;case"stretch":G="none";break}L.attr({x:Z,y:j,width:E,height:z,preserveAspectRatio:G,opacity:T.opacity});var N=x&&TT.getRefType(T.xref)!=="domain"?x._id:"",H=C&&TT.getRefType(T.yref)!=="domain"?C._id:"",re=N+H;Fgt.setClipUrl(L,re?"clip"+r._uid+re:null,t)}function d(T){return[T.xref,T.x,T.sizex,T.yref,T.y,T.sizey].join("_")}function v(T,L){return T._index-L._index}var m=r._imageLowerLayer.selectAll("image").data(a,d),b=r._imageUpperLayer.selectAll("image").data(n,d);m.enter().append("image"),b.enter().append("image"),m.exit().remove(),b.exit().remove(),m.each(function(T){f.bind(this)(T),h.bind(this)(T)}),b.each(function(T){f.bind(this)(T),h.bind(this)(T)}),m.sort(v),b.sort(v);var p=Object.keys(r._plots);for(s=0;s<p.length;s++){o=p[s];var k=r._plots[o];if(k.imagelayer){var M=k.imagelayer.selectAll("image").data(i[o]||[],d);M.enter().append("image"),M.exit().remove(),M.each(function(T){f.bind(this)(T),h.bind(this)(T)}),M.sort(v)}}}});var z0e=ye((vlr,F0e)=>{"use strict";var D0e=Eo(),qgt=S6();F0e.exports=function(t,r,n,i){r=r||{};var a=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(a||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f<s.length;f++)if(u=s[f],c="images["+f+"].",u[l+"ref"]===r._id){var h=u[l],d=u["size"+l],v=null,m=null;if(a){v=qgt(h,r.range);var b=d/Math.pow(10,v)/2;m=2*Math.log(b+Math.sqrt(1+b*b))/Math.LN10}else v=Math.pow(10,h),m=v*(Math.pow(10,d/2)-Math.pow(10,-d/2));D0e(v)?D0e(m)||(m=null):(v=null,m=null),i(c+l,v),i(c+"size"+l,m)}}}});var O0e=ye((plr,q0e)=>{"use strict";q0e.exports={moduleType:"component",name:"images",layoutAttributes:JU(),supplyLayoutDefaults:C0e(),includeBasePlot:WM()("images"),draw:R0e(),convertCoords:z0e()}});var TI=ye((glr,B0e)=>{"use strict";B0e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}});var QU=ye((mlr,U0e)=>{"use strict";var Ogt=ec(),Bgt=Ih(),Ngt=Ao().extendFlat,Ugt=mc().overrideAll,Vgt=F6(),N0e=vl().templatedArray,Ggt=N0e("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});U0e.exports=Ugt(N0e("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:Ggt,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:Ngt(Vgt({editType:"arraydraw"}),{}),font:Ogt({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Bgt.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var j0e=ye((ylr,H0e)=>{"use strict";var AI=Pr(),V0e=Zd(),G0e=QU(),Hgt=TI(),jgt=Hgt.name,Wgt=G0e.buttons;H0e.exports=function(t,r){var n={name:jgt,handleItemDefaults:Xgt};V0e(t,r,n)};function Xgt(e,t,r){function n(o,s){return AI.coerce(e,t,G0e,o,s)}var i=V0e(e,t,{name:"buttons",handleItemDefaults:Zgt}),a=n("visible",i.length>0);a&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),AI.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),AI.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function Zgt(e,t){function r(i,a){return AI.coerce(e,t,Wgt,i,a)}var n=r("visible",e.method==="skip"||Array.isArray(e.args));n&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var Z0e=ye((_lr,X0e)=>{"use strict";X0e.exports=Mf;var Ng=qa(),W0e=ka(),AT=So(),SI=Pr();function Mf(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Mf.barWidth=2;Mf.barLength=20;Mf.barRadius=2;Mf.barPad=1;Mf.barColor="#808BA4";Mf.prototype.enable=function(t,r,n){var i=this.gd._fullLayout,a=i.width,o=i.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,h=f==="down",d=f==="left",v=f==="right",m=f==="up",b=l,p=c,k,M,T,L;!h&&!d&&!v&&!m&&(this.position.direction="down",h=!0);var x=h||m;x?(k=s,M=k+b,h?(T=u,L=Math.min(T+p,o),p=L-T):(L=u+p,T=Math.max(L-p,0),p=L-T)):(T=u,L=T+p,d?(M=s+b,k=Math.max(M-b,0),b=M-k):(k=s,M=Math.min(k+b,a),b=M-k)),this._box={l:k,t:T,w:b,h:p};var C=l>b,S=Mf.barLength+2*Mf.barPad,g=Mf.barWidth+2*Mf.barPad,P=s,E=u+c;E+g>o&&(E=o-g);var z=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(W0e.fill,Mf.barColor),C?(this.hbar=z.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:P,y:E,width:S,height:g}),this._hbarXMin=P+S/2,this._hbarTranslateMax=b-S):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var q=c>p,U=Mf.barWidth+2*Mf.barPad,G=Mf.barLength+2*Mf.barPad,Z=s+l,j=u;Z+U>a&&(Z=a-U);var N=this.container.selectAll("rect.scrollbar-vertical").data(q?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-vertical",!0).call(W0e.fill,Mf.barColor),q?(this.vbar=N.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:Z,y:j,width:U,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=p-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var H=this.id,re=k-.5,oe=q?M+U+.5:M+.5,_e=T-.5,ke=C?L+g+.5:L+.5,Ce=i._topdefs.selectAll("#"+H).data(C||q?[0]:[]);if(Ce.exit().remove(),Ce.enter().append("clipPath").attr("id",H).append("rect"),C||q?(this._clipRect=Ce.select("rect").attr({x:Math.floor(re),y:Math.floor(_e),width:Math.ceil(oe)-Math.floor(re),height:Math.ceil(ke)-Math.floor(_e)}),this.container.call(AT.setClipUrl,H,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(AT.setClipUrl,null),delete this._clipRect),C||q){var ge=Ng.behavior.drag().on("dragstart",function(){Ng.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ge);var ie=Ng.behavior.drag().on("dragstart",function(){Ng.event.sourceEvent.preventDefault(),Ng.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));C&&this.hbar.on(".drag",null).call(ie),q&&this.vbar.on(".drag",null).call(ie)}this.setTranslate(r,n)};Mf.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(AT.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)};Mf.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=Ng.event.dx),this.vbar&&(r-=Ng.event.dy),this.setTranslate(t,r)};Mf.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=Ng.event.deltaY),this.vbar&&(r+=Ng.event.deltaY),this.setTranslate(t,r)};Mf.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=SI.constrain(Ng.event.x,n,i),o=(a-n)/(i-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=SI.constrain(Ng.event.y,l,u),f=(c-l)/(u-l),h=this.position.h-this._box.h;r=f*h}this.setTranslate(t,r)};Mf.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=SI.constrain(t||0,0,n),r=SI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(AT.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(AT.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(AT.setTranslate,t,r+o*this._vbarTranslateMax)}}});var nge=ye((xlr,ige)=>{"use strict";var ST=qa(),p4=Mc(),g4=ka(),MT=So(),t0=Pr(),MI=Zl(),Ygt=vl().arrayEditor,K0e=Dh().LINE_SPACING,es=TI(),Kgt=Z0e();ige.exports=function(t){var r=t._fullLayout,n=t0.filterVisible(r[es.name]);function i(h){p4.autoMargin(t,tge(h))}var a=r._menulayer.selectAll("g."+es.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append("g").classed(es.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){ST.select(this).selectAll("g."+es.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll("g."+es.headerGroupClassName).data(n,Jgt);o.enter().append("g").classed(es.headerGroupClassName,!0);for(var s=t0.ensureSingle(a,"g",es.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),l=0;l<n.length;l++){var u=n[l];imt(t,u)}var c="updatemenus"+r._uid,f=new Kgt(t,s,c);o.enter().size()&&(s.node().parentNode.appendChild(s.node()),s.call(tV)),o.exit().each(function(h){s.call(tV),i(h)}).remove(),o.each(function(h){var d=ST.select(this),v=h.type==="dropdown"?s:null;p4.manageCommandObserver(t,h,h.buttons,function(m){eV(t,h,h.buttons[m.index],d,v,f,m.index,!0)}),h.type==="dropdown"?($0e(t,d,s,f,h),J0e(s,h)&&m4(t,d,s,f,h)):m4(t,d,null,null,h)})}};function Jgt(e){return e._index}function $gt(e){return+e.attr(es.menuIndexAttrName)==-1}function J0e(e,t){return+e.attr(es.menuIndexAttrName)===t._index}function eV(e,t,r,n,i,a,o,s){t.active=o,Ygt(e.layout,es.name,t).applyUpdate("active",o),t.type==="buttons"?m4(e,n,null,null,t):t.type==="dropdown"&&(i.attr(es.menuIndexAttrName,"-1"),$0e(e,n,i,a,t),s||m4(e,n,i,a,t))}function $0e(e,t,r,n,i){var a=t0.ensureSingle(t,"g",es.headerClassName,function(h){h.style("pointer-events","all")}),o=i._dims,s=i.active,l=i.buttons[s]||es.blankHeaderOpts,u={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},c={width:o.headerWidth,height:o.headerHeight};a.call(rV,i,l,e).call(rge,i,u,c);var f=t0.ensureSingle(t,"text",es.headerArrowClassName,function(h){h.attr("text-anchor","end").call(MT.font,i.font).text(es.arrowSymbol[i.direction])});f.attr({x:o.headerWidth-es.arrowOffsetX+i.pad.l,y:o.headerHeight/2+es.textOffsetY+i.pad.t}),a.on("click",function(){r.call(tV,String(J0e(r,i)?-1:i._index)),m4(e,t,r,n,i)}),a.on("mouseover",function(){a.call(Q0e)}),a.on("mouseout",function(){a.call(ege,i)}),MT.setTranslate(t,o.lx,o.ly)}function m4(e,t,r,n,i){r||(r=t,r.attr("pointer-events","all"));var a=!$gt(r)||i.type==="buttons"?i.buttons:[],o=i.type==="dropdown"?es.dropdownButtonClassName:es.buttonClassName,s=r.selectAll("g."+o).data(t0.filterVisible(a)),l=s.enter().append("g").classed(o,!0),u=s.exit();i.type==="dropdown"?(l.attr("opacity","0").transition().attr("opacity","1"),u.transition().attr("opacity","0").remove()):u.remove();var c=0,f=0,h=i._dims,d=["up","down"].indexOf(i.direction)!==-1;i.type==="dropdown"&&(d?f=h.headerHeight+es.gapButtonHeader:c=h.headerWidth+es.gapButtonHeader),i.type==="dropdown"&&i.direction==="up"&&(f=-es.gapButtonHeader+es.gapButton-h.openHeight),i.type==="dropdown"&&i.direction==="left"&&(c=-es.gapButtonHeader+es.gapButton-h.openWidth);var v={x:h.lx+c+i.pad.l,y:h.ly+f+i.pad.t,yPad:es.gapButton,xPad:es.gapButton,index:0},m={l:v.x+i.borderwidth,t:v.y+i.borderwidth};s.each(function(b,p){var k=ST.select(this);k.call(rV,i,b,e).call(rge,i,v),k.on("click",function(){ST.event.defaultPrevented||(b.execute&&(b.args2&&i.active===p?(eV(e,i,b,t,r,n,-1),p4.executeAPICommand(e,b.method,b.args2)):(eV(e,i,b,t,r,n,p),p4.executeAPICommand(e,b.method,b.args))),e.emit("plotly_buttonclicked",{menu:i,button:b,active:i.active}))}),k.on("mouseover",function(){k.call(Q0e)}),k.on("mouseout",function(){k.call(ege,i),s.call(Y0e,i)})}),s.call(Y0e,i),d?(m.w=Math.max(h.openWidth,h.headerWidth),m.h=v.y-m.t):(m.w=v.x-m.l,m.h=Math.max(h.openHeight,h.headerHeight)),m.direction=i.direction,n&&(s.size()?Qgt(e,t,r,n,i,m):emt(n))}function Qgt(e,t,r,n,i,a){var o=i.direction,s=o==="up"||o==="down",l=i._dims,u=i.active,c,f,h;if(s)for(f=0,h=0;h<u;h++)f+=l.heights[h]+es.gapButton;else for(c=0,h=0;h<u;h++)c+=l.widths[h]+es.gapButton;n.enable(a,c,f),n.hbar&&n.hbar.attr("opacity","0").transition().attr("opacity","1"),n.vbar&&n.vbar.attr("opacity","0").transition().attr("opacity","1")}function emt(e){var t=!!e.hbar,r=!!e.vbar;t&&e.hbar.transition().attr("opacity","0").each("end",function(){t=!1,r||e.disable()}),r&&e.vbar.transition().attr("opacity","0").each("end",function(){r=!1,t||e.disable()})}function rV(e,t,r,n){e.call(tmt,t).call(rmt,t,r,n)}function tmt(e,t){var r=t0.ensureSingle(e,"rect",es.itemRectClassName,function(n){n.attr({rx:es.rx,ry:es.ry,"shape-rendering":"crispEdges"})});r.call(g4.stroke,t.bordercolor).call(g4.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px")}function rmt(e,t,r,n){var i=t0.ensureSingle(e,"text",es.itemTextClassName,function(s){s.attr({"text-anchor":"start","data-notex":1})}),a=r.label,o=n._fullLayout._meta;o&&(a=t0.templateString(a,o)),i.call(MT.font,t.font).text(a).call(MI.convertToTspans,n)}function Y0e(e,t){var r=t.active;e.each(function(n,i){var a=ST.select(this);i===r&&t.showactive&&a.select("rect."+es.itemRectClassName).call(g4.fill,es.activeColor)})}function Q0e(e){e.select("rect."+es.itemRectClassName).call(g4.fill,es.hoverColor)}function ege(e,t){e.select("rect."+es.itemRectClassName).call(g4.fill,t.bgcolor)}function imt(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."+es.dropdownButtonClassName).data(t0.filterVisible(t.buttons));n.enter().append("g").classed(es.dropdownButtonClassName,!0);var i=["up","down"].indexOf(t.direction)!==-1;n.each(function(c,f){var h=ST.select(this);h.call(rV,t,c,e);var d=h.select("."+es.itemTextClassName),v=d.node()&&MT.bBox(d.node()).width,m=Math.max(v+es.textPadX,es.minWidth),b=t.font.size*K0e,p=MI.lineCount(d),k=Math.max(b*p,es.minHeight)+es.textOffsetY;k=Math.ceil(k),m=Math.ceil(m),r.widths[f]=m,r.heights[f]=k,r.height1=Math.max(r.height1,k),r.width1=Math.max(r.width1,m),i?(r.totalWidth=Math.max(r.totalWidth,m),r.openWidth=r.totalWidth,r.totalHeight+=k+es.gapButton,r.openHeight+=k+es.gapButton):(r.totalWidth+=m+es.gapButton,r.openWidth+=m+es.gapButton,r.totalHeight=Math.max(r.totalHeight,k),r.openHeight=r.totalHeight)}),i?r.totalHeight-=es.gapButton:r.totalWidth-=es.gapButton,r.headerWidth=r.width1+es.arrowPadX,r.headerHeight=r.height1,t.type==="dropdown"&&(i?(r.width1+=es.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=es.arrowPadX),n.remove();var a=r.totalWidth+t.pad.l+t.pad.r,o=r.totalHeight+t.pad.t+t.pad.b,s=e._fullLayout._size;r.lx=s.l+s.w*t.x,r.ly=s.t+s.h*(1-t.y);var l="left";t0.isRightAnchor(t)&&(r.lx-=a,l="right"),t0.isCenterAnchor(t)&&(r.lx-=a/2,l="center");var u="top";t0.isBottomAnchor(t)&&(r.ly-=o,u="bottom"),t0.isMiddleAnchor(t)&&(r.ly-=o/2,u="middle"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),p4.autoMargin(e,tge(t),{x:t.x,y:t.y,l:a*({right:1,center:.5}[l]||0),r:a*({left:1,center:.5}[l]||0),b:o*({top:1,middle:.5}[u]||0),t:o*({bottom:1,middle:.5}[u]||0)})}function tge(e){return es.autoMarginIdRoot+e._index}function rge(e,t,r,n){n=n||{};var i=e.select("."+es.itemRectClassName),a=e.select("."+es.itemTextClassName),o=t.borderwidth,s=r.index,l=t._dims;MT.setTranslate(e,o+r.x,o+r.y);var u=["up","down"].indexOf(t.direction)!==-1,c=n.height||(u?l.heights[s]:l.height1);i.attr({x:0,y:0,width:n.width||(u?l.width1:l.widths[s]),height:c});var f=t.font.size*K0e,h=MI.lineCount(a),d=(h-1)*f/2;MI.positionText(a,es.textOffsetX,c/2-d+es.textOffsetY),u?r.y+=l.heights[s]+r.yPad:r.x+=l.widths[s]+r.xPad,r.index++}function tV(e,t){e.attr(es.menuIndexAttrName,t||"-1").selectAll("g."+es.dropdownButtonClassName).remove()}});var oge=ye((blr,age)=>{"use strict";var nmt=TI();age.exports={moduleType:"component",name:nmt.name,layoutAttributes:QU(),supplyLayoutDefaults:j0e(),draw:nge()}});var y4=ye((wlr,sge)=>{"use strict";sge.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}});var iV=ye((Tlr,cge)=>{"use strict";var lge=ec(),amt=F6(),omt=Ao().extendDeepAll,smt=mc().overrideAll,lmt=jS(),uge=vl().templatedArray,l2=y4(),umt=uge("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});cge.exports=smt(uge("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:umt,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:omt(amt({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:lmt.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:lge({})},font:lge({}),activebgcolor:{valType:"color",dflt:l2.gripBgActiveColor},bgcolor:{valType:"color",dflt:l2.railBgColor},bordercolor:{valType:"color",dflt:l2.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l2.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l2.tickLength},tickcolor:{valType:"color",dflt:l2.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l2.minorTickLength}}),"arraydraw","from-root")});var vge=ye((Alr,dge)=>{"use strict";var ET=Pr(),fge=Zd(),hge=iV(),cmt=y4(),fmt=cmt.name,hmt=hge.steps;dge.exports=function(t,r){fge(t,r,{name:fmt,handleItemDefaults:dmt})};function dmt(e,t,r){function n(f,h){return ET.coerce(e,t,hge,f,h)}for(var i=fge(e,t,{name:"steps",handleItemDefaults:vmt}),a=0,o=0;o<i.length;o++)i[o].visible&&a++;var s;if(a<2?s=t.visible=!1:s=n("visible"),!!s){t._stepCount=a;var l=t._visibleSteps=ET.filterVisible(i),u=n("active");(i[u]||{}).visible||(t.active=l[0]._index),n("x"),n("y"),ET.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"),ET.coerceFont(n,"font",r.font);var c=n("currentvalue.visible");c&&(n("currentvalue.xanchor"),n("currentvalue.prefix"),n("currentvalue.suffix"),n("currentvalue.offset"),ET.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 vmt(e,t){function r(a,o){return ET.coerce(e,t,hmt,a,o)}var n;if(e.method!=="skip"&&!Array.isArray(e.args)?n=t.visible=!1:n=r("visible"),n){r("method"),r("args");var i=r("label","step-"+t._index);r("value",i),r("execute")}}});var Age=ye((Slr,Tge)=>{"use strict";var Ug=qa(),EI=Mc(),k_=ka(),Vg=So(),r0=Pr(),pmt=r0.strTranslate,_4=Zl(),gmt=vl().arrayEditor,Rs=y4(),oV=Dh(),mge=oV.LINE_SPACING,nV=oV.FROM_TL,aV=oV.FROM_BR;Tge.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=mmt(n,t),a=n._infolayer.selectAll("g."+Rs.containerClassName).data(i.length>0?[0]:[]);a.enter().append("g").classed(Rs.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),EI.autoMargin(t,yge(c))}if(a.exit().each(function(){Ug.select(this).selectAll("g."+Rs.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll("g."+Rs.groupClassName).data(i,ymt);s.enter().append("g").classed(Rs.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l<i.length;l++){var u=i[l];_mt(t,u)}s.each(function(c){var f=Ug.select(this);Amt(c),EI.manageCommandObserver(t,c,c._visibleSteps,function(h){var d=f.data()[0];d.active!==h.index&&(d._dragging||xge(t,f,d,h.index,!1,!0))}),xmt(t,Ug.select(this),c)})}};function yge(e){return Rs.autoMarginIdRoot+e._index}function mmt(e,t){for(var r=e[Rs.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&(a._gd=t,n.push(a))}return n}function ymt(e){return e._index}function _mt(e,t){var r=Vg.tester.selectAll("g."+Rs.labelGroupClass).data(t._visibleSteps);r.enter().append("g").classed(Rs.labelGroupClass,!0);var n=0,i=0;r.each(function(v){var m=Ug.select(this),b=_ge(m,{step:v},t),p=b.node();if(p){var k=Vg.bBox(p);i=Math.max(i,k.height),n=Math.max(n,k.width)}}),r.remove();var a=t._dims={};a.inputAreaWidth=Math.max(Rs.railWidth,Rs.gripHeight);var o=e._fullLayout._size;a.lx=o.l+o.w*t.x,a.ly=o.t+o.h*(1-t.y),t.lenmode==="fraction"?a.outerLength=Math.round(o.w*t.len):a.outerLength=t.len,a.inputAreaStart=0,a.inputAreaLength=Math.round(a.outerLength-t.pad.l-t.pad.r);var s=a.inputAreaLength-2*Rs.stepInset,l=s/(t._stepCount-1),u=n+Rs.labelPadding;if(a.labelStride=Math.max(1,Math.ceil(u/l)),a.labelHeight=i,a.currentValueMaxWidth=0,a.currentValueHeight=0,a.currentValueTotalHeight=0,a.currentValueMaxLines=1,t.currentvalue.visible){var c=Vg.tester.append("g");r.each(function(v){var m=kI(c,t,v.label),b=m.node()&&Vg.bBox(m.node())||{width:0,height:0},p=_4.lineCount(m);a.currentValueMaxWidth=Math.max(a.currentValueMaxWidth,Math.ceil(b.width)),a.currentValueHeight=Math.max(a.currentValueHeight,Math.ceil(b.height)),a.currentValueMaxLines=Math.max(a.currentValueMaxLines,p)}),a.currentValueTotalHeight=a.currentValueHeight+t.currentvalue.offset,c.remove()}a.height=a.currentValueTotalHeight+Rs.tickOffset+t.ticklen+Rs.labelOffset+a.labelHeight+t.pad.t+t.pad.b;var f="left";r0.isRightAnchor(t)&&(a.lx-=a.outerLength,f="right"),r0.isCenterAnchor(t)&&(a.lx-=a.outerLength/2,f="center");var h="top";r0.isBottomAnchor(t)&&(a.ly-=a.height,h="bottom"),r0.isMiddleAnchor(t)&&(a.ly-=a.height/2,h="middle"),a.outerLength=Math.ceil(a.outerLength),a.height=Math.ceil(a.height),a.lx=Math.round(a.lx),a.ly=Math.round(a.ly);var d={y:t.y,b:a.height*aV[h],t:a.height*nV[h]};t.lenmode==="fraction"?(d.l=0,d.xl=t.x-t.len*nV[f],d.r=0,d.xr=t.x+t.len*aV[f]):(d.x=t.x,d.l=a.outerLength*nV[f],d.r=a.outerLength*aV[f]),EI.autoMargin(e,yge(t),d)}function xmt(e,t,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),t.call(kI,r).call(Mmt,r).call(wmt,r).call(Tmt,r).call(Smt,e,r).call(bmt,e,r);var n=r._dims;Vg.setTranslate(t,n.lx+r.pad.l,n.ly+r.pad.t),t.call(wge,r,!1),t.call(kI,r)}function kI(e,t,r){if(t.currentvalue.visible){var n=t._dims,i,a;switch(t.currentvalue.xanchor){case"right":i=n.inputAreaLength-Rs.currentValueInset-n.currentValueMaxWidth,a="left";break;case"center":i=n.inputAreaLength*.5,a="middle";break;default:i=Rs.currentValueInset,a="left"}var o=r0.ensureSingle(e,"text",Rs.labelClass,function(h){h.attr({"text-anchor":a,"data-notex":1})}),s=t.currentvalue.prefix?t.currentvalue.prefix:"";if(typeof r=="string")s+=r;else{var l=t.steps[t.active].label,u=t._gd._fullLayout._meta;u&&(l=r0.templateString(l,u)),s+=l}t.currentvalue.suffix&&(s+=t.currentvalue.suffix),o.call(Vg.font,t.currentvalue.font).text(s).call(_4.convertToTspans,t._gd);var c=_4.lineCount(o),f=(n.currentValueMaxLines+1-c)*t.currentvalue.font.size*mge;return _4.positionText(o,i,f),o}}function bmt(e,t,r){var n=r0.ensureSingle(e,"rect",Rs.gripRectClass,function(i){i.call(bge,t,e,r).style("pointer-events","all")});n.attr({width:Rs.gripWidth,height:Rs.gripHeight,rx:Rs.gripRadius,ry:Rs.gripRadius}).call(k_.stroke,r.bordercolor).call(k_.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function _ge(e,t,r){var n=r0.ensureSingle(e,"text",Rs.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),i=t.step.label,a=r._gd._fullLayout._meta;return a&&(i=r0.templateString(i,a)),n.call(Vg.font,r.font).text(i).call(_4.convertToTspans,r._gd),n}function wmt(e,t){var r=r0.ensureSingle(e,"g",Rs.labelsClass),n=t._dims,i=r.selectAll("g."+Rs.labelGroupClass).data(n.labelSteps);i.enter().append("g").classed(Rs.labelGroupClass,!0),i.exit().remove(),i.each(function(a){var o=Ug.select(this);o.call(_ge,a,t),Vg.setTranslate(o,sV(t,a.fraction),Rs.tickOffset+t.ticklen+t.font.size*mge+Rs.labelOffset+n.currentValueTotalHeight)})}function pge(e,t,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&xge(e,t,r,o,!0,i)}function xge(e,t,r,n,i,a){var o=r.active;r.active=n,gmt(e.layout,Rs.name,r).applyUpdate("active",n);var s=r.steps[r.active];t.call(wge,r,a),t.call(kI,r),e.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),s&&s.method&&i&&(t._nextMethod?(t._nextMethod.step=s,t._nextMethod.doCallback=i,t._nextMethod.doTransition=a):(t._nextMethod={step:s,doCallback:i,doTransition:a},t._nextMethodRaf=window.requestAnimationFrame(function(){var l=t._nextMethod.step;l.method&&(l.execute&&EI.executeAPICommand(e,l.method,l.args),t._nextMethod=null,t._nextMethodRaf=null)})))}function bge(e,t,r){if(t._context.staticPlot)return;var n=r.node(),i=Ug.select(t);function a(){return r.data()[0]}function o(){var s=a();t.emit("plotly_sliderstart",{slider:s});var l=r.select("."+Rs.gripRectClass);Ug.event.stopPropagation(),Ug.event.preventDefault(),l.call(k_.fill,s.activebgcolor);var u=gge(s,Ug.mouse(n)[0]);pge(t,r,s,u,!0),s._dragging=!0;function c(){var h=a(),d=gge(h,Ug.mouse(n)[0]);pge(t,r,h,d,!1)}i.on("mousemove",c),i.on("touchmove",c);function f(){var h=a();h._dragging=!1,l.call(k_.fill,h.bgcolor),i.on("mouseup",null),i.on("mousemove",null),i.on("touchend",null),i.on("touchmove",null),t.emit("plotly_sliderend",{slider:h,step:h.steps[h.active]})}i.on("mouseup",f),i.on("touchend",f)}e.on("mousedown",o),e.on("touchstart",o)}function Tmt(e,t){var r=e.selectAll("rect."+Rs.tickRectClass).data(t._visibleSteps),n=t._dims;r.enter().append("rect").classed(Rs.tickRectClass,!0),r.exit().remove(),r.attr({width:t.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(i,a){var o=a%n.labelStride===0,s=Ug.select(this);s.attr({height:o?t.ticklen:t.minorticklen}).call(k_.fill,t.tickcolor),Vg.setTranslate(s,sV(t,a/(t._stepCount-1))-.5*t.tickwidth,(o?Rs.tickOffset:Rs.minorTickOffset)+n.currentValueTotalHeight)})}function Amt(e){var t=e._dims;t.labelSteps=[];for(var r=e._stepCount,n=0;n<r;n+=t.labelStride)t.labelSteps.push({fraction:n/(r-1),step:e._visibleSteps[n]})}function wge(e,t,r){for(var n=e.select("rect."+Rs.gripRectClass),i=0,a=0;a<t._stepCount;a++)if(t._visibleSteps[a]._index===t.active){i=a;break}var o=sV(t,i/(t._stepCount-1));if(!t._invokingCommand){var s=n;r&&t.transition.duration>0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",pmt(o-Rs.gripWidth*.5,t._dims.currentValueTotalHeight))}}function sV(e,t){var r=e._dims;return r.inputAreaStart+Rs.stepInset+(r.inputAreaLength-2*Rs.stepInset)*Math.min(1,Math.max(0,t))}function gge(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Rs.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Rs.stepInset-2*r.inputAreaStart)))}function Smt(e,t,r){var n=r._dims,i=r0.ensureSingle(e,"rect",Rs.railTouchRectClass,function(a){a.call(bge,t,e,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Rs.tickOffset+r.ticklen+n.labelHeight)}).call(k_.fill,r.bgcolor).attr("opacity",0),Vg.setTranslate(i,0,n.currentValueTotalHeight)}function Mmt(e,t){var r=t._dims,n=r.inputAreaLength-Rs.railInset*2,i=r0.ensureSingle(e,"rect",Rs.railRectClass);i.attr({width:n,height:Rs.railWidth,rx:Rs.railRadius,ry:Rs.railRadius,"shape-rendering":"crispEdges"}).call(k_.stroke,t.bordercolor).call(k_.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Vg.setTranslate(i,Rs.railInset,(r.inputAreaWidth-Rs.railWidth)*.5+r.currentValueTotalHeight)}});var Mge=ye((Mlr,Sge)=>{"use strict";var Emt=y4();Sge.exports={moduleType:"component",name:Emt.name,layoutAttributes:iV(),supplyLayoutDefaults:vge(),draw:Age()}});var CI=ye((Elr,kge)=>{"use strict";var Ege=Ih();kge.exports={bgcolor:{valType:"color",dflt:Ege.background,editType:"plot"},bordercolor:{valType:"color",dflt:Ege.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}});var lV=ye((klr,Cge)=>{"use strict";Cge.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}});var LI=ye((Clr,Lge)=>{"use strict";Lge.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}});var Rge=ye(II=>{"use strict";var kmt=hf(),Cmt=Zl(),Pge=LI(),Lmt=Dh().LINE_SPACING,PI=Pge.name;function Ige(e){var t=e&&e[PI];return t&&t.visible}II.isVisible=Ige;II.makeData=function(e){for(var t=kmt.list({_fullLayout:e},"x",!0),r=e.margin,n=[],i=0;i<t.length;i++){var a=t[i];if(Ige(a)){n.push(a);var o=a[PI];o._id=PI+a._id,o._height=(e.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}e._rangeSliderData=n};II.autoMarginOpts=function(e,t){var r=e._fullLayout,n=t[PI],i=t._id.charAt(0),a=0,o=0;if(t.side==="bottom"&&(a=t._depth,t.title.text!==r._dfltTitle[i])){o=1.5*t.title.font.size+10+n._offsetShift;var s=(t.title.text.match(Cmt.BR_TAG_ALL)||[]).length;o+=s*t.title.font.size*Lmt}return{x:0,y:t._counterDomainMin,l:0,r:0,t:0,b:n._height+a+Math.max(r.margin.b,o),pad:Pge.extraPad+n._offsetShift*2}}});var qge=ye((Plr,zge)=>{"use strict";var RI=Pr(),Dge=vl(),Fge=hf(),Pmt=CI(),Imt=lV();zge.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;RI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=Dge.newContainer(a,"rangeslider");function l(L,x){return RI.coerce(o,s,Pmt,L,x)}var u,c;function f(L,x){return RI.coerce(u,c,Imt,L,x)}var h=l("visible");if(h){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!a.isValidRange(o.range)),l("range");var d=r._subplots;if(d)for(var v=d.cartesian.filter(function(L){return L.slice(0,Math.max(0,L.indexOf("y")))===Fge.name2id(n)}).map(function(L){return L.slice(L.indexOf("y"),L.length)}),m=RI.simpleMap(v,Fge.id2name),b=0;b<m.length;b++){var p=m[b];u=o[p]||{},c=Dge.newContainer(s,p,"yaxis");var k=r[p],M;u.range&&k.isValidRange(u.range)&&(M="fixed");var T=f("rangemode",M);T!=="match"&&f("range",k.range.slice())}s._input=o}}});var Bge=ye((Ilr,Oge)=>{"use strict";var Rmt=hf().list,Dmt=Mg().getAutoRange,Fmt=LI();Oge.exports=function(t){for(var r=Rmt(t,"x",!0),n=0;n<r.length;n++){var i=r[n],a=i[Fmt.name];a&&a.visible&&a.autorange&&(a._input.autorange=!0,a._input.range=a.range=Dmt(t,i))}}});var Gge=ye((Rlr,Vge)=>{"use strict";var DI=qa(),zmt=Oa(),qmt=Mc(),Jf=Pr(),FI=Jf.strTranslate,Uge=So(),C_=ka(),Omt=zb(),Bmt=mh(),uV=hf(),Nmt=yv(),Umt=Eg(),rl=LI();Vge.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n<r.length;n++){var i=r[n][rl.name];i._clipId=i._id+"-"+t._uid}function a(s){return s._name}var o=t._infolayer.selectAll("g."+rl.containerClassName).data(r,a);o.exit().each(function(s){var l=s[rl.name];t._topdefs.select("#"+l._clipId).remove()}).remove(),r.length!==0&&(o.enter().append("g").classed(rl.containerClassName,!0).attr("pointer-events","all"),o.each(function(s){var l=DI.select(this),u=s[rl.name],c=t[uV.id2name(s.anchor)],f=u[uV.id2name(s.anchor)];if(u.range){var h=Jf.simpleMap(u.range,s.r2l),d=Jf.simpleMap(s.range,s.r2l),v;d[0]<d[1]?v=[Math.min(h[0],d[0]),Math.max(h[1],d[1])]:v=[Math.max(h[0],d[0]),Math.min(h[1],d[1])],u.range=u._input.range=Jf.simpleMap(v,s.l2r)}s.cleanRange("rangeslider.range");var m=t._size,b=s.domain;u._width=m.w*(b[1]-b[0]);var p=Math.round(m.l+m.w*b[0]),k=Math.round(m.t+m.h*(1-s._counterDomainMin)+(s.side==="bottom"?s._depth:0)+u._offsetShift+rl.extraPad);l.attr("transform",FI(p,k)),u._rl=Jf.simpleMap(u.range,s.r2l);var M=u._rl[0],T=u._rl[1],L=T-M;if(u.p2d=function(G){return G/u._width*L+M},u.d2p=function(G){return(G-M)/L*u._width},s.rangebreaks){var x=s.locateBreaks(M,T);if(x.length){var C,S,g=0;for(C=0;C<x.length;C++)S=x[C],g+=S.max-S.min;var P=u._width/(T-M-g),E=[-P*M];for(C=0;C<x.length;C++)S=x[C],E.push(E[E.length-1]-P*(S.max-S.min));for(u.d2p=function(G){for(var Z=E[0],j=0;j<x.length;j++){var N=x[j];if(G>=N.max)Z=E[j+1];else if(G<N.min)break}return Z+P*G},C=0;C<x.length;C++)S=x[C],S.pmin=u.d2p(S.min),S.pmax=u.d2p(S.max);u.p2d=function(G){for(var Z=E[0],j=0;j<x.length;j++){var N=x[j];if(G>=N.pmax)Z=E[j+1];else if(G<N.pmin)break}return(G-Z)/P}}}if(f.rangemode!=="match"){var z=c.r2l(f.range[0]),q=c.r2l(f.range[1]),U=q-z;u.d2pOppAxis=function(G){return(G-z)/U*u._height}}l.call(jmt,e,s,u).call(Wmt,e,s,u).call(Xmt,e,s,u).call(Ymt,e,s,u,f).call(Kmt,e,s,u).call(Jmt,e,s,u),Vmt(l,e,s,u),Hmt(l,e,s,u,c,f),s.side==="bottom"&&Omt.draw(e,s._id+"title",{propContainer:s,propName:s._name+".title.text",placeholder:t._dfltTitle.x,attributes:{x:s._offset+s._length/2,y:k+u._height+u._offsetShift+10+1.5*s.title.font.size,"text-anchor":"middle"}})}))};function Nge(e){return typeof e.clientX=="number"?e.clientX:e.touches&&e.touches.length>0?e.touches[0].clientX:0}function Vmt(e,t,r,n){if(t._context.staticPlot)return;var i=e.select("rect."+rl.slideBoxClassName).node(),a=e.select("rect."+rl.grabAreaMinClassName).node(),o=e.select("rect."+rl.grabAreaMaxClassName).node();function s(){var l=DI.event,u=l.target,c=Nge(l),f=c-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),v=Nmt.coverSlip();this.addEventListener("touchmove",m),this.addEventListener("touchend",b),v.addEventListener("mousemove",m),v.addEventListener("mouseup",b);function m(p){var k=Nge(p),M=+k-c,T,L,x;switch(u){case i:if(x="ew-resize",h+M>r._length||d+M<0)return;T=h+M,L=d+M;break;case a:if(x="col-resize",h+M>r._length)return;T=h+M,L=d;break;case o:if(x="col-resize",d+M<0)return;T=h,L=d+M;break;default:x="ew-resize",T=f,L=f+M;break}if(L<T){var C=L;L=T,T=C}n._pixelMin=T,n._pixelMax=L,Umt(DI.select(v),x),Gmt(e,t,r,n)}function b(){v.removeEventListener("mousemove",m),v.removeEventListener("mouseup",b),this.removeEventListener("touchmove",m),this.removeEventListener("touchend",b),Jf.removeElement(v)}}e.on("mousedown",s),e.on("touchstart",s)}function Gmt(e,t,r,n){function i(s){return r.l2r(Jf.constrain(s,n._rl[0],n._rl[1]))}var a=i(n.p2d(n._pixelMin)),o=i(n.p2d(n._pixelMax));window.requestAnimationFrame(function(){zmt.call("_guiRelayout",t,r._name+".range",[a,o])})}function Hmt(e,t,r,n,i,a){var o=rl.handleWidth/2;function s(p){return Jf.constrain(p,0,n._width)}function l(p){return Jf.constrain(p,0,n._height)}function u(p){return Jf.constrain(p,-o,n._width+o)}var c=s(n.d2p(r._rl[0])),f=s(n.d2p(r._rl[1]));if(e.select("rect."+rl.slideBoxClassName).attr("x",c).attr("width",f-c),e.select("rect."+rl.maskMinClassName).attr("width",c),e.select("rect."+rl.maskMaxClassName).attr("x",f).attr("width",n._width-f),a.rangemode!=="match"){var h=n._height-l(n.d2pOppAxis(i._rl[1])),d=n._height-l(n.d2pOppAxis(i._rl[0]));e.select("rect."+rl.maskMinOppAxisClassName).attr("x",c).attr("height",h).attr("width",f-c),e.select("rect."+rl.maskMaxOppAxisClassName).attr("x",c).attr("y",d).attr("height",n._height-d).attr("width",f-c),e.select("rect."+rl.slideBoxClassName).attr("y",h).attr("height",d-h)}var v=.5,m=Math.round(u(c-o))-v,b=Math.round(u(f-o))+v;e.select("g."+rl.grabberMinClassName).attr("transform",FI(m,v)),e.select("g."+rl.grabberMaxClassName).attr("transform",FI(b,v))}function jmt(e,t,r,n){var i=Jf.ensureSingle(e,"rect",rl.bgClassName,function(l){l.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),a=n.borderwidth%2===0?n.borderwidth:n.borderwidth-1,o=-n._offsetShift,s=Uge.crispRound(t,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:FI(o,o),"stroke-width":s}).call(C_.stroke,n.bordercolor).call(C_.fill,n.bgcolor)}function Wmt(e,t,r,n){var i=t._fullLayout,a=Jf.ensureSingleById(i._topdefs,"clipPath",n._clipId,function(o){o.append("rect").attr({x:0,y:0})});a.select("rect").attr({width:n._width,height:n._height})}function Xmt(e,t,r,n){var i=t.calcdata,a=e.selectAll("g."+rl.rangePlotClassName).data(r._subplotsWith,Jf.identity);a.enter().append("g").attr("class",function(s){return rl.rangePlotClassName+" "+s}).call(Uge.setClipUrl,n._clipId,t),a.order(),a.exit().remove();var o;a.each(function(s,l){var u=DI.select(this),c=l===0,f=uV.getFromId(t,s,"y"),h=f._name,d=n[h],v={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:n.range.slice(),calendar:r.calendar},width:n._width,height:n._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};r.rangebreaks&&(v.layout.xaxis.rangebreaks=r.rangebreaks),v.layout[h]={type:f.type,domain:[0,1],range:d.rangemode!=="match"?d.range.slice():f.range.slice(),calendar:f.calendar},f.rangebreaks&&(v.layout[h].rangebreaks=f.rangebreaks),qmt.supplyDefaults(v);var m=v._fullLayout.xaxis,b=v._fullLayout[h];m.clearCalc(),m.setScale(),b.clearCalc(),b.setScale();var p={id:s,plotgroup:u,xaxis:m,yaxis:b,isRangePlot:!0};c?o=p:(p.mainplot="xy",p.mainplotinfo=o),Bmt.rangePlot(t,p,Zmt(i,s))})}function Zmt(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 Ymt(e,t,r,n,i){var a=Jf.ensureSingle(e,"rect",rl.maskMinClassName,function(u){u.attr({x:0,y:0,"shape-rendering":"crispEdges"})});a.attr("height",n._height).call(C_.fill,rl.maskColor);var o=Jf.ensureSingle(e,"rect",rl.maskMaxClassName,function(u){u.attr({y:0,"shape-rendering":"crispEdges"})});if(o.attr("height",n._height).call(C_.fill,rl.maskColor),i.rangemode!=="match"){var s=Jf.ensureSingle(e,"rect",rl.maskMinOppAxisClassName,function(u){u.attr({y:0,"shape-rendering":"crispEdges"})});s.attr("width",n._width).call(C_.fill,rl.maskOppAxisColor);var l=Jf.ensureSingle(e,"rect",rl.maskMaxOppAxisClassName,function(u){u.attr({y:0,"shape-rendering":"crispEdges"})});l.attr("width",n._width).style("border-top",rl.maskOppBorder).call(C_.fill,rl.maskOppAxisColor)}}function Kmt(e,t,r,n){if(!t._context.staticPlot){var i=Jf.ensureSingle(e,"rect",rl.slideBoxClassName,function(a){a.attr({y:0,cursor:rl.slideBoxCursor,"shape-rendering":"crispEdges"})});i.attr({height:n._height,fill:rl.slideBoxFill})}}function Jmt(e,t,r,n){var i=Jf.ensureSingle(e,"g",rl.grabberMinClassName),a=Jf.ensureSingle(e,"g",rl.grabberMaxClassName),o={x:0,width:rl.handleWidth,rx:rl.handleRadius,fill:C_.background,stroke:C_.defaultLine,"stroke-width":rl.handleStrokeWidth,"shape-rendering":"crispEdges"},s={y:Math.round(n._height/4),height:Math.round(n._height/2)},l=Jf.ensureSingle(i,"rect",rl.handleMinClassName,function(d){d.attr(o)});l.attr(s);var u=Jf.ensureSingle(a,"rect",rl.handleMaxClassName,function(d){d.attr(o)});u.attr(s);var c={width:rl.grabAreaWidth,x:0,y:0,fill:rl.grabAreaFill,cursor:t._context.staticPlot?void 0:rl.grabAreaCursor},f=Jf.ensureSingle(i,"rect",rl.grabAreaMinClassName,function(d){d.attr(c)});f.attr("height",n._height);var h=Jf.ensureSingle(a,"rect",rl.grabAreaMaxClassName,function(d){d.attr(c)});h.attr("height",n._height)}});var jge=ye((Dlr,Hge)=>{"use strict";var $mt=Pr(),Qmt=CI(),eyt=lV(),cV=Rge();Hge.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:$mt.extendFlat({},Qmt,{yaxis:eyt})}}},layoutAttributes:CI(),handleDefaults:qge(),calcAutorange:Bge(),draw:Gge(),isVisible:cV.isVisible,makeData:cV.makeData,autoMarginOpts:cV.autoMarginOpts}});var zI=ye((Flr,Xge)=>{"use strict";var tyt=ec(),Wge=Ih(),ryt=vl().templatedArray,iyt=ryt("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});Xge.exports={visible:{valType:"boolean",editType:"plot"},buttons:iyt,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:tyt({editType:"plot"}),bgcolor:{valType:"color",dflt:Wge.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Wge.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var fV=ye((zlr,Zge)=>{"use strict";Zge.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Jge=ye((qlr,Kge)=>{"use strict";var qI=Pr(),nyt=ka(),ayt=vl(),oyt=Zd(),Yge=zI(),hV=fV();Kge.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=ayt.newContainer(r,"rangeselector");function l(d,v){return qI.coerce(o,s,Yge,d,v)}var u=oyt(o,s,{name:"buttons",handleItemDefaults:syt,calendar:a}),c=l("visible",u.length>0);if(c){var f=lyt(r,n,i);l("x",f[0]),l("y",f[1]),qI.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),qI.coerceFont(l,"font",n.font);var h=l("bgcolor");l("activecolor",nyt.contrast(h,hV.lightAmount,hV.darkAmount)),l("bordercolor"),l("borderwidth")}};function syt(e,t,r,n){var i=n.calendar;function a(l,u){return qI.coerce(e,t,Yge.buttons,l,u)}var o=a("visible");if(o){var s=a("step");s!=="all"&&(i&&i!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":a("stepmode"),a("count")),a("label")}}function lyt(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),i=0,a=0;a<n.length;a++){var o=t[n[a]].domain;o&&(i=Math.max(o[1],i))}return[e.domain[0],i+hV.yPad]}});var Qge=ye((Olr,$ge)=>{"use strict";var uyt=Sq(),cyt=Pr().titleCase;$ge.exports=function(t,r){var n=t._name,i={};if(r.step==="all")i[n+".autorange"]=!0;else{var a=fyt(t,r);i[n+".range[0]"]=a[0],i[n+".range[1]"]=a[1]}return i};function fyt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=uyt["utc"+cyt(i)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+a.offset(n,-o));break;case"todate":var l=a.offset(n,-o);s=e.l2r(+a.ceil(l));break}var u=r[1];return[s,u]}});var sme=ye((Blr,ome)=>{"use strict";var BI=qa(),hyt=Oa(),dyt=Mc(),eme=ka(),ame=So(),Ny=Pr(),tme=Ny.strTranslate,OI=Zl(),vyt=hf(),pV=Dh(),rme=pV.LINE_SPACING,ime=pV.FROM_TL,nme=pV.FROM_BR,vV=fV(),pyt=Qge();ome.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(gyt(t),myt);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(i){var a=BI.select(this),o=i,s=o.rangeselector,l=a.selectAll("g.button").data(Ny.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=BI.select(this),f=pyt(o,u);u._isActive=yyt(o,u,f),c.call(dV,s,u),c.call(xyt,s,u,t),c.on("click",function(){t._dragged||hyt.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(dV,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(dV,s,u)})}),wyt(t,l,s,o._name,a)})};function gyt(e){for(var t=vyt.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 myt(e){return e._id}function yyt(e,t,r){if(t.step==="all")return e.autorange===!0;var n=Object.keys(r);return e.range[0]===r[n[0]]&&e.range[1]===r[n[1]]}function dV(e,t,r){var n=Ny.ensureSingle(e,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});n.attr({rx:vV.rx,ry:vV.ry}),n.call(eme.stroke,t.bordercolor).call(eme.fill,_yt(t,r)).style("stroke-width",t.borderwidth+"px")}function _yt(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}function xyt(e,t,r,n){function i(o){OI.convertToTspans(o,n)}var a=Ny.ensureSingle(e,"text","selector-text",function(o){o.attr("text-anchor","middle")});a.call(ame.font,t.font).text(byt(r,n._fullLayout._meta)).call(i)}function byt(e,t){return e.label?t?Ny.templateString(e.label,t):e.label:e.step==="all"?"all":e.count+e.step.charAt(0)}function wyt(e,t,r,n,i){var a=0,o=0,s=r.borderwidth;t.each(function(){var d=BI.select(this),v=d.select(".selector-text"),m=r.font.size*rme,b=Math.max(m*OI.lineCount(v),16)+3;o=Math.max(o,b)}),t.each(function(){var d=BI.select(this),v=d.select(".selector-rect"),m=d.select(".selector-text"),b=m.node()&&ame.bBox(m.node()).width,p=r.font.size*rme,k=OI.lineCount(m),M=Math.max(b+10,vV.minButtonWidth);d.attr("transform",tme(s+a,s)),v.attr({x:0,y:0,width:M,height:o}),OI.positionText(m,M/2,o/2-(k-1)*p/2+3),a+=M+5});var l=e._fullLayout._size,u=l.l+l.w*r.x,c=l.t+l.h*(1-r.y),f="left";Ny.isRightAnchor(r)&&(u-=a,f="right"),Ny.isCenterAnchor(r)&&(u-=a/2,f="center");var h="top";Ny.isBottomAnchor(r)&&(c-=o,h="bottom"),Ny.isMiddleAnchor(r)&&(c-=o/2,h="middle"),a=Math.ceil(a),o=Math.ceil(o),u=Math.round(u),c=Math.round(c),dyt.autoMargin(e,n+"-range-selector",{x:r.x,y:r.y,l:a*ime[f],r:a*nme[f],b:o*nme[h],t:o*ime[h]}),i.attr("transform",tme(u,c))}});var ume=ye((Nlr,lme)=>{"use strict";lme.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:zI()}}},layoutAttributes:zI(),handleDefaults:Jge(),draw:sme()}});var Cc=ye(gV=>{"use strict";var cme=Ao().extendFlat;gV.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+" ":"",i=e.trace?"trace ":"subplot ",a=t.description?" "+t.description:"",o={x:cme({},r,{}),y:cme({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:e.editType},o.column={valType:"integer",min:0,dflt:0,editType:e.editType}),o};gV.defaults=function(e,t,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s<o.columns?i=o._domains.x[s]:delete e.domain.column);var l=r("domain.row");l!==void 0&&(l<o.rows?a=o._domains.y[l]:delete e.domain.row)}var u=r("domain.x",i),c=r("domain.y",a);u[0]<u[1]||(e.domain.x=i.slice()),c[0]<c[1]||(e.domain.y=a.slice())}});var yV=ye((Vlr,vme)=>{"use strict";var Tyt=Pr(),Ayt=g3().counter,Syt=Cc().attributes,fme=Rh().idRegex,Myt=vl(),mV={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[Ayt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[fme.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[fme.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:Syt({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function NI(e,t,r){var n=t[r+"axes"],i=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(i.length)return i}function Eyt(e,t){var r=e.grid||{},n=NI(t,r,"x"),i=NI(t,r,"y");if(!e.grid&&!n&&!i)return;var a=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(i),l=o&&n!==r.xaxes&&s&&i!==r.yaxes,u,c;a?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=i.length),o&&(c=n.length));var f=Myt.newContainer(t,"grid");function h(x,C){return Tyt.coerce(r,f,mV,x,C)}var d=h("rows",u),v=h("columns",c);if(!(d*v>1)){delete t.grid;return}if(!a&&!o&&!s){var m=h("pattern")==="independent";m&&(a=!0)}f._hasSubplotGrid=a;var b=h("roworder"),p=b==="top to bottom",k=a?.2:.1,M=a?.3:.1,T,L;l&&t._splomGridDflt&&(T=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:hme("x",h,k,T,v),y:hme("y",h,M,L,d,p)}}function hme(e,t,r,n,i,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h<i;h++){var d=u+c*h;l[a?i-1-h:h]=[d,d+f]}return l}function kyt(e,t){var r=t.grid;if(!(!r||!r._domains)){var n=e.grid||{},i=t._subplots,a=r._hasSubplotGrid,o=r.rows,s=r.columns,l=r.pattern==="independent",u,c,f,h,d,v,m,b=r._axisMap={};if(a){var p=n.subplots||[];v=r.subplots=new Array(o);var k=1;for(u=0;u<o;u++){var M=v[u]=new Array(s),T=p[u]||[];for(c=0;c<s;c++)if(l?(d=k===1?"xy":"x"+k+"y"+k,k++):d=T[c],M[c]="",i.cartesian.indexOf(d)!==-1){if(m=d.indexOf("y"),f=d.slice(0,m),h=d.slice(m),b[f]!==void 0&&b[f]!==c||b[h]!==void 0&&b[h]!==u)continue;M[c]=d,b[f]=c,b[h]=u}}}else{var L=NI(t,n,"x"),x=NI(t,n,"y");r.xaxes=dme(L,i.xaxis,s,b,"x"),r.yaxes=dme(x,i.yaxis,o,b,"y")}var C=r._anchors={},S=r.roworder==="top to bottom";for(var g in b){var P=g.charAt(0),E=r[P+"side"],z,q,U;if(E.length<8)C[g]="free";else if(P==="x"){if(E.charAt(0)==="t"===S?(z=0,q=1,U=o):(z=o-1,q=-1,U=-1),a){var G=b[g];for(u=z;u!==U;u+=q)if(d=v[u][G],!!d&&(m=d.indexOf("y"),d.slice(0,m)===g)){C[g]=d.slice(m);break}}else for(u=z;u!==U;u+=q)if(h=r.yaxes[u],i.cartesian.indexOf(g+h)!==-1){C[g]=h;break}}else if(E.charAt(0)==="l"?(z=0,q=1,U=s):(z=s-1,q=-1,U=-1),a){var Z=b[g];for(u=z;u!==U;u+=q)if(d=v[Z][u],!!d&&(m=d.indexOf("y"),d.slice(m)===g)){C[g]=d.slice(0,m);break}}else for(u=z;u!==U;u+=q)if(f=r.xaxes[u],i.cartesian.indexOf(f+g)!==-1){C[g]=f;break}}}}function dme(e,t,r,n,i){var a=new Array(r),o;function s(l,u){t.indexOf(u)!==-1&&n[u]===void 0?(a[l]=u,n[u]=l):a[l]=""}if(Array.isArray(e))for(o=0;o<r;o++)s(o,e[o]);else for(s(0,i),o=1;o<r;o++)s(o,i+(o+1));return a}vme.exports={moduleType:"component",name:"grid",schema:{layout:{grid:mV}},layoutAttributes:mV,sizeDefaults:Eyt,contentDefaults:kyt}});var _V=ye((Glr,pme)=>{"use strict";pme.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}});var yme=ye((Hlr,mme)=>{"use strict";var gme=Eo(),Cyt=Oa(),Lyt=Pr(),Pyt=vl(),Iyt=_V();mme.exports=function(e,t,r,n){var i="error_"+n.axis,a=Pyt.newContainer(t,i),o=e[i]||{};function s(v,m){return Lyt.coerce(o,a,Iyt,v,m)}var l=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=s("visible",l);if(u!==!1){var c=s("type","array"in o?"data":"percent"),f=!0;c!=="sqrt"&&(f=s("symmetric",!((c==="data"?"arrayminus":"valueminus")in o))),c==="data"?(s("array"),s("traceref"),f||(s("arrayminus"),s("tracerefminus"))):(c==="percent"||c==="constant")&&(s("value"),f||s("valueminus"));var h="copy_"+n.inherit+"style";if(n.inherit){var d=t["error_"+n.inherit];(d||{}).visible&&s(h,!(o.color||gme(o.thickness)||gme(o.width)))}(!n.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",Cyt.traceIs(t,"gl3d")?0:4))}}});var xV=ye((jlr,xme)=>{"use strict";xme.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var i=t.array||[];if(n)return function(u,c){var f=+i[c];return[f,f]};var a=t.arrayminus||[];return function(u,c){var f=+i[c],h=+a[c];return!isNaN(f)||!isNaN(h)?[h||0,f||0]:[NaN,NaN]}}else{var o=_me(r,t.value),s=_me(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function _me(e,t){if(e==="percent")return function(r){return Math.abs(r*t/100)};if(e==="constant")return function(){return Math.abs(t)};if(e==="sqrt")return function(r){return Math.sqrt(Math.abs(r))}}});var Tme=ye((Wlr,wme)=>{"use strict";var bV=Eo(),Ryt=Oa(),wV=ho(),Dyt=Pr(),Fyt=xV();wme.exports=function(t){for(var r=t.calcdata,n=0;n<r.length;n++){var i=r[n],a=i[0].trace;if(a.visible===!0&&Ryt.traceIs(a,"errorBarsOK")){var o=wV.getFromId(t,a.xaxis),s=wV.getFromId(t,a.yaxis);bme(i,a,o,"x"),bme(i,a,s,"y")}}};function bme(e,t,r,n){var i=t["error_"+n]||{},a=i.visible&&["linear","log"].indexOf(r.type)!==-1,o=[];if(a){for(var s=Fyt(i),l=0;l<e.length;l++){var u=e[l],c=u.i;if(c===void 0)c=l;else if(c===null)continue;var f=u[n];if(bV(r.c2l(f))){var h=s(f,c);if(bV(h[0])&&bV(h[1])){var d=u[n+"s"]=f-h[0],v=u[n+"h"]=f+h[1];o.push(d,v)}}}var m=r._id,b=t._extremes[m],p=wV.findExtremes(r,o,Dyt.extendFlat({tozero:b.opts.tozero},{padded:!0}));b.min=b.min.concat(p.min),b.max=b.max.concat(p.max)}}});var Mme=ye((Xlr,Sme)=>{"use strict";var Ame=qa(),L_=Eo(),zyt=So(),qyt=Ru();Sme.exports=function(t,r,n,i){var a,o=n.xaxis,s=n.yaxis,l=i&&i.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,h=f.error_x||{},d=f.error_y||{},v;f.ids&&(v=function(k){return k.id});var m=qyt.hasMarkers(f)&&f.marker.maxdisplayed>0;!d.visible&&!h.visible&&(c=[]);var b=Ame.select(this).selectAll("g.errorbar").data(c,v);if(b.exit().remove(),!!c.length){h.visible||b.selectAll("path.xerror").remove(),d.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var p=b.enter().append("g").classed("errorbar",!0);l&&p.style("opacity",0).transition().duration(i.duration).style("opacity",1),zyt.setClipUrl(b,n.layerClipId,t),b.each(function(k){var M=Ame.select(this),T=Oyt(k,o,s);if(!(m&&!k.vis)){var L,x=M.select("path.yerror");if(d.visible&&L_(T.x)&&L_(T.yh)&&L_(T.ys)){var C=d.width;L="M"+(T.x-C)+","+T.yh+"h"+2*C+"m-"+C+",0V"+T.ys,T.noYS||(L+="m-"+C+",0h"+2*C),a=!x.size(),a?x=M.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(x=x.transition().duration(i.duration).ease(i.easing)),x.attr("d",L)}else x.remove();var S=M.select("path.xerror");if(h.visible&&L_(T.y)&&L_(T.xh)&&L_(T.xs)){var g=(h.copy_ystyle?d:h).width;L="M"+T.xh+","+(T.y-g)+"v"+2*g+"m0,-"+g+"H"+T.xs,T.noXS||(L+="m0,-"+g+"v"+2*g),a=!S.size(),a?S=M.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(S=S.transition().duration(i.duration).ease(i.easing)),S.attr("d",L)}else S.remove()}})}})};function Oyt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),L_(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),L_(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var Cme=ye((Zlr,kme)=>{"use strict";var Byt=qa(),Eme=ka();kme.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Byt.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(Eme.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(Eme.stroke,a.color)})}});var Ime=ye((Ylr,Pme)=>{"use strict";var x4=Pr(),Lme=mc().overrideAll,b4=_V(),u2={error_x:x4.extendFlat({},b4),error_y:x4.extendFlat({},b4)};delete u2.error_x.copy_zstyle;delete u2.error_y.copy_zstyle;delete u2.error_y.copy_ystyle;var w4={error_x:x4.extendFlat({},b4),error_y:x4.extendFlat({},b4),error_z:x4.extendFlat({},b4)};delete w4.error_x.copy_ystyle;delete w4.error_y.copy_ystyle;delete w4.error_z.copy_ystyle;delete w4.error_z.copy_zstyle;Pme.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:u2,bar:u2,histogram:u2,scatter3d:Lme(w4,"calc","nested"),scattergl:Lme(u2,"calc","nested")}},supplyDefaults:yme(),calc:Tme(),makeComputeError:xV(),plot:Mme(),style:Cme(),hoverInfo:Nyt};function Nyt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var Dme=ye((Klr,Rme)=>{"use strict";Rme.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}});var Ume=ye((Jlr,Nme)=>{"use strict";var P_=qa(),TV=fd(),VI=Mc(),Fme=Oa(),Uy=ho(),UI=yv(),U0=Pr(),Hg=U0.strTranslate,Bme=Ao().extendFlat,AV=Eg(),Gg=So(),SV=ka(),Uyt=zb(),Vyt=Zl(),Gyt=pv().flipScale,Hyt=f4(),jyt=dI(),Wyt=Rd(),MV=Dh(),zme=MV.LINE_SPACING,qme=MV.FROM_TL,Ome=MV.FROM_BR,gf=Dme().cn;function Xyt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+gf.colorbar).data(Zyt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(gf.colorbar,!0),r.each(function(n){var i=P_.select(this);U0.ensureSingle(i,"rect",gf.cbbg),U0.ensureSingle(i,"g",gf.cbfills),U0.ensureSingle(i,"g",gf.cblines),U0.ensureSingle(i,"g",gf.cbaxis,function(o){o.classed(gf.crisp,!0)}),U0.ensureSingle(i,"g",gf.cbtitleunshift,function(o){o.append("g").classed(gf.cbtitle,!0)}),U0.ensureSingle(i,"rect",gf.cboutline);var a=Yyt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&Kyt(i,n,e)}),r.exit().each(function(n){VI.autoMargin(e,n._id)}).remove(),r.order()}function Zyt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function l(M){return Bme(M,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,i):(i._fillgradient=a.reversescale?Gyt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var c=0;c<r.length;c++){var f=r[c];if(o=f[0].trace,!!o._module){var h=o._module.colorbar;if(o.visible===!0&&h)for(var d=Array.isArray(h),v=d?h:[h],m=0;m<v.length;m++){s=v[m];var b=s.container;a=b?o[b]:o,a&&a.showscale&&(i=l(a.colorbar),i._id="cb"+o.uid+(d&&b?"-"+b:""),i._traceIndex=o.index,i._propPrefix=(b?b+".":"")+"colorbar.",i._meta=o._meta,u(),n.push(i))}}}for(var p in t._colorAxes)if(a=t[p],a.showscale){var k=t._colorAxes[p];i=l(a.colorbar),i._id="cb"+p,i._propPrefix=p+".colorbar.",i._meta=t._meta,s={min:"cmin",max:"cmax"},k[0]!=="heatmap"&&(o=k[1],s.calc=o._module.colorbar.calc),u(),n.push(i)}return n}function Yyt(e,t,r){var n=t.orientation==="v",i=t.len,a=t.lenmode,o=t.thickness,s=t.thicknessmode,l=t.outlinewidth,u=t.borderwidth,c=t.bgcolor,f=t.xanchor,h=t.yanchor,d=t.xpad,v=t.ypad,m=t.x,b=n?t.y:1-t.y,p=t.yref==="paper",k=t.xref==="paper",M=r._fullLayout,T=M._size,L=t._fillcolor,x=t._line,C=t.title,S=C.side,g=t._zrange||P_.extent((typeof L=="function"?L:x.color).domain()),P=typeof x.color=="function"?x.color:function(){return x.color},E=typeof L=="function"?L:function(){return L},z=t._levels,q=Jyt(r,t,g),U=q.fill,G=q.line,Z=Math.round(o*(s==="fraction"?n?T.w:T.h:1)),j=Z/(n?T.w:T.h),N=Math.round(i*(a==="fraction"?n?T.h:T.w:1)),H=N/(n?T.h:T.w),re=k?T.w:r._fullLayout.width,oe=p?T.h:r._fullLayout.height,_e=Math.round(n?m*re+d:b*oe+v),ke={center:.5,right:1}[f]||0,Ce={top:1,middle:.5}[h]||0,ge=n?m-ke*j:b-Ce*j,ie=n?b-Ce*H:m-ke*H,Se=Math.round(n?oe*(1-ie):re*ie);t._lenFrac=H,t._thickFrac=j,t._uFrac=ge,t._vFrac=ie;var Ee=t._axis=$yt(r,t,g);Ee.position=j+(n?m+d/T.w:b+v/T.h);var we=["top","bottom"].indexOf(S)!==-1;if(n&&we&&(Ee.title.side=S,Ee.titlex=m+d/T.w,Ee.titley=ie+(C.side==="top"?H-v/T.h:v/T.h)),!n&&!we&&(Ee.title.side=S,Ee.titley=b+v/T.h,Ee.titlex=ie+d/T.w),x.color&&t.tickmode==="auto"){Ee.tickmode="linear",Ee.tick0=z.start;var De=z.size,Le=U0.constrain(N/50,4,15)+1,me=(g[1]-g[0])/((t.nticks||Le)*De);if(me>1){var Pe=Math.pow(10,Math.floor(Math.log(me)/Math.LN10));De*=Pe*U0.roundUp(me/Pe,[2,5,10]),(Math.abs(z.start)/z.size+1e-6)%1<2e-6&&(Ee.tick0=0)}Ee.dtick=De}Ee.domain=n?[ie+v/T.h,ie+H-v/T.h]:[ie+d/T.w,ie+H-d/T.w],Ee.setScale(),e.attr("transform",Hg(Math.round(T.l),Math.round(T.t)));var ce=e.select("."+gf.cbtitleunshift).attr("transform",Hg(-Math.round(T.l),-Math.round(T.t))),He=Ee.ticklabelposition,lt=Ee.title.font.size,mt=e.select("."+gf.cbaxis),Vt,st=0,ct=0;function Qt(Ue,Ae){var rt={propContainer:Ee,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:M._dfltTitle.colorbar,containerGroup:e.select("."+gf.cbtitle)},St=Ue.charAt(0)==="h"?Ue.slice(1):"h"+Ue;e.selectAll("."+St+",."+St+"-math-group").remove(),Uyt.draw(r,Ue,Bme(rt,Ae||{}))}function Ht(){if(n&&we||!n&&!we){var Ue,Ae;S==="top"&&(Ue=d+T.l+re*m,Ae=v+T.t+oe*(1-ie-H)+3+lt*.75),S==="bottom"&&(Ue=d+T.l+re*m,Ae=v+T.t+oe*(1-ie)-3-lt*.25),S==="right"&&(Ae=v+T.t+oe*b+3+lt*.75,Ue=d+T.l+re*ie),Qt(Ee._id+"title",{attributes:{x:Ue,y:Ae,"text-anchor":n?"start":"middle"}})}}function nr(){if(n&&!we||!n&&we){var Ue=Ee.position||0,Ae=Ee._offset+Ee._length/2,rt,St;if(S==="right")St=Ae,rt=T.l+re*Ue+10+lt*(Ee.showticklabels?1:.5);else if(rt=Ae,S==="bottom"&&(St=T.t+oe*Ue+10+(He.indexOf("inside")===-1?Ee.tickfont.size:0)+(Ee.ticks!=="inside"&&t.ticklen||0)),S==="top"){var Tt=C.text.split("<br>").length;St=T.t+oe*Ue+10-Z-zme*lt*Tt}Qt((n?"h":"v")+Ee._id+"title",{avoid:{selection:P_.select(r).selectAll("g."+Ee._id+"tick"),side:S,offsetTop:n?0:T.t,offsetLeft:n?T.l:0,maxShift:n?M.width:M.height},attributes:{x:rt,y:St,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function tt(){if(!n&&!we||n&&we){var Ue=e.select("."+gf.cbtitle),Ae=Ue.select("text"),rt=[-l/2,l/2],St=Ue.select(".h"+Ee._id+"title-math-group").node(),Tt=15.6;Ae.node()&&(Tt=parseInt(Ae.node().style.fontSize,10)*zme);var dt;if(St?(dt=Gg.bBox(St),ct=dt.width,st=dt.height,st>Tt&&(rt[1]-=(st-Tt)/2)):Ae.node()&&!Ae.classed(gf.jsPlaceholder)&&(dt=Gg.bBox(Ae.node()),ct=dt.width,st=dt.height),n){if(st){if(st+=5,S==="top")Ee.domain[1]-=st/T.h,rt[1]*=-1;else{Ee.domain[0]+=st/T.h;var Et=Vyt.lineCount(Ae);rt[1]+=(1-Et)*Tt}Ue.attr("transform",Hg(rt[0],rt[1])),Ee.setScale()}}else ct&&(S==="right"&&(Ee.domain[0]+=(ct+lt/2)/T.w),Ue.attr("transform",Hg(rt[0],rt[1])),Ee.setScale())}e.selectAll("."+gf.cbfills+",."+gf.cblines).attr("transform",n?Hg(0,Math.round(T.h*(1-Ee.domain[1]))):Hg(Math.round(T.w*Ee.domain[0]),0)),mt.attr("transform",n?Hg(0,Math.round(-T.t)):Hg(Math.round(-T.l),0));var pt=e.select("."+gf.cbfills).selectAll("rect."+gf.cbfill).attr("style","").data(U);pt.enter().append("rect").classed(gf.cbfill,!0).attr("style",""),pt.exit().remove();var Xt=g.map(Ee.c2p).map(Math.round).sort(function(qr,jr){return qr-jr});pt.each(function(qr,jr){var gt=[jr===0?g[0]:(U[jr]+U[jr-1])/2,jr===U.length-1?g[1]:(U[jr]+U[jr+1])/2].map(Ee.c2p).map(Math.round);n&&(gt[1]=U0.constrain(gt[1]+(gt[1]>gt[0])?1:-1,Xt[0],Xt[1]));var Ge=P_.select(this).attr(n?"x":"y",_e).attr(n?"y":"x",P_.min(gt)).attr(n?"width":"height",Math.max(Z,2)).attr(n?"height":"width",Math.max(P_.max(gt)-P_.min(gt),2));if(t._fillgradient)Gg.gradient(Ge,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Je=E(qr).replace("e-","");Ge.attr("fill",TV(Je).toHexString())}});var or=e.select("."+gf.cblines).selectAll("path."+gf.cbline).data(x.color&&x.width?G:[]);or.enter().append("path").classed(gf.cbline,!0),or.exit().remove(),or.each(function(qr){var jr=_e,gt=Math.round(Ee.c2p(qr))+x.width/2%1;P_.select(this).attr("d","M"+(n?jr+","+gt:gt+","+jr)+(n?"h":"v")+Z).call(Gg.lineGroupStyle,x.width,P(qr),x.dash)}),mt.selectAll("g."+Ee._id+"tick,path").remove();var _r=_e+Z+(l||0)/2-(t.ticks==="outside"?1:0),Er=Uy.calcTicks(Ee),ei=Uy.getTickSigns(Ee)[2];return Uy.drawTicks(r,Ee,{vals:Ee.ticks==="inside"?Uy.clipEnds(Ee,Er):Er,layer:mt,path:Uy.makeTickPath(Ee,_r,ei),transFn:Uy.makeTransTickFn(Ee)}),Uy.drawLabels(r,Ee,{vals:Er,layer:mt,transFn:Uy.makeTransTickLabelFn(Ee),labelFns:Uy.makeLabelFns(Ee,_r)})}function je(){var Ue,Ae=Z+l/2;He.indexOf("inside")===-1&&(Ue=Gg.bBox(mt.node()),Ae+=n?Ue.width:Ue.height),Vt=ce.select("text");var rt=0,St=n&&S==="top",Tt=!n&&S==="right",dt=0;if(Vt.node()&&!Vt.classed(gf.jsPlaceholder)){var Et,pt=ce.select(".h"+Ee._id+"title-math-group").node();pt&&(n&&we||!n&&!we)?(Ue=Gg.bBox(pt),rt=Ue.width,Et=Ue.height):(Ue=Gg.bBox(ce.node()),rt=Ue.right-T.l-(n?_e:Se),Et=Ue.bottom-T.t-(n?Se:_e),!n&&S==="top"&&(Ae+=Ue.height,dt=Ue.height)),Tt&&(Vt.attr("transform",Hg(rt/2+lt/2,0)),rt*=2),Ae=Math.max(Ae,n?rt:Et)}var Xt=(n?d:v)*2+Ae+u+l/2,or=0;!n&&C.text&&h==="bottom"&&b<=0&&(or=Xt/2,Xt+=or,dt+=or),M._hColorbarMoveTitle=or,M._hColorbarMoveCBTitle=dt;var _r=u+l,Er=(n?_e:Se)-_r/2-(n?d:0),ei=(n?Se:_e)-(n?N:v+dt-or);e.select("."+gf.cbbg).attr("x",Er).attr("y",ei).attr(n?"width":"height",Math.max(Xt-or,2)).attr(n?"height":"width",Math.max(N+_r,2)).call(SV.fill,c).call(SV.stroke,t.bordercolor).style("stroke-width",u);var qr=Tt?Math.max(rt-10,0):0;e.selectAll("."+gf.cboutline).attr("x",(n?_e:Se+d)+qr).attr("y",(n?Se+v-N:_e)+(St?st:0)).attr(n?"width":"height",Math.max(Z,2)).attr(n?"height":"width",Math.max(N-(n?2*v+st:2*d+qr),2)).call(SV.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var jr=n?ke*Xt:0,gt=n?0:(1-Ce)*Xt-dt;if(jr=k?T.l-jr:-jr,gt=p?T.t-gt:-gt,e.attr("transform",Hg(jr,gt)),!n&&(u||TV(c).getAlpha()&&!TV.equals(M.paper_bgcolor,c))){var Ge=mt.selectAll("text"),Je=Ge[0].length,We=e.select("."+gf.cbbg).node(),et=Gg.bBox(We),xt=Gg.getTranslate(e),At=2;Ge.each(function(mi,un){var Fn=0,An=Je-1;if(un===Fn||un===An){var Hn=Gg.bBox(this),Qn=Gg.getTranslate(this),Vi;if(un===An){var Kn=Hn.right+Qn.x,Jn=et.right+xt.x+Se-u-At+m;Vi=Jn-Kn,Vi>0&&(Vi=0)}else if(un===Fn){var Gt=Hn.left+Qn.x,wt=et.left+xt.x+Se+u+At;Vi=wt-Gt,Vi<0&&(Vi=0)}Vi&&(Je<3?this.setAttribute("transform","translate("+Vi+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Kt={},er=qme[f],Sr=Ome[f],Gr=qme[h],Ir=Ome[h],Yr=Xt-Z;n?(a==="pixels"?(Kt.y=b,Kt.t=N*Gr,Kt.b=N*Ir):(Kt.t=Kt.b=0,Kt.yt=b+i*Gr,Kt.yb=b-i*Ir),s==="pixels"?(Kt.x=m,Kt.l=Xt*er,Kt.r=Xt*Sr):(Kt.l=Yr*er,Kt.r=Yr*Sr,Kt.xl=m-o*er,Kt.xr=m+o*Sr)):(a==="pixels"?(Kt.x=m,Kt.l=N*er,Kt.r=N*Sr):(Kt.l=Kt.r=0,Kt.xl=m+i*er,Kt.xr=m-i*Sr),s==="pixels"?(Kt.y=1-b,Kt.t=Xt*Gr,Kt.b=Xt*Ir):(Kt.t=Yr*Gr,Kt.b=Yr*Ir,Kt.yt=b-o*Gr,Kt.yb=b+o*Ir));var _i=t.y<.5?"b":"t",Pi=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var ai={r:M.width-Er-jr,l:Er+Kt.r,b:M.height-ei-gt,t:ei+Kt.b};k&&p?VI.autoMargin(r,t._id,Kt):k?r._fullLayout._reservedMargin[t._id][_i]=ai[_i]:p||n?r._fullLayout._reservedMargin[t._id][Pi]=ai[Pi]:r._fullLayout._reservedMargin[t._id][_i]=ai[_i]}return U0.syncOrAsync([VI.previousPromises,Ht,tt,nr,VI.previousPromises,je],r)}function Kyt(e,t,r){var n=t.orientation==="v",i=r._fullLayout,a=i._size,o,s,l;UI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),AV(e)},moveFn:function(u,c){e.attr("transform",o+Hg(u,c)),s=UI.align((n?t._uFrac:t._vFrac)+u/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=UI.align((n?t._vFrac:1-t._uFrac)-c/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=UI.getCursor(s,l,t.xanchor,t.yanchor);AV(e,f)},doneFn:function(){if(AV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?Fme.call("_guiRestyle",r,u,t._traceIndex):Fme.call("_guiRelayout",r,u)}}})}function Jyt(e,t,r){var n=t._levels,i=[],a=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o<f&&i.push(o);if(t._fillgradient)a=[0];else if(typeof t._fillcolor=="function"){var h=t._filllevels;if(h)for(l=h.end+h.size/100,u=h.size,s=0;s<1e5&&(o=h.start+s*u,!(u>0?o>=l:o<=l));s++)o>r[0]&&o<r[1]&&a.push(o);else a=i.map(function(d){return d-n.size/2}),a.push(a[a.length-1]+n.size)}else t._fillcolor&&typeof t._fillcolor=="string"&&(a=[0]);return n.size<0&&(i.reverse(),a.reverse()),{line:i,fill:a}}function $yt(e,t,r){var n=e._fullLayout,i=t.orientation==="v",a={type:"linear",range:r,tickmode:t.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:t.ticks,ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,showticklabels:t.showticklabels,labelalias:t.labelalias,ticklabelposition:t.ticklabelposition,ticklabeloverflow:t.ticklabeloverflow,ticklabelstep:t.ticklabelstep,tickfont:t.tickfont,tickangle:t.tickangle,tickformat:t.tickformat,exponentformat:t.exponentformat,minexponent:t.minexponent,separatethousands:t.separatethousands,showexponent:t.showexponent,showtickprefix:t.showtickprefix,tickprefix:t.tickprefix,showticksuffix:t.showticksuffix,ticksuffix:t.ticksuffix,title:t.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},o=i?"y":"x",s={type:"linear",_id:o+t._id},l={letter:o,font:n.font,noAutotickangles:o==="y",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:n.calendar};function u(c,f){return U0.coerce(a,s,Wyt,c,f)}return Hyt(a,s,u,l,n),jyt(a,s,u,l),s}Nme.exports={draw:Xyt}});var Gme=ye(($lr,Vme)=>{"use strict";Vme.exports={moduleType:"component",name:"colorbar",attributes:uL(),supplyDefaults:FO(),draw:Ume().draw,hasColorbar:kO()}});var jme=ye((Qlr,Hme)=>{"use strict";Hme.exports={moduleType:"component",name:"legend",layoutAttributes:CB(),supplyLayoutDefaults:PB(),draw:HB(),style:NB()}});var Xme=ye((eur,Wme)=>{"use strict";Wme.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}});var Yme=ye((tur,Zme)=>{"use strict";Zme.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var kV=ye((rur,Qme)=>{"use strict";var Qyt=Oa(),$me=Pr(),EV=$me.extendFlat,Kme=$me.extendDeep;function Jme(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function e1t(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}Qme.exports=function(t,r){var n,i=t.data,a=t.layout,o=Kme([],i),s=Kme({},a,Jme(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(n=0;n<u.length;n++)e1t(u[n])&&(s[u[n]].title={text:""});for(n=0;n<o.length;n++){var c=o[n];c.showscale=!1,c.marker&&(c.marker.showscale=!1),Qyt.traceIs(c,"pie-like")&&(c.textposition="none")}}if(Array.isArray(r.annotations))for(n=0;n<r.annotations.length;n++)s.annotations.push(r.annotations[n]);var f=Object.keys(s).filter(function(b){return b.match(/^scene\d*$/)});if(f.length){var h={};for(r.tileClass==="thumbnail"&&(h={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),n=0;n<f.length;n++){var d=s[f[n]];d.xaxis||(d.xaxis={}),d.yaxis||(d.yaxis={}),d.zaxis||(d.zaxis={}),EV(d.xaxis,h),EV(d.yaxis,h),EV(d.zaxis,h),d._scene=null}}var v=document.createElement("div");r.tileClass&&(v.className=r.tileClass);var m={gd:v,td:v,layout:s,data:o,config:{staticPlot:r.staticPlot===void 0?!0:r.staticPlot,plotGlPixelRatio:r.plotGlPixelRatio===void 0?2:r.plotGlPixelRatio,displaylogo:r.displaylogo||!1,showLink:r.showLink||!1,showTips:r.showTips||!1,mapboxAccessToken:l.mapboxAccessToken}};return r.setBackground!=="transparent"&&(m.config.setBackground=r.setBackground||"opaque"),m.gd.defaultLayout=Jme(r.tileClass),m}});var rye=ye((iur,tye)=>{"use strict";var t1t=Ab().EventEmitter,r1t=Oa(),i1t=Pr(),eye=qy(),n1t=kV(),a1t=YP(),o1t=KP();function s1t(e,t){var r=new t1t,n=n1t(e,{format:"png"}),i=n.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function a(){var s=eye.getDelay(i._fullLayout);setTimeout(function(){var l=a1t(i),u=document.createElement("canvas");u.id=i1t.randstr(),r=o1t({format:t.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){i&&document.body.removeChild(i)}},s)}var o=eye.getRedrawFunc(i);return r1t.call("_doPlot",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}tye.exports=s1t});var aye=ye((nur,nye)=>{"use strict";var iye=qy(),l1t={getDelay:iye.getDelay,getRedrawFunc:iye.getRedrawFunc,clone:kV(),toSVG:YP(),svgToImg:KP(),toImage:rye(),downloadImage:sU()};nye.exports=l1t});var sye=ye(Vy=>{"use strict";Vy.version=g6().version;bee();une();var u1t=Oa(),T4=Vy.register=u1t.register,LV=Ede(),oye=Object.keys(LV);for(GI=0;GI<oye.length;GI++)kT=oye[GI],kT.charAt(0)!=="_"&&(Vy[kT]=LV[kT]),T4({moduleType:"apiMethod",name:kT,fn:LV[kT]});var kT,GI;T4(wpe());T4([Xpe(),o0e(),qf(),S0e(),O0e(),oge(),Mge(),jge(),ume(),yV(),Ime(),tc(),Gme(),jme(),vf(),pN()]);T4([Xme(),Yme()]);window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(T4(window.PlotlyLocales),delete window.PlotlyLocales);Vy.Icons=$L();var HI=vf(),CV=Mc();Vy.Plots={resize:CV.resize,graphJson:CV.graphJson,sendDataToCloud:CV.sendDataToCloud};Vy.Fx={hover:HI.hover,unhover:HI.unhover,loneHover:HI.loneHover,loneUnhover:HI.loneUnhover};Vy.Snapshot=aye();Vy.PlotSchema=I3()});var uye=ye((our,lye)=>{"use strict";lye.exports=sye()});var zm=ye((sur,vye)=>{"use strict";var Bf=pf(),cye=df().axisHoverFormat,{hovertemplateAttrs:c1t,texttemplateAttrs:f1t,templatefallbackAttrs:fye}=Ll(),dye=Tu(),h1t=ec(),hye=A_(),d1t=Pd().pattern,c2=Ao().extendFlat,PV=h1t({editType:"calc",arrayOk:!0,colorEditType:"style"}),v1t=Bf.marker,p1t=v1t.line,g1t=c2({},p1t.width,{dflt:0}),m1t=c2({width:g1t,editType:"calc"},dye("marker.line")),y1t=c2({line:m1t,editType:"calc"},dye("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:d1t,cornerradius:{valType:"any",editType:"calc"}});vye.exports={x:Bf.x,x0:Bf.x0,dx:Bf.dx,y:Bf.y,y0:Bf.y0,dy:Bf.dy,xperiod:Bf.xperiod,yperiod:Bf.yperiod,xperiod0:Bf.xperiod0,yperiod0:Bf.yperiod0,xperiodalignment:Bf.xperiodalignment,yperiodalignment:Bf.yperiodalignment,xhoverformat:cye("x"),yhoverformat:cye("y"),text:Bf.text,texttemplate:f1t({editType:"plot"},{keys:hye.eventDataKeys}),texttemplatefallback:fye({editType:"plot"}),hovertext:Bf.hovertext,hovertemplate:c1t({},{keys:hye.eventDataKeys}),hovertemplatefallback:fye(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:c2({},PV,{}),insidetextfont:c2({},PV,{}),outsidetextfont:c2({},PV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:c2({},Bf.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:y1t,offsetgroup:Bf.offsetgroup,alignmentgroup:Bf.alignmentgroup,selected:{marker:{opacity:Bf.selected.marker.opacity,color:Bf.selected.marker.color,editType:"style"},textfont:Bf.selected.textfont,editType:"style"},unselected:{marker:{opacity:Bf.unselected.marker.opacity,color:Bf.unselected.marker.color,editType:"style"},textfont:Bf.unselected.textfont,editType:"style"},zorder:Bf.zorder}});var jI=ye((lur,pye)=>{"use strict";pye.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}});var WI=ye((uur,yye)=>{"use strict";var _1t=ka(),gye=pv().hasColorscale,mye=td(),x1t=Pr().coercePattern;yye.exports=function(t,r,n,i,a){var o=n("marker.color",i),s=gye(t,"marker");s&&mye(t,r,a,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",_1t.defaultLine),gye(t,"marker.line")&&mye(t,r,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),x1t(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var i0=ye((cur,Aye)=>{"use strict";var _ye=Eo(),CT=Pr(),xye=ka(),b1t=Oa(),w1t=sT(),T1t=Dg(),A1t=WI(),S1t=e2(),bye=zm(),XI=CT.coerceFont;function M1t(e,t,r,n){function i(u,c){return CT.coerce(e,t,bye,u,c)}var a=w1t(e,t,n,i);if(!a){t.visible=!1;return}T1t(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder"),i("orientation",t.x&&!t.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var o=i("textposition");Tye(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),A1t(e,t,i,r,n);var s=(t.marker.line||{}).color,l=b1t.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||xye.defaultLine,{axis:"y"}),l(e,t,s||xye.defaultLine,{axis:"x",inherit:"y"}),CT.coerceSelectionMarkerOpacity(t,i)}function E1t(e,t){var r,n;function i(s,l){return CT.coerce(n._input,n,bye,s,l)}for(var a=0;a<e.length;a++)if(n=e[a],n.type==="bar"){r=n._input;var o=i("marker.cornerradius",t.barcornerradius);n.marker&&(n.marker.cornerradius=wye(o)),S1t(r,n,t,i,t.barmode)}}function wye(e){if(_ye(e)){if(e=+e,e>=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&_ye(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function Tye(e,t,r,n,i,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,l=a.moduleHasConstrain!==!1,u=a.moduleHasCliponaxis!==!1,c=a.moduleHasTextangle!==!1,f=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(i)||i==="auto",v=d||i==="inside",m=d||i==="outside";if(v||m){var b=XI(n,"textfont",r.font),p=CT.extendFlat({},b),k=e.textfont&&e.textfont.color,M=!k;if(M&&delete p.color,XI(n,"insidetextfont",p),h){var T=CT.extendFlat({},b);M&&delete T.color,XI(n,"pathbar.textfont",T)}m&&XI(n,"outsidetextfont",b),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}v&&f&&n("insidetextanchor")}Aye.exports={supplyDefaults:M1t,crossTraceDefaults:E1t,handleText:Tye,validateCornerradius:wye}});var IV=ye((fur,Sye)=>{"use strict";var k1t=Oa(),C1t=ho(),L1t=Pr(),P1t=jI(),I1t=i0().validateCornerradius;Sye.exports=function(e,t,r){function n(m,b){return L1t.coerce(e,t,P1t,m,b)}for(var i=!1,a=!1,o=!1,s={},l=n("barmode"),u=l==="group",c=0;c<r.length;c++){var f=r[c];if(k1t.traceIs(f,"bar")&&f.visible)i=!0;else continue;var h=f.xaxis+f.yaxis;if(u?(s[h]&&(o=!0),s[h]=!0):(h+=f._input.offsetgroup,s.length>0&&!s[h]&&(o=!0),s[h]=!0),f.visible&&f.type==="histogram"){var d=C1t.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(a=!0)}}if(!i){delete t.barmode;return}l!=="overlay"&&n("barnorm"),n("bargap",a&&!o?0:.2),n("bargroupgap");var v=n("barcornerradius");t.barcornerradius=I1t(v)}});var A4=ye((hur,Mye)=>{"use strict";var LT=Pr();Mye.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;LT.mergeArray(r.text,t,"tx"),LT.mergeArray(r.hovertext,t,"htx");var i=r.marker;if(i){LT.mergeArray(i.opacity,t,"mo",!0),LT.mergeArray(i.color,t,"mc");var a=i.line;a&&(LT.mergeArray(a.color,t,"mlc"),LT.mergeArrayCastPositive(a.width,t,"mlw"))}}});var Iye=ye((dur,Pye)=>{"use strict";var Eye=ho(),kye=zg(),Cye=pv().hasColorscale,Lye=gv(),R1t=A4(),D1t=q0();Pye.exports=function(t,r){var n=Eye.getFromId(t,r.xaxis||"x"),i=Eye.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(a=n.makeCalcdata(r,"x",f),s=i.makeCalcdata(r,"y"),l=kye(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=kye(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),v=0;v<h;v++)d[v]={p:o[v],s:a[v]},u&&(d[v].orig_p=s[v],d[v][c+"End"]=l.ends[v],d[v][c+"Start"]=l.starts[v]),r.ids&&(d[v].id=String(r.ids[v]));return Cye(r,"marker")&&Lye(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),Cye(r,"marker.line")&&Lye(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),R1t(d,r),D1t(d,r),d}});var bv=ye((vur,Dye)=>{"use strict";var F1t=qa(),z1t=Pr();function q1t(e,t,r){var n=e._fullLayout,i=n["_"+r+"Text_minsize"];if(i){var a=n.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=a&&l.hide?0:i/l.fontSize;var u=F1t.select(this).select("text");z1t.setTransormAndDisplay(u,l)}})}}function O1t(e,t,r){if(r.uniformtext.mode){var n=Rye(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a<i,r[n]=r[n]||1/0,t.hide||(r[n]=Math.min(r[n],Math.max(a,i)))}}function B1t(e,t){var r=Rye(e);t[r]=void 0}function Rye(e){return"_"+e+"Text_minsize"}Dye.exports={recordMinTextSize:O1t,clearMinTextSize:B1t,resizeText:q1t}});var ZI=ye(f2=>{"use strict";var N1t=Eo(),U1t=fd(),Fye=Pr().isArrayOrTypedArray;f2.coerceString=function(e,t,r){if(typeof t=="string"){if(t||!e.noBlank)return t}else if((typeof t=="number"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};f2.coerceNumber=function(e,t,r){if(N1t(t)){t=+t;var n=e.min,i=e.max,a=n!==void 0&&t<n||i!==void 0&&t>i;if(!a)return t}return r!==void 0?r:e.dflt};f2.coerceColor=function(e,t,r){return U1t(t).isValid()?t:r!==void 0?r:e.dflt};f2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};f2.getValue=function(e,t){var r;return Fye(e)?t<e.length&&(r=e[t]):r=e,r};f2.getLineWidth=function(e,t){var r=0<t.mlw?t.mlw:Fye(e.marker.line.width)?0:e.marker.line.width;return r}});var V0=ye((gur,Wye)=>{"use strict";var S4=qa(),V1t=ka(),M4=So(),zye=Pr(),qye=Oa(),Oye=bv().resizeText,RV=zm(),G1t=RV.textfont,H1t=RV.insidetextfont,j1t=RV.outsidetextfont,Qd=ZI();function W1t(e){var t=S4.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");Oye(e,t,"bar");var r=t.size(),n=e._fullLayout;t.style("opacity",function(i){return i[0].trace.opacity}).each(function(i){(n.barmode==="stack"&&r>1||n.bargap===0&&n.bargroupgap===0&&!i[0].trace.marker.line.width)&&S4.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(i){var a=S4.select(this),o=i[0].trace;Bye(a,o,e)}),qye.getComponentMethod("errorbars","style")(t)}function Bye(e,t,r){M4.pointStyle(e.selectAll("path"),t,r),Nye(e,t,r)}function Nye(e,t,r){e.selectAll("text").each(function(n){var i=S4.select(this),a=zye.ensureUniformFontSize(r,Uye(i,n,t,r));M4.font(i,a)})}function X1t(e,t,r){var n=t[0].trace;n.selectedpoints?Z1t(r,n,e):(Bye(r,n,e),qye.getComponentMethod("errorbars","style")(r))}function Z1t(e,t,r){M4.selectedPointStyle(e.selectAll("path"),t),Y1t(e.selectAll("text"),t,r)}function Y1t(e,t,r){e.each(function(n){var i=S4.select(this),a;if(n.selected){a=zye.ensureUniformFontSize(r,Uye(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),M4.font(i,a)}else M4.selectedTextStyle(i,t)})}function Uye(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=jye(t,r);a=Gye(r,t.i,i,o)}else e.classed("bartext-outside")&&(a=Hye(r,t.i,i));return a}function Vye(e,t,r){return DV(G1t,e.textfont,t,r)}function Gye(e,t,r,n){var i=Vye(e,t,r),a=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return a&&(i={color:V1t.contrast(n),family:i.family,size:i.size,weight:i.weight,style:i.style,variant:i.variant,textcase:i.textcase,lineposition:i.lineposition,shadow:i.shadow}),DV(H1t,e.insidetextfont,t,i)}function Hye(e,t,r){var n=Vye(e,t,r);return DV(j1t,e.outsidetextfont,t,n)}function DV(e,t,r,n){t=t||{};var i=Qd.getValue(t.family,r),a=Qd.getValue(t.size,r),o=Qd.getValue(t.color,r),s=Qd.getValue(t.weight,r),l=Qd.getValue(t.style,r),u=Qd.getValue(t.variant,r),c=Qd.getValue(t.textcase,r),f=Qd.getValue(t.lineposition,r),h=Qd.getValue(t.shadow,r);return{family:Qd.coerceString(e.family,i,n.family),size:Qd.coerceNumber(e.size,a,n.size),color:Qd.coerceColor(e.color,o,n.color),weight:Qd.coerceString(e.weight,s,n.weight),style:Qd.coerceString(e.style,l,n.style),variant:Qd.coerceString(e.variant,u,n.variant),textcase:Qd.coerceString(e.variant,c,n.textcase),lineposition:Qd.coerceString(e.variant,f,n.lineposition),shadow:Qd.coerceString(e.variant,h,n.shadow)}}function jye(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}Wye.exports={style:W1t,styleTextPoints:Nye,styleOnSelect:X1t,getInsideTextFont:Gye,getOutsideTextFont:Hye,getBarColor:jye,resizeText:Oye}});var d2=ye((mur,e1e)=>{"use strict";var YI=qa(),KI=Eo(),Dd=Pr(),K1t=Zl(),J1t=ka(),I_=So(),$1t=Oa(),JI=ho().tickText,Xye=bv(),Q1t=Xye.recordMinTextSize,e_t=Xye.clearMinTextSize,FV=V0(),PT=ZI(),t_t=A_(),Zye=zm(),r_t=Zye.text,i_t=Zye.textposition,n_t=ip().appendArrayPointValue,Gv=t_t.TEXTPAD;function a_t(e){return e.id}function o_t(e){if(e.ids)return a_t}function zV(e){return(e>0)-(e<0)}function qm(e,t){return e<t?1:-1}function s_t(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n?[i,a]:[a,i]}function Yye(e,t,r,n){if(!t.uniformtext.mode&&Kye(r)){var i;return n&&(i=n()),e.transition().duration(r.duration).ease(r.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()})}else return e}function Kye(e){return e&&e.duration>0}function l_t(e,t,r,n,i,a){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;i||(i={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},e_t("bar",l));var c=Dd.makeTraceGroups(n,r,"trace bars").each(function(f){var h=YI.select(this),d=f[0].trace,v=f[0].t,m=d.type==="waterfall",b=d.type==="funnel",p=d.type==="histogram",k=d.type==="bar",M=k||b,T=0;m&&d.connector.visible&&d.connector.mode==="between"&&(T=d.connector.line.width/2);var L=d.orientation==="h",x=Kye(i),C=Dd.ensureSingle(h,"g","points"),S=o_t(d),g=C.selectAll("g.point").data(Dd.identity,S);g.enter().append("g").classed("point",!0),g.exit().remove(),g.each(function(E,z){var q=YI.select(this),U=s_t(E,o,s,L),G=U[0][0],Z=U[0][1],j=U[1][0],N=U[1][1],H=(L?Z-G:N-j)===0;H&&M&&PT.getLineWidth(d,E)&&(H=!1),H||(H=!KI(G)||!KI(Z)||!KI(j)||!KI(N)),E.isBlank=H,H&&(L?Z=G:N=j),T&&!H&&(L?(G-=qm(G,Z)*T,Z+=qm(G,Z)*T):(j-=qm(j,N)*T,N+=qm(j,N)*T));var re,oe;if(d.type==="waterfall"){if(!H){var _e=d[E.dir].marker;re=_e.line.width,oe=_e.color}}else re=PT.getLineWidth(d,E),oe=E.mc||d.marker.color;function ke(Ae){var rt=YI.round(re/2%1,2);return i.gap===0&&i.groupgap===0?YI.round(Math.round(Ae)-rt,2):Ae}function Ce(Ae,rt,St){return St&&Ae===rt?Ae:Math.abs(Ae-rt)>=2?ke(Ae):Ae>rt?Math.ceil(Ae):Math.floor(Ae)}var ge=J1t.opacity(oe),ie=ge<1||re>.01?ke:Ce;e._context.staticPlot||(G=ie(G,Z,L),Z=ie(Z,G,L),j=ie(j,N,!L),N=ie(N,j,!L));var Se=L?o.c2p:s.c2p,Ee;E.s0>0?Ee=E._sMax:E.s0<0?Ee=E._sMin:Ee=E.s1>0?E._sMax:E._sMin;function we(Ae,rt){if(!Ae)return 0;var St=Math.abs(L?N-j:Z-G),Tt=Math.abs(L?Z-G:N-j),dt=ie(Math.abs(Se(Ee,!0)-Se(0,!0))),Et=E.hasB?Math.min(St/2,Tt/2):Math.min(St/2,dt),pt;if(rt==="%"){var Xt=Math.min(50,Ae);pt=St*(Xt/100)}else pt=Ae;return ie(Math.max(Math.min(pt,Et),0))}var De=k||p?we(v.cornerradiusvalue,v.cornerradiusform):0,Le,me,Pe="M"+G+","+j+"V"+N+"H"+Z+"V"+j+"Z",ce=0;if(De&&E.s){var He=zV(E.s0)===0||zV(E.s)===zV(E.s0)?E.s1:E.s0;if(ce=ie(E.hasB?0:Math.abs(Se(Ee,!0)-Se(He,!0))),ce<De){var lt=qm(G,Z),mt=qm(j,N),Vt=lt===-mt?1:0;if(L)if(E.hasB)Le="M"+(G+De*lt)+","+j+"A "+De+","+De+" 0 0 "+Vt+" "+G+","+(j+De*mt)+"V"+(N-De*mt)+"A "+De+","+De+" 0 0 "+Vt+" "+(G+De*lt)+","+N+"H"+(Z-De*lt)+"A "+De+","+De+" 0 0 "+Vt+" "+Z+","+(N-De*mt)+"V"+(j+De*mt)+"A "+De+","+De+" 0 0 "+Vt+" "+(Z-De*lt)+","+j+"Z";else{me=Math.abs(Z-G)+ce;var st=me<De?De-Math.sqrt(me*(2*De-me)):0,ct=ce>0?Math.sqrt(ce*(2*De-ce)):0,Qt=lt>0?Math.max:Math.min;Le="M"+G+","+j+"V"+(N-st*mt)+"H"+Qt(Z-(De-ce)*lt,G)+"A "+De+","+De+" 0 0 "+Vt+" "+Z+","+(N-De*mt-ct)+"V"+(j+De*mt+ct)+"A "+De+","+De+" 0 0 "+Vt+" "+Qt(Z-(De-ce)*lt,G)+","+(j+st*mt)+"Z"}else if(E.hasB)Le="M"+(G+De*lt)+","+j+"A "+De+","+De+" 0 0 "+Vt+" "+G+","+(j+De*mt)+"V"+(N-De*mt)+"A "+De+","+De+" 0 0 "+Vt+" "+(G+De*lt)+","+N+"H"+(Z-De*lt)+"A "+De+","+De+" 0 0 "+Vt+" "+Z+","+(N-De*mt)+"V"+(j+De*mt)+"A "+De+","+De+" 0 0 "+Vt+" "+(Z-De*lt)+","+j+"Z";else{me=Math.abs(N-j)+ce;var Ht=me<De?De-Math.sqrt(me*(2*De-me)):0,nr=ce>0?Math.sqrt(ce*(2*De-ce)):0,tt=mt>0?Math.max:Math.min;Le="M"+(G+Ht*lt)+","+j+"V"+tt(N-(De-ce)*mt,j)+"A "+De+","+De+" 0 0 "+Vt+" "+(G+De*lt-nr)+","+N+"H"+(Z-De*lt+nr)+"A "+De+","+De+" 0 0 "+Vt+" "+(Z-Ht*lt)+","+tt(N-(De-ce)*mt,j)+"V"+j+"Z"}}else Le=Pe}else Le=Pe;var je=Yye(Dd.ensureSingle(q,"path"),l,i,a);if(je.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((Z-G)*(N-j))||H&&e._context.staticPlot?"M0,0Z":Le).call(I_.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&x){var Ue=I_.makePointStyleFns(d);I_.singlePointStyle(E,je,d,Ue,e)}u_t(e,t,q,f,z,G,Z,j,N,De,ce,i,a),t.layerClipId&&I_.hideOutsideRangePoint(E,q.select("text"),o,s,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;I_.setClipUrl(h,P?null:t.layerClipId,e)});$1t.getComponentMethod("errorbars","plot")(e,c,t,i)}function u_t(e,t,r,n,i,a,o,s,l,u,c,f,h){var d=t.xaxis,v=t.yaxis,m=e._fullLayout,b;function p(me,Pe,ce){var He=Dd.ensureSingle(me,"text").text(Pe).attr({class:"bartext bartext-"+b,"text-anchor":"middle","data-notex":1}).call(I_.font,ce).call(K1t.convertToTspans,e);return He}var k=n[0].trace,M=k.orientation==="h",T=h_t(m,n,i,d,v);b=d_t(k,i);var L=f.mode==="stack"||f.mode==="relative",x=n[i],C=!L||x._outmost,S=x.hasB,g=u&&u-c>Gv;if(!T||b==="none"||(x.isBlank||a===o||s===l)&&(b==="auto"||b==="inside")){r.select("text").remove();return}var P=m.font,E=FV.getBarColor(n[i],k),z=FV.getInsideTextFont(k,i,P,E),q=FV.getOutsideTextFont(k,i,P),U=k.insidetextanchor||"end",G=r.datum();M?d.type==="log"&&G.s0<=0&&(d.range[0]<d.range[1]?a=0:a=d._length):v.type==="log"&&G.s0<=0&&(v.range[0]<v.range[1]?s=v._length:s=0);var Z=Math.abs(o-a),j=Math.abs(l-s),N=Z-2*Gv,H=j-2*Gv,re,oe,_e,ke,Ce;if(b==="outside"&&!C&&!x.hasB&&(b="inside"),b==="auto")if(C){b="inside",Ce=Dd.ensureUniformFontSize(e,z),re=p(r,T,Ce),oe=I_.bBox(re.node()),_e=oe.width,ke=oe.height;var ge=_e>0&&ke>0,ie;g?S?ie=h2(N-2*u,H,_e,ke,M)||h2(N,H-2*u,_e,ke,M):M?ie=h2(N-(u-c),H,_e,ke,M)||h2(N,H-2*(u-c),_e,ke,M):ie=h2(N,H-(u-c),_e,ke,M)||h2(N-2*(u-c),H,_e,ke,M):ie=h2(N,H,_e,ke,M),ge&&ie?b="inside":(b="outside",re.remove(),re=null)}else b="inside";if(!re){Ce=Dd.ensureUniformFontSize(e,b==="outside"?q:z),re=p(r,T,Ce);var Se=re.attr("transform");if(re.attr("transform",""),oe=I_.bBox(re.node()),_e=oe.width,ke=oe.height,re.attr("transform",Se),_e<=0||ke<=0){re.remove();return}}var Ee=k.textangle,we,De;b==="outside"?(De=k.constraintext==="both"||k.constraintext==="outside",we=f_t(a,o,s,l,oe,{isHorizontal:M,constrained:De,angle:Ee})):(De=k.constraintext==="both"||k.constraintext==="inside",we=Qye(a,o,s,l,oe,{isHorizontal:M,constrained:De,angle:Ee,anchor:U,hasB:S,r:u,overhead:c})),we.fontSize=Ce.size,Q1t(k.type==="histogram"?"bar":k.type,we,m),x.transform=we;var Le=Yye(re,m,f,h);Dd.setTransormAndDisplay(Le,we)}function h2(e,t,r,n,i){if(e<0||t<0)return!1;var a=r<=e&&n<=t,o=r<=t&&n<=e,s=i?e>=r*(t/n):t>=n*(e/r);return a||o||s}function Jye(e){return e==="auto"?0:e}function $ye(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function Qye(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c=u==="end",f=u==="start",h=a.leftToRight||0,d=(h+1)/2,v=1-d,m=a.hasB,b=a.r,p=a.overhead,k=i.width,M=i.height,T=Math.abs(t-e),L=Math.abs(n-r),x=T>2*Gv&&L>2*Gv?Gv:0;T-=2*x,L-=2*x;var C=Jye(l);l==="auto"&&!(k<=T&&M<=L)&&(k>T||M>L)&&(!(k>L||M>T)||k<M!=T<L)&&(C+=90);var S=$ye(i,C),g,P;if(b&&b-p>Gv){var E=c_t(e,t,r,n,S,b,p,o,m);g=E.scale,P=E.pad}else g=1,s&&(g=Math.min(1,T/S.x,L/S.y)),P=0;var z=i.left*v+i.right*d,q=(i.top+i.bottom)/2,U=(e+Gv)*v+(t-Gv)*d,G=(r+n)/2,Z=0,j=0;if(f||c){var N=(o?S.x:S.y)/2;b&&(c||m)&&(x+=P);var H=o?qm(e,t):qm(r,n);o?f?(U=e+H*x,Z=-H*N):(U=t-H*x,Z=H*N):f?(G=r+H*x,j=-H*N):(G=n-H*x,j=H*N)}return{textX:z,textY:q,targetX:U,targetY:G,anchorX:Z,anchorY:j,scale:g,rotate:C}}function c_t(e,t,r,n,i,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*Gv),c=Math.max(0,Math.abs(n-r)-2*Gv),f=a-Gv,h=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,d=l?f*2:s?f-o:2*h,v=l?f*2:s?2*h:f-o,m,b,p,k,M;return i.y/i.x>=c/(u-d)?k=c/i.y:i.y/i.x<=(c-v)/u?k=u/i.x:!l&&s?(m=i.x*i.x+i.y*i.y/4,b=-2*i.x*(u-f)-i.y*(c/2-f),p=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*m*p))/(2*m)):l?(m=(i.x*i.x+i.y*i.y)/4,b=-i.x*(u/2-f)-i.y*(c/2-f),p=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*m*p))/(2*m)):(m=i.x*i.x/4+i.y*i.y,b=-i.x*(u/2-f)-2*i.y*(c-f),p=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,k=(-b+Math.sqrt(b*b-4*m*p))/(2*m)),k=Math.min(1,k),s?M=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-i.y*k)/2)*(f-(c-i.y*k)/2)))-o):M=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-i.x*k)/2)*(f-(u-i.x*k)/2)))-o),{scale:k,pad:M}}function f_t(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=i.width,c=i.height,f=Math.abs(t-e),h=Math.abs(n-r),d;o?d=h>2*Gv?Gv:0:d=f>2*Gv?Gv:0;var v=1;s&&(v=o?Math.min(1,h/c):Math.min(1,f/u));var m=Jye(l),b=$ye(i,m),p=(o?b.x:b.y)/2,k=(i.left+i.right)/2,M=(i.top+i.bottom)/2,T=(e+t)/2,L=(r+n)/2,x=0,C=0,S=o?qm(t,e):qm(r,n);return o?(T=t-S*d,x=S*p):(L=n+S*d,C=-S*p),{textX:k,textY:M,targetX:T,targetY:L,anchorX:x,anchorY:C,scale:v,rotate:m}}function h_t(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=v_t(e,t,r,n,i):a.textinfo?s=p_t(t,r,n,i):s=PT.getValue(a.text,r),PT.coerceString(r_t,s)}function d_t(e,t){var r=PT.getValue(e.textposition,t);return PT.coerceEnumerated(i_t,r)}function v_t(e,t,r,n,i){var a=t[0].trace,o=Dd.castOption(a,r,"texttemplate");if(!o)return"";var s=a.type==="histogram",l=a.type==="waterfall",u=a.type==="funnel",c=a.orientation==="h",f,h,d,v;c?(f="y",h=i,d="x",v=n):(f="x",h=n,d="y",v=i);function m(x){return JI(h,h.c2l(x),!0).text}function b(x){return JI(v,v.c2l(x),!0).text}var p=t[r],k={};k.label=p.p,k.labelLabel=k[f+"Label"]=m(p.p);var M=Dd.castOption(a,p.i,"text");(M===0||M)&&(k.text=M),k.value=p.s,k.valueLabel=k[d+"Label"]=b(p.s);var T={};n_t(T,a,p.i),(s||T.x===void 0)&&(T.x=c?k.value:k.label),(s||T.y===void 0)&&(T.y=c?k.label:k.value),(s||T.xLabel===void 0)&&(T.xLabel=c?k.valueLabel:k.labelLabel),(s||T.yLabel===void 0)&&(T.yLabel=c?k.labelLabel:k.valueLabel),l&&(k.delta=+p.rawS||p.s,k.deltaLabel=b(k.delta),k.final=p.v,k.finalLabel=b(k.final),k.initial=k.final-k.delta,k.initialLabel=b(k.initial)),u&&(k.value=p.s,k.valueLabel=b(k.value),k.percentInitial=p.begR,k.percentInitialLabel=Dd.formatPercent(p.begR),k.percentPrevious=p.difR,k.percentPreviousLabel=Dd.formatPercent(p.difR),k.percentTotal=p.sumR,k.percenTotalLabel=Dd.formatPercent(p.sumR));var L=Dd.castOption(a,p.i,"customdata");return L&&(k.customdata=L),Dd.texttemplateString({data:[T,k,a._meta],fallback:a.texttemplatefallback,labels:k,locale:e._d3locale,template:o})}function p_t(e,t,r,n){var i=e[0].trace,a=i.orientation==="h",o=i.type==="waterfall",s=i.type==="funnel";function l(L){var x=a?n:r;return JI(x,L,!0).text}function u(L){var x=a?r:n;return JI(x,+L,!0).text}var c=i.textinfo,f=e[t],h=c.split("+"),d=[],v,m=function(L){return h.indexOf(L)!==-1};if(m("label")&&d.push(l(e[t].p)),m("text")&&(v=Dd.castOption(i,f.i,"text"),(v===0||v)&&d.push(v)),o){var b=+f.rawS||f.s,p=f.v,k=p-b;m("initial")&&d.push(u(k)),m("delta")&&d.push(u(b)),m("final")&&d.push(u(p))}if(s){m("value")&&d.push(u(f.s));var M=0;m("percent initial")&&M++,m("percent previous")&&M++,m("percent total")&&M++;var T=M>1;m("percent initial")&&(v=Dd.formatPercent(f.begR),T&&(v+=" of initial"),d.push(v)),m("percent previous")&&(v=Dd.formatPercent(f.difR),T&&(v+=" of previous"),d.push(v)),m("percent total")&&(v=Dd.formatPercent(f.sumR),T&&(v+=" of total"),d.push(v))}return d.join("<br>")}e1e.exports={plot:l_t,toMoveInsideBar:Qye}});var IT=ye((yur,n1e)=>{"use strict";var E4=vf(),g_t=Oa(),t1e=ka(),m_t=Pr().fillText,y_t=ZI().getLineWidth,qV=ho().hoverLabelText,__t=fs().BADNUM;function x_t(e,t,r,n,i){var a=r1e(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=i1e(s,l),g_t.getComponentMethod("errorbars","hoverInfo")(l,s,a),[a]}}function r1e(e,t,r,n,i){var a=e.cd,o=a[0].trace,s=a[0].t,l=n==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,h,d,v,m,b,p,k;o.orientation==="h"?(h=r,d=t,v="y",m="x",b=G,p=z):(h=t,d=r,v="x",m="y",p=G,b=z);var M=o[v+"period"],T=l||M;function L(ie){return C(ie,-1)}function x(ie){return C(ie,1)}function C(ie,Se){var Ee=ie.w;return ie[v]+Se*Ee/2}function S(ie){return ie[v+"End"]-ie[v+"Start"]}var g=l?L:M?function(ie){return ie.p-S(ie)/2}:function(ie){return Math.min(L(ie),ie.p-s.bardelta/2)},P=l?x:M?function(ie){return ie.p+S(ie)/2}:function(ie){return Math.max(x(ie),ie.p+s.bardelta/2)};function E(ie,Se,Ee){return i.finiteRange&&(Ee=0),E4.inbox(ie-h,Se-h,Ee+Math.min(1,Math.abs(Se-ie)/k)-1)}function z(ie){return E(g(ie),P(ie),c)}function q(ie){return E(L(ie),x(ie),f)}function U(ie){var Se=ie[m];if(u){var Ee=Math.abs(ie.rawS)||0;d>0?Se+=Ee:d<0&&(Se-=Ee)}return Se}function G(ie){var Se=d,Ee=ie.b,we=U(ie);return E4.inbox(Ee-Se,we-Se,c+(we-Se)/(we-Ee)-1)}function Z(ie){var Se=d,Ee=ie.b,we=U(ie);return E4.inbox(Ee-Se,we-Se,f+(we-Se)/(we-Ee)-1)}var j=e[v+"a"],N=e[m+"a"];k=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));function H(ie){return(b(ie)+p(ie))/2}var re=E4.getDistanceFunction(n,b,p,H);if(E4.getClosest(a,re,e),e.index!==!1&&a[e.index].p!==__t){T||(g=function(ie){return Math.min(L(ie),ie.p-s.bargroupwidth/2)},P=function(ie){return Math.max(x(ie),ie.p+s.bargroupwidth/2)});var oe=e.index,_e=a[oe],ke=o.base?_e.b+_e.s:_e.s;e[m+"0"]=e[m+"1"]=N.c2p(_e[m],!0),e[m+"LabelVal"]=ke;var Ce=s.extents[s.extents.round(_e.p)];e[v+"0"]=j.c2p(l?g(_e):Ce[0],!0),e[v+"1"]=j.c2p(l?P(_e):Ce[1],!0);var ge=_e.orig_p!==void 0;return e[v+"LabelVal"]=ge?_e.orig_p:_e.p,e.labelLabel=qV(j,e[v+"LabelVal"],o[v+"hoverformat"]),e.valueLabel=qV(N,e[m+"LabelVal"],o[m+"hoverformat"]),e.baseLabel=qV(N,_e.b,o[m+"hoverformat"]),e.spikeDistance=(Z(_e)+q(_e))/2,e[v+"Spike"]=j.c2p(_e.p,!0),m_t(_e,o,e),e.hovertemplate=o.hovertemplate,e}}function i1e(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=y_t(e,t);if(t1e.opacity(r))return r;if(t1e.opacity(n)&&i)return n}n1e.exports={hoverPoints:x_t,hoverOnBars:r1e,getTraceColor:i1e}});var o1e=ye((_ur,a1e)=>{"use strict";a1e.exports=function(t,r,n){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var RT=ye((xur,s1e)=>{"use strict";s1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=n[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c<n.length;c++)n[c].selected=0;else for(c=0;c<n.length;c++){var f=n[c],h="ct"in f?f.ct:b_t(f,i,a,l,s);r.contains(h,!1,c,t)?(u.push({pointNumber:c,x:i.c2d(f.x),y:a.c2d(f.y)}),f.selected=1):f.selected=0}return u};function b_t(e,t,r,n,i){var a=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}});var u1e=ye((bur,l1e)=>{"use strict";l1e.exports={attributes:zm(),layoutAttributes:jI(),supplyDefaults:i0().supplyDefaults,crossTraceDefaults:i0().crossTraceDefaults,supplyLayoutDefaults:IV(),calc:Iye(),crossTraceCalc:t2().crossTraceCalc,colorbar:$d(),arraysToCalcdata:A4(),plot:d2().plot,style:V0().style,styleOnSelect:V0().styleOnSelect,hoverPoints:IT().hoverPoints,eventData:o1e(),selectPoints:RT(),moduleType:"trace",name:"bar",basePlotModule:mh(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var f1e=ye((wur,c1e)=>{"use strict";c1e.exports=u1e()});var k4=ye((Tur,p1e)=>{"use strict";var w_t=Pg(),G0=pf(),h1e=zm(),T_t=Ih(),d1e=df().axisHoverFormat,{hovertemplateAttrs:A_t,templatefallbackAttrs:S_t}=Ll(),Gy=Ao().extendFlat,DT=G0.marker,v1e=DT.line;p1e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:G0.xperiod,yperiod:G0.yperiod,xperiod0:G0.xperiod0,yperiod0:G0.yperiod0,xperiodalignment:G0.xperiodalignment,yperiodalignment:G0.yperiodalignment,xhoverformat:d1e("x"),yhoverformat:d1e("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:Gy({},DT.symbol,{arrayOk:!1,editType:"plot"}),opacity:Gy({},DT.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:Gy({},DT.angle,{arrayOk:!1,editType:"calc"}),size:Gy({},DT.size,{arrayOk:!1,editType:"calc"}),color:Gy({},DT.color,{arrayOk:!1,editType:"style"}),line:{color:Gy({},v1e.color,{arrayOk:!1,dflt:T_t.defaultLine,editType:"style"}),width:Gy({},v1e.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:w_t(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:h1e.offsetgroup,alignmentgroup:h1e.alignmentgroup,selected:{marker:G0.selected.marker,editType:"style"},unselected:{marker:G0.unselected.marker,editType:"style"},text:Gy({},G0.text,{}),hovertext:Gy({},G0.hovertext,{}),hovertemplate:A_t({}),hovertemplatefallback:S_t(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:G0.zorder}});var C4=ye((Aur,g1e)=>{"use strict";g1e.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}});var P4=ye((Sur,x1e)=>{"use strict";var H0=Pr(),M_t=Oa(),E_t=ka(),k_t=Dg(),C_t=e2(),m1e=G3(),L4=k4();function L_t(e,t,r,n){function i(v,m){return H0.coerce(e,t,L4,v,m)}if(y1e(e,t,i,n),t.visible!==!1){k_t(e,t,n,i),i("xhoverformat"),i("yhoverformat");var a=t._hasPreCompStats;a&&(i("lowerfence"),i("upperfence")),i("line.color",(e.marker||{}).color||r),i("line.width"),i("fillcolor",E_t.addOpacity(t.line.color,.5));var o=!1;if(a){var s=i("mean"),l=i("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}i("whiskerwidth");var u=i("sizemode"),c;u==="quartiles"&&(c=i("boxmean",o)),i("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&i("sdmultiple"),i("width"),i("quartilemethod");var f=!1;if(a){var h=i("notchspan");h&&h.length&&(f=!0)}else H0.validate(e.notchwidth,L4.notchwidth)&&(f=!0);var d=i("notched",f);d&&i("notchwidth"),_1e(e,t,i,{prefix:"box"}),i("zorder")}}function y1e(e,t,r,n){function i(P){var E=0;return P&&P.length&&(E+=1,H0.isArrayOrTypedArray(P[0])&&P[0].length&&(E+=1)),E}function a(P){return H0.validate(e[P],L4[P])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(H0.minRowLength(u),H0.minRowLength(c),H0.minRowLength(f))}var h=i(o),d=i(s),v=h&&H0.minRowLength(o),m=d&&H0.minRowLength(s),b=n.calendar,p={autotypenumbers:n.autotypenumbers},k,M;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var T=a("x0")||a("dx"),L=a("y0")||a("dy");L&&!T?k="h":k="v",M=l;break;case"10":k="v",M=Math.min(l,m);break;case"20":k="h",M=Math.min(l,s.length);break;case"01":k="h",M=Math.min(l,v);break;case"02":k="v",M=Math.min(l,o.length);break;case"12":k="v",M=Math.min(l,m,o.length);break;case"21":k="h",M=Math.min(l,s.length,v);break;case"11":M=0;break;case"22":var x=!1,C;for(C=0;C<s.length;C++)if(m1e(s[C],b,p)==="category"){x=!0;break}if(x)k="v",M=Math.min(l,m,o.length);else{for(C=0;C<o.length;C++)if(m1e(o[C],b,p)==="category"){x=!0;break}x?(k="h",M=Math.min(l,s.length,v)):(k="v",M=Math.min(l,m,o.length))}break}else h>0?(k="v",d>0?M=Math.min(m,v):M=Math.min(v)):d>0?(k="h",M=Math.min(m)):M=0;if(!M){t.visible=!1;return}t._length=M;var S=r("orientation",k);t._hasPreCompStats?S==="v"&&d===0?(r("x0",0),r("dx",1)):S==="h"&&h===0&&(r("y0",0),r("dy",1)):S==="v"&&d===0?r("x0"):S==="h"&&h===0&&r("y0");var g=M_t.getComponentMethod("calendars","handleTraceDefaults");g(e,t,["x","y"],n)}function _1e(e,t,r,n){var i=n.prefix,a=H0.coerce2(e,t,L4,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(a||o)&&(s="suspectedoutliers");var l=r(i+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),H0.coerceSelectionMarkerOpacity(t,r)}function P_t(e,t){var r,n;function i(l){return H0.coerce(n._input,n,L4,l)}for(var a=0;a<e.length;a++){n=e[a];var o=n.type;if(o==="box"||o==="violin"){r=n._input;var s=t[o+"mode"];s==="group"&&C_t(r,n,t,i,s)}}}x1e.exports={supplyDefaults:L_t,crossTraceDefaults:P_t,handleSampleDefaults:y1e,handlePointsDefaults:_1e}});var $I=ye((Mur,w1e)=>{"use strict";var I_t=Oa(),R_t=Pr(),D_t=C4();function b1e(e,t,r,n,i){for(var a=i+"Layout",o=!1,s=0;s<r.length;s++){var l=r[s];if(I_t.traceIs(l,a)){o=!0;break}}o&&(n(i+"mode"),n(i+"gap"),n(i+"groupgap"))}function F_t(e,t,r){function n(i,a){return R_t.coerce(e,t,D_t,i,a)}b1e(e,t,r,n,"box")}w1e.exports={supplyLayoutDefaults:F_t,_supply:b1e}});var NV=ye((Eur,P1e)=>{"use strict";var BV=Eo(),QI=ho(),z_t=zg(),yh=Pr(),n0=fs().BADNUM,Hy=yh._;P1e.exports=function(t,r){var n=t._fullLayout,i=QI.getFromId(t,r.xaxis||"x"),a=QI.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,h,d,v;r.orientation==="h"?(c=i,f="x",h=a,d="y",v=!!r.yperiodalignment):(c=a,f="y",h=i,d="x",v=!!r.xperiodalignment);var m=q_t(r,d,h,n[s]),b=m[0],p=m[1],k=yh.distinctVals(b,h),M=k.vals,T=k.minDiff/2,L,x,C,S,g,P,E=(r.boxpoints||r.points)==="all"?yh.identity:function(Vt){return Vt.v<L.lf||Vt.v>L.uf};if(r._hasPreCompStats){var z=r[f],q=function(Vt){return c.d2c((r[Vt]||[])[l])},U=1/0,G=-1/0;for(l=0;l<r._length;l++){var Z=b[l];if(BV(Z)){if(L={},L.pos=L[d]=Z,v&&p&&(L.orig_p=p[l]),L.q1=q("q1"),L.med=q("median"),L.q3=q("q3"),x=[],z&&yh.isArrayOrTypedArray(z[l]))for(u=0;u<z[l].length;u++)P=c.d2c(z[l][u]),P!==n0&&(g={v:P,i:[l,u]},T1e(g,r,[l,u]),x.push(g));if(L.pts=x.sort(A1e),C=L[f]=x.map(S1e),S=C.length,L.med!==n0&&L.q1!==n0&&L.q3!==n0&&L.med>=L.q1&&L.q3>=L.med){var j=q("lowerfence");L.lf=j!==n0&&j<=L.q1?j:M1e(L,C,S);var N=q("upperfence");L.uf=N!==n0&&N>=L.q3?N:E1e(L,C,S);var H=q("mean");L.mean=H!==n0?H:S?yh.mean(C,S):(L.q1+L.q3)/2;var re=q("sd");L.sd=H!==n0&&re>=0?re:S?yh.stdev(C,S,L.mean):L.q3-L.q1,L.lo=k1e(L),L.uo=C1e(L);var oe=q("notchspan");oe=oe!==n0&&oe>0?oe:L1e(L,S),L.ln=L.med-oe,L.un=L.med+oe;var _e=L.lf,ke=L.uf;r.boxpoints&&C.length&&(_e=Math.min(_e,C[0]),ke=Math.max(ke,C[S-1])),r.notched&&(_e=Math.min(_e,L.ln),ke=Math.max(ke,L.un)),L.min=_e,L.max=ke}else{yh.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(`
|
||
`));var Ce;L.med!==n0?Ce=L.med:L.q1!==n0?L.q3!==n0?Ce=(L.q1+L.q3)/2:Ce=L.q1:L.q3!==n0?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),G=Math.max(G,L.max),L.pts2=x.filter(E),o.push(L)}}r._extremes[c._id]=QI.findExtremes(c,[U,G],{padded:!0})}else{var ge=c.makeCalcdata(r,f),ie=O_t(M,T),Se=M.length,Ee=B_t(Se);for(l=0;l<r._length;l++)if(P=ge[l],!!BV(P)){var we=yh.findBin(b[l],ie);we>=0&&we<Se&&(g={v:P,i:l},T1e(g,r,l),Ee[we].push(g))}var De=1/0,Le=-1/0,me=r.quartilemethod,Pe=me==="exclusive",ce=me==="inclusive";for(l=0;l<Se;l++)if(Ee[l].length>0){if(L={},L.pos=L[d]=M[l],x=L.pts=Ee[l].sort(A1e),C=L[f]=x.map(S1e),S=C.length,L.min=C[0],L.max=C[S-1],L.mean=yh.mean(C,S),L.sd=yh.stdev(C,S,L.mean)*r.sdmultiple,L.med=yh.interp(C,.5),S%2&&(Pe||ce)){var He,lt;Pe?(He=C.slice(0,S/2),lt=C.slice(S/2+1)):ce&&(He=C.slice(0,S/2+1),lt=C.slice(S/2)),L.q1=yh.interp(He,.5),L.q3=yh.interp(lt,.5)}else L.q1=yh.interp(C,.25),L.q3=yh.interp(C,.75);L.lf=M1e(L,C,S),L.uf=E1e(L,C,S),L.lo=k1e(L),L.uo=C1e(L);var mt=L1e(L,S);L.ln=L.med-mt,L.un=L.med+mt,De=Math.min(De,L.ln),Le=Math.max(Le,L.un),L.pts2=x.filter(E),o.push(L)}r.notched&&yh.isTypedArray(ge)&&(ge=Array.from(ge)),r._extremes[c._id]=QI.findExtremes(c,r.notched?ge.concat([De,Le]):ge,{padded:!0})}return N_t(o,r),o.length>0?(o[0].t={num:n[s],dPos:T,posLetter:d,valLetter:f,labels:{med:Hy(t,"median:"),min:Hy(t,"min:"),q1:Hy(t,"q1:"),q3:Hy(t,"q3:"),max:Hy(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Hy(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Hy(t,"mean:"),lf:Hy(t,"lower fence:"),uf:Hy(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function q_t(e,t,r,n){var i=t in e,a=t+"0"in e,o="d"+t in e;if(i||a&&o){var s=r.makeCalcdata(e,t),l=z_t(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+"0"]:"name"in e&&(r.type==="category"||BV(e.name)&&["linear","log"].indexOf(r.type)!==-1||yh.isDateTime(e.name)&&r.type==="date")?u=e.name:u=n;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,h=new Array(f),d=0;d<f;d++)h[d]=c;return[h]}function O_t(e,t){for(var r=e.length,n=new Array(r+1),i=0;i<r;i++)n[i]=e[i]-t;return n[r]=e[r-1]+t,n}function B_t(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=[];return t}var OV={text:"tx",hovertext:"htx"};function T1e(e,t,r){for(var n in OV)yh.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?yh.isArrayOrTypedArray(t[n][r[0]])&&(e[OV[n]]=t[n][r[0]][r[1]]):e[OV[n]]=t[n][r])}function N_t(e,t){if(yh.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r<e.length;r++){for(var n=e[r].pts||[],i={},a=0;a<n.length;a++)i[n[a].i]=a;yh.tagSelected(n,t,i)}}function A1e(e,t){return e.v-t.v}function S1e(e){return e.v}function M1e(e,t,r){return r===0?e.q1:Math.min(e.q1,t[Math.min(yh.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function E1e(e,t,r){return r===0?e.q3:Math.max(e.q3,t[Math.max(yh.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function k1e(e){return 4*e.q1-3*e.q3}function C1e(e){return 4*e.q3-3*e.q1}function L1e(e,t){return t===0?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}});var e8=ye((kur,F1e)=>{"use strict";var I1e=ho(),U_t=Pr(),V_t=Kb().getAxisGroup,R1e=["v","h"];function G_t(e,t){for(var r=e.calcdata,n=t.xaxis,i=t.yaxis,a=0;a<R1e.length;a++){for(var o=R1e[a],s=o==="h"?i:n,l=[],u=0;u<r.length;u++){var c=r[u],f=c[0].t,h=c[0].trace;h.visible===!0&&(h.type==="box"||h.type==="candlestick")&&!f.empty&&(h.orientation||"v")===o&&h.xaxis===n._id&&h.yaxis===i._id&&l.push(u)}D1e("box",e,l,s)}}function D1e(e,t,r,n){var i=t.calcdata,a=t._fullLayout,o=n._id,s=o.charAt(0),l,u,c,f=[],h=0;for(l=0;l<r.length;l++)for(c=i[r[l]],u=0;u<c.length;u++)f.push(n.c2l(c[u].pos,!0)),h+=(c[u].pts2||[]).length;if(f.length){var d=U_t.distinctVals(f);(n.type==="category"||n.type==="multicategory")&&(d.minDiff=1);var v=d.minDiff/2;I1e.minDtick(n,d.minDiff,d.vals[0],!0);var m=e==="violin"?"_numViolins":"_numBoxes",b=a[m],p=a[e+"mode"]==="group"&&b>1,k=1-a[e+"gap"],M=1-a[e+"groupgap"];for(l=0;l<r.length;l++){c=i[r[l]];var T=c[0].trace,L=c[0].t,x=T.width,C=T.side,S,g,P,E;if(x)S=g=E=x/2,P=0;else if(S=v,p){var z=V_t(a,n._id)+T.orientation,q=a._alignmentOpts[z]||{},U=q[T.alignmentgroup]||{},G=Object.keys(U.offsetGroups||{}).length,Z=G||b,j=G?T._offsetIndex:L.num;g=S*k*M/Z,P=2*S*(-.5+(j+.5)/Z)*k,E=S*k/Z}else g=S*k*M,P=0,E=S;L.dPos=S,L.bPos=P,L.bdPos=g,L.wHover=E;var N,H,re=P+g,oe,_e,ke,Ce,ge,ie,Se=!!x,Ee=(T.boxpoints||T.points)&&h>0;if(C==="positive"?(N=S*(x?1:.5),oe=re,H=oe=P):C==="negative"?(N=oe=P,H=S*(x?1:.5),_e=re):(N=H=S,oe=_e=re),Ee){var we=T.pointpos,De=T.jitter,Le=T.marker.size/2,me=0;we+De>=0&&(me=re*(we+De),me>N?(Se=!0,ge=Le,ke=me):me>oe&&(ge=Le,ke=N)),me<=N&&(ke=N);var Pe=0;we-De<=0&&(Pe=-re*(we-De),Pe>H?(Se=!0,ie=Le,Ce=Pe):Pe>_e&&(ie=Le,Ce=H)),Pe<=H&&(Ce=H)}else ke=N,Ce=H;var ce=new Array(c.length);for(u=0;u<c.length;u++)ce[u]=c[u].pos;T._extremes[o]=I1e.findExtremes(n,ce,{padded:Se,vpadminus:Ce,vpadplus:ke,vpadLinearized:!0,ppadminus:{x:ie,y:ge}[s],ppadplus:{x:ge,y:ie}[s]})}}}F1e.exports={crossTraceCalc:G_t,setPositionOffset:D1e}});var t8=ye((Cur,N1e)=>{"use strict";var FT=qa(),v2=Pr(),H_t=So(),z1e=5,j_t=.01;function W_t(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;v2.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=FT.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var h,d;f.orientation==="h"?(h=o,d=a):(h=a,d=o),q1e(l,{pos:h,val:d},f,c,i),O1e(l,{x:a,y:o},f,c),B1e(l,{pos:h,val:d},f,c)})}function q1e(e,t,r,n,i){var a=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,v=r.notched||!1,m=v?1-2*r.notchwidth:1,b,p;Array.isArray(n.bdPos)?(b=n.bdPos[0],p=n.bdPos[1]):(b=n.bdPos,p=n.bdPos);var k=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?v2.identity:[]);k.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","box"),k.exit().remove(),k.each(function(M){if(M.empty)return FT.select(this).attr("d","M0,0Z");var T=s.c2l(M.pos+u,!0),L=s.l2p(T-b)+f,x=s.l2p(T+p)+f,C=l?(L+x)/2:s.l2p(T)+f,S=r.whiskerwidth,g=l?L*S+(1-S)*C:s.l2p(T-c)+f,P=l?x*S+(1-S)*C:s.l2p(T+c)+f,E=s.l2p(T-b*m)+f,z=s.l2p(T+p*m)+f,q=r.sizemode==="sd",U=o.c2p(q?M.mean-M.sd:M.q1,!0),G=q?o.c2p(M.mean+M.sd,!0):o.c2p(M.q3,!0),Z=v2.constrain(q?o.c2p(M.mean,!0):o.c2p(M.med,!0),Math.min(U,G)+1,Math.max(U,G)-1),j=M.lf===void 0||r.boxpoints===!1||q,N=o.c2p(j?M.min:M.lf,!0),H=o.c2p(j?M.max:M.uf,!0),re=o.c2p(M.ln,!0),oe=o.c2p(M.un,!0);a?FT.select(this).attr("d","M"+Z+","+E+"V"+z+"M"+U+","+L+"V"+x+(v?"H"+re+"L"+Z+","+z+"L"+oe+","+x:"")+"H"+G+"V"+L+(v?"H"+oe+"L"+Z+","+E+"L"+re+","+L:"")+"Z"+(d?"M"+U+","+C+"H"+N+"M"+G+","+C+"H"+H+(h===0?"":"M"+N+","+g+"V"+P+"M"+H+","+g+"V"+P):"")):FT.select(this).attr("d","M"+E+","+Z+"H"+z+"M"+L+","+U+"H"+x+(v?"V"+re+"L"+z+","+Z+"L"+x+","+oe:"")+"V"+G+"H"+L+(v?"V"+oe+"L"+E+","+Z+"L"+L+","+re:"")+"Z"+(d?"M"+C+","+U+"V"+N+"M"+C+","+G+"V"+H+(h===0?"":"M"+g+","+N+"H"+P+"M"+g+","+H+"H"+P):""))})}function O1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;v2.seedPseudoRandom();var u=function(h){return h.forEach(function(d){d.t=n,d.trace=r}),h},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(h){var d,v=h.pts2,m=Math.max((h.max-h.min)/10,h.q3-h.q1),b=m*1e-9,p=m*j_t,k=[],M=0,T;if(r.jitter){if(m===0)for(M=1,k=new Array(v.length),d=0;d<v.length;d++)k[d]=1;else for(d=0;d<v.length;d++){var L=Math.max(0,d-z1e),x=v[L].v,C=Math.min(v.length-1,d+z1e),S=v[C].v;l!=="all"&&(v[d].v<h.lf?S=Math.min(S,h.lf):x=Math.max(x,h.uf));var g=Math.sqrt(p*(C-L)/(S-x+b))||0;g=v2.constrain(Math.abs(g),0,1),k.push(g),M=Math.max(g,M)}T=r.jitter*2/(M||1)}for(d=0;d<v.length;d++){var P=v[d],E=P.v,z=r.jitter?T*k[d]*(v2.pseudoRandom()-.5):0,q=h.pos+s+o*(r.pointpos+z);r.orientation==="h"?(P.y=q,P.x=E):(P.x=q,P.y=E),l==="suspectedoutliers"&&E<h.uo&&E>h.lo&&(P.so=!0)}return v});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(H_t.translatePoints,i,a)}function B1e(e,t,r,n){var i=t.val,a=t.pos,o=!!a.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?v2.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var v=a.c2l(d.pos+s,!0),m=a.l2p(v-c)+l,b=a.l2p(v+f)+l,p=o?(m+b)/2:a.l2p(v)+l,k=i.c2p(d.mean,!0),M=i.c2p(d.mean-d.sd,!0),T=i.c2p(d.mean+d.sd,!0);r.orientation==="h"?FT.select(this).attr("d","M"+k+","+m+"V"+b+(u==="sd"?"m0,0L"+M+","+p+"L"+k+","+m+"L"+T+","+p+"Z":"")):FT.select(this).attr("d","M"+m+","+k+"H"+b+(u==="sd"?"m0,0L"+p+","+M+"L"+m+","+k+"L"+p+","+T+"Z":""))})}N1e.exports={plot:W_t,plotBoxAndWhiskers:q1e,plotPoints:O1e,plotBoxMean:B1e}});var r8=ye((Lur,U1e)=>{"use strict";var UV=qa(),VV=ka(),GV=So();function X_t(e,t,r){var n=r||UV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=UV.select(this),o=i[0].trace,s=o.line.width;function l(f,h,d,v){f.style("stroke-width",h+"px").call(VV.stroke,d).call(VV.fill,v)}var u=a.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var h=UV.select(this),d=o[f.dir];l(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(VV.stroke,o.line.color);var c=a.selectAll("path.point");GV.pointStyle(c,o,e)}})}function Z_t(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?GV.selectedPointStyle(i,n):GV.pointStyle(i,n,e)}U1e.exports={style:X_t,styleOnSelect:Z_t}});var jV=ye((Pur,j1e)=>{"use strict";var Y_t=ho(),HV=Pr(),R_=vf(),V1e=ka(),K_t=HV.fillText;function J_t(e,t,r,n){var i=e.cd,a=i[0].trace,o=a.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(G1e(e,t,r,n))),o.indexOf("points")!==-1&&(l=H1e(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function G1e(e,t,r,n){var i=e.cd,a=e.xa,o=e.ya,s=i[0].trace,l=i[0].t,u=s.type==="violin",c,f,h,d,v,m,b,p,k,M,T,L=l.bdPos,x,C,S=l.wHover,g=function(Le){return h.c2l(Le.pos)+l.bPos-h.c2l(m)};u&&s.side!=="both"?(s.side==="positive"&&(k=function(Le){var me=g(Le);return R_.inbox(me,me+S,M)},x=L,C=0),s.side==="negative"&&(k=function(Le){var me=g(Le);return R_.inbox(me-S,me,M)},x=0,C=L)):(k=function(Le){var me=g(Le);return R_.inbox(me-S,me+S,M)},x=C=L);var P;u?P=function(Le){return R_.inbox(Le.span[0]-v,Le.span[1]-v,M)}:P=function(Le){return R_.inbox(Le.min-v,Le.max-v,M)},s.orientation==="h"?(v=t,m=r,b=P,p=k,c="y",h=o,f="x",d=a):(v=r,m=t,b=k,p=P,c="x",h=a,f="y",d=o);var E=Math.min(1,L/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));M=e.maxHoverDistance-E,T=e.maxSpikeDistance-E;function z(Le){return(b(Le)+p(Le))/2}var q=R_.getDistanceFunction(n,b,p,z);if(R_.getClosest(i,q,e),e.index===!1)return[];var U=i[e.index],G=s.line.color,Z=(s.marker||{}).color;V1e.opacity(G)&&s.line.width?e.color=G:V1e.opacity(Z)&&s.boxpoints?e.color=Z:e.color=s.fillcolor,e[c+"0"]=h.c2p(U.pos+l.bPos-C,!0),e[c+"1"]=h.c2p(U.pos+l.bPos+x,!0),e[c+"LabelVal"]=U.orig_p!==void 0?U.orig_p:U.pos;var j=c+"Spike";e.spikeDistance=z(U)*T/M,e[j]=h.c2p(U.pos,!0);var N=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,H=s.boxpoints||s.points,re=H&&N?["max","uf","q3","med","mean","q1","lf","min"]:H&&!N?["max","uf","q3","med","q1","lf","min"]:!H&&N?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],oe=d.range[1]<d.range[0];s.orientation===(oe?"v":"h")&&re.reverse();for(var _e=e.spikeDistance,ke=e[j],Ce=[],ge=0;ge<re.length;ge++){var ie=re[ge];if(ie in U){var Se=U[ie],Ee=d.c2p(Se,!0),we=HV.extendFlat({},e);we.attr=ie,we[f+"0"]=we[f+"1"]=Ee,we[f+"LabelVal"]=Se,we[f+"Label"]=(l.labels?l.labels[ie]+" ":"")+Y_t.hoverLabelText(d,Se,s[f+"hoverformat"]),we.hoverOnBox=!0,ie==="mean"&&"sd"in U&&(s.boxmean==="sd"||s.sizemode==="sd")&&(we[f+"err"]=U.sd),we.hovertemplate=!1,Ce.push(we)}}e.name="",e.spikeDistance=void 0,e[j]=void 0;for(var De=0;De<Ce.length;De++)Ce[De].attr!=="med"?(Ce[De].name="",Ce[De].spikeDistance=void 0,Ce[De][j]=void 0):(Ce[De].spikeDistance=_e,Ce[De][j]=ke);return Ce}function H1e(e,t,r){for(var n=e.cd,i=e.xa,a=e.ya,o=n[0].trace,s=i.c2p(t),l=a.c2p(r),u,c=function(P){var E=Math.max(3,P.mrc||0);return Math.max(Math.abs(i.c2p(P.x)-s)-E,1-3/E)},f=function(P){var E=Math.max(3,P.mrc||0);return Math.max(Math.abs(a.c2p(P.y)-l)-E,1-3/E)},h=R_.quadrature(c,f),d=!1,v,m,b=0;b<n.length;b++){v=n[b];for(var p=0;p<(v.pts||[]).length;p++){m=v.pts[p];var k=h(m);k<=e.distance&&(e.distance=k,d=[b,p])}}if(!d)return!1;v=n[d[0]],m=v.pts[d[1]];var M=i.c2p(m.x,!0),T=a.c2p(m.y,!0),L=m.mrc||1;u=HV.extendFlat({},e,{index:m.i,color:(o.marker||{}).color,name:o.name,x0:M-L,x1:M+L,y0:T-L,y1:T+L,spikeDistance:e.distance,hovertemplate:o.hovertemplate});var x=v.orig_p,C=x!==void 0?x:v.pos,S;o.orientation==="h"?(S=a,u.xLabelVal=m.x,u.yLabelVal=C):(S=i,u.xLabelVal=C,u.yLabelVal=m.y);var g=S._id.charAt(0);return u[g+"Spike"]=S.c2p(v.pos,!0),K_t(m,o,u),u}j1e.exports={hoverPoints:J_t,hoverOnBoxes:G1e,hoverOnPoints:H1e}});var X1e=ye((Iur,W1e)=>{"use strict";W1e.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var WV=ye((Rur,Z1e)=>{"use strict";Z1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s<n.length;s++)for(l=0;l<(n[s].pts||[]).length;l++)n[s].pts[l].selected=0;else for(s=0;s<n.length;s++)for(l=0;l<(n[s].pts||[]).length;l++){var u=n[s].pts[l],c=i.c2p(u.x),f=a.c2p(u.y);r.contains([c,f],null,u.i,t)?(o.push({pointNumber:u.i,x:i.c2d(u.x),y:a.c2d(u.y)}),u.selected=1):u.selected=0}return o}});var K1e=ye((Dur,Y1e)=>{"use strict";Y1e.exports={attributes:k4(),layoutAttributes:C4(),supplyDefaults:P4().supplyDefaults,crossTraceDefaults:P4().crossTraceDefaults,supplyLayoutDefaults:$I().supplyLayoutDefaults,calc:NV(),crossTraceCalc:e8().crossTraceCalc,plot:t8().plot,style:r8().style,styleOnSelect:r8().styleOnSelect,hoverPoints:jV().hoverPoints,eventData:X1e(),selectPoints:WV(),moduleType:"trace",name:"box",basePlotModule:mh(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var $1e=ye((Fur,J1e)=>{"use strict";J1e.exports=K1e()});var zT=ye((zur,e_e)=>{"use strict";var $_t=Tu(),{extendFlat:Pp}=Ao(),Q_t=Gl(),{axisHoverFormat:XV}=df(),ext=ec(),{hovertemplateAttrs:txt,templatefallbackAttrs:Q1e,texttemplateAttrs:rxt}=Ll(),a0=pf();e_e.exports=Pp({z:{valType:"data_array",editType:"calc"},x:Pp({},a0.x,{impliedEdits:{xtype:"array"}}),x0:Pp({},a0.x0,{impliedEdits:{xtype:"scaled"}}),dx:Pp({},a0.dx,{impliedEdits:{xtype:"scaled"}}),y:Pp({},a0.y,{impliedEdits:{ytype:"array"}}),y0:Pp({},a0.y0,{impliedEdits:{ytype:"scaled"}}),dy:Pp({},a0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:Pp({},a0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:Pp({},a0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:Pp({},a0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:Pp({},a0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:Pp({},a0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:Pp({},a0.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:XV("x"),yhoverformat:XV("y"),zhoverformat:XV("z",1),hovertemplate:txt(),hovertemplatefallback:Q1e(),texttemplate:rxt({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:Q1e({editType:"plot"}),textfont:ext({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Pp({},Q_t.showlegend,{dflt:!1}),zorder:a0.zorder},$_t("",{cLetter:"z",autoColorDflt:!1}))});var n8=ye((qur,r_e)=>{"use strict";var ixt=Eo(),i8=Pr(),nxt=Oa();r_e.exports=function(t,r,n,i,a,o){var s=n("z");a=a||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(i8.isArray1D(s)){l=n(a),u=n(o);var c=i8.minRowLength(l),f=i8.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=t_e(a,n),u=t_e(o,n),!axt(s))return 0;n("transpose"),r._length=null}var h=nxt.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],i),!0};function t_e(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function axt(e){for(var t=!0,r=!1,n=!1,i,a=0;a<e.length;a++){if(i=e[a],!i8.isArrayOrTypedArray(i)){t=!1;break}i.length>0&&(r=!0);for(var o=0;o<i.length;o++)if(ixt(i[o])){n=!0;break}}return t&&r&&n}});var I4=ye((Our,n_e)=>{"use strict";var i_e=Pr();n_e.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var n=i_e.extendFlat({},r.font,{color:"auto",size:"auto"});i_e.coerceFont(t,"textfont",n)}});var ZV=ye((Bur,a_e)=>{"use strict";a_e.exports=function(t,r,n){var i=n("zsmooth");i===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var l_e=ye((Nur,s_e)=>{"use strict";var o_e=Pr(),oxt=n8(),sxt=I4(),lxt=Dg(),uxt=ZV(),cxt=td(),fxt=zT();s_e.exports=function(t,r,n,i){function a(s,l){return o_e.coerce(t,r,fxt,s,l)}var o=oxt(t,r,a,i);if(!o){r.visible=!1;return}lxt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),sxt(a,i),uxt(t,r,a,i),a("hoverongaps"),a("connectgaps",o_e.isArray1D(r.z)&&r.zsmooth!==!1),cxt(t,r,i,a,{prefix:"",cLetter:"z"}),a("zorder")}});var YV=ye((Uur,u_e)=>{"use strict";var qT=Eo();u_e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return qT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return qT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(qT(i))if(i=Number(i),qT(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(qT(i))if(i=Number(i),qT(r[e])){if(r[e]<i){var a=i-r[e];return r[e]=i,a}}else return r[e]=i,i;return 0}}});var KV=ye((Vur,c_e)=>{"use strict";c_e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i<r;i++)e[i]*=n},probability:function(e,t){for(var r=e.length,n=0;n<r;n++)e[n]/=t},density:function(e,t,r,n){var i=e.length;n=n||1;for(var a=0;a<i;a++)e[a]*=r[a]*n},"probability density":function(e,t,r,n){var i=e.length;n&&(t/=n);for(var a=0;a<i;a++)e[a]*=r[a]/t}}});var JV=ye((Gur,f_e)=>{"use strict";f_e.exports=function(t,r){for(var n=t.length,i=0,a=0;a<n;a++)r[a]?(t[a]/=r[a],i+=t[a]):t[a]=null;return i}});var $V=ye((Hur,__e)=>{"use strict";var OT=fs(),p2=OT.ONEAVGYEAR,h_e=OT.ONEAVGMONTH,o8=OT.ONEDAY,d_e=OT.ONEHOUR,v_e=OT.ONEMIN,p_e=OT.ONESEC,g_e=ho().tickIncrement;__e.exports=function(t,r,n,i,a){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min(a8(u+s,u+l,i,a),a8(c+s,c+l,i,a)),h=Math.min(a8(u+o,u+s,i,a),a8(c+o,c+s,i,a)),d,v;if(f>h&&h<Math.abs(c-u)/4e3?(d=f,v=!1):(d=Math.min(f,h),v=!0),i.type==="date"&&d>o8){var m=d===p2?1:6,b=d===p2?"M12":"M1";return function(p,k){var M=i.c2d(p,p2,a),T=M.indexOf("-",m);T>0&&(M=M.slice(0,T));var L=i.d2c(M,0,a);if(L<p){var x=g_e(L,b,!1,a);(L+x)/2<p+t&&(L=x)}return k&&v?g_e(L,b,!0,a):L}}return function(p,k){var M=d*Math.round(p/d);return M+d/10<p&&M+d*.9<p+t&&(M+=d),k&&v&&(M-=d),M}};function a8(e,t,r,n){if(e*t<=0)return 1/0;for(var i=Math.abs(t-e),a=r.type==="date",o=m_e(i,a),s=0;s<10;s++){var l=m_e(o*80,a);if(o===l)break;if(hxt(l,e,t,a,r,n))o=l;else break}return o}function m_e(e,t){return t&&e>p_e?e>o8?e>p2*1.1?p2:e>h_e*1.1?h_e:o8:e>d_e?d_e:e>v_e?v_e:p_e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function hxt(e,t,r,n,i,a){if(n&&e>o8){var o=y_e(t,i,a),s=y_e(r,i,a),l=e===p2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function y_e(e,t,r){var n=t.c2d(e,p2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var tG=ye((jur,A_e)=>{"use strict";var QV=Eo(),Hv=Pr(),x_e=Oa(),j0=ho(),{hasColorscale:b_e}=pv(),w_e=gv(),dxt=A4(),T_e=YV(),vxt=KV(),pxt=JV(),gxt=$V();function mxt(e,t){var r=[],n=[],i=t.orientation==="h",a=j0.getFromId(e,i?t.yaxis:t.xaxis),o=i?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=eG(e,t,a,o),h=f[0],d=f[1],v=typeof h.size=="string",m=[],b=v?m:h,p=[],k=[],M=[],T=0,L=t.histnorm,x=t.histfunc,C=L.indexOf("density")!==-1,S,g,P;u.enabled&&C&&(L=L.replace(/ ?density$/,""),C=!1);var E=x==="max"||x==="min",z=E?null:0,q=T_e.count,U=vxt[L],G=!1,Z=function(me){return a.r2c(me,0,l)},j;for(Hv.isArrayOrTypedArray(t[s])&&x!=="count"&&(j=t[s],G=x==="avg",q=T_e[x]),c=Z(h.start),g=Z(h.end)+(c-j0.tickIncrement(c,h.size,!1,l))/1e6;c<g&&r.length<1e6&&(S=j0.tickIncrement(c,h.size,!1,l),r.push((c+S)/2),n.push(z),M.push([]),m.push(c),C&&p.push(1/(S-c)),G&&k.push(0),!(S<=c));)c=S;m.push(c),!v&&a.type==="date"&&(b={start:Z(b.start),end:Z(b.end),size:b.size}),e._fullLayout._roundFnOpts||(e._fullLayout._roundFnOpts={});var N=t["_"+o+"bingroup"],H={leftGap:1/0,rightGap:1/0};N&&(e._fullLayout._roundFnOpts[N]||(e._fullLayout._roundFnOpts[N]=H),H=e._fullLayout._roundFnOpts[N]);var re=n.length,oe=!0,_e=H.leftGap,ke=H.rightGap,Ce={};for(c=0;c<d.length;c++){var ge=d[c];P=Hv.findBin(ge,b),P>=0&&P<re&&(T+=q(P,c,n,j,k),oe&&M[P].length&&ge!==d[M[P][0]]&&(oe=!1),M[P].push(c),Ce[c]=P,_e=Math.min(_e,ge-m[P]),ke=Math.min(ke,m[P+1]-ge))}H.leftGap=_e,H.rightGap=ke;var ie;oe||(ie=function(me,Pe){return function(){var ce=e._fullLayout._roundFnOpts[N];return gxt(ce.leftGap,ce.rightGap,m,a,l)(me,Pe)}}),G&&(T=pxt(n,k)),U&&U(n,T,p),u.enabled&&xxt(n,u.direction,u.currentbin);var Se=Math.min(r.length,n.length),Ee=[],we=0,De=Se-1;for(c=0;c<Se;c++)if(n[c]){we=c;break}for(c=Se-1;c>=we;c--)if(n[c]){De=c;break}for(c=we;c<=De;c++)if(QV(r[c])&&QV(n[c])){var Le={p:r[c],s:n[c],b:0};u.enabled||(Le.pts=M[c],oe?Le.ph0=Le.ph1=M[c].length?d[M[c][0]]:r[c]:(t._computePh=!0,Le.ph0=ie(m[c]),Le.ph1=ie(m[c+1],!0))),Ee.push(Le)}return Ee.length===1&&(Ee[0].width1=j0.tickIncrement(Ee[0].p,h.size,!1,l)-Ee[0].p),b_e(t,"marker")&&w_e(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),b_e(t,"marker.line")&&w_e(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),dxt(Ee,t),Hv.isArrayOrTypedArray(t.selectedpoints)&&Hv.tagSelected(Ee,t,Ce),Ee}function eG(e,t,r,n,i){var a=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,h,d,v,m,b,p=function(ge){return r.r2c(ge,0,d)},k=function(ge){return r.c2r(ge,0,d)},M=r.type==="date"?function(ge){return ge||ge===0?Hv.cleanDate(ge,null,d):null}:function(ge){return QV(ge)?Number(ge):null};function T(ge,ie,Se){ie[ge+"Found"]?(ie[ge]=M(ie[ge]),ie[ge]===null&&(ie[ge]=Se[ge])):(m[ge]=ie[ge]=Se[ge],Hv.nestedProperty(f[0],a+"."+ge).set(Se[ge]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var L=[],x=!0,C=!1,S=!1;for(c=0;c<f.length;c++)if(h=f[c],h.visible){var g=l.dirs[c];v=h["_"+g+"pos0"]=r.makeCalcdata(h,g),L=Hv.concat(L,v),delete h["_"+n+"autoBinFinished"],t.visible===!0&&(x?x=!1:(delete h._autoBin,h["_"+n+"autoBinFinished"]=1),x_e.traceIs(h,"2dMap")&&(C=!0),h.type==="histogram2dcontour"&&(S=!0))}d=f[0][n+"calendar"];var P=j0.autoBin(L,r,l.nbins,C,d,l.sizeFound&&l.size),E=f[0]._autoBin={};if(m=E[l.dirs[0]]={},S&&(l.size||(P.start=k(j0.tickIncrement(p(P.start),P.size,!0,d))),l.end===void 0&&(P.end=k(j0.tickIncrement(p(P.end),P.size,!1,d)))),u&&!x_e.traceIs(t,"2dMap")&&P._dataSpan===0&&r.type!=="category"&&r.type!=="multicategory"&&t.bingroup===""&&typeof t.xbins=="undefined"){if(i)return[P,v,!0];P=yxt(e,t,r,n,a)}b=h.cumulative||{},b.enabled&&b.currentbin!=="include"&&(b.direction==="decreasing"?P.start=k(j0.tickIncrement(p(P.start),P.size,!0,d)):P.end=k(j0.tickIncrement(p(P.end),P.size,!1,d))),l.size=P.size,l.sizeFound||(m.size=P.size,Hv.nestedProperty(f[0],a+".size").set(P.size)),T("start",l,P),T("end",l,P)}v=t["_"+n+"pos0"],delete t["_"+n+"pos0"];var z=t._input[a]||{},q=Hv.extendFlat({},l),U=l.start,G=r.r2l(z.start),Z=G!==void 0;if((l.startFound||Z)&&G!==r.r2l(U)){var j=Z?G:Hv.aggNums(Math.min,null,v),N={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:l.size,tick0:U,calendar:d,range:[j,j0.tickIncrement(j,l.size,!1,d)].map(r.l2r)},H=j0.tickFirst(N);H>r.r2l(j)&&(H=j0.tickIncrement(H,l.size,!0,d)),q.start=r.l2r(H),Z||Hv.nestedProperty(t,a+".start").set(q.start)}var re=l.end,oe=r.r2l(z.end),_e=oe!==void 0;if((l.endFound||_e)&&oe!==r.r2l(re)){var ke=_e?oe:Hv.aggNums(Math.max,null,v);q.end=r.l2r(ke),_e||Hv.nestedProperty(t,a+".start").set(q.end)}var Ce="autobin"+n;return t._input[Ce]===!1&&(t._input[a]=Hv.extendFlat({},t[a]||{}),delete t._input[Ce],delete t[Ce]),[q,v]}function yxt(e,t,r,n,i){var a=e._fullLayout,o=_xt(e,t),s=!1,l=1/0,u=[t],c,f,h;for(c=0;c<o.length;c++)if(f=o[c],f===t)s=!0;else if(!s)h=a._histogramBinOpts[f["_"+n+"bingroup"]],l=Math.min(l,h.size||f[i].size);else{var d=eG(e,f,r,n,!0),v=d[0],m=d[2];f["_"+n+"autoBinFinished"]=1,f["_"+n+"pos0"]=d[1],m?u.push(f):l=Math.min(l,v.size)}var b=new Array(u.length);for(c=0;c<u.length;c++)for(var p=u[c]["_"+n+"pos0"],k=0;k<p.length;k++)if(p[k]!==void 0){b[c]=p[k];break}for(isFinite(l)||(l=Hv.distinctVals(b).minDiff),c=0;c<u.length;c++){f=u[c];var M=f[n+"calendar"],T={start:r.c2r(b[c]-l/2,0,M),end:r.c2r(b[c]+l/2,0,M),size:l};f._input[i]=f[i]=T,h=a._histogramBinOpts[f["_"+n+"bingroup"]],h&&Hv.extendFlat(h,T)}return t[i]}function _xt(e,t){for(var r=t.xaxis,n=t.yaxis,i=t.orientation,a=[],o=e._fullData,s=0;s<o.length;s++){var l=o[s];l.type==="histogram"&&l.visible===!0&&l.orientation===i&&l.xaxis===r&&l.yaxis===n&&a.push(l)}return a}function xxt(e,t,r){var n,i,a;function o(l){a=e[l],e[l]/=2}function s(l){i=e[l],e[l]=a+i/2,a+=i}if(r==="half")if(t==="increasing")for(o(0),n=1;n<e.length;n++)s(n);else for(o(e.length-1),n=e.length-2;n>=0;n--)s(n);else if(t==="increasing"){for(n=1;n<e.length;n++)e[n]+=e[n-1];r==="exclude"&&(e.unshift(0),e.pop())}else{for(n=e.length-2;n>=0;n--)e[n]+=e[n+1];r==="exclude"&&(e.push(0),e.shift())}}A_e.exports={calc:mxt,calcAllAutoBins:eG}});var I_e=ye((Wur,P_e)=>{"use strict";var S_e=Pr(),BT=ho(),M_e=YV(),bxt=KV(),wxt=JV(),Txt=$V(),E_e=tG().calcAllAutoBins;P_e.exports=function(t,r){var n=BT.getFromId(t,r.xaxis),i=BT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(Et){return n.r2c(Et,0,a)},l=function(Et){return i.r2c(Et,0,o)},u=function(Et){return n.c2r(Et,0,a)},c=function(Et){return i.c2r(Et,0,o)},f,h,d,v,m=E_e(t,r,n,"x"),b=m[0],p=m[1],k=E_e(t,r,i,"y"),M=k[0],T=k[1],L=r._length;p.length>L&&p.splice(L,p.length-L),T.length>L&&T.splice(L,T.length-L);var x=[],C=[],S=[],g=typeof b.size=="string",P=typeof M.size=="string",E=[],z=[],q=g?E:b,U=P?z:M,G=0,Z=[],j=[],N=r.histnorm,H=r.histfunc,re=N.indexOf("density")!==-1,oe=H==="max"||H==="min",_e=oe?null:0,ke=M_e.count,Ce=bxt[N],ge=!1,ie=[],Se=[],Ee="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";Ee&&H!=="count"&&(ge=H==="avg",ke=M_e[H]);var we=b.size,De=s(b.start),Le=s(b.end)+(De-BT.tickIncrement(De,we,!1,a))/1e6;for(f=De;f<Le;f=BT.tickIncrement(f,we,!1,a))C.push(_e),E.push(f),ge&&S.push(0);E.push(f);var me=C.length,Pe=(f-De)/me,ce=u(De+Pe/2),He=M.size,lt=l(M.start),mt=l(M.end)+(lt-BT.tickIncrement(lt,He,!1,o))/1e6;for(f=lt;f<mt;f=BT.tickIncrement(f,He,!1,o)){x.push(C.slice()),z.push(f);var Vt=new Array(me);for(h=0;h<me;h++)Vt[h]=[];j.push(Vt),ge&&Z.push(S.slice())}z.push(f);var st=x.length,ct=(f-lt)/st,Qt=c(lt+ct/2);re&&(ie=k_e(C.length,q,Pe,g),Se=k_e(x.length,U,ct,P)),!g&&n.type==="date"&&(q=C_e(s,q)),!P&&i.type==="date"&&(U=C_e(l,U));var Ht=!0,nr=!0,tt=new Array(me),je=new Array(st),Ue=1/0,Ae=1/0,rt=1/0,St=1/0;for(f=0;f<L;f++){var Tt=p[f],dt=T[f];d=S_e.findBin(Tt,q),v=S_e.findBin(dt,U),d>=0&&d<me&&v>=0&&v<st&&(G+=ke(d,f,x[v],Ee,Z[v]),j[v][d].push(f),Ht&&(tt[d]===void 0?tt[d]=Tt:tt[d]!==Tt&&(Ht=!1)),nr&&(je[v]===void 0?je[v]=dt:je[v]!==dt&&(nr=!1)),Ue=Math.min(Ue,Tt-E[d]),Ae=Math.min(Ae,E[d+1]-Tt),rt=Math.min(rt,dt-z[v]),St=Math.min(St,z[v+1]-dt))}if(ge)for(v=0;v<st;v++)G+=wxt(x[v],Z[v]);if(Ce)for(v=0;v<st;v++)Ce(x[v],G,ie,Se[v]);return{x:p,xRanges:L_e(E,Ht&&tt,Ue,Ae,n,a),x0:ce,dx:Pe,y:T,yRanges:L_e(z,nr&&je,rt,St,i,o),y0:Qt,dy:ct,z:x,pts:j}};function k_e(e,t,r,n){var i=new Array(e),a;if(n)for(a=0;a<e;a++)i[a]=1/(t[a+1]-t[a]);else{var o=1/r;for(a=0;a<e;a++)i[a]=o}return i}function C_e(e,t){return{start:e(t.start),end:e(t.end),size:t.size}}function L_e(e,t,r,n,i,a){var o,s=e.length-1,l=new Array(s),u=Txt(r,n,e,i,a);for(o=0;o<s;o++){var c=(t||[])[o];l[o]=c===void 0?[u(e[o]),u(e[o+1],!0)]:[c,c]}return l}});var s8=ye((Xur,F_e)=>{"use strict";var Om=Pr(),R_e=fs().BADNUM,D_e=zg();F_e.exports=function(t,r,n,i,a,o){var s=t._length,l=r.makeCalcdata(t,i),u=n.makeCalcdata(t,a);l=D_e(t,r,i,l).vals,u=D_e(t,n,a,u).vals;var c=t.text,f=c!==void 0&&Om.isArray1D(c),h=t.hovertext,d=h!==void 0&&Om.isArray1D(h),v,m,b=Om.distinctVals(l),p=b.vals,k=Om.distinctVals(u),M=k.vals,T=[],L,x,C=M.length,S=p.length;for(v=0;v<o.length;v++)T[v]=Om.init2dArray(C,S);f&&(L=Om.init2dArray(C,S)),d&&(x=Om.init2dArray(C,S));var g=Om.init2dArray(C,S);for(v=0;v<s;v++)if(l[v]!==R_e&&u[v]!==R_e){var P=Om.findBin(l[v]+b.minDiff/2,p),E=Om.findBin(u[v]+k.minDiff/2,M);for(m=0;m<o.length;m++){var z=o[m],q=t[z],U=T[m];U[E][P]=q[v],g[E][P]=v}f&&(L[E][P]=c[v]),d&&(x[E][P]=h[v])}for(t["_"+i]=p,t["_"+a]=M,m=0;m<o.length;m++)t["_"+o[m]]=T[m];f&&(t._text=L),d&&(t._hovertext=x),r&&r.type==="category"&&(t["_"+i+"CategoryMap"]=p.map(function(G){return r._categories[G]})),n&&n.type==="category"&&(t["_"+a+"CategoryMap"]=M.map(function(G){return n._categories[G]})),t._after2before=g}});var u8=ye((Zur,z_e)=>{"use strict";var Axt=Eo(),Sxt=Pr(),l8=fs().BADNUM;z_e.exports=function(t,r,n,i){var a,o,s,l,u,c;function f(p){if(Axt(p))return+p}if(r&&r.transpose){for(a=0,u=0;u<t.length;u++)a=Math.max(a,t[u].length);if(a===0)return!1;s=function(p){return p.length},l=function(p,k,M){return(p[M]||[])[k]}}else a=t.length,s=function(p,k){return p[k].length},l=function(p,k,M){return(p[k]||[])[M]};var h=function(p,k,M){return k===l8||M===l8?l8:l(p,k,M)};function d(p){if(r&&r.type!=="carpet"&&r.type!=="contourcarpet"&&p&&p.type==="category"&&r["_"+p._id.charAt(0)].length){var k=p._id.charAt(0),M={},T=r["_"+k+"CategoryMap"]||r[k];for(u=0;u<T.length;u++)M[T[u]]=u;return function(L){var x=M[p._categories[L]];return x+1?x:l8}}else return Sxt.identity}var v=d(n),m=d(i);i&&i.type==="category"&&(a=i._categories.length);var b=new Array(a);for(u=0;u<a;u++)for(n&&n.type==="category"?o=n._categories.length:o=s(t,u),b[u]=new Array(o),c=0;c<o;c++)b[u][c]=f(h(t,m(u),v(c)));return b}});var c8=ye((Yur,B_e)=>{"use strict";var Mxt=Pr(),q_e=.01,Ext=[[-1,0],[1,0],[0,-1],[0,1]];function kxt(e){return .5-.25*Math.min(1,e*.5)}B_e.exports=function(t,r){var n=1,i;for(O_e(t,r),i=0;i<r.length&&!(r[i][2]<4);i++);for(r=r.slice(i),i=0;i<100&&n>q_e;i++)n=O_e(t,r,kxt(n));return n>q_e&&Mxt.log("interp2d didn't converge quickly",n),t};function O_e(e,t,r){var n=0,i,a,o,s,l,u,c,f,h,d,v,m,b;for(s=0;s<t.length;s++){for(i=t[s],a=i[0],o=i[1],v=e[a][o],d=0,h=0,l=0;l<4;l++)u=Ext[l],c=e[a+u[0]],c&&(f=c[o+u[1]],f!==void 0&&(d===0?m=b=f:(m=Math.min(m,f),b=Math.max(b,f)),h++,d+=f));if(h===0)throw"iterateInterp2d order is wrong: no defined neighbors";e[a][o]=d/h,v===void 0?h<4&&(n=1):(e[a][o]=(1+r)*e[a][o]-r*v,b>m&&(n=Math.max(n,Math.abs(e[a][o]-v)/(b-m))))}return n}});var f8=ye((Kur,N_e)=>{"use strict";var Cxt=Pr().maxRowLength;N_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],l=Cxt(t),u,c,f,h,d,v,m,b;for(c=0;c<t.length;c++)for(u=o,o=a,a=t[c+1]||[],f=0;f<l;f++)o[f]===void 0&&(v=(o[f-1]!==void 0?1:0)+(o[f+1]!==void 0?1:0)+(u[f]!==void 0?1:0)+(a[f]!==void 0?1:0),v?(c===0&&v++,f===0&&v++,c===t.length-1&&v++,f===o.length-1&&v++,v<4&&(n[[c,f]]=[c,f,v]),r.push([c,f,v])):i.push([c,f]));for(;i.length;){for(m={},b=!1,d=i.length-1;d>=0;d--)h=i[d],c=h[0],f=h[1],v=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,v&&(m[h]=[c,f,v],i.splice(d,1),b=!0);if(!b)throw"findEmpties iterated with no new neighbors";for(h in m)n[h]=m[h],r.push(m[h])}return r.sort(function(p,k){return k[2]-p[2]})}});var rG=ye((Jur,G_e)=>{"use strict";var U_e=Oa(),V_e=Pr().isArrayOrTypedArray;G_e.exports=function(t,r,n,i,a,o){var s=[],l=U_e.traceIs(t,"contour"),u=U_e.traceIs(t,"histogram"),c,f,h,d=V_e(r)&&r.length>1;if(d&&!u&&o.type!=="category"){var v=r.length;if(v<=a){if(l)s=Array.from(r).slice(0,a);else if(a===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],h=1;h<v;h++)s.push(Math.sqrt(r[h-1]*r[h]));s.push(Math.pow(r[v-1],1.5)/Math.pow(r[v-2],.5))}else{for(s=[1.5*r[0]-.5*r[1]],h=1;h<v;h++)s.push((r[h-1]+r[h])*.5);s.push(1.5*r[v-1]-.5*r[v-2])}if(v<a){var m=s[s.length-1],b;if(o.type==="log")for(b=m/s[s.length-2],h=v;h<a;h++)m*=b,s.push(m);else for(b=m-s[s.length-2],h=v;h<a;h++)m+=b,s.push(m)}}else return l?r.slice(0,a):r.slice(0,a+1)}else{var p=t[o._id.charAt(0)+"calendar"];if(u)c=o.r2c(n,0,p);else if(V_e(r)&&r.length===1)c=r[0];else if(n===void 0)c=0;else{var k=o.type==="log"?o.d2c:o.r2c;c=k(n,0,p)}for(f=i||1,h=l?0:-.5;h<a;h++)s.push(c+f*h)}return s}});var v8=ye(($ur,X_e)=>{"use strict";var H_e=Oa(),iG=Pr(),h8=ho(),j_e=zg(),Lxt=I_e(),Pxt=gv(),Ixt=s8(),Rxt=u8(),Dxt=c8(),Fxt=f8(),d8=rG(),nG=fs().BADNUM;X_e.exports=function(t,r){var n=h8.getFromId(t,r.xaxis||"x"),i=h8.getFromId(t,r.yaxis||"y"),a=H_e.traceIs(r,"contour"),o=H_e.traceIs(r,"histogram"),s=a?"best":r.zsmooth,l,u,c,f,h,d,v,m,b,p,k;if(n._minDtick=0,i._minDtick=0,o)k=Lxt(t,r),f=k.orig_x,l=k.x,u=k.x0,c=k.dx,m=k.orig_y,h=k.y,d=k.y0,v=k.dy,b=k.z;else{var M=r.z;iG.isArray1D(M)?(Ixt(r,n,i,"x","y",["z"]),l=r._x,h=r._y,M=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],m=r.y?i.makeCalcdata(r,"y"):[],l=j_e(r,n,"x",f).vals,h=j_e(r,i,"y",m).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,d=r.y0,v=r.dy,b=Rxt(M,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=zxt(l,h,b),o||(l=W_e(l),h=W_e(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=Fxt(b),Dxt(b,r._emptypoints));function T(q){s=r._input.zsmooth=r.zsmooth=!1,iG.warn('cannot use zsmooth: "fast": '+q)}function L(q){if(q.length>1){var U=(q[q.length-1]-q[0])/(q.length-1),G=Math.abs(U/100);for(p=0;p<q.length-1;p++)if(Math.abs(q[p+1]-q[p]-U)>G)return!1}return!0}r._islinear=!1,n.type==="log"||i.type==="log"?s==="fast"&&T("log axis found"):L(l)?L(h)?r._islinear=!0:s==="fast"&&T("y scale is not linear"):s==="fast"&&T("x scale is not linear");var x=iG.maxRowLength(b),C=r.xtype==="scaled"?"":l,S=d8(r,C,u,c,x,n),g=r.ytype==="scaled"?"":h,P=d8(r,g,d,v,b.length,i);r._extremes[n._id]=h8.findExtremes(n,S),r._extremes[i._id]=h8.findExtremes(i,P);var E={x:S,y:P,z:b,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(E.orig_x=f),r.yperiodalignment&&m&&(E.orig_y=m),C&&C.length===S.length-1&&(E.xCenter=C),g&&g.length===P.length-1&&(E.yCenter=g),o&&(E.xRanges=k.xRanges,E.yRanges=k.yRanges,E.pts=k.pts),a||Pxt(t,r,{vals:b,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var z={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};E.xfill=d8(z,C,u,c,x,n),E.yfill=d8(z,g,d,v,b.length,i)}return[E]};function W_e(e){for(var t=[],r=e.length,n=0;n<r;n++){var i=e[n];i!==nG&&t.push(i)}return t}function zxt(e,t,r){for(var n=[],i=-1,a=0;a<r.length;a++)if(t[a]!==nG){i++,n[i]=[];for(var o=0;o<r[a].length;o++)e[o]!==nG&&n[i].push(r[a][o])}return n}});var g8=ye(p8=>{"use strict";p8.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]];p8.STYLE=p8.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var oG=ye((ecr,Y_e)=>{"use strict";var Z_e=g8(),qxt=So(),aG=Pr(),NT=null;function Oxt(){if(NT!==null)return NT;NT=!1;var e=aG.isSafari()||aG.isMacWKWebView()||aG.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(Z_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")NT=t.some(function(o){return r.apply(null,o)});else{var n=qxt.tester.append("image").attr("style",Z_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;NT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return NT}Y_e.exports=Oxt});var m8=ye((tcr,nxe)=>{"use strict";var K_e=qa(),Bxt=fd(),Nxt=Oa(),Uxt=So(),Vxt=ho(),W0=Pr(),J_e=Zl(),Gxt=lI(),Hxt=ka(),jxt=tc().extractOpts,Wxt=tc().makeColorScaleFuncFromTrace,Xxt=Wp(),Zxt=Dh(),sG=Zxt.LINE_SPACING,Yxt=oG(),Kxt=g8().STYLE,rxe="heatmap-label";function ixe(e){return e.selectAll("g."+rxe)}function $_e(e){ixe(e).remove()}nxe.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;W0.makeTraceGroups(n,r,"hm").each(function(o){var s=K_e.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,h=l.z,d=l.x,v=l.y,m=l.xCenter,b=l.yCenter,p=Nxt.traceIs(u,"contour"),k=p?"best":u.zsmooth,M=h.length,T=W0.maxRowLength(h),L=!1,x=!1,C,S,g,P,E,z,q,U;for(z=0;C===void 0&&z<d.length-1;)C=i.c2p(d[z]),z++;for(z=d.length-1;S===void 0&&z>0;)S=i.c2p(d[z]),z--;for(S<C&&(g=S,S=C,C=g,L=!0),z=0;P===void 0&&z<v.length-1;)P=a.c2p(v[z]),z++;for(z=v.length-1;E===void 0&&z>0;)E=a.c2p(v[z]),z--;E<P&&(g=P,P=E,E=g,x=!0),p&&(m=d,b=v,d=l.xfill,v=l.yfill);var G="default";if(k?G=k==="best"?"smooth":"fast":u._islinear&&c===0&&f===0&&Yxt()&&(G="fast"),G!=="fast"){var Z=k==="best"?0:.5;C=Math.max(-Z*i._length,C),S=Math.min((1+Z)*i._length,S),P=Math.max(-Z*a._length,P),E=Math.min((1+Z)*a._length,E)}var j=Math.round(S-C),N=Math.round(E-P),H=C>=i._length||S<=0||P>=a._length||E<=0;if(H){var re=s.selectAll("image").data([]);re.exit().remove(),$_e(s);return}var oe,_e;G==="fast"?(oe=T,_e=M):(oe=j,_e=N);var ke=document.createElement("canvas");ke.width=oe,ke.height=_e;var Ce=ke.getContext("2d",{willReadFrequently:!0}),ge=Wxt(u,{noNumericCheck:!0,returnArray:!0}),ie,Se;G==="fast"?(ie=L?function(fn){return T-1-fn}:W0.identity,Se=x?function(fn){return M-1-fn}:W0.identity):(ie=function(fn){return W0.constrain(Math.round(i.c2p(d[fn])-C),0,j)},Se=function(fn){return W0.constrain(Math.round(a.c2p(v[fn])-P),0,N)});var Ee=Se(0),we=[Ee,Ee],De=L?0:1,Le=x?0:1,me=0,Pe=0,ce=0,He=0,lt,mt,Vt,st,ct;function Qt(fn,yn){if(fn!==void 0){var Mn=ge(fn);return Mn[0]=Math.round(Mn[0]),Mn[1]=Math.round(Mn[1]),Mn[2]=Math.round(Mn[2]),me+=yn,Pe+=Mn[0]*yn,ce+=Mn[1]*yn,He+=Mn[2]*yn,Mn}return[0,0,0,0]}function Ht(fn,yn,Mn,Ba){var ua=fn[Mn.bin0];if(ua===void 0)return Qt(void 0,1);var ma=fn[Mn.bin1],Wa=yn[Mn.bin0],Fa=yn[Mn.bin1],Xo=ma-ua||0,da=Wa-ua||0,jn;return ma===void 0?Fa===void 0?jn=0:Wa===void 0?jn=2*(Fa-ua):jn=(2*Fa-Wa-ua)*2/3:Fa===void 0?Wa===void 0?jn=0:jn=(2*ua-ma-Wa)*2/3:Wa===void 0?jn=(2*Fa-ma-ua)*2/3:jn=Fa+ua-ma-Wa,Qt(ua+Mn.frac*Xo+Ba.frac*(da+Mn.frac*jn))}if(G!=="default"){var nr=0,tt;try{tt=new Uint8Array(oe*_e*4)}catch(fn){tt=new Array(oe*_e*4)}if(G==="smooth"){var je=m||d,Ue=b||v,Ae=new Array(je.length),rt=new Array(Ue.length),St=new Array(j),Tt=m?exe:Q_e,dt=b?exe:Q_e,Et,pt,Xt;for(z=0;z<je.length;z++)Ae[z]=Math.round(i.c2p(je[z])-C);for(z=0;z<Ue.length;z++)rt[z]=Math.round(a.c2p(Ue[z])-P);for(z=0;z<j;z++)St[z]=Tt(z,Ae);for(q=0;q<N;q++)for(Et=dt(q,rt),pt=h[Et.bin0],Xt=h[Et.bin1],z=0;z<j;z++,nr+=4)ct=Ht(pt,Xt,St[z],Et),txe(tt,nr,ct)}else for(q=0;q<M;q++)for(st=h[q],we=Se(q),z=0;z<T;z++)ct=Qt(st[z],1),nr=(we*T+ie(z))*4,txe(tt,nr,ct);var or=Ce.createImageData(oe,_e);try{or.data.set(tt)}catch(fn){var _r=or.data,Er=_r.length;for(q=0;q<Er;q++)_r[q]=tt[q]}Ce.putImageData(or,0,0)}else{var ei=Math.floor(c/2),qr=Math.floor(f/2);for(q=0;q<M;q++)if(st=h[q],we.reverse(),we[Le]=Se(q+1),!(we[0]===we[1]||we[0]===void 0||we[1]===void 0))for(mt=ie(0),lt=[mt,mt],z=0;z<T;z++)lt.reverse(),lt[De]=ie(z+1),!(lt[0]===lt[1]||lt[0]===void 0||lt[1]===void 0)&&(Vt=st[z],ct=Qt(Vt,(lt[1]-lt[0])*(we[1]-we[0])),Ce.fillStyle="rgba("+ct.join(",")+")",Ce.fillRect(lt[0]+ei,we[0]+qr,lt[1]-lt[0]-c,we[1]-we[0]-f))}Pe=Math.round(Pe/me),ce=Math.round(ce/me),He=Math.round(He/me);var jr=Bxt("rgb("+Pe+","+ce+","+He+")");e._hmpixcount=(e._hmpixcount||0)+me,e._hmlumcount=(e._hmlumcount||0)+me*jr.getLuminance();var gt=s.selectAll("image").data(o);gt.enter().append("svg:image").attr({xmlns:Xxt.svg,preserveAspectRatio:"none"}),gt.attr({height:N,width:j,x:C,y:P,"xlink:href":ke.toDataURL("image/png")}),G==="fast"&&!k&>.attr("style",Kxt),$_e(s);var Ge=u.texttemplate;if(Ge){var Je=jxt(u),We={type:"linear",range:[Je.min,Je.max],_separators:i._separators,_numFormat:i._numFormat},et=u.type==="histogram2dcontour",xt=u.type==="contour",At=xt?1:0,Kt=xt?M-1:M,er=xt?1:0,Sr=xt?T-1:T,Gr=[];for(z=At;z<Kt;z++){var Ir;if(xt)Ir=l.y[z];else if(et){if(z===0||z===M-1)continue;Ir=l.y[z]}else if(l.yCenter)Ir=l.yCenter[z];else{if(z+1===M&&l.y[z+1]===void 0)continue;Ir=(l.y[z]+l.y[z+1])/2}var Yr=Math.round(a.c2p(Ir));if(!(0>Yr||Yr>a._length))for(q=er;q<Sr;q++){var _i;if(xt)_i=l.x[q];else if(et){if(q===0||q===T-1)continue;_i=l.x[q]}else if(l.xCenter)_i=l.xCenter[q];else{if(q+1===T&&l.x[q+1]===void 0)continue;_i=(l.x[q]+l.x[q+1])/2}var Pi=Math.round(i.c2p(_i));if(!(0>Pi||Pi>i._length)){var ai=Gxt({x:_i,y:Ir},u,e._fullLayout);ai.x=_i,ai.y=Ir;var mi=l.z[z][q];mi===void 0?(ai.z="",ai.zLabel=""):(ai.z=mi,ai.zLabel=Vxt.tickText(We,mi,"hover").text);var un=l.text&&l.text[z]&&l.text[z][q];(un===void 0||un===!1)&&(un=""),ai.text=un;var Fn=W0.texttemplateString({data:[ai,u._meta],fallback:u.texttemplatefallback,labels:ai,locale:e._fullLayout._d3locale,template:Ge});if(Fn){var An=Fn.split("<br>"),Hn=An.length,Qn=0;for(U=0;U<Hn;U++)Qn=Math.max(Qn,An[U].length);Gr.push({l:Hn,c:Qn,t:Fn,x:Pi,y:Yr,z:mi})}}}}var Vi=u.textfont,Kn=Vi.size,Jn=e._fullLayout.font.size;if(!Kn||Kn==="auto"){var Gt=1/0,wt=1/0,rr=0,ir=0;for(U=0;U<Gr.length;U++){var wr=Gr[U];if(rr=Math.max(rr,wr.l),ir=Math.max(ir,wr.c),U<Gr.length-1){var Xr=Gr[U+1],ti=Math.abs(Xr.x-wr.x),$r=Math.abs(Xr.y-wr.y);ti&&(Gt=Math.min(Gt,ti)),$r&&(wt=Math.min(wt,$r))}}!isFinite(Gt)||!isFinite(wt)?Kn=Jn:(Gt-=c,wt-=f,Gt/=ir,wt/=rr,Gt/=sG/2,wt/=sG,Kn=Math.min(Math.floor(Gt),Math.floor(wt),Jn))}if(Kn<=0||!isFinite(Kn))return;var Ri=function(fn){return fn.x},Zi=function(fn){return fn.y-Kn*(fn.l*sG/2-1)},en=ixe(s).data(Gr);en.enter().append("g").classed(rxe,1).append("text").attr("text-anchor","middle").each(function(fn){var yn=K_e.select(this),Mn=Vi.color;(!Mn||Mn==="auto")&&(Mn=Hxt.contrast(fn.z===void 0?e._fullLayout.plot_bgcolor:"rgba("+ge(fn.z).join()+")")),yn.attr("data-notex",1).call(J_e.positionText,Ri(fn),Zi(fn)).call(Uxt.font,{family:Vi.family,size:Kn,color:Mn,weight:Vi.weight,style:Vi.style,variant:Vi.variant,textcase:Vi.textcase,lineposition:Vi.lineposition,shadow:Vi.shadow}).text(fn.t).call(J_e.convertToTspans,e)})}})};function Q_e(e,t){var r=t.length-2,n=W0.constrain(W0.findBin(e,t),0,r),i=t[n],a=t[n+1],o=W0.constrain(n+(e-i)/(a-i)-.5,0,r),s=Math.round(o),l=Math.abs(o-s);return!o||o===r||!l?{bin0:s,bin1:s,frac:0}:{bin0:s,frac:l,bin1:Math.round(s+l/(o-s))}}function exe(e,t){var r=t.length-1,n=W0.constrain(W0.findBin(e,t),0,r),i=t[n],a=t[n+1],o=(e-i)/(a-i)||0;return o<=0?{bin0:n,bin1:n,frac:0}:o<.5?{bin0:n,bin1:n+1,frac:o}:{bin0:n+1,bin1:n,frac:1-o}}function txe(e,t,r){e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=Math.round(r[3]*255)}});var D_=ye((rcr,axe)=>{"use strict";axe.exports={min:"zmin",max:"zmax"}});var y8=ye((icr,oxe)=>{"use strict";var Jxt=qa();oxe.exports=function(t){Jxt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var x8=ye((ncr,lxe)=>{"use strict";var sxe=vf(),R4=Pr(),_8=R4.isArrayOrTypedArray,$xt=ho(),Qxt=tc().extractOpts;lxe.exports=function(t,r,n,i,a){a||(a={});var o=a.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,h=s.y,d=s.z,v=s.xCenter,m=s.yCenter,b=s.zmask,p=l.zhoverformat,k=f,M=h,T,L,x,C;if(t.index!==!1){try{x=Math.round(t.index[1]),C=Math.round(t.index[0])}catch(re){R4.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(x<0||x>=d[0].length||C<0||C>d.length)return}else{if(sxe.inbox(r-f[0],r-f[f.length-1],0)>0||sxe.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var S;for(k=[2*f[0]-f[1]],S=1;S<f.length;S++)k.push((f[S]+f[S-1])/2);for(k.push([2*f[f.length-1]-f[f.length-2]]),M=[2*h[0]-h[1]],S=1;S<h.length;S++)M.push((h[S]+h[S-1])/2);M.push([2*h[h.length-1]-h[h.length-2]])}x=Math.max(0,Math.min(k.length-2,R4.findBin(r,k))),C=Math.max(0,Math.min(M.length-2,R4.findBin(n,M)))}var g=u.c2p(f[x]),P=u.c2p(f[x+1]),E=c.c2p(h[C]),z=c.c2p(h[C+1]),q,U;o?(q=s.orig_x||f,U=s.orig_y||h,P=g,T=q[x],z=E,L=U[C]):(q=s.orig_x||v||f,U=s.orig_y||m||h,T=v?q[x]:(q[x]+q[x+1])/2,L=m?U[C]:(U[C]+U[C+1])/2,u&&u.type==="category"&&(T=f[x]),c&&c.type==="category"&&(L=h[C]),l.zsmooth&&(g=P=u.c2p(T),E=z=c.c2p(L)));var G=d[C][x];if(b&&!b[C][x]&&(G=void 0),!(G===void 0&&!l.hoverongaps)){var Z;_8(s.hovertext)&&_8(s.hovertext[C])?Z=s.hovertext[C][x]:_8(s.text)&&_8(s.text[C])&&(Z=s.text[C][x]);var j=Qxt(l),N={type:"linear",range:[j.min,j.max],hoverformat:p,_separators:u._separators,_numFormat:u._numFormat},H=$xt.tickText(N,G,"hover").text;return[R4.extendFlat(t,{index:l._after2before?l._after2before[C][x]:[C,x],distance:t.maxHoverDistance,spikeDistance:t.maxSpikeDistance,x0:g,x1:P,y0:E,y1:z,xLabelVal:T,yLabelVal:L,zLabelVal:G,zLabel:H,text:Z})]}}});var cxe=ye((acr,uxe)=>{"use strict";uxe.exports={attributes:zT(),supplyDefaults:l_e(),calc:v8(),plot:m8(),colorbar:D_(),style:y8(),hoverPoints:x8(),moduleType:"trace",name:"heatmap",basePlotModule:mh(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var hxe=ye((ocr,fxe)=>{"use strict";fxe.exports=cxe()});var lG=ye((scr,dxe)=>{"use strict";dxe.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var pxe=ye((lcr,vxe)=>{"use strict";vxe.exports={eventDataKeys:["binNumber"]}});var b8=ye((ucr,_xe)=>{"use strict";var Ip=zm(),gxe=df().axisHoverFormat,{hovertemplateAttrs:ebt,texttemplateAttrs:tbt,templatefallbackAttrs:mxe}=Ll(),uG=ec(),yxe=lG(),rbt=pxe(),cG=Ao().extendFlat;_xe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:gxe("x"),yhoverformat:gxe("y"),text:cG({},Ip.text,{}),hovertext:cG({},Ip.hovertext,{}),orientation:Ip.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:yxe("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:yxe("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:ebt({},{keys:rbt.eventDataKeys}),hovertemplatefallback:mxe(),texttemplate:tbt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:mxe({editType:"plot"}),textposition:cG({},Ip.textposition,{arrayOk:!1}),textfont:uG({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:uG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:uG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Ip.insidetextanchor,textangle:Ip.textangle,cliponaxis:Ip.cliponaxis,constraintext:Ip.constraintext,marker:Ip.marker,offsetgroup:Ip.offsetgroup,alignmentgroup:Ip.alignmentgroup,selected:Ip.selected,unselected:Ip.unselected,zorder:Ip.zorder}});var Txe=ye((ccr,wxe)=>{"use strict";var xxe=Oa(),D4=Pr(),bxe=ka(),ibt=i0().handleText,nbt=WI(),abt=b8();wxe.exports=function(t,r,n,i){function a(k,M){return D4.coerce(t,r,abt,k,M)}var o=a("x"),s=a("y"),l=a("cumulative.enabled");l&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var u=a("textposition");ibt(t,r,i,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat");var c=a("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",h=c==="v"?"y":"x",d=o&&s?Math.min(D4.minRowLength(o)&&D4.minRowLength(s)):D4.minRowLength(r[f]||[]);if(!d){r.visible=!1;return}r._length=d;var v=xxe.getComponentMethod("calendars","handleTraceDefaults");v(t,r,["x","y"],i);var m=r[h];m&&a("histfunc"),a("histnorm"),a("autobin"+f),nbt(t,r,a,n,i),D4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,p=xxe.getComponentMethod("errorbars","supplyDefaults");p(t,r,b||bxe.defaultLine,{axis:"y"}),p(t,r,b||bxe.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var T8=ye((fcr,Mxe)=>{"use strict";var F4=Pr(),obt=hf(),w8=Oa().traceIs,sbt=e2(),lbt=i0().validateCornerradius,Axe=F4.nestedProperty,fG=Kb().getAxisGroup,Sxe=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],ubt=["x","y"];Mxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,l,u,c,f,h,d;function v(G,Z){return F4.coerce(s._input,s,s._module.attributes,G,Z)}function m(G){return G.orientation==="v"?"x":"y"}function b(G,Z){var j=obt.getFromTrace({_fullLayout:r},G,Z);return j.type}function p(G,Z,j){var N=G.uid+"__"+j;Z||(Z=N);var H=b(G,j),re=G[j+"calendar"]||"",oe=n[Z],_e=!0;oe&&(H===oe.axType&&re===oe.calendar?(_e=!1,oe.traces.push(G),oe.dirs.push(j)):(Z=N,H!==oe.axType&&F4.warn(["Attempted to group the bins of trace",G.index,"set on a","type:"+H,"axis","with bins on","type:"+oe.axType,"axis."].join(" ")),re!==oe.calendar&&F4.warn(["Attempted to group the bins of trace",G.index,"set with a",re,"calendar","with bins",oe.calendar?"on a "+oe.calendar+" calendar":"w/o a set calendar"].join(" ")))),_e&&(n[Z]={traces:[G],dirs:[j],axType:H,calendar:G[j+"calendar"]||""}),G["_"+j+"bingroup"]=Z}for(f=0;f<t.length;f++)if(s=t[f],w8(s,"histogram")){if(i.push(s),delete s._xautoBinFinished,delete s._yautoBinFinished,s.type==="histogram"){var k=v("marker.cornerradius",r.barcornerradius);s.marker&&(s.marker.cornerradius=lbt(k))}w8(s,"2dMap")||sbt(s._input,s,r,v,r.barmode)}var M=r._alignmentOpts||{};for(f=0;f<i.length;f++){if(s=i[f],u="",!w8(s,"2dMap")){if(c=m(s),r.barmode==="group"&&s.alignmentgroup){var T=s[c+"axis"],L=fG(r,T)+s.orientation;(M[L]||{})[s.alignmentgroup]&&(u=L)}!u&&r.barmode!=="overlay"&&(u=fG(r,s.xaxis)+fG(r,s.yaxis)+m(s))}u?(a[u]||(a[u]=[]),a[u].push(s)):o.push(s)}for(u in a){if(l=a[u],l.length===1){o.push(l[0]);continue}var x=!1;for(l.length&&(s=l[0],x=v("bingroup")),u=x||u,f=0;f<l.length;f++){s=l[f];var C=s._input.bingroup;C&&C!==u&&F4.warn(["Trace",s.index,"must match","within bingroup",u+".","Ignoring its bingroup:",C,"setting."].join(" ")),s.bingroup=u,p(s,u,m(s))}}for(f=0;f<o.length;f++){s=o[f];var S=v("bingroup");if(w8(s,"2dMap"))for(d=0;d<2;d++){c=ubt[d];var g=v(c+"bingroup",S?S+"__"+c:null);p(s,g,c)}else p(s,S,m(s))}for(u in n){var P=n[u];for(l=P.traces,h=0;h<Sxe.length;h++){var E=Sxe[h],z=E.name,q,U;if(!(z==="nbins"&&P.sizeFound)){for(f=0;f<l.length;f++){if(s=l[f],c=P.dirs[f],q=E.aStr[c],Axe(s._input,q).get()!==void 0){P[z]=v(q),P[z+"Found"]=!0;break}U=(s._autoBin||{})[c]||{},U[z]&&Axe(s,q).set(U[z])}if(z==="start"||z==="end")for(;f<l.length;f++)s=l[f],s["_"+c+"bingroup"]&&(U=(s._autoBin||{})[c]||{},v(q,U[z]));z==="nbins"&&!P.sizeFound&&!P.nbinsFound&&(s=l[0],P[z]=v(q))}}}}});var kxe=ye((hcr,Exe)=>{"use strict";var cbt=IT().hoverPoints,fbt=ho().hoverLabelText;Exe.exports=function(t,r,n,i,a){var o=cbt(t,r,n,i,a);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=fbt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var hG=ye((dcr,Cxe)=>{"use strict";Cxe.exports=function(t,r,n,i,a){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(a)?i[0].pts[a[0]][a[1]]:i[a].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex;var s;if(n._indexToPoints){s=[];for(var l=0;l<o.length;l++)s=s.concat(n._indexToPoints[o[l]])}else s=o;t.pointIndices=s}return t}});var Pxe=ye((vcr,Lxe)=>{"use strict";Lxe.exports={attributes:b8(),layoutAttributes:jI(),supplyDefaults:Txe(),crossTraceDefaults:T8(),supplyLayoutDefaults:IV(),calc:tG().calc,crossTraceCalc:t2().crossTraceCalc,plot:d2().plot,layerName:"barlayer",style:V0().style,styleOnSelect:V0().styleOnSelect,colorbar:$d(),hoverPoints:kxe(),selectPoints:RT(),eventData:hG(),moduleType:"trace",name:"histogram",basePlotModule:mh(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var Rxe=ye((pcr,Ixe)=>{"use strict";Ixe.exports=Pxe()});var S8=ye((gcr,zxe)=>{"use strict";var jg=b8(),Dxe=lG(),A8=zT(),hbt=Gl(),dG=df().axisHoverFormat,{hovertemplateAttrs:dbt,texttemplateAttrs:vbt,templatefallbackAttrs:Fxe}=Ll(),pbt=Tu(),z4=Ao().extendFlat;zxe.exports=z4({x:jg.x,y:jg.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:jg.histnorm,histfunc:jg.histfunc,nbinsx:jg.nbinsx,xbins:Dxe("x"),nbinsy:jg.nbinsy,ybins:Dxe("y"),autobinx:jg.autobinx,autobiny:jg.autobiny,bingroup:z4({},jg.bingroup,{}),xbingroup:z4({},jg.bingroup,{}),ybingroup:z4({},jg.bingroup,{}),xgap:A8.xgap,ygap:A8.ygap,zsmooth:A8.zsmooth,xhoverformat:dG("x"),yhoverformat:dG("y"),zhoverformat:dG("z",1),hovertemplate:dbt({},{keys:["z"]}),hovertemplatefallback:Fxe(),texttemplate:vbt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:Fxe({editType:"plot"}),textfont:A8.textfont,showlegend:z4({},hbt.showlegend,{dflt:!1})},pbt("",{cLetter:"z",autoColorDflt:!1}))});var vG=ye((mcr,Oxe)=>{"use strict";var gbt=Oa(),qxe=Pr();Oxe.exports=function(t,r,n,i){var a=n("x"),o=n("y"),s=qxe.minRowLength(a),l=qxe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=gbt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],i);var c=n("z")||n("marker.color");c&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var Nxe=ye((ycr,Bxe)=>{"use strict";var mbt=Pr(),ybt=vG(),_bt=ZV(),xbt=td(),bbt=I4(),wbt=S8();Bxe.exports=function(t,r,n,i){function a(o,s){return mbt.coerce(t,r,wbt,o,s)}ybt(t,r,a,i),r.visible!==!1&&(_bt(t,r,a,i),xbt(t,r,i,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),a("hovertemplatefallback"),bbt(a,i),a("xhoverformat"),a("yhoverformat"))}});var Gxe=ye((_cr,Vxe)=>{"use strict";var Tbt=x8(),Uxe=ho().hoverLabelText;Vxe.exports=function(t,r,n,i,a){var o=Tbt(t,r,n,i,a);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,h=c.xRanges[u],d=c.yRanges[l];return t.xLabel=Uxe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=Uxe(t.ya,[d[0],d[1]],f.yhoverformat),o}}});var jxe=ye((xcr,Hxe)=>{"use strict";Hxe.exports={attributes:S8(),supplyDefaults:Nxe(),crossTraceDefaults:T8(),calc:v8(),plot:m8(),layerName:"heatmaplayer",colorbar:D_(),style:y8(),hoverPoints:Gxe(),eventData:hG(),moduleType:"trace",name:"histogram2d",basePlotModule:mh(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var Xxe=ye((bcr,Wxe)=>{"use strict";Wxe.exports=jxe()});var M8=ye((wcr,Zxe)=>{"use strict";Zxe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var q4=ye((Tcr,$xe)=>{"use strict";var _h=zT(),E8=pf(),Kxe=df(),pG=Kxe.axisHoverFormat,Abt=Kxe.descriptionOnlyNumbers,Sbt=Tu(),Mbt=Pd().dash,Ebt=ec(),UT=Ao().extendFlat,Jxe=M8(),kbt=Jxe.COMPARISON_OPS2,Cbt=Jxe.INTERVAL_OPS,Yxe=E8.line;$xe.exports=UT({z:_h.z,x:_h.x,x0:_h.x0,dx:_h.dx,y:_h.y,y0:_h.y0,dy:_h.dy,xperiod:_h.xperiod,yperiod:_h.yperiod,xperiod0:E8.xperiod0,yperiod0:E8.yperiod0,xperiodalignment:_h.xperiodalignment,yperiodalignment:_h.yperiodalignment,text:_h.text,hovertext:_h.hovertext,transpose:_h.transpose,xtype:_h.xtype,ytype:_h.ytype,xhoverformat:pG("x"),yhoverformat:pG("y"),zhoverformat:pG("z",1),hovertemplate:_h.hovertemplate,hovertemplatefallback:_h.hovertemplatefallback,texttemplate:UT({},_h.texttemplate,{}),texttemplatefallback:_h.texttemplatefallback,textfont:UT({},_h.textfont,{}),hoverongaps:_h.hoverongaps,connectgaps:UT({},_h.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:Ebt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:Abt("contour label")},operation:{valType:"enumerated",values:[].concat(kbt).concat(Cbt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:UT({},Yxe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:Mbt,smoothing:UT({},Yxe.smoothing,{}),editType:"plot"},zorder:E8.zorder},Sbt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var mG=ye((Acr,ebe)=>{"use strict";var wv=S8(),Bm=q4(),Lbt=Tu(),gG=df().axisHoverFormat,Qxe=Ao().extendFlat;ebe.exports=Qxe({x:wv.x,y:wv.y,z:wv.z,marker:wv.marker,histnorm:wv.histnorm,histfunc:wv.histfunc,nbinsx:wv.nbinsx,xbins:wv.xbins,nbinsy:wv.nbinsy,ybins:wv.ybins,autobinx:wv.autobinx,autobiny:wv.autobiny,bingroup:wv.bingroup,xbingroup:wv.xbingroup,ybingroup:wv.ybingroup,autocontour:Bm.autocontour,ncontours:Bm.ncontours,contours:Bm.contours,line:{color:Bm.line.color,width:Qxe({},Bm.line.width,{dflt:.5}),dash:Bm.line.dash,smoothing:Bm.line.smoothing,editType:"plot"},xhoverformat:gG("x"),yhoverformat:gG("y"),zhoverformat:gG("z",1),hovertemplate:wv.hovertemplate,hovertemplatefallback:wv.hovertemplatefallback,texttemplate:Bm.texttemplate,texttemplatefallback:Bm.texttemplatefallback,textfont:Bm.textfont},Lbt("",{cLetter:"z",editTypeOverride:"calc"}))});var k8=ye((Scr,tbe)=>{"use strict";tbe.exports=function(t,r,n,i){var a=i("contours.start"),o=i("contours.end"),s=a===!1||o===!1,l=n("contours.size"),u;s?u=r.autocontour=!0:u=n("autocontour",!1),(u||!l)&&n("ncontours")}});var yG=ye((Mcr,rbe)=>{"use strict";var Pbt=Pr();rbe.exports=function(t,r,n,i){i||(i={});var a=t("contours.showlabels");if(a){var o=r.font;Pbt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}i.hasHover!==!1&&t("zhoverformat")}});var C8=ye((Ecr,ibe)=>{"use strict";var Ibt=td(),Rbt=yG();ibe.exports=function(t,r,n,i,a){var o=n("contours.coloring"),s,l="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(l=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,Ibt(t,r,i,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),Rbt(n,i,l,a)}});var sbe=ye((kcr,obe)=>{"use strict";var nbe=Pr(),Dbt=vG(),Fbt=k8(),zbt=C8(),qbt=I4(),abe=mG();obe.exports=function(t,r,n,i){function a(s,l){return nbe.coerce(t,r,abe,s,l)}function o(s){return nbe.coerce2(t,r,abe,s)}Dbt(t,r,a,i),r.visible!==!1&&(Fbt(t,r,a,o),zbt(t,r,a,i),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),a("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&qbt(a,i))}});var bG=ye((Ccr,ube)=>{"use strict";var xG=ho(),_G=Pr();ube.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=_G.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=_G.aggNums(Math.max,null,r));var o=lbe(i,a,t.ncontours);n.size=o.dtick,n.start=xG.tickFirst(o),o.range.reverse(),n.end=xG.tickFirst(o),n.start===i&&(n.start+=n.size),n.end===a&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),_G.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!=="constraint"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=lbe(s,l,t.ncontours).dtick,u.size=n.size=c}}};function lbe(e,t,r){var n={type:"linear",range:[e,t]};return xG.autoTicks(n,(t-e)/(r||15)),n}});var O4=ye((Lcr,cbe)=>{"use strict";cbe.exports=function(t){return t.end+t.size/1e6}});var wG=ye((Pcr,hbe)=>{"use strict";var fbe=tc(),Obt=v8(),Bbt=bG(),Nbt=O4();hbe.exports=function(t,r){var n=Obt(t,r),i=n[0].z;Bbt(r,i);var a=r.contours,o=fbe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=a.start,u=Nbt(a),c=a.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var h=l-c/2,d=h+f*c;s=[h,d]}else s=i;return fbe.calc(t,r,{vals:s,cLetter:"z"}),n}});var B4=ye((Icr,dbe)=>{"use strict";dbe.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}});var TG=ye((Rcr,vbe)=>{"use strict";var L8=B4();vbe.exports=function(t){var r=t[0].z,n=r.length,i=r[0].length,a=n===2||i===2,o,s,l,u,c,f,h,d,v;for(s=0;s<n-1;s++)for(u=[],s===0&&(u=u.concat(L8.BOTTOMSTART)),s===n-2&&(u=u.concat(L8.TOPSTART)),o=0;o<i-1;o++)for(l=u.slice(),o===0&&(l=l.concat(L8.LEFTSTART)),o===i-2&&(l=l.concat(L8.RIGHTSTART)),c=o+","+s,f=[[r[s][o],r[s][o+1]],[r[s+1][o],r[s+1][o+1]]],v=0;v<t.length;v++)d=t[v],h=Ubt(d.level,f),h&&(d.crossings[c]=h,l.indexOf(h)!==-1&&(d.starts.push([o,s]),a&&l.indexOf(h,l.indexOf(h)+1)!==-1&&d.starts.push([o,s])))};function Ubt(e,t){var r=(t[0][0]>e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var AG=ye((Dcr,mbe)=>{"use strict";var P8=Pr(),VT=B4();mbe.exports=function(t,r,n){var i,a,o,s,l;for(r=r||.01,n=n||.01,o=0;o<t.length;o++){for(s=t[o],l=0;l<s.starts.length;l++)a=s.starts[l],pbe(s,a,"edge",r,n);for(i=0;Object.keys(s.crossings).length&&i<1e4;)i++,a=Object.keys(s.crossings)[0].split(",").map(Number),pbe(s,a,void 0,r,n);i===1e4&&P8.log("Infinite loop in contour?")}};function N4(e,t,r,n){return Math.abs(e[0]-t[0])<r&&Math.abs(e[1]-t[1])<n}function Vbt(e,t){var r=e[2]-t[2],n=e[3]-t[3];return Math.sqrt(r*r+n*n)}function pbe(e,t,r,n,i){var a=t.join(","),o=e.crossings[a],s=Gbt(o,r,t),l=[gbe(e,t,[-s[0],-s[1]])],u=e.z.length,c=e.z[0].length,f=t.slice(),h=s.slice(),d;for(d=0;d<1e4;d++){if(o>20?(o=VT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=VT.SADDLEREMAINDER[o]):delete e.crossings[a],s=VT.NEWDELTA[o],!s){P8.log("Found bad marching index:",o,t,e.level);break}l.push(gbe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),N4(l[l.length-1],l[l.length-2],n,i)&&l.pop();var v=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),m=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(m||r&&v)break;o=e.crossings[a]}d===1e4&&P8.log("Infinite loop in contour?");var b=N4(l[0],l[l.length-1],n,i),p=0,k=.2*e.smoothing,M=[],T=0,L,x,C,S,g,P,E,z,q,U,G;for(d=1;d<l.length;d++)E=Vbt(l[d],l[d-1]),p+=E,M.push(E);var Z=p/M.length*k;function j(re){return l[re%l.length]}for(d=l.length-2;d>=T;d--)if(L=M[d],L<Z){for(C=0,x=d-1;x>=T&&L+M[x]<Z;x--)L+=M[x];if(b&&d===l.length-2)for(C=0;C<x&&L+M[C]<Z;C++)L+=M[C];g=d-x+C+1,P=Math.floor((d+x+C+2)/2),!b&&d===l.length-2?S=l[l.length-1]:!b&&x===-1?S=l[0]:g%2?S=j(P):S=[(j(P)[0]+j(P+1)[0])/2,(j(P)[1]+j(P+1)[1])/2],l.splice(x+1,d-x+1,S),d=x+1,C&&(T=C),b&&(d===l.length-2?l[C]=l[l.length-1]:d===0&&(l[l.length-1]=l[0]))}for(l.splice(0,T),d=0;d<l.length;d++)l[d].length=2;if(!(l.length<2))if(b)l.pop(),e.paths.push(l);else{r||P8.log("Unclosed interior contour?",e.level,f.join(","),l.join("L"));var N=!1;for(z=0;z<e.edgepaths.length;z++)if(U=e.edgepaths[z],!N&&N4(U[0],l[l.length-1],n,i)){l.pop(),N=!0;var H=!1;for(q=0;q<e.edgepaths.length;q++)if(G=e.edgepaths[q],N4(G[G.length-1],l[0],n,i)){H=!0,l.shift(),e.edgepaths.splice(z,1),q===z?e.paths.push(l.concat(G)):(q>z&&q--,e.edgepaths[q]=G.concat(l,U));break}H||(e.edgepaths[z]=l.concat(U))}for(z=0;z<e.edgepaths.length&&!N;z++)U=e.edgepaths[z],N4(U[U.length-1],l[0],n,i)&&(l.shift(),e.edgepaths[z]=U.concat(l),N=!0);N||e.edgepaths.push(l)}}function Gbt(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:VT.BOTTOMSTART.indexOf(e)!==-1?i=1:VT.LEFTSTART.indexOf(e)!==-1?n=1:VT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function gbe(e,t,r){var n=t[0]+Math.max(r[0],0),i=t[1]+Math.max(r[1],0),a=e.z[i][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-a)/(e.z[i][n+1]-a),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[i],!0),n+l,i]}else{var c=(e.level-a)/(e.z[i+1][n]-a),f=(c!==1?(1-c)*s.c2l(e.y[i]):0)+(c!==0?c*s.c2l(e.y[i+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,i+c]}}});var bbe=ye((Fcr,xbe)=>{"use strict";var SG=M8(),Hbt=Eo();xbe.exports={"[]":ybe("[]"),"][":ybe("]["),">":MG(">"),"<":MG("<"),"=":MG("=")};function _be(e,t){var r=Array.isArray(t),n;function i(a){return Hbt(a)?+a:null}return SG.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):SG.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:SG.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function ybe(e){return function(t){t=_be(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function MG(e){return function(t){return t=_be(e,t),{start:t,end:1/0,size:1/0}}}});var EG=ye((zcr,Tbe)=>{"use strict";var wbe=Pr(),jbt=bbe(),Wbt=O4();Tbe.exports=function(t,r,n){for(var i=t.type==="constraint"?jbt[t._operation](t.value):t,a=i.size,o=[],s=Wbt(i),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=i.start;c<s;c+=a)if(o.push(wbe.extendFlat({level:c,crossings:{},starts:[],edgepaths:[],paths:[],z:n.z,smoothing:n.trace.line.smoothing},u)),o.length>1e3){wbe.warn("Too many contours, clipping at 1000",t);break}return o}});var kG=ye((qcr,Sbe)=>{"use strict";var GT=Pr();Sbe.exports=function(e,t){var r,n,i,a=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&>.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&>.warn("Contour data invalid for the specified inequality range operation."),n=Abe(e[0]),i=Abe(e[1]),r=0;r<n.edgepaths.length;r++)n.edgepaths[r]=a(n.edgepaths[r]);for(r=0;r<n.paths.length;r++)n.paths[r]=a(n.paths[r]);for(r=0;r<n.starts.length;r++)n.starts[r]=a(n.starts[r]);for(;i.edgepaths.length;)n.edgepaths.push(o(i.edgepaths.shift()));for(;i.paths.length;)n.paths.push(o(i.paths.shift()));for(;i.starts.length;)n.starts.push(o(i.starts.shift()));return[n]}};function Abe(e){return GT.extendFlat({},e,{edgepaths:GT.extendDeep([],e.edgepaths),paths:GT.extendDeep([],e.paths),starts:GT.extendDeep([],e.starts)})}});var CG=ye((Ocr,Mbe)=>{"use strict";Mbe.exports=function(e,t){var r=e[0],n=r.z,i;switch(t.type){case"levels":var a=Math.min(n[0][0],n[0][1]);for(i=0;i<e.length;i++){var o=e[i];o.prefixBoundary=!o.edgepaths.length&&(a>o.level||o.starts.length&&a===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(i=0;i<l;i++)c=Math.min(c,n[i][0]),c=Math.min(c,n[i][s-1]),u=Math.max(u,n[i][0]),u=Math.max(u,n[i][s-1]);for(i=1;i<s-1;i++)c=Math.min(c,n[0][i]),c=Math.min(c,n[l-1][i]),u=Math.max(u,n[0][i]),u=Math.max(u,n[l-1][i]);var f=t.value,h,d;switch(t._operation){case">":f>u&&(r.prefixBoundary=!0);break;case"<":(f<c||r.starts.length&&f===c)&&(r.prefixBoundary=!0);break;case"[]":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),(d<c||h>u||r.starts.length&&d===c)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),h<c&&d>u&&(r.prefixBoundary=!0);break}break}}});var I8=ye(jv=>{"use strict";var V4=qa(),Fd=Pr(),jy=So(),Xbt=tc(),Cbe=Zl(),Ebe=ho(),kbe=xm(),Zbt=m8(),Lbe=TG(),Pbe=AG(),Ybt=EG(),Kbt=kG(),Ibe=CG(),U4=B4(),Nm=U4.LABELOPTIMIZER;jv.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;Fd.makeTraceGroups(i,n,"contour").each(function(s){var l=V4.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,d=c.contours,v=Ybt(d,r,u),m=Fd.ensureSingle(l,"g","heatmapcoloring"),b=[];d.coloring==="heatmap"&&(b=[s]),Zbt(t,r,b,m),Lbe(v),Pbe(v);var p=a.c2p(f[0],!0),k=a.c2p(f[f.length-1],!0),M=o.c2p(h[0],!0),T=o.c2p(h[h.length-1],!0),L=[[p,T],[k,T],[k,M],[p,M]],x=v;d.type==="constraint"&&(x=Kbt(v,d._operation)),Jbt(l,L,d),$bt(l,x,L,d),Qbt(l,v,t,u,d),t2t(l,r,t,u,L)})};function Jbt(e,t,r){var n=Fd.ensureSingle(e,"g","contourbg"),i=n.selectAll("path").data(r.coloring==="fill"?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function $bt(e,t,r,n){var i=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",a="M"+r.join("L")+"Z";i&&Ibe(t,n);var o=Fd.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(i?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?a:"")+Rbe(l,r);u?V4.select(this).attr("d",u).style("stroke","none"):V4.select(this).remove()})}function Rbe(e,t){var r="",n=0,i=e.edgepaths.map(function(p,k){return k}),a=!0,o,s,l,u,c,f;function h(p){return Math.abs(p[1]-t[0][1])<.01}function d(p){return Math.abs(p[1]-t[2][1])<.01}function v(p){return Math.abs(p[0]-t[0][0])<.01}function m(p){return Math.abs(p[0]-t[2][0])<.01}for(;i.length;){for(f=jy.smoothopen(e.edgepaths[n],e.smoothing),r+=a?f:f.replace(/^M/,"L"),i.splice(i.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){Fd.log("Missing end?",n,e);break}for(h(o)&&!m(o)?s=t[1]:v(o)?s=t[0]:d(o)?s=t[3]:m(o)&&(s=t[2]),c=0;c<e.edgepaths.length;c++){var b=e.edgepaths[c][0];Math.abs(o[0]-s[0])<.01?Math.abs(o[0]-b[0])<.01&&(b[1]-o[1])*(s[1]-b[1])>=0&&(s=b,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-b[1])<.01&&(b[0]-o[0])*(s[0]-b[0])>=0&&(s=b,u=c):Fd.log("endpt to newendpt is not vert. or horz.",o,s,b)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){Fd.log("unclosed perimeter path");break}n=u,a=i.indexOf(n)===-1,a&&(n=i[0],r+="Z")}for(n=0;n<e.paths.length;n++)r+=jy.smoothclosed(e.paths[n],e.smoothing);return r}function Qbt(e,t,r,n,i){var a=r._context.staticPlot,o=Fd.ensureSingle(e,"g","contourlines"),s=i.showlines!==!1,l=i.showlabels,u=s&&l,c=jv.createLines(o,s||l,t,a),f=jv.createLineClip(o,u,r,n.trace.uid),h=e.selectAll("g.contourlabels").data(l?[0]:[]);if(h.exit().remove(),h.enter().append("g").classed("contourlabels",!0),l){var d=[],v=[];Fd.clearLocationCache();var m=jv.labelFormatter(r,n),b=jy.tester.append("text").attr("data-notex",1).call(jy.font,i.labelfont),p=t[0].xaxis,k=t[0].yaxis,M=p._length,T=k._length,L=p.range,x=k.range,C=Fd.aggNums(Math.min,null,n.x),S=Fd.aggNums(Math.max,null,n.x),g=Fd.aggNums(Math.min,null,n.y),P=Fd.aggNums(Math.max,null,n.y),E=Math.max(p.c2p(C,!0),0),z=Math.min(p.c2p(S,!0),M),q=Math.max(k.c2p(P,!0),0),U=Math.min(k.c2p(g,!0),T),G={};L[0]<L[1]?(G.left=E,G.right=z):(G.left=z,G.right=E),x[0]<x[1]?(G.top=q,G.bottom=U):(G.top=U,G.bottom=q),G.middle=(G.top+G.bottom)/2,G.center=(G.left+G.right)/2,d.push([[G.left,G.top],[G.right,G.top],[G.right,G.bottom],[G.left,G.bottom]]);var Z=Math.sqrt(M*M+T*T),j=U4.LABELDISTANCE*Z/Math.max(1,t.length/U4.LABELINCREASE);c.each(function(N){var H=jv.calcTextOpts(N.level,m,b,r);V4.select(this).selectAll("path").each(function(){var re=this,oe=Fd.getVisibleSegment(re,G,H.height/2);if(oe&&!(oe.len<(H.width+H.height)*U4.LABELMIN))for(var _e=Math.min(Math.ceil(oe.len/j),U4.LABELMAX),ke=0;ke<_e;ke++){var Ce=jv.findBestTextLocation(re,oe,H,v,G);if(!Ce)break;jv.addLabelData(Ce,H,v,d)}})}),b.remove(),jv.drawLabels(h,v,r,f,u?d:null)}l&&!s&&c.remove()}jv.createLines=function(e,t,r,n){var i=r[0].smoothing,a=e.selectAll("g.contourlevel").data(t?r:[]);if(a.exit().remove(),a.enter().append("g").classed("contourlevel",!0),t){var o=a.selectAll("path.openline").data(function(l){return l.pedgepaths||l.edgepaths});o.exit().remove(),o.enter().append("path").classed("openline",!0),o.attr("d",function(l){return jy.smoothopen(l,i)}).style("stroke-miterlimit",1).style("vector-effect",n?"none":"non-scaling-stroke");var s=a.selectAll("path.closedline").data(function(l){return l.ppaths||l.paths});s.exit().remove(),s.enter().append("path").classed("closedline",!0),s.attr("d",function(l){return jy.smoothclosed(l,i)}).style("stroke-miterlimit",1).style("vector-effect",n?"none":"non-scaling-stroke")}return a};jv.createLineClip=function(e,t,r,n){var i=r._fullLayout._clips,a=t?"clipline"+n:null,o=i.selectAll("#"+a).data(t?[0]:[]);return o.exit().remove(),o.enter().append("clipPath").classed("contourlineclip",!0).attr("id",a),jy.setClipUrl(e,a,r),o};jv.labelFormatter=function(e,t){var r=e._fullLayout,n=t.trace,i=n.contours,a={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(i.labelformat)a.tickformat=i.labelformat,kbe(a,r);else{var o=Xbt.extractOpts(n);if(o&&o.colorbar&&o.colorbar._axis)a=o.colorbar._axis;else{if(i.type==="constraint"){var s=i.value;Fd.isArrayOrTypedArray(s)?a.range=[s[0],s[s.length-1]]:a.range=[s,s]}else a.range=[i.start,i.end],a.nticks=(i.end-i.start)/i.size;a.range[0]===a.range[1]&&(a.range[1]+=a.range[0]||1),a.nticks||(a.nticks=1e3),kbe(a,r),Ebe.prepTicks(a),a._tmin=null,a._tmax=null}}return function(l){return Ebe.tickText(a,l).text}};jv.calcTextOpts=function(e,t,r,n){var i=t(e);r.text(i).call(Cbe.convertToTspans,n);var a=r.node(),o=jy.bBox(a,!0);return{text:i,width:o.width,height:o.height,fontSize:+a.style["font-size"].replace("px",""),level:e,dy:(o.top+o.bottom)/2}};jv.findBestTextLocation=function(e,t,r,n,i){var a=r.width,o,s,l,u,c;t.isClosed?(s=t.len/Nm.INITIALSEARCHPOINTS,o=t.min+s/2,l=t.max):(s=(t.len-a)/(Nm.INITIALSEARCHPOINTS+1),o=t.min+s+a/2,l=t.max-(s+a)/2);for(var f=1/0,h=0;h<Nm.ITERATIONS;h++){for(var d=o;d<l;d+=s){var v=Fd.getTextLocation(e,t.total,d,a),m=e2t(v,r,n,i);m<f&&(f=m,c=v,u=d)}if(f>Nm.MAXCOST*2)break;h&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=Nm.MAXCOST)return c};function e2t(e,t,r,n){var i=t.width/2,a=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*i,c=Math.sin(l)*i,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*a)),h=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*a);if(f<1||h<1)return 1/0;var d=Nm.EDGECOST*(1/(f-1)+1/(h-1));d+=Nm.ANGLECOST*l*l;for(var v=o-u,m=s-c,b=o+u,p=s+c,k=0;k<r.length;k++){var M=r[k],T=Math.cos(M.theta)*M.width/2,L=Math.sin(M.theta)*M.width/2,x=Fd.segmentDistance(v,m,b,p,M.x-T,M.y-L,M.x+T,M.y+L)*2/(t.height+M.height),C=M.level===t.level,S=C?Nm.SAMELEVELDISTANCE:1;if(x<=S)return 1/0;var g=Nm.NEIGHBORCOST*(C?Nm.SAMELEVELFACTOR:1);d+=g/(x-S)}return d}jv.addLabelData=function(e,t,r,n){var i=t.fontSize,a=t.width+i/3,o=Math.max(0,t.height-i/3),s=e.x,l=e.y,u=e.theta,c=Math.sin(u),f=Math.cos(u),h=function(v,m){return[s+v*f-m*c,l+v*c+m*f]},d=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:u,level:t.level,width:a,height:o}),n.push(d)};jv.drawLabels=function(e,t,r,n,i){var a=e.selectAll("text").data(t,function(u){return u.text+","+u.x+","+u.y+","+u.theta});if(a.exit().remove(),a.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(u){var c=u.x+Math.sin(u.theta)*u.dy,f=u.y-Math.cos(u.theta)*u.dy;V4.select(this).text(u.text).attr({x:c,y:f,transform:"rotate("+180*u.theta/Math.PI+" "+c+" "+f+")"}).call(Cbe.convertToTspans,r)}),i){for(var o="",s=0;s<i.length;s++)o+="M"+i[s].join("L")+"Z";var l=Fd.ensureSingle(n,"path","");l.attr("d",o)}};function t2t(e,t,r,n,i){var a=n.trace,o=r._fullLayout._clips,s="clip"+a.uid,l=o.selectAll("#"+s).data(a.connectgaps?[]:[0]);if(l.enter().append("clipPath").classed("contourclip",!0).attr("id",s),l.exit().remove(),a.connectgaps===!1){var u={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:t.xaxis,yaxis:t.yaxis,x:n.x,y:n.y,z:r2t(n),smoothing:0};Lbe([u]),Pbe([u]),Ibe([u],{type:"levels"});var c=Fd.ensureSingle(l,"path","");c.attr("d",(u.prefixBoundary?"M"+i.join("L")+"Z":"")+Rbe(u,i))}else s=null;jy.setClipUrl(e,s,r)}function r2t(e){var t=e.trace._emptypoints,r=[],n=e.z.length,i=e.z[0].length,a,o=[],s;for(a=0;a<i;a++)o.push(1);for(a=0;a<n;a++)r.push(o.slice());for(a=0;a<t.length;a++)s=t[a],r[s[0]][s[1]]=0;return e.zmask=r,r}});var PG=ye((Ncr,Dbe)=>{"use strict";var i2t=qa(),LG=tc(),n2t=O4();Dbe.exports=function(t){var r=t.contours,n=r.start,i=n2t(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring==="lines"?0:1,l=LG.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?LG.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),d,v,m=l.min,b=l.max;if(r.coloring==="heatmap"){for(v=0;v<c;v++)d=u[v],f[v]=d[0]*(b-m)+m,h[v]=d[1];var p=i2t.extent([m,b,r.start,r.start+a*(o-1)]),k=p[m<b?0:1],M=p[m<b?1:0];k!==m&&(f.splice(0,0,k),h.splice(0,0,h[0])),M!==b&&(f.push(M),h.push(h[h.length-1]))}else{var T=t._input&&typeof t._input.zmin=="number"&&typeof t._input.zmax=="number";for(T&&(n<=m||i>=b)&&(n<=m&&(n=m),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),v=0;v<c;v++)d=u[v],f[v]=(d[0]*(o+s-1)-s/2)*a+n,h[v]=d[1];(T||t.autocontour)&&(f[0]>m&&(f.unshift(m),h.unshift(h[0])),f[f.length-1]<b&&(f.push(b),h.push(h[h.length-1])))}return LG.makeColorScaleFunc({domain:f,range:h},{noNumericCheck:!0})}});var D8=ye((Ucr,zbe)=>{"use strict";var R8=qa(),Fbe=So(),a2t=y8(),o2t=PG();zbe.exports=function(t){var r=R8.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=R8.select(this),a=n[0].trace,o=a.contours,s=a.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",h=!c&&o.coloring==="fill",d=f||h?o2t(a):null;i.selectAll("g.contourlevel").each(function(b){R8.select(this).selectAll("path").call(Fbe.lineGroupStyle,s.width,f?d(b.level):s.color,s.dash)});var v=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(b){Fbe.font(R8.select(this),{weight:v.weight,style:v.style,variant:v.variant,textcase:v.textcase,lineposition:v.lineposition,shadow:v.shadow,family:v.family,size:v.size,color:v.color||(f?d(b.level):s.color)})}),c)i.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(h){var m;i.selectAll("g.contourfill path").style("fill",function(b){return m===void 0&&(m=b.level),d(b.level+.5*l)}),m===void 0&&(m=u),i.selectAll("g.contourbg path").style("fill",d(m-.5*l))}}),a2t(t)}});var F8=ye((Vcr,Obe)=>{"use strict";var qbe=tc(),s2t=PG(),l2t=O4();function u2t(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=s2t(t,{isColorbar:!0});if(o==="heatmap"){var l=qbe.extractOpts(t);r._fillgradient=l.reversescale?qbe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:i.color,width:n.showlines!==!1?i.width:0,dash:i.dash},r._levels={start:n.start,end:l2t(n),size:a}}Obe.exports={min:"zmin",max:"zmax",calc:u2t}});var IG=ye((Gcr,Bbe)=>{"use strict";var z8=ka(),c2t=x8();Bbe.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=c2t(t,r,n,i,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&z8.opacity(l.fillcolor)?s.color=z8.addOpacity(l.fillcolor,1):l.contours.showlines&&z8.opacity(l.line.color)&&(s.color=z8.addOpacity(l.line.color,1)))}),o}});var Ube=ye((Hcr,Nbe)=>{"use strict";Nbe.exports={attributes:mG(),supplyDefaults:sbe(),crossTraceDefaults:T8(),calc:wG(),plot:I8().plot,layerName:"contourlayer",style:D8(),colorbar:F8(),hoverPoints:IG(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:mh(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var Gbe=ye((jcr,Vbe)=>{"use strict";Vbe.exports=Ube()});var RG=ye((Wcr,Ybe)=>{"use strict";var Hbe=Eo(),f2t=yG(),Xbe=ka(),jbe=Xbe.addOpacity,h2t=Xbe.opacity,Zbe=M8(),Wbe=Pr().isArrayOrTypedArray,d2t=Zbe.CONSTRAINT_REDUCTION,v2t=Zbe.COMPARISON_OPS2;Ybe.exports=function(t,r,n,i,a,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=d2t[f],p2t(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",jbe((t.line||{}).color||a,.5))),l){var h=c&&h2t(c)?jbe(r.fillcolor,1):a;u=n("line.color",h),n("line.width",2),n("line.dash")}n("line.smoothing"),f2t(n,i,u,o)};function p2t(e,t){var r;v2t.indexOf(t.operation)===-1?(e("contours.value",[0,1]),Wbe(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:Hbe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),Hbe(t.value)||(Wbe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var $be=ye((Xcr,Jbe)=>{"use strict";var DG=Pr(),g2t=n8(),m2t=Dg(),y2t=RG(),_2t=k8(),x2t=C8(),b2t=I4(),Kbe=q4();Jbe.exports=function(t,r,n,i){function a(u,c){return DG.coerce(t,r,Kbe,u,c)}function o(u){return DG.coerce2(t,r,Kbe,u)}var s=g2t(t,r,a,i);if(!s){r.visible=!1;return}m2t(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate"),a("hovertemplatefallback");var l=a("contours.type")==="constraint";a("connectgaps",DG.isArray1D(r.z)),l?y2t(t,r,a,i,n):(_2t(t,r,a,o),x2t(t,r,a,i)),r.contours&&r.contours.coloring==="heatmap"&&b2t(a,i),a("zorder")}});var e2e=ye((Zcr,Qbe)=>{"use strict";Qbe.exports={attributes:q4(),supplyDefaults:$be(),calc:wG(),plot:I8().plot,style:D8(),colorbar:F8(),hoverPoints:IG(),moduleType:"trace",name:"contour",basePlotModule:mh(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var r2e=ye((Ycr,t2e)=>{"use strict";t2e.exports=e2e()});var FG=ye((Kcr,o2e)=>{"use strict";var{hovertemplateAttrs:w2t,texttemplateAttrs:T2t,templatefallbackAttrs:i2e}=Ll(),A2t=Pg(),o0=pf(),S2t=Gl(),n2e=Tu(),M2t=Pd().dash,F_=Ao().extendFlat,X0=o0.marker,G4=o0.line,a2e=X0.line;o2e.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:F_({},o0.mode,{dflt:"markers"}),text:F_({},o0.text,{}),texttemplate:T2t({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:i2e({editType:"plot"}),hovertext:F_({},o0.hovertext,{}),line:{color:G4.color,width:G4.width,dash:M2t,backoff:G4.backoff,shape:F_({},G4.shape,{values:["linear","spline"]}),smoothing:G4.smoothing,editType:"calc"},connectgaps:o0.connectgaps,cliponaxis:o0.cliponaxis,fill:F_({},o0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:A2t(),marker:F_({symbol:X0.symbol,opacity:X0.opacity,angle:X0.angle,angleref:X0.angleref,standoff:X0.standoff,maxdisplayed:X0.maxdisplayed,size:X0.size,sizeref:X0.sizeref,sizemin:X0.sizemin,sizemode:X0.sizemode,line:F_({width:a2e.width,dash:a2e.dash,editType:"calc"},n2e("marker.line")),gradient:X0.gradient,editType:"calc"},n2e("marker")),textfont:o0.textfont,textposition:o0.textposition,selected:o0.selected,unselected:o0.unselected,hoverinfo:F_({},S2t.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o0.hoveron,hovertemplate:w2t(),hovertemplatefallback:i2e()}});var c2e=ye((Jcr,u2e)=>{"use strict";var s2e=Pr(),E2t=Lm(),HT=Ru(),k2t=$p(),C2t=D0(),l2e=lT(),L2t=F0(),P2t=Fg(),I2t=FG();u2e.exports=function(t,r,n,i){function a(h,d){return s2e.coerce(t,r,I2t,h,d)}var o=a("a"),s=a("b"),l=a("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,a("sum"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback"));var c=u<E2t.PTS_LINESONLY?"lines+markers":"lines";a("mode",c),HT.hasMarkers(r)&&k2t(t,r,n,i,a,{gradient:!0}),HT.hasLines(r)&&(C2t(t,r,n,i,a,{backoff:!0}),l2e(t,r,a),a("connectgaps")),HT.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),L2t(t,r,i,a));var f=[];(HT.hasMarkers(r)||HT.hasText(r))&&(a("cliponaxis"),a("marker.maxdisplayed"),f.push("points")),a("fill"),r.fill!=="none"&&(P2t(t,r,n,a),HT.hasLines(r)||l2e(t,r,a)),(r.fill==="tonext"||r.fill==="toself")&&f.push("fills"),a("hoveron",f.join("+")||"points"),s2e.coerceSelectionMarkerOpacity(r,a)}});var h2e=ye(($cr,f2e)=>{"use strict";var zG=ho();f2e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=zG.tickText(a.aaxis,t.a,!0).text,i.bLabel=zG.tickText(a.baxis,t.b,!0).text,i.cLabel=zG.tickText(a.caxis,t.c,!0).text,i}});var g2e=ye((Qcr,p2e)=>{"use strict";var qG=Eo(),R2t=z0(),D2t=Rm(),F2t=q0(),z2t=O0().calcMarkerSize,d2e=["a","b","c"],v2e={a:["b","c"],b:["a","c"],c:["a","b"]};p2e.exports=function(t,r){var n=t._fullLayout[r.subplot],i=n.sum,a=r.sum||i,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,h,d;for(l=0;l<d2e.length;l++)if(c=d2e[l],!o[c]){for(h=o[v2e[c][0]],d=o[v2e[c][1]],f=new Array(h.length),u=0;u<h.length;u++)f[u]=a-h[u]-d[u];o[c]=f}var v=r._length,m=new Array(v),b,p,k,M,T,L;for(l=0;l<v;l++)b=o.a[l],p=o.b[l],k=o.c[l],qG(b)&&qG(p)&&qG(k)?(b=+b,p=+p,k=+k,M=i/(b+p+k),M!==1&&(b*=M,p*=M,k*=M),L=b,T=k-p,m[l]={x:T,y:L,a:b,b:p,c:k},s&&(m[l].id=s[l])):m[l]={x:!1,y:!1};return z2t(r,v),R2t(t,r),D2t(m,r),F2t(m,r),m}});var y2e=ye((efr,m2e)=>{"use strict";var q2t=vT();m2e.exports=function(t,r,n){var i=r.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u<n.length;u++){var c=n[u];c.length&&(c[0].trace._xA=a,c[0].trace._yA=o)}q2t(t,s,n,l)}});var x2e=ye((tfr,_2e)=>{"use strict";var O2t=yT();_2e.exports=function(t,r,n,i){var a=O2t(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index],h=o.trace,d=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var v={};v[h.subplot]={_subplot:d};var m=h._module.formatLabels(f,h,v);o.aLabel=m.aLabel,o.bLabel=m.bLabel,o.cLabel=m.cLabel;var b=f.hi||h.hoverinfo,p=[];function k(T,L){p.push(T._hovertitle+": "+L)}if(!h.hovertemplate){var M=b.split("+");M.indexOf("all")!==-1&&(M=["a","b","c"]),M.indexOf("a")!==-1&&k(d.aaxis,o.aLabel),M.indexOf("b")!==-1&&k(d.baxis,o.bLabel),M.indexOf("c")!==-1&&k(d.caxis,o.cLabel)}return o.extraText=p.join("<br>"),o.hovertemplate=h.hovertemplate,a}});var w2e=ye((rfr,b2e)=>{"use strict";b2e.exports=function(t,r,n,i,a){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),i[a]){var o=i[a];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var R2e=ye((ifr,I2e)=>{"use strict";var k2e=qa(),B2t=fd(),OG=Oa(),Wy=Pr(),Um=Wy.strTranslate,q8=Wy._,WT=ka(),O8=So(),H4=xm(),BG=Ao().extendFlat,N2t=Mc(),z_=ho(),T2e=yv(),A2e=vf(),C2e=Cg(),S2e=C2e.freeMode,U2t=C2e.rectMode,NG=zb(),V2t=qf().prepSelect,G2t=qf().selectOnClick,H2t=qf().clearOutline,j2t=qf().clearSelectionsCache,L2e=Rh();function P2e(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}I2e.exports=P2e;var Vm=P2e.prototype;Vm.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Vm.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;a<e.length;a++){var o=e[a][0].trace;if(o.cliponaxis===!1){r._hasClipOnAxisFalse=!0;break}}r.updateLayers(n),r.adjustLayout(n,i),N2t.generalUpdatePerTraceModule(r.graphDiv,r,e,n),r.layers.plotbg.select("path").call(WT.fill,n.bgcolor)};Vm.makeFramework=function(e){var t=this,r=t.graphDiv,n=e[t.id],i=t.clipId="clip"+t.layoutId+t.id,a=t.clipIdRelative="clip-relative"+t.layoutId+t.id;t.clipDef=Wy.ensureSingleById(e._clips,"clipPath",i,function(o){o.append("path").attr("d","M0,0Z")}),t.clipDefRelative=Wy.ensureSingleById(e._clips,"clipPath",a,function(o){o.append("path").attr("d","M0,0Z")}),t.plotContainer=Wy.ensureSingle(t.container,"g",t.id),t.updateLayers(n),O8.setClipUrl(t.layers.backplot,i,r),O8.setClipUrl(t.layers.grids,i,r)};Vm.updateFx=function(e){e._ternarylayer.selectAll("g.toplevel").style("cursor",e.dragmode==="pan"?"move":"crosshair")};Vm.updateLayers=function(e){var t=this,r=t.layers,n=["draglayer","plotbg","backplot","grids"];e.aaxis.layer==="below traces"&&n.push("aaxis","aline"),e.baxis.layer==="below traces"&&n.push("baxis","bline"),e.caxis.layer==="below traces"&&n.push("caxis","cline"),n.push("frontplot"),e.aaxis.layer==="above traces"&&n.push("aaxis","aline"),e.baxis.layer==="above traces"&&n.push("baxis","bline"),e.caxis.layer==="above traces"&&n.push("caxis","cline");var i=t.plotContainer.selectAll("g.toplevel").data(n,String),a=["agrid","bgrid","cgrid"];i.enter().append("g").attr("class",function(o){return"toplevel "+o}).each(function(o){var s=k2e.select(this);r[o]=s,o==="frontplot"?s.append("g").classed("scatterlayer",!0):o==="backplot"?s.append("g").classed("maplayer",!0):o==="plotbg"?s.append("path").attr("d","M0,0Z"):o==="aline"||o==="bline"||o==="cline"?s.append("path"):o==="grids"&&a.forEach(function(l){r[l]=s.append("g").classed("grid "+l,!0)})}),i.order()};var jT=Math.sqrt(4/3);Vm.adjustLayout=function(e,t){var r=this,n=e.domain,i=(n.x[0]+n.x[1])/2,a=(n.y[0]+n.y[1])/2,o=n.x[1]-n.x[0],s=n.y[1]-n.y[0],l=o*t.w,u=s*t.h,c=e.sum,f=e.aaxis.min,h=e.baxis.min,d=e.caxis.min,v,m,b,p,k,M;l>jT*u?(p=u,b=p*jT):(b=l,p=b/jT),k=o*b/l,M=s*p/u,v=t.l+t.w*i-b/2,m=t.t+t.h*(1-a)-p/2,r.x0=v,r.y0=m,r.w=b,r.h=p,r.sum=c,r.xaxis={type:"linear",range:[f+2*d-c,c-f-2*h],domain:[i-k/2,i+k/2],_id:"x"},H4(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(U){return U.a>=r.aaxis.range[0]&&U.a<=r.aaxis.range[1]&&U.b>=r.baxis.range[1]&&U.b<=r.baxis.range[0]&&U.c>=r.caxis.range[1]&&U.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-h-d],domain:[a-M/2,a+M/2],_id:"y"},H4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var T=r.yaxis.domain[0],L=r.aaxis=BG({},e.aaxis,{range:[f,c-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[T,T+M*jT],anchor:"free",position:0,_id:"y",_length:b});H4(L,r.graphDiv._fullLayout),L.setScale();var x=r.baxis=BG({},e.baxis,{range:[c-f-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:b});H4(x,r.graphDiv._fullLayout),x.setScale();var C=r.caxis=BG({},e.caxis,{range:[c-f-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[T,T+M*jT],anchor:"free",position:0,_id:"y",_length:b});H4(C,r.graphDiv._fullLayout),C.setScale();var S="M"+v+","+(m+p)+"h"+b+"l-"+b/2+",-"+p+"Z";r.clipDef.select("path").attr("d",S),r.layers.plotbg.select("path").attr("d",S);var g="M0,"+p+"h"+b+"l-"+b/2+",-"+p+"Z";r.clipDefRelative.select("path").attr("d",g);var P=Um(v,m);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),r.clipDefRelative.select("path").attr("transform",null);var E=Um(v-x._offset,m+p);r.layers.baxis.attr("transform",E),r.layers.bgrid.attr("transform",E);var z=Um(v+b/2,m)+"rotate(30)"+Um(0,-L._offset);r.layers.aaxis.attr("transform",z),r.layers.agrid.attr("transform",z);var q=Um(v+b/2,m)+"rotate(-30)"+Um(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"+v+","+(m+p)+"l"+b/2+",-"+p:"M0,0").call(WT.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",x.showline?"M"+v+","+(m+p)+"h"+b:"M0,0").call(WT.stroke,x.linecolor||"#000").style("stroke-width",(x.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",C.showline?"M"+(v+b/2)+","+m+"l"+b/2+","+p:"M0,0").call(WT.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),O8.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};Vm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",i=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;i["a-title"]=NG.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title.text",placeholder:q8(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),i["b-title"]=NG.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:q8(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),i["c-title"]=NG.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:q8(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,"text-anchor":"middle"}})}};Vm.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,i=n.charAt(0),a=e._id,o=t.layers[n],s=30,l=i+"tickLayout",u=W2t(e);t[l]!==u&&(o.selectAll("."+a+"tick").remove(),t[l]=u),e.setScale();var c=z_.calcTicks(e),f=z_.clipEnds(e,c),h=z_.makeTransTickFn(e),d=z_.getTickSigns(e)[2],v=Wy.deg2rad(s),m=d*(e.linewidth||1)/2,b=d*e.ticklen,p=t.w,k=t.h,M=i==="b"?"M0,"+m+"l"+Math.sin(v)*b+","+Math.cos(v)*b:"M"+m+",0l"+Math.cos(v)*b+","+-Math.sin(v)*b,T={a:"M0,0l"+k+",-"+p/2,b:"M0,0l-"+p/2+",-"+k,c:"M0,0l-"+k+","+p/2}[i];z_.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:M,transFn:h,crisp:!1}),z_.drawGrid(r,e,{vals:f,layer:t.layers[i+"grid"],path:T,transFn:h,crisp:!1}),z_.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:z_.makeLabelFns(e,0,s)})};function W2t(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var yd=L2e.MINZOOM/2+.87,X2t="m-0.87,.5h"+yd+"v3h-"+(yd+5.2)+"l"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l2.6,1.5l-"+yd/2+","+yd*.87+"Z",Z2t="m0.87,.5h-"+yd+"v3h"+(yd+5.2)+"l-"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l-2.6,1.5l"+yd/2+","+yd*.87+"Z",Y2t="m0,1l"+yd/2+","+yd*.87+"l2.6,-1.5l-"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l-"+(yd/2+2.6)+","+(yd*.87+4.5)+"l2.6,1.5l"+yd/2+",-"+yd*.87+"Z",K2t="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",M2e=!0;Vm.clearOutline=function(){j2t(this.dragOptions),H2t(this.dragOptions.gd)};Vm.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,i,a;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(E,z,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;S2e(U)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,U==="zoom"?(e.dragOptions.moveFn=x,e.dragOptions.clickFn=p,e.dragOptions.doneFn=C,k(E,z,q)):U==="pan"?(e.dragOptions.moveFn=g,e.dragOptions.clickFn=p,e.dragOptions.doneFn=P,S(),e.clearOutline(r)):(U2t(U)||S2e(U))&&V2t(E,z,q,e.dragOptions,U)}};var o,s,l,u,c,f,h,d,v,m;function b(E){var z={};return z[e.id+".aaxis.min"]=E.a,z[e.id+".baxis.min"]=E.b,z[e.id+".caxis.min"]=E.c,z}function p(E,z){var q=r._fullLayout.clickmode;E2e(r),E===2&&(r.emit("plotly_doubleclick",null),OG.call("_guiRelayout",r,b({a:0,b:0,c:0}))),q.indexOf("select")>-1&&E===1&&G2t(z,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),q.indexOf("event")>-1&&A2e.click(r,z,e.id)}function k(E,z,q){var U=t.getBoundingClientRect();o=z-U.left,s=q-U.top,r._fullLayout._calcInverseTransform(r);var G=r._fullLayout._invTransform,Z=Wy.apply3DTransform(G)(o,s);o=Z[0],s=Z[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=B2t(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,v=n.append("path").attr("class","zoombox").attr("transform",Um(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),m=n.append("path").attr("class","zoombox-corners").attr("transform",Um(e.x0,e.y0)).style({fill:WT.background,stroke:WT.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function M(E,z){return 1-z/e.h}function T(E,z){return 1-(E+(e.h-z)/Math.sqrt(3))/e.w}function L(E,z){return(E-(e.h-z)/Math.sqrt(3))/e.w}function x(E,z){var q=o+E*i,U=s+z*a,G=Math.max(0,Math.min(1,M(o,s),M(q,U))),Z=Math.max(0,Math.min(1,T(o,s),T(q,U))),j=Math.max(0,Math.min(1,L(o,s),L(q,U))),N=(G/2+j)*e.w,H=(1-G/2-Z)*e.w,re=(N+H)/2,oe=H-N,_e=(1-G)*e.h,ke=_e-oe/jT;oe<L2e.MINZOOM?(c=l,v.attr("d",h),m.attr("d","M0,0Z")):(c={a:l.a+G*u,b:l.b+Z*u,c:l.c+j*u},v.attr("d",h+"M"+N+","+_e+"H"+H+"L"+re+","+ke+"L"+N+","+_e+"Z"),m.attr("d","M"+o+","+s+K2t+"M"+N+","+_e+X2t+"M"+H+","+_e+Z2t+"M"+re+","+ke+Y2t)),d||(v.transition().style("fill",f>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),m.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",b(c))}function C(){E2e(r),c!==l&&(OG.call("_guiRelayout",r,b(c)),M2e&&r.data&&r._context.showTips&&(Wy.notifier(q8(r,"Double-click to zoom back out"),"long",r),M2e=!1))}function S(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function g(E,z){var q=E/e.xaxis._m,U=z/e.yaxis._m;c={a:l.a-U,b:l.b+(q+U)/2,c:l.c-(q-U)/2};var G=[c.a,c.b,c.c].sort(Wy.sorterAsc),Z={a:G.indexOf(c.a),b:G.indexOf(c.b),c:G.indexOf(c.c)};G[0]<0&&(G[1]+G[0]/2<0?(G[2]+=G[0]+G[1],G[0]=G[1]=0):(G[2]+=G[0]/2,G[1]+=G[0]/2,G[0]=0),c={a:G[Z.a],b:G[Z.b],c:G[Z.c]},z=(l.a-c.a)*e.yaxis._m,E=(l.c-c.c-l.b+c.b)*e.xaxis._m);var j=Um(e.x0+E,e.y0+z);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",j);var N=Um(-E,-z);e.clipDefRelative.select("path").attr("transform",N),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(O8.hideOutsideRangePoints,e),r.emit("plotly_relayouting",b(c))}function P(){OG.call("_guiRelayout",r,b(c))}t.onmousemove=function(E){A2e.hover(r,E,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(E){r._dragging||T2e.unhover(r,E)},T2e.init(this.dragOptions)};function E2e(e){k2e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var GG=ye((nfr,D2e)=>{"use strict";var J2t=Ih(),$2t=Cc().attributes,su=Rd(),Q2t=mc().overrideAll,UG=Ao().extendFlat,VG={title:{text:su.title.text,font:su.title.font},color:su.color,tickmode:su.minor.tickmode,nticks:UG({},su.nticks,{dflt:6,min:1}),tick0:su.tick0,dtick:su.dtick,tickvals:su.tickvals,ticktext:su.ticktext,ticks:su.ticks,ticklen:su.ticklen,tickwidth:su.tickwidth,tickcolor:su.tickcolor,ticklabelstep:su.ticklabelstep,showticklabels:su.showticklabels,labelalias:su.labelalias,showtickprefix:su.showtickprefix,tickprefix:su.tickprefix,showticksuffix:su.showticksuffix,ticksuffix:su.ticksuffix,showexponent:su.showexponent,exponentformat:su.exponentformat,minexponent:su.minexponent,separatethousands:su.separatethousands,tickfont:su.tickfont,tickangle:su.tickangle,tickformat:su.tickformat,tickformatstops:su.tickformatstops,hoverformat:su.hoverformat,showline:UG({},su.showline,{dflt:!0}),linecolor:su.linecolor,linewidth:su.linewidth,showgrid:UG({},su.showgrid,{dflt:!0}),gridcolor:su.gridcolor,gridwidth:su.gridwidth,griddash:su.griddash,layer:su.layer,min:{valType:"number",dflt:0,min:0}},B8=D2e.exports=Q2t({domain:$2t({name:"ternary"}),bgcolor:{valType:"color",dflt:J2t.background},sum:{valType:"number",dflt:1,min:0},aaxis:VG,baxis:VG,caxis:VG},"plot","from-root");B8.uirevision={valType:"any",editType:"none"};B8.aaxis.uirevision=B8.baxis.uirevision=B8.caxis.uirevision={valType:"any",editType:"none"}});var q_=ye((afr,F2e)=>{"use strict";var ewt=Pr(),twt=vl(),rwt=Cc().defaults;F2e.exports=function(t,r,n,i){var a=i.type,o=i.attributes,s=i.handleDefaults,l=i.partition||"x",u=r._subplots[a],c=u.length,f=c&&u[0].replace(/\d+$/,""),h,d;function v(k,M){return ewt.coerce(h,d,o,k,M)}for(var m=0;m<c;m++){var b=u[m];t[b]?h=t[b]:h=t[b]={},d=twt.newContainer(r,b,f),i.noUirevision||v("uirevision",r.uirevision);var p={};p[l]=[m/c,(m+1)/c],rwt(d,r,v,p),i.id=b,s(h,d,v,i)}}});var B2e=ye((ofr,O2e)=>{"use strict";var iwt=ka(),nwt=vl(),N8=Pr(),awt=q_(),owt=s_(),swt=l_(),lwt=z3(),uwt=Lb(),cwt=u4(),q2e=GG(),z2e=["aaxis","baxis","caxis"];O2e.exports=function(t,r,n){awt(t,r,n,{type:"ternary",attributes:q2e,handleDefaults:fwt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function fwt(e,t,r,n){var i=r("bgcolor"),a=r("sum");n.bgColor=iwt.combine(i,n.paper_bgcolor);for(var o,s,l,u=0;u<z2e.length;u++)o=z2e[u],s=e[o]||{},l=nwt.newContainer(t,o),l._name=o,hwt(s,l,n,t);var c=t.aaxis,f=t.baxis,h=t.caxis;c.min+f.min+h.min>=a&&(c.min=0,f.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function hwt(e,t,r,n){var i=q2e[t._name];function a(d,v){return N8.coerce(e,t,i,d,v)}a("uirevision",n.uirevision),t.type="linear";var o=a("color"),s=o!==i.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=a("title.text",c);t._hovertitle=f===c?f:u,N8.coerceFont(a,"title.font",r.font,{overrideDflt:{size:N8.bigFont(r.font.size),color:s}}),a("min"),uwt(e,t,a,"linear"),swt(e,t,a,"linear"),owt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),lwt(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(N8.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),cwt(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a("hoverformat"),a("layer")}});var N2e=ye(Z0=>{"use strict";var dwt=R2e(),vwt=Id().getSubplotCalcData,pwt=Pr().counterRegex,XT="ternary";Z0.name=XT;var gwt=Z0.attr="subplot";Z0.idRoot=XT;Z0.idRegex=Z0.attrRegex=pwt(XT);var mwt=Z0.attributes={};mwt[gwt]={valType:"subplotid",dflt:"ternary",editType:"calc"};Z0.layoutAttributes=GG();Z0.supplyLayoutDefaults=B2e();Z0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[XT],a=0;a<i.length;a++){var o=i[a],s=vwt(n,XT,o),l=r[o]._subplot;l||(l=new dwt({id:o,graphDiv:t,container:r._ternarylayer.node()},r),r[o]._subplot=l),l.plot(s,r,t._promises)}};Z0.clean=function(e,t,r,n){for(var i=n._subplots[XT]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!t[o]&&s&&(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers["a-title"].remove(),s.layers["b-title"].remove(),s.layers["c-title"].remove())}};Z0.updateFx=function(e){var t=e._fullLayout;t._ternarylayer.selectAll("g.toplevel").style("cursor",t.dragmode==="pan"?"move":"crosshair")}});var V2e=ye((lfr,U2e)=>{"use strict";U2e.exports={attributes:FG(),supplyDefaults:c2e(),colorbar:$d(),formatLabels:h2e(),calc:g2e(),plot:y2e(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:x2e(),selectPoints:_T(),eventData:w2e(),moduleType:"trace",name:"scatterternary",basePlotModule:N2e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var H2e=ye((ufr,G2e)=>{"use strict";G2e.exports=V2e()});var HG=ye((cfr,W2e)=>{"use strict";var Oh=k4(),ZT=Ao().extendFlat,j2e=df().axisHoverFormat;W2e.exports={y:Oh.y,x:Oh.x,x0:Oh.x0,y0:Oh.y0,xhoverformat:j2e("x"),yhoverformat:j2e("y"),name:ZT({},Oh.name,{}),orientation:ZT({},Oh.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:Oh.fillcolor,points:ZT({},Oh.boxpoints,{}),jitter:ZT({},Oh.jitter,{}),pointpos:ZT({},Oh.pointpos,{}),width:ZT({},Oh.width,{}),marker:Oh.marker,text:Oh.text,hovertext:Oh.hovertext,hovertemplate:Oh.hovertemplate,hovertemplatefallback:Oh.hovertemplatefallback,quartilemethod:Oh.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:Oh.offsetgroup,alignmentgroup:Oh.alignmentgroup,selected:Oh.selected,unselected:Oh.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:Oh.zorder}});var XG=ye((ffr,X2e)=>{"use strict";var jG=C4(),WG=Pr().extendFlat;X2e.exports={violinmode:WG({},jG.boxmode,{}),violingap:WG({},jG.boxgap,{}),violingroupgap:WG({},jG.boxgroupgap,{})}});var $2e=ye((hfr,J2e)=>{"use strict";var Z2e=Pr(),ywt=ka(),Y2e=P4(),K2e=HG();J2e.exports=function(t,r,n,i){function a(L,x){return Z2e.coerce(t,r,K2e,L,x)}function o(L,x){return Z2e.coerce2(t,r,K2e,L,x)}if(Y2e.handleSampleDefaults(t,r,a,i),r.visible!==!1){a("bandwidth"),a("side");var s=a("width");s||(a("scalegroup",r.name),a("scalemode"));var l=a("span"),u;Array.isArray(l)&&(u="manual"),a("spanmode",u);var c=a("line.color",(t.marker||{}).color||n),f=a("line.width"),h=a("fillcolor",ywt.addOpacity(r.line.color,.5));Y2e.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),v=o("box.fillcolor",h),m=o("box.line.color",c),b=o("box.line.width",f),p=a("box.visible",!!(d||v||m||b));p||(r.box={visible:!1});var k=o("meanline.color",c),M=o("meanline.width",f),T=a("meanline.visible",!!(k||M));T||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var ewe=ye((dfr,Q2e)=>{"use strict";var _wt=Pr(),xwt=XG(),bwt=$I();Q2e.exports=function(t,r,n){function i(a,o){return _wt.coerce(t,r,xwt,a,o)}bwt._supply(t,r,n,i,"violin")}});var U8=ye(g2=>{"use strict";var wwt=Pr(),Twt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};g2.makeKDE=function(e,t,r){var n=r.length,i=Twt.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var l=0,u=0;u<n;u++)l+=i((s-r[u])/a);return o*l}};g2.getPositionOnKdePath=function(e,t,r){var n,i;t.orientation==="h"?(n="y",i="x"):(n="x",i="y");var a=wwt.findPointOnPath(e.path,r,i,{pathLength:e.pathLength}),o=e.posCenterPx,s=a[n],l=t.side==="both"?2*o-s:o;return[s,l]};g2.getKdeValue=function(e,t,r){var n=e.pts.map(g2.extractVal),i=g2.makeKDE(e,t,n);return i(r)/e.posDensityScale};g2.extractVal=function(e){return e.v}});var iwe=ye((pfr,rwe)=>{"use strict";var ZG=Pr(),YG=ho(),Awt=NV(),twe=U8(),Swt=fs().BADNUM;rwe.exports=function(t,r){var n=Awt(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=YG.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c<n.length;c++){var f=n[c],h=f.pts.map(twe.extractVal),d=f.bandwidth=Ewt(r,f,h),v=f.span=kwt(r,f,a,d);if(f.min===f.max&&d===0)v=f.span=[f.min,f.max],f.density=[{v:1,t:v[0]}],f.bandwidth=d,l=Math.max(l,1);else{var m=v[1]-v[0],b=Math.ceil(m/(d/3)),p=m/b;if(!isFinite(p)||!isFinite(b))return ZG.error("Something went wrong with computing the violin span"),n[0].t.empty=!0,n;var k=twe.makeKDE(f,r,h);f.density=new Array(b+1);for(var M=0;M<f.density.length;M++){var T=v[0]+M*p,L=k(T);f.density[M]={v:L,t:T},l=Math.max(l,L)}}u=Math.max(u,h.length),o=Math.min(o,v[0]),s=Math.max(s,v[1])}var x=YG.findExtremes(a,[o,s],{padded:!0});if(r._extremes[a._id]=x,r.width)n[0].t.maxKDE=l;else{var C=i._violinScaleGroupStats,S=r.scalegroup,g=C[S];g?(g.maxKDE=Math.max(g.maxKDE,l),g.maxCount=Math.max(g.maxCount,u)):C[S]={maxKDE:l,maxCount:u}}return n[0].t.labels.kde=ZG._(t,"kde:"),n};function Mwt(e,t,r){var n=Math.min(t,r/1.349);return 1.059*n*Math.pow(e,-.2)}function Ewt(e,t,r){var n=t.max-t.min;if(!n)return e.bandwidth?e.bandwidth:0;if(e.bandwidth)return Math.max(e.bandwidth,n/1e4);var i=r.length,a=ZG.stdev(r,i-1,t.mean);return Math.max(Mwt(i,a,t.q3-t.q1),n/100)}function kwt(e,t,r,n){var i=e.spanmode,a=e.span||[],o=[t.min,t.max],s=[t.min-2*n,t.max+2*n],l;function u(f){var h=a[f],d=r.type==="multicategory"?r.r2c(h):r.d2c(h,0,e[t.valLetter+"calendar"]);return d===Swt?s[f]:d}i==="soft"?l=s:i==="hard"?l=o:l=[u(0),u(1)];var c={type:"linear",range:l};return YG.setConvert(c),c.cleanRange(),l}});var owe=ye((gfr,awe)=>{"use strict";var Cwt=e8().setPositionOffset,nwe=["v","h"];awe.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o<nwe.length;o++){for(var s=nwe[o],l=s==="h"?a:i,u=[],c=0;c<n.length;c++){var f=n[c],h=f[0].t,d=f[0].trace;d.visible===!0&&d.type==="violin"&&!h.empty&&d.orientation===s&&d.xaxis===i._id&&d.yaxis===a._id&&u.push(c)}Cwt("violin",t,u,l)}}});var lwe=ye((mfr,swe)=>{"use strict";var KG=qa(),JG=Pr(),Lwt=So(),$G=t8(),Pwt=AU(),Iwt=U8();swe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var h=Pwt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return Lwt.smoothopen(h[0],1)}JG.makeTraceGroups(i,n,"trace violins").each(function(c){var f=KG.select(this),h=c[0],d=h.t,v=h.trace;if(v.visible!==!0||d.empty){f.remove();return}var m=d.bPos,b=d.bdPos,p=r[d.valLetter+"axis"],k=r[d.posLetter+"axis"],M=v.side==="both",T=M||v.side==="positive",L=M||v.side==="negative",x=f.selectAll("path.violin").data(JG.identity);x.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each(function(U){var G=KG.select(this),Z=U.density,j=Z.length,N=k.c2l(U.pos+m,!0),H=k.l2p(N),re;if(v.width)re=d.maxKDE/b;else{var oe=o._violinScaleGroupStats[v.scalegroup];re=v.scalemode==="count"?oe.maxKDE/b*(oe.maxCount/U.pts.length):oe.maxKDE/b}var _e,ke,Ce,ge,ie,Se,Ee;if(T){for(Se=new Array(j),ge=0;ge<j;ge++)Ee=Se[ge]={},Ee[d.posLetter]=N+Z[ge].v/re,Ee[d.valLetter]=p.c2l(Z[ge].t,!0);_e=u(Se,v)}if(L){for(Se=new Array(j),ie=0,ge=j-1;ie<j;ie++,ge--)Ee=Se[ie]={},Ee[d.posLetter]=N-Z[ge].v/re,Ee[d.valLetter]=p.c2l(Z[ge].t,!0);ke=u(Se,v)}if(M)Ce=_e+"L"+ke.slice(1)+"Z";else{var we=[H,p.c2p(Z[0].t)],De=[H,p.c2p(Z[j-1].t)];v.orientation==="h"&&(we.reverse(),De.reverse()),T?Ce="M"+we+"L"+_e.slice(1)+"L"+De:Ce="M"+De+"L"+ke.slice(1)+"L"+we}G.attr("d",Ce),U.posCenterPx=H,U.posDensityScale=re*b,U.path=G.node(),U.pathLength=U.path.getTotalLength()/(M?2:1)});var C=v.box,S=C.width,g=(C.line||{}).width,P,E;M?(P=b*S,E=0):T?(P=[0,b*S/2],E=g*{x:1,y:-1}[d.posLetter]):(P=[b*S/2,0],E=g*{x:-1,y:1}[d.posLetter]),$G.plotBoxAndWhiskers(f,{pos:k,val:p},v,{bPos:m,bdPos:P,bPosPxOffset:E}),$G.plotBoxMean(f,{pos:k,val:p},v,{bPos:m,bdPos:P,bPosPxOffset:E});var z;!v.box.visible&&v.meanline.visible&&(z=JG.identity);var q=f.selectAll("path.meanline").data(z||[]);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 G=p.c2p(U.mean,!0),Z=Iwt.getPositionOnKdePath(U,v,G);KG.select(this).attr("d",v.orientation==="h"?"M"+G+","+Z[0]+"V"+Z[1]:"M"+Z[0]+","+G+"H"+Z[1])}),$G.plotPoints(f,{x:s,y:l},v,d)})}});var fwe=ye((yfr,cwe)=>{"use strict";var uwe=qa(),YT=ka(),Rwt=sp().stylePoints;cwe.exports=function(t){var r=uwe.select(t).selectAll("g.trace.violins");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=n[0].trace,a=uwe.select(this),o=i.box||{},s=o.line||{},l=i.meanline||{},u=l.width;a.selectAll("path.violin").style("stroke-width",i.line.width+"px").call(YT.stroke,i.line.color).call(YT.fill,i.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(YT.stroke,s.color).call(YT.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(c).call(YT.stroke,l.color),a.selectAll("path.meanline").style(c).call(YT.stroke,l.color),Rwt(a,i,t)})}});var pwe=ye((_fr,vwe)=>{"use strict";var Dwt=ka(),QG=Pr(),Fwt=ho(),hwe=jV(),dwe=U8();vwe.exports=function(t,r,n,i,a){a||(a={});var o=a.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,h=[],d,v;if(c||f){var m=hwe.hoverOnBoxes(t,r,n,i);if(f&&m.length>0){var b=t.xa,p=t.ya,k,M,T,L,x;l.orientation==="h"?(x=r,k="y",T=p,M="x",L=b):(x=n,k="x",T=b,M="y",L=p);var C=s[t.index];if(x>=C.span[0]&&x<=C.span[1]){var S=QG.extendFlat({},t),g=L.c2p(x,!0),P=dwe.getKdeValue(C,l,x),E=dwe.getPositionOnKdePath(C,l,g),z=T._offset,q=T._length;S[k+"0"]=E[0],S[k+"1"]=E[1],S[M+"0"]=S[M+"1"]=g,S[M+"Label"]=M+": "+Fwt.hoverLabelText(L,x,l[M+"hoverformat"])+", "+s[0].t.labels.kde+" "+P.toFixed(3);for(var U=0,G=0;G<m.length;G++)if(m[G].attr==="med"){U=G;break}S.spikeDistance=m[U].spikeDistance;var Z=k+"Spike";S[Z]=m[U][Z],m[U].spikeDistance=void 0,m[U][Z]=void 0,S.hovertemplate=!1,h.push(S),v={},v[k+"1"]=QG.constrain(z+E[0],z,z+q),v[k+"2"]=QG.constrain(z+E[1],z,z+q),v[M+"1"]=v[M+"2"]=L._offset+g}}c&&(h=h.concat(m))}u.indexOf("points")!==-1&&(d=hwe.hoverOnPoints(t,r,n));var j=o.selectAll(".violinline-"+l.uid).data(v?[0]:[]);return j.enter().append("line").classed("violinline-"+l.uid,!0).attr("stroke-width",1.5),j.exit().remove(),j.attr(v).call(Dwt.stroke,t.color),i==="closest"?d?[d]:h:(d&&h.push(d),h)}});var mwe=ye((xfr,gwe)=>{"use strict";gwe.exports={attributes:HG(),layoutAttributes:XG(),supplyDefaults:$2e(),crossTraceDefaults:P4().crossTraceDefaults,supplyLayoutDefaults:ewe(),calc:iwe(),crossTraceCalc:owe(),plot:lwe(),style:fwe(),styleOnSelect:sp().styleOnSelect,hoverPoints:pwe(),selectPoints:WV(),moduleType:"trace",name:"violin",basePlotModule:mh(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var _we=ye((bfr,ywe)=>{"use strict";ywe.exports=mwe()});var bwe=ye((wfr,xwe)=>{"use strict";xwe.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var tH=ye((Tfr,Swe)=>{"use strict";var jc=zm(),eH=pf().line,zwt=Gl(),wwe=df().axisHoverFormat,{hovertemplateAttrs:qwt,texttemplateAttrs:Owt,templatefallbackAttrs:Twe}=Ll(),Awe=bwe(),Xy=Ao().extendFlat,Bwt=ka();Swe.exports={x:jc.x,x0:jc.x0,dx:jc.dx,y:jc.y,y0:jc.y0,dy:jc.dy,xperiod:jc.xperiod,yperiod:jc.yperiod,xperiod0:jc.xperiod0,yperiod0:jc.yperiod0,xperiodalignment:jc.xperiodalignment,yperiodalignment:jc.yperiodalignment,xhoverformat:wwe("x"),yhoverformat:wwe("y"),hovertext:jc.hovertext,hovertemplate:qwt({},{keys:Awe.eventDataKeys}),hovertemplatefallback:Twe(),hoverinfo:Xy({},zwt.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:Owt({editType:"plot"},{keys:Awe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Twe({editType:"plot"}),text:jc.text,textposition:jc.textposition,insidetextanchor:Xy({},jc.insidetextanchor,{dflt:"middle"}),textangle:Xy({},jc.textangle,{dflt:0}),textfont:jc.textfont,insidetextfont:jc.insidetextfont,outsidetextfont:jc.outsidetextfont,constraintext:jc.constraintext,cliponaxis:jc.cliponaxis,orientation:Xy({},jc.orientation,{}),offset:Xy({},jc.offset,{arrayOk:!1}),width:Xy({},jc.width,{arrayOk:!1}),marker:Nwt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Xy({},eH.color,{dflt:Bwt.defaultLine}),width:Xy({},eH.width,{dflt:0,editType:"plot"}),dash:eH.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:jc.offsetgroup,alignmentgroup:jc.alignmentgroup,zorder:jc.zorder};function Nwt(){var e=Xy({},jc.marker);return delete e.pattern,delete e.cornerradius,e}});var rH=ye((Afr,Mwe)=>{"use strict";Mwe.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var nH=ye((Sfr,kwe)=>{"use strict";var V8=Pr(),Uwt=e2(),Vwt=i0().handleText,Gwt=sT(),Hwt=Dg(),Ewe=tH(),iH=ka();function jwt(e,t,r,n){function i(f,h){return V8.coerce(e,t,Ewe,f,h)}var a=Gwt(e,t,n,i);if(!a){t.visible=!1;return}Hwt(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("orientation",t.y&&!t.x?"v":"h"),i("offset"),i("width");var o=i("text");i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var s=i("textposition");Vwt(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&i("textinfo",V8.isArrayOrTypedArray(o)?"text+value":"value");var l=i("marker.color",r);i("marker.line.color",iH.defaultLine),i("marker.line.width");var u=i("connector.visible");if(u){i("connector.fillcolor",Wwt(l));var c=i("connector.line.width");c&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function Wwt(e){var t=V8.isArrayOrTypedArray(e)?"#000":e;return iH.addOpacity(t,.5*iH.opacity(t))}function Xwt(e,t){var r,n;function i(o){return V8.coerce(n._input,n,Ewe,o)}for(var a=0;a<e.length;a++)n=e[a],n.type==="funnel"&&(r=n._input,Uwt(r,n,t,i,t.funnelmode))}kwe.exports={supplyDefaults:jwt,crossTraceDefaults:Xwt}});var Lwe=ye((Mfr,Cwe)=>{"use strict";var Zwt=Pr(),Ywt=rH();Cwe.exports=function(e,t,r){var n=!1;function i(s,l){return Zwt.coerce(e,t,Ywt,s,l)}for(var a=0;a<r.length;a++){var o=r[a];if(o.visible&&o.type==="funnel"){n=!0;break}}n&&(i("funnelmode"),i("funnelgap",.2),i("funnelgroupgap"))}});var Iwe=ye((Efr,Pwe)=>{"use strict";var KT=Pr();Pwe.exports=function(t,r){for(var n=0;n<t.length;n++)t[n].i=n;KT.mergeArray(r.text,t,"tx"),KT.mergeArray(r.hovertext,t,"htx");var i=r.marker;if(i){KT.mergeArray(i.opacity,t,"mo"),KT.mergeArray(i.color,t,"mc");var a=i.line;a&&(KT.mergeArray(a.color,t,"mlc"),KT.mergeArrayCastPositive(a.width,t,"mlw"))}}});var zwe=ye((kfr,Fwe)=>{"use strict";var Rwe=ho(),Dwe=zg(),Kwt=Iwe(),Jwt=q0(),j4=fs().BADNUM;Fwe.exports=function(t,r){var n=Rwe.getFromId(t,r.xaxis||"x"),i=Rwe.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f,h;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),l=Dwe(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=Dwe(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var d=Math.min(o.length,a.length),v=new Array(d);for(r._base=[],f=0;f<d;f++){a[f]<0&&(a[f]=j4);var m=!1;a[f]!==j4&&f+1<d&&a[f+1]!==j4&&(m=!0),h=v[f]={p:o[f],s:a[f],cNext:m},r._base[f]=-.5*h.s,u&&(v[f].orig_p=s[f],v[f][c+"End"]=l.ends[f],v[f][c+"Start"]=l.starts[f]),r.ids&&(h.id=String(r.ids[f])),f===0&&(v[0].vTotal=0),v[0].vTotal+=aH(h.s),h.begR=aH(h.s)/aH(v[0].s)}var b;for(f=0;f<d;f++)h=v[f],h.s!==j4&&(h.sumR=h.s/v[0].vTotal,h.difR=b!==void 0?h.s/b:1,b=h.s);return Kwt(v,r),Jwt(v,r),v};function aH(e){return e===j4?0:e}});var Bwe=ye((Cfr,Owe)=>{"use strict";var qwe=t2().setGroupPositions;Owe.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h<i.length;h++){var d=i[h],v=d.orientation==="h";d.visible===!0&&d.xaxis===o._id&&d.yaxis===s._id&&d.type==="funnel"&&(f=a[h],v?c.push(f):u.push(f),l.push(f))}var m={mode:n.funnelmode,norm:n.funnelnorm,gap:n.funnelgap,groupgap:n.funnelgroupgap};for(qwe(t,o,s,u,m),qwe(t,s,o,c,m),h=0;h<l.length;h++){f=l[h];for(var b=0;b<f.length;b++)b+1<f.length&&(f[b].nextP0=f[b+1].p0,f[b].nextS0=f[b+1].s0,f[b].nextP1=f[b+1].p1,f[b].nextS1=f[b+1].s1)}}});var Gwe=ye((Lfr,Vwe)=>{"use strict";var G8=qa(),B_=Pr(),Nwe=So(),O_=fs().BADNUM,$wt=d2(),Qwt=bv().clearMinTextSize;Vwe.exports=function(t,r,n,i){var a=t._fullLayout;Qwt("funnel",a),e3t(t,r,n,i),t3t(t,r,n,i),$wt.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function e3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;B_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=G8.select(this),l=o[0].trace,u=B_.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(B_.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var m=Uwe(d,i,a,c),b=m[0],p=m[1],k="";b[0]!==O_&&p[0]!==O_&&b[1]!==O_&&p[1]!==O_&&b[2]!==O_&&p[2]!==O_&&b[3]!==O_&&p[3]!==O_&&(c?k+="M"+b[0]+","+p[1]+"L"+b[2]+","+p[2]+"H"+b[3]+"L"+b[1]+","+p[1]+"Z":k+="M"+b[1]+","+p[1]+"L"+b[2]+","+p[3]+"V"+p[2]+"L"+b[1]+","+p[0]+"Z"),k===""&&(k="M0,0Z"),B_.ensureSingle(G8.select(this),"path").attr("d",k).call(Nwe.setClipUrl,t.layerClipId,e)}})})}function t3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;B_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=G8.select(this),l=o[0].trace,u=B_.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.line").data(B_.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var m=Uwe(d,i,a,c),b=m[0],p=m[1],k="";b[3]!==void 0&&p[3]!==void 0&&(c?(k+="M"+b[0]+","+p[1]+"L"+b[2]+","+p[2],k+="M"+b[1]+","+p[1]+"L"+b[3]+","+p[2]):(k+="M"+b[1]+","+p[1]+"L"+b[2]+","+p[3],k+="M"+b[1]+","+p[0]+"L"+b[2]+","+p[2])),k===""&&(k="M0,0Z"),B_.ensureSingle(G8.select(this),"path").attr("d",k).call(Nwe.setClipUrl,t.layerClipId,e)}})})}function Uwe(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),i[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),i[3]=o.c2p(e.nextS1,!0),a[3]=s.c2p(e.nextP1,!0),n?[i,a]:[a,i]}});var Wwe=ye((Pfr,jwe)=>{"use strict";var W4=qa(),Hwe=So(),oH=ka(),r3t=X1().DESELECTDIM,i3t=V0(),n3t=bv().resizeText,a3t=i3t.styleTextPoints;function o3t(e,t,r){var n=r||W4.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");n3t(e,n,"funnel"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=W4.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;W4.select(this).call(oH.fill,s.mc||l.color).call(oH.stroke,s.mlc||l.line.color).call(Hwe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?r3t:1)}}),a3t(a,o,e),a.selectAll(".regions").each(function(){W4.select(this).selectAll("path").style("stroke-width",0).call(oH.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;Hwe.lineGroupStyle(W4.select(this).selectAll("path"),s.width,s.color,s.dash)})})}jwe.exports={style:o3t}});var Ywe=ye((Ifr,Zwe)=>{"use strict";var Xwe=ka().opacity,s3t=IT().hoverOnBars,sH=Pr().formatPercent;Zwe.exports=function(t,r,n,i,a){var o=s3t(t,r,n,i,a);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],h=u?"x":"y";o[h+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=sH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=sH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=sH(f.sumR,1);var d=f.hi||l.hoverinfo,v=[];if(d&&d!=="none"&&d!=="skip"){var m=d==="all",b=d.split("+"),p=function(k){return m||b.indexOf(k)!==-1};p("percent initial")&&v.push(o.percentInitialLabel+" of initial"),p("percent previous")&&v.push(o.percentPreviousLabel+" of previous"),p("percent total")&&v.push(o.percentTotalLabel+" of total")}return o.extraText=v.join("<br>"),o.color=l3t(l,f),[o]}};function l3t(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(Xwe(n))return n;if(Xwe(i)&&a)return i}});var Jwe=ye((Rfr,Kwe)=>{"use strict";Kwe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var Qwe=ye((Dfr,$we)=>{"use strict";$we.exports={attributes:tH(),layoutAttributes:rH(),supplyDefaults:nH().supplyDefaults,crossTraceDefaults:nH().crossTraceDefaults,supplyLayoutDefaults:Lwe(),calc:zwe(),crossTraceCalc:Bwe(),plot:Gwe(),style:Wwe().style,hoverPoints:Ywe(),eventData:Jwe(),selectPoints:RT(),moduleType:"trace",name:"funnel",basePlotModule:mh(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var t3e=ye((Ffr,e3e)=>{"use strict";e3e.exports=Qwe()});var i3e=ye((zfr,r3e)=>{"use strict";r3e.exports={eventDataKeys:["initial","delta","final"]}});var cH=ye((qfr,s3e)=>{"use strict";var _c=zm(),lH=pf().line,u3t=Gl(),n3e=df().axisHoverFormat,{hovertemplateAttrs:c3t,texttemplateAttrs:f3t,templatefallbackAttrs:a3e}=Ll(),o3e=i3e(),JT=Ao().extendFlat,h3t=ka();function uH(e){return{marker:{color:JT({},_c.marker.color,{arrayOk:!1,editType:"style"}),line:{color:JT({},_c.marker.line.color,{arrayOk:!1,editType:"style"}),width:JT({},_c.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}s3e.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:_c.x,x0:_c.x0,dx:_c.dx,y:_c.y,y0:_c.y0,dy:_c.dy,xperiod:_c.xperiod,yperiod:_c.yperiod,xperiod0:_c.xperiod0,yperiod0:_c.yperiod0,xperiodalignment:_c.xperiodalignment,yperiodalignment:_c.yperiodalignment,xhoverformat:n3e("x"),yhoverformat:n3e("y"),hovertext:_c.hovertext,hovertemplate:c3t({},{keys:o3e.eventDataKeys}),hovertemplatefallback:a3e(),hoverinfo:JT({},u3t.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:f3t({editType:"plot"},{keys:o3e.eventDataKeys.concat(["label"])}),texttemplatefallback:a3e({editType:"plot"}),text:_c.text,textposition:_c.textposition,insidetextanchor:_c.insidetextanchor,textangle:_c.textangle,textfont:_c.textfont,insidetextfont:_c.insidetextfont,outsidetextfont:_c.outsidetextfont,constraintext:_c.constraintext,cliponaxis:_c.cliponaxis,orientation:_c.orientation,offset:_c.offset,width:_c.width,increasing:uH("increasing"),decreasing:uH("decreasing"),totals:uH("intermediate sums and total"),connector:{line:{color:JT({},lH.color,{dflt:h3t.defaultLine}),width:JT({},lH.width,{editType:"plot"}),dash:lH.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:_c.offsetgroup,alignmentgroup:_c.alignmentgroup,zorder:_c.zorder}});var fH=ye((Ofr,l3e)=>{"use strict";l3e.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var $T=ye((Bfr,u3e)=>{"use strict";u3e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var dH=ye((Nfr,d3e)=>{"use strict";var c3e=Pr(),d3t=e2(),v3t=i0().handleText,p3t=sT(),g3t=Dg(),f3e=cH(),m3t=ka(),h3e=$T(),y3t=h3e.INCREASING.COLOR,_3t=h3e.DECREASING.COLOR,x3t="#4499FF";function hH(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",m3t.defaultLine),e(t+".marker.line.width")}function b3t(e,t,r,n){function i(u,c){return c3e.coerce(e,t,f3e,u,c)}var a=p3t(e,t,n,i);if(!a){t.visible=!1;return}g3t(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("measure"),i("orientation",t.x&&!t.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var o=i("textposition");v3t(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(i("texttemplate"),i("texttemplatefallback"),t.texttemplate||i("textinfo")),hH(i,"increasing",y3t),hH(i,"decreasing",_3t),hH(i,"totals",x3t);var s=i("connector.visible");if(s){i("connector.mode");var l=i("connector.line.width");l&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function w3t(e,t){var r,n;function i(o){return c3e.coerce(n._input,n,f3e,o)}if(t.waterfallmode==="group")for(var a=0;a<e.length;a++)n=e[a],r=n._input,d3t(r,n,t,i,t.waterfallmode)}d3e.exports={supplyDefaults:b3t,crossTraceDefaults:w3t}});var p3e=ye((Ufr,v3e)=>{"use strict";var T3t=Pr(),A3t=fH();v3e.exports=function(e,t,r){var n=!1;function i(s,l){return T3t.coerce(e,t,A3t,s,l)}for(var a=0;a<r.length;a++){var o=r[a];if(o.visible&&o.type==="waterfall"){n=!0;break}}n&&(i("waterfallmode"),i("waterfallgap",.2),i("waterfallgroupgap"))}});var b3e=ye((Vfr,x3e)=>{"use strict";var g3e=ho(),m3e=zg(),y3e=Pr().mergeArray,S3t=q0(),_3e=fs().BADNUM;function vH(e){return e==="a"||e==="absolute"}function pH(e){return e==="t"||e==="total"}x3e.exports=function(t,r){var n=g3e.getFromId(t,r.xaxis||"x"),i=g3e.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),l=m3e(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=m3e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,a.length),h=new Array(f),d=0,v,m=!1,b=0;b<f;b++){var p=a[b]||0,k=!1;(a[b]!==_3e||pH(r.measure[b])||vH(r.measure[b]))&&b+1<f&&(a[b+1]!==_3e||pH(r.measure[b+1])||vH(r.measure[b+1]))&&(k=!0);var M=h[b]={i:b,p:o[b],s:p,rawS:p,cNext:k};vH(r.measure[b])?(d=M.s,M.isSum=!0,M.dir="totals",M.s=d):pH(r.measure[b])?(M.isSum=!0,M.dir="totals",M.s=d):(M.isSum=!1,M.dir=M.rawS<0?"decreasing":"increasing",v=M.s,M.s=d+v,d+=v),M.dir==="totals"&&(m=!0),u&&(h[b].orig_p=s[b],h[b][c+"End"]=l.ends[b],h[b][c+"Start"]=l.starts[b]),r.ids&&(M.id=String(r.ids[b])),M.v=(r.base||0)+d}return h.length&&(h[0].hasTotals=m),y3e(r.text,h,"tx"),y3e(r.hovertext,h,"htx"),S3t(h,r),h}});var A3e=ye((Gfr,T3e)=>{"use strict";var w3e=t2().setGroupPositions;T3e.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h<i.length;h++){var d=i[h];d.visible===!0&&d.xaxis===o._id&&d.yaxis===s._id&&d.type==="waterfall"&&(f=a[h],d.orientation==="h"?c.push(f):u.push(f),l.push(f))}var v={mode:n.waterfallmode,norm:n.waterfallnorm,gap:n.waterfallgap,groupgap:n.waterfallgroupgap};for(w3e(t,o,s,u,v),w3e(t,s,o,c,v),h=0;h<l.length;h++){f=l[h];for(var m=0;m<f.length;m++){var b=f[m];b.isSum===!1&&(b.s0+=m===0?0:f[m-1].s),m+1<f.length&&(f[m].nextP0=f[m+1].p0,f[m].nextS0=f[m+1].s0)}}}});var E3e=ye((Hfr,M3e)=>{"use strict";var S3e=qa(),H8=Pr(),M3t=So(),QT=fs().BADNUM,E3t=d2(),k3t=bv().clearMinTextSize;M3e.exports=function(t,r,n,i){var a=t._fullLayout;k3t("waterfall",a),E3t.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),C3t(t,r,n,i)};function C3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;H8.makeTraceGroups(n,r,"trace bars").each(function(o){var s=S3e.select(this),l=o[0].trace,u=H8.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,h=u.selectAll("g.line").data(H8.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(v,m){if(!(m!==d-1&&!v.cNext)){var b=L3t(v,i,a,c),p=b[0],k=b[1],M="";p[0]!==QT&&k[0]!==QT&&p[1]!==QT&&k[1]!==QT&&(f==="spanning"&&!v.isSum&&m>0&&(c?M+="M"+p[0]+","+k[1]+"V"+k[0]:M+="M"+p[1]+","+k[0]+"H"+p[0]),f!=="between"&&(v.isSum||m<d-1)&&(c?M+="M"+p[1]+","+k[0]+"V"+k[1]:M+="M"+p[0]+","+k[1]+"H"+p[1]),p[2]!==QT&&k[2]!==QT&&(c?M+="M"+p[1]+","+k[1]+"V"+k[2]:M+="M"+p[1]+","+k[1]+"H"+p[2])),M===""&&(M="M0,0Z"),H8.ensureSingle(S3e.select(this),"path").attr("d",M).call(M3t.setClipUrl,t.layerClipId,e)}})})}function L3t(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),i[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),n?[i,a]:[a,i]}});var P3e=ye((jfr,L3e)=>{"use strict";var j8=qa(),k3e=So(),C3e=ka(),P3t=X1().DESELECTDIM,I3t=V0(),R3t=bv().resizeText,D3t=I3t.styleTextPoints;function F3t(e,t,r){var n=r||j8.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");R3t(e,n,"waterfall"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=j8.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;j8.select(this).call(C3e.fill,l.color).call(C3e.stroke,l.line.color).call(k3e.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?P3t:1)}}),D3t(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;k3e.lineGroupStyle(j8.select(this).selectAll("path"),s.width,s.color,s.dash)})})}L3e.exports={style:F3t}});var z3e=ye((Wfr,F3e)=>{"use strict";var z3t=ho().hoverLabelText,I3e=ka().opacity,q3t=IT().hoverOnBars,R3e=$T(),D3e={increasing:R3e.INCREASING.SYMBOL,decreasing:R3e.DECREASING.SYMBOL};F3e.exports=function(t,r,n,i,a){var o=q3t(t,r,n,i,a);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function h(x){return z3t(f,x,l[c+"hoverformat"])}var d=o.index,v=s[d],m=v.isSum?v.b+v.s:v.rawS;o.initial=v.b+v.s-m,o.delta=m,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=m<0?"("+b+")":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var p=v.hi||l.hoverinfo,k=[];if(p&&p!=="none"&&p!=="skip"){var M=p==="all",T=p.split("+"),L=function(x){return M||T.indexOf(x)!==-1};v.isSum||(L("final")&&(u?!L("x"):!L("y"))&&k.push(o.finalLabel),L("delta")&&(m<0?k.push(o.deltaLabel+" "+D3e.decreasing):k.push(o.deltaLabel+" "+D3e.increasing)),L("initial")&&k.push("Initial: "+o.initialLabel))}return k.length&&(o.extraText=k.join("<br>")),o.color=O3t(l,v),[o]};function O3t(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(I3e(n))return n;if(I3e(i)&&a)return i}});var O3e=ye((Xfr,q3e)=>{"use strict";q3e.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var N3e=ye((Zfr,B3e)=>{"use strict";B3e.exports={attributes:cH(),layoutAttributes:fH(),supplyDefaults:dH().supplyDefaults,crossTraceDefaults:dH().crossTraceDefaults,supplyLayoutDefaults:p3e(),calc:b3e(),crossTraceCalc:A3e(),plot:E3e(),style:P3e().style,hoverPoints:z3e(),eventData:O3e(),selectPoints:RT(),moduleType:"trace",name:"waterfall",basePlotModule:mh(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var V3e=ye((Yfr,U3e)=>{"use strict";U3e.exports=N3e()});var eA=ye((Kfr,G3e)=>{"use strict";G3e.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}}});var gH=ye((Jfr,j3e)=>{"use strict";var B3t=Gl(),N3t=pf().zorder,{hovertemplateAttrs:U3t,templatefallbackAttrs:V3t}=Ll(),H3e=Ao().extendFlat,G3t=eA().colormodel,Z4=["rgb","rgba","rgba256","hsl","hsla"],H3t=[],j3t=[];for(tA=0;tA<Z4.length;tA++)X4=G3t[Z4[tA]],H3t.push("For the `"+Z4[tA]+"` colormodel, it is ["+(X4.zminDflt||X4.min).join(", ")+"]."),j3t.push("For the `"+Z4[tA]+"` colormodel, it is ["+(X4.zmaxDflt||X4.max).join(", ")+"].");var X4,tA;j3e.exports=H3e({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:Z4,editType:"calc"},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot"},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:H3e({},B3t.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:U3t({},{keys:["z","color","colormodel"]}),hovertemplatefallback:V3t(),zorder:N3t})});var Z3e=ye(($fr,X3e)=>{"use strict";var W3t=Pr(),X3t=gH(),W3e=eA(),Z3t=qy().IMAGE_URL_PREFIX;X3e.exports=function(t,r){function n(o,s){return W3t.coerce(t,r,X3t,o,s)}n("source"),r.source&&!r.source.match(Z3t)&&delete r.source,r._hasSource=!!r.source;var i=n("z");if(r._hasZ=!(i===void 0||!i.length||!i[0]||!i[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var a;r._hasZ?(n("colormodel","rgb"),a=W3e.colormodel[r.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=W3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),r._length=null,n("zorder")}});var Zy=ye((Qfr,mH)=>{typeof Object.create=="function"?mH.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:mH.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var yH=ye((ehr,Y3e)=>{Y3e.exports=Ab().EventEmitter});var $3e=ye(W8=>{"use strict";W8.byteLength=K3t;W8.toByteArray=$3t;W8.fromByteArray=tTt;var Gm=[],Y0=[],Y3t=typeof Uint8Array!="undefined"?Uint8Array:Array,_H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(m2=0,K3e=_H.length;m2<K3e;++m2)Gm[m2]=_H[m2],Y0[_H.charCodeAt(m2)]=m2;var m2,K3e;Y0[45]=62;Y0[95]=63;function J3e(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function K3t(e){var t=J3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function J3t(e,t,r){return(t+r)*3/4-r}function $3t(e){var t,r=J3e(e),n=r[0],i=r[1],a=new Y3t(J3t(e,n,i)),o=0,s=i>0?n-4:n,l;for(l=0;l<s;l+=4)t=Y0[e.charCodeAt(l)]<<18|Y0[e.charCodeAt(l+1)]<<12|Y0[e.charCodeAt(l+2)]<<6|Y0[e.charCodeAt(l+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=Y0[e.charCodeAt(l)]<<2|Y0[e.charCodeAt(l+1)]>>4,a[o++]=t&255),i===1&&(t=Y0[e.charCodeAt(l)]<<10|Y0[e.charCodeAt(l+1)]<<4|Y0[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function Q3t(e){return Gm[e>>18&63]+Gm[e>>12&63]+Gm[e>>6&63]+Gm[e&63]}function eTt(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(Q3t(n));return i.join("")}function tTt(e){for(var t,r=e.length,n=r%3,i=[],a=16383,o=0,s=r-n;o<s;o+=a)i.push(eTt(e,o,o+a>s?s:o+a));return n===1?(t=e[r-1],i.push(Gm[t>>2]+Gm[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Gm[t>>10]+Gm[t>>4&63]+Gm[t<<2&63]+"=")),i.join("")}});var Q3e=ye(xH=>{xH.read=function(e,t,r,n,i){var a,o,s=i*8-n-1,l=(1<<s)-1,u=l>>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-u;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-u}return(d?-1:1)*o*Math.pow(2,a-n)};xH.write=function(e,t,r,n,i,a){var o,s,l,u=a*8-i-1,c=(1<<u)-1,f=c>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,v=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=s&255,d+=v,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[r+d]=o&255,d+=v,o/=256,u-=8);e[r+d-v]|=m*128}});var _2=ye(aA=>{"use strict";var bH=$3e(),iA=Q3e(),eTe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;aA.Buffer=ra;aA.SlowBuffer=sTt;aA.INSPECT_MAX_BYTES=50;var X8=2147483647;aA.kMaxLength=X8;ra.TYPED_ARRAY_SUPPORT=rTt();!ra.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 rTt(){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(ra.prototype,"parent",{enumerable:!0,get:function(){if(ra.isBuffer(this))return this.buffer}});Object.defineProperty(ra.prototype,"offset",{enumerable:!0,get:function(){if(ra.isBuffer(this))return this.byteOffset}});function Yy(e){if(e>X8)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,ra.prototype),t}function ra(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return SH(e)}return nTe(e,t,r)}ra.poolSize=8192;function nTe(e,t,r){if(typeof e=="string")return nTt(e,t);if(ArrayBuffer.isView(e))return aTt(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Hm(e,ArrayBuffer)||e&&Hm(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Hm(e,SharedArrayBuffer)||e&&Hm(e.buffer,SharedArrayBuffer)))return TH(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return ra.from(n,t,r);let i=oTt(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return ra.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)}ra.from=function(e,t,r){return nTe(e,t,r)};Object.setPrototypeOf(ra.prototype,Uint8Array.prototype);Object.setPrototypeOf(ra,Uint8Array);function aTe(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function iTt(e,t,r){return aTe(e),e<=0?Yy(e):t!==void 0?typeof r=="string"?Yy(e).fill(t,r):Yy(e).fill(t):Yy(e)}ra.alloc=function(e,t,r){return iTt(e,t,r)};function SH(e){return aTe(e),Yy(e<0?0:MH(e)|0)}ra.allocUnsafe=function(e){return SH(e)};ra.allocUnsafeSlow=function(e){return SH(e)};function nTt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!ra.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=oTe(e,t)|0,n=Yy(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function wH(e){let t=e.length<0?0:MH(e.length)|0,r=Yy(t);for(let n=0;n<t;n+=1)r[n]=e[n]&255;return r}function aTt(e){if(Hm(e,Uint8Array)){let t=new Uint8Array(e);return TH(t.buffer,t.byteOffset,t.byteLength)}return wH(e)}function TH(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return t===void 0&&r===void 0?n=new Uint8Array(e):r===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,r),Object.setPrototypeOf(n,ra.prototype),n}function oTt(e){if(ra.isBuffer(e)){let t=MH(e.length)|0,r=Yy(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||kH(e.length)?Yy(0):wH(e);if(e.type==="Buffer"&&Array.isArray(e.data))return wH(e.data)}function MH(e){if(e>=X8)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+X8.toString(16)+" bytes");return e|0}function sTt(e){return+e!=e&&(e=0),ra.alloc(+e)}ra.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==ra.prototype};ra.compare=function(t,r){if(Hm(t,Uint8Array)&&(t=ra.from(t,t.offset,t.byteLength)),Hm(r,Uint8Array)&&(r=ra.from(r,r.offset,r.byteLength)),!ra.isBuffer(t)||!ra.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};ra.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}};ra.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return ra.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;let i=ra.allocUnsafe(r),a=0;for(n=0;n<t.length;++n){let o=t[n];if(Hm(o,Uint8Array))a+o.length>i.length?(ra.isBuffer(o)||(o=ra.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(ra.isBuffer(o))o.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return i};function oTe(e,t){if(ra.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Hm(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return AH(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return pTe(e).length;default:if(i)return n?-1:AH(e).length;t=(""+t).toLowerCase(),i=!0}}ra.byteLength=oTe;function lTt(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 yTt(this,t,r);case"utf8":case"utf-8":return lTe(this,t,r);case"ascii":return gTt(this,t,r);case"latin1":case"binary":return mTt(this,t,r);case"base64":return vTt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _Tt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}ra.prototype._isBuffer=!0;function y2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}ra.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)y2(this,r,r+1);return this};ra.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)y2(this,r,r+3),y2(this,r+1,r+2);return this};ra.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)y2(this,r,r+7),y2(this,r+1,r+6),y2(this,r+2,r+5),y2(this,r+3,r+4);return this};ra.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?lTe(this,0,t):lTt.apply(this,arguments)};ra.prototype.toLocaleString=ra.prototype.toString;ra.prototype.equals=function(t){if(!ra.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:ra.compare(this,t)===0};ra.prototype.inspect=function(){let t="",r=aA.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};eTe&&(ra.prototype[eTe]=ra.prototype.inspect);ra.prototype.compare=function(t,r,n,i,a){if(Hm(t,Uint8Array)&&(t=ra.from(t,t.offset,t.byteLength)),!ra.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let o=a-i,s=n-r,l=Math.min(o,s),u=this.slice(i,a),c=t.slice(r,n);for(let f=0;f<l;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return o<s?-1:s<o?1:0};function sTe(e,t,r,n,i){if(e.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,kH(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=ra.from(t,n)),ra.isBuffer(t))return t.length===0?-1:tTe(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):tTe(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function tTe(e,t,r,n,i){let a=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,r/=2}function l(c,f){return a===1?c[f]:c.readUInt16BE(f*a)}let u;if(i){let c=-1;for(u=r;u<o;u++)if(l(e,u)===l(t,c===-1?0:u-c)){if(c===-1&&(c=u),u-c+1===s)return c*a}else c!==-1&&(u-=u-c),c=-1}else for(r+s>o&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;f<s;f++)if(l(e,u+f)!==l(t,f)){c=!1;break}if(c)return u}return-1}ra.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};ra.prototype.indexOf=function(t,r,n){return sTe(this,t,r,n,!0)};ra.prototype.lastIndexOf=function(t,r,n){return sTe(this,t,r,n,!1)};function uTt(e,t,r,n){r=Number(r)||0;let i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let o;for(o=0;o<n;++o){let s=parseInt(t.substr(o*2,2),16);if(kH(s))return o;e[r+o]=s}return o}function cTt(e,t,r,n){return Z8(AH(t,e.length-r),e,r,n)}function fTt(e,t,r,n){return Z8(TTt(t),e,r,n)}function hTt(e,t,r,n){return Z8(pTe(t),e,r,n)}function dTt(e,t,r,n){return Z8(ATt(t,e.length-r),e,r,n)}ra.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 uTt(this,t,r,n);case"utf8":case"utf-8":return cTt(this,t,r,n);case"ascii":case"latin1":case"binary":return fTt(this,t,r,n);case"base64":return hTt(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dTt(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};ra.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function vTt(e,t,r){return t===0&&r===e.length?bH.fromByteArray(e):bH.fromByteArray(e.slice(t,r))}function lTe(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=r){let l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(f=(a&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return pTt(n)}var rTe=4096;function pTt(e){let t=e.length;if(t<=rTe)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=rTe));return r}function gTt(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 mTt(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 yTt(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+=STt[e[a]];return i}function _Tt(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}ra.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,ra.prototype),i};function ev(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}ra.prototype.readUintLE=ra.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o<r&&(a*=256);)i+=this[t+o]*a;return i};ra.prototype.readUintBE=ra.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};ra.prototype.readUint8=ra.prototype.readUInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]};ra.prototype.readUint16LE=ra.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]|this[t+1]<<8};ra.prototype.readUint16BE=ra.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]<<8|this[t+1]};ra.prototype.readUint32LE=ra.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};ra.prototype.readUint32BE=ra.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};ra.prototype.readBigUInt64LE=N_(function(t){t=t>>>0,nA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<<BigInt(32))});ra.prototype.readBigUInt64BE=N_(function(t){t=t>>>0,nA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(a)});ra.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o<r&&(a*=256);)i+=this[t+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*r)),i};ra.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=r,a=1,o=this[t+--i];for(;i>0&&(a*=256);)o+=this[t+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};ra.prototype.readInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};ra.prototype.readInt16LE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};ra.prototype.readInt16BE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};ra.prototype.readInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};ra.prototype.readInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};ra.prototype.readBigInt64LE=N_(function(t){t=t>>>0,nA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});ra.prototype.readBigInt64BE=N_(function(t){t=t>>>0,nA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n)});ra.prototype.readFloatLE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),iA.read(this,t,!0,23,4)};ra.prototype.readFloatBE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),iA.read(this,t,!1,23,4)};ra.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),iA.read(this,t,!0,52,8)};ra.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),iA.read(this,t,!1,52,8)};function Rp(e,t,r,n,i,a){if(!ra.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")}ra.prototype.writeUintLE=ra.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=1,o=0;for(this[r]=t&255;++o<n&&(a*=256);)this[r+o]=t/a&255;return r+n};ra.prototype.writeUintBE=ra.prototype.writeUIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=n-1,o=1;for(this[r+a]=t&255;--a>=0&&(o*=256);)this[r+a]=t/o&255;return r+n};ra.prototype.writeUint8=ra.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,255,0),this[r]=t&255,r+1};ra.prototype.writeUint16LE=ra.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};ra.prototype.writeUint16BE=ra.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};ra.prototype.writeUint32LE=ra.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};ra.prototype.writeUint32BE=ra.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function uTe(e,t,r,n,i){vTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function cTe(e,t,r,n,i){vTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}ra.prototype.writeBigUInt64LE=N_(function(t,r=0){return uTe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});ra.prototype.writeBigUInt64BE=N_(function(t,r=0){return cTe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});ra.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=0,o=1,s=0;for(this[r]=t&255;++a<n&&(o*=256);)t<0&&s===0&&this[r+a-1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+n};ra.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=n-1,o=1,s=0;for(this[r+a]=t&255;--a>=0&&(o*=256);)t<0&&s===0&&this[r+a+1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+n};ra.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};ra.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};ra.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};ra.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};ra.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};ra.prototype.writeBigInt64LE=N_(function(t,r=0){return uTe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});ra.prototype.writeBigInt64BE=N_(function(t,r=0){return cTe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fTe(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function hTe(e,t,r,n,i){return t=+t,r=r>>>0,i||fTe(e,t,r,4,34028234663852886e22,-34028234663852886e22),iA.write(e,t,r,n,23,4),r+4}ra.prototype.writeFloatLE=function(t,r,n){return hTe(this,t,r,!0,n)};ra.prototype.writeFloatBE=function(t,r,n){return hTe(this,t,r,!1,n)};function dTe(e,t,r,n,i){return t=+t,r=r>>>0,i||fTe(e,t,r,8,17976931348623157e292,-17976931348623157e292),iA.write(e,t,r,n,52,8),r+8}ra.prototype.writeDoubleLE=function(t,r,n){return dTe(this,t,r,!0,n)};ra.prototype.writeDoubleBE=function(t,r,n){return dTe(this,t,r,!1,n)};ra.prototype.copy=function(t,r,n,i){if(!ra.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};ra.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"&&!ra.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=ra.isBuffer(t)?t:ra.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 rA={};function EH(e,t,r){rA[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}EH("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);EH("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);EH("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=iTe(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=iTe(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function iTe(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function xTt(e,t,r){nA(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Y4(t,e.length-(r+1))}function vTe(e,t,r,n,i,a){if(e>r||e<t){let o=typeof t=="bigint"?"n":"",s;throw a>3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:s=`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new rA.ERR_OUT_OF_RANGE("value",s,e)}xTt(n,i,a)}function nA(e,t){if(typeof e!="number")throw new rA.ERR_INVALID_ARG_TYPE(t,"number",e)}function Y4(e,t,r){throw Math.floor(e)!==e?(nA(e,r),new rA.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new rA.ERR_BUFFER_OUT_OF_BOUNDS:new rA.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var bTt=/[^+/0-9A-Za-z-_]/g;function wTt(e){if(e=e.split("=")[0],e=e.trim().replace(bTt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function AH(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function TTt(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function ATt(e,t){let r,n,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function pTe(e){return bH.toByteArray(wTt(e))}function Z8(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Hm(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function kH(e){return e!==e}var STt=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function N_(e){return typeof BigInt=="undefined"?MTt:e}function MTt(){throw new Error("BigInt not supported")}});var Y8=ye((ahr,gTe)=>{"use strict";gTe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var K4=ye((ohr,mTe)=>{"use strict";var ETt=Y8();mTe.exports=function(){return ETt()&&!!Symbol.toStringTag}});var CH=ye((shr,yTe)=>{"use strict";yTe.exports=Object});var xTe=ye((lhr,_Te)=>{"use strict";_Te.exports=Error});var wTe=ye((uhr,bTe)=>{"use strict";bTe.exports=EvalError});var ATe=ye((chr,TTe)=>{"use strict";TTe.exports=RangeError});var MTe=ye((fhr,STe)=>{"use strict";STe.exports=ReferenceError});var LH=ye((hhr,ETe)=>{"use strict";ETe.exports=SyntaxError});var oA=ye((dhr,kTe)=>{"use strict";kTe.exports=TypeError});var LTe=ye((vhr,CTe)=>{"use strict";CTe.exports=URIError});var ITe=ye((phr,PTe)=>{"use strict";PTe.exports=Math.abs});var DTe=ye((ghr,RTe)=>{"use strict";RTe.exports=Math.floor});var zTe=ye((mhr,FTe)=>{"use strict";FTe.exports=Math.max});var OTe=ye((yhr,qTe)=>{"use strict";qTe.exports=Math.min});var NTe=ye((_hr,BTe)=>{"use strict";BTe.exports=Math.pow});var VTe=ye((xhr,UTe)=>{"use strict";UTe.exports=Math.round});var HTe=ye((bhr,GTe)=>{"use strict";GTe.exports=Number.isNaN||function(t){return t!==t}});var WTe=ye((whr,jTe)=>{"use strict";var kTt=HTe();jTe.exports=function(t){return kTt(t)||t===0?t:t<0?-1:1}});var ZTe=ye((Thr,XTe)=>{"use strict";XTe.exports=Object.getOwnPropertyDescriptor});var x2=ye((Ahr,YTe)=>{"use strict";var K8=ZTe();if(K8)try{K8([],"length")}catch(e){K8=null}YTe.exports=K8});var J4=ye((Shr,KTe)=>{"use strict";var J8=Object.defineProperty||!1;if(J8)try{J8({},"a",{value:1})}catch(e){J8=!1}KTe.exports=J8});var QTe=ye((Mhr,$Te)=>{"use strict";var JTe=typeof Symbol!="undefined"&&Symbol,CTt=Y8();$Te.exports=function(){return typeof JTe!="function"||typeof Symbol!="function"||typeof JTe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:CTt()}});var PH=ye((Ehr,eAe)=>{"use strict";eAe.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var IH=ye((khr,tAe)=>{"use strict";var LTt=CH();tAe.exports=LTt.getPrototypeOf||null});var nAe=ye((Chr,iAe)=>{"use strict";var PTt="Function.prototype.bind called on incompatible ",ITt=Object.prototype.toString,RTt=Math.max,DTt="[object Function]",rAe=function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},FTt=function(t,r){for(var n=[],i=r||0,a=0;i<t.length;i+=1,a+=1)n[a]=t[i];return n},zTt=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};iAe.exports=function(t){var r=this;if(typeof r!="function"||ITt.apply(r)!==DTt)throw new TypeError(PTt+r);for(var n=FTt(arguments,1),i,a=function(){if(this instanceof i){var c=r.apply(this,rAe(n,arguments));return Object(c)===c?c:this}return r.apply(t,rAe(n,arguments))},o=RTt(0,r.length-n.length),s=[],l=0;l<o;l++)s[l]="$"+l;if(i=Function("binder","return function ("+zTt(s,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var u=function(){};u.prototype=r.prototype,i.prototype=new u,u.prototype=null}return i}});var sA=ye((Lhr,aAe)=>{"use strict";var qTt=nAe();aAe.exports=Function.prototype.bind||qTt});var $8=ye((Phr,oAe)=>{"use strict";oAe.exports=Function.prototype.call});var RH=ye((Ihr,sAe)=>{"use strict";sAe.exports=Function.prototype.apply});var uAe=ye((Rhr,lAe)=>{"use strict";lAe.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var fAe=ye((Dhr,cAe)=>{"use strict";var OTt=sA(),BTt=RH(),NTt=$8(),UTt=uAe();cAe.exports=UTt||OTt.call(NTt,BTt)});var dAe=ye((Fhr,hAe)=>{"use strict";var VTt=sA(),GTt=oA(),HTt=$8(),jTt=fAe();hAe.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new GTt("a function is required");return jTt(VTt,HTt,t)}});var _Ae=ye((zhr,yAe)=>{"use strict";var WTt=dAe(),vAe=x2(),gAe;try{gAe=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var DH=!!gAe&&vAe&&vAe(Object.prototype,"__proto__"),mAe=Object,pAe=mAe.getPrototypeOf;yAe.exports=DH&&typeof DH.get=="function"?WTt([DH.get]):typeof pAe=="function"?function(t){return pAe(t==null?t:mAe(t))}:!1});var AAe=ye((qhr,TAe)=>{"use strict";var xAe=PH(),bAe=IH(),wAe=_Ae();TAe.exports=xAe?function(t){return xAe(t)}:bAe?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return bAe(t)}:wAe?function(t){return wAe(t)}:null});var MAe=ye((Ohr,SAe)=>{"use strict";var XTt=Function.prototype.call,ZTt=Object.prototype.hasOwnProperty,YTt=sA();SAe.exports=YTt.call(XTt,ZTt)});var tR=ye((Bhr,IAe)=>{"use strict";var lu,KTt=CH(),JTt=xTe(),$Tt=wTe(),QTt=ATe(),eAt=MTe(),fA=LH(),cA=oA(),tAt=LTe(),rAt=ITe(),iAt=DTe(),nAt=zTe(),aAt=OTe(),oAt=NTe(),sAt=VTe(),lAt=WTe(),LAe=Function,FH=function(e){try{return LAe('"use strict"; return ('+e+").constructor;")()}catch(t){}},$4=x2(),uAt=J4(),zH=function(){throw new cA},cAt=$4?function(){try{return arguments.callee,zH}catch(e){try{return $4(arguments,"callee").get}catch(t){return zH}}}():zH,lA=QTe()(),tv=AAe(),fAt=IH(),hAt=PH(),PAe=RH(),Q4=$8(),uA={},dAt=typeof Uint8Array=="undefined"||!tv?lu:tv(Uint8Array),b2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?lu:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?lu:ArrayBuffer,"%ArrayIteratorPrototype%":lA&&tv?tv([][Symbol.iterator]()):lu,"%AsyncFromSyncIteratorPrototype%":lu,"%AsyncFunction%":uA,"%AsyncGenerator%":uA,"%AsyncGeneratorFunction%":uA,"%AsyncIteratorPrototype%":uA,"%Atomics%":typeof Atomics=="undefined"?lu:Atomics,"%BigInt%":typeof BigInt=="undefined"?lu:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?lu:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?lu:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?lu:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":JTt,"%eval%":eval,"%EvalError%":$Tt,"%Float16Array%":typeof Float16Array=="undefined"?lu:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?lu:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?lu:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?lu:FinalizationRegistry,"%Function%":LAe,"%GeneratorFunction%":uA,"%Int8Array%":typeof Int8Array=="undefined"?lu:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?lu:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?lu:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":lA&&tv?tv(tv([][Symbol.iterator]())):lu,"%JSON%":typeof JSON=="object"?JSON:lu,"%Map%":typeof Map=="undefined"?lu:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!lA||!tv?lu:tv(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":KTt,"%Object.getOwnPropertyDescriptor%":$4,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?lu:Promise,"%Proxy%":typeof Proxy=="undefined"?lu:Proxy,"%RangeError%":QTt,"%ReferenceError%":eAt,"%Reflect%":typeof Reflect=="undefined"?lu:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?lu:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!lA||!tv?lu:tv(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?lu:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":lA&&tv?tv(""[Symbol.iterator]()):lu,"%Symbol%":lA?Symbol:lu,"%SyntaxError%":fA,"%ThrowTypeError%":cAt,"%TypedArray%":dAt,"%TypeError%":cA,"%Uint8Array%":typeof Uint8Array=="undefined"?lu:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?lu:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?lu:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?lu:Uint32Array,"%URIError%":tAt,"%WeakMap%":typeof WeakMap=="undefined"?lu:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?lu:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?lu:WeakSet,"%Function.prototype.call%":Q4,"%Function.prototype.apply%":PAe,"%Object.defineProperty%":uAt,"%Object.getPrototypeOf%":fAt,"%Math.abs%":rAt,"%Math.floor%":iAt,"%Math.max%":nAt,"%Math.min%":aAt,"%Math.pow%":oAt,"%Math.round%":sAt,"%Math.sign%":lAt,"%Reflect.getPrototypeOf%":hAt};if(tv)try{null.error}catch(e){EAe=tv(tv(e)),b2["%Error.prototype%"]=EAe}var EAe,vAt=function e(t){var r;if(t==="%AsyncFunction%")r=FH("async function () {}");else if(t==="%GeneratorFunction%")r=FH("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=FH("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&tv&&(r=tv(i.prototype))}return b2[t]=r,r},kAe={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},eE=sA(),Q8=MAe(),pAt=eE.call(Q4,Array.prototype.concat),gAt=eE.call(PAe,Array.prototype.splice),CAe=eE.call(Q4,String.prototype.replace),eR=eE.call(Q4,String.prototype.slice),mAt=eE.call(Q4,RegExp.prototype.exec),yAt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_At=/\\(\\)?/g,xAt=function(t){var r=eR(t,0,1),n=eR(t,-1);if(r==="%"&&n!=="%")throw new fA("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new fA("invalid intrinsic syntax, expected opening `%`");var i=[];return CAe(t,yAt,function(a,o,s,l){i[i.length]=s?CAe(l,_At,"$1"):o||a}),i},bAt=function(t,r){var n=t,i;if(Q8(kAe,n)&&(i=kAe[n],n="%"+i[0]+"%"),Q8(b2,n)){var a=b2[n];if(a===uA&&(a=vAt(n)),typeof a=="undefined"&&!r)throw new cA("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new fA("intrinsic "+t+" does not exist!")};IAe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new cA("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new cA('"allowMissing" argument must be a boolean');if(mAt(/^%?[^%]*%?$/,t)===null)throw new fA("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=xAt(t),i=n.length>0?n[0]:"",a=bAt("%"+i+"%",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(i=u[0],gAt(n,pAt([0,1],u)));for(var c=1,f=!0;c<n.length;c+=1){var h=n[c],d=eR(h,0,1),v=eR(h,-1);if((d==='"'||d==="'"||d==="`"||v==='"'||v==="'"||v==="`")&&d!==v)throw new fA("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(l=!0),i+="."+h,o="%"+i+"%",Q8(b2,o))s=b2[o];else if(s!=null){if(!(h in s)){if(!r)throw new cA("base intrinsic for "+t+" exists, but the property is not available.");return}if($4&&c+1>=n.length){var m=$4(s,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[h]}else f=Q8(s,h),s=s[h];f&&!l&&(b2[o]=s)}}return s}});var zAe=ye((Nhr,FAe)=>{"use strict";var RAe=J4(),wAt=LH(),hA=oA(),DAe=x2();FAe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new hA("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new hA("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new hA("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new hA("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new hA("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new hA("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!DAe&&DAe(t,r);if(RAe)RAe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:a===null&&l?l.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new wAt("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var OH=ye((Uhr,OAe)=>{"use strict";var qH=J4(),qAe=function(){return!!qH};qAe.hasArrayLengthDefineBug=function(){if(!qH)return null;try{return qH([],"length",{value:1}).length!==1}catch(t){return!0}};OAe.exports=qAe});var GAe=ye((Vhr,VAe)=>{"use strict";var TAt=tR(),BAe=zAe(),AAt=OH()(),NAe=x2(),UAe=oA(),SAt=TAt("%Math.floor%");VAe.exports=function(t,r){if(typeof t!="function")throw new UAe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||SAt(r)!==r)throw new UAe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&NAe){var o=NAe(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(AAt?BAe(t,"length",r,!0,!0):BAe(t,"length",r)),t}});var tE=ye((Ghr,rR)=>{"use strict";var BH=sA(),iR=tR(),MAt=GAe(),EAt=oA(),WAe=iR("%Function.prototype.apply%"),XAe=iR("%Function.prototype.call%"),ZAe=iR("%Reflect.apply%",!0)||BH.call(XAe,WAe),HAe=J4(),kAt=iR("%Math.max%");rR.exports=function(t){if(typeof t!="function")throw new EAt("a function is required");var r=ZAe(BH,XAe,arguments);return MAt(r,1+kAt(0,t.length-(arguments.length-1)),!0)};var jAe=function(){return ZAe(BH,WAe,arguments)};HAe?HAe(rR.exports,"apply",{value:jAe}):rR.exports.apply=jAe});var dA=ye((Hhr,JAe)=>{"use strict";var YAe=tR(),KAe=tE(),CAt=KAe(YAe("String.prototype.indexOf"));JAe.exports=function(t,r){var n=YAe(t,!!r);return typeof n=="function"&&CAt(t,".prototype.")>-1?KAe(n):n}});var e5e=ye((jhr,QAe)=>{"use strict";var LAt=K4()(),PAt=dA(),NH=PAt("Object.prototype.toString"),nR=function(t){return LAt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:NH(t)==="[object Arguments]"},$Ae=function(t){return nR(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&NH(t)!=="[object Array]"&&NH(t.callee)==="[object Function]"},IAt=function(){return nR(arguments)}();nR.isLegacyArguments=$Ae;QAe.exports=IAt?nR:$Ae});var i5e=ye((Whr,r5e)=>{"use strict";var RAt=Object.prototype.toString,DAt=Function.prototype.toString,FAt=/^\s*(?:function)?\*/,t5e=K4()(),UH=Object.getPrototypeOf,zAt=function(){if(!t5e)return!1;try{return Function("return function*() {}")()}catch(e){}},VH;r5e.exports=function(t){if(typeof t!="function")return!1;if(FAt.test(DAt.call(t)))return!0;if(!t5e){var r=RAt.call(t);return r==="[object GeneratorFunction]"}if(!UH)return!1;if(typeof VH=="undefined"){var n=zAt();VH=n?UH(n):!1}return UH(t)===VH}});var s5e=ye((Xhr,o5e)=>{"use strict";var a5e=Function.prototype.toString,vA=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,HH,aR;if(typeof vA=="function"&&typeof Object.defineProperty=="function")try{HH=Object.defineProperty({},"length",{get:function(){throw aR}}),aR={},vA(function(){throw 42},null,HH)}catch(e){e!==aR&&(vA=null)}else vA=null;var qAt=/^\s*class\b/,jH=function(t){try{var r=a5e.call(t);return qAt.test(r)}catch(n){return!1}},GH=function(t){try{return jH(t)?!1:(a5e.call(t),!0)}catch(r){return!1}},oR=Object.prototype.toString,OAt="[object Object]",BAt="[object Function]",NAt="[object GeneratorFunction]",UAt="[object HTMLAllCollection]",VAt="[object HTML document.all class]",GAt="[object HTMLCollection]",HAt=typeof Symbol=="function"&&!!Symbol.toStringTag,jAt=!(0 in[,]),WH=function(){return!1};typeof document=="object"&&(n5e=document.all,oR.call(n5e)===oR.call(document.all)&&(WH=function(t){if((jAt||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=oR.call(t);return(r===UAt||r===VAt||r===GAt||r===OAt)&&t("")==null}catch(n){}return!1}));var n5e;o5e.exports=vA?function(t){if(WH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{vA(t,null,HH)}catch(r){if(r!==aR)return!1}return!jH(t)&&GH(t)}:function(t){if(WH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(HAt)return GH(t);if(jH(t))return!1;var r=oR.call(t);return r!==BAt&&r!==NAt&&!/^\[object HTML/.test(r)?!1:GH(t)}});var XH=ye((Zhr,u5e)=>{"use strict";var WAt=s5e(),XAt=Object.prototype.toString,l5e=Object.prototype.hasOwnProperty,ZAt=function(t,r,n){for(var i=0,a=t.length;i<a;i++)l5e.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},YAt=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)},KAt=function(t,r,n){for(var i in t)l5e.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},JAt=function(t,r,n){if(!WAt(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),XAt.call(t)==="[object Array]"?ZAt(t,r,i):typeof t=="string"?YAt(t,r,i):KAt(t,r,i)};u5e.exports=JAt});var YH=ye((Yhr,c5e)=>{"use strict";var ZH=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],$At=typeof globalThis=="undefined"?window:globalThis;c5e.exports=function(){for(var t=[],r=0;r<ZH.length;r++)typeof $At[ZH[r]]=="function"&&(t[t.length]=ZH[r]);return t}});var p5e=ye((Khr,v5e)=>{"use strict";var lR=XH(),QAt=YH(),f5e=tE(),$H=dA(),sR=x2(),e5t=$H("Object.prototype.toString"),d5e=K4()(),h5e=typeof globalThis=="undefined"?window:globalThis,JH=QAt(),QH=$H("String.prototype.slice"),KH=Object.getPrototypeOf,t5t=$H("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},uR={__proto__:null};d5e&&sR&&KH?lR(JH,function(e){var t=new h5e[e];if(Symbol.toStringTag in t){var r=KH(t),n=sR(r,Symbol.toStringTag);if(!n){var i=KH(r);n=sR(i,Symbol.toStringTag)}uR["$"+e]=f5e(n.get)}}):lR(JH,function(e){var t=new h5e[e],r=t.slice||t.set;r&&(uR["$"+e]=f5e(r))});var r5t=function(t){var r=!1;return lR(uR,function(n,i){if(!r)try{"$"+n(t)===i&&(r=QH(i,1))}catch(a){}}),r},i5t=function(t){var r=!1;return lR(uR,function(n,i){if(!r)try{n(t),r=QH(i,1)}catch(a){}}),r};v5e.exports=function(t){if(!t||typeof t!="object")return!1;if(!d5e){var r=QH(e5t(t),8,-1);return t5t(JH,r)>-1?r:r!=="Object"?!1:i5t(t)}return sR?r5t(t):null}});var b5e=ye((Jhr,x5e)=>{"use strict";var g5e=XH(),n5t=YH(),tj=dA(),a5t=tj("Object.prototype.toString"),m5e=K4()(),cR=x2(),o5t=typeof globalThis=="undefined"?window:globalThis,y5e=n5t(),s5t=tj("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},l5t=tj("String.prototype.slice"),_5e={},ej=Object.getPrototypeOf;m5e&&cR&&ej&&g5e(y5e,function(e){var t=new o5t[e];if(Symbol.toStringTag in t){var r=ej(t),n=cR(r,Symbol.toStringTag);if(!n){var i=ej(r);n=cR(i,Symbol.toStringTag)}_5e[e]=n.get}});var u5t=function(t){var r=!1;return g5e(_5e,function(n,i){if(!r)try{r=n.call(t)===i}catch(a){}}),r};x5e.exports=function(t){if(!t||typeof t!="object")return!1;if(!m5e||!(Symbol.toStringTag in t)){var r=l5t(a5t(t),8,-1);return s5t(y5e,r)>-1}return cR?u5t(t):!1}});var nj=ye(uu=>{"use strict";var c5t=e5e(),f5t=i5e(),Wg=p5e(),w5e=b5e();function pA(e){return e.call.bind(e)}var T5e=typeof BigInt!="undefined",A5e=typeof Symbol!="undefined",K0=pA(Object.prototype.toString),h5t=pA(Number.prototype.valueOf),d5t=pA(String.prototype.valueOf),v5t=pA(Boolean.prototype.valueOf);T5e&&(S5e=pA(BigInt.prototype.valueOf));var S5e;A5e&&(M5e=pA(Symbol.prototype.valueOf));var M5e;function iE(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}uu.isArgumentsObject=c5t;uu.isGeneratorFunction=f5t;uu.isTypedArray=w5e;function p5t(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}uu.isPromise=p5t;function g5t(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):w5e(e)||k5e(e)}uu.isArrayBufferView=g5t;function m5t(e){return Wg(e)==="Uint8Array"}uu.isUint8Array=m5t;function y5t(e){return Wg(e)==="Uint8ClampedArray"}uu.isUint8ClampedArray=y5t;function _5t(e){return Wg(e)==="Uint16Array"}uu.isUint16Array=_5t;function x5t(e){return Wg(e)==="Uint32Array"}uu.isUint32Array=x5t;function b5t(e){return Wg(e)==="Int8Array"}uu.isInt8Array=b5t;function w5t(e){return Wg(e)==="Int16Array"}uu.isInt16Array=w5t;function T5t(e){return Wg(e)==="Int32Array"}uu.isInt32Array=T5t;function A5t(e){return Wg(e)==="Float32Array"}uu.isFloat32Array=A5t;function S5t(e){return Wg(e)==="Float64Array"}uu.isFloat64Array=S5t;function M5t(e){return Wg(e)==="BigInt64Array"}uu.isBigInt64Array=M5t;function E5t(e){return Wg(e)==="BigUint64Array"}uu.isBigUint64Array=E5t;function fR(e){return K0(e)==="[object Map]"}fR.working=typeof Map!="undefined"&&fR(new Map);function k5t(e){return typeof Map=="undefined"?!1:fR.working?fR(e):e instanceof Map}uu.isMap=k5t;function hR(e){return K0(e)==="[object Set]"}hR.working=typeof Set!="undefined"&&hR(new Set);function C5t(e){return typeof Set=="undefined"?!1:hR.working?hR(e):e instanceof Set}uu.isSet=C5t;function dR(e){return K0(e)==="[object WeakMap]"}dR.working=typeof WeakMap!="undefined"&&dR(new WeakMap);function L5t(e){return typeof WeakMap=="undefined"?!1:dR.working?dR(e):e instanceof WeakMap}uu.isWeakMap=L5t;function ij(e){return K0(e)==="[object WeakSet]"}ij.working=typeof WeakSet!="undefined"&&ij(new WeakSet);function P5t(e){return ij(e)}uu.isWeakSet=P5t;function vR(e){return K0(e)==="[object ArrayBuffer]"}vR.working=typeof ArrayBuffer!="undefined"&&vR(new ArrayBuffer);function E5e(e){return typeof ArrayBuffer=="undefined"?!1:vR.working?vR(e):e instanceof ArrayBuffer}uu.isArrayBuffer=E5e;function pR(e){return K0(e)==="[object DataView]"}pR.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&pR(new DataView(new ArrayBuffer(1),0,1));function k5e(e){return typeof DataView=="undefined"?!1:pR.working?pR(e):e instanceof DataView}uu.isDataView=k5e;var rj=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function rE(e){return K0(e)==="[object SharedArrayBuffer]"}function C5e(e){return typeof rj=="undefined"?!1:(typeof rE.working=="undefined"&&(rE.working=rE(new rj)),rE.working?rE(e):e instanceof rj)}uu.isSharedArrayBuffer=C5e;function I5t(e){return K0(e)==="[object AsyncFunction]"}uu.isAsyncFunction=I5t;function R5t(e){return K0(e)==="[object Map Iterator]"}uu.isMapIterator=R5t;function D5t(e){return K0(e)==="[object Set Iterator]"}uu.isSetIterator=D5t;function F5t(e){return K0(e)==="[object Generator]"}uu.isGeneratorObject=F5t;function z5t(e){return K0(e)==="[object WebAssembly.Module]"}uu.isWebAssemblyCompiledModule=z5t;function L5e(e){return iE(e,h5t)}uu.isNumberObject=L5e;function P5e(e){return iE(e,d5t)}uu.isStringObject=P5e;function I5e(e){return iE(e,v5t)}uu.isBooleanObject=I5e;function R5e(e){return T5e&&iE(e,S5e)}uu.isBigIntObject=R5e;function D5e(e){return A5e&&iE(e,M5e)}uu.isSymbolObject=D5e;function q5t(e){return L5e(e)||P5e(e)||I5e(e)||R5e(e)||D5e(e)}uu.isBoxedPrimitive=q5t;function O5t(e){return typeof Uint8Array!="undefined"&&(E5e(e)||C5e(e))}uu.isAnyArrayBuffer=O5t;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(uu,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var aj=ye((Qhr,F5e)=>{F5e.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var fj=ye(cu=>{var z5e=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i<r.length;i++)n[r[i]]=Object.getOwnPropertyDescriptor(t,r[i]);return n},B5t=/%[sdj%]/g;cu.format=function(e){if(!wR(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(U_(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(B5t,function(s){if(s==="%%")return"%";if(r>=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r<i;o=n[++r])bR(o)||!gA(o)?a+=" "+o:a+=" "+U_(o);return a};cu.deprecate=function(e,t){if(typeof process!="undefined"&&process.noDeprecation===!0)return e;if(typeof process=="undefined")return function(){return cu.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(process.throwDeprecation)throw new Error(t);process.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n};var gR={},q5e=/^$/;mR="false",mR=mR.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),q5e=new RegExp("^"+mR+"$","i");var mR;cu.debuglog=function(e){if(e=e.toUpperCase(),!gR[e])if(q5e.test(e)){var t=process.pid;gR[e]=function(){var r=cu.format.apply(cu,arguments);console.error("%s %d: %s",e,t,r)}}else gR[e]=function(){};return gR[e]};function U_(e,t){var r={seen:[],stylize:U5t};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),uj(t)?r.showHidden=t:t&&cu._extend(r,t),T2(r.showHidden)&&(r.showHidden=!1),T2(r.depth)&&(r.depth=2),T2(r.colors)&&(r.colors=!1),T2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=N5t),_R(r,e,r.depth)}cu.inspect=U_;U_.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};U_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function N5t(e,t){var r=U_.styles[t];return r?"\x1B["+U_.colors[r][0]+"m"+e+"\x1B["+U_.colors[r][1]+"m":e}function U5t(e,t){return e}function V5t(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function _R(e,t,r){if(e.customInspect&&t&&yR(t.inspect)&&t.inspect!==cu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return wR(n)||(n=_R(e,n,r)),n}var i=G5t(e,t);if(i)return i;var a=Object.keys(t),o=V5t(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),aE(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return oj(t);if(a.length===0){if(yR(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(nE(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(xR(t))return e.stylize(Date.prototype.toString.call(t),"date");if(aE(t))return oj(t)}var l="",u=!1,c=["{","}"];if(O5e(t)&&(u=!0,c=["[","]"]),yR(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(nE(t)&&(l=" "+RegExp.prototype.toString.call(t)),xR(t)&&(l=" "+Date.prototype.toUTCString.call(t)),aE(t)&&(l=" "+oj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return nE(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=H5t(e,t,r,o,a):h=a.map(function(d){return lj(e,t,r,o,d,u)}),e.seen.pop(),j5t(h,l,c)}function G5t(e,t){if(T2(t))return e.stylize("undefined","undefined");if(wR(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(B5e(t))return e.stylize(""+t,"number");if(uj(t))return e.stylize(""+t,"boolean");if(bR(t))return e.stylize("null","null")}function oj(e){return"["+Error.prototype.toString.call(e)+"]"}function H5t(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)N5e(t,String(o))?a.push(lj(e,t,r,n,String(o),!0)):a.push("");return i.forEach(function(l){l.match(/^\d+$/)||a.push(lj(e,t,r,n,l,!0))}),a}function lj(e,t,r,n,i,a){var o,s,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?l.set?s=e.stylize("[Getter/Setter]","special"):s=e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),N5e(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(bR(r)?s=_R(e,l.value,null):s=_R(e,l.value,r-1),s.indexOf(`
|
||
`)>-1&&(a?s=s.split(`
|
||
`).map(function(u){return" "+u}).join(`
|
||
`).slice(2):s=`
|
||
`+s.split(`
|
||
`).map(function(u){return" "+u}).join(`
|
||
`))):s=e.stylize("[Circular]","special")),T2(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function j5t(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]}cu.types=nj();function O5e(e){return Array.isArray(e)}cu.isArray=O5e;function uj(e){return typeof e=="boolean"}cu.isBoolean=uj;function bR(e){return e===null}cu.isNull=bR;function W5t(e){return e==null}cu.isNullOrUndefined=W5t;function B5e(e){return typeof e=="number"}cu.isNumber=B5e;function wR(e){return typeof e=="string"}cu.isString=wR;function X5t(e){return typeof e=="symbol"}cu.isSymbol=X5t;function T2(e){return e===void 0}cu.isUndefined=T2;function nE(e){return gA(e)&&cj(e)==="[object RegExp]"}cu.isRegExp=nE;cu.types.isRegExp=nE;function gA(e){return typeof e=="object"&&e!==null}cu.isObject=gA;function xR(e){return gA(e)&&cj(e)==="[object Date]"}cu.isDate=xR;cu.types.isDate=xR;function aE(e){return gA(e)&&(cj(e)==="[object Error]"||e instanceof Error)}cu.isError=aE;cu.types.isNativeError=aE;function yR(e){return typeof e=="function"}cu.isFunction=yR;function Z5t(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}cu.isPrimitive=Z5t;cu.isBuffer=aj();function cj(e){return Object.prototype.toString.call(e)}function sj(e){return e<10?"0"+e.toString(10):e.toString(10)}var Y5t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function K5t(){var e=new Date,t=[sj(e.getHours()),sj(e.getMinutes()),sj(e.getSeconds())].join(":");return[e.getDate(),Y5t[e.getMonth()],t].join(" ")}cu.log=function(){console.log("%s - %s",K5t(),cu.format.apply(cu,arguments))};cu.inherits=Zy();cu._extend=function(e,t){if(!t||!gA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function N5e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var w2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;cu.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(w2&&t[w2]){var r=t[w2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,w2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(l,u){l?i(l):n(u)});try{t.apply(this,o)}catch(l){i(l)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),w2&&Object.defineProperty(r,w2,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,z5e(t))};cu.promisify.custom=w2;function J5t(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function $5t(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(J5t.bind(null,s,o))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,z5e(e)),t}cu.callbackify=$5t});var H5e=ye((tdr,G5e)=>{"use strict";function U5e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Q5t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U5e(Object(r),!0).forEach(function(n){eSt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U5e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eSt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tSt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V5e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rSt(e,t,r){return t&&V5e(e.prototype,t),r&&V5e(e,r),e}var iSt=_2(),TR=iSt.Buffer,nSt=fj(),hj=nSt.inspect,aSt=hj&&hj.custom||"inspect";function oSt(e,t,r){TR.prototype.copy.call(e,t,r)}G5e.exports=function(){function e(){tSt(this,e),this.head=null,this.tail=null,this.length=0}return rSt(e,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return TR.alloc(0);for(var n=TR.allocUnsafe(r>>>0),i=this.head,a=0;i;)oSt(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,a=n.data;for(r-=a.length;n=n.next;){var o=n.data,s=r>o.length?o.length:r;if(s===o.length?a+=o:a+=o.slice(0,r),r-=s,r===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(r){var n=TR.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:aSt,value:function(r,n){return hj(this,Q5t({},n,{depth:0,customInspect:!1}))}}]),e}()});var vj=ye((rdr,W5e)=>{"use strict";function sSt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(dj,this,e)):process.nextTick(dj,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(AR,r):(r._writableState.errorEmitted=!0,process.nextTick(j5e,r,a)):process.nextTick(j5e,r,a):t?(process.nextTick(AR,r),t(a)):process.nextTick(AR,r)}),this)}function j5e(e,t){dj(e,t),AR(e)}function AR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function lSt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function dj(e,t){e.emit("error",t)}function uSt(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}W5e.exports={destroy:sSt,undestroy:lSt,errorOrDestroy:uSt}});var A2=ye((idr,Y5e)=>{"use strict";function cSt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Z5e={};function J0(e,t,r){r||(r=Error);function n(a,o,s){return typeof t=="string"?t:t(a,o,s)}var i=function(a){cSt(o,a);function o(s,l,u){return a.call(this,n(s,l,u))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=e,Z5e[e]=i}function X5e(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function fSt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function hSt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function dSt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}J0("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);J0("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&fSt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(hSt(e," argument"))i="The ".concat(e," ").concat(n," ").concat(X5e(t,"type"));else{var a=dSt(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(X5e(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);J0("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");J0("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});J0("ERR_STREAM_PREMATURE_CLOSE","Premature close");J0("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});J0("ERR_MULTIPLE_CALLBACK","Callback called multiple times");J0("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");J0("ERR_STREAM_WRITE_AFTER_END","write after end");J0("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);J0("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);J0("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Y5e.exports.codes=Z5e});var pj=ye((ndr,K5e)=>{"use strict";var vSt=A2().codes.ERR_INVALID_OPT_VALUE;function pSt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function gSt(e,t,r,n){var i=pSt(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new vSt(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}K5e.exports={getHighWaterMark:gSt}});var $5e=ye((adr,J5e)=>{J5e.exports=mSt;function mSt(e,t){if(gj("noDeprecation"))return e;var r=!1;function n(){if(!r){if(gj("throwDeprecation"))throw new Error(t);gj("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function gj(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var _j=ye((odr,nSe)=>{"use strict";nSe.exports=Bh;function eSe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){HSt(t,e)}}var mA;Bh.WritableState=sE;var ySt={deprecate:$5e()},tSe=yH(),MR=_2().Buffer,_St=window.Uint8Array||function(){};function xSt(e){return MR.from(e)}function bSt(e){return MR.isBuffer(e)||e instanceof _St}var yj=vj(),wSt=pj(),TSt=wSt.getHighWaterMark,V_=A2().codes,ASt=V_.ERR_INVALID_ARG_TYPE,SSt=V_.ERR_METHOD_NOT_IMPLEMENTED,MSt=V_.ERR_MULTIPLE_CALLBACK,ESt=V_.ERR_STREAM_CANNOT_PIPE,kSt=V_.ERR_STREAM_DESTROYED,CSt=V_.ERR_STREAM_NULL_VALUES,LSt=V_.ERR_STREAM_WRITE_AFTER_END,PSt=V_.ERR_UNKNOWN_ENCODING,yA=yj.errorOrDestroy;Zy()(Bh,tSe);function ISt(){}function sE(e,t,r){mA=mA||S2(),e=e||{},typeof r!="boolean"&&(r=t instanceof mA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=TSt(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){BSt(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new eSe(this)}sE.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(sE.prototype,"buffer",{get:ySt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var SR;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(SR=Function.prototype[Symbol.hasInstance],Object.defineProperty(Bh,Symbol.hasInstance,{value:function(t){return SR.call(this,t)?!0:this!==Bh?!1:t&&t._writableState instanceof sE}})):SR=function(t){return t instanceof this};function Bh(e){mA=mA||S2();var t=this instanceof mA;if(!t&&!SR.call(Bh,this))return new Bh(e);this._writableState=new sE(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),tSe.call(this)}Bh.prototype.pipe=function(){yA(this,new ESt)};function RSt(e,t){var r=new LSt;yA(e,r),process.nextTick(t,r)}function DSt(e,t,r,n){var i;return r===null?i=new CSt:typeof r!="string"&&!t.objectMode&&(i=new ASt("chunk",["string","Buffer"],r)),i?(yA(e,i),process.nextTick(n,i),!1):!0}Bh.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&bSt(e);return a&&!MR.isBuffer(e)&&(e=xSt(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=ISt),n.ending?RSt(this,r):(a||DSt(this,n,e,r))&&(n.pendingcb++,i=zSt(this,n,a,e,t,r)),i};Bh.prototype.cork=function(){this._writableState.corked++};Bh.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&rSe(this,e))};Bh.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new PSt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Bh.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function FSt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=MR.from(t,r)),t}Object.defineProperty(Bh.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function zSt(e,t,r,n,i,a){if(!r){var o=FSt(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else mj(e,t,!1,s,n,i,a);return l}function mj(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new kSt("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function qSt(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(oE,e,t),e._writableState.errorEmitted=!0,yA(e,n)):(i(n),e._writableState.errorEmitted=!0,yA(e,n),oE(e,t))}function OSt(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function BSt(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new MSt;if(OSt(r),t)qSt(e,r,n,t,i);else{var a=iSe(r)||e.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&rSe(e,r),n?process.nextTick(Q5e,e,r,a,i):Q5e(e,r,a,i)}}function Q5e(e,t,r,n){r||NSt(e,t),t.pendingcb--,n(),oE(e,t)}function NSt(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function rSe(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,s=!0;r;)i[o]=r,r.isBuf||(s=!1),r=r.next,o+=1;i.allBuffers=s,mj(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new eSe(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=t.objectMode?1:l.length;if(mj(e,t,!1,f,l,u,c),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}Bh.prototype._write=function(e,t,r){r(new SSt("_write()"))};Bh.prototype._writev=null;Bh.prototype.end=function(e,t,r){var n=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||GSt(this,n,r),this};Object.defineProperty(Bh.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function iSe(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function USt(e,t){e._final(function(r){t.pendingcb--,r&&yA(e,r),t.prefinished=!0,e.emit("prefinish"),oE(e,t)})}function VSt(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(USt,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function oE(e,t){var r=iSe(t);if(r&&(VSt(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 GSt(e,t,r){t.ending=!0,oE(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function HSt(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(Bh.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Bh.prototype.destroy=yj.destroy;Bh.prototype._undestroy=yj.undestroy;Bh.prototype._destroy=function(e,t){t(e)}});var S2=ye((sdr,oSe)=>{"use strict";var jSt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};oSe.exports=jm;var aSe=wj(),bj=_j();Zy()(jm,aSe);for(xj=jSt(bj.prototype),ER=0;ER<xj.length;ER++)kR=xj[ER],jm.prototype[kR]||(jm.prototype[kR]=bj.prototype[kR]);var xj,kR,ER;function jm(e){if(!(this instanceof jm))return new jm(e);aSe.call(this,e),bj.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",WSt)))}Object.defineProperty(jm.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(jm.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(jm.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function WSt(){this._writableState.ended||process.nextTick(XSt,this)}function XSt(e){e.end()}Object.defineProperty(jm.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var uSe=ye((Tj,lSe)=>{var CR=_2(),Wm=CR.Buffer;function sSe(e,t){for(var r in e)t[r]=e[r]}Wm.from&&Wm.alloc&&Wm.allocUnsafe&&Wm.allocUnsafeSlow?lSe.exports=CR:(sSe(CR,Tj),Tj.Buffer=M2);function M2(e,t,r){return Wm(e,t,r)}M2.prototype=Object.create(Wm.prototype);sSe(Wm,M2);M2.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Wm(e,t,r)};M2.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Wm(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};M2.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Wm(e)};M2.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return CR.SlowBuffer(e)}});var Mj=ye(fSe=>{"use strict";var Sj=uSe().Buffer,cSe=Sj.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function ZSt(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 YSt(e){var t=ZSt(e);if(typeof t!="string"&&(Sj.isEncoding===cSe||!cSe(e)))throw new Error("Unknown encoding: "+e);return t||e}fSe.StringDecoder=lE;function lE(e){this.encoding=YSt(e);var t;switch(this.encoding){case"utf16le":this.text=tMt,this.end=rMt,t=4;break;case"utf8":this.fillLast=$St,t=4;break;case"base64":this.text=iMt,this.end=nMt,t=3;break;default:this.write=aMt,this.end=oMt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Sj.allocUnsafe(t)}lE.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};lE.prototype.end=eMt;lE.prototype.text=QSt;lE.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Aj(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function KSt(e,t,r){var n=t.length-1;if(n<r)return 0;var i=Aj(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||i===-2?0:(i=Aj(t[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||i===-2?0:(i=Aj(t[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function JSt(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 $St(e){var t=this.lastTotal-this.lastNeed,r=JSt(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 QSt(e,t){var r=KSt(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 eMt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function tMt(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 rMt(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 iMt(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 nMt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function aMt(e){return e.toString(this.encoding)}function oMt(e){return e&&e.length?this.write(e):""}});var LR=ye((udr,vSe)=>{"use strict";var hSe=A2().codes.ERR_STREAM_PREMATURE_CLOSE;function sMt(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 lMt(){}function uMt(e){return e.setHeader&&typeof e.abort=="function"}function dSe(e,t,r){if(typeof t=="function")return dSe(e,null,t);t||(t={}),r=sMt(r||lMt);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){i=!1,o=!0,n||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){n=!1,l=!0,i||r.call(e)},c=function(v){r.call(e,v)},f=function(){var v;if(n&&!l)return(!e._readableState||!e._readableState.ended)&&(v=new hSe),r.call(e,v);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(v=new hSe),r.call(e,v)},h=function(){e.req.on("finish",s)};return uMt(e)?(e.on("complete",s),e.on("abort",f),e.req?h():e.on("request",h)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",u),e.on("finish",s),t.error!==!1&&e.on("error",c),e.on("close",f),function(){e.removeListener("complete",s),e.removeListener("abort",f),e.removeListener("request",h),e.req&&e.req.removeListener("finish",s),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",s),e.removeListener("end",u),e.removeListener("error",c),e.removeListener("close",f)}}vSe.exports=dSe});var gSe=ye((cdr,pSe)=>{"use strict";var PR;function G_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var cMt=LR(),H_=Symbol("lastResolve"),E2=Symbol("lastReject"),uE=Symbol("error"),IR=Symbol("ended"),k2=Symbol("lastPromise"),Ej=Symbol("handlePromise"),C2=Symbol("stream");function j_(e,t){return{value:e,done:t}}function fMt(e){var t=e[H_];if(t!==null){var r=e[C2].read();r!==null&&(e[k2]=null,e[H_]=null,e[E2]=null,t(j_(r,!1)))}}function hMt(e){process.nextTick(fMt,e)}function dMt(e,t){return function(r,n){e.then(function(){if(t[IR]){r(j_(void 0,!0));return}t[Ej](r,n)},n)}}var vMt=Object.getPrototypeOf(function(){}),pMt=Object.setPrototypeOf((PR={get stream(){return this[C2]},next:function(){var t=this,r=this[uE];if(r!==null)return Promise.reject(r);if(this[IR])return Promise.resolve(j_(void 0,!0));if(this[C2].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[uE]?s(t[uE]):o(j_(void 0,!0))})});var n=this[k2],i;if(n)i=new Promise(dMt(n,this));else{var a=this[C2].read();if(a!==null)return Promise.resolve(j_(a,!1));i=new Promise(this[Ej])}return this[k2]=i,i}},G_(PR,Symbol.asyncIterator,function(){return this}),G_(PR,"return",function(){var t=this;return new Promise(function(r,n){t[C2].destroy(null,function(i){if(i){n(i);return}r(j_(void 0,!0))})})}),PR),vMt),gMt=function(t){var r,n=Object.create(pMt,(r={},G_(r,C2,{value:t,writable:!0}),G_(r,H_,{value:null,writable:!0}),G_(r,E2,{value:null,writable:!0}),G_(r,uE,{value:null,writable:!0}),G_(r,IR,{value:t._readableState.endEmitted,writable:!0}),G_(r,Ej,{value:function(a,o){var s=n[C2].read();s?(n[k2]=null,n[H_]=null,n[E2]=null,a(j_(s,!1))):(n[H_]=a,n[E2]=o)},writable:!0}),r));return n[k2]=null,cMt(t,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[E2];a!==null&&(n[k2]=null,n[H_]=null,n[E2]=null,a(i)),n[uE]=i;return}var o=n[H_];o!==null&&(n[k2]=null,n[H_]=null,n[E2]=null,o(j_(void 0,!0))),n[IR]=!0}),t.on("readable",hMt.bind(null,n)),n};pSe.exports=gMt});var ySe=ye((fdr,mSe)=>{mSe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var wj=ye((ddr,kSe)=>{"use strict";kSe.exports=Bu;var _A;Bu.ReadableState=wSe;var hdr=Ab().EventEmitter,bSe=function(t,r){return t.listeners(r).length},fE=yH(),RR=_2().Buffer,mMt=window.Uint8Array||function(){};function yMt(e){return RR.from(e)}function _Mt(e){return RR.isBuffer(e)||e instanceof mMt}var kj=fj(),nu;kj&&kj.debuglog?nu=kj.debuglog("stream"):nu=function(){};var xMt=H5e(),Fj=vj(),bMt=pj(),wMt=bMt.getHighWaterMark,DR=A2().codes,TMt=DR.ERR_INVALID_ARG_TYPE,AMt=DR.ERR_STREAM_PUSH_AFTER_EOF,SMt=DR.ERR_METHOD_NOT_IMPLEMENTED,MMt=DR.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,xA,Cj,Lj;Zy()(Bu,fE);var cE=Fj.errorOrDestroy,Pj=["error","close","destroy","pause","resume"];function EMt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function wSe(e,t,r){_A=_A||S2(),e=e||{},typeof r!="boolean"&&(r=t instanceof _A),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=wMt(this,e,"readableHighWaterMark",r),this.buffer=new xMt,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&&(xA||(xA=Mj().StringDecoder),this.decoder=new xA(e.encoding),this.encoding=e.encoding)}function Bu(e){if(_A=_A||S2(),!(this instanceof Bu))return new Bu(e);var t=this instanceof _A;this._readableState=new wSe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),fE.call(this)}Object.defineProperty(Bu.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Bu.prototype.destroy=Fj.destroy;Bu.prototype._undestroy=Fj.undestroy;Bu.prototype._destroy=function(e,t){t(e)};Bu.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=RR.from(e,t),t=""),n=!0),TSe(this,e,t,!1,n)};Bu.prototype.unshift=function(e){return TSe(this,e,null,!0,!1)};function TSe(e,t,r,n,i){nu("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,LMt(e,a);else{var o;if(i||(o=kMt(a,t)),o)cE(e,o);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==RR.prototype&&(t=yMt(t)),n)a.endEmitted?cE(e,new MMt):Ij(e,a,t,!0);else if(a.ended)cE(e,new AMt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Ij(e,a,t,!1):Dj(e,a)):Ij(e,a,t,!1)}else n||(a.reading=!1,Dj(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function Ij(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&FR(e)),Dj(e,t)}function kMt(e,t){var r;return!_Mt(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TMt("chunk",["string","Buffer","Uint8Array"],t)),r}Bu.prototype.isPaused=function(){return this._readableState.flowing===!1};Bu.prototype.setEncoding=function(e){xA||(xA=Mj().StringDecoder);var t=new xA(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var _Se=1073741824;function CMt(e){return e>=_Se?e=_Se:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function xSe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=CMt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Bu.prototype.read=function(e){nu("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return nu("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Rj(this):FR(this),null;if(e=xSe(e,t),e===0&&t.ended)return t.length===0&&Rj(this),null;var n=t.needReadable;nu("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,nu("length less than watermark",n)),t.ended||t.reading?(n=!1,nu("reading or ended",n)):n&&(nu("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=xSe(r,t)));var i;return e>0?i=MSe(e,t):i=null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Rj(this)),i!==null&&this.emit("data",i),i};function LMt(e,t){if(nu("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?FR(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,ASe(e)))}}function FR(e){var t=e._readableState;nu("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(nu("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(ASe,e))}function ASe(e){var t=e._readableState;nu("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,zj(e)}function Dj(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(PMt,e,t))}function PMt(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(nu("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}Bu.prototype._read=function(e){cE(this,new SMt("_read()"))};Bu.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,nu("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=i?s:m;n.endEmitted?process.nextTick(a):r.once("end",a),e.on("unpipe",o);function o(b,p){nu("onunpipe"),b===r&&p&&p.hasUnpiped===!1&&(p.hasUnpiped=!0,c())}function s(){nu("onend"),e.end()}var l=IMt(r);e.on("drain",l);var u=!1;function c(){nu("cleanup"),e.removeListener("close",d),e.removeListener("finish",v),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",m),r.removeListener("data",f),u=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}r.on("data",f);function f(b){nu("ondata");var p=e.write(b);nu("dest.write",p),p===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&ESe(n.pipes,e)!==-1)&&!u&&(nu("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(b){nu("onerror",b),m(),e.removeListener("error",h),bSe(e,"error")===0&&cE(e,b)}EMt(e,"error",h);function d(){e.removeListener("finish",v),m()}e.once("close",d);function v(){nu("onfinish"),e.removeListener("close",d),m()}e.once("finish",v);function m(){nu("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(nu("pipe resume"),r.resume()),e};function IMt(e){return function(){var r=e._readableState;nu("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&bSe(e,"data")&&(r.flowing=!0,zj(e))}}Bu.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=ESe(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Bu.prototype.on=function(e,t){var r=fE.prototype.on.call(this,e,t),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,nu("on readable",n.length,n.reading),n.length?FR(this):n.reading||process.nextTick(RMt,this)),r};Bu.prototype.addListener=Bu.prototype.on;Bu.prototype.removeListener=function(e,t){var r=fE.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(SSe,this),r};Bu.prototype.removeAllListeners=function(e){var t=fE.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(SSe,this),t};function SSe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function RMt(e){nu("readable nexttick read 0"),e.read(0)}Bu.prototype.resume=function(){var e=this._readableState;return e.flowing||(nu("resume"),e.flowing=!e.readableListening,DMt(this,e)),e.paused=!1,this};function DMt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(FMt,e,t))}function FMt(e,t){nu("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),zj(e),t.flowing&&!t.reading&&e.read(0)}Bu.prototype.pause=function(){return nu("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(nu("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function zj(e){var t=e._readableState;for(nu("flow",t.flowing);t.flowing&&e.read()!==null;);}Bu.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(nu("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(nu("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a<Pj.length;a++)e.on(Pj[a],this.emit.bind(this,Pj[a]));return this._read=function(o){nu("wrapped _read",o),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(Bu.prototype[Symbol.asyncIterator]=function(){return Cj===void 0&&(Cj=gSe()),Cj(this)});Object.defineProperty(Bu.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Bu.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Bu.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});Bu._fromList=MSe;Object.defineProperty(Bu.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function MSe(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Rj(e){var t=e._readableState;nu("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(zMt,t,e))}function zMt(e,t){if(nu("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(Bu.from=function(e,t){return Lj===void 0&&(Lj=ySe()),Lj(Bu,e,t)});function ESe(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var qj=ye((vdr,LSe)=>{"use strict";LSe.exports=Ky;var zR=A2().codes,qMt=zR.ERR_METHOD_NOT_IMPLEMENTED,OMt=zR.ERR_MULTIPLE_CALLBACK,BMt=zR.ERR_TRANSFORM_ALREADY_TRANSFORMING,NMt=zR.ERR_TRANSFORM_WITH_LENGTH_0,qR=S2();Zy()(Ky,qR);function UMt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new OMt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Ky(e){if(!(this instanceof Ky))return new Ky(e);qR.call(this,e),this._transformState={afterTransform:UMt.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",VMt)}function VMt(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){CSe(e,t,r)}):CSe(this,null,null)}Ky.prototype.push=function(e,t){return this._transformState.needTransform=!1,qR.prototype.push.call(this,e,t)};Ky.prototype._transform=function(e,t,r){r(new qMt("_transform()"))};Ky.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Ky.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Ky.prototype._destroy=function(e,t){qR.prototype._destroy.call(this,e,function(r){t(r)})};function CSe(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new NMt;if(e._transformState.transforming)throw new BMt;return e.push(null)}});var RSe=ye((pdr,ISe)=>{"use strict";ISe.exports=hE;var PSe=qj();Zy()(hE,PSe);function hE(e){if(!(this instanceof hE))return new hE(e);PSe.call(this,e)}hE.prototype._transform=function(e,t,r){r(null,e)}});var OSe=ye((gdr,qSe)=>{"use strict";var Oj;function GMt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var zSe=A2().codes,HMt=zSe.ERR_MISSING_ARGS,jMt=zSe.ERR_STREAM_DESTROYED;function DSe(e){if(e)throw e}function WMt(e){return e.setHeader&&typeof e.abort=="function"}function XMt(e,t,r,n){n=GMt(n);var i=!1;e.on("close",function(){i=!0}),Oj===void 0&&(Oj=LR()),Oj(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,WMt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new jMt("pipe"))}}}function FSe(e){e()}function ZMt(e,t){return e.pipe(t)}function YMt(e){return!e.length||typeof e[e.length-1]!="function"?DSe:e.pop()}function KMt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=YMt(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new HMt("streams");var i,a=t.map(function(o,s){var l=s<t.length-1,u=s>0;return XMt(o,l,u,function(c){i||(i=c),c&&a.forEach(FSe),!l&&(a.forEach(FSe),n(i))})});return t.reduce(ZMt)}qSe.exports=KMt});var NSe=ye((mdr,BSe)=>{BSe.exports=$0;var Bj=Ab().EventEmitter,JMt=Zy();JMt($0,Bj);$0.Readable=wj();$0.Writable=_j();$0.Duplex=S2();$0.Transform=qj();$0.PassThrough=RSe();$0.finished=LR();$0.pipeline=OSe();$0.Stream=$0;function $0(){Bj.call(this)}$0.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),Bj.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var wA=ye(fu=>{var USe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i<r.length;i++)n[r[i]]=Object.getOwnPropertyDescriptor(t,r[i]);return n},$Mt=/%[sdj%]/g;fu.format=function(e){if(!HR(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(W_(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,a=String(e).replace($Mt,function(s){if(s==="%%")return"%";if(r>=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r<i;o=n[++r])GR(o)||!bA(o)?a+=" "+o:a+=" "+W_(o);return a};fu.deprecate=function(e,t){if(typeof process!="undefined"&&process.noDeprecation===!0)return e;if(typeof process=="undefined")return function(){return fu.deprecate(e,t).apply(this,arguments)};var r=!1;function n(){if(!r){if(process.throwDeprecation)throw new Error(t);process.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n};var OR={},VSe=/^$/;BR="false",BR=BR.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),VSe=new RegExp("^"+BR+"$","i");var BR;fu.debuglog=function(e){if(e=e.toUpperCase(),!OR[e])if(VSe.test(e)){var t=process.pid;OR[e]=function(){var r=fu.format.apply(fu,arguments);console.error("%s %d: %s",e,t,r)}}else OR[e]=function(){};return OR[e]};function W_(e,t){var r={seen:[],stylize:e4t};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Gj(t)?r.showHidden=t:t&&fu._extend(r,t),P2(r.showHidden)&&(r.showHidden=!1),P2(r.depth)&&(r.depth=2),P2(r.colors)&&(r.colors=!1),P2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=QMt),UR(r,e,r.depth)}fu.inspect=W_;W_.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};W_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function QMt(e,t){var r=W_.styles[t];return r?"\x1B["+W_.colors[r][0]+"m"+e+"\x1B["+W_.colors[r][1]+"m":e}function e4t(e,t){return e}function t4t(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function UR(e,t,r){if(e.customInspect&&t&&NR(t.inspect)&&t.inspect!==fu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return HR(n)||(n=UR(e,n,r)),n}var i=r4t(e,t);if(i)return i;var a=Object.keys(t),o=t4t(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),vE(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Nj(t);if(a.length===0){if(NR(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(dE(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(VR(t))return e.stylize(Date.prototype.toString.call(t),"date");if(vE(t))return Nj(t)}var l="",u=!1,c=["{","}"];if(GSe(t)&&(u=!0,c=["[","]"]),NR(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(dE(t)&&(l=" "+RegExp.prototype.toString.call(t)),VR(t)&&(l=" "+Date.prototype.toUTCString.call(t)),vE(t)&&(l=" "+Nj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return dE(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=i4t(e,t,r,o,a):h=a.map(function(d){return Vj(e,t,r,o,d,u)}),e.seen.pop(),n4t(h,l,c)}function r4t(e,t){if(P2(t))return e.stylize("undefined","undefined");if(HR(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(HSe(t))return e.stylize(""+t,"number");if(Gj(t))return e.stylize(""+t,"boolean");if(GR(t))return e.stylize("null","null")}function Nj(e){return"["+Error.prototype.toString.call(e)+"]"}function i4t(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)jSe(t,String(o))?a.push(Vj(e,t,r,n,String(o),!0)):a.push("");return i.forEach(function(l){l.match(/^\d+$/)||a.push(Vj(e,t,r,n,l,!0))}),a}function Vj(e,t,r,n,i,a){var o,s,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?l.set?s=e.stylize("[Getter/Setter]","special"):s=e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),jSe(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(GR(r)?s=UR(e,l.value,null):s=UR(e,l.value,r-1),s.indexOf(`
|
||
`)>-1&&(a?s=s.split(`
|
||
`).map(function(u){return" "+u}).join(`
|
||
`).slice(2):s=`
|
||
`+s.split(`
|
||
`).map(function(u){return" "+u}).join(`
|
||
`))):s=e.stylize("[Circular]","special")),P2(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function n4t(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]}fu.types=nj();function GSe(e){return Array.isArray(e)}fu.isArray=GSe;function Gj(e){return typeof e=="boolean"}fu.isBoolean=Gj;function GR(e){return e===null}fu.isNull=GR;function a4t(e){return e==null}fu.isNullOrUndefined=a4t;function HSe(e){return typeof e=="number"}fu.isNumber=HSe;function HR(e){return typeof e=="string"}fu.isString=HR;function o4t(e){return typeof e=="symbol"}fu.isSymbol=o4t;function P2(e){return e===void 0}fu.isUndefined=P2;function dE(e){return bA(e)&&Hj(e)==="[object RegExp]"}fu.isRegExp=dE;fu.types.isRegExp=dE;function bA(e){return typeof e=="object"&&e!==null}fu.isObject=bA;function VR(e){return bA(e)&&Hj(e)==="[object Date]"}fu.isDate=VR;fu.types.isDate=VR;function vE(e){return bA(e)&&(Hj(e)==="[object Error]"||e instanceof Error)}fu.isError=vE;fu.types.isNativeError=vE;function NR(e){return typeof e=="function"}fu.isFunction=NR;function s4t(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}fu.isPrimitive=s4t;fu.isBuffer=aj();function Hj(e){return Object.prototype.toString.call(e)}function Uj(e){return e<10?"0"+e.toString(10):e.toString(10)}var l4t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function u4t(){var e=new Date,t=[Uj(e.getHours()),Uj(e.getMinutes()),Uj(e.getSeconds())].join(":");return[e.getDate(),l4t[e.getMonth()],t].join(" ")}fu.log=function(){console.log("%s - %s",u4t(),fu.format.apply(fu,arguments))};fu.inherits=Zy();fu._extend=function(e,t){if(!t||!bA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function jSe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var L2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;fu.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(L2&&t[L2]){var r=t[L2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,L2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(l,u){l?i(l):n(u)});try{t.apply(this,o)}catch(l){i(l)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),L2&&Object.defineProperty(r,L2,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,USe(t))};fu.promisify.custom=L2;function c4t(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function f4t(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(c4t.bind(null,s,o))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,USe(e)),t}fu.callbackify=f4t});var Xj=ye((_dr,YSe)=>{"use strict";function X_(e){"@babel/helpers - typeof";return X_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X_(e)}function WSe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d4t(n.key),n)}}function h4t(e,t,r){return t&&WSe(e.prototype,t),r&&WSe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d4t(e){var t=v4t(e,"string");return X_(t)==="symbol"?t:String(t)}function v4t(e,t){if(X_(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(X_(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function p4t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g4t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wj(e,t)}function Wj(e,t){return Wj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Wj(e,t)}function m4t(e){var t=x4t();return function(){var n=jR(e),i;if(t){var a=jR(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return y4t(this,i)}}function y4t(e,t){if(t&&(X_(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _4t(e)}function _4t(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x4t(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function jR(e){return jR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jR(e)}var ZSe={},TA,jj;function pE(e,t,r){r||(r=Error);function n(a,o,s){return typeof t=="string"?t:t(a,o,s)}var i=function(a){g4t(s,a);var o=m4t(s);function s(l,u,c){var f;return p4t(this,s),f=o.call(this,n(l,u,c)),f.code=e,f}return h4t(s)}(r);ZSe[e]=i}function XSe(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function b4t(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function w4t(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function T4t(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}pE("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);pE("ERR_INVALID_ARG_TYPE",function(e,t,r){TA===void 0&&(TA=gE()),TA(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&b4t(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(w4t(e," argument"))i="The ".concat(e," ").concat(n," ").concat(XSe(t,"type"));else{var a=T4t(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(XSe(t,"type"))}return i+=". Received type ".concat(X_(r)),i},TypeError);pE("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";jj===void 0&&(jj=wA());var n=jj.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);pE("ERR_INVALID_RETURN_VALUE",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n="instance of ".concat(r.constructor.name):n="type ".concat(X_(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);pE("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];TA===void 0&&(TA=gE()),TA(t.length>0,"At least one arg needs to be specified");var n="The ",i=t.length;switch(t=t.map(function(a){return'"'.concat(a,'"')}),i){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,i-1).join(", "),n+=", and ".concat(t[i-1]," arguments");break}return"".concat(n," must be specified")},TypeError);YSe.exports.codes=ZSe});var aMe=ye((xdr,nMe)=>{"use strict";function KSe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function JSe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KSe(Object(r),!0).forEach(function(n){A4t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KSe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function A4t(e,t,r){return t=tMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S4t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Se(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tMe(n.key),n)}}function M4t(e,t,r){return t&&$Se(e.prototype,t),r&&$Se(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tMe(e){var t=E4t(e,"string");return Dp(t)==="symbol"?t:String(t)}function E4t(e,t){if(Dp(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Dp(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function k4t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xE(e,t)}function C4t(e){var t=iMe();return function(){var n=bE(e),i;if(t){var a=bE(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return rMe(this,i)}}function rMe(e,t){if(t&&(Dp(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zj(e)}function Zj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yj(e){var t=typeof Map=="function"?new Map:void 0;return Yj=function(n){if(n===null||!L4t(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return WR(n,arguments,bE(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),xE(i,n)},Yj(e)}function WR(e,t,r){return iMe()?WR=Reflect.construct.bind():WR=function(i,a,o){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),u=new l;return o&&xE(u,o.prototype),u},WR.apply(null,arguments)}function iMe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function L4t(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function xE(e,t){return xE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},xE(e,t)}function bE(e){return bE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bE(e)}function Dp(e){"@babel/helpers - typeof";return Dp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dp(e)}var P4t=wA(),Kj=P4t.inspect,I4t=Xj(),R4t=I4t.codes.ERR_INVALID_ARG_TYPE;function QSe(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function D4t(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var Xg="",mE="",yE="",Tv="",I2={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},F4t=10;function eMe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,"message",{value:e.message}),r}function _E(e){return Kj(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function z4t(e,t,r){var n="",i="",a=0,o="",s=!1,l=_E(e),u=l.split(`
|
||
`),c=_E(t).split(`
|
||
`),f=0,h="";if(r==="strictEqual"&&Dp(e)==="object"&&Dp(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var d=u[0].length+c[0].length;if(d<=F4t){if((Dp(e)!=="object"||e===null)&&(Dp(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(I2[r],`
|
||
|
||
`)+"".concat(u[0]," !== ").concat(c[0],`
|
||
`)}else if(r!=="strictEqualObject"){var v=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d<v){for(;u[0][f]===c[0][f];)f++;f>2&&(h=`
|
||
`.concat(D4t(" ",f),"^"),f=0)}}}for(var m=u[u.length-1],b=c[c.length-1];m===b&&(f++<2?o=`
|
||
`.concat(m).concat(o):n=m,u.pop(),c.pop(),!(u.length===0||c.length===0));)m=u[u.length-1],b=c[c.length-1];var p=Math.max(u.length,c.length);if(p===0){var k=l.split(`
|
||
`);if(k.length>30)for(k[26]="".concat(Xg,"...").concat(Tv);k.length>27;)k.pop();return"".concat(I2.notIdentical,`
|
||
|
||
`).concat(k.join(`
|
||
`),`
|
||
`)}f>3&&(o=`
|
||
`.concat(Xg,"...").concat(Tv).concat(o),s=!0),n!==""&&(o=`
|
||
`.concat(n).concat(o),n="");var M=0,T=I2[r]+`
|
||
`.concat(mE,"+ actual").concat(Tv," ").concat(yE,"- expected").concat(Tv),L=" ".concat(Xg,"...").concat(Tv," Lines skipped");for(f=0;f<p;f++){var x=f-a;if(u.length<f+1)x>1&&f>2&&(x>4?(i+=`
|
||
`.concat(Xg,"...").concat(Tv),s=!0):x>3&&(i+=`
|
||
`.concat(c[f-2]),M++),i+=`
|
||
`.concat(c[f-1]),M++),a=f,n+=`
|
||
`.concat(yE,"-").concat(Tv," ").concat(c[f]),M++;else if(c.length<f+1)x>1&&f>2&&(x>4?(i+=`
|
||
`.concat(Xg,"...").concat(Tv),s=!0):x>3&&(i+=`
|
||
`.concat(u[f-2]),M++),i+=`
|
||
`.concat(u[f-1]),M++),a=f,i+=`
|
||
`.concat(mE,"+").concat(Tv," ").concat(u[f]),M++;else{var C=c[f],S=u[f],g=S!==C&&(!QSe(S,",")||S.slice(0,-1)!==C);g&&QSe(C,",")&&C.slice(0,-1)===S&&(g=!1,S+=","),g?(x>1&&f>2&&(x>4?(i+=`
|
||
`.concat(Xg,"...").concat(Tv),s=!0):x>3&&(i+=`
|
||
`.concat(u[f-2]),M++),i+=`
|
||
`.concat(u[f-1]),M++),a=f,i+=`
|
||
`.concat(mE,"+").concat(Tv," ").concat(S),n+=`
|
||
`.concat(yE,"-").concat(Tv," ").concat(C),M+=2):(i+=n,n="",(x===1||f===0)&&(i+=`
|
||
`.concat(S),M++))}if(M>20&&f<p-2)return"".concat(T).concat(L,`
|
||
`).concat(i,`
|
||
`).concat(Xg,"...").concat(Tv).concat(n,`
|
||
`)+"".concat(Xg,"...").concat(Tv)}return"".concat(T).concat(s?L:"",`
|
||
`).concat(i).concat(n).concat(o).concat(h)}var q4t=function(e,t){k4t(n,e);var r=C4t(n);function n(i){var a;if(S4t(this,n),Dp(i)!=="object"||i===null)throw new R4t("options","Object",i);var o=i.message,s=i.operator,l=i.stackStartFn,u=i.actual,c=i.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,o!=null)a=r.call(this,String(o));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(Xg="\x1B[34m",mE="\x1B[32m",Tv="\x1B[39m",yE="\x1B[31m"):(Xg="",mE="",Tv="",yE="")),Dp(u)==="object"&&u!==null&&Dp(c)==="object"&&c!==null&&"stack"in u&&u instanceof Error&&"stack"in c&&c instanceof Error&&(u=eMe(u),c=eMe(c)),s==="deepStrictEqual"||s==="strictEqual")a=r.call(this,z4t(u,c,s));else if(s==="notDeepStrictEqual"||s==="notStrictEqual"){var h=I2[s],d=_E(u).split(`
|
||
`);if(s==="notStrictEqual"&&Dp(u)==="object"&&u!==null&&(h=I2.notStrictEqualObject),d.length>30)for(d[26]="".concat(Xg,"...").concat(Tv);d.length>27;)d.pop();d.length===1?a=r.call(this,"".concat(h," ").concat(d[0])):a=r.call(this,"".concat(h,`
|
||
|
||
`).concat(d.join(`
|
||
`),`
|
||
`))}else{var v=_E(u),m="",b=I2[s];s==="notDeepEqual"||s==="notEqual"?(v="".concat(I2[s],`
|
||
|
||
`).concat(v),v.length>1024&&(v="".concat(v.slice(0,1021),"..."))):(m="".concat(_E(c)),v.length>512&&(v="".concat(v.slice(0,509),"...")),m.length>512&&(m="".concat(m.slice(0,509),"...")),s==="deepEqual"||s==="equal"?v="".concat(b,`
|
||
|
||
`).concat(v,`
|
||
|
||
should equal
|
||
|
||
`):m=" ".concat(s," ").concat(m)),a=r.call(this,"".concat(v).concat(m))}return Error.stackTraceLimit=f,a.generatedMessage=!o,Object.defineProperty(Zj(a),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),a.code="ERR_ASSERTION",a.actual=u,a.expected=c,a.operator=s,Error.captureStackTrace&&Error.captureStackTrace(Zj(a),l),a.stack,a.name="AssertionError",rMe(a)}return M4t(n,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(a,o){return Kj(this,JSe(JSe({},o),{},{customInspect:!1,depth:0}))}}]),n}(Yj(Error),Kj.custom);nMe.exports=q4t});var Jj=ye((bdr,sMe)=>{"use strict";var oMe=Object.prototype.toString;sMe.exports=function(t){var r=oMe.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&oMe.call(t.callee)==="[object Function]"),n}});var gMe=ye((wdr,pMe)=>{"use strict";var vMe;Object.keys||(wE=Object.prototype.hasOwnProperty,$j=Object.prototype.toString,lMe=Jj(),Qj=Object.prototype.propertyIsEnumerable,uMe=!Qj.call({toString:null},"toString"),cMe=Qj.call(function(){},"prototype"),TE=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],XR=function(e){var t=e.constructor;return t&&t.prototype===e},fMe={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},hMe=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!fMe["$"+e]&&wE.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{XR(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),dMe=function(e){if(typeof window=="undefined"||!hMe)return XR(e);try{return XR(e)}catch(t){return!1}},vMe=function(t){var r=t!==null&&typeof t=="object",n=$j.call(t)==="[object Function]",i=lMe(t),a=r&&$j.call(t)==="[object String]",o=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var s=cMe&&n;if(a&&t.length>0&&!wE.call(t,0))for(var l=0;l<t.length;++l)o.push(String(l));if(i&&t.length>0)for(var u=0;u<t.length;++u)o.push(String(u));else for(var c in t)!(s&&c==="prototype")&&wE.call(t,c)&&o.push(String(c));if(uMe)for(var f=dMe(t),h=0;h<TE.length;++h)!(f&&TE[h]==="constructor")&&wE.call(t,TE[h])&&o.push(TE[h]);return o});var wE,$j,lMe,Qj,uMe,cMe,TE,XR,fMe,hMe,dMe;pMe.exports=vMe});var eW=ye((Tdr,_Me)=>{"use strict";var O4t=Array.prototype.slice,B4t=Jj(),mMe=Object.keys,ZR=mMe?function(t){return mMe(t)}:gMe(),yMe=Object.keys;ZR.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return B4t(n)?yMe(O4t.call(n)):yMe(n)})}else Object.keys=ZR;return Object.keys||ZR};_Me.exports=ZR});var SMe=ye((Adr,AMe)=>{"use strict";var N4t=eW(),wMe=Y8()(),TMe=dA(),xMe=Object,U4t=TMe("Array.prototype.push"),bMe=TMe("Object.prototype.propertyIsEnumerable"),V4t=wMe?Object.getOwnPropertySymbols:null;AMe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=xMe(t);if(arguments.length===1)return n;for(var i=1;i<arguments.length;++i){var a=xMe(arguments[i]),o=N4t(a),s=wMe&&(Object.getOwnPropertySymbols||V4t);if(s)for(var l=s(a),u=0;u<l.length;++u){var c=l[u];bMe(a,c)&&U4t(o,c)}for(var f=0;f<o.length;++f){var h=o[f];if(bMe(a,h)){var d=a[h];n[h]=d}}}return n}});var EMe=ye((Sdr,MMe)=>{"use strict";var tW=SMe(),G4t=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},H4t=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return e[1]==="y"}return!1};MMe.exports=function(){return!Object.assign||G4t()||H4t()?tW:Object.assign}});var rW=ye((Mdr,CMe)=>{"use strict";var kMe=function(e){return e!==e};CMe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||kMe(t)&&kMe(r))}});var YR=ye((Edr,LMe)=>{"use strict";var j4t=rW();LMe.exports=function(){return typeof Object.is=="function"?Object.is:j4t}});var AE=ye((kdr,DMe)=>{"use strict";var W4t=eW(),X4t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Z4t=Object.prototype.toString,Y4t=Array.prototype.concat,PMe=Object.defineProperty,K4t=function(e){return typeof e=="function"&&Z4t.call(e)==="[object Function]"},J4t=OH()(),IMe=PMe&&J4t,$4t=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!K4t(n)||!n())return}IMe?PMe(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r},RMe=function(e,t){var r=arguments.length>2?arguments[2]:{},n=W4t(t);X4t&&(n=Y4t.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i<n.length;i+=1)$4t(e,n[i],t[n[i]],r[n[i]])};RMe.supportsDescriptors=!!IMe;DMe.exports=RMe});var zMe=ye((Cdr,FMe)=>{"use strict";var Q4t=YR(),eEt=AE();FMe.exports=function(){var t=Q4t();return eEt(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var NMe=ye((Ldr,BMe)=>{"use strict";var tEt=AE(),rEt=tE(),iEt=rW(),qMe=YR(),nEt=zMe(),OMe=rEt(qMe(),Object);tEt(OMe,{getPolyfill:qMe,implementation:iEt,shim:nEt});BMe.exports=OMe});var iW=ye((Pdr,UMe)=>{"use strict";UMe.exports=function(t){return t!==t}});var nW=ye((Idr,VMe)=>{"use strict";var aEt=iW();VMe.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:aEt}});var HMe=ye((Rdr,GMe)=>{"use strict";var oEt=AE(),sEt=nW();GMe.exports=function(){var t=sEt();return oEt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var ZMe=ye((Ddr,XMe)=>{"use strict";var lEt=tE(),uEt=AE(),cEt=iW(),jMe=nW(),fEt=HMe(),WMe=lEt(jMe(),Number);uEt(WMe,{getPolyfill:jMe,implementation:cEt,shim:fEt});XMe.exports=WMe});var v4e=ye((Fdr,d4e)=>{"use strict";function YMe(e,t){return pEt(e)||vEt(e,t)||dEt(e,t)||hEt()}function hEt(){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 dEt(e,t){if(e){if(typeof e=="string")return KMe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KMe(e,t)}}function KMe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vEt(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function pEt(e){if(Array.isArray(e))return e}function Q0(e){"@babel/helpers - typeof";return Q0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q0(e)}var gEt=/a/g.flags!==void 0,rD=function(t){var r=[];return t.forEach(function(n){return r.push(n)}),r},JMe=function(t){var r=[];return t.forEach(function(n,i){return r.push([i,n])}),r},l4e=Object.is?Object.is:NMe(),eD=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},aW=Number.isNaN?Number.isNaN:ZMe();function sW(e){return e.call.bind(e)}var ME=sW(Object.prototype.hasOwnProperty),tD=sW(Object.prototype.propertyIsEnumerable),$Me=sW(Object.prototype.toString),lp=wA().types,mEt=lp.isAnyArrayBuffer,yEt=lp.isArrayBufferView,QMe=lp.isDate,KR=lp.isMap,e4e=lp.isRegExp,JR=lp.isSet,_Et=lp.isNativeError,xEt=lp.isBoxedPrimitive,t4e=lp.isNumberObject,r4e=lp.isStringObject,i4e=lp.isBooleanObject,n4e=lp.isBigIntObject,bEt=lp.isSymbolObject,wEt=lp.isFloat32Array,TEt=lp.isFloat64Array;function AEt(e){if(e.length===0||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return e.length===10&&e>=Math.pow(2,32)}function $R(e){return Object.keys(e).filter(AEt).concat(eD(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function u4e(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}var QR=void 0,SEt=!0,MEt=!1,oW=0,lW=1,c4e=2,f4e=3;function EEt(e,t){return gEt?e.source===t.source&&e.flags===t.flags:RegExp.prototype.toString.call(e)===RegExp.prototype.toString.call(t)}function kEt(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 CEt(e,t){return e.byteLength!==t.byteLength?!1:u4e(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))===0}function LEt(e,t){return e.byteLength===t.byteLength&&u4e(new Uint8Array(e),new Uint8Array(t))===0}function PEt(e,t){return t4e(e)?t4e(t)&&l4e(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):r4e(e)?r4e(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):i4e(e)?i4e(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):n4e(e)?n4e(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):bEt(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}function eg(e,t,r,n){if(e===t)return e!==0?!0:r?l4e(e,t):!0;if(r){if(Q0(e)!=="object")return typeof e=="number"&&aW(e)&&aW(t);if(Q0(t)!=="object"||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(e===null||Q0(e)!=="object")return t===null||Q0(t)!=="object"?e==t:!1;if(t===null||Q0(t)!=="object")return!1}var i=$Me(e),a=$Me(t);if(i!==a)return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var o=$R(e,QR),s=$R(t,QR);return o.length!==s.length?!1:SE(e,t,r,n,lW,o)}if(i==="[object Object]"&&(!KR(e)&&KR(t)||!JR(e)&&JR(t)))return!1;if(QMe(e)){if(!QMe(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(e4e(e)){if(!e4e(t)||!EEt(e,t))return!1}else if(_Et(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else if(yEt(e)){if(!r&&(wEt(e)||TEt(e))){if(!kEt(e,t))return!1}else if(!CEt(e,t))return!1;var l=$R(e,QR),u=$R(t,QR);return l.length!==u.length?!1:SE(e,t,r,n,oW,l)}else{if(JR(e))return!JR(t)||e.size!==t.size?!1:SE(e,t,r,n,c4e);if(KR(e))return!KR(t)||e.size!==t.size?!1:SE(e,t,r,n,f4e);if(mEt(e)){if(!LEt(e,t))return!1}else if(xEt(e)&&!PEt(e,t))return!1}return SE(e,t,r,n,oW)}function a4e(e,t){return t.filter(function(r){return tD(e,r)})}function SE(e,t,r,n,i,a){if(arguments.length===5){a=Object.keys(e);var o=Object.keys(t);if(a.length!==o.length)return!1}for(var s=0;s<a.length;s++)if(!ME(t,a[s]))return!1;if(r&&arguments.length===5){var l=eD(e);if(l.length!==0){var u=0;for(s=0;s<l.length;s++){var c=l[s];if(tD(e,c)){if(!tD(t,c))return!1;a.push(c),u++}else if(tD(t,c))return!1}var f=eD(t);if(l.length!==f.length&&a4e(t,f).length!==u)return!1}else{var h=eD(t);if(h.length!==0&&a4e(t,h).length!==0)return!1}}if(a.length===0&&(i===oW||i===lW&&e.length===0||e.size===0))return!0;if(n===void 0)n={val1:new Map,val2:new Map,position:0};else{var d=n.val1.get(e);if(d!==void 0){var v=n.val2.get(t);if(v!==void 0)return d===v}n.position++}n.val1.set(e,n.position),n.val2.set(t,n.position);var m=zEt(e,t,r,a,n,i);return n.val1.delete(e),n.val2.delete(t),m}function o4e(e,t,r,n){for(var i=rD(e),a=0;a<i.length;a++){var o=i[a];if(eg(t,o,r,n))return e.delete(o),!0}return!1}function h4e(e){switch(Q0(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(aW(e))return!1}return!0}function IEt(e,t,r){var n=h4e(r);return n!=null?n:t.has(n)&&!e.has(n)}function REt(e,t,r,n,i){var a=h4e(r);if(a!=null)return a;var o=t.get(a);return o===void 0&&!t.has(a)||!eg(n,o,!1,i)?!1:!e.has(a)&&eg(n,o,!1,i)}function DEt(e,t,r,n){for(var i=null,a=rD(e),o=0;o<a.length;o++){var s=a[o];if(Q0(s)==="object"&&s!==null)i===null&&(i=new Set),i.add(s);else if(!t.has(s)){if(r||!IEt(e,t,s))return!1;i===null&&(i=new Set),i.add(s)}}if(i!==null){for(var l=rD(t),u=0;u<l.length;u++){var c=l[u];if(Q0(c)==="object"&&c!==null){if(!o4e(i,c,r,n))return!1}else if(!r&&!e.has(c)&&!o4e(i,c,r,n))return!1}return i.size===0}return!0}function s4e(e,t,r,n,i,a){for(var o=rD(e),s=0;s<o.length;s++){var l=o[s];if(eg(r,l,i,a)&&eg(n,t.get(l),i,a))return e.delete(l),!0}return!1}function FEt(e,t,r,n){for(var i=null,a=JMe(e),o=0;o<a.length;o++){var s=YMe(a[o],2),l=s[0],u=s[1];if(Q0(l)==="object"&&l!==null)i===null&&(i=new Set),i.add(l);else{var c=t.get(l);if(c===void 0&&!t.has(l)||!eg(u,c,r,n)){if(r||!REt(e,t,l,u,n))return!1;i===null&&(i=new Set),i.add(l)}}}if(i!==null){for(var f=JMe(t),h=0;h<f.length;h++){var d=YMe(f[h],2),v=d[0],m=d[1];if(Q0(v)==="object"&&v!==null){if(!s4e(i,e,v,m,r,n))return!1}else if(!r&&(!e.has(v)||!eg(e.get(v),m,!1,n))&&!s4e(i,e,v,m,!1,n))return!1}return i.size===0}return!0}function zEt(e,t,r,n,i,a){var o=0;if(a===c4e){if(!DEt(e,t,r,i))return!1}else if(a===f4e){if(!FEt(e,t,r,i))return!1}else if(a===lW)for(;o<e.length;o++)if(ME(e,o)){if(!ME(t,o)||!eg(e[o],t[o],r,i))return!1}else{if(ME(t,o))return!1;for(var s=Object.keys(e);o<s.length;o++){var l=s[o];if(!ME(t,l)||!eg(e[l],t[l],r,i))return!1}return s.length===Object.keys(t).length}for(o=0;o<n.length;o++){var u=n[o];if(!eg(e[u],t[u],r,i))return!1}return!0}function qEt(e,t){return eg(e,t,MEt)}function OEt(e,t){return eg(e,t,SEt)}d4e.exports={isDeepEqual:qEt,isDeepStrictEqual:OEt}});var gE=ye((zdr,I4e)=>{"use strict";function Zg(e){"@babel/helpers - typeof";return Zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zg(e)}function p4e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,NEt(n.key),n)}}function BEt(e,t,r){return t&&p4e(e.prototype,t),r&&p4e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function NEt(e){var t=UEt(e,"string");return Zg(t)==="symbol"?t:String(t)}function UEt(e,t){if(Zg(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zg(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VEt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var GEt=Xj(),EE=GEt.codes,g4e=EE.ERR_AMBIGUOUS_ARGUMENT,AA=EE.ERR_INVALID_ARG_TYPE,HEt=EE.ERR_INVALID_ARG_VALUE,jEt=EE.ERR_INVALID_RETURN_VALUE,Y_=EE.ERR_MISSING_ARGS,K_=aMe(),WEt=wA(),iD=WEt.inspect,x4e=wA().types,XEt=x4e.isPromise,nD=x4e.isRegExp,ZEt=EMe()(),b4e=YR()(),aD=dA()("RegExp.prototype.test"),Z_,oD;function kE(){var e=v4e();Z_=e.isDeepEqual,oD=e.isDeepStrictEqual}var m4e=!1,Ef=I4e.exports=uW,sD={};function Yg(e){throw e.message instanceof Error?e.message:new K_(e)}function w4e(e,t,r,n,i){var a=arguments.length,o;if(a===0)o="Failed";else if(a===1)r=e,e=void 0;else{if(m4e===!1){m4e=!0;var s=process.emitWarning?process.emitWarning:console.warn.bind(console);s("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}a===2&&(n="!=")}if(r instanceof Error)throw r;var l={actual:e,expected:t,operator:n===void 0?"fail":n,stackStartFn:i||w4e};r!==void 0&&(l.message=r);var u=new K_(l);throw o&&(u.message=o,u.generatedMessage=!0),u}Ef.fail=w4e;Ef.AssertionError=K_;function T4e(e,t,r,n){if(!r){var i=!1;if(t===0)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var a=new K_({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw a.generatedMessage=i,a}}function uW(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];T4e.apply(void 0,[uW,t.length].concat(t))}Ef.ok=uW;Ef.equal=function e(t,r,n){if(arguments.length<2)throw new Y_("actual","expected");t!=r&&Yg({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})};Ef.notEqual=function e(t,r,n){if(arguments.length<2)throw new Y_("actual","expected");t==r&&Yg({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})};Ef.deepEqual=function e(t,r,n){if(arguments.length<2)throw new Y_("actual","expected");Z_===void 0&&kE(),Z_(t,r)||Yg({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})};Ef.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new Y_("actual","expected");Z_===void 0&&kE(),Z_(t,r)&&Yg({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})};Ef.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new Y_("actual","expected");Z_===void 0&&kE(),oD(t,r)||Yg({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})};Ef.notDeepStrictEqual=A4e;function A4e(e,t,r){if(arguments.length<2)throw new Y_("actual","expected");Z_===void 0&&kE(),oD(e,t)&&Yg({actual:e,expected:t,message:r,operator:"notDeepStrictEqual",stackStartFn:A4e})}Ef.strictEqual=function e(t,r,n){if(arguments.length<2)throw new Y_("actual","expected");b4e(t,r)||Yg({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})};Ef.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new Y_("actual","expected");b4e(t,r)&&Yg({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var y4e=BEt(function e(t,r,n){var i=this;VEt(this,e),r.forEach(function(a){a in t&&(n!==void 0&&typeof n[a]=="string"&&nD(t[a])&&aD(t[a],n[a])?i[a]=n[a]:i[a]=t[a])})});function YEt(e,t,r,n,i,a){if(!(r in e)||!oD(e[r],t[r])){if(!n){var o=new y4e(e,i),s=new y4e(t,i,e),l=new K_({actual:o,expected:s,operator:"deepStrictEqual",stackStartFn:a});throw l.actual=e,l.expected=t,l.operator=a.name,l}Yg({actual:e,expected:t,message:n,operator:a.name,stackStartFn:a})}}function S4e(e,t,r,n){if(typeof t!="function"){if(nD(t))return aD(t,e);if(arguments.length===2)throw new AA("expected",["Function","RegExp"],t);if(Zg(e)!=="object"||e===null){var i=new K_({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw i.operator=n.name,i}var a=Object.keys(t);if(t instanceof Error)a.push("name","message");else if(a.length===0)throw new HEt("error",t,"may not be an empty object");return Z_===void 0&&kE(),a.forEach(function(o){typeof e[o]=="string"&&nD(t[o])&&aD(t[o],e[o])||YEt(e,t,o,r,a,n)}),!0}return t.prototype!==void 0&&e instanceof t?!0:Error.isPrototypeOf(t)?!1:t.call({},e)===!0}function M4e(e){if(typeof e!="function")throw new AA("fn","Function",e);try{e()}catch(t){return t}return sD}function _4e(e){return XEt(e)||e!==null&&Zg(e)==="object"&&typeof e.then=="function"&&typeof e.catch=="function"}function E4e(e){return Promise.resolve().then(function(){var t;if(typeof e=="function"){if(t=e(),!_4e(t))throw new jEt("instance of Promise","promiseFn",t)}else if(_4e(e))t=e;else throw new AA("promiseFn",["Function","Promise"],e);return Promise.resolve().then(function(){return t}).then(function(){return sD}).catch(function(r){return r})})}function k4e(e,t,r,n){if(typeof r=="string"){if(arguments.length===4)throw new AA("error",["Object","Error","Function","RegExp"],r);if(Zg(t)==="object"&&t!==null){if(t.message===r)throw new g4e("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new g4e("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(r!=null&&Zg(r)!=="object"&&typeof r!="function")throw new AA("error",["Object","Error","Function","RegExp"],r);if(t===sD){var i="";r&&r.name&&(i+=" (".concat(r.name,")")),i+=n?": ".concat(n):".";var a=e.name==="rejects"?"rejection":"exception";Yg({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(i),stackStartFn:e})}if(r&&!S4e(t,r,n,e))throw t}function C4e(e,t,r,n){if(t!==sD){if(typeof r=="string"&&(n=r,r=void 0),!r||S4e(t,r)){var i=n?": ".concat(n):".",a=e.name==="doesNotReject"?"rejection":"exception";Yg({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(a).concat(i,`
|
||
`)+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}Ef.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];k4e.apply(void 0,[e,M4e(t)].concat(n))};Ef.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return E4e(t).then(function(a){return k4e.apply(void 0,[e,a].concat(n))})};Ef.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];C4e.apply(void 0,[e,M4e(t)].concat(n))};Ef.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return E4e(t).then(function(a){return C4e.apply(void 0,[e,a].concat(n))})};Ef.ifError=function e(t){if(t!=null){var r="ifError got unwanted exception: ";Zg(t)==="object"&&typeof t.message=="string"?t.message.length===0&&t.constructor?r+=t.constructor.name:r+=t.message:r+=iD(t);var n=new K_({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),i=t.stack;if(typeof i=="string"){var a=i.split(`
|
||
`);a.shift();for(var o=n.stack.split(`
|
||
`),s=0;s<a.length;s++){var l=o.indexOf(a[s]);if(l!==-1){o=o.slice(0,l);break}}n.stack="".concat(o.join(`
|
||
`),`
|
||
`).concat(a.join(`
|
||
`))}throw n}};function L4e(e,t,r,n,i){if(!nD(t))throw new AA("regexp","RegExp",t);var a=i==="match";if(typeof e!="string"||aD(t,e)!==a){if(r instanceof Error)throw r;var o=!r;r=r||(typeof e!="string"?'The "string" argument must be of type string. Received type '+"".concat(Zg(e)," (").concat(iD(e),")"):(a?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(iD(t),`. Input:
|
||
|
||
`).concat(iD(e),`
|
||
`));var s=new K_({actual:e,expected:t,message:r,operator:i,stackStartFn:n});throw s.generatedMessage=o,s}}Ef.match=function e(t,r,n){L4e(t,r,n,e,"match")};Ef.doesNotMatch=function e(t,r,n){L4e(t,r,n,e,"doesNotMatch")};function P4e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];T4e.apply(void 0,[P4e,t.length].concat(t))}Ef.strict=ZEt(P4e,Ef,{equal:Ef.strictEqual,deepEqual:Ef.deepStrictEqual,notEqual:Ef.notStrictEqual,notDeepEqual:Ef.notDeepStrictEqual});Ef.strict.strict=Ef.strict});var D4e=ye((qdr,R4e)=>{var CE=1e3,LE=CE*60,PE=LE*60,IE=PE*24,KEt=IE*365.25;R4e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return JEt(e);if(r==="number"&&isNaN(e)===!1)return t.long?QEt(e):$Et(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function JEt(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*KEt;case"days":case"day":case"d":return r*IE;case"hours":case"hour":case"hrs":case"hr":case"h":return r*PE;case"minutes":case"minute":case"mins":case"min":case"m":return r*LE;case"seconds":case"second":case"secs":case"sec":case"s":return r*CE;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function $Et(e){return e>=IE?Math.round(e/IE)+"d":e>=PE?Math.round(e/PE)+"h":e>=LE?Math.round(e/LE)+"m":e>=CE?Math.round(e/CE)+"s":e+"ms"}function QEt(e){return lD(e,IE,"day")||lD(e,PE,"hour")||lD(e,LE,"minute")||lD(e,CE,"second")||e+" ms"}function lD(e,t,r){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}});var z4e=ye((Lc,F4e)=>{Lc=F4e.exports=fW.debug=fW.default=fW;Lc.coerce=nkt;Lc.disable=rkt;Lc.enable=tkt;Lc.enabled=ikt;Lc.humanize=D4e();Lc.names=[];Lc.skips=[];Lc.formatters={};var cW;function ekt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Lc.colors[Math.abs(t)%Lc.colors.length]}function fW(e){function t(){if(t.enabled){var r=t,n=+new Date,i=n-(cW||n);r.diff=i,r.prev=cW,r.curr=n,cW=n;for(var a=new Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=Lc.coerce(a[0]),typeof a[0]!="string"&&a.unshift("%O");var s=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(u,c){if(u==="%%")return u;s++;var f=Lc.formatters[c];if(typeof f=="function"){var h=a[s];u=f.call(r,h),a.splice(s,1),s--}return u}),Lc.formatArgs.call(r,a);var l=t.log||Lc.log||console.log.bind(console);l.apply(r,a)}}return t.namespace=e,t.enabled=Lc.enabled(e),t.useColors=Lc.useColors(),t.color=ekt(e),typeof Lc.init=="function"&&Lc.init(t),t}function tkt(e){Lc.save(e),Lc.names=[],Lc.skips=[];for(var t=(typeof e=="string"?e:"").split(/[\s,]+/),r=t.length,n=0;n<r;n++)t[n]&&(e=t[n].replace(/\*/g,".*?"),e[0]==="-"?Lc.skips.push(new RegExp("^"+e.substr(1)+"$")):Lc.names.push(new RegExp("^"+e+"$")))}function rkt(){Lc.enable("")}function ikt(e){var t,r;for(t=0,r=Lc.skips.length;t<r;t++)if(Lc.skips[t].test(e))return!1;for(t=0,r=Lc.names.length;t<r;t++)if(Lc.names[t].test(e))return!0;return!1}function nkt(e){return e instanceof Error?e.stack||e.message:e}});var B4e=ye((up,O4e)=>{up=O4e.exports=z4e();up.log=skt;up.formatArgs=okt;up.save=lkt;up.load=q4e;up.useColors=akt;up.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:ukt();up.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function akt(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}up.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function okt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+up.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(a){a!=="%%"&&(n++,a==="%c"&&(i=n))}),e.splice(i,0,r)}}function skt(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function lkt(e){try{e==null?up.storage.removeItem("debug"):up.storage.debug=e}catch(t){}}function q4e(){var e;try{e=up.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}up.enable(q4e());function ukt(){try{return window.localStorage}catch(e){}}});var X4e=ye((Odr,W4e)=>{var SA=gE(),J_=B4e()("stream-parser");W4e.exports=fkt;var U4e=-1,uD=0,ckt=1,V4e=2;function fkt(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");J_("extending Parser into stream"),e._bytes=hkt,e._skipBytes=dkt,t&&(e._passthrough=vkt),t?e._transform=gkt:e._write=pkt}function RE(e){J_("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=U4e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function hkt(e,t){SA(!this._parserCallback,'there is already a "callback" set!'),SA(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||RE(this),J_("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=uD}function dkt(e,t){SA(!this._parserCallback,'there is already a "callback" set!'),SA(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||RE(this),J_("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=ckt}function vkt(e,t){SA(!this._parserCallback,'There is already a "callback" set!'),SA(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||RE(this),J_("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=V4e}function pkt(e,t,r){this._parserInit||RE(this),J_("write(%o bytes)",e.length),typeof t=="function"&&(r=t),H4e(this,e,null,r)}function gkt(e,t,r){this._parserInit||RE(this),J_("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),H4e(this,e,t,r)}function G4e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return N4e(e,t,r,n)}:function(){var i=t.slice(0,e._parserBytesLeft);return N4e(e,i,r,function(a){if(a)return n(a);if(t.length>i.length)return function(){return G4e(e,t.slice(i.length),r,n)}})}}function N4e(e,t,r,n){if(e._parserBytesLeft-=t.length,J_("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===uD?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===V4e&&r(t),e._parserBytesLeft===0){var i=e._parserCallback;if(i&&e._parserState===uD&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==uD&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=U4e,e._parserBuffers.splice(0),i){var a=[];t&&a.push(t),r&&a.push(r);var o=i.length>a.length;o&&a.push(j4e(n));var s=i.apply(e,a);if(!o||n===s)return n}}else return n}var H4e=j4e(G4e);function j4e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var rc=ye(Jy=>{"use strict";var Z4e=NSe().Transform,mkt=X4e();function DE(){Z4e.call(this,{readableObjectMode:!0})}DE.prototype=Object.create(Z4e.prototype);DE.prototype.constructor=DE;mkt(DE.prototype);Jy.ParserStream=DE;Jy.sliceEq=function(e,t,r){for(var n=t,i=0;i<r.length;)if(e[n++]!==r[i++])return!1;return!0};Jy.str2arr=function(e,t){var r=[],n=0;if(t&&t==="hex")for(;n<e.length;)r.push(parseInt(e.slice(n,n+2),16)),n+=2;else for(;n<e.length;n++)r.push(e.charCodeAt(n)&255);return r};Jy.readUInt16LE=function(e,t){return e[t]|e[t+1]<<8};Jy.readUInt16BE=function(e,t){return e[t+1]|e[t]<<8};Jy.readUInt32LE=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]*16777216};Jy.readUInt32BE=function(e,t){return e[t+3]|e[t+2]<<8|e[t+1]<<16|e[t]*16777216};function cD(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}cD.prototype=Object.create(Error.prototype);cD.prototype.constructor=cD;Jy.ProbeError=cD});var Y4e=ye((Ndr,fD)=>{"use strict";var MA=rc().readUInt16BE,dW=rc().readUInt32BE;function FE(e,t){if(e.length<4+t)return null;var r=dW(e,t);return e.length<r+t||r<8?null:{boxtype:String.fromCharCode.apply(null,e.slice(t+4,t+8)),data:e.slice(t+8,t+r),end:t+r}}fD.exports.unbox=FE;function ykt(e,t){for(var r=0;;){var n=FE(e,r);if(!n)break;switch(n.boxtype){case"ispe":t.sizes.push({width:dW(n.data,4),height:dW(n.data,8)});break;case"irot":t.transforms.push({type:"irot",value:n.data[0]&3});break;case"imir":t.transforms.push({type:"imir",value:n.data[0]&1});break}r=n.end}}function hW(e,t,r){for(var n=0,i=0;i<r;i++)n=n*256+(e[t+i]||0);return n}function _kt(e,t){for(var r=e[4]>>4&15,n=e[4]&15,i=e[5]>>4&15,a=MA(e,6),o=8,s=0;s<a;s++){var l=MA(e,o);o+=2;var u=MA(e,o);o+=2;var c=hW(e,o,i);o+=i;var f=MA(e,o);if(o+=2,u===0&&f===1){var h=hW(e,o,r),d=hW(e,o+r,n);t.item_loc[l]={length:d,offset:h+c}}o+=f*(r+n)}}function xkt(e,t){for(var r=MA(e,4),n=6,i=0;i<r;i++){var a=FE(e,n);if(!a)break;if(a.boxtype==="infe"){for(var o=MA(a.data,4),s="",l=8;l<a.data.length&&a.data[l];l++)s+=String.fromCharCode(a.data[l]);t.item_inf[s]=o}n=a.end}}function bkt(e,t){for(var r=0;;){var n=FE(e,r);if(!n)break;n.boxtype==="ipco"&&ykt(n.data,t),r=n.end}}function wkt(e,t){for(var r=4;;){var n=FE(e,r);if(!n)break;n.boxtype==="iprp"&&bkt(n.data,t),n.boxtype==="iloc"&&_kt(n.data,t),n.boxtype==="iinf"&&xkt(n.data,t),r=n.end}}function Tkt(e){var t=e.reduce(function(i,a){return i.width>a.width||i.width===a.width&&i.height>a.height?i:a}),r=e.reduce(function(i,a){return i.height>a.height||i.height===a.height&&i.width>a.width?i:a}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}fD.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(wkt(e,t),!!t.sizes.length){var r=Tkt(t.sizes),n=1;t.transforms.forEach(function(a){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(a.type==="imir"&&(a.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),a.type==="irot")for(var l=0;l<a.value;l++)n=o[n]});var i=null;return t.item_inf.Exif&&(i=t.item_loc[t.item_inf.Exif]),{width:r.width,height:r.height,orientation:t.transforms.length?n:null,variants:t.sizes,exif_location:i}}};fD.exports.getMimeType=function(e){var t=String.fromCharCode.apply(null,e.slice(0,4)),r={};r[t]=!0;for(var n=8;n<e.length;n+=4)r[String.fromCharCode.apply(null,e.slice(n,n+4))]=!0;if(!(!r.mif1&&!r.msf1&&!r.miaf))return t==="avif"||t==="avis"||t==="avio"?{type:"avif",mime:"image/avif"}:t==="heic"||t==="heix"?{type:"heic",mime:"image/heic"}:t==="hevc"||t==="hevx"?{type:"heic",mime:"image/heic-sequence"}:r.avif||r.avis?{type:"avif",mime:"image/avif"}:r.heic||r.heix||r.hevc||r.hevx||r.heis?r.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}});var dD=ye((Udr,vW)=>{"use strict";function hD(e,t){var r=new Error(e);return r.code=t,r}function Akt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function $y(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!=="II*\0"&&n!=="MM\0*")throw hD("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}$y.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};$y.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw hD("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};$y.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw hD("unexpected EOF","EBADDATA");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};$y.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};$y.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};$y.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};$y.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var i=0;i<n;i++){var a=this.read_uint16(t),o=this.read_uint16(t+2),s=this.read_uint32(t+4),l=this.exif_format_length(o),u=s*l,c=u<=4?t+8:this.read_uint32(t+8),f=!1;if(c+u>this.input.length)throw hD("unexpected EOF","EBADDATA");for(var h=[],d=c,v=0;v<s;v++,d+=l){var m=this.exif_format_read(o,d);if(m===null){h=null;break}h.push(m)}Array.isArray(h)&&o===2&&(h=Akt(String.fromCharCode.apply(null,h)),h&&h[h.length-1]==="\0"&&(h=h.slice(0,-1))),this.is_subifd_link(e,a)&&Array.isArray(h)&&Number.isInteger(h[0])&&h[0]>0&&(this.ifds_to_read.push({id:a,offset:h[0]}),f=!0);var b={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:h,is_subifd_link:f};if(r(b)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};vW.exports.ExifParser=$y;vW.exports.get_orientation=function(e){var t=0;try{return new $y(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var J4e=ye((Vdr,K4e)=>{"use strict";var Skt=rc().str2arr,Mkt=rc().sliceEq,Ekt=rc().readUInt32BE,vD=Y4e(),kkt=dD(),Ckt=Skt("ftyp");K4e.exports=function(e){if(Mkt(e,4,Ckt)){var t=vD.unbox(e,0);if(t){var r=vD.getMimeType(t.data);if(r){for(var n,i=t.end;;){var a=vD.unbox(e,i);if(!a)break;if(i=a.end,a.boxtype==="mdat")return;if(a.boxtype==="meta"){n=a.data;break}}if(n){var o=vD.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=Ekt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=kkt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var eEe=ye((Gdr,Q4e)=>{"use strict";var Lkt=rc().str2arr,Pkt=rc().sliceEq,$4e=rc().readUInt16LE,Ikt=Lkt("BM");Q4e.exports=function(e){if(!(e.length<26)&&Pkt(e,0,Ikt))return{width:$4e(e,18),height:$4e(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var aEe=ye((Hdr,nEe)=>{"use strict";var iEe=rc().str2arr,tEe=rc().sliceEq,rEe=rc().readUInt16LE,Rkt=iEe("GIF87a"),Dkt=iEe("GIF89a");nEe.exports=function(e){if(!(e.length<10)&&!(!tEe(e,0,Rkt)&&!tEe(e,0,Dkt)))return{width:rEe(e,6),height:rEe(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var lEe=ye((jdr,sEe)=>{"use strict";var pW=rc().readUInt16LE,Fkt=0,zkt=1,oEe=16;sEe.exports=function(e){var t=pW(e,0),r=pW(e,2),n=pW(e,4);if(!(t!==Fkt||r!==zkt||!n)){for(var i=[],a={width:0,height:0},o=0;o<n;o++){var s=e[6+oEe*o]||256,l=e[6+oEe*o+1]||256,u={width:s,height:l};i.push(u),(s>a.width||l>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:i,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var cEe=ye((Wdr,uEe)=>{"use strict";var gW=rc().readUInt16BE,qkt=rc().str2arr,Okt=rc().sliceEq,Bkt=dD(),Nkt=qkt("Exif\0\0");uEe.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(208<=r&&r<=217||r===1)n=0;else if(192<=r&&r<=254){if(e.length-t<2)return;n=gW(e,t)-2,t+=2}else return;if(r===217||r===218)return;var i;if(r===225&&n>=10&&Okt(e,t,Nkt)&&(i=Bkt.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t<n)return;var a={width:gW(e,t+3),height:gW(e,t+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return i>0&&(a.orientation=i),a}t+=n}}});var pEe=ye((Xdr,vEe)=>{"use strict";var dEe=rc().str2arr,fEe=rc().sliceEq,hEe=rc().readUInt32BE,Ukt=dEe(`\x89PNG\r
|
||
|
||
`),Vkt=dEe("IHDR");vEe.exports=function(e){if(!(e.length<24)&&fEe(e,0,Ukt)&&fEe(e,12,Vkt))return{width:hEe(e,16),height:hEe(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var yEe=ye((Zdr,mEe)=>{"use strict";var Gkt=rc().str2arr,Hkt=rc().sliceEq,gEe=rc().readUInt32BE,jkt=Gkt("8BPS\0");mEe.exports=function(e){if(!(e.length<22)&&Hkt(e,0,jkt))return{width:gEe(e,18),height:gEe(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var bEe=ye((Ydr,xEe)=>{"use strict";function Wkt(e){return e===32||e===9||e===13||e===10}function EA(e){return typeof e=="number"&&isFinite(e)&&e>0}function Xkt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t<r&&Wkt(e[t]);)t++;return t===r?!1:e[t]===60}var Zkt=/<[-_.:a-zA-Z0-9][^>]*>/,Ykt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,Kkt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,Jkt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,$kt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,_Ee=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function Qkt(e){var t=e.match(Kkt),r=e.match(Jkt),n=e.match($kt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Xm(e){return _Ee.test(e)?e.match(_Ee)[0]:"px"}xEe.exports=function(e){if(Xkt(e)){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);var n=(t.match(Zkt)||[""])[0];if(Ykt.test(n)){var i=Qkt(n),a=parseFloat(i.width),o=parseFloat(i.height);if(i.width&&i.height)return!EA(a)||!EA(o)?void 0:{width:a,height:o,type:"svg",mime:"image/svg+xml",wUnits:Xm(i.width),hUnits:Xm(i.height)};var s=(i.viewbox||"").split(" "),l={width:s[2],height:s[3]},u=parseFloat(l.width),c=parseFloat(l.height);if(!(!EA(u)||!EA(c))&&Xm(l.width)===Xm(l.height)){var f=u/c;return i.width?EA(a)?{width:a,height:a/f,type:"svg",mime:"image/svg+xml",wUnits:Xm(i.width),hUnits:Xm(i.width)}:void 0:i.height?EA(o)?{width:o*f,height:o,type:"svg",mime:"image/svg+xml",wUnits:Xm(i.height),hUnits:Xm(i.height)}:void 0:{width:u,height:c,type:"svg",mime:"image/svg+xml",wUnits:Xm(l.width),hUnits:Xm(l.height)}}}}}});var MEe=ye((Kdr,SEe)=>{"use strict";var AEe=rc().str2arr,wEe=rc().sliceEq,eCt=rc().readUInt16LE,tCt=rc().readUInt16BE,rCt=rc().readUInt32LE,iCt=rc().readUInt32BE,nCt=AEe("II*\0"),aCt=AEe("MM\0*");function pD(e,t,r){return r?tCt(e,t):eCt(e,t)}function mW(e,t,r){return r?iCt(e,t):rCt(e,t)}function TEe(e,t,r){var n=pD(e,t+2,r),i=mW(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?pD(e,t+8,r):mW(e,t+8,r)}SEe.exports=function(e){if(!(e.length<8)&&!(!wEe(e,0,nCt)&&!wEe(e,0,aCt))){var t=e[0]===77,r=mW(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=pD(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n<i))){var a,o,s,l;for(a=0;a<i;a+=12)l=pD(e,n+a,t),l===256?o=TEe(e,n+a,t):l===257&&(s=TEe(e,n+a,t));if(o&&s)return{width:o,height:s,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}});var PEe=ye((Jdr,LEe)=>{"use strict";var CEe=rc().str2arr,EEe=rc().sliceEq,kEe=rc().readUInt16LE,yW=rc().readUInt32LE,oCt=dD(),sCt=CEe("RIFF"),lCt=CEe("WEBP");function uCt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:kEe(e,t+6)&16383,height:kEe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function cCt(e,t){if(e[t]===47){var r=yW(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function fCt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<<t|e[t+8]<<8|e[t+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}LEe.exports=function(e){if(!(e.length<16)&&!(!EEe(e,0,sCt)&&!EEe(e,8,lCt))){var t=12,r=null,n=0,i=yW(e,4)+8;if(!(i>e.length)){for(;t+8<i;){if(e[t]===0){t++;continue}var a=String.fromCharCode.apply(null,e.slice(t,t+4)),o=yW(e,t+4);a==="VP8 "&&o>=10?r=r||uCt(e,t+8):a==="VP8L"&&o>=9?r=r||cCt(e,t+8):a==="VP8X"&&o>=10?r=r||fCt(e,t+8):a==="EXIF"&&(n=oCt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var REe=ye(($dr,IEe)=>{"use strict";IEe.exports={avif:J4e(),bmp:eEe(),gif:aEe(),ico:lEe(),jpeg:cEe(),png:pEe(),psd:yEe(),svg:bEe(),tiff:MEe(),webp:PEe()}});var DEe=ye((Qdr,xW)=>{"use strict";var _W=REe();function hCt(e){for(var t=Object.keys(_W),r=0;r<t.length;r++){var n=_W[t[r]](e);if(n)return n}return null}xW.exports=function(t){return hCt(t)};xW.exports.parsers=_W});var zEe=ye(FEe=>{"use strict";var dCt=DEe(),vCt=qy().IMAGE_URL_PREFIX,pCt=_2().Buffer;FEe.getImageSize=function(e){var t=e.replace(vCt,""),r=new pCt(t,"base64");return dCt(r)}});var BEe=ye((tvr,OEe)=>{"use strict";var qEe=Pr(),gCt=eA(),mCt=Eo(),gD=ho(),yCt=Pr().maxRowLength,_Ct=zEe().getImageSize;OEe.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=yCt(r.z);else if(r._hasSource){var a=_Ct(r.source);n=a.height,i=a.width}var o=gD.getFromId(t,r.xaxis||"x"),s=gD.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+i*r.dx],h=[u,u+n*r.dy];if(o&&o.type==="log")for(c=0;c<i;c++)f.push(l+c*r.dx);if(s&&s.type==="log")for(c=0;c<n;c++)h.push(u+c*r.dy);r._extremes[o._id]=gD.findExtremes(o,f),r._extremes[s._id]=gD.findExtremes(s,h),r._scaler=wCt(r);var d={x0:l,y0:u,z:r.z,w:i,h:n};return[d]};function xCt(e,t,r,n){return function(i){return qEe.constrain((i-e)*t,r,n)}}function bCt(e,t){return function(r){return qEe.constrain(r,e,t)}}function wCt(e){var t=gCt.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(xCt(e.zmin[i],(t.max[i]-t.min[i])/(e.zmax[i]-e.zmin[i]),t.min[i],t.max[i])):e._sArray.push(bCt(t.min[i],t.max[i]));return function(a){for(var o=a.slice(0,n),s=0;s<n;s++){var l=o[s];if(!mCt(l))return!1;o[s]=e._sArray[s](l)}return o}}});var VEe=ye((rvr,UEe)=>{"use strict";var TCt=qa(),R2=Pr(),NEe=R2.strTranslate,ACt=Wp(),SCt=eA(),MCt=oG(),ECt=g8().STYLE;UEe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&MCt();R2.makeTraceGroups(i,n,"im").each(function(l){var u=TCt.select(this),c=l[0],f=c.trace,h=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&a.type==="linear"&&o.type==="linear";f._realImage=h;var d=c.z,v=c.x0,m=c.y0,b=c.w,p=c.h,k=f.dx,M=f.dy,T,L,x,C,S,g;for(g=0;T===void 0&&g<b;)T=a.c2p(v+g*k),g++;for(g=b;L===void 0&&g>0;)L=a.c2p(v+g*k),g--;for(g=0;C===void 0&&g<p;)C=o.c2p(m+g*M),g++;for(g=p;S===void 0&&g>0;)S=o.c2p(m+g*M),g--;if(L<T&&(x=L,L=T,T=x),S<C&&(x=C,C=S,S=x),!h){var P=.5;T=Math.max(-P*a._length,T),L=Math.min((1+P)*a._length,L),C=Math.max(-P*o._length,C),S=Math.min((1+P)*o._length,S)}var E=Math.round(L-T),z=Math.round(S-C),q=E<=0||z<=0;if(q){var U=u.selectAll("image").data([]);U.exit().remove();return}function G(ge){var ie=document.createElement("canvas");ie.width=E,ie.height=z;var Se=ie.getContext("2d",{willReadFrequently:!0}),Ee=function(st){return R2.constrain(Math.round(a.c2p(v+st*k)-T),0,E)},we=function(st){return R2.constrain(Math.round(o.c2p(m+st*M)-C),0,z)},De=SCt.colormodel[f.colormodel],Le=De.colormodel||f.colormodel,me=De.fmt,Pe;for(g=0;g<c.w;g++){var ce=Ee(g),He=Ee(g+1);if(!(He===ce||isNaN(He)||isNaN(ce)))for(var lt=0;lt<c.h;lt++){var mt=we(lt),Vt=we(lt+1);Vt===mt||isNaN(Vt)||isNaN(mt)||!ge(g,lt)||(Pe=f._scaler(ge(g,lt)),Pe?Se.fillStyle=Le+"("+me(Pe).join(",")+")":Se.fillStyle="rgba(0,0,0,0)",Se.fillRect(ce,mt,He-ce,Vt-mt))}}return ie}var Z=u.selectAll("image").data([l]);Z.enter().append("svg:image").attr({xmlns:ACt.svg,preserveAspectRatio:"none"}),Z.exit().remove();var j=f.zsmooth===!1?ECt:"";if(h){var N=R2.simpleMap(a.range,a.r2l),H=R2.simpleMap(o.range,o.r2l),re=N[1]<N[0],oe=H[1]>H[0];if(re||oe){var _e=T+E/2,ke=C+z/2;j+="transform:"+NEe(_e+"px",ke+"px")+"scale("+(re?-1:1)+","+(oe?-1:1)+")"+NEe(-_e+"px",-ke+"px")+";"}}Z.attr("style",j);var Ce=new Promise(function(ge){if(f._hasZ)ge();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===b&&f._canvas.el.height===p&&f._canvas.source===f.source)ge();else{var ie=document.createElement("canvas");ie.width=b,ie.height=p;var Se=ie.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var Ee=f._image;Ee.onload=function(){Se.drawImage(Ee,0,0),f._canvas={el:ie,source:f.source},ge()},Ee.setAttribute("src",f.source)}}).then(function(){var ge,ie;if(f._hasZ)ie=G(function(we,De){var Le=d[De][we];return R2.isTypedArray(Le)&&(Le=Array.from(Le)),Le}),ge=ie.toDataURL("image/png");else if(f._hasSource)if(h)ge=f.source;else{var Se=f._canvas.el.getContext("2d",{willReadFrequently:!0}),Ee=Se.getImageData(0,0,b,p).data;ie=G(function(we,De){var Le=4*(De*b+we);return[Ee[Le],Ee[Le+1],Ee[Le+2],Ee[Le+3]]}),ge=ie.toDataURL("image/png")}Z.attr({"xlink:href":ge,height:z,width:E,x:T,y:C})});t._promises.push(Ce)})}});var HEe=ye((ivr,GEe)=>{"use strict";var kCt=qa();GEe.exports=function(t){kCt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var ZEe=ye((nvr,XEe)=>{"use strict";var jEe=vf(),WEe=Pr(),mD=WEe.isArrayOrTypedArray,CCt=eA();XEe.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(jEe.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||jEe.inbox(n-i.y0,n-(i.y0+i.h*a.dy),0)>0)){var l=Math.floor((r-i.x0)/a.dx),u=Math.floor(Math.abs(n-i.y0)/a.dy),c;if(a._hasZ?c=i.z[u][l]:a._hasSource&&(c=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=i.hi||a.hoverinfo,h;if(f){var d=f.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(h=!0)}var v=CCt.colormodel[a.colormodel],m=v.colormodel||a.colormodel,b=m.length,p=a._scaler(c),k=v.suffix,M=[];(a.hovertemplate||h)&&(M.push("["+[p[0]+k[0],p[1]+k[1],p[2]+k[2]].join(", ")),b===4&&M.push(", "+p[3]+k[3]),M.push("]"),M=M.join(""),t.extraText=m.toUpperCase()+": "+M);var T;mD(a.hovertext)&&mD(a.hovertext[u])?T=a.hovertext[u][l]:mD(a.text)&&mD(a.text[u])&&(T=a.text[u][l]);var L=s.c2p(i.y0+(u+.5)*a.dy),x=i.x0+(l+.5)*a.dx,C=i.y0+(u+.5)*a.dy,S="["+c.slice(0,a.colormodel.length).join(", ")+"]";return[WEe.extendFlat(t,{index:[u,l],x0:o.c2p(i.x0+l*a.dx),x1:o.c2p(i.x0+(l+1)*a.dx),y0:L,y1:L,color:p,xVal:x,xLabelVal:x,yVal:C,yLabelVal:C,zLabelVal:S,text:T,hovertemplateLabels:{zLabel:S,colorLabel:M,"color[0]Label":p[0]+k[0],"color[1]Label":p[1]+k[1],"color[2]Label":p[2]+k[2],"color[3]Label":p[3]+k[3]}})]}}}});var KEe=ye((avr,YEe)=>{"use strict";YEe.exports=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var $Ee=ye((ovr,JEe)=>{"use strict";JEe.exports={attributes:gH(),supplyDefaults:Z3e(),calc:BEe(),plot:VEe(),style:HEe(),hoverPoints:ZEe(),eventData:KEe(),moduleType:"trace",name:"image",basePlotModule:mh(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var eke=ye((svr,QEe)=>{"use strict";QEe.exports=$Ee()});var F2=ye((lvr,rke)=>{"use strict";var bW=Gl(),LCt=Cc().attributes,PCt=ec(),ICt=Ih(),{hovertemplateAttrs:RCt,texttemplateAttrs:DCt,templatefallbackAttrs:tke}=Ll(),D2=Ao().extendFlat,FCt=Pd().pattern,yD=PCt({editType:"plot",arrayOk:!0,colorEditType:"plot"});rke.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:ICt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:FCt,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:D2({},bW.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:RCt({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:tke(),texttemplate:DCt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:tke({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:D2({},yD,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:D2({},yD,{}),outsidetextfont:D2({},yD,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:D2({},bW.showlegend,{arrayOk:!0}),legend:D2({},bW.legend,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:D2({},yD,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:LCt({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}});var z2=ye((uvr,ake)=>{"use strict";var zCt=Eo(),zE=Pr(),qCt=F2(),OCt=Cc().defaults,BCt=i0().handleText,NCt=Pr().coercePattern;function ike(e,t){var r=zE.isArrayOrTypedArray(e),n=zE.isArrayOrTypedArray(t),i=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(i)||(i=0),i&&n){for(var a,o=0;o<i;o++){var s=t[o];if(zCt(s)&&s>0){a=!0;break}}a||(i=0)}return{hasLabels:r,hasValues:n,len:i}}function nke(e,t,r,n,i){var a=n("marker.line.width");a&&n("marker.line.color",i?void 0:r.paper_bgcolor);var o=n("marker.colors");NCt(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 UCt(e,t,r,n){function i(k,M){return zE.coerce(e,t,qCt,k,M)}var a=i("labels"),o=i("values"),s=ike(a,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i("label0"),i("dlabel")),!l){t.visible=!1;return}t._length=l,nke(e,t,n,i,!0),i("scalegroup");var u=i("text"),c=i("texttemplate");i("texttemplatefallback");var f;if(c||(f=i("textinfo",zE.isArrayOrTypedArray(u)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),c||f&&f!=="none"){var h=i("textposition");BCt(e,t,n,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",v=d||h==="outside";v&&i("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&i("insidetextorientation")}else f==="none"&&i("textposition","none");OCt(t,n,i);var m=i("hole"),b=i("title.text");if(b){var p=i("title.position",m?"middle center":"top center");!m&&p==="middle center"&&(t.title.position="top center"),zE.coerceFont(i,"title.font",n.font)}i("sort"),i("direction"),i("rotation"),i("pull")}ake.exports={handleLabelsAndValues:ike,handleMarkerDefaults:nke,supplyDefaults:UCt}});var _D=ye((cvr,oke)=>{"use strict";oke.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var lke=ye((fvr,ske)=>{"use strict";var VCt=Pr(),GCt=_D();ske.exports=function(t,r){function n(i,a){return VCt.coerce(t,r,GCt,i,a)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var kA=ye((hvr,fke)=>{"use strict";var HCt=Eo(),wW=fd(),jCt=ka(),WCt={};function XCt(e,t){var r=[],n=e._fullLayout,i=n.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(a=new Array(l),c=0;c<l;c++)a[c]=String(t.label0+c*t.dlabel);var h={},d=uke(n["_"+t.type+"colormap"]),v=0,m=!1;for(c=0;c<l;c++){var b,p,k;if(u){if(b=s[c],!HCt(b))continue;b=+b}else b=1;p=a[c],(p===void 0||p==="")&&(p=c),p=String(p);var M=h[p];M===void 0?(h[p]=r.length,k=i.indexOf(p)!==-1,k||(v+=b),r.push({v:b,label:p,color:d(o[c],p),i:c,pts:[c],hidden:k})):(m=!0,f=r[M],f.v+=b,f.pts.push(c),f.hidden||(v+=b),f.color===!1&&o[c]&&(f.color=d(o[c],p)))}r=r.filter(function(L){return L.v>=0});var T=t.type==="funnelarea"?m:t.sort;return T&&r.sort(function(L,x){return x.v-L.v}),r[0]&&(r[0].vTotal=v),r}function uke(e){return function(r,n){return!r||(r=wW(r),!r.isValid())?!1:(r=jCt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function ZCt(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,i=e.calcdata,a=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(a=cke(a,WCt));for(var s=0,l=0;l<i.length;l++){var u=i[l],c=u[0].trace.type;if(c===r)for(var f=0;f<u.length;f++){var h=u[f];h.color===!1&&(o[h.label]?h.color=o[h.label]:(o[h.label]=h.color=a[s%a.length],s++))}}}function cke(e,t){var r,n=JSON.stringify(e),i=t[n];if(!i){for(i=e.slice(),r=0;r<e.length;r++)i.push(wW(e[r]).lighten(20).toHexString());for(r=0;r<e.length;r++)i.push(wW(e[r]).darken(20).toHexString());t[n]=i}return i}fke.exports={calc:XCt,crossTraceCalc:ZCt,makePullColorFn:uke,generateExtendedColors:cke}});var dke=ye((dvr,hke)=>{"use strict";var YCt=ip().appendArrayMultiPointValues;hke.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),YCt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var TD=ye((vvr,Dke)=>{"use strict";var Fp=qa(),KCt=Mc(),xD=vf(),_ke=ka(),Qy=So(),rv=Pr(),JCt=rv.strScale,vke=rv.strTranslate,TW=Zl(),xke=bv(),$Ct=xke.recordMinTextSize,QCt=xke.clearMinTextSize,bke=A_().TEXTPAD,ns=g_(),bD=dke(),pke=Pr().isValidTextValue;function e6t(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;QCt("pie",n),Ake(t,e),Pke(t,i);var a=rv.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=Fp.select(this),l=o[0],u=l.trace;u6t(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=Fp.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(T,L){if(T.hidden){Fp.select(this).selectAll("path,g").remove();return}T.pointNumber=T.i,T.curveNumber=u.index,f[T.pxmid[1]<0?0:1][T.pxmid[0]<0?0:1].push(T);var x=l.cx,C=l.cy,S=Fp.select(this),g=S.selectAll("path.surface").data([T]);if(g.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),S.call(wke,e,o),u.pull){var P=+ns.castOption(u.pull,T.pts)||0;P>0&&(x+=P*T.pxmid[0],C+=P*T.pxmid[1])}T.cxFinal=x,T.cyFinal=C;function E(N,H,re,oe){var _e=oe*(H[0]-N[0]),ke=oe*(H[1]-N[1]);return"a"+oe*l.r+","+oe*l.r+" 0 "+T.largeArc+(re?" 1 ":" 0 ")+_e+","+ke}var z=u.hole;if(T.v===l.vTotal){var q="M"+(x+T.px0[0])+","+(C+T.px0[1])+E(T.px0,T.pxmid,!0,1)+E(T.pxmid,T.px0,!0,1)+"Z";z?g.attr("d","M"+(x+z*T.px0[0])+","+(C+z*T.px0[1])+E(T.px0,T.pxmid,!1,z)+E(T.pxmid,T.px0,!1,z)+"Z"+q):g.attr("d",q)}else{var U=E(T.px0,T.px1,!0,1);if(z){var G=1-z;g.attr("d","M"+(x+z*T.px1[0])+","+(C+z*T.px1[1])+E(T.px1,T.px0,!1,z)+"l"+G*T.px0[0]+","+G*T.px0[1]+U+"Z")}else g.attr("d","M"+x+","+C+"l"+T.px0[0]+","+T.px0[1]+U+"Z")}Ike(e,T,l);var Z=ns.castOption(u.textposition,T.pts),j=S.selectAll("g.slicetext").data(T.text&&Z!=="none"?[0]:[]);j.enter().append("g").classed("slicetext",!0),j.exit().remove(),j.each(function(){var N=rv.ensureSingle(Fp.select(this),"text","",function(ie){ie.attr("data-notex",1)}),H=rv.ensureUniformFontSize(e,Z==="outside"?r6t(u,T,n.font):Tke(u,T,n.font));N.text(T.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Qy.font,H).call(TW.convertToTspans,e);var re=Qy.bBox(N.node()),oe;if(Z==="outside")oe=yke(re,T);else if(oe=Ske(re,T,l),Z==="auto"&&oe.scale<1){var _e=rv.ensureUniformFontSize(e,u.outsidetextfont);N.call(Qy.font,_e),re=Qy.bBox(N.node()),oe=yke(re,T)}var ke=oe.textPosAngle,Ce=ke===void 0?T.pxmid:wD(l.r,ke);if(oe.targetX=x+Ce[0]*oe.rCenter+(oe.x||0),oe.targetY=C+Ce[1]*oe.rCenter+(oe.y||0),Rke(oe,re),oe.outside){var ge=oe.targetY;T.yLabelMin=ge-re.height/2,T.yLabelMid=ge,T.yLabelMax=ge+re.height/2,T.labelExtraX=0,T.labelExtraY=0,h=!0}oe.fontSize=H.size,$Ct(u.type,oe,n),o[L].transform=oe,rv.setTransormAndDisplay(N,oe)})});var d=Fp.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(d.enter().append("g").classed("titletext",!0),d.exit().remove(),d.each(function(){var T=rv.ensureSingle(Fp.select(this),"text","",function(C){C.attr("data-notex",1)}),L=u.title.text;u._meta&&(L=rv.templateString(L,u._meta)),T.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Qy.font,u.title.font).call(TW.convertToTspans,e);var x;u.title.position==="middle center"?x=a6t(l):x=Cke(l,i),T.attr("transform",vke(x.x,x.y)+JCt(Math.min(1,x.scale))+vke(x.tx,x.ty))}),h&&s6t(f,u),t6t(c,u),h&&u.automargin){var v=Qy.bBox(s.node()),m=u.domain,b=i.w*(m.x[1]-m.x[0]),p=i.h*(m.y[1]-m.y[0]),k=(.5*b-l.r)/i.w,M=(.5*p-l.r)/i.h;KCt.autoMargin(e,"pie."+u.uid+".automargin",{xl:m.x[0]-k,xr:m.x[1]+k,yb:m.y[0]-M,yt:m.y[1]+M,l:Math.max(l.cx-l.r-v.left,0),r:Math.max(v.right-(l.cx+l.r),0),b:Math.max(v.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-v.top,0),pad:5})}})});setTimeout(function(){a.selectAll("tspan").each(function(){var o=Fp.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function t6t(e,t){e.each(function(r){var n=Fp.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select("path.textline").remove();return}var i=n.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,rv.setTransormAndDisplay(i,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+a+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(a+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;rv.ensureSingle(n,"path","textline").call(_ke.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function wke(e,t,r){var n=r[0],i=n.cx,a=n.cy,o=n.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=xD.castHoverinfo({hoverinfo:[ns.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var h=l.rInscribed||0,d=i+l.pxmid[0]*(1-h),v=a+l.pxmid[1]*(1-h),m=u.separators,b=[];if(f&&f.indexOf("label")!==-1&&b.push(l.label),l.text=ns.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var p=l.text;rv.isValidTextValue(p)&&b.push(p)}l.value=l.v,l.valueLabel=ns.formatPieValue(l.v,m),f&&f.indexOf("value")!==-1&&b.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=ns.formatPiePercent(l.percent,m),f&&f.indexOf("percent")!==-1&&b.push(l.percentLabel);var k=c.hoverlabel,M=k.font,T=[];xD.loneHover({trace:o,x0:d-h*n.r,x1:d+h*n.r,y:v,_x0:s?i+l.TL[0]:d-h*n.r,_x1:s?i+l.TR[0]:d+h*n.r,_y0:s?a+l.TL[1]:v-h*n.r,_y1:s?a+l.BL[1]:v+h*n.r,text:b.join("<br>"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:ns.castOption(k.bgcolor,l.pts)||l.color,borderColor:ns.castOption(k.bordercolor,l.pts),fontFamily:ns.castOption(M.family,l.pts),fontSize:ns.castOption(M.size,l.pts),fontColor:ns.castOption(M.color,l.pts),nameLength:ns.castOption(k.namelength,l.pts),textAlign:ns.castOption(k.align,l.pts),hovertemplate:ns.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[bD(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:T}),l.bbox=T[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[bD(l,c)],event:Fp.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=Fp.select(this).datum();o._hasHoverEvent&&(l.originalEvent=Fp.event,t.emit("plotly_unhover",{points:[bD(f,c)],event:Fp.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(xD.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[bD(l,c)],xD.click(t,Fp.event))})}function r6t(e,t,r){var n=ns.castOption(e.outsidetextfont.color,t.pts)||ns.castOption(e.textfont.color,t.pts)||r.color,i=ns.castOption(e.outsidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.outsidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.outsidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.outsidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.outsidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.outsidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.outsidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.outsidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function Tke(e,t,r){var n=ns.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=ns.castOption(e._input.textfont.color,t.pts));var i=ns.castOption(e.insidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.insidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.insidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.insidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.insidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.insidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.insidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.insidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||_ke.contrast(t.color),family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function Ake(e,t){for(var r,n,i=0;i<e.length;i++)if(r=e[i][0],n=r.trace,n.title.text){var a=n.title.text;n._meta&&(a=rv.templateString(a,n._meta));var o=Qy.tester.append("text").attr("data-notex",1).text(a).call(Qy.font,n.title.font).call(TW.convertToTspans,t),s=Qy.bBox(o.node(),!0);r.titleBox={width:s.width,height:s.height},o.remove()}}function Ske(e,t,r){var n=r.r||t.rpx1,i=t.rInscribed,a=t.startangle===t.stopangle;if(a)return{rCenter:1-i,scale:0,rotate:0,textPosAngle:0};var o=t.ring,s=o===1&&Math.abs(t.startangle-t.stopangle)===Math.PI*2,l=t.halfangle,u=t.midangle,c=r.trace.insidetextorientation,f=c==="horizontal",h=c==="tangential",d=c==="radial",v=c==="auto",m=[],b;if(!v){var p=function(S,g){if(i6t(t,S)){var P=Math.abs(S-t.startangle),E=Math.abs(S-t.stopangle),z=P<E?P:E;g==="tan"?b=mke(e,n,o,z,0):b=gke(e,n,o,z,Math.PI/2),b.textPosAngle=S,m.push(b)}},k;if(f||h){for(k=4;k>=-4;k-=2)p(Math.PI*k,"tan");for(k=4;k>=-4;k-=2)p(Math.PI*(k+1),"tan")}if(f||d){for(k=4;k>=-4;k-=2)p(Math.PI*(k+1.5),"rad");for(k=4;k>=-4;k-=2)p(Math.PI*(k+.5),"rad")}}if(s||v||f){var M=Math.sqrt(e.width*e.width+e.height*e.height);if(b={scale:i*n*2/M,rCenter:1-i,rotate:0},b.textPosAngle=(t.startangle+t.stopangle)/2,b.scale>=1)return b;m.push(b)}(v||d)&&(b=gke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,m.push(b)),(v||h)&&(b=mke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,m.push(b));for(var T=0,L=0,x=0;x<m.length;x++){var C=m[x].scale;if(L<C&&(L=C,T=x),!v&&L>=1)break}return m[T]}function i6t(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r<t&&t<n}function gke(e,t,r,n,i){t=Math.max(0,t-2*bke);var a=e.width/e.height,o=kke(a,n,t,r);return{scale:o*2/e.height,rCenter:Mke(a,o/t),rotate:Eke(i)}}function mke(e,t,r,n,i){t=Math.max(0,t-2*bke);var a=e.height/e.width,o=kke(a,n,t,r);return{scale:o*2/e.width,rCenter:Mke(a,o/t),rotate:Eke(i+Math.PI/2)}}function Mke(e,t){return Math.cos(t)-e*t}function Eke(e){return(180/Math.PI*e+720)%180-90}function kke(e,t,r,n){var i=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(e*e+n/2)+e))}function n6t(e,t){return e.v===t.vTotal&&!t.trace.hole?1:Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2)}function yke(e,t){var r=t.pxmid[0],n=t.pxmid[1],i=e.width/2,a=e.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function a6t(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function Cke(e,t){var r=1,n=1,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=Lke(a),a.title.position.indexOf("top")!==-1?(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height):a.title.position.indexOf("bottom")!==-1&&(o.y+=(1+i)*e.r);var l=o6t(e.r,e.trace.aspectratio),u=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+i)*l,s.tx+=e.titleBox.width/2):a.title.position.indexOf("center")!==-1?u*=2:a.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+i)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=AW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function o6t(e,t){return e/(t===void 0?1:t)}function AW(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function Lke(e){var t=e.pull;if(!t)return 0;var r;if(rv.isArrayOrTypedArray(t))for(t=0,r=0;r<e.pull.length;r++)e.pull[r]>t&&(t=e.pull[r]);return t}function s6t(e,t){var r,n,i,a,o,s,l,u,c,f,h,d,v;function m(M,T){return M.pxmid[1]-T.pxmid[1]}function b(M,T){return T.pxmid[1]-M.pxmid[1]}function p(M,T){T||(T={});var L=T.labelExtraY+(n?T.yLabelMax:T.yLabelMin),x=n?M.yLabelMin:M.yLabelMax,C=n?M.yLabelMax:M.yLabelMin,S=M.cyFinal+o(M.px0[1],M.px1[1]),g=L-x,P,E,z,q,U,G;if(g*l>0&&(M.labelExtraY=g),!!rv.isArrayOrTypedArray(t.pull))for(E=0;E<f.length;E++)z=f[E],!(z===M||(ns.castOption(t.pull,M.pts)||0)>=(ns.castOption(t.pull,z.pts)||0))&&((M.pxmid[1]-z.pxmid[1])*l>0?(q=z.cyFinal+o(z.px0[1],z.px1[1]),g=q-x-M.labelExtraY,g*l>0&&(M.labelExtraY+=g)):(C+M.labelExtraY-S)*l>0&&(P=3*s*Math.abs(E-f.indexOf(M)),U=z.cxFinal+a(z.px0[0],z.px1[0]),G=U+P-(M.cxFinal+M.pxmid[0])-M.labelExtraX,G*s>0&&(M.labelExtraX+=G)))}for(n=0;n<2;n++)for(i=n?m:b,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,u=e[n][r],u.sort(i),c=e[1-n][r],f=c.concat(u),d=[],h=0;h<u.length;h++)u[h].yLabelMid!==void 0&&d.push(u[h]);for(v=!1,h=0;n&&h<c.length;h++)if(c[h].yLabelMid!==void 0){v=c[h];break}for(h=0;h<d.length;h++){var k=h&&d[h-1];v&&!h&&(k=v),p(d[h],k)}}}function Pke(e,t){for(var r=[],n=0;n<e.length;n++){var i=e[n][0],a=i.trace,o=a.domain,s=t.w*(o.x[1]-o.x[0]),l=t.h*(o.y[1]-o.y[0]);a.title.text&&a.title.position!=="middle center"&&(l-=AW(i,t));var u=s/2,c=l/2;a.type==="funnelarea"&&!a.scalegroup&&(c/=a.aspectratio),i.r=Math.min(u,c)/(1+Lke(a)),i.cx=t.l+t.w*(a.domain.x[1]+a.domain.x[0])/2,i.cy=t.t+t.h*(1-a.domain.y[0])-l/2,a.title.text&&a.title.position.indexOf("bottom")!==-1&&(i.cy-=AW(i,t)),a.scalegroup&&r.indexOf(a.scalegroup)===-1&&r.push(a.scalegroup)}l6t(e,r)}function l6t(e,t){for(var r,n,i,a=0;a<t.length;a++){var o=1/0,s=t[a];for(n=0;n<e.length;n++)if(r=e[n][0],i=r.trace,i.scalegroup===s){var l;if(i.type==="pie")l=r.r*r.r;else if(i.type==="funnelarea"){var u,c;i.aspectratio>1?(u=r.r,c=u/i.aspectratio):(c=r.r,u=c*i.aspectratio),u*=(1+i.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;n<e.length;n++)if(r=e[n][0],i=r.trace,i.scalegroup===s){var f=o*r.vTotal;i.type==="funnelarea"&&(f/=(1+i.baseratio)/2,f/=i.aspectratio),r.r=Math.sqrt(f)}}}function u6t(e){var t=e[0],r=t.r,n=t.trace,i=ns.getRotationAngle(n.rotation),a=2*Math.PI/t.vTotal,o="px0",s="px1",l,u,c;if(n.direction==="counterclockwise"){for(l=0;l<e.length&&e[l].hidden;l++);if(l===e.length)return;i+=a*e[l].v,a*=-1,o="px1",s="px0"}for(c=wD(r,i),l=0;l<e.length;l++)u=e[l],!u.hidden&&(u[o]=c,u.startangle=i,i+=a*u.v/2,u.pxmid=wD(r,i),u.midangle=i,i+=a*u.v/2,c=wD(r,i),u.stopangle=i,u[s]=c,u.largeArc=u.v>t.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=n6t(u,t))}function wD(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function Ike(e,t,r){var n=e._fullLayout,i=r.trace,a=i.texttemplate,o=i.textinfo;if(!a&&o&&o!=="none"){var s=o.split("+"),l=function(T){return s.indexOf(T)!==-1},u=l("label"),c=l("text"),f=l("value"),h=l("percent"),d=n.separators,v;if(v=u?[t.label]:[],c){var m=ns.getFirstFilled(i.text,t.pts);pke(m)&&v.push(m)}f&&v.push(ns.formatPieValue(t.v,d)),h&&v.push(ns.formatPiePercent(t.v/r.vTotal,d)),t.text=v.join("<br>")}function b(T){return{label:T.label,value:T.v,valueLabel:ns.formatPieValue(T.v,n.separators),percent:T.v/r.vTotal,percentLabel:ns.formatPiePercent(T.v/r.vTotal,n.separators),color:T.color,text:T.text,customdata:rv.castOption(i,T.i,"customdata")}}if(a){var p=rv.castOption(i,t.i,"texttemplate");if(!p)t.text="";else{var k=b(t),M=ns.getFirstFilled(i.text,t.pts);(pke(M)||M==="")&&(k.text=M),t.text=rv.texttemplateString({data:[k,i._meta],fallback:i.texttemplatefallback,labels:k,locale:e._fullLayout._d3locale,template:p})}}}function Rke(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*n-o*i,e.textY=a*i+o*n,e.noCenter=!0}Dke.exports={plot:e6t,formatSliceLabel:Ike,transformInsideText:Ske,determineInsideTextFont:Tke,positionTitleOutside:Cke,prerenderTitles:Ake,layoutAreas:Pke,attachFxHandlers:wke,computeTransform:Rke}});var qke=ye((pvr,zke)=>{"use strict";var Fke=qa(),c6t=Z3(),f6t=bv().resizeText;zke.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");f6t(t,r,"pie"),r.each(function(n){var i=n[0],a=i.trace,o=Fke.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){Fke.select(this).call(c6t,s,a,t)})})}});var Bke=ye(CA=>{"use strict";var Oke=Mc();CA.name="pie";CA.plot=function(e,t,r,n){Oke.plotBasePlot(CA.name,e,t,r,n)};CA.clean=function(e,t,r,n){Oke.cleanBasePlot(CA.name,e,t,r,n)}});var Uke=ye((mvr,Nke)=>{"use strict";Nke.exports={attributes:F2(),supplyDefaults:z2().supplyDefaults,supplyLayoutDefaults:lke(),layoutAttributes:_D(),calc:kA().calc,crossTraceCalc:kA().crossTraceCalc,plot:TD().plot,style:qke(),styleOne:Z3(),moduleType:"trace",name:"pie",basePlotModule:Bke(),categories:["pie-like","pie","showLegend"],meta:{}}});var Gke=ye((yvr,Vke)=>{"use strict";Vke.exports=Uke()});var jke=ye(LA=>{"use strict";var Hke=Mc();LA.name="sunburst";LA.plot=function(e,t,r,n){Hke.plotBasePlot(LA.name,e,t,r,n)};LA.clean=function(e,t,r,n){Hke.cleanBasePlot(LA.name,e,t,r,n)}});var SW=ye((xvr,Wke)=>{"use strict";Wke.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var OE=ye((bvr,Yke)=>{"use strict";var h6t=Gl(),{hovertemplateAttrs:d6t,texttemplateAttrs:v6t,templatefallbackAttrs:Xke}=Ll(),p6t=Tu(),g6t=Cc().attributes,e1=F2(),Zke=SW(),qE=Ao().extendFlat,m6t=Pd().pattern;Yke.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:qE({colors:{valType:"data_array",editType:"calc"},line:{color:qE({},e1.marker.line.color,{dflt:null}),width:qE({},e1.marker.line.width,{dflt:1}),editType:"calc"},pattern:m6t,editType:"calc"},p6t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:e1.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:v6t({editType:"plot"},{keys:Zke.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Xke({editType:"plot"}),hovertext:e1.hovertext,hoverinfo:qE({},h6t.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:d6t({},{keys:Zke.eventDataKeys}),hovertemplatefallback:Xke(),textfont:e1.textfont,insidetextorientation:e1.insidetextorientation,insidetextfont:e1.insidetextfont,outsidetextfont:qE({},e1.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:e1.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:g6t({name:"sunburst",trace:!0,editType:"calc"})}});var MW=ye((wvr,Kke)=>{"use strict";Kke.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var eCe=ye((Tvr,Qke)=>{"use strict";var Jke=Pr(),y6t=OE(),_6t=Cc().defaults,x6t=i0().handleText,b6t=z2().handleMarkerDefaults,$ke=tc(),w6t=$ke.hasColorscale,T6t=$ke.handleDefaults;Qke.exports=function(t,r,n,i){function a(h,d){return Jke.coerce(t,r,y6t,h,d)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),b6t(t,r,i,a);var u=r._hasColorscale=w6t(t,"marker","colors")||(t.marker||{}).coloraxis;u&&T6t(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",u?1:.7);var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",Jke.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f="auto";x6t(t,r,i,a,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),_6t(r,i,a),r._length=null}});var rCe=ye((Avr,tCe)=>{"use strict";var A6t=Pr(),S6t=MW();tCe.exports=function(t,r){function n(i,a){return A6t.coerce(t,r,S6t,i,a)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var BE=ye((AD,iCe)=>{(function(e,t){typeof AD=="object"&&typeof iCe!="undefined"?t(AD):(e=e||self,t(e.d3=e.d3||{}))})(AD,function(e){"use strict";function t(We,et){return We.parent===et.parent?1:2}function r(We){return We.reduce(n,0)/We.length}function n(We,et){return We+et.x}function i(We){return 1+We.reduce(a,0)}function a(We,et){return Math.max(We,et.y)}function o(We){for(var et;et=We.children;)We=et[0];return We}function s(We){for(var et;et=We.children;)We=et[et.length-1];return We}function l(){var We=t,et=1,xt=1,At=!1;function Kt(er){var Sr,Gr=0;er.eachAfter(function(ai){var mi=ai.children;mi?(ai.x=r(mi),ai.y=i(mi)):(ai.x=Sr?Gr+=We(ai,Sr):0,ai.y=0,Sr=ai)});var Ir=o(er),Yr=s(er),_i=Ir.x-We(Ir,Yr)/2,Pi=Yr.x+We(Yr,Ir)/2;return er.eachAfter(At?function(ai){ai.x=(ai.x-er.x)*et,ai.y=(er.y-ai.y)*xt}:function(ai){ai.x=(ai.x-_i)/(Pi-_i)*et,ai.y=(1-(er.y?ai.y/er.y:1))*xt})}return Kt.separation=function(er){return arguments.length?(We=er,Kt):We},Kt.size=function(er){return arguments.length?(At=!1,et=+er[0],xt=+er[1],Kt):At?null:[et,xt]},Kt.nodeSize=function(er){return arguments.length?(At=!0,et=+er[0],xt=+er[1],Kt):At?[et,xt]:null},Kt}function u(We){var et=0,xt=We.children,At=xt&&xt.length;if(!At)et=1;else for(;--At>=0;)et+=xt[At].value;We.value=et}function c(){return this.eachAfter(u)}function f(We){var et=this,xt,At=[et],Kt,er,Sr;do for(xt=At.reverse(),At=[];et=xt.pop();)if(We(et),Kt=et.children,Kt)for(er=0,Sr=Kt.length;er<Sr;++er)At.push(Kt[er]);while(At.length);return this}function h(We){for(var et=this,xt=[et],At,Kt;et=xt.pop();)if(We(et),At=et.children,At)for(Kt=At.length-1;Kt>=0;--Kt)xt.push(At[Kt]);return this}function d(We){for(var et=this,xt=[et],At=[],Kt,er,Sr;et=xt.pop();)if(At.push(et),Kt=et.children,Kt)for(er=0,Sr=Kt.length;er<Sr;++er)xt.push(Kt[er]);for(;et=At.pop();)We(et);return this}function v(We){return this.eachAfter(function(et){for(var xt=+We(et.data)||0,At=et.children,Kt=At&&At.length;--Kt>=0;)xt+=At[Kt].value;et.value=xt})}function m(We){return this.eachBefore(function(et){et.children&&et.children.sort(We)})}function b(We){for(var et=this,xt=p(et,We),At=[et];et!==xt;)et=et.parent,At.push(et);for(var Kt=At.length;We!==xt;)At.splice(Kt,0,We),We=We.parent;return At}function p(We,et){if(We===et)return We;var xt=We.ancestors(),At=et.ancestors(),Kt=null;for(We=xt.pop(),et=At.pop();We===et;)Kt=We,We=xt.pop(),et=At.pop();return Kt}function k(){for(var We=this,et=[We];We=We.parent;)et.push(We);return et}function M(){var We=[];return this.each(function(et){We.push(et)}),We}function T(){var We=[];return this.eachBefore(function(et){et.children||We.push(et)}),We}function L(){var We=this,et=[];return We.each(function(xt){xt!==We&&et.push({source:xt.parent,target:xt})}),et}function x(We,et){var xt=new E(We),At=+We.value&&(xt.value=We.value),Kt,er=[xt],Sr,Gr,Ir,Yr;for(et==null&&(et=S);Kt=er.pop();)if(At&&(Kt.value=+Kt.data.value),(Gr=et(Kt.data))&&(Yr=Gr.length))for(Kt.children=new Array(Yr),Ir=Yr-1;Ir>=0;--Ir)er.push(Sr=Kt.children[Ir]=new E(Gr[Ir])),Sr.parent=Kt,Sr.depth=Kt.depth+1;return xt.eachBefore(P)}function C(){return x(this).eachBefore(g)}function S(We){return We.children}function g(We){We.data=We.data.data}function P(We){var et=0;do We.height=et;while((We=We.parent)&&We.height<++et)}function E(We){this.data=We,this.depth=this.height=0,this.parent=null}E.prototype=x.prototype={constructor:E,count:c,each:f,eachAfter:d,eachBefore:h,sum:v,sort:m,path:b,ancestors:k,descendants:M,leaves:T,links:L,copy:C};var z=Array.prototype.slice;function q(We){for(var et=We.length,xt,At;et;)At=Math.random()*et--|0,xt=We[et],We[et]=We[At],We[At]=xt;return We}function U(We){for(var et=0,xt=(We=q(z.call(We))).length,At=[],Kt,er;et<xt;)Kt=We[et],er&&j(er,Kt)?++et:(er=H(At=G(At,Kt)),et=0);return er}function G(We,et){var xt,At;if(N(et,We))return[et];for(xt=0;xt<We.length;++xt)if(Z(et,We[xt])&&N(oe(We[xt],et),We))return[We[xt],et];for(xt=0;xt<We.length-1;++xt)for(At=xt+1;At<We.length;++At)if(Z(oe(We[xt],We[At]),et)&&Z(oe(We[xt],et),We[At])&&Z(oe(We[At],et),We[xt])&&N(_e(We[xt],We[At],et),We))return[We[xt],We[At],et];throw new Error}function Z(We,et){var xt=We.r-et.r,At=et.x-We.x,Kt=et.y-We.y;return xt<0||xt*xt<At*At+Kt*Kt}function j(We,et){var xt=We.r-et.r+1e-6,At=et.x-We.x,Kt=et.y-We.y;return xt>0&&xt*xt>At*At+Kt*Kt}function N(We,et){for(var xt=0;xt<et.length;++xt)if(!j(We,et[xt]))return!1;return!0}function H(We){switch(We.length){case 1:return re(We[0]);case 2:return oe(We[0],We[1]);case 3:return _e(We[0],We[1],We[2])}}function re(We){return{x:We.x,y:We.y,r:We.r}}function oe(We,et){var xt=We.x,At=We.y,Kt=We.r,er=et.x,Sr=et.y,Gr=et.r,Ir=er-xt,Yr=Sr-At,_i=Gr-Kt,Pi=Math.sqrt(Ir*Ir+Yr*Yr);return{x:(xt+er+Ir/Pi*_i)/2,y:(At+Sr+Yr/Pi*_i)/2,r:(Pi+Kt+Gr)/2}}function _e(We,et,xt){var At=We.x,Kt=We.y,er=We.r,Sr=et.x,Gr=et.y,Ir=et.r,Yr=xt.x,_i=xt.y,Pi=xt.r,ai=At-Sr,mi=At-Yr,un=Kt-Gr,Fn=Kt-_i,An=Ir-er,Hn=Pi-er,Qn=At*At+Kt*Kt-er*er,Vi=Qn-Sr*Sr-Gr*Gr+Ir*Ir,Kn=Qn-Yr*Yr-_i*_i+Pi*Pi,Jn=mi*un-ai*Fn,Gt=(un*Kn-Fn*Vi)/(Jn*2)-At,wt=(Fn*An-un*Hn)/Jn,rr=(mi*Vi-ai*Kn)/(Jn*2)-Kt,ir=(ai*Hn-mi*An)/Jn,wr=wt*wt+ir*ir-1,Xr=2*(er+Gt*wt+rr*ir),ti=Gt*Gt+rr*rr-er*er,$r=-(wr?(Xr+Math.sqrt(Xr*Xr-4*wr*ti))/(2*wr):ti/Xr);return{x:At+Gt+wt*$r,y:Kt+rr+ir*$r,r:$r}}function ke(We,et,xt){var At=We.x-et.x,Kt,er,Sr=We.y-et.y,Gr,Ir,Yr=At*At+Sr*Sr;Yr?(er=et.r+xt.r,er*=er,Ir=We.r+xt.r,Ir*=Ir,er>Ir?(Kt=(Yr+Ir-er)/(2*Yr),Gr=Math.sqrt(Math.max(0,Ir/Yr-Kt*Kt)),xt.x=We.x-Kt*At-Gr*Sr,xt.y=We.y-Kt*Sr+Gr*At):(Kt=(Yr+er-Ir)/(2*Yr),Gr=Math.sqrt(Math.max(0,er/Yr-Kt*Kt)),xt.x=et.x+Kt*At-Gr*Sr,xt.y=et.y+Kt*Sr+Gr*At)):(xt.x=et.x+xt.r,xt.y=et.y)}function Ce(We,et){var xt=We.r+et.r-1e-6,At=et.x-We.x,Kt=et.y-We.y;return xt>0&&xt*xt>At*At+Kt*Kt}function ge(We){var et=We._,xt=We.next._,At=et.r+xt.r,Kt=(et.x*xt.r+xt.x*et.r)/At,er=(et.y*xt.r+xt.y*et.r)/At;return Kt*Kt+er*er}function ie(We){this._=We,this.next=null,this.previous=null}function Se(We){if(!(Kt=We.length))return 0;var et,xt,At,Kt,er,Sr,Gr,Ir,Yr,_i,Pi;if(et=We[0],et.x=0,et.y=0,!(Kt>1))return et.r;if(xt=We[1],et.x=-xt.r,xt.x=et.r,xt.y=0,!(Kt>2))return et.r+xt.r;ke(xt,et,At=We[2]),et=new ie(et),xt=new ie(xt),At=new ie(At),et.next=At.previous=xt,xt.next=et.previous=At,At.next=xt.previous=et;e:for(Gr=3;Gr<Kt;++Gr){ke(et._,xt._,At=We[Gr]),At=new ie(At),Ir=xt.next,Yr=et.previous,_i=xt._.r,Pi=et._.r;do if(_i<=Pi){if(Ce(Ir._,At._)){xt=Ir,et.next=xt,xt.previous=et,--Gr;continue e}_i+=Ir._.r,Ir=Ir.next}else{if(Ce(Yr._,At._)){et=Yr,et.next=xt,xt.previous=et,--Gr;continue e}Pi+=Yr._.r,Yr=Yr.previous}while(Ir!==Yr.next);for(At.previous=et,At.next=xt,et.next=xt.previous=xt=At,er=ge(et);(At=At.next)!==xt;)(Sr=ge(At))<er&&(et=At,er=Sr);xt=et.next}for(et=[xt._],At=xt;(At=At.next)!==xt;)et.push(At._);for(At=U(et),Gr=0;Gr<Kt;++Gr)et=We[Gr],et.x-=At.x,et.y-=At.y;return At.r}function Ee(We){return Se(We),We}function we(We){return We==null?null:De(We)}function De(We){if(typeof We!="function")throw new Error;return We}function Le(){return 0}function me(We){return function(){return We}}function Pe(We){return Math.sqrt(We.value)}function ce(){var We=null,et=1,xt=1,At=Le;function Kt(er){return er.x=et/2,er.y=xt/2,We?er.eachBefore(He(We)).eachAfter(lt(At,.5)).eachBefore(mt(1)):er.eachBefore(He(Pe)).eachAfter(lt(Le,1)).eachAfter(lt(At,er.r/Math.min(et,xt))).eachBefore(mt(Math.min(et,xt)/(2*er.r))),er}return Kt.radius=function(er){return arguments.length?(We=we(er),Kt):We},Kt.size=function(er){return arguments.length?(et=+er[0],xt=+er[1],Kt):[et,xt]},Kt.padding=function(er){return arguments.length?(At=typeof er=="function"?er:me(+er),Kt):At},Kt}function He(We){return function(et){et.children||(et.r=Math.max(0,+We(et)||0))}}function lt(We,et){return function(xt){if(At=xt.children){var At,Kt,er=At.length,Sr=We(xt)*et||0,Gr;if(Sr)for(Kt=0;Kt<er;++Kt)At[Kt].r+=Sr;if(Gr=Se(At),Sr)for(Kt=0;Kt<er;++Kt)At[Kt].r-=Sr;xt.r=Gr+Sr}}}function mt(We){return function(et){var xt=et.parent;et.r*=We,xt&&(et.x=xt.x+We*et.x,et.y=xt.y+We*et.y)}}function Vt(We){We.x0=Math.round(We.x0),We.y0=Math.round(We.y0),We.x1=Math.round(We.x1),We.y1=Math.round(We.y1)}function st(We,et,xt,At,Kt){for(var er=We.children,Sr,Gr=-1,Ir=er.length,Yr=We.value&&(At-et)/We.value;++Gr<Ir;)Sr=er[Gr],Sr.y0=xt,Sr.y1=Kt,Sr.x0=et,Sr.x1=et+=Sr.value*Yr}function ct(){var We=1,et=1,xt=0,At=!1;function Kt(Sr){var Gr=Sr.height+1;return Sr.x0=Sr.y0=xt,Sr.x1=We,Sr.y1=et/Gr,Sr.eachBefore(er(et,Gr)),At&&Sr.eachBefore(Vt),Sr}function er(Sr,Gr){return function(Ir){Ir.children&&st(Ir,Ir.x0,Sr*(Ir.depth+1)/Gr,Ir.x1,Sr*(Ir.depth+2)/Gr);var Yr=Ir.x0,_i=Ir.y0,Pi=Ir.x1-xt,ai=Ir.y1-xt;Pi<Yr&&(Yr=Pi=(Yr+Pi)/2),ai<_i&&(_i=ai=(_i+ai)/2),Ir.x0=Yr,Ir.y0=_i,Ir.x1=Pi,Ir.y1=ai}}return Kt.round=function(Sr){return arguments.length?(At=!!Sr,Kt):At},Kt.size=function(Sr){return arguments.length?(We=+Sr[0],et=+Sr[1],Kt):[We,et]},Kt.padding=function(Sr){return arguments.length?(xt=+Sr,Kt):xt},Kt}var Qt="$",Ht={depth:-1},nr={};function tt(We){return We.id}function je(We){return We.parentId}function Ue(){var We=tt,et=je;function xt(At){var Kt,er,Sr=At.length,Gr,Ir,Yr,_i=new Array(Sr),Pi,ai,mi={};for(er=0;er<Sr;++er)Kt=At[er],Yr=_i[er]=new E(Kt),(Pi=We(Kt,er,At))!=null&&(Pi+="")&&(ai=Qt+(Yr.id=Pi),mi[ai]=ai in mi?nr:Yr);for(er=0;er<Sr;++er)if(Yr=_i[er],Pi=et(At[er],er,At),Pi==null||!(Pi+="")){if(Gr)throw new Error("multiple roots");Gr=Yr}else{if(Ir=mi[Qt+Pi],!Ir)throw new Error("missing: "+Pi);if(Ir===nr)throw new Error("ambiguous: "+Pi);Ir.children?Ir.children.push(Yr):Ir.children=[Yr],Yr.parent=Ir}if(!Gr)throw new Error("no root");if(Gr.parent=Ht,Gr.eachBefore(function(un){un.depth=un.parent.depth+1,--Sr}).eachBefore(P),Gr.parent=null,Sr>0)throw new Error("cycle");return Gr}return xt.id=function(At){return arguments.length?(We=De(At),xt):We},xt.parentId=function(At){return arguments.length?(et=De(At),xt):et},xt}function Ae(We,et){return We.parent===et.parent?1:2}function rt(We){var et=We.children;return et?et[0]:We.t}function St(We){var et=We.children;return et?et[et.length-1]:We.t}function Tt(We,et,xt){var At=xt/(et.i-We.i);et.c-=At,et.s+=xt,We.c+=At,et.z+=xt,et.m+=xt}function dt(We){for(var et=0,xt=0,At=We.children,Kt=At.length,er;--Kt>=0;)er=At[Kt],er.z+=et,er.m+=et,et+=er.s+(xt+=er.c)}function Et(We,et,xt){return We.a.parent===et.parent?We.a:xt}function pt(We,et){this._=We,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=et}pt.prototype=Object.create(E.prototype);function Xt(We){for(var et=new pt(We,0),xt,At=[et],Kt,er,Sr,Gr;xt=At.pop();)if(er=xt._.children)for(xt.children=new Array(Gr=er.length),Sr=Gr-1;Sr>=0;--Sr)At.push(Kt=xt.children[Sr]=new pt(er[Sr],Sr)),Kt.parent=xt;return(et.parent=new pt(null,0)).children=[et],et}function or(){var We=Ae,et=1,xt=1,At=null;function Kt(Yr){var _i=Xt(Yr);if(_i.eachAfter(er),_i.parent.m=-_i.z,_i.eachBefore(Sr),At)Yr.eachBefore(Ir);else{var Pi=Yr,ai=Yr,mi=Yr;Yr.eachBefore(function(Qn){Qn.x<Pi.x&&(Pi=Qn),Qn.x>ai.x&&(ai=Qn),Qn.depth>mi.depth&&(mi=Qn)});var un=Pi===ai?1:We(Pi,ai)/2,Fn=un-Pi.x,An=et/(ai.x+un+Fn),Hn=xt/(mi.depth||1);Yr.eachBefore(function(Qn){Qn.x=(Qn.x+Fn)*An,Qn.y=Qn.depth*Hn})}return Yr}function er(Yr){var _i=Yr.children,Pi=Yr.parent.children,ai=Yr.i?Pi[Yr.i-1]:null;if(_i){dt(Yr);var mi=(_i[0].z+_i[_i.length-1].z)/2;ai?(Yr.z=ai.z+We(Yr._,ai._),Yr.m=Yr.z-mi):Yr.z=mi}else ai&&(Yr.z=ai.z+We(Yr._,ai._));Yr.parent.A=Gr(Yr,ai,Yr.parent.A||Pi[0])}function Sr(Yr){Yr._.x=Yr.z+Yr.parent.m,Yr.m+=Yr.parent.m}function Gr(Yr,_i,Pi){if(_i){for(var ai=Yr,mi=Yr,un=_i,Fn=ai.parent.children[0],An=ai.m,Hn=mi.m,Qn=un.m,Vi=Fn.m,Kn;un=St(un),ai=rt(ai),un&&ai;)Fn=rt(Fn),mi=St(mi),mi.a=Yr,Kn=un.z+Qn-ai.z-An+We(un._,ai._),Kn>0&&(Tt(Et(un,Yr,Pi),Yr,Kn),An+=Kn,Hn+=Kn),Qn+=un.m,An+=ai.m,Vi+=Fn.m,Hn+=mi.m;un&&!St(mi)&&(mi.t=un,mi.m+=Qn-Hn),ai&&!rt(Fn)&&(Fn.t=ai,Fn.m+=An-Vi,Pi=Yr)}return Pi}function Ir(Yr){Yr.x*=et,Yr.y=Yr.depth*xt}return Kt.separation=function(Yr){return arguments.length?(We=Yr,Kt):We},Kt.size=function(Yr){return arguments.length?(At=!1,et=+Yr[0],xt=+Yr[1],Kt):At?null:[et,xt]},Kt.nodeSize=function(Yr){return arguments.length?(At=!0,et=+Yr[0],xt=+Yr[1],Kt):At?[et,xt]:null},Kt}function _r(We,et,xt,At,Kt){for(var er=We.children,Sr,Gr=-1,Ir=er.length,Yr=We.value&&(Kt-xt)/We.value;++Gr<Ir;)Sr=er[Gr],Sr.x0=et,Sr.x1=At,Sr.y0=xt,Sr.y1=xt+=Sr.value*Yr}var Er=(1+Math.sqrt(5))/2;function ei(We,et,xt,At,Kt,er){for(var Sr=[],Gr=et.children,Ir,Yr,_i=0,Pi=0,ai=Gr.length,mi,un,Fn=et.value,An,Hn,Qn,Vi,Kn,Jn,Gt;_i<ai;){mi=Kt-xt,un=er-At;do An=Gr[Pi++].value;while(!An&&Pi<ai);for(Hn=Qn=An,Jn=Math.max(un/mi,mi/un)/(Fn*We),Gt=An*An*Jn,Kn=Math.max(Qn/Gt,Gt/Hn);Pi<ai;++Pi){if(An+=Yr=Gr[Pi].value,Yr<Hn&&(Hn=Yr),Yr>Qn&&(Qn=Yr),Gt=An*An*Jn,Vi=Math.max(Qn/Gt,Gt/Hn),Vi>Kn){An-=Yr;break}Kn=Vi}Sr.push(Ir={value:An,dice:mi<un,children:Gr.slice(_i,Pi)}),Ir.dice?st(Ir,xt,At,Kt,Fn?At+=un*An/Fn:er):_r(Ir,xt,At,Fn?xt+=mi*An/Fn:Kt,er),Fn-=An,_i=Pi}return Sr}var qr=function We(et){function xt(At,Kt,er,Sr,Gr){ei(et,At,Kt,er,Sr,Gr)}return xt.ratio=function(At){return We((At=+At)>1?At:1)},xt}(Er);function jr(){var We=qr,et=!1,xt=1,At=1,Kt=[0],er=Le,Sr=Le,Gr=Le,Ir=Le,Yr=Le;function _i(ai){return ai.x0=ai.y0=0,ai.x1=xt,ai.y1=At,ai.eachBefore(Pi),Kt=[0],et&&ai.eachBefore(Vt),ai}function Pi(ai){var mi=Kt[ai.depth],un=ai.x0+mi,Fn=ai.y0+mi,An=ai.x1-mi,Hn=ai.y1-mi;An<un&&(un=An=(un+An)/2),Hn<Fn&&(Fn=Hn=(Fn+Hn)/2),ai.x0=un,ai.y0=Fn,ai.x1=An,ai.y1=Hn,ai.children&&(mi=Kt[ai.depth+1]=er(ai)/2,un+=Yr(ai)-mi,Fn+=Sr(ai)-mi,An-=Gr(ai)-mi,Hn-=Ir(ai)-mi,An<un&&(un=An=(un+An)/2),Hn<Fn&&(Fn=Hn=(Fn+Hn)/2),We(ai,un,Fn,An,Hn))}return _i.round=function(ai){return arguments.length?(et=!!ai,_i):et},_i.size=function(ai){return arguments.length?(xt=+ai[0],At=+ai[1],_i):[xt,At]},_i.tile=function(ai){return arguments.length?(We=De(ai),_i):We},_i.padding=function(ai){return arguments.length?_i.paddingInner(ai).paddingOuter(ai):_i.paddingInner()},_i.paddingInner=function(ai){return arguments.length?(er=typeof ai=="function"?ai:me(+ai),_i):er},_i.paddingOuter=function(ai){return arguments.length?_i.paddingTop(ai).paddingRight(ai).paddingBottom(ai).paddingLeft(ai):_i.paddingTop()},_i.paddingTop=function(ai){return arguments.length?(Sr=typeof ai=="function"?ai:me(+ai),_i):Sr},_i.paddingRight=function(ai){return arguments.length?(Gr=typeof ai=="function"?ai:me(+ai),_i):Gr},_i.paddingBottom=function(ai){return arguments.length?(Ir=typeof ai=="function"?ai:me(+ai),_i):Ir},_i.paddingLeft=function(ai){return arguments.length?(Yr=typeof ai=="function"?ai:me(+ai),_i):Yr},_i}function gt(We,et,xt,At,Kt){var er=We.children,Sr,Gr=er.length,Ir,Yr=new Array(Gr+1);for(Yr[0]=Ir=Sr=0;Sr<Gr;++Sr)Yr[Sr+1]=Ir+=er[Sr].value;_i(0,Gr,We.value,et,xt,At,Kt);function _i(Pi,ai,mi,un,Fn,An,Hn){if(Pi>=ai-1){var Qn=er[Pi];Qn.x0=un,Qn.y0=Fn,Qn.x1=An,Qn.y1=Hn;return}for(var Vi=Yr[Pi],Kn=mi/2+Vi,Jn=Pi+1,Gt=ai-1;Jn<Gt;){var wt=Jn+Gt>>>1;Yr[wt]<Kn?Jn=wt+1:Gt=wt}Kn-Yr[Jn-1]<Yr[Jn]-Kn&&Pi+1<Jn&&--Jn;var rr=Yr[Jn]-Vi,ir=mi-rr;if(An-un>Hn-Fn){var wr=(un*ir+An*rr)/mi;_i(Pi,Jn,rr,un,Fn,wr,Hn),_i(Jn,ai,ir,wr,Fn,An,Hn)}else{var Xr=(Fn*ir+Hn*rr)/mi;_i(Pi,Jn,rr,un,Fn,An,Xr),_i(Jn,ai,ir,un,Xr,An,Hn)}}}function Ge(We,et,xt,At,Kt){(We.depth&1?_r:st)(We,et,xt,At,Kt)}var Je=function We(et){function xt(At,Kt,er,Sr,Gr){if((Ir=At._squarify)&&Ir.ratio===et)for(var Ir,Yr,_i,Pi,ai=-1,mi,un=Ir.length,Fn=At.value;++ai<un;){for(Yr=Ir[ai],_i=Yr.children,Pi=Yr.value=0,mi=_i.length;Pi<mi;++Pi)Yr.value+=_i[Pi].value;Yr.dice?st(Yr,Kt,er,Sr,er+=(Gr-er)*Yr.value/Fn):_r(Yr,Kt,er,Kt+=(Sr-Kt)*Yr.value/Fn,Gr),Fn-=Yr.value}else At._squarify=Ir=ei(et,At,Kt,er,Sr,Gr),Ir.ratio=et}return xt.ratio=function(At){return We((At=+At)>1?At:1)},xt}(Er);e.cluster=l,e.hierarchy=x,e.pack=ce,e.packEnclose=U,e.packSiblings=Ee,e.partition=ct,e.stratify=Ue,e.tree=or,e.treemap=jr,e.treemapBinary=gt,e.treemapDice=st,e.treemapResquarify=Je,e.treemapSlice=_r,e.treemapSliceDice=Ge,e.treemapSquarify=qr,Object.defineProperty(e,"__esModule",{value:!0})})});var UE=ye(NE=>{"use strict";var nCe=BE(),M6t=Eo(),PA=Pr(),E6t=tc().makeColorScaleFuncFromTrace,k6t=kA().makePullColorFn,C6t=kA().generateExtendedColors,L6t=tc().calc,P6t=fs().ALMOST_EQUAL,I6t={},R6t={},D6t={};NE.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=PA.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,l=PA.isArrayOrTypedArray(s),u=[],c={},f={},h=function(j,N){c[j]?c[j].push(N):c[j]=[N],f[N]=1},d=function(j){return j||typeof j=="number"},v=function(j){return!l||M6t(s[j])&&s[j]>=0},m,b,p;i?(m=Math.min(n.length,o.length),b=function(j){return d(n[j])&&v(j)},p=function(j){return String(n[j])}):(m=Math.min(a.length,o.length),b=function(j){return d(a[j])&&v(j)},p=function(j){return String(a[j])}),l&&(m=Math.min(m,s.length));for(var k=0;k<m;k++)if(b(k)){var M=p(k),T=d(o[k])?String(o[k]):"",L={i:k,id:M,pid:T,label:d(a[k])?String(a[k]):""};l&&(L.v=+s[k]),u.push(L),h(T,M)}if(c[""]){if(c[""].length>1){for(var S=PA.randstr(),g=0;g<u.length;g++)u[g].pid===""&&(u[g].pid=S);u.unshift({hasMultipleRoots:!0,id:S,pid:"",label:""})}}else{var x=[],C;for(C in c)f[C]||x.push(C);if(x.length===1)C=x[0],u.unshift({hasImpliedRoot:!0,id:C,pid:"",label:C});else return PA.warn(["Multiple implied roots, cannot build",t.type,"hierarchy of",t.name+".","These roots include:",x.join(", ")].join(" "))}var P;try{P=nCe.stratify().id(function(j){return j.id}).parentId(function(j){return j.pid})(u)}catch(j){return PA.warn(["Failed to build",t.type,"hierarchy of",t.name+".","Error:",j.message].join(" "))}var E=nCe.hierarchy(P),z=!1;if(l)switch(t.branchvalues){case"remainder":E.sum(function(j){return j.data.v});break;case"total":E.each(function(j){var N=j.data.data,H=N.v;if(j.children){var re=j.children.reduce(function(oe,_e){return oe+_e.data.data.v},0);if((N.hasImpliedRoot||N.hasMultipleRoots)&&(H=re),H<re*P6t)return z=!0,PA.warn(["Total value for node",j.data.data.id,"of",t.name,"is smaller than the sum of its children.",`
|
||
parent value =`,H,`
|
||
children sum =`,re].join(" "))}j.value=H});break}else aCe(E,t,{branches:t.count.indexOf("branches")!==-1,leaves:t.count.indexOf("leaves")!==-1});if(!z){t.sort&&E.sort(function(j,N){return N.value-j.value});var q,U,G=t.marker.colors||[],Z=!!G.length;return t._hasColorscale?(Z||(G=l?t.values:t._values),L6t(e,t,{vals:G,containerStr:"marker",cLetter:"c"}),U=E6t(t.marker)):q=k6t(r["_"+t.type+"colormap"]),E.each(function(j){var N=j.data.data;N.color=t._hasColorscale?U(G[N.i]):q(G[N.i],N.id)}),u[0].hierarchy=E,u}};NE._runCrossTraceCalc=function(e,t){var r=t._fullLayout,n=t.calcdata,i=r[e+"colorway"],a=r["_"+e+"colormap"];r["extend"+e+"colors"]&&(i=C6t(i,e==="icicle"?D6t:e==="treemap"?R6t:I6t));var o=0,s;function l(h){var d=h.data.data,v=d.id;d.color===!1&&(a[v]?d.color=a[v]:h.parent?h.parent.parent?d.color=h.parent.data.data.color:(a[v]=d.color=i[o%i.length],o++):d.color=s)}for(var u=0;u<n.length;u++){var c=n[u],f=c[0];f.trace.type===e&&f.hierarchy&&(s=f.trace.root.color,f.hierarchy.each(l))}};NE.crossTraceCalc=function(e){return NE._runCrossTraceCalc("sunburst",e)};function aCe(e,t,r){var n=0,i=e.children;if(i){for(var a=i.length,o=0;o<a;o++)n+=aCe(i[o],t,r);r.branches&&n++}else r.leaves&&n++;return e.value=e.data.data.value=n,t._values||(t._values=[]),t._values[e.data.data.i]=n,n}});function t1(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function $_(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var SD=gu(()=>{});function Ym(){}function sCe(){return this.rgb().formatHex()}function V6t(){return this.rgb().formatHex8()}function G6t(){return vCe(this).formatHsl()}function lCe(){return this.rgb().formatRgb()}function ex(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=F6t.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?uCe(t):r===3?new _d(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?MD(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?MD(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=z6t.exec(e))?new _d(t[1],t[2],t[3],1):(t=q6t.exec(e))?new _d(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=O6t.exec(e))?MD(t[1],t[2],t[3],t[4]):(t=B6t.exec(e))?MD(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=N6t.exec(e))?hCe(t[1],t[2]/100,t[3]/100,1):(t=U6t.exec(e))?hCe(t[1],t[2]/100,t[3]/100,t[4]):oCe.hasOwnProperty(e)?uCe(oCe[e]):e==="transparent"?new _d(NaN,NaN,NaN,0):null}function uCe(e){return new _d(e>>16&255,e>>8&255,e&255,1)}function MD(e,t,r,n){return n<=0&&(e=t=r=NaN),new _d(e,t,r,n)}function GE(e){return e instanceof Ym||(e=ex(e)),e?(e=e.rgb(),new _d(e.r,e.g,e.b,e.opacity)):new _d}function RA(e,t,r,n){return arguments.length===1?GE(e):new _d(e,t,r,n==null?1:n)}function _d(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function cCe(){return`#${q2(this.r)}${q2(this.g)}${q2(this.b)}`}function H6t(){return`#${q2(this.r)}${q2(this.g)}${q2(this.b)}${q2((isNaN(this.opacity)?1:this.opacity)*255)}`}function fCe(){let e=kD(this.opacity);return`${e===1?"rgb(":"rgba("}${O2(this.r)}, ${O2(this.g)}, ${O2(this.b)}${e===1?")":`, ${e})`}`}function kD(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function O2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function q2(e){return e=O2(e),(e<16?"0":"")+e.toString(16)}function hCe(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Kg(e,t,r,n)}function vCe(e){if(e instanceof Kg)return new Kg(e.h,e.s,e.l,e.opacity);if(e instanceof Ym||(e=ex(e)),!e)return new Kg;if(e instanceof Kg)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new Kg(o,s,l,e.opacity)}function HE(e,t,r,n){return arguments.length===1?vCe(e):new Kg(e,t,r,n==null?1:n)}function Kg(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function dCe(e){return e=(e||0)%360,e<0?e+360:e}function ED(e){return Math.max(0,Math.min(1,e||0))}function EW(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var Q_,B2,IA,VE,Zm,F6t,z6t,q6t,O6t,B6t,N6t,U6t,oCe,CD=gu(()=>{SD();Q_=.7,B2=1/Q_,IA="\\s*([+-]?\\d+)\\s*",VE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",F6t=/^#([0-9a-f]{3,8})$/,z6t=new RegExp(`^rgb\\(${IA},${IA},${IA}\\)$`),q6t=new RegExp(`^rgb\\(${Zm},${Zm},${Zm}\\)$`),O6t=new RegExp(`^rgba\\(${IA},${IA},${IA},${VE}\\)$`),B6t=new RegExp(`^rgba\\(${Zm},${Zm},${Zm},${VE}\\)$`),N6t=new RegExp(`^hsl\\(${VE},${Zm},${Zm}\\)$`),U6t=new RegExp(`^hsla\\(${VE},${Zm},${Zm},${VE}\\)$`),oCe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};t1(Ym,ex,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:sCe,formatHex:sCe,formatHex8:V6t,formatHsl:G6t,formatRgb:lCe,toString:lCe});t1(_d,RA,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _d(O2(this.r),O2(this.g),O2(this.b),kD(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:cCe,formatHex:cCe,formatHex8:H6t,formatRgb:fCe,toString:fCe}));t1(Kg,HE,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new Kg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new Kg(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new _d(EW(e>=240?e-240:e+120,i,n),EW(e,i,n),EW(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Kg(dCe(this.h),ED(this.s),ED(this.l),kD(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=kD(this.opacity);return`${e===1?"hsl(":"hsla("}${dCe(this.h)}, ${ED(this.s)*100}%, ${ED(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var LD,PD,kW=gu(()=>{LD=Math.PI/180,PD=180/Math.PI});function xCe(e){if(e instanceof Km)return new Km(e.l,e.a,e.b,e.opacity);if(e instanceof r1)return bCe(e);e instanceof _d||(e=GE(e));var t=IW(e.r),r=IW(e.g),n=IW(e.b),i=CW((.2225045*t+.7168786*r+.0606169*n)/gCe),a,o;return t===r&&r===n?a=o=i:(a=CW((.4360747*t+.3850649*r+.1430804*n)/pCe),o=CW((.0139322*t+.0971045*r+.7141733*n)/mCe)),new Km(116*i-16,500*(a-i),200*(i-o),e.opacity)}function FA(e,t,r,n){return arguments.length===1?xCe(e):new Km(e,t,r,n==null?1:n)}function Km(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function CW(e){return e>j6t?Math.pow(e,1/3):e/_Ce+yCe}function LW(e){return e>DA?e*e*e:_Ce*(e-yCe)}function PW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function IW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function W6t(e){if(e instanceof r1)return new r1(e.h,e.c,e.l,e.opacity);if(e instanceof Km||(e=xCe(e)),e.a===0&&e.b===0)return new r1(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*PD;return new r1(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function jE(e,t,r,n){return arguments.length===1?W6t(e):new r1(e,t,r,n==null?1:n)}function r1(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function bCe(e){if(isNaN(e.h))return new Km(e.l,0,0,e.opacity);var t=e.h*LD;return new Km(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}var ID,pCe,gCe,mCe,yCe,DA,_Ce,j6t,wCe=gu(()=>{SD();CD();kW();ID=18,pCe=.96422,gCe=1,mCe=.82521,yCe=4/29,DA=6/29,_Ce=3*DA*DA,j6t=DA*DA*DA;t1(Km,FA,$_(Ym,{brighter(e){return new Km(this.l+ID*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Km(this.l-ID*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=pCe*LW(t),e=gCe*LW(e),r=mCe*LW(r),new _d(PW(3.1338561*t-1.6168667*e-.4906146*r),PW(-.9787684*t+1.9161415*e+.033454*r),PW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));t1(r1,jE,$_(Ym,{brighter(e){return new r1(this.h,this.c,this.l+ID*(e==null?1:e),this.opacity)},darker(e){return new r1(this.h,this.c,this.l-ID*(e==null?1:e),this.opacity)},rgb(){return bCe(this).rgb()}}))});function X6t(e){if(e instanceof N2)return new N2(e.h,e.s,e.l,e.opacity);e instanceof _d||(e=GE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(SCe*n+TCe*t-ACe*r)/(SCe+TCe-ACe),a=n-i,o=(WE*(r-i)-DW*a)/RD,s=Math.sqrt(o*o+a*a)/(WE*i*(1-i)),l=s?Math.atan2(o,a)*PD-120:NaN;return new N2(l<0?l+360:l,s,i,e.opacity)}function zA(e,t,r,n){return arguments.length===1?X6t(e):new N2(e,t,r,n==null?1:n)}function N2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var MCe,RW,DW,RD,WE,TCe,ACe,SCe,ECe=gu(()=>{SD();CD();kW();MCe=-.14861,RW=1.78277,DW=-.29227,RD=-.90649,WE=1.97294,TCe=WE*RD,ACe=WE*RW,SCe=RW*DW-RD*MCe;t1(N2,zA,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new N2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new N2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*LD,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new _d(255*(t+r*(MCe*n+RW*i)),255*(t+r*(DW*n+RD*i)),255*(t+r*(WE*n)),this.opacity)}}))});var U2=gu(()=>{CD();wCe();ECe()});function FW(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}function DD(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n<t-1?e[n+2]:2*a-i;return FW((r-n/t)*t,o,i,a,s)}}var FD=gu(()=>{});function zD(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],a=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return FW((r-n/t)*t,i,a,o,s)}}var zW=gu(()=>{FD()});var qA,qW=gu(()=>{qA=e=>()=>e});function kCe(e,t){return function(r){return e+r*t}}function Z6t(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function tx(e,t){var r=t-e;return r?kCe(e,r>180||r<-180?r-360*Math.round(r/360):r):qA(isNaN(e)?t:e)}function CCe(e){return(e=+e)==1?$f:function(t,r){return r-t?Z6t(t,r,e):qA(isNaN(t)?r:t)}}function $f(e,t){var r=t-e;return r?kCe(e,r):qA(isNaN(e)?t:e)}var V2=gu(()=>{qW()});function LCe(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o,s;for(o=0;o<r;++o)s=RA(t[o]),n[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return n=e(n),i=e(i),a=e(a),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=a(l),s+""}}}var XE,PCe,ICe,OW=gu(()=>{U2();FD();zW();V2();XE=function e(t){var r=CCe(t);function n(i,a){var o=r((i=RA(i)).r,(a=RA(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=$f(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);PCe=LCe(DD),ICe=LCe(zD)});function OA(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function qD(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var OD=gu(()=>{});function RCe(e,t){return(qD(t)?OA:BW)(e,t)}function BW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=rx(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}var NW=gu(()=>{ZE();OD()});function BD(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var UW=gu(()=>{});function zp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var YE=gu(()=>{});function ND(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=rx(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var VW=gu(()=>{ZE()});function Y6t(e){return function(){return e}}function K6t(e){return function(t){return e(t)+""}}function UD(e,t){var r=HW.lastIndex=GW.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=HW.exec(e))&&(i=GW.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:zp(n,i)})),r=GW.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?K6t(l[0].x):Y6t(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}var HW,GW,jW=gu(()=>{YE();HW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,GW=new RegExp(HW.source,"g")});function rx(e,t){var r=typeof t,n;return t==null||r==="boolean"?qA(t):(r==="number"?zp:r==="string"?(n=ex(t))?(t=n,XE):UD:t instanceof ex?XE:t instanceof Date?BD:qD(t)?OA:Array.isArray(t)?BW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ND:zp)(e,t)}var ZE=gu(()=>{U2();OW();NW();UW();YE();VW();jW();qW();OD()});function DCe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var FCe=gu(()=>{});function zCe(e,t){var r=tx(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var qCe=gu(()=>{V2()});function OCe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var BCe=gu(()=>{});function WW(e,t,r,n,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*NCe,skewX:Math.atan(l)*NCe,scaleX:o,scaleY:s}}var NCe,VD,UCe=gu(()=>{NCe=180/Math.PI,VD={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function VCe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?VD:WW(t.a,t.b,t.c,t.d,t.e,t.f)}function GCe(e){return e==null?VD:(GD||(GD=document.createElementNS("http://www.w3.org/2000/svg","g")),GD.setAttribute("transform",e),(e=GD.transform.baseVal.consolidate())?(e=e.matrix,WW(e.a,e.b,e.c,e.d,e.e,e.f)):VD)}var GD,HCe=gu(()=>{UCe()});function jCe(e,t,r,n){function i(u){return u.length?u.pop()+" ":""}function a(u,c,f,h,d,v){if(u!==f||c!==h){var m=d.push("translate(",null,t,null,r);v.push({i:m-4,x:zp(u,f)},{i:m-2,x:zp(c,h)})}else(f||h)&&d.push("translate("+f+t+h+r)}function o(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,n)-2,x:zp(u,c)})):c&&f.push(i(f)+"rotate("+c+n)}function s(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,n)-2,x:zp(u,c)}):c&&f.push(i(f)+"skewX("+c+n)}function l(u,c,f,h,d,v){if(u!==f||c!==h){var m=d.push(i(d)+"scale(",null,",",null,")");v.push({i:m-4,x:zp(u,f)},{i:m-2,x:zp(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),o(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var v=-1,m=h.length,b;++v<m;)f[(b=h[v]).i]=b.x(d);return f.join("")}}}var WCe,XCe,ZCe=gu(()=>{YE();HCe();WCe=jCe(VCe,"px, ","px)","deg)"),XCe=jCe(GCe,", ",")",")")});function YCe(e){return((e=Math.exp(e))+1/e)/2}function $6t(e){return((e=Math.exp(e))-1/e)/2}function Q6t(e){return((e=Math.exp(2*e))-1)/(e+1)}var J6t,KCe,JCe=gu(()=>{J6t=1e-12;KCe=function e(t,r,n){function i(a,o){var s=a[0],l=a[1],u=a[2],c=o[0],f=o[1],h=o[2],d=c-s,v=f-l,m=d*d+v*v,b,p;if(m<J6t)p=Math.log(h/u)/t,b=function(C){return[s+C*d,l+C*v,u*Math.exp(t*C*p)]};else{var k=Math.sqrt(m),M=(h*h-u*u+n*m)/(2*u*r*k),T=(h*h-u*u-n*m)/(2*h*r*k),L=Math.log(Math.sqrt(M*M+1)-M),x=Math.log(Math.sqrt(T*T+1)-T);p=(x-L)/t,b=function(C){var S=C*p,g=YCe(L),P=u/(r*k)*(g*Q6t(t*S+L)-$6t(L));return[s+P*d,l+P*v,u*g/YCe(t*S+L)]}}return b.duration=p*1e3*t/Math.SQRT2,b}return i.rho=function(a){var o=Math.max(.001,+a),s=o*o,l=s*s;return e(o,s,l)},i}(Math.SQRT2,2,4)});function $Ce(e){return function(t,r){var n=e((t=HE(t)).h,(r=HE(r)).h),i=$f(t.s,r.s),a=$f(t.l,r.l),o=$f(t.opacity,r.opacity);return function(s){return t.h=n(s),t.s=i(s),t.l=a(s),t.opacity=o(s),t+""}}}var QCe,e6e,t6e=gu(()=>{U2();V2();QCe=$Ce(tx),e6e=$Ce($f)});function XW(e,t){var r=$f((e=FA(e)).l,(t=FA(t)).l),n=$f(e.a,t.a),i=$f(e.b,t.b),a=$f(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=i(o),e.opacity=a(o),e+""}}var r6e=gu(()=>{U2();V2()});function i6e(e){return function(t,r){var n=e((t=jE(t)).h,(r=jE(r)).h),i=$f(t.c,r.c),a=$f(t.l,r.l),o=$f(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=i(s),t.l=a(s),t.opacity=o(s),t+""}}}var n6e,a6e,o6e=gu(()=>{U2();V2();n6e=i6e(tx),a6e=i6e($f)});function s6e(e){return function t(r){r=+r;function n(i,a){var o=e((i=zA(i)).h,(a=zA(a)).h),s=$f(i.s,a.s),l=$f(i.l,a.l),u=$f(i.opacity,a.opacity);return function(c){return i.h=o(c),i.s=s(c),i.l=l(Math.pow(c,r)),i.opacity=u(c),i+""}}return n.gamma=t,n}(1)}var l6e,u6e,c6e=gu(()=>{U2();V2();l6e=s6e(tx),u6e=s6e($f)});function ZW(e,t){t===void 0&&(t=e,e=rx);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}var f6e=gu(()=>{ZE()});function h6e(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r}var d6e=gu(()=>{});var G2={};mee(G2,{interpolate:()=>rx,interpolateArray:()=>RCe,interpolateBasis:()=>DD,interpolateBasisClosed:()=>zD,interpolateCubehelix:()=>l6e,interpolateCubehelixLong:()=>u6e,interpolateDate:()=>BD,interpolateDiscrete:()=>DCe,interpolateHcl:()=>n6e,interpolateHclLong:()=>a6e,interpolateHsl:()=>QCe,interpolateHslLong:()=>e6e,interpolateHue:()=>zCe,interpolateLab:()=>XW,interpolateNumber:()=>zp,interpolateNumberArray:()=>OA,interpolateObject:()=>ND,interpolateRgb:()=>XE,interpolateRgbBasis:()=>PCe,interpolateRgbBasisClosed:()=>ICe,interpolateRound:()=>OCe,interpolateString:()=>UD,interpolateTransformCss:()=>WCe,interpolateTransformSvg:()=>XCe,interpolateZoom:()=>KCe,piecewise:()=>ZW,quantize:()=>h6e});var H2=gu(()=>{ZE();NW();FD();zW();UW();FCe();qCe();YE();OD();VW();BCe();jW();ZCe();JCe();OW();t6e();r6e();o6e();c6e();f6e();d6e()});var HD=ye((v0r,v6e)=>{"use strict";var eLt=So(),tLt=ka();v6e.exports=function(t,r,n,i,a){var o=r.data.data,s=o.i,l=a||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),eLt.pointStyle(t,n,i,r)}else tLt.fill(t,l)}});var YW=ye((p0r,_6e)=>{"use strict";var p6e=qa(),g6e=ka(),m6e=Pr(),rLt=bv().resizeText,iLt=HD();function nLt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");rLt(e,t,"sunburst"),t.each(function(r){var n=p6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){p6e.select(this).call(y6e,o,a,e)})})}function y6e(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=m6e.castOption(r,o,"marker.line.color")||g6e.defaultLine,l=m6e.castOption(r,o,"marker.line.width")||0;e.call(iLt,t,r,n).style("stroke-width",l).call(g6e.stroke,s).style("opacity",a?r.leaf.opacity:null)}_6e.exports={style:nLt,styleOne:y6e}});var i1=ye(Bs=>{"use strict";var j2=Pr(),aLt=ka(),oLt=Eg(),x6e=g_();Bs.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(Bs.getPtId(n)===t)return r=n.copy()}),r||e};Bs.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var i=n.children||[],a=0;a<i.length;a++){var o=i[a];if(Bs.getPtId(o)===t)return r=n.copy()}}),r||e};Bs.isEntry=function(e){return!e.parent};Bs.isLeaf=function(e){return!e.children};Bs.getPtId=function(e){return e.data.data.id};Bs.getPtLabel=function(e){return e.data.data.label};Bs.getValue=function(e){return e.value};Bs.isHierarchyRoot=function(e){return b6e(e)===""};Bs.setSliceCursor=function(e,t,r){var n=r.isTransitioning;if(!n){var i=e.datum();n=r.hideOnRoot&&Bs.isHierarchyRoot(i)||r.hideOnLeaves&&Bs.isLeaf(i)}oLt(e,n?null:"pointer")};function sLt(e,t,r){return{color:Bs.getOutsideTextFontKey("color",e,t,r),family:Bs.getOutsideTextFontKey("family",e,t,r),size:Bs.getOutsideTextFontKey("size",e,t,r),weight:Bs.getOutsideTextFontKey("weight",e,t,r),style:Bs.getOutsideTextFontKey("style",e,t,r),variant:Bs.getOutsideTextFontKey("variant",e,t,r),textcase:Bs.getOutsideTextFontKey("textcase",e,t,r),lineposition:Bs.getOutsideTextFontKey("lineposition",e,t,r),shadow:Bs.getOutsideTextFontKey("shadow",e,t,r)}}function lLt(e,t,r,n){var i=(n||{}).onPathbar,a=t.data.data,o=a.i,s=j2.castOption(e,o,(i?"pathbar.textfont":"insidetextfont")+".color");return!s&&e._input.textfont&&(s=j2.castOption(e._input,o,"textfont.color")),{color:s||aLt.contrast(a.color),family:Bs.getInsideTextFontKey("family",e,t,r,n),size:Bs.getInsideTextFontKey("size",e,t,r,n),weight:Bs.getInsideTextFontKey("weight",e,t,r,n),style:Bs.getInsideTextFontKey("style",e,t,r,n),variant:Bs.getInsideTextFontKey("variant",e,t,r,n),textcase:Bs.getInsideTextFontKey("textcase",e,t,r,n),lineposition:Bs.getInsideTextFontKey("lineposition",e,t,r,n),shadow:Bs.getInsideTextFontKey("shadow",e,t,r,n)}}Bs.getInsideTextFontKey=function(e,t,r,n,i){var a=(i||{}).onPathbar,o=a?"pathbar.textfont":"insidetextfont",s=r.data.data.i;return j2.castOption(t,s,o+"."+e)||j2.castOption(t,s,"textfont."+e)||n.size};Bs.getOutsideTextFontKey=function(e,t,r,n){var i=r.data.data.i;return j2.castOption(t,i,"outsidetextfont."+e)||j2.castOption(t,i,"textfont."+e)||n.size};Bs.isOutsideText=function(e,t){return!e._hasColorscale&&Bs.isHierarchyRoot(t)};Bs.determineTextFont=function(e,t,r,n){return Bs.isOutsideText(e,t)?sLt(e,t,r):lLt(e,t,r,n)};Bs.hasTransition=function(e){return!!(e&&e.duration>0)};Bs.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};Bs.isHeader=function(e,t){return!(Bs.isLeaf(e)||e.depth===t._maxDepth-1)};function b6e(e){return e.data.data.pid}Bs.getParent=function(e,t){return Bs.findEntryWithLevel(e,b6e(t))};Bs.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return Bs.listPath(r,t).concat(n)};Bs.getPath=function(e){return Bs.listPath(e,"label").join("/")+"/"};Bs.formatValue=x6e.formatPieValue;Bs.formatPercent=function(e,t){var r=j2.formatPercent(e,0);return r==="0%"&&(r=x6e.formatPiePercent(e,t)),r}});var $E=ye((m0r,A6e)=>{"use strict";var BA=qa(),w6e=Oa(),uLt=ip().appendArrayPointValue,KE=vf(),T6e=Pr(),cLt=C3(),id=i1(),fLt=g_(),hLt=fLt.formatPieValue;A6e.exports=function(t,r,n,i,a){var o=i[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(v){var m=n._fullLayout;if(!(n._dragging||m.hovermode===!1)){var b=n._fullData[s.index],p=v.data.data,k=p.i,M=id.isHierarchyRoot(v),T=id.getParent(l,v),L=id.getValue(v),x=function(ke){return T6e.castOption(b,k,ke)},C=x("hovertemplate"),S=KE.castHoverinfo(b,m,k),g=m.separators,P;if(C||S&&S!=="none"&&S!=="skip"){var E,z;u&&(E=o.cx+v.pxmid[0]*(1-v.rInscribed),z=o.cy+v.pxmid[1]*(1-v.rInscribed)),c&&(E=v._hoverX,z=v._hoverY);var q={},U=[],G=[],Z=function(ke){return U.indexOf(ke)!==-1};S&&(U=S==="all"?b._module.attributes.hoverinfo.flags:S.split("+")),q.label=p.label,Z("label")&&q.label&&G.push(q.label),p.hasOwnProperty("v")&&(q.value=p.v,q.valueLabel=hLt(q.value,g),Z("value")&&G.push(q.valueLabel)),q.currentPath=v.currentPath=id.getPath(v.data),Z("current path")&&!M&&G.push(q.currentPath);var j,N=[],H=function(){N.indexOf(j)===-1&&(G.push(j),N.push(j))};q.percentParent=v.percentParent=L/id.getValue(T),q.parent=v.parentString=id.getPtLabel(T),Z("percent parent")&&(j=id.formatPercent(q.percentParent,g)+" of "+q.parent,H()),q.percentEntry=v.percentEntry=L/id.getValue(r),q.entry=v.entry=id.getPtLabel(r),Z("percent entry")&&!M&&!v.onPathbar&&(j=id.formatPercent(q.percentEntry,g)+" of "+q.entry,H()),q.percentRoot=v.percentRoot=L/id.getValue(l),q.root=v.root=id.getPtLabel(l),Z("percent root")&&!M&&(j=id.formatPercent(q.percentRoot,g)+" of "+q.root,H()),q.text=x("hovertext")||x("text"),Z("text")&&(j=q.text,T6e.isValidTextValue(j)&&G.push(j)),P=[JE(v,b,a.eventDataKeys)];var re={trace:b,y:z,_x0:v._x0,_x1:v._x1,_y0:v._y0,_y1:v._y1,text:G.join("<br>"),name:C||Z("name")?b.name:void 0,color:x("hoverlabel.bgcolor")||p.color,borderColor:x("hoverlabel.bordercolor"),fontFamily:x("hoverlabel.font.family"),fontSize:x("hoverlabel.font.size"),fontColor:x("hoverlabel.font.color"),fontWeight:x("hoverlabel.font.weight"),fontStyle:x("hoverlabel.font.style"),fontVariant:x("hoverlabel.font.variant"),nameLength:x("hoverlabel.namelength"),textAlign:x("hoverlabel.align"),hovertemplate:C,hovertemplateLabels:q,eventData:P};u&&(re.x0=E-v.rInscribed*v.rpx1,re.x1=E+v.rInscribed*v.rpx1,re.idealAlign=v.pxmid[0]<0?"left":"right"),c&&(re.x=E,re.idealAlign=E<0?"left":"right");var oe=[];KE.loneHover(re,{container:m._hoverlayer.node(),outerContainer:m._paper.node(),gd:n,inOut_bbox:oe}),P[0].bbox=oe[0],s._hasHoverLabel=!0}if(c){var _e=t.select("path.surface");a.styleOne(_e,v,b,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:P||[JE(v,b,a.eventDataKeys)],event:BA.event})}},h=function(v){var m=n._fullLayout,b=n._fullData[s.index],p=BA.select(this).datum();if(s._hasHoverEvent&&(v.originalEvent=BA.event,n.emit("plotly_unhover",{points:[JE(p,b,a.eventDataKeys)],event:BA.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(KE.loneUnhover(m._hoverlayer.node()),s._hasHoverLabel=!1),c){var k=t.select("path.surface");a.styleOne(k,p,b,n,{hovered:!1})}},d=function(v){var m=n._fullLayout,b=n._fullData[s.index],p=u&&(id.isHierarchyRoot(v)||id.isLeaf(v)),k=id.getPtId(v),M=id.isEntry(v)?id.findEntryWithChild(l,k):id.findEntryWithLevel(l,k),T=id.getPtId(M),L={points:[JE(v,b,a.eventDataKeys)],event:BA.event};p||(L.nextLevel=T);var x=cLt.triggerHandler(n,"plotly_"+s.type+"click",L);if(x!==!1&&m.hovermode&&(n._hoverdata=[JE(v,b,a.eventDataKeys)],KE.click(n,BA.event)),!p&&x!==!1&&!n._dragging&&!n._transitioning){w6e.call("_storeDirectGUIEdit",b,m._tracePreGUI[b.uid],{level:b.level});var C={data:[{level:T}],traces:[s.index]},S={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};KE.loneUnhover(m._hoverlayer.node()),w6e.call("animate",n,C,S)}};t.on("mouseover",f),t.on("mouseout",h),t.on("click",d)};function JE(e,t,r){for(var n=e.data.data,i={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},a=0;a<r.length;a++){var o=r[a];o in e&&(i[o]=e[o])}return"parentString"in e&&!id.isHierarchyRoot(e)&&(i.parent=e.parentString),uLt(i,t,n.i),i}});var WD=ye(jD=>{"use strict";var QE=qa(),dLt=BE(),Jg=(H2(),pb(G2)).interpolate,S6e=So(),Av=Pr(),vLt=Zl(),C6e=bv(),M6e=C6e.recordMinTextSize,pLt=C6e.clearMinTextSize,L6e=TD(),gLt=g_().getRotationAngle,mLt=L6e.computeTransform,yLt=L6e.transformInsideText,_Lt=YW().styleOne,xLt=V0().resizeText,bLt=$E(),KW=SW(),Rl=i1();jD.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,l=!r,u=!i.uniformtext.mode&&Rl.hasTransition(r);if(pLt("sunburst",i),o=a.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){n&&(s=n());var c=QE.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){a.selectAll("g.trace").each(function(f){E6e(e,f,this,r)})})}else o.each(function(f){E6e(e,f,this,r)}),i.uniformtext.mode&&xLt(e,i._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function E6e(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&Rl.hasTransition(n),s=QE.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,h=Rl.findEntryWithLevel(f,c.level),d=Rl.getMaxDepth(c),v=a._size,m=c.domain,b=v.w*(m.x[1]-m.x[0]),p=v.h*(m.y[1]-m.y[0]),k=.5*Math.min(b,p),M=u.cx=v.l+v.w*(m.x[1]+m.x[0])/2,T=u.cy=v.t+v.h*(1-m.y[0])-p/2;if(!h)return l.remove();var L=null,x={};o&&l.each(function(ge){x[Rl.getPtId(ge)]={rpx0:ge.rpx0,rpx1:ge.rpx1,x0:ge.x0,x1:ge.x1,transform:ge.transform},!L&&Rl.isEntry(ge)&&(L=ge)});var C=wLt(h).descendants(),S=h.height+1,g=0,P=d;u.hasMultipleRoots&&Rl.isHierarchyRoot(h)&&(C=C.slice(1),S-=1,g=1,P+=1),C=C.filter(function(ge){return ge.y1<=P});var E=gLt(c.rotation);E&&C.forEach(function(ge){ge.x0+=E,ge.x1+=E});var z=Math.min(S,d),q=function(ge){return(ge-g)/z*k},U=function(ge,ie){return[ge*Math.cos(ie),-ge*Math.sin(ie)]},G=function(ge){return Av.pathAnnulus(ge.rpx0,ge.rpx1,ge.x0,ge.x1,M,T)},Z=function(ge){return M+k6e(ge)[0]*(ge.transform.rCenter||0)+(ge.transform.x||0)},j=function(ge){return T+k6e(ge)[1]*(ge.transform.rCenter||0)+(ge.transform.y||0)};l=l.data(C,Rl.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var ge=QE.select(this),ie=ge.select("path.surface");ie.transition().attrTween("d",function(Ee){var we=oe(Ee);return function(De){return G(we(De))}});var Se=ge.select("g.slicetext");Se.attr("opacity",0)}).remove():l.exit().remove(),l.order();var N=null;if(o&&L){var H=Rl.getPtId(L);l.each(function(ge){N===null&&Rl.getPtId(ge)===H&&(N=ge.x1)})}var re=l;o&&(re=re.transition().each("end",function(){var ge=QE.select(this);Rl.setSliceCursor(ge,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),re.each(function(ge){var ie=QE.select(this),Se=Av.ensureSingle(ie,"path","surface",function(Pe){Pe.style("pointer-events",i?"none":"all")});ge.rpx0=q(ge.y0),ge.rpx1=q(ge.y1),ge.xmid=(ge.x0+ge.x1)/2,ge.pxmid=U(ge.rpx1,ge.xmid),ge.midangle=-(ge.xmid-Math.PI/2),ge.startangle=-(ge.x0-Math.PI/2),ge.stopangle=-(ge.x1-Math.PI/2),ge.halfangle=.5*Math.min(Av.angleDelta(ge.x0,ge.x1)||Math.PI,Math.PI),ge.ring=1-ge.rpx0/ge.rpx1,ge.rInscribed=TLt(ge,c),o?Se.transition().attrTween("d",function(Pe){var ce=_e(Pe);return function(He){return G(ce(He))}}):Se.attr("d",G),ie.call(bLt,h,e,t,{eventDataKeys:KW.eventDataKeys,transitionTime:KW.CLICK_TRANSITION_TIME,transitionEasing:KW.CLICK_TRANSITION_EASING}).call(Rl.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),Se.call(_Lt,ge,c,e);var Ee=Av.ensureSingle(ie,"g","slicetext"),we=Av.ensureSingle(Ee,"text","",function(Pe){Pe.attr("data-notex",1)}),De=Av.ensureUniformFontSize(e,Rl.determineTextFont(c,ge,a.font));we.text(jD.formatSliceLabel(ge,h,c,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(S6e.font,De).call(vLt.convertToTspans,e);var Le=S6e.bBox(we.node());ge.transform=yLt(Le,ge,u),ge.transform.targetX=Z(ge),ge.transform.targetY=j(ge);var me=function(Pe,ce){var He=Pe.transform;return mLt(He,ce),He.fontSize=De.size,M6e(c.type,He,a),Av.getTextTransform(He)};o?we.transition().attrTween("transform",function(Pe){var ce=ke(Pe);return function(He){return me(ce(He),Le)}}):we.attr("transform",me(ge,Le))});function oe(ge){var ie=Rl.getPtId(ge),Se=x[ie],Ee=x[Rl.getPtId(h)],we;if(Ee){var De=(ge.x1>Ee.x1?2*Math.PI:0)+E;we=ge.rpx1<Ee.rpx1?{x0:ge.x0,x1:ge.x1,rpx0:0,rpx1:0}:{x0:De,x1:De,rpx0:ge.rpx0,rpx1:ge.rpx1}}else{var Le,me=Rl.getPtId(ge.parent);l.each(function(mt){if(Rl.getPtId(mt)===me)return Le=mt});var Pe=Le.children,ce;Pe.forEach(function(mt,Vt){if(Rl.getPtId(mt)===ie)return ce=Vt});var He=Pe.length,lt=Jg(Le.x0,Le.x1);we={rpx0:k,rpx1:k,x0:lt(ce/He),x1:lt((ce+1)/He)}}return Jg(Se,we)}function _e(ge){var ie=x[Rl.getPtId(ge)],Se,Ee={x0:ge.x0,x1:ge.x1,rpx0:ge.rpx0,rpx1:ge.rpx1};if(ie)Se=ie;else if(L)if(ge.parent)if(N){var we=(ge.x1>N?2*Math.PI:0)+E;Se={x0:we,x1:we}}else Se={rpx0:k,rpx1:k},Av.extendFlat(Se,Ce(ge));else Se={rpx0:0,rpx1:0};else Se={x0:E,x1:E};return Jg(Se,Ee)}function ke(ge){var ie=x[Rl.getPtId(ge)],Se,Ee=ge.transform;if(ie)Se=ie;else if(Se={rpx1:ge.rpx1,transform:{textPosAngle:Ee.textPosAngle,scale:0,rotate:Ee.rotate,rCenter:Ee.rCenter,x:Ee.x,y:Ee.y}},L)if(ge.parent)if(N){var we=ge.x1>N?2*Math.PI:0;Se.x0=Se.x1=we}else Av.extendFlat(Se,Ce(ge));else Se.x0=Se.x1=E;else Se.x0=Se.x1=E;var De=Jg(Se.transform.textPosAngle,ge.transform.textPosAngle),Le=Jg(Se.rpx1,ge.rpx1),me=Jg(Se.x0,ge.x0),Pe=Jg(Se.x1,ge.x1),ce=Jg(Se.transform.scale,Ee.scale),He=Jg(Se.transform.rotate,Ee.rotate),lt=Ee.rCenter===0?3:Se.transform.rCenter===0?1/3:1,mt=Jg(Se.transform.rCenter,Ee.rCenter),Vt=function(st){return mt(Math.pow(st,lt))};return function(st){var ct=Le(st),Qt=me(st),Ht=Pe(st),nr=Vt(st),tt=U(ct,(Qt+Ht)/2),je=De(st),Ue={pxmid:tt,rpx1:ct,transform:{textPosAngle:je,rCenter:nr,x:Ee.x,y:Ee.y}};return M6e(c.type,Ee,a),{transform:{targetX:Z(Ue),targetY:j(Ue),scale:ce(st),rotate:He(st),rCenter:nr}}}}function Ce(ge){var ie=ge.parent,Se=x[Rl.getPtId(ie)],Ee={};if(Se){var we=ie.children,De=we.indexOf(ge),Le=we.length,me=Jg(Se.x0,Se.x1);Ee.x0=me(De/Le),Ee.x1=me(De/Le)}else Ee.x0=Ee.x1=0;return Ee}}function wLt(e){return dLt.partition().size([2*Math.PI,e.height+1])(e)}jD.formatSliceLabel=function(e,t,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o==="none"))return"";var s=i.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Rl.isHierarchyRoot(e),h=Rl.getParent(c,e),d=Rl.getValue(e);if(!a){var v=o.split("+"),m=function(g){return v.indexOf(g)!==-1},b=[],p;if(m("label")&&u.label&&b.push(u.label),u.hasOwnProperty("v")&&m("value")&&b.push(Rl.formatValue(u.v,s)),!f){m("current path")&&b.push(Rl.getPath(e.data));var k=0;m("percent parent")&&k++,m("percent entry")&&k++,m("percent root")&&k++;var M=k>1;if(k){var T,L=function(g){p=Rl.formatPercent(T,s),M&&(p+=" of "+g),b.push(p)};m("percent parent")&&!f&&(T=d/Rl.getValue(h),L("parent")),m("percent entry")&&(T=d/Rl.getValue(t),L("entry")),m("percent root")&&(T=d/Rl.getValue(c),L("root"))}}return m("text")&&(p=Av.castOption(r,u.i,"text"),Av.isValidTextValue(p)&&b.push(p)),b.join("<br>")}var x=Av.castOption(r,u.i,"texttemplate");if(!x)return"";var C={};u.label&&(C.label=u.label),u.hasOwnProperty("v")&&(C.value=u.v,C.valueLabel=Rl.formatValue(u.v,s)),C.currentPath=Rl.getPath(e.data),f||(C.percentParent=d/Rl.getValue(h),C.percentParentLabel=Rl.formatPercent(C.percentParent,s),C.parent=Rl.getPtLabel(h)),C.percentEntry=d/Rl.getValue(t),C.percentEntryLabel=Rl.formatPercent(C.percentEntry,s),C.entry=Rl.getPtLabel(t),C.percentRoot=d/Rl.getValue(c),C.percentRootLabel=Rl.formatPercent(C.percentRoot,s),C.root=Rl.getPtLabel(c),u.hasOwnProperty("color")&&(C.color=u.color);var S=Av.castOption(r,u.i,"text");return(Av.isValidTextValue(S)||S==="")&&(C.text=S),C.customdata=Av.castOption(r,u.i,"customdata"),Av.texttemplateString({data:[C,r._meta],fallback:r.texttemplatefallback,labels:C,locale:i._d3locale,template:x})};function TLt(e){return e.rpx0===0&&Av.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function k6e(e){return ALt(e.rpx1,e.transform.textPosAngle)}function ALt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var I6e=ye((_0r,P6e)=>{"use strict";P6e.exports={moduleType:"trace",name:"sunburst",basePlotModule:jke(),categories:[],animatable:!0,attributes:OE(),layoutAttributes:MW(),supplyDefaults:eCe(),supplyLayoutDefaults:rCe(),calc:UE().calc,crossTraceCalc:UE().crossTraceCalc,plot:WD().plot,style:YW().style,colorbar:$d(),meta:{}}});var D6e=ye((x0r,R6e)=>{"use strict";R6e.exports=I6e()});var z6e=ye(NA=>{"use strict";var F6e=Mc();NA.name="treemap";NA.plot=function(e,t,r,n){F6e.plotBasePlot(NA.name,e,t,r,n)};NA.clean=function(e,t,r,n){F6e.cleanBasePlot(NA.name,e,t,r,n)}});var W2=ye((w0r,q6e)=>{"use strict";q6e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var XD=ye((T0r,N6e)=>{"use strict";var{hovertemplateAttrs:SLt,texttemplateAttrs:MLt,templatefallbackAttrs:O6e}=Ll(),ELt=Tu(),kLt=Cc().attributes,X2=F2(),tg=OE(),B6e=W2(),JW=Ao().extendFlat,CLt=Pd().pattern;N6e.exports={labels:tg.labels,parents:tg.parents,values:tg.values,branchvalues:tg.branchvalues,count:tg.count,level:tg.level,maxdepth:tg.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:JW({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:tg.marker.colors,pattern:CLt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:tg.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},ELt("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:JW({},X2.textfont,{}),editType:"calc"},text:X2.text,textinfo:tg.textinfo,texttemplate:MLt({editType:"plot"},{keys:B6e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:O6e({editType:"plot"}),hovertext:X2.hovertext,hoverinfo:tg.hoverinfo,hovertemplate:SLt({},{keys:B6e.eventDataKeys}),hovertemplatefallback:O6e(),textfont:X2.textfont,insidetextfont:X2.insidetextfont,outsidetextfont:JW({},X2.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:X2.sort,root:tg.root,domain:kLt({name:"treemap",trace:!0,editType:"calc"})}});var $W=ye((A0r,U6e)=>{"use strict";U6e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var j6e=ye((S0r,H6e)=>{"use strict";var V6e=Pr(),LLt=XD(),PLt=ka(),ILt=Cc().defaults,RLt=i0().handleText,DLt=A_().TEXTPAD,FLt=z2().handleMarkerDefaults,G6e=tc(),zLt=G6e.hasColorscale,qLt=G6e.handleDefaults;H6e.exports=function(t,r,n,i){function a(b,p){return V6e.coerce(t,r,LLt,b,p)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var u=a("tiling.packing");u==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",V6e.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("pathbar.visible"),h="auto";RLt(t,r,i,a,h,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition");var d=r.textposition.indexOf("bottom")!==-1;FLt(t,r,i,a);var v=r._hasColorscale=zLt(t,"marker","colors")||(t.marker||{}).coloraxis;v?qLt(t,r,i,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var m=r.textfont.size*2;a("marker.pad.t",d?m/4:m),a("marker.pad.l",m/4),a("marker.pad.r",m/4),a("marker.pad.b",d?m:m/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:PLt.contrast(i.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*DLt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),ILt(r,i,a),r._length=null}});var X6e=ye((M0r,W6e)=>{"use strict";var OLt=Pr(),BLt=$W();W6e.exports=function(t,r){function n(i,a){return OLt.coerce(t,r,BLt,i,a)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var eX=ye(QW=>{"use strict";var Z6e=UE();QW.calc=function(e,t){return Z6e.calc(e,t)};QW.crossTraceCalc=function(e){return Z6e._runCrossTraceCalc("treemap",e)}});var tX=ye((k0r,Y6e)=>{"use strict";Y6e.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var a=t.children;if(a)for(var o=0;o<a.length;o++)e(a[o],r,n)}});var rX=ye((C0r,K6e)=>{"use strict";var UA=BE(),NLt=tX();K6e.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.packing==="dice-slice",s=n.pad[a?"bottom":"top"],l=n.pad[i?"right":"left"],u=n.pad[i?"left":"right"],c=n.pad[a?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var h=UA.treemap().tile(ULt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||i||a)&&NLt(h,r,{swapXY:o,flipX:i,flipY:a}),h};function ULt(e,t){switch(e){case"squarify":return UA.treemapSquarify.ratio(t);case"binary":return UA.treemapBinary;case"dice":return UA.treemapDice;case"slice":return UA.treemapSlice;default:return UA.treemapSliceDice}}});var ZD=ye((L0r,eLe)=>{"use strict";var J6e=qa(),VA=ka(),$6e=Pr(),iX=i1(),VLt=bv().resizeText,GLt=HD();function HLt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");VLt(e,t,"treemap"),t.each(function(r){var n=J6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){J6e.select(this).call(Q6e,o,a,e,{hovered:!1})})})}function Q6e(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=iX.isHierarchyRoot(t),h=1;if(a)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)h=100,l="rgba(0,0,0,0)",u=0;else if(l=$6e.castOption(r,s,"marker.line.color")||VA.defaultLine,u=$6e.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var v=VA.combine(VA.addOpacity(r._backgroundColor,.75),c),m;if(d===!0){var b=iX.getMaxDepth(r);isFinite(b)?iX.isLeaf(t)?m=0:m=r._maxVisibleLayers-(t.data.depth-r._entryDepth):m=t.data.height+1}else m=t.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var p=0;p<m;p++){var k=.5*p/m;c=VA.combine(VA.addOpacity(v,k),c)}}}e.call(GLt,t,r,n,c).style("stroke-width",u).call(VA.stroke,l).style("opacity",h)}eLe.exports={style:HLt,styleOne:Q6e}});var aLe=ye((P0r,nLe)=>{"use strict";var tLe=qa(),YD=Pr(),rLe=So(),jLt=Zl(),WLt=rX(),iLe=ZD().styleOne,nX=W2(),GA=i1(),XLt=$E(),aX=!0;nLe.exports=function(t,r,n,i,a){var o=a.barDifY,s=a.width,l=a.height,u=a.viewX,c=a.viewY,f=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,v=a.hasTransition,m=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,p=a.makeUpdateTextInterpolator,k={},M=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=L.hierarchy,S=s/x._entryDepth,g=GA.listPath(n.data,"id"),P=WLt(C.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();P=P.filter(function(z){var q=g.indexOf(z.data.id);return q===-1?!1:(z.x0=S*q,z.x1=S*(q+1),z.y0=o,z.y1=o+l,z.onPathbar=!0,!0)}),P.reverse(),i=i.data(P,GA.getPtId),i.enter().append("g").classed("pathbar",!0),m(i,aX,k,[s,l],f),i.order();var E=i;v&&(E=E.transition().each("end",function(){var z=tLe.select(this);GA.setSliceCursor(z,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),E.each(function(z){z._x0=u(z.x0),z._x1=u(z.x1),z._y0=c(z.y0),z._y1=c(z.y1),z._hoverX=u(z.x1-Math.min(s,l)/2),z._hoverY=c(z.y1-l/2);var q=tLe.select(this),U=YD.ensureSingle(q,"path","surface",function(N){N.style("pointer-events",M?"none":"all")});v?U.transition().attrTween("d",function(N){var H=b(N,aX,k,[s,l]);return function(re){return f(H(re))}}):U.attr("d",f),q.call(XLt,n,t,r,{styleOne:iLe,eventDataKeys:nX.eventDataKeys,transitionTime:nX.CLICK_TRANSITION_TIME,transitionEasing:nX.CLICK_TRANSITION_EASING}).call(GA.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),U.call(iLe,z,x,t,{hovered:!1}),z._text=(GA.getPtLabel(z)||"").split("<br>").join(" ")||"";var G=YD.ensureSingle(q,"g","slicetext"),Z=YD.ensureSingle(G,"text","",function(N){N.attr("data-notex",1)}),j=YD.ensureUniformFontSize(t,GA.determineTextFont(x,z,T.font,{onPathbar:!0}));Z.text(z._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(rLe.font,j).call(jLt.convertToTspans,t),z.textBB=rLe.bBox(Z.node()),z.transform=h(z,{fontSize:j.size,onPathbar:!0}),z.transform.fontSize=j.size,v?Z.transition().attrTween("transform",function(N){var H=p(N,aX,k,[s,l]);return function(re){return d(H(re))}}):Z.attr("transform",d(z))})}});var uLe=ye((I0r,lLe)=>{"use strict";var oLe=qa(),oX=(H2(),pb(G2)).interpolate,ix=i1(),ek=Pr(),sLe=A_().TEXTPAD,ZLt=d2(),YLt=ZLt.toMoveInsideBar,KLt=bv(),sX=KLt.recordMinTextSize,JLt=W2(),$Lt=aLe();function Z2(e){return ix.isHierarchyRoot(e)?"":ix.getPtId(e)}lLe.exports=function(t,r,n,i,a){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,h=ix.findEntryWithLevel(f,l.level),d=oLe.select(n),v=d.selectAll("g.pathbar"),m=d.selectAll("g.slice");if(!h){v.remove(),m.remove();return}var b=ix.isHierarchyRoot(h),p=!o.uniformtext.mode&&ix.hasTransition(i),k=ix.getMaxDepth(l),M=function(Ae){return Ae.data.depth-h.data.depth<k},T=o._size,L=l.domain,x=T.w*(L.x[1]-L.x[0]),C=T.h*(L.y[1]-L.y[0]),S=x,g=l.pathbar.thickness,P=l.marker.line.width+JLt.gapWithPathbar,E=l.pathbar.visible?l.pathbar.side.indexOf("bottom")>-1?C+P:-(g+P):0,z={x0:S,x1:S,y0:E,y1:E+g},q=function(Ae,rt,St){var Tt=l.tiling.pad,dt=function(or){return or-Tt<=rt.x0},Et=function(or){return or+Tt>=rt.x1},pt=function(or){return or-Tt<=rt.y0},Xt=function(or){return or+Tt>=rt.y1};return Ae.x0===rt.x0&&Ae.x1===rt.x1&&Ae.y0===rt.y0&&Ae.y1===rt.y1?{x0:Ae.x0,x1:Ae.x1,y0:Ae.y0,y1:Ae.y1}:{x0:dt(Ae.x0-Tt)?0:Et(Ae.x0-Tt)?St[0]:Ae.x0,x1:dt(Ae.x1+Tt)?0:Et(Ae.x1+Tt)?St[0]:Ae.x1,y0:pt(Ae.y0-Tt)?0:Xt(Ae.y0-Tt)?St[1]:Ae.y0,y1:pt(Ae.y1+Tt)?0:Xt(Ae.y1+Tt)?St[1]:Ae.y1}},U=null,G={},Z={},j=null,N=function(Ae,rt){return rt?G[Z2(Ae)]:Z[Z2(Ae)]},H=function(Ae,rt,St,Tt){if(rt)return G[Z2(f)]||z;var dt=Z[l.level]||St;return M(Ae)?q(Ae,dt,Tt):{}};s.hasMultipleRoots&&b&&k++,l._maxDepth=k,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=b;var re=-x/2+T.l+T.w*(L.x[1]+L.x[0])/2,oe=-C/2+T.t+T.h*(1-(L.y[1]+L.y[0])/2),_e=function(Ae){return re+Ae},ke=function(Ae){return oe+Ae},Ce=ke(0),ge=_e(0),ie=function(Ae){return ge+Ae},Se=function(Ae){return Ce+Ae};function Ee(Ae,rt){return Ae+","+rt}var we=ie(0),De=function(Ae){Ae.x=Math.max(we,Ae.x)},Le=l.pathbar.edgeshape,me=function(Ae){var rt=ie(Math.max(Math.min(Ae.x0,Ae.x0),0)),St=ie(Math.min(Math.max(Ae.x1,Ae.x1),S)),Tt=Se(Ae.y0),dt=Se(Ae.y1),Et=g/2,pt={},Xt={};pt.x=rt,Xt.x=St,pt.y=Xt.y=(Tt+dt)/2;var or={x:rt,y:Tt},_r={x:St,y:Tt},Er={x:St,y:dt},ei={x:rt,y:dt};return Le===">"?(or.x-=Et,_r.x-=Et,Er.x-=Et,ei.x-=Et):Le==="/"?(Er.x-=Et,ei.x-=Et,pt.x-=Et/2,Xt.x-=Et/2):Le==="\\"?(or.x-=Et,_r.x-=Et,pt.x-=Et/2,Xt.x-=Et/2):Le==="<"&&(pt.x-=Et,Xt.x-=Et),De(or),De(ei),De(pt),De(_r),De(Er),De(Xt),"M"+Ee(or.x,or.y)+"L"+Ee(_r.x,_r.y)+"L"+Ee(Xt.x,Xt.y)+"L"+Ee(Er.x,Er.y)+"L"+Ee(ei.x,ei.y)+"L"+Ee(pt.x,pt.y)+"Z"},Pe=l[c?"tiling":"marker"].pad,ce=function(Ae){return l.textposition.indexOf(Ae)!==-1},He=ce("top"),lt=ce("left"),mt=ce("right"),Vt=ce("bottom"),st=function(Ae){var rt=_e(Ae.x0),St=_e(Ae.x1),Tt=ke(Ae.y0),dt=ke(Ae.y1),Et=St-rt,pt=dt-Tt;if(!Et||!pt)return"";var Xt=l.marker.cornerradius||0,or=Math.min(Xt,Et/2,pt/2);or&&Ae.data&&Ae.data.data&&Ae.data.data.label&&(He&&(or=Math.min(or,Pe.t)),lt&&(or=Math.min(or,Pe.l)),mt&&(or=Math.min(or,Pe.r)),Vt&&(or=Math.min(or,Pe.b)));var _r=function(Er,ei){return or?"a"+Ee(or,or)+" 0 0 1 "+Ee(Er,ei):""};return"M"+Ee(rt,Tt+or)+_r(or,-or)+"L"+Ee(St-or,Tt)+_r(or,or)+"L"+Ee(St,dt-or)+_r(-or,or)+"L"+Ee(rt+or,dt)+_r(-or,-or)+"Z"},ct=function(Ae,rt){var St=Ae.x0,Tt=Ae.x1,dt=Ae.y0,Et=Ae.y1,pt=Ae.textBB,Xt=He||rt.isHeader&&!Vt,or=Xt?"start":Vt?"end":"middle",_r=ce("right"),Er=ce("left")||rt.onPathbar,ei=Er?-1:_r?1:0;if(rt.isHeader){if(St+=(c?Pe:Pe.l)-sLe,Tt-=(c?Pe:Pe.r)-sLe,St>=Tt){var qr=(St+Tt)/2;St=qr,Tt=qr}var jr;Vt?(jr=Et-(c?Pe:Pe.b),dt<jr&&jr<Et&&(dt=jr)):(jr=dt+(c?Pe:Pe.t),dt<jr&&jr<Et&&(Et=jr))}var gt=YLt(St,Tt,dt,Et,pt,{isHorizontal:!1,constrained:!0,angle:0,anchor:or,leftToRight:ei});return gt.fontSize=rt.fontSize,gt.targetX=_e(gt.targetX),gt.targetY=ke(gt.targetY),isNaN(gt.targetX)||isNaN(gt.targetY)?{}:(St!==Tt&&dt!==Et&&sX(l.type,gt,o),{scale:gt.scale,rotate:gt.rotate,textX:gt.textX,textY:gt.textY,anchorX:gt.anchorX,anchorY:gt.anchorY,targetX:gt.targetX,targetY:gt.targetY})},Qt=function(Ae,rt){for(var St,Tt=0,dt=Ae;!St&&Tt<k;)Tt++,dt=dt.parent,dt?St=N(dt,rt):Tt=k;return St||{}},Ht=function(Ae,rt,St,Tt){var dt=N(Ae,rt),Et;if(rt)Et=z;else{var pt=N(h,rt);pt?Et=q(Ae,pt,Tt):Et={}}return oX(dt,Et)},nr=function(Ae,rt,St,Tt,dt){var Et=N(Ae,rt),pt;if(Et)pt=Et;else if(rt)pt=z;else if(U)if(Ae.parent){var Xt=j||St;Xt&&!rt?pt=q(Ae,Xt,Tt):(pt={},ek.extendFlat(pt,Qt(Ae,rt)))}else pt=ek.extendFlat({},Ae),c&&(dt.orientation==="h"?dt.flipX?pt.x0=Ae.x1:pt.x1=0:dt.flipY?pt.y0=Ae.y1:pt.y1=0);else pt={};return oX(pt,{x0:Ae.x0,x1:Ae.x1,y0:Ae.y0,y1:Ae.y1})},tt=function(Ae,rt,St,Tt){var dt=N(Ae,rt),Et={},pt=H(Ae,rt,St,Tt);ek.extendFlat(Et,{transform:ct({x0:pt.x0,x1:pt.x1,y0:pt.y0,y1:pt.y1,textBB:Ae.textBB,_text:Ae._text},{isHeader:ix.isHeader(Ae,l)})}),dt?Et=dt:Ae.parent&&ek.extendFlat(Et,Qt(Ae,rt));var Xt=Ae.transform;return Ae.x0!==Ae.x1&&Ae.y0!==Ae.y1&&sX(l.type,Xt,o),oX(Et,{transform:{scale:Xt.scale,rotate:Xt.rotate,textX:Xt.textX,textY:Xt.textY,anchorX:Xt.anchorX,anchorY:Xt.anchorY,targetX:Xt.targetX,targetY:Xt.targetY}})},je=function(Ae,rt,St,Tt,dt){var Et=Tt[0],pt=Tt[1];p?Ae.exit().transition().each(function(){var Xt=oLe.select(this),or=Xt.select("path.surface");or.transition().attrTween("d",function(Er){var ei=Ht(Er,rt,St,[Et,pt]);return function(qr){return dt(ei(qr))}});var _r=Xt.select("g.slicetext");_r.attr("opacity",0)}).remove():Ae.exit().remove()},Ue=function(Ae){var rt=Ae.transform;return Ae.x0!==Ae.x1&&Ae.y0!==Ae.y1&&sX(l.type,rt,o),ek.getTextTransform({textX:rt.textX,textY:rt.textY,anchorX:rt.anchorX,anchorY:rt.anchorY,targetX:rt.targetX,targetY:rt.targetY,scale:rt.scale,rotate:rt.rotate})};p&&(v.each(function(Ae){G[Z2(Ae)]={x0:Ae.x0,x1:Ae.x1,y0:Ae.y0,y1:Ae.y1},Ae.transform&&(G[Z2(Ae)].transform={textX:Ae.transform.textX,textY:Ae.transform.textY,anchorX:Ae.transform.anchorX,anchorY:Ae.transform.anchorY,targetX:Ae.transform.targetX,targetY:Ae.transform.targetY,scale:Ae.transform.scale,rotate:Ae.transform.rotate})}),m.each(function(Ae){Z[Z2(Ae)]={x0:Ae.x0,x1:Ae.x1,y0:Ae.y0,y1:Ae.y1},Ae.transform&&(Z[Z2(Ae)].transform={textX:Ae.transform.textX,textY:Ae.transform.textY,anchorX:Ae.transform.anchorX,anchorY:Ae.transform.anchorY,targetX:Ae.transform.targetX,targetY:Ae.transform.targetY,scale:Ae.transform.scale,rotate:Ae.transform.rotate}),!U&&ix.isEntry(Ae)&&(U=Ae)})),j=a(t,r,h,m,{width:x,height:C,viewX:_e,viewY:ke,pathSlice:st,toMoveInsideSlice:ct,prevEntry:U,makeUpdateSliceInterpolator:nr,makeUpdateTextInterpolator:tt,handleSlicesExit:je,hasTransition:p,strTransform:Ue}),l.pathbar.visible?$Lt(t,r,h,v,{barDifY:E,width:S,height:g,viewX:ie,viewY:Se,pathSlice:me,toMoveInsideSlice:ct,makeUpdateSliceInterpolator:nr,makeUpdateTextInterpolator:tt,handleSlicesExit:je,hasTransition:p,strTransform:Ue}):v.remove()}});var lX=ye((R0r,fLe)=>{"use strict";var QLt=qa(),ePt=i1(),tPt=bv(),rPt=tPt.clearMinTextSize,iPt=V0().resizeText,cLe=uLe();fLe.exports=function(t,r,n,i,a){var o=a.type,s=a.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,h=!n;if(rPt(o,l),c=u.selectAll("g.trace."+o).data(r,function(v){return v[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&ePt.hasTransition(n)){i&&(f=i());var d=QLt.transition().duration(n.duration).ease(n.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});d.each(function(){u.selectAll("g.trace").each(function(v){cLe(t,v,this,n,s)})})}else c.each(function(v){cLe(t,v,this,n,s)}),l.uniformtext.mode&&iPt(t,u.selectAll(".trace"),o);h&&c.exit().remove()}});var gLe=ye((D0r,pLe)=>{"use strict";var hLe=qa(),KD=Pr(),dLe=So(),nPt=Zl(),aPt=rX(),vLe=ZD().styleOne,uX=W2(),nx=i1(),oPt=$E(),sPt=WD().formatSliceLabel,cX=!1;pLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,m=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},M=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf("left")!==-1,S=x.textposition.indexOf("right")!==-1,g=x.textposition.indexOf("bottom")!==-1,P=!g&&!x.marker.pad.t||g&&!x.marker.pad.b,E=aPt(n,[o,s],{packing:x.tiling.packing,squarifyratio:x.tiling.squarifyratio,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,pad:{inner:x.tiling.pad,top:x.marker.pad.t,left:x.marker.pad.l,right:x.marker.pad.r,bottom:x.marker.pad.b}}),z=E.descendants(),q=1/0,U=-1/0;z.forEach(function(H){var re=H.depth;re>=x._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(q=Math.min(q,re),U=Math.max(U,re))}),i=i.data(z,nx.getPtId),x._maxVisibleLayers=isFinite(U)?U-q+1:0,i.enter().append("g").classed("slice",!0),v(i,cX,k,[o,s],c),i.order();var G=null;if(d&&p){var Z=nx.getPtId(p);i.each(function(H){G===null&&nx.getPtId(H)===Z&&(G={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var j=function(){return G||{x0:0,x1:o,y0:0,y1:s}},N=i;return d&&(N=N.transition().each("end",function(){var H=hLe.select(this);nx.setSliceCursor(H,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(H){var re=nx.isHeader(H,x);H._x0=l(H.x0),H._x1=l(H.x1),H._y0=u(H.y0),H._y1=u(H.y1),H._hoverX=l(H.x1-x.marker.pad.r),H._hoverY=u(g?H.y1-x.marker.pad.b/2:H.y0+x.marker.pad.t/2);var oe=hLe.select(this),_e=KD.ensureSingle(oe,"path","surface",function(Ee){Ee.style("pointer-events",M?"none":"all")});d?_e.transition().attrTween("d",function(Ee){var we=m(Ee,cX,j(),[o,s]);return function(De){return c(we(De))}}):_e.attr("d",c),oe.call(oPt,n,t,r,{styleOne:vLe,eventDataKeys:uX.eventDataKeys,transitionTime:uX.CLICK_TRANSITION_TIME,transitionEasing:uX.CLICK_TRANSITION_EASING}).call(nx.setSliceCursor,t,{isTransitioning:t._transitioning}),_e.call(vLe,H,x,t,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":re?H._text=P?"":nx.getPtLabel(H)||"":H._text=sPt(H,n,x,r,T)||"";var ke=KD.ensureSingle(oe,"g","slicetext"),Ce=KD.ensureSingle(ke,"text","",function(Ee){Ee.attr("data-notex",1)}),ge=KD.ensureUniformFontSize(t,nx.determineTextFont(x,H,T.font)),ie=H._text||" ",Se=re&&ie.indexOf("<br>")===-1;Ce.text(ie).classed("slicetext",!0).attr("text-anchor",S?"end":C||Se?"start":"middle").call(dLe.font,ge).call(nPt.convertToTspans,t),H.textBB=dLe.bBox(Ce.node()),H.transform=f(H,{fontSize:ge.size,isHeader:re}),H.transform.fontSize=ge.size,d?Ce.transition().attrTween("transform",function(Ee){var we=b(Ee,cX,j(),[o,s]);return function(De){return h(we(De))}}):Ce.attr("transform",h(H))}),G}});var yLe=ye((F0r,mLe)=>{"use strict";var lPt=lX(),uPt=gLe();mLe.exports=function(t,r,n,i){return lPt(t,r,n,i,{type:"treemap",drawDescendants:uPt})}});var xLe=ye((z0r,_Le)=>{"use strict";_Le.exports={moduleType:"trace",name:"treemap",basePlotModule:z6e(),categories:[],animatable:!0,attributes:XD(),layoutAttributes:$W(),supplyDefaults:j6e(),supplyLayoutDefaults:X6e(),calc:eX().calc,crossTraceCalc:eX().crossTraceCalc,plot:yLe(),style:ZD().style,colorbar:$d(),meta:{}}});var wLe=ye((q0r,bLe)=>{"use strict";bLe.exports=xLe()});var ALe=ye(HA=>{"use strict";var TLe=Mc();HA.name="icicle";HA.plot=function(e,t,r,n){TLe.plotBasePlot(HA.name,e,t,r,n)};HA.clean=function(e,t,r,n){TLe.cleanBasePlot(HA.name,e,t,r,n)}});var fX=ye((B0r,ELe)=>{"use strict";var{hovertemplateAttrs:cPt,texttemplateAttrs:fPt,templatefallbackAttrs:SLe}=Ll(),hPt=Tu(),dPt=Cc().attributes,tk=F2(),s0=OE(),JD=XD(),MLe=W2(),vPt=Ao().extendFlat,pPt=Pd().pattern;ELe.exports={labels:s0.labels,parents:s0.parents,values:s0.values,branchvalues:s0.branchvalues,count:s0.count,level:s0.level,maxdepth:s0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:JD.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:vPt({colors:s0.marker.colors,line:s0.marker.line,pattern:pPt,editType:"calc"},hPt("marker",{colorAttr:"colors",anim:!1})),leaf:s0.leaf,pathbar:JD.pathbar,text:tk.text,textinfo:s0.textinfo,texttemplate:fPt({editType:"plot"},{keys:MLe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:SLe({editType:"plot"}),hovertext:tk.hovertext,hoverinfo:s0.hoverinfo,hovertemplate:cPt({},{keys:MLe.eventDataKeys}),hovertemplatefallback:SLe(),textfont:tk.textfont,insidetextfont:tk.insidetextfont,outsidetextfont:JD.outsidetextfont,textposition:JD.textposition,sort:tk.sort,root:s0.root,domain:dPt({name:"icicle",trace:!0,editType:"calc"})}});var hX=ye((N0r,kLe)=>{"use strict";kLe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var ILe=ye((U0r,PLe)=>{"use strict";var CLe=Pr(),gPt=fX(),mPt=ka(),yPt=Cc().defaults,_Pt=i0().handleText,xPt=A_().TEXTPAD,bPt=z2().handleMarkerDefaults,LLe=tc(),wPt=LLe.hasColorscale,TPt=LLe.handleDefaults;PLe.exports=function(t,r,n,i){function a(d,v){return CLe.coerce(t,r,gPt,d,v)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("tiling.orientation"),a("tiling.flip"),a("tiling.pad");var u=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",CLe.isArrayOrTypedArray(u)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var c=a("pathbar.visible"),f="auto";_Pt(t,r,i,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),bPt(t,r,i,a);var h=r._hasColorscale=wPt(t,"marker","colors")||(t.marker||{}).coloraxis;h&&TPt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:mPt.contrast(i.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*xPt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),yPt(r,i,a),r._length=null}});var DLe=ye((V0r,RLe)=>{"use strict";var APt=Pr(),SPt=hX();RLe.exports=function(t,r){function n(i,a){return APt.coerce(t,r,SPt,i,a)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var vX=ye(dX=>{"use strict";var FLe=UE();dX.calc=function(e,t){return FLe.calc(e,t)};dX.crossTraceCalc=function(e){return FLe._runCrossTraceCalc("icicle",e)}});var qLe=ye((H0r,zLe)=>{"use strict";var MPt=BE(),EPt=tX();zLe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.orientation==="h",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=MPt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||i||a)&&EPt(c,r,{swapXY:o,flipX:i,flipY:a}),c}});var pX=ye((j0r,VLe)=>{"use strict";var OLe=qa(),BLe=ka(),NLe=Pr(),kPt=bv().resizeText,CPt=HD();function LPt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");kPt(e,t,"icicle"),t.each(function(r){var n=OLe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){OLe.select(this).call(ULe,o,a,e)})})}function ULe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=NLe.castOption(r,o,"marker.line.color")||BLe.defaultLine,l=NLe.castOption(r,o,"marker.line.width")||0;e.call(CPt,t,r,n).style("stroke-width",l).call(BLe.stroke,s).style("opacity",a?r.leaf.opacity:null)}VLe.exports={style:LPt,styleOne:ULe}});var XLe=ye((W0r,WLe)=>{"use strict";var GLe=qa(),$D=Pr(),HLe=So(),PPt=Zl(),IPt=qLe(),jLe=pX().styleOne,gX=W2(),jA=i1(),RPt=$E(),DPt=WD().formatSliceLabel,mX=!1;WLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,m=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},M=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf("left")!==-1,S=x.textposition.indexOf("right")!==-1,g=x.textposition.indexOf("bottom")!==-1,P=IPt(n,[o,s],{flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,orientation:x.tiling.orientation,pad:{inner:x.tiling.pad},maxDepth:x._maxDepth}),E=P.descendants(),z=1/0,q=-1/0;E.forEach(function(N){var H=N.depth;H>=x._maxDepth?(N.x0=N.x1=(N.x0+N.x1)/2,N.y0=N.y1=(N.y0+N.y1)/2):(z=Math.min(z,H),q=Math.max(q,H))}),i=i.data(E,jA.getPtId),x._maxVisibleLayers=isFinite(q)?q-z+1:0,i.enter().append("g").classed("slice",!0),v(i,mX,k,[o,s],c),i.order();var U=null;if(d&&p){var G=jA.getPtId(p);i.each(function(N){U===null&&jA.getPtId(N)===G&&(U={x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1})})}var Z=function(){return U||{x0:0,x1:o,y0:0,y1:s}},j=i;return d&&(j=j.transition().each("end",function(){var N=GLe.select(this);jA.setSliceCursor(N,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(N){N._x0=l(N.x0),N._x1=l(N.x1),N._y0=u(N.y0),N._y1=u(N.y1),N._hoverX=l(N.x1-x.tiling.pad),N._hoverY=u(g?N.y1-x.tiling.pad/2:N.y0+x.tiling.pad/2);var H=GLe.select(this),re=$D.ensureSingle(H,"path","surface",function(Ce){Ce.style("pointer-events",M?"none":"all")});d?re.transition().attrTween("d",function(Ce){var ge=m(Ce,mX,Z(),[o,s],{orientation:x.tiling.orientation,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1});return function(ie){return c(ge(ie))}}):re.attr("d",c),H.call(RPt,n,t,r,{styleOne:jLe,eventDataKeys:gX.eventDataKeys,transitionTime:gX.CLICK_TRANSITION_TIME,transitionEasing:gX.CLICK_TRANSITION_EASING}).call(jA.setSliceCursor,t,{isTransitioning:t._transitioning}),re.call(jLe,N,x,t,{hovered:!1}),N.x0===N.x1||N.y0===N.y1?N._text="":N._text=DPt(N,n,x,r,T)||"";var oe=$D.ensureSingle(H,"g","slicetext"),_e=$D.ensureSingle(oe,"text","",function(Ce){Ce.attr("data-notex",1)}),ke=$D.ensureUniformFontSize(t,jA.determineTextFont(x,N,T.font));_e.text(N._text||" ").classed("slicetext",!0).attr("text-anchor",S?"end":C?"start":"middle").call(HLe.font,ke).call(PPt.convertToTspans,t),N.textBB=HLe.bBox(_e.node()),N.transform=f(N,{fontSize:ke.size}),N.transform.fontSize=ke.size,d?_e.transition().attrTween("transform",function(Ce){var ge=b(Ce,mX,Z(),[o,s]);return function(ie){return h(ge(ie))}}):_e.attr("transform",h(N))}),U}});var YLe=ye((X0r,ZLe)=>{"use strict";var FPt=lX(),zPt=XLe();ZLe.exports=function(t,r,n,i){return FPt(t,r,n,i,{type:"icicle",drawDescendants:zPt})}});var JLe=ye((Z0r,KLe)=>{"use strict";KLe.exports={moduleType:"trace",name:"icicle",basePlotModule:ALe(),categories:[],animatable:!0,attributes:fX(),layoutAttributes:hX(),supplyDefaults:ILe(),supplyLayoutDefaults:DLe(),calc:vX().calc,crossTraceCalc:vX().crossTraceCalc,plot:YLe(),style:pX().style,colorbar:$d(),meta:{}}});var QLe=ye((Y0r,$Le)=>{"use strict";$Le.exports=JLe()});var tPe=ye(WA=>{"use strict";var ePe=Mc();WA.name="funnelarea";WA.plot=function(e,t,r,n){ePe.plotBasePlot(WA.name,e,t,r,n)};WA.clean=function(e,t,r,n){ePe.cleanBasePlot(WA.name,e,t,r,n)}});var yX=ye((J0r,iPe)=>{"use strict";var iv=F2(),qPt=Gl(),OPt=Cc().attributes,{hovertemplateAttrs:BPt,texttemplateAttrs:NPt,templatefallbackAttrs:rPe}=Ll(),Y2=Ao().extendFlat;iPe.exports={labels:iv.labels,label0:iv.label0,dlabel:iv.dlabel,values:iv.values,marker:{colors:iv.marker.colors,line:{color:Y2({},iv.marker.line.color,{dflt:null}),width:Y2({},iv.marker.line.width,{dflt:1}),editType:"calc"},pattern:iv.marker.pattern,editType:"calc"},text:iv.text,hovertext:iv.hovertext,scalegroup:Y2({},iv.scalegroup,{}),textinfo:Y2({},iv.textinfo,{flags:["label","text","value","percent"]}),texttemplate:NPt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:rPe({editType:"plot"}),hoverinfo:Y2({},qPt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:BPt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:rPe(),textposition:Y2({},iv.textposition,{values:["inside","none"],dflt:"inside"}),textfont:iv.textfont,insidetextfont:iv.insidetextfont,title:{text:iv.title.text,font:iv.title.font,position:Y2({},iv.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:OPt({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}});var _X=ye(($0r,nPe)=>{"use strict";var UPt=_D().hiddenlabels;nPe.exports={hiddenlabels:UPt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var sPe=ye((Q0r,oPe)=>{"use strict";var aPe=Pr(),VPt=yX(),GPt=Cc().defaults,HPt=i0().handleText,jPt=z2().handleLabelsAndValues,WPt=z2().handleMarkerDefaults;oPe.exports=function(t,r,n,i){function a(m,b){return aPe.coerce(t,r,VPt,m,b)}var o=a("labels"),s=a("values"),l=jPt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(a("label0"),a("dlabel")),!u){r.visible=!1;return}r._length=u,WPt(t,r,i,a),a("scalegroup");var c=a("text"),f=a("texttemplate");a("texttemplatefallback");var h;if(f||(h=a("textinfo",Array.isArray(c)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),f||h&&h!=="none"){var d=a("textposition");HPt(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");GPt(r,i,a);var v=a("title.text");v&&(a("title.position"),aPe.coerceFont(a,"title.font",i.font)),a("aspectratio"),a("baseratio")}});var uPe=ye((egr,lPe)=>{"use strict";var XPt=Pr(),ZPt=_X();lPe.exports=function(t,r){function n(i,a){return XPt.coerce(t,r,ZPt,i,a)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var xX=ye((tgr,fPe)=>{"use strict";var cPe=kA();function YPt(e,t){return cPe.calc(e,t)}function KPt(e){cPe.crossTraceCalc(e,{type:"funnelarea"})}fPe.exports={calc:YPt,crossTraceCalc:KPt}});var gPe=ye((rgr,pPe)=>{"use strict";var K2=qa(),bX=So(),ax=Pr(),JPt=ax.strScale,hPe=ax.strTranslate,dPe=Zl(),$Pt=d2(),QPt=$Pt.toMoveInsideBar,vPe=bv(),eIt=vPe.recordMinTextSize,tIt=vPe.clearMinTextSize,rIt=g_(),XA=TD(),iIt=XA.attachFxHandlers,nIt=XA.determineInsideTextFont,aIt=XA.layoutAreas,oIt=XA.prerenderTitles,sIt=XA.positionTitleOutside,lIt=XA.formatSliceLabel;pPe.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;tIt("funnelarea",i),oIt(r,t),aIt(r,i._size),ax.makeTraceGroups(i._funnelarealayer,r,"trace").each(function(a){var o=K2.select(this),s=a[0],l=s.trace;cIt(a),o.each(function(){var u=K2.select(this).selectAll("g.slice").data(a);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,h){if(f.hidden){K2.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var d=s.cx,v=s.cy,m=K2.select(this),b=m.selectAll("path.surface").data([f]);b.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),m.call(iIt,t,a);var p="M"+(d+f.TR[0])+","+(v+f.TR[1])+wX(f.TR,f.BR)+wX(f.BR,f.BL)+wX(f.BL,f.TL)+"Z";b.attr("d",p),lIt(t,f,s);var k=rIt.castOption(l.textposition,f.pts),M=m.selectAll("g.slicetext").data(f.text&&k!=="none"?[0]:[]);M.enter().append("g").classed("slicetext",!0),M.exit().remove(),M.each(function(){var T=ax.ensureSingle(K2.select(this),"text","",function(z){z.attr("data-notex",1)}),L=ax.ensureUniformFontSize(t,nIt(l,f,i.font));T.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(bX.font,L).call(dPe.convertToTspans,t);var x=bX.bBox(T.node()),C,S,g,P=Math.min(f.BL[1],f.BR[1])+v,E=Math.max(f.TL[1],f.TR[1])+v;S=Math.max(f.TL[0],f.BL[0])+d,g=Math.min(f.TR[0],f.BR[0])+d,C=QPt(S,g,P,E,x,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),C.fontSize=L.size,eIt(l.type,C,i),a[h].transform=C,ax.setTransormAndDisplay(T,C)})});var c=K2.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);c.enter().append("g").classed("titletext",!0),c.exit().remove(),c.each(function(){var f=ax.ensureSingle(K2.select(this),"text","",function(v){v.attr("data-notex",1)}),h=l.title.text;l._meta&&(h=ax.templateString(h,l._meta)),f.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(bX.font,l.title.font).call(dPe.convertToTspans,t);var d=sIt(s,i._size);f.attr("transform",hPe(d.x,d.y)+JPt(Math.min(1,d.scale))+hPe(d.tx,d.ty))})})})};function wX(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function uIt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function cIt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a=Math.pow(i,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var q=Math.sqrt(u);return{x:q,y:-q}}function f(){var q=c();return[q.x,q.y]}var h,d=[];d.push(f());var v,m;for(v=e.length-1;v>-1;v--)if(m=e[v],!m.hidden){var b=m.v/l;u+=b,d.push(f())}var p=1/0,k=-1/0;for(v=0;v<d.length;v++)h=d[v],p=Math.min(p,h[1]),k=Math.max(k,h[1]);for(v=0;v<d.length;v++)d[v][1]-=(k+p)/2;var M=d[d.length-1][0],T=t.r,L=(k-p)/2,x=T/M,C=T/L*n;for(t.r=C*L,v=0;v<d.length;v++)d[v][0]*=x,d[v][1]*=C;h=d[0];var S=[-h[0],h[1]],g=[h[0],h[1]],P=0;for(v=e.length-1;v>-1;v--)if(m=e[v],!m.hidden){P+=1;var E=d[P][0],z=d[P][1];m.TL=[-E,z],m.TR=[E,z],m.BL=S,m.BR=g,m.pxmid=uIt(m.TR,m.BR),S=m.TL,g=m.TR}}});var _Pe=ye((igr,yPe)=>{"use strict";var mPe=qa(),fIt=Z3(),hIt=bv().resizeText;yPe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");hIt(t,r,"funnelarea"),r.each(function(n){var i=n[0],a=i.trace,o=mPe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){mPe.select(this).call(fIt,s,a,t)})})}});var bPe=ye((ngr,xPe)=>{"use strict";xPe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:tPe(),categories:["pie-like","funnelarea","showLegend"],attributes:yX(),layoutAttributes:_X(),supplyDefaults:sPe(),supplyLayoutDefaults:uPe(),calc:xX().calc,crossTraceCalc:xX().crossTraceCalc,plot:gPe(),style:_Pe(),styleOne:Z3(),meta:{}}});var TPe=ye((agr,wPe)=>{"use strict";wPe.exports=bPe()});var zd=ye((ogr,APe)=>{(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 l(tt){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(je){return typeof je}:function(je){return je&&typeof Symbol=="function"&&je.constructor===Symbol&&je!==Symbol.prototype?"symbol":typeof je},l(tt)}var u=o(7507),c=o(3778),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.hp=m,s=P,a.IS=50;var h=2147483647;s=h,m.TYPED_ARRAY_SUPPORT=d(),!m.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 d(){try{var tt=new Uint8Array(1),je={foo:function(){return 42}};return Object.setPrototypeOf(je,Uint8Array.prototype),Object.setPrototypeOf(tt,je),tt.foo()===42}catch(Ue){return!1}}Object.defineProperty(m.prototype,"parent",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.buffer}}),Object.defineProperty(m.prototype,"offset",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.byteOffset}});function v(tt){if(tt>h)throw new RangeError('The value "'+tt+'" is invalid for option "size"');var je=new Uint8Array(tt);return Object.setPrototypeOf(je,m.prototype),je}function m(tt,je,Ue){if(typeof tt=="number"){if(typeof je=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return M(tt)}return b(tt,je,Ue)}m.poolSize=8192;function b(tt,je,Ue){if(typeof tt=="string")return T(tt,je);if(ArrayBuffer.isView(tt))return x(tt);if(tt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(tt));if(Qt(tt,ArrayBuffer)||tt&&Qt(tt.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Qt(tt,SharedArrayBuffer)||tt&&Qt(tt.buffer,SharedArrayBuffer)))return C(tt,je,Ue);if(typeof tt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ae=tt.valueOf&&tt.valueOf();if(Ae!=null&&Ae!==tt)return m.from(Ae,je,Ue);var rt=S(tt);if(rt)return rt;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof tt[Symbol.toPrimitive]=="function")return m.from(tt[Symbol.toPrimitive]("string"),je,Ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(tt))}m.from=function(tt,je,Ue){return b(tt,je,Ue)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array);function p(tt){if(typeof tt!="number")throw new TypeError('"size" argument must be of type number');if(tt<0)throw new RangeError('The value "'+tt+'" is invalid for option "size"')}function k(tt,je,Ue){return p(tt),tt<=0?v(tt):je!==void 0?typeof Ue=="string"?v(tt).fill(je,Ue):v(tt).fill(je):v(tt)}m.alloc=function(tt,je,Ue){return k(tt,je,Ue)};function M(tt){return p(tt),v(tt<0?0:g(tt)|0)}m.allocUnsafe=function(tt){return M(tt)},m.allocUnsafeSlow=function(tt){return M(tt)};function T(tt,je){if((typeof je!="string"||je==="")&&(je="utf8"),!m.isEncoding(je))throw new TypeError("Unknown encoding: "+je);var Ue=E(tt,je)|0,Ae=v(Ue),rt=Ae.write(tt,je);return rt!==Ue&&(Ae=Ae.slice(0,rt)),Ae}function L(tt){for(var je=tt.length<0?0:g(tt.length)|0,Ue=v(je),Ae=0;Ae<je;Ae+=1)Ue[Ae]=tt[Ae]&255;return Ue}function x(tt){if(Qt(tt,Uint8Array)){var je=new Uint8Array(tt);return C(je.buffer,je.byteOffset,je.byteLength)}return L(tt)}function C(tt,je,Ue){if(je<0||tt.byteLength<je)throw new RangeError('"offset" is outside of buffer bounds');if(tt.byteLength<je+(Ue||0))throw new RangeError('"length" is outside of buffer bounds');var Ae;return je===void 0&&Ue===void 0?Ae=new Uint8Array(tt):Ue===void 0?Ae=new Uint8Array(tt,je):Ae=new Uint8Array(tt,je,Ue),Object.setPrototypeOf(Ae,m.prototype),Ae}function S(tt){if(m.isBuffer(tt)){var je=g(tt.length)|0,Ue=v(je);return Ue.length===0||tt.copy(Ue,0,0,je),Ue}if(tt.length!==void 0)return typeof tt.length!="number"||Ht(tt.length)?v(0):L(tt);if(tt.type==="Buffer"&&Array.isArray(tt.data))return L(tt.data)}function g(tt){if(tt>=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return tt|0}function P(tt){return+tt!=tt&&(tt=0),m.alloc(+tt)}m.isBuffer=function(je){return je!=null&&je._isBuffer===!0&&je!==m.prototype},m.compare=function(je,Ue){if(Qt(je,Uint8Array)&&(je=m.from(je,je.offset,je.byteLength)),Qt(Ue,Uint8Array)&&(Ue=m.from(Ue,Ue.offset,Ue.byteLength)),!m.isBuffer(je)||!m.isBuffer(Ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(je===Ue)return 0;for(var Ae=je.length,rt=Ue.length,St=0,Tt=Math.min(Ae,rt);St<Tt;++St)if(je[St]!==Ue[St]){Ae=je[St],rt=Ue[St];break}return Ae<rt?-1:rt<Ae?1:0},m.isEncoding=function(je){switch(String(je).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}},m.concat=function(je,Ue){if(!Array.isArray(je))throw new TypeError('"list" argument must be an Array of Buffers');if(je.length===0)return m.alloc(0);var Ae;if(Ue===void 0)for(Ue=0,Ae=0;Ae<je.length;++Ae)Ue+=je[Ae].length;var rt=m.allocUnsafe(Ue),St=0;for(Ae=0;Ae<je.length;++Ae){var Tt=je[Ae];if(Qt(Tt,Uint8Array))St+Tt.length>rt.length?m.from(Tt).copy(rt,St):Uint8Array.prototype.set.call(rt,Tt,St);else if(m.isBuffer(Tt))Tt.copy(rt,St);else throw new TypeError('"list" argument must be an Array of Buffers');St+=Tt.length}return rt};function E(tt,je){if(m.isBuffer(tt))return tt.length;if(ArrayBuffer.isView(tt)||Qt(tt,ArrayBuffer))return tt.byteLength;if(typeof tt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(tt));var Ue=tt.length,Ae=arguments.length>2&&arguments[2]===!0;if(!Ae&&Ue===0)return 0;for(var rt=!1;;)switch(je){case"ascii":case"latin1":case"binary":return Ue;case"utf8":case"utf-8":return lt(tt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ue*2;case"hex":return Ue>>>1;case"base64":return st(tt).length;default:if(rt)return Ae?-1:lt(tt).length;je=(""+je).toLowerCase(),rt=!0}}m.byteLength=E;function z(tt,je,Ue){var Ae=!1;if((je===void 0||je<0)&&(je=0),je>this.length||((Ue===void 0||Ue>this.length)&&(Ue=this.length),Ue<=0)||(Ue>>>=0,je>>>=0,Ue<=je))return"";for(tt||(tt="utf8");;)switch(tt){case"hex":return Se(this,je,Ue);case"utf8":case"utf-8":return _e(this,je,Ue);case"ascii":return ge(this,je,Ue);case"latin1":case"binary":return ie(this,je,Ue);case"base64":return oe(this,je,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ee(this,je,Ue);default:if(Ae)throw new TypeError("Unknown encoding: "+tt);tt=(tt+"").toLowerCase(),Ae=!0}}m.prototype._isBuffer=!0;function q(tt,je,Ue){var Ae=tt[je];tt[je]=tt[Ue],tt[Ue]=Ae}m.prototype.swap16=function(){var je=this.length;if(je%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ue=0;Ue<je;Ue+=2)q(this,Ue,Ue+1);return this},m.prototype.swap32=function(){var je=this.length;if(je%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Ue=0;Ue<je;Ue+=4)q(this,Ue,Ue+3),q(this,Ue+1,Ue+2);return this},m.prototype.swap64=function(){var je=this.length;if(je%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Ue=0;Ue<je;Ue+=8)q(this,Ue,Ue+7),q(this,Ue+1,Ue+6),q(this,Ue+2,Ue+5),q(this,Ue+3,Ue+4);return this},m.prototype.toString=function(){var je=this.length;return je===0?"":arguments.length===0?_e(this,0,je):z.apply(this,arguments)},m.prototype.toLocaleString=m.prototype.toString,m.prototype.equals=function(je){if(!m.isBuffer(je))throw new TypeError("Argument must be a Buffer");return this===je?!0:m.compare(this,je)===0},m.prototype.inspect=function(){var je="",Ue=a.IS;return je=this.toString("hex",0,Ue).replace(/(.{2})/g,"$1 ").trim(),this.length>Ue&&(je+=" ... "),"<Buffer "+je+">"},f&&(m.prototype[f]=m.prototype.inspect),m.prototype.compare=function(je,Ue,Ae,rt,St){if(Qt(je,Uint8Array)&&(je=m.from(je,je.offset,je.byteLength)),!m.isBuffer(je))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(je));if(Ue===void 0&&(Ue=0),Ae===void 0&&(Ae=je?je.length:0),rt===void 0&&(rt=0),St===void 0&&(St=this.length),Ue<0||Ae>je.length||rt<0||St>this.length)throw new RangeError("out of range index");if(rt>=St&&Ue>=Ae)return 0;if(rt>=St)return-1;if(Ue>=Ae)return 1;if(Ue>>>=0,Ae>>>=0,rt>>>=0,St>>>=0,this===je)return 0;for(var Tt=St-rt,dt=Ae-Ue,Et=Math.min(Tt,dt),pt=this.slice(rt,St),Xt=je.slice(Ue,Ae),or=0;or<Et;++or)if(pt[or]!==Xt[or]){Tt=pt[or],dt=Xt[or];break}return Tt<dt?-1:dt<Tt?1:0};function U(tt,je,Ue,Ae,rt){if(tt.length===0)return-1;if(typeof Ue=="string"?(Ae=Ue,Ue=0):Ue>2147483647?Ue=2147483647:Ue<-2147483648&&(Ue=-2147483648),Ue=+Ue,Ht(Ue)&&(Ue=rt?0:tt.length-1),Ue<0&&(Ue=tt.length+Ue),Ue>=tt.length){if(rt)return-1;Ue=tt.length-1}else if(Ue<0)if(rt)Ue=0;else return-1;if(typeof je=="string"&&(je=m.from(je,Ae)),m.isBuffer(je))return je.length===0?-1:G(tt,je,Ue,Ae,rt);if(typeof je=="number")return je=je&255,typeof Uint8Array.prototype.indexOf=="function"?rt?Uint8Array.prototype.indexOf.call(tt,je,Ue):Uint8Array.prototype.lastIndexOf.call(tt,je,Ue):G(tt,[je],Ue,Ae,rt);throw new TypeError("val must be string, number or Buffer")}function G(tt,je,Ue,Ae,rt){var St=1,Tt=tt.length,dt=je.length;if(Ae!==void 0&&(Ae=String(Ae).toLowerCase(),Ae==="ucs2"||Ae==="ucs-2"||Ae==="utf16le"||Ae==="utf-16le")){if(tt.length<2||je.length<2)return-1;St=2,Tt/=2,dt/=2,Ue/=2}function Et(Er,ei){return St===1?Er[ei]:Er.readUInt16BE(ei*St)}var pt;if(rt){var Xt=-1;for(pt=Ue;pt<Tt;pt++)if(Et(tt,pt)===Et(je,Xt===-1?0:pt-Xt)){if(Xt===-1&&(Xt=pt),pt-Xt+1===dt)return Xt*St}else Xt!==-1&&(pt-=pt-Xt),Xt=-1}else for(Ue+dt>Tt&&(Ue=Tt-dt),pt=Ue;pt>=0;pt--){for(var or=!0,_r=0;_r<dt;_r++)if(Et(tt,pt+_r)!==Et(je,_r)){or=!1;break}if(or)return pt}return-1}m.prototype.includes=function(je,Ue,Ae){return this.indexOf(je,Ue,Ae)!==-1},m.prototype.indexOf=function(je,Ue,Ae){return U(this,je,Ue,Ae,!0)},m.prototype.lastIndexOf=function(je,Ue,Ae){return U(this,je,Ue,Ae,!1)};function Z(tt,je,Ue,Ae){Ue=Number(Ue)||0;var rt=tt.length-Ue;Ae?(Ae=Number(Ae),Ae>rt&&(Ae=rt)):Ae=rt;var St=je.length;Ae>St/2&&(Ae=St/2);for(var Tt=0;Tt<Ae;++Tt){var dt=parseInt(je.substr(Tt*2,2),16);if(Ht(dt))return Tt;tt[Ue+Tt]=dt}return Tt}function j(tt,je,Ue,Ae){return ct(lt(je,tt.length-Ue),tt,Ue,Ae)}function N(tt,je,Ue,Ae){return ct(mt(je),tt,Ue,Ae)}function H(tt,je,Ue,Ae){return ct(st(je),tt,Ue,Ae)}function re(tt,je,Ue,Ae){return ct(Vt(je,tt.length-Ue),tt,Ue,Ae)}m.prototype.write=function(je,Ue,Ae,rt){if(Ue===void 0)rt="utf8",Ae=this.length,Ue=0;else if(Ae===void 0&&typeof Ue=="string")rt=Ue,Ae=this.length,Ue=0;else if(isFinite(Ue))Ue=Ue>>>0,isFinite(Ae)?(Ae=Ae>>>0,rt===void 0&&(rt="utf8")):(rt=Ae,Ae=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var St=this.length-Ue;if((Ae===void 0||Ae>St)&&(Ae=St),je.length>0&&(Ae<0||Ue<0)||Ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");rt||(rt="utf8");for(var Tt=!1;;)switch(rt){case"hex":return Z(this,je,Ue,Ae);case"utf8":case"utf-8":return j(this,je,Ue,Ae);case"ascii":case"latin1":case"binary":return N(this,je,Ue,Ae);case"base64":return H(this,je,Ue,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,je,Ue,Ae);default:if(Tt)throw new TypeError("Unknown encoding: "+rt);rt=(""+rt).toLowerCase(),Tt=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(tt,je,Ue){return je===0&&Ue===tt.length?u.fromByteArray(tt):u.fromByteArray(tt.slice(je,Ue))}function _e(tt,je,Ue){Ue=Math.min(tt.length,Ue);for(var Ae=[],rt=je;rt<Ue;){var St=tt[rt],Tt=null,dt=St>239?4:St>223?3:St>191?2:1;if(rt+dt<=Ue){var Et,pt,Xt,or;switch(dt){case 1:St<128&&(Tt=St);break;case 2:Et=tt[rt+1],(Et&192)===128&&(or=(St&31)<<6|Et&63,or>127&&(Tt=or));break;case 3:Et=tt[rt+1],pt=tt[rt+2],(Et&192)===128&&(pt&192)===128&&(or=(St&15)<<12|(Et&63)<<6|pt&63,or>2047&&(or<55296||or>57343)&&(Tt=or));break;case 4:Et=tt[rt+1],pt=tt[rt+2],Xt=tt[rt+3],(Et&192)===128&&(pt&192)===128&&(Xt&192)===128&&(or=(St&15)<<18|(Et&63)<<12|(pt&63)<<6|Xt&63,or>65535&&or<1114112&&(Tt=or))}}Tt===null?(Tt=65533,dt=1):Tt>65535&&(Tt-=65536,Ae.push(Tt>>>10&1023|55296),Tt=56320|Tt&1023),Ae.push(Tt),rt+=dt}return Ce(Ae)}var ke=4096;function Ce(tt){var je=tt.length;if(je<=ke)return String.fromCharCode.apply(String,tt);for(var Ue="",Ae=0;Ae<je;)Ue+=String.fromCharCode.apply(String,tt.slice(Ae,Ae+=ke));return Ue}function ge(tt,je,Ue){var Ae="";Ue=Math.min(tt.length,Ue);for(var rt=je;rt<Ue;++rt)Ae+=String.fromCharCode(tt[rt]&127);return Ae}function ie(tt,je,Ue){var Ae="";Ue=Math.min(tt.length,Ue);for(var rt=je;rt<Ue;++rt)Ae+=String.fromCharCode(tt[rt]);return Ae}function Se(tt,je,Ue){var Ae=tt.length;(!je||je<0)&&(je=0),(!Ue||Ue<0||Ue>Ae)&&(Ue=Ae);for(var rt="",St=je;St<Ue;++St)rt+=nr[tt[St]];return rt}function Ee(tt,je,Ue){for(var Ae=tt.slice(je,Ue),rt="",St=0;St<Ae.length-1;St+=2)rt+=String.fromCharCode(Ae[St]+Ae[St+1]*256);return rt}m.prototype.slice=function(je,Ue){var Ae=this.length;je=~~je,Ue=Ue===void 0?Ae:~~Ue,je<0?(je+=Ae,je<0&&(je=0)):je>Ae&&(je=Ae),Ue<0?(Ue+=Ae,Ue<0&&(Ue=0)):Ue>Ae&&(Ue=Ae),Ue<je&&(Ue=je);var rt=this.subarray(je,Ue);return Object.setPrototypeOf(rt,m.prototype),rt};function we(tt,je,Ue){if(tt%1!==0||tt<0)throw new RangeError("offset is not uint");if(tt+je>Ue)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(je,Ue,Ae){je=je>>>0,Ue=Ue>>>0,Ae||we(je,Ue,this.length);for(var rt=this[je],St=1,Tt=0;++Tt<Ue&&(St*=256);)rt+=this[je+Tt]*St;return rt},m.prototype.readUintBE=m.prototype.readUIntBE=function(je,Ue,Ae){je=je>>>0,Ue=Ue>>>0,Ae||we(je,Ue,this.length);for(var rt=this[je+--Ue],St=1;Ue>0&&(St*=256);)rt+=this[je+--Ue]*St;return rt},m.prototype.readUint8=m.prototype.readUInt8=function(je,Ue){return je=je>>>0,Ue||we(je,1,this.length),this[je]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(je,Ue){return je=je>>>0,Ue||we(je,2,this.length),this[je]|this[je+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(je,Ue){return je=je>>>0,Ue||we(je,2,this.length),this[je]<<8|this[je+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),(this[je]|this[je+1]<<8|this[je+2]<<16)+this[je+3]*16777216},m.prototype.readUint32BE=m.prototype.readUInt32BE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),this[je]*16777216+(this[je+1]<<16|this[je+2]<<8|this[je+3])},m.prototype.readIntLE=function(je,Ue,Ae){je=je>>>0,Ue=Ue>>>0,Ae||we(je,Ue,this.length);for(var rt=this[je],St=1,Tt=0;++Tt<Ue&&(St*=256);)rt+=this[je+Tt]*St;return St*=128,rt>=St&&(rt-=Math.pow(2,8*Ue)),rt},m.prototype.readIntBE=function(je,Ue,Ae){je=je>>>0,Ue=Ue>>>0,Ae||we(je,Ue,this.length);for(var rt=Ue,St=1,Tt=this[je+--rt];rt>0&&(St*=256);)Tt+=this[je+--rt]*St;return St*=128,Tt>=St&&(Tt-=Math.pow(2,8*Ue)),Tt},m.prototype.readInt8=function(je,Ue){return je=je>>>0,Ue||we(je,1,this.length),this[je]&128?(255-this[je]+1)*-1:this[je]},m.prototype.readInt16LE=function(je,Ue){je=je>>>0,Ue||we(je,2,this.length);var Ae=this[je]|this[je+1]<<8;return Ae&32768?Ae|4294901760:Ae},m.prototype.readInt16BE=function(je,Ue){je=je>>>0,Ue||we(je,2,this.length);var Ae=this[je+1]|this[je]<<8;return Ae&32768?Ae|4294901760:Ae},m.prototype.readInt32LE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),this[je]|this[je+1]<<8|this[je+2]<<16|this[je+3]<<24},m.prototype.readInt32BE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),this[je]<<24|this[je+1]<<16|this[je+2]<<8|this[je+3]},m.prototype.readFloatLE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),c.read(this,je,!0,23,4)},m.prototype.readFloatBE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),c.read(this,je,!1,23,4)},m.prototype.readDoubleLE=function(je,Ue){return je=je>>>0,Ue||we(je,8,this.length),c.read(this,je,!0,52,8)},m.prototype.readDoubleBE=function(je,Ue){return je=je>>>0,Ue||we(je,8,this.length),c.read(this,je,!1,52,8)};function De(tt,je,Ue,Ae,rt,St){if(!m.isBuffer(tt))throw new TypeError('"buffer" argument must be a Buffer instance');if(je>rt||je<St)throw new RangeError('"value" argument is out of bounds');if(Ue+Ae>tt.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(je,Ue,Ae,rt){if(je=+je,Ue=Ue>>>0,Ae=Ae>>>0,!rt){var St=Math.pow(2,8*Ae)-1;De(this,je,Ue,Ae,St,0)}var Tt=1,dt=0;for(this[Ue]=je&255;++dt<Ae&&(Tt*=256);)this[Ue+dt]=je/Tt&255;return Ue+Ae},m.prototype.writeUintBE=m.prototype.writeUIntBE=function(je,Ue,Ae,rt){if(je=+je,Ue=Ue>>>0,Ae=Ae>>>0,!rt){var St=Math.pow(2,8*Ae)-1;De(this,je,Ue,Ae,St,0)}var Tt=Ae-1,dt=1;for(this[Ue+Tt]=je&255;--Tt>=0&&(dt*=256);)this[Ue+Tt]=je/dt&255;return Ue+Ae},m.prototype.writeUint8=m.prototype.writeUInt8=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,1,255,0),this[Ue]=je&255,Ue+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,2,65535,0),this[Ue]=je&255,this[Ue+1]=je>>>8,Ue+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,2,65535,0),this[Ue]=je>>>8,this[Ue+1]=je&255,Ue+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,4,4294967295,0),this[Ue+3]=je>>>24,this[Ue+2]=je>>>16,this[Ue+1]=je>>>8,this[Ue]=je&255,Ue+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,4,4294967295,0),this[Ue]=je>>>24,this[Ue+1]=je>>>16,this[Ue+2]=je>>>8,this[Ue+3]=je&255,Ue+4},m.prototype.writeIntLE=function(je,Ue,Ae,rt){if(je=+je,Ue=Ue>>>0,!rt){var St=Math.pow(2,8*Ae-1);De(this,je,Ue,Ae,St-1,-St)}var Tt=0,dt=1,Et=0;for(this[Ue]=je&255;++Tt<Ae&&(dt*=256);)je<0&&Et===0&&this[Ue+Tt-1]!==0&&(Et=1),this[Ue+Tt]=(je/dt>>0)-Et&255;return Ue+Ae},m.prototype.writeIntBE=function(je,Ue,Ae,rt){if(je=+je,Ue=Ue>>>0,!rt){var St=Math.pow(2,8*Ae-1);De(this,je,Ue,Ae,St-1,-St)}var Tt=Ae-1,dt=1,Et=0;for(this[Ue+Tt]=je&255;--Tt>=0&&(dt*=256);)je<0&&Et===0&&this[Ue+Tt+1]!==0&&(Et=1),this[Ue+Tt]=(je/dt>>0)-Et&255;return Ue+Ae},m.prototype.writeInt8=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,1,127,-128),je<0&&(je=255+je+1),this[Ue]=je&255,Ue+1},m.prototype.writeInt16LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,2,32767,-32768),this[Ue]=je&255,this[Ue+1]=je>>>8,Ue+2},m.prototype.writeInt16BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,2,32767,-32768),this[Ue]=je>>>8,this[Ue+1]=je&255,Ue+2},m.prototype.writeInt32LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,4,2147483647,-2147483648),this[Ue]=je&255,this[Ue+1]=je>>>8,this[Ue+2]=je>>>16,this[Ue+3]=je>>>24,Ue+4},m.prototype.writeInt32BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,4,2147483647,-2147483648),je<0&&(je=4294967295+je+1),this[Ue]=je>>>24,this[Ue+1]=je>>>16,this[Ue+2]=je>>>8,this[Ue+3]=je&255,Ue+4};function Le(tt,je,Ue,Ae,rt,St){if(Ue+Ae>tt.length)throw new RangeError("Index out of range");if(Ue<0)throw new RangeError("Index out of range")}function me(tt,je,Ue,Ae,rt){return je=+je,Ue=Ue>>>0,rt||Le(tt,je,Ue,4,34028234663852886e22,-34028234663852886e22),c.write(tt,je,Ue,Ae,23,4),Ue+4}m.prototype.writeFloatLE=function(je,Ue,Ae){return me(this,je,Ue,!0,Ae)},m.prototype.writeFloatBE=function(je,Ue,Ae){return me(this,je,Ue,!1,Ae)};function Pe(tt,je,Ue,Ae,rt){return je=+je,Ue=Ue>>>0,rt||Le(tt,je,Ue,8,17976931348623157e292,-17976931348623157e292),c.write(tt,je,Ue,Ae,52,8),Ue+8}m.prototype.writeDoubleLE=function(je,Ue,Ae){return Pe(this,je,Ue,!0,Ae)},m.prototype.writeDoubleBE=function(je,Ue,Ae){return Pe(this,je,Ue,!1,Ae)},m.prototype.copy=function(je,Ue,Ae,rt){if(!m.isBuffer(je))throw new TypeError("argument should be a Buffer");if(Ae||(Ae=0),!rt&&rt!==0&&(rt=this.length),Ue>=je.length&&(Ue=je.length),Ue||(Ue=0),rt>0&&rt<Ae&&(rt=Ae),rt===Ae||je.length===0||this.length===0)return 0;if(Ue<0)throw new RangeError("targetStart out of bounds");if(Ae<0||Ae>=this.length)throw new RangeError("Index out of range");if(rt<0)throw new RangeError("sourceEnd out of bounds");rt>this.length&&(rt=this.length),je.length-Ue<rt-Ae&&(rt=je.length-Ue+Ae);var St=rt-Ae;return this===je&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Ue,Ae,rt):Uint8Array.prototype.set.call(je,this.subarray(Ae,rt),Ue),St},m.prototype.fill=function(je,Ue,Ae,rt){if(typeof je=="string"){if(typeof Ue=="string"?(rt=Ue,Ue=0,Ae=this.length):typeof Ae=="string"&&(rt=Ae,Ae=this.length),rt!==void 0&&typeof rt!="string")throw new TypeError("encoding must be a string");if(typeof rt=="string"&&!m.isEncoding(rt))throw new TypeError("Unknown encoding: "+rt);if(je.length===1){var St=je.charCodeAt(0);(rt==="utf8"&&St<128||rt==="latin1")&&(je=St)}}else typeof je=="number"?je=je&255:typeof je=="boolean"&&(je=Number(je));if(Ue<0||this.length<Ue||this.length<Ae)throw new RangeError("Out of range index");if(Ae<=Ue)return this;Ue=Ue>>>0,Ae=Ae===void 0?this.length:Ae>>>0,je||(je=0);var Tt;if(typeof je=="number")for(Tt=Ue;Tt<Ae;++Tt)this[Tt]=je;else{var dt=m.isBuffer(je)?je:m.from(je,rt),Et=dt.length;if(Et===0)throw new TypeError('The value "'+je+'" is invalid for argument "value"');for(Tt=0;Tt<Ae-Ue;++Tt)this[Tt+Ue]=dt[Tt%Et]}return this};var ce=/[^+/0-9A-Za-z-_]/g;function He(tt){if(tt=tt.split("=")[0],tt=tt.trim().replace(ce,""),tt.length<2)return"";for(;tt.length%4!==0;)tt=tt+"=";return tt}function lt(tt,je){je=je||1/0;for(var Ue,Ae=tt.length,rt=null,St=[],Tt=0;Tt<Ae;++Tt){if(Ue=tt.charCodeAt(Tt),Ue>55295&&Ue<57344){if(!rt){if(Ue>56319){(je-=3)>-1&&St.push(239,191,189);continue}else if(Tt+1===Ae){(je-=3)>-1&&St.push(239,191,189);continue}rt=Ue;continue}if(Ue<56320){(je-=3)>-1&&St.push(239,191,189),rt=Ue;continue}Ue=(rt-55296<<10|Ue-56320)+65536}else rt&&(je-=3)>-1&&St.push(239,191,189);if(rt=null,Ue<128){if((je-=1)<0)break;St.push(Ue)}else if(Ue<2048){if((je-=2)<0)break;St.push(Ue>>6|192,Ue&63|128)}else if(Ue<65536){if((je-=3)<0)break;St.push(Ue>>12|224,Ue>>6&63|128,Ue&63|128)}else if(Ue<1114112){if((je-=4)<0)break;St.push(Ue>>18|240,Ue>>12&63|128,Ue>>6&63|128,Ue&63|128)}else throw new Error("Invalid code point")}return St}function mt(tt){for(var je=[],Ue=0;Ue<tt.length;++Ue)je.push(tt.charCodeAt(Ue)&255);return je}function Vt(tt,je){for(var Ue,Ae,rt,St=[],Tt=0;Tt<tt.length&&!((je-=2)<0);++Tt)Ue=tt.charCodeAt(Tt),Ae=Ue>>8,rt=Ue%256,St.push(rt),St.push(Ae);return St}function st(tt){return u.toByteArray(He(tt))}function ct(tt,je,Ue,Ae){for(var rt=0;rt<Ae&&!(rt+Ue>=je.length||rt>=tt.length);++rt)je[rt+Ue]=tt[rt];return rt}function Qt(tt,je){return tt instanceof je||tt!=null&&tt.constructor!=null&&tt.constructor.name!=null&&tt.constructor.name===je.name}function Ht(tt){return tt!==tt}var nr=function(){for(var tt="0123456789abcdef",je=new Array(256),Ue=0;Ue<16;++Ue)for(var Ae=Ue*16,rt=0;rt<16;++rt)je[Ae+rt]=tt[Ue]+tt[rt];return je}()},9216:function(i){"use strict";i.exports=l,i.exports.isMobile=l,i.exports.default=l;var a=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});var c=u.ua;if(!c&&typeof navigator!="undefined"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;var f=a.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}},6296:function(i,a,o){"use strict";i.exports=h;var s=o(7261),l=o(9977),u=o(1811);function c(d,v){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(m){return d[m]}),this._mode=v,this._active=d[v],this._active||(this._mode="turntable",this._active=d.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var f=c.prototype;f.flush=function(d){for(var v=this._controllerList,m=0;m<v.length;++m)v[m].flush(d)},f.idle=function(d){for(var v=this._controllerList,m=0;m<v.length;++m)v[m].idle(d)},f.lookAt=function(d,v,m,b){for(var p=this._controllerList,k=0;k<p.length;++k)p[k].lookAt(d,v,m,b)},f.rotate=function(d,v,m,b){for(var p=this._controllerList,k=0;k<p.length;++k)p[k].rotate(d,v,m,b)},f.pan=function(d,v,m,b){for(var p=this._controllerList,k=0;k<p.length;++k)p[k].pan(d,v,m,b)},f.translate=function(d,v,m,b){for(var p=this._controllerList,k=0;k<p.length;++k)p[k].translate(d,v,m,b)},f.setMatrix=function(d,v){for(var m=this._controllerList,b=0;b<m.length;++b)m[b].setMatrix(d,v)},f.setDistanceLimits=function(d,v){for(var m=this._controllerList,b=0;b<m.length;++b)m[b].setDistanceLimits(d,v)},f.setDistance=function(d,v){for(var m=this._controllerList,b=0;b<m.length;++b)m[b].setDistance(d,v)},f.recalcMatrix=function(d){this._active.recalcMatrix(d)},f.getDistance=function(d){return this._active.getDistance(d)},f.getDistanceLimits=function(d){return this._active.getDistanceLimits(d)},f.lastT=function(){return this._active.lastT()},f.setMode=function(d){if(d!==this._mode){var v=this._controllerNames.indexOf(d);if(!(v<0)){var m=this._active,b=this._controllerList[v],p=Math.max(m.lastT(),b.lastT());m.recalcMatrix(p),b.setMatrix(p,m.computedMatrix),this._active=b,this._mode=d,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},f.getMode=function(){return this._mode};function h(d){d=d||{};var v=d.eye||[0,0,1],m=d.center||[0,0,0],b=d.up||[0,1,0],p=d.distanceLimits||[0,1/0],k=d.mode||"turntable",M=s(),T=l(),L=u();return M.setDistanceLimits(p[0],p[1]),M.lookAt(0,v,m,b),T.setDistanceLimits(p[0],p[1]),T.lookAt(0,v,m,b),L.setDistanceLimits(p[0],p[1]),L.lookAt(0,v,m,b),new c({turntable:M,orbit:T,matrix:L},k)}},7169:function(i,a,o){"use strict";var s=typeof WeakMap=="undefined"?o(1538):WeakMap,l=o(2762),u=o(8116),c=new s;function f(h){var d=c.get(h),v=d&&(d._triangleBuffer.handle||d._triangleBuffer.buffer);if(!v||!h.isBuffer(v)){var m=l(h,new Float32Array([-1,-1,-1,4,4,-1]));d=u(h,[{buffer:m,type:h.FLOAT,size:2}]),d._triangleBuffer=m,c.set(h,d)}d.bind(),h.drawArrays(h.TRIANGLES,0,3),d.unbind()}i.exports=f},1085:function(i,a,o){var s=o(1371);i.exports=l;function l(u,c,f){c=typeof c=="number"?c:1,f=f||": ";var h=u.split(/\r?\n/),d=String(h.length+c-1).length;return h.map(function(v,m){var b=m+c,p=String(b).length,k=s(b,d-p);return k+f+v}).join(`
|
||
`)}},3952:function(i,a,o){"use strict";i.exports=u;var s=o(3250);function l(c,f){for(var h=new Array(f+1),d=0;d<c.length;++d)h[d]=c[d];for(var d=0;d<=c.length;++d){for(var v=c.length;v<=f;++v){for(var m=new Array(f),b=0;b<f;++b)m[b]=Math.pow(v+1-d,b);h[v]=m}var p=s.apply(void 0,h);if(p)return!0}return!1}function u(c){var f=c.length;if(f===0)return[];if(f===1)return[0];for(var h=c[0].length,d=[c[0]],v=[0],m=1;m<f;++m){if(d.push(c[m]),!l(d,h)){d.pop();continue}if(v.push(m),v.length===h+1)return v}return v}},5995:function(i,a,o){"use strict";i.exports=u;var s=o(7642),l=o(6037);function u(c,f){return s(f).filter(function(h){for(var d=new Array(h.length),v=0;v<h.length;++v)d[v]=f[h[v]];return l(d)*c<1})}},3502:function(i,a,o){i.exports=u;var s=o(5995),l=o(9127);function u(c,f){return l(s(c,f))}},6468:function(i){i.exports=function(o){return atob(o)}},2642:function(i,a,o){"use strict";i.exports=u;var s=o(727);function l(c){for(var f=0,h=0;h<c.length;++h)f+=c[h];return f}function u(c,f){for(var h=f.length,d=new Array(h+1),v=0;v<h;++v){for(var m=new Array(h+1),b=0;b<=h;++b)m[b]=c[b][v];d[v]=m}d[h]=new Array(h+1);for(var v=0;v<=h;++v)d[h][v]=1;for(var p=new Array(h+1),v=0;v<h;++v)p[v]=f[v];p[h]=1;var k=s(d,p),M=l(k[h+1]);M===0&&(M=1);for(var T=new Array(h+1),v=0;v<=h;++v)T[v]=l(k[v])/M;return T}},7507:function(i,a){"use strict";a.byteLength=d,a.toByteArray=m,a.fromByteArray=k;for(var o=[],s=[],l=typeof Uint8Array!="undefined"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,f=u.length;c<f;++c)o[c]=u[c],s[u.charCodeAt(c)]=c;s[45]=62,s[95]=63;function h(M){var T=M.length;if(T%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var L=M.indexOf("=");L===-1&&(L=T);var x=L===T?0:4-L%4;return[L,x]}function d(M){var T=h(M),L=T[0],x=T[1];return(L+x)*3/4-x}function v(M,T,L){return(T+L)*3/4-L}function m(M){var T,L=h(M),x=L[0],C=L[1],S=new l(v(M,x,C)),g=0,P=C>0?x-4:x,E;for(E=0;E<P;E+=4)T=s[M.charCodeAt(E)]<<18|s[M.charCodeAt(E+1)]<<12|s[M.charCodeAt(E+2)]<<6|s[M.charCodeAt(E+3)],S[g++]=T>>16&255,S[g++]=T>>8&255,S[g++]=T&255;return C===2&&(T=s[M.charCodeAt(E)]<<2|s[M.charCodeAt(E+1)]>>4,S[g++]=T&255),C===1&&(T=s[M.charCodeAt(E)]<<10|s[M.charCodeAt(E+1)]<<4|s[M.charCodeAt(E+2)]>>2,S[g++]=T>>8&255,S[g++]=T&255),S}function b(M){return o[M>>18&63]+o[M>>12&63]+o[M>>6&63]+o[M&63]}function p(M,T,L){for(var x,C=[],S=T;S<L;S+=3)x=(M[S]<<16&16711680)+(M[S+1]<<8&65280)+(M[S+2]&255),C.push(b(x));return C.join("")}function k(M){for(var T,L=M.length,x=L%3,C=[],S=16383,g=0,P=L-x;g<P;g+=S)C.push(p(M,g,g+S>P?P:g+S));return x===1?(T=M[L-1],C.push(o[T>>2]+o[T<<4&63]+"==")):x===2&&(T=(M[L-2]<<8)+M[L-1],C.push(o[T>>10]+o[T>>4&63]+o[T<<2&63]+"=")),C.join("")}},3865:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},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=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},7842:function(i,a,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);i.exports=d;function d(v,m){if(s(v))return m?h(v,d(m)):[v[0].clone(),v[1].clone()];var b=0,p,k;if(l(v))p=v.clone();else if(typeof v=="string")p=c(v);else{if(v===0)return[u(0),u(1)];if(v===Math.floor(v))p=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),b-=256;p=u(v)}}if(s(m))p.mul(m[1]),k=m[0].clone();else if(l(m))k=m.clone();else if(typeof m=="string")k=c(m);else if(!m)k=u(1);else if(m===Math.floor(m))k=u(m);else{for(;m!==Math.floor(m);)m=m*Math.pow(2,256),b+=256;k=u(m)}return b>0?p=p.ushln(b):b<0&&(k=k.ushln(-b)),f(p,k)}},6330:function(i,a,o){"use strict";var s=o(1533);i.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}},5716:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return u.cmp(new s(0))}},1369:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var d=0;d<c;d++){var v=f[d];h+=v*Math.pow(67108864,d)}return s(u)*h}},4025:function(i,a,o){"use strict";var s=o(2361),l=o(8828).countTrailingZeros;i.exports=u;function u(c){var f=l(s.lo(c));if(f<32)return f;var h=l(s.hi(c));return h>20?52:h+32}},1533:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}},2651:function(i,a,o){"use strict";var s=o(6859),l=o(2361);i.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}},869:function(i,a,o){"use strict";var s=o(2651),l=o(5716);i.exports=u;function u(c,f){var h=l(c),d=l(f);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<0&&(c=c.neg(),f=f.neg());var v=c.gcd(f);return v.cmpn(1)?[c.div(v),f.div(v)]:[c,f]}},6768:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return new s(u)}},6504:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}},7721:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){return s(u[0])*s(u[1])}},5572:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}},946:function(i,a,o){"use strict";var s=o(1369),l=o(4025);i.exports=u;function u(c){var f=c[0],h=c[1];if(f.cmpn(0)===0)return 0;var d=f.abs().divmod(h.abs()),v=d.div,m=s(v),b=d.mod,p=f.negative!==h.negative?-1:1;if(b.cmpn(0)===0)return p*m;if(m){var k=l(m)+4,M=s(b.ushln(k).divRound(h));return p*(m+M*Math.pow(2,-k))}else{var T=h.bitLength()-b.bitLength()+53,M=s(b.ushln(T).divRound(h));return T<1023?p*M*Math.pow(2,-T):(M*=Math.pow(2,-1023),p*M*Math.pow(2,1023-T))}}},2478:function(i){"use strict";function a(f,h,d,v,m){for(var b=m+1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M>=0?(b=p,m=p-1):v=p+1}return b}function o(f,h,d,v,m){for(var b=m+1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M>0?(b=p,m=p-1):v=p+1}return b}function s(f,h,d,v,m){for(var b=v-1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M<0?(b=p,v=p+1):m=p-1}return b}function l(f,h,d,v,m){for(var b=v-1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M<=0?(b=p,v=p+1):m=p-1}return b}function u(f,h,d,v,m){for(;v<=m;){var b=v+m>>>1,p=f[b],k=d!==void 0?d(p,h):p-h;if(k===0)return b;k<=0?v=b+1:m=b-1}return-1}function c(f,h,d,v,m,b){return typeof d=="function"?b(f,h,d,v===void 0?0:v|0,m===void 0?f.length-1:m|0):b(f,h,void 0,d===void 0?0:d|0,v===void 0?f.length-1:v|0)}i.exports={ge:function(f,h,d,v,m){return c(f,h,d,v,m,a)},gt:function(f,h,d,v,m){return c(f,h,d,v,m,o)},lt:function(f,h,d,v,m){return c(f,h,d,v,m,s)},le:function(f,h,d,v,m){return c(f,h,d,v,m,l)},eq:function(f,h,d,v,m){return c(f,h,d,v,m,u)}}},8828:function(i,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<<o-1,a.sign=function(u){return(u>0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u<c)},a.max=function(u,c){return u^(u^c)&-(u<c)},a.isPow2=function(u){return!(u&u-1)&&!!u},a.log2=function(u){var c,f;return c=(u>65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<<d&255}})(l),a.reverse=function(u){return l[u&255]<<24|l[u>>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},6859:function(i,a,o){i=o.nmd(i),function(s,l){"use strict";function u(j,N){if(!j)throw new Error(N||"Assertion failed")}function c(j,N){j.super_=N;var H=function(){};H.prototype=N.prototype,j.prototype=new H,j.prototype.constructor=j}function f(j,N,H){if(f.isBN(j))return j;this.negative=0,this.words=null,this.length=0,this.red=null,j!==null&&((N==="le"||N==="be")&&(H=N,N=10),this._init(j||0,N||10,H||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(j){}f.isBN=function(N){return N instanceof f?!0:N!==null&&typeof N=="object"&&N.constructor.wordSize===f.wordSize&&Array.isArray(N.words)},f.max=function(N,H){return N.cmp(H)>0?N:H},f.min=function(N,H){return N.cmp(H)<0?N:H},f.prototype._init=function(N,H,re){if(typeof N=="number")return this._initNumber(N,H,re);if(typeof N=="object")return this._initArray(N,H,re);H==="hex"&&(H=16),u(H===(H|0)&&H>=2&&H<=36),N=N.toString().replace(/\s+/g,"");var oe=0;N[0]==="-"&&(oe++,this.negative=1),oe<N.length&&(H===16?this._parseHex(N,oe,re):(this._parseBase(N,H,oe),re==="le"&&this._initArray(this.toArray(),H,re)))},f.prototype._initNumber=function(N,H,re){N<0&&(this.negative=1,N=-N),N<67108864?(this.words=[N&67108863],this.length=1):N<4503599627370496?(this.words=[N&67108863,N/67108864&67108863],this.length=2):(u(N<9007199254740992),this.words=[N&67108863,N/67108864&67108863,1],this.length=3),re==="le"&&this._initArray(this.toArray(),H,re)},f.prototype._initArray=function(N,H,re){if(u(typeof N.length=="number"),N.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(N.length/3),this.words=new Array(this.length);for(var oe=0;oe<this.length;oe++)this.words[oe]=0;var _e,ke,Ce=0;if(re==="be")for(oe=N.length-1,_e=0;oe>=0;oe-=3)ke=N[oe]|N[oe-1]<<8|N[oe-2]<<16,this.words[_e]|=ke<<Ce&67108863,this.words[_e+1]=ke>>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,_e++);else if(re==="le")for(oe=0,_e=0;oe<N.length;oe+=3)ke=N[oe]|N[oe+1]<<8|N[oe+2]<<16,this.words[_e]|=ke<<Ce&67108863,this.words[_e+1]=ke>>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,_e++);return this.strip()};function d(j,N){var H=j.charCodeAt(N);return H>=65&&H<=70?H-55:H>=97&&H<=102?H-87:H-48&15}function v(j,N,H){var re=d(j,H);return H-1>=N&&(re|=d(j,H-1)<<4),re}f.prototype._parseHex=function(N,H,re){this.length=Math.ceil((N.length-H)/6),this.words=new Array(this.length);for(var oe=0;oe<this.length;oe++)this.words[oe]=0;var _e=0,ke=0,Ce;if(re==="be")for(oe=N.length-1;oe>=H;oe-=2)Ce=v(N,H,oe)<<_e,this.words[ke]|=Ce&67108863,_e>=18?(_e-=18,ke+=1,this.words[ke]|=Ce>>>26):_e+=8;else{var ge=N.length-H;for(oe=ge%2===0?H+1:H;oe<N.length;oe+=2)Ce=v(N,H,oe)<<_e,this.words[ke]|=Ce&67108863,_e>=18?(_e-=18,ke+=1,this.words[ke]|=Ce>>>26):_e+=8}this.strip()};function m(j,N,H,re){for(var oe=0,_e=Math.min(j.length,H),ke=N;ke<_e;ke++){var Ce=j.charCodeAt(ke)-48;oe*=re,Ce>=49?oe+=Ce-49+10:Ce>=17?oe+=Ce-17+10:oe+=Ce}return oe}f.prototype._parseBase=function(N,H,re){this.words=[0],this.length=1;for(var oe=0,_e=1;_e<=67108863;_e*=H)oe++;oe--,_e=_e/H|0;for(var ke=N.length-re,Ce=ke%oe,ge=Math.min(ke,ke-Ce)+re,ie=0,Se=re;Se<ge;Se+=oe)ie=m(N,Se,Se+oe,H),this.imuln(_e),this.words[0]+ie<67108864?this.words[0]+=ie:this._iaddn(ie);if(Ce!==0){var Ee=1;for(ie=m(N,Se,N.length,H),Se=0;Se<Ce;Se++)Ee*=H;this.imuln(Ee),this.words[0]+ie<67108864?this.words[0]+=ie:this._iaddn(ie)}this.strip()},f.prototype.copy=function(N){N.words=new Array(this.length);for(var H=0;H<this.length;H++)N.words[H]=this.words[H];N.length=this.length,N.negative=this.negative,N.red=this.red},f.prototype.clone=function(){var N=new f(null);return this.copy(N),N},f.prototype._expand=function(N){for(;this.length<N;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],k=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(N,H){N=N||10,H=H|0||1;var re;if(N===16||N==="hex"){re="";for(var oe=0,_e=0,ke=0;ke<this.length;ke++){var Ce=this.words[ke],ge=((Ce<<oe|_e)&16777215).toString(16);_e=Ce>>>24-oe&16777215,oe+=2,oe>=26&&(oe-=26,ke--),_e!==0||ke!==this.length-1?re=b[6-ge.length]+ge+re:re=ge+re}for(_e!==0&&(re=_e.toString(16)+re);re.length%H!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}if(N===(N|0)&&N>=2&&N<=36){var ie=p[N],Se=k[N];re="";var Ee=this.clone();for(Ee.negative=0;!Ee.isZero();){var we=Ee.modn(Se).toString(N);Ee=Ee.idivn(Se),Ee.isZero()?re=we+re:re=b[ie-we.length]+we+re}for(this.isZero()&&(re="0"+re);re.length%H!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var N=this.words[0];return this.length===2?N+=this.words[1]*67108864:this.length===3&&this.words[2]===1?N+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-N:N},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(N,H){return u(typeof h!="undefined"),this.toArrayLike(h,N,H)},f.prototype.toArray=function(N,H){return this.toArrayLike(Array,N,H)},f.prototype.toArrayLike=function(N,H,re){var oe=this.byteLength(),_e=re||Math.max(1,oe);u(oe<=_e,"byte array longer than desired length"),u(_e>0,"Requested array length <= 0"),this.strip();var ke=H==="le",Ce=new N(_e),ge,ie,Se=this.clone();if(ke){for(ie=0;!Se.isZero();ie++)ge=Se.andln(255),Se.iushrn(8),Ce[ie]=ge;for(;ie<_e;ie++)Ce[ie]=0}else{for(ie=0;ie<_e-oe;ie++)Ce[ie]=0;for(ie=0;!Se.isZero();ie++)ge=Se.andln(255),Se.iushrn(8),Ce[_e-ie-1]=ge}return Ce},Math.clz32?f.prototype._countBits=function(N){return 32-Math.clz32(N)}:f.prototype._countBits=function(N){var H=N,re=0;return H>=4096&&(re+=13,H>>>=13),H>=64&&(re+=7,H>>>=7),H>=8&&(re+=4,H>>>=4),H>=2&&(re+=2,H>>>=2),re+H},f.prototype._zeroBits=function(N){if(N===0)return 26;var H=N,re=0;return(H&8191)===0&&(re+=13,H>>>=13),(H&127)===0&&(re+=7,H>>>=7),(H&15)===0&&(re+=4,H>>>=4),(H&3)===0&&(re+=2,H>>>=2),(H&1)===0&&re++,re},f.prototype.bitLength=function(){var N=this.words[this.length-1],H=this._countBits(N);return(this.length-1)*26+H};function M(j){for(var N=new Array(j.bitLength()),H=0;H<N.length;H++){var re=H/26|0,oe=H%26;N[H]=(j.words[re]&1<<oe)>>>oe}return N}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var N=0,H=0;H<this.length;H++){var re=this._zeroBits(this.words[H]);if(N+=re,re!==26)break}return N},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(N){return this.negative!==0?this.abs().inotn(N).iaddn(1):this.clone()},f.prototype.fromTwos=function(N){return this.testn(N-1)?this.notn(N).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(N){for(;this.length<N.length;)this.words[this.length++]=0;for(var H=0;H<N.length;H++)this.words[H]=this.words[H]|N.words[H];return this.strip()},f.prototype.ior=function(N){return u((this.negative|N.negative)===0),this.iuor(N)},f.prototype.or=function(N){return this.length>N.length?this.clone().ior(N):N.clone().ior(this)},f.prototype.uor=function(N){return this.length>N.length?this.clone().iuor(N):N.clone().iuor(this)},f.prototype.iuand=function(N){var H;this.length>N.length?H=N:H=this;for(var re=0;re<H.length;re++)this.words[re]=this.words[re]&N.words[re];return this.length=H.length,this.strip()},f.prototype.iand=function(N){return u((this.negative|N.negative)===0),this.iuand(N)},f.prototype.and=function(N){return this.length>N.length?this.clone().iand(N):N.clone().iand(this)},f.prototype.uand=function(N){return this.length>N.length?this.clone().iuand(N):N.clone().iuand(this)},f.prototype.iuxor=function(N){var H,re;this.length>N.length?(H=this,re=N):(H=N,re=this);for(var oe=0;oe<re.length;oe++)this.words[oe]=H.words[oe]^re.words[oe];if(this!==H)for(;oe<H.length;oe++)this.words[oe]=H.words[oe];return this.length=H.length,this.strip()},f.prototype.ixor=function(N){return u((this.negative|N.negative)===0),this.iuxor(N)},f.prototype.xor=function(N){return this.length>N.length?this.clone().ixor(N):N.clone().ixor(this)},f.prototype.uxor=function(N){return this.length>N.length?this.clone().iuxor(N):N.clone().iuxor(this)},f.prototype.inotn=function(N){u(typeof N=="number"&&N>=0);var H=Math.ceil(N/26)|0,re=N%26;this._expand(H),re>0&&H--;for(var oe=0;oe<H;oe++)this.words[oe]=~this.words[oe]&67108863;return re>0&&(this.words[oe]=~this.words[oe]&67108863>>26-re),this.strip()},f.prototype.notn=function(N){return this.clone().inotn(N)},f.prototype.setn=function(N,H){u(typeof N=="number"&&N>=0);var re=N/26|0,oe=N%26;return this._expand(re+1),H?this.words[re]=this.words[re]|1<<oe:this.words[re]=this.words[re]&~(1<<oe),this.strip()},f.prototype.iadd=function(N){var H;if(this.negative!==0&&N.negative===0)return this.negative=0,H=this.isub(N),this.negative^=1,this._normSign();if(this.negative===0&&N.negative!==0)return N.negative=0,H=this.isub(N),N.negative=1,H._normSign();var re,oe;this.length>N.length?(re=this,oe=N):(re=N,oe=this);for(var _e=0,ke=0;ke<oe.length;ke++)H=(re.words[ke]|0)+(oe.words[ke]|0)+_e,this.words[ke]=H&67108863,_e=H>>>26;for(;_e!==0&&ke<re.length;ke++)H=(re.words[ke]|0)+_e,this.words[ke]=H&67108863,_e=H>>>26;if(this.length=re.length,_e!==0)this.words[this.length]=_e,this.length++;else if(re!==this)for(;ke<re.length;ke++)this.words[ke]=re.words[ke];return this},f.prototype.add=function(N){var H;return N.negative!==0&&this.negative===0?(N.negative=0,H=this.sub(N),N.negative^=1,H):N.negative===0&&this.negative!==0?(this.negative=0,H=N.sub(this),this.negative=1,H):this.length>N.length?this.clone().iadd(N):N.clone().iadd(this)},f.prototype.isub=function(N){if(N.negative!==0){N.negative=0;var H=this.iadd(N);return N.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(N),this.negative=1,this._normSign();var re=this.cmp(N);if(re===0)return this.negative=0,this.length=1,this.words[0]=0,this;var oe,_e;re>0?(oe=this,_e=N):(oe=N,_e=this);for(var ke=0,Ce=0;Ce<_e.length;Ce++)H=(oe.words[Ce]|0)-(_e.words[Ce]|0)+ke,ke=H>>26,this.words[Ce]=H&67108863;for(;ke!==0&&Ce<oe.length;Ce++)H=(oe.words[Ce]|0)+ke,ke=H>>26,this.words[Ce]=H&67108863;if(ke===0&&Ce<oe.length&&oe!==this)for(;Ce<oe.length;Ce++)this.words[Ce]=oe.words[Ce];return this.length=Math.max(this.length,Ce),oe!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(N){return this.clone().isub(N)};function T(j,N,H){H.negative=N.negative^j.negative;var re=j.length+N.length|0;H.length=re,re=re-1|0;var oe=j.words[0]|0,_e=N.words[0]|0,ke=oe*_e,Ce=ke&67108863,ge=ke/67108864|0;H.words[0]=Ce;for(var ie=1;ie<re;ie++){for(var Se=ge>>>26,Ee=ge&67108863,we=Math.min(ie,N.length-1),De=Math.max(0,ie-j.length+1);De<=we;De++){var Le=ie-De|0;oe=j.words[Le]|0,_e=N.words[De]|0,ke=oe*_e+Ee,Se+=ke/67108864|0,Ee=ke&67108863}H.words[ie]=Ee|0,ge=Se|0}return ge!==0?H.words[ie]=ge|0:H.length--,H.strip()}var L=function(N,H,re){var oe=N.words,_e=H.words,ke=re.words,Ce=0,ge,ie,Se,Ee=oe[0]|0,we=Ee&8191,De=Ee>>>13,Le=oe[1]|0,me=Le&8191,Pe=Le>>>13,ce=oe[2]|0,He=ce&8191,lt=ce>>>13,mt=oe[3]|0,Vt=mt&8191,st=mt>>>13,ct=oe[4]|0,Qt=ct&8191,Ht=ct>>>13,nr=oe[5]|0,tt=nr&8191,je=nr>>>13,Ue=oe[6]|0,Ae=Ue&8191,rt=Ue>>>13,St=oe[7]|0,Tt=St&8191,dt=St>>>13,Et=oe[8]|0,pt=Et&8191,Xt=Et>>>13,or=oe[9]|0,_r=or&8191,Er=or>>>13,ei=_e[0]|0,qr=ei&8191,jr=ei>>>13,gt=_e[1]|0,Ge=gt&8191,Je=gt>>>13,We=_e[2]|0,et=We&8191,xt=We>>>13,At=_e[3]|0,Kt=At&8191,er=At>>>13,Sr=_e[4]|0,Gr=Sr&8191,Ir=Sr>>>13,Yr=_e[5]|0,_i=Yr&8191,Pi=Yr>>>13,ai=_e[6]|0,mi=ai&8191,un=ai>>>13,Fn=_e[7]|0,An=Fn&8191,Hn=Fn>>>13,Qn=_e[8]|0,Vi=Qn&8191,Kn=Qn>>>13,Jn=_e[9]|0,Gt=Jn&8191,wt=Jn>>>13;re.negative=N.negative^H.negative,re.length=19,ge=Math.imul(we,qr),ie=Math.imul(we,jr),ie=ie+Math.imul(De,qr)|0,Se=Math.imul(De,jr);var rr=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(rr>>>26)|0,rr&=67108863,ge=Math.imul(me,qr),ie=Math.imul(me,jr),ie=ie+Math.imul(Pe,qr)|0,Se=Math.imul(Pe,jr),ge=ge+Math.imul(we,Ge)|0,ie=ie+Math.imul(we,Je)|0,ie=ie+Math.imul(De,Ge)|0,Se=Se+Math.imul(De,Je)|0;var ir=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(ir>>>26)|0,ir&=67108863,ge=Math.imul(He,qr),ie=Math.imul(He,jr),ie=ie+Math.imul(lt,qr)|0,Se=Math.imul(lt,jr),ge=ge+Math.imul(me,Ge)|0,ie=ie+Math.imul(me,Je)|0,ie=ie+Math.imul(Pe,Ge)|0,Se=Se+Math.imul(Pe,Je)|0,ge=ge+Math.imul(we,et)|0,ie=ie+Math.imul(we,xt)|0,ie=ie+Math.imul(De,et)|0,Se=Se+Math.imul(De,xt)|0;var wr=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(wr>>>26)|0,wr&=67108863,ge=Math.imul(Vt,qr),ie=Math.imul(Vt,jr),ie=ie+Math.imul(st,qr)|0,Se=Math.imul(st,jr),ge=ge+Math.imul(He,Ge)|0,ie=ie+Math.imul(He,Je)|0,ie=ie+Math.imul(lt,Ge)|0,Se=Se+Math.imul(lt,Je)|0,ge=ge+Math.imul(me,et)|0,ie=ie+Math.imul(me,xt)|0,ie=ie+Math.imul(Pe,et)|0,Se=Se+Math.imul(Pe,xt)|0,ge=ge+Math.imul(we,Kt)|0,ie=ie+Math.imul(we,er)|0,ie=ie+Math.imul(De,Kt)|0,Se=Se+Math.imul(De,er)|0;var Xr=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,ge=Math.imul(Qt,qr),ie=Math.imul(Qt,jr),ie=ie+Math.imul(Ht,qr)|0,Se=Math.imul(Ht,jr),ge=ge+Math.imul(Vt,Ge)|0,ie=ie+Math.imul(Vt,Je)|0,ie=ie+Math.imul(st,Ge)|0,Se=Se+Math.imul(st,Je)|0,ge=ge+Math.imul(He,et)|0,ie=ie+Math.imul(He,xt)|0,ie=ie+Math.imul(lt,et)|0,Se=Se+Math.imul(lt,xt)|0,ge=ge+Math.imul(me,Kt)|0,ie=ie+Math.imul(me,er)|0,ie=ie+Math.imul(Pe,Kt)|0,Se=Se+Math.imul(Pe,er)|0,ge=ge+Math.imul(we,Gr)|0,ie=ie+Math.imul(we,Ir)|0,ie=ie+Math.imul(De,Gr)|0,Se=Se+Math.imul(De,Ir)|0;var ti=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(ti>>>26)|0,ti&=67108863,ge=Math.imul(tt,qr),ie=Math.imul(tt,jr),ie=ie+Math.imul(je,qr)|0,Se=Math.imul(je,jr),ge=ge+Math.imul(Qt,Ge)|0,ie=ie+Math.imul(Qt,Je)|0,ie=ie+Math.imul(Ht,Ge)|0,Se=Se+Math.imul(Ht,Je)|0,ge=ge+Math.imul(Vt,et)|0,ie=ie+Math.imul(Vt,xt)|0,ie=ie+Math.imul(st,et)|0,Se=Se+Math.imul(st,xt)|0,ge=ge+Math.imul(He,Kt)|0,ie=ie+Math.imul(He,er)|0,ie=ie+Math.imul(lt,Kt)|0,Se=Se+Math.imul(lt,er)|0,ge=ge+Math.imul(me,Gr)|0,ie=ie+Math.imul(me,Ir)|0,ie=ie+Math.imul(Pe,Gr)|0,Se=Se+Math.imul(Pe,Ir)|0,ge=ge+Math.imul(we,_i)|0,ie=ie+Math.imul(we,Pi)|0,ie=ie+Math.imul(De,_i)|0,Se=Se+Math.imul(De,Pi)|0;var $r=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+($r>>>26)|0,$r&=67108863,ge=Math.imul(Ae,qr),ie=Math.imul(Ae,jr),ie=ie+Math.imul(rt,qr)|0,Se=Math.imul(rt,jr),ge=ge+Math.imul(tt,Ge)|0,ie=ie+Math.imul(tt,Je)|0,ie=ie+Math.imul(je,Ge)|0,Se=Se+Math.imul(je,Je)|0,ge=ge+Math.imul(Qt,et)|0,ie=ie+Math.imul(Qt,xt)|0,ie=ie+Math.imul(Ht,et)|0,Se=Se+Math.imul(Ht,xt)|0,ge=ge+Math.imul(Vt,Kt)|0,ie=ie+Math.imul(Vt,er)|0,ie=ie+Math.imul(st,Kt)|0,Se=Se+Math.imul(st,er)|0,ge=ge+Math.imul(He,Gr)|0,ie=ie+Math.imul(He,Ir)|0,ie=ie+Math.imul(lt,Gr)|0,Se=Se+Math.imul(lt,Ir)|0,ge=ge+Math.imul(me,_i)|0,ie=ie+Math.imul(me,Pi)|0,ie=ie+Math.imul(Pe,_i)|0,Se=Se+Math.imul(Pe,Pi)|0,ge=ge+Math.imul(we,mi)|0,ie=ie+Math.imul(we,un)|0,ie=ie+Math.imul(De,mi)|0,Se=Se+Math.imul(De,un)|0;var Ri=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,ge=Math.imul(Tt,qr),ie=Math.imul(Tt,jr),ie=ie+Math.imul(dt,qr)|0,Se=Math.imul(dt,jr),ge=ge+Math.imul(Ae,Ge)|0,ie=ie+Math.imul(Ae,Je)|0,ie=ie+Math.imul(rt,Ge)|0,Se=Se+Math.imul(rt,Je)|0,ge=ge+Math.imul(tt,et)|0,ie=ie+Math.imul(tt,xt)|0,ie=ie+Math.imul(je,et)|0,Se=Se+Math.imul(je,xt)|0,ge=ge+Math.imul(Qt,Kt)|0,ie=ie+Math.imul(Qt,er)|0,ie=ie+Math.imul(Ht,Kt)|0,Se=Se+Math.imul(Ht,er)|0,ge=ge+Math.imul(Vt,Gr)|0,ie=ie+Math.imul(Vt,Ir)|0,ie=ie+Math.imul(st,Gr)|0,Se=Se+Math.imul(st,Ir)|0,ge=ge+Math.imul(He,_i)|0,ie=ie+Math.imul(He,Pi)|0,ie=ie+Math.imul(lt,_i)|0,Se=Se+Math.imul(lt,Pi)|0,ge=ge+Math.imul(me,mi)|0,ie=ie+Math.imul(me,un)|0,ie=ie+Math.imul(Pe,mi)|0,Se=Se+Math.imul(Pe,un)|0,ge=ge+Math.imul(we,An)|0,ie=ie+Math.imul(we,Hn)|0,ie=ie+Math.imul(De,An)|0,Se=Se+Math.imul(De,Hn)|0;var Zi=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Zi>>>26)|0,Zi&=67108863,ge=Math.imul(pt,qr),ie=Math.imul(pt,jr),ie=ie+Math.imul(Xt,qr)|0,Se=Math.imul(Xt,jr),ge=ge+Math.imul(Tt,Ge)|0,ie=ie+Math.imul(Tt,Je)|0,ie=ie+Math.imul(dt,Ge)|0,Se=Se+Math.imul(dt,Je)|0,ge=ge+Math.imul(Ae,et)|0,ie=ie+Math.imul(Ae,xt)|0,ie=ie+Math.imul(rt,et)|0,Se=Se+Math.imul(rt,xt)|0,ge=ge+Math.imul(tt,Kt)|0,ie=ie+Math.imul(tt,er)|0,ie=ie+Math.imul(je,Kt)|0,Se=Se+Math.imul(je,er)|0,ge=ge+Math.imul(Qt,Gr)|0,ie=ie+Math.imul(Qt,Ir)|0,ie=ie+Math.imul(Ht,Gr)|0,Se=Se+Math.imul(Ht,Ir)|0,ge=ge+Math.imul(Vt,_i)|0,ie=ie+Math.imul(Vt,Pi)|0,ie=ie+Math.imul(st,_i)|0,Se=Se+Math.imul(st,Pi)|0,ge=ge+Math.imul(He,mi)|0,ie=ie+Math.imul(He,un)|0,ie=ie+Math.imul(lt,mi)|0,Se=Se+Math.imul(lt,un)|0,ge=ge+Math.imul(me,An)|0,ie=ie+Math.imul(me,Hn)|0,ie=ie+Math.imul(Pe,An)|0,Se=Se+Math.imul(Pe,Hn)|0,ge=ge+Math.imul(we,Vi)|0,ie=ie+Math.imul(we,Kn)|0,ie=ie+Math.imul(De,Vi)|0,Se=Se+Math.imul(De,Kn)|0;var en=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(en>>>26)|0,en&=67108863,ge=Math.imul(_r,qr),ie=Math.imul(_r,jr),ie=ie+Math.imul(Er,qr)|0,Se=Math.imul(Er,jr),ge=ge+Math.imul(pt,Ge)|0,ie=ie+Math.imul(pt,Je)|0,ie=ie+Math.imul(Xt,Ge)|0,Se=Se+Math.imul(Xt,Je)|0,ge=ge+Math.imul(Tt,et)|0,ie=ie+Math.imul(Tt,xt)|0,ie=ie+Math.imul(dt,et)|0,Se=Se+Math.imul(dt,xt)|0,ge=ge+Math.imul(Ae,Kt)|0,ie=ie+Math.imul(Ae,er)|0,ie=ie+Math.imul(rt,Kt)|0,Se=Se+Math.imul(rt,er)|0,ge=ge+Math.imul(tt,Gr)|0,ie=ie+Math.imul(tt,Ir)|0,ie=ie+Math.imul(je,Gr)|0,Se=Se+Math.imul(je,Ir)|0,ge=ge+Math.imul(Qt,_i)|0,ie=ie+Math.imul(Qt,Pi)|0,ie=ie+Math.imul(Ht,_i)|0,Se=Se+Math.imul(Ht,Pi)|0,ge=ge+Math.imul(Vt,mi)|0,ie=ie+Math.imul(Vt,un)|0,ie=ie+Math.imul(st,mi)|0,Se=Se+Math.imul(st,un)|0,ge=ge+Math.imul(He,An)|0,ie=ie+Math.imul(He,Hn)|0,ie=ie+Math.imul(lt,An)|0,Se=Se+Math.imul(lt,Hn)|0,ge=ge+Math.imul(me,Vi)|0,ie=ie+Math.imul(me,Kn)|0,ie=ie+Math.imul(Pe,Vi)|0,Se=Se+Math.imul(Pe,Kn)|0,ge=ge+Math.imul(we,Gt)|0,ie=ie+Math.imul(we,wt)|0,ie=ie+Math.imul(De,Gt)|0,Se=Se+Math.imul(De,wt)|0;var fn=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(fn>>>26)|0,fn&=67108863,ge=Math.imul(_r,Ge),ie=Math.imul(_r,Je),ie=ie+Math.imul(Er,Ge)|0,Se=Math.imul(Er,Je),ge=ge+Math.imul(pt,et)|0,ie=ie+Math.imul(pt,xt)|0,ie=ie+Math.imul(Xt,et)|0,Se=Se+Math.imul(Xt,xt)|0,ge=ge+Math.imul(Tt,Kt)|0,ie=ie+Math.imul(Tt,er)|0,ie=ie+Math.imul(dt,Kt)|0,Se=Se+Math.imul(dt,er)|0,ge=ge+Math.imul(Ae,Gr)|0,ie=ie+Math.imul(Ae,Ir)|0,ie=ie+Math.imul(rt,Gr)|0,Se=Se+Math.imul(rt,Ir)|0,ge=ge+Math.imul(tt,_i)|0,ie=ie+Math.imul(tt,Pi)|0,ie=ie+Math.imul(je,_i)|0,Se=Se+Math.imul(je,Pi)|0,ge=ge+Math.imul(Qt,mi)|0,ie=ie+Math.imul(Qt,un)|0,ie=ie+Math.imul(Ht,mi)|0,Se=Se+Math.imul(Ht,un)|0,ge=ge+Math.imul(Vt,An)|0,ie=ie+Math.imul(Vt,Hn)|0,ie=ie+Math.imul(st,An)|0,Se=Se+Math.imul(st,Hn)|0,ge=ge+Math.imul(He,Vi)|0,ie=ie+Math.imul(He,Kn)|0,ie=ie+Math.imul(lt,Vi)|0,Se=Se+Math.imul(lt,Kn)|0,ge=ge+Math.imul(me,Gt)|0,ie=ie+Math.imul(me,wt)|0,ie=ie+Math.imul(Pe,Gt)|0,Se=Se+Math.imul(Pe,wt)|0;var yn=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(yn>>>26)|0,yn&=67108863,ge=Math.imul(_r,et),ie=Math.imul(_r,xt),ie=ie+Math.imul(Er,et)|0,Se=Math.imul(Er,xt),ge=ge+Math.imul(pt,Kt)|0,ie=ie+Math.imul(pt,er)|0,ie=ie+Math.imul(Xt,Kt)|0,Se=Se+Math.imul(Xt,er)|0,ge=ge+Math.imul(Tt,Gr)|0,ie=ie+Math.imul(Tt,Ir)|0,ie=ie+Math.imul(dt,Gr)|0,Se=Se+Math.imul(dt,Ir)|0,ge=ge+Math.imul(Ae,_i)|0,ie=ie+Math.imul(Ae,Pi)|0,ie=ie+Math.imul(rt,_i)|0,Se=Se+Math.imul(rt,Pi)|0,ge=ge+Math.imul(tt,mi)|0,ie=ie+Math.imul(tt,un)|0,ie=ie+Math.imul(je,mi)|0,Se=Se+Math.imul(je,un)|0,ge=ge+Math.imul(Qt,An)|0,ie=ie+Math.imul(Qt,Hn)|0,ie=ie+Math.imul(Ht,An)|0,Se=Se+Math.imul(Ht,Hn)|0,ge=ge+Math.imul(Vt,Vi)|0,ie=ie+Math.imul(Vt,Kn)|0,ie=ie+Math.imul(st,Vi)|0,Se=Se+Math.imul(st,Kn)|0,ge=ge+Math.imul(He,Gt)|0,ie=ie+Math.imul(He,wt)|0,ie=ie+Math.imul(lt,Gt)|0,Se=Se+Math.imul(lt,wt)|0;var Mn=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,ge=Math.imul(_r,Kt),ie=Math.imul(_r,er),ie=ie+Math.imul(Er,Kt)|0,Se=Math.imul(Er,er),ge=ge+Math.imul(pt,Gr)|0,ie=ie+Math.imul(pt,Ir)|0,ie=ie+Math.imul(Xt,Gr)|0,Se=Se+Math.imul(Xt,Ir)|0,ge=ge+Math.imul(Tt,_i)|0,ie=ie+Math.imul(Tt,Pi)|0,ie=ie+Math.imul(dt,_i)|0,Se=Se+Math.imul(dt,Pi)|0,ge=ge+Math.imul(Ae,mi)|0,ie=ie+Math.imul(Ae,un)|0,ie=ie+Math.imul(rt,mi)|0,Se=Se+Math.imul(rt,un)|0,ge=ge+Math.imul(tt,An)|0,ie=ie+Math.imul(tt,Hn)|0,ie=ie+Math.imul(je,An)|0,Se=Se+Math.imul(je,Hn)|0,ge=ge+Math.imul(Qt,Vi)|0,ie=ie+Math.imul(Qt,Kn)|0,ie=ie+Math.imul(Ht,Vi)|0,Se=Se+Math.imul(Ht,Kn)|0,ge=ge+Math.imul(Vt,Gt)|0,ie=ie+Math.imul(Vt,wt)|0,ie=ie+Math.imul(st,Gt)|0,Se=Se+Math.imul(st,wt)|0;var Ba=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,ge=Math.imul(_r,Gr),ie=Math.imul(_r,Ir),ie=ie+Math.imul(Er,Gr)|0,Se=Math.imul(Er,Ir),ge=ge+Math.imul(pt,_i)|0,ie=ie+Math.imul(pt,Pi)|0,ie=ie+Math.imul(Xt,_i)|0,Se=Se+Math.imul(Xt,Pi)|0,ge=ge+Math.imul(Tt,mi)|0,ie=ie+Math.imul(Tt,un)|0,ie=ie+Math.imul(dt,mi)|0,Se=Se+Math.imul(dt,un)|0,ge=ge+Math.imul(Ae,An)|0,ie=ie+Math.imul(Ae,Hn)|0,ie=ie+Math.imul(rt,An)|0,Se=Se+Math.imul(rt,Hn)|0,ge=ge+Math.imul(tt,Vi)|0,ie=ie+Math.imul(tt,Kn)|0,ie=ie+Math.imul(je,Vi)|0,Se=Se+Math.imul(je,Kn)|0,ge=ge+Math.imul(Qt,Gt)|0,ie=ie+Math.imul(Qt,wt)|0,ie=ie+Math.imul(Ht,Gt)|0,Se=Se+Math.imul(Ht,wt)|0;var ua=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(ua>>>26)|0,ua&=67108863,ge=Math.imul(_r,_i),ie=Math.imul(_r,Pi),ie=ie+Math.imul(Er,_i)|0,Se=Math.imul(Er,Pi),ge=ge+Math.imul(pt,mi)|0,ie=ie+Math.imul(pt,un)|0,ie=ie+Math.imul(Xt,mi)|0,Se=Se+Math.imul(Xt,un)|0,ge=ge+Math.imul(Tt,An)|0,ie=ie+Math.imul(Tt,Hn)|0,ie=ie+Math.imul(dt,An)|0,Se=Se+Math.imul(dt,Hn)|0,ge=ge+Math.imul(Ae,Vi)|0,ie=ie+Math.imul(Ae,Kn)|0,ie=ie+Math.imul(rt,Vi)|0,Se=Se+Math.imul(rt,Kn)|0,ge=ge+Math.imul(tt,Gt)|0,ie=ie+Math.imul(tt,wt)|0,ie=ie+Math.imul(je,Gt)|0,Se=Se+Math.imul(je,wt)|0;var ma=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(ma>>>26)|0,ma&=67108863,ge=Math.imul(_r,mi),ie=Math.imul(_r,un),ie=ie+Math.imul(Er,mi)|0,Se=Math.imul(Er,un),ge=ge+Math.imul(pt,An)|0,ie=ie+Math.imul(pt,Hn)|0,ie=ie+Math.imul(Xt,An)|0,Se=Se+Math.imul(Xt,Hn)|0,ge=ge+Math.imul(Tt,Vi)|0,ie=ie+Math.imul(Tt,Kn)|0,ie=ie+Math.imul(dt,Vi)|0,Se=Se+Math.imul(dt,Kn)|0,ge=ge+Math.imul(Ae,Gt)|0,ie=ie+Math.imul(Ae,wt)|0,ie=ie+Math.imul(rt,Gt)|0,Se=Se+Math.imul(rt,wt)|0;var Wa=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,ge=Math.imul(_r,An),ie=Math.imul(_r,Hn),ie=ie+Math.imul(Er,An)|0,Se=Math.imul(Er,Hn),ge=ge+Math.imul(pt,Vi)|0,ie=ie+Math.imul(pt,Kn)|0,ie=ie+Math.imul(Xt,Vi)|0,Se=Se+Math.imul(Xt,Kn)|0,ge=ge+Math.imul(Tt,Gt)|0,ie=ie+Math.imul(Tt,wt)|0,ie=ie+Math.imul(dt,Gt)|0,Se=Se+Math.imul(dt,wt)|0;var Fa=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,ge=Math.imul(_r,Vi),ie=Math.imul(_r,Kn),ie=ie+Math.imul(Er,Vi)|0,Se=Math.imul(Er,Kn),ge=ge+Math.imul(pt,Gt)|0,ie=ie+Math.imul(pt,wt)|0,ie=ie+Math.imul(Xt,Gt)|0,Se=Se+Math.imul(Xt,wt)|0;var Xo=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Xo>>>26)|0,Xo&=67108863,ge=Math.imul(_r,Gt),ie=Math.imul(_r,wt),ie=ie+Math.imul(Er,Gt)|0,Se=Math.imul(Er,wt);var da=(Ce+ge|0)+((ie&8191)<<13)|0;return Ce=(Se+(ie>>>13)|0)+(da>>>26)|0,da&=67108863,ke[0]=rr,ke[1]=ir,ke[2]=wr,ke[3]=Xr,ke[4]=ti,ke[5]=$r,ke[6]=Ri,ke[7]=Zi,ke[8]=en,ke[9]=fn,ke[10]=yn,ke[11]=Mn,ke[12]=Ba,ke[13]=ua,ke[14]=ma,ke[15]=Wa,ke[16]=Fa,ke[17]=Xo,ke[18]=da,Ce!==0&&(ke[19]=Ce,re.length++),re};Math.imul||(L=T);function x(j,N,H){H.negative=N.negative^j.negative,H.length=j.length+N.length;for(var re=0,oe=0,_e=0;_e<H.length-1;_e++){var ke=oe;oe=0;for(var Ce=re&67108863,ge=Math.min(_e,N.length-1),ie=Math.max(0,_e-j.length+1);ie<=ge;ie++){var Se=_e-ie,Ee=j.words[Se]|0,we=N.words[ie]|0,De=Ee*we,Le=De&67108863;ke=ke+(De/67108864|0)|0,Le=Le+Ce|0,Ce=Le&67108863,ke=ke+(Le>>>26)|0,oe+=ke>>>26,ke&=67108863}H.words[_e]=Ce,re=ke,ke=oe}return re!==0?H.words[_e]=re:H.length--,H.strip()}function C(j,N,H){var re=new S;return re.mulp(j,N,H)}f.prototype.mulTo=function(N,H){var re,oe=this.length+N.length;return this.length===10&&N.length===10?re=L(this,N,H):oe<63?re=T(this,N,H):oe<1024?re=x(this,N,H):re=C(this,N,H),re};function S(j,N){this.x=j,this.y=N}S.prototype.makeRBT=function(N){for(var H=new Array(N),re=f.prototype._countBits(N)-1,oe=0;oe<N;oe++)H[oe]=this.revBin(oe,re,N);return H},S.prototype.revBin=function(N,H,re){if(N===0||N===re-1)return N;for(var oe=0,_e=0;_e<H;_e++)oe|=(N&1)<<H-_e-1,N>>=1;return oe},S.prototype.permute=function(N,H,re,oe,_e,ke){for(var Ce=0;Ce<ke;Ce++)oe[Ce]=H[N[Ce]],_e[Ce]=re[N[Ce]]},S.prototype.transform=function(N,H,re,oe,_e,ke){this.permute(ke,N,H,re,oe,_e);for(var Ce=1;Ce<_e;Ce<<=1)for(var ge=Ce<<1,ie=Math.cos(2*Math.PI/ge),Se=Math.sin(2*Math.PI/ge),Ee=0;Ee<_e;Ee+=ge)for(var we=ie,De=Se,Le=0;Le<Ce;Le++){var me=re[Ee+Le],Pe=oe[Ee+Le],ce=re[Ee+Le+Ce],He=oe[Ee+Le+Ce],lt=we*ce-De*He;He=we*He+De*ce,ce=lt,re[Ee+Le]=me+ce,oe[Ee+Le]=Pe+He,re[Ee+Le+Ce]=me-ce,oe[Ee+Le+Ce]=Pe-He,Le!==ge&&(lt=ie*we-Se*De,De=ie*De+Se*we,we=lt)}},S.prototype.guessLen13b=function(N,H){var re=Math.max(H,N)|1,oe=re&1,_e=0;for(re=re/2|0;re;re=re>>>1)_e++;return 1<<_e+1+oe},S.prototype.conjugate=function(N,H,re){if(!(re<=1))for(var oe=0;oe<re/2;oe++){var _e=N[oe];N[oe]=N[re-oe-1],N[re-oe-1]=_e,_e=H[oe],H[oe]=-H[re-oe-1],H[re-oe-1]=-_e}},S.prototype.normalize13b=function(N,H){for(var re=0,oe=0;oe<H/2;oe++){var _e=Math.round(N[2*oe+1]/H)*8192+Math.round(N[2*oe]/H)+re;N[oe]=_e&67108863,_e<67108864?re=0:re=_e/67108864|0}return N},S.prototype.convert13b=function(N,H,re,oe){for(var _e=0,ke=0;ke<H;ke++)_e=_e+(N[ke]|0),re[2*ke]=_e&8191,_e=_e>>>13,re[2*ke+1]=_e&8191,_e=_e>>>13;for(ke=2*H;ke<oe;++ke)re[ke]=0;u(_e===0),u((_e&-8192)===0)},S.prototype.stub=function(N){for(var H=new Array(N),re=0;re<N;re++)H[re]=0;return H},S.prototype.mulp=function(N,H,re){var oe=2*this.guessLen13b(N.length,H.length),_e=this.makeRBT(oe),ke=this.stub(oe),Ce=new Array(oe),ge=new Array(oe),ie=new Array(oe),Se=new Array(oe),Ee=new Array(oe),we=new Array(oe),De=re.words;De.length=oe,this.convert13b(N.words,N.length,Ce,oe),this.convert13b(H.words,H.length,Se,oe),this.transform(Ce,ke,ge,ie,oe,_e),this.transform(Se,ke,Ee,we,oe,_e);for(var Le=0;Le<oe;Le++){var me=ge[Le]*Ee[Le]-ie[Le]*we[Le];ie[Le]=ge[Le]*we[Le]+ie[Le]*Ee[Le],ge[Le]=me}return this.conjugate(ge,ie,oe),this.transform(ge,ie,De,ke,oe,_e),this.conjugate(De,ke,oe),this.normalize13b(De,oe),re.negative=N.negative^H.negative,re.length=N.length+H.length,re.strip()},f.prototype.mul=function(N){var H=new f(null);return H.words=new Array(this.length+N.length),this.mulTo(N,H)},f.prototype.mulf=function(N){var H=new f(null);return H.words=new Array(this.length+N.length),C(this,N,H)},f.prototype.imul=function(N){return this.clone().mulTo(N,this)},f.prototype.imuln=function(N){u(typeof N=="number"),u(N<67108864);for(var H=0,re=0;re<this.length;re++){var oe=(this.words[re]|0)*N,_e=(oe&67108863)+(H&67108863);H>>=26,H+=oe/67108864|0,H+=_e>>>26,this.words[re]=_e&67108863}return H!==0&&(this.words[re]=H,this.length++),this.length=N===0?1:this.length,this},f.prototype.muln=function(N){return this.clone().imuln(N)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(N){var H=M(N);if(H.length===0)return new f(1);for(var re=this,oe=0;oe<H.length&&H[oe]===0;oe++,re=re.sqr());if(++oe<H.length)for(var _e=re.sqr();oe<H.length;oe++,_e=_e.sqr())H[oe]!==0&&(re=re.mul(_e));return re},f.prototype.iushln=function(N){u(typeof N=="number"&&N>=0);var H=N%26,re=(N-H)/26,oe=67108863>>>26-H<<26-H,_e;if(H!==0){var ke=0;for(_e=0;_e<this.length;_e++){var Ce=this.words[_e]&oe,ge=(this.words[_e]|0)-Ce<<H;this.words[_e]=ge|ke,ke=Ce>>>26-H}ke&&(this.words[_e]=ke,this.length++)}if(re!==0){for(_e=this.length-1;_e>=0;_e--)this.words[_e+re]=this.words[_e];for(_e=0;_e<re;_e++)this.words[_e]=0;this.length+=re}return this.strip()},f.prototype.ishln=function(N){return u(this.negative===0),this.iushln(N)},f.prototype.iushrn=function(N,H,re){u(typeof N=="number"&&N>=0);var oe;H?oe=(H-H%26)/26:oe=0;var _e=N%26,ke=Math.min((N-_e)/26,this.length),Ce=67108863^67108863>>>_e<<_e,ge=re;if(oe-=ke,oe=Math.max(0,oe),ge){for(var ie=0;ie<ke;ie++)ge.words[ie]=this.words[ie];ge.length=ke}if(ke!==0)if(this.length>ke)for(this.length-=ke,ie=0;ie<this.length;ie++)this.words[ie]=this.words[ie+ke];else this.words[0]=0,this.length=1;var Se=0;for(ie=this.length-1;ie>=0&&(Se!==0||ie>=oe);ie--){var Ee=this.words[ie]|0;this.words[ie]=Se<<26-_e|Ee>>>_e,Se=Ee&Ce}return ge&&Se!==0&&(ge.words[ge.length++]=Se),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(N,H,re){return u(this.negative===0),this.iushrn(N,H,re)},f.prototype.shln=function(N){return this.clone().ishln(N)},f.prototype.ushln=function(N){return this.clone().iushln(N)},f.prototype.shrn=function(N){return this.clone().ishrn(N)},f.prototype.ushrn=function(N){return this.clone().iushrn(N)},f.prototype.testn=function(N){u(typeof N=="number"&&N>=0);var H=N%26,re=(N-H)/26,oe=1<<H;if(this.length<=re)return!1;var _e=this.words[re];return!!(_e&oe)},f.prototype.imaskn=function(N){u(typeof N=="number"&&N>=0);var H=N%26,re=(N-H)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=re)return this;if(H!==0&&re++,this.length=Math.min(re,this.length),H!==0){var oe=67108863^67108863>>>H<<H;this.words[this.length-1]&=oe}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.maskn=function(N){return this.clone().imaskn(N)},f.prototype.iaddn=function(N){return u(typeof N=="number"),u(N<67108864),N<0?this.isubn(-N):this.negative!==0?this.length===1&&(this.words[0]|0)<N?(this.words[0]=N-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(N),this.negative=1,this):this._iaddn(N)},f.prototype._iaddn=function(N){this.words[0]+=N;for(var H=0;H<this.length&&this.words[H]>=67108864;H++)this.words[H]-=67108864,H===this.length-1?this.words[H+1]=1:this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},f.prototype.isubn=function(N){if(u(typeof N=="number"),u(N<67108864),N<0)return this.iaddn(-N);if(this.negative!==0)return this.negative=0,this.iaddn(N),this.negative=1,this;if(this.words[0]-=N,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H<this.length&&this.words[H]<0;H++)this.words[H]+=67108864,this.words[H+1]-=1;return this.strip()},f.prototype.addn=function(N){return this.clone().iaddn(N)},f.prototype.subn=function(N){return this.clone().isubn(N)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(N,H,re){var oe=N.length+re,_e;this._expand(oe);var ke,Ce=0;for(_e=0;_e<N.length;_e++){ke=(this.words[_e+re]|0)+Ce;var ge=(N.words[_e]|0)*H;ke-=ge&67108863,Ce=(ke>>26)-(ge/67108864|0),this.words[_e+re]=ke&67108863}for(;_e<this.length-re;_e++)ke=(this.words[_e+re]|0)+Ce,Ce=ke>>26,this.words[_e+re]=ke&67108863;if(Ce===0)return this.strip();for(u(Ce===-1),Ce=0,_e=0;_e<this.length;_e++)ke=-(this.words[_e]|0)+Ce,Ce=ke>>26,this.words[_e]=ke&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(N,H){var re=this.length-N.length,oe=this.clone(),_e=N,ke=_e.words[_e.length-1]|0,Ce=this._countBits(ke);re=26-Ce,re!==0&&(_e=_e.ushln(re),oe.iushln(re),ke=_e.words[_e.length-1]|0);var ge=oe.length-_e.length,ie;if(H!=="mod"){ie=new f(null),ie.length=ge+1,ie.words=new Array(ie.length);for(var Se=0;Se<ie.length;Se++)ie.words[Se]=0}var Ee=oe.clone()._ishlnsubmul(_e,1,ge);Ee.negative===0&&(oe=Ee,ie&&(ie.words[ge]=1));for(var we=ge-1;we>=0;we--){var De=(oe.words[_e.length+we]|0)*67108864+(oe.words[_e.length+we-1]|0);for(De=Math.min(De/ke|0,67108863),oe._ishlnsubmul(_e,De,we);oe.negative!==0;)De--,oe.negative=0,oe._ishlnsubmul(_e,1,we),oe.isZero()||(oe.negative^=1);ie&&(ie.words[we]=De)}return ie&&ie.strip(),oe.strip(),H!=="div"&&re!==0&&oe.iushrn(re),{div:ie||null,mod:oe}},f.prototype.divmod=function(N,H,re){if(u(!N.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var oe,_e,ke;return this.negative!==0&&N.negative===0?(ke=this.neg().divmod(N,H),H!=="mod"&&(oe=ke.div.neg()),H!=="div"&&(_e=ke.mod.neg(),re&&_e.negative!==0&&_e.iadd(N)),{div:oe,mod:_e}):this.negative===0&&N.negative!==0?(ke=this.divmod(N.neg(),H),H!=="mod"&&(oe=ke.div.neg()),{div:oe,mod:ke.mod}):(this.negative&N.negative)!==0?(ke=this.neg().divmod(N.neg(),H),H!=="div"&&(_e=ke.mod.neg(),re&&_e.negative!==0&&_e.isub(N)),{div:ke.div,mod:_e}):N.length>this.length||this.cmp(N)<0?{div:new f(0),mod:this}:N.length===1?H==="div"?{div:this.divn(N.words[0]),mod:null}:H==="mod"?{div:null,mod:new f(this.modn(N.words[0]))}:{div:this.divn(N.words[0]),mod:new f(this.modn(N.words[0]))}:this._wordDiv(N,H)},f.prototype.div=function(N){return this.divmod(N,"div",!1).div},f.prototype.mod=function(N){return this.divmod(N,"mod",!1).mod},f.prototype.umod=function(N){return this.divmod(N,"mod",!0).mod},f.prototype.divRound=function(N){var H=this.divmod(N);if(H.mod.isZero())return H.div;var re=H.div.negative!==0?H.mod.isub(N):H.mod,oe=N.ushrn(1),_e=N.andln(1),ke=re.cmp(oe);return ke<0||_e===1&&ke===0?H.div:H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},f.prototype.modn=function(N){u(N<=67108863);for(var H=(1<<26)%N,re=0,oe=this.length-1;oe>=0;oe--)re=(H*re+(this.words[oe]|0))%N;return re},f.prototype.idivn=function(N){u(N<=67108863);for(var H=0,re=this.length-1;re>=0;re--){var oe=(this.words[re]|0)+H*67108864;this.words[re]=oe/N|0,H=oe%N}return this.strip()},f.prototype.divn=function(N){return this.clone().idivn(N)},f.prototype.egcd=function(N){u(N.negative===0),u(!N.isZero());var H=this,re=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var oe=new f(1),_e=new f(0),ke=new f(0),Ce=new f(1),ge=0;H.isEven()&&re.isEven();)H.iushrn(1),re.iushrn(1),++ge;for(var ie=re.clone(),Se=H.clone();!H.isZero();){for(var Ee=0,we=1;(H.words[0]&we)===0&&Ee<26;++Ee,we<<=1);if(Ee>0)for(H.iushrn(Ee);Ee-- >0;)(oe.isOdd()||_e.isOdd())&&(oe.iadd(ie),_e.isub(Se)),oe.iushrn(1),_e.iushrn(1);for(var De=0,Le=1;(re.words[0]&Le)===0&&De<26;++De,Le<<=1);if(De>0)for(re.iushrn(De);De-- >0;)(ke.isOdd()||Ce.isOdd())&&(ke.iadd(ie),Ce.isub(Se)),ke.iushrn(1),Ce.iushrn(1);H.cmp(re)>=0?(H.isub(re),oe.isub(ke),_e.isub(Ce)):(re.isub(H),ke.isub(oe),Ce.isub(_e))}return{a:ke,b:Ce,gcd:re.iushln(ge)}},f.prototype._invmp=function(N){u(N.negative===0),u(!N.isZero());var H=this,re=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var oe=new f(1),_e=new f(0),ke=re.clone();H.cmpn(1)>0&&re.cmpn(1)>0;){for(var Ce=0,ge=1;(H.words[0]&ge)===0&&Ce<26;++Ce,ge<<=1);if(Ce>0)for(H.iushrn(Ce);Ce-- >0;)oe.isOdd()&&oe.iadd(ke),oe.iushrn(1);for(var ie=0,Se=1;(re.words[0]&Se)===0&&ie<26;++ie,Se<<=1);if(ie>0)for(re.iushrn(ie);ie-- >0;)_e.isOdd()&&_e.iadd(ke),_e.iushrn(1);H.cmp(re)>=0?(H.isub(re),oe.isub(_e)):(re.isub(H),_e.isub(oe))}var Ee;return H.cmpn(1)===0?Ee=oe:Ee=_e,Ee.cmpn(0)<0&&Ee.iadd(N),Ee},f.prototype.gcd=function(N){if(this.isZero())return N.abs();if(N.isZero())return this.abs();var H=this.clone(),re=N.clone();H.negative=0,re.negative=0;for(var oe=0;H.isEven()&&re.isEven();oe++)H.iushrn(1),re.iushrn(1);do{for(;H.isEven();)H.iushrn(1);for(;re.isEven();)re.iushrn(1);var _e=H.cmp(re);if(_e<0){var ke=H;H=re,re=ke}else if(_e===0||re.cmpn(1)===0)break;H.isub(re)}while(!0);return re.iushln(oe)},f.prototype.invm=function(N){return this.egcd(N).a.umod(N)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(N){return this.words[0]&N},f.prototype.bincn=function(N){u(typeof N=="number");var H=N%26,re=(N-H)/26,oe=1<<H;if(this.length<=re)return this._expand(re+1),this.words[re]|=oe,this;for(var _e=oe,ke=re;_e!==0&&ke<this.length;ke++){var Ce=this.words[ke]|0;Ce+=_e,_e=Ce>>>26,Ce&=67108863,this.words[ke]=Ce}return _e!==0&&(this.words[ke]=_e,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(N){var H=N<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this.strip();var re;if(this.length>1)re=1;else{H&&(N=-N),u(N<=67108863,"Number is too big");var oe=this.words[0]|0;re=oe===N?0:oe<N?-1:1}return this.negative!==0?-re|0:re},f.prototype.cmp=function(N){if(this.negative!==0&&N.negative===0)return-1;if(this.negative===0&&N.negative!==0)return 1;var H=this.ucmp(N);return this.negative!==0?-H|0:H},f.prototype.ucmp=function(N){if(this.length>N.length)return 1;if(this.length<N.length)return-1;for(var H=0,re=this.length-1;re>=0;re--){var oe=this.words[re]|0,_e=N.words[re]|0;if(oe!==_e){oe<_e?H=-1:oe>_e&&(H=1);break}}return H},f.prototype.gtn=function(N){return this.cmpn(N)===1},f.prototype.gt=function(N){return this.cmp(N)===1},f.prototype.gten=function(N){return this.cmpn(N)>=0},f.prototype.gte=function(N){return this.cmp(N)>=0},f.prototype.ltn=function(N){return this.cmpn(N)===-1},f.prototype.lt=function(N){return this.cmp(N)===-1},f.prototype.lten=function(N){return this.cmpn(N)<=0},f.prototype.lte=function(N){return this.cmp(N)<=0},f.prototype.eqn=function(N){return this.cmpn(N)===0},f.prototype.eq=function(N){return this.cmp(N)===0},f.red=function(N){return new G(N)},f.prototype.toRed=function(N){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),N.convertTo(this)._forceRed(N)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(N){return this.red=N,this},f.prototype.forceRed=function(N){return u(!this.red,"Already a number in reduction context"),this._forceRed(N)},f.prototype.redAdd=function(N){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,N)},f.prototype.redIAdd=function(N){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,N)},f.prototype.redSub=function(N){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,N)},f.prototype.redISub=function(N){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,N)},f.prototype.redShl=function(N){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,N)},f.prototype.redMul=function(N){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,N),this.red.mul(this,N)},f.prototype.redIMul=function(N){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,N),this.red.imul(this,N)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(N){return u(this.red&&!N.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,N)};var g={k256:null,p224:null,p192:null,p25519:null};function P(j,N){this.name=j,this.p=new f(N,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}P.prototype._tmp=function(){var N=new f(null);return N.words=new Array(Math.ceil(this.n/13)),N},P.prototype.ireduce=function(N){var H=N,re;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),re=H.bitLength();while(re>this.n);var oe=re<this.n?-1:H.ucmp(this.p);return oe===0?(H.words[0]=0,H.length=1):oe>0?H.isub(this.p):H.strip!==void 0?H.strip():H._strip(),H},P.prototype.split=function(N,H){N.iushrn(this.n,0,H)},P.prototype.imulK=function(N){return N.imul(this.k)};function E(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(E,P),E.prototype.split=function(N,H){for(var re=4194303,oe=Math.min(N.length,9),_e=0;_e<oe;_e++)H.words[_e]=N.words[_e];if(H.length=oe,N.length<=9){N.words[0]=0,N.length=1;return}var ke=N.words[9];for(H.words[H.length++]=ke&re,_e=10;_e<N.length;_e++){var Ce=N.words[_e]|0;N.words[_e-10]=(Ce&re)<<4|ke>>>22,ke=Ce}ke>>>=22,N.words[_e-10]=ke,ke===0&&N.length>10?N.length-=10:N.length-=9},E.prototype.imulK=function(N){N.words[N.length]=0,N.words[N.length+1]=0,N.length+=2;for(var H=0,re=0;re<N.length;re++){var oe=N.words[re]|0;H+=oe*977,N.words[re]=H&67108863,H=oe*64+(H/67108864|0)}return N.words[N.length-1]===0&&(N.length--,N.words[N.length-1]===0&&N.length--),N};function z(){P.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}c(z,P);function q(){P.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}c(q,P);function U(){P.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}c(U,P),U.prototype.imulK=function(N){for(var H=0,re=0;re<N.length;re++){var oe=(N.words[re]|0)*19+H,_e=oe&67108863;oe>>>=26,N.words[re]=_e,H=oe}return H!==0&&(N.words[N.length++]=H),N},f._prime=function(N){if(g[N])return g[N];var H;if(N==="k256")H=new E;else if(N==="p224")H=new z;else if(N==="p192")H=new q;else if(N==="p25519")H=new U;else throw new Error("Unknown prime "+N);return g[N]=H,H};function G(j){if(typeof j=="string"){var N=f._prime(j);this.m=N.p,this.prime=N}else u(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}G.prototype._verify1=function(N){u(N.negative===0,"red works only with positives"),u(N.red,"red works only with red numbers")},G.prototype._verify2=function(N,H){u((N.negative|H.negative)===0,"red works only with positives"),u(N.red&&N.red===H.red,"red works only with red numbers")},G.prototype.imod=function(N){return this.prime?this.prime.ireduce(N)._forceRed(this):N.umod(this.m)._forceRed(this)},G.prototype.neg=function(N){return N.isZero()?N.clone():this.m.sub(N)._forceRed(this)},G.prototype.add=function(N,H){this._verify2(N,H);var re=N.add(H);return re.cmp(this.m)>=0&&re.isub(this.m),re._forceRed(this)},G.prototype.iadd=function(N,H){this._verify2(N,H);var re=N.iadd(H);return re.cmp(this.m)>=0&&re.isub(this.m),re},G.prototype.sub=function(N,H){this._verify2(N,H);var re=N.sub(H);return re.cmpn(0)<0&&re.iadd(this.m),re._forceRed(this)},G.prototype.isub=function(N,H){this._verify2(N,H);var re=N.isub(H);return re.cmpn(0)<0&&re.iadd(this.m),re},G.prototype.shl=function(N,H){return this._verify1(N),this.imod(N.ushln(H))},G.prototype.imul=function(N,H){return this._verify2(N,H),this.imod(N.imul(H))},G.prototype.mul=function(N,H){return this._verify2(N,H),this.imod(N.mul(H))},G.prototype.isqr=function(N){return this.imul(N,N.clone())},G.prototype.sqr=function(N){return this.mul(N,N)},G.prototype.sqrt=function(N){if(N.isZero())return N.clone();var H=this.m.andln(3);if(u(H%2===1),H===3){var re=this.m.add(new f(1)).iushrn(2);return this.pow(N,re)}for(var oe=this.m.subn(1),_e=0;!oe.isZero()&&oe.andln(1)===0;)_e++,oe.iushrn(1);u(!oe.isZero());var ke=new f(1).toRed(this),Ce=ke.redNeg(),ge=this.m.subn(1).iushrn(1),ie=this.m.bitLength();for(ie=new f(2*ie*ie).toRed(this);this.pow(ie,ge).cmp(Ce)!==0;)ie.redIAdd(Ce);for(var Se=this.pow(ie,oe),Ee=this.pow(N,oe.addn(1).iushrn(1)),we=this.pow(N,oe),De=_e;we.cmp(ke)!==0;){for(var Le=we,me=0;Le.cmp(ke)!==0;me++)Le=Le.redSqr();u(me<De);var Pe=this.pow(Se,new f(1).iushln(De-me-1));Ee=Ee.redMul(Pe),Se=Pe.redSqr(),we=we.redMul(Se),De=me}return Ee},G.prototype.invm=function(N){var H=N._invmp(this.m);return H.negative!==0?(H.negative=0,this.imod(H).redNeg()):this.imod(H)},G.prototype.pow=function(N,H){if(H.isZero())return new f(1).toRed(this);if(H.cmpn(1)===0)return N.clone();var re=4,oe=new Array(1<<re);oe[0]=new f(1).toRed(this),oe[1]=N;for(var _e=2;_e<oe.length;_e++)oe[_e]=this.mul(oe[_e-1],N);var ke=oe[0],Ce=0,ge=0,ie=H.bitLength()%26;for(ie===0&&(ie=26),_e=H.length-1;_e>=0;_e--){for(var Se=H.words[_e],Ee=ie-1;Ee>=0;Ee--){var we=Se>>Ee&1;if(ke!==oe[0]&&(ke=this.sqr(ke)),we===0&&Ce===0){ge=0;continue}Ce<<=1,Ce|=we,ge++,!(ge!==re&&(_e!==0||Ee!==0))&&(ke=this.mul(ke,oe[Ce]),ge=0,Ce=0)}ie=26}return ke},G.prototype.convertTo=function(N){var H=N.umod(this.m);return H===N?H.clone():H},G.prototype.convertFrom=function(N){var H=N.clone();return H.red=null,H},f.mont=function(N){return new Z(N)};function Z(j){G.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}c(Z,G),Z.prototype.convertTo=function(N){return this.imod(N.ushln(this.shift))},Z.prototype.convertFrom=function(N){var H=this.imod(N.mul(this.rinv));return H.red=null,H},Z.prototype.imul=function(N,H){if(N.isZero()||H.isZero())return N.words[0]=0,N.length=1,N;var re=N.imul(H),oe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(oe).iushrn(this.shift),ke=_e;return _e.cmp(this.m)>=0?ke=_e.isub(this.m):_e.cmpn(0)<0&&(ke=_e.iadd(this.m)),ke._forceRed(this)},Z.prototype.mul=function(N,H){if(N.isZero()||H.isZero())return new f(0)._forceRed(this);var re=N.mul(H),oe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(oe).iushrn(this.shift),ke=_e;return _e.cmp(this.m)>=0?ke=_e.isub(this.m):_e.cmpn(0)<0&&(ke=_e.iadd(this.m)),ke._forceRed(this)},Z.prototype.invm=function(N){var H=this.imod(N._invmp(this.m).mul(this.r2));return H._forceRed(this)}}(i,this)},6204:function(i){"use strict";i.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;s<c;++s)f+=o[s].length;var h=new Array(f),d=0;for(s=0;s<c;++s){var v=o[s],m=v.length;for(l=0;l<m;++l){var b=h[d++]=new Array(m-1),p=0;for(u=0;u<m;++u)u!==l&&(b[p++]=v[u]);if(l&1){var k=b[1];b[1]=b[0],b[0]=k}}}return h}},6867:function(i,a,o){"use strict";i.exports=p;var s=o(1888),l=o(855),u=o(7150);function c(k,M){for(var T=0;T<k;++T)if(!(M[T]<=M[T+k]))return!0;return!1}function f(k,M,T,L){for(var x=0,C=0,S=0,g=k.length;S<g;++S){var P=k[S];if(!c(M,P)){for(var E=0;E<2*M;++E)T[x++]=P[E];L[C++]=S}}return C}function h(k,M,T,L){var x=k.length,C=M.length;if(!(x<=0||C<=0)){var S=k[0].length>>>1;if(!(S<=0)){var g,P=s.mallocDouble(2*S*x),E=s.mallocInt32(x);if(x=f(k,S,P,E),x>0){if(S===1&&L)l.init(x),g=l.sweepComplete(S,T,0,x,P,E,0,x,P,E);else{var z=s.mallocDouble(2*S*C),q=s.mallocInt32(C);C=f(M,S,z,q),C>0&&(l.init(x+C),S===1?g=l.sweepBipartite(S,T,0,x,P,E,0,C,z,q):g=u(S,T,L,x,P,E,C,z,q),s.free(z),s.free(q))}s.free(P),s.free(E)}return g}}}var d;function v(k,M){d.push([k,M])}function m(k){return d=[],h(k,k,v,!0),d}function b(k,M){return d=[],h(k,M,v,!1),d}function p(k,M,T){switch(arguments.length){case 1:return m(k);case 2:return typeof M=="function"?h(k,k,M,!0):b(k,M);case 3:return h(k,M,T,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(i,a){"use strict";function o(){function u(h,d,v,m,b,p,k,M,T,L,x){for(var C=2*h,S=m,g=C*m;S<b;++S,g+=C){var P=p[d+g],E=p[d+g+h],z=k[S];e:for(var q=M,U=C*M;q<T;++q,U+=C){var G=L[d+U],Z=L[d+U+h],j=x[q];if(!(Z<P||E<G)){for(var N=d+1;N<h;++N){var H=p[N+g],re=p[N+h+g],oe=L[N+U],_e=L[N+h+U];if(re<oe||_e<H)continue e}var ke=v(z,j);if(ke!==void 0)return ke}}}}function c(h,d,v,m,b,p,k,M,T,L,x){for(var C=2*h,S=M,g=C*M;S<T;++S,g+=C){var P=L[d+g],E=L[d+g+h],z=x[S];e:for(var q=m,U=C*m;q<b;++q,U+=C){var G=p[d+U],Z=p[d+U+h],j=k[q];if(!(E<G||Z<P)){for(var N=d+1;N<h;++N){var H=p[N+U],re=p[N+h+U],oe=L[N+g],_e=L[N+h+g];if(re<oe||_e<H)continue e}var ke=v(j,z);if(ke!==void 0)return ke}}}}function f(h,d,v,m,b,p,k,M,T,L,x){return b-m>T-M?u(h,d,v,m,b,p,k,M,T,L,x):c(h,d,v,m,b,p,k,M,T,L,x)}return f}function s(){function u(v,m,b,p,k,M,T,L,x,C,S){for(var g=2*v,P=p,E=g*p;P<k;++P,E+=g){var z=M[m+E],q=M[m+E+v],U=T[P];e:for(var G=L,Z=g*L;G<x;++G,Z+=g){var j=C[m+Z],N=S[G];if(!(j<=z||q<j)){for(var H=m+1;H<v;++H){var re=M[H+E],oe=M[H+v+E],_e=C[H+Z],ke=C[H+v+Z];if(oe<_e||ke<re)continue e}var Ce=b(N,U);if(Ce!==void 0)return Ce}}}}function c(v,m,b,p,k,M,T,L,x,C,S){for(var g=2*v,P=p,E=g*p;P<k;++P,E+=g){var z=M[m+E],q=M[m+E+v],U=T[P];e:for(var G=L,Z=g*L;G<x;++G,Z+=g){var j=C[m+Z],N=S[G];if(!(j<z||q<j)){for(var H=m+1;H<v;++H){var re=M[H+E],oe=M[H+v+E],_e=C[H+Z],ke=C[H+v+Z];if(oe<_e||ke<re)continue e}var Ce=b(U,N);if(Ce!==void 0)return Ce}}}}function f(v,m,b,p,k,M,T,L,x,C,S){for(var g=2*v,P=L,E=g*L;P<x;++P,E+=g){var z=C[m+E],q=S[P];e:for(var U=p,G=g*p;U<k;++U,G+=g){var Z=M[m+G],j=M[m+G+v],N=T[U];if(!(z<=Z||j<z)){for(var H=m+1;H<v;++H){var re=M[H+G],oe=M[H+v+G],_e=C[H+E],ke=C[H+v+E];if(oe<_e||ke<re)continue e}var Ce=b(q,N);if(Ce!==void 0)return Ce}}}}function h(v,m,b,p,k,M,T,L,x,C,S){for(var g=2*v,P=L,E=g*L;P<x;++P,E+=g){var z=C[m+E],q=S[P];e:for(var U=p,G=g*p;U<k;++U,G+=g){var Z=M[m+G],j=M[m+G+v],N=T[U];if(!(z<Z||j<z)){for(var H=m+1;H<v;++H){var re=M[H+G],oe=M[H+v+G],_e=C[H+E],ke=C[H+v+E];if(oe<_e||ke<re)continue e}var Ce=b(N,q);if(Ce!==void 0)return Ce}}}}function d(v,m,b,p,k,M,T,L,x,C,S,g){return M-k>C-x?p?u(v,m,b,k,M,T,L,x,C,S,g):c(v,m,b,k,M,T,L,x,C,S,g):p?f(v,m,b,k,M,T,L,x,C,S,g):h(v,m,b,k,M,T,L,x,C,S,g)}return d}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},7150:function(i,a,o){"use strict";i.exports=j;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,h=o(855),d=o(3545),v=o(8105),m=128,b=1<<22,p=1<<22,k=v("!(lo>=p0)&&!(p1>=hi)"),M=v("lo===p0"),T=v("lo<p0"),L=v("hi<=p0"),x=v("lo<=p0&&p0<=hi"),C=v("lo<p0&&p0<=hi"),S=6,g=2,P=1024,E=s.mallocInt32(P),z=s.mallocDouble(P);function q(N,H){var re=8*l.log2(H+1)*(N+1)|0,oe=l.nextPow2(S*re);E.length<oe&&(s.free(E),E=s.mallocInt32(oe));var _e=l.nextPow2(g*re);z.length<_e&&(s.free(z),z=s.mallocDouble(_e))}function U(N,H,re,oe,_e,ke,Ce,ge,ie){var Se=S*N;E[Se]=H,E[Se+1]=re,E[Se+2]=oe,E[Se+3]=_e,E[Se+4]=ke,E[Se+5]=Ce;var Ee=g*N;z[Ee]=ge,z[Ee+1]=ie}function G(N,H,re,oe,_e,ke,Ce,ge,ie,Se,Ee){var we=2*N,De=ie*we,Le=Se[De+H];e:for(var me=_e,Pe=_e*we;me<ke;++me,Pe+=we){var ce=Ce[Pe+H],He=Ce[Pe+H+N];if(!(Le<ce||He<Le)&&!(oe&&Le===ce)){for(var lt=ge[me],mt=H+1;mt<N;++mt){var ce=Ce[Pe+mt],He=Ce[Pe+mt+N],Vt=Se[De+mt],st=Se[De+mt+N];if(He<Vt||st<ce)continue e}var ct;if(oe?ct=re(Ee,lt):ct=re(lt,Ee),ct!==void 0)return ct}}}function Z(N,H,re,oe,_e,ke,Ce,ge,ie,Se){var Ee=2*N,we=ge*Ee,De=ie[we+H];e:for(var Le=oe,me=oe*Ee;Le<_e;++Le,me+=Ee){var Pe=Ce[Le];if(Pe!==Se){var ce=ke[me+H],He=ke[me+H+N];if(!(De<ce||He<De)){for(var lt=H+1;lt<N;++lt){var ce=ke[me+lt],He=ke[me+lt+N],mt=ie[we+lt],Vt=ie[we+lt+N];if(He<mt||Vt<ce)continue e}var st=re(Pe,Se);if(st!==void 0)return st}}}}function j(N,H,re,oe,_e,ke,Ce,ge,ie){q(N,oe+Ce);var Se=0,Ee=2*N,we;for(U(Se++,0,0,oe,0,Ce,re?16:0,-1/0,1/0),re||U(Se++,0,0,Ce,0,oe,1,-1/0,1/0);Se>0;){Se-=1;var De=Se*S,Le=E[De],me=E[De+1],Pe=E[De+2],ce=E[De+3],He=E[De+4],lt=E[De+5],mt=Se*g,Vt=z[mt],st=z[mt+1],ct=lt&1,Qt=!!(lt&16),Ht=_e,nr=ke,tt=ge,je=ie;if(ct&&(Ht=ge,nr=ie,tt=_e,je=ke),!(lt&2&&(Pe=T(N,Le,me,Pe,Ht,nr,st),me>=Pe))&&!(lt&4&&(me=L(N,Le,me,Pe,Ht,nr,Vt),me>=Pe))){var Ue=Pe-me,Ae=He-ce;if(Qt){if(N*Ue*(Ue+Ae)<p){if(we=h.scanComplete(N,Le,H,me,Pe,Ht,nr,ce,He,tt,je),we!==void 0)return we;continue}}else if(N*Math.min(Ue,Ae)<m){if(we=c(N,Le,H,ct,me,Pe,Ht,nr,ce,He,tt,je),we!==void 0)return we;continue}else if(N*Ue*Ae<b){if(we=h.scanBipartite(N,Le,H,ct,me,Pe,Ht,nr,ce,He,tt,je),we!==void 0)return we;continue}var rt=k(N,Le,me,Pe,Ht,nr,Vt,st);if(me<rt)if(N*(rt-me)<m){if(we=f(N,Le+1,H,me,rt,Ht,nr,ce,He,tt,je),we!==void 0)return we}else if(Le===N-2){if(ct?we=h.sweepBipartite(N,H,ce,He,tt,je,me,rt,Ht,nr):we=h.sweepBipartite(N,H,me,rt,Ht,nr,ce,He,tt,je),we!==void 0)return we}else U(Se++,Le+1,me,rt,ce,He,ct,-1/0,1/0),U(Se++,Le+1,ce,He,me,rt,ct^1,-1/0,1/0);if(rt<Pe){var St=d(N,Le,ce,He,tt,je),Tt=tt[Ee*St+Le],dt=M(N,Le,St,He,tt,je,Tt);if(dt<He&&U(Se++,Le,rt,Pe,dt,He,(ct|4)+(Qt?16:0),Tt,st),ce<St&&U(Se++,Le,rt,Pe,ce,St,(ct|2)+(Qt?16:0),Vt,Tt),St+1===dt){if(Qt?we=Z(N,Le,H,rt,Pe,Ht,nr,St,tt,je[St]):we=G(N,Le,H,ct,rt,Pe,Ht,nr,St,tt,je[St]),we!==void 0)return we}else if(St<dt){var Et;if(Qt){if(Et=x(N,Le,rt,Pe,Ht,nr,Tt),rt<Et){var pt=M(N,Le,rt,Et,Ht,nr,Tt);if(Le===N-2){if(rt<pt&&(we=h.sweepComplete(N,H,rt,pt,Ht,nr,St,dt,tt,je),we!==void 0)||pt<Et&&(we=h.sweepBipartite(N,H,pt,Et,Ht,nr,St,dt,tt,je),we!==void 0))return we}else rt<pt&&U(Se++,Le+1,rt,pt,St,dt,16,-1/0,1/0),pt<Et&&(U(Se++,Le+1,pt,Et,St,dt,0,-1/0,1/0),U(Se++,Le+1,St,dt,pt,Et,1,-1/0,1/0))}}else ct?Et=C(N,Le,rt,Pe,Ht,nr,Tt):Et=x(N,Le,rt,Pe,Ht,nr,Tt),rt<Et&&(Le===N-2?ct?we=h.sweepBipartite(N,H,St,dt,tt,je,rt,Et,Ht,nr):we=h.sweepBipartite(N,H,rt,Et,Ht,nr,St,dt,tt,je):(U(Se++,Le+1,rt,Et,St,dt,ct,-1/0,1/0),U(Se++,Le+1,St,dt,rt,Et,ct^1,-1/0,1/0)))}}}}}},3545:function(i,a,o){"use strict";i.exports=f;var s=o(8105),l=s("lo<p0"),u=8;function c(h,d,v,m,b,p){for(var k=2*h,M=k*(v+1)+d,T=v+1;T<m;++T,M+=k)for(var L=b[M],x=T,C=k*(T-1);x>v&&b[C+d]>L;--x,C-=k){for(var S=C,g=C+k,P=0;P<k;++P,++S,++g){var E=b[S];b[S]=b[g],b[g]=E}var z=p[x];p[x]=p[x-1],p[x-1]=z}}function f(h,d,v,m,b,p){if(m<=v+1)return v;for(var k=v,M=m,T=m+v>>>1,L=2*h,x=T,C=b[L*T+d];k<M;){if(M-k<u){c(h,d,k,M,b,p),C=b[L*T+d];break}var S=M-k,g=Math.random()*S+k|0,P=b[L*g+d],E=Math.random()*S+k|0,z=b[L*E+d],q=Math.random()*S+k|0,U=b[L*q+d];P<=z?U>=z?(x=E,C=z):P>=U?(x=g,C=P):(x=q,C=U):z>=U?(x=E,C=z):U>=P?(x=g,C=P):(x=q,C=U);for(var j=L*(M-1),N=L*x,G=0;G<L;++G,++j,++N){var Z=b[j];b[j]=b[N],b[N]=Z}var H=p[M-1];p[M-1]=p[x],p[x]=H,x=l(h,d,k,M-1,b,p,C);for(var j=L*(M-1),N=L*x,G=0;G<L;++G,++j,++N){var Z=b[j];b[j]=b[N],b[N]=Z}var H=p[M-1];if(p[M-1]=p[x],p[x]=H,T<x){for(M=x-1;k<M&&b[L*(M-1)+d]===C;)M-=1;M+=1}else if(x<T)for(k=x+1;k<M&&b[L*k+d]===C;)k+=1;else break}return l(h,d,v,T,b,p,b[L*T+d])}},8105:function(i){"use strict";i.exports=o;var a={"lo===p0":s,"lo<p0":l,"lo<=p0":u,"hi<=p0":c,"lo<p0&&p0<=hi":h,"lo<=p0&&p0<=hi":f,"!(lo>=p0)&&!(p1>=hi)":d};function o(v){return a[v]}function s(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g];if(z===T)if(S===E)S+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[x+q];k[x+q]=k[C],k[C++]=U}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function l(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g];if(z<T)if(S===E)S+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[x+q];k[x+q]=k[C],k[C++]=U}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function u(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+P];if(z<=T)if(S===E)S+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[x+q];k[x+q]=k[C],k[C++]=U}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function c(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+P];if(z<=T)if(S===E)S+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[x+q];k[x+q]=k[C],k[C++]=U}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function f(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g],q=k[x+P];if(z<=T&&T<=q)if(S===E)S+=1,C+=L;else{for(var U=0;L>U;++U){var G=k[x+U];k[x+U]=k[C],k[C++]=G}var Z=M[E];M[E]=M[S],M[S++]=Z}}return S}function h(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g],q=k[x+P];if(z<T&&T<=q)if(S===E)S+=1,C+=L;else{for(var U=0;L>U;++U){var G=k[x+U];k[x+U]=k[C],k[C++]=G}var Z=M[E];M[E]=M[S],M[S++]=Z}}return S}function d(v,m,b,p,k,M,T,L){for(var x=2*v,C=x*b,S=C,g=b,P=m,E=v+m,z=b;p>z;++z,C+=x){var q=k[C+P],U=k[C+E];if(!(q>=T)&&!(L>=U))if(g===z)g+=1,S+=x;else{for(var G=0;x>G;++G){var Z=k[C+G];k[C+G]=k[S],k[S++]=Z}var j=M[z];M[z]=M[g],M[g++]=j}}return g}},4192:function(i){"use strict";i.exports=o;var a=32;function o(m,b){b<=4*a?s(0,b-1,m):v(0,b-1,m)}function s(m,b,p){for(var k=2*(m+1),M=m+1;M<=b;++M){for(var T=p[k++],L=p[k++],x=M,C=k-2;x-- >m;){var S=p[C-2],g=p[C-1];if(S<T)break;if(S===T&&g<L)break;p[C]=S,p[C+1]=g,C-=2}p[C]=T,p[C+1]=L}}function l(m,b,p){m*=2,b*=2;var k=p[m],M=p[m+1];p[m]=p[b],p[m+1]=p[b+1],p[b]=k,p[b+1]=M}function u(m,b,p){m*=2,b*=2,p[m]=p[b],p[m+1]=p[b+1]}function c(m,b,p,k){m*=2,b*=2,p*=2;var M=k[m],T=k[m+1];k[m]=k[b],k[m+1]=k[b+1],k[b]=k[p],k[b+1]=k[p+1],k[p]=M,k[p+1]=T}function f(m,b,p,k,M){m*=2,b*=2,M[m]=M[b],M[b]=p,M[m+1]=M[b+1],M[b+1]=k}function h(m,b,p){m*=2,b*=2;var k=p[m],M=p[b];return k<M?!1:k===M?p[m+1]>p[b+1]:!0}function d(m,b,p,k){m*=2;var M=k[m];return M<b?!0:M===b?k[m+1]<p:!1}function v(m,b,p){var k=(b-m+1)/6|0,M=m+k,T=b-k,L=m+b>>1,x=L-k,C=L+k,S=M,g=x,P=L,E=C,z=T,q=m+1,U=b-1,G=0;h(S,g,p)&&(G=S,S=g,g=G),h(E,z,p)&&(G=E,E=z,z=G),h(S,P,p)&&(G=S,S=P,P=G),h(g,P,p)&&(G=g,g=P,P=G),h(S,E,p)&&(G=S,S=E,E=G),h(P,E,p)&&(G=P,P=E,E=G),h(g,z,p)&&(G=g,g=z,z=G),h(g,P,p)&&(G=g,g=P,P=G),h(E,z,p)&&(G=E,E=z,z=G);for(var Z=p[2*g],j=p[2*g+1],N=p[2*E],H=p[2*E+1],re=2*S,oe=2*P,_e=2*z,ke=2*M,Ce=2*L,ge=2*T,ie=0;ie<2;++ie){var Se=p[re+ie],Ee=p[oe+ie],we=p[_e+ie];p[ke+ie]=Se,p[Ce+ie]=Ee,p[ge+ie]=we}u(x,m,p),u(C,b,p);for(var De=q;De<=U;++De)if(d(De,Z,j,p))De!==q&&l(De,q,p),++q;else if(!d(De,N,H,p))for(;;)if(d(U,N,H,p)){d(U,Z,j,p)?(c(De,q,U,p),++q,--U):(l(De,U,p),--U);break}else{if(--U<De)break;continue}f(m,q-1,Z,j,p),f(b,U+1,N,H,p),q-2-m<=a?s(m,q-2,p):v(m,q-2,p),b-(U+2)<=a?s(U+2,b,p):v(U+2,b,p),U-q<=a?s(q,U,p):v(q,U,p)}},855:function(i,a,o){"use strict";i.exports={init:M,sweepBipartite:x,sweepComplete:C,scanBipartite:S,scanComplete:g};var s=o(1888),l=o(8828),u=o(4192),c=1<<28,f=1024,h=s.mallocInt32(f),d=s.mallocInt32(f),v=s.mallocInt32(f),m=s.mallocInt32(f),b=s.mallocInt32(f),p=s.mallocInt32(f),k=s.mallocDouble(f*8);function M(P){var E=l.nextPow2(P);h.length<E&&(s.free(h),h=s.mallocInt32(E)),d.length<E&&(s.free(d),d=s.mallocInt32(E)),v.length<E&&(s.free(v),v=s.mallocInt32(E)),m.length<E&&(s.free(m),m=s.mallocInt32(E)),b.length<E&&(s.free(b),b=s.mallocInt32(E)),p.length<E&&(s.free(p),p=s.mallocInt32(E));var z=8*E;k.length<z&&(s.free(k),k=s.mallocDouble(z))}function T(P,E,z,q){var U=E[q],G=P[z-1];P[U]=G,E[G]=U}function L(P,E,z,q){P[z]=q,E[q]=z}function x(P,E,z,q,U,G,Z,j,N,H){for(var re=0,oe=2*P,_e=P-1,ke=oe-1,Ce=z;Ce<q;++Ce){var ge=G[Ce],ie=oe*Ce;k[re++]=U[ie+_e],k[re++]=-(ge+1),k[re++]=U[ie+ke],k[re++]=ge}for(var Ce=Z;Ce<j;++Ce){var ge=H[Ce]+c,Se=oe*Ce;k[re++]=N[Se+_e],k[re++]=-ge,k[re++]=N[Se+ke],k[re++]=ge}var Ee=re>>>1;u(k,Ee);for(var we=0,De=0,Ce=0;Ce<Ee;++Ce){var Le=k[2*Ce+1]|0;if(Le>=c)Le=Le-c|0,T(v,m,De--,Le);else if(Le>=0)T(h,d,we--,Le);else if(Le<=-c){Le=-Le-c|0;for(var me=0;me<we;++me){var Pe=E(h[me],Le);if(Pe!==void 0)return Pe}L(v,m,De++,Le)}else{Le=-Le-1|0;for(var me=0;me<De;++me){var Pe=E(Le,v[me]);if(Pe!==void 0)return Pe}L(h,d,we++,Le)}}}function C(P,E,z,q,U,G,Z,j,N,H){for(var re=0,oe=2*P,_e=P-1,ke=oe-1,Ce=z;Ce<q;++Ce){var ge=G[Ce]+1<<1,ie=oe*Ce;k[re++]=U[ie+_e],k[re++]=-ge,k[re++]=U[ie+ke],k[re++]=ge}for(var Ce=Z;Ce<j;++Ce){var ge=H[Ce]+1<<1,Se=oe*Ce;k[re++]=N[Se+_e],k[re++]=-ge|1,k[re++]=N[Se+ke],k[re++]=ge|1}var Ee=re>>>1;u(k,Ee);for(var we=0,De=0,Le=0,Ce=0;Ce<Ee;++Ce){var me=k[2*Ce+1]|0,Pe=me&1;if(Ce<Ee-1&&me>>1===k[2*Ce+3]>>1&&(Pe=2,Ce+=1),me<0){for(var ce=-(me>>1)-1,He=0;He<Le;++He){var lt=E(b[He],ce);if(lt!==void 0)return lt}if(Pe!==0)for(var He=0;He<we;++He){var lt=E(h[He],ce);if(lt!==void 0)return lt}if(Pe!==1)for(var He=0;He<De;++He){var lt=E(v[He],ce);if(lt!==void 0)return lt}Pe===0?L(h,d,we++,ce):Pe===1?L(v,m,De++,ce):Pe===2&&L(b,p,Le++,ce)}else{var ce=(me>>1)-1;Pe===0?T(h,d,we--,ce):Pe===1?T(v,m,De--,ce):Pe===2&&T(b,p,Le--,ce)}}}function S(P,E,z,q,U,G,Z,j,N,H,re,oe){var _e=0,ke=2*P,Ce=E,ge=E+P,ie=1,Se=1;q?Se=c:ie=c;for(var Ee=U;Ee<G;++Ee){var we=Ee+ie,De=ke*Ee;k[_e++]=Z[De+Ce],k[_e++]=-we,k[_e++]=Z[De+ge],k[_e++]=we}for(var Ee=N;Ee<H;++Ee){var we=Ee+Se,Le=ke*Ee;k[_e++]=re[Le+Ce],k[_e++]=-we}var me=_e>>>1;u(k,me);for(var Pe=0,Ee=0;Ee<me;++Ee){var ce=k[2*Ee+1]|0;if(ce<0){var we=-ce,He=!1;if(we>=c?(He=!q,we-=c):(He=!!q,we-=1),He)L(h,d,Pe++,we);else{var lt=oe[we],mt=ke*we,Vt=re[mt+E+1],st=re[mt+E+1+P];e:for(var ct=0;ct<Pe;++ct){var Qt=h[ct],Ht=ke*Qt;if(!(st<Z[Ht+E+1]||Z[Ht+E+1+P]<Vt)){for(var nr=E+2;nr<P;++nr)if(re[mt+nr+P]<Z[Ht+nr]||Z[Ht+nr+P]<re[mt+nr])continue e;var tt=j[Qt],je;if(q?je=z(lt,tt):je=z(tt,lt),je!==void 0)return je}}}}else T(h,d,Pe--,ce-ie)}}function g(P,E,z,q,U,G,Z,j,N,H,re){for(var oe=0,_e=2*P,ke=E,Ce=E+P,ge=q;ge<U;++ge){var ie=ge+c,Se=_e*ge;k[oe++]=G[Se+ke],k[oe++]=-ie,k[oe++]=G[Se+Ce],k[oe++]=ie}for(var ge=j;ge<N;++ge){var ie=ge+1,Ee=_e*ge;k[oe++]=H[Ee+ke],k[oe++]=-ie}var we=oe>>>1;u(k,we);for(var De=0,ge=0;ge<we;++ge){var Le=k[2*ge+1]|0;if(Le<0){var ie=-Le;if(ie>=c)h[De++]=ie-c;else{ie-=1;var me=re[ie],Pe=_e*ie,ce=H[Pe+E+1],He=H[Pe+E+1+P];e:for(var lt=0;lt<De;++lt){var mt=h[lt],Vt=Z[mt];if(Vt===me)break;var st=_e*mt;if(!(He<G[st+E+1]||G[st+E+1+P]<ce)){for(var ct=E+2;ct<P;++ct)if(H[Pe+ct+P]<G[st+ct]||G[st+ct+P]<H[Pe+ct])continue e;var Qt=z(Vt,me);if(Qt!==void 0)return Qt}}}}else{for(var ie=Le-c,lt=De-1;lt>=0;--lt)if(h[lt]===ie){for(var ct=lt+1;ct<De;++ct)h[ct-1]=h[ct];break}--De}}}},2538:function(i,a,o){"use strict";var s=o(8902),l=o(5542),u=o(2272),c=o(5023);i.exports=m;function f(b){return[Math.min(b[0],b[1]),Math.max(b[0],b[1])]}function h(b,p){return b[0]-p[0]||b[1]-p[1]}function d(b){return b.map(f).sort(h)}function v(b,p,k){return p in b?b[p]:k}function m(b,p,k){Array.isArray(p)?(k=k||{},p=p||[]):(k=p||{},p=[]);var M=!!v(k,"delaunay",!0),T=!!v(k,"interior",!0),L=!!v(k,"exterior",!0),x=!!v(k,"infinity",!1);if(!T&&!L||b.length===0)return[];var C=s(b,p);if(M||T!==L||x){for(var S=l(b.length,d(p)),g=0;g<C.length;++g){var P=C[g];S.addTriangle(P[0],P[1],P[2])}return M&&u(b,S),L?T?x?c(S,0,x):S.cells():c(S,1,x):c(S,-1)}else return C}},2272:function(i,a,o){"use strict";var s=o(2646)[4],l=o(2478);i.exports=c;function u(f,h,d,v,m,b){var p=h.opposite(v,m);if(!(p<0)){if(m<v){var k=v;v=m,m=k,k=b,b=p,p=k}h.isConstraint(v,m)||s(f[v],f[m],f[b],f[p])<0&&d.push(v,m)}}function c(f,h){for(var d=[],v=f.length,m=h.stars,b=0;b<v;++b)for(var p=m[b],k=1;k<p.length;k+=2){var M=p[k];if(!(M<b)&&!h.isConstraint(b,M)){for(var T=p[k-1],L=-1,x=1;x<p.length;x+=2)if(p[x-1]===M){L=p[x];break}L<0||s(f[b],f[M],f[T],f[L])<0&&d.push(b,M)}}for(;d.length>0;){for(var M=d.pop(),b=d.pop(),T=-1,L=-1,p=m[b],C=1;C<p.length;C+=2){var S=p[C-1],g=p[C];S===M?L=g:g===M&&(T=S)}T<0||L<0||s(f[b],f[M],f[T],f[L])>=0||(h.flip(b,M),u(f,h,d,T,b,L),u(f,h,d,b,L,T),u(f,h,d,L,M,T),u(f,h,d,M,T,L))}}},5023:function(i,a,o){"use strict";var s=o(2478);i.exports=d;function l(v,m,b,p,k,M,T){this.cells=v,this.neighbor=m,this.flags=p,this.constraint=b,this.active=k,this.next=M,this.boundary=T}var u=l.prototype;function c(v,m){return v[0]-m[0]||v[1]-m[1]||v[2]-m[2]}u.locate=function(){var v=[0,0,0];return function(m,b,p){var k=m,M=b,T=p;return b<p?b<m&&(k=b,M=p,T=m):p<m&&(k=p,M=m,T=b),k<0?-1:(v[0]=k,v[1]=M,v[2]=T,s.eq(this.cells,v,c))}}();function f(v,m){for(var b=v.cells(),p=b.length,k=0;k<p;++k){var M=b[k],T=M[0],L=M[1],x=M[2];L<x?L<T&&(M[0]=L,M[1]=x,M[2]=T):x<T&&(M[0]=x,M[1]=T,M[2]=L)}b.sort(c);for(var C=new Array(p),k=0;k<C.length;++k)C[k]=0;var S=[],g=[],P=new Array(3*p),E=new Array(3*p),z=null;m&&(z=[]);for(var q=new l(b,P,E,C,S,g,z),k=0;k<p;++k)for(var M=b[k],U=0;U<3;++U){var T=M[U],L=M[(U+1)%3],G=P[3*k+U]=q.locate(L,T,v.opposite(L,T)),Z=E[3*k+U]=v.isConstraint(T,L);G<0&&(Z?g.push(k):(S.push(k),C[k]=1),m&&z.push([L,T,-1]))}return q}function h(v,m,b){for(var p=0,k=0;k<v.length;++k)m[k]===b&&(v[p++]=v[k]);return v.length=p,v}function d(v,m,b){var p=f(v,b);if(m===0)return b?p.cells.concat(p.boundary):p.cells;for(var k=1,M=p.active,T=p.next,L=p.flags,x=p.cells,C=p.constraint,S=p.neighbor;M.length>0||T.length>0;){for(;M.length>0;){var g=M.pop();if(L[g]!==-k){L[g]=k;for(var P=x[g],E=0;E<3;++E){var z=S[3*g+E];z>=0&&L[z]===0&&(C[3*g+E]?T.push(z):(M.push(z),L[z]=k))}}}var q=T;T=M,M=q,T.length=0,k=-k}var U=h(x,L,m);return b?U.concat(p.boundary):U}},8902:function(i,a,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;i.exports=T;function h(L,x,C,S,g){this.a=L,this.b=x,this.idx=C,this.lowerIds=S,this.upperIds=g}function d(L,x,C,S){this.a=L,this.b=x,this.type=C,this.idx=S}function v(L,x){var C=L.a[0]-x.a[0]||L.a[1]-x.a[1]||L.type-x.type;return C||L.type!==u&&(C=l(L.a,L.b,x.b),C)?C:L.idx-x.idx}function m(L,x){return l(L.a,L.b,x)}function b(L,x,C,S,g){for(var P=s.lt(x,S,m),E=s.gt(x,S,m),z=P;z<E;++z){for(var q=x[z],U=q.lowerIds,Z=U.length;Z>1&&l(C[U[Z-2]],C[U[Z-1]],S)>0;)L.push([U[Z-1],U[Z-2],g]),Z-=1;U.length=Z,U.push(g);for(var G=q.upperIds,Z=G.length;Z>1&&l(C[G[Z-2]],C[G[Z-1]],S)<0;)L.push([G[Z-2],G[Z-1],g]),Z-=1;G.length=Z,G.push(g)}}function p(L,x){var C;return L.a[0]<x.a[0]?C=l(L.a,L.b,x.a):C=l(x.b,x.a,L.a),C||(x.b[0]<L.b[0]?C=l(L.a,L.b,x.b):C=l(x.b,x.a,L.b),C||L.idx-x.idx)}function k(L,x,C){var S=s.le(L,C,p),g=L[S],P=g.upperIds,E=P[P.length-1];g.upperIds=[E],L.splice(S+1,0,new h(C.a,C.b,C.idx,[E],P))}function M(L,x,C){var S=C.a;C.a=C.b,C.b=S;var g=s.eq(L,C,p),P=L[g],E=L[g-1];E.upperIds=P.upperIds,L.splice(g,1)}function T(L,x){for(var C=L.length,S=x.length,g=[],P=0;P<C;++P)g.push(new d(L[P],null,u,P));for(var P=0;P<S;++P){var E=x[P],z=L[E[0]],q=L[E[1]];z[0]<q[0]?g.push(new d(z,q,f,P),new d(q,z,c,P)):z[0]>q[0]&&g.push(new d(q,z,f,P),new d(z,q,c,P))}g.sort(v);for(var U=g[0].a[0]-(1+Math.abs(g[0].a[0]))*Math.pow(2,-52),G=[new h([U,1],[U,0],-1,[],[],[],[])],Z=[],P=0,j=g.length;P<j;++P){var N=g[P],H=N.type;H===u?b(Z,G,L,N.a,N.idx):H===f?k(G,L,N):M(G,L,N)}return Z}},5542:function(i,a,o){"use strict";var s=o(2478);i.exports=f;function l(h,d){this.stars=h,this.edges=d}var u=l.prototype;function c(h,d,v){for(var m=1,b=h.length;m<b;m+=2)if(h[m-1]===d&&h[m]===v){h[m-1]=h[b-2],h[m]=h[b-1],h.length=b-2;return}}u.isConstraint=function(){var h=[0,0];function d(v,m){return v[0]-m[0]||v[1]-m[1]}return function(v,m){return h[0]=Math.min(v,m),h[1]=Math.max(v,m),s.eq(this.edges,h,d)>=0}}(),u.removeTriangle=function(h,d,v){var m=this.stars;c(m[h],d,v),c(m[d],v,h),c(m[v],h,d)},u.addTriangle=function(h,d,v){var m=this.stars;m[h].push(d,v),m[d].push(v,h),m[v].push(h,d)},u.opposite=function(h,d){for(var v=this.stars[d],m=1,b=v.length;m<b;m+=2)if(v[m]===h)return v[m-1];return-1},u.flip=function(h,d){var v=this.opposite(h,d),m=this.opposite(d,h);this.removeTriangle(h,d,v),this.removeTriangle(d,h,m),this.addTriangle(h,m,v),this.addTriangle(d,v,m)},u.edges=function(){for(var h=this.stars,d=[],v=0,m=h.length;v<m;++v)for(var b=h[v],p=0,k=b.length;p<k;p+=2)d.push([b[p],b[p+1]]);return d},u.cells=function(){for(var h=this.stars,d=[],v=0,m=h.length;v<m;++v)for(var b=h[v],p=0,k=b.length;p<k;p+=2){var M=b[p],T=b[p+1];v<Math.min(M,T)&&d.push([v,M,T])}return d};function f(h,d){for(var v=new Array(h),m=0;m<h;++m)v[m]=[];return new l(v,d)}},2419:function(i){"use strict";i.exports=a;function a(o){for(var s=1,l=1;l<o.length;++l)for(var u=0;u<l;++u)if(o[l]<o[u])s=-s;else if(o[u]===o[l])return 0;return s}},3628:function(i,a,o){"use strict";var s=o(1338),l=o(727);function u(h,d){for(var v=0,m=h.length,b=0;b<m;++b)v+=h[b]*d[b];return v}function c(h){var d=h.length;if(d===0)return[];var v=h[0].length,m=s([h.length+1,h.length+1],1),b=s([h.length+1],1);m[d][d]=0;for(var p=0;p<d;++p){for(var k=0;k<=p;++k)m[k][p]=m[p][k]=2*u(h[p],h[k]);b[p]=u(h[p],h[p])}for(var M=l(m,b),T=0,L=M[d+1],p=0;p<L.length;++p)T+=L[p];for(var x=new Array(d),p=0;p<d;++p){for(var L=M[p],C=0,k=0;k<L.length;++k)C+=L[k];x[p]=C/T}return x}function f(h){if(h.length===0)return[];for(var d=h[0].length,v=s([d]),m=c(h),b=0;b<h.length;++b)for(var p=0;p<d;++p)v[p]+=h[b][p]*m[b];return v}f.barycenetric=c,i.exports=f},6037:function(i,a,o){i.exports=l;var s=o(3628);function l(u){for(var c=s(u),f=0,h=0;h<u.length;++h)for(var d=u[h],v=0;v<c.length;++v)f+=Math.pow(d[v]-c[v],2);return Math.sqrt(f/u.length)}},332:function(i,a,o){"use strict";i.exports=z;var s=o(1755),l=o(6867),u=o(1125),c=o(7842),f=o(1318),h=o(946),d=o(5838),v=o(1278),m=o(3637);function b(q){var U=h(q);return[v(U,-1/0),v(U,1/0)]}function p(q,U){for(var G=new Array(U.length),Z=0;Z<U.length;++Z){var j=U[Z],N=q[j[0]],H=q[j[1]];G[Z]=[v(Math.min(N[0],H[0]),-1/0),v(Math.min(N[1],H[1]),-1/0),v(Math.max(N[0],H[0]),1/0),v(Math.max(N[1],H[1]),1/0)]}return G}function k(q){for(var U=new Array(q.length),G=0;G<q.length;++G){var Z=q[G];U[G]=[v(Z[0],-1/0),v(Z[1],-1/0),v(Z[0],1/0),v(Z[1],1/0)]}return U}function M(q,U,G){var Z=[];return l(G,function(j,N){var H=U[j],re=U[N];if(!(H[0]===re[0]||H[0]===re[1]||H[1]===re[0]||H[1]===re[1])){var oe=q[H[0]],_e=q[H[1]],ke=q[re[0]],Ce=q[re[1]];u(oe,_e,ke,Ce)&&Z.push([j,N])}}),Z}function T(q,U,G,Z){var j=[];return l(G,Z,function(N,H){var re=U[N];if(!(re[0]===H||re[1]===H)){var oe=q[H],_e=q[re[0]],ke=q[re[1]];u(_e,ke,oe,oe)&&j.push([N,H])}}),j}function L(q,U,G,Z,j){var N,H,re=q.map(function(mt){return[c(mt[0]),c(mt[1])]});for(N=0;N<G.length;++N){var oe=G[N];H=oe[0];var _e=oe[1],ke=U[H],Ce=U[_e],ge=m(d(q[ke[0]]),d(q[ke[1]]),d(q[Ce[0]]),d(q[Ce[1]]));if(ge){var ie=q.length;q.push([h(ge[0]),h(ge[1])]),re.push(ge),Z.push([H,ie],[_e,ie])}}for(Z.sort(function(mt,Vt){if(mt[0]!==Vt[0])return mt[0]-Vt[0];var st=re[mt[1]],ct=re[Vt[1]];return f(st[0],ct[0])||f(st[1],ct[1])}),N=Z.length-1;N>=0;--N){var Se=Z[N];H=Se[0];var Ee=U[H],we=Ee[0],De=Ee[1],Le=q[we],me=q[De];if((Le[0]-me[0]||Le[1]-me[1])<0){var Pe=we;we=De,De=Pe}Ee[0]=we;var ce=Ee[1]=Se[1],He;for(j&&(He=Ee[2]);N>0&&Z[N-1][0]===H;){var Se=Z[--N],lt=Se[1];j?U.push([ce,lt,He]):U.push([ce,lt]),ce=lt}j?U.push([ce,De,He]):U.push([ce,De])}return re}function x(q,U,G){for(var Z=U.length,j=new s(Z),N=[],H=0;H<U.length;++H){var re=U[H],oe=b(re[0]),_e=b(re[1]);N.push([v(oe[0],-1/0),v(_e[0],-1/0),v(oe[1],1/0),v(_e[1],1/0)])}l(N,function(Se,Ee){j.link(Se,Ee)});for(var ke=!0,Ce=new Array(Z),H=0;H<Z;++H){var ge=j.find(H);ge!==H&&(ke=!1,q[ge]=[Math.min(q[H][0],q[ge][0]),Math.min(q[H][1],q[ge][1])])}if(ke)return null;for(var ie=0,H=0;H<Z;++H){var ge=j.find(H);ge===H?(Ce[H]=ie,q[ie++]=q[H]):Ce[H]=-1}q.length=ie;for(var H=0;H<Z;++H)Ce[H]<0&&(Ce[H]=Ce[j.find(H)]);return Ce}function C(q,U){return q[0]-U[0]||q[1]-U[1]}function S(q,U){var G=q[0]-U[0]||q[1]-U[1];return G||(q[2]<U[2]?-1:q[2]>U[2]?1:0)}function g(q,U,G){if(q.length!==0){if(U)for(var Z=0;Z<q.length;++Z){var j=q[Z],N=U[j[0]],H=U[j[1]];j[0]=Math.min(N,H),j[1]=Math.max(N,H)}else for(var Z=0;Z<q.length;++Z){var j=q[Z],N=j[0],H=j[1];j[0]=Math.min(N,H),j[1]=Math.max(N,H)}G?q.sort(S):q.sort(C);for(var re=1,Z=1;Z<q.length;++Z){var oe=q[Z-1],_e=q[Z];_e[0]===oe[0]&&_e[1]===oe[1]&&(!G||_e[2]===oe[2])||(q[re++]=_e)}q.length=re}}function P(q,U,G){var Z=x(q,[],k(q));return g(U,Z,G),!!Z}function E(q,U,G){var Z=p(q,U),j=M(q,U,Z),N=k(q),H=T(q,U,Z,N),re=L(q,U,j,H,G),oe=x(q,re,N);return g(U,oe,G),oe?!0:j.length>0||H.length>0}function z(q,U,G){var Z;if(G){Z=U;for(var j=new Array(U.length),N=0;N<U.length;++N){var H=U[N];j[N]=[H[0],H[1],G[N]]}U=j}for(var re=P(q,U,!!G);E(q,U,!!G);)re=!0;if(G&&re){Z.length=0,G.length=0;for(var N=0;N<U.length;++N){var H=U[N];Z.push([H[0],H[1]]),G.push(H[2])}}return re}},3637:function(i,a,o){"use strict";i.exports=m;var s=o(6504),l=o(8697),u=o(5572),c=o(7721),f=o(544),h=o(2653),d=o(8987);function v(b,p){return u(s(b[0],p[1]),s(b[1],p[0]))}function m(b,p,k,M){var T=f(p,b),L=f(M,k),x=v(T,L);if(c(x)===0)return null;var C=f(b,k),S=v(L,C),g=l(S,x),P=d(T,g),E=h(b,P);return E}},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),l=o(395);i.exports=u;function u(d){var v,m,b,p,k,M,T,L,g,x,C;if(d||(d={}),L=(d.nshades||72)-1,T=d.format||"hex",M=d.colormap,M||(M="jet"),typeof M=="string"){if(M=M.toLowerCase(),!s[M])throw Error(M+" not a supported colorscale");k=s[M]}else if(Array.isArray(M))k=M.slice();else throw Error("unsupported colormap option",M);if(k.length>L+1)throw new Error(M+" map requires nshades to be at least size "+k.length);Array.isArray(d.alpha)?d.alpha.length!==2?x=[1,1]:x=d.alpha.slice():typeof d.alpha=="number"?x=[d.alpha,d.alpha]:x=[1,1],v=k.map(function(z){return Math.round(z.index*L)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var S=k.map(function(z,q){var U=k[q].index,G=k[q].rgb.slice();return G.length===4&&G[3]>=0&&G[3]<=1||(G[3]=x[0]+(x[1]-x[0])*U),G}),g=[];for(C=0;C<v.length-1;++C){p=v[C+1]-v[C],m=S[C],b=S[C+1];for(var P=0;P<p;P++){var E=P/p;g.push([Math.round(l(m[0],b[0],E)),Math.round(l(m[1],b[1],E)),Math.round(l(m[2],b[2],E)),l(m[3],b[3],E)])}}return g.push(k[k.length-1].rgb.concat(x[1])),T==="hex"?g=g.map(f):T==="rgbaString"?g=g.map(h):T==="float"&&(g=g.map(c)),g}function c(d){return[d[0]/255,d[1]/255,d[2]/255,d[3]]}function f(d){for(var v,m="#",b=0;b<3;++b)v=d[b],v=v.toString(16),m+=("00"+v).substr(v.length);return m}function h(d){return"rgba("+d.join(",")+")"}},3140:function(i,a,o){"use strict";i.exports=d;var s=o(3250),l=o(8572),u=o(9362),c=o(5382),f=o(8210);function h(v,m,b){var p=u(v[0],-m[0]),k=u(v[1],-m[1]),M=u(b[0],-m[0]),T=u(b[1],-m[1]),L=f(c(p,M),c(k,T));return L[L.length-1]>=0}function d(v,m,b,p){var k=s(m,b,p);if(k===0){var M=l(s(v,m,b)),T=l(s(v,m,p));if(M===T){if(M===0){var L=h(v,m,b),x=h(v,m,p);return L===x?0:L?1:-1}return 0}else{if(T===0)return M>0||h(v,m,p)?-1:1;if(M===0)return T>0||h(v,m,b)?1:-1}return l(T-M)}var C=s(v,m,b);if(C>0)return k>0&&s(v,m,p)>0?1:-1;if(C<0)return k>0||s(v,m,p)>0?1:-1;var S=s(v,m,p);return S>0||h(v,m,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(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||a(l[0],l[1])-a(u[0],u[1]);case 3:var h=l[0]+l[1],d=u[0]+u[1];if(f=h+l[2]-(d+u[2]),f)return f;var v=a(l[0],l[1]),m=a(u[0],u[1]);return a(v,l[2])-a(m,u[2])||a(v+l[2],h)-a(m+u[2],d);case 4:var b=l[0],p=l[1],k=l[2],M=l[3],T=u[0],L=u[1],x=u[2],C=u[3];return b+p+k+M-(T+L+x+C)||a(b,p,k,M)-a(T,L,x,C,T)||a(b+p,b+k,b+M,p+k,p+M,k+M)-a(T+L,T+x,T+C,L+x,L+C,x+C)||a(b+p+k,b+p+M,b+k+M,p+k+M)-a(T+L+x,T+L+C,T+x+C,L+x+C);default:for(var S=l.slice().sort(o),g=u.slice().sort(o),P=0;P<c;++P)if(f=S[P]-g[P],f)return f;return 0}}},3788:function(i,a,o){"use strict";var s=o(8507),l=o(2419);i.exports=u;function u(c,f){return s(c,f)||l(c)-l(f)}},7352:function(i,a,o){"use strict";var s=o(5721),l=o(4750),u=o(2690);i.exports=c;function c(f){var h=f.length;if(h===0)return[];if(h===1)return[[0]];var d=f[0].length;return d===0?[]:d===1?s(f):d===2?l(f):u(f,d)}},5721:function(i){"use strict";i.exports=a;function a(o){for(var s=0,l=0,u=1;u<o.length;++u)o[u][0]<o[s][0]&&(s=u),o[u][0]>o[l][0]&&(l=u);return s<l?[[s],[l]]:s>l?[[l],[s]]:[[s]]}},4750:function(i,a,o){"use strict";i.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var h=new Array(f),d=c[f-1],v=0;v<f;++v){var m=c[v];h[v]=[d,m],d=m}return h}},2690:function(i,a,o){"use strict";i.exports=f;var s=o(8954),l=o(3952);function u(h,d){for(var v=h.length,m=new Array(v),b=0;b<d.length;++b)m[b]=h[d[b]];for(var p=d.length,b=0;b<v;++b)d.indexOf(b)<0&&(m[p++]=h[b]);return m}function c(h,d){for(var v=h.length,m=d.length,b=0;b<v;++b)for(var p=h[b],k=0;k<p.length;++k){var M=p[k];if(M<m)p[k]=d[M];else{M=M-m;for(var T=0;T<m;++T)M>=d[T]&&(M+=1);p[k]=M}}return h}function f(h,d){try{return s(h,!0)}catch(p){var v=l(h);if(v.length<=d)return[];var m=u(h,v),b=s(m,!0);return c(b,v)}}},4769:function(i){"use strict";function a(s,l,u,c,f,h){var d=6*f*f-6*f,v=3*f*f-4*f+1,m=-6*f*f+6*f,b=3*f*f-2*f;if(s.length){h||(h=new Array(s.length));for(var p=s.length-1;p>=0;--p)h[p]=d*s[p]+v*l[p]+m*u[p]+b*c[p];return h}return d*s+v*l+m*u[p]+b*c}function o(s,l,u,c,f,h){var d=f-1,v=f*f,m=d*d,b=(1+2*f)*m,p=f*m,k=v*(3-2*f),M=v*d;if(s.length){h||(h=new Array(s.length));for(var T=s.length-1;T>=0;--T)h[T]=b*s[T]+p*l[T]+k*u[T]+M*c[T];return h}return b*s+p*l+k*u+M*c}i.exports=o,i.exports.derivative=a},7642:function(i,a,o){"use strict";var s=o(8954),l=o(1682);i.exports=h;function u(d,v){this.point=d,this.index=v}function c(d,v){for(var m=d.point,b=v.point,p=m.length,k=0;k<p;++k){var M=b[k]-m[k];if(M)return M}return 0}function f(d,v,m){if(d===1)return m?[[-1,0]]:[];var b=v.map(function(L,x){return[L[0],x]});b.sort(function(L,x){return L[0]-x[0]});for(var p=new Array(d-1),k=1;k<d;++k){var M=b[k-1],T=b[k];p[k-1]=[M[1],T[1]]}return m&&p.push([-1,p[0][1]],[p[d-1][1],-1]),p}function h(d,v){var m=d.length;if(m===0)return[];var b=d[0].length;if(b<1)return[];if(b===1)return f(m,d,v);for(var p=new Array(m),k=1,M=0;M<m;++M){for(var T=d[M],L=new Array(b+1),x=0,C=0;C<b;++C){var S=T[C];L[C]=S,x+=S*S}L[b]=x,p[M]=new u(L,M),k=Math.max(x,k)}l(p,c),m=p.length;for(var g=new Array(m+b+1),P=new Array(m+b+1),E=(b+1)*(b+1)*k,z=new Array(b+1),M=0;M<=b;++M)z[M]=0;z[b]=E,g[0]=z.slice(),P[0]=-1;for(var M=0;M<=b;++M){var L=z.slice();L[M]=1,g[M+1]=L,P[M+1]=-1}for(var M=0;M<m;++M){var q=p[M];g[M+b+1]=q.point,P[M+b+1]=q.index}var U=s(g,!1);if(v?U=U.filter(function(G){for(var Z=0,j=0;j<=b;++j){var N=P[G[j]];if(N<0&&++Z>=2)return!1;G[j]=N}return!0}):U=U.filter(function(G){for(var Z=0;Z<=b;++Z){var j=P[G[Z]];if(j<0)return!1;G[Z]=j}return!0}),b&1)for(var M=0;M<U.length;++M){var q=U[M],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,x){return s[0]=L,s[1]=x,o[0]},M=function(L){return o[0]=L,s[0]},T=function(L){return o[0]=L,s[1]};var u=k,c=M,f=T;i.exports=function(x){return o[0]=x,[s[0],s[1]]},i.exports.pack=k,i.exports.lo=M,i.exports.hi=T}else if(s[0]===1072693248){let k=function(L,x){return s[1]=L,s[0]=x,o[0]},M=function(L){return o[0]=L,s[1]},T=function(L){return o[0]=L,s[0]};var h=k,d=M,v=T;i.exports=function(x){return o[0]=x,[s[1],s[0]]},i.exports.pack=k,i.exports.lo=M,i.exports.hi=T}else a=!1}if(!a){let k=function(L,x){return l.writeUInt32LE(L,0,!0),l.writeUInt32LE(x,4,!0),l.readDoubleLE(0,!0)},M=function(L){return l.writeDoubleLE(L,0,!0),l.readUInt32LE(0,!0)},T=function(L){return l.writeDoubleLE(L,0,!0),l.readUInt32LE(4,!0)};var m=k,b=M,p=T,l=new Buffer(8);i.exports=function(x){return l.writeDoubleLE(x,0,!0),[l.readUInt32LE(0,!0),l.readUInt32LE(4,!0)]},i.exports.pack=k,i.exports.lo=M,i.exports.hi=T}i.exports.sign=function(k){return i.exports.hi(k)>>>31},i.exports.exponent=function(k){var M=i.exports.hi(k);return(M<<1>>>21)-1023},i.exports.fraction=function(k){var M=i.exports.lo(k),T=i.exports.hi(k),L=T&(1<<20)-1;return T&2146435072&&(L+=1048576),[M,L]},i.exports.denormalized=function(k){var M=i.exports.hi(k);return!(M&2146435072)}},1338:function(i){"use strict";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),d;if(c===l.length-1)for(d=0;d<f;++d)h[d]=u;else for(d=0;d<f;++d)h[d]=a(l,u,c+1);return h}function o(l,u){var c,f;for(c=new Array(l),f=0;f<l;++f)c[f]=u;return c}function s(l,u){switch(typeof u=="undefined"&&(u=0),typeof l){case"number":if(l>0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return a(l,u,0);break}return[]}i.exports=s},3134:function(i,a,o){"use strict";i.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var h=0;h<f;++h){var d=u[h];c=Math.max(c,d[0],d[1])}c=(c|0)+1}c=c|0;for(var v=new Array(c),h=0;h<c;++h)v[h]=[];for(var h=0;h<f;++h){var d=u[h];v[d[0]].push(d[1]),v[d[1]].push(d[0])}for(var m=0;m<c;++m)s(v[m],function(b,p){return b-p});return v}},5033:function(i){"use strict";i.exports=a;function a(o,s,l){var u=s||0,c=l||1;return[[o[12]+o[0],o[13]+o[1],o[14]+o[2],o[15]+o[3]],[o[12]-o[0],o[13]-o[1],o[14]-o[2],o[15]-o[3]],[o[12]+o[4],o[13]+o[5],o[14]+o[6],o[15]+o[7]],[o[12]-o[4],o[13]-o[5],o[14]-o[6],o[15]-o[7]],[u*o[12]+o[8],u*o[13]+o[9],u*o[14]+o[10],u*o[15]+o[11]],[c*o[12]-o[8],c*o[13]-o[9],c*o[14]-o[10],c*o[15]-o[11]]]}},9215:function(i,a,o){"use strict";i.exports=d;var s=o(4769),l=o(2478);function u(v,m,b){return Math.min(m,Math.max(v,b))}function c(v,m,b){this.dimension=v.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var p=0;p<this.dimension;++p)this.bounds[0][p]=-1/0,this.bounds[1][p]=1/0;this._state=v.slice().reverse(),this._velocity=m.slice().reverse(),this._time=[b],this._scratch=[v.slice(),v.slice(),v.slice(),v.slice(),v.slice()]}var f=c.prototype;f.flush=function(v){var m=l.gt(this._time,v)-1;m<=0||(this._time.splice(0,m),this._state.splice(0,m*this.dimension),this._velocity.splice(0,m*this.dimension))},f.curve=function(v){var m=this._time,b=m.length,p=l.le(m,v),k=this._scratch[0],M=this._state,T=this._velocity,L=this.dimension,x=this.bounds;if(p<0)for(var C=L-1,S=0;S<L;++S,--C)k[S]=M[C];else if(p>=b-1)for(var C=M.length-1,g=v-m[b-1],S=0;S<L;++S,--C)k[S]=M[C]+g*T[C];else{for(var C=L*(p+1)-1,P=m[p],E=m[p+1],z=E-P||1,q=this._scratch[1],U=this._scratch[2],G=this._scratch[3],Z=this._scratch[4],j=!0,S=0;S<L;++S,--C)q[S]=M[C],G[S]=T[C]*z,U[S]=M[C+L],Z[S]=T[C+L]*z,j=j&&q[S]===U[S]&&G[S]===Z[S]&&G[S]===0;if(j)for(var S=0;S<L;++S)k[S]=q[S];else s(q,G,U,Z,(v-P)/z,k)}for(var N=x[0],H=x[1],S=0;S<L;++S)k[S]=u(N[S],H[S],k[S]);return k},f.dcurve=function(v){var m=this._time,b=m.length,p=l.le(m,v),k=this._scratch[0],M=this._state,T=this._velocity,L=this.dimension;if(p>=b-1)for(var x=M.length-1,C=v-m[b-1],S=0;S<L;++S,--x)k[S]=T[x];else{for(var x=L*(p+1)-1,g=m[p],P=m[p+1],E=P-g||1,z=this._scratch[1],q=this._scratch[2],U=this._scratch[3],G=this._scratch[4],Z=!0,S=0;S<L;++S,--x)z[S]=M[x],U[S]=T[x]*E,q[S]=M[x+L],G[S]=T[x+L]*E,Z=Z&&z[S]===q[S]&&U[S]===G[S]&&U[S]===0;if(Z)for(var S=0;S<L;++S)k[S]=0;else{s.derivative(z,U,q,G,(v-g)/E,k);for(var S=0;S<L;++S)k[S]/=E}}return k},f.lastT=function(){var v=this._time;return v[v.length-1]},f.stable=function(){for(var v=this._velocity,m=v.length,b=this.dimension-1;b>=0;--b)if(v[--m])return!1;return!0},f.jump=function(v){var m=this.lastT(),b=this.dimension;if(!(v<m||arguments.length!==b+1)){var p=this._state,k=this._velocity,M=p.length-this.dimension,T=this.bounds,L=T[0],x=T[1];this._time.push(m,v);for(var C=0;C<2;++C)for(var S=0;S<b;++S)p.push(p[M++]),k.push(0);this._time.push(v);for(var S=b;S>0;--S)p.push(u(L[S-1],x[S-1],arguments[S])),k.push(0)}},f.push=function(v){var m=this.lastT(),b=this.dimension;if(!(v<m||arguments.length!==b+1)){var p=this._state,k=this._velocity,M=p.length-this.dimension,T=v-m,L=this.bounds,x=L[0],C=L[1],S=T>1e-6?1/T:0;this._time.push(v);for(var g=b;g>0;--g){var P=u(x[g-1],C[g-1],arguments[g]);p.push(P),k.push((P-p[M++])*S)}}},f.set=function(v){var m=this.dimension;if(!(v<this.lastT()||arguments.length!==m+1)){var b=this._state,p=this._velocity,k=this.bounds,M=k[0],T=k[1];this._time.push(v);for(var L=m;L>0;--L)b.push(u(M[L-1],T[L-1],arguments[L])),p.push(0)}},f.move=function(v){var m=this.lastT(),b=this.dimension;if(!(v<=m||arguments.length!==b+1)){var p=this._state,k=this._velocity,M=p.length-this.dimension,T=this.bounds,L=T[0],x=T[1],C=v-m,S=C>1e-6?1/C:0;this._time.push(v);for(var g=b;g>0;--g){var P=arguments[g];p.push(u(L[g-1],x[g-1],p[M++]+P)),k.push(P*S)}}},f.idle=function(v){var m=this.lastT();if(!(v<m)){var b=this.dimension,p=this._state,k=this._velocity,M=p.length-b,T=this.bounds,L=T[0],x=T[1],C=v-m;this._time.push(v);for(var S=b-1;S>=0;--S)p.push(u(L[S],x[S],p[M]+C*k[M])),k.push(0),M+=1}};function h(v){for(var m=new Array(v),b=0;b<v;++b)m[b]=0;return m}function d(v,m,b){switch(arguments.length){case 0:return new c([0],[0],0);case 1:if(typeof v=="number"){var p=h(v);return new c(p,p,0)}else return new c(v,h(v.length),0);case 2:if(typeof m=="number"){var p=h(v.length);return new c(v,p,+m)}else b=0;case 3:if(v.length!==m.length)throw new Error("state and velocity lengths must match");return new c(v,m,b)}}},3840:function(i){"use strict";i.exports=L;var a=0,o=1;function s(x,C,S,g,P,E){this._color=x,this.key=C,this.value=S,this.left=g,this.right=P,this._count=E}function l(x){return new s(x._color,x.key,x.value,x.left,x.right,x._count)}function u(x,C){return new s(x,C.key,C.value,C.left,C.right,C._count)}function c(x){x._count=1+(x.left?x.left._count:0)+(x.right?x.right._count:0)}function f(x,C){this._compare=x,this.root=C}var h=f.prototype;Object.defineProperty(h,"keys",{get:function(){var x=[];return this.forEach(function(C,S){x.push(C)}),x}}),Object.defineProperty(h,"values",{get:function(){var x=[];return this.forEach(function(C,S){x.push(S)}),x}}),Object.defineProperty(h,"length",{get:function(){return this.root?this.root._count:0}}),h.insert=function(x,C){for(var S=this._compare,g=this.root,P=[],E=[];g;){var z=S(x,g.key);P.push(g),E.push(z),z<=0?g=g.left:g=g.right}P.push(new s(a,x,C,null,null,1));for(var q=P.length-2;q>=0;--q){var g=P[q];E[q]<=0?P[q]=new s(g._color,g.key,g.value,P[q+1],g.right,g._count+1):P[q]=new s(g._color,g.key,g.value,g.left,P[q+1],g._count+1)}for(var q=P.length-1;q>1;--q){var U=P[q-1],g=P[q];if(U._color===o||g._color===o)break;var G=P[q-2];if(G.left===U)if(U.left===g){var Z=G.right;if(Z&&Z._color===a)U._color=o,G.right=u(o,Z),G._color=a,q-=1;else{if(G._color=a,G.left=U.right,U._color=o,U.right=G,P[q-2]=U,P[q-1]=g,c(G),c(U),q>=3){var j=P[q-3];j.left===G?j.left=U:j.right=U}break}}else{var Z=G.right;if(Z&&Z._color===a)U._color=o,G.right=u(o,Z),G._color=a,q-=1;else{if(U.right=g.left,G._color=a,G.left=g.right,g._color=o,g.left=U,g.right=G,P[q-2]=g,P[q-1]=U,c(G),c(U),c(g),q>=3){var j=P[q-3];j.left===G?j.left=g:j.right=g}break}}else if(U.right===g){var Z=G.left;if(Z&&Z._color===a)U._color=o,G.left=u(o,Z),G._color=a,q-=1;else{if(G._color=a,G.right=U.left,U._color=o,U.left=G,P[q-2]=U,P[q-1]=g,c(G),c(U),q>=3){var j=P[q-3];j.right===G?j.right=U:j.left=U}break}}else{var Z=G.left;if(Z&&Z._color===a)U._color=o,G.left=u(o,Z),G._color=a,q-=1;else{if(U.left=g.right,G._color=a,G.right=g.left,g._color=o,g.right=U,g.left=G,P[q-2]=g,P[q-1]=U,c(G),c(U),c(g),q>=3){var j=P[q-3];j.right===G?j.right=g:j.left=g}break}}}return P[0]._color=o,new f(S,P[0])};function d(x,C){if(C.left){var S=d(x,C.left);if(S)return S}var S=x(C.key,C.value);if(S)return S;if(C.right)return d(x,C.right)}function v(x,C,S,g){var P=C(x,g.key);if(P<=0){if(g.left){var E=v(x,C,S,g.left);if(E)return E}var E=S(g.key,g.value);if(E)return E}if(g.right)return v(x,C,S,g.right)}function m(x,C,S,g,P){var E=S(x,P.key),z=S(C,P.key),q;if(E<=0&&(P.left&&(q=m(x,C,S,g,P.left),q)||z>0&&(q=g(P.key,P.value),q)))return q;if(z>0&&P.right)return m(x,C,S,g,P.right)}h.forEach=function(C,S,g){if(this.root)switch(arguments.length){case 1:return d(C,this.root);case 2:return v(S,this._compare,C,this.root);case 3:return this._compare(S,g)>=0?void 0:m(S,g,this._compare,C,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.left;return new b(this,x)}}),Object.defineProperty(h,"end",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.right;return new b(this,x)}}),h.at=function(x){if(x<0)return new b(this,[]);for(var C=this.root,S=[];;){if(S.push(C),C.left){if(x<C.left._count){C=C.left;continue}x-=C.left._count}if(!x)return new b(this,S);if(x-=1,C.right){if(x>=C.right._count)break;C=C.right}else break}return new b(this,[])},h.ge=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E<=0&&(P=g.length),E<=0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.gt=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E<0&&(P=g.length),E<0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.lt=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E>0&&(P=g.length),E<=0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.le=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E>=0&&(P=g.length),E<0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.find=function(x){for(var C=this._compare,S=this.root,g=[];S;){var P=C(x,S.key);if(g.push(S),P===0)return new b(this,g);P<=0?S=S.left:S=S.right}return new b(this,[])},h.remove=function(x){var C=this.find(x);return C?C.remove():this},h.get=function(x){for(var C=this._compare,S=this.root;S;){var g=C(x,S.key);if(g===0)return S.value;g<=0?S=S.left:S=S.right}};function b(x,C){this.tree=x,this._stack=C}var p=b.prototype;Object.defineProperty(p,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(p,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),p.clone=function(){return new b(this.tree,this._stack.slice())};function k(x,C){x.key=C.key,x.value=C.value,x.left=C.left,x.right=C.right,x._color=C._color,x._count=C._count}function M(x){for(var C,S,g,P,E=x.length-1;E>=0;--E){if(C=x[E],E===0){C._color=o;return}if(S=x[E-1],S.left===C){if(g=S.right,g.right&&g.right._color===a){if(g=S.right=l(g),P=g.right=l(g.right),S.right=g.left,g.left=S,g.right=P,g._color=S._color,C._color=o,S._color=o,P._color=o,c(S),c(g),E>1){var z=x[E-2];z.left===S?z.left=g:z.right=g}x[E-1]=g;return}else if(g.left&&g.left._color===a){if(g=S.right=l(g),P=g.left=l(g.left),S.right=P.left,g.left=P.right,P.left=S,P.right=g,P._color=S._color,S._color=o,g._color=o,C._color=o,c(S),c(g),c(P),E>1){var z=x[E-2];z.left===S?z.left=P:z.right=P}x[E-1]=P;return}if(g._color===o)if(S._color===a){S._color=o,S.right=u(a,g);return}else{S.right=u(a,g);continue}else{if(g=l(g),S.right=g.left,g.left=S,g._color=S._color,S._color=a,c(S),c(g),E>1){var z=x[E-2];z.left===S?z.left=g:z.right=g}x[E-1]=g,x[E]=S,E+1<x.length?x[E+1]=C:x.push(C),E=E+2}}else{if(g=S.left,g.left&&g.left._color===a){if(g=S.left=l(g),P=g.left=l(g.left),S.left=g.right,g.right=S,g.left=P,g._color=S._color,C._color=o,S._color=o,P._color=o,c(S),c(g),E>1){var z=x[E-2];z.right===S?z.right=g:z.left=g}x[E-1]=g;return}else if(g.right&&g.right._color===a){if(g=S.left=l(g),P=g.right=l(g.right),S.left=P.right,g.right=P.left,P.right=S,P.left=g,P._color=S._color,S._color=o,g._color=o,C._color=o,c(S),c(g),c(P),E>1){var z=x[E-2];z.right===S?z.right=P:z.left=P}x[E-1]=P;return}if(g._color===o)if(S._color===a){S._color=o,S.left=u(a,g);return}else{S.left=u(a,g);continue}else{if(g=l(g),S.left=g.right,g.right=S,g._color=S._color,S._color=a,c(S),c(g),E>1){var z=x[E-2];z.right===S?z.right=g:z.left=g}x[E-1]=g,x[E]=S,E+1<x.length?x[E+1]=C:x.push(C),E=E+2}}}}p.remove=function(){var x=this._stack;if(x.length===0)return this.tree;var C=new Array(x.length),S=x[x.length-1];C[C.length-1]=new s(S._color,S.key,S.value,S.left,S.right,S._count);for(var g=x.length-2;g>=0;--g){var S=x[g];S.left===x[g+1]?C[g]=new s(S._color,S.key,S.value,C[g+1],S.right,S._count):C[g]=new s(S._color,S.key,S.value,S.left,C[g+1],S._count)}if(S=C[C.length-1],S.left&&S.right){var P=C.length;for(S=S.left;S.right;)C.push(S),S=S.right;var E=C[P-1];C.push(new s(S._color,E.key,E.value,S.left,S.right,S._count)),C[P-1].key=S.key,C[P-1].value=S.value;for(var g=C.length-2;g>=P;--g)S=C[g],C[g]=new s(S._color,S.key,S.value,S.left,C[g+1],S._count);C[P-1].left=C[P]}if(S=C[C.length-1],S._color===a){var z=C[C.length-2];z.left===S?z.left=null:z.right===S&&(z.right=null),C.pop();for(var g=0;g<C.length;++g)C[g]._count--;return new f(this.tree._compare,C[0])}else if(S.left||S.right){S.left?k(S,S.left):S.right&&k(S,S.right),S._color=o;for(var g=0;g<C.length-1;++g)C[g]._count--;return new f(this.tree._compare,C[0])}else{if(C.length===1)return new f(this.tree._compare,null);for(var g=0;g<C.length;++g)C[g]._count--;var q=C[C.length-2];M(C),q.left===S?q.left=null:q.right=null}return new f(this.tree._compare,C[0])},Object.defineProperty(p,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(p,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(p,"index",{get:function(){var x=0,C=this._stack;if(C.length===0){var S=this.tree.root;return S?S._count:0}else C[C.length-1].left&&(x=C[C.length-1].left._count);for(var g=C.length-2;g>=0;--g)C[g+1]===C[g].right&&(++x,C[g].left&&(x+=C[g].left._count));return x},enumerable:!0}),p.next=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.right)for(C=C.right;C;)x.push(C),C=C.left;else for(x.pop();x.length>0&&x[x.length-1].right===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,"hasNext",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].left===x[C])return!0;return!1}}),p.update=function(x){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var S=new Array(C.length),g=C[C.length-1];S[S.length-1]=new s(g._color,g.key,x,g.left,g.right,g._count);for(var P=C.length-2;P>=0;--P)g=C[P],g.left===C[P+1]?S[P]=new s(g._color,g.key,g.value,S[P+1],g.right,g._count):S[P]=new s(g._color,g.key,g.value,g.left,S[P+1],g._count);return new f(this.tree._compare,S[0])},p.prev=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.left)for(C=C.left;C;)x.push(C),C=C.right;else for(x.pop();x.length>0&&x[x.length-1].left===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,"hasPrev",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].right===x[C])return!0;return!1}});function T(x,C){return x<C?-1:x>C?1:0}function L(x){return new f(x||T,null)}},3837:function(i,a,o){"use strict";i.exports=q;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,v=DataView;function m(U){return d.isView(U)&&!(U instanceof v)}function b(U){return Array.isArray(U)||m(U)}function p(U,G){return U[0]=G[0],U[1]=G[1],U[2]=G[2],U}function k(U){this.gl=U,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=u(U)}var M=k.prototype;M.update=function(U){U=U||{};function G(we,De,Le){if(Le in U){var me=U[Le],Pe=this[Le],ce;(we?b(me)&&b(me[0]):b(me))?this[Le]=ce=[De(me[0]),De(me[1]),De(me[2])]:this[Le]=ce=[De(me),De(me),De(me)];for(var He=0;He<3;++He)if(ce[He]!==Pe[He])return!0}return!1}var Z=G.bind(this,!1,Number),j=G.bind(this,!1,Boolean),N=G.bind(this,!1,String),H=G.bind(this,!0,function(we){if(b(we)){if(we.length===3)return[+we[0],+we[1],+we[2],1];if(we.length===4)return[+we[0],+we[1],+we[2],+we[3]]}return[0,0,0,1]}),re,oe=!1,_e=!1;if("bounds"in U)for(var ke=U.bounds,Ce=0;Ce<2;++Ce)for(var ge=0;ge<3;++ge)ke[Ce][ge]!==this.bounds[Ce][ge]&&(_e=!0),this.bounds[Ce][ge]=ke[Ce][ge];if("ticks"in U){re=U.ticks,oe=!0,this.autoTicks=!1;for(var Ce=0;Ce<3;++Ce)this.tickSpacing[Ce]=0}else Z("tickSpacing")&&(this.autoTicks=!0,_e=!0);if(this._firstInit&&("ticks"in U||"tickSpacing"in U||(this.autoTicks=!0),_e=!0,oe=!0,this._firstInit=!1),_e&&this.autoTicks&&(re=f.create(this.bounds,this.tickSpacing),oe=!0),oe){for(var Ce=0;Ce<3;++Ce)re[Ce].sort(function(De,Le){return De.x-Le.x});f.equal(re,this.ticks)?oe=!1:this.ticks=re}j("tickEnable"),N("tickFont")&&(oe=!0),N("tickFontStyle")&&(oe=!0),N("tickFontWeight")&&(oe=!0),N("tickFontVariant")&&(oe=!0),Z("tickSize"),Z("tickAngle"),Z("tickPad"),H("tickColor");var ie=N("labels");N("labelFont")&&(ie=!0),N("labelFontStyle")&&(ie=!0),N("labelFontWeight")&&(ie=!0),N("labelFontVariant")&&(ie=!0),j("labelEnable"),Z("labelSize"),Z("labelPad"),H("labelColor"),j("lineEnable"),j("lineMirror"),Z("lineWidth"),H("lineColor"),j("lineTickEnable"),j("lineTickMirror"),Z("lineTickLength"),Z("lineTickWidth"),H("lineTickColor"),j("gridEnable"),Z("gridWidth"),H("gridColor"),j("zeroEnable"),H("zeroLineColor"),Z("zeroLineWidth"),j("backgroundEnable"),H("backgroundColor");var Se=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],Ee=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(ie||oe)&&this._text.update(this.bounds,this.labels,Se,this.ticks,Ee):this._text=s(this.gl,this.bounds,this.labels,Se,this.ticks,Ee),this._lines&&oe&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function T(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new T,new T,new T];function x(U,G,Z,j,N){for(var H=U.primalOffset,re=U.primalMinor,oe=U.mirrorOffset,_e=U.mirrorMinor,ke=j[G],Ce=0;Ce<3;++Ce)if(G!==Ce){var ge=H,ie=oe,Se=re,Ee=_e;ke&1<<Ce&&(ge=oe,ie=H,Se=_e,Ee=re),ge[Ce]=Z[0][Ce],ie[Ce]=Z[1][Ce],N[Ce]>0?(Se[Ce]=-1,Ee[Ce]=0):(Se[Ce]=0,Ee[Ce]=1)}}var C=[0,0,0],S={model:h,view:h,projection:h,_ortho:!1};M.isOpaque=function(){return!0},M.isTransparent=function(){return!1},M.drawTransparent=function(U){};var g=0,P=[0,0,0],E=[0,0,0],z=[0,0,0];M.draw=function(U){U=U||S;for(var Le=this.gl,G=U.model||h,Z=U.view||h,j=U.projection||h,N=this.bounds,H=U._ortho||!1,re=c(G,Z,j,N,H),oe=re.cubeEdges,_e=re.axis,ke=Z[12],Ce=Z[13],ge=Z[14],ie=Z[15],Se=H?2:1,Ee=Se*this.pixelRatio*(j[3]*ke+j[7]*Ce+j[11]*ge+j[15]*ie)/Le.drawingBufferHeight,we=0;we<3;++we)this.lastCubeProps.cubeEdges[we]=oe[we],this.lastCubeProps.axis[we]=_e[we];for(var De=L,we=0;we<3;++we)x(L[we],we,this.bounds,oe,_e);for(var Le=this.gl,me=C,we=0;we<3;++we)this.backgroundEnable[we]?me[we]=_e[we]:me[we]=0;this._background.draw(G,Z,j,N,me,this.backgroundColor),this._lines.bind(G,Z,j,this);for(var we=0;we<3;++we){var Pe=[0,0,0];_e[we]>0?Pe[we]=N[1][we]:Pe[we]=N[0][we];for(var ce=0;ce<2;++ce){var He=(we+1+ce)%3,lt=(we+1+(ce^1))%3;this.gridEnable[He]&&this._lines.drawGrid(He,lt,this.bounds,Pe,this.gridColor[He],this.gridWidth[He]*this.pixelRatio)}for(var ce=0;ce<2;++ce){var He=(we+1+ce)%3,lt=(we+1+(ce^1))%3;this.zeroEnable[lt]&&Math.min(N[0][lt],N[1][lt])<=0&&Math.max(N[0][lt],N[1][lt])>=0&&this._lines.drawZero(He,lt,this.bounds,Pe,this.zeroLineColor[lt],this.zeroLineWidth[lt]*this.pixelRatio)}}for(var we=0;we<3;++we){this.lineEnable[we]&&this._lines.drawAxisLine(we,this.bounds,De[we].primalOffset,this.lineColor[we],this.lineWidth[we]*this.pixelRatio),this.lineMirror[we]&&this._lines.drawAxisLine(we,this.bounds,De[we].mirrorOffset,this.lineColor[we],this.lineWidth[we]*this.pixelRatio);for(var mt=p(P,De[we].primalMinor),Vt=p(E,De[we].mirrorMinor),st=this.lineTickLength,ce=0;ce<3;++ce){var ct=Ee/G[5*ce];mt[ce]*=st[ce]*ct,Vt[ce]*=st[ce]*ct}this.lineTickEnable[we]&&this._lines.drawAxisTicks(we,De[we].primalOffset,mt,this.lineTickColor[we],this.lineTickWidth[we]*this.pixelRatio),this.lineTickMirror[we]&&this._lines.drawAxisTicks(we,De[we].mirrorOffset,Vt,this.lineTickColor[we],this.lineTickWidth[we]*this.pixelRatio)}this._lines.unbind(),this._text.bind(G,Z,j,this.pixelRatio);var Qt,Ht=.5,nr,tt;function je(dt){tt=[0,0,0],tt[dt]=1}function Ue(dt,Et,pt){var Xt=(dt+1)%3,or=(dt+2)%3,_r=Et[Xt],Er=Et[or],ei=pt[Xt],qr=pt[or];if(_r>0&&qr>0){je(Xt);return}else if(_r>0&&qr<0){je(Xt);return}else if(_r<0&&qr>0){je(Xt);return}else if(_r<0&&qr<0){je(Xt);return}else if(Er>0&&ei>0){je(or);return}else if(Er>0&&ei<0){je(or);return}else if(Er<0&&ei>0){je(or);return}else if(Er<0&&ei<0){je(or);return}}for(var we=0;we<3;++we){for(var Ae=De[we].primalMinor,rt=De[we].mirrorMinor,St=p(z,De[we].primalOffset),ce=0;ce<3;++ce)this.lineTickEnable[we]&&(St[ce]+=Ee*Ae[ce]*Math.max(this.lineTickLength[ce],0)/G[5*ce]);var Tt=[0,0,0];if(Tt[we]=1,this.tickEnable[we]){this.tickAngle[we]===-3600?(this.tickAngle[we]=0,this.tickAlign[we]="auto"):this.tickAlign[we]=-1,nr=1,Qt=[this.tickAlign[we],Ht,nr],Qt[0]==="auto"?Qt[0]=g:Qt[0]=parseInt(""+Qt[0]),tt=[0,0,0],Ue(we,Ae,rt);for(var ce=0;ce<3;++ce)St[ce]+=Ee*Ae[ce]*this.tickPad[ce]/G[5*ce];this._text.drawTicks(we,this.tickSize[we],this.tickAngle[we],St,this.tickColor[we],Tt,tt,Qt)}if(this.labelEnable[we]){nr=0,tt=[0,0,0],this.labels[we].length>4&&(je(we),nr=1),Qt=[this.labelAlign[we],Ht,nr],Qt[0]==="auto"?Qt[0]=g:Qt[0]=parseInt(""+Qt[0]);for(var ce=0;ce<3;++ce)St[ce]+=Ee*Ae[ce]*this.labelPad[ce]/G[5*ce];St[we]+=.5*(N[0][we]+N[1][we]),this._text.drawLabel(we,this.labelSize[we],this.labelAngle[we],St,this.labelColor[we],[0,0,0],tt,Qt)}}this._text.unbind()},M.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,G){var Z=new k(U);return Z.update(G),Z}},5304:function(i,a,o){"use strict";i.exports=h;var s=o(2762),l=o(8116),u=o(1879).bg;function c(d,v,m,b){this.gl=d,this.buffer=v,this.vao=m,this.shader=b}var f=c.prototype;f.draw=function(d,v,m,b,p,k){for(var M=!1,T=0;T<3;++T)M=M||p[T];if(M){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:v,projection:m,bounds:b,enable:p,colors:k},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var v=[],m=[],b=0,p=0;p<3;++p)for(var k=(p+1)%3,M=(p+2)%3,T=[0,0,0],L=[0,0,0],x=-1;x<=1;x+=2){m.push(b,b+2,b+1,b+1,b+2,b+3),T[p]=x,L[p]=x;for(var C=-1;C<=1;C+=2){T[k]=C;for(var S=-1;S<=1;S+=2)T[M]=S,v.push(T[0],T[1],T[2],L[0],L[1],L[2]),b+=1}var g=k;k=M,M=g}var P=s(d,new Float32Array(v)),E=s(d,new Uint16Array(m),d.ELEMENT_ARRAY_BUFFER),z=l(d,[{buffer:P,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:P,type:d.FLOAT,size:3,offset:12,stride:24}],E),q=u(d);return q.attributes.position.location=0,q.attributes.normal.location=1,new c(d,P,z,q)}},6429:function(i,a,o){"use strict";i.exports=x;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),h=new Array(8),d=new Array(8),v=new Array(3),m=[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,S,g){for(var P=0;P<4;++P){C[P]=g[12+P];for(var E=0;E<3;++E)C[P]+=S[E]*g[4*E+P]}}var p=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function k(C){for(var S=0;S<p.length;++S)if(C=u.positive(C,p[S]),C.length<3)return 0;for(var g=C[0],P=g[0]/g[3],E=g[1]/g[3],z=0,S=1;S+1<C.length;++S){var q=C[S],U=C[S+1],G=q[0]/q[3],Z=q[1]/q[3],j=U[0]/U[3],N=U[1]/U[3],H=G-P,re=Z-E,oe=j-P,_e=N-E;z+=Math.abs(H*_e-re*oe)}return z}var M=[1,1,1],T=[0,0,0],L={cubeEdges:M,axis:T};function x(C,S,g,P,E){l(f,S,C),l(f,g,f);for(var z=0,q=0;q<2;++q){v[2]=P[q][2];for(var U=0;U<2;++U){v[1]=P[U][1];for(var G=0;G<2;++G)v[0]=P[G][0],b(h[z],v,f),z+=1}}for(var Z=-1,q=0;q<8;++q){for(var j=h[q][3],N=0;N<3;++N)d[q][N]=h[q][N]/j;E&&(d[q][2]*=-1),j<0&&(Z<0||d[q][2]<d[Z][2])&&(Z=q)}if(Z<0){Z=0;for(var H=0;H<3;++H){for(var re=(H+2)%3,oe=(H+1)%3,_e=-1,ke=-1,Ce=0;Ce<2;++Ce){var ge=Ce<<H,ie=ge+(Ce<<re)+(1-Ce<<oe),Se=ge+(1-Ce<<re)+(Ce<<oe);c(d[ge],d[ie],d[Se],m)<0||(Ce?_e=1:ke=1)}if(_e<0||ke<0){ke>_e&&(Z|=1<<H);continue}for(var Ce=0;Ce<2;++Ce){var ge=Ce<<H,ie=ge+(Ce<<re)+(1-Ce<<oe),Se=ge+(1-Ce<<re)+(Ce<<oe),Ee=k([h[ge],h[ie],h[Se],h[ge+(1<<re)+(1<<oe)]]);Ce?_e=Ee:ke=Ee}if(ke>_e){Z|=1<<H;continue}}}for(var we=7^Z,De=-1,q=0;q<8;++q)q===Z||q===we||(De<0||d[De][1]>d[q][1])&&(De=q);for(var Le=-1,q=0;q<3;++q){var me=De^1<<q;if(!(me===Z||me===we)){Le<0&&(Le=me);var oe=d[me];oe[0]<d[Le][0]&&(Le=me)}}for(var Pe=-1,q=0;q<3;++q){var me=De^1<<q;if(!(me===Z||me===we||me===Le)){Pe<0&&(Pe=me);var oe=d[me];oe[0]>d[Pe][0]&&(Pe=me)}}var ce=M;ce[0]=ce[1]=ce[2]=0,ce[s.log2(Le^De)]=De&Le,ce[s.log2(De^Pe)]=De&Pe;var He=Pe^7;He===Z||He===we?(He=Le^7,ce[s.log2(Pe^He)]=He&Pe):ce[s.log2(Le^He)]=He&Le;for(var lt=T,mt=Z,H=0;H<3;++H)mt&1<<H?lt[H]=-1:lt[H]=1;return L}},501:function(i,a,o){"use strict";i.exports=M;var s=o(2762),l=o(8116),u=o(1879).n,c=[0,0,0],f=[0,0,0],h=[0,0,0],d=[0,0,0],v=[1,1];function m(T){return T[0]=T[1]=T[2]=0,T}function b(T,L){return T[0]=L[0],T[1]=L[1],T[2]=L[2],T}function p(T,L,x,C,S,g,P,E){this.gl=T,this.vertBuffer=L,this.vao=x,this.shader=C,this.tickCount=S,this.tickOffset=g,this.gridCount=P,this.gridOffset=E}var k=p.prototype;k.bind=function(T,L,x){this.shader.bind(),this.shader.uniforms.model=T,this.shader.uniforms.view=L,this.shader.uniforms.projection=x,v[0]=this.gl.drawingBufferWidth,v[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=v,this.vao.bind()},k.unbind=function(){this.vao.unbind()},k.drawAxisLine=function(T,L,x,C,S){var g=m(f);this.shader.uniforms.majorAxis=f,g[T]=L[1][T]-L[0][T],this.shader.uniforms.minorAxis=g;var P=b(d,x);P[T]+=L[0][T],this.shader.uniforms.offset=P,this.shader.uniforms.lineWidth=S,this.shader.uniforms.color=C;var E=m(h);E[(T+2)%3]=1,this.shader.uniforms.screenAxis=E,this.vao.draw(this.gl.TRIANGLES,6);var E=m(h);E[(T+1)%3]=1,this.shader.uniforms.screenAxis=E,this.vao.draw(this.gl.TRIANGLES,6)},k.drawAxisTicks=function(T,L,x,C,S){if(this.tickCount[T]){var g=m(c);g[T]=1,this.shader.uniforms.majorAxis=g,this.shader.uniforms.offset=L,this.shader.uniforms.minorAxis=x,this.shader.uniforms.color=C,this.shader.uniforms.lineWidth=S;var P=m(h);P[T]=1,this.shader.uniforms.screenAxis=P,this.vao.draw(this.gl.TRIANGLES,this.tickCount[T],this.tickOffset[T])}},k.drawGrid=function(T,L,x,C,S,g){if(this.gridCount[T]){var P=m(f);P[L]=x[1][L]-x[0][L],this.shader.uniforms.minorAxis=P;var E=b(d,C);E[L]+=x[0][L],this.shader.uniforms.offset=E;var z=m(c);z[T]=1,this.shader.uniforms.majorAxis=z;var q=m(h);q[T]=1,this.shader.uniforms.screenAxis=q,this.shader.uniforms.lineWidth=g,this.shader.uniforms.color=S,this.vao.draw(this.gl.TRIANGLES,this.gridCount[T],this.gridOffset[T])}},k.drawZero=function(T,L,x,C,S,g){var P=m(f);this.shader.uniforms.majorAxis=P,P[T]=x[1][T]-x[0][T],this.shader.uniforms.minorAxis=P;var E=b(d,C);E[T]+=x[0][T],this.shader.uniforms.offset=E;var z=m(h);z[L]=1,this.shader.uniforms.screenAxis=z,this.shader.uniforms.lineWidth=g,this.shader.uniforms.color=S,this.vao.draw(this.gl.TRIANGLES,6)},k.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function M(T,L,x){var C=[],S=[0,0,0],g=[0,0,0],P=[0,0,0],E=[0,0,0];C.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var z=0;z<3;++z){for(var G=C.length/3|0,q=0;q<x[z].length;++q){var U=+x[z][q].x;C.push(U,0,1,U,1,1,U,0,-1,U,0,-1,U,1,1,U,1,-1)}var j=C.length/3|0;S[z]=G,g[z]=j-G;for(var G=C.length/3|0,Z=0;Z<x[z].length;++Z){var U=+x[z][Z].x;C.push(U,0,1,U,1,1,U,0,-1,U,0,-1,U,1,1,U,1,-1)}var j=C.length/3|0;P[z]=G,E[z]=j-G}var N=s(T,new Float32Array(C)),H=l(T,[{buffer:N,type:T.FLOAT,size:3,stride:0,offset:0}]),re=u(T);return re.attributes.position.location=0,new p(T,N,H,re,g,S,E,P)}},1879:function(i,a,o){"use strict";var s=o(3236),l=o(9405),u=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);
|
||
}
|
||
`]),c=s([`precision highp float;
|
||
#define GLSLIFY 1
|
||
|
||
uniform vec4 color;
|
||
void main() {
|
||
gl_FragColor = color;
|
||
}`]);a.n=function(m){return l(m,u,c,null,[{name:"position",type:"vec3"}])};var f=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(m){return l(m,f,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);
|
||
}
|
||
`]),v=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(m){return l(m,d,v,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(i,a,o){"use strict";i.exports=k;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},h=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var d=3;function v(M,T,L,x){this.gl=M,this.shader=T,this.buffer=L,this.vao=x,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var m=v.prototype,b=[0,0];m.bind=function(M,T,L,x){this.vao.bind(),this.shader.bind();var C=this.shader.uniforms;C.model=M,C.view=T,C.projection=L,C.pixelScale=x,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},m.unbind=function(){this.vao.unbind()},m.update=function(M,T,L,x,C){var S=[];function g(H,re,oe,_e,ke,Ce){var ge=[oe.style,oe.weight,oe.variant,oe.family].join("_"),ie=h[ge];ie||(ie=h[ge]={});var Se=ie[re];Se||(Se=ie[re]=p(re,{triangles:!0,font:oe.family,fontStyle:oe.style,fontWeight:oe.weight,fontVariant:oe.variant,textAlign:"center",textBaseline:"middle",lineSpacing:ke,styletags:Ce}));for(var Ee=(_e||12)/12,we=Se.positions,De=Se.cells,Le=0,me=De.length;Le<me;++Le)for(var Pe=De[Le],ce=2;ce>=0;--ce){var He=we[Pe[ce]];S.push(Ee*He[0],-Ee*He[1],H)}}for(var P=[0,0,0],E=[0,0,0],z=[0,0,0],q=[0,0,0],U=1.25,G={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},Z=0;Z<3;++Z){z[Z]=S.length/d|0,g(.5*(M[0][Z]+M[1][Z]),T[Z],L[Z],12,U,G),q[Z]=(S.length/d|0)-z[Z],P[Z]=S.length/d|0;for(var j=0;j<x[Z].length;++j)if(x[Z][j].text){var N={family:x[Z][j].font||C[Z].family,style:C[Z].fontStyle||C[Z].style,weight:C[Z].fontWeight||C[Z].weight,variant:C[Z].fontVariant||C[Z].variant};g(x[Z][j].x,x[Z][j].text,N,x[Z][j].fontSize||12,U,G)}E[Z]=(S.length/d|0)-P[Z]}this.buffer.update(S),this.tickOffset=P,this.tickCount=E,this.labelOffset=z,this.labelCount=q},m.drawTicks=function(M,T,L,x,C,S,g,P){this.tickCount[M]&&(this.shader.uniforms.axis=S,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=T,this.shader.uniforms.offset=x,this.shader.uniforms.alignDir=g,this.shader.uniforms.alignOpt=P,this.vao.draw(this.gl.TRIANGLES,this.tickCount[M],this.tickOffset[M]))},m.drawLabel=function(M,T,L,x,C,S,g,P){this.labelCount[M]&&(this.shader.uniforms.axis=S,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=T,this.shader.uniforms.offset=x,this.shader.uniforms.alignDir=g,this.shader.uniforms.alignOpt=P,this.vao.draw(this.gl.TRIANGLES,this.labelCount[M],this.labelOffset[M]))},m.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function p(M,T){try{return u(M,T)}catch(L){return console.warn('error vectorizing text:"'+M+'" error:',L),{cells:[],positions:[]}}}function k(M,T,L,x,C,S){var g=s(M),P=l(M,[{buffer:g,size:3}]),E=c(M);E.attributes.position.location=0;var z=new v(M,E,g,P);return z.update(T,L,x,C,S),z}},6444:function(i,a){"use strict";a.create=s,a.equal=l;function o(u,c){var f=u+"",h=f.indexOf("."),d=0;h>=0&&(d=f.length-h-1);var v=Math.pow(10,d),m=Math.round(u*c*v),b=m+"";if(b.indexOf("e")>=0)return b;var p=m/v,k=m%v;m<0?(p=-Math.ceil(p)|0,k=-k|0):(p=Math.floor(p)|0,k=k|0);var M=""+p;if(m<0&&(M="-"+M),d){for(var T=""+k;T.length<d;)T="0"+T;return M+"."+T}else return M}function s(u,c){for(var f=[],h=0;h<3;++h){for(var d=[],v=.5*(u[0][h]+u[1][h]),m=0;m*c[h]<=u[1][h];++m)d.push({x:m*c[h],text:o(c[h],m)});for(var m=-1;m*c[h]>=u[0][h];--m)d.push({x:m*c[h],text:o(c[h],m)});f.push(d)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var h=0;h<u[f].length;++h){var d=u[f][h],v=c[f][h];if(d.x!==v.x||d.text!==v.text||d.font!==v.font||d.fontColor!==v.fontColor||d.fontSize!==v.fontSize||d.dx!==v.dx||d.dy!==v.dy)return!1}}return!0}},5445:function(i,a,o){"use strict";i.exports=L;var s=o(5033),l=o(5202),u=o(6429),c=o(6760),f=o(5665),h=o(5352),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),v=new Float32Array(16);function m(x,C,S){this.lo=x,this.hi=C,this.pixelsPerDataUnit=S}var b=[0,0,0,1],p=[0,0,0,1];function k(x,C,S,g,P){for(var E=0;E<3;++E){for(var z=b,q=p,U=0;U<3;++U)q[U]=z[U]=S[U];q[3]=z[3]=1,q[E]+=1,h(q,q,C),q[3]<0&&(x[E]=1/0),z[E]-=1,h(z,z,C),z[3]<0&&(x[E]=1/0);var G=(z[0]/z[3]-q[0]/q[3])*g,Z=(z[1]/z[3]-q[1]/q[3])*P;x[E]=.25*Math.sqrt(G*G+Z*Z)}return x}var M=[new m(1/0,-1/0,1/0),new m(1/0,-1/0,1/0),new m(1/0,-1/0,1/0)],T=[0,0,0];function L(x,C,S,g,Z){var E=C.model||d,z=C.view||d,q=C.projection||d,U=C._ortho||!1,G=x.bounds,Z=Z||u(E,z,q,G,U),j=Z.axis;c(v,z,E),c(v,q,v);for(var N=M,H=0;H<3;++H)N[H].lo=1/0,N[H].hi=-1/0,N[H].pixelsPerDataUnit=1/0;var re=s(f(v,v));f(v,v);for(var oe=0;oe<3;++oe){var _e=(oe+1)%3,ke=(oe+2)%3,Ce=T;e:for(var H=0;H<2;++H){var ge=[];if(j[oe]<0!=!!H){Ce[oe]=G[H][oe];for(var ie=0;ie<2;++ie){Ce[_e]=G[ie^H][_e];for(var Se=0;Se<2;++Se)Ce[ke]=G[Se^ie^H][ke],ge.push(Ce.slice())}for(var Ee=U?5:4,ie=Ee;ie===Ee;++ie){if(ge.length===0)continue e;ge=l.positive(ge,re[ie])}for(var ie=0;ie<ge.length;++ie)for(var ke=ge[ie],we=k(T,v,ke,S,g),Se=0;Se<3;++Se)N[Se].lo=Math.min(N[Se].lo,ke[Se]),N[Se].hi=Math.max(N[Se].hi,ke[Se]),Se!==oe&&(N[Se].pixelsPerDataUnit=Math.min(N[Se].pixelsPerDataUnit,Math.abs(we[Se])))}}}return N}},2762:function(i,a,o){"use strict";var s=o(1888),l=o(5298),u=o(9618),c=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function f(p,k,M,T,L){this.gl=p,this.type=k,this.handle=M,this.length=T,this.usage=L}var h=f.prototype;h.bind=function(){this.gl.bindBuffer(this.type,this.handle)},h.unbind=function(){this.gl.bindBuffer(this.type,null)},h.dispose=function(){this.gl.deleteBuffer(this.handle)};function d(p,k,M,T,L,x){var C=L.length*L.BYTES_PER_ELEMENT;if(x<0)return p.bufferData(k,L,T),C;if(C+x>M)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return p.bufferSubData(k,x,L),M}function v(p,k){for(var M=s.malloc(p.length,k),T=p.length,L=0;L<T;++L)M[L]=p[L];return M}function m(p,k){for(var M=1,T=k.length-1;T>=0;--T){if(k[T]!==M)return!1;M*=p[T]}return!0}h.update=function(p,k){if(typeof k!="number"&&(k=-1),this.bind(),typeof p=="object"&&typeof p.shape!="undefined"){var M=p.dtype;if(c.indexOf(M)<0&&(M="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var T=gl.getExtension("OES_element_index_uint");T&&M!=="uint16"?M="uint32":M="uint16"}if(M===p.dtype&&m(p.shape,p.stride))p.offset===0&&p.data.length===p.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,p.data,k):this.length=d(this.gl,this.type,this.length,this.usage,p.data.subarray(p.offset,p.shape[0]),k);else{var L=s.malloc(p.size,M),x=u(L,p.shape);l.assign(x,p),k<0?this.length=d(this.gl,this.type,this.length,this.usage,L,k):this.length=d(this.gl,this.type,this.length,this.usage,L.subarray(0,p.size),k),s.free(L)}}else if(Array.isArray(p)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=v(p,"uint16"):C=v(p,"float32"),k<0?this.length=d(this.gl,this.type,this.length,this.usage,C,k):this.length=d(this.gl,this.type,this.length,this.usage,C.subarray(0,p.length),k),s.free(C)}else if(typeof p=="object"&&typeof p.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,p,k);else if(typeof p=="number"||p===void 0){if(k>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");p=p|0,p<=0&&(p=1),this.gl.bufferData(this.type,p|0,this.usage),this.length=p}else throw new Error("gl-buffer: Invalid data type")};function b(p,k,M,T){if(M=M||p.ARRAY_BUFFER,T=T||p.DYNAMIC_DRAW,M!==p.ARRAY_BUFFER&&M!==p.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(T!==p.DYNAMIC_DRAW&&T!==p.STATIC_DRAW&&T!==p.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var L=p.createBuffer(),x=new f(p,M,L,0,T);return x.update(k),x}i.exports=b},6405:function(i,a,o){"use strict";var s=o(2931);i.exports=function(u,c){var f=u.positions,h=u.vectors,d={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),d;for(var v=0,m=1/0,b=-1/0,p=1/0,k=-1/0,M=1/0,T=-1/0,L=null,x=null,C=[],S=1/0,g=!1,P=u.coneSizemode==="raw",E=0;E<f.length;E++){var z=f[E];m=Math.min(z[0],m),b=Math.max(z[0],b),p=Math.min(z[1],p),k=Math.max(z[1],k),M=Math.min(z[2],M),T=Math.max(z[2],T);var q=h[E];if(s.length(q)>v&&(v=s.length(q)),E&&!P){var U=2*s.distance(L,z)/(s.length(x)+s.length(q));U?(S=Math.min(S,U),g=!1):g=!0}g||(L=z,x=q),C.push(q)}var G=[m,p,M],Z=[b,k,T];c&&(c[0]=G,c[1]=Z),v===0&&(v=1);var j=1/v;isFinite(S)||(S=1),d.vectorScale=S;var N=u.coneSize||(P?1:.5);u.absoluteConeSize&&(N=u.absoluteConeSize*j),d.coneScale=N;for(var E=0,H=0;E<f.length;E++)for(var z=f[E],re=z[0],oe=z[1],_e=z[2],ke=C[E],Ce=s.length(ke)*j,ge=0,ie=8;ge<ie;ge++){d.positions.push([re,oe,_e,H++]),d.positions.push([re,oe,_e,H++]),d.positions.push([re,oe,_e,H++]),d.positions.push([re,oe,_e,H++]),d.positions.push([re,oe,_e,H++]),d.positions.push([re,oe,_e,H++]),d.vectors.push(ke),d.vectors.push(ke),d.vectors.push(ke),d.vectors.push(ke),d.vectors.push(ke),d.vectors.push(ke),d.vertexIntensity.push(Ce,Ce,Ce),d.vertexIntensity.push(Ce,Ce,Ce);var Se=d.positions.length;d.cells.push([Se-6,Se-5,Se-4],[Se-3,Se-2,Se-1])}return d};var l=o(614);i.exports.createMesh=o(9060),i.exports.createConeMesh=function(u,c){return i.exports.createMesh(u,c,{shaders:l,traceType:"cone"})}},9060:function(i,a,o){"use strict";var s=o(9405),l=o(2762),u=o(8116),c=o(7766),f=o(6760),h=o(7608),d=o(9618),v=o(6729),m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function b(C,S,g,P,E,z,q,U,G,Z,j){this.gl=C,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=S,this.dirty=!0,this.triShader=g,this.pickShader=P,this.trianglePositions=E,this.triangleVectors=z,this.triangleColors=U,this.triangleUVs=G,this.triangleIds=q,this.triangleVAO=Z,this.triangleCount=0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.traceType=j,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=m,this._view=m,this._projection=m,this._resolution=[1,1]}var p=b.prototype;p.isOpaque=function(){return this.opacity>=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(C){this.pickId=C};function k(C){for(var S=v({colormap:C,nshades:256,format:"rgba"}),g=new Uint8Array(256*4),P=0;P<256;++P){for(var E=S[P],z=0;z<3;++z)g[4*P+z]=E[z];g[4*P+3]=E[3]*255}return d(g,[256,256,4],[4,0,1])}function M(C){for(var S=C.length,g=new Array(S),P=0;P<S;++P)g[P]=C[P][2];return g}p.update=function(C){C=C||{};var S=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=S.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=S.LINEAR,this.texture.setPixels(k(C.colormap)),this.texture.generateMipmap());var g=C.cells,P=C.positions,E=C.vectors;if(!(!P||!g||!E)){var z=[],q=[],U=[],G=[],Z=[];this.cells=g,this.positions=P,this.vectors=E;var j=C.meshColor||[1,1,1,1],N=C.vertexIntensity,H=1/0,re=-1/0;if(N)if(C.vertexIntensityBounds)H=+C.vertexIntensityBounds[0],re=+C.vertexIntensityBounds[1];else for(var oe=0;oe<N.length;++oe){var _e=N[oe];H=Math.min(H,_e),re=Math.max(re,_e)}else for(var oe=0;oe<P.length;++oe){var _e=P[oe][2];H=Math.min(H,_e),re=Math.max(re,_e)}N?this.intensity=N:this.intensity=M(P),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var oe=0;oe<P.length;++oe)for(var ke=P[oe],Ce=0;Ce<3;++Ce)isNaN(ke[Ce])||!isFinite(ke[Ce])||(this.bounds[0][Ce]=Math.min(this.bounds[0][Ce],ke[Ce]),this.bounds[1][Ce]=Math.max(this.bounds[1][Ce],ke[Ce]));var ge=0;e:for(var oe=0;oe<g.length;++oe){var ie=g[oe];switch(ie.length){case 3:for(var Ce=0;Ce<3;++Ce)for(var Se=ie[Ce],ke=P[Se],Ee=0;Ee<3;++Ee)if(isNaN(ke[Ee])||!isFinite(ke[Ee]))continue e;for(var Ce=0;Ce<3;++Ce){var Se=ie[2-Ce],ke=P[Se];z.push(ke[0],ke[1],ke[2],ke[3]);var we=E[Se];q.push(we[0],we[1],we[2],we[3]||0);var De=j;De.length===3?U.push(De[0],De[1],De[2],1):U.push(De[0],De[1],De[2],De[3]);var Le;N?Le=[(N[Se]-H)/(re-H),0]:Le=[(ke[2]-H)/(re-H),0],G.push(Le[0],Le[1]),Z.push(oe)}ge+=1;break;default:break}}this.triangleCount=ge,this.trianglePositions.update(z),this.triangleVectors.update(q),this.triangleColors.update(U),this.triangleUVs.update(G),this.triangleIds.update(new Uint32Array(Z))}},p.drawTransparent=p.draw=function(C){C=C||{};for(var S=this.gl,g=C.model||m,P=C.view||m,E=C.projection||m,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)z[0][q]=Math.max(z[0][q],this.clipBounds[0][q]),z[1][q]=Math.min(z[1][q],this.clipBounds[1][q]);var U={model:g,view:P,projection:E,inverseModel:m.slice(),clipBounds:z,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};U.inverseModel=h(U.inverseModel,U.model),S.disable(S.CULL_FACE),this.texture.bind(0);var G=new Array(16);f(G,U.view,U.model),f(G,U.projection,G),h(G,G);for(var q=0;q<3;++q)U.eyePosition[q]=G[12+q]/G[15];for(var Z=G[15],q=0;q<3;++q)Z+=this.lightPosition[q]*G[4*q+3];for(var q=0;q<3;++q){for(var j=G[12+q],N=0;N<3;++N)j+=G[4*N+q]*this.lightPosition[N];U.lightPosition[q]=j/Z}if(this.triangleCount>0){var H=this.triShader;H.bind(),H.uniforms=U,this.triangleVAO.bind(),S.drawArrays(S.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},p.drawPick=function(C){C=C||{};for(var S=this.gl,g=C.model||m,P=C.view||m,E=C.projection||m,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)z[0][q]=Math.max(z[0][q],this.clipBounds[0][q]),z[1][q]=Math.min(z[1][q],this.clipBounds[1][q]);this._model=[].slice.call(g),this._view=[].slice.call(P),this._projection=[].slice.call(E),this._resolution=[S.drawingBufferWidth,S.drawingBufferHeight];var U={model:g,view:P,projection:E,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},G=this.pickShader;G.bind(),G.uniforms=U,this.triangleCount>0&&(this.triangleVAO.bind(),S.drawArrays(S.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},p.pick=function(C){if(!C||C.id!==this.pickId)return null;var S=C.value[0]+256*C.value[1]+65536*C.value[2],g=this.cells[S],P=this.positions[g[1]].slice(0,3),E={position:P,dataCoordinate:P,index:Math.floor(g[1]/48)};return this.traceType==="cone"?E.index=Math.floor(g[1]/48):this.traceType==="streamtube"&&(E.intensity=this.intensity[g[1]],E.velocity=this.vectors[g[1]].slice(0,3),E.divergence=this.vectors[g[1]][3],E.index=S),E},p.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function T(C,S){var g=s(C,S.meshShader.vertex,S.meshShader.fragment,null,S.meshShader.attributes);return g.attributes.position.location=0,g.attributes.color.location=2,g.attributes.uv.location=3,g.attributes.vector.location=4,g}function L(C,S){var g=s(C,S.pickShader.vertex,S.pickShader.fragment,null,S.pickShader.attributes);return g.attributes.position.location=0,g.attributes.id.location=1,g.attributes.vector.location=4,g}function x(C,S,g){var P=g.shaders;arguments.length===1&&(S=C,C=S.gl);var E=T(C,P),z=L(C,P),q=c(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=l(C),G=l(C),Z=l(C),j=l(C),N=l(C),H=u(C,[{buffer:U,type:C.FLOAT,size:4},{buffer:N,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Z,type:C.FLOAT,size:4},{buffer:j,type:C.FLOAT,size:2},{buffer:G,type:C.FLOAT,size:4}]),re=new b(C,q,E,z,U,G,N,Z,j,H,g.traceType||"cone");return re.update(S),re}i.exports=x},614:function(i,a,o){var s=o(3236),l=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;
|
||
}
|
||
`]),u=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;
|
||
}
|
||
`]),c=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;
|
||
}
|
||
`]),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 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:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},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(u){return s[u]}},9165:function(i,a,o){"use strict";i.exports=b;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,k,M,T){this.gl=p,this.shader=T,this.buffer=k,this.vao=M,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(p){var k=this.gl,M=this.shader.uniforms;this.shader.bind();var T=M.view=p.view||c,L=M.projection=p.projection||c;M.model=p.model||c,M.clipBounds=this.clipBounds,M.opacity=this.opacity;var x=T[12],C=T[13],S=T[14],g=T[15],P=p._ortho||!1,E=P?2:1,z=E*this.pixelRatio*(L[3]*x+L[7]*C+L[11]*S+L[15]*g)/k.drawingBufferHeight;this.vao.bind();for(var q=0;q<3;++q)k.lineWidth(this.lineWidth[q]*this.pixelRatio),M.capSize=this.capSize[q]*z,this.lineCount[q]&&k.drawArrays(k.LINES,this.lineOffset[q],this.lineCount[q]);this.vao.unbind()};function d(p,k){for(var M=0;M<3;++M)p[0][M]=Math.min(p[0][M],k[M]),p[1][M]=Math.max(p[1][M],k[M])}var v=function(){for(var p=new Array(3),k=0;k<3;++k){for(var M=[],T=1;T<=2;++T)for(var L=-1;L<=1;L+=2){var x=(T+k)%3,C=[0,0,0];C[x]=L,M.push(C)}p[k]=M}return p}();function m(p,k,M,T){for(var L=v[T],x=0;x<L.length;++x){var C=L[x];p.push(k[0],k[1],k[2],M[0],M[1],M[2],M[3],C[0],C[1],C[2])}return L.length}h.update=function(p){p=p||{},"lineWidth"in p&&(this.lineWidth=p.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in p&&(this.capSize=p.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in p&&(this.opacity=+p.opacity,this.opacity<1&&(this.hasAlpha=!0));var k=p.color||[[0,0,0],[0,0,0],[0,0,0]],M=p.position,T=p.error;if(Array.isArray(k[0])||(k=[k,k,k]),M&&T){var L=[],x=M.length,C=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var S=0;S<3;++S){this.lineOffset[S]=C;e:for(var g=0;g<x;++g){for(var P=M[g],E=0;E<3;++E)if(isNaN(P[E])||!isFinite(P[E]))continue e;var z=T[g],q=k[S];if(Array.isArray(q[0])&&(q=k[g]),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(z[0][S])||isNaN(z[1][S]))){if(z[0][S]<0){var U=P.slice();U[S]+=z[0][S],L.push(P[0],P[1],P[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+m(L,U,q,S)}if(z[1][S]>0){var U=P.slice();U[S]+=z[1][S],L.push(P[0],P[1],P[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+m(L,U,q,S)}}}this.lineCount[S]=C-this.lineOffset[S]}this.buffer.update(L)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function b(p){var k=p.gl,M=s(k),T=l(k,[{buffer:M,type:k.FLOAT,size:3,offset:0,stride:40},{buffer:M,type:k.FLOAT,size:4,offset:12,stride:40},{buffer:M,type:k.FLOAT,size:3,offset:28,stride:40}]),L=u(k);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var x=new f(k,M,T,L);return x.update(p),x}},3436:function(i,a,o){"use strict";var s=o(3236),l=o(9405),u=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;
|
||
}`]),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 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(f){return l(f,u,c,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 l=null,u,c,f,h;function d(S){var g=S.getParameter(S.FRAMEBUFFER_BINDING),P=S.getParameter(S.RENDERBUFFER_BINDING),E=S.getParameter(S.TEXTURE_BINDING_2D);return[g,P,E]}function v(S,g){S.bindFramebuffer(S.FRAMEBUFFER,g[0]),S.bindRenderbuffer(S.RENDERBUFFER,g[1]),S.bindTexture(S.TEXTURE_2D,g[2])}function m(S,g){var P=S.getParameter(g.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(P+1);for(var E=0;E<=P;++E){for(var z=new Array(P),q=0;q<E;++q)z[q]=S.COLOR_ATTACHMENT0+q;for(var q=E;q<P;++q)z[q]=S.NONE;l[E]=z}}function b(S){switch(S){case u:throw new Error("gl-fbo: Framebuffer unsupported");case c:throw new Error("gl-fbo: Framebuffer incomplete attachment");case f:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case h:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function p(S,g,P,E,z,q){if(!E)return null;var U=s(S,g,P,z,E);return U.magFilter=S.NEAREST,U.minFilter=S.NEAREST,U.mipSamples=1,U.bind(),S.framebufferTexture2D(S.FRAMEBUFFER,q,S.TEXTURE_2D,U.handle,0),U}function k(S,g,P,E,z){var q=S.createRenderbuffer();return S.bindRenderbuffer(S.RENDERBUFFER,q),S.renderbufferStorage(S.RENDERBUFFER,E,g,P),S.framebufferRenderbuffer(S.FRAMEBUFFER,z,S.RENDERBUFFER,q),q}function M(S){var g=d(S.gl),P=S.gl,E=S.handle=P.createFramebuffer(),z=S._shape[0],q=S._shape[1],U=S.color.length,G=S._ext,Z=S._useStencil,j=S._useDepth,N=S._colorType;P.bindFramebuffer(P.FRAMEBUFFER,E);for(var H=0;H<U;++H)S.color[H]=p(P,z,q,N,P.RGBA,P.COLOR_ATTACHMENT0+H);U===0?(S._color_rb=k(P,z,q,P.RGBA4,P.COLOR_ATTACHMENT0),G&&G.drawBuffersWEBGL(l[0])):U>1&&G.drawBuffersWEBGL(l[U]);var re=P.getExtension("WEBGL_depth_texture");re?Z?S.depth=p(P,z,q,re.UNSIGNED_INT_24_8_WEBGL,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j&&(S.depth=p(P,z,q,P.UNSIGNED_SHORT,P.DEPTH_COMPONENT,P.DEPTH_ATTACHMENT)):j&&Z?S._depth_rb=k(P,z,q,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j?S._depth_rb=k(P,z,q,P.DEPTH_COMPONENT16,P.DEPTH_ATTACHMENT):Z&&(S._depth_rb=k(P,z,q,P.STENCIL_INDEX,P.STENCIL_ATTACHMENT));var oe=P.checkFramebufferStatus(P.FRAMEBUFFER);if(oe!==P.FRAMEBUFFER_COMPLETE){S._destroyed=!0,P.bindFramebuffer(P.FRAMEBUFFER,null),P.deleteFramebuffer(S.handle),S.handle=null,S.depth&&(S.depth.dispose(),S.depth=null),S._depth_rb&&(P.deleteRenderbuffer(S._depth_rb),S._depth_rb=null);for(var H=0;H<S.color.length;++H)S.color[H].dispose(),S.color[H]=null;S._color_rb&&(P.deleteRenderbuffer(S._color_rb),S._color_rb=null),v(P,g),b(oe)}v(P,g)}function T(S,g,P,E,z,q,U,G){this.gl=S,this._shape=[g|0,P|0],this._destroyed=!1,this._ext=G,this.color=new Array(z);for(var Z=0;Z<z;++Z)this.color[Z]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=E,this._useDepth=q,this._useStencil=U;var j=this,N=[g|0,P|0];Object.defineProperties(N,{0:{get:function(){return j._shape[0]},set:function(H){return j.width=H}},1:{get:function(){return j._shape[1]},set:function(H){return j.height=H}}}),this._shapeVector=N,M(this)}var L=T.prototype;function x(S,g,P){if(S._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(S._shape[0]===g&&S._shape[1]===P)){var E=S.gl,z=E.getParameter(E.MAX_RENDERBUFFER_SIZE);if(g<0||g>z||P<0||P>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");S._shape[0]=g,S._shape[1]=P;for(var q=d(E),U=0;U<S.color.length;++U)S.color[U].shape=S._shape;S._color_rb&&(E.bindRenderbuffer(E.RENDERBUFFER,S._color_rb),E.renderbufferStorage(E.RENDERBUFFER,E.RGBA4,S._shape[0],S._shape[1])),S.depth&&(S.depth.shape=S._shape),S._depth_rb&&(E.bindRenderbuffer(E.RENDERBUFFER,S._depth_rb),S._useDepth&&S._useStencil?E.renderbufferStorage(E.RENDERBUFFER,E.DEPTH_STENCIL,S._shape[0],S._shape[1]):S._useDepth?E.renderbufferStorage(E.RENDERBUFFER,E.DEPTH_COMPONENT16,S._shape[0],S._shape[1]):S._useStencil&&E.renderbufferStorage(E.RENDERBUFFER,E.STENCIL_INDEX,S._shape[0],S._shape[1])),E.bindFramebuffer(E.FRAMEBUFFER,S.handle);var G=E.checkFramebufferStatus(E.FRAMEBUFFER);G!==E.FRAMEBUFFER_COMPLETE&&(S.dispose(),v(E,q),b(G)),v(E,q)}}Object.defineProperties(L,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(S){if(Array.isArray(S)||(S=[S|0,S|0]),S.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var g=S[0]|0,P=S[1]|0;return x(this,g,P),[g,P]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(S){return S=S|0,x(this,S,this._shape[1]),S},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(S){return S=S|0,x(this,this._shape[0],S),S},enumerable:!1}}),L.bind=function(){if(!this._destroyed){var S=this.gl;S.bindFramebuffer(S.FRAMEBUFFER,this.handle),S.viewport(0,0,this._shape[0],this._shape[1])}},L.dispose=function(){if(!this._destroyed){this._destroyed=!0;var S=this.gl;S.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(S.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var g=0;g<this.color.length;++g)this.color[g].dispose(),this.color[g]=null;this._color_rb&&(S.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function C(S,g,P,E){u||(u=S.FRAMEBUFFER_UNSUPPORTED,c=S.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,f=S.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,h=S.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var z=S.getExtension("WEBGL_draw_buffers");if(!l&&z&&m(S,z),Array.isArray(g)&&(E=P,P=g[1]|0,g=g[0]|0),typeof g!="number")throw new Error("gl-fbo: Missing shape parameter");var q=S.getParameter(S.MAX_RENDERBUFFER_SIZE);if(g<0||g>q||P<0||P>q)throw new Error("gl-fbo: Parameters are too large for FBO");E=E||{};var U=1;if("color"in E){if(U=Math.max(E.color|0,0),U<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(U>1)if(z){if(U>S.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+U+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var G=S.UNSIGNED_BYTE,Z=S.getExtension("OES_texture_float");if(E.float&&U>0){if(!Z)throw new Error("gl-fbo: Context does not support floating point textures");G=S.FLOAT}else E.preferFloat&&U>0&&Z&&(G=S.FLOAT);var j=!0;"depth"in E&&(j=!!E.depth);var N=!1;return"stencil"in E&&(N=!!E.stencil),new T(S,g,P,G,U,j,N,z)}},2992:function(i,a,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);i.exports=f;function f(h,d,v){"use strict";var m=u(d)||"of unknown name (see npm glsl-shader-name)",b="unknown type";v!==void 0&&(b=v===l.FRAGMENT_SHADER?"fragment":"vertex");for(var p=s(`Error compiling %s shader %s:
|
||
`,b,m),k=s("%s%s",p,h),M=h.split(`
|
||
`),T={},L=0;L<M.length;L++){var x=M[L];if(!(x===""||x==="\0")){var C=parseInt(x.split(":")[2]);if(isNaN(C))throw new Error(s("Could not parse error: %s",x));T[C]=x}}for(var S=c(d).split(`
|
||
`),L=0;L<S.length;L++)if(!(!T[L+3]&&!T[L+2]&&!T[L+1])){var g=S[L];if(p+=g+`
|
||
`,T[L+1]){var P=T[L+1];P=P.substr(P.split(":",3).join(":").length+1).trim(),p+=s(`^^^ %s
|
||
|
||
`,P)}}return{long:p.trim(),short:k.trim()}}},7319:function(i,a,o){var s=o(3236),l=o(9405),u=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;
|
||
}
|
||
`]),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 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;
|
||
}
|
||
`]),f=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 l(d,u,c,null,h)},a.createPickShader=function(d){return l(d,u,f,null,h)}},5714:function(i,a,o){"use strict";i.exports=S;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function h(g,P,E,z){return c[0]=z,c[1]=E,c[2]=P,c[3]=g,f[0]}var d=o(2478),v=o(9618),m=o(7319),b=m.createShader,p=m.createPickShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function M(g,P){for(var E=0,z=0;z<3;++z){var q=g[z]-P[z];E+=q*q}return Math.sqrt(E)}function T(g){for(var P=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)P[0][E]=Math.max(g[0][E],P[0][E]),P[1][E]=Math.min(g[1][E],P[1][E]);return P}function L(g,P,E,z){this.arcLength=g,this.position=P,this.index=E,this.dataCoordinate=z}function x(g,P,E,z,q,U){this.gl=g,this.shader=P,this.pickShader=E,this.buffer=z,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=x.prototype;C.isTransparent=function(){return this.hasAlpha},C.isOpaque=function(){return!this.hasAlpha},C.pickSlots=1,C.setPickBase=function(g){this.pickId=g},C.drawTransparent=C.draw=function(g){if(this.vertexCount){var P=this.gl,E=this.shader,z=this.vao;E.bind(),E.uniforms={model:g.model||k,view:g.view||k,projection:g.projection||k,clipBounds:T(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(P.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},C.drawPick=function(g){if(this.vertexCount){var P=this.gl,E=this.pickShader,z=this.vao;E.bind(),E.uniforms={model:g.model||k,view:g.view||k,projection:g.projection||k,pickId:this.pickId,clipBounds:T(this.clipBounds),screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(P.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},C.update=function(g){var P,E;this.dirty=!0;var z=!!g.connectGaps;"dashScale"in g&&(this.dashScale=g.dashScale),this.hasAlpha=!1,"opacity"in g&&(this.opacity=+g.opacity,this.opacity<1&&(this.hasAlpha=!0));var q=[],U=[],G=[],Z=0,j=0,N=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],H=g.position||g.positions;if(H){var re=g.color||g.colors||[0,0,0,1],oe=g.lineWidth||1,_e=!1;e:for(P=1;P<H.length;++P){var ke=H[P-1],Ce=H[P];for(U.push(Z),G.push(ke.slice()),E=0;E<3;++E){if(isNaN(ke[E])||isNaN(Ce[E])||!isFinite(ke[E])||!isFinite(Ce[E])){if(!z&&q.length>0){for(var ge=0;ge<24;++ge)q.push(q[q.length-12]);j+=2,_e=!0}continue e}N[0][E]=Math.min(N[0][E],ke[E],Ce[E]),N[1][E]=Math.max(N[1][E],ke[E],Ce[E])}var ie,Se;Array.isArray(re[0])?(ie=re.length>P-1?re[P-1]:re.length>0?re[re.length-1]:[0,0,0,1],Se=re.length>P?re[P]:re.length>0?re[re.length-1]:[0,0,0,1]):ie=Se=re,ie.length===3&&(ie=[ie[0],ie[1],ie[2],1]),Se.length===3&&(Se=[Se[0],Se[1],Se[2],1]),!this.hasAlpha&&ie[3]<1&&(this.hasAlpha=!0);var Ee;Array.isArray(oe)?Ee=oe.length>P-1?oe[P-1]:oe.length>0?oe[oe.length-1]:[0,0,0,1]:Ee=oe;var we=Z;if(Z+=M(ke,Ce),_e){for(E=0;E<2;++E)q.push(ke[0],ke[1],ke[2],Ce[0],Ce[1],Ce[2],we,Ee,ie[0],ie[1],ie[2],ie[3]);j+=2,_e=!1}q.push(ke[0],ke[1],ke[2],Ce[0],Ce[1],Ce[2],we,Ee,ie[0],ie[1],ie[2],ie[3],ke[0],ke[1],ke[2],Ce[0],Ce[1],Ce[2],we,-Ee,ie[0],ie[1],ie[2],ie[3],Ce[0],Ce[1],Ce[2],ke[0],ke[1],ke[2],Z,-Ee,Se[0],Se[1],Se[2],Se[3],Ce[0],Ce[1],Ce[2],ke[0],ke[1],ke[2],Z,Ee,Se[0],Se[1],Se[2],Se[3]),j+=4}}if(this.buffer.update(q),U.push(Z),G.push(H[H.length-1].slice()),this.bounds=N,this.vertexCount=j,this.points=G,this.arcLength=U,"dashes"in g){var De=g.dashes,Le=De.slice();for(Le.unshift(0),P=1;P<Le.length;++P)Le[P]=Le[P-1]+Le[P];var me=v(new Array(256*4),[256,1,4]);for(P=0;P<256;++P){for(E=0;E<4;++E)me.set(P,0,E,0);d.le(Le,Le[Le.length-1]*P/255)&1?me.set(P,0,0,0):me.set(P,0,0,255)}this.texture.setPixels(me)}},C.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},C.pick=function(g){if(!g||g.id!==this.pickId)return null;var P=h(g.value[0],g.value[1],g.value[2],0),E=d.le(this.arcLength,P);if(E<0)return null;if(E===this.arcLength.length-1)return new L(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),E);for(var z=this.points[E],q=this.points[Math.min(E+1,this.points.length-1)],U=(P-this.arcLength[E])/(this.arcLength[E+1]-this.arcLength[E]),G=1-U,Z=[0,0,0],j=0;j<3;++j)Z[j]=G*z[j]+U*q[j];var N=Math.min(U<.5?E:E+1,this.points.length-1);return new L(P,Z,N,this.points[N])};function S(g){var P=g.gl||g.scene&&g.scene.gl,E=b(P);E.attributes.position.location=0,E.attributes.nextPosition.location=1,E.attributes.arcLength.location=2,E.attributes.lineWidth.location=3,E.attributes.color.location=4;var z=p(P);z.attributes.position.location=0,z.attributes.nextPosition.location=1,z.attributes.arcLength.location=2,z.attributes.lineWidth.location=3,z.attributes.color.location=4;for(var q=s(P),U=l(P,[{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}]),G=v(new Array(256*4),[256,1,4]),Z=0;Z<1024;++Z)G.data[Z]=255;var j=u(P,G);j.wrap=P.REPEAT;var N=new x(P,E,z,q,U,j);return N.update(g),N}},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],l=o[1],u=o[2],c=o[3],f=o[4],h=o[5],d=o[6],v=o[7],m=o[8],b=o[9],p=o[10],k=o[11],M=o[12],T=o[13],L=o[14],x=o[15],C=s*h-l*f,S=s*d-u*f,g=s*v-c*f,P=l*d-u*h,E=l*v-c*h,z=u*v-c*d,q=m*T-b*M,U=m*L-p*M,G=m*x-k*M,Z=b*L-p*T,j=b*x-k*T,N=p*x-k*L;return C*N-S*j+g*Z+P*G-E*U+z*q}},7399:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l+l,d=u+u,v=c+c,m=l*h,b=u*h,p=u*d,k=c*h,M=c*d,T=c*v,L=f*h,x=f*d,C=f*v;return o[0]=1-p-T,o[1]=b+C,o[2]=k-x,o[3]=0,o[4]=b-C,o[5]=1-m-T,o[6]=M+L,o[7]=0,o[8]=k+x,o[9]=M-L,o[10]=1-m-p,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,l){var u=s[0],c=s[1],f=s[2],h=s[3],d=u+u,v=c+c,m=f+f,b=u*d,p=u*v,k=u*m,M=c*v,T=c*m,L=f*m,x=h*d,C=h*v,S=h*m;return o[0]=1-(M+L),o[1]=p+S,o[2]=k-C,o[3]=0,o[4]=p-S,o[5]=1-(b+L),o[6]=T+x,o[7]=0,o[8]=k+C,o[9]=T-x,o[10]=1-(b+M),o[11]=0,o[12]=l[0],o[13]=l[1],o[14]=l[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 l=s[0],u=s[1],c=s[2],f=s[3],h=s[4],d=s[5],v=s[6],m=s[7],b=s[8],p=s[9],k=s[10],M=s[11],T=s[12],L=s[13],x=s[14],C=s[15],S=l*d-u*h,g=l*v-c*h,P=l*m-f*h,E=u*v-c*d,z=u*m-f*d,q=c*m-f*v,U=b*L-p*T,G=b*x-k*T,Z=b*C-M*T,j=p*x-k*L,N=p*C-M*L,H=k*C-M*x,re=S*H-g*N+P*j+E*Z-z*G+q*U;return re?(re=1/re,o[0]=(d*H-v*N+m*j)*re,o[1]=(c*N-u*H-f*j)*re,o[2]=(L*q-x*z+C*E)*re,o[3]=(k*z-p*q-M*E)*re,o[4]=(v*Z-h*H-m*G)*re,o[5]=(l*H-c*Z+f*G)*re,o[6]=(x*P-T*q-C*g)*re,o[7]=(b*q-k*P+M*g)*re,o[8]=(h*N-d*Z+m*U)*re,o[9]=(u*Z-l*N-f*U)*re,o[10]=(T*z-L*P+C*S)*re,o[11]=(p*P-b*z-M*S)*re,o[12]=(d*G-h*j-v*U)*re,o[13]=(l*j-u*G+c*U)*re,o[14]=(L*g-T*E-x*S)*re,o[15]=(b*E-p*g+k*S)*re,o):null}},6582:function(i,a,o){var s=o(7894);i.exports=l;function l(u,c,f,h){var d,v,m,b,p,k,M,T,L,x,C=c[0],S=c[1],g=c[2],P=h[0],E=h[1],z=h[2],q=f[0],U=f[1],G=f[2];return Math.abs(C-q)<1e-6&&Math.abs(S-U)<1e-6&&Math.abs(g-G)<1e-6?s(u):(M=C-q,T=S-U,L=g-G,x=1/Math.sqrt(M*M+T*T+L*L),M*=x,T*=x,L*=x,d=E*L-z*T,v=z*M-P*L,m=P*T-E*M,x=Math.sqrt(d*d+v*v+m*m),x?(x=1/x,d*=x,v*=x,m*=x):(d=0,v=0,m=0),b=T*m-L*v,p=L*d-M*m,k=M*v-T*d,x=Math.sqrt(b*b+p*p+k*k),x?(x=1/x,b*=x,p*=x,k*=x):(b=0,p=0,k=0),u[0]=d,u[1]=b,u[2]=M,u[3]=0,u[4]=v,u[5]=p,u[6]=T,u[7]=0,u[8]=m,u[9]=k,u[10]=L,u[11]=0,u[12]=-(d*C+v*S+m*g),u[13]=-(b*C+p*S+k*g),u[14]=-(M*C+T*S+L*g),u[15]=1,u)}},6760:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3],d=s[4],v=s[5],m=s[6],b=s[7],p=s[8],k=s[9],M=s[10],T=s[11],L=s[12],x=s[13],C=s[14],S=s[15],g=l[0],P=l[1],E=l[2],z=l[3];return o[0]=g*u+P*d+E*p+z*L,o[1]=g*c+P*v+E*k+z*x,o[2]=g*f+P*m+E*M+z*C,o[3]=g*h+P*b+E*T+z*S,g=l[4],P=l[5],E=l[6],z=l[7],o[4]=g*u+P*d+E*p+z*L,o[5]=g*c+P*v+E*k+z*x,o[6]=g*f+P*m+E*M+z*C,o[7]=g*h+P*b+E*T+z*S,g=l[8],P=l[9],E=l[10],z=l[11],o[8]=g*u+P*d+E*p+z*L,o[9]=g*c+P*v+E*k+z*x,o[10]=g*f+P*m+E*M+z*C,o[11]=g*h+P*b+E*T+z*S,g=l[12],P=l[13],E=l[14],z=l[15],o[12]=g*u+P*d+E*p+z*L,o[13]=g*c+P*v+E*k+z*x,o[14]=g*f+P*m+E*M+z*C,o[15]=g*h+P*b+E*T+z*S,o}},4040:function(i){i.exports=a;function a(o,s,l,u,c,f,h){var d=1/(s-l),v=1/(u-c),m=1/(f-h);return o[0]=-2*d,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*v,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*m,o[11]=0,o[12]=(s+l)*d,o[13]=(c+u)*v,o[14]=(h+f)*m,o[15]=1,o}},4772:function(i){i.exports=a;function a(o,s,l,u,c){var f=1/Math.tan(s/2),h=1/(u-c);return o[0]=f/l,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=f,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=(c+u)*h,o[11]=-1,o[12]=0,o[13]=0,o[14]=2*c*u*h,o[15]=0,o}},6079:function(i){i.exports=a;function a(o,s,l,u){var c=u[0],f=u[1],h=u[2],d=Math.sqrt(c*c+f*f+h*h),v,m,b,p,k,M,T,L,x,C,S,g,P,E,z,q,U,G,Z,j,N,H,re,oe;return Math.abs(d)<1e-6?null:(d=1/d,c*=d,f*=d,h*=d,v=Math.sin(l),m=Math.cos(l),b=1-m,p=s[0],k=s[1],M=s[2],T=s[3],L=s[4],x=s[5],C=s[6],S=s[7],g=s[8],P=s[9],E=s[10],z=s[11],q=c*c*b+m,U=f*c*b+h*v,G=h*c*b-f*v,Z=c*f*b-h*v,j=f*f*b+m,N=h*f*b+c*v,H=c*h*b+f*v,re=f*h*b-c*v,oe=h*h*b+m,o[0]=p*q+L*U+g*G,o[1]=k*q+x*U+P*G,o[2]=M*q+C*U+E*G,o[3]=T*q+S*U+z*G,o[4]=p*Z+L*j+g*N,o[5]=k*Z+x*j+P*N,o[6]=M*Z+C*j+E*N,o[7]=T*Z+S*j+z*N,o[8]=p*H+L*re+g*oe,o[9]=k*H+x*re+P*oe,o[10]=M*H+C*re+E*oe,o[11]=T*H+S*re+z*oe,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,l){var u=Math.sin(l),c=Math.cos(l),f=s[4],h=s[5],d=s[6],v=s[7],m=s[8],b=s[9],p=s[10],k=s[11];return s!==o&&(o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[4]=f*c+m*u,o[5]=h*c+b*u,o[6]=d*c+p*u,o[7]=v*c+k*u,o[8]=m*c-f*u,o[9]=b*c-h*u,o[10]=p*c-d*u,o[11]=k*c-v*u,o}},2408:function(i){i.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[0],h=s[1],d=s[2],v=s[3],m=s[8],b=s[9],p=s[10],k=s[11];return s!==o&&(o[4]=s[4],o[5]=s[5],o[6]=s[6],o[7]=s[7],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[0]=f*c-m*u,o[1]=h*c-b*u,o[2]=d*c-p*u,o[3]=v*c-k*u,o[8]=f*u+m*c,o[9]=h*u+b*c,o[10]=d*u+p*c,o[11]=v*u+k*c,o}},7089:function(i){i.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[0],h=s[1],d=s[2],v=s[3],m=s[4],b=s[5],p=s[6],k=s[7];return s!==o&&(o[8]=s[8],o[9]=s[9],o[10]=s[10],o[11]=s[11],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[0]=f*c+m*u,o[1]=h*c+b*u,o[2]=d*c+p*u,o[3]=v*c+k*u,o[4]=m*c-f*u,o[5]=b*c-h*u,o[6]=p*c-d*u,o[7]=k*c-v*u,o}},2504:function(i){i.exports=a;function a(o,s,l){var u=l[0],c=l[1],f=l[2];return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o[3]=s[3]*u,o[4]=s[4]*c,o[5]=s[5]*c,o[6]=s[6]*c,o[7]=s[7]*c,o[8]=s[8]*f,o[9]=s[9]*f,o[10]=s[10]*f,o[11]=s[11]*f,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15],o}},7656:function(i){i.exports=a;function a(o,s,l){var u=l[0],c=l[1],f=l[2],h,d,v,m,b,p,k,M,T,L,x,C;return s===o?(o[12]=s[0]*u+s[4]*c+s[8]*f+s[12],o[13]=s[1]*u+s[5]*c+s[9]*f+s[13],o[14]=s[2]*u+s[6]*c+s[10]*f+s[14],o[15]=s[3]*u+s[7]*c+s[11]*f+s[15]):(h=s[0],d=s[1],v=s[2],m=s[3],b=s[4],p=s[5],k=s[6],M=s[7],T=s[8],L=s[9],x=s[10],C=s[11],o[0]=h,o[1]=d,o[2]=v,o[3]=m,o[4]=b,o[5]=p,o[6]=k,o[7]=M,o[8]=T,o[9]=L,o[10]=x,o[11]=C,o[12]=h*u+b*c+T*f+s[12],o[13]=d*u+p*c+L*f+s[13],o[14]=v*u+k*c+x*f+s[14],o[15]=m*u+M*c+C*f+s[15]),o}},5665:function(i){i.exports=a;function a(o,s){if(o===s){var l=s[1],u=s[2],c=s[3],f=s[6],h=s[7],d=s[11];o[1]=s[4],o[2]=s[8],o[3]=s[12],o[4]=l,o[6]=s[9],o[7]=s[13],o[8]=u,o[9]=f,o[11]=s[14],o[12]=c,o[13]=h,o[14]=d}else o[0]=s[0],o[1]=s[4],o[2]=s[8],o[3]=s[12],o[4]=s[1],o[5]=s[5],o[6]=s[9],o[7]=s[13],o[8]=s[2],o[9]=s[6],o[10]=s[10],o[11]=s[14],o[12]=s[3],o[13]=s[7],o[14]=s[11],o[15]=s[15];return o}},7626:function(i,a,o){"use strict";var s=o(2642),l=o(9346);i.exports=d;function u(v,m){for(var b=[0,0,0,0],p=0;p<4;++p)for(var k=0;k<4;++k)b[k]+=v[4*p+k]*m[p];return b}function c(v,m,b,p,k){for(var M=u(p,u(b,u(m,[v[0],v[1],v[2],1]))),T=0;T<3;++T)M[T]/=M[3];return[.5*k[0]*(1+M[0]),.5*k[1]*(1-M[1])]}function f(v,m){if(v.length===2){for(var b=0,p=0,k=0;k<2;++k)b+=Math.pow(m[k]-v[0][k],2),p+=Math.pow(m[k]-v[1][k],2);return b=Math.sqrt(b),p=Math.sqrt(p),b+p<1e-6?[1,0]:[p/(b+p),b/(p+b)]}else if(v.length===3){var M=[0,0];return l(v[0],v[1],v[2],m,M),s(v,M)}return[]}function h(v,m){for(var b=[0,0,0],p=0;p<v.length;++p)for(var k=v[p],M=m[p],T=0;T<3;++T)b[T]+=M*k[T];return b}function d(v,m,b,p,k,M){if(v.length===1)return[0,v[0].slice()];for(var T=new Array(v.length),L=0;L<v.length;++L)T[L]=c(v[L],b,p,k,M);for(var x=0,C=1/0,L=0;L<T.length;++L){for(var S=0,g=0;g<2;++g)S+=Math.pow(T[L][g]-m[g],2);S<C&&(C=S,x=L)}for(var P=f(T,m),E=0,L=0;L<3;++L){if(P[L]<-.001||P[L]>1.0001)return null;E+=P[L]}return Math.abs(E-1)>.001?null:[x,h(v,P),P]}},840:function(i,a,o){var s=o(3236),l=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;
|
||
}
|
||
`]),u=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;
|
||
}
|
||
`]),c=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;
|
||
}`]),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 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;
|
||
}`]),v=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;
|
||
}`]),m=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;
|
||
}`]),p=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:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.pointShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},a.pickShader={vertex:v,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:b,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:p,fragment:k,attributes:[{name:"position",type:"vec3"}]}},7201:function(i,a,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),h=o(7766),d=o(8406),v=o(6760),m=o(7608),b=o(9618),p=o(6729),k=o(7765),M=o(1888),T=o(840),L=o(7626),x=T.meshShader,C=T.wireShader,S=T.pointShader,g=T.pickShader,P=T.pointPickShader,E=T.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function q(ge,ie,Se,Ee,we,De,Le,me,Pe,ce,He,lt,mt,Vt,st,ct,Qt,Ht,nr,tt,je,Ue,Ae,rt,St,Tt,dt){this.gl=ge,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=ie,this.dirty=!0,this.triShader=Se,this.lineShader=Ee,this.pointShader=we,this.pickShader=De,this.pointPickShader=Le,this.contourShader=me,this.trianglePositions=Pe,this.triangleColors=He,this.triangleNormals=mt,this.triangleUVs=lt,this.triangleIds=ce,this.triangleVAO=Vt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=st,this.edgeColors=Qt,this.edgeUVs=Ht,this.edgeIds=ct,this.edgeVAO=nr,this.edgeCount=0,this.pointPositions=tt,this.pointColors=Ue,this.pointUVs=Ae,this.pointSizes=rt,this.pointIds=je,this.pointVAO=St,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Tt,this.contourVAO=dt,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=z,this._view=z,this._projection=z,this._resolution=[1,1]}var U=q.prototype;U.isOpaque=function(){return!this.hasAlpha},U.isTransparent=function(){return this.hasAlpha},U.pickSlots=1,U.setPickBase=function(ge){this.pickId=ge};function G(ge,ie){if(!ie||!ie.length)return 1;for(var Se=0;Se<ie.length;++Se){if(ie.length<2)return 1;if(ie[Se][0]===ge)return ie[Se][1];if(ie[Se][0]>ge&&Se>0){var Ee=(ie[Se][0]-ge)/(ie[Se][0]-ie[Se-1][0]);return ie[Se][1]*(1-Ee)+Ee*ie[Se-1][1]}}return 1}function Z(ge,ie){for(var Se=p({colormap:ge,nshades:256,format:"rgba"}),Ee=new Uint8Array(256*4),we=0;we<256;++we){for(var De=Se[we],Le=0;Le<3;++Le)Ee[4*we+Le]=De[Le];ie?Ee[4*we+3]=255*G(we/255,ie):Ee[4*we+3]=255*De[3]}return b(Ee,[256,256,4],[4,0,1])}function j(ge){for(var ie=ge.length,Se=new Array(ie),Ee=0;Ee<ie;++Ee)Se[Ee]=ge[Ee][2];return Se}U.highlight=function(ge){if(!ge||!this.contourEnable){this.contourCount=0;return}for(var ie=k(this.cells,this.intensity,ge.intensity),Se=ie.cells,Ee=ie.vertexIds,we=ie.vertexWeights,De=Se.length,Le=M.mallocFloat32(2*3*De),me=0,Pe=0;Pe<De;++Pe)for(var ce=Se[Pe],He=0;He<2;++He){var lt=ce[0];ce.length===2&&(lt=ce[He]);for(var mt=Ee[lt][0],Vt=Ee[lt][1],st=we[lt],ct=1-st,Qt=this.positions[mt],Ht=this.positions[Vt],nr=0;nr<3;++nr)Le[me++]=st*Qt[nr]+ct*Ht[nr]}this.contourCount=me/3|0,this.contourPositions.update(Le.subarray(0,me)),M.free(Le)},U.update=function(ge){ge=ge||{};var ie=this.gl;this.dirty=!0,"contourEnable"in ge&&(this.contourEnable=ge.contourEnable),"contourColor"in ge&&(this.contourColor=ge.contourColor),"lineWidth"in ge&&(this.lineWidth=ge.lineWidth),"lightPosition"in ge&&(this.lightPosition=ge.lightPosition),this.hasAlpha=!1,"opacity"in ge&&(this.opacity=ge.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in ge&&(this.opacityscale=ge.opacityscale,this.hasAlpha=!0),"ambient"in ge&&(this.ambientLight=ge.ambient),"diffuse"in ge&&(this.diffuseLight=ge.diffuse),"specular"in ge&&(this.specularLight=ge.specular),"roughness"in ge&&(this.roughness=ge.roughness),"fresnel"in ge&&(this.fresnel=ge.fresnel),ge.texture?(this.texture.dispose(),this.texture=h(ie,ge.texture)):ge.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=ie.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=ie.LINEAR,this.texture.setPixels(Z(ge.colormap,this.opacityscale)),this.texture.generateMipmap());var Se=ge.cells,Ee=ge.positions;if(!(!Ee||!Se)){var we=[],De=[],Le=[],me=[],Pe=[],ce=[],He=[],lt=[],mt=[],Vt=[],st=[],ct=[],Qt=[],Ht=[];this.cells=Se,this.positions=Ee;var nr=ge.vertexNormals,tt=ge.cellNormals,je=ge.vertexNormalsEpsilon===void 0?s:ge.vertexNormalsEpsilon,Ue=ge.faceNormalsEpsilon===void 0?l:ge.faceNormalsEpsilon;ge.useFacetNormals&&!tt&&(tt=d.faceNormals(Se,Ee,Ue)),!tt&&!nr&&(nr=d.vertexNormals(Se,Ee,je));var Ae=ge.vertexColors,rt=ge.cellColors,St=ge.meshColor||[1,1,1,1],Tt=ge.vertexUVs,dt=ge.vertexIntensity,Et=ge.cellUVs,pt=ge.cellIntensity,Xt=1/0,or=-1/0;if(!Tt&&!Et)if(dt)if(ge.vertexIntensityBounds)Xt=+ge.vertexIntensityBounds[0],or=+ge.vertexIntensityBounds[1];else for(var _r=0;_r<dt.length;++_r){var Er=dt[_r];Xt=Math.min(Xt,Er),or=Math.max(or,Er)}else if(pt)if(ge.cellIntensityBounds)Xt=+ge.cellIntensityBounds[0],or=+ge.cellIntensityBounds[1];else for(var _r=0;_r<pt.length;++_r){var Er=pt[_r];Xt=Math.min(Xt,Er),or=Math.max(or,Er)}else for(var _r=0;_r<Ee.length;++_r){var Er=Ee[_r][2];Xt=Math.min(Xt,Er),or=Math.max(or,Er)}dt?this.intensity=dt:pt?this.intensity=pt:this.intensity=j(Ee),this.pickVertex=!(pt||rt);var ei=ge.pointSizes,qr=ge.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var _r=0;_r<Ee.length;++_r)for(var jr=Ee[_r],gt=0;gt<3;++gt)isNaN(jr[gt])||!isFinite(jr[gt])||(this.bounds[0][gt]=Math.min(this.bounds[0][gt],jr[gt]),this.bounds[1][gt]=Math.max(this.bounds[1][gt],jr[gt]));var Ge=0,Je=0,We=0;e:for(var _r=0;_r<Se.length;++_r){var et=Se[_r];switch(et.length){case 1:for(var xt=et[0],jr=Ee[xt],gt=0;gt<3;++gt)if(isNaN(jr[gt])||!isFinite(jr[gt]))continue e;Vt.push(jr[0],jr[1],jr[2]);var At;Ae?At=Ae[xt]:rt?At=rt[_r]:At=St,this.opacityscale&&dt?De.push(At[0],At[1],At[2],this.opacity*G((dt[xt]-Xt)/(or-Xt),this.opacityscale)):At.length===3?st.push(At[0],At[1],At[2],this.opacity):(st.push(At[0],At[1],At[2],At[3]*this.opacity),At[3]<1&&(this.hasAlpha=!0));var Kt;Tt?Kt=Tt[xt]:dt?Kt=[(dt[xt]-Xt)/(or-Xt),0]:Et?Kt=Et[_r]:pt?Kt=[(pt[_r]-Xt)/(or-Xt),0]:Kt=[(jr[2]-Xt)/(or-Xt),0],ct.push(Kt[0],Kt[1]),ei?Qt.push(ei[xt]):Qt.push(qr),Ht.push(_r),We+=1;break;case 2:for(var gt=0;gt<2;++gt)for(var xt=et[gt],jr=Ee[xt],er=0;er<3;++er)if(isNaN(jr[er])||!isFinite(jr[er]))continue e;for(var gt=0;gt<2;++gt){var xt=et[gt],jr=Ee[xt];ce.push(jr[0],jr[1],jr[2]);var At;Ae?At=Ae[xt]:rt?At=rt[_r]:At=St,this.opacityscale&&dt?De.push(At[0],At[1],At[2],this.opacity*G((dt[xt]-Xt)/(or-Xt),this.opacityscale)):At.length===3?He.push(At[0],At[1],At[2],this.opacity):(He.push(At[0],At[1],At[2],At[3]*this.opacity),At[3]<1&&(this.hasAlpha=!0));var Kt;Tt?Kt=Tt[xt]:dt?Kt=[(dt[xt]-Xt)/(or-Xt),0]:Et?Kt=Et[_r]:pt?Kt=[(pt[_r]-Xt)/(or-Xt),0]:Kt=[(jr[2]-Xt)/(or-Xt),0],lt.push(Kt[0],Kt[1]),mt.push(_r)}Je+=1;break;case 3:for(var gt=0;gt<3;++gt)for(var xt=et[gt],jr=Ee[xt],er=0;er<3;++er)if(isNaN(jr[er])||!isFinite(jr[er]))continue e;for(var gt=0;gt<3;++gt){var xt=et[2-gt],jr=Ee[xt];we.push(jr[0],jr[1],jr[2]);var At;Ae?At=Ae[xt]:rt?At=rt[_r]:At=St,At?this.opacityscale&&dt?De.push(At[0],At[1],At[2],this.opacity*G((dt[xt]-Xt)/(or-Xt),this.opacityscale)):At.length===3?De.push(At[0],At[1],At[2],this.opacity):(De.push(At[0],At[1],At[2],At[3]*this.opacity),At[3]<1&&(this.hasAlpha=!0)):De.push(.5,.5,.5,1);var Kt;Tt?Kt=Tt[xt]:dt?Kt=[(dt[xt]-Xt)/(or-Xt),0]:Et?Kt=Et[_r]:pt?Kt=[(pt[_r]-Xt)/(or-Xt),0]:Kt=[(jr[2]-Xt)/(or-Xt),0],me.push(Kt[0],Kt[1]);var Sr;nr?Sr=nr[xt]:Sr=tt[_r],Le.push(Sr[0],Sr[1],Sr[2]),Pe.push(_r)}Ge+=1;break;default:break}}this.pointCount=We,this.edgeCount=Je,this.triangleCount=Ge,this.pointPositions.update(Vt),this.pointColors.update(st),this.pointUVs.update(ct),this.pointSizes.update(Qt),this.pointIds.update(new Uint32Array(Ht)),this.edgePositions.update(ce),this.edgeColors.update(He),this.edgeUVs.update(lt),this.edgeIds.update(new Uint32Array(mt)),this.trianglePositions.update(we),this.triangleColors.update(De),this.triangleUVs.update(me),this.triangleNormals.update(Le),this.triangleIds.update(new Uint32Array(Pe))}},U.drawTransparent=U.draw=function(ge){ge=ge||{};for(var ie=this.gl,Se=ge.model||z,Ee=ge.view||z,we=ge.projection||z,De=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Le=0;Le<3;++Le)De[0][Le]=Math.max(De[0][Le],this.clipBounds[0][Le]),De[1][Le]=Math.min(De[1][Le],this.clipBounds[1][Le]);var me={model:Se,view:Ee,projection:we,inverseModel:z.slice(),clipBounds:De,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=m(me.inverseModel,me.model),ie.disable(ie.CULL_FACE),this.texture.bind(0);var Pe=new Array(16);v(Pe,me.view,me.model),v(Pe,me.projection,Pe),m(Pe,Pe);for(var Le=0;Le<3;++Le)me.eyePosition[Le]=Pe[12+Le]/Pe[15];for(var ce=Pe[15],Le=0;Le<3;++Le)ce+=this.lightPosition[Le]*Pe[4*Le+3];for(var Le=0;Le<3;++Le){for(var He=Pe[12+Le],lt=0;lt<3;++lt)He+=Pe[4*lt+Le]*this.lightPosition[lt];me.lightPosition[Le]=He/ce}if(this.triangleCount>0){var mt=this.triShader;mt.bind(),mt.uniforms=me,this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var mt=this.lineShader;mt.bind(),mt.uniforms=me,this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var mt=this.pointShader;mt.bind(),mt.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var mt=this.contourShader;mt.bind(),mt.uniforms=me,this.contourVAO.bind(),ie.drawArrays(ie.LINES,0,this.contourCount),this.contourVAO.unbind()}},U.drawPick=function(ge){ge=ge||{};for(var ie=this.gl,Se=ge.model||z,Ee=ge.view||z,we=ge.projection||z,De=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Le=0;Le<3;++Le)De[0][Le]=Math.max(De[0][Le],this.clipBounds[0][Le]),De[1][Le]=Math.min(De[1][Le],this.clipBounds[1][Le]);this._model=[].slice.call(Se),this._view=[].slice.call(Ee),this._projection=[].slice.call(we),this._resolution=[ie.drawingBufferWidth,ie.drawingBufferHeight];var me={model:Se,view:Ee,projection:we,clipBounds:De,pickId:this.pickId/255},Pe=this.pickShader;if(Pe.bind(),Pe.uniforms=me,this.triangleCount>0&&(this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Pe=this.pointPickShader;Pe.bind(),Pe.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}},U.pick=function(ge){if(!ge||ge.id!==this.pickId)return null;for(var ie=ge.value[0]+256*ge.value[1]+65536*ge.value[2],Se=this.cells[ie],Ee=this.positions,we=new Array(Se.length),De=0;De<Se.length;++De)we[De]=Ee[Se[De]];var Le=ge.coord[0],me=ge.coord[1];if(!this.pickVertex){var Pe=this.positions[Se[0]],ce=this.positions[Se[1]],He=this.positions[Se[2]],lt=[(Pe[0]+ce[0]+He[0])/3,(Pe[1]+ce[1]+He[1])/3,(Pe[2]+ce[2]+He[2])/3];return{_cellCenter:!0,position:[Le,me],index:ie,cell:Se,cellId:ie,intensity:this.intensity[ie],dataCoordinate:lt}}var mt=L(we,[Le*this.pixelRatio,this._resolution[1]-me*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!mt)return null;for(var Vt=mt[2],st=0,De=0;De<Se.length;++De)st+=Vt[De]*this.intensity[Se[De]];return{position:mt[1],index:Se[mt[0]],cell:Se,cellId:ie,intensity:st,dataCoordinate:this.positions[Se[mt[0]]]}},U.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()};function N(ge){var ie=u(ge,x.vertex,x.fragment);return ie.attributes.position.location=0,ie.attributes.color.location=2,ie.attributes.uv.location=3,ie.attributes.normal.location=4,ie}function H(ge){var ie=u(ge,C.vertex,C.fragment);return ie.attributes.position.location=0,ie.attributes.color.location=2,ie.attributes.uv.location=3,ie}function re(ge){var ie=u(ge,S.vertex,S.fragment);return ie.attributes.position.location=0,ie.attributes.color.location=2,ie.attributes.uv.location=3,ie.attributes.pointSize.location=4,ie}function oe(ge){var ie=u(ge,g.vertex,g.fragment);return ie.attributes.position.location=0,ie.attributes.id.location=1,ie}function _e(ge){var ie=u(ge,P.vertex,P.fragment);return ie.attributes.position.location=0,ie.attributes.id.location=1,ie.attributes.pointSize.location=4,ie}function ke(ge){var ie=u(ge,E.vertex,E.fragment);return ie.attributes.position.location=0,ie}function Ce(ge,ie){arguments.length===1&&(ie=ge,ge=ie.gl);var Se=ge.getExtension("OES_standard_derivatives")||ge.getExtension("MOZ_OES_standard_derivatives")||ge.getExtension("WEBKIT_OES_standard_derivatives");if(!Se)throw new Error("derivatives not supported");var Ee=N(ge),we=H(ge),De=re(ge),Le=oe(ge),me=_e(ge),Pe=ke(ge),ce=h(ge,b(new Uint8Array([255,255,255,255]),[1,1,4]));ce.generateMipmap(),ce.minFilter=ge.LINEAR_MIPMAP_LINEAR,ce.magFilter=ge.LINEAR;var He=c(ge),lt=c(ge),mt=c(ge),Vt=c(ge),st=c(ge),ct=f(ge,[{buffer:He,type:ge.FLOAT,size:3},{buffer:st,type:ge.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:lt,type:ge.FLOAT,size:4},{buffer:mt,type:ge.FLOAT,size:2},{buffer:Vt,type:ge.FLOAT,size:3}]),Qt=c(ge),Ht=c(ge),nr=c(ge),tt=c(ge),je=f(ge,[{buffer:Qt,type:ge.FLOAT,size:3},{buffer:tt,type:ge.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Ht,type:ge.FLOAT,size:4},{buffer:nr,type:ge.FLOAT,size:2}]),Ue=c(ge),Ae=c(ge),rt=c(ge),St=c(ge),Tt=c(ge),dt=f(ge,[{buffer:Ue,type:ge.FLOAT,size:3},{buffer:Tt,type:ge.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Ae,type:ge.FLOAT,size:4},{buffer:rt,type:ge.FLOAT,size:2},{buffer:St,type:ge.FLOAT,size:1}]),Et=c(ge),pt=f(ge,[{buffer:Et,type:ge.FLOAT,size:3}]),Xt=new q(ge,ce,Ee,we,De,Le,me,Pe,He,st,lt,mt,Vt,ct,Qt,tt,Ht,nr,je,Ue,Tt,Ae,rt,St,dt,Et,pt);return Xt.update(ie),Xt}i.exports=Ce},4437:function(i,a,o){"use strict";i.exports=d;var s=o(3025),l=o(6296),u=o(351),c=o(8512),f=o(24),h=o(7520);function d(v,m){v=v||document.body,m=m||{};var b=[.01,1/0];"distanceLimits"in m&&(b[0]=m.distanceLimits[0],b[1]=m.distanceLimits[1]),"zoomMin"in m&&(b[0]=m.zoomMin),"zoomMax"in m&&(b[1]=m.zoomMax);var p=l({center:m.center||[0,0,0],up:m.up||[0,1,0],eye:m.eye||[0,0,10],mode:m.mode||"orbit",distanceLimits:b}),k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0,T=v.clientWidth,L=v.clientHeight,x={keyBindingMode:"rotate",enableWheel:!0,view:p,element:v,delay:m.delay||16,rotateSpeed:m.rotateSpeed||1,zoomSpeed:m.zoomSpeed||1,translateSpeed:m.translateSpeed||1,flipX:!!m.flipX,flipY:!!m.flipY,modes:p.modes,_ortho:m._ortho||m.projection&&m.projection.type==="orthographic"||!1,tick:function(){var C=s(),S=this.delay,g=C-2*S;p.idle(C-S),p.recalcMatrix(g),p.flush(C-(100+S*2));for(var P=!0,E=p.computedMatrix,z=0;z<16;++z)P=P&&k[z]===E[z],k[z]=E[z];var q=v.clientWidth===T&&v.clientHeight===L;return T=v.clientWidth,L=v.clientHeight,P?!q:(M=Math.exp(p.computedRadius[0]),!0)},lookAt:function(C,S,g){p.lookAt(p.lastT(),C,S,g)},rotate:function(C,S,g){p.rotate(p.lastT(),C,S,g)},pan:function(C,S,g){p.pan(p.lastT(),C,S,g)},translate:function(C,S,g){p.translate(p.lastT(),C,S,g)}};return Object.defineProperties(x,{matrix:{get:function(){return p.computedMatrix},set:function(C){return p.setMatrix(p.lastT(),C),p.computedMatrix},enumerable:!0},mode:{get:function(){return p.getMode()},set:function(C){var S=p.computedUp.slice(),g=p.computedEye.slice(),P=p.computedCenter.slice();if(p.setMode(C),C==="turntable"){var E=s();p._active.lookAt(E,g,P,S),p._active.lookAt(E+500,g,P,[0,0,1]),p._active.flush(E)}return p.getMode()},enumerable:!0},center:{get:function(){return p.computedCenter},set:function(C){return p.lookAt(p.lastT(),null,C),p.computedCenter},enumerable:!0},eye:{get:function(){return p.computedEye},set:function(C){return p.lookAt(p.lastT(),C),p.computedEye},enumerable:!0},up:{get:function(){return p.computedUp},set:function(C){return p.lookAt(p.lastT(),null,null,C),p.computedUp},enumerable:!0},distance:{get:function(){return M},set:function(C){return p.setDistance(p.lastT(),C),C},enumerable:!0},distanceLimits:{get:function(){return p.getDistanceLimits(b)},set:function(C){return p.setDistanceLimits(C),C},enumerable:!0}}),v.addEventListener("contextmenu",function(C){return C.preventDefault(),!1}),x._lastX=-1,x._lastY=-1,x._lastMods={shift:!1,control:!1,alt:!1,meta:!1},x.enableMouseListeners=function(){x.mouseListener=u(v,C),v.addEventListener("touchstart",function(S){var g=f(S.changedTouches[0],v);C(0,g[0],g[1],x._lastMods),C(1,g[0],g[1],x._lastMods)},h?{passive:!0}:!1),v.addEventListener("touchmove",function(S){var g=f(S.changedTouches[0],v);C(1,g[0],g[1],x._lastMods),S.preventDefault()},h?{passive:!1}:!1),v.addEventListener("touchend",function(S){C(0,x._lastX,x._lastY,x._lastMods)},h?{passive:!0}:!1);function C(S,g,P,E){var z=x.keyBindingMode;if(z!==!1){var q=z==="rotate",U=z==="pan",G=z==="zoom",Z=!!E.control,j=!!E.alt,N=!!E.shift,H=!!(S&1),re=!!(S&2),oe=!!(S&4),_e=1/v.clientHeight,ke=_e*(g-x._lastX),Ce=_e*(P-x._lastY),ge=x.flipX?1:-1,ie=x.flipY?1:-1,Se=Math.PI*x.rotateSpeed,Ee=s();if(x._lastX!==-1&&x._lastY!==-1&&((q&&H&&!Z&&!j&&!N||H&&!Z&&!j&&N)&&p.rotate(Ee,ge*Se*ke,-ie*Se*Ce,0),(U&&H&&!Z&&!j&&!N||re||H&&Z&&!j&&!N)&&p.pan(Ee,-x.translateSpeed*ke*M,x.translateSpeed*Ce*M,0),G&&H&&!Z&&!j&&!N||oe||H&&!Z&&j&&!N)){var we=-x.zoomSpeed*Ce/window.innerHeight*(Ee-p.lastT())*100;p.pan(Ee,0,0,M*(Math.exp(we)-1))}return x._lastX=g,x._lastY=P,x._lastMods=E,!0}}x.wheelListener=c(v,function(S,g){if(x.keyBindingMode!==!1&&x.enableWheel){var P=x.flipX?1:-1,E=x.flipY?1:-1,z=s();if(Math.abs(S)>Math.abs(g))p.rotate(z,0,0,-S*P*Math.PI*x.rotateSpeed/window.innerWidth);else if(!x._ortho){var q=-x.zoomSpeed*E*g/window.innerHeight*(z-p.lastT())/20;p.pan(z,0,0,M*(Math.exp(q)-1))}}},!0)},x.enableMouseListeners(),x}},799:function(i,a,o){var s=o(3236),l=o(9405),u=s([`precision mediump float;
|
||
#define GLSLIFY 1
|
||
attribute vec2 position;
|
||
varying vec2 uv;
|
||
void main() {
|
||
uv = position;
|
||
gl_Position = vec4(position, 0, 1);
|
||
}`]),c=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(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}},4100:function(i,a,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),d=o(7169),v=o(351),m=o(4772),b=o(4040),p=o(799),k=o(9216)({tablet:!0,featureDetect:!0});i.exports={createScene:C,createCamera:s};function M(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function T(g,P){var E=null;try{E=g.getContext("webgl",P),E||(E=g.getContext("experimental-webgl",P))}catch(z){return null}return E}function L(g){var P=Math.round(Math.log(Math.abs(g))/Math.log(10));if(P<0){var E=Math.round(Math.pow(10,-P));return Math.ceil(g*E)/E}else if(P>0){var E=Math.round(Math.pow(10,P));return Math.ceil(g/E)*E}return Math.ceil(g)}function x(g){return typeof g=="boolean"?g:!0}function C(g){g=g||{},g.camera=g.camera||{};var P=g.canvas;if(!P)if(P=document.createElement("canvas"),g.container){var E=g.container;E.appendChild(P)}else document.body.appendChild(P);var z=g.gl;if(z||(g.glOptions&&(k=!!g.glOptions.preserveDrawingBuffer),z=T(P,g.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:k})),!z)throw new Error("webgl not supported");var q=g.bounds||[[-10,-10,-10],[10,10,10]],U=new M,G=h(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!k}),Z=p(z),j=g.cameraObject&&g.cameraObject._ortho===!0||g.camera.projection&&g.camera.projection.type==="orthographic"||!1,N={eye:g.camera.eye||[2,0,0],center:g.camera.center||[0,0,0],up:g.camera.up||[0,1,0],zoomMin:g.camera.zoomMax||.1,zoomMax:g.camera.zoomMin||100,mode:g.camera.mode||"turntable",_ortho:j},H=g.axes||{},re=l(z,H);re.enable=!H.disable;var oe=g.spikes||{},_e=c(z,oe),ke=[],Ce=[],ge=[],ie=[],Se=!0,Le=!0,Ee=new Array(16),we=new Array(16),De={view:null,projection:Ee,model:we,_ortho:!1},Le=!0,me=[z.drawingBufferWidth,z.drawingBufferHeight],Pe=g.cameraObject||s(P,N),ce={gl:z,contextLost:!1,pixelRatio:g.pixelRatio||1,canvas:P,selection:U,camera:Pe,axes:re,axesPixels:null,spikes:_e,bounds:q,objects:ke,shape:me,aspect:g.aspectRatio||[1,1,1],pickRadius:g.pickRadius||10,zNear:g.zNear||.01,zFar:g.zFar||1e3,fovy:g.fovy||Math.PI/4,clearColor:g.clearColor||[0,0,0,0],autoResize:x(g.autoResize),autoBounds:x(g.autoBounds),autoScale:!!g.autoScale,autoCenter:x(g.autoCenter),clipToBounds:x(g.clipToBounds),snapToData:!!g.snapToData,onselect:g.onselect||null,onrender:g.onrender||null,onclick:g.onclick||null,cameraParams:De,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(tt){this.aspect[0]=tt.x,this.aspect[1]=tt.y,this.aspect[2]=tt.z,Le=!0},setBounds:function(tt,je){this.bounds[0][tt]=je.min,this.bounds[1][tt]=je.max},setClearColor:function(tt){this.clearColor=tt},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)}},He=[z.drawingBufferWidth/ce.pixelRatio|0,z.drawingBufferHeight/ce.pixelRatio|0];function lt(){if(!ce._stopped&&ce.autoResize){var tt=P.parentNode,je=1,Ue=1;tt&&tt!==document.body?(je=tt.clientWidth,Ue=tt.clientHeight):(je=window.innerWidth,Ue=window.innerHeight);var Ae=Math.ceil(je*ce.pixelRatio)|0,rt=Math.ceil(Ue*ce.pixelRatio)|0;if(Ae!==P.width||rt!==P.height){P.width=Ae,P.height=rt;var St=P.style;St.position=St.position||"absolute",St.left="0px",St.top="0px",St.width=je+"px",St.height=Ue+"px",Se=!0}}}ce.autoResize&<(),window.addEventListener("resize",lt);function mt(){for(var tt=ke.length,je=ie.length,Ue=0;Ue<je;++Ue)ge[Ue]=0;e:for(var Ue=0;Ue<tt;++Ue){var Ae=ke[Ue],rt=Ae.pickSlots;if(!rt){Ce[Ue]=-1;continue}for(var St=0;St<je;++St)if(ge[St]+rt<255){Ce[Ue]=St,Ae.setPickBase(ge[St]+1),ge[St]+=rt;continue e}var Tt=f(z,me);Ce[Ue]=je,ie.push(Tt),ge.push(rt),Ae.setPickBase(1),je+=1}for(;je>0&&ge[je-1]===0;)ge.pop(),ie.pop().dispose()}ce.update=function(tt){ce._stopped||(tt=tt||{},Se=!0,Le=!0)},ce.add=function(tt){ce._stopped||(tt.axes=re,ke.push(tt),Ce.push(-1),Se=!0,Le=!0,mt())},ce.remove=function(tt){if(!ce._stopped){var je=ke.indexOf(tt);je<0||(ke.splice(je,1),Ce.pop(),Se=!0,Le=!0,mt())}},ce.dispose=function(){if(!ce._stopped&&(ce._stopped=!0,window.removeEventListener("resize",lt),P.removeEventListener("webglcontextlost",Vt),ce.mouseListener.enabled=!1,!ce.contextLost)){re.dispose(),_e.dispose();for(var tt=0;tt<ke.length;++tt)ke[tt].dispose();G.dispose();for(var tt=0;tt<ie.length;++tt)ie[tt].dispose();Z.dispose(),z=null,re=null,_e=null,ke=[]}},ce._mouseRotating=!1,ce._prevButtons=0,ce.enableMouseListeners=function(){ce.mouseListener=v(P,function(tt,je,Ue){if(!ce._stopped){var Ae=ie.length,rt=ke.length,St=U.object;U.distance=1/0,U.mouse[0]=je,U.mouse[1]=Ue,U.object=null,U.screen=null,U.dataCoordinate=U.dataPosition=null;var Tt=!1;if(tt&&ce._prevButtons)ce._mouseRotating=!0;else{ce._mouseRotating&&(Le=!0),ce._mouseRotating=!1;for(var dt=0;dt<Ae;++dt){var Et=ie[dt].query(je,He[1]-Ue-1,ce.pickRadius);if(Et){if(Et.distance>U.distance)continue;for(var pt=0;pt<rt;++pt){var Xt=ke[pt];if(Ce[pt]===dt){var or=Xt.pick(Et);or&&(U.buttons=tt,U.screen=Et.coord,U.distance=Et.distance,U.object=Xt,U.index=or.distance,U.dataPosition=or.position,U.dataCoordinate=or.dataCoordinate,U.data=or,Tt=!0)}}}}}St&&St!==U.object&&(St.highlight&&St.highlight(null),Se=!0),U.object&&(U.object.highlight&&U.object.highlight(U.data),Se=!0),Tt=Tt||U.object!==St,Tt&&ce.onselect&&ce.onselect(U),tt&1&&!(ce._prevButtons&1)&&ce.onclick&&ce.onclick(U),ce._prevButtons=tt}})};function Vt(){if(ce.contextLost)return!0;z.isContextLost()&&(ce.contextLost=!0,ce.mouseListener.enabled=!1,ce.selection.object=null,ce.oncontextloss&&ce.oncontextloss())}P.addEventListener("webglcontextlost",Vt);function st(){if(!Vt()){z.colorMask(!0,!0,!0,!0),z.depthMask(!0),z.disable(z.BLEND),z.enable(z.DEPTH_TEST),z.depthFunc(z.LEQUAL);for(var tt=ke.length,je=ie.length,Ue=0;Ue<je;++Ue){var Ae=ie[Ue];Ae.shape=He,Ae.begin();for(var rt=0;rt<tt;++rt)if(Ce[rt]===Ue){var St=ke[rt];St.drawPick&&(St.pixelRatio=1,St.drawPick(De))}Ae.end()}}}var ct=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Qt=[ct[0].slice(),ct[1].slice()];function Ht(){if(!Vt()){lt();var tt=ce.camera.tick();De.view=ce.camera.matrix,Se=Se||tt,Le=Le||tt,re.pixelRatio=ce.pixelRatio,_e.pixelRatio=ce.pixelRatio;var je=ke.length,Ue=ct[0],Ae=ct[1];Ue[0]=Ue[1]=Ue[2]=1/0,Ae[0]=Ae[1]=Ae[2]=-1/0;for(var rt=0;rt<je;++rt){var St=ke[rt];St.pixelRatio=ce.pixelRatio,St.axes=ce.axes,Se=Se||!!St.dirty,Le=Le||!!St.dirty;var Tt=St.bounds;if(Tt)for(var dt=Tt[0],Et=Tt[1],pt=0;pt<3;++pt)Ue[pt]=Math.min(Ue[pt],dt[pt]),Ae[pt]=Math.max(Ae[pt],Et[pt])}var Xt=ce.bounds;if(ce.autoBounds)for(var pt=0;pt<3;++pt){if(Ae[pt]<Ue[pt])Ue[pt]=-1,Ae[pt]=1;else{Ue[pt]===Ae[pt]&&(Ue[pt]-=1,Ae[pt]+=1);var or=.05*(Ae[pt]-Ue[pt]);Ue[pt]=Ue[pt]-or,Ae[pt]=Ae[pt]+or}Xt[0][pt]=Ue[pt],Xt[1][pt]=Ae[pt]}for(var _r=!1,pt=0;pt<3;++pt)_r=_r||Qt[0][pt]!==Xt[0][pt]||Qt[1][pt]!==Xt[1][pt],Qt[0][pt]=Xt[0][pt],Qt[1][pt]=Xt[1][pt];if(Le=Le||_r,Se=Se||_r,!!Se){if(_r){for(var Er=[0,0,0],rt=0;rt<3;++rt)Er[rt]=L((Xt[1][rt]-Xt[0][rt])/10);re.autoTicks?re.update({bounds:Xt,tickSpacing:Er}):re.update({bounds:Xt})}var ei=z.drawingBufferWidth,qr=z.drawingBufferHeight;me[0]=ei,me[1]=qr,He[0]=Math.max(ei/ce.pixelRatio,1)|0,He[1]=Math.max(qr/ce.pixelRatio,1)|0,S(ce,j);for(var rt=0;rt<je;++rt){var St=ke[rt];St.axesBounds=Xt,ce.clipToBounds&&(St.clipBounds=Xt)}U.object&&(ce.snapToData?_e.position=U.dataCoordinate:_e.position=U.dataPosition,_e.bounds=Xt),Le&&(Le=!1,st()),ce.axesPixels=u(ce.axes,De,ei,qr),ce.onrender&&ce.onrender(),z.bindFramebuffer(z.FRAMEBUFFER,null),z.viewport(0,0,ei,qr),ce.clearRGBA(),z.depthMask(!0),z.colorMask(!0,!0,!0,!0),z.enable(z.DEPTH_TEST),z.depthFunc(z.LEQUAL),z.disable(z.BLEND),z.disable(z.CULL_FACE);var jr=!1;re.enable&&(jr=jr||re.isTransparent(),re.draw(De)),_e.axes=re,U.object&&_e.draw(De),z.disable(z.CULL_FACE);for(var rt=0;rt<je;++rt){var St=ke[rt];St.axes=re,St.pixelRatio=ce.pixelRatio,St.isOpaque&&St.isOpaque()&&St.draw(De),St.isTransparent&&St.isTransparent()&&(jr=!0)}if(jr){G.shape=me,G.bind(),z.clear(z.DEPTH_BUFFER_BIT),z.colorMask(!1,!1,!1,!1),z.depthMask(!0),z.depthFunc(z.LESS),re.enable&&re.isTransparent()&&re.drawTransparent(De);for(var rt=0;rt<je;++rt){var St=ke[rt];St.isOpaque&&St.isOpaque()&&St.draw(De)}z.enable(z.BLEND),z.blendEquation(z.FUNC_ADD),z.blendFunc(z.ONE,z.ONE_MINUS_SRC_ALPHA),z.colorMask(!0,!0,!0,!0),z.depthMask(!1),z.clearColor(0,0,0,0),z.clear(z.COLOR_BUFFER_BIT),re.isTransparent()&&re.drawTransparent(De);for(var rt=0;rt<je;++rt){var St=ke[rt];St.isTransparent&&St.isTransparent()&&St.drawTransparent(De)}z.bindFramebuffer(z.FRAMEBUFFER,null),z.blendFunc(z.ONE,z.ONE_MINUS_SRC_ALPHA),z.disable(z.DEPTH_TEST),Z.bind(),G.color[0].bind(0),Z.uniforms.accumBuffer=0,d(z),z.disable(z.BLEND)}Se=!1;for(var rt=0;rt<je;++rt)ke[rt].dirty=!1}}}function nr(){ce._stopped||ce.contextLost||(Ht(),requestAnimationFrame(nr))}return ce.enableMouseListeners(),nr(),ce.redraw=function(){ce._stopped||(Se=!0,Ht())},ce}function S(g,P){var E=g.bounds,z=g.cameraParams,q=z.projection,U=z.model,G=g.gl.drawingBufferWidth,Z=g.gl.drawingBufferHeight,j=g.zNear,N=g.zFar,H=g.fovy,re=G/Z;P?(b(q,-re,re,-1,1,j,N),z._ortho=!0):(m(q,H,re,j,N),z._ortho=!1);for(var oe=0;oe<16;++oe)U[oe]=0;U[15]=1;for(var _e=0,oe=0;oe<3;++oe)_e=Math.max(_e,E[1][oe]-E[0][oe]);for(var oe=0;oe<3;++oe)g.autoScale?U[5*oe]=g.aspect[oe]/(E[1][oe]-E[0][oe]):U[5*oe]=1/_e,g.autoCenter&&(U[12+oe]=-U[5*oe]*.5*(E[0][oe]+E[1][oe]))}},783:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3],v=l[0],m=l[1],b=l[2],p=l[3],k,M,T,L,x;return M=c*v+f*m+h*b+d*p,M<0&&(M=-M,v=-v,m=-m,b=-b,p=-p),1-M>1e-6?(k=Math.acos(M),T=Math.sin(k),L=Math.sin((1-u)*k)/T,x=Math.sin(u*k)/T):(L=1-u,x=u),o[0]=L*c+x*v,o[1]=L*f+x*m,o[2]=L*h+x*b,o[3]=L*d+x*p,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=u;var l={};function u(c,f,h){var d=[f.style,f.weight,f.variant,f.family].join("_"),v=l[d];if(v||(v=l[d]={}),c in v)return v[c];var m={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};m.triangles=!0;var b=s(c,m);m.triangles=!1;var p=s(c,m),k,M;if(h&&h!==1){for(k=0;k<b.positions.length;++k)for(M=0;M<b.positions[k].length;++M)b.positions[k][M]/=h;for(k=0;k<p.positions.length;++k)for(M=0;M<p.positions[k].length;++M)p.positions[k][M]/=h}var T=[[1/0,1/0],[-1/0,-1/0]],L=p.positions.length;for(k=0;k<L;++k){var x=p.positions[k];for(M=0;M<2;++M)T[0][M]=Math.min(T[0][M],x[M]),T[1][M]=Math.max(T[1][M],x[M])}return v[c]=[b,p,T]}},1283:function(i,a,o){var s=o(9405),l=o(3236),u=l([`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;
|
||
}
|
||
}`]),c=l([`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;
|
||
}
|
||
}`]),f=l([`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=l([`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=l([`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);
|
||
}`]),v=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],m={vertex:u,fragment:h,attributes:v},b={vertex:c,fragment:h,attributes:v},p={vertex:f,fragment:h,attributes:v},k={vertex:u,fragment:d,attributes:v},M={vertex:c,fragment:d,attributes:v},T={vertex:f,fragment:d,attributes:v};function L(x,C){var S=s(x,C),g=S.attributes;return g.position.location=0,g.color.location=1,g.glyph.location=2,g.id.location=3,S}a.createPerspective=function(x){return L(x,m)},a.createOrtho=function(x){return L(x,b)},a.createProject=function(x){return L(x,p)},a.createPickPerspective=function(x){return L(x,k)},a.createPickOrtho=function(x){return L(x,M)},a.createPickProject=function(x){return L(x,T)}},8418:function(i,a,o){"use strict";var s=o(5219),l=o(2762),u=o(8116),c=o(1888),f=o(6760),h=o(1283),d=o(9366),v=o(5964),m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],b=ArrayBuffer,p=DataView;function k(we){return b.isView(we)&&!(we instanceof p)}function M(we){return Array.isArray(we)||k(we)}i.exports=Ee;function T(we,De){var Le=we[0],me=we[1],Pe=we[2],ce=we[3];return we[0]=De[0]*Le+De[4]*me+De[8]*Pe+De[12]*ce,we[1]=De[1]*Le+De[5]*me+De[9]*Pe+De[13]*ce,we[2]=De[2]*Le+De[6]*me+De[10]*Pe+De[14]*ce,we[3]=De[3]*Le+De[7]*me+De[11]*Pe+De[15]*ce,we}function L(we,De,Le,me){return T(me,me,Le),T(me,me,De),T(me,me,we)}function x(we,De){this.index=we,this.dataCoordinate=this.position=De}function C(we){return we===!0||we>1?1:we}function S(we,De,Le,me,Pe,ce,He,lt,mt,Vt,st,ct){this.gl=we,this.pixelRatio=1,this.shader=De,this.orthoShader=Le,this.projectShader=me,this.pointBuffer=Pe,this.colorBuffer=ce,this.glyphBuffer=He,this.idBuffer=lt,this.vao=mt,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Vt,this.pickOrthoShader=st,this.pickProjectShader=ct,this.points=[],this._selectResult=new x(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var g=S.prototype;g.pickSlots=1,g.setPickBase=function(we){this.pickId=we},g.isTransparent=function(){if(this.hasAlpha)return!0;for(var we=0;we<3;++we)if(this.axesProject[we]&&this.projectHasAlpha)return!0;return!1},g.isOpaque=function(){if(!this.hasAlpha)return!0;for(var we=0;we<3;++we)if(this.axesProject[we]&&!this.projectHasAlpha)return!0;return!1};var P=[0,0],E=[0,0,0],z=[0,0,0],q=[0,0,0,1],U=[0,0,0,1],G=m.slice(),Z=[0,0,0],j=[[0,0,0],[0,0,0]];function N(we){return we[0]=we[1]=we[2]=0,we}function H(we,De){return we[0]=De[0],we[1]=De[1],we[2]=De[2],we[3]=1,we}function re(we,De,Le,me){return we[0]=De[0],we[1]=De[1],we[2]=De[2],we[Le]=me,we}function oe(we){for(var De=j,Le=0;Le<2;++Le)for(var me=0;me<3;++me)De[Le][me]=Math.max(Math.min(we[Le][me],1e8),-1e8);return De}function _e(we,De,Le,me){var Pe=De.axesProject,ce=De.gl,He=we.uniforms,lt=Le.model||m,mt=Le.view||m,Vt=Le.projection||m,st=De.axesBounds,ct=oe(De.clipBounds),Qt;De.axes&&De.axes.lastCubeProps?Qt=De.axes.lastCubeProps.axis:Qt=[1,1,1],P[0]=2/ce.drawingBufferWidth,P[1]=2/ce.drawingBufferHeight,we.bind(),He.view=mt,He.projection=Vt,He.screenSize=P,He.highlightId=De.highlightId,He.highlightScale=De.highlightScale,He.clipBounds=ct,He.pickGroup=De.pickId/255,He.pixelRatio=me;for(var Ht=0;Ht<3;++Ht)if(Pe[Ht]){He.scale=De.projectScale[Ht],He.opacity=De.projectOpacity[Ht];for(var nr=G,tt=0;tt<16;++tt)nr[tt]=0;for(var tt=0;tt<4;++tt)nr[5*tt]=1;nr[5*Ht]=0,Qt[Ht]<0?nr[12+Ht]=st[0][Ht]:nr[12+Ht]=st[1][Ht],f(nr,lt,nr),He.model=nr;var je=(Ht+1)%3,Ue=(Ht+2)%3,Ae=N(E),rt=N(z);Ae[je]=1,rt[Ue]=1;var St=L(Vt,mt,lt,H(q,Ae)),Tt=L(Vt,mt,lt,H(U,rt));if(Math.abs(St[1])>Math.abs(Tt[1])){var dt=St;St=Tt,Tt=dt,dt=Ae,Ae=rt,rt=dt;var Et=je;je=Ue,Ue=Et}St[0]<0&&(Ae[je]=-1),Tt[1]>0&&(rt[Ue]=-1);for(var pt=0,Xt=0,tt=0;tt<4;++tt)pt+=Math.pow(lt[4*je+tt],2),Xt+=Math.pow(lt[4*Ue+tt],2);Ae[je]/=Math.sqrt(pt),rt[Ue]/=Math.sqrt(Xt),He.axes[0]=Ae,He.axes[1]=rt,He.fragClipBounds[0]=re(Z,ct[0],Ht,-1e8),He.fragClipBounds[1]=re(Z,ct[1],Ht,1e8),De.vao.bind(),De.vao.draw(ce.TRIANGLES,De.vertexCount),De.lineWidth>0&&(ce.lineWidth(De.lineWidth*me),De.vao.draw(ce.LINES,De.lineVertexCount,De.vertexCount)),De.vao.unbind()}}var ke=[-1e8,-1e8,-1e8],Ce=[1e8,1e8,1e8],ge=[ke,Ce];function ie(we,De,Le,me,Pe,ce,He){var lt=Le.gl;if((ce===Le.projectHasAlpha||He)&&_e(De,Le,me,Pe),ce===Le.hasAlpha||He){we.bind();var mt=we.uniforms;mt.model=me.model||m,mt.view=me.view||m,mt.projection=me.projection||m,P[0]=2/lt.drawingBufferWidth,P[1]=2/lt.drawingBufferHeight,mt.screenSize=P,mt.highlightId=Le.highlightId,mt.highlightScale=Le.highlightScale,mt.fragClipBounds=ge,mt.clipBounds=Le.axes.bounds,mt.opacity=Le.opacity,mt.pickGroup=Le.pickId/255,mt.pixelRatio=Pe,Le.vao.bind(),Le.vao.draw(lt.TRIANGLES,Le.vertexCount),Le.lineWidth>0&&(lt.lineWidth(Le.lineWidth*Pe),Le.vao.draw(lt.LINES,Le.lineVertexCount,Le.vertexCount)),Le.vao.unbind()}}g.draw=function(we){var De=this.useOrtho?this.orthoShader:this.shader;ie(De,this.projectShader,this,we,this.pixelRatio,!1,!1)},g.drawTransparent=function(we){var De=this.useOrtho?this.orthoShader:this.shader;ie(De,this.projectShader,this,we,this.pixelRatio,!0,!1)},g.drawPick=function(we){var De=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;ie(De,this.pickProjectShader,this,we,1,!0,!0)},g.pick=function(we){if(!we||we.id!==this.pickId)return null;var De=we.value[2]+(we.value[1]<<8)+(we.value[0]<<16);if(De>=this.pointCount||De<0)return null;var Le=this.points[De],me=this._selectResult;me.index=De;for(var Pe=0;Pe<3;++Pe)me.position[Pe]=me.dataCoordinate[Pe]=Le[Pe];return me},g.highlight=function(we){if(!we)this.highlightId=[1,1,1,1];else{var De=we.index,Le=De&255,me=De>>8&255,Pe=De>>16&255;this.highlightId=[Le/255,me/255,Pe/255,0]}};function Se(we,De,Le,me){var Pe;M(we)?De<we.length?Pe=we[De]:Pe=void 0:Pe=we,Pe=v(Pe);var ce=!0;s(Pe)&&(Pe="\u25BC",ce=!1),Le||(Le={});var He=Le.family;M(He)&&(He=He[De]),He||(He="normal");var lt=Le.weight;M(lt)&&(lt=lt[De]),lt||(lt="normal");var mt=Le.style;M(mt)&&(mt=mt[De]),mt||(mt="normal");var Vt=Le.variant;M(Vt)&&(Vt=Vt[De]),Vt||(Vt="normal");var st=d(Pe,{family:He,weight:lt,style:mt,variant:Vt},me),st=d(Pe,Le,me);return{mesh:st[0],lines:st[1],bounds:st[2],visible:ce}}g.update=function(we){if(we=we||{},"perspective"in we&&(this.useOrtho=!we.perspective),"orthographic"in we&&(this.useOrtho=!!we.orthographic),"lineWidth"in we&&(this.lineWidth=we.lineWidth),"project"in we)if(M(we.project))this.axesProject=we.project;else{var De=!!we.project;this.axesProject=[De,De,De]}if("projectScale"in we)if(M(we.projectScale))this.projectScale=we.projectScale.slice();else{var Le=+we.projectScale;this.projectScale=[Le,Le,Le]}if(this.projectHasAlpha=!1,"projectOpacity"in we){if(M(we.projectOpacity))this.projectOpacity=we.projectOpacity.slice();else{var Le=+we.projectOpacity;this.projectOpacity=[Le,Le,Le]}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 we&&(this.opacity=C(we.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var Pe=we.position,ce={family:we.font||"normal",style:we.fontStyle||"normal",weight:we.fontWeight||"normal",variant:we.fontVariant||"normal"},He=we.alignment||[0,0],lt,mt;if(He.length===2)lt=He[0],mt=He[1];else{lt=[],mt=[];for(var me=0;me<He.length;++me)lt[me]=He[me][0],mt[me]=He[me][1]}var Vt=[1/0,1/0,1/0],st=[-1/0,-1/0,-1/0],ct=we.glyph,Qt=we.color,Ht=we.size,nr=we.angle,tt=we.lineColor,je=-1,Ue=0,Ae=0,rt=0;if(Pe.length){rt=Pe.length;e:for(var me=0;me<rt;++me){for(var St=Pe[me],Tt=0;Tt<3;++Tt)if(isNaN(St[Tt])||!isFinite(St[Tt]))continue e;var dt=Se(ct,me,ce,this.pixelRatio),Et=dt.mesh,pt=dt.lines,Xt=dt.bounds;Ue+=Et.cells.length*3,Ae+=pt.edges.length*2}}var or=Ue+Ae,_r=c.mallocFloat(3*or),Er=c.mallocFloat(4*or),ei=c.mallocFloat(2*or),qr=c.mallocUint32(or);if(or>0){var jr=0,gt=Ue,Ge=[0,0,0,1],Je=[0,0,0,1],We=M(Qt)&&M(Qt[0]),et=M(tt)&&M(tt[0]);e:for(var me=0;me<rt;++me){je+=1;for(var St=Pe[me],Tt=0;Tt<3;++Tt){if(isNaN(St[Tt])||!isFinite(St[Tt]))continue e;st[Tt]=Math.max(st[Tt],St[Tt]),Vt[Tt]=Math.min(Vt[Tt],St[Tt])}var dt=Se(ct,me,ce,this.pixelRatio),Et=dt.mesh,pt=dt.lines,Xt=dt.bounds,xt=dt.visible;if(!xt)Ge=[1,1,1,0];else if(M(Qt)){var At;if(We?me<Qt.length?At=Qt[me]:At=[0,0,0,0]:At=Qt,At.length===3){for(var Tt=0;Tt<3;++Tt)Ge[Tt]=At[Tt];Ge[3]=1}else if(At.length===4){for(var Tt=0;Tt<4;++Tt)Ge[Tt]=At[Tt];!this.hasAlpha&&At[3]<1&&(this.hasAlpha=!0)}}else Ge[0]=Ge[1]=Ge[2]=0,Ge[3]=1;if(!xt)Je=[1,1,1,0];else if(M(tt)){var At;if(et?me<tt.length?At=tt[me]:At=[0,0,0,0]:At=tt,At.length===3){for(var Tt=0;Tt<3;++Tt)Je[Tt]=At[Tt];Je[Tt]=1}else if(At.length===4){for(var Tt=0;Tt<4;++Tt)Je[Tt]=At[Tt];!this.hasAlpha&&At[3]<1&&(this.hasAlpha=!0)}}else Je[0]=Je[1]=Je[2]=0,Je[3]=1;var Kt=.5;xt?M(Ht)?me<Ht.length?Kt=+Ht[me]:Kt=12:Ht?Kt=+Ht:this.useOrtho&&(Kt=12):Kt=0;var er=0;M(nr)?me<nr.length?er=+nr[me]:er=0:nr&&(er=+nr);for(var Sr=Math.cos(er),Gr=Math.sin(er),St=Pe[me],Tt=0;Tt<3;++Tt)st[Tt]=Math.max(st[Tt],St[Tt]),Vt[Tt]=Math.min(Vt[Tt],St[Tt]);var Ir=lt,Yr=mt,Ir=0;M(lt)?me<lt.length?Ir=lt[me]:Ir=0:lt&&(Ir=lt);var Yr=0;M(mt)?me<mt.length?Yr=mt[me]:Yr=0:mt&&(Yr=mt),Ir*=Ir>0?1-Xt[0][0]:Ir<0?1+Xt[1][0]:1,Yr*=Yr>0?1-Xt[0][1]:Yr<0?1+Xt[1][1]:1;for(var _i=[Ir,Yr],Fn=Et.cells||[],An=Et.positions||[],Tt=0;Tt<Fn.length;++Tt)for(var Pi=Fn[Tt],ai=0;ai<3;++ai){for(var mi=0;mi<3;++mi)_r[3*jr+mi]=St[mi];for(var mi=0;mi<4;++mi)Er[4*jr+mi]=Ge[mi];qr[jr]=je;var un=An[Pi[ai]];ei[2*jr]=Kt*(Sr*un[0]-Gr*un[1]+_i[0]),ei[2*jr+1]=Kt*(Gr*un[0]+Sr*un[1]+_i[1]),jr+=1}for(var Fn=pt.edges,An=pt.positions,Tt=0;Tt<Fn.length;++Tt)for(var Pi=Fn[Tt],ai=0;ai<2;++ai){for(var mi=0;mi<3;++mi)_r[3*gt+mi]=St[mi];for(var mi=0;mi<4;++mi)Er[4*gt+mi]=Je[mi];qr[gt]=je;var un=An[Pi[ai]];ei[2*gt]=Kt*(Sr*un[0]-Gr*un[1]+_i[0]),ei[2*gt+1]=Kt*(Gr*un[0]+Sr*un[1]+_i[1]),gt+=1}}}this.bounds=[Vt,st],this.points=Pe,this.pointCount=Pe.length,this.vertexCount=Ue,this.lineVertexCount=Ae,this.pointBuffer.update(_r),this.colorBuffer.update(Er),this.glyphBuffer.update(ei),this.idBuffer.update(qr),c.free(_r),c.free(Er),c.free(ei),c.free(qr)},g.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()};function Ee(we){var De=we.gl,Le=h.createPerspective(De),me=h.createOrtho(De),Pe=h.createProject(De),ce=h.createPickPerspective(De),He=h.createPickOrtho(De),lt=h.createPickProject(De),mt=l(De),Vt=l(De),st=l(De),ct=l(De),Qt=u(De,[{buffer:mt,size:3,type:De.FLOAT},{buffer:Vt,size:4,type:De.FLOAT},{buffer:st,size:2,type:De.FLOAT},{buffer:ct,size:4,type:De.UNSIGNED_BYTE,normalized:!0}]),Ht=new S(De,Le,me,Pe,mt,Vt,st,ct,Qt,ce,He,lt);return Ht.update(we),Ht}},3589:function(i,a,o){"use strict";i.exports=m;var s=o(2260),l=o(1888),u=o(9618),c=o(8828).nextPow2,f=function(b,p,k){for(var M=1e8,T=-1,L=-1,x=b.shape[0],C=b.shape[1],S=0;S<x;S++)for(var g=0;g<C;g++){var P=b.get(S,g,0),E=b.get(S,g,1),z=b.get(S,g,2),q=b.get(S,g,3);if(P<255||E<255||z<255||q<255){var U=p-S,G=k-g,Z=U*U+G*G;Z<M&&(M=Z,T=S,L=g)}}return[T,L,M]};function h(b,p,k,M,T){this.coord=[b,p],this.id=k,this.value=M,this.distance=T}function d(b,p,k){this.gl=b,this.fbo=p,this.buffer=k,this._readTimeout=null;var M=this;this._readCallback=function(){M.gl&&(p.bind(),b.readPixels(0,0,p.shape[0],p.shape[1],b.RGBA,b.UNSIGNED_BYTE,M.buffer),M._readTimeout=null)}}var v=d.prototype;Object.defineProperty(v,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(b){if(this.gl){this.fbo.shape=b;var p=this.fbo.shape[0],k=this.fbo.shape[1];if(k*p*4>this.buffer.length){l.free(this.buffer);for(var M=this.buffer=l.mallocUint8(c(k*p*4)),T=0;T<k*p*4;++T)M[T]=255}return b}}}),v.begin=function(){var b=this.gl,p=this.shape;b&&(this.fbo.bind(),b.clearColor(1,1,1,1),b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT))},v.end=function(){var b=this.gl;b&&(b.bindFramebuffer(b.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},v.query=function(b,p,k){if(!this.gl)return null;var M=this.fbo.shape.slice();b=b|0,p=p|0,typeof k!="number"&&(k=1);var T=Math.min(Math.max(b-k,0),M[0])|0,L=Math.min(Math.max(b+k,0),M[0])|0,x=Math.min(Math.max(p-k,0),M[1])|0,C=Math.min(Math.max(p+k,0),M[1])|0;if(L<=T||C<=x)return null;var S=[L-T,C-x],g=u(this.buffer,[S[0],S[1],4],[4,M[0]*4,1],4*(T+M[0]*x)),P=f(g.hi(S[0],S[1],1),k,k),E=P[0],z=P[1];if(E<0||Math.pow(this.radius,2)<P[2])return null;var q=g.get(E,z,0),U=g.get(E,z,1),G=g.get(E,z,2),Z=g.get(E,z,3);return new h(E+T|0,z+x|0,q,[U,G,Z],Math.sqrt(P[2]))},v.dispose=function(){this.gl&&(this.fbo.dispose(),l.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function m(b,p){var k=p[0],M=p[1],T={},L=s(b,k,M,T),x=l.mallocUint8(k*M*4);return new d(b,L,x)}},9405:function(i,a,o){"use strict";var s=o(3327),l=o(8731),u=o(216),c=o(5091),f=o(2145),h=o(8866);function d(p){this.gl=p,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var v=d.prototype;v.bind=function(){this.program||this._relink();var p,k=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),M=this.gl.lastAttribCount;if(k>M)for(p=M;p<k;p++)this.gl.enableVertexAttribArray(p);else if(M>k)for(p=k;p<M;p++)this.gl.disableVertexAttribArray(p);this.gl.lastAttribCount=k,this.gl.useProgram(this.program)},v.dispose=function(){for(var p=this.gl.lastAttribCount,k=0;k<p;k++)this.gl.disableVertexAttribArray(k);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null};function m(p,k){return p.name<k.name?-1:1}v.update=function(p,k,M,T){if(!k||arguments.length===1){var L=p;p=L.vertex,k=L.fragment,M=L.uniforms,T=L.attributes}var x=this,C=x.gl,S=x._vref;x._vref=c.shader(C,C.VERTEX_SHADER,p),S&&S.dispose(),x.vertShader=x._vref.shader;var g=this._fref;if(x._fref=c.shader(C,C.FRAGMENT_SHADER,k),g&&g.dispose(),x.fragShader=x._fref.shader,!M||!T){var P=C.createProgram();if(C.attachShader(P,x.fragShader),C.attachShader(P,x.vertShader),C.linkProgram(P),!C.getProgramParameter(P,C.LINK_STATUS)){var E=C.getProgramInfoLog(P);throw new h(E,"Error linking program:"+E)}M=M||f.uniforms(C,P),T=T||f.attributes(C,P),C.deleteProgram(P)}T=T.slice(),T.sort(m);var z=[],q=[],U=[],G;for(G=0;G<T.length;++G){var Z=T[G];if(Z.type.indexOf("mat")>=0){for(var j=Z.type.charAt(Z.type.length-1)|0,N=new Array(j),H=0;H<j;++H)N[H]=U.length,q.push(Z.name+"["+H+"]"),typeof Z.location=="number"?U.push(Z.location+H):Array.isArray(Z.location)&&Z.location.length===j&&typeof Z.location[H]=="number"?U.push(Z.location[H]|0):U.push(-1);z.push({name:Z.name,type:Z.type,locations:N})}else z.push({name:Z.name,type:Z.type,locations:[U.length]}),q.push(Z.name),typeof Z.location=="number"?U.push(Z.location|0):U.push(-1)}var re=0;for(G=0;G<U.length;++G)if(U[G]<0){for(;U.indexOf(re)>=0;)re+=1;U[G]=re}var oe=new Array(M.length);function _e(){x.program=c.program(C,x._vref,x._fref,q,U);for(var ke=0;ke<M.length;++ke)oe[ke]=C.getUniformLocation(x.program,M[ke].name)}_e(),x._relink=_e,x.types={uniforms:u(M),attributes:u(T)},x.attributes=l(C,x,z,U),Object.defineProperty(x,"uniforms",s(C,x,M,oe))};function b(p,k,M,T,L){var x=new d(p);return x.update(k,M,T,L),x}i.exports=b},8866:function(i){function a(o,s,l){this.shortMessage=s||"",this.longMessage=l||"",this.rawError=o||"",this.message="gl-shader: "+(s||o||"")+(l?`
|
||
`+l:""),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 l(v,m,b,p,k,M){this._gl=v,this._wrapper=m,this._index=b,this._locations=p,this._dimension=k,this._constFunc=M}var u=l.prototype;u.pointer=function(m,b,p,k){var M=this,T=M._gl,L=M._locations[M._index];T.vertexAttribPointer(L,M._dimension,m||T.FLOAT,!!b,p||0,k||0),T.enableVertexAttribArray(L)},u.set=function(v,m,b,p){return this._constFunc(this._locations[this._index],v,m,b,p)},Object.defineProperty(u,"location",{get:function(){return this._locations[this._index]},set:function(v){return v!==this._locations[this._index]&&(this._locations[this._index]=v|0,this._wrapper.program=null),v|0}});var c=[function(v,m,b){return b.length===void 0?v.vertexAttrib1f(m,b):v.vertexAttrib1fv(m,b)},function(v,m,b,p){return b.length===void 0?v.vertexAttrib2f(m,b,p):v.vertexAttrib2fv(m,b)},function(v,m,b,p,k){return b.length===void 0?v.vertexAttrib3f(m,b,p,k):v.vertexAttrib3fv(m,b)},function(v,m,b,p,k,M){return b.length===void 0?v.vertexAttrib4f(m,b,p,k,M):v.vertexAttrib4fv(m,b)}];function f(v,m,b,p,k,M,T){var L=c[k],x=new l(v,m,b,p,k,L);Object.defineProperty(M,T,{set:function(C){return v.disableVertexAttribArray(p[b]),L(v,p[b],C),C},get:function(){return x},enumerable:!0})}function h(v,m,b,p,k,M,T){for(var L=new Array(k),x=new Array(k),C=0;C<k;++C)f(v,m,b[C],p,k,L,C),x[C]=L[C];Object.defineProperty(L,"location",{set:function(P){if(Array.isArray(P))for(var E=0;E<k;++E)x[E].location=P[E];else for(var E=0;E<k;++E)x[E].location=P+E;return P},get:function(){for(var P=new Array(k),E=0;E<k;++E)P[E]=p[b[E]];return P},enumerable:!0}),L.pointer=function(P,E,z,q){P=P||v.FLOAT,E=!!E,z=z||k*k,q=q||0;for(var U=0;U<k;++U){var G=p[b[U]];v.vertexAttribPointer(G,k,P,E,z,q+U*k),v.enableVertexAttribArray(G)}};var S=new Array(k),g=v["vertexAttrib"+k+"fv"];Object.defineProperty(M,T,{set:function(P){for(var E=0;E<k;++E){var z=p[b[E]];if(v.disableVertexAttribArray(z),Array.isArray(P[0]))g.call(v,z,P[E]);else{for(var q=0;q<k;++q)S[q]=P[k*E+q];g.call(v,z,S)}}return P},get:function(){return L},enumerable:!0})}function d(v,m,b,p){for(var k={},M=0,T=b.length;M<T;++M){var L=b[M],x=L.name,C=L.type,S=L.locations;switch(C){case"bool":case"int":case"float":f(v,m,S[0],p,1,k,x);break;default:if(C.indexOf("vec")>=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s("","Invalid data type for attribute "+x+": "+C);f(v,m,S[0],p,g,k,x)}else if(C.indexOf("mat")>=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s("","Invalid data type for attribute "+x+": "+C);h(v,m,S,p,g,k,x)}else throw new s("","Unknown data type for attribute "+x+": "+C);break}}return k}},3327:function(i,a,o){"use strict";var s=o(216),l=o(8866);i.exports=f;function u(h){return function(){return h}}function c(h,d){for(var v=new Array(h),m=0;m<h;++m)v[m]=d;return v}function f(h,d,v,m){function b(C){return function(S,g,P){return S.getUniform(g.program,P[C])}}function p(C){return function(g){for(var P=k("",C),E=0;E<P.length;++E){var z=P[E],q=z[0],U=z[1];if(m[U]){var G=g;if(typeof q=="string"&&(q.indexOf(".")===0||q.indexOf("[")===0)){var Z=q;if(q.indexOf(".")===0&&(Z=q.slice(1)),Z.indexOf("]")===Z.length-1){var j=Z.indexOf("["),N=Z.slice(0,j),H=Z.slice(j+1,Z.length-1);G=N?g[N][H]:g[H]}else G=g[Z]}var re=v[U].type,oe;switch(re){case"bool":case"int":case"sampler2D":case"samplerCube":h.uniform1i(m[U],G);break;case"float":h.uniform1f(m[U],G);break;default:var _e=re.indexOf("vec");if(0<=_e&&_e<=1&&re.length===4+_e){if(oe=re.charCodeAt(re.length-1)-48,oe<2||oe>4)throw new l("","Invalid data type");switch(re.charAt(0)){case"b":case"i":h["uniform"+oe+"iv"](m[U],G);break;case"v":h["uniform"+oe+"fv"](m[U],G);break;default:throw new l("","Unrecognized data type for vector "+name+": "+re)}}else if(re.indexOf("mat")===0&&re.length===4){if(oe=re.charCodeAt(re.length-1)-48,oe<2||oe>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+re);h["uniformMatrix"+oe+"fv"](m[U],!1,G);break}else throw new l("","Unknown uniform data type for "+name+": "+re)}}}}}function k(C,S){if(typeof S!="object")return[[C,S]];var g=[];for(var P in S){var E=S[P],z=C;parseInt(P)+""===P?z+="["+P+"]":z+="."+P,typeof E=="object"?g.push.apply(g,k(z,E)):g.push([z,E])}return g}function M(C){switch(C){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var S=C.indexOf("vec");if(0<=S&&S<=1&&C.length===4+S){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l("","Invalid data type");return C.charAt(0)==="b"?c(g,!1):c(g,0)}else if(C.indexOf("mat")===0&&C.length===4){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+C);return c(g*g,0)}else throw new l("","Unknown uniform data type for "+name+": "+C)}}function T(C,S,g){if(typeof g=="object"){var P=L(g);Object.defineProperty(C,S,{get:u(P),set:p(g),enumerable:!0,configurable:!1})}else m[g]?Object.defineProperty(C,S,{get:b(g),set:p(g),enumerable:!0,configurable:!1}):C[S]=M(v[g].type)}function L(C){var S;if(Array.isArray(C)){S=new Array(C.length);for(var g=0;g<C.length;++g)T(S,g,C[g])}else{S={};for(var P in C)T(S,P,C[P])}return S}var x=s(v,!0);return{get:u(L(x)),set:p(x),enumerable:!0,configurable:!0}}},216:function(i){"use strict";i.exports=a;function a(o,s){for(var l={},u=0;u<o.length;++u)for(var c=o[u].name,f=c.split("."),h=l,d=0;d<f.length;++d){var v=f[d].split("[");if(v.length>1){v[0]in h||(h[v[0]]=[]),h=h[v[0]];for(var m=1;m<v.length;++m){var b=parseInt(v[m]);m<v.length-1||d<f.length-1?(b in h||(m<v.length-1?h[b]=[]:h[b]={}),h=h[b]):s?h[b]=u:h[b]=o[u].type}}else d<f.length-1?(v[0]in h||(h[v[0]]={}),h=h[v[0]]):s?h[v[0]]=u:h[v[0]]=o[u].type}return l}},2145:function(i,a){"use strict";a.uniforms=u,a.attributes=c;var o={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},s=null;function l(f,h){if(!s){var d=Object.keys(o);s={};for(var v=0;v<d.length;++v){var m=d[v];s[f[m]]=o[m]}}return s[h]}function u(f,h){for(var d=f.getProgramParameter(h,f.ACTIVE_UNIFORMS),v=[],m=0;m<d;++m){var b=f.getActiveUniform(h,m);if(b){var p=l(f,b.type);if(b.size>1)for(var k=0;k<b.size;++k)v.push({name:b.name.replace("[0]","["+k+"]"),type:p});else v.push({name:b.name,type:p})}}return v}function c(f,h){for(var d=f.getProgramParameter(h,f.ACTIVE_ATTRIBUTES),v=[],m=0;m<d;++m){var b=f.getActiveAttrib(h,m);b&&v.push({name:b.name,type:l(f,b.type)})}return v}},5091:function(i,a,o){"use strict";a.shader=k,a.program=M;var s=o(8866),l=o(2992),u=typeof WeakMap=="undefined"?o(606):WeakMap,c=new u,f=0;function h(T,L,x,C,S,g,P){this.id=T,this.src=L,this.type=x,this.shader=C,this.count=g,this.programs=[],this.cache=P}h.prototype.dispose=function(){if(--this.count===0){for(var T=this.cache,L=T.gl,x=this.programs,C=0,S=x.length;C<S;++C){var g=T.programs[x[C]];g&&(delete T.programs[C],L.deleteProgram(g))}L.deleteShader(this.shader),delete T.shaders[this.type===L.FRAGMENT_SHADER|0][this.src]}};function d(T){this.gl=T,this.shaders=[{},{}],this.programs={}}var v=d.prototype;function m(T,L,x){var C=T.createShader(L);if(T.shaderSource(C,x),T.compileShader(C),!T.getShaderParameter(C,T.COMPILE_STATUS)){var S=T.getShaderInfoLog(C);try{var g=l(S,x,L)}catch(P){throw console.warn("Failed to format compiler error: "+P),new s(S,`Error compiling shader:
|
||
`+S)}throw new s(S,g.short,g.long)}return C}v.getShaderReference=function(T,L){var x=this.gl,C=this.shaders[T===x.FRAGMENT_SHADER|0],S=C[L];if(!S||!x.isShader(S.shader)){var g=m(x,T,L);S=C[L]=new h(f++,L,T,g,[],1,this)}else S.count+=1;return S};function b(T,L,x,C,S){var g=T.createProgram();T.attachShader(g,L),T.attachShader(g,x);for(var P=0;P<C.length;++P)T.bindAttribLocation(g,S[P],C[P]);if(T.linkProgram(g),!T.getProgramParameter(g,T.LINK_STATUS)){var E=T.getProgramInfoLog(g);throw new s(E,"Error linking program: "+E)}return g}v.getProgram=function(T,L,x,C){var S=[T.id,L.id,x.join(":"),C.join(":")].join("@"),g=this.programs[S];return(!g||!this.gl.isProgram(g))&&(this.programs[S]=g=b(this.gl,T.shader,L.shader,x,C),T.programs.push(S),L.programs.push(S)),g};function p(T){var L=c.get(T);return L||(L=new d(T),c.set(T,L)),L}function k(T,L,x){return p(T).getShaderReference(L,x)}function M(T,L,x,C,S){return p(T).getProgram(L,x,C,S)}},1493:function(i,a,o){"use strict";var s=o(3236),l=o(9405),u=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];
|
||
}
|
||
`]),c=s([`precision mediump float;
|
||
#define GLSLIFY 1
|
||
|
||
varying vec4 fragColor;
|
||
|
||
void main() {
|
||
gl_FragColor = fragColor;
|
||
}`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},4449:function(i,a,o){"use strict";var s=o(2762),l=o(8116),u=o(1493);i.exports=b;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,k,M,T){this.gl=p,this.buffer=k,this.vao=M,this.shader=T,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var h=f.prototype,d=[0,0,0],v=[0,0,0],m=[0,0];h.isTransparent=function(){return!1},h.drawTransparent=function(p){},h.draw=function(p){var k=this.gl,M=this.vao,T=this.shader;M.bind(),T.bind();var L=p.model||c,x=p.view||c,C=p.projection||c,S;this.axes&&(S=this.axes.lastCubeProps.axis);for(var g=d,P=v,E=0;E<3;++E)S&&S[E]<0?(g[E]=this.bounds[0][E],P[E]=this.bounds[1][E]):(g[E]=this.bounds[1][E],P[E]=this.bounds[0][E]);m[0]=k.drawingBufferWidth,m[1]=k.drawingBufferHeight,T.uniforms.model=L,T.uniforms.view=x,T.uniforms.projection=C,T.uniforms.coordinates=[this.position,g,P],T.uniforms.colors=this.colors,T.uniforms.screenShape=m;for(var E=0;E<3;++E)T.uniforms.lineWidth=this.lineWidth[E]*this.pixelRatio,this.enabled[E]&&(M.draw(k.TRIANGLES,6,6*E),this.drawSides[E]&&M.draw(k.TRIANGLES,12,18+12*E));M.unbind()},h.update=function(p){p&&("bounds"in p&&(this.bounds=p.bounds),"position"in p&&(this.position=p.position),"lineWidth"in p&&(this.lineWidth=p.lineWidth),"colors"in p&&(this.colors=p.colors),"enabled"in p&&(this.enabled=p.enabled),"drawSides"in p&&(this.drawSides=p.drawSides))},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function b(p,k){var M=[];function T(g,P,E,z,q,U){var G=[g,P,E,0,0,0,1];G[z+3]=1,G[z]=q,M.push.apply(M,G),G[6]=-1,M.push.apply(M,G),G[z]=U,M.push.apply(M,G),M.push.apply(M,G),G[6]=1,M.push.apply(M,G),G[z]=q,M.push.apply(M,G)}T(0,0,0,0,0,1),T(0,0,0,1,0,1),T(0,0,0,2,0,1),T(1,0,0,1,-1,1),T(1,0,0,2,-1,1),T(0,1,0,0,-1,1),T(0,1,0,2,-1,1),T(0,0,1,0,-1,1),T(0,0,1,1,-1,1);var L=s(p,M),x=l(p,[{type:p.FLOAT,buffer:L,size:3,offset:0,stride:28},{type:p.FLOAT,buffer:L,size:3,offset:12,stride:28},{type:p.FLOAT,buffer:L,size:1,offset:24,stride:28}]),C=u(p);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.weight.location=2;var S=new f(p,L,x,C);return S.update(k),S}},6740:function(i,a,o){var s=o(3236),l=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;
|
||
}
|
||
`]),u=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;
|
||
}
|
||
`]),c=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;
|
||
}
|
||
`]),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 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:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(i,a,o){"use strict";var s=o(2931),l=o(9970),u=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(T,L,x,C){for(var S=T.points,g=T.velocities,P=T.divergences,E=[],z=[],q=[],U=[],G=[],Z=[],j=0,N=0,H=l.create(),re=l.create(),oe=8,_e=0;_e<S.length;_e++){var ke=S[_e],Ce=g[_e],ge=P[_e];L===0&&(ge=x*.05),N=s.length(Ce)/C,H=l.create(),s.copy(H,Ce),H[3]=ge;for(var ie=0;ie<oe;ie++)G[ie]=[ke[0],ke[1],ke[2],ie];if(U.length>0)for(var ie=0;ie<oe;ie++){var Se=(ie+1)%oe;E.push(U[ie],G[ie],G[Se],G[Se],U[Se],U[ie]),q.push(re,H,H,H,re,re),Z.push(j,N,N,N,j,j);var Ee=E.length;z.push([Ee-6,Ee-5,Ee-4],[Ee-3,Ee-2,Ee-1])}var we=U;U=G,G=we;var De=re;re=H,H=De;var Le=j;j=N,N=Le}return{positions:E,cells:z,vectors:q,vertexIntensity:Z}},f=function(T,L,x,C){for(var S=0,g=0;g<T.length;g++)for(var P=T[g].velocities,E=0;E<P.length;E++)S=Math.max(S,s.length(P[E]));for(var z=T.map(function(_e){return c(_e,x,C,S)}),q=[],U=[],G=[],Z=[],g=0;g<z.length;g++){var j=z[g],N=q.length;q=q.concat(j.positions),G=G.concat(j.vectors),Z=Z.concat(j.vertexIntensity);for(var E=0;E<j.cells.length;E++){var H=j.cells[E],re=[];U.push(re);for(var oe=0;oe<H.length;oe++)re.push(H[oe]+N)}}return{positions:q,cells:U,vectors:G,vertexIntensity:Z,colormap:L}},h=function(T,L){var x=T.length,C;for(C=0;C<x;C++){var S=T[C];if(S===L)return C;if(S>L)return C-1}return C},d=function(T,L,x){return T<L?L:T>x?x:T},v=function(T,L,x){var C=L.vectors,S=L.meshgrid,g=T[0],P=T[1],E=T[2],z=S[0].length,q=S[1].length,U=S[2].length,G=h(S[0],g),Z=h(S[1],P),j=h(S[2],E),N=G+1,H=Z+1,re=j+1;if(G=d(G,0,z-1),N=d(N,0,z-1),Z=d(Z,0,q-1),H=d(H,0,q-1),j=d(j,0,U-1),re=d(re,0,U-1),G<0||Z<0||j<0||N>z-1||H>q-1||re>U-1)return s.create();var oe=S[0][G],_e=S[0][N],ke=S[1][Z],Ce=S[1][H],ge=S[2][j],ie=S[2][re],Se=(g-oe)/(_e-oe),Ee=(P-ke)/(Ce-ke),we=(E-ge)/(ie-ge);isFinite(Se)||(Se=.5),isFinite(Ee)||(Ee=.5),isFinite(we)||(we=.5);var De,Le,me,Pe,ce,He;switch(x.reversedX&&(G=z-1-G,N=z-1-N),x.reversedY&&(Z=q-1-Z,H=q-1-H),x.reversedZ&&(j=U-1-j,re=U-1-re),x.filled){case 5:ce=j,He=re,me=Z*U,Pe=H*U,De=G*U*q,Le=N*U*q;break;case 4:ce=j,He=re,De=G*U,Le=N*U,me=Z*U*z,Pe=H*U*z;break;case 3:me=Z,Pe=H,ce=j*q,He=re*q,De=G*q*U,Le=N*q*U;break;case 2:me=Z,Pe=H,De=G*q,Le=N*q,ce=j*q*z,He=re*q*z;break;case 1:De=G,Le=N,ce=j*z,He=re*z,me=Z*z*U,Pe=H*z*U;break;default:De=G,Le=N,me=Z*z,Pe=H*z,ce=j*z*q,He=re*z*q;break}var lt=C[De+me+ce],mt=C[De+me+He],Vt=C[De+Pe+ce],st=C[De+Pe+He],ct=C[Le+me+ce],Qt=C[Le+me+He],Ht=C[Le+Pe+ce],nr=C[Le+Pe+He],tt=s.create(),je=s.create(),Ue=s.create(),Ae=s.create();s.lerp(tt,lt,ct,Se),s.lerp(je,mt,Qt,Se),s.lerp(Ue,Vt,Ht,Se),s.lerp(Ae,st,nr,Se);var rt=s.create(),St=s.create();s.lerp(rt,tt,Ue,Ee),s.lerp(St,je,Ae,Ee);var Tt=s.create();return s.lerp(Tt,rt,St,we),Tt},m=function(T,L){var x=L[0],C=L[1],S=L[2];return T[0]=x<0?-x:x,T[1]=C<0?-C:C,T[2]=S<0?-S:S,T},b=function(T){var L=1/0;T.sort(function(g,P){return g-P});for(var x=T.length,C=1;C<x;C++){var S=Math.abs(T[C]-T[C-1]);S<L&&(L=S)}return L},p=function(T){for(var L=[],x=[],C=[],S={},g={},P={},E=T.length,z=0;z<E;z++){var q=T[z],U=q[0],G=q[1],Z=q[2];S[U]||(L.push(U),S[U]=!0),g[G]||(x.push(G),g[G]=!0),P[Z]||(C.push(Z),P[Z]=!0)}var j=b(L),N=b(x),H=b(C),re=Math.min(j,N,H);return isFinite(re)?re:1};i.exports=function(T,L){var x=T.startingPositions,C=T.maxLength||1e3,S=T.tubeSize||1,g=T.absoluteTubeSize,P=T.gridFill||"+x+y+z",E={};P.indexOf("-x")!==-1&&(E.reversedX=!0),P.indexOf("-y")!==-1&&(E.reversedY=!0),P.indexOf("-z")!==-1&&(E.reversedZ=!0),E.filled=u.indexOf(P.replace(/-/g,"").replace(/\+/g,""));var z=T.getVelocity||function(Qt){return v(Qt,T,E)},q=T.getDivergence||function(Qt,Ht){var nr=s.create(),tt=1e-4;s.add(nr,Qt,[tt,0,0]);var je=z(nr);s.subtract(je,je,Ht),s.scale(je,je,1/tt),s.add(nr,Qt,[0,tt,0]);var Ue=z(nr);s.subtract(Ue,Ue,Ht),s.scale(Ue,Ue,1/tt),s.add(nr,Qt,[0,0,tt]);var Ae=z(nr);return s.subtract(Ae,Ae,Ht),s.scale(Ae,Ae,1/tt),s.add(nr,je,Ue),s.add(nr,nr,Ae),nr},U=[],G=L[0][0],Z=L[0][1],j=L[0][2],N=L[1][0],H=L[1][1],re=L[1][2],oe=function(Qt){var Ht=Qt[0],nr=Qt[1],tt=Qt[2];return!(Ht<G||Ht>N||nr<Z||nr>H||tt<j||tt>re)},_e=s.distance(L[0],L[1]),ke=10*_e/C,Ce=ke*ke,ge=1,ie=0,Se=x.length;Se>1&&(ge=p(x));for(var Ee=0;Ee<Se;Ee++){var we=s.create();s.copy(we,x[Ee]);var De=[we],Le=[],me=z(we),Pe=we;Le.push(me);var ce=[],He=q(we,me),lt=s.length(He);isFinite(lt)&<>ie&&(ie=lt),ce.push(lt),U.push({points:De,velocities:Le,divergences:ce});for(var mt=0;mt<C*100&&De.length<C&&oe(we);){mt++;var Vt=s.clone(me),st=s.squaredLength(Vt);if(st===0)break;if(st>Ce&&s.scale(Vt,Vt,ke/Math.sqrt(st)),s.add(Vt,Vt,we),me=z(Vt),s.squaredDistance(Pe,Vt)-Ce>-1e-4*Ce){De.push(Vt),Pe=Vt,Le.push(me);var He=q(Vt,me),lt=s.length(He);isFinite(lt)&<>ie&&(ie=lt),ce.push(lt)}we=Vt}}var ct=f(U,T.colormap,ie,ge);return g?ct.tubeScale=g:(ie===0&&(ie=1),ct.tubeScale=S*.5*ge/ie),ct};var k=o(6740),M=o(6405).createMesh;i.exports.createTubeMesh=function(T,L){return M(T,L,{shaders:k,traceType:"streamtube"})}},990:function(i,a,o){var s=o(9405),l=o(3236),u=l([`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);
|
||
}
|
||
`]),c=l([`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;
|
||
}
|
||
`]),f=l([`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=l([`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 v=s(d,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createPickShader=function(d){var v=s(d,u,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createContourShader=function(d){var v=s(d,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v},a.createPickContourShader=function(d){var v=s(d,f,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v}},9499:function(i,a,o){"use strict";i.exports=De;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),h=o(6729),d=o(5298),v=o(9994),m=o(9618),b=o(3711),p=o(6760),k=o(7608),M=o(2478),T=o(6199),L=o(990),x=L.createShader,C=L.createContourShader,S=L.createPickShader,g=L.createPickContourShader,P=4*10,E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],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 Le=0;Le<3;++Le){var me=q[Le],Pe=(Le+1)%3,ce=(Le+2)%3;me[Pe+0]=1,me[ce+3]=1,me[Le+6]=1}})();function U(Le,me,Pe,ce,He){this.position=Le,this.index=me,this.uv=Pe,this.level=ce,this.dataCoordinate=He}var G=256;function Z(Le,me,Pe,ce,He,lt,mt,Vt,st,ct,Qt,Ht,nr,tt,je){this.gl=Le,this.shape=me,this.bounds=Pe,this.objectOffset=je,this.intensityBounds=[],this._shader=ce,this._pickShader=He,this._coordinateBuffer=lt,this._vao=mt,this._colorMap=Vt,this._contourShader=st,this._contourPickShader=ct,this._contourBuffer=Qt,this._contourVAO=Ht,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=nr,this._dynamicVAO=tt,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=[m(f.mallocFloat(1024),[0,0]),m(f.mallocFloat(1024),[0,0]),m(f.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var j=Z.prototype;j.genColormap=function(Le,me){var Pe=!1,ce=v([h({colormap:Le,nshades:G,format:"rgba"}).map(function(He,lt){var mt=me?N(lt/255,me):He[3];return mt<1&&(Pe=!0),[He[0],He[1],He[2],255*mt]})]);return d.divseq(ce,255),this.hasAlphaScale=Pe,ce},j.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},j.isOpaque=function(){return!this.isTransparent()},j.pickSlots=1,j.setPickBase=function(Le){this.pickId=Le};function N(Le,me){if(!me||!me.length)return 1;for(var Pe=0;Pe<me.length;++Pe){if(me.length<2)return 1;if(me[Pe][0]===Le)return me[Pe][1];if(me[Pe][0]>Le&&Pe>0){var ce=(me[Pe][0]-Le)/(me[Pe][0]-me[Pe-1][0]);return me[Pe][1]*(1-ce)+ce*me[Pe-1][1]}}return 1}var H=[0,0,0],re={showSurface:!1,showContour:!1,projections:[E.slice(),E.slice(),E.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function oe(Le,me){var Pe,ce,He,lt=me.axes&&me.axes.lastCubeProps.axis||H,mt=me.showSurface,Vt=me.showContour;for(Pe=0;Pe<3;++Pe)for(mt=mt||me.surfaceProject[Pe],ce=0;ce<3;++ce)Vt=Vt||me.contourProject[Pe][ce];for(Pe=0;Pe<3;++Pe){var st=re.projections[Pe];for(ce=0;ce<16;++ce)st[ce]=0;for(ce=0;ce<4;++ce)st[5*ce]=1;st[5*Pe]=0,st[12+Pe]=me.axesBounds[+(lt[Pe]>0)][Pe],p(st,Le.model,st);var ct=re.clipBounds[Pe];for(He=0;He<2;++He)for(ce=0;ce<3;++ce)ct[He][ce]=Le.clipBounds[He][ce];ct[0][Pe]=-1e8,ct[1][Pe]=1e8}return re.showSurface=mt,re.showContour=Vt,re}var _e={model:E,view:E,projection:E,inverseModel:E.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},ke=E.slice(),Ce=[1,0,0,0,1,0,0,0,1];function ge(Le,me){Le=Le||{};var Pe=this.gl;Pe.disable(Pe.CULL_FACE),this._colorMap.bind(0);var ce=_e;ce.model=Le.model||E,ce.view=Le.view||E,ce.projection=Le.projection||E,ce.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ce.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ce.objectOffset=this.objectOffset,ce.contourColor=this.contourColor[0],ce.inverseModel=k(ce.inverseModel,ce.model);for(var He=0;He<2;++He)for(var lt=ce.clipBounds[He],mt=0;mt<3;++mt)lt[mt]=Math.min(Math.max(this.clipBounds[He][mt],-1e8),1e8);ce.kambient=this.ambientLight,ce.kdiffuse=this.diffuseLight,ce.kspecular=this.specularLight,ce.roughness=this.roughness,ce.fresnel=this.fresnel,ce.opacity=this.opacity,ce.height=0,ce.permutation=Ce,ce.vertexColor=this.vertexColor;var Vt=ke;for(p(Vt,ce.view,ce.model),p(Vt,ce.projection,Vt),k(Vt,Vt),He=0;He<3;++He)ce.eyePosition[He]=Vt[12+He]/Vt[15];var st=Vt[15];for(He=0;He<3;++He)st+=this.lightPosition[He]*Vt[4*He+3];for(He=0;He<3;++He){var ct=Vt[12+He];for(mt=0;mt<3;++mt)ct+=Vt[4*mt+He]*this.lightPosition[mt];ce.lightPosition[He]=ct/st}var Qt=oe(ce,this);if(Qt.showSurface){for(this._shader.bind(),this._shader.uniforms=ce,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Pe.TRIANGLES,this._vertexCount),He=0;He<3;++He)!this.surfaceProject[He]||!this.vertexCount||(this._shader.uniforms.model=Qt.projections[He],this._shader.uniforms.clipBounds=Qt.clipBounds[He],this._vao.draw(Pe.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Qt.showContour){var Ht=this._contourShader;ce.kambient=1,ce.kdiffuse=0,ce.kspecular=0,ce.opacity=1,Ht.bind(),Ht.uniforms=ce;var nr=this._contourVAO;for(nr.bind(),He=0;He<3;++He)for(Ht.uniforms.permutation=q[He],Pe.lineWidth(this.contourWidth[He]*this.pixelRatio),mt=0;mt<this.contourLevels[He].length;++mt)mt===this.highlightLevel[He]?(Ht.uniforms.contourColor=this.highlightColor[He],Ht.uniforms.contourTint=this.highlightTint[He]):(mt===0||mt-1===this.highlightLevel[He])&&(Ht.uniforms.contourColor=this.contourColor[He],Ht.uniforms.contourTint=this.contourTint[He]),this._contourCounts[He][mt]&&(Ht.uniforms.height=this.contourLevels[He][mt],nr.draw(Pe.LINES,this._contourCounts[He][mt],this._contourOffsets[He][mt]));for(He=0;He<3;++He)for(Ht.uniforms.model=Qt.projections[He],Ht.uniforms.clipBounds=Qt.clipBounds[He],mt=0;mt<3;++mt)if(this.contourProject[He][mt]){Ht.uniforms.permutation=q[mt],Pe.lineWidth(this.contourWidth[mt]*this.pixelRatio);for(var tt=0;tt<this.contourLevels[mt].length;++tt)tt===this.highlightLevel[mt]?(Ht.uniforms.contourColor=this.highlightColor[mt],Ht.uniforms.contourTint=this.highlightTint[mt]):(tt===0||tt-1===this.highlightLevel[mt])&&(Ht.uniforms.contourColor=this.contourColor[mt],Ht.uniforms.contourTint=this.contourTint[mt]),this._contourCounts[mt][tt]&&(Ht.uniforms.height=this.contourLevels[mt][tt],nr.draw(Pe.LINES,this._contourCounts[mt][tt],this._contourOffsets[mt][tt]))}for(nr.unbind(),nr=this._dynamicVAO,nr.bind(),He=0;He<3;++He)if(this._dynamicCounts[He]!==0)for(Ht.uniforms.model=ce.model,Ht.uniforms.clipBounds=ce.clipBounds,Ht.uniforms.permutation=q[He],Pe.lineWidth(this.dynamicWidth[He]*this.pixelRatio),Ht.uniforms.contourColor=this.dynamicColor[He],Ht.uniforms.contourTint=this.dynamicTint[He],Ht.uniforms.height=this.dynamicLevel[He],nr.draw(Pe.LINES,this._dynamicCounts[He],this._dynamicOffsets[He]),mt=0;mt<3;++mt)this.contourProject[mt][He]&&(Ht.uniforms.model=Qt.projections[mt],Ht.uniforms.clipBounds=Qt.clipBounds[mt],nr.draw(Pe.LINES,this._dynamicCounts[He],this._dynamicOffsets[He]));nr.unbind()}}j.draw=function(Le){return ge.call(this,Le,!1)},j.drawTransparent=function(Le){return ge.call(this,Le,!0)};var ie={model:E,view:E,projection:E,inverseModel:E,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};j.drawPick=function(Le){Le=Le||{};var me=this.gl;me.disable(me.CULL_FACE);var Pe=ie;Pe.model=Le.model||E,Pe.view=Le.view||E,Pe.projection=Le.projection||E,Pe.shape=this._field[2].shape,Pe.pickId=this.pickId/255,Pe.lowerBound=this.bounds[0],Pe.upperBound=this.bounds[1],Pe.objectOffset=this.objectOffset,Pe.permutation=Ce;for(var ce=0;ce<2;++ce)for(var He=Pe.clipBounds[ce],lt=0;lt<3;++lt)He[lt]=Math.min(Math.max(this.clipBounds[ce][lt],-1e8),1e8);var mt=oe(Pe,this);if(mt.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=Pe,this._vao.bind(),this._vao.draw(me.TRIANGLES,this._vertexCount),ce=0;ce<3;++ce)this.surfaceProject[ce]&&(this._pickShader.uniforms.model=mt.projections[ce],this._pickShader.uniforms.clipBounds=mt.clipBounds[ce],this._vao.draw(me.TRIANGLES,this._vertexCount));this._vao.unbind()}if(mt.showContour){var Vt=this._contourPickShader;Vt.bind(),Vt.uniforms=Pe;var st=this._contourVAO;for(st.bind(),lt=0;lt<3;++lt)for(me.lineWidth(this.contourWidth[lt]*this.pixelRatio),Vt.uniforms.permutation=q[lt],ce=0;ce<this.contourLevels[lt].length;++ce)this._contourCounts[lt][ce]&&(Vt.uniforms.height=this.contourLevels[lt][ce],st.draw(me.LINES,this._contourCounts[lt][ce],this._contourOffsets[lt][ce]));for(ce=0;ce<3;++ce)for(Vt.uniforms.model=mt.projections[ce],Vt.uniforms.clipBounds=mt.clipBounds[ce],lt=0;lt<3;++lt)if(this.contourProject[ce][lt]){Vt.uniforms.permutation=q[lt],me.lineWidth(this.contourWidth[lt]*this.pixelRatio);for(var ct=0;ct<this.contourLevels[lt].length;++ct)this._contourCounts[lt][ct]&&(Vt.uniforms.height=this.contourLevels[lt][ct],st.draw(me.LINES,this._contourCounts[lt][ct],this._contourOffsets[lt][ct]))}st.unbind()}},j.pick=function(Le){if(!Le||Le.id!==this.pickId)return null;var me=this._field[2].shape,Pe=this._pickResult,ce=me[0]*(Le.value[0]+(Le.value[2]>>4)/16)/255,He=Math.floor(ce),lt=ce-He,mt=me[1]*(Le.value[1]+(Le.value[2]&15)/16)/255,Vt=Math.floor(mt),st=mt-Vt;He+=1,Vt+=1;var ct=Pe.position;ct[0]=ct[1]=ct[2]=0;for(var Qt=0;Qt<2;++Qt)for(var Ht=Qt?lt:1-lt,nr=0;nr<2;++nr)for(var tt=nr?st:1-st,je=He+Qt,Ue=Vt+nr,Ae=Ht*tt,rt=0;rt<3;++rt)ct[rt]+=this._field[rt].get(je,Ue)*Ae;for(var St=this._pickResult.level,Tt=0;Tt<3;++Tt)if(St[Tt]=M.le(this.contourLevels[Tt],ct[Tt]),St[Tt]<0)this.contourLevels[Tt].length>0&&(St[Tt]=0);else if(St[Tt]<this.contourLevels[Tt].length-1){var dt=this.contourLevels[Tt][St[Tt]],Et=this.contourLevels[Tt][St[Tt]+1];Math.abs(dt-ct[Tt])>Math.abs(Et-ct[Tt])&&(St[Tt]+=1)}for(Pe.index[0]=lt<.5?He:He+1,Pe.index[1]=st<.5?Vt:Vt+1,Pe.uv[0]=ce/me[0],Pe.uv[1]=mt/me[1],rt=0;rt<3;++rt)Pe.dataCoordinate[rt]=this._field[rt].get(Pe.index[0],Pe.index[1]);return Pe},j.padField=function(Le,me){var Pe=me.shape.slice(),ce=Le.shape.slice();d.assign(Le.lo(1,1).hi(Pe[0],Pe[1]),me),d.assign(Le.lo(1).hi(Pe[0],1),me.hi(Pe[0],1)),d.assign(Le.lo(1,ce[1]-1).hi(Pe[0],1),me.lo(0,Pe[1]-1).hi(Pe[0],1)),d.assign(Le.lo(0,1).hi(1,Pe[1]),me.hi(1)),d.assign(Le.lo(ce[0]-1,1).hi(1,Pe[1]),me.lo(Pe[0]-1)),Le.set(0,0,me.get(0,0)),Le.set(0,ce[1]-1,me.get(0,Pe[1]-1)),Le.set(ce[0]-1,0,me.get(Pe[0]-1,0)),Le.set(ce[0]-1,ce[1]-1,me.get(Pe[0]-1,Pe[1]-1))};function Se(Le,me){return Array.isArray(Le)?[me(Le[0]),me(Le[1]),me(Le[2])]:[me(Le),me(Le),me(Le)]}function Ee(Le){return Array.isArray(Le)?Le.length===3?[Le[0],Le[1],Le[2],1]:[Le[0],Le[1],Le[2],Le[3]]:[0,0,0,1]}function we(Le){if(Array.isArray(Le)){if(Array.isArray(Le))return[Ee(Le[0]),Ee(Le[1]),Ee(Le[2])];var me=Ee(Le);return[me.slice(),me.slice(),me.slice()]}}j.update=function(Le){Le=Le||{},this.objectOffset=Le.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in Le&&(this.contourWidth=Se(Le.contourWidth,Number)),"showContour"in Le&&(this.showContour=Se(Le.showContour,Boolean)),"showSurface"in Le&&(this.showSurface=!!Le.showSurface),"contourTint"in Le&&(this.contourTint=Se(Le.contourTint,Boolean)),"contourColor"in Le&&(this.contourColor=we(Le.contourColor)),"contourProject"in Le&&(this.contourProject=Se(Le.contourProject,function(yn){return Se(yn,Boolean)})),"surfaceProject"in Le&&(this.surfaceProject=Le.surfaceProject),"dynamicColor"in Le&&(this.dynamicColor=we(Le.dynamicColor)),"dynamicTint"in Le&&(this.dynamicTint=Se(Le.dynamicTint,Number)),"dynamicWidth"in Le&&(this.dynamicWidth=Se(Le.dynamicWidth,Number)),"opacity"in Le&&(this.opacity=Le.opacity),"opacityscale"in Le&&(this.opacityscale=Le.opacityscale),"colorBounds"in Le&&(this.colorBounds=Le.colorBounds),"vertexColor"in Le&&(this.vertexColor=Le.vertexColor?1:0),"colormap"in Le&&this._colorMap.setPixels(this.genColormap(Le.colormap,this.opacityscale));var me=Le.field||Le.coords&&Le.coords[2]||null,Pe=!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 Le||"coords"in Le){var ce=(me.shape[0]+2)*(me.shape[1]+2);ce>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(ce))),this._field[2]=m(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 He=this.shape,lt=0;lt<2;++lt)this._field[2].size>this._field[lt].data.length&&(f.freeFloat(this._field[lt].data),this._field[lt].data=f.mallocFloat(this._field[2].size)),this._field[lt]=m(this._field[lt].data,[He[0]+2,He[1]+2]);if(Le.coords){var mt=Le.coords;if(!Array.isArray(mt)||mt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(lt=0;lt<2;++lt){var Vt=mt[lt];for(nr=0;nr<2;++nr)if(Vt.shape[nr]!==He[nr])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[lt],Vt)}}else if(Le.ticks){var st=Le.ticks;if(!Array.isArray(st)||st.length!==2)throw new Error("gl-surface: invalid ticks");for(lt=0;lt<2;++lt){var ct=st[lt];if((Array.isArray(ct)||ct.length)&&(ct=m(ct)),ct.shape[0]!==He[lt])throw new Error("gl-surface: invalid tick length");var Qt=m(ct.data,He);Qt.stride[lt]=ct.stride[0],Qt.stride[lt^1]=0,this.padField(this._field[lt],Qt)}}else{for(lt=0;lt<2;++lt){var Ht=[0,0];Ht[lt]=1,this._field[lt]=m(this._field[lt].data,[He[0]+2,He[1]+2],Ht,0)}this._field[0].set(0,0,0);for(var nr=0;nr<He[0];++nr)this._field[0].set(nr+1,0,nr);for(this._field[0].set(He[0]+1,0,He[0]-1),this._field[1].set(0,0,0),nr=0;nr<He[1];++nr)this._field[1].set(0,nr+1,nr);this._field[1].set(0,He[1]+1,He[1]-1)}var tt=this._field,je=m(f.mallocFloat(tt[2].size*3*2),[3,He[0]+2,He[1]+2,2]);for(lt=0;lt<3;++lt)T(je.pick(lt),tt[lt],"mirror");var Ue=m(f.mallocFloat(tt[2].size*3),[He[0]+2,He[1]+2,3]);for(lt=0;lt<He[0]+2;++lt)for(nr=0;nr<He[1]+2;++nr){var Ae=je.get(0,lt,nr,0),rt=je.get(0,lt,nr,1),St=je.get(1,lt,nr,0),Tt=je.get(1,lt,nr,1),dt=je.get(2,lt,nr,0),Et=je.get(2,lt,nr,1),pt=St*Et-Tt*dt,Xt=dt*rt-Et*Ae,or=Ae*Tt-rt*St,_r=Math.sqrt(pt*pt+Xt*Xt+or*or);_r<1e-8?(_r=Math.max(Math.abs(pt),Math.abs(Xt),Math.abs(or)),_r<1e-8?(or=1,Xt=pt=0,_r=1):_r=1/_r):_r=1/Math.sqrt(_r),Ue.set(lt,nr,0,pt*_r),Ue.set(lt,nr,1,Xt*_r),Ue.set(lt,nr,2,or*_r)}f.free(je.data);var Er=[1/0,1/0,1/0],ei=[-1/0,-1/0,-1/0],qr=1/0,jr=-1/0,gt=(He[0]-1)*(He[1]-1)*6,Ge=f.mallocFloat(s.nextPow2(10*gt)),Je=0,We=0;for(lt=0;lt<He[0]-1;++lt)e:for(nr=0;nr<He[1]-1;++nr){for(var et=0;et<2;++et)for(var xt=0;xt<2;++xt)for(var At=0;At<3;++At){var Kt=this._field[At].get(1+lt+et,1+nr+xt);if(isNaN(Kt)||!isFinite(Kt))continue e}for(At=0;At<6;++At){var er=lt+z[At][0],Sr=nr+z[At][1],Gr=this._field[0].get(er+1,Sr+1),Ir=this._field[1].get(er+1,Sr+1);Kt=this._field[2].get(er+1,Sr+1),pt=Ue.get(er+1,Sr+1,0),Xt=Ue.get(er+1,Sr+1,1),or=Ue.get(er+1,Sr+1,2),Le.intensity&&(Yr=Le.intensity.get(er,Sr));var Yr=Le.intensity?Le.intensity.get(er,Sr):Kt+this.objectOffset[2];Ge[Je++]=er,Ge[Je++]=Sr,Ge[Je++]=Gr,Ge[Je++]=Ir,Ge[Je++]=Kt,Ge[Je++]=0,Ge[Je++]=Yr,Ge[Je++]=pt,Ge[Je++]=Xt,Ge[Je++]=or,Er[0]=Math.min(Er[0],Gr+this.objectOffset[0]),Er[1]=Math.min(Er[1],Ir+this.objectOffset[1]),Er[2]=Math.min(Er[2],Kt+this.objectOffset[2]),qr=Math.min(qr,Yr),ei[0]=Math.max(ei[0],Gr+this.objectOffset[0]),ei[1]=Math.max(ei[1],Ir+this.objectOffset[1]),ei[2]=Math.max(ei[2],Kt+this.objectOffset[2]),jr=Math.max(jr,Yr),We+=1}}for(Le.intensityBounds&&(qr=+Le.intensityBounds[0],jr=+Le.intensityBounds[1]),lt=6;lt<Je;lt+=10)Ge[lt]=(Ge[lt]-qr)/(jr-qr);this._vertexCount=We,this._coordinateBuffer.update(Ge.subarray(0,Je)),f.freeFloat(Ge),f.free(Ue.data),this.bounds=[Er,ei],this.intensity=Le.intensity||this._field[2],(this.intensityBounds[0]!==qr||this.intensityBounds[1]!==jr)&&(Pe=!0),this.intensityBounds=[qr,jr]}if("levels"in Le){var _i=Le.levels;for(Array.isArray(_i[0])?_i=_i.slice():_i=[[],[],_i],lt=0;lt<3;++lt)_i[lt]=_i[lt].slice(),_i[lt].sort(function(yn,Mn){return yn-Mn});for(lt=0;lt<3;++lt)for(nr=0;nr<_i[lt].length;++nr)_i[lt][nr]-=this.objectOffset[lt];e:for(lt=0;lt<3;++lt){if(_i[lt].length!==this.contourLevels[lt].length){Pe=!0;break}for(nr=0;nr<_i[lt].length;++nr)if(_i[lt][nr]!==this.contourLevels[lt][nr]){Pe=!0;break e}}this.contourLevels=_i}if(Pe){tt=this._field,He=this.shape;for(var Pi=[],ai=0;ai<3;++ai){var mi=this.contourLevels[ai],un=[],Fn=[],An=[0,0,0];for(lt=0;lt<mi.length;++lt){var Hn=b(this._field[ai],mi[lt]);un.push(Pi.length/5|0),We=0;e:for(nr=0;nr<Hn.cells.length;++nr){var Qn=Hn.cells[nr];for(At=0;At<2;++At){var Vi=Hn.positions[Qn[At]],Kn=Vi[0],Jn=Math.floor(Kn)|0,Gt=Kn-Jn,wt=Vi[1],rr=Math.floor(wt)|0,ir=wt-rr,wr=!1;t:for(var Xr=0;Xr<3;++Xr){An[Xr]=0;var ti=(ai+Xr+1)%3;for(et=0;et<2;++et){var $r=et?Gt:1-Gt;for(er=Math.min(Math.max(Jn+et,0),He[0])|0,xt=0;xt<2;++xt){var Ri=xt?ir:1-ir;if(Sr=Math.min(Math.max(rr+xt,0),He[1])|0,Xr<2?Kt=this._field[ti].get(er,Sr):Kt=(this.intensity.get(er,Sr)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(Kt)||isNaN(Kt)){wr=!0;break t}var Zi=$r*Ri;An[Xr]+=Zi*Kt}}}if(!wr)Pi.push(An[0],An[1],Vi[0],Vi[1],An[2]),We+=1;else{if(At>0){for(var en=0;en<5;++en)Pi.pop();We-=1}continue e}}}Fn.push(We)}this._contourOffsets[ai]=un,this._contourCounts[ai]=Fn}var fn=f.mallocFloat(Pi.length);for(lt=0;lt<Pi.length;++lt)fn[lt]=Pi[lt];this._contourBuffer.update(fn),f.freeFloat(fn)}},j.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var Le=0;Le<3;++Le)f.freeFloat(this._field[Le].data)},j.highlight=function(Le){var me;if(!Le){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]=Le.level[me]:this.highlightLevel[me]=-1;var Pe;for(this.snapToData?Pe=Le.dataCoordinate:Pe=Le.position,me=0;me<3;++me)Pe[me]-=this.objectOffset[me];if(!((!this.enableDynamic[0]||Pe[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||Pe[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||Pe[2]===this.dynamicLevel[2]))){for(var ce=0,He=this.shape,lt=f.mallocFloat(12*He[0]*He[1]),mt=0;mt<3;++mt){if(!this.enableDynamic[mt]){this.dynamicLevel[mt]=NaN,this._dynamicCounts[mt]=0;continue}this.dynamicLevel[mt]=Pe[mt];var Vt=(mt+1)%3,st=(mt+2)%3,ct=this._field[mt],Qt=this._field[Vt],Ht=this._field[st],nr=b(ct,Pe[mt]),tt=nr.cells,je=nr.positions;for(this._dynamicOffsets[mt]=ce,me=0;me<tt.length;++me)for(var Ue=tt[me],Ae=0;Ae<2;++Ae){var rt=je[Ue[Ae]],St=+rt[0],Tt=St|0,dt=Math.min(Tt+1,He[0])|0,Et=St-Tt,pt=1-Et,Xt=+rt[1],or=Xt|0,_r=Math.min(or+1,He[1])|0,Er=Xt-or,ei=1-Er,qr=pt*ei,jr=pt*Er,gt=Et*ei,Ge=Et*Er,Je=qr*Qt.get(Tt,or)+jr*Qt.get(Tt,_r)+gt*Qt.get(dt,or)+Ge*Qt.get(dt,_r),We=qr*Ht.get(Tt,or)+jr*Ht.get(Tt,_r)+gt*Ht.get(dt,or)+Ge*Ht.get(dt,_r);if(isNaN(Je)||isNaN(We)){Ae&&(ce-=1);break}lt[2*ce+0]=Je,lt[2*ce+1]=We,ce+=1}this._dynamicCounts[mt]=ce-this._dynamicOffsets[mt]}this._dynamicBuffer.update(lt.subarray(0,2*ce)),f.freeFloat(lt)}};function De(Le){var me=Le.gl,Pe=x(me),ce=S(me),He=C(me),lt=g(me),mt=l(me),Vt=u(me,[{buffer:mt,size:4,stride:P,offset:0},{buffer:mt,size:3,stride:P,offset:16},{buffer:mt,size:3,stride:P,offset:28}]),st=l(me),ct=u(me,[{buffer:st,size:4,stride:20,offset:0},{buffer:st,size:1,stride:20,offset:16}]),Qt=l(me),Ht=u(me,[{buffer:Qt,size:2,type:me.FLOAT}]),nr=c(me,1,G,me.RGBA,me.UNSIGNED_BYTE);nr.minFilter=me.LINEAR,nr.magFilter=me.LINEAR;var tt=new Z(me,[0,0],[[0,0,0],[0,0,0]],Pe,ce,mt,Vt,nr,He,lt,st,ct,Qt,Ht,[0,0,0]),je={levels:[[],[],[]]};for(var Ue in Le)je[Ue]=Le[Ue];return je.colormap=je.colormap||"jet",tt.update(je),tt}},7766:function(i,a,o){"use strict";var s=o(9618),l=o(5298),u=o(1888);i.exports=g;var c=null,f=null,h=null;function d(P){c=[P.LINEAR,P.NEAREST_MIPMAP_LINEAR,P.LINEAR_MIPMAP_NEAREST,P.LINEAR_MIPMAP_NEAREST],f=[P.NEAREST,P.LINEAR,P.NEAREST_MIPMAP_NEAREST,P.NEAREST_MIPMAP_LINEAR,P.LINEAR_MIPMAP_NEAREST,P.LINEAR_MIPMAP_LINEAR],h=[P.REPEAT,P.CLAMP_TO_EDGE,P.MIRRORED_REPEAT]}function v(P){return typeof HTMLCanvasElement!="undefined"&&P instanceof HTMLCanvasElement||typeof HTMLImageElement!="undefined"&&P instanceof HTMLImageElement||typeof HTMLVideoElement!="undefined"&&P instanceof HTMLVideoElement||typeof ImageData!="undefined"&&P instanceof ImageData}var m=function(P,E){l.muls(P,E,255)};function b(P,E,z){var q=P.gl,U=q.getParameter(q.MAX_TEXTURE_SIZE);if(E<0||E>U||z<0||z>U)throw new Error("gl-texture2d: Invalid texture size");return P._shape=[E,z],P.bind(),q.texImage2D(q.TEXTURE_2D,0,P.format,E,z,0,P.format,P.type,null),P._mipLevels=[0],P}function p(P,E,z,q,U,G){this.gl=P,this.handle=E,this.format=U,this.type=G,this._shape=[z,q],this._mipLevels=[0],this._magFilter=P.NEAREST,this._minFilter=P.NEAREST,this._wrapS=P.CLAMP_TO_EDGE,this._wrapT=P.CLAMP_TO_EDGE,this._anisoSamples=1;var Z=this,j=[this._wrapS,this._wrapT];Object.defineProperties(j,[{get:function(){return Z._wrapS},set:function(H){return Z.wrapS=H}},{get:function(){return Z._wrapT},set:function(H){return Z.wrapT=H}}]),this._wrapVector=j;var N=[this._shape[0],this._shape[1]];Object.defineProperties(N,[{get:function(){return Z._shape[0]},set:function(H){return Z.width=H}},{get:function(){return Z._shape[1]},set:function(H){return Z.height=H}}]),this._shapeVector=N}var k=p.prototype;Object.defineProperties(k,{minFilter:{get:function(){return this._minFilter},set:function(P){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(P)>=0&&(E.getExtension("OES_texture_float_linear")||(P=E.NEAREST)),f.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,P),this._minFilter=P}},magFilter:{get:function(){return this._magFilter},set:function(P){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(P)>=0&&(E.getExtension("OES_texture_float_linear")||(P=E.NEAREST)),f.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,P),this._magFilter=P}},mipSamples:{get:function(){return this._anisoSamples},set:function(P){var E=this._anisoSamples;if(this._anisoSamples=Math.max(P,1)|0,E!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,P),this._wrapS=P}},wrapT:{get:function(){return this._wrapT},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,P),this._wrapT=P}},wrap:{get:function(){return this._wrapVector},set:function(P){if(Array.isArray(P)||(P=[P,P]),P.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var E=0;E<2;++E)if(h.indexOf(P[E])<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);this._wrapS=P[0],this._wrapT=P[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),P}},shape:{get:function(){return this._shapeVector},set:function(P){if(!Array.isArray(P))P=[P|0,P|0];else if(P.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return b(this,P[0]|0,P[1]|0),[P[0]|0,P[1]|0]}},width:{get:function(){return this._shape[0]},set:function(P){return P=P|0,b(this,P,this._shape[1]),P}},height:{get:function(){return this._shape[1]},set:function(P){return P=P|0,b(this,this._shape[0],P),P}}}),k.bind=function(P){var E=this.gl;return P!==void 0&&E.activeTexture(E.TEXTURE0+(P|0)),E.bindTexture(E.TEXTURE_2D,this.handle),P!==void 0?P|0:E.getParameter(E.ACTIVE_TEXTURE)-E.TEXTURE0},k.dispose=function(){this.gl.deleteTexture(this.handle)},k.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var P=Math.min(this._shape[0],this._shape[1]),E=0;P>0;++E,P>>>=1)this._mipLevels.indexOf(E)<0&&this._mipLevels.push(E)},k.setPixels=function(P,E,z,q){var U=this.gl;this.bind(),Array.isArray(E)?(q=z,z=E[1]|0,E=E[0]|0):(E=E||0,z=z||0),q=q||0;var G=v(P)?P:P.raw;if(G){var Z=this._mipLevels.indexOf(q)<0;Z?(U.texImage2D(U.TEXTURE_2D,0,this.format,this.format,this.type,G),this._mipLevels.push(q)):U.texSubImage2D(U.TEXTURE_2D,q,E,z,this.format,this.type,G)}else if(P.shape&&P.stride&&P.data){if(P.shape.length<2||E+P.shape[1]>this._shape[1]>>>q||z+P.shape[0]>this._shape[0]>>>q||E<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");T(U,E,z,q,this.format,this.type,this._mipLevels,P)}else throw new Error("gl-texture2d: Unsupported data type")};function M(P,E){return P.length===3?E[2]===1&&E[1]===P[0]*P[2]&&E[0]===P[2]:E[0]===1&&E[1]===P[0]}function T(P,E,z,q,U,G,Z,j){var N=j.dtype,H=j.shape.slice();if(H.length<2||H.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var re=0,oe=0,_e=M(H,j.stride.slice());N==="float32"?re=P.FLOAT:N==="float64"?(re=P.FLOAT,_e=!1,N="float32"):N==="uint8"?re=P.UNSIGNED_BYTE:(re=P.UNSIGNED_BYTE,_e=!1,N="uint8");var ke=1;if(H.length===2)oe=P.LUMINANCE,H=[H[0],H[1],1],j=s(j.data,H,[j.stride[0],j.stride[1],1],j.offset);else if(H.length===3){if(H[2]===1)oe=P.ALPHA;else if(H[2]===2)oe=P.LUMINANCE_ALPHA;else if(H[2]===3)oe=P.RGB;else if(H[2]===4)oe=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ke=H[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((oe===P.LUMINANCE||oe===P.ALPHA)&&(U===P.LUMINANCE||U===P.ALPHA)&&(oe=U),oe!==U)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var Ce=j.size,ge=Z.indexOf(q)<0;if(ge&&Z.push(q),re===G&&_e)j.offset===0&&j.data.length===Ce?ge?P.texImage2D(P.TEXTURE_2D,q,U,H[0],H[1],0,U,G,j.data):P.texSubImage2D(P.TEXTURE_2D,q,E,z,H[0],H[1],U,G,j.data):ge?P.texImage2D(P.TEXTURE_2D,q,U,H[0],H[1],0,U,G,j.data.subarray(j.offset,j.offset+Ce)):P.texSubImage2D(P.TEXTURE_2D,q,E,z,H[0],H[1],U,G,j.data.subarray(j.offset,j.offset+Ce));else{var ie;G===P.FLOAT?ie=u.mallocFloat32(Ce):ie=u.mallocUint8(Ce);var Se=s(ie,H,[H[2],H[2]*H[0],1]);re===P.FLOAT&&G===P.UNSIGNED_BYTE?m(Se,j):l.assign(Se,j),ge?P.texImage2D(P.TEXTURE_2D,q,U,H[0],H[1],0,U,G,ie.subarray(0,Ce)):P.texSubImage2D(P.TEXTURE_2D,q,E,z,H[0],H[1],U,G,ie.subarray(0,Ce)),G===P.FLOAT?u.freeFloat32(ie):u.freeUint8(ie)}}function L(P){var E=P.createTexture();return P.bindTexture(P.TEXTURE_2D,E),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.CLAMP_TO_EDGE),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.CLAMP_TO_EDGE),E}function x(P,E,z,q,U){var G=P.getParameter(P.MAX_TEXTURE_SIZE);if(E<0||E>G||z<0||z>G)throw new Error("gl-texture2d: Invalid texture shape");if(U===P.FLOAT&&!P.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,q,E,z,0,q,U,null),new p(P,Z,E,z,q,U)}function C(P,E,z,q,U,G){var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,U,U,G,E),new p(P,Z,z,q,U,G)}function S(P,E){var z=E.dtype,q=E.shape.slice(),U=P.getParameter(P.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 G=M(q,E.stride.slice()),Z=0;z==="float32"?Z=P.FLOAT:z==="float64"?(Z=P.FLOAT,G=!1,z="float32"):z==="uint8"?Z=P.UNSIGNED_BYTE:(Z=P.UNSIGNED_BYTE,G=!1,z="uint8");var j=0;if(q.length===2)j=P.LUMINANCE,q=[q[0],q[1],1],E=s(E.data,q,[E.stride[0],E.stride[1],1],E.offset);else if(q.length===3)if(q[2]===1)j=P.ALPHA;else if(q[2]===2)j=P.LUMINANCE_ALPHA;else if(q[2]===3)j=P.RGB;else if(q[2]===4)j=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");Z===P.FLOAT&&!P.getExtension("OES_texture_float")&&(Z=P.UNSIGNED_BYTE,G=!1);var N,H,re=E.size;if(G)E.offset===0&&E.data.length===re?N=E.data:N=E.data.subarray(E.offset,E.offset+re);else{var oe=[q[2],q[2]*q[0],1];H=u.malloc(re,z);var _e=s(H,q,oe,0);(z==="float32"||z==="float64")&&Z===P.UNSIGNED_BYTE?m(_e,E):l.assign(_e,E),N=H.subarray(0,re)}var ke=L(P);return P.texImage2D(P.TEXTURE_2D,0,j,q[0],q[1],0,j,Z,N),G||u.free(H),new p(P,ke,q[0],q[1],j,Z)}function g(P){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||d(P),typeof arguments[1]=="number")return x(P,arguments[1],arguments[2],arguments[3]||P.RGBA,arguments[4]||P.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return x(P,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var E=arguments[1],z=v(E)?E:E.raw;if(z)return C(P,z,E.width|0,E.height|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(E.shape&&E.data&&E.stride)return S(P,E)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(i){"use strict";function a(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c<l.length;++c){var f=l[c];if(f.buffer){var h=f.buffer,d=f.size||4,v=f.type||o.FLOAT,m=!!f.normalized,b=f.stride||0,p=f.offset||0;h.bind(),o.enableVertexAttribArray(c),o.vertexAttribPointer(c,d,v,m,b,p)}else{if(typeof f=="number")o.vertexAttrib1f(c,f);else if(f.length===1)o.vertexAttrib1f(c,f[0]);else if(f.length===2)o.vertexAttrib2f(c,f[0],f[1]);else if(f.length===3)o.vertexAttrib3f(c,f[0],f[1],f[2]);else if(f.length===4)o.vertexAttrib4f(c,f[0],f[1],f[2],f[3]);else throw new Error("gl-vao: Invalid vertex attribute");o.disableVertexAttribArray(c)}}for(;c<u;++c)o.disableVertexAttribArray(c)}else{o.bindBuffer(o.ARRAY_BUFFER,null);for(var c=0;c<u;++c)o.disableVertexAttribArray(c)}}i.exports=a},870:function(i,a,o){"use strict";var s=o(1433);function l(c){this.gl=c,this._elements=null,this._attributes=null,this._elementsType=c.UNSIGNED_SHORT}l.prototype.bind=function(){s(this.gl,this._elements,this._attributes)},l.prototype.update=function(c,f,h){this._elements=f,this._attributes=c,this._elementsType=h||this.gl.UNSIGNED_SHORT},l.prototype.dispose=function(){},l.prototype.unbind=function(){},l.prototype.draw=function(c,f,h){h=h||0;var d=this.gl;this._elements?d.drawElements(c,f,this._elementsType,h):d.drawArrays(c,h,f)};function u(c){return new l(c)}i.exports=u},7518:function(i,a,o){"use strict";var s=o(1433);function l(f,h,d,v,m,b){this.location=f,this.dimension=h,this.a=d,this.b=v,this.c=m,this.d=b}l.prototype.bind=function(f){switch(this.dimension){case 1:f.vertexAttrib1f(this.location,this.a);break;case 2:f.vertexAttrib2f(this.location,this.a,this.b);break;case 3:f.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:f.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function u(f,h,d){this.gl=f,this._ext=h,this.handle=d,this._attribs=[],this._useElements=!1,this._elementsType=f.UNSIGNED_SHORT}u.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var f=0;f<this._attribs.length;++f)this._attribs[f].bind(this.gl)},u.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},u.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},u.prototype.update=function(f,h,d){if(this.bind(),s(this.gl,h,f),this.unbind(),this._attribs.length=0,f)for(var v=0;v<f.length;++v){var m=f[v];typeof m=="number"?this._attribs.push(new l(v,1,m)):Array.isArray(m)&&this._attribs.push(new l(v,m.length,m[0],m[1],m[2],m[3]))}this._useElements=!!h,this._elementsType=d||this.gl.UNSIGNED_SHORT},u.prototype.draw=function(f,h,d){d=d||0;var v=this.gl;this._useElements?v.drawElements(f,h,this._elementsType,d):v.drawArrays(f,d,h)};function c(f,h){return new u(f,h,h.createVertexArrayOES())}i.exports=c},8116:function(i,a,o){"use strict";var s=o(7518),l=o(870);function u(f){this.bindVertexArrayOES=f.bindVertexArray.bind(f),this.createVertexArrayOES=f.createVertexArray.bind(f),this.deleteVertexArrayOES=f.deleteVertexArray.bind(f)}function c(f,h,d,v){var m=f.createVertexArray?new u(f):f.getExtension("OES_vertex_array_object"),b;return m?b=s(f,m):b=l(f),b.update(h,d,v),b}i.exports=c},5632:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o}},8192:function(i,a,o){i.exports=c;var s=o(2825),l=o(3536),u=o(244);function c(f,h){var d=s(f[0],f[1],f[2]),v=s(h[0],h[1],h[2]);l(d,d),l(v,v);var m=u(d,v);return m>1?0:Math.acos(m)}},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,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2];return o[0]=c*v-f*d,o[1]=f*h-u*v,o[2]=u*d-c*h,o}},5455:function(i,a,o){i.exports=o(7056)},7056:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}},4008:function(i,a,o){i.exports=o(6690)},6690:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}},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=l;var s=o(2613);function l(u,c){var f=u[0],h=u[1],d=u[2],v=c[0],m=c[1],b=c[2];return Math.abs(f-v)<=s*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(h-m)<=s*Math.max(1,Math.abs(h),Math.abs(m))&&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=l;var s=o(1091)();function l(u,c,f,h,d,v){var m,b;for(c||(c=3),f||(f=0),h?b=Math.min(h*c+f,u.length):b=u.length,m=f;m<b;m+=c)s[0]=u[m],s[1]=u[m+1],s[2]=u[m+2],d(s,s,v),u[m]=s[0],u[m+1]=s[1],u[m+2]=s[2];return u}},2825:function(i){i.exports=a;function a(o,s,l){var u=new Float32Array(3);return u[0]=o,u[1]=s,u[2]=l,u}},2931:function(i,a,o){i.exports={EPSILON:o(2613),create:o(1091),clone:o(3126),angle:o(8192),fromValues:o(2825),copy:o(3990),set:o(1463),equals:o(9922),exactEquals:o(9265),add:o(5632),subtract:o(6843),sub:o(2229),multiply:o(5847),mul:o(4505),divide:o(6690),div:o(4008),min:o(8107),max:o(7417),floor:o(2681),ceil:o(9226),round:o(2447),scale:o(6621),scaleAndAdd:o(8489),distance:o(7056),dist:o(5455),squaredDistance:o(2953),sqrDist:o(6141),length:o(1387),len:o(868),squaredLength:o(3066),sqrLen:o(5486),negate:o(5093),inverse:o(811),normalize:o(3536),dot:o(244),cross:o(5911),lerp:o(6658),random:o(7636),transformMat4:o(5673),transformMat3:o(492),transformQuat:o(264),rotateX:o(6894),rotateY:o(109),rotateZ:o(8692),forEach:o(5137)}},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],l=o[1],u=o[2];return Math.sqrt(s*s+l*l+u*u)}},6658:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o}},7417:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o}},8107:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o}},4505:function(i,a,o){i.exports=o(5847)},5847:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o}},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 l=s[0],u=s[1],c=s[2],f=l*l+u*u+c*c;return f>0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},6894:function(i){i.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,d=s[2]-f,v=Math.sin(u),m=Math.cos(u);return o[0]=s[0],o[1]=c+h*m-d*v,o[2]=f+h*v+d*m,o}},109:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,d=s[2]-f,v=Math.sin(u),m=Math.cos(u);return o[0]=c+d*v+h*m,o[1]=s[1],o[2]=f+d*m-h*v,o}},8692:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,d=s[1]-f,v=Math.sin(u),m=Math.cos(u);return o[0]=c+h*m-d*v,o[1]=f+h*v+d*m,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,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}},8489:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}},1463:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,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 l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},3066:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}},2229:function(i,a,o){i.exports=o(6843)},6843:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}},492:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}},5673:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[3]*u+l[7]*c+l[11]*f+l[15];return h=h||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/h,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/h,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/h,o}},264:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],m=l[3],b=m*u+d*f-v*c,p=m*c+v*u-h*f,k=m*f+h*c-d*u,M=-h*u-d*c-v*f;return o[0]=b*m+M*-h+p*-v-k*-d,o[1]=p*m+M*-d+k*-h-b*-v,o[2]=k*m+M*-v+b*-d-p*-h,o}},4361:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}},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 l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}},1373:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}},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,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},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],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}},2573:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o[3]=d+u*(l[3]-d),o}},160:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},2334:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},3576:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}},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 l=s[0],u=s[1],c=s[2],f=s[3],h=l*l+u*u+c*c+f*f;return h>0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},9131:function(i,a,o){var s=o(5177),l=o(9288);i.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9288:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},4844:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4578:function(i){i.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},7960:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},483:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}},6860:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},5352:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*h,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*h,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*h,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*h,o}},4041:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],m=l[3],b=m*u+d*f-v*c,p=m*c+v*u-h*f,k=m*f+h*c-d*u,M=-h*u-d*c-v*f;return o[0]=b*m+M*-h+p*-v-k*-d,o[1]=p*m+M*-d+k*-h-b*-v,o[2]=k*m+M*-v+b*-d-p*-h,o[3]=s[3],o}},1848:function(i,a,o){var s=o(4905),l=o(6468);i.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),h=0;h<f.length;h++){var d=f[h];if(d.type==="preprocessor"){var v=d.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(v&&v[2]){var m=v[1],b=v[2];return(m?l(b):b).trim()}}}}},5874:function(i,a,o){i.exports=E;var s=o(620),l=o(7827),u=o(6852),c=o(7932),f=o(3508),h=999,d=9999,v=0,m=1,b=2,p=3,k=4,M=5,T=6,L=7,x=8,C=9,S=10,g=11,P=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function E(z){var q=0,U=0,G=h,Z,j,N=[],H=[],re=0,oe=0,_e=1,ke=0,Ce=0,ge=!1,ie=!1,Se="",Ee;z=z||{};var we=u,De=s;z.version==="300 es"&&(we=f,De=c);for(var Le={},me={},q=0;q<we.length;q++)Le[we[q]]=!0;for(var q=0;q<De.length;q++)me[De[q]]=!0;return function(Ae){return H=[],Ae!==null?ce(Ae):He()};function Pe(Ae){Ae.length&&H.push({type:P[G],data:Ae,position:Ce,line:_e,column:ke})}function ce(Ae){q=0,Ae.toString&&(Ae=Ae.toString()),Se+=Ae.replace(/\r\n/g,`
|
||
`),Ee=Se.length;for(var rt;Z=Se[q],q<Ee;){switch(rt=q,G){case v:q=ct();break;case m:q=st();break;case b:q=Vt();break;case p:q=Qt();break;case k:q=tt();break;case g:q=nr();break;case M:q=je();break;case d:q=Ue();break;case C:q=mt();break;case h:q=lt();break}if(rt!==q)switch(Se[rt]){case`
|
||
`:ke=0,++_e;break;default:++ke;break}}return U+=q,Se=Se.slice(q),H}function He(Ae){return N.length&&Pe(N.join("")),G=S,Pe("(eof)"),H}function lt(){return N=N.length?[]:N,j==="/"&&Z==="*"?(Ce=U+q-1,G=v,j=Z,q+1):j==="/"&&Z==="/"?(Ce=U+q-1,G=m,j=Z,q+1):Z==="#"?(G=b,Ce=U+q,q):/\s/.test(Z)?(G=C,Ce=U+q,q):(ge=/\d/.test(Z),ie=/[^\w_]/.test(Z),Ce=U+q,G=ge?k:ie?p:d,q)}function mt(){return/[^\s]/g.test(Z)?(Pe(N.join("")),G=h,q):(N.push(Z),j=Z,q+1)}function Vt(){return(Z==="\r"||Z===`
|
||
`)&&j!=="\\"?(Pe(N.join("")),G=h,q):(N.push(Z),j=Z,q+1)}function st(){return Vt()}function ct(){return Z==="/"&&j==="*"?(N.push(Z),Pe(N.join("")),G=h,q+1):(N.push(Z),j=Z,q+1)}function Qt(){if(j==="."&&/\d/.test(Z))return G=M,q;if(j==="/"&&Z==="*")return G=v,q;if(j==="/"&&Z==="/")return G=m,q;if(Z==="."&&N.length){for(;Ht(N););return G=M,q}if(Z===";"||Z===")"||Z==="("){if(N.length)for(;Ht(N););return Pe(Z),G=h,q+1}var Ae=N.length===2&&Z!=="=";if(/[\w_\d\s]/.test(Z)||Ae){for(;Ht(N););return G=h,q}return N.push(Z),j=Z,q+1}function Ht(Ae){var rt=0,St,Tt;do{if(St=l.indexOf(Ae.slice(0,Ae.length+rt).join("")),Tt=l[St],St===-1){if(rt--+Ae.length>0)continue;Tt=Ae.slice(0,1).join("")}return Pe(Tt),Ce+=Tt.length,N=N.slice(Tt.length),N.length}while(!0)}function nr(){return/[^a-fA-F0-9]/.test(Z)?(Pe(N.join("")),G=h,q):(N.push(Z),j=Z,q+1)}function tt(){return Z==="."||/[eE]/.test(Z)?(N.push(Z),G=M,j=Z,q+1):Z==="x"&&N.length===1&&N[0]==="0"?(G=g,N.push(Z),j=Z,q+1):/[^\d]/.test(Z)?(Pe(N.join("")),G=h,q):(N.push(Z),j=Z,q+1)}function je(){return Z==="f"&&(N.push(Z),j=Z,q+=1),/[eE]/.test(Z)||(Z==="-"||Z==="+")&&/[eE]/.test(j)?(N.push(Z),j=Z,q+1):/[^\d]/.test(Z)?(Pe(N.join("")),G=h,q):(N.push(Z),j=Z,q+1)}function Ue(){if(/[^\d\w_]/.test(Z)){var Ae=N.join("");return me[Ae]?G=x:Le[Ae]?G=L:G=T,Pe(N.join("")),G=h,q}return N.push(Z),j=Z,q+1}}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),i.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},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=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},3236:function(i){i.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l<a.length-1;l++)s.push(a[l],o[l]||"");return s.push(a[l]),s.join("")}},7520:function(i,a,o){"use strict";var s=o(9507);function l(){var u=!1;try{var c=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("test",null,c),window.removeEventListener("test",null,c)}catch(f){u=!1}return u}i.exports=s&&l()},3778:function(i,a){a.read=function(o,s,l,u,c){var f,h,d=c*8-u-1,v=(1<<d)-1,m=v>>1,b=-7,p=l?c-1:0,k=l?-1:1,M=o[s+p];for(p+=k,f=M&(1<<-b)-1,M>>=-b,b+=d;b>0;f=f*256+o[s+p],p+=k,b-=8);for(h=f&(1<<-b)-1,f>>=-b,b+=u;b>0;h=h*256+o[s+p],p+=k,b-=8);if(f===0)f=1-m;else{if(f===v)return h?NaN:(M?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-m}return(M?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,d,v,m=f*8-c-1,b=(1<<m)-1,p=b>>1,k=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=u?0:f-1,T=u?1:-1,L=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(d=isNaN(s)?1:0,h=b):(h=Math.floor(Math.log(s)/Math.LN2),s*(v=Math.pow(2,-h))<1&&(h--,v*=2),h+p>=1?s+=k/v:s+=k*Math.pow(2,1-p),s*v>=2&&(h++,v/=2),h+p>=b?(d=0,h=b):h+p>=1?(d=(s*v-1)*Math.pow(2,c),h=h+p):(d=s*Math.pow(2,p-1)*Math.pow(2,c),h=0));c>=8;o[l+M]=d&255,M+=T,d/=256,c-=8);for(h=h<<c|d,m+=c;m>0;o[l+M]=h&255,M+=T,h/=256,m-=8);o[l+M-T]|=L*128}},8954:function(i,a,o){"use strict";i.exports=p;var s=o(3250),l=o(6803).Fw;function u(k,M,T){this.vertices=k,this.adjacent=M,this.boundary=T,this.lastVisited=-1}u.prototype.flip=function(){var k=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=k;var M=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=M};function c(k,M,T){this.vertices=k,this.cell=M,this.index=T}function f(k,M){return l(k.vertices,M.vertices)}function h(k){return function(){var M=this.tuple;return k.apply(this,M)}}function d(k){var M=s[k+1];return M||(M=s),h(M)}var v=[];function m(k,M,T){this.dimension=k,this.vertices=M,this.simplices=T,this.interior=T.filter(function(C){return!C.boundary}),this.tuple=new Array(k+1);for(var L=0;L<=k;++L)this.tuple[L]=this.vertices[L];var x=v[k];x||(x=v[k]=d(k)),this.orient=x}var b=m.prototype;b.handleBoundaryDegeneracy=function(k,M){var T=this.dimension,L=this.vertices.length-1,x=this.tuple,C=this.vertices,S=[k];for(k.lastVisited=-L;S.length>0;){k=S.pop();for(var g=k.adjacent,P=0;P<=T;++P){var E=g[P];if(!(!E.boundary||E.lastVisited<=-L)){for(var z=E.vertices,q=0;q<=T;++q){var U=z[q];U<0?x[q]=M:x[q]=C[U]}var G=this.orient();if(G>0)return E;E.lastVisited=-L,G===0&&S.push(E)}}}return null},b.walk=function(k,M){var T=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,S=M?this.interior.length*Math.random()|0:this.interior.length-1,g=this.interior[S];e:for(;!g.boundary;){for(var P=g.vertices,E=g.adjacent,z=0;z<=L;++z)C[z]=x[P[z]];g.lastVisited=T;for(var z=0;z<=L;++z){var q=E[z];if(!(q.lastVisited>=T)){var U=C[z];C[z]=k;var G=this.orient();if(C[z]=U,G<0){g=q;continue e}else q.boundary?q.lastVisited=-T:q.lastVisited=T}}return}return g},b.addPeaks=function(k,M){var T=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,S=this.interior,g=this.simplices,P=[M];M.lastVisited=T,M.vertices[M.vertices.indexOf(-1)]=T,M.boundary=!1,S.push(M);for(var E=[];P.length>0;){var M=P.pop(),z=M.vertices,q=M.adjacent,U=z.indexOf(T);if(!(U<0)){for(var G=0;G<=L;++G)if(G!==U){var Z=q[G];if(!(!Z.boundary||Z.lastVisited>=T)){var j=Z.vertices;if(Z.lastVisited!==-T){for(var N=0,H=0;H<=L;++H)j[H]<0?(N=H,C[H]=k):C[H]=x[j[H]];var re=this.orient();if(re>0){j[N]=T,Z.boundary=!1,S.push(Z),P.push(Z),Z.lastVisited=T;continue}else Z.lastVisited=-T}var oe=Z.adjacent,_e=z.slice(),ke=q.slice(),Ce=new u(_e,ke,!0);g.push(Ce);var ge=oe.indexOf(M);if(!(ge<0)){oe[ge]=Ce,ke[U]=Z,_e[G]=-1,ke[G]=M,q[G]=Ce,Ce.flip();for(var H=0;H<=L;++H){var ie=_e[H];if(!(ie<0||ie===T)){for(var Se=new Array(L-1),Ee=0,we=0;we<=L;++we){var De=_e[we];De<0||we===H||(Se[Ee++]=De)}E.push(new c(Se,Ce,H))}}}}}}}E.sort(f);for(var G=0;G+1<E.length;G+=2){var Le=E[G],me=E[G+1],Pe=Le.index,ce=me.index;Pe<0||ce<0||(Le.cell.adjacent[Le.index]=me.cell,me.cell.adjacent[me.index]=Le.cell)}},b.insert=function(k,M){var T=this.vertices;T.push(k);var L=this.walk(k,M);if(L){for(var x=this.dimension,C=this.tuple,S=0;S<=x;++S){var g=L.vertices[S];g<0?C[S]=k:C[S]=T[g]}var P=this.orient(C);P<0||P===0&&(L=this.handleBoundaryDegeneracy(L,k),!L)||this.addPeaks(k,L)}},b.boundary=function(){for(var k=this.dimension,M=[],T=this.simplices,L=T.length,x=0;x<L;++x){var C=T[x];if(C.boundary){for(var S=new Array(k),g=C.vertices,P=0,E=0,z=0;z<=k;++z)g[z]>=0?S[P++]=g[z]:E=z&1;if(E===(k&1)){var q=S[0];S[0]=S[1],S[1]=q}M.push(S)}}return M};function p(k,M){var T=k.length;if(T===0)throw new Error("Must have at least d+1 points");var L=k[0].length;if(T<=L)throw new Error("Must input at least d+1 points");var x=k.slice(0,L+1),C=s.apply(void 0,x);if(C===0)throw new Error("Input not in general position");for(var S=new Array(L+1),g=0;g<=L;++g)S[g]=g;C<0&&(S[0]=1,S[1]=0);for(var P=new u(S,new Array(L+1),!1),E=P.adjacent,z=new Array(L+2),g=0;g<=L;++g){for(var q=S.slice(),U=0;U<=L;++U)U===g&&(q[U]=-1);var G=q[0];q[0]=q[1],q[1]=G;var Z=new u(q,new Array(L+1),!0);E[g]=Z,z[g]=Z}z[L+1]=P;for(var g=0;g<=L;++g)for(var q=E[g].vertices,j=E[g].adjacent,U=0;U<=L;++U){var N=q[U];if(N<0){j[U]=P;continue}for(var H=0;H<=L;++H)E[H].vertices.indexOf(N)<0&&(j[U]=E[H])}for(var re=new m(L,x,z),oe=!!M,g=L+1;g<T;++g)re.insert(k[g],oe);return re.boundary()}},3352:function(i,a,o){"use strict";var s=o(2478),l=0,u=1,c=2;i.exports=P;function f(E,z,q,U,G){this.mid=E,this.left=z,this.right=q,this.leftPoints=U,this.rightPoints=G,this.count=(z?z.count:0)+(q?q.count:0)+U.length}var h=f.prototype;function d(E,z){E.mid=z.mid,E.left=z.left,E.right=z.right,E.leftPoints=z.leftPoints,E.rightPoints=z.rightPoints,E.count=z.count}function v(E,z){var q=C(z);E.mid=q.mid,E.left=q.left,E.right=q.right,E.leftPoints=q.leftPoints,E.rightPoints=q.rightPoints,E.count=q.count}function m(E,z){var q=E.intervals([]);q.push(z),v(E,q)}function b(E,z){var q=E.intervals([]),U=q.indexOf(z);return U<0?l:(q.splice(U,1),v(E,q),u)}h.intervals=function(E){return E.push.apply(E,this.leftPoints),this.left&&this.left.intervals(E),this.right&&this.right.intervals(E),E},h.insert=function(E){var z=this.count-this.leftPoints.length;if(this.count+=1,E[1]<this.mid)this.left?4*(this.left.count+1)>3*(z+1)?m(this,E):this.left.insert(E):this.left=C([E]);else if(E[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?m(this,E):this.right.insert(E):this.right=C([E]);else{var q=s.ge(this.leftPoints,E,L),U=s.ge(this.rightPoints,E,x);this.leftPoints.splice(q,0,E),this.rightPoints.splice(U,0,E)}},h.remove=function(E){var z=this.count-this.leftPoints;if(E[1]<this.mid){if(!this.left)return l;var q=this.right?this.right.count:0;if(4*q>3*(z-1))return b(this,E);var U=this.left.remove(E);return U===c?(this.left=null,this.count-=1,u):(U===u&&(this.count-=1),U)}else if(E[0]>this.mid){if(!this.right)return l;var G=this.left?this.left.count:0;if(4*G>3*(z-1))return b(this,E);var U=this.right.remove(E);return U===c?(this.right=null,this.count-=1,u):(U===u&&(this.count-=1),U)}else{if(this.count===1)return this.leftPoints[0]===E?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===E){if(this.left&&this.right){for(var Z=this,j=this.left;j.right;)Z=j,j=j.right;if(Z===this)j.right=this.right;else{var N=this.left,U=this.right;Z.count-=j.count,Z.right=j.left,j.left=N,j.right=U}d(this,j),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?d(this,this.left):d(this,this.right);return u}for(var N=s.ge(this.leftPoints,E,L);N<this.leftPoints.length&&this.leftPoints[N][0]===E[0];++N)if(this.leftPoints[N]===E){this.count-=1,this.leftPoints.splice(N,1);for(var U=s.ge(this.rightPoints,E,x);U<this.rightPoints.length&&this.rightPoints[U][1]===E[1];++U)if(this.rightPoints[U]===E)return this.rightPoints.splice(U,1),u}return l}};function p(E,z,q){for(var U=0;U<E.length&&E[U][0]<=z;++U){var G=q(E[U]);if(G)return G}}function k(E,z,q){for(var U=E.length-1;U>=0&&E[U][1]>=z;--U){var G=q(E[U]);if(G)return G}}function M(E,z){for(var q=0;q<E.length;++q){var U=z(E[q]);if(U)return U}}h.queryPoint=function(E,z){if(E<this.mid){if(this.left){var q=this.left.queryPoint(E,z);if(q)return q}return p(this.leftPoints,E,z)}else if(E>this.mid){if(this.right){var q=this.right.queryPoint(E,z);if(q)return q}return k(this.rightPoints,E,z)}else return M(this.leftPoints,z)},h.queryInterval=function(E,z,q){if(E<this.mid&&this.left){var U=this.left.queryInterval(E,z,q);if(U)return U}if(z>this.mid&&this.right){var U=this.right.queryInterval(E,z,q);if(U)return U}return z<this.mid?p(this.leftPoints,z,q):E>this.mid?k(this.rightPoints,E,q):M(this.leftPoints,q)};function T(E,z){return E-z}function L(E,z){var q=E[0]-z[0];return q||E[1]-z[1]}function x(E,z){var q=E[1]-z[1];return q||E[0]-z[0]}function C(E){if(E.length===0)return null;for(var z=[],q=0;q<E.length;++q)z.push(E[q][0],E[q][1]);z.sort(T);for(var U=z[z.length>>1],G=[],Z=[],j=[],q=0;q<E.length;++q){var N=E[q];N[1]<U?G.push(N):U<N[0]?Z.push(N):j.push(N)}var H=j,re=j.slice();return H.sort(L),re.sort(x),new f(U,C(G),C(Z),H,re)}function S(E){this.root=E}var g=S.prototype;g.insert=function(E){this.root?this.root.insert(E):this.root=new f(E[0],null,null,[E],[E])},g.remove=function(E){if(this.root){var z=this.root.remove(E);return z===c&&(this.root=null),z!==l}return!1},g.queryPoint=function(E,z){if(this.root)return this.root.queryPoint(E,z)},g.queryInterval=function(E,z,q){if(E<=z&&this.root)return this.root.queryInterval(E,z,q)},Object.defineProperty(g,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(g,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function P(E){return!E||E.length===0?new S(null):new S(C(E))}},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,l=0;l<o;l++)if(s=a.charCodeAt(l),(s<9||s>13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},395:function(i){function a(o,s,l){return o*(1-l)+s*l}i.exports=a},2652:function(i,a,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},v=l(),m=l(),b=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],k=[0,0,0];i.exports=function(C,S,g,P,E,z){if(S||(S=[0,0,0]),g||(g=[0,0,0]),P||(P=[0,0,0]),E||(E=[0,0,0,1]),z||(z=[0,0,0,1]),!s(v,C)||(u(m,v),m[3]=0,m[7]=0,m[11]=0,m[15]=1,Math.abs(c(m)<1e-8)))return!1;var q=v[3],U=v[7],G=v[11],Z=v[12],j=v[13],N=v[14],H=v[15];if(q!==0||U!==0||G!==0){b[0]=q,b[1]=U,b[2]=G,b[3]=H;var re=f(m,m);if(!re)return!1;h(m,m),M(E,b,m)}else E[0]=E[1]=E[2]=0,E[3]=1;if(S[0]=Z,S[1]=j,S[2]=N,T(p,v),g[0]=d.length(p[0]),d.normalize(p[0],p[0]),P[0]=d.dot(p[0],p[1]),L(p[1],p[1],p[0],1,-P[0]),g[1]=d.length(p[1]),d.normalize(p[1],p[1]),P[0]/=g[1],P[1]=d.dot(p[0],p[2]),L(p[2],p[2],p[0],1,-P[1]),P[2]=d.dot(p[1],p[2]),L(p[2],p[2],p[1],1,-P[2]),g[2]=d.length(p[2]),d.normalize(p[2],p[2]),P[1]/=g[2],P[2]/=g[2],d.cross(k,p[1],p[2]),d.dot(p[0],k)<0)for(var oe=0;oe<3;oe++)g[oe]*=-1,p[oe][0]*=-1,p[oe][1]*=-1,p[oe][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(z[0]=-z[0]),p[0][2]>p[2][0]&&(z[1]=-z[1]),p[1][0]>p[0][1]&&(z[2]=-z[2]),!0};function M(x,C,S){var g=C[0],P=C[1],E=C[2],z=C[3];return x[0]=S[0]*g+S[4]*P+S[8]*E+S[12]*z,x[1]=S[1]*g+S[5]*P+S[9]*E+S[13]*z,x[2]=S[2]*g+S[6]*P+S[10]*E+S[14]*z,x[3]=S[3]*g+S[7]*P+S[11]*E+S[15]*z,x}function T(x,C){x[0][0]=C[0],x[0][1]=C[1],x[0][2]=C[2],x[1][0]=C[4],x[1][1]=C[5],x[1][2]=C[6],x[2][0]=C[8],x[2][1]=C[9],x[2][2]=C[10]}function L(x,C,S,g,P){x[0]=C[0]*g+S[0]*P,x[1]=C[1]*g+S[1]*P,x[2]=C[2]*g+S[2]*P}},4335:function(i){i.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}},7442:function(i,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=b(),d=b(),v=b();i.exports=m;function m(M,T,L,x){if(c(T)===0||c(L)===0)return!1;var C=u(T,h.translate,h.scale,h.skew,h.perspective,h.quaternion),S=u(L,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!C||!S?!1:(s(v.translate,h.translate,d.translate,x),s(v.skew,h.skew,d.skew,x),s(v.scale,h.scale,d.scale,x),s(v.perspective,h.perspective,d.perspective,x),f(v.quaternion,h.quaternion,d.quaternion,x),l(M,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function b(){return{translate:p(),scale:p(1),skew:p(),perspective:k(),quaternion:k()}}function p(M){return[M||0,M||0,M||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)},l=s.create(),u=s.create();i.exports=function(f,h,d,v,m,b){return s.identity(f),s.fromRotationTranslation(f,b,h),f[3]=m[0],f[7]=m[1],f[11]=m[2],f[15]=m[3],s.identity(u),v[2]!==0&&(u[9]=v[2],s.multiply(f,f,u)),v[1]!==0&&(u[9]=0,u[8]=v[1],s.multiply(f,f,u)),v[0]!==0&&(u[8]=0,u[4]=v[0],s.multiply(f,f,u)),s.scale(f,f,d),f}},1811:function(i,a,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),h=o(7089),d=o(6582),v=o(7656),m=o(2504),b=o(3536),p=[0,0,0];i.exports=L;function k(x){this._components=x.slice(),this._time=[0],this.prevMatrix=x.slice(),this.nextMatrix=x.slice(),this.computedMatrix=x.slice(),this.computedInverse=x.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var M=k.prototype;M.recalcMatrix=function(x){var C=this._time,S=s.le(C,x),g=this.computedMatrix;if(!(S<0)){var P=this._components;if(S===C.length-1)for(var E=16*S,z=0;z<16;++z)g[z]=P[E++];else{for(var q=C[S+1]-C[S],E=16*S,U=this.prevMatrix,G=!0,z=0;z<16;++z)U[z]=P[E++];for(var Z=this.nextMatrix,z=0;z<16;++z)Z[z]=P[E++],G=G&&U[z]===Z[z];if(q<1e-6||G)for(var z=0;z<16;++z)g[z]=U[z];else l(g,U,Z,(x-C[S])/q)}var j=this.computedUp;j[0]=g[1],j[1]=g[5],j[2]=g[9],b(j,j);var N=this.computedInverse;u(N,g);var H=this.computedEye,re=N[15];H[0]=N[12]/re,H[1]=N[13]/re,H[2]=N[14]/re;for(var oe=this.computedCenter,_e=Math.exp(this.computedRadius[0]),z=0;z<3;++z)oe[z]=H[z]-g[2+4*z]*_e}},M.idle=function(x){if(!(x<this.lastT())){for(var C=this._components,S=C.length-16,g=0;g<16;++g)C.push(C[S++]);this._time.push(x)}},M.flush=function(x){var C=s.gt(this._time,x)-2;C<0||(this._time.splice(0,C),this._components.splice(0,16*C))},M.lastT=function(){return this._time[this._time.length-1]},M.lookAt=function(x,C,S,g){this.recalcMatrix(x),C=C||this.computedEye,S=S||p,g=g||this.computedUp,this.setMatrix(x,d(this.computedMatrix,C,S,g));for(var P=0,E=0;E<3;++E)P+=Math.pow(S[E]-C[E],2);P=Math.log(Math.sqrt(P)),this.computedRadius[0]=P},M.rotate=function(x,C,S,g){this.recalcMatrix(x);var P=this.computedInverse;C&&f(P,P,C),S&&c(P,P,S),g&&h(P,P,g),this.setMatrix(x,u(this.computedMatrix,P))};var T=[0,0,0];M.pan=function(x,C,S,g){T[0]=-(C||0),T[1]=-(S||0),T[2]=-(g||0),this.recalcMatrix(x);var P=this.computedInverse;v(P,P,T),this.setMatrix(x,u(P,P))},M.translate=function(x,C,S,g){T[0]=C||0,T[1]=S||0,T[2]=g||0,this.recalcMatrix(x);var P=this.computedMatrix;v(P,P,T),this.setMatrix(x,P)},M.setMatrix=function(x,C){if(!(x<this.lastT())){this._time.push(x);for(var S=0;S<16;++S)this._components.push(C[S])}},M.setDistance=function(x,C){this.computedRadius[0]=C},M.setDistanceLimits=function(x,C){var S=this._limits;S[0]=x,S[1]=C},M.getDistanceLimits=function(x){var C=this._limits;return x?(x[0]=C[0],x[1]=C[1],x):C};function L(x){x=x||{};var C=x.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new k(C)}},3090:function(i,a,o){"use strict";i.exports=l;var s=o(3250)[3];function l(u){var c=u.length;if(c<3){for(var k=new Array(c),f=0;f<c;++f)k[f]=f;return c===2&&u[0][0]===u[1][0]&&u[0][1]===u[1][1]?[0]:k}for(var h=new Array(c),f=0;f<c;++f)h[f]=f;h.sort(function(x,C){var S=u[x][0]-u[C][0];return S||u[x][1]-u[C][1]});for(var d=[h[0],h[1]],v=[h[0],h[1]],f=2;f<c;++f){for(var m=h[f],b=u[m],p=d.length;p>1&&s(u[d[p-2]],u[d[p-1]],b)<=0;)p-=1,d.pop();for(d.push(m),p=v.length;p>1&&s(u[v[p-2]],u[v[p-1]],b)>=0;)p-=1,v.pop();v.push(m)}for(var k=new Array(v.length+d.length-2),M=0,f=0,T=d.length;f<T;++f)k[M++]=d[f];for(var L=v.length-2;L>0;--L)k[M++]=v[L];return k}},351:function(i,a,o){"use strict";i.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,h=0,d=0,v={shift:!1,alt:!1,control:!1,meta:!1},m=!1;function b(E){var z=!1;return"altKey"in E&&(z=z||E.altKey!==v.alt,v.alt=!!E.altKey),"shiftKey"in E&&(z=z||E.shiftKey!==v.shift,v.shift=!!E.shiftKey),"ctrlKey"in E&&(z=z||E.ctrlKey!==v.control,v.control=!!E.ctrlKey),"metaKey"in E&&(z=z||E.metaKey!==v.meta,v.meta=!!E.metaKey),z}function p(E,z){var q=s.x(z),U=s.y(z);"buttons"in z&&(E=z.buttons|0),(E!==f||q!==h||U!==d||b(z))&&(f=E|0,h=q||0,d=U||0,c&&c(f,h,d,v))}function k(E){p(0,E)}function M(){(f||h||d||v.shift||v.alt||v.meta||v.control)&&(h=d=0,f=0,v.shift=v.alt=v.control=v.meta=!1,c&&c(0,0,0,v))}function T(E){b(E)&&c&&c(f,h,d,v)}function L(E){s.buttons(E)===0?p(0,E):p(f,E)}function x(E){p(f|s.buttons(E),E)}function C(E){p(f&~s.buttons(E),E)}function S(){m||(m=!0,u.addEventListener("mousemove",L),u.addEventListener("mousedown",x),u.addEventListener("mouseup",C),u.addEventListener("mouseleave",k),u.addEventListener("mouseenter",k),u.addEventListener("mouseout",k),u.addEventListener("mouseover",k),u.addEventListener("blur",M),u.addEventListener("keyup",T),u.addEventListener("keydown",T),u.addEventListener("keypress",T),u!==window&&(window.addEventListener("blur",M),window.addEventListener("keyup",T),window.addEventListener("keydown",T),window.addEventListener("keypress",T)))}function g(){m&&(m=!1,u.removeEventListener("mousemove",L),u.removeEventListener("mousedown",x),u.removeEventListener("mouseup",C),u.removeEventListener("mouseleave",k),u.removeEventListener("mouseenter",k),u.removeEventListener("mouseout",k),u.removeEventListener("mouseover",k),u.removeEventListener("blur",M),u.removeEventListener("keyup",T),u.removeEventListener("keydown",T),u.removeEventListener("keypress",T),u!==window&&(window.removeEventListener("blur",M),window.removeEventListener("keyup",T),window.removeEventListener("keydown",T),window.removeEventListener("keypress",T)))}S();var P={element:u};return Object.defineProperties(P,{enabled:{get:function(){return m},set:function(E){E?S():g()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return v},enumerable:!0}}),P}},24:function(i){var a={left:0,top:0};i.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,d=s(u);return c[0]=f-d.left,c[1]=h-d.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},4687:function(i,a){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<<f-1}else if("button"in c){var f=c.button;if(f===1)return 4;if(f===2)return 2;if(f>=0)return 1<<f}}return 0}a.buttons=o;function s(c){return c.target||c.srcElement||window}a.element=s;function l(c){if(typeof c=="object"){if("offsetX"in c)return c.offsetX;var f=s(c),h=f.getBoundingClientRect();return c.clientX-h.left}return 0}a.x=l;function u(c){if(typeof c=="object"){if("offsetY"in c)return c.offsetY;var f=s(c),h=f.getBoundingClientRect();return c.clientY-h.top}return 0}a.y=u},8512:function(i,a,o){"use strict";var s=o(665);i.exports=l;function l(u,c,f){typeof u=="function"&&(f=!!c,c=u,u=window);var h=s("ex",u),d=function(v){f&&v.preventDefault();var m=v.deltaX||0,b=v.deltaY||0,p=v.deltaZ||0,k=v.deltaMode,M=1;switch(k){case 1:M=h;break;case 2:M=window.innerHeight;break}if(m*=M,b*=M,p*=M,m||b||p)return c(m,b,p,v)};return u.addEventListener("wheel",d),d}},2640:function(i,a,o){"use strict";var s=o(1888);i.exports=c;var l={"false,0,1":function(h,d,v,m,b){return function(k,M,T,L){var x=k.shape[0]|0,C=k.shape[1]|0,S=k.data,g=k.offset|0,P=k.stride[0]|0,E=k.stride[1]|0,z=g,q,U=-P|0,G=0,Z=-E|0,j=0,N=-P-E|0,H=0,re=P|0,oe=E-P*x|0,_e=0,ke=0,Ce=0,ge=2*x|0,ie=m(ge),Se=m(ge),Ee=0,we=0,De=-1,Le=-1,me=0,Pe=-x|0,ce=x|0,He=0,lt=-x-1|0,mt=x-1|0,Vt=0,st=0,ct=0;for(_e=0;_e<x;++_e)ie[Ee++]=v(S[z],M,T,L),z+=re;if(z+=oe,C>0){if(ke=1,ie[Ee++]=v(S[z],M,T,L),z+=re,x>0)for(_e=1,q=S[z],we=ie[Ee]=v(q,M,T,L),me=ie[Ee+De],He=ie[Ee+Pe],Vt=ie[Ee+lt],(we!==me||we!==He||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,me,He,Vt,M,T,L),st=Se[Ee]=Ce++),Ee+=1,z+=re,_e=2;_e<x;++_e)q=S[z],we=ie[Ee]=v(q,M,T,L),me=ie[Ee+De],He=ie[Ee+Pe],Vt=ie[Ee+lt],(we!==me||we!==He||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,me,He,Vt,M,T,L),st=Se[Ee]=Ce++,Vt!==me&&d(Se[Ee+De],st,H,G,Vt,me,M,T,L)),Ee+=1,z+=re;for(z+=oe,Ee=0,ct=De,De=Le,Le=ct,ct=Pe,Pe=ce,ce=ct,ct=lt,lt=mt,mt=ct,ke=2;ke<C;++ke){if(ie[Ee++]=v(S[z],M,T,L),z+=re,x>0)for(_e=1,q=S[z],we=ie[Ee]=v(q,M,T,L),me=ie[Ee+De],He=ie[Ee+Pe],Vt=ie[Ee+lt],(we!==me||we!==He||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,me,He,Vt,M,T,L),st=Se[Ee]=Ce++,Vt!==He&&d(Se[Ee+Pe],st,j,H,He,Vt,M,T,L)),Ee+=1,z+=re,_e=2;_e<x;++_e)q=S[z],we=ie[Ee]=v(q,M,T,L),me=ie[Ee+De],He=ie[Ee+Pe],Vt=ie[Ee+lt],(we!==me||we!==He||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,me,He,Vt,M,T,L),st=Se[Ee]=Ce++,Vt!==He&&d(Se[Ee+Pe],st,j,H,He,Vt,M,T,L),Vt!==me&&d(Se[Ee+De],st,H,G,Vt,me,M,T,L)),Ee+=1,z+=re;ke&1&&(Ee=0),ct=De,De=Le,Le=ct,ct=Pe,Pe=ce,ce=ct,ct=lt,lt=mt,mt=ct,z+=oe}}b(Se),b(ie)}},"false,1,0":function(h,d,v,m,b){return function(k,M,T,L){var x=k.shape[0]|0,C=k.shape[1]|0,S=k.data,g=k.offset|0,P=k.stride[0]|0,E=k.stride[1]|0,z=g,q,U=-P|0,G=0,Z=-E|0,j=0,N=-P-E|0,H=0,re=E|0,oe=P-E*C|0,_e=0,ke=0,Ce=0,ge=2*C|0,ie=m(ge),Se=m(ge),Ee=0,we=0,De=-1,Le=-1,me=0,Pe=-C|0,ce=C|0,He=0,lt=-C-1|0,mt=C-1|0,Vt=0,st=0,ct=0;for(ke=0;ke<C;++ke)ie[Ee++]=v(S[z],M,T,L),z+=re;if(z+=oe,x>0){if(_e=1,ie[Ee++]=v(S[z],M,T,L),z+=re,C>0)for(ke=1,q=S[z],we=ie[Ee]=v(q,M,T,L),He=ie[Ee+Pe],me=ie[Ee+De],Vt=ie[Ee+lt],(we!==He||we!==me||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,He,me,Vt,M,T,L),st=Se[Ee]=Ce++),Ee+=1,z+=re,ke=2;ke<C;++ke)q=S[z],we=ie[Ee]=v(q,M,T,L),He=ie[Ee+Pe],me=ie[Ee+De],Vt=ie[Ee+lt],(we!==He||we!==me||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,He,me,Vt,M,T,L),st=Se[Ee]=Ce++,Vt!==me&&d(Se[Ee+De],st,j,H,me,Vt,M,T,L)),Ee+=1,z+=re;for(z+=oe,Ee=0,ct=Pe,Pe=ce,ce=ct,ct=De,De=Le,Le=ct,ct=lt,lt=mt,mt=ct,_e=2;_e<x;++_e){if(ie[Ee++]=v(S[z],M,T,L),z+=re,C>0)for(ke=1,q=S[z],we=ie[Ee]=v(q,M,T,L),He=ie[Ee+Pe],me=ie[Ee+De],Vt=ie[Ee+lt],(we!==He||we!==me||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,He,me,Vt,M,T,L),st=Se[Ee]=Ce++,Vt!==He&&d(Se[Ee+Pe],st,H,G,Vt,He,M,T,L)),Ee+=1,z+=re,ke=2;ke<C;++ke)q=S[z],we=ie[Ee]=v(q,M,T,L),He=ie[Ee+Pe],me=ie[Ee+De],Vt=ie[Ee+lt],(we!==He||we!==me||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,He,me,Vt,M,T,L),st=Se[Ee]=Ce++,Vt!==me&&d(Se[Ee+De],st,j,H,me,Vt,M,T,L),Vt!==He&&d(Se[Ee+Pe],st,H,G,Vt,He,M,T,L)),Ee+=1,z+=re;_e&1&&(Ee=0),ct=Pe,Pe=ce,ce=ct,ct=De,De=Le,Le=ct,ct=lt,lt=mt,mt=ct,z+=oe}}b(Se),b(ie)}}};function u(f,h,d,v,m,b){var p=[b,m].join(","),k=l[p];return k(f,h,d,s.mallocUint32,s.freeUint32)}function c(f){function h(M){throw new Error("ndarray-extract-contour: "+M)}typeof f!="object"&&h("Must specify arguments");var d=f.order;Array.isArray(d)||h("Must specify order");var v=f.arrayArguments||1;v<1&&h("Must have at least one array argument");var m=f.scalarArguments||0;m<0&&h("Scalar arg count must be > 0"),typeof f.vertex!="function"&&h("Must specify vertex creation function"),typeof f.cell!="function"&&h("Must specify cell creation function"),typeof f.phase!="function"&&h("Must specify phase function");for(var b=f.getters||[],p=new Array(v),k=0;k<v;++k)b.indexOf(k)>=0?p[k]=!0:p[k]=!1;return u(f.vertex,f.cell,f.phase,m,d,p)}},6199:function(i,a,o){"use strict";var s=o(1338),l={zero:function(L,x,C,S){var g=L[0],P=C[0];S|=0;var E=0,z=P;for(E=0;E<g;++E)x[S]=0,S+=z},fdTemplate1:function(L,x,C,S,g,P,E){var z=L[0],q=C[0],U=P[0],G=-1*q,Z=q;S|=0,E|=0;var j=0,N=q,H=U;for(j=0;j<z;++j)g[E]=.5*(x[S+G]-x[S+Z]),S+=N,E+=H},fdTemplate2:function(L,x,C,S,g,P,E,z,q,U){var G=L[0],Z=L[1],j=C[0],N=C[1],H=P[0],re=P[1],oe=q[0],_e=q[1],ke=-1*j,Ce=j,ge=-1*N,ie=N;S|=0,E|=0,U|=0;var Se=0,Ee=0,we=N,De=j-Z*N,Le=re,me=H-Z*re,Pe=_e,ce=oe-Z*_e;for(Ee=0;Ee<G;++Ee){for(Se=0;Se<Z;++Se)g[E]=.5*(x[S+ke]-x[S+Ce]),z[U]=.5*(x[S+ge]-x[S+ie]),S+=we,E+=Le,U+=Pe;S+=De,E+=me,U+=ce}}},u={cdiff:function(L){var x={};return function(S,g,P){var E=S.dtype,z=S.order,q=g.dtype,U=g.order,G=P.dtype,Z=P.order,j=[E,z.join(),q,U.join(),G,Z.join()].join(),N=x[j];return N||(x[j]=N=L([E,z,q,U,G,Z])),N(S.shape.slice(0),S.data,S.stride,S.offset|0,g.data,g.stride,g.offset|0,P.data,P.stride,P.offset|0)}},zero:function(L){var x={};return function(S){var g=S.dtype,P=S.order,E=[g,P.join()].join(),z=x[E];return z||(x[E]=z=L([g,P])),z(S.shape.slice(0),S.data,S.stride,S.offset|0)}},fdTemplate1:function(L){var x={};return function(S,g){var P=S.dtype,E=S.order,z=g.dtype,q=g.order,U=[P,E.join(),z,q.join()].join(),G=x[U];return G||(x[U]=G=L([P,E,z,q])),G(S.shape.slice(0),S.data,S.stride,S.offset|0,g.data,g.stride,g.offset|0)}},fdTemplate2:function(L){var x={};return function(S,g,P){var E=S.dtype,z=S.order,q=g.dtype,U=g.order,G=P.dtype,Z=P.order,j=[E,z.join(),q,U.join(),G,Z.join()].join(),N=x[j];return N||(x[j]=N=L([E,z,q,U,G,Z])),N(S.shape.slice(0),S.data,S.stride,S.offset|0,g.data,g.stride,g.offset|0,P.data,P.stride,P.offset|0)}}};function c(L){var x=u[L.funcName];return x(f.bind(void 0,L))}function f(L){return l[L.funcName]}function h(L){return c({funcName:L.funcName})}var d={},v={},m={body:"",args:[],thisVars:[],localVars:[]},b=h({funcName:"cdiff"}),p=h({funcName:"zero"});function k(L){return L in d?d[L]:d[L]=h({funcName:"fdTemplate"+L})}function M(L,x,C,S){return function(g,P){var E=P.shape.slice();return E[0]>2&&E[1]>2&&S(P.pick(-1,-1).lo(1,1).hi(E[0]-2,E[1]-2),g.pick(-1,-1,0).lo(1,1).hi(E[0]-2,E[1]-2),g.pick(-1,-1,1).lo(1,1).hi(E[0]-2,E[1]-2)),E[1]>2&&(C(P.pick(0,-1).lo(1).hi(E[1]-2),g.pick(0,-1,1).lo(1).hi(E[1]-2)),x(g.pick(0,-1,0).lo(1).hi(E[1]-2))),E[1]>2&&(C(P.pick(E[0]-1,-1).lo(1).hi(E[1]-2),g.pick(E[0]-1,-1,1).lo(1).hi(E[1]-2)),x(g.pick(E[0]-1,-1,0).lo(1).hi(E[1]-2))),E[0]>2&&(C(P.pick(-1,0).lo(1).hi(E[0]-2),g.pick(-1,0,0).lo(1).hi(E[0]-2)),x(g.pick(-1,0,1).lo(1).hi(E[0]-2))),E[0]>2&&(C(P.pick(-1,E[1]-1).lo(1).hi(E[0]-2),g.pick(-1,E[1]-1,0).lo(1).hi(E[0]-2)),x(g.pick(-1,E[1]-1,1).lo(1).hi(E[0]-2))),g.set(0,0,0,0),g.set(0,0,1,0),g.set(E[0]-1,0,0,0),g.set(E[0]-1,0,1,0),g.set(0,E[1]-1,0,0),g.set(0,E[1]-1,1,0),g.set(E[0]-1,E[1]-1,0,0),g.set(E[0]-1,E[1]-1,1,0),g}}function T(L){var x=L.join(),E=v[x];if(E)return E;for(var C=L.length,S=[b,p],g=1;g<=C;++g)S.push(k(g));var P=M,E=P.apply(void 0,S);return v[x]=E,E}i.exports=function(x,C,S){if(Array.isArray(S)||(typeof S=="string"?S=s(C.dimension,S):S=s(C.dimension,"clamp")),C.size===0)return x;if(C.dimension===0)return x.set(0),x;var g=T(S);return g(x,C)}},4317:function(i){"use strict";function a(c,f){var h=Math.floor(f),d=f-h,v=0<=h&&h<c.shape[0],m=0<=h+1&&h+1<c.shape[0],b=v?+c.get(h):0,p=m?+c.get(h+1):0;return(1-d)*b+d*p}function o(c,f,h){var d=Math.floor(f),v=f-d,m=0<=d&&d<c.shape[0],b=0<=d+1&&d+1<c.shape[0],p=Math.floor(h),k=h-p,M=0<=p&&p<c.shape[1],T=0<=p+1&&p+1<c.shape[1],L=m&&M?c.get(d,p):0,x=m&&T?c.get(d,p+1):0,C=b&&M?c.get(d+1,p):0,S=b&&T?c.get(d+1,p+1):0;return(1-k)*((1-v)*L+v*C)+k*((1-v)*x+v*S)}function s(c,f,h,d){var v=Math.floor(f),m=f-v,b=0<=v&&v<c.shape[0],p=0<=v+1&&v+1<c.shape[0],k=Math.floor(h),M=h-k,T=0<=k&&k<c.shape[1],L=0<=k+1&&k+1<c.shape[1],x=Math.floor(d),C=d-x,S=0<=x&&x<c.shape[2],g=0<=x+1&&x+1<c.shape[2],P=b&&T&&S?c.get(v,k,x):0,E=b&&L&&S?c.get(v,k+1,x):0,z=p&&T&&S?c.get(v+1,k,x):0,q=p&&L&&S?c.get(v+1,k+1,x):0,U=b&&T&&g?c.get(v,k,x+1):0,G=b&&L&&g?c.get(v,k+1,x+1):0,Z=p&&T&&g?c.get(v+1,k,x+1):0,j=p&&L&&g?c.get(v+1,k+1,x+1):0;return(1-C)*((1-M)*((1-m)*P+m*z)+M*((1-m)*E+m*q))+C*((1-M)*((1-m)*U+m*Z)+M*((1-m)*G+m*j))}function l(c){var f=c.shape.length|0,h=new Array(f),d=new Array(f),v=new Array(f),m=new Array(f),b,p;for(b=0;b<f;++b)p=+arguments[b+1],h[b]=Math.floor(p),d[b]=p-h[b],v[b]=0<=h[b]&&h[b]<c.shape[b],m[b]=0<=h[b]+1&&h[b]+1<c.shape[b];var k=0,M,T,L;e:for(b=0;b<1<<f;++b){for(T=1,L=c.offset,M=0;M<f;++M)if(b&1<<M){if(!m[M])continue e;T*=d[M],L+=c.stride[M]*(h[M]+1)}else{if(!v[M])continue e;T*=1-d[M],L+=c.stride[M]*h[M]}k+=T*c.data[L]}return k}function u(c,f,h,d){switch(c.shape.length){case 0:return 0;case 1:return a(c,f);case 2:return o(c,f,h);case 3:return s(c,f,h,d);default:return l.apply(void 0,arguments)}}i.exports=u,i.exports.d1=a,i.exports.d2=o,i.exports.d3=s},5298:function(i,a){"use strict";var o={"float64,2,1,0":function(){return function(v,m,b,p,k){var M=v[0],T=v[1],L=v[2],x=b[0],C=b[1],S=b[2];p|=0;var g=0,P=0,E=0,z=S,q=C-L*S,U=x-T*C;for(E=0;E<M;++E){for(P=0;P<T;++P){for(g=0;g<L;++g)m[p]/=k,p+=z;p+=q}p+=U}}},"uint8,2,0,1,float64,2,1,0":function(){return function(v,m,b,p,k,M,T,L){var x=v[0],C=v[1],S=v[2],g=b[0],P=b[1],E=b[2],z=M[0],q=M[1],U=M[2];p|=0,T|=0;for(var G=p,Z=T,j=v[0]|0;j>0;){j<64?(x=j,j=0):(x=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64),p=G+j*g+N*P,T=Z+j*z+N*q;var H=0,re=0,oe=0,_e=E,ke=g-S*E,Ce=P-x*g,ge=U,ie=z-S*U,Se=q-x*z;for(oe=0;oe<C;++oe){for(re=0;re<x;++re){for(H=0;H<S;++H)m[p]=k[T]*L,p+=_e,T+=ge;p+=ke,T+=ie}p+=Ce,T+=Se}}}}},"float32,1,0,float32,1,0":function(){return function(v,m,b,p,k,M,T){var L=v[0],x=v[1],C=b[0],S=b[1],g=M[0],P=M[1];p|=0,T|=0;var E=0,z=0,q=S,U=C-x*S,G=P,Z=g-x*P;for(z=0;z<L;++z){for(E=0;E<x;++E)m[p]=k[T],p+=q,T+=G;p+=U,T+=Z}}},"float32,1,0,float32,0,1":function(){return function(v,m,b,p,k,M,T){var L=v[0],x=v[1],C=b[0],S=b[1],g=M[0],P=M[1];p|=0,T|=0;for(var E=p,z=T,q=v[1]|0;q>0;){q<64?(x=q,q=0):(x=64,q-=64);for(var U=v[0]|0;U>0;){U<64?(L=U,U=0):(L=64,U-=64),p=E+q*S+U*C,T=z+q*P+U*g;var G=0,Z=0,j=S,N=C-x*S,H=P,re=g-x*P;for(Z=0;Z<L;++Z){for(G=0;G<x;++G)m[p]=k[T],p+=j,T+=H;p+=N,T+=re}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(v,m,b,p,k,M,T){var L=v[0],x=v[1],C=v[2],S=b[0],g=b[1],P=b[2],E=M[0],z=M[1],q=M[2];p|=0,T|=0;for(var U=p,G=T,Z=v[2]|0;Z>0;){Z<64?(C=Z,Z=0):(C=64,Z-=64);for(var j=v[0]|0;j>0;){j<64?(L=j,j=0):(L=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(x=N,N=0):(x=64,N-=64),p=U+Z*P+j*S+N*g,T=G+Z*q+j*E+N*z;var H=0,re=0,oe=0,_e=P,ke=S-C*P,Ce=g-L*S,ge=q,ie=E-C*q,Se=z-L*E;for(oe=0;oe<x;++oe){for(re=0;re<L;++re){for(H=0;H<C;++H)m[p]=k[T],p+=_e,T+=ge;p+=ke,T+=ie}p+=Ce,T+=Se}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(v,m,b,p,k,M,T){var L=v[0],x=v[1],C=v[2],S=b[0],g=b[1],P=b[2],E=M[0],z=M[1],q=M[2];p|=0,T|=0;var U=0,G=0,Z=0,j=P,N=S-C*P,H=g-L*S,re=q,oe=E-C*q,_e=z-L*E;for(Z=0;Z<x;++Z){for(G=0;G<L;++G){for(U=0;U<C;++U)m[p]=k[T],p+=j,T+=re;p+=N,T+=oe}p+=H,T+=_e}}}};function s(d,v){var m=v.join(","),b=o[m];return b()}var l=s,u={mul:function(d){var v={};return function(b,p,k){var M=b.dtype,T=b.order,L=p.dtype,x=p.order,C=k.dtype,S=k.order,g=[M,T.join(),L,x.join(),C,S.join()].join(),P=v[g];return P||(v[g]=P=d([M,T,L,x,C,S])),P(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,k.data,k.stride,k.offset|0)}},muls:function(d){var v={};return function(b,p,k){var M=b.dtype,T=b.order,L=p.dtype,x=p.order,C=[M,T.join(),L,x.join()].join(),S=v[C];return S||(v[C]=S=d([M,T,L,x])),S(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,k)}},mulseq:function(d){var v={};return function(b,p){var k=b.dtype,M=b.order,T=[k,M.join()].join(),L=v[T];return L||(v[T]=L=d([k,M])),L(b.shape.slice(0),b.data,b.stride,b.offset|0,p)}},div:function(d){var v={};return function(b,p,k){var M=b.dtype,T=b.order,L=p.dtype,x=p.order,C=k.dtype,S=k.order,g=[M,T.join(),L,x.join(),C,S.join()].join(),P=v[g];return P||(v[g]=P=d([M,T,L,x,C,S])),P(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,k.data,k.stride,k.offset|0)}},divs:function(d){var v={};return function(b,p,k){var M=b.dtype,T=b.order,L=p.dtype,x=p.order,C=[M,T.join(),L,x.join()].join(),S=v[C];return S||(v[C]=S=d([M,T,L,x])),S(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0,k)}},divseq:function(d){var v={};return function(b,p){var k=b.dtype,M=b.order,T=[k,M.join()].join(),L=v[T];return L||(v[T]=L=d([k,M])),L(b.shape.slice(0),b.data,b.stride,b.offset|0,p)}},assign:function(d){var v={};return function(b,p){var k=b.dtype,M=b.order,T=p.dtype,L=p.order,x=[k,M.join(),T,L.join()].join(),C=v[x];return C||(v[x]=C=d([k,M,T,L])),C(b.shape.slice(0),b.data,b.stride,b.offset|0,p.data,p.stride,p.offset|0)}}};function c(d){var v=u[d.funcName];return v(l.bind(void 0,d))}function f(d){return c({funcName:d.funcName})}var h={mul:"*",div:"/"};(function(){for(var d in h)a[d]=f({funcName:d}),a[d+"s"]=f({funcName:d+"s"}),a[d+"seq"]=f({funcName:d+"seq"})})(),a.assign=f({funcName:"assign"})},9994:function(i,a,o){"use strict";var s=o(9618),l=o(8277);i.exports=function(c,f){for(var h=[],d=c,v=1;Array.isArray(d);)h.push(d.length),v*=d.length,d=d[0];return h.length===0?s():(f||(f=s(new Float64Array(v),h)),l(f,c),f)}},8277:function(i){"use strict";function a(){return function(f,h,d,v,m){var b=f[0],p=f[1],k=f[2],M=d[0],T=d[1],L=d[2],x=[0,0,0];v|=0;var C=0,S=0,g=0,P=L,E=T-k*L,z=M-p*T;for(g=0;g<b;++g){for(S=0;S<p;++S){for(C=0;C<k;++C){{var q=m,U;for(U=0;U<x.length-1;++U)q=q[x[U]];h[v]=q[x[x.length-1]]}v+=P,++x[2]}v+=E,x[2]-=k,++x[1]}v+=z,x[1]-=p,++x[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,m){var b=v.dtype,p=v.order,k=[b,p.join()].join(),M=h[k];return M||(h[k]=M=f([b,p])),M(v.shape.slice(0),v.data,v.stride,v.offset|0,m)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:"convert"})},7640:function(i,a,o){"use strict";var s=o(1888);function l(m){switch(m){case"uint32":return[s.mallocUint32,s.freeUint32];default:return null}}var u={"uint32,1,0":function(m,b){return function(k,M,T,L,x,C,S,g,P,E,z){var q,U,G,Z=k*x+L,j,N=m(g),H,re,oe,_e;for(q=k+1;q<=M;++q){for(U=q,Z+=x,G=Z,H=0,re=Z,j=0;j<g;++j)N[H++]=T[re],re+=P;e:for(;U-- >k;){H=0,re=G-x;t:for(j=0;j<g;++j){if(oe=T[re],_e=N[H],oe<_e)break e;if(oe>_e)break t;re+=E,H+=z}for(H=G,re=G-x,j=0;j<g;++j)T[H]=T[re],H+=P,re+=P;G-=x}for(H=G,re=0,j=0;j<g;++j)T[H]=N[re++],H+=P}b(N)}}};function c(m,b){var p=l(b),k=[b,m].join(","),M=u[k];return p?M(p[0],p[1]):M()}var f={"uint32,1,0":function(m,b,p){return function k(M,T,L,x,C,S,g,P,E,z,q){var U=(T-M+1)/6|0,G=M+U,Z=T-U,j=M+T>>1,N=j-U,H=j+U,re=G,oe=N,_e=j,ke=H,Ce=Z,ge=M+1,ie=T-1,Se=!0,Ee,we,De,Le,me,Pe,ce,He,lt,mt=0,Vt=0,st=0,ct,Qt,Ht,nr,tt,je,Ue,Ae,rt,St,Tt,dt,Et,pt,Xt,or,_r=P,Er=b(_r),ei=b(_r);Qt=C*re,Ht=C*oe,or=x;e:for(ct=0;ct<P;++ct){if(ce=Qt+or,He=Ht+or,st=L[ce]-L[He],st>0){we=re,re=oe,oe=we;break e}if(st<0)break e;or+=z}Qt=C*ke,Ht=C*Ce,or=x;e:for(ct=0;ct<P;++ct){if(ce=Qt+or,He=Ht+or,st=L[ce]-L[He],st>0){we=ke,ke=Ce,Ce=we;break e}if(st<0)break e;or+=z}Qt=C*re,Ht=C*_e,or=x;e:for(ct=0;ct<P;++ct){if(ce=Qt+or,He=Ht+or,st=L[ce]-L[He],st>0){we=re,re=_e,_e=we;break e}if(st<0)break e;or+=z}Qt=C*oe,Ht=C*_e,or=x;e:for(ct=0;ct<P;++ct){if(ce=Qt+or,He=Ht+or,st=L[ce]-L[He],st>0){we=oe,oe=_e,_e=we;break e}if(st<0)break e;or+=z}Qt=C*re,Ht=C*ke,or=x;e:for(ct=0;ct<P;++ct){if(ce=Qt+or,He=Ht+or,st=L[ce]-L[He],st>0){we=re,re=ke,ke=we;break e}if(st<0)break e;or+=z}Qt=C*_e,Ht=C*ke,or=x;e:for(ct=0;ct<P;++ct){if(ce=Qt+or,He=Ht+or,st=L[ce]-L[He],st>0){we=_e,_e=ke,ke=we;break e}if(st<0)break e;or+=z}Qt=C*oe,Ht=C*Ce,or=x;e:for(ct=0;ct<P;++ct){if(ce=Qt+or,He=Ht+or,st=L[ce]-L[He],st>0){we=oe,oe=Ce,Ce=we;break e}if(st<0)break e;or+=z}Qt=C*oe,Ht=C*_e,or=x;e:for(ct=0;ct<P;++ct){if(ce=Qt+or,He=Ht+or,st=L[ce]-L[He],st>0){we=oe,oe=_e,_e=we;break e}if(st<0)break e;or+=z}Qt=C*ke,Ht=C*Ce,or=x;e:for(ct=0;ct<P;++ct){if(ce=Qt+or,He=Ht+or,st=L[ce]-L[He],st>0){we=ke,ke=Ce,Ce=we;break e}if(st<0)break e;or+=z}for(Qt=C*re,Ht=C*oe,nr=C*_e,tt=C*ke,je=C*Ce,Ue=C*G,Ae=C*j,rt=C*Z,Xt=0,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,lt=nr+or,St=tt+or,Tt=je+or,dt=Ue+or,Et=Ae+or,pt=rt+or,Er[Xt]=L[He],ei[Xt]=L[St],Se=Se&&Er[Xt]===ei[Xt],De=L[ce],Le=L[lt],me=L[Tt],L[dt]=De,L[Et]=Le,L[pt]=me,++Xt,or+=E;for(Qt=C*N,Ht=C*M,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,L[ce]=L[He],or+=E;for(Qt=C*H,Ht=C*T,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,L[ce]=L[He],or+=E;if(Se)for(Pe=ge;Pe<=ie;++Pe){ce=x+Pe*C,Xt=0;e:for(ct=0;ct<P;++ct){if(st=L[ce]-Er[Xt],st!==0)break e;Xt+=q,ce+=z}if(st!==0)if(st<0){if(Pe!==ge)for(Qt=C*Pe,Ht=C*ge,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,Ee=L[ce],L[ce]=L[He],L[He]=Ee,or+=E;++ge}else for(;;){ce=x+ie*C,Xt=0;e:for(ct=0;ct<P;++ct){if(st=L[ce]-Er[Xt],st!==0)break e;Xt+=q,ce+=z}if(st>0)ie--;else if(st<0){for(Qt=C*Pe,Ht=C*ge,nr=C*ie,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,lt=nr+or,Ee=L[ce],L[ce]=L[He],L[He]=L[lt],L[lt]=Ee,or+=E;++ge,--ie;break}else{for(Qt=C*Pe,Ht=C*ie,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,Ee=L[ce],L[ce]=L[He],L[He]=Ee,or+=E;--ie;break}}}else for(Pe=ge;Pe<=ie;++Pe){ce=x+Pe*C,Xt=0;e:for(ct=0;ct<P;++ct){if(mt=L[ce]-Er[Xt],mt!==0)break e;Xt+=q,ce+=z}if(mt<0){if(Pe!==ge)for(Qt=C*Pe,Ht=C*ge,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,Ee=L[ce],L[ce]=L[He],L[He]=Ee,or+=E;++ge}else{ce=x+Pe*C,Xt=0;e:for(ct=0;ct<P;++ct){if(Vt=L[ce]-ei[Xt],Vt!==0)break e;Xt+=q,ce+=z}if(Vt>0)for(;;){ce=x+ie*C,Xt=0;e:for(ct=0;ct<P;++ct){if(st=L[ce]-ei[Xt],st!==0)break e;Xt+=q,ce+=z}if(st>0){if(--ie<Pe)break;continue}else{ce=x+ie*C,Xt=0;e:for(ct=0;ct<P;++ct){if(st=L[ce]-Er[Xt],st!==0)break e;Xt+=q,ce+=z}if(st<0){for(Qt=C*Pe,Ht=C*ge,nr=C*ie,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,lt=nr+or,Ee=L[ce],L[ce]=L[He],L[He]=L[lt],L[lt]=Ee,or+=E;++ge,--ie}else{for(Qt=C*Pe,Ht=C*ie,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,Ee=L[ce],L[ce]=L[He],L[He]=Ee,or+=E;--ie}break}}}}for(Qt=C*M,Ht=C*(ge-1),Xt=0,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,L[ce]=L[He],L[He]=Er[Xt],++Xt,or+=E;for(Qt=C*T,Ht=C*(ie+1),Xt=0,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,L[ce]=L[He],L[He]=ei[Xt],++Xt,or+=E;if(ge-2-M<=32?m(M,ge-2,L,x,C,S,g,P,E,z,q):k(M,ge-2,L,x,C,S,g,P,E,z,q),T-(ie+2)<=32?m(ie+2,T,L,x,C,S,g,P,E,z,q):k(ie+2,T,L,x,C,S,g,P,E,z,q),Se){p(Er),p(ei);return}if(ge<G&&ie>Z){e:for(;;){for(ce=x+ge*C,Xt=0,or=x,ct=0;ct<P;++ct){if(L[ce]!==Er[Xt])break e;++Xt,ce+=E}++ge}e:for(;;){for(ce=x+ie*C,Xt=0,or=x,ct=0;ct<P;++ct){if(L[ce]!==ei[Xt])break e;++Xt,ce+=E}--ie}for(Pe=ge;Pe<=ie;++Pe){ce=x+Pe*C,Xt=0;e:for(ct=0;ct<P;++ct){if(mt=L[ce]-Er[Xt],mt!==0)break e;Xt+=q,ce+=z}if(mt===0){if(Pe!==ge)for(Qt=C*Pe,Ht=C*ge,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,Ee=L[ce],L[ce]=L[He],L[He]=Ee,or+=E;++ge}else{ce=x+Pe*C,Xt=0;e:for(ct=0;ct<P;++ct){if(Vt=L[ce]-ei[Xt],Vt!==0)break e;Xt+=q,ce+=z}if(Vt===0)for(;;){ce=x+ie*C,Xt=0;e:for(ct=0;ct<P;++ct){if(st=L[ce]-ei[Xt],st!==0)break e;Xt+=q,ce+=z}if(st===0){if(--ie<Pe)break;continue}else{ce=x+ie*C,Xt=0;e:for(ct=0;ct<P;++ct){if(st=L[ce]-Er[Xt],st!==0)break e;Xt+=q,ce+=z}if(st<0){for(Qt=C*Pe,Ht=C*ge,nr=C*ie,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,lt=nr+or,Ee=L[ce],L[ce]=L[He],L[He]=L[lt],L[lt]=Ee,or+=E;++ge,--ie}else{for(Qt=C*Pe,Ht=C*ie,or=x,ct=0;ct<P;++ct)ce=Qt+or,He=Ht+or,Ee=L[ce],L[ce]=L[He],L[He]=Ee,or+=E;--ie}break}}}}}p(Er),p(ei),ie-ge<=32?m(ge,ie,L,x,C,S,g,P,E,z,q):k(ge,ie,L,x,C,S,g,P,E,z,q)}}};function h(m,b,p){var k=l(b),M=[b,m].join(","),T=f[M];return m.length>1&&k?T(p,k[0],k[1]):T(p)}var d={"uint32,1,0":function(m,b){return function(p){var k=p.data,M=p.offset|0,T=p.shape,L=p.stride,x=L[0]|0,C=T[0]|0,S=L[1]|0,g=T[1]|0,P=S,E=S,z=1;C<=32?m(0,C-1,k,M,x,S,C,g,P,E,z):b(0,C-1,k,M,x,S,C,g,P,E,z)}}};function v(m,b){var p=[b,m].join(","),k=d[p],M=c(m,b),T=h(m,b,M);return k(M,T)}i.exports=v},446:function(i,a,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,h=c.dtype,d=[f,h],v=d.join(":"),m=l[v];return m||(l[v]=m=s(f,h)),m(c),c}i.exports=u},9618:function(i,a,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(b,p){return b[0]-p[0]}function c(){var b=this.stride,p=new Array(b.length),k;for(k=0;k<p.length;++k)p[k]=[Math.abs(b[k]),k];p.sort(u);var M=new Array(p.length);for(k=0;k<M.length;++k)M[k]=p[k][1];return M}var f={T:function(b){function p(M){this.data=M}var k=p.prototype;return k.dtype=b,k.index=function(){return-1},k.size=0,k.dimension=-1,k.shape=k.stride=k.order=[],k.lo=k.hi=k.transpose=k.step=function(){return new p(this.data)},k.get=k.set=function(){},k.pick=function(){return null},function(T){return new p(T)}},0:function(b,p){function k(T,L){this.data=T,this.offset=L}var M=k.prototype;return M.dtype=b,M.index=function(){return this.offset},M.dimension=0,M.size=1,M.shape=M.stride=M.order=[],M.lo=M.hi=M.transpose=M.step=function(){return new k(this.data,this.offset)},M.pick=function(){return p(this.data)},M.valueOf=M.get=function(){return b==="generic"?this.data.get(this.offset):this.data[this.offset]},M.set=function(L){return b==="generic"?this.data.set(this.offset,L):this.data[this.offset]=L},function(L,x,C,S){return new k(L,S)}},1:function(b,p,k){function M(L,x,C,S){this.data=L,this.shape=[x],this.stride=[C],this.offset=S|0}var T=M.prototype;return T.dtype=b,T.dimension=1,Object.defineProperty(T,"size",{get:function(){return this.shape[0]}}),T.order=[0],T.set=function(x,C){return b==="generic"?this.data.set(this.offset+this.stride[0]*x,C):this.data[this.offset+this.stride[0]*x]=C},T.get=function(x){return b==="generic"?this.data.get(this.offset+this.stride[0]*x):this.data[this.offset+this.stride[0]*x]},T.index=function(x){return this.offset+this.stride[0]*x},T.hi=function(x){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,this.stride[0],this.offset)},T.lo=function(x){var C=this.offset,S=0,g=this.shape[0],P=this.stride[0];return typeof x=="number"&&x>=0&&(S=x|0,C+=P*S,g-=S),new M(this.data,g,P,C)},T.step=function(x){var C=this.shape[0],S=this.stride[0],g=this.offset,P=0,E=Math.ceil;return typeof x=="number"&&(P=x|0,P<0?(g+=S*(C-1),C=E(-C/P)):C=E(C/P),S*=P),new M(this.data,C,S,g)},T.transpose=function(x){x=x===void 0?0:x|0;var C=this.shape,S=this.stride;return new M(this.data,C[x],S[x],this.offset)},T.pick=function(x){var C=[],S=[],g=this.offset;typeof x=="number"&&x>=0?g=g+this.stride[0]*x|0:(C.push(this.shape[0]),S.push(this.stride[0]));var P=p[C.length+1];return P(this.data,C,S,g)},function(x,C,S,g){return new M(x,C[0],S[0],g)}},2:function(b,p,k){function M(L,x,C,S,g,P){this.data=L,this.shape=[x,C],this.stride=[S,g],this.offset=P|0}var T=M.prototype;return T.dtype=b,T.dimension=2,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(T,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),T.set=function(x,C,S){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C,S):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]=S},T.get=function(x,C){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]},T.index=function(x,C){return this.offset+this.stride[0]*x+this.stride[1]*C},T.hi=function(x,C){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},T.lo=function(x,C){var S=this.offset,g=0,P=this.shape[0],E=this.shape[1],z=this.stride[0],q=this.stride[1];return typeof x=="number"&&x>=0&&(g=x|0,S+=z*g,P-=g),typeof C=="number"&&C>=0&&(g=C|0,S+=q*g,E-=g),new M(this.data,P,E,z,q,S)},T.step=function(x,C){var S=this.shape[0],g=this.shape[1],P=this.stride[0],E=this.stride[1],z=this.offset,q=0,U=Math.ceil;return typeof x=="number"&&(q=x|0,q<0?(z+=P*(S-1),S=U(-S/q)):S=U(S/q),P*=q),typeof C=="number"&&(q=C|0,q<0?(z+=E*(g-1),g=U(-g/q)):g=U(g/q),E*=q),new M(this.data,S,g,P,E,z)},T.transpose=function(x,C){x=x===void 0?0:x|0,C=C===void 0?1:C|0;var S=this.shape,g=this.stride;return new M(this.data,S[x],S[C],g[x],g[C],this.offset)},T.pick=function(x,C){var S=[],g=[],P=this.offset;typeof x=="number"&&x>=0?P=P+this.stride[0]*x|0:(S.push(this.shape[0]),g.push(this.stride[0])),typeof C=="number"&&C>=0?P=P+this.stride[1]*C|0:(S.push(this.shape[1]),g.push(this.stride[1]));var E=p[S.length+1];return E(this.data,S,g,P)},function(x,C,S,g){return new M(x,C[0],C[1],S[0],S[1],g)}},3:function(b,p,k){function M(L,x,C,S,g,P,E,z){this.data=L,this.shape=[x,C,S],this.stride=[g,P,E],this.offset=z|0}var T=M.prototype;return T.dtype=b,T.dimension=3,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(T,"order",{get:function(){var x=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),S=Math.abs(this.stride[2]);return x>C?C>S?[2,1,0]:x>S?[1,2,0]:[1,0,2]:x>S?[2,0,1]:S>C?[0,1,2]:[0,2,1]}}),T.set=function(x,C,S,g){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S,g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S]=g},T.get=function(x,C,S){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S]},T.index=function(x,C,S){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S},T.hi=function(x,C,S){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof S!="number"||S<0?this.shape[2]:S|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},T.lo=function(x,C,S){var g=this.offset,P=0,E=this.shape[0],z=this.shape[1],q=this.shape[2],U=this.stride[0],G=this.stride[1],Z=this.stride[2];return typeof x=="number"&&x>=0&&(P=x|0,g+=U*P,E-=P),typeof C=="number"&&C>=0&&(P=C|0,g+=G*P,z-=P),typeof S=="number"&&S>=0&&(P=S|0,g+=Z*P,q-=P),new M(this.data,E,z,q,U,G,Z,g)},T.step=function(x,C,S){var g=this.shape[0],P=this.shape[1],E=this.shape[2],z=this.stride[0],q=this.stride[1],U=this.stride[2],G=this.offset,Z=0,j=Math.ceil;return typeof x=="number"&&(Z=x|0,Z<0?(G+=z*(g-1),g=j(-g/Z)):g=j(g/Z),z*=Z),typeof C=="number"&&(Z=C|0,Z<0?(G+=q*(P-1),P=j(-P/Z)):P=j(P/Z),q*=Z),typeof S=="number"&&(Z=S|0,Z<0?(G+=U*(E-1),E=j(-E/Z)):E=j(E/Z),U*=Z),new M(this.data,g,P,E,z,q,U,G)},T.transpose=function(x,C,S){x=x===void 0?0:x|0,C=C===void 0?1:C|0,S=S===void 0?2:S|0;var g=this.shape,P=this.stride;return new M(this.data,g[x],g[C],g[S],P[x],P[C],P[S],this.offset)},T.pick=function(x,C,S){var g=[],P=[],E=this.offset;typeof x=="number"&&x>=0?E=E+this.stride[0]*x|0:(g.push(this.shape[0]),P.push(this.stride[0])),typeof C=="number"&&C>=0?E=E+this.stride[1]*C|0:(g.push(this.shape[1]),P.push(this.stride[1])),typeof S=="number"&&S>=0?E=E+this.stride[2]*S|0:(g.push(this.shape[2]),P.push(this.stride[2]));var z=p[g.length+1];return z(this.data,g,P,E)},function(x,C,S,g){return new M(x,C[0],C[1],C[2],S[0],S[1],S[2],g)}},4:function(b,p,k){function M(L,x,C,S,g,P,E,z,q,U){this.data=L,this.shape=[x,C,S,g],this.stride=[P,E,z,q],this.offset=U|0}var T=M.prototype;return T.dtype=b,T.dimension=4,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(T,"order",{get:k}),T.set=function(x,C,S,g,P){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g,P):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g]=P},T.get=function(x,C,S,g){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g]},T.index=function(x,C,S,g){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g},T.hi=function(x,C,S,g){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof S!="number"||S<0?this.shape[2]:S|0,typeof g!="number"||g<0?this.shape[3]:g|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},T.lo=function(x,C,S,g){var P=this.offset,E=0,z=this.shape[0],q=this.shape[1],U=this.shape[2],G=this.shape[3],Z=this.stride[0],j=this.stride[1],N=this.stride[2],H=this.stride[3];return typeof x=="number"&&x>=0&&(E=x|0,P+=Z*E,z-=E),typeof C=="number"&&C>=0&&(E=C|0,P+=j*E,q-=E),typeof S=="number"&&S>=0&&(E=S|0,P+=N*E,U-=E),typeof g=="number"&&g>=0&&(E=g|0,P+=H*E,G-=E),new M(this.data,z,q,U,G,Z,j,N,H,P)},T.step=function(x,C,S,g){var P=this.shape[0],E=this.shape[1],z=this.shape[2],q=this.shape[3],U=this.stride[0],G=this.stride[1],Z=this.stride[2],j=this.stride[3],N=this.offset,H=0,re=Math.ceil;return typeof x=="number"&&(H=x|0,H<0?(N+=U*(P-1),P=re(-P/H)):P=re(P/H),U*=H),typeof C=="number"&&(H=C|0,H<0?(N+=G*(E-1),E=re(-E/H)):E=re(E/H),G*=H),typeof S=="number"&&(H=S|0,H<0?(N+=Z*(z-1),z=re(-z/H)):z=re(z/H),Z*=H),typeof g=="number"&&(H=g|0,H<0?(N+=j*(q-1),q=re(-q/H)):q=re(q/H),j*=H),new M(this.data,P,E,z,q,U,G,Z,j,N)},T.transpose=function(x,C,S,g){x=x===void 0?0:x|0,C=C===void 0?1:C|0,S=S===void 0?2:S|0,g=g===void 0?3:g|0;var P=this.shape,E=this.stride;return new M(this.data,P[x],P[C],P[S],P[g],E[x],E[C],E[S],E[g],this.offset)},T.pick=function(x,C,S,g){var P=[],E=[],z=this.offset;typeof x=="number"&&x>=0?z=z+this.stride[0]*x|0:(P.push(this.shape[0]),E.push(this.stride[0])),typeof C=="number"&&C>=0?z=z+this.stride[1]*C|0:(P.push(this.shape[1]),E.push(this.stride[1])),typeof S=="number"&&S>=0?z=z+this.stride[2]*S|0:(P.push(this.shape[2]),E.push(this.stride[2])),typeof g=="number"&&g>=0?z=z+this.stride[3]*g|0:(P.push(this.shape[3]),E.push(this.stride[3]));var q=p[P.length+1];return q(this.data,P,E,z)},function(x,C,S,g){return new M(x,C[0],C[1],C[2],C[3],S[0],S[1],S[2],S[3],g)}},5:function(p,k,M){function T(x,C,S,g,P,E,z,q,U,G,Z,j){this.data=x,this.shape=[C,S,g,P,E],this.stride=[z,q,U,G,Z],this.offset=j|0}var L=T.prototype;return L.dtype=p,L.dimension=5,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,"order",{get:M}),L.set=function(C,S,g,P,E,z){return p==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E,z):this.data[this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E]=z},L.get=function(C,S,g,P,E){return p==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E):this.data[this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E]},L.index=function(C,S,g,P,E){return this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E},L.hi=function(C,S,g,P,E){return new T(this.data,typeof C!="number"||C<0?this.shape[0]:C|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof g!="number"||g<0?this.shape[2]:g|0,typeof P!="number"||P<0?this.shape[3]:P|0,typeof E!="number"||E<0?this.shape[4]:E|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(C,S,g,P,E){var z=this.offset,q=0,U=this.shape[0],G=this.shape[1],Z=this.shape[2],j=this.shape[3],N=this.shape[4],H=this.stride[0],re=this.stride[1],oe=this.stride[2],_e=this.stride[3],ke=this.stride[4];return typeof C=="number"&&C>=0&&(q=C|0,z+=H*q,U-=q),typeof S=="number"&&S>=0&&(q=S|0,z+=re*q,G-=q),typeof g=="number"&&g>=0&&(q=g|0,z+=oe*q,Z-=q),typeof P=="number"&&P>=0&&(q=P|0,z+=_e*q,j-=q),typeof E=="number"&&E>=0&&(q=E|0,z+=ke*q,N-=q),new T(this.data,U,G,Z,j,N,H,re,oe,_e,ke,z)},L.step=function(C,S,g,P,E){var z=this.shape[0],q=this.shape[1],U=this.shape[2],G=this.shape[3],Z=this.shape[4],j=this.stride[0],N=this.stride[1],H=this.stride[2],re=this.stride[3],oe=this.stride[4],_e=this.offset,ke=0,Ce=Math.ceil;return typeof C=="number"&&(ke=C|0,ke<0?(_e+=j*(z-1),z=Ce(-z/ke)):z=Ce(z/ke),j*=ke),typeof S=="number"&&(ke=S|0,ke<0?(_e+=N*(q-1),q=Ce(-q/ke)):q=Ce(q/ke),N*=ke),typeof g=="number"&&(ke=g|0,ke<0?(_e+=H*(U-1),U=Ce(-U/ke)):U=Ce(U/ke),H*=ke),typeof P=="number"&&(ke=P|0,ke<0?(_e+=re*(G-1),G=Ce(-G/ke)):G=Ce(G/ke),re*=ke),typeof E=="number"&&(ke=E|0,ke<0?(_e+=oe*(Z-1),Z=Ce(-Z/ke)):Z=Ce(Z/ke),oe*=ke),new T(this.data,z,q,U,G,Z,j,N,H,re,oe,_e)},L.transpose=function(C,S,g,P,E){C=C===void 0?0:C|0,S=S===void 0?1:S|0,g=g===void 0?2:g|0,P=P===void 0?3:P|0,E=E===void 0?4:E|0;var z=this.shape,q=this.stride;return new T(this.data,z[C],z[S],z[g],z[P],z[E],q[C],q[S],q[g],q[P],q[E],this.offset)},L.pick=function(C,S,g,P,E){var z=[],q=[],U=this.offset;typeof C=="number"&&C>=0?U=U+this.stride[0]*C|0:(z.push(this.shape[0]),q.push(this.stride[0])),typeof S=="number"&&S>=0?U=U+this.stride[1]*S|0:(z.push(this.shape[1]),q.push(this.stride[1])),typeof g=="number"&&g>=0?U=U+this.stride[2]*g|0:(z.push(this.shape[2]),q.push(this.stride[2])),typeof P=="number"&&P>=0?U=U+this.stride[3]*P|0:(z.push(this.shape[3]),q.push(this.stride[3])),typeof E=="number"&&E>=0?U=U+this.stride[4]*E|0:(z.push(this.shape[4]),q.push(this.stride[4]));var G=k[z.length+1];return G(this.data,z,q,U)},function(C,S,g,P){return new T(C,S[0],S[1],S[2],S[3],S[4],g[0],g[1],g[2],g[3],g[4],P)}}};function h(b,p){var k=p===-1?"T":String(p),M=f[k];return p===-1?M(b):p===0?M(b,v[b][0]):M(b,v[b],c)}function d(b){if(s(b))return"buffer";if(l)switch(Object.prototype.toString.call(b)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(b)?"array":"generic"}var v={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function m(b,p,k,M){if(b===void 0){var g=v.array[0];return g([])}else typeof b=="number"&&(b=[b]);p===void 0&&(p=[b.length]);var T=p.length;if(k===void 0){k=new Array(T);for(var L=T-1,x=1;L>=0;--L)k[L]=x,x*=p[L]}if(M===void 0){M=0;for(var L=0;L<T;++L)k[L]<0&&(M-=(p[L]-1)*k[L])}for(var C=d(b),S=v[C];S.length<=T+1;)S.push(h(C,S.length-1));var g=S[T+1];return g(b,p,k,M)}i.exports=m},1278:function(i,a,o){"use strict";var s=o(2361),l=Math.pow(2,-1074),u=-1>>>0;i.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var d=s.hi(f),v=s.lo(f);return h>f==f>0?v===u?(d+=1,v=0):v+=1:v===0?(v=u,d-=1):v-=1,s.pack(v,d)}},8406:function(i,a){var o=1e-6,s=1e-6;a.vertexNormals=function(l,u,c){for(var f=u.length,h=new Array(f),d=c===void 0?o:c,v=0;v<f;++v)h[v]=[0,0,0];for(var v=0;v<l.length;++v)for(var m=l[v],b=0,p=m[m.length-1],k=m[0],M=0;M<m.length;++M){b=p,p=k,k=m[(M+1)%m.length];for(var T=u[b],L=u[p],x=u[k],C=new Array(3),S=0,g=new Array(3),P=0,E=0;E<3;++E)C[E]=T[E]-L[E],S+=C[E]*C[E],g[E]=x[E]-L[E],P+=g[E]*g[E];if(S*P>d)for(var z=h[p],q=1/Math.sqrt(S*P),E=0;E<3;++E){var U=(E+1)%3,G=(E+2)%3;z[E]+=q*(g[U]*C[G]-g[G]*C[U])}}for(var v=0;v<f;++v){for(var z=h[v],Z=0,E=0;E<3;++E)Z+=z[E]*z[E];if(Z>d)for(var q=1/Math.sqrt(Z),E=0;E<3;++E)z[E]*=q;else for(var E=0;E<3;++E)z[E]=0}return h},a.faceNormals=function(l,u,c){for(var f=l.length,h=new Array(f),d=c===void 0?s:c,v=0;v<f;++v){for(var m=l[v],b=new Array(3),p=0;p<3;++p)b[p]=u[m[p]];for(var k=new Array(3),M=new Array(3),p=0;p<3;++p)k[p]=b[1][p]-b[0][p],M[p]=b[2][p]-b[0][p];for(var T=new Array(3),L=0,p=0;p<3;++p){var x=(p+1)%3,C=(p+2)%3;T[p]=k[x]*M[C]-k[C]*M[x],L+=T[p]*T[p]}L>d?L=1/Math.sqrt(L):L=0;for(var p=0;p<3;++p)T[p]*=L;h[v]=T}return h}},4081:function(i){"use strict";i.exports=a;function a(o,s,l,u,c,f,h,d,v,m){var b=s+f+m;if(p>0){var p=Math.sqrt(b+1);o[0]=.5*(h-v)/p,o[1]=.5*(d-u)/p,o[2]=.5*(l-f)/p,o[3]=.5*p}else{var k=Math.max(s,f,m),p=Math.sqrt(2*k-b+1);s>=k?(o[0]=.5*p,o[1]=.5*(c+l)/p,o[2]=.5*(d+u)/p,o[3]=.5*(h-v)/p):f>=k?(o[0]=.5*(l+c)/p,o[1]=.5*p,o[2]=.5*(v+h)/p,o[3]=.5*(d-u)/p):(o[0]=.5*(u+d)/p,o[1]=.5*(h+v)/p,o[2]=.5*p,o[3]=.5*(l-c)/p)}return o}},9977:function(i,a,o){"use strict";i.exports=p;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function h(k,M,T){return Math.sqrt(Math.pow(k,2)+Math.pow(M,2)+Math.pow(T,2))}function d(k,M,T,L){return Math.sqrt(Math.pow(k,2)+Math.pow(M,2)+Math.pow(T,2)+Math.pow(L,2))}function v(k,M){var T=M[0],L=M[1],x=M[2],C=M[3],S=d(T,L,x,C);S>1e-6?(k[0]=T/S,k[1]=L/S,k[2]=x/S,k[3]=C/S):(k[0]=k[1]=k[2]=0,k[3]=1)}function m(k,M,T){this.radius=s([T]),this.center=s(M),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=m.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 M=this.computedRotation;v(M,M);var T=this.computedMatrix;u(T,M);var L=this.computedCenter,x=this.computedEye,C=this.computedUp,S=Math.exp(this.computedRadius[0]);x[0]=L[0]+S*T[2],x[1]=L[1]+S*T[6],x[2]=L[2]+S*T[10],C[0]=T[1],C[1]=T[5],C[2]=T[9];for(var g=0;g<3;++g){for(var P=0,E=0;E<3;++E)P+=T[g+4*E]*x[E];T[12+g]=-P}},b.getMatrix=function(k,M){this.recalcMatrix(k);var T=this.computedMatrix;if(M){for(var L=0;L<16;++L)M[L]=T[L];return M}return T},b.idle=function(k){this.center.idle(k),this.radius.idle(k),this.rotation.idle(k)},b.flush=function(k){this.center.flush(k),this.radius.flush(k),this.rotation.flush(k)},b.pan=function(k,M,T,L){M=M||0,T=T||0,L=L||0,this.recalcMatrix(k);var x=this.computedMatrix,C=x[1],S=x[5],g=x[9],P=h(C,S,g);C/=P,S/=P,g/=P;var E=x[0],z=x[4],q=x[8],U=E*C+z*S+q*g;E-=C*U,z-=S*U,q-=g*U;var G=h(E,z,q);E/=G,z/=G,q/=G;var Z=x[2],j=x[6],N=x[10],H=Z*C+j*S+N*g,re=Z*E+j*z+N*q;Z-=H*C+re*E,j-=H*S+re*z,N-=H*g+re*q;var oe=h(Z,j,N);Z/=oe,j/=oe,N/=oe;var _e=E*M+C*T,ke=z*M+S*T,Ce=q*M+g*T;this.center.move(k,_e,ke,Ce);var ge=Math.exp(this.computedRadius[0]);ge=Math.max(1e-4,ge+L),this.radius.set(k,Math.log(ge))},b.rotate=function(k,M,T,L){this.recalcMatrix(k),M=M||0,T=T||0;var x=this.computedMatrix,C=x[0],S=x[4],g=x[8],P=x[1],E=x[5],z=x[9],q=x[2],U=x[6],G=x[10],Z=M*C+T*P,j=M*S+T*E,N=M*g+T*z,H=-(U*N-G*j),re=-(G*Z-q*N),oe=-(q*j-U*Z),_e=Math.sqrt(Math.max(0,1-Math.pow(H,2)-Math.pow(re,2)-Math.pow(oe,2))),ke=d(H,re,oe,_e);ke>1e-6?(H/=ke,re/=ke,oe/=ke,_e/=ke):(H=re=oe=0,_e=1);var Ce=this.computedRotation,ge=Ce[0],ie=Ce[1],Se=Ce[2],Ee=Ce[3],we=ge*_e+Ee*H+ie*oe-Se*re,De=ie*_e+Ee*re+Se*H-ge*oe,Le=Se*_e+Ee*oe+ge*re-ie*H,me=Ee*_e-ge*H-ie*re-Se*oe;if(L){H=q,re=U,oe=G;var Pe=Math.sin(L)/h(H,re,oe);H*=Pe,re*=Pe,oe*=Pe,_e=Math.cos(M),we=we*_e+me*H+De*oe-Le*re,De=De*_e+me*re+Le*H-we*oe,Le=Le*_e+me*oe+we*re-De*H,me=me*_e-we*H-De*re-Le*oe}var ce=d(we,De,Le,me);ce>1e-6?(we/=ce,De/=ce,Le/=ce,me/=ce):(we=De=Le=0,me=1),this.rotation.set(k,we,De,Le,me)},b.lookAt=function(k,M,T,L){this.recalcMatrix(k),T=T||this.computedCenter,M=M||this.computedEye,L=L||this.computedUp;var x=this.computedMatrix;l(x,M,T,L);var C=this.computedRotation;f(C,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),v(C,C),this.rotation.set(k,C[0],C[1],C[2],C[3]);for(var S=0,g=0;g<3;++g)S+=Math.pow(T[g]-M[g],2);this.radius.set(k,.5*Math.log(Math.max(S,1e-6))),this.center.set(k,T[0],T[1],T[2])},b.translate=function(k,M,T,L){this.center.move(k,M||0,T||0,L||0)},b.setMatrix=function(k,M){var T=this.computedRotation;f(T,M[0],M[1],M[2],M[4],M[5],M[6],M[8],M[9],M[10]),v(T,T),this.rotation.set(k,T[0],T[1],T[2],T[3]);var L=this.computedMatrix;c(L,M);var x=L[15];if(Math.abs(x)>1e-6){var C=L[12]/x,S=L[13]/x,g=L[14]/x;this.recalcMatrix(k);var P=Math.exp(this.computedRadius[0]);this.center.set(k,C-L[2]*P,S-L[6]*P,g-L[10]*P),this.radius.idle(k)}else this.center.idle(k),this.radius.idle(k)},b.setDistance=function(k,M){M>0&&this.radius.set(k,Math.log(M))},b.setDistanceLimits=function(k,M){k>0?k=Math.log(k):k=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,k),this.radius.bounds[0][0]=k,this.radius.bounds[1][0]=M},b.getDistanceLimits=function(k){var M=this.radius.bounds;return k?(k[0]=Math.exp(M[0][0]),k[1]=Math.exp(M[1][0]),k):[Math.exp(M[0][0]),Math.exp(M[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 M=this.lastT(),T=k.center;T&&this.center.set(M,T[0],T[1],T[2]);var L=k.rotation;L&&this.rotation.set(M,L[0],L[1],L[2],L[3]);var x=k.distance;x&&x>0&&this.radius.set(M,Math.log(x)),this.setDistanceLimits(k.zoomMin,k.zoomMax)};function p(k){k=k||{};var M=k.center||[0,0,0],T=k.rotation||[0,0,0,1],L=k.radius||1;M=[].slice.call(M,0,3),T=[].slice.call(T,0,4),v(T,T);var x=new m(T,M,Math.log(L));return x.setDistanceLimits(k.zoomMin,k.zoomMax),("eye"in k||"up"in k)&&x.lookAt(0,k.eye,k.center,k.up),x}},1371:function(i,a,o){"use strict";var s=o(3233);i.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}},3202:function(i){i.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3088:function(i,a,o){"use strict";i.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,h=u.length,d=[new Array(f),new Array(f)],v=0;v<f;++v)d[0][v]=[],d[1][v]=[];for(var v=0;v<h;++v){var m=u[v];d[0][m[0]].push(m),d[1][m[1]].push(m)}for(var b=[],v=0;v<f;++v)d[0][v].length+d[1][v].length===0&&b.push([v]);function p(g,P){var E=d[P][g[P]];E.splice(E.indexOf(g),1)}function k(g,P,E){for(var z,q,U,G=0;G<2;++G)if(d[G][P].length>0){z=d[G][P][0],U=G;break}q=z[U^1];for(var Z=0;Z<2;++Z)for(var j=d[Z][P],N=0;N<j.length;++N){var H=j[N],re=H[Z^1],oe=s(c[g],c[P],c[q],c[re]);oe>0&&(z=H,q=re,U=Z)}return E||z&&p(z,U),q}function M(g,P){var E=d[P][g][0],z=[g];p(E,P);for(var q=E[P^1],U=P;;){for(;q!==g;)z.push(q),q=k(z[z.length-2],q,!1);if(d[0][g].length+d[1][g].length===0)break;var G=z[z.length-1],Z=g,j=z[1],N=k(G,Z,!0);if(s(c[G],c[Z],c[j],c[N])<0)break;z.push(g),q=k(G,Z)}return z}function T(g,P){return P[1]===P[P.length-1]}for(var v=0;v<f;++v)for(var L=0;L<2;++L){for(var x=[];d[L][v].length>0;){var C=d[0][v].length,S=M(v,L);T(x,S)?x.push.apply(x,S):(x.length>0&&b.push(x),x=S)}x.length>0&&b.push(x)}return b}},5609:function(i,a,o){"use strict";i.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),h=new Array(c.length),d=new Array(c.length),v=[],m=0;m<c.length;++m){var b=f[m].length;d[m]=b,h[m]=!0,b<=1&&v.push(m)}for(;v.length>0;){var p=v.pop();h[p]=!1;for(var k=f[p],m=0;m<k.length;++m){var M=k[m];--d[M]===0&&v.push(M)}}for(var T=new Array(c.length),L=[],m=0;m<c.length;++m)if(h[m]){var p=L.length;T[m]=p,L.push(c[m])}else T[m]=-1;for(var x=[],m=0;m<u.length;++m){var C=u[m];h[C[0]]&&h[C[1]]&&x.push([T[C[0]],T[C[1]]])}return[x,L]}},2095:function(i,a,o){"use strict";i.exports=b;var s=o(3134),l=o(3088),u=o(5085),c=o(5250),f=o(8210),h=o(1682),d=o(5609);function v(p,k){for(var M=new Array(p),T=0;T<p;++T)M[T]=k;return M}function m(p){for(var k=new Array(p),M=0;M<p;++M)k[M]=[];return k}function b(p,k){var Pe=d(p,k);p=Pe[0],k=Pe[1];for(var M=k.length,T=p.length,L=s(p,k.length),x=0;x<M;++x)if(L[x].length%2===1)throw new Error("planar-graph-to-polyline: graph must be manifold");var C=l(p,k);function S(ct){for(var Qt=ct.length,Ht=[0],nr=0;nr<Qt;++nr){var tt=k[ct[nr]],je=k[ct[(nr+1)%Qt]],Ue=c(-tt[0],tt[1]),Ae=c(-tt[0],je[1]),rt=c(je[0],tt[1]),St=c(je[0],je[1]);Ht=f(Ht,f(f(Ue,Ae),f(rt,St)))}return Ht[Ht.length-1]>0}C=C.filter(S);for(var g=C.length,P=new Array(g),E=new Array(g),x=0;x<g;++x){P[x]=x;var z=new Array(g),q=C[x].map(function(Qt){return k[Qt]}),U=u([q]),G=0;e:for(var Z=0;Z<g;++Z)if(z[Z]=0,x!==Z){for(var j=C[Z],N=j.length,H=0;H<N;++H){var re=U(k[j[H]]);if(re!==0){re<0&&(z[Z]=1,G+=1);continue e}}z[Z]=1,G+=1}E[x]=[G,x,z]}E.sort(function(ct,Qt){return Qt[0]-ct[0]});for(var x=0;x<g;++x)for(var z=E[x],oe=z[1],_e=z[2],Z=0;Z<g;++Z)_e[Z]&&(P[Z]=oe);for(var ke=m(g),x=0;x<g;++x)ke[x].push(P[x]),ke[P[x]].push(x);for(var Ce={},ge=v(M,!1),x=0;x<g;++x)for(var j=C[x],N=j.length,Z=0;Z<N;++Z){var ie=j[Z],Se=j[(Z+1)%N],Ee=Math.min(ie,Se)+":"+Math.max(ie,Se);if(Ee in Ce){var we=Ce[Ee];ke[we].push(x),ke[x].push(we),ge[ie]=ge[Se]=!0}else Ce[Ee]=x}function De(ct){for(var Qt=ct.length,Ht=0;Ht<Qt;++Ht)if(!ge[ct[Ht]])return!1;return!0}for(var Le=[],me=v(g,-1),x=0;x<g;++x)P[x]===x&&!De(C[x])?(Le.push(x),me[x]=0):me[x]=-1;for(var Pe=[];Le.length>0;){var ce=Le.pop(),He=ke[ce];h(He,function(ct,Qt){return ct-Qt});var lt=He.length,mt=me[ce],Vt;if(mt===0){var j=C[ce];Vt=[j]}for(var x=0;x<lt;++x){var st=He[x];if(!(me[st]>=0)&&(me[st]=mt^1,Le.push(st),mt===0)){var j=C[st];De(j)||(j.reverse(),Vt.push(j))}}mt===0&&Pe.push(Vt)}return Pe}},5085:function(i,a,o){i.exports=k;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(M){return function(T,L){var x=M[T];return x?!!x.queryPoint(L,f):!1}}function d(M){for(var T={},L=0;L<M.length;++L){var x=M[L],C=x[0][0],S=x[0][1],g=x[1][1],P=[Math.min(S,g),Math.max(S,g)];C in T?T[C].push(P):T[C]=[P]}for(var E={},z=Object.keys(T),L=0;L<z.length;++L){var q=T[z[L]];E[z[L]]=u(q)}return h(E)}function v(M,T){return function(L){var x=c.le(T,L[0]);if(x<0)return 1;var C=M[x];if(!C)if(x>0&&T[x]===L[0])C=M[x-1];else return 1;for(var S=1;C;){var g=C.key,P=s(L,g[0],g[1]);if(g[0][0]<g[1][0])if(P<0)C=C.left;else if(P>0)S=-1,C=C.right;else return 0;else if(P>0)C=C.left;else if(P<0)S=1,C=C.right;else return 0}return S}}function m(M){return 1}function b(M){return function(L){return M(L[0],L[1])?0:1}}function p(M,T){return function(x){return M(x[0],x[1])?0:T(x)}}function k(M){for(var T=M.length,L=[],x=[],C=0,S=0;S<T;++S)for(var g=M[S],P=g.length,E=P-1,z=0;z<P;E=z++){var q=g[E],U=g[z];q[0]===U[0]?x.push([q,U]):L.push([q,U])}if(L.length===0)return x.length===0?m:b(d(x));var G=l(L),Z=v(G.slabs,G.coordinates);return x.length===0?Z:p(d(x),Z)}},9346:function(i){"use strict";var a=new Float64Array(4),o=new Float64Array(4),s=new Float64Array(4);function l(u,c,f,h,d){a.length<h.length&&(a=new Float64Array(h.length),o=new Float64Array(h.length),s=new Float64Array(h.length));for(var v=0;v<h.length;++v)a[v]=u[v]-h[v],o[v]=c[v]-u[v],s[v]=f[v]-u[v];for(var m=0,b=0,p=0,k=0,M=0,T=0,v=0;v<h.length;++v){var L=o[v],x=s[v],C=a[v];m+=L*L,b+=L*x,p+=x*x,k+=C*L,M+=C*x,T+=C*C}var S=Math.abs(m*p-b*b),g=b*M-p*k,P=b*k-m*M,E;if(g+P<=S)if(g<0)P<0&&k<0?(P=0,-k>=m?(g=1,E=m+2*k+T):(g=-k/m,E=k*g+T)):(g=0,M>=0?(P=0,E=T):-M>=p?(P=1,E=p+2*M+T):(P=-M/p,E=M*P+T));else if(P<0)P=0,k>=0?(g=0,E=T):-k>=m?(g=1,E=m+2*k+T):(g=-k/m,E=k*g+T);else{var z=1/S;g*=z,P*=z,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T}else{var q,U,G,Z;g<0?(q=b+k,U=p+M,U>q?(G=U-q,Z=m-2*b+p,G>=Z?(g=1,P=0,E=m+2*k+T):(g=G/Z,P=1-g,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T)):(g=0,U<=0?(P=1,E=p+2*M+T):M>=0?(P=0,E=T):(P=-M/p,E=M*P+T))):P<0?(q=b+M,U=m+k,U>q?(G=U-q,Z=m-2*b+p,G>=Z?(P=1,g=0,E=p+2*M+T):(P=G/Z,g=1-P,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T)):(P=0,U<=0?(g=1,E=m+2*k+T):k>=0?(g=0,E=T):(g=-k/m,E=k*g+T))):(G=p+M-b-k,G<=0?(g=0,P=1,E=p+2*M+T):(Z=m-2*b+p,G>=Z?(g=1,P=0,E=m+2*k+T):(g=G/Z,P=1-g,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T)))}for(var j=1-g-P,v=0;v<h.length;++v)d[v]=j*u[v]+g*c[v]+P*f[v];return E<0?0:E}i.exports=l},8648:function(i,a,o){i.exports=o(783)},2653:function(i,a,o){"use strict";var s=o(3865);i.exports=l;function l(u,c){for(var f=u.length,h=new Array(f),d=0;d<f;++d)h[d]=s(u[d],c[d]);return h}},5838:function(i,a,o){"use strict";i.exports=l;var s=o(7842);function l(u){for(var c=new Array(u.length),f=0;f<u.length;++f)c[f]=s(u[f]);return c}},8987:function(i,a,o){"use strict";var s=o(7842),l=o(6504);i.exports=u;function u(c,f){for(var h=s(f),d=c.length,v=new Array(d),m=0;m<d;++m)v[m]=l(c[m],h);return v}},544:function(i,a,o){"use strict";var s=o(5572);i.exports=l;function l(u,c){for(var f=u.length,h=new Array(f),d=0;d<f;++d)h[d]=s(u[d],c[d]);return h}},5771:function(i,a,o){"use strict";var s=o(8507),l=o(3788),u=o(2419);i.exports=c;function c(f){f.sort(l);for(var h=f.length,d=0,v=0;v<h;++v){var m=f[v],b=u(m);if(b!==0){if(d>0){var p=f[d-1];if(s(m,p)===0&&u(p)!==b){d-=1;continue}}f[d++]=m}}return f.length=d,f}},3233:function(i){"use strict";var a="",o;i.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,a="";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},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,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var d=l-f,v=h-d;v&&(o[--u]=l,l=v)}for(var m=0,c=u;c<s;++c){var f=o[c],h=l;l=f+h;var d=l-f,v=h-d;v&&(o[m++]=v)}return o[m++]=l,o.length=m,o}},2962:function(i,a,o){"use strict";var s=o(5250),l=o(8210),u=o(3012),c=o(7004),f=6;function h(T,L,x,C){return function(g){return C(T(x(g[0][0],g[1][1]),x(-g[0][1],g[1][0])))}}function d(T,L,x,C){return function(g){return C(T(L(T(x(g[1][1],g[2][2]),x(-g[1][2],g[2][1])),g[0][0]),T(L(T(x(g[1][0],g[2][2]),x(-g[1][2],g[2][0])),-g[0][1]),L(T(x(g[1][0],g[2][1]),x(-g[1][1],g[2][0])),g[0][2]))))}}function v(T,L,x,C){return function(g){return C(T(T(L(T(L(T(x(g[2][2],g[3][3]),x(-g[2][3],g[3][2])),g[1][1]),T(L(T(x(g[2][1],g[3][3]),x(-g[2][3],g[3][1])),-g[1][2]),L(T(x(g[2][1],g[3][2]),x(-g[2][2],g[3][1])),g[1][3]))),g[0][0]),L(T(L(T(x(g[2][2],g[3][3]),x(-g[2][3],g[3][2])),g[1][0]),T(L(T(x(g[2][0],g[3][3]),x(-g[2][3],g[3][0])),-g[1][2]),L(T(x(g[2][0],g[3][2]),x(-g[2][2],g[3][0])),g[1][3]))),-g[0][1])),T(L(T(L(T(x(g[2][1],g[3][3]),x(-g[2][3],g[3][1])),g[1][0]),T(L(T(x(g[2][0],g[3][3]),x(-g[2][3],g[3][0])),-g[1][1]),L(T(x(g[2][0],g[3][1]),x(-g[2][1],g[3][0])),g[1][3]))),g[0][2]),L(T(L(T(x(g[2][1],g[3][2]),x(-g[2][2],g[3][1])),g[1][0]),T(L(T(x(g[2][0],g[3][2]),x(-g[2][2],g[3][0])),-g[1][1]),L(T(x(g[2][0],g[3][1]),x(-g[2][1],g[3][0])),g[1][2]))),-g[0][3]))))}}function m(T,L,x,C){return function(g){return C(T(T(L(T(T(L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][2]),T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),-g[2][3]),L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][4]))),g[1][1]),L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][3]),L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][4]))),-g[1][2])),T(L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][4]))),g[1][3]),L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][3]))),-g[1][4]))),g[0][0]),L(T(T(L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][2]),T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),-g[2][3]),L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][4]))),g[1][0]),L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][3]),L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),g[2][4]))),-g[1][2])),T(L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][4]))),g[1][3]),L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][3]))),-g[1][4]))),-g[0][1])),T(L(T(T(L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][3]),L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][4]))),g[1][0]),L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][3]),L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),g[2][4]))),-g[1][1])),T(L(T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][4]))),g[1][3]),L(T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][3]))),-g[1][4]))),g[0][2]),T(L(T(T(L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][4]))),g[1][0]),L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][4]))),-g[1][1])),T(L(T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][4]))),g[1][2]),L(T(L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][2]))),-g[1][4]))),-g[0][3]),L(T(T(L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][3]))),g[1][0]),L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][3]))),-g[1][1])),T(L(T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][3]))),g[1][2]),L(T(L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][2]))),-g[1][3]))),g[0][4])))))}}function b(T){var L=T===2?h:T===3?d:T===4?v:T===5?m:void 0;return L(l,u,s,c)}var p=[function(){return[0]},function(L){return[L[0][0]]}];function k(T,L,x,C,S,g,P,E){return function(q){switch(q.length){case 0:return T(q);case 1:return L(q);case 2:return x(q);case 3:return C(q);case 4:return S(q);case 5:return g(q)}var U=P[q.length];return U||(U=P[q.length]=E(q.length)),U(q)}}function M(){for(;p.length<f;)p.push(b(p.length));i.exports=k.apply(void 0,p.concat([p,b]));for(var T=0;T<p.length;++T)i.exports[T]=p[T]}M()},1944:function(i,a,o){"use strict";var s=o(5250),l=o(8210);i.exports=u;function u(c,f){for(var h=s(c[0],f[0]),d=1;d<c.length;++d)h=l(h,s(c[d],f[d]));return h}},2646:function(i,a,o){"use strict";var s=o(5250),l=o(8210),u=o(8545),c=o(3012),f=6;function h(S){var g=S===3?b:S===4?p:S===5?k:M;return g(l,u,s,c)}function d(){return 0}function v(){return 0}function m(){return 0}function b(S,g,P,E){function z(q,U,G){var Z=P(q[0],q[0]),j=E(Z,U[0]),N=E(Z,G[0]),H=P(U[0],U[0]),re=E(H,q[0]),oe=E(H,G[0]),_e=P(G[0],G[0]),ke=E(_e,q[0]),Ce=E(_e,U[0]),ge=S(g(Ce,oe),g(re,j)),ie=g(ke,N),Se=g(ge,ie);return Se[Se.length-1]}return z}function p(S,g,P,E){function z(q,U,G,Z){var j=S(P(q[0],q[0]),P(q[1],q[1])),N=E(j,U[0]),H=E(j,G[0]),re=E(j,Z[0]),oe=S(P(U[0],U[0]),P(U[1],U[1])),_e=E(oe,q[0]),ke=E(oe,G[0]),Ce=E(oe,Z[0]),ge=S(P(G[0],G[0]),P(G[1],G[1])),ie=E(ge,q[0]),Se=E(ge,U[0]),Ee=E(ge,Z[0]),we=S(P(Z[0],Z[0]),P(Z[1],Z[1])),De=E(we,q[0]),Le=E(we,U[0]),me=E(we,G[0]),Pe=S(S(E(g(me,Ee),U[1]),S(E(g(Le,Ce),-G[1]),E(g(Se,ke),Z[1]))),S(E(g(Le,Ce),q[1]),S(E(g(De,re),-U[1]),E(g(_e,N),Z[1])))),ce=S(S(E(g(me,Ee),q[1]),S(E(g(De,re),-G[1]),E(g(ie,H),Z[1]))),S(E(g(Se,ke),q[1]),S(E(g(ie,H),-U[1]),E(g(_e,N),G[1])))),He=g(Pe,ce);return He[He.length-1]}return z}function k(S,g,P,E){function z(q,U,G,Z,j){var N=S(P(q[0],q[0]),S(P(q[1],q[1]),P(q[2],q[2]))),H=E(N,U[0]),re=E(N,G[0]),oe=E(N,Z[0]),_e=E(N,j[0]),ke=S(P(U[0],U[0]),S(P(U[1],U[1]),P(U[2],U[2]))),Ce=E(ke,q[0]),ge=E(ke,G[0]),ie=E(ke,Z[0]),Se=E(ke,j[0]),Ee=S(P(G[0],G[0]),S(P(G[1],G[1]),P(G[2],G[2]))),we=E(Ee,q[0]),De=E(Ee,U[0]),Le=E(Ee,Z[0]),me=E(Ee,j[0]),Pe=S(P(Z[0],Z[0]),S(P(Z[1],Z[1]),P(Z[2],Z[2]))),ce=E(Pe,q[0]),He=E(Pe,U[0]),lt=E(Pe,G[0]),mt=E(Pe,j[0]),Vt=S(P(j[0],j[0]),S(P(j[1],j[1]),P(j[2],j[2]))),st=E(Vt,q[0]),ct=E(Vt,U[0]),Qt=E(Vt,G[0]),Ht=E(Vt,Z[0]),nr=S(S(S(E(S(E(g(Ht,mt),G[1]),S(E(g(Qt,me),-Z[1]),E(g(lt,Le),j[1]))),U[2]),S(E(S(E(g(Ht,mt),U[1]),S(E(g(ct,Se),-Z[1]),E(g(He,ie),j[1]))),-G[2]),E(S(E(g(Qt,me),U[1]),S(E(g(ct,Se),-G[1]),E(g(De,ge),j[1]))),Z[2]))),S(E(S(E(g(lt,Le),U[1]),S(E(g(He,ie),-G[1]),E(g(De,ge),Z[1]))),-j[2]),S(E(S(E(g(Ht,mt),U[1]),S(E(g(ct,Se),-Z[1]),E(g(He,ie),j[1]))),q[2]),E(S(E(g(Ht,mt),q[1]),S(E(g(st,_e),-Z[1]),E(g(ce,oe),j[1]))),-U[2])))),S(S(E(S(E(g(ct,Se),q[1]),S(E(g(st,_e),-U[1]),E(g(Ce,H),j[1]))),Z[2]),S(E(S(E(g(He,ie),q[1]),S(E(g(ce,oe),-U[1]),E(g(Ce,H),Z[1]))),-j[2]),E(S(E(g(lt,Le),U[1]),S(E(g(He,ie),-G[1]),E(g(De,ge),Z[1]))),q[2]))),S(E(S(E(g(lt,Le),q[1]),S(E(g(ce,oe),-G[1]),E(g(we,re),Z[1]))),-U[2]),S(E(S(E(g(He,ie),q[1]),S(E(g(ce,oe),-U[1]),E(g(Ce,H),Z[1]))),G[2]),E(S(E(g(De,ge),q[1]),S(E(g(we,re),-U[1]),E(g(Ce,H),G[1]))),-Z[2]))))),tt=S(S(S(E(S(E(g(Ht,mt),G[1]),S(E(g(Qt,me),-Z[1]),E(g(lt,Le),j[1]))),q[2]),E(S(E(g(Ht,mt),q[1]),S(E(g(st,_e),-Z[1]),E(g(ce,oe),j[1]))),-G[2])),S(E(S(E(g(Qt,me),q[1]),S(E(g(st,_e),-G[1]),E(g(we,re),j[1]))),Z[2]),E(S(E(g(lt,Le),q[1]),S(E(g(ce,oe),-G[1]),E(g(we,re),Z[1]))),-j[2]))),S(S(E(S(E(g(Qt,me),U[1]),S(E(g(ct,Se),-G[1]),E(g(De,ge),j[1]))),q[2]),E(S(E(g(Qt,me),q[1]),S(E(g(st,_e),-G[1]),E(g(we,re),j[1]))),-U[2])),S(E(S(E(g(ct,Se),q[1]),S(E(g(st,_e),-U[1]),E(g(Ce,H),j[1]))),G[2]),E(S(E(g(De,ge),q[1]),S(E(g(we,re),-U[1]),E(g(Ce,H),G[1]))),-j[2])))),je=g(nr,tt);return je[je.length-1]}return z}function M(S,g,P,E){function z(q,U,G,Z,j,N){var H=S(S(P(q[0],q[0]),P(q[1],q[1])),S(P(q[2],q[2]),P(q[3],q[3]))),re=E(H,U[0]),oe=E(H,G[0]),_e=E(H,Z[0]),ke=E(H,j[0]),Ce=E(H,N[0]),ge=S(S(P(U[0],U[0]),P(U[1],U[1])),S(P(U[2],U[2]),P(U[3],U[3]))),ie=E(ge,q[0]),Se=E(ge,G[0]),Ee=E(ge,Z[0]),we=E(ge,j[0]),De=E(ge,N[0]),Le=S(S(P(G[0],G[0]),P(G[1],G[1])),S(P(G[2],G[2]),P(G[3],G[3]))),me=E(Le,q[0]),Pe=E(Le,U[0]),ce=E(Le,Z[0]),He=E(Le,j[0]),lt=E(Le,N[0]),mt=S(S(P(Z[0],Z[0]),P(Z[1],Z[1])),S(P(Z[2],Z[2]),P(Z[3],Z[3]))),Vt=E(mt,q[0]),st=E(mt,U[0]),ct=E(mt,G[0]),Qt=E(mt,j[0]),Ht=E(mt,N[0]),nr=S(S(P(j[0],j[0]),P(j[1],j[1])),S(P(j[2],j[2]),P(j[3],j[3]))),tt=E(nr,q[0]),je=E(nr,U[0]),Ue=E(nr,G[0]),Ae=E(nr,Z[0]),rt=E(nr,N[0]),St=S(S(P(N[0],N[0]),P(N[1],N[1])),S(P(N[2],N[2]),P(N[3],N[3]))),Tt=E(St,q[0]),dt=E(St,U[0]),Et=E(St,G[0]),pt=E(St,Z[0]),Xt=E(St,j[0]),or=S(S(S(E(S(S(E(S(E(g(Xt,rt),Z[1]),S(E(g(pt,Ht),-j[1]),E(g(Ae,Qt),N[1]))),G[2]),E(S(E(g(Xt,rt),G[1]),S(E(g(Et,lt),-j[1]),E(g(Ue,He),N[1]))),-Z[2])),S(E(S(E(g(pt,Ht),G[1]),S(E(g(Et,lt),-Z[1]),E(g(ct,ce),N[1]))),j[2]),E(S(E(g(Ae,Qt),G[1]),S(E(g(Ue,He),-Z[1]),E(g(ct,ce),j[1]))),-N[2]))),U[3]),S(E(S(S(E(S(E(g(Xt,rt),Z[1]),S(E(g(pt,Ht),-j[1]),E(g(Ae,Qt),N[1]))),U[2]),E(S(E(g(Xt,rt),U[1]),S(E(g(dt,De),-j[1]),E(g(je,we),N[1]))),-Z[2])),S(E(S(E(g(pt,Ht),U[1]),S(E(g(dt,De),-Z[1]),E(g(st,Ee),N[1]))),j[2]),E(S(E(g(Ae,Qt),U[1]),S(E(g(je,we),-Z[1]),E(g(st,Ee),j[1]))),-N[2]))),-G[3]),E(S(S(E(S(E(g(Xt,rt),G[1]),S(E(g(Et,lt),-j[1]),E(g(Ue,He),N[1]))),U[2]),E(S(E(g(Xt,rt),U[1]),S(E(g(dt,De),-j[1]),E(g(je,we),N[1]))),-G[2])),S(E(S(E(g(Et,lt),U[1]),S(E(g(dt,De),-G[1]),E(g(Pe,Se),N[1]))),j[2]),E(S(E(g(Ue,He),U[1]),S(E(g(je,we),-G[1]),E(g(Pe,Se),j[1]))),-N[2]))),Z[3]))),S(S(E(S(S(E(S(E(g(pt,Ht),G[1]),S(E(g(Et,lt),-Z[1]),E(g(ct,ce),N[1]))),U[2]),E(S(E(g(pt,Ht),U[1]),S(E(g(dt,De),-Z[1]),E(g(st,Ee),N[1]))),-G[2])),S(E(S(E(g(Et,lt),U[1]),S(E(g(dt,De),-G[1]),E(g(Pe,Se),N[1]))),Z[2]),E(S(E(g(ct,ce),U[1]),S(E(g(st,Ee),-G[1]),E(g(Pe,Se),Z[1]))),-N[2]))),-j[3]),E(S(S(E(S(E(g(Ae,Qt),G[1]),S(E(g(Ue,He),-Z[1]),E(g(ct,ce),j[1]))),U[2]),E(S(E(g(Ae,Qt),U[1]),S(E(g(je,we),-Z[1]),E(g(st,Ee),j[1]))),-G[2])),S(E(S(E(g(Ue,He),U[1]),S(E(g(je,we),-G[1]),E(g(Pe,Se),j[1]))),Z[2]),E(S(E(g(ct,ce),U[1]),S(E(g(st,Ee),-G[1]),E(g(Pe,Se),Z[1]))),-j[2]))),N[3])),S(E(S(S(E(S(E(g(Xt,rt),Z[1]),S(E(g(pt,Ht),-j[1]),E(g(Ae,Qt),N[1]))),U[2]),E(S(E(g(Xt,rt),U[1]),S(E(g(dt,De),-j[1]),E(g(je,we),N[1]))),-Z[2])),S(E(S(E(g(pt,Ht),U[1]),S(E(g(dt,De),-Z[1]),E(g(st,Ee),N[1]))),j[2]),E(S(E(g(Ae,Qt),U[1]),S(E(g(je,we),-Z[1]),E(g(st,Ee),j[1]))),-N[2]))),q[3]),E(S(S(E(S(E(g(Xt,rt),Z[1]),S(E(g(pt,Ht),-j[1]),E(g(Ae,Qt),N[1]))),q[2]),E(S(E(g(Xt,rt),q[1]),S(E(g(Tt,Ce),-j[1]),E(g(tt,ke),N[1]))),-Z[2])),S(E(S(E(g(pt,Ht),q[1]),S(E(g(Tt,Ce),-Z[1]),E(g(Vt,_e),N[1]))),j[2]),E(S(E(g(Ae,Qt),q[1]),S(E(g(tt,ke),-Z[1]),E(g(Vt,_e),j[1]))),-N[2]))),-U[3])))),S(S(S(E(S(S(E(S(E(g(Xt,rt),U[1]),S(E(g(dt,De),-j[1]),E(g(je,we),N[1]))),q[2]),E(S(E(g(Xt,rt),q[1]),S(E(g(Tt,Ce),-j[1]),E(g(tt,ke),N[1]))),-U[2])),S(E(S(E(g(dt,De),q[1]),S(E(g(Tt,Ce),-U[1]),E(g(ie,re),N[1]))),j[2]),E(S(E(g(je,we),q[1]),S(E(g(tt,ke),-U[1]),E(g(ie,re),j[1]))),-N[2]))),Z[3]),E(S(S(E(S(E(g(pt,Ht),U[1]),S(E(g(dt,De),-Z[1]),E(g(st,Ee),N[1]))),q[2]),E(S(E(g(pt,Ht),q[1]),S(E(g(Tt,Ce),-Z[1]),E(g(Vt,_e),N[1]))),-U[2])),S(E(S(E(g(dt,De),q[1]),S(E(g(Tt,Ce),-U[1]),E(g(ie,re),N[1]))),Z[2]),E(S(E(g(st,Ee),q[1]),S(E(g(Vt,_e),-U[1]),E(g(ie,re),Z[1]))),-N[2]))),-j[3])),S(E(S(S(E(S(E(g(Ae,Qt),U[1]),S(E(g(je,we),-Z[1]),E(g(st,Ee),j[1]))),q[2]),E(S(E(g(Ae,Qt),q[1]),S(E(g(tt,ke),-Z[1]),E(g(Vt,_e),j[1]))),-U[2])),S(E(S(E(g(je,we),q[1]),S(E(g(tt,ke),-U[1]),E(g(ie,re),j[1]))),Z[2]),E(S(E(g(st,Ee),q[1]),S(E(g(Vt,_e),-U[1]),E(g(ie,re),Z[1]))),-j[2]))),N[3]),E(S(S(E(S(E(g(pt,Ht),G[1]),S(E(g(Et,lt),-Z[1]),E(g(ct,ce),N[1]))),U[2]),E(S(E(g(pt,Ht),U[1]),S(E(g(dt,De),-Z[1]),E(g(st,Ee),N[1]))),-G[2])),S(E(S(E(g(Et,lt),U[1]),S(E(g(dt,De),-G[1]),E(g(Pe,Se),N[1]))),Z[2]),E(S(E(g(ct,ce),U[1]),S(E(g(st,Ee),-G[1]),E(g(Pe,Se),Z[1]))),-N[2]))),q[3]))),S(S(E(S(S(E(S(E(g(pt,Ht),G[1]),S(E(g(Et,lt),-Z[1]),E(g(ct,ce),N[1]))),q[2]),E(S(E(g(pt,Ht),q[1]),S(E(g(Tt,Ce),-Z[1]),E(g(Vt,_e),N[1]))),-G[2])),S(E(S(E(g(Et,lt),q[1]),S(E(g(Tt,Ce),-G[1]),E(g(me,oe),N[1]))),Z[2]),E(S(E(g(ct,ce),q[1]),S(E(g(Vt,_e),-G[1]),E(g(me,oe),Z[1]))),-N[2]))),-U[3]),E(S(S(E(S(E(g(pt,Ht),U[1]),S(E(g(dt,De),-Z[1]),E(g(st,Ee),N[1]))),q[2]),E(S(E(g(pt,Ht),q[1]),S(E(g(Tt,Ce),-Z[1]),E(g(Vt,_e),N[1]))),-U[2])),S(E(S(E(g(dt,De),q[1]),S(E(g(Tt,Ce),-U[1]),E(g(ie,re),N[1]))),Z[2]),E(S(E(g(st,Ee),q[1]),S(E(g(Vt,_e),-U[1]),E(g(ie,re),Z[1]))),-N[2]))),G[3])),S(E(S(S(E(S(E(g(Et,lt),U[1]),S(E(g(dt,De),-G[1]),E(g(Pe,Se),N[1]))),q[2]),E(S(E(g(Et,lt),q[1]),S(E(g(Tt,Ce),-G[1]),E(g(me,oe),N[1]))),-U[2])),S(E(S(E(g(dt,De),q[1]),S(E(g(Tt,Ce),-U[1]),E(g(ie,re),N[1]))),G[2]),E(S(E(g(Pe,Se),q[1]),S(E(g(me,oe),-U[1]),E(g(ie,re),G[1]))),-N[2]))),-Z[3]),E(S(S(E(S(E(g(ct,ce),U[1]),S(E(g(st,Ee),-G[1]),E(g(Pe,Se),Z[1]))),q[2]),E(S(E(g(ct,ce),q[1]),S(E(g(Vt,_e),-G[1]),E(g(me,oe),Z[1]))),-U[2])),S(E(S(E(g(st,Ee),q[1]),S(E(g(Vt,_e),-U[1]),E(g(ie,re),Z[1]))),G[2]),E(S(E(g(Pe,Se),q[1]),S(E(g(me,oe),-U[1]),E(g(ie,re),G[1]))),-Z[2]))),N[3]))))),_r=S(S(S(E(S(S(E(S(E(g(Xt,rt),Z[1]),S(E(g(pt,Ht),-j[1]),E(g(Ae,Qt),N[1]))),G[2]),E(S(E(g(Xt,rt),G[1]),S(E(g(Et,lt),-j[1]),E(g(Ue,He),N[1]))),-Z[2])),S(E(S(E(g(pt,Ht),G[1]),S(E(g(Et,lt),-Z[1]),E(g(ct,ce),N[1]))),j[2]),E(S(E(g(Ae,Qt),G[1]),S(E(g(Ue,He),-Z[1]),E(g(ct,ce),j[1]))),-N[2]))),q[3]),S(E(S(S(E(S(E(g(Xt,rt),Z[1]),S(E(g(pt,Ht),-j[1]),E(g(Ae,Qt),N[1]))),q[2]),E(S(E(g(Xt,rt),q[1]),S(E(g(Tt,Ce),-j[1]),E(g(tt,ke),N[1]))),-Z[2])),S(E(S(E(g(pt,Ht),q[1]),S(E(g(Tt,Ce),-Z[1]),E(g(Vt,_e),N[1]))),j[2]),E(S(E(g(Ae,Qt),q[1]),S(E(g(tt,ke),-Z[1]),E(g(Vt,_e),j[1]))),-N[2]))),-G[3]),E(S(S(E(S(E(g(Xt,rt),G[1]),S(E(g(Et,lt),-j[1]),E(g(Ue,He),N[1]))),q[2]),E(S(E(g(Xt,rt),q[1]),S(E(g(Tt,Ce),-j[1]),E(g(tt,ke),N[1]))),-G[2])),S(E(S(E(g(Et,lt),q[1]),S(E(g(Tt,Ce),-G[1]),E(g(me,oe),N[1]))),j[2]),E(S(E(g(Ue,He),q[1]),S(E(g(tt,ke),-G[1]),E(g(me,oe),j[1]))),-N[2]))),Z[3]))),S(S(E(S(S(E(S(E(g(pt,Ht),G[1]),S(E(g(Et,lt),-Z[1]),E(g(ct,ce),N[1]))),q[2]),E(S(E(g(pt,Ht),q[1]),S(E(g(Tt,Ce),-Z[1]),E(g(Vt,_e),N[1]))),-G[2])),S(E(S(E(g(Et,lt),q[1]),S(E(g(Tt,Ce),-G[1]),E(g(me,oe),N[1]))),Z[2]),E(S(E(g(ct,ce),q[1]),S(E(g(Vt,_e),-G[1]),E(g(me,oe),Z[1]))),-N[2]))),-j[3]),E(S(S(E(S(E(g(Ae,Qt),G[1]),S(E(g(Ue,He),-Z[1]),E(g(ct,ce),j[1]))),q[2]),E(S(E(g(Ae,Qt),q[1]),S(E(g(tt,ke),-Z[1]),E(g(Vt,_e),j[1]))),-G[2])),S(E(S(E(g(Ue,He),q[1]),S(E(g(tt,ke),-G[1]),E(g(me,oe),j[1]))),Z[2]),E(S(E(g(ct,ce),q[1]),S(E(g(Vt,_e),-G[1]),E(g(me,oe),Z[1]))),-j[2]))),N[3])),S(E(S(S(E(S(E(g(Xt,rt),G[1]),S(E(g(Et,lt),-j[1]),E(g(Ue,He),N[1]))),U[2]),E(S(E(g(Xt,rt),U[1]),S(E(g(dt,De),-j[1]),E(g(je,we),N[1]))),-G[2])),S(E(S(E(g(Et,lt),U[1]),S(E(g(dt,De),-G[1]),E(g(Pe,Se),N[1]))),j[2]),E(S(E(g(Ue,He),U[1]),S(E(g(je,we),-G[1]),E(g(Pe,Se),j[1]))),-N[2]))),q[3]),E(S(S(E(S(E(g(Xt,rt),G[1]),S(E(g(Et,lt),-j[1]),E(g(Ue,He),N[1]))),q[2]),E(S(E(g(Xt,rt),q[1]),S(E(g(Tt,Ce),-j[1]),E(g(tt,ke),N[1]))),-G[2])),S(E(S(E(g(Et,lt),q[1]),S(E(g(Tt,Ce),-G[1]),E(g(me,oe),N[1]))),j[2]),E(S(E(g(Ue,He),q[1]),S(E(g(tt,ke),-G[1]),E(g(me,oe),j[1]))),-N[2]))),-U[3])))),S(S(S(E(S(S(E(S(E(g(Xt,rt),U[1]),S(E(g(dt,De),-j[1]),E(g(je,we),N[1]))),q[2]),E(S(E(g(Xt,rt),q[1]),S(E(g(Tt,Ce),-j[1]),E(g(tt,ke),N[1]))),-U[2])),S(E(S(E(g(dt,De),q[1]),S(E(g(Tt,Ce),-U[1]),E(g(ie,re),N[1]))),j[2]),E(S(E(g(je,we),q[1]),S(E(g(tt,ke),-U[1]),E(g(ie,re),j[1]))),-N[2]))),G[3]),E(S(S(E(S(E(g(Et,lt),U[1]),S(E(g(dt,De),-G[1]),E(g(Pe,Se),N[1]))),q[2]),E(S(E(g(Et,lt),q[1]),S(E(g(Tt,Ce),-G[1]),E(g(me,oe),N[1]))),-U[2])),S(E(S(E(g(dt,De),q[1]),S(E(g(Tt,Ce),-U[1]),E(g(ie,re),N[1]))),G[2]),E(S(E(g(Pe,Se),q[1]),S(E(g(me,oe),-U[1]),E(g(ie,re),G[1]))),-N[2]))),-j[3])),S(E(S(S(E(S(E(g(Ue,He),U[1]),S(E(g(je,we),-G[1]),E(g(Pe,Se),j[1]))),q[2]),E(S(E(g(Ue,He),q[1]),S(E(g(tt,ke),-G[1]),E(g(me,oe),j[1]))),-U[2])),S(E(S(E(g(je,we),q[1]),S(E(g(tt,ke),-U[1]),E(g(ie,re),j[1]))),G[2]),E(S(E(g(Pe,Se),q[1]),S(E(g(me,oe),-U[1]),E(g(ie,re),G[1]))),-j[2]))),N[3]),E(S(S(E(S(E(g(Ae,Qt),G[1]),S(E(g(Ue,He),-Z[1]),E(g(ct,ce),j[1]))),U[2]),E(S(E(g(Ae,Qt),U[1]),S(E(g(je,we),-Z[1]),E(g(st,Ee),j[1]))),-G[2])),S(E(S(E(g(Ue,He),U[1]),S(E(g(je,we),-G[1]),E(g(Pe,Se),j[1]))),Z[2]),E(S(E(g(ct,ce),U[1]),S(E(g(st,Ee),-G[1]),E(g(Pe,Se),Z[1]))),-j[2]))),q[3]))),S(S(E(S(S(E(S(E(g(Ae,Qt),G[1]),S(E(g(Ue,He),-Z[1]),E(g(ct,ce),j[1]))),q[2]),E(S(E(g(Ae,Qt),q[1]),S(E(g(tt,ke),-Z[1]),E(g(Vt,_e),j[1]))),-G[2])),S(E(S(E(g(Ue,He),q[1]),S(E(g(tt,ke),-G[1]),E(g(me,oe),j[1]))),Z[2]),E(S(E(g(ct,ce),q[1]),S(E(g(Vt,_e),-G[1]),E(g(me,oe),Z[1]))),-j[2]))),-U[3]),E(S(S(E(S(E(g(Ae,Qt),U[1]),S(E(g(je,we),-Z[1]),E(g(st,Ee),j[1]))),q[2]),E(S(E(g(Ae,Qt),q[1]),S(E(g(tt,ke),-Z[1]),E(g(Vt,_e),j[1]))),-U[2])),S(E(S(E(g(je,we),q[1]),S(E(g(tt,ke),-U[1]),E(g(ie,re),j[1]))),Z[2]),E(S(E(g(st,Ee),q[1]),S(E(g(Vt,_e),-U[1]),E(g(ie,re),Z[1]))),-j[2]))),G[3])),S(E(S(S(E(S(E(g(Ue,He),U[1]),S(E(g(je,we),-G[1]),E(g(Pe,Se),j[1]))),q[2]),E(S(E(g(Ue,He),q[1]),S(E(g(tt,ke),-G[1]),E(g(me,oe),j[1]))),-U[2])),S(E(S(E(g(je,we),q[1]),S(E(g(tt,ke),-U[1]),E(g(ie,re),j[1]))),G[2]),E(S(E(g(Pe,Se),q[1]),S(E(g(me,oe),-U[1]),E(g(ie,re),G[1]))),-j[2]))),-Z[3]),E(S(S(E(S(E(g(ct,ce),U[1]),S(E(g(st,Ee),-G[1]),E(g(Pe,Se),Z[1]))),q[2]),E(S(E(g(ct,ce),q[1]),S(E(g(Vt,_e),-G[1]),E(g(me,oe),Z[1]))),-U[2])),S(E(S(E(g(st,Ee),q[1]),S(E(g(Vt,_e),-U[1]),E(g(ie,re),Z[1]))),G[2]),E(S(E(g(Pe,Se),q[1]),S(E(g(me,oe),-U[1]),E(g(ie,re),G[1]))),-Z[2]))),j[3]))))),Er=g(or,_r);return Er[Er.length-1]}return z}var T=[d,v,m];function L(S){var g=T[S.length];return g||(g=T[S.length]=h(S.length)),g.apply(void 0,S)}function x(S,g,P,E,z,q,U,G){function Z(j,N,H,re,oe,_e){switch(arguments.length){case 0:case 1:return 0;case 2:return E(j,N);case 3:return z(j,N,H);case 4:return q(j,N,H,re);case 5:return U(j,N,H,re,oe);case 6:return G(j,N,H,re,oe,_e)}for(var ke=new Array(arguments.length),Ce=0;Ce<arguments.length;++Ce)ke[Ce]=arguments[Ce];return S(ke)}return Z}function C(){for(;T.length<=f;)T.push(h(T.length));i.exports=x.apply(void 0,[L].concat(T));for(var S=0;S<=f;++S)i.exports[S]=T[S]}C()},727:function(i,a,o){"use strict";var s=o(2962),l=6;function u(T){var L=T===2?h:T===3?d:T===4?v:T===5?m:b;return T<6?L(s[T]):L(s)}function c(){return[[0]]}function f(T,L){return[[L[0]],[T[0][0]]]}function h(T){return function(x,C){return[T([[+C[0],+x[0][1]],[+C[1],+x[1][1]]]),T([[+x[0][0],+C[0]],[+x[1][0],+C[1]]]),T(x)]}}function d(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2]],[+C[1],+x[1][1],+x[1][2]],[+C[2],+x[2][1],+x[2][2]]]),T([[+x[0][0],+C[0],+x[0][2]],[+x[1][0],+C[1],+x[1][2]],[+x[2][0],+C[2],+x[2][2]]]),T([[+x[0][0],+x[0][1],+C[0]],[+x[1][0],+x[1][1],+C[1]],[+x[2][0],+x[2][1],+C[2]]]),T(x)]}}function v(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2],+x[0][3]],[+C[1],+x[1][1],+x[1][2],+x[1][3]],[+C[2],+x[2][1],+x[2][2],+x[2][3]],[+C[3],+x[3][1],+x[3][2],+x[3][3]]]),T([[+x[0][0],+C[0],+x[0][2],+x[0][3]],[+x[1][0],+C[1],+x[1][2],+x[1][3]],[+x[2][0],+C[2],+x[2][2],+x[2][3]],[+x[3][0],+C[3],+x[3][2],+x[3][3]]]),T([[+x[0][0],+x[0][1],+C[0],+x[0][3]],[+x[1][0],+x[1][1],+C[1],+x[1][3]],[+x[2][0],+x[2][1],+C[2],+x[2][3]],[+x[3][0],+x[3][1],+C[3],+x[3][3]]]),T([[+x[0][0],+x[0][1],+x[0][2],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+C[3]]]),T(x)]}}function m(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4]],[+C[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4]],[+C[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4]],[+C[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4]],[+C[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4]]]),T([[+x[0][0],+C[0],+x[0][2],+x[0][3],+x[0][4]],[+x[1][0],+C[1],+x[1][2],+x[1][3],+x[1][4]],[+x[2][0],+C[2],+x[2][2],+x[2][3],+x[2][4]],[+x[3][0],+C[3],+x[3][2],+x[3][3],+x[3][4]],[+x[4][0],+C[4],+x[4][2],+x[4][3],+x[4][4]]]),T([[+x[0][0],+x[0][1],+C[0],+x[0][3],+x[0][4]],[+x[1][0],+x[1][1],+C[1],+x[1][3],+x[1][4]],[+x[2][0],+x[2][1],+C[2],+x[2][3],+x[2][4]],[+x[3][0],+x[3][1],+C[3],+x[3][3],+x[3][4]],[+x[4][0],+x[4][1],+C[4],+x[4][3],+x[4][4]]]),T([[+x[0][0],+x[0][1],+x[0][2],+C[0],+x[0][4]],[+x[1][0],+x[1][1],+x[1][2],+C[1],+x[1][4]],[+x[2][0],+x[2][1],+x[2][2],+C[2],+x[2][4]],[+x[3][0],+x[3][1],+x[3][2],+C[3],+x[3][4]],[+x[4][0],+x[4][1],+x[4][2],+C[4],+x[4][4]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+C[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+C[4]]]),T(x)]}}function b(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+C[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+C[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+C[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+C[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+C[5],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+C[0],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+C[1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+C[2],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+C[3],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+C[4],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+C[5],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+C[0],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+C[1],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+C[2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+C[3],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+C[4],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+C[5],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+C[0],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+C[1],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+C[2],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+C[3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+C[4],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+C[5],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+C[0],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+C[1],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+C[2],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+C[3],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+C[4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+C[5],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+C[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+C[4]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+C[5]]]),T(x)]}}var p=[c,f];function k(T,L,x,C,S,g,P,E){return function(q,U){switch(q.length){case 0:return T(q,U);case 1:return L(q,U);case 2:return x(q,U);case 3:return C(q,U);case 4:return S(q,U);case 5:return g(q,U)}var G=P[q.length];return G||(G=P[q.length]=E(q.length)),G(q,U)}}function M(){for(;p.length<l;)p.push(u(p.length));i.exports=k.apply(void 0,p.concat([p,u]));for(var T=0;T<l;++T)i.exports[T]=p[T]}M()},3250:function(i,a,o){"use strict";var s=o(5250),l=o(8210),u=o(3012),c=o(8545),f=5,h=11102230246251565e-32,d=(3+16*h)*h,v=(7+56*h)*h;function m(g,P,E,z){return function(U,G,Z){var j=g(g(P(G[1],Z[0]),P(-Z[1],G[0])),g(P(U[1],G[0]),P(-G[1],U[0]))),N=g(P(U[1],Z[0]),P(-Z[1],U[0])),H=z(j,N);return H[H.length-1]}}function b(g,P,E,z){return function(U,G,Z,j){var N=g(g(E(g(P(Z[1],j[0]),P(-j[1],Z[0])),G[2]),g(E(g(P(G[1],j[0]),P(-j[1],G[0])),-Z[2]),E(g(P(G[1],Z[0]),P(-Z[1],G[0])),j[2]))),g(E(g(P(G[1],j[0]),P(-j[1],G[0])),U[2]),g(E(g(P(U[1],j[0]),P(-j[1],U[0])),-G[2]),E(g(P(U[1],G[0]),P(-G[1],U[0])),j[2])))),H=g(g(E(g(P(Z[1],j[0]),P(-j[1],Z[0])),U[2]),g(E(g(P(U[1],j[0]),P(-j[1],U[0])),-Z[2]),E(g(P(U[1],Z[0]),P(-Z[1],U[0])),j[2]))),g(E(g(P(G[1],Z[0]),P(-Z[1],G[0])),U[2]),g(E(g(P(U[1],Z[0]),P(-Z[1],U[0])),-G[2]),E(g(P(U[1],G[0]),P(-G[1],U[0])),Z[2])))),re=z(N,H);return re[re.length-1]}}function p(g,P,E,z){return function(U,G,Z,j,N){var H=g(g(g(E(g(E(g(P(j[1],N[0]),P(-N[1],j[0])),Z[2]),g(E(g(P(Z[1],N[0]),P(-N[1],Z[0])),-j[2]),E(g(P(Z[1],j[0]),P(-j[1],Z[0])),N[2]))),G[3]),g(E(g(E(g(P(j[1],N[0]),P(-N[1],j[0])),G[2]),g(E(g(P(G[1],N[0]),P(-N[1],G[0])),-j[2]),E(g(P(G[1],j[0]),P(-j[1],G[0])),N[2]))),-Z[3]),E(g(E(g(P(Z[1],N[0]),P(-N[1],Z[0])),G[2]),g(E(g(P(G[1],N[0]),P(-N[1],G[0])),-Z[2]),E(g(P(G[1],Z[0]),P(-Z[1],G[0])),N[2]))),j[3]))),g(E(g(E(g(P(Z[1],j[0]),P(-j[1],Z[0])),G[2]),g(E(g(P(G[1],j[0]),P(-j[1],G[0])),-Z[2]),E(g(P(G[1],Z[0]),P(-Z[1],G[0])),j[2]))),-N[3]),g(E(g(E(g(P(j[1],N[0]),P(-N[1],j[0])),G[2]),g(E(g(P(G[1],N[0]),P(-N[1],G[0])),-j[2]),E(g(P(G[1],j[0]),P(-j[1],G[0])),N[2]))),U[3]),E(g(E(g(P(j[1],N[0]),P(-N[1],j[0])),U[2]),g(E(g(P(U[1],N[0]),P(-N[1],U[0])),-j[2]),E(g(P(U[1],j[0]),P(-j[1],U[0])),N[2]))),-G[3])))),g(g(E(g(E(g(P(G[1],N[0]),P(-N[1],G[0])),U[2]),g(E(g(P(U[1],N[0]),P(-N[1],U[0])),-G[2]),E(g(P(U[1],G[0]),P(-G[1],U[0])),N[2]))),j[3]),g(E(g(E(g(P(G[1],j[0]),P(-j[1],G[0])),U[2]),g(E(g(P(U[1],j[0]),P(-j[1],U[0])),-G[2]),E(g(P(U[1],G[0]),P(-G[1],U[0])),j[2]))),-N[3]),E(g(E(g(P(Z[1],j[0]),P(-j[1],Z[0])),G[2]),g(E(g(P(G[1],j[0]),P(-j[1],G[0])),-Z[2]),E(g(P(G[1],Z[0]),P(-Z[1],G[0])),j[2]))),U[3]))),g(E(g(E(g(P(Z[1],j[0]),P(-j[1],Z[0])),U[2]),g(E(g(P(U[1],j[0]),P(-j[1],U[0])),-Z[2]),E(g(P(U[1],Z[0]),P(-Z[1],U[0])),j[2]))),-G[3]),g(E(g(E(g(P(G[1],j[0]),P(-j[1],G[0])),U[2]),g(E(g(P(U[1],j[0]),P(-j[1],U[0])),-G[2]),E(g(P(U[1],G[0]),P(-G[1],U[0])),j[2]))),Z[3]),E(g(E(g(P(G[1],Z[0]),P(-Z[1],G[0])),U[2]),g(E(g(P(U[1],Z[0]),P(-Z[1],U[0])),-G[2]),E(g(P(U[1],G[0]),P(-G[1],U[0])),Z[2]))),-j[3]))))),re=g(g(g(E(g(E(g(P(j[1],N[0]),P(-N[1],j[0])),Z[2]),g(E(g(P(Z[1],N[0]),P(-N[1],Z[0])),-j[2]),E(g(P(Z[1],j[0]),P(-j[1],Z[0])),N[2]))),U[3]),E(g(E(g(P(j[1],N[0]),P(-N[1],j[0])),U[2]),g(E(g(P(U[1],N[0]),P(-N[1],U[0])),-j[2]),E(g(P(U[1],j[0]),P(-j[1],U[0])),N[2]))),-Z[3])),g(E(g(E(g(P(Z[1],N[0]),P(-N[1],Z[0])),U[2]),g(E(g(P(U[1],N[0]),P(-N[1],U[0])),-Z[2]),E(g(P(U[1],Z[0]),P(-Z[1],U[0])),N[2]))),j[3]),E(g(E(g(P(Z[1],j[0]),P(-j[1],Z[0])),U[2]),g(E(g(P(U[1],j[0]),P(-j[1],U[0])),-Z[2]),E(g(P(U[1],Z[0]),P(-Z[1],U[0])),j[2]))),-N[3]))),g(g(E(g(E(g(P(Z[1],N[0]),P(-N[1],Z[0])),G[2]),g(E(g(P(G[1],N[0]),P(-N[1],G[0])),-Z[2]),E(g(P(G[1],Z[0]),P(-Z[1],G[0])),N[2]))),U[3]),E(g(E(g(P(Z[1],N[0]),P(-N[1],Z[0])),U[2]),g(E(g(P(U[1],N[0]),P(-N[1],U[0])),-Z[2]),E(g(P(U[1],Z[0]),P(-Z[1],U[0])),N[2]))),-G[3])),g(E(g(E(g(P(G[1],N[0]),P(-N[1],G[0])),U[2]),g(E(g(P(U[1],N[0]),P(-N[1],U[0])),-G[2]),E(g(P(U[1],G[0]),P(-G[1],U[0])),N[2]))),Z[3]),E(g(E(g(P(G[1],Z[0]),P(-Z[1],G[0])),U[2]),g(E(g(P(U[1],Z[0]),P(-Z[1],U[0])),-G[2]),E(g(P(U[1],G[0]),P(-G[1],U[0])),Z[2]))),-N[3])))),oe=z(H,re);return oe[oe.length-1]}}function k(g){var P=g===3?m:g===4?b:p;return P(l,s,u,c)}var M=k(3),T=k(4),L=[function(){return 0},function(){return 0},function(P,E){return E[0]-P[0]},function(P,E,z){var q=(P[1]-z[1])*(E[0]-z[0]),U=(P[0]-z[0])*(E[1]-z[1]),G=q-U,Z;if(q>0){if(U<=0)return G;Z=q+U}else if(q<0){if(U>=0)return G;Z=-(q+U)}else return G;var j=d*Z;return G>=j||G<=-j?G:M(P,E,z)},function(P,E,z,q){var U=P[0]-q[0],G=E[0]-q[0],Z=z[0]-q[0],j=P[1]-q[1],N=E[1]-q[1],H=z[1]-q[1],re=P[2]-q[2],oe=E[2]-q[2],_e=z[2]-q[2],ke=G*H,Ce=Z*N,ge=Z*j,ie=U*H,Se=U*N,Ee=G*j,we=re*(ke-Ce)+oe*(ge-ie)+_e*(Se-Ee),De=(Math.abs(ke)+Math.abs(Ce))*Math.abs(re)+(Math.abs(ge)+Math.abs(ie))*Math.abs(oe)+(Math.abs(Se)+Math.abs(Ee))*Math.abs(_e),Le=v*De;return we>Le||-we>Le?we:T(P,E,z,q)}];function x(g){var P=L[g.length];return P||(P=L[g.length]=k(g.length)),P.apply(void 0,g)}function C(g,P,E,z,q,U,G){return function(j,N,H,re,oe){switch(arguments.length){case 0:case 1:return 0;case 2:return z(j,N);case 3:return q(j,N,H);case 4:return U(j,N,H,re);case 5:return G(j,N,H,re,oe)}for(var _e=new Array(arguments.length),ke=0;ke<arguments.length;++ke)_e[ke]=arguments[ke];return g(_e)}}function S(){for(;L.length<=f;)L.push(k(L.length));i.exports=C.apply(void 0,[x].concat(L));for(var g=0;g<=f;++g)i.exports[g]=L[g]}S()},5382:function(i,a,o){"use strict";var s=o(8210),l=o(3012);i.exports=u;function u(c,f){if(c.length===1)return l(f,c[0]);if(f.length===1)return l(c,f[0]);if(c.length===0||f.length===0)return[0];var h=[0];if(c.length<f.length)for(var d=0;d<c.length;++d)h=s(h,l(f,c[d]));else for(var d=0;d<f.length;++d)h=s(h,l(c,f[d]));return h}},3012:function(i,a,o){"use strict";var s=o(5250),l=o(9362);i.exports=u;function u(c,f){var h=c.length;if(h===1){var d=s(c[0],f);return d[0]?d:[d[1]]}var v=new Array(2*h),m=[.1,.1],b=[.1,.1],p=0;s(c[0],f,m),m[0]&&(v[p++]=m[0]);for(var k=1;k<h;++k){s(c[k],f,b);var M=m[1];l(M,b[0],m),m[0]&&(v[p++]=m[0]);var T=b[1],L=m[1],x=T+L,C=x-T,S=L-C;m[1]=x,S&&(v[p++]=S)}return m[1]&&(v[p++]=m[1]),p===0&&(v[p++]=0),v.length=p,v}},1125:function(i,a,o){"use strict";i.exports=u;var s=o(3250)[3];function l(c,f,h,d){for(var v=0;v<2;++v){var m=c[v],b=f[v],p=Math.min(m,b),k=Math.max(m,b),M=h[v],T=d[v],L=Math.min(M,T),x=Math.max(M,T);if(x<p||k<L)return!1}return!0}function u(c,f,h,d){var v=s(c,h,d),m=s(f,h,d);if(v>0&&m>0||v<0&&m<0)return!1;var b=s(h,c,f),p=s(d,c,f);return b>0&&p>0||b<0&&p<0?!1:v===0&&m===0&&b===0&&p===0?l(c,f,h,d):!0}},8545:function(i){"use strict";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],-l[0]);var f=u+c,h=new Array(f),d=0,v=0,m=0,b=Math.abs,p=s[v],k=b(p),M=-l[m],T=b(M),L,x;k<T?(x=p,v+=1,v<u&&(p=s[v],k=b(p))):(x=M,m+=1,m<c&&(M=-l[m],T=b(M))),v<u&&k<T||m>=c?(L=p,v+=1,v<u&&(p=s[v],k=b(p))):(L=M,m+=1,m<c&&(M=-l[m],T=b(M)));for(var C=L+x,S=C-L,g=x-S,P=g,E=C,z,q,U,G,Z;v<u&&m<c;)k<T?(L=p,v+=1,v<u&&(p=s[v],k=b(p))):(L=M,m+=1,m<c&&(M=-l[m],T=b(M))),x=P,C=L+x,S=C-L,g=x-S,g&&(h[d++]=g),z=E+C,q=z-E,U=z-q,G=C-q,Z=E-U,P=Z+G,E=z;for(;v<u;)L=p,x=P,C=L+x,S=C-L,g=x-S,g&&(h[d++]=g),z=E+C,q=z-E,U=z-q,G=C-q,Z=E-U,P=Z+G,E=z,v+=1,v<u&&(p=s[v]);for(;m<c;)L=M,x=P,C=L+x,S=C-L,g=x-S,g&&(h[d++]=g),z=E+C,q=z-E,U=z-q,G=C-q,Z=E-U,P=Z+G,E=z,m+=1,m<c&&(M=-l[m]);return P&&(h[d++]=P),E&&(h[d++]=E),d||(h[d++]=0),h.length=d,h}},8210:function(i){"use strict";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],l[0]);var f=u+c,h=new Array(f),d=0,v=0,m=0,b=Math.abs,p=s[v],k=b(p),M=l[m],T=b(M),L,x;k<T?(x=p,v+=1,v<u&&(p=s[v],k=b(p))):(x=M,m+=1,m<c&&(M=l[m],T=b(M))),v<u&&k<T||m>=c?(L=p,v+=1,v<u&&(p=s[v],k=b(p))):(L=M,m+=1,m<c&&(M=l[m],T=b(M)));for(var C=L+x,S=C-L,g=x-S,P=g,E=C,z,q,U,G,Z;v<u&&m<c;)k<T?(L=p,v+=1,v<u&&(p=s[v],k=b(p))):(L=M,m+=1,m<c&&(M=l[m],T=b(M))),x=P,C=L+x,S=C-L,g=x-S,g&&(h[d++]=g),z=E+C,q=z-E,U=z-q,G=C-q,Z=E-U,P=Z+G,E=z;for(;v<u;)L=p,x=P,C=L+x,S=C-L,g=x-S,g&&(h[d++]=g),z=E+C,q=z-E,U=z-q,G=C-q,Z=E-U,P=Z+G,E=z,v+=1,v<u&&(p=s[v]);for(;m<c;)L=M,x=P,C=L+x,S=C-L,g=x-S,g&&(h[d++]=g),z=E+C,q=z-E,U=z-q,G=C-q,Z=E-U,P=Z+G,E=z,m+=1,m<c&&(M=l[m]);return P&&(h[d++]=P),E&&(h[d++]=E),d||(h[d++]=0),h.length=d,h}},9127:function(i,a,o){"use strict";i.exports=u;var s=o(6204),l=o(5771);function u(c){return l(s(c))}},7765:function(i,a,o){"use strict";i.exports=p;var s=o(9618),l=o(1888),u=o(446),c=o(1570);function f(k){for(var M=k.length,T=0,L=0;L<M;++L)T=Math.max(T,k[L].length)|0;return T-1}function h(k,M){for(var T=k.length,L=l.mallocUint8(T),x=0;x<T;++x)L[x]=k[x]<M|0;return L}function d(k,M){for(var T=k.length,L=M*(M+1)/2*T|0,x=l.mallocUint32(L*2),C=0,S=0;S<T;++S)for(var g=k[S],M=g.length,P=0;P<M;++P)for(var E=0;E<P;++E){var z=g[E],q=g[P];x[C++]=Math.min(z,q)|0,x[C++]=Math.max(z,q)|0}var U=C/2|0;u(s(x,[U,2]));for(var G=2,S=2;S<C;S+=2)x[S-2]===x[S]&&x[S-1]===x[S+1]||(x[G++]=x[S],x[G++]=x[S+1]);return s(x,[G/2|0,2])}function v(k,M,T,L){for(var x=k.data,C=k.shape[0],S=l.mallocDouble(C),g=0,P=0;P<C;++P){var E=x[2*P],z=x[2*P+1];if(T[E]!==T[z]){var q=M[E],U=M[z];x[2*g]=E,x[2*g+1]=z,S[g++]=(U-L)/(U-q)}}return k.shape[0]=g,s(S,[g])}function m(k,M){var T=l.mallocInt32(M*2),L=k.shape[0],x=k.data;T[0]=0;for(var C=0,S=0;S<L;++S){var g=x[2*S];if(g!==C){for(T[2*C+1]=S;++C<g;)T[2*C]=S,T[2*C+1]=S;T[2*C]=S}}for(T[2*C+1]=L;++C<M;)T[2*C]=T[2*C+1]=L;return T}function b(k){for(var M=k.shape[0]|0,T=k.data,L=new Array(M),x=0;x<M;++x)L[x]=[T[2*x],T[2*x+1]];return L}function p(k,M,T,L){T=T||0,typeof L=="undefined"&&(L=f(k));var x=k.length;if(x===0||L<1)return{cells:[],vertexIds:[],vertexWeights:[]};var C=h(M,+T),S=d(k,L),g=v(S,M,C,+T),P=m(S,M.length|0),E=c(L)(k,S.data,P,C),z=b(S),q=[].slice.call(g.data,0,g.shape[0]);return l.free(C),l.free(S.data),l.free(g.data),l.free(P),{cells:E,vertexIds:z,vertexWeights:q}}},1570:function(i){"use strict";i.exports=o;var a=[function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,m=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var k=b+p>>1,M=f[2*k+1];if(M===m)return k;m<M?p=k:b=k+1}return b}function u(c,f,h,d){for(var v=c.length,m=[],b=0;b<v;++b)var p=c[b],k=p.length;return m}return u},function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,m=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var k=b+p>>1,M=f[2*k+1];if(M===m)return k;m<M?p=k:b=k+1}return b}function u(c,f,h,d){for(var v=c.length,m=[],b=0;b<v;++b){var p=c[b],k=p.length;if(k===2){var M=(d[p[0]]<<0)+(d[p[1]]<<1);if(M===0||M===3)continue;switch(M){case 0:break;case 1:m.push([l(h,f,p[0],p[1])]);break;case 2:m.push([l(h,f,p[1],p[0])]);break;case 3:break}}}return m}return u},function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,m=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var k=b+p>>1,M=f[2*k+1];if(M===m)return k;m<M?p=k:b=k+1}return b}function u(c,f,h,d){for(var v=c.length,m=[],b=0;b<v;++b){var p=c[b],k=p.length;if(k===3){var M=(d[p[0]]<<0)+(d[p[1]]<<1)+(d[p[2]]<<2);if(M===0||M===7)continue;switch(M){case 0:break;case 1:m.push([l(h,f,p[0],p[2]),l(h,f,p[0],p[1])]);break;case 2:m.push([l(h,f,p[1],p[0]),l(h,f,p[1],p[2])]);break;case 3:m.push([l(h,f,p[0],p[2]),l(h,f,p[1],p[2])]);break;case 4:m.push([l(h,f,p[2],p[1]),l(h,f,p[2],p[0])]);break;case 5:m.push([l(h,f,p[2],p[1]),l(h,f,p[0],p[1])]);break;case 6:m.push([l(h,f,p[1],p[0]),l(h,f,p[2],p[0])]);break;case 7:break}}else if(k===2){var M=(d[p[0]]<<0)+(d[p[1]]<<1);if(M===0||M===3)continue;switch(M){case 0:break;case 1:m.push([l(h,f,p[0],p[1])]);break;case 2:m.push([l(h,f,p[1],p[0])]);break;case 3:break}}}return m}return u},function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,m=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b<p;){var k=b+p>>1,M=f[2*k+1];if(M===m)return k;m<M?p=k:b=k+1}return b}function u(c,f,h,d){for(var v=c.length,m=[],b=0;b<v;++b){var p=c[b],k=p.length;if(k===4){var M=(d[p[0]]<<0)+(d[p[1]]<<1)+(d[p[2]]<<2)+(d[p[3]]<<3);if(M===0||M===15)continue;switch(M){case 0:break;case 1:m.push([l(h,f,p[0],p[1]),l(h,f,p[0],p[2]),l(h,f,p[0],p[3])]);break;case 2:m.push([l(h,f,p[1],p[2]),l(h,f,p[1],p[0]),l(h,f,p[1],p[3])]);break;case 3:m.push([l(h,f,p[1],p[2]),l(h,f,p[0],p[2]),l(h,f,p[0],p[3])],[l(h,f,p[1],p[3]),l(h,f,p[1],p[2]),l(h,f,p[0],p[3])]);break;case 4:m.push([l(h,f,p[2],p[0]),l(h,f,p[2],p[1]),l(h,f,p[2],p[3])]);break;case 5:m.push([l(h,f,p[0],p[1]),l(h,f,p[2],p[1]),l(h,f,p[0],p[3])],[l(h,f,p[2],p[1]),l(h,f,p[2],p[3]),l(h,f,p[0],p[3])]);break;case 6:m.push([l(h,f,p[2],p[0]),l(h,f,p[1],p[0]),l(h,f,p[1],p[3])],[l(h,f,p[2],p[3]),l(h,f,p[2],p[0]),l(h,f,p[1],p[3])]);break;case 7:m.push([l(h,f,p[0],p[3]),l(h,f,p[1],p[3]),l(h,f,p[2],p[3])]);break;case 8:m.push([l(h,f,p[3],p[1]),l(h,f,p[3],p[0]),l(h,f,p[3],p[2])]);break;case 9:m.push([l(h,f,p[3],p[1]),l(h,f,p[0],p[1]),l(h,f,p[0],p[2])],[l(h,f,p[3],p[2]),l(h,f,p[3],p[1]),l(h,f,p[0],p[2])]);break;case 10:m.push([l(h,f,p[1],p[0]),l(h,f,p[3],p[0]),l(h,f,p[1],p[2])],[l(h,f,p[3],p[0]),l(h,f,p[3],p[2]),l(h,f,p[1],p[2])]);break;case 11:m.push([l(h,f,p[1],p[2]),l(h,f,p[0],p[2]),l(h,f,p[3],p[2])]);break;case 12:m.push([l(h,f,p[3],p[0]),l(h,f,p[2],p[0]),l(h,f,p[2],p[1])],[l(h,f,p[3],p[1]),l(h,f,p[3],p[0]),l(h,f,p[2],p[1])]);break;case 13:m.push([l(h,f,p[0],p[1]),l(h,f,p[2],p[1]),l(h,f,p[3],p[1])]);break;case 14:m.push([l(h,f,p[2],p[0]),l(h,f,p[1],p[0]),l(h,f,p[3],p[0])]);break;case 15:break}}else if(k===3){var M=(d[p[0]]<<0)+(d[p[1]]<<1)+(d[p[2]]<<2);if(M===0||M===7)continue;switch(M){case 0:break;case 1:m.push([l(h,f,p[0],p[2]),l(h,f,p[0],p[1])]);break;case 2:m.push([l(h,f,p[1],p[0]),l(h,f,p[1],p[2])]);break;case 3:m.push([l(h,f,p[0],p[2]),l(h,f,p[1],p[2])]);break;case 4:m.push([l(h,f,p[2],p[1]),l(h,f,p[2],p[0])]);break;case 5:m.push([l(h,f,p[2],p[1]),l(h,f,p[0],p[1])]);break;case 6:m.push([l(h,f,p[1],p[0]),l(h,f,p[2],p[0])]);break;case 7:break}}else if(k===2){var M=(d[p[0]]<<0)+(d[p[1]]<<1);if(M===0||M===3)continue;switch(M){case 0:break;case 1:m.push([l(h,f,p[0],p[1])]);break;case 2:m.push([l(h,f,p[1],p[0])]);break;case 3:break}}}return m}return u}];function o(s){return a[s]()}},6803:function(i,a,o){"use strict";var s,l=o(8828),u=o(1755);function c(P){for(var E=0,z=Math.max,q=0,U=P.length;q<U;++q)E=z(E,P[q].length);return E-1}s=c;function f(P){for(var E=-1,z=Math.max,q=0,U=P.length;q<U;++q)for(var G=P[q],Z=0,j=G.length;Z<j;++Z)E=z(E,G[Z]);return E+1}s=f;function h(P){for(var E=new Array(P.length),z=0,q=P.length;z<q;++z)E[z]=P[z].slice(0);return E}s=h;function d(P,E){var z=P.length,q=P.length-E.length,U=Math.min;if(q)return q;switch(z){case 0:return 0;case 1:return P[0]-E[0];case 2:var H=P[0]+P[1]-E[0]-E[1];return H||U(P[0],P[1])-U(E[0],E[1]);case 3:var G=P[0]+P[1],Z=E[0]+E[1];if(H=G+P[2]-(Z+E[2]),H)return H;var j=U(P[0],P[1]),N=U(E[0],E[1]),H=U(j,P[2])-U(N,E[2]);return H||U(j+P[2],G)-U(N+E[2],Z);default:var re=P.slice(0);re.sort();var oe=E.slice(0);oe.sort();for(var _e=0;_e<z;++_e)if(q=re[_e]-oe[_e],q)return q;return 0}}a.Fw=d;function v(P,E){return d(P[0],E[0])}function m(P,E){if(E){for(var z=P.length,q=new Array(z),U=0;U<z;++U)q[U]=[P[U],E[U]];q.sort(v);for(var U=0;U<z;++U)P[U]=q[U][0],E[U]=q[U][1];return P}else return P.sort(d),P}s=m;function b(P){if(P.length===0)return[];for(var E=1,z=P.length,q=1;q<z;++q){var U=P[q];if(d(U,P[q-1])){if(q===E){E++;continue}P[E++]=U}}return P.length=E,P}s=b;function p(P,E){for(var z=0,q=P.length-1,U=-1;z<=q;){var G=z+q>>1,Z=d(P[G],E);Z<=0?(Z===0&&(U=G),z=G+1):Z>0&&(q=G-1)}return U}s=p;function k(P,E){for(var z=new Array(P.length),q=0,U=z.length;q<U;++q)z[q]=[];for(var G=[],q=0,Z=E.length;q<Z;++q)for(var j=E[q],N=j.length,H=1,re=1<<N;H<re;++H){G.length=l.popCount(H);for(var oe=0,_e=0;_e<N;++_e)H&1<<_e&&(G[oe++]=j[_e]);var ke=p(P,G);if(!(ke<0))for(;z[ke++].push(q),!(ke>=P.length||d(P[ke],G)!==0););}return z}s=k;function M(P,E){if(!E)return k(b(L(P,0)),P,0);for(var z=new Array(E),q=0;q<E;++q)z[q]=[];for(var q=0,U=P.length;q<U;++q)for(var G=P[q],Z=0,j=G.length;Z<j;++Z)z[G[Z]].push(q);return z}s=M;function T(P){for(var E=[],z=0,q=P.length;z<q;++z)for(var U=P[z],G=U.length|0,Z=1,j=1<<G;Z<j;++Z){for(var N=[],H=0;H<G;++H)Z>>>H&1&&N.push(U[H]);E.push(N)}return m(E)}s=T;function L(P,E){if(E<0)return[];for(var z=[],q=(1<<E+1)-1,U=0;U<P.length;++U)for(var G=P[U],Z=q;Z<1<<G.length;Z=l.nextCombination(Z)){for(var j=new Array(E+1),N=0,H=0;H<G.length;++H)Z&1<<H&&(j[N++]=G[H]);z.push(j)}return m(z)}s=L;function x(P){for(var E=[],z=0,q=P.length;z<q;++z)for(var U=P[z],G=0,Z=U.length;G<Z;++G){for(var j=new Array(U.length-1),N=0,H=0;N<Z;++N)N!==G&&(j[H++]=U[N]);E.push(j)}return m(E)}s=x;function C(P,E){for(var z=new u(E),q=0;q<P.length;++q)for(var U=P[q],G=0;G<U.length;++G)for(var Z=G+1;Z<U.length;++Z)z.link(U[G],U[Z]);for(var j=[],N=z.ranks,q=0;q<N.length;++q)N[q]=-1;for(var q=0;q<P.length;++q){var H=z.find(P[q][0]);N[H]<0?(N[H]=j.length,j.push([P[q].slice(0)])):j[N[H]].push(P[q].slice(0))}return j}function S(P){for(var E=b(m(L(P,0))),z=new u(E.length),q=0;q<P.length;++q)for(var U=P[q],G=0;G<U.length;++G)for(var Z=p(E,[U[G]]),j=G+1;j<U.length;++j)z.link(Z,p(E,[U[j]]));for(var N=[],H=z.ranks,q=0;q<H.length;++q)H[q]=-1;for(var q=0;q<P.length;++q){var re=z.find(p(E,[P[q][0]]));H[re]<0?(H[re]=N.length,N.push([P[q].slice(0)])):N[H[re]].push(P[q].slice(0))}return N}function g(P,E){return E?C(P,E):S(P)}s=g},3105:function(i,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<<o-1,a.sign=function(u){return(u>0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u<c)},a.max=function(u,c){return u^(u^c)&-(u<c)},a.isPow2=function(u){return!(u&u-1)&&!!u},a.log2=function(u){var c,f;return c=(u>65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<<d&255}})(l),a.reverse=function(u){return l[u&255]<<24|l[u>>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},2014:function(i,a,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(g){for(var P=0,E=Math.max,z=0,q=g.length;z<q;++z)P=E(P,g[z].length);return P-1}a.dimension=u;function c(g){for(var P=-1,E=Math.max,z=0,q=g.length;z<q;++z)for(var U=g[z],G=0,Z=U.length;G<Z;++G)P=E(P,U[G]);return P+1}a.countVertices=c;function f(g){for(var P=new Array(g.length),E=0,z=g.length;E<z;++E)P[E]=g[E].slice(0);return P}a.cloneCells=f;function h(g,P){var E=g.length,z=g.length-P.length,q=Math.min;if(z)return z;switch(E){case 0:return 0;case 1:return g[0]-P[0];case 2:var N=g[0]+g[1]-P[0]-P[1];return N||q(g[0],g[1])-q(P[0],P[1]);case 3:var U=g[0]+g[1],G=P[0]+P[1];if(N=U+g[2]-(G+P[2]),N)return N;var Z=q(g[0],g[1]),j=q(P[0],P[1]),N=q(Z,g[2])-q(j,P[2]);return N||q(Z+g[2],U)-q(j+P[2],G);default:var H=g.slice(0);H.sort();var re=P.slice(0);re.sort();for(var oe=0;oe<E;++oe)if(z=H[oe]-re[oe],z)return z;return 0}}a.compareCells=h;function d(g,P){return h(g[0],P[0])}function v(g,P){if(P){for(var E=g.length,z=new Array(E),q=0;q<E;++q)z[q]=[g[q],P[q]];z.sort(d);for(var q=0;q<E;++q)g[q]=z[q][0],P[q]=z[q][1];return g}else return g.sort(h),g}a.normalize=v;function m(g){if(g.length===0)return[];for(var P=1,E=g.length,z=1;z<E;++z){var q=g[z];if(h(q,g[z-1])){if(z===P){P++;continue}g[P++]=q}}return g.length=P,g}a.unique=m;function b(g,P){for(var E=0,z=g.length-1,q=-1;E<=z;){var U=E+z>>1,G=h(g[U],P);G<=0?(G===0&&(q=U),E=U+1):G>0&&(z=U-1)}return q}a.findCell=b;function p(g,P){for(var E=new Array(g.length),z=0,q=E.length;z<q;++z)E[z]=[];for(var U=[],z=0,G=P.length;z<G;++z)for(var Z=P[z],j=Z.length,N=1,H=1<<j;N<H;++N){U.length=s.popCount(N);for(var re=0,oe=0;oe<j;++oe)N&1<<oe&&(U[re++]=Z[oe]);var _e=b(g,U);if(!(_e<0))for(;E[_e++].push(z),!(_e>=g.length||h(g[_e],U)!==0););}return E}a.incidence=p;function k(g,P){if(!P)return p(m(T(g,0)),g,0);for(var E=new Array(P),z=0;z<P;++z)E[z]=[];for(var z=0,q=g.length;z<q;++z)for(var U=g[z],G=0,Z=U.length;G<Z;++G)E[U[G]].push(z);return E}a.dual=k;function M(g){for(var P=[],E=0,z=g.length;E<z;++E)for(var q=g[E],U=q.length|0,G=1,Z=1<<U;G<Z;++G){for(var j=[],N=0;N<U;++N)G>>>N&1&&j.push(q[N]);P.push(j)}return v(P)}a.explode=M;function T(g,P){if(P<0)return[];for(var E=[],z=(1<<P+1)-1,q=0;q<g.length;++q)for(var U=g[q],G=z;G<1<<U.length;G=s.nextCombination(G)){for(var Z=new Array(P+1),j=0,N=0;N<U.length;++N)G&1<<N&&(Z[j++]=U[N]);E.push(Z)}return v(E)}a.skeleton=T;function L(g){for(var P=[],E=0,z=g.length;E<z;++E)for(var q=g[E],U=0,G=q.length;U<G;++U){for(var Z=new Array(q.length-1),j=0,N=0;j<G;++j)j!==U&&(Z[N++]=q[j]);P.push(Z)}return v(P)}a.boundary=L;function x(g,P){for(var E=new l(P),z=0;z<g.length;++z)for(var q=g[z],U=0;U<q.length;++U)for(var G=U+1;G<q.length;++G)E.link(q[U],q[G]);for(var Z=[],j=E.ranks,z=0;z<j.length;++z)j[z]=-1;for(var z=0;z<g.length;++z){var N=E.find(g[z][0]);j[N]<0?(j[N]=Z.length,Z.push([g[z].slice(0)])):Z[j[N]].push(g[z].slice(0))}return Z}function C(g){for(var P=m(v(T(g,0))),E=new l(P.length),z=0;z<g.length;++z)for(var q=g[z],U=0;U<q.length;++U)for(var G=b(P,[q[U]]),Z=U+1;Z<q.length;++Z)E.link(G,b(P,[q[Z]]));for(var j=[],N=E.ranks,z=0;z<N.length;++z)N[z]=-1;for(var z=0;z<g.length;++z){var H=E.find(b(P,[g[z][0]]));N[H]<0?(N[H]=j.length,j.push([g[z].slice(0)])):j[N[H]].push(g[z].slice(0))}return j}function S(g,P){return P?x(g,P):C(g)}a.connectedComponents=S},4623:function(i){"use strict";"use restrict";i.exports=a;function a(o){this.roots=new Array(o),this.ranks=new Array(o);for(var s=0;s<o;++s)this.roots[s]=s,this.ranks[s]=0}a.prototype.length=function(){return this.roots.length},a.prototype.makeSet=function(){var o=this.roots.length;return this.roots.push(o),this.ranks.push(0),o},a.prototype.find=function(o){for(var s=this.roots;s[o]!==o;){var l=s[o];s[o]=s[l],o=l}return o},a.prototype.link=function(o,s){var l=this.find(o),u=this.find(s);if(l!==u){var c=this.ranks,f=this.roots,h=c[l],d=c[u];h<d?f[l]=u:d<h?f[u]=l:(f[u]=l,++c[l])}}},5878:function(i,a,o){"use strict";i.exports=c;var s=o(3250),l=o(2014);function u(f,h,d){var v=Math.abs(s(f,h,d)),m=Math.sqrt(Math.pow(h[0]-d[0],2)+Math.pow(h[1]-d[1],2));return v/m}function c(f,h,d){for(var v=h.length,m=f.length,b=new Array(v),p=new Array(v),k=new Array(v),M=new Array(v),T=0;T<v;++T)b[T]=p[T]=-1,k[T]=1/0,M[T]=!1;for(var T=0;T<m;++T){var L=f[T];if(L.length!==2)throw new Error("Input must be a graph");var x=L[1],C=L[0];p[C]!==-1?p[C]=-2:p[C]=x,b[x]!==-1?b[x]=-2:b[x]=C}function S(ie){if(M[ie])return 1/0;var Se=b[ie],Ee=p[ie];return Se<0||Ee<0?1/0:u(h[ie],h[Se],h[Ee])}function g(ie,Se){var Ee=j[ie],we=j[Se];j[ie]=we,j[Se]=Ee,N[Ee]=Se,N[we]=ie}function P(ie){return k[j[ie]]}function E(ie){return ie&1?ie-1>>1:(ie>>1)-1}function z(ie){for(var Se=P(ie);;){var Ee=Se,we=2*ie+1,De=2*(ie+1),Le=ie;if(we<re){var me=P(we);me<Ee&&(Le=we,Ee=me)}if(De<re){var Pe=P(De);Pe<Ee&&(Le=De)}if(Le===ie)return ie;g(ie,Le),ie=Le}}function q(ie){for(var Se=P(ie);ie>0;){var Ee=E(ie);if(Ee>=0){var we=P(Ee);if(Se<we){g(ie,Ee),ie=Ee;continue}}return ie}}function U(){if(re>0){var ie=j[0];return g(0,re-1),re-=1,z(0),ie}return-1}function G(ie,Se){var Ee=j[ie];return k[Ee]===Se?ie:(k[Ee]=-1/0,q(ie),U(),k[Ee]=Se,re+=1,q(re-1))}function Z(ie){if(!M[ie]){M[ie]=!0;var Se=b[ie],Ee=p[ie];b[Ee]>=0&&(b[Ee]=Se),p[Se]>=0&&(p[Se]=Ee),N[Se]>=0&&G(N[Se],S(Se)),N[Ee]>=0&&G(N[Ee],S(Ee))}}for(var j=[],N=new Array(v),T=0;T<v;++T){var H=k[T]=S(T);H<1/0?(N[T]=j.length,j.push(T)):N[T]=-1}for(var re=j.length,T=re>>1;T>=0;--T)z(T);for(;;){var oe=U();if(oe<0||k[oe]>d)break;Z(oe)}for(var _e=[],T=0;T<v;++T)M[T]||(N[T]=_e.length,_e.push(h[T].slice()));var ke=_e.length;function Ce(ie,Se){if(ie[Se]<0)return Se;var Ee=Se,we=Se;do{var De=ie[we];if(!M[we]||De<0||De===we||(we=De,De=ie[we],!M[we]||De<0||De===we))break;we=De,Ee=ie[Ee]}while(Ee!==we);for(var Le=Se;Le!==we;Le=ie[Le])ie[Le]=we;return we}var ge=[];return f.forEach(function(ie){var Se=Ce(b,ie[0]),Ee=Ce(p,ie[1]);if(Se>=0&&Ee>=0&&Se!==Ee){var we=N[Se],De=N[Ee];we!==De&&ge.push([we,De])}}),l.unique(l.normalize(ge)),{positions:_e,edges:ge}}},1303:function(i,a,o){"use strict";i.exports=u;var s=o(3250);function l(c,f){var h,d;if(f[0][0]<f[1][0])h=f[0],d=f[1];else if(f[0][0]>f[1][0])h=f[1],d=f[0];else{var v=Math.min(c[0][1],c[1][1]),m=Math.max(c[0][1],c[1][1]),b=Math.min(f[0][1],f[1][1]),p=Math.max(f[0][1],f[1][1]);return m<b?m-b:v>p?v-p:m-p}var k,M;c[0][1]<c[1][1]?(k=c[0],M=c[1]):(k=c[1],M=c[0]);var T=s(d,h,k);return T||(T=s(d,h,M),T)?T:M-d}function u(c,f){var h,d;if(f[0][0]<f[1][0])h=f[0],d=f[1];else if(f[0][0]>f[1][0])h=f[1],d=f[0];else return l(f,c);var v,m;if(c[0][0]<c[1][0])v=c[0],m=c[1];else if(c[0][0]>c[1][0])v=c[1],m=c[0];else return-l(c,f);var b=s(h,d,m),p=s(h,d,v);if(b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;if(b=s(m,v,d),p=s(m,v,h),b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;return d[0]-m[0]}},4209:function(i,a,o){"use strict";i.exports=p;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(k,M,T){this.slabs=k,this.coordinates=M,this.horizontal=T}var h=f.prototype;function d(k,M){return k.y-M}function v(k,M){for(var T=null;k;){var L=k.key,x,C;L[0][0]<L[1][0]?(x=L[0],C=L[1]):(x=L[1],C=L[0]);var S=u(x,C,M);if(S<0)k=k.left;else if(S>0)if(M[0]!==L[1][0])T=k,k=k.right;else{var g=v(k.right,M);if(g)return g;k=k.left}else{if(M[0]!==L[1][0])return k;var g=v(k.right,M);if(g)return g;k=k.left}}return T}h.castUp=function(k){var M=s.le(this.coordinates,k[0]);if(M<0)return-1;var T=this.slabs[M],L=v(this.slabs[M],k),x=-1;if(L&&(x=L.value),this.coordinates[M]===k[0]){var C=null;if(L&&(C=L.key),M>0){var S=v(this.slabs[M-1],k);S&&(C?c(S.key,C)>0&&(C=S.key,x=S.value):(x=S.value,C=S.key))}var g=this.horizontal[M];if(g.length>0){var P=s.ge(g,k[1],d);if(P<g.length){var E=g[P];if(k[1]===E.y){if(E.closed)return E.index;for(;P<g.length-1&&g[P+1].y===k[1];)if(P=P+1,E=g[P],E.closed)return E.index;if(E.y===k[1]&&!E.start){if(P=P+1,P>=g.length)return x;E=g[P]}}if(E.start)if(C){var z=u(C[0],C[1],[k[0],E.y]);C[0][0]>C[1][0]&&(z=-z),z>0&&(x=E.index)}else x=E.index;else E.y!==k[1]&&(x=E.index)}}}return x};function m(k,M,T,L){this.y=k,this.index=M,this.start=T,this.closed=L}function b(k,M,T,L){this.x=k,this.segment=M,this.create=T,this.index=L}function p(k){for(var M=k.length,T=2*M,L=new Array(T),x=0;x<M;++x){var C=k[x],S=C[0][0]<C[1][0];L[2*x]=new b(C[0][0],C,S,x),L[2*x+1]=new b(C[1][0],C,!S,x)}L.sort(function(j,N){var H=j.x-N.x;return H||(H=j.create-N.create,H)?H:Math.min(j.segment[0][1],j.segment[1][1])-Math.min(N.segment[0][1],N.segment[1][1])});for(var g=l(c),P=[],E=[],z=[],q=-1/0,x=0;x<T;){for(var U=L[x].x,G=[];x<T;){var Z=L[x];if(Z.x!==U)break;x+=1,Z.segment[0][0]===Z.x&&Z.segment[1][0]===Z.x?Z.create&&(Z.segment[0][1]<Z.segment[1][1]?(G.push(new m(Z.segment[0][1],Z.index,!0,!0)),G.push(new m(Z.segment[1][1],Z.index,!1,!1))):(G.push(new m(Z.segment[1][1],Z.index,!0,!1)),G.push(new m(Z.segment[0][1],Z.index,!1,!0)))):Z.create?g=g.insert(Z.segment,Z.index):g=g.remove(Z.segment)}P.push(g.root),E.push(U),z.push(G)}return new f(P,E,z)}},5202:function(i,a,o){"use strict";var s=o(1944),l=o(8210);i.exports=f,i.exports.positive=h,i.exports.negative=d;function u(v,m){var b=l(s(v,m),[m[m.length-1]]);return b[b.length-1]}function c(v,m,b,p){var k=p-m,M=-m/k;M<0?M=0:M>1&&(M=1);for(var T=1-M,L=v.length,x=new Array(L),C=0;C<L;++C)x[C]=M*v[C]+T*b[C];return x}function f(v,m){for(var b=[],p=[],k=u(v[v.length-1],m),M=v[v.length-1],T=v[0],L=0;L<v.length;++L,M=T){T=v[L];var x=u(T,m);if(k<0&&x>0||k>0&&x<0){var C=c(M,x,T,k);b.push(C),p.push(C.slice())}x<0?p.push(T.slice()):x>0?b.push(T.slice()):(b.push(T.slice()),p.push(T.slice())),k=x}return{positive:b,negative:p}}function h(v,m){for(var b=[],p=u(v[v.length-1],m),k=v[v.length-1],M=v[0],T=0;T<v.length;++T,k=M){M=v[T];var L=u(M,m);(p<0&&L>0||p>0&&L<0)&&b.push(c(k,L,M,p)),L>=0&&b.push(M.slice()),p=L}return b}function d(v,m){for(var b=[],p=u(v[v.length-1],m),k=v[v.length-1],M=v[0],T=0;T<v.length;++T,k=M){M=v[T];var L=u(M,m);(p<0&&L>0||p>0&&L<0)&&b.push(c(k,L,M,p)),L<=0&&b.push(M.slice()),p=L}return b}},3387:function(i,a,o){var s;(function(){"use strict";var l={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function u(v){return f(d(v),arguments)}function c(v,m){return u.apply(null,[v].concat(m||[]))}function f(v,m){var b=1,p=v.length,k,M="",T,L,x,C,S,g,P,E;for(T=0;T<p;T++)if(typeof v[T]=="string")M+=v[T];else if(typeof v[T]=="object"){if(x=v[T],x.keys)for(k=m[b],L=0;L<x.keys.length;L++){if(k==null)throw new Error(u('[sprintf] Cannot access property "%s" of undefined value "%s"',x.keys[L],x.keys[L-1]));k=k[x.keys[L]]}else x.param_no?k=m[x.param_no]:k=m[b++];if(l.not_type.test(x.type)&&l.not_primitive.test(x.type)&&k instanceof Function&&(k=k()),l.numeric_arg.test(x.type)&&typeof k!="number"&&isNaN(k))throw new TypeError(u("[sprintf] expecting number but found %T",k));switch(l.number.test(x.type)&&(P=k>=0),x.type){case"b":k=parseInt(k,10).toString(2);break;case"c":k=String.fromCharCode(parseInt(k,10));break;case"d":case"i":k=parseInt(k,10);break;case"j":k=JSON.stringify(k,null,x.width?parseInt(x.width):0);break;case"e":k=x.precision?parseFloat(k).toExponential(x.precision):parseFloat(k).toExponential();break;case"f":k=x.precision?parseFloat(k).toFixed(x.precision):parseFloat(k);break;case"g":k=x.precision?String(Number(k.toPrecision(x.precision))):parseFloat(k);break;case"o":k=(parseInt(k,10)>>>0).toString(8);break;case"s":k=String(k),k=x.precision?k.substring(0,x.precision):k;break;case"t":k=String(!!k),k=x.precision?k.substring(0,x.precision):k;break;case"T":k=Object.prototype.toString.call(k).slice(8,-1).toLowerCase(),k=x.precision?k.substring(0,x.precision):k;break;case"u":k=parseInt(k,10)>>>0;break;case"v":k=k.valueOf(),k=x.precision?k.substring(0,x.precision):k;break;case"x":k=(parseInt(k,10)>>>0).toString(16);break;case"X":k=(parseInt(k,10)>>>0).toString(16).toUpperCase();break}l.json.test(x.type)?M+=k:(l.number.test(x.type)&&(!P||x.sign)?(E=P?"+":"-",k=k.toString().replace(l.sign,"")):E="",S=x.pad_char?x.pad_char==="0"?"0":x.pad_char.charAt(1):" ",g=x.width-(E+k).length,C=x.width&&g>0?S.repeat(g):"",M+=x.align?E+k+C:S==="0"?E+C+k:C+E+k)}return M}var h=Object.create(null);function d(v){if(h[v])return h[v];for(var m=v,b,p=[],k=0;m;){if((b=l.text.exec(m))!==null)p.push(b[0]);else if((b=l.modulo.exec(m))!==null)p.push("%");else if((b=l.placeholder.exec(m))!==null){if(b[2]){k|=1;var M=[],T=b[2],L=[];if((L=l.key.exec(T))!==null)for(M.push(L[1]);(T=T.substring(L[0].length))!=="";)if((L=l.key_access.exec(T))!==null)M.push(L[1]);else if((L=l.index_access.exec(T))!==null)M.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]=M}else k|=2;if(k===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");p.push({placeholder:b[0],param_no:b[1],keys:b[2],sign:b[3],pad_char:b[4],align:b[5],width:b[6],precision:b[7],type:b[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");m=m.substring(b[0].length)}return h[v]=p}a.sprintf=u,a.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=function(){return{sprintf:u,vsprintf:c}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3711:function(i,a,o){"use strict";i.exports=d;var s=o(2640),l=o(781),u={"2d":function(v,m,b){var p=v({order:m,scalarArguments:3,getters:b==="generic"?[0]:void 0,phase:function(M,T,L,x){return M>x|0},vertex:function(M,T,L,x,C,S,g,P,E,z,q,U,G){var Z=(g<<0)+(P<<1)+(E<<2)+(z<<3)|0;if(!(Z===0||Z===15))switch(Z){case 0:q.push([M-.5,T-.5]);break;case 1:q.push([M-.25-.25*(x+L-2*G)/(L-x),T-.25-.25*(C+L-2*G)/(L-C)]);break;case 2:q.push([M-.75-.25*(-x-L+2*G)/(x-L),T-.25-.25*(S+x-2*G)/(x-S)]);break;case 3:q.push([M-.5,T-.5-.5*(C+L+S+x-4*G)/(L-C+x-S)]);break;case 4:q.push([M-.25-.25*(S+C-2*G)/(C-S),T-.75-.25*(-C-L+2*G)/(C-L)]);break;case 5:q.push([M-.5-.5*(x+L+S+C-4*G)/(L-x+C-S),T-.5]);break;case 6:q.push([M-.5-.25*(-x-L+S+C)/(x-L+C-S),T-.5-.25*(-C-L+S+x)/(C-L+x-S)]);break;case 7:q.push([M-.75-.25*(S+C-2*G)/(C-S),T-.75-.25*(S+x-2*G)/(x-S)]);break;case 8:q.push([M-.75-.25*(-S-C+2*G)/(S-C),T-.75-.25*(-S-x+2*G)/(S-x)]);break;case 9:q.push([M-.5-.25*(x+L+-S-C)/(L-x+S-C),T-.5-.25*(C+L+-S-x)/(L-C+S-x)]);break;case 10:q.push([M-.5-.5*(-x-L+-S-C+4*G)/(x-L+S-C),T-.5]);break;case 11:q.push([M-.25-.25*(-S-C+2*G)/(S-C),T-.75-.25*(C+L-2*G)/(L-C)]);break;case 12:q.push([M-.5,T-.5-.5*(-C-L+-S-x+4*G)/(C-L+S-x)]);break;case 13:q.push([M-.75-.25*(x+L-2*G)/(L-x),T-.25-.25*(-S-x+2*G)/(S-x)]);break;case 14:q.push([M-.25-.25*(-x-L+2*G)/(x-L),T-.25-.25*(-C-L+2*G)/(C-L)]);break;case 15:q.push([M-.5,T-.5]);break}},cell:function(M,T,L,x,C,S,g,P,E){C?P.push([M,T]):P.push([T,M])}});return function(k,M){var T=[],L=[];return p(k,T,L,M),{positions:T,cells:L}}}};function c(v,m){var b=v.length+"d",p=u[b];if(p)return p(s,v,m)}function f(v,m){for(var b=l(v,m),p=b.length,k=new Array(p),M=new Array(p),T=0;T<p;++T)k[T]=[b[T]],M[T]=[T];return{positions:k,cells:M}}var h={};function d(v,k){if(v.dimension<=0)return{positions:[],cells:[]};if(v.dimension===1)return f(v,k);var b=v.order.join()+"-"+v.dtype,p=h[b],k=+k||0;return p||(p=h[b]=c(v.order,v.dtype)),p(v,k)}},665:function(i,a,o){"use strict";var s=o(3202);i.exports=f;var l=96;function u(h,d){var v=s(getComputedStyle(h).getPropertyValue(d));return v[0]*f(v[1],h)}function c(h,d){var v=document.createElement("div");v.style["font-size"]="128"+h,d.appendChild(v);var m=u(v,"font-size")/128;return d.removeChild(v),m}function f(h,d){switch(d=d||document.body,h=(h||"px").trim().toLowerCase(),(d===window||d===document)&&(d=document.body),h){case"%":return d.clientHeight/100;case"ch":case"ex":return c(h,d);case"em":return u(d,"font-size");case"rem":return u(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return l;case"cm":return l/2.54;case"mm":return l/25.4;case"pt":return l/72;case"pc":return l/6}return 1}},7261:function(i,a,o){"use strict";i.exports=M;var s=o(9215),l=o(7608),u=o(6079),c=o(5911),f=o(3536),h=o(244);function d(T,L,x){return Math.sqrt(Math.pow(T,2)+Math.pow(L,2)+Math.pow(x,2))}function v(T){return Math.min(1,Math.max(-1,T))}function m(T){var L=Math.abs(T[0]),x=Math.abs(T[1]),C=Math.abs(T[2]),S=[0,0,0];L>Math.max(x,C)?S[2]=1:x>Math.max(L,C)?S[0]=1:S[1]=1;for(var g=0,P=0,E=0;E<3;++E)g+=T[E]*T[E],P+=S[E]*T[E];for(var E=0;E<3;++E)S[E]-=P/g*T[E];return f(S,S),S}function b(T,L,x,C,S,g,P,E){this.center=s(x),this.up=s(C),this.right=s(S),this.radius=s([g]),this.angle=s([P,E]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(T,L),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var p=b.prototype;p.setDistanceLimits=function(T,L){T>0?T=Math.log(T):T=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,T),this.radius.bounds[0][0]=T,this.radius.bounds[1][0]=L},p.getDistanceLimits=function(T){var L=this.radius.bounds[0];return T?(T[0]=Math.exp(L[0][0]),T[1]=Math.exp(L[1][0]),T):[Math.exp(L[0][0]),Math.exp(L[1][0])]},p.recalcMatrix=function(T){this.center.curve(T),this.up.curve(T),this.right.curve(T),this.radius.curve(T),this.angle.curve(T);for(var L=this.computedUp,x=this.computedRight,C=0,S=0,g=0;g<3;++g)S+=L[g]*x[g],C+=L[g]*L[g];for(var P=Math.sqrt(C),E=0,g=0;g<3;++g)x[g]-=L[g]*S/C,E+=x[g]*x[g],L[g]/=P;for(var z=Math.sqrt(E),g=0;g<3;++g)x[g]/=z;var q=this.computedToward;c(q,L,x),f(q,q);for(var U=Math.exp(this.computedRadius[0]),G=this.computedAngle[0],Z=this.computedAngle[1],j=Math.cos(G),N=Math.sin(G),H=Math.cos(Z),re=Math.sin(Z),oe=this.computedCenter,_e=j*H,ke=N*H,Ce=re,ge=-j*re,ie=-N*re,Se=H,Ee=this.computedEye,we=this.computedMatrix,g=0;g<3;++g){var De=_e*x[g]+ke*q[g]+Ce*L[g];we[4*g+1]=ge*x[g]+ie*q[g]+Se*L[g],we[4*g+2]=De,we[4*g+3]=0}var Le=we[1],me=we[5],Pe=we[9],ce=we[2],He=we[6],lt=we[10],mt=me*lt-Pe*He,Vt=Pe*ce-Le*lt,st=Le*He-me*ce,ct=d(mt,Vt,st);mt/=ct,Vt/=ct,st/=ct,we[0]=mt,we[4]=Vt,we[8]=st;for(var g=0;g<3;++g)Ee[g]=oe[g]+we[2+4*g]*U;for(var g=0;g<3;++g){for(var E=0,Qt=0;Qt<3;++Qt)E+=we[g+4*Qt]*Ee[Qt];we[12+g]=-E}we[15]=1},p.getMatrix=function(T,L){this.recalcMatrix(T);var x=this.computedMatrix;if(L){for(var C=0;C<16;++C)L[C]=x[C];return L}return x};var k=[0,0,0];p.rotate=function(T,L,x,C){if(this.angle.move(T,L,x),C){this.recalcMatrix(T);var S=this.computedMatrix;k[0]=S[2],k[1]=S[6],k[2]=S[10];for(var g=this.computedUp,P=this.computedRight,E=this.computedToward,z=0;z<3;++z)S[4*z]=g[z],S[4*z+1]=P[z],S[4*z+2]=E[z];u(S,S,C,k);for(var z=0;z<3;++z)g[z]=S[4*z],P[z]=S[4*z+1];this.up.set(T,g[0],g[1],g[2]),this.right.set(T,P[0],P[1],P[2])}},p.pan=function(T,L,x,C){L=L||0,x=x||0,C=C||0,this.recalcMatrix(T);var S=this.computedMatrix,g=Math.exp(this.computedRadius[0]),P=S[1],E=S[5],z=S[9],q=d(P,E,z);P/=q,E/=q,z/=q;var U=S[0],G=S[4],Z=S[8],j=U*P+G*E+Z*z;U-=P*j,G-=E*j,Z-=z*j;var N=d(U,G,Z);U/=N,G/=N,Z/=N;var H=U*L+P*x,re=G*L+E*x,oe=Z*L+z*x;this.center.move(T,H,re,oe);var _e=Math.exp(this.computedRadius[0]);_e=Math.max(1e-4,_e+C),this.radius.set(T,Math.log(_e))},p.translate=function(T,L,x,C){this.center.move(T,L||0,x||0,C||0)},p.setMatrix=function(T,L,x,C){var S=1;typeof x=="number"&&(S=x|0),(S<0||S>3)&&(S=1);var g=(S+2)%3,P=(S+1)%3;L||(this.recalcMatrix(T),L=this.computedMatrix);var E=L[S],z=L[S+4],q=L[S+8];if(C){var G=Math.abs(E),Z=Math.abs(z),j=Math.abs(q),N=Math.max(G,Z,j);G===N?(E=E<0?-1:1,z=q=0):j===N?(q=q<0?-1:1,E=z=0):(z=z<0?-1:1,E=q=0)}else{var U=d(E,z,q);E/=U,z/=U,q/=U}var H=L[g],re=L[g+4],oe=L[g+8],_e=H*E+re*z+oe*q;H-=E*_e,re-=z*_e,oe-=q*_e;var ke=d(H,re,oe);H/=ke,re/=ke,oe/=ke;var Ce=z*oe-q*re,ge=q*H-E*oe,ie=E*re-z*H,Se=d(Ce,ge,ie);Ce/=Se,ge/=Se,ie/=Se,this.center.jump(T,Ue,Ae,rt),this.radius.idle(T),this.up.jump(T,E,z,q),this.right.jump(T,H,re,oe);var Ee,we;if(S===2){var De=L[1],Le=L[5],me=L[9],Pe=De*H+Le*re+me*oe,ce=De*Ce+Le*ge+me*ie;Vt<0?Ee=-Math.PI/2:Ee=Math.PI/2,we=Math.atan2(ce,Pe)}else{var He=L[2],lt=L[6],mt=L[10],Vt=He*E+lt*z+mt*q,st=He*H+lt*re+mt*oe,ct=He*Ce+lt*ge+mt*ie;Ee=Math.asin(v(Vt)),we=Math.atan2(ct,st)}this.angle.jump(T,we,Ee),this.recalcMatrix(T);var Qt=L[2],Ht=L[6],nr=L[10],tt=this.computedMatrix;l(tt,L);var je=tt[15],Ue=tt[12]/je,Ae=tt[13]/je,rt=tt[14]/je,St=Math.exp(this.computedRadius[0]);this.center.jump(T,Ue-Qt*St,Ae-Ht*St,rt-nr*St)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(T){this.center.idle(T),this.up.idle(T),this.right.idle(T),this.radius.idle(T),this.angle.idle(T)},p.flush=function(T){this.center.flush(T),this.up.flush(T),this.right.flush(T),this.radius.flush(T),this.angle.flush(T)},p.setDistance=function(T,L){L>0&&this.radius.set(T,Math.log(L))},p.lookAt=function(T,L,x,C){this.recalcMatrix(T),L=L||this.computedEye,x=x||this.computedCenter,C=C||this.computedUp;var S=C[0],g=C[1],P=C[2],E=d(S,g,P);if(!(E<1e-6)){S/=E,g/=E,P/=E;var z=L[0]-x[0],q=L[1]-x[1],U=L[2]-x[2],G=d(z,q,U);if(!(G<1e-6)){z/=G,q/=G,U/=G;var Z=this.computedRight,j=Z[0],N=Z[1],H=Z[2],re=S*j+g*N+P*H;j-=re*S,N-=re*g,H-=re*P;var oe=d(j,N,H);if(!(oe<.01&&(j=g*U-P*q,N=P*z-S*U,H=S*q-g*z,oe=d(j,N,H),oe<1e-6))){j/=oe,N/=oe,H/=oe,this.up.set(T,S,g,P),this.right.set(T,j,N,H),this.center.set(T,x[0],x[1],x[2]),this.radius.set(T,Math.log(G));var _e=g*H-P*N,ke=P*j-S*H,Ce=S*N-g*j,ge=d(_e,ke,Ce);_e/=ge,ke/=ge,Ce/=ge;var ie=S*z+g*q+P*U,Se=j*z+N*q+H*U,Ee=_e*z+ke*q+Ce*U,we=Math.asin(v(ie)),De=Math.atan2(Ee,Se),Le=this.angle._state,me=Le[Le.length-1],Pe=Le[Le.length-2];me=me%(2*Math.PI);var ce=Math.abs(me+2*Math.PI-De),He=Math.abs(me-De),lt=Math.abs(me-2*Math.PI-De);ce<He&&(me+=2*Math.PI),lt<He&&(me-=2*Math.PI),this.angle.jump(this.angle.lastT(),me,Pe),this.angle.set(T,De,we)}}}};function M(T){T=T||{};var L=T.center||[0,0,0],x=T.up||[0,1,0],C=T.right||m(x),S=T.radius||1,g=T.theta||0,P=T.phi||0;if(L=[].slice.call(L,0,3),x=[].slice.call(x,0,3),f(x,x),C=[].slice.call(C,0,3),f(C,C),"eye"in T){var E=T.eye,z=[E[0]-L[0],E[1]-L[1],E[2]-L[2]];c(C,z,x),d(C[0],C[1],C[2])<1e-6?C=m(x):f(C,C),S=d(z[0],z[1],z[2]);var q=h(x,z)/S,U=h(C,z)/S;P=Math.acos(q),g=Math.acos(U)}return S=Math.log(S),new b(T.zoomMin,T.zoomMax,L,x,C,S,g,P)}},5250:function(i){"use strict";i.exports=o;var a=+(Math.pow(2,27)+1);function o(s,l,u){var c=s*l,f=a*s,h=f-s,d=f-h,v=s-d,m=a*l,b=m-l,p=m-b,k=l-p,M=c-d*p,T=M-v*p,L=T-d*k,x=v*k-L;return u?(u[0]=x,u[1]=c,u):[x,c]}},9362:function(i){"use strict";i.exports=a;function a(o,s,l){var u=o+s,c=u-o,f=u-c,h=s-c,d=o-f;return l?(l[0]=d+h,l[1]=u,l):[d+h,u]}},1888:function(i,a,o){"use strict";var s=o(8828),l=o(1338),u=o(4793).hp;o.g.__TYPEDARRAY_POOL||(o.g.__TYPEDARRAY_POOL={UINT8:l([32,0]),UINT16:l([32,0]),UINT32:l([32,0]),BIGUINT64:l([32,0]),INT8:l([32,0]),INT16:l([32,0]),INT32:l([32,0]),BIGINT64:l([32,0]),FLOAT:l([32,0]),DOUBLE:l([32,0]),DATA:l([32,0]),UINT8C:l([32,0]),BUFFER:l([32,0])});var c=typeof Uint8ClampedArray!="undefined",f=typeof BigUint64Array!="undefined",h=typeof BigInt64Array!="undefined",d=o.g.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=l([32,0])),d.BIGUINT64||(d.BIGUINT64=l([32,0])),d.BIGINT64||(d.BIGINT64=l([32,0])),d.BUFFER||(d.BUFFER=l([32,0]));var v=d.DATA,m=d.BUFFER;a.free=function(j){if(u.isBuffer(j))m[s.log2(j.length)].push(j);else{if(Object.prototype.toString.call(j)!=="[object ArrayBuffer]"&&(j=j.buffer),!j)return;var N=j.length||j.byteLength,H=s.log2(N)|0;v[H].push(j)}};function b(Z){if(Z){var j=Z.length||Z.byteLength,N=s.log2(j);v[N].push(Z)}}function p(Z){b(Z.buffer)}a.freeUint8=a.freeUint16=a.freeUint32=a.freeBigUint64=a.freeInt8=a.freeInt16=a.freeInt32=a.freeBigInt64=a.freeFloat32=a.freeFloat=a.freeFloat64=a.freeDouble=a.freeUint8Clamped=a.freeDataView=p,a.freeArrayBuffer=b,a.freeBuffer=function(j){m[s.log2(j.length)].push(j)},a.malloc=function(j,N){if(N===void 0||N==="arraybuffer")return k(j);switch(N){case"uint8":return M(j);case"uint16":return T(j);case"uint32":return L(j);case"int8":return x(j);case"int16":return C(j);case"int32":return S(j);case"float":case"float32":return g(j);case"double":case"float64":return P(j);case"uint8_clamped":return E(j);case"bigint64":return q(j);case"biguint64":return z(j);case"buffer":return G(j);case"data":case"dataview":return U(j);default:return null}return null};function k(j){var j=s.nextPow2(j),N=s.log2(j),H=v[N];return H.length>0?H.pop():new ArrayBuffer(j)}a.mallocArrayBuffer=k;function M(Z){return new Uint8Array(k(Z),0,Z)}a.mallocUint8=M;function T(Z){return new Uint16Array(k(2*Z),0,Z)}a.mallocUint16=T;function L(Z){return new Uint32Array(k(4*Z),0,Z)}a.mallocUint32=L;function x(Z){return new Int8Array(k(Z),0,Z)}a.mallocInt8=x;function C(Z){return new Int16Array(k(2*Z),0,Z)}a.mallocInt16=C;function S(Z){return new Int32Array(k(4*Z),0,Z)}a.mallocInt32=S;function g(Z){return new Float32Array(k(4*Z),0,Z)}a.mallocFloat32=a.mallocFloat=g;function P(Z){return new Float64Array(k(8*Z),0,Z)}a.mallocFloat64=a.mallocDouble=P;function E(Z){return c?new Uint8ClampedArray(k(Z),0,Z):M(Z)}a.mallocUint8Clamped=E;function z(Z){return f?new BigUint64Array(k(8*Z),0,Z):null}a.mallocBigUint64=z;function q(Z){return h?new BigInt64Array(k(8*Z),0,Z):null}a.mallocBigInt64=q;function U(Z){return new DataView(k(Z),0,Z)}a.mallocDataView=U;function G(Z){Z=s.nextPow2(Z);var j=s.log2(Z),N=m[j];return N.length>0?N.pop():new u(Z)}a.mallocBuffer=G,a.clearCache=function(){for(var j=0;j<32;++j)d.UINT8[j].length=0,d.UINT16[j].length=0,d.UINT32[j].length=0,d.INT8[j].length=0,d.INT16[j].length=0,d.INT32[j].length=0,d.FLOAT[j].length=0,d.DOUBLE[j].length=0,d.BIGUINT64[j].length=0,d.BIGINT64[j].length=0,d.UINT8C[j].length=0,v[j].length=0,m[j].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 l=0;l<s;++l)this.roots[l]=l,this.ranks[l]=0}var o=a.prototype;Object.defineProperty(o,"length",{get:function(){return this.roots.length}}),o.makeSet=function(){var s=this.roots.length;return this.roots.push(s),this.ranks.push(0),s},o.find=function(s){for(var l=s,u=this.roots;u[s]!==s;)s=u[s];for(;u[l]!==s;){var c=u[l];u[l]=s,l=c}return s},o.link=function(s,l){var u=this.find(s),c=this.find(l);if(u!==c){var f=this.ranks,h=this.roots,d=f[u],v=f[c];d<v?h[u]=c:v<d?h[c]=u:(h[c]=u,++f[u])}}},1682:function(i){"use strict";function a(l,u){for(var c=1,f=l.length,h=l[0],d=l[0],v=1;v<f;++v)if(d=h,h=l[v],u(h,d)){if(v===c){c++;continue}l[c++]=h}return l.length=c,l}function o(l){for(var u=1,c=l.length,f=l[0],h=l[0],d=1;d<c;++d,h=f)if(h=f,f=l[d],f!==h){if(d===u){u++;continue}l[u++]=f}return l.length=u,l}function s(l,u,c){return l.length===0?l:u?(c||l.sort(u),a(l,u)):(c||l.sort(),o(l))}i.exports=s},4359:function(i,a,o){"use strict";i.exports=c;var s=o(7718),l=null,u=null;typeof document!="undefined"&&(l=document.createElement("canvas"),l.width=8192,l.height=1024,u=l.getContext("2d"));function c(f,h){return(typeof h!="object"||h===null)&&(h={}),s(f,h.canvas||l,h.context||u,h)}},7718:function(i,a,o){i.exports=q,i.exports.processPixels=z;var s=o(3711),l=o(9618),u=o(5878),c=o(332),f=o(2538),h=o(2095),d="b",v="b|",m="i",b="i|",p="sup",k="+",M="+1",T="sub",L="-",x="-1";function C(U,G,Z,j){for(var N="<"+U+">",H="</"+U+">",re=N.length,oe=H.length,_e=G[0]===k||G[0]===L,ke=0,Ce=-oe;ke>-1&&(ke=Z.indexOf(N,ke),!(ke===-1||(Ce=Z.indexOf(H,ke+re),Ce===-1)||Ce<=ke));){for(var ge=ke;ge<Ce+oe;++ge)if(ge<ke+re||ge>=Ce)j[ge]=null,Z=Z.substr(0,ge)+" "+Z.substr(ge+1);else if(j[ge]!==null){var ie=j[ge].indexOf(G[0]);ie===-1?j[ge]+=G:_e&&(j[ge]=j[ge].substr(0,ie+1)+(1+parseInt(j[ge][ie+1]))+j[ge].substr(ie+2))}var Se=ke+re,Ee=Z.substr(Se,Ce-Se),we=Ee.indexOf(N);we!==-1?ke=we:ke=Ce+oe}return j}function S(U,G,Z){for(var j=G.textAlign||"start",N=G.textBaseline||"alphabetic",H=[1<<30,1<<30],re=[0,0],oe=U.length,_e=0;_e<oe;++_e)for(var ke=U[_e],Ce=0;Ce<2;++Ce)H[Ce]=Math.min(H[Ce],ke[Ce])|0,re[Ce]=Math.max(re[Ce],ke[Ce])|0;var ge=0;switch(j){case"center":ge=-.5*(H[0]+re[0]);break;case"right":case"end":ge=-re[0];break;case"left":case"start":ge=-H[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+j+"'")}var ie=0;switch(N){case"hanging":case"top":ie=-H[1];break;case"middle":ie=-.5*(H[1]+re[1]);break;case"alphabetic":case"ideographic":ie=-3*Z;break;case"bottom":ie=-re[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+N+"'")}var Se=1/Z;return"lineHeight"in G?Se*=+G.lineHeight:"width"in G?Se=G.width/(re[0]-H[0]):"height"in G&&(Se=G.height/(re[1]-H[1])),U.map(function(Ee){return[Se*(Ee[0]+ge),Se*(Ee[1]+ie)]})}function g(U,G,Z,j,N,H){Z=Z.replace(/\n/g,""),H.breaklines===!0?Z=Z.replace(/\<br\>/g,`
|
||
`):Z=Z.replace(/\<br\>/g," ");var re="",oe=[];for(me=0;me<Z.length;++me)oe[me]=re;H.bolds===!0&&(oe=C(d,v,Z,oe)),H.italics===!0&&(oe=C(m,b,Z,oe)),H.superscripts===!0&&(oe=C(p,M,Z,oe)),H.subscripts===!0&&(oe=C(T,x,Z,oe));var _e=[],ke="";for(me=0;me<Z.length;++me)oe[me]!==null&&(ke+=Z[me],_e.push(oe[me]));var Ce=ke.split(`
|
||
`),ge=Ce.length,ie=Math.round(N*j),Se=j,Ee=j*2,we=0,De=ge*ie+Ee;U.height<De&&(U.height=De),G.fillStyle="#000",G.fillRect(0,0,U.width,U.height),G.fillStyle="#fff";var Le,me,Pe,ce,He,lt=0,mt="";function Vt(){if(mt!==""){var Ae=G.measureText(mt).width;G.fillText(mt,Se+Pe,Ee+ce),Pe+=Ae}}function st(){return""+Math.round(He)+"px "}function ct(Ae,rt){var St=""+G.font;if(H.subscripts===!0){var Tt=Ae.indexOf(L),dt=rt.indexOf(L),Et=Tt>-1?parseInt(Ae[1+Tt]):0,pt=dt>-1?parseInt(rt[1+dt]):0;Et!==pt&&(St=St.replace(st(),"?px "),He*=Math.pow(.75,pt-Et),St=St.replace("?px ",st())),ce+=.25*ie*(pt-Et)}if(H.superscripts===!0){var Xt=Ae.indexOf(k),or=rt.indexOf(k),_r=Xt>-1?parseInt(Ae[1+Xt]):0,Er=or>-1?parseInt(rt[1+or]):0;_r!==Er&&(St=St.replace(st(),"?px "),He*=Math.pow(.75,Er-_r),St=St.replace("?px ",st())),ce-=.25*ie*(Er-_r)}if(H.bolds===!0){var ei=Ae.indexOf(v)>-1,qr=rt.indexOf(v)>-1;!ei&&qr&&(jr?St=St.replace("italic ","italic bold "):St="bold "+St),ei&&!qr&&(St=St.replace("bold ",""))}if(H.italics===!0){var jr=Ae.indexOf(b)>-1,gt=rt.indexOf(b)>-1;!jr&>&&(St="italic "+St),jr&&!gt&&(St=St.replace("italic ",""))}G.font=St}for(Le=0;Le<ge;++Le){var Qt=Ce[Le]+`
|
||
`;for(Pe=0,ce=Le*ie,He=j,mt="",me=0;me<Qt.length;++me){var Ht=me+lt<_e.length?_e[me+lt]:_e[_e.length-1];re===Ht?mt+=Qt[me]:(Vt(),mt=Qt[me],Ht!==void 0&&(ct(re,Ht),re=Ht))}Vt(),lt+=Qt.length;var nr=Math.round(Pe+2*Se)|0;we<nr&&(we=nr)}var tt=we,je=Ee+ie*ge,Ue=l(G.getImageData(0,0,tt,je).data,[je,tt,4]);return Ue.pick(-1,-1,0).transpose(1,0)}function P(U,G){var Z=s(U,128);return G?u(Z.cells,Z.positions,.25):{edges:Z.cells,positions:Z.positions}}function E(U,G,Z,j){var N=P(U,j),H=S(N.positions,G,Z),re=N.edges,oe=G.orientation==="ccw";if(c(H,re),G.polygons||G.polygon||G.polyline){for(var _e=h(re,H),ke=new Array(_e.length),Ce=0;Ce<_e.length;++Ce){for(var ge=_e[Ce],ie=new Array(ge.length),Se=0;Se<ge.length;++Se){for(var Ee=ge[Se],we=new Array(Ee.length),De=0;De<Ee.length;++De)we[De]=H[Ee[De]].slice();oe&&we.reverse(),ie[Se]=we}ke[Ce]=ie}return ke}else return G.triangles||G.triangulate||G.triangle?{cells:f(H,re,{delaunay:!1,exterior:!1,interior:!0}),positions:H}:{edges:re,positions:H}}function z(U,G,Z){try{return E(U,G,Z,!0)}catch(j){}try{return E(U,G,Z,!1)}catch(j){}return G.polygons||G.polyline||G.polygon?[]:G.triangles||G.triangulate||G.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function q(U,G,Z,j){var N=64,H=1.25,re={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};j&&(j.size&&j.size>0&&(N=j.size),j.lineSpacing&&j.lineSpacing>0&&(H=j.lineSpacing),j.styletags&&j.styletags.breaklines&&(re.breaklines=!!j.styletags.breaklines),j.styletags&&j.styletags.bolds&&(re.bolds=!!j.styletags.bolds),j.styletags&&j.styletags.italics&&(re.italics=!!j.styletags.italics),j.styletags&&j.styletags.subscripts&&(re.subscripts=!!j.styletags.subscripts),j.styletags&&j.styletags.superscripts&&(re.superscripts=!!j.styletags.superscripts)),Z.font=[j.fontStyle,j.fontVariant,j.fontWeight,N+"px",j.font].filter(function(_e){return _e}).join(" "),Z.textAlign="start",Z.textBaseline="alphabetic",Z.direction="ltr";var oe=g(G,Z,U,N,H,re);return z(oe,j,N)}},1538:function(i){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(E){E.permitHostObjects___&&E.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{i.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,v=Object.isExtensible,m="weakmap:",b=m+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var p=new ArrayBuffer(25),k=new Uint8Array(p);crypto.getRandomValues(k),b=m+"rand:"+Array.prototype.map.call(k,function(E){return(E%36).toString(36)}).join("")+"___"}function M(E){return!(E.substr(0,m.length)==m&&E.substr(E.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(z){return h(z).filter(M)}}),"getPropertyNames"in Object){var T=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(z){return T(z).filter(M)}})}function L(E){if(E!==Object(E))throw new TypeError("Not an object: "+E);var z=E[b];if(z&&z.key===E)return z;if(v(E)){z={key:E};try{return d(E,b,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch(q){return}}}(function(){var E=Object.freeze;d(Object,"freeze",{value:function(G){return L(G),E(G)}});var z=Object.seal;d(Object,"seal",{value:function(G){return L(G),z(G)}});var q=Object.preventExtensions;d(Object,"preventExtensions",{value:function(G){return L(G),q(G)}})})();function x(E){return E.prototype=null,Object.freeze(E)}var C=!1;function S(){!C&&typeof console!="undefined"&&(C=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var g=0,P=function(){this instanceof P||S();var E=[],z=[],q=g++;function U(N,H){var re,oe=L(N);return oe?q in oe?oe[q]:H:(re=E.indexOf(N),re>=0?z[re]:H)}function G(N){var H=L(N);return H?q in H:E.indexOf(N)>=0}function Z(N,H){var re,oe=L(N);return oe?oe[q]=H:(re=E.indexOf(N),re>=0?z[re]=H:(re=E.length,z[re]=H,E[re]=N)),this}function j(N){var H=L(N),re,oe;return H?q in H&&delete H[q]:(re=E.indexOf(N),re<0?!1:(oe=E.length-1,E[re]=void 0,z[re]=z[oe],E[re]=E[oe],E.length=oe,z.length=oe,!0))}return Object.create(P.prototype,{get___:{value:x(U)},has___:{value:x(G)},set___:{value:x(Z)},delete___:{value:x(j)}})};P.prototype=Object.create(Object.prototype,{get:{value:function(z,q){return this.get___(z,q)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,q){return this.set___(z,q)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof l=="function"?function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function E(){this instanceof P||S();var z=new l,q=void 0,U=!1;function G(H,re){return q?z.has(H)?z.get(H):q.get___(H,re):z.get(H,re)}function Z(H){return z.has(H)||(q?q.has___(H):!1)}var j;s?j=function(H,re){return z.set(H,re),z.has(H)||(q||(q=new P),q.set(H,re)),this}:j=function(H,re){if(U)try{z.set(H,re)}catch(oe){q||(q=new P),q.set___(H,re)}else z.set(H,re);return this};function N(H){var re=!!z.delete(H);return q&&q.delete___(H)||re}return Object.create(P.prototype,{get___:{value:x(G)},has___:{value:x(Z)},set___:{value:x(j)},delete___:{value:x(N)},permitHostObjects___:{value:x(function(H){if(H===o)U=!0;else throw new Error("bogus call to permitHostObjects___")})}})}E.prototype=P.prototype,i.exports=E,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy!="undefined"&&(Proxy=void 0),i.exports=P)})()},236:function(i,a,o){var s=o(8284);i.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}},8284:function(i){i.exports=a;function a(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}},606:function(i,a,o){var s=o(236);i.exports=l;function l(){var u=s();return{get:function(c,f){var h=u(c);return h.hasOwnProperty("value")?h.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}},3349:function(i){"use strict";function a(){return function(f,h,d,v,m,b){var p=f[0],k=d[0],M=[0],T=k;v|=0;var L=0,x=k;for(L=0;L<p;++L){{var C=h[v]-b,S=h[v+T]-b;C>=0!=S>=0&&m.push(M[0]+.5+.5*(C+S)/(C-S))}v+=x,++M[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,m,b){var p=v.dtype,k=v.order,M=[p,k.join()].join(),T=h[M];return T||(h[M]=T=f([p,k])),T(v.shape.slice(0),v.data,v.stride,v.offset|0,m,b)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:"zeroCrossings"})},781:function(i,a,o){"use strict";i.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}},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);APe.exports=n})()});var TX=ye((sgr,SPe)=>{"use strict";SPe.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var CPe=ye((lgr,kPe)=>{"use strict";var MPe=TX();kPe.exports=dIt;var EPe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function dIt(e){var t,r=[],n=1,i;if(typeof e=="string")if(e=e.toLowerCase(),MPe[e])r=MPe[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",a=l.replace(/a$/,"");i=a;var o=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,d){if(/%$/.test(h))return d===o?parseFloat(h)/100:a==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(a[d]==="h"){if(/deg$/.test(h))return parseFloat(h);if(EPe[h]!==void 0)return EPe[h]}return parseFloat(h)}),l===a&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),i=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],i="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(i="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(i="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:i,values:r,alpha:n}}});var PPe=ye((ugr,LPe)=>{"use strict";var vIt=CPe();LPe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,i,a=vIt(t);if(!a.space)return[];var o=[0,0,0],s=a.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(a.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(a.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(a.values[2],o[2]),s[2]),a.space[0]==="h"&&(r=pIt(r)),r.push(Math.min(Math.max(a.alpha,0),1)),r};function pIt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}});var rk=ye((cgr,IPe)=>{IPe.exports=gIt;function gIt(e,t,r){return t<r?e<t?t:e>r?r:e:e<r?r:e>t?t:e}});var QD=ye((fgr,RPe)=>{RPe.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}});var ox=ye((hgr,DPe)=>{"use strict";var mIt=PPe(),eF=rk(),yIt=QD();DPe.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=yIt(r),i=new n(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=mIt(t),t[0]/=255,t[1]/=255,t[2]/=255),_It(t)?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:255,a&&(i[0]/=255,i[1]/=255,i[2]/=255,i[3]/=255),i):(a?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:1):(i[0]=eF(Math.floor(t[0]*255),0,255),i[1]=eF(Math.floor(t[1]*255),0,255),i[2]=eF(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:eF(Math.floor(t[3]*255),0,255)),i)};function _It(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var n1=ye((dgr,FPe)=>{"use strict";var xIt=ox();function bIt(e){return e?xIt(e):[0,0,0,1]}FPe.exports=bIt});var a1=ye((vgr,VPe)=>{"use strict";var NPe=Eo(),wIt=fd(),tF=ox(),rF=tc(),TIt=Ih().defaultLine,zPe=vv().isArrayOrTypedArray,AX=tF(TIt),UPe=1;function qPe(e,t){var r=e;return r[3]*=t,r}function OPe(e){if(NPe(e))return AX;var t=tF(e);return t.length?t:AX}function BPe(e){return NPe(e)?e:UPe}function AIt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=zPe(n),a=zPe(t),o=rF.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=rF.makeColorScaleFuncFromTrace(e):l=OPe,i?u=function(v,m){return v[m]===void 0?AX:tF(l(v[m]))}:u=OPe,a?c=function(v,m){return v[m]===void 0?UPe:BPe(v[m])}:c=BPe,i||a)for(var d=0;d<r;d++)f=u(n,d),h=c(t,d),s[d]=qPe(f,h);else s=qPe(tF(n),t);return s}function SIt(e){var t=rF.extractOpts(e),r=t.colorscale;return t.reversescale&&(r=rF.flipScale(t.colorscale)),r.map(function(n){var i=n[0],a=wIt(n[1]),o=a.toRgb();return{index:i,rgb:[o.r,o.g,o.b,o.a]}})}VPe.exports={formatColor:AIt,parseColorScale:SIt}});var SX=ye((pgr,GPe)=>{"use strict";GPe.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}});var iF=ye((ggr,HPe)=>{"use strict";HPe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var WPe=ye((mgr,jPe)=>{"use strict";var MIt=Oa();function MX(e,t,r,n){if(!t||!t.visible)return null;for(var i=MIt.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),o=0;o<e.length;o++){var s=i(+e[o],o);if(n.type==="log"){var l=n.c2l(e[o]),u=e[o]-s[0],c=e[o]+s[1];if(a[o]=[(n.c2l(u,!0)-l)*r,(n.c2l(c,!0)-l)*r],u>0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function EIt(e){for(var t=0;t<e.length;t++)if(e[t])return e[t].length;return 0}function kIt(e,t,r){var n=[MX(e.x,e.error_x,t[0],r.xaxis),MX(e.y,e.error_y,t[1],r.yaxis),MX(e.z,e.error_z,t[2],r.zaxis)],i=EIt(n);if(i===0)return null;for(var a=new Array(i),o=0;o<i;o++){for(var s=[[0,0,0],[0,0,0]],l=0;l<3;l++)if(n[l])for(var u=0;u<2;u++)s[u][l]=n[l][o][u];a[o]=s}return a}jPe.exports=kIt});var tIe=ye((ygr,eIe)=>{"use strict";var CIt=zd().gl_line3d,XPe=zd().gl_scatter3d,LIt=zd().gl_error3d,PIt=zd().gl_mesh3d,IIt=zd().delaunay_triangulate,o1=Pr(),$Pe=n1(),nF=a1().formatColor,RIt=O3(),EX=SX(),DIt=iF(),FIt=ho(),zIt=ip().appendArrayPointValue,qIt=WPe();function QPe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var CX=QPe.prototype;CX.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(o1.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function OIt(e,t,r){var n=(r+1)%3,i=(r+2)%3,a=[],o=[],s;for(s=0;s<e.length;++s){var l=e[s];isNaN(l[n])||!isFinite(l[n])||isNaN(l[i])||!isFinite(l[i])||(a.push([l[n],l[i]]),o.push(s))}var u=IIt(a);for(s=0;s<u.length;++s)for(var c=u[s],f=0;f<c.length;++f)c[f]=o[c[f]];return{positions:e,cells:u,meshColor:t}}function BIt(e){for(var t=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],n=[1,1,1],i=0;i<3;i++){var a=e[i];a&&a.copy_zstyle!==!1&&e[2].visible!==!1&&(a=e[2]),!(!a||!a.visible)&&(t[i]=a.width/2,r[i]=$Pe(a.color),n[i]=a.thickness)}return{capSize:t,color:r,lineWidth:n}}function ZPe(e){return e==null?0:e.indexOf("left")>-1?-1:e.indexOf("right")>-1?1:0}function YPe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function NIt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var i=0;i<e.length;i++)n[i]=[t,r],e[i]&&(n[i][0]=ZPe(e[i]),n[i][1]=YPe(e[i]));else n[0]=ZPe(e),n[1]=YPe(e);return n}function UIt(e,t){return t(e*4)}function VIt(e){return DIt[e]}function kX(e,t,r,n,i){var a=null;if(o1.isArrayOrTypedArray(e)){a=[];for(var o=0;o<t;o++)e[o]===void 0?a[o]=n:a[o]=r(e[o],i)}else a=r(e,o1.identity);return a}function GIt(e,t){var r=[],n=e.fullSceneLayout,i=e.dataScale,a=n.xaxis,o=n.yaxis,s=n.zaxis,l=t.marker,u=t.line,c=t.x||[],f=t.y||[],h=t.z||[],d=c.length,v=t.xcalendar,m=t.ycalendar,b=t.zcalendar,p,k,M,T,L,x;for(L=0;L<d;L++)p=a.d2l(c[L],0,v)*i[0],k=o.d2l(f[L],0,m)*i[1],M=s.d2l(h[L],0,b)*i[2],r[L]=[p,k,M];if(Array.isArray(t.text))x=t.text;else if(o1.isTypedArray(t.text))x=Array.from(t.text);else if(t.text!==void 0)for(x=new Array(d),L=0;L<d;L++)x[L]=t.text;function C(oe,_e){var ke=n[oe];return FIt.tickText(ke,ke.d2l(_e),!0).text}var S=t.texttemplate;if(S){var g=e.fullLayout,P=g._d3locale,E=Array.isArray(S),z=E?Math.min(S.length,d):d,q=E?function(oe){return S[oe]}:function(){return S};for(x=new Array(z),L=0;L<z;L++){var U={x:c[L],y:f[L],z:h[L]},G={xLabel:C("xaxis",c[L]),yLabel:C("yaxis",f[L]),zLabel:C("zaxis",h[L])},Z={};zIt(Z,t,L),x[L]=o1.texttemplateString({data:[Z,U,t._meta],fallback:t.texttemplatefallback,labels:G,locale:P,template:q(L)})}}if(T={position:r,mode:t.mode,text:x},"line"in t&&(T.lineColor=nF(u,1,d),T.lineWidth=u.width,T.lineDashes=u.dash),"marker"in t){var j=RIt(t);T.scatterColor=nF(l,1,d),T.scatterSize=kX(l.size,d,UIt,20,j),T.scatterMarker=kX(l.symbol,d,VIt,"\u25CF"),T.scatterLineWidth=l.line.width,T.scatterLineColor=nF(l.line,1,d),T.scatterAngle=0}"textposition"in t&&(T.textOffset=NIt(t.textposition),T.textColor=nF(t.textfont,1,d),T.textSize=kX(t.textfont.size,d,o1.identity,12),T.textFontFamily=t.textfont.family,T.textFontWeight=t.textfont.weight,T.textFontStyle=t.textfont.style,T.textFontVariant=t.textfont.variant,T.textAngle=0);var N=["x","y","z"];for(T.project=[!1,!1,!1],T.projectScale=[1,1,1],T.projectOpacity=[1,1,1],L=0;L<3;++L){var H=t.projection[N[L]];(T.project[L]=H.show)&&(T.projectOpacity[L]=H.opacity,T.projectScale[L]=H.scale)}T.errorBounds=qIt(t,i,n);var re=BIt([t.error_x,t.error_y,t.error_z]);return T.errorColor=re.color,T.errorLineWidth=re.lineWidth,T.errorCapSize=re.capSize,T.delaunayAxis=t.surfaceaxis,T.delaunayColor=$Pe(t.surfacecolor),T}function KPe(e){if(o1.isArrayOrTypedArray(e)){var t=e[0];return o1.isArrayOrTypedArray(t)&&(e=t),"rgb("+e.slice(0,3).map(function(r){return Math.round(r*255)})+")"}return null}function JPe(e){return o1.isArrayOrTypedArray(e)?e.length===4&&typeof e[0]=="number"?KPe(e):e.map(KPe):null}CX.update=function(e){var t=this.scene.glplot.gl,r,n,i,a,o=EX.solid;this.data=e;var s=GIt(this.scene,e);"mode"in s&&(this.mode=s.mode),"lineDashes"in s&&s.lineDashes in EX&&(o=EX[s.lineDashes]),this.color=JPe(s.scatterColor)||JPe(s.lineColor),this.dataPoints=s.position,r={gl:this.scene.glplot.gl,position:s.position,color:s.lineColor,lineWidth:s.lineWidth||1,dashes:o[0],dashScale:o[1],opacity:e.opacity,connectGaps:e.connectgaps},this.mode.indexOf("lines")!==-1?this.linePlot?this.linePlot.update(r):(this.linePlot=CIt(r),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var l=e.opacity;if(e.marker&&e.marker.opacity!==void 0&&(l*=e.marker.opacity),n={gl:this.scene.glplot.gl,position:s.position,color:s.scatterColor,size:s.scatterSize,glyph:s.scatterMarker,opacity:l,orthographic:!0,lineWidth:s.scatterLineWidth,lineColor:s.scatterLineColor,project:s.project,projectScale:s.projectScale,projectOpacity:s.projectOpacity},this.mode.indexOf("markers")!==-1?this.scatterPlot?this.scatterPlot.update(n):(this.scatterPlot=XPe(n),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),a={gl:this.scene.glplot.gl,position:s.position,glyph:s.text,color:s.textColor,size:s.textSize,angle:s.textAngle,alignment:s.textOffset,font:s.textFontFamily,fontWeight:s.textFontWeight,fontStyle:s.textFontStyle,fontVariant:s.textFontVariant,orthographic:!0,lineWidth:0,project:!1,opacity:e.opacity},this.textLabels=e.hovertext||e.text,this.mode.indexOf("text")!==-1?this.textMarkers?this.textMarkers.update(a):(this.textMarkers=XPe(a),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),i={gl:this.scene.glplot.gl,position:s.position,color:s.errorColor,error:s.errorBounds,lineWidth:s.errorLineWidth,capSize:s.errorCapSize,opacity:e.opacity},this.errorBars?s.errorBounds?this.errorBars.update(i):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):s.errorBounds&&(this.errorBars=LIt(i),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),s.delaunayAxis>=0){var u=OIt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=PIt(u),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)};CX.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function HIt(e,t){var r=new QPe(e,t.uid);return r.update(t),r}eIe.exports=HIt});var DX=ye((_gr,aIe)=>{"use strict";var s1=pf(),jIt=ec(),RX=Tu(),LX=df().axisHoverFormat,{hovertemplateAttrs:WIt,texttemplateAttrs:XIt,templatefallbackAttrs:rIe}=Ll(),iIe=Gl(),ZIt=SX(),YIt=iF(),$g=Ao().extendFlat,KIt=mc().overrideAll,nIe=t_(),JIt=s1.line,J2=s1.marker,$It=J2.line,QIt=$g({width:JIt.width,dash:{valType:"enumerated",values:nIe(ZIt),dflt:"solid"}},RX("line"));function PX(e){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var IX=aIe.exports=KIt({x:s1.x,y:s1.y,z:{valType:"data_array"},text:$g({},s1.text,{}),texttemplate:XIt(),texttemplatefallback:rIe({editType:"calc"}),hovertext:$g({},s1.hovertext,{}),hovertemplate:WIt(),hovertemplatefallback:rIe(),xhoverformat:LX("x"),yhoverformat:LX("y"),zhoverformat:LX("z"),mode:$g({},s1.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:PX("x"),y:PX("y"),z:PX("z")},connectgaps:s1.connectgaps,line:QIt,marker:$g({symbol:{valType:"enumerated",values:nIe(YIt),dflt:"circle",arrayOk:!0},size:$g({},J2.size,{dflt:8}),sizeref:J2.sizeref,sizemin:J2.sizemin,sizemode:J2.sizemode,opacity:$g({},J2.opacity,{arrayOk:!1}),colorbar:J2.colorbar,line:$g({width:$g({},$It.width,{arrayOk:!1})},RX("marker.line"))},RX("marker")),textposition:$g({},s1.textposition,{dflt:"top center"}),textfont:jIt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:iIe.opacity,hoverinfo:$g({},iIe.hoverinfo)},"calc","nested");IX.x.editType=IX.y.editType=IX.z.editType="calc+clearAxisTypes"});var lIe=ye((xgr,sIe)=>{"use strict";var oIe=Oa(),e8t=Pr(),FX=Ru(),t8t=$p(),r8t=D0(),i8t=F0(),n8t=DX();sIe.exports=function(t,r,n,i){function a(d,v){return e8t.coerce(t,r,n8t,d,v)}var o=a8t(t,r,a,i);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),FX.hasMarkers(r)&&t8t(t,r,n,i,a,{noAngle:!0,noLineDash:!0,noSelect:!0}),FX.hasLines(r)&&(a("connectgaps"),r8t(t,r,n,i,a)),FX.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),i8t(t,r,i,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];a(f+".show")&&(a(f+".opacity"),a(f+".scale"))}var h=oIe.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||l||n,{axis:"z"}),h(t,r,s||l||n,{axis:"y",inherit:"z"}),h(t,r,s||l||n,{axis:"x",inherit:"z"})};function a8t(e,t,r,n){var i=0,a=r("x"),o=r("y"),s=r("z"),l=oIe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],n),a&&o&&s&&(i=Math.min(a.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=i),i}});var cIe=ye((bgr,uIe)=>{"use strict";var o8t=Rm(),s8t=z0();uIe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return o8t(n,r),s8t(t,r),n}});var hIe=ye((wgr,fIe)=>{fIe.exports=l8t;function l8t(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var n=t,i;try{var a=[e];e.indexOf("webgl")===0&&a.push("experimental-"+e);for(var o=0;o<a.length;o++)if(i=r.getContext(a[o],n),i)return i}catch(s){i=null}return i||null}});var vIe=ye((Tgr,dIe)=>{var u8t=hIe();dIe.exports=function(t){return u8t("webgl",t)}});var zX=ye((Agr,gIe)=>{"use strict";var pIe=ka(),c8t=function(){};gIe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=c8t);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=pIe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=pIe.lightLine,n.style["z-index"]=30;var i=document.createElement("p");return i.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",i.style.position="relative",i.style.top="50%",i.style.left="50%",i.style.height="30%",i.style.width="50%",i.style.margin="-15% 0 0 -25%",n.appendChild(i),t.container.appendChild(n),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var _Ie=ye((Sgr,yIe)=>{"use strict";var $2=n1(),f8t=Pr(),h8t=["xaxis","yaxis","zaxis"];function mIe(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var d8t=mIe.prototype;d8t.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[h8t[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?f8t.templateString(i.title.text,e._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(r.labelColor[n]=$2(i.title.font.color)),i.title.font.family&&(r.labelFont[n]=i.title.font.family),i.title.font.size&&(r.labelSize[n]=i.title.font.size),i.title.font.weight&&(r.labelFontWeight[n]=i.title.font.weight),i.title.font.style&&(r.labelFontStyle[n]=i.title.font.style),i.title.font.variant&&(r.labelFontVariant[n]=i.title.font.variant)),"showline"in i&&(r.lineEnable[n]=i.showline),"linecolor"in i&&(r.lineColor[n]=$2(i.linecolor)),"linewidth"in i&&(r.lineWidth[n]=i.linewidth),"showgrid"in i&&(r.gridEnable[n]=i.showgrid),"gridcolor"in i&&(r.gridColor[n]=$2(i.gridcolor)),"gridwidth"in i&&(r.gridWidth[n]=i.gridwidth),i.type==="log"?r.zeroEnable[n]=!1:"zeroline"in i&&(r.zeroEnable[n]=i.zeroline),"zerolinecolor"in i&&(r.zeroLineColor[n]=$2(i.zerolinecolor)),"zerolinewidth"in i&&(r.zeroLineWidth[n]=i.zerolinewidth),"ticks"in i&&i.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,"ticklen"in i&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=i.ticklen),"tickcolor"in i&&(r.lineTickColor[n]=$2(i.tickcolor)),"tickwidth"in i&&(r.lineTickWidth[n]=i.tickwidth),"tickangle"in i&&(r.tickAngle[n]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(r.tickEnable[n]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(r.tickColor[n]=$2(i.tickfont.color)),i.tickfont.family&&(r.tickFont[n]=i.tickfont.family),i.tickfont.size&&(r.tickSize[n]=i.tickfont.size),i.tickfont.weight&&(r.tickFontWeight[n]=i.tickfont.weight),i.tickfont.style&&(r.tickFontStyle[n]=i.tickfont.style),i.tickfont.variant&&(r.tickFontVariant[n]=i.tickfont.variant)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):i.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,"showbackground"in i&&i.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=$2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function v8t(e,t){var r=new mIe;return r.merge(e,t),r}yIe.exports=v8t});var wIe=ye((Mgr,bIe)=>{"use strict";var p8t=n1(),g8t=["xaxis","yaxis","zaxis"];function xIe(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var m8t=xIe.prototype;m8t.merge=function(e){for(var t=0;t<3;++t){var r=e[g8t[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=p8t(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function y8t(e){var t=new xIe;return t.merge(e),t}bIe.exports=y8t});var SIe=ye((Egr,AIe)=>{"use strict";AIe.exports=T8t;var TIe=ho(),_8t=Pr(),x8t=["xaxis","yaxis","zaxis"],b8t=[0,0,0];function w8t(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 T8t(e){for(var t=e.axesOptions,r=e.glplot.axesPixels,n=e.fullSceneLayout,i=[[],[],[]],a=0;a<3;++a){var o=n[x8t[a]];if(o._length=(r[a].hi-r[a].lo)*r[a].pixelsPerDataUnit/e.dataScale[a],Math.abs(o._length)===1/0||isNaN(o._length))i[a]=[];else{o._input_range=o.range.slice(),o.range[0]=r[a].lo/e.dataScale[a],o.range[1]=r[a].hi/e.dataScale[a],o._m=1/(e.dataScale[a]*r[a].pixelsPerDataUnit),o.range[0]===o.range[1]&&(o.range[0]-=1,o.range[1]+=1);var s=o.tickmode;if(o.tickmode==="auto"){o.tickmode="linear";var l=o.nticks||_8t.constrain(o._length/40,4,9);TIe.autoTicks(o,Math.abs(o.range[1]-o.range[0])/l)}for(var u=TIe.calcTicks(o,{msUTC:!0}),c=0;c<u.length;++c)u[c].x=u[c].x*e.dataScale[a],o.type==="date"&&(u[c].text=u[c].text.replace(/\<br\>/g," "));i[a]=u,o.tickmode=s}}t.ticks=i;for(var a=0;a<3;++a){b8t[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var c=0;c<2;++c)t.bounds[c][a]=e.glplot.bounds[c][a]}e.contourLevels=w8t(i)}});var IIe=ye((kgr,PIe)=>{"use strict";var kIe=zd().gl_plot3d,A8t=kIe.createCamera,MIe=kIe.createScene,S8t=vIe(),M8t=UL(),sF=Oa(),cp=Pr(),oF=cp.preserveDrawingBuffer(),lF=ho(),Qg=vf(),E8t=n1(),k8t=zX(),C8t=XU(),L8t=_Ie(),P8t=wIe(),I8t=SIe(),R8t=Mg().applyAutorangeOptions,ik,aF,CIe=!1;function LIe(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=L8t(t,t[this.id]),this.spikeOptions=P8t(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=sF.getComponentMethod("annotations3d","convert"),this.drawAnnotations=sF.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Sv=LIe.prototype;Sv.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:oF,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!aF&&(ik=document.createElement("canvas"),aF=S8t({canvas:ik,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!aF))throw new Error("error creating static canvas/context for image server");t.gl=aF,t.canvas=ik}return t};var EIe=!0;Sv.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=MIe(t)}catch(n){if(e.staticMode||!EIe||oF)r=!1;else{cp.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{oF=t.glOptions.preserveDrawingBuffer=!0,e.glplot=MIe(t)}catch(i){oF=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return EIe=!1,r};Sv.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=A8t(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};Sv.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return k8t(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,i=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},a=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=i();o.saveLayout(n),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){a(e)}),e.glplot.canvas.addEventListener("touchstart",function(){CIe=!0}),e.glplot.canvas.addEventListener("wheel",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}a(e)}},M8t?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=i();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Sv.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,i=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var a=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),I8t(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h<u.length;++h)r=e.traces[u[h]],r.data.hoverinfo!=="skip"&&r.handlePick(f)&&(c=r),r.setContourLevels&&r.setContourLevels();function d(P,E,z){var q=e.fullSceneLayout[P+"axis"];return q.type!=="log"&&(E=q.d2l(E)),lF.hoverLabelText(q,E,z)}if(c!==null){var v=C8t(e.glplot.cameraParams,f.dataCoordinate);r=c.data;var m=t._fullData[r.index],b=f.index,p={xLabel:d("x",f.traceCoordinate[0],r.xhoverformat),yLabel:d("y",f.traceCoordinate[1],r.yhoverformat),zLabel:d("z",f.traceCoordinate[2],r.zhoverformat)},k=Qg.castHoverinfo(m,e.fullLayout,b),M=(k||"").split("+"),T=k&&k==="all";!m.hovertemplate&&!T&&(M.indexOf("x")===-1&&(p.xLabel=void 0),M.indexOf("y")===-1&&(p.yLabel=void 0),M.indexOf("z")===-1&&(p.zLabel=void 0),M.indexOf("text")===-1&&(f.textLabel=void 0),M.indexOf("name")===-1&&(c.name=void 0));var L,x=[];r.type==="cone"||r.type==="streamtube"?(p.uLabel=d("x",f.traceCoordinate[3],r.uhoverformat),(T||M.indexOf("u")!==-1)&&x.push("u: "+p.uLabel),p.vLabel=d("y",f.traceCoordinate[4],r.vhoverformat),(T||M.indexOf("v")!==-1)&&x.push("v: "+p.vLabel),p.wLabel=d("z",f.traceCoordinate[5],r.whoverformat),(T||M.indexOf("w")!==-1)&&x.push("w: "+p.wLabel),p.normLabel=f.traceCoordinate[6].toPrecision(3),(T||M.indexOf("norm")!==-1)&&x.push("norm: "+p.normLabel),r.type==="streamtube"&&(p.divergenceLabel=f.traceCoordinate[7].toPrecision(3),(T||M.indexOf("divergence")!==-1)&&x.push("divergence: "+p.divergenceLabel)),f.textLabel&&x.push(f.textLabel),L=x.join("<br>")):r.type==="isosurface"||r.type==="volume"?(p.valueLabel=lF.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),x.push("value: "+p.valueLabel),f.textLabel&&x.push(f.textLabel),L=x.join("<br>")):L=f.textLabel;var C={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:m._input,fullData:m,curveNumber:m.index,pointNumber:b};Qg.appendArrayPointValue(C,m,b),r._module.eventData&&(C=m._module.eventData(C,f,m,{},b));var S={points:[C]};if(e.fullSceneLayout.hovermode){var g=[];Qg.loneHover({trace:m,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:p.xLabel,yLabel:p.yLabel,zLabel:p.zLabel,text:L,name:c.name,color:Qg.castHoverOption(m,b,"bgcolor")||c.color,borderColor:Qg.castHoverOption(m,b,"bordercolor"),fontFamily:Qg.castHoverOption(m,b,"font.family"),fontSize:Qg.castHoverOption(m,b,"font.size"),fontColor:Qg.castHoverOption(m,b,"font.color"),nameLength:Qg.castHoverOption(m,b,"namelength"),textAlign:Qg.castHoverOption(m,b,"align"),hovertemplate:cp.castOption(m,b,"hovertemplate"),hovertemplateLabels:cp.extendFlat({},C,p),eventData:[C]},{container:n,gd:t,inOut_bbox:g}),C.bbox=g[0]}f.distance<5&&(f.buttons||CIe)?t.emit("plotly_click",S):t.emit("plotly_hover",S),this.oldEventData=S}else Qg.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Sv.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){cp.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var nk=["xaxis","yaxis","zaxis"];function D8t(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=nk[i],o=a.charAt(0),s=n[a],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!cp.isArrayOrTypedArray(l))r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],c-1);else for(var f,h=0;h<(c||l.length);h++)if(cp.isArrayOrTypedArray(l[h]))for(var d=0;d<l[h].length;++d)f=s.d2l(l[h][d],0,u),!isNaN(f)&&isFinite(f)&&(r[0][i]=Math.min(r[0][i],f),r[1][i]=Math.max(r[1][i],f));else f=s.d2l(l[h],0,u),!isNaN(f)&&isFinite(f)&&(r[0][i]=Math.min(r[0][i],f),r[1][i]=Math.max(r[1][i],f))}}function F8t(e,t){for(var r=e.fullSceneLayout,n=r.annotations||[],i=0;i<3;i++)for(var a=nk[i],o=a.charAt(0),s=r[a],l=0;l<n.length;l++){var u=n[l];if(u.visible){var c=s.r2l(u[o]);!isNaN(c)&&isFinite(c)&&(t[0][i]=Math.min(t[0][i],c),t[1][i]=Math.max(t[1][i],c))}}}Sv.plot=function(e,t,r){var n=this;if(n.plotArgs=[e,t,r],!n.glplot.contextLost){var i,a,o,s,l,u,c=t[n.id],f=r[n.id];n.fullLayout=t,n.fullSceneLayout=c,n.axesOptions.merge(t,c),n.spikeOptions.merge(c),n.setViewport(c),n.updateFx(c.dragmode,c.hovermode),n.camera.enableWheel=n.graphDiv._context._scrollZoom.gl3d,n.glplot.setClearColor(E8t(c.bgcolor)),n.setConvert(l),e?Array.isArray(e)||(e=[e]):e=[];var h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(o=0;o<e.length;++o)i=e[o],!(i.visible!==!0||i._length===0)&&D8t(this,i,h);F8t(this,h);var d=[1,1,1];for(s=0;s<3;++s)h[1][s]===h[0][s]?d[s]=1:d[s]=1/(h[1][s]-h[0][s]);for(n.dataScale=d,n.convertAnnotations(this),o=0;o<e.length;++o)i=e[o],!(i.visible!==!0||i._length===0)&&(a=n.traces[i.uid],a?a.data.type===i.type?a.update(i):(a.dispose(),a=i._module.plot(this,i),n.traces[i.uid]=a):(a=i._module.plot(this,i),n.traces[i.uid]=a),a.name=i.name);var v=Object.keys(n.traces);e:for(o=0;o<v.length;++o){for(s=0;s<e.length;++s)if(e[s].uid===v[o]&&e[s].visible===!0&&e[s]._length!==0)continue e;a=n.traces[v[o]],a.dispose(),delete n.traces[v[o]]}n.glplot.objects.sort(function(oe,_e){return oe._trace.data.index-_e._trace.data.index});var m=[[0,0,0],[0,0,0]],b=[],p={};for(o=0;o<3;++o){l=c[nk[o]],u=l.type,u in p?(p[u].acc*=d[o],p[u].count+=1):p[u]={acc:d[o],count:1};var k;if(l.autorange){m[0][o]=1/0,m[1][o]=-1/0;var M=n.glplot.objects,T=n.fullSceneLayout.annotations||[],L=l._name.charAt(0);for(s=0;s<M.length;s++){var x=M[s],C=x.bounds,S=x._trace.data._pad||0;x.constructor.name==="ErrorBars"&&l._lowerLogErrorBound?m[0][o]=Math.min(m[0][o],l._lowerLogErrorBound):m[0][o]=Math.min(m[0][o],C[0][o]/d[o]-S),m[1][o]=Math.max(m[1][o],C[1][o]/d[o]+S)}for(s=0;s<T.length;s++){var g=T[s];if(g.visible){var P=l.r2l(g[L]);m[0][o]=Math.min(m[0][o],P),m[1][o]=Math.max(m[1][o],P)}}if("rangemode"in l&&l.rangemode==="tozero"&&(m[0][o]=Math.min(m[0][o],0),m[1][o]=Math.max(m[1][o],0)),m[0][o]>m[1][o])m[0][o]=-1,m[1][o]=1;else{var E=m[1][o]-m[0][o];m[0][o]-=E/32,m[1][o]+=E/32}if(k=[m[0][o],m[1][o]],k=R8t(k,l),m[0][o]=k[0],m[1][o]=k[1],l.isReversed()){var z=m[0][o];m[0][o]=m[1][o],m[1][o]=z}}else k=l.range,m[0][o]=l.r2l(k[0]),m[1][o]=l.r2l(k[1]);m[0][o]===m[1][o]&&(m[0][o]-=1,m[1][o]+=1),b[o]=m[1][o]-m[0][o],l.range=[m[0][o],m[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var q,U=c.aspectmode;if(U==="cube")q=[1,1,1];else if(U==="manual"){var G=c.aspectratio;q=[G.x,G.y,G.z]}else if(U==="auto"||U==="data"){var Z=[1,1,1];for(o=0;o<3;++o){l=c[nk[o]],u=l.type;var j=p[u];Z[o]=Math.pow(j.acc,1/j.count)/d[o]}U==="data"||Math.max.apply(null,Z)/Math.min.apply(null,Z)<=4?q=Z:q=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=q[0],c.aspectratio.y=f.aspectratio.y=q[1],c.aspectratio.z=f.aspectratio.z=q[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var N=c.domain||null,H=t._size||null;if(N&&H){var re=n.container.style;re.position="absolute",re.left=H.l+N.x[0]*H.w+"px",re.top=H.t+(1-N.y[1])*H.h+"px",re.width=H.w*(N.x[1]-N.x[0])+"px",re.height=H.h*(N.y[1]-N.y[0])+"px"}n.glplot.redraw()}};Sv.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function z8t(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 q8t(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}Sv.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),q8t(e.camera)};Sv.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,z8t(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type==="orthographic",i=t.camera._ortho;n!==i&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};Sv.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=cp.nestedProperty(e,t.id+".camera"),i=n.get();function a(u,c,f,h){var d=["up","center","eye"],v=["x","y","z"];return c[d[f]]&&u[d[f]][v[h]]===c[d[f]][v[h]]}var o=!1;if(i===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!a(r,i,s,l)){o=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(o=!0)}return o};Sv.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=cp.nestedProperty(e,t.id+".aspectratio"),i=n.get();return i===void 0||i.x!==r.x||i.y!==r.y||i.z!==r.z};Sv.saveLayout=function(e){var t=this,r=t.fullLayout,n,i,a,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var h={};if(u&&(n=t.getCamera(),i=cp.nestedProperty(e,t.id+".camera"),a=i.get(),h[t.id+".camera"]=a),c&&(o=t.glplot.getAspectratio(),s=cp.nestedProperty(e,t.id+".aspectratio"),l=s.get(),h[t.id+".aspectratio"]=l),sF.call("_storeDirectGUIEdit",e,r._preGUI,h),u){i.set(n);var d=cp.nestedProperty(r,t.id+".camera");d.set(n)}if(c){s.set(o);var v=cp.nestedProperty(r,t.id+".aspectratio");v.set(o),t.glplot.redraw()}}return f};Sv.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e==="orbit")n.mode="orbit",n.keyBindingMode="rotate";else if(e==="turntable"){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},h={};h[c]=f;var d=i.layout;sF.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=f,cp.nestedProperty(d,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function O8t(e,t,r){for(var n=0,i=r-1;n<i;++n,--i)for(var a=0;a<t;++a)for(var o=0;o<4;++o){var s=4*(t*n+a)+o,l=4*(t*i+a)+o,u=e[s];e[s]=e[l],e[l]=u}}function B8t(e,t,r){for(var n=0;n<r;++n)for(var i=0;i<t;++i){var a=4*(t*n+i),o=e[a+3];if(o>0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}Sv.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(ik),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,i=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(n*i*4);r.readPixels(0,0,n,i,r.RGBA,r.UNSIGNED_BYTE,a),O8t(a,n,i),B8t(a,n,i);var o=document.createElement("canvas");o.width=n,o.height=i;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(n,i);l.data.set(a),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(ik),u};Sv.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[nk[t]];lF.setConvert(r,e.fullLayout),r.setScale=cp.noop}};Sv.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},lF.setConvert(e._mockAxis,r)};PIe.exports=LIe});var DIe=ye((Cgr,RIe)=>{"use strict";RIe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var OX=ye((Lgr,FIe)=>{"use strict";var N8t=ka(),xs=Rd(),qX=Ao().extendFlat,U8t=mc().overrideAll;FIe.exports=U8t({visible:xs.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:N8t.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:xs.color,categoryorder:xs.categoryorder,categoryarray:xs.categoryarray,title:{text:xs.title.text,font:xs.title.font},type:qX({},xs.type,{values:["-","linear","log","date","category"]}),autotypenumbers:xs.autotypenumbers,autorange:xs.autorange,autorangeoptions:{minallowed:xs.autorangeoptions.minallowed,maxallowed:xs.autorangeoptions.maxallowed,clipmin:xs.autorangeoptions.clipmin,clipmax:xs.autorangeoptions.clipmax,include:xs.autorangeoptions.include,editType:"plot"},rangemode:xs.rangemode,minallowed:xs.minallowed,maxallowed:xs.maxallowed,range:qX({},xs.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:xs.minor.tickmode,nticks:xs.nticks,tick0:xs.tick0,dtick:xs.dtick,tickvals:xs.tickvals,ticktext:xs.ticktext,ticks:xs.ticks,mirror:xs.mirror,ticklen:xs.ticklen,tickwidth:xs.tickwidth,tickcolor:xs.tickcolor,showticklabels:xs.showticklabels,labelalias:xs.labelalias,tickfont:xs.tickfont,tickangle:xs.tickangle,tickprefix:xs.tickprefix,showtickprefix:xs.showtickprefix,ticksuffix:xs.ticksuffix,showticksuffix:xs.showticksuffix,showexponent:xs.showexponent,exponentformat:xs.exponentformat,minexponent:xs.minexponent,separatethousands:xs.separatethousands,tickformat:xs.tickformat,tickformatstops:xs.tickformatstops,hoverformat:xs.hoverformat,showline:xs.showline,linecolor:xs.linecolor,linewidth:xs.linewidth,showgrid:xs.showgrid,gridcolor:qX({},xs.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:xs.gridwidth,zeroline:xs.zeroline,zerolinecolor:xs.zerolinecolor,zerolinewidth:xs.zerolinewidth},"plot","from-root")});var VX=ye((Pgr,zIe)=>{"use strict";var BX=OX(),V8t=Cc().attributes,NX=Ao().extendFlat,G8t=Pr().counterRegex;function UX(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}zIe.exports={_arrayAttrRegexps:[G8t("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:NX(UX(0,0,1),{}),center:NX(UX(0,0,0),{}),eye:NX(UX(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:V8t({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:BX,yaxis:BX,zaxis:BX,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}});var NIe=ye((Igr,BIe)=>{"use strict";var H8t=fd().mix,qIe=Pr(),j8t=vl(),W8t=OX(),X8t=PU(),Z8t=f4(),OIe=["xaxis","yaxis","zaxis"],Y8t=100*136/187;BIe.exports=function(t,r,n){var i,a;function o(u,c){return qIe.coerce(i,a,W8t,u,c)}for(var s=0;s<OIe.length;s++){var l=OIe[s];i=t[l]||{},a=j8t.newContainer(r,l),a._id=l[0]+n.scene,a._name=l,X8t(i,a,o,n),Z8t(i,a,o,{font:n.font,letter:l[0],data:n.data,showGrid:!0,noAutotickangles:!0,noMinorloglabels:!0,noTicklabelindex:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,noInsiderange:!0,noUnifiedhovertitle:!0,bgColor:n.bgColor,calendar:n.calendar},n.fullLayout),o("gridcolor",H8t(a.color,n.bgColor,Y8t).toRgbString()),o("title.text",l[0]),a.setScale=qIe.noop,o("showspikes")&&(o("spikesides"),o("spikethickness"),o("spikecolor",a.color)),o("showaxeslabels"),o("showbackground")&&o("backgroundcolor")}}});var HIe=ye((Rgr,GIe)=>{"use strict";var K8t=Pr(),J8t=ka(),$8t=Oa(),Q8t=q_(),eRt=NIe(),UIe=VX(),tRt=Id().getSubplotData,VIe="gl3d";GIe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=K8t.validate(t[o],UIe[o]);if(s)return t[o]}}Q8t(t,r,n,{type:VIe,attributes:UIe,handleDefaults:rRt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function rRt(e,t,r,n){for(var i=r("bgcolor"),a=J8t.combine(i,n.paper_bgcolor),o=["up","center","eye"],s=0;s<o.length;s++)r("camera."+o[s]+".x"),r("camera."+o[s]+".y"),r("camera."+o[s]+".z");r("camera.projection.type");var l=!!r("aspectratio.x")&&!!r("aspectratio.y")&&!!r("aspectratio.z"),u=l?"manual":"auto",c=r("aspectmode",u);l||(e.aspectratio=t.aspectratio={x:1,y:1,z:1},c==="manual"&&(t.aspectmode="auto"),e.aspectmode=t.aspectmode);var f=tRt(n.fullData,VIe,n.id);eRt(e,t,{font:n.font,scene:n.id,data:f,bgColor:a,calendar:n.calendar,autotypenumbersDflt:n.autotypenumbersDflt,fullLayout:n.fullLayout}),$8t.getComponentMethod("annotations3d","handleDefaults")(e,t,n);var h=n.getDfltFromLayout("dragmode");if(h!==!1&&!h)if(h="orbit",e.camera&&e.camera.up){var d=e.camera.up.x,v=e.camera.up.y,m=e.camera.up.z;m!==0&&(!d||!v||!m||m/Math.sqrt(d*d+v*v+m*m)>.999)&&(h="turntable")}else h="turntable";r("dragmode",h),r("hovermode",n.getDfltFromLayout("hovermode"))}});var sx=ye(fp=>{"use strict";var iRt=mc().overrideAll,nRt=W1(),aRt=IIe(),oRt=Id().getSubplotData,sRt=Pr(),lRt=Wp(),ZA="gl3d",GX="scene";fp.name=ZA;fp.attr=GX;fp.idRoot=GX;fp.idRegex=fp.attrRegex=sRt.counterRegex("scene");fp.attributes=DIe();fp.layoutAttributes=VX();fp.baseLayoutAttrOverrides=iRt({hoverlabel:nRt.hoverlabel},"plot","nested");fp.supplyLayoutDefaults=HIe();fp.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[ZA],a=0;a<i.length;a++){var o=i[a],s=oRt(n,ZA,o),l=r[o],u=l.camera,c=l._scene;c||(c=new aRt({id:o,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:u},r),l._scene=c),c.viewInitial||(c.viewInitial={up:{x:u.up.x,y:u.up.y,z:u.up.z},eye:{x:u.eye.x,y:u.eye.y,z:u.eye.z},center:{x:u.center.x,y:u.center.y,z:u.center.z}}),c.plot(s,r,t.layout)}};fp.clean=function(e,t,r,n){for(var i=n._subplots[ZA]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(".annotation-"+o).remove())}};fp.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[ZA],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._scene,l=s.toImage("png"),u=t._glimages.append("svg:image");u.attr({xmlns:lRt.svg,"xlink:href":l,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:"none"}),s.destroy()}};fp.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var r=t.slice(5);return r==="1"&&(r=""),GX+r}};fp.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[ZA],n=0;n<r.length;n++){var i=t[r[n]]._scene;i.updateFx(t.dragmode,t.hovermode)}}});var WIe=ye((Fgr,jIe)=>{"use strict";jIe.exports={plot:tIe(),attributes:DX(),markerSymbols:iF(),supplyDefaults:lIe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:cIe(),moduleType:"trace",name:"scatter3d",basePlotModule:sx(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var ZIe=ye((zgr,XIe)=>{"use strict";XIe.exports=WIe()});var ak=ye((qgr,JIe)=>{"use strict";var YIe=ka(),uRt=Tu(),HX=df().axisHoverFormat,{hovertemplateAttrs:cRt,templatefallbackAttrs:fRt}=Ll(),KIe=Gl(),jX=Ao().extendFlat,hRt=mc().overrideAll;function WX(e){return{valType:"boolean",dflt:!1}}function XX(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:WX("x"),y:WX("y"),z:WX("z")},color:{valType:"color",dflt:YIe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:YIe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var ZX=JIe.exports=hRt(jX({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:cRt(),hovertemplatefallback:fRt(),xhoverformat:HX("x"),yhoverformat:HX("y"),zhoverformat:HX("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},uRt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:XX("x"),y:XX("y"),z:XX("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:jX({},KIe.hoverinfo),showlegend:jX({},KIe.showlegend,{dflt:!1})}),"calc","nested");ZX.x.editType=ZX.y.editType=ZX.z.editType="calc+clearAxisTypes"});var KX=ye((Ogr,e8e)=>{"use strict";var dRt=Oa(),$Ie=Pr(),vRt=td(),pRt=ak(),YX=.1;function gRt(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 mRt(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 yRt(e,t,r,n){var i,a;function o(b,p){return $Ie.coerce(e,t,pRt,b,p)}var s=o("x"),l=o("y"),u=o("z");if(!u||!u.length||s&&s.length<1||l&&l.length<1){t.visible=!1;return}t._xlength=Array.isArray(s)&&$Ie.isArrayOrTypedArray(s[0])?u.length:u[0].length,t._ylength=u.length;var c=dRt.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],n),o("text"),o("hovertext"),o("hovertemplate"),o("hovertemplatefallback"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(b){o(b)});var f=o("surfacecolor"),h=["x","y","z"];for(i=0;i<3;++i){var d="contours."+h[i],v=o(d+".show"),m=o(d+".highlight");if(v||m)for(a=0;a<3;++a)o(d+".project."+h[a]);v&&(o(d+".color"),o(d+".width"),o(d+".usecolormap")),m&&(o(d+".highlightcolor"),o(d+".highlightwidth")),o(d+".start"),o(d+".end"),o(d+".size")}vRt(e,t,n,o,{prefix:"",cLetter:"c"}),QIe(e,t,n,o),t._length=null}function QIe(e,t,r,n){var i=n("opacityscale");i==="max"?t.opacityscale=[[0,YX],[1,1]]:i==="min"?t.opacityscale=[[0,1],[1,YX]]:i==="extremes"?t.opacityscale=gRt(1,YX):mRt(i)||(t.opacityscale=void 0)}e8e.exports={supplyDefaults:yRt,opacityscaleDefaults:QIe}});var i8e=ye((Bgr,r8e)=>{"use strict";var t8e=gv();r8e.exports=function(t,r){r.surfacecolor?t8e(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):t8e(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var u8e=ye((Ngr,l8e)=>{"use strict";var _Rt=zd().gl_surface3d,YA=zd().ndarray,xRt=zd().ndarray_linear_interpolate.d2,bRt=c8(),wRt=f8(),ok=Pr().isArrayOrTypedArray,TRt=a1().parseColorScale,n8e=n1(),ARt=tc().extractOpts;function o8e(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var em=o8e.prototype;em.getXat=function(e,t,r,n){var i=ok(this.data.x)?ok(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};em.getYat=function(e,t,r,n){var i=ok(this.data.y)?ok(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};em.getZat=function(e,t,r,n){var i=this.data.z[t][e];return i===null&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),r===void 0?i:n.d2l(i,0,r)};em.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,i],e.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],e.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];o!=null&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return ok(s)&&s[i]&&s[i][n]!==void 0?e.textLabel=s[i][n]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function SRt(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 KA=[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 MRt(e,t){if(e<t)return 0;for(var r=0;Math.floor(e%t)===0;)e/=t,r++;return r}function JX(e){for(var t=[],r=0;r<KA.length;r++){var n=KA[r];t.push(MRt(e,n))}return t}function ERt(e){for(var t=JX(e),r=e,n=0;n<KA.length;n++)if(t[n]>0){r=KA[n];break}return r}function kRt(e,t){if(!(e<1||t<1)){for(var r=JX(e),n=JX(t),i=1,a=0;a<KA.length;a++)i*=Math.pow(KA[a],Math.max(r[a],n[a]));return i}}function CRt(e){if(e.length!==0){for(var t=1,r=0;r<e.length;r++)t=kRt(t,e[r]);return t}}em.calcXnums=function(e){var t,r=[];for(t=1;t<e;t++){var n=this.getXat(t-1,0),i=this.getXat(t,0);i!==n&&n!==void 0&&n!==null&&i!==void 0&&i!==null?r[t-1]=Math.abs(i-n):r[t-1]=0}var a=0;for(t=1;t<e;t++)a+=r[t-1];for(t=1;t<e;t++)r[t-1]===0?r[t-1]=1:r[t-1]=Math.round(a/r[t-1]);return r};em.calcYnums=function(e){var t,r=[];for(t=1;t<e;t++){var n=this.getYat(0,t-1),i=this.getYat(0,t);i!==n&&n!==void 0&&n!==null&&i!==void 0&&i!==null?r[t-1]=Math.abs(i-n):r[t-1]=0}var a=0;for(t=1;t<e;t++)a+=r[t-1];for(t=1;t<e;t++)r[t-1]===0?r[t-1]=1:r[t-1]=Math.round(a/r[t-1]);return r};var s8e=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],a8e=s8e[9],uF=s8e[13];em.estimateScale=function(e,t){for(var r=t===0?this.calcXnums(e):this.calcYnums(e),n=1+CRt(r);n<a8e;)n*=2;for(;n>uF;)n--,n/=ERt(n),n++,n<a8e&&(n=uF);var i=Math.round(n/e);return i>1?i:1};function LRt(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 PRt(e,t,r){return IRt(e,t,LRt,r),e}function IRt(e,t,r,n){for(var i=[0,0],a=e.shape[0],o=e.shape[1],s=0;s<a;s++)for(var l=0;l<o;l++)r(i,[s,l],n),e.set(s,l,xRt(t,i[0],i[1]));return e}em.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,n=e[0].shape[0],i=e[0].shape[1],a=Math.floor(e[0].shape[0]*t+1)|0,o=Math.floor(e[0].shape[1]*r+1)|0,s=1+n+1,l=1+i+1,u=YA(new Float32Array(s*l),[s,l]),c=[1/t,0,0,0,1/r,0,0,0,1],f=0;f<e.length;++f){this.surface.padField(u,e[f]);var h=YA(new Float32Array(a*o),[a,o]);PRt(h,u,c),e[f]=h}};function RRt(e,t){for(var r=!1,n=0;n<e.length;n++)if(t===e[n]){r=!0;break}r===!1&&e.push(t)}em.setContourLevels=function(){var e=[[],[],[]],t=[!1,!1,!1],r=!1,n,i,a;for(n=0;n<3;++n)if(this.showContour[n]&&(r=!0,this.contourSize[n]>0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,i=this.contourStart[n];i<this.contourEnd[n];i+=this.contourSize[n])a=i*this.scene.dataScale[n],RRt(e[n],a);if(r){var o=[[],[],[]];for(n=0;n<3;++n)this.showContour[n]&&(o[n]=t[n]?e[n]:this.scene.contourLevels[n]);this.surface.update({levels:o})}};em.update=function(e){var t=this.scene,r=t.fullSceneLayout,n=this.surface,i=TRt(e),a=t.dataScale,o=e.z[0].length,s=e._ylength,l=t.contourLevels;this.data=e;var u,c,f,h,d=[];for(u=0;u<3;u++)for(d[u]=[],c=0;c<o;c++)d[u][c]=[];for(c=0;c<o;c++)for(f=0;f<s;f++)d[0][c][f]=this.getXat(c,f,e.xcalendar,r.xaxis),d[1][c][f]=this.getYat(c,f,e.ycalendar,r.yaxis),d[2][c][f]=this.getZat(c,f,e.zcalendar,r.zaxis);if(e.connectgaps)for(e._emptypoints=wRt(d[2]),bRt(d[2],e._emptypoints),e._interpolatedZ=[],c=0;c<o;c++)for(e._interpolatedZ[c]=[],f=0;f<s;f++)e._interpolatedZ[c][f]=d[2][c][f];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h==null?d[u][c][f]=NaN:h=d[u][c][f]*=a[u];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h!=null&&(this.minValues[u]>h&&(this.minValues[u]=h),this.maxValues[u]<h&&(this.maxValues[u]=h));for(u=0;u<3;u++)this.objectOffset[u]=.5*(this.minValues[u]+this.maxValues[u]);for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h!=null&&(d[u][c][f]-=this.objectOffset[u]);var v=[YA(new Float32Array(o*s),[o,s]),YA(new Float32Array(o*s),[o,s]),YA(new Float32Array(o*s),[o,s])];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)v[u].set(c,f,d[u][c][f]);d=[];var m={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=ARt(e);if(m.intensityBounds=[b.min,b.max],e.surfacecolor){var p=YA(new Float32Array(o*s),[o,s]);for(c=0;c<o;c++)for(f=0;f<s;f++)p.set(c,f,e.surfacecolor[f][c]);v.push(p)}else m.intensityBounds[0]*=a[2],m.intensityBounds[1]*=a[2];(uF<v[0].shape[0]||uF<v[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(v[0].shape[0],0),this.dataScaleY=this.estimateScale(v[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(v)),e.surfacecolor&&(m.intensity=v.pop());var k=[!0,!0,!0],M=["x","y","z"];for(u=0;u<3;++u){var T=e.contours[M[u]];k[u]=T.highlight,m.showContour[u]=T.show||T.highlight,m.showContour[u]&&(m.contourProject[u]=[T.project.x,T.project.y,T.project.z],T.show?(this.showContour[u]=!0,m.levels[u]=l[u],n.highlightColor[u]=m.contourColor[u]=n8e(T.color),T.usecolormap?n.highlightTint[u]=m.contourTint[u]=0:n.highlightTint[u]=m.contourTint[u]=1,m.contourWidth[u]=T.width,this.contourStart[u]=T.start,this.contourEnd[u]=T.end,this.contourSize[u]=T.size):(this.showContour[u]=!1,this.contourStart[u]=null,this.contourEnd[u]=null,this.contourSize[u]=0),T.highlight&&(m.dynamicColor[u]=n8e(T.highlightcolor),m.dynamicWidth[u]=T.highlightwidth))}SRt(i)&&(m.vertexColor=!0),m.objectOffset=this.objectOffset,m.coords=v,n.update(m),n.visible=e.visible,n.enableDynamic=k,n.enableHighlight=k,n.snapToData=!0,"lighting"in e&&(n.ambientLight=e.lighting.ambient,n.diffuseLight=e.lighting.diffuse,n.specularLight=e.lighting.specular,n.roughness=e.lighting.roughness,n.fresnel=e.lighting.fresnel),"lightposition"in e&&(n.lightPosition=[e.lightposition.x,e.lightposition.y,e.lightposition.z])};em.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function DRt(e,t){var r=e.glplot.gl,n=_Rt({gl:r}),i=new o8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}l8e.exports=DRt});var f8e=ye((Ugr,c8e)=>{"use strict";c8e.exports={attributes:ak(),supplyDefaults:KX().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:i8e(),plot:u8e(),moduleType:"trace",name:"surface",basePlotModule:sx(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var d8e=ye((Vgr,h8e)=>{"use strict";h8e.exports=f8e()});var JA=ye((Ggr,p8e)=>{"use strict";var FRt=Tu(),$X=df().axisHoverFormat,{hovertemplateAttrs:zRt,templatefallbackAttrs:qRt}=Ll(),lx=ak(),v8e=Gl(),ux=Ao().extendFlat;p8e.exports=ux({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:zRt({editType:"calc"}),hovertemplatefallback:qRt({editType:"calc"}),xhoverformat:$X("x"),yhoverformat:$X("y"),zhoverformat:$X("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},FRt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:lx.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:ux({},lx.contours.x.show,{}),color:lx.contours.x.color,width:lx.contours.x.width,editType:"calc"},lightposition:{x:ux({},lx.lightposition.x,{dflt:1e5}),y:ux({},lx.lightposition.y,{dflt:1e5}),z:ux({},lx.lightposition.z,{dflt:0}),editType:"calc"},lighting:ux({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},lx.lighting),hoverinfo:ux({},v8e.hoverinfo,{editType:"calc"}),showlegend:ux({},v8e.showlegend,{dflt:!1})})});var fF=ye((Hgr,m8e)=>{"use strict";var ORt=Tu(),cF=df().axisHoverFormat,{hovertemplateAttrs:BRt,templatefallbackAttrs:NRt}=Ll(),sk=JA(),g8e=Gl(),QX=Ao().extendFlat,URt=mc().overrideAll;function eZ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function tZ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var $A=m8e.exports=URt(QX({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:eZ("x"),y:eZ("y"),z:eZ("z")},caps:{x:tZ("x"),y:tZ("y"),z:tZ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:BRt(),hovertemplatefallback:NRt(),xhoverformat:cF("x"),yhoverformat:cF("y"),zhoverformat:cF("z"),valuehoverformat:cF("value",1),showlegend:QX({},g8e.showlegend,{dflt:!1})},ORt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:sk.opacity,lightposition:sk.lightposition,lighting:sk.lighting,flatshading:sk.flatshading,contour:sk.contour,hoverinfo:QX({},g8e.hoverinfo)}),"calc","nested");$A.flatshading.dflt=!0;$A.lighting.facenormalsepsilon.dflt=0;$A.x.editType=$A.y.editType=$A.z.editType=$A.value.editType="calc+clearAxisTypes"});var rZ=ye((jgr,_8e)=>{"use strict";var VRt=Pr(),GRt=Oa(),HRt=fF(),jRt=td();function WRt(e,t,r,n){function i(a,o){return VRt.coerce(e,t,HRt,a,o)}y8e(e,t,r,n,i)}function y8e(e,t,r,n,i){var a=i("isomin"),o=i("isomax");o!=null&&a!==void 0&&a!==null&&a>o&&(t.isomin=null,t.isomax=null);var s=i("x"),l=i("y"),u=i("z"),c=i("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=GRt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(m){i(m+"hoverformat");var b="caps."+m,p=i(b+".show");p&&i(b+".fill");var k="slices."+m,M=i(k+".show");M&&(i(k+".fill"),i(k+".locations"))});var h=i("spaceframe.show");h&&i("spaceframe.fill");var d=i("surface.show");d&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var v=i("contour.show");v&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(m){i(m)}),jRt(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null}_8e.exports={supplyDefaults:WRt,supplyIsoDefaults:y8e}});var hF=ye((Wgr,b8e)=>{"use strict";var nZ=Pr(),XRt=gv();function ZRt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=Jm(t.u,t._len),t._v=Jm(t.v,t._len),t._w=Jm(t.w,t._len),t._x=Jm(t.x,t._len),t._y=Jm(t.y,t._len),t._z=Jm(t.z,t._len);var r=x8e(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,i,a,o;t.starts&&(i=Jm(t.starts.x||[]),a=Jm(t.starts.y||[]),o=Jm(t.starts.z||[]),n=Math.min(i.length,a.length,o.length)),t._startsX=i||[],t._startsY=a||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u<t._len;u++){var c=t._u[u],f=t._v[u],h=t._w[u],d=Math.sqrt(c*c+f*f+h*h);s=Math.max(s,d),l=Math.min(l,d)}for(XRt(e,t,{vals:[l,s],containerStr:"",cLetter:"c"}),u=0;u<n;u++){var v=i[u];r.xMax=Math.max(r.xMax,v),r.xMin=Math.min(r.xMin,v);var m=a[u];r.yMax=Math.max(r.yMax,m),r.yMin=Math.min(r.yMin,m);var b=o[u];r.zMax=Math.max(r.zMax,b),r.zMin=Math.min(r.zMin,b)}t._slen=n,t._normMax=s,t._xbnds=[r.xMin,r.xMax],t._ybnds=[r.yMin,r.yMax],t._zbnds=[r.zMin,r.zMax]}function x8e(e){var t=e._x,r=e._y,n=e._z,i=e._len,a,o,s,l=-1/0,u=1/0,c=-1/0,f=1/0,h=-1/0,d=1/0,v="",m,b,p,k,M,T,L,x,C;for(i&&(k=t[0],T=r[0],x=n[0]),i>1&&(M=t[i-1],L=r[i-1],C=n[i-1]),a=0;a<i;a++)l=Math.max(l,t[a]),u=Math.min(u,t[a]),c=Math.max(c,r[a]),f=Math.min(f,r[a]),h=Math.max(h,n[a]),d=Math.min(d,n[a]),!m&&t[a]!==k&&(m=!0,v+="x"),!b&&r[a]!==T&&(b=!0,v+="y"),!p&&n[a]!==x&&(p=!0,v+="z");m||(v+="x"),b||(v+="y"),p||(v+="z");var S=iZ(e._x),g=iZ(e._y),P=iZ(e._z);v=v.replace("x",(k>M?"-":"+")+"x"),v=v.replace("y",(T>L?"-":"+")+"y"),v=v.replace("z",(x>C?"-":"+")+"z");var E=function(){i=0,S=[],g=[],P=[]};(!i||i<S.length*g.length*P.length)&&E();var z=function(De){return De==="x"?t:De==="y"?r:n},q=function(De){return De==="x"?S:De==="y"?g:P},U=function(De){return De[i-1]<De[0]?-1:1},G=z(v[1]),Z=z(v[3]),j=z(v[5]),N=q(v[1]).length,H=q(v[3]).length,re=q(v[5]).length,oe=!1,_e=function(De,Le,me){return N*(H*De+Le)+me},ke=U(z(v[1])),Ce=U(z(v[3])),ge=U(z(v[5]));for(a=0;a<re-1;a++){for(o=0;o<H-1;o++){for(s=0;s<N-1;s++){var ie=_e(a,o,s),Se=_e(a,o,s+1),Ee=_e(a,o+1,s),we=_e(a+1,o,s);if((!(G[ie]*ke<G[Se]*ke)||!(Z[ie]*Ce<Z[Ee]*Ce)||!(j[ie]*ge<j[we]*ge))&&(oe=!0),oe)break}if(oe)break}if(oe)break}return oe&&(nZ.warn("Encountered arbitrary coordinates! Unable to input data grid."),E()),{xMin:u,yMin:f,zMin:d,xMax:l,yMax:c,zMax:h,Xs:S,Ys:g,Zs:P,len:i,fill:v}}function iZ(e){return nZ.distinctVals(e).vals}function Jm(e,t){if(t===void 0&&(t=e.length),nZ.isTypedArray(e))return e.subarray(0,t);for(var r=[],n=0;n<t;n++)r[n]=+e[n];return r}b8e.exports={calc:ZRt,filter:Jm,processGrid:x8e}});var aZ=ye((Xgr,w8e)=>{"use strict";var YRt=gv(),KRt=hF().processGrid,dF=hF().filter;w8e.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=dF(r.x,r._len),r._y=dF(r.y,r._len),r._z=dF(r.z,r._len),r._value=dF(r.value,r._len);var n=KRt(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,YRt(t,r,{vals:[r._vMin,r._vMax],containerStr:"",cLetter:"c"})}});var QA=ye((Zgr,T8e)=>{"use strict";T8e.exports=function(t,r,n,i){i=i||t.length;for(var a=new Array(i),o=0;o<i;o++)a[o]=[t[o],r[o],n[o]];return a}});var vF=ye((Ygr,E8e)=>{"use strict";var JRt=zd().gl_mesh3d,$Rt=a1().parseColorScale,QRt=Pr().isArrayOrTypedArray,eDt=n1(),tDt=tc().extractOpts,A8e=QA(),lk=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n<e&&e<=i)return{id:r,distRatio:(i-e)/(i-n)}}return{id:0,distRatio:0}};function S8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var oZ=S8e.prototype;oZ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=lk(r,this.data._Xs).id,l=lk(n,this.data._Ys).id,u=lk(i,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return QRt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};oZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=M8e(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=A8e(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=A8e(e._meshI,e._meshJ,e._meshK),o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:eDt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=tDt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=$Rt(e),this.mesh.update(o)};oZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var rDt=["xyz","xzy","yxz","yzx","zxy","zyx"];function M8e(e){e._meshI=[],e._meshJ=[],e._meshK=[];var t=e.surface.show,r=e.spaceframe.show,n=e.surface.fill,i=e.spaceframe.fill,a=!1,o=!1,s=0,l,u,c=e._Xs,f=e._Ys,h=e._Zs,d=c.length,v=f.length,m=h.length,b=rDt.indexOf(e._gridFill.replace(/-/g,"").replace(/\+/g,"")),p=function(St,Tt,dt){switch(b){case 5:return dt+m*Tt+m*v*St;case 4:return dt+m*St+m*d*Tt;case 3:return Tt+v*dt+v*m*St;case 2:return Tt+v*St+v*d*dt;case 1:return St+d*dt+d*m*Tt;default:return St+d*Tt+d*v*dt}},k=e._minValues,M=e._maxValues,T=e._vMin,L=e._vMax,x,C,S,g;function P(St,Tt,dt){for(var Et=g.length,pt=u;pt<Et;pt++)if(St===x[pt]&&Tt===C[pt]&&dt===S[pt])return pt;return-1}function E(){u=l}function z(){x=[],C=[],S=[],g=[],l=0,E()}function q(St,Tt,dt,Et){return x.push(St),C.push(Tt),S.push(dt),g.push(Et),l++,l-1}function U(St,Tt,dt){return e._meshI.push(St),e._meshJ.push(Tt),e._meshK.push(dt),s++,s-1}function G(St,Tt,dt){for(var Et=[],pt=0;pt<St.length;pt++)Et[pt]=(St[pt]+Tt[pt]+dt[pt])/3;return Et}function Z(St,Tt,dt){for(var Et=[],pt=0;pt<St.length;pt++)Et[pt]=St[pt]*(1-dt)+dt*Tt[pt];return Et}var j;function N(St){j=St}function H(St,Tt){var dt=St[0],Et=St[1],pt=St[2],Xt=G(dt,Et,pt),or=Math.sqrt(1-j),_r=Z(Xt,dt,or),Er=Z(Xt,Et,or),ei=Z(Xt,pt,or),qr=Tt[0],jr=Tt[1],gt=Tt[2];return{xyzv:[[dt,Et,Er],[Er,_r,dt],[Et,pt,ei],[ei,Er,Et],[pt,dt,_r],[_r,ei,pt]],abc:[[qr,jr,-1],[-1,-1,qr],[jr,gt,-1],[-1,-1,jr],[gt,qr,-1],[-1,-1,gt]]}}function re(St,Tt){return St==="all"||St===null?!0:St.indexOf(Tt)>-1}function oe(St,Tt){return St===null?Tt:St}function _e(St,Tt,dt){E();var Et=[Tt],pt=[dt];if(j>=1)Et=[Tt],pt=[dt];else if(j>0){var Xt=H(Tt,dt);Et=Xt.xyzv,pt=Xt.abc}for(var or=0;or<Et.length;or++){Tt=Et[or],dt=pt[or];for(var _r=[],Er=0;Er<3;Er++){var ei=Tt[Er][0],qr=Tt[Er][1],jr=Tt[Er][2],gt=Tt[Er][3],Ge=dt[Er]>-1?dt[Er]:P(ei,qr,jr);Ge>-1?_r[Er]=Ge:_r[Er]=q(ei,qr,jr,oe(St,gt))}U(_r[0],_r[1],_r[2])}}function ke(St,Tt,dt){var Et=function(pt,Xt,or){_e(St,[Tt[pt],Tt[Xt],Tt[or]],[dt[pt],dt[Xt],dt[or]])};Et(0,1,2),Et(2,3,0)}function Ce(St,Tt,dt){var Et=function(pt,Xt,or){_e(St,[Tt[pt],Tt[Xt],Tt[or]],[dt[pt],dt[Xt],dt[or]])};Et(0,1,2),Et(3,0,1),Et(2,3,0),Et(1,2,3)}function ge(St,Tt,dt,Et){var pt=St[3];pt<dt&&(pt=dt),pt>Et&&(pt=Et);for(var Xt=(St[3]-pt)/(St[3]-Tt[3]+1e-9),or=[],_r=0;_r<4;_r++)or[_r]=(1-Xt)*St[_r]+Xt*Tt[_r];return or}function ie(St,Tt,dt){return St>=Tt&&St<=dt}function Se(St){var Tt=.001*(L-T);return St>=T-Tt&&St<=L+Tt}function Ee(St){for(var Tt=[],dt=0;dt<4;dt++){var Et=St[dt];Tt.push([e._x[Et],e._y[Et],e._z[Et],e._value[Et]])}return Tt}var we=3;function De(St,Tt,dt,Et,pt,Xt){Xt||(Xt=1),dt=[-1,-1,-1];var or=!1,_r=[ie(Tt[0][3],Et,pt),ie(Tt[1][3],Et,pt),ie(Tt[2][3],Et,pt)];if(!_r[0]&&!_r[1]&&!_r[2])return!1;var Er=function(qr,jr,gt){return Se(jr[0][3])&&Se(jr[1][3])&&Se(jr[2][3])?(_e(qr,jr,gt),!0):Xt<we?De(qr,jr,gt,T,L,++Xt):!1};if(_r[0]&&_r[1]&&_r[2])return Er(St,Tt,dt)||or;var ei=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(qr){if(_r[qr[0]]&&_r[qr[1]]&&!_r[qr[2]]){var jr=Tt[qr[0]],gt=Tt[qr[1]],Ge=Tt[qr[2]],Je=ge(Ge,jr,Et,pt),We=ge(Ge,gt,Et,pt);or=Er(St,[We,Je,jr],[-1,-1,dt[qr[0]]])||or,or=Er(St,[jr,gt,We],[dt[qr[0]],dt[qr[1]],-1])||or,ei=!0}}),ei||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(qr){if(_r[qr[0]]&&!_r[qr[1]]&&!_r[qr[2]]){var jr=Tt[qr[0]],gt=Tt[qr[1]],Ge=Tt[qr[2]],Je=ge(gt,jr,Et,pt),We=ge(Ge,jr,Et,pt);or=Er(St,[We,Je,jr],[-1,-1,dt[qr[0]]])||or,ei=!0}}),or}function Le(St,Tt,dt,Et){var pt=!1,Xt=Ee(Tt),or=[ie(Xt[0][3],dt,Et),ie(Xt[1][3],dt,Et),ie(Xt[2][3],dt,Et),ie(Xt[3][3],dt,Et)];if(!or[0]&&!or[1]&&!or[2]&&!or[3])return pt;if(or[0]&&or[1]&&or[2]&&or[3])return o&&(pt=Ce(St,Xt,Tt)||pt),pt;var _r=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(Er){if(or[Er[0]]&&or[Er[1]]&&or[Er[2]]&&!or[Er[3]]){var ei=Xt[Er[0]],qr=Xt[Er[1]],jr=Xt[Er[2]],gt=Xt[Er[3]];if(o)pt=_e(St,[ei,qr,jr],[Tt[Er[0]],Tt[Er[1]],Tt[Er[2]]])||pt;else{var Ge=ge(gt,ei,dt,Et),Je=ge(gt,qr,dt,Et),We=ge(gt,jr,dt,Et);pt=_e(null,[Ge,Je,We],[-1,-1,-1])||pt}_r=!0}}),_r||([[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(Er){if(or[Er[0]]&&or[Er[1]]&&!or[Er[2]]&&!or[Er[3]]){var ei=Xt[Er[0]],qr=Xt[Er[1]],jr=Xt[Er[2]],gt=Xt[Er[3]],Ge=ge(jr,ei,dt,Et),Je=ge(jr,qr,dt,Et),We=ge(gt,qr,dt,Et),et=ge(gt,ei,dt,Et);o?(pt=_e(St,[ei,et,Ge],[Tt[Er[0]],-1,-1])||pt,pt=_e(St,[qr,Je,We],[Tt[Er[1]],-1,-1])||pt):pt=ke(null,[Ge,Je,We,et],[-1,-1,-1,-1])||pt,_r=!0}}),_r)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(Er){if(or[Er[0]]&&!or[Er[1]]&&!or[Er[2]]&&!or[Er[3]]){var ei=Xt[Er[0]],qr=Xt[Er[1]],jr=Xt[Er[2]],gt=Xt[Er[3]],Ge=ge(qr,ei,dt,Et),Je=ge(jr,ei,dt,Et),We=ge(gt,ei,dt,Et);o?(pt=_e(St,[ei,Ge,Je],[Tt[Er[0]],-1,-1])||pt,pt=_e(St,[ei,Je,We],[Tt[Er[0]],-1,-1])||pt,pt=_e(St,[ei,We,Ge],[Tt[Er[0]],-1,-1])||pt):pt=_e(null,[Ge,Je,We],[-1,-1,-1])||pt,_r=!0}}),pt}function me(St,Tt,dt,Et,pt,Xt,or,_r,Er,ei,qr){var jr=!1;return a&&(re(St,"A")&&(jr=Le(null,[Tt,dt,Et,Xt],ei,qr)||jr),re(St,"B")&&(jr=Le(null,[dt,Et,pt,Er],ei,qr)||jr),re(St,"C")&&(jr=Le(null,[dt,Xt,or,Er],ei,qr)||jr),re(St,"D")&&(jr=Le(null,[Et,Xt,_r,Er],ei,qr)||jr),re(St,"E")&&(jr=Le(null,[dt,Et,Xt,Er],ei,qr)||jr)),o&&(jr=Le(St,[dt,Et,Xt,Er],ei,qr)||jr),jr}function Pe(St,Tt,dt,Et,pt,Xt,or,_r){return[_r[0]===!0?!0:De(St,Ee([Tt,dt,Et]),[Tt,dt,Et],Xt,or),_r[1]===!0?!0:De(St,Ee([Et,pt,Tt]),[Et,pt,Tt],Xt,or)]}function ce(St,Tt,dt,Et,pt,Xt,or,_r,Er){return _r?Pe(St,Tt,dt,pt,Et,Xt,or,Er):Pe(St,dt,pt,Et,Tt,Xt,or,Er)}function He(St,Tt,dt,Et,pt,Xt,or){var _r=!1,Er,ei,qr,jr,gt=function(){_r=De(St,[Er,ei,qr],[-1,-1,-1],pt,Xt)||_r,_r=De(St,[qr,jr,Er],[-1,-1,-1],pt,Xt)||_r},Ge=or[0],Je=or[1],We=or[2];return Ge&&(Er=Z(Ee([p(Tt,dt-0,Et-0)])[0],Ee([p(Tt-1,dt-0,Et-0)])[0],Ge),ei=Z(Ee([p(Tt,dt-0,Et-1)])[0],Ee([p(Tt-1,dt-0,Et-1)])[0],Ge),qr=Z(Ee([p(Tt,dt-1,Et-1)])[0],Ee([p(Tt-1,dt-1,Et-1)])[0],Ge),jr=Z(Ee([p(Tt,dt-1,Et-0)])[0],Ee([p(Tt-1,dt-1,Et-0)])[0],Ge),gt()),Je&&(Er=Z(Ee([p(Tt-0,dt,Et-0)])[0],Ee([p(Tt-0,dt-1,Et-0)])[0],Je),ei=Z(Ee([p(Tt-0,dt,Et-1)])[0],Ee([p(Tt-0,dt-1,Et-1)])[0],Je),qr=Z(Ee([p(Tt-1,dt,Et-1)])[0],Ee([p(Tt-1,dt-1,Et-1)])[0],Je),jr=Z(Ee([p(Tt-1,dt,Et-0)])[0],Ee([p(Tt-1,dt-1,Et-0)])[0],Je),gt()),We&&(Er=Z(Ee([p(Tt-0,dt-0,Et)])[0],Ee([p(Tt-0,dt-0,Et-1)])[0],We),ei=Z(Ee([p(Tt-0,dt-1,Et)])[0],Ee([p(Tt-0,dt-1,Et-1)])[0],We),qr=Z(Ee([p(Tt-1,dt-1,Et)])[0],Ee([p(Tt-1,dt-1,Et-1)])[0],We),jr=Z(Ee([p(Tt-1,dt-0,Et)])[0],Ee([p(Tt-1,dt-0,Et-1)])[0],We),gt()),_r}function lt(St,Tt,dt,Et,pt,Xt,or,_r,Er,ei,qr,jr){var gt=St;return jr?(a&&St==="even"&&(gt=null),me(gt,Tt,dt,Et,pt,Xt,or,_r,Er,ei,qr)):(a&&St==="odd"&&(gt=null),me(gt,Er,_r,or,Xt,pt,Et,dt,Tt,ei,qr))}function mt(St,Tt,dt,Et,pt){for(var Xt=[],or=0,_r=0;_r<Tt.length;_r++)for(var Er=Tt[_r],ei=1;ei<m;ei++)for(var qr=1;qr<v;qr++)Xt.push(ce(St,p(Er,qr-1,ei-1),p(Er,qr-1,ei),p(Er,qr,ei-1),p(Er,qr,ei),dt,Et,(Er+qr+ei)%2,pt&&pt[or]?pt[or]:[])),or++;return Xt}function Vt(St,Tt,dt,Et,pt){for(var Xt=[],or=0,_r=0;_r<Tt.length;_r++)for(var Er=Tt[_r],ei=1;ei<d;ei++)for(var qr=1;qr<m;qr++)Xt.push(ce(St,p(ei-1,Er,qr-1),p(ei,Er,qr-1),p(ei-1,Er,qr),p(ei,Er,qr),dt,Et,(ei+Er+qr)%2,pt&&pt[or]?pt[or]:[])),or++;return Xt}function st(St,Tt,dt,Et,pt){for(var Xt=[],or=0,_r=0;_r<Tt.length;_r++)for(var Er=Tt[_r],ei=1;ei<v;ei++)for(var qr=1;qr<d;qr++)Xt.push(ce(St,p(qr-1,ei-1,Er),p(qr-1,ei,Er),p(qr,ei-1,Er),p(qr,ei,Er),dt,Et,(qr+ei+Er)%2,pt&&pt[or]?pt[or]:[])),or++;return Xt}function ct(St,Tt,dt){for(var Et=1;Et<m;Et++)for(var pt=1;pt<v;pt++)for(var Xt=1;Xt<d;Xt++)lt(St,p(Xt-1,pt-1,Et-1),p(Xt-1,pt-1,Et),p(Xt-1,pt,Et-1),p(Xt-1,pt,Et),p(Xt,pt-1,Et-1),p(Xt,pt-1,Et),p(Xt,pt,Et-1),p(Xt,pt,Et),Tt,dt,(Xt+pt+Et)%2)}function Qt(St,Tt,dt){o=!0,ct(St,Tt,dt),o=!1}function Ht(St,Tt,dt){a=!0,ct(St,Tt,dt),a=!1}function nr(St,Tt,dt,Et,pt,Xt){for(var or=[],_r=0,Er=0;Er<Tt.length;Er++)for(var ei=Tt[Er],qr=1;qr<m;qr++)for(var jr=1;jr<v;jr++)or.push(He(St,ei,jr,qr,dt,Et,pt[Er],Xt&&Xt[_r]?Xt[_r]:[])),_r++;return or}function tt(St,Tt,dt,Et,pt,Xt){for(var or=[],_r=0,Er=0;Er<Tt.length;Er++)for(var ei=Tt[Er],qr=1;qr<d;qr++)for(var jr=1;jr<m;jr++)or.push(He(St,qr,ei,jr,dt,Et,pt[Er],Xt&&Xt[_r]?Xt[_r]:[])),_r++;return or}function je(St,Tt,dt,Et,pt,Xt){for(var or=[],_r=0,Er=0;Er<Tt.length;Er++)for(var ei=Tt[Er],qr=1;qr<v;qr++)for(var jr=1;jr<d;jr++)or.push(He(St,jr,qr,ei,dt,Et,pt[Er],Xt&&Xt[_r]?Xt[_r]:[])),_r++;return or}function Ue(St,Tt){for(var dt=[],Et=St;Et<Tt;Et++)dt.push(Et);return dt}function Ae(){for(var St=0;St<d;St++)for(var Tt=0;Tt<v;Tt++)for(var dt=0;dt<m;dt++){var Et=p(St,Tt,dt);q(e._x[Et],e._y[Et],e._z[Et],e._value[Et])}}function rt(){z(),Ae();var St=null;if(r&&i&&(N(i),Qt(St,T,L)),t&&n){N(n);for(var Tt=e.surface.pattern,dt=e.surface.count,Et=0;Et<dt;Et++){var pt=dt===1?.5:Et/(dt-1),Xt=(1-pt)*T+pt*L,or=Math.abs(Xt-k),_r=Math.abs(Xt-M),Er=or>_r?[k,Xt]:[Xt,M];Ht(Tt,Er[0],Er[1])}}var ei=[[Math.min(T,M),Math.max(T,M)],[Math.min(k,L),Math.max(k,L)]];["x","y","z"].forEach(function(qr){for(var jr=[],gt=0;gt<ei.length;gt++){var Ge=0,Je=ei[gt][0],We=ei[gt][1],et=e.slices[qr];if(et.show&&et.fill){N(et.fill);var xt=[],At=[],Kt=[];if(et.locations.length)for(var er=0;er<et.locations.length;er++){var Sr=lk(et.locations[er],qr==="x"?c:qr==="y"?f:h);Sr.distRatio===0?xt.push(Sr.id):Sr.id>0&&(At.push(Sr.id),qr==="x"?Kt.push([Sr.distRatio,0,0]):qr==="y"?Kt.push([0,Sr.distRatio,0]):Kt.push([0,0,Sr.distRatio]))}else qr==="x"?xt=Ue(1,d-1):qr==="y"?xt=Ue(1,v-1):xt=Ue(1,m-1);At.length>0&&(qr==="x"?jr[Ge]=nr(St,At,Je,We,Kt,jr[Ge]):qr==="y"?jr[Ge]=tt(St,At,Je,We,Kt,jr[Ge]):jr[Ge]=je(St,At,Je,We,Kt,jr[Ge]),Ge++),xt.length>0&&(qr==="x"?jr[Ge]=mt(St,xt,Je,We,jr[Ge]):qr==="y"?jr[Ge]=Vt(St,xt,Je,We,jr[Ge]):jr[Ge]=st(St,xt,Je,We,jr[Ge]),Ge++)}var Gr=e.caps[qr];Gr.show&&Gr.fill&&(N(Gr.fill),qr==="x"?jr[Ge]=mt(St,[0,d-1],Je,We,jr[Ge]):qr==="y"?jr[Ge]=Vt(St,[0,v-1],Je,We,jr[Ge]):jr[Ge]=st(St,[0,m-1],Je,We,jr[Ge]),Ge++)}}),s===0&&z(),e._meshX=x,e._meshY=C,e._meshZ=S,e._meshIntensity=g,e._Xs=c,e._Ys=f,e._Zs=h}return rt(),e}function iDt(e,t){var r=e.glplot.gl,n=JRt({gl:r}),i=new S8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}E8e.exports={findNearestOnAxis:lk,generateIsoMeshes:M8e,createIsosurfaceTrace:iDt}});var C8e=ye((Kgr,k8e)=>{"use strict";k8e.exports={attributes:fF(),supplyDefaults:rZ().supplyDefaults,calc:aZ(),colorbar:{min:"cmin",max:"cmax"},plot:vF().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:sx(),categories:["gl3d","showLegend"],meta:{}}});var P8e=ye((Jgr,L8e)=>{"use strict";L8e.exports=C8e()});var lZ=ye(($gr,R8e)=>{"use strict";var nDt=Tu(),xh=fF(),aDt=ak(),I8e=Gl(),sZ=Ao().extendFlat,oDt=mc().overrideAll,pF=R8e.exports=oDt(sZ({x:xh.x,y:xh.y,z:xh.z,value:xh.value,isomin:xh.isomin,isomax:xh.isomax,surface:xh.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:xh.slices,caps:xh.caps,text:xh.text,hovertext:xh.hovertext,xhoverformat:xh.xhoverformat,yhoverformat:xh.yhoverformat,zhoverformat:xh.zhoverformat,valuehoverformat:xh.valuehoverformat,hovertemplate:xh.hovertemplate,hovertemplatefallback:xh.hovertemplatefallback},nDt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:xh.colorbar,opacity:xh.opacity,opacityscale:aDt.opacityscale,lightposition:xh.lightposition,lighting:xh.lighting,flatshading:xh.flatshading,contour:xh.contour,hoverinfo:sZ({},I8e.hoverinfo),showlegend:sZ({},I8e.showlegend,{dflt:!1})}),"calc","nested");pF.x.editType=pF.y.editType=pF.z.editType=pF.value.editType="calc+clearAxisTypes"});var F8e=ye((Qgr,D8e)=>{"use strict";var sDt=Pr(),lDt=lZ(),uDt=rZ().supplyIsoDefaults,cDt=KX().opacityscaleDefaults;D8e.exports=function(t,r,n,i){function a(o,s){return sDt.coerce(t,r,lDt,o,s)}uDt(t,r,n,i,a),cDt(t,r,i,a)}});var B8e=ye((emr,O8e)=>{"use strict";var fDt=zd().gl_mesh3d,hDt=a1().parseColorScale,dDt=Pr().isArrayOrTypedArray,vDt=n1(),pDt=tc().extractOpts,z8e=QA(),uZ=vF().findNearestOnAxis,gDt=vF().generateIsoMeshes;function q8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var cZ=q8e.prototype;cZ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=uZ(r,this.data._Xs).id,l=uZ(n,this.data._Ys).id,u=uZ(i,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return dDt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};cZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=gDt(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=z8e(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=z8e(e._meshI,e._meshJ,e._meshK),o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:vDt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=pDt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=hDt(e),this.mesh.update(o)};cZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function mDt(e,t){var r=e.glplot.gl,n=fDt({gl:r}),i=new q8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}O8e.exports=mDt});var U8e=ye((tmr,N8e)=>{"use strict";N8e.exports={attributes:lZ(),supplyDefaults:F8e(),calc:aZ(),colorbar:{min:"cmin",max:"cmax"},plot:B8e(),moduleType:"trace",name:"volume",basePlotModule:sx(),categories:["gl3d","showLegend"],meta:{}}});var G8e=ye((rmr,V8e)=>{"use strict";V8e.exports=U8e()});var W8e=ye((imr,j8e)=>{"use strict";var yDt=Oa(),H8e=Pr(),_Dt=td(),xDt=JA();j8e.exports=function(t,r,n,i){function a(c,f){return H8e.coerce(t,r,xDt,c,f)}function o(c){var f=c.map(function(h){var d=a(h);return d&&H8e.isArrayOrTypedArray(d)?d:null});return f.every(function(h){return h&&h.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=yDt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],i),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(c){a(c)});var u=a("contour.show");u&&(a("contour.color"),a("contour.width")),"intensity"in t?(a("intensity"),a("intensitymode"),_Dt(t,r,i,a,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?a("facecolor"):"vertexcolor"in t?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var Z8e=ye((nmr,X8e)=>{"use strict";var bDt=gv();X8e.exports=function(t,r){r.intensity&&bDt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var Q8e=ye((amr,$8e)=>{"use strict";var wDt=zd().gl_mesh3d,TDt=zd().delaunay_triangulate,ADt=zd().alpha_shape,SDt=zd().convex_hull,MDt=a1().parseColorScale,EDt=Pr().isArrayOrTypedArray,vZ=n1(),kDt=tc().extractOpts,Y8e=QA();function J8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var pZ=J8e.prototype;pZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return EDt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function K8e(e){for(var t=[],r=e.length,n=0;n<r;n++)t[n]=vZ(e[n]);return t}function fZ(e,t,r,n){for(var i=[],a=t.length,o=0;o<a;o++)i[o]=e.d2l(t[o],0,n)*r;return i}function hZ(e){for(var t=[],r=e.length,n=0;n<r;n++)t[n]=Math.round(e[n]);return t}function CDt(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 TDt(n)}function dZ(e,t){for(var r=e.length,n=0;n<r;n++)if(e[n]<=-.5||e[n]>=t-.5)return!1;return!0}pZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=Y8e(fZ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),fZ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),fZ(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),a;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!dZ(e.i,n)||!dZ(e.j,n)||!dZ(e.k,n))return;a=Y8e(hZ(e.i),hZ(e.j),hZ(e.k))}else e.alphahull===0?a=SDt(i):e.alphahull>0?a=ADt(e.alphahull,i):a=CDt(e.delaunayaxis,i);var o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:vZ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=kDt(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=MDt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=K8e(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=K8e(e.facecolor)):(this.color=e.color,o.meshColor=vZ(e.color));this.mesh.update(o)};pZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function LDt(e,t){var r=e.glplot.gl,n=wDt({gl:r}),i=new J8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}$8e.exports=LDt});var tRe=ye((omr,eRe)=>{"use strict";eRe.exports={attributes:JA(),supplyDefaults:W8e(),calc:Z8e(),colorbar:{min:"cmin",max:"cmax"},plot:Q8e(),moduleType:"trace",name:"mesh3d",basePlotModule:sx(),categories:["gl3d","showLegend"],meta:{}}});var iRe=ye((smr,rRe)=>{"use strict";rRe.exports=tRe()});var mZ=ye((lmr,aRe)=>{"use strict";var PDt=Tu(),e5=df().axisHoverFormat,{hovertemplateAttrs:IDt,templatefallbackAttrs:RDt}=Ll(),DDt=JA(),nRe=Gl(),gZ=Ao().extendFlat,gF={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:IDt({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:RDt({editType:"calc"}),uhoverformat:e5("u",1),vhoverformat:e5("v",1),whoverformat:e5("w",1),xhoverformat:e5("x"),yhoverformat:e5("y"),zhoverformat:e5("z"),showlegend:gZ({},nRe.showlegend,{dflt:!1})};gZ(gF,PDt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var FDt=["opacity","lightposition","lighting"];FDt.forEach(function(e){gF[e]=DDt[e]});gF.hoverinfo=gZ({},nRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});aRe.exports=gF});var sRe=ye((umr,oRe)=>{"use strict";var zDt=Pr(),qDt=td(),ODt=mZ();oRe.exports=function(t,r,n,i){function a(d,v){return zDt.coerce(t,r,ODt,d,v)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var h=a("sizemode");a("sizeref",h==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),qDt(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var uRe=ye((cmr,lRe)=>{"use strict";var BDt=gv();lRe.exports=function(t,r){for(var n=r.u,i=r.v,a=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,i.length,a.length),s=-1/0,l=1/0,u=0;u<o;u++){var c=n[u],f=i[u],h=a[u],d=Math.sqrt(c*c+f*f+h*h);s=Math.max(s,d),l=Math.min(l,d)}r._len=o,r._normMax=s,BDt(t,r,{vals:[l,s],containerStr:"",cLetter:"c"})}});var vRe=ye((fmr,dRe)=>{"use strict";var NDt=zd().gl_cone3d,UDt=zd().gl_cone3d.createConeMesh,VDt=Pr().simpleMap,GDt=a1().parseColorScale,HDt=tc().extractOpts,jDt=Pr().isArrayOrTypedArray,cRe=QA();function fRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var yZ=fRe.prototype;yZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],i=this.data.z[t],a=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.hovertext||this.data.text;return jDt(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var WDt={xaxis:0,yaxis:1,zaxis:2},XDt={tip:1,tail:0,cm:.25,center:.5},ZDt={tip:1,tail:1,cm:.75,center:.5};function hRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(c,f){var h=r[f],d=n[WDt[f]];return VDt(c,function(v){return h.d2l(v)*d})}i.vectors=cRe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),i.positions=cRe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=HDt(t);i.colormap=GDt(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=XDt[t.anchor];var s=t.sizemode;s==="scaled"?i.coneSize=t.sizeref||.5:s==="absolute"?i.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(i.coneSize=t.sizeref),i.coneSizemode=s;var l=NDt(i),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=ZDt[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}yZ.update=function(e){this.data=e;var t=hRe(this.scene,e);this.mesh.update(t)};yZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function YDt(e,t){var r=e.glplot.gl,n=hRe(e,t),i=UDt(r,n),a=new fRe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}dRe.exports=YDt});var gRe=ye((hmr,pRe)=>{"use strict";pRe.exports={moduleType:"trace",name:"cone",basePlotModule:sx(),categories:["gl3d","showLegend"],attributes:mZ(),supplyDefaults:sRe(),colorbar:{min:"cmin",max:"cmax"},calc:uRe(),plot:vRe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var yRe=ye((dmr,mRe)=>{"use strict";mRe.exports=gRe()});var xZ=ye((vmr,xRe)=>{"use strict";var KDt=Tu(),t5=df().axisHoverFormat,{hovertemplateAttrs:JDt,templatefallbackAttrs:$Dt}=Ll(),QDt=JA(),_Re=Gl(),_Z=Ao().extendFlat,mF={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:JDt({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:$Dt({editType:"calc"}),uhoverformat:t5("u",1),vhoverformat:t5("v",1),whoverformat:t5("w",1),xhoverformat:t5("x"),yhoverformat:t5("y"),zhoverformat:t5("z"),showlegend:_Z({},_Re.showlegend,{dflt:!1})};_Z(mF,KDt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var eFt=["opacity","lightposition","lighting"];eFt.forEach(function(e){mF[e]=QDt[e]});mF.hoverinfo=_Z({},_Re.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});xRe.exports=mF});var wRe=ye((pmr,bRe)=>{"use strict";var tFt=Pr(),rFt=td(),iFt=xZ();bRe.exports=function(t,r,n,i){function a(h,d){return tFt.coerce(t,r,iFt,h,d)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),rFt(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var LRe=ye((gmr,CRe)=>{"use strict";var SRe=zd().gl_streamtube3d,nFt=SRe.createTubeMesh,aFt=Pr(),oFt=a1().parseColorScale,sFt=tc().extractOpts,TRe=QA(),MRe={xaxis:0,yaxis:1,zaxis:2};function ERe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var wZ=ERe.prototype;wZ.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[MRe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var i=e.data.position,a=e.data.velocity;return e.traceCoordinate=[n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function ARe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function bZ(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function kRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(z,q){var U=r[q],G=n[MRe[q]];return aFt.simpleMap(z,function(Z){return U.d2l(Z)*G})}if(a.vectors=TRe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),i),!i)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");a.meshgrid=[s,l,u],a.gridFill=t._gridFill;var c=t._slen;if(c)a.startingPositions=TRe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],h=ARe(s),d=ARe(u),v=new Array(h.length*d.length),m=0,b=0;b<h.length;b++)for(var p=0;p<d.length;p++)v[m++]=[h[b],f,d[p]];a.startingPositions=v}a.colormap=oFt(t),a.tubeSize=t.sizeref,a.maxLength=t.maxdisplayed;var k=o(t._xbnds,"xaxis"),M=o(t._ybnds,"yaxis"),T=o(t._zbnds,"zaxis"),L=bZ(s),x=bZ(l),C=bZ(u),S=[[k[0]-L[0],M[0]-x[0],T[0]-C[0]],[k[1]+L[1],M[1]+x[1],T[1]+C[1]]],g=SRe(a,S),P=sFt(t);g.vertexIntensityBounds=[P.min/t._normMax,P.max/t._normMax];var E=t.lightposition;return g.lightPosition=[E.x,E.y,E.z],g.ambient=t.lighting.ambient,g.diffuse=t.lighting.diffuse,g.specular=t.lighting.specular,g.roughness=t.lighting.roughness,g.fresnel=t.lighting.fresnel,g.opacity=t.opacity,t._pad=g.tubeScale*t.sizeref*2,g}wZ.update=function(e){this.data=e;var t=kRe(this.scene,e);this.mesh.update(t)};wZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function lFt(e,t){var r=e.glplot.gl,n=kRe(e,t),i=nFt(r,n),a=new ERe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}CRe.exports=lFt});var IRe=ye((mmr,PRe)=>{"use strict";PRe.exports={moduleType:"trace",name:"streamtube",basePlotModule:sx(),categories:["gl3d","showLegend"],attributes:xZ(),supplyDefaults:wRe(),colorbar:{min:"cmin",max:"cmax"},calc:hF().calc,plot:LRe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var DRe=ye((ymr,RRe)=>{"use strict";RRe.exports=IRe()});var ew=ye((xmr,BRe)=>{"use strict";var{hovertemplateAttrs:uFt,texttemplateAttrs:cFt,templatefallbackAttrs:FRe}=Ll(),fFt=Pg(),$m=pf(),hFt=Gl(),zRe=Tu(),dFt=Pd().dash,Q2=Ao().extendFlat,vFt=mc().overrideAll,rg=$m.marker,qRe=$m.line,ORe=rg.line,_mr=["The library used by the *country names* `locationmode` option is changing in an upcoming version.","Country names in existing plots may not work in the new version."].join(" ");BRe.exports=vFt({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:Q2({},$m.mode,{dflt:"markers"}),text:Q2({},$m.text,{}),texttemplate:cFt({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:FRe({editType:"plot"}),hovertext:Q2({},$m.hovertext,{}),textfont:$m.textfont,textposition:$m.textposition,line:{color:qRe.color,width:qRe.width,dash:dFt},connectgaps:$m.connectgaps,marker:Q2({symbol:rg.symbol,opacity:rg.opacity,angle:rg.angle,angleref:Q2({},rg.angleref,{values:["previous","up","north"]}),standoff:rg.standoff,size:rg.size,sizeref:rg.sizeref,sizemin:rg.sizemin,sizemode:rg.sizemode,colorbar:rg.colorbar,line:Q2({width:ORe.width,dash:ORe.dash},zRe("marker.line")),gradient:rg.gradient},zRe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:fFt(),selected:$m.selected,unselected:$m.unselected,hoverinfo:Q2({},hFt.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:uFt(),hovertemplatefallback:FRe()},"calc","nested")});var URe=ye((bmr,NRe)=>{"use strict";var yF=Pr(),TZ=Ru(),pFt=$p(),gFt=D0(),mFt=F0(),yFt=Fg(),_Ft=ew(),xFt=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");NRe.exports=function(t,r,n,i){function a(d,v){return yF.coerce(t,r,_Ft,d,v)}var o=a("locations"),s;if(o&&o.length){var l=a("geojson"),u;(typeof l=="string"&&l!==""||yF.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="country names"&&yF.warn(xFt),c==="geojson-id"&&a("featureidkey"),s=o.length}else{var f=a("lon")||[],h=a("lat")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),TZ.hasMarkers(r)&&pFt(t,r,n,i,a,{gradient:!0}),TZ.hasLines(r)&&(gFt(t,r,n,i,a),a("connectgaps")),TZ.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),mFt(t,r,i,a)),a("fill"),r.fill!=="none"&&yFt(t,r,n,a),yF.coerceSelectionMarkerOpacity(r,a)}});var HRe=ye((wmr,GRe)=>{"use strict";var VRe=ho();GRe.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=VRe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=VRe.tickText(o,o.c2l(s[1]),!0).text,i}});var _F=ye((Tmr,ZRe)=>{"use strict";var AZ=Eo(),jRe=fs().BADNUM,bFt=z0(),wFt=Rm(),TFt=q0(),AFt=Pr().isArrayOrTypedArray,WRe=Pr()._;function XRe(e){return e&&typeof e=="string"}ZRe.exports=function(t,r){var n=AFt(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return XRe(h)||AZ(h)}:o=XRe;for(var s=0;s<i;s++){var l=a[s]={};if(n){var u=r.locations[s];l.loc=o(u)?u:null}else{var c=r.lon[s],f=r.lat[s];AZ(c)&&AZ(f)?l.lonlat=[+c,+f]:l.lonlat=[jRe,jRe]}}return wFt(a,r),bFt(t,r),TFt(a,r),i&&(a[0].t={labels:{lat:WRe(t,"lat:")+" ",lon:WRe(t,"lon:")+" "}}),a}});var uk=ye(Mv=>{"use strict";Mv.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"};Mv.axesNames=["lonaxis","lataxis"];Mv.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Mv.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Mv.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}};Mv.clipPad=.001;Mv.precision=.1;Mv.landColor="#F0DC82";Mv.waterColor="#3399FF";Mv.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Mv.sphereSVG={type:"Sphere"};Mv.fillLayers={ocean:1,land:1,lakes:1};Mv.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Mv.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Mv.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Mv.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var SZ=ye((xF,YRe)=>{(function(e,t){typeof xF=="object"&&typeof YRe!="undefined"?t(xF):(e=e||self,t(e.topojson=e.topojson||{}))})(xF,function(e){"use strict";function t(M){return M}function r(M){if(M==null)return t;var T,L,x=M.scale[0],C=M.scale[1],S=M.translate[0],g=M.translate[1];return function(P,E){E||(T=L=0);var z=2,q=P.length,U=new Array(q);for(U[0]=(T+=P[0])*x+S,U[1]=(L+=P[1])*C+g;z<q;)U[z]=P[z],++z;return U}}function n(M){var T=r(M.transform),L,x=1/0,C=x,S=-x,g=-x;function P(z){z=T(z),z[0]<x&&(x=z[0]),z[0]>S&&(S=z[0]),z[1]<C&&(C=z[1]),z[1]>g&&(g=z[1])}function E(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(E);break;case"Point":P(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(P);break}}M.arcs.forEach(function(z){for(var q=-1,U=z.length,G;++q<U;)G=T(z[q],q),G[0]<x&&(x=G[0]),G[0]>S&&(S=G[0]),G[1]<C&&(C=G[1]),G[1]>g&&(g=G[1])});for(L in M.objects)E(M.objects[L]);return[x,C,S,g]}function i(M,T){for(var L,x=M.length,C=x-T;C<--x;)L=M[C],M[C++]=M[x],M[x]=L}function a(M,T){return typeof T=="string"&&(T=M.objects[T]),T.type==="GeometryCollection"?{type:"FeatureCollection",features:T.geometries.map(function(L){return o(M,L)})}:o(M,T)}function o(M,T){var L=T.id,x=T.bbox,C=T.properties==null?{}:T.properties,S=s(M,T);return L==null&&x==null?{type:"Feature",properties:C,geometry:S}:x==null?{type:"Feature",id:L,properties:C,geometry:S}:{type:"Feature",id:L,bbox:x,properties:C,geometry:S}}function s(M,T){var L=r(M.transform),x=M.arcs;function C(q,U){U.length&&U.pop();for(var G=x[q<0?~q:q],Z=0,j=G.length;Z<j;++Z)U.push(L(G[Z],Z));q<0&&i(U,j)}function S(q){return L(q)}function g(q){for(var U=[],G=0,Z=q.length;G<Z;++G)C(q[G],U);return U.length<2&&U.push(U[0]),U}function P(q){for(var U=g(q);U.length<4;)U.push(U[0]);return U}function E(q){return q.map(P)}function z(q){var U=q.type,G;switch(U){case"GeometryCollection":return{type:U,geometries:q.geometries.map(z)};case"Point":G=S(q.coordinates);break;case"MultiPoint":G=q.coordinates.map(S);break;case"LineString":G=g(q.arcs);break;case"MultiLineString":G=q.arcs.map(g);break;case"Polygon":G=E(q.arcs);break;case"MultiPolygon":G=q.arcs.map(E);break;default:return null}return{type:U,coordinates:G}}return z(T)}function l(M,T){var L={},x={},C={},S=[],g=-1;T.forEach(function(z,q){var U=M.arcs[z<0?~z:z],G;U.length<3&&!U[1][0]&&!U[1][1]&&(G=T[++g],T[g]=z,T[q]=G)}),T.forEach(function(z){var q=P(z),U=q[0],G=q[1],Z,j;if(Z=C[U])if(delete C[Z.end],Z.push(z),Z.end=G,j=x[G]){delete x[j.start];var N=j===Z?Z:Z.concat(j);x[N.start=Z.start]=C[N.end=j.end]=N}else x[Z.start]=C[Z.end]=Z;else if(Z=x[G])if(delete x[Z.start],Z.unshift(z),Z.start=U,j=C[U]){delete C[j.end];var H=j===Z?Z:j.concat(Z);x[H.start=j.start]=C[H.end=Z.end]=H}else x[Z.start]=C[Z.end]=Z;else Z=[z],x[Z.start=U]=C[Z.end=G]=Z});function P(z){var q=M.arcs[z<0?~z:z],U=q[0],G;return M.transform?(G=[0,0],q.forEach(function(Z){G[0]+=Z[0],G[1]+=Z[1]})):G=q[q.length-1],z<0?[G,U]:[U,G]}function E(z,q){for(var U in z){var G=z[U];delete q[G.start],delete G.start,delete G.end,G.forEach(function(Z){L[Z<0?~Z:Z]=1}),S.push(G)}}return E(C,x),E(x,C),T.forEach(function(z){L[z<0?~z:z]||S.push([z])}),S}function u(M){return s(M,c.apply(this,arguments))}function c(M,T,L){var x,C,S;if(arguments.length>1)x=f(M,T,L);else for(C=0,x=new Array(S=M.arcs.length);C<S;++C)x[C]=C;return{type:"MultiLineString",arcs:l(M,x)}}function f(M,T,L){var x=[],C=[],S;function g(U){var G=U<0?~U:U;(C[G]||(C[G]=[])).push({i:U,g:S})}function P(U){U.forEach(g)}function E(U){U.forEach(P)}function z(U){U.forEach(E)}function q(U){switch(S=U,U.type){case"GeometryCollection":U.geometries.forEach(q);break;case"LineString":P(U.arcs);break;case"MultiLineString":case"Polygon":E(U.arcs);break;case"MultiPolygon":z(U.arcs);break}}return q(T),C.forEach(L==null?function(U){x.push(U[0].i)}:function(U){L(U[0].g,U[U.length-1].g)&&x.push(U[0].i)}),x}function h(M){for(var T=-1,L=M.length,x,C=M[L-1],S=0;++T<L;)x=C,C=M[T],S+=x[0]*C[1]-x[1]*C[0];return Math.abs(S)}function d(M){return s(M,v.apply(this,arguments))}function v(M,T){var L={},x=[],C=[];T.forEach(S);function S(E){switch(E.type){case"GeometryCollection":E.geometries.forEach(S);break;case"Polygon":g(E.arcs);break;case"MultiPolygon":E.arcs.forEach(g);break}}function g(E){E.forEach(function(z){z.forEach(function(q){(L[q=q<0?~q:q]||(L[q]=[])).push(E)})}),x.push(E)}function P(E){return h(s(M,{type:"Polygon",arcs:[E]}).coordinates[0])}return x.forEach(function(E){if(!E._){var z=[],q=[E];for(E._=1,C.push(z);E=q.pop();)z.push(E),E.forEach(function(U){U.forEach(function(G){L[G<0?~G:G].forEach(function(Z){Z._||(Z._=1,q.push(Z))})})})}}),x.forEach(function(E){delete E._}),{type:"MultiPolygon",arcs:C.map(function(E){var z=[],q;if(E.forEach(function(N){N.forEach(function(H){H.forEach(function(re){L[re<0?~re:re].length<2&&z.push(re)})})}),z=l(M,z),(q=z.length)>1)for(var U=1,G=P(z[0]),Z,j;U<q;++U)(Z=P(z[U]))>G&&(j=z[0],z[0]=z[U],z[U]=j,G=Z);return z}).filter(function(E){return E.length>0})}}function m(M,T){for(var L=0,x=M.length;L<x;){var C=L+x>>>1;M[C]<T?L=C+1:x=C}return L}function b(M){var T={},L=M.map(function(){return[]});function x(N,H){N.forEach(function(re){re<0&&(re=~re);var oe=T[re];oe?oe.push(H):T[re]=[H]})}function C(N,H){N.forEach(function(re){x(re,H)})}function S(N,H){N.type==="GeometryCollection"?N.geometries.forEach(function(re){S(re,H)}):N.type in g&&g[N.type](N.arcs,H)}var g={LineString:x,MultiLineString:C,Polygon:C,MultiPolygon:function(N,H){N.forEach(function(re){C(re,H)})}};M.forEach(S);for(var P in T)for(var E=T[P],z=E.length,q=0;q<z;++q)for(var U=q+1;U<z;++U){var G=E[q],Z=E[U],j;(j=L[G])[P=m(j,Z)]!==Z&&j.splice(P,0,Z),(j=L[Z])[P=m(j,G)]!==G&&j.splice(P,0,G)}return L}function p(M){if(M==null)return t;var T,L,x=M.scale[0],C=M.scale[1],S=M.translate[0],g=M.translate[1];return function(P,E){E||(T=L=0);var z=2,q=P.length,U=new Array(q),G=Math.round((P[0]-S)/x),Z=Math.round((P[1]-g)/C);for(U[0]=G-T,T=G,U[1]=Z-L,L=Z;z<q;)U[z]=P[z],++z;return U}}function k(M,T){if(M.transform)throw new Error("already quantized");if(!T||!T.scale){if(!((g=Math.floor(T))>=2))throw new Error("n must be \u22652");E=M.bbox||n(M);var L=E[0],x=E[1],C=E[2],S=E[3],g;T={scale:[C-L?(C-L)/(g-1):1,S-x?(S-x)/(g-1):1],translate:[L,x]}}else E=M.bbox;var P=p(T),E,z,q=M.objects,U={};function G(N){return P(N)}function Z(N){var H;switch(N.type){case"GeometryCollection":H={type:"GeometryCollection",geometries:N.geometries.map(Z)};break;case"Point":H={type:"Point",coordinates:G(N.coordinates)};break;case"MultiPoint":H={type:"MultiPoint",coordinates:N.coordinates.map(G)};break;default:return N}return N.id!=null&&(H.id=N.id),N.bbox!=null&&(H.bbox=N.bbox),N.properties!=null&&(H.properties=N.properties),H}function j(N){var H=0,re=1,oe=N.length,_e,ke=new Array(oe);for(ke[0]=P(N[0],0);++H<oe;)((_e=P(N[H],H))[0]||_e[1])&&(ke[re++]=_e);return re===1&&(ke[re++]=[0,0]),ke.length=re,ke}for(z in q)U[z]=Z(q[z]);return{type:"Topology",bbox:E,transform:T,objects:U,arcs:M.arcs.map(j)}}e.bbox=n,e.feature=a,e.merge=d,e.mergeArcs=v,e.mesh=u,e.meshArcs=c,e.neighbors=b,e.quantize=k,e.transform=r,e.untransform=p,Object.defineProperty(e,"__esModule",{value:!0})})});var bF=ye((Smr,KRe)=>{"use strict";var MZ=KRe.exports={},SFt=uk().locationmodeToLayer,MFt=SZ().feature;MZ.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};MZ.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};MZ.getTopojsonFeatures=function(e,t){var r=SFt[e.locationmode],n=t.objects[r];return MFt(t,n).features}});var cx=ye(ck=>{"use strict";var EFt=fs().BADNUM;ck.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],i=[],a=0;a<e.length;a++){var o=e[a],s=o.lonlat;s[0]!==EFt?i.push(s):!r&&i.length>0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n};ck.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};ck.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=[e[r]];return{type:"MultiPolygon",coordinates:t}};ck.makeBlank=function(){return{type:"Point",coordinates:[]}}});var $Re=ye((Emr,JRe)=>{JRe.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xE7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xE9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xE9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xE3)o.?tom(e|\xE9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}});var AF=ye(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var qp=63710088e-1,kZ={centimeters:qp*100,centimetres:qp*100,degrees:360/(2*Math.PI),feet:qp*3.28084,inches:qp*39.37,kilometers:qp/1e3,kilometres:qp/1e3,meters:qp,metres:qp,miles:qp/1609.344,millimeters:qp*1e3,millimetres:qp*1e3,nauticalmiles:qp/1852,radians:1,yards:qp*1.0936},EZ={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function fx(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function kFt(e,t,r={}){switch(e){case"Point":return CZ(t).geometry;case"LineString":return PZ(t).geometry;case"Polygon":return LZ(t).geometry;case"MultiPoint":return eDe(t).geometry;case"MultiLineString":return QRe(t).geometry;case"MultiPolygon":return tDe(t).geometry;default:throw new Error(e+" is invalid")}}function CZ(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!wF(e[0])||!wF(e[1]))throw new Error("coordinates must contain numbers");return fx({type:"Point",coordinates:e},t,r)}function CFt(e,t,r={}){return TF(e.map(n=>CZ(n,t)),r)}function LZ(e,t,r={}){for(let i of e){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let a=0;a<i[i.length-1].length;a++)if(i[i.length-1][a]!==i[0][a])throw new Error("First and last Position are not equivalent.")}return fx({type:"Polygon",coordinates:e},t,r)}function LFt(e,t,r={}){return TF(e.map(n=>LZ(n,t)),r)}function PZ(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return fx({type:"LineString",coordinates:e},t,r)}function PFt(e,t,r={}){return TF(e.map(n=>PZ(n,t)),r)}function TF(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function QRe(e,t,r={}){return fx({type:"MultiLineString",coordinates:e},t,r)}function eDe(e,t,r={}){return fx({type:"MultiPoint",coordinates:e},t,r)}function tDe(e,t,r={}){return fx({type:"MultiPolygon",coordinates:e},t,r)}function IFt(e,t,r={}){return fx({type:"GeometryCollection",geometries:e},t,r)}function RFt(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function rDe(e,t="kilometers"){let r=kZ[t];if(!r)throw new Error(t+" units is invalid");return e*r}function IZ(e,t="kilometers"){let r=kZ[t];if(!r)throw new Error(t+" units is invalid");return e/r}function DFt(e,t){return iDe(IZ(e,t))}function FFt(e){let t=e%360;return t<0&&(t+=360),t}function zFt(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function iDe(e){return e%(2*Math.PI)*180/Math.PI}function qFt(e){return e%360*Math.PI/180}function OFt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return rDe(IZ(e,t),r)}function BFt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=EZ[t];if(!n)throw new Error("invalid original units");let i=EZ[r];if(!i)throw new Error("invalid final units");return e/n*i}function wF(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function NFt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function UFt(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!wF(t))throw new Error("bbox must only contain numbers")})}function VFt(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}ic.areaFactors=EZ;ic.azimuthToBearing=zFt;ic.bearingToAzimuth=FFt;ic.convertArea=BFt;ic.convertLength=OFt;ic.degreesToRadians=qFt;ic.earthRadius=qp;ic.factors=kZ;ic.feature=fx;ic.featureCollection=TF;ic.geometry=kFt;ic.geometryCollection=IFt;ic.isNumber=wF;ic.isObject=NFt;ic.lengthToDegrees=DFt;ic.lengthToRadians=IZ;ic.lineString=PZ;ic.lineStrings=PFt;ic.multiLineString=QRe;ic.multiPoint=eDe;ic.multiPolygon=tDe;ic.point=CZ;ic.points=CFt;ic.polygon=LZ;ic.polygons=LFt;ic.radiansToDegrees=iDe;ic.radiansToLength=rDe;ic.round=RFt;ic.validateBBox=UFt;ic.validateId=VFt});var MF=ye(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var Wv=AF();function fk(e,t,r){if(e!==null)for(var n,i,a,o,s,l,u,c=0,f=0,h,d=e.type,v=d==="FeatureCollection",m=d==="Feature",b=v?e.features.length:1,p=0;p<b;p++){u=v?e.features[p].geometry:m?e.geometry:e,h=u?u.type==="GeometryCollection":!1,s=h?u.geometries.length:1;for(var k=0;k<s;k++){var M=0,T=0;if(o=h?u.geometries[k]:u,o!==null){l=o.coordinates;var L=o.type;switch(c=r&&(L==="Polygon"||L==="MultiPolygon")?1:0,L){case null:break;case"Point":if(t(l,f,p,M,T)===!1)return!1;f++,M++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(t(l[n],f,p,M,T)===!1)return!1;f++,L==="MultiPoint"&&M++}L==="LineString"&&M++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-c;i++){if(t(l[n][i],f,p,M,T)===!1)return!1;f++}L==="MultiLineString"&&M++,L==="Polygon"&&T++}L==="Polygon"&&M++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(T=0,i=0;i<l[n].length;i++){for(a=0;a<l[n][i].length-c;a++){if(t(l[n][i][a],f,p,M,T)===!1)return!1;f++}T++}M++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(fk(o.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function GFt(e,t,r,n){var i=r;return fk(e,function(a,o,s,l,u){o===0&&r===void 0?i=a:i=t(i,a,o,s,l,u)},n),i}function nDe(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}function HFt(e,t,r){var n=r;return nDe(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}function aDe(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}function jFt(e,t,r){var n=r;return aDe(e,function(i,a){a===0&&r===void 0?n=i:n=t(n,i,a)}),n}function WFt(e){var t=[];return fk(e,function(r){t.push(r)}),t}function RZ(e,t){var r,n,i,a,o,s,l,u,c,f,h=0,d=e.type==="FeatureCollection",v=e.type==="Feature",m=d?e.features.length:1;for(r=0;r<m;r++){for(s=d?e.features[r].geometry:v?e.geometry:e,u=d?e.features[r].properties:v?e.properties:{},c=d?e.features[r].bbox:v?e.bbox:void 0,f=d?e.features[r].id:v?e.id:void 0,l=s?s.type==="GeometryCollection":!1,o=l?s.geometries.length:1,i=0;i<o;i++){if(a=l?s.geometries[i]:s,a===null){if(t(null,h,u,c,f)===!1)return!1;continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(a,h,u,c,f)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<a.geometries.length;n++)if(t(a.geometries[n],h,u,c,f)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}h++}}function XFt(e,t,r){var n=r;return RZ(e,function(i,a,o,s,l){a===0&&r===void 0?n=i:n=t(n,i,a,o,s,l)}),n}function SF(e,t){RZ(e,function(r,n,i,a,o){var s=r===null?null:r.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return t(Wv.feature.call(void 0,r,i,{bbox:a,id:o}),n,0)===!1?!1:void 0}var l;switch(s){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var u=0;u<r.coordinates.length;u++){var c=r.coordinates[u],f={type:l,coordinates:c};if(t(Wv.feature.call(void 0,f,i),n,u)===!1)return!1}})}function ZFt(e,t,r){var n=r;return SF(e,function(i,a,o){a===0&&o===0&&r===void 0?n=i:n=t(n,i,a,o)}),n}function oDe(e,t){SF(e,function(r,n,i){var a=0;if(r.geometry){var o=r.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var s,l=0,u=0,c=0;if(fk(r,function(f,h,d,v,m){if(s===void 0||n>l||v>u||m>c){s=f,l=n,u=v,c=m,a=0;return}var b=Wv.lineString.call(void 0,[s,f],r.properties);if(t(b,n,i,m,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function YFt(e,t,r){var n=r,i=!1;return oDe(e,function(a,o,s,l,u){i===!1&&r===void 0?n=a:n=t(n,a,o,s,l,u),i=!0}),n}function sDe(e,t){if(!e)throw new Error("geojson is required");SF(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,o=r.geometry.coordinates;switch(a){case"LineString":if(t(r,n,i,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s<o.length;s++)if(t(Wv.lineString.call(void 0,o[s],r.properties),n,i,s)===!1)return!1;break}}})}function KFt(e,t,r){var n=r;return sDe(e,function(i,a,o,s){a===0&&r===void 0?n=i:n=t(n,i,a,o,s)}),n}function JFt(e,t){if(t=t||{},!Wv.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.segmentIndex||0,o=t.properties,s;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),o=o||e.features[r].properties,s=e.features[r].geometry;break;case"Feature":o=o||e.properties,s=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":s=e;break;default:throw new Error("geojson is invalid")}if(s===null)return null;var l=s.coordinates;switch(s.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=l.length+a-1),Wv.lineString.call(void 0,[l[a],l[a+1]],o,t);case"Polygon":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a-1),Wv.lineString.call(void 0,[l[i][a],l[i][a+1]],o,t);case"MultiLineString":return n<0&&(n=l.length+n),a<0&&(a=l[n].length+a-1),Wv.lineString.call(void 0,[l[n][a],l[n][a+1]],o,t);case"MultiPolygon":return n<0&&(n=l.length+n),i<0&&(i=l[n].length+i),a<0&&(a=l[n][i].length-a-1),Wv.lineString.call(void 0,[l[n][i][a],l[n][i][a+1]],o,t)}throw new Error("geojson is invalid")}function $Ft(e,t){if(t=t||{},!Wv.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,n=t.multiFeatureIndex||0,i=t.geometryIndex||0,a=t.coordIndex||0,o=t.properties,s;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),o=o||e.features[r].properties,s=e.features[r].geometry;break;case"Feature":o=o||e.properties,s=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":s=e;break;default:throw new Error("geojson is invalid")}if(s===null)return null;var l=s.coordinates;switch(s.type){case"Point":return Wv.point.call(void 0,l,o,t);case"MultiPoint":return n<0&&(n=l.length+n),Wv.point.call(void 0,l[n],o,t);case"LineString":return a<0&&(a=l.length+a),Wv.point.call(void 0,l[a],o,t);case"Polygon":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a),Wv.point.call(void 0,l[i][a],o,t);case"MultiLineString":return n<0&&(n=l.length+n),a<0&&(a=l[n].length+a),Wv.point.call(void 0,l[n][a],o,t);case"MultiPolygon":return n<0&&(n=l.length+n),i<0&&(i=l[n].length+i),a<0&&(a=l[n][i].length-a),Wv.point.call(void 0,l[n][i][a],o,t)}throw new Error("geojson is invalid")}qd.coordAll=WFt;qd.coordEach=fk;qd.coordReduce=GFt;qd.featureEach=aDe;qd.featureReduce=jFt;qd.findPoint=$Ft;qd.findSegment=JFt;qd.flattenEach=SF;qd.flattenReduce=ZFt;qd.geomEach=RZ;qd.geomReduce=XFt;qd.lineEach=sDe;qd.lineReduce=KFt;qd.propEach=nDe;qd.propReduce=HFt;qd.segmentEach=oDe;qd.segmentReduce=YFt});var hDe=ye(EF=>{"use strict";Object.defineProperty(EF,"__esModule",{value:!0});var lDe=AF(),QFt=MF();function fDe(e){return QFt.geomReduce.call(void 0,e,(t,r)=>t+ezt(r),0)}function ezt(e){let t=0,r;switch(e.type){case"Polygon":return uDe(e.coordinates);case"MultiPolygon":for(r=0;r<e.coordinates.length;r++)t+=uDe(e.coordinates[r]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function uDe(e){let t=0;if(e&&e.length>0){t+=Math.abs(cDe(e[0]));for(let r=1;r<e.length;r++)t-=Math.abs(cDe(e[r]))}return t}var tzt=lDe.earthRadius*lDe.earthRadius/2,DZ=Math.PI/180;function cDe(e){let t=e.length-1;if(t<=2)return 0;let r=0,n=0;for(;n<t;){let i=e[n],a=e[n+1===t?0:n+1],o=e[n+2>=t?(n+2)%t:n+2],s=i[0]*DZ,l=a[1]*DZ,u=o[0]*DZ;r+=(u-s)*Math.sin(l),n++}return r*tzt}var rzt=fDe;EF.area=fDe;EF.default=rzt});var vDe=ye(kF=>{"use strict";Object.defineProperty(kF,"__esModule",{value:!0});var izt=AF(),nzt=MF();function dDe(e,t={}){let r=0,n=0,i=0;return nzt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),izt.point.call(void 0,[r/i,n/i],t.properties)}var azt=dDe;kF.centroid=dDe;kF.default=azt});var gDe=ye(CF=>{"use strict";Object.defineProperty(CF,"__esModule",{value:!0});var ozt=MF();function pDe(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return ozt.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 szt=pDe;CF.bbox=pDe;CF.default=szt});var _De=ye((Rmr,yDe)=>{"use strict";var mDe={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},lzt=new Set(Object.values(mDe));yDe.exports={usaLocationAbbreviations:lzt,usaLocationList:mDe}});var hx=ye((Dmr,TDe)=>{"use strict";var uzt=qa(),bDe=$Re(),{area:czt}=hDe(),{centroid:fzt}=vDe(),{bbox:hzt}=gDe(),dzt=ZS(),tw=K1(),vzt=Ty(),pzt=FS(),LF=FM(),{usaLocationAbbreviations:gzt,usaLocationList:mzt}=_De(),xDe=Object.keys(bDe),yzt={"ISO-3":dzt,"USA-states":xzt,"country names":_zt};function _zt(e){for(var t=0;t<xDe.length;t++){var r=xDe[t],n=new RegExp(bDe[r]);if(n.test(e.trim().toLowerCase()))return r}return tw.log("Unrecognized country name: "+e+"."),!1}function xzt(e){e=e.trim();let t=gzt.has(e.toUpperCase())?e.toUpperCase():mzt[e.toLowerCase()];return t||(tw.log("Unrecognized US location: "+e+"."),!1)}function bzt(e,t,r){var i;if(!t||typeof t!="string")return!1;let n=yzt[e](t);if(n){let a;if(e==="USA-states"){a=[];for(let o of r)((i=o==null?void 0:o.properties)==null?void 0:i.gu)==="USA"&&a.push(o)}else a=r;for(let o of a)if(o.id===n)return o;tw.log(`Location with id ${n} does not have a matching topojson feature at this resolution.`)}return!1}function wzt(e){var t=e.geometry,r=t.coordinates,n=e.id,i=[],a,o,s,l;function u(c){for(var f=0;f<c.length-1;f++)if(c[f][0]>0&&c[f+1][0]<0)return f;return null}switch(n==="RUS"||n==="FJI"?a=function(c){var f;if(u(c)===null)f=c;else for(f=new Array(c.length),l=0;l<c.length;l++)f[l]=[c[l][0]<0?c[l][0]+360:c[l][0],c[l][1]];i.push(LF.tester(f))}:n==="ATA"?a=function(c){var f=u(c);if(f===null)return i.push(LF.tester(c));var h=new Array(c.length+1),d=0;for(l=0;l<c.length;l++)l>f?h[d++]=[c[l][0]+360,c[l][1]]:l===f?(h[d++]=c[l],h[d++]=[c[l][0],-90]):h[d++]=c[l];var v=LF.tester(h);v.pts.pop(),i.push(v)}:a=function(c){i.push(LF.tester(c))},t.type){case"MultiPolygon":for(o=0;o<r.length;o++)for(s=0;s<r[o].length;s++)a(r[o][s]);break;case"Polygon":for(o=0;o<r.length;o++)a(r[o]);break}return i}function wDe(e){var t=e.geojson,r=window.PlotlyGeoAssets||{},n=typeof t=="string"?r[t]:t;return vzt(n)?n:(tw.error("Oops ... something went wrong when fetching "+t),!1)}function Tzt(e){var t=e[0].trace,r=wDe(t);if(!r)return!1;var n={},i=[],a;for(a=0;a<t._length;a++){var o=e[a];(o.loc||o.loc===0)&&(n[o.loc]=o)}function s(c){var f=pzt(c,t.featureidkey||"id").get(),h=n[f];if(h){var d=c.geometry;if(d.type==="Polygon"||d.type==="MultiPolygon"){var v={type:"Feature",id:f,geometry:d,properties:{}};v.geometry.coordinates.length>0?v.properties.ct=Azt(v):v.properties.ct=[NaN,NaN],h.fIn=c,h.fOut=v,i.push(v)}else tw.log(["Location",h.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete n[f]}switch(r.type){case"FeatureCollection":var l=r.features;for(a=0;a<l.length;a++)s(l[a]);break;case"Feature":s(r);break;default:return tw.warn(["Invalid GeoJSON type",(r.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var u in n)tw.log(["Location *"+u+"*","does not have a matching feature with id-key","*"+t.featureidkey+"*."].join(" "));return i}function Azt(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=czt(o);s>i&&(i=s,r=o)}else r=t;return fzt(r).geometry.coordinates}function Szt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){uzt.json(l,function(f,h){if(f){delete t[l];var d=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(d))}return t[l]=h,u(h)})})}function i(l){return new Promise(function(u,c){var f=0,h=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(h),u(t[l]);if(f>100)return clearInterval(h),c("Unexpected error while fetching from "+l);f++},50)})}for(var a=0;a<e.length;a++){var o=e[a][0].trace,s=o.geojson;typeof s=="string"&&(t[s]?t[s]==="pending"&&r.push(i(s)):(t[s]="pending",r.push(n(s))))}return r}function Mzt(e){return hzt(e)}TDe.exports={locationToFeature:bzt,feature2polygons:wzt,getTraceGeojson:wDe,extractTraceFeature:Tzt,fetchTraceGeoData:Szt,computeBbox:Mzt}});var FZ=ye((Fmr,MDe)=>{"use strict";var Ezt=qa(),kzt=So(),ADe=ka(),SDe=sp(),Czt=SDe.stylePoints,Lzt=SDe.styleText;MDe.exports=function(t,r){r&&Pzt(t,r)};function Pzt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),Czt(n,r,e),Lzt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(i){var a=Ezt.select(this),o=i.trace,s=o.line||{};a.call(ADe.stroke,s.color).call(kzt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(ADe.fill,o.fillcolor)})}});var BZ=ye((zmr,CDe)=>{"use strict";var EDe=qa(),IF=Pr(),Izt=bF().getTopojsonFeatures,zZ=cx(),PF=hx(),kDe=Mg().findExtremes,OZ=fs().BADNUM,Rzt=O0().calcMarkerSize,qZ=Ru(),Dzt=FZ();function Fzt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),i=IF.makeTraceGroups(n,r,"trace scattergeo");function a(o,s){o.lonlat[0]===OZ&&EDe.select(s).remove()}i.selectAll("*").remove(),i.each(function(o){var s=EDe.select(this),l=o[0].trace;if(qZ.hasLines(l)||l.fill!=="none"){var u=zZ.calcTraceToLineCoords(o),c=l.fill!=="none"?zZ.makePolygon(u):zZ.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}qZ.hasMarkers(l)&&s.selectAll("path.point").data(IF.identity).enter().append("path").classed("point",!0).each(function(f){a(f,this)}),qZ.hasText(l)&&s.selectAll("g").data(IF.identity).enter().append("g").append("text").each(function(f){a(f,this)}),Dzt(e,o)})}function zzt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(IF.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?PF.extractTraceFeature(e):Izt(r,i.topojson);for(o=0;o<a;o++){s=e[o];var c=l==="geojson-id"?s.fOut:PF.locationToFeature(l,s.loc,u);s.lonlat=c?c.properties.ct:[OZ,OZ]}}var f={padded:!0},h,d;if(n.fitbounds==="geojson"&&r.locationmode==="geojson-id"){var v=PF.computeBbox(PF.getTraceGeojson(r));h=[v[0],v[2]],d=[v[1],v[3]]}else{for(h=new Array(a),d=new Array(a),o=0;o<a;o++)s=e[o],h[o]=s.lonlat[0],d[o]=s.lonlat[1];f.ppad=Rzt(r,a)}r._extremes.lon=kDe(n.lonaxis._ax,h,f),r._extremes.lat=kDe(n.lataxis._ax,d,f)}CDe.exports={calcGeoJSON:zzt,plot:Fzt}});var PDe=ye((qmr,LDe)=>{"use strict";var qzt=vf(),Ozt=fs().BADNUM,Bzt=mT(),Nzt=Pr().fillText,Uzt=ew();LDe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(k){var M=k.lonlat;if(M[0]===Ozt||u(M))return 1/0;var T=c(M),L=c([r,n]),x=Math.abs(T[0]-L[0]),C=Math.abs(T[1]-L[1]),S=Math.max(3,k.mrc||0);return Math.max(Math.sqrt(x*x+C*C)-S,1-3/S)}if(qzt.getClosest(i,f,t),t.index!==!1){var h=i[t.index],d=h.lonlat,v=[o.c2p(d),s.c2p(d)],m=h.mrc||1;t.x0=v[0]-m,t.x1=v[0]+m,t.y0=v[1]-m,t.y1=v[1]+m,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:l};var p=a._module.formatLabels(h,a,b);return t.lonLabel=p.lonLabel,t.latLabel=p.latLabel,t.color=Bzt(a,h),t.extraText=Vzt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function Vzt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i==="all"?Uzt.hoverinfo.flags:i.split("+"),o=a.indexOf("location")!==-1&&Array.isArray(e.locations),s=a.indexOf("lon")!==-1,l=a.indexOf("lat")!==-1,u=a.indexOf("text")!==-1,c=[];function f(h){return h+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&Nzt(t,e,c),c.join("<br>")}});var RDe=ye((Omr,IDe)=>{"use strict";IDe.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 zDe=ye((Bmr,FDe)=>{"use strict";var DDe=Ru(),Gzt=fs().BADNUM;FDe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h,d=!DDe.hasMarkers(s)&&!DDe.hasText(s);if(d)return[];if(r===!1)for(h=0;h<n.length;h++)n[h].selected=0;else for(h=0;h<n.length;h++)l=n[h],u=l.lonlat,u[0]!==Gzt&&(c=i.c2p(u),f=a.c2p(u),r.contains([c,f],null,h,t)?(o.push({pointNumber:h,lon:u[0],lat:u[1]}),l.selected=1):l.selected=0);return o}});var hk=ye((RF,qDe)=>{(function(e,t){t(typeof RF=="object"&&typeof qDe!="undefined"?RF:e.d3=e.d3||{})})(RF,function(e){"use strict";function t(Ee,we){return Ee<we?-1:Ee>we?1:Ee>=we?0:NaN}function r(Ee){return Ee.length===1&&(Ee=n(Ee)),{left:function(we,De,Le,me){for(Le==null&&(Le=0),me==null&&(me=we.length);Le<me;){var Pe=Le+me>>>1;Ee(we[Pe],De)<0?Le=Pe+1:me=Pe}return Le},right:function(we,De,Le,me){for(Le==null&&(Le=0),me==null&&(me=we.length);Le<me;){var Pe=Le+me>>>1;Ee(we[Pe],De)>0?me=Pe:Le=Pe+1}return Le}}}function n(Ee){return function(we,De){return t(Ee(we),De)}}var i=r(t),a=i.right,o=i.left;function s(Ee,we){we==null&&(we=l);for(var De=0,Le=Ee.length-1,me=Ee[0],Pe=new Array(Le<0?0:Le);De<Le;)Pe[De]=we(me,me=Ee[++De]);return Pe}function l(Ee,we){return[Ee,we]}function u(Ee,we,De){var Le=Ee.length,me=we.length,Pe=new Array(Le*me),ce,He,lt,mt;for(De==null&&(De=l),ce=lt=0;ce<Le;++ce)for(mt=Ee[ce],He=0;He<me;++He,++lt)Pe[lt]=De(mt,we[He]);return Pe}function c(Ee,we){return we<Ee?-1:we>Ee?1:we>=Ee?0:NaN}function f(Ee){return Ee===null?NaN:+Ee}function h(Ee,we){var De=Ee.length,Le=0,me=-1,Pe=0,ce,He,lt=0;if(we==null)for(;++me<De;)isNaN(ce=f(Ee[me]))||(He=ce-Pe,Pe+=He/++Le,lt+=He*(ce-Pe));else for(;++me<De;)isNaN(ce=f(we(Ee[me],me,Ee)))||(He=ce-Pe,Pe+=He/++Le,lt+=He*(ce-Pe));if(Le>1)return lt/(Le-1)}function d(Ee,we){var De=h(Ee,we);return De&&Math.sqrt(De)}function v(Ee,we){var De=Ee.length,Le=-1,me,Pe,ce;if(we==null){for(;++Le<De;)if((me=Ee[Le])!=null&&me>=me)for(Pe=ce=me;++Le<De;)(me=Ee[Le])!=null&&(Pe>me&&(Pe=me),ce<me&&(ce=me))}else for(;++Le<De;)if((me=we(Ee[Le],Le,Ee))!=null&&me>=me)for(Pe=ce=me;++Le<De;)(me=we(Ee[Le],Le,Ee))!=null&&(Pe>me&&(Pe=me),ce<me&&(ce=me));return[Pe,ce]}var m=Array.prototype,b=m.slice,p=m.map;function k(Ee){return function(){return Ee}}function M(Ee){return Ee}function T(Ee,we,De){Ee=+Ee,we=+we,De=(me=arguments.length)<2?(we=Ee,Ee=0,1):me<3?1:+De;for(var Le=-1,me=Math.max(0,Math.ceil((we-Ee)/De))|0,Pe=new Array(me);++Le<me;)Pe[Le]=Ee+Le*De;return Pe}var L=Math.sqrt(50),x=Math.sqrt(10),C=Math.sqrt(2);function S(Ee,we,De){var Le,me=-1,Pe,ce,He;if(we=+we,Ee=+Ee,De=+De,Ee===we&&De>0)return[Ee];if((Le=we<Ee)&&(Pe=Ee,Ee=we,we=Pe),(He=g(Ee,we,De))===0||!isFinite(He))return[];if(He>0)for(Ee=Math.ceil(Ee/He),we=Math.floor(we/He),ce=new Array(Pe=Math.ceil(we-Ee+1));++me<Pe;)ce[me]=(Ee+me)*He;else for(Ee=Math.floor(Ee*He),we=Math.ceil(we*He),ce=new Array(Pe=Math.ceil(Ee-we+1));++me<Pe;)ce[me]=(Ee-me)/He;return Le&&ce.reverse(),ce}function g(Ee,we,De){var Le=(we-Ee)/Math.max(0,De),me=Math.floor(Math.log(Le)/Math.LN10),Pe=Le/Math.pow(10,me);return me>=0?(Pe>=L?10:Pe>=x?5:Pe>=C?2:1)*Math.pow(10,me):-Math.pow(10,-me)/(Pe>=L?10:Pe>=x?5:Pe>=C?2:1)}function P(Ee,we,De){var Le=Math.abs(we-Ee)/Math.max(0,De),me=Math.pow(10,Math.floor(Math.log(Le)/Math.LN10)),Pe=Le/me;return Pe>=L?me*=10:Pe>=x?me*=5:Pe>=C&&(me*=2),we<Ee?-me:me}function E(Ee){return Math.ceil(Math.log(Ee.length)/Math.LN2)+1}function z(){var Ee=M,we=v,De=E;function Le(me){var Pe,ce=me.length,He,lt=new Array(ce);for(Pe=0;Pe<ce;++Pe)lt[Pe]=Ee(me[Pe],Pe,me);var mt=we(lt),Vt=mt[0],st=mt[1],ct=De(lt,Vt,st);Array.isArray(ct)||(ct=P(Vt,st,ct),ct=T(Math.ceil(Vt/ct)*ct,st,ct));for(var Qt=ct.length;ct[0]<=Vt;)ct.shift(),--Qt;for(;ct[Qt-1]>st;)ct.pop(),--Qt;var Ht=new Array(Qt+1),nr;for(Pe=0;Pe<=Qt;++Pe)nr=Ht[Pe]=[],nr.x0=Pe>0?ct[Pe-1]:Vt,nr.x1=Pe<Qt?ct[Pe]:st;for(Pe=0;Pe<ce;++Pe)He=lt[Pe],Vt<=He&&He<=st&&Ht[a(ct,He,0,Qt)].push(me[Pe]);return Ht}return Le.value=function(me){return arguments.length?(Ee=typeof me=="function"?me:k(me),Le):Ee},Le.domain=function(me){return arguments.length?(we=typeof me=="function"?me:k([me[0],me[1]]),Le):we},Le.thresholds=function(me){return arguments.length?(De=typeof me=="function"?me:Array.isArray(me)?k(b.call(me)):k(me),Le):De},Le}function q(Ee,we,De){if(De==null&&(De=f),!!(Le=Ee.length)){if((we=+we)<=0||Le<2)return+De(Ee[0],0,Ee);if(we>=1)return+De(Ee[Le-1],Le-1,Ee);var Le,me=(Le-1)*we,Pe=Math.floor(me),ce=+De(Ee[Pe],Pe,Ee),He=+De(Ee[Pe+1],Pe+1,Ee);return ce+(He-ce)*(me-Pe)}}function U(Ee,we,De){return Ee=p.call(Ee,f).sort(t),Math.ceil((De-we)/(2*(q(Ee,.75)-q(Ee,.25))*Math.pow(Ee.length,-1/3)))}function G(Ee,we,De){return Math.ceil((De-we)/(3.5*d(Ee)*Math.pow(Ee.length,-1/3)))}function Z(Ee,we){var De=Ee.length,Le=-1,me,Pe;if(we==null){for(;++Le<De;)if((me=Ee[Le])!=null&&me>=me)for(Pe=me;++Le<De;)(me=Ee[Le])!=null&&me>Pe&&(Pe=me)}else for(;++Le<De;)if((me=we(Ee[Le],Le,Ee))!=null&&me>=me)for(Pe=me;++Le<De;)(me=we(Ee[Le],Le,Ee))!=null&&me>Pe&&(Pe=me);return Pe}function j(Ee,we){var De=Ee.length,Le=De,me=-1,Pe,ce=0;if(we==null)for(;++me<De;)isNaN(Pe=f(Ee[me]))?--Le:ce+=Pe;else for(;++me<De;)isNaN(Pe=f(we(Ee[me],me,Ee)))?--Le:ce+=Pe;if(Le)return ce/Le}function N(Ee,we){var De=Ee.length,Le=-1,me,Pe=[];if(we==null)for(;++Le<De;)isNaN(me=f(Ee[Le]))||Pe.push(me);else for(;++Le<De;)isNaN(me=f(we(Ee[Le],Le,Ee)))||Pe.push(me);return q(Pe.sort(t),.5)}function H(Ee){for(var we=Ee.length,De,Le=-1,me=0,Pe,ce;++Le<we;)me+=Ee[Le].length;for(Pe=new Array(me);--we>=0;)for(ce=Ee[we],De=ce.length;--De>=0;)Pe[--me]=ce[De];return Pe}function re(Ee,we){var De=Ee.length,Le=-1,me,Pe;if(we==null){for(;++Le<De;)if((me=Ee[Le])!=null&&me>=me)for(Pe=me;++Le<De;)(me=Ee[Le])!=null&&Pe>me&&(Pe=me)}else for(;++Le<De;)if((me=we(Ee[Le],Le,Ee))!=null&&me>=me)for(Pe=me;++Le<De;)(me=we(Ee[Le],Le,Ee))!=null&&Pe>me&&(Pe=me);return Pe}function oe(Ee,we){for(var De=we.length,Le=new Array(De);De--;)Le[De]=Ee[we[De]];return Le}function _e(Ee,we){if(De=Ee.length){var De,Le=0,me=0,Pe,ce=Ee[me];for(we==null&&(we=t);++Le<De;)(we(Pe=Ee[Le],ce)<0||we(ce,ce)!==0)&&(ce=Pe,me=Le);if(we(ce,ce)===0)return me}}function ke(Ee,we,De){for(var Le=(De==null?Ee.length:De)-(we=we==null?0:+we),me,Pe;Le;)Pe=Math.random()*Le--|0,me=Ee[Le+we],Ee[Le+we]=Ee[Pe+we],Ee[Pe+we]=me;return Ee}function Ce(Ee,we){var De=Ee.length,Le=-1,me,Pe=0;if(we==null)for(;++Le<De;)(me=+Ee[Le])&&(Pe+=me);else for(;++Le<De;)(me=+we(Ee[Le],Le,Ee))&&(Pe+=me);return Pe}function ge(Ee){if(!(Pe=Ee.length))return[];for(var we=-1,De=re(Ee,ie),Le=new Array(De);++we<De;)for(var me=-1,Pe,ce=Le[we]=new Array(Pe);++me<Pe;)ce[me]=Ee[me][we];return Le}function ie(Ee){return Ee.length}function Se(){return ge(arguments)}e.bisect=a,e.bisectRight=a,e.bisectLeft=o,e.ascending=t,e.bisector=r,e.cross=u,e.descending=c,e.deviation=d,e.extent=v,e.histogram=z,e.thresholdFreedmanDiaconis=U,e.thresholdScott=G,e.thresholdSturges=E,e.max=Z,e.mean=j,e.median=N,e.merge=H,e.min=re,e.pairs=s,e.permute=oe,e.quantile=q,e.range=T,e.scan=_e,e.shuffle=ke,e.sum=Ce,e.ticks=S,e.tickIncrement=g,e.tickStep=P,e.transpose=ge,e.variance=h,e.zip=Se,Object.defineProperty(e,"__esModule",{value:!0})})});var NZ=ye((DF,ODe)=>{(function(e,t){typeof DF=="object"&&typeof ODe!="undefined"?t(DF,hk()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(DF,function(e,t){"use strict";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(kt){a(i,kt,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(kt,Zt,Mr){var xr=kt.s=Zt+Mr,Kr=xr-Zt,Mi=xr-Kr;kt.t=Zt-Mi+(Mr-Kr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,h=180/l,d=l/180,v=Math.abs,m=Math.atan,b=Math.atan2,p=Math.cos,k=Math.ceil,M=Math.exp,T=Math.log,L=Math.pow,x=Math.sin,C=Math.sign||function(kt){return kt>0?1:kt<0?-1:0},S=Math.sqrt,g=Math.tan;function P(kt){return kt>1?0:kt<-1?l:Math.acos(kt)}function E(kt){return kt>1?u:kt<-1?-u:Math.asin(kt)}function z(kt){return(kt=x(kt/2))*kt}function q(){}function U(kt,Zt){kt&&Z.hasOwnProperty(kt.type)&&Z[kt.type](kt,Zt)}var G={Feature:function(kt,Zt){U(kt.geometry,Zt)},FeatureCollection:function(kt,Zt){for(var Mr=kt.features,xr=-1,Kr=Mr.length;++xr<Kr;)U(Mr[xr].geometry,Zt)}},Z={Sphere:function(kt,Zt){Zt.sphere()},Point:function(kt,Zt){kt=kt.coordinates,Zt.point(kt[0],kt[1],kt[2])},MultiPoint:function(kt,Zt){for(var Mr=kt.coordinates,xr=-1,Kr=Mr.length;++xr<Kr;)kt=Mr[xr],Zt.point(kt[0],kt[1],kt[2])},LineString:function(kt,Zt){j(kt.coordinates,Zt,0)},MultiLineString:function(kt,Zt){for(var Mr=kt.coordinates,xr=-1,Kr=Mr.length;++xr<Kr;)j(Mr[xr],Zt,0)},Polygon:function(kt,Zt){N(kt.coordinates,Zt)},MultiPolygon:function(kt,Zt){for(var Mr=kt.coordinates,xr=-1,Kr=Mr.length;++xr<Kr;)N(Mr[xr],Zt)},GeometryCollection:function(kt,Zt){for(var Mr=kt.geometries,xr=-1,Kr=Mr.length;++xr<Kr;)U(Mr[xr],Zt)}};function j(kt,Zt,Mr){var xr=-1,Kr=kt.length-Mr,Mi;for(Zt.lineStart();++xr<Kr;)Mi=kt[xr],Zt.point(Mi[0],Mi[1],Mi[2]);Zt.lineEnd()}function N(kt,Zt){var Mr=-1,xr=kt.length;for(Zt.polygonStart();++Mr<xr;)j(kt[Mr],Zt,1);Zt.polygonEnd()}function H(kt,Zt){kt&&G.hasOwnProperty(kt.type)?G[kt.type](kt,Zt):U(kt,Zt)}var re=r(),oe=r(),_e,ke,Ce,ge,ie,Se={point:q,lineStart:q,lineEnd:q,polygonStart:function(){re.reset(),Se.lineStart=Ee,Se.lineEnd=we},polygonEnd:function(){var kt=+re;oe.add(kt<0?f+kt:kt),this.lineStart=this.lineEnd=this.point=q},sphere:function(){oe.add(f)}};function Ee(){Se.point=De}function we(){Le(_e,ke)}function De(kt,Zt){Se.point=Le,_e=kt,ke=Zt,kt*=d,Zt*=d,Ce=kt,ge=p(Zt=Zt/2+c),ie=x(Zt)}function Le(kt,Zt){kt*=d,Zt*=d,Zt=Zt/2+c;var Mr=kt-Ce,xr=Mr>=0?1:-1,Kr=xr*Mr,Mi=p(Zt),Wi=x(Zt),dn=ie*Wi,wn=ge*Mi+dn*p(Kr),On=dn*xr*x(Kr);re.add(b(On,wn)),Ce=kt,ge=Mi,ie=Wi}function me(kt){return oe.reset(),H(kt,Se),oe*2}function Pe(kt){return[b(kt[1],kt[0]),E(kt[2])]}function ce(kt){var Zt=kt[0],Mr=kt[1],xr=p(Mr);return[xr*p(Zt),xr*x(Zt),x(Mr)]}function He(kt,Zt){return kt[0]*Zt[0]+kt[1]*Zt[1]+kt[2]*Zt[2]}function lt(kt,Zt){return[kt[1]*Zt[2]-kt[2]*Zt[1],kt[2]*Zt[0]-kt[0]*Zt[2],kt[0]*Zt[1]-kt[1]*Zt[0]]}function mt(kt,Zt){kt[0]+=Zt[0],kt[1]+=Zt[1],kt[2]+=Zt[2]}function Vt(kt,Zt){return[kt[0]*Zt,kt[1]*Zt,kt[2]*Zt]}function st(kt){var Zt=S(kt[0]*kt[0]+kt[1]*kt[1]+kt[2]*kt[2]);kt[0]/=Zt,kt[1]/=Zt,kt[2]/=Zt}var ct,Qt,Ht,nr,tt,je,Ue,Ae,rt=r(),St,Tt,dt={point:Et,lineStart:Xt,lineEnd:or,polygonStart:function(){dt.point=_r,dt.lineStart=Er,dt.lineEnd=ei,rt.reset(),Se.polygonStart()},polygonEnd:function(){Se.polygonEnd(),dt.point=Et,dt.lineStart=Xt,dt.lineEnd=or,re<0?(ct=-(Ht=180),Qt=-(nr=90)):rt>o?nr=90:rt<-o&&(Qt=-90),Tt[0]=ct,Tt[1]=Ht},sphere:function(){ct=-(Ht=180),Qt=-(nr=90)}};function Et(kt,Zt){St.push(Tt=[ct=kt,Ht=kt]),Zt<Qt&&(Qt=Zt),Zt>nr&&(nr=Zt)}function pt(kt,Zt){var Mr=ce([kt*d,Zt*d]);if(Ae){var xr=lt(Ae,Mr),Kr=[xr[1],-xr[0],0],Mi=lt(Kr,xr);st(Mi),Mi=Pe(Mi);var Wi=kt-tt,dn=Wi>0?1:-1,wn=Mi[0]*h*dn,On,Yi=v(Wi)>180;Yi^(dn*tt<wn&&wn<dn*kt)?(On=Mi[1]*h,On>nr&&(nr=On)):(wn=(wn+360)%360-180,Yi^(dn*tt<wn&&wn<dn*kt)?(On=-Mi[1]*h,On<Qt&&(Qt=On)):(Zt<Qt&&(Qt=Zt),Zt>nr&&(nr=Zt))),Yi?kt<tt?qr(ct,kt)>qr(ct,Ht)&&(Ht=kt):qr(kt,Ht)>qr(ct,Ht)&&(ct=kt):Ht>=ct?(kt<ct&&(ct=kt),kt>Ht&&(Ht=kt)):kt>tt?qr(ct,kt)>qr(ct,Ht)&&(Ht=kt):qr(kt,Ht)>qr(ct,Ht)&&(ct=kt)}else St.push(Tt=[ct=kt,Ht=kt]);Zt<Qt&&(Qt=Zt),Zt>nr&&(nr=Zt),Ae=Mr,tt=kt}function Xt(){dt.point=pt}function or(){Tt[0]=ct,Tt[1]=Ht,dt.point=Et,Ae=null}function _r(kt,Zt){if(Ae){var Mr=kt-tt;rt.add(v(Mr)>180?Mr+(Mr>0?360:-360):Mr)}else je=kt,Ue=Zt;Se.point(kt,Zt),pt(kt,Zt)}function Er(){Se.lineStart()}function ei(){_r(je,Ue),Se.lineEnd(),v(rt)>o&&(ct=-(Ht=180)),Tt[0]=ct,Tt[1]=Ht,Ae=null}function qr(kt,Zt){return(Zt-=kt)<0?Zt+360:Zt}function jr(kt,Zt){return kt[0]-Zt[0]}function gt(kt,Zt){return kt[0]<=kt[1]?kt[0]<=Zt&&Zt<=kt[1]:Zt<kt[0]||kt[1]<Zt}function Ge(kt){var Zt,Mr,xr,Kr,Mi,Wi,dn;if(nr=Ht=-(ct=Qt=1/0),St=[],H(kt,dt),Mr=St.length){for(St.sort(jr),Zt=1,xr=St[0],Mi=[xr];Zt<Mr;++Zt)Kr=St[Zt],gt(xr,Kr[0])||gt(xr,Kr[1])?(qr(xr[0],Kr[1])>qr(xr[0],xr[1])&&(xr[1]=Kr[1]),qr(Kr[0],xr[1])>qr(xr[0],xr[1])&&(xr[0]=Kr[0])):Mi.push(xr=Kr);for(Wi=-1/0,Mr=Mi.length-1,Zt=0,xr=Mi[Mr];Zt<=Mr;xr=Kr,++Zt)Kr=Mi[Zt],(dn=qr(xr[1],Kr[0]))>Wi&&(Wi=dn,ct=Kr[0],Ht=xr[1])}return St=Tt=null,ct===1/0||Qt===1/0?[[NaN,NaN],[NaN,NaN]]:[[ct,Qt],[Ht,nr]]}var Je,We,et,xt,At,Kt,er,Sr,Gr,Ir,Yr,_i,Pi,ai,mi,un,Fn={sphere:q,point:An,lineStart:Qn,lineEnd:Jn,polygonStart:function(){Fn.lineStart=Gt,Fn.lineEnd=wt},polygonEnd:function(){Fn.lineStart=Qn,Fn.lineEnd=Jn}};function An(kt,Zt){kt*=d,Zt*=d;var Mr=p(Zt);Hn(Mr*p(kt),Mr*x(kt),x(Zt))}function Hn(kt,Zt,Mr){++Je,et+=(kt-et)/Je,xt+=(Zt-xt)/Je,At+=(Mr-At)/Je}function Qn(){Fn.point=Vi}function Vi(kt,Zt){kt*=d,Zt*=d;var Mr=p(Zt);ai=Mr*p(kt),mi=Mr*x(kt),un=x(Zt),Fn.point=Kn,Hn(ai,mi,un)}function Kn(kt,Zt){kt*=d,Zt*=d;var Mr=p(Zt),xr=Mr*p(kt),Kr=Mr*x(kt),Mi=x(Zt),Wi=b(S((Wi=mi*Mi-un*Kr)*Wi+(Wi=un*xr-ai*Mi)*Wi+(Wi=ai*Kr-mi*xr)*Wi),ai*xr+mi*Kr+un*Mi);We+=Wi,Kt+=Wi*(ai+(ai=xr)),er+=Wi*(mi+(mi=Kr)),Sr+=Wi*(un+(un=Mi)),Hn(ai,mi,un)}function Jn(){Fn.point=An}function Gt(){Fn.point=rr}function wt(){ir(_i,Pi),Fn.point=An}function rr(kt,Zt){_i=kt,Pi=Zt,kt*=d,Zt*=d,Fn.point=ir;var Mr=p(Zt);ai=Mr*p(kt),mi=Mr*x(kt),un=x(Zt),Hn(ai,mi,un)}function ir(kt,Zt){kt*=d,Zt*=d;var Mr=p(Zt),xr=Mr*p(kt),Kr=Mr*x(kt),Mi=x(Zt),Wi=mi*Mi-un*Kr,dn=un*xr-ai*Mi,wn=ai*Kr-mi*xr,On=S(Wi*Wi+dn*dn+wn*wn),Yi=E(On),$i=On&&-Yi/On;Gr+=$i*Wi,Ir+=$i*dn,Yr+=$i*wn,We+=Yi,Kt+=Yi*(ai+(ai=xr)),er+=Yi*(mi+(mi=Kr)),Sr+=Yi*(un+(un=Mi)),Hn(ai,mi,un)}function wr(kt){Je=We=et=xt=At=Kt=er=Sr=Gr=Ir=Yr=0,H(kt,Fn);var Zt=Gr,Mr=Ir,xr=Yr,Kr=Zt*Zt+Mr*Mr+xr*xr;return Kr<s&&(Zt=Kt,Mr=er,xr=Sr,We<o&&(Zt=et,Mr=xt,xr=At),Kr=Zt*Zt+Mr*Mr+xr*xr,Kr<s)?[NaN,NaN]:[b(Mr,Zt)*h,E(xr/S(Kr))*h]}function Xr(kt){return function(){return kt}}function ti(kt,Zt){function Mr(xr,Kr){return xr=kt(xr,Kr),Zt(xr[0],xr[1])}return kt.invert&&Zt.invert&&(Mr.invert=function(xr,Kr){return xr=Zt.invert(xr,Kr),xr&&kt.invert(xr[0],xr[1])}),Mr}function $r(kt,Zt){return[v(kt)>l?kt+Math.round(-kt/f)*f:kt,Zt]}$r.invert=$r;function Ri(kt,Zt,Mr){return(kt%=f)?Zt||Mr?ti(en(kt),fn(Zt,Mr)):en(kt):Zt||Mr?fn(Zt,Mr):$r}function Zi(kt){return function(Zt,Mr){return Zt+=kt,[Zt>l?Zt-f:Zt<-l?Zt+f:Zt,Mr]}}function en(kt){var Zt=Zi(kt);return Zt.invert=Zi(-kt),Zt}function fn(kt,Zt){var Mr=p(kt),xr=x(kt),Kr=p(Zt),Mi=x(Zt);function Wi(dn,wn){var On=p(wn),Yi=p(dn)*On,$i=x(dn)*On,an=x(wn),Fi=an*Mr+Yi*xr;return[b($i*Kr-Fi*Mi,Yi*Mr-an*xr),E(Fi*Kr+$i*Mi)]}return Wi.invert=function(dn,wn){var On=p(wn),Yi=p(dn)*On,$i=x(dn)*On,an=x(wn),Fi=an*Kr-$i*Mi;return[b($i*Kr+an*Mi,Yi*Mr+Fi*xr),E(Fi*Mr-Yi*xr)]},Wi}function yn(kt){kt=Ri(kt[0]*d,kt[1]*d,kt.length>2?kt[2]*d:0);function Zt(Mr){return Mr=kt(Mr[0]*d,Mr[1]*d),Mr[0]*=h,Mr[1]*=h,Mr}return Zt.invert=function(Mr){return Mr=kt.invert(Mr[0]*d,Mr[1]*d),Mr[0]*=h,Mr[1]*=h,Mr},Zt}function Mn(kt,Zt,Mr,xr,Kr,Mi){if(Mr){var Wi=p(Zt),dn=x(Zt),wn=xr*Mr;Kr==null?(Kr=Zt+xr*f,Mi=Zt-wn/2):(Kr=Ba(Wi,Kr),Mi=Ba(Wi,Mi),(xr>0?Kr<Mi:Kr>Mi)&&(Kr+=xr*f));for(var On,Yi=Kr;xr>0?Yi>Mi:Yi<Mi;Yi-=wn)On=Pe([Wi,-dn*p(Yi),-dn*x(Yi)]),kt.point(On[0],On[1])}}function Ba(kt,Zt){Zt=ce(Zt),Zt[0]-=kt,st(Zt);var Mr=P(-Zt[1]);return((-Zt[2]<0?-Mr:Mr)+f-o)%f}function ua(){var kt=Xr([0,0]),Zt=Xr(90),Mr=Xr(6),xr,Kr,Mi={point:Wi};function Wi(wn,On){xr.push(wn=Kr(wn,On)),wn[0]*=h,wn[1]*=h}function dn(){var wn=kt.apply(this,arguments),On=Zt.apply(this,arguments)*d,Yi=Mr.apply(this,arguments)*d;return xr=[],Kr=Ri(-wn[0]*d,-wn[1]*d,0).invert,Mn(Mi,On,Yi,1),wn={type:"Polygon",coordinates:[xr]},xr=Kr=null,wn}return dn.center=function(wn){return arguments.length?(kt=typeof wn=="function"?wn:Xr([+wn[0],+wn[1]]),dn):kt},dn.radius=function(wn){return arguments.length?(Zt=typeof wn=="function"?wn:Xr(+wn),dn):Zt},dn.precision=function(wn){return arguments.length?(Mr=typeof wn=="function"?wn:Xr(+wn),dn):Mr},dn}function ma(){var kt=[],Zt;return{point:function(Mr,xr,Kr){Zt.push([Mr,xr,Kr])},lineStart:function(){kt.push(Zt=[])},lineEnd:q,rejoin:function(){kt.length>1&&kt.push(kt.pop().concat(kt.shift()))},result:function(){var Mr=kt;return kt=[],Zt=null,Mr}}}function Wa(kt,Zt){return v(kt[0]-Zt[0])<o&&v(kt[1]-Zt[1])<o}function Fa(kt,Zt,Mr,xr){this.x=kt,this.z=Zt,this.o=Mr,this.e=xr,this.v=!1,this.n=this.p=null}function Xo(kt,Zt,Mr,xr,Kr){var Mi=[],Wi=[],dn,wn;if(kt.forEach(function(ta){if(!((Ca=ta.length-1)<=0)){var Ca,Ra=ta[0],La=ta[Ca],Na;if(Wa(Ra,La)){if(!Ra[2]&&!La[2]){for(Kr.lineStart(),dn=0;dn<Ca;++dn)Kr.point((Ra=ta[dn])[0],Ra[1]);Kr.lineEnd();return}La[0]+=2*o}Mi.push(Na=new Fa(Ra,ta,null,!0)),Wi.push(Na.o=new Fa(Ra,null,Na,!1)),Mi.push(Na=new Fa(La,ta,null,!1)),Wi.push(Na.o=new Fa(La,null,Na,!0))}}),!!Mi.length){for(Wi.sort(Zt),da(Mi),da(Wi),dn=0,wn=Wi.length;dn<wn;++dn)Wi[dn].e=Mr=!Mr;for(var On=Mi[0],Yi,$i;;){for(var an=On,Fi=!0;an.v;)if((an=an.n)===On)return;Yi=an.z,Kr.lineStart();do{if(an.v=an.o.v=!0,an.e){if(Fi)for(dn=0,wn=Yi.length;dn<wn;++dn)Kr.point(($i=Yi[dn])[0],$i[1]);else xr(an.x,an.n.x,1,Kr);an=an.n}else{if(Fi)for(Yi=an.p.z,dn=Yi.length-1;dn>=0;--dn)Kr.point(($i=Yi[dn])[0],$i[1]);else xr(an.x,an.p.x,-1,Kr);an=an.p}an=an.o,Yi=an.z,Fi=!Fi}while(!an.v);Kr.lineEnd()}}}function da(kt){if(Zt=kt.length){for(var Zt,Mr=0,xr=kt[0],Kr;++Mr<Zt;)xr.n=Kr=kt[Mr],Kr.p=xr,xr=Kr;xr.n=Kr=kt[0],Kr.p=xr}}var jn=r();function Ha(kt){return v(kt[0])<=l?kt[0]:C(kt[0])*((v(kt[0])+l)%f-l)}function vo(kt,Zt){var Mr=Ha(Zt),xr=Zt[1],Kr=x(xr),Mi=[x(Mr),-p(Mr),0],Wi=0,dn=0;jn.reset(),Kr===1?xr=u+o:Kr===-1&&(xr=-u-o);for(var wn=0,On=kt.length;wn<On;++wn)if($i=(Yi=kt[wn]).length)for(var Yi,$i,an=Yi[$i-1],Fi=Ha(an),ta=an[1]/2+c,Ca=x(ta),Ra=p(ta),La=0;La<$i;++La,Fi=Zn,Ca=Ka,Ra=bo,an=Na){var Na=Yi[La],Zn=Ha(Na),Dn=Na[1]/2+c,Ka=x(Dn),bo=p(Dn),Zo=Zn-Fi,Ss=Zo>=0?1:-1,as=Ss*Zo,ws=as>l,Ho=Ca*Ka;if(jn.add(b(Ho*Ss*x(as),Ra*bo+Ho*p(as))),Wi+=ws?Zo+Ss*f:Zo,ws^Fi>=Mr^Zn>=Mr){var ml=lt(ce(an),ce(Na));st(ml);var Ws=lt(Mi,ml);st(Ws);var Ls=(ws^Zo>=0?-1:1)*E(Ws[2]);(xr>Ls||xr===Ls&&(ml[0]||ml[1]))&&(dn+=ws^Zo>=0?1:-1)}}return(Wi<-o||Wi<o&&jn<-o)^dn&1}function Gn(kt,Zt,Mr,xr){return function(Kr){var Mi=Zt(Kr),Wi=ma(),dn=Zt(Wi),wn=!1,On,Yi,$i,an={point:Fi,lineStart:Ca,lineEnd:Ra,polygonStart:function(){an.point=La,an.lineStart=Na,an.lineEnd=Zn,Yi=[],On=[]},polygonEnd:function(){an.point=Fi,an.lineStart=Ca,an.lineEnd=Ra,Yi=t.merge(Yi);var Dn=vo(On,xr);Yi.length?(wn||(Kr.polygonStart(),wn=!0),Xo(Yi,Ar,Dn,Mr,Kr)):Dn&&(wn||(Kr.polygonStart(),wn=!0),Kr.lineStart(),Mr(null,null,1,Kr),Kr.lineEnd()),wn&&(Kr.polygonEnd(),wn=!1),Yi=On=null},sphere:function(){Kr.polygonStart(),Kr.lineStart(),Mr(null,null,1,Kr),Kr.lineEnd(),Kr.polygonEnd()}};function Fi(Dn,Ka){kt(Dn,Ka)&&Kr.point(Dn,Ka)}function ta(Dn,Ka){Mi.point(Dn,Ka)}function Ca(){an.point=ta,Mi.lineStart()}function Ra(){an.point=Fi,Mi.lineEnd()}function La(Dn,Ka){$i.push([Dn,Ka]),dn.point(Dn,Ka)}function Na(){dn.lineStart(),$i=[]}function Zn(){La($i[0][0],$i[0][1]),dn.lineEnd();var Dn=dn.clean(),Ka=Wi.result(),bo,Zo=Ka.length,Ss,as,ws;if($i.pop(),On.push($i),$i=null,!!Zo){if(Dn&1){if(as=Ka[0],(Ss=as.length-1)>0){for(wn||(Kr.polygonStart(),wn=!0),Kr.lineStart(),bo=0;bo<Ss;++bo)Kr.point((ws=as[bo])[0],ws[1]);Kr.lineEnd()}return}Zo>1&&Dn&2&&Ka.push(Ka.pop().concat(Ka.shift())),Yi.push(Ka.filter(Ct))}}return an}}function Ct(kt){return kt.length>1}function Ar(kt,Zt){return((kt=kt.x)[0]<0?kt[1]-u-o:u-kt[1])-((Zt=Zt.x)[0]<0?Zt[1]-u-o:u-Zt[1])}var Jr=Gn(function(){return!0},hi,Sn,[-l,-u]);function hi(kt){var Zt=NaN,Mr=NaN,xr=NaN,Kr;return{lineStart:function(){kt.lineStart(),Kr=1},point:function(Mi,Wi){var dn=Mi>0?l:-l,wn=v(Mi-Zt);v(wn-l)<o?(kt.point(Zt,Mr=(Mr+Wi)/2>0?u:-u),kt.point(xr,Mr),kt.lineEnd(),kt.lineStart(),kt.point(dn,Mr),kt.point(Mi,Mr),Kr=0):xr!==dn&&wn>=l&&(v(Zt-xr)<o&&(Zt-=xr*o),v(Mi-dn)<o&&(Mi-=dn*o),Mr=hn(Zt,Mr,Mi,Wi),kt.point(xr,Mr),kt.lineEnd(),kt.lineStart(),kt.point(dn,Mr),Kr=0),kt.point(Zt=Mi,Mr=Wi),xr=dn},lineEnd:function(){kt.lineEnd(),Zt=Mr=NaN},clean:function(){return 2-Kr}}}function hn(kt,Zt,Mr,xr){var Kr,Mi,Wi=x(kt-Mr);return v(Wi)>o?m((x(Zt)*(Mi=p(xr))*x(Mr)-x(xr)*(Kr=p(Zt))*x(kt))/(Kr*Mi*Wi)):(Zt+xr)/2}function Sn(kt,Zt,Mr,xr){var Kr;if(kt==null)Kr=Mr*u,xr.point(-l,Kr),xr.point(0,Kr),xr.point(l,Kr),xr.point(l,0),xr.point(l,-Kr),xr.point(0,-Kr),xr.point(-l,-Kr),xr.point(-l,0),xr.point(-l,Kr);else if(v(kt[0]-Zt[0])>o){var Mi=kt[0]<Zt[0]?l:-l;Kr=Mr*Mi/2,xr.point(-Mi,Kr),xr.point(0,Kr),xr.point(Mi,Kr)}else xr.point(Zt[0],Zt[1])}function En(kt){var Zt=p(kt),Mr=6*d,xr=Zt>0,Kr=v(Zt)>o;function Mi(Yi,$i,an,Fi){Mn(Fi,kt,Mr,an,Yi,$i)}function Wi(Yi,$i){return p(Yi)*p($i)>Zt}function dn(Yi){var $i,an,Fi,ta,Ca;return{lineStart:function(){ta=Fi=!1,Ca=1},point:function(Ra,La){var Na=[Ra,La],Zn,Dn=Wi(Ra,La),Ka=xr?Dn?0:On(Ra,La):Dn?On(Ra+(Ra<0?l:-l),La):0;if(!$i&&(ta=Fi=Dn)&&Yi.lineStart(),Dn!==Fi&&(Zn=wn($i,Na),(!Zn||Wa($i,Zn)||Wa(Na,Zn))&&(Na[2]=1)),Dn!==Fi)Ca=0,Dn?(Yi.lineStart(),Zn=wn(Na,$i),Yi.point(Zn[0],Zn[1])):(Zn=wn($i,Na),Yi.point(Zn[0],Zn[1],2),Yi.lineEnd()),$i=Zn;else if(Kr&&$i&&xr^Dn){var bo;!(Ka&an)&&(bo=wn(Na,$i,!0))&&(Ca=0,xr?(Yi.lineStart(),Yi.point(bo[0][0],bo[0][1]),Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd()):(Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd(),Yi.lineStart(),Yi.point(bo[0][0],bo[0][1],3)))}Dn&&(!$i||!Wa($i,Na))&&Yi.point(Na[0],Na[1]),$i=Na,Fi=Dn,an=Ka},lineEnd:function(){Fi&&Yi.lineEnd(),$i=null},clean:function(){return Ca|(ta&&Fi)<<1}}}function wn(Yi,$i,an){var Fi=ce(Yi),ta=ce($i),Ca=[1,0,0],Ra=lt(Fi,ta),La=He(Ra,Ra),Na=Ra[0],Zn=La-Na*Na;if(!Zn)return!an&&Yi;var Dn=Zt*La/Zn,Ka=-Zt*Na/Zn,bo=lt(Ca,Ra),Zo=Vt(Ca,Dn),Ss=Vt(Ra,Ka);mt(Zo,Ss);var as=bo,ws=He(Zo,as),Ho=He(as,as),ml=ws*ws-Ho*(He(Zo,Zo)-1);if(!(ml<0)){var Ws=S(ml),Ls=Vt(as,(-ws-Ws)/Ho);if(mt(Ls,Zo),Ls=Pe(Ls),!an)return Ls;var va=Yi[0],no=$i[0],ys=Yi[1],rs=$i[1],Ql;no<va&&(Ql=va,va=no,no=Ql);var Cu=no-va,Yu=v(Cu-l)<o,Nc=Yu||Cu<o;if(!Yu&&rs<ys&&(Ql=ys,ys=rs,rs=Ql),Nc?Yu?ys+rs>0^Ls[1]<(v(Ls[0]-va)<o?ys:rs):ys<=Ls[1]&&Ls[1]<=rs:Cu>l^(va<=Ls[0]&&Ls[0]<=no)){var pu=Vt(as,(-ws+Ws)/Ho);return mt(pu,Zo),[Ls,Pe(pu)]}}}function On(Yi,$i){var an=xr?kt:l-kt,Fi=0;return Yi<-an?Fi|=1:Yi>an&&(Fi|=2),$i<-an?Fi|=4:$i>an&&(Fi|=8),Fi}return Gn(Wi,dn,Mi,xr?[0,-kt]:[-l,kt-l])}function ki(kt,Zt,Mr,xr,Kr,Mi){var Wi=kt[0],dn=kt[1],wn=Zt[0],On=Zt[1],Yi=0,$i=1,an=wn-Wi,Fi=On-dn,ta;if(ta=Mr-Wi,!(!an&&ta>0)){if(ta/=an,an<0){if(ta<Yi)return;ta<$i&&($i=ta)}else if(an>0){if(ta>$i)return;ta>Yi&&(Yi=ta)}if(ta=Kr-Wi,!(!an&&ta<0)){if(ta/=an,an<0){if(ta>$i)return;ta>Yi&&(Yi=ta)}else if(an>0){if(ta<Yi)return;ta<$i&&($i=ta)}if(ta=xr-dn,!(!Fi&&ta>0)){if(ta/=Fi,Fi<0){if(ta<Yi)return;ta<$i&&($i=ta)}else if(Fi>0){if(ta>$i)return;ta>Yi&&(Yi=ta)}if(ta=Mi-dn,!(!Fi&&ta<0)){if(ta/=Fi,Fi<0){if(ta>$i)return;ta>Yi&&(Yi=ta)}else if(Fi>0){if(ta<Yi)return;ta<$i&&($i=ta)}return Yi>0&&(kt[0]=Wi+Yi*an,kt[1]=dn+Yi*Fi),$i<1&&(Zt[0]=Wi+$i*an,Zt[1]=dn+$i*Fi),!0}}}}}var _n=1e9,ya=-_n;function ea(kt,Zt,Mr,xr){function Kr(On,Yi){return kt<=On&&On<=Mr&&Zt<=Yi&&Yi<=xr}function Mi(On,Yi,$i,an){var Fi=0,ta=0;if(On==null||(Fi=Wi(On,$i))!==(ta=Wi(Yi,$i))||wn(On,Yi)<0^$i>0)do an.point(Fi===0||Fi===3?kt:Mr,Fi>1?xr:Zt);while((Fi=(Fi+$i+4)%4)!==ta);else an.point(Yi[0],Yi[1])}function Wi(On,Yi){return v(On[0]-kt)<o?Yi>0?0:3:v(On[0]-Mr)<o?Yi>0?2:1:v(On[1]-Zt)<o?Yi>0?1:0:Yi>0?3:2}function dn(On,Yi){return wn(On.x,Yi.x)}function wn(On,Yi){var $i=Wi(On,1),an=Wi(Yi,1);return $i!==an?$i-an:$i===0?Yi[1]-On[1]:$i===1?On[0]-Yi[0]:$i===2?On[1]-Yi[1]:Yi[0]-On[0]}return function(On){var Yi=On,$i=ma(),an,Fi,ta,Ca,Ra,La,Na,Zn,Dn,Ka,bo,Zo={point:Ss,lineStart:ml,lineEnd:Ws,polygonStart:ws,polygonEnd:Ho};function Ss(va,no){Kr(va,no)&&Yi.point(va,no)}function as(){for(var va=0,no=0,ys=Fi.length;no<ys;++no)for(var rs=Fi[no],Ql=1,Cu=rs.length,Yu=rs[0],Nc,pu,Uc=Yu[0],xu=Yu[1];Ql<Cu;++Ql)Nc=Uc,pu=xu,Yu=rs[Ql],Uc=Yu[0],xu=Yu[1],pu<=xr?xu>xr&&(Uc-Nc)*(xr-pu)>(xu-pu)*(kt-Nc)&&++va:xu<=xr&&(Uc-Nc)*(xr-pu)<(xu-pu)*(kt-Nc)&&--va;return va}function ws(){Yi=$i,an=[],Fi=[],bo=!0}function Ho(){var va=as(),no=bo&&va,ys=(an=t.merge(an)).length;(no||ys)&&(On.polygonStart(),no&&(On.lineStart(),Mi(null,null,1,On),On.lineEnd()),ys&&Xo(an,dn,va,Mi,On),On.polygonEnd()),Yi=On,an=Fi=ta=null}function ml(){Zo.point=Ls,Fi&&Fi.push(ta=[]),Ka=!0,Dn=!1,Na=Zn=NaN}function Ws(){an&&(Ls(Ca,Ra),La&&Dn&&$i.rejoin(),an.push($i.result())),Zo.point=Ss,Dn&&Yi.lineEnd()}function Ls(va,no){var ys=Kr(va,no);if(Fi&&ta.push([va,no]),Ka)Ca=va,Ra=no,La=ys,Ka=!1,ys&&(Yi.lineStart(),Yi.point(va,no));else if(ys&&Dn)Yi.point(va,no);else{var rs=[Na=Math.max(ya,Math.min(_n,Na)),Zn=Math.max(ya,Math.min(_n,Zn))],Ql=[va=Math.max(ya,Math.min(_n,va)),no=Math.max(ya,Math.min(_n,no))];ki(rs,Ql,kt,Zt,Mr,xr)?(Dn||(Yi.lineStart(),Yi.point(rs[0],rs[1])),Yi.point(Ql[0],Ql[1]),ys||Yi.lineEnd(),bo=!1):ys&&(Yi.lineStart(),Yi.point(va,no),bo=!1)}Na=va,Zn=no,Dn=ys}return Zo}}function Ma(){var kt=0,Zt=0,Mr=960,xr=500,Kr,Mi,Wi;return Wi={stream:function(dn){return Kr&&Mi===dn?Kr:Kr=ea(kt,Zt,Mr,xr)(Mi=dn)},extent:function(dn){return arguments.length?(kt=+dn[0][0],Zt=+dn[0][1],Mr=+dn[1][0],xr=+dn[1][1],Kr=Mi=null,Wi):[[kt,Zt],[Mr,xr]]}}}var _o=r(),No,po,Lo,ko={sphere:q,point:q,lineStart:Ds,lineEnd:q,polygonStart:q,polygonEnd:q};function Ds(){ko.point=ll,ko.lineEnd=Fs}function Fs(){ko.point=ko.lineEnd=q}function ll(kt,Zt){kt*=d,Zt*=d,No=kt,po=x(Zt),Lo=p(Zt),ko.point=ul}function ul(kt,Zt){kt*=d,Zt*=d;var Mr=x(Zt),xr=p(Zt),Kr=v(kt-No),Mi=p(Kr),Wi=x(Kr),dn=xr*Wi,wn=Lo*Mr-po*xr*Mi,On=po*Mr+Lo*xr*Mi;_o.add(b(S(dn*dn+wn*wn),On)),No=kt,po=Mr,Lo=xr}function zl(kt){return _o.reset(),H(kt,ko),+_o}var us=[null,null],il={type:"LineString",coordinates:us};function As(kt,Zt){return us[0]=kt,us[1]=Zt,zl(il)}var cl={Feature:function(kt,Zt){return zs(kt.geometry,Zt)},FeatureCollection:function(kt,Zt){for(var Mr=kt.features,xr=-1,Kr=Mr.length;++xr<Kr;)if(zs(Mr[xr].geometry,Zt))return!0;return!1}},Ks={Sphere:function(){return!0},Point:function(kt,Zt){return Io(kt.coordinates,Zt)},MultiPoint:function(kt,Zt){for(var Mr=kt.coordinates,xr=-1,Kr=Mr.length;++xr<Kr;)if(Io(Mr[xr],Zt))return!0;return!1},LineString:function(kt,Zt){return ls(kt.coordinates,Zt)},MultiLineString:function(kt,Zt){for(var Mr=kt.coordinates,xr=-1,Kr=Mr.length;++xr<Kr;)if(ls(Mr[xr],Zt))return!0;return!1},Polygon:function(kt,Zt){return Yl(kt.coordinates,Zt)},MultiPolygon:function(kt,Zt){for(var Mr=kt.coordinates,xr=-1,Kr=Mr.length;++xr<Kr;)if(Yl(Mr[xr],Zt))return!0;return!1},GeometryCollection:function(kt,Zt){for(var Mr=kt.geometries,xr=-1,Kr=Mr.length;++xr<Kr;)if(zs(Mr[xr],Zt))return!0;return!1}};function zs(kt,Zt){return kt&&Ks.hasOwnProperty(kt.type)?Ks[kt.type](kt,Zt):!1}function Io(kt,Zt){return As(kt,Zt)===0}function ls(kt,Zt){for(var Mr,xr,Kr,Mi=0,Wi=kt.length;Mi<Wi;Mi++){if(xr=As(kt[Mi],Zt),xr===0||Mi>0&&(Kr=As(kt[Mi],kt[Mi-1]),Kr>0&&Mr<=Kr&&xr<=Kr&&(Mr+xr-Kr)*(1-Math.pow((Mr-xr)/Kr,2))<s*Kr))return!0;Mr=xr}return!1}function Yl(kt,Zt){return!!vo(kt.map(Su),nc(Zt))}function Su(kt){return kt=kt.map(nc),kt.pop(),kt}function nc(kt){return[kt[0]*d,kt[1]*d]}function bs(kt,Zt){return(kt&&cl.hasOwnProperty(kt.type)?cl[kt.type]:zs)(kt,Zt)}function Rn(kt,Zt,Mr){var xr=t.range(kt,Zt-o,Mr).concat(Zt);return function(Kr){return xr.map(function(Mi){return[Kr,Mi]})}}function _a(kt,Zt,Mr){var xr=t.range(kt,Zt-o,Mr).concat(Zt);return function(Kr){return xr.map(function(Mi){return[Mi,Kr]})}}function Vu(){var kt,Zt,Mr,xr,Kr,Mi,Wi,dn,wn=10,On=wn,Yi=90,$i=360,an,Fi,ta,Ca,Ra=2.5;function La(){return{type:"MultiLineString",coordinates:Na()}}function Na(){return t.range(k(xr/Yi)*Yi,Mr,Yi).map(ta).concat(t.range(k(dn/$i)*$i,Wi,$i).map(Ca)).concat(t.range(k(Zt/wn)*wn,kt,wn).filter(function(Zn){return v(Zn%Yi)>o}).map(an)).concat(t.range(k(Mi/On)*On,Kr,On).filter(function(Zn){return v(Zn%$i)>o}).map(Fi))}return La.lines=function(){return Na().map(function(Zn){return{type:"LineString",coordinates:Zn}})},La.outline=function(){return{type:"Polygon",coordinates:[ta(xr).concat(Ca(Wi).slice(1),ta(Mr).reverse().slice(1),Ca(dn).reverse().slice(1))]}},La.extent=function(Zn){return arguments.length?La.extentMajor(Zn).extentMinor(Zn):La.extentMinor()},La.extentMajor=function(Zn){return arguments.length?(xr=+Zn[0][0],Mr=+Zn[1][0],dn=+Zn[0][1],Wi=+Zn[1][1],xr>Mr&&(Zn=xr,xr=Mr,Mr=Zn),dn>Wi&&(Zn=dn,dn=Wi,Wi=Zn),La.precision(Ra)):[[xr,dn],[Mr,Wi]]},La.extentMinor=function(Zn){return arguments.length?(Zt=+Zn[0][0],kt=+Zn[1][0],Mi=+Zn[0][1],Kr=+Zn[1][1],Zt>kt&&(Zn=Zt,Zt=kt,kt=Zn),Mi>Kr&&(Zn=Mi,Mi=Kr,Kr=Zn),La.precision(Ra)):[[Zt,Mi],[kt,Kr]]},La.step=function(Zn){return arguments.length?La.stepMajor(Zn).stepMinor(Zn):La.stepMinor()},La.stepMajor=function(Zn){return arguments.length?(Yi=+Zn[0],$i=+Zn[1],La):[Yi,$i]},La.stepMinor=function(Zn){return arguments.length?(wn=+Zn[0],On=+Zn[1],La):[wn,On]},La.precision=function(Zn){return arguments.length?(Ra=+Zn,an=Rn(Mi,Kr,90),Fi=_a(Zt,kt,Ra),ta=Rn(dn,Wi,90),Ca=_a(xr,Mr,Ra),La):Ra},La.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function ql(){return Vu()()}function xo(kt,Zt){var Mr=kt[0]*d,xr=kt[1]*d,Kr=Zt[0]*d,Mi=Zt[1]*d,Wi=p(xr),dn=x(xr),wn=p(Mi),On=x(Mi),Yi=Wi*p(Mr),$i=Wi*x(Mr),an=wn*p(Kr),Fi=wn*x(Kr),ta=2*E(S(z(Mi-xr)+Wi*wn*z(Kr-Mr))),Ca=x(ta),Ra=ta?function(La){var Na=x(La*=ta)/Ca,Zn=x(ta-La)/Ca,Dn=Zn*Yi+Na*an,Ka=Zn*$i+Na*Fi,bo=Zn*dn+Na*On;return[b(Ka,Dn)*h,b(bo,S(Dn*Dn+Ka*Ka))*h]}:function(){return[Mr*h,xr*h]};return Ra.distance=ta,Ra}function Kl(kt){return kt}var Ns=r(),Hl=r(),ac,oa,qo,Oo,Ol={point:q,lineStart:q,lineEnd:q,polygonStart:function(){Ol.lineStart=Pc,Ol.lineEnd=Vf},polygonEnd:function(){Ol.lineStart=Ol.lineEnd=Ol.point=q,Ns.add(v(Hl)),Hl.reset()},result:function(){var kt=Ns/2;return Ns.reset(),kt}};function Pc(){Ol.point=Do}function Do(kt,Zt){Ol.point=rf,ac=qo=kt,oa=Oo=Zt}function rf(kt,Zt){Hl.add(Oo*kt-qo*Zt),qo=kt,Oo=Zt}function Vf(){rf(ac,oa)}var pl=1/0,Zc=pl,Jl=-pl,qs=Jl,yu={point:oc,lineStart:q,lineEnd:q,polygonStart:q,polygonEnd:q,result:function(){var kt=[[pl,Zc],[Jl,qs]];return Jl=qs=-(Zc=pl=1/0),kt}};function oc(kt,Zt){kt<pl&&(pl=kt),kt>Jl&&(Jl=kt),Zt<Zc&&(Zc=Zt),Zt>qs&&(qs=Zt)}var Cf=0,sc=0,jh=0,Lf=0,cs=0,nf=0,Gf=0,$l=0,fl=0,lc,Fu,Es,Hs,Go={point:ps,lineStart:uc,lineEnd:Os,polygonStart:function(){Go.lineStart=od,Go.lineEnd=Po},polygonEnd:function(){Go.point=ps,Go.lineStart=uc,Go.lineEnd=Os},result:function(){var kt=fl?[Gf/fl,$l/fl]:nf?[Lf/nf,cs/nf]:jh?[Cf/jh,sc/jh]:[NaN,NaN];return Cf=sc=jh=Lf=cs=nf=Gf=$l=fl=0,kt}};function ps(kt,Zt){Cf+=kt,sc+=Zt,++jh}function uc(){Go.point=xl}function xl(kt,Zt){Go.point=Gu,ps(Es=kt,Hs=Zt)}function Gu(kt,Zt){var Mr=kt-Es,xr=Zt-Hs,Kr=S(Mr*Mr+xr*xr);Lf+=Kr*(Es+kt)/2,cs+=Kr*(Hs+Zt)/2,nf+=Kr,ps(Es=kt,Hs=Zt)}function Os(){Go.point=ps}function od(){Go.point=sd}function Po(){Ko(lc,Fu)}function sd(kt,Zt){Go.point=Ko,ps(lc=Es=kt,Fu=Hs=Zt)}function Ko(kt,Zt){var Mr=kt-Es,xr=Zt-Hs,Kr=S(Mr*Mr+xr*xr);Lf+=Kr*(Es+kt)/2,cs+=Kr*(Hs+Zt)/2,nf+=Kr,Kr=Hs*kt-Es*Zt,Gf+=Kr*(Es+kt),$l+=Kr*(Hs+Zt),fl+=Kr*3,ps(Es=kt,Hs=Zt)}function Pa(kt){this._context=kt}Pa.prototype={_radius:4.5,pointRadius:function(kt){return this._radius=kt,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(kt,Zt){switch(this._point){case 0:{this._context.moveTo(kt,Zt),this._point=1;break}case 1:{this._context.lineTo(kt,Zt);break}default:{this._context.moveTo(kt+this._radius,Zt),this._context.arc(kt,Zt,this._radius,0,f);break}}},result:q};var af=r(),Hu,bl,Hf,Ic,yf,Bl={point:q,lineStart:function(){Bl.point=Ah},lineEnd:function(){Hu&&Qf(bl,Hf),Bl.point=q},polygonStart:function(){Hu=!0},polygonEnd:function(){Hu=null},result:function(){var kt=+af;return af.reset(),kt}};function Ah(kt,Zt){Bl.point=Qf,bl=Ic=kt,Hf=yf=Zt}function Qf(kt,Zt){Ic-=kt,yf-=Zt,af.add(S(Ic*Ic+yf*yf)),Ic=kt,yf=Zt}function _f(){this._string=[]}_f.prototype={_radius:4.5,_circle:Yc(4.5),pointRadius:function(kt){return(kt=+kt)!==this._radius&&(this._radius=kt,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(kt,Zt){switch(this._point){case 0:{this._string.push("M",kt,",",Zt),this._point=1;break}case 1:{this._string.push("L",kt,",",Zt);break}default:{this._circle==null&&(this._circle=Yc(this._radius)),this._string.push("M",kt,",",Zt,this._circle);break}}},result:function(){if(this._string.length){var kt=this._string.join("");return this._string=[],kt}else return null}};function Yc(kt){return"m0,"+kt+"a"+kt+","+kt+" 0 1,1 0,"+-2*kt+"a"+kt+","+kt+" 0 1,1 0,"+2*kt+"z"}function eh(kt,Zt){var Mr=4.5,xr,Kr;function Mi(Wi){return Wi&&(typeof Mr=="function"&&Kr.pointRadius(+Mr.apply(this,arguments)),H(Wi,xr(Kr))),Kr.result()}return Mi.area=function(Wi){return H(Wi,xr(Ol)),Ol.result()},Mi.measure=function(Wi){return H(Wi,xr(Bl)),Bl.result()},Mi.bounds=function(Wi){return H(Wi,xr(yu)),yu.result()},Mi.centroid=function(Wi){return H(Wi,xr(Go)),Go.result()},Mi.projection=function(Wi){return arguments.length?(xr=Wi==null?(kt=null,Kl):(kt=Wi).stream,Mi):kt},Mi.context=function(Wi){return arguments.length?(Kr=Wi==null?(Zt=null,new _f):new Pa(Zt=Wi),typeof Mr!="function"&&Kr.pointRadius(Mr),Mi):Zt},Mi.pointRadius=function(Wi){return arguments.length?(Mr=typeof Wi=="function"?Wi:(Kr.pointRadius(+Wi),+Wi),Mi):Mr},Mi.projection(kt).context(Zt)}function th(kt){return{stream:ju(kt)}}function ju(kt){return function(Zt){var Mr=new jf;for(var xr in kt)Mr[xr]=kt[xr];return Mr.stream=Zt,Mr}}function jf(){}jf.prototype={constructor:jf,point:function(kt,Zt){this.stream.point(kt,Zt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function cc(kt,Zt,Mr){var xr=kt.clipExtent&&kt.clipExtent();return kt.scale(150).translate([0,0]),xr!=null&&kt.clipExtent(null),H(Mr,kt.stream(yu)),Zt(yu.result()),xr!=null&&kt.clipExtent(xr),kt}function of(kt,Zt,Mr){return cc(kt,function(xr){var Kr=Zt[1][0]-Zt[0][0],Mi=Zt[1][1]-Zt[0][1],Wi=Math.min(Kr/(xr[1][0]-xr[0][0]),Mi/(xr[1][1]-xr[0][1])),dn=+Zt[0][0]+(Kr-Wi*(xr[1][0]+xr[0][0]))/2,wn=+Zt[0][1]+(Mi-Wi*(xr[1][1]+xr[0][1]))/2;kt.scale(150*Wi).translate([dn,wn])},Mr)}function Nl(kt,Zt,Mr){return of(kt,[[0,0],Zt],Mr)}function Kc(kt,Zt,Mr){return cc(kt,function(xr){var Kr=+Zt,Mi=Kr/(xr[1][0]-xr[0][0]),Wi=(Kr-Mi*(xr[1][0]+xr[0][0]))/2,dn=-Mi*xr[0][1];kt.scale(150*Mi).translate([Wi,dn])},Mr)}function Rc(kt,Zt,Mr){return cc(kt,function(xr){var Kr=+Zt,Mi=Kr/(xr[1][1]-xr[0][1]),Wi=-Mi*xr[0][0],dn=(Kr-Mi*(xr[1][1]+xr[0][1]))/2;kt.scale(150*Mi).translate([Wi,dn])},Mr)}var gs=16,Wf=p(30*d);function Wh(kt,Zt){return+Zt?sf(kt,Zt):rh(kt)}function rh(kt){return ju({point:function(Zt,Mr){Zt=kt(Zt,Mr),this.stream.point(Zt[0],Zt[1])}})}function sf(kt,Zt){function Mr(xr,Kr,Mi,Wi,dn,wn,On,Yi,$i,an,Fi,ta,Ca,Ra){var La=On-xr,Na=Yi-Kr,Zn=La*La+Na*Na;if(Zn>4*Zt&&Ca--){var Dn=Wi+an,Ka=dn+Fi,bo=wn+ta,Zo=S(Dn*Dn+Ka*Ka+bo*bo),Ss=E(bo/=Zo),as=v(v(bo)-1)<o||v(Mi-$i)<o?(Mi+$i)/2:b(Ka,Dn),ws=kt(as,Ss),Ho=ws[0],ml=ws[1],Ws=Ho-xr,Ls=ml-Kr,va=Na*Ws-La*Ls;(va*va/Zn>Zt||v((La*Ws+Na*Ls)/Zn-.5)>.3||Wi*an+dn*Fi+wn*ta<Wf)&&(Mr(xr,Kr,Mi,Wi,dn,wn,Ho,ml,as,Dn/=Zo,Ka/=Zo,bo,Ca,Ra),Ra.point(Ho,ml),Mr(Ho,ml,as,Dn,Ka,bo,On,Yi,$i,an,Fi,ta,Ca,Ra))}}return function(xr){var Kr,Mi,Wi,dn,wn,On,Yi,$i,an,Fi,ta,Ca,Ra={point:La,lineStart:Na,lineEnd:Dn,polygonStart:function(){xr.polygonStart(),Ra.lineStart=Ka},polygonEnd:function(){xr.polygonEnd(),Ra.lineStart=Na}};function La(Ss,as){Ss=kt(Ss,as),xr.point(Ss[0],Ss[1])}function Na(){$i=NaN,Ra.point=Zn,xr.lineStart()}function Zn(Ss,as){var ws=ce([Ss,as]),Ho=kt(Ss,as);Mr($i,an,Yi,Fi,ta,Ca,$i=Ho[0],an=Ho[1],Yi=Ss,Fi=ws[0],ta=ws[1],Ca=ws[2],gs,xr),xr.point($i,an)}function Dn(){Ra.point=La,xr.lineEnd()}function Ka(){Na(),Ra.point=bo,Ra.lineEnd=Zo}function bo(Ss,as){Zn(Kr=Ss,as),Mi=$i,Wi=an,dn=Fi,wn=ta,On=Ca,Ra.point=Zn}function Zo(){Mr($i,an,Yi,Fi,ta,Ca,Mi,Wi,Kr,dn,wn,On,gs,xr),Ra.lineEnd=Dn,Dn()}return Ra}}var Sh=ju({point:function(kt,Zt){this.stream.point(kt*d,Zt*d)}});function Mu(kt){return ju({point:function(Zt,Mr){var xr=kt(Zt,Mr);return this.stream.point(xr[0],xr[1])}})}function ih(kt,Zt,Mr,xr,Kr){function Mi(Wi,dn){return Wi*=xr,dn*=Kr,[Zt+kt*Wi,Mr-kt*dn]}return Mi.invert=function(Wi,dn){return[(Wi-Zt)/kt*xr,(Mr-dn)/kt*Kr]},Mi}function js(kt,Zt,Mr,xr,Kr,Mi){var Wi=p(Mi),dn=x(Mi),wn=Wi*kt,On=dn*kt,Yi=Wi/kt,$i=dn/kt,an=(dn*Mr-Wi*Zt)/kt,Fi=(dn*Zt+Wi*Mr)/kt;function ta(Ca,Ra){return Ca*=xr,Ra*=Kr,[wn*Ca-On*Ra+Zt,Mr-On*Ca-wn*Ra]}return ta.invert=function(Ca,Ra){return[xr*(Yi*Ca-$i*Ra+an),Kr*(Fi-$i*Ca-Yi*Ra)]},ta}function Eu(kt){return Dc(function(){return kt})()}function Dc(kt){var Zt,Mr=150,xr=480,Kr=250,Mi=0,Wi=0,dn=0,wn=0,On=0,Yi,$i=0,an=1,Fi=1,ta=null,Ca=Jr,Ra=null,La,Na,Zn,Dn=Kl,Ka=.5,bo,Zo,Ss,as,ws;function Ho(va){return Ss(va[0]*d,va[1]*d)}function ml(va){return va=Ss.invert(va[0],va[1]),va&&[va[0]*h,va[1]*h]}Ho.stream=function(va){return as&&ws===va?as:as=Sh(Mu(Yi)(Ca(bo(Dn(ws=va)))))},Ho.preclip=function(va){return arguments.length?(Ca=va,ta=void 0,Ls()):Ca},Ho.postclip=function(va){return arguments.length?(Dn=va,Ra=La=Na=Zn=null,Ls()):Dn},Ho.clipAngle=function(va){return arguments.length?(Ca=+va?En(ta=va*d):(ta=null,Jr),Ls()):ta*h},Ho.clipExtent=function(va){return arguments.length?(Dn=va==null?(Ra=La=Na=Zn=null,Kl):ea(Ra=+va[0][0],La=+va[0][1],Na=+va[1][0],Zn=+va[1][1]),Ls()):Ra==null?null:[[Ra,La],[Na,Zn]]},Ho.scale=function(va){return arguments.length?(Mr=+va,Ws()):Mr},Ho.translate=function(va){return arguments.length?(xr=+va[0],Kr=+va[1],Ws()):[xr,Kr]},Ho.center=function(va){return arguments.length?(Mi=va[0]%360*d,Wi=va[1]%360*d,Ws()):[Mi*h,Wi*h]},Ho.rotate=function(va){return arguments.length?(dn=va[0]%360*d,wn=va[1]%360*d,On=va.length>2?va[2]%360*d:0,Ws()):[dn*h,wn*h,On*h]},Ho.angle=function(va){return arguments.length?($i=va%360*d,Ws()):$i*h},Ho.reflectX=function(va){return arguments.length?(an=va?-1:1,Ws()):an<0},Ho.reflectY=function(va){return arguments.length?(Fi=va?-1:1,Ws()):Fi<0},Ho.precision=function(va){return arguments.length?(bo=Wh(Zo,Ka=va*va),Ls()):S(Ka)},Ho.fitExtent=function(va,no){return of(Ho,va,no)},Ho.fitSize=function(va,no){return Nl(Ho,va,no)},Ho.fitWidth=function(va,no){return Kc(Ho,va,no)},Ho.fitHeight=function(va,no){return Rc(Ho,va,no)};function Ws(){var va=js(Mr,0,0,an,Fi,$i).apply(null,Zt(Mi,Wi)),no=($i?js:ih)(Mr,xr-va[0],Kr-va[1],an,Fi,$i);return Yi=Ri(dn,wn,On),Zo=ti(Zt,no),Ss=ti(Yi,Zo),bo=Wh(Zo,Ka),Ls()}function Ls(){return as=ws=null,Ho}return function(){return Zt=kt.apply(this,arguments),Ho.invert=Zt.invert&&ml,Ws()}}function ks(kt){var Zt=0,Mr=l/3,xr=Dc(kt),Kr=xr(Zt,Mr);return Kr.parallels=function(Mi){return arguments.length?xr(Zt=Mi[0]*d,Mr=Mi[1]*d):[Zt*h,Mr*h]},Kr}function bc(kt){var Zt=p(kt);function Mr(xr,Kr){return[xr*Zt,x(Kr)/Zt]}return Mr.invert=function(xr,Kr){return[xr/Zt,E(Kr*Zt)]},Mr}function hu(kt,Zt){var Mr=x(kt),xr=(Mr+x(Zt))/2;if(v(xr)<o)return bc(kt);var Kr=1+Mr*(2*xr-Mr),Mi=S(Kr)/xr;function Wi(dn,wn){var On=S(Kr-2*xr*x(wn))/xr;return[On*x(dn*=xr),Mi-On*p(dn)]}return Wi.invert=function(dn,wn){var On=Mi-wn,Yi=b(dn,v(On))*C(On);return On*xr<0&&(Yi-=l*C(dn)*C(On)),[Yi/xr,E((Kr-(dn*dn+On*On)*xr*xr)/(2*xr))]},Wi}function _u(){return ks(hu).scale(155.424).center([0,33.6442])}function nl(){return _u().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function nh(kt){var Zt=kt.length;return{point:function(Mr,xr){for(var Kr=-1;++Kr<Zt;)kt[Kr].point(Mr,xr)},sphere:function(){for(var Mr=-1;++Mr<Zt;)kt[Mr].sphere()},lineStart:function(){for(var Mr=-1;++Mr<Zt;)kt[Mr].lineStart()},lineEnd:function(){for(var Mr=-1;++Mr<Zt;)kt[Mr].lineEnd()},polygonStart:function(){for(var Mr=-1;++Mr<Zt;)kt[Mr].polygonStart()},polygonEnd:function(){for(var Mr=-1;++Mr<Zt;)kt[Mr].polygonEnd()}}}function Mh(){var kt,Zt,Mr=nl(),xr,Kr=_u().rotate([154,0]).center([-2,58.5]).parallels([55,65]),Mi,Wi=_u().rotate([157,0]).center([-3,19.9]).parallels([8,18]),dn,wn,On={point:function(an,Fi){wn=[an,Fi]}};function Yi(an){var Fi=an[0],ta=an[1];return wn=null,xr.point(Fi,ta),wn||(Mi.point(Fi,ta),wn)||(dn.point(Fi,ta),wn)}Yi.invert=function(an){var Fi=Mr.scale(),ta=Mr.translate(),Ca=(an[0]-ta[0])/Fi,Ra=(an[1]-ta[1])/Fi;return(Ra>=.12&&Ra<.234&&Ca>=-.425&&Ca<-.214?Kr:Ra>=.166&&Ra<.234&&Ca>=-.214&&Ca<-.115?Wi:Mr).invert(an)},Yi.stream=function(an){return kt&&Zt===an?kt:kt=nh([Mr.stream(Zt=an),Kr.stream(an),Wi.stream(an)])},Yi.precision=function(an){return arguments.length?(Mr.precision(an),Kr.precision(an),Wi.precision(an),$i()):Mr.precision()},Yi.scale=function(an){return arguments.length?(Mr.scale(an),Kr.scale(an*.35),Wi.scale(an),Yi.translate(Mr.translate())):Mr.scale()},Yi.translate=function(an){if(!arguments.length)return Mr.translate();var Fi=Mr.scale(),ta=+an[0],Ca=+an[1];return xr=Mr.translate(an).clipExtent([[ta-.455*Fi,Ca-.238*Fi],[ta+.455*Fi,Ca+.238*Fi]]).stream(On),Mi=Kr.translate([ta-.307*Fi,Ca+.201*Fi]).clipExtent([[ta-.425*Fi+o,Ca+.12*Fi+o],[ta-.214*Fi-o,Ca+.234*Fi-o]]).stream(On),dn=Wi.translate([ta-.205*Fi,Ca+.212*Fi]).clipExtent([[ta-.214*Fi+o,Ca+.166*Fi+o],[ta-.115*Fi-o,Ca+.234*Fi-o]]).stream(On),$i()},Yi.fitExtent=function(an,Fi){return of(Yi,an,Fi)},Yi.fitSize=function(an,Fi){return Nl(Yi,an,Fi)},Yi.fitWidth=function(an,Fi){return Kc(Yi,an,Fi)},Yi.fitHeight=function(an,Fi){return Rc(Yi,an,Fi)};function $i(){return kt=Zt=null,Yi}return Yi.scale(1070)}function zu(kt){return function(Zt,Mr){var xr=p(Zt),Kr=p(Mr),Mi=kt(xr*Kr);return[Mi*Kr*x(Zt),Mi*x(Mr)]}}function Fc(kt){return function(Zt,Mr){var xr=S(Zt*Zt+Mr*Mr),Kr=kt(xr),Mi=x(Kr),Wi=p(Kr);return[b(Zt*Mi,xr*Wi),E(xr&&Mr*Mi/xr)]}}var wc=zu(function(kt){return S(2/(1+kt))});wc.invert=Fc(function(kt){return 2*E(kt/2)});function bd(){return Eu(wc).scale(124.75).clipAngle(180-.001)}var xf=zu(function(kt){return(kt=P(kt))&&kt/x(kt)});xf.invert=Fc(function(kt){return kt});function Pf(){return Eu(xf).scale(79.4188).clipAngle(180-.001)}function qu(kt,Zt){return[kt,T(g((u+Zt)/2))]}qu.invert=function(kt,Zt){return[kt,2*m(M(Zt))-u]};function bf(){return jl(qu).scale(961/f)}function jl(kt){var Zt=Eu(kt),Mr=Zt.center,xr=Zt.scale,Kr=Zt.translate,Mi=Zt.clipExtent,Wi=null,dn,wn,On;Zt.scale=function($i){return arguments.length?(xr($i),Yi()):xr()},Zt.translate=function($i){return arguments.length?(Kr($i),Yi()):Kr()},Zt.center=function($i){return arguments.length?(Mr($i),Yi()):Mr()},Zt.clipExtent=function($i){return arguments.length?($i==null?Wi=dn=wn=On=null:(Wi=+$i[0][0],dn=+$i[0][1],wn=+$i[1][0],On=+$i[1][1]),Yi()):Wi==null?null:[[Wi,dn],[wn,On]]};function Yi(){var $i=l*xr(),an=Zt(yn(Zt.rotate()).invert([0,0]));return Mi(Wi==null?[[an[0]-$i,an[1]-$i],[an[0]+$i,an[1]+$i]]:kt===qu?[[Math.max(an[0]-$i,Wi),dn],[Math.min(an[0]+$i,wn),On]]:[[Wi,Math.max(an[1]-$i,dn)],[wn,Math.min(an[1]+$i,On)]])}return Yi()}function lf(kt){return g((u+kt)/2)}function Xh(kt,Zt){var Mr=p(kt),xr=kt===Zt?x(kt):T(Mr/p(Zt))/T(lf(Zt)/lf(kt)),Kr=Mr*L(lf(kt),xr)/xr;if(!xr)return qu;function Mi(Wi,dn){Kr>0?dn<-u+o&&(dn=-u+o):dn>u-o&&(dn=u-o);var wn=Kr/L(lf(dn),xr);return[wn*x(xr*Wi),Kr-wn*p(xr*Wi)]}return Mi.invert=function(Wi,dn){var wn=Kr-dn,On=C(xr)*S(Wi*Wi+wn*wn),Yi=b(Wi,v(wn))*C(wn);return wn*xr<0&&(Yi-=l*C(Wi)*C(wn)),[Yi/xr,2*m(L(Kr/On,1/xr))-u]},Mi}function If(){return ks(Xh).scale(109.5).parallels([30,30])}function Cs(kt,Zt){return[kt,Zt]}Cs.invert=Cs;function du(){return Eu(Cs).scale(152.63)}function ku(kt,Zt){var Mr=p(kt),xr=kt===Zt?x(kt):(Mr-p(Zt))/(Zt-kt),Kr=Mr/xr+kt;if(v(xr)<o)return Cs;function Mi(Wi,dn){var wn=Kr-dn,On=xr*Wi;return[wn*x(On),Kr-wn*p(On)]}return Mi.invert=function(Wi,dn){var wn=Kr-dn,On=b(Wi,v(wn))*C(wn);return wn*xr<0&&(On-=l*C(Wi)*C(wn)),[On/xr,Kr-C(xr)*S(Wi*Wi+wn*wn)]},Mi}function Xf(){return ks(ku).scale(131.154).center([0,13.9389])}var Us=1.340264,wf=-.081106,zc=893e-6,Wu=.003796,Rf=S(3)/2,Xu=12;function uf(kt,Zt){var Mr=E(Rf*x(Zt)),xr=Mr*Mr,Kr=xr*xr*xr;return[kt*p(Mr)/(Rf*(Us+3*wf*xr+Kr*(7*zc+9*Wu*xr))),Mr*(Us+wf*xr+Kr*(zc+Wu*xr))]}uf.invert=function(kt,Zt){for(var Mr=Zt,xr=Mr*Mr,Kr=xr*xr*xr,Mi=0,Wi,dn,wn;Mi<Xu&&(dn=Mr*(Us+wf*xr+Kr*(zc+Wu*xr))-Zt,wn=Us+3*wf*xr+Kr*(7*zc+9*Wu*xr),Mr-=Wi=dn/wn,xr=Mr*Mr,Kr=xr*xr*xr,!(v(Wi)<s));++Mi);return[Rf*kt*(Us+3*wf*xr+Kr*(7*zc+9*Wu*xr))/p(Mr),E(x(Mr)/Rf)]};function Zf(){return Eu(uf).scale(177.158)}function Wl(kt,Zt){var Mr=p(Zt),xr=p(kt)*Mr;return[Mr*x(kt)/xr,x(Zt)/xr]}Wl.invert=Fc(m);function ah(){return Eu(Wl).scale(144.049).clipAngle(60)}function Zu(){var kt=1,Zt=0,Mr=0,xr=1,Kr=1,Mi=0,Wi,dn,wn=null,On,Yi,$i,an=1,Fi=1,ta=ju({point:function(Dn,Ka){var bo=Zn([Dn,Ka]);this.stream.point(bo[0],bo[1])}}),Ca=Kl,Ra,La;function Na(){return an=kt*xr,Fi=kt*Kr,Ra=La=null,Zn}function Zn(Dn){var Ka=Dn[0]*an,bo=Dn[1]*Fi;if(Mi){var Zo=bo*Wi-Ka*dn;Ka=Ka*Wi+bo*dn,bo=Zo}return[Ka+Zt,bo+Mr]}return Zn.invert=function(Dn){var Ka=Dn[0]-Zt,bo=Dn[1]-Mr;if(Mi){var Zo=bo*Wi+Ka*dn;Ka=Ka*Wi-bo*dn,bo=Zo}return[Ka/an,bo/Fi]},Zn.stream=function(Dn){return Ra&&La===Dn?Ra:Ra=ta(Ca(La=Dn))},Zn.postclip=function(Dn){return arguments.length?(Ca=Dn,wn=On=Yi=$i=null,Na()):Ca},Zn.clipExtent=function(Dn){return arguments.length?(Ca=Dn==null?(wn=On=Yi=$i=null,Kl):ea(wn=+Dn[0][0],On=+Dn[0][1],Yi=+Dn[1][0],$i=+Dn[1][1]),Na()):wn==null?null:[[wn,On],[Yi,$i]]},Zn.scale=function(Dn){return arguments.length?(kt=+Dn,Na()):kt},Zn.translate=function(Dn){return arguments.length?(Zt=+Dn[0],Mr=+Dn[1],Na()):[Zt,Mr]},Zn.angle=function(Dn){return arguments.length?(Mi=Dn%360*d,dn=x(Mi),Wi=p(Mi),Na()):Mi*h},Zn.reflectX=function(Dn){return arguments.length?(xr=Dn?-1:1,Na()):xr<0},Zn.reflectY=function(Dn){return arguments.length?(Kr=Dn?-1:1,Na()):Kr<0},Zn.fitExtent=function(Dn,Ka){return of(Zn,Dn,Ka)},Zn.fitSize=function(Dn,Ka){return Nl(Zn,Dn,Ka)},Zn.fitWidth=function(Dn,Ka){return Kc(Zn,Dn,Ka)},Zn.fitHeight=function(Dn,Ka){return Rc(Zn,Dn,Ka)},Zn}function qc(kt,Zt){var Mr=Zt*Zt,xr=Mr*Mr;return[kt*(.8707-.131979*Mr+xr*(-.013791+xr*(.003971*Mr-.001529*xr))),Zt*(1.007226+Mr*(.015085+xr*(-.044475+.028874*Mr-.005916*xr)))]}qc.invert=function(kt,Zt){var Mr=Zt,xr=25,Kr;do{var Mi=Mr*Mr,Wi=Mi*Mi;Mr-=Kr=(Mr*(1.007226+Mi*(.015085+Wi*(-.044475+.028874*Mi-.005916*Wi)))-Zt)/(1.007226+Mi*(.015085*3+Wi*(-.044475*7+.028874*9*Mi-.005916*11*Wi)))}while(v(Kr)>o&&--xr>0);return[kt/(.8707+(Mi=Mr*Mr)*(-.131979+Mi*(-.013791+Mi*Mi*Mi*(.003971-.001529*Mi)))),Mr]};function Tc(){return Eu(qc).scale(175.295)}function wl(kt,Zt){return[p(Zt)*x(kt),x(Zt)]}wl.invert=Fc(E);function vu(){return Eu(wl).scale(249.5).clipAngle(90+o)}function Oc(kt,Zt){var Mr=p(Zt),xr=1+p(kt)*Mr;return[Mr*x(kt)/xr,x(Zt)/xr]}Oc.invert=Fc(function(kt){return 2*m(kt)});function cf(){return Eu(Oc).scale(250).clipAngle(142)}function fc(kt,Zt){return[T(g((u+Zt)/2)),-kt]}fc.invert=function(kt,Zt){return[-Zt,2*m(M(kt))-u]};function Bc(){var kt=jl(fc),Zt=kt.center,Mr=kt.rotate;return kt.center=function(xr){return arguments.length?Zt([-xr[1],xr[0]]):(xr=Zt(),[xr[1],-xr[0]])},kt.rotate=function(xr){return arguments.length?Mr([xr[0],xr[1],xr.length>2?xr[2]+90:90]):(xr=Mr(),[xr[0],xr[1],xr[2]-90])},Mr([0,0,90]).scale(159.155)}e.geoAlbers=nl,e.geoAlbersUsa=Mh,e.geoArea=me,e.geoAzimuthalEqualArea=bd,e.geoAzimuthalEqualAreaRaw=wc,e.geoAzimuthalEquidistant=Pf,e.geoAzimuthalEquidistantRaw=xf,e.geoBounds=Ge,e.geoCentroid=wr,e.geoCircle=ua,e.geoClipAntimeridian=Jr,e.geoClipCircle=En,e.geoClipExtent=Ma,e.geoClipRectangle=ea,e.geoConicConformal=If,e.geoConicConformalRaw=Xh,e.geoConicEqualArea=_u,e.geoConicEqualAreaRaw=hu,e.geoConicEquidistant=Xf,e.geoConicEquidistantRaw=ku,e.geoContains=bs,e.geoDistance=As,e.geoEqualEarth=Zf,e.geoEqualEarthRaw=uf,e.geoEquirectangular=du,e.geoEquirectangularRaw=Cs,e.geoGnomonic=ah,e.geoGnomonicRaw=Wl,e.geoGraticule=Vu,e.geoGraticule10=ql,e.geoIdentity=Zu,e.geoInterpolate=xo,e.geoLength=zl,e.geoMercator=bf,e.geoMercatorRaw=qu,e.geoNaturalEarth1=Tc,e.geoNaturalEarth1Raw=qc,e.geoOrthographic=vu,e.geoOrthographicRaw=wl,e.geoPath=eh,e.geoProjection=Eu,e.geoProjectionMutator=Dc,e.geoRotation=yn,e.geoStereographic=cf,e.geoStereographicRaw=Oc,e.geoStream=H,e.geoTransform=th,e.geoTransverseMercator=Bc,e.geoTransverseMercatorRaw=fc,Object.defineProperty(e,"__esModule",{value:!0})})});var NDe=ye((FF,BDe)=>{(function(e,t){typeof FF=="object"&&typeof BDe!="undefined"?t(FF,NZ(),hk()):t(e.d3=e.d3||{},e.d3,e.d3)})(FF,function(e,t,r){"use strict";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,d=Math.round,v=Math.sign||function(ve){return ve>0?1:ve<0?-1:0},m=Math.sin,b=Math.tan,p=1e-6,k=1e-12,M=Math.PI,T=M/2,L=M/4,x=Math.SQRT1_2,C=G(2),S=G(M),g=M*2,P=180/M,E=M/180;function z(ve){return ve?ve/Math.sin(ve):1}function q(ve){return ve>1?T:ve<-1?-T:Math.asin(ve)}function U(ve){return ve>1?0:ve<-1?M:Math.acos(ve)}function G(ve){return ve>0?Math.sqrt(ve):0}function Z(ve){return ve=s(2*ve),(ve-1)/(ve+1)}function j(ve){return(s(ve)-s(-ve))/2}function N(ve){return(s(ve)+s(-ve))/2}function H(ve){return u(ve+G(ve*ve+1))}function re(ve){return u(ve+G(ve*ve-1))}function oe(ve){var xe=b(ve/2),Ie=2*u(o(ve/2))/(xe*xe);function qe(Qe,Xe){var nt=o(Qe),qt=o(Xe),jt=m(Xe),ar=qt*nt,fr=-((1-ar?u((1+ar)/2)/(1-ar):-.5)+Ie/(1+ar));return[fr*qt*m(Qe),fr*jt]}return qe.invert=function(Qe,Xe){var nt=G(Qe*Qe+Xe*Xe),qt=-ve/2,jt=50,ar;if(!nt)return[0,0];do{var fr=qt/2,br=o(fr),Fr=m(fr),Hr=Fr/br,ri=-u(n(br));qt-=ar=(2/Hr*ri-Ie*Hr-nt)/(-ri/(Fr*Fr)+1-Ie/(2*br*br))*(br<0?.7:1)}while(n(ar)>p&&--jt>0);var Ci=m(qt);return[a(Qe*Ci,nt*o(qt)),q(Xe*Ci/nt)]},qe}function _e(){var ve=T,xe=t.geoProjectionMutator(oe),Ie=xe(ve);return Ie.radius=function(qe){return arguments.length?xe(ve=qe*E):ve*P},Ie.scale(179.976).clipAngle(147)}function ke(ve,xe){var Ie=o(xe),qe=z(U(Ie*o(ve/=2)));return[2*Ie*m(ve)*qe,m(xe)*qe]}ke.invert=function(ve,xe){if(!(ve*ve+4*xe*xe>M*M+p)){var Ie=ve,qe=xe,Qe=25;do{var Xe=m(Ie),nt=m(Ie/2),qt=o(Ie/2),jt=m(qe),ar=o(qe),fr=m(2*qe),br=jt*jt,Fr=ar*ar,Hr=nt*nt,ri=1-Fr*qt*qt,Ci=ri?U(ar*qt)*G(cn=1/ri):cn=0,cn,sn=2*Ci*ar*nt-ve,Ln=Ci*jt-xe,Yn=cn*(Fr*Hr+Ci*ar*qt*br),Aa=cn*(.5*Xe*fr-Ci*2*jt*nt),fa=cn*.25*(fr*nt-Ci*jt*Fr*Xe),$a=cn*(br*qt+Ci*Hr*ar),Co=Aa*fa-$a*Yn;if(!Co)break;var Qa=(Ln*Aa-sn*$a)/Co,mo=(sn*fa-Ln*Yn)/Co;Ie-=Qa,qe-=mo}while((n(Qa)>p||n(mo)>p)&&--Qe>0);return[Ie,qe]}};function Ce(){return t.geoProjection(ke).scale(152.63)}function ge(ve){var xe=m(ve),Ie=o(ve),qe=ve>=0?1:-1,Qe=b(qe*ve),Xe=(1+xe-Ie)/2;function nt(qt,jt){var ar=o(jt),fr=o(qt/=2);return[(1+ar)*m(qt),(qe*jt>-a(fr,Qe)-.001?0:-qe*10)+Xe+m(jt)*Ie-(1+ar)*xe*fr]}return nt.invert=function(qt,jt){var ar=0,fr=0,br=50;do{var Fr=o(ar),Hr=m(ar),ri=o(fr),Ci=m(fr),cn=1+ri,sn=cn*Hr-qt,Ln=Xe+Ci*Ie-cn*xe*Fr-jt,Yn=cn*Fr/2,Aa=-Hr*Ci,fa=xe*cn*Hr/2,$a=Ie*ri+xe*Fr*Ci,Co=Aa*fa-$a*Yn,Qa=(Ln*Aa-sn*$a)/Co/2,mo=(sn*fa-Ln*Yn)/Co;n(mo)>2&&(mo/=2),ar-=Qa,fr-=mo}while((n(Qa)>p||n(mo)>p)&&--br>0);return qe*fr>-a(o(ar),Qe)-.001?[ar*2,fr]:null},nt}function ie(){var ve=20*E,xe=ve>=0?1:-1,Ie=b(xe*ve),qe=t.geoProjectionMutator(ge),Qe=qe(ve),Xe=Qe.stream;return Qe.parallel=function(nt){return arguments.length?(Ie=b((xe=(ve=nt*E)>=0?1:-1)*ve),qe(ve)):ve*P},Qe.stream=function(nt){var qt=Qe.rotate(),jt=Xe(nt),ar=(Qe.rotate([0,0]),Xe(nt)),fr=Qe.precision();return Qe.rotate(qt),jt.sphere=function(){ar.polygonStart(),ar.lineStart();for(var br=xe*-180;xe*br<180;br+=xe*90)ar.point(br,xe*90);if(ve)for(;xe*(br-=3*xe*fr)>=-180;)ar.point(br,xe*-a(o(br*E/2),Ie)*P);ar.lineEnd(),ar.polygonEnd()},jt},Qe.scale(218.695).center([0,28.0974])}function Se(ve,xe){var Ie=b(xe/2),qe=G(1-Ie*Ie),Qe=1+qe*o(ve/=2),Xe=m(ve)*qe/Qe,nt=Ie/Qe,qt=Xe*Xe,jt=nt*nt;return[4/3*Xe*(3+qt-3*jt),4/3*nt*(3+3*qt-jt)]}Se.invert=function(ve,xe){if(ve*=3/8,xe*=3/8,!ve&&n(xe)>1)return null;var Ie=ve*ve,qe=xe*xe,Qe=1+Ie+qe,Xe=G((Qe-G(Qe*Qe-4*xe*xe))/2),nt=q(Xe)/3,qt=Xe?re(n(xe/Xe))/3:H(n(ve))/3,jt=o(nt),ar=N(qt),fr=ar*ar-jt*jt;return[v(ve)*2*a(j(qt)*jt,.25-fr),v(xe)*2*a(ar*m(nt),.25+fr)]};function Ee(){return t.geoProjection(Se).scale(66.1603)}var we=G(8),De=u(1+C);function Le(ve,xe){var Ie=n(xe);return Ie<L?[ve,u(b(L+xe/2))]:[ve*o(Ie)*(2*C-1/m(Ie)),v(xe)*(2*C*(Ie-L)-u(b(Ie/2)))]}Le.invert=function(ve,xe){if((Xe=n(xe))<De)return[ve,2*i(s(xe))-T];var Ie=L,qe=25,Qe,Xe;do{var nt=o(Ie/2),qt=b(Ie/2);Ie-=Qe=(we*(Ie-L)-u(qt)-Xe)/(we-nt*nt/(2*qt))}while(n(Qe)>k&&--qe>0);return[ve/(o(Ie)*(we-1/m(Ie))),v(xe)*Ie]};function me(){return t.geoProjection(Le).scale(112.314)}function Pe(ve){var xe=2*M/ve;function Ie(qe,Qe){var Xe=t.geoAzimuthalEquidistantRaw(qe,Qe);if(n(qe)>T){var nt=a(Xe[1],Xe[0]),qt=G(Xe[0]*Xe[0]+Xe[1]*Xe[1]),jt=xe*d((nt-T)/xe)+T,ar=a(m(nt-=jt),2-o(nt));nt=jt+q(M/qt*m(ar))-ar,Xe[0]=qt*o(nt),Xe[1]=qt*m(nt)}return Xe}return Ie.invert=function(qe,Qe){var Xe=G(qe*qe+Qe*Qe);if(Xe>T){var nt=a(Qe,qe),qt=xe*d((nt-T)/xe)+T,jt=nt>qt?-1:1,ar=Xe*o(qt-nt),fr=1/b(jt*U((ar-M)/G(M*(M-2*ar)+Xe*Xe)));nt=qt+2*i((fr+jt*G(fr*fr-3))/3),qe=Xe*o(nt),Qe=Xe*m(nt)}return t.geoAzimuthalEquidistantRaw.invert(qe,Qe)},Ie}function ce(){var ve=5,xe=t.geoProjectionMutator(Pe),Ie=xe(ve),qe=Ie.stream,Qe=.01,Xe=-o(Qe*E),nt=m(Qe*E);return Ie.lobes=function(qt){return arguments.length?xe(ve=+qt):ve},Ie.stream=function(qt){var jt=Ie.rotate(),ar=qe(qt),fr=(Ie.rotate([0,0]),qe(qt));return Ie.rotate(jt),ar.sphere=function(){fr.polygonStart(),fr.lineStart();for(var br=0,Fr=360/ve,Hr=2*M/ve,ri=90-180/ve,Ci=T;br<ve;++br,ri-=Fr,Ci-=Hr)fr.point(a(nt*o(Ci),Xe)*P,q(nt*m(Ci))*P),ri<-90?(fr.point(-90,-180-ri-Qe),fr.point(-90,-180-ri+Qe)):(fr.point(90,ri+Qe),fr.point(90,ri-Qe));fr.lineEnd(),fr.polygonEnd()},ar},Ie.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function He(ve,xe){if(arguments.length<2&&(xe=ve),xe===1)return t.geoAzimuthalEqualAreaRaw;if(xe===1/0)return lt;function Ie(qe,Qe){var Xe=t.geoAzimuthalEqualAreaRaw(qe/xe,Qe);return Xe[0]*=ve,Xe}return Ie.invert=function(qe,Qe){var Xe=t.geoAzimuthalEqualAreaRaw.invert(qe/ve,Qe);return Xe[0]*=xe,Xe},Ie}function lt(ve,xe){return[ve*o(xe)/o(xe/=2),2*m(xe)]}lt.invert=function(ve,xe){var Ie=2*q(xe/2);return[ve*o(Ie/2)/o(Ie),Ie]};function mt(){var ve=2,xe=t.geoProjectionMutator(He),Ie=xe(ve);return Ie.coefficient=function(qe){return arguments.length?xe(ve=+qe):ve},Ie.scale(169.529)}function Vt(ve,xe,Ie){var qe=100,Qe,Xe,nt;Ie=Ie===void 0?0:+Ie,xe=+xe;do Xe=ve(Ie),nt=ve(Ie+p),Xe===nt&&(nt=Xe+p),Ie-=Qe=-1*p*(Xe-xe)/(Xe-nt);while(qe-- >0&&n(Qe)>p);return qe<0?NaN:Ie}function st(ve,xe,Ie){return xe===void 0&&(xe=40),Ie===void 0&&(Ie=k),function(qe,Qe,Xe,nt){var qt,jt,ar;Xe=Xe===void 0?0:+Xe,nt=nt===void 0?0:+nt;for(var fr=0;fr<xe;fr++){var br=ve(Xe,nt),Fr=br[0]-qe,Hr=br[1]-Qe;if(n(Fr)<Ie&&n(Hr)<Ie)break;var ri=Fr*Fr+Hr*Hr;if(ri>qt){Xe-=jt/=2,nt-=ar/=2;continue}qt=ri;var Ci=(Xe>0?-1:1)*Ie,cn=(nt>0?-1:1)*Ie,sn=ve(Xe+Ci,nt),Ln=ve(Xe,nt+cn),Yn=(sn[0]-br[0])/Ci,Aa=(sn[1]-br[1])/Ci,fa=(Ln[0]-br[0])/cn,$a=(Ln[1]-br[1])/cn,Co=$a*Yn-Aa*fa,Qa=(n(Co)<.5?.5:1)/Co;if(jt=(Hr*fa-Fr*$a)*Qa,ar=(Fr*Aa-Hr*Yn)*Qa,Xe+=jt,nt+=ar,n(jt)<Ie&&n(ar)<Ie)break}return[Xe,nt]}}function ct(){var ve=He(1.68,2),xe=1.4,Ie=12;function qe(Qe,Xe){if(Qe+Xe<-xe){var nt=(Qe-Xe+1.6)*(Qe+Xe+xe)/8;Qe+=nt,Xe-=.8*nt*m(Xe+M/2)}var qt=ve(Qe,Xe),jt=(1-o(Qe*Xe))/Ie;return qt[1]<0&&(qt[0]*=1+jt),qt[1]>0&&(qt[1]*=1+jt/1.5*qt[0]*qt[0]),qt}return qe.invert=st(qe),qe}function Qt(){return t.geoProjection(ct()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ht(ve,xe){var Ie=ve*m(xe),qe=30,Qe;do xe-=Qe=(xe+m(xe)-Ie)/(1+o(xe));while(n(Qe)>p&&--qe>0);return xe/2}function nr(ve,xe,Ie){function qe(Qe,Xe){return[ve*Qe*o(Xe=Ht(Ie,Xe)),xe*m(Xe)]}return qe.invert=function(Qe,Xe){return Xe=q(Xe/xe),[Qe/(ve*o(Xe)),q((2*Xe+m(2*Xe))/Ie)]},qe}var tt=nr(C/T,C,M);function je(){return t.geoProjection(tt).scale(169.529)}var Ue=2.00276,Ae=1.11072;function rt(ve,xe){var Ie=Ht(M,xe);return[Ue*ve/(1/o(xe)+Ae/o(Ie)),(xe+C*m(Ie))/Ue]}rt.invert=function(ve,xe){var Ie=Ue*xe,qe=xe<0?-L:L,Qe=25,Xe,nt;do nt=Ie-C*m(qe),qe-=Xe=(m(2*qe)+2*qe-M*m(nt))/(2*o(2*qe)+2+M*o(nt)*C*o(qe));while(n(Xe)>p&&--Qe>0);return nt=Ie-C*m(qe),[ve*(1/o(nt)+Ae/o(qe))/Ue,nt]};function St(){return t.geoProjection(rt).scale(160.857)}function Tt(ve){var xe=0,Ie=t.geoProjectionMutator(ve),qe=Ie(xe);return qe.parallel=function(Qe){return arguments.length?Ie(xe=Qe*E):xe*P},qe}function dt(ve,xe){return[ve*o(xe),xe]}dt.invert=function(ve,xe){return[ve/o(xe),xe]};function Et(){return t.geoProjection(dt).scale(152.63)}function pt(ve){if(!ve)return dt;var xe=1/b(ve);function Ie(qe,Qe){var Xe=xe+ve-Qe,nt=Xe&&qe*o(Qe)/Xe;return[Xe*m(nt),xe-Xe*o(nt)]}return Ie.invert=function(qe,Qe){var Xe=G(qe*qe+(Qe=xe-Qe)*Qe),nt=xe+ve-Xe;return[Xe/o(nt)*a(qe,Qe),nt]},Ie}function Xt(){return Tt(pt).scale(123.082).center([0,26.1441]).parallel(45)}function or(ve){function xe(Ie,qe){var Qe=T-qe,Xe=Qe&&Ie*ve*m(Qe)/Qe;return[Qe*m(Xe)/ve,T-Qe*o(Xe)]}return xe.invert=function(Ie,qe){var Qe=Ie*ve,Xe=T-qe,nt=G(Qe*Qe+Xe*Xe),qt=a(Qe,Xe);return[(nt?nt/m(nt):1)*qt/ve,T-nt]},xe}function _r(){var ve=.5,xe=t.geoProjectionMutator(or),Ie=xe(ve);return Ie.fraction=function(qe){return arguments.length?xe(ve=+qe):ve},Ie.scale(158.837)}var Er=nr(1,4/M,M);function ei(){return t.geoProjection(Er).scale(152.63)}function qr(ve,xe,Ie,qe,Qe,Xe){var nt=o(Xe),qt;if(n(ve)>1||n(Xe)>1)qt=U(Ie*Qe+xe*qe*nt);else{var jt=m(ve/2),ar=m(Xe/2);qt=2*q(G(jt*jt+xe*qe*ar*ar))}return n(qt)>p?[qt,a(qe*m(Xe),xe*Qe-Ie*qe*nt)]:[0,0]}function jr(ve,xe,Ie){return U((ve*ve+xe*xe-Ie*Ie)/(2*ve*xe))}function gt(ve){return ve-2*M*l((ve+M)/(2*M))}function Ge(ve,xe,Ie){for(var qe=[[ve[0],ve[1],m(ve[1]),o(ve[1])],[xe[0],xe[1],m(xe[1]),o(xe[1])],[Ie[0],Ie[1],m(Ie[1]),o(Ie[1])]],Qe=qe[2],Xe,nt=0;nt<3;++nt,Qe=Xe)Xe=qe[nt],Qe.v=qr(Xe[1]-Qe[1],Qe[3],Qe[2],Xe[3],Xe[2],Xe[0]-Qe[0]),Qe.point=[0,0];var qt=jr(qe[0].v[0],qe[2].v[0],qe[1].v[0]),jt=jr(qe[0].v[0],qe[1].v[0],qe[2].v[0]),ar=M-qt;qe[2].point[1]=0,qe[0].point[0]=-(qe[1].point[0]=qe[0].v[0]/2);var fr=[qe[2].point[0]=qe[0].point[0]+qe[2].v[0]*o(qt),2*(qe[0].point[1]=qe[1].point[1]=qe[2].v[0]*m(qt))];function br(Fr,Hr){var ri=m(Hr),Ci=o(Hr),cn=new Array(3),sn;for(sn=0;sn<3;++sn){var Ln=qe[sn];if(cn[sn]=qr(Hr-Ln[1],Ln[3],Ln[2],Ci,ri,Fr-Ln[0]),!cn[sn][0])return Ln.point;cn[sn][1]=gt(cn[sn][1]-Ln.v[1])}var Yn=fr.slice();for(sn=0;sn<3;++sn){var Aa=sn==2?0:sn+1,fa=jr(qe[sn].v[0],cn[sn][0],cn[Aa][0]);cn[sn][1]<0&&(fa=-fa),sn?sn==1?(fa=jt-fa,Yn[0]-=cn[sn][0]*o(fa),Yn[1]-=cn[sn][0]*m(fa)):(fa=ar-fa,Yn[0]+=cn[sn][0]*o(fa),Yn[1]+=cn[sn][0]*m(fa)):(Yn[0]+=cn[sn][0]*o(fa),Yn[1]-=cn[sn][0]*m(fa))}return Yn[0]/=3,Yn[1]/=3,Yn}return br}function Je(ve){return ve[0]*=E,ve[1]*=E,ve}function We(){return et([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function et(ve,xe,Ie){var qe=t.geoCentroid({type:"MultiPoint",coordinates:[ve,xe,Ie]}),Qe=[-qe[0],-qe[1]],Xe=t.geoRotation(Qe),nt=Ge(Je(Xe(ve)),Je(Xe(xe)),Je(Xe(Ie)));nt.invert=st(nt);var qt=t.geoProjection(nt).rotate(Qe),jt=qt.center;return delete qt.rotate,qt.center=function(ar){return arguments.length?jt(Xe(ar)):Xe.invert(jt())},qt.clipAngle(90)}function xt(ve,xe){var Ie=G(1-m(xe));return[2/S*ve*Ie,S*(1-Ie)]}xt.invert=function(ve,xe){var Ie=(Ie=xe/S-1)*Ie;return[Ie>0?ve*G(M/Ie)/2:0,q(1-Ie)]};function At(){return t.geoProjection(xt).scale(95.6464).center([0,30])}function Kt(ve){var xe=b(ve);function Ie(qe,Qe){return[qe,(qe?qe/m(qe):1)*(m(Qe)*o(qe)-xe*o(Qe))]}return Ie.invert=xe?function(qe,Qe){qe&&(Qe*=m(qe)/qe);var Xe=o(qe);return[qe,2*a(G(Xe*Xe+xe*xe-Qe*Qe)-Xe,xe-Qe)]}:function(qe,Qe){return[qe,q(qe?Qe*b(qe)/qe:Qe)]},Ie}function er(){return Tt(Kt).scale(249.828).clipAngle(90)}var Sr=G(3);function Gr(ve,xe){return[Sr*ve*(2*o(2*xe/3)-1)/S,Sr*S*m(xe/3)]}Gr.invert=function(ve,xe){var Ie=3*q(xe/(Sr*S));return[S*ve/(Sr*(2*o(2*Ie/3)-1)),Ie]};function Ir(){return t.geoProjection(Gr).scale(156.19)}function Yr(ve){var xe=o(ve);function Ie(qe,Qe){return[qe*xe,m(Qe)/xe]}return Ie.invert=function(qe,Qe){return[qe/xe,q(Qe*xe)]},Ie}function _i(){return Tt(Yr).parallel(38.58).scale(195.044)}function Pi(ve){var xe=o(ve);function Ie(qe,Qe){return[qe*xe,(1+xe)*b(Qe/2)]}return Ie.invert=function(qe,Qe){return[qe/xe,i(Qe/(1+xe))*2]},Ie}function ai(){return Tt(Pi).scale(124.75)}function mi(ve,xe){var Ie=G(8/(3*M));return[Ie*ve*(1-n(xe)/M),Ie*xe]}mi.invert=function(ve,xe){var Ie=G(8/(3*M)),qe=xe/Ie;return[ve/(Ie*(1-n(qe)/M)),qe]};function un(){return t.geoProjection(mi).scale(165.664)}function Fn(ve,xe){var Ie=G(4-3*m(n(xe)));return[2/G(6*M)*ve*Ie,v(xe)*G(2*M/3)*(2-Ie)]}Fn.invert=function(ve,xe){var Ie=2-n(xe)/G(2*M/3);return[ve*G(6*M)/(2*Ie),v(xe)*q((4-Ie*Ie)/3)]};function An(){return t.geoProjection(Fn).scale(165.664)}function Hn(ve,xe){var Ie=G(M*(4+M));return[2/Ie*ve*(1+G(1-4*xe*xe/(M*M))),4/Ie*xe]}Hn.invert=function(ve,xe){var Ie=G(M*(4+M))/2;return[ve*Ie/(1+G(1-xe*xe*(4+M)/(4*M))),xe*Ie/2]};function Qn(){return t.geoProjection(Hn).scale(180.739)}function Vi(ve,xe){var Ie=(2+T)*m(xe);xe/=2;for(var qe=0,Qe=1/0;qe<10&&n(Qe)>p;qe++){var Xe=o(xe);xe-=Qe=(xe+m(xe)*(Xe+2)-Ie)/(2*Xe*(1+Xe))}return[2/G(M*(4+M))*ve*(1+o(xe)),2*G(M/(4+M))*m(xe)]}Vi.invert=function(ve,xe){var Ie=xe*G((4+M)/M)/2,qe=q(Ie),Qe=o(qe);return[ve/(2/G(M*(4+M))*(1+Qe)),q((qe+Ie*(Qe+2))/(2+T))]};function Kn(){return t.geoProjection(Vi).scale(180.739)}function Jn(ve,xe){return[ve*(1+o(xe))/G(2+M),2*xe/G(2+M)]}Jn.invert=function(ve,xe){var Ie=G(2+M),qe=xe*Ie/2;return[Ie*ve/(1+o(qe)),qe]};function Gt(){return t.geoProjection(Jn).scale(173.044)}function wt(ve,xe){for(var Ie=(1+T)*m(xe),qe=0,Qe=1/0;qe<10&&n(Qe)>p;qe++)xe-=Qe=(xe+m(xe)-Ie)/(1+o(xe));return Ie=G(2+M),[ve*(1+o(xe))/Ie,2*xe/Ie]}wt.invert=function(ve,xe){var Ie=1+T,qe=G(Ie/2);return[ve*2*qe/(1+o(xe*=qe)),q((xe+m(xe))/Ie)]};function rr(){return t.geoProjection(wt).scale(173.044)}var ir=3+2*C;function wr(ve,xe){var Ie=m(ve/=2),qe=o(ve),Qe=G(o(xe)),Xe=o(xe/=2),nt=m(xe)/(Xe+C*qe*Qe),qt=G(2/(1+nt*nt)),jt=G((C*Xe+(qe+Ie)*Qe)/(C*Xe+(qe-Ie)*Qe));return[ir*(qt*(jt-1/jt)-2*u(jt)),ir*(qt*nt*(jt+1/jt)-2*i(nt))]}wr.invert=function(ve,xe){if(!(Xe=Se.invert(ve/1.2,xe*1.065)))return null;var Ie=Xe[0],qe=Xe[1],Qe=20,Xe;ve/=ir,xe/=ir;do{var nt=Ie/2,qt=qe/2,jt=m(nt),ar=o(nt),fr=m(qt),br=o(qt),Fr=o(qe),Hr=G(Fr),ri=fr/(br+C*ar*Hr),Ci=ri*ri,cn=G(2/(1+Ci)),sn=C*br+(ar+jt)*Hr,Ln=C*br+(ar-jt)*Hr,Yn=sn/Ln,Aa=G(Yn),fa=Aa-1/Aa,$a=Aa+1/Aa,Co=cn*fa-2*u(Aa)-ve,Qa=cn*ri*$a-2*i(ri)-xe,mo=fr&&x*Hr*jt*Ci/fr,Bo=(C*ar*br+Hr)/(2*(br+C*ar*Hr)*(br+C*ar*Hr)*Hr),Ps=-.5*ri*cn*cn*cn,Ts=Ps*mo,wo=Ps*Bo,To=(To=2*br+C*Hr*(ar-jt))*To*Aa,hl=(C*ar*br*Hr+Fr)/To,Ul=-(C*jt*fr)/(Hr*To),Lu=fa*Ts-2*hl/Aa+cn*(hl+hl/Yn),au=fa*wo-2*Ul/Aa+cn*(Ul+Ul/Yn),Js=ri*$a*Ts-2*mo/(1+Ci)+cn*$a*mo+cn*ri*(hl-hl/Yn),eu=ri*$a*wo-2*Bo/(1+Ci)+cn*$a*Bo+cn*ri*(Ul-Ul/Yn),dc=au*Js-eu*Lu;if(!dc)break;var Tl=(Qa*au-Co*eu)/dc,Al=(Co*Js-Qa*Lu)/dc;Ie-=Tl,qe=c(-T,f(T,qe-Al))}while((n(Tl)>p||n(Al)>p)&&--Qe>0);return n(n(qe)-T)<p?[0,qe]:Qe&&[Ie,qe]};function Xr(){return t.geoProjection(wr).scale(62.5271)}var ti=o(35*E);function $r(ve,xe){var Ie=b(xe/2);return[ve*ti*G(1-Ie*Ie),(1+ti)*Ie]}$r.invert=function(ve,xe){var Ie=xe/(1+ti);return[ve&&ve/(ti*G(1-Ie*Ie)),2*i(Ie)]};function Ri(){return t.geoProjection($r).scale(137.152)}function Zi(ve,xe){var Ie=xe/2,qe=o(Ie);return[2*ve/S*o(xe)*qe*qe,S*b(Ie)]}Zi.invert=function(ve,xe){var Ie=i(xe/S),qe=o(Ie),Qe=2*Ie;return[ve*S/2/(o(Qe)*qe*qe),Qe]};function en(){return t.geoProjection(Zi).scale(135.264)}function fn(ve){var xe=1-ve,Ie=Xe(M,0)[0]-Xe(-M,0)[0],qe=Xe(0,T)[1]-Xe(0,-T)[1],Qe=G(2*qe/Ie);function Xe(jt,ar){var fr=o(ar),br=m(ar);return[fr/(xe+ve*fr)*jt,xe*ar+ve*br]}function nt(jt,ar){var fr=Xe(jt,ar);return[fr[0]*Qe,fr[1]/Qe]}function qt(jt){return nt(0,jt)[1]}return nt.invert=function(jt,ar){var fr=Vt(qt,ar),br=jt/Qe*(ve+xe/o(fr));return[br,fr]},nt}function yn(){var ve=.5,xe=t.geoProjectionMutator(fn),Ie=xe(ve);return Ie.alpha=function(qe){return arguments.length?xe(ve=+qe):ve},Ie.scale(168.725)}function Mn(ve){return[ve[0]/2,q(b(ve[1]/2*E))*P]}function Ba(ve){return[ve[0]*2,2*i(m(ve[1]*E))*P]}function ua(ve){ve==null&&(ve=t.geoOrthographic);var xe=ve(),Ie=t.geoEquirectangular().scale(P).precision(0).clipAngle(null).translate([0,0]);function qe(Xe){return xe(Mn(Xe))}xe.invert&&(qe.invert=function(Xe){return Ba(xe.invert(Xe))}),qe.stream=function(Xe){var nt=xe.stream(Xe),qt=Ie.stream({point:function(jt,ar){nt.point(jt/2,q(b(-ar/2*E))*P)},lineStart:function(){nt.lineStart()},lineEnd:function(){nt.lineEnd()},polygonStart:function(){nt.polygonStart()},polygonEnd:function(){nt.polygonEnd()}});return qt.sphere=nt.sphere,qt};function Qe(Xe){qe[Xe]=function(){return arguments.length?(xe[Xe].apply(xe,arguments),qe):xe[Xe]()}}return qe.rotate=function(Xe){return arguments.length?(Ie.rotate(Xe),qe):Ie.rotate()},qe.center=function(Xe){return arguments.length?(xe.center(Mn(Xe)),qe):Ba(xe.center())},Qe("angle"),Qe("clipAngle"),Qe("clipExtent"),Qe("fitExtent"),Qe("fitHeight"),Qe("fitSize"),Qe("fitWidth"),Qe("scale"),Qe("translate"),Qe("precision"),qe.scale(249.5)}function ma(ve,xe){var Ie=2*M/xe,qe=ve*ve;function Qe(Xe,nt){var qt=t.geoAzimuthalEquidistantRaw(Xe,nt),jt=qt[0],ar=qt[1],fr=jt*jt+ar*ar;if(fr>qe){var br=G(fr),Fr=a(ar,jt),Hr=Ie*d(Fr/Ie),ri=Fr-Hr,Ci=ve*o(ri),cn=(ve*m(ri)-ri*m(Ci))/(T-Ci),sn=Wa(ri,cn),Ln=(M-ve)/Fa(sn,Ci,M);jt=br;var Yn=50,Aa;do jt-=Aa=(ve+Fa(sn,Ci,jt)*Ln-br)/(sn(jt)*Ln);while(n(Aa)>p&&--Yn>0);ar=ri*m(jt),jt<T&&(ar-=cn*(jt-T));var fa=m(Hr),$a=o(Hr);qt[0]=jt*$a-ar*fa,qt[1]=jt*fa+ar*$a}return qt}return Qe.invert=function(Xe,nt){var qt=Xe*Xe+nt*nt;if(qt>qe){var jt=G(qt),ar=a(nt,Xe),fr=Ie*d(ar/Ie),br=ar-fr;Xe=jt*o(br),nt=jt*m(br);for(var Fr=Xe-T,Hr=m(Xe),ri=nt/Hr,Ci=Xe<T?1/0:0,cn=10;;){var sn=ve*m(ri),Ln=ve*o(ri),Yn=m(Ln),Aa=T-Ln,fa=(sn-ri*Yn)/Aa,$a=Wa(ri,fa);if(n(Ci)<k||!--cn)break;ri-=Ci=(ri*Hr-fa*Fr-nt)/(Hr-Fr*2*(Aa*(Ln+ri*sn*o(Ln)-Yn)-sn*(sn-ri*Yn))/(Aa*Aa))}jt=ve+Fa($a,Ln,Xe)*(M-ve)/Fa($a,Ln,M),ar=fr+ri,Xe=jt*o(ar),nt=jt*m(ar)}return t.geoAzimuthalEquidistantRaw.invert(Xe,nt)},Qe}function Wa(ve,xe){return function(Ie){var qe=ve*o(Ie);return Ie<T&&(qe-=xe),G(1+qe*qe)}}function Fa(ve,xe,Ie){for(var qe=50,Qe=(Ie-xe)/qe,Xe=ve(xe)+ve(Ie),nt=1,qt=xe;nt<qe;++nt)Xe+=2*ve(qt+=Qe);return Xe*.5*Qe}function Xo(){var ve=6,xe=30*E,Ie=o(xe),qe=m(xe),Qe=t.geoProjectionMutator(ma),Xe=Qe(xe,ve),nt=Xe.stream,qt=.01,jt=-o(qt*E),ar=m(qt*E);return Xe.radius=function(fr){return arguments.length?(Ie=o(xe=fr*E),qe=m(xe),Qe(xe,ve)):xe*P},Xe.lobes=function(fr){return arguments.length?Qe(xe,ve=+fr):ve},Xe.stream=function(fr){var br=Xe.rotate(),Fr=nt(fr),Hr=(Xe.rotate([0,0]),nt(fr));return Xe.rotate(br),Fr.sphere=function(){Hr.polygonStart(),Hr.lineStart();for(var ri=0,Ci=2*M/ve,cn=0;ri<ve;++ri,cn-=Ci)Hr.point(a(ar*o(cn),jt)*P,q(ar*m(cn))*P),Hr.point(a(qe*o(cn-Ci/2),Ie)*P,q(qe*m(cn-Ci/2))*P);Hr.lineEnd(),Hr.polygonEnd()},Fr},Xe.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function da(ve,xe,Ie,qe,Qe,Xe,nt,qt){arguments.length<8&&(qt=0);function jt(ar,fr){if(!fr)return[ve*ar/M,0];var br=fr*fr,Fr=ve+br*(xe+br*(Ie+br*qe)),Hr=fr*(Qe-1+br*(Xe-qt+br*nt)),ri=(Fr*Fr+Hr*Hr)/(2*Hr),Ci=ar*q(Fr/ri)/M;return[ri*m(Ci),fr*(1+br*qt)+ri*(1-o(Ci))]}return jt.invert=function(ar,fr){var br=M*ar/ve,Fr=fr,Hr,ri,Ci=50;do{var cn=Fr*Fr,sn=ve+cn*(xe+cn*(Ie+cn*qe)),Ln=Fr*(Qe-1+cn*(Xe-qt+cn*nt)),Yn=sn*sn+Ln*Ln,Aa=2*Ln,fa=Yn/Aa,$a=fa*fa,Co=q(sn/fa)/M,Qa=br*Co,mo=sn*sn,Bo=(2*xe+cn*(4*Ie+cn*6*qe))*Fr,Ps=Qe+cn*(3*Xe+cn*5*nt),Ts=2*(sn*Bo+Ln*(Ps-1)),wo=2*(Ps-1),To=(Ts*Aa-Yn*wo)/(Aa*Aa),hl=o(Qa),Ul=m(Qa),Lu=fa*hl,au=fa*Ul,Js=br/M*(1/G(1-mo/$a))*(Bo*fa-sn*To)/$a,eu=au-ar,dc=Fr*(1+cn*qt)+fa-Lu-fr,Tl=To*Ul+Lu*Js,Al=Lu*Co,X=1+To-(To*hl-au*Js),se=au*Co,Te=Tl*se-X*Al;if(!Te)break;br-=Hr=(dc*Tl-eu*X)/Te,Fr-=ri=(eu*se-dc*Al)/Te}while((n(Hr)>p||n(ri)>p)&&--Ci>0);return[br,Fr]},jt}var jn=da(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ha(){return t.geoProjection(jn).scale(149.995)}var vo=da(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Gn(){return t.geoProjection(vo).scale(153.93)}var Ct=da(5/6*M,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Ar(){return t.geoProjection(Ct).scale(130.945)}function Jr(ve,xe){var Ie=ve*ve,qe=xe*xe;return[ve*(1-.162388*qe)*(.87-952426e-9*Ie*Ie),xe*(1+qe/12)]}Jr.invert=function(ve,xe){var Ie=ve,qe=xe,Qe=50,Xe;do{var nt=qe*qe;qe-=Xe=(qe*(1+nt/12)-xe)/(1+nt/4)}while(n(Xe)>p&&--Qe>0);Qe=50,ve/=1-.162388*nt;do{var qt=(qt=Ie*Ie)*qt;Ie-=Xe=(Ie*(.87-952426e-9*qt)-ve)/(.87-.00476213*qt)}while(n(Xe)>p&&--Qe>0);return[Ie,qe]};function hi(){return t.geoProjection(Jr).scale(131.747)}var hn=da(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Sn(){return t.geoProjection(hn).scale(131.087)}function En(ve){var xe=ve(T,0)[0]-ve(-T,0)[0];function Ie(qe,Qe){var Xe=qe>0?-.5:.5,nt=ve(qe+Xe*M,Qe);return nt[0]-=Xe*xe,nt}return ve.invert&&(Ie.invert=function(qe,Qe){var Xe=qe>0?-.5:.5,nt=ve.invert(qe+Xe*xe,Qe),qt=nt[0]-Xe*M;return qt<-M?qt+=2*M:qt>M&&(qt-=2*M),nt[0]=qt,nt}),Ie}function ki(ve,xe){var Ie=v(ve),qe=v(xe),Qe=o(xe),Xe=o(ve)*Qe,nt=m(ve)*Qe,qt=m(qe*xe);ve=n(a(nt,qt)),xe=q(Xe),n(ve-T)>p&&(ve%=T);var jt=_n(ve>M/4?T-ve:ve,xe);return ve>M/4&&(qt=jt[0],jt[0]=-jt[1],jt[1]=-qt),jt[0]*=Ie,jt[1]*=-qe,jt}ki.invert=function(ve,xe){n(ve)>1&&(ve=v(ve)*2-ve),n(xe)>1&&(xe=v(xe)*2-xe);var Ie=v(ve),qe=v(xe),Qe=-Ie*ve,Xe=-qe*xe,nt=Xe/Qe<1,qt=ya(nt?Xe:Qe,nt?Qe:Xe),jt=qt[0],ar=qt[1],fr=o(ar);return nt&&(jt=-T-jt),[Ie*(a(m(jt)*fr,-m(ar))+M),qe*q(o(jt)*fr)]};function _n(ve,xe){if(xe===T)return[0,0];var Ie=m(xe),qe=Ie*Ie,Qe=qe*qe,Xe=1+Qe,nt=1+3*Qe,qt=1-Qe,jt=q(1/G(Xe)),ar=qt+qe*Xe*jt,fr=(1-Ie)/ar,br=G(fr),Fr=fr*Xe,Hr=G(Fr),ri=br*qt,Ci,cn;if(ve===0)return[0,-(ri+qe*Hr)];var sn=o(xe),Ln=1/sn,Yn=2*Ie*sn,Aa=(-3*qe+jt*nt)*Yn,fa=(-ar*sn-(1-Ie)*Aa)/(ar*ar),$a=.5*fa/br,Co=qt*$a-2*qe*br*Yn,Qa=qe*Xe*fa+fr*nt*Yn,mo=-Ln*Yn,Bo=-Ln*Qa,Ps=-2*Ln*Co,Ts=4*ve/M,wo;if(ve>.222*M||xe<M/4&&ve>.175*M){if(Ci=(ri+qe*G(Fr*(1+Qe)-ri*ri))/(1+Qe),ve>M/4)return[Ci,Ci];var To=Ci,hl=.5*Ci;Ci=.5*(hl+To),cn=50;do{var Ul=G(Fr-Ci*Ci),Lu=Ci*(Ps+mo*Ul)+Bo*q(Ci/Hr)-Ts;if(!Lu)break;Lu<0?hl=Ci:To=Ci,Ci=.5*(hl+To)}while(n(To-hl)>p&&--cn>0)}else{Ci=p,cn=25;do{var au=Ci*Ci,Js=G(Fr-au),eu=Ps+mo*Js,dc=Ci*eu+Bo*q(Ci/Hr)-Ts,Tl=eu+(Bo-mo*au)/Js;Ci-=wo=Js?dc/Tl:0}while(n(wo)>p&&--cn>0)}return[Ci,-ri-qe*G(Fr-Ci*Ci)]}function ya(ve,xe){for(var Ie=0,qe=1,Qe=.5,Xe=50;;){var nt=Qe*Qe,qt=G(Qe),jt=q(1/G(1+nt)),ar=1-nt+Qe*(1+nt)*jt,fr=(1-qt)/ar,br=G(fr),Fr=fr*(1+nt),Hr=br*(1-nt),ri=Fr-ve*ve,Ci=G(ri),cn=xe+Hr+Qe*Ci;if(n(qe-Ie)<k||--Xe===0||cn===0)break;cn>0?Ie=Qe:qe=Qe,Qe=.5*(Ie+qe)}if(!Xe)return null;var sn=q(qt),Ln=o(sn),Yn=1/Ln,Aa=2*qt*Ln,fa=(-3*Qe+jt*(1+3*nt))*Aa,$a=(-ar*Ln-(1-qt)*fa)/(ar*ar),Co=.5*$a/br,Qa=(1-nt)*Co-2*Qe*br*Aa,mo=-2*Yn*Qa,Bo=-Yn*Aa,Ps=-Yn*(Qe*(1+nt)*$a+fr*(1+3*nt)*Aa);return[M/4*(ve*(mo+Bo*Ci)+Ps*q(ve/G(Fr))),sn]}function ea(){return t.geoProjection(En(ki)).scale(239.75)}function Ma(ve,xe,Ie){var qe,Qe,Xe;return ve?(qe=_o(ve,Ie),xe?(Qe=_o(xe,1-Ie),Xe=Qe[1]*Qe[1]+Ie*qe[0]*qe[0]*Qe[0]*Qe[0],[[qe[0]*Qe[2]/Xe,qe[1]*qe[2]*Qe[0]*Qe[1]/Xe],[qe[1]*Qe[1]/Xe,-qe[0]*qe[2]*Qe[0]*Qe[2]/Xe],[qe[2]*Qe[1]*Qe[2]/Xe,-Ie*qe[0]*qe[1]*Qe[0]/Xe]]):[[qe[0],0],[qe[1],0],[qe[2],0]]):(Qe=_o(xe,1-Ie),[[0,Qe[0]/Qe[1]],[1/Qe[1],0],[Qe[2]/Qe[1],0]])}function _o(ve,xe){var Ie,qe,Qe,Xe,nt;if(xe<p)return Xe=m(ve),qe=o(ve),Ie=xe*(ve-Xe*qe)/4,[Xe-Ie*qe,qe+Ie*Xe,1-xe*Xe*Xe/2,ve-Ie];if(xe>=1-p)return Ie=(1-xe)/4,qe=N(ve),Xe=Z(ve),Qe=1/qe,nt=qe*j(ve),[Xe+Ie*(nt-ve)/(qe*qe),Qe-Ie*Xe*Qe*(nt-ve),Qe+Ie*Xe*Qe*(nt+ve),2*i(s(ve))-T+Ie*(nt-ve)/qe];var qt=[1,0,0,0,0,0,0,0,0],jt=[G(xe),0,0,0,0,0,0,0,0],ar=0;for(qe=G(1-xe),nt=1;n(jt[ar]/qt[ar])>p&&ar<8;)Ie=qt[ar++],jt[ar]=(Ie-qe)/2,qt[ar]=(Ie+qe)/2,qe=G(Ie*qe),nt*=2;Qe=nt*qt[ar]*ve;do Xe=jt[ar]*m(qe=Qe)/qt[ar],Qe=(q(Xe)+Qe)/2;while(--ar);return[m(Qe),Xe=o(Qe),Xe/o(Qe-qe),Qe]}function No(ve,xe,Ie){var qe=n(ve),Qe=n(xe),Xe=j(Qe);if(qe){var nt=1/m(qe),qt=1/(b(qe)*b(qe)),jt=-(qt+Ie*(Xe*Xe*nt*nt)-1+Ie),ar=(Ie-1)*qt,fr=(-jt+G(jt*jt-4*ar))/2;return[po(i(1/G(fr)),Ie)*v(ve),po(i(G((fr/qt-1)/Ie)),1-Ie)*v(xe)]}return[0,po(i(Xe),1-Ie)*v(xe)]}function po(ve,xe){if(!xe)return ve;if(xe===1)return u(b(ve/2+L));for(var Ie=1,qe=G(1-xe),Qe=G(xe),Xe=0;n(Qe)>p;Xe++){if(ve%M){var nt=i(qe*b(ve)/Ie);nt<0&&(nt+=M),ve+=nt+~~(ve/M)*M}else ve+=ve;Qe=(Ie+qe)/2,qe=G(Ie*qe),Qe=((Ie=Qe)-qe)/2}return ve/(h(2,Xe)*Ie)}function Lo(ve,xe){var Ie=(C-1)/(C+1),qe=G(1-Ie*Ie),Qe=po(T,qe*qe),Xe=-1,nt=u(b(M/4+n(xe)/2)),qt=s(Xe*nt)/G(Ie),jt=ko(qt*o(Xe*ve),qt*m(Xe*ve)),ar=No(jt[0],jt[1],qe*qe);return[-ar[1],(xe>=0?1:-1)*(.5*Qe-ar[0])]}function ko(ve,xe){var Ie=ve*ve,qe=xe+1,Qe=1-Ie-xe*xe;return[.5*((ve>=0?T:-T)-a(Qe,2*ve)),-.25*u(Qe*Qe+4*Ie)+.5*u(qe*qe+Ie)]}function Ds(ve,xe){var Ie=xe[0]*xe[0]+xe[1]*xe[1];return[(ve[0]*xe[0]+ve[1]*xe[1])/Ie,(ve[1]*xe[0]-ve[0]*xe[1])/Ie]}Lo.invert=function(ve,xe){var Ie=(C-1)/(C+1),qe=G(1-Ie*Ie),Qe=po(T,qe*qe),Xe=-1,nt=Ma(.5*Qe-xe,-ve,qe*qe),qt=Ds(nt[0],nt[1]),jt=a(qt[1],qt[0])/Xe;return[jt,2*i(s(.5/Xe*u(Ie*qt[0]*qt[0]+Ie*qt[1]*qt[1])))-T]};function Fs(){return t.geoProjection(En(Lo)).scale(151.496)}function ll(ve){var xe=m(ve),Ie=o(ve),qe=ul(ve);qe.invert=ul(-ve);function Qe(Xe,nt){var qt=qe(Xe,nt);Xe=qt[0],nt=qt[1];var jt=m(nt),ar=o(nt),fr=o(Xe),br=U(xe*jt+Ie*ar*fr),Fr=m(br),Hr=n(Fr)>p?br/Fr:1;return[Hr*Ie*m(Xe),(n(Xe)>T?Hr:-Hr)*(xe*ar-Ie*jt*fr)]}return Qe.invert=function(Xe,nt){var qt=G(Xe*Xe+nt*nt),jt=-m(qt),ar=o(qt),fr=qt*ar,br=-nt*jt,Fr=qt*xe,Hr=G(fr*fr+br*br-Fr*Fr),ri=a(fr*Fr+br*Hr,br*Fr-fr*Hr),Ci=(qt>T?-1:1)*a(Xe*jt,qt*o(ri)*ar+nt*m(ri)*jt);return qe.invert(Ci,ri)},Qe}function ul(ve){var xe=m(ve),Ie=o(ve);return function(qe,Qe){var Xe=o(Qe),nt=o(qe)*Xe,qt=m(qe)*Xe,jt=m(Qe);return[a(qt,nt*Ie-jt*xe),q(jt*Ie+nt*xe)]}}function zl(){var ve=0,xe=t.geoProjectionMutator(ll),Ie=xe(ve),qe=Ie.rotate,Qe=Ie.stream,Xe=t.geoCircle();return Ie.parallel=function(nt){if(!arguments.length)return ve*P;var qt=Ie.rotate();return xe(ve=nt*E).rotate(qt)},Ie.rotate=function(nt){return arguments.length?(qe.call(Ie,[nt[0],nt[1]-ve*P]),Xe.center([-nt[0],-nt[1]]),Ie):(nt=qe.call(Ie),nt[1]+=ve*P,nt)},Ie.stream=function(nt){return nt=Qe(nt),nt.sphere=function(){nt.polygonStart();var qt=.01,jt=Xe.radius(90-qt)().coordinates[0],ar=jt.length-1,fr=-1,br;for(nt.lineStart();++fr<ar;)nt.point((br=jt[fr])[0],br[1]);for(nt.lineEnd(),jt=Xe.radius(90+qt)().coordinates[0],ar=jt.length-1,nt.lineStart();--fr>=0;)nt.point((br=jt[fr])[0],br[1]);nt.lineEnd(),nt.polygonEnd()},nt},Ie.scale(79.4187).parallel(45).clipAngle(180-.001)}var us=3,il=q(1-1/us)*P,As=Yr(0);function cl(ve){var xe=il*E,Ie=xt(M,xe)[0]-xt(-M,xe)[0],qe=As(0,xe)[1],Qe=xt(0,xe)[1],Xe=S-Qe,nt=g/ve,qt=4/g,jt=qe+Xe*Xe*4/g;function ar(fr,br){var Fr,Hr=n(br);if(Hr>xe){var ri=f(ve-1,c(0,l((fr+M)/nt)));fr+=M*(ve-1)/ve-ri*nt,Fr=xt(fr,Hr),Fr[0]=Fr[0]*g/Ie-g*(ve-1)/(2*ve)+ri*g/ve,Fr[1]=qe+(Fr[1]-Qe)*4*Xe/g,br<0&&(Fr[1]=-Fr[1])}else Fr=As(fr,br);return Fr[0]*=qt,Fr[1]/=jt,Fr}return ar.invert=function(fr,br){fr/=qt,br*=jt;var Fr=n(br);if(Fr>qe){var Hr=f(ve-1,c(0,l((fr+M)/nt)));fr=(fr+M*(ve-1)/ve-Hr*nt)*Ie/g;var ri=xt.invert(fr,.25*(Fr-qe)*g/Xe+Qe);return ri[0]-=M*(ve-1)/ve-Hr*nt,br<0&&(ri[1]=-ri[1]),ri}return As.invert(fr,br)},ar}function Ks(ve,xe){return[ve,xe&1?90-p:il]}function zs(ve,xe){return[ve,xe&1?-90+p:-il]}function Io(ve){return[ve[0]*(1-p),ve[1]]}function ls(ve){var xe=[].concat(r.range(-180,180+ve/2,ve).map(Ks),r.range(180,-180-ve/2,-ve).map(zs));return{type:"Polygon",coordinates:[ve===180?xe.map(Io):xe]}}function Yl(){var ve=4,xe=t.geoProjectionMutator(cl),Ie=xe(ve),qe=Ie.stream;return Ie.lobes=function(Qe){return arguments.length?xe(ve=+Qe):ve},Ie.stream=function(Qe){var Xe=Ie.rotate(),nt=qe(Qe),qt=(Ie.rotate([0,0]),qe(Qe));return Ie.rotate(Xe),nt.sphere=function(){t.geoStream(ls(180/ve),qt)},nt},Ie.scale(239.75)}function Su(ve){var xe=1+ve,Ie=m(1/xe),qe=q(Ie),Qe=2*G(M/(Xe=M+4*qe*xe)),Xe,nt=.5*Qe*(xe+G(ve*(2+ve))),qt=ve*ve,jt=xe*xe;function ar(fr,br){var Fr=1-m(br),Hr,ri;if(Fr&&Fr<2){var Ci=T-br,cn=25,sn;do{var Ln=m(Ci),Yn=o(Ci),Aa=qe+a(Ln,xe-Yn),fa=1+jt-2*xe*Yn;Ci-=sn=(Ci-qt*qe-xe*Ln+fa*Aa-.5*Fr*Xe)/(2*xe*Ln*Aa)}while(n(sn)>k&&--cn>0);Hr=Qe*G(fa),ri=fr*Aa/M}else Hr=Qe*(ve+Fr),ri=fr*qe/M;return[Hr*m(ri),nt-Hr*o(ri)]}return ar.invert=function(fr,br){var Fr=fr*fr+(br-=nt)*br,Hr=(1+jt-Fr/(Qe*Qe))/(2*xe),ri=U(Hr),Ci=m(ri),cn=qe+a(Ci,xe-Hr);return[q(fr/G(Fr))*M/cn,q(1-2*(ri-qt*qe-xe*Ci+(1+jt-2*xe*Hr)*cn)/Xe)]},ar}function nc(){var ve=1,xe=t.geoProjectionMutator(Su),Ie=xe(ve);return Ie.ratio=function(qe){return arguments.length?xe(ve=+qe):ve},Ie.scale(167.774).center([0,18.67])}var bs=.7109889596207567,Rn=.0528035274542;function _a(ve,xe){return xe>-bs?(ve=tt(ve,xe),ve[1]+=Rn,ve):dt(ve,xe)}_a.invert=function(ve,xe){return xe>-bs?tt.invert(ve,xe-Rn):dt.invert(ve,xe)};function Vu(){return t.geoProjection(_a).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function ql(ve,xe){return n(xe)>bs?(ve=tt(ve,xe),ve[1]-=xe>0?Rn:-Rn,ve):dt(ve,xe)}ql.invert=function(ve,xe){return n(xe)>bs?tt.invert(ve,xe+(xe>0?Rn:-Rn)):dt.invert(ve,xe)};function xo(){return t.geoProjection(ql).scale(152.63)}function Kl(ve,xe,Ie,qe){var Qe=G(4*M/(2*Ie+(1+ve-xe/2)*m(2*Ie)+(ve+xe)/2*m(4*Ie)+xe/2*m(6*Ie))),Xe=G(qe*m(Ie)*G((1+ve*o(2*Ie)+xe*o(4*Ie))/(1+ve+xe))),nt=Ie*jt(1);function qt(br){return G(1+ve*o(2*br)+xe*o(4*br))}function jt(br){var Fr=br*Ie;return(2*Fr+(1+ve-xe/2)*m(2*Fr)+(ve+xe)/2*m(4*Fr)+xe/2*m(6*Fr))/Ie}function ar(br){return qt(br)*m(br)}var fr=function(br,Fr){var Hr=Ie*Vt(jt,nt*m(Fr)/Ie,Fr/M);isNaN(Hr)&&(Hr=Ie*v(Fr));var ri=Qe*qt(Hr);return[ri*Xe*br/M*o(Hr),ri/Xe*m(Hr)]};return fr.invert=function(br,Fr){var Hr=Vt(ar,Fr*Xe/Qe);return[br*M/(o(Hr)*Qe*Xe*qt(Hr)),q(Ie*jt(Hr/Ie)/nt)]},Ie===0&&(Qe=G(qe/M),fr=function(br,Fr){return[br*Qe,m(Fr)/Qe]},fr.invert=function(br,Fr){return[br/Qe,q(Fr*Qe)]}),fr}function Ns(){var ve=1,xe=0,Ie=45*E,qe=2,Qe=t.geoProjectionMutator(Kl),Xe=Qe(ve,xe,Ie,qe);return Xe.a=function(nt){return arguments.length?Qe(ve=+nt,xe,Ie,qe):ve},Xe.b=function(nt){return arguments.length?Qe(ve,xe=+nt,Ie,qe):xe},Xe.psiMax=function(nt){return arguments.length?Qe(ve,xe,Ie=+nt*E,qe):Ie*P},Xe.ratio=function(nt){return arguments.length?Qe(ve,xe,Ie,qe=+nt):qe},Xe.scale(180.739)}function Hl(ve,xe,Ie,qe,Qe,Xe,nt,qt,jt,ar,fr){if(fr.nanEncountered)return NaN;var br,Fr,Hr,ri,Ci,cn,sn,Ln,Yn,Aa;if(br=Ie-xe,Fr=ve(xe+br*.25),Hr=ve(Ie-br*.25),isNaN(Fr)){fr.nanEncountered=!0;return}if(isNaN(Hr)){fr.nanEncountered=!0;return}return ri=br*(qe+4*Fr+Qe)/12,Ci=br*(Qe+4*Hr+Xe)/12,cn=ri+Ci,Aa=(cn-nt)/15,ar>jt?(fr.maxDepthCount++,cn+Aa):Math.abs(Aa)<qt?cn+Aa:(sn=xe+br*.5,Ln=Hl(ve,xe,sn,qe,Fr,Qe,ri,qt*.5,jt,ar+1,fr),isNaN(Ln)?(fr.nanEncountered=!0,NaN):(Yn=Hl(ve,sn,Ie,Qe,Hr,Xe,Ci,qt*.5,jt,ar+1,fr),isNaN(Yn)?(fr.nanEncountered=!0,NaN):Ln+Yn))}function ac(ve,xe,Ie,qe,Qe){var Xe={maxDepthCount:0,nanEncountered:!1};qe===void 0&&(qe=1e-8),Qe===void 0&&(Qe=20);var nt=ve(xe),qt=ve(.5*(xe+Ie)),jt=ve(Ie),ar=(nt+4*qt+jt)*(Ie-xe)/6,fr=Hl(ve,xe,Ie,nt,qt,jt,ar,qe,Qe,1,Xe);return fr}function oa(ve,xe,Ie){function qe(Hr){return ve+(1-ve)*h(1-h(Hr,xe),1/xe)}function Qe(Hr){return ac(qe,0,Hr,1e-4)}for(var Xe=1/Qe(1),nt=1e3,qt=(1+1e-8)*Xe,jt=[],ar=0;ar<=nt;ar++)jt.push(Qe(ar/nt)*qt);function fr(Hr){var ri=0,Ci=nt,cn=nt>>1;do jt[cn]>Hr?Ci=cn:ri=cn,cn=ri+Ci>>1;while(cn>ri);var sn=jt[cn+1]-jt[cn];return sn&&(sn=(Hr-jt[cn+1])/sn),(cn+1+sn)/nt}var br=2*fr(1)/M*Xe/Ie,Fr=function(Hr,ri){var Ci=fr(n(m(ri))),cn=qe(Ci)*Hr;return Ci/=br,[cn,ri>=0?Ci:-Ci]};return Fr.invert=function(Hr,ri){var Ci;return ri*=br,n(ri)<1&&(Ci=v(ri)*q(Qe(n(ri))*Xe)),[Hr/qe(n(ri)),Ci]},Fr}function qo(){var ve=0,xe=2.5,Ie=1.183136,qe=t.geoProjectionMutator(oa),Qe=qe(ve,xe,Ie);return Qe.alpha=function(Xe){return arguments.length?qe(ve=+Xe,xe,Ie):ve},Qe.k=function(Xe){return arguments.length?qe(ve,xe=+Xe,Ie):xe},Qe.gamma=function(Xe){return arguments.length?qe(ve,xe,Ie=+Xe):Ie},Qe.scale(152.63)}function Oo(ve,xe){return n(ve[0]-xe[0])<p&&n(ve[1]-xe[1])<p}function Ol(ve,xe){for(var Ie=-1,qe=ve.length,Qe=ve[0],Xe,nt,qt,jt=[];++Ie<qe;){Xe=ve[Ie],nt=(Xe[0]-Qe[0])/xe,qt=(Xe[1]-Qe[1])/xe;for(var ar=0;ar<xe;++ar)jt.push([Qe[0]+ar*nt,Qe[1]+ar*qt]);Qe=Xe}return jt.push(Xe),jt}function Pc(ve){var xe=[],Ie,qe,Qe,Xe,nt,qt,jt,ar=ve[0].length;for(jt=0;jt<ar;++jt)Ie=ve[0][jt],qe=Ie[0][0],Qe=Ie[0][1],Xe=Ie[1][1],nt=Ie[2][0],qt=Ie[2][1],xe.push(Ol([[qe+p,Qe+p],[qe+p,Xe-p],[nt-p,Xe-p],[nt-p,qt+p]],30));for(jt=ve[1].length-1;jt>=0;--jt)Ie=ve[1][jt],qe=Ie[0][0],Qe=Ie[0][1],Xe=Ie[1][1],nt=Ie[2][0],qt=Ie[2][1],xe.push(Ol([[nt-p,qt-p],[nt-p,Xe+p],[qe+p,Xe+p],[qe+p,Qe-p]],30));return{type:"Polygon",coordinates:[r.merge(xe)]}}function Do(ve,xe,Ie){var qe,Qe;function Xe(jt,ar){for(var fr=ar<0?-1:1,br=xe[+(ar<0)],Fr=0,Hr=br.length-1;Fr<Hr&&jt>br[Fr][2][0];++Fr);var ri=ve(jt-br[Fr][1][0],ar);return ri[0]+=ve(br[Fr][1][0],fr*ar>fr*br[Fr][0][1]?br[Fr][0][1]:ar)[0],ri}Ie?Xe.invert=Ie(Xe):ve.invert&&(Xe.invert=function(jt,ar){for(var fr=Qe[+(ar<0)],br=xe[+(ar<0)],Fr=0,Hr=fr.length;Fr<Hr;++Fr){var ri=fr[Fr];if(ri[0][0]<=jt&&jt<ri[1][0]&&ri[0][1]<=ar&&ar<ri[1][1]){var Ci=ve.invert(jt-ve(br[Fr][1][0],0)[0],ar);return Ci[0]+=br[Fr][1][0],Oo(Xe(Ci[0],Ci[1]),[jt,ar])?Ci:null}}});var nt=t.geoProjection(Xe),qt=nt.stream;return nt.stream=function(jt){var ar=nt.rotate(),fr=qt(jt),br=(nt.rotate([0,0]),qt(jt));return nt.rotate(ar),fr.sphere=function(){t.geoStream(qe,br)},fr},nt.lobes=function(jt){return arguments.length?(qe=Pc(jt),xe=jt.map(function(ar){return ar.map(function(fr){return[[fr[0][0]*E,fr[0][1]*E],[fr[1][0]*E,fr[1][1]*E],[fr[2][0]*E,fr[2][1]*E]]})}),Qe=xe.map(function(ar){return ar.map(function(fr){var br=ve(fr[0][0],fr[0][1])[0],Fr=ve(fr[2][0],fr[2][1])[0],Hr=ve(fr[1][0],fr[0][1])[1],ri=ve(fr[1][0],fr[1][1])[1],Ci;return Hr>ri&&(Ci=Hr,Hr=ri,ri=Ci),[[br,Hr],[Fr,ri]]})}),nt):xe.map(function(ar){return ar.map(function(fr){return[[fr[0][0]*P,fr[0][1]*P],[fr[1][0]*P,fr[1][1]*P],[fr[2][0]*P,fr[2][1]*P]]})})},xe!=null&&nt.lobes(xe),nt}var rf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Vf(){return Do(rt,rf).scale(160.857)}var pl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Zc(){return Do(ql,pl).scale(152.63)}var Jl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function qs(){return Do(tt,Jl).scale(169.529)}var yu=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function oc(){return Do(tt,yu).scale(169.529).rotate([20,0])}var Cf=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function sc(){return Do(_a,Cf,st).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var jh=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Lf(){return Do(dt,jh).scale(152.63).rotate([-20,0])}function cs(ve,xe){return[3/g*ve*G(M*M/3-xe*xe),xe]}cs.invert=function(ve,xe){return[g/3*ve/G(M*M/3-xe*xe),xe]};function nf(){return t.geoProjection(cs).scale(158.837)}function Gf(ve){function xe(Ie,qe){if(n(n(qe)-T)<p)return[0,qe<0?-2:2];var Qe=m(qe),Xe=h((1+Qe)/(1-Qe),ve/2),nt=.5*(Xe+1/Xe)+o(Ie*=ve);return[2*m(Ie)/nt,(Xe-1/Xe)/nt]}return xe.invert=function(Ie,qe){var Qe=n(qe);if(n(Qe-2)<p)return Ie?null:[0,v(qe)*T];if(Qe>2)return null;Ie/=2,qe/=2;var Xe=Ie*Ie,nt=qe*qe,qt=2*qe/(1+Xe+nt);return qt=h((1+qt)/(1-qt),1/ve),[a(2*Ie,1-Xe-nt)/ve,q((qt-1)/(qt+1))]},xe}function $l(){var ve=.5,xe=t.geoProjectionMutator(Gf),Ie=xe(ve);return Ie.spacing=function(qe){return arguments.length?xe(ve=+qe):ve},Ie.scale(124.75)}var fl=M/C;function lc(ve,xe){return[ve*(1+G(o(xe)))/2,xe/(o(xe/2)*o(ve/6))]}lc.invert=function(ve,xe){var Ie=n(ve),qe=n(xe),Qe=p,Xe=T;qe<fl?Xe*=qe/fl:Qe+=6*U(fl/qe);for(var nt=0;nt<25;nt++){var qt=m(Xe),jt=G(o(Xe)),ar=m(Xe/2),fr=o(Xe/2),br=m(Qe/6),Fr=o(Qe/6),Hr=.5*Qe*(1+jt)-Ie,ri=Xe/(fr*Fr)-qe,Ci=jt?-.25*Qe*qt/jt:0,cn=.5*(1+jt),sn=(1+.5*Xe*ar/fr)/(fr*Fr),Ln=Xe/fr*(br/6)/(Fr*Fr),Yn=Ci*Ln-sn*cn,Aa=(Hr*Ln-ri*cn)/Yn,fa=(ri*Ci-Hr*sn)/Yn;if(Xe-=Aa,Qe-=fa,n(Aa)<p&&n(fa)<p)break}return[ve<0?-Qe:Qe,xe<0?-Xe:Xe]};function Fu(){return t.geoProjection(lc).scale(97.2672)}function Es(ve,xe){var Ie=ve*ve,qe=xe*xe;return[ve*(.975534+qe*(-.119161+Ie*-.0143059+qe*-.0547009)),xe*(1.00384+Ie*(.0802894+qe*-.02855+Ie*199025e-9)+qe*(.0998909+qe*-.0491032))]}Es.invert=function(ve,xe){var Ie=v(ve)*M,qe=xe/2,Qe=50;do{var Xe=Ie*Ie,nt=qe*qe,qt=Ie*qe,jt=Ie*(.975534+nt*(-.119161+Xe*-.0143059+nt*-.0547009))-ve,ar=qe*(1.00384+Xe*(.0802894+nt*-.02855+Xe*199025e-9)+nt*(.0998909+nt*-.0491032))-xe,fr=.975534-nt*(.119161+3*Xe*.0143059+nt*.0547009),br=-qt*(2*.119161+4*.0547009*nt+2*.0143059*Xe),Fr=qt*(2*.0802894+4*199025e-9*Xe+2*-.02855*nt),Hr=1.00384+Xe*(.0802894+199025e-9*Xe)+nt*(3*(.0998909-.02855*Xe)-5*.0491032*nt),ri=br*Fr-Hr*fr,Ci=(ar*br-jt*Hr)/ri,cn=(jt*Fr-ar*fr)/ri;Ie-=Ci,qe-=cn}while((n(Ci)>p||n(cn)>p)&&--Qe>0);return Qe&&[Ie,qe]};function Hs(){return t.geoProjection(Es).scale(139.98)}function Go(ve,xe){return[m(ve)/o(xe),b(xe)*o(ve)]}Go.invert=function(ve,xe){var Ie=ve*ve,qe=xe*xe,Qe=qe+1,Xe=Ie+Qe,nt=ve?x*G((Xe-G(Xe*Xe-4*Ie))/Ie):1/G(Qe);return[q(ve*nt),v(xe)*U(nt)]};function ps(){return t.geoProjection(Go).scale(144.049).clipAngle(90-.001)}function uc(ve){var xe=o(ve),Ie=b(L+ve/2);function qe(Qe,Xe){var nt=Xe-ve,qt=n(nt)<p?Qe*xe:n(qt=L+Xe/2)<p||n(n(qt)-T)<p?0:Qe*nt/u(b(qt)/Ie);return[qt,nt]}return qe.invert=function(Qe,Xe){var nt,qt=Xe+ve;return[n(Xe)<p?Qe/xe:n(nt=L+qt/2)<p||n(n(nt)-T)<p?0:Qe*u(b(nt)/Ie)/Xe,qt]},qe}function xl(){return Tt(uc).parallel(40).scale(158.837)}function Gu(ve,xe){return[ve,1.25*u(b(L+.4*xe))]}Gu.invert=function(ve,xe){return[ve,2.5*i(s(.8*xe))-.625*M]};function Os(){return t.geoProjection(Gu).scale(108.318)}function od(ve){var xe=ve.length-1;function Ie(qe,Qe){for(var Xe=o(Qe),nt=2/(1+Xe*o(qe)),qt=nt*Xe*m(qe),jt=nt*m(Qe),ar=xe,fr=ve[ar],br=fr[0],Fr=fr[1],Hr;--ar>=0;)fr=ve[ar],br=fr[0]+qt*(Hr=br)-jt*Fr,Fr=fr[1]+qt*Fr+jt*Hr;return br=qt*(Hr=br)-jt*Fr,Fr=qt*Fr+jt*Hr,[br,Fr]}return Ie.invert=function(qe,Qe){var Xe=20,nt=qe,qt=Qe;do{for(var jt=xe,ar=ve[jt],fr=ar[0],br=ar[1],Fr=0,Hr=0,ri;--jt>=0;)ar=ve[jt],Fr=fr+nt*(ri=Fr)-qt*Hr,Hr=br+nt*Hr+qt*ri,fr=ar[0]+nt*(ri=fr)-qt*br,br=ar[1]+nt*br+qt*ri;Fr=fr+nt*(ri=Fr)-qt*Hr,Hr=br+nt*Hr+qt*ri,fr=nt*(ri=fr)-qt*br-qe,br=nt*br+qt*ri-Qe;var Ci=Fr*Fr+Hr*Hr,cn,sn;nt-=cn=(fr*Fr+br*Hr)/Ci,qt-=sn=(br*Fr-fr*Hr)/Ci}while(n(cn)+n(sn)>p*p&&--Xe>0);if(Xe){var Ln=G(nt*nt+qt*qt),Yn=2*i(Ln*.5),Aa=m(Yn);return[a(nt*Aa,Ln*o(Yn)),Ln?q(qt*Aa/Ln):0]}},Ie}var Po=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],sd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ko=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Pa=[[.9245,0],[0,0],[.01943,0]],af=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hu(){return Bl(Po,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function bl(){return Bl(sd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Hf(){return Bl(Ko,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ic(){return Bl(Pa,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function yf(){return Bl(af,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Bl(ve,xe){var Ie=t.geoProjection(od(ve)).rotate(xe).clipAngle(90),qe=t.geoRotation(xe),Qe=Ie.center;return delete Ie.rotate,Ie.center=function(Xe){return arguments.length?Qe(qe(Xe)):qe.invert(Qe())},Ie}var Ah=G(6),Qf=G(7);function _f(ve,xe){var Ie=q(7*m(xe)/(3*Ah));return[Ah*ve*(2*o(2*Ie/3)-1)/Qf,9*m(Ie/3)/Qf]}_f.invert=function(ve,xe){var Ie=3*q(xe*Qf/9);return[ve*Qf/(Ah*(2*o(2*Ie/3)-1)),q(m(Ie)*3*Ah/7)]};function Yc(){return t.geoProjection(_f).scale(164.859)}function eh(ve,xe){for(var Ie=(1+x)*m(xe),qe=xe,Qe=0,Xe;Qe<25&&(qe-=Xe=(m(qe/2)+m(qe)-Ie)/(.5*o(qe/2)+o(qe)),!(n(Xe)<p));Qe++);return[ve*(1+2*o(qe)/o(qe/2))/(3*C),2*G(3)*m(qe/2)/G(2+C)]}eh.invert=function(ve,xe){var Ie=xe*G(2+C)/(2*G(3)),qe=2*q(Ie);return[3*C*ve/(1+2*o(qe)/o(qe/2)),q((Ie+m(qe))/(1+x))]};function th(){return t.geoProjection(eh).scale(188.209)}function ju(ve,xe){for(var Ie=G(6/(4+M)),qe=(1+M/4)*m(xe),Qe=xe/2,Xe=0,nt;Xe<25&&(Qe-=nt=(Qe/2+m(Qe)-qe)/(.5+o(Qe)),!(n(nt)<p));Xe++);return[Ie*(.5+o(Qe))*ve/1.5,Ie*Qe]}ju.invert=function(ve,xe){var Ie=G(6/(4+M)),qe=xe/Ie;return n(n(qe)-T)<p&&(qe=qe<0?-T:T),[1.5*ve/(Ie*(.5+o(qe))),q((qe/2+m(qe))/(1+M/4))]};function jf(){return t.geoProjection(ju).scale(166.518)}function cc(ve,xe){var Ie=xe*xe,qe=Ie*Ie,Qe=Ie*qe;return[ve*(.84719-.13063*Ie+Qe*Qe*(-.04515+.05494*Ie-.02326*qe+.00331*Qe)),xe*(1.01183+qe*qe*(-.02625+.01926*Ie-.00396*qe))]}cc.invert=function(ve,xe){var Ie=xe,qe=25,Qe,Xe,nt,qt;do Xe=Ie*Ie,nt=Xe*Xe,Ie-=Qe=(Ie*(1.01183+nt*nt*(-.02625+.01926*Xe-.00396*nt))-xe)/(1.01183+nt*nt*(9*-.02625+11*.01926*Xe+13*-.00396*nt));while(n(Qe)>k&&--qe>0);return Xe=Ie*Ie,nt=Xe*Xe,qt=Xe*nt,[ve/(.84719-.13063*Xe+qt*qt*(-.04515+.05494*Xe-.02326*nt+.00331*qt)),Ie]};function of(){return t.geoProjection(cc).scale(175.295)}function Nl(ve,xe){return[ve*(1+o(xe))/2,2*(xe-b(xe/2))]}Nl.invert=function(ve,xe){for(var Ie=xe/2,qe=0,Qe=1/0;qe<10&&n(Qe)>p;++qe){var Xe=o(xe/2);xe-=Qe=(xe-b(xe/2)-Ie)/(1-.5/(Xe*Xe))}return[2*ve/(1+o(xe)),xe]};function Kc(){return t.geoProjection(Nl).scale(152.63)}var Rc=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function gs(){return Do(He(1/0),Rc).rotate([20,0]).scale(152.63)}function Wf(ve,xe){var Ie=m(xe),qe=o(xe),Qe=v(ve);if(ve===0||n(xe)===T)return[0,xe];if(xe===0)return[ve,0];if(n(ve)===T)return[ve*qe,T*Ie];var Xe=M/(2*ve)-2*ve/M,nt=2*xe/M,qt=(1-nt*nt)/(Ie-nt),jt=Xe*Xe,ar=qt*qt,fr=1+jt/ar,br=1+ar/jt,Fr=(Xe*Ie/qt-Xe/2)/fr,Hr=(ar*Ie/jt+qt/2)/br,ri=Fr*Fr+qe*qe/fr,Ci=Hr*Hr-(ar*Ie*Ie/jt+qt*Ie-1)/br;return[T*(Fr+G(ri)*Qe),T*(Hr+G(Ci<0?0:Ci)*v(-xe*Xe)*Qe)]}Wf.invert=function(ve,xe){ve/=T,xe/=T;var Ie=ve*ve,qe=xe*xe,Qe=Ie+qe,Xe=M*M;return[ve?(Qe-1+G((1-Qe)*(1-Qe)+4*Ie))/(2*ve)*T:0,Vt(function(nt){return Qe*(M*m(nt)-2*nt)*M+4*nt*nt*(xe-m(nt))+2*M*nt-Xe*xe},0)]};function Wh(){return t.geoProjection(Wf).scale(127.267)}var rh=1.0148,sf=.23185,Sh=-.14499,Mu=.02406,ih=rh,js=5*sf,Eu=7*Sh,Dc=9*Mu,ks=1.790857183;function bc(ve,xe){var Ie=xe*xe;return[ve,xe*(rh+Ie*Ie*(sf+Ie*(Sh+Mu*Ie)))]}bc.invert=function(ve,xe){xe>ks?xe=ks:xe<-ks&&(xe=-ks);var Ie=xe,qe;do{var Qe=Ie*Ie;Ie-=qe=(Ie*(rh+Qe*Qe*(sf+Qe*(Sh+Mu*Qe)))-xe)/(ih+Qe*Qe*(js+Qe*(Eu+Dc*Qe)))}while(n(qe)>p);return[ve,Ie]};function hu(){return t.geoProjection(bc).scale(139.319)}function _u(ve,xe){if(n(xe)<p)return[ve,0];var Ie=b(xe),qe=ve*m(xe);return[m(qe)/Ie,xe+(1-o(qe))/Ie]}_u.invert=function(ve,xe){if(n(xe)<p)return[ve,0];var Ie=ve*ve+xe*xe,qe=xe*.5,Qe=10,Xe;do{var nt=b(qe),qt=1/o(qe),jt=Ie-2*xe*qe+qe*qe;qe-=Xe=(nt*jt+2*(qe-xe))/(2+jt*qt*qt+2*(qe-xe)*nt)}while(n(Xe)>p&&--Qe>0);return nt=b(qe),[(n(xe)<n(qe+1/nt)?q(ve*nt):v(xe)*v(ve)*(U(n(ve*nt))+T))/m(qe),qe]};function nl(){return t.geoProjection(_u).scale(103.74)}function nh(ve,xe){var Ie=Fc(ve[1],ve[0]),qe=Fc(xe[1],xe[0]),Qe=bd(Ie,qe),Xe=wc(Ie)/wc(qe);return zu([1,0,ve[0][0],0,1,ve[0][1]],zu([Xe,0,0,0,Xe,0],zu([o(Qe),m(Qe),0,-m(Qe),o(Qe),0],[1,0,-xe[0][0],0,1,-xe[0][1]])))}function Mh(ve){var xe=1/(ve[0]*ve[4]-ve[1]*ve[3]);return[xe*ve[4],-xe*ve[1],xe*(ve[1]*ve[5]-ve[2]*ve[4]),-xe*ve[3],xe*ve[0],xe*(ve[2]*ve[3]-ve[0]*ve[5])]}function zu(ve,xe){return[ve[0]*xe[0]+ve[1]*xe[3],ve[0]*xe[1]+ve[1]*xe[4],ve[0]*xe[2]+ve[1]*xe[5]+ve[2],ve[3]*xe[0]+ve[4]*xe[3],ve[3]*xe[1]+ve[4]*xe[4],ve[3]*xe[2]+ve[4]*xe[5]+ve[5]]}function Fc(ve,xe){return[ve[0]-xe[0],ve[1]-xe[1]]}function wc(ve){return G(ve[0]*ve[0]+ve[1]*ve[1])}function bd(ve,xe){return a(ve[0]*xe[1]-ve[1]*xe[0],ve[0]*xe[0]+ve[1]*xe[1])}function xf(ve,xe,Ie){qe(ve,{transform:null});function qe(ar,fr){if(ar.edges=jl(ar.face),fr.face){var br=ar.shared=bf(ar.face,fr.face),Fr=nh(br.map(fr.project),br.map(ar.project));ar.transform=fr.transform?zu(fr.transform,Fr):Fr;for(var Hr=fr.edges,ri=0,Ci=Hr.length;ri<Ci;++ri)qu(br[0],Hr[ri][1])&&qu(br[1],Hr[ri][0])&&(Hr[ri]=ar),qu(br[0],Hr[ri][0])&&qu(br[1],Hr[ri][1])&&(Hr[ri]=ar);for(Hr=ar.edges,ri=0,Ci=Hr.length;ri<Ci;++ri)qu(br[0],Hr[ri][0])&&qu(br[1],Hr[ri][1])&&(Hr[ri]=fr),qu(br[0],Hr[ri][1])&&qu(br[1],Hr[ri][0])&&(Hr[ri]=fr)}else ar.transform=fr.transform;return ar.children&&ar.children.forEach(function(cn){qe(cn,ar)}),ar}function Qe(ar,fr){var br=xe(ar,fr),Fr=br.project([ar*P,fr*P]),Hr;return(Hr=br.transform)?[Hr[0]*Fr[0]+Hr[1]*Fr[1]+Hr[2],-(Hr[3]*Fr[0]+Hr[4]*Fr[1]+Hr[5])]:(Fr[1]=-Fr[1],Fr)}lf(ve)&&(Qe.invert=function(ar,fr){var br=Xe(ve,[ar,-fr]);return br&&(br[0]*=E,br[1]*=E,br)});function Xe(ar,fr){var br=ar.project.invert,Fr=ar.transform,Hr=fr;if(Fr&&(Fr=Mh(Fr),Hr=[Fr[0]*Hr[0]+Fr[1]*Hr[1]+Fr[2],Fr[3]*Hr[0]+Fr[4]*Hr[1]+Fr[5]]),br&&ar===nt(ri=br(Hr)))return ri;for(var ri,Ci=ar.children,cn=0,sn=Ci&&Ci.length;cn<sn;++cn)if(ri=Xe(Ci[cn],fr))return ri}function nt(ar){return xe(ar[0]*E,ar[1]*E)}var qt=t.geoProjection(Qe),jt=qt.stream;return qt.stream=function(ar){var fr=qt.rotate(),br=jt(ar),Fr=(qt.rotate([0,0]),jt(ar));return qt.rotate(fr),br.sphere=function(){Fr.polygonStart(),Fr.lineStart(),Pf(Fr,ve),Fr.lineEnd(),Fr.polygonEnd()},br},qt.angle(Ie==null?-30:Ie*P)}function Pf(ve,xe,Ie){var qe,Qe=xe.edges,Xe=Qe.length,nt,qt={type:"MultiPoint",coordinates:xe.face},jt=xe.face.filter(function(Ci){return n(Ci[1])!==90}),ar=t.geoBounds({type:"MultiPoint",coordinates:jt}),fr=!1,br=-1,Fr=ar[1][0]-ar[0][0],Hr=Fr===180||Fr===360?[(ar[0][0]+ar[1][0])/2,(ar[0][1]+ar[1][1])/2]:t.geoCentroid(qt);if(Ie)for(;++br<Xe&&Qe[br]!==Ie;);++br;for(var ri=0;ri<Xe;++ri)nt=Qe[(ri+br)%Xe],Array.isArray(nt)?(fr||(ve.point((qe=t.geoInterpolate(nt[0],Hr)(p))[0],qe[1]),fr=!0),ve.point((qe=t.geoInterpolate(nt[1],Hr)(p))[0],qe[1])):(fr=!1,nt!==Ie&&Pf(ve,nt,xe))}function qu(ve,xe){return ve&&xe&&ve[0]===xe[0]&&ve[1]===xe[1]}function bf(ve,xe){for(var Ie,qe,Qe=ve.length,Xe=null,nt=0;nt<Qe;++nt){Ie=ve[nt];for(var qt=xe.length;--qt>=0;)if(qe=xe[qt],Ie[0]===qe[0]&&Ie[1]===qe[1]){if(Xe)return[Xe,Ie];Xe=Ie}}}function jl(ve){for(var xe=ve.length,Ie=[],qe=ve[xe-1],Qe=0;Qe<xe;++Qe)Ie.push([qe,qe=ve[Qe]]);return Ie}function lf(ve){return ve.project.invert||ve.children&&ve.children.some(lf)}var Xh=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],If=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(ve){return ve.map(function(xe){return Xh[xe]})});function Cs(ve){ve=ve||function(Ie){var qe=t.geoCentroid({type:"MultiPoint",coordinates:Ie});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-qe[0],-qe[1]])};var xe=If.map(function(Ie){return{face:Ie,project:ve(Ie)}});return[-1,0,0,1,0,1,4,5].forEach(function(Ie,qe){var Qe=xe[Ie];Qe&&(Qe.children||(Qe.children=[])).push(xe[qe])}),xf(xe[0],function(Ie,qe){return xe[Ie<-M/2?qe<0?6:4:Ie<0?qe<0?2:0:Ie<M/2?qe<0?3:1:qe<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var du=2/G(3);function ku(ve,xe){var Ie=xt(ve,xe);return[Ie[0]*du,Ie[1]]}ku.invert=function(ve,xe){return xt.invert(ve/du,xe)};function Xf(ve){ve=ve||function(Ie){var qe=t.geoCentroid({type:"MultiPoint",coordinates:Ie});return t.geoProjection(ku).translate([0,0]).scale(1).rotate(qe[1]>0?[-qe[0],0]:[180-qe[0],180])};var xe=If.map(function(Ie){return{face:Ie,project:ve(Ie)}});return[-1,0,0,1,0,1,4,5].forEach(function(Ie,qe){var Qe=xe[Ie];Qe&&(Qe.children||(Qe.children=[])).push(xe[qe])}),xf(xe[0],function(Ie,qe){return xe[Ie<-M/2?qe<0?6:4:Ie<0?qe<0?2:0:Ie<M/2?qe<0?3:1:qe<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function Us(ve){ve=ve||function(nt){var qt=nt.length===6?t.geoCentroid({type:"MultiPoint",coordinates:nt}):nt[0];return t.geoGnomonic().scale(1).translate([0,0]).rotate([-qt[0],-qt[1]])};var xe=If.map(function(nt){for(var qt=nt.map(Rf),jt=qt.length,ar=qt[jt-1],fr,br=[],Fr=0;Fr<jt;++Fr)fr=qt[Fr],br.push(Wu([ar[0]*.9486832980505138+fr[0]*.31622776601683794,ar[1]*.9486832980505138+fr[1]*.31622776601683794,ar[2]*.9486832980505138+fr[2]*.31622776601683794]),Wu([fr[0]*.9486832980505138+ar[0]*.31622776601683794,fr[1]*.9486832980505138+ar[1]*.31622776601683794,fr[2]*.9486832980505138+ar[2]*.31622776601683794])),ar=fr;return br}),Ie=[],qe=[-1,0,0,1,0,1,4,5];xe.forEach(function(nt,qt){for(var jt=If[qt],ar=jt.length,fr=Ie[qt]=[],br=0;br<ar;++br)xe.push([jt[br],nt[(br*2+2)%(2*ar)],nt[(br*2+1)%(2*ar)]]),qe.push(qt),fr.push(zc(Rf(nt[(br*2+2)%(2*ar)]),Rf(nt[(br*2+1)%(2*ar)])))});var Qe=xe.map(function(nt){return{project:ve(nt),face:nt}});qe.forEach(function(nt,qt){var jt=Qe[nt];jt&&(jt.children||(jt.children=[])).push(Qe[qt])});function Xe(nt,qt){var jt=o(qt),ar=[jt*o(nt),jt*m(nt),m(qt)],fr=nt<-M/2?qt<0?6:4:nt<0?qt<0?2:0:nt<M/2?qt<0?3:1:qt<0?7:5,br=Ie[fr];return Qe[wf(br[0],ar)<0?8+3*fr:wf(br[1],ar)<0?8+3*fr+1:wf(br[2],ar)<0?8+3*fr+2:fr]}return xf(Qe[0],Xe).angle(-30).scale(110.625).center([0,45])}function wf(ve,xe){for(var Ie=0,qe=ve.length,Qe=0;Ie<qe;++Ie)Qe+=ve[Ie]*xe[Ie];return Qe}function zc(ve,xe){return[ve[1]*xe[2]-ve[2]*xe[1],ve[2]*xe[0]-ve[0]*xe[2],ve[0]*xe[1]-ve[1]*xe[0]]}function Wu(ve){return[a(ve[1],ve[0])*P,q(c(-1,f(1,ve[2])))*P]}function Rf(ve){var xe=ve[0]*E,Ie=ve[1]*E,qe=o(Ie);return[qe*o(xe),qe*m(xe),m(Ie)]}function Xu(){}function uf(ve){if((Ie=ve.length)<4)return!1;for(var xe=0,Ie,qe=ve[Ie-1][1]*ve[0][0]-ve[Ie-1][0]*ve[0][1];++xe<Ie;)qe+=ve[xe-1][1]*ve[xe][0]-ve[xe-1][0]*ve[xe][1];return qe<=0}function Zf(ve,xe){for(var Ie=xe[0],qe=xe[1],Qe=!1,Xe=0,nt=ve.length,qt=nt-1;Xe<nt;qt=Xe++){var jt=ve[Xe],ar=jt[0],fr=jt[1],br=ve[qt],Fr=br[0],Hr=br[1];fr>qe^Hr>qe&&Ie<(Fr-ar)*(qe-fr)/(Hr-fr)+ar&&(Qe=!Qe)}return Qe}function Wl(ve,xe){var Ie=xe.stream,qe;if(!Ie)throw new Error("invalid projection");switch(ve&&ve.type){case"Feature":qe=Zu;break;case"FeatureCollection":qe=ah;break;default:qe=Tc;break}return qe(ve,Ie)}function ah(ve,xe){return{type:"FeatureCollection",features:ve.features.map(function(Ie){return Zu(Ie,xe)})}}function Zu(ve,xe){return{type:"Feature",id:ve.id,properties:ve.properties,geometry:Tc(ve.geometry,xe)}}function qc(ve,xe){return{type:"GeometryCollection",geometries:ve.geometries.map(function(Ie){return Tc(Ie,xe)})}}function Tc(ve,xe){if(!ve)return null;if(ve.type==="GeometryCollection")return qc(ve,xe);var Ie;switch(ve.type){case"Point":Ie=Oc;break;case"MultiPoint":Ie=Oc;break;case"LineString":Ie=cf;break;case"MultiLineString":Ie=cf;break;case"Polygon":Ie=fc;break;case"MultiPolygon":Ie=fc;break;case"Sphere":Ie=fc;break;default:return null}return t.geoStream(ve,xe(Ie)),Ie.result()}var wl=[],vu=[],Oc={point:function(ve,xe){wl.push([ve,xe])},result:function(){var ve=wl.length?wl.length<2?{type:"Point",coordinates:wl[0]}:{type:"MultiPoint",coordinates:wl}:null;return wl=[],ve}},cf={lineStart:Xu,point:function(ve,xe){wl.push([ve,xe])},lineEnd:function(){wl.length&&(vu.push(wl),wl=[])},result:function(){var ve=vu.length?vu.length<2?{type:"LineString",coordinates:vu[0]}:{type:"MultiLineString",coordinates:vu}:null;return vu=[],ve}},fc={polygonStart:Xu,lineStart:Xu,point:function(ve,xe){wl.push([ve,xe])},lineEnd:function(){var ve=wl.length;if(ve){do wl.push(wl[0].slice());while(++ve<4);vu.push(wl),wl=[]}},polygonEnd:Xu,result:function(){if(!vu.length)return null;var ve=[],xe=[];return vu.forEach(function(Ie){uf(Ie)?ve.push([Ie]):xe.push(Ie)}),xe.forEach(function(Ie){var qe=Ie[0];ve.some(function(Qe){if(Zf(Qe[0],qe))return Qe.push(Ie),!0})||ve.push([Ie])}),vu=[],ve.length?ve.length>1?{type:"MultiPolygon",coordinates:ve}:{type:"Polygon",coordinates:ve[0]}:null}};function Bc(ve){var xe=ve(T,0)[0]-ve(-T,0)[0];function Ie(qe,Qe){var Xe=n(qe)<T,nt=ve(Xe?qe:qe>0?qe-M:qe+M,Qe),qt=(nt[0]-nt[1])*x,jt=(nt[0]+nt[1])*x;if(Xe)return[qt,jt];var ar=xe*x,fr=qt>0^jt>0?-1:1;return[fr*qt-v(jt)*ar,fr*jt-v(qt)*ar]}return ve.invert&&(Ie.invert=function(qe,Qe){var Xe=(qe+Qe)*x,nt=(Qe-qe)*x,qt=n(Xe)<.5*xe&&n(nt)<.5*xe;if(!qt){var jt=xe*x,ar=Xe>0^nt>0?-1:1,fr=-ar*qe+(nt>0?1:-1)*jt,br=-ar*Qe+(Xe>0?1:-1)*jt;Xe=(-fr-br)*x,nt=(fr-br)*x}var Fr=ve.invert(Xe,nt);return qt||(Fr[0]+=Xe>0?M:-M),Fr}),t.geoProjection(Ie).rotate([-90,-90,45]).clipAngle(180-.001)}function kt(){return Bc(ki).scale(176.423)}function Zt(){return Bc(Lo).scale(111.48)}function Mr(ve,xe){if(!(0<=(xe=+xe)&&xe<=20))throw new Error("invalid digits");function Ie(ar){var fr=ar.length,br=2,Fr=new Array(fr);for(Fr[0]=+ar[0].toFixed(xe),Fr[1]=+ar[1].toFixed(xe);br<fr;)Fr[br]=ar[br],++br;return Fr}function qe(ar){return ar.map(Ie)}function Qe(ar){for(var fr=Ie(ar[0]),br=[fr],Fr=1;Fr<ar.length;Fr++){var Hr=Ie(ar[Fr]);(Hr.length>2||Hr[0]!=fr[0]||Hr[1]!=fr[1])&&(br.push(Hr),fr=Hr)}return br.length===1&&ar.length>1&&br.push(Ie(ar[ar.length-1])),br}function Xe(ar){return ar.map(Qe)}function nt(ar){if(ar==null)return ar;var fr;switch(ar.type){case"GeometryCollection":fr={type:"GeometryCollection",geometries:ar.geometries.map(nt)};break;case"Point":fr={type:"Point",coordinates:Ie(ar.coordinates)};break;case"MultiPoint":fr={type:ar.type,coordinates:qe(ar.coordinates)};break;case"LineString":fr={type:ar.type,coordinates:Qe(ar.coordinates)};break;case"MultiLineString":case"Polygon":fr={type:ar.type,coordinates:Xe(ar.coordinates)};break;case"MultiPolygon":fr={type:"MultiPolygon",coordinates:ar.coordinates.map(Xe)};break;default:return ar}return ar.bbox!=null&&(fr.bbox=ar.bbox),fr}function qt(ar){var fr={type:"Feature",properties:ar.properties,geometry:nt(ar.geometry)};return ar.id!=null&&(fr.id=ar.id),ar.bbox!=null&&(fr.bbox=ar.bbox),fr}if(ve!=null)switch(ve.type){case"Feature":return qt(ve);case"FeatureCollection":{var jt={type:"FeatureCollection",features:ve.features.map(qt)};return ve.bbox!=null&&(jt.bbox=ve.bbox),jt}default:return nt(ve)}return ve}function xr(ve){var xe=m(ve);function Ie(qe,Qe){var Xe=xe?b(qe*xe/2)/xe:qe/2;if(!Qe)return[2*Xe,-ve];var nt=2*i(Xe*m(Qe)),qt=1/b(Qe);return[m(nt)*qt,Qe+(1-o(nt))*qt-ve]}return Ie.invert=function(qe,Qe){if(n(Qe+=ve)<p)return[xe?2*i(xe*qe/2)/xe:qe,0];var Xe=qe*qe+Qe*Qe,nt=0,qt=10,jt;do{var ar=b(nt),fr=1/o(nt),br=Xe-2*Qe*nt+nt*nt;nt-=jt=(ar*br+2*(nt-Qe))/(2+br*fr*fr+2*(nt-Qe)*ar)}while(n(jt)>p&&--qt>0);var Fr=qe*(ar=b(nt)),Hr=b(n(Qe)<n(nt+1/ar)?q(Fr)*.5:U(Fr)*.5+M/4)/m(nt);return[xe?2*i(xe*Hr)/xe:2*Hr,nt]},Ie}function Kr(){return Tt(xr).scale(131.215)}var Mi=[[.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]];Mi.forEach(function(ve){ve[1]*=1.0144});function Wi(ve,xe){var Ie=f(18,n(xe)*36/M),qe=l(Ie),Qe=Ie-qe,Xe=(br=Mi[qe])[0],nt=br[1],qt=(br=Mi[++qe])[0],jt=br[1],ar=(br=Mi[f(19,++qe)])[0],fr=br[1],br;return[ve*(qt+Qe*(ar-Xe)/2+Qe*Qe*(ar-2*qt+Xe)/2),(xe>0?T:-T)*(jt+Qe*(fr-nt)/2+Qe*Qe*(fr-2*jt+nt)/2)]}Wi.invert=function(ve,xe){var Ie=xe/T,qe=Ie*90,Qe=f(18,n(qe/5)),Xe=c(0,l(Qe));do{var nt=Mi[Xe][1],qt=Mi[Xe+1][1],jt=Mi[f(19,Xe+2)][1],ar=jt-nt,fr=jt-2*qt+nt,br=2*(n(Ie)-qt)/ar,Fr=fr/ar,Hr=br*(1-Fr*br*(1-2*Fr*br));if(Hr>=0||Xe===1){qe=(xe>=0?5:-5)*(Hr+Qe);var ri=50,Ci;do Qe=f(18,n(qe)/5),Xe=l(Qe),Hr=Qe-Xe,nt=Mi[Xe][1],qt=Mi[Xe+1][1],jt=Mi[f(19,Xe+2)][1],qe-=(Ci=(xe>=0?T:-T)*(qt+Hr*(jt-nt)/2+Hr*Hr*(jt-2*qt+nt)/2)-xe)*P;while(n(Ci)>k&&--ri>0);break}}while(--Xe>=0);var cn=Mi[Xe][0],sn=Mi[Xe+1][0],Ln=Mi[f(19,Xe+2)][0];return[ve/(sn+Hr*(Ln-cn)/2+Hr*Hr*(Ln-2*sn+cn)/2),qe*E]};function dn(){return t.geoProjection(Wi).scale(152.63)}function wn(ve){function xe(Ie,qe){var Qe=o(qe),Xe=(ve-1)/(ve-Qe*o(Ie));return[Xe*Qe*m(Ie),Xe*m(qe)]}return xe.invert=function(Ie,qe){var Qe=Ie*Ie+qe*qe,Xe=G(Qe),nt=(ve-G(1-Qe*(ve+1)/(ve-1)))/((ve-1)/Xe+Xe/(ve-1));return[a(Ie*nt,Xe*G(1-nt*nt)),Xe?q(qe*nt/Xe):0]},xe}function On(ve,xe){var Ie=wn(ve);if(!xe)return Ie;var qe=o(xe),Qe=m(xe);function Xe(nt,qt){var jt=Ie(nt,qt),ar=jt[1],fr=ar*Qe/(ve-1)+qe;return[jt[0]*qe/fr,ar/fr]}return Xe.invert=function(nt,qt){var jt=(ve-1)/(ve-1-qt*Qe);return Ie.invert(jt*nt,jt*qt*qe)},Xe}function Yi(){var ve=2,xe=0,Ie=t.geoProjectionMutator(On),qe=Ie(ve,xe);return qe.distance=function(Qe){return arguments.length?Ie(ve=+Qe,xe):ve},qe.tilt=function(Qe){return arguments.length?Ie(ve,xe=Qe*E):xe*P},qe.scale(432.147).clipAngle(U(1/ve)*P-1e-6)}var $i=1e-4,an=1e4,Fi=-180,ta=Fi+$i,Ca=180,Ra=Ca-$i,La=-90,Na=La+$i,Zn=90,Dn=Zn-$i;function Ka(ve){return ve.length>0}function bo(ve){return Math.floor(ve*an)/an}function Zo(ve){return ve===La||ve===Zn?[0,ve]:[Fi,bo(ve)]}function Ss(ve){var xe=ve[0],Ie=ve[1],qe=!1;return xe<=ta?(xe=Fi,qe=!0):xe>=Ra&&(xe=Ca,qe=!0),Ie<=Na?(Ie=La,qe=!0):Ie>=Dn&&(Ie=Zn,qe=!0),qe?[xe,Ie]:ve}function as(ve){return ve.map(Ss)}function ws(ve,xe,Ie){for(var qe=0,Qe=ve.length;qe<Qe;++qe){var Xe=ve[qe].slice();Ie.push({index:-1,polygon:xe,ring:Xe});for(var nt=0,qt=Xe.length;nt<qt;++nt){var jt=Xe[nt],ar=jt[0],fr=jt[1];if(ar<=ta||ar>=Ra||fr<=Na||fr>=Dn){Xe[nt]=Ss(jt);for(var br=nt+1;br<qt;++br){var Fr=Xe[br],Hr=Fr[0],ri=Fr[1];if(Hr>ta&&Hr<Ra&&ri>Na&&ri<Dn)break}if(br===nt+1)continue;if(nt){var Ci={index:-1,polygon:xe,ring:Xe.slice(0,nt+1)};Ci.ring[Ci.ring.length-1]=Zo(fr),Ie[Ie.length-1]=Ci}else Ie.pop();if(br>=qt)break;Ie.push({index:-1,polygon:xe,ring:Xe=Xe.slice(br-1)}),Xe[0]=Zo(Xe[0][1]),nt=-1,qt=Xe.length}}}}function Ho(ve){var xe,Ie=ve.length,qe={},Qe={},Xe,nt,qt,jt,ar;for(xe=0;xe<Ie;++xe){if(Xe=ve[xe],nt=Xe.ring[0],jt=Xe.ring[Xe.ring.length-1],nt[0]===jt[0]&&nt[1]===jt[1]){Xe.polygon.push(Xe.ring),ve[xe]=null;continue}Xe.index=xe,qe[nt]=Qe[jt]=Xe}for(xe=0;xe<Ie;++xe)if(Xe=ve[xe],Xe){if(nt=Xe.ring[0],jt=Xe.ring[Xe.ring.length-1],qt=Qe[nt],ar=qe[jt],delete qe[nt],delete Qe[jt],nt[0]===jt[0]&&nt[1]===jt[1]){Xe.polygon.push(Xe.ring);continue}qt?(delete Qe[nt],delete qe[qt.ring[0]],qt.ring.pop(),ve[qt.index]=null,Xe={index:-1,polygon:qt.polygon,ring:qt.ring.concat(Xe.ring)},qt===ar?Xe.polygon.push(Xe.ring):(Xe.index=Ie++,ve.push(qe[Xe.ring[0]]=Qe[Xe.ring[Xe.ring.length-1]]=Xe))):ar?(delete qe[jt],delete Qe[ar.ring[ar.ring.length-1]],Xe.ring.pop(),Xe={index:Ie++,polygon:ar.polygon,ring:Xe.ring.concat(ar.ring)},ve[ar.index]=null,ve.push(qe[Xe.ring[0]]=Qe[Xe.ring[Xe.ring.length-1]]=Xe)):(Xe.ring.push(Xe.ring[0]),Xe.polygon.push(Xe.ring))}}function ml(ve){var xe={type:"Feature",geometry:Ws(ve.geometry)};return ve.id!=null&&(xe.id=ve.id),ve.bbox!=null&&(xe.bbox=ve.bbox),ve.properties!=null&&(xe.properties=ve.properties),xe}function Ws(ve){if(ve==null)return ve;var xe,Ie,qe,Qe;switch(ve.type){case"GeometryCollection":xe={type:"GeometryCollection",geometries:ve.geometries.map(Ws)};break;case"Point":xe={type:"Point",coordinates:Ss(ve.coordinates)};break;case"MultiPoint":case"LineString":xe={type:ve.type,coordinates:as(ve.coordinates)};break;case"MultiLineString":xe={type:"MultiLineString",coordinates:ve.coordinates.map(as)};break;case"Polygon":{var Xe=[];ws(ve.coordinates,Xe,Ie=[]),Ho(Ie),xe={type:"Polygon",coordinates:Xe};break}case"MultiPolygon":{Ie=[],qe=-1,Qe=ve.coordinates.length;for(var nt=new Array(Qe);++qe<Qe;)ws(ve.coordinates[qe],nt[qe]=[],Ie);Ho(Ie),xe={type:"MultiPolygon",coordinates:nt.filter(Ka)};break}default:return ve}return ve.bbox!=null&&(xe.bbox=ve.bbox),xe}function Ls(ve){if(ve==null)return ve;switch(ve.type){case"Feature":return ml(ve);case"FeatureCollection":{var xe={type:"FeatureCollection",features:ve.features.map(ml)};return ve.bbox!=null&&(xe.bbox=ve.bbox),xe}default:return Ws(ve)}}function va(ve,xe){var Ie=b(xe/2),qe=m(L*Ie);return[ve*(.74482-.34588*qe*qe),1.70711*Ie]}va.invert=function(ve,xe){var Ie=xe/1.70711,qe=m(L*Ie);return[ve/(.74482-.34588*qe*qe),2*i(Ie)]};function no(){return t.geoProjection(va).scale(146.153)}function ys(ve,xe,Ie){var qe=t.geoInterpolate(xe,Ie),Qe=qe(.5),Xe=t.geoRotation([-Qe[0],-Qe[1]])(xe),nt=qe.distance/2,qt=-q(m(Xe[1]*E)/m(nt)),jt=[-Qe[0],-Qe[1],-(Xe[0]>0?M-qt:qt)*P],ar=t.geoProjection(ve(nt)).rotate(jt),fr=t.geoRotation(jt),br=ar.center;return delete ar.rotate,ar.center=function(Fr){return arguments.length?br(fr(Fr)):fr.invert(br())},ar.clipAngle(90)}function rs(ve){var xe=o(ve);function Ie(qe,Qe){var Xe=t.geoGnomonicRaw(qe,Qe);return Xe[0]*=xe,Xe}return Ie.invert=function(qe,Qe){return t.geoGnomonicRaw.invert(qe/xe,Qe)},Ie}function Ql(){return Cu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Cu(ve,xe){return ys(rs,ve,xe)}function Yu(ve){if(!(ve*=2))return t.geoAzimuthalEquidistantRaw;var xe=-ve/2,Ie=-xe,qe=ve*ve,Qe=b(Ie),Xe=.5/m(Ie);function nt(qt,jt){var ar=U(o(jt)*o(qt-xe)),fr=U(o(jt)*o(qt-Ie)),br=jt<0?-1:1;return ar*=ar,fr*=fr,[(ar-fr)/(2*ve),br*G(4*qe*fr-(qe-ar+fr)*(qe-ar+fr))/(2*ve)]}return nt.invert=function(qt,jt){var ar=jt*jt,fr=o(G(ar+(Fr=qt+xe)*Fr)),br=o(G(ar+(Fr=qt+Ie)*Fr)),Fr,Hr;return[a(Hr=fr-br,Fr=(fr+br)*Qe),(jt<0?-1:1)*U(G(Fr*Fr+Hr*Hr)*Xe)]},nt}function Nc(){return pu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function pu(ve,xe){return ys(Yu,ve,xe)}function Uc(ve,xe){if(n(xe)<p)return[ve,0];var Ie=n(xe/T),qe=q(Ie);if(n(ve)<p||n(n(xe)-T)<p)return[0,v(xe)*M*b(qe/2)];var Qe=o(qe),Xe=n(M/ve-ve/M)/2,nt=Xe*Xe,qt=Qe/(Ie+Qe-1),jt=qt*(2/Ie-1),ar=jt*jt,fr=ar+nt,br=qt-ar,Fr=nt+qt;return[v(ve)*M*(Xe*br+G(nt*br*br-fr*(qt*qt-ar)))/fr,v(xe)*M*(jt*Fr-Xe*G((nt+1)*fr-Fr*Fr))/fr]}Uc.invert=function(ve,xe){if(n(xe)<p)return[ve,0];if(n(ve)<p)return[0,T*m(2*i(xe/M))];var Ie=(ve/=M)*ve,qe=(xe/=M)*xe,Qe=Ie+qe,Xe=Qe*Qe,nt=-n(xe)*(1+Qe),qt=nt-2*qe+Ie,jt=-2*nt+1+2*qe+Xe,ar=qe/jt+(2*qt*qt*qt/(jt*jt*jt)-9*nt*qt/(jt*jt))/27,fr=(nt-qt*qt/(3*jt))/jt,br=2*G(-fr/3),Fr=U(3*ar/(fr*br))/3;return[M*(Qe-1+G(1+2*(Ie-qe)+Xe))/(2*ve),v(xe)*M*(-br*o(Fr+M/3)-qt/(3*jt))]};function xu(){return t.geoProjection(Uc).scale(79.4183)}function Ac(ve,xe){if(n(xe)<p)return[ve,0];var Ie=n(xe/T),qe=q(Ie);if(n(ve)<p||n(n(xe)-T)<p)return[0,v(xe)*M*b(qe/2)];var Qe=o(qe),Xe=n(M/ve-ve/M)/2,nt=Xe*Xe,qt=Qe*(G(1+nt)-Xe*Qe)/(1+nt*Ie*Ie);return[v(ve)*M*qt,v(xe)*M*G(1-qt*(2*Xe+qt))]}Ac.invert=function(ve,xe){if(!ve)return[0,T*m(2*i(xe/M))];var Ie=n(ve/M),qe=(1-Ie*Ie-(xe/=M)*xe)/(2*Ie),Qe=qe*qe,Xe=G(Qe+1);return[v(ve)*M*(Xe-qe),v(xe)*T*m(2*a(G((1-2*qe*Ie)*(qe+Xe)-Ie),G(Xe+qe+Ie)))]};function Ua(){return t.geoProjection(Ac).scale(79.4183)}function oo(ve,xe){if(n(xe)<p)return[ve,0];var Ie=xe/T,qe=q(Ie);if(n(ve)<p||n(n(xe)-T)<p)return[0,M*b(qe/2)];var Qe=(M/ve-ve/M)/2,Xe=Ie/(1+o(qe));return[M*(v(ve)*G(Qe*Qe+1-Xe*Xe)-Qe),M*Xe]}oo.invert=function(ve,xe){if(!xe)return[ve,0];var Ie=xe/M,qe=(M*M*(1-Ie*Ie)-ve*ve)/(2*M*ve);return[ve?M*(v(ve)*G(qe*qe+1)-qe):0,T*m(2*i(Ie))]};function Vc(){return t.geoProjection(oo).scale(79.4183)}function hc(ve,xe){if(!xe)return[ve,0];var Ie=n(xe);if(!ve||Ie===T)return[0,xe];var qe=Ie/T,Qe=qe*qe,Xe=(8*qe-Qe*(Qe+2)-5)/(2*Qe*(qe-1)),nt=Xe*Xe,qt=qe*Xe,jt=Qe+nt+2*qt,ar=qe+3*Xe,fr=ve/T,br=fr+1/fr,Fr=v(n(ve)-T)*G(br*br-4),Hr=Fr*Fr,ri=jt*(Qe+nt*Hr-1)+(1-Qe)*(Qe*(ar*ar+4*nt)+12*qt*nt+4*nt*nt),Ci=(Fr*(jt+nt-1)+2*G(ri))/(4*jt+Hr);return[v(ve)*T*Ci,v(xe)*T*G(1+Fr*n(Ci)-Ci*Ci)]}hc.invert=function(ve,xe){var Ie;if(!ve||!xe)return[ve,xe];xe/=M;var qe=v(ve)*ve/T,Qe=(qe*qe-1+4*xe*xe)/n(qe),Xe=Qe*Qe,nt=2*xe,qt=50;do{var jt=nt*nt,ar=(8*nt-jt*(jt+2)-5)/(2*jt*(nt-1)),fr=(3*nt-jt*nt-10)/(2*jt*nt),br=ar*ar,Fr=nt*ar,Hr=nt+ar,ri=Hr*Hr,Ci=nt+3*ar,cn=ri*(jt+br*Xe-1)+(1-jt)*(jt*(Ci*Ci+4*br)+br*(12*Fr+4*br)),sn=-2*Hr*(4*Fr*br+(1-4*jt+3*jt*jt)*(1+fr)+br*(-6+14*jt-Xe+(-8+8*jt-2*Xe)*fr)+Fr*(-8+12*jt+(-10+10*jt-Xe)*fr)),Ln=G(cn),Yn=Qe*(ri+br-1)+2*Ln-qe*(4*ri+Xe),Aa=Qe*(2*ar*fr+2*Hr*(1+fr))+sn/Ln-8*Hr*(Qe*(-1+br+ri)+2*Ln)*(1+fr)/(Xe+4*ri);nt-=Ie=Yn/Aa}while(Ie>p&&--qt>0);return[v(ve)*(G(Qe*Qe+4)+Qe)*M/4,T*nt]};function Ku(){return t.geoProjection(hc).scale(127.16)}function ue(ve,xe,Ie,qe,Qe){function Xe(nt,qt){var jt=Ie*m(qe*qt),ar=G(1-jt*jt),fr=G(2/(1+ar*o(nt*=Qe)));return[ve*ar*fr*m(nt),xe*jt*fr]}return Xe.invert=function(nt,qt){var jt=nt/ve,ar=qt/xe,fr=G(jt*jt+ar*ar),br=2*q(fr/2);return[a(nt*b(br),ve*fr)/Qe,fr&&q(qt*m(br)/(xe*Ie*fr))/qe]},Xe}function w(ve,xe,Ie,qe){var Qe=M/3;ve=c(ve,p),xe=c(xe,p),ve=f(ve,T),xe=f(xe,M-p),Ie=c(Ie,0),Ie=f(Ie,100-p),qe=c(qe,p);var Xe=Ie/100+1,nt=qe/100,qt=U(Xe*o(Qe))/Qe,jt=m(ve)/m(qt*T),ar=xe/M,fr=G(nt*m(ve/2)/m(xe/2)),br=fr/G(ar*jt*qt),Fr=1/(fr*G(ar*jt*qt));return ue(br,Fr,jt,qt,ar)}function B(){var ve=65*E,xe=60*E,Ie=20,qe=200,Qe=t.geoProjectionMutator(w),Xe=Qe(ve,xe,Ie,qe);return Xe.poleline=function(nt){return arguments.length?Qe(ve=+nt*E,xe,Ie,qe):ve*P},Xe.parallels=function(nt){return arguments.length?Qe(ve,xe=+nt*E,Ie,qe):xe*P},Xe.inflation=function(nt){return arguments.length?Qe(ve,xe,Ie=+nt,qe):Ie},Xe.ratio=function(nt){return arguments.length?Qe(ve,xe,Ie,qe=+nt):qe},Xe.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*M+3*G(3),le=2*G(2*M*G(3)/ee),ze=nr(le*G(3)/M,le,ee/6);function Ze(){return t.geoProjection(ze).scale(176.84)}function ut(ve,xe){return[ve*G(1-3*xe*xe/(M*M)),xe]}ut.invert=function(ve,xe){return[ve/G(1-3*xe*xe/(M*M)),xe]};function Mt(){return t.geoProjection(ut).scale(152.63)}function Jt(ve,xe){var Ie=o(xe),qe=o(ve)*Ie,Qe=1-qe,Xe=o(ve=a(m(ve)*Ie,-m(xe))),nt=m(ve);return Ie=G(1-qe*qe),[nt*Ie-Xe*Qe,-Xe*Ie-nt*Qe]}Jt.invert=function(ve,xe){var Ie=(ve*ve+xe*xe)/-2,qe=G(-Ie*(2+Ie)),Qe=xe*Ie+ve*qe,Xe=ve*Ie-xe*qe,nt=G(Xe*Xe+Qe*Qe);return[a(qe*Qe,nt*(1+Ie)),nt?-q(qe*Xe/nt):0]};function $t(){return t.geoProjection(Jt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function mr(ve,xe){var Ie=ke(ve,xe);return[(Ie[0]+ve/T)/2,(Ie[1]+xe)/2]}mr.invert=function(ve,xe){var Ie=ve,qe=xe,Qe=25;do{var Xe=o(qe),nt=m(qe),qt=m(2*qe),jt=nt*nt,ar=Xe*Xe,fr=m(Ie),br=o(Ie/2),Fr=m(Ie/2),Hr=Fr*Fr,ri=1-ar*br*br,Ci=ri?U(Xe*br)*G(cn=1/ri):cn=0,cn,sn=.5*(2*Ci*Xe*Fr+Ie/T)-ve,Ln=.5*(Ci*nt+qe)-xe,Yn=.5*cn*(ar*Hr+Ci*Xe*br*jt)+.5/T,Aa=cn*(fr*qt/4-Ci*nt*Fr),fa=.125*cn*(qt*Fr-Ci*nt*ar*fr),$a=.5*cn*(jt*br+Ci*Hr*Xe)+.5,Co=Aa*fa-$a*Yn,Qa=(Ln*Aa-sn*$a)/Co,mo=(sn*fa-Ln*Yn)/Co;Ie-=Qa,qe-=mo}while((n(Qa)>p||n(mo)>p)&&--Qe>0);return[Ie,qe]};function Cr(){return t.geoProjection(mr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=_e,e.geoAiryRaw=oe,e.geoAitoff=Ce,e.geoAitoffRaw=ke,e.geoArmadillo=ie,e.geoArmadilloRaw=ge,e.geoAugust=Ee,e.geoAugustRaw=Se,e.geoBaker=me,e.geoBakerRaw=Le,e.geoBerghaus=ce,e.geoBerghausRaw=Pe,e.geoBertin1953=Qt,e.geoBertin1953Raw=ct,e.geoBoggs=St,e.geoBoggsRaw=rt,e.geoBonne=Xt,e.geoBonneRaw=pt,e.geoBottomley=_r,e.geoBottomleyRaw=or,e.geoBromley=ei,e.geoBromleyRaw=Er,e.geoChamberlin=et,e.geoChamberlinRaw=Ge,e.geoChamberlinAfrica=We,e.geoCollignon=At,e.geoCollignonRaw=xt,e.geoCraig=er,e.geoCraigRaw=Kt,e.geoCraster=Ir,e.geoCrasterRaw=Gr,e.geoCylindricalEqualArea=_i,e.geoCylindricalEqualAreaRaw=Yr,e.geoCylindricalStereographic=ai,e.geoCylindricalStereographicRaw=Pi,e.geoEckert1=un,e.geoEckert1Raw=mi,e.geoEckert2=An,e.geoEckert2Raw=Fn,e.geoEckert3=Qn,e.geoEckert3Raw=Hn,e.geoEckert4=Kn,e.geoEckert4Raw=Vi,e.geoEckert5=Gt,e.geoEckert5Raw=Jn,e.geoEckert6=rr,e.geoEckert6Raw=wt,e.geoEisenlohr=Xr,e.geoEisenlohrRaw=wr,e.geoFahey=Ri,e.geoFaheyRaw=$r,e.geoFoucaut=en,e.geoFoucautRaw=Zi,e.geoFoucautSinusoidal=yn,e.geoFoucautSinusoidalRaw=fn,e.geoGilbert=ua,e.geoGingery=Xo,e.geoGingeryRaw=ma,e.geoGinzburg4=Ha,e.geoGinzburg4Raw=jn,e.geoGinzburg5=Gn,e.geoGinzburg5Raw=vo,e.geoGinzburg6=Ar,e.geoGinzburg6Raw=Ct,e.geoGinzburg8=hi,e.geoGinzburg8Raw=Jr,e.geoGinzburg9=Sn,e.geoGinzburg9Raw=hn,e.geoGringorten=ea,e.geoGringortenRaw=ki,e.geoGuyou=Fs,e.geoGuyouRaw=Lo,e.geoHammer=mt,e.geoHammerRaw=He,e.geoHammerRetroazimuthal=zl,e.geoHammerRetroazimuthalRaw=ll,e.geoHealpix=Yl,e.geoHealpixRaw=cl,e.geoHill=nc,e.geoHillRaw=Su,e.geoHomolosine=xo,e.geoHomolosineRaw=ql,e.geoHufnagel=Ns,e.geoHufnagelRaw=Kl,e.geoHyperelliptical=qo,e.geoHyperellipticalRaw=oa,e.geoInterrupt=Do,e.geoInterruptedBoggs=Vf,e.geoInterruptedHomolosine=Zc,e.geoInterruptedMollweide=qs,e.geoInterruptedMollweideHemispheres=oc,e.geoInterruptedSinuMollweide=sc,e.geoInterruptedSinusoidal=Lf,e.geoKavrayskiy7=nf,e.geoKavrayskiy7Raw=cs,e.geoLagrange=$l,e.geoLagrangeRaw=Gf,e.geoLarrivee=Fu,e.geoLarriveeRaw=lc,e.geoLaskowski=Hs,e.geoLaskowskiRaw=Es,e.geoLittrow=ps,e.geoLittrowRaw=Go,e.geoLoximuthal=xl,e.geoLoximuthalRaw=uc,e.geoMiller=Os,e.geoMillerRaw=Gu,e.geoModifiedStereographic=Bl,e.geoModifiedStereographicRaw=od,e.geoModifiedStereographicAlaska=Hu,e.geoModifiedStereographicGs48=bl,e.geoModifiedStereographicGs50=Hf,e.geoModifiedStereographicMiller=Ic,e.geoModifiedStereographicLee=yf,e.geoMollweide=je,e.geoMollweideRaw=tt,e.geoMtFlatPolarParabolic=Yc,e.geoMtFlatPolarParabolicRaw=_f,e.geoMtFlatPolarQuartic=th,e.geoMtFlatPolarQuarticRaw=eh,e.geoMtFlatPolarSinusoidal=jf,e.geoMtFlatPolarSinusoidalRaw=ju,e.geoNaturalEarth2=of,e.geoNaturalEarth2Raw=cc,e.geoNellHammer=Kc,e.geoNellHammerRaw=Nl,e.geoInterruptedQuarticAuthalic=gs,e.geoNicolosi=Wh,e.geoNicolosiRaw=Wf,e.geoPatterson=hu,e.geoPattersonRaw=bc,e.geoPolyconic=nl,e.geoPolyconicRaw=_u,e.geoPolyhedral=xf,e.geoPolyhedralButterfly=Cs,e.geoPolyhedralCollignon=Xf,e.geoPolyhedralWaterman=Us,e.geoProject=Wl,e.geoGringortenQuincuncial=kt,e.geoPeirceQuincuncial=Zt,e.geoPierceQuincuncial=Zt,e.geoQuantize=Mr,e.geoQuincuncial=Bc,e.geoRectangularPolyconic=Kr,e.geoRectangularPolyconicRaw=xr,e.geoRobinson=dn,e.geoRobinsonRaw=Wi,e.geoSatellite=Yi,e.geoSatelliteRaw=On,e.geoSinuMollweide=Vu,e.geoSinuMollweideRaw=_a,e.geoSinusoidal=Et,e.geoSinusoidalRaw=dt,e.geoStitch=Ls,e.geoTimes=no,e.geoTimesRaw=va,e.geoTwoPointAzimuthal=Cu,e.geoTwoPointAzimuthalRaw=rs,e.geoTwoPointAzimuthalUsa=Ql,e.geoTwoPointEquidistant=pu,e.geoTwoPointEquidistantRaw=Yu,e.geoTwoPointEquidistantUsa=Nc,e.geoVanDerGrinten=xu,e.geoVanDerGrintenRaw=Uc,e.geoVanDerGrinten2=Ua,e.geoVanDerGrinten2Raw=Ac,e.geoVanDerGrinten3=Vc,e.geoVanDerGrinten3Raw=oo,e.geoVanDerGrinten4=Ku,e.geoVanDerGrinten4Raw=hc,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=Ze,e.geoWagner4Raw=ze,e.geoWagner6=Mt,e.geoWagner6Raw=ut,e.geoWiechel=$t,e.geoWiechelRaw=Jt,e.geoWinkel3=Cr,e.geoWinkel3Raw=mr,Object.defineProperty(e,"__esModule",{value:!0})})});var jDe=ye((Nmr,HDe)=>{"use strict";var nd=qa(),UZ=Pr(),Hzt=Oa(),r5=Math.PI/180,rw=180/Math.PI,GZ={cursor:"pointer"},HZ={cursor:"auto"};function jzt(e,t){var r=e.projection,n;return t._isScoped?n=Wzt:t._isClipped?n=Zzt:n=Xzt,n(e,r)}HDe.exports=jzt;function jZ(e,t){return nd.behavior.zoom().translate(t.translate()).scale(t.scale())}function WZ(e,t,r){var n=e.id,i=e.graphDiv,a=i.layout,o=a[n],s=i._fullLayout,l=s[n],u={},c={};function f(h,d){u[n+"."+h]=UZ.nestedProperty(o,h).get(),Hzt.call("_storeDirectGUIEdit",a,s._preGUI,u);var v=UZ.nestedProperty(l,h);v.get()!==d&&(v.set(d),UZ.nestedProperty(o,h).set(d),c[n+"."+h]=d)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),i.emit("plotly_relayout",c)}function Wzt(e,t){var r=jZ(e,t);function n(){nd.select(this).style(GZ)}function i(){t.scale(nd.event.scale).translate(nd.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":s[0],"geo.center.lat":s[1]})}function a(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){nd.select(this).style(HZ),WZ(e,t,a)}return r.on("zoomstart",n).on("zoom",i).on("zoomend",o),r}function Xzt(e,t){var r=jZ(e,t),n=2,i,a,o,s,l,u,c,f,h;function d(M){return t.invert(M)}function v(M){var T=d(M);if(!T)return!0;var L=t(T);return Math.abs(L[0]-M[0])>n||Math.abs(L[1]-M[1])>n}function m(){nd.select(this).style(GZ),i=nd.mouse(this),a=t.rotate(),o=t.translate(),s=a,l=d(i)}function b(){if(u=nd.mouse(this),v(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(nd.event.scale),t.translate([o[0],nd.event.translate[1]]),l?d(u)&&(f=d(u),c=[s[0]+(f[0]-l[0]),a[1],a[2]],t.rotate(c),s=c):(i=u,l=d(i)),h=!0,e.render(!0);var M=t.rotate(),T=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":T[0],"geo.center.lat":T[1],"geo.projection.rotation.lon":-M[0]})}function p(){nd.select(this).style(HZ),h&&WZ(e,t,k)}function k(M){var T=t.rotate(),L=t.invert(e.midPt);M("projection.rotation.lon",-T[0]),M("center.lon",L[0]),M("center.lat",L[1])}return r.on("zoomstart",m).on("zoom",b).on("zoomend",p),r}function Zzt(e,t){var r={r:t.rotate(),k:t.scale()},n=jZ(e,t),i=r7t(n,"zoomstart","zoom","zoomend"),a=0,o=n.on,s;n.on("zoomstart",function(){nd.select(this).style(GZ);var h=nd.mouse(this),d=t.rotate(),v=d,m=t.translate(),b=Yzt(d);s=zF(t,h),o.call(n,"zoom",function(){var p=nd.mouse(this);if(t.scale(r.k=nd.event.scale),!s)h=p,s=zF(t,h);else if(zF(t,p)){t.rotate(d).translate(m);var k=zF(t,p),M=Jzt(s,k),T=Qzt(Kzt(b,M)),L=r.r=$zt(T,s,v);(!isFinite(L[0])||!isFinite(L[1])||!isFinite(L[2]))&&(L=v),t.rotate(L),v=L}u(i.of(this,arguments))}),l(i.of(this,arguments))}).on("zoomend",function(){nd.select(this).style(HZ),o.call(n,"zoom",null),c(i.of(this,arguments)),WZ(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var h=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-h[0],"geo.projection.rotation.lat":-h[1]})});function l(h){a++||h({type:"zoomstart"})}function u(h){h({type:"zoom"})}function c(h){--a||h({type:"zoomend"})}function f(h){var d=t.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return nd.rebind(n,i,"on")}function zF(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&e7t(r)}function Yzt(e){var t=.5*e[0]*r5,r=.5*e[1]*r5,n=.5*e[2]*r5,i=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function Kzt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function Jzt(e,t){if(!(!e||!t)){var r=t7t(e,t),n=Math.sqrt(GDe(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,GDe(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function $zt(e,t,r){var n=VZ(t,2,e[0]);n=VZ(n,1,e[1]),n=VZ(n,0,e[2]-r[2]);var i=t[0],a=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(a,i)*rw,f=Math.sqrt(i*i+a*a),h,d;Math.abs(l)>f?(d=(l>0?90:-90)-c,h=0):(d=Math.asin(l/f)*rw-c,h=Math.sqrt(f*f-l*l));var v=180-d-2*c,m=(Math.atan2(u,s)-Math.atan2(o,h))*rw,b=(Math.atan2(u,s)-Math.atan2(o,-h))*rw,p=UDe(r[0],r[1],d,m),k=UDe(r[0],r[1],v,b);return p<=k?[d,m,r[2]]:[v,b,r[2]]}function UDe(e,t,r,n){var i=VDe(r-e),a=VDe(n-t);return Math.sqrt(i*i+a*a)}function VDe(e){return(e%360+540)%360-180}function VZ(e,t,r){var n=r*r5,i=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=e[a]*s-e[o]*l,i[o]=e[o]*s+e[a]*l,i}function Qzt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*rw,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*rw,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*rw]}function e7t(e){var t=e[0]*r5,r=e[1]*r5,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function GDe(e,t){for(var r=0,n=0,i=e.length;n<i;++n)r+=e[n]*t[n];return r}function t7t(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 r7t(e){for(var t=0,r=arguments.length,n=[];++t<r;)n.push(arguments[t]);var i=nd.dispatch.apply(null,n);return i.of=function(a,o){return function(s){var l;try{l=s.sourceEvent=nd.event,s.target=e,nd.event=s,i[s.type].apply(a,o)}finally{nd.event=l}}},i}});var $De=ye((Umr,JDe)=>{"use strict";var l1=qa(),YZ=NZ(),i7t=YZ.geoPath,n7t=YZ.geoDistance,a7t=NDe(),o7t=Oa(),vk=Pr(),s7t=vk.strTranslate,qF=ka(),dk=So(),WDe=vf(),l7t=Mc(),ZZ=ho(),XDe=Mg().getAutoRange,XZ=yv(),u7t=qf().prepSelect,c7t=qf().clearOutline,f7t=qf().selectOnClick,h7t=jDe(),hp=uk(),d7t=hx(),YDe=bF(),v7t=SZ().feature;function KDe(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var tm=KDe.prototype;JDe.exports=function(t){return new KDe(t)};tm.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in hp.layerNameToAdjective)if(l!=="frame"&&a["show"+l]){s=!0;break}for(var u=!1,c=0;c<e.length;c++){var f=e[0][0].trace;f._geo=i,f.locationmode&&(s=!0);var h=f.marker;if(h){var d=h.angle,v=h.angleref;(d||v==="north"||v==="previous")&&(u=!0)}}if(this._hasMarkerAngles=u,s){var m=YDe.getTopojsonName(a);(i.topojson===null||m!==i.topojsonName)&&(i.topojsonName=m,PlotlyGeoAssets.topojson[i.topojsonName]===void 0&&o.push(i.fetchTopojson()))}o=o.concat(d7t.fetchTraceGeoData(e)),r.push(new Promise(function(b,p){Promise.all(o).then(function(){i.topojson=PlotlyGeoAssets.topojson[i.topojsonName],i.update(e,t),b()}).catch(p)}))};tm.fetchTopojson=function(){var e=this,t=YDe.getTopojsonPath(e.topojsonURL,e.topojsonName);return new Promise(function(r,n){l1.json(t,function(i,a){if(i)return i.status===404?n(new Error(["plotly.js could not find topojson file at",t+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):n(new Error(["unexpected error while fetching topojson file at",t].join(" ")));PlotlyGeoAssets.topojson[e.topojsonName]=a,r()})})};tm.update=function(e,t,r){var n=t[this.id];this.hasChoropleth=!1;for(var i=0;i<e.length;i++){var a=e[i],o=a[0].trace;o.type==="choropleth"&&(this.hasChoropleth=!0),o.visible===!0&&o._length>0&&o._module.calcGeoJSON(a,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),l7t.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};tm.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],i=t._size,a=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=p7t(n),h=[[i.l+i.w*a.x[0],i.t+i.h*(1-a.y[1])],[i.l+i.w*a.x[1],i.t+i.h*(1-a.y[0])]],d=n.center||{},v=o.rotation||{},m=s.range||[],b=l.range||[];if(n.fitbounds){u._length=h[1][0]-h[0][0],c._length=h[1][1]-h[0][1],u.range=XDe(r,u),c.range=XDe(r,c);var p=(u.range[0]+u.range[1])/2,k=(c.range[0]+c.range[1])/2;if(n._isScoped)d={lon:p,lat:k};else if(n._isClipped){d={lon:p,lat:k},v={lon:p,lat:k,roll:v.roll};var M=o.type,T=hp.lonaxisSpan[M]/2||180,L=hp.lataxisSpan[M]/2||90;m=[p-T,p+T],b=[k-L,k+L]}else d={lon:p,lat:k},v={lon:p,lat:v.lat,roll:v.roll}}f.center([d.lon-v.lon,d.lat-v.lat]).rotate([-v.lon,-v.lat,v.roll]).parallels(o.parallels);var x=ZDe(m,b);f.fitExtent(h,x);var C=this.bounds=f.getBounds(x),S=this.fitScale=f.scale(),g=f.translate();if(n.fitbounds){var P=f.getBounds(ZDe(u.range,c.range)),E=Math.min((C[1][0]-C[0][0])/(P[1][0]-P[0][0]),(C[1][1]-C[0][1])/(P[1][1]-P[0][1]));isFinite(E)?f.scale(E*S):vk.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*S);var z=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(f.translate([g[0]+(z[0]-g[0]),g[1]+(z[1]-g[1])]).clipExtent(C),n._isAlbersUsa){var q=f([d.lon,d.lat]),U=f.translate();f.translate([U[0]-(q[0]-U[0]),U[1]-(q[1]-U[1])])}};tm.updateBaseLayers=function(e,t){var r=this,n=r.topojson,i=r.layers,a=r.basePaths;function o(h){return h==="lonaxis"||h==="lataxis"}function s(h){return!!hp.lineLayers[h]}function l(h){return!!hp.fillLayers[h]}var u=this.hasChoropleth?hp.layersForChoropleth:hp.layers,c=u.filter(function(h){return s(h)||l(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(h){delete i[h],delete a[h],l1.select(this).remove()}),f.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var d=i[h]=l1.select(this);h==="bg"?r.bgRect=d.append("rect").style("pointer-events","all"):o(h)?a[h]=d.append("path").style("fill","none"):h==="backplot"?d.append("g").classed("choroplethlayer",!0):h==="frontplot"?d.append("g").classed("scatterlayer",!0):s(h)?a[h]=d.append("path").style("fill","none").style("stroke-miterlimit",2):l(h)&&(a[h]=d.append("path").style("stroke","none"))}),f.order(),f.each(function(h){var d=a[h],v=hp.layerNameToAdjective[h];h==="frame"?d.datum(hp.sphereSVG):s(h)||l(h)?d.datum(v7t(n,n.objects[h])):o(h)&&d.datum(g7t(h,t,e)).call(qF.stroke,t[h].gridcolor).call(dk.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(qF.stroke,t[v+"color"]).call(dk.dashLine,"",t[v+"width"]):l(h)&&d.call(qF.fill,t[v+"color"])})};tm.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,s=r[1][1]-a+n;dk.setRect(this.clipRect,i,a,o,s),this.bgRect.call(dk.setRect,i,a,o,s).call(qF.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};tm.updateFx=function(e,t){var r=this,n=r.graphDiv,i=r.bgRect,a=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,h={};for(var d in f)h[r.id+"."+d]=f[d];o7t.call("_guiRelayout",n,h),n.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,h){if(h.isRect){var d=f.range={};d[r.id]=[l([h.xmin,h.ymin]),l([h.xmax,h.ymax])]}else{var v=f.lassoPoints={};v[r.id]=h.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&c7t(n)}};a==="pan"?(i.node().onmousedown=null,i.call(h7t(r,t)),i.on("dblclick.zoom",s),n._context._scrollZoom.geo||i.on("wheel.zoom",null)):(a==="select"||a==="lasso")&&(i.on(".zoom",null),c.prepFn=function(f,h,d){u7t(f,h,d,c,a)},XZ.init(c)),i.on("mousemove",function(){var f=r.projection.invert(vk.getPositionFromD3Event());if(!f)return XZ.unhover(n,l1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},WDe.hover(n,l1.event,r.id)}),i.on("mouseout",function(){n._dragging||XZ.unhover(n,l1.event)}),i.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&f7t(l1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&WDe.click(n,l1.event))})};tm.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=l1.select(e.container).append("g").attr("class","geo "+e.id).call(dk.setClipUrl,n,t),e.project=function(i){var a=e.projection(i);return a?[a[0]-e.xaxis._offset,a[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(i){return e.project(i)[0]}},e.yaxis={_id:"y",c2p:function(i){return e.project(i)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},ZZ.setConvert(e.mockAxis,r)};tm.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var i;e._isScoped?i={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?i={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:i={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":n.lon},vk.extendFlat(this.viewInitial,i)};tm.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};tm._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?s7t(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 p7t(e){var t=e.projection,r=t.type,n=hp.projNames[r];n="geo"+vk.titleCase(n);for(var i=YZ[n]||a7t[n],a=i(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?hp.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?a:[]},u=0;u<s.length;u++){var c=s[u];typeof a[c]!="function"&&(a[c]=l)}return a.isLonLatOverEdges=function(f){if(a(f)===null)return!0;if(o){var h=a.rotate(),d=n7t(f,[-h[0],-h[1]]),v=o*Math.PI/180;return d>v}else return!1},a.getPath=function(){return i7t().projection(a)},a.getBounds=function(f){return a.getPath().bounds(f)},a.precision(hp.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-hp.clipPad),a}function g7t(e,t,r){var n=1e-6,i=2.5,a=t[e],o=hp.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(k,M){return[k,M]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(k,M){return[M,k]});var c={type:"linear",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};ZZ.setConvert(c,r);var f=ZZ.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var h=f.length,d=new Array(h),v=0;v<h;v++)for(var m=f[v].x,b=d[v]=[],p=l[0];p<l[1]+i;p+=i)b.push(u(m,p));return{type:"MultiLineString",coordinates:d}}function ZDe(e,t){var r=hp.clipPad,n=e[0]+r,i=e[1]-r,a=t[0]+r,o=t[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}});var KZ=ye((Vmr,tFe)=>{"use strict";var n5=Ih(),m7t=Cc().attributes,y7t=Pd().dash,i5=uk(),_7t=mc().overrideAll,QDe=t_(),eFe={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:n5.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:y7t},x7t=tFe.exports=_7t({domain:m7t({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:QDe(i5.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:QDe(i5.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:n5.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:i5.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:i5.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:i5.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:i5.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:n5.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:n5.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:n5.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:n5.background},lonaxis:eFe,lataxis:eFe},"plot","from-root");x7t.uirevision={valType:"any",editType:"none"}});var nFe=ye((Gmr,iFe)=>{"use strict";var OF=Pr(),b7t=q_(),w7t=Id().getSubplotData,BF=uk(),T7t=KZ(),rFe=BF.axesNames;iFe.exports=function(t,r,n){b7t(t,r,n,{type:"geo",attributes:T7t,handleDefaults:A7t,fullData:n,partition:"y"})};function A7t(e,t,r,n){var i=w7t(n.fullData,"geo",n.id),a=i.map(function(oe){return oe.index}),o=r("resolution"),s=r("scope"),l=BF.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",h=t._isSatellite=u==="satellite",d=t._isConic=u.indexOf("conic")!==-1||u==="albers",v=t._isClipped=!!BF.lonaxisSpan[u];if(e.visible===!1){var m=OF.extendDeep({},t._template);m.showcoastlines=!1,m.showcountries=!1,m.showframe=!1,m.showlakes=!1,m.showland=!1,m.showocean=!1,m.showrivers=!1,m.showsubunits=!1,m.lonaxis&&(m.lonaxis.showgrid=!1),m.lataxis&&(m.lataxis.showgrid=!1),t._template=m}for(var b=r("visible"),p,k=0;k<rFe.length;k++){var M=rFe[k],T=[30,10][k],L;if(f)L=l[M+"Range"];else{var x=BF[M+"Span"],C=(x[u]||x["*"])/2,S=r("projection.rotation."+M.slice(0,3),l.projRotate[k]);L=[S-C,S+C]}var g=r(M+".range",L);r(M+".tick0"),r(M+".dtick",T),p=r(M+".showgrid",b?void 0:!1),p&&(r(M+".gridcolor"),r(M+".gridwidth"),r(M+".griddash")),t[M]._ax={type:"linear",_id:M.slice(0,3),_traceIndices:a,setScale:OF.identity,c2l:OF.identity,r2l:OF.identity,autorange:!0,range:g.slice(),_m:1,_input:{}}}var P=t.lonaxis.range,E=t.lataxis.range,z=P[0],q=P[1];z>0&&q<0&&(q+=360);var U=(z+q)/2,G;if(!c){var Z=f?l.projRotate:[U,0,0];G=r("projection.rotation.lon",Z[0]),r("projection.rotation.lat",Z[1]),r("projection.rotation.roll",Z[2]),p=r("showcoastlines",!f&&b),p&&(r("coastlinecolor"),r("coastlinewidth")),p=r("showocean",b?void 0:!1),p&&r("oceancolor")}var j,N;if(c?(j=-96.6,N=38.7):(j=f?U:G,N=(E[0]+E[1])/2),r("center.lon",j),r("center.lat",N),h&&(r("projection.tilt"),r("projection.distance")),d){var H=l.projParallels||[0,60];r("projection.parallels",H)}r("projection.scale"),p=r("showland",b?void 0:!1),p&&r("landcolor"),p=r("showlakes",b?void 0:!1),p&&r("lakecolor"),p=r("showrivers",b?void 0:!1),p&&(r("rivercolor"),r("riverwidth")),p=r("showcountries",f&&s!=="usa"&&b),p&&(r("countrycolor"),r("countrywidth")),(s==="usa"||s==="north america"&&o===50)&&(r("showsubunits",b),r("subunitcolor"),r("subunitwidth")),f||(p=r("showframe",b),p&&(r("framecolor"),r("framewidth"))),r("bgcolor");var re=r("fitbounds");re&&(delete t.projection.scale,f?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}});var JZ=ye((Hmr,sFe)=>{"use strict";var S7t=Id().getSubplotCalcData,M7t=Pr().counterRegex,E7t=$De(),Qm="geo",aFe=M7t(Qm),oFe={};oFe[Qm]={valType:"subplotid",dflt:Qm,editType:"calc"};function k7t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Qm],i=0;i<n.length;i++){var a=n[i],o=S7t(r,Qm,a),s=t[a],l=s._subplot;l||(l=E7t({id:a,graphDiv:e,container:t._geolayer.node(),topojsonURL:e._context.topojsonURL,staticPlot:e._context.staticPlot}),t[a]._subplot=l),l.plot(o,t,e._promises)}}function C7t(e,t,r,n){for(var i=n._subplots[Qm]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!t[o]&&s&&(s.framework.remove(),s.clipDef.remove())}}function L7t(e){for(var t=e._fullLayout,r=t._subplots[Qm],n=0;n<r.length;n++){var i=t[r[n]],a=i._subplot;a.updateFx(t,i)}}sFe.exports={attr:Qm,name:Qm,idRoot:Qm,idRegex:aFe,attrRegex:aFe,attributes:oFe,layoutAttributes:KZ(),supplyLayoutDefaults:nFe(),plot:k7t,updateFx:L7t,clean:C7t}});var uFe=ye((jmr,lFe)=>{"use strict";lFe.exports={attributes:ew(),supplyDefaults:URe(),colorbar:$d(),formatLabels:HRe(),calc:_F(),calcGeoJSON:BZ().calcGeoJSON,plot:BZ().plot,style:FZ(),styleOnSelect:sp().styleOnSelect,hoverPoints:PDe(),eventData:RDe(),selectPoints:zDe(),moduleType:"trace",name:"scattergeo",basePlotModule:JZ(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var fFe=ye((Wmr,cFe)=>{"use strict";cFe.exports=uFe()});var a5=ye((Xmr,vFe)=>{"use strict";var{hovertemplateAttrs:P7t,templatefallbackAttrs:I7t}=Ll(),vx=ew(),R7t=Tu(),hFe=Gl(),D7t=Ih().defaultLine,dx=Ao().extendFlat,dFe=vx.marker.line;vFe.exports=dx({locations:{valType:"data_array",editType:"calc"},locationmode:vx.locationmode,z:{valType:"data_array",editType:"calc"},geojson:dx({},vx.geojson,{}),featureidkey:vx.featureidkey,text:dx({},vx.text,{}),hovertext:dx({},vx.hovertext,{}),marker:{line:{color:dx({},dFe.color,{dflt:D7t}),width:dx({},dFe.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:vx.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:vx.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:dx({},hFe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:P7t(),hovertemplatefallback:I7t(),showlegend:dx({},hFe.showlegend,{dflt:!1})},R7t("",{cLetter:"z",editTypeOverride:"calc"}))});var gFe=ye((Zmr,pFe)=>{"use strict";var pk=Pr(),F7t=td(),z7t=a5(),q7t=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");pFe.exports=function(t,r,n,i){function a(h,d){return pk.coerce(t,r,z7t,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&pk.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=a("geojson"),u;(typeof l=="string"&&l!==""||pk.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="country names"&&pk.warn(q7t),c==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("marker.line.width");f&&a("marker.line.color"),a("marker.opacity"),F7t(t,r,i,a,{prefix:"",cLetter:"z"}),pk.coerceSelectionMarkerOpacity(r,a)}});var NF=ye((Ymr,_Fe)=>{"use strict";var mFe=Eo(),O7t=fs().BADNUM,B7t=gv(),N7t=Rm(),U7t=q0();function yFe(e){return e&&typeof e=="string"}_Fe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(c){return yFe(c)||mFe(c)}:a=yFe;for(var o=0;o<n;o++){var s=i[o]={},l=r.locations[o],u=r.z[o];a(l)&&mFe(u)?(s.loc=l,s.z=u):(s.loc=null,s.z=O7t),s.index=o}return N7t(i,r),B7t(t,r,{vals:r.z,containerStr:"",cLetter:"z"}),U7t(i,r),i}});var UF=ye((Kmr,bFe)=>{"use strict";var V7t=qa(),G7t=ka(),$Z=So(),H7t=tc();function j7t(e,t){t&&xFe(e,t)}function xFe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=H7t.makeColorScaleFuncFromTrace(r);i.each(function(l){V7t.select(this).attr("fill",s(l.z)).call(G7t.stroke,l.mlc||o.color).call($Z.dashLine,"",l.mlw||o.width||0).style("opacity",a.opacity)}),$Z.selectedPointStyle(i,r)}function W7t(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?$Z.selectedPointStyle(r.selectAll(".choroplethlocation"),n):xFe(e,t)}bFe.exports={style:j7t,styleOnSelect:W7t}});var QZ=ye((Jmr,AFe)=>{"use strict";var X7t=qa(),wFe=Pr(),o5=hx(),Z7t=bF().getTopojsonFeatures,TFe=Mg().findExtremes,Y7t=UF().style;function K7t(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");wFe.makeTraceGroups(n,r,"trace choropleth").each(function(i){var a=X7t.select(this),o=a.selectAll("path.choroplethlocation").data(wFe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),Y7t(e,i)})}function J7t(e,t){for(var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r.locationmode,o=r._length,s=a==="geojson-id"?o5.extractTraceFeature(e):Z7t(r,i.topojson),l=[],u=[],c=0;c<o;c++){var f=e[c],h=a==="geojson-id"?f.fOut:o5.locationToFeature(a,f.loc,s);if(h){f.geojson=h,f.ct=h.properties.ct,f._polygons=o5.feature2polygons(h);var d=o5.computeBbox(h);l.push(d[0],d[2]),u.push(d[1],d[3])}else f.geojson=null}if(n.fitbounds==="geojson"&&a==="geojson-id"){var v=o5.computeBbox(o5.getTraceGeojson(r));l=[v[0],v[2]],u=[v[1],v[3]]}var m={padded:!0};r._extremes.lon=TFe(n.lonaxis._ax,l,m),r._extremes.lat=TFe(n.lataxis._ax,u,m)}AFe.exports={calcGeoJSON:J7t,plot:K7t}});var VF=ye(($mr,SFe)=>{"use strict";var $7t=ho(),Q7t=a5(),e9t=Pr().fillText;SFe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s,l,u,c,f=[r,n],h=[r+360,n];for(l=0;l<i.length;l++)if(s=i[l],c=!1,s._polygons){for(u=0;u<s._polygons.length;u++)s._polygons[u].contains(f)&&(c=!c),s._polygons[u].contains(h)&&(c=!c);if(c)break}if(!(!c||!s))return t.x0=t.x1=t.xa.c2p(s.ct),t.y0=t.y1=t.ya.c2p(s.ct),t.index=s.index,t.location=s.loc,t.z=s.z,t.zLabel=$7t.tickText(o.mockAxis,o.mockAxis.c2l(s.z),"hover").text,t.hovertemplate=s.hovertemplate,t9t(t,a,s),[t]};function t9t(e,t,r){if(!t.hovertemplate){var n=r.hi||t.hoverinfo,i=String(r.loc),a=n==="all"?Q7t.hoverinfo.flags:n.split("+"),o=a.indexOf("name")!==-1,s=a.indexOf("location")!==-1,l=a.indexOf("z")!==-1,u=a.indexOf("text")!==-1,c=!o&&s,f=[];c?e.nameOverride=i:(o&&(e.nameOverride=t.name),s&&f.push(i)),l&&f.push(e.zLabel),u&&e9t(r,t,f),e.extraText=f.join("<br>")}}});var GF=ye((Qmr,MFe)=>{"use strict";MFe.exports=function(t,r,n,i,a){t.location=r.location,t.z=r.z;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var HF=ye((eyr,EFe)=>{"use strict";EFe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s<n.length;s++)n[s].selected=0;else for(s=0;s<n.length;s++)l=n[s],u=l.ct,u&&(c=i.c2p(u),f=a.c2p(u),r.contains([c,f],null,s,t)?(o.push({pointNumber:s,lon:u[0],lat:u[1]}),l.selected=1):l.selected=0);return o}});var CFe=ye((tyr,kFe)=>{"use strict";kFe.exports={attributes:a5(),supplyDefaults:gFe(),colorbar:D_(),calc:NF(),calcGeoJSON:QZ().calcGeoJSON,plot:QZ().plot,style:UF().style,styleOnSelect:UF().styleOnSelect,hoverPoints:VF(),eventData:GF(),selectPoints:HF(),moduleType:"trace",name:"choropleth",basePlotModule:JZ(),categories:["geo","noOpacity","showLegend"],meta:{}}});var PFe=ye((ryr,LFe)=>{"use strict";LFe.exports=CFe()});var jF=ye((iyr,RFe)=>{"use strict";var r9t=Oa(),l0=Pr(),i9t=mT();function n9t(e,t,r,n){var i=e.cd,a=i[0].t,o=i[0].trace,s=e.xa,l=e.ya,u=a.x,c=a.y,f=s.c2p(t),h=l.c2p(r),d=e.distance,v;if(a.tree){var m=s.p2c(f-d),b=s.p2c(f+d),p=l.p2c(h-d),k=l.p2c(h+d);n==="x"?v=a.tree.range(Math.min(m,b),Math.min(l._rl[0],l._rl[1]),Math.max(m,b),Math.max(l._rl[0],l._rl[1])):v=a.tree.range(Math.min(m,b),Math.min(p,k),Math.max(m,b),Math.max(p,k))}else v=a.ids;var M,T,L,x,C,S,g,P,E,z=d;if(n==="x"){var q=!!o.xperiodalignment,U=!!o.yperiodalignment;for(C=0;C<v.length;C++){if(M=v[C],L=u[M],S=Math.abs(s.c2p(L)-f),q){var G=s.c2p(o._xStarts[M]),Z=s.c2p(o._xEnds[M]);S=f>=Math.min(G,Z)&&f<=Math.max(G,Z)?0:1/0}if(S<z){if(z=S,x=c[M],g=l.c2p(x)-h,U){var j=l.c2p(o._yStarts[M]),N=l.c2p(o._yEnds[M]);g=h>=Math.min(j,N)&&h<=Math.max(j,N)?0:1/0}E=Math.sqrt(S*S+g*g),T=v[C]}}}else for(C=v.length-1;C>-1;C--)M=v[C],L=u[M],x=c[M],S=s.c2p(L)-f,g=l.c2p(x)-h,P=Math.sqrt(S*S+g*g),P<z&&(z=E=P,T=M);return e.index=T,e.distance=z,e.dxy=E,T===void 0?[e]:[IFe(e,u,c,o)]}function IFe(e,t,r,n){var i=e.xa,a=e.ya,o=e.distance,s=e.dxy,l=e.index,u={pointNumber:l,x:t[l],y:r[l]};u.tx=l0.isArrayOrTypedArray(n.text)?n.text[l]:n.text,u.htx=Array.isArray(n.hovertext)?n.hovertext[l]:n.hovertext,u.data=Array.isArray(n.customdata)?n.customdata[l]:n.customdata,u.tp=Array.isArray(n.textposition)?n.textposition[l]:n.textposition;var c=n.textfont;c&&(u.ts=l0.isArrayOrTypedArray(c.size)?c.size[l]:c.size,u.tc=l0.isArrayOrTypedArray(c.color)?c.color[l]:c.color,u.tf=Array.isArray(c.family)?c.family[l]:c.family,u.tw=Array.isArray(c.weight)?c.weight[l]:c.weight,u.ty=Array.isArray(c.style)?c.style[l]:c.style,u.tv=Array.isArray(c.variant)?c.variant[l]:c.variant);var f=n.marker;f&&(u.ms=l0.isArrayOrTypedArray(f.size)?f.size[l]:f.size,u.mo=l0.isArrayOrTypedArray(f.opacity)?f.opacity[l]:f.opacity,u.mx=l0.isArrayOrTypedArray(f.symbol)?f.symbol[l]:f.symbol,u.ma=l0.isArrayOrTypedArray(f.angle)?f.angle[l]:f.angle,u.mc=l0.isArrayOrTypedArray(f.color)?f.color[l]:f.color);var h=f&&f.line;h&&(u.mlc=Array.isArray(h.color)?h.color[l]:h.color,u.mlw=l0.isArrayOrTypedArray(h.width)?h.width[l]:h.width);var d=f&&f.gradient;d&&d.type!=="none"&&(u.mgt=Array.isArray(d.type)?d.type[l]:d.type,u.mgc=Array.isArray(d.color)?d.color[l]:d.color);var v=i.c2p(u.x,!0),m=a.c2p(u.y,!0),b=u.mrc||1,p=n.hoverlabel;p&&(u.hbg=Array.isArray(p.bgcolor)?p.bgcolor[l]:p.bgcolor,u.hbc=Array.isArray(p.bordercolor)?p.bordercolor[l]:p.bordercolor,u.hts=l0.isArrayOrTypedArray(p.font.size)?p.font.size[l]:p.font.size,u.htc=Array.isArray(p.font.color)?p.font.color[l]:p.font.color,u.htf=Array.isArray(p.font.family)?p.font.family[l]:p.font.family,u.hnl=l0.isArrayOrTypedArray(p.namelength)?p.namelength[l]:p.namelength);var k=n.hoverinfo;k&&(u.hi=Array.isArray(k)?k[l]:k);var M=n.hovertemplate;M&&(u.ht=Array.isArray(M)?M[l]:M);var T={};T[e.index]=u;var L=n._origX,x=n._origY,C=l0.extendFlat({},e,{color:i9t(n,u),x0:v-b,x1:v+b,xLabelVal:L?L[l]:u.x,y0:m-b,y1:m+b,yLabelVal:x?x[l]:u.y,cd:T,distance:o,spikeDistance:s,hovertemplate:u.ht});return u.htx?C.text=u.htx:u.tx?C.text=u.tx:n.text&&(C.text=n.text),l0.fillText(u,n,C),r9t.getComponentMethod("errorbars","hoverInfo")(u,n,C),C}RFe.exports={hoverPoints:n9t,calcHover:IFe}});var px=ye((nyr,FFe)=>{"use strict";var DFe=20;FFe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:DFe,SYMBOL_STROKE:DFe/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}});var gk=ye((ayr,BFe)=>{"use strict";var a9t=Gl(),o9t=ec(),s9t=Pg(),mf=pf(),zFe=df().axisHoverFormat,qFe=Tu(),l9t=t_(),eY=Ao().extendFlat,u9t=mc().overrideAll,c9t=px().DASHES,OFe=mf.line,u1=mf.marker,f9t=u1.line,gx=BFe.exports=u9t({x:mf.x,x0:mf.x0,dx:mf.dx,y:mf.y,y0:mf.y0,dy:mf.dy,xperiod:mf.xperiod,yperiod:mf.yperiod,xperiod0:mf.xperiod0,yperiod0:mf.yperiod0,xperiodalignment:mf.xperiodalignment,yperiodalignment:mf.yperiodalignment,xhoverformat:zFe("x"),yhoverformat:zFe("y"),text:mf.text,hovertext:mf.hovertext,textposition:mf.textposition,textfont:o9t({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:OFe.color,width:OFe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:l9t(c9t),dflt:"solid"}},marker:eY({},qFe("marker"),{symbol:u1.symbol,angle:u1.angle,size:u1.size,sizeref:u1.sizeref,sizemin:u1.sizemin,sizemode:u1.sizemode,opacity:u1.opacity,colorbar:u1.colorbar,line:eY({},qFe("marker.line"),{width:f9t.width})}),connectgaps:mf.connectgaps,fill:eY({},mf.fill,{dflt:"none"}),fillcolor:s9t(),selected:{marker:mf.selected.marker,textfont:mf.selected.textfont},unselected:{marker:mf.unselected.marker,textfont:mf.unselected.textfont},opacity:a9t.opacity},"calc","nested");gx.x.editType=gx.y.editType=gx.x0.editType=gx.y0.editType="calc+clearAxisTypes";gx.hovertemplate=mf.hovertemplate;gx.hovertemplatefallback=mf.hovertemplatefallback;gx.texttemplate=mf.texttemplate;gx.texttemplatefallback=mf.texttemplatefallback});var WF=ye(tY=>{"use strict";var NFe=px();tY.isOpenSymbol=function(e){return typeof e=="string"?NFe.OPEN_RE.test(e):e%200>100};tY.isDotSymbol=function(e){return typeof e=="string"?NFe.DOT_RE.test(e):e>200}});var GFe=ye((syr,VFe)=>{"use strict";var UFe=Pr(),h9t=Oa(),d9t=WF(),v9t=gk(),p9t=Lm(),XF=Ru(),g9t=sT(),m9t=Dg(),y9t=$p(),_9t=D0(),x9t=Fg(),b9t=F0();VFe.exports=function(t,r,n,i){function a(d,v){return UFe.coerce(t,r,v9t,d,v)}var o=t.marker?d9t.isOpenSymbol(t.marker.symbol):!1,s=XF.isBubble(t),l=g9t(t,r,i,a);if(!l){r.visible=!1;return}m9t(t,r,i,a),a("xhoverformat"),a("yhoverformat");var u=l<p9t.PTS_LINESONLY?"lines+markers":"lines";a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode",u),XF.hasMarkers(r)&&(y9t(t,r,n,i,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0}),a("marker.line.width",o||s?1:0)),XF.hasLines(r)&&(a("connectgaps"),_9t(t,r,n,i,a),a("line.shape")),XF.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),b9t(t,r,i,a,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(r.line||{}).color,f=(r.marker||{}).color;a("fill"),r.fill!=="none"&&x9t(t,r,n,a);var h=h9t.getComponentMethod("errorbars","supplyDefaults");h(t,r,c||f||n,{axis:"y"}),h(t,r,c||f||n,{axis:"x",inherit:"y"}),UFe.coerceSelectionMarkerOpacity(r,a)}});var jFe=ye((lyr,HFe)=>{"use strict";var w9t=lI();HFe.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]),w9t(t,r,n)}});var XFe=ye((uyr,WFe)=>{"use strict";function T9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(a=o,i=o-1):n=o+1}return a}function A9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(a=o,i=o-1):n=o+1}return a}function S9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(a=o,n=o+1):i=o-1}return a}function M9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(a=o,n=o+1):i=o-1}return a}function E9t(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=r!==void 0?r(o,t):o-t;if(s===0)return a;s<=0?n=a+1:i=a-1}return-1}function mk(e,t,r,n,i,a){return typeof r=="function"?a(e,t,r,n===void 0?0:n|0,i===void 0?e.length-1:i|0):a(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}WFe.exports={ge:function(e,t,r,n,i){return mk(e,t,r,n,i,T9t)},gt:function(e,t,r,n,i){return mk(e,t,r,n,i,A9t)},lt:function(e,t,r,n,i){return mk(e,t,r,n,i,S9t)},le:function(e,t,r,n,i){return mk(e,t,r,n,i,M9t)},eq:function(e,t,r,n,i){return mk(e,t,r,n,i,E9t)}}});var ey=ye((cyr,YFe)=>{"use strict";YFe.exports=function(t,r,n){var i={},a,o;if(typeof r=="string"&&(r=ZFe(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]=ZFe(r[a]);var l={};for(a in r){var u=r[a];if(Array.isArray(u))for(o=0;o<u.length;o++){var c=u[o];if(n&&(l[c]=!0),c in t){if(i[a]=t[c],n)for(var f=o;f<u.length;f++)l[u[f]]=!0;break}}else a in t&&(r[a]&&(i[a]=t[a]),n&&(l[a]=!0))}if(n)for(a in t)l[a]||(i[a]=t[a]);return i};var rY={};function ZFe(e){return rY[e]?rY[e]:(typeof e=="string"&&(e=rY[e]=e.split(/\s*,\s*|\s+/)),e)}});var s5=ye((fyr,KFe)=>{"use strict";var k9t=ey();KFe.exports=C9t;function C9t(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=k9t(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 iw=ye((hyr,JFe)=>{"use strict";JFe.exports=L9t;function L9t(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 QFe=ye((dyr,$Fe)=>{$Fe.exports=function(){for(var e=0;e<arguments.length;e++)if(arguments[e]!==void 0)return arguments[e]}});var nw=ye((vyr,tze)=>{var eze=QD();tze.exports=P9t;function P9t(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var n=e[0].length,i=e.length*n,a,o,s,l;(!t||typeof t=="string")&&(t=new(eze(t||"float32"))(i+r));var u=t.length-r;if(i!==u)throw new Error("source length "+i+" ("+n+"x"+e.length+") does not match destination length "+u);for(a=0,s=r;a<e.length;a++)for(o=0;o<n;o++)t[s++]=e[a][o]===null?NaN:e[a][o]}else if(!t||typeof t=="string"){var c=eze(t||"float32");if(Array.isArray(e)||t==="array")for(t=new c(e.length+r),a=0,s=r,l=t.length;s<l;s++,a++)t[s]=e[a]===null?NaN:e[a];else r===0?t=new c(e):(t=new c(e.length+r),t.set(e,r))}else t.set(e,r);return t}});var ize=ye((pyr,rze)=>{"use strict";rze.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var aze=ye((gyr,nze)=>{"use strict";nze.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var hze=ye((myr,fze)=>{"use strict";var oze=XFe(),sze=rk(),I9t=s5(),R9t=iw(),lze=ey(),iY=QFe(),D9t=nw(),F9t=ize(),z9t=QD(),uze=aze(),q9t=1073741824;fze.exports=function(t,r){r||(r={}),t=D9t(t,"float64"),r=lze(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=iY(r.maxDepth,255),i=iY(r.bounds,R9t(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=cze(t,i),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(z9t(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let p=0;p<o;++p)s[p]=p;let l=[],u=[],c=[],f=[];d(0,0,1,s,0,1);let h=0;for(let p=0;p<l.length;p++){let k=l[p];if(s.set)s.set(k,h);else for(let T=0,L=k.length;T<L;T++)s[T+h]=k[T];let M=h+l[p].length;f[p]=[h,M],h=M}return s.range=v,s;function d(p,k,M,T,L,x){if(!T.length)return null;let C=l[L]||(l[L]=[]),S=c[L]||(c[L]=[]),g=u[L]||(u[L]=[]),P=C.length;if(L++,L>n||x>q9t){for(let N=0;N<T.length;N++)C.push(T[N]),S.push(x),g.push(null,null,null,null);return P}if(C.push(T[0]),S.push(x),T.length<=1)return g.push(null,null,null,null),P;let E=M*.5,z=p+E,q=k+E,U=[],G=[],Z=[],j=[];for(let N=1,H=T.length;N<H;N++){let re=T[N],oe=a[re*2],_e=a[re*2+1];oe<z?_e<q?U.push(re):G.push(re):_e<q?Z.push(re):j.push(re)}return x<<=2,g.push(d(p,k,E,U,L,x),d(p,q,E,G,L,x+1),d(z,k,E,Z,L,x+2),d(z,q,E,j,L,x+3)),P}function v(...p){let k;if(F9t(p[p.length-1])){let Z=p.pop();!p.length&&(Z.x!=null||Z.l!=null||Z.left!=null)&&(p=[Z],k={}),k=lze(Z,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else k={};p.length||(p=i);let M=I9t(...p),[T,L,x,C]=[Math.min(M.x,M.x+M.width),Math.min(M.y,M.y+M.height),Math.max(M.x,M.x+M.width),Math.max(M.y,M.y+M.height)],[S,g,P,E]=cze([T,L,x,C],i),z=iY(k.level,l.length);if(k.d!=null){let Z;typeof k.d=="number"?Z=[k.d,k.d]:k.d.length&&(Z=k.d),z=Math.min(Math.max(Math.ceil(-uze(Math.abs(Z[0])/(i[2]-i[0]))),Math.ceil(-uze(Math.abs(Z[1])/(i[3]-i[1])))),z)}if(z=Math.min(z,l.length),k.lod)return m(S,g,P,E,z);let q=[];U(0,0,1,0,0,1);function U(Z,j,N,H,re,oe){if(re===null||oe===null)return;let _e=Z+N,ke=j+N;if(S>_e||g>ke||P<Z||E<j||H>=z||re===oe)return;let Ce=l[H];oe===void 0&&(oe=Ce.length);for(let Pe=re;Pe<oe;Pe++){let ce=Ce[Pe],He=t[ce*2],lt=t[ce*2+1];He>=T&&He<=x&<>=L&<<=C&&q.push(ce)}let ge=u[H],ie=ge[re*4+0],Se=ge[re*4+1],Ee=ge[re*4+2],we=ge[re*4+3],De=G(ge,re+1),Le=N*.5,me=H+1;U(Z,j,Le,me,ie,Se||Ee||we||De),U(Z,j+Le,Le,me,Se,Ee||we||De),U(Z+Le,j,Le,me,Ee,we||De),U(Z+Le,j+Le,Le,me,we,De)}function G(Z,j){let N=null,H=0;for(;N===null;)if(N=Z[j*4+H],H++,H>Z.length)return null;return N}return q}function m(p,k,M,T,L){let x=[];for(let C=0;C<L;C++){let S=c[C],g=f[C][0],P=b(p,k,C),E=b(M,T,C),z=oze.ge(S,P),q=oze.gt(S,E,z,S.length-1);x[C]=[z+g,q+g]}return x}function b(p,k,M){let T=1,L=.5,x=.5,C=.5;for(let S=0;S<M;S++)T<<=2,T+=p<L?k<x?0:1:k<x?2:3,C*=.5,L+=p<L?-C:C,x+=k<x?-C:C;return T}};function cze(e,t){let[r,n,i,a]=t,o=1/(i-r),s=1/(a-n),l=new Array(e.length);for(let u=0,c=e.length/2;u<c;u++)l[2*u]=sze((e[2*u]-r)*o,0,1),l[2*u+1]=sze((e[2*u+1]-n)*s,0,1);return l}});var ZF=ye((yyr,dze)=>{"use strict";dze.exports=hze()});var nY=ye((_yr,vze)=>{vze.exports=O9t;function O9t(e){var t=0,r=0,n=0,i=0;return e.map(function(a){a=a.slice();var o=a[0],s=o.toUpperCase();if(o!=s)switch(a[0]=s,o){case"a":a[6]+=n,a[7]+=i;break;case"v":a[1]+=i;break;case"h":a[1]+=n;break;default:for(var l=1;l<a.length;)a[l++]+=n,a[l++]+=i}switch(s){case"Z":n=t,i=r;break;case"H":n=a[1];break;case"V":i=a[1];break;case"M":n=t=a[1],i=r=a[2];break;default:n=a[a.length-2],i=a[a.length-1]}return a})}});var mze=ye((YF,gze)=>{"use strict";Object.defineProperty(YF,"__esModule",{value:!0});var B9t=function(){function e(t,r){var n=[],i=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(i=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(u){a=!0,o=u}finally{try{!i&&s.return&&s.return()}finally{if(a)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),yk=Math.PI*2,aY=function(t,r,n,i,a,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=i*l-a*u,f=a*l+i*u;return{x:c+o,y:f+s}},N9t=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}]},pze=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)},U9t=function(t,r,n,i,a,o,s,l,u,c,f,h){var d=Math.pow(a,2),v=Math.pow(o,2),m=Math.pow(f,2),b=Math.pow(h,2),p=d*v-d*b-v*m;p<0&&(p=0),p/=d*b+v*m,p=Math.sqrt(p)*(s===l?-1:1);var k=p*a/o*h,M=p*-o/a*f,T=c*k-u*M+(t+n)/2,L=u*k+c*M+(r+i)/2,x=(f-k)/a,C=(h-M)/o,S=(-f-k)/a,g=(-h-M)/o,P=pze(1,0,x,C),E=pze(x,C,S,g);return l===0&&E>0&&(E-=yk),l===1&&E<0&&(E+=yk),[T,L,P,E]},V9t=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,h=t.sweepFlag,d=h===void 0?0:h,v=[];if(o===0||s===0)return[];var m=Math.sin(u*yk/360),b=Math.cos(u*yk/360),p=b*(r-i)/2+m*(n-a)/2,k=-m*(r-i)/2+b*(n-a)/2;if(p===0&&k===0)return[];o=Math.abs(o),s=Math.abs(s);var M=Math.pow(p,2)/Math.pow(o,2)+Math.pow(k,2)/Math.pow(s,2);M>1&&(o*=Math.sqrt(M),s*=Math.sqrt(M));var T=U9t(r,n,i,a,o,s,f,d,m,b,p,k),L=B9t(T,4),x=L[0],C=L[1],S=L[2],g=L[3],P=Math.abs(g)/(yk/4);Math.abs(1-P)<1e-7&&(P=1);var E=Math.max(Math.ceil(P),1);g/=E;for(var z=0;z<E;z++)v.push(N9t(S,g)),S+=g;return v.map(function(q){var U=aY(q[0],o,s,b,m,x,C),G=U.x,Z=U.y,j=aY(q[1],o,s,b,m,x,C),N=j.x,H=j.y,re=aY(q[2],o,s,b,m,x,C),oe=re.x,_e=re.y;return{x1:G,y1:Z,x2:N,y2:H,x:oe,y:_e}})};YF.default=V9t;gze.exports=YF.default});var xze=ye((xyr,_ze)=>{"use strict";_ze.exports=H9t;var G9t=mze();function H9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f<h;f++){var d=e[f],v=d[0];switch(v){case"M":a=d[1],o=d[2];break;case"A":var m=G9t({px:u,py:c,cx:d[6],cy:d[7],rx:d[1],ry:d[2],xAxisRotation:d[3],largeArcFlag:d[4],sweepFlag:d[5]});if(!m.length)continue;for(var b=0,p;b<m.length;b++)p=m[b],d=["C",p.x1,p.y1,p.x2,p.y2,p.x,p.y],b<m.length-1&&r.push(d);break;case"S":var k=u,M=c;(t=="C"||t=="S")&&(k+=k-n,M+=M-i),d=["C",k,M,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(s=u*2-s,l=c*2-l):(s=u,l=c),d=yze(u,c,s,l,d[1],d[2]);break;case"Q":s=d[1],l=d[2],d=yze(u,c,d[1],d[2],d[3],d[4]);break;case"L":d=KF(u,c,d[1],d[2]);break;case"H":d=KF(u,c,d[1],c);break;case"V":d=KF(u,c,u,d[1]);break;case"Z":d=KF(u,c,a,o);break}t=v,u=d[d.length-2],c=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function KF(e,t,r,n){return["C",e,t,r,n,r,n]}function yze(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}});var oY=ye((byr,bze)=>{"use strict";bze.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 Aze=ye((wyr,Tze)=>{"use strict";var j9t=nM(),W9t=nY(),X9t=xze(),Z9t=oY(),wze=gE();Tze.exports=Y9t;function Y9t(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(wze(Z9t(e),"String is not an SVG path."),e=j9t(e)),wze(Array.isArray(e),"Argument should be a string or an array of path segments."),e=W9t(e),e=X9t(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 Lze=ye((Tyr,Cze)=>{var aw=Math.PI,Sze=kze(120);Cze.exports=K9t;function K9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f<h;f++){var d=e[f],v=d[0];switch(v){case"M":a=d[1],o=d[2];break;case"A":d=Eze(u,c,d[1],d[2],kze(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 m=u,b=c;(t=="C"||t=="S")&&(m+=m-n,b+=b-i),d=["C",m,b,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(s=u*2-s,l=c*2-l):(s=u,l=c),d=Mze(u,c,s,l,d[1],d[2]);break;case"Q":s=d[1],l=d[2],d=Mze(u,c,d[1],d[2],d[3],d[4]);break;case"L":d=JF(u,c,d[1],d[2]);break;case"H":d=JF(u,c,d[1],c);break;case"V":d=JF(u,c,u,d[1]);break;case"Z":d=JF(u,c,a,o);break}t=v,u=d[d.length-2],c=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function JF(e,t,r,n){return["C",e,t,r,n,r,n]}function Mze(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 Eze(e,t,r,n,i,a,o,s,l,u){if(u)M=u[0],T=u[1],p=u[2],k=u[3];else{var c=sY(e,t,-i);e=c.x,t=c.y,c=sY(s,l,-i),s=c.x,l=c.y;var f=(e-s)/2,h=(t-l)/2,d=f*f/(r*r)+h*h/(n*n);d>1&&(d=Math.sqrt(d),r=d*r,n=d*n);var v=r*r,m=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((v*m-v*h*h-m*f*f)/(v*h*h+m*f*f)));b==1/0&&(b=1);var p=b*r*h/n+(e+s)/2,k=b*-n*f/r+(t+l)/2,M=Math.asin(((t-k)/n).toFixed(9)),T=Math.asin(((l-k)/n).toFixed(9));M=e<p?aw-M:M,T=s<p?aw-T:T,M<0&&(M=aw*2+M),T<0&&(T=aw*2+T),o&&M>T&&(M=M-aw*2),!o&&T>M&&(T=T-aw*2)}if(Math.abs(T-M)>Sze){var L=T,x=s,C=l;T=M+Sze*(o&&T>M?1:-1),s=p+r*Math.cos(T),l=k+n*Math.sin(T);var S=Eze(s,l,r,n,i,0,o,x,C,[T,L,p,k])}var g=Math.tan((T-M)/4),P=4/3*r*g,E=4/3*n*g,z=[2*e-(e+P*Math.sin(M)),2*t-(t-E*Math.cos(M)),s+P*Math.sin(T),l-E*Math.cos(T),s,l];if(u)return z;S&&(z=z.concat(S));for(var q=0;q<z.length;){var U=sY(z[q],z[q+1],i);z[q++]=U.x,z[q++]=U.y}return z}function sY(e,t,r){return{x:e*Math.cos(r)-t*Math.sin(r),y:e*Math.sin(r)+t*Math.cos(r)}}function kze(e){return e*(aw/180)}});var Ize=ye((Ayr,Pze)=>{var J9t=nY(),$9t=Lze(),Q9t={M:"moveTo",C:"bezierCurveTo"};Pze.exports=function(e,t){e.beginPath(),$9t(J9t(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[Q9t[n]].apply(e,i)}),e.closePath()}});var zze=ye((Syr,Fze)=>{"use strict";var eqt=rk();Fze.exports=tqt;var _k=1e20;function tqt(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,i=t.channel||0,a,o,s,l,u,c,f,h,d,v,m;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");a=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,f=h.getContext("2d"),a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,f=e,a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,l=d.data,c=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(a*o),v=0,m=u.length;v<m;v++)l[v]=u[v*c+i]/255;else if(c!==1)throw Error("Raw data can have only 1 value per pixel");var b=Array(a*o),p=Array(a*o),k=Array(s),M=Array(s),T=Array(s+1),L=Array(s);for(v=0,m=a*o;v<m;v++){var x=l[v];b[v]=x===1?0:x===0?_k:Math.pow(Math.max(0,.5-x),2),p[v]=x===1?_k:x===0?0:Math.pow(Math.max(0,x-.5),2)}Rze(b,a,o,k,M,L,T),Rze(p,a,o,k,M,L,T);var C=window.Float32Array?new Float32Array(a*o):new Array(a*o);for(v=0,m=a*o;v<m;v++)C[v]=eqt(1-((b[v]-p[v])/n+r),0,1);return C}function Rze(e,t,r,n,i,a,o){for(var s=0;s<t;s++){for(var l=0;l<r;l++)n[l]=e[l*t+s];for(Dze(n,i,a,o,r),l=0;l<r;l++)e[l*t+s]=i[l]}for(l=0;l<r;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(Dze(n,i,a,o,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(i[s])}}function Dze(e,t,r,n,i){r[0]=0,n[0]=-_k,n[1]=+_k;for(var a=1,o=0;a<i;a++){for(var s=(e[a]+a*a-(e[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s<=n[o];)o--,s=(e[a]+a*a-(e[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);o++,r[o]=a,n[o]=s,n[o+1]=+_k}for(a=0,o=0;a<i;a++){for(;n[o+1]<a;)o++;t[a]=(a-r[o])*(a-r[o])+e[r[o]]}}});var Oze=ye((Myr,qze)=>{"use strict";var rqt=Aze(),iqt=nM(),nqt=Ize(),aqt=oY(),oqt=zze(),lY=document.createElement("canvas"),dp=lY.getContext("2d");qze.exports=sqt;function sqt(e,t){if(!aqt(e))throw Error("Argument should be valid svg path string");t||(t={});var r,n;t.shape?(r=t.shape[0],n=t.shape[1]):(r=lY.width=t.w||t.width||200,n=lY.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||rqt(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;if(dp.fillStyle="black",dp.fillRect(0,0,r,n),dp.fillStyle="white",a&&(typeof a!="number"&&(a=1),a>0?dp.strokeStyle="white":dp.strokeStyle="black",dp.lineWidth=Math.abs(a)),dp.translate(r*.5,n*.5),dp.scale(l,l),lqt()){var u=new Path2D(e);dp.fill(u),a&&dp.stroke(u)}else{var c=iqt(e);nqt(dp,c),dp.fill(),a&&dp.stroke()}dp.setTransform(1,0,0,1,0,0);var f=oqt(dp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return f}var $F;function lqt(){if($F!=null)return $F;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return $F=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return $F=r&&r.data&&r.data[3]===255}});var sw=ye((Eyr,Yze)=>{"use strict";var ez=Eo(),uqt=Oze(),QF=ox(),cqt=Oa(),c5=Pr(),bh=c5.isArrayOrTypedArray,l5=So(),Bze=hf(),Nze=a1().formatColor,u5=Ru(),fqt=O3(),cY=WF(),xk=px(),hqt=X1().DESELECTDIM,Uze={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},dqt=ip().appendArrayPointValue;function vqt(e,t){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(u5.hasText(t)&&(n.text=Zze(e,t),n.textSel=Gze(e,t,t.selected),n.textUnsel=Gze(e,t,t.unselected)),u5.hasMarkers(t)&&(n.marker=hY(e,t),n.markerSel=fY(e,t,t.selected),n.markerUnsel=fY(e,t,t.unselected),!t.unselected&&bh(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r<a.length;r++)n.markerUnsel.opacity[r]=hqt*a[r]}if(u5.hasLines(t)){n.line={overlay:!0,thickness:t.line.width*i,color:t.line.color,opacity:t.opacity};var o=(xk.DASHES[t.line.dash]||[1]).slice();for(r=0;r<o.length;++r)o[r]*=t.line.width*i;n.line.dashes=o}return t.error_x&&t.error_x.visible&&(n.errorX=Hze(t,t.error_x,i)),t.error_y&&t.error_y.visible&&(n.errorY=Hze(t,t.error_y,i)),t.fill&&t.fill!=="none"&&(n.fill={closed:!0,fill:t.fillcolor,thickness:0}),n}function Zze(e,t){var r=e._fullLayout,n=t._length,i=t.textfont,a=t.textposition,o=bh(a)?a:[a],s=i.color,l=i.size,u=i.family,c=i.weight,f=i.style,h=i.variant,d={},v,m=e._context.plotGlPixelRatio,b=t.texttemplate;if(b){d.text=[];var p=r._d3locale,k=Array.isArray(b),M=k?Math.min(b.length,n):n,T=k?function(P){return b[P]}:function(){return b};for(v=0;v<M;v++){var L={i:v},x=t._module.formatLabels(L,t,r),C={};dqt(C,t,v),d.text.push(c5.texttemplateString({data:[C,L,t._meta],fallback:t.texttemplatefallback,labels:x,locale:p,template:T(v)}))}}else bh(t.text)&&t.text.length<n?d.text=t.text.slice():d.text=t.text;if(bh(d.text))for(v=d.text.length;v<n;v++)d.text[v]="";for(d.opacity=t.opacity,d.font={},d.align=[],d.baseline=[],v=0;v<o.length;v++){var S=o[v].split(/\s+/);switch(S[1]){case"left":d.align.push("right");break;case"right":d.align.push("left");break;default:d.align.push(S[1])}switch(S[0]){case"top":d.baseline.push("bottom");break;case"bottom":d.baseline.push("top");break;default:d.baseline.push(S[0])}}if(bh(s))for(d.color=new Array(n),v=0;v<n;v++)d.color[v]=s[v];else d.color=s;if(bh(l)||Array.isArray(u)||bh(c)||Array.isArray(f)||Array.isArray(h))for(d.font=new Array(n),v=0;v<n;v++){var g=d.font[v]={};g.size=(c5.isTypedArray(l)?l[v]:bh(l)?ez(l[v])?l[v]:0:l)*m,g.family=Array.isArray(u)?u[v]:u,g.weight=Vze(bh(c)?c[v]:c),g.style=Array.isArray(f)?f[v]:f,g.variant=Array.isArray(h)?h[v]:h}else d.font={size:l*m,family:u,weight:Vze(c),style:f,variant:h};return d}function Vze(e){return e<=1e3?e>500?"bold":"normal":e}function hY(e,t){var r=t._length,n=t.marker,i={},a,o=bh(n.symbol),s=bh(n.angle),l=bh(n.color),u=bh(n.line.color),c=bh(n.opacity),f=bh(n.size),h=bh(n.line.width),d;if(o||(d=cY.isOpenSymbol(n.symbol)),o||l||u||c||s){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var v=n.symbol,m=n.angle,b=Nze(n,n.opacity,r),p=Nze(n.line,n.opacity,r);if(!bh(p[0])){var k=p;for(p=Array(r),a=0;a<r;a++)p[a]=k}if(!bh(b[0])){var M=b;for(b=Array(r),a=0;a<r;a++)b[a]=M}if(!bh(v)){var T=v;for(v=Array(r),a=0;a<r;a++)v[a]=T}if(!bh(m)){var L=m;for(m=Array(r),a=0;a<r;a++)m[a]=L}for(i.symbols=v,i.angles=m,i.colors=b,i.borderColors=p,a=0;a<r;a++)o&&(d=cY.isOpenSymbol(n.symbol[a])),d&&(p[a]=b[a].slice(),b[a]=b[a].slice(),b[a][3]=0);for(i.opacity=t.opacity,i.markers=new Array(r),a=0;a<r;a++)i.markers[a]=Xze({mx:i.symbols[a],ma:i.angles[a]},t)}else d?(i.color=QF(n.color,"uint8"),i.color[3]=0,i.borderColor=QF(n.color,"uint8")):(i.color=QF(n.color,"uint8"),i.borderColor=QF(n.line.color,"uint8")),i.opacity=t.opacity*n.opacity,i.marker=Xze({mx:n.symbol,ma:n.angle},t);var x=1,C=fqt(t,x),S;if(f||h){var g=i.sizes=new Array(r),P=i.borderSizes=new Array(r),E=0,z;if(f){for(a=0;a<r;a++)g[a]=C(n.size[a]),E+=g[a];z=E/r}else for(S=C(n.size),a=0;a<r;a++)g[a]=S;if(h)for(a=0;a<r;a++)P[a]=n.line.width[a];else for(S=n.line.width,a=0;a<r;a++)P[a]=S;i.sizeAvg=z}else i.size=C(n&&n.size||10),i.borderSizes=C(n.line.width);return i}function fY(e,t,r){var n=t.marker,i={};return r&&(r.marker&&r.marker.symbol?i=hY(e,c5.extendFlat({},n,r.marker)):r.marker&&(r.marker.size&&(i.size=r.marker.size),r.marker.color&&(i.colors=r.marker.color),r.marker.opacity!==void 0&&(i.opacity=r.marker.opacity))),i}function Gze(e,t,r){var n={};if(!r)return n;if(r.textfont){var i={opacity:1,text:t.text,texttemplate:t.texttemplate,textposition:t.textposition,textfont:c5.extendFlat({},t.textfont)};r.textfont&&c5.extendFlat(i.textfont,r.textfont),n=Zze(e,i)}return n}function Hze(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 jze=xk.SYMBOL_SDF_SIZE,ow=xk.SYMBOL_SIZE,Wze=xk.SYMBOL_STROKE,uY={},pqt=l5.symbolFuncs[0](ow*.05);function Xze(e,t){var r=e.mx;if(r==="circle")return null;var n,i,a=l5.symbolNumber(r),o=l5.symbolFuncs[a%100],s=!!l5.symbolNoDot[a%100],l=!!l5.symbolNoFill[a%100],u=cY.isDotSymbol(r);if(e.ma&&(r+="_"+e.ma),uY[r])return uY[r];var c=l5.getMarkerAngle(e,t);return u&&!s?n=o(ow*1.1,c)+pqt:n=o(ow,c),i=uqt(n,{w:jze,h:jze,viewBox:[-ow,-ow,ow,ow],stroke:l?Wze:-Wze}),uY[r]=i,i||null}function gqt(e,t,r){var n=r.length,i=n/2,a,o;if(u5.hasLines(t)&&i)if(t.line.shape==="hv"){for(a=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?a.push(NaN,NaN,NaN,NaN):(a.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?a.push(r[o*2+2],r[o*2+1]):a.push(NaN,NaN));a.push(r[n-2],r[n-1])}else if(t.line.shape==="hvh"){for(a=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?a.push(r[o*2],r[o*2+1]):a.push(NaN,NaN),a.push(NaN,NaN);else{var s=(r[o*2]+r[o*2+2])/2;a.push(r[o*2],r[o*2+1],s,r[o*2+1],s,r[o*2+3])}a.push(r[n-2],r[n-1])}else if(t.line.shape==="vhv"){for(a=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?a.push(r[o*2],r[o*2+1]):a.push(NaN,NaN),a.push(NaN,NaN);else{var l=(r[o*2+1]+r[o*2+3])/2;a.push(r[o*2],r[o*2+1],r[o*2],l,r[o*2+2],l)}a.push(r[n-2],r[n-1])}else if(t.line.shape==="vh"){for(a=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?a.push(NaN,NaN,NaN,NaN):(a.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?a.push(r[o*2],r[o*2+3]):a.push(NaN,NaN));a.push(r[n-2],r[n-1])}else a=r;var u=!1;for(o=0;o<a.length;o++)if(isNaN(a[o])){u=!0;break}var c=u||a.length>xk.TOO_MANY_POINTS||u5.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=a[0],h=a[1];for(o=0;o<a.length;o+=2)isNaN(a[o])||isNaN(a[o+1])?(a[o]=f,a[o+1]=h):(f=a[o],h=a[o+1])}return{join:c,positions:a}}function mqt(e,t,r,n,i){var a=cqt.getComponentMethod("errorbars","makeComputeError"),o=Bze.getFromId(e,t.xaxis,"x"),s=Bze.getFromId(e,t.yaxis,"y"),l=r.length/2,u={};function c(f,h){var d=h._id.charAt(0),v=t["error_"+d];if(v&&v.visible&&(h.type==="linear"||h.type==="log")){for(var m=a(v),b={x:0,y:1}[d],p={x:[0,1,2,3],y:[2,3,0,1]}[d],k=new Float64Array(4*l),M=1/0,T=-1/0,L=0,x=0;L<l;L++,x+=4){var C=f[L];if(ez(C)){var S=r[L*2+b],g=m(C,L),P=g[0],E=g[1];if(ez(P)&&ez(E)){var z=C-P,q=C+E;k[x+p[0]]=S-h.c2l(z),k[x+p[1]]=h.c2l(q)-S,k[x+p[2]]=0,k[x+p[3]]=0,M=Math.min(M,C-P),T=Math.max(T,C+E)}}}u[d]={positions:r,errors:k,_bnds:[M,T]}}}return c(n,o),c(i,s),u}function yqt(e,t,r,n){var i=t._length,a={},o;if(u5.hasMarkers(t)){var s=r.font,l=r.align,u=r.baseline;for(a.offset=new Array(i),o=0;o<i;o++){var c=n.sizes?n.sizes[o]:n.size,f=bh(s)?s[o].size:s.size,h=bh(l)?l.length>1?l[o]:l[0]:l,d=bh(u)?u.length>1?u[o]:u[0]:u,v=Uze[h],m=Uze[d],b=c?c/.8+1:0,p=-m*b-m*.5;a.offset[o]=[v*b/f,p/f]}}return a}Yze.exports={style:vqt,markerStyle:hY,markerSelection:fY,linePositions:gqt,errorBarPositions:mqt,textPosition:yqt}});var dY=ye((kyr,Kze)=>{"use strict";var tz=Pr();Kze.exports=function(t,r){var n=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){tz.extendFlat(n,a,i)},n.init(),n.update=function(s){var l=tz.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u<n.count;u++)n.glText[u].update(s)},n.draw=function(){for(var s=n.count,l=n.fill2d,u=n.error2d,c=n.line2d,f=n.scatter2d,h=n.glText,d=n.select2d,v=n.selectBatch,m=n.unselectBatch,b=0;b<s;b++){if(l&&n.fillOrder[b]&&l.draw(n.fillOrder[b]),c&&n.lineOptions[b]&&c.draw(b),u&&(n.errorXOptions[b]&&u.draw(b),n.errorYOptions[b]&&u.draw(b+s)),f&&n.markerOptions[b])if(m[b].length){var p=tz.repeat([],n.count);p[b]=m[b],f.draw(p)}else v[b].length||f.draw(b);h[b]&&n.textOptions[b]&&h[b].render()}d&&d.draw(v),n.dirty=!1},n.destroy=function(){n.fill2d&&n.fill2d.destroy&&n.fill2d.destroy(),n.scatter2d&&n.scatter2d.destroy&&n.scatter2d.destroy(),n.error2d&&n.error2d.destroy&&n.error2d.destroy(),n.line2d&&n.line2d.destroy&&n.line2d.destroy(),n.select2d&&n.select2d.destroy&&n.select2d.destroy(),n.glText&&n.glText.forEach(function(s){s.destroy&&s.destroy()}),n.lineOptions=null,n.fillOptions=null,n.markerOptions=null,n.markerSelectedOptions=null,n.markerUnselectedOptions=null,n.errorXOptions=null,n.errorYOptions=null,n.textOptions=null,n.textSelectedOptions=null,n.textUnselectedOptions=null,n.selectBatch=null,n.unselectBatch=null,r._scene=null}),n.dirty||tz.extendFlat(n,i),n}});var r7e=ye((Cyr,t7e)=>{"use strict";var _qt=ZF(),f5=Pr(),Jze=hf(),xqt=Mg().findExtremes,$ze=zg(),vY=O0(),bqt=vY.calcMarkerSize,wqt=vY.calcAxisExpansion,Tqt=vY.setFirstScatter,Aqt=z0(),h5=sw(),Sqt=dY(),Qze=fs().BADNUM,Mqt=px().TOO_MANY_POINTS;t7e.exports=function(t,r){var n=t._fullLayout,i=r._xA=Jze.getFromId(t,r.xaxis,"x"),a=r._yA=Jze.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=Mqt,u=s*2,c={},f,h=i.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),v=$ze(r,i,"x",h),m=$ze(r,a,"y",d),b=v.vals,p=m.vals;r._x=b,r._y=p,r.xperiodalignment&&(r._origX=h,r._xStarts=v.starts,r._xEnds=v.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=m.starts,r._yEnds=m.ends);var k=new Array(u),M=new Array(s);for(f=0;f<s;f++)k[f*2]=b[f]===Qze?NaN:b[f],k[f*2+1]=p[f]===Qze?NaN:p[f],M[f]=f;if(i.type==="log")for(f=0;f<u;f+=2)k[f]=i.c2l(k[f]);if(a.type==="log")for(f=1;f<u;f+=2)k[f]=a.c2l(k[f]);l&&i.type!=="log"&&a.type!=="log"?c.tree=_qt(k):c.ids=M,Aqt(t,r);var T=Eqt(t,o,r,k,b,p),L=Sqt(t,o);Tqt(n,r);var x;return l?T.marker&&(x=T.marker.sizeAvg||Math.max(T.marker.size,3)):x=bqt(r,s),wqt(t,r,i,a,b,p,x),T.errorX&&e7e(r,i,T.errorX),T.errorY&&e7e(r,a,T.errorY),T.fill&&!L.fill2d&&(L.fill2d=!0),T.marker&&!L.scatter2d&&(L.scatter2d=!0),T.line&&!L.line2d&&(L.line2d=!0),(T.errorX||T.errorY)&&!L.error2d&&(L.error2d=!0),T.text&&!L.glText&&(L.glText=!0),T.marker&&(T.marker.snap=s),L.lineOptions.push(T.line),L.errorXOptions.push(T.errorX),L.errorYOptions.push(T.errorY),L.fillOptions.push(T.fill),L.markerOptions.push(T.marker),L.markerSelectedOptions.push(T.markerSel),L.markerUnselectedOptions.push(T.markerUnsel),L.textOptions.push(T.text),L.textSelectedOptions.push(T.textSel),L.textUnselectedOptions.push(T.textUnsel),L.selectBatch.push([]),L.unselectBatch.push([]),c._scene=L,c.index=L.count,c.x=b,c.y=p,c.positions=k,L.count++,[{x:!1,y:!1,t:c,trace:r}]};function e7e(e,t,r){var n=e._extremes[t._id],i=xqt(t,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}function Eqt(e,t,r,n,i,a){var o=h5.style(e,r);if(o.marker&&(o.marker.positions=n),o.line&&n.length>1&&f5.extendFlat(o.line,h5.linePositions(e,r,n)),o.errorX||o.errorY){var s=h5.errorBarPositions(e,r,n,i,a);o.errorX&&f5.extendFlat(o.errorX,s.x),o.errorY&&f5.extendFlat(o.errorY,s.y)}return o.text&&(f5.extendFlat(o.text,{positions:n},h5.textPosition(e,r,o.text,o.marker)),f5.extendFlat(o.textSel,{positions:n},h5.textPosition(e,r,o.text,o.markerSel)),f5.extendFlat(o.textUnsel,{positions:n},h5.textPosition(e,r,o.text,o.markerUnsel))),o}});var pY=ye((Lyr,n7e)=>{"use strict";var i7e=Pr(),kqt=ka(),Cqt=X1().DESELECTDIM;function Lqt(e){var t=e[0],r=t.trace,n=t.t,i=n._scene,a=n.index,o=i.selectBatch[a],s=i.unselectBatch[a],l=i.textOptions[a],u=i.textSelectedOptions[a]||{},c=i.textUnselectedOptions[a]||{},f=i7e.extendFlat({},l),h,d;if(o.length||s.length){var v=u.color,m=c.color,b=l.color,p=i7e.isArrayOrTypedArray(b);for(f.color=new Array(r._length),h=0;h<o.length;h++)d=o[h],f.color[d]=v||(p?b[d]:b);for(h=0;h<s.length;h++){d=s[h];var k=p?b[d]:b;f.color[d]=m||(v?k:kqt.addOpacity(k,Cqt))}}i.glText[a].update(f)}n7e.exports={styleTextSelection:Lqt}});var gY=ye((Pyr,o7e)=>{"use strict";var a7e=Ru(),Pqt=pY().styleTextSelection;o7e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,h=l._scene,d=l.index;if(!h)return o;var v=a7e.hasText(s),m=a7e.hasMarkers(s),b=!m&&!v;if(s.visible!==!0||b)return o;var p=[],k=[];if(r!==!1&&!r.degenerate)for(var M=0;M<u;M++)r.contains([l.xpx[M],l.ypx[M]],!1,M,t)?(p.push(M),o.push({pointNumber:M,x:i.c2d(c[M]),y:a.c2d(f[M])})):k.push(M);if(m){var T=h.scatter2d;if(!p.length&&!k.length){var L=new Array(h.count);L[d]=h.markerOptions[d],T.update.apply(T,L)}else if(!h.selectBatch[d].length&&!h.unselectBatch[d].length){var x=new Array(h.count);x[d]=h.markerUnselectedOptions[d],T.update.apply(T,x)}}return h.selectBatch[d]=p,h.unselectBatch[d]=k,v&&Pqt(n),o}});var l7e=ye((Iyr,s7e)=>{"use strict";var Iqt=jF();s7e.exports={moduleType:"trace",name:"scattergl",basePlotModule:mh(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:gk(),supplyDefaults:GFe(),crossTraceDefaults:cU(),colorbar:$d(),formatLabels:jFe(),calc:r7e(),hoverPoints:Iqt.hoverPoints,selectPoints:gY(),meta:{}}});var c7e=ye((Ryr,iz)=>{"use strict";var rz=rk();iz.exports=u7e;iz.exports.to=u7e;iz.exports.from=Rqt;function u7e(e,t){t==null&&(t=!0);var r=e[0],n=e[1],i=e[2],a=e[3];a==null&&(a=t?1:255),t&&(r*=255,n*=255,i*=255,a*=255),r=rz(r,0,255)&255,n=rz(n,0,255)&255,i=rz(i,0,255)&255,a=rz(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function Rqt(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,i=(e&65280)>>>8,a=e&255;return t===!1?[r,n,i,a]:[r/255,n/255,i/255,a/255]}});var Nh=ye((Dyr,h7e)=>{"use strict";var f7e=Object.getOwnPropertySymbols,Dqt=Object.prototype.hasOwnProperty,Fqt=Object.prototype.propertyIsEnumerable;function zqt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function qqt(){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}}h7e.exports=qqt()?Object.assign:function(e,t){for(var r,n=zqt(e),i,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var o in r)Dqt.call(r,o)&&(n[o]=r[o]);if(f7e){i=f7e(r);for(var s=0;s<i.length;s++)Fqt.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n}});var v7e=ye((Fyr,d7e)=>{d7e.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n<e.length-1;n++)r.push(e[n],t[n]||"");return r.push(e[n]),r.join("")}});var mY=ye((zyr,p7e)=>{"use strict";p7e.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i<a;i++){var o=n[i];for(var s in o)if(!(r[s]!==void 0&&!Array.isArray(r[s])&&t[s]===r[s])&&s in r){var l;if(o[s]===!0)l=r[s];else{if(o[s]===!1)continue;if(typeof o[s]=="function"&&(l=o[s](r[s],t,r),l===void 0))continue}t[s]=l}}return t}});var m7e=ye((qyr,g7e)=>{"use strict";g7e.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var nz=ye((Oyr,d5)=>{"use strict";d5.exports=bk;d5.exports.float32=d5.exports.float=bk;d5.exports.fract32=d5.exports.fract=Oqt;var y7e=new Float32Array(1);function Oqt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=bk(e));for(var r=0,n=t.length;r<n;r++)t[r]=e[r]-t[r];return t}return bk(e-bk(e))}function bk(e){return e.length?e instanceof Float32Array?e:new Float32Array(e):(y7e[0]=e,y7e[0])}});var _Y=ye((Byr,b7e)=>{"use strict";function Bqt(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Nqt(e,t){return Gqt(e)||Bqt(e,t)||x7e(e,t)||Wqt()}function Uqt(e){return Vqt(e)||Hqt(e)||x7e(e)||jqt()}function Vqt(e){if(Array.isArray(e))return yY(e)}function Gqt(e){if(Array.isArray(e))return e}function Hqt(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x7e(e,t){if(e){if(typeof e=="string")return yY(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yY(e,t)}}function yY(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jqt(){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 Wqt(){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 Xqt=ox(),Zqt=iw(),Yqt=c7e(),Kqt=ZF(),lw=Nh(),az=v7e(),Jqt=ey(),$qt=mY(),Qqt=nw(),_7e=m7e(),oz=nz(),eOt=s5(),tOt=nv;function nv(e,t){var r=this;if(!(this instanceof nv))return new nv(e,t);typeof e=="function"?(t||(t={}),t.regl=e):(t=e,e=null),t&&t.length&&(t.positions=t),e=t.regl;var n=e._gl,i,a=[],o={},s=[],l=[null],u=[null],c=255,f=100;this.tooManyColors=_7e,i=e.texture({data:new Uint8Array(c*4),width:c,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),lw(this,{regl:e,gl:n,groups:s,markerCache:u,markerTextures:l,palette:a,paletteIds:o,paletteTexture:i,maxColors:c,maxSize:f,canvas:n.canvas}),this.update(t);var h={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop("opacity"),paletteSize:function(b,p){return[r.tooManyColors?0:c,i.height]},pixelRatio:e.context("pixelRatio"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),markerTexture:e.prop("markerTexture"),paletteTexture:i},attributes:{x:function(b,p){return p.xAttr||{buffer:p.positionBuffer,stride:8,offset:0}},y:function(b,p){return p.yAttr||{buffer:p.positionBuffer,stride:8,offset:4}},xFract:function(b,p){return p.xAttr?{constant:[0,0]}:{buffer:p.positionFractBuffer,stride:8,offset:0}},yFract:function(b,p){return p.yAttr?{constant:[0,0]}:{buffer:p.positionFractBuffer,stride:8,offset:4}},size:function(b,p){return p.size.length?{buffer:p.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(p.size*255/r.maxSize)]}},borderSize:function(b,p){return p.borderSize.length?{buffer:p.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(p.borderSize*255/r.maxSize)]}},colorId:function(b,p){return p.color.length?{buffer:p.colorBuffer,stride:r.tooManyColors?8:4,offset:0}:{constant:r.tooManyColors?a.slice(p.color*4,p.color*4+4):[p.color]}},borderColorId:function(b,p){return p.borderColor.length?{buffer:p.colorBuffer,stride:r.tooManyColors?8:4,offset:r.tooManyColors?4:2}:{constant:r.tooManyColors?a.slice(p.borderColor*4,p.borderColor*4+4):[p.borderColor]}},isActive:function(b,p){return p.activation===!0?{constant:[1]}:p.activation?p.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},d=lw({},h);d.frag=az([`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=az([`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 v=lw({},h);v.frag=az([`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;
|
||
}
|
||
`]),v.vert=az([`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;
|
||
}
|
||
`]),_7e&&(v.frag=v.frag.replace("smoothstep","smoothStep"),d.frag=d.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(v)}nv.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4};nv.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this};nv.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=this.groups;if(r.length===1&&Array.isArray(r[0])&&(r[0][0]===null||Array.isArray(r[0][0]))&&(r=r[0]),this.regl._refresh(),r.length)for(var a=0;a<r.length;a++)this.drawItem(a,r[a]);else i.forEach(function(o,s){e.drawItem(s)});return this};nv.prototype.drawItem=function(e,t){var r=this.groups,n=r[e];if(typeof t=="number"&&(e=t,n=r[t],t=null),!!(n&&n.count&&n.opacity)){n.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,n,t));for(var i=[],a=1;a<n.activation.length;a++)!n.activation[a]||n.activation[a]!==!0&&!n.activation[a].data.length||i.push.apply(i,Uqt(this.getMarkerDrawOptions(a,n,t)));i.length&&this.drawMarker(i)}};nv.prototype.getMarkerDrawOptions=function(e,t,r){var n=t.range,i=t.tree,a=t.viewport,o=t.activation,s=t.selectionBuffer,l=t.count,u=this.regl;if(!i)return r?[lw({},t,{markerTexture:this.markerTextures[e],activation:o[e],count:r.length,elements:r,offset:0})]:[lw({},t,{markerTexture:this.markerTextures[e],activation:o[e],offset:0})];var c=[],f=i.range(n,{lod:!0,px:[(n[2]-n[0])/a.width,(n[3]-n[1])/a.height]});if(r){for(var h=o[e],d=h.data,v=new Uint8Array(l),m=0;m<r.length;m++){var b=r[m];v[b]=d?d[b]:1}s.subdata(v)}for(var p=f.length;p--;){var k=Nqt(f[p],2),M=k[0],T=k[1];c.push(lw({},t,{markerTexture:this.markerTextures[e],activation:r?s:o[e],offset:M,count:T-M}))}return c};nv.prototype.update=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length){r.length===1&&Array.isArray(r[0])&&(r=r[0]);var i=this.groups,a=this.gl,o=this.regl,s=this.maxSize,l=this.maxColors,u=this.palette;this.groups=i=r.map(function(c,f){var h=i[f];if(c===void 0)return h;c===null?c={positions:null}:typeof c=="function"?c={ondraw:c}:typeof c[0]=="number"&&(c={positions:c}),c=Jqt(c,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),c.positions===null&&(c.positions=[]),c.tooManyColors!=null&&(e.tooManyColors=c.tooManyColors),h||(i[f]=h={id:f,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:o.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:o.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:o.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:o.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:o.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},c=lw({},nv.defaults,c)),c.positions&&!("marker"in c)&&(c.marker=h.marker,delete h.marker),c.marker&&!("positions"in c)&&(c.positions=h.positions,delete h.positions);var d=0,v=0;if($qt(h,c,[{snap:!0,size:function(j,N){return j==null&&(j=nv.defaults.size),d+=j&&j.length?1:0,j},borderSize:function(j,N){return j==null&&(j=nv.defaults.borderSize),d+=j&&j.length?1:0,j},opacity:parseFloat,color:function(j,N){return j==null&&(j=nv.defaults.color),j=e.updateColor(j),v++,j},borderColor:function(j,N){return j==null&&(j=nv.defaults.borderColor),j=e.updateColor(j),v++,j},bounds:function(j,N,H){return"range"in H||(H.range=null),j},positions:function(j,N,H){var re=N.snap,oe=N.positionBuffer,_e=N.positionFractBuffer,ke=N.selectionBuffer;if(j.x||j.y)return j.x.length?N.xAttr={buffer:o.buffer(j.x),offset:0,stride:4,count:j.x.length}:N.xAttr={buffer:j.x.buffer,offset:j.x.offset*4||0,stride:(j.x.stride||1)*4,count:j.x.count},j.y.length?N.yAttr={buffer:o.buffer(j.y),offset:0,stride:4,count:j.y.length}:N.yAttr={buffer:j.y.buffer,offset:j.y.offset*4||0,stride:(j.y.stride||1)*4,count:j.y.count},N.count=Math.max(N.xAttr.count,N.yAttr.count),j;j=Qqt(j,"float64");var Ce=N.count=Math.floor(j.length/2),ge=N.bounds=Ce?Zqt(j,2):null;if(!H.range&&!N.range&&(delete N.range,H.range=ge),!H.marker&&!N.marker&&(delete N.marker,H.marker=null),re&&(re===!0||Ce>re)?N.tree=Kqt(j,{bounds:ge}):re&&re.length&&(N.tree=re),N.tree){var ie={primitive:"points",usage:"static",data:N.tree,type:"uint32"};N.elements?N.elements(ie):N.elements=o.elements(ie)}var Se=oz.float32(j);oe({data:Se,usage:"dynamic"});var Ee=oz.fract32(j,Se);return _e({data:Ee,usage:"dynamic"}),ke({data:new Uint8Array(Ce),type:"uint8",usage:"stream"}),j}},{marker:function(j,N,H){var re=N.activation;if(re.forEach(function(Ee){return Ee&&Ee.destroy&&Ee.destroy()}),re.length=0,!j||typeof j[0]=="number"){var oe=e.addMarker(j);re[oe]=!0}else{for(var _e=[],ke=0,Ce=Math.min(j.length,N.count);ke<Ce;ke++){var ge=e.addMarker(j[ke]);_e[ge]||(_e[ge]=new Uint8Array(N.count)),_e[ge][ke]=1}for(var ie=0;ie<_e.length;ie++)if(_e[ie]){var Se={data:_e[ie],type:"uint8",usage:"static"};re[ie]?re[ie](Se):re[ie]=o.buffer(Se),re[ie].data=_e[ie]}}return j},range:function(j,N,H){var re=N.bounds;if(re)return j||(j=re),N.scale=[1/(j[2]-j[0]),1/(j[3]-j[1])],N.translate=[-j[0],-j[1]],N.scaleFract=oz.fract(N.scale),N.translateFract=oz.fract(N.translate),j},viewport:function(j){var N=eOt(j||[a.drawingBufferWidth,a.drawingBufferHeight]);return N}}]),d){var m=h,b=m.count,p=m.size,k=m.borderSize,M=m.sizeBuffer,T=new Uint8Array(b*2);if(p.length||k.length)for(var L=0;L<b;L++)T[L*2]=Math.round((p[L]==null?p:p[L])*255/s),T[L*2+1]=Math.round((k[L]==null?k:k[L])*255/s);M({data:T,usage:"dynamic"})}if(v){var x=h,C=x.count,S=x.color,g=x.borderColor,P=x.colorBuffer,E;if(e.tooManyColors){if(S.length||g.length){E=new Uint8Array(C*8);for(var z=0;z<C;z++){var q=S[z];E[z*8]=u[q*4],E[z*8+1]=u[q*4+1],E[z*8+2]=u[q*4+2],E[z*8+3]=u[q*4+3];var U=g[z];E[z*8+4]=u[U*4],E[z*8+5]=u[U*4+1],E[z*8+6]=u[U*4+2],E[z*8+7]=u[U*4+3]}}}else if(S.length||g.length){E=new Uint8Array(C*4+2);for(var G=0;G<C;G++)S[G]!=null&&(E[G*4]=S[G]%l,E[G*4+1]=Math.floor(S[G]/l)),g[G]!=null&&(E[G*4+2]=g[G]%l,E[G*4+3]=Math.floor(g[G]/l))}P({data:E||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return h})}};nv.prototype.addMarker=function(e){var t=this.markerTextures,r=this.regl,n=this.markerCache,i=e==null?0:n.indexOf(e);if(i>=0)return i;var a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)a=e;else{a=new Uint8Array(e.length);for(var o=0,s=e.length;o<s;o++)a[o]=e[o]*255}var l=Math.floor(Math.sqrt(a.length));return i=t.length,n.push(e),t.push(r.texture({channels:1,data:a,radius:l,mag:"linear",min:"linear"})),i};nv.prototype.updateColor=function(e){var t=this.paletteIds,r=this.palette,n=this.maxColors;Array.isArray(e)||(e=[e]);var i=[];if(typeof e[0]=="number"){var a=[];if(Array.isArray(e))for(var o=0;o<e.length;o+=4)a.push(e.slice(o,o+4));else for(var s=0;s<e.length;s+=4)a.push(e.subarray(s,s+4));e=a}for(var l=0;l<e.length;l++){var u=e[l];u=Xqt(u,"uint8");var c=Yqt(u,!1);if(t[c]==null){var f=r.length;t[c]=Math.floor(f/4),r[f]=u[0],r[f+1]=u[1],r[f+2]=u[2],r[f+3]=u[3]}i[l]=t[c]}return!this.tooManyColors&&r.length>n*4&&(this.tooManyColors=!0),this.updatePalette(r),i.length===1?i[0]:i};nv.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(var i=e.length*.25%t;i<n*t;i++)e.push(0,0,0,0)}r.height<n&&r.resize(t,n),r.subimage({width:Math.min(e.length*.25,t),height:n,data:e},0,0)}};nv.prototype.destroy=function(){return this.groups.forEach(function(e){e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(function(t){return t&&t.destroy&&t.destroy()}),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(e){return e&&e.destroy&&e.destroy()}),this};var rOt=Nh(),iOt=function(t,r){var n=new tOt(t,r),i=n.render.bind(n);return rOt(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};b7e.exports=iOt});var M7e=ye((Nyr,TY)=>{"use strict";TY.exports=uz;TY.exports.default=uz;function uz(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=T7e(e,0,i,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,l,u,c,f,h,d;if(n&&(a=lOt(e,t,a,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var v=r;v<i;v+=r)f=e[v],h=e[v+1],f<s&&(s=f),h<l&&(l=h),f>u&&(u=f),h>c&&(c=h);d=Math.max(u-s,c-l),d=d!==0?32767/d:0}return wk(a,o,r,s,l,d,0),o}function T7e(e,t,r,n,i){var a,o;if(i===wY(e,t,r,n)>0)for(a=t;a<r;a+=n)o=w7e(a,e[a],e[a+1],o);else for(a=r-n;a>=t;a-=n)o=w7e(a,e[a],e[a+1],o);return o&&cz(o,o.next)&&(Ak(o),o=o.next),o}function uw(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(cz(r,r.next)||wh(r.prev,r,r.next)===0)){if(Ak(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function wk(e,t,r,n,i,a,o){if(e){!o&&a&&dOt(e,n,i,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?aOt(e,n,i,a):nOt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),Ak(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=oOt(uw(e),t,r),wk(e,t,r,n,i,a,2)):o===2&&sOt(e,t,r,n,i,a):wk(uw(e),t,r,n,i,a,1);break}}}}function nOt(e){var t=e.prev,r=e,n=e.next;if(wh(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=i<a?i<o?i:o:a<o?a:o,f=s<l?s<u?s:u:l<u?l:u,h=i>a?i>o?i:o:a>o?a:o,d=s>l?s>u?s:u:l>u?l:u,v=n.next;v!==t;){if(v.x>=c&&v.x<=h&&v.y>=f&&v.y<=d&&v5(i,s,a,l,o,u,v.x,v.y)&&wh(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function aOt(e,t,r,n){var i=e.prev,a=e,o=e.next;if(wh(i,a,o)>=0)return!1;for(var s=i.x,l=a.x,u=o.x,c=i.y,f=a.y,h=o.y,d=s<l?s<u?s:u:l<u?l:u,v=c<f?c<h?c:h:f<h?f:h,m=s>l?s>u?s:u:l>u?l:u,b=c>f?c>h?c:h:f>h?f:h,p=xY(d,v,t,r,n),k=xY(m,b,t,r,n),M=e.prevZ,T=e.nextZ;M&&M.z>=p&&T&&T.z<=k;){if(M.x>=d&&M.x<=m&&M.y>=v&&M.y<=b&&M!==i&&M!==o&&v5(s,c,l,f,u,h,M.x,M.y)&&wh(M.prev,M,M.next)>=0||(M=M.prevZ,T.x>=d&&T.x<=m&&T.y>=v&&T.y<=b&&T!==i&&T!==o&&v5(s,c,l,f,u,h,T.x,T.y)&&wh(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;M&&M.z>=p;){if(M.x>=d&&M.x<=m&&M.y>=v&&M.y<=b&&M!==i&&M!==o&&v5(s,c,l,f,u,h,M.x,M.y)&&wh(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;T&&T.z<=k;){if(T.x>=d&&T.x<=m&&T.y>=v&&T.y<=b&&T!==i&&T!==o&&v5(s,c,l,f,u,h,T.x,T.y)&&wh(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function oOt(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!cz(i,a)&&A7e(i,n,n.next,a)&&Tk(i,a)&&Tk(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),Ak(n),Ak(n.next),n=e=a),n=n.next}while(n!==e);return uw(n)}function sOt(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&gOt(o,s)){var l=S7e(o,s);o=uw(o,o.next),l=uw(l,l.next),wk(o,t,r,n,i,a,0),wk(l,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function lOt(e,t,r,n){var i=[],a,o,s,l,u;for(a=0,o=t.length;a<o;a++)s=t[a]*n,l=a<o-1?t[a+1]*n:e.length,u=T7e(e,s,l,n,!1),u===u.next&&(u.steiner=!0),i.push(pOt(u));for(i.sort(uOt),a=0;a<i.length;a++)r=cOt(i[a],r);return r}function uOt(e,t){return e.x-t.x}function cOt(e,t){var r=fOt(e,t);if(!r)return t;var n=S7e(r,e);return uw(n,n.next),uw(r,r.next)}function fOt(e,t){var r=t,n=e.x,i=e.y,a=-1/0,o;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>a&&(a=s,o=r.x<r.next.x?r:r.next,s===n))return o}r=r.next}while(r!==t);if(!o)return null;var l=o,u=o.x,c=o.y,f=1/0,h;r=o;do n>=r.x&&r.x>=u&&n!==r.x&&v5(i<c?n:a,i,u,c,i<c?a:n,i,r.x,r.y)&&(h=Math.abs(i-r.y)/(n-r.x),Tk(r,e)&&(h<f||h===f&&(r.x>o.x||r.x===o.x&&hOt(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function hOt(e,t){return wh(e.prev,e,t.prev)<0&&wh(t.next,e,e.next)<0}function dOt(e,t,r,n){var i=e;do i.z===0&&(i.z=xY(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,vOt(i)}function vOt(e){var t,r,n,i,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t<u&&(s++,n=n.nextZ,!!n);t++);for(l=u;s>0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return e}function xY(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function pOt(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function v5(e,t,r,n,i,a,o,s){return(i-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function gOt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!mOt(e,t)&&(Tk(e,t)&&Tk(t,e)&&yOt(e,t)&&(wh(e.prev,e,t.prev)||wh(e,t.prev,t))||cz(e,t)&&wh(e.prev,e,e.next)>0&&wh(t.prev,t,t.next)>0)}function wh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function cz(e,t){return e.x===t.x&&e.y===t.y}function A7e(e,t,r,n){var i=lz(wh(e,t,r)),a=lz(wh(e,t,n)),o=lz(wh(r,n,e)),s=lz(wh(r,n,t));return!!(i!==a&&o!==s||i===0&&sz(e,r,t)||a===0&&sz(e,n,t)||o===0&&sz(r,e,n)||s===0&&sz(r,t,n))}function sz(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function lz(e){return e>0?1:e<0?-1:0}function mOt(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&&A7e(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Tk(e,t){return wh(e.prev,e,e.next)<0?wh(e,t,e.next)>=0&&wh(e,e.prev,t)>=0:wh(e,t,e.prev)<0||wh(e,e.next,t)<0}function yOt(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 S7e(e,t){var r=new bY(e.i,e.x,e.y),n=new bY(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function w7e(e,t,r,n){var i=new bY(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ak(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function bY(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}uz.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(wY(e,0,a,r));if(i)for(var s=0,l=t.length;s<l;s++){var u=t[s]*r,c=s<l-1?t[s+1]*r:e.length;o-=Math.abs(wY(e,u,c,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,d=n[s+1]*r,v=n[s+2]*r;f+=Math.abs((e[h]-e[v])*(e[d+1]-e[h+1])-(e[h]-e[d])*(e[v+1]-e[h+1]))}return o===0&&f===0?0:Math.abs((f-o)/o)};function wY(e,t,r,n){for(var i=0,a=t,o=r-n;a<r;a+=n)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}uz.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var o=0;o<t;o++)r.vertices.push(e[i][a][o]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var k7e=ye((Uyr,E7e)=>{"use strict";var _Ot=iw();E7e.exports=xOt;function xOt(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=_Ot(e,t));for(var n=0;n<t;n++){var i=r[t+n],a=r[n],o=n,s=e.length;if(i===1/0&&a===-1/0)for(o=n;o<s;o+=t)e[o]=e[o]===i?1:e[o]===a?0:.5;else if(i===1/0)for(o=n;o<s;o+=t)e[o]=e[o]===i?1:0;else if(a===-1/0)for(o=n;o<s;o+=t)e[o]=e[o]===a?0:1;else{var l=i-a;for(o=n;o<s;o+=t)isNaN(e[o])||(e[o]=l===0?.5:(e[o]-a)/l)}}return e}});var L7e=ye((Vyr,C7e)=>{"use strict";C7e.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 I7e=ye((Gyr,P7e)=>{"use strict";P7e.exports=function(){}});var mx=ye((Hyr,R7e)=>{"use strict";var bOt=I7e()();R7e.exports=function(e){return e!==bOt&&e!==null}});var AY=ye((jyr,F7e)=>{"use strict";var wOt=Object.create,TOt=Object.getPrototypeOf,D7e={};F7e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||wOt;return typeof e!="function"?!1:TOt(e(t(null),D7e))===D7e}});var SY=ye((Wyr,z7e)=>{"use strict";var AOt=mx(),SOt={function:!0,object:!0};z7e.exports=function(e){return AOt(e)&&SOt[typeof e]||!1}});var c1=ye((Xyr,q7e)=>{"use strict";var MOt=mx();q7e.exports=function(e){if(!MOt(e))throw new TypeError("Cannot use null or undefined");return e}});var B7e=ye((Zyr,O7e)=>{"use strict";var MY=Object.create,fz;AY()()||(fz=EY());O7e.exports=function(){var e,t,r;return!fz||fz.level!==1?MY:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n==="__proto__"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(fz,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return MY(n===null?e:n,i)})}()});var EY=ye((Yyr,N7e)=>{"use strict";var EOt=SY(),kOt=c1(),COt=Object.prototype.isPrototypeOf,LOt=Object.defineProperty,POt={configurable:!0,enumerable:!1,writable:!0,value:void 0},hz;hz=function(e,t){if(kOt(e),t===null||EOt(t))return e;throw new TypeError("Prototype must be null or an object")};N7e.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(hz(n,i),i),n}):t=function(n,i){return hz(n,i).__proto__=i,n}:t=function n(i,a){var o;return hz(i,a),o=COt.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&LOt(n.nullPolyfill,"__proto__",POt),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)}());B7e()});var dz=ye((Kyr,U7e)=>{"use strict";U7e.exports=AY()()?Object.setPrototypeOf:EY()});var G7e=ye((Jyr,V7e)=>{"use strict";var IOt=SY();V7e.exports=function(e){if(!IOt(e))throw new TypeError(e+" is not an Object");return e}});var j7e=ye(($yr,H7e)=>{"use strict";var ROt=Object.create(null),DOt=Math.random;H7e.exports=function(){var e;do e=DOt().toString(36).slice(2);while(ROt[e]);return e}});var cw=ye((Qyr,W7e)=>{"use strict";var FOt=void 0;W7e.exports=function(e){return e!==FOt&&e!==null}});var vz=ye((e1r,X7e)=>{"use strict";var zOt=cw(),qOt={object:!0,function:!0,undefined:!0};X7e.exports=function(e){return zOt(e)?hasOwnProperty.call(qOt,typeof e):!1}});var Y7e=ye((t1r,Z7e)=>{"use strict";var OOt=vz();Z7e.exports=function(e){if(!OOt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var J7e=ye((r1r,K7e)=>{"use strict";var BOt=Y7e();K7e.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!BOt(e)}});var kY=ye((i1r,$7e)=>{"use strict";var NOt=J7e(),UOt=/^\s*class[\s{/}]/,VOt=Function.prototype.toString;$7e.exports=function(e){return!(!NOt(e)||UOt.test(VOt.call(e)))}});var e9e=ye((n1r,Q7e)=>{"use strict";Q7e.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 r9e=ye((a1r,t9e)=>{"use strict";t9e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var n9e=ye((o1r,i9e)=>{"use strict";var GOt=mx(),HOt=Object.keys;i9e.exports=function(e){return HOt(GOt(e)?Object(e):e)}});var o9e=ye((s1r,a9e)=>{"use strict";a9e.exports=r9e()()?Object.keys:n9e()});var l9e=ye((l1r,s9e)=>{"use strict";var jOt=o9e(),WOt=c1(),XOt=Math.max;s9e.exports=function(e,t){var r,n,i=XOt(arguments.length,2),a;for(e=Object(WOt(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n<i;++n)t=arguments[n],jOt(t).forEach(a);if(r!==void 0)throw r;return e}});var pz=ye((u1r,u9e)=>{"use strict";u9e.exports=e9e()()?Object.assign:l9e()});var CY=ye((c1r,c9e)=>{"use strict";var ZOt=mx(),YOt=Array.prototype.forEach,KOt=Object.create,JOt=function(e,t){var r;for(r in e)t[r]=e[r]};c9e.exports=function(e){var t=KOt(null);return YOt.call(arguments,function(r){ZOt(r)&&JOt(Object(r),t)}),t}});var h9e=ye((f1r,f9e)=>{"use strict";var LY="razdwatrzy";f9e.exports=function(){return typeof LY.contains!="function"?!1:LY.contains("dwa")===!0&&LY.contains("foo")===!1}});var v9e=ye((h1r,d9e)=>{"use strict";var $Ot=String.prototype.indexOf;d9e.exports=function(e){return $Ot.call(this,e,arguments[1])>-1}});var PY=ye((d1r,p9e)=>{"use strict";p9e.exports=h9e()()?String.prototype.contains:v9e()});var f1=ye((v1r,_9e)=>{"use strict";var gz=cw(),g9e=kY(),m9e=pz(),y9e=CY(),Sk=PY(),QOt=_9e.exports=function(e,t){var r,n,i,a,o;return arguments.length<2||typeof e!="string"?(a=t,t=e,e=null):a=arguments[2],gz(e)?(r=Sk.call(e,"c"),n=Sk.call(e,"e"),i=Sk.call(e,"w")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?m9e(y9e(a),o):o};QOt.gs=function(e,t,r){var n,i,a,o;return typeof e!="string"?(a=r,r=t,t=e,e=null):a=arguments[3],gz(t)?g9e(t)?gz(r)?g9e(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,gz(e)?(n=Sk.call(e,"c"),i=Sk.call(e,"e")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?m9e(y9e(a),o):o}});var Mk=ye((p1r,b9e)=>{"use strict";var x9e=Object.prototype.toString,eBt=x9e.call(function(){return arguments}());b9e.exports=function(e){return x9e.call(e)===eBt}});var Ek=ye((g1r,T9e)=>{"use strict";var w9e=Object.prototype.toString,tBt=w9e.call("");T9e.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||w9e.call(e)===tBt)||!1}});var S9e=ye((m1r,A9e)=>{"use strict";A9e.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var k9e=ye((y1r,E9e)=>{var M9e=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};E9e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return M9e()}try{return __global__||M9e()}finally{delete Object.prototype.__global__}}()});var kk=ye((_1r,C9e)=>{"use strict";C9e.exports=S9e()()?globalThis:k9e()});var P9e=ye((x1r,L9e)=>{"use strict";var rBt=kk(),IY={object:!0,symbol:!0};L9e.exports=function(){var e=rBt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!IY[typeof e.iterator]||!IY[typeof e.toPrimitive]||!IY[typeof e.toStringTag])}});var R9e=ye((b1r,I9e)=>{"use strict";I9e.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var RY=ye((w1r,D9e)=>{"use strict";var iBt=R9e();D9e.exports=function(e){if(!iBt(e))throw new TypeError(e+" is not a symbol");return e}});var B9e=ye((T1r,O9e)=>{"use strict";var F9e=f1(),nBt=Object.create,z9e=Object.defineProperty,aBt=Object.prototype,q9e=nBt(null);O9e.exports=function(e){for(var t=0,r,n;q9e[e+(t||"")];)++t;return e+=t||"",q9e[e]=!0,r="@@"+e,z9e(aBt,r,F9e.gs(null,function(i){n||(n=!0,z9e(this,r,F9e(i)),n=!1)})),r}});var U9e=ye((A1r,N9e)=>{"use strict";var rm=f1(),Uh=kk().Symbol;N9e.exports=function(e){return Object.defineProperties(e,{hasInstance:rm("",Uh&&Uh.hasInstance||e("hasInstance")),isConcatSpreadable:rm("",Uh&&Uh.isConcatSpreadable||e("isConcatSpreadable")),iterator:rm("",Uh&&Uh.iterator||e("iterator")),match:rm("",Uh&&Uh.match||e("match")),replace:rm("",Uh&&Uh.replace||e("replace")),search:rm("",Uh&&Uh.search||e("search")),species:rm("",Uh&&Uh.species||e("species")),split:rm("",Uh&&Uh.split||e("split")),toPrimitive:rm("",Uh&&Uh.toPrimitive||e("toPrimitive")),toStringTag:rm("",Uh&&Uh.toStringTag||e("toStringTag")),unscopables:rm("",Uh&&Uh.unscopables||e("unscopables"))})}});var H9e=ye((S1r,G9e)=>{"use strict";var V9e=f1(),oBt=RY(),Ck=Object.create(null);G9e.exports=function(e){return Object.defineProperties(e,{for:V9e(function(t){return Ck[t]?Ck[t]:Ck[t]=e(String(t))}),keyFor:V9e(function(t){var r;oBt(t);for(r in Ck)if(Ck[r]===t)return r})})}});var X9e=ye((M1r,W9e)=>{"use strict";var ty=f1(),DY=RY(),mz=kk().Symbol,sBt=B9e(),lBt=U9e(),uBt=H9e(),cBt=Object.create,FY=Object.defineProperties,yz=Object.defineProperty,Xv,p5,j9e;if(typeof mz=="function")try{String(mz()),j9e=!0}catch(e){}else mz=null;p5=function(t){if(this instanceof p5)throw new TypeError("Symbol is not a constructor");return Xv(t)};W9e.exports=Xv=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return j9e?mz(t):(r=cBt(p5.prototype),t=t===void 0?"":String(t),FY(r,{__description__:ty("",t),__name__:ty("",sBt(t))}))};lBt(Xv);uBt(Xv);FY(p5.prototype,{constructor:ty(Xv),toString:ty("",function(){return this.__name__})});FY(Xv.prototype,{toString:ty(function(){return"Symbol ("+DY(this).__description__+")"}),valueOf:ty(function(){return DY(this)})});yz(Xv.prototype,Xv.toPrimitive,ty("",function(){var e=DY(this);return typeof e=="symbol"?e:e.toString()}));yz(Xv.prototype,Xv.toStringTag,ty("c","Symbol"));yz(p5.prototype,Xv.toStringTag,ty("c",Xv.prototype[Xv.toStringTag]));yz(p5.prototype,Xv.toPrimitive,ty("c",Xv.prototype[Xv.toPrimitive]))});var yx=ye((E1r,Z9e)=>{"use strict";Z9e.exports=P9e()()?kk().Symbol:X9e()});var K9e=ye((k1r,Y9e)=>{"use strict";var fBt=c1();Y9e.exports=function(){return fBt(this).length=0,this}});var g5=ye((C1r,J9e)=>{"use strict";J9e.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var Q9e=ye((L1r,$9e)=>{"use strict";var hBt=cw(),dBt=vz(),vBt=Object.prototype.toString;$9e.exports=function(e){if(!hBt(e))return null;if(dBt(e)){var t=e.toString;if(typeof t!="function"||t===vBt)return null}try{return""+e}catch(r){return null}}});var tqe=ye((P1r,eqe)=>{"use strict";eqe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var iqe=ye((I1r,rqe)=>{"use strict";var pBt=tqe(),gBt=/[\n\r\u2028\u2029]/g;rqe.exports=function(e){var t=pBt(e);return t===null?"<Non-coercible to string value>":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(gBt,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 zY=ye((R1r,oqe)=>{"use strict";var nqe=cw(),mBt=vz(),yBt=Q9e(),_Bt=iqe(),aqe=function(e,t){return e.replace("%v",_Bt(t))};oqe.exports=function(e,t,r){if(!mBt(r))throw new TypeError(aqe(t,e));if(!nqe(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=yBt(r.errorMessage);throw nqe(n)||(n=t),new TypeError(aqe(n,e))}});var lqe=ye((D1r,sqe)=>{"use strict";var xBt=zY(),bBt=cw();sqe.exports=function(e){return bBt(e)?e:xBt(e,"Cannot use %v",arguments[1])}});var cqe=ye((F1r,uqe)=>{"use strict";var wBt=zY(),TBt=kY();uqe.exports=function(e){return TBt(e)?e:wBt(e,"%v is not a plain function",arguments[1])}});var hqe=ye((z1r,fqe)=>{"use strict";fqe.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 vqe=ye((q1r,dqe)=>{"use strict";var ABt=Object.prototype.toString,SBt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);dqe.exports=function(e){return typeof e=="function"&&SBt(ABt.call(e))}});var gqe=ye((O1r,pqe)=>{"use strict";pqe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var yqe=ye((B1r,mqe)=>{"use strict";mqe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var xqe=ye((N1r,_qe)=>{"use strict";_qe.exports=gqe()()?Math.sign:yqe()});var wqe=ye((U1r,bqe)=>{"use strict";var MBt=xqe(),EBt=Math.abs,kBt=Math.floor;bqe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:MBt(e)*kBt(EBt(e)))}});var Aqe=ye((V1r,Tqe)=>{"use strict";var CBt=wqe(),LBt=Math.max;Tqe.exports=function(e){return LBt(0,CBt(e))}});var kqe=ye((G1r,Eqe)=>{"use strict";var PBt=yx().iterator,IBt=Mk(),RBt=vqe(),DBt=Aqe(),Sqe=g5(),FBt=c1(),zBt=mx(),qBt=Ek(),Mqe=Array.isArray,qY=Function.prototype.call,fw={configurable:!0,enumerable:!0,writable:!0,value:null},OY=Object.defineProperty;Eqe.exports=function(e){var t=arguments[1],r=arguments[2],n,i,a,o,s,l,u,c,f,h;if(e=Object(FBt(e)),zBt(t)&&Sqe(t),!this||this===Array||!RBt(this)){if(!t){if(IBt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(Mqe(e)){for(o=new Array(s=e.length),i=0;i<s;++i)o[i]=e[i];return o}}o=[]}else n=this;if(!Mqe(e)){if((f=e[PBt])!==void 0){for(u=Sqe(f).call(e),n&&(o=new n),c=u.next(),i=0;!c.done;)h=t?qY.call(t,r,c.value,i):c.value,n?(fw.value=h,OY(o,i,fw)):o[i]=h,c=u.next(),++i;s=i}else if(qBt(e)){for(s=e.length,n&&(o=new n),i=0,a=0;i<s;++i)h=e[i],i+1<s&&(l=h.charCodeAt(0),l>=55296&&l<=56319&&(h+=e[++i])),h=t?qY.call(t,r,h,a):h,n?(fw.value=h,OY(o,a,fw)):o[a]=h,++a;s=a}}if(s===void 0)for(s=DBt(e.length),n&&(o=new n(s)),i=0;i<s;++i)h=t?qY.call(t,r,e[i],i):e[i],n?(fw.value=h,OY(o,i,fw)):o[i]=h;return n&&(fw.value=null,o.length=s),o}});var Lqe=ye((H1r,Cqe)=>{"use strict";Cqe.exports=hqe()()?Array.from:kqe()});var Iqe=ye((j1r,Pqe)=>{"use strict";var OBt=Lqe(),BBt=pz(),NBt=c1();Pqe.exports=function(e){var t=Object(NBt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var i={};return r?OBt(r,function(a){(n.ensure||a in e)&&(i[a]=e[a])}):BBt(i,e),i}});var Fqe=ye((W1r,Dqe)=>{"use strict";var UBt=g5(),VBt=c1(),GBt=Function.prototype.bind,Rqe=Function.prototype.call,HBt=Object.keys,jBt=Object.prototype.propertyIsEnumerable;Dqe.exports=function(e,t){return function(r,n){var i,a=arguments[2],o=arguments[3];return r=Object(VBt(r)),UBt(n),i=HBt(r),o&&i.sort(typeof o=="function"?GBt.call(o,r):void 0),typeof e!="function"&&(e=i[e]),Rqe.call(e,i,function(s,l){return jBt.call(r,s)?Rqe.call(n,a,r[s],s,r,l):t})}}});var qqe=ye((X1r,zqe)=>{"use strict";zqe.exports=Fqe()("forEach")});var Bqe=ye((Z1r,Oqe)=>{"use strict";var WBt=g5(),XBt=qqe(),ZBt=Function.prototype.call;Oqe.exports=function(e,t){var r={},n=arguments[2];return WBt(t),XBt(e,function(i,a,o,s){r[a]=ZBt.call(t,n,i,a,o,s)}),r}});var Gqe=ye((Y1r,Vqe)=>{"use strict";var YBt=cw(),KBt=lqe(),Nqe=cqe(),JBt=Iqe(),$Bt=CY(),QBt=Bqe(),eNt=Function.prototype.bind,tNt=Object.defineProperty,rNt=Object.prototype.hasOwnProperty,Uqe;Uqe=function(e,t,r){var n=KBt(t)&&Nqe(t.value),i;return i=JBt(t),delete i.writable,delete i.value,i.get=function(){return!r.overwriteDefinition&&rNt.call(this,e)?n:(t.value=eNt.call(n,r.resolveContext?r.resolveContext(this):this),tNt(this,e,t),this[e])},i};Vqe.exports=function(e){var t=$Bt(arguments[1]);return YBt(t.resolveContext)&&Nqe(t.resolveContext),QBt(e,function(r,n){return Uqe(n,r,t)})}});var BY=ye((K1r,Xqe)=>{"use strict";var iNt=K9e(),nNt=pz(),aNt=g5(),oNt=c1(),Op=f1(),sNt=Gqe(),Hqe=yx(),jqe=Object.defineProperty,Wqe=Object.defineProperties,Lk;Xqe.exports=Lk=function(e,t){if(!(this instanceof Lk))throw new TypeError("Constructor requires 'new'");Wqe(this,{__list__:Op("w",oNt(e)),__context__:Op("w",t),__nextIndex__:Op("w",0)}),t&&(aNt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete Lk.prototype.constructor;Wqe(Lk.prototype,nNt({_next:Op(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:Op(function(){return this._createResult(this._next())}),_createResult:Op(function(e){return e===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(e)}}),_resolve:Op(function(e){return this.__list__[e]}),_unBind:Op(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:Op(function(){return"[object "+(this[Hqe.toStringTag]||"Object")+"]"})},sNt({_onAdd:Op(function(e){if(!(e>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){jqe(this,"__redo__",Op("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:Op(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:Op(function(){this.__redo__&&iNt.call(this.__redo__),this.__nextIndex__=0})})));jqe(Lk.prototype,Hqe.iterator,Op(function(){return this}))});var $qe=ye((J1r,Jqe)=>{"use strict";var Zqe=dz(),Yqe=PY(),NY=f1(),lNt=yx(),UY=BY(),Kqe=Object.defineProperty,m5;m5=Jqe.exports=function(e,t){if(!(this instanceof m5))throw new TypeError("Constructor requires 'new'");UY.call(this,e),t?Yqe.call(t,"key+value")?t="key+value":Yqe.call(t,"key")?t="key":t="value":t="value",Kqe(this,"__kind__",NY("",t))};Zqe&&Zqe(m5,UY);delete m5.prototype.constructor;m5.prototype=Object.create(UY.prototype,{_resolve:NY(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});Kqe(m5.prototype,lNt.toStringTag,NY("c","Array Iterator"))});var rOe=ye(($1r,tOe)=>{"use strict";var Qqe=dz(),_z=f1(),uNt=yx(),VY=BY(),eOe=Object.defineProperty,y5;y5=tOe.exports=function(e){if(!(this instanceof y5))throw new TypeError("Constructor requires 'new'");e=String(e),VY.call(this,e),eOe(this,"__length__",_z("",e.length))};Qqe&&Qqe(y5,VY);delete y5.prototype.constructor;y5.prototype=Object.create(VY.prototype,{_next:_z(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:_z(function(e){var t=this.__list__[e],r;return this.__nextIndex__===this.__length__?t:(r=t.charCodeAt(0),r>=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});eOe(y5.prototype,uNt.toStringTag,_z("c","String Iterator"))});var nOe=ye((Q1r,iOe)=>{"use strict";var cNt=Mk(),fNt=mx(),hNt=Ek(),dNt=yx().iterator,vNt=Array.isArray;iOe.exports=function(e){return fNt(e)?vNt(e)||hNt(e)||cNt(e)?!0:typeof e[dNt]=="function":!1}});var oOe=ye((e_r,aOe)=>{"use strict";var pNt=nOe();aOe.exports=function(e){if(!pNt(e))throw new TypeError(e+" is not iterable");return e}});var GY=ye((t_r,uOe)=>{"use strict";var gNt=Mk(),mNt=Ek(),sOe=$qe(),yNt=rOe(),_Nt=oOe(),lOe=yx().iterator;uOe.exports=function(e){return typeof _Nt(e)[lOe]=="function"?e[lOe]():gNt(e)?new sOe(e):mNt(e)?new yNt(e):new sOe(e)}});var fOe=ye((r_r,cOe)=>{"use strict";var xNt=Mk(),bNt=g5(),wNt=Ek(),TNt=GY(),ANt=Array.isArray,HY=Function.prototype.call,SNt=Array.prototype.some;cOe.exports=function(e,t){var r,n=arguments[2],i,a,o,s,l,u,c;if(ANt(e)||xNt(e)?r="array":wNt(e)?r="string":e=TNt(e),bNt(t),a=function(){o=!0},r==="array"){SNt.call(e,function(f){return HY.call(t,n,f,a),o});return}if(r==="string"){for(l=e.length,s=0;s<l&&(u=e[s],s+1<l&&(c=u.charCodeAt(0),c>=55296&&c<=56319&&(u+=e[++s])),HY.call(t,n,u,a),!o);++s);return}for(i=e.next();!i.done;){if(HY.call(t,n,i.value,a),o)return;i=e.next()}}});var dOe=ye((i_r,hOe)=>{"use strict";hOe.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()});var gOe=ye((n_r,pOe)=>{"use strict";var MNt=mx(),bz=dz(),xz=G7e(),ENt=c1(),kNt=j7e(),h1=f1(),CNt=GY(),LNt=fOe(),PNt=yx().toStringTag,vOe=dOe(),INt=Array.isArray,WY=Object.defineProperty,jY=Object.prototype.hasOwnProperty,RNt=Object.getPrototypeOf,_x;pOe.exports=_x=function(){var e=arguments[0],t;if(!(this instanceof _x))throw new TypeError("Constructor requires 'new'");return t=vOe&&bz&&WeakMap!==_x?bz(new WeakMap,RNt(this)):this,MNt(e)&&(INt(e)||(e=CNt(e))),WY(t,"__weakMapData__",h1("c","$weakMap$"+kNt())),e&&LNt(e,function(r){ENt(r),t.set(r[0],r[1])}),t};vOe&&(bz&&bz(_x,WeakMap),_x.prototype=Object.create(WeakMap.prototype,{constructor:h1(_x)}));Object.defineProperties(_x.prototype,{delete:h1(function(e){return jY.call(xz(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:h1(function(e){if(jY.call(xz(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:h1(function(e){return jY.call(xz(e),this.__weakMapData__)}),set:h1(function(e,t){return WY(xz(e),this.__weakMapData__,h1("c",t)),this}),toString:h1(function(){return"[object WeakMap]"})});WY(_x.prototype,PNt,h1("c","WeakMap"))});var XY=ye((a_r,mOe)=>{"use strict";mOe.exports=L7e()()?WeakMap:gOe()});var _Oe=ye((o_r,yOe)=>{"use strict";yOe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var n=Object(e),i=n.length;if(i===0)return-1;for(var a=0;a<i;a++)if(t.call(r,n[a],a,n))return a;return-1}});var KY=ye((s_r,wOe)=>{"use strict";var wz=ox(),DNt=iw(),YY=Nh(),FNt=ey(),zNt=nw(),xOe=M7e(),qNt=k7e(),{float32:ONt,fract32:ZY}=nz(),BNt=XY(),bOe=s5(),NNt=_Oe(),UNt=`
|
||
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.;
|
||
}
|
||
`,VNt=`
|
||
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;
|
||
}
|
||
`,GNt=`
|
||
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;
|
||
}
|
||
`,HNt=`
|
||
precision highp float;
|
||
varying vec4 fragColor;
|
||
|
||
void main() {
|
||
gl_FragColor = fragColor;
|
||
}
|
||
`,jNt=`
|
||
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;
|
||
}
|
||
}
|
||
}
|
||
`,WNt=`
|
||
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;
|
||
}
|
||
`;wOe.exports=Wc;function Wc(e,t){if(!(this instanceof Wc))return new Wc(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=Wc.shaders.has(e)?Wc.shaders.get(e):Wc.shaders.set(e,Wc.createShaders(e)).get(e),this.update(t)}Wc.dashMult=2;Wc.maxPatternLength=256;Wc.precisionThreshold=3e6;Wc.maxPoints=1e4;Wc.maxLines=2048;Wc.shaders=new BNt;Wc.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},n=e(YY({vert:UNt,frag:VNt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),i;try{i=e(YY({cull:{enable:!0,face:"back"},vert:jNt,frag:WNt,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:GNt,frag:HNt,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:i}};Wc.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null};Wc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};Wc.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>Wc.precisionThreshold||t.scale[1]*t.viewport.height>Wc.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=Wc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};Wc.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((i,a)=>{let o=this.passes[a];if(i!==void 0){if(i===null){this.passes[a]=null;return}if(typeof i[0]=="number"&&(i={positions:i}),i=FNt(i,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[a]=o={id:a,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},i=YY({},Wc.defaults,i)),i.thickness!=null&&(o.thickness=parseFloat(i.thickness)),i.opacity!=null&&(o.opacity=parseFloat(i.opacity)),i.miterLimit!=null&&(o.miterLimit=parseFloat(i.miterLimit)),i.overlay!=null&&(o.overlay=!!i.overlay,a<Wc.maxLines&&(o.depth=2*(Wc.maxLines-1-a%Wc.maxLines)/Wc.maxLines-1)),i.join!=null&&(o.join=i.join),i.hole!=null&&(o.hole=i.hole),i.fill!=null&&(o.fill=i.fill?wz(i.fill,"uint8"):null),i.viewport!=null&&(o.viewport=bOe(i.viewport)),o.viewport||(o.viewport=bOe([r.drawingBufferWidth,r.drawingBufferHeight])),i.close!=null&&(o.close=i.close),i.positions===null&&(i.positions=[]),i.positions){let u,c;if(i.positions.x&&i.positions.y){let v=i.positions.x,m=i.positions.y;c=o.count=Math.max(v.length,m.length),u=new Float64Array(c*2);for(let b=0;b<c;b++)u[b*2]=v[b],u[b*2+1]=m[b]}else u=zNt(i.positions,"float64"),c=o.count=Math.floor(u.length/2);let f=o.bounds=DNt(u,2);if(o.fill){let v=[],m={},b=0;for(let p=0,k=0,M=o.count;p<M;p++){let T=u[p*2],L=u[p*2+1];isNaN(T)||isNaN(L)||T==null||L==null?(T=u[b*2],L=u[b*2+1],m[p]=b):b=p,v[k++]=T,v[k++]=L}if(i.splitNull){o.count-1 in m||(m[o.count]=o.count-1);let p=Object.keys(m).map(Number).sort((L,x)=>L-x),k=[],M=0,T=o.hole!=null?o.hole[0]:null;if(T!=null){let L=NNt(p,x=>x>=T);p=p.slice(0,L),p.push(T)}for(let L=0;L<p.length;L++){let x=v.slice(M*2,p[L]*2).concat(T?v.slice(T*2):[]),C=(o.hole||[]).map(g=>g-T+(p[L]-M)),S=xOe(x,C);S=S.map(g=>g+M+(g+M<p[L]?0:T-p[L])),k.push(...S),M=p[L]+1}for(let L=0,x=k.length;L<x;L++)m[k[L]]!=null&&(k[L]=m[k[L]]);o.triangles=k}else{let p=xOe(v,o.hole||[]);for(let k=0,M=p.length;k<M;k++)m[p[k]]!=null&&(p[k]=m[p[k]]);o.triangles=p}}let h=new Float64Array(u);qNt(h,2,f);let d=new Float64Array(c*2+6);o.close?u[0]===u[c*2-2]&&u[1]===u[c*2-1]?(d[0]=h[c*2-4],d[1]=h[c*2-3]):(d[0]=h[c*2-2],d[1]=h[c*2-1]):(d[0]=h[0],d[1]=h[1]),d.set(h,2),o.close?u[0]===u[c*2-2]&&u[1]===u[c*2-1]?(d[c*2+2]=h[2],d[c*2+3]=h[3],o.count-=1):(d[c*2+2]=h[0],d[c*2+3]=h[1],d[c*2+4]=h[2],d[c*2+5]=h[3]):(d[c*2+2]=h[c*2-2],d[c*2+3]=h[c*2-1],d[c*2+4]=h[c*2-2],d[c*2+5]=h[c*2-1]);var s=ONt(d);o.positionBuffer(s);var l=ZY(d,s);o.positionFractBuffer(l)}if(i.range?o.range=i.range:o.range||(o.range=o.bounds),(i.range||i.positions)&&o.count){let u=o.bounds,c=u[2]-u[0],f=u[3]-u[1],h=o.range[2]-o.range[0],d=o.range[3]-o.range[1];o.scale=[c/h,f/d],o.translate=[-o.range[0]/h+u[0]/h||0,-o.range[1]/d+u[1]/d||0],o.scaleFract=ZY(o.scale),o.translateFract=ZY(o.translate)}if(i.dashes){let u=0,c;if(!i.dashes||i.dashes.length<2)u=1,c=new Uint8Array([255,255,255,255,255,255,255,255]);else{u=0;for(let d=0;d<i.dashes.length;++d)u+=i.dashes[d];c=new Uint8Array(u*Wc.dashMult);let f=0,h=255;for(let d=0;d<2;d++)for(let v=0;v<i.dashes.length;++v){for(let m=0,b=i.dashes[v]*Wc.dashMult*.5;m<b;++m)c[f++]=h;h^=255}}o.dashLength=u,o.dashTexture({channels:1,data:c,width:c.length,height:1,mag:"linear",min:"linear"},0,0)}if(i.color){let u=o.count,c=i.color;c||(c="transparent");let f=new Uint8Array(u*4+4);if(!Array.isArray(c)||typeof c[0]=="number"){let h=wz(c,"uint8");for(let d=0;d<u+1;d++)f.set(h,d*4)}else{for(let h=0;h<u;h++){let d=wz(c[h],"uint8");f.set(d,h*4)}f.set(wz(c[0],"uint8"),u*4)}o.colorBuffer({usage:"dynamic",type:"uint8",data:f})}}}),e.length<this.passes.length){for(let i=e.length;i<this.passes.length;i++){let a=this.passes[i];a&&(a.colorBuffer.destroy(),a.positionBuffer.destroy(),a.dashTexture.destroy())}this.passes.length=e.length}let n=[];for(let i=0;i<this.passes.length;i++)this.passes[i]!==null&&n.push(this.passes[i]);return this.passes=n,this};Wc.prototype.destroy=function(){return this.passes.forEach(e=>{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var EOe=ye((l_r,MOe)=>{"use strict";var XNt=iw(),ZNt=ox(),YNt=mY(),KNt=ey(),TOe=Nh(),AOe=nw(),{float32:JNt,fract32:JY}=nz();MOe.exports=$Nt;var SOe=[[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 $Nt(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,n,i,a,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:SOe}),v(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,p)=>[p.viewport.x,p.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,p)=>p.offset*4,divisor:1},position:{buffer:i,offset:(b,p)=>p.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,p)=>p.offset*8,divisor:1},error:{buffer:s,offset:(b,p)=>p.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:SOe.length}),TOe(f,{update:v,draw:h,destroy:m,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(b){b?v(b):b===null&&m(),h()}function h(b){if(typeof b=="number")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),c.forEach((p,k)=>{if(p){if(b&&(b[k]?p.draw=!0:p.draw=!1),!p.draw){p.draw=!0;return}d(k)}})}function d(b){typeof b=="number"&&(b=c[b]),b!=null&&b&&b.count&&b.color&&b.opacity&&b.positions&&b.positions.length>1&&(b.scaleRatio=[b.scale[0]*b.viewport.width,b.scale[1]*b.viewport.height],n(b),b.after&&b.after(b))}function v(b){if(!b)return;b.length!=null?typeof b[0]=="number"&&(b=[{positions:b}]):Array.isArray(b)||(b=[b]);let p=0,k=0;if(f.groups=c=b.map((L,x)=>{let C=c[x];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return C;return L=KNt(L,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),C||(c[x]=C={id:x,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=TOe({},u,L)),YNt(C,L,[{lineWidth:S=>+S*.5,capSize:S=>+S*.5,opacity:parseFloat,errors:S=>(S=AOe(S),k+=S.length,S),positions:(S,g)=>(S=AOe(S,"float64"),g.count=Math.floor(S.length/2),g.bounds=XNt(S,2),g.offset=p,p+=g.count,S)},{color:(S,g)=>{let P=g.count;if(S||(S="transparent"),!Array.isArray(S)||typeof S[0]=="number"){let z=S;S=Array(P);for(let q=0;q<P;q++)S[q]=z}if(S.length<P)throw Error("Not enough colors");let E=new Uint8Array(P*4);for(let z=0;z<P;z++){let q=ZNt(S[z],"uint8");E.set(q,z*4)}return E},range:(S,g,P)=>{let E=g.bounds;return S||(S=E),g.scale=[1/(S[2]-S[0]),1/(S[3]-S[1])],g.translate=[-S[0],-S[1]],g.scaleFract=JY(g.scale),g.translateFract=JY(g.translate),S},viewport:S=>{let g;return Array.isArray(S)?g={x:S[0],y:S[1],width:S[2]-S[0],height:S[3]-S[1]}:S?(g={x:S.x||S.left||0,y:S.y||S.top||0},S.right?g.width=S.right-g.x:g.width=S.w||S.width||0,S.bottom?g.height=S.bottom-g.y:g.height=S.h||S.height||0):g={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},g}}]),C}),p||k){let L=c.reduce((g,P,E)=>g+(P?P.count:0),0),x=new Float64Array(L*2),C=new Uint8Array(L*4),S=new Float32Array(L*4);c.forEach((g,P)=>{if(!g)return;let{positions:E,count:z,offset:q,color:U,errors:G}=g;z&&(C.set(U,q*4),S.set(G,q*4),x.set(E,q*2))});var M=JNt(x);i(M);var T=JY(x,M);a(T),o(C),s(S)}}function m(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var LOe=ye((u_r,COe)=>{var kOe=/[\'\"]/;COe.exports=function(t){return t?(kOe.test(t.charAt(0))&&(t=t.substr(1)),kOe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var $Y=ye((c_r,QNt)=>{QNt.exports=["inherit","initial","unset"]});var QY=ye((f_r,eUt)=>{eUt.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var eK=ye((h_r,tUt)=>{tUt.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var tK=ye((d_r,rUt)=>{rUt.exports=["normal","italic","oblique"]});var rK=ye((v_r,iUt)=>{iUt.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var DOe=ye((p_r,ROe)=>{"use strict";function POe(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",a=!!t.flat;n.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(h,d,v){var m=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(m),i+m+i}r.forEach(function(h,d){for(var v,m=0;h!=v;)if(v=h,h=h.replace(u,f),m++>1e4)throw Error("References have circular dependency. Please, check them.");r[d]=h}),c=c.reverse(),r=r.map(function(h){return c.forEach(function(d){h=h.replace(new RegExp("(\\"+i+d+"\\"+i+")","g"),l[0]+"$1"+l[1])}),h})});var o=new RegExp("\\"+i+"([0-9]+)\\"+i);function s(l,u,c){for(var f=[],h,d=0;h=o.exec(l);){if(d++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,h.index)),f.push(s(u[h[1]],u)),l=l.slice(h.index+h[0].length)}return f.push(l),f}return a?r:s(r[0],r)}function IOe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],i;if(!n)return"";for(var a=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;n!=i;){if(o++>1e4)throw Error("Circular references in "+e);i=n,n=n.replace(a,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function iK(e,t){return Array.isArray(e)?IOe(e,t):POe(e,t)}iK.parse=POe;iK.stringify=IOe;ROe.exports=iK});var qOe=ye((g_r,zOe)=>{"use strict";var FOe=DOe();zOe.exports=function(t,r,n){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");n?(typeof n=="string"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof n.ignore=="string"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var i=FOe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],l=0;l<o.length;l++){var u=o[l],c=o[l+1];u[u.length-1]==="\\"&&u[u.length-2]!=="\\"?(s.push(u+r+c),l++):s.push(u)}o=s}for(var l=0;l<o.length;l++)i[0]=o[l],o[l]=FOe.stringify(i,{flat:!0});return o}});var OOe=ye((m_r,nUt)=>{nUt.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var nK=ye((y_r,BOe)=>{"use strict";var aUt=OOe();BOe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||aUt.indexOf(t)!==-1}}});var GOe=ye((__r,VOe)=>{"use strict";var oUt=LOe(),sUt=$Y(),lUt=QY(),uUt=eK(),cUt=tK(),fUt=rK(),aK=qOe(),hUt=nK().isSize;VOe.exports=UOe;var Pk=UOe.cache={};function UOe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(Pk[e])return Pk[e];if(e==="")throw new Error("Cannot parse an empty string.");if(lUt.indexOf(e)!==-1)return Pk[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=aK(e,/\s+/),n;n=r.shift();){if(sUt.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=n}),Pk[e]=t;if(cUt.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(fUt.indexOf(n)!==-1){t.stretch=n;continue}if(uUt.indexOf(n)!==-1){t.weight=n;continue}if(hUt(n)){var i=aK(n,"/");if(t.size=i[0],i[1]!=null?t.lineHeight=NOe(i[1]):r[0]==="/"&&(r.shift(),t.lineHeight=NOe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=aK(r.join(" "),/\s*,\s*/).map(oUt),Pk[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function NOe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var sK=ye((x_r,HOe)=>{"use strict";var dUt=ey(),vUt=nK().isSize,pUt=Rk($Y()),gUt=Rk(QY()),mUt=Rk(eK()),yUt=Rk(tK()),_Ut=Rk(rK()),xUt={normal:1,"small-caps":1},bUt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},oK={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};HOe.exports=function(t){if(t=dUt(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),t.system)return t.system&&Ik(t.system,gUt),t.system;if(Ik(t.style,yUt),Ik(t.variant,xUt),Ik(t.weight,mUt),Ik(t.stretch,_Ut),t.size==null&&(t.size=oK.size),typeof t.size=="number"&&(t.size+="px"),!vUt)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=oK.family),Array.isArray(t.family)&&(t.family.length||(t.family=[oK.family]),t.family=t.family.map(function(n){return bUt[n]?n:'"'+n+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function Ik(e,t){if(e&&!t[e]&&!pUt[e])throw Error("Unknown keyword `"+e+"`");return e}function Rk(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=1;return t}});var WOe=ye((b_r,jOe)=>{"use strict";jOe.exports={parse:GOe(),stringify:sK()}});var XOe=ye((lK,uK)=>{(function(e,t){typeof lK=="object"&&typeof uK!="undefined"?uK.exports=t():e.createREGL=t()})(lK,function(){"use strict";var e=function(Me,bt){for(var Ot=Object.keys(bt),Lr=0;Lr<Ot.length;++Lr)Me[Ot[Lr]]=bt[Ot[Lr]];return Me},t=0,r=0,n=5,i=6;function a(Me,bt){this.id=t++,this.type=Me,this.data=bt}function o(Me){return Me.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function s(Me){if(Me.length===0)return[];var bt=Me.charAt(0),Ot=Me.charAt(Me.length-1);if(Me.length>1&&bt===Ot&&(bt==='"'||bt==="'"))return['"'+o(Me.substr(1,Me.length-2))+'"'];var Lr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Me);if(Lr)return s(Me.substr(0,Lr.index)).concat(s(Lr[1])).concat(s(Me.substr(Lr.index+Lr[0].length)));var Vr=Me.split(".");if(Vr.length===1)return['"'+o(Me)+'"'];for(var Or=[],Nr=0;Nr<Vr.length;++Nr)Or=Or.concat(s(Vr[Nr]));return Or}function l(Me){return"["+s(Me).join("][")+"]"}function u(Me,bt){return new a(Me,l(bt+""))}function c(Me){return typeof Me=="function"&&!Me._reglType||Me instanceof a}function f(Me,bt){if(typeof Me=="function")return new a(r,Me);if(typeof Me=="number"||typeof Me=="boolean")return new a(n,Me);if(Array.isArray(Me))return new a(i,Me.map(function(Ot,Lr){return f(Ot,bt+"["+Lr+"]")}));if(Me instanceof a)return Me}var h={DynamicVariable:a,define:u,isDynamic:c,unbox:f,accessor:l},d={next:typeof requestAnimationFrame=="function"?function(Me){return requestAnimationFrame(Me)}:function(Me){return setTimeout(Me,16)},cancel:typeof cancelAnimationFrame=="function"?function(Me){return cancelAnimationFrame(Me)}:clearTimeout},v=typeof performance!="undefined"&&performance.now?function(){return performance.now()}:function(){return+new Date};function m(){var Me={"":0},bt=[""];return{id:function(Ot){var Lr=Me[Ot];return Lr||(Lr=Me[Ot]=bt.length,bt.push(Ot),Lr)},str:function(Ot){return bt[Ot]}}}function b(Me,bt,Ot){var Lr=document.createElement("canvas");e(Lr.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),Me.appendChild(Lr),Me===document.body&&(Lr.style.position="absolute",e(Me.style,{margin:0,padding:0}));function Vr(){var vi=window.innerWidth,Ni=window.innerHeight;if(Me!==document.body){var qi=Lr.getBoundingClientRect();vi=qi.right-qi.left,Ni=qi.bottom-qi.top}Lr.width=Ot*vi,Lr.height=Ot*Ni}var Or;Me!==document.body&&typeof ResizeObserver=="function"?(Or=new ResizeObserver(function(){setTimeout(Vr)}),Or.observe(Me)):window.addEventListener("resize",Vr,!1);function Nr(){Or?Or.disconnect():window.removeEventListener("resize",Vr),Me.removeChild(Lr)}return Vr(),{canvas:Lr,onDestroy:Nr}}function p(Me,bt){function Ot(Lr){try{return Me.getContext(Lr,bt)}catch(Vr){return null}}return Ot("webgl")||Ot("experimental-webgl")||Ot("webgl-experimental")}function k(Me){return typeof Me.nodeName=="string"&&typeof Me.appendChild=="function"&&typeof Me.getBoundingClientRect=="function"}function M(Me){return typeof Me.drawArrays=="function"||typeof Me.drawElements=="function"}function T(Me){return typeof Me=="string"?Me.split():Me}function L(Me){return typeof Me=="string"?document.querySelector(Me):Me}function x(Me){var bt=Me||{},Ot,Lr,Vr,Or,Nr={},vi=[],Ni=[],qi=typeof window=="undefined"?1:window.devicePixelRatio,Si=!1,Vn={},Qi=function(Tr){},ji=function(){};if(typeof bt=="string"?Ot=document.querySelector(bt):typeof bt=="object"&&(k(bt)?Ot=bt:M(bt)?(Or=bt,Vr=Or.canvas):("gl"in bt?Or=bt.gl:"canvas"in bt?Vr=L(bt.canvas):"container"in bt&&(Lr=L(bt.container)),"attributes"in bt&&(Nr=bt.attributes),"extensions"in bt&&(vi=T(bt.extensions)),"optionalExtensions"in bt&&(Ni=T(bt.optionalExtensions)),"onDone"in bt&&(Qi=bt.onDone),"profile"in bt&&(Si=!!bt.profile),"pixelRatio"in bt&&(qi=+bt.pixelRatio),"cachedCode"in bt&&(Vn=bt.cachedCode))),Ot&&(Ot.nodeName.toLowerCase()==="canvas"?Vr=Ot:Lr=Ot),!Or){if(!Vr){var oi=b(Lr||document.body,Qi,qi);if(!oi)return null;Vr=oi.canvas,ji=oi.onDestroy}Nr.premultipliedAlpha===void 0&&(Nr.premultipliedAlpha=!0),Or=p(Vr,Nr)}return Or?{gl:Or,canvas:Vr,container:Lr,extensions:vi,optionalExtensions:Ni,pixelRatio:qi,profile:Si,cachedCode:Vn,onDone:Qi,onDestroy:ji}:(ji(),Qi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function C(Me,bt){var Ot={};function Lr(Nr){var vi=Nr.toLowerCase(),Ni;try{Ni=Ot[vi]=Me.getExtension(vi)}catch(qi){}return!!Ni}for(var Vr=0;Vr<bt.extensions.length;++Vr){var Or=bt.extensions[Vr];if(!Lr(Or))return bt.onDestroy(),bt.onDone('"'+Or+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return bt.optionalExtensions.forEach(Lr),{extensions:Ot,restore:function(){Object.keys(Ot).forEach(function(Nr){if(Ot[Nr]&&!Lr(Nr))throw new Error("(regl): error restoring extension "+Nr)})}}}function S(Me,bt){for(var Ot=Array(Me),Lr=0;Lr<Me;++Lr)Ot[Lr]=bt(Lr);return Ot}var g=5120,P=5121,E=5122,z=5123,q=5124,U=5125,G=5126;function Z(Me){for(var bt=16;bt<=1<<28;bt*=16)if(Me<=bt)return bt;return 0}function j(Me){var bt,Ot;return bt=(Me>65535)<<4,Me>>>=bt,Ot=(Me>255)<<3,Me>>>=Ot,bt|=Ot,Ot=(Me>15)<<2,Me>>>=Ot,bt|=Ot,Ot=(Me>3)<<1,Me>>>=Ot,bt|=Ot,bt|Me>>1}function N(){var Me=S(8,function(){return[]});function bt(Or){var Nr=Z(Or),vi=Me[j(Nr)>>2];return vi.length>0?vi.pop():new ArrayBuffer(Nr)}function Ot(Or){Me[j(Or.byteLength)>>2].push(Or)}function Lr(Or,Nr){var vi=null;switch(Or){case g:vi=new Int8Array(bt(Nr),0,Nr);break;case P:vi=new Uint8Array(bt(Nr),0,Nr);break;case E:vi=new Int16Array(bt(2*Nr),0,Nr);break;case z:vi=new Uint16Array(bt(2*Nr),0,Nr);break;case q:vi=new Int32Array(bt(4*Nr),0,Nr);break;case U:vi=new Uint32Array(bt(4*Nr),0,Nr);break;case G:vi=new Float32Array(bt(4*Nr),0,Nr);break;default:return null}return vi.length!==Nr?vi.subarray(0,Nr):vi}function Vr(Or){Ot(Or.buffer)}return{alloc:bt,free:Ot,allocType:Lr,freeType:Vr}}var H=N();H.zero=N();var re=3408,oe=3410,_e=3411,ke=3412,Ce=3413,ge=3414,ie=3415,Se=33901,Ee=33902,we=3379,De=3386,Le=34921,me=36347,Pe=36348,ce=35661,He=35660,lt=34930,mt=36349,Vt=34076,st=34024,ct=7936,Qt=7937,Ht=7938,nr=35724,tt=34047,je=36063,Ue=34852,Ae=3553,rt=34067,St=34069,Tt=33984,dt=6408,Et=5126,pt=5121,Xt=36160,or=36053,_r=36064,Er=16384,ei=function(Me,bt){var Ot=1;bt.ext_texture_filter_anisotropic&&(Ot=Me.getParameter(tt));var Lr=1,Vr=1;bt.webgl_draw_buffers&&(Lr=Me.getParameter(Ue),Vr=Me.getParameter(je));var Or=!!bt.oes_texture_float;if(Or){var Nr=Me.createTexture();Me.bindTexture(Ae,Nr),Me.texImage2D(Ae,0,dt,1,1,0,dt,Et,null);var vi=Me.createFramebuffer();if(Me.bindFramebuffer(Xt,vi),Me.framebufferTexture2D(Xt,_r,Ae,Nr,0),Me.bindTexture(Ae,null),Me.checkFramebufferStatus(Xt)!==or)Or=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Er);var Ni=H.allocType(Et,4);Me.readPixels(0,0,1,1,dt,Et,Ni),Me.getError()?Or=!1:(Me.deleteFramebuffer(vi),Me.deleteTexture(Nr),Or=Ni[0]===1),H.freeType(Ni)}}var qi=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Si=!0;if(!qi){var Vn=Me.createTexture(),Qi=H.allocType(pt,36);Me.activeTexture(Tt),Me.bindTexture(rt,Vn),Me.texImage2D(St,0,dt,3,3,0,dt,pt,Qi),H.freeType(Qi),Me.bindTexture(rt,null),Me.deleteTexture(Vn),Si=!Me.getError()}return{colorBits:[Me.getParameter(oe),Me.getParameter(_e),Me.getParameter(ke),Me.getParameter(Ce)],depthBits:Me.getParameter(ge),stencilBits:Me.getParameter(ie),subpixelBits:Me.getParameter(re),extensions:Object.keys(bt).filter(function(ji){return!!bt[ji]}),maxAnisotropic:Ot,maxDrawbuffers:Lr,maxColorAttachments:Vr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(Ee),maxViewportDims:Me.getParameter(De),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Vt),maxRenderbufferSize:Me.getParameter(st),maxTextureUnits:Me.getParameter(lt),maxTextureSize:Me.getParameter(we),maxAttributes:Me.getParameter(Le),maxVertexUniforms:Me.getParameter(me),maxVertexTextureUnits:Me.getParameter(He),maxVaryingVectors:Me.getParameter(Pe),maxFragmentUniforms:Me.getParameter(mt),glsl:Me.getParameter(nr),renderer:Me.getParameter(Qt),vendor:Me.getParameter(ct),version:Me.getParameter(Ht),readFloat:Or,npotTextureCube:Si}},qr=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function jr(Me){return!!Me&&typeof Me=="object"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset=="number"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||qr(Me.data))}var gt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:Kt,flatten:At};function Je(Me,bt,Ot){for(var Lr=0;Lr<bt;++Lr)Ot[Lr]=Me[Lr]}function We(Me,bt,Ot,Lr){for(var Vr=0,Or=0;Or<bt;++Or)for(var Nr=Me[Or],vi=0;vi<Ot;++vi)Lr[Vr++]=Nr[vi]}function et(Me,bt,Ot,Lr,Vr,Or){for(var Nr=Or,vi=0;vi<bt;++vi)for(var Ni=Me[vi],qi=0;qi<Ot;++qi)for(var Si=Ni[qi],Vn=0;Vn<Lr;++Vn)Vr[Nr++]=Si[Vn]}function xt(Me,bt,Ot,Lr,Vr){for(var Or=1,Nr=Ot+1;Nr<bt.length;++Nr)Or*=bt[Nr];var vi=bt[Ot];if(bt.length-Ot===4){var Ni=bt[Ot+1],qi=bt[Ot+2],Si=bt[Ot+3];for(Nr=0;Nr<vi;++Nr)et(Me[Nr],Ni,qi,Si,Lr,Vr),Vr+=Or}else for(Nr=0;Nr<vi;++Nr)xt(Me[Nr],bt,Ot+1,Lr,Vr),Vr+=Or}function At(Me,bt,Ot,Lr){var Vr=1;if(bt.length)for(var Or=0;Or<bt.length;++Or)Vr*=bt[Or];else Vr=0;var Nr=Lr||H.allocType(Ot,Vr);switch(bt.length){case 0:break;case 1:Je(Me,bt[0],Nr);break;case 2:We(Me,bt[0],bt[1],Nr);break;case 3:et(Me,bt[0],bt[1],bt[2],Nr,0);break;default:xt(Me,bt,0,Nr,0)}return Nr}function Kt(Me){for(var bt=[],Ot=Me;Ot.length;Ot=Ot[0])bt.push(Ot.length);return bt}var er={"[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},Sr=5120,Gr=5122,Ir=5124,Yr=5121,_i=5123,Pi=5125,ai=5126,mi=5126,un={int8:Sr,int16:Gr,int32:Ir,uint8:Yr,uint16:_i,uint32:Pi,float:ai,float32:mi},Fn=35048,An=35040,Hn={dynamic:Fn,stream:An,static:35044},Qn=Ge.flatten,Vi=Ge.shape,Kn=35044,Jn=35040,Gt=5121,wt=5126,rr=[];rr[5120]=1,rr[5122]=2,rr[5124]=4,rr[5121]=1,rr[5123]=2,rr[5125]=4,rr[5126]=4;function ir(Me){return er[Object.prototype.toString.call(Me)]|0}function wr(Me,bt){for(var Ot=0;Ot<bt.length;++Ot)Me[Ot]=bt[Ot]}function Xr(Me,bt,Ot,Lr,Vr,Or,Nr){for(var vi=0,Ni=0;Ni<Ot;++Ni)for(var qi=0;qi<Lr;++qi)Me[vi++]=bt[Vr*Ni+Or*qi+Nr]}function ti(Me,bt,Ot,Lr){var Vr=0,Or={};function Nr(Tr){this.id=Vr++,this.buffer=Me.createBuffer(),this.type=Tr,this.usage=Kn,this.byteLength=0,this.dimension=1,this.dtype=Gt,this.persistentData=null,Ot.profile&&(this.stats={size:0})}Nr.prototype.bind=function(){Me.bindBuffer(this.type,this.buffer)},Nr.prototype.destroy=function(){Qi(this)};var vi=[];function Ni(Tr,Zr){var yi=vi.pop();return yi||(yi=new Nr(Tr)),yi.bind(),Vn(yi,Zr,Jn,0,1,!1),yi}function qi(Tr){vi.push(Tr)}function Si(Tr,Zr,yi){Tr.byteLength=Zr.byteLength,Me.bufferData(Tr.type,Zr,yi)}function Vn(Tr,Zr,yi,Ii,ui,nn){var Xi;if(Tr.usage=yi,Array.isArray(Zr)){if(Tr.dtype=Ii||wt,Zr.length>0){var qn;if(Array.isArray(Zr[0])){Xi=Vi(Zr);for(var fi=1,si=1;si<Xi.length;++si)fi*=Xi[si];Tr.dimension=fi,qn=Qn(Zr,Xi,Tr.dtype),Si(Tr,qn,yi),nn?Tr.persistentData=qn:H.freeType(qn)}else if(typeof Zr[0]=="number"){Tr.dimension=ui;var mn=H.allocType(Tr.dtype,Zr.length);wr(mn,Zr),Si(Tr,mn,yi),nn?Tr.persistentData=mn:H.freeType(mn)}else qr(Zr[0])&&(Tr.dimension=Zr[0].length,Tr.dtype=Ii||ir(Zr[0])||wt,qn=Qn(Zr,[Zr.length,Zr[0].length],Tr.dtype),Si(Tr,qn,yi),nn?Tr.persistentData=qn:H.freeType(qn))}}else if(qr(Zr))Tr.dtype=Ii||ir(Zr),Tr.dimension=ui,Si(Tr,Zr,yi),nn&&(Tr.persistentData=new Uint8Array(new Uint8Array(Zr.buffer)));else if(jr(Zr)){Xi=Zr.shape;var Ji=Zr.stride,Ui=Zr.offset,Bi=0,pn=0,Nn=0,aa=0;Xi.length===1?(Bi=Xi[0],pn=1,Nn=Ji[0],aa=0):Xi.length===2&&(Bi=Xi[0],pn=Xi[1],Nn=Ji[0],aa=Ji[1]),Tr.dtype=Ii||ir(Zr.data)||wt,Tr.dimension=pn;var Ki=H.allocType(Tr.dtype,Bi*pn);Xr(Ki,Zr.data,Bi,pn,Nn,aa,Ui),Si(Tr,Ki,yi),nn?Tr.persistentData=Ki:H.freeType(Ki)}else Zr instanceof ArrayBuffer&&(Tr.dtype=Gt,Tr.dimension=ui,Si(Tr,Zr,yi),nn&&(Tr.persistentData=new Uint8Array(new Uint8Array(Zr))))}function Qi(Tr){bt.bufferCount--,Lr(Tr);var Zr=Tr.buffer;Me.deleteBuffer(Zr),Tr.buffer=null,delete Or[Tr.id]}function ji(Tr,Zr,yi,Ii){bt.bufferCount++;var ui=new Nr(Zr);Or[ui.id]=ui;function nn(fi){var si=Kn,mn=null,Ji=0,Ui=0,Bi=1;return Array.isArray(fi)||qr(fi)||jr(fi)||fi instanceof ArrayBuffer?mn=fi:typeof fi=="number"?Ji=fi|0:fi&&("data"in fi&&(mn=fi.data),"usage"in fi&&(si=Hn[fi.usage]),"type"in fi&&(Ui=un[fi.type]),"dimension"in fi&&(Bi=fi.dimension|0),"length"in fi&&(Ji=fi.length|0)),ui.bind(),mn?Vn(ui,mn,si,Ui,Bi,Ii):(Ji&&Me.bufferData(ui.type,Ji,si),ui.dtype=Ui||Gt,ui.usage=si,ui.dimension=Bi,ui.byteLength=Ji),Ot.profile&&(ui.stats.size=ui.byteLength*rr[ui.dtype]),nn}function Xi(fi,si){Me.bufferSubData(ui.type,si,fi)}function qn(fi,si){var mn=(si||0)|0,Ji;if(ui.bind(),qr(fi)||fi instanceof ArrayBuffer)Xi(fi,mn);else if(Array.isArray(fi)){if(fi.length>0){if(typeof fi[0]=="number"){var Ui=H.allocType(ui.dtype,fi.length);wr(Ui,fi),Xi(Ui,mn),H.freeType(Ui)}else if(Array.isArray(fi[0])||qr(fi[0])){Ji=Vi(fi);var Bi=Qn(fi,Ji,ui.dtype);Xi(Bi,mn),H.freeType(Bi)}}}else if(jr(fi)){Ji=fi.shape;var pn=fi.stride,Nn=0,aa=0,Ki=0,Cn=0;Ji.length===1?(Nn=Ji[0],aa=1,Ki=pn[0],Cn=0):Ji.length===2&&(Nn=Ji[0],aa=Ji[1],Ki=pn[0],Cn=pn[1]);var ia=Array.isArray(fi.data)?ui.dtype:ir(fi.data),sa=H.allocType(ia,Nn*aa);Xr(sa,fi.data,Nn,aa,Ki,Cn,fi.offset),Xi(sa,mn),H.freeType(sa)}return nn}return yi||nn(Tr),nn._reglType="buffer",nn._buffer=ui,nn.subdata=qn,Ot.profile&&(nn.stats=ui.stats),nn.destroy=function(){Qi(ui)},nn}function oi(){gt(Or).forEach(function(Tr){Tr.buffer=Me.createBuffer(),Me.bindBuffer(Tr.type,Tr.buffer),Me.bufferData(Tr.type,Tr.persistentData||Tr.byteLength,Tr.usage)})}return Ot.profile&&(bt.getTotalBufferSize=function(){var Tr=0;return Object.keys(Or).forEach(function(Zr){Tr+=Or[Zr].stats.size}),Tr}),{create:ji,createStream:Ni,destroyStream:qi,clear:function(){gt(Or).forEach(Qi),vi.forEach(Qi)},getBuffer:function(Tr){return Tr&&Tr._buffer instanceof Nr?Tr._buffer:null},restore:oi,_initBuffer:Vn}}var $r=0,Ri=0,Zi=1,en=1,fn=4,yn=4,Mn={points:$r,point:Ri,lines:Zi,line:en,triangles:fn,triangle:yn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Xo=5122,da=5123,jn=5124,Ha=5125,vo=34963,Gn=35040,Ct=35044;function Ar(Me,bt,Ot,Lr){var Vr={},Or=0,Nr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Nr.uint32=Ha);function vi(oi){this.id=Or++,Vr[this.id]=this,this.buffer=oi,this.primType=ma,this.vertCount=0,this.type=0}vi.prototype.bind=function(){this.buffer.bind()};var Ni=[];function qi(oi){var Tr=Ni.pop();return Tr||(Tr=new vi(Ot.create(null,vo,!0,!1)._buffer)),Vn(Tr,oi,Gn,-1,-1,0,0),Tr}function Si(oi){Ni.push(oi)}function Vn(oi,Tr,Zr,yi,Ii,ui,nn){oi.buffer.bind();var Xi;if(Tr){var qn=nn;!nn&&(!qr(Tr)||jr(Tr)&&!qr(Tr.data))&&(qn=bt.oes_element_index_uint?Ha:da),Ot._initBuffer(oi.buffer,Tr,Zr,qn,3)}else Me.bufferData(vo,ui,Zr),oi.buffer.dtype=Xi||Fa,oi.buffer.usage=Zr,oi.buffer.dimension=3,oi.buffer.byteLength=ui;if(Xi=nn,!nn){switch(oi.buffer.dtype){case Fa:case Wa:Xi=Fa;break;case da:case Xo:Xi=da;break;case Ha:case jn:Xi=Ha;break;default:}oi.buffer.dtype=Xi}oi.type=Xi;var fi=Ii;fi<0&&(fi=oi.buffer.byteLength,Xi===da?fi>>=1:Xi===Ha&&(fi>>=2)),oi.vertCount=fi;var si=yi;if(yi<0){si=ma;var mn=oi.buffer.dimension;mn===1&&(si=Ba),mn===2&&(si=ua),mn===3&&(si=ma)}oi.primType=si}function Qi(oi){Lr.elementsCount--,delete Vr[oi.id],oi.buffer.destroy(),oi.buffer=null}function ji(oi,Tr){var Zr=Ot.create(null,vo,!0),yi=new vi(Zr._buffer);Lr.elementsCount++;function Ii(ui){if(!ui)Zr(),yi.primType=ma,yi.vertCount=0,yi.type=Fa;else if(typeof ui=="number")Zr(ui),yi.primType=ma,yi.vertCount=ui|0,yi.type=Fa;else{var nn=null,Xi=Ct,qn=-1,fi=-1,si=0,mn=0;Array.isArray(ui)||qr(ui)||jr(ui)?nn=ui:("data"in ui&&(nn=ui.data),"usage"in ui&&(Xi=Hn[ui.usage]),"primitive"in ui&&(qn=Mn[ui.primitive]),"count"in ui&&(fi=ui.count|0),"type"in ui&&(mn=Nr[ui.type]),"length"in ui?si=ui.length|0:(si=fi,mn===da||mn===Xo?si*=2:(mn===Ha||mn===jn)&&(si*=4))),Vn(yi,nn,Xi,qn,fi,si,mn)}return Ii}return Ii(oi),Ii._reglType="elements",Ii._elements=yi,Ii.subdata=function(ui,nn){return Zr.subdata(ui,nn),Ii},Ii.destroy=function(){Qi(yi)},Ii}return{create:ji,createStream:qi,destroyStream:Si,getElements:function(oi){return typeof oi=="function"&&oi._elements instanceof vi?oi._elements:null},clear:function(){gt(Vr).forEach(Qi)}}}var Jr=new Float32Array(1),hi=new Uint32Array(Jr.buffer),hn=5123;function Sn(Me){for(var bt=H.allocType(hn,Me.length),Ot=0;Ot<Me.length;++Ot)if(isNaN(Me[Ot]))bt[Ot]=65535;else if(Me[Ot]===1/0)bt[Ot]=31744;else if(Me[Ot]===-1/0)bt[Ot]=64512;else{Jr[0]=Me[Ot];var Lr=hi[0],Vr=Lr>>>31<<15,Or=(Lr<<1>>>24)-127,Nr=Lr>>13&1023;if(Or<-24)bt[Ot]=Vr;else if(Or<-14){var vi=-14-Or;bt[Ot]=Vr+(Nr+1024>>vi)}else Or>15?bt[Ot]=Vr+31744:bt[Ot]=Vr+(Or+15<<10)+Nr}return bt}function En(Me){return Array.isArray(Me)||qr(Me)}var ki=34467,_n=3553,ya=34067,ea=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Yl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,ql=35842,xo=35843,Kl=36196,Ns=5121,Hl=5123,ac=5125,oa=5126,qo=10242,Oo=10243,Ol=10497,Pc=33071,Do=33648,rf=10240,Vf=10241,pl=9728,Zc=9729,Jl=9984,qs=9985,yu=9986,oc=9987,Cf=33170,sc=4352,jh=4353,Lf=4354,cs=34046,nf=3317,Gf=37440,$l=37441,fl=37443,lc=37444,Fu=33984,Es=[Jl,yu,qs,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return"[object "+Me+"]"}var uc=ps("HTMLCanvasElement"),xl=ps("OffscreenCanvas"),Gu=ps("CanvasRenderingContext2D"),Os=ps("ImageBitmap"),od=ps("HTMLImageElement"),Po=ps("HTMLVideoElement"),sd=Object.keys(er).concat([uc,xl,Gu,Os,od,Po]),Ko=[];Ko[Ns]=1,Ko[oa]=4,Ko[zs]=2,Ko[Hl]=2,Ko[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Yl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[ql]=.5,Pa[xo]=.25,Pa[Kl]=.5;function af(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]=="number")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!En(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Hf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===Os}function Ah(Me){return bl(Me)===od}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return sd.indexOf(bt)>=0?!0:af(Me)||Hu(Me)||jr(Me)}function Yc(Me){return er[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var Ot=bt.length;switch(Me.type){case Ns:case Hl:case ac:case oa:var Lr=H.allocType(Me.type,Ot);Lr.set(bt),Me.data=Lr;break;case zs:Me.data=Sn(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?oa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=Sn(bt),H.freeType(bt)):Me.data=bt}function jf(Me,bt,Ot,Lr,Vr,Or){for(var Nr=Me.width,vi=Me.height,Ni=Me.channels,qi=Nr*vi*Ni,Si=th(Me,qi),Vn=0,Qi=0;Qi<vi;++Qi)for(var ji=0;ji<Nr;++ji)for(var oi=0;oi<Ni;++oi)Si[Vn++]=bt[Ot*ji+Lr*Qi+Vr*oi+Or];ju(Me,Si)}function cc(Me,bt,Ot,Lr,Vr,Or){var Nr;if(typeof Pa[Me]!="undefined"?Nr=Pa[Me]:Nr=Go[Me]*Ko[bt],Or&&(Nr*=6),Vr){for(var vi=0,Ni=Ot;Ni>=1;)vi+=Nr*Ni*Ni,Ni/=2;return vi}else return Nr*Ot*Lr}function of(Me,bt,Ot,Lr,Vr,Or,Nr){var vi={"don't care":sc,"dont care":sc,nice:Lf,fast:jh},Ni={repeat:Ol,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Si=e({mipmap:oc,"nearest mipmap nearest":Jl,"linear mipmap nearest":qs,"nearest mipmap linear":yu,"linear mipmap linear":oc},qi),Vn={none:0,browser:lc},Qi={uint8:Ns,rgba4:ll,rgb565:zl,"rgb5 a1":ul},ji={alpha:_o,luminance:po,"luminance alpha":Lo,rgb:No,rgba:Ma,rgba4:ko,"rgb5 a1":Ds,rgb565:Fs},oi={};bt.ext_srgb&&(ji.srgb=cl,ji.srgba=Ks),bt.oes_texture_float&&(Qi.float32=Qi.float=oa),bt.oes_texture_half_float&&(Qi.float16=Qi["half float"]=zs),bt.webgl_depth_texture&&(e(ji,{depth:il,"depth stencil":As}),e(Qi,{uint16:Hl,uint32:ac,"depth stencil":us})),bt.webgl_compressed_texture_s3tc&&e(oi,{"rgb s3tc dxt1":Io,"rgba s3tc dxt1":ls,"rgba s3tc dxt3":Yl,"rgba s3tc dxt5":Su}),bt.webgl_compressed_texture_atc&&e(oi,{"rgb atc":nc,"rgba atc explicit alpha":bs,"rgba atc interpolated alpha":Rn}),bt.webgl_compressed_texture_pvrtc&&e(oi,{"rgb pvrtc 4bppv1":_a,"rgb pvrtc 2bppv1":Vu,"rgba pvrtc 4bppv1":ql,"rgba pvrtc 2bppv1":xo}),bt.webgl_compressed_texture_etc1&&(oi["rgb etc1"]=Kl);var Tr=Array.prototype.slice.call(Me.getParameter(ki));Object.keys(oi).forEach(function(ne){var be=oi[ne];Tr.indexOf(be)>=0&&(ji[ne]=be)});var Zr=Object.keys(ji);Ot.textureFormats=Zr;var yi=[];Object.keys(ji).forEach(function(ne){var be=ji[ne];yi[be]=ne});var Ii=[];Object.keys(Qi).forEach(function(ne){var be=Qi[ne];Ii[be]=ne});var ui=[];Object.keys(qi).forEach(function(ne){var be=qi[ne];ui[be]=ne});var nn=[];Object.keys(Si).forEach(function(ne){var be=Si[ne];nn[be]=ne});var Xi=[];Object.keys(Ni).forEach(function(ne){var be=Ni[ne];Xi[be]=ne});var qn=Zr.reduce(function(ne,be){var Be=ji[be];return Be===po||Be===_o||Be===po||Be===Lo||Be===il||Be===As||bt.ext_srgb&&(Be===cl||Be===Ks)?ne[Be]=Be:Be===Ds||be.indexOf("rgba")>=0?ne[Be]=Ma:ne[Be]=No,ne},{});function fi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function si(ne,be){ne.internalformat=be.internalformat,ne.format=be.format,ne.type=be.type,ne.compressed=be.compressed,ne.premultiplyAlpha=be.premultiplyAlpha,ne.flipY=be.flipY,ne.unpackAlignment=be.unpackAlignment,ne.colorSpace=be.colorSpace,ne.width=be.width,ne.height=be.height,ne.channels=be.channels}function mn(ne,be){if(!(typeof be!="object"||!be)){if("premultiplyAlpha"in be&&(ne.premultiplyAlpha=be.premultiplyAlpha),"flipY"in be&&(ne.flipY=be.flipY),"alignment"in be&&(ne.unpackAlignment=be.alignment),"colorSpace"in be&&(ne.colorSpace=Vn[be.colorSpace]),"type"in be){var Be=be.type;ne.type=Qi[Be]}var ht=ne.width,Yt=ne.height,cr=ne.channels,Nt=!1;"shape"in be?(ht=be.shape[0],Yt=be.shape[1],be.shape.length===3&&(cr=be.shape[2],Nt=!0)):("radius"in be&&(ht=Yt=be.radius),"width"in be&&(ht=be.width),"height"in be&&(Yt=be.height),"channels"in be&&(cr=be.channels,Nt=!0)),ne.width=ht|0,ne.height=Yt|0,ne.channels=cr|0;var Ne=!1;if("format"in be){var $e=be.format,ot=ne.internalformat=ji[$e];ne.format=qn[ot],$e in Qi&&("type"in be||(ne.type=Qi[$e])),$e in oi&&(ne.compressed=!0),Ne=!0}!Nt&&Ne?ne.channels=Go[ne.format]:Nt&&!Ne&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Gf,ne.flipY),Me.pixelStorei($l,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(nf,ne.unpackAlignment)}function Ui(){fi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Bi(ne,be){var Be=null;if(_f(be)?Be=be:be&&(mn(ne,be),"x"in be&&(ne.xOffset=be.x|0),"y"in be&&(ne.yOffset=be.y|0),_f(be.data)&&(Be=be.data)),be.copy){var ht=Vr.viewportWidth,Yt=Vr.viewportHeight;ne.width=ne.width||ht-ne.xOffset,ne.height=ne.height||Yt-ne.yOffset,ne.needsCopy=!0}else if(!Be)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(qr(Be))ne.channels=ne.channels||4,ne.data=Be,!("type"in be)&&ne.type===Ns&&(ne.type=Yc(Be));else if(af(Be))ne.channels=ne.channels||4,eh(ne,Be),ne.alignment=1,ne.needsFree=!0;else if(jr(Be)){var cr=Be.data;!Array.isArray(cr)&&ne.type===Ns&&(ne.type=Yc(cr));var Nt=Be.shape,Ne=Be.stride,$e,ot,It,Bt,Ft,Ut;Nt.length===3?(It=Nt[2],Ut=Ne[2]):(It=1,Ut=1),$e=Nt[0],ot=Nt[1],Bt=Ne[0],Ft=Ne[1],ne.alignment=1,ne.width=$e,ne.height=ot,ne.channels=It,ne.format=ne.internalformat=Hs[It],ne.needsFree=!0,jf(ne,cr,Bt,Ft,Ut,Be.offset)}else if(Hf(Be)||Ic(Be)||yf(Be))Hf(Be)||Ic(Be)?ne.element=Be:ne.element=Be.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Be))ne.element=Be,ne.width=Be.width,ne.height=Be.height,ne.channels=4;else if(Ah(Be))ne.element=Be,ne.width=Be.naturalWidth,ne.height=Be.naturalHeight,ne.channels=4;else if(Qf(Be))ne.element=Be,ne.width=Be.videoWidth,ne.height=Be.videoHeight,ne.channels=4;else if(Hu(Be)){var zt=ne.width||Be[0].length,_t=ne.height||Be.length,Dt=ne.channels;En(Be[0][0])?Dt=Dt||Be[0][0].length:Dt=Dt||1;for(var vt=Ge.shape(Be),lr=1,yr=0;yr<vt.length;++yr)lr*=vt[yr];var Br=th(ne,lr);Ge.flatten(Be,vt,"",Br),ju(ne,Br),ne.alignment=1,ne.width=zt,ne.height=_t,ne.channels=Dt,ne.format=ne.internalformat=Hs[Dt],ne.needsFree=!0}ne.type===oa||ne.type}function pn(ne,be,Be){var ht=ne.element,Yt=ne.data,cr=ne.internalformat,Nt=ne.format,Ne=ne.type,$e=ne.width,ot=ne.height;Ji(ne),ht?Me.texImage2D(be,Be,Nt,Nt,Ne,ht):ne.compressed?Me.compressedTexImage2D(be,Be,cr,$e,ot,0,Yt):ne.needsCopy?(Lr(),Me.copyTexImage2D(be,Be,Nt,ne.xOffset,ne.yOffset,$e,ot,0)):Me.texImage2D(be,Be,Nt,$e,ot,0,Nt,Ne,Yt||null)}function Nn(ne,be,Be,ht,Yt){var cr=ne.element,Nt=ne.data,Ne=ne.internalformat,$e=ne.format,ot=ne.type,It=ne.width,Bt=ne.height;Ji(ne),cr?Me.texSubImage2D(be,Yt,Be,ht,$e,ot,cr):ne.compressed?Me.compressedTexSubImage2D(be,Yt,Be,ht,Ne,It,Bt,Nt):ne.needsCopy?(Lr(),Me.copyTexSubImage2D(be,Yt,Be,ht,ne.xOffset,ne.yOffset,It,Bt)):Me.texSubImage2D(be,Yt,Be,ht,It,Bt,$e,ot,Nt)}var aa=[];function Ki(){return aa.pop()||new Ui}function Cn(ne){ne.needsFree&&H.freeType(ne.data),Ui.call(ne),aa.push(ne)}function ia(){fi.call(this),this.genMipmaps=!1,this.mipmapHint=sc,this.mipmask=0,this.images=Array(16)}function sa(ne,be,Be){var ht=ne.images[0]=Ki();ne.mipmask=1,ht.width=ne.width=be,ht.height=ne.height=Be,ht.channels=ne.channels=4}function ba(ne,be){var Be=null;if(_f(be))Be=ne.images[0]=Ki(),si(Be,ne),Bi(Be,be),ne.mipmask=1;else if(mn(ne,be),Array.isArray(be.mipmap))for(var ht=be.mipmap,Yt=0;Yt<ht.length;++Yt)Be=ne.images[Yt]=Ki(),si(Be,ne),Be.width>>=Yt,Be.height>>=Yt,Bi(Be,ht[Yt]),ne.mipmask|=1<<Yt;else Be=ne.images[0]=Ki(),si(Be,ne),Bi(Be,be),ne.mipmask=1;si(ne,ne.images[0]),ne.compressed&&(ne.internalformat===Io||ne.internalformat===ls||ne.internalformat===Yl||ne.internalformat)}function is(ne,be){for(var Be=ne.images,ht=0;ht<Be.length;++ht){if(!Be[ht])return;pn(Be[ht],be,ht)}}var Zs=[];function Va(){var ne=Zs.pop()||new ia;fi.call(ne),ne.mipmask=0;for(var be=0;be<16;++be)ne.images[be]=null;return ne}function Ml(ne){for(var be=ne.images,Be=0;Be<be.length;++Be)be[Be]&&Cn(be[Be]),be[Be]=null;Zs.push(ne)}function zo(){this.minFilter=pl,this.magFilter=pl,this.wrapS=Pc,this.wrapT=Pc,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=sc}function Qs(ne,be){if("min"in be){var Be=be.min;ne.minFilter=Si[Be],Es.indexOf(ne.minFilter)>=0&&!("faces"in be)&&(ne.genMipmaps=!0)}if("mag"in be){var ht=be.mag;ne.magFilter=qi[ht]}var Yt=ne.wrapS,cr=ne.wrapT;if("wrap"in be){var Nt=be.wrap;typeof Nt=="string"?Yt=cr=Ni[Nt]:Array.isArray(Nt)&&(Yt=Ni[Nt[0]],cr=Ni[Nt[1]])}else{if("wrapS"in be){var Ne=be.wrapS;Yt=Ni[Ne]}if("wrapT"in be){var $e=be.wrapT;cr=Ni[$e]}}if(ne.wrapS=Yt,ne.wrapT=cr,"anisotropic"in be){var ot=be.anisotropic;ne.anisotropic=be.anisotropic}if("mipmap"in be){var It=!1;switch(typeof be.mipmap){case"string":ne.mipmapHint=vi[be.mipmap],ne.genMipmaps=!0,It=!0;break;case"boolean":It=ne.genMipmaps=be.mipmap;break;case"object":ne.genMipmaps=!1,It=!0;break;default:}It&&!("min"in be)&&(ne.minFilter=Jl)}}function al(ne,be){Me.texParameteri(be,Vf,ne.minFilter),Me.texParameteri(be,rf,ne.magFilter),Me.texParameteri(be,qo,ne.wrapS),Me.texParameteri(be,Oo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(be,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(be))}var Vl=0,ss={},Vs=Ot.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){fi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Nr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var be=ne.texture,Be=ne.unit,ht=ne.target;Be>=0&&(Me.activeTexture(Fu+Be),Me.bindTexture(ht,null),Ys[Be]=null),Me.deleteTexture(be),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Or.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var be=ne.unit;if(be<0){for(var Be=0;Be<Vs;++Be){var ht=Ys[Be];if(ht){if(ht.bindCount>0)continue;ht.unit=-1}Ys[Be]=ne,be=Be;break}be>=Vs,Nr.profile&&Or.maxTextureUnits<be+1&&(Or.maxTextureUnits=be+1),ne.unit=be,Me.activeTexture(Fu+be),Me.bindTexture(ne.target,ne.texture)}return be},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Y(this)}});function D(ne,be){var Be=new wa(_n);ss[Be.id]=Be,Or.textureCount++;function ht(Nt,Ne){var $e=Be.texInfo;zo.call($e);var ot=Va();return typeof Nt=="number"?typeof Ne=="number"?sa(ot,Nt|0,Ne|0):sa(ot,Nt|0,Nt|0):Nt?(Qs($e,Nt),ba(ot,Nt)):sa(ot,1,1),$e.genMipmaps&&(ot.mipmask=(ot.width<<1)-1),Be.mipmask=ot.mipmask,si(Be,ot),Be.internalformat=ot.internalformat,ht.width=ot.width,ht.height=ot.height,ol(Be),is(ot,_n),al($e,_n),io(),Ml(ot),Nr.profile&&(Be.stats.size=cc(Be.internalformat,Be.type,ot.width,ot.height,$e.genMipmaps,!1)),ht.format=yi[Be.internalformat],ht.type=Ii[Be.type],ht.mag=ui[$e.magFilter],ht.min=nn[$e.minFilter],ht.wrapS=Xi[$e.wrapS],ht.wrapT=Xi[$e.wrapT],ht}function Yt(Nt,Ne,$e,ot){var It=Ne|0,Bt=$e|0,Ft=ot|0,Ut=Ki();return si(Ut,Be),Ut.width=0,Ut.height=0,Bi(Ut,Nt),Ut.width=Ut.width||(Be.width>>Ft)-It,Ut.height=Ut.height||(Be.height>>Ft)-Bt,ol(Be),Nn(Ut,_n,It,Bt,Ft),io(),Cn(Ut),ht}function cr(Nt,Ne){var $e=Nt|0,ot=Ne|0||$e;if($e===Be.width&&ot===Be.height)return ht;ht.width=Be.width=$e,ht.height=Be.height=ot,ol(Be);for(var It=0;Be.mipmask>>It;++It){var Bt=$e>>It,Ft=ot>>It;if(!Bt||!Ft)break;Me.texImage2D(_n,It,Be.format,Bt,Ft,0,Be.format,Be.type,null)}return io(),Nr.profile&&(Be.stats.size=cc(Be.internalformat,Be.type,$e,ot,!1,!1)),ht}return ht(ne,be),ht.subimage=Yt,ht.resize=cr,ht._reglType="texture2d",ht._texture=Be,Nr.profile&&(ht.stats=Be.stats),ht.destroy=function(){Be.decRef()},ht}function J(ne,be,Be,ht,Yt,cr){var Nt=new wa(ya);ss[Nt.id]=Nt,Or.cubeCount++;var Ne=new Array(6);function $e(Bt,Ft,Ut,zt,_t,Dt){var vt,lr=Nt.texInfo;for(zo.call(lr),vt=0;vt<6;++vt)Ne[vt]=Va();if(typeof Bt=="number"||!Bt){var yr=Bt|0||1;for(vt=0;vt<6;++vt)sa(Ne[vt],yr,yr)}else if(typeof Bt=="object")if(Ft)ba(Ne[0],Bt),ba(Ne[1],Ft),ba(Ne[2],Ut),ba(Ne[3],zt),ba(Ne[4],_t),ba(Ne[5],Dt);else if(Qs(lr,Bt),mn(Nt,Bt),"faces"in Bt){var Br=Bt.faces;for(vt=0;vt<6;++vt)si(Ne[vt],Nt),ba(Ne[vt],Br[vt])}else for(vt=0;vt<6;++vt)ba(Ne[vt],Bt);for(si(Nt,Ne[0]),lr.genMipmaps?Nt.mipmask=(Ne[0].width<<1)-1:Nt.mipmask=Ne[0].mipmask,Nt.internalformat=Ne[0].internalformat,$e.width=Ne[0].width,$e.height=Ne[0].height,ol(Nt),vt=0;vt<6;++vt)is(Ne[vt],ea+vt);for(al(lr,ya),io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,lr.genMipmaps,!0)),$e.format=yi[Nt.internalformat],$e.type=Ii[Nt.type],$e.mag=ui[lr.magFilter],$e.min=nn[lr.minFilter],$e.wrapS=Xi[lr.wrapS],$e.wrapT=Xi[lr.wrapT],vt=0;vt<6;++vt)Ml(Ne[vt]);return $e}function ot(Bt,Ft,Ut,zt,_t){var Dt=Ut|0,vt=zt|0,lr=_t|0,yr=Ki();return si(yr,Nt),yr.width=0,yr.height=0,Bi(yr,Ft),yr.width=yr.width||(Nt.width>>lr)-Dt,yr.height=yr.height||(Nt.height>>lr)-vt,ol(Nt),Nn(yr,ea+Bt,Dt,vt,lr),io(),Cn(yr),$e}function It(Bt){var Ft=Bt|0;if(Ft!==Nt.width){$e.width=Nt.width=Ft,$e.height=Nt.height=Ft,ol(Nt);for(var Ut=0;Ut<6;++Ut)for(var zt=0;Nt.mipmask>>zt;++zt)Me.texImage2D(ea+Ut,zt,Nt.format,Ft>>zt,Ft>>zt,0,Nt.format,Nt.type,null);return io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,!1,!0)),$e}}return $e(ne,be,Be,ht,Yt,cr),$e.subimage=ot,$e.resize=It,$e._reglType="textureCube",$e._texture=Nt,Nr.profile&&($e.stats=Nt.stats),$e.destroy=function(){Nt.decRef()},$e}function O(){for(var ne=0;ne<Vs;++ne)Me.activeTexture(Fu+ne),Me.bindTexture(_n,null),Ys[ne]=null;gt(ss).forEach(Y),Or.cubeCount=0,Or.textureCount=0}Nr.profile&&(Or.getTotalTextureSize=function(){var ne=0;return Object.keys(ss).forEach(function(be){ne+=ss[be].stats.size}),ne});function K(){for(var ne=0;ne<Vs;++ne){var be=Ys[ne];be&&(be.bindCount=0,be.unit=-1,Ys[ne]=null)}gt(ss).forEach(function(Be){Be.texture=Me.createTexture(),Me.bindTexture(Be.target,Be.texture);for(var ht=0;ht<32;++ht)if((Be.mipmask&1<<ht)!==0)if(Be.target===_n)Me.texImage2D(_n,ht,Be.internalformat,Be.width>>ht,Be.height>>ht,0,Be.internalformat,Be.type,null);else for(var Yt=0;Yt<6;++Yt)Me.texImage2D(ea+Yt,ht,Be.internalformat,Be.width>>ht,Be.height>>ht,0,Be.internalformat,Be.type,null);al(Be.texInfo,Be.target)})}function de(){for(var ne=0;ne<Vs;++ne){var be=Ys[ne];be&&(be.bindCount=0,be.unit=-1,Ys[ne]=null),Me.activeTexture(Fu+ne),Me.bindTexture(_n,null),Me.bindTexture(ya,null)}}return{create2D:D,createCube:J,clear:O,getTexture:function(ne){return null},restore:K,refresh:de}}var Nl=36161,Kc=32854,Rc=32855,gs=36194,Wf=33189,Wh=36168,rh=34041,sf=35907,Sh=34836,Mu=34842,ih=34843,js=[];js[Kc]=2,js[Rc]=2,js[gs]=2,js[Wf]=2,js[Wh]=1,js[rh]=4,js[sf]=4,js[Sh]=16,js[Mu]=8,js[ih]=6;function Eu(Me,bt,Ot){return js[Me]*bt*Ot}var Dc=function(Me,bt,Ot,Lr,Vr){var Or={rgba4:Kc,rgb565:gs,"rgb5 a1":Rc,depth:Wf,stencil:Wh,"depth stencil":rh};bt.ext_srgb&&(Or.srgba=sf),bt.ext_color_buffer_half_float&&(Or.rgba16f=Mu,Or.rgb16f=ih),bt.webgl_color_buffer_float&&(Or.rgba32f=Sh);var Nr=[];Object.keys(Or).forEach(function(ji){var oi=Or[ji];Nr[oi]=ji});var vi=0,Ni={};function qi(ji){this.id=vi++,this.refCount=1,this.renderbuffer=ji,this.format=Kc,this.width=0,this.height=0,Vr.profile&&(this.stats={size:0})}qi.prototype.decRef=function(){--this.refCount<=0&&Si(this)};function Si(ji){var oi=ji.renderbuffer;Me.bindRenderbuffer(Nl,null),Me.deleteRenderbuffer(oi),ji.renderbuffer=null,ji.refCount=0,delete Ni[ji.id],Lr.renderbufferCount--}function Vn(ji,oi){var Tr=new qi(Me.createRenderbuffer());Ni[Tr.id]=Tr,Lr.renderbufferCount++;function Zr(Ii,ui){var nn=0,Xi=0,qn=Kc;if(typeof Ii=="object"&&Ii){var fi=Ii;if("shape"in fi){var si=fi.shape;nn=si[0]|0,Xi=si[1]|0}else"radius"in fi&&(nn=Xi=fi.radius|0),"width"in fi&&(nn=fi.width|0),"height"in fi&&(Xi=fi.height|0);"format"in fi&&(qn=Or[fi.format])}else typeof Ii=="number"?(nn=Ii|0,typeof ui=="number"?Xi=ui|0:Xi=nn):Ii||(nn=Xi=1);if(!(nn===Tr.width&&Xi===Tr.height&&qn===Tr.format))return Zr.width=Tr.width=nn,Zr.height=Tr.height=Xi,Tr.format=qn,Me.bindRenderbuffer(Nl,Tr.renderbuffer),Me.renderbufferStorage(Nl,qn,nn,Xi),Vr.profile&&(Tr.stats.size=Eu(Tr.format,Tr.width,Tr.height)),Zr.format=Nr[Tr.format],Zr}function yi(Ii,ui){var nn=Ii|0,Xi=ui|0||nn;return nn===Tr.width&&Xi===Tr.height||(Zr.width=Tr.width=nn,Zr.height=Tr.height=Xi,Me.bindRenderbuffer(Nl,Tr.renderbuffer),Me.renderbufferStorage(Nl,Tr.format,nn,Xi),Vr.profile&&(Tr.stats.size=Eu(Tr.format,Tr.width,Tr.height))),Zr}return Zr(ji,oi),Zr.resize=yi,Zr._reglType="renderbuffer",Zr._renderbuffer=Tr,Vr.profile&&(Zr.stats=Tr.stats),Zr.destroy=function(){Tr.decRef()},Zr}Vr.profile&&(Lr.getTotalRenderbufferSize=function(){var ji=0;return Object.keys(Ni).forEach(function(oi){ji+=Ni[oi].stats.size}),ji});function Qi(){gt(Ni).forEach(function(ji){ji.renderbuffer=Me.createRenderbuffer(),Me.bindRenderbuffer(Nl,ji.renderbuffer),Me.renderbufferStorage(Nl,ji.format,ji.width,ji.height)}),Me.bindRenderbuffer(Nl,null)}return{create:Vn,clear:function(){gt(Ni).forEach(Si)},restore:Qi}},ks=36160,bc=36161,hu=3553,_u=34069,nl=36064,nh=36096,Mh=36128,zu=33306,Fc=36053,wc=36193,bd=5121,xf=5126,Pf=6407,qu=6408,bf=[];bf[qu]=4,bf[Pf]=3;var jl=[];jl[bd]=1,jl[xf]=4,jl[wc]=2;function lf(Me,bt,Ot,Lr,Vr,Or){var Nr={cur:null,next:null,dirty:!1,setFBO:null},vi=["rgba"],Ni=["rgba4","rgb565","rgb5 a1"];bt.ext_srgb&&Ni.push("srgba"),bt.ext_color_buffer_half_float&&Ni.push("rgba16f","rgb16f"),bt.webgl_color_buffer_float&&Ni.push("rgba32f");var qi=["uint8"];bt.oes_texture_half_float&&qi.push("half float","float16"),bt.oes_texture_float&&qi.push("float","float32");function Si(Ui,Bi,pn){this.target=Ui,this.texture=Bi,this.renderbuffer=pn;var Nn=0,aa=0;Bi?(Nn=Bi.width,aa=Bi.height):pn&&(Nn=pn.width,aa=pn.height),this.width=Nn,this.height=aa}function Vn(Ui){Ui&&(Ui.texture&&Ui.texture._texture.decRef(),Ui.renderbuffer&&Ui.renderbuffer._renderbuffer.decRef())}function Qi(Ui,Bi,pn){if(Ui)if(Ui.texture){var Nn=Ui.texture._texture,aa=Math.max(1,Nn.width),Ki=Math.max(1,Nn.height);Nn.refCount+=1}else{var Cn=Ui.renderbuffer._renderbuffer;Cn.refCount+=1}}function ji(Ui,Bi){Bi&&(Bi.texture?Me.framebufferTexture2D(ks,Ui,Bi.target,Bi.texture._texture.texture,0):Me.framebufferRenderbuffer(ks,Ui,bc,Bi.renderbuffer._renderbuffer.renderbuffer))}function oi(Ui){var Bi=hu,pn=null,Nn=null,aa=Ui;typeof Ui=="object"&&(aa=Ui.data,"target"in Ui&&(Bi=Ui.target|0));var Ki=aa._reglType;return Ki==="texture2d"||Ki==="textureCube"?pn=aa:Ki==="renderbuffer"&&(Nn=aa,Bi=bc),new Si(Bi,pn,Nn)}function Tr(Ui,Bi,pn,Nn,aa){if(pn){var Ki=Lr.create2D({width:Ui,height:Bi,format:Nn,type:aa});return Ki._texture.refCount=0,new Si(hu,Ki,null)}else{var Cn=Vr.create({width:Ui,height:Bi,format:Nn});return Cn._renderbuffer.refCount=0,new Si(bc,null,Cn)}}function Zr(Ui){return Ui&&(Ui.texture||Ui.renderbuffer)}function yi(Ui,Bi,pn){Ui&&(Ui.texture?Ui.texture.resize(Bi,pn):Ui.renderbuffer&&Ui.renderbuffer.resize(Bi,pn),Ui.width=Bi,Ui.height=pn)}var Ii=0,ui={};function nn(){this.id=Ii++,ui[this.id]=this,this.framebuffer=Me.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Xi(Ui){Ui.colorAttachments.forEach(Vn),Vn(Ui.depthAttachment),Vn(Ui.stencilAttachment),Vn(Ui.depthStencilAttachment)}function qn(Ui){var Bi=Ui.framebuffer;Me.deleteFramebuffer(Bi),Ui.framebuffer=null,Or.framebufferCount--,delete ui[Ui.id]}function fi(Ui){var Bi;Me.bindFramebuffer(ks,Ui.framebuffer);var pn=Ui.colorAttachments;for(Bi=0;Bi<pn.length;++Bi)ji(nl+Bi,pn[Bi]);for(Bi=pn.length;Bi<Ot.maxColorAttachments;++Bi)Me.framebufferTexture2D(ks,nl+Bi,hu,null,0);Me.framebufferTexture2D(ks,zu,hu,null,0),Me.framebufferTexture2D(ks,nh,hu,null,0),Me.framebufferTexture2D(ks,Mh,hu,null,0),ji(nh,Ui.depthAttachment),ji(Mh,Ui.stencilAttachment),ji(zu,Ui.depthStencilAttachment);var Nn=Me.checkFramebufferStatus(ks);Me.isContextLost(),Me.bindFramebuffer(ks,Nr.next?Nr.next.framebuffer:null),Nr.cur=Nr.next,Me.getError()}function si(Ui,Bi){var pn=new nn;Or.framebufferCount++;function Nn(Ki,Cn){var ia,sa=0,ba=0,is=!0,Zs=!0,Va=null,Ml=!0,zo="rgba",Qs="uint8",al=1,Vl=null,ss=null,Vs=null,Ys=!1;if(typeof Ki=="number")sa=Ki|0,ba=Cn|0||sa;else if(!Ki)sa=ba=1;else{var wa=Ki;if("shape"in wa){var ol=wa.shape;sa=ol[0],ba=ol[1]}else"radius"in wa&&(sa=ba=wa.radius),"width"in wa&&(sa=wa.width),"height"in wa&&(ba=wa.height);("color"in wa||"colors"in wa)&&(Va=wa.color||wa.colors,Array.isArray(Va)),Va||("colorCount"in wa&&(al=wa.colorCount|0),"colorTexture"in wa&&(Ml=!!wa.colorTexture,zo="rgba4"),"colorType"in wa&&(Qs=wa.colorType,Ml||(Qs==="half float"||Qs==="float16"?zo="rgba16f":(Qs==="float"||Qs==="float32")&&(zo="rgba32f"))),"colorFormat"in wa&&(zo=wa.colorFormat,vi.indexOf(zo)>=0?Ml=!0:Ni.indexOf(zo)>=0&&(Ml=!1))),("depthTexture"in wa||"depthStencilTexture"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),"depth"in wa&&(typeof wa.depth=="boolean"?is=wa.depth:(Vl=wa.depth,Zs=!1)),"stencil"in wa&&(typeof wa.stencil=="boolean"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),"depthStencil"in wa&&(typeof wa.depthStencil=="boolean"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(oi);else if(Va)io=[oi(Va)];else for(io=new Array(al),ia=0;ia<al;++ia)io[ia]=Tr(sa,ba,Ml,zo,Qs);sa=sa||io[0].width,ba=ba||io[0].height,Vl?Y=oi(Vl):is&&!Zs&&(Y=Tr(sa,ba,Ys,"depth","uint32")),ss?D=oi(ss):Zs&&!is&&(D=Tr(sa,ba,!1,"stencil","uint8")),Vs?J=oi(Vs):!Vl&&!ss&&Zs&&is&&(J=Tr(sa,ba,Ys,"depth stencil","depth stencil"));var O=null;for(ia=0;ia<io.length;++ia)if(Qi(io[ia],sa,ba),io[ia]&&io[ia].texture){var K=bf[io[ia].texture._texture.format]*jl[io[ia].texture._texture.type];O===null&&(O=K)}return Qi(Y,sa,ba),Qi(D,sa,ba),Qi(J,sa,ba),Xi(pn),pn.width=sa,pn.height=ba,pn.colorAttachments=io,pn.depthAttachment=Y,pn.stencilAttachment=D,pn.depthStencilAttachment=J,Nn.color=io.map(Zr),Nn.depth=Zr(Y),Nn.stencil=Zr(D),Nn.depthStencil=Zr(J),Nn.width=pn.width,Nn.height=pn.height,fi(pn),Nn}function aa(Ki,Cn){var ia=Math.max(Ki|0,1),sa=Math.max(Cn|0||ia,1);if(ia===pn.width&&sa===pn.height)return Nn;for(var ba=pn.colorAttachments,is=0;is<ba.length;++is)yi(ba[is],ia,sa);return yi(pn.depthAttachment,ia,sa),yi(pn.stencilAttachment,ia,sa),yi(pn.depthStencilAttachment,ia,sa),pn.width=Nn.width=ia,pn.height=Nn.height=sa,fi(pn),Nn}return Nn(Ui,Bi),e(Nn,{resize:aa,_reglType:"framebuffer",_framebuffer:pn,destroy:function(){qn(pn),Xi(pn)},use:function(Ki){Nr.setFBO({framebuffer:Nn},Ki)}})}function mn(Ui){var Bi=Array(6);function pn(aa){var Ki,Cn={color:null},ia=0,sa=null,ba="rgba",is="uint8",Zs=1;if(typeof aa=="number")ia=aa|0;else if(!aa)ia=1;else{var Va=aa;if("shape"in Va){var Ml=Va.shape;ia=Ml[0]}else"radius"in Va&&(ia=Va.radius|0),"width"in Va?(ia=Va.width|0,"height"in Va):"height"in Va&&(ia=Va.height|0);("color"in Va||"colors"in Va)&&(sa=Va.color||Va.colors,Array.isArray(sa)),sa||("colorCount"in Va&&(Zs=Va.colorCount|0),"colorType"in Va&&(is=Va.colorType),"colorFormat"in Va&&(ba=Va.colorFormat)),"depth"in Va&&(Cn.depth=Va.depth),"stencil"in Va&&(Cn.stencil=Va.stencil),"depthStencil"in Va&&(Cn.depthStencil=Va.depthStencil)}var zo;if(sa)if(Array.isArray(sa))for(zo=[],Ki=0;Ki<sa.length;++Ki)zo[Ki]=sa[Ki];else zo=[sa];else{zo=Array(Zs);var Qs={radius:ia,format:ba,type:is};for(Ki=0;Ki<Zs;++Ki)zo[Ki]=Lr.createCube(Qs)}for(Cn.color=Array(zo.length),Ki=0;Ki<zo.length;++Ki){var al=zo[Ki];ia=ia||al.width,Cn.color[Ki]={target:_u,data:zo[Ki]}}for(Ki=0;Ki<6;++Ki){for(var Vl=0;Vl<zo.length;++Vl)Cn.color[Vl].target=_u+Ki;Ki>0&&(Cn.depth=Bi[0].depth,Cn.stencil=Bi[0].stencil,Cn.depthStencil=Bi[0].depthStencil),Bi[Ki]?Bi[Ki](Cn):Bi[Ki]=si(Cn)}return e(pn,{width:ia,height:ia,color:zo})}function Nn(aa){var Ki,Cn=aa|0;if(Cn===pn.width)return pn;var ia=pn.color;for(Ki=0;Ki<ia.length;++Ki)ia[Ki].resize(Cn);for(Ki=0;Ki<6;++Ki)Bi[Ki].resize(Cn);return pn.width=pn.height=Cn,pn}return pn(Ui),e(pn,{faces:Bi,resize:Nn,_reglType:"framebufferCube",destroy:function(){Bi.forEach(function(aa){aa.destroy()})}})}function Ji(){Nr.cur=null,Nr.next=null,Nr.dirty=!0,gt(ui).forEach(function(Ui){Ui.framebuffer=Me.createFramebuffer(),fi(Ui)})}return e(Nr,{getFramebuffer:function(Ui){if(typeof Ui=="function"&&Ui._reglType==="framebuffer"){var Bi=Ui._framebuffer;if(Bi instanceof nn)return Bi}return null},create:si,createCube:mn,clear:function(){gt(ui).forEach(qn)},restore:Ji})}var Xh=5126,If=34962,Cs=34963;function du(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=Xh,this.offset=0,this.stride=0,this.divisor=0}function ku(Me,bt,Ot,Lr,Vr,Or,Nr){for(var vi=Ot.maxAttributes,Ni=new Array(vi),qi=0;qi<vi;++qi)Ni[qi]=new du;var Si=0,Vn={},Qi={Record:du,scope:{},state:Ni,currentVAO:null,targetVAO:null,restore:oi()?Xi:function(){},createVAO:qn,getVAO:Zr,destroyBuffer:ji,setVAO:oi()?yi:Ii,clear:oi()?ui:function(){}};function ji(fi){for(var si=0;si<Ni.length;++si){var mn=Ni[si];mn.buffer===fi&&(Me.disableVertexAttribArray(si),mn.buffer=null)}}function oi(){return bt.oes_vertex_array_object}function Tr(){return bt.angle_instanced_arrays}function Zr(fi){return typeof fi=="function"&&fi._vao?fi._vao:null}function yi(fi){if(fi!==Qi.currentVAO){var si=oi();fi?si.bindVertexArrayOES(fi.vao):si.bindVertexArrayOES(null),Qi.currentVAO=fi}}function Ii(fi){if(fi!==Qi.currentVAO){if(fi)fi.bindAttrs();else{for(var si=Tr(),mn=0;mn<Ni.length;++mn){var Ji=Ni[mn];Ji.buffer?(Me.enableVertexAttribArray(mn),Ji.buffer.bind(),Me.vertexAttribPointer(mn,Ji.size,Ji.type,Ji.normalized,Ji.stride,Ji.offfset),si&&Ji.divisor&&si.vertexAttribDivisorANGLE(mn,Ji.divisor)):(Me.disableVertexAttribArray(mn),Me.vertexAttrib4f(mn,Ji.x,Ji.y,Ji.z,Ji.w))}Nr.elements?Me.bindBuffer(Cs,Nr.elements.buffer.buffer):Me.bindBuffer(Cs,null)}Qi.currentVAO=fi}}function ui(){gt(Vn).forEach(function(fi){fi.destroy()})}function nn(){this.id=++Si,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var fi=oi();fi?this.vao=fi.createVertexArrayOES():this.vao=null,Vn[this.id]=this,this.buffers=[]}nn.prototype.bindAttrs=function(){for(var fi=Tr(),si=this.attributes,mn=0;mn<si.length;++mn){var Ji=si[mn];Ji.buffer?(Me.enableVertexAttribArray(mn),Me.bindBuffer(If,Ji.buffer.buffer),Me.vertexAttribPointer(mn,Ji.size,Ji.type,Ji.normalized,Ji.stride,Ji.offset),fi&&Ji.divisor&&fi.vertexAttribDivisorANGLE(mn,Ji.divisor)):(Me.disableVertexAttribArray(mn),Me.vertexAttrib4f(mn,Ji.x,Ji.y,Ji.z,Ji.w))}for(var Ui=si.length;Ui<vi;++Ui)Me.disableVertexAttribArray(Ui);var Bi=Or.getElements(this.elements);Bi?Me.bindBuffer(Cs,Bi.buffer.buffer):Me.bindBuffer(Cs,null)},nn.prototype.refresh=function(){var fi=oi();fi&&(fi.bindVertexArrayOES(this.vao),this.bindAttrs(),Qi.currentVAO=null,fi.bindVertexArrayOES(null))},nn.prototype.destroy=function(){if(this.vao){var fi=oi();this===Qi.currentVAO&&(Qi.currentVAO=null,fi.bindVertexArrayOES(null)),fi.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),Vn[this.id]&&(delete Vn[this.id],Lr.vaoCount-=1)};function Xi(){var fi=oi();fi&>(Vn).forEach(function(si){si.refresh()})}function qn(fi){var si=new nn;Lr.vaoCount+=1;function mn(Ji){var Ui;if(Array.isArray(Ji))Ui=Ji,si.elements&&si.ownsElements&&si.elements.destroy(),si.elements=null,si.ownsElements=!1,si.offset=0,si.count=0,si.instances=-1,si.primitive=4;else{if(Ji.elements){var Bi=Ji.elements;si.ownsElements?typeof Bi=="function"&&Bi._reglType==="elements"?(si.elements.destroy(),si.ownsElements=!1):(si.elements(Bi),si.ownsElements=!1):Or.getElements(Ji.elements)?(si.elements=Ji.elements,si.ownsElements=!1):(si.elements=Or.create(Ji.elements),si.ownsElements=!0)}else si.elements=null,si.ownsElements=!1;Ui=Ji.attributes,si.offset=0,si.count=-1,si.instances=-1,si.primitive=4,si.elements&&(si.count=si.elements._elements.vertCount,si.primitive=si.elements._elements.primType),"offset"in Ji&&(si.offset=Ji.offset|0),"count"in Ji&&(si.count=Ji.count|0),"instances"in Ji&&(si.instances=Ji.instances|0),"primitive"in Ji&&(si.primitive=Mn[Ji.primitive])}var pn={},Nn=si.attributes;Nn.length=Ui.length;for(var aa=0;aa<Ui.length;++aa){var Ki=Ui[aa],Cn=Nn[aa]=new du,ia=Ki.data||Ki;if(Array.isArray(ia)||qr(ia)||jr(ia)){var sa;si.buffers[aa]&&(sa=si.buffers[aa],qr(ia)&&sa._buffer.byteLength>=ia.byteLength?sa.subdata(ia):(sa.destroy(),si.buffers[aa]=null)),si.buffers[aa]||(sa=si.buffers[aa]=Vr.create(Ki,If,!1,!0)),Cn.buffer=Vr.getBuffer(sa),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1,pn[aa]=1}else Vr.getBuffer(Ki)?(Cn.buffer=Vr.getBuffer(Ki),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1):Vr.getBuffer(Ki.buffer)?(Cn.buffer=Vr.getBuffer(Ki.buffer),Cn.size=(+Ki.size||Cn.buffer.dimension)|0,Cn.normalized=!!Ki.normalized||!1,"type"in Ki?Cn.type=un[Ki.type]:Cn.type=Cn.buffer.dtype,Cn.offset=(Ki.offset||0)|0,Cn.stride=(Ki.stride||0)|0,Cn.divisor=(Ki.divisor||0)|0,Cn.state=1):"x"in Ki&&(Cn.x=+Ki.x||0,Cn.y=+Ki.y||0,Cn.z=+Ki.z||0,Cn.w=+Ki.w||0,Cn.state=2)}for(var ba=0;ba<si.buffers.length;++ba)!pn[ba]&&si.buffers[ba]&&(si.buffers[ba].destroy(),si.buffers[ba]=null);return si.refresh(),mn}return mn.destroy=function(){for(var Ji=0;Ji<si.buffers.length;++Ji)si.buffers[Ji]&&si.buffers[Ji].destroy();si.buffers.length=0,si.ownsElements&&(si.elements.destroy(),si.elements=null,si.ownsElements=!1),si.destroy()},mn._vao=si,mn._reglType="vao",mn(fi)}return Qi}var Xf=35632,Us=35633,wf=35718,zc=35721;function Wu(Me,bt,Ot,Lr){var Vr={},Or={};function Nr(Tr,Zr,yi,Ii){this.name=Tr,this.id=Zr,this.location=yi,this.info=Ii}function vi(Tr,Zr){for(var yi=0;yi<Tr.length;++yi)if(Tr[yi].id===Zr.id){Tr[yi].location=Zr.location;return}Tr.push(Zr)}function Ni(Tr,Zr,yi){var Ii=Tr===Xf?Vr:Or,ui=Ii[Zr];if(!ui){var nn=bt.str(Zr);ui=Me.createShader(Tr),Me.shaderSource(ui,nn),Me.compileShader(ui),Ii[Zr]=ui}return ui}var qi={},Si=[],Vn=0;function Qi(Tr,Zr){this.id=Vn++,this.fragId=Tr,this.vertId=Zr,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Lr.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function ji(Tr,Zr,yi){var Ii,ui,nn=Ni(Xf,Tr.fragId),Xi=Ni(Us,Tr.vertId),qn=Tr.program=Me.createProgram();if(Me.attachShader(qn,nn),Me.attachShader(qn,Xi),yi)for(Ii=0;Ii<yi.length;++Ii){var fi=yi[Ii];Me.bindAttribLocation(qn,fi[0],fi[1])}Me.linkProgram(qn);var si=Me.getProgramParameter(qn,wf);Lr.profile&&(Tr.stats.uniformsCount=si);var mn=Tr.uniforms;for(Ii=0;Ii<si;++Ii)if(ui=Me.getActiveUniform(qn,Ii),ui)if(ui.size>1)for(var Ji=0;Ji<ui.size;++Ji){var Ui=ui.name.replace("[0]","["+Ji+"]");vi(mn,new Nr(Ui,bt.id(Ui),Me.getUniformLocation(qn,Ui),ui))}else vi(mn,new Nr(ui.name,bt.id(ui.name),Me.getUniformLocation(qn,ui.name),ui));var Bi=Me.getProgramParameter(qn,zc);Lr.profile&&(Tr.stats.attributesCount=Bi);var pn=Tr.attributes;for(Ii=0;Ii<Bi;++Ii)ui=Me.getActiveAttrib(qn,Ii),ui&&vi(pn,new Nr(ui.name,bt.id(ui.name),Me.getAttribLocation(qn,ui.name),ui))}Lr.profile&&(Ot.getMaxUniformsCount=function(){var Tr=0;return Si.forEach(function(Zr){Zr.stats.uniformsCount>Tr&&(Tr=Zr.stats.uniformsCount)}),Tr},Ot.getMaxAttributesCount=function(){var Tr=0;return Si.forEach(function(Zr){Zr.stats.attributesCount>Tr&&(Tr=Zr.stats.attributesCount)}),Tr});function oi(){Vr={},Or={};for(var Tr=0;Tr<Si.length;++Tr)ji(Si[Tr],null,Si[Tr].attributes.map(function(Zr){return[Zr.location,Zr.name]}))}return{clear:function(){var Tr=Me.deleteShader.bind(Me);gt(Vr).forEach(Tr),Vr={},gt(Or).forEach(Tr),Or={},Si.forEach(function(Zr){Me.deleteProgram(Zr.program)}),Si.length=0,qi={},Ot.shaderCount=0},program:function(Tr,Zr,yi,Ii){var ui=qi[Zr];ui||(ui=qi[Zr]={});var nn=ui[Tr];if(nn&&(nn.refCount++,!Ii))return nn;var Xi=new Qi(Zr,Tr);return Ot.shaderCount++,ji(Xi,yi,Ii),nn||(ui[Tr]=Xi),Si.push(Xi),e(Xi,{destroy:function(){if(Xi.refCount--,Xi.refCount<=0){Me.deleteProgram(Xi.program);var qn=Si.indexOf(Xi);Si.splice(qn,1),Ot.shaderCount--}ui[Xi.vertId].refCount<=0&&(Me.deleteShader(Or[Xi.vertId]),delete Or[Xi.vertId],delete qi[Xi.fragId][Xi.vertId]),Object.keys(qi[Xi.fragId]).length||(Me.deleteShader(Vr[Xi.fragId]),delete Vr[Xi.fragId],delete qi[Xi.fragId])}})},restore:oi,shader:Ni,frag:-1,vert:-1}}var Rf=6408,Xu=5121,uf=3333,Zf=5126;function Wl(Me,bt,Ot,Lr,Vr,Or,Nr){function vi(Si){var Vn;bt.next===null?Vn=Xu:Vn=bt.next.colorAttachments[0].texture._texture.type;var Qi=0,ji=0,oi=Lr.framebufferWidth,Tr=Lr.framebufferHeight,Zr=null;qr(Si)?Zr=Si:Si&&(Qi=Si.x|0,ji=Si.y|0,oi=(Si.width||Lr.framebufferWidth-Qi)|0,Tr=(Si.height||Lr.framebufferHeight-ji)|0,Zr=Si.data||null),Ot();var yi=oi*Tr*4;return Zr||(Vn===Xu?Zr=new Uint8Array(yi):Vn===Zf&&(Zr=Zr||new Float32Array(yi))),Me.pixelStorei(uf,4),Me.readPixels(Qi,ji,oi,Tr,Rf,Vn,Zr),Zr}function Ni(Si){var Vn;return bt.setFBO({framebuffer:Si.framebuffer},function(){Vn=vi(Si)}),Vn}function qi(Si){return!Si||!("framebuffer"in Si)?vi(Si):Ni(Si)}return qi}var ah=0,Zu="";function qc(Me){return vu(Tc(fc(Me)))}function Tc(Me){return kt(Yi(Bc(Me),Me.length*8))}function wl(Me,bt){var Ot=Bc(Me);Ot.length>16&&(Ot=Yi(Ot,Me.length*8));for(var Lr=Array(16),Vr=Array(16),Or=0;Or<16;Or++)Lr[Or]=Ot[Or]^909522486,Vr[Or]=Ot[Or]^1549556828;var Nr=Yi(Lr.concat(Bc(bt)),512+bt.length*8);return kt(Yi(Vr.concat(Nr),768))}function vu(Me){for(var bt=ah?"0123456789ABCDEF":"0123456789abcdef",Ot="",Lr,Vr=0;Vr<Me.length;Vr++)Lr=Me.charCodeAt(Vr),Ot+=bt.charAt(Lr>>>4&15)+bt.charAt(Lr&15);return Ot}function Oc(Me){for(var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ot="",Lr=Me.length,Vr=0;Vr<Lr;Vr+=3)for(var Or=Me.charCodeAt(Vr)<<16|(Vr+1<Lr?Me.charCodeAt(Vr+1)<<8:0)|(Vr+2<Lr?Me.charCodeAt(Vr+2):0),Nr=0;Nr<4;Nr++)Vr*8+Nr*6>Me.length*8?Ot+=Zu:Ot+=bt.charAt(Or>>>6*(3-Nr)&63);return Ot}function cf(Me,bt){var Ot=bt.length,Lr=Array(),Vr,Or,Nr,vi,Ni=Array(Math.ceil(Me.length/2));for(Vr=0;Vr<Ni.length;Vr++)Ni[Vr]=Me.charCodeAt(Vr*2)<<8|Me.charCodeAt(Vr*2+1);for(;Ni.length>0;){for(vi=Array(),Nr=0,Vr=0;Vr<Ni.length;Vr++)Nr=(Nr<<16)+Ni[Vr],Or=Math.floor(Nr/Ot),Nr-=Or*Ot,(vi.length>0||Or>0)&&(vi[vi.length]=Or);Lr[Lr.length]=Nr,Ni=vi}var qi="";for(Vr=Lr.length-1;Vr>=0;Vr--)qi+=bt.charAt(Lr[Vr]);var Si=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(Vr=qi.length;Vr<Si;Vr++)qi=bt[0]+qi;return qi}function fc(Me){for(var bt="",Ot=-1,Lr,Vr;++Ot<Me.length;)Lr=Me.charCodeAt(Ot),Vr=Ot+1<Me.length?Me.charCodeAt(Ot+1):0,55296<=Lr&&Lr<=56319&&56320<=Vr&&Vr<=57343&&(Lr=65536+((Lr&1023)<<10)+(Vr&1023),Ot++),Lr<=127?bt+=String.fromCharCode(Lr):Lr<=2047?bt+=String.fromCharCode(192|Lr>>>6&31,128|Lr&63):Lr<=65535?bt+=String.fromCharCode(224|Lr>>>12&15,128|Lr>>>6&63,128|Lr&63):Lr<=2097151&&(bt+=String.fromCharCode(240|Lr>>>18&7,128|Lr>>>12&63,128|Lr>>>6&63,128|Lr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),Ot=0;Ot<bt.length;Ot++)bt[Ot]=0;for(var Ot=0;Ot<Me.length*8;Ot+=8)bt[Ot>>5]|=(Me.charCodeAt(Ot/8)&255)<<24-Ot%32;return bt}function kt(Me){for(var bt="",Ot=0;Ot<Me.length*32;Ot+=8)bt+=String.fromCharCode(Me[Ot>>5]>>>24-Ot%32&255);return bt}function Zt(Me,bt){return Me>>>bt|Me<<32-bt}function Mr(Me,bt){return Me>>>bt}function xr(Me,bt,Ot){return Me&bt^~Me&Ot}function Kr(Me,bt,Ot){return Me&bt^Me&Ot^bt&Ot}function Mi(Me){return Zt(Me,2)^Zt(Me,13)^Zt(Me,22)}function Wi(Me){return Zt(Me,6)^Zt(Me,11)^Zt(Me,25)}function dn(Me){return Zt(Me,7)^Zt(Me,18)^Mr(Me,3)}function wn(Me){return Zt(Me,17)^Zt(Me,19)^Mr(Me,10)}var On=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Yi(Me,bt){var Ot=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Lr=new Array(64),Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,Qi=0;Qi<Me.length;Qi+=16){for(Vr=Ot[0],Or=Ot[1],Nr=Ot[2],vi=Ot[3],Ni=Ot[4],qi=Ot[5],Si=Ot[6],Vn=Ot[7],ji=0;ji<64;ji++)ji<16?Lr[ji]=Me[ji+Qi]:Lr[ji]=$i($i($i(wn(Lr[ji-2]),Lr[ji-7]),dn(Lr[ji-15])),Lr[ji-16]),oi=$i($i($i($i(Vn,Wi(Ni)),xr(Ni,qi,Si)),On[ji]),Lr[ji]),Tr=$i(Mi(Vr),Kr(Vr,Or,Nr)),Vn=Si,Si=qi,qi=Ni,Ni=$i(vi,oi),vi=Nr,Nr=Or,Or=Vr,Vr=$i(oi,Tr);Ot[0]=$i(Vr,Ot[0]),Ot[1]=$i(Or,Ot[1]),Ot[2]=$i(Nr,Ot[2]),Ot[3]=$i(vi,Ot[3]),Ot[4]=$i(Ni,Ot[4]),Ot[5]=$i(qi,Ot[5]),Ot[6]=$i(Si,Ot[6]),Ot[7]=$i(Vn,Ot[7])}return Ot}function $i(Me,bt){var Ot=(Me&65535)+(bt&65535),Lr=(Me>>16)+(bt>>16)+(Ot>>16);return Lr<<16|Ot&65535}function an(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return an(Me).join("")}function ta(Me){var bt=Me&&Me.cache,Ot=0,Lr=[],Vr=[],Or=[];function Nr(oi,Tr){var Zr=Tr&&Tr.stable;if(!Zr){for(var yi=0;yi<Vr.length;++yi)if(Vr[yi]===oi&&!Or[yi])return Lr[yi]}var Ii="g"+Ot++;return Lr.push(Ii),Vr.push(oi),Or.push(Zr),Ii}function vi(){var oi=[];function Tr(){oi.push.apply(oi,an(arguments))}var Zr=[];function yi(){var Ii="v"+Ot++;return Zr.push(Ii),arguments.length>0&&(oi.push(Ii,"="),oi.push.apply(oi,an(arguments)),oi.push(";")),Ii}return e(Tr,{def:yi,toString:function(){return Fi([Zr.length>0?"var "+Zr.join(",")+";":"",Fi(oi)])}})}function Ni(){var oi=vi(),Tr=vi(),Zr=oi.toString,yi=Tr.toString;function Ii(ui,nn){Tr(ui,nn,"=",oi.def(ui,nn),";")}return e(function(){oi.apply(oi,an(arguments))},{def:oi.def,entry:oi,exit:Tr,save:Ii,set:function(ui,nn,Xi){Ii(ui,nn),oi(ui,nn,"=",Xi,";")},toString:function(){return Zr()+yi()}})}function qi(){var oi=Fi(arguments),Tr=Ni(),Zr=Ni(),yi=Tr.toString,Ii=Zr.toString;return e(Tr,{then:function(){return Tr.apply(Tr,an(arguments)),this},else:function(){return Zr.apply(Zr,an(arguments)),this},toString:function(){var ui=Ii();return ui&&(ui="else{"+ui+"}"),Fi(["if(",oi,"){",yi(),"}",ui])}})}var Si=vi(),Vn={};function Qi(oi,Tr){var Zr=[];function yi(){var qn="a"+Zr.length;return Zr.push(qn),qn}Tr=Tr||0;for(var Ii=0;Ii<Tr;++Ii)yi();var ui=Ni(),nn=ui.toString,Xi=Vn[oi]=e(ui,{arg:yi,toString:function(){return Fi(["function(",Zr.join(),"){",nn(),"}"])}});return Xi}function ji(){var oi=['"use strict";',Si,"return {"];Object.keys(Vn).forEach(function(Ii){oi.push('"',Ii,'":',Vn[Ii].toString(),",")}),oi.push("}");var Tr=Fi(oi).replace(/;/g,`;
|
||
`).replace(/}/g,`}
|
||
`).replace(/{/g,`{
|
||
`),Zr;if(bt&&(Zr=qc(Tr),bt[Zr]))return bt[Zr].apply(null,Vr);var yi=Function.apply(null,Lr.concat(Tr));return bt&&(bt[Zr]=yi),yi.apply(null,Vr)}return{global:Si,link:Nr,block:vi,proc:Qi,scope:Ni,cond:qi,compile:ji}}var Ca="xyzw".split(""),Ra=5121,La=1,Na=2,Zn=0,Dn=1,Ka=2,bo=3,Zo=4,Ss=5,as=6,ws="dither",Ho="blend.enable",ml="blend.color",Ws="blend.equation",Ls="blend.func",va="depth.enable",no="depth.func",ys="depth.range",rs="depth.mask",Ql="colorMask",Cu="cull.enable",Yu="cull.face",Nc="frontFace",pu="lineWidth",Uc="polygonOffset.enable",xu="polygonOffset.offset",Ac="sample.alpha",Ua="sample.enable",oo="sample.coverage",Vc="stencil.enable",hc="stencil.mask",Ku="stencil.func",ue="stencil.opFront",w="stencil.opBack",B="scissor.enable",Q="scissor.box",ee="viewport",le="profile",ze="framebuffer",Ze="vert",ut="frag",Mt="elements",Jt="primitive",$t="count",mr="offset",Cr="instances",ve="vao",xe="Width",Ie="Height",qe=ze+xe,Qe=ze+Ie,Xe=ee+xe,nt=ee+Ie,qt="drawingBuffer",jt=qt+xe,ar=qt+Ie,fr=[Ls,Ws,Ku,ue,w,oo,ee,Q,xu],br=34962,Fr=34963,Hr=2884,ri=3042,Ci=3024,cn=2960,sn=2929,Ln=3089,Yn=32823,Aa=32926,fa=32928,$a=5126,Co=35664,Qa=35665,mo=35666,Bo=5124,Ps=35667,Ts=35668,wo=35669,To=35670,hl=35671,Ul=35672,Lu=35673,au=35674,Js=35675,eu=35676,dc=35678,Tl=35680,Al=4,X=1028,se=1029,Te=2304,Oe=2305,Ve=32775,Ye=32776,Pt=519,at=7680,Wt=0,dr=1,pr=32774,Ur=513,zr=36160,gi=36064,xi={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},Wr={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},ii={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},di={cw:Te,ccw:Oe};function Li(Me){return Array.isArray(Me)||qr(Me)||jr(Me)}function Ti(Me){return Me.sort(function(bt,Ot){return bt===ee?-1:Ot===ee?1:bt<Ot?-1:1})}function Qr(Me,bt,Ot,Lr){this.thisDep=Me,this.contextDep=bt,this.propDep=Ot,this.append=Lr}function Pn(Me){return Me&&!(Me.thisDep||Me.contextDep||Me.propDep)}function kn(Me){return new Qr(!1,!1,!1,Me)}function Bn(Me,bt){var Ot=Me.type;if(Ot===Zn){var Lr=Me.data.length;return new Qr(!0,Lr>=1,Lr>=2,bt)}else if(Ot===Zo){var Vr=Me.data;return new Qr(Vr.thisDep,Vr.contextDep,Vr.propDep,bt)}else{if(Ot===Ss)return new Qr(!1,!1,!1,bt);if(Ot===as){for(var Or=!1,Nr=!1,vi=!1,Ni=0;Ni<Me.data.length;++Ni){var qi=Me.data[Ni];if(qi.type===Dn)vi=!0;else if(qi.type===Ka)Nr=!0;else if(qi.type===bo)Or=!0;else if(qi.type===Zn){Or=!0;var Si=qi.data;Si>=1&&(Nr=!0),Si>=2&&(vi=!0)}else qi.type===Zo&&(Or=Or||qi.data.thisDep,Nr=Nr||qi.data.contextDep,vi=vi||qi.data.propDep)}return new Qr(Or,Nr,vi,bt)}else return new Qr(Ot===bo,Ot===Ka,Ot===Dn,bt)}}var na=new Qr(!1,!1,!1,function(){});function Ea(Me,bt,Ot,Lr,Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr){var Zr=qi.Record,yi={add:32774,subtract:32778,"reverse subtract":32779};Ot.ext_blend_minmax&&(yi.min=Ve,yi.max=Ye);var Ii=Ot.angle_instanced_arrays,ui=Ot.webgl_draw_buffers,nn=Ot.oes_vertex_array_object,Xi={dirty:!0,profile:Tr.profile},qn={},fi=[],si={},mn={};function Ji(Ne){return Ne.replace(".","_")}function Ui(Ne,$e,ot){var It=Ji(Ne);fi.push(Ne),qn[It]=Xi[It]=!!ot,si[It]=$e}function Bi(Ne,$e,ot){var It=Ji(Ne);fi.push(Ne),Array.isArray(ot)?(Xi[It]=ot.slice(),qn[It]=ot.slice()):Xi[It]=qn[It]=ot,mn[It]=$e}function pn(Ne){return!!isNaN(Ne)}Ui(ws,Ci),Ui(Ho,ri),Bi(ml,"blendColor",[0,0,0,0]),Bi(Ws,"blendEquationSeparate",[pr,pr]),Bi(Ls,"blendFuncSeparate",[dr,Wt,dr,Wt]),Ui(va,sn,!0),Bi(no,"depthFunc",Ur),Bi(ys,"depthRange",[0,1]),Bi(rs,"depthMask",!0),Bi(Ql,Ql,[!0,!0,!0,!0]),Ui(Cu,Hr),Bi(Yu,"cullFace",se),Bi(Nc,Nc,Oe),Bi(pu,pu,1),Ui(Uc,Yn),Bi(xu,"polygonOffset",[0,0]),Ui(Ac,Aa),Ui(Ua,fa),Bi(oo,"sampleCoverage",[1,!1]),Ui(Vc,cn),Bi(hc,"stencilMask",-1),Bi(Ku,"stencilFunc",[Pt,0,-1]),Bi(ue,"stencilOpSeparate",[X,at,at,at]),Bi(w,"stencilOpSeparate",[se,at,at,at]),Ui(B,Ln),Bi(Q,"scissor",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Bi(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Nn={gl:Me,context:Qi,strings:bt,next:qn,current:Xi,draw:Vn,elements:Or,buffer:Vr,shader:Si,attributes:qi.state,vao:qi,uniforms:Ni,framebuffer:vi,extensions:Ot,timer:ji,isBufferArgs:Li},aa={primTypes:Mn,compareFuncs:Wr,blendFuncs:xi,blendEquations:yi,stencilOps:ii,glTypes:un,orientationType:di};ui&&(aa.backBuffer=[se],aa.drawBuffer=S(Lr.maxDrawbuffers,function(Ne){return Ne===0?[0]:S(Ne,function($e){return gi+$e})}));var Ki=0;function Cn(){var Ne=ta({cache:oi}),$e=Ne.link,ot=Ne.global;Ne.id=Ki++,Ne.batchId="0";var It=$e(Nn),Bt=Ne.shared={props:"a0"};Object.keys(Nn).forEach(function(Dt){Bt[Dt]=ot.def(It,".",Dt)});var Ft=Ne.next={},Ut=Ne.current={};Object.keys(mn).forEach(function(Dt){Array.isArray(Xi[Dt])&&(Ft[Dt]=ot.def(Bt.next,".",Dt),Ut[Dt]=ot.def(Bt.current,".",Dt))});var zt=Ne.constants={};Object.keys(aa).forEach(function(Dt){zt[Dt]=ot.def(JSON.stringify(aa[Dt]))}),Ne.invoke=function(Dt,vt){switch(vt.type){case Zn:var lr=["this",Bt.context,Bt.props,Ne.batchId];return Dt.def($e(vt.data),".call(",lr.slice(0,Math.max(vt.data.length+1,4)),")");case Dn:return Dt.def(Bt.props,vt.data);case Ka:return Dt.def(Bt.context,vt.data);case bo:return Dt.def("this",vt.data);case Zo:return vt.data.append(Ne,Dt),vt.data.ref;case Ss:return vt.data.toString();case as:return vt.data.map(function(yr){return Ne.invoke(Dt,yr)})}},Ne.attribCache={};var _t={};return Ne.scopeAttrib=function(Dt){var vt=bt.id(Dt);if(vt in _t)return _t[vt];var lr=qi.scope[vt];lr||(lr=qi.scope[vt]=new Zr);var yr=_t[vt]=$e(lr);return yr},Ne}function ia(Ne){var $e=Ne.static,ot=Ne.dynamic,It;if(le in $e){var Bt=!!$e[le];It=kn(function(Ut,zt){return Bt}),It.enable=Bt}else if(le in ot){var Ft=ot[le];It=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}return It}function sa(Ne,$e){var ot=Ne.static,It=Ne.dynamic;if(ze in ot){var Bt=ot[ze];return Bt?(Bt=vi.getFramebuffer(Bt),kn(function(Ut,zt){var _t=Ut.link(Bt),Dt=Ut.shared;zt.set(Dt.framebuffer,".next",_t);var vt=Dt.context;return zt.set(vt,"."+qe,_t+".width"),zt.set(vt,"."+Qe,_t+".height"),_t})):kn(function(Ut,zt){var _t=Ut.shared;zt.set(_t.framebuffer,".next","null");var Dt=_t.context;return zt.set(Dt,"."+qe,Dt+"."+jt),zt.set(Dt,"."+Qe,Dt+"."+ar),"null"})}else if(ze in It){var Ft=It[ze];return Bn(Ft,function(Ut,zt){var _t=Ut.invoke(zt,Ft),Dt=Ut.shared,vt=Dt.framebuffer,lr=zt.def(vt,".getFramebuffer(",_t,")");zt.set(vt,".next",lr);var yr=Dt.context;return zt.set(yr,"."+qe,lr+"?"+lr+".width:"+yr+"."+jt),zt.set(yr,"."+Qe,lr+"?"+lr+".height:"+yr+"."+ar),lr})}else return null}function ba(Ne,$e,ot){var It=Ne.static,Bt=Ne.dynamic;function Ft(_t){if(_t in It){var Dt=It[_t],vt=!0,lr=Dt.x|0,yr=Dt.y|0,Br,Di;return"width"in Dt?Br=Dt.width|0:vt=!1,"height"in Dt?Di=Dt.height|0:vt=!1,new Qr(!vt&&$e&&$e.thisDep,!vt&&$e&&$e.contextDep,!vt&&$e&&$e.propDep,function(gn,tn){var Ei=gn.shared.context,Oi=Br;"width"in Dt||(Oi=tn.def(Ei,".",qe,"-",lr));var Gi=Di;return"height"in Dt||(Gi=tn.def(Ei,".",Qe,"-",yr)),[lr,yr,Oi,Gi]})}else if(_t in Bt){var ci=Bt[_t],bi=Bn(ci,function(gn,tn){var Ei=gn.invoke(tn,ci),Oi=gn.shared.context,Gi=tn.def(Ei,".x|0"),on=tn.def(Ei,".y|0"),zn=tn.def('"width" in ',Ei,"?",Ei,".width|0:","(",Oi,".",qe,"-",Gi,")"),Ja=tn.def('"height" in ',Ei,"?",Ei,".height|0:","(",Oi,".",Qe,"-",on,")");return[Gi,on,zn,Ja]});return $e&&(bi.thisDep=bi.thisDep||$e.thisDep,bi.contextDep=bi.contextDep||$e.contextDep,bi.propDep=bi.propDep||$e.propDep),bi}else return $e?new Qr($e.thisDep,$e.contextDep,$e.propDep,function(gn,tn){var Ei=gn.shared.context;return[0,0,tn.def(Ei,".",qe),tn.def(Ei,".",Qe)]}):null}var Ut=Ft(ee);if(Ut){var zt=Ut;Ut=new Qr(Ut.thisDep,Ut.contextDep,Ut.propDep,function(_t,Dt){var vt=zt.append(_t,Dt),lr=_t.shared.context;return Dt.set(lr,"."+Xe,vt[2]),Dt.set(lr,"."+nt,vt[3]),vt})}return{viewport:Ut,scissor_box:Ft(Q)}}function is(Ne,$e){var ot=Ne.static,It=typeof ot[ut]=="string"&&typeof ot[Ze]=="string";if(It){if(Object.keys($e.dynamic).length>0)return null;var Bt=$e.static,Ft=Object.keys(Bt);if(Ft.length>0&&typeof Bt[Ft[0]]=="number"){for(var Ut=[],zt=0;zt<Ft.length;++zt)Ut.push([Bt[Ft[zt]]|0,Ft[zt]]);return Ut}}return null}function Zs(Ne,$e,ot){var It=Ne.static,Bt=Ne.dynamic;function Ft(vt){if(vt in It){var lr=bt.id(It[vt]),yr=kn(function(){return lr});return yr.id=lr,yr}else if(vt in Bt){var Br=Bt[vt];return Bn(Br,function(Di,ci){var bi=Di.invoke(ci,Br),gn=ci.def(Di.shared.strings,".id(",bi,")");return gn})}return null}var Ut=Ft(ut),zt=Ft(Ze),_t=null,Dt;return Pn(Ut)&&Pn(zt)?(_t=Si.program(zt.id,Ut.id,null,ot),Dt=kn(function(vt,lr){return vt.link(_t)})):Dt=new Qr(Ut&&Ut.thisDep||zt&&zt.thisDep,Ut&&Ut.contextDep||zt&&zt.contextDep,Ut&&Ut.propDep||zt&&zt.propDep,function(vt,lr){var yr=vt.shared.shader,Br;Ut?Br=Ut.append(vt,lr):Br=lr.def(yr,".",ut);var Di;zt?Di=zt.append(vt,lr):Di=lr.def(yr,".",Ze);var ci=yr+".program("+Di+","+Br;return lr.def(ci+")")}),{frag:Ut,vert:zt,progVar:Dt,program:_t}}function Va(Ne,$e){var ot=Ne.static,It=Ne.dynamic,Bt={},Ft=!1;function Ut(){if(ve in ot){var tn=ot[ve];return tn!==null&&qi.getVAO(tn)===null&&(tn=qi.createVAO(tn)),Ft=!0,Bt.vao=tn,kn(function(Oi){var Gi=qi.getVAO(tn);return Gi?Oi.link(Gi):"null"})}else if(ve in It){Ft=!0;var Ei=It[ve];return Bn(Ei,function(Oi,Gi){var on=Oi.invoke(Gi,Ei);return Gi.def(Oi.shared.vao+".getVAO("+on+")")})}return null}var zt=Ut(),_t=!1;function Dt(){if(Mt in ot){var tn=ot[Mt];if(Bt.elements=tn,Li(tn)){var Ei=Bt.elements=Or.create(tn,!0);tn=Or.getElements(Ei),_t=!0}else tn&&(tn=Or.getElements(tn),_t=!0);var Oi=kn(function(on,zn){if(tn){var Ja=on.link(tn);return on.ELEMENTS=Ja,Ja}return on.ELEMENTS=null,null});return Oi.value=tn,Oi}else if(Mt in It){_t=!0;var Gi=It[Mt];return Bn(Gi,function(on,zn){var Ja=on.shared,co=Ja.isBufferArgs,ts=Ja.elements,so=on.invoke(zn,Gi),Yo=zn.def("null"),ms=zn.def(co,"(",so,")"),ou=on.cond(ms).then(Yo,"=",ts,".createStream(",so,");").else(Yo,"=",ts,".getElements(",so,");");return zn.entry(ou),zn.exit(on.cond(ms).then(ts,".destroyStream(",Yo,");")),on.ELEMENTS=Yo,Yo})}else if(Ft)return new Qr(zt.thisDep,zt.contextDep,zt.propDep,function(on,zn){return zn.def(on.shared.vao+".currentVAO?"+on.shared.elements+".getElements("+on.shared.vao+".currentVAO.elements):null")});return null}var vt=Dt();function lr(){if(Jt in ot){var tn=ot[Jt];return Bt.primitive=tn,kn(function(Oi,Gi){return Mn[tn]})}else if(Jt in It){var Ei=It[Jt];return Bn(Ei,function(Oi,Gi){var on=Oi.constants.primTypes,zn=Oi.invoke(Gi,Ei);return Gi.def(on,"[",zn,"]")})}else{if(_t)return Pn(vt)?vt.value?kn(function(Oi,Gi){return Gi.def(Oi.ELEMENTS,".primType")}):kn(function(){return Al}):new Qr(vt.thisDep,vt.contextDep,vt.propDep,function(Oi,Gi){var on=Oi.ELEMENTS;return Gi.def(on,"?",on,".primType:",Al)});if(Ft)return new Qr(zt.thisDep,zt.contextDep,zt.propDep,function(Oi,Gi){return Gi.def(Oi.shared.vao+".currentVAO?"+Oi.shared.vao+".currentVAO.primitive:"+Al)})}return null}function yr(tn,Ei){if(tn in ot){var Oi=ot[tn]|0;return Ei?Bt.offset=Oi:Bt.instances=Oi,kn(function(on,zn){return Ei&&(on.OFFSET=Oi),Oi})}else if(tn in It){var Gi=It[tn];return Bn(Gi,function(on,zn){var Ja=on.invoke(zn,Gi);return Ei&&(on.OFFSET=Ja),Ja})}else if(Ei){if(_t)return kn(function(on,zn){return on.OFFSET=0,0});if(Ft)return new Qr(zt.thisDep,zt.contextDep,zt.propDep,function(on,zn){return zn.def(on.shared.vao+".currentVAO?"+on.shared.vao+".currentVAO.offset:0")})}else if(Ft)return new Qr(zt.thisDep,zt.contextDep,zt.propDep,function(on,zn){return zn.def(on.shared.vao+".currentVAO?"+on.shared.vao+".currentVAO.instances:-1")});return null}var Br=yr(mr,!0);function Di(){if($t in ot){var tn=ot[$t]|0;return Bt.count=tn,kn(function(){return tn})}else if($t in It){var Ei=It[$t];return Bn(Ei,function(zn,Ja){var co=zn.invoke(Ja,Ei);return co})}else if(_t)if(Pn(vt)){if(vt)return Br?new Qr(Br.thisDep,Br.contextDep,Br.propDep,function(zn,Ja){var co=Ja.def(zn.ELEMENTS,".vertCount-",zn.OFFSET);return co}):kn(function(zn,Ja){return Ja.def(zn.ELEMENTS,".vertCount")});var Oi=kn(function(){return-1});return Oi}else{var Gi=new Qr(vt.thisDep||Br.thisDep,vt.contextDep||Br.contextDep,vt.propDep||Br.propDep,function(zn,Ja){var co=zn.ELEMENTS;return zn.OFFSET?Ja.def(co,"?",co,".vertCount-",zn.OFFSET,":-1"):Ja.def(co,"?",co,".vertCount:-1")});return Gi}else if(Ft){var on=new Qr(zt.thisDep,zt.contextDep,zt.propDep,function(zn,Ja){return Ja.def(zn.shared.vao,".currentVAO?",zn.shared.vao,".currentVAO.count:-1")});return on}return null}var ci=lr(),bi=Di(),gn=yr(Cr,!1);return{elements:vt,primitive:ci,count:bi,instances:gn,offset:Br,vao:zt,vaoActive:Ft,elementsActive:_t,static:Bt}}function Ml(Ne,$e){var ot=Ne.static,It=Ne.dynamic,Bt={};return fi.forEach(function(Ft){var Ut=Ji(Ft);function zt(_t,Dt){if(Ft in ot){var vt=_t(ot[Ft]);Bt[Ut]=kn(function(){return vt})}else if(Ft in It){var lr=It[Ft];Bt[Ut]=Bn(lr,function(yr,Br){return Dt(yr,Br,yr.invoke(Br,lr))})}}switch(Ft){case Cu:case Ho:case ws:case Vc:case va:case B:case Uc:case Ac:case Ua:case rs:return zt(function(_t){return _t},function(_t,Dt,vt){return vt});case no:return zt(function(_t){return Wr[_t]},function(_t,Dt,vt){var lr=_t.constants.compareFuncs;return Dt.def(lr,"[",vt,"]")});case ys:return zt(function(_t){return _t},function(_t,Dt,vt){var lr=Dt.def("+",vt,"[0]"),yr=Dt.def("+",vt,"[1]");return[lr,yr]});case Ls:return zt(function(_t){var Dt="srcRGB"in _t?_t.srcRGB:_t.src,vt="srcAlpha"in _t?_t.srcAlpha:_t.src,lr="dstRGB"in _t?_t.dstRGB:_t.dst,yr="dstAlpha"in _t?_t.dstAlpha:_t.dst;return[xi[Dt],xi[lr],xi[vt],xi[yr]]},function(_t,Dt,vt){var lr=_t.constants.blendFuncs;function yr(Ei,Oi){var Gi=Dt.def('"',Ei,Oi,'" in ',vt,"?",vt,".",Ei,Oi,":",vt,".",Ei);return Gi}var Br=yr("src","RGB"),Di=yr("dst","RGB"),ci=Dt.def(lr,"[",Br,"]"),bi=Dt.def(lr,"[",yr("src","Alpha"),"]"),gn=Dt.def(lr,"[",Di,"]"),tn=Dt.def(lr,"[",yr("dst","Alpha"),"]");return[ci,gn,bi,tn]});case Ws:return zt(function(_t){if(typeof _t=="string")return[yi[_t],yi[_t]];if(typeof _t=="object")return[yi[_t.rgb],yi[_t.alpha]]},function(_t,Dt,vt){var lr=_t.constants.blendEquations,yr=Dt.def(),Br=Dt.def(),Di=_t.cond("typeof ",vt,'==="string"');return Di.then(yr,"=",Br,"=",lr,"[",vt,"];"),Di.else(yr,"=",lr,"[",vt,".rgb];",Br,"=",lr,"[",vt,".alpha];"),Dt(Di),[yr,Br]});case ml:return zt(function(_t){return S(4,function(Dt){return+_t[Dt]})},function(_t,Dt,vt){return S(4,function(lr){return Dt.def("+",vt,"[",lr,"]")})});case hc:return zt(function(_t){return _t|0},function(_t,Dt,vt){return Dt.def(vt,"|0")});case Ku:return zt(function(_t){var Dt=_t.cmp||"keep",vt=_t.ref||0,lr="mask"in _t?_t.mask:-1;return[Wr[Dt],vt,lr]},function(_t,Dt,vt){var lr=_t.constants.compareFuncs,yr=Dt.def('"cmp" in ',vt,"?",lr,"[",vt,".cmp]",":",at),Br=Dt.def(vt,".ref|0"),Di=Dt.def('"mask" in ',vt,"?",vt,".mask|0:-1");return[yr,Br,Di]});case ue:case w:return zt(function(_t){var Dt=_t.fail||"keep",vt=_t.zfail||"keep",lr=_t.zpass||"keep";return[Ft===w?se:X,ii[Dt],ii[vt],ii[lr]]},function(_t,Dt,vt){var lr=_t.constants.stencilOps;function yr(Br){return Dt.def('"',Br,'" in ',vt,"?",lr,"[",vt,".",Br,"]:",at)}return[Ft===w?se:X,yr("fail"),yr("zfail"),yr("zpass")]});case xu:return zt(function(_t){var Dt=_t.factor|0,vt=_t.units|0;return[Dt,vt]},function(_t,Dt,vt){var lr=Dt.def(vt,".factor|0"),yr=Dt.def(vt,".units|0");return[lr,yr]});case Yu:return zt(function(_t){var Dt=0;return _t==="front"?Dt=X:_t==="back"&&(Dt=se),Dt},function(_t,Dt,vt){return Dt.def(vt,'==="front"?',X,":",se)});case pu:return zt(function(_t){return _t},function(_t,Dt,vt){return vt});case Nc:return zt(function(_t){return di[_t]},function(_t,Dt,vt){return Dt.def(vt+'==="cw"?'+Te+":"+Oe)});case Ql:return zt(function(_t){return _t.map(function(Dt){return!!Dt})},function(_t,Dt,vt){return S(4,function(lr){return"!!"+vt+"["+lr+"]"})});case oo:return zt(function(_t){var Dt="value"in _t?_t.value:1,vt=!!_t.invert;return[Dt,vt]},function(_t,Dt,vt){var lr=Dt.def('"value" in ',vt,"?+",vt,".value:1"),yr=Dt.def("!!",vt,".invert");return[lr,yr]})}}),Bt}function zo(Ne,$e){var ot=Ne.static,It=Ne.dynamic,Bt={};return Object.keys(ot).forEach(function(Ft){var Ut=ot[Ft],zt;if(typeof Ut=="number"||typeof Ut=="boolean")zt=kn(function(){return Ut});else if(typeof Ut=="function"){var _t=Ut._reglType;_t==="texture2d"||_t==="textureCube"?zt=kn(function(Dt){return Dt.link(Ut)}):(_t==="framebuffer"||_t==="framebufferCube")&&(zt=kn(function(Dt){return Dt.link(Ut.color[0])}))}else En(Ut)&&(zt=kn(function(Dt){var vt=Dt.global.def("[",S(Ut.length,function(lr){return Ut[lr]}),"]");return vt}));zt.value=Ut,Bt[Ft]=zt}),Object.keys(It).forEach(function(Ft){var Ut=It[Ft];Bt[Ft]=Bn(Ut,function(zt,_t){return zt.invoke(_t,Ut)})}),Bt}function Qs(Ne,$e){var ot=Ne.static,It=Ne.dynamic,Bt={};return Object.keys(ot).forEach(function(Ft){var Ut=ot[Ft],zt=bt.id(Ft),_t=new Zr;if(Li(Ut))_t.state=La,_t.buffer=Vr.getBuffer(Vr.create(Ut,br,!1,!0)),_t.type=0;else{var Dt=Vr.getBuffer(Ut);if(Dt)_t.state=La,_t.buffer=Dt,_t.type=0;else if("constant"in Ut){var vt=Ut.constant;_t.buffer="null",_t.state=Na,typeof vt=="number"?_t.x=vt:Ca.forEach(function(gn,tn){tn<vt.length&&(_t[gn]=vt[tn])})}else{Li(Ut.buffer)?Dt=Vr.getBuffer(Vr.create(Ut.buffer,br,!1,!0)):Dt=Vr.getBuffer(Ut.buffer);var lr=Ut.offset|0,yr=Ut.stride|0,Br=Ut.size|0,Di=!!Ut.normalized,ci=0;"type"in Ut&&(ci=un[Ut.type]);var bi=Ut.divisor|0;_t.buffer=Dt,_t.state=La,_t.size=Br,_t.normalized=Di,_t.type=ci||Dt.dtype,_t.offset=lr,_t.stride=yr,_t.divisor=bi}}Bt[Ft]=kn(function(gn,tn){var Ei=gn.attribCache;if(zt in Ei)return Ei[zt];var Oi={isStream:!1};return Object.keys(_t).forEach(function(Gi){Oi[Gi]=_t[Gi]}),_t.buffer&&(Oi.buffer=gn.link(_t.buffer),Oi.type=Oi.type||Oi.buffer+".dtype"),Ei[zt]=Oi,Oi})}),Object.keys(It).forEach(function(Ft){var Ut=It[Ft];function zt(_t,Dt){var vt=_t.invoke(Dt,Ut),lr=_t.shared,yr=_t.constants,Br=lr.isBufferArgs,Di=lr.buffer,ci={isStream:Dt.def(!1)},bi=new Zr;bi.state=La,Object.keys(bi).forEach(function(Oi){ci[Oi]=Dt.def(""+bi[Oi])});var gn=ci.buffer,tn=ci.type;Dt("if(",Br,"(",vt,")){",ci.isStream,"=true;",gn,"=",Di,".createStream(",br,",",vt,");",tn,"=",gn,".dtype;","}else{",gn,"=",Di,".getBuffer(",vt,");","if(",gn,"){",tn,"=",gn,".dtype;",'}else if("constant" in ',vt,"){",ci.state,"=",Na,";","if(typeof "+vt+'.constant === "number"){',ci[Ca[0]],"=",vt,".constant;",Ca.slice(1).map(function(Oi){return ci[Oi]}).join("="),"=0;","}else{",Ca.map(function(Oi,Gi){return ci[Oi]+"="+vt+".constant.length>"+Gi+"?"+vt+".constant["+Gi+"]:0;"}).join(""),"}}else{","if(",Br,"(",vt,".buffer)){",gn,"=",Di,".createStream(",br,",",vt,".buffer);","}else{",gn,"=",Di,".getBuffer(",vt,".buffer);","}",tn,'="type" in ',vt,"?",yr.glTypes,"[",vt,".type]:",gn,".dtype;",ci.normalized,"=!!",vt,".normalized;");function Ei(Oi){Dt(ci[Oi],"=",vt,".",Oi,"|0;")}return Ei("size"),Ei("offset"),Ei("stride"),Ei("divisor"),Dt("}}"),Dt.exit("if(",ci.isStream,"){",Di,".destroyStream(",gn,");","}"),ci}Bt[Ft]=Bn(Ut,zt)}),Bt}function al(Ne){var $e=Ne.static,ot=Ne.dynamic,It={};return Object.keys($e).forEach(function(Bt){var Ft=$e[Bt];It[Bt]=kn(function(Ut,zt){return typeof Ft=="number"||typeof Ft=="boolean"?""+Ft:Ut.link(Ft)})}),Object.keys(ot).forEach(function(Bt){var Ft=ot[Bt];It[Bt]=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}),It}function Vl(Ne,$e,ot,It,Bt){var Ft=Ne.static,Ut=Ne.dynamic,zt=is(Ne,$e),_t=sa(Ne,Bt),Dt=ba(Ne,_t,Bt),vt=Va(Ne,Bt),lr=Ml(Ne,Bt),yr=Zs(Ne,Bt,zt);function Br(Ei){var Oi=Dt[Ei];Oi&&(lr[Ei]=Oi)}Br(ee),Br(Ji(Q));var Di=Object.keys(lr).length>0,ci={framebuffer:_t,draw:vt,shader:yr,state:lr,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ci.profile=ia(Ne,Bt),ci.uniforms=zo(ot,Bt),ci.drawVAO=ci.scopeVAO=vt.vao,!ci.drawVAO&&yr.program&&!zt&&Ot.angle_instanced_arrays&&vt.static.elements){var bi=!0,gn=yr.program.attributes.map(function(Ei){var Oi=$e.static[Ei];return bi=bi&&!!Oi,Oi});if(bi&&gn.length>0){var tn=qi.getVAO(qi.createVAO({attributes:gn,elements:vt.static.elements}));ci.drawVAO=new Qr(null,null,null,function(Ei,Oi){return Ei.link(tn)}),ci.useVAO=!0}}return zt?ci.useVAO=!0:ci.attributes=Qs($e,Bt),ci.context=al(It,Bt),ci}function ss(Ne,$e,ot){var It=Ne.shared,Bt=It.context,Ft=Ne.scope();Object.keys(ot).forEach(function(Ut){$e.save(Bt,"."+Ut);var zt=ot[Ut],_t=zt.append(Ne,$e);Array.isArray(_t)?Ft(Bt,".",Ut,"=[",_t.join(),"];"):Ft(Bt,".",Ut,"=",_t,";")}),$e(Ft)}function Vs(Ne,$e,ot,It){var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.framebuffer,zt;ui&&(zt=$e.def(Bt.extensions,".webgl_draw_buffers"));var _t=Ne.constants,Dt=_t.drawBuffer,vt=_t.backBuffer,lr;ot?lr=ot.append(Ne,$e):lr=$e.def(Ut,".next"),It||$e("if(",lr,"!==",Ut,".cur){"),$e("if(",lr,"){",Ft,".bindFramebuffer(",zr,",",lr,".framebuffer);"),ui&&$e(zt,".drawBuffersWEBGL(",Dt,"[",lr,".colorAttachments.length]);"),$e("}else{",Ft,".bindFramebuffer(",zr,",null);"),ui&&$e(zt,".drawBuffersWEBGL(",vt,");"),$e("}",Ut,".cur=",lr,";"),It||$e("}")}function Ys(Ne,$e,ot){var It=Ne.shared,Bt=It.gl,Ft=Ne.current,Ut=Ne.next,zt=It.current,_t=It.next,Dt=Ne.cond(zt,".dirty");fi.forEach(function(vt){var lr=Ji(vt);if(!(lr in ot.state)){var yr,Br;if(lr in Ut){yr=Ut[lr],Br=Ft[lr];var Di=S(Xi[lr].length,function(bi){return Dt.def(yr,"[",bi,"]")});Dt(Ne.cond(Di.map(function(bi,gn){return bi+"!=="+Br+"["+gn+"]"}).join("||")).then(Bt,".",mn[lr],"(",Di,");",Di.map(function(bi,gn){return Br+"["+gn+"]="+bi}).join(";"),";"))}else{yr=Dt.def(_t,".",lr);var ci=Ne.cond(yr,"!==",zt,".",lr);Dt(ci),lr in si?ci(Ne.cond(yr).then(Bt,".enable(",si[lr],");").else(Bt,".disable(",si[lr],");"),zt,".",lr,"=",yr,";"):ci(Bt,".",mn[lr],"(",yr,");",zt,".",lr,"=",yr,";")}}}),Object.keys(ot.state).length===0&&Dt(zt,".dirty=false;"),$e(Dt)}function wa(Ne,$e,ot,It){var Bt=Ne.shared,Ft=Ne.current,Ut=Bt.current,zt=Bt.gl,_t;Ti(Object.keys(ot)).forEach(function(Dt){var vt=ot[Dt];if(!(It&&!It(vt))){var lr=vt.append(Ne,$e);if(si[Dt]){var yr=si[Dt];Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(Ne.cond(_t).then(zt,".enable(",yr,");").else(zt,".disable(",yr,");")),$e(Ut,".",Dt,"=",_t,";")):($e(Ne.cond(lr).then(zt,".enable(",yr,");").else(zt,".disable(",yr,");")),$e(Ut,".",Dt,"=",lr,";"))}else if(En(lr)){var Br=Ft[Dt];$e(zt,".",mn[Dt],"(",lr,");",lr.map(function(Di,ci){return Br+"["+ci+"]="+Di}).join(";"),";")}else Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(zt,".",mn[Dt],"(",_t,");",Ut,".",Dt,"=",_t,";")):$e(zt,".",mn[Dt],"(",lr,");",Ut,".",Dt,"=",lr,";")}})}function ol(Ne,$e){Ii&&(Ne.instancing=$e.def(Ne.shared.extensions,".angle_instanced_arrays"))}function io(Ne,$e,ot,It,Bt){var Ft=Ne.shared,Ut=Ne.stats,zt=Ft.current,_t=Ft.timer,Dt=ot.profile;function vt(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var lr,yr;function Br(Ei){lr=$e.def(),Ei(lr,"=",vt(),";"),typeof Bt=="string"?Ei(Ut,".count+=",Bt,";"):Ei(Ut,".count++;"),ji&&(It?(yr=$e.def(),Ei(yr,"=",_t,".getNumPendingQueries();")):Ei(_t,".beginQuery(",Ut,");"))}function Di(Ei){Ei(Ut,".cpuTime+=",vt(),"-",lr,";"),ji&&(It?Ei(_t,".pushScopeStats(",yr,",",_t,".getNumPendingQueries(),",Ut,");"):Ei(_t,".endQuery();"))}function ci(Ei){var Oi=$e.def(zt,".profile");$e(zt,".profile=",Ei,";"),$e.exit(zt,".profile=",Oi,";")}var bi;if(Dt){if(Pn(Dt)){Dt.enable?(Br($e),Di($e.exit),ci("true")):ci("false");return}bi=Dt.append(Ne,$e),ci(bi)}else bi=$e.def(zt,".profile");var gn=Ne.block();Br(gn),$e("if(",bi,"){",gn,"}");var tn=Ne.block();Di(tn),$e.exit("if(",bi,"){",tn,"}")}function Y(Ne,$e,ot,It,Bt){var Ft=Ne.shared;function Ut(_t){switch(_t){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function zt(_t,Dt,vt){var lr=Ft.gl,yr=$e.def(_t,".location"),Br=$e.def(Ft.attributes,"[",yr,"]"),Di=vt.state,ci=vt.buffer,bi=[vt.x,vt.y,vt.z,vt.w],gn=["buffer","normalized","offset","stride"];function tn(){$e("if(!",Br,".buffer){",lr,".enableVertexAttribArray(",yr,");}");var Oi=vt.type,Gi;if(vt.size?Gi=$e.def(vt.size,"||",Dt):Gi=Dt,$e("if(",Br,".type!==",Oi,"||",Br,".size!==",Gi,"||",gn.map(function(zn){return Br+"."+zn+"!=="+vt[zn]}).join("||"),"){",lr,".bindBuffer(",br,",",ci,".buffer);",lr,".vertexAttribPointer(",[yr,Gi,Oi,vt.normalized,vt.stride,vt.offset],");",Br,".type=",Oi,";",Br,".size=",Gi,";",gn.map(function(zn){return Br+"."+zn+"="+vt[zn]+";"}).join(""),"}"),Ii){var on=vt.divisor;$e("if(",Br,".divisor!==",on,"){",Ne.instancing,".vertexAttribDivisorANGLE(",[yr,on],");",Br,".divisor=",on,";}")}}function Ei(){$e("if(",Br,".buffer){",lr,".disableVertexAttribArray(",yr,");",Br,".buffer=null;","}if(",Ca.map(function(Oi,Gi){return Br+"."+Oi+"!=="+bi[Gi]}).join("||"),"){",lr,".vertexAttrib4f(",yr,",",bi,");",Ca.map(function(Oi,Gi){return Br+"."+Oi+"="+bi[Gi]+";"}).join(""),"}")}Di===La?tn():Di===Na?Ei():($e("if(",Di,"===",La,"){"),tn(),$e("}else{"),Ei(),$e("}"))}It.forEach(function(_t){var Dt=_t.name,vt=ot.attributes[Dt],lr;if(vt){if(!Bt(vt))return;lr=vt.append(Ne,$e)}else{if(!Bt(na))return;var yr=Ne.scopeAttrib(Dt);lr={},Object.keys(new Zr).forEach(function(Br){lr[Br]=$e.def(yr,".",Br)})}zt(Ne.link(_t),Ut(_t.info.type),lr)})}function D(Ne,$e,ot,It,Bt,Ft){for(var Ut=Ne.shared,zt=Ut.gl,_t,Dt=0;Dt<It.length;++Dt){var vt=It[Dt],lr=vt.name,yr=vt.info.type,Br=ot.uniforms[lr],Di=Ne.link(vt),ci=Di+".location",bi;if(Br){if(!Bt(Br))continue;if(Pn(Br)){var gn=Br.value;if(yr===dc||yr===Tl){var tn=Ne.link(gn._texture||gn.color[0]._texture);$e(zt,".uniform1i(",ci,",",tn+".bind());"),$e.exit(tn,".unbind();")}else if(yr===au||yr===Js||yr===eu){var Ei=Ne.global.def("new Float32Array(["+Array.prototype.slice.call(gn)+"])"),Oi=2;yr===Js?Oi=3:yr===eu&&(Oi=4),$e(zt,".uniformMatrix",Oi,"fv(",ci,",false,",Ei,");")}else{switch(yr){case $a:_t="1f";break;case Co:_t="2f";break;case Qa:_t="3f";break;case mo:_t="4f";break;case To:_t="1i";break;case Bo:_t="1i";break;case hl:_t="2i";break;case Ps:_t="2i";break;case Ul:_t="3i";break;case Ts:_t="3i";break;case Lu:_t="4i";break;case wo:_t="4i";break}$e(zt,".uniform",_t,"(",ci,",",En(gn)?Array.prototype.slice.call(gn):gn,");")}continue}else bi=Br.append(Ne,$e)}else{if(!Bt(na))continue;bi=$e.def(Ut.uniforms,"[",bt.id(lr),"]")}yr===dc?$e("if(",bi,"&&",bi,'._reglType==="framebuffer"){',bi,"=",bi,".color[0];","}"):yr===Tl&&$e("if(",bi,"&&",bi,'._reglType==="framebufferCube"){',bi,"=",bi,".color[0];","}");var Gi=1;switch(yr){case dc:case Tl:var on=$e.def(bi,"._texture");$e(zt,".uniform1i(",ci,",",on,".bind());"),$e.exit(on,".unbind();");continue;case Bo:case To:_t="1i";break;case Ps:case hl:_t="2i",Gi=2;break;case Ts:case Ul:_t="3i",Gi=3;break;case wo:case Lu:_t="4i",Gi=4;break;case $a:_t="1f";break;case Co:_t="2f",Gi=2;break;case Qa:_t="3f",Gi=3;break;case mo:_t="4f",Gi=4;break;case au:_t="Matrix2fv";break;case Js:_t="Matrix3fv";break;case eu:_t="Matrix4fv";break}if(_t.charAt(0)==="M"){$e(zt,".uniform",_t,"(",ci,",");var zn=Math.pow(yr-au+2,2),Ja=Ne.global.def("new Float32Array(",zn,")");Array.isArray(bi)?$e("false,(",S(zn,function(ms){return Ja+"["+ms+"]="+bi[ms]}),",",Ja,")"):$e("false,(Array.isArray(",bi,")||",bi," instanceof Float32Array)?",bi,":(",S(zn,function(ms){return Ja+"["+ms+"]="+bi+"["+ms+"]"}),",",Ja,")"),$e(");")}else if(Gi>1){for(var co=[],ts=[],so=0;so<Gi;++so)Array.isArray(bi)?ts.push(bi[so]):ts.push($e.def(bi+"["+so+"]")),Ft&&co.push($e.def());Ft&&$e("if(!",Ne.batchId,"||",co.map(function(ms,ou){return ms+"!=="+ts[ou]}).join("||"),"){",co.map(function(ms,ou){return ms+"="+ts[ou]+";"}).join("")),$e(zt,".uniform",_t,"(",ci,",",ts.join(","),");"),Ft&&$e("}")}else{if(Ft){var Yo=$e.def();$e("if(!",Ne.batchId,"||",Yo,"!==",bi,"){",Yo,"=",bi,";")}$e(zt,".uniform",_t,"(",ci,",",bi,");"),Ft&&$e("}")}}}function J(Ne,$e,ot,It){var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.draw,zt=It.draw;function _t(){var Gi=zt.elements,on,zn=$e;return Gi?((Gi.contextDep&&It.contextDynamic||Gi.propDep)&&(zn=ot),on=Gi.append(Ne,zn),zt.elementsActive&&zn("if("+on+")"+Ft+".bindBuffer("+Fr+","+on+".buffer.buffer);")):(on=zn.def(),zn(on,"=",Ut,".",Mt,";","if(",on,"){",Ft,".bindBuffer(",Fr,",",on,".buffer.buffer);}","else if(",Bt.vao,".currentVAO){",on,"=",Ne.shared.elements+".getElements("+Bt.vao,".currentVAO.elements);",nn?"":"if("+on+")"+Ft+".bindBuffer("+Fr+","+on+".buffer.buffer);","}")),on}function Dt(){var Gi=zt.count,on,zn=$e;return Gi?((Gi.contextDep&&It.contextDynamic||Gi.propDep)&&(zn=ot),on=Gi.append(Ne,zn)):on=zn.def(Ut,".",$t),on}var vt=_t();function lr(Gi){var on=zt[Gi];return on?on.contextDep&&It.contextDynamic||on.propDep?on.append(Ne,ot):on.append(Ne,$e):$e.def(Ut,".",Gi)}var yr=lr(Jt),Br=lr(mr),Di=Dt();if(typeof Di=="number"){if(Di===0)return}else ot("if(",Di,"){"),ot.exit("}");var ci,bi;Ii&&(ci=lr(Cr),bi=Ne.instancing);var gn=vt+".type",tn=zt.elements&&Pn(zt.elements)&&!zt.vaoActive;function Ei(){function Gi(){ot(bi,".drawElementsInstancedANGLE(",[yr,Di,gn,Br+"<<(("+gn+"-"+Ra+")>>1)",ci],");")}function on(){ot(bi,".drawArraysInstancedANGLE(",[yr,Br,Di,ci],");")}vt&&vt!=="null"?tn?Gi():(ot("if(",vt,"){"),Gi(),ot("}else{"),on(),ot("}")):on()}function Oi(){function Gi(){ot(Ft+".drawElements("+[yr,Di,gn,Br+"<<(("+gn+"-"+Ra+")>>1)"]+");")}function on(){ot(Ft+".drawArrays("+[yr,Br,Di]+");")}vt&&vt!=="null"?tn?Gi():(ot("if(",vt,"){"),Gi(),ot("}else{"),on(),ot("}")):on()}Ii&&(typeof ci!="number"||ci>=0)?typeof ci=="string"?(ot("if(",ci,">0){"),Ei(),ot("}else if(",ci,"<0){"),Oi(),ot("}")):Ei():Oi()}function O(Ne,$e,ot,It,Bt){var Ft=Cn(),Ut=Ft.proc("body",Bt);return Ii&&(Ft.instancing=Ut.def(Ft.shared.extensions,".angle_instanced_arrays")),Ne(Ft,Ut,ot,It),Ft.compile().body}function K(Ne,$e,ot,It){ol(Ne,$e),ot.useVAO?ot.drawVAO?$e(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,$e),");"):$e(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):($e(Ne.shared.vao,".setVAO(null);"),Y(Ne,$e,ot,It.attributes,function(){return!0})),D(Ne,$e,ot,It.uniforms,function(){return!0},!1),J(Ne,$e,$e,ot)}function de(Ne,$e){var ot=Ne.proc("draw",1);ol(Ne,ot),ss(Ne,ot,$e.context),Vs(Ne,ot,$e.framebuffer),Ys(Ne,ot,$e),wa(Ne,ot,$e.state),io(Ne,ot,$e,!1,!0);var It=$e.shader.progVar.append(Ne,ot);if(ot(Ne.shared.gl,".useProgram(",It,".program);"),$e.shader.program)K(Ne,ot,$e,$e.shader.program);else{ot(Ne.shared.vao,".setVAO(null);");var Bt=Ne.global.def("{}"),Ft=ot.def(It,".id"),Ut=ot.def(Bt,"[",Ft,"]");ot(Ne.cond(Ut).then(Ut,".call(this,a0);").else(Ut,"=",Bt,"[",Ft,"]=",Ne.link(function(zt){return O(K,Ne,$e,zt,1)}),"(",It,");",Ut,".call(this,a0);"))}Object.keys($e.state).length>0&&ot(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&ot(Ne.shared.vao,".setVAO(null);")}function ne(Ne,$e,ot,It){Ne.batchId="a1",ol(Ne,$e);function Bt(){return!0}Y(Ne,$e,ot,It.attributes,Bt),D(Ne,$e,ot,It.uniforms,Bt,!1),J(Ne,$e,$e,ot)}function be(Ne,$e,ot,It){ol(Ne,$e);var Bt=ot.contextDep,Ft=$e.def(),Ut="a0",zt="a1",_t=$e.def();Ne.shared.props=_t,Ne.batchId=Ft;var Dt=Ne.scope(),vt=Ne.scope();$e(Dt.entry,"for(",Ft,"=0;",Ft,"<",zt,";++",Ft,"){",_t,"=",Ut,"[",Ft,"];",vt,"}",Dt.exit);function lr(gn){return gn.contextDep&&Bt||gn.propDep}function yr(gn){return!lr(gn)}if(ot.needsContext&&ss(Ne,vt,ot.context),ot.needsFramebuffer&&Vs(Ne,vt,ot.framebuffer),wa(Ne,vt,ot.state,lr),ot.profile&&lr(ot.profile)&&io(Ne,vt,ot,!1,!0),It)ot.useVAO?ot.drawVAO?lr(ot.drawVAO)?vt(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,vt),");"):Dt(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,Dt),");"):Dt(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):(Dt(Ne.shared.vao,".setVAO(null);"),Y(Ne,Dt,ot,It.attributes,yr),Y(Ne,vt,ot,It.attributes,lr)),D(Ne,Dt,ot,It.uniforms,yr,!1),D(Ne,vt,ot,It.uniforms,lr,!0),J(Ne,Dt,vt,ot);else{var Br=Ne.global.def("{}"),Di=ot.shader.progVar.append(Ne,vt),ci=vt.def(Di,".id"),bi=vt.def(Br,"[",ci,"]");vt(Ne.shared.gl,".useProgram(",Di,".program);","if(!",bi,"){",bi,"=",Br,"[",ci,"]=",Ne.link(function(gn){return O(ne,Ne,ot,gn,2)}),"(",Di,");}",bi,".call(this,a0[",Ft,"],",Ft,");")}}function Be(Ne,$e){var ot=Ne.proc("batch",2);Ne.batchId="0",ol(Ne,ot);var It=!1,Bt=!0;Object.keys($e.context).forEach(function(Br){It=It||$e.context[Br].propDep}),It||(ss(Ne,ot,$e.context),Bt=!1);var Ft=$e.framebuffer,Ut=!1;Ft?(Ft.propDep?It=Ut=!0:Ft.contextDep&&It&&(Ut=!0),Ut||Vs(Ne,ot,Ft)):Vs(Ne,ot,null),$e.state.viewport&&$e.state.viewport.propDep&&(It=!0);function zt(Br){return Br.contextDep&&It||Br.propDep}Ys(Ne,ot,$e),wa(Ne,ot,$e.state,function(Br){return!zt(Br)}),(!$e.profile||!zt($e.profile))&&io(Ne,ot,$e,!1,"a1"),$e.contextDep=It,$e.needsContext=Bt,$e.needsFramebuffer=Ut;var _t=$e.shader.progVar;if(_t.contextDep&&It||_t.propDep)be(Ne,ot,$e,null);else{var Dt=_t.append(Ne,ot);if(ot(Ne.shared.gl,".useProgram(",Dt,".program);"),$e.shader.program)be(Ne,ot,$e,$e.shader.program);else{ot(Ne.shared.vao,".setVAO(null);");var vt=Ne.global.def("{}"),lr=ot.def(Dt,".id"),yr=ot.def(vt,"[",lr,"]");ot(Ne.cond(yr).then(yr,".call(this,a0,a1);").else(yr,"=",vt,"[",lr,"]=",Ne.link(function(Br){return O(be,Ne,$e,Br,2)}),"(",Dt,");",yr,".call(this,a0,a1);"))}}Object.keys($e.state).length>0&&ot(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&ot(Ne.shared.vao,".setVAO(null);")}function ht(Ne,$e){var ot=Ne.proc("scope",3);Ne.batchId="a2";var It=Ne.shared,Bt=It.current;if(ss(Ne,ot,$e.context),$e.framebuffer&&$e.framebuffer.append(Ne,ot),Ti(Object.keys($e.state)).forEach(function(zt){var _t=$e.state[zt],Dt=_t.append(Ne,ot);En(Dt)?Dt.forEach(function(vt,lr){pn(vt)?ot.set(Ne.next[zt],"["+lr+"]",vt):ot.set(Ne.next[zt],"["+lr+"]",Ne.link(vt,{stable:!0}))}):Pn(_t)?ot.set(It.next,"."+zt,Ne.link(Dt,{stable:!0})):ot.set(It.next,"."+zt,Dt)}),io(Ne,ot,$e,!0,!0),[Mt,mr,$t,Cr,Jt].forEach(function(zt){var _t=$e.draw[zt];if(_t){var Dt=_t.append(Ne,ot);pn(Dt)?ot.set(It.draw,"."+zt,Dt):ot.set(It.draw,"."+zt,Ne.link(Dt),{stable:!0})}}),Object.keys($e.uniforms).forEach(function(zt){var _t=$e.uniforms[zt].append(Ne,ot);Array.isArray(_t)&&(_t="["+_t.map(function(Dt){return pn(Dt)?Dt:Ne.link(Dt,{stable:!0})})+"]"),ot.set(It.uniforms,"["+Ne.link(bt.id(zt),{stable:!0})+"]",_t)}),Object.keys($e.attributes).forEach(function(zt){var _t=$e.attributes[zt].append(Ne,ot),Dt=Ne.scopeAttrib(zt);Object.keys(new Zr).forEach(function(vt){ot.set(Dt,"."+vt,_t[vt])})}),$e.scopeVAO){var Ft=$e.scopeVAO.append(Ne,ot);pn(Ft)?ot.set(It.vao,".targetVAO",Ft):ot.set(It.vao,".targetVAO",Ne.link(Ft,{stable:!0}))}function Ut(zt){var _t=$e.shader[zt];if(_t){var Dt=_t.append(Ne,ot);pn(Dt)?ot.set(It.shader,"."+zt,Dt):ot.set(It.shader,"."+zt,Ne.link(Dt,{stable:!0}))}}Ut(Ze),Ut(ut),Object.keys($e.state).length>0&&(ot(Bt,".dirty=true;"),ot.exit(Bt,".dirty=true;")),ot("a1(",Ne.shared.context,",a0,",Ne.batchId,");")}function Yt(Ne){if(!(typeof Ne!="object"||En(Ne))){for(var $e=Object.keys(Ne),ot=0;ot<$e.length;++ot)if(h.isDynamic(Ne[$e[ot]]))return!0;return!1}}function cr(Ne,$e,ot){var It=$e.static[ot];if(!It||!Yt(It))return;var Bt=Ne.global,Ft=Object.keys(It),Ut=!1,zt=!1,_t=!1,Dt=Ne.global.def("{}");Ft.forEach(function(lr){var yr=It[lr];if(h.isDynamic(yr)){typeof yr=="function"&&(yr=It[lr]=h.unbox(yr));var Br=Bn(yr,null);Ut=Ut||Br.thisDep,_t=_t||Br.propDep,zt=zt||Br.contextDep}else{switch(Bt(Dt,".",lr,"="),typeof yr){case"number":Bt(yr);break;case"string":Bt('"',yr,'"');break;case"object":Array.isArray(yr)&&Bt("[",yr.join(),"]");break;default:Bt(Ne.link(yr));break}Bt(";")}});function vt(lr,yr){Ft.forEach(function(Br){var Di=It[Br];if(h.isDynamic(Di)){var ci=lr.invoke(yr,Di);yr(Dt,".",Br,"=",ci,";")}})}$e.dynamic[ot]=new h.DynamicVariable(Zo,{thisDep:Ut,contextDep:zt,propDep:_t,ref:Dt,append:vt}),delete $e.static[ot]}function Nt(Ne,$e,ot,It,Bt){var Ft=Cn();Ft.stats=Ft.link(Bt),Object.keys($e.static).forEach(function(zt){cr(Ft,$e,zt)}),fr.forEach(function(zt){cr(Ft,Ne,zt)});var Ut=Vl(Ne,$e,ot,It,Ft);return Ut.shader.program&&(Ut.shader.program.attributes.sort(function(zt,_t){return zt.name<_t.name?-1:1}),Ut.shader.program.uniforms.sort(function(zt,_t){return zt.name<_t.name?-1:1})),de(Ft,Ut),ht(Ft,Ut),Be(Ft,Ut),e(Ft.compile(),{destroy:function(){Ut.shader.program.destroy()}})}return{next:qn,current:Xi,procs:function(){var Ne=Cn(),$e=Ne.proc("poll"),ot=Ne.proc("refresh"),It=Ne.block();$e(It),ot(It);var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.next,zt=Bt.current;It(zt,".dirty=false;"),Vs(Ne,$e),Vs(Ne,ot,null,!0);var _t;Ii&&(_t=Ne.link(Ii)),Ot.oes_vertex_array_object&&ot(Ne.link(Ot.oes_vertex_array_object),".bindVertexArrayOES(null);");var Dt=ot.def(Bt.attributes),vt=ot.def(0),lr=Ne.cond(vt,".buffer");lr.then(Ft,".enableVertexAttribArray(i);",Ft,".bindBuffer(",br,",",vt,".buffer.buffer);",Ft,".vertexAttribPointer(i,",vt,".size,",vt,".type,",vt,".normalized,",vt,".stride,",vt,".offset);").else(Ft,".disableVertexAttribArray(i);",Ft,".vertexAttrib4f(i,",vt,".x,",vt,".y,",vt,".z,",vt,".w);",vt,".buffer=null;");var yr=Ne.link(Lr.maxAttributes,{stable:!0});return ot("for(var i=0;i<",yr,";++i){",vt,"=",Dt,"[i];",lr,"}"),Ii&&ot("for(var i=0;i<",yr,";++i){",_t,".vertexAttribDivisorANGLE(i,",Dt,"[i].divisor);","}"),ot(Ne.shared.vao,".currentVAO=null;",Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"),Object.keys(si).forEach(function(Br){var Di=si[Br],ci=It.def(Ut,".",Br),bi=Ne.block();bi("if(",ci,"){",Ft,".enable(",Di,")}else{",Ft,".disable(",Di,")}",zt,".",Br,"=",ci,";"),ot(bi),$e("if(",ci,"!==",zt,".",Br,"){",bi,"}")}),Object.keys(mn).forEach(function(Br){var Di=mn[Br],ci=Xi[Br],bi,gn,tn=Ne.block();if(tn(Ft,".",Di,"("),En(ci)){var Ei=ci.length;bi=Ne.global.def(Ut,".",Br),gn=Ne.global.def(zt,".",Br),tn(S(Ei,function(Oi){return bi+"["+Oi+"]"}),");",S(Ei,function(Oi){return gn+"["+Oi+"]="+bi+"["+Oi+"];"}).join("")),$e("if(",S(Ei,function(Oi){return bi+"["+Oi+"]!=="+gn+"["+Oi+"]"}).join("||"),"){",tn,"}")}else bi=It.def(Ut,".",Br),gn=It.def(zt,".",Br),tn(bi,");",zt,".",Br,"=",bi,";"),$e("if(",bi,"!==",gn,"){",tn,"}");ot(tn)}),Ne.compile()}(),compile:Nt}}function Ia(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var yo=34918,Da=34919,go=35007,Is=function(Me,bt){if(!bt.ext_disjoint_timer_query)return null;var Ot=[];function Lr(){return Ot.pop()||bt.ext_disjoint_timer_query.createQueryEXT()}function Vr(yi){Ot.push(yi)}var Or=[];function Nr(yi){var Ii=Lr();bt.ext_disjoint_timer_query.beginQueryEXT(go,Ii),Or.push(Ii),ji(Or.length-1,Or.length,yi)}function vi(){bt.ext_disjoint_timer_query.endQueryEXT(go)}function Ni(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var qi=[];function Si(){return qi.pop()||new Ni}function Vn(yi){qi.push(yi)}var Qi=[];function ji(yi,Ii,ui){var nn=Si();nn.startQueryIndex=yi,nn.endQueryIndex=Ii,nn.sum=0,nn.stats=ui,Qi.push(nn)}var oi=[],Tr=[];function Zr(){var yi,Ii,ui=Or.length;if(ui!==0){Tr.length=Math.max(Tr.length,ui+1),oi.length=Math.max(oi.length,ui+1),oi[0]=0,Tr[0]=0;var nn=0;for(yi=0,Ii=0;Ii<Or.length;++Ii){var Xi=Or[Ii];bt.ext_disjoint_timer_query.getQueryObjectEXT(Xi,Da)?(nn+=bt.ext_disjoint_timer_query.getQueryObjectEXT(Xi,yo),Vr(Xi)):Or[yi++]=Xi,oi[Ii+1]=nn,Tr[Ii+1]=yi}for(Or.length=yi,yi=0,Ii=0;Ii<Qi.length;++Ii){var qn=Qi[Ii],fi=qn.startQueryIndex,si=qn.endQueryIndex;qn.sum+=oi[si]-oi[fi];var mn=Tr[fi],Ji=Tr[si];Ji===mn?(qn.stats.gpuTime+=qn.sum/1e6,Vn(qn)):(qn.startQueryIndex=mn,qn.endQueryIndex=Ji,Qi[yi++]=qn)}Qi.length=yi}}return{beginQuery:Nr,endQuery:vi,pushScopeStats:ji,update:Zr,getNumPendingQueries:function(){return Or.length},clear:function(){Ot.push.apply(Ot,Or);for(var yi=0;yi<Ot.length;yi++)bt.ext_disjoint_timer_query.deleteQueryEXT(Ot[yi]);Or.length=0,Ot.length=0},restore:function(){Or.length=0,Ot.length=0}}},Ms=16384,Xs=256,Un=1024,ja=34962,Fo="webglcontextlost",Uo="webglcontextrestored",$s=1,Sl=2,bu=3;function dl(Me,bt){for(var Ot=0;Ot<Me.length;++Ot)if(Me[Ot]===bt)return Ot;return-1}function Sc(Me){var bt=x(Me);if(!bt)return null;var Ot=bt.gl,Lr=Ot.getContextAttributes(),Vr=Ot.isContextLost(),Or=C(Ot,bt);if(!Or)return null;var Nr=m(),vi=Ia(),Ni=bt.cachedCode||{},qi=Or.extensions,Si=Is(Ot,qi),Vn=v(),Qi=Ot.drawingBufferWidth,ji=Ot.drawingBufferHeight,oi={tick:0,time:0,viewportWidth:Qi,viewportHeight:ji,framebufferWidth:Qi,framebufferHeight:ji,drawingBufferWidth:Qi,drawingBufferHeight:ji,pixelRatio:bt.pixelRatio},Tr={},Zr={elements:null,primitive:4,count:-1,offset:0,instances:-1},yi=ei(Ot,qi),Ii=ti(Ot,vi,bt,Xi),ui=Ar(Ot,qi,Ii,vi),nn=ku(Ot,qi,yi,vi,Ii,ui,Zr);function Xi(O){return nn.destroyBuffer(O)}var qn=Wu(Ot,Nr,vi,bt),fi=of(Ot,qi,yi,function(){Ji.procs.poll()},oi,vi,bt),si=Dc(Ot,qi,yi,vi,bt),mn=lf(Ot,qi,yi,fi,si,vi),Ji=Ea(Ot,Nr,qi,yi,Ii,ui,fi,mn,Tr,nn,qn,Zr,oi,Si,Ni,bt),Ui=Wl(Ot,mn,Ji.procs.poll,oi,Lr,qi,yi),Bi=Ji.next,pn=Ot.canvas,Nn=[],aa=[],Ki=[],Cn=[bt.onDestroy],ia=null;function sa(){if(Nn.length===0){Si&&Si.update(),ia=null;return}ia=d.next(sa),Ys();for(var O=Nn.length-1;O>=0;--O){var K=Nn[O];K&&K(oi,null,0)}Ot.flush(),Si&&Si.update()}function ba(){!ia&&Nn.length>0&&(ia=d.next(sa))}function is(){ia&&(d.cancel(sa),ia=null)}function Zs(O){O.preventDefault(),Vr=!0,is(),aa.forEach(function(K){K()})}function Va(O){Ot.getError(),Vr=!1,Or.restore(),qn.restore(),Ii.restore(),fi.restore(),si.restore(),mn.restore(),nn.restore(),Si&&Si.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Va,!1));function Ml(){Nn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Va)),qn.clear(),mn.clear(),si.clear(),nn.clear(),fi.clear(),ui.clear(),Ii.clear(),Si&&Si.clear(),Cn.forEach(function(O){O()})}function zo(O){function K(Ft){var Ut=e({},Ft);delete Ut.uniforms,delete Ut.attributes,delete Ut.context,delete Ut.vao,"stencil"in Ut&&Ut.stencil.op&&(Ut.stencil.opBack=Ut.stencil.opFront=Ut.stencil.op,delete Ut.stencil.op);function zt(_t){if(_t in Ut){var Dt=Ut[_t];delete Ut[_t],Object.keys(Dt).forEach(function(vt){Ut[_t+"."+vt]=Dt[vt]})}}return zt("blend"),zt("depth"),zt("cull"),zt("stencil"),zt("polygonOffset"),zt("scissor"),zt("sample"),"vao"in Ft&&(Ut.vao=Ft.vao),Ut}function de(Ft,Ut){var zt={},_t={};return Object.keys(Ft).forEach(function(Dt){var vt=Ft[Dt];if(h.isDynamic(vt)){_t[Dt]=h.unbox(vt,Dt);return}else if(Ut&&Array.isArray(vt)){for(var lr=0;lr<vt.length;++lr)if(h.isDynamic(vt[lr])){_t[Dt]=h.unbox(vt,Dt);return}}zt[Dt]=vt}),{dynamic:_t,static:zt}}var ne=de(O.context||{},!0),be=de(O.uniforms||{},!0),Be=de(O.attributes||{},!1),ht=de(K(O),!1),Yt={gpuTime:0,cpuTime:0,count:0},cr=Ji.compile(ht,Be,be,ne,Yt),Nt=cr.draw,Ne=cr.batch,$e=cr.scope,ot=[];function It(Ft){for(;ot.length<Ft;)ot.push(null);return ot}function Bt(Ft,Ut){var zt;if(typeof Ft=="function")return $e.call(this,null,Ft,0);if(typeof Ut=="function")if(typeof Ft=="number")for(zt=0;zt<Ft;++zt)$e.call(this,null,Ut,zt);else if(Array.isArray(Ft))for(zt=0;zt<Ft.length;++zt)$e.call(this,Ft[zt],Ut,zt);else return $e.call(this,Ft,Ut,0);else if(typeof Ft=="number"){if(Ft>0)return Ne.call(this,It(Ft|0),Ft|0)}else if(Array.isArray(Ft)){if(Ft.length)return Ne.call(this,Ft,Ft.length)}else return Nt.call(this,Ft)}return e(Bt,{stats:Yt,destroy:function(){cr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,"framebuffer")});function al(O,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(Ot.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),"depth"in K&&(Ot.clearDepth(+K.depth),de|=Xs),"stencil"in K&&(Ot.clearStencil(K.stencil|0),de|=Un),Ot.clear(de)}function Vl(O){if("framebuffer"in O)if(O.framebuffer&&O.framebuffer_reglType==="framebufferCube")for(var K=0;K<6;++K)Qs(e({framebuffer:O.framebuffer.faces[K]},O),al);else Qs(O,al);else al(null,O)}function ss(O){Nn.push(O);function K(){var de=dl(Nn,O);function ne(){var be=dl(Nn,ne);Nn[be]=Nn[Nn.length-1],Nn.length-=1,Nn.length<=0&&is()}Nn[de]=ne}return ba(),{cancel:K}}function Vs(){var O=Bi.viewport,K=Bi.scissor_box;O[0]=O[1]=K[0]=K[1]=0,oi.viewportWidth=oi.framebufferWidth=oi.drawingBufferWidth=O[2]=K[2]=Ot.drawingBufferWidth,oi.viewportHeight=oi.framebufferHeight=oi.drawingBufferHeight=O[3]=K[3]=Ot.drawingBufferHeight}function Ys(){oi.tick+=1,oi.time=ol(),Vs(),Ji.procs.poll()}function wa(){fi.refresh(),Vs(),Ji.procs.refresh(),Si&&Si.update()}function ol(){return(v()-Vn)/1e3}wa();function io(O,K){var de;switch(O){case"frame":return ss(K);case"lost":de=aa;break;case"restore":de=Ki;break;case"destroy":de=Cn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne<de.length;++ne)if(de[ne]===K){de[ne]=de[de.length-1],de.pop();return}}}}function Y(){return Ni}function D(O){Object.entries(O).forEach(function(K){Ni[K[0]]=K[1]})}var J=e(zo,{clear:Vl,prop:h.define.bind(null,$s),context:h.define.bind(null,Sl),this:h.define.bind(null,bu),draw:zo({}),buffer:function(O){return Ii.create(O,ja,!1,!1)},elements:function(O){return ui.create(O,!1)},texture:fi.create2D,cube:fi.createCube,renderbuffer:si.create,framebuffer:mn.create,framebufferCube:mn.createCube,vao:nn.createVAO,attributes:Lr,frame:ss,on:io,limits:yi,hasExtension:function(O){return yi.extensions.indexOf(O.toLowerCase())>=0},read:Ui,destroy:Ml,_gl:Ot,_refresh:wa,poll:function(){Ys(),Si&&Si.update()},now:ol,stats:vi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var $Oe=ye((w_r,JOe)=>{"use strict";var wUt=ey();JOe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},YOe(t)?t={container:t}:TUt(t)?t={container:t}:AUt(t)?t={gl:t}:t=wUt(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}YOe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=KOe(),t.container.appendChild(t.canvas),ZOe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=KOe(),t.container.appendChild(t.canvas),ZOe(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 ZOe(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 YOe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function TUt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function AUt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function KOe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var eBe=ye((T_r,QOe)=>{"use strict";var SUt=sK(),MUt=[32,126];QOe.exports=EUt;function EUt(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||MUt;if(n&&typeof n!="string"&&(n=SUt(n)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var o=[],s=a[0],l=0;s<=a[1];s++)o[l++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=i[0]/2,f=i[1]/2,s=0;s<a.length;s++)u.fillText(a[s],c,f),(c+=i[0])>t[0]-i[0]/2&&(c=i[0]/2,f+=i[1]);return r}});var fK=ye(Vh=>{"use strict";"use restrict";var cK=32;Vh.INT_BITS=cK;Vh.INT_MAX=2147483647;Vh.INT_MIN=-1<<cK-1;Vh.sign=function(e){return(e>0)-(e<0)};Vh.abs=function(e){var t=e>>cK-1;return(e^t)-t};Vh.min=function(e,t){return t^(e^t)&-(e<t)};Vh.max=function(e,t){return e^(e^t)&-(e<t)};Vh.isPow2=function(e){return!(e&e-1)&&!!e};Vh.log2=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};Vh.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};Vh.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function tBe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}Vh.countTrailingZeros=tBe;Vh.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};Vh.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Vh.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var Dk=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--i;e[t]=n<<i&255}})(Dk);Vh.reverse=function(e){return Dk[e&255]<<24|Dk[e>>>8&255]<<16|Dk[e>>>16&255]<<8|Dk[e>>>24&255]};Vh.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};Vh.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};Vh.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};Vh.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};Vh.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>tBe(e)+1}});var nBe=ye((S_r,iBe)=>{"use strict";function rBe(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]=rBe(e,t,r+1);return i}function kUt(e,t){var r,n;for(r=new Array(e),n=0;n<e;++n)r[n]=t;return r}function CUt(e,t){switch(typeof t=="undefined"&&(t=0),typeof e){case"number":if(e>0)return kUt(e|0,t);break;case"object":if(typeof e.length=="number")return rBe(e,t,0);break}return[]}iBe.exports=CUt});var _Be=ye(mu=>{"use strict";var xx=fK(),Ev=nBe(),aBe=_2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Ev([32,0]),UINT16:Ev([32,0]),UINT32:Ev([32,0]),BIGUINT64:Ev([32,0]),INT8:Ev([32,0]),INT16:Ev([32,0]),INT32:Ev([32,0]),BIGINT64:Ev([32,0]),FLOAT:Ev([32,0]),DOUBLE:Ev([32,0]),DATA:Ev([32,0]),UINT8C:Ev([32,0]),BUFFER:Ev([32,0])});var LUt=typeof Uint8ClampedArray!="undefined",PUt=typeof BigUint64Array!="undefined",IUt=typeof BigInt64Array!="undefined",ad=window.__TYPEDARRAY_POOL;ad.UINT8C||(ad.UINT8C=Ev([32,0]));ad.BIGUINT64||(ad.BIGUINT64=Ev([32,0]));ad.BIGINT64||(ad.BIGINT64=Ev([32,0]));ad.BUFFER||(ad.BUFFER=Ev([32,0]));var Tz=ad.DATA,Az=ad.BUFFER;mu.free=function(t){if(aBe.isBuffer(t))Az[xx.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=xx.log2(r)|0;Tz[n].push(t)}};function oBe(e){if(e){var t=e.length||e.byteLength,r=xx.log2(t);Tz[r].push(e)}}function RUt(e){oBe(e.buffer)}mu.freeUint8=mu.freeUint16=mu.freeUint32=mu.freeBigUint64=mu.freeInt8=mu.freeInt16=mu.freeInt32=mu.freeBigInt64=mu.freeFloat32=mu.freeFloat=mu.freeFloat64=mu.freeDouble=mu.freeUint8Clamped=mu.freeDataView=RUt;mu.freeArrayBuffer=oBe;mu.freeBuffer=function(t){Az[xx.log2(t.length)].push(t)};mu.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Bp(t);switch(r){case"uint8":return hK(t);case"uint16":return sBe(t);case"uint32":return lBe(t);case"int8":return uBe(t);case"int16":return cBe(t);case"int32":return fBe(t);case"float":case"float32":return hBe(t);case"double":case"float64":return dBe(t);case"uint8_clamped":return vBe(t);case"bigint64":return gBe(t);case"biguint64":return pBe(t);case"buffer":return yBe(t);case"data":case"dataview":return mBe(t);default:return null}return null};function Bp(t){var t=xx.nextPow2(t),r=xx.log2(t),n=Tz[r];return n.length>0?n.pop():new ArrayBuffer(t)}mu.mallocArrayBuffer=Bp;function hK(e){return new Uint8Array(Bp(e),0,e)}mu.mallocUint8=hK;function sBe(e){return new Uint16Array(Bp(2*e),0,e)}mu.mallocUint16=sBe;function lBe(e){return new Uint32Array(Bp(4*e),0,e)}mu.mallocUint32=lBe;function uBe(e){return new Int8Array(Bp(e),0,e)}mu.mallocInt8=uBe;function cBe(e){return new Int16Array(Bp(2*e),0,e)}mu.mallocInt16=cBe;function fBe(e){return new Int32Array(Bp(4*e),0,e)}mu.mallocInt32=fBe;function hBe(e){return new Float32Array(Bp(4*e),0,e)}mu.mallocFloat32=mu.mallocFloat=hBe;function dBe(e){return new Float64Array(Bp(8*e),0,e)}mu.mallocFloat64=mu.mallocDouble=dBe;function vBe(e){return LUt?new Uint8ClampedArray(Bp(e),0,e):hK(e)}mu.mallocUint8Clamped=vBe;function pBe(e){return PUt?new BigUint64Array(Bp(8*e),0,e):null}mu.mallocBigUint64=pBe;function gBe(e){return IUt?new BigInt64Array(Bp(8*e),0,e):null}mu.mallocBigInt64=gBe;function mBe(e){return new DataView(Bp(e),0,e)}mu.mallocDataView=mBe;function yBe(e){e=xx.nextPow2(e);var t=xx.log2(e),r=Az[t];return r.length>0?r.pop():new aBe(e)}mu.mallocBuffer=yBe;mu.clearCache=function(){for(var t=0;t<32;++t)ad.UINT8[t].length=0,ad.UINT16[t].length=0,ad.UINT32[t].length=0,ad.INT8[t].length=0,ad.INT16[t].length=0,ad.INT32[t].length=0,ad.FLOAT[t].length=0,ad.DOUBLE[t].length=0,ad.BIGUINT64[t].length=0,ad.BIGINT64[t].length=0,ad.UINT8C[t].length=0,Tz[t].length=0,Az[t].length=0}});var bBe=ye((E_r,xBe)=>{"use strict";var DUt=Object.prototype.toString;xBe.exports=function(e){var t;return DUt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var dK=ye((k_r,wBe)=>{wBe.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 SBe=ye((C_r,ABe)=>{"use strict";var FUt=dK();ABe.exports=TBe;var Fk=96;function vK(e,t){var r=FUt(getComputedStyle(e).getPropertyValue(t));return r[0]*TBe(r[1],e)}function zUt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=vK(r,"font-size")/128;return t.removeChild(r),n}function TBe(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 zUt(e,t);case"em":return vK(t,"font-size");case"rem":return vK(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return Fk;case"cm":return Fk/2.54;case"mm":return Fk/25.4;case"pt":return Fk/72;case"pc":return Fk/6}return 1}});var kBe=ye((L_r,EBe)=>{"use strict";EBe.exports=Ez;var qUt=Ez.canvas=document.createElement("canvas"),Sz=qUt.getContext("2d"),MBe=Mz([32,126]);Ez.createPairs=Mz;Ez.ascii=MBe;function Ez(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?n=Mz(t):Array.isArray(t)?n=t:(t.o?n=Mz(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=MBe),Sz.font=i+"px "+e;for(var o=0;o<n.length;o++){var s=n[o],l=Sz.measureText(s[0]).width+Sz.measureText(s[1]).width,u=Sz.measureText(s).width;if(Math.abs(l-u)>i*a){var c=(u-l)/i;r[s]=c*1e3}}return r}function Mz(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i<e[1];i++){var a=String.fromCharCode(i),o=n+a;t.push(o)}return t}});var IBe=ye((P_r,PBe)=>{"use strict";PBe.exports=bx;bx.canvas=document.createElement("canvas");bx.cache={};function bx(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var n=t.size||t.fontSize||t.em||48,i=t.weight||t.fontWeight||"",a=t.style||t.fontStyle||"",o=[a,i,n].join(" ")+"px "+r,s=t.origin||"top";if(bx.cache[r]&&n<=bx.cache[r].em)return CBe(bx.cache[r],s);var l=t.canvas||bx.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var h="H",d={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(h,0,0);var v=ry(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(h,0,f);var m=ry(u.getImageData(0,0,f,f));d.lineHeight=d.bottom=f-m+v,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(h,0,f);var b=ry(u.getImageData(0,0,f,f)),p=f-b-1+v;d.baseline=d.alphabetic=p,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(h,0,f*.5);var k=ry(u.getImageData(0,0,f,f));d.median=d.middle=f-k-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(h,0,f*.5);var M=ry(u.getImageData(0,0,f,f));d.hanging=f-M-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(h,0,f);var T=ry(u.getImageData(0,0,f,f));if(d.ideographic=f-T-1+v,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),d.upper=ry(u.getImageData(0,0,f,f)),d.capHeight=d.baseline-d.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),d.lower=ry(u.getImageData(0,0,f,f)),d.xHeight=d.baseline-d.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),d.tittle=ry(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),d.ascent=ry(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),d.descent=LBe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var L=LBe(u.getImageData(0,0,f,f));d.overshoot=L-p}for(var x in d)d[x]/=n;return d.em=n,bx.cache[r]=d,CBe(d,s)}function CBe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var n in e)n!=="em"&&(r[n]=e[n]-t);return r}function ry(e){for(var t=e.height,r=e.data,n=3;n<r.length;n+=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}function LBe(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 zBe=ye((I_r,FBe)=>{"use strict";var _5=WOe(),OUt=ey(),BUt=XOe(),NUt=$Oe(),UUt=XY(),pK=ox(),VUt=eBe(),wx=_Be(),GUt=s5(),HUt=bBe(),jUt=dK(),WUt=SBe(),XUt=kBe(),ZUt=Nh(),YUt=IBe(),KUt=nw(),JUt=fK(),RBe=JUt.nextPow2,DBe=new UUt,Cz=!1;document.body&&(kz=document.body.appendChild(document.createElement("div")),kz.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(kz).fontStretch&&(Cz=!0),document.body.removeChild(kz));var kz,xc=function(t){$Ut(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=NUt(t),this.shader=DBe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||BUt({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(),DBe.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(HUt(t)?t:{})};xc.prototype.createShader=function(){var t=this.regl,r=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(i,a){return[a.atlas.width,a.atlas.height]},atlasDim:function(i,a){return[a.atlas.cols,a.atlas.rows]},atlas:function(i,a){return a.atlas.texture},charStep:function(i,a){return a.atlas.step},em:function(i,a){return a.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:`
|
||
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}};xc.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=OUt(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=GUt(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=KUt(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!t.font&&(t.font=xc.baseFontSize+"px sans-serif");var n=!1,i=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(Ce,ge){if(typeof Ce=="string")try{Ce=_5.parse(Ce)}catch(He){Ce=_5.parse(xc.baseFontSize+"px "+Ce)}else{var ie=Ce.style,Se=Ce.weight,Ee=Ce.stretch,we=Ce.variant;Ce=_5.parse(_5.stringify(Ce)),ie&&(Ce.style=ie),Se&&(Ce.weight=Se),Ee&&(Ce.stretch=Ee),we&&(Ce.variant=we)}var De=_5.stringify({size:xc.baseFontSize,family:Ce.family,stretch:Cz?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style}),Le=jUt(Ce.size),me=Math.round(Le[0]*WUt(Le[1]));if(me!==r.fontSize[ge]&&(i=!0,r.fontSize[ge]=me),(!r.font[ge]||De!=r.font[ge].baseString)&&(n=!0,r.font[ge]=xc.fonts[De],!r.font[ge])){var Pe=Ce.family.join(", "),ce=[Ce.style];Ce.style!=Ce.variant&&ce.push(Ce.variant),Ce.variant!=Ce.weight&&ce.push(Ce.weight),Cz&&Ce.weight!=Ce.stretch&&ce.push(Ce.stretch),r.font[ge]={baseString:De,family:Pe,weight:Ce.weight,stretch:Ce.stretch,style:Ce.style,variant:Ce.variant,width:{},kerning:{},metrics:YUt(Pe,{origin:"top",fontSize:xc.baseFontSize,fontStyle:ce.join(" ")})},xc.fonts[De]=r.font[ge]}}),(n||i)&&this.font.forEach(function(Ce,ge){var ie=_5.stringify({size:r.fontSize[ge],family:Ce.family,stretch:Cz?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style});if(r.fontAtlas[ge]=r.shader.atlas[ie],!r.fontAtlas[ge]){var Se=Ce.metrics;r.shader.atlas[ie]=r.fontAtlas[ge]={fontString:ie,step:Math.ceil(r.fontSize[ge]*Se.bottom*.5)*2,em:r.fontSize[ge],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var a=Array(t.position.length*.5),o=0;o<a.length;o++)a[o]=t.text;t.text=a}var s;if(t.text!=null||n){if(this.textOffsets=[0],Array.isArray(t.text)){this.count=t.text[0].length,this.counts=[this.count];for(var l=1;l<t.text.length;l++)this.textOffsets[l]=this.textOffsets[l-1]+t.text[l-1].length,this.count+=t.text[l].length,this.counts.push(t.text[l].length);this.text=t.text.join("")}else this.text=t.text,this.count=this.text.length,this.counts=[this.count];s=[],this.font.forEach(function(Ce,ge){xc.atlasContext.font=Ce.baseString;for(var ie=r.fontAtlas[ge],Se=0;Se<r.text.length;Se++){var Ee=r.text.charAt(Se);if(ie.ids[Ee]==null&&(ie.ids[Ee]=ie.chars.length,ie.chars.push(Ee),s.push(Ee)),Ce.width[Ee]==null&&(Ce.width[Ee]=xc.atlasContext.measureText(Ee).width/xc.baseFontSize,r.kerning)){var we=[];for(var De in Ce.width)we.push(De+Ee,Ee+De);ZUt(Ce.kerning,XUt(Ce.family,{pairs:we}))}}})}if(t.position)if(t.position.length>2){for(var u=!t.position[0].length,c=wx.mallocFloat(this.count*2),f=0,h=0;f<this.counts.length;f++){var d=this.counts[f];if(u)for(var v=0;v<d;v++)c[h++]=t.position[f*2],c[h++]=t.position[f*2+1];else for(var m=0;m<d;m++)c[h++]=t.position[f][0],c[h++]=t.position[f][1]}this.position.call?this.position({type:"float",data:c}):this.position=this.regl.buffer({type:"float",data:c}),wx.freeFloat(c)}else this.position.destroy&&this.position.destroy(),this.position={constant:t.position};if(t.text||n){var b=wx.mallocUint8(this.count),p=wx.mallocFloat(this.count*2);this.textWidth=[];for(var k=0,M=0;k<this.counts.length;k++){for(var T=this.counts[k],L=this.font[k]||this.font[0],x=this.fontAtlas[k]||this.fontAtlas[0],C=0;C<T;C++){var S=this.text.charAt(M),g=this.text.charAt(M-1);if(b[M]=x.ids[S],p[M*2]=L.width[S],C){var P=p[M*2-2],E=p[M*2],z=p[M*2-1],q=z+P*.5+E*.5;if(this.kerning){var U=L.kerning[g+S];U&&(q+=U*.001)}p[M*2+1]=q}else p[M*2+1]=p[M*2]*.5;M++}this.textWidth.push(p.length?p[M*2-2]*.5+p[M*2-1]:0)}t.align||(t.align=this.align),this.charBuffer({data:b,type:"uint8",usage:"stream"}),this.sizeBuffer({data:p,type:"float",usage:"stream"}),wx.freeUint8(b),wx.freeFloat(p),s.length&&this.font.forEach(function(Ce,ge){var ie=r.fontAtlas[ge],Se=ie.step,Ee=Math.floor(xc.maxAtlasSize/Se),we=Math.min(Ee,ie.chars.length),De=Math.ceil(ie.chars.length/we),Le=RBe(we*Se),me=RBe(De*Se);ie.width=Le,ie.height=me,ie.rows=De,ie.cols=we,ie.em&&ie.texture({data:VUt({canvas:xc.atlasCanvas,font:ie.fontString,chars:ie.chars,shape:[Le,me],step:[Se,Se]})})})}if(t.align&&(this.align=t.align,this.alignOffset=this.textWidth.map(function(Ce,ge){var ie=Array.isArray(r.align)?r.align.length>1?r.align[ge]:r.align[0]:r.align;if(typeof ie=="number")return ie;switch(ie){case"right":case"end":return-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,ge){var ie=(r.font[ge]||r.font[0]).metrics,Se=0;return Se+=ie.bottom*.5,typeof Ce=="number"?Se+=Ce-ie.baseline:Se+=-ie[Ce],Se*=-1,Se})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=pK(t.color,"uint8");else{var G;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var Z=t.color.length;G=wx.mallocUint8(Z);for(var j=(t.color.subarray||t.color.slice).bind(t.color),N=0;N<Z;N+=4)G.set(pK(j(N,N+4),"uint8"),N)}else{var H=t.color.length;G=wx.mallocUint8(H*4);for(var re=0;re<H;re++)G.set(pK(t.color[re]||0,"uint8"),re*4)}this.color=G}if(t.position||t.text||t.color||t.baseline||t.align||t.font||t.offset||t.opacity){var oe=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(oe){var _e=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(_e);for(var ke=0;ke<this.batch.length;ke++)this.batch[ke]={count:this.counts.length>1?this.counts[ke]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ke]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ke*4,ke*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ke]:this.opacity,baseline:this.baselineOffset[ke]!=null?this.baselineOffset[ke]:this.baselineOffset[0],align:this.align?this.alignOffset[ke]!=null?this.alignOffset[ke]:this.alignOffset[0]:0,atlas:this.fontAtlas[ke]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ke*2,ke*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}};xc.prototype.destroy=function(){};xc.prototype.kerning=!0;xc.prototype.position={constant:new Float32Array(2)};xc.prototype.translate=null;xc.prototype.scale=null;xc.prototype.font=null;xc.prototype.text="";xc.prototype.positionOffset=[0,0];xc.prototype.opacity=1;xc.prototype.color=new Uint8Array([0,0,0,255]);xc.prototype.alignOffset=[0,0];xc.maxAtlasSize=1024;xc.atlasCanvas=document.createElement("canvas");xc.atlasContext=xc.atlasCanvas.getContext("2d",{alpha:!1});xc.baseFontSize=64;xc.fonts={};function $Ut(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}FBe.exports=xc});var qBe=ye((gK,mK)=>{(function(e,t){typeof gK=="object"&&typeof mK!="undefined"?mK.exports=t():e.createREGL=t()})(gK,function(){"use strict";var e=function(Me,bt){for(var Ot=Object.keys(bt),Lr=0;Lr<Ot.length;++Lr)Me[Ot[Lr]]=bt[Ot[Lr]];return Me},t=0,r=0,n=5,i=6;function a(Me,bt){this.id=t++,this.type=Me,this.data=bt}function o(Me){return Me.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function s(Me){if(Me.length===0)return[];var bt=Me.charAt(0),Ot=Me.charAt(Me.length-1);if(Me.length>1&&bt===Ot&&(bt==='"'||bt==="'"))return['"'+o(Me.substr(1,Me.length-2))+'"'];var Lr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Me);if(Lr)return s(Me.substr(0,Lr.index)).concat(s(Lr[1])).concat(s(Me.substr(Lr.index+Lr[0].length)));var Vr=Me.split(".");if(Vr.length===1)return['"'+o(Me)+'"'];for(var Or=[],Nr=0;Nr<Vr.length;++Nr)Or=Or.concat(s(Vr[Nr]));return Or}function l(Me){return"["+s(Me).join("][")+"]"}function u(Me,bt){return new a(Me,l(bt+""))}function c(Me){return typeof Me=="function"&&!Me._reglType||Me instanceof a}function f(Me,bt){if(typeof Me=="function")return new a(r,Me);if(typeof Me=="number"||typeof Me=="boolean")return new a(n,Me);if(Array.isArray(Me))return new a(i,Me.map(function(Ot,Lr){return f(Ot,bt+"["+Lr+"]")}));if(Me instanceof a)return Me}var h={DynamicVariable:a,define:u,isDynamic:c,unbox:f,accessor:l},d={next:typeof requestAnimationFrame=="function"?function(Me){return requestAnimationFrame(Me)}:function(Me){return setTimeout(Me,16)},cancel:typeof cancelAnimationFrame=="function"?function(Me){return cancelAnimationFrame(Me)}:clearTimeout},v=typeof performance!="undefined"&&performance.now?function(){return performance.now()}:function(){return+new Date};function m(){var Me={"":0},bt=[""];return{id:function(Ot){var Lr=Me[Ot];return Lr||(Lr=Me[Ot]=bt.length,bt.push(Ot),Lr)},str:function(Ot){return bt[Ot]}}}function b(Me,bt,Ot){var Lr=document.createElement("canvas");e(Lr.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),Me.appendChild(Lr),Me===document.body&&(Lr.style.position="absolute",e(Me.style,{margin:0,padding:0}));function Vr(){var vi=window.innerWidth,Ni=window.innerHeight;if(Me!==document.body){var qi=Lr.getBoundingClientRect();vi=qi.right-qi.left,Ni=qi.bottom-qi.top}Lr.width=Ot*vi,Lr.height=Ot*Ni}var Or;Me!==document.body&&typeof ResizeObserver=="function"?(Or=new ResizeObserver(function(){setTimeout(Vr)}),Or.observe(Me)):window.addEventListener("resize",Vr,!1);function Nr(){Or?Or.disconnect():window.removeEventListener("resize",Vr),Me.removeChild(Lr)}return Vr(),{canvas:Lr,onDestroy:Nr}}function p(Me,bt){function Ot(Lr){try{return Me.getContext(Lr,bt)}catch(Vr){return null}}return Ot("webgl")||Ot("experimental-webgl")||Ot("webgl-experimental")}function k(Me){return typeof Me.nodeName=="string"&&typeof Me.appendChild=="function"&&typeof Me.getBoundingClientRect=="function"}function M(Me){return typeof Me.drawArrays=="function"||typeof Me.drawElements=="function"}function T(Me){return typeof Me=="string"?Me.split():Me}function L(Me){return typeof Me=="string"?document.querySelector(Me):Me}function x(Me){var bt=Me||{},Ot,Lr,Vr,Or,Nr={},vi=[],Ni=[],qi=typeof window=="undefined"?1:window.devicePixelRatio,Si=!1,Vn={},Qi=function(Tr){},ji=function(){};if(typeof bt=="string"?Ot=document.querySelector(bt):typeof bt=="object"&&(k(bt)?Ot=bt:M(bt)?(Or=bt,Vr=Or.canvas):("gl"in bt?Or=bt.gl:"canvas"in bt?Vr=L(bt.canvas):"container"in bt&&(Lr=L(bt.container)),"attributes"in bt&&(Nr=bt.attributes),"extensions"in bt&&(vi=T(bt.extensions)),"optionalExtensions"in bt&&(Ni=T(bt.optionalExtensions)),"onDone"in bt&&(Qi=bt.onDone),"profile"in bt&&(Si=!!bt.profile),"pixelRatio"in bt&&(qi=+bt.pixelRatio),"cachedCode"in bt&&(Vn=bt.cachedCode))),Ot&&(Ot.nodeName.toLowerCase()==="canvas"?Vr=Ot:Lr=Ot),!Or){if(!Vr){var oi=b(Lr||document.body,Qi,qi);if(!oi)return null;Vr=oi.canvas,ji=oi.onDestroy}Nr.premultipliedAlpha===void 0&&(Nr.premultipliedAlpha=!0),Or=p(Vr,Nr)}return Or?{gl:Or,canvas:Vr,container:Lr,extensions:vi,optionalExtensions:Ni,pixelRatio:qi,profile:Si,cachedCode:Vn,onDone:Qi,onDestroy:ji}:(ji(),Qi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function C(Me,bt){var Ot={};function Lr(Nr){var vi=Nr.toLowerCase(),Ni;try{Ni=Ot[vi]=Me.getExtension(vi)}catch(qi){}return!!Ni}for(var Vr=0;Vr<bt.extensions.length;++Vr){var Or=bt.extensions[Vr];if(!Lr(Or))return bt.onDestroy(),bt.onDone('"'+Or+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return bt.optionalExtensions.forEach(Lr),{extensions:Ot,restore:function(){Object.keys(Ot).forEach(function(Nr){if(Ot[Nr]&&!Lr(Nr))throw new Error("(regl): error restoring extension "+Nr)})}}}function S(Me,bt){for(var Ot=Array(Me),Lr=0;Lr<Me;++Lr)Ot[Lr]=bt(Lr);return Ot}var g=5120,P=5121,E=5122,z=5123,q=5124,U=5125,G=5126;function Z(Me){for(var bt=16;bt<=1<<28;bt*=16)if(Me<=bt)return bt;return 0}function j(Me){var bt,Ot;return bt=(Me>65535)<<4,Me>>>=bt,Ot=(Me>255)<<3,Me>>>=Ot,bt|=Ot,Ot=(Me>15)<<2,Me>>>=Ot,bt|=Ot,Ot=(Me>3)<<1,Me>>>=Ot,bt|=Ot,bt|Me>>1}function N(){var Me=S(8,function(){return[]});function bt(Or){var Nr=Z(Or),vi=Me[j(Nr)>>2];return vi.length>0?vi.pop():new ArrayBuffer(Nr)}function Ot(Or){Me[j(Or.byteLength)>>2].push(Or)}function Lr(Or,Nr){var vi=null;switch(Or){case g:vi=new Int8Array(bt(Nr),0,Nr);break;case P:vi=new Uint8Array(bt(Nr),0,Nr);break;case E:vi=new Int16Array(bt(2*Nr),0,Nr);break;case z:vi=new Uint16Array(bt(2*Nr),0,Nr);break;case q:vi=new Int32Array(bt(4*Nr),0,Nr);break;case U:vi=new Uint32Array(bt(4*Nr),0,Nr);break;case G:vi=new Float32Array(bt(4*Nr),0,Nr);break;default:return null}return vi.length!==Nr?vi.subarray(0,Nr):vi}function Vr(Or){Ot(Or.buffer)}return{alloc:bt,free:Ot,allocType:Lr,freeType:Vr}}var H=N();H.zero=N();var re=3408,oe=3410,_e=3411,ke=3412,Ce=3413,ge=3414,ie=3415,Se=33901,Ee=33902,we=3379,De=3386,Le=34921,me=36347,Pe=36348,ce=35661,He=35660,lt=34930,mt=36349,Vt=34076,st=34024,ct=7936,Qt=7937,Ht=7938,nr=35724,tt=34047,je=36063,Ue=34852,Ae=3553,rt=34067,St=34069,Tt=33984,dt=6408,Et=5126,pt=5121,Xt=36160,or=36053,_r=36064,Er=16384,ei=function(Me,bt){var Ot=1;bt.ext_texture_filter_anisotropic&&(Ot=Me.getParameter(tt));var Lr=1,Vr=1;bt.webgl_draw_buffers&&(Lr=Me.getParameter(Ue),Vr=Me.getParameter(je));var Or=!!bt.oes_texture_float;if(Or){var Nr=Me.createTexture();Me.bindTexture(Ae,Nr),Me.texImage2D(Ae,0,dt,1,1,0,dt,Et,null);var vi=Me.createFramebuffer();if(Me.bindFramebuffer(Xt,vi),Me.framebufferTexture2D(Xt,_r,Ae,Nr,0),Me.bindTexture(Ae,null),Me.checkFramebufferStatus(Xt)!==or)Or=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Er);var Ni=H.allocType(Et,4);Me.readPixels(0,0,1,1,dt,Et,Ni),Me.getError()?Or=!1:(Me.deleteFramebuffer(vi),Me.deleteTexture(Nr),Or=Ni[0]===1),H.freeType(Ni)}}var qi=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Si=!0;if(!qi){var Vn=Me.createTexture(),Qi=H.allocType(pt,36);Me.activeTexture(Tt),Me.bindTexture(rt,Vn),Me.texImage2D(St,0,dt,3,3,0,dt,pt,Qi),H.freeType(Qi),Me.bindTexture(rt,null),Me.deleteTexture(Vn),Si=!Me.getError()}return{colorBits:[Me.getParameter(oe),Me.getParameter(_e),Me.getParameter(ke),Me.getParameter(Ce)],depthBits:Me.getParameter(ge),stencilBits:Me.getParameter(ie),subpixelBits:Me.getParameter(re),extensions:Object.keys(bt).filter(function(ji){return!!bt[ji]}),maxAnisotropic:Ot,maxDrawbuffers:Lr,maxColorAttachments:Vr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(Ee),maxViewportDims:Me.getParameter(De),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Vt),maxRenderbufferSize:Me.getParameter(st),maxTextureUnits:Me.getParameter(lt),maxTextureSize:Me.getParameter(we),maxAttributes:Me.getParameter(Le),maxVertexUniforms:Me.getParameter(me),maxVertexTextureUnits:Me.getParameter(He),maxVaryingVectors:Me.getParameter(Pe),maxFragmentUniforms:Me.getParameter(mt),glsl:Me.getParameter(nr),renderer:Me.getParameter(Qt),vendor:Me.getParameter(ct),version:Me.getParameter(Ht),readFloat:Or,npotTextureCube:Si}},qr=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function jr(Me){return!!Me&&typeof Me=="object"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset=="number"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||qr(Me.data))}var gt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:Kt,flatten:At};function Je(Me,bt,Ot){for(var Lr=0;Lr<bt;++Lr)Ot[Lr]=Me[Lr]}function We(Me,bt,Ot,Lr){for(var Vr=0,Or=0;Or<bt;++Or)for(var Nr=Me[Or],vi=0;vi<Ot;++vi)Lr[Vr++]=Nr[vi]}function et(Me,bt,Ot,Lr,Vr,Or){for(var Nr=Or,vi=0;vi<bt;++vi)for(var Ni=Me[vi],qi=0;qi<Ot;++qi)for(var Si=Ni[qi],Vn=0;Vn<Lr;++Vn)Vr[Nr++]=Si[Vn]}function xt(Me,bt,Ot,Lr,Vr){for(var Or=1,Nr=Ot+1;Nr<bt.length;++Nr)Or*=bt[Nr];var vi=bt[Ot];if(bt.length-Ot===4){var Ni=bt[Ot+1],qi=bt[Ot+2],Si=bt[Ot+3];for(Nr=0;Nr<vi;++Nr)et(Me[Nr],Ni,qi,Si,Lr,Vr),Vr+=Or}else for(Nr=0;Nr<vi;++Nr)xt(Me[Nr],bt,Ot+1,Lr,Vr),Vr+=Or}function At(Me,bt,Ot,Lr){var Vr=1;if(bt.length)for(var Or=0;Or<bt.length;++Or)Vr*=bt[Or];else Vr=0;var Nr=Lr||H.allocType(Ot,Vr);switch(bt.length){case 0:break;case 1:Je(Me,bt[0],Nr);break;case 2:We(Me,bt[0],bt[1],Nr);break;case 3:et(Me,bt[0],bt[1],bt[2],Nr,0);break;default:xt(Me,bt,0,Nr,0)}return Nr}function Kt(Me){for(var bt=[],Ot=Me;Ot.length;Ot=Ot[0])bt.push(Ot.length);return bt}var er={"[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},Sr=5120,Gr=5122,Ir=5124,Yr=5121,_i=5123,Pi=5125,ai=5126,mi=5126,un={int8:Sr,int16:Gr,int32:Ir,uint8:Yr,uint16:_i,uint32:Pi,float:ai,float32:mi},Fn=35048,An=35040,Hn={dynamic:Fn,stream:An,static:35044},Qn=Ge.flatten,Vi=Ge.shape,Kn=35044,Jn=35040,Gt=5121,wt=5126,rr=[];rr[5120]=1,rr[5122]=2,rr[5124]=4,rr[5121]=1,rr[5123]=2,rr[5125]=4,rr[5126]=4;function ir(Me){return er[Object.prototype.toString.call(Me)]|0}function wr(Me,bt){for(var Ot=0;Ot<bt.length;++Ot)Me[Ot]=bt[Ot]}function Xr(Me,bt,Ot,Lr,Vr,Or,Nr){for(var vi=0,Ni=0;Ni<Ot;++Ni)for(var qi=0;qi<Lr;++qi)Me[vi++]=bt[Vr*Ni+Or*qi+Nr]}function ti(Me,bt,Ot,Lr){var Vr=0,Or={};function Nr(Tr){this.id=Vr++,this.buffer=Me.createBuffer(),this.type=Tr,this.usage=Kn,this.byteLength=0,this.dimension=1,this.dtype=Gt,this.persistentData=null,Ot.profile&&(this.stats={size:0})}Nr.prototype.bind=function(){Me.bindBuffer(this.type,this.buffer)},Nr.prototype.destroy=function(){Qi(this)};var vi=[];function Ni(Tr,Zr){var yi=vi.pop();return yi||(yi=new Nr(Tr)),yi.bind(),Vn(yi,Zr,Jn,0,1,!1),yi}function qi(Tr){vi.push(Tr)}function Si(Tr,Zr,yi){Tr.byteLength=Zr.byteLength,Me.bufferData(Tr.type,Zr,yi)}function Vn(Tr,Zr,yi,Ii,ui,nn){var Xi;if(Tr.usage=yi,Array.isArray(Zr)){if(Tr.dtype=Ii||wt,Zr.length>0){var qn;if(Array.isArray(Zr[0])){Xi=Vi(Zr);for(var fi=1,si=1;si<Xi.length;++si)fi*=Xi[si];Tr.dimension=fi,qn=Qn(Zr,Xi,Tr.dtype),Si(Tr,qn,yi),nn?Tr.persistentData=qn:H.freeType(qn)}else if(typeof Zr[0]=="number"){Tr.dimension=ui;var mn=H.allocType(Tr.dtype,Zr.length);wr(mn,Zr),Si(Tr,mn,yi),nn?Tr.persistentData=mn:H.freeType(mn)}else qr(Zr[0])&&(Tr.dimension=Zr[0].length,Tr.dtype=Ii||ir(Zr[0])||wt,qn=Qn(Zr,[Zr.length,Zr[0].length],Tr.dtype),Si(Tr,qn,yi),nn?Tr.persistentData=qn:H.freeType(qn))}}else if(qr(Zr))Tr.dtype=Ii||ir(Zr),Tr.dimension=ui,Si(Tr,Zr,yi),nn&&(Tr.persistentData=new Uint8Array(new Uint8Array(Zr.buffer)));else if(jr(Zr)){Xi=Zr.shape;var Ji=Zr.stride,Ui=Zr.offset,Bi=0,pn=0,Nn=0,aa=0;Xi.length===1?(Bi=Xi[0],pn=1,Nn=Ji[0],aa=0):Xi.length===2&&(Bi=Xi[0],pn=Xi[1],Nn=Ji[0],aa=Ji[1]),Tr.dtype=Ii||ir(Zr.data)||wt,Tr.dimension=pn;var Ki=H.allocType(Tr.dtype,Bi*pn);Xr(Ki,Zr.data,Bi,pn,Nn,aa,Ui),Si(Tr,Ki,yi),nn?Tr.persistentData=Ki:H.freeType(Ki)}else Zr instanceof ArrayBuffer&&(Tr.dtype=Gt,Tr.dimension=ui,Si(Tr,Zr,yi),nn&&(Tr.persistentData=new Uint8Array(new Uint8Array(Zr))))}function Qi(Tr){bt.bufferCount--,Lr(Tr);var Zr=Tr.buffer;Me.deleteBuffer(Zr),Tr.buffer=null,delete Or[Tr.id]}function ji(Tr,Zr,yi,Ii){bt.bufferCount++;var ui=new Nr(Zr);Or[ui.id]=ui;function nn(fi){var si=Kn,mn=null,Ji=0,Ui=0,Bi=1;return Array.isArray(fi)||qr(fi)||jr(fi)||fi instanceof ArrayBuffer?mn=fi:typeof fi=="number"?Ji=fi|0:fi&&("data"in fi&&(mn=fi.data),"usage"in fi&&(si=Hn[fi.usage]),"type"in fi&&(Ui=un[fi.type]),"dimension"in fi&&(Bi=fi.dimension|0),"length"in fi&&(Ji=fi.length|0)),ui.bind(),mn?Vn(ui,mn,si,Ui,Bi,Ii):(Ji&&Me.bufferData(ui.type,Ji,si),ui.dtype=Ui||Gt,ui.usage=si,ui.dimension=Bi,ui.byteLength=Ji),Ot.profile&&(ui.stats.size=ui.byteLength*rr[ui.dtype]),nn}function Xi(fi,si){Me.bufferSubData(ui.type,si,fi)}function qn(fi,si){var mn=(si||0)|0,Ji;if(ui.bind(),qr(fi)||fi instanceof ArrayBuffer)Xi(fi,mn);else if(Array.isArray(fi)){if(fi.length>0){if(typeof fi[0]=="number"){var Ui=H.allocType(ui.dtype,fi.length);wr(Ui,fi),Xi(Ui,mn),H.freeType(Ui)}else if(Array.isArray(fi[0])||qr(fi[0])){Ji=Vi(fi);var Bi=Qn(fi,Ji,ui.dtype);Xi(Bi,mn),H.freeType(Bi)}}}else if(jr(fi)){Ji=fi.shape;var pn=fi.stride,Nn=0,aa=0,Ki=0,Cn=0;Ji.length===1?(Nn=Ji[0],aa=1,Ki=pn[0],Cn=0):Ji.length===2&&(Nn=Ji[0],aa=Ji[1],Ki=pn[0],Cn=pn[1]);var ia=Array.isArray(fi.data)?ui.dtype:ir(fi.data),sa=H.allocType(ia,Nn*aa);Xr(sa,fi.data,Nn,aa,Ki,Cn,fi.offset),Xi(sa,mn),H.freeType(sa)}return nn}return yi||nn(Tr),nn._reglType="buffer",nn._buffer=ui,nn.subdata=qn,Ot.profile&&(nn.stats=ui.stats),nn.destroy=function(){Qi(ui)},nn}function oi(){gt(Or).forEach(function(Tr){Tr.buffer=Me.createBuffer(),Me.bindBuffer(Tr.type,Tr.buffer),Me.bufferData(Tr.type,Tr.persistentData||Tr.byteLength,Tr.usage)})}return Ot.profile&&(bt.getTotalBufferSize=function(){var Tr=0;return Object.keys(Or).forEach(function(Zr){Tr+=Or[Zr].stats.size}),Tr}),{create:ji,createStream:Ni,destroyStream:qi,clear:function(){gt(Or).forEach(Qi),vi.forEach(Qi)},getBuffer:function(Tr){return Tr&&Tr._buffer instanceof Nr?Tr._buffer:null},restore:oi,_initBuffer:Vn}}var $r=0,Ri=0,Zi=1,en=1,fn=4,yn=4,Mn={points:$r,point:Ri,lines:Zi,line:en,triangles:fn,triangle:yn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Xo=5122,da=5123,jn=5124,Ha=5125,vo=34963,Gn=35040,Ct=35044;function Ar(Me,bt,Ot,Lr){var Vr={},Or=0,Nr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Nr.uint32=Ha);function vi(oi){this.id=Or++,Vr[this.id]=this,this.buffer=oi,this.primType=ma,this.vertCount=0,this.type=0}vi.prototype.bind=function(){this.buffer.bind()};var Ni=[];function qi(oi){var Tr=Ni.pop();return Tr||(Tr=new vi(Ot.create(null,vo,!0,!1)._buffer)),Vn(Tr,oi,Gn,-1,-1,0,0),Tr}function Si(oi){Ni.push(oi)}function Vn(oi,Tr,Zr,yi,Ii,ui,nn){oi.buffer.bind();var Xi;if(Tr){var qn=nn;!nn&&(!qr(Tr)||jr(Tr)&&!qr(Tr.data))&&(qn=bt.oes_element_index_uint?Ha:da),Ot._initBuffer(oi.buffer,Tr,Zr,qn,3)}else Me.bufferData(vo,ui,Zr),oi.buffer.dtype=Xi||Fa,oi.buffer.usage=Zr,oi.buffer.dimension=3,oi.buffer.byteLength=ui;if(Xi=nn,!nn){switch(oi.buffer.dtype){case Fa:case Wa:Xi=Fa;break;case da:case Xo:Xi=da;break;case Ha:case jn:Xi=Ha;break;default:}oi.buffer.dtype=Xi}oi.type=Xi;var fi=Ii;fi<0&&(fi=oi.buffer.byteLength,Xi===da?fi>>=1:Xi===Ha&&(fi>>=2)),oi.vertCount=fi;var si=yi;if(yi<0){si=ma;var mn=oi.buffer.dimension;mn===1&&(si=Ba),mn===2&&(si=ua),mn===3&&(si=ma)}oi.primType=si}function Qi(oi){Lr.elementsCount--,delete Vr[oi.id],oi.buffer.destroy(),oi.buffer=null}function ji(oi,Tr){var Zr=Ot.create(null,vo,!0),yi=new vi(Zr._buffer);Lr.elementsCount++;function Ii(ui){if(!ui)Zr(),yi.primType=ma,yi.vertCount=0,yi.type=Fa;else if(typeof ui=="number")Zr(ui),yi.primType=ma,yi.vertCount=ui|0,yi.type=Fa;else{var nn=null,Xi=Ct,qn=-1,fi=-1,si=0,mn=0;Array.isArray(ui)||qr(ui)||jr(ui)?nn=ui:("data"in ui&&(nn=ui.data),"usage"in ui&&(Xi=Hn[ui.usage]),"primitive"in ui&&(qn=Mn[ui.primitive]),"count"in ui&&(fi=ui.count|0),"type"in ui&&(mn=Nr[ui.type]),"length"in ui?si=ui.length|0:(si=fi,mn===da||mn===Xo?si*=2:(mn===Ha||mn===jn)&&(si*=4))),Vn(yi,nn,Xi,qn,fi,si,mn)}return Ii}return Ii(oi),Ii._reglType="elements",Ii._elements=yi,Ii.subdata=function(ui,nn){return Zr.subdata(ui,nn),Ii},Ii.destroy=function(){Qi(yi)},Ii}return{create:ji,createStream:qi,destroyStream:Si,getElements:function(oi){return typeof oi=="function"&&oi._elements instanceof vi?oi._elements:null},clear:function(){gt(Vr).forEach(Qi)}}}var Jr=new Float32Array(1),hi=new Uint32Array(Jr.buffer),hn=5123;function Sn(Me){for(var bt=H.allocType(hn,Me.length),Ot=0;Ot<Me.length;++Ot)if(isNaN(Me[Ot]))bt[Ot]=65535;else if(Me[Ot]===1/0)bt[Ot]=31744;else if(Me[Ot]===-1/0)bt[Ot]=64512;else{Jr[0]=Me[Ot];var Lr=hi[0],Vr=Lr>>>31<<15,Or=(Lr<<1>>>24)-127,Nr=Lr>>13&1023;if(Or<-24)bt[Ot]=Vr;else if(Or<-14){var vi=-14-Or;bt[Ot]=Vr+(Nr+1024>>vi)}else Or>15?bt[Ot]=Vr+31744:bt[Ot]=Vr+(Or+15<<10)+Nr}return bt}function En(Me){return Array.isArray(Me)||qr(Me)}var ki=34467,_n=3553,ya=34067,ea=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Yl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,ql=35842,xo=35843,Kl=36196,Ns=5121,Hl=5123,ac=5125,oa=5126,qo=10242,Oo=10243,Ol=10497,Pc=33071,Do=33648,rf=10240,Vf=10241,pl=9728,Zc=9729,Jl=9984,qs=9985,yu=9986,oc=9987,Cf=33170,sc=4352,jh=4353,Lf=4354,cs=34046,nf=3317,Gf=37440,$l=37441,fl=37443,lc=37444,Fu=33984,Es=[Jl,yu,qs,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return"[object "+Me+"]"}var uc=ps("HTMLCanvasElement"),xl=ps("OffscreenCanvas"),Gu=ps("CanvasRenderingContext2D"),Os=ps("ImageBitmap"),od=ps("HTMLImageElement"),Po=ps("HTMLVideoElement"),sd=Object.keys(er).concat([uc,xl,Gu,Os,od,Po]),Ko=[];Ko[Ns]=1,Ko[oa]=4,Ko[zs]=2,Ko[Hl]=2,Ko[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Yl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[ql]=.5,Pa[xo]=.25,Pa[Kl]=.5;function af(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]=="number")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!En(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Hf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===Os}function Ah(Me){return bl(Me)===od}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return sd.indexOf(bt)>=0?!0:af(Me)||Hu(Me)||jr(Me)}function Yc(Me){return er[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var Ot=bt.length;switch(Me.type){case Ns:case Hl:case ac:case oa:var Lr=H.allocType(Me.type,Ot);Lr.set(bt),Me.data=Lr;break;case zs:Me.data=Sn(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?oa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=Sn(bt),H.freeType(bt)):Me.data=bt}function jf(Me,bt,Ot,Lr,Vr,Or){for(var Nr=Me.width,vi=Me.height,Ni=Me.channels,qi=Nr*vi*Ni,Si=th(Me,qi),Vn=0,Qi=0;Qi<vi;++Qi)for(var ji=0;ji<Nr;++ji)for(var oi=0;oi<Ni;++oi)Si[Vn++]=bt[Ot*ji+Lr*Qi+Vr*oi+Or];ju(Me,Si)}function cc(Me,bt,Ot,Lr,Vr,Or){var Nr;if(typeof Pa[Me]!="undefined"?Nr=Pa[Me]:Nr=Go[Me]*Ko[bt],Or&&(Nr*=6),Vr){for(var vi=0,Ni=Ot;Ni>=1;)vi+=Nr*Ni*Ni,Ni/=2;return vi}else return Nr*Ot*Lr}function of(Me,bt,Ot,Lr,Vr,Or,Nr){var vi={"don't care":sc,"dont care":sc,nice:Lf,fast:jh},Ni={repeat:Ol,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Si=e({mipmap:oc,"nearest mipmap nearest":Jl,"linear mipmap nearest":qs,"nearest mipmap linear":yu,"linear mipmap linear":oc},qi),Vn={none:0,browser:lc},Qi={uint8:Ns,rgba4:ll,rgb565:zl,"rgb5 a1":ul},ji={alpha:_o,luminance:po,"luminance alpha":Lo,rgb:No,rgba:Ma,rgba4:ko,"rgb5 a1":Ds,rgb565:Fs},oi={};bt.ext_srgb&&(ji.srgb=cl,ji.srgba=Ks),bt.oes_texture_float&&(Qi.float32=Qi.float=oa),bt.oes_texture_half_float&&(Qi.float16=Qi["half float"]=zs),bt.webgl_depth_texture&&(e(ji,{depth:il,"depth stencil":As}),e(Qi,{uint16:Hl,uint32:ac,"depth stencil":us})),bt.webgl_compressed_texture_s3tc&&e(oi,{"rgb s3tc dxt1":Io,"rgba s3tc dxt1":ls,"rgba s3tc dxt3":Yl,"rgba s3tc dxt5":Su}),bt.webgl_compressed_texture_atc&&e(oi,{"rgb atc":nc,"rgba atc explicit alpha":bs,"rgba atc interpolated alpha":Rn}),bt.webgl_compressed_texture_pvrtc&&e(oi,{"rgb pvrtc 4bppv1":_a,"rgb pvrtc 2bppv1":Vu,"rgba pvrtc 4bppv1":ql,"rgba pvrtc 2bppv1":xo}),bt.webgl_compressed_texture_etc1&&(oi["rgb etc1"]=Kl);var Tr=Array.prototype.slice.call(Me.getParameter(ki));Object.keys(oi).forEach(function(ne){var be=oi[ne];Tr.indexOf(be)>=0&&(ji[ne]=be)});var Zr=Object.keys(ji);Ot.textureFormats=Zr;var yi=[];Object.keys(ji).forEach(function(ne){var be=ji[ne];yi[be]=ne});var Ii=[];Object.keys(Qi).forEach(function(ne){var be=Qi[ne];Ii[be]=ne});var ui=[];Object.keys(qi).forEach(function(ne){var be=qi[ne];ui[be]=ne});var nn=[];Object.keys(Si).forEach(function(ne){var be=Si[ne];nn[be]=ne});var Xi=[];Object.keys(Ni).forEach(function(ne){var be=Ni[ne];Xi[be]=ne});var qn=Zr.reduce(function(ne,be){var Be=ji[be];return Be===po||Be===_o||Be===po||Be===Lo||Be===il||Be===As||bt.ext_srgb&&(Be===cl||Be===Ks)?ne[Be]=Be:Be===Ds||be.indexOf("rgba")>=0?ne[Be]=Ma:ne[Be]=No,ne},{});function fi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function si(ne,be){ne.internalformat=be.internalformat,ne.format=be.format,ne.type=be.type,ne.compressed=be.compressed,ne.premultiplyAlpha=be.premultiplyAlpha,ne.flipY=be.flipY,ne.unpackAlignment=be.unpackAlignment,ne.colorSpace=be.colorSpace,ne.width=be.width,ne.height=be.height,ne.channels=be.channels}function mn(ne,be){if(!(typeof be!="object"||!be)){if("premultiplyAlpha"in be&&(ne.premultiplyAlpha=be.premultiplyAlpha),"flipY"in be&&(ne.flipY=be.flipY),"alignment"in be&&(ne.unpackAlignment=be.alignment),"colorSpace"in be&&(ne.colorSpace=Vn[be.colorSpace]),"type"in be){var Be=be.type;ne.type=Qi[Be]}var ht=ne.width,Yt=ne.height,cr=ne.channels,Nt=!1;"shape"in be?(ht=be.shape[0],Yt=be.shape[1],be.shape.length===3&&(cr=be.shape[2],Nt=!0)):("radius"in be&&(ht=Yt=be.radius),"width"in be&&(ht=be.width),"height"in be&&(Yt=be.height),"channels"in be&&(cr=be.channels,Nt=!0)),ne.width=ht|0,ne.height=Yt|0,ne.channels=cr|0;var Ne=!1;if("format"in be){var $e=be.format,ot=ne.internalformat=ji[$e];ne.format=qn[ot],$e in Qi&&("type"in be||(ne.type=Qi[$e])),$e in oi&&(ne.compressed=!0),Ne=!0}!Nt&&Ne?ne.channels=Go[ne.format]:Nt&&!Ne&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Gf,ne.flipY),Me.pixelStorei($l,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(nf,ne.unpackAlignment)}function Ui(){fi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Bi(ne,be){var Be=null;if(_f(be)?Be=be:be&&(mn(ne,be),"x"in be&&(ne.xOffset=be.x|0),"y"in be&&(ne.yOffset=be.y|0),_f(be.data)&&(Be=be.data)),be.copy){var ht=Vr.viewportWidth,Yt=Vr.viewportHeight;ne.width=ne.width||ht-ne.xOffset,ne.height=ne.height||Yt-ne.yOffset,ne.needsCopy=!0}else if(!Be)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(qr(Be))ne.channels=ne.channels||4,ne.data=Be,!("type"in be)&&ne.type===Ns&&(ne.type=Yc(Be));else if(af(Be))ne.channels=ne.channels||4,eh(ne,Be),ne.alignment=1,ne.needsFree=!0;else if(jr(Be)){var cr=Be.data;!Array.isArray(cr)&&ne.type===Ns&&(ne.type=Yc(cr));var Nt=Be.shape,Ne=Be.stride,$e,ot,It,Bt,Ft,Ut;Nt.length===3?(It=Nt[2],Ut=Ne[2]):(It=1,Ut=1),$e=Nt[0],ot=Nt[1],Bt=Ne[0],Ft=Ne[1],ne.alignment=1,ne.width=$e,ne.height=ot,ne.channels=It,ne.format=ne.internalformat=Hs[It],ne.needsFree=!0,jf(ne,cr,Bt,Ft,Ut,Be.offset)}else if(Hf(Be)||Ic(Be)||yf(Be))Hf(Be)||Ic(Be)?ne.element=Be:ne.element=Be.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Be))ne.element=Be,ne.width=Be.width,ne.height=Be.height,ne.channels=4;else if(Ah(Be))ne.element=Be,ne.width=Be.naturalWidth,ne.height=Be.naturalHeight,ne.channels=4;else if(Qf(Be))ne.element=Be,ne.width=Be.videoWidth,ne.height=Be.videoHeight,ne.channels=4;else if(Hu(Be)){var zt=ne.width||Be[0].length,_t=ne.height||Be.length,Dt=ne.channels;En(Be[0][0])?Dt=Dt||Be[0][0].length:Dt=Dt||1;for(var vt=Ge.shape(Be),lr=1,yr=0;yr<vt.length;++yr)lr*=vt[yr];var Br=th(ne,lr);Ge.flatten(Be,vt,"",Br),ju(ne,Br),ne.alignment=1,ne.width=zt,ne.height=_t,ne.channels=Dt,ne.format=ne.internalformat=Hs[Dt],ne.needsFree=!0}ne.type===oa||ne.type}function pn(ne,be,Be){var ht=ne.element,Yt=ne.data,cr=ne.internalformat,Nt=ne.format,Ne=ne.type,$e=ne.width,ot=ne.height;Ji(ne),ht?Me.texImage2D(be,Be,Nt,Nt,Ne,ht):ne.compressed?Me.compressedTexImage2D(be,Be,cr,$e,ot,0,Yt):ne.needsCopy?(Lr(),Me.copyTexImage2D(be,Be,Nt,ne.xOffset,ne.yOffset,$e,ot,0)):Me.texImage2D(be,Be,Nt,$e,ot,0,Nt,Ne,Yt||null)}function Nn(ne,be,Be,ht,Yt){var cr=ne.element,Nt=ne.data,Ne=ne.internalformat,$e=ne.format,ot=ne.type,It=ne.width,Bt=ne.height;Ji(ne),cr?Me.texSubImage2D(be,Yt,Be,ht,$e,ot,cr):ne.compressed?Me.compressedTexSubImage2D(be,Yt,Be,ht,Ne,It,Bt,Nt):ne.needsCopy?(Lr(),Me.copyTexSubImage2D(be,Yt,Be,ht,ne.xOffset,ne.yOffset,It,Bt)):Me.texSubImage2D(be,Yt,Be,ht,It,Bt,$e,ot,Nt)}var aa=[];function Ki(){return aa.pop()||new Ui}function Cn(ne){ne.needsFree&&H.freeType(ne.data),Ui.call(ne),aa.push(ne)}function ia(){fi.call(this),this.genMipmaps=!1,this.mipmapHint=sc,this.mipmask=0,this.images=Array(16)}function sa(ne,be,Be){var ht=ne.images[0]=Ki();ne.mipmask=1,ht.width=ne.width=be,ht.height=ne.height=Be,ht.channels=ne.channels=4}function ba(ne,be){var Be=null;if(_f(be))Be=ne.images[0]=Ki(),si(Be,ne),Bi(Be,be),ne.mipmask=1;else if(mn(ne,be),Array.isArray(be.mipmap))for(var ht=be.mipmap,Yt=0;Yt<ht.length;++Yt)Be=ne.images[Yt]=Ki(),si(Be,ne),Be.width>>=Yt,Be.height>>=Yt,Bi(Be,ht[Yt]),ne.mipmask|=1<<Yt;else Be=ne.images[0]=Ki(),si(Be,ne),Bi(Be,be),ne.mipmask=1;si(ne,ne.images[0]),ne.compressed&&(ne.internalformat===Io||ne.internalformat===ls||ne.internalformat===Yl||ne.internalformat)}function is(ne,be){for(var Be=ne.images,ht=0;ht<Be.length;++ht){if(!Be[ht])return;pn(Be[ht],be,ht)}}var Zs=[];function Va(){var ne=Zs.pop()||new ia;fi.call(ne),ne.mipmask=0;for(var be=0;be<16;++be)ne.images[be]=null;return ne}function Ml(ne){for(var be=ne.images,Be=0;Be<be.length;++Be)be[Be]&&Cn(be[Be]),be[Be]=null;Zs.push(ne)}function zo(){this.minFilter=pl,this.magFilter=pl,this.wrapS=Pc,this.wrapT=Pc,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=sc}function Qs(ne,be){if("min"in be){var Be=be.min;ne.minFilter=Si[Be],Es.indexOf(ne.minFilter)>=0&&!("faces"in be)&&(ne.genMipmaps=!0)}if("mag"in be){var ht=be.mag;ne.magFilter=qi[ht]}var Yt=ne.wrapS,cr=ne.wrapT;if("wrap"in be){var Nt=be.wrap;typeof Nt=="string"?Yt=cr=Ni[Nt]:Array.isArray(Nt)&&(Yt=Ni[Nt[0]],cr=Ni[Nt[1]])}else{if("wrapS"in be){var Ne=be.wrapS;Yt=Ni[Ne]}if("wrapT"in be){var $e=be.wrapT;cr=Ni[$e]}}if(ne.wrapS=Yt,ne.wrapT=cr,"anisotropic"in be){var ot=be.anisotropic;ne.anisotropic=be.anisotropic}if("mipmap"in be){var It=!1;switch(typeof be.mipmap){case"string":ne.mipmapHint=vi[be.mipmap],ne.genMipmaps=!0,It=!0;break;case"boolean":It=ne.genMipmaps=be.mipmap;break;case"object":ne.genMipmaps=!1,It=!0;break;default:}It&&!("min"in be)&&(ne.minFilter=Jl)}}function al(ne,be){Me.texParameteri(be,Vf,ne.minFilter),Me.texParameteri(be,rf,ne.magFilter),Me.texParameteri(be,qo,ne.wrapS),Me.texParameteri(be,Oo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(be,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(be))}var Vl=0,ss={},Vs=Ot.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){fi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Nr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var be=ne.texture,Be=ne.unit,ht=ne.target;Be>=0&&(Me.activeTexture(Fu+Be),Me.bindTexture(ht,null),Ys[Be]=null),Me.deleteTexture(be),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Or.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var be=ne.unit;if(be<0){for(var Be=0;Be<Vs;++Be){var ht=Ys[Be];if(ht){if(ht.bindCount>0)continue;ht.unit=-1}Ys[Be]=ne,be=Be;break}be>=Vs,Nr.profile&&Or.maxTextureUnits<be+1&&(Or.maxTextureUnits=be+1),ne.unit=be,Me.activeTexture(Fu+be),Me.bindTexture(ne.target,ne.texture)}return be},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Y(this)}});function D(ne,be){var Be=new wa(_n);ss[Be.id]=Be,Or.textureCount++;function ht(Nt,Ne){var $e=Be.texInfo;zo.call($e);var ot=Va();return typeof Nt=="number"?typeof Ne=="number"?sa(ot,Nt|0,Ne|0):sa(ot,Nt|0,Nt|0):Nt?(Qs($e,Nt),ba(ot,Nt)):sa(ot,1,1),$e.genMipmaps&&(ot.mipmask=(ot.width<<1)-1),Be.mipmask=ot.mipmask,si(Be,ot),Be.internalformat=ot.internalformat,ht.width=ot.width,ht.height=ot.height,ol(Be),is(ot,_n),al($e,_n),io(),Ml(ot),Nr.profile&&(Be.stats.size=cc(Be.internalformat,Be.type,ot.width,ot.height,$e.genMipmaps,!1)),ht.format=yi[Be.internalformat],ht.type=Ii[Be.type],ht.mag=ui[$e.magFilter],ht.min=nn[$e.minFilter],ht.wrapS=Xi[$e.wrapS],ht.wrapT=Xi[$e.wrapT],ht}function Yt(Nt,Ne,$e,ot){var It=Ne|0,Bt=$e|0,Ft=ot|0,Ut=Ki();return si(Ut,Be),Ut.width=0,Ut.height=0,Bi(Ut,Nt),Ut.width=Ut.width||(Be.width>>Ft)-It,Ut.height=Ut.height||(Be.height>>Ft)-Bt,ol(Be),Nn(Ut,_n,It,Bt,Ft),io(),Cn(Ut),ht}function cr(Nt,Ne){var $e=Nt|0,ot=Ne|0||$e;if($e===Be.width&&ot===Be.height)return ht;ht.width=Be.width=$e,ht.height=Be.height=ot,ol(Be);for(var It=0;Be.mipmask>>It;++It){var Bt=$e>>It,Ft=ot>>It;if(!Bt||!Ft)break;Me.texImage2D(_n,It,Be.format,Bt,Ft,0,Be.format,Be.type,null)}return io(),Nr.profile&&(Be.stats.size=cc(Be.internalformat,Be.type,$e,ot,!1,!1)),ht}return ht(ne,be),ht.subimage=Yt,ht.resize=cr,ht._reglType="texture2d",ht._texture=Be,Nr.profile&&(ht.stats=Be.stats),ht.destroy=function(){Be.decRef()},ht}function J(ne,be,Be,ht,Yt,cr){var Nt=new wa(ya);ss[Nt.id]=Nt,Or.cubeCount++;var Ne=new Array(6);function $e(Bt,Ft,Ut,zt,_t,Dt){var vt,lr=Nt.texInfo;for(zo.call(lr),vt=0;vt<6;++vt)Ne[vt]=Va();if(typeof Bt=="number"||!Bt){var yr=Bt|0||1;for(vt=0;vt<6;++vt)sa(Ne[vt],yr,yr)}else if(typeof Bt=="object")if(Ft)ba(Ne[0],Bt),ba(Ne[1],Ft),ba(Ne[2],Ut),ba(Ne[3],zt),ba(Ne[4],_t),ba(Ne[5],Dt);else if(Qs(lr,Bt),mn(Nt,Bt),"faces"in Bt){var Br=Bt.faces;for(vt=0;vt<6;++vt)si(Ne[vt],Nt),ba(Ne[vt],Br[vt])}else for(vt=0;vt<6;++vt)ba(Ne[vt],Bt);for(si(Nt,Ne[0]),lr.genMipmaps?Nt.mipmask=(Ne[0].width<<1)-1:Nt.mipmask=Ne[0].mipmask,Nt.internalformat=Ne[0].internalformat,$e.width=Ne[0].width,$e.height=Ne[0].height,ol(Nt),vt=0;vt<6;++vt)is(Ne[vt],ea+vt);for(al(lr,ya),io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,lr.genMipmaps,!0)),$e.format=yi[Nt.internalformat],$e.type=Ii[Nt.type],$e.mag=ui[lr.magFilter],$e.min=nn[lr.minFilter],$e.wrapS=Xi[lr.wrapS],$e.wrapT=Xi[lr.wrapT],vt=0;vt<6;++vt)Ml(Ne[vt]);return $e}function ot(Bt,Ft,Ut,zt,_t){var Dt=Ut|0,vt=zt|0,lr=_t|0,yr=Ki();return si(yr,Nt),yr.width=0,yr.height=0,Bi(yr,Ft),yr.width=yr.width||(Nt.width>>lr)-Dt,yr.height=yr.height||(Nt.height>>lr)-vt,ol(Nt),Nn(yr,ea+Bt,Dt,vt,lr),io(),Cn(yr),$e}function It(Bt){var Ft=Bt|0;if(Ft!==Nt.width){$e.width=Nt.width=Ft,$e.height=Nt.height=Ft,ol(Nt);for(var Ut=0;Ut<6;++Ut)for(var zt=0;Nt.mipmask>>zt;++zt)Me.texImage2D(ea+Ut,zt,Nt.format,Ft>>zt,Ft>>zt,0,Nt.format,Nt.type,null);return io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,!1,!0)),$e}}return $e(ne,be,Be,ht,Yt,cr),$e.subimage=ot,$e.resize=It,$e._reglType="textureCube",$e._texture=Nt,Nr.profile&&($e.stats=Nt.stats),$e.destroy=function(){Nt.decRef()},$e}function O(){for(var ne=0;ne<Vs;++ne)Me.activeTexture(Fu+ne),Me.bindTexture(_n,null),Ys[ne]=null;gt(ss).forEach(Y),Or.cubeCount=0,Or.textureCount=0}Nr.profile&&(Or.getTotalTextureSize=function(){var ne=0;return Object.keys(ss).forEach(function(be){ne+=ss[be].stats.size}),ne});function K(){for(var ne=0;ne<Vs;++ne){var be=Ys[ne];be&&(be.bindCount=0,be.unit=-1,Ys[ne]=null)}gt(ss).forEach(function(Be){Be.texture=Me.createTexture(),Me.bindTexture(Be.target,Be.texture);for(var ht=0;ht<32;++ht)if((Be.mipmask&1<<ht)!==0)if(Be.target===_n)Me.texImage2D(_n,ht,Be.internalformat,Be.width>>ht,Be.height>>ht,0,Be.internalformat,Be.type,null);else for(var Yt=0;Yt<6;++Yt)Me.texImage2D(ea+Yt,ht,Be.internalformat,Be.width>>ht,Be.height>>ht,0,Be.internalformat,Be.type,null);al(Be.texInfo,Be.target)})}function de(){for(var ne=0;ne<Vs;++ne){var be=Ys[ne];be&&(be.bindCount=0,be.unit=-1,Ys[ne]=null),Me.activeTexture(Fu+ne),Me.bindTexture(_n,null),Me.bindTexture(ya,null)}}return{create2D:D,createCube:J,clear:O,getTexture:function(ne){return null},restore:K,refresh:de}}var Nl=36161,Kc=32854,Rc=32855,gs=36194,Wf=33189,Wh=36168,rh=34041,sf=35907,Sh=34836,Mu=34842,ih=34843,js=[];js[Kc]=2,js[Rc]=2,js[gs]=2,js[Wf]=2,js[Wh]=1,js[rh]=4,js[sf]=4,js[Sh]=16,js[Mu]=8,js[ih]=6;function Eu(Me,bt,Ot){return js[Me]*bt*Ot}var Dc=function(Me,bt,Ot,Lr,Vr){var Or={rgba4:Kc,rgb565:gs,"rgb5 a1":Rc,depth:Wf,stencil:Wh,"depth stencil":rh};bt.ext_srgb&&(Or.srgba=sf),bt.ext_color_buffer_half_float&&(Or.rgba16f=Mu,Or.rgb16f=ih),bt.webgl_color_buffer_float&&(Or.rgba32f=Sh);var Nr=[];Object.keys(Or).forEach(function(ji){var oi=Or[ji];Nr[oi]=ji});var vi=0,Ni={};function qi(ji){this.id=vi++,this.refCount=1,this.renderbuffer=ji,this.format=Kc,this.width=0,this.height=0,Vr.profile&&(this.stats={size:0})}qi.prototype.decRef=function(){--this.refCount<=0&&Si(this)};function Si(ji){var oi=ji.renderbuffer;Me.bindRenderbuffer(Nl,null),Me.deleteRenderbuffer(oi),ji.renderbuffer=null,ji.refCount=0,delete Ni[ji.id],Lr.renderbufferCount--}function Vn(ji,oi){var Tr=new qi(Me.createRenderbuffer());Ni[Tr.id]=Tr,Lr.renderbufferCount++;function Zr(Ii,ui){var nn=0,Xi=0,qn=Kc;if(typeof Ii=="object"&&Ii){var fi=Ii;if("shape"in fi){var si=fi.shape;nn=si[0]|0,Xi=si[1]|0}else"radius"in fi&&(nn=Xi=fi.radius|0),"width"in fi&&(nn=fi.width|0),"height"in fi&&(Xi=fi.height|0);"format"in fi&&(qn=Or[fi.format])}else typeof Ii=="number"?(nn=Ii|0,typeof ui=="number"?Xi=ui|0:Xi=nn):Ii||(nn=Xi=1);if(!(nn===Tr.width&&Xi===Tr.height&&qn===Tr.format))return Zr.width=Tr.width=nn,Zr.height=Tr.height=Xi,Tr.format=qn,Me.bindRenderbuffer(Nl,Tr.renderbuffer),Me.renderbufferStorage(Nl,qn,nn,Xi),Vr.profile&&(Tr.stats.size=Eu(Tr.format,Tr.width,Tr.height)),Zr.format=Nr[Tr.format],Zr}function yi(Ii,ui){var nn=Ii|0,Xi=ui|0||nn;return nn===Tr.width&&Xi===Tr.height||(Zr.width=Tr.width=nn,Zr.height=Tr.height=Xi,Me.bindRenderbuffer(Nl,Tr.renderbuffer),Me.renderbufferStorage(Nl,Tr.format,nn,Xi),Vr.profile&&(Tr.stats.size=Eu(Tr.format,Tr.width,Tr.height))),Zr}return Zr(ji,oi),Zr.resize=yi,Zr._reglType="renderbuffer",Zr._renderbuffer=Tr,Vr.profile&&(Zr.stats=Tr.stats),Zr.destroy=function(){Tr.decRef()},Zr}Vr.profile&&(Lr.getTotalRenderbufferSize=function(){var ji=0;return Object.keys(Ni).forEach(function(oi){ji+=Ni[oi].stats.size}),ji});function Qi(){gt(Ni).forEach(function(ji){ji.renderbuffer=Me.createRenderbuffer(),Me.bindRenderbuffer(Nl,ji.renderbuffer),Me.renderbufferStorage(Nl,ji.format,ji.width,ji.height)}),Me.bindRenderbuffer(Nl,null)}return{create:Vn,clear:function(){gt(Ni).forEach(Si)},restore:Qi}},ks=36160,bc=36161,hu=3553,_u=34069,nl=36064,nh=36096,Mh=36128,zu=33306,Fc=36053,wc=36193,bd=5121,xf=5126,Pf=6407,qu=6408,bf=[];bf[qu]=4,bf[Pf]=3;var jl=[];jl[bd]=1,jl[xf]=4,jl[wc]=2;function lf(Me,bt,Ot,Lr,Vr,Or){var Nr={cur:null,next:null,dirty:!1,setFBO:null},vi=["rgba"],Ni=["rgba4","rgb565","rgb5 a1"];bt.ext_srgb&&Ni.push("srgba"),bt.ext_color_buffer_half_float&&Ni.push("rgba16f","rgb16f"),bt.webgl_color_buffer_float&&Ni.push("rgba32f");var qi=["uint8"];bt.oes_texture_half_float&&qi.push("half float","float16"),bt.oes_texture_float&&qi.push("float","float32");function Si(Ui,Bi,pn){this.target=Ui,this.texture=Bi,this.renderbuffer=pn;var Nn=0,aa=0;Bi?(Nn=Bi.width,aa=Bi.height):pn&&(Nn=pn.width,aa=pn.height),this.width=Nn,this.height=aa}function Vn(Ui){Ui&&(Ui.texture&&Ui.texture._texture.decRef(),Ui.renderbuffer&&Ui.renderbuffer._renderbuffer.decRef())}function Qi(Ui,Bi,pn){if(Ui)if(Ui.texture){var Nn=Ui.texture._texture,aa=Math.max(1,Nn.width),Ki=Math.max(1,Nn.height);Nn.refCount+=1}else{var Cn=Ui.renderbuffer._renderbuffer;Cn.refCount+=1}}function ji(Ui,Bi){Bi&&(Bi.texture?Me.framebufferTexture2D(ks,Ui,Bi.target,Bi.texture._texture.texture,0):Me.framebufferRenderbuffer(ks,Ui,bc,Bi.renderbuffer._renderbuffer.renderbuffer))}function oi(Ui){var Bi=hu,pn=null,Nn=null,aa=Ui;typeof Ui=="object"&&(aa=Ui.data,"target"in Ui&&(Bi=Ui.target|0));var Ki=aa._reglType;return Ki==="texture2d"||Ki==="textureCube"?pn=aa:Ki==="renderbuffer"&&(Nn=aa,Bi=bc),new Si(Bi,pn,Nn)}function Tr(Ui,Bi,pn,Nn,aa){if(pn){var Ki=Lr.create2D({width:Ui,height:Bi,format:Nn,type:aa});return Ki._texture.refCount=0,new Si(hu,Ki,null)}else{var Cn=Vr.create({width:Ui,height:Bi,format:Nn});return Cn._renderbuffer.refCount=0,new Si(bc,null,Cn)}}function Zr(Ui){return Ui&&(Ui.texture||Ui.renderbuffer)}function yi(Ui,Bi,pn){Ui&&(Ui.texture?Ui.texture.resize(Bi,pn):Ui.renderbuffer&&Ui.renderbuffer.resize(Bi,pn),Ui.width=Bi,Ui.height=pn)}var Ii=0,ui={};function nn(){this.id=Ii++,ui[this.id]=this,this.framebuffer=Me.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Xi(Ui){Ui.colorAttachments.forEach(Vn),Vn(Ui.depthAttachment),Vn(Ui.stencilAttachment),Vn(Ui.depthStencilAttachment)}function qn(Ui){var Bi=Ui.framebuffer;Me.deleteFramebuffer(Bi),Ui.framebuffer=null,Or.framebufferCount--,delete ui[Ui.id]}function fi(Ui){var Bi;Me.bindFramebuffer(ks,Ui.framebuffer);var pn=Ui.colorAttachments;for(Bi=0;Bi<pn.length;++Bi)ji(nl+Bi,pn[Bi]);for(Bi=pn.length;Bi<Ot.maxColorAttachments;++Bi)Me.framebufferTexture2D(ks,nl+Bi,hu,null,0);Me.framebufferTexture2D(ks,zu,hu,null,0),Me.framebufferTexture2D(ks,nh,hu,null,0),Me.framebufferTexture2D(ks,Mh,hu,null,0),ji(nh,Ui.depthAttachment),ji(Mh,Ui.stencilAttachment),ji(zu,Ui.depthStencilAttachment);var Nn=Me.checkFramebufferStatus(ks);Me.isContextLost(),Me.bindFramebuffer(ks,Nr.next?Nr.next.framebuffer:null),Nr.cur=Nr.next,Me.getError()}function si(Ui,Bi){var pn=new nn;Or.framebufferCount++;function Nn(Ki,Cn){var ia,sa=0,ba=0,is=!0,Zs=!0,Va=null,Ml=!0,zo="rgba",Qs="uint8",al=1,Vl=null,ss=null,Vs=null,Ys=!1;if(typeof Ki=="number")sa=Ki|0,ba=Cn|0||sa;else if(!Ki)sa=ba=1;else{var wa=Ki;if("shape"in wa){var ol=wa.shape;sa=ol[0],ba=ol[1]}else"radius"in wa&&(sa=ba=wa.radius),"width"in wa&&(sa=wa.width),"height"in wa&&(ba=wa.height);("color"in wa||"colors"in wa)&&(Va=wa.color||wa.colors,Array.isArray(Va)),Va||("colorCount"in wa&&(al=wa.colorCount|0),"colorTexture"in wa&&(Ml=!!wa.colorTexture,zo="rgba4"),"colorType"in wa&&(Qs=wa.colorType,Ml||(Qs==="half float"||Qs==="float16"?zo="rgba16f":(Qs==="float"||Qs==="float32")&&(zo="rgba32f"))),"colorFormat"in wa&&(zo=wa.colorFormat,vi.indexOf(zo)>=0?Ml=!0:Ni.indexOf(zo)>=0&&(Ml=!1))),("depthTexture"in wa||"depthStencilTexture"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),"depth"in wa&&(typeof wa.depth=="boolean"?is=wa.depth:(Vl=wa.depth,Zs=!1)),"stencil"in wa&&(typeof wa.stencil=="boolean"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),"depthStencil"in wa&&(typeof wa.depthStencil=="boolean"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(oi);else if(Va)io=[oi(Va)];else for(io=new Array(al),ia=0;ia<al;++ia)io[ia]=Tr(sa,ba,Ml,zo,Qs);sa=sa||io[0].width,ba=ba||io[0].height,Vl?Y=oi(Vl):is&&!Zs&&(Y=Tr(sa,ba,Ys,"depth","uint32")),ss?D=oi(ss):Zs&&!is&&(D=Tr(sa,ba,!1,"stencil","uint8")),Vs?J=oi(Vs):!Vl&&!ss&&Zs&&is&&(J=Tr(sa,ba,Ys,"depth stencil","depth stencil"));var O=null;for(ia=0;ia<io.length;++ia)if(Qi(io[ia],sa,ba),io[ia]&&io[ia].texture){var K=bf[io[ia].texture._texture.format]*jl[io[ia].texture._texture.type];O===null&&(O=K)}return Qi(Y,sa,ba),Qi(D,sa,ba),Qi(J,sa,ba),Xi(pn),pn.width=sa,pn.height=ba,pn.colorAttachments=io,pn.depthAttachment=Y,pn.stencilAttachment=D,pn.depthStencilAttachment=J,Nn.color=io.map(Zr),Nn.depth=Zr(Y),Nn.stencil=Zr(D),Nn.depthStencil=Zr(J),Nn.width=pn.width,Nn.height=pn.height,fi(pn),Nn}function aa(Ki,Cn){var ia=Math.max(Ki|0,1),sa=Math.max(Cn|0||ia,1);if(ia===pn.width&&sa===pn.height)return Nn;for(var ba=pn.colorAttachments,is=0;is<ba.length;++is)yi(ba[is],ia,sa);return yi(pn.depthAttachment,ia,sa),yi(pn.stencilAttachment,ia,sa),yi(pn.depthStencilAttachment,ia,sa),pn.width=Nn.width=ia,pn.height=Nn.height=sa,fi(pn),Nn}return Nn(Ui,Bi),e(Nn,{resize:aa,_reglType:"framebuffer",_framebuffer:pn,destroy:function(){qn(pn),Xi(pn)},use:function(Ki){Nr.setFBO({framebuffer:Nn},Ki)}})}function mn(Ui){var Bi=Array(6);function pn(aa){var Ki,Cn={color:null},ia=0,sa=null,ba="rgba",is="uint8",Zs=1;if(typeof aa=="number")ia=aa|0;else if(!aa)ia=1;else{var Va=aa;if("shape"in Va){var Ml=Va.shape;ia=Ml[0]}else"radius"in Va&&(ia=Va.radius|0),"width"in Va?(ia=Va.width|0,"height"in Va):"height"in Va&&(ia=Va.height|0);("color"in Va||"colors"in Va)&&(sa=Va.color||Va.colors,Array.isArray(sa)),sa||("colorCount"in Va&&(Zs=Va.colorCount|0),"colorType"in Va&&(is=Va.colorType),"colorFormat"in Va&&(ba=Va.colorFormat)),"depth"in Va&&(Cn.depth=Va.depth),"stencil"in Va&&(Cn.stencil=Va.stencil),"depthStencil"in Va&&(Cn.depthStencil=Va.depthStencil)}var zo;if(sa)if(Array.isArray(sa))for(zo=[],Ki=0;Ki<sa.length;++Ki)zo[Ki]=sa[Ki];else zo=[sa];else{zo=Array(Zs);var Qs={radius:ia,format:ba,type:is};for(Ki=0;Ki<Zs;++Ki)zo[Ki]=Lr.createCube(Qs)}for(Cn.color=Array(zo.length),Ki=0;Ki<zo.length;++Ki){var al=zo[Ki];ia=ia||al.width,Cn.color[Ki]={target:_u,data:zo[Ki]}}for(Ki=0;Ki<6;++Ki){for(var Vl=0;Vl<zo.length;++Vl)Cn.color[Vl].target=_u+Ki;Ki>0&&(Cn.depth=Bi[0].depth,Cn.stencil=Bi[0].stencil,Cn.depthStencil=Bi[0].depthStencil),Bi[Ki]?Bi[Ki](Cn):Bi[Ki]=si(Cn)}return e(pn,{width:ia,height:ia,color:zo})}function Nn(aa){var Ki,Cn=aa|0;if(Cn===pn.width)return pn;var ia=pn.color;for(Ki=0;Ki<ia.length;++Ki)ia[Ki].resize(Cn);for(Ki=0;Ki<6;++Ki)Bi[Ki].resize(Cn);return pn.width=pn.height=Cn,pn}return pn(Ui),e(pn,{faces:Bi,resize:Nn,_reglType:"framebufferCube",destroy:function(){Bi.forEach(function(aa){aa.destroy()})}})}function Ji(){Nr.cur=null,Nr.next=null,Nr.dirty=!0,gt(ui).forEach(function(Ui){Ui.framebuffer=Me.createFramebuffer(),fi(Ui)})}return e(Nr,{getFramebuffer:function(Ui){if(typeof Ui=="function"&&Ui._reglType==="framebuffer"){var Bi=Ui._framebuffer;if(Bi instanceof nn)return Bi}return null},create:si,createCube:mn,clear:function(){gt(ui).forEach(qn)},restore:Ji})}var Xh=5126,If=34962,Cs=34963;function du(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=Xh,this.offset=0,this.stride=0,this.divisor=0}function ku(Me,bt,Ot,Lr,Vr,Or,Nr){for(var vi=Ot.maxAttributes,Ni=new Array(vi),qi=0;qi<vi;++qi)Ni[qi]=new du;var Si=0,Vn={},Qi={Record:du,scope:{},state:Ni,currentVAO:null,targetVAO:null,restore:oi()?Xi:function(){},createVAO:qn,getVAO:Zr,destroyBuffer:ji,setVAO:oi()?yi:Ii,clear:oi()?ui:function(){}};function ji(fi){for(var si=0;si<Ni.length;++si){var mn=Ni[si];mn.buffer===fi&&(Me.disableVertexAttribArray(si),mn.buffer=null)}}function oi(){return bt.oes_vertex_array_object}function Tr(){return bt.angle_instanced_arrays}function Zr(fi){return typeof fi=="function"&&fi._vao?fi._vao:null}function yi(fi){if(fi!==Qi.currentVAO){var si=oi();fi?si.bindVertexArrayOES(fi.vao):si.bindVertexArrayOES(null),Qi.currentVAO=fi}}function Ii(fi){if(fi!==Qi.currentVAO){if(fi)fi.bindAttrs();else{for(var si=Tr(),mn=0;mn<Ni.length;++mn){var Ji=Ni[mn];Ji.buffer?(Me.enableVertexAttribArray(mn),Ji.buffer.bind(),Me.vertexAttribPointer(mn,Ji.size,Ji.type,Ji.normalized,Ji.stride,Ji.offfset),si&&Ji.divisor&&si.vertexAttribDivisorANGLE(mn,Ji.divisor)):(Me.disableVertexAttribArray(mn),Me.vertexAttrib4f(mn,Ji.x,Ji.y,Ji.z,Ji.w))}Nr.elements?Me.bindBuffer(Cs,Nr.elements.buffer.buffer):Me.bindBuffer(Cs,null)}Qi.currentVAO=fi}}function ui(){gt(Vn).forEach(function(fi){fi.destroy()})}function nn(){this.id=++Si,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var fi=oi();fi?this.vao=fi.createVertexArrayOES():this.vao=null,Vn[this.id]=this,this.buffers=[]}nn.prototype.bindAttrs=function(){for(var fi=Tr(),si=this.attributes,mn=0;mn<si.length;++mn){var Ji=si[mn];Ji.buffer?(Me.enableVertexAttribArray(mn),Me.bindBuffer(If,Ji.buffer.buffer),Me.vertexAttribPointer(mn,Ji.size,Ji.type,Ji.normalized,Ji.stride,Ji.offset),fi&&Ji.divisor&&fi.vertexAttribDivisorANGLE(mn,Ji.divisor)):(Me.disableVertexAttribArray(mn),Me.vertexAttrib4f(mn,Ji.x,Ji.y,Ji.z,Ji.w))}for(var Ui=si.length;Ui<vi;++Ui)Me.disableVertexAttribArray(Ui);var Bi=Or.getElements(this.elements);Bi?Me.bindBuffer(Cs,Bi.buffer.buffer):Me.bindBuffer(Cs,null)},nn.prototype.refresh=function(){var fi=oi();fi&&(fi.bindVertexArrayOES(this.vao),this.bindAttrs(),Qi.currentVAO=null,fi.bindVertexArrayOES(null))},nn.prototype.destroy=function(){if(this.vao){var fi=oi();this===Qi.currentVAO&&(Qi.currentVAO=null,fi.bindVertexArrayOES(null)),fi.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),Vn[this.id]&&(delete Vn[this.id],Lr.vaoCount-=1)};function Xi(){var fi=oi();fi&>(Vn).forEach(function(si){si.refresh()})}function qn(fi){var si=new nn;Lr.vaoCount+=1;function mn(Ji){var Ui;if(Array.isArray(Ji))Ui=Ji,si.elements&&si.ownsElements&&si.elements.destroy(),si.elements=null,si.ownsElements=!1,si.offset=0,si.count=0,si.instances=-1,si.primitive=4;else{if(Ji.elements){var Bi=Ji.elements;si.ownsElements?typeof Bi=="function"&&Bi._reglType==="elements"?(si.elements.destroy(),si.ownsElements=!1):(si.elements(Bi),si.ownsElements=!1):Or.getElements(Ji.elements)?(si.elements=Ji.elements,si.ownsElements=!1):(si.elements=Or.create(Ji.elements),si.ownsElements=!0)}else si.elements=null,si.ownsElements=!1;Ui=Ji.attributes,si.offset=0,si.count=-1,si.instances=-1,si.primitive=4,si.elements&&(si.count=si.elements._elements.vertCount,si.primitive=si.elements._elements.primType),"offset"in Ji&&(si.offset=Ji.offset|0),"count"in Ji&&(si.count=Ji.count|0),"instances"in Ji&&(si.instances=Ji.instances|0),"primitive"in Ji&&(si.primitive=Mn[Ji.primitive])}var pn={},Nn=si.attributes;Nn.length=Ui.length;for(var aa=0;aa<Ui.length;++aa){var Ki=Ui[aa],Cn=Nn[aa]=new du,ia=Ki.data||Ki;if(Array.isArray(ia)||qr(ia)||jr(ia)){var sa;si.buffers[aa]&&(sa=si.buffers[aa],qr(ia)&&sa._buffer.byteLength>=ia.byteLength?sa.subdata(ia):(sa.destroy(),si.buffers[aa]=null)),si.buffers[aa]||(sa=si.buffers[aa]=Vr.create(Ki,If,!1,!0)),Cn.buffer=Vr.getBuffer(sa),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1,pn[aa]=1}else Vr.getBuffer(Ki)?(Cn.buffer=Vr.getBuffer(Ki),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1):Vr.getBuffer(Ki.buffer)?(Cn.buffer=Vr.getBuffer(Ki.buffer),Cn.size=(+Ki.size||Cn.buffer.dimension)|0,Cn.normalized=!!Ki.normalized||!1,"type"in Ki?Cn.type=un[Ki.type]:Cn.type=Cn.buffer.dtype,Cn.offset=(Ki.offset||0)|0,Cn.stride=(Ki.stride||0)|0,Cn.divisor=(Ki.divisor||0)|0,Cn.state=1):"x"in Ki&&(Cn.x=+Ki.x||0,Cn.y=+Ki.y||0,Cn.z=+Ki.z||0,Cn.w=+Ki.w||0,Cn.state=2)}for(var ba=0;ba<si.buffers.length;++ba)!pn[ba]&&si.buffers[ba]&&(si.buffers[ba].destroy(),si.buffers[ba]=null);return si.refresh(),mn}return mn.destroy=function(){for(var Ji=0;Ji<si.buffers.length;++Ji)si.buffers[Ji]&&si.buffers[Ji].destroy();si.buffers.length=0,si.ownsElements&&(si.elements.destroy(),si.elements=null,si.ownsElements=!1),si.destroy()},mn._vao=si,mn._reglType="vao",mn(fi)}return Qi}var Xf=35632,Us=35633,wf=35718,zc=35721;function Wu(Me,bt,Ot,Lr){var Vr={},Or={};function Nr(Tr,Zr,yi,Ii){this.name=Tr,this.id=Zr,this.location=yi,this.info=Ii}function vi(Tr,Zr){for(var yi=0;yi<Tr.length;++yi)if(Tr[yi].id===Zr.id){Tr[yi].location=Zr.location;return}Tr.push(Zr)}function Ni(Tr,Zr,yi){var Ii=Tr===Xf?Vr:Or,ui=Ii[Zr];if(!ui){var nn=bt.str(Zr);ui=Me.createShader(Tr),Me.shaderSource(ui,nn),Me.compileShader(ui),Ii[Zr]=ui}return ui}var qi={},Si=[],Vn=0;function Qi(Tr,Zr){this.id=Vn++,this.fragId=Tr,this.vertId=Zr,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Lr.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function ji(Tr,Zr,yi){var Ii,ui,nn=Ni(Xf,Tr.fragId),Xi=Ni(Us,Tr.vertId),qn=Tr.program=Me.createProgram();if(Me.attachShader(qn,nn),Me.attachShader(qn,Xi),yi)for(Ii=0;Ii<yi.length;++Ii){var fi=yi[Ii];Me.bindAttribLocation(qn,fi[0],fi[1])}Me.linkProgram(qn);var si=Me.getProgramParameter(qn,wf);Lr.profile&&(Tr.stats.uniformsCount=si);var mn=Tr.uniforms;for(Ii=0;Ii<si;++Ii)if(ui=Me.getActiveUniform(qn,Ii),ui)if(ui.size>1)for(var Ji=0;Ji<ui.size;++Ji){var Ui=ui.name.replace("[0]","["+Ji+"]");vi(mn,new Nr(Ui,bt.id(Ui),Me.getUniformLocation(qn,Ui),ui))}else vi(mn,new Nr(ui.name,bt.id(ui.name),Me.getUniformLocation(qn,ui.name),ui));var Bi=Me.getProgramParameter(qn,zc);Lr.profile&&(Tr.stats.attributesCount=Bi);var pn=Tr.attributes;for(Ii=0;Ii<Bi;++Ii)ui=Me.getActiveAttrib(qn,Ii),ui&&vi(pn,new Nr(ui.name,bt.id(ui.name),Me.getAttribLocation(qn,ui.name),ui))}Lr.profile&&(Ot.getMaxUniformsCount=function(){var Tr=0;return Si.forEach(function(Zr){Zr.stats.uniformsCount>Tr&&(Tr=Zr.stats.uniformsCount)}),Tr},Ot.getMaxAttributesCount=function(){var Tr=0;return Si.forEach(function(Zr){Zr.stats.attributesCount>Tr&&(Tr=Zr.stats.attributesCount)}),Tr});function oi(){Vr={},Or={};for(var Tr=0;Tr<Si.length;++Tr)ji(Si[Tr],null,Si[Tr].attributes.map(function(Zr){return[Zr.location,Zr.name]}))}return{clear:function(){var Tr=Me.deleteShader.bind(Me);gt(Vr).forEach(Tr),Vr={},gt(Or).forEach(Tr),Or={},Si.forEach(function(Zr){Me.deleteProgram(Zr.program)}),Si.length=0,qi={},Ot.shaderCount=0},program:function(Tr,Zr,yi,Ii){var ui=qi[Zr];ui||(ui=qi[Zr]={});var nn=ui[Tr];if(nn&&(nn.refCount++,!Ii))return nn;var Xi=new Qi(Zr,Tr);return Ot.shaderCount++,ji(Xi,yi,Ii),nn||(ui[Tr]=Xi),Si.push(Xi),e(Xi,{destroy:function(){if(Xi.refCount--,Xi.refCount<=0){Me.deleteProgram(Xi.program);var qn=Si.indexOf(Xi);Si.splice(qn,1),Ot.shaderCount--}ui[Xi.vertId].refCount<=0&&(Me.deleteShader(Or[Xi.vertId]),delete Or[Xi.vertId],delete qi[Xi.fragId][Xi.vertId]),Object.keys(qi[Xi.fragId]).length||(Me.deleteShader(Vr[Xi.fragId]),delete Vr[Xi.fragId],delete qi[Xi.fragId])}})},restore:oi,shader:Ni,frag:-1,vert:-1}}var Rf=6408,Xu=5121,uf=3333,Zf=5126;function Wl(Me,bt,Ot,Lr,Vr,Or,Nr){function vi(Si){var Vn;bt.next===null?Vn=Xu:Vn=bt.next.colorAttachments[0].texture._texture.type;var Qi=0,ji=0,oi=Lr.framebufferWidth,Tr=Lr.framebufferHeight,Zr=null;qr(Si)?Zr=Si:Si&&(Qi=Si.x|0,ji=Si.y|0,oi=(Si.width||Lr.framebufferWidth-Qi)|0,Tr=(Si.height||Lr.framebufferHeight-ji)|0,Zr=Si.data||null),Ot();var yi=oi*Tr*4;return Zr||(Vn===Xu?Zr=new Uint8Array(yi):Vn===Zf&&(Zr=Zr||new Float32Array(yi))),Me.pixelStorei(uf,4),Me.readPixels(Qi,ji,oi,Tr,Rf,Vn,Zr),Zr}function Ni(Si){var Vn;return bt.setFBO({framebuffer:Si.framebuffer},function(){Vn=vi(Si)}),Vn}function qi(Si){return!Si||!("framebuffer"in Si)?vi(Si):Ni(Si)}return qi}var ah=0,Zu="";function qc(Me){return vu(Tc(fc(Me)))}function Tc(Me){return kt(Yi(Bc(Me),Me.length*8))}function wl(Me,bt){var Ot=Bc(Me);Ot.length>16&&(Ot=Yi(Ot,Me.length*8));for(var Lr=Array(16),Vr=Array(16),Or=0;Or<16;Or++)Lr[Or]=Ot[Or]^909522486,Vr[Or]=Ot[Or]^1549556828;var Nr=Yi(Lr.concat(Bc(bt)),512+bt.length*8);return kt(Yi(Vr.concat(Nr),768))}function vu(Me){for(var bt=ah?"0123456789ABCDEF":"0123456789abcdef",Ot="",Lr,Vr=0;Vr<Me.length;Vr++)Lr=Me.charCodeAt(Vr),Ot+=bt.charAt(Lr>>>4&15)+bt.charAt(Lr&15);return Ot}function Oc(Me){for(var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ot="",Lr=Me.length,Vr=0;Vr<Lr;Vr+=3)for(var Or=Me.charCodeAt(Vr)<<16|(Vr+1<Lr?Me.charCodeAt(Vr+1)<<8:0)|(Vr+2<Lr?Me.charCodeAt(Vr+2):0),Nr=0;Nr<4;Nr++)Vr*8+Nr*6>Me.length*8?Ot+=Zu:Ot+=bt.charAt(Or>>>6*(3-Nr)&63);return Ot}function cf(Me,bt){var Ot=bt.length,Lr=Array(),Vr,Or,Nr,vi,Ni=Array(Math.ceil(Me.length/2));for(Vr=0;Vr<Ni.length;Vr++)Ni[Vr]=Me.charCodeAt(Vr*2)<<8|Me.charCodeAt(Vr*2+1);for(;Ni.length>0;){for(vi=Array(),Nr=0,Vr=0;Vr<Ni.length;Vr++)Nr=(Nr<<16)+Ni[Vr],Or=Math.floor(Nr/Ot),Nr-=Or*Ot,(vi.length>0||Or>0)&&(vi[vi.length]=Or);Lr[Lr.length]=Nr,Ni=vi}var qi="";for(Vr=Lr.length-1;Vr>=0;Vr--)qi+=bt.charAt(Lr[Vr]);var Si=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(Vr=qi.length;Vr<Si;Vr++)qi=bt[0]+qi;return qi}function fc(Me){for(var bt="",Ot=-1,Lr,Vr;++Ot<Me.length;)Lr=Me.charCodeAt(Ot),Vr=Ot+1<Me.length?Me.charCodeAt(Ot+1):0,55296<=Lr&&Lr<=56319&&56320<=Vr&&Vr<=57343&&(Lr=65536+((Lr&1023)<<10)+(Vr&1023),Ot++),Lr<=127?bt+=String.fromCharCode(Lr):Lr<=2047?bt+=String.fromCharCode(192|Lr>>>6&31,128|Lr&63):Lr<=65535?bt+=String.fromCharCode(224|Lr>>>12&15,128|Lr>>>6&63,128|Lr&63):Lr<=2097151&&(bt+=String.fromCharCode(240|Lr>>>18&7,128|Lr>>>12&63,128|Lr>>>6&63,128|Lr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),Ot=0;Ot<bt.length;Ot++)bt[Ot]=0;for(var Ot=0;Ot<Me.length*8;Ot+=8)bt[Ot>>5]|=(Me.charCodeAt(Ot/8)&255)<<24-Ot%32;return bt}function kt(Me){for(var bt="",Ot=0;Ot<Me.length*32;Ot+=8)bt+=String.fromCharCode(Me[Ot>>5]>>>24-Ot%32&255);return bt}function Zt(Me,bt){return Me>>>bt|Me<<32-bt}function Mr(Me,bt){return Me>>>bt}function xr(Me,bt,Ot){return Me&bt^~Me&Ot}function Kr(Me,bt,Ot){return Me&bt^Me&Ot^bt&Ot}function Mi(Me){return Zt(Me,2)^Zt(Me,13)^Zt(Me,22)}function Wi(Me){return Zt(Me,6)^Zt(Me,11)^Zt(Me,25)}function dn(Me){return Zt(Me,7)^Zt(Me,18)^Mr(Me,3)}function wn(Me){return Zt(Me,17)^Zt(Me,19)^Mr(Me,10)}var On=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Yi(Me,bt){var Ot=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Lr=new Array(64),Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,Qi=0;Qi<Me.length;Qi+=16){for(Vr=Ot[0],Or=Ot[1],Nr=Ot[2],vi=Ot[3],Ni=Ot[4],qi=Ot[5],Si=Ot[6],Vn=Ot[7],ji=0;ji<64;ji++)ji<16?Lr[ji]=Me[ji+Qi]:Lr[ji]=$i($i($i(wn(Lr[ji-2]),Lr[ji-7]),dn(Lr[ji-15])),Lr[ji-16]),oi=$i($i($i($i(Vn,Wi(Ni)),xr(Ni,qi,Si)),On[ji]),Lr[ji]),Tr=$i(Mi(Vr),Kr(Vr,Or,Nr)),Vn=Si,Si=qi,qi=Ni,Ni=$i(vi,oi),vi=Nr,Nr=Or,Or=Vr,Vr=$i(oi,Tr);Ot[0]=$i(Vr,Ot[0]),Ot[1]=$i(Or,Ot[1]),Ot[2]=$i(Nr,Ot[2]),Ot[3]=$i(vi,Ot[3]),Ot[4]=$i(Ni,Ot[4]),Ot[5]=$i(qi,Ot[5]),Ot[6]=$i(Si,Ot[6]),Ot[7]=$i(Vn,Ot[7])}return Ot}function $i(Me,bt){var Ot=(Me&65535)+(bt&65535),Lr=(Me>>16)+(bt>>16)+(Ot>>16);return Lr<<16|Ot&65535}function an(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return an(Me).join("")}function ta(Me){var bt=Me&&Me.cache,Ot=0,Lr=[],Vr=[],Or=[];function Nr(oi,Tr){var Zr=Tr&&Tr.stable;if(!Zr){for(var yi=0;yi<Vr.length;++yi)if(Vr[yi]===oi&&!Or[yi])return Lr[yi]}var Ii="g"+Ot++;return Lr.push(Ii),Vr.push(oi),Or.push(Zr),Ii}function vi(){var oi=[];function Tr(){oi.push.apply(oi,an(arguments))}var Zr=[];function yi(){var Ii="v"+Ot++;return Zr.push(Ii),arguments.length>0&&(oi.push(Ii,"="),oi.push.apply(oi,an(arguments)),oi.push(";")),Ii}return e(Tr,{def:yi,toString:function(){return Fi([Zr.length>0?"var "+Zr.join(",")+";":"",Fi(oi)])}})}function Ni(){var oi=vi(),Tr=vi(),Zr=oi.toString,yi=Tr.toString;function Ii(ui,nn){Tr(ui,nn,"=",oi.def(ui,nn),";")}return e(function(){oi.apply(oi,an(arguments))},{def:oi.def,entry:oi,exit:Tr,save:Ii,set:function(ui,nn,Xi){Ii(ui,nn),oi(ui,nn,"=",Xi,";")},toString:function(){return Zr()+yi()}})}function qi(){var oi=Fi(arguments),Tr=Ni(),Zr=Ni(),yi=Tr.toString,Ii=Zr.toString;return e(Tr,{then:function(){return Tr.apply(Tr,an(arguments)),this},else:function(){return Zr.apply(Zr,an(arguments)),this},toString:function(){var ui=Ii();return ui&&(ui="else{"+ui+"}"),Fi(["if(",oi,"){",yi(),"}",ui])}})}var Si=vi(),Vn={};function Qi(oi,Tr){var Zr=[];function yi(){var qn="a"+Zr.length;return Zr.push(qn),qn}Tr=Tr||0;for(var Ii=0;Ii<Tr;++Ii)yi();var ui=Ni(),nn=ui.toString,Xi=Vn[oi]=e(ui,{arg:yi,toString:function(){return Fi(["function(",Zr.join(),"){",nn(),"}"])}});return Xi}function ji(){var oi=['"use strict";',Si,"return {"];Object.keys(Vn).forEach(function(Ii){oi.push('"',Ii,'":',Vn[Ii].toString(),",")}),oi.push("}");var Tr=Fi(oi).replace(/;/g,`;
|
||
`).replace(/}/g,`}
|
||
`).replace(/{/g,`{
|
||
`),Zr;if(bt&&(Zr=qc(Tr),bt[Zr]))return bt[Zr].apply(null,Vr);var yi=Function.apply(null,Lr.concat(Tr));return bt&&(bt[Zr]=yi),yi.apply(null,Vr)}return{global:Si,link:Nr,block:vi,proc:Qi,scope:Ni,cond:qi,compile:ji}}var Ca="xyzw".split(""),Ra=5121,La=1,Na=2,Zn=0,Dn=1,Ka=2,bo=3,Zo=4,Ss=5,as=6,ws="dither",Ho="blend.enable",ml="blend.color",Ws="blend.equation",Ls="blend.func",va="depth.enable",no="depth.func",ys="depth.range",rs="depth.mask",Ql="colorMask",Cu="cull.enable",Yu="cull.face",Nc="frontFace",pu="lineWidth",Uc="polygonOffset.enable",xu="polygonOffset.offset",Ac="sample.alpha",Ua="sample.enable",oo="sample.coverage",Vc="stencil.enable",hc="stencil.mask",Ku="stencil.func",ue="stencil.opFront",w="stencil.opBack",B="scissor.enable",Q="scissor.box",ee="viewport",le="profile",ze="framebuffer",Ze="vert",ut="frag",Mt="elements",Jt="primitive",$t="count",mr="offset",Cr="instances",ve="vao",xe="Width",Ie="Height",qe=ze+xe,Qe=ze+Ie,Xe=ee+xe,nt=ee+Ie,qt="drawingBuffer",jt=qt+xe,ar=qt+Ie,fr=[Ls,Ws,Ku,ue,w,oo,ee,Q,xu],br=34962,Fr=34963,Hr=2884,ri=3042,Ci=3024,cn=2960,sn=2929,Ln=3089,Yn=32823,Aa=32926,fa=32928,$a=5126,Co=35664,Qa=35665,mo=35666,Bo=5124,Ps=35667,Ts=35668,wo=35669,To=35670,hl=35671,Ul=35672,Lu=35673,au=35674,Js=35675,eu=35676,dc=35678,Tl=35680,Al=4,X=1028,se=1029,Te=2304,Oe=2305,Ve=32775,Ye=32776,Pt=519,at=7680,Wt=0,dr=1,pr=32774,Ur=513,zr=36160,gi=36064,xi={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},Wr={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},ii={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},di={cw:Te,ccw:Oe};function Li(Me){return Array.isArray(Me)||qr(Me)||jr(Me)}function Ti(Me){return Me.sort(function(bt,Ot){return bt===ee?-1:Ot===ee?1:bt<Ot?-1:1})}function Qr(Me,bt,Ot,Lr){this.thisDep=Me,this.contextDep=bt,this.propDep=Ot,this.append=Lr}function Pn(Me){return Me&&!(Me.thisDep||Me.contextDep||Me.propDep)}function kn(Me){return new Qr(!1,!1,!1,Me)}function Bn(Me,bt){var Ot=Me.type;if(Ot===Zn){var Lr=Me.data.length;return new Qr(!0,Lr>=1,Lr>=2,bt)}else if(Ot===Zo){var Vr=Me.data;return new Qr(Vr.thisDep,Vr.contextDep,Vr.propDep,bt)}else{if(Ot===Ss)return new Qr(!1,!1,!1,bt);if(Ot===as){for(var Or=!1,Nr=!1,vi=!1,Ni=0;Ni<Me.data.length;++Ni){var qi=Me.data[Ni];if(qi.type===Dn)vi=!0;else if(qi.type===Ka)Nr=!0;else if(qi.type===bo)Or=!0;else if(qi.type===Zn){Or=!0;var Si=qi.data;Si>=1&&(Nr=!0),Si>=2&&(vi=!0)}else qi.type===Zo&&(Or=Or||qi.data.thisDep,Nr=Nr||qi.data.contextDep,vi=vi||qi.data.propDep)}return new Qr(Or,Nr,vi,bt)}else return new Qr(Ot===bo,Ot===Ka,Ot===Dn,bt)}}var na=new Qr(!1,!1,!1,function(){});function Ea(Me,bt,Ot,Lr,Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr){var Zr=qi.Record,yi={add:32774,subtract:32778,"reverse subtract":32779};Ot.ext_blend_minmax&&(yi.min=Ve,yi.max=Ye);var Ii=Ot.angle_instanced_arrays,ui=Ot.webgl_draw_buffers,nn=Ot.oes_vertex_array_object,Xi={dirty:!0,profile:Tr.profile},qn={},fi=[],si={},mn={};function Ji(Ne){return Ne.replace(".","_")}function Ui(Ne,$e,ot){var It=Ji(Ne);fi.push(Ne),qn[It]=Xi[It]=!!ot,si[It]=$e}function Bi(Ne,$e,ot){var It=Ji(Ne);fi.push(Ne),Array.isArray(ot)?(Xi[It]=ot.slice(),qn[It]=ot.slice()):Xi[It]=qn[It]=ot,mn[It]=$e}function pn(Ne){return!!isNaN(Ne)}Ui(ws,Ci),Ui(Ho,ri),Bi(ml,"blendColor",[0,0,0,0]),Bi(Ws,"blendEquationSeparate",[pr,pr]),Bi(Ls,"blendFuncSeparate",[dr,Wt,dr,Wt]),Ui(va,sn,!0),Bi(no,"depthFunc",Ur),Bi(ys,"depthRange",[0,1]),Bi(rs,"depthMask",!0),Bi(Ql,Ql,[!0,!0,!0,!0]),Ui(Cu,Hr),Bi(Yu,"cullFace",se),Bi(Nc,Nc,Oe),Bi(pu,pu,1),Ui(Uc,Yn),Bi(xu,"polygonOffset",[0,0]),Ui(Ac,Aa),Ui(Ua,fa),Bi(oo,"sampleCoverage",[1,!1]),Ui(Vc,cn),Bi(hc,"stencilMask",-1),Bi(Ku,"stencilFunc",[Pt,0,-1]),Bi(ue,"stencilOpSeparate",[X,at,at,at]),Bi(w,"stencilOpSeparate",[se,at,at,at]),Ui(B,Ln),Bi(Q,"scissor",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Bi(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Nn={gl:Me,context:Qi,strings:bt,next:qn,current:Xi,draw:Vn,elements:Or,buffer:Vr,shader:Si,attributes:qi.state,vao:qi,uniforms:Ni,framebuffer:vi,extensions:Ot,timer:ji,isBufferArgs:Li},aa={primTypes:Mn,compareFuncs:Wr,blendFuncs:xi,blendEquations:yi,stencilOps:ii,glTypes:un,orientationType:di};ui&&(aa.backBuffer=[se],aa.drawBuffer=S(Lr.maxDrawbuffers,function(Ne){return Ne===0?[0]:S(Ne,function($e){return gi+$e})}));var Ki=0;function Cn(){var Ne=ta({cache:oi}),$e=Ne.link,ot=Ne.global;Ne.id=Ki++,Ne.batchId="0";var It=$e(Nn),Bt=Ne.shared={props:"a0"};Object.keys(Nn).forEach(function(Dt){Bt[Dt]=ot.def(It,".",Dt)});var Ft=Ne.next={},Ut=Ne.current={};Object.keys(mn).forEach(function(Dt){Array.isArray(Xi[Dt])&&(Ft[Dt]=ot.def(Bt.next,".",Dt),Ut[Dt]=ot.def(Bt.current,".",Dt))});var zt=Ne.constants={};Object.keys(aa).forEach(function(Dt){zt[Dt]=ot.def(JSON.stringify(aa[Dt]))}),Ne.invoke=function(Dt,vt){switch(vt.type){case Zn:var lr=["this",Bt.context,Bt.props,Ne.batchId];return Dt.def($e(vt.data),".call(",lr.slice(0,Math.max(vt.data.length+1,4)),")");case Dn:return Dt.def(Bt.props,vt.data);case Ka:return Dt.def(Bt.context,vt.data);case bo:return Dt.def("this",vt.data);case Zo:return vt.data.append(Ne,Dt),vt.data.ref;case Ss:return vt.data.toString();case as:return vt.data.map(function(yr){return Ne.invoke(Dt,yr)})}},Ne.attribCache={};var _t={};return Ne.scopeAttrib=function(Dt){var vt=bt.id(Dt);if(vt in _t)return _t[vt];var lr=qi.scope[vt];lr||(lr=qi.scope[vt]=new Zr);var yr=_t[vt]=$e(lr);return yr},Ne}function ia(Ne){var $e=Ne.static,ot=Ne.dynamic,It;if(le in $e){var Bt=!!$e[le];It=kn(function(Ut,zt){return Bt}),It.enable=Bt}else if(le in ot){var Ft=ot[le];It=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}return It}function sa(Ne,$e){var ot=Ne.static,It=Ne.dynamic;if(ze in ot){var Bt=ot[ze];return Bt?(Bt=vi.getFramebuffer(Bt),kn(function(Ut,zt){var _t=Ut.link(Bt),Dt=Ut.shared;zt.set(Dt.framebuffer,".next",_t);var vt=Dt.context;return zt.set(vt,"."+qe,_t+".width"),zt.set(vt,"."+Qe,_t+".height"),_t})):kn(function(Ut,zt){var _t=Ut.shared;zt.set(_t.framebuffer,".next","null");var Dt=_t.context;return zt.set(Dt,"."+qe,Dt+"."+jt),zt.set(Dt,"."+Qe,Dt+"."+ar),"null"})}else if(ze in It){var Ft=It[ze];return Bn(Ft,function(Ut,zt){var _t=Ut.invoke(zt,Ft),Dt=Ut.shared,vt=Dt.framebuffer,lr=zt.def(vt,".getFramebuffer(",_t,")");zt.set(vt,".next",lr);var yr=Dt.context;return zt.set(yr,"."+qe,lr+"?"+lr+".width:"+yr+"."+jt),zt.set(yr,"."+Qe,lr+"?"+lr+".height:"+yr+"."+ar),lr})}else return null}function ba(Ne,$e,ot){var It=Ne.static,Bt=Ne.dynamic;function Ft(_t){if(_t in It){var Dt=It[_t],vt=!0,lr=Dt.x|0,yr=Dt.y|0,Br,Di;return"width"in Dt?Br=Dt.width|0:vt=!1,"height"in Dt?Di=Dt.height|0:vt=!1,new Qr(!vt&&$e&&$e.thisDep,!vt&&$e&&$e.contextDep,!vt&&$e&&$e.propDep,function(gn,tn){var Ei=gn.shared.context,Oi=Br;"width"in Dt||(Oi=tn.def(Ei,".",qe,"-",lr));var Gi=Di;return"height"in Dt||(Gi=tn.def(Ei,".",Qe,"-",yr)),[lr,yr,Oi,Gi]})}else if(_t in Bt){var ci=Bt[_t],bi=Bn(ci,function(gn,tn){var Ei=gn.invoke(tn,ci),Oi=gn.shared.context,Gi=tn.def(Ei,".x|0"),on=tn.def(Ei,".y|0"),zn=tn.def('"width" in ',Ei,"?",Ei,".width|0:","(",Oi,".",qe,"-",Gi,")"),Ja=tn.def('"height" in ',Ei,"?",Ei,".height|0:","(",Oi,".",Qe,"-",on,")");return[Gi,on,zn,Ja]});return $e&&(bi.thisDep=bi.thisDep||$e.thisDep,bi.contextDep=bi.contextDep||$e.contextDep,bi.propDep=bi.propDep||$e.propDep),bi}else return $e?new Qr($e.thisDep,$e.contextDep,$e.propDep,function(gn,tn){var Ei=gn.shared.context;return[0,0,tn.def(Ei,".",qe),tn.def(Ei,".",Qe)]}):null}var Ut=Ft(ee);if(Ut){var zt=Ut;Ut=new Qr(Ut.thisDep,Ut.contextDep,Ut.propDep,function(_t,Dt){var vt=zt.append(_t,Dt),lr=_t.shared.context;return Dt.set(lr,"."+Xe,vt[2]),Dt.set(lr,"."+nt,vt[3]),vt})}return{viewport:Ut,scissor_box:Ft(Q)}}function is(Ne,$e){var ot=Ne.static,It=typeof ot[ut]=="string"&&typeof ot[Ze]=="string";if(It){if(Object.keys($e.dynamic).length>0)return null;var Bt=$e.static,Ft=Object.keys(Bt);if(Ft.length>0&&typeof Bt[Ft[0]]=="number"){for(var Ut=[],zt=0;zt<Ft.length;++zt)Ut.push([Bt[Ft[zt]]|0,Ft[zt]]);return Ut}}return null}function Zs(Ne,$e,ot){var It=Ne.static,Bt=Ne.dynamic;function Ft(vt){if(vt in It){var lr=bt.id(It[vt]),yr=kn(function(){return lr});return yr.id=lr,yr}else if(vt in Bt){var Br=Bt[vt];return Bn(Br,function(Di,ci){var bi=Di.invoke(ci,Br),gn=ci.def(Di.shared.strings,".id(",bi,")");return gn})}return null}var Ut=Ft(ut),zt=Ft(Ze),_t=null,Dt;return Pn(Ut)&&Pn(zt)?(_t=Si.program(zt.id,Ut.id,null,ot),Dt=kn(function(vt,lr){return vt.link(_t)})):Dt=new Qr(Ut&&Ut.thisDep||zt&&zt.thisDep,Ut&&Ut.contextDep||zt&&zt.contextDep,Ut&&Ut.propDep||zt&&zt.propDep,function(vt,lr){var yr=vt.shared.shader,Br;Ut?Br=Ut.append(vt,lr):Br=lr.def(yr,".",ut);var Di;zt?Di=zt.append(vt,lr):Di=lr.def(yr,".",Ze);var ci=yr+".program("+Di+","+Br;return lr.def(ci+")")}),{frag:Ut,vert:zt,progVar:Dt,program:_t}}function Va(Ne,$e){var ot=Ne.static,It=Ne.dynamic,Bt={},Ft=!1;function Ut(){if(ve in ot){var tn=ot[ve];return tn!==null&&qi.getVAO(tn)===null&&(tn=qi.createVAO(tn)),Ft=!0,Bt.vao=tn,kn(function(Oi){var Gi=qi.getVAO(tn);return Gi?Oi.link(Gi):"null"})}else if(ve in It){Ft=!0;var Ei=It[ve];return Bn(Ei,function(Oi,Gi){var on=Oi.invoke(Gi,Ei);return Gi.def(Oi.shared.vao+".getVAO("+on+")")})}return null}var zt=Ut(),_t=!1;function Dt(){if(Mt in ot){var tn=ot[Mt];if(Bt.elements=tn,Li(tn)){var Ei=Bt.elements=Or.create(tn,!0);tn=Or.getElements(Ei),_t=!0}else tn&&(tn=Or.getElements(tn),_t=!0);var Oi=kn(function(on,zn){if(tn){var Ja=on.link(tn);return on.ELEMENTS=Ja,Ja}return on.ELEMENTS=null,null});return Oi.value=tn,Oi}else if(Mt in It){_t=!0;var Gi=It[Mt];return Bn(Gi,function(on,zn){var Ja=on.shared,co=Ja.isBufferArgs,ts=Ja.elements,so=on.invoke(zn,Gi),Yo=zn.def("null"),ms=zn.def(co,"(",so,")"),ou=on.cond(ms).then(Yo,"=",ts,".createStream(",so,");").else(Yo,"=",ts,".getElements(",so,");");return zn.entry(ou),zn.exit(on.cond(ms).then(ts,".destroyStream(",Yo,");")),on.ELEMENTS=Yo,Yo})}else if(Ft)return new Qr(zt.thisDep,zt.contextDep,zt.propDep,function(on,zn){return zn.def(on.shared.vao+".currentVAO?"+on.shared.elements+".getElements("+on.shared.vao+".currentVAO.elements):null")});return null}var vt=Dt();function lr(){if(Jt in ot){var tn=ot[Jt];return Bt.primitive=tn,kn(function(Oi,Gi){return Mn[tn]})}else if(Jt in It){var Ei=It[Jt];return Bn(Ei,function(Oi,Gi){var on=Oi.constants.primTypes,zn=Oi.invoke(Gi,Ei);return Gi.def(on,"[",zn,"]")})}else{if(_t)return Pn(vt)?vt.value?kn(function(Oi,Gi){return Gi.def(Oi.ELEMENTS,".primType")}):kn(function(){return Al}):new Qr(vt.thisDep,vt.contextDep,vt.propDep,function(Oi,Gi){var on=Oi.ELEMENTS;return Gi.def(on,"?",on,".primType:",Al)});if(Ft)return new Qr(zt.thisDep,zt.contextDep,zt.propDep,function(Oi,Gi){return Gi.def(Oi.shared.vao+".currentVAO?"+Oi.shared.vao+".currentVAO.primitive:"+Al)})}return null}function yr(tn,Ei){if(tn in ot){var Oi=ot[tn]|0;return Ei?Bt.offset=Oi:Bt.instances=Oi,kn(function(on,zn){return Ei&&(on.OFFSET=Oi),Oi})}else if(tn in It){var Gi=It[tn];return Bn(Gi,function(on,zn){var Ja=on.invoke(zn,Gi);return Ei&&(on.OFFSET=Ja),Ja})}else if(Ei){if(_t)return kn(function(on,zn){return on.OFFSET=0,0});if(Ft)return new Qr(zt.thisDep,zt.contextDep,zt.propDep,function(on,zn){return zn.def(on.shared.vao+".currentVAO?"+on.shared.vao+".currentVAO.offset:0")})}else if(Ft)return new Qr(zt.thisDep,zt.contextDep,zt.propDep,function(on,zn){return zn.def(on.shared.vao+".currentVAO?"+on.shared.vao+".currentVAO.instances:-1")});return null}var Br=yr(mr,!0);function Di(){if($t in ot){var tn=ot[$t]|0;return Bt.count=tn,kn(function(){return tn})}else if($t in It){var Ei=It[$t];return Bn(Ei,function(zn,Ja){var co=zn.invoke(Ja,Ei);return co})}else if(_t)if(Pn(vt)){if(vt)return Br?new Qr(Br.thisDep,Br.contextDep,Br.propDep,function(zn,Ja){var co=Ja.def(zn.ELEMENTS,".vertCount-",zn.OFFSET);return co}):kn(function(zn,Ja){return Ja.def(zn.ELEMENTS,".vertCount")});var Oi=kn(function(){return-1});return Oi}else{var Gi=new Qr(vt.thisDep||Br.thisDep,vt.contextDep||Br.contextDep,vt.propDep||Br.propDep,function(zn,Ja){var co=zn.ELEMENTS;return zn.OFFSET?Ja.def(co,"?",co,".vertCount-",zn.OFFSET,":-1"):Ja.def(co,"?",co,".vertCount:-1")});return Gi}else if(Ft){var on=new Qr(zt.thisDep,zt.contextDep,zt.propDep,function(zn,Ja){return Ja.def(zn.shared.vao,".currentVAO?",zn.shared.vao,".currentVAO.count:-1")});return on}return null}var ci=lr(),bi=Di(),gn=yr(Cr,!1);return{elements:vt,primitive:ci,count:bi,instances:gn,offset:Br,vao:zt,vaoActive:Ft,elementsActive:_t,static:Bt}}function Ml(Ne,$e){var ot=Ne.static,It=Ne.dynamic,Bt={};return fi.forEach(function(Ft){var Ut=Ji(Ft);function zt(_t,Dt){if(Ft in ot){var vt=_t(ot[Ft]);Bt[Ut]=kn(function(){return vt})}else if(Ft in It){var lr=It[Ft];Bt[Ut]=Bn(lr,function(yr,Br){return Dt(yr,Br,yr.invoke(Br,lr))})}}switch(Ft){case Cu:case Ho:case ws:case Vc:case va:case B:case Uc:case Ac:case Ua:case rs:return zt(function(_t){return _t},function(_t,Dt,vt){return vt});case no:return zt(function(_t){return Wr[_t]},function(_t,Dt,vt){var lr=_t.constants.compareFuncs;return Dt.def(lr,"[",vt,"]")});case ys:return zt(function(_t){return _t},function(_t,Dt,vt){var lr=Dt.def("+",vt,"[0]"),yr=Dt.def("+",vt,"[1]");return[lr,yr]});case Ls:return zt(function(_t){var Dt="srcRGB"in _t?_t.srcRGB:_t.src,vt="srcAlpha"in _t?_t.srcAlpha:_t.src,lr="dstRGB"in _t?_t.dstRGB:_t.dst,yr="dstAlpha"in _t?_t.dstAlpha:_t.dst;return[xi[Dt],xi[lr],xi[vt],xi[yr]]},function(_t,Dt,vt){var lr=_t.constants.blendFuncs;function yr(Ei,Oi){var Gi=Dt.def('"',Ei,Oi,'" in ',vt,"?",vt,".",Ei,Oi,":",vt,".",Ei);return Gi}var Br=yr("src","RGB"),Di=yr("dst","RGB"),ci=Dt.def(lr,"[",Br,"]"),bi=Dt.def(lr,"[",yr("src","Alpha"),"]"),gn=Dt.def(lr,"[",Di,"]"),tn=Dt.def(lr,"[",yr("dst","Alpha"),"]");return[ci,gn,bi,tn]});case Ws:return zt(function(_t){if(typeof _t=="string")return[yi[_t],yi[_t]];if(typeof _t=="object")return[yi[_t.rgb],yi[_t.alpha]]},function(_t,Dt,vt){var lr=_t.constants.blendEquations,yr=Dt.def(),Br=Dt.def(),Di=_t.cond("typeof ",vt,'==="string"');return Di.then(yr,"=",Br,"=",lr,"[",vt,"];"),Di.else(yr,"=",lr,"[",vt,".rgb];",Br,"=",lr,"[",vt,".alpha];"),Dt(Di),[yr,Br]});case ml:return zt(function(_t){return S(4,function(Dt){return+_t[Dt]})},function(_t,Dt,vt){return S(4,function(lr){return Dt.def("+",vt,"[",lr,"]")})});case hc:return zt(function(_t){return _t|0},function(_t,Dt,vt){return Dt.def(vt,"|0")});case Ku:return zt(function(_t){var Dt=_t.cmp||"keep",vt=_t.ref||0,lr="mask"in _t?_t.mask:-1;return[Wr[Dt],vt,lr]},function(_t,Dt,vt){var lr=_t.constants.compareFuncs,yr=Dt.def('"cmp" in ',vt,"?",lr,"[",vt,".cmp]",":",at),Br=Dt.def(vt,".ref|0"),Di=Dt.def('"mask" in ',vt,"?",vt,".mask|0:-1");return[yr,Br,Di]});case ue:case w:return zt(function(_t){var Dt=_t.fail||"keep",vt=_t.zfail||"keep",lr=_t.zpass||"keep";return[Ft===w?se:X,ii[Dt],ii[vt],ii[lr]]},function(_t,Dt,vt){var lr=_t.constants.stencilOps;function yr(Br){return Dt.def('"',Br,'" in ',vt,"?",lr,"[",vt,".",Br,"]:",at)}return[Ft===w?se:X,yr("fail"),yr("zfail"),yr("zpass")]});case xu:return zt(function(_t){var Dt=_t.factor|0,vt=_t.units|0;return[Dt,vt]},function(_t,Dt,vt){var lr=Dt.def(vt,".factor|0"),yr=Dt.def(vt,".units|0");return[lr,yr]});case Yu:return zt(function(_t){var Dt=0;return _t==="front"?Dt=X:_t==="back"&&(Dt=se),Dt},function(_t,Dt,vt){return Dt.def(vt,'==="front"?',X,":",se)});case pu:return zt(function(_t){return _t},function(_t,Dt,vt){return vt});case Nc:return zt(function(_t){return di[_t]},function(_t,Dt,vt){return Dt.def(vt+'==="cw"?'+Te+":"+Oe)});case Ql:return zt(function(_t){return _t.map(function(Dt){return!!Dt})},function(_t,Dt,vt){return S(4,function(lr){return"!!"+vt+"["+lr+"]"})});case oo:return zt(function(_t){var Dt="value"in _t?_t.value:1,vt=!!_t.invert;return[Dt,vt]},function(_t,Dt,vt){var lr=Dt.def('"value" in ',vt,"?+",vt,".value:1"),yr=Dt.def("!!",vt,".invert");return[lr,yr]})}}),Bt}function zo(Ne,$e){var ot=Ne.static,It=Ne.dynamic,Bt={};return Object.keys(ot).forEach(function(Ft){var Ut=ot[Ft],zt;if(typeof Ut=="number"||typeof Ut=="boolean")zt=kn(function(){return Ut});else if(typeof Ut=="function"){var _t=Ut._reglType;_t==="texture2d"||_t==="textureCube"?zt=kn(function(Dt){return Dt.link(Ut)}):(_t==="framebuffer"||_t==="framebufferCube")&&(zt=kn(function(Dt){return Dt.link(Ut.color[0])}))}else En(Ut)&&(zt=kn(function(Dt){var vt=Dt.global.def("[",S(Ut.length,function(lr){return Ut[lr]}),"]");return vt}));zt.value=Ut,Bt[Ft]=zt}),Object.keys(It).forEach(function(Ft){var Ut=It[Ft];Bt[Ft]=Bn(Ut,function(zt,_t){return zt.invoke(_t,Ut)})}),Bt}function Qs(Ne,$e){var ot=Ne.static,It=Ne.dynamic,Bt={};return Object.keys(ot).forEach(function(Ft){var Ut=ot[Ft],zt=bt.id(Ft),_t=new Zr;if(Li(Ut))_t.state=La,_t.buffer=Vr.getBuffer(Vr.create(Ut,br,!1,!0)),_t.type=0;else{var Dt=Vr.getBuffer(Ut);if(Dt)_t.state=La,_t.buffer=Dt,_t.type=0;else if("constant"in Ut){var vt=Ut.constant;_t.buffer="null",_t.state=Na,typeof vt=="number"?_t.x=vt:Ca.forEach(function(gn,tn){tn<vt.length&&(_t[gn]=vt[tn])})}else{Li(Ut.buffer)?Dt=Vr.getBuffer(Vr.create(Ut.buffer,br,!1,!0)):Dt=Vr.getBuffer(Ut.buffer);var lr=Ut.offset|0,yr=Ut.stride|0,Br=Ut.size|0,Di=!!Ut.normalized,ci=0;"type"in Ut&&(ci=un[Ut.type]);var bi=Ut.divisor|0;_t.buffer=Dt,_t.state=La,_t.size=Br,_t.normalized=Di,_t.type=ci||Dt.dtype,_t.offset=lr,_t.stride=yr,_t.divisor=bi}}Bt[Ft]=kn(function(gn,tn){var Ei=gn.attribCache;if(zt in Ei)return Ei[zt];var Oi={isStream:!1};return Object.keys(_t).forEach(function(Gi){Oi[Gi]=_t[Gi]}),_t.buffer&&(Oi.buffer=gn.link(_t.buffer),Oi.type=Oi.type||Oi.buffer+".dtype"),Ei[zt]=Oi,Oi})}),Object.keys(It).forEach(function(Ft){var Ut=It[Ft];function zt(_t,Dt){var vt=_t.invoke(Dt,Ut),lr=_t.shared,yr=_t.constants,Br=lr.isBufferArgs,Di=lr.buffer,ci={isStream:Dt.def(!1)},bi=new Zr;bi.state=La,Object.keys(bi).forEach(function(Oi){ci[Oi]=Dt.def(""+bi[Oi])});var gn=ci.buffer,tn=ci.type;Dt("if(",Br,"(",vt,")){",ci.isStream,"=true;",gn,"=",Di,".createStream(",br,",",vt,");",tn,"=",gn,".dtype;","}else{",gn,"=",Di,".getBuffer(",vt,");","if(",gn,"){",tn,"=",gn,".dtype;",'}else if("constant" in ',vt,"){",ci.state,"=",Na,";","if(typeof "+vt+'.constant === "number"){',ci[Ca[0]],"=",vt,".constant;",Ca.slice(1).map(function(Oi){return ci[Oi]}).join("="),"=0;","}else{",Ca.map(function(Oi,Gi){return ci[Oi]+"="+vt+".constant.length>"+Gi+"?"+vt+".constant["+Gi+"]:0;"}).join(""),"}}else{","if(",Br,"(",vt,".buffer)){",gn,"=",Di,".createStream(",br,",",vt,".buffer);","}else{",gn,"=",Di,".getBuffer(",vt,".buffer);","}",tn,'="type" in ',vt,"?",yr.glTypes,"[",vt,".type]:",gn,".dtype;",ci.normalized,"=!!",vt,".normalized;");function Ei(Oi){Dt(ci[Oi],"=",vt,".",Oi,"|0;")}return Ei("size"),Ei("offset"),Ei("stride"),Ei("divisor"),Dt("}}"),Dt.exit("if(",ci.isStream,"){",Di,".destroyStream(",gn,");","}"),ci}Bt[Ft]=Bn(Ut,zt)}),Bt}function al(Ne){var $e=Ne.static,ot=Ne.dynamic,It={};return Object.keys($e).forEach(function(Bt){var Ft=$e[Bt];It[Bt]=kn(function(Ut,zt){return typeof Ft=="number"||typeof Ft=="boolean"?""+Ft:Ut.link(Ft)})}),Object.keys(ot).forEach(function(Bt){var Ft=ot[Bt];It[Bt]=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}),It}function Vl(Ne,$e,ot,It,Bt){var Ft=Ne.static,Ut=Ne.dynamic,zt=is(Ne,$e),_t=sa(Ne,Bt),Dt=ba(Ne,_t,Bt),vt=Va(Ne,Bt),lr=Ml(Ne,Bt),yr=Zs(Ne,Bt,zt);function Br(Ei){var Oi=Dt[Ei];Oi&&(lr[Ei]=Oi)}Br(ee),Br(Ji(Q));var Di=Object.keys(lr).length>0,ci={framebuffer:_t,draw:vt,shader:yr,state:lr,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ci.profile=ia(Ne,Bt),ci.uniforms=zo(ot,Bt),ci.drawVAO=ci.scopeVAO=vt.vao,!ci.drawVAO&&yr.program&&!zt&&Ot.angle_instanced_arrays&&vt.static.elements){var bi=!0,gn=yr.program.attributes.map(function(Ei){var Oi=$e.static[Ei];return bi=bi&&!!Oi,Oi});if(bi&&gn.length>0){var tn=qi.getVAO(qi.createVAO({attributes:gn,elements:vt.static.elements}));ci.drawVAO=new Qr(null,null,null,function(Ei,Oi){return Ei.link(tn)}),ci.useVAO=!0}}return zt?ci.useVAO=!0:ci.attributes=Qs($e,Bt),ci.context=al(It,Bt),ci}function ss(Ne,$e,ot){var It=Ne.shared,Bt=It.context,Ft=Ne.scope();Object.keys(ot).forEach(function(Ut){$e.save(Bt,"."+Ut);var zt=ot[Ut],_t=zt.append(Ne,$e);Array.isArray(_t)?Ft(Bt,".",Ut,"=[",_t.join(),"];"):Ft(Bt,".",Ut,"=",_t,";")}),$e(Ft)}function Vs(Ne,$e,ot,It){var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.framebuffer,zt;ui&&(zt=$e.def(Bt.extensions,".webgl_draw_buffers"));var _t=Ne.constants,Dt=_t.drawBuffer,vt=_t.backBuffer,lr;ot?lr=ot.append(Ne,$e):lr=$e.def(Ut,".next"),It||$e("if(",lr,"!==",Ut,".cur){"),$e("if(",lr,"){",Ft,".bindFramebuffer(",zr,",",lr,".framebuffer);"),ui&&$e(zt,".drawBuffersWEBGL(",Dt,"[",lr,".colorAttachments.length]);"),$e("}else{",Ft,".bindFramebuffer(",zr,",null);"),ui&&$e(zt,".drawBuffersWEBGL(",vt,");"),$e("}",Ut,".cur=",lr,";"),It||$e("}")}function Ys(Ne,$e,ot){var It=Ne.shared,Bt=It.gl,Ft=Ne.current,Ut=Ne.next,zt=It.current,_t=It.next,Dt=Ne.cond(zt,".dirty");fi.forEach(function(vt){var lr=Ji(vt);if(!(lr in ot.state)){var yr,Br;if(lr in Ut){yr=Ut[lr],Br=Ft[lr];var Di=S(Xi[lr].length,function(bi){return Dt.def(yr,"[",bi,"]")});Dt(Ne.cond(Di.map(function(bi,gn){return bi+"!=="+Br+"["+gn+"]"}).join("||")).then(Bt,".",mn[lr],"(",Di,");",Di.map(function(bi,gn){return Br+"["+gn+"]="+bi}).join(";"),";"))}else{yr=Dt.def(_t,".",lr);var ci=Ne.cond(yr,"!==",zt,".",lr);Dt(ci),lr in si?ci(Ne.cond(yr).then(Bt,".enable(",si[lr],");").else(Bt,".disable(",si[lr],");"),zt,".",lr,"=",yr,";"):ci(Bt,".",mn[lr],"(",yr,");",zt,".",lr,"=",yr,";")}}}),Object.keys(ot.state).length===0&&Dt(zt,".dirty=false;"),$e(Dt)}function wa(Ne,$e,ot,It){var Bt=Ne.shared,Ft=Ne.current,Ut=Bt.current,zt=Bt.gl,_t;Ti(Object.keys(ot)).forEach(function(Dt){var vt=ot[Dt];if(!(It&&!It(vt))){var lr=vt.append(Ne,$e);if(si[Dt]){var yr=si[Dt];Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(Ne.cond(_t).then(zt,".enable(",yr,");").else(zt,".disable(",yr,");")),$e(Ut,".",Dt,"=",_t,";")):($e(Ne.cond(lr).then(zt,".enable(",yr,");").else(zt,".disable(",yr,");")),$e(Ut,".",Dt,"=",lr,";"))}else if(En(lr)){var Br=Ft[Dt];$e(zt,".",mn[Dt],"(",lr,");",lr.map(function(Di,ci){return Br+"["+ci+"]="+Di}).join(";"),";")}else Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(zt,".",mn[Dt],"(",_t,");",Ut,".",Dt,"=",_t,";")):$e(zt,".",mn[Dt],"(",lr,");",Ut,".",Dt,"=",lr,";")}})}function ol(Ne,$e){Ii&&(Ne.instancing=$e.def(Ne.shared.extensions,".angle_instanced_arrays"))}function io(Ne,$e,ot,It,Bt){var Ft=Ne.shared,Ut=Ne.stats,zt=Ft.current,_t=Ft.timer,Dt=ot.profile;function vt(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var lr,yr;function Br(Ei){lr=$e.def(),Ei(lr,"=",vt(),";"),typeof Bt=="string"?Ei(Ut,".count+=",Bt,";"):Ei(Ut,".count++;"),ji&&(It?(yr=$e.def(),Ei(yr,"=",_t,".getNumPendingQueries();")):Ei(_t,".beginQuery(",Ut,");"))}function Di(Ei){Ei(Ut,".cpuTime+=",vt(),"-",lr,";"),ji&&(It?Ei(_t,".pushScopeStats(",yr,",",_t,".getNumPendingQueries(),",Ut,");"):Ei(_t,".endQuery();"))}function ci(Ei){var Oi=$e.def(zt,".profile");$e(zt,".profile=",Ei,";"),$e.exit(zt,".profile=",Oi,";")}var bi;if(Dt){if(Pn(Dt)){Dt.enable?(Br($e),Di($e.exit),ci("true")):ci("false");return}bi=Dt.append(Ne,$e),ci(bi)}else bi=$e.def(zt,".profile");var gn=Ne.block();Br(gn),$e("if(",bi,"){",gn,"}");var tn=Ne.block();Di(tn),$e.exit("if(",bi,"){",tn,"}")}function Y(Ne,$e,ot,It,Bt){var Ft=Ne.shared;function Ut(_t){switch(_t){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function zt(_t,Dt,vt){var lr=Ft.gl,yr=$e.def(_t,".location"),Br=$e.def(Ft.attributes,"[",yr,"]"),Di=vt.state,ci=vt.buffer,bi=[vt.x,vt.y,vt.z,vt.w],gn=["buffer","normalized","offset","stride"];function tn(){$e("if(!",Br,".buffer){",lr,".enableVertexAttribArray(",yr,");}");var Oi=vt.type,Gi;if(vt.size?Gi=$e.def(vt.size,"||",Dt):Gi=Dt,$e("if(",Br,".type!==",Oi,"||",Br,".size!==",Gi,"||",gn.map(function(zn){return Br+"."+zn+"!=="+vt[zn]}).join("||"),"){",lr,".bindBuffer(",br,",",ci,".buffer);",lr,".vertexAttribPointer(",[yr,Gi,Oi,vt.normalized,vt.stride,vt.offset],");",Br,".type=",Oi,";",Br,".size=",Gi,";",gn.map(function(zn){return Br+"."+zn+"="+vt[zn]+";"}).join(""),"}"),Ii){var on=vt.divisor;$e("if(",Br,".divisor!==",on,"){",Ne.instancing,".vertexAttribDivisorANGLE(",[yr,on],");",Br,".divisor=",on,";}")}}function Ei(){$e("if(",Br,".buffer){",lr,".disableVertexAttribArray(",yr,");",Br,".buffer=null;","}if(",Ca.map(function(Oi,Gi){return Br+"."+Oi+"!=="+bi[Gi]}).join("||"),"){",lr,".vertexAttrib4f(",yr,",",bi,");",Ca.map(function(Oi,Gi){return Br+"."+Oi+"="+bi[Gi]+";"}).join(""),"}")}Di===La?tn():Di===Na?Ei():($e("if(",Di,"===",La,"){"),tn(),$e("}else{"),Ei(),$e("}"))}It.forEach(function(_t){var Dt=_t.name,vt=ot.attributes[Dt],lr;if(vt){if(!Bt(vt))return;lr=vt.append(Ne,$e)}else{if(!Bt(na))return;var yr=Ne.scopeAttrib(Dt);lr={},Object.keys(new Zr).forEach(function(Br){lr[Br]=$e.def(yr,".",Br)})}zt(Ne.link(_t),Ut(_t.info.type),lr)})}function D(Ne,$e,ot,It,Bt,Ft){for(var Ut=Ne.shared,zt=Ut.gl,_t,Dt=0;Dt<It.length;++Dt){var vt=It[Dt],lr=vt.name,yr=vt.info.type,Br=ot.uniforms[lr],Di=Ne.link(vt),ci=Di+".location",bi;if(Br){if(!Bt(Br))continue;if(Pn(Br)){var gn=Br.value;if(yr===dc||yr===Tl){var tn=Ne.link(gn._texture||gn.color[0]._texture);$e(zt,".uniform1i(",ci,",",tn+".bind());"),$e.exit(tn,".unbind();")}else if(yr===au||yr===Js||yr===eu){var Ei=Ne.global.def("new Float32Array(["+Array.prototype.slice.call(gn)+"])"),Oi=2;yr===Js?Oi=3:yr===eu&&(Oi=4),$e(zt,".uniformMatrix",Oi,"fv(",ci,",false,",Ei,");")}else{switch(yr){case $a:_t="1f";break;case Co:_t="2f";break;case Qa:_t="3f";break;case mo:_t="4f";break;case To:_t="1i";break;case Bo:_t="1i";break;case hl:_t="2i";break;case Ps:_t="2i";break;case Ul:_t="3i";break;case Ts:_t="3i";break;case Lu:_t="4i";break;case wo:_t="4i";break}$e(zt,".uniform",_t,"(",ci,",",En(gn)?Array.prototype.slice.call(gn):gn,");")}continue}else bi=Br.append(Ne,$e)}else{if(!Bt(na))continue;bi=$e.def(Ut.uniforms,"[",bt.id(lr),"]")}yr===dc?$e("if(",bi,"&&",bi,'._reglType==="framebuffer"){',bi,"=",bi,".color[0];","}"):yr===Tl&&$e("if(",bi,"&&",bi,'._reglType==="framebufferCube"){',bi,"=",bi,".color[0];","}");var Gi=1;switch(yr){case dc:case Tl:var on=$e.def(bi,"._texture");$e(zt,".uniform1i(",ci,",",on,".bind());"),$e.exit(on,".unbind();");continue;case Bo:case To:_t="1i";break;case Ps:case hl:_t="2i",Gi=2;break;case Ts:case Ul:_t="3i",Gi=3;break;case wo:case Lu:_t="4i",Gi=4;break;case $a:_t="1f";break;case Co:_t="2f",Gi=2;break;case Qa:_t="3f",Gi=3;break;case mo:_t="4f",Gi=4;break;case au:_t="Matrix2fv";break;case Js:_t="Matrix3fv";break;case eu:_t="Matrix4fv";break}if(_t.charAt(0)==="M"){$e(zt,".uniform",_t,"(",ci,",");var zn=Math.pow(yr-au+2,2),Ja=Ne.global.def("new Float32Array(",zn,")");Array.isArray(bi)?$e("false,(",S(zn,function(ms){return Ja+"["+ms+"]="+bi[ms]}),",",Ja,")"):$e("false,(Array.isArray(",bi,")||",bi," instanceof Float32Array)?",bi,":(",S(zn,function(ms){return Ja+"["+ms+"]="+bi+"["+ms+"]"}),",",Ja,")"),$e(");")}else if(Gi>1){for(var co=[],ts=[],so=0;so<Gi;++so)Array.isArray(bi)?ts.push(bi[so]):ts.push($e.def(bi+"["+so+"]")),Ft&&co.push($e.def());Ft&&$e("if(!",Ne.batchId,"||",co.map(function(ms,ou){return ms+"!=="+ts[ou]}).join("||"),"){",co.map(function(ms,ou){return ms+"="+ts[ou]+";"}).join("")),$e(zt,".uniform",_t,"(",ci,",",ts.join(","),");"),Ft&&$e("}")}else{if(Ft){var Yo=$e.def();$e("if(!",Ne.batchId,"||",Yo,"!==",bi,"){",Yo,"=",bi,";")}$e(zt,".uniform",_t,"(",ci,",",bi,");"),Ft&&$e("}")}}}function J(Ne,$e,ot,It){var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.draw,zt=It.draw;function _t(){var Gi=zt.elements,on,zn=$e;return Gi?((Gi.contextDep&&It.contextDynamic||Gi.propDep)&&(zn=ot),on=Gi.append(Ne,zn),zt.elementsActive&&zn("if("+on+")"+Ft+".bindBuffer("+Fr+","+on+".buffer.buffer);")):(on=zn.def(),zn(on,"=",Ut,".",Mt,";","if(",on,"){",Ft,".bindBuffer(",Fr,",",on,".buffer.buffer);}","else if(",Bt.vao,".currentVAO){",on,"=",Ne.shared.elements+".getElements("+Bt.vao,".currentVAO.elements);",nn?"":"if("+on+")"+Ft+".bindBuffer("+Fr+","+on+".buffer.buffer);","}")),on}function Dt(){var Gi=zt.count,on,zn=$e;return Gi?((Gi.contextDep&&It.contextDynamic||Gi.propDep)&&(zn=ot),on=Gi.append(Ne,zn)):on=zn.def(Ut,".",$t),on}var vt=_t();function lr(Gi){var on=zt[Gi];return on?on.contextDep&&It.contextDynamic||on.propDep?on.append(Ne,ot):on.append(Ne,$e):$e.def(Ut,".",Gi)}var yr=lr(Jt),Br=lr(mr),Di=Dt();if(typeof Di=="number"){if(Di===0)return}else ot("if(",Di,"){"),ot.exit("}");var ci,bi;Ii&&(ci=lr(Cr),bi=Ne.instancing);var gn=vt+".type",tn=zt.elements&&Pn(zt.elements)&&!zt.vaoActive;function Ei(){function Gi(){ot(bi,".drawElementsInstancedANGLE(",[yr,Di,gn,Br+"<<(("+gn+"-"+Ra+")>>1)",ci],");")}function on(){ot(bi,".drawArraysInstancedANGLE(",[yr,Br,Di,ci],");")}vt&&vt!=="null"?tn?Gi():(ot("if(",vt,"){"),Gi(),ot("}else{"),on(),ot("}")):on()}function Oi(){function Gi(){ot(Ft+".drawElements("+[yr,Di,gn,Br+"<<(("+gn+"-"+Ra+")>>1)"]+");")}function on(){ot(Ft+".drawArrays("+[yr,Br,Di]+");")}vt&&vt!=="null"?tn?Gi():(ot("if(",vt,"){"),Gi(),ot("}else{"),on(),ot("}")):on()}Ii&&(typeof ci!="number"||ci>=0)?typeof ci=="string"?(ot("if(",ci,">0){"),Ei(),ot("}else if(",ci,"<0){"),Oi(),ot("}")):Ei():Oi()}function O(Ne,$e,ot,It,Bt){var Ft=Cn(),Ut=Ft.proc("body",Bt);return Ii&&(Ft.instancing=Ut.def(Ft.shared.extensions,".angle_instanced_arrays")),Ne(Ft,Ut,ot,It),Ft.compile().body}function K(Ne,$e,ot,It){ol(Ne,$e),ot.useVAO?ot.drawVAO?$e(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,$e),");"):$e(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):($e(Ne.shared.vao,".setVAO(null);"),Y(Ne,$e,ot,It.attributes,function(){return!0})),D(Ne,$e,ot,It.uniforms,function(){return!0},!1),J(Ne,$e,$e,ot)}function de(Ne,$e){var ot=Ne.proc("draw",1);ol(Ne,ot),ss(Ne,ot,$e.context),Vs(Ne,ot,$e.framebuffer),Ys(Ne,ot,$e),wa(Ne,ot,$e.state),io(Ne,ot,$e,!1,!0);var It=$e.shader.progVar.append(Ne,ot);if(ot(Ne.shared.gl,".useProgram(",It,".program);"),$e.shader.program)K(Ne,ot,$e,$e.shader.program);else{ot(Ne.shared.vao,".setVAO(null);");var Bt=Ne.global.def("{}"),Ft=ot.def(It,".id"),Ut=ot.def(Bt,"[",Ft,"]");ot(Ne.cond(Ut).then(Ut,".call(this,a0);").else(Ut,"=",Bt,"[",Ft,"]=",Ne.link(function(zt){return O(K,Ne,$e,zt,1)}),"(",It,");",Ut,".call(this,a0);"))}Object.keys($e.state).length>0&&ot(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&ot(Ne.shared.vao,".setVAO(null);")}function ne(Ne,$e,ot,It){Ne.batchId="a1",ol(Ne,$e);function Bt(){return!0}Y(Ne,$e,ot,It.attributes,Bt),D(Ne,$e,ot,It.uniforms,Bt,!1),J(Ne,$e,$e,ot)}function be(Ne,$e,ot,It){ol(Ne,$e);var Bt=ot.contextDep,Ft=$e.def(),Ut="a0",zt="a1",_t=$e.def();Ne.shared.props=_t,Ne.batchId=Ft;var Dt=Ne.scope(),vt=Ne.scope();$e(Dt.entry,"for(",Ft,"=0;",Ft,"<",zt,";++",Ft,"){",_t,"=",Ut,"[",Ft,"];",vt,"}",Dt.exit);function lr(gn){return gn.contextDep&&Bt||gn.propDep}function yr(gn){return!lr(gn)}if(ot.needsContext&&ss(Ne,vt,ot.context),ot.needsFramebuffer&&Vs(Ne,vt,ot.framebuffer),wa(Ne,vt,ot.state,lr),ot.profile&&lr(ot.profile)&&io(Ne,vt,ot,!1,!0),It)ot.useVAO?ot.drawVAO?lr(ot.drawVAO)?vt(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,vt),");"):Dt(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,Dt),");"):Dt(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):(Dt(Ne.shared.vao,".setVAO(null);"),Y(Ne,Dt,ot,It.attributes,yr),Y(Ne,vt,ot,It.attributes,lr)),D(Ne,Dt,ot,It.uniforms,yr,!1),D(Ne,vt,ot,It.uniforms,lr,!0),J(Ne,Dt,vt,ot);else{var Br=Ne.global.def("{}"),Di=ot.shader.progVar.append(Ne,vt),ci=vt.def(Di,".id"),bi=vt.def(Br,"[",ci,"]");vt(Ne.shared.gl,".useProgram(",Di,".program);","if(!",bi,"){",bi,"=",Br,"[",ci,"]=",Ne.link(function(gn){return O(ne,Ne,ot,gn,2)}),"(",Di,");}",bi,".call(this,a0[",Ft,"],",Ft,");")}}function Be(Ne,$e){var ot=Ne.proc("batch",2);Ne.batchId="0",ol(Ne,ot);var It=!1,Bt=!0;Object.keys($e.context).forEach(function(Br){It=It||$e.context[Br].propDep}),It||(ss(Ne,ot,$e.context),Bt=!1);var Ft=$e.framebuffer,Ut=!1;Ft?(Ft.propDep?It=Ut=!0:Ft.contextDep&&It&&(Ut=!0),Ut||Vs(Ne,ot,Ft)):Vs(Ne,ot,null),$e.state.viewport&&$e.state.viewport.propDep&&(It=!0);function zt(Br){return Br.contextDep&&It||Br.propDep}Ys(Ne,ot,$e),wa(Ne,ot,$e.state,function(Br){return!zt(Br)}),(!$e.profile||!zt($e.profile))&&io(Ne,ot,$e,!1,"a1"),$e.contextDep=It,$e.needsContext=Bt,$e.needsFramebuffer=Ut;var _t=$e.shader.progVar;if(_t.contextDep&&It||_t.propDep)be(Ne,ot,$e,null);else{var Dt=_t.append(Ne,ot);if(ot(Ne.shared.gl,".useProgram(",Dt,".program);"),$e.shader.program)be(Ne,ot,$e,$e.shader.program);else{ot(Ne.shared.vao,".setVAO(null);");var vt=Ne.global.def("{}"),lr=ot.def(Dt,".id"),yr=ot.def(vt,"[",lr,"]");ot(Ne.cond(yr).then(yr,".call(this,a0,a1);").else(yr,"=",vt,"[",lr,"]=",Ne.link(function(Br){return O(be,Ne,$e,Br,2)}),"(",Dt,");",yr,".call(this,a0,a1);"))}}Object.keys($e.state).length>0&&ot(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&ot(Ne.shared.vao,".setVAO(null);")}function ht(Ne,$e){var ot=Ne.proc("scope",3);Ne.batchId="a2";var It=Ne.shared,Bt=It.current;if(ss(Ne,ot,$e.context),$e.framebuffer&&$e.framebuffer.append(Ne,ot),Ti(Object.keys($e.state)).forEach(function(zt){var _t=$e.state[zt],Dt=_t.append(Ne,ot);En(Dt)?Dt.forEach(function(vt,lr){pn(vt)?ot.set(Ne.next[zt],"["+lr+"]",vt):ot.set(Ne.next[zt],"["+lr+"]",Ne.link(vt,{stable:!0}))}):Pn(_t)?ot.set(It.next,"."+zt,Ne.link(Dt,{stable:!0})):ot.set(It.next,"."+zt,Dt)}),io(Ne,ot,$e,!0,!0),[Mt,mr,$t,Cr,Jt].forEach(function(zt){var _t=$e.draw[zt];if(_t){var Dt=_t.append(Ne,ot);pn(Dt)?ot.set(It.draw,"."+zt,Dt):ot.set(It.draw,"."+zt,Ne.link(Dt),{stable:!0})}}),Object.keys($e.uniforms).forEach(function(zt){var _t=$e.uniforms[zt].append(Ne,ot);Array.isArray(_t)&&(_t="["+_t.map(function(Dt){return pn(Dt)?Dt:Ne.link(Dt,{stable:!0})})+"]"),ot.set(It.uniforms,"["+Ne.link(bt.id(zt),{stable:!0})+"]",_t)}),Object.keys($e.attributes).forEach(function(zt){var _t=$e.attributes[zt].append(Ne,ot),Dt=Ne.scopeAttrib(zt);Object.keys(new Zr).forEach(function(vt){ot.set(Dt,"."+vt,_t[vt])})}),$e.scopeVAO){var Ft=$e.scopeVAO.append(Ne,ot);pn(Ft)?ot.set(It.vao,".targetVAO",Ft):ot.set(It.vao,".targetVAO",Ne.link(Ft,{stable:!0}))}function Ut(zt){var _t=$e.shader[zt];if(_t){var Dt=_t.append(Ne,ot);pn(Dt)?ot.set(It.shader,"."+zt,Dt):ot.set(It.shader,"."+zt,Ne.link(Dt,{stable:!0}))}}Ut(Ze),Ut(ut),Object.keys($e.state).length>0&&(ot(Bt,".dirty=true;"),ot.exit(Bt,".dirty=true;")),ot("a1(",Ne.shared.context,",a0,",Ne.batchId,");")}function Yt(Ne){if(!(typeof Ne!="object"||En(Ne))){for(var $e=Object.keys(Ne),ot=0;ot<$e.length;++ot)if(h.isDynamic(Ne[$e[ot]]))return!0;return!1}}function cr(Ne,$e,ot){var It=$e.static[ot];if(!It||!Yt(It))return;var Bt=Ne.global,Ft=Object.keys(It),Ut=!1,zt=!1,_t=!1,Dt=Ne.global.def("{}");Ft.forEach(function(lr){var yr=It[lr];if(h.isDynamic(yr)){typeof yr=="function"&&(yr=It[lr]=h.unbox(yr));var Br=Bn(yr,null);Ut=Ut||Br.thisDep,_t=_t||Br.propDep,zt=zt||Br.contextDep}else{switch(Bt(Dt,".",lr,"="),typeof yr){case"number":Bt(yr);break;case"string":Bt('"',yr,'"');break;case"object":Array.isArray(yr)&&Bt("[",yr.join(),"]");break;default:Bt(Ne.link(yr));break}Bt(";")}});function vt(lr,yr){Ft.forEach(function(Br){var Di=It[Br];if(h.isDynamic(Di)){var ci=lr.invoke(yr,Di);yr(Dt,".",Br,"=",ci,";")}})}$e.dynamic[ot]=new h.DynamicVariable(Zo,{thisDep:Ut,contextDep:zt,propDep:_t,ref:Dt,append:vt}),delete $e.static[ot]}function Nt(Ne,$e,ot,It,Bt){var Ft=Cn();Ft.stats=Ft.link(Bt),Object.keys($e.static).forEach(function(zt){cr(Ft,$e,zt)}),fr.forEach(function(zt){cr(Ft,Ne,zt)});var Ut=Vl(Ne,$e,ot,It,Ft);return Ut.shader.program&&(Ut.shader.program.attributes.sort(function(zt,_t){return zt.name<_t.name?-1:1}),Ut.shader.program.uniforms.sort(function(zt,_t){return zt.name<_t.name?-1:1})),de(Ft,Ut),ht(Ft,Ut),Be(Ft,Ut),e(Ft.compile(),{destroy:function(){Ut.shader.program.destroy()}})}return{next:qn,current:Xi,procs:function(){var Ne=Cn(),$e=Ne.proc("poll"),ot=Ne.proc("refresh"),It=Ne.block();$e(It),ot(It);var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.next,zt=Bt.current;It(zt,".dirty=false;"),Vs(Ne,$e),Vs(Ne,ot,null,!0);var _t;Ii&&(_t=Ne.link(Ii)),Ot.oes_vertex_array_object&&ot(Ne.link(Ot.oes_vertex_array_object),".bindVertexArrayOES(null);");var Dt=ot.def(Bt.attributes),vt=ot.def(0),lr=Ne.cond(vt,".buffer");lr.then(Ft,".enableVertexAttribArray(i);",Ft,".bindBuffer(",br,",",vt,".buffer.buffer);",Ft,".vertexAttribPointer(i,",vt,".size,",vt,".type,",vt,".normalized,",vt,".stride,",vt,".offset);").else(Ft,".disableVertexAttribArray(i);",Ft,".vertexAttrib4f(i,",vt,".x,",vt,".y,",vt,".z,",vt,".w);",vt,".buffer=null;");var yr=Ne.link(Lr.maxAttributes,{stable:!0});return ot("for(var i=0;i<",yr,";++i){",vt,"=",Dt,"[i];",lr,"}"),Ii&&ot("for(var i=0;i<",yr,";++i){",_t,".vertexAttribDivisorANGLE(i,",Dt,"[i].divisor);","}"),ot(Ne.shared.vao,".currentVAO=null;",Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"),Object.keys(si).forEach(function(Br){var Di=si[Br],ci=It.def(Ut,".",Br),bi=Ne.block();bi("if(",ci,"){",Ft,".enable(",Di,")}else{",Ft,".disable(",Di,")}",zt,".",Br,"=",ci,";"),ot(bi),$e("if(",ci,"!==",zt,".",Br,"){",bi,"}")}),Object.keys(mn).forEach(function(Br){var Di=mn[Br],ci=Xi[Br],bi,gn,tn=Ne.block();if(tn(Ft,".",Di,"("),En(ci)){var Ei=ci.length;bi=Ne.global.def(Ut,".",Br),gn=Ne.global.def(zt,".",Br),tn(S(Ei,function(Oi){return bi+"["+Oi+"]"}),");",S(Ei,function(Oi){return gn+"["+Oi+"]="+bi+"["+Oi+"];"}).join("")),$e("if(",S(Ei,function(Oi){return bi+"["+Oi+"]!=="+gn+"["+Oi+"]"}).join("||"),"){",tn,"}")}else bi=It.def(Ut,".",Br),gn=It.def(zt,".",Br),tn(bi,");",zt,".",Br,"=",bi,";"),$e("if(",bi,"!==",gn,"){",tn,"}");ot(tn)}),Ne.compile()}(),compile:Nt}}function Ia(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var yo=34918,Da=34919,go=35007,Is=function(Me,bt){if(!bt.ext_disjoint_timer_query)return null;var Ot=[];function Lr(){return Ot.pop()||bt.ext_disjoint_timer_query.createQueryEXT()}function Vr(yi){Ot.push(yi)}var Or=[];function Nr(yi){var Ii=Lr();bt.ext_disjoint_timer_query.beginQueryEXT(go,Ii),Or.push(Ii),ji(Or.length-1,Or.length,yi)}function vi(){bt.ext_disjoint_timer_query.endQueryEXT(go)}function Ni(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var qi=[];function Si(){return qi.pop()||new Ni}function Vn(yi){qi.push(yi)}var Qi=[];function ji(yi,Ii,ui){var nn=Si();nn.startQueryIndex=yi,nn.endQueryIndex=Ii,nn.sum=0,nn.stats=ui,Qi.push(nn)}var oi=[],Tr=[];function Zr(){var yi,Ii,ui=Or.length;if(ui!==0){Tr.length=Math.max(Tr.length,ui+1),oi.length=Math.max(oi.length,ui+1),oi[0]=0,Tr[0]=0;var nn=0;for(yi=0,Ii=0;Ii<Or.length;++Ii){var Xi=Or[Ii];bt.ext_disjoint_timer_query.getQueryObjectEXT(Xi,Da)?(nn+=bt.ext_disjoint_timer_query.getQueryObjectEXT(Xi,yo),Vr(Xi)):Or[yi++]=Xi,oi[Ii+1]=nn,Tr[Ii+1]=yi}for(Or.length=yi,yi=0,Ii=0;Ii<Qi.length;++Ii){var qn=Qi[Ii],fi=qn.startQueryIndex,si=qn.endQueryIndex;qn.sum+=oi[si]-oi[fi];var mn=Tr[fi],Ji=Tr[si];Ji===mn?(qn.stats.gpuTime+=qn.sum/1e6,Vn(qn)):(qn.startQueryIndex=mn,qn.endQueryIndex=Ji,Qi[yi++]=qn)}Qi.length=yi}}return{beginQuery:Nr,endQuery:vi,pushScopeStats:ji,update:Zr,getNumPendingQueries:function(){return Or.length},clear:function(){Ot.push.apply(Ot,Or);for(var yi=0;yi<Ot.length;yi++)bt.ext_disjoint_timer_query.deleteQueryEXT(Ot[yi]);Or.length=0,Ot.length=0},restore:function(){Or.length=0,Ot.length=0}}},Ms=16384,Xs=256,Un=1024,ja=34962,Fo="webglcontextlost",Uo="webglcontextrestored",$s=1,Sl=2,bu=3;function dl(Me,bt){for(var Ot=0;Ot<Me.length;++Ot)if(Me[Ot]===bt)return Ot;return-1}function Sc(Me){var bt=x(Me);if(!bt)return null;var Ot=bt.gl,Lr=Ot.getContextAttributes(),Vr=Ot.isContextLost(),Or=C(Ot,bt);if(!Or)return null;var Nr=m(),vi=Ia(),Ni=bt.cachedCode||{},qi=Or.extensions,Si=Is(Ot,qi),Vn=v(),Qi=Ot.drawingBufferWidth,ji=Ot.drawingBufferHeight,oi={tick:0,time:0,viewportWidth:Qi,viewportHeight:ji,framebufferWidth:Qi,framebufferHeight:ji,drawingBufferWidth:Qi,drawingBufferHeight:ji,pixelRatio:bt.pixelRatio},Tr={},Zr={elements:null,primitive:4,count:-1,offset:0,instances:-1},yi=ei(Ot,qi),Ii=ti(Ot,vi,bt,Xi),ui=Ar(Ot,qi,Ii,vi),nn=ku(Ot,qi,yi,vi,Ii,ui,Zr);function Xi(O){return nn.destroyBuffer(O)}var qn=Wu(Ot,Nr,vi,bt),fi=of(Ot,qi,yi,function(){Ji.procs.poll()},oi,vi,bt),si=Dc(Ot,qi,yi,vi,bt),mn=lf(Ot,qi,yi,fi,si,vi),Ji=Ea(Ot,Nr,qi,yi,Ii,ui,fi,mn,Tr,nn,qn,Zr,oi,Si,Ni,bt),Ui=Wl(Ot,mn,Ji.procs.poll,oi,Lr,qi,yi),Bi=Ji.next,pn=Ot.canvas,Nn=[],aa=[],Ki=[],Cn=[bt.onDestroy],ia=null;function sa(){if(Nn.length===0){Si&&Si.update(),ia=null;return}ia=d.next(sa),Ys();for(var O=Nn.length-1;O>=0;--O){var K=Nn[O];K&&K(oi,null,0)}Ot.flush(),Si&&Si.update()}function ba(){!ia&&Nn.length>0&&(ia=d.next(sa))}function is(){ia&&(d.cancel(sa),ia=null)}function Zs(O){O.preventDefault(),Vr=!0,is(),aa.forEach(function(K){K()})}function Va(O){Ot.getError(),Vr=!1,Or.restore(),qn.restore(),Ii.restore(),fi.restore(),si.restore(),mn.restore(),nn.restore(),Si&&Si.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Va,!1));function Ml(){Nn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Va)),qn.clear(),mn.clear(),si.clear(),nn.clear(),fi.clear(),ui.clear(),Ii.clear(),Si&&Si.clear(),Cn.forEach(function(O){O()})}function zo(O){function K(Ft){var Ut=e({},Ft);delete Ut.uniforms,delete Ut.attributes,delete Ut.context,delete Ut.vao,"stencil"in Ut&&Ut.stencil.op&&(Ut.stencil.opBack=Ut.stencil.opFront=Ut.stencil.op,delete Ut.stencil.op);function zt(_t){if(_t in Ut){var Dt=Ut[_t];delete Ut[_t],Object.keys(Dt).forEach(function(vt){Ut[_t+"."+vt]=Dt[vt]})}}return zt("blend"),zt("depth"),zt("cull"),zt("stencil"),zt("polygonOffset"),zt("scissor"),zt("sample"),"vao"in Ft&&(Ut.vao=Ft.vao),Ut}function de(Ft,Ut){var zt={},_t={};return Object.keys(Ft).forEach(function(Dt){var vt=Ft[Dt];if(h.isDynamic(vt)){_t[Dt]=h.unbox(vt,Dt);return}else if(Ut&&Array.isArray(vt)){for(var lr=0;lr<vt.length;++lr)if(h.isDynamic(vt[lr])){_t[Dt]=h.unbox(vt,Dt);return}}zt[Dt]=vt}),{dynamic:_t,static:zt}}var ne=de(O.context||{},!0),be=de(O.uniforms||{},!0),Be=de(O.attributes||{},!1),ht=de(K(O),!1),Yt={gpuTime:0,cpuTime:0,count:0},cr=Ji.compile(ht,Be,be,ne,Yt),Nt=cr.draw,Ne=cr.batch,$e=cr.scope,ot=[];function It(Ft){for(;ot.length<Ft;)ot.push(null);return ot}function Bt(Ft,Ut){var zt;if(typeof Ft=="function")return $e.call(this,null,Ft,0);if(typeof Ut=="function")if(typeof Ft=="number")for(zt=0;zt<Ft;++zt)$e.call(this,null,Ut,zt);else if(Array.isArray(Ft))for(zt=0;zt<Ft.length;++zt)$e.call(this,Ft[zt],Ut,zt);else return $e.call(this,Ft,Ut,0);else if(typeof Ft=="number"){if(Ft>0)return Ne.call(this,It(Ft|0),Ft|0)}else if(Array.isArray(Ft)){if(Ft.length)return Ne.call(this,Ft,Ft.length)}else return Nt.call(this,Ft)}return e(Bt,{stats:Yt,destroy:function(){cr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,"framebuffer")});function al(O,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(Ot.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),"depth"in K&&(Ot.clearDepth(+K.depth),de|=Xs),"stencil"in K&&(Ot.clearStencil(K.stencil|0),de|=Un),Ot.clear(de)}function Vl(O){if("framebuffer"in O)if(O.framebuffer&&O.framebuffer_reglType==="framebufferCube")for(var K=0;K<6;++K)Qs(e({framebuffer:O.framebuffer.faces[K]},O),al);else Qs(O,al);else al(null,O)}function ss(O){Nn.push(O);function K(){var de=dl(Nn,O);function ne(){var be=dl(Nn,ne);Nn[be]=Nn[Nn.length-1],Nn.length-=1,Nn.length<=0&&is()}Nn[de]=ne}return ba(),{cancel:K}}function Vs(){var O=Bi.viewport,K=Bi.scissor_box;O[0]=O[1]=K[0]=K[1]=0,oi.viewportWidth=oi.framebufferWidth=oi.drawingBufferWidth=O[2]=K[2]=Ot.drawingBufferWidth,oi.viewportHeight=oi.framebufferHeight=oi.drawingBufferHeight=O[3]=K[3]=Ot.drawingBufferHeight}function Ys(){oi.tick+=1,oi.time=ol(),Vs(),Ji.procs.poll()}function wa(){fi.refresh(),Vs(),Ji.procs.refresh(),Si&&Si.update()}function ol(){return(v()-Vn)/1e3}wa();function io(O,K){var de;switch(O){case"frame":return ss(K);case"lost":de=aa;break;case"restore":de=Ki;break;case"destroy":de=Cn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne<de.length;++ne)if(de[ne]===K){de[ne]=de[de.length-1],de.pop();return}}}}function Y(){return Ni}function D(O){Object.entries(O).forEach(function(K){Ni[K[0]]=K[1]})}var J=e(zo,{clear:Vl,prop:h.define.bind(null,$s),context:h.define.bind(null,Sl),this:h.define.bind(null,bu),draw:zo({}),buffer:function(O){return Ii.create(O,ja,!1,!1)},elements:function(O){return ui.create(O,!1)},texture:fi.create2D,cube:fi.createCube,renderbuffer:si.create,framebuffer:mn.create,framebufferCube:mn.createCube,vao:nn.createVAO,attributes:Lr,frame:ss,on:io,limits:yi,hasExtension:function(O){return yi.extensions.indexOf(O.toLowerCase())>=0},read:Ui,destroy:Ml,_gl:Ot,_refresh:wa,poll:function(){Ys(),Si&&Si.update()},now:ol,stats:vi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var Lz=ye((R_r,OBe)=>{"use strict";var QUt=zX(),eVt=qBe();OBe.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=eVt({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||QUt({container:i._glcontainer.node()}),a}});var xK=ye((_K,GBe)=>{"use strict";var BBe=_Y(),NBe=KY(),tVt=EOe(),UBe=zBe(),yK=Pr(),rVt=Cg().selectMode,iVt=Lz(),nVt=Ru(),aVt=SU(),oVt=pY().styleTextSelection,VBe={};function sVt(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,l=i.b*n,u=i.r*n,c=i.t*n,f=i.w*n,h=i.h*n;return[s+t.domain[0]*f,l+r.domain[0]*h,a-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*h]}var _K=GBe.exports=function(t,r,n){if(n.length){var i=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(a){var c=iVt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],VBe);if(!c){a.init();return}var f=a.count,h=i._glcanvas.data()[0].regl;if(aVt(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({color:!0,depth:!0}),a.error2d===!0&&(a.error2d=tVt(h)),a.line2d===!0&&(a.line2d=NBe(h)),a.scatter2d===!0&&(a.scatter2d=BBe(h)),a.fill2d===!0&&(a.fill2d=NBe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;l<f;l++)a.glText[l]=new UBe(h);if(a.glText){if(f>a.glText.length){var d=f-a.glText.length;for(l=0;l<d;l++)a.glText.push(new UBe(h))}else if(f<a.glText.length){var v=a.glText.length-f,m=a.glText.splice(f,v);m.forEach(function(N){N.destroy()})}for(l=0;l<f;l++)a.glText[l].update(a.textOptions[l])}if(a.line2d&&(a.line2d.update(a.lineOptions),a.lineOptions=a.lineOptions.map(function(N){if(N&&N.positions){for(var H=N.positions,re=0;re<H.length&&(isNaN(H[re])||isNaN(H[re+1]));)re+=2;for(var oe=H.length-2;oe>re&&(isNaN(H[oe])||isNaN(H[oe+1]));)oe-=2;N.positions=H.slice(re,oe+2)}return N}),a.line2d.update(a.lineOptions)),a.error2d){var b=(a.errorXOptions||[]).concat(a.errorYOptions||[]);a.error2d.update(b)}a.scatter2d&&a.scatter2d.update(a.markerOptions),a.fillOrder=yK.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(N,H){var re=n[H];if(!(!N||!re||!re[0]||!re[0].trace)){var oe=re[0],_e=oe.trace,ke=oe.t,Ce=a.lineOptions[H],ge,ie,Se=[];_e._ownfill&&Se.push(H),_e._nexttrace&&Se.push(H+1),Se.length&&(a.fillOrder[H]=Se);var Ee=[],we=Ce&&Ce.positions||ke.positions,De,Le;if(_e.fill==="tozeroy"){for(De=0;De<we.length&&isNaN(we[De+1]);)De+=2;for(Le=we.length-2;Le>De&&isNaN(we[Le+1]);)Le-=2;we[De+1]!==0&&(Ee=[we[De],0]),Ee=Ee.concat(we.slice(De,Le+2)),we[Le+1]!==0&&(Ee=Ee.concat([we[Le],0]))}else if(_e.fill==="tozerox"){for(De=0;De<we.length&&isNaN(we[De]);)De+=2;for(Le=we.length-2;Le>De&&isNaN(we[Le]);)Le-=2;we[De]!==0&&(Ee=[0,we[De+1]]),Ee=Ee.concat(we.slice(De,Le+2)),we[Le]!==0&&(Ee=Ee.concat([0,we[Le+1]]))}else if(_e.fill==="toself"||_e.fill==="tonext"){for(Ee=[],ge=0,N.splitNull=!0,ie=0;ie<we.length;ie+=2)(isNaN(we[ie])||isNaN(we[ie+1]))&&(Ee=Ee.concat(we.slice(ge,ie)),Ee.push(we[ge],we[ge+1]),Ee.push(null,null),ge=ie+2);Ee=Ee.concat(we.slice(ge)),ge&&Ee.push(we[ge],we[ge+1])}else{var me=_e._nexttrace;if(me){var Pe=a.lineOptions[H+1];if(Pe){var ce=Pe.positions;if(_e.fill==="tonexty"){for(Ee=we.slice(),H=Math.floor(ce.length/2);H--;){var He=ce[H*2],lt=ce[H*2+1];isNaN(He)||isNaN(lt)||Ee.push(He,lt)}N.fill=me.fillcolor}}}}if(_e._prevtrace&&_e._prevtrace.fill==="tonext"){var mt=a.lineOptions[H-1].positions,Vt=Ee.length/2;ge=Vt;var st=[ge];for(ie=0;ie<mt.length;ie+=2)(isNaN(mt[ie])||isNaN(mt[ie+1]))&&(st.push(ie/2+Vt+1),ge=ie+2);Ee=Ee.concat(mt),N.hole=st}return N.fillmode=_e.fill,N.opacity=_e.opacity,N.positions=Ee,N}}),a.fill2d.update(a.fillOptions))}var p=i.dragmode,k=rVt(p),M=i.clickmode.indexOf("select")>-1;for(let[N]of n)if(N){var T=N.trace,L=N.t,x=L.index,C=T._length,S=L.x,g=L.y;if(T.selectedpoints||k||M){if(k||(k=!0),T.selectedpoints){var P=a.selectBatch[x]=yK.selIndices2selPoints(T),E={};for(u=0;u<P.length;u++)E[P[u]]=1;var z=[];for(u=0;u<C;u++)E[u]||z.push(u);a.unselectBatch[x]=z}var q=L.xpx=new Array(C),U=L.ypx=new Array(C);for(u=0;u<C;u++)q[u]=o.c2p(S[u]),U[u]=s.c2p(g[u])}else L.xpx=L.ypx=null}if(k){if(a.select2d||(a.select2d=BBe(i._glcanvas.data()[1].regl)),a.scatter2d){var G=new Array(f);for(l=0;l<f;l++)G[l]=a.selectBatch[l].length||a.unselectBatch[l].length?a.markerUnselectedOptions[l]:{};a.scatter2d.update(G)}a.select2d&&(a.select2d.update(a.markerOptions),a.select2d.update(a.markerSelectedOptions)),a.glText&&n.forEach(function(N){var H=((N||[])[0]||{}).trace||{};nVt.hasText(H)&&oVt(N)})}else a.scatter2d&&a.scatter2d.update(a.markerOptions);var Z={viewport:sVt(i,o,s,t._context.plotGlPixelRatio),range:[(o._rl||o.range)[0],(s._rl||s.range)[0],(o._rl||o.range)[1],(s._rl||s.range)[1]]},j=yK.repeat(Z,a.count);a.fill2d&&a.fill2d.update(j),a.line2d&&a.line2d.update(j),a.error2d&&a.error2d.update(j.concat(j)),a.scatter2d&&a.scatter2d.update(j),a.select2d&&a.select2d.update(j),a.glText&&a.glText.forEach(function(N){N.update(Z)})}}};_K.reglPrecompiled=VBe});var WBe=ye((D_r,jBe)=>{"use strict";var HBe=l7e();HBe.plot=xK();jBe.exports=HBe});var ZBe=ye((F_r,XBe)=>{"use strict";XBe.exports=WBe()});var bK=ye((z_r,$Be)=>{"use strict";var lVt=pf(),JBe=Tu(),YBe=df().axisHoverFormat,{hovertemplateAttrs:uVt,templatefallbackAttrs:cVt}=Ll(),zk=gk(),fVt=Rh().idRegex,hVt=vl().templatedArray,x5=Ao().extendFlat,d1=lVt.marker,dVt=d1.line,vVt=x5(JBe("marker.line",{editTypeOverride:"calc"}),{width:x5({},dVt.width,{editType:"calc"}),editType:"calc"}),Pz=x5(JBe("marker"),{symbol:d1.symbol,angle:d1.angle,size:x5({},d1.size,{editType:"markerSize"}),sizeref:d1.sizeref,sizemin:d1.sizemin,sizemode:d1.sizemode,opacity:d1.opacity,colorbar:d1.colorbar,line:vVt,editType:"calc"});Pz.color.editType=Pz.cmin.editType=Pz.cmax.editType="style";function KBe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:fVt[e],editType:"plot"}}}$Be.exports={dimensions:hVt("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:x5({},zk.text,{}),hovertext:x5({},zk.hovertext,{}),hovertemplate:uVt(),hovertemplatefallback:cVt(),xhoverformat:YBe("x"),yhoverformat:YBe("y"),marker:Pz,xaxes:KBe("x"),yaxes:KBe("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:zk.selected.marker,editType:"calc"},unselected:{marker:zk.unselected.marker,editType:"calc"},opacity:zk.opacity}});var Iz=ye((q_r,QBe)=>{"use strict";QBe.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 rNe=ye((O_r,tNe)=>{"use strict";var wK=Pr(),pVt=Zd(),eNe=bK(),gVt=Ru(),mVt=$p(),yVt=Iz(),_Vt=WF().isOpenSymbol;tNe.exports=function(t,r,n,i){function a(d,v){return wK.coerce(t,r,eNe,d,v)}var o=pVt(t,r,{name:"dimensions",handleItemDefaults:xVt}),s=a("diagonal.visible"),l=a("showupperhalf"),u=a("showlowerhalf"),c=yVt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),mVt(t,r,n,i,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=_Vt(r.marker.symbol),h=gVt.isBubble(r);a("marker.line.width",f||h?1:0),bVt(t,r,i,a),wK.coerceSelectionMarkerOpacity(r,a)};function xVt(e,t){function r(i,a){return wK.coerce(e,t,eNe.dimensions,i,a)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function bVt(e,t,r,n){var i=t.dimensions,a=i.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(a),h=new Array(a);for(u=0;u<a;u++){var d=u?u+1:"";f[u]="x"+d,h[u]="y"+d}var v=n("xaxes",f),m=n("yaxes",h),b=t._diag=new Array(a);t._xaxes={},t._yaxes={};var p=[],k=[];function M(z,q,U,G){if(z){var Z=z.charAt(0),j=r._splomAxes[Z];if(t["_"+Z+"axes"][z]=1,G.push(z),!(z in j)){var N=j[z]={};U&&(N.label=U.label||"",U.visible&&U.axis&&(U.axis.type&&(N.type=U.axis.type),U.axis.matches&&(N.matches=q)))}}}var T=!l&&!s,L=!l&&!o;for(t._axesDim={},u=0;u<a;u++){var x=i[u],C=u===0,S=u===a-1,g=C&&T||S&&L?void 0:v[u],P=C&&L||S&&T?void 0:m[u];M(g,P,x,p),M(P,g,x,k),b[u]=[g,P],t._axesDim[g]=u,t._axesDim[P]=u}for(u=0;u<p.length;u++)for(c=0;c<k.length;c++){var E=p[u]+k[c];(u>c&&o||u<c&&s||u===c&&(l||!s||!o))&&(r._splomSubplots[E]=1)}(!s||!l&&o&&s)&&(r._splomGridDflt.xside="bottom",r._splomGridDflt.yside="left")}});var aNe=ye((B_r,nNe)=>{"use strict";var iNe=Pr();nNe.exports=function(t,r){var n=t._fullLayout,i=r.uid,a=n._splomScenes;a||(a=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=a[r.uid];return l||(l=a[i]=iNe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||iNe.extendFlat(l,o),l}});var lNe=ye((N_r,sNe)=>{"use strict";var TK=Pr(),Rz=hf(),wVt=O0().calcMarkerSize,TVt=O0().calcAxisExpansion,AVt=z0(),oNe=sw().markerSelection,SVt=sw().markerStyle,MVt=aNe(),EVt=fs().BADNUM,kVt=px().TOO_MANY_POINTS;sNe.exports=function(t,r){var n=r.dimensions,i=r._length,a={},o=a.cdata=[],s=a.data=[],l=r._visibleDims=[],u,c,f,h,d;function v(M,T){for(var L=M.makeCalcdata({v:T.values,vcalendar:r.calendar},"v"),x=0;x<L.length;x++)L[x]=L[x]===EVt?NaN:L[x];o.push(L),s.push(M.type==="log"?TK.simpleMap(L,M.c2l):L)}for(u=0;u<n.length;u++)if(f=n[u],f.visible){if(h=Rz.getFromId(t,r._diag[u][0]),d=Rz.getFromId(t,r._diag[u][1]),h&&d&&h.type!==d.type){TK.log("Skipping splom dimension "+u+" with conflicting axis types");continue}h?(v(h,f),d&&d.type==="category"&&(d._categories=h._categories.slice())):v(d,f),l.push(u)}AVt(t,r),TK.extendFlat(a,SVt(t,r));var m=o.length,b=m*i>kVt,p;for(b?p=a.sizeAvg||Math.max(a.size,3):p=wVt(r,i),c=0;c<l.length;c++)u=l[c],f=n[u],h=Rz.getFromId(t,r._diag[u][0])||{},d=Rz.getFromId(t,r._diag[u][1])||{},TVt(t,r,h,d,o[c],o[c],p);var k=MVt(t,r);return k.matrix||(k.matrix=!0),k.matrixOptions=a,k.selectedOptions=oNe(t,r,r.selected),k.unselectedOptions=oNe(t,r,r.unselected),[{x:!1,y:!1,t:{},trace:r}]}});var cNe=ye((uNe,qk)=>{(function(){var e,t,r,n,i,a;typeof performance!="undefined"&&performance!==null&&performance.now?qk.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(qk.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?(qk.exports=function(){return Date.now()-r},r=Date.now()):(qk.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(uNe)});var hNe=ye((U_r,zz)=>{var CVt=cNe(),v1=window,Dz=["moz","webkit"],w5="AnimationFrame",T5=v1["request"+w5],Ok=v1["cancel"+w5]||v1["cancelRequest"+w5];for(b5=0;!T5&&b5<Dz.length;b5++)T5=v1[Dz[b5]+"Request"+w5],Ok=v1[Dz[b5]+"Cancel"+w5]||v1[Dz[b5]+"CancelRequest"+w5];var b5;(!T5||!Ok)&&(Fz=0,AK=0,Tx=[],fNe=1e3/60,T5=function(e){if(Tx.length===0){var t=CVt(),r=Math.max(0,fNe-(t-Fz));Fz=r+t,setTimeout(function(){var n=Tx.slice(0);Tx.length=0;for(var i=0;i<n.length;i++)if(!n[i].cancelled)try{n[i].callback(Fz)}catch(a){setTimeout(function(){throw a},0)}},Math.round(r))}return Tx.push({handle:++AK,callback:e,cancelled:!1}),AK},Ok=function(e){for(var t=0;t<Tx.length;t++)Tx[t].handle===e&&(Tx[t].cancelled=!0)});var Fz,AK,Tx,fNe;zz.exports=function(e){return T5.call(v1,e)};zz.exports.cancel=function(){Ok.apply(v1,arguments)};zz.exports.polyfill=function(e){e||(e=v1),e.requestAnimationFrame=T5,e.cancelAnimationFrame=Ok}});var vNe=ye((V_r,dNe)=>{dNe.exports=function(t,r){var n=typeof t=="number",i=typeof r=="number";n&&!i?(r=t,t=0):!n&&!i&&(t=0,r=0),t=t|0,r=r|0;var a=r-t;if(a<0)throw new Error("array length must be positive");for(var o=new Array(a),s=0,l=t;s<a;s++,l++)o[s]=l;return o}});var yNe=ye((G_r,mNe)=>{"use strict";var LVt=_Y(),PVt=ey(),IVt=iw(),pNe=hNe(),RVt=vNe(),SK=s5(),DVt=nw();mNe.exports=Ax;function Ax(e,t){if(!(this instanceof Ax))return new Ax(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=LVt(e),this.canvas=this.scatter.canvas}Ax.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=pNe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,pNe(()=>{this.dirty=!1})),this)};Ax.prototype.update=function(...e){if(!e.length)return;for(let n=0;n<e.length;n++)this.updateItem(n,e[n]);this.traces=this.traces.filter(Boolean);let t=[],r=0;for(let n=0;n<this.traces.length;n++){let i=this.traces[n],a=this.traces[n].passes;for(let o=0;o<a.length;o++)t.push(this.passes[a[o]]);i.passOffset=r,r+=i.passes.length}return this.scatter.update(...t),this};Ax.prototype.updateItem=function(e,t){let{regl:r}=this;if(t===null)return this.traces[e]=null,this;if(!t)return this;let n=PVt(t,{data:"data items columns rows values dimensions samples x",snap:"snap cluster",size:"sizes size radius",color:"colors color fill fill-color fillColor",opacity:"opacity alpha transparency opaque",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",borderColor:"borderColors borderColor bordercolor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range ranges databox dataBox",viewport:"viewport viewBox viewbox",domain:"domain domains area areas",padding:"pad padding paddings pads margin margins",transpose:"transpose transposed",diagonal:"diagonal diag showDiagonal",upper:"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf",lower:"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower"}),i=this.traces[e]||(this.traces[e]={id:e,buffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:SK([r._gl.drawingBufferWidth,r._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(n.color!=null&&(i.color=n.color),n.size!=null&&(i.size=n.size),n.marker!=null&&(i.marker=n.marker),n.borderColor!=null&&(i.borderColor=n.borderColor),n.borderSize!=null&&(i.borderSize=n.borderSize),n.opacity!=null&&(i.opacity=n.opacity),n.viewport&&(i.viewport=SK(n.viewport)),n.diagonal!=null&&(i.diagonal=n.diagonal),n.upper!=null&&(i.upper=n.upper),n.lower!=null&&(i.lower=n.lower),n.data){i.buffer(DVt(n.data)),i.columns=n.data.length,i.count=n.data[0].length,i.bounds=[];for(let m=0;m<i.columns;m++)i.bounds[m]=IVt(n.data[m],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,l=i.count,u=i.viewport.width,c=i.viewport.height,f=i.viewport.x,h=i.viewport.y,d=u/s,v=c/s;i.passes=[];for(let m=0;m<s;m++)for(let b=0;b<s;b++){if(!i.diagonal&&b===m||!i.upper&&m>b||!i.lower&&m<b)continue;let p=FVt(i.id,m,b),k=this.passes[p]||(this.passes[p]={});if(n.data&&(n.transpose?k.positions={x:{buffer:i.buffer,offset:b,count:l,stride:s},y:{buffer:i.buffer,offset:m,count:l,stride:s}}:k.positions={x:{buffer:i.buffer,offset:b*l,count:l},y:{buffer:i.buffer,offset:m*l,count:l}},k.bounds=qz(i.bounds,m,b)),n.domain||n.viewport||n.data){let M=o?qz(i.padding,m,b):i.padding;if(i.domain){let[T,L,x,C]=qz(i.domain,m,b);k.viewport=[f+T*u+M[0],h+L*c+M[1],f+x*u-M[2],h+C*c-M[3]]}else k.viewport=[f+b*d+d*M[0],h+m*v+v*M[1],f+(b+1)*d-d*M[2],h+(m+1)*v-v*M[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?qz(i.range,m,b):i.range||k.bounds),i.passes.push(p)}return this};Ax.prototype.draw=function(...e){if(!e.length)this.scatter.draw();else{let t=[];for(let r=0;r<e.length;r++)if(typeof e[r]=="number"){let{passes:n,passOffset:i}=this.traces[e[r]];t.push(...RVt(i,i+n.length))}else if(e[r].length){let n=e[r],{passes:i,passOffset:a}=this.traces[r];i=i.map((o,s)=>{t[a+s]=n})}this.scatter.draw(...t)}return this};Ax.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function FVt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function qz(e,t,r){let n,i,a,o,s,l,u,c,f=e[t],h=e[r];return f.length>2?(n=f[0],a=f[2],i=f[1],o=f[3]):f.length?(n=i=f[0],a=o=f[1]):(n=f.x,i=f.y,a=f.x+f.width,o=f.y+f.height),h.length>2?(s=h[0],u=h[2],l=h[1],c=h[3]):h.length?(s=l=h[0],u=c=h[1]):(s=h.x,l=h.y,u=h.x+h.width,c=h.y+h.height),[s,i,u,o]}function 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=SK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var xNe=ye((H_r,_Ne)=>{"use strict";var zVt=yNe(),MK=Pr(),Oz=hf(),qVt=Cg().selectMode;_Ne.exports=function(t,r,n){if(n.length)for(var i=0;i<n.length;i++)OVt(t,n[i][0])};function OVt(e,t){var r=e._fullLayout,n=r._size,i=t.trace,a=t.t,o=r._splomScenes[i.uid],s=o.matrixOptions,l=s.cdata,u=r._glcanvas.data()[0].regl,c=r.dragmode,f,h,d,v,m;if(l.length!==0){s.lower=i.showupperhalf,s.upper=i.showlowerhalf,s.diagonal=i.diagonal.visible;var b=i._visibleDims,p=l.length,k=o.viewOpts={};for(k.ranges=new Array(p),k.domains=new Array(p),m=0;m<b.length;m++){d=b[m];var M=k.ranges[m]=new Array(4),T=k.domains[m]=new Array(4);f=Oz.getFromId(e,i._diag[d][0]),f&&(M[0]=f._rl[0],M[2]=f._rl[1],T[0]=f.domain[0],T[2]=f.domain[1]),h=Oz.getFromId(e,i._diag[d][1]),h&&(M[1]=h._rl[0],M[3]=h._rl[1],T[1]=h.domain[0],T[3]=h.domain[1])}var L=e._context.plotGlPixelRatio,x=n.l*L,C=n.b*L,S=n.w*L,g=n.h*L;k.viewport=[x,C,S+x,g+C],o.matrix===!0&&(o.matrix=zVt(u));var P=r.clickmode.indexOf("select")>-1,E=qVt(c)||!!i.selectedpoints||P,z=!0;if(E){var q=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var U=i.selectedpoints,G={};for(d=0;d<U.length;d++)G[U[d]]=!0;var Z=[];for(d=0;d<q;d++)G[d]||Z.push(d);o.unselectBatch=Z}var j=a.xpx=new Array(p),N=a.ypx=new Array(p);for(m=0;m<b.length;m++){if(d=b[m],f=Oz.getFromId(e,i._diag[d][0]),f)for(j[m]=new Array(q),v=0;v<q;v++)j[m][v]=f.c2p(l[m][v]);if(h=Oz.getFromId(e,i._diag[d][1]),h)for(N[m]=new Array(q),v=0;v<q;v++)N[m][v]=h.c2p(l[m][v])}if(o.selectBatch.length||o.unselectBatch.length){var H=MK.extendFlat({},s,o.unselectedOptions,k),re=MK.extendFlat({},s,o.selectedOptions,k);o.matrix.update(H,re),z=!1}}else a.xpx=a.ypx=null;if(z){var oe=MK.extendFlat({},s,k);o.matrix.update(oe,null)}}}});var EK=ye(bNe=>{"use strict";bNe.getDimIndex=function(t,r){for(var n=r._id,i=n.charAt(0),a={x:0,y:1}[i],o=t._visibleDims,s=0;s<o.length;s++){var l=o[s];if(t._diag[l][a]===n)return s}return!1}});var MNe=ye((W_r,SNe)=>{"use strict";var wNe=EK(),BVt=jF().calcHover,TNe=ho().getFromId,NVt=Ao().extendFlat;function UVt(e,t,r,n,i){i||(i={});var a=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=ANe(e,t,r);if((a||o)&&i.hoversubplots==="axis"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=i.gd,c=NVt({},e),f=0;f<l.length;f++){var h=l[f];if(h!==e.xa._id+e.ya._id){o?c.xa=TNe(u,h,"x"):c.ya=TNe(u,h,"y");var d=a||o,v=ANe(c,t,r,d);s=s.concat(v)}}return s}function ANe(e,t,r,n){var i=e.cd,a=i[0].trace,o=e.scene,s=o.matrixOptions.cdata,l=e.xa,u=e.ya,c=l.c2p(t),f=u.c2p(r),h=e.distance,d=wNe.getDimIndex(a,l),v=wNe.getDimIndex(a,u);if(d===!1||v===!1)return[e];for(var m=s[d],b=s[v],p,k,M=h,T=0;T<m.length;T++)if(!(n&&T!==e.index)){var L=m[T],x=b[T],C=l.c2p(L)-c,S=u.c2p(x)-f,g=Math.sqrt(C*C+S*S);(n||g<M)&&(M=k=g,p=T)}return e.index=p,e.distance=M,e.dxy=k,p===void 0?[e]:[BVt(e,m,b,a)]}SNe.exports={hoverPoints:UVt}});var INe=ye((X_r,PNe)=>{"use strict";var LNe=Pr(),ENe=LNe.pushUnique,kNe=Ru(),CNe=EK();PNe.exports=function(t,r){var n=t.cd,i=n[0].trace,a=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!kNe.hasMarkers(i)&&!kNe.hasText(i);if(i.visible!==!0||f)return c;var h=CNe.getDimIndex(i,l),d=CNe.getDimIndex(i,u);if(h===!1||d===!1)return c;var v=a.xpx[h],m=a.ypx[d],b=s[h],p=s[d],k=(t.scene.selectBatch||[]).slice(),M=[];if(r!==!1&&!r.degenerate)for(var T=0;T<b.length;T++)r.contains([v[T],m[T]],null,T,t)?(c.push({pointNumber:T,x:b[T],y:p[T]}),ENe(k,T)):k.indexOf(T)!==-1?ENe(k,T):M.push(T);var L=o.matrixOptions;return!k.length&&!M.length?o.matrix.update(L,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,LNe.extendFlat({},L,o.selectedOptions,o.viewOpts)),o.selectBatch=k,o.unselectBatch=M,c}});var FNe=ye((Z_r,DNe)=>{"use strict";var RNe=Pr(),VVt=z0(),GVt=sw().markerStyle;DNe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){VVt(t,n),RNe.extendFlat(i.matrixOptions,GVt(t,n));var a=RNe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var qNe=ye((Y_r,zNe)=>{"use strict";var HVt=Oa(),jVt=yV();zNe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:bK(),supplyDefaults:rNe(),colorbar:$d(),calc:lNe(),plot:xNe(),hoverPoints:MNe().hoverPoints,selectPoints:INe(),editStyle:FNe(),meta:{}};HVt.register(jVt)});var GNe=ye((K_r,VNe)=>{"use strict";var WVt=KY(),XVt=Oa(),ZVt=Lz(),YVt=Id().getModuleCalcData,Sx=mh(),ONe=hf().getFromId,BNe=ho().shouldShowZeroLine,NNe="splom",UNe={};function KVt(e){var t=e._fullLayout,r=XVt.getModule(NNe),n=YVt(e.calcdata,r)[0],i=ZVt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],UNe);i&&(t._hasOnlyLargeSploms&&kK(e),r.plot(e,{},n))}function JVt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&kK(e);for(var n=0;n<t.length;n++){var i=t[n][0],a=i.trace,o=r._splomScenes[a.uid];a.type==="splom"&&o&&o.matrix&&$Vt(e,a,o)}}function $Vt(e,t,r){for(var n=r.matrixOptions.data.length,i=t._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;o<i.length;o++){var s=i[o],l=a[o]=new Array(4),u=ONe(e,t._diag[s][0]);u&&(l[0]=u.r2l(u.range[0]),l[2]=u.r2l(u.range[1]));var c=ONe(e,t._diag[s][1]);c&&(l[1]=c.r2l(c.range[0]),l[3]=c.r2l(c.range[1]))}r.selectBatch.length||r.unselectBatch.length?r.matrix.update({ranges:a},{ranges:a}):r.matrix.update({ranges:a})}function kK(e){var t=e._fullLayout,r=t._glcanvas.data()[0].regl,n=t._splomGrid;n||(n=t._splomGrid=WVt(r)),n.update(QVt(e))}function QVt(e){var t=e._context.plotGlPixelRatio,r=e._fullLayout,n=r._size,i=[0,0,r.width*t,r.height*t],a={},o;function s(x,C,S,g,P,E){S*=t,g*=t,P*=t,E*=t;var z=C[x+"color"],q=C[x+"width"],U=String(z+q);U in a?a[U].data.push(NaN,NaN,S,g,P,E):a[U]={data:[S,g,P,E],join:"rect",thickness:q*t,color:z,viewport:i,range:i,overlay:!1}}for(o in r._splomSubplots){var l=r._plots[o],u=l.xaxis,c=l.yaxis,f=u._gridVals,h=c._gridVals,d=u._offset,v=u._length,m=c._length,b=n.b+c.domain[0]*n.h,p=-c._m,k=-p*c.r2l(c.range[0],c.calendar),M,T;if(u.showgrid)for(o=0;o<f.length;o++)M=d+u.l2p(f[o].x),s("grid",u,M,b,M,b+m);if(c.showgrid)for(o=0;o<h.length;o++)T=b+k+p*h[o].x,s("grid",c,d,T,d+v,T);BNe(e,u,c)&&(M=d+u.l2p(0),s("zeroline",u,M,b,M,b+m)),BNe(e,c,u)&&(T=b+k+0,s("zeroline",c,d,T,d+v,T))}var L=[];for(o in a)L.push(a[o]);return L}function eGt(e,t,r,n){var i={},a;if(n._splomScenes){for(a=0;a<e.length;a++){var o=e[a];o.type==="splom"&&(i[o.uid]=1)}for(a=0;a<r.length;a++){var s=r[a];if(!i[s.uid]){var l=n._splomScenes[s.uid];l&&l.destroy&&l.destroy(),n._splomScenes[s.uid]=null,delete n._splomScenes[s.uid]}}}Object.keys(n._splomScenes||{}).length===0&&delete n._splomScenes,n._splomGrid&&!t._hasOnlyLargeSploms&&n._hasOnlyLargeSploms&&(n._splomGrid.destroy(),n._splomGrid=null,delete n._splomGrid),Sx.clean(e,t,r,n)}VNe.exports={name:NNe,attr:Sx.attr,attrRegex:Sx.attrRegex,layoutAttributes:Sx.layoutAttributes,supplyLayoutDefaults:Sx.supplyLayoutDefaults,drawFramework:Sx.drawFramework,plot:KVt,drag:JVt,updateGrid:kK,clean:eGt,updateFx:Sx.updateFx,toSVG:Sx.toSVG,reglPrecompiled:UNe}});var WNe=ye((J_r,jNe)=>{"use strict";var HNe=qNe();HNe.basePlotModule=GNe(),jNe.exports=HNe});var ZNe=ye(($_r,XNe)=>{"use strict";XNe.exports=WNe()});var PK=ye((Q_r,YNe)=>{"use strict";var tGt=Tu(),CK=Rd(),LK=ec(),rGt=Cc().attributes,Bz=Ao().extendFlat,iGt=vl().templatedArray;YNe.exports={domain:rGt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:LK({editType:"plot"}),tickfont:LK({autoShadowDflt:!0,editType:"plot"}),rangefont:LK({editType:"plot"}),dimensions:iGt("dimension",{label:{valType:"string",editType:"plot"},tickvals:Bz({},CK.tickvals,{editType:"plot"}),ticktext:Bz({},CK.ticktext,{editType:"plot"}),tickformat:Bz({},CK.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:Bz({editType:"calc"},tGt("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}});var Bk=ye((exr,KNe)=>{"use strict";KNe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}});var iy=ye((txr,$Ne)=>{"use strict";var nGt=ZS();function JNe(e){return[e]}$Ne.exports={keyFun:function(e){return e.key},repeat:JNe,descend:nGt,wrap:JNe,unwrap:function(e){return e[0]}}});var DK=ye((rxr,uUe)=>{"use strict";var Th=Bk(),im=qa(),aGt=iy().keyFun,Nz=iy().repeat,A5=Pr().sorterAsc,oGt=Pr().strTranslate,QNe=Th.bar.snapRatio;function eUe(e,t){return e*(1-QNe)+t*QNe}var tUe=Th.bar.snapClose;function sGt(e,t){return e*(1-tUe)+t*tUe}function Vz(e,t,r,n){if(lGt(r,n))return r;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var l=t[a],u=l,c=a;i*c<i*o;c+=i){var f=c+i,h=t[f];if(i*r<i*sGt(l,h))return eUe(l,u);if(i*r<i*h||f===o)return eUe(h,l);u=l,l=h}}function lGt(e,t){for(var r=0;r<t.length;r++)if(e>=t[r][0]&&e<=t[r][1])return!0;return!1}function uGt(e){e.attr("x",-Th.bar.captureWidth/2).attr("width",Th.bar.captureWidth)}function cGt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function fGt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=rUe(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 rUe(e,t){return e.map(function(r){return r.map(function(n){return Math.max(0,n*t)}).sort(A5)})}function hGt(e,t){var r=Th.bar.handleHeight;if(!(t>e[1]+r||t<e[0]-r))return t>=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}function iUe(){im.select(document.body).style("cursor",null)}function RK(e){e.attr("stroke-dasharray",fGt)}function Uz(e,t){var r=im.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(Th.bar.snapDuration).each("end",t):r;RK(n)}function nUe(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=rUe(l,s),c=NaN,f=NaN,h=NaN;for(o=0;o<=u.length;o++){var d=u[o];if(d&&d[0]<=t&&t<=d[1]){c=o;break}else if(f=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(i=c,isNaN(i)&&(isNaN(f)||isNaN(h)?i=isNaN(f)?h:f:i=t-u[f][1]<u[h][0]-t?f:h),!isNaN(i)){var v=u[i],m=hGt(v,t);m&&(a.interval=l[i],a.intervalPix=v,a.region=m)}}if(e.ordinal&&!a.region){var b=e.unitTickvals,p=e.unitToPaddedPx.invert(t);for(o=0;o<b.length;o++){var k=[b[Math.max(o-1,0)]*.25+b[o]*.75,b[Math.min(o+1,b.length-1)]*.25+b[o]*.75];if(p>=k[0]&&p<=k[1]){a.clickableOrdinalRange=k;break}}}return a}function dGt(e,t){im.event.sourceEvent.stopPropagation();var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=nUe(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Th.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function aUe(e,t){im.event.sourceEvent.stopPropagation();var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(A5),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),Uz(e.parentNode)}function vGt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(oUe(e,t),aUe(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=im.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,iUe(),!i.wasDragged){i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&t.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,i.extent.length===0&&IK(r)):IK(r),i.brushCallback(t),Uz(e.parentNode),i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]<l[0]&&l.reverse(),i.newExtent=[Vz(0,l,i.newExtent[0],i.stayingIntervals),Vz(1,l,i.newExtent[1],i.stayingIntervals)];var u=i.newExtent[1]>i.newExtent[0];i.extent=i.stayingIntervals.concat(u?[i.newExtent]:[]),i.extent.length||IK(r),i.brushCallback(t),u?Uz(e.parentNode,s):(s(),Uz(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function oUe(e,t){var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=nUe(t,r),i="crosshair";n.clickableOrdinalRange?i="pointer":n.region&&(i=n.region+"-resize"),im.select(document.body).style("cursor",i)}function pGt(e){e.on("mousemove",function(t){im.event.preventDefault(),t.parent.inBrushDrag||oUe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||iUe()}).call(im.behavior.drag().on("dragstart",function(t){dGt(this,t)}).on("drag",function(t){aUe(this,t)}).on("dragend",function(t){vGt(this,t)}))}function sUe(e,t){return e[0]-t[0]}function gGt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(".background").data(Nz);i.enter().append("rect").classed("background",!0).call(uGt).call(cGt).style("pointer-events",n?"none":"auto").attr("transform",oGt(0,Th.verticalPadding)),i.call(pGt).attr("height",function(s){return s.height-Th.verticalPadding});var a=e.selectAll(".highlight-shadow").data(Nz);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-Th.bar.width/2).attr("stroke-width",Th.bar.width+Th.bar.strokeWidth).attr("stroke",t).attr("opacity",Th.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(RK);var o=e.selectAll(".highlight").data(Nz);o.enter().append("line").classed("highlight",!0).attr("x",-Th.bar.width/2).attr("stroke-width",Th.bar.width-Th.bar.strokeWidth).attr("stroke",Th.bar.fillColor).attr("opacity",Th.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(RK)}function mGt(e,t,r){var n=e.selectAll("."+Th.cn.axisBrush).data(Nz,aGt);n.enter().append("g").classed(Th.cn.axisBrush,!0),gGt(n,t,r)}function yGt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function IK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function _Gt(e){return function(r){var n=r.brush,i=yGt(n),a=i.slice();n.filter.set(a),e()}}function lUe(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 xGt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(A5)}).sort(sUe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=lUe(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 bGt(e,t,r,n,i,a){var o=xGt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:_Gt(i),brushEndCallback:a}}}function wGt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(A5)}),t.multiselect?e=lUe(e.sort(sUe)):e=[e[0]]):e=[e.sort(A5)],t.tickvals){var r=t.tickvals.slice().sort(A5);if(e=e.map(function(n){var i=[Vz(0,r,n[0],[]),Vz(1,r,n[1],[])];if(i[1]>i[0])return i}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}uUe.exports={makeBrush:bGt,ensureAxisBrush:mGt,cleanRanges:wGt}});var hUe=ye((ixr,fUe)=>{"use strict";var Mx=Pr(),TGt=pv().hasColorscale,AGt=td(),SGt=Cc().defaults,MGt=Zd(),EGt=ho(),cUe=PK(),kGt=DK(),FK=Bk().maxDimensionCount,CGt=Iz();function LGt(e,t,r,n,i){var a=i("line.color",r);if(TGt(e,"line")&&Mx.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),AGt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function PGt(e,t,r,n){function i(u,c){return Mx.coerce(e,t,cUe.dimensions,u,c)}var a=i("values"),o=i("visible");if(a&&a.length||(o=t.visible=!1),o){i("label"),i("tickvals"),i("ticktext"),i("tickformat");var s=i("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},EGt.setConvert(t._ax,n.layout),i("multiselect");var l=i("constraintrange");l&&(t.constraintrange=kGt.cleanRanges(l,t))}}fUe.exports=function(t,r,n,i){function a(c,f){return Mx.coerce(t,r,cUe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>FK&&(Mx.log("parcoords traces support up to "+FK+" dimensions at the moment"),o.splice(FK));var s=MGt(t,r,{name:"dimensions",layout:i,handleItemDefaults:PGt}),l=LGt(t,r,n,i,a);SGt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),CGt(r,s,"values",l);var u=Mx.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});Mx.coerceFont(a,"labelfont",u),Mx.coerceFont(a,"tickfont",u,{autoShadowDflt:!0}),Mx.coerceFont(a,"rangefont",u),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var vUe=ye((nxr,dUe)=>{"use strict";var IGt=Pr().isArrayOrTypedArray,zK=tc(),RGt=iy().wrap;dUe.exports=function(t,r){var n,i;return zK.hasColorscale(r,"line")&&IGt(r.line.color)?(n=r.line.color,i=zK.extractOpts(r.line).colorscale,zK.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=DGt(r._length),i=[[0,r.line.color],[1,r.line.color]]),RGt({lineColor:n,cscale:i})};function DGt(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=.5;return t}});function FGt(e){var c,f;var t,r=[],n=1,i;if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),qK.default[e])r=qK.default[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(e[0]==="#"){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var l=t[1];i=l.replace(/a$/,"");var u=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/),i==="color"&&(i=r.shift()),r=r.map(function(h,d){if(h[h.length-1]==="%")return h=parseFloat(h)/100,d===3?h:i==="rgb"?h*255:i[0]==="h"||i[0]==="l"&&!d?h*100:i==="lab"?h*125:i==="lch"?d<2?h*150:h*360:i[0]==="o"&&!d?h:i==="oklab"?h*.4:i==="oklch"?d<2?h*.4:h*360:h;if(i[d]==="h"||d===2&&i[i.length-1]==="h"){if(pUe[h]!==void 0)return pUe[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),n=r.length>u?r.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),i=((f=(c=e.match(/([a-z])/ig))==null?void 0:c.join(""))==null?void 0:f.toLowerCase())||"rgb");return{space:i,values:r,alpha:n}}var qK,gUe,pUe,mUe=gu(()=>{qK=Mtt(TX(),1),gUe=FGt,pUe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}});var Nk,OK=gu(()=>{Nk={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var Gz,yUe=gu(()=>{OK();Gz={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}};Nk.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s,l,u;return a===i?s=0:t===a?s=(r-n)/o:r===a?s=2+(n-t)/o:n===a&&(s=4+(t-r)/o),s=Math.min(s*60,360),s<0&&(s+=360),u=(i+a)/2,a===i?l=0:u<=.5?l=o/(a+i):l=o/(2-a-i),[s,l*100,u*100]}});var xUe={};mee(xUe,{default:()=>_Ue});function _Ue(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments)),e instanceof Number&&(e=+e);var t,r,n,i=gUe(e);if(!i.space)return[];let a=i.space[0]==="h"?Gz.min:Nk.min,o=i.space[0]==="h"?Gz.max:Nk.max;return t=Array(3),t[0]=Math.min(Math.max(i.values[0],a[0]),o[0]),t[1]=Math.min(Math.max(i.values[1],a[1]),o[1]),t[2]=Math.min(Math.max(i.values[2],a[2]),o[2]),i.space[0]==="h"&&(t=Gz.rgb(t)),t.push(Math.min(Math.max(i.alpha,0),1)),t}var bUe=gu(()=>{mUe();OK();yUe()});var BK=ye(Hz=>{"use strict";var zGt=Pr().isTypedArray;Hz.convertTypedArray=function(e){return zGt(e)?Array.prototype.slice.call(e):e};Hz.isOrdinal=function(e){return!!e.tickvals};Hz.isVisible=function(e){return e.visible||!("visible"in e)}});var PUe=ye((dxr,LUe)=>{"use strict";var qGt=["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(`
|
||
`),OGt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(`
|
||
`),Uk=Bk().maxDimensionCount,EUe=Pr(),wUe=1e-6,jz=2048,BGt=new Uint8Array(4),TUe=new Uint8Array(4),AUe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function NGt(e){e.read({x:0,y:0,width:1,height:1,data:BGt})}function kUe(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 UGt(e,t,r,n,i,a){var o=a.key;function s(l){var u=Math.min(n,i-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],kUe(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*u,a.offset=2*l*n,t(a),l*n+u<i&&(r.currentRafs[o]=window.requestAnimationFrame(function(){s(l+1)})),r.drawCompleted=!1)}r.drawCompleted||(NGt(e),r.drawCompleted=!0),s(0)}function VGt(e){return Math.max(wUe,Math.min(1-wUe,e))}function GGt(e,t){for(var r=new Array(256),n=0;n<256;n++)r[n]=e(n/255).concat(t);return r}function NK(e,t){return(e>>>8*t)%256/255}function HGt(e,t,r){for(var n=new Array(e*(Uk+4)),i=0,a=0;a<e;a++){for(var o=0;o<Uk;o++)n[i++]=o<t.length?t[o].paddedUnitValues[a]:.5;n[i++]=NK(a,2),n[i++]=NK(a,1),n[i++]=NK(a,0),n[i++]=VGt(r[a])}return n}function jGt(e,t,r){for(var n=new Array(t*8),i=0,a=0;a<t;a++)for(var o=0;o<2;o++)for(var s=0;s<4;s++){var l=e*4+s,u=r[a*64+l];l===63&&o===0&&(u*=-1),n[i++]=u}return n}function SUe(e){var t="0"+e;return t.slice(-2)}function CUe(e){return e<Uk?"p"+SUe(e+1)+"_"+SUe(e+4):"colors"}function WGt(e,t,r){for(var n=0;n<=Uk;n+=4)e[CUe(n)](jGt(n/4,t,r))}function XGt(e){for(var t={},r=0;r<=Uk;r+=4)t[CUe(r)]=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return t}function ZGt(e,t,r,n,i,a,o,s,l,u,c,f,h,d){for(var v=[[],[]],m=0;m<64;m++)v[0][m]=m===i?1:0,v[1][m]=m===a?1:0;o*=d,s*=d,l*=d,u*=d;var b=e.lines.canvasOverdrag*d,p=e.domain,k=e.canvasWidth*d,M=e.canvasHeight*d,T=e.pad.l*d,L=e.pad.b*d,x=e.layoutHeight*d,C=e.layoutWidth*d,S=e.deselectedLines.color,g=e.deselectedLines.opacity,P=EUe.extendFlat({key:c,resolution:[k,M],viewBoxPos:[o+b,s],viewBoxSize:[l,u],i0:i,i1:a,dim0A:v[0].slice(0,16),dim0B:v[0].slice(16,32),dim0C:v[0].slice(32,48),dim0D:v[0].slice(48,64),dim1A:v[1].slice(0,16),dim1B:v[1].slice(16,32),dim1C:v[1].slice(32,48),dim1D:v[1].slice(48,64),drwLayer:f,contextColor:[S[0]/255,S[1]/255,S[2]/255,g!=="auto"?S[3]*g:Math.max(1/255,Math.pow(1/e.lines.color.length,1/3))],scissorX:(n===t?0:o+b)+(T-b)+C*p.x[0],scissorWidth:(n===r?k-o+b:l+.5)+(n===t?o+b:0),scissorY:s+L+x*p.y[0],scissorHeight:u,viewportX:T-b+C*p.x[0],viewportY:L+x*p.y[0],viewportWidth:k,viewportHeight:M},h);return P}function MUe(e){var t=jz-1,r=Math.max(0,Math.floor(e[0]*t),0),n=Math.min(t,Math.ceil(e[1]*t),t);return[Math.min(r,n),Math.max(r,n)]}LUe.exports=function(e,t){var r=t.context,n=t.pick,i=t.regl,a=i._gl,o=a.getParameter(a.ALIASED_LINE_WIDTH_RANGE),s=Math.max(o[0],Math.min(o[1],t.viewModel.plotGlPixelRatio)),l={currentRafs:{},drawCompleted:!0,clearOnly:!1},u,c,f,h,d=XGt(i),v,m=i.texture(AUe),b=[];k(t);var p=i({profile:!1,blend:{enable:r,func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:1,dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},depth:{enable:!r,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:i.prop("scissorX"),y:i.prop("scissorY"),width:i.prop("scissorWidth"),height:i.prop("scissorHeight")}},viewport:{x:i.prop("viewportX"),y:i.prop("viewportY"),width:i.prop("viewportWidth"),height:i.prop("viewportHeight")},dither:!1,vert:qGt,frag:OGt,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:m,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(S){u=S.model,c=S.viewModel,f=c.dimensions.slice(),h=f[0]?f[0].values.length:0;var g=u.lines,P=n?g.color.map(function(z,q){return q/g.color.length}):g.color,E=HGt(h,f,P);WGt(d,h,E),!r&&!n&&(m=i.texture(EUe.extendFlat({data:GGt(u.unitToColor,255)},AUe)))}function M(S){var g,P,E,z=[[],[]];for(E=0;E<64;E++){var q=!S&&E<f.length?f[E].brush.filter.getBounds():[-1/0,1/0];z[0][E]=q[0],z[1][E]=q[1]}var U=jz*8,G=new Array(U);for(g=0;g<U;g++)G[g]=255;if(!S)for(g=0;g<f.length;g++){var Z=g%8,j=(g-Z)/8,N=Math.pow(2,Z),H=f[g],re=H.brush.filter.get();if(!(re.length<2)){var oe=MUe(re[0])[1];for(P=1;P<re.length;P++){var _e=MUe(re[P]);for(E=oe+1;E<_e[0];E++)G[E*8+j]&=~N;oe=Math.max(oe,_e[1])}}}var ke={shape:[8,jz],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:G};return v?v(ke):v=i.texture(ke),{maskTexture:v,maskHeight:jz,loA:z[0].slice(0,16),loB:z[0].slice(16,32),loC:z[0].slice(32,48),loD:z[0].slice(48,64),hiA:z[1].slice(0,16),hiB:z[1].slice(16,32),hiC:z[1].slice(32,48),hiD:z[1].slice(48,64)}}function T(S,g,P){var E=S.length,z,q,U,G=1/0,Z=-1/0;for(z=0;z<E;z++)S[z].dim0.canvasX<G&&(G=S[z].dim0.canvasX,q=z),S[z].dim1.canvasX>Z&&(Z=S[z].dim1.canvasX,U=z);E===0&&kUe(i,0,0,u.canvasWidth,u.canvasHeight);var j=M(r);for(z=0;z<E;z++){var N=S[z],H=N.dim0.crossfilterDimensionIndex,re=N.dim1.crossfilterDimensionIndex,oe=N.canvasX,_e=N.canvasY,ke=oe+N.panelSizeX,Ce=N.plotGlPixelRatio;if(g||!b[H]||b[H][0]!==oe||b[H][1]!==ke){b[H]=[oe,ke];var ge=ZGt(u,q,U,z,H,re,oe,_e,N.panelSizeX,N.panelSizeY,N.dim0.crossfilterDimensionIndex,r?0:n?2:1,j,Ce);l.clearOnly=P;var ie=g?u.lines.blockLineCount:h;UGt(i,p,l,ie,h,ge)}}}function L(S,g){return i.read({x:S,y:g,width:1,height:1,data:TUe}),TUe}function x(S,g,P,E){var z=new Uint8Array(4*P*E);return i.read({x:S,y:g,width:P,height:E,data:z}),z}function C(){e.style["pointer-events"]="none",m.destroy(),v&&v.destroy();for(var S in d)d[S].destroy()}return{render:T,readPixel:L,readPixels:x,destroy:C,update:k}}});var jUe=ye((vxr,HUe)=>{"use strict";var Od=qa(),p1=Pr(),UK=p1.isArrayOrTypedArray,qUe=p1.numberFormat,OUe=(bUe(),pb(xUe)).default,BUe=ho(),YGt=p1.strRotate,ny=p1.strTranslate,KGt=Zl(),Wz=So(),IUe=tc(),HK=iy(),ig=HK.keyFun,ay=HK.repeat,NUe=HK.unwrap,S5=BK(),Dl=Bk(),UUe=DK(),JGt=PUe();function RUe(e,t,r){return p1.aggNums(e,null,t,r)}function VUe(e,t){return jK(RUe(Math.min,e,t),RUe(Math.max,e,t))}function Xz(e){var t=e.range;return t?jK(t[0],t[1]):VUe(e.values,e._length)}function jK(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function $Gt(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function QGt(e,t,r,n,i){var a=Xz(r);return n?Od.scale.ordinal().domain(n.map($Gt(qUe(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):Od.scale.linear().domain(a).range([e-t,t])}function eHt(e,t){return Od.scale.linear().range([t,e-t])}function tHt(e,t){return Od.scale.linear().domain(Xz(e)).range([t,1-t])}function rHt(e){if(e.tickvals){var t=Xz(e);return Od.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function iHt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=OUe(a[1]);return Od.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),n=function(a){return function(o){return o[a]}},i="rgb".split("").map(function(a){return Od.scale.linear().clamp(!0).domain(t).range(r.map(n(a)))});return function(a){return i.map(function(o){return o(a)})}}function GK(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function nHt(e,t,r){var n=NUe(t),i=n.trace,a=S5.convertTypedArray(n.lineColor),o=i.line,s={color:OUe(i.unselected.line.color),opacity:i.unselected.line.opacity},l=IUe.extractOpts(o),u=l.reversescale?IUe.flipScale(n.cscale):n.cscale,c=i.domain,f=i.dimensions,h=e.width,d=i.labelangle,v=i.labelside,m=i.labelfont,b=i.tickfont,p=i.rangefont,k=p1.extendDeepNoArrays({},o,{color:a.map(Od.scale.linear().domain(Xz({values:a,range:[l.min,l.max],_length:i._length}))),blockLineCount:Dl.blockLineCount,canvasOverdrag:Dl.overdrag*Dl.canvasPixelRatio}),M=Math.floor(h*(c.x[1]-c.x[0])),T=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},x=M,C=T;return{key:r,colCount:f.filter(S5.isVisible).length,dimensions:f,tickDistance:Dl.tickDistance,unitToColor:iHt(u),lines:k,deselectedLines:s,labelAngle:d,labelSide:v,labelFont:m,tickFont:b,rangeFont:p,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:x*Dl.canvasPixelRatio+2*k.canvasOverdrag,canvasHeight:C*Dl.canvasPixelRatio,width:x,height:C,canvasPixelRatio:Dl.canvasPixelRatio}}function aHt(e,t,r){var n=r.width,i=r.height,a=r.dimensions,o=r.canvasPixelRatio,s=function(h){return n*h/Math.max(1,r.colCount-1)},l=Dl.verticalPadding/i,u=eHt(i,Dl.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(S5.isVisible).map(function(h,d){var v=tHt(h,l),m=f[h.label];f[h.label]=(m||0)+1;var b=h.label+(m?"__"+m:""),p=h.constraintrange,k=p&&p.length;k&&!UK(p[0])&&(p=[p]);var M=k?p.map(function(q){return q.map(v)}):[[-1/0,1/0]],T=function(){var q=c;q.focusLayer&&q.focusLayer.render(q.panels,!0);var U=GK(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 x=h.tickvals,C;function S(q,U){return{val:q,text:C[U]}}function g(q,U){return q.val-U.val}if(UK(x)&&x.length){p1.isTypedArray(x)&&(x=Array.from(x)),C=h.ticktext,!UK(C)||!C.length?C=x.map(qUe(h.tickformat)):C.length>x.length?C=C.slice(0,x.length):x.length>C.length&&(x=x.slice(0,C.length));for(var P=1;P<x.length;P++)if(x[P]<x[P-1]){for(var E=x.map(S).sort(g),z=0;z<x.length;z++)x[z]=E[z].val,C[z]=E[z].text;break}}else x=void 0;return L=S5.convertTypedArray(L),{key:b,label:h.label,tickFormat:h.tickformat,tickvals:x,ticktext:C,ordinal:S5.isOrdinal(h),multiselect:h.multiselect,xIndex:d,crossfilterDimensionIndex:d,visibleIndex:h._index,height:i,values:L,paddedUnitValues:L.map(v),unitTickvals:x&&x.map(v),xScale:s,x:s(d),canvasX:s(d)*o,unitToPaddedPx:u,domainScale:QGt(i,Dl.verticalPadding,h,x,C),ordinalScale:rHt(h),parent:c,model:r,brush:UUe.makeBrush(e,k,M,function(){e.linePickActive(!1)},T,function(q){if(c.focusLayer.render(c.panels,!0),c.pickLayer&&c.pickLayer.render(c.panels,!0),e.linePickActive(!0),t&&t.filterChanged){var U=v.invert,G=q.map(function(Z){return Z.map(U).sort(p1.sorterAsc)}).sort(function(Z,j){return Z[0]-j[0]});t.filterChanged(c.key,h._index,G)}})}}),c}function DUe(e){e.classed(Dl.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function oHt(){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 FUe(e,t){var r=t==="top"?1:-1,n=e*Math.PI/180,i=Math.sin(n),a=Math.cos(n);return{dir:r,dx:i,dy:a,degrees:e}}function VK(e,t,r){for(var n=t.panels||(t.panels=[]),i=e.data(),a=0;a<i.length-1;a++){var o=n[a]||(n[a]={}),s=i[a],l=i[a+1];o.dim0=s,o.dim1=l,o.canvasX=s.canvasX,o.panelSizeX=l.canvasX-s.canvasX,o.panelSizeY=t.model.canvasHeight,o.y=0,o.canvasY=0,o.plotGlPixelRatio=r}}function sHt(e){for(var t=0;t<e.length;t++)for(var r=0;r<e[t].length;r++)for(var n=e[t][r].trace,i=n.dimensions,a=0;a<i.length;a++){var o=i[a].values,s=i[a]._ax;s&&(s.range?s.range=jK(s.range[0],s.range[1]):s.range=VUe(o,n._length),s.dtick||(s.dtick=.01*(Math.abs(s.range[1]-s.range[0])||1)),s.tickformat=i[a].tickformat,BUe.calcTicks(s),s.cleanRange())}}function GUe(e,t){return BUe.tickText(e._ax,t,!1).text}function zUe(e,t){if(e.ordinal)return"";var r=e.domainScale.domain(),n=r[t?r.length-1:0];return GUe(e.model.dimensions[e.visibleIndex],n)}HUe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=o._toppaper,l=o._glcontainer,u=t._context.plotGlPixelRatio,c=t._fullLayout.paper_bgcolor;sHt(r);var f=oHt(),h=r.filter(function(z){return NUe(z).trace.visible}).map(nHt.bind(0,n)).map(aHt.bind(0,f,i));l.each(function(z,q){return p1.extendFlat(z,h[q])});var d=l.selectAll(".gl-canvas").each(function(z){z.viewModel=h[0],z.viewModel.plotGlPixelRatio=u,z.viewModel.paperColor=c,z.model=z.viewModel?z.viewModel.model:null}),v=null,m=d.filter(function(z){return z.pick});m.style("pointer-events",a?"none":"auto").on("mousemove",function(z){if(f.linePickActive()&&z.lineLayer&&i&&i.hover){var q=Od.event,U=this.width,G=this.height,Z=Od.mouse(this),j=Z[0],N=Z[1];if(j<0||N<0||j>=U||N>=G)return;var H=z.lineLayer.readPixel(j,G-1-N),re=H[3]!==0,oe=re?H[2]+256*(H[1]+256*H[0]):null,_e={x:j,y:N,clientX:q.clientX,clientY:q.clientY,dataIndex:z.model.key,curveNumber:oe};oe!==v&&(re?i.hover(_e):i.unhover&&i.unhover(_e),v=oe)}}),d.style("opacity",function(z){return z.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var b=s.selectAll("."+Dl.cn.parcoords).data(h,ig);b.exit().remove(),b.enter().append("g").classed(Dl.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),b.attr("transform",function(z){return ny(z.model.translateX,z.model.translateY)});var p=b.selectAll("."+Dl.cn.parcoordsControlView).data(ay,ig);p.enter().append("g").classed(Dl.cn.parcoordsControlView,!0),p.attr("transform",function(z){return ny(z.model.pad.l,z.model.pad.t)});var k=p.selectAll("."+Dl.cn.yAxis).data(function(z){return z.dimensions},ig);k.enter().append("g").classed(Dl.cn.yAxis,!0),p.each(function(z){VK(k,z,u)}),d.each(function(z){if(z.viewModel){!z.lineLayer||i?z.lineLayer=JGt(this,z):z.lineLayer.update(z),(z.key||z.key===0)&&(z.viewModel[z.key]=z.lineLayer);var q=!z.context||i;z.lineLayer.render(z.viewModel.panels,q)}}),k.attr("transform",function(z){return ny(z.xScale(z.xIndex),0)}),k.call(Od.behavior.drag().origin(function(z){return z}).on("drag",function(z){var q=z.parent;f.linePickActive(!1),z.x=Math.max(-Dl.overdrag,Math.min(z.model.width+Dl.overdrag,Od.event.x)),z.canvasX=z.x*z.model.canvasPixelRatio,k.sort(function(U,G){return U.x-G.x}).each(function(U,G){U.xIndex=G,U.x=z===U?U.x:U.xScale(U.xIndex),U.canvasX=U.x*U.model.canvasPixelRatio}),VK(k,q,u),k.filter(function(U){return Math.abs(z.xIndex-U.xIndex)!==0}).attr("transform",function(U){return ny(U.xScale(U.xIndex),0)}),Od.select(this).attr("transform",ny(z.x,0)),k.each(function(U,G,Z){Z===z.parent.key&&(q.dimensions[G]=U)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!GK(q)),q.focusLayer.render&&q.focusLayer.render(q.panels)}).on("dragend",function(z){var q=z.parent;z.x=z.xScale(z.xIndex),z.canvasX=z.x*z.model.canvasPixelRatio,VK(k,q,u),Od.select(this).attr("transform",function(U){return ny(U.x,0)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!GK(q)),q.focusLayer&&q.focusLayer.render(q.panels),q.pickLayer&&q.pickLayer.render(q.panels,!0),f.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(q.key,q.dimensions.map(function(U){return U.crossfilterDimensionIndex}))})),k.exit().remove();var M=k.selectAll("."+Dl.cn.axisOverlays).data(ay,ig);M.enter().append("g").classed(Dl.cn.axisOverlays,!0),M.selectAll("."+Dl.cn.axis).remove();var T=M.selectAll("."+Dl.cn.axis).data(ay,ig);T.enter().append("g").classed(Dl.cn.axis,!0),T.each(function(z){var q=z.model.height/z.model.tickDistance,U=z.domainScale,G=U.domain();Od.select(this).call(Od.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(q,z.tickFormat).tickValues(z.ordinal?G:null).tickFormat(function(Z){return S5.isOrdinal(z)?Z:GUe(z.model.dimensions[z.visibleIndex],Z)}).scale(U)),Wz.font(T.selectAll("text"),z.model.tickFont)}),T.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),T.selectAll("text").style("cursor","default");var L=M.selectAll("."+Dl.cn.axisHeading).data(ay,ig);L.enter().append("g").classed(Dl.cn.axisHeading,!0);var x=L.selectAll("."+Dl.cn.axisTitle).data(ay,ig);x.enter().append("text").classed(Dl.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),x.text(function(z){return z.label}).each(function(z){var q=Od.select(this);Wz.font(q,z.model.labelFont),KGt.convertToTspans(q,t)}).attr("transform",function(z){var q=FUe(z.model.labelAngle,z.model.labelSide),U=Dl.axisTitleOffset;return(q.dir>0?"":ny(0,2*U+z.model.height))+YGt(q.degrees)+ny(-U*q.dx,-U*q.dy)}).attr("text-anchor",function(z){var q=FUe(z.model.labelAngle,z.model.labelSide),U=Math.abs(q.dx),G=Math.abs(q.dy);return 2*U>G?q.dir*q.dx<0?"start":"end":"middle"});var C=M.selectAll("."+Dl.cn.axisExtent).data(ay,ig);C.enter().append("g").classed(Dl.cn.axisExtent,!0);var S=C.selectAll("."+Dl.cn.axisExtentTop).data(ay,ig);S.enter().append("g").classed(Dl.cn.axisExtentTop,!0),S.attr("transform",ny(0,-Dl.axisExtentOffset));var g=S.selectAll("."+Dl.cn.axisExtentTopText).data(ay,ig);g.enter().append("text").classed(Dl.cn.axisExtentTopText,!0).call(DUe),g.text(function(z){return zUe(z,!0)}).each(function(z){Wz.font(Od.select(this),z.model.rangeFont)});var P=C.selectAll("."+Dl.cn.axisExtentBottom).data(ay,ig);P.enter().append("g").classed(Dl.cn.axisExtentBottom,!0),P.attr("transform",function(z){return ny(0,z.model.height+Dl.axisExtentOffset)});var E=P.selectAll("."+Dl.cn.axisExtentBottomText).data(ay,ig);E.enter().append("text").classed(Dl.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(DUe),E.text(function(z){return zUe(z,!1)}).each(function(z){Wz.font(Od.select(this),z.model.rangeFont)}),UUe.ensureAxisBrush(M,c,t)}});var XK=ye((WK,YUe)=>{"use strict";var lHt=jUe(),uHt=Lz(),WUe=BK().isVisible,ZUe={};function XUe(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function cHt(e,t){return function(n,i){return XUe(e,t,n)-XUe(e,t,i)}}var WK=YUe.exports=function(t,r){var n=t._fullLayout,i=uHt(t,[],ZUe);if(i){var a={},o={},s={},l={},u=n._size;r.forEach(function(v,m){var b=v[0].trace;s[m]=b.index;var p=l[m]=b.index;a[m]=t.data[p].dimensions,o[m]=t.data[p].dimensions.slice()});var c=function(v,m,b){var p=o[v][m],k=b.map(function(S){return S.slice()}),M="dimensions["+m+"].constraintrange",T=n._tracePreGUI[t._fullData[s[v]]._fullInput.uid];if(T[M]===void 0){var L=p.constraintrange;T[M]=L||null}var x=t._fullData[s[v]].dimensions[m];k.length?(k.length===1&&(k=k[0]),p.constraintrange=k,x.constraintrange=k.slice(),k=[k]):(delete p.constraintrange,delete x.constraintrange,k=null);var C={};C[M]=k,t.emit("plotly_restyle",[C,[l[v]]])},f=function(v){t.emit("plotly_hover",v)},h=function(v){t.emit("plotly_unhover",v)},d=function(v,m){var b=cHt(m,o[v].filter(WUe));a[v].sort(b),o[v].filter(function(p){return!WUe(p)}).sort(function(p){return o[v].indexOf(p)}).forEach(function(p){a[v].splice(a[v].indexOf(p),1),a[v].splice(o[v].indexOf(p),0,p)}),t.emit("plotly_restyle",[{dimensions:[a[v]]},[l[v]]])};lHt(t,r,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:c,hover:f,unhover:h,axesMoved:d})}};WK.reglPrecompiled=ZUe});var JUe=ye(Vk=>{"use strict";var KUe=qa(),fHt=Id().getModuleCalcData,hHt=XK(),dHt=Wp();Vk.name="parcoords";Vk.plot=function(e){var t=fHt(e.calcdata,"parcoords")[0];t.length&&hHt(e,t)};Vk.clean=function(e,t,r,n){var i=n._has&&n._has("parcoords"),a=t._has&&t._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())};Vk.toSVG=function(e){var t=e._fullLayout._glimages,r=KUe.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:dHt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){KUe.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var QUe=ye((gxr,$Ue)=>{"use strict";$Ue.exports={attributes:PK(),supplyDefaults:hUe(),calc:vUe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:JUe(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var rVe=ye((mxr,tVe)=>{"use strict";var eVe=QUe();eVe.plot=XK();tVe.exports=eVe});var nVe=ye((yxr,iVe)=>{"use strict";iVe.exports=rVe()});var ZK=ye((_xr,uVe)=>{"use strict";var oVe=Ao().extendFlat,vHt=Gl(),aVe=ec(),pHt=Tu(),{hovertemplateAttrs:sVe,templatefallbackAttrs:lVe}=Ll(),gHt=Cc().attributes,mHt=oVe({editType:"calc"},pHt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:sVe({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:lVe({editType:"plot"})});uVe.exports={domain:gHt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:oVe({},vHt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:sVe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:lVe({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:aVe({editType:"calc"}),tickfont:aVe({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:mHt,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 hVe=ye((xxr,fVe)=>{"use strict";var M5=Pr(),yHt=pv().hasColorscale,_Ht=td(),xHt=Cc().defaults,bHt=Zd(),cVe=ZK(),wHt=Iz(),THt=vv().isTypedArraySpec;function AHt(e,t,r,n,i){i("line.shape"),i("line.hovertemplate"),i("line.hovertemplatefallback");var a=i("line.color",n.colorway[0]);if(yHt(e,"line")&&M5.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),_Ht(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function SHt(e,t){function r(u,c){return M5.coerce(e,t,cVe.dimensions,u,c)}var n=r("values"),i=r("visible");if(n&&n.length||(i=t.visible=!1),i){r("label"),r("displayindex",t._index);var a=e.categoryarray,o=M5.isArrayOrTypedArray(a)&&a.length>0||THt(a),s;o&&(s="array");var l=r("categoryorder",s);l==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&l==="array"&&(t.categoryorder="trace")}}fVe.exports=function(t,r,n,i){function a(u,c){return M5.coerce(t,r,cVe,u,c)}var o=bHt(t,r,{name:"dimensions",handleItemDefaults:SHt}),s=AHt(t,r,n,i,a);xHt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),wHt(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("hovertemplatefallback"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var l=i.font;M5.coerceFont(a,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),M5.coerceFont(a,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var vVe=ye((bxr,dVe)=>{"use strict";var MHt=iy().wrap,EHt=pv().hasColorscale,kHt=gv(),CHt=tO(),LHt=So(),Gk=Pr(),PHt=Eo();dVe.exports=function(t,r){var n=Gk.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(g){var P;if(g.categoryorder==="trace")P=null;else if(g.categoryorder==="array")P=g.categoryarray;else{P=CHt(g.values);for(var E=!0,z=0;z<P.length;z++)if(!PHt(P[z])){E=!1;break}P.sort(E?Gk.sorterAsc:void 0),g.categoryorder==="category descending"&&(P=P.reverse())}return OHt(g.values,P)}),a,o,s;Gk.isArrayOrTypedArray(r.counts)?a=r.counts:a=[r.counts],BHt(n),n.forEach(function(g,P){NHt(g,i[P])});var l=r.line,u;l?(EHt(r,"line")&&kHt(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),u=LHt.tryColorscale(l)):u=Gk.identity;function c(g){var P,E;return Gk.isArrayOrTypedArray(l.color)?(P=l.color[g%l.color.length],E=P):P=l.color,{color:u(P),rawColor:E}}var f=n[0].values.length,h={},d=i.map(function(g){return g.inds});s=0;var v,m;for(v=0;v<f;v++){var b=[];for(m=0;m<d.length;m++)b.push(d[m][v]);o=a[v%a.length],s+=o;var p=c(v),k=b+"-"+p.rawColor;h[k]===void 0&&(h[k]=zHt(b,p.color,p.rawColor)),qHt(h[k],v,o)}var M=n.map(function(g,P){return RHt(P,g._index,g._displayindex,g.label,s)});for(v=0;v<f;v++)for(o=a[v%a.length],m=0;m<M.length;m++){var T=M[m].containerInd,L=i[m].inds[v],x=M[m].categories;if(x[L]===void 0){var C=r.dimensions[T]._categoryarray[L],S=r.dimensions[T]._ticktext[L];x[L]=DHt(m,L,C,S)}FHt(x[L],v,o)}return MHt(IHt(M,h,s))};function IHt(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 RHt(e,t,r,n,i){return{dimensionInd:e,containerInd:t,displayInd:r,dimensionLabel:n,count:i,categories:[],dragX:null}}function DHt(e,t,r,n){return{dimensionInd:e,categoryInd:t,categoryValue:r,displayInd:t,categoryLabel:n,valueInds:[],count:0,dragY:null}}function FHt(e,t,r){e.valueInds.push(t),e.count+=r}function zHt(e,t,r){return{categoryInds:e,color:t,rawColor:r,valueInds:[],count:0}}function qHt(e,t,r){e.valueInds.push(t),e.count+=r}function OHt(e,t){t==null?t=[]:t=t.map(function(u){return u});var r={},n={},i=[];t.forEach(function(u,c){r[u]=0,n[u]=c});for(var a=0;a<e.length;a++){var o=e[a],s;r[o]===void 0?(r[o]=1,s=t.push(o)-1,n[o]=s):(r[o]++,s=n[o]),i.push(s)}var l=t.map(function(u){return r[u]});return{uniqueValues:t,uniqueCounts:l,inds:i}}function BHt(e){var t=e.map(function(n){return n.displayindex}),r;if(UHt(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 NHt(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 UHt(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 TVe=ye((wxr,wVe)=>{"use strict";var Fl=qa(),VHt=(H2(),pb(G2)).interpolateNumber,GHt=ZP(),Wk=vf(),Ex=Pr(),Hk=Ex.strTranslate,pVe=So(),YK=fd(),HHt=Zl();function jHt(e,t,r,n){var i=t._context.staticPlot,a=e.map(ojt.bind(0,t,r)),o=n.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",i?"none":"all");var s=o.selectAll("g.trace.parcats").data(a,g1),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(k){return Hk(k.x,k.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(k){return k.paths},g1);c.attr("fill",function(k){return k.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(k){return k.model.color}).attr("fill-opacity",0);$K(f),c.attr("d",function(k){return k.svgD}),f.empty()||c.sort(KK),c.exit().remove(),c.on("mouseover",WHt).on("mouseout",XHt).on("click",ZHt),l.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),d=h.selectAll("g.dimension").data(function(k){return k.dimensions},g1);d.enter().append("g").attr("class","dimension"),d.attr("transform",function(k){return Hk(k.x,0)}),d.exit().remove();var v=d.selectAll("g.category").data(function(k){return k.categories},g1),m=v.enter().append("g").attr("class","category");v.attr("transform",function(k){return Hk(0,k.y)}),m.append("rect").attr("class","catrect").attr("pointer-events","none"),v.select("rect.catrect").attr("fill","none").attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),mVe(m);var b=v.selectAll("rect.bandrect").data(function(k){return k.bands},g1);b.each(function(){Ex.raiseToTop(this)}),b.attr("fill",function(k){return k.color});var p=b.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(k){return k.color}).attr("fill-opacity",0);b.attr("fill",function(k){return k.color}).attr("width",function(k){return k.width}).attr("height",function(k){return k.height}).attr("y",function(k){return k.y}).attr("cursor",function(k){return k.parcatsViewModel.arrangement==="fixed"?"default":k.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),eJ(p),b.exit().remove(),m.append("text").attr("class","catlabel").attr("pointer-events","none"),v.select("text.catlabel").attr("text-anchor",function(k){return jk(k)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(k){return jk(k)?k.width+5:-5}).attr("y",function(k){return k.height/2}).text(function(k){return k.model.categoryLabel}).each(function(k){pVe.font(Fl.select(this),k.parcatsViewModel.categorylabelfont),HHt.convertToTspans(Fl.select(this),t)}),m.append("text").attr("class","dimlabel"),v.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(k){return k.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(k){return k.width/2}).attr("y",-5).text(function(k,M){return M===0?k.parcatsViewModel.model.dimensions[k.model.dimensionInd].dimensionLabel:null}).each(function(k){pVe.font(Fl.select(this),k.parcatsViewModel.labelfont)}),v.selectAll("rect.bandrect").on("mouseover",tjt).on("mouseout",rjt),v.exit().remove(),d.call(Fl.behavior.drag().origin(function(k){return{x:k.x,y:0}}).on("dragstart",ijt).on("drag",njt).on("dragend",ajt)),s.each(function(k){k.traceSelection=Fl.select(this),k.pathSelection=Fl.select(this).selectAll("g.paths").selectAll("path.path"),k.dimensionSelection=Fl.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}wVe.exports=function(e,t,r,n){jHt(r,e,n,t)};function g1(e){return e.key}function jk(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function KK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor<t.model.rawColor?-1:0}function WHt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){Ex.raiseToTop(this),QK(Fl.select(this));var t=Xk(e),r=JK(e);if(e.parcatsViewModel.graphDiv.emit("plotly_hover",{points:t,event:Fl.event,constraints:r}),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var n=Fl.mouse(this)[0],i=e.parcatsViewModel.graphDiv,a=e.parcatsViewModel.trace,o=i._fullLayout,s=o._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.graphDiv.getBoundingClientRect(),u,c,f;for(f=0;f<e.leftXs.length-1;f++)if(e.leftXs[f]+e.dimWidths[f]-2<=n&&n<=e.leftXs[f+1]+2){var h=e.parcatsViewModel.dimensions[f],d=e.parcatsViewModel.dimensions[f+1];u=(h.x+h.width+d.x)/2,c=(e.topYs[f]+e.topYs[f+1]+e.height)/2;break}var v=e.parcatsViewModel.x+u,m=e.parcatsViewModel.y+c,b=YK.mostReadable(e.model.color,["black","white"]),p=e.model.count,k=p/e.parcatsViewModel.model.count,M={countLabel:p,probabilityLabel:k.toFixed(3)},T=[];e.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&T.push(["Count:",M.countLabel].join(" ")),e.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&T.push(["P:",M.probabilityLabel].join(" "));var L=T.join("<br>"),x=Fl.mouse(i)[0];Wk.loneHover({trace:a,x:v-s.left+l.left,y:m-s.top+l.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:b,idealAlign:x<v?"right":"left",hovertemplate:(a.line||{}).hovertemplate,hovertemplateLabels:M,eventData:[{data:a._input,fullData:a,count:p,probability:k}]},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:i})}}}function XHt(e){if(!e.parcatsViewModel.dragDimension&&($K(Fl.select(this)),Wk.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),e.parcatsViewModel.pathSelection.sort(KK),e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var t=Xk(e),r=JK(e);e.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:t,event:Fl.event,constraints:r})}}function Xk(e){for(var t=[],r=_Ve(e.parcatsViewModel),n=0;n<e.model.valueInds.length;n++){var i=e.model.valueInds[n];t.push({curveNumber:r,pointNumber:i})}return t}function JK(e){for(var t={},r=e.parcatsViewModel.model.dimensions,n=0;n<r.length;n++){var i=r[n],a=i.categories[e.model.categoryInds[n]];t[i.containerInd]=a.categoryValue}return e.model.rawColor!==void 0&&(t.color=e.model.rawColor),t}function ZHt(e){if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Xk(e),r=JK(e);e.parcatsViewModel.graphDiv.emit("plotly_click",{points:t,event:Fl.event,constraints:r})}}function $K(e){e.attr("fill",function(t){return t.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function QK(e){e.attr("fill-opacity",.8).attr("stroke",function(t){return YK.mostReadable(t.model.color,["black","white"])}).attr("stroke-width",.3)}function YHt(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function mVe(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function KHt(e){e.attr("stroke","black").attr("stroke-width",1.5)}function eJ(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function Zz(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,n=e.categoryViewModel.model.categoryInd;return t.filter(function(i){return i.model.categoryInds[r]===n&&i.model.color===e.color})}function JHt(e){var t=Fl.select(e.parentNode).selectAll("rect.bandrect");t.each(function(r){var n=Zz(r);QK(n),n.each(function(){Ex.raiseToTop(this)})}),YHt(Fl.select(e.parentNode))}function $Ht(e){var t=Fl.select(e).datum(),r=Zz(t);QK(r),r.each(function(){Ex.raiseToTop(this)}),Fl.select(e.parentNode).selectAll("rect.bandrect").filter(function(n){return n.color===t.color}).each(function(){Ex.raiseToTop(this),KHt(Fl.select(this))})}function tJ(e,t,r){var n=Fl.select(e).datum(),i=n.categoryViewModel.model,a=n.parcatsViewModel.graphDiv,o=Fl.select(e.parentNode).selectAll("rect.bandrect"),s=[];o.each(function(u){var c=Zz(u);c.each(function(f){Array.prototype.push.apply(s,Xk(f))})});var l={};l[i.dimensionInd]=i.categoryValue,a.emit(t,{points:s,event:r,constraints:l})}function rJ(e,t,r){var n=Fl.select(e).datum(),i=n.categoryViewModel.model,a=n.parcatsViewModel.graphDiv,o=Zz(n),s=[];o.each(function(u){Array.prototype.push.apply(s,Xk(u))});var l={};l[i.dimensionInd]=i.categoryValue,n.rawColor!==void 0&&(l.color=n.rawColor),a.emit(t,{points:s,event:r,constraints:l})}function yVe(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=Fl.select(r.parentNode).select("rect.catrect"),o=a.node().getBoundingClientRect(),s=a.datum(),l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=o.top+o.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var v=s.model.count,m=s.model.categoryLabel,b=v/s.parcatsViewModel.model.count,p={countLabel:v,categoryLabel:m,probabilityLabel:b.toFixed(3)},k=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&k.push(["Count:",p.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&k.push(["P("+p.categoryLabel+"):",p.probabilityLabel].join(" "));var M=k.join("<br>");return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:M,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:p,eventData:[{data:c._input,fullData:c,count:v,category:m,probability:b}]}}function QHt(e,t,r){var n=[];return Fl.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var i=this;n.push(yVe(e,t,i))}),n}function ejt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=Fl.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=a.y+a.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=a.left,d="left"):(h=a.left+a.width,d="right");var v=s.model.categoryLabel,m=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(P){P.color===o.color&&(b+=P.count)});var p=s.model.count,k=0;l.pathSelection.each(function(P){P.model.color===o.color&&(k+=P.model.count)});var M=b/m,T=b/k,L=b/p,x={countLabel:b,categoryLabel:v,probabilityLabel:M.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",x.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(C.push("P(color \u2229 "+v+"): "+x.probabilityLabel),C.push("P("+v+" | color): "+T.toFixed(3)),C.push("P(color | "+v+"): "+L.toFixed(3)));var S=C.join("<br>"),g=YK.mostReadable(o.color,["black","white"]);return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:S,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:g,fontSize:10,idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:x,eventData:[{data:c._input,fullData:c,category:v,count:m,probability:M,categorycount:p,colorcount:k,bandcolorcount:b}]}}function tjt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Fl.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,i=n._paperdiv.node().getBoundingClientRect(),a=e.parcatsViewModel.hoveron,o=this;if(a==="color"?($Ht(o),rJ(o,"plotly_hover",Fl.event)):(JHt(o),tJ(o,"plotly_hover",Fl.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=yVe(r,i,o):a==="color"?s=ejt(r,i,o):a==="dimension"&&(s=QHt(r,i,o)),s&&Wk.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function rjt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&($K(t.pathSelection),mVe(t.dimensionSelection.selectAll("g.category")),eJ(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),Wk.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(KK),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?rJ(n,"plotly_unhover",Fl.event):tJ(n,"plotly_unhover",Fl.event)}}function ijt(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Fl.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Fl.mouse(this)[0],n=Fl.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(i){return i.displayInd}),t.model.dragY=t.y,Ex.raiseToTop(this.parentNode),Fl.select(this.parentNode).selectAll("rect.bandrect").each(function(i){i.y<n&&n<=i.y+i.height&&(e.potentialClickBand=this)}))}),e.parcatsViewModel.dragDimension=e,Wk.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function njt(e){if(e.parcatsViewModel.arrangement!=="fixed"&&(e.dragHasMoved=!0,e.dragDimensionDisplayInd!==null)){var t=e.dragDimensionDisplayInd,r=t-1,n=t+1,i=e.parcatsViewModel.dimensions[t];if(e.dragCategoryDisplayInd!==null){var a=i.categories[e.dragCategoryDisplayInd];a.model.dragY+=Fl.event.dy;var o=a.model.dragY,s=a.model.displayInd,l=i.categories,u=l[s-1],c=l[s+1];u!==void 0&&o<u.y+u.height/2&&(a.model.displayInd=u.model.displayInd,u.model.displayInd=s),c!==void 0&&o+a.height>c.y+c.height/2&&(a.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){i.model.dragX=Fl.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[n];f!==void 0&&i.model.dragX<f.x+f.width&&(i.model.displayInd=f.model.displayInd,f.model.displayInd=t),h!==void 0&&i.model.dragX+i.width>h.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}nJ(e.parcatsViewModel),iJ(e.parcatsViewModel),bVe(e.parcatsViewModel),xVe(e.parcatsViewModel)}}function ajt(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Fl.select(this).selectAll("text").attr("font-weight","normal");var t={},r=_Ve(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(h){return h.displayInd}),i=e.initialDragDimensionDisplayInds.some(function(h,d){return h!==n[d]});i&&n.forEach(function(h,d){var v=e.parcatsViewModel.model.dimensions[d].containerInd;t["dimensions["+v+"].displayindex"]=h});var a=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(h){return h.displayInd});if(a=e.initialDragCategoryDisplayInds.some(function(h,d){return h!==o[d]}),a){var s=e.model.categories.slice().sort(function(h,d){return h.displayInd-d.displayInd}),l=s.map(function(h){return h.categoryValue}),u=s.map(function(h){return h.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?rJ(e.potentialClickBand,"plotly_click",Fl.event.sourceEvent):tJ(e.potentialClickBand,"plotly_click",Fl.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,nJ(e.parcatsViewModel),iJ(e.parcatsViewModel);var f=Fl.transition().duration(300).ease("cubic-in-out");f.each(function(){bVe(e.parcatsViewModel,!0),xVe(e.parcatsViewModel,!0)}).each("end",function(){(i||a)&&GHt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function _Ve(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 xVe(e,t){t===void 0&&(t=!1);function r(n){return t?n.transition():n}e.pathSelection.data(function(n){return n.paths},g1),r(e.pathSelection).attr("d",function(n){return n.svgD})}function bVe(e,t){t===void 0&&(t=!1);function r(l){return t?l.transition():l}e.dimensionSelection.data(function(l){return l.dimensions},g1);var n=e.dimensionSelection.selectAll("g.category").data(function(l){return l.categories},g1);r(e.dimensionSelection).attr("transform",function(l){return Hk(l.x,0)}),r(n).attr("transform",function(l){return Hk(0,l.y)});var i=n.select(".dimlabel");i.text(function(l,u){return u===0?l.parcatsViewModel.model.dimensions[l.model.dimensionInd].dimensionLabel:null});var a=n.select(".catlabel");a.attr("text-anchor",function(l){return jk(l)?"start":"end"}).attr("x",function(l){return jk(l)?l.width+5:-5}).each(function(l){var u,c;jk(l)?(u=l.width+5,c="start"):(u=-5,c="end"),Fl.select(this).selectAll("tspan").attr("x",u).attr("text-anchor",c)});var o=n.selectAll("rect.bandrect").data(function(l){return l.bands},g1),s=o.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(l){return l.color}).attr("fill-opacity",0);o.attr("fill",function(l){return l.color}).attr("width",function(l){return l.width}).attr("height",function(l){return l.height}).attr("y",function(l){return l.y}),eJ(s),o.each(function(){Ex.raiseToTop(this)}),o.exit().remove()}function ojt(e,t,r){var n=r[0],i=t.margin||{l:80,r:80,t:100,b:80},a=n.trace,o=a.domain,s=t.width,l=t.height,u=Math.floor(s*(o.x[1]-o.x[0])),c=Math.floor(l*(o.y[1]-o.y[0])),f=o.x[0]*s+i.l,h=t.height-o.y[1]*t.height+i.t,d=a.line.shape,v;a.hoverinfo==="all"?v=["count","probability"]:v=(a.hoverinfo||"").split("+");var m={trace:a,key:a.uid,model:n,x:f,y:h,width:u,height:c,hoveron:a.hoveron,hoverinfoItems:v,arrangement:a.arrangement,bundlecolors:a.bundlecolors,sortpaths:a.sortpaths,labelfont:a.labelfont,categorylabelfont:a.tickfont,pathShape:d,dragDimension:null,margin:i,paths:[],dimensions:[],graphDiv:e,traceSelection:null,pathSelection:null,dimensionSelection:null};return n.dimensions&&(nJ(m),iJ(m)),m}function gVe(e,t,r,n,i){var a=[],o=[],s,l;for(l=0;l<r.length-1;l++)s=VHt(r[l]+e[l],e[l+1]),a.push(s(i)),o.push(s(1-i));var u="M "+e[0]+","+t[0];for(u+="l"+r[0]+",0 ",l=1;l<r.length;l++)u+="C"+a[l-1]+","+t[l-1]+" "+o[l-1]+","+t[l]+" "+e[l]+","+t[l],u+="l"+r[l]+",0 ";for(u+="l0,"+n+" ",u+="l -"+r[r.length-1]+",0 ",l=r.length-2;l>=0;l--)u+="C"+o[l]+","+(t[l+1]+n)+" "+a[l]+","+(t[l]+n)+" "+(e[l]+r[l])+","+(t[l]+n),u+="l-"+r[l]+",0 ";return u+="Z",u}function iJ(e){var t=e.dimensions,r=e.model,n=t.map(function(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}),l=t.map(function(q){return q.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(q){var U=q.categoryInds.map(function(Z,j){return i[j][Z]}),G=o.map(function(Z){return U[Z]});return G}u.sort(function(q,U){var G=f(q),Z=f(U);return e.sortpaths==="backward"&&(G.reverse(),Z.reverse()),G.push(q.valueInds[0]),Z.push(U.valueInds[0]),e.bundlecolors&&(G.unshift(q.rawColor),Z.unshift(U.rawColor)),G<Z?-1:G>Z?1:0});for(var h=new Array(u.length),d=t[0].model.count,v=t[0].categories.map(function(q){return q.height}).reduce(function(q,U){return q+U}),m=0;m<u.length;m++){var b=u[m],p;d>0?p=v*(b.count/d):p=0;for(var k=new Array(n.length),M=0;M<b.categoryInds.length;M++){var T=b.categoryInds[M],L=i[M][T],x=a[M];k[x]=n[x][L],n[x][L]+=p;var C=e.dimensions[x].categories[L],S=C.bands.length,g=C.bands[S-1];if(g===void 0||b.rawColor!==g.rawColor){var P=g===void 0?0:g.y+g.height;C.bands.push({key:P,color:b.color,rawColor:b.rawColor,height:p,width:C.width,count:b.count,y:P,categoryViewModel:C,parcatsViewModel:e})}else{var E=C.bands[S-1];E.height+=p,E.count+=b.count}}var z;e.pathShape==="hspline"?z=gVe(s,k,l,p,.5):z=gVe(s,k,l,p,0),h[m]={key:b.valueInds[0],model:b,height:p,leftXs:s,topYs:k,dimWidths:l,svgD:z,parcatsViewModel:e}}e.paths=h}function nJ(e){var t=e.model.dimensions.map(function(o){return{displayInd:o.displayInd,dimensionInd:o.dimensionInd}});t.sort(function(o,s){return o.displayInd-s.displayInd});var r=[];for(var n in t){var i=t[n].dimensionInd,a=e.model.dimensions[i];r.push(sjt(e,a))}e.dimensions=r}function sjt(e,t){var r=40,n=16,i=e.model.dimensions.length,a=t.displayInd,o,s,l;i>1?o=(e.width-2*r-n)/(i-1):o=0,s=r,l=s+o*a;var u=[],c=e.model.maxCats,f=t.categories.length,h=8,d=t.count,v=e.height-h*(c-1),m,b,p,k,M,T=(c-f)*h/2,L=t.categories.map(function(x){return{displayInd:x.displayInd,categoryInd:x.categoryInd}});for(L.sort(function(x,C){return x.displayInd-C.displayInd}),M=0;M<f;M++)k=L[M].categoryInd,b=t.categories[k],d>0?m=b.count/d*v:m=0,p={key:b.valueInds[0],model:b,width:n,height:m,y:b.dragY!==null?b.dragY:T,bands:[],parcatsViewModel:e},T=T+m+h,u.push(p);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var aJ=ye((Txr,AVe)=>{"use strict";var ljt=TVe();AVe.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;ljt(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 MVe=ye(Yz=>{"use strict";var ujt=Id().getModuleCalcData,cjt=aJ(),SVe="parcats";Yz.name=SVe;Yz.plot=function(e,t,r,n){var i=ujt(e.calcdata,SVe);if(i.length){var a=i[0];cjt(e,a,r,n)}};Yz.clean=function(e,t,r,n){var i=n._has&&n._has("parcats"),a=t._has&&t._has("parcats");i&&!a&&n._paperdiv.selectAll(".parcats").remove()}});var kVe=ye((Sxr,EVe)=>{"use strict";EVe.exports={attributes:ZK(),supplyDefaults:hVe(),calc:vVe(),plot:aJ(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:MVe(),categories:["noOpacity"],meta:{}}});var LVe=ye((Mxr,CVe)=>{"use strict";CVe.exports=kVe()});var m1=ye((Exr,qVe)=>{"use strict";var fjt=t_(),PVe="1.13.4",FVe='\xA9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',IVe=['\xA9 <a target="_blank" href="https://carto.com/">Carto</a>',FVe].join(" "),RVe=['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(" "),hjt=['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(" "),zVe={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:FVe,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:IVe,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:IVe,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:RVe,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:RVe,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:hjt,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"}},DVe=fjt(zVe);qVe.exports={requiredVersion:PVe,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:zVe,styleValuesNonMapbox:DVe,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@"+PVe+"."].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:",DVe.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=ye((kxr,UVe)=>{"use strict";var OVe=Pr(),BVe=ka().defaultLine,djt=Cc().attributes,vjt=ec(),pjt=pf().textposition,gjt=mc().overrideAll,mjt=vl().templatedArray,oJ=m1(),NVe=vjt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});NVe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var yjt=UVe.exports=gjt({_arrayAttrRegexps:[OVe.counterRegex("mapbox",".layers",!0)],domain:djt({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:oJ.styleValuesMapbox.concat(oJ.styleValuesNonMapbox),dflt:oJ.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:mjt("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:BVe},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:BVe}},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:NVe,textposition:OVe.extendFlat({},pjt,{arrayOk:!1})}})},"plot","from-root");yjt.uirevision={valType:"any",editType:"none"}});var Kz=ye((Cxr,jVe)=>{"use strict";var{hovertemplateAttrs:_jt,texttemplateAttrs:xjt,templatefallbackAttrs:VVe}=Ll(),bjt=Pg(),Yk=ew(),E5=pf(),GVe=Zk(),wjt=Gl(),Tjt=Tu(),hw=Ao().extendFlat,Ajt=mc().overrideAll,Sjt=Zk(),HVe=Yk.line,k5=Yk.marker;jVe.exports=Ajt({lon:Yk.lon,lat:Yk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:hw({},Sjt.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:hw({},k5.opacity,{dflt:1})},mode:hw({},E5.mode,{dflt:"markers"}),text:hw({},E5.text,{}),texttemplate:xjt({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:VVe({editType:"plot"}),hovertext:hw({},E5.hovertext,{}),line:{color:HVe.color,width:HVe.width},connectgaps:E5.connectgaps,marker:hw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:k5.opacity,size:k5.size,sizeref:k5.sizeref,sizemin:k5.sizemin,sizemode:k5.sizemode},Tjt("marker")),fill:Yk.fill,fillcolor:bjt(),textfont:GVe.layers.symbol.textfont,textposition:GVe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:E5.selected.marker},unselected:{marker:E5.unselected.marker},hoverinfo:hw({},wjt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:_jt(),hovertemplatefallback:VVe()},"calc","nested")});var sJ=ye((Lxr,WVe)=>{"use strict";var Mjt=["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"];WVe.exports={isSupportedFont:function(e){return Mjt.indexOf(e)!==-1}}});var YVe=ye((Pxr,ZVe)=>{"use strict";var Kk=Pr(),lJ=Ru(),Ejt=$p(),kjt=D0(),Cjt=F0(),Ljt=Fg(),XVe=Kz(),Pjt=sJ().isSupportedFont;ZVe.exports=function(t,r,n,i){function a(p,k){return Kk.coerce(t,r,XVe,p,k)}function o(p,k){return Kk.coerce2(t,r,XVe,p,k)}var s=Ijt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),a("below"),lJ.hasMarkers(r)){Ejt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(Kk.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),Kk.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}lJ.hasLines(r)&&(kjt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,m=a("cluster.enabled",v);if(m||lJ.hasText(r)){var b=i.font.family;Cjt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:Pjt(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"&&Ljt(t,r,n,a),Kk.coerceSelectionMarkerOpacity(r,a)};function Ijt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var uJ=ye((Ixr,JVe)=>{"use strict";var KVe=ho();JVe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=KVe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=KVe.tickText(o,o.c2l(s[1]),!0).text,i}});var cJ=ye((Rxr,QVe)=>{"use strict";var $Ve=Pr();QVe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=$Ve.isArrayOrTypedArray(r)?$Ve.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var aGe=ye((Dxr,nGe)=>{"use strict";var rGe=Eo(),av=Pr(),Rjt=fs().BADNUM,$z=cx(),eGe=tc(),Djt=So(),Fjt=O3(),Qz=Ru(),zjt=sJ().isSupportedFont,qjt=cJ(),Ojt=ip().appendArrayPointValue,Bjt=Zl().NEWLINES,Njt=Zl().BR_TAG_ALL;nGe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=Qz.hasLines(n),s=Qz.hasMarkers(n),l=Qz.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=Jz("fill"),d=Jz("line"),v=Jz("circle"),m=Jz("symbol"),b={fill:h,line:d,circle:v,symbol:m};if(!i)return b;var p;if((a||o)&&(p=$z.calcTraceToLineCoords(r)),a&&(h.geojson=$z.makePolygon(p),h.layout.visibility="visible",av.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=$z.makeLine(p),d.layout.visibility="visible",av.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var k=Ujt(r);v.geojson=k.geojson,v.layout.visibility="visible",f&&(v.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":hJ(n.cluster.color,n.cluster.step),"circle-radius":hJ(n.cluster.size,n.cluster.step),"circle-opacity":hJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":tGe(n),"text-size":12}}),av.extendFlat(v.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(m.geojson=Vjt(r,t),av.extendFlat(m.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(av.extendFlat(m.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&av.extendFlat(m.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),m.layout["icon-allow-overlap"]=n.marker.allowoverlap,av.extendFlat(m.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var M=(n.marker||{}).size,T=qjt(n.textposition,M);av.extendFlat(m.layout,{"text-size":n.textfont.size,"text-anchor":T.anchor,"text-offset":T.offset,"text-font":tGe(n)}),av.extendFlat(m.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function Jz(e){return{type:e,geojson:$z.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function Ujt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=av.isArrayOrTypedArray(r.color),a=av.isArrayOrTypedArray(r.size),o=av.isArrayOrTypedArray(r.opacity),s;function l(M){return t.opacity*M}function u(M){return M/2}var c;i&&(eGe.hasColorscale(t,"marker")?c=eGe.makeColorScaleFuncFromTrace(r):c=av.identity);var f;a&&(f=Fjt(t));var h;o&&(h=function(M){var T=rGe(M)?+av.constrain(M,0,1):0;return l(T)});var d=[];for(s=0;s<e.length;s++){var v=e[s],m=v.lonlat;if(!iGe(m)){var b={};c&&(b.mcc=v.mcc=c(v.mc)),f&&(b.mrc=v.mrc=f(v.ms)),h&&(b.mo=h(v.mo)),n&&(b.selected=v.selected||0),d.push({type:"Feature",id:s+1,geometry:{type:"Point",coordinates:m},properties:b})}}var p;if(n)for(p=Djt.makeSelectedPointStyleFns(t),s=0;s<d.length;s++){var k=d[s].properties;p.selectedOpacityFn&&(k.mo=l(p.selectedOpacityFn(k))),p.selectedColorFn&&(k.mcc=p.selectedColorFn(k)),p.selectedSizeFn&&(k.mrc=p.selectedSizeFn(k))}return{geojson:{type:"FeatureCollection",features:d},mcc:i||p&&p.selectedColorFn?{type:"identity",property:"mcc"}:r.color,mrc:a||p&&p.selectedSizeFn?{type:"identity",property:"mrc"}:u(r.size),mo:o||p&&p.selectedOpacityFn?{type:"identity",property:"mo"}:l(r.opacity)}}function Vjt(e,t){for(var r=t._fullLayout,n=e[0].trace,i=n.marker||{},a=i.symbol,o=i.angle,s=a!=="circle"?fJ(a):e7,l=o!=="auto"?fJ(o,!0):e7,u=Qz.hasText(n)?fJ(n.text):e7,c=[],f=0;f<e.length;f++){var h=e[f];if(!iGe(h.lonlat)){var d=n.texttemplate,v;if(d){var m=Array.isArray(d)?d[f]||"":d,b=n._module.formatLabels(h,n,r),p={};Ojt(p,n,h.i),v=av.texttemplateString({data:[p,h,n._meta],fallback:n.texttemplatefallback,labels:b,locale:r._d3locale,template:m})}else v=u(f);v&&(v=v.replace(Bjt,"").replace(Njt,`
|
||
`)),c.push({type:"Feature",geometry:{type:"Point",coordinates:h.lonlat},properties:{symbol:s(f),angle:l(f),text:v}})}}return{type:"FeatureCollection",features:c}}function fJ(e,t){return av.isArrayOrTypedArray(e)?t?function(r){return rGe(e[r])?+e[r]:0}:function(r){return e[r]}:e?function(){return e}:e7}function e7(){return""}function iGe(e){return e[0]===Rjt}function hJ(e,t){var r;if(av.isArrayOrTypedArray(e)&&av.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var n=1;n<e.length;n++)r.push(t[n-1],e[n])}else r=e;return r}function tGe(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"),zjt(s)||(s=r);var l=s.split(", ");return l}});var uGe=ye((Fxr,lGe)=>{"use strict";var Gjt=Pr(),oGe=aGe(),C5=m1().traceLayerPrefix,ng={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function sGe(e,t,r,n){this.type="scattermapbox",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:C5+t+"-fill",line:C5+t+"-line",circle:C5+t+"-circle",symbol:C5+t+"-symbol",cluster:C5+t+"-cluster",clusterCount:C5+t+"-cluster-count"},this.below=null}var Jk=sGe.prototype;Jk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&Gjt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};Jk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Jk.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s<o.length;s++)if(o[s].id===i){a=!0;break}a?(this.subplot.setOptions(i,"setLayoutProperty",n.layout),n.layout.visibility==="visible"&&this.subplot.setOptions(i,"setPaintProperty",n.paint)):this.subplot.addLayer(n,r)};Jk.update=function(t){var r=t[0].trace,n=this.subplot,i=n.map,a=oGe(n.gd,t),o=n.belowLookup["trace-"+this.uid],s=!!(r.cluster&&r.cluster.enabled),l=!!this.clusterEnabled,u=this;function c(M){M||u.addSource("circle",a.circle,r.cluster);for(var T=ng.cluster,L=0;L<T.length;L++){var x=T[L],C=a[x];u.addLayer(x,C,o)}}function f(M){for(var T=ng.cluster,L=T.length-1;L>=0;L--){var x=T[L];i.removeLayer(u.layerIds[x])}M||i.removeSource(u.sourceIds.circle)}function h(M){for(var T=ng.nonCluster,L=0;L<T.length;L++){var x=T[L],C=a[x];M||u.addSource(x,C),u.addLayer(x,C,o)}}function d(M){for(var T=ng.nonCluster,L=T.length-1;L>=0;L--){var x=T[L];i.removeLayer(u.layerIds[x]),M||i.removeSource(u.sourceIds[x])}}function v(M){l?f(M):d(M)}function m(M){s?c(M):h(M)}function b(){for(var M=s?ng.cluster:ng.nonCluster,T=0;T<M.length;T++){var L=M[T],x=a[L];x&&(n.setOptions(u.layerIds[L],"setLayoutProperty",x.layout),x.layout.visibility==="visible"&&(L!=="cluster"&&u.setSourceData(L,x),n.setOptions(u.layerIds[L],"setPaintProperty",x.paint)))}}var p=this.isHidden,k=r.visible!==!0;k?p||v():p?k||m():l!==s?(v(),m()):(this.below!==o&&(v(!0),m(!0)),b()),this.clusterEnabled=s,this.isHidden=k,this.below=o,t[0].trace._glTrace=this};Jk.dispose=function(){for(var t=this.subplot.map,r=this.clusterEnabled?ng.cluster:ng.nonCluster,n=r.length-1;n>=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};lGe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new sGe(t,n.uid,i,a),s=oGe(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(i)for(o.addSource("circle",s.circle,n.cluster),u=0;u<ng.cluster.length;u++)c=ng.cluster[u],f=s[c],o.addLayer(c,f,l);else for(u=0;u<ng.nonCluster.length;u++)c=ng.nonCluster[u],f=s[c],o.addSource(c,f,n.cluster),o.addLayer(c,f,l);return r[0].trace._glTrace=o,o}});var t7=ye((zxr,fGe)=>{"use strict";var Hjt=vf(),dJ=Pr(),jjt=mT(),Wjt=dJ.fillText,Xjt=fs().BADNUM,Zjt=m1().traceLayerPrefix;function Yjt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=Zjt+i.uid+"-circle",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(S){return S.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function m(S){var g=S.lonlat;if(g[0]===Xjt||c&&l.indexOf(S.i+1)===-1)return 1/0;var P=dJ.modHalf(g[0],360),E=g[1],z=s.project([P,E]),q=z.x-a.c2p([v,E]),U=z.y-o.c2p([P,r]),G=Math.max(3,S.mrc||0);return Math.max(Math.sqrt(q*q+U*U)-G,1-3/G)}if(Hjt.getClosest(n,m,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[dJ.modHalf(p[0],360)+d,p[1]],M=a.c2p(k),T=o.c2p(k),L=b.mrc||1;e.x0=M-L,e.x1=M+L,e.y0=T-L,e.y1=T+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=jjt(i,b),e.extraText=cGe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function cGe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split("+"),a=i.indexOf("all")!==-1,o=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf("text")!==-1)&&Wjt(t,e,u),u.join("<br>")}fGe.exports={hoverPoints:Yjt,getExtraText:cGe}});var dGe=ye((qxr,hGe)=>{"use strict";hGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var pGe=ye((Oxr,vGe)=>{"use strict";var Kjt=Pr(),Jjt=Ru(),$jt=fs().BADNUM;vGe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!Jjt.hasMarkers(s))return[];if(r===!1)for(l=0;l<n.length;l++)n[l].selected=0;else for(l=0;l<n.length;l++){var u=n[l],c=u.lonlat;if(c[0]!==$jt){var f=[Kjt.modHalf(c[0],360),c[1]],h=[i.c2p(f),a.c2p(f)];r.contains(h,null,l,t)?(o.push({pointNumber:l,lon:c[0],lat:c[1]}),u.selected=1):u.selected=0}}return o}});var gJ=ye((vJ,pJ)=>{(function(e,t){typeof vJ=="object"&&typeof pJ!="undefined"?pJ.exports=t():(e=e||self,e.mapboxgl=t())})(vJ,function(){"use strict";var e,t,r;function n(i,a){if(!e)e=a;else if(!t)t=a;else{var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",s={};e(s),r=a(s),typeof window!="undefined"&&(r.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}}return n(["exports"],function(i){"use strict";function a(y,_){return _={exports:{}},y(_,_.exports),_.exports}var o="1.13.4",s=l;function l(y,_,I,V){this.cx=3*y,this.bx=3*(I-y)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*_,this.by=3*(V-_)-this.cy,this.ay=1-this.cy-this.by,this.p1x=y,this.p1y=V,this.p2x=I,this.p2y=V}l.prototype.sampleCurveX=function(y){return((this.ax*y+this.bx)*y+this.cx)*y},l.prototype.sampleCurveY=function(y){return((this.ay*y+this.by)*y+this.cy)*y},l.prototype.sampleCurveDerivativeX=function(y){return(3*this.ax*y+2*this.bx)*y+this.cx},l.prototype.solveCurveX=function(y,_){typeof _=="undefined"&&(_=1e-6);var I,V,$,ae,he;for($=y,he=0;he<8;he++){if(ae=this.sampleCurveX($)-y,Math.abs(ae)<_)return $;var Fe=this.sampleCurveDerivativeX($);if(Math.abs(Fe)<1e-6)break;$=$-ae/Fe}if(I=0,V=1,$=y,$<I)return I;if($>V)return V;for(;I<V;){if(ae=this.sampleCurveX($),Math.abs(ae-y)<_)return $;y>ae?I=$:V=$,$=(V-I)*.5+I}return $},l.prototype.solve=function(y,_){return this.sampleCurveY(this.solveCurveX(y,_))};var u=c;function c(y,_){this.x=y,this.y=_}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(y){return this.clone()._add(y)},sub:function(y){return this.clone()._sub(y)},multByPoint:function(y){return this.clone()._multByPoint(y)},divByPoint:function(y){return this.clone()._divByPoint(y)},mult:function(y){return this.clone()._mult(y)},div:function(y){return this.clone()._div(y)},rotate:function(y){return this.clone()._rotate(y)},rotateAround:function(y,_){return this.clone()._rotateAround(y,_)},matMult:function(y){return this.clone()._matMult(y)},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(y){return this.x===y.x&&this.y===y.y},dist:function(y){return Math.sqrt(this.distSqr(y))},distSqr:function(y){var _=y.x-this.x,I=y.y-this.y;return _*_+I*I},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(y){return Math.atan2(this.y-y.y,this.x-y.x)},angleWith:function(y){return this.angleWithSep(y.x,y.y)},angleWithSep:function(y,_){return Math.atan2(this.x*_-this.y*y,this.x*y+this.y*_)},_matMult:function(y){var _=y[0]*this.x+y[1]*this.y,I=y[2]*this.x+y[3]*this.y;return this.x=_,this.y=I,this},_add:function(y){return this.x+=y.x,this.y+=y.y,this},_sub:function(y){return this.x-=y.x,this.y-=y.y,this},_mult:function(y){return this.x*=y,this.y*=y,this},_div:function(y){return this.x/=y,this.y/=y,this},_multByPoint:function(y){return this.x*=y.x,this.y*=y.y,this},_divByPoint:function(y){return this.x/=y.x,this.y/=y.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var y=this.y;return this.y=this.x,this.x=-y,this},_rotate:function(y){var _=Math.cos(y),I=Math.sin(y),V=_*this.x-I*this.y,$=I*this.x+_*this.y;return this.x=V,this.y=$,this},_rotateAround:function(y,_){var I=Math.cos(y),V=Math.sin(y),$=_.x+I*(this.x-_.x)-V*(this.y-_.y),ae=_.y+V*(this.x-_.x)+I*(this.y-_.y);return this.x=$,this.y=ae,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},c.convert=function(y){return y instanceof c?y:Array.isArray(y)?new c(y[0],y[1]):y};var f=typeof self!="undefined"?self:{};function h(y,_){if(Array.isArray(y)){if(!Array.isArray(_)||y.length!==_.length)return!1;for(var I=0;I<y.length;I++)if(!h(y[I],_[I]))return!1;return!0}if(typeof y=="object"&&y!==null&&_!==null){if(typeof _!="object")return!1;var V=Object.keys(y);if(V.length!==Object.keys(_).length)return!1;for(var $ in y)if(!h(y[$],_[$]))return!1;return!0}return y===_}var d=Math.pow(2,53)-1;function v(y){if(y<=0)return 0;if(y>=1)return 1;var _=y*y,I=_*y;return 4*(y<.5?I:3*(y-_)+I-.75)}function m(y,_,I,V){var $=new s(y,_,I,V);return function(ae){return $.solve(ae)}}var b=m(.25,.1,.25,1);function p(y,_,I){return Math.min(I,Math.max(_,y))}function k(y,_,I){var V=I-_,$=((y-_)%V+V)%V+_;return $===_?I:$}function M(y,_,I){if(!y.length)return I(null,[]);var V=y.length,$=new Array(y.length),ae=null;y.forEach(function(he,Fe){_(he,function(it,yt){it&&(ae=it),$[Fe]=yt,--V===0&&I(ae,$)})})}function T(y){var _=[];for(var I in y)_.push(y[I]);return _}function L(y,_){var I=[];for(var V in y)V in _||I.push(V);return I}function x(y){for(var _=[],I=arguments.length-1;I-- >0;)_[I]=arguments[I+1];for(var V=0,$=_;V<$.length;V+=1){var ae=$[V];for(var he in ae)y[he]=ae[he]}return y}function C(y,_){for(var I={},V=0;V<_.length;V++){var $=_[V];$ in y&&(I[$]=y[$])}return I}var S=1;function g(){return S++}function P(){function y(_){return _?(_^Math.random()*16>>_/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,y)}return y()}function E(y){return y<=1?1:Math.pow(2,Math.ceil(Math.log(y)/Math.LN2))}function z(y){return y?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(y):!1}function q(y,_){y.forEach(function(I){_[I]&&(_[I]=_[I].bind(_))})}function U(y,_){return y.indexOf(_,y.length-_.length)!==-1}function G(y,_,I){var V={};for(var $ in y)V[$]=_.call(I||this,y[$],$,y);return V}function Z(y,_,I){var V={};for(var $ in y)_.call(I||this,y[$],$,y)&&(V[$]=y[$]);return V}function j(y){return Array.isArray(y)?y.map(j):typeof y=="object"&&y?G(y,j):y}function N(y,_){for(var I=0;I<y.length;I++)if(_.indexOf(y[I])>=0)return!0;return!1}var H={};function re(y){H[y]||(typeof console!="undefined"&&console.warn(y),H[y]=!0)}function oe(y,_,I){return(I.y-y.y)*(_.x-y.x)>(_.y-y.y)*(I.x-y.x)}function _e(y){for(var _=0,I=0,V=y.length,$=V-1,ae=void 0,he=void 0;I<V;$=I++)ae=y[I],he=y[$],_+=(he.x-ae.x)*(ae.y+he.y);return _}function ke(y){var _=y[0],I=y[1],V=y[2];return I+=90,I*=Math.PI/180,V*=Math.PI/180,{x:_*Math.cos(I)*Math.sin(V),y:_*Math.sin(I)*Math.sin(V),z:_*Math.cos(V)}}function Ce(){return typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope}function ge(y){var _=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,I={};if(y.replace(_,function($,ae,he,Fe){var it=he||Fe;return I[ae]=it?it.toLowerCase():!0,""}),I["max-age"]){var V=parseInt(I["max-age"],10);isNaN(V)?delete I["max-age"]:I["max-age"]=V}return I}var ie=null;function Se(y){if(ie==null){var _=y.navigator?y.navigator.userAgent:null;ie=!!y.safari||!!(_&&(/\b(iPad|iPhone|iPod)\b/.test(_)||_.match("Safari")&&!_.match("Chrome")))}return ie}function Ee(y){try{var _=f[y];return _.setItem("_mapbox_test_",1),_.removeItem("_mapbox_test_"),!0}catch(I){return!1}}function we(y){return f.btoa(encodeURIComponent(y).replace(/%([0-9A-F]{2})/g,function(_,I){return String.fromCharCode(+("0x"+I))}))}function De(y){return decodeURIComponent(f.atob(y).split("").map(function(_){return"%"+("00"+_.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var Le=f.performance&&f.performance.now?f.performance.now.bind(f.performance):Date.now.bind(Date),me=f.requestAnimationFrame||f.mozRequestAnimationFrame||f.webkitRequestAnimationFrame||f.msRequestAnimationFrame,Pe=f.cancelAnimationFrame||f.mozCancelAnimationFrame||f.webkitCancelAnimationFrame||f.msCancelAnimationFrame,ce,He,lt={now:Le,frame:function(_){var I=me(_);return{cancel:function(){return Pe(I)}}},getImageData:function(_,I){I===void 0&&(I=0);var V=f.document.createElement("canvas"),$=V.getContext("2d");if(!$)throw new Error("failed to create canvas 2d context");return V.width=_.width,V.height=_.height,$.drawImage(_,0,0,_.width,_.height),$.getImageData(-I,-I,_.width+2*I,_.height+2*I)},resolveURL:function(_){return ce||(ce=f.document.createElement("a")),ce.href=_,ce.href},hardwareConcurrency:f.navigator&&f.navigator.hardwareConcurrency||4,get devicePixelRatio(){return f.devicePixelRatio},get prefersReducedMotion(){return f.matchMedia?(He==null&&(He=f.matchMedia("(prefers-reduced-motion: reduce)")),He.matches):!1}},mt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Vt={supported:!1,testSupport:nr},st,ct=!1,Qt,Ht=!1;f.document&&(Qt=f.document.createElement("img"),Qt.onload=function(){st&&tt(st),st=null,Ht=!0},Qt.onerror=function(){ct=!0,st=null},Qt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function nr(y){ct||!Qt||(Ht?tt(y):st=y)}function tt(y){var _=y.createTexture();y.bindTexture(y.TEXTURE_2D,_);try{if(y.texImage2D(y.TEXTURE_2D,0,y.RGBA,y.RGBA,y.UNSIGNED_BYTE,Qt),y.isContextLost())return;Vt.supported=!0}catch(I){}y.deleteTexture(_),ct=!0}var je="01";function Ue(){for(var y="1",_="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",I="",V=0;V<10;V++)I+=_[Math.floor(Math.random()*62)];var $=12*60*60*1e3,ae=[y,je,I].join(""),he=Date.now()+$;return{token:ae,tokenExpiresAt:he}}var Ae=function(_,I){this._transformRequestFn=_,this._customAccessToken=I,this._createSkuToken()};Ae.prototype._createSkuToken=function(){var _=Ue();this._skuToken=_.token,this._skuTokenExpiresAt=_.tokenExpiresAt},Ae.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ae.prototype.transformRequest=function(_,I){return this._transformRequestFn?this._transformRequestFn(_,I)||{url:_}:{url:_}},Ae.prototype.normalizeStyleURL=function(_,I){if(!rt(_))return _;var V=Xt(_);return V.path="/styles/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||I)},Ae.prototype.normalizeGlyphsURL=function(_,I){if(!rt(_))return _;var V=Xt(_);return V.path="/fonts/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||I)},Ae.prototype.normalizeSourceURL=function(_,I){if(!rt(_))return _;var V=Xt(_);return V.path="/v4/"+V.authority+".json",V.params.push("secure"),this._makeAPIURL(V,this._customAccessToken||I)},Ae.prototype.normalizeSpriteURL=function(_,I,V,$){var ae=Xt(_);return rt(_)?(ae.path="/styles/v1"+ae.path+"/sprite"+I+V,this._makeAPIURL(ae,this._customAccessToken||$)):(ae.path+=""+I+V,or(ae))},Ae.prototype.normalizeTileURL=function(_,I){if(this._isSkuTokenExpired()&&this._createSkuToken(),_&&!rt(_))return _;var V=Xt(_),$=/(\.(png|jpg)\d*)(?=$)/,ae=/^.+\/v4\//,he=lt.devicePixelRatio>=2||I===512?"@2x":"",Fe=Vt.supported?".webp":"$1";V.path=V.path.replace($,""+he+Fe),V.path=V.path.replace(ae,"/"),V.path="/v4"+V.path;var it=this._customAccessToken||Et(V.params)||mt.ACCESS_TOKEN;return mt.REQUIRE_ACCESS_TOKEN&&it&&this._skuToken&&V.params.push("sku="+this._skuToken),this._makeAPIURL(V,it)},Ae.prototype.canonicalizeTileURL=function(_,I){var V="/v4/",$=/\.[\w]+$/,ae=Xt(_);if(!ae.path.match(/(^\/v4\/)/)||!ae.path.match($))return _;var he="mapbox://tiles/";he+=ae.path.replace(V,"");var Fe=ae.params;return I&&(Fe=Fe.filter(function(it){return!it.match(/^access_token=/)})),Fe.length&&(he+="?"+Fe.join("&")),he},Ae.prototype.canonicalizeTileset=function(_,I){for(var V=I?rt(I):!1,$=[],ae=0,he=_.tiles||[];ae<he.length;ae+=1){var Fe=he[ae];Tt(Fe)?$.push(this.canonicalizeTileURL(Fe,V)):$.push(Fe)}return $},Ae.prototype._makeAPIURL=function(_,I){var V="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",$=Xt(mt.API_URL);if(_.protocol=$.protocol,_.authority=$.authority,_.protocol==="http"){var ae=_.params.indexOf("secure");ae>=0&&_.params.splice(ae,1)}if($.path!=="/"&&(_.path=""+$.path+_.path),!mt.REQUIRE_ACCESS_TOKEN)return or(_);if(I=I||mt.ACCESS_TOKEN,!I)throw new Error("An API access token is required to use Mapbox GL. "+V);if(I[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+V);return _.params=_.params.filter(function(he){return he.indexOf("access_token")===-1}),_.params.push("access_token="+I),or(_)};function rt(y){return y.indexOf("mapbox:")===0}var St=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Tt(y){return St.test(y)}function dt(y){return y.indexOf("sku=")>0&&Tt(y)}function Et(y){for(var _=0,I=y;_<I.length;_+=1){var V=I[_],$=V.match(/^access_token=(.*)$/);if($)return $[1]}return null}var pt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Xt(y){var _=y.match(pt);if(!_)throw new Error("Unable to parse URL object");return{protocol:_[1],authority:_[2],path:_[3]||"/",params:_[4]?_[4].split("&"):[]}}function or(y){var _=y.params.length?"?"+y.params.join("&"):"";return y.protocol+"://"+y.authority+y.path+_}var _r="mapbox.eventData";function Er(y){if(!y)return null;var _=y.split(".");if(!_||_.length!==3)return null;try{var I=JSON.parse(De(_[1]));return I}catch(V){return null}}var ei=function(_){this.type=_,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};ei.prototype.getStorageKey=function(_){var I=Er(mt.ACCESS_TOKEN),V="";return I&&I.u?V=we(I.u):V=mt.ACCESS_TOKEN||"",_?_r+"."+_+":"+V:_r+":"+V},ei.prototype.fetchEventData=function(){var _=Ee("localStorage"),I=this.getStorageKey(),V=this.getStorageKey("uuid");if(_)try{var $=f.localStorage.getItem(I);$&&(this.eventData=JSON.parse($));var ae=f.localStorage.getItem(V);ae&&(this.anonId=ae)}catch(he){re("Unable to read from LocalStorage")}},ei.prototype.saveEventData=function(){var _=Ee("localStorage"),I=this.getStorageKey(),V=this.getStorageKey("uuid");if(_)try{f.localStorage.setItem(V,this.anonId),Object.keys(this.eventData).length>=1&&f.localStorage.setItem(I,JSON.stringify(this.eventData))}catch($){re("Unable to write to LocalStorage")}},ei.prototype.processRequests=function(_){},ei.prototype.postEvent=function(_,I,V,$){var ae=this;if(mt.EVENTS_URL){var he=Xt(mt.EVENTS_URL);he.params.push("access_token="+($||mt.ACCESS_TOKEN||""));var Fe={event:this.type,created:new Date(_).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:o,skuId:je,userId:this.anonId},it=I?x(Fe,I):Fe,yt={url:or(he),headers:{"Content-Type":"text/plain"},body:JSON.stringify([it])};this.pendingRequest=$r(yt,function(Lt){ae.pendingRequest=null,V(Lt),ae.saveEventData(),ae.processRequests($)})}},ei.prototype.queueRequest=function(_,I){this.queue.push(_),this.processRequests(I)};var qr=function(y){function _(){y.call(this,"map.load"),this.success={},this.skuToken=""}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.postMapLoadEvent=function(V,$,ae,he){this.skuToken=ae,(mt.EVENTS_URL&&he||mt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(Fe){return rt(Fe)||Tt(Fe)}))&&this.queueRequest({id:$,timestamp:Date.now()},he)},_.prototype.processRequests=function(V){var $=this;if(!(this.pendingRequest||this.queue.length===0)){var ae=this.queue.shift(),he=ae.id,Fe=ae.timestamp;he&&this.success[he]||(this.anonId||this.fetchEventData(),z(this.anonId)||(this.anonId=P()),this.postEvent(Fe,{skuToken:this.skuToken},function(it){it||he&&($.success[he]=!0)},V))}},_}(ei),jr=function(y){function _(I){y.call(this,"appUserTurnstile"),this._customAccessToken=I}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.postTurnstileEvent=function(V,$){mt.EVENTS_URL&&mt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(ae){return rt(ae)||Tt(ae)})&&this.queueRequest(Date.now(),$)},_.prototype.processRequests=function(V){var $=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ae=Er(mt.ACCESS_TOKEN),he=ae?ae.u:mt.ACCESS_TOKEN,Fe=he!==this.eventData.tokenU;z(this.anonId)||(this.anonId=P(),Fe=!0);var it=this.queue.shift();if(this.eventData.lastSuccess){var yt=new Date(this.eventData.lastSuccess),Lt=new Date(it),sr=(it-this.eventData.lastSuccess)/(24*60*60*1e3);Fe=Fe||sr>=1||sr<-1||yt.getDate()!==Lt.getDate()}else Fe=!0;if(!Fe)return this.processRequests();this.postEvent(it,{"enabled.telemetry":!1},function(gr){gr||($.eventData.lastSuccess=it,$.eventData.tokenU=he)},V)}},_}(ei),gt=new jr,Ge=gt.postTurnstileEvent.bind(gt),Je=new qr,We=Je.postMapLoadEvent.bind(Je),et="mapbox-tiles",xt=500,At=50,Kt=1e3*60*7,er;function Sr(){f.caches&&!er&&(er=f.caches.open(et))}var Gr;function Ir(y,_){if(Gr===void 0)try{new Response(new ReadableStream),Gr=!0}catch(I){Gr=!1}Gr?_(y.body):y.blob().then(_)}function Yr(y,_,I){if(Sr(),!!er){var V={status:_.status,statusText:_.statusText,headers:new f.Headers};_.headers.forEach(function(he,Fe){return V.headers.set(Fe,he)});var $=ge(_.headers.get("Cache-Control")||"");if(!$["no-store"]){$["max-age"]&&V.headers.set("Expires",new Date(I+$["max-age"]*1e3).toUTCString());var ae=new Date(V.headers.get("Expires")).getTime()-I;ae<Kt||Ir(_,function(he){var Fe=new f.Response(he,V);Sr(),er&&er.then(function(it){return it.put(_i(y.url),Fe)}).catch(function(it){return re(it.message)})})}}}function _i(y){var _=y.indexOf("?");return _<0?y:y.slice(0,_)}function Pi(y,_){if(Sr(),!er)return _(null);var I=_i(y.url);er.then(function(V){V.match(I).then(function($){var ae=ai($);V.delete(I),ae&&V.put(I,$.clone()),_(null,$,ae)}).catch(_)}).catch(_)}function ai(y){if(!y)return!1;var _=new Date(y.headers.get("Expires")||0),I=ge(y.headers.get("Cache-Control")||"");return _>Date.now()&&!I["no-cache"]}var mi=1/0;function un(y){mi++,mi>At&&(y.getActor().send("enforceCacheSizeLimit",xt),mi=0)}function Fn(y){Sr(),er&&er.then(function(_){_.keys().then(function(I){for(var V=0;V<I.length-y;V++)_.delete(I[V])})})}function An(y){var _=f.caches.delete(et);y&&_.catch(y).then(function(){return y()})}function Hn(y,_){xt=y,At=_}var Qn;function Vi(){return Qn==null&&(Qn=f.OffscreenCanvas&&new f.OffscreenCanvas(1,1).getContext("2d")&&typeof f.createImageBitmap=="function"),Qn}var Kn={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Kn);var Jn=function(y){function _(I,V,$){V===401&&Tt($)&&(I+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),y.call(this,I),this.status=V,this.url=$,this.name=this.constructor.name,this.message=I}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},_}(Error),Gt=Ce()?function(){return self.worker&&self.worker.referrer}:function(){return(f.location.protocol==="blob:"?f.parent:f).location.href},wt=function(y){return/^file:/.test(y)||/^file:/.test(Gt())&&!/^\w+:/.test(y)};function rr(y,_){var I=new f.AbortController,V=new f.Request(y.url,{method:y.method||"GET",body:y.body,credentials:y.credentials,headers:y.headers,referrer:Gt(),signal:I.signal}),$=!1,ae=!1,he=dt(V.url);y.type==="json"&&V.headers.set("Accept","application/json");var Fe=function(yt,Lt,sr){if(!ae){if(yt&&yt.message!=="SecurityError"&&re(yt),Lt&&sr)return it(Lt);var gr=Date.now();f.fetch(V).then(function(hr){if(hr.ok){var Rr=he?hr.clone():null;return it(hr,Rr,gr)}else return _(new Jn(hr.statusText,hr.status,y.url))}).catch(function(hr){hr.code!==20&&_(new Error(hr.message))})}},it=function(yt,Lt,sr){(y.type==="arrayBuffer"?yt.arrayBuffer():y.type==="json"?yt.json():yt.text()).then(function(gr){ae||(Lt&&sr&&Yr(V,Lt,sr),$=!0,_(null,gr,yt.headers.get("Cache-Control"),yt.headers.get("Expires")))}).catch(function(gr){ae||_(new Error(gr.message))})};return he?Pi(V,Fe):Fe(null,null),{cancel:function(){ae=!0,$||I.abort()}}}function ir(y,_){var I=new f.XMLHttpRequest;I.open(y.method||"GET",y.url,!0),y.type==="arrayBuffer"&&(I.responseType="arraybuffer");for(var V in y.headers)I.setRequestHeader(V,y.headers[V]);return y.type==="json"&&(I.responseType="text",I.setRequestHeader("Accept","application/json")),I.withCredentials=y.credentials==="include",I.onerror=function(){_(new Error(I.statusText))},I.onload=function(){if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){var $=I.response;if(y.type==="json")try{$=JSON.parse(I.response)}catch(ae){return _(ae)}_(null,$,I.getResponseHeader("Cache-Control"),I.getResponseHeader("Expires"))}else _(new Jn(I.statusText,I.status,y.url))},I.send(y.body),{cancel:function(){return I.abort()}}}var wr=function(y,_){if(!wt(y.url)){if(f.fetch&&f.Request&&f.AbortController&&f.Request.prototype.hasOwnProperty("signal"))return rr(y,_);if(Ce()&&self.worker&&self.worker.actor){var I=!0;return self.worker.actor.send("getResource",y,_,void 0,I)}}return ir(y,_)},Xr=function(y,_){return wr(x(y,{type:"json"}),_)},ti=function(y,_){return wr(x(y,{type:"arrayBuffer"}),_)},$r=function(y,_){return wr(x(y,{method:"POST"}),_)};function Ri(y){var _=f.document.createElement("a");return _.href=y,_.protocol===f.document.location.protocol&&_.host===f.document.location.host}var Zi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function en(y,_,I,V){var $=new f.Image,ae=f.URL;$.onload=function(){_(null,$),ae.revokeObjectURL($.src),$.onload=null,f.requestAnimationFrame(function(){$.src=Zi})},$.onerror=function(){return _(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var he=new f.Blob([new Uint8Array(y)],{type:"image/png"});$.cacheControl=I,$.expires=V,$.src=y.byteLength?ae.createObjectURL(he):Zi}function fn(y,_){var I=new f.Blob([new Uint8Array(y)],{type:"image/png"});f.createImageBitmap(I).then(function(V){_(null,V)}).catch(function(V){_(new Error("Could not load image because of "+V.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var yn,Mn,Ba=function(){yn=[],Mn=0};Ba();var ua=function(y,_){if(Vt.supported&&(y.headers||(y.headers={}),y.headers.accept="image/webp,*/*"),Mn>=mt.MAX_PARALLEL_IMAGE_REQUESTS){var I={requestParameters:y,callback:_,cancelled:!1,cancel:function(){this.cancelled=!0}};return yn.push(I),I}Mn++;var V=!1,$=function(){if(!V)for(V=!0,Mn--;yn.length&&Mn<mt.MAX_PARALLEL_IMAGE_REQUESTS;){var he=yn.shift(),Fe=he.requestParameters,it=he.callback,yt=he.cancelled;yt||(he.cancel=ua(Fe,it).cancel)}},ae=ti(y,function(he,Fe,it,yt){$(),he?_(he):Fe&&(Vi()?fn(Fe,_):en(Fe,_,it,yt))});return{cancel:function(){ae.cancel(),$()}}},ma=function(y,_){var I=f.document.createElement("video");I.muted=!0,I.onloadstart=function(){_(null,I)};for(var V=0;V<y.length;V++){var $=f.document.createElement("source");Ri(y[V])||(I.crossOrigin="Anonymous"),$.src=y[V],I.appendChild($)}return{cancel:function(){}}};function Wa(y,_,I){var V=I[y]&&I[y].indexOf(_)!==-1;V||(I[y]=I[y]||[],I[y].push(_))}function Fa(y,_,I){if(I&&I[y]){var V=I[y].indexOf(_);V!==-1&&I[y].splice(V,1)}}var Xo=function(_,I){I===void 0&&(I={}),x(this,I),this.type=_},da=function(y){function _(I,V){V===void 0&&(V={}),y.call(this,"error",x({error:I},V))}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_}(Xo),jn=function(){};jn.prototype.on=function(_,I){return this._listeners=this._listeners||{},Wa(_,I,this._listeners),this},jn.prototype.off=function(_,I){return Fa(_,I,this._listeners),Fa(_,I,this._oneTimeListeners),this},jn.prototype.once=function(_,I){return this._oneTimeListeners=this._oneTimeListeners||{},Wa(_,I,this._oneTimeListeners),this},jn.prototype.fire=function(_,I){typeof _=="string"&&(_=new Xo(_,I||{}));var V=_.type;if(this.listens(V)){_.target=this;for(var $=this._listeners&&this._listeners[V]?this._listeners[V].slice():[],ae=0,he=$;ae<he.length;ae+=1){var Fe=he[ae];Fe.call(this,_)}for(var it=this._oneTimeListeners&&this._oneTimeListeners[V]?this._oneTimeListeners[V].slice():[],yt=0,Lt=it;yt<Lt.length;yt+=1){var sr=Lt[yt];Fa(V,sr,this._oneTimeListeners),sr.call(this,_)}var gr=this._eventedParent;gr&&(x(_,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),gr.fire(_))}else _ instanceof da&&console.error(_.error);return this},jn.prototype.listens=function(_){return this._listeners&&this._listeners[_]&&this._listeners[_].length>0||this._oneTimeListeners&&this._oneTimeListeners[_]&&this._oneTimeListeners[_].length>0||this._eventedParent&&this._eventedParent.listens(_)},jn.prototype.setEventedParent=function(_,I){return this._eventedParent=_,this._eventedParentData=I,this};var Ha=8,vo={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},Gn={"*":{type:"source"}},Ct=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Ar={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Jr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},hi={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},hn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Sn={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"}}},En={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"}}},ki={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},_n=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],ya={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ea={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ma={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_o={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},No={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},po={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Lo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ko={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ds={type:"array",value:"*"},Fs={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},ll={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},ul={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},zl={type:"array",value:"*",minimum:1},us={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},il=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],As={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},cl={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Ks={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},zs={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Io={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},ls={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Yl={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Su={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},nc={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},bs={"*":{type:"string"}},Rn={$version:Ha,$root:vo,sources:Gn,source:Ct,source_vector:Ar,source_raster:Jr,source_raster_dem:hi,source_geojson:hn,source_video:Sn,source_image:En,layer:ki,layout:_n,layout_background:ya,layout_fill:ea,layout_circle:Ma,layout_heatmap:_o,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:No,layout_symbol:po,layout_raster:Lo,layout_hillshade:ko,filter:Ds,filter_operator:Fs,geometry_type:ll,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:ul,expression:zl,light:us,paint:il,paint_fill:As,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:cl,paint_circle:Ks,paint_heatmap:zs,paint_symbol:Io,paint_raster:ls,paint_hillshade:Yl,paint_background:Su,transition:nc,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:bs},_a=function(_,I,V,$){this.message=(_?_+": ":"")+V,$&&(this.identifier=$),I!=null&&I.__line__&&(this.line=I.__line__)};function Vu(y){var _=y.key,I=y.value;return I?[new _a(_,I,"constants have been deprecated as of v8")]:[]}function ql(y){for(var _=[],I=arguments.length-1;I-- >0;)_[I]=arguments[I+1];for(var V=0,$=_;V<$.length;V+=1){var ae=$[V];for(var he in ae)y[he]=ae[he]}return y}function xo(y){return y instanceof Number||y instanceof String||y instanceof Boolean?y.valueOf():y}function Kl(y){if(Array.isArray(y))return y.map(Kl);if(y instanceof Object&&!(y instanceof Number||y instanceof String||y instanceof Boolean)){var _={};for(var I in y)_[I]=Kl(y[I]);return _}return xo(y)}var Ns=function(y){function _(I,V){y.call(this,V),this.message=V,this.key=I}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_}(Error),Hl=function(_,I){I===void 0&&(I=[]),this.parent=_,this.bindings={};for(var V=0,$=I;V<$.length;V+=1){var ae=$[V],he=ae[0],Fe=ae[1];this.bindings[he]=Fe}};Hl.prototype.concat=function(_){return new Hl(this,_)},Hl.prototype.get=function(_){if(this.bindings[_])return this.bindings[_];if(this.parent)return this.parent.get(_);throw new Error(_+" not found in scope.")},Hl.prototype.has=function(_){return this.bindings[_]?!0:this.parent?this.parent.has(_):!1};var ac={kind:"null"},oa={kind:"number"},qo={kind:"string"},Oo={kind:"boolean"},Ol={kind:"color"},Pc={kind:"object"},Do={kind:"value"},rf={kind:"error"},Vf={kind:"collator"},pl={kind:"formatted"},Zc={kind:"resolvedImage"};function Jl(y,_){return{kind:"array",itemType:y,N:_}}function qs(y){if(y.kind==="array"){var _=qs(y.itemType);return typeof y.N=="number"?"array<"+_+", "+y.N+">":y.itemType.kind==="value"?"array":"array<"+_+">"}else return y.kind}var yu=[ac,oa,qo,Oo,Ol,pl,Pc,Jl(Do),Zc];function oc(y,_){if(_.kind==="error")return null;if(y.kind==="array"){if(_.kind==="array"&&(_.N===0&&_.itemType.kind==="value"||!oc(y.itemType,_.itemType))&&(typeof y.N!="number"||y.N===_.N))return null}else{if(y.kind===_.kind)return null;if(y.kind==="value")for(var I=0,V=yu;I<V.length;I+=1){var $=V[I];if(!oc($,_))return null}}return"Expected "+qs(y)+" but found "+qs(_)+" instead."}function Cf(y,_){return _.some(function(I){return I.kind===y.kind})}function sc(y,_){return _.some(function(I){return I==="null"?y===null:I==="array"?Array.isArray(y):I==="object"?y&&!Array.isArray(y)&&typeof y=="object":I===typeof y})}var jh=a(function(y,_){var I={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function V(yt){return yt=Math.round(yt),yt<0?0:yt>255?255:yt}function $(yt){return yt<0?0:yt>1?1:yt}function ae(yt){return yt[yt.length-1]==="%"?V(parseFloat(yt)/100*255):V(parseInt(yt))}function he(yt){return yt[yt.length-1]==="%"?$(parseFloat(yt)/100):$(parseFloat(yt))}function Fe(yt,Lt,sr){return sr<0?sr+=1:sr>1&&(sr-=1),sr*6<1?yt+(Lt-yt)*sr*6:sr*2<1?Lt:sr*3<2?yt+(Lt-yt)*(2/3-sr)*6:yt}function it(yt){var Lt=yt.replace(/ /g,"").toLowerCase();if(Lt in I)return I[Lt].slice();if(Lt[0]==="#"){if(Lt.length===4){var sr=parseInt(Lt.substr(1),16);return sr>=0&&sr<=4095?[(sr&3840)>>4|(sr&3840)>>8,sr&240|(sr&240)>>4,sr&15|(sr&15)<<4,1]:null}else if(Lt.length===7){var sr=parseInt(Lt.substr(1),16);return sr>=0&&sr<=16777215?[(sr&16711680)>>16,(sr&65280)>>8,sr&255,1]:null}return null}var gr=Lt.indexOf("("),hr=Lt.indexOf(")");if(gr!==-1&&hr+1===Lt.length){var Rr=Lt.substr(0,gr),ni=Lt.substr(gr+1,hr-(gr+1)).split(","),Hi=1;switch(Rr){case"rgba":if(ni.length!==4)return null;Hi=he(ni.pop());case"rgb":return ni.length!==3?null:[ae(ni[0]),ae(ni[1]),ae(ni[2]),Hi];case"hsla":if(ni.length!==4)return null;Hi=he(ni.pop());case"hsl":if(ni.length!==3)return null;var wi=(parseFloat(ni[0])%360+360)%360/360,bn=he(ni[1]),rn=he(ni[2]),xn=rn<=.5?rn*(bn+1):rn+bn-rn*bn,In=rn*2-xn;return[V(Fe(In,xn,wi+1/3)*255),V(Fe(In,xn,wi)*255),V(Fe(In,xn,wi-1/3)*255),Hi];default:return null}}return null}try{_.parseCSSColor=it}catch(yt){}}),Lf=jh.parseCSSColor,cs=function(_,I,V,$){$===void 0&&($=1),this.r=_,this.g=I,this.b=V,this.a=$};cs.parse=function(_){if(_){if(_ instanceof cs)return _;if(typeof _=="string"){var I=Lf(_);if(I)return new cs(I[0]/255*I[3],I[1]/255*I[3],I[2]/255*I[3],I[3])}}},cs.prototype.toString=function(){var _=this.toArray(),I=_[0],V=_[1],$=_[2],ae=_[3];return"rgba("+Math.round(I)+","+Math.round(V)+","+Math.round($)+","+ae+")"},cs.prototype.toArray=function(){var _=this,I=_.r,V=_.g,$=_.b,ae=_.a;return ae===0?[0,0,0,0]:[I*255/ae,V*255/ae,$*255/ae,ae]},cs.black=new cs(0,0,0,1),cs.white=new cs(1,1,1,1),cs.transparent=new cs(0,0,0,0),cs.red=new cs(1,0,0,1);var nf=function(_,I,V){_?this.sensitivity=I?"variant":"case":this.sensitivity=I?"accent":"base",this.locale=V,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};nf.prototype.compare=function(_,I){return this.collator.compare(_,I)},nf.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Gf=function(_,I,V,$,ae){this.text=_,this.image=I,this.scale=V,this.fontStack=$,this.textColor=ae},$l=function(_){this.sections=_};$l.fromString=function(_){return new $l([new Gf(_,null,null,null,null)])},$l.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(_){return _.text.length!==0||_.image&&_.image.name.length!==0})},$l.factory=function(_){return _ instanceof $l?_:$l.fromString(_)},$l.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(_){return _.text}).join("")},$l.prototype.serialize=function(){for(var _=["format"],I=0,V=this.sections;I<V.length;I+=1){var $=V[I];if($.image){_.push(["image",$.image.name]);continue}_.push($.text);var ae={};$.fontStack&&(ae["text-font"]=["literal",$.fontStack.split(",")]),$.scale&&(ae["font-scale"]=$.scale),$.textColor&&(ae["text-color"]=["rgba"].concat($.textColor.toArray())),_.push(ae)}return _};var fl=function(_){this.name=_.name,this.available=_.available};fl.prototype.toString=function(){return this.name},fl.fromString=function(_){return _?new fl({name:_,available:!1}):null},fl.prototype.serialize=function(){return["image",this.name]};function lc(y,_,I,V){if(!(typeof y=="number"&&y>=0&&y<=255&&typeof _=="number"&&_>=0&&_<=255&&typeof I=="number"&&I>=0&&I<=255)){var $=typeof V=="number"?[y,_,I,V]:[y,_,I];return"Invalid rgba value ["+$.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof V=="undefined"||typeof V=="number"&&V>=0&&V<=1?null:"Invalid rgba value ["+[y,_,I,V].join(", ")+"]: 'a' must be between 0 and 1."}function Fu(y){if(y===null)return!0;if(typeof y=="string")return!0;if(typeof y=="boolean")return!0;if(typeof y=="number")return!0;if(y instanceof cs)return!0;if(y instanceof nf)return!0;if(y instanceof $l)return!0;if(y instanceof fl)return!0;if(Array.isArray(y)){for(var _=0,I=y;_<I.length;_+=1){var V=I[_];if(!Fu(V))return!1}return!0}else if(typeof y=="object"){for(var $ in y)if(!Fu(y[$]))return!1;return!0}else return!1}function Es(y){if(y===null)return ac;if(typeof y=="string")return qo;if(typeof y=="boolean")return Oo;if(typeof y=="number")return oa;if(y instanceof cs)return Ol;if(y instanceof nf)return Vf;if(y instanceof $l)return pl;if(y instanceof fl)return Zc;if(Array.isArray(y)){for(var _=y.length,I,V=0,$=y;V<$.length;V+=1){var ae=$[V],he=Es(ae);if(!I)I=he;else{if(I===he)continue;I=Do;break}}return Jl(I||Do,_)}else return Pc}function Hs(y){var _=typeof y;return y===null?"":_==="string"||_==="number"||_==="boolean"?String(y):y instanceof cs||y instanceof $l||y instanceof fl?y.toString():JSON.stringify(y)}var Go=function(_,I){this.type=_,this.value=I};Go.parse=function(_,I){if(_.length!==2)return I.error("'literal' expression requires exactly one argument, but found "+(_.length-1)+" instead.");if(!Fu(_[1]))return I.error("invalid value");var V=_[1],$=Es(V),ae=I.expectedType;return $.kind==="array"&&$.N===0&&ae&&ae.kind==="array"&&(typeof ae.N!="number"||ae.N===0)&&($=ae),new Go($,V)},Go.prototype.evaluate=function(){return this.value},Go.prototype.eachChild=function(){},Go.prototype.outputDefined=function(){return!0},Go.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof cs?["rgba"].concat(this.value.toArray()):this.value instanceof $l?this.value.serialize():this.value};var ps=function(_){this.name="ExpressionEvaluationError",this.message=_};ps.prototype.toJSON=function(){return this.message};var uc={string:qo,number:oa,boolean:Oo,object:Pc},xl=function(_,I){this.type=_,this.args=I};xl.parse=function(_,I){if(_.length<2)return I.error("Expected at least one argument.");var V=1,$,ae=_[0];if(ae==="array"){var he;if(_.length>2){var Fe=_[1];if(typeof Fe!="string"||!(Fe in uc)||Fe==="object")return I.error('The item type argument of "array" must be one of string, number, boolean',1);he=uc[Fe],V++}else he=Do;var it;if(_.length>3){if(_[2]!==null&&(typeof _[2]!="number"||_[2]<0||_[2]!==Math.floor(_[2])))return I.error('The length argument to "array" must be a positive integer literal',2);it=_[2],V++}$=Jl(he,it)}else $=uc[ae];for(var yt=[];V<_.length;V++){var Lt=I.parse(_[V],V,Do);if(!Lt)return null;yt.push(Lt)}return new xl($,yt)},xl.prototype.evaluate=function(_){for(var I=0;I<this.args.length;I++){var V=this.args[I].evaluate(_),$=oc(this.type,Es(V));if($){if(I===this.args.length-1)throw new ps("Expected value to be of type "+qs(this.type)+", but found "+qs(Es(V))+" instead.")}else return V}return null},xl.prototype.eachChild=function(_){this.args.forEach(_)},xl.prototype.outputDefined=function(){return this.args.every(function(_){return _.outputDefined()})},xl.prototype.serialize=function(){var _=this.type,I=[_.kind];if(_.kind==="array"){var V=_.itemType;if(V.kind==="string"||V.kind==="number"||V.kind==="boolean"){I.push(V.kind);var $=_.N;(typeof $=="number"||this.args.length>1)&&I.push($)}}return I.concat(this.args.map(function(ae){return ae.serialize()}))};var Gu=function(_){this.type=pl,this.sections=_};Gu.parse=function(_,I){if(_.length<2)return I.error("Expected at least one argument.");var V=_[1];if(!Array.isArray(V)&&typeof V=="object")return I.error("First argument must be an image or text section.");for(var $=[],ae=!1,he=1;he<=_.length-1;++he){var Fe=_[he];if(ae&&typeof Fe=="object"&&!Array.isArray(Fe)){ae=!1;var it=null;if(Fe["font-scale"]&&(it=I.parse(Fe["font-scale"],1,oa),!it))return null;var yt=null;if(Fe["text-font"]&&(yt=I.parse(Fe["text-font"],1,Jl(qo)),!yt))return null;var Lt=null;if(Fe["text-color"]&&(Lt=I.parse(Fe["text-color"],1,Ol),!Lt))return null;var sr=$[$.length-1];sr.scale=it,sr.font=yt,sr.textColor=Lt}else{var gr=I.parse(_[he],1,Do);if(!gr)return null;var hr=gr.type.kind;if(hr!=="string"&&hr!=="value"&&hr!=="null"&&hr!=="resolvedImage")return I.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ae=!0,$.push({content:gr,scale:null,font:null,textColor:null})}}return new Gu($)},Gu.prototype.evaluate=function(_){var I=function(V){var $=V.content.evaluate(_);return Es($)===Zc?new Gf("",$,null,null,null):new Gf(Hs($),null,V.scale?V.scale.evaluate(_):null,V.font?V.font.evaluate(_).join(","):null,V.textColor?V.textColor.evaluate(_):null)};return new $l(this.sections.map(I))},Gu.prototype.eachChild=function(_){for(var I=0,V=this.sections;I<V.length;I+=1){var $=V[I];_($.content),$.scale&&_($.scale),$.font&&_($.font),$.textColor&&_($.textColor)}},Gu.prototype.outputDefined=function(){return!1},Gu.prototype.serialize=function(){for(var _=["format"],I=0,V=this.sections;I<V.length;I+=1){var $=V[I];_.push($.content.serialize());var ae={};$.scale&&(ae["font-scale"]=$.scale.serialize()),$.font&&(ae["text-font"]=$.font.serialize()),$.textColor&&(ae["text-color"]=$.textColor.serialize()),_.push(ae)}return _};var Os=function(_){this.type=Zc,this.input=_};Os.parse=function(_,I){if(_.length!==2)return I.error("Expected two arguments.");var V=I.parse(_[1],1,qo);return V?new Os(V):I.error("No image name provided.")},Os.prototype.evaluate=function(_){var I=this.input.evaluate(_),V=fl.fromString(I);return V&&_.availableImages&&(V.available=_.availableImages.indexOf(I)>-1),V},Os.prototype.eachChild=function(_){_(this.input)},Os.prototype.outputDefined=function(){return!1},Os.prototype.serialize=function(){return["image",this.input.serialize()]};var od={"to-boolean":Oo,"to-color":Ol,"to-number":oa,"to-string":qo},Po=function(_,I){this.type=_,this.args=I};Po.parse=function(_,I){if(_.length<2)return I.error("Expected at least one argument.");var V=_[0];if((V==="to-boolean"||V==="to-string")&&_.length!==2)return I.error("Expected one argument.");for(var $=od[V],ae=[],he=1;he<_.length;he++){var Fe=I.parse(_[he],he,Do);if(!Fe)return null;ae.push(Fe)}return new Po($,ae)},Po.prototype.evaluate=function(_){if(this.type.kind==="boolean")return!!this.args[0].evaluate(_);if(this.type.kind==="color"){for(var I,V,$=0,ae=this.args;$<ae.length;$+=1){var he=ae[$];if(I=he.evaluate(_),V=null,I instanceof cs)return I;if(typeof I=="string"){var Fe=_.parseColor(I);if(Fe)return Fe}else if(Array.isArray(I)&&(I.length<3||I.length>4?V="Invalid rbga value "+JSON.stringify(I)+": expected an array containing either three or four numeric values.":V=lc(I[0],I[1],I[2],I[3]),!V))return new cs(I[0]/255,I[1]/255,I[2]/255,I[3])}throw new ps(V||"Could not parse color from value '"+(typeof I=="string"?I:String(JSON.stringify(I)))+"'")}else if(this.type.kind==="number"){for(var it=null,yt=0,Lt=this.args;yt<Lt.length;yt+=1){var sr=Lt[yt];if(it=sr.evaluate(_),it===null)return 0;var gr=Number(it);if(!isNaN(gr))return gr}throw new ps("Could not convert "+JSON.stringify(it)+" to number.")}else return this.type.kind==="formatted"?$l.fromString(Hs(this.args[0].evaluate(_))):this.type.kind==="resolvedImage"?fl.fromString(Hs(this.args[0].evaluate(_))):Hs(this.args[0].evaluate(_))},Po.prototype.eachChild=function(_){this.args.forEach(_)},Po.prototype.outputDefined=function(){return this.args.every(function(_){return _.outputDefined()})},Po.prototype.serialize=function(){if(this.type.kind==="formatted")return new Gu([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Os(this.args[0]).serialize();var _=["to-"+this.type.kind];return this.eachChild(function(I){_.push(I.serialize())}),_};var sd=["Unknown","Point","LineString","Polygon"],Ko=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Ko.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Ko.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?sd[this.feature.type]:this.feature.type:null},Ko.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ko.prototype.canonicalID=function(){return this.canonical},Ko.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ko.prototype.parseColor=function(_){var I=this._parseColorCache[_];return I||(I=this._parseColorCache[_]=cs.parse(_)),I};var Pa=function(_,I,V,$){this.name=_,this.type=I,this._evaluate=V,this.args=$};Pa.prototype.evaluate=function(_){return this._evaluate(_,this.args)},Pa.prototype.eachChild=function(_){this.args.forEach(_)},Pa.prototype.outputDefined=function(){return!1},Pa.prototype.serialize=function(){return[this.name].concat(this.args.map(function(_){return _.serialize()}))},Pa.parse=function(_,I){var V,$=_[0],ae=Pa.definitions[$];if(!ae)return I.error('Unknown expression "'+$+'". If you wanted a literal array, use ["literal", [...]].',0);for(var he=Array.isArray(ae)?ae[0]:ae.type,Fe=Array.isArray(ae)?[[ae[1],ae[2]]]:ae.overloads,it=Fe.filter(function(to){var ao=to[0];return!Array.isArray(ao)||ao.length===_.length-1}),yt=null,Lt=0,sr=it;Lt<sr.length;Lt+=1){var gr=sr[Lt],hr=gr[0],Rr=gr[1];yt=new ks(I.registry,I.path,null,I.scope);for(var ni=[],Hi=!1,wi=1;wi<_.length;wi++){var bn=_[wi],rn=Array.isArray(hr)?hr[wi-1]:hr.type,xn=yt.parse(bn,1+ni.length,rn);if(!xn){Hi=!0;break}ni.push(xn)}if(!Hi){if(Array.isArray(hr)&&hr.length!==ni.length){yt.error("Expected "+hr.length+" arguments, but found "+ni.length+" instead.");continue}for(var In=0;In<ni.length;In++){var Xn=Array.isArray(hr)?hr[In]:hr.type,ga=ni[In];yt.concat(In+1).checkSubtype(Xn,ga.type)}if(yt.errors.length===0)return new Pa($,he,Rr,ni)}}if(it.length===1)(V=I.errors).push.apply(V,yt.errors);else{for(var ha=it.length?it:Fe,eo=ha.map(function(to){var ao=to[0];return af(ao)}).join(" | "),za=[],Za=1;Za<_.length;Za++){var Jo=I.parse(_[Za],1+za.length);if(!Jo)return null;za.push(qs(Jo.type))}I.error("Expected arguments of type "+eo+", but found ("+za.join(", ")+") instead.")}return null},Pa.register=function(_,I){Pa.definitions=I;for(var V in I)_[V]=Pa};function af(y){return Array.isArray(y)?"("+y.map(qs).join(", ")+")":"("+qs(y.type)+"...)"}var Hu=function(_,I,V){this.type=Vf,this.locale=V,this.caseSensitive=_,this.diacriticSensitive=I};Hu.parse=function(_,I){if(_.length!==2)return I.error("Expected one argument.");var V=_[1];if(typeof V!="object"||Array.isArray(V))return I.error("Collator options argument must be an object.");var $=I.parse(V["case-sensitive"]===void 0?!1:V["case-sensitive"],1,Oo);if(!$)return null;var ae=I.parse(V["diacritic-sensitive"]===void 0?!1:V["diacritic-sensitive"],1,Oo);if(!ae)return null;var he=null;return V.locale&&(he=I.parse(V.locale,1,qo),!he)?null:new Hu($,ae,he)},Hu.prototype.evaluate=function(_){return new nf(this.caseSensitive.evaluate(_),this.diacriticSensitive.evaluate(_),this.locale?this.locale.evaluate(_):null)},Hu.prototype.eachChild=function(_){_(this.caseSensitive),_(this.diacriticSensitive),this.locale&&_(this.locale)},Hu.prototype.outputDefined=function(){return!1},Hu.prototype.serialize=function(){var _={};return _["case-sensitive"]=this.caseSensitive.serialize(),_["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(_.locale=this.locale.serialize()),["collator",_]};var bl=8192;function Hf(y,_){y[0]=Math.min(y[0],_[0]),y[1]=Math.min(y[1],_[1]),y[2]=Math.max(y[2],_[0]),y[3]=Math.max(y[3],_[1])}function Ic(y){return(180+y)/360}function yf(y){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+y*Math.PI/360)))/360}function Bl(y,_){return!(y[0]<=_[0]||y[2]>=_[2]||y[1]<=_[1]||y[3]>=_[3])}function Ah(y,_){var I=Ic(y[0]),V=yf(y[1]),$=Math.pow(2,_.z);return[Math.round(I*$*bl),Math.round(V*$*bl)]}function Qf(y,_,I){var V=y[0]-_[0],$=y[1]-_[1],ae=y[0]-I[0],he=y[1]-I[1];return V*he-ae*$===0&&V*ae<=0&&$*he<=0}function _f(y,_,I){return _[1]>y[1]!=I[1]>y[1]&&y[0]<(I[0]-_[0])*(y[1]-_[1])/(I[1]-_[1])+_[0]}function Yc(y,_){for(var I=!1,V=0,$=_.length;V<$;V++)for(var ae=_[V],he=0,Fe=ae.length;he<Fe-1;he++){if(Qf(y,ae[he],ae[he+1]))return!1;_f(y,ae[he],ae[he+1])&&(I=!I)}return I}function eh(y,_){for(var I=0;I<_.length;I++)if(Yc(y,_[I]))return!0;return!1}function th(y,_){return y[0]*_[1]-y[1]*_[0]}function ju(y,_,I,V){var $=y[0]-I[0],ae=y[1]-I[1],he=_[0]-I[0],Fe=_[1]-I[1],it=V[0]-I[0],yt=V[1]-I[1],Lt=$*yt-it*ae,sr=he*yt-it*Fe;return Lt>0&&sr<0||Lt<0&&sr>0}function jf(y,_,I,V){var $=[_[0]-y[0],_[1]-y[1]],ae=[V[0]-I[0],V[1]-I[1]];return th(ae,$)===0?!1:!!(ju(y,_,I,V)&&ju(I,V,y,_))}function cc(y,_,I){for(var V=0,$=I;V<$.length;V+=1)for(var ae=$[V],he=0;he<ae.length-1;++he)if(jf(y,_,ae[he],ae[he+1]))return!0;return!1}function of(y,_){for(var I=0;I<y.length;++I)if(!Yc(y[I],_))return!1;for(var V=0;V<y.length-1;++V)if(cc(y[V],y[V+1],_))return!1;return!0}function Nl(y,_){for(var I=0;I<_.length;I++)if(of(y,_[I]))return!0;return!1}function Kc(y,_,I){for(var V=[],$=0;$<y.length;$++){for(var ae=[],he=0;he<y[$].length;he++){var Fe=Ah(y[$][he],I);Hf(_,Fe),ae.push(Fe)}V.push(ae)}return V}function Rc(y,_,I){for(var V=[],$=0;$<y.length;$++){var ae=Kc(y[$],_,I);V.push(ae)}return V}function gs(y,_,I,V){if(y[0]<I[0]||y[0]>I[2]){var $=V*.5,ae=y[0]-I[0]>$?-V:I[0]-y[0]>$?V:0;ae===0&&(ae=y[0]-I[2]>$?-V:I[2]-y[0]>$?V:0),y[0]+=ae}Hf(_,y)}function Wf(y){y[0]=y[1]=1/0,y[2]=y[3]=-1/0}function Wh(y,_,I,V){for(var $=Math.pow(2,V.z)*bl,ae=[V.x*bl,V.y*bl],he=[],Fe=0,it=y;Fe<it.length;Fe+=1)for(var yt=it[Fe],Lt=0,sr=yt;Lt<sr.length;Lt+=1){var gr=sr[Lt],hr=[gr.x+ae[0],gr.y+ae[1]];gs(hr,_,I,$),he.push(hr)}return he}function rh(y,_,I,V){for(var $=Math.pow(2,V.z)*bl,ae=[V.x*bl,V.y*bl],he=[],Fe=0,it=y;Fe<it.length;Fe+=1){for(var yt=it[Fe],Lt=[],sr=0,gr=yt;sr<gr.length;sr+=1){var hr=gr[sr],Rr=[hr.x+ae[0],hr.y+ae[1]];Hf(_,Rr),Lt.push(Rr)}he.push(Lt)}if(_[2]-_[0]<=$/2){Wf(_);for(var ni=0,Hi=he;ni<Hi.length;ni+=1)for(var wi=Hi[ni],bn=0,rn=wi;bn<rn.length;bn+=1){var xn=rn[bn];gs(xn,_,I,$)}}return he}function sf(y,_){var I=[1/0,1/0,-1/0,-1/0],V=[1/0,1/0,-1/0,-1/0],$=y.canonicalID();if(_.type==="Polygon"){var ae=Kc(_.coordinates,V,$),he=Wh(y.geometry(),I,V,$);if(!Bl(I,V))return!1;for(var Fe=0,it=he;Fe<it.length;Fe+=1){var yt=it[Fe];if(!Yc(yt,ae))return!1}}if(_.type==="MultiPolygon"){var Lt=Rc(_.coordinates,V,$),sr=Wh(y.geometry(),I,V,$);if(!Bl(I,V))return!1;for(var gr=0,hr=sr;gr<hr.length;gr+=1){var Rr=hr[gr];if(!eh(Rr,Lt))return!1}}return!0}function Sh(y,_){var I=[1/0,1/0,-1/0,-1/0],V=[1/0,1/0,-1/0,-1/0],$=y.canonicalID();if(_.type==="Polygon"){var ae=Kc(_.coordinates,V,$),he=rh(y.geometry(),I,V,$);if(!Bl(I,V))return!1;for(var Fe=0,it=he;Fe<it.length;Fe+=1){var yt=it[Fe];if(!of(yt,ae))return!1}}if(_.type==="MultiPolygon"){var Lt=Rc(_.coordinates,V,$),sr=rh(y.geometry(),I,V,$);if(!Bl(I,V))return!1;for(var gr=0,hr=sr;gr<hr.length;gr+=1){var Rr=hr[gr];if(!Nl(Rr,Lt))return!1}}return!0}var Mu=function(_,I){this.type=Oo,this.geojson=_,this.geometries=I};Mu.parse=function(_,I){if(_.length!==2)return I.error("'within' expression requires exactly one argument, but found "+(_.length-1)+" instead.");if(Fu(_[1])){var V=_[1];if(V.type==="FeatureCollection")for(var $=0;$<V.features.length;++$){var ae=V.features[$].geometry.type;if(ae==="Polygon"||ae==="MultiPolygon")return new Mu(V,V.features[$].geometry)}else if(V.type==="Feature"){var he=V.geometry.type;if(he==="Polygon"||he==="MultiPolygon")return new Mu(V,V.geometry)}else if(V.type==="Polygon"||V.type==="MultiPolygon")return new Mu(V,V)}return I.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Mu.prototype.evaluate=function(_){if(_.geometry()!=null&&_.canonicalID()!=null){if(_.geometryType()==="Point")return sf(_,this.geometries);if(_.geometryType()==="LineString")return Sh(_,this.geometries)}return!1},Mu.prototype.eachChild=function(){},Mu.prototype.outputDefined=function(){return!0},Mu.prototype.serialize=function(){return["within",this.geojson]};function ih(y){if(y instanceof Pa){if(y.name==="get"&&y.args.length===1)return!1;if(y.name==="feature-state")return!1;if(y.name==="has"&&y.args.length===1)return!1;if(y.name==="properties"||y.name==="geometry-type"||y.name==="id")return!1;if(/^filter-/.test(y.name))return!1}if(y instanceof Mu)return!1;var _=!0;return y.eachChild(function(I){_&&!ih(I)&&(_=!1)}),_}function js(y){if(y instanceof Pa&&y.name==="feature-state")return!1;var _=!0;return y.eachChild(function(I){_&&!js(I)&&(_=!1)}),_}function Eu(y,_){if(y instanceof Pa&&_.indexOf(y.name)>=0)return!1;var I=!0;return y.eachChild(function(V){I&&!Eu(V,_)&&(I=!1)}),I}var Dc=function(_,I){this.type=I.type,this.name=_,this.boundExpression=I};Dc.parse=function(_,I){if(_.length!==2||typeof _[1]!="string")return I.error("'var' expression requires exactly one string literal argument.");var V=_[1];return I.scope.has(V)?new Dc(V,I.scope.get(V)):I.error('Unknown variable "'+V+'". Make sure "'+V+'" has been bound in an enclosing "let" expression before using it.',1)},Dc.prototype.evaluate=function(_){return this.boundExpression.evaluate(_)},Dc.prototype.eachChild=function(){},Dc.prototype.outputDefined=function(){return!1},Dc.prototype.serialize=function(){return["var",this.name]};var ks=function(_,I,V,$,ae){I===void 0&&(I=[]),$===void 0&&($=new Hl),ae===void 0&&(ae=[]),this.registry=_,this.path=I,this.key=I.map(function(he){return"["+he+"]"}).join(""),this.scope=$,this.errors=ae,this.expectedType=V};ks.prototype.parse=function(_,I,V,$,ae){return ae===void 0&&(ae={}),I?this.concat(I,V,$)._parse(_,ae):this._parse(_,ae)},ks.prototype._parse=function(_,I){(_===null||typeof _=="string"||typeof _=="boolean"||typeof _=="number")&&(_=["literal",_]);function V(Lt,sr,gr){return gr==="assert"?new xl(sr,[Lt]):gr==="coerce"?new Po(sr,[Lt]):Lt}if(Array.isArray(_)){if(_.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var $=_[0];if(typeof $!="string")return this.error("Expression name must be a string, but found "+typeof $+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ae=this.registry[$];if(ae){var he=ae.parse(_,this);if(!he)return null;if(this.expectedType){var Fe=this.expectedType,it=he.type;if((Fe.kind==="string"||Fe.kind==="number"||Fe.kind==="boolean"||Fe.kind==="object"||Fe.kind==="array")&&it.kind==="value")he=V(he,Fe,I.typeAnnotation||"assert");else if((Fe.kind==="color"||Fe.kind==="formatted"||Fe.kind==="resolvedImage")&&(it.kind==="value"||it.kind==="string"))he=V(he,Fe,I.typeAnnotation||"coerce");else if(this.checkSubtype(Fe,it))return null}if(!(he instanceof Go)&&he.type.kind!=="resolvedImage"&&bc(he)){var yt=new Ko;try{he=new Go(he.type,he.evaluate(yt))}catch(Lt){return this.error(Lt.message),null}}return he}return this.error('Unknown expression "'+$+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof _=="undefined"?this.error("'undefined' value invalid. Use null instead."):typeof _=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof _+" instead.")},ks.prototype.concat=function(_,I,V){var $=typeof _=="number"?this.path.concat(_):this.path,ae=V?this.scope.concat(V):this.scope;return new ks(this.registry,$,I||null,ae,this.errors)},ks.prototype.error=function(_){for(var I=[],V=arguments.length-1;V-- >0;)I[V]=arguments[V+1];var $=""+this.key+I.map(function(ae){return"["+ae+"]"}).join("");this.errors.push(new Ns($,_))},ks.prototype.checkSubtype=function(_,I){var V=oc(_,I);return V&&this.error(V),V};function bc(y){if(y instanceof Dc)return bc(y.boundExpression);if(y instanceof Pa&&y.name==="error")return!1;if(y instanceof Hu)return!1;if(y instanceof Mu)return!1;var _=y instanceof Po||y instanceof xl,I=!0;return y.eachChild(function(V){_?I=I&&bc(V):I=I&&V instanceof Go}),I?ih(y)&&Eu(y,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function hu(y,_){for(var I=y.length-1,V=0,$=I,ae=0,he,Fe;V<=$;)if(ae=Math.floor((V+$)/2),he=y[ae],Fe=y[ae+1],he<=_){if(ae===I||_<Fe)return ae;V=ae+1}else if(he>_)$=ae-1;else throw new ps("Input is not a number.");return 0}var _u=function(_,I,V){this.type=_,this.input=I,this.labels=[],this.outputs=[];for(var $=0,ae=V;$<ae.length;$+=1){var he=ae[$],Fe=he[0],it=he[1];this.labels.push(Fe),this.outputs.push(it)}};_u.parse=function(_,I){if(_.length-1<4)return I.error("Expected at least 4 arguments, but found only "+(_.length-1)+".");if((_.length-1)%2!==0)return I.error("Expected an even number of arguments.");var V=I.parse(_[1],1,oa);if(!V)return null;var $=[],ae=null;I.expectedType&&I.expectedType.kind!=="value"&&(ae=I.expectedType);for(var he=1;he<_.length;he+=2){var Fe=he===1?-1/0:_[he],it=_[he+1],yt=he,Lt=he+1;if(typeof Fe!="number")return I.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',yt);if($.length&&$[$.length-1][0]>=Fe)return I.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',yt);var sr=I.parse(it,Lt,ae);if(!sr)return null;ae=ae||sr.type,$.push([Fe,sr])}return new _u(ae,V,$)},_u.prototype.evaluate=function(_){var I=this.labels,V=this.outputs;if(I.length===1)return V[0].evaluate(_);var $=this.input.evaluate(_);if($<=I[0])return V[0].evaluate(_);var ae=I.length;if($>=I[ae-1])return V[ae-1].evaluate(_);var he=hu(I,$);return V[he].evaluate(_)},_u.prototype.eachChild=function(_){_(this.input);for(var I=0,V=this.outputs;I<V.length;I+=1){var $=V[I];_($)}},_u.prototype.outputDefined=function(){return this.outputs.every(function(_){return _.outputDefined()})},_u.prototype.serialize=function(){for(var _=["step",this.input.serialize()],I=0;I<this.labels.length;I++)I>0&&_.push(this.labels[I]),_.push(this.outputs[I].serialize());return _};function nl(y,_,I){return y*(1-I)+_*I}function nh(y,_,I){return new cs(nl(y.r,_.r,I),nl(y.g,_.g,I),nl(y.b,_.b,I),nl(y.a,_.a,I))}function Mh(y,_,I){return y.map(function(V,$){return nl(V,_[$],I)})}var zu=Object.freeze({__proto__:null,number:nl,color:nh,array:Mh}),Fc=.95047,wc=1,bd=1.08883,xf=4/29,Pf=6/29,qu=3*Pf*Pf,bf=Pf*Pf*Pf,jl=Math.PI/180,lf=180/Math.PI;function Xh(y){return y>bf?Math.pow(y,1/3):y/qu+xf}function If(y){return y>Pf?y*y*y:qu*(y-xf)}function Cs(y){return 255*(y<=.0031308?12.92*y:1.055*Math.pow(y,1/2.4)-.055)}function du(y){return y/=255,y<=.04045?y/12.92:Math.pow((y+.055)/1.055,2.4)}function ku(y){var _=du(y.r),I=du(y.g),V=du(y.b),$=Xh((.4124564*_+.3575761*I+.1804375*V)/Fc),ae=Xh((.2126729*_+.7151522*I+.072175*V)/wc),he=Xh((.0193339*_+.119192*I+.9503041*V)/bd);return{l:116*ae-16,a:500*($-ae),b:200*(ae-he),alpha:y.a}}function Xf(y){var _=(y.l+16)/116,I=isNaN(y.a)?_:_+y.a/500,V=isNaN(y.b)?_:_-y.b/200;return _=wc*If(_),I=Fc*If(I),V=bd*If(V),new cs(Cs(3.2404542*I-1.5371385*_-.4985314*V),Cs(-.969266*I+1.8760108*_+.041556*V),Cs(.0556434*I-.2040259*_+1.0572252*V),y.alpha)}function Us(y,_,I){return{l:nl(y.l,_.l,I),a:nl(y.a,_.a,I),b:nl(y.b,_.b,I),alpha:nl(y.alpha,_.alpha,I)}}function wf(y){var _=ku(y),I=_.l,V=_.a,$=_.b,ae=Math.atan2($,V)*lf;return{h:ae<0?ae+360:ae,c:Math.sqrt(V*V+$*$),l:I,alpha:y.a}}function zc(y){var _=y.h*jl,I=y.c,V=y.l;return Xf({l:V,a:Math.cos(_)*I,b:Math.sin(_)*I,alpha:y.alpha})}function Wu(y,_,I){var V=_-y;return y+I*(V>180||V<-180?V-360*Math.round(V/360):V)}function Rf(y,_,I){return{h:Wu(y.h,_.h,I),c:nl(y.c,_.c,I),l:nl(y.l,_.l,I),alpha:nl(y.alpha,_.alpha,I)}}var Xu={forward:ku,reverse:Xf,interpolate:Us},uf={forward:wf,reverse:zc,interpolate:Rf},Zf=Object.freeze({__proto__:null,lab:Xu,hcl:uf}),Wl=function(_,I,V,$,ae){this.type=_,this.operator=I,this.interpolation=V,this.input=$,this.labels=[],this.outputs=[];for(var he=0,Fe=ae;he<Fe.length;he+=1){var it=Fe[he],yt=it[0],Lt=it[1];this.labels.push(yt),this.outputs.push(Lt)}};Wl.interpolationFactor=function(_,I,V,$){var ae=0;if(_.name==="exponential")ae=ah(I,_.base,V,$);else if(_.name==="linear")ae=ah(I,1,V,$);else if(_.name==="cubic-bezier"){var he=_.controlPoints,Fe=new s(he[0],he[1],he[2],he[3]);ae=Fe.solve(ah(I,1,V,$))}return ae},Wl.parse=function(_,I){var V=_[0],$=_[1],ae=_[2],he=_.slice(3);if(!Array.isArray($)||$.length===0)return I.error("Expected an interpolation type expression.",1);if($[0]==="linear")$={name:"linear"};else if($[0]==="exponential"){var Fe=$[1];if(typeof Fe!="number")return I.error("Exponential interpolation requires a numeric base.",1,1);$={name:"exponential",base:Fe}}else if($[0]==="cubic-bezier"){var it=$.slice(1);if(it.length!==4||it.some(function(wi){return typeof wi!="number"||wi<0||wi>1}))return I.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);$={name:"cubic-bezier",controlPoints:it}}else return I.error("Unknown interpolation type "+String($[0]),1,0);if(_.length-1<4)return I.error("Expected at least 4 arguments, but found only "+(_.length-1)+".");if((_.length-1)%2!==0)return I.error("Expected an even number of arguments.");if(ae=I.parse(ae,2,oa),!ae)return null;var yt=[],Lt=null;V==="interpolate-hcl"||V==="interpolate-lab"?Lt=Ol:I.expectedType&&I.expectedType.kind!=="value"&&(Lt=I.expectedType);for(var sr=0;sr<he.length;sr+=2){var gr=he[sr],hr=he[sr+1],Rr=sr+3,ni=sr+4;if(typeof gr!="number")return I.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Rr);if(yt.length&&yt[yt.length-1][0]>=gr)return I.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Rr);var Hi=I.parse(hr,ni,Lt);if(!Hi)return null;Lt=Lt||Hi.type,yt.push([gr,Hi])}return Lt.kind!=="number"&&Lt.kind!=="color"&&!(Lt.kind==="array"&&Lt.itemType.kind==="number"&&typeof Lt.N=="number")?I.error("Type "+qs(Lt)+" is not interpolatable."):new Wl(Lt,V,$,ae,yt)},Wl.prototype.evaluate=function(_){var I=this.labels,V=this.outputs;if(I.length===1)return V[0].evaluate(_);var $=this.input.evaluate(_);if($<=I[0])return V[0].evaluate(_);var ae=I.length;if($>=I[ae-1])return V[ae-1].evaluate(_);var he=hu(I,$),Fe=I[he],it=I[he+1],yt=Wl.interpolationFactor(this.interpolation,$,Fe,it),Lt=V[he].evaluate(_),sr=V[he+1].evaluate(_);return this.operator==="interpolate"?zu[this.type.kind.toLowerCase()](Lt,sr,yt):this.operator==="interpolate-hcl"?uf.reverse(uf.interpolate(uf.forward(Lt),uf.forward(sr),yt)):Xu.reverse(Xu.interpolate(Xu.forward(Lt),Xu.forward(sr),yt))},Wl.prototype.eachChild=function(_){_(this.input);for(var I=0,V=this.outputs;I<V.length;I+=1){var $=V[I];_($)}},Wl.prototype.outputDefined=function(){return this.outputs.every(function(_){return _.outputDefined()})},Wl.prototype.serialize=function(){var _;this.interpolation.name==="linear"?_=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?_=["linear"]:_=["exponential",this.interpolation.base]:_=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var I=[this.operator,_,this.input.serialize()],V=0;V<this.labels.length;V++)I.push(this.labels[V],this.outputs[V].serialize());return I};function ah(y,_,I,V){var $=V-I,ae=y-I;return $===0?0:_===1?ae/$:(Math.pow(_,ae)-1)/(Math.pow(_,$)-1)}var Zu=function(_,I){this.type=_,this.args=I};Zu.parse=function(_,I){if(_.length<2)return I.error("Expectected at least one argument.");var V=null,$=I.expectedType;$&&$.kind!=="value"&&(V=$);for(var ae=[],he=0,Fe=_.slice(1);he<Fe.length;he+=1){var it=Fe[he],yt=I.parse(it,1+ae.length,V,void 0,{typeAnnotation:"omit"});if(!yt)return null;V=V||yt.type,ae.push(yt)}var Lt=$&&ae.some(function(sr){return oc($,sr.type)});return Lt?new Zu(Do,ae):new Zu(V,ae)},Zu.prototype.evaluate=function(_){for(var I=null,V=0,$,ae=0,he=this.args;ae<he.length;ae+=1){var Fe=he[ae];if(V++,I=Fe.evaluate(_),I&&I instanceof fl&&!I.available&&($||($=I.name),I=null,V===this.args.length&&(I=$)),I!==null)break}return I},Zu.prototype.eachChild=function(_){this.args.forEach(_)},Zu.prototype.outputDefined=function(){return this.args.every(function(_){return _.outputDefined()})},Zu.prototype.serialize=function(){var _=["coalesce"];return this.eachChild(function(I){_.push(I.serialize())}),_};var qc=function(_,I){this.type=I.type,this.bindings=[].concat(_),this.result=I};qc.prototype.evaluate=function(_){return this.result.evaluate(_)},qc.prototype.eachChild=function(_){for(var I=0,V=this.bindings;I<V.length;I+=1){var $=V[I];_($[1])}_(this.result)},qc.parse=function(_,I){if(_.length<4)return I.error("Expected at least 3 arguments, but found "+(_.length-1)+" instead.");for(var V=[],$=1;$<_.length-1;$+=2){var ae=_[$];if(typeof ae!="string")return I.error("Expected string, but found "+typeof ae+" instead.",$);if(/[^a-zA-Z0-9_]/.test(ae))return I.error("Variable names must contain only alphanumeric characters or '_'.",$);var he=I.parse(_[$+1],$+1);if(!he)return null;V.push([ae,he])}var Fe=I.parse(_[_.length-1],_.length-1,I.expectedType,V);return Fe?new qc(V,Fe):null},qc.prototype.outputDefined=function(){return this.result.outputDefined()},qc.prototype.serialize=function(){for(var _=["let"],I=0,V=this.bindings;I<V.length;I+=1){var $=V[I],ae=$[0],he=$[1];_.push(ae,he.serialize())}return _.push(this.result.serialize()),_};var Tc=function(_,I,V){this.type=_,this.index=I,this.input=V};Tc.parse=function(_,I){if(_.length!==3)return I.error("Expected 2 arguments, but found "+(_.length-1)+" instead.");var V=I.parse(_[1],1,oa),$=I.parse(_[2],2,Jl(I.expectedType||Do));if(!V||!$)return null;var ae=$.type;return new Tc(ae.itemType,V,$)},Tc.prototype.evaluate=function(_){var I=this.index.evaluate(_),V=this.input.evaluate(_);if(I<0)throw new ps("Array index out of bounds: "+I+" < 0.");if(I>=V.length)throw new ps("Array index out of bounds: "+I+" > "+(V.length-1)+".");if(I!==Math.floor(I))throw new ps("Array index must be an integer, but found "+I+" instead.");return V[I]},Tc.prototype.eachChild=function(_){_(this.index),_(this.input)},Tc.prototype.outputDefined=function(){return!1},Tc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var wl=function(_,I){this.type=Oo,this.needle=_,this.haystack=I};wl.parse=function(_,I){if(_.length!==3)return I.error("Expected 2 arguments, but found "+(_.length-1)+" instead.");var V=I.parse(_[1],1,Do),$=I.parse(_[2],2,Do);return!V||!$?null:Cf(V.type,[Oo,qo,oa,ac,Do])?new wl(V,$):I.error("Expected first argument to be of type boolean, string, number or null, but found "+qs(V.type)+" instead")},wl.prototype.evaluate=function(_){var I=this.needle.evaluate(_),V=this.haystack.evaluate(_);if(!V)return!1;if(!sc(I,["boolean","string","number","null"]))throw new ps("Expected first argument to be of type boolean, string, number or null, but found "+qs(Es(I))+" instead.");if(!sc(V,["string","array"]))throw new ps("Expected second argument to be of type array or string, but found "+qs(Es(V))+" instead.");return V.indexOf(I)>=0},wl.prototype.eachChild=function(_){_(this.needle),_(this.haystack)},wl.prototype.outputDefined=function(){return!0},wl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var vu=function(_,I,V){this.type=oa,this.needle=_,this.haystack=I,this.fromIndex=V};vu.parse=function(_,I){if(_.length<=2||_.length>=5)return I.error("Expected 3 or 4 arguments, but found "+(_.length-1)+" instead.");var V=I.parse(_[1],1,Do),$=I.parse(_[2],2,Do);if(!V||!$)return null;if(!Cf(V.type,[Oo,qo,oa,ac,Do]))return I.error("Expected first argument to be of type boolean, string, number or null, but found "+qs(V.type)+" instead");if(_.length===4){var ae=I.parse(_[3],3,oa);return ae?new vu(V,$,ae):null}else return new vu(V,$)},vu.prototype.evaluate=function(_){var I=this.needle.evaluate(_),V=this.haystack.evaluate(_);if(!sc(I,["boolean","string","number","null"]))throw new ps("Expected first argument to be of type boolean, string, number or null, but found "+qs(Es(I))+" instead.");if(!sc(V,["string","array"]))throw new ps("Expected second argument to be of type array or string, but found "+qs(Es(V))+" instead.");if(this.fromIndex){var $=this.fromIndex.evaluate(_);return V.indexOf(I,$)}return V.indexOf(I)},vu.prototype.eachChild=function(_){_(this.needle),_(this.haystack),this.fromIndex&&_(this.fromIndex)},vu.prototype.outputDefined=function(){return!1},vu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var _=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),_]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Oc=function(_,I,V,$,ae,he){this.inputType=_,this.type=I,this.input=V,this.cases=$,this.outputs=ae,this.otherwise=he};Oc.parse=function(_,I){if(_.length<5)return I.error("Expected at least 4 arguments, but found only "+(_.length-1)+".");if(_.length%2!==1)return I.error("Expected an even number of arguments.");var V,$;I.expectedType&&I.expectedType.kind!=="value"&&($=I.expectedType);for(var ae={},he=[],Fe=2;Fe<_.length-1;Fe+=2){var it=_[Fe],yt=_[Fe+1];Array.isArray(it)||(it=[it]);var Lt=I.concat(Fe);if(it.length===0)return Lt.error("Expected at least one branch label.");for(var sr=0,gr=it;sr<gr.length;sr+=1){var hr=gr[sr];if(typeof hr!="number"&&typeof hr!="string")return Lt.error("Branch labels must be numbers or strings.");if(typeof hr=="number"&&Math.abs(hr)>Number.MAX_SAFE_INTEGER)return Lt.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof hr=="number"&&Math.floor(hr)!==hr)return Lt.error("Numeric branch labels must be integer values.");if(!V)V=Es(hr);else if(Lt.checkSubtype(V,Es(hr)))return null;if(typeof ae[String(hr)]!="undefined")return Lt.error("Branch labels must be unique.");ae[String(hr)]=he.length}var Rr=I.parse(yt,Fe,$);if(!Rr)return null;$=$||Rr.type,he.push(Rr)}var ni=I.parse(_[1],1,Do);if(!ni)return null;var Hi=I.parse(_[_.length-1],_.length-1,$);return!Hi||ni.type.kind!=="value"&&I.concat(1).checkSubtype(V,ni.type)?null:new Oc(V,$,ni,ae,he,Hi)},Oc.prototype.evaluate=function(_){var I=this.input.evaluate(_),V=Es(I)===this.inputType&&this.outputs[this.cases[I]]||this.otherwise;return V.evaluate(_)},Oc.prototype.eachChild=function(_){_(this.input),this.outputs.forEach(_),_(this.otherwise)},Oc.prototype.outputDefined=function(){return this.outputs.every(function(_){return _.outputDefined()})&&this.otherwise.outputDefined()},Oc.prototype.serialize=function(){for(var _=this,I=["match",this.input.serialize()],V=Object.keys(this.cases).sort(),$=[],ae={},he=0,Fe=V;he<Fe.length;he+=1){var it=Fe[he],yt=ae[this.cases[it]];yt===void 0?(ae[this.cases[it]]=$.length,$.push([this.cases[it],[it]])):$[yt][1].push(it)}for(var Lt=function(ni){return _.inputType.kind==="number"?Number(ni):ni},sr=0,gr=$;sr<gr.length;sr+=1){var hr=gr[sr],yt=hr[0],Rr=hr[1];Rr.length===1?I.push(Lt(Rr[0])):I.push(Rr.map(Lt)),I.push(this.outputs[outputIndex$1].serialize())}return I.push(this.otherwise.serialize()),I};var cf=function(_,I,V){this.type=_,this.branches=I,this.otherwise=V};cf.parse=function(_,I){if(_.length<4)return I.error("Expected at least 3 arguments, but found only "+(_.length-1)+".");if(_.length%2!==0)return I.error("Expected an odd number of arguments.");var V;I.expectedType&&I.expectedType.kind!=="value"&&(V=I.expectedType);for(var $=[],ae=1;ae<_.length-1;ae+=2){var he=I.parse(_[ae],ae,Oo);if(!he)return null;var Fe=I.parse(_[ae+1],ae+1,V);if(!Fe)return null;$.push([he,Fe]),V=V||Fe.type}var it=I.parse(_[_.length-1],_.length-1,V);return it?new cf(V,$,it):null},cf.prototype.evaluate=function(_){for(var I=0,V=this.branches;I<V.length;I+=1){var $=V[I],ae=$[0],he=$[1];if(ae.evaluate(_))return he.evaluate(_)}return this.otherwise.evaluate(_)},cf.prototype.eachChild=function(_){for(var I=0,V=this.branches;I<V.length;I+=1){var $=V[I],ae=$[0],he=$[1];_(ae),_(he)}_(this.otherwise)},cf.prototype.outputDefined=function(){return this.branches.every(function(_){var I=_[0],V=_[1];return V.outputDefined()})&&this.otherwise.outputDefined()},cf.prototype.serialize=function(){var _=["case"];return this.eachChild(function(I){_.push(I.serialize())}),_};var fc=function(_,I,V,$){this.type=_,this.input=I,this.beginIndex=V,this.endIndex=$};fc.parse=function(_,I){if(_.length<=2||_.length>=5)return I.error("Expected 3 or 4 arguments, but found "+(_.length-1)+" instead.");var V=I.parse(_[1],1,Do),$=I.parse(_[2],2,oa);if(!V||!$)return null;if(!Cf(V.type,[Jl(Do),qo,Do]))return I.error("Expected first argument to be of type array or string, but found "+qs(V.type)+" instead");if(_.length===4){var ae=I.parse(_[3],3,oa);return ae?new fc(V.type,V,$,ae):null}else return new fc(V.type,V,$)},fc.prototype.evaluate=function(_){var I=this.input.evaluate(_),V=this.beginIndex.evaluate(_);if(!sc(I,["string","array"]))throw new ps("Expected first argument to be of type array or string, but found "+qs(Es(I))+" instead.");if(this.endIndex){var $=this.endIndex.evaluate(_);return I.slice(V,$)}return I.slice(V)},fc.prototype.eachChild=function(_){_(this.input),_(this.beginIndex),this.endIndex&&_(this.endIndex)},fc.prototype.outputDefined=function(){return!1},fc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var _=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),_]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Bc(y,_){return y==="=="||y==="!="?_.kind==="boolean"||_.kind==="string"||_.kind==="number"||_.kind==="null"||_.kind==="value":_.kind==="string"||_.kind==="number"||_.kind==="value"}function kt(y,_,I){return _===I}function Zt(y,_,I){return _!==I}function Mr(y,_,I){return _<I}function xr(y,_,I){return _>I}function Kr(y,_,I){return _<=I}function Mi(y,_,I){return _>=I}function Wi(y,_,I,V){return V.compare(_,I)===0}function dn(y,_,I,V){return!Wi(y,_,I,V)}function wn(y,_,I,V){return V.compare(_,I)<0}function On(y,_,I,V){return V.compare(_,I)>0}function Yi(y,_,I,V){return V.compare(_,I)<=0}function $i(y,_,I,V){return V.compare(_,I)>=0}function an(y,_,I){var V=y!=="=="&&y!=="!=";return function(){function $(ae,he,Fe){this.type=Oo,this.lhs=ae,this.rhs=he,this.collator=Fe,this.hasUntypedArgument=ae.type.kind==="value"||he.type.kind==="value"}return $.parse=function(he,Fe){if(he.length!==3&&he.length!==4)return Fe.error("Expected two or three arguments.");var it=he[0],yt=Fe.parse(he[1],1,Do);if(!yt)return null;if(!Bc(it,yt.type))return Fe.concat(1).error('"'+it+`" comparisons are not supported for type '`+qs(yt.type)+"'.");var Lt=Fe.parse(he[2],2,Do);if(!Lt)return null;if(!Bc(it,Lt.type))return Fe.concat(2).error('"'+it+`" comparisons are not supported for type '`+qs(Lt.type)+"'.");if(yt.type.kind!==Lt.type.kind&&yt.type.kind!=="value"&&Lt.type.kind!=="value")return Fe.error("Cannot compare types '"+qs(yt.type)+"' and '"+qs(Lt.type)+"'.");V&&(yt.type.kind==="value"&&Lt.type.kind!=="value"?yt=new xl(Lt.type,[yt]):yt.type.kind!=="value"&&Lt.type.kind==="value"&&(Lt=new xl(yt.type,[Lt])));var sr=null;if(he.length===4){if(yt.type.kind!=="string"&&Lt.type.kind!=="string"&&yt.type.kind!=="value"&&Lt.type.kind!=="value")return Fe.error("Cannot use collator to compare non-string types.");if(sr=Fe.parse(he[3],3,Vf),!sr)return null}return new $(yt,Lt,sr)},$.prototype.evaluate=function(he){var Fe=this.lhs.evaluate(he),it=this.rhs.evaluate(he);if(V&&this.hasUntypedArgument){var yt=Es(Fe),Lt=Es(it);if(yt.kind!==Lt.kind||!(yt.kind==="string"||yt.kind==="number"))throw new ps('Expected arguments for "'+y+'" to be (string, string) or (number, number), but found ('+yt.kind+", "+Lt.kind+") instead.")}if(this.collator&&!V&&this.hasUntypedArgument){var sr=Es(Fe),gr=Es(it);if(sr.kind!=="string"||gr.kind!=="string")return _(he,Fe,it)}return this.collator?I(he,Fe,it,this.collator.evaluate(he)):_(he,Fe,it)},$.prototype.eachChild=function(he){he(this.lhs),he(this.rhs),this.collator&&he(this.collator)},$.prototype.outputDefined=function(){return!0},$.prototype.serialize=function(){var he=[y];return this.eachChild(function(Fe){he.push(Fe.serialize())}),he},$}()}var Fi=an("==",kt,Wi),ta=an("!=",Zt,dn),Ca=an("<",Mr,wn),Ra=an(">",xr,On),La=an("<=",Kr,Yi),Na=an(">=",Mi,$i),Zn=function(_,I,V,$,ae){this.type=qo,this.number=_,this.locale=I,this.currency=V,this.minFractionDigits=$,this.maxFractionDigits=ae};Zn.parse=function(_,I){if(_.length!==3)return I.error("Expected two arguments.");var V=I.parse(_[1],1,oa);if(!V)return null;var $=_[2];if(typeof $!="object"||Array.isArray($))return I.error("NumberFormat options argument must be an object.");var ae=null;if($.locale&&(ae=I.parse($.locale,1,qo),!ae))return null;var he=null;if($.currency&&(he=I.parse($.currency,1,qo),!he))return null;var Fe=null;if($["min-fraction-digits"]&&(Fe=I.parse($["min-fraction-digits"],1,oa),!Fe))return null;var it=null;return $["max-fraction-digits"]&&(it=I.parse($["max-fraction-digits"],1,oa),!it)?null:new Zn(V,ae,he,Fe,it)},Zn.prototype.evaluate=function(_){return new Intl.NumberFormat(this.locale?this.locale.evaluate(_):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(_):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(_):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(_):void 0}).format(this.number.evaluate(_))},Zn.prototype.eachChild=function(_){_(this.number),this.locale&&_(this.locale),this.currency&&_(this.currency),this.minFractionDigits&&_(this.minFractionDigits),this.maxFractionDigits&&_(this.maxFractionDigits)},Zn.prototype.outputDefined=function(){return!1},Zn.prototype.serialize=function(){var _={};return this.locale&&(_.locale=this.locale.serialize()),this.currency&&(_.currency=this.currency.serialize()),this.minFractionDigits&&(_["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(_["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),_]};var Dn=function(_){this.type=oa,this.input=_};Dn.parse=function(_,I){if(_.length!==2)return I.error("Expected 1 argument, but found "+(_.length-1)+" instead.");var V=I.parse(_[1],1);return V?V.type.kind!=="array"&&V.type.kind!=="string"&&V.type.kind!=="value"?I.error("Expected argument of type string or array, but found "+qs(V.type)+" instead."):new Dn(V):null},Dn.prototype.evaluate=function(_){var I=this.input.evaluate(_);if(typeof I=="string")return I.length;if(Array.isArray(I))return I.length;throw new ps("Expected value to be of type string or array, but found "+qs(Es(I))+" instead.")},Dn.prototype.eachChild=function(_){_(this.input)},Dn.prototype.outputDefined=function(){return!1},Dn.prototype.serialize=function(){var _=["length"];return this.eachChild(function(I){_.push(I.serialize())}),_};var Ka={"==":Fi,"!=":ta,">":Ra,"<":Ca,">=":Na,"<=":La,array:xl,at:Tc,boolean:xl,case:cf,coalesce:Zu,collator:Hu,format:Gu,image:Os,in:wl,"index-of":vu,interpolate:Wl,"interpolate-hcl":Wl,"interpolate-lab":Wl,length:Dn,let:qc,literal:Go,match:Oc,number:xl,"number-format":Zn,object:xl,slice:fc,step:_u,string:xl,"to-boolean":Po,"to-color":Po,"to-number":Po,"to-string":Po,var:Dc,within:Mu};function bo(y,_){var I=_[0],V=_[1],$=_[2],ae=_[3];I=I.evaluate(y),V=V.evaluate(y),$=$.evaluate(y);var he=ae?ae.evaluate(y):1,Fe=lc(I,V,$,he);if(Fe)throw new ps(Fe);return new cs(I/255*he,V/255*he,$/255*he,he)}function Zo(y,_){return y in _}function Ss(y,_){var I=_[y];return typeof I=="undefined"?null:I}function as(y,_,I,V){for(;I<=V;){var $=I+V>>1;if(_[$]===y)return!0;_[$]>y?V=$-1:I=$+1}return!1}function ws(y){return{type:y}}Pa.register(Ka,{error:[rf,[qo],function(y,_){var I=_[0];throw new ps(I.evaluate(y))}],typeof:[qo,[Do],function(y,_){var I=_[0];return qs(Es(I.evaluate(y)))}],"to-rgba":[Jl(oa,4),[Ol],function(y,_){var I=_[0];return I.evaluate(y).toArray()}],rgb:[Ol,[oa,oa,oa],bo],rgba:[Ol,[oa,oa,oa,oa],bo],has:{type:Oo,overloads:[[[qo],function(y,_){var I=_[0];return Zo(I.evaluate(y),y.properties())}],[[qo,Pc],function(y,_){var I=_[0],V=_[1];return Zo(I.evaluate(y),V.evaluate(y))}]]},get:{type:Do,overloads:[[[qo],function(y,_){var I=_[0];return Ss(I.evaluate(y),y.properties())}],[[qo,Pc],function(y,_){var I=_[0],V=_[1];return Ss(I.evaluate(y),V.evaluate(y))}]]},"feature-state":[Do,[qo],function(y,_){var I=_[0];return Ss(I.evaluate(y),y.featureState||{})}],properties:[Pc,[],function(y){return y.properties()}],"geometry-type":[qo,[],function(y){return y.geometryType()}],id:[Do,[],function(y){return y.id()}],zoom:[oa,[],function(y){return y.globals.zoom}],"heatmap-density":[oa,[],function(y){return y.globals.heatmapDensity||0}],"line-progress":[oa,[],function(y){return y.globals.lineProgress||0}],accumulated:[Do,[],function(y){return y.globals.accumulated===void 0?null:y.globals.accumulated}],"+":[oa,ws(oa),function(y,_){for(var I=0,V=0,$=_;V<$.length;V+=1){var ae=$[V];I+=ae.evaluate(y)}return I}],"*":[oa,ws(oa),function(y,_){for(var I=1,V=0,$=_;V<$.length;V+=1){var ae=$[V];I*=ae.evaluate(y)}return I}],"-":{type:oa,overloads:[[[oa,oa],function(y,_){var I=_[0],V=_[1];return I.evaluate(y)-V.evaluate(y)}],[[oa],function(y,_){var I=_[0];return-I.evaluate(y)}]]},"/":[oa,[oa,oa],function(y,_){var I=_[0],V=_[1];return I.evaluate(y)/V.evaluate(y)}],"%":[oa,[oa,oa],function(y,_){var I=_[0],V=_[1];return I.evaluate(y)%V.evaluate(y)}],ln2:[oa,[],function(){return Math.LN2}],pi:[oa,[],function(){return Math.PI}],e:[oa,[],function(){return Math.E}],"^":[oa,[oa,oa],function(y,_){var I=_[0],V=_[1];return Math.pow(I.evaluate(y),V.evaluate(y))}],sqrt:[oa,[oa],function(y,_){var I=_[0];return Math.sqrt(I.evaluate(y))}],log10:[oa,[oa],function(y,_){var I=_[0];return Math.log(I.evaluate(y))/Math.LN10}],ln:[oa,[oa],function(y,_){var I=_[0];return Math.log(I.evaluate(y))}],log2:[oa,[oa],function(y,_){var I=_[0];return Math.log(I.evaluate(y))/Math.LN2}],sin:[oa,[oa],function(y,_){var I=_[0];return Math.sin(I.evaluate(y))}],cos:[oa,[oa],function(y,_){var I=_[0];return Math.cos(I.evaluate(y))}],tan:[oa,[oa],function(y,_){var I=_[0];return Math.tan(I.evaluate(y))}],asin:[oa,[oa],function(y,_){var I=_[0];return Math.asin(I.evaluate(y))}],acos:[oa,[oa],function(y,_){var I=_[0];return Math.acos(I.evaluate(y))}],atan:[oa,[oa],function(y,_){var I=_[0];return Math.atan(I.evaluate(y))}],min:[oa,ws(oa),function(y,_){return Math.min.apply(Math,_.map(function(I){return I.evaluate(y)}))}],max:[oa,ws(oa),function(y,_){return Math.max.apply(Math,_.map(function(I){return I.evaluate(y)}))}],abs:[oa,[oa],function(y,_){var I=_[0];return Math.abs(I.evaluate(y))}],round:[oa,[oa],function(y,_){var I=_[0],V=I.evaluate(y);return V<0?-Math.round(-V):Math.round(V)}],floor:[oa,[oa],function(y,_){var I=_[0];return Math.floor(I.evaluate(y))}],ceil:[oa,[oa],function(y,_){var I=_[0];return Math.ceil(I.evaluate(y))}],"filter-==":[Oo,[qo,Do],function(y,_){var I=_[0],V=_[1];return y.properties()[I.value]===V.value}],"filter-id-==":[Oo,[Do],function(y,_){var I=_[0];return y.id()===I.value}],"filter-type-==":[Oo,[qo],function(y,_){var I=_[0];return y.geometryType()===I.value}],"filter-<":[Oo,[qo,Do],function(y,_){var I=_[0],V=_[1],$=y.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$<ae}],"filter-id-<":[Oo,[Do],function(y,_){var I=_[0],V=y.id(),$=I.value;return typeof V==typeof $&&V<$}],"filter->":[Oo,[qo,Do],function(y,_){var I=_[0],V=_[1],$=y.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$>ae}],"filter-id->":[Oo,[Do],function(y,_){var I=_[0],V=y.id(),$=I.value;return typeof V==typeof $&&V>$}],"filter-<=":[Oo,[qo,Do],function(y,_){var I=_[0],V=_[1],$=y.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$<=ae}],"filter-id-<=":[Oo,[Do],function(y,_){var I=_[0],V=y.id(),$=I.value;return typeof V==typeof $&&V<=$}],"filter->=":[Oo,[qo,Do],function(y,_){var I=_[0],V=_[1],$=y.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$>=ae}],"filter-id->=":[Oo,[Do],function(y,_){var I=_[0],V=y.id(),$=I.value;return typeof V==typeof $&&V>=$}],"filter-has":[Oo,[Do],function(y,_){var I=_[0];return I.value in y.properties()}],"filter-has-id":[Oo,[],function(y){return y.id()!==null&&y.id()!==void 0}],"filter-type-in":[Oo,[Jl(qo)],function(y,_){var I=_[0];return I.value.indexOf(y.geometryType())>=0}],"filter-id-in":[Oo,[Jl(Do)],function(y,_){var I=_[0];return I.value.indexOf(y.id())>=0}],"filter-in-small":[Oo,[qo,Jl(Do)],function(y,_){var I=_[0],V=_[1];return V.value.indexOf(y.properties()[I.value])>=0}],"filter-in-large":[Oo,[qo,Jl(Do)],function(y,_){var I=_[0],V=_[1];return as(y.properties()[I.value],V.value,0,V.value.length-1)}],all:{type:Oo,overloads:[[[Oo,Oo],function(y,_){var I=_[0],V=_[1];return I.evaluate(y)&&V.evaluate(y)}],[ws(Oo),function(y,_){for(var I=0,V=_;I<V.length;I+=1){var $=V[I];if(!$.evaluate(y))return!1}return!0}]]},any:{type:Oo,overloads:[[[Oo,Oo],function(y,_){var I=_[0],V=_[1];return I.evaluate(y)||V.evaluate(y)}],[ws(Oo),function(y,_){for(var I=0,V=_;I<V.length;I+=1){var $=V[I];if($.evaluate(y))return!0}return!1}]]},"!":[Oo,[Oo],function(y,_){var I=_[0];return!I.evaluate(y)}],"is-supported-script":[Oo,[qo],function(y,_){var I=_[0],V=y.globals&&y.globals.isSupportedScript;return V?V(I.evaluate(y)):!0}],upcase:[qo,[qo],function(y,_){var I=_[0];return I.evaluate(y).toUpperCase()}],downcase:[qo,[qo],function(y,_){var I=_[0];return I.evaluate(y).toLowerCase()}],concat:[qo,ws(Do),function(y,_){return _.map(function(I){return Hs(I.evaluate(y))}).join("")}],"resolved-locale":[qo,[Vf],function(y,_){var I=_[0];return I.evaluate(y).resolvedLocale()}]});function Ho(y){return{result:"success",value:y}}function ml(y){return{result:"error",value:y}}function Ws(y){return y["property-type"]==="data-driven"||y["property-type"]==="cross-faded-data-driven"}function Ls(y){return!!y.expression&&y.expression.parameters.indexOf("zoom")>-1}function va(y){return!!y.expression&&y.expression.interpolated}function no(y){return y instanceof Number?"number":y instanceof String?"string":y instanceof Boolean?"boolean":Array.isArray(y)?"array":y===null?"null":typeof y}function ys(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function rs(y){return y}function Ql(y,_){var I=_.type==="color",V=y.stops&&typeof y.stops[0][0]=="object",$=V||y.property!==void 0,ae=V||!$,he=y.type||(va(_)?"exponential":"interval");if(I&&(y=ql({},y),y.stops&&(y.stops=y.stops.map(function(ha){return[ha[0],cs.parse(ha[1])]})),y.default?y.default=cs.parse(y.default):y.default=cs.parse(_.default)),y.colorSpace&&y.colorSpace!=="rgb"&&!Zf[y.colorSpace])throw new Error("Unknown color space: "+y.colorSpace);var Fe,it,yt;if(he==="exponential")Fe=pu;else if(he==="interval")Fe=Nc;else if(he==="categorical"){Fe=Yu,it=Object.create(null);for(var Lt=0,sr=y.stops;Lt<sr.length;Lt+=1){var gr=sr[Lt];it[gr[0]]=gr[1]}yt=typeof y.stops[0][0]}else if(he==="identity")Fe=Uc;else throw new Error('Unknown function type "'+he+'"');if(V){for(var hr={},Rr=[],ni=0;ni<y.stops.length;ni++){var Hi=y.stops[ni],wi=Hi[0].zoom;hr[wi]===void 0&&(hr[wi]={zoom:wi,type:y.type,property:y.property,default:y.default,stops:[]},Rr.push(wi)),hr[wi].stops.push([Hi[0].value,Hi[1]])}for(var bn=[],rn=0,xn=Rr;rn<xn.length;rn+=1){var In=xn[rn];bn.push([hr[In].zoom,Ql(hr[In],_)])}var Xn={name:"linear"};return{kind:"composite",interpolationType:Xn,interpolationFactor:Wl.interpolationFactor.bind(void 0,Xn),zoomStops:bn.map(function(ha){return ha[0]}),evaluate:function(eo,za){var Za=eo.zoom;return pu({stops:bn,base:y.base},_,Za).evaluate(Za,za)}}}else if(ae){var ga=he==="exponential"?{name:"exponential",base:y.base!==void 0?y.base:1}:null;return{kind:"camera",interpolationType:ga,interpolationFactor:Wl.interpolationFactor.bind(void 0,ga),zoomStops:y.stops.map(function(ha){return ha[0]}),evaluate:function(ha){var eo=ha.zoom;return Fe(y,_,eo,it,yt)}}}else return{kind:"source",evaluate:function(eo,za){var Za=za&&za.properties?za.properties[y.property]:void 0;return Za===void 0?Cu(y.default,_.default):Fe(y,_,Za,it,yt)}}}function Cu(y,_,I){if(y!==void 0)return y;if(_!==void 0)return _;if(I!==void 0)return I}function Yu(y,_,I,V,$){var ae=typeof I===$?V[I]:void 0;return Cu(ae,y.default,_.default)}function Nc(y,_,I){if(no(I)!=="number")return Cu(y.default,_.default);var V=y.stops.length;if(V===1||I<=y.stops[0][0])return y.stops[0][1];if(I>=y.stops[V-1][0])return y.stops[V-1][1];var $=hu(y.stops.map(function(ae){return ae[0]}),I);return y.stops[$][1]}function pu(y,_,I){var V=y.base!==void 0?y.base:1;if(no(I)!=="number")return Cu(y.default,_.default);var $=y.stops.length;if($===1||I<=y.stops[0][0])return y.stops[0][1];if(I>=y.stops[$-1][0])return y.stops[$-1][1];var ae=hu(y.stops.map(function(sr){return sr[0]}),I),he=xu(I,V,y.stops[ae][0],y.stops[ae+1][0]),Fe=y.stops[ae][1],it=y.stops[ae+1][1],yt=zu[_.type]||rs;if(y.colorSpace&&y.colorSpace!=="rgb"){var Lt=Zf[y.colorSpace];yt=function(sr,gr){return Lt.reverse(Lt.interpolate(Lt.forward(sr),Lt.forward(gr),he))}}return typeof Fe.evaluate=="function"?{evaluate:function(){for(var gr=[],hr=arguments.length;hr--;)gr[hr]=arguments[hr];var Rr=Fe.evaluate.apply(void 0,gr),ni=it.evaluate.apply(void 0,gr);if(!(Rr===void 0||ni===void 0))return yt(Rr,ni,he)}}:yt(Fe,it,he)}function Uc(y,_,I){return _.type==="color"?I=cs.parse(I):_.type==="formatted"?I=$l.fromString(I.toString()):_.type==="resolvedImage"?I=fl.fromString(I.toString()):no(I)!==_.type&&(_.type!=="enum"||!_.values[I])&&(I=void 0),Cu(I,y.default,_.default)}function xu(y,_,I,V){var $=V-I,ae=y-I;return $===0?0:_===1?ae/$:(Math.pow(_,ae)-1)/(Math.pow(_,$)-1)}var Ac=function(_,I){this.expression=_,this._warningHistory={},this._evaluator=new Ko,this._defaultValue=I?ee(I):null,this._enumValues=I&&I.type==="enum"?I.values:null};Ac.prototype.evaluateWithoutErrorHandling=function(_,I,V,$,ae,he){return this._evaluator.globals=_,this._evaluator.feature=I,this._evaluator.featureState=V,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he,this.expression.evaluate(this._evaluator)},Ac.prototype.evaluate=function(_,I,V,$,ae,he){this._evaluator.globals=_,this._evaluator.feature=I||null,this._evaluator.featureState=V||null,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he||null;try{var Fe=this.expression.evaluate(this._evaluator);if(Fe==null||typeof Fe=="number"&&Fe!==Fe)return this._defaultValue;if(this._enumValues&&!(Fe in this._enumValues))throw new ps("Expected value to be one of "+Object.keys(this._enumValues).map(function(it){return JSON.stringify(it)}).join(", ")+", but found "+JSON.stringify(Fe)+" instead.");return Fe}catch(it){return this._warningHistory[it.message]||(this._warningHistory[it.message]=!0,typeof console!="undefined"&&console.warn(it.message)),this._defaultValue}};function Ua(y){return Array.isArray(y)&&y.length>0&&typeof y[0]=="string"&&y[0]in Ka}function oo(y,_){var I=new ks(Ka,[],_?Q(_):void 0),V=I.parse(y,void 0,void 0,void 0,_&&_.type==="string"?{typeAnnotation:"coerce"}:void 0);return V?Ho(new Ac(V,_)):ml(I.errors)}var Vc=function(_,I){this.kind=_,this._styleExpression=I,this.isStateDependent=_!=="constant"&&!js(I.expression)};Vc.prototype.evaluateWithoutErrorHandling=function(_,I,V,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(_,I,V,$,ae,he)},Vc.prototype.evaluate=function(_,I,V,$,ae,he){return this._styleExpression.evaluate(_,I,V,$,ae,he)};var hc=function(_,I,V,$){this.kind=_,this.zoomStops=V,this._styleExpression=I,this.isStateDependent=_!=="camera"&&!js(I.expression),this.interpolationType=$};hc.prototype.evaluateWithoutErrorHandling=function(_,I,V,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(_,I,V,$,ae,he)},hc.prototype.evaluate=function(_,I,V,$,ae,he){return this._styleExpression.evaluate(_,I,V,$,ae,he)},hc.prototype.interpolationFactor=function(_,I,V){return this.interpolationType?Wl.interpolationFactor(this.interpolationType,_,I,V):0};function Ku(y,_){if(y=oo(y,_),y.result==="error")return y;var I=y.value.expression,V=ih(I);if(!V&&!Ws(_))return ml([new Ns("","data expressions not supported")]);var $=Eu(I,["zoom"]);if(!$&&!Ls(_))return ml([new Ns("","zoom expressions not supported")]);var ae=B(I);if(!ae&&!$)return ml([new Ns("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ae instanceof Ns)return ml([ae]);if(ae instanceof Wl&&!va(_))return ml([new Ns("",'"interpolate" expressions cannot be used with this property')]);if(!ae)return Ho(V?new Vc("constant",y.value):new Vc("source",y.value));var he=ae instanceof Wl?ae.interpolation:void 0;return Ho(V?new hc("camera",y.value,ae.labels,he):new hc("composite",y.value,ae.labels,he))}var ue=function(_,I){this._parameters=_,this._specification=I,ql(this,Ql(this._parameters,this._specification))};ue.deserialize=function(_){return new ue(_._parameters,_._specification)},ue.serialize=function(_){return{_parameters:_._parameters,_specification:_._specification}};function w(y,_){if(ys(y))return new ue(y,_);if(Ua(y)){var I=Ku(y,_);if(I.result==="error")throw new Error(I.value.map(function($){return $.key+": "+$.message}).join(", "));return I.value}else{var V=y;return typeof y=="string"&&_.type==="color"&&(V=cs.parse(y)),{kind:"constant",evaluate:function(){return V}}}}function B(y){var _=null;if(y instanceof qc)_=B(y.result);else if(y instanceof Zu)for(var I=0,V=y.args;I<V.length;I+=1){var $=V[I];if(_=B($),_)break}else(y instanceof _u||y instanceof Wl)&&y.input instanceof Pa&&y.input.name==="zoom"&&(_=y);return _ instanceof Ns||y.eachChild(function(ae){var he=B(ae);he instanceof Ns?_=he:!_&&he?_=new Ns("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):_&&he&&_!==he&&(_=new Ns("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),_}function Q(y){var _={color:Ol,string:qo,number:oa,enum:qo,boolean:Oo,formatted:pl,resolvedImage:Zc};return y.type==="array"?Jl(_[y.value]||Do,y.length):_[y.type]}function ee(y){return y.type==="color"&&ys(y.default)?new cs(0,0,0,0):y.type==="color"?cs.parse(y.default)||null:y.default===void 0?null:y.default}function le(y){var _=y.key,I=y.value,V=y.valueSpec||{},$=y.objectElementValidators||{},ae=y.style,he=y.styleSpec,Fe=[],it=no(I);if(it!=="object")return[new _a(_,I,"object expected, "+it+" found")];for(var yt in I){var Lt=yt.split(".")[0],sr=V[Lt]||V["*"],gr=void 0;if($[Lt])gr=$[Lt];else if(V[Lt])gr=Qa;else if($["*"])gr=$["*"];else if(V["*"])gr=Qa;else{Fe.push(new _a(_,I[yt],'unknown property "'+yt+'"'));continue}Fe=Fe.concat(gr({key:(_&&_+".")+yt,value:I[yt],valueSpec:sr,style:ae,styleSpec:he,object:I,objectKey:yt},I))}for(var hr in V)$[hr]||V[hr].required&&V[hr].default===void 0&&I[hr]===void 0&&Fe.push(new _a(_,I,'missing required property "'+hr+'"'));return Fe}function ze(y){var _=y.value,I=y.valueSpec,V=y.style,$=y.styleSpec,ae=y.key,he=y.arrayElementValidator||Qa;if(no(_)!=="array")return[new _a(ae,_,"array expected, "+no(_)+" found")];if(I.length&&_.length!==I.length)return[new _a(ae,_,"array length "+I.length+" expected, length "+_.length+" found")];if(I["min-length"]&&_.length<I["min-length"])return[new _a(ae,_,"array length at least "+I["min-length"]+" expected, length "+_.length+" found")];var Fe={type:I.value,values:I.values};$.$version<7&&(Fe.function=I.function),no(I.value)==="object"&&(Fe=I.value);for(var it=[],yt=0;yt<_.length;yt++)it=it.concat(he({array:_,arrayIndex:yt,value:_[yt],valueSpec:Fe,style:V,styleSpec:$,key:ae+"["+yt+"]"}));return it}function Ze(y){var _=y.key,I=y.value,V=y.valueSpec,$=no(I);return $==="number"&&I!==I&&($="NaN"),$!=="number"?[new _a(_,I,"number expected, "+$+" found")]:"minimum"in V&&I<V.minimum?[new _a(_,I,I+" is less than the minimum value "+V.minimum)]:"maximum"in V&&I>V.maximum?[new _a(_,I,I+" is greater than the maximum value "+V.maximum)]:[]}function ut(y){var _=y.valueSpec,I=xo(y.value.type),V,$={},ae,he,Fe=I!=="categorical"&&y.value.property===void 0,it=!Fe,yt=no(y.value.stops)==="array"&&no(y.value.stops[0])==="array"&&no(y.value.stops[0][0])==="object",Lt=le({key:y.key,value:y.value,valueSpec:y.styleSpec.function,style:y.style,styleSpec:y.styleSpec,objectElementValidators:{stops:sr,default:Rr}});return I==="identity"&&Fe&&Lt.push(new _a(y.key,y.value,'missing required property "property"')),I!=="identity"&&!y.value.stops&&Lt.push(new _a(y.key,y.value,'missing required property "stops"')),I==="exponential"&&y.valueSpec.expression&&!va(y.valueSpec)&&Lt.push(new _a(y.key,y.value,"exponential functions not supported")),y.styleSpec.$version>=8&&(it&&!Ws(y.valueSpec)?Lt.push(new _a(y.key,y.value,"property functions not supported")):Fe&&!Ls(y.valueSpec)&&Lt.push(new _a(y.key,y.value,"zoom functions not supported"))),(I==="categorical"||yt)&&y.value.property===void 0&&Lt.push(new _a(y.key,y.value,'"property" property is required')),Lt;function sr(ni){if(I==="identity")return[new _a(ni.key,ni.value,'identity function may not have a "stops" property')];var Hi=[],wi=ni.value;return Hi=Hi.concat(ze({key:ni.key,value:wi,valueSpec:ni.valueSpec,style:ni.style,styleSpec:ni.styleSpec,arrayElementValidator:gr})),no(wi)==="array"&&wi.length===0&&Hi.push(new _a(ni.key,wi,"array must have at least one stop")),Hi}function gr(ni){var Hi=[],wi=ni.value,bn=ni.key;if(no(wi)!=="array")return[new _a(bn,wi,"array expected, "+no(wi)+" found")];if(wi.length!==2)return[new _a(bn,wi,"array length 2 expected, length "+wi.length+" found")];if(yt){if(no(wi[0])!=="object")return[new _a(bn,wi,"object expected, "+no(wi[0])+" found")];if(wi[0].zoom===void 0)return[new _a(bn,wi,"object stop key must have zoom")];if(wi[0].value===void 0)return[new _a(bn,wi,"object stop key must have value")];if(he&&he>xo(wi[0].zoom))return[new _a(bn,wi[0].zoom,"stop zoom values must appear in ascending order")];xo(wi[0].zoom)!==he&&(he=xo(wi[0].zoom),ae=void 0,$={}),Hi=Hi.concat(le({key:bn+"[0]",value:wi[0],valueSpec:{zoom:{}},style:ni.style,styleSpec:ni.styleSpec,objectElementValidators:{zoom:Ze,value:hr}}))}else Hi=Hi.concat(hr({key:bn+"[0]",value:wi[0],valueSpec:{},style:ni.style,styleSpec:ni.styleSpec},wi));return Ua(Kl(wi[1]))?Hi.concat([new _a(bn+"[1]",wi[1],"expressions are not allowed in function stops.")]):Hi.concat(Qa({key:bn+"[1]",value:wi[1],valueSpec:_,style:ni.style,styleSpec:ni.styleSpec}))}function hr(ni,Hi){var wi=no(ni.value),bn=xo(ni.value),rn=ni.value!==null?ni.value:Hi;if(!V)V=wi;else if(wi!==V)return[new _a(ni.key,rn,wi+" stop domain type must match previous stop domain type "+V)];if(wi!=="number"&&wi!=="string"&&wi!=="boolean")return[new _a(ni.key,rn,"stop domain value must be a number, string, or boolean")];if(wi!=="number"&&I!=="categorical"){var xn="number expected, "+wi+" found";return Ws(_)&&I===void 0&&(xn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _a(ni.key,rn,xn)]}return I==="categorical"&&wi==="number"&&(!isFinite(bn)||Math.floor(bn)!==bn)?[new _a(ni.key,rn,"integer expected, found "+bn)]:I!=="categorical"&&wi==="number"&&ae!==void 0&&bn<ae?[new _a(ni.key,rn,"stop domain values must appear in ascending order")]:(ae=bn,I==="categorical"&&bn in $?[new _a(ni.key,rn,"stop domain values must be unique")]:($[bn]=!0,[]))}function Rr(ni){return Qa({key:ni.key,value:ni.value,valueSpec:_,style:ni.style,styleSpec:ni.styleSpec})}}function Mt(y){var _=(y.expressionContext==="property"?Ku:oo)(Kl(y.value),y.valueSpec);if(_.result==="error")return _.value.map(function(V){return new _a(""+y.key+V.key,y.value,V.message)});var I=_.value.expression||_.value._styleExpression.expression;if(y.expressionContext==="property"&&y.propertyKey==="text-font"&&!I.outputDefined())return[new _a(y.key,y.value,'Invalid data expression for "'+y.propertyKey+'". Output values must be contained as literals within the expression.')];if(y.expressionContext==="property"&&y.propertyType==="layout"&&!js(I))return[new _a(y.key,y.value,'"feature-state" data expressions are not supported with layout properties.')];if(y.expressionContext==="filter"&&!js(I))return[new _a(y.key,y.value,'"feature-state" data expressions are not supported with filters.')];if(y.expressionContext&&y.expressionContext.indexOf("cluster")===0){if(!Eu(I,["zoom","feature-state"]))return[new _a(y.key,y.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(y.expressionContext==="cluster-initial"&&!ih(I))return[new _a(y.key,y.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Jt(y){var _=y.value,I=y.key,V=no(_);return V!=="boolean"?[new _a(I,_,"boolean expected, "+V+" found")]:[]}function $t(y){var _=y.key,I=y.value,V=no(I);return V!=="string"?[new _a(_,I,"color expected, "+V+" found")]:Lf(I)===null?[new _a(_,I,'color expected, "'+I+'" found')]:[]}function mr(y){var _=y.key,I=y.value,V=y.valueSpec,$=[];return Array.isArray(V.values)?V.values.indexOf(xo(I))===-1&&$.push(new _a(_,I,"expected one of ["+V.values.join(", ")+"], "+JSON.stringify(I)+" found")):Object.keys(V.values).indexOf(xo(I))===-1&&$.push(new _a(_,I,"expected one of ["+Object.keys(V.values).join(", ")+"], "+JSON.stringify(I)+" found")),$}function Cr(y){if(y===!0||y===!1)return!0;if(!Array.isArray(y)||y.length===0)return!1;switch(y[0]){case"has":return y.length>=2&&y[1]!=="$id"&&y[1]!=="$type";case"in":return y.length>=3&&(typeof y[1]!="string"||Array.isArray(y[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return y.length!==3||Array.isArray(y[1])||Array.isArray(y[2]);case"any":case"all":for(var _=0,I=y.slice(1);_<I.length;_+=1){var V=I[_];if(!Cr(V)&&typeof V!="boolean")return!1}return!0;default:return!0}}var ve={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function xe(y){if(y==null)return{filter:function(){return!0},needGeometry:!1};Cr(y)||(y=Qe(y));var _=oo(y,ve);if(_.result==="error")throw new Error(_.value.map(function(V){return V.key+": "+V.message}).join(", "));var I=qe(y);return{filter:function(V,$,ae){return _.value.evaluate(V,$,{},ae)},needGeometry:I}}function Ie(y,_){return y<_?-1:y>_?1:0}function qe(y){if(!Array.isArray(y))return!1;if(y[0]==="within")return!0;for(var _=1;_<y.length;_++)if(qe(y[_]))return!0;return!1}function Qe(y){if(!y)return!0;var _=y[0];if(y.length<=1)return _!=="any";var I=_==="=="?Xe(y[1],y[2],"=="):_==="!="?ar(Xe(y[1],y[2],"==")):_==="<"||_===">"||_==="<="||_===">="?Xe(y[1],y[2],_):_==="any"?nt(y.slice(1)):_==="all"?["all"].concat(y.slice(1).map(Qe)):_==="none"?["all"].concat(y.slice(1).map(Qe).map(ar)):_==="in"?qt(y[1],y.slice(2)):_==="!in"?ar(qt(y[1],y.slice(2))):_==="has"?jt(y[1]):_==="!has"?ar(jt(y[1])):_==="within"?y:!0;return I}function Xe(y,_,I){switch(y){case"$type":return["filter-type-"+I,_];case"$id":return["filter-id-"+I,_];default:return["filter-"+I,y,_]}}function nt(y){return["any"].concat(y.map(Qe))}function qt(y,_){if(_.length===0)return!1;switch(y){case"$type":return["filter-type-in",["literal",_]];case"$id":return["filter-id-in",["literal",_]];default:return _.length>200&&!_.some(function(I){return typeof I!=typeof _[0]})?["filter-in-large",y,["literal",_.sort(Ie)]]:["filter-in-small",y,["literal",_]]}}function jt(y){switch(y){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",y]}}function ar(y){return["!",y]}function fr(y){return Cr(Kl(y.value))?Mt(ql({},y,{expressionContext:"filter",valueSpec:{value:"boolean"}})):br(y)}function br(y){var _=y.value,I=y.key;if(no(_)!=="array")return[new _a(I,_,"array expected, "+no(_)+" found")];var V=y.styleSpec,$,ae=[];if(_.length<1)return[new _a(I,_,"filter array must have at least 1 element")];switch(ae=ae.concat(mr({key:I+"[0]",value:_[0],valueSpec:V.filter_operator,style:y.style,styleSpec:y.styleSpec})),xo(_[0])){case"<":case"<=":case">":case">=":_.length>=2&&xo(_[1])==="$type"&&ae.push(new _a(I,_,'"$type" cannot be use with operator "'+_[0]+'"'));case"==":case"!=":_.length!==3&&ae.push(new _a(I,_,'filter array for operator "'+_[0]+'" must have 3 elements'));case"in":case"!in":_.length>=2&&($=no(_[1]),$!=="string"&&ae.push(new _a(I+"[1]",_[1],"string expected, "+$+" found")));for(var he=2;he<_.length;he++)$=no(_[he]),xo(_[1])==="$type"?ae=ae.concat(mr({key:I+"["+he+"]",value:_[he],valueSpec:V.geometry_type,style:y.style,styleSpec:y.styleSpec})):$!=="string"&&$!=="number"&&$!=="boolean"&&ae.push(new _a(I+"["+he+"]",_[he],"string, number, or boolean expected, "+$+" found"));break;case"any":case"all":case"none":for(var Fe=1;Fe<_.length;Fe++)ae=ae.concat(br({key:I+"["+Fe+"]",value:_[Fe],style:y.style,styleSpec:y.styleSpec}));break;case"has":case"!has":$=no(_[1]),_.length!==2?ae.push(new _a(I,_,'filter array for "'+_[0]+'" operator must have 2 elements')):$!=="string"&&ae.push(new _a(I+"[1]",_[1],"string expected, "+$+" found"));break;case"within":$=no(_[1]),_.length!==2?ae.push(new _a(I,_,'filter array for "'+_[0]+'" operator must have 2 elements')):$!=="object"&&ae.push(new _a(I+"[1]",_[1],"object expected, "+$+" found"));break}return ae}function Fr(y,_){var I=y.key,V=y.style,$=y.styleSpec,ae=y.value,he=y.objectKey,Fe=$[_+"_"+y.layerType];if(!Fe)return[];var it=he.match(/^(.*)-transition$/);if(_==="paint"&&it&&Fe[it[1]]&&Fe[it[1]].transition)return Qa({key:I,value:ae,valueSpec:$.transition,style:V,styleSpec:$});var yt=y.valueSpec||Fe[he];if(!yt)return[new _a(I,ae,'unknown property "'+he+'"')];var Lt;if(no(ae)==="string"&&Ws(yt)&&!yt.tokens&&(Lt=/^{([^}]+)}$/.exec(ae)))return[new _a(I,ae,'"'+he+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(Lt[1])+" }`.")];var sr=[];return y.layerType==="symbol"&&(he==="text-field"&&V&&!V.glyphs&&sr.push(new _a(I,ae,'use of "text-field" requires a style "glyphs" property')),he==="text-font"&&ys(Kl(ae))&&xo(ae.type)==="identity"&&sr.push(new _a(I,ae,'"text-font" does not support identity functions'))),sr.concat(Qa({key:y.key,value:ae,valueSpec:yt,style:V,styleSpec:$,expressionContext:"property",propertyType:_,propertyKey:he}))}function Hr(y){return Fr(y,"paint")}function ri(y){return Fr(y,"layout")}function Ci(y){var _=[],I=y.value,V=y.key,$=y.style,ae=y.styleSpec;!I.type&&!I.ref&&_.push(new _a(V,I,'either "type" or "ref" is required'));var he=xo(I.type),Fe=xo(I.ref);if(I.id)for(var it=xo(I.id),yt=0;yt<y.arrayIndex;yt++){var Lt=$.layers[yt];xo(Lt.id)===it&&_.push(new _a(V,I.id,'duplicate layer id "'+I.id+'", previously used at line '+Lt.id.__line__))}if("ref"in I){["type","source","source-layer","filter","layout"].forEach(function(Rr){Rr in I&&_.push(new _a(V,I[Rr],'"'+Rr+'" is prohibited for ref layers'))});var sr;$.layers.forEach(function(Rr){xo(Rr.id)===Fe&&(sr=Rr)}),sr?sr.ref?_.push(new _a(V,I.ref,"ref cannot reference another ref layer")):he=xo(sr.type):_.push(new _a(V,I.ref,'ref layer "'+Fe+'" not found'))}else if(he!=="background")if(!I.source)_.push(new _a(V,I,'missing required property "source"'));else{var gr=$.sources&&$.sources[I.source],hr=gr&&xo(gr.type);gr?hr==="vector"&&he==="raster"?_.push(new _a(V,I.source,'layer "'+I.id+'" requires a raster source')):hr==="raster"&&he!=="raster"?_.push(new _a(V,I.source,'layer "'+I.id+'" requires a vector source')):hr==="vector"&&!I["source-layer"]?_.push(new _a(V,I,'layer "'+I.id+'" must specify a "source-layer"')):hr==="raster-dem"&&he!=="hillshade"?_.push(new _a(V,I.source,"raster-dem source can only be used with layer type 'hillshade'.")):he==="line"&&I.paint&&I.paint["line-gradient"]&&(hr!=="geojson"||!gr.lineMetrics)&&_.push(new _a(V,I,'layer "'+I.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):_.push(new _a(V,I.source,'source "'+I.source+'" not found'))}return _=_.concat(le({key:V,value:I,valueSpec:ae.layer,style:y.style,styleSpec:y.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Qa({key:V+".type",value:I.type,valueSpec:ae.layer.type,style:y.style,styleSpec:y.styleSpec,object:I,objectKey:"type"})},filter:fr,layout:function(ni){return le({layer:I,key:ni.key,value:ni.value,style:ni.style,styleSpec:ni.styleSpec,objectElementValidators:{"*":function(wi){return ri(ql({layerType:he},wi))}}})},paint:function(ni){return le({layer:I,key:ni.key,value:ni.value,style:ni.style,styleSpec:ni.styleSpec,objectElementValidators:{"*":function(wi){return Hr(ql({layerType:he},wi))}}})}}})),_}function cn(y){var _=y.value,I=y.key,V=no(_);return V!=="string"?[new _a(I,_,"string expected, "+V+" found")]:[]}var sn={promoteId:Yn};function Ln(y){var _=y.value,I=y.key,V=y.styleSpec,$=y.style;if(!_.type)return[new _a(I,_,'"type" is required')];var ae=xo(_.type),he;switch(ae){case"vector":case"raster":case"raster-dem":return he=le({key:I,value:_,valueSpec:V["source_"+ae.replace("-","_")],style:y.style,styleSpec:V,objectElementValidators:sn}),he;case"geojson":if(he=le({key:I,value:_,valueSpec:V.source_geojson,style:$,styleSpec:V,objectElementValidators:sn}),_.cluster)for(var Fe in _.clusterProperties){var it=_.clusterProperties[Fe],yt=it[0],Lt=it[1],sr=typeof yt=="string"?[yt,["accumulated"],["get",Fe]]:yt;he.push.apply(he,Mt({key:I+"."+Fe+".map",value:Lt,expressionContext:"cluster-map"})),he.push.apply(he,Mt({key:I+"."+Fe+".reduce",value:sr,expressionContext:"cluster-reduce"}))}return he;case"video":return le({key:I,value:_,valueSpec:V.source_video,style:$,styleSpec:V});case"image":return le({key:I,value:_,valueSpec:V.source_image,style:$,styleSpec:V});case"canvas":return[new _a(I,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return mr({key:I+".type",value:_.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:$,styleSpec:V})}}function Yn(y){var _=y.key,I=y.value;if(no(I)==="string")return cn({key:_,value:I});var V=[];for(var $ in I)V.push.apply(V,cn({key:_+"."+$,value:I[$]}));return V}function Aa(y){var _=y.value,I=y.styleSpec,V=I.light,$=y.style,ae=[],he=no(_);if(_===void 0)return ae;if(he!=="object")return ae=ae.concat([new _a("light",_,"object expected, "+he+" found")]),ae;for(var Fe in _){var it=Fe.match(/^(.*)-transition$/);it&&V[it[1]]&&V[it[1]].transition?ae=ae.concat(Qa({key:Fe,value:_[Fe],valueSpec:I.transition,style:$,styleSpec:I})):V[Fe]?ae=ae.concat(Qa({key:Fe,value:_[Fe],valueSpec:V[Fe],style:$,styleSpec:I})):ae=ae.concat([new _a(Fe,_[Fe],'unknown property "'+Fe+'"')])}return ae}function fa(y){return cn(y).length===0?[]:Mt(y)}function $a(y){return cn(y).length===0?[]:Mt(y)}var Co={"*":function(){return[]},array:ze,boolean:Jt,number:Ze,color:$t,constants:Vu,enum:mr,filter:fr,function:ut,layer:Ci,object:le,source:Ln,light:Aa,string:cn,formatted:fa,resolvedImage:$a};function Qa(y){var _=y.value,I=y.valueSpec,V=y.styleSpec;if(I.expression&&ys(xo(_)))return ut(y);if(I.expression&&Ua(Kl(_)))return Mt(y);if(I.type&&Co[I.type])return Co[I.type](y);var $=le(ql({},y,{valueSpec:I.type?V[I.type]:I}));return $}function mo(y){var _=y.value,I=y.key,V=cn(y);return V.length||(_.indexOf("{fontstack}")===-1&&V.push(new _a(I,_,'"glyphs" url must include a "{fontstack}" token')),_.indexOf("{range}")===-1&&V.push(new _a(I,_,'"glyphs" url must include a "{range}" token'))),V}function Bo(y,_){_===void 0&&(_=Rn);var I=[];return I=I.concat(Qa({key:"",value:y,valueSpec:_.$root,styleSpec:_,style:y,objectElementValidators:{glyphs:mo,"*":function(){return[]}}})),y.constants&&(I=I.concat(Vu({key:"constants",value:y.constants,style:y,styleSpec:_}))),Ps(I)}Bo.source=Ts(Ln),Bo.light=Ts(Aa),Bo.layer=Ts(Ci),Bo.filter=Ts(fr),Bo.paintProperty=Ts(Hr),Bo.layoutProperty=Ts(ri);function Ps(y){return[].concat(y).sort(function(_,I){return _.line-I.line})}function Ts(y){return function(){for(var _=[],I=arguments.length;I--;)_[I]=arguments[I];return Ps(y.apply(this,_))}}var wo=Bo,To=wo.light,hl=wo.paintProperty,Ul=wo.layoutProperty;function Lu(y,_){var I=!1;if(_&&_.length)for(var V=0,$=_;V<$.length;V+=1){var ae=$[V];y.fire(new da(new Error(ae.message))),I=!0}return I}var au=eu,Js=3;function eu(y,_,I){var V=this.cells=[];if(y instanceof ArrayBuffer){this.arrayBuffer=y;var $=new Int32Array(this.arrayBuffer);y=$[0],_=$[1],I=$[2],this.d=_+2*I;for(var ae=0;ae<this.d*this.d;ae++){var he=$[Js+ae],Fe=$[Js+ae+1];V.push(he===Fe?null:$.subarray(he,Fe))}var it=$[Js+V.length],yt=$[Js+V.length+1];this.keys=$.subarray(it,yt),this.bboxes=$.subarray(yt),this.insert=this._insertReadonly}else{this.d=_+2*I;for(var Lt=0;Lt<this.d*this.d;Lt++)V.push([]);this.keys=[],this.bboxes=[]}this.n=_,this.extent=y,this.padding=I,this.scale=_/y,this.uid=0;var sr=I/_*y;this.min=-sr,this.max=y+sr}eu.prototype.insert=function(y,_,I,V,$){this._forEachCell(_,I,V,$,this._insertCell,this.uid++),this.keys.push(y),this.bboxes.push(_),this.bboxes.push(I),this.bboxes.push(V),this.bboxes.push($)},eu.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},eu.prototype._insertCell=function(y,_,I,V,$,ae){this.cells[$].push(ae)},eu.prototype.query=function(y,_,I,V,$){var ae=this.min,he=this.max;if(y<=ae&&_<=ae&&he<=I&&he<=V&&!$)return Array.prototype.slice.call(this.keys);var Fe=[],it={};return this._forEachCell(y,_,I,V,this._queryCell,Fe,it,$),Fe},eu.prototype._queryCell=function(y,_,I,V,$,ae,he,Fe){var it=this.cells[$];if(it!==null)for(var yt=this.keys,Lt=this.bboxes,sr=0;sr<it.length;sr++){var gr=it[sr];if(he[gr]===void 0){var hr=gr*4;(Fe?Fe(Lt[hr+0],Lt[hr+1],Lt[hr+2],Lt[hr+3]):y<=Lt[hr+2]&&_<=Lt[hr+3]&&I>=Lt[hr+0]&&V>=Lt[hr+1])?(he[gr]=!0,ae.push(yt[gr])):he[gr]=!1}}},eu.prototype._forEachCell=function(y,_,I,V,$,ae,he,Fe){for(var it=this._convertToCellCoord(y),yt=this._convertToCellCoord(_),Lt=this._convertToCellCoord(I),sr=this._convertToCellCoord(V),gr=it;gr<=Lt;gr++)for(var hr=yt;hr<=sr;hr++){var Rr=this.d*hr+gr;if(!(Fe&&!Fe(this._convertFromCellCoord(gr),this._convertFromCellCoord(hr),this._convertFromCellCoord(gr+1),this._convertFromCellCoord(hr+1)))&&$.call(this,y,_,I,V,Rr,ae,he,Fe))return}},eu.prototype._convertFromCellCoord=function(y){return(y-this.padding)/this.scale},eu.prototype._convertToCellCoord=function(y){return Math.max(0,Math.min(this.d-1,Math.floor(y*this.scale)+this.padding))},eu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var y=this.cells,_=Js+this.cells.length+1+1,I=0,V=0;V<this.cells.length;V++)I+=this.cells[V].length;var $=new Int32Array(_+I+this.keys.length+this.bboxes.length);$[0]=this.extent,$[1]=this.n,$[2]=this.padding;for(var ae=_,he=0;he<y.length;he++){var Fe=y[he];$[Js+he]=ae,$.set(Fe,ae),ae+=Fe.length}return $[Js+y.length]=ae,$.set(this.keys,ae),ae+=this.keys.length,$[Js+y.length+1]=ae,$.set(this.bboxes,ae),ae+=this.bboxes.length,$.buffer};var dc=f.ImageData,Tl=f.ImageBitmap,Al={};function X(y,_,I){I===void 0&&(I={}),Object.defineProperty(_,"_classRegistryKey",{value:y,writeable:!1}),Al[y]={klass:_,omit:I.omit||[],shallow:I.shallow||[]}}X("Object",Object),au.serialize=function(_,I){var V=_.toArrayBuffer();return I&&I.push(V),{buffer:V}},au.deserialize=function(_){return new au(_.buffer)},X("Grid",au),X("Color",cs),X("Error",Error),X("ResolvedImage",fl),X("StylePropertyFunction",ue),X("StyleExpression",Ac,{omit:["_evaluator"]}),X("ZoomDependentExpression",hc),X("ZoomConstantExpression",Vc),X("CompoundExpression",Pa,{omit:["_evaluate"]});for(var se in Ka)Ka[se]._classRegistryKey||X("Expression_"+se,Ka[se]);function Te(y){return y&&typeof ArrayBuffer!="undefined"&&(y instanceof ArrayBuffer||y.constructor&&y.constructor.name==="ArrayBuffer")}function Oe(y){return Tl&&y instanceof Tl}function Ve(y,_){if(y==null||typeof y=="boolean"||typeof y=="number"||typeof y=="string"||y instanceof Boolean||y instanceof Number||y instanceof String||y instanceof Date||y instanceof RegExp)return y;if(Te(y)||Oe(y))return _&&_.push(y),y;if(ArrayBuffer.isView(y)){var I=y;return _&&_.push(I.buffer),I}if(y instanceof dc)return _&&_.push(y.data.buffer),y;if(Array.isArray(y)){for(var V=[],$=0,ae=y;$<ae.length;$+=1){var he=ae[$];V.push(Ve(he,_))}return V}if(typeof y=="object"){var Fe=y.constructor,it=Fe._classRegistryKey;if(!it)throw new Error("can't serialize object of unregistered class");var yt=Fe.serialize?Fe.serialize(y,_):{};if(!Fe.serialize){for(var Lt in y)if(y.hasOwnProperty(Lt)&&!(Al[it].omit.indexOf(Lt)>=0)){var sr=y[Lt];yt[Lt]=Al[it].shallow.indexOf(Lt)>=0?sr:Ve(sr,_)}y instanceof Error&&(yt.message=y.message)}if(yt.$name)throw new Error("$name property is reserved for worker serialization logic.");return it!=="Object"&&(yt.$name=it),yt}throw new Error("can't serialize object of type "+typeof y)}function Ye(y){if(y==null||typeof y=="boolean"||typeof y=="number"||typeof y=="string"||y instanceof Boolean||y instanceof Number||y instanceof String||y instanceof Date||y instanceof RegExp||Te(y)||Oe(y)||ArrayBuffer.isView(y)||y instanceof dc)return y;if(Array.isArray(y))return y.map(Ye);if(typeof y=="object"){var _=y.$name||"Object",I=Al[_],V=I.klass;if(!V)throw new Error("can't deserialize unregistered class "+_);if(V.deserialize)return V.deserialize(y);for(var $=Object.create(V.prototype),ae=0,he=Object.keys(y);ae<he.length;ae+=1){var Fe=he[ae];if(Fe!=="$name"){var it=y[Fe];$[Fe]=Al[_].shallow.indexOf(Fe)>=0?it:Ye(it)}}return $}throw new Error("can't deserialize object of type "+typeof y)}var Pt=function(){this.first=!0};Pt.prototype.update=function(_,I){var V=Math.floor(_);return this.first?(this.first=!1,this.lastIntegerZoom=V,this.lastIntegerZoomTime=0,this.lastZoom=_,this.lastFloorZoom=V,!0):(this.lastFloorZoom>V?(this.lastIntegerZoom=V+1,this.lastIntegerZoomTime=I):this.lastFloorZoom<V&&(this.lastIntegerZoom=V,this.lastIntegerZoomTime=I),_!==this.lastZoom?(this.lastZoom=_,this.lastFloorZoom=V,!0):!1)};var at={"Latin-1 Supplement":function(y){return y>=128&&y<=255},Arabic:function(y){return y>=1536&&y<=1791},"Arabic Supplement":function(y){return y>=1872&&y<=1919},"Arabic Extended-A":function(y){return y>=2208&&y<=2303},"Hangul Jamo":function(y){return y>=4352&&y<=4607},"Unified Canadian Aboriginal Syllabics":function(y){return y>=5120&&y<=5759},Khmer:function(y){return y>=6016&&y<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(y){return y>=6320&&y<=6399},"General Punctuation":function(y){return y>=8192&&y<=8303},"Letterlike Symbols":function(y){return y>=8448&&y<=8527},"Number Forms":function(y){return y>=8528&&y<=8591},"Miscellaneous Technical":function(y){return y>=8960&&y<=9215},"Control Pictures":function(y){return y>=9216&&y<=9279},"Optical Character Recognition":function(y){return y>=9280&&y<=9311},"Enclosed Alphanumerics":function(y){return y>=9312&&y<=9471},"Geometric Shapes":function(y){return y>=9632&&y<=9727},"Miscellaneous Symbols":function(y){return y>=9728&&y<=9983},"Miscellaneous Symbols and Arrows":function(y){return y>=11008&&y<=11263},"CJK Radicals Supplement":function(y){return y>=11904&&y<=12031},"Kangxi Radicals":function(y){return y>=12032&&y<=12255},"Ideographic Description Characters":function(y){return y>=12272&&y<=12287},"CJK Symbols and Punctuation":function(y){return y>=12288&&y<=12351},Hiragana:function(y){return y>=12352&&y<=12447},Katakana:function(y){return y>=12448&&y<=12543},Bopomofo:function(y){return y>=12544&&y<=12591},"Hangul Compatibility Jamo":function(y){return y>=12592&&y<=12687},Kanbun:function(y){return y>=12688&&y<=12703},"Bopomofo Extended":function(y){return y>=12704&&y<=12735},"CJK Strokes":function(y){return y>=12736&&y<=12783},"Katakana Phonetic Extensions":function(y){return y>=12784&&y<=12799},"Enclosed CJK Letters and Months":function(y){return y>=12800&&y<=13055},"CJK Compatibility":function(y){return y>=13056&&y<=13311},"CJK Unified Ideographs Extension A":function(y){return y>=13312&&y<=19903},"Yijing Hexagram Symbols":function(y){return y>=19904&&y<=19967},"CJK Unified Ideographs":function(y){return y>=19968&&y<=40959},"Yi Syllables":function(y){return y>=40960&&y<=42127},"Yi Radicals":function(y){return y>=42128&&y<=42191},"Hangul Jamo Extended-A":function(y){return y>=43360&&y<=43391},"Hangul Syllables":function(y){return y>=44032&&y<=55215},"Hangul Jamo Extended-B":function(y){return y>=55216&&y<=55295},"Private Use Area":function(y){return y>=57344&&y<=63743},"CJK Compatibility Ideographs":function(y){return y>=63744&&y<=64255},"Arabic Presentation Forms-A":function(y){return y>=64336&&y<=65023},"Vertical Forms":function(y){return y>=65040&&y<=65055},"CJK Compatibility Forms":function(y){return y>=65072&&y<=65103},"Small Form Variants":function(y){return y>=65104&&y<=65135},"Arabic Presentation Forms-B":function(y){return y>=65136&&y<=65279},"Halfwidth and Fullwidth Forms":function(y){return y>=65280&&y<=65519}};function Wt(y){for(var _=0,I=y;_<I.length;_+=1){var V=I[_];if(zr(V.charCodeAt(0)))return!0}return!1}function dr(y){for(var _=0,I=y;_<I.length;_+=1){var V=I[_];if(!pr(V.charCodeAt(0)))return!1}return!0}function pr(y){return!(at.Arabic(y)||at["Arabic Supplement"](y)||at["Arabic Extended-A"](y)||at["Arabic Presentation Forms-A"](y)||at["Arabic Presentation Forms-B"](y))}function Ur(y){return y<11904?!1:!!(at["Bopomofo Extended"](y)||at.Bopomofo(y)||at["CJK Compatibility Forms"](y)||at["CJK Compatibility Ideographs"](y)||at["CJK Compatibility"](y)||at["CJK Radicals Supplement"](y)||at["CJK Strokes"](y)||at["CJK Symbols and Punctuation"](y)||at["CJK Unified Ideographs Extension A"](y)||at["CJK Unified Ideographs"](y)||at["Enclosed CJK Letters and Months"](y)||at["Halfwidth and Fullwidth Forms"](y)||at.Hiragana(y)||at["Ideographic Description Characters"](y)||at["Kangxi Radicals"](y)||at["Katakana Phonetic Extensions"](y)||at.Katakana(y)||at["Vertical Forms"](y)||at["Yi Radicals"](y)||at["Yi Syllables"](y))}function zr(y){return y===746||y===747?!0:y<4352?!1:!!(at["Bopomofo Extended"](y)||at.Bopomofo(y)||at["CJK Compatibility Forms"](y)&&!(y>=65097&&y<=65103)||at["CJK Compatibility Ideographs"](y)||at["CJK Compatibility"](y)||at["CJK Radicals Supplement"](y)||at["CJK Strokes"](y)||at["CJK Symbols and Punctuation"](y)&&!(y>=12296&&y<=12305)&&!(y>=12308&&y<=12319)&&y!==12336||at["CJK Unified Ideographs Extension A"](y)||at["CJK Unified Ideographs"](y)||at["Enclosed CJK Letters and Months"](y)||at["Hangul Compatibility Jamo"](y)||at["Hangul Jamo Extended-A"](y)||at["Hangul Jamo Extended-B"](y)||at["Hangul Jamo"](y)||at["Hangul Syllables"](y)||at.Hiragana(y)||at["Ideographic Description Characters"](y)||at.Kanbun(y)||at["Kangxi Radicals"](y)||at["Katakana Phonetic Extensions"](y)||at.Katakana(y)&&y!==12540||at["Halfwidth and Fullwidth Forms"](y)&&y!==65288&&y!==65289&&y!==65293&&!(y>=65306&&y<=65310)&&y!==65339&&y!==65341&&y!==65343&&!(y>=65371&&y<=65503)&&y!==65507&&!(y>=65512&&y<=65519)||at["Small Form Variants"](y)&&!(y>=65112&&y<=65118)&&!(y>=65123&&y<=65126)||at["Unified Canadian Aboriginal Syllabics"](y)||at["Unified Canadian Aboriginal Syllabics Extended"](y)||at["Vertical Forms"](y)||at["Yijing Hexagram Symbols"](y)||at["Yi Syllables"](y)||at["Yi Radicals"](y))}function gi(y){return!!(at["Latin-1 Supplement"](y)&&(y===167||y===169||y===174||y===177||y===188||y===189||y===190||y===215||y===247)||at["General Punctuation"](y)&&(y===8214||y===8224||y===8225||y===8240||y===8241||y===8251||y===8252||y===8258||y===8263||y===8264||y===8265||y===8273)||at["Letterlike Symbols"](y)||at["Number Forms"](y)||at["Miscellaneous Technical"](y)&&(y>=8960&&y<=8967||y>=8972&&y<=8991||y>=8996&&y<=9e3||y===9003||y>=9085&&y<=9114||y>=9150&&y<=9165||y===9167||y>=9169&&y<=9179||y>=9186&&y<=9215)||at["Control Pictures"](y)&&y!==9251||at["Optical Character Recognition"](y)||at["Enclosed Alphanumerics"](y)||at["Geometric Shapes"](y)||at["Miscellaneous Symbols"](y)&&!(y>=9754&&y<=9759)||at["Miscellaneous Symbols and Arrows"](y)&&(y>=11026&&y<=11055||y>=11088&&y<=11097||y>=11192&&y<=11243)||at["CJK Symbols and Punctuation"](y)||at.Katakana(y)||at["Private Use Area"](y)||at["CJK Compatibility Forms"](y)||at["Small Form Variants"](y)||at["Halfwidth and Fullwidth Forms"](y)||y===8734||y===8756||y===8757||y>=9984&&y<=10087||y>=10102&&y<=10131||y===65532||y===65533)}function xi(y){return!(zr(y)||gi(y))}function Wr(y){return at.Arabic(y)||at["Arabic Supplement"](y)||at["Arabic Extended-A"](y)||at["Arabic Presentation Forms-A"](y)||at["Arabic Presentation Forms-B"](y)}function ii(y){return y>=1424&&y<=2303||at["Arabic Presentation Forms-A"](y)||at["Arabic Presentation Forms-B"](y)}function di(y,_){return!(!_&&ii(y)||y>=2304&&y<=3583||y>=3840&&y<=4255||at.Khmer(y))}function Li(y){for(var _=0,I=y;_<I.length;_+=1){var V=I[_];if(ii(V.charCodeAt(0)))return!0}return!1}function Ti(y,_){for(var I=0,V=y;I<V.length;I+=1){var $=V[I];if(!di($.charCodeAt(0),_))return!1}return!0}var Qr={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},Pn=null,kn=Qr.unavailable,Bn=null,na=function(y){y&&typeof y=="string"&&y.indexOf("NetworkError")>-1&&(kn=Qr.error),Pn&&Pn(y)};function Ea(){Ia.fire(new Xo("pluginStateChange",{pluginStatus:kn,pluginURL:Bn}))}var Ia=new jn,yo=function(){return kn},Da=function(y){return y({pluginStatus:kn,pluginURL:Bn}),Ia.on("pluginStateChange",y),y},go=function(y,_,I){if(I===void 0&&(I=!1),kn===Qr.deferred||kn===Qr.loading||kn===Qr.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Bn=lt.resolveURL(y),kn=Qr.deferred,Pn=_,Ea(),I||Is()},Is=function(){if(kn!==Qr.deferred||!Bn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");kn=Qr.loading,Ea(),Bn&&ti({url:Bn},function(y){y?na(y):(kn=Qr.loaded,Ea())})},Ms={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return kn===Qr.loaded||Ms.applyArabicShaping!=null},isLoading:function(){return kn===Qr.loading},setState:function(_){kn=_.pluginStatus,Bn=_.pluginURL},isParsed:function(){return Ms.applyArabicShaping!=null&&Ms.processBidirectionalText!=null&&Ms.processStyledBidirectionalText!=null},getPluginURL:function(){return Bn}},Xs=function(){!Ms.isLoading()&&!Ms.isLoaded()&&yo()==="deferred"&&Is()},Un=function(_,I){this.zoom=_,I?(this.now=I.now,this.fadeDuration=I.fadeDuration,this.zoomHistory=I.zoomHistory,this.transition=I.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Pt,this.transition={})};Un.prototype.isSupportedScript=function(_){return Ti(_,Ms.isLoaded())},Un.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Un.prototype.getCrossfadeParameters=function(){var _=this.zoom,I=_-Math.floor(_),V=this.crossFadingFactor();return _>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:I+(1-I)*V}:{fromScale:.5,toScale:1,t:1-(1-V)*I}};var ja=function(_,I){this.property=_,this.value=I,this.expression=w(I===void 0?_.specification.default:I,_.specification)};ja.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ja.prototype.possiblyEvaluate=function(_,I,V){return this.property.possiblyEvaluate(this,_,I,V)};var Fo=function(_){this.property=_,this.value=new ja(_,void 0)};Fo.prototype.transitioned=function(_,I){return new $s(this.property,this.value,I,x({},_.transition,this.transition),_.now)},Fo.prototype.untransitioned=function(){return new $s(this.property,this.value,null,{},0)};var Uo=function(_){this._properties=_,this._values=Object.create(_.defaultTransitionablePropertyValues)};Uo.prototype.getValue=function(_){return j(this._values[_].value.value)},Uo.prototype.setValue=function(_,I){this._values.hasOwnProperty(_)||(this._values[_]=new Fo(this._values[_].property)),this._values[_].value=new ja(this._values[_].property,I===null?void 0:j(I))},Uo.prototype.getTransition=function(_){return j(this._values[_].transition)},Uo.prototype.setTransition=function(_,I){this._values.hasOwnProperty(_)||(this._values[_]=new Fo(this._values[_].property)),this._values[_].transition=j(I)||void 0},Uo.prototype.serialize=function(){for(var _={},I=0,V=Object.keys(this._values);I<V.length;I+=1){var $=V[I],ae=this.getValue($);ae!==void 0&&(_[$]=ae);var he=this.getTransition($);he!==void 0&&(_[$+"-transition"]=he)}return _},Uo.prototype.transitioned=function(_,I){for(var V=new Sl(this._properties),$=0,ae=Object.keys(this._values);$<ae.length;$+=1){var he=ae[$];V._values[he]=this._values[he].transitioned(_,I._values[he])}return V},Uo.prototype.untransitioned=function(){for(var _=new Sl(this._properties),I=0,V=Object.keys(this._values);I<V.length;I+=1){var $=V[I];_._values[$]=this._values[$].untransitioned()}return _};var $s=function(_,I,V,$,ae){this.property=_,this.value=I,this.begin=ae+$.delay||0,this.end=this.begin+$.duration||0,_.specification.transition&&($.delay||$.duration)&&(this.prior=V)};$s.prototype.possiblyEvaluate=function(_,I,V){var $=_.now||0,ae=this.value.possiblyEvaluate(_,I,V),he=this.prior;if(he){if($>this.end)return this.prior=null,ae;if(this.value.isDataDriven())return this.prior=null,ae;if($<this.begin)return he.possiblyEvaluate(_,I,V);var Fe=($-this.begin)/(this.end-this.begin);return this.property.interpolate(he.possiblyEvaluate(_,I,V),ae,v(Fe))}else return ae};var Sl=function(_){this._properties=_,this._values=Object.create(_.defaultTransitioningPropertyValues)};Sl.prototype.possiblyEvaluate=function(_,I,V){for(var $=new Sc(this._properties),ae=0,he=Object.keys(this._values);ae<he.length;ae+=1){var Fe=he[ae];$._values[Fe]=this._values[Fe].possiblyEvaluate(_,I,V)}return $},Sl.prototype.hasTransition=function(){for(var _=0,I=Object.keys(this._values);_<I.length;_+=1){var V=I[_];if(this._values[V].prior)return!0}return!1};var bu=function(_){this._properties=_,this._values=Object.create(_.defaultPropertyValues)};bu.prototype.getValue=function(_){return j(this._values[_].value)},bu.prototype.setValue=function(_,I){this._values[_]=new ja(this._values[_].property,I===null?void 0:j(I))},bu.prototype.serialize=function(){for(var _={},I=0,V=Object.keys(this._values);I<V.length;I+=1){var $=V[I],ae=this.getValue($);ae!==void 0&&(_[$]=ae)}return _},bu.prototype.possiblyEvaluate=function(_,I,V){for(var $=new Sc(this._properties),ae=0,he=Object.keys(this._values);ae<he.length;ae+=1){var Fe=he[ae];$._values[Fe]=this._values[Fe].possiblyEvaluate(_,I,V)}return $};var dl=function(_,I,V){this.property=_,this.value=I,this.parameters=V};dl.prototype.isConstant=function(){return this.value.kind==="constant"},dl.prototype.constantOr=function(_){return this.value.kind==="constant"?this.value.value:_},dl.prototype.evaluate=function(_,I,V,$){return this.property.evaluate(this.value,this.parameters,_,I,V,$)};var Sc=function(_){this._properties=_,this._values=Object.create(_.defaultPossiblyEvaluatedValues)};Sc.prototype.get=function(_){return this._values[_]};var Me=function(_){this.specification=_};Me.prototype.possiblyEvaluate=function(_,I){return _.expression.evaluate(I)},Me.prototype.interpolate=function(_,I,V){var $=zu[this.specification.type];return $?$(_,I,V):_};var bt=function(_,I){this.specification=_,this.overrides=I};bt.prototype.possiblyEvaluate=function(_,I,V,$){return _.expression.kind==="constant"||_.expression.kind==="camera"?new dl(this,{kind:"constant",value:_.expression.evaluate(I,null,{},V,$)},I):new dl(this,_.expression,I)},bt.prototype.interpolate=function(_,I,V){if(_.value.kind!=="constant"||I.value.kind!=="constant")return _;if(_.value.value===void 0||I.value.value===void 0)return new dl(this,{kind:"constant",value:void 0},_.parameters);var $=zu[this.specification.type];return $?new dl(this,{kind:"constant",value:$(_.value.value,I.value.value,V)},_.parameters):_},bt.prototype.evaluate=function(_,I,V,$,ae,he){return _.kind==="constant"?_.value:_.evaluate(I,V,$,ae,he)};var Ot=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.possiblyEvaluate=function(V,$,ae,he){if(V.value===void 0)return new dl(this,{kind:"constant",value:void 0},$);if(V.expression.kind==="constant"){var Fe=V.expression.evaluate($,null,{},ae,he),it=V.property.specification.type==="resolvedImage",yt=it&&typeof Fe!="string"?Fe.name:Fe,Lt=this._calculate(yt,yt,yt,$);return new dl(this,{kind:"constant",value:Lt},$)}else if(V.expression.kind==="camera"){var sr=this._calculate(V.expression.evaluate({zoom:$.zoom-1}),V.expression.evaluate({zoom:$.zoom}),V.expression.evaluate({zoom:$.zoom+1}),$);return new dl(this,{kind:"constant",value:sr},$)}else return new dl(this,V.expression,$)},_.prototype.evaluate=function(V,$,ae,he,Fe,it){if(V.kind==="source"){var yt=V.evaluate($,ae,he,Fe,it);return this._calculate(yt,yt,yt,$)}else return V.kind==="composite"?this._calculate(V.evaluate({zoom:Math.floor($.zoom)-1},ae,he),V.evaluate({zoom:Math.floor($.zoom)},ae,he),V.evaluate({zoom:Math.floor($.zoom)+1},ae,he),$):V.value},_.prototype._calculate=function(V,$,ae,he){var Fe=he.zoom;return Fe>he.zoomHistory.lastIntegerZoom?{from:V,to:$}:{from:ae,to:$}},_.prototype.interpolate=function(V){return V},_}(bt),Lr=function(_){this.specification=_};Lr.prototype.possiblyEvaluate=function(_,I,V,$){if(_.value!==void 0)if(_.expression.kind==="constant"){var ae=_.expression.evaluate(I,null,{},V,$);return this._calculate(ae,ae,ae,I)}else return this._calculate(_.expression.evaluate(new Un(Math.floor(I.zoom-1),I)),_.expression.evaluate(new Un(Math.floor(I.zoom),I)),_.expression.evaluate(new Un(Math.floor(I.zoom+1),I)),I)},Lr.prototype._calculate=function(_,I,V,$){var ae=$.zoom;return ae>$.zoomHistory.lastIntegerZoom?{from:_,to:I}:{from:V,to:I}},Lr.prototype.interpolate=function(_){return _};var Vr=function(_){this.specification=_};Vr.prototype.possiblyEvaluate=function(_,I,V,$){return!!_.expression.evaluate(I,null,{},V,$)},Vr.prototype.interpolate=function(){return!1};var Or=function(_){this.properties=_,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var I in _){var V=_[I];V.specification.overridable&&this.overridableProperties.push(I);var $=this.defaultPropertyValues[I]=new ja(V,void 0),ae=this.defaultTransitionablePropertyValues[I]=new Fo(V);this.defaultTransitioningPropertyValues[I]=ae.untransitioned(),this.defaultPossiblyEvaluatedValues[I]=$.possiblyEvaluate({})}};X("DataDrivenProperty",bt),X("DataConstantProperty",Me),X("CrossFadedDataDrivenProperty",Ot),X("CrossFadedProperty",Lr),X("ColorRampProperty",Vr);var Nr="-transition",vi=function(y){function _(I,V){if(y.call(this),this.id=I.id,this.type=I.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},I.type!=="custom"&&(I=I,this.metadata=I.metadata,this.minzoom=I.minzoom,this.maxzoom=I.maxzoom,I.type!=="background"&&(this.source=I.source,this.sourceLayer=I["source-layer"],this.filter=I.filter),V.layout&&(this._unevaluatedLayout=new bu(V.layout)),V.paint)){this._transitionablePaint=new Uo(V.paint);for(var $ in I.paint)this.setPaintProperty($,I.paint[$],{validate:!1});for(var ae in I.layout)this.setLayoutProperty(ae,I.layout[ae],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Sc(V.paint)}}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},_.prototype.getLayoutProperty=function(V){return V==="visibility"?this.visibility:this._unevaluatedLayout.getValue(V)},_.prototype.setLayoutProperty=function(V,$,ae){if(ae===void 0&&(ae={}),$!=null){var he="layers."+this.id+".layout."+V;if(this._validate(Ul,he,V,$,ae))return}if(V==="visibility"){this.visibility=$;return}this._unevaluatedLayout.setValue(V,$)},_.prototype.getPaintProperty=function(V){return U(V,Nr)?this._transitionablePaint.getTransition(V.slice(0,-Nr.length)):this._transitionablePaint.getValue(V)},_.prototype.setPaintProperty=function(V,$,ae){if(ae===void 0&&(ae={}),$!=null){var he="layers."+this.id+".paint."+V;if(this._validate(hl,he,V,$,ae))return!1}if(U(V,Nr))return this._transitionablePaint.setTransition(V.slice(0,-Nr.length),$||void 0),!1;var Fe=this._transitionablePaint._values[V],it=Fe.property.specification["property-type"]==="cross-faded-data-driven",yt=Fe.value.isDataDriven(),Lt=Fe.value;this._transitionablePaint.setValue(V,$),this._handleSpecialPaintPropertyUpdate(V);var sr=this._transitionablePaint._values[V].value,gr=sr.isDataDriven();return gr||yt||it||this._handleOverridablePaintPropertyUpdate(V,Lt,sr)},_.prototype._handleSpecialPaintPropertyUpdate=function(V){},_.prototype._handleOverridablePaintPropertyUpdate=function(V,$,ae){return!1},_.prototype.isHidden=function(V){return this.minzoom&&V<this.minzoom||this.maxzoom&&V>=this.maxzoom?!0:this.visibility==="none"},_.prototype.updateTransitions=function(V){this._transitioningPaint=this._transitionablePaint.transitioned(V,this._transitioningPaint)},_.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},_.prototype.recalculate=function(V,$){V.getCrossfadeParameters&&(this._crossfadeParameters=V.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(V,void 0,$)),this.paint=this._transitioningPaint.possiblyEvaluate(V,void 0,$)},_.prototype.serialize=function(){var V={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(V.layout=V.layout||{},V.layout.visibility=this.visibility),Z(V,function($,ae){return $!==void 0&&!(ae==="layout"&&!Object.keys($).length)&&!(ae==="paint"&&!Object.keys($).length)})},_.prototype._validate=function(V,$,ae,he,Fe){return Fe===void 0&&(Fe={}),Fe&&Fe.validate===!1?!1:Lu(this,V.call(wo,{key:$,layerType:this.type,objectKey:ae,value:he,styleSpec:Rn,style:{glyphs:!0,sprite:!0}}))},_.prototype.is3D=function(){return!1},_.prototype.isTileClipped=function(){return!1},_.prototype.hasOffscreenPass=function(){return!1},_.prototype.resize=function(){},_.prototype.isStateDependent=function(){for(var V in this.paint._values){var $=this.paint.get(V);if(!(!($ instanceof dl)||!Ws($.property.specification))&&($.value.kind==="source"||$.value.kind==="composite")&&$.value.isStateDependent)return!0}return!1},_}(jn),Ni={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},qi=function(_,I){this._structArray=_,this._pos1=I*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Si=128,Vn=5,Qi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Qi.serialize=function(_,I){return _._trim(),I&&(_.isTransferred=!0,I.push(_.arrayBuffer)),{length:_.length,arrayBuffer:_.arrayBuffer}},Qi.deserialize=function(_){var I=Object.create(this.prototype);return I.arrayBuffer=_.arrayBuffer,I.length=_.length,I.capacity=_.arrayBuffer.byteLength/I.bytesPerElement,I._refreshViews(),I},Qi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Qi.prototype.clear=function(){this.length=0},Qi.prototype.resize=function(_){this.reserve(_),this.length=_},Qi.prototype.reserve=function(_){if(_>this.capacity){this.capacity=Math.max(_,Math.floor(this.capacity*Vn),Si),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var I=this.uint8;this._refreshViews(),I&&this.uint8.set(I)}},Qi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function ji(y,_){_===void 0&&(_=1);var I=0,V=0,$=y.map(function(he){var Fe=oi(he.type),it=I=Tr(I,Math.max(_,Fe)),yt=he.components||1;return V=Math.max(V,Fe),I+=Fe*yt,{name:he.name,type:he.type,components:yt,offset:it}}),ae=Tr(I,Math.max(V,_));return{members:$,size:ae,alignment:_}}function oi(y){return Ni[y].BYTES_PER_ELEMENT}function Tr(y,_){return Math.ceil(y/_)*_}var Zr=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},_.prototype.emplace=function(V,$,ae){var he=V*2;return this.int16[he+0]=$,this.int16[he+1]=ae,V},_}(Qi);Zr.prototype.bytesPerElement=4,X("StructArrayLayout2i4",Zr);var yi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,V,$,ae,he)},_.prototype.emplace=function(V,$,ae,he,Fe){var it=V*4;return this.int16[it+0]=$,this.int16[it+1]=ae,this.int16[it+2]=he,this.int16[it+3]=Fe,V},_}(Qi);yi.prototype.bytesPerElement=8,X("StructArrayLayout4i8",yi);var Ii=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it){var yt=this.length;return this.resize(yt+1),this.emplace(yt,V,$,ae,he,Fe,it)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt){var Lt=V*6;return this.int16[Lt+0]=$,this.int16[Lt+1]=ae,this.int16[Lt+2]=he,this.int16[Lt+3]=Fe,this.int16[Lt+4]=it,this.int16[Lt+5]=yt,V},_}(Qi);Ii.prototype.bytesPerElement=12,X("StructArrayLayout2i4i12",Ii);var ui=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it){var yt=this.length;return this.resize(yt+1),this.emplace(yt,V,$,ae,he,Fe,it)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt){var Lt=V*4,sr=V*8;return this.int16[Lt+0]=$,this.int16[Lt+1]=ae,this.uint8[sr+4]=he,this.uint8[sr+5]=Fe,this.uint8[sr+6]=it,this.uint8[sr+7]=yt,V},_}(Qi);ui.prototype.bytesPerElement=8,X("StructArrayLayout2i4ub8",ui);var nn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},_.prototype.emplace=function(V,$,ae){var he=V*2;return this.float32[he+0]=$,this.float32[he+1]=ae,V},_}(Qi);nn.prototype.bytesPerElement=8,X("StructArrayLayout2f8",nn);var Xi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr){var hr=this.length;return this.resize(hr+1),this.emplace(hr,V,$,ae,he,Fe,it,yt,Lt,sr,gr)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr){var Rr=V*10;return this.uint16[Rr+0]=$,this.uint16[Rr+1]=ae,this.uint16[Rr+2]=he,this.uint16[Rr+3]=Fe,this.uint16[Rr+4]=it,this.uint16[Rr+5]=yt,this.uint16[Rr+6]=Lt,this.uint16[Rr+7]=sr,this.uint16[Rr+8]=gr,this.uint16[Rr+9]=hr,V},_}(Qi);Xi.prototype.bytesPerElement=20,X("StructArrayLayout10ui20",Xi);var qn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr){var ni=this.length;return this.resize(ni+1),this.emplace(ni,V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni){var Hi=V*12;return this.int16[Hi+0]=$,this.int16[Hi+1]=ae,this.int16[Hi+2]=he,this.int16[Hi+3]=Fe,this.uint16[Hi+4]=it,this.uint16[Hi+5]=yt,this.uint16[Hi+6]=Lt,this.uint16[Hi+7]=sr,this.int16[Hi+8]=gr,this.int16[Hi+9]=hr,this.int16[Hi+10]=Rr,this.int16[Hi+11]=ni,V},_}(Qi);qn.prototype.bytesPerElement=24,X("StructArrayLayout4i4ui4i24",qn);var fi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},_.prototype.emplace=function(V,$,ae,he){var Fe=V*3;return this.float32[Fe+0]=$,this.float32[Fe+1]=ae,this.float32[Fe+2]=he,V},_}(Qi);fi.prototype.bytesPerElement=12,X("StructArrayLayout3f12",fi);var si=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},_.prototype.emplace=function(V,$){var ae=V*1;return this.uint32[ae+0]=$,V},_}(Qi);si.prototype.bytesPerElement=4,X("StructArrayLayout1ul4",si);var mn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.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)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it,yt,Lt,sr){var gr=this.length;return this.resize(gr+1),this.emplace(gr,V,$,ae,he,Fe,it,yt,Lt,sr)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr){var hr=V*10,Rr=V*5;return this.int16[hr+0]=$,this.int16[hr+1]=ae,this.int16[hr+2]=he,this.int16[hr+3]=Fe,this.int16[hr+4]=it,this.int16[hr+5]=yt,this.uint32[Rr+3]=Lt,this.uint16[hr+8]=sr,this.uint16[hr+9]=gr,V},_}(Qi);mn.prototype.bytesPerElement=20,X("StructArrayLayout6i1ul2ui20",mn);var Ji=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it){var yt=this.length;return this.resize(yt+1),this.emplace(yt,V,$,ae,he,Fe,it)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt){var Lt=V*6;return this.int16[Lt+0]=$,this.int16[Lt+1]=ae,this.int16[Lt+2]=he,this.int16[Lt+3]=Fe,this.int16[Lt+4]=it,this.int16[Lt+5]=yt,V},_}(Qi);Ji.prototype.bytesPerElement=12,X("StructArrayLayout2i2i2i12",Ji);var Ui=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe){var it=this.length;return this.resize(it+1),this.emplace(it,V,$,ae,he,Fe)},_.prototype.emplace=function(V,$,ae,he,Fe,it){var yt=V*4,Lt=V*8;return this.float32[yt+0]=$,this.float32[yt+1]=ae,this.float32[yt+2]=he,this.int16[Lt+6]=Fe,this.int16[Lt+7]=it,V},_}(Qi);Ui.prototype.bytesPerElement=16,X("StructArrayLayout2f1f2i16",Ui);var Bi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,V,$,ae,he)},_.prototype.emplace=function(V,$,ae,he,Fe){var it=V*12,yt=V*3;return this.uint8[it+0]=$,this.uint8[it+1]=ae,this.float32[yt+1]=he,this.float32[yt+2]=Fe,V},_}(Qi);Bi.prototype.bytesPerElement=12,X("StructArrayLayout2ub2f12",Bi);var pn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},_.prototype.emplace=function(V,$,ae,he){var Fe=V*3;return this.uint16[Fe+0]=$,this.uint16[Fe+1]=ae,this.uint16[Fe+2]=he,V},_}(Qi);pn.prototype.bytesPerElement=6,X("StructArrayLayout3ui6",pn);var Nn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.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)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn){var xn=this.length;return this.resize(xn+1),this.emplace(xn,V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn){var In=V*24,Xn=V*12,ga=V*48;return this.int16[In+0]=$,this.int16[In+1]=ae,this.uint16[In+2]=he,this.uint16[In+3]=Fe,this.uint32[Xn+2]=it,this.uint32[Xn+3]=yt,this.uint32[Xn+4]=Lt,this.uint16[In+10]=sr,this.uint16[In+11]=gr,this.uint16[In+12]=hr,this.float32[Xn+7]=Rr,this.float32[Xn+8]=ni,this.uint8[ga+36]=Hi,this.uint8[ga+37]=wi,this.uint8[ga+38]=bn,this.uint32[Xn+10]=rn,this.int16[In+22]=xn,V},_}(Qi);Nn.prototype.bytesPerElement=48,X("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Nn);var aa=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.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)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn,In,Xn,ga,ha,eo,za,Za,Jo,to,ao){var _s=this.length;return this.resize(_s+1),this.emplace(_s,V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn,In,Xn,ga,ha,eo,za,Za,Jo,to,ao)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn,In,Xn,ga,ha,eo,za,Za,Jo,to,ao,_s){var jo=V*34,El=V*17;return this.int16[jo+0]=$,this.int16[jo+1]=ae,this.int16[jo+2]=he,this.int16[jo+3]=Fe,this.int16[jo+4]=it,this.int16[jo+5]=yt,this.int16[jo+6]=Lt,this.int16[jo+7]=sr,this.uint16[jo+8]=gr,this.uint16[jo+9]=hr,this.uint16[jo+10]=Rr,this.uint16[jo+11]=ni,this.uint16[jo+12]=Hi,this.uint16[jo+13]=wi,this.uint16[jo+14]=bn,this.uint16[jo+15]=rn,this.uint16[jo+16]=xn,this.uint16[jo+17]=In,this.uint16[jo+18]=Xn,this.uint16[jo+19]=ga,this.uint16[jo+20]=ha,this.uint16[jo+21]=eo,this.uint16[jo+22]=za,this.uint32[El+12]=Za,this.float32[El+13]=Jo,this.float32[El+14]=to,this.float32[El+15]=ao,this.float32[El+16]=_s,V},_}(Qi);aa.prototype.bytesPerElement=68,X("StructArrayLayout8i15ui1ul4f68",aa);var Ki=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},_.prototype.emplace=function(V,$){var ae=V*1;return this.float32[ae+0]=$,V},_}(Qi);Ki.prototype.bytesPerElement=4,X("StructArrayLayout1f4",Ki);var Cn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},_.prototype.emplace=function(V,$,ae,he){var Fe=V*3;return this.int16[Fe+0]=$,this.int16[Fe+1]=ae,this.int16[Fe+2]=he,V},_}(Qi);Cn.prototype.bytesPerElement=6,X("StructArrayLayout3i6",Cn);var ia=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},_.prototype.emplace=function(V,$,ae,he){var Fe=V*2,it=V*4;return this.uint32[Fe+0]=$,this.uint16[it+2]=ae,this.uint16[it+3]=he,V},_}(Qi);ia.prototype.bytesPerElement=8,X("StructArrayLayout1ul2ui8",ia);var sa=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},_.prototype.emplace=function(V,$,ae){var he=V*2;return this.uint16[he+0]=$,this.uint16[he+1]=ae,V},_}(Qi);sa.prototype.bytesPerElement=4,X("StructArrayLayout2ui4",sa);var ba=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},_.prototype.emplace=function(V,$){var ae=V*1;return this.uint16[ae+0]=$,V},_}(Qi);ba.prototype.bytesPerElement=2,X("StructArrayLayout1ui2",ba);var is=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,V,$,ae,he)},_.prototype.emplace=function(V,$,ae,he,Fe){var it=V*4;return this.float32[it+0]=$,this.float32[it+1]=ae,this.float32[it+2]=he,this.float32[it+3]=Fe,V},_}(Qi);is.prototype.bytesPerElement=16,X("StructArrayLayout4f16",is);var Zs=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return I.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},I.x1.get=function(){return this._structArray.int16[this._pos2+2]},I.y1.get=function(){return this._structArray.int16[this._pos2+3]},I.x2.get=function(){return this._structArray.int16[this._pos2+4]},I.y2.get=function(){return this._structArray.int16[this._pos2+5]},I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.anchorPoint.get=function(){return new u(this.anchorPointX,this.anchorPointY)},Object.defineProperties(_.prototype,I),_}(qi);Zs.prototype.size=20;var Va=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(V){return new Zs(this,V)},_}(mn);X("CollisionBoxArray",Va);var Ml=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},I.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},I.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},I.segment.get=function(){return this._structArray.uint16[this._pos2+10]},I.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},I.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},I.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},I.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},I.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},I.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},I.placedOrientation.set=function(V){this._structArray.uint8[this._pos1+37]=V},I.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},I.hidden.set=function(V){this._structArray.uint8[this._pos1+38]=V},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},I.crossTileID.set=function(V){this._structArray.uint32[this._pos4+10]=V},I.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(_.prototype,I),_}(qi);Ml.prototype.size=48;var zo=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(V){return new Ml(this,V)},_}(Nn);X("PlacedSymbolArray",zo);var Qs=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},I.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},I.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},I.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},I.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},I.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},I.key.get=function(){return this._structArray.uint16[this._pos2+8]},I.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},I.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},I.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},I.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},I.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},I.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},I.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},I.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},I.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},I.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},I.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},I.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},I.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},I.crossTileID.set=function(V){this._structArray.uint32[this._pos4+12]=V},I.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},I.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},I.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},I.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(_.prototype,I),_}(qi);Qs.prototype.size=68;var al=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(V){return new Qs(this,V)},_}(aa);X("SymbolInstanceArray",al);var Vl=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.getoffsetX=function(V){return this.float32[V*1+0]},_}(Ki);X("GlyphOffsetArray",Vl);var ss=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.getx=function(V){return this.int16[V*3+0]},_.prototype.gety=function(V){return this.int16[V*3+1]},_.prototype.gettileUnitDistanceFromAnchor=function(V){return this.int16[V*3+2]},_}(Cn);X("SymbolLineVertexArray",ss);var Vs=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(_.prototype,I),_}(qi);Vs.prototype.size=8;var Ys=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(V){return new Vs(this,V)},_}(ia);X("FeatureIndexArray",Ys);var wa=ji([{name:"a_pos",components:2,type:"Int16"}],4),ol=wa.members,io=function(_){_===void 0&&(_=[]),this.segments=_};io.prototype.prepareSegment=function(_,I,V,$){var ae=this.segments[this.segments.length-1];return _>io.MAX_VERTEX_ARRAY_LENGTH&&re("Max vertices per segment is "+io.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+_),(!ae||ae.vertexLength+_>io.MAX_VERTEX_ARRAY_LENGTH||ae.sortKey!==$)&&(ae={vertexOffset:I.length,primitiveOffset:V.length,vertexLength:0,primitiveLength:0},$!==void 0&&(ae.sortKey=$),this.segments.push(ae)),ae},io.prototype.get=function(){return this.segments},io.prototype.destroy=function(){for(var _=0,I=this.segments;_<I.length;_+=1){var V=I[_];for(var $ in V.vaos)V.vaos[$].destroy()}},io.simpleSegment=function(_,I,V,$){return new io([{vertexOffset:_,primitiveOffset:I,vertexLength:V,primitiveLength:$,vaos:{},sortKey:0}])},io.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,X("SegmentVector",io);function Y(y,_){return y=p(Math.floor(y),0,255),_=p(Math.floor(_),0,255),256*y+_}var D=ji([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),J=a(function(y){function _(I,V){var $,ae,he,Fe,it,yt,Lt,sr;for($=I.length&3,ae=I.length-$,he=V,it=3432918353,yt=461845907,sr=0;sr<ae;)Lt=I.charCodeAt(sr)&255|(I.charCodeAt(++sr)&255)<<8|(I.charCodeAt(++sr)&255)<<16|(I.charCodeAt(++sr)&255)<<24,++sr,Lt=(Lt&65535)*it+(((Lt>>>16)*it&65535)<<16)&4294967295,Lt=Lt<<15|Lt>>>17,Lt=(Lt&65535)*yt+(((Lt>>>16)*yt&65535)<<16)&4294967295,he^=Lt,he=he<<13|he>>>19,Fe=(he&65535)*5+(((he>>>16)*5&65535)<<16)&4294967295,he=(Fe&65535)+27492+(((Fe>>>16)+58964&65535)<<16);switch(Lt=0,$){case 3:Lt^=(I.charCodeAt(sr+2)&255)<<16;case 2:Lt^=(I.charCodeAt(sr+1)&255)<<8;case 1:Lt^=I.charCodeAt(sr)&255,Lt=(Lt&65535)*it+(((Lt>>>16)*it&65535)<<16)&4294967295,Lt=Lt<<15|Lt>>>17,Lt=(Lt&65535)*yt+(((Lt>>>16)*yt&65535)<<16)&4294967295,he^=Lt}return he^=I.length,he^=he>>>16,he=(he&65535)*2246822507+(((he>>>16)*2246822507&65535)<<16)&4294967295,he^=he>>>13,he=(he&65535)*3266489909+(((he>>>16)*3266489909&65535)<<16)&4294967295,he^=he>>>16,he>>>0}y.exports=_}),O=a(function(y){function _(I,V){for(var $=I.length,ae=V^$,he=0,Fe;$>=4;)Fe=I.charCodeAt(he)&255|(I.charCodeAt(++he)&255)<<8|(I.charCodeAt(++he)&255)<<16|(I.charCodeAt(++he)&255)<<24,Fe=(Fe&65535)*1540483477+(((Fe>>>16)*1540483477&65535)<<16),Fe^=Fe>>>24,Fe=(Fe&65535)*1540483477+(((Fe>>>16)*1540483477&65535)<<16),ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)^Fe,$-=4,++he;switch($){case 3:ae^=(I.charCodeAt(he+2)&255)<<16;case 2:ae^=(I.charCodeAt(he+1)&255)<<8;case 1:ae^=I.charCodeAt(he)&255,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)}return ae^=ae>>>13,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16),ae^=ae>>>15,ae>>>0}y.exports=_}),K=J,de=J,ne=O;K.murmur3=de,K.murmur2=ne;var be=function(){this.ids=[],this.positions=[],this.indexed=!1};be.prototype.add=function(_,I,V,$){this.ids.push(ht(_)),this.positions.push(I,V,$)},be.prototype.getPositions=function(_){for(var I=ht(_),V=0,$=this.ids.length-1;V<$;){var ae=V+$>>1;this.ids[ae]>=I?$=ae:V=ae+1}for(var he=[];this.ids[V]===I;){var Fe=this.positions[3*V],it=this.positions[3*V+1],yt=this.positions[3*V+2];he.push({index:Fe,start:it,end:yt}),V++}return he},be.serialize=function(_,I){var V=new Float64Array(_.ids),$=new Uint32Array(_.positions);return Yt(V,$,0,V.length-1),I&&I.push(V.buffer,$.buffer),{ids:V,positions:$}},be.deserialize=function(_){var I=new be;return I.ids=_.ids,I.positions=_.positions,I.indexed=!0,I};var Be=Math.pow(2,53)-1;function ht(y){var _=+y;return!isNaN(_)&&_<=Be?_:K(String(y))}function Yt(y,_,I,V){for(;I<V;){for(var $=y[I+V>>1],ae=I-1,he=V+1;;){do ae++;while(y[ae]<$);do he--;while(y[he]>$);if(ae>=he)break;cr(y,ae,he),cr(_,3*ae,3*he),cr(_,3*ae+1,3*he+1),cr(_,3*ae+2,3*he+2)}he-I<V-he?(Yt(y,_,I,he),I=he+1):(Yt(y,_,he+1,V),V=he)}}function cr(y,_,I){var V=y[_];y[_]=y[I],y[I]=V}X("FeaturePositionMap",be);var Nt=function(_,I){this.gl=_.gl,this.location=I},Ne=function(y){function _(I,V){y.call(this,I,V),this.current=0}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.set=function(V){this.current!==V&&(this.current=V,this.gl.uniform1i(this.location,V))},_}(Nt),$e=function(y){function _(I,V){y.call(this,I,V),this.current=0}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.set=function(V){this.current!==V&&(this.current=V,this.gl.uniform1f(this.location,V))},_}(Nt),ot=function(y){function _(I,V){y.call(this,I,V),this.current=[0,0]}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.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]))},_}(Nt),It=function(y){function _(I,V){y.call(this,I,V),this.current=[0,0,0]}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.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]))},_}(Nt),Bt=function(y){function _(I,V){y.call(this,I,V),this.current=[0,0,0,0]}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.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]))},_}(Nt),Ft=function(y){function _(I,V){y.call(this,I,V),this.current=cs.transparent}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.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))},_}(Nt),Ut=new Float32Array(16),zt=function(y){function _(I,V){y.call(this,I,V),this.current=Ut}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.set=function(V){if(V[12]!==this.current[12]||V[0]!==this.current[0]){this.current=V,this.gl.uniformMatrix4fv(this.location,!1,V);return}for(var $=1;$<16;$++)if(V[$]!==this.current[$]){this.current=V,this.gl.uniformMatrix4fv(this.location,!1,V);break}},_}(Nt);function _t(y){return[Y(255*y.r,255*y.g),Y(255*y.b,255*y.a)]}var Dt=function(_,I,V){this.value=_,this.uniformNames=I.map(function($){return"u_"+$}),this.type=V};Dt.prototype.setUniform=function(_,I,V){_.set(V.constantOr(this.value))},Dt.prototype.getBinding=function(_,I,V){return this.type==="color"?new Ft(_,I):new $e(_,I)};var vt=function(_,I){this.uniformNames=I.map(function(V){return"u_"+V}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};vt.prototype.setConstantPatternPositions=function(_,I){this.pixelRatioFrom=I.pixelRatio,this.pixelRatioTo=_.pixelRatio,this.patternFrom=I.tlbr,this.patternTo=_.tlbr},vt.prototype.setUniform=function(_,I,V,$){var ae=$==="u_pattern_to"?this.patternTo:$==="u_pattern_from"?this.patternFrom:$==="u_pixel_ratio_to"?this.pixelRatioTo:$==="u_pixel_ratio_from"?this.pixelRatioFrom:null;ae&&_.set(ae)},vt.prototype.getBinding=function(_,I,V){return V.substr(0,9)==="u_pattern"?new Bt(_,I):new $e(_,I)};var lr=function(_,I,V,$){this.expression=_,this.type=V,this.maxValue=0,this.paintVertexAttributes=I.map(function(ae){return{name:"a_"+ae,type:"Float32",components:V==="color"?2:1,offset:0}}),this.paintVertexArray=new $};lr.prototype.populatePaintArray=function(_,I,V,$,ae){var he=this.paintVertexArray.length,Fe=this.expression.evaluate(new Un(0),I,{},$,[],ae);this.paintVertexArray.resize(_),this._setPaintValue(he,_,Fe)},lr.prototype.updatePaintArray=function(_,I,V,$){var ae=this.expression.evaluate({zoom:0},V,$);this._setPaintValue(_,I,ae)},lr.prototype._setPaintValue=function(_,I,V){if(this.type==="color")for(var $=_t(V),ae=_;ae<I;ae++)this.paintVertexArray.emplace(ae,$[0],$[1]);else{for(var he=_;he<I;he++)this.paintVertexArray.emplace(he,V);this.maxValue=Math.max(this.maxValue,Math.abs(V))}},lr.prototype.upload=function(_){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=_.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},lr.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var yr=function(_,I,V,$,ae,he){this.expression=_,this.uniformNames=I.map(function(Fe){return"u_"+Fe+"_t"}),this.type=V,this.useIntegerZoom=$,this.zoom=ae,this.maxValue=0,this.paintVertexAttributes=I.map(function(Fe){return{name:"a_"+Fe,type:"Float32",components:V==="color"?4:2,offset:0}}),this.paintVertexArray=new he};yr.prototype.populatePaintArray=function(_,I,V,$,ae){var he=this.expression.evaluate(new Un(this.zoom),I,{},$,[],ae),Fe=this.expression.evaluate(new Un(this.zoom+1),I,{},$,[],ae),it=this.paintVertexArray.length;this.paintVertexArray.resize(_),this._setPaintValue(it,_,he,Fe)},yr.prototype.updatePaintArray=function(_,I,V,$){var ae=this.expression.evaluate({zoom:this.zoom},V,$),he=this.expression.evaluate({zoom:this.zoom+1},V,$);this._setPaintValue(_,I,ae,he)},yr.prototype._setPaintValue=function(_,I,V,$){if(this.type==="color")for(var ae=_t(V),he=_t($),Fe=_;Fe<I;Fe++)this.paintVertexArray.emplace(Fe,ae[0],ae[1],he[0],he[1]);else{for(var it=_;it<I;it++)this.paintVertexArray.emplace(it,V,$);this.maxValue=Math.max(this.maxValue,Math.abs(V),Math.abs($))}},yr.prototype.upload=function(_){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=_.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},yr.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},yr.prototype.setUniform=function(_,I){var V=this.useIntegerZoom?Math.floor(I.zoom):I.zoom,$=p(this.expression.interpolationFactor(V,this.zoom,this.zoom+1),0,1);_.set($)},yr.prototype.getBinding=function(_,I,V){return new $e(_,I)};var Br=function(_,I,V,$,ae,he){this.expression=_,this.type=I,this.useIntegerZoom=V,this.zoom=$,this.layerId=he,this.zoomInPaintVertexArray=new ae,this.zoomOutPaintVertexArray=new ae};Br.prototype.populatePaintArray=function(_,I,V){var $=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(_),this.zoomOutPaintVertexArray.resize(_),this._setPaintValues($,_,I.patterns&&I.patterns[this.layerId],V)},Br.prototype.updatePaintArray=function(_,I,V,$,ae){this._setPaintValues(_,I,V.patterns&&V.patterns[this.layerId],ae)},Br.prototype._setPaintValues=function(_,I,V,$){if(!(!$||!V)){var ae=V.min,he=V.mid,Fe=V.max,it=$[ae],yt=$[he],Lt=$[Fe];if(!(!it||!yt||!Lt))for(var sr=_;sr<I;sr++)this.zoomInPaintVertexArray.emplace(sr,yt.tl[0],yt.tl[1],yt.br[0],yt.br[1],it.tl[0],it.tl[1],it.br[0],it.br[1],yt.pixelRatio,it.pixelRatio),this.zoomOutPaintVertexArray.emplace(sr,yt.tl[0],yt.tl[1],yt.br[0],yt.br[1],Lt.tl[0],Lt.tl[1],Lt.br[0],Lt.br[1],yt.pixelRatio,Lt.pixelRatio)}},Br.prototype.upload=function(_){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=_.createVertexBuffer(this.zoomInPaintVertexArray,D.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=_.createVertexBuffer(this.zoomOutPaintVertexArray,D.members,this.expression.isStateDependent))},Br.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Di=function(_,I,V){this.binders={},this._buffers=[];var $=[];for(var ae in _.paint._values)if(V(ae)){var he=_.paint.get(ae);if(!(!(he instanceof dl)||!Ws(he.property.specification))){var Fe=bi(ae,_.type),it=he.value,yt=he.property.specification.type,Lt=he.property.useIntegerZoom,sr=he.property.specification["property-type"],gr=sr==="cross-faded"||sr==="cross-faded-data-driven";if(it.kind==="constant")this.binders[ae]=gr?new vt(it.value,Fe):new Dt(it.value,Fe,yt),$.push("/u_"+ae);else if(it.kind==="source"||gr){var hr=tn(ae,yt,"source");this.binders[ae]=gr?new Br(it,yt,Lt,I,hr,_.id):new lr(it,Fe,yt,hr),$.push("/a_"+ae)}else{var Rr=tn(ae,yt,"composite");this.binders[ae]=new yr(it,Fe,yt,Lt,I,Rr),$.push("/z_"+ae)}}}this.cacheKey=$.sort().join("")};Di.prototype.getMaxValue=function(_){var I=this.binders[_];return I instanceof lr||I instanceof yr?I.maxValue:0},Di.prototype.populatePaintArrays=function(_,I,V,$,ae){for(var he in this.binders){var Fe=this.binders[he];(Fe instanceof lr||Fe instanceof yr||Fe instanceof Br)&&Fe.populatePaintArray(_,I,V,$,ae)}},Di.prototype.setConstantPatternPositions=function(_,I){for(var V in this.binders){var $=this.binders[V];$ instanceof vt&&$.setConstantPatternPositions(_,I)}},Di.prototype.updatePaintArrays=function(_,I,V,$,ae){var he=!1;for(var Fe in _)for(var it=I.getPositions(Fe),yt=0,Lt=it;yt<Lt.length;yt+=1){var sr=Lt[yt],gr=V.feature(sr.index);for(var hr in this.binders){var Rr=this.binders[hr];if((Rr instanceof lr||Rr instanceof yr||Rr instanceof Br)&&Rr.expression.isStateDependent===!0){var ni=$.paint.get(hr);Rr.expression=ni.value,Rr.updatePaintArray(sr.start,sr.end,gr,_[Fe],ae),he=!0}}}return he},Di.prototype.defines=function(){var _=[];for(var I in this.binders){var V=this.binders[I];(V instanceof Dt||V instanceof vt)&&_.push.apply(_,V.uniformNames.map(function($){return"#define HAS_UNIFORM_"+$}))}return _},Di.prototype.getBinderAttributes=function(){var _=[];for(var I in this.binders){var V=this.binders[I];if(V instanceof lr||V instanceof yr)for(var $=0;$<V.paintVertexAttributes.length;$++)_.push(V.paintVertexAttributes[$].name);else if(V instanceof Br)for(var ae=0;ae<D.members.length;ae++)_.push(D.members[ae].name)}return _},Di.prototype.getBinderUniforms=function(){var _=[];for(var I in this.binders){var V=this.binders[I];if(V instanceof Dt||V instanceof vt||V instanceof yr)for(var $=0,ae=V.uniformNames;$<ae.length;$+=1){var he=ae[$];_.push(he)}}return _},Di.prototype.getPaintVertexBuffers=function(){return this._buffers},Di.prototype.getUniforms=function(_,I){var V=[];for(var $ in this.binders){var ae=this.binders[$];if(ae instanceof Dt||ae instanceof vt||ae instanceof yr)for(var he=0,Fe=ae.uniformNames;he<Fe.length;he+=1){var it=Fe[he];if(I[it]){var yt=ae.getBinding(_,I[it],it);V.push({name:it,property:$,binding:yt})}}}return V},Di.prototype.setUniforms=function(_,I,V,$){for(var ae=0,he=I;ae<he.length;ae+=1){var Fe=he[ae],it=Fe.name,yt=Fe.property,Lt=Fe.binding;this.binders[yt].setUniform(Lt,$,V.get(yt),it)}},Di.prototype.updatePaintBuffers=function(_){this._buffers=[];for(var I in this.binders){var V=this.binders[I];if(_&&V instanceof Br){var $=_.fromScale===2?V.zoomInPaintVertexBuffer:V.zoomOutPaintVertexBuffer;$&&this._buffers.push($)}else(V instanceof lr||V instanceof yr)&&V.paintVertexBuffer&&this._buffers.push(V.paintVertexBuffer)}},Di.prototype.upload=function(_){for(var I in this.binders){var V=this.binders[I];(V instanceof lr||V instanceof yr||V instanceof Br)&&V.upload(_)}this.updatePaintBuffers()},Di.prototype.destroy=function(){for(var _ in this.binders){var I=this.binders[_];(I instanceof lr||I instanceof yr||I instanceof Br)&&I.destroy()}};var ci=function(_,I,V){V===void 0&&(V=function(){return!0}),this.programConfigurations={};for(var $=0,ae=_;$<ae.length;$+=1){var he=ae[$];this.programConfigurations[he.id]=new Di(he,I,V)}this.needsUpload=!1,this._featureMap=new be,this._bufferOffset=0};ci.prototype.populatePaintArrays=function(_,I,V,$,ae,he){for(var Fe in this.programConfigurations)this.programConfigurations[Fe].populatePaintArrays(_,I,$,ae,he);I.id!==void 0&&this._featureMap.add(I.id,V,this._bufferOffset,_),this._bufferOffset=_,this.needsUpload=!0},ci.prototype.updatePaintArrays=function(_,I,V,$){for(var ae=0,he=V;ae<he.length;ae+=1){var Fe=he[ae];this.needsUpload=this.programConfigurations[Fe.id].updatePaintArrays(_,this._featureMap,I,Fe,$)||this.needsUpload}},ci.prototype.get=function(_){return this.programConfigurations[_]},ci.prototype.upload=function(_){if(this.needsUpload){for(var I in this.programConfigurations)this.programConfigurations[I].upload(_);this.needsUpload=!1}},ci.prototype.destroy=function(){for(var _ in this.programConfigurations)this.programConfigurations[_].destroy()};function bi(y,_){var I={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]};return I[y]||[y.replace(_+"-","").replace(/-/g,"_")]}function gn(y){var _={"line-pattern":{source:Xi,composite:Xi},"fill-pattern":{source:Xi,composite:Xi},"fill-extrusion-pattern":{source:Xi,composite:Xi}};return _[y]}function tn(y,_,I){var V={color:{source:nn,composite:is},number:{source:Ki,composite:nn}},$=gn(y);return $&&$[I]||V[_][I]}X("ConstantBinder",Dt),X("CrossFadedConstantBinder",vt),X("SourceExpressionBinder",lr),X("CrossFadedCompositeBinder",Br),X("CompositeExpressionBinder",yr),X("ProgramConfiguration",Di,{omit:["_buffers"]}),X("ProgramConfigurationSet",ci);var Ei=8192,Oi=15,Gi=Math.pow(2,Oi-1)-1,on=-Gi-1;function zn(y){for(var _=Ei/y.extent,I=y.loadGeometry(),V=0;V<I.length;V++)for(var $=I[V],ae=0;ae<$.length;ae++){var he=$[ae],Fe=Math.round(he.x*_),it=Math.round(he.y*_);he.x=p(Fe,on,Gi),he.y=p(it,on,Gi),(Fe<he.x||Fe>he.x+1||it<he.y||it>he.y+1)&&re("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return I}function Ja(y,_){return{type:y.type,id:y.id,properties:y.properties,geometry:_?zn(y):[]}}function co(y,_,I,V,$){y.emplaceBack(_*2+(V+1)/2,I*2+($+1)/2)}var ts=function(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=_.index,this.hasPattern=!1,this.layoutVertexArray=new Zr,this.indexArray=new pn,this.segments=new io,this.programConfigurations=new ci(_.layers,_.zoom),this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};ts.prototype.populate=function(_,I,V){var $=this.layers[0],ae=[],he=null;$.type==="circle"&&(he=$.layout.get("circle-sort-key"));for(var Fe=0,it=_;Fe<it.length;Fe+=1){var yt=it[Fe],Lt=yt.feature,sr=yt.id,gr=yt.index,hr=yt.sourceLayerIndex,Rr=this.layers[0]._featureFilter.needGeometry,ni=Ja(Lt,Rr);if(this.layers[0]._featureFilter.filter(new Un(this.zoom),ni,V)){var Hi=he?he.evaluate(ni,{},V):void 0,wi={id:sr,properties:Lt.properties,type:Lt.type,sourceLayerIndex:hr,index:gr,geometry:Rr?ni.geometry:zn(Lt),patterns:{},sortKey:Hi};ae.push(wi)}}he&&ae.sort(function(za,Za){return za.sortKey-Za.sortKey});for(var bn=0,rn=ae;bn<rn.length;bn+=1){var xn=rn[bn],In=xn,Xn=In.geometry,ga=In.index,ha=In.sourceLayerIndex,eo=_[ga].feature;this.addFeature(xn,Xn,ga,V),I.featureIndex.insert(eo,Xn,ga,ha,this.index)}},ts.prototype.update=function(_,I,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(_,I,this.stateDependentLayers,V)},ts.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},ts.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ts.prototype.upload=function(_){this.uploaded||(this.layoutVertexBuffer=_.createVertexBuffer(this.layoutVertexArray,ol),this.indexBuffer=_.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(_),this.uploaded=!0},ts.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ts.prototype.addFeature=function(_,I,V,$){for(var ae=0,he=I;ae<he.length;ae+=1)for(var Fe=he[ae],it=0,yt=Fe;it<yt.length;it+=1){var Lt=yt[it],sr=Lt.x,gr=Lt.y;if(!(sr<0||sr>=Ei||gr<0||gr>=Ei)){var hr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,_.sortKey),Rr=hr.vertexLength;co(this.layoutVertexArray,sr,gr,-1,-1),co(this.layoutVertexArray,sr,gr,1,-1),co(this.layoutVertexArray,sr,gr,1,1),co(this.layoutVertexArray,sr,gr,-1,1),this.indexArray.emplaceBack(Rr,Rr+1,Rr+2),this.indexArray.emplaceBack(Rr,Rr+3,Rr+2),hr.vertexLength+=4,hr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,_,V,{},$)},X("CircleBucket",ts,{omit:["layers"]});function so(y,_){for(var I=0;I<y.length;I++)if(Td(_,y[I]))return!0;for(var V=0;V<_.length;V++)if(Td(y,_[V]))return!0;return!!Lv(y,_)}function Yo(y,_,I){return!!(Td(y,_)||Kv(_,y,I))}function ms(y,_){if(y.length===1)return gp(_,y[0]);for(var I=0;I<_.length;I++)for(var V=_[I],$=0;$<V.length;$++)if(Td(y,V[$]))return!0;for(var ae=0;ae<y.length;ae++)if(gp(_,y[ae]))return!0;for(var he=0;he<_.length;he++)if(Lv(y,_[he]))return!0;return!1}function ou(y,_,I){for(var V=0;V<_.length;V++){var $=_[V];if(y.length>=3){for(var ae=0;ae<$.length;ae++)if(Td(y,$[ae]))return!0}if(Cv(y,$,I))return!0}return!1}function Cv(y,_,I){if(y.length>1){if(Lv(y,_))return!0;for(var V=0;V<_.length;V++)if(Kv(_[V],y,I))return!0}for(var $=0;$<y.length;$++)if(Kv(y[$],_,I))return!0;return!1}function Lv(y,_){if(y.length===0||_.length===0)return!1;for(var I=0;I<y.length-1;I++)for(var V=y[I],$=y[I+1],ae=0;ae<_.length-1;ae++){var he=_[ae],Fe=_[ae+1];if(wd(V,$,he,Fe))return!0}return!1}function wd(y,_,I,V){return oe(y,I,V)!==oe(_,I,V)&&oe(y,_,I)!==oe(y,_,V)}function Kv(y,_,I){var V=I*I;if(_.length===1)return y.distSqr(_[0])<V;for(var $=1;$<_.length;$++){var ae=_[$-1],he=_[$];if(hg(y,ae,he)<V)return!0}return!1}function hg(y,_,I){var V=_.distSqr(I);if(V===0)return y.distSqr(_);var $=((y.x-_.x)*(I.x-_.x)+(y.y-_.y)*(I.y-_.y))/V;return $<0?y.distSqr(_):$>1?y.distSqr(I):y.distSqr(I.sub(_)._mult($)._add(_))}function gp(y,_){for(var I=!1,V,$,ae,he=0;he<y.length;he++){V=y[he];for(var Fe=0,it=V.length-1;Fe<V.length;it=Fe++)$=V[Fe],ae=V[it],$.y>_.y!=ae.y>_.y&&_.x<(ae.x-$.x)*(_.y-$.y)/(ae.y-$.y)+$.x&&(I=!I)}return I}function Td(y,_){for(var I=!1,V=0,$=y.length-1;V<y.length;$=V++){var ae=y[V],he=y[$];ae.y>_.y!=he.y>_.y&&_.x<(he.x-ae.x)*(_.y-ae.y)/(he.y-ae.y)+ae.x&&(I=!I)}return I}function mp(y,_,I,V,$){for(var ae=0,he=y;ae<he.length;ae+=1){var Fe=he[ae];if(_<=Fe.x&&I<=Fe.y&&V>=Fe.x&&$>=Fe.y)return!0}var it=[new u(_,I),new u(_,$),new u(V,$),new u(V,I)];if(y.length>2)for(var yt=0,Lt=it;yt<Lt.length;yt+=1){var sr=Lt[yt];if(Td(y,sr))return!0}for(var gr=0;gr<y.length-1;gr++){var hr=y[gr],Rr=y[gr+1];if(Ud(hr,Rr,it))return!0}return!1}function Ud(y,_,I){var V=I[0],$=I[2];if(y.x<V.x&&_.x<V.x||y.x>$.x&&_.x>$.x||y.y<V.y&&_.y<V.y||y.y>$.y&&_.y>$.y)return!1;var ae=oe(y,_,I[0]);return ae!==oe(y,_,I[1])||ae!==oe(y,_,I[2])||ae!==oe(y,_,I[3])}function Ad(y,_,I){var V=_.paint.get(y).value;return V.kind==="constant"?V.value:I.programConfigurations.get(_.id).getMaxValue(y)}function Pv(y){return Math.sqrt(y[0]*y[0]+y[1]*y[1])}function Jv(y,_,I,V,$){if(!_[0]&&!_[1])return y;var ae=u.convert(_)._mult($);I==="viewport"&&ae._rotate(-V);for(var he=[],Fe=0;Fe<y.length;Fe++){var it=y[Fe];he.push(it.sub(ae))}return he}var Iv=new Or({"circle-sort-key":new bt(Rn.layout_circle["circle-sort-key"])}),fy=new Or({"circle-radius":new bt(Rn.paint_circle["circle-radius"]),"circle-color":new bt(Rn.paint_circle["circle-color"]),"circle-blur":new bt(Rn.paint_circle["circle-blur"]),"circle-opacity":new bt(Rn.paint_circle["circle-opacity"]),"circle-translate":new Me(Rn.paint_circle["circle-translate"]),"circle-translate-anchor":new Me(Rn.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Me(Rn.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Me(Rn.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new bt(Rn.paint_circle["circle-stroke-width"]),"circle-stroke-color":new bt(Rn.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new bt(Rn.paint_circle["circle-stroke-opacity"])}),dg={paint:fy,layout:Iv},oh=typeof Float32Array!="undefined"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var y=arguments,_=0,I=arguments.length;I--;)_+=y[I]*y[I];return Math.sqrt(_)});function vg(){var y=new oh(4);return oh!=Float32Array&&(y[1]=0,y[2]=0),y[0]=1,y[3]=1,y}function hy(y,_,I){var V=_[0],$=_[1],ae=_[2],he=_[3],Fe=Math.sin(I),it=Math.cos(I);return y[0]=V*it+ae*Fe,y[1]=$*it+he*Fe,y[2]=V*-Fe+ae*it,y[3]=$*-Fe+he*it,y}function Zh(){var y=new oh(9);return oh!=Float32Array&&(y[1]=0,y[2]=0,y[3]=0,y[5]=0,y[6]=0,y[7]=0),y[0]=1,y[4]=1,y[8]=1,y}function am(y,_){var I=Math.sin(_),V=Math.cos(_);return y[0]=V,y[1]=I,y[2]=0,y[3]=-I,y[4]=V,y[5]=0,y[6]=0,y[7]=0,y[8]=1,y}function k1(){var y=new oh(16);return oh!=Float32Array&&(y[1]=0,y[2]=0,y[3]=0,y[4]=0,y[6]=0,y[7]=0,y[8]=0,y[9]=0,y[11]=0,y[12]=0,y[13]=0,y[14]=0),y[0]=1,y[5]=1,y[10]=1,y[15]=1,y}function C1(y){var _=new oh(16);return _[0]=y[0],_[1]=y[1],_[2]=y[2],_[3]=y[3],_[4]=y[4],_[5]=y[5],_[6]=y[6],_[7]=y[7],_[8]=y[8],_[9]=y[9],_[10]=y[10],_[11]=y[11],_[12]=y[12],_[13]=y[13],_[14]=y[14],_[15]=y[15],_}function dy(y){return y[0]=1,y[1]=0,y[2]=0,y[3]=0,y[4]=0,y[5]=1,y[6]=0,y[7]=0,y[8]=0,y[9]=0,y[10]=1,y[11]=0,y[12]=0,y[13]=0,y[14]=0,y[15]=1,y}function om(y,_){var I=_[0],V=_[1],$=_[2],ae=_[3],he=_[4],Fe=_[5],it=_[6],yt=_[7],Lt=_[8],sr=_[9],gr=_[10],hr=_[11],Rr=_[12],ni=_[13],Hi=_[14],wi=_[15],bn=I*Fe-V*he,rn=I*it-$*he,xn=I*yt-ae*he,In=V*it-$*Fe,Xn=V*yt-ae*Fe,ga=$*yt-ae*it,ha=Lt*ni-sr*Rr,eo=Lt*Hi-gr*Rr,za=Lt*wi-hr*Rr,Za=sr*Hi-gr*ni,Jo=sr*wi-hr*ni,to=gr*wi-hr*Hi,ao=bn*to-rn*Jo+xn*Za+In*za-Xn*eo+ga*ha;return ao?(ao=1/ao,y[0]=(Fe*to-it*Jo+yt*Za)*ao,y[1]=($*Jo-V*to-ae*Za)*ao,y[2]=(ni*ga-Hi*Xn+wi*In)*ao,y[3]=(gr*Xn-sr*ga-hr*In)*ao,y[4]=(it*za-he*to-yt*eo)*ao,y[5]=(I*to-$*za+ae*eo)*ao,y[6]=(Hi*xn-Rr*ga-wi*rn)*ao,y[7]=(Lt*ga-gr*xn+hr*rn)*ao,y[8]=(he*Jo-Fe*za+yt*ha)*ao,y[9]=(V*za-I*Jo-ae*ha)*ao,y[10]=(Rr*Xn-ni*xn+wi*bn)*ao,y[11]=(sr*xn-Lt*Xn-hr*bn)*ao,y[12]=(Fe*eo-he*Za-it*ha)*ao,y[13]=(I*Za-V*eo+$*ha)*ao,y[14]=(ni*rn-Rr*In-Hi*bn)*ao,y[15]=(Lt*In-sr*rn+gr*bn)*ao,y):null}function sm(y,_,I){var V=_[0],$=_[1],ae=_[2],he=_[3],Fe=_[4],it=_[5],yt=_[6],Lt=_[7],sr=_[8],gr=_[9],hr=_[10],Rr=_[11],ni=_[12],Hi=_[13],wi=_[14],bn=_[15],rn=I[0],xn=I[1],In=I[2],Xn=I[3];return y[0]=rn*V+xn*Fe+In*sr+Xn*ni,y[1]=rn*$+xn*it+In*gr+Xn*Hi,y[2]=rn*ae+xn*yt+In*hr+Xn*wi,y[3]=rn*he+xn*Lt+In*Rr+Xn*bn,rn=I[4],xn=I[5],In=I[6],Xn=I[7],y[4]=rn*V+xn*Fe+In*sr+Xn*ni,y[5]=rn*$+xn*it+In*gr+Xn*Hi,y[6]=rn*ae+xn*yt+In*hr+Xn*wi,y[7]=rn*he+xn*Lt+In*Rr+Xn*bn,rn=I[8],xn=I[9],In=I[10],Xn=I[11],y[8]=rn*V+xn*Fe+In*sr+Xn*ni,y[9]=rn*$+xn*it+In*gr+Xn*Hi,y[10]=rn*ae+xn*yt+In*hr+Xn*wi,y[11]=rn*he+xn*Lt+In*Rr+Xn*bn,rn=I[12],xn=I[13],In=I[14],Xn=I[15],y[12]=rn*V+xn*Fe+In*sr+Xn*ni,y[13]=rn*$+xn*it+In*gr+Xn*Hi,y[14]=rn*ae+xn*yt+In*hr+Xn*wi,y[15]=rn*he+xn*Lt+In*Rr+Xn*bn,y}function vc(y,_,I){var V=I[0],$=I[1],ae=I[2],he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi;return _===y?(y[12]=_[0]*V+_[4]*$+_[8]*ae+_[12],y[13]=_[1]*V+_[5]*$+_[9]*ae+_[13],y[14]=_[2]*V+_[6]*$+_[10]*ae+_[14],y[15]=_[3]*V+_[7]*$+_[11]*ae+_[15]):(he=_[0],Fe=_[1],it=_[2],yt=_[3],Lt=_[4],sr=_[5],gr=_[6],hr=_[7],Rr=_[8],ni=_[9],Hi=_[10],wi=_[11],y[0]=he,y[1]=Fe,y[2]=it,y[3]=yt,y[4]=Lt,y[5]=sr,y[6]=gr,y[7]=hr,y[8]=Rr,y[9]=ni,y[10]=Hi,y[11]=wi,y[12]=he*V+Lt*$+Rr*ae+_[12],y[13]=Fe*V+sr*$+ni*ae+_[13],y[14]=it*V+gr*$+Hi*ae+_[14],y[15]=yt*V+hr*$+wi*ae+_[15]),y}function tu(y,_,I){var V=I[0],$=I[1],ae=I[2];return y[0]=_[0]*V,y[1]=_[1]*V,y[2]=_[2]*V,y[3]=_[3]*V,y[4]=_[4]*$,y[5]=_[5]*$,y[6]=_[6]*$,y[7]=_[7]*$,y[8]=_[8]*ae,y[9]=_[9]*ae,y[10]=_[10]*ae,y[11]=_[11]*ae,y[12]=_[12],y[13]=_[13],y[14]=_[14],y[15]=_[15],y}function Sd(y,_,I){var V=Math.sin(I),$=Math.cos(I),ae=_[4],he=_[5],Fe=_[6],it=_[7],yt=_[8],Lt=_[9],sr=_[10],gr=_[11];return _!==y&&(y[0]=_[0],y[1]=_[1],y[2]=_[2],y[3]=_[3],y[12]=_[12],y[13]=_[13],y[14]=_[14],y[15]=_[15]),y[4]=ae*$+yt*V,y[5]=he*$+Lt*V,y[6]=Fe*$+sr*V,y[7]=it*$+gr*V,y[8]=yt*$-ae*V,y[9]=Lt*$-he*V,y[10]=sr*$-Fe*V,y[11]=gr*$-it*V,y}function vy(y,_,I){var V=Math.sin(I),$=Math.cos(I),ae=_[0],he=_[1],Fe=_[2],it=_[3],yt=_[4],Lt=_[5],sr=_[6],gr=_[7];return _!==y&&(y[8]=_[8],y[9]=_[9],y[10]=_[10],y[11]=_[11],y[12]=_[12],y[13]=_[13],y[14]=_[14],y[15]=_[15]),y[0]=ae*$+yt*V,y[1]=he*$+Lt*V,y[2]=Fe*$+sr*V,y[3]=it*$+gr*V,y[4]=yt*$-ae*V,y[5]=Lt*$-he*V,y[6]=sr*$-Fe*V,y[7]=gr*$-it*V,y}function L1(y,_,I,V,$){var ae=1/Math.tan(_/2),he;return y[0]=ae/I,y[1]=0,y[2]=0,y[3]=0,y[4]=0,y[5]=ae,y[6]=0,y[7]=0,y[8]=0,y[9]=0,y[11]=-1,y[12]=0,y[13]=0,y[15]=0,$!=null&&$!==1/0?(he=1/(V-$),y[10]=($+V)*he,y[14]=2*$*V*he):(y[10]=-1,y[14]=-2*V),y}function wu(y,_,I,V,$,ae,he){var Fe=1/(_-I),it=1/(V-$),yt=1/(ae-he);return y[0]=-2*Fe,y[1]=0,y[2]=0,y[3]=0,y[4]=0,y[5]=-2*it,y[6]=0,y[7]=0,y[8]=0,y[9]=0,y[10]=2*yt,y[11]=0,y[12]=(_+I)*Fe,y[13]=($+V)*it,y[14]=(he+ae)*yt,y[15]=1,y}var Yx=sm;function lm(){var y=new oh(3);return oh!=Float32Array&&(y[0]=0,y[1]=0,y[2]=0),y}function Ow(y){var _=new oh(3);return _[0]=y[0],_[1]=y[1],_[2]=y[2],_}function Rv(y,_,I){return y[0]=_[0]+I[0],y[1]=_[1]+I[1],y[2]=_[2]+I[2],y}function um(y,_,I){return y[0]=_[0]-I[0],y[1]=_[1]-I[1],y[2]=_[2]-I[2],y}function Bw(y,_,I){return y[0]=_[0]*I,y[1]=_[1]*I,y[2]=_[2]*I,y}function Kx(y,_){var I=_[0],V=_[1],$=_[2],ae=I*I+V*V+$*$;return ae>0&&(ae=1/Math.sqrt(ae)),y[0]=_[0]*ae,y[1]=_[1]*ae,y[2]=_[2]*ae,y}function V9(y,_){return y[0]*_[0]+y[1]*_[1]+y[2]*_[2]}function G9(y,_,I){var V=_[0],$=_[1],ae=_[2],he=I[0],Fe=I[1],it=I[2];return y[0]=$*it-ae*Fe,y[1]=ae*he-V*it,y[2]=V*Fe-$*he,y}function H9(y,_,I){var V=_[0],$=_[1],ae=_[2];return y[0]=V*I[0]+$*I[3]+ae*I[6],y[1]=V*I[1]+$*I[4]+ae*I[7],y[2]=V*I[2]+$*I[5]+ae*I[8],y}var j9=um,qQ=function(){var y=lm();return function(_,I,V,$,ae,he){var Fe,it;for(I||(I=3),V||(V=0),$?it=Math.min($*I+V,_.length):it=_.length,Fe=V;Fe<it;Fe+=I)y[0]=_[Fe],y[1]=_[Fe+1],y[2]=_[Fe+2],ae(y,y,he),_[Fe]=y[0],_[Fe+1]=y[1],_[Fe+2]=y[2];return _}}();function W9(){var y=new oh(4);return oh!=Float32Array&&(y[0]=0,y[1]=0,y[2]=0,y[3]=0),y}function X9(y,_,I){return y[0]=_[0]*I,y[1]=_[1]*I,y[2]=_[2]*I,y[3]=_[3]*I,y}function Z9(y,_){return y[0]*_[0]+y[1]*_[1]+y[2]*_[2]+y[3]*_[3]}function py(y,_,I){var V=_[0],$=_[1],ae=_[2],he=_[3];return y[0]=I[0]*V+I[4]*$+I[8]*ae+I[12]*he,y[1]=I[1]*V+I[5]*$+I[9]*ae+I[13]*he,y[2]=I[2]*V+I[6]*$+I[10]*ae+I[14]*he,y[3]=I[3]*V+I[7]*$+I[11]*ae+I[15]*he,y}var Jx=function(){var y=W9();return function(_,I,V,$,ae,he){var Fe,it;for(I||(I=4),V||(V=0),$?it=Math.min($*I+V,_.length):it=_.length,Fe=V;Fe<it;Fe+=I)y[0]=_[Fe],y[1]=_[Fe+1],y[2]=_[Fe+2],y[3]=_[Fe+3],ae(y,y,he),_[Fe]=y[0],_[Fe+1]=y[1],_[Fe+2]=y[2],_[Fe+3]=y[3];return _}}();function SC(){var y=new oh(2);return oh!=Float32Array&&(y[0]=0,y[1]=0),y}function lS(y){var _=y[0],I=y[1];return _*_+I*I}var uS=lS,OQ=function(){var y=SC();return function(_,I,V,$,ae,he){var Fe,it;for(I||(I=2),V||(V=0),$?it=Math.min($*I+V,_.length):it=_.length,Fe=V;Fe<it;Fe+=I)y[0]=_[Fe],y[1]=_[Fe+1],ae(y,y,he),_[Fe]=y[0],_[Fe+1]=y[1];return _}}(),Y9=function(y){function _(I){y.call(this,I,dg)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.createBucket=function(V){return new ts(V)},_.prototype.queryRadius=function(V){var $=V;return Ad("circle-radius",this,$)+Ad("circle-stroke-width",this,$)+Pv(this.paint.get("circle-translate"))},_.prototype.queryIntersectsFeature=function(V,$,ae,he,Fe,it,yt,Lt){for(var sr=Jv(V,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),it.angle,yt),gr=this.paint.get("circle-radius").evaluate($,ae),hr=this.paint.get("circle-stroke-width").evaluate($,ae),Rr=gr+hr,ni=this.paint.get("circle-pitch-alignment")==="map",Hi=ni?sr:EC(sr,Lt),wi=ni?Rr*yt:Rr,bn=0,rn=he;bn<rn.length;bn+=1)for(var xn=rn[bn],In=0,Xn=xn;In<Xn.length;In+=1){var ga=Xn[In],ha=ni?ga:MC(ga,Lt),eo=wi,za=py([],[ga.x,ga.y,0,1],Lt);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?eo*=za[3]/it.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(eo*=it.cameraToCenterDistance/za[3]),Yo(Hi,ha,eo))return!0}return!1},_}(vi);function MC(y,_){var I=py([],[y.x,y.y,0,1],_);return new u(I[0]/I[3],I[1]/I[3])}function EC(y,_){return y.map(function(I){return MC(I,_)})}var cS=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_}(ts);X("HeatmapBucket",cS,{omit:["layers"]});function Md(y,_,I,V){var $=_.width,ae=_.height;if(!V)V=new Uint8Array($*ae*I);else if(V instanceof Uint8ClampedArray)V=new Uint8Array(V.buffer);else if(V.length!==$*ae*I)throw new RangeError("mismatched image size");return y.width=$,y.height=ae,y.data=V,y}function Nw(y,_,I){var V=_.width,$=_.height;if(!(V===y.width&&$===y.height)){var ae=Md({},{width:V,height:$},I);Uw(y,ae,{x:0,y:0},{x:0,y:0},{width:Math.min(y.width,V),height:Math.min(y.height,$)},I),y.width=V,y.height=$,y.data=ae.data}}function Uw(y,_,I,V,$,ae){if($.width===0||$.height===0)return _;if($.width>y.width||$.height>y.height||I.x>y.width-$.width||I.y>y.height-$.height)throw new RangeError("out of range source coordinates for image copy");if($.width>_.width||$.height>_.height||V.x>_.width-$.width||V.y>_.height-$.height)throw new RangeError("out of range destination coordinates for image copy");for(var he=y.data,Fe=_.data,it=0;it<$.height;it++)for(var yt=((I.y+it)*y.width+I.x)*ae,Lt=((V.y+it)*_.width+V.x)*ae,sr=0;sr<$.width*ae;sr++)Fe[Lt+sr]=he[yt+sr];return _}var Dv=function(_,I){Md(this,_,1,I)};Dv.prototype.resize=function(_){Nw(this,_,1)},Dv.prototype.clone=function(){return new Dv({width:this.width,height:this.height},new Uint8Array(this.data))},Dv.copy=function(_,I,V,$,ae){Uw(_,I,V,$,ae,1)};var Eh=function(_,I){Md(this,_,4,I)};Eh.prototype.resize=function(_){Nw(this,_,4)},Eh.prototype.replace=function(_,I){I?this.data.set(_):_ instanceof Uint8ClampedArray?this.data=new Uint8Array(_.buffer):this.data=_},Eh.prototype.clone=function(){return new Eh({width:this.width,height:this.height},new Uint8Array(this.data))},Eh.copy=function(_,I,V,$,ae){Uw(_,I,V,$,ae,4)},X("AlphaImage",Dv),X("RGBAImage",Eh);var $x=new Or({"heatmap-radius":new bt(Rn.paint_heatmap["heatmap-radius"]),"heatmap-weight":new bt(Rn.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Me(Rn.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Vr(Rn.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Me(Rn.paint_heatmap["heatmap-opacity"])}),P1={paint:$x};function Qx(y){var _={},I=y.resolution||256,V=y.clips?y.clips.length:1,$=y.image||new Eh({width:I,height:V}),ae=function(bn,rn,xn){_[y.evaluationKey]=xn;var In=y.expression.evaluate(_);$.data[bn+rn+0]=Math.floor(In.r*255/In.a),$.data[bn+rn+1]=Math.floor(In.g*255/In.a),$.data[bn+rn+2]=Math.floor(In.b*255/In.a),$.data[bn+rn+3]=Math.floor(In.a*255)};if(y.clips)for(var yt=0,Lt=0;yt<V;++yt,Lt+=I*4)for(var sr=0,gr=0;sr<I;sr++,gr+=4){var hr=sr/(I-1),Rr=y.clips[yt],ni=Rr.start,Hi=Rr.end,wi=ni*(1-hr)+Hi*hr;ae(Lt,gr,wi)}else for(var he=0,Fe=0;he<I;he++,Fe+=4){var it=he/(I-1);ae(0,Fe,it)}return $}var Vw=function(y){function _(I){y.call(this,I,P1),this._updateColorRamp()}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.createBucket=function(V){return new cS(V)},_.prototype._handleSpecialPaintPropertyUpdate=function(V){V==="heatmap-color"&&this._updateColorRamp()},_.prototype._updateColorRamp=function(){var V=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=Qx({expression:V,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},_.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},_.prototype.queryRadius=function(){return 0},_.prototype.queryIntersectsFeature=function(){return!1},_.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},_}(vi),K9=new Or({"hillshade-illumination-direction":new Me(Rn.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Me(Rn.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Me(Rn.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Me(Rn.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Me(Rn.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Me(Rn.paint_hillshade["hillshade-accent-color"])}),J9={paint:K9},kC=function(y){function _(I){y.call(this,I,J9)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},_}(vi),CC=ji([{name:"a_pos",components:2,type:"Int16"}],4),$9=CC.members,Gw=I1,LC=I1;function I1(y,_,I){I=I||2;var V=_&&_.length,$=V?_[0]*I:y.length,ae=Hw(y,0,$,I,!0),he=[];if(!ae||ae.next===ae.prev)return he;var Fe,it,yt,Lt,sr,gr,hr;if(V&&(ae=fm(y,_,ae,I)),y.length>80*I){Fe=yt=y[0],it=Lt=y[1];for(var Rr=I;Rr<$;Rr+=I)sr=y[Rr],gr=y[Rr+1],sr<Fe&&(Fe=sr),gr<it&&(it=gr),sr>yt&&(yt=sr),gr>Lt&&(Lt=gr);hr=Math.max(yt-Fe,Lt-it),hr=hr!==0?1/hr:0}return eb(ae,he,I,Fe,it,hr),he}function Hw(y,_,I,V,$){var ae,he;if($===mS(y,_,I,V)>0)for(ae=_;ae<I;ae+=V)he=FC(ae,y[ae],y[ae+1],he);else for(ae=I-V;ae>=_;ae-=V)he=FC(ae,y[ae],y[ae+1],he);return he&&rb(he,he.next)&&(ab(he),he=he.next),he}function cm(y,_){if(!y)return y;_||(_=y);var I=y,V;do if(V=!1,!I.steiner&&(rb(I,I.next)||Tf(I.prev,I,I.next)===0)){if(ab(I),I=_=I.prev,I===I.next)break;V=!0}else I=I.next;while(V||I!==_);return _}function eb(y,_,I,V,$,ae,he){if(y){!he&&ae&&jw(y,V,$,ae);for(var Fe=y,it,yt;y.prev!==y.next;){if(it=y.prev,yt=y.next,ae?IC(y,V,$,ae):PC(y)){_.push(it.i/I),_.push(y.i/I),_.push(yt.i/I),ab(y),y=yt.next,Fe=yt.next;continue}if(y=yt,y===Fe){he?he===1?(y=tb(cm(y),_,I),eb(y,_,I,V,$,ae,2)):he===2&&v0(y,_,I,V,$,ae):eb(cm(y),_,I,V,$,ae,1);break}}}}function PC(y){var _=y.prev,I=y,V=y.next;if(Tf(_,I,V)>=0)return!1;for(var $=y.next.next;$!==y.prev;){if(hm(_.x,_.y,I.x,I.y,V.x,V.y,$.x,$.y)&&Tf($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function IC(y,_,I,V){var $=y.prev,ae=y,he=y.next;if(Tf($,ae,he)>=0)return!1;for(var Fe=$.x<ae.x?$.x<he.x?$.x:he.x:ae.x<he.x?ae.x:he.x,it=$.y<ae.y?$.y<he.y?$.y:he.y:ae.y<he.y?ae.y:he.y,yt=$.x>ae.x?$.x>he.x?$.x:he.x:ae.x>he.x?ae.x:he.x,Lt=$.y>ae.y?$.y>he.y?$.y:he.y:ae.y>he.y?ae.y:he.y,sr=dS(Fe,it,_,I,V),gr=dS(yt,Lt,_,I,V),hr=y.prevZ,Rr=y.nextZ;hr&&hr.z>=sr&&Rr&&Rr.z<=gr;){if(hr!==y.prev&&hr!==y.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,hr.x,hr.y)&&Tf(hr.prev,hr,hr.next)>=0||(hr=hr.prevZ,Rr!==y.prev&&Rr!==y.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,Rr.x,Rr.y)&&Tf(Rr.prev,Rr,Rr.next)>=0))return!1;Rr=Rr.nextZ}for(;hr&&hr.z>=sr;){if(hr!==y.prev&&hr!==y.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,hr.x,hr.y)&&Tf(hr.prev,hr,hr.next)>=0)return!1;hr=hr.prevZ}for(;Rr&&Rr.z<=gr;){if(Rr!==y.prev&&Rr!==y.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,Rr.x,Rr.y)&&Tf(Rr.prev,Rr,Rr.next)>=0)return!1;Rr=Rr.nextZ}return!0}function tb(y,_,I){var V=y;do{var $=V.prev,ae=V.next.next;!rb($,ae)&&Ww($,V,V.next,ae)&&nb($,ae)&&nb(ae,$)&&(_.push($.i/I),_.push(V.i/I),_.push(ae.i/I),ab(V),ab(V.next),V=y=ae),V=V.next}while(V!==y);return cm(V)}function v0(y,_,I,V,$,ae){var he=y;do{for(var Fe=he.next.next;Fe!==he.prev;){if(he.i!==Fe.i&&R1(he,Fe)){var it=pS(he,Fe);he=cm(he,he.next),it=cm(it,it.next),eb(he,_,I,V,$,ae),eb(it,_,I,V,$,ae);return}Fe=Fe.next}he=he.next}while(he!==y)}function fm(y,_,I,V){var $=[],ae,he,Fe,it,yt;for(ae=0,he=_.length;ae<he;ae++)Fe=_[ae]*V,it=ae<he-1?_[ae+1]*V:y.length,yt=Hw(y,Fe,it,V,!1),yt===yt.next&&(yt.steiner=!0),$.push(vS(yt));for($.sort(RC),ae=0;ae<$.length;ae++)fS($[ae],I),I=cm(I,I.next);return I}function RC(y,_){return y.x-_.x}function fS(y,_){if(_=Q9(y,_),_){var I=pS(_,y);cm(_,_.next),cm(I,I.next)}}function Q9(y,_){var I=_,V=y.x,$=y.y,ae=-1/0,he;do{if($<=I.y&&$>=I.next.y&&I.next.y!==I.y){var Fe=I.x+($-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Fe<=V&&Fe>ae){if(ae=Fe,Fe===V){if($===I.y)return I;if($===I.next.y)return I.next}he=I.x<I.next.x?I:I.next}}I=I.next}while(I!==_);if(!he)return null;if(V===ae)return he;var it=he,yt=he.x,Lt=he.y,sr=1/0,gr;I=he;do V>=I.x&&I.x>=yt&&V!==I.x&&hm($<Lt?V:ae,$,yt,Lt,$<Lt?ae:V,$,I.x,I.y)&&(gr=Math.abs($-I.y)/(V-I.x),nb(I,y)&&(gr<sr||gr===sr&&(I.x>he.x||I.x===he.x&&eq(he,I)))&&(he=I,sr=gr)),I=I.next;while(I!==it);return he}function eq(y,_){return Tf(y.prev,y,_.prev)<0&&Tf(_.next,y,y.next)<0}function jw(y,_,I,V){var $=y;do $.z===null&&($.z=dS($.x,$.y,_,I,V)),$.prevZ=$.prev,$.nextZ=$.next,$=$.next;while($!==y);$.prevZ.nextZ=null,$.prevZ=null,hS($)}function hS(y){var _,I,V,$,ae,he,Fe,it,yt=1;do{for(I=y,y=null,ae=null,he=0;I;){for(he++,V=I,Fe=0,_=0;_<yt&&(Fe++,V=V.nextZ,!!V);_++);for(it=yt;Fe>0||it>0&&V;)Fe!==0&&(it===0||!V||I.z<=V.z)?($=I,I=I.nextZ,Fe--):($=V,V=V.nextZ,it--),ae?ae.nextZ=$:y=$,$.prevZ=ae,ae=$;I=V}ae.nextZ=null,yt*=2}while(he>1);return y}function dS(y,_,I,V,$){return y=32767*(y-I)*$,_=32767*(_-V)*$,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,_=(_|_<<8)&16711935,_=(_|_<<4)&252645135,_=(_|_<<2)&858993459,_=(_|_<<1)&1431655765,y|_<<1}function vS(y){var _=y,I=y;do(_.x<I.x||_.x===I.x&&_.y<I.y)&&(I=_),_=_.next;while(_!==y);return I}function hm(y,_,I,V,$,ae,he,Fe){return($-he)*(_-Fe)-(y-he)*(ae-Fe)>=0&&(y-he)*(V-Fe)-(I-he)*(_-Fe)>=0&&(I-he)*(ae-Fe)-($-he)*(V-Fe)>=0}function R1(y,_){return y.next.i!==_.i&&y.prev.i!==_.i&&!DC(y,_)&&(nb(y,_)&&nb(_,y)&&tq(y,_)&&(Tf(y.prev,y,_.prev)||Tf(y,_.prev,_))||rb(y,_)&&Tf(y.prev,y,y.next)>0&&Tf(_.prev,_,_.next)>0)}function Tf(y,_,I){return(_.y-y.y)*(I.x-_.x)-(_.x-y.x)*(I.y-_.y)}function rb(y,_){return y.x===_.x&&y.y===_.y}function Ww(y,_,I,V){var $=gy(Tf(y,_,I)),ae=gy(Tf(y,_,V)),he=gy(Tf(I,V,y)),Fe=gy(Tf(I,V,_));return!!($!==ae&&he!==Fe||$===0&&ib(y,I,_)||ae===0&&ib(y,V,_)||he===0&&ib(I,y,V)||Fe===0&&ib(I,_,V))}function ib(y,_,I){return _.x<=Math.max(y.x,I.x)&&_.x>=Math.min(y.x,I.x)&&_.y<=Math.max(y.y,I.y)&&_.y>=Math.min(y.y,I.y)}function gy(y){return y>0?1:y<0?-1:0}function DC(y,_){var I=y;do{if(I.i!==y.i&&I.next.i!==y.i&&I.i!==_.i&&I.next.i!==_.i&&Ww(I,I.next,y,_))return!0;I=I.next}while(I!==y);return!1}function nb(y,_){return Tf(y.prev,y,y.next)<0?Tf(y,_,y.next)>=0&&Tf(y,y.prev,_)>=0:Tf(y,_,y.prev)<0||Tf(y,y.next,_)<0}function tq(y,_){var I=y,V=!1,$=(y.x+_.x)/2,ae=(y.y+_.y)/2;do I.y>ae!=I.next.y>ae&&I.next.y!==I.y&&$<(I.next.x-I.x)*(ae-I.y)/(I.next.y-I.y)+I.x&&(V=!V),I=I.next;while(I!==y);return V}function pS(y,_){var I=new gS(y.i,y.x,y.y),V=new gS(_.i,_.x,_.y),$=y.next,ae=_.prev;return y.next=_,_.prev=y,I.next=$,$.prev=I,V.next=I,I.prev=V,ae.next=V,V.prev=ae,V}function FC(y,_,I,V){var $=new gS(y,_,I);return V?($.next=V.next,$.prev=V,V.next.prev=$,V.next=$):($.prev=$,$.next=$),$}function ab(y){y.next.prev=y.prev,y.prev.next=y.next,y.prevZ&&(y.prevZ.nextZ=y.nextZ),y.nextZ&&(y.nextZ.prevZ=y.prevZ)}function gS(y,_,I){this.i=y,this.x=_,this.y=I,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}I1.deviation=function(y,_,I,V){var $=_&&_.length,ae=$?_[0]*I:y.length,he=Math.abs(mS(y,0,ae,I));if($)for(var Fe=0,it=_.length;Fe<it;Fe++){var yt=_[Fe]*I,Lt=Fe<it-1?_[Fe+1]*I:y.length;he-=Math.abs(mS(y,yt,Lt,I))}var sr=0;for(Fe=0;Fe<V.length;Fe+=3){var gr=V[Fe]*I,hr=V[Fe+1]*I,Rr=V[Fe+2]*I;sr+=Math.abs((y[gr]-y[Rr])*(y[hr+1]-y[gr+1])-(y[gr]-y[hr])*(y[Rr+1]-y[gr+1]))}return he===0&&sr===0?0:Math.abs((sr-he)/he)};function mS(y,_,I,V){for(var $=0,ae=_,he=I-V;ae<I;ae+=V)$+=(y[he]-y[ae])*(y[ae+1]+y[he+1]),he=ae;return $}I1.flatten=function(y){for(var _=y[0][0].length,I={vertices:[],holes:[],dimensions:_},V=0,$=0;$<y.length;$++){for(var ae=0;ae<y[$].length;ae++)for(var he=0;he<_;he++)I.vertices.push(y[$][ae][he]);$>0&&(V+=y[$-1].length,I.holes.push(V))}return I},Gw.default=LC;function yS(y,_,I,V,$){pg(y,_,I||0,V||y.length-1,$||zC)}function pg(y,_,I,V,$){for(;V>I;){if(V-I>600){var ae=V-I+1,he=_-I+1,Fe=Math.log(ae),it=.5*Math.exp(2*Fe/3),yt=.5*Math.sqrt(Fe*it*(ae-it)/ae)*(he-ae/2<0?-1:1),Lt=Math.max(I,Math.floor(_-he*it/ae+yt)),sr=Math.min(V,Math.floor(_+(ae-he)*it/ae+yt));pg(y,_,Lt,sr,$)}var gr=y[_],hr=I,Rr=V;for(D1(y,I,_),$(y[V],gr)>0&&D1(y,I,V);hr<Rr;){for(D1(y,hr,Rr),hr++,Rr--;$(y[hr],gr)<0;)hr++;for(;$(y[Rr],gr)>0;)Rr--}$(y[I],gr)===0?D1(y,I,Rr):(Rr++,D1(y,Rr,V)),Rr<=_&&(I=Rr+1),_<=Rr&&(V=Rr-1)}}function D1(y,_,I){var V=y[_];y[_]=y[I],y[I]=V}function zC(y,_){return y<_?-1:y>_?1:0}function Xw(y,_){var I=y.length;if(I<=1)return[y];for(var V=[],$,ae,he=0;he<I;he++){var Fe=_e(y[he]);Fe!==0&&(y[he].area=Math.abs(Fe),ae===void 0&&(ae=Fe<0),ae===Fe<0?($&&V.push($),$=[y[he]]):$.push(y[he]))}if($&&V.push($),_>1)for(var it=0;it<V.length;it++)V[it].length<=_||(yS(V[it],_,1,V[it].length-1,qC),V[it]=V[it].slice(0,_));return V}function qC(y,_){return _.area-y.area}function Zw(y,_,I){for(var V=I.patternDependencies,$=!1,ae=0,he=_;ae<he.length;ae+=1){var Fe=he[ae],it=Fe.paint.get(y+"-pattern");it.isConstant()||($=!0);var yt=it.constantOr(null);yt&&($=!0,V[yt.to]=!0,V[yt.from]=!0)}return $}function ob(y,_,I,V,$){for(var ae=$.patternDependencies,he=0,Fe=_;he<Fe.length;he+=1){var it=Fe[he],yt=it.paint.get(y+"-pattern"),Lt=yt.value;if(Lt.kind!=="constant"){var sr=Lt.evaluate({zoom:V-1},I,{},$.availableImages),gr=Lt.evaluate({zoom:V},I,{},$.availableImages),hr=Lt.evaluate({zoom:V+1},I,{},$.availableImages);sr=sr&&sr.name?sr.name:sr,gr=gr&&gr.name?gr.name:gr,hr=hr&&hr.name?hr.name:hr,ae[sr]=!0,ae[gr]=!0,ae[hr]=!0,I.patterns[it.id]={min:sr,mid:gr,max:hr}}}return I}var sb=500,yp=function(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=_.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Zr,this.indexArray=new pn,this.indexArray2=new sa,this.programConfigurations=new ci(_.layers,_.zoom),this.segments=new io,this.segments2=new io,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};yp.prototype.populate=function(_,I,V){this.hasPattern=Zw("fill",this.layers,I);for(var $=this.layers[0].layout.get("fill-sort-key"),ae=[],he=0,Fe=_;he<Fe.length;he+=1){var it=Fe[he],yt=it.feature,Lt=it.id,sr=it.index,gr=it.sourceLayerIndex,hr=this.layers[0]._featureFilter.needGeometry,Rr=Ja(yt,hr);if(this.layers[0]._featureFilter.filter(new Un(this.zoom),Rr,V)){var ni=$?$.evaluate(Rr,{},V,I.availableImages):void 0,Hi={id:Lt,properties:yt.properties,type:yt.type,sourceLayerIndex:gr,index:sr,geometry:hr?Rr.geometry:zn(yt),patterns:{},sortKey:ni};ae.push(Hi)}}$&&ae.sort(function(za,Za){return za.sortKey-Za.sortKey});for(var wi=0,bn=ae;wi<bn.length;wi+=1){var rn=bn[wi],xn=rn,In=xn.geometry,Xn=xn.index,ga=xn.sourceLayerIndex;if(this.hasPattern){var ha=ob("fill",this.layers,rn,this.zoom,I);this.patternFeatures.push(ha)}else this.addFeature(rn,In,Xn,V,{});var eo=_[Xn].feature;I.featureIndex.insert(eo,In,Xn,ga,this.index)}},yp.prototype.update=function(_,I,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(_,I,this.stateDependentLayers,V)},yp.prototype.addFeatures=function(_,I,V){for(var $=0,ae=this.patternFeatures;$<ae.length;$+=1){var he=ae[$];this.addFeature(he,he.geometry,he.index,I,V)}},yp.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},yp.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},yp.prototype.upload=function(_){this.uploaded||(this.layoutVertexBuffer=_.createVertexBuffer(this.layoutVertexArray,$9),this.indexBuffer=_.createIndexBuffer(this.indexArray),this.indexBuffer2=_.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(_),this.uploaded=!0},yp.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},yp.prototype.addFeature=function(_,I,V,$,ae){for(var he=0,Fe=Xw(I,sb);he<Fe.length;he+=1){for(var it=Fe[he],yt=0,Lt=0,sr=it;Lt<sr.length;Lt+=1){var gr=sr[Lt];yt+=gr.length}for(var hr=this.segments.prepareSegment(yt,this.layoutVertexArray,this.indexArray),Rr=hr.vertexLength,ni=[],Hi=[],wi=0,bn=it;wi<bn.length;wi+=1){var rn=bn[wi];if(rn.length!==0){rn!==it[0]&&Hi.push(ni.length/2);var xn=this.segments2.prepareSegment(rn.length,this.layoutVertexArray,this.indexArray2),In=xn.vertexLength;this.layoutVertexArray.emplaceBack(rn[0].x,rn[0].y),this.indexArray2.emplaceBack(In+rn.length-1,In),ni.push(rn[0].x),ni.push(rn[0].y);for(var Xn=1;Xn<rn.length;Xn++)this.layoutVertexArray.emplaceBack(rn[Xn].x,rn[Xn].y),this.indexArray2.emplaceBack(In+Xn-1,In+Xn),ni.push(rn[Xn].x),ni.push(rn[Xn].y);xn.vertexLength+=rn.length,xn.primitiveLength+=rn.length}}for(var ga=Gw(ni,Hi),ha=0;ha<ga.length;ha+=3)this.indexArray.emplaceBack(Rr+ga[ha],Rr+ga[ha+1],Rr+ga[ha+2]);hr.vertexLength+=yt,hr.primitiveLength+=ga.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,_,V,ae,$)},X("FillBucket",yp,{omit:["layers","patternFeatures"]});var _S=new Or({"fill-sort-key":new bt(Rn.layout_fill["fill-sort-key"])}),OC=new Or({"fill-antialias":new Me(Rn.paint_fill["fill-antialias"]),"fill-opacity":new bt(Rn.paint_fill["fill-opacity"]),"fill-color":new bt(Rn.paint_fill["fill-color"]),"fill-outline-color":new bt(Rn.paint_fill["fill-outline-color"]),"fill-translate":new Me(Rn.paint_fill["fill-translate"]),"fill-translate-anchor":new Me(Rn.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ot(Rn.paint_fill["fill-pattern"])}),$v={paint:OC,layout:_S},lb=function(y){function _(I){y.call(this,I,$v)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.recalculate=function(V,$){y.prototype.recalculate.call(this,V,$);var ae=this.paint._values["fill-outline-color"];ae.value.kind==="constant"&&ae.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},_.prototype.createBucket=function(V){return new yp(V)},_.prototype.queryRadius=function(){return Pv(this.paint.get("fill-translate"))},_.prototype.queryIntersectsFeature=function(V,$,ae,he,Fe,it,yt){var Lt=Jv(V,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),it.angle,yt);return ms(Lt,he)},_.prototype.isTileClipped=function(){return!0},_}(vi),BC=ji([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),NC=BC.members,xS=my;function my(y,_,I,V,$){this.properties={},this.extent=I,this.type=0,this._pbf=y,this._geometry=-1,this._keys=V,this._values=$,y.readFields(UC,this,_)}function UC(y,_,I){y==1?_.id=I.readVarint():y==2?VC(I,_):y==3?_.type=I.readVarint():y==4&&(_._geometry=I.pos)}function VC(y,_){for(var I=y.readVarint()+y.pos;y.pos<I;){var V=_._keys[y.readVarint()],$=_._values[y.readVarint()];_.properties[V]=$}}my.types=["Unknown","Point","LineString","Polygon"],my.prototype.loadGeometry=function(){var y=this._pbf;y.pos=this._geometry;for(var _=y.readVarint()+y.pos,I=1,V=0,$=0,ae=0,he=[],Fe;y.pos<_;){if(V<=0){var it=y.readVarint();I=it&7,V=it>>3}if(V--,I===1||I===2)$+=y.readSVarint(),ae+=y.readSVarint(),I===1&&(Fe&&he.push(Fe),Fe=[]),Fe.push(new u($,ae));else if(I===7)Fe&&Fe.push(Fe[0].clone());else throw new Error("unknown command "+I)}return Fe&&he.push(Fe),he},my.prototype.bbox=function(){var y=this._pbf;y.pos=this._geometry;for(var _=y.readVarint()+y.pos,I=1,V=0,$=0,ae=0,he=1/0,Fe=-1/0,it=1/0,yt=-1/0;y.pos<_;){if(V<=0){var Lt=y.readVarint();I=Lt&7,V=Lt>>3}if(V--,I===1||I===2)$+=y.readSVarint(),ae+=y.readSVarint(),$<he&&(he=$),$>Fe&&(Fe=$),ae<it&&(it=ae),ae>yt&&(yt=ae);else if(I!==7)throw new Error("unknown command "+I)}return[he,it,Fe,yt]},my.prototype.toGeoJSON=function(y,_,I){var V=this.extent*Math.pow(2,I),$=this.extent*y,ae=this.extent*_,he=this.loadGeometry(),Fe=my.types[this.type],it,yt;function Lt(hr){for(var Rr=0;Rr<hr.length;Rr++){var ni=hr[Rr],Hi=180-(ni.y+ae)*360/V;hr[Rr]=[(ni.x+$)*360/V-180,360/Math.PI*Math.atan(Math.exp(Hi*Math.PI/180))-90]}}switch(this.type){case 1:var sr=[];for(it=0;it<he.length;it++)sr[it]=he[it][0];he=sr,Lt(he);break;case 2:for(it=0;it<he.length;it++)Lt(he[it]);break;case 3:for(he=rq(he),it=0;it<he.length;it++)for(yt=0;yt<he[it].length;yt++)Lt(he[it][yt]);break}he.length===1?he=he[0]:Fe="Multi"+Fe;var gr={type:"Feature",geometry:{type:Fe,coordinates:he},properties:this.properties};return"id"in this&&(gr.id=this.id),gr};function rq(y){var _=y.length;if(_<=1)return[y];for(var I=[],V,$,ae=0;ae<_;ae++){var he=GC(y[ae]);he!==0&&($===void 0&&($=he<0),$===he<0?(V&&I.push(V),V=[y[ae]]):V.push(y[ae]))}return V&&I.push(V),I}function GC(y){for(var _=0,I=0,V=y.length,$=V-1,ae,he;I<V;$=I++)ae=y[I],he=y[$],_+=(he.x-ae.x)*(ae.y+he.y);return _}var gg=bS;function bS(y,_){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=y,this._keys=[],this._values=[],this._features=[],y.readFields(HC,this,_),this.length=this._features.length}function HC(y,_,I){y===15?_.version=I.readVarint():y===1?_.name=I.readString():y===5?_.extent=I.readVarint():y===2?_._features.push(I.pos):y===3?_._keys.push(I.readString()):y===4&&_._values.push(jC(I))}function jC(y){for(var _=null,I=y.readVarint()+y.pos;y.pos<I;){var V=y.readVarint()>>3;_=V===1?y.readString():V===2?y.readFloat():V===3?y.readDouble():V===4?y.readVarint64():V===5?y.readVarint():V===6?y.readSVarint():V===7?y.readBoolean():null}return _}bS.prototype.feature=function(y){if(y<0||y>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[y];var _=this._pbf.readVarint()+this._pbf.pos;return new xS(this._pbf,_,this.extent,this._keys,this._values)};var WC=iq;function iq(y,_){this.layers=y.readFields(nq,{},_)}function nq(y,_,I){if(y===3){var V=new gg(I,I.readVarint()+I.pos);V.length&&(_[V.name]=V)}}var XC=WC,F1=xS,ZC=gg,mg={VectorTile:XC,VectorTileFeature:F1,VectorTileLayer:ZC},YC=mg.VectorTileFeature.types,Yw=500,z1=Math.pow(2,13);function dm(y,_,I,V,$,ae,he,Fe){y.emplaceBack(_,I,Math.floor(V*z1)*2+he,$*z1*2,ae*z1*2,Math.round(Fe))}var Vp=function(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=_.index,this.hasPattern=!1,this.layoutVertexArray=new Ii,this.indexArray=new pn,this.programConfigurations=new ci(_.layers,_.zoom),this.segments=new io,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};Vp.prototype.populate=function(_,I,V){this.features=[],this.hasPattern=Zw("fill-extrusion",this.layers,I);for(var $=0,ae=_;$<ae.length;$+=1){var he=ae[$],Fe=he.feature,it=he.id,yt=he.index,Lt=he.sourceLayerIndex,sr=this.layers[0]._featureFilter.needGeometry,gr=Ja(Fe,sr);if(this.layers[0]._featureFilter.filter(new Un(this.zoom),gr,V)){var hr={id:it,sourceLayerIndex:Lt,index:yt,geometry:sr?gr.geometry:zn(Fe),properties:Fe.properties,type:Fe.type,patterns:{}};this.hasPattern?this.features.push(ob("fill-extrusion",this.layers,hr,this.zoom,I)):this.addFeature(hr,hr.geometry,yt,V,{}),I.featureIndex.insert(Fe,hr.geometry,yt,Lt,this.index,!0)}}},Vp.prototype.addFeatures=function(_,I,V){for(var $=0,ae=this.features;$<ae.length;$+=1){var he=ae[$],Fe=he.geometry;this.addFeature(he,Fe,he.index,I,V)}},Vp.prototype.update=function(_,I,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(_,I,this.stateDependentLayers,V)},Vp.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Vp.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Vp.prototype.upload=function(_){this.uploaded||(this.layoutVertexBuffer=_.createVertexBuffer(this.layoutVertexArray,NC),this.indexBuffer=_.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(_),this.uploaded=!0},Vp.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Vp.prototype.addFeature=function(_,I,V,$,ae){for(var he=0,Fe=Xw(I,Yw);he<Fe.length;he+=1){for(var it=Fe[he],yt=0,Lt=0,sr=it;Lt<sr.length;Lt+=1){var gr=sr[Lt];yt+=gr.length}for(var hr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),Rr=0,ni=it;Rr<ni.length;Rr+=1){var Hi=ni[Rr];if(Hi.length!==0&&!oq(Hi))for(var wi=0,bn=0;bn<Hi.length;bn++){var rn=Hi[bn];if(bn>=1){var xn=Hi[bn-1];if(!aq(rn,xn)){hr.vertexLength+4>io.MAX_VERTEX_ARRAY_LENGTH&&(hr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var In=rn.sub(xn)._perp()._unit(),Xn=xn.dist(rn);wi+Xn>32768&&(wi=0),dm(this.layoutVertexArray,rn.x,rn.y,In.x,In.y,0,0,wi),dm(this.layoutVertexArray,rn.x,rn.y,In.x,In.y,0,1,wi),wi+=Xn,dm(this.layoutVertexArray,xn.x,xn.y,In.x,In.y,0,0,wi),dm(this.layoutVertexArray,xn.x,xn.y,In.x,In.y,0,1,wi);var ga=hr.vertexLength;this.indexArray.emplaceBack(ga,ga+2,ga+1),this.indexArray.emplaceBack(ga+1,ga+2,ga+3),hr.vertexLength+=4,hr.primitiveLength+=2}}}}if(hr.vertexLength+yt>io.MAX_VERTEX_ARRAY_LENGTH&&(hr=this.segments.prepareSegment(yt,this.layoutVertexArray,this.indexArray)),YC[_.type]==="Polygon"){for(var ha=[],eo=[],za=hr.vertexLength,Za=0,Jo=it;Za<Jo.length;Za+=1){var to=Jo[Za];if(to.length!==0){to!==it[0]&&eo.push(ha.length/2);for(var ao=0;ao<to.length;ao++){var _s=to[ao];dm(this.layoutVertexArray,_s.x,_s.y,0,0,1,1,0),ha.push(_s.x),ha.push(_s.y)}}}for(var jo=Gw(ha,eo),El=0;El<jo.length;El+=3)this.indexArray.emplaceBack(za+jo[El],za+jo[El+2],za+jo[El+1]);hr.primitiveLength+=jo.length/3,hr.vertexLength+=yt}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,_,V,ae,$)},X("FillExtrusionBucket",Vp,{omit:["layers","features"]});function aq(y,_){return y.x===_.x&&(y.x<0||y.x>Ei)||y.y===_.y&&(y.y<0||y.y>Ei)}function oq(y){return y.every(function(_){return _.x<0})||y.every(function(_){return _.x>Ei})||y.every(function(_){return _.y<0})||y.every(function(_){return _.y>Ei})}var q1=new Or({"fill-extrusion-opacity":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ot(Rn["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),ld={paint:q1},vm=function(y){function _(I){y.call(this,I,ld)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.createBucket=function(V){return new Vp(V)},_.prototype.queryRadius=function(){return Pv(this.paint.get("fill-extrusion-translate"))},_.prototype.is3D=function(){return!0},_.prototype.queryIntersectsFeature=function(V,$,ae,he,Fe,it,yt,Lt){var sr=Jv(V,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),it.angle,yt),gr=this.paint.get("fill-extrusion-height").evaluate($,ae),hr=this.paint.get("fill-extrusion-base").evaluate($,ae),Rr=sq(sr,Lt,it,0),ni=TS(he,hr,gr,Lt),Hi=ni[0],wi=ni[1];return KC(Hi,wi,Rr)},_}(vi);function yy(y,_){return y.x*_.x+y.y*_.y}function wS(y,_){if(y.length===1){for(var I=0,V=_[I++],$;!$||V.equals($);)if($=_[I++],!$)return 1/0;for(;I<_.length;I++){var ae=_[I],he=y[0],Fe=$.sub(V),it=ae.sub(V),yt=he.sub(V),Lt=yy(Fe,Fe),sr=yy(Fe,it),gr=yy(it,it),hr=yy(yt,Fe),Rr=yy(yt,it),ni=Lt*gr-sr*sr,Hi=(gr*hr-sr*Rr)/ni,wi=(Lt*Rr-sr*hr)/ni,bn=1-Hi-wi,rn=V.z*bn+$.z*Hi+ae.z*wi;if(isFinite(rn))return rn}return 1/0}else{for(var xn=1/0,In=0,Xn=_;In<Xn.length;In+=1){var ga=Xn[In];xn=Math.min(xn,ga.z)}return xn}}function KC(y,_,I){var V=1/0;ms(I,_)&&(V=wS(I,_[0]));for(var $=0;$<_.length;$++)for(var ae=_[$],he=y[$],Fe=0;Fe<ae.length-1;Fe++){var it=ae[Fe],yt=ae[Fe+1],Lt=he[Fe],sr=he[Fe+1],gr=[it,yt,sr,Lt,it];so(I,gr)&&(V=Math.min(V,wS(I,gr)))}return V===1/0?!1:V}function TS(y,_,I,V){for(var $=[],ae=[],he=V[8]*_,Fe=V[9]*_,it=V[10]*_,yt=V[11]*_,Lt=V[8]*I,sr=V[9]*I,gr=V[10]*I,hr=V[11]*I,Rr=0,ni=y;Rr<ni.length;Rr+=1){for(var Hi=ni[Rr],wi=[],bn=[],rn=0,xn=Hi;rn<xn.length;rn+=1){var In=xn[rn],Xn=In.x,ga=In.y,ha=V[0]*Xn+V[4]*ga+V[12],eo=V[1]*Xn+V[5]*ga+V[13],za=V[2]*Xn+V[6]*ga+V[14],Za=V[3]*Xn+V[7]*ga+V[15],Jo=ha+he,to=eo+Fe,ao=za+it,_s=Za+yt,jo=ha+Lt,El=eo+sr,Iu=za+gr,kl=Za+hr,Cl=new u(Jo/_s,to/_s);Cl.z=ao/_s,wi.push(Cl);var yl=new u(jo/kl,El/kl);yl.z=Iu/kl,bn.push(yl)}$.push(wi),ae.push(bn)}return[$,ae]}function sq(y,_,I,V){for(var $=[],ae=0,he=y;ae<he.length;ae+=1){var Fe=he[ae],it=[Fe.x,Fe.y,V,1];py(it,it,_),$.push(new u(it[0]/it[3],it[1]/it[3]))}return $}var JC=ji([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),$C=JC.members,lq=ji([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),QC=lq.members,AS=mg.VectorTileFeature.types,Kw=63,e6=Math.cos(75/2*(Math.PI/180)),ub=15,SS=20,t6=15,Jw=1/2,cb=Math.pow(2,t6-1)/Jw,sh=function(_){var I=this;this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map(function(V){return V.id}),this.index=_.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(V){I.gradients[V.id]={}}),this.layoutVertexArray=new ui,this.layoutVertexArray2=new nn,this.indexArray=new pn,this.programConfigurations=new ci(_.layers,_.zoom),this.segments=new io,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(V){return V.isStateDependent()}).map(function(V){return V.id})};sh.prototype.populate=function(_,I,V){this.hasPattern=Zw("line",this.layers,I);for(var $=this.layers[0].layout.get("line-sort-key"),ae=[],he=0,Fe=_;he<Fe.length;he+=1){var it=Fe[he],yt=it.feature,Lt=it.id,sr=it.index,gr=it.sourceLayerIndex,hr=this.layers[0]._featureFilter.needGeometry,Rr=Ja(yt,hr);if(this.layers[0]._featureFilter.filter(new Un(this.zoom),Rr,V)){var ni=$?$.evaluate(Rr,{},V):void 0,Hi={id:Lt,properties:yt.properties,type:yt.type,sourceLayerIndex:gr,index:sr,geometry:hr?Rr.geometry:zn(yt),patterns:{},sortKey:ni};ae.push(Hi)}}$&&ae.sort(function(za,Za){return za.sortKey-Za.sortKey});for(var wi=0,bn=ae;wi<bn.length;wi+=1){var rn=bn[wi],xn=rn,In=xn.geometry,Xn=xn.index,ga=xn.sourceLayerIndex;if(this.hasPattern){var ha=ob("line",this.layers,rn,this.zoom,I);this.patternFeatures.push(ha)}else this.addFeature(rn,In,Xn,V,{});var eo=_[Xn].feature;I.featureIndex.insert(eo,In,Xn,ga,this.index)}},sh.prototype.update=function(_,I,V){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(_,I,this.stateDependentLayers,V)},sh.prototype.addFeatures=function(_,I,V){for(var $=0,ae=this.patternFeatures;$<ae.length;$+=1){var he=ae[$];this.addFeature(he,he.geometry,he.index,I,V)}},sh.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},sh.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},sh.prototype.upload=function(_){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=_.createVertexBuffer(this.layoutVertexArray2,QC)),this.layoutVertexBuffer=_.createVertexBuffer(this.layoutVertexArray,$C),this.indexBuffer=_.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(_),this.uploaded=!0},sh.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},sh.prototype.lineFeatureClips=function(_){if(_.properties&&_.properties.hasOwnProperty("mapbox_clip_start")&&_.properties.hasOwnProperty("mapbox_clip_end")){var I=+_.properties.mapbox_clip_start,V=+_.properties.mapbox_clip_end;return{start:I,end:V}}},sh.prototype.addFeature=function(_,I,V,$,ae){var he=this.layers[0].layout,Fe=he.get("line-join").evaluate(_,{}),it=he.get("line-cap"),yt=he.get("line-miter-limit"),Lt=he.get("line-round-limit");this.lineClips=this.lineFeatureClips(_);for(var sr=0,gr=I;sr<gr.length;sr+=1){var hr=gr[sr];this.addLine(hr,_,Fe,it,yt,Lt)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,_,V,ae,$)},sh.prototype.addLine=function(_,I,V,$,ae,he){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var Fe=0;Fe<_.length-1;Fe++)this.totalDistance+=_[Fe].dist(_[Fe+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var it=AS[I.type]==="Polygon",yt=_.length;yt>=2&&_[yt-1].equals(_[yt-2]);)yt--;for(var Lt=0;Lt<yt-1&&_[Lt].equals(_[Lt+1]);)Lt++;if(!(yt<(it?3:2))){V==="bevel"&&(ae=1.05);var sr=this.overscaling<=16?ub*Ei/(512*this.overscaling):0,gr=this.segments.prepareSegment(yt*10,this.layoutVertexArray,this.indexArray),hr,Rr=void 0,ni=void 0,Hi=void 0,wi=void 0;this.e1=this.e2=-1,it&&(hr=_[yt-2],wi=_[Lt].sub(hr)._unit()._perp());for(var bn=Lt;bn<yt;bn++)if(ni=bn===yt-1?it?_[Lt+1]:void 0:_[bn+1],!(ni&&_[bn].equals(ni))){wi&&(Hi=wi),hr&&(Rr=hr),hr=_[bn],wi=ni?ni.sub(hr)._unit()._perp():Hi,Hi=Hi||wi;var rn=Hi.add(wi);(rn.x!==0||rn.y!==0)&&rn._unit();var xn=Hi.x*wi.x+Hi.y*wi.y,In=rn.x*wi.x+rn.y*wi.y,Xn=In!==0?1/In:1/0,ga=2*Math.sqrt(2-2*In),ha=In<e6&&Rr&&ni,eo=Hi.x*wi.y-Hi.y*wi.x>0;if(ha&&bn>Lt){var za=hr.dist(Rr);if(za>2*sr){var Za=hr.sub(hr.sub(Rr)._mult(sr/za)._round());this.updateDistance(Rr,Za),this.addCurrentVertex(Za,Hi,0,0,gr),Rr=Za}}var Jo=Rr&&ni,to=Jo?V:it?"butt":$;if(Jo&&to==="round"&&(Xn<he?to="miter":Xn<=2&&(to="fakeround")),to==="miter"&&Xn>ae&&(to="bevel"),to==="bevel"&&(Xn>2&&(to="flipbevel"),Xn<ae&&(to="miter")),Rr&&this.updateDistance(Rr,hr),to==="miter")rn._mult(Xn),this.addCurrentVertex(hr,rn,0,0,gr);else if(to==="flipbevel"){if(Xn>100)rn=wi.mult(-1);else{var ao=Xn*Hi.add(wi).mag()/Hi.sub(wi).mag();rn._perp()._mult(ao*(eo?-1:1))}this.addCurrentVertex(hr,rn,0,0,gr),this.addCurrentVertex(hr,rn.mult(-1),0,0,gr)}else if(to==="bevel"||to==="fakeround"){var _s=-Math.sqrt(Xn*Xn-1),jo=eo?_s:0,El=eo?0:_s;if(Rr&&this.addCurrentVertex(hr,Hi,jo,El,gr),to==="fakeround")for(var Iu=Math.round(ga*180/Math.PI/SS),kl=1;kl<Iu;kl++){var Cl=kl/Iu;if(Cl!==.5){var yl=Cl-.5,Qu=1.0904+xn*(-3.2452+xn*(3.55645-xn*1.43519)),gc=.848013+xn*(-1.06021+xn*.215638);Cl=Cl+Cl*yl*(Cl-1)*(Qu*yl*yl+gc)}var Sf=wi.sub(Hi)._mult(Cl)._add(Hi)._unit()._mult(eo?-1:1);this.addHalfVertex(hr,Sf.x,Sf.y,!1,eo,0,gr)}ni&&this.addCurrentVertex(hr,wi,-jo,-El,gr)}else if(to==="butt")this.addCurrentVertex(hr,rn,0,0,gr);else if(to==="square"){var Ff=Rr?1:-1;this.addCurrentVertex(hr,rn,Ff,Ff,gr)}else to==="round"&&(Rr&&(this.addCurrentVertex(hr,Hi,0,0,gr),this.addCurrentVertex(hr,Hi,1,1,gr,!0)),ni&&(this.addCurrentVertex(hr,wi,-1,-1,gr,!0),this.addCurrentVertex(hr,wi,0,0,gr)));if(ha&&bn<yt-1){var $h=hr.dist(ni);if($h>2*sr){var ch=hr.add(ni.sub(hr)._mult(sr/$h)._round());this.updateDistance(hr,ch),this.addCurrentVertex(ch,wi,0,0,gr),hr=ch}}}}},sh.prototype.addCurrentVertex=function(_,I,V,$,ae,he){he===void 0&&(he=!1);var Fe=I.x+I.y*V,it=I.y-I.x*V,yt=-I.x+I.y*$,Lt=-I.y-I.x*$;this.addHalfVertex(_,Fe,it,he,!1,V,ae),this.addHalfVertex(_,yt,Lt,he,!0,-$,ae),this.distance>cb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(_,I,V,$,ae,he))},sh.prototype.addHalfVertex=function(_,I,V,$,ae,he,Fe){var it=_.x,yt=_.y,Lt=this.lineClips?this.scaledDistance*(cb-1):this.scaledDistance,sr=Lt*Jw;if(this.layoutVertexArray.emplaceBack((it<<1)+($?1:0),(yt<<1)+(ae?1:0),Math.round(Kw*I)+128,Math.round(Kw*V)+128,(he===0?0:he<0?-1:1)+1|(sr&63)<<2,sr>>6),this.lineClips){var gr=this.scaledDistance-this.lineClips.start,hr=this.lineClips.end-this.lineClips.start,Rr=gr/hr;this.layoutVertexArray2.emplaceBack(Rr,this.lineClipsArray.length)}var ni=Fe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ni),Fe.primitiveLength++),ae?this.e2=ni:this.e1=ni},sh.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},sh.prototype.updateDistance=function(_,I){this.distance+=_.dist(I),this.updateScaledDistance()},X("LineBucket",sh,{omit:["layers","patternFeatures"]});var MS=new Or({"line-cap":new Me(Rn.layout_line["line-cap"]),"line-join":new bt(Rn.layout_line["line-join"]),"line-miter-limit":new Me(Rn.layout_line["line-miter-limit"]),"line-round-limit":new Me(Rn.layout_line["line-round-limit"]),"line-sort-key":new bt(Rn.layout_line["line-sort-key"])}),ES=new Or({"line-opacity":new bt(Rn.paint_line["line-opacity"]),"line-color":new bt(Rn.paint_line["line-color"]),"line-translate":new Me(Rn.paint_line["line-translate"]),"line-translate-anchor":new Me(Rn.paint_line["line-translate-anchor"]),"line-width":new bt(Rn.paint_line["line-width"]),"line-gap-width":new bt(Rn.paint_line["line-gap-width"]),"line-offset":new bt(Rn.paint_line["line-offset"]),"line-blur":new bt(Rn.paint_line["line-blur"]),"line-dasharray":new Lr(Rn.paint_line["line-dasharray"]),"line-pattern":new Ot(Rn.paint_line["line-pattern"]),"line-gradient":new Vr(Rn.paint_line["line-gradient"])}),$w={paint:ES,layout:MS},uq=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.possiblyEvaluate=function(V,$){return $=new Un(Math.floor($.zoom),{now:$.now,fadeDuration:$.fadeDuration,zoomHistory:$.zoomHistory,transition:$.transition}),y.prototype.possiblyEvaluate.call(this,V,$)},_.prototype.evaluate=function(V,$,ae,he){return $=x({},$,{zoom:Math.floor($.zoom)}),y.prototype.evaluate.call(this,V,$,ae,he)},_}(bt),R=new uq($w.paint.properties["line-width"].specification);R.useIntegerZoom=!0;var A=function(y){function _(I){y.call(this,I,$w),this.gradientVersion=0}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._handleSpecialPaintPropertyUpdate=function(V){if(V==="line-gradient"){var $=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=$._styleExpression.expression instanceof _u,this.gradientVersion=(this.gradientVersion+1)%d}},_.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},_.prototype.recalculate=function(V,$){y.prototype.recalculate.call(this,V,$),this.paint._values["line-floorwidth"]=R.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,V)},_.prototype.createBucket=function(V){return new sh(V)},_.prototype.queryRadius=function(V){var $=V,ae=F(Ad("line-width",this,$),Ad("line-gap-width",this,$)),he=Ad("line-offset",this,$);return ae/2+Math.abs(he)+Pv(this.paint.get("line-translate"))},_.prototype.queryIntersectsFeature=function(V,$,ae,he,Fe,it,yt){var Lt=Jv(V,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),it.angle,yt),sr=yt/2*F(this.paint.get("line-width").evaluate($,ae),this.paint.get("line-gap-width").evaluate($,ae)),gr=this.paint.get("line-offset").evaluate($,ae);return gr&&(he=W(he,gr*yt)),ou(Lt,he,sr)},_.prototype.isTileClipped=function(){return!0},_}(vi);function F(y,_){return _>0?_+2*y:y}function W(y,_){for(var I=[],V=new u(0,0),$=0;$<y.length;$++){for(var ae=y[$],he=[],Fe=0;Fe<ae.length;Fe++){var it=ae[Fe-1],yt=ae[Fe],Lt=ae[Fe+1],sr=Fe===0?V:yt.sub(it)._unit()._perp(),gr=Fe===ae.length-1?V:Lt.sub(yt)._unit()._perp(),hr=sr._add(gr)._unit(),Rr=hr.x*gr.x+hr.y*gr.y;hr._mult(1/Rr),he.push(hr._mult(_)._add(yt))}I.push(he)}return I}var te=ji([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),fe=ji([{name:"a_projected_pos",components:3,type:"Float32"}],4),pe=ji([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Re=ji([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),Ke=ji([{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"}]),ft=ji([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Rt=ji([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4),tr=ji([{name:"triangle",components:3,type:"Uint16"}]),ur=ji([{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"}]),vr=ji([{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"}]),kr=ji([{type:"Float32",name:"offsetX"}]),Dr=ji([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function li(y,_,I){var V=_.layout.get("text-transform").evaluate(I,{});return V==="uppercase"?y=y.toLocaleUpperCase():V==="lowercase"&&(y=y.toLocaleLowerCase()),Ms.applyArabicShaping&&(y=Ms.applyArabicShaping(y)),y}function pi(y,_,I){return y.sections.forEach(function(V){V.text=li(V.text,_,I)}),y}function vn(y){var _={},I={},V=[],$=0;function ae(wi){V.push(y[wi]),$++}function he(wi,bn,rn){var xn=I[wi];return delete I[wi],I[bn]=xn,V[xn].geometry[0].pop(),V[xn].geometry[0]=V[xn].geometry[0].concat(rn[0]),xn}function Fe(wi,bn,rn){var xn=_[bn];return delete _[bn],_[wi]=xn,V[xn].geometry[0].shift(),V[xn].geometry[0]=rn[0].concat(V[xn].geometry[0]),xn}function it(wi,bn,rn){var xn=rn?bn[0][bn[0].length-1]:bn[0][0];return wi+":"+xn.x+":"+xn.y}for(var yt=0;yt<y.length;yt++){var Lt=y[yt],sr=Lt.geometry,gr=Lt.text?Lt.text.toString():null;if(!gr){ae(yt);continue}var hr=it(gr,sr),Rr=it(gr,sr,!0);if(hr in I&&Rr in _&&I[hr]!==_[Rr]){var ni=Fe(hr,Rr,sr),Hi=he(hr,Rr,V[ni].geometry);delete _[hr],delete I[Rr],I[it(gr,V[Hi].geometry,!0)]=Hi,V[ni].geometry=null}else hr in I?he(hr,Rr,sr):Rr in _?Fe(hr,Rr,sr):(ae(yt),_[hr]=$-1,I[Rr]=$-1)}return V.filter(function(wi){return wi.geometry})}var zi={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};function ln(y){for(var _="",I=0;I<y.length;I++){var V=y.charCodeAt(I+1)||null,$=y.charCodeAt(I-1)||null,ae=(!V||!xi(V)||zi[y[I+1]])&&(!$||!xi($)||zi[y[I-1]]);ae&&zi[y[I]]?_+=zi[y[I]]:_+=y[I]}return _}var Tn=24,pa=function(y,_,I,V,$){var ae,he,Fe=$*8-V-1,it=(1<<Fe)-1,yt=it>>1,Lt=-7,sr=I?$-1:0,gr=I?-1:1,hr=y[_+sr];for(sr+=gr,ae=hr&(1<<-Lt)-1,hr>>=-Lt,Lt+=Fe;Lt>0;ae=ae*256+y[_+sr],sr+=gr,Lt-=8);for(he=ae&(1<<-Lt)-1,ae>>=-Lt,Lt+=V;Lt>0;he=he*256+y[_+sr],sr+=gr,Lt-=8);if(ae===0)ae=1-yt;else{if(ae===it)return he?NaN:(hr?-1:1)*(1/0);he=he+Math.pow(2,V),ae=ae-yt}return(hr?-1:1)*he*Math.pow(2,ae-V)},ro=function(y,_,I,V,$,ae){var he,Fe,it,yt=ae*8-$-1,Lt=(1<<yt)-1,sr=Lt>>1,gr=$===23?Math.pow(2,-24)-Math.pow(2,-77):0,hr=V?0:ae-1,Rr=V?1:-1,ni=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(Fe=isNaN(_)?1:0,he=Lt):(he=Math.floor(Math.log(_)/Math.LN2),_*(it=Math.pow(2,-he))<1&&(he--,it*=2),he+sr>=1?_+=gr/it:_+=gr*Math.pow(2,1-sr),_*it>=2&&(he++,it/=2),he+sr>=Lt?(Fe=0,he=Lt):he+sr>=1?(Fe=(_*it-1)*Math.pow(2,$),he=he+sr):(Fe=_*Math.pow(2,sr-1)*Math.pow(2,$),he=0));$>=8;y[I+hr]=Fe&255,hr+=Rr,Fe/=256,$-=8);for(he=he<<$|Fe,yt+=$;yt>0;y[I+hr]=he&255,hr+=Rr,he/=256,yt-=8);y[I+hr-Rr]|=ni*128},Vo={read:pa,write:ro},Xa=la;function la(y){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(y)?y:new Uint8Array(y||0),this.pos=0,this.type=0,this.length=this.buf.length}la.Varint=0,la.Fixed64=1,la.Bytes=2,la.Fixed32=5;var Mo=65536*65536,fo=1/Mo,lo=12,Wn=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");la.prototype={destroy:function(){this.buf=null},readFields:function(y,_,I){for(I=I||this.length;this.pos<I;){var V=this.readVarint(),$=V>>3,ae=this.pos;this.type=V&7,y($,_,this),this.pos===ae&&this.skip(V)}return _},readMessage:function(y,_){return this.readFields(y,_,this.readVarint()+this.pos)},readFixed32:function(){var y=Yh(this.buf,this.pos);return this.pos+=4,y},readSFixed32:function(){var y=Fv(this.buf,this.pos);return this.pos+=4,y},readFixed64:function(){var y=Yh(this.buf,this.pos)+Yh(this.buf,this.pos+4)*Mo;return this.pos+=8,y},readSFixed64:function(){var y=Yh(this.buf,this.pos)+Fv(this.buf,this.pos+4)*Mo;return this.pos+=8,y},readFloat:function(){var y=Vo.read(this.buf,this.pos,!0,23,4);return this.pos+=4,y},readDouble:function(){var y=Vo.read(this.buf,this.pos,!0,52,8);return this.pos+=8,y},readVarint:function(y){var _=this.buf,I,V;return V=_[this.pos++],I=V&127,V<128||(V=_[this.pos++],I|=(V&127)<<7,V<128)||(V=_[this.pos++],I|=(V&127)<<14,V<128)||(V=_[this.pos++],I|=(V&127)<<21,V<128)?I:(V=_[this.pos],I|=(V&15)<<28,Ro(I,y,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var y=this.readVarint();return y%2===1?(y+1)/-2:y/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var y=this.readVarint()+this.pos,_=this.pos;return this.pos=y,y-_>=lo&&Wn?ru(this.buf,_,y):lv(this.buf,_,y)},readBytes:function(){var y=this.readVarint()+this.pos,_=this.buf.subarray(this.pos,y);return this.pos=y,_},readPackedVarint:function(y,_){if(this.type!==la.Bytes)return y.push(this.readVarint(_));var I=uo(this);for(y=y||[];this.pos<I;)y.push(this.readVarint(_));return y},readPackedSVarint:function(y){if(this.type!==la.Bytes)return y.push(this.readSVarint());var _=uo(this);for(y=y||[];this.pos<_;)y.push(this.readSVarint());return y},readPackedBoolean:function(y){if(this.type!==la.Bytes)return y.push(this.readBoolean());var _=uo(this);for(y=y||[];this.pos<_;)y.push(this.readBoolean());return y},readPackedFloat:function(y){if(this.type!==la.Bytes)return y.push(this.readFloat());var _=uo(this);for(y=y||[];this.pos<_;)y.push(this.readFloat());return y},readPackedDouble:function(y){if(this.type!==la.Bytes)return y.push(this.readDouble());var _=uo(this);for(y=y||[];this.pos<_;)y.push(this.readDouble());return y},readPackedFixed32:function(y){if(this.type!==la.Bytes)return y.push(this.readFixed32());var _=uo(this);for(y=y||[];this.pos<_;)y.push(this.readFixed32());return y},readPackedSFixed32:function(y){if(this.type!==la.Bytes)return y.push(this.readSFixed32());var _=uo(this);for(y=y||[];this.pos<_;)y.push(this.readSFixed32());return y},readPackedFixed64:function(y){if(this.type!==la.Bytes)return y.push(this.readFixed64());var _=uo(this);for(y=y||[];this.pos<_;)y.push(this.readFixed64());return y},readPackedSFixed64:function(y){if(this.type!==la.Bytes)return y.push(this.readSFixed64());var _=uo(this);for(y=y||[];this.pos<_;)y.push(this.readSFixed64());return y},skip:function(y){var _=y&7;if(_===la.Varint)for(;this.buf[this.pos++]>127;);else if(_===la.Bytes)this.pos=this.readVarint()+this.pos;else if(_===la.Fixed32)this.pos+=4;else if(_===la.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+_)},writeTag:function(y,_){this.writeVarint(y<<3|_)},realloc:function(y){for(var _=this.length||16;_<this.pos+y;)_*=2;if(_!==this.length){var I=new Uint8Array(_);I.set(this.buf),this.buf=I,this.length=_}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(y){this.realloc(4),Df(this.buf,y,this.pos),this.pos+=4},writeSFixed32:function(y){this.realloc(4),Df(this.buf,y,this.pos),this.pos+=4},writeFixed64:function(y){this.realloc(8),Df(this.buf,y&-1,this.pos),Df(this.buf,Math.floor(y*fo),this.pos+4),this.pos+=8},writeSFixed64:function(y){this.realloc(8),Df(this.buf,y&-1,this.pos),Df(this.buf,Math.floor(y*fo),this.pos+4),this.pos+=8},writeVarint:function(y){if(y=+y||0,y>268435455||y<0){Ju(y,this);return}this.realloc(4),this.buf[this.pos++]=y&127|(y>127?128:0),!(y<=127)&&(this.buf[this.pos++]=(y>>>=7)&127|(y>127?128:0),!(y<=127)&&(this.buf[this.pos++]=(y>>>=7)&127|(y>127?128:0),!(y<=127)&&(this.buf[this.pos++]=y>>>7&127)))},writeSVarint:function(y){this.writeVarint(y<0?-y*2-1:y*2)},writeBoolean:function(y){this.writeVarint(!!y)},writeString:function(y){y=String(y),this.realloc(y.length*4),this.pos++;var _=this.pos;this.pos=pc(this.buf,y,this.pos);var I=this.pos-_;I>=128&&Qv(_,I,this),this.pos=_-1,this.writeVarint(I),this.pos+=I},writeFloat:function(y){this.realloc(4),Vo.write(this.buf,y,this.pos,!0,23,4),this.pos+=4},writeDouble:function(y){this.realloc(8),Vo.write(this.buf,y,this.pos,!0,52,8),this.pos+=8},writeBytes:function(y){var _=y.length;this.writeVarint(_),this.realloc(_);for(var I=0;I<_;I++)this.buf[this.pos++]=y[I]},writeRawMessage:function(y,_){this.pos++;var I=this.pos;y(_,this);var V=this.pos-I;V>=128&&Qv(I,V,this),this.pos=I-1,this.writeVarint(V),this.pos+=V},writeMessage:function(y,_,I){this.writeTag(y,la.Bytes),this.writeRawMessage(_,I)},writePackedVarint:function(y,_){_.length&&this.writeMessage(y,ud,_)},writePackedSVarint:function(y,_){_.length&&this.writeMessage(y,Ch,_)},writePackedBoolean:function(y,_){_.length&&this.writeMessage(y,Hd,_)},writePackedFloat:function(y,_){_.length&&this.writeMessage(y,Vd,_)},writePackedDouble:function(y,_){_.length&&this.writeMessage(y,Gd,_)},writePackedFixed32:function(y,_){_.length&&this.writeMessage(y,Af,_)},writePackedSFixed32:function(y,_){_.length&&this.writeMessage(y,Lh,_)},writePackedFixed64:function(y,_){_.length&&this.writeMessage(y,Ed,_)},writePackedSFixed64:function(y,_){_.length&&this.writeMessage(y,cd,_)},writeBytesField:function(y,_){this.writeTag(y,la.Bytes),this.writeBytes(_)},writeFixed32Field:function(y,_){this.writeTag(y,la.Fixed32),this.writeFixed32(_)},writeSFixed32Field:function(y,_){this.writeTag(y,la.Fixed32),this.writeSFixed32(_)},writeFixed64Field:function(y,_){this.writeTag(y,la.Fixed64),this.writeFixed64(_)},writeSFixed64Field:function(y,_){this.writeTag(y,la.Fixed64),this.writeSFixed64(_)},writeVarintField:function(y,_){this.writeTag(y,la.Varint),this.writeVarint(_)},writeSVarintField:function(y,_){this.writeTag(y,la.Varint),this.writeSVarint(_)},writeStringField:function(y,_){this.writeTag(y,la.Bytes),this.writeString(_)},writeFloatField:function(y,_){this.writeTag(y,la.Fixed32),this.writeFloat(_)},writeDoubleField:function(y,_){this.writeTag(y,la.Fixed64),this.writeDouble(_)},writeBooleanField:function(y,_){this.writeVarintField(y,!!_)}};function Ro(y,_,I){var V=I.buf,$,ae;if(ae=V[I.pos++],$=(ae&112)>>4,ae<128||(ae=V[I.pos++],$|=(ae&127)<<3,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<10,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<17,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<24,ae<128)||(ae=V[I.pos++],$|=(ae&1)<<31,ae<128))return $o(y,$,_);throw new Error("Expected varint not more than 10 bytes")}function uo(y){return y.type===la.Bytes?y.readVarint()+y.pos:y.pos+1}function $o(y,_,I){return I?_*4294967296+(y>>>0):(_>>>0)*4294967296+(y>>>0)}function Ju(y,_){var I,V;if(y>=0?(I=y%4294967296|0,V=y/4294967296|0):(I=~(-y%4294967296),V=~(-y/4294967296),I^4294967295?I=I+1|0:(I=0,V=V+1|0)),y>=18446744073709552e3||y<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");_.realloc(10),Ou(I,V,_),kh(V,_)}function Ou(y,_,I){I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos]=y&127}function kh(y,_){var I=(y&7)<<4;_.buf[_.pos++]|=I|((y>>>=3)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127)))))}function Qv(y,_,I){var V=_<=16383?1:_<=2097151?2:_<=268435455?3:Math.floor(Math.log(_)/(Math.LN2*7));I.realloc(V);for(var $=I.pos-1;$>=y;$--)I.buf[$+V]=I.buf[$]}function ud(y,_){for(var I=0;I<y.length;I++)_.writeVarint(y[I])}function Ch(y,_){for(var I=0;I<y.length;I++)_.writeSVarint(y[I])}function Vd(y,_){for(var I=0;I<y.length;I++)_.writeFloat(y[I])}function Gd(y,_){for(var I=0;I<y.length;I++)_.writeDouble(y[I])}function Hd(y,_){for(var I=0;I<y.length;I++)_.writeBoolean(y[I])}function Af(y,_){for(var I=0;I<y.length;I++)_.writeFixed32(y[I])}function Lh(y,_){for(var I=0;I<y.length;I++)_.writeSFixed32(y[I])}function Ed(y,_){for(var I=0;I<y.length;I++)_.writeFixed64(y[I])}function cd(y,_){for(var I=0;I<y.length;I++)_.writeSFixed64(y[I])}function Yh(y,_){return(y[_]|y[_+1]<<8|y[_+2]<<16)+y[_+3]*16777216}function Df(y,_,I){y[I]=_,y[I+1]=_>>>8,y[I+2]=_>>>16,y[I+3]=_>>>24}function Fv(y,_){return(y[_]|y[_+1]<<8|y[_+2]<<16)+(y[_+3]<<24)}function lv(y,_,I){for(var V="",$=_;$<I;){var ae=y[$],he=null,Fe=ae>239?4:ae>223?3:ae>191?2:1;if($+Fe>I)break;var it,yt,Lt;Fe===1?ae<128&&(he=ae):Fe===2?(it=y[$+1],(it&192)===128&&(he=(ae&31)<<6|it&63,he<=127&&(he=null))):Fe===3?(it=y[$+1],yt=y[$+2],(it&192)===128&&(yt&192)===128&&(he=(ae&15)<<12|(it&63)<<6|yt&63,(he<=2047||he>=55296&&he<=57343)&&(he=null))):Fe===4&&(it=y[$+1],yt=y[$+2],Lt=y[$+3],(it&192)===128&&(yt&192)===128&&(Lt&192)===128&&(he=(ae&15)<<18|(it&63)<<12|(yt&63)<<6|Lt&63,(he<=65535||he>=1114112)&&(he=null))),he===null?(he=65533,Fe=1):he>65535&&(he-=65536,V+=String.fromCharCode(he>>>10&1023|55296),he=56320|he&1023),V+=String.fromCharCode(he),$+=Fe}return V}function ru(y,_,I){return Wn.decode(y.subarray(_,I))}function pc(y,_,I){for(var V=0,$,ae;V<_.length;V++){if($=_.charCodeAt(V),$>55295&&$<57344)if(ae)if($<56320){y[I++]=239,y[I++]=191,y[I++]=189,ae=$;continue}else $=ae-55296<<10|$-56320|65536,ae=null;else{$>56319||V+1===_.length?(y[I++]=239,y[I++]=191,y[I++]=189):ae=$;continue}else ae&&(y[I++]=239,y[I++]=191,y[I++]=189,ae=null);$<128?y[I++]=$:($<2048?y[I++]=$>>6|192:($<65536?y[I++]=$>>12|224:(y[I++]=$>>18|240,y[I++]=$>>12&63|128),y[I++]=$>>6&63|128),y[I++]=$&63|128)}return I}var $u=3;function zv(y,_,I){y===1&&I.readMessage(ff,_)}function ff(y,_,I){if(y===3){var V=I.readMessage(O1,{}),$=V.id,ae=V.bitmap,he=V.width,Fe=V.height,it=V.left,yt=V.top,Lt=V.advance;_.push({id:$,bitmap:new Dv({width:he+2*$u,height:Fe+2*$u},ae),metrics:{width:he,height:Fe,left:it,top:yt,advance:Lt}})}}function O1(y,_,I){y===1?_.id=I.readVarint():y===2?_.bitmap=I.readBytes():y===3?_.width=I.readVarint():y===4?_.height=I.readVarint():y===5?_.left=I.readSVarint():y===6?_.top=I.readSVarint():y===7&&(_.advance=I.readVarint())}function p0(y){return new Xa(y).readFields(zv,[])}var Gp=$u;function ep(y){for(var _=0,I=0,V=0,$=y;V<$.length;V+=1){var ae=$[V];_+=ae.w*ae.h,I=Math.max(I,ae.w)}y.sort(function(Hi,wi){return wi.h-Hi.h});for(var he=Math.max(Math.ceil(Math.sqrt(_/.95)),I),Fe=[{x:0,y:0,w:he,h:1/0}],it=0,yt=0,Lt=0,sr=y;Lt<sr.length;Lt+=1)for(var gr=sr[Lt],hr=Fe.length-1;hr>=0;hr--){var Rr=Fe[hr];if(!(gr.w>Rr.w||gr.h>Rr.h)){if(gr.x=Rr.x,gr.y=Rr.y,yt=Math.max(yt,gr.y+gr.h),it=Math.max(it,gr.x+gr.w),gr.w===Rr.w&&gr.h===Rr.h){var ni=Fe.pop();hr<Fe.length&&(Fe[hr]=ni)}else gr.h===Rr.h?(Rr.x+=gr.w,Rr.w-=gr.w):gr.w===Rr.w?(Rr.y+=gr.h,Rr.h-=gr.h):(Fe.push({x:Rr.x+gr.w,y:Rr.y,w:Rr.w-gr.w,h:gr.h}),Rr.y+=gr.h,Rr.h-=gr.h);break}}return{w:it,h:yt,fill:_/(it*yt)||0}}var Gc=1,Yf=function(_,I){var V=I.pixelRatio,$=I.version,ae=I.stretchX,he=I.stretchY,Fe=I.content;this.paddedRect=_,this.pixelRatio=V,this.stretchX=ae,this.stretchY=he,this.content=Fe,this.version=$},tp={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};tp.tl.get=function(){return[this.paddedRect.x+Gc,this.paddedRect.y+Gc]},tp.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-Gc,this.paddedRect.y+this.paddedRect.h-Gc]},tp.tlbr.get=function(){return this.tl.concat(this.br)},tp.displaySize.get=function(){return[(this.paddedRect.w-Gc*2)/this.pixelRatio,(this.paddedRect.h-Gc*2)/this.pixelRatio]},Object.defineProperties(Yf.prototype,tp);var yg=function(_,I){var V={},$={};this.haveRenderCallbacks=[];var ae=[];this.addImages(_,V,ae),this.addImages(I,$,ae);var he=ep(ae),Fe=he.w,it=he.h,yt=new Eh({width:Fe||1,height:it||1});for(var Lt in _){var sr=_[Lt],gr=V[Lt].paddedRect;Eh.copy(sr.data,yt,{x:0,y:0},{x:gr.x+Gc,y:gr.y+Gc},sr.data)}for(var hr in I){var Rr=I[hr],ni=$[hr].paddedRect,Hi=ni.x+Gc,wi=ni.y+Gc,bn=Rr.data.width,rn=Rr.data.height;Eh.copy(Rr.data,yt,{x:0,y:0},{x:Hi,y:wi},Rr.data),Eh.copy(Rr.data,yt,{x:0,y:rn-1},{x:Hi,y:wi-1},{width:bn,height:1}),Eh.copy(Rr.data,yt,{x:0,y:0},{x:Hi,y:wi+rn},{width:bn,height:1}),Eh.copy(Rr.data,yt,{x:bn-1,y:0},{x:Hi-1,y:wi},{width:1,height:rn}),Eh.copy(Rr.data,yt,{x:0,y:0},{x:Hi+bn,y:wi},{width:1,height:rn})}this.image=yt,this.iconPositions=V,this.patternPositions=$};yg.prototype.addImages=function(_,I,V){for(var $ in _){var ae=_[$],he={x:0,y:0,w:ae.data.width+2*Gc,h:ae.data.height+2*Gc};V.push(he),I[$]=new Yf(he,ae),ae.hasRenderCallback&&this.haveRenderCallbacks.push($)}},yg.prototype.patchUpdatedImages=function(_,I){_.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var V in _.updatedImages)this.patchUpdatedImage(this.iconPositions[V],_.getImage(V),I),this.patchUpdatedImage(this.patternPositions[V],_.getImage(V),I)},yg.prototype.patchUpdatedImage=function(_,I,V){if(!(!_||!I)&&_.version!==I.version){_.version=I.version;var $=_.tl,ae=$[0],he=$[1];V.update(I.data,void 0,{x:ae,y:he})}},X("ImagePosition",Yf),X("ImageAtlas",yg);var uv={horizontal:1,vertical:2,horizontalOnly:3},B1=-17;function kS(y){for(var _=0,I=y;_<I.length;_+=1){var V=I[_];if(V.positionedGlyphs.length!==0)return!1}return!0}var Qw=57344,g0=63743,_y=function(){this.scale=1,this.fontStack="",this.imageName=null};_y.forText=function(_,I){var V=new _y;return V.scale=_||1,V.fontStack=I,V},_y.forImage=function(_){var I=new _y;return I.imageName=_,I};var Kh=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};Kh.fromFeature=function(_,I){for(var V=new Kh,$=0;$<_.sections.length;$++){var ae=_.sections[$];ae.image?V.addImageSection(ae):V.addTextSection(ae,I)}return V},Kh.prototype.length=function(){return this.text.length},Kh.prototype.getSection=function(_){return this.sections[this.sectionIndex[_]]},Kh.prototype.getSectionIndex=function(_){return this.sectionIndex[_]},Kh.prototype.getCharCode=function(_){return this.text.charCodeAt(_)},Kh.prototype.verticalizePunctuation=function(){this.text=ln(this.text)},Kh.prototype.trim=function(){for(var _=0,I=0;I<this.text.length&&m0[this.text.charCodeAt(I)];I++)_++;for(var V=this.text.length,$=this.text.length-1;$>=0&&$>=_&&m0[this.text.charCodeAt($)];$--)V--;this.text=this.text.substring(_,V),this.sectionIndex=this.sectionIndex.slice(_,V)},Kh.prototype.substring=function(_,I){var V=new Kh;return V.text=this.text.substring(_,I),V.sectionIndex=this.sectionIndex.slice(_,I),V.sections=this.sections,V},Kh.prototype.toString=function(){return this.text},Kh.prototype.getMaxScale=function(){var _=this;return this.sectionIndex.reduce(function(I,V){return Math.max(I,_.sections[V].scale)},0)},Kh.prototype.addTextSection=function(_,I){this.text+=_.text,this.sections.push(_y.forText(_.scale,_.fontStack||I));for(var V=this.sections.length-1,$=0;$<_.text.length;++$)this.sectionIndex.push(V)},Kh.prototype.addImageSection=function(_){var I=_.image?_.image.name:"";if(I.length===0){re("Can't add FormattedSection with an empty image.");return}var V=this.getNextImageSectionCharCode();if(!V){re("Reached maximum number of images "+(g0-Qw+2));return}this.text+=String.fromCharCode(V),this.sections.push(_y.forImage(I)),this.sectionIndex.push(this.sections.length-1)},Kh.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=g0?null:++this.imageSectionID:(this.imageSectionID=Qw,this.imageSectionID)};function cq(y,_){for(var I=[],V=y.text,$=0,ae=0,he=_;ae<he.length;ae+=1){var Fe=he[ae];I.push(y.substring($,Fe)),$=Fe}return $<V.length&&I.push(y.substring($,V.length)),I}function e3(y,_,I,V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni){var Hi=Kh.fromFeature(y,$);sr===uv.vertical&&Hi.verticalizePunctuation();var wi,bn=Ms.processBidirectionalText,rn=Ms.processStyledBidirectionalText;if(bn&&Hi.sections.length===1){wi=[];for(var xn=bn(Hi.toString(),t3(Hi,yt,ae,_,V,hr,Rr)),In=0,Xn=xn;In<Xn.length;In+=1){var ga=Xn[In],ha=new Kh;ha.text=ga,ha.sections=Hi.sections;for(var eo=0;eo<ga.length;eo++)ha.sectionIndex.push(0);wi.push(ha)}}else if(rn){wi=[];for(var za=rn(Hi.text,Hi.sectionIndex,t3(Hi,yt,ae,_,V,hr,Rr)),Za=0,Jo=za;Za<Jo.length;Za+=1){var to=Jo[Za],ao=new Kh;ao.text=to[0],ao.sectionIndex=to[1],ao.sections=Hi.sections,wi.push(ao)}}else wi=cq(Hi,t3(Hi,yt,ae,_,V,hr,Rr));var _s=[],jo={positionedLines:_s,text:Hi.toString(),top:Lt[1],bottom:Lt[1],left:Lt[0],right:Lt[0],writingMode:sr,iconsInText:!1,verticalizable:!1};return dq(jo,_,I,V,wi,he,Fe,it,sr,yt,gr,ni),kS(_s)?!1:jo}var m0={};m0[9]=!0,m0[10]=!0,m0[11]=!0,m0[12]=!0,m0[13]=!0,m0[32]=!0;var cv={};cv[10]=!0,cv[32]=!0,cv[38]=!0,cv[40]=!0,cv[41]=!0,cv[43]=!0,cv[45]=!0,cv[47]=!0,cv[173]=!0,cv[183]=!0,cv[8203]=!0,cv[8208]=!0,cv[8211]=!0,cv[8231]=!0;function r6(y,_,I,V,$,ae){if(_.imageName){var it=V[_.imageName];return it?it.displaySize[0]*_.scale*Tn/ae+$:0}else{var he=I[_.fontStack],Fe=he&&he[y];return Fe?Fe.metrics.advance*_.scale+$:0}}function fq(y,_,I,V,$,ae){for(var he=0,Fe=0;Fe<y.length();Fe++){var it=y.getSection(Fe);he+=r6(y.getCharCode(Fe),it,V,$,_,ae)}var yt=Math.max(1,Math.ceil(he/I));return he/yt}function i6(y,_,I,V){var $=Math.pow(y-_,2);return V?y<_?$/2:$*2:$+Math.abs(I)*I}function hq(y,_,I){var V=0;return y===10&&(V-=1e4),I&&(V+=150),(y===40||y===65288)&&(V+=50),(_===41||_===65289)&&(V+=50),V}function _p(y,_,I,V,$,ae){for(var he=null,Fe=i6(_,I,$,ae),it=0,yt=V;it<yt.length;it+=1){var Lt=yt[it],sr=_-Lt.x,gr=i6(sr,I,$,ae)+Lt.badness;gr<=Fe&&(he=Lt,Fe=gr)}return{index:y,x:_,priorBreak:he,badness:Fe}}function fb(y){return y?fb(y.priorBreak).concat(y.index):[]}function t3(y,_,I,V,$,ae,he){if(ae!=="point")return[];if(!y)return[];for(var Fe=[],it=fq(y,_,I,V,$,he),yt=y.text.indexOf("\u200B")>=0,Lt=0,sr=0;sr<y.length();sr++){var gr=y.getSection(sr),hr=y.getCharCode(sr);if(m0[hr]||(Lt+=r6(hr,gr,V,$,_,he)),sr<y.length()-1){var Rr=Ur(hr);(cv[hr]||Rr||gr.imageName)&&Fe.push(_p(sr+1,Lt,it,Fe,hq(hr,y.getCharCode(sr+1),Rr&&yt),!1))}}return fb(_p(y.length(),Lt,it,Fe,0,!0))}function CS(y){var _=.5,I=.5;switch(y){case"right":case"top-right":case"bottom-right":_=1;break;case"left":case"top-left":case"bottom-left":_=0;break}switch(y){case"bottom":case"bottom-right":case"bottom-left":I=1;break;case"top":case"top-right":case"top-left":I=0;break}return{horizontalAlign:_,verticalAlign:I}}function dq(y,_,I,V,$,ae,he,Fe,it,yt,Lt,sr){for(var gr=0,hr=B1,Rr=0,ni=0,Hi=Fe==="right"?1:Fe==="left"?0:.5,wi=0,bn=0,rn=$;bn<rn.length;bn+=1){var xn=rn[bn];xn.trim();var In=xn.getMaxScale(),Xn=(In-1)*Tn,ga={positionedGlyphs:[],lineOffset:0};y.positionedLines[wi]=ga;var ha=ga.positionedGlyphs,eo=0;if(!xn.length()){hr+=ae,++wi;continue}for(var za=0;za<xn.length();za++){var Za=xn.getSection(za),Jo=xn.getSectionIndex(za),to=xn.getCharCode(za),ao=0,_s=null,jo=null,El=null,Iu=Tn,kl=!(it===uv.horizontal||!Lt&&!zr(to)||Lt&&(m0[to]||Wr(to)));if(Za.imageName){var Sf=V[Za.imageName];if(!Sf)continue;El=Za.imageName,y.iconsInText=y.iconsInText||!0,jo=Sf.paddedRect;var Ff=Sf.displaySize;Za.scale=Za.scale*Tn/sr,_s={width:Ff[0],height:Ff[1],left:Gc,top:-Gp,advance:kl?Ff[1]:Ff[0]};var $h=Tn-Ff[1]*Za.scale;ao=Xn+$h,Iu=_s.advance;var ch=kl?Ff[0]*Za.scale-Tn*In:Ff[1]*Za.scale-Tn*In;ch>0&&ch>eo&&(eo=ch)}else{var Cl=I[Za.fontStack],yl=Cl&&Cl[to];if(yl&&yl.rect)jo=yl.rect,_s=yl.metrics;else{var Qu=_[Za.fontStack],gc=Qu&&Qu[to];if(!gc)continue;_s=gc.metrics}ao=(In-Za.scale)*Tn}kl?(y.verticalizable=!0,ha.push({glyph:to,imageName:El,x:gr,y:hr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Jo,metrics:_s,rect:jo}),gr+=Iu*Za.scale+yt):(ha.push({glyph:to,imageName:El,x:gr,y:hr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Jo,metrics:_s,rect:jo}),gr+=_s.advance*Za.scale+yt)}if(ha.length!==0){var Wd=gr-yt;Rr=Math.max(Wd,Rr),vq(ha,0,ha.length-1,Hi,eo)}gr=0;var Xd=ae*In+eo;ga.lineOffset=Math.max(eo,Xn),hr+=Xd,ni=Math.max(Xd,ni),++wi}var Qh=hr-B1,fv=CS(he),hv=fv.horizontalAlign,Ph=fv.verticalAlign;kd(y.positionedLines,Hi,hv,Ph,Rr,ni,ae,Qh,$.length),y.top+=-Ph*Qh,y.bottom=y.top+Qh,y.left+=-hv*Rr,y.right=y.left+Rr}function vq(y,_,I,V,$){if(!(!V&&!$))for(var ae=y[I],he=ae.metrics.advance*ae.scale,Fe=(y[I].x+he)*V,it=_;it<=I;it++)y[it].x-=Fe,y[it].y+=$}function kd(y,_,I,V,$,ae,he,Fe,it){var yt=(_-I)*$,Lt=0;ae!==he?Lt=-Fe*V-B1:Lt=(-V*it+.5)*he;for(var sr=0,gr=y;sr<gr.length;sr+=1)for(var hr=gr[sr],Rr=0,ni=hr.positionedGlyphs;Rr<ni.length;Rr+=1){var Hi=ni[Rr];Hi.x+=yt,Hi.y+=Lt}}function rp(y,_,I){var V=CS(I),$=V.horizontalAlign,ae=V.verticalAlign,he=_[0],Fe=_[1],it=he-y.displaySize[0]*$,yt=it+y.displaySize[0],Lt=Fe-y.displaySize[1]*ae,sr=Lt+y.displaySize[1];return{image:y,top:Lt,bottom:sr,left:it,right:yt}}function pm(y,_,I,V,$,ae){var he=y.image,Fe;if(he.content){var it=he.content,yt=he.pixelRatio||1;Fe=[it[0]/yt,it[1]/yt,he.displaySize[0]-it[2]/yt,he.displaySize[1]-it[3]/yt]}var Lt=_.left*ae,sr=_.right*ae,gr,hr,Rr,ni;I==="width"||I==="both"?(ni=$[0]+Lt-V[3],hr=$[0]+sr+V[1]):(ni=$[0]+(Lt+sr-he.displaySize[0])/2,hr=ni+he.displaySize[0]);var Hi=_.top*ae,wi=_.bottom*ae;return I==="height"||I==="both"?(gr=$[1]+Hi-V[0],Rr=$[1]+wi+V[2]):(gr=$[1]+(Hi+wi-he.displaySize[1])/2,Rr=gr+he.displaySize[1]),{image:he,top:gr,right:hr,bottom:Rr,left:ni,collisionPadding:Fe}}var jd=function(y){function _(I,V,$,ae){y.call(this,I,V),this.angle=$,ae!==void 0&&(this.segment=ae)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.clone=function(){return new _(this.x,this.y,this.angle,this.segment)},_}(u);X("Anchor",jd);var Cd=128;function xp(y,_){var I=_.expression;if(I.kind==="constant"){var V=I.evaluate(new Un(y+1));return{kind:"constant",layoutSize:V}}else{if(I.kind==="source")return{kind:"source"};for(var $=I.zoomStops,ae=I.interpolationType,he=0;he<$.length&&$[he]<=y;)he++;he=Math.max(0,he-1);for(var Fe=he;Fe<$.length&&$[Fe]<y+1;)Fe++;Fe=Math.min($.length-1,Fe);var it=$[he],yt=$[Fe];if(I.kind==="composite")return{kind:"composite",minZoom:it,maxZoom:yt,interpolationType:ae};var Lt=I.evaluate(new Un(it)),sr=I.evaluate(new Un(yt));return{kind:"camera",minZoom:it,maxZoom:yt,minSize:Lt,maxSize:sr,interpolationType:ae}}}function BQ(y,_,I){var V=_.uSize,$=_.uSizeT,ae=I.lowerSize,he=I.upperSize;return y.kind==="source"?ae/Cd:y.kind==="composite"?nl(ae/Cd,he/Cd,$):V}function NQ(y,_){var I=0,V=0;if(y.kind==="constant")V=y.layoutSize;else if(y.kind!=="source"){var $=y.interpolationType,ae=y.minZoom,he=y.maxZoom,Fe=$?p(Wl.interpolationFactor($,_,ae,he),0,1):0;y.kind==="camera"?V=nl(y.minSize,y.maxSize,Fe):I=Fe}return{uSizeT:I,uSize:V}}var Fet=Object.freeze({__proto__:null,getSizeData:xp,evaluateSizeForFeature:BQ,evaluateSizeForZoom:NQ,SIZE_PACK_FACTOR:Cd});function UQ(y,_,I,V,$){if(_.segment===void 0)return!0;for(var ae=_,he=_.segment+1,Fe=0;Fe>-I/2;){if(he--,he<0)return!1;Fe-=y[he].dist(ae),ae=y[he]}Fe+=y[he].dist(y[he+1]),he++;for(var it=[],yt=0;Fe<I/2;){var Lt=y[he-1],sr=y[he],gr=y[he+1];if(!gr)return!1;var hr=Lt.angleTo(sr)-sr.angleTo(gr);for(hr=Math.abs((hr+3*Math.PI)%(Math.PI*2)-Math.PI),it.push({distance:Fe,angleDelta:hr}),yt+=hr;Fe-it[0].distance>V;)yt-=it.shift().angleDelta;if(yt>$)return!1;he++,Fe+=sr.dist(gr)}return!0}function VQ(y){for(var _=0,I=0;I<y.length-1;I++)_+=y[I].dist(y[I+1]);return _}function GQ(y,_,I){return y?3/5*_*I:0}function HQ(y,_){return Math.max(y?y.right-y.left:0,_?_.right-_.left:0)}function zet(y,_,I,V,$,ae){for(var he=GQ(I,$,ae),Fe=HQ(I,V)*ae,it=0,yt=VQ(y)/2,Lt=0;Lt<y.length-1;Lt++){var sr=y[Lt],gr=y[Lt+1],hr=sr.dist(gr);if(it+hr>yt){var Rr=(yt-it)/hr,ni=nl(sr.x,gr.x,Rr),Hi=nl(sr.y,gr.y,Rr),wi=new jd(ni,Hi,gr.angleTo(sr),Lt);return wi._round(),!he||UQ(y,wi,Fe,he,_)?wi:void 0}it+=hr}}function qet(y,_,I,V,$,ae,he,Fe,it){var yt=GQ(V,ae,he),Lt=HQ(V,$),sr=Lt*he,gr=y[0].x===0||y[0].x===it||y[0].y===0||y[0].y===it;_-sr<_/4&&(_=sr+_/4);var hr=ae*2,Rr=gr?_/2*Fe%_:(Lt/2+hr)*he*Fe%_;return jQ(y,Rr,_,yt,I,sr,gr,!1,it)}function jQ(y,_,I,V,$,ae,he,Fe,it){for(var yt=ae/2,Lt=VQ(y),sr=0,gr=_-I,hr=[],Rr=0;Rr<y.length-1;Rr++){for(var ni=y[Rr],Hi=y[Rr+1],wi=ni.dist(Hi),bn=Hi.angleTo(ni);gr+I<sr+wi;){gr+=I;var rn=(gr-sr)/wi,xn=nl(ni.x,Hi.x,rn),In=nl(ni.y,Hi.y,rn);if(xn>=0&&xn<it&&In>=0&&In<it&&gr-yt>=0&&gr+yt<=Lt){var Xn=new jd(xn,In,bn,Rr);Xn._round(),(!V||UQ(y,Xn,ae,V,$))&&hr.push(Xn)}}sr+=wi}return!Fe&&!hr.length&&!he&&(hr=jQ(y,sr/2,I,V,$,ae,he,!0,it)),hr}function WQ(y,_,I,V,$){for(var ae=[],he=0;he<y.length;he++)for(var Fe=y[he],it=void 0,yt=0;yt<Fe.length-1;yt++){var Lt=Fe[yt],sr=Fe[yt+1];Lt.x<_&&sr.x<_||(Lt.x<_?Lt=new u(_,Lt.y+(sr.y-Lt.y)*((_-Lt.x)/(sr.x-Lt.x)))._round():sr.x<_&&(sr=new u(_,Lt.y+(sr.y-Lt.y)*((_-Lt.x)/(sr.x-Lt.x)))._round()),!(Lt.y<I&&sr.y<I)&&(Lt.y<I?Lt=new u(Lt.x+(sr.x-Lt.x)*((I-Lt.y)/(sr.y-Lt.y)),I)._round():sr.y<I&&(sr=new u(Lt.x+(sr.x-Lt.x)*((I-Lt.y)/(sr.y-Lt.y)),I)._round()),!(Lt.x>=V&&sr.x>=V)&&(Lt.x>=V?Lt=new u(V,Lt.y+(sr.y-Lt.y)*((V-Lt.x)/(sr.x-Lt.x)))._round():sr.x>=V&&(sr=new u(V,Lt.y+(sr.y-Lt.y)*((V-Lt.x)/(sr.x-Lt.x)))._round()),!(Lt.y>=$&&sr.y>=$)&&(Lt.y>=$?Lt=new u(Lt.x+(sr.x-Lt.x)*(($-Lt.y)/(sr.y-Lt.y)),$)._round():sr.y>=$&&(sr=new u(Lt.x+(sr.x-Lt.x)*(($-Lt.y)/(sr.y-Lt.y)),$)._round()),(!it||!Lt.equals(it[it.length-1]))&&(it=[Lt],ae.push(it)),it.push(sr)))))}return ae}var r3=Gc;function XQ(y,_,I,V){var $=[],ae=y.image,he=ae.pixelRatio,Fe=ae.paddedRect.w-2*r3,it=ae.paddedRect.h-2*r3,yt=y.right-y.left,Lt=y.bottom-y.top,sr=ae.stretchX||[[0,Fe]],gr=ae.stretchY||[[0,it]],hr=function(Cl,yl){return Cl+yl[1]-yl[0]},Rr=sr.reduce(hr,0),ni=gr.reduce(hr,0),Hi=Fe-Rr,wi=it-ni,bn=0,rn=Rr,xn=0,In=ni,Xn=0,ga=Hi,ha=0,eo=wi;if(ae.content&&V){var za=ae.content;bn=n6(sr,0,za[0]),xn=n6(gr,0,za[1]),rn=n6(sr,za[0],za[2]),In=n6(gr,za[1],za[3]),Xn=za[0]-bn,ha=za[1]-xn,ga=za[2]-za[0]-rn,eo=za[3]-za[1]-In}var Za=function(Cl,yl,Qu,gc){var Sf=a6(Cl.stretch-bn,rn,yt,y.left),Ff=o6(Cl.fixed-Xn,ga,Cl.stretch,Rr),$h=a6(yl.stretch-xn,In,Lt,y.top),ch=o6(yl.fixed-ha,eo,yl.stretch,ni),Wd=a6(Qu.stretch-bn,rn,yt,y.left),Xd=o6(Qu.fixed-Xn,ga,Qu.stretch,Rr),Qh=a6(gc.stretch-xn,In,Lt,y.top),fv=o6(gc.fixed-ha,eo,gc.stretch,ni),hv=new u(Sf,$h),Ph=new u(Wd,$h),dv=new u(Wd,Qh),bp=new u(Sf,Qh),wy=new u(Ff/he,ch/he),V1=new u(Xd/he,fv/he),G1=_*Math.PI/180;if(G1){var H1=Math.sin(G1),c3=Math.cos(G1),y0=[c3,-H1,H1,c3];hv._matMult(y0),Ph._matMult(y0),bp._matMult(y0),dv._matMult(y0)}var h6=Cl.stretch+Cl.fixed,wq=Qu.stretch+Qu.fixed,d6=yl.stretch+yl.fixed,Tq=gc.stretch+gc.fixed,Hp={x:ae.paddedRect.x+r3+h6,y:ae.paddedRect.y+r3+d6,w:wq-h6,h:Tq-d6},f3=ga/he/yt,v6=eo/he/Lt;return{tl:hv,tr:Ph,bl:bp,br:dv,tex:Hp,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:wy,pixelOffsetBR:V1,minFontScaleX:f3,minFontScaleY:v6,isSDF:I}};if(!V||!ae.stretchX&&!ae.stretchY)$.push(Za({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Fe+1},{fixed:0,stretch:it+1}));else for(var Jo=ZQ(sr,Hi,Rr),to=ZQ(gr,wi,ni),ao=0;ao<Jo.length-1;ao++)for(var _s=Jo[ao],jo=Jo[ao+1],El=0;El<to.length-1;El++){var Iu=to[El],kl=to[El+1];$.push(Za(_s,Iu,jo,kl))}return $}function n6(y,_,I){for(var V=0,$=0,ae=y;$<ae.length;$+=1){var he=ae[$];V+=Math.max(_,Math.min(I,he[1]))-Math.max(_,Math.min(I,he[0]))}return V}function ZQ(y,_,I){for(var V=[{fixed:-r3,stretch:0}],$=0,ae=y;$<ae.length;$+=1){var he=ae[$],Fe=he[0],it=he[1],yt=V[V.length-1];V.push({fixed:Fe-yt.stretch,stretch:yt.stretch}),V.push({fixed:Fe-yt.stretch,stretch:yt.stretch+(it-Fe)})}return V.push({fixed:_+r3,stretch:I}),V}function a6(y,_,I,V){return y/_*I+V}function o6(y,_,I,V){return y-_*I/V}function Oet(y,_,I,V,$,ae,he,Fe){for(var it=V.layout.get("text-rotate").evaluate(ae,{})*Math.PI/180,yt=[],Lt=0,sr=_.positionedLines;Lt<sr.length;Lt+=1)for(var gr=sr[Lt],hr=0,Rr=gr.positionedGlyphs;hr<Rr.length;hr+=1){var ni=Rr[hr];if(ni.rect){var Hi=ni.rect||{},wi=1,bn=Gp+wi,rn=!0,xn=1,In=0,Xn=($||Fe)&&ni.vertical,ga=ni.metrics.advance*ni.scale/2;if(Fe&&_.verticalizable){var ha=(ni.scale-1)*Tn,eo=(Tn-ni.metrics.width*ni.scale)/2;In=gr.lineOffset/2-(ni.imageName?-eo:ha)}if(ni.imageName){var za=he[ni.imageName];rn=za.sdf,xn=za.pixelRatio,bn=Gc/xn}var Za=$?[ni.x+ga,ni.y]:[0,0],Jo=$?[0,0]:[ni.x+ga+I[0],ni.y+I[1]-In],to=[0,0];Xn&&(to=Jo,Jo=[0,0]);var ao=(ni.metrics.left-bn)*ni.scale-ga+Jo[0],_s=(-ni.metrics.top-bn)*ni.scale+Jo[1],jo=ao+Hi.w*ni.scale/xn,El=_s+Hi.h*ni.scale/xn,Iu=new u(ao,_s),kl=new u(jo,_s),Cl=new u(ao,El),yl=new u(jo,El);if(Xn){var Qu=new u(-ga,ga-B1),gc=-Math.PI/2,Sf=Tn/2-ga,Ff=ni.imageName?Sf:0,$h=new u(5-B1-Sf,-Ff),ch=new(Function.prototype.bind.apply(u,[null].concat(to)));Iu._rotateAround(gc,Qu)._add($h)._add(ch),kl._rotateAround(gc,Qu)._add($h)._add(ch),Cl._rotateAround(gc,Qu)._add($h)._add(ch),yl._rotateAround(gc,Qu)._add($h)._add(ch)}if(it){var Wd=Math.sin(it),Xd=Math.cos(it),Qh=[Xd,-Wd,Wd,Xd];Iu._matMult(Qh),kl._matMult(Qh),Cl._matMult(Qh),yl._matMult(Qh)}var fv=new u(0,0),hv=new u(0,0),Ph=0,dv=0;yt.push({tl:Iu,tr:kl,bl:Cl,br:yl,tex:Hi,writingMode:_.writingMode,glyphOffset:Za,sectionIndex:ni.sectionIndex,isSDF:rn,pixelOffsetTL:fv,pixelOffsetBR:hv,minFontScaleX:Ph,minFontScaleY:dv})}}return yt}var s6=function(_,I,V,$,ae,he,Fe,it,yt,Lt){if(this.boxStartIndex=_.length,yt){var sr=he.top,gr=he.bottom,hr=he.collisionPadding;hr&&(sr-=hr[1],gr+=hr[3]);var Rr=gr-sr;Rr>0&&(Rr=Math.max(10,Rr),this.circleDiameter=Rr)}else{var ni=he.top*Fe-it,Hi=he.bottom*Fe+it,wi=he.left*Fe-it,bn=he.right*Fe+it,rn=he.collisionPadding;if(rn&&(wi-=rn[0]*Fe,ni-=rn[1]*Fe,bn+=rn[2]*Fe,Hi+=rn[3]*Fe),Lt){var xn=new u(wi,ni),In=new u(bn,ni),Xn=new u(wi,Hi),ga=new u(bn,Hi),ha=Lt*Math.PI/180;xn._rotate(ha),In._rotate(ha),Xn._rotate(ha),ga._rotate(ha),wi=Math.min(xn.x,In.x,Xn.x,ga.x),bn=Math.max(xn.x,In.x,Xn.x,ga.x),ni=Math.min(xn.y,In.y,Xn.y,ga.y),Hi=Math.max(xn.y,In.y,Xn.y,ga.y)}_.emplaceBack(I.x,I.y,wi,ni,bn,Hi,V,$,ae)}this.boxEndIndex=_.length},i3=function(_,I){if(_===void 0&&(_=[]),I===void 0&&(I=Bet),this.data=_,this.length=this.data.length,this.compare=I,this.length>0)for(var V=(this.length>>1)-1;V>=0;V--)this._down(V)};i3.prototype.push=function(_){this.data.push(_),this.length++,this._up(this.length-1)},i3.prototype.pop=function(){if(this.length!==0){var _=this.data[0],I=this.data.pop();return this.length--,this.length>0&&(this.data[0]=I,this._down(0)),_}},i3.prototype.peek=function(){return this.data[0]},i3.prototype._up=function(_){for(var I=this,V=I.data,$=I.compare,ae=V[_];_>0;){var he=_-1>>1,Fe=V[he];if($(ae,Fe)>=0)break;V[_]=Fe,_=he}V[_]=ae},i3.prototype._down=function(_){for(var I=this,V=I.data,$=I.compare,ae=this.length>>1,he=V[_];_<ae;){var Fe=(_<<1)+1,it=V[Fe],yt=Fe+1;if(yt<this.length&&$(V[yt],it)<0&&(Fe=yt,it=V[yt]),$(it,he)>=0)break;V[_]=it,_=Fe}V[_]=he};function Bet(y,_){return y<_?-1:y>_?1:0}function Net(y,_,I){_===void 0&&(_=1),I===void 0&&(I=!1);for(var V=1/0,$=1/0,ae=-1/0,he=-1/0,Fe=y[0],it=0;it<Fe.length;it++){var yt=Fe[it];(!it||yt.x<V)&&(V=yt.x),(!it||yt.y<$)&&($=yt.y),(!it||yt.x>ae)&&(ae=yt.x),(!it||yt.y>he)&&(he=yt.y)}var Lt=ae-V,sr=he-$,gr=Math.min(Lt,sr),hr=gr/2,Rr=new i3([],Uet);if(gr===0)return new u(V,$);for(var ni=V;ni<ae;ni+=gr)for(var Hi=$;Hi<he;Hi+=gr)Rr.push(new n3(ni+hr,Hi+hr,hr,y));for(var wi=Get(y),bn=Rr.length;Rr.length;){var rn=Rr.pop();(rn.d>wi.d||!wi.d)&&(wi=rn,I&&console.log("found best %d after %d probes",Math.round(1e4*rn.d)/1e4,bn)),!(rn.max-wi.d<=_)&&(hr=rn.h/2,Rr.push(new n3(rn.p.x-hr,rn.p.y-hr,hr,y)),Rr.push(new n3(rn.p.x+hr,rn.p.y-hr,hr,y)),Rr.push(new n3(rn.p.x-hr,rn.p.y+hr,hr,y)),Rr.push(new n3(rn.p.x+hr,rn.p.y+hr,hr,y)),bn+=4)}return I&&(console.log("num probes: "+bn),console.log("best distance: "+wi.d)),wi.p}function Uet(y,_){return _.max-y.max}function n3(y,_,I,V){this.p=new u(y,_),this.h=I,this.d=Vet(this.p,V),this.max=this.d+this.h*Math.SQRT2}function Vet(y,_){for(var I=!1,V=1/0,$=0;$<_.length;$++)for(var ae=_[$],he=0,Fe=ae.length,it=Fe-1;he<Fe;it=he++){var yt=ae[he],Lt=ae[it];yt.y>y.y!=Lt.y>y.y&&y.x<(Lt.x-yt.x)*(y.y-yt.y)/(Lt.y-yt.y)+yt.x&&(I=!I),V=Math.min(V,hg(y,yt,Lt))}return(I?1:-1)*Math.sqrt(V)}function Get(y){for(var _=0,I=0,V=0,$=y[0],ae=0,he=$.length,Fe=he-1;ae<he;Fe=ae++){var it=$[ae],yt=$[Fe],Lt=it.x*yt.y-yt.x*it.y;I+=(it.x+yt.x)*Lt,V+=(it.y+yt.y)*Lt,_+=Lt*3}return new n3(I/_,V/_,0,y)}var a3=7,pq=Number.POSITIVE_INFINITY;function YQ(y,_){function I($,ae){var he=0,Fe=0;ae<0&&(ae=0);var it=ae/Math.sqrt(2);switch($){case"top-right":case"top-left":Fe=it-a3;break;case"bottom-right":case"bottom-left":Fe=-it+a3;break;case"bottom":Fe=-ae+a3;break;case"top":Fe=ae-a3;break}switch($){case"top-right":case"bottom-right":he=-it;break;case"top-left":case"bottom-left":he=it;break;case"left":he=ae;break;case"right":he=-ae;break}return[he,Fe]}function V($,ae,he){var Fe=0,it=0;switch(ae=Math.abs(ae),he=Math.abs(he),$){case"top-right":case"top-left":case"top":it=he-a3;break;case"bottom-right":case"bottom-left":case"bottom":it=-he+a3;break}switch($){case"top-right":case"bottom-right":case"right":Fe=-ae;break;case"top-left":case"bottom-left":case"left":Fe=ae;break}return[Fe,it]}return _[1]!==pq?V(y,_[0],_[1]):I(y,_[0])}function Het(y,_,I,V,$,ae,he){y.createArrays();var Fe=512*y.overscaling;y.tilePixelRatio=Ei/Fe,y.compareText={},y.iconsNeedLinear=!1;var it=y.layers[0].layout,yt=y.layers[0]._unevaluatedLayout._values,Lt={};if(y.textSizeData.kind==="composite"){var sr=y.textSizeData,gr=sr.minZoom,hr=sr.maxZoom;Lt.compositeTextSizes=[yt["text-size"].possiblyEvaluate(new Un(gr),he),yt["text-size"].possiblyEvaluate(new Un(hr),he)]}if(y.iconSizeData.kind==="composite"){var Rr=y.iconSizeData,ni=Rr.minZoom,Hi=Rr.maxZoom;Lt.compositeIconSizes=[yt["icon-size"].possiblyEvaluate(new Un(ni),he),yt["icon-size"].possiblyEvaluate(new Un(Hi),he)]}Lt.layoutTextSize=yt["text-size"].possiblyEvaluate(new Un(y.zoom+1),he),Lt.layoutIconSize=yt["icon-size"].possiblyEvaluate(new Un(y.zoom+1),he),Lt.textMaxSize=yt["text-size"].possiblyEvaluate(new Un(18));for(var wi=it.get("text-line-height")*Tn,bn=it.get("text-rotation-alignment")==="map"&&it.get("symbol-placement")!=="point",rn=it.get("text-keep-upright"),xn=it.get("text-size"),In=function(){var ha=ga[Xn],eo=it.get("text-font").evaluate(ha,{},he).join(","),za=xn.evaluate(ha,{},he),Za=Lt.layoutTextSize.evaluate(ha,{},he),Jo=Lt.layoutIconSize.evaluate(ha,{},he),to={horizontal:{},vertical:void 0},ao=ha.text,_s=[0,0];if(ao){var jo=ao.toString(),El=it.get("text-letter-spacing").evaluate(ha,{},he)*Tn,Iu=dr(jo)?El:0,kl=it.get("text-anchor").evaluate(ha,{},he),Cl=it.get("text-variable-anchor");if(!Cl){var yl=it.get("text-radial-offset").evaluate(ha,{},he);yl?_s=YQ(kl,[yl*Tn,pq]):_s=it.get("text-offset").evaluate(ha,{},he).map(function(wy){return wy*Tn})}var Qu=bn?"center":it.get("text-justify").evaluate(ha,{},he),gc=it.get("symbol-placement"),Sf=gc==="point"?it.get("text-max-width").evaluate(ha,{},he)*Tn:0,Ff=function(){y.allowVerticalPlacement&&Wt(jo)&&(to.vertical=e3(ao,_,I,$,eo,Sf,wi,kl,"left",Iu,_s,uv.vertical,!0,gc,Za,za))};if(!bn&&Cl){for(var $h=Qu==="auto"?Cl.map(function(wy){return gq(wy)}):[Qu],ch=!1,Wd=0;Wd<$h.length;Wd++){var Xd=$h[Wd];if(!to.horizontal[Xd])if(ch)to.horizontal[Xd]=to.horizontal[0];else{var Qh=e3(ao,_,I,$,eo,Sf,wi,"center",Xd,Iu,_s,uv.horizontal,!1,gc,Za,za);Qh&&(to.horizontal[Xd]=Qh,ch=Qh.positionedLines.length===1)}}Ff()}else{Qu==="auto"&&(Qu=gq(kl));var fv=e3(ao,_,I,$,eo,Sf,wi,kl,Qu,Iu,_s,uv.horizontal,!1,gc,Za,za);fv&&(to.horizontal[Qu]=fv),Ff(),Wt(jo)&&bn&&rn&&(to.vertical=e3(ao,_,I,$,eo,Sf,wi,kl,Qu,Iu,_s,uv.vertical,!1,gc,Za,za))}}var hv=void 0,Ph=!1;if(ha.icon&&ha.icon.name){var dv=V[ha.icon.name];dv&&(hv=rp($[ha.icon.name],it.get("icon-offset").evaluate(ha,{},he),it.get("icon-anchor").evaluate(ha,{},he)),Ph=dv.sdf,y.sdfIcons===void 0?y.sdfIcons=dv.sdf:y.sdfIcons!==dv.sdf&&re("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(dv.pixelRatio!==y.pixelRatio||it.get("icon-rotate").constantOr(1)!==0)&&(y.iconsNeedLinear=!0))}var bp=JQ(to.horizontal)||to.vertical;y.iconsInText=bp?bp.iconsInText:!1,(bp||hv)&&jet(y,ha,to,hv,V,Lt,Za,Jo,_s,Ph,he)},Xn=0,ga=y.features;Xn<ga.length;Xn+=1)In();ae&&y.generateCollisionDebugBuffers()}function gq(y){switch(y){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function jet(y,_,I,V,$,ae,he,Fe,it,yt,Lt){var sr=ae.textMaxSize.evaluate(_,{});sr===void 0&&(sr=he);var gr=y.layers[0].layout,hr=gr.get("icon-offset").evaluate(_,{},Lt),Rr=JQ(I.horizontal),ni=24,Hi=he/ni,wi=y.tilePixelRatio*Hi,bn=y.tilePixelRatio*sr/ni,rn=y.tilePixelRatio*Fe,xn=y.tilePixelRatio*gr.get("symbol-spacing"),In=gr.get("text-padding")*y.tilePixelRatio,Xn=gr.get("icon-padding")*y.tilePixelRatio,ga=gr.get("text-max-angle")/180*Math.PI,ha=gr.get("text-rotation-alignment")==="map"&&gr.get("symbol-placement")!=="point",eo=gr.get("icon-rotation-alignment")==="map"&&gr.get("symbol-placement")!=="point",za=gr.get("symbol-placement"),Za=xn/2,Jo=gr.get("icon-text-fit"),to;V&&Jo!=="none"&&(y.allowVerticalPlacement&&I.vertical&&(to=pm(V,I.vertical,Jo,gr.get("icon-text-fit-padding"),hr,Hi)),Rr&&(V=pm(V,Rr,Jo,gr.get("icon-text-fit-padding"),hr,Hi)));var ao=function(c3,y0){y0.x<0||y0.x>=Ei||y0.y<0||y0.y>=Ei||Wet(y,y0,c3,I,V,$,to,y.layers[0],y.collisionBoxArray,_.index,_.sourceLayerIndex,y.index,wi,In,ha,it,rn,Xn,eo,hr,_,ae,yt,Lt,he)};if(za==="line")for(var _s=0,jo=WQ(_.geometry,0,0,Ei,Ei);_s<jo.length;_s+=1)for(var El=jo[_s],Iu=qet(El,xn,ga,I.vertical||Rr,V,ni,bn,y.overscaling,Ei),kl=0,Cl=Iu;kl<Cl.length;kl+=1){var yl=Cl[kl],Qu=Rr;(!Qu||!Xet(y,Qu.text,Za,yl))&&ao(El,yl)}else if(za==="line-center")for(var gc=0,Sf=_.geometry;gc<Sf.length;gc+=1){var Ff=Sf[gc];if(Ff.length>1){var $h=zet(Ff,ga,I.vertical||Rr,V,ni,bn);$h&&ao(Ff,$h)}}else if(_.type==="Polygon")for(var ch=0,Wd=Xw(_.geometry,0);ch<Wd.length;ch+=1){var Xd=Wd[ch],Qh=Net(Xd,16);ao(Xd[0],new jd(Qh.x,Qh.y,0))}else if(_.type==="LineString")for(var fv=0,hv=_.geometry;fv<hv.length;fv+=1){var Ph=hv[fv];ao(Ph,new jd(Ph[0].x,Ph[0].y,0))}else if(_.type==="Point")for(var dv=0,bp=_.geometry;dv<bp.length;dv+=1)for(var wy=bp[dv],V1=0,G1=wy;V1<G1.length;V1+=1){var H1=G1[V1];ao([H1],new jd(H1.x,H1.y,0))}}var LS=255,N1=LS*Cd;function KQ(y,_,I,V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr){var ni=Oet(_,I,Fe,$,ae,he,V,y.allowVerticalPlacement),Hi=y.textSizeData,wi=null;Hi.kind==="source"?(wi=[Cd*$.layout.get("text-size").evaluate(he,{})],wi[0]>N1&&re(y.layerIds[0]+': Value for "text-size" is >= '+LS+'. Reduce your "text-size".')):Hi.kind==="composite"&&(wi=[Cd*hr.compositeTextSizes[0].evaluate(he,{},Rr),Cd*hr.compositeTextSizes[1].evaluate(he,{},Rr)],(wi[0]>N1||wi[1]>N1)&&re(y.layerIds[0]+': Value for "text-size" is >= '+LS+'. Reduce your "text-size".')),y.addSymbols(y.text,ni,wi,Fe,ae,he,yt,_,it.lineStartIndex,it.lineLength,gr,Rr);for(var bn=0,rn=Lt;bn<rn.length;bn+=1){var xn=rn[bn];sr[xn]=y.text.placedSymbolArray.length-1}return ni.length*4}function JQ(y){for(var _ in y)return y[_];return null}function Wet(y,_,I,V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn,In,Xn,ga,ha){var eo,za=y.addToLineVertexArray(_,I),Za,Jo,to,ao,_s=0,jo=0,El=0,Iu=0,kl=-1,Cl=-1,yl={},Qu=K(""),gc=0,Sf=0;if(Fe._unevaluatedLayout.getValue("text-radial-offset")===void 0?(eo=Fe.layout.get("text-offset").evaluate(xn,{},ga).map(function(RS){return RS*Tn}),gc=eo[0],Sf=eo[1]):(gc=Fe.layout.get("text-radial-offset").evaluate(xn,{},ga)*Tn,Sf=pq),y.allowVerticalPlacement&&V.vertical){var Ff=Fe.layout.get("text-rotate").evaluate(xn,{},ga),$h=Ff+90,ch=V.vertical;to=new s6(it,_,yt,Lt,sr,ch,gr,hr,Rr,$h),he&&(ao=new s6(it,_,yt,Lt,sr,he,Hi,wi,Rr,$h))}if($){var Wd=Fe.layout.get("icon-rotate").evaluate(xn,{}),Xd=Fe.layout.get("icon-text-fit")!=="none",Qh=XQ($,Wd,Xn,Xd),fv=he?XQ(he,Wd,Xn,Xd):void 0;Jo=new s6(it,_,yt,Lt,sr,$,Hi,wi,!1,Wd),_s=Qh.length*4;var hv=y.iconSizeData,Ph=null;hv.kind==="source"?(Ph=[Cd*Fe.layout.get("icon-size").evaluate(xn,{})],Ph[0]>N1&&re(y.layerIds[0]+': Value for "icon-size" is >= '+LS+'. Reduce your "icon-size".')):hv.kind==="composite"&&(Ph=[Cd*In.compositeIconSizes[0].evaluate(xn,{},ga),Cd*In.compositeIconSizes[1].evaluate(xn,{},ga)],(Ph[0]>N1||Ph[1]>N1)&&re(y.layerIds[0]+': Value for "icon-size" is >= '+LS+'. Reduce your "icon-size".')),y.addSymbols(y.icon,Qh,Ph,rn,bn,xn,!1,_,za.lineStartIndex,za.lineLength,-1,ga),kl=y.icon.placedSymbolArray.length-1,fv&&(jo=fv.length*4,y.addSymbols(y.icon,fv,Ph,rn,bn,xn,uv.vertical,_,za.lineStartIndex,za.lineLength,-1,ga),Cl=y.icon.placedSymbolArray.length-1)}for(var dv in V.horizontal){var bp=V.horizontal[dv];if(!Za){Qu=K(bp.text);var wy=Fe.layout.get("text-rotate").evaluate(xn,{},ga);Za=new s6(it,_,yt,Lt,sr,bp,gr,hr,Rr,wy)}var V1=bp.positionedLines.length===1;if(El+=KQ(y,_,bp,ae,Fe,Rr,xn,ni,za,V.vertical?uv.horizontal:uv.horizontalOnly,V1?Object.keys(V.horizontal):[dv],yl,kl,In,ga),V1)break}V.vertical&&(Iu+=KQ(y,_,V.vertical,ae,Fe,Rr,xn,ni,za,uv.vertical,["vertical"],yl,Cl,In,ga));var G1=Za?Za.boxStartIndex:y.collisionBoxArray.length,H1=Za?Za.boxEndIndex:y.collisionBoxArray.length,c3=to?to.boxStartIndex:y.collisionBoxArray.length,y0=to?to.boxEndIndex:y.collisionBoxArray.length,h6=Jo?Jo.boxStartIndex:y.collisionBoxArray.length,wq=Jo?Jo.boxEndIndex:y.collisionBoxArray.length,d6=ao?ao.boxStartIndex:y.collisionBoxArray.length,Tq=ao?ao.boxEndIndex:y.collisionBoxArray.length,Hp=-1,f3=function(RS,dee){return RS&&RS.circleDiameter?Math.max(RS.circleDiameter,dee):dee};Hp=f3(Za,Hp),Hp=f3(to,Hp),Hp=f3(Jo,Hp),Hp=f3(ao,Hp);var v6=Hp>-1?1:0;v6&&(Hp*=ha/Tn),y.glyphOffsetArray.length>=Pu.MAX_GLYPHS&&re("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),xn.sortKey!==void 0&&y.addToSortKeyRanges(y.symbolInstances.length,xn.sortKey),y.symbolInstances.emplaceBack(_.x,_.y,yl.right>=0?yl.right:-1,yl.center>=0?yl.center:-1,yl.left>=0?yl.left:-1,yl.vertical||-1,kl,Cl,Qu,G1,H1,c3,y0,h6,wq,d6,Tq,yt,El,Iu,_s,jo,v6,0,gr,gc,Sf,Hp)}function Xet(y,_,I,V){var $=y.compareText;if(!(_ in $))$[_]=[];else for(var ae=$[_],he=ae.length-1;he>=0;he--)if(V.dist(ae[he])<I)return!0;return $[_].push(V),!1}var Zet=mg.VectorTileFeature.types,Yet=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function l6(y,_,I,V,$,ae,he,Fe,it,yt,Lt,sr,gr){var hr=Fe?Math.min(N1,Math.round(Fe[0])):0,Rr=Fe?Math.min(N1,Math.round(Fe[1])):0;y.emplaceBack(_,I,Math.round(V*32),Math.round($*32),ae,he,(hr<<1)+(it?1:0),Rr,yt*16,Lt*16,sr*256,gr*256)}function mq(y,_,I){y.emplaceBack(_.x,_.y,I),y.emplaceBack(_.x,_.y,I),y.emplaceBack(_.x,_.y,I),y.emplaceBack(_.x,_.y,I)}function Ket(y){for(var _=0,I=y.sections;_<I.length;_+=1){var V=I[_];if(Li(V.text))return!0}return!1}var o3=function(_){this.layoutVertexArray=new qn,this.indexArray=new pn,this.programConfigurations=_,this.segments=new io,this.dynamicLayoutVertexArray=new fi,this.opacityVertexArray=new si,this.placedSymbolArray=new zo};o3.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},o3.prototype.upload=function(_,I,V,$){this.isEmpty()||(V&&(this.layoutVertexBuffer=_.createVertexBuffer(this.layoutVertexArray,te.members),this.indexBuffer=_.createIndexBuffer(this.indexArray,I),this.dynamicLayoutVertexBuffer=_.createVertexBuffer(this.dynamicLayoutVertexArray,fe.members,!0),this.opacityVertexBuffer=_.createVertexBuffer(this.opacityVertexArray,Yet,!0),this.opacityVertexBuffer.itemSize=1),(V||$)&&this.programConfigurations.upload(_))},o3.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",o3);var PS=function(_,I,V){this.layoutVertexArray=new _,this.layoutAttributes=I,this.indexArray=new V,this.segments=new io,this.collisionVertexArray=new Bi};PS.prototype.upload=function(_){this.layoutVertexBuffer=_.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=_.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=_.createVertexBuffer(this.collisionVertexArray,Re.members,!0)},PS.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},X("CollisionBuffers",PS);var Pu=function(_){this.collisionBoxArray=_.collisionBoxArray,this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map(function(it){return it.id}),this.index=_.index,this.pixelRatio=_.pixelRatio,this.sourceLayerIndex=_.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=dy([]),this.placementViewportMatrix=dy([]);var I=this.layers[0],V=I._unevaluatedLayout._values;this.textSizeData=xp(this.zoom,V["text-size"]),this.iconSizeData=xp(this.zoom,V["icon-size"]);var $=this.layers[0].layout,ae=$.get("symbol-sort-key"),he=$.get("symbol-z-order");this.canOverlap=$.get("text-allow-overlap")||$.get("icon-allow-overlap")||$.get("text-ignore-placement")||$.get("icon-ignore-placement"),this.sortFeaturesByKey=he!=="viewport-y"&&ae.constantOr(1)!==void 0;var Fe=he==="viewport-y"||he==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=Fe&&this.canOverlap,$.get("symbol-placement")==="point"&&(this.writingModes=$.get("text-writing-mode").map(function(it){return uv[it]})),this.stateDependentLayerIds=this.layers.filter(function(it){return it.isStateDependent()}).map(function(it){return it.id}),this.sourceID=_.sourceID};Pu.prototype.createArrays=function(){this.text=new o3(new ci(this.layers,this.zoom,function(_){return/^text/.test(_)})),this.icon=new o3(new ci(this.layers,this.zoom,function(_){return/^icon/.test(_)})),this.glyphOffsetArray=new Vl,this.lineVertexArray=new ss,this.symbolInstances=new al},Pu.prototype.calculateGlyphDependencies=function(_,I,V,$,ae){for(var he=0;he<_.length;he++)if(I[_.charCodeAt(he)]=!0,(V||$)&&ae){var Fe=zi[_.charAt(he)];Fe&&(I[Fe.charCodeAt(0)]=!0)}},Pu.prototype.populate=function(_,I,V){var $=this.layers[0],ae=$.layout,he=ae.get("text-font"),Fe=ae.get("text-field"),it=ae.get("icon-image"),yt=(Fe.value.kind!=="constant"||Fe.value.value instanceof $l&&!Fe.value.value.isEmpty()||Fe.value.value.toString().length>0)&&(he.value.kind!=="constant"||he.value.value.length>0),Lt=it.value.kind!=="constant"||!!it.value.value||Object.keys(it.parameters).length>0,sr=ae.get("symbol-sort-key");if(this.features=[],!(!yt&&!Lt)){for(var gr=I.iconDependencies,hr=I.glyphDependencies,Rr=I.availableImages,ni=new Un(this.zoom),Hi=0,wi=_;Hi<wi.length;Hi+=1){var bn=wi[Hi],rn=bn.feature,xn=bn.id,In=bn.index,Xn=bn.sourceLayerIndex,ga=$._featureFilter.needGeometry,ha=Ja(rn,ga);if($._featureFilter.filter(ni,ha,V)){ga||(ha.geometry=zn(rn));var eo=void 0;if(yt){var za=$.getValueAndResolveTokens("text-field",ha,V,Rr),Za=$l.factory(za);Ket(Za)&&(this.hasRTLText=!0),(!this.hasRTLText||yo()==="unavailable"||this.hasRTLText&&Ms.isParsed())&&(eo=pi(Za,$,ha))}var Jo=void 0;if(Lt){var to=$.getValueAndResolveTokens("icon-image",ha,V,Rr);to instanceof fl?Jo=to:Jo=fl.fromString(to)}if(!(!eo&&!Jo)){var ao=this.sortFeaturesByKey?sr.evaluate(ha,{},V):void 0,_s={id:xn,text:eo,icon:Jo,index:In,sourceLayerIndex:Xn,geometry:ha.geometry,properties:rn.properties,type:Zet[rn.type],sortKey:ao};if(this.features.push(_s),Jo&&(gr[Jo.name]=!0),eo){var jo=he.evaluate(ha,{},V).join(","),El=ae.get("text-rotation-alignment")==="map"&&ae.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(uv.vertical)>=0;for(var Iu=0,kl=eo.sections;Iu<kl.length;Iu+=1){var Cl=kl[Iu];if(Cl.image)gr[Cl.image.name]=!0;else{var yl=Wt(eo.toString()),Qu=Cl.fontStack||jo,gc=hr[Qu]=hr[Qu]||{};this.calculateGlyphDependencies(Cl.text,gc,El,this.allowVerticalPlacement,yl)}}}}}}ae.get("symbol-placement")==="line"&&(this.features=vn(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Sf,Ff){return Sf.sortKey-Ff.sortKey})}},Pu.prototype.update=function(_,I,V){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(_,I,this.layers,V),this.icon.programConfigurations.updatePaintArrays(_,I,this.layers,V))},Pu.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},Pu.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Pu.prototype.upload=function(_){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(_),this.iconCollisionBox.upload(_)),this.text.upload(_,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(_,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Pu.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Pu.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Pu.prototype.addToLineVertexArray=function(_,I){var V=this.lineVertexArray.length;if(_.segment!==void 0){for(var $=_.dist(I[_.segment+1]),ae=_.dist(I[_.segment]),he={},Fe=_.segment+1;Fe<I.length;Fe++)he[Fe]={x:I[Fe].x,y:I[Fe].y,tileUnitDistanceFromAnchor:$},Fe<I.length-1&&($+=I[Fe+1].dist(I[Fe]));for(var it=_.segment||0;it>=0;it--)he[it]={x:I[it].x,y:I[it].y,tileUnitDistanceFromAnchor:ae},it>0&&(ae+=I[it-1].dist(I[it]));for(var yt=0;yt<I.length;yt++){var Lt=he[yt];this.lineVertexArray.emplaceBack(Lt.x,Lt.y,Lt.tileUnitDistanceFromAnchor)}}return{lineStartIndex:V,lineLength:this.lineVertexArray.length-V}},Pu.prototype.addSymbols=function(_,I,V,$,ae,he,Fe,it,yt,Lt,sr,gr){for(var hr=_.indexArray,Rr=_.layoutVertexArray,ni=_.segments.prepareSegment(4*I.length,Rr,hr,this.canOverlap?he.sortKey:void 0),Hi=this.glyphOffsetArray.length,wi=ni.vertexLength,bn=this.allowVerticalPlacement&&Fe===uv.vertical?Math.PI/2:0,rn=he.text&&he.text.sections,xn=0;xn<I.length;xn++){var In=I[xn],Xn=In.tl,ga=In.tr,ha=In.bl,eo=In.br,za=In.tex,Za=In.pixelOffsetTL,Jo=In.pixelOffsetBR,to=In.minFontScaleX,ao=In.minFontScaleY,_s=In.glyphOffset,jo=In.isSDF,El=In.sectionIndex,Iu=ni.vertexLength,kl=_s[1];l6(Rr,it.x,it.y,Xn.x,kl+Xn.y,za.x,za.y,V,jo,Za.x,Za.y,to,ao),l6(Rr,it.x,it.y,ga.x,kl+ga.y,za.x+za.w,za.y,V,jo,Jo.x,Za.y,to,ao),l6(Rr,it.x,it.y,ha.x,kl+ha.y,za.x,za.y+za.h,V,jo,Za.x,Jo.y,to,ao),l6(Rr,it.x,it.y,eo.x,kl+eo.y,za.x+za.w,za.y+za.h,V,jo,Jo.x,Jo.y,to,ao),mq(_.dynamicLayoutVertexArray,it,bn),hr.emplaceBack(Iu,Iu+1,Iu+2),hr.emplaceBack(Iu+1,Iu+2,Iu+3),ni.vertexLength+=4,ni.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(_s[0]),(xn===I.length-1||El!==I[xn+1].sectionIndex)&&_.programConfigurations.populatePaintArrays(Rr.length,he,he.index,{},gr,rn&&rn[El])}_.placedSymbolArray.emplaceBack(it.x,it.y,Hi,this.glyphOffsetArray.length-Hi,wi,yt,Lt,it.segment,V?V[0]:0,V?V[1]:0,$[0],$[1],Fe,0,!1,0,sr)},Pu.prototype._addCollisionDebugVertex=function(_,I,V,$,ae,he){return I.emplaceBack(0,0),_.emplaceBack(V.x,V.y,$,ae,Math.round(he.x),Math.round(he.y))},Pu.prototype.addCollisionDebugVertices=function(_,I,V,$,ae,he,Fe){var it=ae.segments.prepareSegment(4,ae.layoutVertexArray,ae.indexArray),yt=it.vertexLength,Lt=ae.layoutVertexArray,sr=ae.collisionVertexArray,gr=Fe.anchorX,hr=Fe.anchorY;this._addCollisionDebugVertex(Lt,sr,he,gr,hr,new u(_,I)),this._addCollisionDebugVertex(Lt,sr,he,gr,hr,new u(V,I)),this._addCollisionDebugVertex(Lt,sr,he,gr,hr,new u(V,$)),this._addCollisionDebugVertex(Lt,sr,he,gr,hr,new u(_,$)),it.vertexLength+=4;var Rr=ae.indexArray;Rr.emplaceBack(yt,yt+1),Rr.emplaceBack(yt+1,yt+2),Rr.emplaceBack(yt+2,yt+3),Rr.emplaceBack(yt+3,yt),it.primitiveLength+=4},Pu.prototype.addDebugCollisionBoxes=function(_,I,V,$){for(var ae=_;ae<I;ae++){var he=this.collisionBoxArray.get(ae),Fe=he.x1,it=he.y1,yt=he.x2,Lt=he.y2;this.addCollisionDebugVertices(Fe,it,yt,Lt,$?this.textCollisionBox:this.iconCollisionBox,he.anchorPoint,V)}},Pu.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new PS(Ji,ft.members,sa),this.iconCollisionBox=new PS(Ji,ft.members,sa);for(var _=0;_<this.symbolInstances.length;_++){var I=this.symbolInstances.get(_);this.addDebugCollisionBoxes(I.textBoxStartIndex,I.textBoxEndIndex,I,!0),this.addDebugCollisionBoxes(I.verticalTextBoxStartIndex,I.verticalTextBoxEndIndex,I,!0),this.addDebugCollisionBoxes(I.iconBoxStartIndex,I.iconBoxEndIndex,I,!1),this.addDebugCollisionBoxes(I.verticalIconBoxStartIndex,I.verticalIconBoxEndIndex,I,!1)}},Pu.prototype._deserializeCollisionBoxesForSymbol=function(_,I,V,$,ae,he,Fe,it,yt){for(var Lt={},sr=I;sr<V;sr++){var gr=_.get(sr);Lt.textBox={x1:gr.x1,y1:gr.y1,x2:gr.x2,y2:gr.y2,anchorPointX:gr.anchorPointX,anchorPointY:gr.anchorPointY},Lt.textFeatureIndex=gr.featureIndex;break}for(var hr=$;hr<ae;hr++){var Rr=_.get(hr);Lt.verticalTextBox={x1:Rr.x1,y1:Rr.y1,x2:Rr.x2,y2:Rr.y2,anchorPointX:Rr.anchorPointX,anchorPointY:Rr.anchorPointY},Lt.verticalTextFeatureIndex=Rr.featureIndex;break}for(var ni=he;ni<Fe;ni++){var Hi=_.get(ni);Lt.iconBox={x1:Hi.x1,y1:Hi.y1,x2:Hi.x2,y2:Hi.y2,anchorPointX:Hi.anchorPointX,anchorPointY:Hi.anchorPointY},Lt.iconFeatureIndex=Hi.featureIndex;break}for(var wi=it;wi<yt;wi++){var bn=_.get(wi);Lt.verticalIconBox={x1:bn.x1,y1:bn.y1,x2:bn.x2,y2:bn.y2,anchorPointX:bn.anchorPointX,anchorPointY:bn.anchorPointY},Lt.verticalIconFeatureIndex=bn.featureIndex;break}return Lt},Pu.prototype.deserializeCollisionBoxes=function(_){this.collisionArrays=[];for(var I=0;I<this.symbolInstances.length;I++){var V=this.symbolInstances.get(I);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(_,V.textBoxStartIndex,V.textBoxEndIndex,V.verticalTextBoxStartIndex,V.verticalTextBoxEndIndex,V.iconBoxStartIndex,V.iconBoxEndIndex,V.verticalIconBoxStartIndex,V.verticalIconBoxEndIndex))}},Pu.prototype.hasTextData=function(){return this.text.segments.get().length>0},Pu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Pu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Pu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Pu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Pu.prototype.addIndicesForPlacedSymbol=function(_,I){for(var V=_.placedSymbolArray.get(I),$=V.vertexStartIndex+V.numGlyphs*4,ae=V.vertexStartIndex;ae<$;ae+=4)_.indexArray.emplaceBack(ae,ae+1,ae+2),_.indexArray.emplaceBack(ae+1,ae+2,ae+3)},Pu.prototype.getSortedSymbolIndexes=function(_){if(this.sortedAngle===_&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var I=Math.sin(_),V=Math.cos(_),$=[],ae=[],he=[],Fe=0;Fe<this.symbolInstances.length;++Fe){he.push(Fe);var it=this.symbolInstances.get(Fe);$.push(Math.round(I*it.anchorX+V*it.anchorY)|0),ae.push(it.featureIndex)}return he.sort(function(yt,Lt){return $[yt]-$[Lt]||ae[Lt]-ae[yt]}),he},Pu.prototype.addToSortKeyRanges=function(_,I){var V=this.sortKeyRanges[this.sortKeyRanges.length-1];V&&V.sortKey===I?V.symbolInstanceEnd=_+1:this.sortKeyRanges.push({sortKey:I,symbolInstanceStart:_,symbolInstanceEnd:_+1})},Pu.prototype.sortFeatures=function(_){var I=this;if(this.sortFeaturesByY&&this.sortedAngle!==_&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(_),this.sortedAngle=_,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var V=0,$=this.symbolInstanceIndexes;V<$.length;V+=1){var ae=$[V],he=this.symbolInstances.get(ae);this.featureSortOrder.push(he.featureIndex),[he.rightJustifiedTextSymbolIndex,he.centerJustifiedTextSymbolIndex,he.leftJustifiedTextSymbolIndex].forEach(function(Fe,it,yt){Fe>=0&&yt.indexOf(Fe)===it&&I.addIndicesForPlacedSymbol(I.text,Fe)}),he.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,he.verticalPlacedTextSymbolIndex),he.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.placedIconSymbolIndex),he.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},X("SymbolBucket",Pu,{omit:["layers","collisionBoxArray","features","compareText"]}),Pu.MAX_GLYPHS=65535,Pu.addDynamicAttributes=mq;function Jet(y,_){return _.replace(/{([^{}]+)}/g,function(I,V){return V in y?String(y[V]):""})}var $et=new Or({"symbol-placement":new Me(Rn.layout_symbol["symbol-placement"]),"symbol-spacing":new Me(Rn.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Me(Rn.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new bt(Rn.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Me(Rn.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Me(Rn.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Me(Rn.layout_symbol["icon-ignore-placement"]),"icon-optional":new Me(Rn.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Me(Rn.layout_symbol["icon-rotation-alignment"]),"icon-size":new bt(Rn.layout_symbol["icon-size"]),"icon-text-fit":new Me(Rn.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Me(Rn.layout_symbol["icon-text-fit-padding"]),"icon-image":new bt(Rn.layout_symbol["icon-image"]),"icon-rotate":new bt(Rn.layout_symbol["icon-rotate"]),"icon-padding":new Me(Rn.layout_symbol["icon-padding"]),"icon-keep-upright":new Me(Rn.layout_symbol["icon-keep-upright"]),"icon-offset":new bt(Rn.layout_symbol["icon-offset"]),"icon-anchor":new bt(Rn.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Me(Rn.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Me(Rn.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Me(Rn.layout_symbol["text-rotation-alignment"]),"text-field":new bt(Rn.layout_symbol["text-field"]),"text-font":new bt(Rn.layout_symbol["text-font"]),"text-size":new bt(Rn.layout_symbol["text-size"]),"text-max-width":new bt(Rn.layout_symbol["text-max-width"]),"text-line-height":new Me(Rn.layout_symbol["text-line-height"]),"text-letter-spacing":new bt(Rn.layout_symbol["text-letter-spacing"]),"text-justify":new bt(Rn.layout_symbol["text-justify"]),"text-radial-offset":new bt(Rn.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Me(Rn.layout_symbol["text-variable-anchor"]),"text-anchor":new bt(Rn.layout_symbol["text-anchor"]),"text-max-angle":new Me(Rn.layout_symbol["text-max-angle"]),"text-writing-mode":new Me(Rn.layout_symbol["text-writing-mode"]),"text-rotate":new bt(Rn.layout_symbol["text-rotate"]),"text-padding":new Me(Rn.layout_symbol["text-padding"]),"text-keep-upright":new Me(Rn.layout_symbol["text-keep-upright"]),"text-transform":new bt(Rn.layout_symbol["text-transform"]),"text-offset":new bt(Rn.layout_symbol["text-offset"]),"text-allow-overlap":new Me(Rn.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Me(Rn.layout_symbol["text-ignore-placement"]),"text-optional":new Me(Rn.layout_symbol["text-optional"])}),Qet=new Or({"icon-opacity":new bt(Rn.paint_symbol["icon-opacity"]),"icon-color":new bt(Rn.paint_symbol["icon-color"]),"icon-halo-color":new bt(Rn.paint_symbol["icon-halo-color"]),"icon-halo-width":new bt(Rn.paint_symbol["icon-halo-width"]),"icon-halo-blur":new bt(Rn.paint_symbol["icon-halo-blur"]),"icon-translate":new Me(Rn.paint_symbol["icon-translate"]),"icon-translate-anchor":new Me(Rn.paint_symbol["icon-translate-anchor"]),"text-opacity":new bt(Rn.paint_symbol["text-opacity"]),"text-color":new bt(Rn.paint_symbol["text-color"],{runtimeType:Ol,getOverride:function(y){return y.textColor},hasOverride:function(y){return!!y.textColor}}),"text-halo-color":new bt(Rn.paint_symbol["text-halo-color"]),"text-halo-width":new bt(Rn.paint_symbol["text-halo-width"]),"text-halo-blur":new bt(Rn.paint_symbol["text-halo-blur"]),"text-translate":new Me(Rn.paint_symbol["text-translate"]),"text-translate-anchor":new Me(Rn.paint_symbol["text-translate-anchor"])}),yq={paint:Qet,layout:$et},s3=function(_){this.type=_.property.overrides?_.property.overrides.runtimeType:ac,this.defaultValue=_};s3.prototype.evaluate=function(_){if(_.formattedSection){var I=this.defaultValue.property.overrides;if(I&&I.hasOverride(_.formattedSection))return I.getOverride(_.formattedSection)}return _.feature&&_.featureState?this.defaultValue.evaluate(_.feature,_.featureState):this.defaultValue.property.specification.default},s3.prototype.eachChild=function(_){if(!this.defaultValue.isConstant()){var I=this.defaultValue.value;_(I._styleExpression.expression)}},s3.prototype.outputDefined=function(){return!1},s3.prototype.serialize=function(){return null},X("FormatSectionOverride",s3,{omit:["defaultValue"]});var ett=function(y){function _(I){y.call(this,I,yq)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.recalculate=function(V,$){if(y.prototype.recalculate.call(this,V,$),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var ae=this.layout.get("text-writing-mode");if(ae){for(var he=[],Fe=0,it=ae;Fe<it.length;Fe+=1){var yt=it[Fe];he.indexOf(yt)<0&&he.push(yt)}this.layout._values["text-writing-mode"]=he}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},_.prototype.getValueAndResolveTokens=function(V,$,ae,he){var Fe=this.layout.get(V).evaluate($,{},ae,he),it=this._unevaluatedLayout._values[V];return!it.isDataDriven()&&!Ua(it.value)&&Fe?Jet($.properties,Fe):Fe},_.prototype.createBucket=function(V){return new Pu(V)},_.prototype.queryRadius=function(){return 0},_.prototype.queryIntersectsFeature=function(){return!1},_.prototype._setPaintOverrides=function(){for(var V=0,$=yq.paint.overridableProperties;V<$.length;V+=1){var ae=$[V];if(_.hasPaintOverride(this.layout,ae)){var he=this.paint.get(ae),Fe=new s3(he),it=new Ac(Fe,he.property.specification),yt=null;he.value.kind==="constant"||he.value.kind==="source"?yt=new Vc("source",it):yt=new hc("composite",it,he.value.zoomStops,he.value._interpolationType),this.paint._values[ae]=new dl(he.property,yt,he.parameters)}}},_.prototype._handleOverridablePaintPropertyUpdate=function(V,$,ae){return!this.layout||$.isDataDriven()||ae.isDataDriven()?!1:_.hasPaintOverride(this.layout,V)},_.hasPaintOverride=function(V,$){var ae=V.get("text-field"),he=yq.paint.properties[$],Fe=!1,it=function(sr){for(var gr=0,hr=sr;gr<hr.length;gr+=1){var Rr=hr[gr];if(he.overrides&&he.overrides.hasOverride(Rr)){Fe=!0;return}}};if(ae.value.kind==="constant"&&ae.value.value instanceof $l)it(ae.value.value.sections);else if(ae.value.kind==="source"){var yt=function(sr){if(!Fe)if(sr instanceof Go&&Es(sr.value)===pl){var gr=sr.value;it(gr.sections)}else sr instanceof Gu?it(sr.sections):sr.eachChild(yt)},Lt=ae.value;Lt._styleExpression&&yt(Lt._styleExpression.expression)}return Fe},_}(vi),ttt=new Or({"background-color":new Me(Rn.paint_background["background-color"]),"background-pattern":new Lr(Rn.paint_background["background-pattern"]),"background-opacity":new Me(Rn.paint_background["background-opacity"])}),rtt={paint:ttt},itt=function(y){function _(I){y.call(this,I,rtt)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_}(vi),ntt=new Or({"raster-opacity":new Me(Rn.paint_raster["raster-opacity"]),"raster-hue-rotate":new Me(Rn.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Me(Rn.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Me(Rn.paint_raster["raster-brightness-max"]),"raster-saturation":new Me(Rn.paint_raster["raster-saturation"]),"raster-contrast":new Me(Rn.paint_raster["raster-contrast"]),"raster-resampling":new Me(Rn.paint_raster["raster-resampling"]),"raster-fade-duration":new Me(Rn.paint_raster["raster-fade-duration"])}),att={paint:ntt},ott=function(y){function _(I){y.call(this,I,att)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_}(vi);function stt(y){var _=[],I=y.id;return I===void 0&&_.push({message:"layers."+I+': missing required property "id"'}),y.render===void 0&&_.push({message:"layers."+I+': missing required method "render"'}),y.renderingMode&&y.renderingMode!=="2d"&&y.renderingMode!=="3d"&&_.push({message:"layers."+I+': property "renderingMode" must be either "2d" or "3d"'}),_}var ltt=function(y){function _(I){y.call(this,I,{}),this.implementation=I}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},_.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},_.prototype.recalculate=function(){},_.prototype.updateTransitions=function(){},_.prototype.hasTransition=function(){},_.prototype.serialize=function(){},_.prototype.onAdd=function(V){this.implementation.onAdd&&this.implementation.onAdd(V,V.painter.context.gl)},_.prototype.onRemove=function(V){this.implementation.onRemove&&this.implementation.onRemove(V,V.painter.context.gl)},_}(vi),utt={circle:Y9,heatmap:Vw,hillshade:kC,fill:lb,"fill-extrusion":vm,line:A,symbol:ett,background:itt,raster:ott};function ctt(y){return y.type==="custom"?new ltt(y):new utt[y.type](y)}var $Q=f.HTMLImageElement,QQ=f.HTMLCanvasElement,eee=f.HTMLVideoElement,tee=f.ImageData,u6=f.ImageBitmap,hb=function(_,I,V,$){this.context=_,this.format=V,this.texture=_.gl.createTexture(),this.update(I,$)};hb.prototype.update=function(_,I,V){var $=_.width,ae=_.height,he=(!this.size||this.size[0]!==$||this.size[1]!==ae)&&!V,Fe=this,it=Fe.context,yt=it.gl;if(this.useMipmap=!!(I&&I.useMipmap),yt.bindTexture(yt.TEXTURE_2D,this.texture),it.pixelStoreUnpackFlipY.set(!1),it.pixelStoreUnpack.set(1),it.pixelStoreUnpackPremultiplyAlpha.set(this.format===yt.RGBA&&(!I||I.premultiply!==!1)),he)this.size=[$,ae],_ instanceof $Q||_ instanceof QQ||_ instanceof eee||_ instanceof tee||u6&&_ instanceof u6?yt.texImage2D(yt.TEXTURE_2D,0,this.format,this.format,yt.UNSIGNED_BYTE,_):yt.texImage2D(yt.TEXTURE_2D,0,this.format,$,ae,0,this.format,yt.UNSIGNED_BYTE,_.data);else{var Lt=V||{x:0,y:0},sr=Lt.x,gr=Lt.y;_ instanceof $Q||_ instanceof QQ||_ instanceof eee||_ instanceof tee||u6&&_ instanceof u6?yt.texSubImage2D(yt.TEXTURE_2D,0,sr,gr,yt.RGBA,yt.UNSIGNED_BYTE,_):yt.texSubImage2D(yt.TEXTURE_2D,0,sr,gr,$,ae,yt.RGBA,yt.UNSIGNED_BYTE,_.data)}this.useMipmap&&this.isSizePowerOfTwo()&&yt.generateMipmap(yt.TEXTURE_2D)},hb.prototype.bind=function(_,I,V){var $=this,ae=$.context,he=ae.gl;he.bindTexture(he.TEXTURE_2D,this.texture),V===he.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(V=he.LINEAR),_!==this.filter&&(he.texParameteri(he.TEXTURE_2D,he.TEXTURE_MAG_FILTER,_),he.texParameteri(he.TEXTURE_2D,he.TEXTURE_MIN_FILTER,V||_),this.filter=_),I!==this.wrap&&(he.texParameteri(he.TEXTURE_2D,he.TEXTURE_WRAP_S,I),he.texParameteri(he.TEXTURE_2D,he.TEXTURE_WRAP_T,I),this.wrap=I)},hb.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},hb.prototype.destroy=function(){var _=this.context,I=_.gl;I.deleteTexture(this.texture),this.texture=null};var _q=function(_){var I=this;this._callback=_,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){I._triggered=!1,I._callback()})};_q.prototype.trigger=function(){var _=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){_._triggered=!1,_._callback()},0))},_q.prototype.remove=function(){delete this._channel,this._callback=function(){}};var l3=function(_,I,V){this.target=_,this.parent=I,this.mapId=V,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},q(["receive","process"],this),this.invoker=new _q(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=Ce()?_:f};l3.prototype.send=function(_,I,V,$,ae){var he=this;ae===void 0&&(ae=!1);var Fe=Math.round(Math.random()*1e18).toString(36).substring(0,10);V&&(this.callbacks[Fe]=V);var it=Se(this.globalScope)?void 0:[];return this.target.postMessage({id:Fe,type:_,hasCallback:!!V,targetMapId:$,mustQueue:ae,sourceMapId:this.mapId,data:Ve(I,it)},it),{cancel:function(){V&&delete he.callbacks[Fe],he.target.postMessage({id:Fe,type:"<cancel>",targetMapId:$,sourceMapId:he.mapId})}}},l3.prototype.receive=function(_){var I=_.data,V=I.id;if(V&&!(I.targetMapId&&this.mapId!==I.targetMapId))if(I.type==="<cancel>"){delete this.tasks[V];var $=this.cancelCallbacks[V];delete this.cancelCallbacks[V],$&&$()}else Ce()||I.mustQueue?(this.tasks[V]=I,this.taskQueue.push(V),this.invoker.trigger()):this.processTask(V,I)},l3.prototype.process=function(){if(this.taskQueue.length){var _=this.taskQueue.shift(),I=this.tasks[_];delete this.tasks[_],this.taskQueue.length&&this.invoker.trigger(),I&&this.processTask(_,I)}},l3.prototype.processTask=function(_,I){var V=this;if(I.type==="<response>"){var $=this.callbacks[_];delete this.callbacks[_],$&&(I.error?$(Ye(I.error)):$(null,Ye(I.data)))}else{var ae=!1,he=Se(this.globalScope)?void 0:[],Fe=I.hasCallback?function(gr,hr){ae=!0,delete V.cancelCallbacks[_],V.target.postMessage({id:_,type:"<response>",sourceMapId:V.mapId,error:gr?Ve(gr):null,data:Ve(hr,he)},he)}:function(gr){ae=!0},it=null,yt=Ye(I.data);if(this.parent[I.type])it=this.parent[I.type](I.sourceMapId,yt,Fe);else if(this.parent.getWorkerSource){var Lt=I.type.split("."),sr=this.parent.getWorkerSource(I.sourceMapId,Lt[0],yt.source);it=sr[Lt[1]](yt,Fe)}else Fe(new Error("Could not find function "+I.type));!ae&&it&&it.cancel&&(this.cancelCallbacks[_]=it.cancel)}},l3.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function ftt(y,_,I){_=Math.pow(2,I)-_-1;var V=ree(y*256,_*256,I),$=ree((y+1)*256,(_+1)*256,I);return V[0]+","+V[1]+","+$[0]+","+$[1]}function ree(y,_,I){var V=2*Math.PI*6378137/256/Math.pow(2,I),$=y*V-2*Math.PI*6378137/2,ae=_*V-2*Math.PI*6378137/2;return[$,ae]}var lh=function(_,I){_&&(I?this.setSouthWest(_).setNorthEast(I):_.length===4?this.setSouthWest([_[0],_[1]]).setNorthEast([_[2],_[3]]):this.setSouthWest(_[0]).setNorthEast(_[1]))};lh.prototype.setNorthEast=function(_){return this._ne=_ instanceof Hc?new Hc(_.lng,_.lat):Hc.convert(_),this},lh.prototype.setSouthWest=function(_){return this._sw=_ instanceof Hc?new Hc(_.lng,_.lat):Hc.convert(_),this},lh.prototype.extend=function(_){var I=this._sw,V=this._ne,$,ae;if(_ instanceof Hc)$=_,ae=_;else if(_ instanceof lh){if($=_._sw,ae=_._ne,!$||!ae)return this}else{if(Array.isArray(_))if(_.length===4||_.every(Array.isArray)){var he=_;return this.extend(lh.convert(he))}else{var Fe=_;return this.extend(Hc.convert(Fe))}return this}return!I&&!V?(this._sw=new Hc($.lng,$.lat),this._ne=new Hc(ae.lng,ae.lat)):(I.lng=Math.min($.lng,I.lng),I.lat=Math.min($.lat,I.lat),V.lng=Math.max(ae.lng,V.lng),V.lat=Math.max(ae.lat,V.lat)),this},lh.prototype.getCenter=function(){return new Hc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},lh.prototype.getSouthWest=function(){return this._sw},lh.prototype.getNorthEast=function(){return this._ne},lh.prototype.getNorthWest=function(){return new Hc(this.getWest(),this.getNorth())},lh.prototype.getSouthEast=function(){return new Hc(this.getEast(),this.getSouth())},lh.prototype.getWest=function(){return this._sw.lng},lh.prototype.getSouth=function(){return this._sw.lat},lh.prototype.getEast=function(){return this._ne.lng},lh.prototype.getNorth=function(){return this._ne.lat},lh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},lh.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},lh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},lh.prototype.contains=function(_){var I=Hc.convert(_),V=I.lng,$=I.lat,ae=this._sw.lat<=$&&$<=this._ne.lat,he=this._sw.lng<=V&&V<=this._ne.lng;return this._sw.lng>this._ne.lng&&(he=this._sw.lng>=V&&V>=this._ne.lng),ae&&he},lh.convert=function(_){return!_||_ instanceof lh?_:new lh(_)};var iee=63710088e-1,Hc=function(_,I){if(isNaN(_)||isNaN(I))throw new Error("Invalid LngLat object: ("+_+", "+I+")");if(this.lng=+_,this.lat=+I,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Hc.prototype.wrap=function(){return new Hc(k(this.lng,-180,180),this.lat)},Hc.prototype.toArray=function(){return[this.lng,this.lat]},Hc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Hc.prototype.distanceTo=function(_){var I=Math.PI/180,V=this.lat*I,$=_.lat*I,ae=Math.sin(V)*Math.sin($)+Math.cos(V)*Math.cos($)*Math.cos((_.lng-this.lng)*I),he=iee*Math.acos(Math.min(ae,1));return he},Hc.prototype.toBounds=function(_){_===void 0&&(_=0);var I=40075017,V=360*_/I,$=V/Math.cos(Math.PI/180*this.lat);return new lh(new Hc(this.lng-$,this.lat-V),new Hc(this.lng+$,this.lat+V))},Hc.convert=function(_){if(_ instanceof Hc)return _;if(Array.isArray(_)&&(_.length===2||_.length===3))return new Hc(Number(_[0]),Number(_[1]));if(!Array.isArray(_)&&typeof _=="object"&&_!==null)return new Hc(Number("lng"in _?_.lng:_.lon),Number(_.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var nee=2*Math.PI*iee;function aee(y){return nee*Math.cos(y*Math.PI/180)}function oee(y){return(180+y)/360}function see(y){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+y*Math.PI/360)))/360}function lee(y,_){return y/aee(_)}function htt(y){return y*360-180}function xq(y){var _=180-y*360;return 360/Math.PI*Math.atan(Math.exp(_*Math.PI/180))-90}function dtt(y,_){return y*aee(xq(_))}function vtt(y){return 1/Math.cos(y*Math.PI/180)}var db=function(_,I,V){V===void 0&&(V=0),this.x=+_,this.y=+I,this.z=+V};db.fromLngLat=function(_,I){I===void 0&&(I=0);var V=Hc.convert(_);return new db(oee(V.lng),see(V.lat),lee(I,V.lat))},db.prototype.toLngLat=function(){return new Hc(htt(this.x),xq(this.y))},db.prototype.toAltitude=function(){return dtt(this.z,this.y)},db.prototype.meterInMercatorCoordinateUnits=function(){return 1/nee*vtt(xq(this.y))};var vb=function(_,I,V){this.z=_,this.x=I,this.y=V,this.key=IS(0,_,_,I,V)};vb.prototype.equals=function(_){return this.z===_.z&&this.x===_.x&&this.y===_.y},vb.prototype.url=function(_,I){var V=ftt(this.x,this.y,this.z),$=ptt(this.z,this.x,this.y);return _[(this.x+this.y)%_.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(I==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",$).replace("{bbox-epsg-3857}",V)},vb.prototype.getTilePoint=function(_){var I=Math.pow(2,this.z);return new u((_.x*I-this.x)*Ei,(_.y*I-this.y)*Ei)},vb.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var uee=function(_,I){this.wrap=_,this.canonical=I,this.key=IS(_,I.z,I.z,I.x,I.y)},uh=function(_,I,V,$,ae){this.overscaledZ=_,this.wrap=I,this.canonical=new vb(V,+$,+ae),this.key=IS(I,_,V,$,ae)};uh.prototype.equals=function(_){return this.overscaledZ===_.overscaledZ&&this.wrap===_.wrap&&this.canonical.equals(_.canonical)},uh.prototype.scaledTo=function(_){var I=this.canonical.z-_;return _>this.canonical.z?new uh(_,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new uh(_,this.wrap,_,this.canonical.x>>I,this.canonical.y>>I)},uh.prototype.calculateScaledKey=function(_,I){var V=this.canonical.z-_;return _>this.canonical.z?IS(this.wrap*+I,_,this.canonical.z,this.canonical.x,this.canonical.y):IS(this.wrap*+I,_,_,this.canonical.x>>V,this.canonical.y>>V)},uh.prototype.isChildOf=function(_){if(_.wrap!==this.wrap)return!1;var I=this.canonical.z-_.canonical.z;return _.overscaledZ===0||_.overscaledZ<this.overscaledZ&&_.canonical.x===this.canonical.x>>I&&_.canonical.y===this.canonical.y>>I},uh.prototype.children=function(_){if(this.overscaledZ>=_)return[new uh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var I=this.canonical.z+1,V=this.canonical.x*2,$=this.canonical.y*2;return[new uh(I,this.wrap,I,V,$),new uh(I,this.wrap,I,V+1,$),new uh(I,this.wrap,I,V,$+1),new uh(I,this.wrap,I,V+1,$+1)]},uh.prototype.isLessThan=function(_){return this.wrap<_.wrap?!0:this.wrap>_.wrap?!1:this.overscaledZ<_.overscaledZ?!0:this.overscaledZ>_.overscaledZ?!1:this.canonical.x<_.canonical.x?!0:this.canonical.x>_.canonical.x?!1:this.canonical.y<_.canonical.y},uh.prototype.wrapped=function(){return new uh(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},uh.prototype.unwrapTo=function(_){return new uh(this.overscaledZ,_,this.canonical.z,this.canonical.x,this.canonical.y)},uh.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},uh.prototype.toUnwrapped=function(){return new uee(this.wrap,this.canonical)},uh.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},uh.prototype.getTilePoint=function(_){return this.canonical.getTilePoint(new db(_.x-this.wrap,_.y))};function IS(y,_,I,V,$){y*=2,y<0&&(y=y*-1-1);var ae=1<<I;return(ae*ae*y+ae*$+V).toString(36)+I.toString(36)+_.toString(36)}function ptt(y,_,I){for(var V="",$,ae=y;ae>0;ae--)$=1<<ae-1,V+=(_&$?1:0)+(I&$?2:0);return V}X("CanonicalTileID",vb),X("OverscaledTileID",uh,{omit:["posMatrix"]});var xy=function(_,I,V){if(this.uid=_,I.height!==I.width)throw new RangeError("DEM tiles must be square");if(V&&V!=="mapbox"&&V!=="terrarium")return re('"'+V+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=I.height;var $=this.dim=I.height-2;this.data=new Uint32Array(I.data.buffer),this.encoding=V||"mapbox";for(var ae=0;ae<$;ae++)this.data[this._idx(-1,ae)]=this.data[this._idx(0,ae)],this.data[this._idx($,ae)]=this.data[this._idx($-1,ae)],this.data[this._idx(ae,-1)]=this.data[this._idx(ae,0)],this.data[this._idx(ae,$)]=this.data[this._idx(ae,$-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx($,-1)]=this.data[this._idx($-1,0)],this.data[this._idx(-1,$)]=this.data[this._idx(0,$-1)],this.data[this._idx($,$)]=this.data[this._idx($-1,$-1)]};xy.prototype.get=function(_,I){var V=new Uint8Array(this.data.buffer),$=this._idx(_,I)*4,ae=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return ae(V[$],V[$+1],V[$+2])},xy.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},xy.prototype._idx=function(_,I){if(_<-1||_>=this.dim+1||I<-1||I>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(I+1)*this.stride+(_+1)},xy.prototype._unpackMapbox=function(_,I,V){return(_*256*256+I*256+V)/10-1e4},xy.prototype._unpackTerrarium=function(_,I,V){return _*256+I+V/256-32768},xy.prototype.getPixels=function(){return new Eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},xy.prototype.backfillBorder=function(_,I,V){if(this.dim!==_.dim)throw new Error("dem dimension mismatch");var $=I*this.dim,ae=I*this.dim+this.dim,he=V*this.dim,Fe=V*this.dim+this.dim;switch(I){case-1:$=ae-1;break;case 1:ae=$+1;break}switch(V){case-1:he=Fe-1;break;case 1:Fe=he+1;break}for(var it=-I*this.dim,yt=-V*this.dim,Lt=he;Lt<Fe;Lt++)for(var sr=$;sr<ae;sr++)this.data[this._idx(sr,Lt)]=_.data[this._idx(sr+it,Lt+yt)]},X("DEMData",xy);function gtt(y,_){var I={};if(!_)return I;for(var V=function(){var he=ae[$],Fe=he.layerIds.map(function(sr){return _.getLayer(sr)}).filter(Boolean);if(Fe.length!==0){he.layers=Fe,he.stateDependentLayerIds&&(he.stateDependentLayers=he.stateDependentLayerIds.map(function(sr){return Fe.filter(function(gr){return gr.id===sr})[0]}));for(var it=0,yt=Fe;it<yt.length;it+=1){var Lt=yt[it];I[Lt.id]=he}}},$=0,ae=y;$<ae.length;$+=1)V();return I}var c6=function(_){this._stringToNumber={},this._numberToString=[];for(var I=0;I<_.length;I++){var V=_[I];this._stringToNumber[V]=I,this._numberToString[I]=V}};c6.prototype.encode=function(_){return this._stringToNumber[_]},c6.prototype.decode=function(_){return this._numberToString[_]};var f6=function(_,I,V,$,ae){this.type="Feature",this._vectorTileFeature=_,_._z=I,_._x=V,_._y=$,this.properties=_.properties,this.id=ae},bq={geometry:{configurable:!0}};bq.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},bq.geometry.set=function(y){this._geometry=y},f6.prototype.toJSON=function(){var _={geometry:this.geometry};for(var I in this)I==="_geometry"||I==="_vectorTileFeature"||(_[I]=this[I]);return _},Object.defineProperties(f6.prototype,bq);var u3=function(){this.state={},this.stateChanges={},this.deletedStates={}};u3.prototype.updateState=function(_,I,V){var $=String(I);if(this.stateChanges[_]=this.stateChanges[_]||{},this.stateChanges[_][$]=this.stateChanges[_][$]||{},x(this.stateChanges[_][$],V),this.deletedStates[_]===null){this.deletedStates[_]={};for(var ae in this.state[_])ae!==$&&(this.deletedStates[_][ae]=null)}else{var he=this.deletedStates[_]&&this.deletedStates[_][$]===null;if(he){this.deletedStates[_][$]={};for(var Fe in this.state[_][$])V[Fe]||(this.deletedStates[_][$][Fe]=null)}else for(var it in V){var yt=this.deletedStates[_]&&this.deletedStates[_][$]&&this.deletedStates[_][$][it]===null;yt&&delete this.deletedStates[_][$][it]}}},u3.prototype.removeFeatureState=function(_,I,V){var $=this.deletedStates[_]===null;if(!$){var ae=String(I);if(this.deletedStates[_]=this.deletedStates[_]||{},V&&I!==void 0)this.deletedStates[_][ae]!==null&&(this.deletedStates[_][ae]=this.deletedStates[_][ae]||{},this.deletedStates[_][ae][V]=null);else if(I!==void 0){var he=this.stateChanges[_]&&this.stateChanges[_][ae];if(he){this.deletedStates[_][ae]={};for(V in this.stateChanges[_][ae])this.deletedStates[_][ae][V]=null}else this.deletedStates[_][ae]=null}else this.deletedStates[_]=null}},u3.prototype.getState=function(_,I){var V=String(I),$=this.state[_]||{},ae=this.stateChanges[_]||{},he=x({},$[V],ae[V]);if(this.deletedStates[_]===null)return{};if(this.deletedStates[_]){var Fe=this.deletedStates[_][I];if(Fe===null)return{};for(var it in Fe)delete he[it]}return he},u3.prototype.initializeTileState=function(_,I){_.setFeatureState(this.state,I)},u3.prototype.coalesceChanges=function(_,I){var V={};for(var $ in this.stateChanges){this.state[$]=this.state[$]||{};var ae={};for(var he in this.stateChanges[$])this.state[$][he]||(this.state[$][he]={}),x(this.state[$][he],this.stateChanges[$][he]),ae[he]=this.state[$][he];V[$]=ae}for(var Fe in this.deletedStates){this.state[Fe]=this.state[Fe]||{};var it={};if(this.deletedStates[Fe]===null)for(var yt in this.state[Fe])it[yt]={},this.state[Fe][yt]={};else for(var Lt in this.deletedStates[Fe]){var sr=this.deletedStates[Fe][Lt]===null;if(sr)this.state[Fe][Lt]={};else for(var gr=0,hr=Object.keys(this.deletedStates[Fe][Lt]);gr<hr.length;gr+=1){var Rr=hr[gr];delete this.state[Fe][Lt][Rr]}it[Lt]=this.state[Fe][Lt]}V[Fe]=V[Fe]||{},x(V[Fe],it)}if(this.stateChanges={},this.deletedStates={},Object.keys(V).length!==0)for(var ni in _){var Hi=_[ni];Hi.setFeatureState(V,I)}};var by=function(_,I){this.tileID=_,this.x=_.canonical.x,this.y=_.canonical.y,this.z=_.canonical.z,this.grid=new au(Ei,16,0),this.grid3D=new au(Ei,16,0),this.featureIndexArray=new Ys,this.promoteId=I};by.prototype.insert=function(_,I,V,$,ae,he){var Fe=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(V,$,ae);for(var it=he?this.grid3D:this.grid,yt=0;yt<I.length;yt++){for(var Lt=I[yt],sr=[1/0,1/0,-1/0,-1/0],gr=0;gr<Lt.length;gr++){var hr=Lt[gr];sr[0]=Math.min(sr[0],hr.x),sr[1]=Math.min(sr[1],hr.y),sr[2]=Math.max(sr[2],hr.x),sr[3]=Math.max(sr[3],hr.y)}sr[0]<Ei&&sr[1]<Ei&&sr[2]>=0&&sr[3]>=0&&it.insert(Fe,sr[0],sr[1],sr[2],sr[3])}},by.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new mg.VectorTile(new Xa(this.rawTileData)).layers,this.sourceLayerCoder=new c6(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},by.prototype.query=function(_,I,V,$){var ae=this;this.loadVTLayers();for(var he=_.params||{},Fe=Ei/_.tileSize/_.scale,it=xe(he.filter),yt=_.queryGeometry,Lt=_.queryPadding*Fe,sr=fee(yt),gr=this.grid.query(sr.minX-Lt,sr.minY-Lt,sr.maxX+Lt,sr.maxY+Lt),hr=fee(_.cameraQueryGeometry),Rr=this.grid3D.query(hr.minX-Lt,hr.minY-Lt,hr.maxX+Lt,hr.maxY+Lt,function(Xn,ga,ha,eo){return mp(_.cameraQueryGeometry,Xn-Lt,ga-Lt,ha+Lt,eo+Lt)}),ni=0,Hi=Rr;ni<Hi.length;ni+=1){var wi=Hi[ni];gr.push(wi)}gr.sort(mtt);for(var bn={},rn,xn=function(Xn){var ga=gr[Xn];if(ga!==rn){rn=ga;var ha=ae.featureIndexArray.get(ga),eo=null;ae.loadMatchingFeature(bn,ha.bucketIndex,ha.sourceLayerIndex,ha.featureIndex,it,he.layers,he.availableImages,I,V,$,function(za,Za,Jo){return eo||(eo=zn(za)),Za.queryIntersectsFeature(yt,za,Jo,eo,ae.z,_.transform,Fe,_.pixelPosMatrix)})}},In=0;In<gr.length;In++)xn(In);return bn},by.prototype.loadMatchingFeature=function(_,I,V,$,ae,he,Fe,it,yt,Lt,sr){var gr=this.bucketLayerIDs[I];if(!(he&&!N(he,gr))){var hr=this.sourceLayerCoder.decode(V),Rr=this.vtLayers[hr],ni=Rr.feature($);if(ae.needGeometry){var Hi=Ja(ni,!0);if(!ae.filter(new Un(this.tileID.overscaledZ),Hi,this.tileID.canonical))return}else if(!ae.filter(new Un(this.tileID.overscaledZ),ni))return;for(var wi=this.getId(ni,hr),bn=0;bn<gr.length;bn++){var rn=gr[bn];if(!(he&&he.indexOf(rn)<0)){var xn=it[rn];if(xn){var In={};wi!==void 0&&Lt&&(In=Lt.getState(xn.sourceLayer||"_geojsonTileLayer",wi));var Xn=x({},yt[rn]);Xn.paint=cee(Xn.paint,xn.paint,ni,In,Fe),Xn.layout=cee(Xn.layout,xn.layout,ni,In,Fe);var ga=!sr||sr(ni,xn,In);if(ga){var ha=new f6(ni,this.z,this.x,this.y,wi);ha.layer=Xn;var eo=_[rn];eo===void 0&&(eo=_[rn]=[]),eo.push({featureIndex:$,feature:ha,intersectionZ:ga})}}}}}},by.prototype.lookupSymbolFeatures=function(_,I,V,$,ae,he,Fe,it){var yt={};this.loadVTLayers();for(var Lt=xe(ae),sr=0,gr=_;sr<gr.length;sr+=1){var hr=gr[sr];this.loadMatchingFeature(yt,V,$,hr,Lt,he,Fe,it,I)}return yt},by.prototype.hasLayer=function(_){for(var I=0,V=this.bucketLayerIDs;I<V.length;I+=1)for(var $=V[I],ae=0,he=$;ae<he.length;ae+=1){var Fe=he[ae];if(_===Fe)return!0}return!1},by.prototype.getId=function(_,I){var V=_.id;if(this.promoteId){var $=typeof this.promoteId=="string"?this.promoteId:this.promoteId[I];V=_.properties[$],typeof V=="boolean"&&(V=Number(V))}return V},X("FeatureIndex",by,{omit:["rawTileData","sourceLayerCoder"]});function cee(y,_,I,V,$){return G(y,function(ae,he){var Fe=_ instanceof Sc?_.get(he):null;return Fe&&Fe.evaluate?Fe.evaluate(I,V,$):Fe})}function fee(y){for(var _=1/0,I=1/0,V=-1/0,$=-1/0,ae=0,he=y;ae<he.length;ae+=1){var Fe=he[ae];_=Math.min(_,Fe.x),I=Math.min(I,Fe.y),V=Math.max(V,Fe.x),$=Math.max($,Fe.y)}return{minX:_,minY:I,maxX:V,maxY:$}}function mtt(y,_){return _-y}var ytt=3e4,Jh=function(_,I){this.tileID=_,this.uid=g(),this.uses=0,this.tileSize=I,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};Jh.prototype.registerFadeDuration=function(_){var I=_+this.timeAdded;I<lt.now()||this.fadeEndTime&&I<this.fadeEndTime||(this.fadeEndTime=I)},Jh.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},Jh.prototype.loadVectorData=function(_,I,V){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!_){this.collisionBoxArray=new Va;return}_.featureIndex&&(this.latestFeatureIndex=_.featureIndex,_.rawTileData?(this.latestRawTileData=_.rawTileData,this.latestFeatureIndex.rawTileData=_.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=_.collisionBoxArray,this.buckets=gtt(_.buckets,I.style),this.hasSymbolBuckets=!1;for(var $ in this.buckets){var ae=this.buckets[$];if(ae instanceof Pu)if(this.hasSymbolBuckets=!0,V)ae.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var he in this.buckets){var Fe=this.buckets[he];if(Fe instanceof Pu&&Fe.hasRTLText){this.hasRTLText=!0,Xs();break}}this.queryPadding=0;for(var it in this.buckets){var yt=this.buckets[it];this.queryPadding=Math.max(this.queryPadding,I.style.getLayer(it).queryRadius(yt))}_.imageAtlas&&(this.imageAtlas=_.imageAtlas),_.glyphAtlasImage&&(this.glyphAtlasImage=_.glyphAtlasImage)},Jh.prototype.unloadVectorData=function(){for(var _ in this.buckets)this.buckets[_].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},Jh.prototype.getBucket=function(_){return this.buckets[_.id]},Jh.prototype.upload=function(_){for(var I in this.buckets){var V=this.buckets[I];V.uploadPending()&&V.upload(_)}var $=_.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new hb(_,this.imageAtlas.image,$.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new hb(_,this.glyphAtlasImage,$.ALPHA),this.glyphAtlasImage=null)},Jh.prototype.prepare=function(_){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(_,this.imageAtlasTexture)},Jh.prototype.queryRenderedFeatures=function(_,I,V,$,ae,he,Fe,it,yt,Lt){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:$,cameraQueryGeometry:ae,scale:he,tileSize:this.tileSize,pixelPosMatrix:Lt,transform:it,params:Fe,queryPadding:this.queryPadding*yt},_,I,V)},Jh.prototype.querySourceFeatures=function(_,I){var V=this.latestFeatureIndex;if(!(!V||!V.rawTileData)){var $=V.loadVTLayers(),ae=I?I.sourceLayer:"",he=$._geojsonTileLayer||$[ae];if(he)for(var Fe=xe(I&&I.filter),it=this.tileID.canonical,yt=it.z,Lt=it.x,sr=it.y,gr={z:yt,x:Lt,y:sr},hr=0;hr<he.length;hr++){var Rr=he.feature(hr);if(Fe.needGeometry){var ni=Ja(Rr,!0);if(!Fe.filter(new Un(this.tileID.overscaledZ),ni,this.tileID.canonical))continue}else if(!Fe.filter(new Un(this.tileID.overscaledZ),Rr))continue;var Hi=V.getId(Rr,ae),wi=new f6(Rr,yt,Lt,sr,Hi);wi.tile=gr,_.push(wi)}}},Jh.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},Jh.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Jh.prototype.setExpiryData=function(_){var I=this.expirationTime;if(_.cacheControl){var V=ge(_.cacheControl);V["max-age"]&&(this.expirationTime=Date.now()+V["max-age"]*1e3)}else _.expires&&(this.expirationTime=new Date(_.expires).getTime());if(this.expirationTime){var $=Date.now(),ae=!1;if(this.expirationTime>$)ae=!1;else if(!I)ae=!0;else if(this.expirationTime<I)ae=!0;else{var he=this.expirationTime-I;he?this.expirationTime=$+Math.max(he,ytt):ae=!0}ae?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},Jh.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)},Jh.prototype.setFeatureState=function(_,I){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(_).length===0)){var V=this.latestFeatureIndex.loadVTLayers();for(var $ in this.buckets)if(I.style.hasLayer($)){var ae=this.buckets[$],he=ae.layers[0].sourceLayer||"_geojsonTileLayer",Fe=V[he],it=_[he];if(!(!Fe||!it||Object.keys(it).length===0)){ae.update(it,Fe,this.imageAtlas&&this.imageAtlas.patternPositions||{});var yt=I&&I.style&&I.style.getLayer($);yt&&(this.queryPadding=Math.max(this.queryPadding,yt.queryRadius(ae)))}}}},Jh.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},Jh.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<lt.now()},Jh.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Jh.prototype.setHoldDuration=function(_){this.symbolFadeHoldUntil=lt.now()+_},Jh.prototype.setDependencies=function(_,I){for(var V={},$=0,ae=I;$<ae.length;$+=1){var he=ae[$];V[he]=!0}this.dependencies[_]=V},Jh.prototype.hasDependency=function(_,I){for(var V=0,$=_;V<$.length;V+=1){var ae=$[V],he=this.dependencies[ae];if(he)for(var Fe=0,it=I;Fe<it.length;Fe+=1){var yt=it[Fe];if(he[yt])return!0}}return!1};var _tt=["type","source","source-layer","minzoom","maxzoom","filter","layout"],U1=f.performance,hee=function(_){this._marks={start:[_.url,"start"].join("#"),end:[_.url,"end"].join("#"),measure:_.url.toString()},U1.mark(this._marks.start)};hee.prototype.finish=function(){U1.mark(this._marks.end);var _=U1.getEntriesByName(this._marks.measure);return _.length===0&&(U1.measure(this._marks.measure,this._marks.start,this._marks.end),_=U1.getEntriesByName(this._marks.measure),U1.clearMarks(this._marks.start),U1.clearMarks(this._marks.end),U1.clearMeasures(this._marks.measure)),_},i.Actor=l3,i.AlphaImage=Dv,i.CanonicalTileID=vb,i.CollisionBoxArray=Va,i.Color=cs,i.DEMData=xy,i.DataConstantProperty=Me,i.DictionaryCoder=c6,i.EXTENT=Ei,i.ErrorEvent=da,i.EvaluationParameters=Un,i.Event=Xo,i.Evented=jn,i.FeatureIndex=by,i.FillBucket=yp,i.FillExtrusionBucket=Vp,i.ImageAtlas=yg,i.ImagePosition=Yf,i.LineBucket=sh,i.LngLat=Hc,i.LngLatBounds=lh,i.MercatorCoordinate=db,i.ONE_EM=Tn,i.OverscaledTileID=uh,i.Point=u,i.Point$1=u,i.Properties=Or,i.Protobuf=Xa,i.RGBAImage=Eh,i.RequestManager=Ae,i.RequestPerformance=hee,i.ResourceType=Kn,i.SegmentVector=io,i.SourceFeatureState=u3,i.StructArrayLayout1ui2=ba,i.StructArrayLayout2f1f2i16=Ui,i.StructArrayLayout2i4=Zr,i.StructArrayLayout3ui6=pn,i.StructArrayLayout4i8=yi,i.SymbolBucket=Pu,i.Texture=hb,i.Tile=Jh,i.Transitionable=Uo,i.Uniform1f=$e,i.Uniform1i=Ne,i.Uniform2f=ot,i.Uniform3f=It,i.Uniform4f=Bt,i.UniformColor=Ft,i.UniformMatrix4f=zt,i.UnwrappedTileID=uee,i.ValidationError=_a,i.WritingMode=uv,i.ZoomHistory=Pt,i.add=Rv,i.addDynamicAttributes=mq,i.asyncAll=M,i.bezier=m,i.bindAll=q,i.browser=lt,i.cacheEntryPossiblyAdded=un,i.clamp=p,i.clearTileCache=An,i.clipLine=WQ,i.clone=C1,i.clone$1=j,i.clone$2=Ow,i.collisionCircleLayout=Rt,i.config=mt,i.create=k1,i.create$1=Zh,i.create$2=vg,i.createCommonjsModule=a,i.createExpression=oo,i.createLayout=ji,i.createStyleLayer=ctt,i.cross=G9,i.deepEqual=h,i.dot=V9,i.dot$1=Z9,i.ease=b,i.emitValidationErrors=Lu,i.endsWith=U,i.enforceCacheSizeLimit=Fn,i.evaluateSizeForFeature=BQ,i.evaluateSizeForZoom=NQ,i.evaluateVariableOffset=YQ,i.evented=Ia,i.extend=x,i.featureFilter=xe,i.filterObject=Z,i.fromRotation=am,i.getAnchorAlignment=CS,i.getAnchorJustification=gq,i.getArrayBuffer=ti,i.getImage=ua,i.getJSON=Xr,i.getRTLTextPluginStatus=yo,i.getReferrer=Gt,i.getVideo=ma,i.identity=dy,i.invert=om,i.isChar=at,i.isMapboxURL=rt,i.keysDifference=L,i.makeRequest=wr,i.mapObject=G,i.mercatorXfromLng=oee,i.mercatorYfromLat=see,i.mercatorZfromAltitude=lee,i.mul=Yx,i.multiply=sm,i.mvt=mg,i.nextPowerOfTwo=E,i.normalize=Kx,i.number=nl,i.offscreenCanvasSupported=Vi,i.ortho=wu,i.parseGlyphPBF=p0,i.pbf=Xa,i.performSymbolLayout=Het,i.perspective=L1,i.pick=C,i.plugin=Ms,i.polygonIntersectsPolygon=so,i.postMapLoadEvent=We,i.postTurnstileEvent=Ge,i.potpack=ep,i.refProperties=_tt,i.register=X,i.registerForPluginStateChange=Da,i.renderColorRamp=Qx,i.rotate=hy,i.rotateX=Sd,i.rotateZ=vy,i.scale=tu,i.scale$1=X9,i.scale$2=Bw,i.setCacheLimits=Hn,i.setRTLTextPlugin=go,i.sphericalToCartesian=ke,i.sqrLen=uS,i.styleSpec=Rn,i.sub=j9,i.symbolSize=Fet,i.transformMat3=H9,i.transformMat4=py,i.translate=vc,i.triggerPluginCompletionEvent=na,i.uniqueId=g,i.validateCustomStyleLayer=stt,i.validateLight=To,i.validateStyle=wo,i.values=T,i.vectorTile=mg,i.version=o,i.warnOnce=re,i.webpSupported=Vt,i.window=f,i.wrap=k}),n(["./shared"],function(i){"use strict";function a(Gt){var wt=typeof Gt;if(wt==="number"||wt==="boolean"||wt==="string"||Gt===void 0||Gt===null)return JSON.stringify(Gt);if(Array.isArray(Gt)){for(var rr="[",ir=0,wr=Gt;ir<wr.length;ir+=1){var Xr=wr[ir];rr+=a(Xr)+","}return rr+"]"}for(var ti=Object.keys(Gt).sort(),$r="{",Ri=0;Ri<ti.length;Ri++)$r+=JSON.stringify(ti[Ri])+":"+a(Gt[ti[Ri]])+",";return $r+"}"}function o(Gt){for(var wt="",rr=0,ir=i.refProperties;rr<ir.length;rr+=1){var wr=ir[rr];wt+="/"+a(Gt[wr])}return wt}function s(Gt,wt){for(var rr={},ir=0;ir<Gt.length;ir++){var wr=wt&&wt[Gt[ir].id]||o(Gt[ir]);wt&&(wt[Gt[ir].id]=wr);var Xr=rr[wr];Xr||(Xr=rr[wr]=[]),Xr.push(Gt[ir])}var ti=[];for(var $r in rr)ti.push(rr[$r]);return ti}var l=function(wt){this.keyCache={},wt&&this.replace(wt)};l.prototype.replace=function(wt){this._layerConfigs={},this._layers={},this.update(wt,[])},l.prototype.update=function(wt,rr){for(var ir=this,wr=0,Xr=wt;wr<Xr.length;wr+=1){var ti=Xr[wr];this._layerConfigs[ti.id]=ti;var $r=this._layers[ti.id]=i.createStyleLayer(ti);$r._featureFilter=i.featureFilter($r.filter),this.keyCache[ti.id]&&delete this.keyCache[ti.id]}for(var Ri=0,Zi=rr;Ri<Zi.length;Ri+=1){var en=Zi[Ri];delete this.keyCache[en],delete this._layerConfigs[en],delete this._layers[en]}this.familiesBySource={};for(var fn=s(i.values(this._layerConfigs),this.keyCache),yn=0,Mn=fn;yn<Mn.length;yn+=1){var Ba=Mn[yn],ua=Ba.map(function(jn){return ir._layers[jn.id]}),ma=ua[0];if(ma.visibility!=="none"){var Wa=ma.source||"",Fa=this.familiesBySource[Wa];Fa||(Fa=this.familiesBySource[Wa]={});var Xo=ma.sourceLayer||"_geojsonTileLayer",da=Fa[Xo];da||(da=Fa[Xo]=[]),da.push(ua)}}};var u=1,c=function(wt){var rr={},ir=[];for(var wr in wt){var Xr=wt[wr],ti=rr[wr]={};for(var $r in Xr){var Ri=Xr[+$r];if(!(!Ri||Ri.bitmap.width===0||Ri.bitmap.height===0)){var Zi={x:0,y:0,w:Ri.bitmap.width+2*u,h:Ri.bitmap.height+2*u};ir.push(Zi),ti[$r]={rect:Zi,metrics:Ri.metrics}}}}var en=i.potpack(ir),fn=en.w,yn=en.h,Mn=new i.AlphaImage({width:fn||1,height:yn||1});for(var Ba in wt){var ua=wt[Ba];for(var ma in ua){var Wa=ua[+ma];if(!(!Wa||Wa.bitmap.width===0||Wa.bitmap.height===0)){var Fa=rr[Ba][ma].rect;i.AlphaImage.copy(Wa.bitmap,Mn,{x:0,y:0},{x:Fa.x+u,y:Fa.y+u},Wa.bitmap)}}}this.image=Mn,this.positions=rr};i.register("GlyphAtlas",c);var f=function(wt){this.tileID=new i.OverscaledTileID(wt.tileID.overscaledZ,wt.tileID.wrap,wt.tileID.canonical.z,wt.tileID.canonical.x,wt.tileID.canonical.y),this.uid=wt.uid,this.zoom=wt.zoom,this.pixelRatio=wt.pixelRatio,this.tileSize=wt.tileSize,this.source=wt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=wt.showCollisionBoxes,this.collectResourceTiming=!!wt.collectResourceTiming,this.returnDependencies=!!wt.returnDependencies,this.promoteId=wt.promoteId};f.prototype.parse=function(wt,rr,ir,wr,Xr){var ti=this;this.status="parsing",this.data=wt,this.collisionBoxArray=new i.CollisionBoxArray;var $r=new i.DictionaryCoder(Object.keys(wt.layers).sort()),Ri=new i.FeatureIndex(this.tileID,this.promoteId);Ri.bucketLayerIDs=[];var Zi={},en={featureIndex:Ri,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:ir},fn=rr.familiesBySource[this.source];for(var yn in fn){var Mn=wt.layers[yn];if(Mn){Mn.version===1&&i.warnOnce('Vector tile source "'+this.source+'" layer "'+yn+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var Ba=$r.encode(yn),ua=[],ma=0;ma<Mn.length;ma++){var Wa=Mn.feature(ma),Fa=Ri.getId(Wa,yn);ua.push({feature:Wa,id:Fa,index:ma,sourceLayerIndex:Ba})}for(var Xo=0,da=fn[yn];Xo<da.length;Xo+=1){var jn=da[Xo],Ha=jn[0];if(!(Ha.minzoom&&this.zoom<Math.floor(Ha.minzoom))&&!(Ha.maxzoom&&this.zoom>=Ha.maxzoom)&&Ha.visibility!=="none"){h(jn,this.zoom,ir);var vo=Zi[Ha.id]=Ha.createBucket({index:Ri.bucketLayerIDs.length,layers:jn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ba,sourceID:this.source});vo.populate(ua,en,this.tileID.canonical),Ri.bucketLayerIDs.push(jn.map(function(ki){return ki.id}))}}}}var Gn,Ct,Ar,Jr,hi=i.mapObject(en.glyphDependencies,function(ki){return Object.keys(ki).map(Number)});Object.keys(hi).length?wr.send("getGlyphs",{uid:this.uid,stacks:hi},function(ki,_n){Gn||(Gn=ki,Ct=_n,En.call(ti))}):Ct={};var hn=Object.keys(en.iconDependencies);hn.length?wr.send("getImages",{icons:hn,source:this.source,tileID:this.tileID,type:"icons"},function(ki,_n){Gn||(Gn=ki,Ar=_n,En.call(ti))}):Ar={};var Sn=Object.keys(en.patternDependencies);Sn.length?wr.send("getImages",{icons:Sn,source:this.source,tileID:this.tileID,type:"patterns"},function(ki,_n){Gn||(Gn=ki,Jr=_n,En.call(ti))}):Jr={},En.call(this);function En(){if(Gn)return Xr(Gn);if(Ct&&Ar&&Jr){var ki=new c(Ct),_n=new i.ImageAtlas(Ar,Jr);for(var ya in Zi){var ea=Zi[ya];ea instanceof i.SymbolBucket?(h(ea.layers,this.zoom,ir),i.performSymbolLayout(ea,Ct,ki.positions,Ar,_n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):ea.hasPattern&&(ea instanceof i.LineBucket||ea instanceof i.FillBucket||ea instanceof i.FillExtrusionBucket)&&(h(ea.layers,this.zoom,ir),ea.addFeatures(en,this.tileID.canonical,_n.patternPositions))}this.status="done",Xr(null,{buckets:i.values(Zi).filter(function(Ma){return!Ma.isEmpty()}),featureIndex:Ri,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ki.image,imageAtlas:_n,glyphMap:this.returnDependencies?Ct:null,iconMap:this.returnDependencies?Ar:null,glyphPositions:this.returnDependencies?ki.positions:null})}}};function h(Gt,wt,rr){for(var ir=new i.EvaluationParameters(wt),wr=0,Xr=Gt;wr<Xr.length;wr+=1){var ti=Xr[wr];ti.recalculate(ir,rr)}}function d(Gt,wt){var rr=i.getArrayBuffer(Gt.request,function(ir,wr,Xr,ti){ir?wt(ir):wr&&wt(null,{vectorTile:new i.vectorTile.VectorTile(new i.pbf(wr)),rawData:wr,cacheControl:Xr,expires:ti})});return function(){rr.cancel(),wt()}}var v=function(wt,rr,ir,wr){this.actor=wt,this.layerIndex=rr,this.availableImages=ir,this.loadVectorData=wr||d,this.loading={},this.loaded={}};v.prototype.loadTile=function(wt,rr){var ir=this,wr=wt.uid;this.loading||(this.loading={});var Xr=wt&&wt.request&&wt.request.collectResourceTiming?new i.RequestPerformance(wt.request):!1,ti=this.loading[wr]=new f(wt);ti.abort=this.loadVectorData(wt,function($r,Ri){if(delete ir.loading[wr],$r||!Ri)return ti.status="done",ir.loaded[wr]=ti,rr($r);var Zi=Ri.rawData,en={};Ri.expires&&(en.expires=Ri.expires),Ri.cacheControl&&(en.cacheControl=Ri.cacheControl);var fn={};if(Xr){var yn=Xr.finish();yn&&(fn.resourceTiming=JSON.parse(JSON.stringify(yn)))}ti.vectorTile=Ri.vectorTile,ti.parse(Ri.vectorTile,ir.layerIndex,ir.availableImages,ir.actor,function(Mn,Ba){if(Mn||!Ba)return rr(Mn);rr(null,i.extend({rawTileData:Zi.slice(0)},Ba,en,fn))}),ir.loaded=ir.loaded||{},ir.loaded[wr]=ti})},v.prototype.reloadTile=function(wt,rr){var ir=this,wr=this.loaded,Xr=wt.uid,ti=this;if(wr&&wr[Xr]){var $r=wr[Xr];$r.showCollisionBoxes=wt.showCollisionBoxes;var Ri=function(Zi,en){var fn=$r.reloadCallback;fn&&(delete $r.reloadCallback,$r.parse($r.vectorTile,ti.layerIndex,ir.availableImages,ti.actor,fn)),rr(Zi,en)};$r.status==="parsing"?$r.reloadCallback=Ri:$r.status==="done"&&($r.vectorTile?$r.parse($r.vectorTile,this.layerIndex,this.availableImages,this.actor,Ri):Ri())}},v.prototype.abortTile=function(wt,rr){var ir=this.loading,wr=wt.uid;ir&&ir[wr]&&ir[wr].abort&&(ir[wr].abort(),delete ir[wr]),rr()},v.prototype.removeTile=function(wt,rr){var ir=this.loaded,wr=wt.uid;ir&&ir[wr]&&delete ir[wr],rr()};var m=i.window.ImageBitmap,b=function(){this.loaded={}};b.prototype.loadTile=function(wt,rr){var ir=wt.uid,wr=wt.encoding,Xr=wt.rawImageData,ti=m&&Xr instanceof m?this.getImageData(Xr):Xr,$r=new i.DEMData(ir,ti,wr);this.loaded=this.loaded||{},this.loaded[ir]=$r,rr(null,$r)},b.prototype.getImageData=function(wt){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(wt.width,wt.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=wt.width,this.offscreenCanvas.height=wt.height,this.offscreenCanvasContext.drawImage(wt,0,0,wt.width,wt.height);var rr=this.offscreenCanvasContext.getImageData(-1,-1,wt.width+2,wt.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new i.RGBAImage({width:rr.width,height:rr.height},rr.data)},b.prototype.removeTile=function(wt){var rr=this.loaded,ir=wt.uid;rr&&rr[ir]&&delete rr[ir]};var p=k;function k(Gt,wt){var rr=Gt&&Gt.type,ir;if(rr==="FeatureCollection")for(ir=0;ir<Gt.features.length;ir++)k(Gt.features[ir],wt);else if(rr==="GeometryCollection")for(ir=0;ir<Gt.geometries.length;ir++)k(Gt.geometries[ir],wt);else if(rr==="Feature")k(Gt.geometry,wt);else if(rr==="Polygon")M(Gt.coordinates,wt);else if(rr==="MultiPolygon")for(ir=0;ir<Gt.coordinates.length;ir++)M(Gt.coordinates[ir],wt);return Gt}function M(Gt,wt){if(Gt.length!==0){T(Gt[0],wt);for(var rr=1;rr<Gt.length;rr++)T(Gt[rr],!wt)}}function T(Gt,wt){for(var rr=0,ir=0,wr=Gt.length,Xr=wr-1;ir<wr;Xr=ir++)rr+=(Gt[ir][0]-Gt[Xr][0])*(Gt[Xr][1]+Gt[ir][1]);rr>=0!=!!wt&&Gt.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,x=function(wt){this._feature=wt,this.extent=i.EXTENT,this.type=wt.type,this.properties=wt.tags,"id"in wt&&!isNaN(wt.id)&&(this.id=parseInt(wt.id,10))};x.prototype.loadGeometry=function(){if(this._feature.type===1){for(var wt=[],rr=0,ir=this._feature.geometry;rr<ir.length;rr+=1){var wr=ir[rr];wt.push([new i.Point$1(wr[0],wr[1])])}return wt}else{for(var Xr=[],ti=0,$r=this._feature.geometry;ti<$r.length;ti+=1){for(var Ri=$r[ti],Zi=[],en=0,fn=Ri;en<fn.length;en+=1){var yn=fn[en];Zi.push(new i.Point$1(yn[0],yn[1]))}Xr.push(Zi)}return Xr}},x.prototype.toGeoJSON=function(wt,rr,ir){return L.call(this,wt,rr,ir)};var C=function(wt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=i.EXTENT,this.length=wt.length,this._features=wt};C.prototype.feature=function(wt){return new x(this._features[wt])};var S=i.vectorTile.VectorTileFeature,g=P;function P(Gt,wt){this.options=wt||{},this.features=Gt,this.length=Gt.length}P.prototype.feature=function(Gt){return new E(this.features[Gt],this.options.extent)};function E(Gt,wt){this.id=typeof Gt.id=="number"?Gt.id:void 0,this.type=Gt.type,this.rawGeometry=Gt.type===1?[Gt.geometry]:Gt.geometry,this.properties=Gt.tags,this.extent=wt||4096}E.prototype.loadGeometry=function(){var Gt=this.rawGeometry;this.geometry=[];for(var wt=0;wt<Gt.length;wt++){for(var rr=Gt[wt],ir=[],wr=0;wr<rr.length;wr++)ir.push(new i.Point$1(rr[wr][0],rr[wr][1]));this.geometry.push(ir)}return this.geometry},E.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Gt=this.geometry,wt=1/0,rr=-1/0,ir=1/0,wr=-1/0,Xr=0;Xr<Gt.length;Xr++)for(var ti=Gt[Xr],$r=0;$r<ti.length;$r++){var Ri=ti[$r];wt=Math.min(wt,Ri.x),rr=Math.max(rr,Ri.x),ir=Math.min(ir,Ri.y),wr=Math.max(wr,Ri.y)}return[wt,ir,rr,wr]},E.prototype.toGeoJSON=S.prototype.toGeoJSON;var z=Z,q=Z,U=j,G=g;function Z(Gt){var wt=new i.pbf;return N(Gt,wt),wt.finish()}function j(Gt,wt){wt=wt||{};var rr={};for(var ir in Gt)rr[ir]=new g(Gt[ir].features,wt),rr[ir].name=ir,rr[ir].version=wt.version,rr[ir].extent=wt.extent;return Z({layers:rr})}function N(Gt,wt){for(var rr in Gt.layers)wt.writeMessage(3,H,Gt.layers[rr])}function H(Gt,wt){wt.writeVarintField(15,Gt.version||1),wt.writeStringField(1,Gt.name||""),wt.writeVarintField(5,Gt.extent||4096);var rr,ir={keys:[],values:[],keycache:{},valuecache:{}};for(rr=0;rr<Gt.length;rr++)ir.feature=Gt.feature(rr),wt.writeMessage(2,re,ir);var wr=ir.keys;for(rr=0;rr<wr.length;rr++)wt.writeStringField(3,wr[rr]);var Xr=ir.values;for(rr=0;rr<Xr.length;rr++)wt.writeMessage(4,ge,Xr[rr])}function re(Gt,wt){var rr=Gt.feature;rr.id!==void 0&&wt.writeVarintField(1,rr.id),wt.writeMessage(2,oe,Gt),wt.writeVarintField(3,rr.type),wt.writeMessage(4,Ce,rr)}function oe(Gt,wt){var rr=Gt.feature,ir=Gt.keys,wr=Gt.values,Xr=Gt.keycache,ti=Gt.valuecache;for(var $r in rr.properties){var Ri=Xr[$r];typeof Ri=="undefined"&&(ir.push($r),Ri=ir.length-1,Xr[$r]=Ri),wt.writeVarint(Ri);var Zi=rr.properties[$r],en=typeof Zi;en!=="string"&&en!=="boolean"&&en!=="number"&&(Zi=JSON.stringify(Zi));var fn=en+":"+Zi,yn=ti[fn];typeof yn=="undefined"&&(wr.push(Zi),yn=wr.length-1,ti[fn]=yn),wt.writeVarint(yn)}}function _e(Gt,wt){return(wt<<3)+(Gt&7)}function ke(Gt){return Gt<<1^Gt>>31}function Ce(Gt,wt){for(var rr=Gt.loadGeometry(),ir=Gt.type,wr=0,Xr=0,ti=rr.length,$r=0;$r<ti;$r++){var Ri=rr[$r],Zi=1;ir===1&&(Zi=Ri.length),wt.writeVarint(_e(1,Zi));for(var en=ir===3?Ri.length-1:Ri.length,fn=0;fn<en;fn++){fn===1&&ir!==1&&wt.writeVarint(_e(2,en-1));var yn=Ri[fn].x-wr,Mn=Ri[fn].y-Xr;wt.writeVarint(ke(yn)),wt.writeVarint(ke(Mn)),wr+=yn,Xr+=Mn}ir===3&&wt.writeVarint(_e(7,1))}}function ge(Gt,wt){var rr=typeof Gt;rr==="string"?wt.writeStringField(1,Gt):rr==="boolean"?wt.writeBooleanField(7,Gt):rr==="number"&&(Gt%1!==0?wt.writeDoubleField(3,Gt):Gt<0?wt.writeSVarintField(6,Gt):wt.writeVarintField(5,Gt))}z.fromVectorTileJs=q,z.fromGeojsonVt=U,z.GeoJSONWrapper=G;function ie(Gt,wt,rr,ir,wr,Xr){if(!(wr-ir<=rr)){var ti=ir+wr>>1;Se(Gt,wt,ti,ir,wr,Xr%2),ie(Gt,wt,rr,ir,ti-1,Xr+1),ie(Gt,wt,rr,ti+1,wr,Xr+1)}}function Se(Gt,wt,rr,ir,wr,Xr){for(;wr>ir;){if(wr-ir>600){var ti=wr-ir+1,$r=rr-ir+1,Ri=Math.log(ti),Zi=.5*Math.exp(2*Ri/3),en=.5*Math.sqrt(Ri*Zi*(ti-Zi)/ti)*($r-ti/2<0?-1:1),fn=Math.max(ir,Math.floor(rr-$r*Zi/ti+en)),yn=Math.min(wr,Math.floor(rr+(ti-$r)*Zi/ti+en));Se(Gt,wt,rr,fn,yn,Xr)}var Mn=wt[2*rr+Xr],Ba=ir,ua=wr;for(Ee(Gt,wt,ir,rr),wt[2*wr+Xr]>Mn&&Ee(Gt,wt,ir,wr);Ba<ua;){for(Ee(Gt,wt,Ba,ua),Ba++,ua--;wt[2*Ba+Xr]<Mn;)Ba++;for(;wt[2*ua+Xr]>Mn;)ua--}wt[2*ir+Xr]===Mn?Ee(Gt,wt,ir,ua):(ua++,Ee(Gt,wt,ua,wr)),ua<=rr&&(ir=ua+1),rr<=ua&&(wr=ua-1)}}function Ee(Gt,wt,rr,ir){we(Gt,rr,ir),we(wt,2*rr,2*ir),we(wt,2*rr+1,2*ir+1)}function we(Gt,wt,rr){var ir=Gt[wt];Gt[wt]=Gt[rr],Gt[rr]=ir}function De(Gt,wt,rr,ir,wr,Xr,ti){for(var $r=[0,Gt.length-1,0],Ri=[],Zi,en;$r.length;){var fn=$r.pop(),yn=$r.pop(),Mn=$r.pop();if(yn-Mn<=ti){for(var Ba=Mn;Ba<=yn;Ba++)Zi=wt[2*Ba],en=wt[2*Ba+1],Zi>=rr&&Zi<=wr&&en>=ir&&en<=Xr&&Ri.push(Gt[Ba]);continue}var ua=Math.floor((Mn+yn)/2);Zi=wt[2*ua],en=wt[2*ua+1],Zi>=rr&&Zi<=wr&&en>=ir&&en<=Xr&&Ri.push(Gt[ua]);var ma=(fn+1)%2;(fn===0?rr<=Zi:ir<=en)&&($r.push(Mn),$r.push(ua-1),$r.push(ma)),(fn===0?wr>=Zi:Xr>=en)&&($r.push(ua+1),$r.push(yn),$r.push(ma))}return Ri}function Le(Gt,wt,rr,ir,wr,Xr){for(var ti=[0,Gt.length-1,0],$r=[],Ri=wr*wr;ti.length;){var Zi=ti.pop(),en=ti.pop(),fn=ti.pop();if(en-fn<=Xr){for(var yn=fn;yn<=en;yn++)me(wt[2*yn],wt[2*yn+1],rr,ir)<=Ri&&$r.push(Gt[yn]);continue}var Mn=Math.floor((fn+en)/2),Ba=wt[2*Mn],ua=wt[2*Mn+1];me(Ba,ua,rr,ir)<=Ri&&$r.push(Gt[Mn]);var ma=(Zi+1)%2;(Zi===0?rr-wr<=Ba:ir-wr<=ua)&&(ti.push(fn),ti.push(Mn-1),ti.push(ma)),(Zi===0?rr+wr>=Ba:ir+wr>=ua)&&(ti.push(Mn+1),ti.push(en),ti.push(ma))}return $r}function me(Gt,wt,rr,ir){var wr=Gt-rr,Xr=wt-ir;return wr*wr+Xr*Xr}var Pe=function(Gt){return Gt[0]},ce=function(Gt){return Gt[1]},He=function(wt,rr,ir,wr,Xr){rr===void 0&&(rr=Pe),ir===void 0&&(ir=ce),wr===void 0&&(wr=64),Xr===void 0&&(Xr=Float64Array),this.nodeSize=wr,this.points=wt;for(var ti=wt.length<65536?Uint16Array:Uint32Array,$r=this.ids=new ti(wt.length),Ri=this.coords=new Xr(wt.length*2),Zi=0;Zi<wt.length;Zi++)$r[Zi]=Zi,Ri[2*Zi]=rr(wt[Zi]),Ri[2*Zi+1]=ir(wt[Zi]);ie($r,Ri,wr,0,$r.length-1,0)};He.prototype.range=function(wt,rr,ir,wr){return De(this.ids,this.coords,wt,rr,ir,wr,this.nodeSize)},He.prototype.within=function(wt,rr,ir){return Le(this.ids,this.coords,wt,rr,ir,this.nodeSize)};var lt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Gt){return Gt}},mt=function(wt){this.options=Ue(Object.create(lt),wt),this.trees=new Array(this.options.maxZoom+1)};mt.prototype.load=function(wt){var rr=this.options,ir=rr.log,wr=rr.minZoom,Xr=rr.maxZoom,ti=rr.nodeSize;ir&&console.time("total time");var $r="prepare "+wt.length+" points";ir&&console.time($r),this.points=wt;for(var Ri=[],Zi=0;Zi<wt.length;Zi++)wt[Zi].geometry&&Ri.push(st(wt[Zi],Zi));this.trees[Xr+1]=new He(Ri,Ae,rt,ti,Float32Array),ir&&console.timeEnd($r);for(var en=Xr;en>=wr;en--){var fn=+Date.now();Ri=this._cluster(Ri,en),this.trees[en]=new He(Ri,Ae,rt,ti,Float32Array),ir&&console.log("z%d: %d clusters in %dms",en,Ri.length,+Date.now()-fn)}return ir&&console.timeEnd("total time"),this},mt.prototype.getClusters=function(wt,rr){var ir=((wt[0]+180)%360+360)%360-180,wr=Math.max(-90,Math.min(90,wt[1])),Xr=wt[2]===180?180:((wt[2]+180)%360+360)%360-180,ti=Math.max(-90,Math.min(90,wt[3]));if(wt[2]-wt[0]>=360)ir=-180,Xr=180;else if(ir>Xr){var $r=this.getClusters([ir,wr,180,ti],rr),Ri=this.getClusters([-180,wr,Xr,ti],rr);return $r.concat(Ri)}for(var Zi=this.trees[this._limitZoom(rr)],en=Zi.range(Ht(ir),nr(ti),Ht(Xr),nr(wr)),fn=[],yn=0,Mn=en;yn<Mn.length;yn+=1){var Ba=Mn[yn],ua=Zi.points[Ba];fn.push(ua.numPoints?ct(ua):this.points[ua.index])}return fn},mt.prototype.getChildren=function(wt){var rr=this._getOriginId(wt),ir=this._getOriginZoom(wt),wr="No cluster with the specified id.",Xr=this.trees[ir];if(!Xr)throw new Error(wr);var ti=Xr.points[rr];if(!ti)throw new Error(wr);for(var $r=this.options.radius/(this.options.extent*Math.pow(2,ir-1)),Ri=Xr.within(ti.x,ti.y,$r),Zi=[],en=0,fn=Ri;en<fn.length;en+=1){var yn=fn[en],Mn=Xr.points[yn];Mn.parentId===wt&&Zi.push(Mn.numPoints?ct(Mn):this.points[Mn.index])}if(Zi.length===0)throw new Error(wr);return Zi},mt.prototype.getLeaves=function(wt,rr,ir){rr=rr||10,ir=ir||0;var wr=[];return this._appendLeaves(wr,wt,rr,ir,0),wr},mt.prototype.getTile=function(wt,rr,ir){var wr=this.trees[this._limitZoom(wt)],Xr=Math.pow(2,wt),ti=this.options,$r=ti.extent,Ri=ti.radius,Zi=Ri/$r,en=(ir-Zi)/Xr,fn=(ir+1+Zi)/Xr,yn={features:[]};return this._addTileFeatures(wr.range((rr-Zi)/Xr,en,(rr+1+Zi)/Xr,fn),wr.points,rr,ir,Xr,yn),rr===0&&this._addTileFeatures(wr.range(1-Zi/Xr,en,1,fn),wr.points,Xr,ir,Xr,yn),rr===Xr-1&&this._addTileFeatures(wr.range(0,en,Zi/Xr,fn),wr.points,-1,ir,Xr,yn),yn.features.length?yn:null},mt.prototype.getClusterExpansionZoom=function(wt){for(var rr=this._getOriginZoom(wt)-1;rr<=this.options.maxZoom;){var ir=this.getChildren(wt);if(rr++,ir.length!==1)break;wt=ir[0].properties.cluster_id}return rr},mt.prototype._appendLeaves=function(wt,rr,ir,wr,Xr){for(var ti=this.getChildren(rr),$r=0,Ri=ti;$r<Ri.length;$r+=1){var Zi=Ri[$r],en=Zi.properties;if(en&&en.cluster?Xr+en.point_count<=wr?Xr+=en.point_count:Xr=this._appendLeaves(wt,en.cluster_id,ir,wr,Xr):Xr<wr?Xr++:wt.push(Zi),wt.length===ir)break}return Xr},mt.prototype._addTileFeatures=function(wt,rr,ir,wr,Xr,ti){for(var $r=0,Ri=wt;$r<Ri.length;$r+=1){var Zi=Ri[$r],en=rr[Zi],fn=en.numPoints,yn={type:1,geometry:[[Math.round(this.options.extent*(en.x*Xr-ir)),Math.round(this.options.extent*(en.y*Xr-wr))]],tags:fn?Qt(en):this.points[en.index].properties},Mn=void 0;fn?Mn=en.id:this.options.generateId?Mn=en.index:this.points[en.index].id&&(Mn=this.points[en.index].id),Mn!==void 0&&(yn.id=Mn),ti.features.push(yn)}},mt.prototype._limitZoom=function(wt){return Math.max(this.options.minZoom,Math.min(+wt,this.options.maxZoom+1))},mt.prototype._cluster=function(wt,rr){for(var ir=[],wr=this.options,Xr=wr.radius,ti=wr.extent,$r=wr.reduce,Ri=wr.minPoints,Zi=Xr/(ti*Math.pow(2,rr)),en=0;en<wt.length;en++){var fn=wt[en];if(!(fn.zoom<=rr)){fn.zoom=rr;for(var yn=this.trees[rr+1],Mn=yn.within(fn.x,fn.y,Zi),Ba=fn.numPoints||1,ua=Ba,ma=0,Wa=Mn;ma<Wa.length;ma+=1){var Fa=Wa[ma],Xo=yn.points[Fa];Xo.zoom>rr&&(ua+=Xo.numPoints||1)}if(ua>=Ri){for(var da=fn.x*Ba,jn=fn.y*Ba,Ha=$r&&Ba>1?this._map(fn,!0):null,vo=(en<<5)+(rr+1)+this.points.length,Gn=0,Ct=Mn;Gn<Ct.length;Gn+=1){var Ar=Ct[Gn],Jr=yn.points[Ar];if(!(Jr.zoom<=rr)){Jr.zoom=rr;var hi=Jr.numPoints||1;da+=Jr.x*hi,jn+=Jr.y*hi,Jr.parentId=vo,$r&&(Ha||(Ha=this._map(fn,!0)),$r(Ha,this._map(Jr)))}}fn.parentId=vo,ir.push(Vt(da/ua,jn/ua,vo,ua,Ha))}else if(ir.push(fn),ua>1)for(var hn=0,Sn=Mn;hn<Sn.length;hn+=1){var En=Sn[hn],ki=yn.points[En];ki.zoom<=rr||(ki.zoom=rr,ir.push(ki))}}}return ir},mt.prototype._getOriginId=function(wt){return wt-this.points.length>>5},mt.prototype._getOriginZoom=function(wt){return(wt-this.points.length)%32},mt.prototype._map=function(wt,rr){if(wt.numPoints)return rr?Ue({},wt.properties):wt.properties;var ir=this.points[wt.index].properties,wr=this.options.map(ir);return rr&&wr===ir?Ue({},wr):wr};function Vt(Gt,wt,rr,ir,wr){return{x:Gt,y:wt,zoom:1/0,id:rr,parentId:-1,numPoints:ir,properties:wr}}function st(Gt,wt){var rr=Gt.geometry.coordinates,ir=rr[0],wr=rr[1];return{x:Ht(ir),y:nr(wr),zoom:1/0,index:wt,parentId:-1}}function ct(Gt){return{type:"Feature",id:Gt.id,properties:Qt(Gt),geometry:{type:"Point",coordinates:[tt(Gt.x),je(Gt.y)]}}}function Qt(Gt){var wt=Gt.numPoints,rr=wt>=1e4?Math.round(wt/1e3)+"k":wt>=1e3?Math.round(wt/100)/10+"k":wt;return Ue(Ue({},Gt.properties),{cluster:!0,cluster_id:Gt.id,point_count:wt,point_count_abbreviated:rr})}function Ht(Gt){return Gt/360+.5}function nr(Gt){var wt=Math.sin(Gt*Math.PI/180),rr=.5-.25*Math.log((1+wt)/(1-wt))/Math.PI;return rr<0?0:rr>1?1:rr}function tt(Gt){return(Gt-.5)*360}function je(Gt){var wt=(180-Gt*360)*Math.PI/180;return 360*Math.atan(Math.exp(wt))/Math.PI-90}function Ue(Gt,wt){for(var rr in wt)Gt[rr]=wt[rr];return Gt}function Ae(Gt){return Gt.x}function rt(Gt){return Gt.y}function St(Gt,wt,rr,ir){for(var wr=ir,Xr=rr-wt>>1,ti=rr-wt,$r,Ri=Gt[wt],Zi=Gt[wt+1],en=Gt[rr],fn=Gt[rr+1],yn=wt+3;yn<rr;yn+=3){var Mn=Tt(Gt[yn],Gt[yn+1],Ri,Zi,en,fn);if(Mn>wr)$r=yn,wr=Mn;else if(Mn===wr){var Ba=Math.abs(yn-Xr);Ba<ti&&($r=yn,ti=Ba)}}wr>ir&&($r-wt>3&&St(Gt,wt,$r,ir),Gt[$r+2]=wr,rr-$r>3&&St(Gt,$r,rr,ir))}function Tt(Gt,wt,rr,ir,wr,Xr){var ti=wr-rr,$r=Xr-ir;if(ti!==0||$r!==0){var Ri=((Gt-rr)*ti+(wt-ir)*$r)/(ti*ti+$r*$r);Ri>1?(rr=wr,ir=Xr):Ri>0&&(rr+=ti*Ri,ir+=$r*Ri)}return ti=Gt-rr,$r=wt-ir,ti*ti+$r*$r}function dt(Gt,wt,rr,ir){var wr={id:typeof Gt=="undefined"?null:Gt,type:wt,geometry:rr,tags:ir,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Et(wr),wr}function Et(Gt){var wt=Gt.geometry,rr=Gt.type;if(rr==="Point"||rr==="MultiPoint"||rr==="LineString")pt(Gt,wt);else if(rr==="Polygon"||rr==="MultiLineString")for(var ir=0;ir<wt.length;ir++)pt(Gt,wt[ir]);else if(rr==="MultiPolygon")for(ir=0;ir<wt.length;ir++)for(var wr=0;wr<wt[ir].length;wr++)pt(Gt,wt[ir][wr])}function pt(Gt,wt){for(var rr=0;rr<wt.length;rr+=3)Gt.minX=Math.min(Gt.minX,wt[rr]),Gt.minY=Math.min(Gt.minY,wt[rr+1]),Gt.maxX=Math.max(Gt.maxX,wt[rr]),Gt.maxY=Math.max(Gt.maxY,wt[rr+1])}function Xt(Gt,wt){var rr=[];if(Gt.type==="FeatureCollection")for(var ir=0;ir<Gt.features.length;ir++)or(rr,Gt.features[ir],wt,ir);else Gt.type==="Feature"?or(rr,Gt,wt):or(rr,{geometry:Gt},wt);return rr}function or(Gt,wt,rr,ir){if(wt.geometry){var wr=wt.geometry.coordinates,Xr=wt.geometry.type,ti=Math.pow(rr.tolerance/((1<<rr.maxZoom)*rr.extent),2),$r=[],Ri=wt.id;if(rr.promoteId?Ri=wt.properties[rr.promoteId]:rr.generateId&&(Ri=ir||0),Xr==="Point")_r(wr,$r);else if(Xr==="MultiPoint")for(var Zi=0;Zi<wr.length;Zi++)_r(wr[Zi],$r);else if(Xr==="LineString")Er(wr,$r,ti,!1);else if(Xr==="MultiLineString")if(rr.lineMetrics){for(Zi=0;Zi<wr.length;Zi++)$r=[],Er(wr[Zi],$r,ti,!1),Gt.push(dt(Ri,"LineString",$r,wt.properties));return}else ei(wr,$r,ti,!1);else if(Xr==="Polygon")ei(wr,$r,ti,!0);else if(Xr==="MultiPolygon")for(Zi=0;Zi<wr.length;Zi++){var en=[];ei(wr[Zi],en,ti,!0),$r.push(en)}else if(Xr==="GeometryCollection"){for(Zi=0;Zi<wt.geometry.geometries.length;Zi++)or(Gt,{id:Ri,geometry:wt.geometry.geometries[Zi],properties:wt.properties},rr,ir);return}else throw new Error("Input data is not a valid GeoJSON object.");Gt.push(dt(Ri,Xr,$r,wt.properties))}}function _r(Gt,wt){wt.push(qr(Gt[0])),wt.push(jr(Gt[1])),wt.push(0)}function Er(Gt,wt,rr,ir){for(var wr,Xr,ti=0,$r=0;$r<Gt.length;$r++){var Ri=qr(Gt[$r][0]),Zi=jr(Gt[$r][1]);wt.push(Ri),wt.push(Zi),wt.push(0),$r>0&&(ir?ti+=(wr*Zi-Ri*Xr)/2:ti+=Math.sqrt(Math.pow(Ri-wr,2)+Math.pow(Zi-Xr,2))),wr=Ri,Xr=Zi}var en=wt.length-3;wt[2]=1,St(wt,0,en,rr),wt[en+2]=1,wt.size=Math.abs(ti),wt.start=0,wt.end=wt.size}function ei(Gt,wt,rr,ir){for(var wr=0;wr<Gt.length;wr++){var Xr=[];Er(Gt[wr],Xr,rr,ir),wt.push(Xr)}}function qr(Gt){return Gt/360+.5}function jr(Gt){var wt=Math.sin(Gt*Math.PI/180),rr=.5-.25*Math.log((1+wt)/(1-wt))/Math.PI;return rr<0?0:rr>1?1:rr}function gt(Gt,wt,rr,ir,wr,Xr,ti,$r){if(rr/=wt,ir/=wt,Xr>=rr&&ti<ir)return Gt;if(ti<rr||Xr>=ir)return null;for(var Ri=[],Zi=0;Zi<Gt.length;Zi++){var en=Gt[Zi],fn=en.geometry,yn=en.type,Mn=wr===0?en.minX:en.minY,Ba=wr===0?en.maxX:en.maxY;if(Mn>=rr&&Ba<ir){Ri.push(en);continue}else if(Ba<rr||Mn>=ir)continue;var ua=[];if(yn==="Point"||yn==="MultiPoint")Ge(fn,ua,rr,ir,wr);else if(yn==="LineString")Je(fn,ua,rr,ir,wr,!1,$r.lineMetrics);else if(yn==="MultiLineString")et(fn,ua,rr,ir,wr,!1);else if(yn==="Polygon")et(fn,ua,rr,ir,wr,!0);else if(yn==="MultiPolygon")for(var ma=0;ma<fn.length;ma++){var Wa=[];et(fn[ma],Wa,rr,ir,wr,!0),Wa.length&&ua.push(Wa)}if(ua.length){if($r.lineMetrics&&yn==="LineString"){for(ma=0;ma<ua.length;ma++)Ri.push(dt(en.id,yn,ua[ma],en.tags));continue}(yn==="LineString"||yn==="MultiLineString")&&(ua.length===1?(yn="LineString",ua=ua[0]):yn="MultiLineString"),(yn==="Point"||yn==="MultiPoint")&&(yn=ua.length===3?"Point":"MultiPoint"),Ri.push(dt(en.id,yn,ua,en.tags))}}return Ri.length?Ri:null}function Ge(Gt,wt,rr,ir,wr){for(var Xr=0;Xr<Gt.length;Xr+=3){var ti=Gt[Xr+wr];ti>=rr&&ti<=ir&&(wt.push(Gt[Xr]),wt.push(Gt[Xr+1]),wt.push(Gt[Xr+2]))}}function Je(Gt,wt,rr,ir,wr,Xr,ti){for(var $r=We(Gt),Ri=wr===0?At:Kt,Zi=Gt.start,en,fn,yn=0;yn<Gt.length-3;yn+=3){var Mn=Gt[yn],Ba=Gt[yn+1],ua=Gt[yn+2],ma=Gt[yn+3],Wa=Gt[yn+4],Fa=wr===0?Mn:Ba,Xo=wr===0?ma:Wa,da=!1;ti&&(en=Math.sqrt(Math.pow(Mn-ma,2)+Math.pow(Ba-Wa,2))),Fa<rr?Xo>rr&&(fn=Ri($r,Mn,Ba,ma,Wa,rr),ti&&($r.start=Zi+en*fn)):Fa>ir?Xo<ir&&(fn=Ri($r,Mn,Ba,ma,Wa,ir),ti&&($r.start=Zi+en*fn)):xt($r,Mn,Ba,ua),Xo<rr&&Fa>=rr&&(fn=Ri($r,Mn,Ba,ma,Wa,rr),da=!0),Xo>ir&&Fa<=ir&&(fn=Ri($r,Mn,Ba,ma,Wa,ir),da=!0),!Xr&&da&&(ti&&($r.end=Zi+en*fn),wt.push($r),$r=We(Gt)),ti&&(Zi+=en)}var jn=Gt.length-3;Mn=Gt[jn],Ba=Gt[jn+1],ua=Gt[jn+2],Fa=wr===0?Mn:Ba,Fa>=rr&&Fa<=ir&&xt($r,Mn,Ba,ua),jn=$r.length-3,Xr&&jn>=3&&($r[jn]!==$r[0]||$r[jn+1]!==$r[1])&&xt($r,$r[0],$r[1],$r[2]),$r.length&&wt.push($r)}function We(Gt){var wt=[];return wt.size=Gt.size,wt.start=Gt.start,wt.end=Gt.end,wt}function et(Gt,wt,rr,ir,wr,Xr){for(var ti=0;ti<Gt.length;ti++)Je(Gt[ti],wt,rr,ir,wr,Xr,!1)}function xt(Gt,wt,rr,ir){Gt.push(wt),Gt.push(rr),Gt.push(ir)}function At(Gt,wt,rr,ir,wr,Xr){var ti=(Xr-wt)/(ir-wt);return Gt.push(Xr),Gt.push(rr+(wr-rr)*ti),Gt.push(1),ti}function Kt(Gt,wt,rr,ir,wr,Xr){var ti=(Xr-rr)/(wr-rr);return Gt.push(wt+(ir-wt)*ti),Gt.push(Xr),Gt.push(1),ti}function er(Gt,wt){var rr=wt.buffer/wt.extent,ir=Gt,wr=gt(Gt,1,-1-rr,rr,0,-1,2,wt),Xr=gt(Gt,1,1-rr,2+rr,0,-1,2,wt);return(wr||Xr)&&(ir=gt(Gt,1,-rr,1+rr,0,-1,2,wt)||[],wr&&(ir=Sr(wr,1).concat(ir)),Xr&&(ir=ir.concat(Sr(Xr,-1)))),ir}function Sr(Gt,wt){for(var rr=[],ir=0;ir<Gt.length;ir++){var wr=Gt[ir],Xr=wr.type,ti;if(Xr==="Point"||Xr==="MultiPoint"||Xr==="LineString")ti=Gr(wr.geometry,wt);else if(Xr==="MultiLineString"||Xr==="Polygon"){ti=[];for(var $r=0;$r<wr.geometry.length;$r++)ti.push(Gr(wr.geometry[$r],wt))}else if(Xr==="MultiPolygon")for(ti=[],$r=0;$r<wr.geometry.length;$r++){for(var Ri=[],Zi=0;Zi<wr.geometry[$r].length;Zi++)Ri.push(Gr(wr.geometry[$r][Zi],wt));ti.push(Ri)}rr.push(dt(wr.id,Xr,ti,wr.tags))}return rr}function Gr(Gt,wt){var rr=[];rr.size=Gt.size,Gt.start!==void 0&&(rr.start=Gt.start,rr.end=Gt.end);for(var ir=0;ir<Gt.length;ir+=3)rr.push(Gt[ir]+wt,Gt[ir+1],Gt[ir+2]);return rr}function Ir(Gt,wt){if(Gt.transformed)return Gt;var rr=1<<Gt.z,ir=Gt.x,wr=Gt.y,Xr,ti,$r;for(Xr=0;Xr<Gt.features.length;Xr++){var Ri=Gt.features[Xr],Zi=Ri.geometry,en=Ri.type;if(Ri.geometry=[],en===1)for(ti=0;ti<Zi.length;ti+=2)Ri.geometry.push(Yr(Zi[ti],Zi[ti+1],wt,rr,ir,wr));else for(ti=0;ti<Zi.length;ti++){var fn=[];for($r=0;$r<Zi[ti].length;$r+=2)fn.push(Yr(Zi[ti][$r],Zi[ti][$r+1],wt,rr,ir,wr));Ri.geometry.push(fn)}}return Gt.transformed=!0,Gt}function Yr(Gt,wt,rr,ir,wr,Xr){return[Math.round(rr*(Gt*ir-wr)),Math.round(rr*(wt*ir-Xr))]}function _i(Gt,wt,rr,ir,wr){for(var Xr=wt===wr.maxZoom?0:wr.tolerance/((1<<wt)*wr.extent),ti={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:rr,y:ir,z:wt,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},$r=0;$r<Gt.length;$r++){ti.numFeatures++,Pi(ti,Gt[$r],Xr,wr);var Ri=Gt[$r].minX,Zi=Gt[$r].minY,en=Gt[$r].maxX,fn=Gt[$r].maxY;Ri<ti.minX&&(ti.minX=Ri),Zi<ti.minY&&(ti.minY=Zi),en>ti.maxX&&(ti.maxX=en),fn>ti.maxY&&(ti.maxY=fn)}return ti}function Pi(Gt,wt,rr,ir){var wr=wt.geometry,Xr=wt.type,ti=[];if(Xr==="Point"||Xr==="MultiPoint")for(var $r=0;$r<wr.length;$r+=3)ti.push(wr[$r]),ti.push(wr[$r+1]),Gt.numPoints++,Gt.numSimplified++;else if(Xr==="LineString")ai(ti,wr,Gt,rr,!1,!1);else if(Xr==="MultiLineString"||Xr==="Polygon")for($r=0;$r<wr.length;$r++)ai(ti,wr[$r],Gt,rr,Xr==="Polygon",$r===0);else if(Xr==="MultiPolygon")for(var Ri=0;Ri<wr.length;Ri++){var Zi=wr[Ri];for($r=0;$r<Zi.length;$r++)ai(ti,Zi[$r],Gt,rr,!0,$r===0)}if(ti.length){var en=wt.tags||null;if(Xr==="LineString"&&ir.lineMetrics){en={};for(var fn in wt.tags)en[fn]=wt.tags[fn];en.mapbox_clip_start=wr.start/wr.size,en.mapbox_clip_end=wr.end/wr.size}var yn={geometry:ti,type:Xr==="Polygon"||Xr==="MultiPolygon"?3:Xr==="LineString"||Xr==="MultiLineString"?2:1,tags:en};wt.id!==null&&(yn.id=wt.id),Gt.features.push(yn)}}function ai(Gt,wt,rr,ir,wr,Xr){var ti=ir*ir;if(ir>0&&wt.size<(wr?ti:ir)){rr.numPoints+=wt.length/3;return}for(var $r=[],Ri=0;Ri<wt.length;Ri+=3)(ir===0||wt[Ri+2]>ti)&&(rr.numSimplified++,$r.push(wt[Ri]),$r.push(wt[Ri+1])),rr.numPoints++;wr&&mi($r,Xr),Gt.push($r)}function mi(Gt,wt){for(var rr=0,ir=0,wr=Gt.length,Xr=wr-2;ir<wr;Xr=ir,ir+=2)rr+=(Gt[ir]-Gt[Xr])*(Gt[ir+1]+Gt[Xr+1]);if(rr>0===wt)for(ir=0,wr=Gt.length;ir<wr/2;ir+=2){var ti=Gt[ir],$r=Gt[ir+1];Gt[ir]=Gt[wr-2-ir],Gt[ir+1]=Gt[wr-1-ir],Gt[wr-2-ir]=ti,Gt[wr-1-ir]=$r}}function un(Gt,wt){return new Fn(Gt,wt)}function Fn(Gt,wt){wt=this.options=Hn(Object.create(this.options),wt);var rr=wt.debug;if(rr&&console.time("preprocess data"),wt.maxZoom<0||wt.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(wt.promoteId&&wt.generateId)throw new Error("promoteId and generateId cannot be used together.");var ir=Xt(Gt,wt);this.tiles={},this.tileCoords=[],rr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",wt.indexMaxZoom,wt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),ir=er(ir,wt),ir.length&&this.splitTile(ir,0,0,0),rr&&(ir.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)))}Fn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Fn.prototype.splitTile=function(Gt,wt,rr,ir,wr,Xr,ti){for(var $r=[Gt,wt,rr,ir],Ri=this.options,Zi=Ri.debug;$r.length;){ir=$r.pop(),rr=$r.pop(),wt=$r.pop(),Gt=$r.pop();var en=1<<wt,fn=An(wt,rr,ir),yn=this.tiles[fn];if(!yn&&(Zi>1&&console.time("creation"),yn=this.tiles[fn]=_i(Gt,wt,rr,ir,Ri),this.tileCoords.push({z:wt,x:rr,y:ir}),Zi)){Zi>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",wt,rr,ir,yn.numFeatures,yn.numPoints,yn.numSimplified),console.timeEnd("creation"));var Mn="z"+wt;this.stats[Mn]=(this.stats[Mn]||0)+1,this.total++}if(yn.source=Gt,wr){if(wt===Ri.maxZoom||wt===wr)continue;var Ba=1<<wr-wt;if(rr!==Math.floor(Xr/Ba)||ir!==Math.floor(ti/Ba))continue}else if(wt===Ri.indexMaxZoom||yn.numPoints<=Ri.indexMaxPoints)continue;if(yn.source=null,Gt.length!==0){Zi>1&&console.time("clipping");var ua=.5*Ri.buffer/Ri.extent,ma=.5-ua,Wa=.5+ua,Fa=1+ua,Xo,da,jn,Ha,vo,Gn;Xo=da=jn=Ha=null,vo=gt(Gt,en,rr-ua,rr+Wa,0,yn.minX,yn.maxX,Ri),Gn=gt(Gt,en,rr+ma,rr+Fa,0,yn.minX,yn.maxX,Ri),Gt=null,vo&&(Xo=gt(vo,en,ir-ua,ir+Wa,1,yn.minY,yn.maxY,Ri),da=gt(vo,en,ir+ma,ir+Fa,1,yn.minY,yn.maxY,Ri),vo=null),Gn&&(jn=gt(Gn,en,ir-ua,ir+Wa,1,yn.minY,yn.maxY,Ri),Ha=gt(Gn,en,ir+ma,ir+Fa,1,yn.minY,yn.maxY,Ri),Gn=null),Zi>1&&console.timeEnd("clipping"),$r.push(Xo||[],wt+1,rr*2,ir*2),$r.push(da||[],wt+1,rr*2,ir*2+1),$r.push(jn||[],wt+1,rr*2+1,ir*2),$r.push(Ha||[],wt+1,rr*2+1,ir*2+1)}}},Fn.prototype.getTile=function(Gt,wt,rr){var ir=this.options,wr=ir.extent,Xr=ir.debug;if(Gt<0||Gt>24)return null;var ti=1<<Gt;wt=(wt%ti+ti)%ti;var $r=An(Gt,wt,rr);if(this.tiles[$r])return Ir(this.tiles[$r],wr);Xr>1&&console.log("drilling down to z%d-%d-%d",Gt,wt,rr);for(var Ri=Gt,Zi=wt,en=rr,fn;!fn&&Ri>0;)Ri--,Zi=Math.floor(Zi/2),en=Math.floor(en/2),fn=this.tiles[An(Ri,Zi,en)];return!fn||!fn.source?null:(Xr>1&&console.log("found parent tile z%d-%d-%d",Ri,Zi,en),Xr>1&&console.time("drilling down"),this.splitTile(fn.source,Ri,Zi,en,Gt,wt,rr),Xr>1&&console.timeEnd("drilling down"),this.tiles[$r]?Ir(this.tiles[$r],wr):null)};function An(Gt,wt,rr){return((1<<Gt)*rr+wt)*32+Gt}function Hn(Gt,wt){for(var rr in wt)Gt[rr]=wt[rr];return Gt}function Qn(Gt,wt){var rr=Gt.tileID.canonical;if(!this._geoJSONIndex)return wt(null,null);var ir=this._geoJSONIndex.getTile(rr.z,rr.x,rr.y);if(!ir)return wt(null,null);var wr=new C(ir.features),Xr=z(wr);(Xr.byteOffset!==0||Xr.byteLength!==Xr.buffer.byteLength)&&(Xr=new Uint8Array(Xr)),wt(null,{vectorTile:wr,rawData:Xr.buffer})}var Vi=function(Gt){function wt(rr,ir,wr,Xr){Gt.call(this,rr,ir,wr,Qn),Xr&&(this.loadGeoJSON=Xr)}return Gt&&(wt.__proto__=Gt),wt.prototype=Object.create(Gt&&Gt.prototype),wt.prototype.constructor=wt,wt.prototype.loadData=function(ir,wr){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=wr,this._pendingLoadDataParams=ir,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},wt.prototype._loadData=function(){var ir=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var wr=this._pendingCallback,Xr=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var ti=Xr&&Xr.request&&Xr.request.collectResourceTiming?new i.RequestPerformance(Xr.request):!1;this.loadGeoJSON(Xr,function($r,Ri){if($r||!Ri)return wr($r);if(typeof Ri!="object")return wr(new Error("Input data given to '"+Xr.source+"' is not a valid GeoJSON object."));p(Ri,!0);try{if(Xr.filter){var Zi=i.createExpression(Xr.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Zi.result==="error")throw new Error(Zi.value.map(function(Mn){return Mn.key+": "+Mn.message}).join(", "));var en=Ri.features.filter(function(Mn){return Zi.value.evaluate({zoom:0},Mn)});Ri={type:"FeatureCollection",features:en}}ir._geoJSONIndex=Xr.cluster?new mt(Kn(Xr)).load(Ri.features):un(Ri,Xr.geojsonVtOptions)}catch(Mn){return wr(Mn)}ir.loaded={};var fn={};if(ti){var yn=ti.finish();yn&&(fn.resourceTiming={},fn.resourceTiming[Xr.source]=JSON.parse(JSON.stringify(yn)))}wr(null,fn)})}},wt.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},wt.prototype.reloadTile=function(ir,wr){var Xr=this.loaded,ti=ir.uid;return Xr&&Xr[ti]?Gt.prototype.reloadTile.call(this,ir,wr):this.loadTile(ir,wr)},wt.prototype.loadGeoJSON=function(ir,wr){if(ir.request)i.getJSON(ir.request,wr);else if(typeof ir.data=="string")try{return wr(null,JSON.parse(ir.data))}catch(Xr){return wr(new Error("Input data given to '"+ir.source+"' is not a valid GeoJSON object."))}else return wr(new Error("Input data given to '"+ir.source+"' is not a valid GeoJSON object."))},wt.prototype.removeSource=function(ir,wr){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),wr()},wt.prototype.getClusterExpansionZoom=function(ir,wr){try{wr(null,this._geoJSONIndex.getClusterExpansionZoom(ir.clusterId))}catch(Xr){wr(Xr)}},wt.prototype.getClusterChildren=function(ir,wr){try{wr(null,this._geoJSONIndex.getChildren(ir.clusterId))}catch(Xr){wr(Xr)}},wt.prototype.getClusterLeaves=function(ir,wr){try{wr(null,this._geoJSONIndex.getLeaves(ir.clusterId,ir.limit,ir.offset))}catch(Xr){wr(Xr)}},wt}(v);function Kn(Gt){var wt=Gt.superclusterOptions,rr=Gt.clusterProperties;if(!rr||!wt)return wt;for(var ir={},wr={},Xr={accumulated:null,zoom:0},ti={properties:null},$r=Object.keys(rr),Ri=0,Zi=$r;Ri<Zi.length;Ri+=1){var en=Zi[Ri],fn=rr[en],yn=fn[0],Mn=fn[1],Ba=i.createExpression(Mn),ua=i.createExpression(typeof yn=="string"?[yn,["accumulated"],["get",en]]:yn);ir[en]=Ba.value,wr[en]=ua.value}return wt.map=function(ma){ti.properties=ma;for(var Wa={},Fa=0,Xo=$r;Fa<Xo.length;Fa+=1){var da=Xo[Fa];Wa[da]=ir[da].evaluate(Xr,ti)}return Wa},wt.reduce=function(ma,Wa){ti.properties=Wa;for(var Fa=0,Xo=$r;Fa<Xo.length;Fa+=1){var da=Xo[Fa];Xr.accumulated=ma[da],ma[da]=wr[da].evaluate(Xr,ti)}},wt}var Jn=function(wt){var rr=this;this.self=wt,this.actor=new i.Actor(wt,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:v,geojson:Vi},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(ir,wr){if(rr.workerSourceTypes[ir])throw new Error('Worker source with name "'+ir+'" already registered.');rr.workerSourceTypes[ir]=wr},this.self.registerRTLTextPlugin=function(ir){if(i.plugin.isParsed())throw new Error("RTL text plugin already registered.");i.plugin.applyArabicShaping=ir.applyArabicShaping,i.plugin.processBidirectionalText=ir.processBidirectionalText,i.plugin.processStyledBidirectionalText=ir.processStyledBidirectionalText}};return Jn.prototype.setReferrer=function(wt,rr){this.referrer=rr},Jn.prototype.setImages=function(wt,rr,ir){this.availableImages[wt]=rr;for(var wr in this.workerSources[wt]){var Xr=this.workerSources[wt][wr];for(var ti in Xr)Xr[ti].availableImages=rr}ir()},Jn.prototype.setLayers=function(wt,rr,ir){this.getLayerIndex(wt).replace(rr),ir()},Jn.prototype.updateLayers=function(wt,rr,ir){this.getLayerIndex(wt).update(rr.layers,rr.removedIds),ir()},Jn.prototype.loadTile=function(wt,rr,ir){this.getWorkerSource(wt,rr.type,rr.source).loadTile(rr,ir)},Jn.prototype.loadDEMTile=function(wt,rr,ir){this.getDEMWorkerSource(wt,rr.source).loadTile(rr,ir)},Jn.prototype.reloadTile=function(wt,rr,ir){this.getWorkerSource(wt,rr.type,rr.source).reloadTile(rr,ir)},Jn.prototype.abortTile=function(wt,rr,ir){this.getWorkerSource(wt,rr.type,rr.source).abortTile(rr,ir)},Jn.prototype.removeTile=function(wt,rr,ir){this.getWorkerSource(wt,rr.type,rr.source).removeTile(rr,ir)},Jn.prototype.removeDEMTile=function(wt,rr){this.getDEMWorkerSource(wt,rr.source).removeTile(rr)},Jn.prototype.removeSource=function(wt,rr,ir){if(!(!this.workerSources[wt]||!this.workerSources[wt][rr.type]||!this.workerSources[wt][rr.type][rr.source])){var wr=this.workerSources[wt][rr.type][rr.source];delete this.workerSources[wt][rr.type][rr.source],wr.removeSource!==void 0?wr.removeSource(rr,ir):ir()}},Jn.prototype.loadWorkerSource=function(wt,rr,ir){try{this.self.importScripts(rr.url),ir()}catch(wr){ir(wr.toString())}},Jn.prototype.syncRTLPluginState=function(wt,rr,ir){try{i.plugin.setState(rr);var wr=i.plugin.getPluginURL();if(i.plugin.isLoaded()&&!i.plugin.isParsed()&&wr!=null){this.self.importScripts(wr);var Xr=i.plugin.isParsed(),ti=Xr?void 0:new Error("RTL Text Plugin failed to import scripts from "+wr);ir(ti,Xr)}}catch($r){ir($r.toString())}},Jn.prototype.getAvailableImages=function(wt){var rr=this.availableImages[wt];return rr||(rr=[]),rr},Jn.prototype.getLayerIndex=function(wt){var rr=this.layerIndexes[wt];return rr||(rr=this.layerIndexes[wt]=new l),rr},Jn.prototype.getWorkerSource=function(wt,rr,ir){var wr=this;if(this.workerSources[wt]||(this.workerSources[wt]={}),this.workerSources[wt][rr]||(this.workerSources[wt][rr]={}),!this.workerSources[wt][rr][ir]){var Xr={send:function(ti,$r,Ri){wr.actor.send(ti,$r,Ri,wt)}};this.workerSources[wt][rr][ir]=new this.workerSourceTypes[rr](Xr,this.getLayerIndex(wt),this.getAvailableImages(wt))}return this.workerSources[wt][rr][ir]},Jn.prototype.getDEMWorkerSource=function(wt,rr){return this.demWorkerSources[wt]||(this.demWorkerSources[wt]={}),this.demWorkerSources[wt][rr]||(this.demWorkerSources[wt][rr]=new b),this.demWorkerSources[wt][rr]},Jn.prototype.enforceCacheSizeLimit=function(wt,rr){i.enforceCacheSizeLimit(rr)},typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope&&(self.worker=new Jn(self)),Jn}),n(["./shared"],function(i){"use strict";var a=i.createCommonjsModule(function(Y){Y.exports?Y.exports=D:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=D,window.mapboxgl.notSupportedReason=J);function D(It){return!J(It)}function J(It){if(!O())return"not a browser";if(!K())return"insufficent Array support";if(!de())return"insufficient Function support";if(!ne())return"insufficient Object support";if(!be())return"insufficient JSON support";if(!Be())return"insufficient worker support";if(!ht())return"insufficient Uint8ClampedArray support";if(!Yt())return"insufficient ArrayBuffer support";if(!cr())return"insufficient Canvas/getImageData support";if(!Ne(It&&It.failIfMajorPerformanceCaveat))return"insufficient WebGL support"}function O(){return typeof window!="undefined"&&typeof document!="undefined"}function K(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function de(){return Function.prototype&&Function.prototype.bind}function ne(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function be(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function Be(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var It=new Blob([""],{type:"text/javascript"}),Bt=URL.createObjectURL(It),Ft,Ut;try{Ut=new Worker(Bt),Ft=!0}catch(zt){Ft=!1}return Ut&&Ut.terminate(),URL.revokeObjectURL(Bt),Ft}function ht(){return"Uint8ClampedArray"in window}function Yt(){return ArrayBuffer.isView}function cr(){var It=document.createElement("canvas");It.width=It.height=1;var Bt=It.getContext("2d");if(!Bt)return!1;var Ft=Bt.getImageData(0,0,1,1);return Ft&&Ft.width===It.width}var Nt={};function Ne(It){return Nt[It]===void 0&&(Nt[It]=ot(It)),Nt[It]}D.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function $e(It){var Bt=document.createElement("canvas"),Ft=Object.create(D.webGLContextAttributes);return Ft.failIfMajorPerformanceCaveat=It,Bt.probablySupportsContext?Bt.probablySupportsContext("webgl",Ft)||Bt.probablySupportsContext("experimental-webgl",Ft):Bt.supportsContext?Bt.supportsContext("webgl",Ft)||Bt.supportsContext("experimental-webgl",Ft):Bt.getContext("webgl",Ft)||Bt.getContext("experimental-webgl",Ft)}function ot(It){var Bt=$e(It);if(!Bt)return!1;var Ft=Bt.createShader(Bt.VERTEX_SHADER);return!Ft||Bt.isContextLost()?!1:(Bt.shaderSource(Ft,"void main() {}"),Bt.compileShader(Ft),Bt.getShaderParameter(Ft,Bt.COMPILE_STATUS)===!0)}}),o={};o.create=function(Y,D,J){var O=i.window.document.createElement(Y);return D!==void 0&&(O.className=D),J&&J.appendChild(O),O},o.createNS=function(Y,D){var J=i.window.document.createElementNS(Y,D);return J};var s=i.window.document&&i.window.document.documentElement.style;function l(Y){if(!s)return Y[0];for(var D=0;D<Y.length;D++)if(Y[D]in s)return Y[D];return Y[0]}var u=l(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),c;o.disableDrag=function(){s&&u&&(c=s[u],s[u]="none")},o.enableDrag=function(){s&&u&&(s[u]=c)};var f=l(["transform","WebkitTransform"]);o.setTransform=function(Y,D){Y.style[f]=D};var h=!1;try{var d=Object.defineProperty({},"passive",{get:function(){h=!0}});i.window.addEventListener("test",d,d),i.window.removeEventListener("test",d,d)}catch(Y){h=!1}o.addEventListener=function(Y,D,J,O){O===void 0&&(O={}),"passive"in O&&h?Y.addEventListener(D,J,O):Y.addEventListener(D,J,O.capture)},o.removeEventListener=function(Y,D,J,O){O===void 0&&(O={}),"passive"in O&&h?Y.removeEventListener(D,J,O):Y.removeEventListener(D,J,O.capture)};var v=function(Y){Y.preventDefault(),Y.stopPropagation(),i.window.removeEventListener("click",v,!0)};o.suppressClick=function(){i.window.addEventListener("click",v,!0),i.window.setTimeout(function(){i.window.removeEventListener("click",v,!0)},0)},o.mousePos=function(Y,D){var J=Y.getBoundingClientRect();return new i.Point(D.clientX-J.left-Y.clientLeft,D.clientY-J.top-Y.clientTop)},o.touchPos=function(Y,D){for(var J=Y.getBoundingClientRect(),O=[],K=0;K<D.length;K++)O.push(new i.Point(D[K].clientX-J.left-Y.clientLeft,D[K].clientY-J.top-Y.clientTop));return O},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 m(Y,D,J){var O,K,de,ne=i.browser.devicePixelRatio>1?"@2x":"",be=i.getJSON(D.transformRequest(D.normalizeSpriteURL(Y,ne,".json"),i.ResourceType.SpriteJSON),function(Yt,cr){be=null,de||(de=Yt,O=cr,ht())}),Be=i.getImage(D.transformRequest(D.normalizeSpriteURL(Y,ne,".png"),i.ResourceType.SpriteImage),function(Yt,cr){Be=null,de||(de=Yt,K=cr,ht())});function ht(){if(de)J(de);else if(O&&K){var Yt=i.browser.getImageData(K),cr={};for(var Nt in O){var Ne=O[Nt],$e=Ne.width,ot=Ne.height,It=Ne.x,Bt=Ne.y,Ft=Ne.sdf,Ut=Ne.pixelRatio,zt=Ne.stretchX,_t=Ne.stretchY,Dt=Ne.content,vt=new i.RGBAImage({width:$e,height:ot});i.RGBAImage.copy(Yt,vt,{x:It,y:Bt},{x:0,y:0},{width:$e,height:ot}),cr[Nt]={data:vt,pixelRatio:Ut,sdf:Ft,stretchX:zt,stretchY:_t,content:Dt}}J(null,cr)}}return{cancel:function(){be&&(be.cancel(),be=null),Be&&(Be.cancel(),Be=null)}}}function b(Y){var D=Y.userImage;if(D&&D.render){var J=D.render();if(J)return Y.data.replace(new Uint8Array(D.data.buffer)),!0}return!1}var p=1,k=function(Y){function D(){Y.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.isLoaded=function(){return this.loaded},D.prototype.setLoaded=function(O){if(this.loaded!==O&&(this.loaded=O,O)){for(var K=0,de=this.requestors;K<de.length;K+=1){var ne=de[K],be=ne.ids,Be=ne.callback;this._notify(be,Be)}this.requestors=[]}},D.prototype.getImage=function(O){return this.images[O]},D.prototype.addImage=function(O,K){this._validate(O,K)&&(this.images[O]=K)},D.prototype._validate=function(O,K){var de=!0;return this._validateStretch(K.stretchX,K.data&&K.data.width)||(this.fire(new i.ErrorEvent(new Error('Image "'+O+'" has invalid "stretchX" value'))),de=!1),this._validateStretch(K.stretchY,K.data&&K.data.height)||(this.fire(new i.ErrorEvent(new Error('Image "'+O+'" has invalid "stretchY" value'))),de=!1),this._validateContent(K.content,K)||(this.fire(new i.ErrorEvent(new Error('Image "'+O+'" has invalid "content" value'))),de=!1),de},D.prototype._validateStretch=function(O,K){if(!O)return!0;for(var de=0,ne=0,be=O;ne<be.length;ne+=1){var Be=be[ne];if(Be[0]<de||Be[1]<Be[0]||K<Be[1])return!1;de=Be[1]}return!0},D.prototype._validateContent=function(O,K){return O?!(O.length!==4||O[0]<0||K.data.width<O[0]||O[1]<0||K.data.height<O[1]||O[2]<0||K.data.width<O[2]||O[3]<0||K.data.height<O[3]||O[2]<O[0]||O[3]<O[1]):!0},D.prototype.updateImage=function(O,K){var de=this.images[O];K.version=de.version+1,this.images[O]=K,this.updatedImages[O]=!0},D.prototype.removeImage=function(O){var K=this.images[O];delete this.images[O],delete this.patterns[O],K.userImage&&K.userImage.onRemove&&K.userImage.onRemove()},D.prototype.listImages=function(){return Object.keys(this.images)},D.prototype.getImages=function(O,K){var de=!0;if(!this.isLoaded())for(var ne=0,be=O;ne<be.length;ne+=1){var Be=be[ne];this.images[Be]||(de=!1)}this.isLoaded()||de?this._notify(O,K):this.requestors.push({ids:O,callback:K})},D.prototype._notify=function(O,K){for(var de={},ne=0,be=O;ne<be.length;ne+=1){var Be=be[ne];this.images[Be]||this.fire(new i.Event("styleimagemissing",{id:Be}));var ht=this.images[Be];ht?de[Be]={data:ht.data.clone(),pixelRatio:ht.pixelRatio,sdf:ht.sdf,version:ht.version,stretchX:ht.stretchX,stretchY:ht.stretchY,content:ht.content,hasRenderCallback:!!(ht.userImage&&ht.userImage.render)}:i.warnOnce('Image "'+Be+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}K(null,de)},D.prototype.getPixelSize=function(){var O=this.atlasImage,K=O.width,de=O.height;return{width:K,height:de}},D.prototype.getPattern=function(O){var K=this.patterns[O],de=this.getImage(O);if(!de)return null;if(K&&K.position.version===de.version)return K.position;if(K)K.position.version=de.version;else{var ne=de.data.width+p*2,be=de.data.height+p*2,Be={w:ne,h:be,x:0,y:0},ht=new i.ImagePosition(Be,de);this.patterns[O]={bin:Be,position:ht}}return this._updatePatternAtlas(),this.patterns[O].position},D.prototype.bind=function(O){var K=O.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new i.Texture(O,this.atlasImage,K.RGBA),this.atlasTexture.bind(K.LINEAR,K.CLAMP_TO_EDGE)},D.prototype._updatePatternAtlas=function(){var O=[];for(var K in this.patterns)O.push(this.patterns[K].bin);var de=i.potpack(O),ne=de.w,be=de.h,Be=this.atlasImage;Be.resize({width:ne||1,height:be||1});for(var ht in this.patterns){var Yt=this.patterns[ht],cr=Yt.bin,Nt=cr.x+p,Ne=cr.y+p,$e=this.images[ht].data,ot=$e.width,It=$e.height;i.RGBAImage.copy($e,Be,{x:0,y:0},{x:Nt,y:Ne},{width:ot,height:It}),i.RGBAImage.copy($e,Be,{x:0,y:It-1},{x:Nt,y:Ne-1},{width:ot,height:1}),i.RGBAImage.copy($e,Be,{x:0,y:0},{x:Nt,y:Ne+It},{width:ot,height:1}),i.RGBAImage.copy($e,Be,{x:ot-1,y:0},{x:Nt-1,y:Ne},{width:1,height:It}),i.RGBAImage.copy($e,Be,{x:0,y:0},{x:Nt+ot,y:Ne},{width:1,height:It})}this.dirty=!0},D.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},D.prototype.dispatchRenderCallbacks=function(O){for(var K=0,de=O;K<de.length;K+=1){var ne=de[K];if(!this.callbackDispatchedThisFrame[ne]){this.callbackDispatchedThisFrame[ne]=!0;var be=this.images[ne],Be=b(be);Be&&this.updateImage(ne,be)}}},D}(i.Evented);function M(Y,D,J,O,K){var de=D*256,ne=de+255,be=O.transformRequest(O.normalizeGlyphsURL(J).replace("{fontstack}",Y).replace("{range}",de+"-"+ne),i.ResourceType.Glyphs);i.getArrayBuffer(be,function(Be,ht){if(Be)K(Be);else if(ht){for(var Yt={},cr=0,Nt=i.parseGlyphPBF(ht);cr<Nt.length;cr+=1){var Ne=Nt[cr];Yt[Ne.id]=Ne}K(null,Yt)}})}var T=C,L=C,x=1e20;function C(Y,D,J,O,K,de){this.fontSize=Y||24,this.buffer=D===void 0?3:D,this.cutoff=O||.25,this.fontFamily=K||"sans-serif",this.fontWeight=de||"normal",this.radius=J||8;var ne=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=ne,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(ne*ne),this.gridInner=new Float64Array(ne*ne),this.f=new Float64Array(ne),this.d=new Float64Array(ne),this.z=new Float64Array(ne+1),this.v=new Int16Array(ne),this.middle=Math.round(ne/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}C.prototype.draw=function(Y){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Y,this.buffer,this.middle);for(var D=this.ctx.getImageData(0,0,this.size,this.size),J=new Uint8ClampedArray(this.size*this.size),O=0;O<this.size*this.size;O++){var K=D.data[O*4+3]/255;this.gridOuter[O]=K===1?0:K===0?x:Math.pow(Math.max(0,.5-K),2),this.gridInner[O]=K===1?x:K===0?0:Math.pow(Math.max(0,K-.5),2)}for(S(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),S(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),O=0;O<this.size*this.size;O++){var de=this.gridOuter[O]-this.gridInner[O];J[O]=Math.max(0,Math.min(255,Math.round(255-255*(de/this.radius+this.cutoff))))}return J};function S(Y,D,J,O,K,de,ne){for(var be=0;be<D;be++){for(var Be=0;Be<J;Be++)O[Be]=Y[Be*D+be];for(g(O,K,de,ne,J),Be=0;Be<J;Be++)Y[Be*D+be]=K[Be]}for(Be=0;Be<J;Be++){for(be=0;be<D;be++)O[be]=Y[Be*D+be];for(g(O,K,de,ne,D),be=0;be<D;be++)Y[Be*D+be]=Math.sqrt(K[be])}}function g(Y,D,J,O,K){J[0]=0,O[0]=-x,O[1]=+x;for(var de=1,ne=0;de<K;de++){for(var be=(Y[de]+de*de-(Y[J[ne]]+J[ne]*J[ne]))/(2*de-2*J[ne]);be<=O[ne];)ne--,be=(Y[de]+de*de-(Y[J[ne]]+J[ne]*J[ne]))/(2*de-2*J[ne]);ne++,J[ne]=de,O[ne]=be,O[ne+1]=+x}for(de=0,ne=0;de<K;de++){for(;O[ne+1]<de;)ne++;D[de]=(de-J[ne])*(de-J[ne])+Y[J[ne]]}}T.default=L;var P=function(D,J){this.requestManager=D,this.localIdeographFontFamily=J,this.entries={}};P.prototype.setURL=function(D){this.url=D},P.prototype.getGlyphs=function(D,J){var O=this,K=[];for(var de in D)for(var ne=0,be=D[de];ne<be.length;ne+=1){var Be=be[ne];K.push({stack:de,id:Be})}i.asyncAll(K,function(ht,Yt){var cr=ht.stack,Nt=ht.id,Ne=O.entries[cr];Ne||(Ne=O.entries[cr]={glyphs:{},requests:{},ranges:{}});var $e=Ne.glyphs[Nt];if($e!==void 0){Yt(null,{stack:cr,id:Nt,glyph:$e});return}if($e=O._tinySDF(Ne,cr,Nt),$e){Ne.glyphs[Nt]=$e,Yt(null,{stack:cr,id:Nt,glyph:$e});return}var ot=Math.floor(Nt/256);if(ot*256>65535){Yt(new Error("glyphs > 65535 not supported"));return}if(Ne.ranges[ot]){Yt(null,{stack:cr,id:Nt,glyph:$e});return}var It=Ne.requests[ot];It||(It=Ne.requests[ot]=[],P.loadGlyphRange(cr,ot,O.url,O.requestManager,function(Bt,Ft){if(Ft){for(var Ut in Ft)O._doesCharSupportLocalGlyph(+Ut)||(Ne.glyphs[+Ut]=Ft[+Ut]);Ne.ranges[ot]=!0}for(var zt=0,_t=It;zt<_t.length;zt+=1){var Dt=_t[zt];Dt(Bt,Ft)}delete Ne.requests[ot]})),It.push(function(Bt,Ft){Bt?Yt(Bt):Ft&&Yt(null,{stack:cr,id:Nt,glyph:Ft[Nt]||null})})},function(ht,Yt){if(ht)J(ht);else if(Yt){for(var cr={},Nt=0,Ne=Yt;Nt<Ne.length;Nt+=1){var $e=Ne[Nt],ot=$e.stack,It=$e.id,Bt=$e.glyph;(cr[ot]||(cr[ot]={}))[It]=Bt&&{id:Bt.id,bitmap:Bt.bitmap.clone(),metrics:Bt.metrics}}J(null,cr)}})},P.prototype._doesCharSupportLocalGlyph=function(D){return!!this.localIdeographFontFamily&&(i.isChar["CJK Unified Ideographs"](D)||i.isChar["Hangul Syllables"](D)||i.isChar.Hiragana(D)||i.isChar.Katakana(D))},P.prototype._tinySDF=function(D,J,O){var K=this.localIdeographFontFamily;if(K&&this._doesCharSupportLocalGlyph(O)){var de=D.tinySDF;if(!de){var ne="400";/bold/i.test(J)?ne="900":/medium/i.test(J)?ne="500":/light/i.test(J)&&(ne="200"),de=D.tinySDF=new P.TinySDF(24,3,8,.25,K,ne)}return{id:O,bitmap:new i.AlphaImage({width:30,height:30},de.draw(String.fromCharCode(O))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},P.loadGlyphRange=M,P.TinySDF=T;var E=function(){this.specification=i.styleSpec.light.position};E.prototype.possiblyEvaluate=function(D,J){return i.sphericalToCartesian(D.expression.evaluate(J))},E.prototype.interpolate=function(D,J,O){return{x:i.number(D.x,J.x,O),y:i.number(D.y,J.y,O),z:i.number(D.z,J.z,O)}};var z=new i.Properties({anchor:new i.DataConstantProperty(i.styleSpec.light.anchor),position:new E,color:new i.DataConstantProperty(i.styleSpec.light.color),intensity:new i.DataConstantProperty(i.styleSpec.light.intensity)}),q="-transition",U=function(Y){function D(J){Y.call(this),this._transitionable=new i.Transitionable(z),this.setLight(J),this._transitioning=this._transitionable.untransitioned()}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getLight=function(){return this._transitionable.serialize()},D.prototype.setLight=function(O,K){if(K===void 0&&(K={}),!this._validate(i.validateLight,O,K))for(var de in O){var ne=O[de];i.endsWith(de,q)?this._transitionable.setTransition(de.slice(0,-q.length),ne):this._transitionable.setValue(de,ne)}},D.prototype.updateTransitions=function(O){this._transitioning=this._transitionable.transitioned(O,this._transitioning)},D.prototype.hasTransition=function(){return this._transitioning.hasTransition()},D.prototype.recalculate=function(O){this.properties=this._transitioning.possiblyEvaluate(O)},D.prototype._validate=function(O,K,de){return de&&de.validate===!1?!1:i.emitValidationErrors(this,O.call(i.validateStyle,i.extend({value:K,style:{glyphs:!0,sprite:!0},styleSpec:i.styleSpec})))},D}(i.Evented),G=function(D,J){this.width=D,this.height=J,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};G.prototype.getDash=function(D,J){var O=D.join(",")+String(J);return this.dashEntry[O]||(this.dashEntry[O]=this.addDash(D,J)),this.dashEntry[O]},G.prototype.getDashRanges=function(D,J,O){var K=D.length%2===1,de=[],ne=K?-D[D.length-1]*O:0,be=D[0]*O,Be=!0;de.push({left:ne,right:be,isDash:Be,zeroLength:D[0]===0});for(var ht=D[0],Yt=1;Yt<D.length;Yt++){Be=!Be;var cr=D[Yt];ne=ht*O,ht+=cr,be=ht*O,de.push({left:ne,right:be,isDash:Be,zeroLength:cr===0})}return de},G.prototype.addRoundDash=function(D,J,O){for(var K=J/2,de=-O;de<=O;de++)for(var ne=this.nextRow+O+de,be=this.width*ne,Be=0,ht=D[Be],Yt=0;Yt<this.width;Yt++){Yt/ht.right>1&&(ht=D[++Be]);var cr=Math.abs(Yt-ht.left),Nt=Math.abs(Yt-ht.right),Ne=Math.min(cr,Nt),$e=void 0,ot=de/O*(K+1);if(ht.isDash){var It=K-Math.abs(ot);$e=Math.sqrt(Ne*Ne+It*It)}else $e=K-Math.sqrt(Ne*Ne+ot*ot);this.data[be+Yt]=Math.max(0,Math.min(255,$e+128))}},G.prototype.addRegularDash=function(D){for(var J=D.length-1;J>=0;--J){var O=D[J],K=D[J+1];O.zeroLength?D.splice(J,1):K&&K.isDash===O.isDash&&(K.left=O.left,D.splice(J,1))}var de=D[0],ne=D[D.length-1];de.isDash===ne.isDash&&(de.left=ne.left-this.width,ne.right=de.right+this.width);for(var be=this.width*this.nextRow,Be=0,ht=D[Be],Yt=0;Yt<this.width;Yt++){Yt/ht.right>1&&(ht=D[++Be]);var cr=Math.abs(Yt-ht.left),Nt=Math.abs(Yt-ht.right),Ne=Math.min(cr,Nt),$e=ht.isDash?Ne:-Ne;this.data[be+Yt]=Math.max(0,Math.min(255,$e+128))}},G.prototype.addDash=function(D,J){var O=J?7:0,K=2*O+1;if(this.nextRow+K>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var de=0,ne=0;ne<D.length;ne++)de+=D[ne];if(de!==0){var be=this.width/de,Be=this.getDashRanges(D,this.width,be);J?this.addRoundDash(Be,be,O):this.addRegularDash(Be)}var ht={y:(this.nextRow+O+.5)/this.height,height:2*O/this.height,width:de};return this.nextRow+=K,this.dirty=!0,ht},G.prototype.bind=function(D){var J=D.gl;this.texture?(J.bindTexture(J.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,J.texSubImage2D(J.TEXTURE_2D,0,0,0,this.width,this.height,J.ALPHA,J.UNSIGNED_BYTE,this.data))):(this.texture=J.createTexture(),J.bindTexture(J.TEXTURE_2D,this.texture),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_S,J.REPEAT),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_T,J.REPEAT),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MIN_FILTER,J.LINEAR),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MAG_FILTER,J.LINEAR),J.texImage2D(J.TEXTURE_2D,0,J.ALPHA,this.width,this.height,0,J.ALPHA,J.UNSIGNED_BYTE,this.data))};var Z=function Y(D,J){this.workerPool=D,this.actors=[],this.currentActor=0,this.id=i.uniqueId();for(var O=this.workerPool.acquire(this.id),K=0;K<O.length;K++){var de=O[K],ne=new Y.Actor(de,J,this.id);ne.name="Worker "+K,this.actors.push(ne)}};Z.prototype.broadcast=function(D,J,O){O=O||function(){},i.asyncAll(this.actors,function(K,de){K.send(D,J,de)},O)},Z.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},Z.prototype.remove=function(){this.actors.forEach(function(D){D.remove()}),this.actors=[],this.workerPool.release(this.id)},Z.Actor=i.Actor;function j(Y,D,J){var O=function(K,de){if(K)return J(K);if(de){var ne=i.pick(i.extend(de,Y),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);de.vector_layers&&(ne.vectorLayers=de.vector_layers,ne.vectorLayerIds=ne.vectorLayers.map(function(be){return be.id})),ne.tiles=D.canonicalizeTileset(ne,Y.url),J(null,ne)}};return Y.url?i.getJSON(D.transformRequest(D.normalizeSourceURL(Y.url),i.ResourceType.Source),O):i.browser.frame(function(){return O(null,Y)})}var N=function(D,J,O){this.bounds=i.LngLatBounds.convert(this.validateBounds(D)),this.minzoom=J||0,this.maxzoom=O||24};N.prototype.validateBounds=function(D){return!Array.isArray(D)||D.length!==4?[-180,-90,180,90]:[Math.max(-180,D[0]),Math.max(-90,D[1]),Math.min(180,D[2]),Math.min(90,D[3])]},N.prototype.contains=function(D){var J=Math.pow(2,D.z),O={minX:Math.floor(i.mercatorXfromLng(this.bounds.getWest())*J),minY:Math.floor(i.mercatorYfromLat(this.bounds.getNorth())*J),maxX:Math.ceil(i.mercatorXfromLng(this.bounds.getEast())*J),maxY:Math.ceil(i.mercatorYfromLat(this.bounds.getSouth())*J)},K=D.x>=O.minX&&D.x<O.maxX&&D.y>=O.minY&&D.y<O.maxY;return K};var H=function(Y){function D(J,O,K,de){if(Y.call(this),this.id=J,this.dispatcher=K,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,i.extend(this,i.pick(O,["url","scheme","tileSize","promoteId"])),this._options=i.extend({type:"vector"},O),this._collectResourceTiming=O.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(de)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var O=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=j(this._options,this.map._requestManager,function(K,de){O._tileJSONRequest=null,O._loaded=!0,K?O.fire(new i.ErrorEvent(K)):de&&(i.extend(O,de),de.bounds&&(O.tileBounds=new N(de.bounds,O.minzoom,O.maxzoom)),i.postTurnstileEvent(de.tiles,O.map._requestManager._customAccessToken),i.postMapLoadEvent(de.tiles,O.map._getMapId(),O.map._requestManager._skuToken,O.map._requestManager._customAccessToken),O.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})),O.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})))})},D.prototype.loaded=function(){return this._loaded},D.prototype.hasTile=function(O){return!this.tileBounds||this.tileBounds.contains(O.canonical)},D.prototype.onAdd=function(O){this.map=O,this.load()},D.prototype.setSourceProperty=function(O){this._tileJSONRequest&&this._tileJSONRequest.cancel(),O();var K=this.map.style.sourceCaches[this.id];K.clearTiles(),this.load()},D.prototype.setTiles=function(O){var K=this;return this.setSourceProperty(function(){K._options.tiles=O}),this},D.prototype.setUrl=function(O){var K=this;return this.setSourceProperty(function(){K.url=O,K._options.url=O}),this},D.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},D.prototype.serialize=function(){return i.extend({},this._options)},D.prototype.loadTile=function(O,K){var de=this.map._requestManager.normalizeTileURL(O.tileID.canonical.url(this.tiles,this.scheme)),ne={request:this.map._requestManager.transformRequest(de,i.ResourceType.Tile),uid:O.uid,tileID:O.tileID,zoom:O.tileID.overscaledZ,tileSize:this.tileSize*O.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};ne.request.collectResourceTiming=this._collectResourceTiming,!O.actor||O.state==="expired"?(O.actor=this.dispatcher.getActor(),O.request=O.actor.send("loadTile",ne,be.bind(this))):O.state==="loading"?O.reloadCallback=K:O.request=O.actor.send("reloadTile",ne,be.bind(this));function be(Be,ht){if(delete O.request,O.aborted)return K(null);if(Be&&Be.status!==404)return K(Be);ht&&ht.resourceTiming&&(O.resourceTiming=ht.resourceTiming),this.map._refreshExpiredTiles&&ht&&O.setExpiryData(ht),O.loadVectorData(ht,this.map.painter),i.cacheEntryPossiblyAdded(this.dispatcher),K(null),O.reloadCallback&&(this.loadTile(O,O.reloadCallback),O.reloadCallback=null)}},D.prototype.abortTile=function(O){O.request&&(O.request.cancel(),delete O.request),O.actor&&O.actor.send("abortTile",{uid:O.uid,type:this.type,source:this.id},void 0)},D.prototype.unloadTile=function(O){O.unloadVectorData(),O.actor&&O.actor.send("removeTile",{uid:O.uid,type:this.type,source:this.id},void 0)},D.prototype.hasTransition=function(){return!1},D}(i.Evented),re=function(Y){function D(J,O,K,de){Y.call(this),this.id=J,this.dispatcher=K,this.setEventedParent(de),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=i.extend({type:"raster"},O),i.extend(this,i.pick(O,["url","scheme","tileSize"]))}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var O=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=j(this._options,this.map._requestManager,function(K,de){O._tileJSONRequest=null,O._loaded=!0,K?O.fire(new i.ErrorEvent(K)):de&&(i.extend(O,de),de.bounds&&(O.tileBounds=new N(de.bounds,O.minzoom,O.maxzoom)),i.postTurnstileEvent(de.tiles),i.postMapLoadEvent(de.tiles,O.map._getMapId(),O.map._requestManager._skuToken),O.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})),O.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})))})},D.prototype.loaded=function(){return this._loaded},D.prototype.onAdd=function(O){this.map=O,this.load()},D.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},D.prototype.serialize=function(){return i.extend({},this._options)},D.prototype.hasTile=function(O){return!this.tileBounds||this.tileBounds.contains(O.canonical)},D.prototype.loadTile=function(O,K){var de=this,ne=this.map._requestManager.normalizeTileURL(O.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);O.request=i.getImage(this.map._requestManager.transformRequest(ne,i.ResourceType.Tile),function(be,Be){if(delete O.request,O.aborted)O.state="unloaded",K(null);else if(be)O.state="errored",K(be);else if(Be){de.map._refreshExpiredTiles&&O.setExpiryData(Be),delete Be.cacheControl,delete Be.expires;var ht=de.map.painter.context,Yt=ht.gl;O.texture=de.map.painter.getTileTexture(Be.width),O.texture?O.texture.update(Be,{useMipmap:!0}):(O.texture=new i.Texture(ht,Be,Yt.RGBA,{useMipmap:!0}),O.texture.bind(Yt.LINEAR,Yt.CLAMP_TO_EDGE,Yt.LINEAR_MIPMAP_NEAREST),ht.extTextureFilterAnisotropic&&Yt.texParameterf(Yt.TEXTURE_2D,ht.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,ht.extTextureFilterAnisotropicMax)),O.state="loaded",i.cacheEntryPossiblyAdded(de.dispatcher),K(null)}})},D.prototype.abortTile=function(O,K){O.request&&(O.request.cancel(),delete O.request),K()},D.prototype.unloadTile=function(O,K){O.texture&&this.map.painter.saveTileTexture(O.texture),K()},D.prototype.hasTransition=function(){return!1},D}(i.Evented),oe=function(Y){function D(J,O,K,de){Y.call(this,J,O,K,de),this.type="raster-dem",this.maxzoom=22,this._options=i.extend({type:"raster-dem"},O),this.encoding=O.encoding||"mapbox"}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},D.prototype.loadTile=function(O,K){var de=this.map._requestManager.normalizeTileURL(O.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);O.request=i.getImage(this.map._requestManager.transformRequest(de,i.ResourceType.Tile),ne.bind(this)),O.neighboringTiles=this._getNeighboringTiles(O.tileID);function ne(Be,ht){if(delete O.request,O.aborted)O.state="unloaded",K(null);else if(Be)O.state="errored",K(Be);else if(ht){this.map._refreshExpiredTiles&&O.setExpiryData(ht),delete ht.cacheControl,delete ht.expires;var Yt=i.window.ImageBitmap&&ht instanceof i.window.ImageBitmap&&i.offscreenCanvasSupported(),cr=Yt?ht:i.browser.getImageData(ht,1),Nt={uid:O.uid,coord:O.tileID,source:this.id,rawImageData:cr,encoding:this.encoding};(!O.actor||O.state==="expired")&&(O.actor=this.dispatcher.getActor(),O.actor.send("loadDEMTile",Nt,be.bind(this)))}}function be(Be,ht){Be&&(O.state="errored",K(Be)),ht&&(O.dem=ht,O.needsHillshadePrepare=!0,O.state="loaded",K(null))}},D.prototype._getNeighboringTiles=function(O){var K=O.canonical,de=Math.pow(2,K.z),ne=(K.x-1+de)%de,be=K.x===0?O.wrap-1:O.wrap,Be=(K.x+1+de)%de,ht=K.x+1===de?O.wrap+1:O.wrap,Yt={};return Yt[new i.OverscaledTileID(O.overscaledZ,be,K.z,ne,K.y).key]={backfilled:!1},Yt[new i.OverscaledTileID(O.overscaledZ,ht,K.z,Be,K.y).key]={backfilled:!1},K.y>0&&(Yt[new i.OverscaledTileID(O.overscaledZ,be,K.z,ne,K.y-1).key]={backfilled:!1},Yt[new i.OverscaledTileID(O.overscaledZ,O.wrap,K.z,K.x,K.y-1).key]={backfilled:!1},Yt[new i.OverscaledTileID(O.overscaledZ,ht,K.z,Be,K.y-1).key]={backfilled:!1}),K.y+1<de&&(Yt[new i.OverscaledTileID(O.overscaledZ,be,K.z,ne,K.y+1).key]={backfilled:!1},Yt[new i.OverscaledTileID(O.overscaledZ,O.wrap,K.z,K.x,K.y+1).key]={backfilled:!1},Yt[new i.OverscaledTileID(O.overscaledZ,ht,K.z,Be,K.y+1).key]={backfilled:!1}),Yt},D.prototype.unloadTile=function(O){O.demTexture&&this.map.painter.saveTileTexture(O.demTexture),O.fbo&&(O.fbo.destroy(),delete O.fbo),O.dem&&delete O.dem,delete O.neighboringTiles,O.state="unloaded",O.actor&&O.actor.send("removeDEMTile",{uid:O.uid,source:this.id})},D}(re),_e=function(Y){function D(J,O,K,de){Y.call(this),this.id=J,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=K.getActor(),this.setEventedParent(de),this._data=O.data,this._options=i.extend({},O),this._collectResourceTiming=O.collectResourceTiming,this._resourceTiming=[],O.maxzoom!==void 0&&(this.maxzoom=O.maxzoom),O.type&&(this.type=O.type),O.attribution&&(this.attribution=O.attribution),this.promoteId=O.promoteId;var ne=i.EXTENT/this.tileSize;this.workerOptions=i.extend({source:this.id,cluster:O.cluster||!1,geojsonVtOptions:{buffer:(O.buffer!==void 0?O.buffer:128)*ne,tolerance:(O.tolerance!==void 0?O.tolerance:.375)*ne,extent:i.EXTENT,maxZoom:this.maxzoom,lineMetrics:O.lineMetrics||!1,generateId:O.generateId||!1},superclusterOptions:{maxZoom:O.clusterMaxZoom!==void 0?Math.min(O.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,O.clusterMinPoints||2),extent:i.EXTENT,radius:(O.clusterRadius||50)*ne,log:!1,generateId:O.generateId||!1},clusterProperties:O.clusterProperties,filter:O.filter},O.workerOptions)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var O=this;this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(K){if(K){O.fire(new i.ErrorEvent(K));return}var de={dataType:"source",sourceDataType:"metadata"};O._collectResourceTiming&&O._resourceTiming&&O._resourceTiming.length>0&&(de.resourceTiming=O._resourceTiming,O._resourceTiming=[]),O.fire(new i.Event("data",de))})},D.prototype.onAdd=function(O){this.map=O,this.load()},D.prototype.setData=function(O){var K=this;return this._data=O,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(de){if(de){K.fire(new i.ErrorEvent(de));return}var ne={dataType:"source",sourceDataType:"content"};K._collectResourceTiming&&K._resourceTiming&&K._resourceTiming.length>0&&(ne.resourceTiming=K._resourceTiming,K._resourceTiming=[]),K.fire(new i.Event("data",ne))}),this},D.prototype.getClusterExpansionZoom=function(O,K){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:O,source:this.id},K),this},D.prototype.getClusterChildren=function(O,K){return this.actor.send("geojson.getClusterChildren",{clusterId:O,source:this.id},K),this},D.prototype.getClusterLeaves=function(O,K,de,ne){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:O,limit:K,offset:de},ne),this},D.prototype._updateWorkerData=function(O){var K=this;this._loaded=!1;var de=i.extend({},this.workerOptions),ne=this._data;typeof ne=="string"?(de.request=this.map._requestManager.transformRequest(i.browser.resolveURL(ne),i.ResourceType.Source),de.request.collectResourceTiming=this._collectResourceTiming):de.data=JSON.stringify(ne),this.actor.send(this.type+".loadData",de,function(be,Be){K._removed||Be&&Be.abandoned||(K._loaded=!0,Be&&Be.resourceTiming&&Be.resourceTiming[K.id]&&(K._resourceTiming=Be.resourceTiming[K.id].slice(0)),K.actor.send(K.type+".coalesce",{source:de.source},null),O(be))})},D.prototype.loaded=function(){return this._loaded},D.prototype.loadTile=function(O,K){var de=this,ne=O.actor?"reloadTile":"loadTile";O.actor=this.actor;var be={type:this.type,uid:O.uid,tileID:O.tileID,zoom:O.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};O.request=this.actor.send(ne,be,function(Be,ht){return delete O.request,O.unloadVectorData(),O.aborted?K(null):Be?K(Be):(O.loadVectorData(ht,de.map.painter,ne==="reloadTile"),K(null))})},D.prototype.abortTile=function(O){O.request&&(O.request.cancel(),delete O.request),O.aborted=!0},D.prototype.unloadTile=function(O){O.unloadVectorData(),this.actor.send("removeTile",{uid:O.uid,type:this.type,source:this.id})},D.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},D.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},D.prototype.hasTransition=function(){return!1},D}(i.Evented),ke=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Ce=function(Y){function D(J,O,K,de){Y.call(this),this.id=J,this.dispatcher=K,this.coordinates=O.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(de),this.options=O}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(O,K){var de=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(ne,be){de._loaded=!0,ne?de.fire(new i.ErrorEvent(ne)):be&&(de.image=be,O&&(de.coordinates=O),K&&K(),de._finishLoading())})},D.prototype.loaded=function(){return this._loaded},D.prototype.updateImage=function(O){var K=this;return!this.image||!O.url?this:(this.options.url=O.url,this.load(O.coordinates,function(){K.texture=null}),this)},D.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},D.prototype.onAdd=function(O){this.map=O,this.load()},D.prototype.setCoordinates=function(O){var K=this;this.coordinates=O;var de=O.map(i.MercatorCoordinate.fromLngLat);this.tileID=ge(de),this.minzoom=this.maxzoom=this.tileID.z;var ne=de.map(function(be){return K.tileID.getTilePoint(be)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(ne[0].x,ne[0].y,0,0),this._boundsArray.emplaceBack(ne[1].x,ne[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(ne[3].x,ne[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(ne[2].x,ne[2].y,i.EXTENT,i.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})),this},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var O=this.map.painter.context,K=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,ke.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(O,this.image,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!=="loaded"&&(ne.state="loaded",ne.texture=this.texture)}}},D.prototype.loadTile=function(O,K){this.tileID&&this.tileID.equals(O.tileID.canonical)?(this.tiles[String(O.tileID.wrap)]=O,O.buckets={},K(null)):(O.state="errored",K(null))},D.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return!1},D}(i.Evented);function ge(Y){for(var D=1/0,J=1/0,O=-1/0,K=-1/0,de=0,ne=Y;de<ne.length;de+=1){var be=ne[de];D=Math.min(D,be.x),J=Math.min(J,be.y),O=Math.max(O,be.x),K=Math.max(K,be.y)}var Be=O-D,ht=K-J,Yt=Math.max(Be,ht),cr=Math.max(0,Math.floor(-Math.log(Yt)/Math.LN2)),Nt=Math.pow(2,cr);return new i.CanonicalTileID(cr,Math.floor((D+O)/2*Nt),Math.floor((J+K)/2*Nt))}var ie=function(Y){function D(J,O,K,de){Y.call(this,J,O,K,de),this.roundZoom=!0,this.type="video",this.options=O}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){var O=this;this._loaded=!1;var K=this.options;this.urls=[];for(var de=0,ne=K.urls;de<ne.length;de+=1){var be=ne[de];this.urls.push(this.map._requestManager.transformRequest(be,i.ResourceType.Source).url)}i.getVideo(this.urls,function(Be,ht){O._loaded=!0,Be?O.fire(new i.ErrorEvent(Be)):ht&&(O.video=ht,O.video.loop=!0,O.video.addEventListener("playing",function(){O.map.triggerRepaint()}),O.map&&O.video.play(),O._finishLoading())})},D.prototype.pause=function(){this.video&&this.video.pause()},D.prototype.play=function(){this.video&&this.video.play()},D.prototype.seek=function(O){if(this.video){var K=this.video.seekable;O<K.start(0)||O>K.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+K.start(0)+" and "+K.end(0)+"-second mark."))):this.video.currentTime=O}},D.prototype.getVideo=function(){return this.video},D.prototype.onAdd=function(O){this.map||(this.map=O,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var O=this.map.painter.context,K=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,ke.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE),K.texSubImage2D(K.TEXTURE_2D,0,0,0,K.RGBA,K.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(O,this.video,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!=="loaded"&&(ne.state="loaded",ne.texture=this.texture)}}},D.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this.video&&!this.video.paused},D}(Ce),Se=function(Y){function D(J,O,K,de){Y.call(this,J,O,K,de),O.coordinates?(!Array.isArray(O.coordinates)||O.coordinates.length!==4||O.coordinates.some(function(ne){return!Array.isArray(ne)||ne.length!==2||ne.some(function(be){return typeof be!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'missing required property "coordinates"'))),O.animate&&typeof O.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'optional "animate" property must be a boolean value'))),O.canvas?typeof O.canvas!="string"&&!(O.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'missing required property "canvas"'))),this.options=O,this.animate=O.animate!==void 0?O.animate:!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new i.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},D.prototype.getCanvas=function(){return this.canvas},D.prototype.onAdd=function(O){this.map=O,this.load(),this.canvas&&this.animate&&this.play()},D.prototype.onRemove=function(){this.pause()},D.prototype.prepare=function(){var O=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,O=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,O=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var K=this.map.painter.context,de=K.gl;this.boundsBuffer||(this.boundsBuffer=K.createVertexBuffer(this._boundsArray,ke.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(O||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(K,this.canvas,de.RGBA,{premultiply:!0});for(var ne in this.tiles){var be=this.tiles[ne];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture)}}},D.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this._playing},D.prototype._hasInvalidDimensions=function(){for(var O=0,K=[this.canvas.width,this.canvas.height];O<K.length;O+=1){var de=K[O];if(isNaN(de)||de<=0)return!0}return!1},D}(Ce),Ee={vector:H,raster:re,"raster-dem":oe,geojson:_e,video:ie,image:Ce,canvas:Se},we=function(Y,D,J,O){var K=new Ee[D.type](Y,D,J,O);if(K.id!==Y)throw new Error("Expected Source id to be "+Y+" instead of "+K.id);return i.bindAll(["load","abort","unload","serialize","prepare"],K),K},De=function(Y){return Ee[Y]},Le=function(Y,D){Ee[Y]=D};function me(Y,D){var J=i.identity([]);return i.translate(J,J,[1,1,0]),i.scale(J,J,[Y.width*.5,Y.height*.5,1]),i.multiply(J,J,Y.calculatePosMatrix(D.toUnwrapped()))}function Pe(Y,D,J){if(Y)for(var O=0,K=Y;O<K.length;O+=1){var de=K[O],ne=D[de];if(ne&&ne.source===J&&ne.type==="fill-extrusion")return!0}else for(var be in D){var Be=D[be];if(Be.source===J&&Be.type==="fill-extrusion")return!0}return!1}function ce(Y,D,J,O,K,de){var ne=Pe(K&&K.layers,D,Y.id),be=de.maxPitchScaleFactor(),Be=Y.tilesIn(O,be,ne);Be.sort(mt);for(var ht=[],Yt=0,cr=Be;Yt<cr.length;Yt+=1){var Nt=cr[Yt];ht.push({wrappedTileID:Nt.tileID.wrapped().key,queryResults:Nt.tile.queryRenderedFeatures(D,J,Y._state,Nt.queryGeometry,Nt.cameraQueryGeometry,Nt.scale,K,de,be,me(Y.transform,Nt.tileID))})}var Ne=Vt(ht);for(var $e in Ne)Ne[$e].forEach(function(ot){var It=ot.feature,Bt=Y.getFeatureState(It.layer["source-layer"],It.id);It.source=It.layer.source,It.layer["source-layer"]&&(It.sourceLayer=It.layer["source-layer"]),It.state=Bt});return Ne}function He(Y,D,J,O,K,de,ne){for(var be={},Be=de.queryRenderedSymbols(O),ht=[],Yt=0,cr=Object.keys(Be).map(Number);Yt<cr.length;Yt+=1){var Nt=cr[Yt];ht.push(ne[Nt])}ht.sort(mt);for(var Ne=function(){var Ft=ot[$e],Ut=Ft.featureIndex.lookupSymbolFeatures(Be[Ft.bucketInstanceId],D,Ft.bucketIndex,Ft.sourceLayerIndex,K.filter,K.layers,K.availableImages,Y);for(var zt in Ut){var _t=be[zt]=be[zt]||[],Dt=Ut[zt];Dt.sort(function(Br,Di){var ci=Ft.featureSortOrder;if(ci){var bi=ci.indexOf(Br.featureIndex),gn=ci.indexOf(Di.featureIndex);return gn-bi}else return Di.featureIndex-Br.featureIndex});for(var vt=0,lr=Dt;vt<lr.length;vt+=1){var yr=lr[vt];_t.push(yr)}}},$e=0,ot=ht;$e<ot.length;$e+=1)Ne();var It=function(Ft){be[Ft].forEach(function(Ut){var zt=Ut.feature,_t=Y[Ft],Dt=J[_t.source],vt=Dt.getFeatureState(zt.layer["source-layer"],zt.id);zt.source=zt.layer.source,zt.layer["source-layer"]&&(zt.sourceLayer=zt.layer["source-layer"]),zt.state=vt})};for(var Bt in be)It(Bt);return be}function lt(Y,D){for(var J=Y.getRenderableIds().map(function(Be){return Y.getTileByID(Be)}),O=[],K={},de=0;de<J.length;de++){var ne=J[de],be=ne.tileID.canonical.key;K[be]||(K[be]=!0,ne.querySourceFeatures(O,D))}return O}function mt(Y,D){var J=Y.tileID,O=D.tileID;return J.overscaledZ-O.overscaledZ||J.canonical.y-O.canonical.y||J.wrap-O.wrap||J.canonical.x-O.canonical.x}function Vt(Y){for(var D={},J={},O=0,K=Y;O<K.length;O+=1){var de=K[O],ne=de.queryResults,be=de.wrappedTileID,Be=J[be]=J[be]||{};for(var ht in ne)for(var Yt=ne[ht],cr=Be[ht]=Be[ht]||{},Nt=D[ht]=D[ht]||[],Ne=0,$e=Yt;Ne<$e.length;Ne+=1){var ot=$e[Ne];cr[ot.featureIndex]||(cr[ot.featureIndex]=!0,Nt.push(ot))}}return D}var st=function(D,J){this.max=D,this.onRemove=J,this.reset()};st.prototype.reset=function(){for(var D in this.data)for(var J=0,O=this.data[D];J<O.length;J+=1){var K=O[J];K.timeout&&clearTimeout(K.timeout),this.onRemove(K.value)}return this.data={},this.order=[],this},st.prototype.add=function(D,J,O){var K=this,de=D.wrapped().key;this.data[de]===void 0&&(this.data[de]=[]);var ne={value:J,timeout:void 0};if(O!==void 0&&(ne.timeout=setTimeout(function(){K.remove(D,ne)},O)),this.data[de].push(ne),this.order.push(de),this.order.length>this.max){var be=this._getAndRemoveByKey(this.order[0]);be&&this.onRemove(be)}return this},st.prototype.has=function(D){return D.wrapped().key in this.data},st.prototype.getAndRemove=function(D){return this.has(D)?this._getAndRemoveByKey(D.wrapped().key):null},st.prototype._getAndRemoveByKey=function(D){var J=this.data[D].shift();return J.timeout&&clearTimeout(J.timeout),this.data[D].length===0&&delete this.data[D],this.order.splice(this.order.indexOf(D),1),J.value},st.prototype.getByKey=function(D){var J=this.data[D];return J?J[0].value:null},st.prototype.get=function(D){if(!this.has(D))return null;var J=this.data[D.wrapped().key][0];return J.value},st.prototype.remove=function(D,J){if(!this.has(D))return this;var O=D.wrapped().key,K=J===void 0?0:this.data[O].indexOf(J),de=this.data[O][K];return this.data[O].splice(K,1),de.timeout&&clearTimeout(de.timeout),this.data[O].length===0&&delete this.data[O],this.onRemove(de.value),this.order.splice(this.order.indexOf(O),1),this},st.prototype.setMaxSize=function(D){for(this.max=D;this.order.length>this.max;){var J=this._getAndRemoveByKey(this.order[0]);J&&this.onRemove(J)}return this},st.prototype.filter=function(D){var J=[];for(var O in this.data)for(var K=0,de=this.data[O];K<de.length;K+=1){var ne=de[K];D(ne.value)||J.push(ne)}for(var be=0,Be=J;be<Be.length;be+=1){var ht=Be[be];this.remove(ht.value.tileID,ht)}};var ct=function(D,J,O){this.context=D;var K=D.gl;this.buffer=K.createBuffer(),this.dynamicDraw=!!O,this.context.unbindVAO(),D.bindElementBuffer.set(this.buffer),K.bufferData(K.ELEMENT_ARRAY_BUFFER,J.arrayBuffer,this.dynamicDraw?K.DYNAMIC_DRAW:K.STATIC_DRAW),this.dynamicDraw||delete J.arrayBuffer};ct.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},ct.prototype.updateData=function(D){var J=this.context.gl;this.context.unbindVAO(),this.bind(),J.bufferSubData(J.ELEMENT_ARRAY_BUFFER,0,D.arrayBuffer)},ct.prototype.destroy=function(){var D=this.context.gl;this.buffer&&(D.deleteBuffer(this.buffer),delete this.buffer)};var Qt={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},Ht=function(D,J,O,K){this.length=J.length,this.attributes=O,this.itemSize=J.bytesPerElement,this.dynamicDraw=K,this.context=D;var de=D.gl;this.buffer=de.createBuffer(),D.bindVertexBuffer.set(this.buffer),de.bufferData(de.ARRAY_BUFFER,J.arrayBuffer,this.dynamicDraw?de.DYNAMIC_DRAW:de.STATIC_DRAW),this.dynamicDraw||delete J.arrayBuffer};Ht.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},Ht.prototype.updateData=function(D){var J=this.context.gl;this.bind(),J.bufferSubData(J.ARRAY_BUFFER,0,D.arrayBuffer)},Ht.prototype.enableAttributes=function(D,J){for(var O=0;O<this.attributes.length;O++){var K=this.attributes[O],de=J.attributes[K.name];de!==void 0&&D.enableVertexAttribArray(de)}},Ht.prototype.setVertexAttribPointers=function(D,J,O){for(var K=0;K<this.attributes.length;K++){var de=this.attributes[K],ne=J.attributes[de.name];ne!==void 0&&D.vertexAttribPointer(ne,de.components,D[Qt[de.type]],!1,this.itemSize,de.offset+this.itemSize*(O||0))}},Ht.prototype.destroy=function(){var D=this.context.gl;this.buffer&&(D.deleteBuffer(this.buffer),delete this.buffer)};var nr=function(D){this.gl=D.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};nr.prototype.get=function(){return this.current},nr.prototype.set=function(D){},nr.prototype.getDefault=function(){return this.default},nr.prototype.setDefault=function(){this.set(this.default)};var tt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return i.Color.transparent},D.prototype.set=function(O){var K=this.current;O.r===K.r&&O.g===K.g&&O.b===K.b&&O.a===K.a&&!this.dirty||(this.gl.clearColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)},D}(nr),je=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 1},D.prototype.set=function(O){O===this.current&&!this.dirty||(this.gl.clearDepth(O),this.current=O,this.dirty=!1)},D}(nr),Ue=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 0},D.prototype.set=function(O){O===this.current&&!this.dirty||(this.gl.clearStencil(O),this.current=O,this.dirty=!1)},D}(nr),Ae=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return[!0,!0,!0,!0]},D.prototype.set=function(O){var K=this.current;O[0]===K[0]&&O[1]===K[1]&&O[2]===K[2]&&O[3]===K[3]&&!this.dirty||(this.gl.colorMask(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)},D}(nr),rt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!0},D.prototype.set=function(O){O===this.current&&!this.dirty||(this.gl.depthMask(O),this.current=O,this.dirty=!1)},D}(nr),St=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 255},D.prototype.set=function(O){O===this.current&&!this.dirty||(this.gl.stencilMask(O),this.current=O,this.dirty=!1)},D}(nr),Tt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},D.prototype.set=function(O){var K=this.current;O.func===K.func&&O.ref===K.ref&&O.mask===K.mask&&!this.dirty||(this.gl.stencilFunc(O.func,O.ref,O.mask),this.current=O,this.dirty=!1)},D}(nr),dt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){var O=this.gl;return[O.KEEP,O.KEEP,O.KEEP]},D.prototype.set=function(O){var K=this.current;O[0]===K[0]&&O[1]===K[1]&&O[2]===K[2]&&!this.dirty||(this.gl.stencilOp(O[0],O[1],O[2]),this.current=O,this.dirty=!1)},D}(nr),Et=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){var K=this.gl;O?K.enable(K.STENCIL_TEST):K.disable(K.STENCIL_TEST),this.current=O,this.dirty=!1}},D}(nr),pt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return[0,1]},D.prototype.set=function(O){var K=this.current;O[0]===K[0]&&O[1]===K[1]&&!this.dirty||(this.gl.depthRange(O[0],O[1]),this.current=O,this.dirty=!1)},D}(nr),Xt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){var K=this.gl;O?K.enable(K.DEPTH_TEST):K.disable(K.DEPTH_TEST),this.current=O,this.dirty=!1}},D}(nr),or=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.LESS},D.prototype.set=function(O){O===this.current&&!this.dirty||(this.gl.depthFunc(O),this.current=O,this.dirty=!1)},D}(nr),_r=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){var K=this.gl;O?K.enable(K.BLEND):K.disable(K.BLEND),this.current=O,this.dirty=!1}},D}(nr),Er=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){var O=this.gl;return[O.ONE,O.ZERO]},D.prototype.set=function(O){var K=this.current;O[0]===K[0]&&O[1]===K[1]&&!this.dirty||(this.gl.blendFunc(O[0],O[1]),this.current=O,this.dirty=!1)},D}(nr),ei=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return i.Color.transparent},D.prototype.set=function(O){var K=this.current;O.r===K.r&&O.g===K.g&&O.b===K.b&&O.a===K.a&&!this.dirty||(this.gl.blendColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)},D}(nr),qr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.FUNC_ADD},D.prototype.set=function(O){O===this.current&&!this.dirty||(this.gl.blendEquation(O),this.current=O,this.dirty=!1)},D}(nr),jr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){var K=this.gl;O?K.enable(K.CULL_FACE):K.disable(K.CULL_FACE),this.current=O,this.dirty=!1}},D}(nr),gt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.BACK},D.prototype.set=function(O){O===this.current&&!this.dirty||(this.gl.cullFace(O),this.current=O,this.dirty=!1)},D}(nr),Ge=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.CCW},D.prototype.set=function(O){O===this.current&&!this.dirty||(this.gl.frontFace(O),this.current=O,this.dirty=!1)},D}(nr),Je=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(O){O===this.current&&!this.dirty||(this.gl.useProgram(O),this.current=O,this.dirty=!1)},D}(nr),We=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return this.gl.TEXTURE0},D.prototype.set=function(O){O===this.current&&!this.dirty||(this.gl.activeTexture(O),this.current=O,this.dirty=!1)},D}(nr),et=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){var O=this.gl;return[0,0,O.drawingBufferWidth,O.drawingBufferHeight]},D.prototype.set=function(O){var K=this.current;O[0]===K[0]&&O[1]===K[1]&&O[2]===K[2]&&O[3]===K[3]&&!this.dirty||(this.gl.viewport(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)},D}(nr),xt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){var K=this.gl;K.bindFramebuffer(K.FRAMEBUFFER,O),this.current=O,this.dirty=!1}},D}(nr),At=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){var K=this.gl;K.bindRenderbuffer(K.RENDERBUFFER,O),this.current=O,this.dirty=!1}},D}(nr),Kt=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){var K=this.gl;K.bindTexture(K.TEXTURE_2D,O),this.current=O,this.dirty=!1}},D}(nr),er=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){var K=this.gl;K.bindBuffer(K.ARRAY_BUFFER,O),this.current=O,this.dirty=!1}},D}(nr),Sr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(O){var K=this.gl;K.bindBuffer(K.ELEMENT_ARRAY_BUFFER,O),this.current=O,this.dirty=!1},D}(nr),Gr=function(Y){function D(J){Y.call(this,J),this.vao=J.extVertexArrayObject}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D.prototype.set=function(O){!this.vao||O===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(O),this.current=O,this.dirty=!1)},D}(nr),Ir=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return 4},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){var K=this.gl;K.pixelStorei(K.UNPACK_ALIGNMENT,O),this.current=O,this.dirty=!1}},D}(nr),Yr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){var K=this.gl;K.pixelStorei(K.UNPACK_PREMULTIPLY_ALPHA_WEBGL,O),this.current=O,this.dirty=!1}},D}(nr),_i=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return!1},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){var K=this.gl;K.pixelStorei(K.UNPACK_FLIP_Y_WEBGL,O),this.current=O,this.dirty=!1}},D}(nr),Pi=function(Y){function D(J,O){Y.call(this,J),this.context=J,this.parent=O}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getDefault=function(){return null},D}(nr),ai=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.setDirty=function(){this.dirty=!0},D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var K=this.gl;K.framebufferTexture2D(K.FRAMEBUFFER,K.COLOR_ATTACHMENT0,K.TEXTURE_2D,O,0),this.current=O,this.dirty=!1}},D}(Pi),mi=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.set=function(O){if(!(O===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var K=this.gl;K.framebufferRenderbuffer(K.FRAMEBUFFER,K.DEPTH_ATTACHMENT,K.RENDERBUFFER,O),this.current=O,this.dirty=!1}},D}(Pi),un=function(D,J,O,K){this.context=D,this.width=J,this.height=O;var de=D.gl,ne=this.framebuffer=de.createFramebuffer();this.colorAttachment=new ai(D,ne),K&&(this.depthAttachment=new mi(D,ne))};un.prototype.destroy=function(){var D=this.context.gl,J=this.colorAttachment.get();if(J&&D.deleteTexture(J),this.depthAttachment){var O=this.depthAttachment.get();O&&D.deleteRenderbuffer(O)}D.deleteFramebuffer(this.framebuffer)};var Fn=519,An=function(D,J,O){this.func=D,this.mask=J,this.range=O};An.ReadOnly=!1,An.ReadWrite=!0,An.disabled=new An(Fn,An.ReadOnly,[0,1]);var Hn=519,Qn=7680,Vi=function(D,J,O,K,de,ne){this.test=D,this.ref=J,this.mask=O,this.fail=K,this.depthFail=de,this.pass=ne};Vi.disabled=new Vi({func:Hn,mask:0},0,0,Qn,Qn,Qn);var Kn=0,Jn=1,Gt=771,wt=function(D,J,O){this.blendFunction=D,this.blendColor=J,this.mask=O};wt.Replace=[Jn,Kn],wt.disabled=new wt(wt.Replace,i.Color.transparent,[!1,!1,!1,!1]),wt.unblended=new wt(wt.Replace,i.Color.transparent,[!0,!0,!0,!0]),wt.alphaBlended=new wt([Jn,Gt],i.Color.transparent,[!0,!0,!0,!0]);var rr=1029,ir=2305,wr=function(D,J,O){this.enable=D,this.mode=J,this.frontFace=O};wr.disabled=new wr(!1,rr,ir),wr.backCCW=new wr(!0,rr,ir);var Xr=function(D){this.gl=D,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new tt(this),this.clearDepth=new je(this),this.clearStencil=new Ue(this),this.colorMask=new Ae(this),this.depthMask=new rt(this),this.stencilMask=new St(this),this.stencilFunc=new Tt(this),this.stencilOp=new dt(this),this.stencilTest=new Et(this),this.depthRange=new pt(this),this.depthTest=new Xt(this),this.depthFunc=new or(this),this.blend=new _r(this),this.blendFunc=new Er(this),this.blendColor=new ei(this),this.blendEquation=new qr(this),this.cullFace=new jr(this),this.cullFaceSide=new gt(this),this.frontFace=new Ge(this),this.program=new Je(this),this.activeTexture=new We(this),this.viewport=new et(this),this.bindFramebuffer=new xt(this),this.bindRenderbuffer=new At(this),this.bindTexture=new Kt(this),this.bindVertexBuffer=new er(this),this.bindElementBuffer=new Sr(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Gr(this),this.pixelStoreUnpack=new Ir(this),this.pixelStoreUnpackPremultiplyAlpha=new Yr(this),this.pixelStoreUnpackFlipY=new _i(this),this.extTextureFilterAnisotropic=D.getExtension("EXT_texture_filter_anisotropic")||D.getExtension("MOZ_EXT_texture_filter_anisotropic")||D.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=D.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=D.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(D.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=D.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=D.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=D.getParameter(D.MAX_TEXTURE_SIZE)};Xr.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},Xr.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Xr.prototype.createIndexBuffer=function(D,J){return new ct(this,D,J)},Xr.prototype.createVertexBuffer=function(D,J,O){return new Ht(this,D,J,O)},Xr.prototype.createRenderbuffer=function(D,J,O){var K=this.gl,de=K.createRenderbuffer();return this.bindRenderbuffer.set(de),K.renderbufferStorage(K.RENDERBUFFER,D,J,O),this.bindRenderbuffer.set(null),de},Xr.prototype.createFramebuffer=function(D,J,O){return new un(this,D,J,O)},Xr.prototype.clear=function(D){var J=D.color,O=D.depth,K=this.gl,de=0;J&&(de|=K.COLOR_BUFFER_BIT,this.clearColor.set(J),this.colorMask.set([!0,!0,!0,!0])),typeof O!="undefined"&&(de|=K.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(O),this.depthMask.set(!0)),K.clear(de)},Xr.prototype.setCullFace=function(D){D.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(D.mode),this.frontFace.set(D.frontFace))},Xr.prototype.setDepthMode=function(D){D.func===this.gl.ALWAYS&&!D.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(D.func),this.depthMask.set(D.mask),this.depthRange.set(D.range))},Xr.prototype.setStencilMode=function(D){D.test.func===this.gl.ALWAYS&&!D.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(D.mask),this.stencilOp.set([D.fail,D.depthFail,D.pass]),this.stencilFunc.set({func:D.test.func,ref:D.ref,mask:D.test.mask}))},Xr.prototype.setColorMode=function(D){i.deepEqual(D.blendFunction,wt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(D.blendFunction),this.blendColor.set(D.blendColor)),this.colorMask.set(D.mask)},Xr.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var ti=function(Y){function D(J,O,K){var de=this;Y.call(this),this.id=J,this.dispatcher=K,this.on("data",function(ne){ne.dataType==="source"&&ne.sourceDataType==="metadata"&&(de._sourceLoaded=!0),de._sourceLoaded&&!de._paused&&ne.dataType==="source"&&ne.sourceDataType==="content"&&(de.reload(),de.transform&&de.update(de.transform))}),this.on("error",function(){de._sourceErrored=!0}),this._source=we(J,O,K,this),this._tiles={},this._cache=new st(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new i.SourceFeatureState}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.onAdd=function(O){this.map=O,this._maxTileCacheSize=O?O._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(O)},D.prototype.onRemove=function(O){this._source&&this._source.onRemove&&this._source.onRemove(O)},D.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var O in this._tiles){var K=this._tiles[O];if(K.state!=="loaded"&&K.state!=="errored")return!1}return!0},D.prototype.getSource=function(){return this._source},D.prototype.pause=function(){this._paused=!0},D.prototype.resume=function(){if(this._paused){var O=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,O&&this.reload(),this.transform&&this.update(this.transform)}},D.prototype._loadTile=function(O,K){return this._source.loadTile(O,K)},D.prototype._unloadTile=function(O){if(this._source.unloadTile)return this._source.unloadTile(O,function(){})},D.prototype._abortTile=function(O){if(this._source.abortTile)return this._source.abortTile(O,function(){})},D.prototype.serialize=function(){return this._source.serialize()},D.prototype.prepare=function(O){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var K in this._tiles){var de=this._tiles[K];de.upload(O),de.prepare(this.map.style.imageManager)}},D.prototype.getIds=function(){return i.values(this._tiles).map(function(O){return O.tileID}).sort($r).map(function(O){return O.key})},D.prototype.getRenderableIds=function(O){var K=this,de=[];for(var ne in this._tiles)this._isIdRenderable(ne,O)&&de.push(this._tiles[ne]);return O?de.sort(function(be,Be){var ht=be.tileID,Yt=Be.tileID,cr=new i.Point(ht.canonical.x,ht.canonical.y)._rotate(K.transform.angle),Nt=new i.Point(Yt.canonical.x,Yt.canonical.y)._rotate(K.transform.angle);return ht.overscaledZ-Yt.overscaledZ||Nt.y-cr.y||Nt.x-cr.x}).map(function(be){return be.tileID.key}):de.map(function(be){return be.tileID}).sort($r).map(function(be){return be.key})},D.prototype.hasRenderableParent=function(O){var K=this.findLoadedParent(O,0);return K?this._isIdRenderable(K.tileID.key):!1},D.prototype._isIdRenderable=function(O,K){return this._tiles[O]&&this._tiles[O].hasData()&&!this._coveredTiles[O]&&(K||!this._tiles[O].holdingForFade())},D.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var O in this._tiles)this._tiles[O].state!=="errored"&&this._reloadTile(O,"reloading")},D.prototype._reloadTile=function(O,K){var de=this._tiles[O];de&&(de.state!=="loading"&&(de.state=K),this._loadTile(de,this._tileLoaded.bind(this,de,O,K)))},D.prototype._tileLoaded=function(O,K,de,ne){if(ne){O.state="errored",ne.status!==404?this._source.fire(new i.ErrorEvent(ne,{tile:O})):this.update(this.transform);return}O.timeAdded=i.browser.now(),de==="expired"&&(O.refreshedUponExpiration=!0),this._setTileReloadTimer(K,O),this.getSource().type==="raster-dem"&&O.dem&&this._backfillDEM(O),this._state.initializeTileState(O,this.map?this.map.painter:null),this._source.fire(new i.Event("data",{dataType:"source",tile:O,coord:O.tileID}))},D.prototype._backfillDEM=function(O){for(var K=this.getRenderableIds(),de=0;de<K.length;de++){var ne=K[de];if(O.neighboringTiles&&O.neighboringTiles[ne]){var be=this.getTileByID(ne);Be(O,be),Be(be,O)}}function Be(ht,Yt){ht.needsHillshadePrepare=!0;var cr=Yt.tileID.canonical.x-ht.tileID.canonical.x,Nt=Yt.tileID.canonical.y-ht.tileID.canonical.y,Ne=Math.pow(2,ht.tileID.canonical.z),$e=Yt.tileID.key;cr===0&&Nt===0||Math.abs(Nt)>1||(Math.abs(cr)>1&&(Math.abs(cr+Ne)===1?cr+=Ne:Math.abs(cr-Ne)===1&&(cr-=Ne)),!(!Yt.dem||!ht.dem)&&(ht.dem.backfillBorder(Yt.dem,cr,Nt),ht.neighboringTiles&&ht.neighboringTiles[$e]&&(ht.neighboringTiles[$e].backfilled=!0)))}},D.prototype.getTile=function(O){return this.getTileByID(O.key)},D.prototype.getTileByID=function(O){return this._tiles[O]},D.prototype._retainLoadedChildren=function(O,K,de,ne){for(var be in this._tiles){var Be=this._tiles[be];if(!(ne[be]||!Be.hasData()||Be.tileID.overscaledZ<=K||Be.tileID.overscaledZ>de)){for(var ht=Be.tileID;Be&&Be.tileID.overscaledZ>K+1;){var Yt=Be.tileID.scaledTo(Be.tileID.overscaledZ-1);Be=this._tiles[Yt.key],Be&&Be.hasData()&&(ht=Yt)}for(var cr=ht;cr.overscaledZ>K;)if(cr=cr.scaledTo(cr.overscaledZ-1),O[cr.key]){ne[ht.key]=ht;break}}}},D.prototype.findLoadedParent=function(O,K){if(O.key in this._loadedParentTiles){var de=this._loadedParentTiles[O.key];return de&&de.tileID.overscaledZ>=K?de:null}for(var ne=O.overscaledZ-1;ne>=K;ne--){var be=O.scaledTo(ne),Be=this._getLoadedTile(be);if(Be)return Be}},D.prototype._getLoadedTile=function(O){var K=this._tiles[O.key];if(K&&K.hasData())return K;var de=this._cache.getByKey(O.wrapped().key);return de},D.prototype.updateCacheSize=function(O){var K=Math.ceil(O.width/this._source.tileSize)+1,de=Math.ceil(O.height/this._source.tileSize)+1,ne=K*de,be=5,Be=Math.floor(ne*be),ht=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Be):Be;this._cache.setMaxSize(ht)},D.prototype.handleWrapJump=function(O){var K=this._prevLng===void 0?O:this._prevLng,de=O-K,ne=de/360,be=Math.round(ne);if(this._prevLng=O,be){var Be={};for(var ht in this._tiles){var Yt=this._tiles[ht];Yt.tileID=Yt.tileID.unwrapTo(Yt.tileID.wrap+be),Be[Yt.tileID.key]=Yt}this._tiles=Be;for(var cr in this._timers)clearTimeout(this._timers[cr]),delete this._timers[cr];for(var Nt in this._tiles){var Ne=this._tiles[Nt];this._setTileReloadTimer(Nt,Ne)}}},D.prototype.update=function(O){var K=this;if(this.transform=O,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(O),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var de;this.used?this._source.tileID?de=O.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Br){return new i.OverscaledTileID(Br.canonical.z,Br.wrap,Br.canonical.z,Br.canonical.x,Br.canonical.y)}):(de=O.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(de=de.filter(function(Br){return K._source.hasTile(Br)}))):de=[];var ne=O.coveringZoomLevel(this._source),be=Math.max(ne-D.maxOverzooming,this._source.minzoom),Be=Math.max(ne+D.maxUnderzooming,this._source.minzoom),ht=this._updateRetainedTiles(de,ne);if(Ri(this._source.type)){for(var Yt={},cr={},Nt=Object.keys(ht),Ne=0,$e=Nt;Ne<$e.length;Ne+=1){var ot=$e[Ne],It=ht[ot],Bt=this._tiles[ot];if(!(!Bt||Bt.fadeEndTime&&Bt.fadeEndTime<=i.browser.now())){var Ft=this.findLoadedParent(It,be);Ft&&(this._addTile(Ft.tileID),Yt[Ft.tileID.key]=Ft.tileID),cr[ot]=It}}this._retainLoadedChildren(cr,ne,Be,ht);for(var Ut in Yt)ht[Ut]||(this._coveredTiles[Ut]=!0,ht[Ut]=Yt[Ut])}for(var zt in ht)this._tiles[zt].clearFadeHold();for(var _t=i.keysDifference(this._tiles,ht),Dt=0,vt=_t;Dt<vt.length;Dt+=1){var lr=vt[Dt],yr=this._tiles[lr];yr.hasSymbolBuckets&&!yr.holdingForFade()?yr.setHoldDuration(this.map._fadeDuration):(!yr.hasSymbolBuckets||yr.symbolFadeFinished())&&this._removeTile(lr)}this._updateLoadedParentTileCache()}},D.prototype.releaseSymbolFadeTiles=function(){for(var O in this._tiles)this._tiles[O].holdingForFade()&&this._removeTile(O)},D.prototype._updateRetainedTiles=function(O,K){for(var de={},ne={},be=Math.max(K-D.maxOverzooming,this._source.minzoom),Be=Math.max(K+D.maxUnderzooming,this._source.minzoom),ht={},Yt=0,cr=O;Yt<cr.length;Yt+=1){var Nt=cr[Yt],Ne=this._addTile(Nt);de[Nt.key]=Nt,!Ne.hasData()&&K<this._source.maxzoom&&(ht[Nt.key]=Nt)}this._retainLoadedChildren(ht,K,Be,de);for(var $e=0,ot=O;$e<ot.length;$e+=1){var It=ot[$e],Bt=this._tiles[It.key];if(!Bt.hasData()){if(K+1>this._source.maxzoom){var Ft=It.children(this._source.maxzoom)[0],Ut=this.getTile(Ft);if(Ut&&Ut.hasData()){de[Ft.key]=Ft;continue}}else{var zt=It.children(this._source.maxzoom);if(de[zt[0].key]&&de[zt[1].key]&&de[zt[2].key]&&de[zt[3].key])continue}for(var _t=Bt.wasRequested(),Dt=It.overscaledZ-1;Dt>=be;--Dt){var vt=It.scaledTo(Dt);if(ne[vt.key]||(ne[vt.key]=!0,Bt=this.getTile(vt),!Bt&&_t&&(Bt=this._addTile(vt)),Bt&&(de[vt.key]=vt,_t=Bt.wasRequested(),Bt.hasData())))break}}}return de},D.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var O in this._tiles){for(var K=[],de=void 0,ne=this._tiles[O].tileID;ne.overscaledZ>0;){if(ne.key in this._loadedParentTiles){de=this._loadedParentTiles[ne.key];break}K.push(ne.key);var be=ne.scaledTo(ne.overscaledZ-1);if(de=this._getLoadedTile(be),de)break;ne=be}for(var Be=0,ht=K;Be<ht.length;Be+=1){var Yt=ht[Be];this._loadedParentTiles[Yt]=de}}},D.prototype._addTile=function(O){var K=this._tiles[O.key];if(K)return K;K=this._cache.getAndRemove(O),K&&(this._setTileReloadTimer(O.key,K),K.tileID=O,this._state.initializeTileState(K,this.map?this.map.painter:null),this._cacheTimers[O.key]&&(clearTimeout(this._cacheTimers[O.key]),delete this._cacheTimers[O.key],this._setTileReloadTimer(O.key,K)));var de=!!K;return de||(K=new i.Tile(O,this._source.tileSize*O.overscaleFactor()),this._loadTile(K,this._tileLoaded.bind(this,K,O.key,K.state))),K?(K.uses++,this._tiles[O.key]=K,de||this._source.fire(new i.Event("dataloading",{tile:K,coord:K.tileID,dataType:"source"})),K):null},D.prototype._setTileReloadTimer=function(O,K){var de=this;O in this._timers&&(clearTimeout(this._timers[O]),delete this._timers[O]);var ne=K.getExpiryTimeout();ne&&(this._timers[O]=setTimeout(function(){de._reloadTile(O,"expired"),delete de._timers[O]},ne))},D.prototype._removeTile=function(O){var K=this._tiles[O];K&&(K.uses--,delete this._tiles[O],this._timers[O]&&(clearTimeout(this._timers[O]),delete this._timers[O]),!(K.uses>0)&&(K.hasData()&&K.state!=="reloading"?this._cache.add(K.tileID,K,K.getExpiryTimeout()):(K.aborted=!0,this._abortTile(K),this._unloadTile(K))))},D.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var O in this._tiles)this._removeTile(O);this._cache.reset()},D.prototype.tilesIn=function(O,K,de){var ne=this,be=[],Be=this.transform;if(!Be)return be;for(var ht=de?Be.getCameraQueryGeometry(O):O,Yt=O.map(function(Dt){return Be.pointCoordinate(Dt)}),cr=ht.map(function(Dt){return Be.pointCoordinate(Dt)}),Nt=this.getIds(),Ne=1/0,$e=1/0,ot=-1/0,It=-1/0,Bt=0,Ft=cr;Bt<Ft.length;Bt+=1){var Ut=Ft[Bt];Ne=Math.min(Ne,Ut.x),$e=Math.min($e,Ut.y),ot=Math.max(ot,Ut.x),It=Math.max(It,Ut.y)}for(var zt=function(Dt){var vt=ne._tiles[Nt[Dt]];if(!vt.holdingForFade()){var lr=vt.tileID,yr=Math.pow(2,Be.zoom-vt.tileID.overscaledZ),Br=K*vt.queryPadding*i.EXTENT/vt.tileSize/yr,Di=[lr.getTilePoint(new i.MercatorCoordinate(Ne,$e)),lr.getTilePoint(new i.MercatorCoordinate(ot,It))];if(Di[0].x-Br<i.EXTENT&&Di[0].y-Br<i.EXTENT&&Di[1].x+Br>=0&&Di[1].y+Br>=0){var ci=Yt.map(function(gn){return lr.getTilePoint(gn)}),bi=cr.map(function(gn){return lr.getTilePoint(gn)});be.push({tile:vt,tileID:lr,queryGeometry:ci,cameraQueryGeometry:bi,scale:yr})}}},_t=0;_t<Nt.length;_t++)zt(_t);return be},D.prototype.getVisibleCoordinates=function(O){for(var K=this,de=this.getRenderableIds(O).map(function(ht){return K._tiles[ht].tileID}),ne=0,be=de;ne<be.length;ne+=1){var Be=be[ne];Be.posMatrix=this.transform.calculatePosMatrix(Be.toUnwrapped())}return de},D.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Ri(this._source.type))for(var O in this._tiles){var K=this._tiles[O];if(K.fadeEndTime!==void 0&&K.fadeEndTime>=i.browser.now())return!0}return!1},D.prototype.setFeatureState=function(O,K,de){O=O||"_geojsonTileLayer",this._state.updateState(O,K,de)},D.prototype.removeFeatureState=function(O,K,de){O=O||"_geojsonTileLayer",this._state.removeFeatureState(O,K,de)},D.prototype.getFeatureState=function(O,K){return O=O||"_geojsonTileLayer",this._state.getState(O,K)},D.prototype.setDependencies=function(O,K,de){var ne=this._tiles[O];ne&&ne.setDependencies(K,de)},D.prototype.reloadTilesForDependencies=function(O,K){for(var de in this._tiles){var ne=this._tiles[de];ne.hasDependency(O,K)&&this._reloadTile(de,"reloading")}this._cache.filter(function(be){return!be.hasDependency(O,K)})},D}(i.Evented);ti.maxOverzooming=10,ti.maxUnderzooming=3;function $r(Y,D){var J=Math.abs(Y.wrap*2)-+(Y.wrap<0),O=Math.abs(D.wrap*2)-+(D.wrap<0);return Y.overscaledZ-D.overscaledZ||O-J||D.canonical.y-Y.canonical.y||D.canonical.x-Y.canonical.x}function Ri(Y){return Y==="raster"||Y==="image"||Y==="video"}function Zi(){return new i.window.Worker(io.workerUrl)}var en="mapboxgl_preloaded_worker_pool",fn=function(){this.active={}};fn.prototype.acquire=function(D){if(!this.workers)for(this.workers=[];this.workers.length<fn.workerCount;)this.workers.push(new Zi);return this.active[D]=!0,this.workers.slice()},fn.prototype.release=function(D){delete this.active[D],this.numActive()===0&&(this.workers.forEach(function(J){J.terminate()}),this.workers=null)},fn.prototype.isPreloaded=function(){return!!this.active[en]},fn.prototype.numActive=function(){return Object.keys(this.active).length};var yn=Math.floor(i.browser.hardwareConcurrency/2);fn.workerCount=Math.max(Math.min(yn,6),1);var Mn;function Ba(){return Mn||(Mn=new fn),Mn}function ua(){var Y=Ba();Y.acquire(en)}function ma(){var Y=Mn;Y&&(Y.isPreloaded()&&Y.numActive()===1?(Y.release(en),Mn=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))}function Wa(Y,D){var J={};for(var O in Y)O!=="ref"&&(J[O]=Y[O]);return i.refProperties.forEach(function(K){K in D&&(J[K]=D[K])}),J}function Fa(Y){Y=Y.slice();for(var D=Object.create(null),J=0;J<Y.length;J++)D[Y[J].id]=Y[J];for(var O=0;O<Y.length;O++)"ref"in Y[O]&&(Y[O]=Wa(Y[O],D[Y[O].ref]));return Y}function Xo(){var Y={},D=i.styleSpec.$version;for(var J in i.styleSpec.$root){var O=i.styleSpec.$root[J];if(O.required){var K=null;J==="version"?K=D:O.type==="array"?K=[]:K={},K!=null&&(Y[J]=K)}}return Y}var da={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function jn(Y,D,J){J.push({command:da.addSource,args:[Y,D[Y]]})}function Ha(Y,D,J){D.push({command:da.removeSource,args:[Y]}),J[Y]=!0}function vo(Y,D,J,O){Ha(Y,J,O),jn(Y,D,J)}function Gn(Y,D,J){var O;for(O in Y[J])if(Y[J].hasOwnProperty(O)&&O!=="data"&&!i.deepEqual(Y[J][O],D[J][O]))return!1;for(O in D[J])if(D[J].hasOwnProperty(O)&&O!=="data"&&!i.deepEqual(Y[J][O],D[J][O]))return!1;return!0}function Ct(Y,D,J,O){Y=Y||{},D=D||{};var K;for(K in Y)Y.hasOwnProperty(K)&&(D.hasOwnProperty(K)||Ha(K,J,O));for(K in D)D.hasOwnProperty(K)&&(Y.hasOwnProperty(K)?i.deepEqual(Y[K],D[K])||(Y[K].type==="geojson"&&D[K].type==="geojson"&&Gn(Y,D,K)?J.push({command:da.setGeoJSONSourceData,args:[K,D[K].data]}):vo(K,D,J,O)):jn(K,D,J))}function Ar(Y,D,J,O,K,de){Y=Y||{},D=D||{};var ne;for(ne in Y)Y.hasOwnProperty(ne)&&(i.deepEqual(Y[ne],D[ne])||J.push({command:de,args:[O,ne,D[ne],K]}));for(ne in D)!D.hasOwnProperty(ne)||Y.hasOwnProperty(ne)||i.deepEqual(Y[ne],D[ne])||J.push({command:de,args:[O,ne,D[ne],K]})}function Jr(Y){return Y.id}function hi(Y,D){return Y[D.id]=D,Y}function hn(Y,D,J){Y=Y||[],D=D||[];var O=Y.map(Jr),K=D.map(Jr),de=Y.reduce(hi,{}),ne=D.reduce(hi,{}),be=O.slice(),Be=Object.create(null),ht,Yt,cr,Nt,Ne,$e,ot;for(ht=0,Yt=0;ht<O.length;ht++)cr=O[ht],ne.hasOwnProperty(cr)?Yt++:(J.push({command:da.removeLayer,args:[cr]}),be.splice(be.indexOf(cr,Yt),1));for(ht=0,Yt=0;ht<K.length;ht++)cr=K[K.length-1-ht],be[be.length-1-ht]!==cr&&(de.hasOwnProperty(cr)?(J.push({command:da.removeLayer,args:[cr]}),be.splice(be.lastIndexOf(cr,be.length-Yt),1)):Yt++,$e=be[be.length-ht],J.push({command:da.addLayer,args:[ne[cr],$e]}),be.splice(be.length-ht,0,cr),Be[cr]=!0);for(ht=0;ht<K.length;ht++)if(cr=K[ht],Nt=de[cr],Ne=ne[cr],!(Be[cr]||i.deepEqual(Nt,Ne))){if(!i.deepEqual(Nt.source,Ne.source)||!i.deepEqual(Nt["source-layer"],Ne["source-layer"])||!i.deepEqual(Nt.type,Ne.type)){J.push({command:da.removeLayer,args:[cr]}),$e=be[be.lastIndexOf(cr)+1],J.push({command:da.addLayer,args:[Ne,$e]});continue}Ar(Nt.layout,Ne.layout,J,cr,null,da.setLayoutProperty),Ar(Nt.paint,Ne.paint,J,cr,null,da.setPaintProperty),i.deepEqual(Nt.filter,Ne.filter)||J.push({command:da.setFilter,args:[cr,Ne.filter]}),(!i.deepEqual(Nt.minzoom,Ne.minzoom)||!i.deepEqual(Nt.maxzoom,Ne.maxzoom))&&J.push({command:da.setLayerZoomRange,args:[cr,Ne.minzoom,Ne.maxzoom]});for(ot in Nt)Nt.hasOwnProperty(ot)&&(ot==="layout"||ot==="paint"||ot==="filter"||ot==="metadata"||ot==="minzoom"||ot==="maxzoom"||(ot.indexOf("paint.")===0?Ar(Nt[ot],Ne[ot],J,cr,ot.slice(6),da.setPaintProperty):i.deepEqual(Nt[ot],Ne[ot])||J.push({command:da.setLayerProperty,args:[cr,ot,Ne[ot]]})));for(ot in Ne)!Ne.hasOwnProperty(ot)||Nt.hasOwnProperty(ot)||ot==="layout"||ot==="paint"||ot==="filter"||ot==="metadata"||ot==="minzoom"||ot==="maxzoom"||(ot.indexOf("paint.")===0?Ar(Nt[ot],Ne[ot],J,cr,ot.slice(6),da.setPaintProperty):i.deepEqual(Nt[ot],Ne[ot])||J.push({command:da.setLayerProperty,args:[cr,ot,Ne[ot]]}))}}function Sn(Y,D){if(!Y)return[{command:da.setStyle,args:[D]}];var J=[];try{if(!i.deepEqual(Y.version,D.version))return[{command:da.setStyle,args:[D]}];i.deepEqual(Y.center,D.center)||J.push({command:da.setCenter,args:[D.center]}),i.deepEqual(Y.zoom,D.zoom)||J.push({command:da.setZoom,args:[D.zoom]}),i.deepEqual(Y.bearing,D.bearing)||J.push({command:da.setBearing,args:[D.bearing]}),i.deepEqual(Y.pitch,D.pitch)||J.push({command:da.setPitch,args:[D.pitch]}),i.deepEqual(Y.sprite,D.sprite)||J.push({command:da.setSprite,args:[D.sprite]}),i.deepEqual(Y.glyphs,D.glyphs)||J.push({command:da.setGlyphs,args:[D.glyphs]}),i.deepEqual(Y.transition,D.transition)||J.push({command:da.setTransition,args:[D.transition]}),i.deepEqual(Y.light,D.light)||J.push({command:da.setLight,args:[D.light]});var O={},K=[];Ct(Y.sources,D.sources,K,O);var de=[];Y.layers&&Y.layers.forEach(function(ne){O[ne.source]?J.push({command:da.removeLayer,args:[ne.id]}):de.push(ne)}),J=J.concat(K),hn(de,D.layers,J)}catch(ne){console.warn("Unable to compute style diff:",ne),J=[{command:da.setStyle,args:[D]}]}return J}var En=function(D,J){this.reset(D,J)};En.prototype.reset=function(D,J){this.points=D||[],this._distances=[0];for(var O=1;O<this.points.length;O++)this._distances[O]=this._distances[O-1]+this.points[O].dist(this.points[O-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(J||0,this.length*.5),this.paddedLength=this.length-this.padding*2},En.prototype.lerp=function(D){if(this.points.length===1)return this.points[0];D=i.clamp(D,0,1);for(var J=1,O=this._distances[J],K=D*this.paddedLength+this.padding;O<K&&J<this._distances.length;)O=this._distances[++J];var de=J-1,ne=this._distances[de],be=O-ne,Be=be>0?(K-ne)/be:0;return this.points[de].mult(1-Be).add(this.points[J].mult(Be))};var ki=function(D,J,O){var K=this.boxCells=[],de=this.circleCells=[];this.xCellCount=Math.ceil(D/O),this.yCellCount=Math.ceil(J/O);for(var ne=0;ne<this.xCellCount*this.yCellCount;ne++)K.push([]),de.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=D,this.height=J,this.xScale=this.xCellCount/D,this.yScale=this.yCellCount/J,this.boxUid=0,this.circleUid=0};ki.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},ki.prototype.insert=function(D,J,O,K,de){this._forEachCell(J,O,K,de,this._insertBoxCell,this.boxUid++),this.boxKeys.push(D),this.bboxes.push(J),this.bboxes.push(O),this.bboxes.push(K),this.bboxes.push(de)},ki.prototype.insertCircle=function(D,J,O,K){this._forEachCell(J-K,O-K,J+K,O+K,this._insertCircleCell,this.circleUid++),this.circleKeys.push(D),this.circles.push(J),this.circles.push(O),this.circles.push(K)},ki.prototype._insertBoxCell=function(D,J,O,K,de,ne){this.boxCells[de].push(ne)},ki.prototype._insertCircleCell=function(D,J,O,K,de,ne){this.circleCells[de].push(ne)},ki.prototype._query=function(D,J,O,K,de,ne){if(O<0||D>this.width||K<0||J>this.height)return de?!1:[];var be=[];if(D<=0&&J<=0&&this.width<=O&&this.height<=K){if(de)return!0;for(var Be=0;Be<this.boxKeys.length;Be++)be.push({key:this.boxKeys[Be],x1:this.bboxes[Be*4],y1:this.bboxes[Be*4+1],x2:this.bboxes[Be*4+2],y2:this.bboxes[Be*4+3]});for(var ht=0;ht<this.circleKeys.length;ht++){var Yt=this.circles[ht*3],cr=this.circles[ht*3+1],Nt=this.circles[ht*3+2];be.push({key:this.circleKeys[ht],x1:Yt-Nt,y1:cr-Nt,x2:Yt+Nt,y2:cr+Nt})}return ne?be.filter(ne):be}else{var Ne={hitTest:de,seenUids:{box:{},circle:{}}};return this._forEachCell(D,J,O,K,this._queryCell,be,Ne,ne),de?be.length>0:be}},ki.prototype._queryCircle=function(D,J,O,K,de){var ne=D-O,be=D+O,Be=J-O,ht=J+O;if(be<0||ne>this.width||ht<0||Be>this.height)return K?!1:[];var Yt=[],cr={hitTest:K,circle:{x:D,y:J,radius:O},seenUids:{box:{},circle:{}}};return this._forEachCell(ne,Be,be,ht,this._queryCellCircle,Yt,cr,de),K?Yt.length>0:Yt},ki.prototype.query=function(D,J,O,K,de){return this._query(D,J,O,K,!1,de)},ki.prototype.hitTest=function(D,J,O,K,de){return this._query(D,J,O,K,!0,de)},ki.prototype.hitTestCircle=function(D,J,O,K){return this._queryCircle(D,J,O,!0,K)},ki.prototype._queryCell=function(D,J,O,K,de,ne,be,Be){var ht=be.seenUids,Yt=this.boxCells[de];if(Yt!==null)for(var cr=this.bboxes,Nt=0,Ne=Yt;Nt<Ne.length;Nt+=1){var $e=Ne[Nt];if(!ht.box[$e]){ht.box[$e]=!0;var ot=$e*4;if(D<=cr[ot+2]&&J<=cr[ot+3]&&O>=cr[ot+0]&&K>=cr[ot+1]&&(!Be||Be(this.boxKeys[$e]))){if(be.hitTest)return ne.push(!0),!0;ne.push({key:this.boxKeys[$e],x1:cr[ot],y1:cr[ot+1],x2:cr[ot+2],y2:cr[ot+3]})}}}var It=this.circleCells[de];if(It!==null)for(var Bt=this.circles,Ft=0,Ut=It;Ft<Ut.length;Ft+=1){var zt=Ut[Ft];if(!ht.circle[zt]){ht.circle[zt]=!0;var _t=zt*3;if(this._circleAndRectCollide(Bt[_t],Bt[_t+1],Bt[_t+2],D,J,O,K)&&(!Be||Be(this.circleKeys[zt]))){if(be.hitTest)return ne.push(!0),!0;var Dt=Bt[_t],vt=Bt[_t+1],lr=Bt[_t+2];ne.push({key:this.circleKeys[zt],x1:Dt-lr,y1:vt-lr,x2:Dt+lr,y2:vt+lr})}}}},ki.prototype._queryCellCircle=function(D,J,O,K,de,ne,be,Be){var ht=be.circle,Yt=be.seenUids,cr=this.boxCells[de];if(cr!==null)for(var Nt=this.bboxes,Ne=0,$e=cr;Ne<$e.length;Ne+=1){var ot=$e[Ne];if(!Yt.box[ot]){Yt.box[ot]=!0;var It=ot*4;if(this._circleAndRectCollide(ht.x,ht.y,ht.radius,Nt[It+0],Nt[It+1],Nt[It+2],Nt[It+3])&&(!Be||Be(this.boxKeys[ot])))return ne.push(!0),!0}}var Bt=this.circleCells[de];if(Bt!==null)for(var Ft=this.circles,Ut=0,zt=Bt;Ut<zt.length;Ut+=1){var _t=zt[Ut];if(!Yt.circle[_t]){Yt.circle[_t]=!0;var Dt=_t*3;if(this._circlesCollide(Ft[Dt],Ft[Dt+1],Ft[Dt+2],ht.x,ht.y,ht.radius)&&(!Be||Be(this.circleKeys[_t])))return ne.push(!0),!0}}},ki.prototype._forEachCell=function(D,J,O,K,de,ne,be,Be){for(var ht=this._convertToXCellCoord(D),Yt=this._convertToYCellCoord(J),cr=this._convertToXCellCoord(O),Nt=this._convertToYCellCoord(K),Ne=ht;Ne<=cr;Ne++)for(var $e=Yt;$e<=Nt;$e++){var ot=this.xCellCount*$e+Ne;if(de.call(this,D,J,O,K,ot,ne,be,Be))return}},ki.prototype._convertToXCellCoord=function(D){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(D*this.xScale)))},ki.prototype._convertToYCellCoord=function(D){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(D*this.yScale)))},ki.prototype._circlesCollide=function(D,J,O,K,de,ne){var be=K-D,Be=de-J,ht=O+ne;return ht*ht>be*be+Be*Be},ki.prototype._circleAndRectCollide=function(D,J,O,K,de,ne,be){var Be=(ne-K)/2,ht=Math.abs(D-(K+Be));if(ht>Be+O)return!1;var Yt=(be-de)/2,cr=Math.abs(J-(de+Yt));if(cr>Yt+O)return!1;if(ht<=Be||cr<=Yt)return!0;var Nt=ht-Be,Ne=cr-Yt;return Nt*Nt+Ne*Ne<=O*O};function _n(Y,D,J,O,K){var de=i.create();return D?(i.scale(de,de,[1/K,1/K,1]),J||i.rotateZ(de,de,O.angle)):i.multiply(de,O.labelPlaneMatrix,Y),de}function ya(Y,D,J,O,K){if(D){var de=i.clone(Y);return i.scale(de,de,[K,K,1]),J||i.rotateZ(de,de,-O.angle),de}else return O.glCoordMatrix}function ea(Y,D){var J=[Y.x,Y.y,0,1];zl(J,J,D);var O=J[3];return{point:new i.Point(J[0]/O,J[1]/O),signedDistanceFromCamera:O}}function Ma(Y,D){return .5+.5*(Y/D)}function _o(Y,D){var J=Y[0]/Y[3],O=Y[1]/Y[3],K=J>=-D[0]&&J<=D[0]&&O>=-D[1]&&O<=D[1];return K}function No(Y,D,J,O,K,de,ne,be){var Be=O?Y.textSizeData:Y.iconSizeData,ht=i.evaluateSizeForZoom(Be,J.transform.zoom),Yt=[256/J.width*2+1,256/J.height*2+1],cr=O?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;cr.clear();for(var Nt=Y.lineVertexArray,Ne=O?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,$e=J.transform.width/J.transform.height,ot=!1,It=0;It<Ne.length;It++){var Bt=Ne.get(It);if(Bt.hidden||Bt.writingMode===i.WritingMode.vertical&&!ot){ul(Bt.numGlyphs,cr);continue}ot=!1;var Ft=[Bt.anchorX,Bt.anchorY,0,1];if(i.transformMat4(Ft,Ft,D),!_o(Ft,Yt)){ul(Bt.numGlyphs,cr);continue}var Ut=Ft[3],zt=Ma(J.transform.cameraToCenterDistance,Ut),_t=i.evaluateSizeForFeature(Be,ht,Bt),Dt=ne?_t/zt:_t*zt,vt=new i.Point(Bt.anchorX,Bt.anchorY),lr=ea(vt,K).point,yr={},Br=ko(Bt,Dt,!1,be,D,K,de,Y.glyphOffsetArray,Nt,cr,lr,vt,yr,$e);ot=Br.useVertical,(Br.notEnoughRoom||ot||Br.needsFlipping&&ko(Bt,Dt,!0,be,D,K,de,Y.glyphOffsetArray,Nt,cr,lr,vt,yr,$e).notEnoughRoom)&&ul(Bt.numGlyphs,cr)}O?Y.text.dynamicLayoutVertexBuffer.updateData(cr):Y.icon.dynamicLayoutVertexBuffer.updateData(cr)}function po(Y,D,J,O,K,de,ne,be,Be,ht,Yt){var cr=be.glyphStartIndex+be.numGlyphs,Nt=be.lineStartIndex,Ne=be.lineStartIndex+be.lineLength,$e=D.getoffsetX(be.glyphStartIndex),ot=D.getoffsetX(cr-1),It=Fs(Y*$e,J,O,K,de,ne,be.segment,Nt,Ne,Be,ht,Yt);if(!It)return null;var Bt=Fs(Y*ot,J,O,K,de,ne,be.segment,Nt,Ne,Be,ht,Yt);return Bt?{first:It,last:Bt}:null}function Lo(Y,D,J,O){if(Y===i.WritingMode.horizontal){var K=Math.abs(J.y-D.y),de=Math.abs(J.x-D.x)*O;if(K>de)return{useVertical:!0}}return(Y===i.WritingMode.vertical?D.y<J.y:D.x>J.x)?{needsFlipping:!0}:null}function ko(Y,D,J,O,K,de,ne,be,Be,ht,Yt,cr,Nt,Ne){var $e=D/24,ot=Y.lineOffsetX*$e,It=Y.lineOffsetY*$e,Bt;if(Y.numGlyphs>1){var Ft=Y.glyphStartIndex+Y.numGlyphs,Ut=Y.lineStartIndex,zt=Y.lineStartIndex+Y.lineLength,_t=po($e,be,ot,It,J,Yt,cr,Y,Be,de,Nt);if(!_t)return{notEnoughRoom:!0};var Dt=ea(_t.first.point,ne).point,vt=ea(_t.last.point,ne).point;if(O&&!J){var lr=Lo(Y.writingMode,Dt,vt,Ne);if(lr)return lr}Bt=[_t.first];for(var yr=Y.glyphStartIndex+1;yr<Ft-1;yr++)Bt.push(Fs($e*be.getoffsetX(yr),ot,It,J,Yt,cr,Y.segment,Ut,zt,Be,de,Nt));Bt.push(_t.last)}else{if(O&&!J){var Br=ea(cr,K).point,Di=Y.lineStartIndex+Y.segment+1,ci=new i.Point(Be.getx(Di),Be.gety(Di)),bi=ea(ci,K),gn=bi.signedDistanceFromCamera>0?bi.point:Ds(cr,ci,Br,1,K),tn=Lo(Y.writingMode,Br,gn,Ne);if(tn)return tn}var Ei=Fs($e*be.getoffsetX(Y.glyphStartIndex),ot,It,J,Yt,cr,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,Be,de,Nt);if(!Ei)return{notEnoughRoom:!0};Bt=[Ei]}for(var Oi=0,Gi=Bt;Oi<Gi.length;Oi+=1){var on=Gi[Oi];i.addDynamicAttributes(ht,on.point,on.angle)}return{}}function Ds(Y,D,J,O,K){var de=ea(Y.add(Y.sub(D)._unit()),K).point,ne=J.sub(de);return J.add(ne._mult(O/ne.mag()))}function Fs(Y,D,J,O,K,de,ne,be,Be,ht,Yt,cr){var Nt=O?Y-D:Y+D,Ne=Nt>0?1:-1,$e=0;O&&(Ne*=-1,$e=Math.PI),Ne<0&&($e+=Math.PI);for(var ot=Ne>0?be+ne:be+ne+1,It=K,Bt=K,Ft=0,Ut=0,zt=Math.abs(Nt),_t=[];Ft+Ut<=zt;){if(ot+=Ne,ot<be||ot>=Be)return null;if(Bt=It,_t.push(It),It=cr[ot],It===void 0){var Dt=new i.Point(ht.getx(ot),ht.gety(ot)),vt=ea(Dt,Yt);if(vt.signedDistanceFromCamera>0)It=cr[ot]=vt.point;else{var lr=ot-Ne,yr=Ft===0?de:new i.Point(ht.getx(lr),ht.gety(lr));It=Ds(yr,Dt,Bt,zt-Ft+1,Yt)}}Ft+=Ut,Ut=Bt.dist(It)}var Br=(zt-Ft)/Ut,Di=It.sub(Bt),ci=Di.mult(Br)._add(Bt);ci._add(Di._unit()._perp()._mult(J*Ne));var bi=$e+Math.atan2(It.y-Bt.y,It.x-Bt.x);return _t.push(ci),{point:ci,angle:bi,path:_t}}var ll=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ul(Y,D){for(var J=0;J<Y;J++){var O=D.length;D.resize(O+4),D.float32.set(ll,O*3)}}function zl(Y,D,J){var O=D[0],K=D[1];return Y[0]=J[0]*O+J[4]*K+J[12],Y[1]=J[1]*O+J[5]*K+J[13],Y[3]=J[3]*O+J[7]*K+J[15],Y}var us=100,il=function(D,J,O){J===void 0&&(J=new ki(D.width+2*us,D.height+2*us,25)),O===void 0&&(O=new ki(D.width+2*us,D.height+2*us,25)),this.transform=D,this.grid=J,this.ignoredGrid=O,this.pitchfactor=Math.cos(D._pitch)*D.cameraToCenterDistance,this.screenRightBoundary=D.width+us,this.screenBottomBoundary=D.height+us,this.gridRightBoundary=D.width+2*us,this.gridBottomBoundary=D.height+2*us};il.prototype.placeCollisionBox=function(D,J,O,K,de){var ne=this.projectAndGetPerspectiveRatio(K,D.anchorPointX,D.anchorPointY),be=O*ne.perspectiveRatio,Be=D.x1*be+ne.point.x,ht=D.y1*be+ne.point.y,Yt=D.x2*be+ne.point.x,cr=D.y2*be+ne.point.y;return!this.isInsideGrid(Be,ht,Yt,cr)||!J&&this.grid.hitTest(Be,ht,Yt,cr,de)?{box:[],offscreen:!1}:{box:[Be,ht,Yt,cr],offscreen:this.isOffscreen(Be,ht,Yt,cr)}},il.prototype.placeCollisionCircles=function(D,J,O,K,de,ne,be,Be,ht,Yt,cr,Nt,Ne){var $e=[],ot=new i.Point(J.anchorX,J.anchorY),It=ea(ot,ne),Bt=Ma(this.transform.cameraToCenterDistance,It.signedDistanceFromCamera),Ft=Yt?de/Bt:de*Bt,Ut=Ft/i.ONE_EM,zt=ea(ot,be).point,_t={},Dt=J.lineOffsetX*Ut,vt=J.lineOffsetY*Ut,lr=po(Ut,K,Dt,vt,!1,zt,ot,J,O,be,_t),yr=!1,Br=!1,Di=!0;if(lr){for(var ci=Nt*.5*Bt+Ne,bi=new i.Point(-us,-us),gn=new i.Point(this.screenRightBoundary,this.screenBottomBoundary),tn=new En,Ei=lr.first,Oi=lr.last,Gi=[],on=Ei.path.length-1;on>=1;on--)Gi.push(Ei.path[on]);for(var zn=1;zn<Oi.path.length;zn++)Gi.push(Oi.path[zn]);var Ja=ci*2.5;if(Be){var co=Gi.map(function(Iv){return ea(Iv,Be)});co.some(function(Iv){return Iv.signedDistanceFromCamera<=0})?Gi=[]:Gi=co.map(function(Iv){return Iv.point})}var ts=[];if(Gi.length>0){for(var so=Gi[0].clone(),Yo=Gi[0].clone(),ms=1;ms<Gi.length;ms++)so.x=Math.min(so.x,Gi[ms].x),so.y=Math.min(so.y,Gi[ms].y),Yo.x=Math.max(Yo.x,Gi[ms].x),Yo.y=Math.max(Yo.y,Gi[ms].y);so.x>=bi.x&&Yo.x<=gn.x&&so.y>=bi.y&&Yo.y<=gn.y?ts=[Gi]:Yo.x<bi.x||so.x>gn.x||Yo.y<bi.y||so.y>gn.y?ts=[]:ts=i.clipLine([Gi],bi.x,bi.y,gn.x,gn.y)}for(var ou=0,Cv=ts;ou<Cv.length;ou+=1){var Lv=Cv[ou];tn.reset(Lv,ci*.25);var wd=0;tn.length<=.5*ci?wd=1:wd=Math.ceil(tn.paddedLength/Ja)+1;for(var Kv=0;Kv<wd;Kv++){var hg=Kv/Math.max(wd-1,1),gp=tn.lerp(hg),Td=gp.x+us,mp=gp.y+us;$e.push(Td,mp,ci,0);var Ud=Td-ci,Ad=mp-ci,Pv=Td+ci,Jv=mp+ci;if(Di=Di&&this.isOffscreen(Ud,Ad,Pv,Jv),Br=Br||this.isInsideGrid(Ud,Ad,Pv,Jv),!D&&this.grid.hitTestCircle(Td,mp,ci,cr)&&(yr=!0,!ht))return{circles:[],offscreen:!1,collisionDetected:yr}}}}return{circles:!ht&&yr||!Br?[]:$e,offscreen:Di,collisionDetected:yr}},il.prototype.queryRenderedSymbols=function(D){if(D.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var J=[],O=1/0,K=1/0,de=-1/0,ne=-1/0,be=0,Be=D;be<Be.length;be+=1){var ht=Be[be],Yt=new i.Point(ht.x+us,ht.y+us);O=Math.min(O,Yt.x),K=Math.min(K,Yt.y),de=Math.max(de,Yt.x),ne=Math.max(ne,Yt.y),J.push(Yt)}for(var cr=this.grid.query(O,K,de,ne).concat(this.ignoredGrid.query(O,K,de,ne)),Nt={},Ne={},$e=0,ot=cr;$e<ot.length;$e+=1){var It=ot[$e],Bt=It.key;if(Nt[Bt.bucketInstanceId]===void 0&&(Nt[Bt.bucketInstanceId]={}),!Nt[Bt.bucketInstanceId][Bt.featureIndex]){var Ft=[new i.Point(It.x1,It.y1),new i.Point(It.x2,It.y1),new i.Point(It.x2,It.y2),new i.Point(It.x1,It.y2)];i.polygonIntersectsPolygon(J,Ft)&&(Nt[Bt.bucketInstanceId][Bt.featureIndex]=!0,Ne[Bt.bucketInstanceId]===void 0&&(Ne[Bt.bucketInstanceId]=[]),Ne[Bt.bucketInstanceId].push(Bt.featureIndex))}}return Ne},il.prototype.insertCollisionBox=function(D,J,O,K,de){var ne=J?this.ignoredGrid:this.grid,be={bucketInstanceId:O,featureIndex:K,collisionGroupID:de};ne.insert(be,D[0],D[1],D[2],D[3])},il.prototype.insertCollisionCircles=function(D,J,O,K,de){for(var ne=J?this.ignoredGrid:this.grid,be={bucketInstanceId:O,featureIndex:K,collisionGroupID:de},Be=0;Be<D.length;Be+=4)ne.insertCircle(be,D[Be],D[Be+1],D[Be+2])},il.prototype.projectAndGetPerspectiveRatio=function(D,J,O){var K=[J,O,0,1];zl(K,K,D);var de=new i.Point((K[0]/K[3]+1)/2*this.transform.width+us,(-K[1]/K[3]+1)/2*this.transform.height+us);return{point:de,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/K[3])}},il.prototype.isOffscreen=function(D,J,O,K){return O<us||D>=this.screenRightBoundary||K<us||J>this.screenBottomBoundary},il.prototype.isInsideGrid=function(D,J,O,K){return O>=0&&D<this.gridRightBoundary&&K>=0&&J<this.gridBottomBoundary},il.prototype.getViewportMatrix=function(){var D=i.identity([]);return i.translate(D,D,[-us,-us,0]),D};function As(Y,D,J){return D*(i.EXTENT/(Y.tileSize*Math.pow(2,J-Y.tileID.overscaledZ)))}var cl=function(D,J,O,K){D?this.opacity=Math.max(0,Math.min(1,D.opacity+(D.placed?J:-J))):this.opacity=K&&O?1:0,this.placed=O};cl.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Ks=function(D,J,O,K,de){this.text=new cl(D?D.text:null,J,O,de),this.icon=new cl(D?D.icon:null,J,K,de)};Ks.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var zs=function(D,J,O){this.text=D,this.icon=J,this.skipFade=O},Io=function(){this.invProjMatrix=i.create(),this.viewportMatrix=i.create(),this.circles=[]},ls=function(D,J,O,K,de){this.bucketInstanceId=D,this.featureIndex=J,this.sourceLayerIndex=O,this.bucketIndex=K,this.tileID=de},Yl=function(D){this.crossSourceCollisions=D,this.maxGroupID=0,this.collisionGroups={}};Yl.prototype.get=function(D){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[D]){var J=++this.maxGroupID;this.collisionGroups[D]={ID:J,predicate:function(O){return O.collisionGroupID===J}}}return this.collisionGroups[D]};function Su(Y,D,J,O,K){var de=i.getAnchorAlignment(Y),ne=de.horizontalAlign,be=de.verticalAlign,Be=-(ne-.5)*D,ht=-(be-.5)*J,Yt=i.evaluateVariableOffset(Y,O);return new i.Point(Be+Yt[0]*K,ht+Yt[1]*K)}function nc(Y,D,J,O,K,de){var ne=Y.x1,be=Y.x2,Be=Y.y1,ht=Y.y2,Yt=Y.anchorPointX,cr=Y.anchorPointY,Nt=new i.Point(D,J);return O&&Nt._rotate(K?de:-de),{x1:ne+Nt.x,y1:Be+Nt.y,x2:be+Nt.x,y2:ht+Nt.y,anchorPointX:Yt,anchorPointY:cr}}var bs=function(D,J,O,K){this.transform=D.clone(),this.collisionIndex=new il(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=J,this.retainedQueryData={},this.collisionGroups=new Yl(O),this.collisionCircleArrays={},this.prevPlacement=K,K&&(K.prevPlacement=void 0),this.placedOrientations={}};bs.prototype.getBucketParts=function(D,J,O,K){var de=O.getBucket(J),ne=O.latestFeatureIndex;if(!(!de||!ne||J.id!==de.layerIds[0])){var be=O.collisionBoxArray,Be=de.layers[0].layout,ht=Math.pow(2,this.transform.zoom-O.tileID.overscaledZ),Yt=O.tileSize/i.EXTENT,cr=this.transform.calculatePosMatrix(O.tileID.toUnwrapped()),Nt=Be.get("text-pitch-alignment")==="map",Ne=Be.get("text-rotation-alignment")==="map",$e=As(O,1,this.transform.zoom),ot=_n(cr,Nt,Ne,this.transform,$e),It=null;if(Nt){var Bt=ya(cr,Nt,Ne,this.transform,$e);It=i.multiply([],this.transform.labelPlaneMatrix,Bt)}this.retainedQueryData[de.bucketInstanceId]=new ls(de.bucketInstanceId,ne,de.sourceLayerIndex,de.index,O.tileID);var Ft={bucket:de,layout:Be,posMatrix:cr,textLabelPlaneMatrix:ot,labelToScreenMatrix:It,scale:ht,textPixelRatio:Yt,holdingForFade:O.holdingForFade(),collisionBoxArray:be,partiallyEvaluatedTextSize:i.evaluateSizeForZoom(de.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(de.sourceID)};if(K)for(var Ut=0,zt=de.sortKeyRanges;Ut<zt.length;Ut+=1){var _t=zt[Ut],Dt=_t.sortKey,vt=_t.symbolInstanceStart,lr=_t.symbolInstanceEnd;D.push({sortKey:Dt,symbolInstanceStart:vt,symbolInstanceEnd:lr,parameters:Ft})}else D.push({symbolInstanceStart:0,symbolInstanceEnd:de.symbolInstances.length,parameters:Ft})}},bs.prototype.attemptAnchorPlacement=function(D,J,O,K,de,ne,be,Be,ht,Yt,cr,Nt,Ne,$e,ot){var It=[Nt.textOffset0,Nt.textOffset1],Bt=Su(D,O,K,It,de),Ft=this.collisionIndex.placeCollisionBox(nc(J,Bt.x,Bt.y,ne,be,this.transform.angle),cr,Be,ht,Yt.predicate);if(ot){var Ut=this.collisionIndex.placeCollisionBox(nc(ot,Bt.x,Bt.y,ne,be,this.transform.angle),cr,Be,ht,Yt.predicate);if(Ut.box.length===0)return}if(Ft.box.length>0){var zt;return this.prevPlacement&&this.prevPlacement.variableOffsets[Nt.crossTileID]&&this.prevPlacement.placements[Nt.crossTileID]&&this.prevPlacement.placements[Nt.crossTileID].text&&(zt=this.prevPlacement.variableOffsets[Nt.crossTileID].anchor),this.variableOffsets[Nt.crossTileID]={textOffset:It,width:O,height:K,anchor:D,textBoxScale:de,prevAnchor:zt},this.markUsedJustification(Ne,D,Nt,$e),Ne.allowVerticalPlacement&&(this.markUsedOrientation(Ne,$e,Nt),this.placedOrientations[Nt.crossTileID]=$e),{shift:Bt,placedGlyphBoxes:Ft}}},bs.prototype.placeLayerBucketPart=function(D,J,O){var K=this,de=D.parameters,ne=de.bucket,be=de.layout,Be=de.posMatrix,ht=de.textLabelPlaneMatrix,Yt=de.labelToScreenMatrix,cr=de.textPixelRatio,Nt=de.holdingForFade,Ne=de.collisionBoxArray,$e=de.partiallyEvaluatedTextSize,ot=de.collisionGroup,It=be.get("text-optional"),Bt=be.get("icon-optional"),Ft=be.get("text-allow-overlap"),Ut=be.get("icon-allow-overlap"),zt=be.get("text-rotation-alignment")==="map",_t=be.get("text-pitch-alignment")==="map",Dt=be.get("icon-text-fit")!=="none",vt=be.get("symbol-z-order")==="viewport-y",lr=Ft&&(Ut||!ne.hasIconData()||Bt),yr=Ut&&(Ft||!ne.hasTextData()||It);!ne.collisionArrays&&Ne&&ne.deserializeCollisionBoxes(Ne);var Br=function(Ei,Oi){if(!J[Ei.crossTileID]){if(Nt){K.placements[Ei.crossTileID]=new zs(!1,!1,!1);return}var Gi=!1,on=!1,zn=!0,Ja=null,co={box:null,offscreen:null},ts={box:null,offscreen:null},so=null,Yo=null,ms=null,ou=0,Cv=0,Lv=0;Oi.textFeatureIndex?ou=Oi.textFeatureIndex:Ei.useRuntimeCollisionCircles&&(ou=Ei.featureIndex),Oi.verticalTextFeatureIndex&&(Cv=Oi.verticalTextFeatureIndex);var wd=Oi.textBox;if(wd){var Kv=function(vc){var tu=i.WritingMode.horizontal;if(ne.allowVerticalPlacement&&!vc&&K.prevPlacement){var Sd=K.prevPlacement.placedOrientations[Ei.crossTileID];Sd&&(K.placedOrientations[Ei.crossTileID]=Sd,tu=Sd,K.markUsedOrientation(ne,tu,Ei))}return tu},hg=function(vc,tu){if(ne.allowVerticalPlacement&&Ei.numVerticalGlyphVertices>0&&Oi.verticalTextBox)for(var Sd=0,vy=ne.writingModes;Sd<vy.length;Sd+=1){var L1=vy[Sd];if(L1===i.WritingMode.vertical?(co=tu(),ts=co):co=vc(),co&&co.box&&co.box.length)break}else co=vc()};if(be.get("text-variable-anchor")){var Ud=be.get("text-variable-anchor");if(K.prevPlacement&&K.prevPlacement.variableOffsets[Ei.crossTileID]){var Ad=K.prevPlacement.variableOffsets[Ei.crossTileID];Ud.indexOf(Ad.anchor)>0&&(Ud=Ud.filter(function(vc){return vc!==Ad.anchor}),Ud.unshift(Ad.anchor))}var Pv=function(vc,tu,Sd){for(var vy=vc.x2-vc.x1,L1=vc.y2-vc.y1,wu=Ei.textBoxScale,Yx=Dt&&!Ut?tu:null,lm={box:[],offscreen:!1},Ow=Ft?Ud.length*2:Ud.length,Rv=0;Rv<Ow;++Rv){var um=Ud[Rv%Ud.length],Bw=Rv>=Ud.length,Kx=K.attemptAnchorPlacement(um,vc,vy,L1,wu,zt,_t,cr,Be,ot,Bw,Ei,ne,Sd,Yx);if(Kx&&(lm=Kx.placedGlyphBoxes,lm&&lm.box&&lm.box.length)){Gi=!0,Ja=Kx.shift;break}}return lm},Jv=function(){return Pv(wd,Oi.iconBox,i.WritingMode.horizontal)},Iv=function(){var vc=Oi.verticalTextBox,tu=co&&co.box&&co.box.length;return ne.allowVerticalPlacement&&!tu&&Ei.numVerticalGlyphVertices>0&&vc?Pv(vc,Oi.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};hg(Jv,Iv),co&&(Gi=co.box,zn=co.offscreen);var fy=Kv(co&&co.box);if(!Gi&&K.prevPlacement){var dg=K.prevPlacement.variableOffsets[Ei.crossTileID];dg&&(K.variableOffsets[Ei.crossTileID]=dg,K.markUsedJustification(ne,dg.anchor,Ei,fy))}}else{var gp=function(vc,tu){var Sd=K.collisionIndex.placeCollisionBox(vc,Ft,cr,Be,ot.predicate);return Sd&&Sd.box&&Sd.box.length&&(K.markUsedOrientation(ne,tu,Ei),K.placedOrientations[Ei.crossTileID]=tu),Sd},Td=function(){return gp(wd,i.WritingMode.horizontal)},mp=function(){var vc=Oi.verticalTextBox;return ne.allowVerticalPlacement&&Ei.numVerticalGlyphVertices>0&&vc?gp(vc,i.WritingMode.vertical):{box:null,offscreen:null}};hg(Td,mp),Kv(co&&co.box&&co.box.length)}}if(so=co,Gi=so&&so.box&&so.box.length>0,zn=so&&so.offscreen,Ei.useRuntimeCollisionCircles){var oh=ne.text.placedSymbolArray.get(Ei.centerJustifiedTextSymbolIndex),vg=i.evaluateSizeForFeature(ne.textSizeData,$e,oh),hy=be.get("text-padding"),Zh=Ei.collisionCircleDiameter;Yo=K.collisionIndex.placeCollisionCircles(Ft,oh,ne.lineVertexArray,ne.glyphOffsetArray,vg,Be,ht,Yt,O,_t,ot.predicate,Zh,hy),Gi=Ft||Yo.circles.length>0&&!Yo.collisionDetected,zn=zn&&Yo.offscreen}if(Oi.iconFeatureIndex&&(Lv=Oi.iconFeatureIndex),Oi.iconBox){var am=function(vc){var tu=Dt&&Ja?nc(vc,Ja.x,Ja.y,zt,_t,K.transform.angle):vc;return K.collisionIndex.placeCollisionBox(tu,Ut,cr,Be,ot.predicate)};ts&&ts.box&&ts.box.length&&Oi.verticalIconBox?(ms=am(Oi.verticalIconBox),on=ms.box.length>0):(ms=am(Oi.iconBox),on=ms.box.length>0),zn=zn&&ms.offscreen}var k1=It||Ei.numHorizontalGlyphVertices===0&&Ei.numVerticalGlyphVertices===0,C1=Bt||Ei.numIconVertices===0;if(!k1&&!C1?on=Gi=on&&Gi:C1?k1||(on=on&&Gi):Gi=on&&Gi,Gi&&so&&so.box&&(ts&&ts.box&&Cv?K.collisionIndex.insertCollisionBox(so.box,be.get("text-ignore-placement"),ne.bucketInstanceId,Cv,ot.ID):K.collisionIndex.insertCollisionBox(so.box,be.get("text-ignore-placement"),ne.bucketInstanceId,ou,ot.ID)),on&&ms&&K.collisionIndex.insertCollisionBox(ms.box,be.get("icon-ignore-placement"),ne.bucketInstanceId,Lv,ot.ID),Yo&&(Gi&&K.collisionIndex.insertCollisionCircles(Yo.circles,be.get("text-ignore-placement"),ne.bucketInstanceId,ou,ot.ID),O)){var dy=ne.bucketInstanceId,om=K.collisionCircleArrays[dy];om===void 0&&(om=K.collisionCircleArrays[dy]=new Io);for(var sm=0;sm<Yo.circles.length;sm+=4)om.circles.push(Yo.circles[sm+0]),om.circles.push(Yo.circles[sm+1]),om.circles.push(Yo.circles[sm+2]),om.circles.push(Yo.collisionDetected?1:0)}K.placements[Ei.crossTileID]=new zs(Gi||lr,on||yr,zn||ne.justReloaded),J[Ei.crossTileID]=!0}};if(vt)for(var Di=ne.getSortedSymbolIndexes(this.transform.angle),ci=Di.length-1;ci>=0;--ci){var bi=Di[ci];Br(ne.symbolInstances.get(bi),ne.collisionArrays[bi])}else for(var gn=D.symbolInstanceStart;gn<D.symbolInstanceEnd;gn++)Br(ne.symbolInstances.get(gn),ne.collisionArrays[gn]);if(O&&ne.bucketInstanceId in this.collisionCircleArrays){var tn=this.collisionCircleArrays[ne.bucketInstanceId];i.invert(tn.invProjMatrix,Be),tn.viewportMatrix=this.collisionIndex.getViewportMatrix()}ne.justReloaded=!1},bs.prototype.markUsedJustification=function(D,J,O,K){var de={left:O.leftJustifiedTextSymbolIndex,center:O.centerJustifiedTextSymbolIndex,right:O.rightJustifiedTextSymbolIndex},ne;K===i.WritingMode.vertical?ne=O.verticalPlacedTextSymbolIndex:ne=de[i.getAnchorJustification(J)];for(var be=[O.leftJustifiedTextSymbolIndex,O.centerJustifiedTextSymbolIndex,O.rightJustifiedTextSymbolIndex,O.verticalPlacedTextSymbolIndex],Be=0,ht=be;Be<ht.length;Be+=1){var Yt=ht[Be];Yt>=0&&(ne>=0&&Yt!==ne?D.text.placedSymbolArray.get(Yt).crossTileID=0:D.text.placedSymbolArray.get(Yt).crossTileID=O.crossTileID)}},bs.prototype.markUsedOrientation=function(D,J,O){for(var K=J===i.WritingMode.horizontal||J===i.WritingMode.horizontalOnly?J:0,de=J===i.WritingMode.vertical?J:0,ne=[O.leftJustifiedTextSymbolIndex,O.centerJustifiedTextSymbolIndex,O.rightJustifiedTextSymbolIndex],be=0,Be=ne;be<Be.length;be+=1){var ht=Be[be];D.text.placedSymbolArray.get(ht).placedOrientation=K}O.verticalPlacedTextSymbolIndex&&(D.text.placedSymbolArray.get(O.verticalPlacedTextSymbolIndex).placedOrientation=de)},bs.prototype.commit=function(D){this.commitTime=D,this.zoomAtLastRecencyCheck=this.transform.zoom;var J=this.prevPlacement,O=!1;this.prevZoomAdjustment=J?J.zoomAdjustment(this.transform.zoom):0;var K=J?J.symbolFadeChange(D):1,de=J?J.opacities:{},ne=J?J.variableOffsets:{},be=J?J.placedOrientations:{};for(var Be in this.placements){var ht=this.placements[Be],Yt=de[Be];Yt?(this.opacities[Be]=new Ks(Yt,K,ht.text,ht.icon),O=O||ht.text!==Yt.text.placed||ht.icon!==Yt.icon.placed):(this.opacities[Be]=new Ks(null,K,ht.text,ht.icon,ht.skipFade),O=O||ht.text||ht.icon)}for(var cr in de){var Nt=de[cr];if(!this.opacities[cr]){var Ne=new Ks(Nt,K,!1,!1);Ne.isHidden()||(this.opacities[cr]=Ne,O=O||Nt.text.placed||Nt.icon.placed)}}for(var $e in ne)!this.variableOffsets[$e]&&this.opacities[$e]&&!this.opacities[$e].isHidden()&&(this.variableOffsets[$e]=ne[$e]);for(var ot in be)!this.placedOrientations[ot]&&this.opacities[ot]&&!this.opacities[ot].isHidden()&&(this.placedOrientations[ot]=be[ot]);O?this.lastPlacementChangeTime=D:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=J?J.lastPlacementChangeTime:D)},bs.prototype.updateLayerOpacities=function(D,J){for(var O={},K=0,de=J;K<de.length;K+=1){var ne=de[K],be=ne.getBucket(D);be&&ne.latestFeatureIndex&&D.id===be.layerIds[0]&&this.updateBucketOpacities(be,O,ne.collisionBoxArray)}},bs.prototype.updateBucketOpacities=function(D,J,O){var K=this;D.hasTextData()&&D.text.opacityVertexArray.clear(),D.hasIconData()&&D.icon.opacityVertexArray.clear(),D.hasIconCollisionBoxData()&&D.iconCollisionBox.collisionVertexArray.clear(),D.hasTextCollisionBoxData()&&D.textCollisionBox.collisionVertexArray.clear();var de=D.layers[0].layout,ne=new Ks(null,0,!1,!1,!0),be=de.get("text-allow-overlap"),Be=de.get("icon-allow-overlap"),ht=de.get("text-variable-anchor"),Yt=de.get("text-rotation-alignment")==="map",cr=de.get("text-pitch-alignment")==="map",Nt=de.get("icon-text-fit")!=="none",Ne=new Ks(null,0,be&&(Be||!D.hasIconData()||de.get("icon-optional")),Be&&(be||!D.hasTextData()||de.get("text-optional")),!0);!D.collisionArrays&&O&&(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData())&&D.deserializeCollisionBoxes(O);for(var $e=function(Ft,Ut,zt){for(var _t=0;_t<Ut/4;_t++)Ft.opacityVertexArray.emplaceBack(zt)},ot=function(Ft){var Ut=D.symbolInstances.get(Ft),zt=Ut.numHorizontalGlyphVertices,_t=Ut.numVerticalGlyphVertices,Dt=Ut.crossTileID,vt=J[Dt],lr=K.opacities[Dt];vt?lr=ne:lr||(lr=Ne,K.opacities[Dt]=lr),J[Dt]=!0;var yr=zt>0||_t>0,Br=Ut.numIconVertices>0,Di=K.placedOrientations[Ut.crossTileID],ci=Di===i.WritingMode.vertical,bi=Di===i.WritingMode.horizontal||Di===i.WritingMode.horizontalOnly;if(yr){var gn=ac(lr.text),tn=ci?oa:gn;$e(D.text,zt,tn);var Ei=bi?oa:gn;$e(D.text,_t,Ei);var Oi=lr.text.isHidden();[Ut.rightJustifiedTextSymbolIndex,Ut.centerJustifiedTextSymbolIndex,Ut.leftJustifiedTextSymbolIndex].forEach(function(Lv){Lv>=0&&(D.text.placedSymbolArray.get(Lv).hidden=Oi||ci?1:0)}),Ut.verticalPlacedTextSymbolIndex>=0&&(D.text.placedSymbolArray.get(Ut.verticalPlacedTextSymbolIndex).hidden=Oi||bi?1:0);var Gi=K.variableOffsets[Ut.crossTileID];Gi&&K.markUsedJustification(D,Gi.anchor,Ut,Di);var on=K.placedOrientations[Ut.crossTileID];on&&(K.markUsedJustification(D,"left",Ut,on),K.markUsedOrientation(D,on,Ut))}if(Br){var zn=ac(lr.icon),Ja=!(Nt&&Ut.verticalPlacedIconSymbolIndex&&ci);if(Ut.placedIconSymbolIndex>=0){var co=Ja?zn:oa;$e(D.icon,Ut.numIconVertices,co),D.icon.placedSymbolArray.get(Ut.placedIconSymbolIndex).hidden=lr.icon.isHidden()}if(Ut.verticalPlacedIconSymbolIndex>=0){var ts=Ja?oa:zn;$e(D.icon,Ut.numVerticalIconVertices,ts),D.icon.placedSymbolArray.get(Ut.verticalPlacedIconSymbolIndex).hidden=lr.icon.isHidden()}}if(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData()){var so=D.collisionArrays[Ft];if(so){var Yo=new i.Point(0,0);if(so.textBox||so.verticalTextBox){var ms=!0;if(ht){var ou=K.variableOffsets[Dt];ou?(Yo=Su(ou.anchor,ou.width,ou.height,ou.textOffset,ou.textBoxScale),Yt&&Yo._rotate(cr?K.transform.angle:-K.transform.angle)):ms=!1}so.textBox&&Rn(D.textCollisionBox.collisionVertexArray,lr.text.placed,!ms||ci,Yo.x,Yo.y),so.verticalTextBox&&Rn(D.textCollisionBox.collisionVertexArray,lr.text.placed,!ms||bi,Yo.x,Yo.y)}var Cv=!!(!bi&&so.verticalIconBox);so.iconBox&&Rn(D.iconCollisionBox.collisionVertexArray,lr.icon.placed,Cv,Nt?Yo.x:0,Nt?Yo.y:0),so.verticalIconBox&&Rn(D.iconCollisionBox.collisionVertexArray,lr.icon.placed,!Cv,Nt?Yo.x:0,Nt?Yo.y:0)}}},It=0;It<D.symbolInstances.length;It++)ot(It);if(D.sortFeatures(this.transform.angle),this.retainedQueryData[D.bucketInstanceId]&&(this.retainedQueryData[D.bucketInstanceId].featureSortOrder=D.featureSortOrder),D.hasTextData()&&D.text.opacityVertexBuffer&&D.text.opacityVertexBuffer.updateData(D.text.opacityVertexArray),D.hasIconData()&&D.icon.opacityVertexBuffer&&D.icon.opacityVertexBuffer.updateData(D.icon.opacityVertexArray),D.hasIconCollisionBoxData()&&D.iconCollisionBox.collisionVertexBuffer&&D.iconCollisionBox.collisionVertexBuffer.updateData(D.iconCollisionBox.collisionVertexArray),D.hasTextCollisionBoxData()&&D.textCollisionBox.collisionVertexBuffer&&D.textCollisionBox.collisionVertexBuffer.updateData(D.textCollisionBox.collisionVertexArray),D.bucketInstanceId in this.collisionCircleArrays){var Bt=this.collisionCircleArrays[D.bucketInstanceId];D.placementInvProjMatrix=Bt.invProjMatrix,D.placementViewportMatrix=Bt.viewportMatrix,D.collisionCircleArray=Bt.circles,delete this.collisionCircleArrays[D.bucketInstanceId]}},bs.prototype.symbolFadeChange=function(D){return this.fadeDuration===0?1:(D-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},bs.prototype.zoomAdjustment=function(D){return Math.max(0,(this.transform.zoom-D)/1.5)},bs.prototype.hasTransitions=function(D){return this.stale||D-this.lastPlacementChangeTime<this.fadeDuration},bs.prototype.stillRecent=function(D,J){var O=this.zoomAtLastRecencyCheck===J?1-this.zoomAdjustment(J):1;return this.zoomAtLastRecencyCheck=J,this.commitTime+this.fadeDuration*O>D},bs.prototype.setStale=function(){this.stale=!0};function Rn(Y,D,J,O,K){Y.emplaceBack(D?1:0,J?1:0,O||0,K||0),Y.emplaceBack(D?1:0,J?1:0,O||0,K||0),Y.emplaceBack(D?1:0,J?1:0,O||0,K||0),Y.emplaceBack(D?1:0,J?1:0,O||0,K||0)}var _a=Math.pow(2,25),Vu=Math.pow(2,24),ql=Math.pow(2,17),xo=Math.pow(2,16),Kl=Math.pow(2,9),Ns=Math.pow(2,8),Hl=Math.pow(2,1);function ac(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var D=Y.placed?1:0,J=Math.floor(Y.opacity*127);return J*_a+D*Vu+J*ql+D*xo+J*Kl+D*Ns+J*Hl+D}var oa=0,qo=function(D){this._sortAcrossTiles=D.layout.get("symbol-z-order")!=="viewport-y"&&D.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};qo.prototype.continuePlacement=function(D,J,O,K,de){for(var ne=this._bucketParts;this._currentTileIndex<D.length;){var be=D[this._currentTileIndex];if(J.getBucketParts(ne,K,be,this._sortAcrossTiles),this._currentTileIndex++,de())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ne.sort(function(ht,Yt){return ht.sortKey-Yt.sortKey}));this._currentPartIndex<ne.length;){var Be=ne[this._currentPartIndex];if(J.placeLayerBucketPart(Be,this._seenCrossTileIDs,O),this._currentPartIndex++,de())return!0}return!1};var Oo=function(D,J,O,K,de,ne,be){this.placement=new bs(D,de,ne,be),this._currentPlacementIndex=J.length-1,this._forceFullPlacement=O,this._showCollisionBoxes=K,this._done=!1};Oo.prototype.isDone=function(){return this._done},Oo.prototype.continuePlacement=function(D,J,O){for(var K=this,de=i.browser.now(),ne=function(){var cr=i.browser.now()-de;return K._forceFullPlacement?!1:cr>2};this._currentPlacementIndex>=0;){var be=D[this._currentPlacementIndex],Be=J[be],ht=this.placement.collisionIndex.transform.zoom;if(Be.type==="symbol"&&(!Be.minzoom||Be.minzoom<=ht)&&(!Be.maxzoom||Be.maxzoom>ht)){this._inProgressLayer||(this._inProgressLayer=new qo(Be));var Yt=this._inProgressLayer.continuePlacement(O[Be.source],this.placement,this._showCollisionBoxes,Be,ne);if(Yt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Oo.prototype.commit=function(D){return this.placement.commit(D),this.placement};var Ol=512/i.EXTENT/2,Pc=function(D,J,O){this.tileID=D,this.indexedSymbolInstances={},this.bucketInstanceId=O;for(var K=0;K<J.length;K++){var de=J.get(K),ne=de.key;this.indexedSymbolInstances[ne]||(this.indexedSymbolInstances[ne]=[]),this.indexedSymbolInstances[ne].push({crossTileID:de.crossTileID,coord:this.getScaledCoordinates(de,D)})}};Pc.prototype.getScaledCoordinates=function(D,J){var O=J.canonical.z-this.tileID.canonical.z,K=Ol/Math.pow(2,O);return{x:Math.floor((J.canonical.x*i.EXTENT+D.anchorX)*K),y:Math.floor((J.canonical.y*i.EXTENT+D.anchorY)*K)}},Pc.prototype.findMatches=function(D,J,O){for(var K=this.tileID.canonical.z<J.canonical.z?1:Math.pow(2,this.tileID.canonical.z-J.canonical.z),de=0;de<D.length;de++){var ne=D.get(de);if(!ne.crossTileID){var be=this.indexedSymbolInstances[ne.key];if(be)for(var Be=this.getScaledCoordinates(ne,J),ht=0,Yt=be;ht<Yt.length;ht+=1){var cr=Yt[ht];if(Math.abs(cr.coord.x-Be.x)<=K&&Math.abs(cr.coord.y-Be.y)<=K&&!O[cr.crossTileID]){O[cr.crossTileID]=!0,ne.crossTileID=cr.crossTileID;break}}}}};var Do=function(){this.maxCrossTileID=0};Do.prototype.generate=function(){return++this.maxCrossTileID};var rf=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};rf.prototype.handleWrapJump=function(D){var J=Math.round((D-this.lng)/360);if(J!==0)for(var O in this.indexes){var K=this.indexes[O],de={};for(var ne in K){var be=K[ne];be.tileID=be.tileID.unwrapTo(be.tileID.wrap+J),de[be.tileID.key]=be}this.indexes[O]=de}this.lng=D},rf.prototype.addBucket=function(D,J,O){if(this.indexes[D.overscaledZ]&&this.indexes[D.overscaledZ][D.key]){if(this.indexes[D.overscaledZ][D.key].bucketInstanceId===J.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(D.overscaledZ,this.indexes[D.overscaledZ][D.key])}for(var K=0;K<J.symbolInstances.length;K++){var de=J.symbolInstances.get(K);de.crossTileID=0}this.usedCrossTileIDs[D.overscaledZ]||(this.usedCrossTileIDs[D.overscaledZ]={});var ne=this.usedCrossTileIDs[D.overscaledZ];for(var be in this.indexes){var Be=this.indexes[be];if(Number(be)>D.overscaledZ)for(var ht in Be){var Yt=Be[ht];Yt.tileID.isChildOf(D)&&Yt.findMatches(J.symbolInstances,D,ne)}else{var cr=D.scaledTo(Number(be)),Nt=Be[cr.key];Nt&&Nt.findMatches(J.symbolInstances,D,ne)}}for(var Ne=0;Ne<J.symbolInstances.length;Ne++){var $e=J.symbolInstances.get(Ne);$e.crossTileID||($e.crossTileID=O.generate(),ne[$e.crossTileID]=!0)}return this.indexes[D.overscaledZ]===void 0&&(this.indexes[D.overscaledZ]={}),this.indexes[D.overscaledZ][D.key]=new Pc(D,J.symbolInstances,J.bucketInstanceId),!0},rf.prototype.removeBucketCrossTileIDs=function(D,J){for(var O in J.indexedSymbolInstances)for(var K=0,de=J.indexedSymbolInstances[O];K<de.length;K+=1){var ne=de[K];delete this.usedCrossTileIDs[D][ne.crossTileID]}},rf.prototype.removeStaleBuckets=function(D){var J=!1;for(var O in this.indexes){var K=this.indexes[O];for(var de in K)D[K[de].bucketInstanceId]||(this.removeBucketCrossTileIDs(O,K[de]),delete K[de],J=!0)}return J};var Vf=function(){this.layerIndexes={},this.crossTileIDs=new Do,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Vf.prototype.addLayer=function(D,J,O){var K=this.layerIndexes[D.id];K===void 0&&(K=this.layerIndexes[D.id]=new rf);var de=!1,ne={};K.handleWrapJump(O);for(var be=0,Be=J;be<Be.length;be+=1){var ht=Be[be],Yt=ht.getBucket(D);!Yt||D.id!==Yt.layerIds[0]||(Yt.bucketInstanceId||(Yt.bucketInstanceId=++this.maxBucketInstanceId),K.addBucket(ht.tileID,Yt,this.crossTileIDs)&&(de=!0),ne[Yt.bucketInstanceId]=!0)}return K.removeStaleBuckets(ne)&&(de=!0),de},Vf.prototype.pruneUnusedLayers=function(D){var J={};D.forEach(function(K){J[K]=!0});for(var O in this.layerIndexes)J[O]||delete this.layerIndexes[O]};var pl=function(Y,D){return i.emitValidationErrors(Y,D&&D.filter(function(J){return J.identifier!=="source.canvas"}))},Zc=i.pick(da,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Jl=i.pick(da,["setCenter","setZoom","setBearing","setPitch"]),qs=Xo(),yu=function(Y){function D(J,O){var K=this;O===void 0&&(O={}),Y.call(this),this.map=J,this.dispatcher=new Z(Ba(),this),this.imageManager=new k,this.imageManager.setEventedParent(this),this.glyphManager=new P(J._requestManager,O.localIdeographFontFamily),this.lineAtlas=new G(256,512),this.crossTileSymbolIndex=new Vf,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new i.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",i.getReferrer());var de=this;this._rtlTextPluginCallback=D.registerForPluginStateChange(function(ne){var be={pluginStatus:ne.pluginStatus,pluginURL:ne.pluginURL};de.dispatcher.broadcast("syncRTLPluginState",be,function(Be,ht){if(i.triggerPluginCompletionEvent(Be),ht){var Yt=ht.every(function(Nt){return Nt});if(Yt)for(var cr in de.sourceCaches)de.sourceCaches[cr].reload()}})}),this.on("data",function(ne){if(!(ne.dataType!=="source"||ne.sourceDataType!=="metadata")){var be=K.sourceCaches[ne.sourceId];if(be){var Be=be.getSource();if(!(!Be||!Be.vectorLayerIds))for(var ht in K._layers){var Yt=K._layers[ht];Yt.source===Be.id&&K._validateLayer(Yt)}}}})}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.loadURL=function(O,K){var de=this;K===void 0&&(K={}),this.fire(new i.Event("dataloading",{dataType:"style"}));var ne=typeof K.validate=="boolean"?K.validate:!i.isMapboxURL(O);O=this.map._requestManager.normalizeStyleURL(O,K.accessToken);var be=this.map._requestManager.transformRequest(O,i.ResourceType.Style);this._request=i.getJSON(be,function(Be,ht){de._request=null,Be?de.fire(new i.ErrorEvent(Be)):ht&&de._load(ht,ne)})},D.prototype.loadJSON=function(O,K){var de=this;K===void 0&&(K={}),this.fire(new i.Event("dataloading",{dataType:"style"})),this._request=i.browser.frame(function(){de._request=null,de._load(O,K.validate!==!1)})},D.prototype.loadEmpty=function(){this.fire(new i.Event("dataloading",{dataType:"style"})),this._load(qs,!1)},D.prototype._load=function(O,K){if(!(K&&pl(this,i.validateStyle(O)))){this._loaded=!0,this.stylesheet=O;for(var de in O.sources)this.addSource(de,O.sources[de],{validate:!1});O.sprite?this._loadSprite(O.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(O.glyphs);var ne=Fa(this.stylesheet.layers);this._order=ne.map(function(Yt){return Yt.id}),this._layers={},this._serializedLayers={};for(var be=0,Be=ne;be<Be.length;be+=1){var ht=Be[be];ht=i.createStyleLayer(ht),ht.setEventedParent(this,{layer:{id:ht.id}}),this._layers[ht.id]=ht,this._serializedLayers[ht.id]=ht.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new U(this.stylesheet.light),this.fire(new i.Event("data",{dataType:"style"})),this.fire(new i.Event("style.load"))}},D.prototype._loadSprite=function(O){var K=this;this._spriteRequest=m(O,this.map._requestManager,function(de,ne){if(K._spriteRequest=null,de)K.fire(new i.ErrorEvent(de));else if(ne)for(var be in ne)K.imageManager.addImage(be,ne[be]);K.imageManager.setLoaded(!0),K._availableImages=K.imageManager.listImages(),K.dispatcher.broadcast("setImages",K._availableImages),K.fire(new i.Event("data",{dataType:"style"}))})},D.prototype._validateLayer=function(O){var K=this.sourceCaches[O.source];if(K){var de=O.sourceLayer;if(de){var ne=K.getSource();(ne.type==="geojson"||ne.vectorLayerIds&&ne.vectorLayerIds.indexOf(de)===-1)&&this.fire(new i.ErrorEvent(new Error('Source layer "'+de+'" does not exist on source "'+ne.id+'" as specified by style layer "'+O.id+'"')))}}},D.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var O in this.sourceCaches)if(!this.sourceCaches[O].loaded())return!1;return!!this.imageManager.isLoaded()},D.prototype._serializeLayers=function(O){for(var K=[],de=0,ne=O;de<ne.length;de+=1){var be=ne[de],Be=this._layers[be];Be.type!=="custom"&&K.push(Be.serialize())}return K},D.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var O in this.sourceCaches)if(this.sourceCaches[O].hasTransition())return!0;for(var K in this._layers)if(this._layers[K].hasTransition())return!0;return!1},D.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},D.prototype.update=function(O){if(this._loaded){var K=this._changed;if(this._changed){var de=Object.keys(this._updatedLayers),ne=Object.keys(this._removedLayers);(de.length||ne.length)&&this._updateWorkerLayers(de,ne);for(var be in this._updatedSources){var Be=this._updatedSources[be];Be==="reload"?this._reloadSource(be):Be==="clear"&&this._clearSource(be)}this._updateTilesForChangedImages();for(var ht in this._updatedPaintProps)this._layers[ht].updateTransitions(O);this.light.updateTransitions(O),this._resetUpdates()}var Yt={};for(var cr in this.sourceCaches){var Nt=this.sourceCaches[cr];Yt[cr]=Nt.used,Nt.used=!1}for(var Ne=0,$e=this._order;Ne<$e.length;Ne+=1){var ot=$e[Ne],It=this._layers[ot];It.recalculate(O,this._availableImages),!It.isHidden(O.zoom)&&It.source&&(this.sourceCaches[It.source].used=!0)}for(var Bt in Yt){var Ft=this.sourceCaches[Bt];Yt[Bt]!==Ft.used&&Ft.fire(new i.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:Bt}))}this.light.recalculate(O),this.z=O.zoom,K&&this.fire(new i.Event("data",{dataType:"style"}))}},D.prototype._updateTilesForChangedImages=function(){var O=Object.keys(this._changedImages);if(O.length){for(var K in this.sourceCaches)this.sourceCaches[K].reloadTilesForDependencies(["icons","patterns"],O);this._changedImages={}}},D.prototype._updateWorkerLayers=function(O,K){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(O),removedIds:K})},D.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},D.prototype.setState=function(O){var K=this;if(this._checkLoaded(),pl(this,i.validateStyle(O)))return!1;O=i.clone$1(O),O.layers=Fa(O.layers);var de=Sn(this.serialize(),O).filter(function(be){return!(be.command in Jl)});if(de.length===0)return!1;var ne=de.filter(function(be){return!(be.command in Zc)});if(ne.length>0)throw new Error("Unimplemented: "+ne.map(function(be){return be.command}).join(", ")+".");return de.forEach(function(be){be.command!=="setTransition"&&K[be.command].apply(K,be.args)}),this.stylesheet=O,!0},D.prototype.addImage=function(O,K){if(this.getImage(O))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(O,K),this._afterImageUpdated(O)},D.prototype.updateImage=function(O,K){this.imageManager.updateImage(O,K)},D.prototype.getImage=function(O){return this.imageManager.getImage(O)},D.prototype.removeImage=function(O){if(!this.getImage(O))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(O),this._afterImageUpdated(O)},D.prototype._afterImageUpdated=function(O){this._availableImages=this.imageManager.listImages(),this._changedImages[O]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},D.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},D.prototype.addSource=function(O,K,de){var ne=this;if(de===void 0&&(de={}),this._checkLoaded(),this.sourceCaches[O]!==void 0)throw new Error("There is already a source with this ID");if(!K.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(K).join(", ")+".");var be=["vector","raster","geojson","video","image"],Be=be.indexOf(K.type)>=0;if(!(Be&&this._validate(i.validateStyle.source,"sources."+O,K,null,de))){this.map&&this.map._collectResourceTiming&&(K.collectResourceTiming=!0);var ht=this.sourceCaches[O]=new ti(O,K,this.dispatcher);ht.style=this,ht.setEventedParent(this,function(){return{isSourceLoaded:ne.loaded(),source:ht.serialize(),sourceId:O}}),ht.onAdd(this.map),this._changed=!0}},D.prototype.removeSource=function(O){if(this._checkLoaded(),this.sourceCaches[O]===void 0)throw new Error("There is no source with this ID");for(var K in this._layers)if(this._layers[K].source===O)return this.fire(new i.ErrorEvent(new Error('Source "'+O+'" cannot be removed while layer "'+K+'" is using it.')));var de=this.sourceCaches[O];delete this.sourceCaches[O],delete this._updatedSources[O],de.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:O})),de.setEventedParent(null),de.clearTiles(),de.onRemove&&de.onRemove(this.map),this._changed=!0},D.prototype.setGeoJSONSourceData=function(O,K){this._checkLoaded();var de=this.sourceCaches[O].getSource();de.setData(K),this._changed=!0},D.prototype.getSource=function(O){return this.sourceCaches[O]&&this.sourceCaches[O].getSource()},D.prototype.addLayer=function(O,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=O.id;if(this.getLayer(ne)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+ne+'" already exists on this map')));return}var be;if(O.type==="custom"){if(pl(this,i.validateCustomStyleLayer(O)))return;be=i.createStyleLayer(O)}else{if(typeof O.source=="object"&&(this.addSource(ne,O.source),O=i.clone$1(O),O=i.extend(O,{source:ne})),this._validate(i.validateStyle.layer,"layers."+ne,O,{arrayIndex:-1},de))return;be=i.createStyleLayer(O),this._validateLayer(be),be.setEventedParent(this,{layer:{id:ne}}),this._serializedLayers[be.id]=be.serialize()}var Be=K?this._order.indexOf(K):this._order.length;if(K&&Be===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+K+'" does not exist on this map.')));return}if(this._order.splice(Be,0,ne),this._layerOrderChanged=!0,this._layers[ne]=be,this._removedLayers[ne]&&be.source&&be.type!=="custom"){var ht=this._removedLayers[ne];delete this._removedLayers[ne],ht.type!==be.type?this._updatedSources[be.source]="clear":(this._updatedSources[be.source]="reload",this.sourceCaches[be.source].pause())}this._updateLayer(be),be.onAdd&&be.onAdd(this.map)},D.prototype.moveLayer=function(O,K){this._checkLoaded(),this._changed=!0;var de=this._layers[O];if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be moved.")));return}if(O!==K){var ne=this._order.indexOf(O);this._order.splice(ne,1);var be=K?this._order.indexOf(K):this._order.length;if(K&&be===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+K+'" does not exist on this map.')));return}this._order.splice(be,0,O),this._layerOrderChanged=!0}},D.prototype.removeLayer=function(O){this._checkLoaded();var K=this._layers[O];if(!K){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be removed.")));return}K.setEventedParent(null);var de=this._order.indexOf(O);this._order.splice(de,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[O]=K,delete this._layers[O],delete this._serializedLayers[O],delete this._updatedLayers[O],delete this._updatedPaintProps[O],K.onRemove&&K.onRemove(this.map)},D.prototype.getLayer=function(O){return this._layers[O]},D.prototype.hasLayer=function(O){return O in this._layers},D.prototype.setLayerZoomRange=function(O,K,de){this._checkLoaded();var ne=this.getLayer(O);if(!ne){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot have zoom extent.")));return}ne.minzoom===K&&ne.maxzoom===de||(K!=null&&(ne.minzoom=K),de!=null&&(ne.maxzoom=de),this._updateLayer(ne))},D.prototype.setFilter=function(O,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=this.getLayer(O);if(!ne){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(ne.filter,K)){if(K==null){ne.filter=void 0,this._updateLayer(ne);return}this._validate(i.validateStyle.filter,"layers."+ne.id+".filter",K,null,de)||(ne.filter=i.clone$1(K),this._updateLayer(ne))}},D.prototype.getFilter=function(O){return i.clone$1(this.getLayer(O).filter)},D.prototype.setLayoutProperty=function(O,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var be=this.getLayer(O);if(!be){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(be.getLayoutProperty(K),de)||(be.setLayoutProperty(K,de,ne),this._updateLayer(be))},D.prototype.getLayoutProperty=function(O,K){var de=this.getLayer(O);if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style.")));return}return de.getLayoutProperty(K)},D.prototype.setPaintProperty=function(O,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var be=this.getLayer(O);if(!be){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(be.getPaintProperty(K),de)){var Be=be.setPaintProperty(K,de,ne);Be&&this._updateLayer(be),this._changed=!0,this._updatedPaintProps[O]=!0}},D.prototype.getPaintProperty=function(O,K){return this.getLayer(O).getPaintProperty(K)},D.prototype.setFeatureState=function(O,K){this._checkLoaded();var de=O.source,ne=O.sourceLayer,be=this.sourceCaches[de];if(be===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var Be=be.getSource().type;if(Be==="geojson"&&ne){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Be==="vector"&&!ne){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}O.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),be.setFeatureState(ne,O.id,K)},D.prototype.removeFeatureState=function(O,K){this._checkLoaded();var de=O.source,ne=this.sourceCaches[de];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var be=ne.getSource().type,Be=be==="vector"?O.sourceLayer:void 0;if(be==="vector"&&!Be){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(K&&typeof O.id!="string"&&typeof O.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ne.removeFeatureState(Be,O.id,K)},D.prototype.getFeatureState=function(O){this._checkLoaded();var K=O.source,de=O.sourceLayer,ne=this.sourceCaches[K];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+K+"' does not exist in the map's style.")));return}var be=ne.getSource().type;if(be==="vector"&&!de){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return O.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ne.getFeatureState(de,O.id)},D.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},D.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(O){return O.serialize()}),layers:this._serializeLayers(this._order)},function(O){return O!==void 0})},D.prototype._updateLayer=function(O){this._updatedLayers[O.id]=!0,O.source&&!this._updatedSources[O.source]&&this.sourceCaches[O.source].getSource().type!=="raster"&&(this._updatedSources[O.source]="reload",this.sourceCaches[O.source].pause()),this._changed=!0},D.prototype._flattenAndSortRenderedFeatures=function(O){for(var K=this,de=function(bi){return K._layers[bi].type==="fill-extrusion"},ne={},be=[],Be=this._order.length-1;Be>=0;Be--){var ht=this._order[Be];if(de(ht)){ne[ht]=Be;for(var Yt=0,cr=O;Yt<cr.length;Yt+=1){var Nt=cr[Yt],Ne=Nt[ht];if(Ne)for(var $e=0,ot=Ne;$e<ot.length;$e+=1){var It=ot[$e];be.push(It)}}}}be.sort(function(bi,gn){return gn.intersectionZ-bi.intersectionZ});for(var Bt=[],Ft=this._order.length-1;Ft>=0;Ft--){var Ut=this._order[Ft];if(de(Ut))for(var zt=be.length-1;zt>=0;zt--){var _t=be[zt].feature;if(ne[_t.layer.id]<Ft)break;Bt.push(_t),be.pop()}else for(var Dt=0,vt=O;Dt<vt.length;Dt+=1){var lr=vt[Dt],yr=lr[Ut];if(yr)for(var Br=0,Di=yr;Br<Di.length;Br+=1){var ci=Di[Br];Bt.push(ci.feature)}}}return Bt},D.prototype.queryRenderedFeatures=function(O,K,de){K&&K.filter&&this._validate(i.validateStyle.filter,"queryRenderedFeatures.filter",K.filter,null,K);var ne={};if(K&&K.layers){if(!Array.isArray(K.layers))return this.fire(new i.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var be=0,Be=K.layers;be<Be.length;be+=1){var ht=Be[be],Yt=this._layers[ht];if(!Yt)return this.fire(new i.ErrorEvent(new Error("The layer '"+ht+"' does not exist in the map's style and cannot be queried for features."))),[];ne[Yt.source]=!0}}var cr=[];K.availableImages=this._availableImages;for(var Nt in this.sourceCaches)K.layers&&!ne[Nt]||cr.push(ce(this.sourceCaches[Nt],this._layers,this._serializedLayers,O,K,de));return this.placement&&cr.push(He(this._layers,this._serializedLayers,this.sourceCaches,O,K,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(cr)},D.prototype.querySourceFeatures=function(O,K){K&&K.filter&&this._validate(i.validateStyle.filter,"querySourceFeatures.filter",K.filter,null,K);var de=this.sourceCaches[O];return de?lt(de,K):[]},D.prototype.addSourceType=function(O,K,de){if(D.getSourceType(O))return de(new Error('A source type called "'+O+'" already exists.'));if(D.setSourceType(O,K),!K.workerSourceURL)return de(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:O,url:K.workerSourceURL},de)},D.prototype.getLight=function(){return this.light.getLight()},D.prototype.setLight=function(O,K){K===void 0&&(K={}),this._checkLoaded();var de=this.light.getLight(),ne=!1;for(var be in O)if(!i.deepEqual(O[be],de[be])){ne=!0;break}if(ne){var Be={now:i.browser.now(),transition:i.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(O,K),this.light.updateTransitions(Be)}},D.prototype._validate=function(O,K,de,ne,be){return be===void 0&&(be={}),be&&be.validate===!1?!1:pl(this,O.call(i.validateStyle,i.extend({key:K,style:this.serialize(),value:de,styleSpec:i.styleSpec},ne)))},D.prototype._remove=function(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),i.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(var O in this._layers){var K=this._layers[O];K.setEventedParent(null)}for(var de in this.sourceCaches)this.sourceCaches[de].clearTiles(),this.sourceCaches[de].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},D.prototype._clearSource=function(O){this.sourceCaches[O].clearTiles()},D.prototype._reloadSource=function(O){this.sourceCaches[O].resume(),this.sourceCaches[O].reload()},D.prototype._updateSources=function(O){for(var K in this.sourceCaches)this.sourceCaches[K].update(O)},D.prototype._generateCollisionBoxes=function(){for(var O in this.sourceCaches)this._reloadSource(O)},D.prototype._updatePlacement=function(O,K,de,ne,be){be===void 0&&(be=!1);for(var Be=!1,ht=!1,Yt={},cr=0,Nt=this._order;cr<Nt.length;cr+=1){var Ne=Nt[cr],$e=this._layers[Ne];if($e.type==="symbol"){if(!Yt[$e.source]){var ot=this.sourceCaches[$e.source];Yt[$e.source]=ot.getRenderableIds(!0).map(function(Dt){return ot.getTileByID(Dt)}).sort(function(Dt,vt){return vt.tileID.overscaledZ-Dt.tileID.overscaledZ||(Dt.tileID.isLessThan(vt.tileID)?-1:1)})}var It=this.crossTileSymbolIndex.addLayer($e,Yt[$e.source],O.center.lng);Be=Be||It}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),be=be||this._layerOrderChanged||de===0,(be||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(i.browser.now(),O.zoom))&&(this.pauseablePlacement=new Oo(O,this._order,be,K,de,ne,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Yt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(i.browser.now()),ht=!0),Be&&this.pauseablePlacement.placement.setStale()),ht||Be)for(var Bt=0,Ft=this._order;Bt<Ft.length;Bt+=1){var Ut=Ft[Bt],zt=this._layers[Ut];zt.type==="symbol"&&this.placement.updateLayerOpacities(zt,Yt[zt.source])}var _t=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(i.browser.now());return _t},D.prototype._releaseSymbolFadeTiles=function(){for(var O in this.sourceCaches)this.sourceCaches[O].releaseSymbolFadeTiles()},D.prototype.getImages=function(O,K,de){this.imageManager.getImages(K.icons,de),this._updateTilesForChangedImages();var ne=this.sourceCaches[K.source];ne&&ne.setDependencies(K.tileID.key,K.type,K.icons)},D.prototype.getGlyphs=function(O,K,de){this.glyphManager.getGlyphs(K.stacks,de)},D.prototype.getResource=function(O,K,de){return i.makeRequest(K,de)},D}(i.Evented);yu.getSourceType=De,yu.setSourceType=Le,yu.registerForPluginStateChange=i.registerForPluginStateChange;var oc=i.createLayout([{name:"a_pos",type:"Int16",components:2}]),Cf=`#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`,sc=`#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;}`,jh=`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
|
||
}`,Lf="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",cs=`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
gl_FragColor=vec4(1.0);
|
||
#endif
|
||
}`,nf="uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}",Gf=`varying vec3 v_data;
|
||
#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
|
||
}`,$l=`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;
|
||
#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);}`,fl="void main() {gl_FragColor=vec4(1.0);}",lc="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",Fu=`uniform highp float u_intensity;varying vec2 v_extrude;
|
||
#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
|
||
}`,Es=`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
|
||
#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;}`,Hs=`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
gl_FragColor=vec4(0.0);
|
||
#endif
|
||
}`,Go="uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}",ps="varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}",uc="attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}",xl="varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}",Gu="attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}",Os="uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}",od="attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}",Po=`#pragma mapbox: define highp vec4 color
|
||
#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
|
||
}`,sd=`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);}`,Ko=`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
|
||
}`,Pa=`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;}`,af=`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
|
||
#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
|
||
}`,Hu=`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
|
||
#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;}`,bl=`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
|
||
}`,Hf=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
|
||
#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);}`,Ic=`varying vec4 v_color;void main() {gl_FragColor=v_color;
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
gl_FragColor=vec4(1.0);
|
||
#endif
|
||
}`,yf=`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;
|
||
#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;}`,Bl=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
|
||
#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
|
||
}`,Ah=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
|
||
#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;}`,Qf=`#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
|
||
}`,_f="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Yc=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
|
||
#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
|
||
}`,eh="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",th=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
|
||
#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
|
||
}`,ju=`
|
||
#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);}`,jf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
|
||
#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
|
||
}`,cc=`
|
||
#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);}`,of=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
|
||
#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
|
||
}`,Nl=`
|
||
#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;}`,Kc=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
|
||
#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
|
||
}`,Rc=`
|
||
#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);}`,gs=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
|
||
#ifdef OVERDRAW_INSPECTOR
|
||
gl_FragColor=vec4(1.0);
|
||
#endif
|
||
}`,Wf="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",Wh=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
|
||
#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
|
||
}`,rh=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;
|
||
#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));}`,sf=`#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
|
||
}`,Sh=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;
|
||
#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);}`,Mu=`#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
|
||
}`,ih=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;
|
||
#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);}`,js=Us(Cf,sc),Eu=Us(jh,Lf),Dc=Us(cs,nf),ks=Us(Gf,$l),bc=Us(fl,lc),hu=Us(Fu,Es),_u=Us(Hs,Go),nl=Us(ps,uc),nh=Us(xl,Gu),Mh=Us(Os,od),zu=Us(Po,sd),Fc=Us(Ko,Pa),wc=Us(af,Hu),bd=Us(bl,Hf),xf=Us(Ic,yf),Pf=Us(Bl,Ah),qu=Us(Qf,_f),bf=Us(Yc,eh),jl=Us(th,ju),lf=Us(jf,cc),Xh=Us(of,Nl),If=Us(Kc,Rc),Cs=Us(gs,Wf),du=Us(Wh,rh),ku=Us(sf,Sh),Xf=Us(Mu,ih);function Us(Y,D){var J=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,O=D.match(/attribute ([\w]+) ([\w]+)/g),K=Y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),de=D.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ne=de?de.concat(K):K,be={};return Y=Y.replace(J,function(Be,ht,Yt,cr,Nt){return be[Nt]=!0,ht==="define"?`
|
||
#ifndef HAS_UNIFORM_u_`+Nt+`
|
||
varying `+Yt+" "+cr+" "+Nt+`;
|
||
#else
|
||
uniform `+Yt+" "+cr+" u_"+Nt+`;
|
||
#endif
|
||
`:`
|
||
#ifdef HAS_UNIFORM_u_`+Nt+`
|
||
`+Yt+" "+cr+" "+Nt+" = u_"+Nt+`;
|
||
#endif
|
||
`}),D=D.replace(J,function(Be,ht,Yt,cr,Nt){var Ne=cr==="float"?"vec2":"vec4",$e=Nt.match(/color/)?"color":Ne;return be[Nt]?ht==="define"?`
|
||
#ifndef HAS_UNIFORM_u_`+Nt+`
|
||
uniform lowp float u_`+Nt+`_t;
|
||
attribute `+Yt+" "+Ne+" a_"+Nt+`;
|
||
varying `+Yt+" "+cr+" "+Nt+`;
|
||
#else
|
||
uniform `+Yt+" "+cr+" u_"+Nt+`;
|
||
#endif
|
||
`:$e==="vec4"?`
|
||
#ifndef HAS_UNIFORM_u_`+Nt+`
|
||
`+Nt+" = a_"+Nt+`;
|
||
#else
|
||
`+Yt+" "+cr+" "+Nt+" = u_"+Nt+`;
|
||
#endif
|
||
`:`
|
||
#ifndef HAS_UNIFORM_u_`+Nt+`
|
||
`+Nt+" = unpack_mix_"+$e+"(a_"+Nt+", u_"+Nt+`_t);
|
||
#else
|
||
`+Yt+" "+cr+" "+Nt+" = u_"+Nt+`;
|
||
#endif
|
||
`:ht==="define"?`
|
||
#ifndef HAS_UNIFORM_u_`+Nt+`
|
||
uniform lowp float u_`+Nt+`_t;
|
||
attribute `+Yt+" "+Ne+" a_"+Nt+`;
|
||
#else
|
||
uniform `+Yt+" "+cr+" u_"+Nt+`;
|
||
#endif
|
||
`:$e==="vec4"?`
|
||
#ifndef HAS_UNIFORM_u_`+Nt+`
|
||
`+Yt+" "+cr+" "+Nt+" = a_"+Nt+`;
|
||
#else
|
||
`+Yt+" "+cr+" "+Nt+" = u_"+Nt+`;
|
||
#endif
|
||
`:`
|
||
#ifndef HAS_UNIFORM_u_`+Nt+`
|
||
`+Yt+" "+cr+" "+Nt+" = unpack_mix_"+$e+"(a_"+Nt+", u_"+Nt+`_t);
|
||
#else
|
||
`+Yt+" "+cr+" "+Nt+" = u_"+Nt+`;
|
||
#endif
|
||
`}),{fragmentSource:Y,vertexSource:D,staticAttributes:O,staticUniforms:ne}}var wf=Object.freeze({__proto__:null,prelude:js,background:Eu,backgroundPattern:Dc,circle:ks,clippingMask:bc,heatmap:hu,heatmapTexture:_u,collisionBox:nl,collisionCircle:nh,debug:Mh,fill:zu,fillOutline:Fc,fillOutlinePattern:wc,fillPattern:bd,fillExtrusion:xf,fillExtrusionPattern:Pf,hillshadePrepare:qu,hillshade:bf,line:jl,lineGradient:lf,linePattern:Xh,lineSDF:If,raster:Cs,symbolIcon:du,symbolSDF:ku,symbolTextAndIcon:Xf}),zc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};zc.prototype.bind=function(D,J,O,K,de,ne,be,Be){this.context=D;for(var ht=this.boundPaintVertexBuffers.length!==K.length,Yt=0;!ht&&Yt<K.length;Yt++)this.boundPaintVertexBuffers[Yt]!==K[Yt]&&(ht=!0);var cr=!this.vao||this.boundProgram!==J||this.boundLayoutVertexBuffer!==O||ht||this.boundIndexBuffer!==de||this.boundVertexOffset!==ne||this.boundDynamicVertexBuffer!==be||this.boundDynamicVertexBuffer2!==Be;!D.extVertexArrayObject||cr?this.freshBind(J,O,K,de,ne,be,Be):(D.bindVertexArrayOES.set(this.vao),be&&be.bind(),de&&de.dynamicDraw&&de.bind(),Be&&Be.bind())},zc.prototype.freshBind=function(D,J,O,K,de,ne,be){var Be,ht=D.numAttributes,Yt=this.context,cr=Yt.gl;if(Yt.extVertexArrayObject)this.vao&&this.destroy(),this.vao=Yt.extVertexArrayObject.createVertexArrayOES(),Yt.bindVertexArrayOES.set(this.vao),Be=0,this.boundProgram=D,this.boundLayoutVertexBuffer=J,this.boundPaintVertexBuffers=O,this.boundIndexBuffer=K,this.boundVertexOffset=de,this.boundDynamicVertexBuffer=ne,this.boundDynamicVertexBuffer2=be;else{Be=Yt.currentNumAttributes||0;for(var Nt=ht;Nt<Be;Nt++)cr.disableVertexAttribArray(Nt)}J.enableAttributes(cr,D);for(var Ne=0,$e=O;Ne<$e.length;Ne+=1){var ot=$e[Ne];ot.enableAttributes(cr,D)}ne&&ne.enableAttributes(cr,D),be&&be.enableAttributes(cr,D),J.bind(),J.setVertexAttribPointers(cr,D,de);for(var It=0,Bt=O;It<Bt.length;It+=1){var Ft=Bt[It];Ft.bind(),Ft.setVertexAttribPointers(cr,D,de)}ne&&(ne.bind(),ne.setVertexAttribPointers(cr,D,de)),K&&K.bind(),be&&(be.bind(),be.setVertexAttribPointers(cr,D,de)),Yt.currentNumAttributes=ht},zc.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function Wu(Y){for(var D=[],J=0;J<Y.length;J++)if(Y[J]!==null){var O=Y[J].split(" ");D.push(O.pop())}return D}var Rf=function(D,J,O,K,de,ne){var be=D.gl;this.program=be.createProgram();for(var Be=Wu(O.staticAttributes),ht=K?K.getBinderAttributes():[],Yt=Be.concat(ht),cr=O.staticUniforms?Wu(O.staticUniforms):[],Nt=K?K.getBinderUniforms():[],Ne=cr.concat(Nt),$e=[],ot=0,It=Ne;ot<It.length;ot+=1){var Bt=It[ot];$e.indexOf(Bt)<0&&$e.push(Bt)}var Ft=K?K.defines():[];ne&&Ft.push("#define OVERDRAW_INSPECTOR;");var Ut=Ft.concat(js.fragmentSource,O.fragmentSource).join(`
|
||
`),zt=Ft.concat(js.vertexSource,O.vertexSource).join(`
|
||
`),_t=be.createShader(be.FRAGMENT_SHADER);if(be.isContextLost()){this.failedToCreate=!0;return}be.shaderSource(_t,Ut),be.compileShader(_t),be.attachShader(this.program,_t);var Dt=be.createShader(be.VERTEX_SHADER);if(be.isContextLost()){this.failedToCreate=!0;return}be.shaderSource(Dt,zt),be.compileShader(Dt),be.attachShader(this.program,Dt),this.attributes={};var vt={};this.numAttributes=Yt.length;for(var lr=0;lr<this.numAttributes;lr++)Yt[lr]&&(be.bindAttribLocation(this.program,lr,Yt[lr]),this.attributes[Yt[lr]]=lr);be.linkProgram(this.program),be.deleteShader(Dt),be.deleteShader(_t);for(var yr=0;yr<$e.length;yr++){var Br=$e[yr];if(Br&&!vt[Br]){var Di=be.getUniformLocation(this.program,Br);Di&&(vt[Br]=Di)}}this.fixedUniforms=de(D,vt),this.binderUniforms=K?K.getUniforms(D,vt):[]};Rf.prototype.draw=function(D,J,O,K,de,ne,be,Be,ht,Yt,cr,Nt,Ne,$e,ot,It){var Bt,Ft=D.gl;if(!this.failedToCreate){D.program.set(this.program),D.setDepthMode(O),D.setStencilMode(K),D.setColorMode(de),D.setCullFace(ne);for(var Ut in this.fixedUniforms)this.fixedUniforms[Ut].set(be[Ut]);$e&&$e.setUniforms(D,this.binderUniforms,Nt,{zoom:Ne});for(var zt=(Bt={},Bt[Ft.LINES]=2,Bt[Ft.TRIANGLES]=3,Bt[Ft.LINE_STRIP]=1,Bt)[J],_t=0,Dt=cr.get();_t<Dt.length;_t+=1){var vt=Dt[_t],lr=vt.vaos||(vt.vaos={}),yr=lr[Be]||(lr[Be]=new zc);yr.bind(D,this,ht,$e?$e.getPaintVertexBuffers():[],Yt,vt.vertexOffset,ot,It),Ft.drawElements(J,vt.primitiveLength*zt,Ft.UNSIGNED_SHORT,vt.primitiveOffset*zt*2)}}};function Xu(Y,D,J){var O=1/As(J,1,D.transform.tileZoom),K=Math.pow(2,J.tileID.overscaledZ),de=J.tileSize*Math.pow(2,D.transform.tileZoom)/K,ne=de*(J.tileID.canonical.x+J.tileID.wrap*K),be=de*J.tileID.canonical.y;return{u_image:0,u_texsize:J.imageAtlasTexture.size,u_scale:[O,Y.fromScale,Y.toScale],u_fade:Y.t,u_pixel_coord_upper:[ne>>16,be>>16],u_pixel_coord_lower:[ne&65535,be&65535]}}function uf(Y,D,J,O){var K=J.imageManager.getPattern(Y.from.toString()),de=J.imageManager.getPattern(Y.to.toString()),ne=J.imageManager.getPixelSize(),be=ne.width,Be=ne.height,ht=Math.pow(2,O.tileID.overscaledZ),Yt=O.tileSize*Math.pow(2,J.transform.tileZoom)/ht,cr=Yt*(O.tileID.canonical.x+O.tileID.wrap*ht),Nt=Yt*O.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:K.tl,u_pattern_br_a:K.br,u_pattern_tl_b:de.tl,u_pattern_br_b:de.br,u_texsize:[be,Be],u_mix:D.t,u_pattern_size_a:K.displaySize,u_pattern_size_b:de.displaySize,u_scale_a:D.fromScale,u_scale_b:D.toScale,u_tile_units_to_pixels:1/As(O,1,J.transform.tileZoom),u_pixel_coord_upper:[cr>>16,Nt>>16],u_pixel_coord_lower:[cr&65535,Nt&65535]}}var Zf=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},Wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,D.u_height_factor),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},ah=function(Y,D,J,O){var K=D.style.light,de=K.properties.get("position"),ne=[de.x,de.y,de.z],be=i.create$1();K.properties.get("anchor")==="viewport"&&i.fromRotation(be,-D.transform.angle),i.transformMat3(ne,ne,be);var Be=K.properties.get("color");return{u_matrix:Y,u_lightpos:ne,u_lightintensity:K.properties.get("intensity"),u_lightcolor:[Be.r,Be.g,Be.b],u_vertical_gradient:+J,u_opacity:O}},Zu=function(Y,D,J,O,K,de,ne){return i.extend(ah(Y,D,J,O),Xu(de,D,ne),{u_height_factor:-Math.pow(2,K.overscaledZ)/ne.tileSize/8})},qc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Tc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world)}},vu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},Oc=function(Y){return{u_matrix:Y}},cf=function(Y,D,J,O){return i.extend(Oc(Y),Xu(J,D,O))},fc=function(Y,D){return{u_matrix:Y,u_world:D}},Bc=function(Y,D,J,O,K){return i.extend(cf(Y,D,J,O),{u_world:K})},kt=function(Y,D){return{u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,D.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Zt=function(Y,D,J,O){var K=Y.transform,de,ne;if(O.paint.get("circle-pitch-alignment")==="map"){var be=As(J,1,K.zoom);de=!0,ne=[be,be]}else de=!1,ne=K.pixelsToGLUnits;return{u_camera_to_center_distance:K.cameraToCenterDistance,u_scale_with_map:+(O.paint.get("circle-pitch-scale")==="map"),u_matrix:Y.translatePosMatrix(D.posMatrix,J,O.paint.get("circle-translate"),O.paint.get("circle-translate-anchor")),u_pitch_with_map:+de,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:ne}},Mr=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,D.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,D.u_overscale_factor)}},xr=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,D.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,D.u_viewport_size)}},Kr=function(Y,D,J){var O=As(J,1,D.zoom),K=Math.pow(2,D.zoom-J.tileID.overscaledZ),de=J.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:D.cameraToCenterDistance,u_pixels_to_tile_units:O,u_extrude_scale:[D.pixelsToGLUnits[0]/(O*K),D.pixelsToGLUnits[1]/(O*K)],u_overscale_factor:de}},Mi=function(Y,D,J){return{u_matrix:Y,u_inv_matrix:D,u_camera_to_center_distance:J.cameraToCenterDistance,u_viewport_size:[J.width,J.height]}},Wi=function(Y,D){return{u_color:new i.UniformColor(Y,D.u_color),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_overlay:new i.Uniform1i(Y,D.u_overlay),u_overlay_scale:new i.Uniform1f(Y,D.u_overlay_scale)}},dn=function(Y,D,J){return J===void 0&&(J=1),{u_matrix:Y,u_color:D,u_overlay:0,u_overlay_scale:J}},wn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},On=function(Y){return{u_matrix:Y}},Yi=function(Y,D){return{u_extrude_scale:new i.Uniform1f(Y,D.u_extrude_scale),u_intensity:new i.Uniform1f(Y,D.u_intensity),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},$i=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_color_ramp:new i.Uniform1i(Y,D.u_color_ramp),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},an=function(Y,D,J,O){return{u_matrix:Y,u_extrude_scale:As(D,1,J),u_intensity:O}},Fi=function(Y,D,J,O){var K=i.create();i.ortho(K,0,Y.width,Y.height,0,0,1);var de=Y.context.gl;return{u_matrix:K,u_world:[de.drawingBufferWidth,de.drawingBufferHeight],u_image:J,u_color_ramp:O,u_opacity:D.paint.get("heatmap-opacity")}},ta=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_latrange:new i.Uniform2f(Y,D.u_latrange),u_light:new i.Uniform2f(Y,D.u_light),u_shadow:new i.UniformColor(Y,D.u_shadow),u_highlight:new i.UniformColor(Y,D.u_highlight),u_accent:new i.UniformColor(Y,D.u_accent)}},Ca=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_dimension:new i.Uniform2f(Y,D.u_dimension),u_zoom:new i.Uniform1f(Y,D.u_zoom),u_unpack:new i.Uniform4f(Y,D.u_unpack)}},Ra=function(Y,D,J){var O=J.paint.get("hillshade-shadow-color"),K=J.paint.get("hillshade-highlight-color"),de=J.paint.get("hillshade-accent-color"),ne=J.paint.get("hillshade-illumination-direction")*(Math.PI/180);J.paint.get("hillshade-illumination-anchor")==="viewport"&&(ne-=Y.transform.angle);var be=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(D.tileID.toUnwrapped(),be),u_image:0,u_latrange:Na(Y,D.tileID),u_light:[J.paint.get("hillshade-exaggeration"),ne],u_shadow:O,u_highlight:K,u_accent:de}},La=function(Y,D){var J=D.stride,O=i.create();return i.ortho(O,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(O,O,[0,-i.EXTENT,0]),{u_matrix:O,u_image:1,u_dimension:[J,J],u_zoom:Y.overscaledZ,u_unpack:D.getUnpackVector()}};function Na(Y,D){var J=Math.pow(2,D.canonical.z),O=D.canonical.y;return[new i.MercatorCoordinate(0,O/J).toLngLat().lat,new i.MercatorCoordinate(0,(O+1)/J).toLngLat().lat]}var Zn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels)}},Dn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_image:new i.Uniform1i(Y,D.u_image),u_image_height:new i.Uniform1f(Y,D.u_image_height)}},Ka=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,D.u_image),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},bo=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,D.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,D.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,D.u_sdfgamma),u_image:new i.Uniform1i(Y,D.u_image),u_tex_y_a:new i.Uniform1f(Y,D.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,D.u_tex_y_b),u_mix:new i.Uniform1f(Y,D.u_mix)}},Zo=function(Y,D,J){var O=Y.transform;return{u_matrix:ml(Y,D,J),u_ratio:1/As(D,1,O.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/O.pixelsToGLUnits[0],1/O.pixelsToGLUnits[1]]}},Ss=function(Y,D,J,O){return i.extend(Zo(Y,D,J),{u_image:0,u_image_height:O})},as=function(Y,D,J,O){var K=Y.transform,de=Ho(D,K);return{u_matrix:ml(Y,D,J),u_texsize:D.imageAtlasTexture.size,u_ratio:1/As(D,1,K.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[de,O.fromScale,O.toScale],u_fade:O.t,u_units_to_pixels:[1/K.pixelsToGLUnits[0],1/K.pixelsToGLUnits[1]]}},ws=function(Y,D,J,O,K){var de=Y.transform,ne=Y.lineAtlas,be=Ho(D,de),Be=J.layout.get("line-cap")==="round",ht=ne.getDash(O.from,Be),Yt=ne.getDash(O.to,Be),cr=ht.width*K.fromScale,Nt=Yt.width*K.toScale;return i.extend(Zo(Y,D,J),{u_patternscale_a:[be/cr,-ht.height/2],u_patternscale_b:[be/Nt,-Yt.height/2],u_sdfgamma:ne.width/(Math.min(cr,Nt)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:ht.y,u_tex_y_b:Yt.y,u_mix:K.t})};function Ho(Y,D){return 1/As(Y,1,D.tileZoom)}function ml(Y,D,J){return Y.translatePosMatrix(D.tileID.posMatrix,D,J.paint.get("line-translate"),J.paint.get("line-translate-anchor"))}var Ws=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_tl_parent:new i.Uniform2f(Y,D.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,D.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,D.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,D.u_fade_t),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image0:new i.Uniform1i(Y,D.u_image0),u_image1:new i.Uniform1i(Y,D.u_image1),u_brightness_low:new i.Uniform1f(Y,D.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,D.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,D.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,D.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,D.u_spin_weights)}},Ls=function(Y,D,J,O,K){return{u_matrix:Y,u_tl_parent:D,u_scale_parent:J,u_buffer_scale:1,u_fade_t:O.mix,u_opacity:O.opacity*K.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:K.paint.get("raster-brightness-min"),u_brightness_high:K.paint.get("raster-brightness-max"),u_saturation_factor:ys(K.paint.get("raster-saturation")),u_contrast_factor:no(K.paint.get("raster-contrast")),u_spin_weights:va(K.paint.get("raster-hue-rotate"))}};function va(Y){Y*=Math.PI/180;var D=Math.sin(Y),J=Math.cos(Y);return[(2*J+1)/3,(-Math.sqrt(3)*D-J+1)/3,(Math.sqrt(3)*D-J+1)/3]}function no(Y){return Y>0?1/(1-Y):1+Y}function ys(Y){return Y>0?1-1/(1.001-Y):-Y}var rs=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture)}},Ql=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Cu=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texsize_icon:new i.Uniform2f(Y,D.u_texsize_icon),u_texture:new i.Uniform1i(Y,D.u_texture),u_texture_icon:new i.Uniform1i(Y,D.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Yu=function(Y,D,J,O,K,de,ne,be,Be,ht){var Yt=K.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:D?D.uSizeT:0,u_size:D?D.uSize:0,u_camera_to_center_distance:Yt.cameraToCenterDistance,u_pitch:Yt.pitch/360*2*Math.PI,u_rotate_symbol:+J,u_aspect_ratio:Yt.width/Yt.height,u_fade_change:K.options.fadeDuration?K.symbolFadeChange:1,u_matrix:de,u_label_plane_matrix:ne,u_coord_matrix:be,u_is_text:+Be,u_pitch_with_map:+O,u_texsize:ht,u_texture:0}},Nc=function(Y,D,J,O,K,de,ne,be,Be,ht,Yt){var cr=K.transform;return i.extend(Yu(Y,D,J,O,K,de,ne,be,Be,ht),{u_gamma_scale:O?Math.cos(cr._pitch)*cr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Yt})},pu=function(Y,D,J,O,K,de,ne,be,Be,ht){return i.extend(Nc(Y,D,J,O,K,de,ne,be,!0,Be,!0),{u_texsize_icon:ht,u_texture_icon:1})},Uc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_color:new i.UniformColor(Y,D.u_color)}},xu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image:new i.Uniform1i(Y,D.u_image),u_pattern_tl_a:new i.Uniform2f(Y,D.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,D.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,D.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,D.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_mix:new i.Uniform1f(Y,D.u_mix),u_pattern_size_a:new i.Uniform2f(Y,D.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,D.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,D.u_scale_a),u_scale_b:new i.Uniform1f(Y,D.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,D.u_tile_units_to_pixels)}},Ac=function(Y,D,J){return{u_matrix:Y,u_opacity:D,u_color:J}},Ua=function(Y,D,J,O,K,de){return i.extend(uf(O,de,J,K),{u_matrix:Y,u_opacity:D})},oo={fillExtrusion:Zf,fillExtrusionPattern:Wl,fill:qc,fillPattern:Tc,fillOutline:wl,fillOutlinePattern:vu,circle:kt,collisionBox:Mr,collisionCircle:xr,debug:Wi,clippingMask:wn,heatmap:Yi,heatmapTexture:$i,hillshade:ta,hillshadePrepare:Ca,line:Zn,lineGradient:Dn,linePattern:Ka,lineSDF:bo,raster:Ws,symbolIcon:rs,symbolSDF:Ql,symbolTextAndIcon:Cu,background:Uc,backgroundPattern:xu},Vc;function hc(Y,D,J,O,K,de,ne){for(var be=Y.context,Be=be.gl,ht=Y.useProgram("collisionBox"),Yt=[],cr=0,Nt=0,Ne=0;Ne<O.length;Ne++){var $e=O[Ne],ot=D.getTile($e),It=ot.getBucket(J);if(It){var Bt=$e.posMatrix;(K[0]!==0||K[1]!==0)&&(Bt=Y.translatePosMatrix($e.posMatrix,ot,K,de));var Ft=ne?It.textCollisionBox:It.iconCollisionBox,Ut=It.collisionCircleArray;if(Ut.length>0){var zt=i.create(),_t=Bt;i.mul(zt,It.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(zt,zt,It.placementViewportMatrix),Yt.push({circleArray:Ut,circleOffset:Nt,transform:_t,invTransform:zt}),cr+=Ut.length/4,Nt=cr}Ft&&ht.draw(be,Be.LINES,An.disabled,Vi.disabled,Y.colorModeForRenderPass(),wr.disabled,Kr(Bt,Y.transform,ot),J.id,Ft.layoutVertexBuffer,Ft.indexBuffer,Ft.segments,null,Y.transform.zoom,null,null,Ft.collisionVertexBuffer)}}if(!(!ne||!Yt.length)){var Dt=Y.useProgram("collisionCircle"),vt=new i.StructArrayLayout2f1f2i16;vt.resize(cr*4),vt._trim();for(var lr=0,yr=0,Br=Yt;yr<Br.length;yr+=1)for(var Di=Br[yr],ci=0;ci<Di.circleArray.length/4;ci++){var bi=ci*4,gn=Di.circleArray[bi+0],tn=Di.circleArray[bi+1],Ei=Di.circleArray[bi+2],Oi=Di.circleArray[bi+3];vt.emplace(lr++,gn,tn,Ei,Oi,0),vt.emplace(lr++,gn,tn,Ei,Oi,1),vt.emplace(lr++,gn,tn,Ei,Oi,2),vt.emplace(lr++,gn,tn,Ei,Oi,3)}(!Vc||Vc.length<cr*2)&&(Vc=Ku(cr));for(var Gi=be.createIndexBuffer(Vc,!0),on=be.createVertexBuffer(vt,i.collisionCircleLayout.members,!0),zn=0,Ja=Yt;zn<Ja.length;zn+=1){var co=Ja[zn],ts=Mi(co.transform,co.invTransform,Y.transform);Dt.draw(be,Be.TRIANGLES,An.disabled,Vi.disabled,Y.colorModeForRenderPass(),wr.disabled,ts,J.id,on,Gi,i.SegmentVector.simpleSegment(0,co.circleOffset*2,co.circleArray.length,co.circleArray.length/2),null,Y.transform.zoom,null,null,null)}on.destroy(),Gi.destroy()}}function Ku(Y){var D=Y*2,J=new i.StructArrayLayout3ui6;J.resize(D),J._trim();for(var O=0;O<D;O++){var K=O*6;J.uint16[K+0]=O*4+0,J.uint16[K+1]=O*4+1,J.uint16[K+2]=O*4+2,J.uint16[K+3]=O*4+2,J.uint16[K+4]=O*4+3,J.uint16[K+5]=O*4+0}return J}var ue=i.identity(new Float32Array(16));function w(Y,D,J,O,K){if(Y.renderPass==="translucent"){var de=Vi.disabled,ne=Y.colorModeForRenderPass(),be=J.layout.get("text-variable-anchor");be&&Q(O,Y,J,D,J.layout.get("text-rotation-alignment"),J.layout.get("text-pitch-alignment"),K),J.paint.get("icon-opacity").constantOr(1)!==0&&ze(Y,D,J,O,!1,J.paint.get("icon-translate"),J.paint.get("icon-translate-anchor"),J.layout.get("icon-rotation-alignment"),J.layout.get("icon-pitch-alignment"),J.layout.get("icon-keep-upright"),de,ne),J.paint.get("text-opacity").constantOr(1)!==0&&ze(Y,D,J,O,!0,J.paint.get("text-translate"),J.paint.get("text-translate-anchor"),J.layout.get("text-rotation-alignment"),J.layout.get("text-pitch-alignment"),J.layout.get("text-keep-upright"),de,ne),D.map.showCollisionBoxes&&(hc(Y,D,J,O,J.paint.get("text-translate"),J.paint.get("text-translate-anchor"),!0),hc(Y,D,J,O,J.paint.get("icon-translate"),J.paint.get("icon-translate-anchor"),!1))}}function B(Y,D,J,O,K,de){var ne=i.getAnchorAlignment(Y),be=ne.horizontalAlign,Be=ne.verticalAlign,ht=-(be-.5)*D,Yt=-(Be-.5)*J,cr=i.evaluateVariableOffset(Y,O);return new i.Point((ht/K+cr[0])*de,(Yt/K+cr[1])*de)}function Q(Y,D,J,O,K,de,ne){for(var be=D.transform,Be=K==="map",ht=de==="map",Yt=0,cr=Y;Yt<cr.length;Yt+=1){var Nt=cr[Yt],Ne=O.getTile(Nt),$e=Ne.getBucket(J);if(!(!$e||!$e.text||!$e.text.segments.get().length)){var ot=$e.textSizeData,It=i.evaluateSizeForZoom(ot,be.zoom),Bt=As(Ne,1,D.transform.zoom),Ft=_n(Nt.posMatrix,ht,Be,D.transform,Bt),Ut=J.layout.get("icon-text-fit")!=="none"&&$e.hasIconData();if(It){var zt=Math.pow(2,be.zoom-Ne.tileID.overscaledZ);ee($e,Be,ht,ne,i.symbolSize,be,Ft,Nt.posMatrix,zt,It,Ut)}}}}function ee(Y,D,J,O,K,de,ne,be,Be,ht,Yt){var cr=Y.text.placedSymbolArray,Nt=Y.text.dynamicLayoutVertexArray,Ne=Y.icon.dynamicLayoutVertexArray,$e={};Nt.clear();for(var ot=0;ot<cr.length;ot++){var It=cr.get(ot),Bt=Y.allowVerticalPlacement&&!It.placedOrientation,Ft=!It.hidden&&It.crossTileID&&!Bt?O[It.crossTileID]:null;if(!Ft)ul(It.numGlyphs,Nt);else{var Ut=new i.Point(It.anchorX,It.anchorY),zt=ea(Ut,J?be:ne),_t=Ma(de.cameraToCenterDistance,zt.signedDistanceFromCamera),Dt=K.evaluateSizeForFeature(Y.textSizeData,ht,It)*_t/i.ONE_EM;J&&(Dt*=Y.tilePixelRatio/Be);for(var vt=Ft.width,lr=Ft.height,yr=Ft.anchor,Br=Ft.textOffset,Di=Ft.textBoxScale,ci=B(yr,vt,lr,Br,Di,Dt),bi=J?ea(Ut.add(ci),ne).point:zt.point.add(D?ci.rotate(-de.angle):ci),gn=Y.allowVerticalPlacement&&It.placedOrientation===i.WritingMode.vertical?Math.PI/2:0,tn=0;tn<It.numGlyphs;tn++)i.addDynamicAttributes(Nt,bi,gn);Yt&&It.associatedIconIndex>=0&&($e[It.associatedIconIndex]={shiftedAnchor:bi,angle:gn})}}if(Yt){Ne.clear();for(var Ei=Y.icon.placedSymbolArray,Oi=0;Oi<Ei.length;Oi++){var Gi=Ei.get(Oi);if(Gi.hidden)ul(Gi.numGlyphs,Ne);else{var on=$e[Oi];if(!on)ul(Gi.numGlyphs,Ne);else for(var zn=0;zn<Gi.numGlyphs;zn++)i.addDynamicAttributes(Ne,on.shiftedAnchor,on.angle)}}Y.icon.dynamicLayoutVertexBuffer.updateData(Ne)}Y.text.dynamicLayoutVertexBuffer.updateData(Nt)}function le(Y,D,J){return J.iconsInText&&D?"symbolTextAndIcon":Y?"symbolSDF":"symbolIcon"}function ze(Y,D,J,O,K,de,ne,be,Be,ht,Yt,cr){for(var Nt=Y.context,Ne=Nt.gl,$e=Y.transform,ot=be==="map",It=Be==="map",Bt=ot&&J.layout.get("symbol-placement")!=="point",Ft=ot&&!It&&!Bt,Ut=J.layout.get("symbol-sort-key").constantOr(1)!==void 0,zt=!1,_t=Y.depthModeForSublayer(0,An.ReadOnly),Dt=J.layout.get("text-variable-anchor"),vt=[],lr=0,yr=O;lr<yr.length;lr+=1){var Br=yr[lr],Di=D.getTile(Br),ci=Di.getBucket(J);if(ci){var bi=K?ci.text:ci.icon;if(!(!bi||!bi.segments.get().length)){var gn=bi.programConfigurations.get(J.id),tn=K||ci.sdfIcons,Ei=K?ci.textSizeData:ci.iconSizeData,Oi=It||$e.pitch!==0,Gi=Y.useProgram(le(tn,K,ci),gn),on=i.evaluateSizeForZoom(Ei,$e.zoom),zn=void 0,Ja=[0,0],co=void 0,ts=void 0,so=null,Yo=void 0;if(K){if(co=Di.glyphAtlasTexture,ts=Ne.LINEAR,zn=Di.glyphAtlasTexture.size,ci.iconsInText){Ja=Di.imageAtlasTexture.size,so=Di.imageAtlasTexture;var ms=Ei.kind==="composite"||Ei.kind==="camera";Yo=Oi||Y.options.rotating||Y.options.zooming||ms?Ne.LINEAR:Ne.NEAREST}}else{var ou=J.layout.get("icon-size").constantOr(0)!==1||ci.iconsNeedLinear;co=Di.imageAtlasTexture,ts=tn||Y.options.rotating||Y.options.zooming||ou||Oi?Ne.LINEAR:Ne.NEAREST,zn=Di.imageAtlasTexture.size}var Cv=As(Di,1,Y.transform.zoom),Lv=_n(Br.posMatrix,It,ot,Y.transform,Cv),wd=ya(Br.posMatrix,It,ot,Y.transform,Cv),Kv=Dt&&ci.hasTextData(),hg=J.layout.get("icon-text-fit")!=="none"&&Kv&&ci.hasIconData();Bt&&No(ci,Br.posMatrix,Y,K,Lv,wd,It,ht);var gp=Y.translatePosMatrix(Br.posMatrix,Di,de,ne),Td=Bt||K&&Dt||hg?ue:Lv,mp=Y.translatePosMatrix(wd,Di,de,ne,!0),Ud=tn&&J.paint.get(K?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Ad=void 0;tn?ci.iconsInText?Ad=pu(Ei.kind,on,Ft,It,Y,gp,Td,mp,zn,Ja):Ad=Nc(Ei.kind,on,Ft,It,Y,gp,Td,mp,K,zn,!0):Ad=Yu(Ei.kind,on,Ft,It,Y,gp,Td,mp,K,zn);var Pv={program:Gi,buffers:bi,uniformValues:Ad,atlasTexture:co,atlasTextureIcon:so,atlasInterpolation:ts,atlasInterpolationIcon:Yo,isSDF:tn,hasHalo:Ud};if(Ut&&ci.canOverlap){zt=!0;for(var Jv=bi.segments.get(),Iv=0,fy=Jv;Iv<fy.length;Iv+=1){var dg=fy[Iv];vt.push({segments:new i.SegmentVector([dg]),sortKey:dg.sortKey,state:Pv})}}else vt.push({segments:bi.segments,sortKey:0,state:Pv})}}}zt&&vt.sort(function(k1,C1){return k1.sortKey-C1.sortKey});for(var oh=0,vg=vt;oh<vg.length;oh+=1){var hy=vg[oh],Zh=hy.state;if(Nt.activeTexture.set(Ne.TEXTURE0),Zh.atlasTexture.bind(Zh.atlasInterpolation,Ne.CLAMP_TO_EDGE),Zh.atlasTextureIcon&&(Nt.activeTexture.set(Ne.TEXTURE1),Zh.atlasTextureIcon&&Zh.atlasTextureIcon.bind(Zh.atlasInterpolationIcon,Ne.CLAMP_TO_EDGE)),Zh.isSDF){var am=Zh.uniformValues;Zh.hasHalo&&(am.u_is_halo=1,Ze(Zh.buffers,hy.segments,J,Y,Zh.program,_t,Yt,cr,am)),am.u_is_halo=0}Ze(Zh.buffers,hy.segments,J,Y,Zh.program,_t,Yt,cr,Zh.uniformValues)}}function Ze(Y,D,J,O,K,de,ne,be,Be){var ht=O.context,Yt=ht.gl;K.draw(ht,Yt.TRIANGLES,de,ne,be,wr.disabled,Be,J.id,Y.layoutVertexBuffer,Y.indexBuffer,D,J.paint,O.transform.zoom,Y.programConfigurations.get(J.id),Y.dynamicLayoutVertexBuffer,Y.opacityVertexBuffer)}function ut(Y,D,J,O){if(Y.renderPass==="translucent"){var K=J.paint.get("circle-opacity"),de=J.paint.get("circle-stroke-width"),ne=J.paint.get("circle-stroke-opacity"),be=J.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(K.constantOr(1)===0&&(de.constantOr(1)===0||ne.constantOr(1)===0))){for(var Be=Y.context,ht=Be.gl,Yt=Y.depthModeForSublayer(0,An.ReadOnly),cr=Vi.disabled,Nt=Y.colorModeForRenderPass(),Ne=[],$e=0;$e<O.length;$e++){var ot=O[$e],It=D.getTile(ot),Bt=It.getBucket(J);if(Bt){var Ft=Bt.programConfigurations.get(J.id),Ut=Y.useProgram("circle",Ft),zt=Bt.layoutVertexBuffer,_t=Bt.indexBuffer,Dt=Zt(Y,ot,It,J),vt={programConfiguration:Ft,program:Ut,layoutVertexBuffer:zt,indexBuffer:_t,uniformValues:Dt};if(be)for(var lr=Bt.segments.get(),yr=0,Br=lr;yr<Br.length;yr+=1){var Di=Br[yr];Ne.push({segments:new i.SegmentVector([Di]),sortKey:Di.sortKey,state:vt})}else Ne.push({segments:Bt.segments,sortKey:0,state:vt})}}be&&Ne.sort(function(co,ts){return co.sortKey-ts.sortKey});for(var ci=0,bi=Ne;ci<bi.length;ci+=1){var gn=bi[ci],tn=gn.state,Ei=tn.programConfiguration,Oi=tn.program,Gi=tn.layoutVertexBuffer,on=tn.indexBuffer,zn=tn.uniformValues,Ja=gn.segments;Oi.draw(Be,ht.TRIANGLES,Yt,cr,Nt,wr.disabled,zn,J.id,Gi,on,Ja,J.paint,Y.transform.zoom,Ei)}}}}function Mt(Y,D,J,O){if(J.paint.get("heatmap-opacity")!==0)if(Y.renderPass==="offscreen"){var K=Y.context,de=K.gl,ne=Vi.disabled,be=new wt([de.ONE,de.ONE],i.Color.transparent,[!0,!0,!0,!0]);Jt(K,Y,J),K.clear({color:i.Color.transparent});for(var Be=0;Be<O.length;Be++){var ht=O[Be];if(!D.hasRenderableParent(ht)){var Yt=D.getTile(ht),cr=Yt.getBucket(J);if(cr){var Nt=cr.programConfigurations.get(J.id),Ne=Y.useProgram("heatmap",Nt),$e=Y.transform,ot=$e.zoom;Ne.draw(K,de.TRIANGLES,An.disabled,ne,be,wr.disabled,an(ht.posMatrix,Yt,ot,J.paint.get("heatmap-intensity")),J.id,cr.layoutVertexBuffer,cr.indexBuffer,cr.segments,J.paint,Y.transform.zoom,Nt)}}}K.viewport.set([0,0,Y.width,Y.height])}else Y.renderPass==="translucent"&&(Y.context.setColorMode(Y.colorModeForRenderPass()),mr(Y,J))}function Jt(Y,D,J){var O=Y.gl;Y.activeTexture.set(O.TEXTURE1),Y.viewport.set([0,0,D.width/4,D.height/4]);var K=J.heatmapFbo;if(K)O.bindTexture(O.TEXTURE_2D,K.colorAttachment.get()),Y.bindFramebuffer.set(K.framebuffer);else{var de=O.createTexture();O.bindTexture(O.TEXTURE_2D,de),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_S,O.CLAMP_TO_EDGE),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_T,O.CLAMP_TO_EDGE),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MIN_FILTER,O.LINEAR),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MAG_FILTER,O.LINEAR),K=J.heatmapFbo=Y.createFramebuffer(D.width/4,D.height/4,!1),$t(Y,D,de,K)}}function $t(Y,D,J,O){var K=Y.gl,de=Y.extRenderToTextureHalfFloat?Y.extTextureHalfFloat.HALF_FLOAT_OES:K.UNSIGNED_BYTE;K.texImage2D(K.TEXTURE_2D,0,K.RGBA,D.width/4,D.height/4,0,K.RGBA,de,null),O.colorAttachment.set(J)}function mr(Y,D){var J=Y.context,O=J.gl,K=D.heatmapFbo;if(K){J.activeTexture.set(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,K.colorAttachment.get()),J.activeTexture.set(O.TEXTURE1);var de=D.colorRampTexture;de||(de=D.colorRampTexture=new i.Texture(J,D.colorRamp,O.RGBA)),de.bind(O.LINEAR,O.CLAMP_TO_EDGE),Y.useProgram("heatmapTexture").draw(J,O.TRIANGLES,An.disabled,Vi.disabled,Y.colorModeForRenderPass(),wr.disabled,Fi(Y,D,0,1),D.id,Y.viewportBuffer,Y.quadTriangleIndexBuffer,Y.viewportSegments,D.paint,Y.transform.zoom)}}function Cr(Y,D,J,O){if(Y.renderPass==="translucent"){var K=J.paint.get("line-opacity"),de=J.paint.get("line-width");if(!(K.constantOr(1)===0||de.constantOr(1)===0))for(var ne=Y.depthModeForSublayer(0,An.ReadOnly),be=Y.colorModeForRenderPass(),Be=J.paint.get("line-dasharray"),ht=J.paint.get("line-pattern"),Yt=ht.constantOr(1),cr=J.paint.get("line-gradient"),Nt=J.getCrossfadeParameters(),Ne=Yt?"linePattern":Be?"lineSDF":cr?"lineGradient":"line",$e=Y.context,ot=$e.gl,It=!0,Bt=0,Ft=O;Bt<Ft.length;Bt+=1){var Ut=Ft[Bt],zt=D.getTile(Ut);if(!(Yt&&!zt.patternsLoaded())){var _t=zt.getBucket(J);if(_t){var Dt=_t.programConfigurations.get(J.id),vt=Y.context.program.get(),lr=Y.useProgram(Ne,Dt),yr=It||lr.program!==vt,Br=ht.constantOr(null);if(Br&&zt.imageAtlas){var Di=zt.imageAtlas,ci=Di.patternPositions[Br.to.toString()],bi=Di.patternPositions[Br.from.toString()];ci&&bi&&Dt.setConstantPatternPositions(ci,bi)}var gn=Yt?as(Y,zt,J,Nt):Be?ws(Y,zt,J,Be,Nt):cr?Ss(Y,zt,J,_t.lineClipsArray.length):Zo(Y,zt,J);if(Yt)$e.activeTexture.set(ot.TEXTURE0),zt.imageAtlasTexture.bind(ot.LINEAR,ot.CLAMP_TO_EDGE),Dt.updatePaintBuffers(Nt);else if(Be&&(yr||Y.lineAtlas.dirty))$e.activeTexture.set(ot.TEXTURE0),Y.lineAtlas.bind($e);else if(cr){var tn=_t.gradients[J.id],Ei=tn.texture;if(J.gradientVersion!==tn.version){var Oi=256;if(J.stepInterpolant){var Gi=D.getSource().maxzoom,on=Ut.canonical.z===Gi?Math.ceil(1<<Y.transform.maxZoom-Ut.canonical.z):1,zn=_t.maxLineLength/i.EXTENT,Ja=1024,co=zn*Ja*on;Oi=i.clamp(i.nextPowerOfTwo(co),256,$e.maxTextureSize)}tn.gradient=i.renderColorRamp({expression:J.gradientExpression(),evaluationKey:"lineProgress",resolution:Oi,image:tn.gradient||void 0,clips:_t.lineClipsArray}),tn.texture?tn.texture.update(tn.gradient):tn.texture=new i.Texture($e,tn.gradient,ot.RGBA),tn.version=J.gradientVersion,Ei=tn.texture}$e.activeTexture.set(ot.TEXTURE0),Ei.bind(J.stepInterpolant?ot.NEAREST:ot.LINEAR,ot.CLAMP_TO_EDGE)}lr.draw($e,ot.TRIANGLES,ne,Y.stencilModeForClipping(Ut),be,wr.disabled,gn,J.id,_t.layoutVertexBuffer,_t.indexBuffer,_t.segments,J.paint,Y.transform.zoom,Dt,_t.layoutVertexBuffer2),It=!1}}}}}function ve(Y,D,J,O){var K=J.paint.get("fill-color"),de=J.paint.get("fill-opacity");if(de.constantOr(1)!==0){var ne=Y.colorModeForRenderPass(),be=J.paint.get("fill-pattern"),Be=Y.opaquePassEnabledForLayer()&&!be.constantOr(1)&&K.constantOr(i.Color.transparent).a===1&&de.constantOr(0)===1?"opaque":"translucent";if(Y.renderPass===Be){var ht=Y.depthModeForSublayer(1,Y.renderPass==="opaque"?An.ReadWrite:An.ReadOnly);xe(Y,D,J,O,ht,ne,!1)}if(Y.renderPass==="translucent"&&J.paint.get("fill-antialias")){var Yt=Y.depthModeForSublayer(J.getPaintProperty("fill-outline-color")?2:0,An.ReadOnly);xe(Y,D,J,O,Yt,ne,!0)}}}function xe(Y,D,J,O,K,de,ne){var be=Y.context.gl,Be=J.paint.get("fill-pattern"),ht=Be&&Be.constantOr(1),Yt=J.getCrossfadeParameters(),cr,Nt,Ne,$e,ot;ne?(Nt=ht&&!J.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",cr=be.LINES):(Nt=ht?"fillPattern":"fill",cr=be.TRIANGLES);for(var It=0,Bt=O;It<Bt.length;It+=1){var Ft=Bt[It],Ut=D.getTile(Ft);if(!(ht&&!Ut.patternsLoaded())){var zt=Ut.getBucket(J);if(zt){var _t=zt.programConfigurations.get(J.id),Dt=Y.useProgram(Nt,_t);ht&&(Y.context.activeTexture.set(be.TEXTURE0),Ut.imageAtlasTexture.bind(be.LINEAR,be.CLAMP_TO_EDGE),_t.updatePaintBuffers(Yt));var vt=Be.constantOr(null);if(vt&&Ut.imageAtlas){var lr=Ut.imageAtlas,yr=lr.patternPositions[vt.to.toString()],Br=lr.patternPositions[vt.from.toString()];yr&&Br&&_t.setConstantPatternPositions(yr,Br)}var Di=Y.translatePosMatrix(Ft.posMatrix,Ut,J.paint.get("fill-translate"),J.paint.get("fill-translate-anchor"));if(!ne)$e=zt.indexBuffer,ot=zt.segments,Ne=ht?cf(Di,Y,Yt,Ut):Oc(Di);else{$e=zt.indexBuffer2,ot=zt.segments2;var ci=[be.drawingBufferWidth,be.drawingBufferHeight];Ne=Nt==="fillOutlinePattern"&&ht?Bc(Di,Y,Yt,Ut,ci):fc(Di,ci)}Dt.draw(Y.context,cr,K,Y.stencilModeForClipping(Ft),de,wr.disabled,Ne,J.id,zt.layoutVertexBuffer,$e,ot,J.paint,Y.transform.zoom,_t)}}}}function Ie(Y,D,J,O){var K=J.paint.get("fill-extrusion-opacity");if(K!==0&&Y.renderPass==="translucent"){var de=new An(Y.context.gl.LEQUAL,An.ReadWrite,Y.depthRangeFor3D);if(K===1&&!J.paint.get("fill-extrusion-pattern").constantOr(1)){var ne=Y.colorModeForRenderPass();qe(Y,D,J,O,de,Vi.disabled,ne)}else qe(Y,D,J,O,de,Vi.disabled,wt.disabled),qe(Y,D,J,O,de,Y.stencilModeFor3D(),Y.colorModeForRenderPass())}}function qe(Y,D,J,O,K,de,ne){for(var be=Y.context,Be=be.gl,ht=J.paint.get("fill-extrusion-pattern"),Yt=ht.constantOr(1),cr=J.getCrossfadeParameters(),Nt=J.paint.get("fill-extrusion-opacity"),Ne=0,$e=O;Ne<$e.length;Ne+=1){var ot=$e[Ne],It=D.getTile(ot),Bt=It.getBucket(J);if(Bt){var Ft=Bt.programConfigurations.get(J.id),Ut=Y.useProgram(Yt?"fillExtrusionPattern":"fillExtrusion",Ft);Yt&&(Y.context.activeTexture.set(Be.TEXTURE0),It.imageAtlasTexture.bind(Be.LINEAR,Be.CLAMP_TO_EDGE),Ft.updatePaintBuffers(cr));var zt=ht.constantOr(null);if(zt&&It.imageAtlas){var _t=It.imageAtlas,Dt=_t.patternPositions[zt.to.toString()],vt=_t.patternPositions[zt.from.toString()];Dt&&vt&&Ft.setConstantPatternPositions(Dt,vt)}var lr=Y.translatePosMatrix(ot.posMatrix,It,J.paint.get("fill-extrusion-translate"),J.paint.get("fill-extrusion-translate-anchor")),yr=J.paint.get("fill-extrusion-vertical-gradient"),Br=Yt?Zu(lr,Y,yr,Nt,ot,cr,It):ah(lr,Y,yr,Nt);Ut.draw(be,be.gl.TRIANGLES,K,de,ne,wr.backCCW,Br,J.id,Bt.layoutVertexBuffer,Bt.indexBuffer,Bt.segments,J.paint,Y.transform.zoom,Ft)}}}function Qe(Y,D,J,O){if(!(Y.renderPass!=="offscreen"&&Y.renderPass!=="translucent")){for(var K=Y.context,de=Y.depthModeForSublayer(0,An.ReadOnly),ne=Y.colorModeForRenderPass(),be=Y.renderPass==="translucent"?Y.stencilConfigForOverlap(O):[{},O],Be=be[0],ht=be[1],Yt=0,cr=ht;Yt<cr.length;Yt+=1){var Nt=cr[Yt],Ne=D.getTile(Nt);Ne.needsHillshadePrepare&&Y.renderPass==="offscreen"?nt(Y,Ne,J,de,Vi.disabled,ne):Y.renderPass==="translucent"&&Xe(Y,Ne,J,de,Be[Nt.overscaledZ],ne)}K.viewport.set([0,0,Y.width,Y.height])}}function Xe(Y,D,J,O,K,de){var ne=Y.context,be=ne.gl,Be=D.fbo;if(Be){var ht=Y.useProgram("hillshade");ne.activeTexture.set(be.TEXTURE0),be.bindTexture(be.TEXTURE_2D,Be.colorAttachment.get());var Yt=Ra(Y,D,J);ht.draw(ne,be.TRIANGLES,O,K,de,wr.disabled,Yt,J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments)}}function nt(Y,D,J,O,K,de){var ne=Y.context,be=ne.gl,Be=D.dem;if(Be&&Be.data){var ht=Be.dim,Yt=Be.stride,cr=Be.getPixels();if(ne.activeTexture.set(be.TEXTURE1),ne.pixelStoreUnpackPremultiplyAlpha.set(!1),D.demTexture=D.demTexture||Y.getTileTexture(Yt),D.demTexture){var Nt=D.demTexture;Nt.update(cr,{premultiply:!1}),Nt.bind(be.NEAREST,be.CLAMP_TO_EDGE)}else D.demTexture=new i.Texture(ne,cr,be.RGBA,{premultiply:!1}),D.demTexture.bind(be.NEAREST,be.CLAMP_TO_EDGE);ne.activeTexture.set(be.TEXTURE0);var Ne=D.fbo;if(!Ne){var $e=new i.Texture(ne,{width:ht,height:ht,data:null},be.RGBA);$e.bind(be.LINEAR,be.CLAMP_TO_EDGE),Ne=D.fbo=ne.createFramebuffer(ht,ht,!0),Ne.colorAttachment.set($e.texture)}ne.bindFramebuffer.set(Ne.framebuffer),ne.viewport.set([0,0,ht,ht]),Y.useProgram("hillshadePrepare").draw(ne,be.TRIANGLES,O,K,de,wr.disabled,La(D.tileID,Be),J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments),D.needsHillshadePrepare=!1}}function qt(Y,D,J,O){if(Y.renderPass==="translucent"&&J.paint.get("raster-opacity")!==0&&O.length)for(var K=Y.context,de=K.gl,ne=D.getSource(),be=Y.useProgram("raster"),Be=Y.colorModeForRenderPass(),ht=ne instanceof Ce?[{},O]:Y.stencilConfigForOverlap(O),Yt=ht[0],cr=ht[1],Nt=cr[cr.length-1].overscaledZ,Ne=!Y.options.moving,$e=0,ot=cr;$e<ot.length;$e+=1){var It=ot[$e],Bt=Y.depthModeForSublayer(It.overscaledZ-Nt,J.paint.get("raster-opacity")===1?An.ReadWrite:An.ReadOnly,de.LESS),Ft=D.getTile(It),Ut=Y.transform.calculatePosMatrix(It.toUnwrapped(),Ne);Ft.registerFadeDuration(J.paint.get("raster-fade-duration"));var zt=D.findLoadedParent(It,0),_t=jt(Ft,zt,D,J,Y.transform),Dt=void 0,vt=void 0,lr=J.paint.get("raster-resampling")==="nearest"?de.NEAREST:de.LINEAR;K.activeTexture.set(de.TEXTURE0),Ft.texture.bind(lr,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST),K.activeTexture.set(de.TEXTURE1),zt?(zt.texture.bind(lr,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST),Dt=Math.pow(2,zt.tileID.overscaledZ-Ft.tileID.overscaledZ),vt=[Ft.tileID.canonical.x*Dt%1,Ft.tileID.canonical.y*Dt%1]):Ft.texture.bind(lr,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST);var yr=Ls(Ut,vt||[0,0],Dt||1,_t,J);ne instanceof Ce?be.draw(K,de.TRIANGLES,Bt,Vi.disabled,Be,wr.disabled,yr,J.id,ne.boundsBuffer,Y.quadTriangleIndexBuffer,ne.boundsSegments):be.draw(K,de.TRIANGLES,Bt,Yt[It.overscaledZ],Be,wr.disabled,yr,J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments)}}function jt(Y,D,J,O,K){var de=O.paint.get("raster-fade-duration");if(de>0){var ne=i.browser.now(),be=(ne-Y.timeAdded)/de,Be=D?(ne-D.timeAdded)/de:-1,ht=J.getSource(),Yt=K.coveringZoomLevel({tileSize:ht.tileSize,roundZoom:ht.roundZoom}),cr=!D||Math.abs(D.tileID.overscaledZ-Yt)>Math.abs(Y.tileID.overscaledZ-Yt),Nt=cr&&Y.refreshedUponExpiration?1:i.clamp(cr?be:1-Be,0,1);return Y.refreshedUponExpiration&&be>=1&&(Y.refreshedUponExpiration=!1),D?{opacity:1,mix:1-Nt}:{opacity:Nt,mix:0}}else return{opacity:1,mix:0}}function ar(Y,D,J){var O=J.paint.get("background-color"),K=J.paint.get("background-opacity");if(K!==0){var de=Y.context,ne=de.gl,be=Y.transform,Be=be.tileSize,ht=J.paint.get("background-pattern");if(!Y.isPatternMissing(ht)){var Yt=!ht&&O.a===1&&K===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass===Yt){var cr=Vi.disabled,Nt=Y.depthModeForSublayer(0,Yt==="opaque"?An.ReadWrite:An.ReadOnly),Ne=Y.colorModeForRenderPass(),$e=Y.useProgram(ht?"backgroundPattern":"background"),ot=be.coveringTiles({tileSize:Be});ht&&(de.activeTexture.set(ne.TEXTURE0),Y.imageManager.bind(Y.context));for(var It=J.getCrossfadeParameters(),Bt=0,Ft=ot;Bt<Ft.length;Bt+=1){var Ut=Ft[Bt],zt=Y.transform.calculatePosMatrix(Ut.toUnwrapped()),_t=ht?Ua(zt,K,Y,ht,{tileID:Ut,tileSize:Be},It):Ac(zt,K,O);$e.draw(de,ne.TRIANGLES,Nt,cr,Ne,wr.disabled,_t,J.id,Y.tileExtentBuffer,Y.quadTriangleIndexBuffer,Y.tileExtentSegments)}}}}}var fr=new i.Color(1,0,0,1),br=new i.Color(0,1,0,1),Fr=new i.Color(0,0,1,1),Hr=new i.Color(1,0,1,1),ri=new i.Color(0,1,1,1);function Ci(Y){var D=Y.transform.padding,J=3;sn(Y,Y.transform.height-(D.top||0),J,fr),sn(Y,D.bottom||0,J,br),Ln(Y,D.left||0,J,Fr),Ln(Y,Y.transform.width-(D.right||0),J,Hr);var O=Y.transform.centerPoint;cn(Y,O.x,Y.transform.height-O.y,ri)}function cn(Y,D,J,O){var K=20,de=2;Yn(Y,D-de/2,J-K/2,de,K,O),Yn(Y,D-K/2,J-de/2,K,de,O)}function sn(Y,D,J,O){Yn(Y,0,D+J/2,Y.transform.width,J,O)}function Ln(Y,D,J,O){Yn(Y,D-J/2,0,J,Y.transform.height,O)}function Yn(Y,D,J,O,K,de){var ne=Y.context,be=ne.gl;be.enable(be.SCISSOR_TEST),be.scissor(D*i.browser.devicePixelRatio,J*i.browser.devicePixelRatio,O*i.browser.devicePixelRatio,K*i.browser.devicePixelRatio),ne.clear({color:de}),be.disable(be.SCISSOR_TEST)}function Aa(Y,D,J){for(var O=0;O<J.length;O++)fa(Y,D,J[O])}function fa(Y,D,J){var O=Y.context,K=O.gl,de=J.posMatrix,ne=Y.useProgram("debug"),be=An.disabled,Be=Vi.disabled,ht=Y.colorModeForRenderPass(),Yt="$debug";O.activeTexture.set(K.TEXTURE0),Y.emptyTexture.bind(K.LINEAR,K.CLAMP_TO_EDGE),ne.draw(O,K.LINE_STRIP,be,Be,ht,wr.disabled,dn(de,i.Color.red),Yt,Y.debugBuffer,Y.tileBorderIndexBuffer,Y.debugSegments);var cr=D.getTileByID(J.key).latestRawTileData,Nt=cr&&cr.byteLength||0,Ne=Math.floor(Nt/1024),$e=D.getTile(J).tileSize,ot=512/Math.min($e,512)*(J.overscaledZ/Y.transform.zoom)*.5,It=J.canonical.toString();J.overscaledZ!==J.canonical.z&&(It+=" => "+J.overscaledZ);var Bt=It+" "+Ne+"kb";$a(Y,Bt),ne.draw(O,K.TRIANGLES,be,Be,wt.alphaBlended,wr.disabled,dn(de,i.Color.transparent,ot),Yt,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function $a(Y,D){Y.initDebugOverlayCanvas();var J=Y.debugOverlayCanvas,O=Y.context.gl,K=Y.debugOverlayCanvas.getContext("2d");K.clearRect(0,0,J.width,J.height),K.shadowColor="white",K.shadowBlur=2,K.lineWidth=1.5,K.strokeStyle="white",K.textBaseline="top",K.font="bold 36px Open Sans, sans-serif",K.fillText(D,5,5),K.strokeText(D,5,5),Y.debugOverlayTexture.update(J),Y.debugOverlayTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE)}function Co(Y,D,J){var O=Y.context,K=J.implementation;if(Y.renderPass==="offscreen"){var de=K.prerender;de&&(Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),de.call(K,O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),O.setStencilMode(Vi.disabled);var ne=K.renderingMode==="3d"?new An(Y.context.gl.LEQUAL,An.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,An.ReadOnly);O.setDepthMode(ne),K.render(O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState(),O.bindFramebuffer.set(null)}}var Qa={symbol:w,circle:ut,heatmap:Mt,line:Cr,fill:ve,"fill-extrusion":Ie,hillshade:Qe,raster:qt,background:ar,debug:Aa,custom:Co},mo=function(D,J){this.context=new Xr(D),this.transform=J,this._tileTextures={},this.setup(),this.numSublayers=ti.maxUnderzooming+ti.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Vf,this.gpuTimers={}};mo.prototype.resize=function(D,J){if(this.width=D*i.browser.devicePixelRatio,this.height=J*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var O=0,K=this.style._order;O<K.length;O+=1){var de=K[O];this.style._layers[de].resize()}},mo.prototype.setup=function(){var D=this.context,J=new i.StructArrayLayout2i4;J.emplaceBack(0,0),J.emplaceBack(i.EXTENT,0),J.emplaceBack(0,i.EXTENT),J.emplaceBack(i.EXTENT,i.EXTENT),this.tileExtentBuffer=D.createVertexBuffer(J,oc.members),this.tileExtentSegments=i.SegmentVector.simpleSegment(0,0,4,2);var O=new i.StructArrayLayout2i4;O.emplaceBack(0,0),O.emplaceBack(i.EXTENT,0),O.emplaceBack(0,i.EXTENT),O.emplaceBack(i.EXTENT,i.EXTENT),this.debugBuffer=D.createVertexBuffer(O,oc.members),this.debugSegments=i.SegmentVector.simpleSegment(0,0,4,5);var K=new i.StructArrayLayout4i8;K.emplaceBack(0,0,0,0),K.emplaceBack(i.EXTENT,0,i.EXTENT,0),K.emplaceBack(0,i.EXTENT,0,i.EXTENT),K.emplaceBack(i.EXTENT,i.EXTENT,i.EXTENT,i.EXTENT),this.rasterBoundsBuffer=D.createVertexBuffer(K,ke.members),this.rasterBoundsSegments=i.SegmentVector.simpleSegment(0,0,4,2);var de=new i.StructArrayLayout2i4;de.emplaceBack(0,0),de.emplaceBack(1,0),de.emplaceBack(0,1),de.emplaceBack(1,1),this.viewportBuffer=D.createVertexBuffer(de,oc.members),this.viewportSegments=i.SegmentVector.simpleSegment(0,0,4,2);var ne=new i.StructArrayLayout1ui2;ne.emplaceBack(0),ne.emplaceBack(1),ne.emplaceBack(3),ne.emplaceBack(2),ne.emplaceBack(0),this.tileBorderIndexBuffer=D.createIndexBuffer(ne);var be=new i.StructArrayLayout3ui6;be.emplaceBack(0,1,2),be.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=D.createIndexBuffer(be),this.emptyTexture=new i.Texture(D,{width:1,height:1,data:new Uint8Array([0,0,0,0])},D.gl.RGBA);var Be=this.context.gl;this.stencilClearMode=new Vi({func:Be.ALWAYS,mask:0},0,255,Be.ZERO,Be.ZERO,Be.ZERO)},mo.prototype.clearStencil=function(){var D=this.context,J=D.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var O=i.create();i.ortho(O,0,this.width,this.height,0,0,1),i.scale(O,O,[J.drawingBufferWidth,J.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(D,J.TRIANGLES,An.disabled,this.stencilClearMode,wt.disabled,wr.disabled,On(O),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},mo.prototype._renderTileClippingMasks=function(D,J){if(!(this.currentStencilSource===D.source||!D.isTileClipped()||!J||!J.length)){this.currentStencilSource=D.source;var O=this.context,K=O.gl;this.nextStencilID+J.length>256&&this.clearStencil(),O.setColorMode(wt.disabled),O.setDepthMode(An.disabled);var de=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ne=0,be=J;ne<be.length;ne+=1){var Be=be[ne],ht=this._tileClippingMaskIDs[Be.key]=this.nextStencilID++;de.draw(O,K.TRIANGLES,An.disabled,new Vi({func:K.ALWAYS,mask:0},ht,255,K.KEEP,K.KEEP,K.REPLACE),wt.disabled,wr.disabled,On(Be.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},mo.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var D=this.nextStencilID++,J=this.context.gl;return new Vi({func:J.NOTEQUAL,mask:255},D,255,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilModeForClipping=function(D){var J=this.context.gl;return new Vi({func:J.EQUAL,mask:255},this._tileClippingMaskIDs[D.key],0,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilConfigForOverlap=function(D){var J,O=this.context.gl,K=D.sort(function(ht,Yt){return Yt.overscaledZ-ht.overscaledZ}),de=K[K.length-1].overscaledZ,ne=K[0].overscaledZ-de+1;if(ne>1){this.currentStencilSource=void 0,this.nextStencilID+ne>256&&this.clearStencil();for(var be={},Be=0;Be<ne;Be++)be[Be+de]=new Vi({func:O.GEQUAL,mask:255},Be+this.nextStencilID,255,O.KEEP,O.KEEP,O.REPLACE);return this.nextStencilID+=ne,[be,K]}return[(J={},J[de]=Vi.disabled,J),K]},mo.prototype.colorModeForRenderPass=function(){var D=this.context.gl;if(this._showOverdrawInspector){var J=8,O=1/J;return new wt([D.CONSTANT_COLOR,D.ONE],new i.Color(O,O,O,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?wt.unblended:wt.alphaBlended},mo.prototype.depthModeForSublayer=function(D,J,O){if(!this.opaquePassEnabledForLayer())return An.disabled;var K=1-((1+this.currentLayer)*this.numSublayers+D)*this.depthEpsilon;return new An(O||this.context.gl.LEQUAL,J,[K,K])},mo.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},mo.prototype.render=function(D,J){var O=this;this.style=D,this.options=J,this.lineAtlas=D.lineAtlas,this.imageManager=D.imageManager,this.glyphManager=D.glyphManager,this.symbolFadeChange=D.placement.symbolFadeChange(i.browser.now()),this.imageManager.beginFrame();var K=this.style._order,de=this.style.sourceCaches;for(var ne in de){var be=de[ne];be.used&&be.prepare(this.context)}var Be={},ht={},Yt={};for(var cr in de){var Nt=de[cr];Be[cr]=Nt.getVisibleCoordinates(),ht[cr]=Be[cr].slice().reverse(),Yt[cr]=Nt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var Ne=0;Ne<K.length;Ne++){var $e=K[Ne];if(this.style._layers[$e].is3D()){this.opaquePassCutoff=Ne;break}}this.renderPass="offscreen";for(var ot=0,It=K;ot<It.length;ot+=1){var Bt=It[ot],Ft=this.style._layers[Bt];if(!(!Ft.hasOffscreenPass()||Ft.isHidden(this.transform.zoom))){var Ut=ht[Ft.source];Ft.type!=="custom"&&!Ut.length||this.renderLayer(this,de[Ft.source],Ft,Ut)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:J.showOverdrawInspector?i.Color.black:i.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=J.showOverdrawInspector,this.depthRangeFor3D=[0,1-(D._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=K.length-1;this.currentLayer>=0;this.currentLayer--){var zt=this.style._layers[K[this.currentLayer]],_t=de[zt.source],Dt=Be[zt.source];this._renderTileClippingMasks(zt,Dt),this.renderLayer(this,_t,zt,Dt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<K.length;this.currentLayer++){var vt=this.style._layers[K[this.currentLayer]],lr=de[vt.source],yr=(vt.type==="symbol"?Yt:ht)[vt.source];this._renderTileClippingMasks(vt,Be[vt.source]),this.renderLayer(this,lr,vt,yr)}if(this.options.showTileBoundaries){var Br,Di,ci=i.values(this.style._layers);ci.forEach(function(bi){bi.source&&!bi.isHidden(O.transform.zoom)&&(bi.source!==(Di&&Di.id)&&(Di=O.style.sourceCaches[bi.source]),(!Br||Br.getSource().maxzoom<Di.getSource().maxzoom)&&(Br=Di))}),Br&&Qa.debug(this,Br,Br.getVisibleCoordinates())}this.options.showPadding&&Ci(this),this.context.setDefault()},mo.prototype.renderLayer=function(D,J,O,K){O.isHidden(this.transform.zoom)||O.type!=="background"&&O.type!=="custom"&&!K.length||(this.id=O.id,this.gpuTimingStart(O),Qa[O.type](D,J,O,K,this.style.placement.variableOffsets),this.gpuTimingEnd())},mo.prototype.gpuTimingStart=function(D){if(this.options.gpuTiming){var J=this.context.extTimerQuery,O=this.gpuTimers[D.id];O||(O=this.gpuTimers[D.id]={calls:0,cpuTime:0,query:J.createQueryEXT()}),O.calls++,J.beginQueryEXT(J.TIME_ELAPSED_EXT,O.query)}},mo.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var D=this.context.extTimerQuery;D.endQueryEXT(D.TIME_ELAPSED_EXT)}},mo.prototype.collectGpuTimers=function(){var D=this.gpuTimers;return this.gpuTimers={},D},mo.prototype.queryGpuTimers=function(D){var J={};for(var O in D){var K=D[O],de=this.context.extTimerQuery,ne=de.getQueryObjectEXT(K.query,de.QUERY_RESULT_EXT)/(1e3*1e3);de.deleteQueryEXT(K.query),J[O]=ne}return J},mo.prototype.translatePosMatrix=function(D,J,O,K,de){if(!O[0]&&!O[1])return D;var ne=de?K==="map"?this.transform.angle:0:K==="viewport"?-this.transform.angle:0;if(ne){var be=Math.sin(ne),Be=Math.cos(ne);O=[O[0]*Be-O[1]*be,O[0]*be+O[1]*Be]}var ht=[de?O[0]:As(J,O[0],this.transform.zoom),de?O[1]:As(J,O[1],this.transform.zoom),0],Yt=new Float32Array(16);return i.translate(Yt,D,ht),Yt},mo.prototype.saveTileTexture=function(D){var J=this._tileTextures[D.size[0]];J?J.push(D):this._tileTextures[D.size[0]]=[D]},mo.prototype.getTileTexture=function(D){var J=this._tileTextures[D];return J&&J.length>0?J.pop():null},mo.prototype.isPatternMissing=function(D){if(!D)return!1;if(!D.from||!D.to)return!0;var J=this.imageManager.getPattern(D.from.toString()),O=this.imageManager.getPattern(D.to.toString());return!J||!O},mo.prototype.useProgram=function(D,J){this.cache=this.cache||{};var O=""+D+(J?J.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[O]||(this.cache[O]=new Rf(this.context,D,wf[D],J,oo[D],this._showOverdrawInspector)),this.cache[O]},mo.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},mo.prototype.setBaseState=function(){var D=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(D.FUNC_ADD)},mo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var D=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,D.RGBA)}},mo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Bo=function(D,J){this.points=D,this.planes=J};Bo.fromInvProjectionMatrix=function(D,J,O){var K=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],de=Math.pow(2,O),ne=K.map(function(ht){return i.transformMat4([],ht,D)}).map(function(ht){return i.scale$1([],ht,1/ht[3]/J*de)}),be=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Be=be.map(function(ht){var Yt=i.sub([],ne[ht[0]],ne[ht[1]]),cr=i.sub([],ne[ht[2]],ne[ht[1]]),Nt=i.normalize([],i.cross([],Yt,cr)),Ne=-i.dot(Nt,ne[ht[1]]);return Nt.concat(Ne)});return new Bo(ne,Be)};var Ps=function(D,J){this.min=D,this.max=J,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ps.prototype.quadrant=function(D){for(var J=[D%2===0,D<2],O=i.clone$2(this.min),K=i.clone$2(this.max),de=0;de<J.length;de++)O[de]=J[de]?this.min[de]:this.center[de],K[de]=J[de]?this.center[de]:this.max[de];return K[2]=this.max[2],new Ps(O,K)},Ps.prototype.distanceX=function(D){var J=Math.max(Math.min(this.max[0],D[0]),this.min[0]);return J-D[0]},Ps.prototype.distanceY=function(D){var J=Math.max(Math.min(this.max[1],D[1]),this.min[1]);return J-D[1]},Ps.prototype.intersects=function(D){for(var J=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],O=!0,K=0;K<D.planes.length;K++){for(var de=D.planes[K],ne=0,be=0;be<J.length;be++)ne+=i.dot$1(de,J[be])>=0;if(ne===0)return 0;ne!==J.length&&(O=!1)}if(O)return 2;for(var Be=0;Be<3;Be++){for(var ht=Number.MAX_VALUE,Yt=-Number.MAX_VALUE,cr=0;cr<D.points.length;cr++){var Nt=D.points[cr][Be]-this.min[Be];ht=Math.min(ht,Nt),Yt=Math.max(Yt,Nt)}if(Yt<0||ht>this.max[Be]-this.min[Be])return 0}return 1};var Ts=function(D,J,O,K){if(D===void 0&&(D=0),J===void 0&&(J=0),O===void 0&&(O=0),K===void 0&&(K=0),isNaN(D)||D<0||isNaN(J)||J<0||isNaN(O)||O<0||isNaN(K)||K<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=D,this.bottom=J,this.left=O,this.right=K};Ts.prototype.interpolate=function(D,J,O){return J.top!=null&&D.top!=null&&(this.top=i.number(D.top,J.top,O)),J.bottom!=null&&D.bottom!=null&&(this.bottom=i.number(D.bottom,J.bottom,O)),J.left!=null&&D.left!=null&&(this.left=i.number(D.left,J.left,O)),J.right!=null&&D.right!=null&&(this.right=i.number(D.right,J.right,O)),this},Ts.prototype.getCenter=function(D,J){var O=i.clamp((this.left+D-this.right)/2,0,D),K=i.clamp((this.top+J-this.bottom)/2,0,J);return new i.Point(O,K)},Ts.prototype.equals=function(D){return this.top===D.top&&this.bottom===D.bottom&&this.left===D.left&&this.right===D.right},Ts.prototype.clone=function(){return new Ts(this.top,this.bottom,this.left,this.right)},Ts.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var wo=function(D,J,O,K,de){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=de===void 0?!0:de,this._minZoom=D||0,this._maxZoom=J||22,this._minPitch=O==null?0:O,this._maxPitch=K==null?60:K,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Ts,this._posMatrixCache={},this._alignedPosMatrixCache={}},To={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};wo.prototype.clone=function(){var D=new wo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return D.tileSize=this.tileSize,D.latRange=this.latRange,D.width=this.width,D.height=this.height,D._center=this._center,D.zoom=this.zoom,D.angle=this.angle,D._fov=this._fov,D._pitch=this._pitch,D._unmodified=this._unmodified,D._edgeInsets=this._edgeInsets.clone(),D._calcMatrices(),D},To.minZoom.get=function(){return this._minZoom},To.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},To.maxZoom.get=function(){return this._maxZoom},To.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},To.minPitch.get=function(){return this._minPitch},To.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},To.maxPitch.get=function(){return this._maxPitch},To.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},To.renderWorldCopies.get=function(){return this._renderWorldCopies},To.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},To.worldSize.get=function(){return this.tileSize*this.scale},To.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},To.size.get=function(){return new i.Point(this.width,this.height)},To.bearing.get=function(){return-this.angle/Math.PI*180},To.bearing.set=function(Y){var D=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==D&&(this._unmodified=!1,this.angle=D,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},To.pitch.get=function(){return this._pitch/Math.PI*180},To.pitch.set=function(Y){var D=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==D&&(this._unmodified=!1,this._pitch=D,this._calcMatrices())},To.fov.get=function(){return this._fov/Math.PI*180},To.fov.set=function(Y){Y=Math.max(.01,Math.min(60,Y)),this._fov!==Y&&(this._unmodified=!1,this._fov=Y/180*Math.PI,this._calcMatrices())},To.zoom.get=function(){return this._zoom},To.zoom.set=function(Y){var D=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==D&&(this._unmodified=!1,this._zoom=D,this.scale=this.zoomScale(D),this.tileZoom=Math.floor(D),this.zoomFraction=D-this.tileZoom,this._constrain(),this._calcMatrices())},To.center.get=function(){return this._center},To.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},To.padding.get=function(){return this._edgeInsets.toJSON()},To.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},To.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},wo.prototype.isPaddingEqual=function(D){return this._edgeInsets.equals(D)},wo.prototype.interpolatePadding=function(D,J,O){this._unmodified=!1,this._edgeInsets.interpolate(D,J,O),this._constrain(),this._calcMatrices()},wo.prototype.coveringZoomLevel=function(D){var J=(D.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/D.tileSize));return Math.max(0,J)},wo.prototype.getVisibleUnwrappedCoordinates=function(D){var J=[new i.UnwrappedTileID(0,D)];if(this._renderWorldCopies)for(var O=this.pointCoordinate(new i.Point(0,0)),K=this.pointCoordinate(new i.Point(this.width,0)),de=this.pointCoordinate(new i.Point(this.width,this.height)),ne=this.pointCoordinate(new i.Point(0,this.height)),be=Math.floor(Math.min(O.x,K.x,de.x,ne.x)),Be=Math.floor(Math.max(O.x,K.x,de.x,ne.x)),ht=1,Yt=be-ht;Yt<=Be+ht;Yt++)Yt!==0&&J.push(new i.UnwrappedTileID(Yt,D));return J},wo.prototype.coveringTiles=function(D){var J=this.coveringZoomLevel(D),O=J;if(D.minzoom!==void 0&&J<D.minzoom)return[];D.maxzoom!==void 0&&J>D.maxzoom&&(J=D.maxzoom);var K=i.MercatorCoordinate.fromLngLat(this.center),de=Math.pow(2,J),ne=[de*K.x,de*K.y,0],be=Bo.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,J),Be=D.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Be=J);var ht=3,Yt=function(ci){return{aabb:new Ps([ci*de,0,0],[(ci+1)*de,de,0]),zoom:0,x:0,y:0,wrap:ci,fullyVisible:!1}},cr=[],Nt=[],Ne=J,$e=D.reparseOverscaled?O:J;if(this._renderWorldCopies)for(var ot=1;ot<=3;ot++)cr.push(Yt(-ot)),cr.push(Yt(ot));for(cr.push(Yt(0));cr.length>0;){var It=cr.pop(),Bt=It.x,Ft=It.y,Ut=It.fullyVisible;if(!Ut){var zt=It.aabb.intersects(be);if(zt===0)continue;Ut=zt===2}var _t=It.aabb.distanceX(ne),Dt=It.aabb.distanceY(ne),vt=Math.max(Math.abs(_t),Math.abs(Dt)),lr=ht+(1<<Ne-It.zoom)-2;if(It.zoom===Ne||vt>lr&&It.zoom>=Be){Nt.push({tileID:new i.OverscaledTileID(It.zoom===Ne?$e:It.zoom,It.wrap,It.zoom,Bt,Ft),distanceSq:i.sqrLen([ne[0]-.5-Bt,ne[1]-.5-Ft])});continue}for(var yr=0;yr<4;yr++){var Br=(Bt<<1)+yr%2,Di=(Ft<<1)+(yr>>1);cr.push({aabb:It.aabb.quadrant(yr),zoom:It.zoom+1,x:Br,y:Di,wrap:It.wrap,fullyVisible:Ut})}}return Nt.sort(function(ci,bi){return ci.distanceSq-bi.distanceSq}).map(function(ci){return ci.tileID})},wo.prototype.resize=function(D,J){this.width=D,this.height=J,this.pixelsToGLUnits=[2/D,-2/J],this._constrain(),this._calcMatrices()},To.unmodified.get=function(){return this._unmodified},wo.prototype.zoomScale=function(D){return Math.pow(2,D)},wo.prototype.scaleZoom=function(D){return Math.log(D)/Math.LN2},wo.prototype.project=function(D){var J=i.clamp(D.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(D.lng)*this.worldSize,i.mercatorYfromLat(J)*this.worldSize)},wo.prototype.unproject=function(D){return new i.MercatorCoordinate(D.x/this.worldSize,D.y/this.worldSize).toLngLat()},To.point.get=function(){return this.project(this.center)},wo.prototype.setLocationAtPoint=function(D,J){var O=this.pointCoordinate(J),K=this.pointCoordinate(this.centerPoint),de=this.locationCoordinate(D),ne=new i.MercatorCoordinate(de.x-(O.x-K.x),de.y-(O.y-K.y));this.center=this.coordinateLocation(ne),this._renderWorldCopies&&(this.center=this.center.wrap())},wo.prototype.locationPoint=function(D){return this.coordinatePoint(this.locationCoordinate(D))},wo.prototype.pointLocation=function(D){return this.coordinateLocation(this.pointCoordinate(D))},wo.prototype.locationCoordinate=function(D){return i.MercatorCoordinate.fromLngLat(D)},wo.prototype.coordinateLocation=function(D){return D.toLngLat()},wo.prototype.pointCoordinate=function(D){var J=0,O=[D.x,D.y,0,1],K=[D.x,D.y,1,1];i.transformMat4(O,O,this.pixelMatrixInverse),i.transformMat4(K,K,this.pixelMatrixInverse);var de=O[3],ne=K[3],be=O[0]/de,Be=K[0]/ne,ht=O[1]/de,Yt=K[1]/ne,cr=O[2]/de,Nt=K[2]/ne,Ne=cr===Nt?0:(J-cr)/(Nt-cr);return new i.MercatorCoordinate(i.number(be,Be,Ne)/this.worldSize,i.number(ht,Yt,Ne)/this.worldSize)},wo.prototype.coordinatePoint=function(D){var J=[D.x*this.worldSize,D.y*this.worldSize,0,1];return i.transformMat4(J,J,this.pixelMatrix),new i.Point(J[0]/J[3],J[1]/J[3])},wo.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},wo.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},wo.prototype.setMaxBounds=function(D){D?(this.lngRange=[D.getWest(),D.getEast()],this.latRange=[D.getSouth(),D.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},wo.prototype.calculatePosMatrix=function(D,J){J===void 0&&(J=!1);var O=D.key,K=J?this._alignedPosMatrixCache:this._posMatrixCache;if(K[O])return K[O];var de=D.canonical,ne=this.worldSize/this.zoomScale(de.z),be=de.x+Math.pow(2,de.z)*D.wrap,Be=i.identity(new Float64Array(16));return i.translate(Be,Be,[be*ne,de.y*ne,0]),i.scale(Be,Be,[ne/i.EXTENT,ne/i.EXTENT,1]),i.multiply(Be,J?this.alignedProjMatrix:this.projMatrix,Be),K[O]=new Float32Array(Be),K[O]},wo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},wo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var D=-90,J=90,O=-180,K=180,de,ne,be,Be,ht=this.size,Yt=this._unmodified;if(this.latRange){var cr=this.latRange;D=i.mercatorYfromLat(cr[1])*this.worldSize,J=i.mercatorYfromLat(cr[0])*this.worldSize,de=J-D<ht.y?ht.y/(J-D):0}if(this.lngRange){var Nt=this.lngRange;O=i.mercatorXfromLng(Nt[0])*this.worldSize,K=i.mercatorXfromLng(Nt[1])*this.worldSize,ne=K-O<ht.x?ht.x/(K-O):0}var Ne=this.point,$e=Math.max(ne||0,de||0);if($e){this.center=this.unproject(new i.Point(ne?(K+O)/2:Ne.x,de?(J+D)/2:Ne.y)),this.zoom+=this.scaleZoom($e),this._unmodified=Yt,this._constraining=!1;return}if(this.latRange){var ot=Ne.y,It=ht.y/2;ot-It<D&&(Be=D+It),ot+It>J&&(Be=J-It)}if(this.lngRange){var Bt=Ne.x,Ft=ht.x/2;Bt-Ft<O&&(be=O+Ft),Bt+Ft>K&&(be=K-Ft)}(be!==void 0||Be!==void 0)&&(this.center=this.unproject(new i.Point(be!==void 0?be:Ne.x,Be!==void 0?Be:Ne.y))),this._unmodified=Yt,this._constraining=!1}},wo.prototype._calcMatrices=function(){if(this.height){var D=this._fov/2,J=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(D)*this.height;var O=Math.PI/2+this._pitch,K=this._fov*(.5+J.y/this.height),de=Math.sin(K)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-O-K,.01,Math.PI-.01)),ne=this.point,be=ne.x,Be=ne.y,ht=Math.cos(Math.PI/2-this._pitch)*de+this.cameraToCenterDistance,Yt=ht*1.01,cr=this.height/50,Nt=new Float64Array(16);i.perspective(Nt,this._fov,this.width/this.height,cr,Yt),Nt[8]=-J.x*2/this.width,Nt[9]=J.y*2/this.height,i.scale(Nt,Nt,[1,-1,1]),i.translate(Nt,Nt,[0,0,-this.cameraToCenterDistance]),i.rotateX(Nt,Nt,this._pitch),i.rotateZ(Nt,Nt,this.angle),i.translate(Nt,Nt,[-be,-Be,0]),this.mercatorMatrix=i.scale([],Nt,[this.worldSize,this.worldSize,this.worldSize]),i.scale(Nt,Nt,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Nt,this.invProjMatrix=i.invert([],this.projMatrix);var Ne=this.width%2/2,$e=this.height%2/2,ot=Math.cos(this.angle),It=Math.sin(this.angle),Bt=be-Math.round(be)+ot*Ne+It*$e,Ft=Be-Math.round(Be)+ot*$e+It*Ne,Ut=new Float64Array(Nt);if(i.translate(Ut,Ut,[Bt>.5?Bt-1:Bt,Ft>.5?Ft-1:Ft,0]),this.alignedProjMatrix=Ut,Nt=i.create(),i.scale(Nt,Nt,[this.width/2,-this.height/2,1]),i.translate(Nt,Nt,[1,-1,0]),this.labelPlaneMatrix=Nt,Nt=i.create(),i.scale(Nt,Nt,[1,-1,1]),i.translate(Nt,Nt,[-1,-1,0]),i.scale(Nt,Nt,[2/this.width,2/this.height,1]),this.glCoordMatrix=Nt,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Nt=i.invert(new Float64Array(16),this.pixelMatrix),!Nt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Nt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},wo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var D=this.pointCoordinate(new i.Point(0,0)),J=[D.x*this.worldSize,D.y*this.worldSize,0,1],O=i.transformMat4(J,J,this.pixelMatrix);return O[3]/this.cameraToCenterDistance},wo.prototype.getCameraPoint=function(){var D=this._pitch,J=Math.tan(D)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,J))},wo.prototype.getCameraQueryGeometry=function(D){var J=this.getCameraPoint();if(D.length===1)return[D[0],J];for(var O=J.x,K=J.y,de=J.x,ne=J.y,be=0,Be=D;be<Be.length;be+=1){var ht=Be[be];O=Math.min(O,ht.x),K=Math.min(K,ht.y),de=Math.max(de,ht.x),ne=Math.max(ne,ht.y)}return[new i.Point(O,K),new i.Point(de,K),new i.Point(de,ne),new i.Point(O,ne),new i.Point(O,K)]},Object.defineProperties(wo.prototype,To);function hl(Y,D){var J=!1,O=null,K=function(){O=null,J&&(Y(),O=setTimeout(K,D),J=!1)};return function(){return J=!0,O||K(),O}}var Ul=function(D){this._hashName=D&&encodeURIComponent(D),i.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=hl(this._updateHashUnthrottled.bind(this),30*1e3/100)};Ul.prototype.addTo=function(D){return this._map=D,i.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Ul.prototype.remove=function(){return i.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Ul.prototype.getHashString=function(D){var J=this._map.getCenter(),O=Math.round(this._map.getZoom()*100)/100,K=Math.ceil((O*Math.LN2+Math.log(512/360/.5))/Math.LN10),de=Math.pow(10,K),ne=Math.round(J.lng*de)/de,be=Math.round(J.lat*de)/de,Be=this._map.getBearing(),ht=this._map.getPitch(),Yt="";if(D?Yt+="/"+ne+"/"+be+"/"+O:Yt+=O+"/"+be+"/"+ne,(Be||ht)&&(Yt+="/"+Math.round(Be*10)/10),ht&&(Yt+="/"+Math.round(ht)),this._hashName){var cr=this._hashName,Nt=!1,Ne=i.window.location.hash.slice(1).split("&").map(function($e){var ot=$e.split("=")[0];return ot===cr?(Nt=!0,ot+"="+Yt):$e}).filter(function($e){return $e});return Nt||Ne.push(cr+"="+Yt),"#"+Ne.join("&")}return"#"+Yt},Ul.prototype._getCurrentHash=function(){var D=this,J=i.window.location.hash.replace("#","");if(this._hashName){var O;return J.split("&").map(function(K){return K.split("=")}).forEach(function(K){K[0]===D._hashName&&(O=K)}),(O&&O[1]||"").split("/")}return J.split("/")},Ul.prototype._onHashChange=function(){var D=this._getCurrentHash();if(D.length>=3&&!D.some(function(O){return isNaN(O)})){var J=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(D[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+D[2],+D[1]],zoom:+D[0],bearing:J,pitch:+(D[4]||0)}),!0}return!1},Ul.prototype._updateHashUnthrottled=function(){var D=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,D)}catch(J){}};var Lu={linearity:.3,easing:i.bezier(0,0,.3,1)},au=i.extend({deceleration:2500,maxSpeed:1400},Lu),Js=i.extend({deceleration:20,maxSpeed:1400},Lu),eu=i.extend({deceleration:1e3,maxSpeed:360},Lu),dc=i.extend({deceleration:1e3,maxSpeed:90},Lu),Tl=function(D){this._map=D,this.clear()};Tl.prototype.clear=function(){this._inertiaBuffer=[]},Tl.prototype.record=function(D){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:D})},Tl.prototype._drainInertiaBuffer=function(){for(var D=this._inertiaBuffer,J=i.browser.now(),O=160;D.length>0&&J-D[0].time>O;)D.shift()},Tl.prototype._onMoveEnd=function(D){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var J={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},O=0,K=this._inertiaBuffer;O<K.length;O+=1){var de=K[O],ne=de.settings;J.zoom+=ne.zoomDelta||0,J.bearing+=ne.bearingDelta||0,J.pitch+=ne.pitchDelta||0,ne.panDelta&&J.pan._add(ne.panDelta),ne.around&&(J.around=ne.around),ne.pinchAround&&(J.pinchAround=ne.pinchAround)}var be=this._inertiaBuffer[this._inertiaBuffer.length-1],Be=be.time-this._inertiaBuffer[0].time,ht={};if(J.pan.mag()){var Yt=X(J.pan.mag(),Be,i.extend({},au,D||{}));ht.offset=J.pan.mult(Yt.amount/J.pan.mag()),ht.center=this._map.transform.center,Al(ht,Yt)}if(J.zoom){var cr=X(J.zoom,Be,Js);ht.zoom=this._map.transform.zoom+cr.amount,Al(ht,cr)}if(J.bearing){var Nt=X(J.bearing,Be,eu);ht.bearing=this._map.transform.bearing+i.clamp(Nt.amount,-179,179),Al(ht,Nt)}if(J.pitch){var Ne=X(J.pitch,Be,dc);ht.pitch=this._map.transform.pitch+Ne.amount,Al(ht,Ne)}if(ht.zoom||ht.bearing){var $e=J.pinchAround===void 0?J.around:J.pinchAround;ht.around=$e?this._map.unproject($e):this._map.getCenter()}return this.clear(),i.extend(ht,{noMoveStart:!0})}};function Al(Y,D){(!Y.duration||Y.duration<D.duration)&&(Y.duration=D.duration,Y.easing=D.easing)}function X(Y,D,J){var O=J.maxSpeed,K=J.linearity,de=J.deceleration,ne=i.clamp(Y*K/(D/1e3),-O,O),be=Math.abs(ne)/(de*K);return{easing:J.easing,duration:be*1e3,amount:ne*(be/2)}}var se=function(Y){function D(O,K,de,ne){ne===void 0&&(ne={});var be=o.mousePos(K.getCanvasContainer(),de),Be=K.unproject(be);Y.call(this,O,i.extend({point:be,lngLat:Be,originalEvent:de},ne)),this._defaultPrevented=!1,this.target=K}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),Te=function(Y){function D(O,K,de){var ne=O==="touchend"?de.changedTouches:de.touches,be=o.touchPos(K.getCanvasContainer(),ne),Be=be.map(function(cr){return K.unproject(cr)}),ht=be.reduce(function(cr,Nt,Ne,$e){return cr.add(Nt.div($e.length))},new i.Point(0,0)),Yt=K.unproject(ht);Y.call(this,O,{points:be,point:ht,lngLats:Be,lngLat:Yt,originalEvent:de}),this._defaultPrevented=!1}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),Oe=function(Y){function D(O,K,de){Y.call(this,O,{originalEvent:de}),this._defaultPrevented=!1}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),Ve=function(D,J){this._map=D,this._clickTolerance=J.clickTolerance};Ve.prototype.reset=function(){delete this._mousedownPos},Ve.prototype.wheel=function(D){return this._firePreventable(new Oe(D.type,this._map,D))},Ve.prototype.mousedown=function(D,J){return this._mousedownPos=J,this._firePreventable(new se(D.type,this._map,D))},Ve.prototype.mouseup=function(D){this._map.fire(new se(D.type,this._map,D))},Ve.prototype.click=function(D,J){this._mousedownPos&&this._mousedownPos.dist(J)>=this._clickTolerance||this._map.fire(new se(D.type,this._map,D))},Ve.prototype.dblclick=function(D){return this._firePreventable(new se(D.type,this._map,D))},Ve.prototype.mouseover=function(D){this._map.fire(new se(D.type,this._map,D))},Ve.prototype.mouseout=function(D){this._map.fire(new se(D.type,this._map,D))},Ve.prototype.touchstart=function(D){return this._firePreventable(new Te(D.type,this._map,D))},Ve.prototype.touchmove=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype.touchend=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype.touchcancel=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype._firePreventable=function(D){if(this._map.fire(D),D.defaultPrevented)return{}},Ve.prototype.isEnabled=function(){return!0},Ve.prototype.isActive=function(){return!1},Ve.prototype.enable=function(){},Ve.prototype.disable=function(){};var Ye=function(D){this._map=D};Ye.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ye.prototype.mousemove=function(D){this._map.fire(new se(D.type,this._map,D))},Ye.prototype.mousedown=function(){this._delayContextMenu=!0},Ye.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new se("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ye.prototype.contextmenu=function(D){this._delayContextMenu?this._contextMenuEvent=D:this._map.fire(new se(D.type,this._map,D)),this._map.listens("contextmenu")&&D.preventDefault()},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var Pt=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._container=D.getContainer(),this._clickTolerance=J.clickTolerance||1};Pt.prototype.isEnabled=function(){return!!this._enabled},Pt.prototype.isActive=function(){return!!this._active},Pt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Pt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Pt.prototype.mousedown=function(D,J){this.isEnabled()&&D.shiftKey&&D.button===0&&(o.disableDrag(),this._startPos=this._lastPos=J,this._active=!0)},Pt.prototype.mousemoveWindow=function(D,J){if(this._active){var O=J;if(!(this._lastPos.equals(O)||!this._box&&O.dist(this._startPos)<this._clickTolerance)){var K=this._startPos;this._lastPos=O,this._box||(this._box=o.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",D));var de=Math.min(K.x,O.x),ne=Math.max(K.x,O.x),be=Math.min(K.y,O.y),Be=Math.max(K.y,O.y);o.setTransform(this._box,"translate("+de+"px,"+be+"px)"),this._box.style.width=ne-de+"px",this._box.style.height=Be-be+"px"}}},Pt.prototype.mouseupWindow=function(D,J){var O=this;if(this._active&&D.button===0){var K=this._startPos,de=J;if(this.reset(),o.suppressClick(),K.x===de.x&&K.y===de.y)this._fireEvent("boxzoomcancel",D);else return this._map.fire(new i.Event("boxzoomend",{originalEvent:D})),{cameraAnimation:function(ne){return ne.fitScreenCoordinates(K,de,O._map.getBearing(),{linear:!0})}}}},Pt.prototype.keydown=function(D){this._active&&D.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",D))},Pt.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},Pt.prototype._fireEvent=function(D,J){return this._map.fire(new i.Event(D,{originalEvent:J}))};function at(Y,D){for(var J={},O=0;O<Y.length;O++)J[Y[O].identifier]=D[O];return J}function Wt(Y){for(var D=new i.Point(0,0),J=0,O=Y;J<O.length;J+=1){var K=O[J];D._add(K)}return D.div(Y.length)}var dr=500,pr=500,Ur=30,zr=function(D){this.reset(),this.numTouches=D.numTouches};zr.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},zr.prototype.touchstart=function(D,J,O){(this.centroid||O.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=D.timeStamp),O.length===this.numTouches&&(this.centroid=Wt(J),this.touches=at(O,J)))},zr.prototype.touchmove=function(D,J,O){if(!(this.aborted||!this.centroid)){var K=at(O,J);for(var de in this.touches){var ne=this.touches[de],be=K[de];(!be||be.dist(ne)>Ur)&&(this.aborted=!0)}}},zr.prototype.touchend=function(D,J,O){if((!this.centroid||D.timeStamp-this.startTime>pr)&&(this.aborted=!0),O.length===0){var K=!this.aborted&&this.centroid;if(this.reset(),K)return K}};var gi=function(D){this.singleTap=new zr(D),this.numTaps=D.numTaps,this.reset()};gi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},gi.prototype.touchstart=function(D,J,O){this.singleTap.touchstart(D,J,O)},gi.prototype.touchmove=function(D,J,O){this.singleTap.touchmove(D,J,O)},gi.prototype.touchend=function(D,J,O){var K=this.singleTap.touchend(D,J,O);if(K){var de=D.timeStamp-this.lastTime<dr,ne=!this.lastTap||this.lastTap.dist(K)<Ur;if((!de||!ne)&&this.reset(),this.count++,this.lastTime=D.timeStamp,this.lastTap=K,this.count===this.numTaps)return this.reset(),K}};var xi=function(){this._zoomIn=new gi({numTouches:1,numTaps:2}),this._zoomOut=new gi({numTouches:2,numTaps:1}),this.reset()};xi.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},xi.prototype.touchstart=function(D,J,O){this._zoomIn.touchstart(D,J,O),this._zoomOut.touchstart(D,J,O)},xi.prototype.touchmove=function(D,J,O){this._zoomIn.touchmove(D,J,O),this._zoomOut.touchmove(D,J,O)},xi.prototype.touchend=function(D,J,O){var K=this,de=this._zoomIn.touchend(D,J,O),ne=this._zoomOut.touchend(D,J,O);if(de)return this._active=!0,D.preventDefault(),setTimeout(function(){return K.reset()},0),{cameraAnimation:function(be){return be.easeTo({duration:300,zoom:be.getZoom()+1,around:be.unproject(de)},{originalEvent:D})}};if(ne)return this._active=!0,D.preventDefault(),setTimeout(function(){return K.reset()},0),{cameraAnimation:function(be){return be.easeTo({duration:300,zoom:be.getZoom()-1,around:be.unproject(ne)},{originalEvent:D})}}},xi.prototype.touchcancel=function(){this.reset()},xi.prototype.enable=function(){this._enabled=!0},xi.prototype.disable=function(){this._enabled=!1,this.reset()},xi.prototype.isEnabled=function(){return this._enabled},xi.prototype.isActive=function(){return this._active};var Wr=0,ii=2,di={};di[Wr]=1,di[ii]=2;function Li(Y,D){var J=di[D];return Y.buttons===void 0||(Y.buttons&J)!==J}var Ti=function(D){this.reset(),this._clickTolerance=D.clickTolerance||1};Ti.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Ti.prototype._correctButton=function(D,J){return!1},Ti.prototype._move=function(D,J){return{}},Ti.prototype.mousedown=function(D,J){if(!this._lastPoint){var O=o.mouseButton(D);this._correctButton(D,O)&&(this._lastPoint=J,this._eventButton=O)}},Ti.prototype.mousemoveWindow=function(D,J){var O=this._lastPoint;if(O){if(D.preventDefault(),Li(D,this._eventButton)){this.reset();return}if(!(!this._moved&&J.dist(O)<this._clickTolerance))return this._moved=!0,this._lastPoint=J,this._move(O,J)}},Ti.prototype.mouseupWindow=function(D){if(this._lastPoint){var J=o.mouseButton(D);J===this._eventButton&&(this._moved&&o.suppressClick(),this.reset())}},Ti.prototype.enable=function(){this._enabled=!0},Ti.prototype.disable=function(){this._enabled=!1,this.reset()},Ti.prototype.isEnabled=function(){return this._enabled},Ti.prototype.isActive=function(){return this._active};var Qr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.mousedown=function(O,K){Y.prototype.mousedown.call(this,O,K),this._lastPoint&&(this._active=!0)},D.prototype._correctButton=function(O,K){return K===Wr&&!O.ctrlKey},D.prototype._move=function(O,K){return{around:K,panDelta:K.sub(O)}},D}(Ti),Pn=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype._correctButton=function(O,K){return K===Wr&&O.ctrlKey||K===ii},D.prototype._move=function(O,K){var de=.8,ne=(K.x-O.x)*de;if(ne)return this._active=!0,{bearingDelta:ne}},D.prototype.contextmenu=function(O){O.preventDefault()},D}(Ti),kn=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype._correctButton=function(O,K){return K===Wr&&O.ctrlKey||K===ii},D.prototype._move=function(O,K){var de=-.5,ne=(K.y-O.y)*de;if(ne)return this._active=!0,{pitchDelta:ne}},D.prototype.contextmenu=function(O){O.preventDefault()},D}(Ti),Bn=function(D){this._minTouches=1,this._clickTolerance=D.clickTolerance||1,this.reset()};Bn.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new i.Point(0,0)},Bn.prototype.touchstart=function(D,J,O){return this._calculateTransform(D,J,O)},Bn.prototype.touchmove=function(D,J,O){if(!(!this._active||O.length<this._minTouches))return D.preventDefault(),this._calculateTransform(D,J,O)},Bn.prototype.touchend=function(D,J,O){this._calculateTransform(D,J,O),this._active&&O.length<this._minTouches&&this.reset()},Bn.prototype.touchcancel=function(){this.reset()},Bn.prototype._calculateTransform=function(D,J,O){O.length>0&&(this._active=!0);var K=at(O,J),de=new i.Point(0,0),ne=new i.Point(0,0),be=0;for(var Be in K){var ht=K[Be],Yt=this._touches[Be];Yt&&(de._add(ht),ne._add(ht.sub(Yt)),be++,K[Be]=ht)}if(this._touches=K,!(be<this._minTouches||!ne.mag())){var cr=ne.div(be);if(this._sum._add(cr),!(this._sum.mag()<this._clickTolerance)){var Nt=de.div(be);return{around:Nt,panDelta:cr}}}},Bn.prototype.enable=function(){this._enabled=!0},Bn.prototype.disable=function(){this._enabled=!1,this.reset()},Bn.prototype.isEnabled=function(){return this._enabled},Bn.prototype.isActive=function(){return this._active};var na=function(){this.reset()};na.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},na.prototype._start=function(D){},na.prototype._move=function(D,J,O){return{}},na.prototype.touchstart=function(D,J,O){this._firstTwoTouches||O.length<2||(this._firstTwoTouches=[O[0].identifier,O[1].identifier],this._start([J[0],J[1]]))},na.prototype.touchmove=function(D,J,O){if(this._firstTwoTouches){D.preventDefault();var K=this._firstTwoTouches,de=K[0],ne=K[1],be=Ea(O,J,de),Be=Ea(O,J,ne);if(!(!be||!Be)){var ht=this._aroundCenter?null:be.add(Be).div(2);return this._move([be,Be],ht,D)}}},na.prototype.touchend=function(D,J,O){if(this._firstTwoTouches){var K=this._firstTwoTouches,de=K[0],ne=K[1],be=Ea(O,J,de),Be=Ea(O,J,ne);be&&Be||(this._active&&o.suppressClick(),this.reset())}},na.prototype.touchcancel=function(){this.reset()},na.prototype.enable=function(D){this._enabled=!0,this._aroundCenter=!!D&&D.around==="center"},na.prototype.disable=function(){this._enabled=!1,this.reset()},na.prototype.isEnabled=function(){return this._enabled},na.prototype.isActive=function(){return this._active};function Ea(Y,D,J){for(var O=0;O<Y.length;O++)if(Y[O].identifier===J)return D[O]}var Ia=.1;function yo(Y,D){return Math.log(Y/D)/Math.LN2}var Da=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),delete this._distance,delete this._startDistance},D.prototype._start=function(O){this._startDistance=this._distance=O[0].dist(O[1])},D.prototype._move=function(O,K){var de=this._distance;if(this._distance=O[0].dist(O[1]),!(!this._active&&Math.abs(yo(this._distance,this._startDistance))<Ia))return this._active=!0,{zoomDelta:yo(this._distance,de),pinchAround:K}},D}(na),go=25;function Is(Y,D){return Y.angleWith(D)*180/Math.PI}var Ms=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},D.prototype._start=function(O){this._startVector=this._vector=O[0].sub(O[1]),this._minDiameter=O[0].dist(O[1])},D.prototype._move=function(O,K){var de=this._vector;if(this._vector=O[0].sub(O[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:Is(this._vector,de),pinchAround:K}},D.prototype._isBelowThreshold=function(O){this._minDiameter=Math.min(this._minDiameter,O.mag());var K=Math.PI*this._minDiameter,de=go/K*360,ne=Is(O,this._startVector);return Math.abs(ne)<de},D}(na);function Xs(Y){return Math.abs(Y.y)>Math.abs(Y.x)}var Un=100,ja=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},D.prototype._start=function(O){this._lastPoints=O,Xs(O[0].sub(O[1]))&&(this._valid=!1)},D.prototype._move=function(O,K,de){var ne=O[0].sub(this._lastPoints[0]),be=O[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ne,be,de.timeStamp),!!this._valid){this._lastPoints=O,this._active=!0;var Be=(ne.y+be.y)/2,ht=-.5;return{pitchDelta:Be*ht}}},D.prototype.gestureBeginsVertically=function(O,K,de){if(this._valid!==void 0)return this._valid;var ne=2,be=O.mag()>=ne,Be=K.mag()>=ne;if(!(!be&&!Be)){if(!be||!Be)return this._firstMove===void 0&&(this._firstMove=de),de-this._firstMove<Un?void 0:!1;var ht=O.y>0==K.y>0;return Xs(O)&&Xs(K)&&ht}},D}(na),Fo={panStep:100,bearingStep:15,pitchStep:10},Uo=function(){var D=Fo;this._panStep=D.panStep,this._bearingStep=D.bearingStep,this._pitchStep=D.pitchStep,this._rotationDisabled=!1};Uo.prototype.reset=function(){this._active=!1},Uo.prototype.keydown=function(D){var J=this;if(!(D.altKey||D.ctrlKey||D.metaKey)){var O=0,K=0,de=0,ne=0,be=0;switch(D.keyCode){case 61:case 107:case 171:case 187:O=1;break;case 189:case 109:case 173:O=-1;break;case 37:D.shiftKey?K=-1:(D.preventDefault(),ne=-1);break;case 39:D.shiftKey?K=1:(D.preventDefault(),ne=1);break;case 38:D.shiftKey?de=1:(D.preventDefault(),be=-1);break;case 40:D.shiftKey?de=-1:(D.preventDefault(),be=1);break;default:return}return this._rotationDisabled&&(K=0,de=0),{cameraAnimation:function(Be){var ht=Be.getZoom();Be.easeTo({duration:300,easeId:"keyboardHandler",easing:$s,zoom:O?Math.round(ht)+O*(D.shiftKey?2:1):ht,bearing:Be.getBearing()+K*J._bearingStep,pitch:Be.getPitch()+de*J._pitchStep,offset:[-ne*J._panStep,-be*J._panStep],center:Be.getCenter()},{originalEvent:D})}}}},Uo.prototype.enable=function(){this._enabled=!0},Uo.prototype.disable=function(){this._enabled=!1,this.reset()},Uo.prototype.isEnabled=function(){return this._enabled},Uo.prototype.isActive=function(){return this._active},Uo.prototype.disableRotation=function(){this._rotationDisabled=!0},Uo.prototype.enableRotation=function(){this._rotationDisabled=!1};function $s(Y){return Y*(2-Y)}var Sl=4.000244140625,bu=1/100,dl=1/450,Sc=2,Me=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._handler=J,this._delta=0,this._defaultZoomRate=bu,this._wheelZoomRate=dl,i.bindAll(["_onTimeout"],this)};Me.prototype.setZoomRate=function(D){this._defaultZoomRate=D},Me.prototype.setWheelZoomRate=function(D){this._wheelZoomRate=D},Me.prototype.isEnabled=function(){return!!this._enabled},Me.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Me.prototype.isZooming=function(){return!!this._zooming},Me.prototype.enable=function(D){this.isEnabled()||(this._enabled=!0,this._aroundCenter=D&&D.around==="center")},Me.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Me.prototype.wheel=function(D){if(this.isEnabled()){var J=D.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?D.deltaY*40:D.deltaY,O=i.browser.now(),K=O-(this._lastWheelEventTime||0);this._lastWheelEventTime=O,J!==0&&J%Sl===0?this._type="wheel":J!==0&&Math.abs(J)<4?this._type="trackpad":K>400?(this._type=null,this._lastValue=J,this._timeout=setTimeout(this._onTimeout,40,D)):this._type||(this._type=Math.abs(K*J)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,J+=this._lastValue)),D.shiftKey&&J&&(J=J/4),this._type&&(this._lastWheelEvent=D,this._delta-=J,this._active||this._start(D)),D.preventDefault()}},Me.prototype._onTimeout=function(D){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},Me.prototype._start=function(D){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var J=o.mousePos(this._el,D);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(J)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Me.prototype.renderFrame=function(){var D=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var J=this._map.transform;if(this._delta!==0){var O=this._type==="wheel"&&Math.abs(this._delta)>Sl?this._wheelZoomRate:this._defaultZoomRate,K=Sc/(1+Math.exp(-Math.abs(this._delta*O)));this._delta<0&&K!==0&&(K=1/K);var de=typeof this._targetZoom=="number"?J.zoomScale(this._targetZoom):J.scale;this._targetZoom=Math.min(J.maxZoom,Math.max(J.minZoom,J.scaleZoom(de*K))),this._type==="wheel"&&(this._startZoom=J.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ne=typeof this._targetZoom=="number"?this._targetZoom:J.zoom,be=this._startZoom,Be=this._easing,ht=!1,Yt;if(this._type==="wheel"&&be&&Be){var cr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),Nt=Be(cr);Yt=i.number(be,ne,Nt),cr<1?this._frameId||(this._frameId=!0):ht=!0}else Yt=ne,ht=!0;return this._active=!0,ht&&(this._active=!1,this._finishTimeout=setTimeout(function(){D._zooming=!1,D._handler._triggerRenderFrame(),delete D._targetZoom,delete D._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ht,zoomDelta:Yt-J.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Me.prototype._smoothOutEasing=function(D){var J=i.ease;if(this._prevEase){var O=this._prevEase,K=(i.browser.now()-O.start)/O.duration,de=O.easing(K+.01)-O.easing(K),ne=.27/Math.sqrt(de*de+1e-4)*.01,be=Math.sqrt(.27*.27-ne*ne);J=i.bezier(ne,be,.25,1)}return this._prevEase={start:i.browser.now(),duration:D,easing:J},J},Me.prototype.reset=function(){this._active=!1};var bt=function(D,J){this._clickZoom=D,this._tapZoom=J};bt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},bt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},bt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},bt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ot=function(){this.reset()};Ot.prototype.reset=function(){this._active=!1},Ot.prototype.dblclick=function(D,J){return D.preventDefault(),{cameraAnimation:function(O){O.easeTo({duration:300,zoom:O.getZoom()+(D.shiftKey?-1:1),around:O.unproject(J)},{originalEvent:D})}}},Ot.prototype.enable=function(){this._enabled=!0},Ot.prototype.disable=function(){this._enabled=!1,this.reset()},Ot.prototype.isEnabled=function(){return this._enabled},Ot.prototype.isActive=function(){return this._active};var Lr=function(){this._tap=new gi({numTouches:1,numTaps:1}),this.reset()};Lr.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Lr.prototype.touchstart=function(D,J,O){this._swipePoint||(this._tapTime&&D.timeStamp-this._tapTime>dr&&this.reset(),this._tapTime?O.length>0&&(this._swipePoint=J[0],this._swipeTouch=O[0].identifier):this._tap.touchstart(D,J,O))},Lr.prototype.touchmove=function(D,J,O){if(!this._tapTime)this._tap.touchmove(D,J,O);else if(this._swipePoint){if(O[0].identifier!==this._swipeTouch)return;var K=J[0],de=K.y-this._swipePoint.y;return this._swipePoint=K,D.preventDefault(),this._active=!0,{zoomDelta:de/128}}},Lr.prototype.touchend=function(D,J,O){if(this._tapTime)this._swipePoint&&O.length===0&&this.reset();else{var K=this._tap.touchend(D,J,O);K&&(this._tapTime=D.timeStamp)}},Lr.prototype.touchcancel=function(){this.reset()},Lr.prototype.enable=function(){this._enabled=!0},Lr.prototype.disable=function(){this._enabled=!1,this.reset()},Lr.prototype.isEnabled=function(){return this._enabled},Lr.prototype.isActive=function(){return this._active};var Vr=function(D,J,O){this._el=D,this._mousePan=J,this._touchPan=O};Vr.prototype.enable=function(D){this._inertiaOptions=D||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Vr.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Vr.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Vr.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Or=function(D,J,O){this._pitchWithRotate=D.pitchWithRotate,this._mouseRotate=J,this._mousePitch=O};Or.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Or.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Or.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Or.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Nr=function(D,J,O,K){this._el=D,this._touchZoom=J,this._touchRotate=O,this._tapDragZoom=K,this._rotationDisabled=!1,this._enabled=!0};Nr.prototype.enable=function(D){this._touchZoom.enable(D),this._rotationDisabled||this._touchRotate.enable(D),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Nr.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Nr.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Nr.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Nr.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Nr.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var vi=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},Ni=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D}(i.Event);function qi(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var Si=function(D,J){this._map=D,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Tl(D),this._bearingSnap=J.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(J),i.bindAll(["handleEvent","handleWindowEvent"],this);var O=this._el;this._listeners=[[O,"touchstart",{passive:!0}],[O,"touchmove",{passive:!1}],[O,"touchend",void 0],[O,"touchcancel",void 0],[O,"mousedown",void 0],[O,"mousemove",void 0],[O,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[O,"mouseover",void 0],[O,"mouseout",void 0],[O,"dblclick",void 0],[O,"click",void 0],[O,"keydown",{capture:!1}],[O,"keyup",void 0],[O,"wheel",{passive:!1}],[O,"contextmenu",void 0],[i.window,"blur",void 0]];for(var K=0,de=this._listeners;K<de.length;K+=1){var ne=de[K],be=ne[0],Be=ne[1],ht=ne[2];o.addEventListener(be,Be,be===i.window.document?this.handleWindowEvent:this.handleEvent,ht)}};Si.prototype.destroy=function(){for(var D=0,J=this._listeners;D<J.length;D+=1){var O=J[D],K=O[0],de=O[1],ne=O[2];o.removeEventListener(K,de,K===i.window.document?this.handleWindowEvent:this.handleEvent,ne)}},Si.prototype._addDefaultHandlers=function(D){var J=this._map,O=J.getCanvasContainer();this._add("mapEvent",new Ve(J,D));var K=J.boxZoom=new Pt(J,D);this._add("boxZoom",K);var de=new xi,ne=new Ot;J.doubleClickZoom=new bt(ne,de),this._add("tapZoom",de),this._add("clickZoom",ne);var be=new Lr;this._add("tapDragZoom",be);var Be=J.touchPitch=new ja;this._add("touchPitch",Be);var ht=new Pn(D),Yt=new kn(D);J.dragRotate=new Or(D,ht,Yt),this._add("mouseRotate",ht,["mousePitch"]),this._add("mousePitch",Yt,["mouseRotate"]);var cr=new Qr(D),Nt=new Bn(D);J.dragPan=new Vr(O,cr,Nt),this._add("mousePan",cr),this._add("touchPan",Nt,["touchZoom","touchRotate"]);var Ne=new Ms,$e=new Da;J.touchZoomRotate=new Nr(O,$e,Ne,be),this._add("touchRotate",Ne,["touchPan","touchZoom"]),this._add("touchZoom",$e,["touchPan","touchRotate"]);var ot=J.scrollZoom=new Me(J,this);this._add("scrollZoom",ot,["mousePan"]);var It=J.keyboard=new Uo;this._add("keyboard",It),this._add("blockableMapEvent",new Ye(J));for(var Bt=0,Ft=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];Bt<Ft.length;Bt+=1){var Ut=Ft[Bt];D.interactive&&D[Ut]&&J[Ut].enable(D[Ut])}},Si.prototype._add=function(D,J,O){this._handlers.push({handlerName:D,handler:J,allowed:O}),this._handlersById[D]=J},Si.prototype.stop=function(D){if(!this._updatingCamera){for(var J=0,O=this._handlers;J<O.length;J+=1){var K=O[J],de=K.handler;de.reset()}this._inertia.clear(),this._fireEvents({},{},D),this._changes=[]}},Si.prototype.isActive=function(){for(var D=0,J=this._handlers;D<J.length;D+=1){var O=J[D],K=O.handler;if(K.isActive())return!0}return!1},Si.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Si.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Si.prototype.isMoving=function(){return!!vi(this._eventsInProgress)||this.isZooming()},Si.prototype._blockedByActive=function(D,J,O){for(var K in D)if(K!==O&&(!J||J.indexOf(K)<0))return!0;return!1},Si.prototype.handleWindowEvent=function(D){this.handleEvent(D,D.type+"Window")},Si.prototype._getMapTouches=function(D){for(var J=[],O=0,K=D;O<K.length;O+=1){var de=K[O],ne=de.target;this._el.contains(ne)&&J.push(de)}return J},Si.prototype.handleEvent=function(D,J){if(D.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;for(var O=D.type==="renderFrame"?void 0:D,K={needsRenderFrame:!1},de={},ne={},be=D.touches?this._getMapTouches(D.touches):void 0,Be=be?o.touchPos(this._el,be):o.mousePos(this._el,D),ht=0,Yt=this._handlers;ht<Yt.length;ht+=1){var cr=Yt[ht],Nt=cr.handlerName,Ne=cr.handler,$e=cr.allowed;if(Ne.isEnabled()){var ot=void 0;this._blockedByActive(ne,$e,Nt)?Ne.reset():Ne[J||D.type]&&(ot=Ne[J||D.type](D,Be,be),this.mergeHandlerResult(K,de,ot,Nt,O),ot&&ot.needsRenderFrame&&this._triggerRenderFrame()),(ot||Ne.isActive())&&(ne[Nt]=Ne)}}var It={};for(var Bt in this._previousActiveHandlers)ne[Bt]||(It[Bt]=O);this._previousActiveHandlers=ne,(Object.keys(It).length||qi(K))&&(this._changes.push([K,de,It]),this._triggerRenderFrame()),(Object.keys(ne).length||qi(K))&&this._map._stop(!0),this._updatingCamera=!1;var Ft=K.cameraAnimation;Ft&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ft(this._map))},Si.prototype.mergeHandlerResult=function(D,J,O,K,de){if(O){i.extend(D,O);var ne={handlerName:K,originalEvent:O.originalEvent||de};O.zoomDelta!==void 0&&(J.zoom=ne),O.panDelta!==void 0&&(J.drag=ne),O.pitchDelta!==void 0&&(J.pitch=ne),O.bearingDelta!==void 0&&(J.rotate=ne)}},Si.prototype._applyChanges=function(){for(var D={},J={},O={},K=0,de=this._changes;K<de.length;K+=1){var ne=de[K],be=ne[0],Be=ne[1],ht=ne[2];be.panDelta&&(D.panDelta=(D.panDelta||new i.Point(0,0))._add(be.panDelta)),be.zoomDelta&&(D.zoomDelta=(D.zoomDelta||0)+be.zoomDelta),be.bearingDelta&&(D.bearingDelta=(D.bearingDelta||0)+be.bearingDelta),be.pitchDelta&&(D.pitchDelta=(D.pitchDelta||0)+be.pitchDelta),be.around!==void 0&&(D.around=be.around),be.pinchAround!==void 0&&(D.pinchAround=be.pinchAround),be.noInertia&&(D.noInertia=be.noInertia),i.extend(J,Be),i.extend(O,ht)}this._updateMapTransform(D,J,O),this._changes=[]},Si.prototype._updateMapTransform=function(D,J,O){var K=this._map,de=K.transform;if(!qi(D))return this._fireEvents(J,O,!0);var ne=D.panDelta,be=D.zoomDelta,Be=D.bearingDelta,ht=D.pitchDelta,Yt=D.around,cr=D.pinchAround;cr!==void 0&&(Yt=cr),K._stop(!0),Yt=Yt||K.transform.centerPoint;var Nt=de.pointLocation(ne?Yt.sub(ne):Yt);Be&&(de.bearing+=Be),ht&&(de.pitch+=ht),be&&(de.zoom+=be),de.setLocationAtPoint(Nt,Yt),this._map._update(),D.noInertia||this._inertia.record(D),this._fireEvents(J,O,!0)},Si.prototype._fireEvents=function(D,J,O){var K=this,de=vi(this._eventsInProgress),ne=vi(D),be={};for(var Be in D){var ht=D[Be],Yt=ht.originalEvent;this._eventsInProgress[Be]||(be[Be+"start"]=Yt),this._eventsInProgress[Be]=D[Be]}!de&&ne&&this._fireEvent("movestart",ne.originalEvent);for(var cr in be)this._fireEvent(cr,be[cr]);ne&&this._fireEvent("move",ne.originalEvent);for(var Nt in D){var Ne=D[Nt],$e=Ne.originalEvent;this._fireEvent(Nt,$e)}var ot={},It;for(var Bt in this._eventsInProgress){var Ft=this._eventsInProgress[Bt],Ut=Ft.handlerName,zt=Ft.originalEvent;this._handlersById[Ut].isActive()||(delete this._eventsInProgress[Bt],It=J[Ut]||zt,ot[Bt+"end"]=It)}for(var _t in ot)this._fireEvent(_t,ot[_t]);var Dt=vi(this._eventsInProgress);if(O&&(de||ne)&&!Dt){this._updatingCamera=!0;var vt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),lr=function(yr){return yr!==0&&-K._bearingSnap<yr&&yr<K._bearingSnap};vt?(lr(vt.bearing||this._map.getBearing())&&(vt.bearing=0),this._map.easeTo(vt,{originalEvent:It})):(this._map.fire(new i.Event("moveend",{originalEvent:It})),lr(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},Si.prototype._fireEvent=function(D,J){this._map.fire(new i.Event(D,J?{originalEvent:J}:{}))},Si.prototype._requestFrame=function(){var D=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(J){delete D._frameId,D.handleEvent(new Ni("renderFrame",{timeStamp:J})),D._applyChanges()})},Si.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var Vn=function(Y){function D(J,O){Y.call(this),this._moving=!1,this._zooming=!1,this.transform=J,this._bearingSnap=O.bearingSnap,i.bindAll(["_renderFrameCallback"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getCenter=function(){return new i.LngLat(this.transform.center.lng,this.transform.center.lat)},D.prototype.setCenter=function(O,K){return this.jumpTo({center:O},K)},D.prototype.panBy=function(O,K,de){return O=i.Point.convert(O).mult(-1),this.panTo(this.transform.center,i.extend({offset:O},K),de)},D.prototype.panTo=function(O,K,de){return this.easeTo(i.extend({center:O},K),de)},D.prototype.getZoom=function(){return this.transform.zoom},D.prototype.setZoom=function(O,K){return this.jumpTo({zoom:O},K),this},D.prototype.zoomTo=function(O,K,de){return this.easeTo(i.extend({zoom:O},K),de)},D.prototype.zoomIn=function(O,K){return this.zoomTo(this.getZoom()+1,O,K),this},D.prototype.zoomOut=function(O,K){return this.zoomTo(this.getZoom()-1,O,K),this},D.prototype.getBearing=function(){return this.transform.bearing},D.prototype.setBearing=function(O,K){return this.jumpTo({bearing:O},K),this},D.prototype.getPadding=function(){return this.transform.padding},D.prototype.setPadding=function(O,K){return this.jumpTo({padding:O},K),this},D.prototype.rotateTo=function(O,K,de){return this.easeTo(i.extend({bearing:O},K),de)},D.prototype.resetNorth=function(O,K){return this.rotateTo(0,i.extend({duration:1e3},O),K),this},D.prototype.resetNorthPitch=function(O,K){return this.easeTo(i.extend({bearing:0,pitch:0,duration:1e3},O),K),this},D.prototype.snapToNorth=function(O,K){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(O,K):this},D.prototype.getPitch=function(){return this.transform.pitch},D.prototype.setPitch=function(O,K){return this.jumpTo({pitch:O},K),this},D.prototype.cameraForBounds=function(O,K){O=i.LngLatBounds.convert(O);var de=K&&K.bearing||0;return this._cameraForBoxAndBearing(O.getNorthWest(),O.getSouthEast(),de,K)},D.prototype._cameraForBoxAndBearing=function(O,K,de,ne){var be={top:0,bottom:0,right:0,left:0};if(ne=i.extend({padding:be,offset:[0,0],maxZoom:this.transform.maxZoom},ne),typeof ne.padding=="number"){var Be=ne.padding;ne.padding={top:Be,bottom:Be,right:Be,left:Be}}ne.padding=i.extend(be,ne.padding);var ht=this.transform,Yt=ht.padding,cr=ht.project(i.LngLat.convert(O)),Nt=ht.project(i.LngLat.convert(K)),Ne=cr.rotate(-de*Math.PI/180),$e=Nt.rotate(-de*Math.PI/180),ot=new i.Point(Math.max(Ne.x,$e.x),Math.max(Ne.y,$e.y)),It=new i.Point(Math.min(Ne.x,$e.x),Math.min(Ne.y,$e.y)),Bt=ot.sub(It),Ft=(ht.width-(Yt.left+Yt.right+ne.padding.left+ne.padding.right))/Bt.x,Ut=(ht.height-(Yt.top+Yt.bottom+ne.padding.top+ne.padding.bottom))/Bt.y;if(Ut<0||Ft<0){i.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var zt=Math.min(ht.scaleZoom(ht.scale*Math.min(Ft,Ut)),ne.maxZoom),_t=typeof ne.offset.x=="number"?new i.Point(ne.offset.x,ne.offset.y):i.Point.convert(ne.offset),Dt=(ne.padding.left-ne.padding.right)/2,vt=(ne.padding.top-ne.padding.bottom)/2,lr=new i.Point(Dt,vt),yr=lr.rotate(de*Math.PI/180),Br=_t.add(yr),Di=Br.mult(ht.scale/ht.zoomScale(zt)),ci=ht.unproject(cr.add(Nt).div(2).sub(Di));return{center:ci,zoom:zt,bearing:de}},D.prototype.fitBounds=function(O,K,de){return this._fitInternal(this.cameraForBounds(O,K),K,de)},D.prototype.fitScreenCoordinates=function(O,K,de,ne,be){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(i.Point.convert(O)),this.transform.pointLocation(i.Point.convert(K)),de,ne),ne,be)},D.prototype._fitInternal=function(O,K,de){return O?(K=i.extend(O,K),delete K.padding,K.linear?this.easeTo(K,de):this.flyTo(K,de)):this},D.prototype.jumpTo=function(O,K){this.stop();var de=this.transform,ne=!1,be=!1,Be=!1;return"zoom"in O&&de.zoom!==+O.zoom&&(ne=!0,de.zoom=+O.zoom),O.center!==void 0&&(de.center=i.LngLat.convert(O.center)),"bearing"in O&&de.bearing!==+O.bearing&&(be=!0,de.bearing=+O.bearing),"pitch"in O&&de.pitch!==+O.pitch&&(Be=!0,de.pitch=+O.pitch),O.padding!=null&&!de.isPaddingEqual(O.padding)&&(de.padding=O.padding),this.fire(new i.Event("movestart",K)).fire(new i.Event("move",K)),ne&&this.fire(new i.Event("zoomstart",K)).fire(new i.Event("zoom",K)).fire(new i.Event("zoomend",K)),be&&this.fire(new i.Event("rotatestart",K)).fire(new i.Event("rotate",K)).fire(new i.Event("rotateend",K)),Be&&this.fire(new i.Event("pitchstart",K)).fire(new i.Event("pitch",K)).fire(new i.Event("pitchend",K)),this.fire(new i.Event("moveend",K))},D.prototype.easeTo=function(O,K){var de=this;this._stop(!1,O.easeId),O=i.extend({offset:[0,0],duration:500,easing:i.ease},O),(O.animate===!1||!O.essential&&i.browser.prefersReducedMotion)&&(O.duration=0);var ne=this.transform,be=this.getZoom(),Be=this.getBearing(),ht=this.getPitch(),Yt=this.getPadding(),cr="zoom"in O?+O.zoom:be,Nt="bearing"in O?this._normalizeBearing(O.bearing,Be):Be,Ne="pitch"in O?+O.pitch:ht,$e="padding"in O?O.padding:ne.padding,ot=i.Point.convert(O.offset),It=ne.centerPoint.add(ot),Bt=ne.pointLocation(It),Ft=i.LngLat.convert(O.center||Bt);this._normalizeCenter(Ft);var Ut=ne.project(Bt),zt=ne.project(Ft).sub(Ut),_t=ne.zoomScale(cr-be),Dt,vt;O.around&&(Dt=i.LngLat.convert(O.around),vt=ne.locationPoint(Dt));var lr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||cr!==be,this._rotating=this._rotating||Be!==Nt,this._pitching=this._pitching||Ne!==ht,this._padding=!ne.isPaddingEqual($e),this._easeId=O.easeId,this._prepareEase(K,O.noMoveStart,lr),this._ease(function(yr){if(de._zooming&&(ne.zoom=i.number(be,cr,yr)),de._rotating&&(ne.bearing=i.number(Be,Nt,yr)),de._pitching&&(ne.pitch=i.number(ht,Ne,yr)),de._padding&&(ne.interpolatePadding(Yt,$e,yr),It=ne.centerPoint.add(ot)),Dt)ne.setLocationAtPoint(Dt,vt);else{var Br=ne.zoomScale(ne.zoom-be),Di=cr>be?Math.min(2,_t):Math.max(.5,_t),ci=Math.pow(Di,1-yr),bi=ne.unproject(Ut.add(zt.mult(yr*ci)).mult(Br));ne.setLocationAtPoint(ne.renderWorldCopies?bi.wrap():bi,It)}de._fireMoveEvents(K)},function(yr){de._afterEase(K,yr)},O),this},D.prototype._prepareEase=function(O,K,de){de===void 0&&(de={}),this._moving=!0,!K&&!de.moving&&this.fire(new i.Event("movestart",O)),this._zooming&&!de.zooming&&this.fire(new i.Event("zoomstart",O)),this._rotating&&!de.rotating&&this.fire(new i.Event("rotatestart",O)),this._pitching&&!de.pitching&&this.fire(new i.Event("pitchstart",O))},D.prototype._fireMoveEvents=function(O){this.fire(new i.Event("move",O)),this._zooming&&this.fire(new i.Event("zoom",O)),this._rotating&&this.fire(new i.Event("rotate",O)),this._pitching&&this.fire(new i.Event("pitch",O))},D.prototype._afterEase=function(O,K){if(!(this._easeId&&K&&this._easeId===K)){delete this._easeId;var de=this._zooming,ne=this._rotating,be=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,de&&this.fire(new i.Event("zoomend",O)),ne&&this.fire(new i.Event("rotateend",O)),be&&this.fire(new i.Event("pitchend",O)),this.fire(new i.Event("moveend",O))}},D.prototype.flyTo=function(O,K){var de=this;if(!O.essential&&i.browser.prefersReducedMotion){var ne=i.pick(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ne,K)}this.stop(),O=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},O);var be=this.transform,Be=this.getZoom(),ht=this.getBearing(),Yt=this.getPitch(),cr=this.getPadding(),Nt="zoom"in O?i.clamp(+O.zoom,be.minZoom,be.maxZoom):Be,Ne="bearing"in O?this._normalizeBearing(O.bearing,ht):ht,$e="pitch"in O?+O.pitch:Yt,ot="padding"in O?O.padding:be.padding,It=be.zoomScale(Nt-Be),Bt=i.Point.convert(O.offset),Ft=be.centerPoint.add(Bt),Ut=be.pointLocation(Ft),zt=i.LngLat.convert(O.center||Ut);this._normalizeCenter(zt);var _t=be.project(Ut),Dt=be.project(zt).sub(_t),vt=O.curve,lr=Math.max(be.width,be.height),yr=lr/It,Br=Dt.mag();if("minZoom"in O){var Di=i.clamp(Math.min(O.minZoom,Be,Nt),be.minZoom,be.maxZoom),ci=lr/be.zoomScale(Di-Be);vt=Math.sqrt(ci/Br*2)}var bi=vt*vt;function gn(so){var Yo=(yr*yr-lr*lr+(so?-1:1)*bi*bi*Br*Br)/(2*(so?yr:lr)*bi*Br);return Math.log(Math.sqrt(Yo*Yo+1)-Yo)}function tn(so){return(Math.exp(so)-Math.exp(-so))/2}function Ei(so){return(Math.exp(so)+Math.exp(-so))/2}function Oi(so){return tn(so)/Ei(so)}var Gi=gn(0),on=function(so){return Ei(Gi)/Ei(Gi+vt*so)},zn=function(so){return lr*((Ei(Gi)*Oi(Gi+vt*so)-tn(Gi))/bi)/Br},Ja=(gn(1)-Gi)/vt;if(Math.abs(Br)<1e-6||!isFinite(Ja)){if(Math.abs(lr-yr)<1e-6)return this.easeTo(O,K);var co=yr<lr?-1:1;Ja=Math.abs(Math.log(yr/lr))/vt,zn=function(){return 0},on=function(so){return Math.exp(co*vt*so)}}if("duration"in O)O.duration=+O.duration;else{var ts="screenSpeed"in O?+O.screenSpeed/vt:+O.speed;O.duration=1e3*Ja/ts}return O.maxDuration&&O.duration>O.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=ht!==Ne,this._pitching=$e!==Yt,this._padding=!be.isPaddingEqual(ot),this._prepareEase(K,!1),this._ease(function(so){var Yo=so*Ja,ms=1/on(Yo);be.zoom=so===1?Nt:Be+be.scaleZoom(ms),de._rotating&&(be.bearing=i.number(ht,Ne,so)),de._pitching&&(be.pitch=i.number(Yt,$e,so)),de._padding&&(be.interpolatePadding(cr,ot,so),Ft=be.centerPoint.add(Bt));var ou=so===1?zt:be.unproject(_t.add(Dt.mult(zn(Yo))).mult(ms));be.setLocationAtPoint(be.renderWorldCopies?ou.wrap():ou,Ft),de._fireMoveEvents(K)},function(){return de._afterEase(K)},O),this},D.prototype.isEasing=function(){return!!this._easeFrameId},D.prototype.stop=function(){return this._stop()},D.prototype._stop=function(O,K){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var de=this._onEaseEnd;delete this._onEaseEnd,de.call(this,K)}if(!O){var ne=this.handlers;ne&&ne.stop(!1)}return this},D.prototype._ease=function(O,K,de){de.animate===!1||de.duration===0?(O(1),K()):(this._easeStart=i.browser.now(),this._easeOptions=de,this._onEaseFrame=O,this._onEaseEnd=K,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},D.prototype._renderFrameCallback=function(){var O=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(O)),O<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},D.prototype._normalizeBearing=function(O,K){O=i.wrap(O,-180,180);var de=Math.abs(O-K);return Math.abs(O-360-K)<de&&(O-=360),Math.abs(O+360-K)<de&&(O+=360),O},D.prototype._normalizeCenter=function(O){var K=this.transform;if(!(!K.renderWorldCopies||K.lngRange)){var de=O.lng-K.center.lng;O.lng+=de>180?-360:de<-180?360:0}},D}(i.Evented),Qi=function(D){D===void 0&&(D={}),this.options=D,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Qi.prototype.getDefaultPosition=function(){return"bottom-right"},Qi.prototype.onAdd=function(D){var J=this.options&&this.options.compact;return this._map=D,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=o.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),J&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),J===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Qi.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},Qi.prototype._setElementTitle=function(D,J){var O=this._map._getUIString("AttributionControl."+J);D.title=O,D.setAttribute("aria-label",O)},Qi.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"))},Qi.prototype._updateEditLink=function(){var D=this._editLink;D||(D=this._editLink=this._container.querySelector(".mapbox-improve-map"));var J=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(D){var O=J.reduce(function(K,de,ne){return de.value&&(K+=de.key+"="+de.value+(ne<J.length-1?"&":"")),K},"?");D.href=i.config.FEEDBACK_URL+"/"+O+(this._map._hash?this._map._hash.getHashString(!0):""),D.rel="noopener nofollow",this._setElementTitle(D,"MapFeedback")}},Qi.prototype._updateData=function(D){D&&(D.sourceDataType==="metadata"||D.sourceDataType==="visibility"||D.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},Qi.prototype._updateAttributions=function(){if(this._map.style){var D=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?D=D.concat(this.options.customAttribution.map(function(Be){return typeof Be!="string"?"":Be})):typeof this.options.customAttribution=="string"&&D.push(this.options.customAttribution)),this._map.style.stylesheet){var J=this._map.style.stylesheet;this.styleOwner=J.owner,this.styleId=J.id}var O=this._map.style.sourceCaches;for(var K in O){var de=O[K];if(de.used){var ne=de.getSource();ne.attribution&&D.indexOf(ne.attribution)<0&&D.push(ne.attribution)}}D.sort(function(Be,ht){return Be.length-ht.length}),D=D.filter(function(Be,ht){for(var Yt=ht+1;Yt<D.length;Yt++)if(D[Yt].indexOf(Be)>=0)return!1;return!0});var be=D.join(" | ");be!==this._attribHTML&&(this._attribHTML=be,D.length?(this._innerContainer.innerHTML=be,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Qi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ji=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};ji.prototype.onAdd=function(D){this._map=D,this._container=o.create("div","mapboxgl-ctrl");var J=o.create("a","mapboxgl-ctrl-logo");return J.target="_blank",J.rel="noopener nofollow",J.href="https://www.mapbox.com/",J.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),J.setAttribute("rel","noopener nofollow"),this._container.appendChild(J),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ji.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ji.prototype.getDefaultPosition=function(){return"bottom-left"},ji.prototype._updateLogo=function(D){(!D||D.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},ji.prototype._logoRequired=function(){if(this._map.style){var D=this._map.style.sourceCaches;for(var J in D){var O=D[J].getSource();if(O.mapbox_logo)return!0}return!1}},ji.prototype._updateCompact=function(){var D=this._container.children;if(D.length){var J=D[0];this._map.getCanvasContainer().offsetWidth<250?J.classList.add("mapboxgl-compact"):J.classList.remove("mapboxgl-compact")}};var oi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};oi.prototype.add=function(D){var J=++this._id,O=this._queue;return O.push({callback:D,id:J,cancelled:!1}),J},oi.prototype.remove=function(D){for(var J=this._currentlyRunning,O=J?this._queue.concat(J):this._queue,K=0,de=O;K<de.length;K+=1){var ne=de[K];if(ne.id===D){ne.cancelled=!0;return}}},oi.prototype.run=function(D){D===void 0&&(D=0);var J=this._currentlyRunning=this._queue;this._queue=[];for(var O=0,K=J;O<K.length;O+=1){var de=K[O];if(!de.cancelled&&(de.callback(D),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},oi.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Tr={"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"},Zr=i.window.HTMLImageElement,yi=i.window.HTMLElement,Ii=i.window.ImageBitmap,ui=-2,nn=22,Xi=0,qn=60,fi={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:ui,maxZoom:nn,minPitch:Xi,maxPitch:qn,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},si=function(Y){function D(O){var K=this;if(O=i.extend({},fi,O),O.minZoom!=null&&O.maxZoom!=null&&O.minZoom>O.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitch<Xi)throw new Error("minPitch must be greater than or equal to "+Xi);if(O.maxPitch!=null&&O.maxPitch>qn)throw new Error("maxPitch must be less than or equal to "+qn);var de=new wo(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies);if(Y.call(this,de,O),this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=O.preserveDrawingBuffer,this._antialias=O.antialias,this._trackResize=O.trackResize,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=O.collectResourceTiming,this._renderTaskQueue=new oi,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Tr,O.locale),this._clickTolerance=O.clickTolerance,this._requestManager=new i.RequestManager(O.transformRequest,O.accessToken),typeof O.container=="string"){if(this._container=i.window.document.getElementById(O.container),!this._container)throw new Error("Container '"+O.container+"' not found.")}else if(O.container instanceof yi)this._container=O.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(O.maxBounds&&this.setMaxBounds(O.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return K._update(!1)}),this.on("moveend",function(){return K._update(!1)}),this.on("zoom",function(){return K._update(!0)}),typeof i.window!="undefined"&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1),i.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Si(this,O);var ne=typeof O.hash=="string"&&O.hash||void 0;this._hash=O.hash&&new Ul(ne).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,i.extend({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new Qi({customAttribution:O.customAttribution})),this.addControl(new ji,O.logoPosition),this.on("style.load",function(){K.transform.unmodified&&K.jumpTo(K.style.stylesheet)}),this.on("data",function(be){K._update(be.dataType==="style"),K.fire(new i.Event(be.dataType+"data",be))}),this.on("dataloading",function(be){K.fire(new i.Event(be.dataType+"dataloading",be))})}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return D.prototype._getMapId=function(){return this._mapId},D.prototype.addControl=function(K,de){if(de===void 0&&(K.getDefaultPosition?de=K.getDefaultPosition():de="top-right"),!K||!K.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var ne=K.onAdd(this);this._controls.push(K);var be=this._controlPositions[de];return de.indexOf("bottom")!==-1?be.insertBefore(ne,be.firstChild):be.appendChild(ne),this},D.prototype.removeControl=function(K){if(!K||!K.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var de=this._controls.indexOf(K);return de>-1&&this._controls.splice(de,1),K.onRemove(this),this},D.prototype.hasControl=function(K){return this._controls.indexOf(K)>-1},D.prototype.resize=function(K){var de=this._containerDimensions(),ne=de[0],be=de[1];this._resizeCanvas(ne,be),this.transform.resize(ne,be),this.painter.resize(ne,be);var Be=!this._moving;return Be&&(this.stop(),this.fire(new i.Event("movestart",K)).fire(new i.Event("move",K))),this.fire(new i.Event("resize",K)),Be&&this.fire(new i.Event("moveend",K)),this},D.prototype.getBounds=function(){return this.transform.getBounds()},D.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},D.prototype.setMaxBounds=function(K){return this.transform.setMaxBounds(i.LngLatBounds.convert(K)),this._update()},D.prototype.setMinZoom=function(K){if(K=K==null?ui:K,K>=ui&&K<=this.transform.maxZoom)return this.transform.minZoom=K,this._update(),this.getZoom()<K&&this.setZoom(K),this;throw new Error("minZoom must be between "+ui+" and the current maxZoom, inclusive")},D.prototype.getMinZoom=function(){return this.transform.minZoom},D.prototype.setMaxZoom=function(K){if(K=K==null?nn:K,K>=this.transform.minZoom)return this.transform.maxZoom=K,this._update(),this.getZoom()>K&&this.setZoom(K),this;throw new Error("maxZoom must be greater than the current minZoom")},D.prototype.getMaxZoom=function(){return this.transform.maxZoom},D.prototype.setMinPitch=function(K){if(K=K==null?Xi:K,K<Xi)throw new Error("minPitch must be greater than or equal to "+Xi);if(K>=Xi&&K<=this.transform.maxPitch)return this.transform.minPitch=K,this._update(),this.getPitch()<K&&this.setPitch(K),this;throw new Error("minPitch must be between "+Xi+" and the current maxPitch, inclusive")},D.prototype.getMinPitch=function(){return this.transform.minPitch},D.prototype.setMaxPitch=function(K){if(K=K==null?qn:K,K>qn)throw new Error("maxPitch must be less than or equal to "+qn);if(K>=this.transform.minPitch)return this.transform.maxPitch=K,this._update(),this.getPitch()>K&&this.setPitch(K),this;throw new Error("maxPitch must be greater than the current minPitch")},D.prototype.getMaxPitch=function(){return this.transform.maxPitch},D.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},D.prototype.setRenderWorldCopies=function(K){return this.transform.renderWorldCopies=K,this._update()},D.prototype.project=function(K){return this.transform.locationPoint(i.LngLat.convert(K))},D.prototype.unproject=function(K){return this.transform.pointLocation(i.Point.convert(K))},D.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},D.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},D.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},D.prototype._createDelegatedListener=function(K,de,ne){var be=this,Be;if(K==="mouseenter"||K==="mouseover"){var ht=!1,Yt=function(It){var Bt=be.getLayer(de)?be.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length?ht||(ht=!0,ne.call(be,new se(K,be,It.originalEvent,{features:Bt}))):ht=!1},cr=function(){ht=!1};return{layer:de,listener:ne,delegates:{mousemove:Yt,mouseout:cr}}}else if(K==="mouseleave"||K==="mouseout"){var Nt=!1,Ne=function(It){var Bt=be.getLayer(de)?be.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length?Nt=!0:Nt&&(Nt=!1,ne.call(be,new se(K,be,It.originalEvent)))},$e=function(It){Nt&&(Nt=!1,ne.call(be,new se(K,be,It.originalEvent)))};return{layer:de,listener:ne,delegates:{mousemove:Ne,mouseout:$e}}}else{var ot=function(It){var Bt=be.getLayer(de)?be.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length&&(It.features=Bt,ne.call(be,It),delete It.features)};return{layer:de,listener:ne,delegates:(Be={},Be[K]=ot,Be)}}},D.prototype.on=function(K,de,ne){if(ne===void 0)return Y.prototype.on.call(this,K,de);var be=this._createDelegatedListener(K,de,ne);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[K]=this._delegatedListeners[K]||[],this._delegatedListeners[K].push(be);for(var Be in be.delegates)this.on(Be,be.delegates[Be]);return this},D.prototype.once=function(K,de,ne){if(ne===void 0)return Y.prototype.once.call(this,K,de);var be=this._createDelegatedListener(K,de,ne);for(var Be in be.delegates)this.once(Be,be.delegates[Be]);return this},D.prototype.off=function(K,de,ne){var be=this;if(ne===void 0)return Y.prototype.off.call(this,K,de);var Be=function(ht){for(var Yt=ht[K],cr=0;cr<Yt.length;cr++){var Nt=Yt[cr];if(Nt.layer===de&&Nt.listener===ne){for(var Ne in Nt.delegates)be.off(Ne,Nt.delegates[Ne]);return Yt.splice(cr,1),be}}};return this._delegatedListeners&&this._delegatedListeners[K]&&Be(this._delegatedListeners),this},D.prototype.queryRenderedFeatures=function(K,de){if(!this.style)return[];de===void 0&&K!==void 0&&!(K instanceof i.Point)&&!Array.isArray(K)&&(de=K,K=void 0),de=de||{},K=K||[[0,0],[this.transform.width,this.transform.height]];var ne;if(K instanceof i.Point||typeof K[0]=="number")ne=[i.Point.convert(K)];else{var be=i.Point.convert(K[0]),Be=i.Point.convert(K[1]);ne=[be,new i.Point(Be.x,be.y),Be,new i.Point(be.x,Be.y),be]}return this.style.queryRenderedFeatures(ne,de,this.transform)},D.prototype.querySourceFeatures=function(K,de){return this.style.querySourceFeatures(K,de)},D.prototype.setStyle=function(K,de){return de=i.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},de),de.diff!==!1&&de.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&K?(this._diffStyle(K,de),this):(this._localIdeographFontFamily=de.localIdeographFontFamily,this._updateStyle(K,de))},D.prototype._getUIString=function(K){var de=this._locale[K];if(de==null)throw new Error("Missing UI string '"+K+"'");return de},D.prototype._updateStyle=function(K,de){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),K)this.style=new yu(this,de||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof K=="string"?this.style.loadURL(K):this.style.loadJSON(K),this},D.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new yu(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},D.prototype._diffStyle=function(K,de){var ne=this;if(typeof K=="string"){var be=this._requestManager.normalizeStyleURL(K),Be=this._requestManager.transformRequest(be,i.ResourceType.Style);i.getJSON(Be,function(ht,Yt){ht?ne.fire(new i.ErrorEvent(ht)):Yt&&ne._updateDiff(Yt,de)})}else typeof K=="object"&&this._updateDiff(K,de)},D.prototype._updateDiff=function(K,de){try{this.style.setState(K)&&this._update(!0)}catch(ne){i.warnOnce("Unable to perform style diff: "+(ne.message||ne.error||ne)+". Rebuilding the style from scratch."),this._updateStyle(K,de)}},D.prototype.getStyle=function(){if(this.style)return this.style.serialize()},D.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():i.warnOnce("There is no style added to the map.")},D.prototype.addSource=function(K,de){return this._lazyInitEmptyStyle(),this.style.addSource(K,de),this._update(!0)},D.prototype.isSourceLoaded=function(K){var de=this.style&&this.style.sourceCaches[K];if(de===void 0){this.fire(new i.ErrorEvent(new Error("There is no source with ID '"+K+"'")));return}return de.loaded()},D.prototype.areTilesLoaded=function(){var K=this.style&&this.style.sourceCaches;for(var de in K){var ne=K[de],be=ne._tiles;for(var Be in be){var ht=be[Be];if(!(ht.state==="loaded"||ht.state==="errored"))return!1}}return!0},D.prototype.addSourceType=function(K,de,ne){return this._lazyInitEmptyStyle(),this.style.addSourceType(K,de,ne)},D.prototype.removeSource=function(K){return this.style.removeSource(K),this._update(!0)},D.prototype.getSource=function(K){return this.style.getSource(K)},D.prototype.addImage=function(K,de,ne){ne===void 0&&(ne={});var be=ne.pixelRatio;be===void 0&&(be=1);var Be=ne.sdf;Be===void 0&&(Be=!1);var ht=ne.stretchX,Yt=ne.stretchY,cr=ne.content;this._lazyInitEmptyStyle();var Nt=0;if(de instanceof Zr||Ii&&de instanceof Ii){var Ne=i.browser.getImageData(de),$e=Ne.width,ot=Ne.height,It=Ne.data;this.style.addImage(K,{data:new i.RGBAImage({width:$e,height:ot},It),pixelRatio:be,stretchX:ht,stretchY:Yt,content:cr,sdf:Be,version:Nt})}else{if(de.width===void 0||de.height===void 0)return this.fire(new i.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var Bt=de.width,Ft=de.height,Ut=de.data,zt=de;this.style.addImage(K,{data:new i.RGBAImage({width:Bt,height:Ft},new Uint8Array(Ut)),pixelRatio:be,stretchX:ht,stretchY:Yt,content:cr,sdf:Be,version:Nt,userImage:zt}),zt.onAdd&&zt.onAdd(this,K)}},D.prototype.updateImage=function(K,de){var ne=this.style.getImage(K);if(!ne)return this.fire(new i.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var be=de instanceof Zr||Ii&&de instanceof Ii?i.browser.getImageData(de):de,Be=be.width,ht=be.height,Yt=be.data;if(Be===void 0||ht===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(Be!==ne.data.width||ht!==ne.data.height)return this.fire(new i.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var cr=!(de instanceof Zr||Ii&&de instanceof Ii);ne.data.replace(Yt,cr),this.style.updateImage(K,ne)},D.prototype.hasImage=function(K){return K?!!this.style.getImage(K):(this.fire(new i.ErrorEvent(new Error("Missing required image id"))),!1)},D.prototype.removeImage=function(K){this.style.removeImage(K)},D.prototype.loadImage=function(K,de){i.getImage(this._requestManager.transformRequest(K,i.ResourceType.Image),de)},D.prototype.listImages=function(){return this.style.listImages()},D.prototype.addLayer=function(K,de){return this._lazyInitEmptyStyle(),this.style.addLayer(K,de),this._update(!0)},D.prototype.moveLayer=function(K,de){return this.style.moveLayer(K,de),this._update(!0)},D.prototype.removeLayer=function(K){return this.style.removeLayer(K),this._update(!0)},D.prototype.getLayer=function(K){return this.style.getLayer(K)},D.prototype.setLayerZoomRange=function(K,de,ne){return this.style.setLayerZoomRange(K,de,ne),this._update(!0)},D.prototype.setFilter=function(K,de,ne){return ne===void 0&&(ne={}),this.style.setFilter(K,de,ne),this._update(!0)},D.prototype.getFilter=function(K){return this.style.getFilter(K)},D.prototype.setPaintProperty=function(K,de,ne,be){return be===void 0&&(be={}),this.style.setPaintProperty(K,de,ne,be),this._update(!0)},D.prototype.getPaintProperty=function(K,de){return this.style.getPaintProperty(K,de)},D.prototype.setLayoutProperty=function(K,de,ne,be){return be===void 0&&(be={}),this.style.setLayoutProperty(K,de,ne,be),this._update(!0)},D.prototype.getLayoutProperty=function(K,de){return this.style.getLayoutProperty(K,de)},D.prototype.setLight=function(K,de){return de===void 0&&(de={}),this._lazyInitEmptyStyle(),this.style.setLight(K,de),this._update(!0)},D.prototype.getLight=function(){return this.style.getLight()},D.prototype.setFeatureState=function(K,de){return this.style.setFeatureState(K,de),this._update()},D.prototype.removeFeatureState=function(K,de){return this.style.removeFeatureState(K,de),this._update()},D.prototype.getFeatureState=function(K){return this.style.getFeatureState(K)},D.prototype.getContainer=function(){return this._container},D.prototype.getCanvasContainer=function(){return this._canvasContainer},D.prototype.getCanvas=function(){return this._canvas},D.prototype._containerDimensions=function(){var K=0,de=0;return this._container&&(K=this._container.clientWidth||400,de=this._container.clientHeight||300),[K,de]},D.prototype._detectMissingCSS=function(){var K=i.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");K!=="rgb(250, 128, 114)"&&i.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},D.prototype._setupContainer=function(){var K=this._container;K.classList.add("mapboxgl-map");var de=this._missingCSSCanary=o.create("div","mapboxgl-canary",K);de.style.visibility="hidden",this._detectMissingCSS();var ne=this._canvasContainer=o.create("div","mapboxgl-canvas-container",K);this._interactive&&ne.classList.add("mapboxgl-interactive"),this._canvas=o.create("canvas","mapboxgl-canvas",ne),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");var be=this._containerDimensions();this._resizeCanvas(be[0],be[1]);var Be=this._controlContainer=o.create("div","mapboxgl-control-container",K),ht=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(Yt){ht[Yt]=o.create("div","mapboxgl-ctrl-"+Yt,Be)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},D.prototype._resizeCanvas=function(K,de){var ne=i.browser.devicePixelRatio||1;this._canvas.width=ne*K,this._canvas.height=ne*de,this._canvas.style.width=K+"px",this._canvas.style.height=de+"px"},D.prototype._setupPainter=function(){var K=i.extend({},a.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),de=this._canvas.getContext("webgl",K)||this._canvas.getContext("experimental-webgl",K);if(!de){this.fire(new i.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new mo(de,this.transform),i.webpSupported.testSupport(de)},D.prototype._contextLost=function(K){K.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new i.Event("webglcontextlost",{originalEvent:K}))},D.prototype._contextRestored=function(K){this._setupPainter(),this.resize(),this._update(),this.fire(new i.Event("webglcontextrestored",{originalEvent:K}))},D.prototype._onMapScroll=function(K){if(K.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},D.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},D.prototype._update=function(K){return this.style?(this._styleDirty=this._styleDirty||K,this._sourcesDirty=!0,this.triggerRepaint(),this):this},D.prototype._requestRenderFrame=function(K){return this._update(),this._renderTaskQueue.add(K)},D.prototype._cancelRenderFrame=function(K){this._renderTaskQueue.remove(K)},D.prototype._render=function(K){var de=this,ne,be=0,Be=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(ne=Be.createQueryEXT(),Be.beginQueryEXT(Be.TIME_ELAPSED_EXT,ne),be=i.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(K),!this._removed){var ht=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var Yt=this.transform.zoom,cr=i.browser.now();this.style.zoomHistory.update(Yt,cr);var Nt=new i.EvaluationParameters(Yt,{now:cr,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Ne=Nt.crossFadingFactor();(Ne!==1||Ne!==this._crossFadingFactor)&&(ht=!0,this._crossFadingFactor=Ne),this.style.update(Nt)}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()||ht)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var $e=i.browser.now()-be;Be.endQueryEXT(Be.TIME_ELAPSED_EXT,ne),setTimeout(function(){var Bt=Be.getQueryObjectEXT(ne,Be.QUERY_RESULT_EXT)/1e6;Be.deleteQueryEXT(ne),de.fire(new i.Event("gpu-timing-frame",{cpuTime:$e,gpuTime:Bt}))},50)}if(this.listens("gpu-timing-layer")){var ot=this.painter.collectGpuTimers();setTimeout(function(){var Bt=de.painter.queryGpuTimers(ot);de.fire(new i.Event("gpu-timing-layer",{layerTimes:Bt}))},50)}var It=this._sourcesDirty||this._styleDirty||this._placementDirty;return It||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new i.Event("idle")),this._loaded&&!this._fullyLoaded&&!It&&(this._fullyLoaded=!0),this}},D.prototype.remove=function(){this._hash&&this._hash.remove();for(var K=0,de=this._controls;K<de.length;K+=1){var ne=de[K];ne.onRemove(this)}this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof i.window!="undefined"&&(i.window.removeEventListener("resize",this._onWindowResize,!1),i.window.removeEventListener("orientationchange",this._onWindowResize,!1),i.window.removeEventListener("online",this._onWindowOnline,!1));var be=this.painter.context.gl.getExtension("WEBGL_lose_context");be&&be.loseContext&&be.loseContext(),mn(this._canvasContainer),mn(this._controlContainer),mn(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new i.Event("remove"))},D.prototype.triggerRepaint=function(){var K=this;this.style&&!this._frame&&(this._frame=i.browser.frame(function(de){K._frame=null,K._render(de)}))},D.prototype._onWindowOnline=function(){this._update()},D.prototype._onWindowResize=function(K){this._trackResize&&this.resize({originalEvent:K})._update()},J.showTileBoundaries.get=function(){return!!this._showTileBoundaries},J.showTileBoundaries.set=function(O){this._showTileBoundaries!==O&&(this._showTileBoundaries=O,this._update())},J.showPadding.get=function(){return!!this._showPadding},J.showPadding.set=function(O){this._showPadding!==O&&(this._showPadding=O,this._update())},J.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},J.showCollisionBoxes.set=function(O){this._showCollisionBoxes!==O&&(this._showCollisionBoxes=O,O?this.style._generateCollisionBoxes():this._update())},J.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},J.showOverdrawInspector.set=function(O){this._showOverdrawInspector!==O&&(this._showOverdrawInspector=O,this._update())},J.repaint.get=function(){return!!this._repaint},J.repaint.set=function(O){this._repaint!==O&&(this._repaint=O,this.triggerRepaint())},J.vertices.get=function(){return!!this._vertices},J.vertices.set=function(O){this._vertices=O,this._update()},D.prototype._setCacheLimits=function(K,de){i.setCacheLimits(K,de)},J.version.get=function(){return i.version},Object.defineProperties(D.prototype,J),D}(Vn);function mn(Y){Y.parentNode&&Y.parentNode.removeChild(Y)}var Ji={showCompass:!0,showZoom:!0,visualizePitch:!1},Ui=function(D){var J=this;this.options=i.extend({},Ji,D),this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(O){return O.preventDefault()}),this.options.showZoom&&(i.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(O){return J._map.zoomIn({},{originalEvent:O})}),o.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(O){return J._map.zoomOut({},{originalEvent:O})}),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(O){J.options.visualizePitch?J._map.resetNorthPitch({},{originalEvent:O}):J._map.resetNorth({},{originalEvent:O})}),this._compassIcon=o.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Ui.prototype._updateZoomButtons=function(){var D=this._map.getZoom(),J=D===this._map.getMaxZoom(),O=D===this._map.getMinZoom();this._zoomInButton.disabled=J,this._zoomOutButton.disabled=O,this._zoomInButton.setAttribute("aria-disabled",J.toString()),this._zoomOutButton.setAttribute("aria-disabled",O.toString())},Ui.prototype._rotateCompassArrow=function(){var D=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=D},Ui.prototype.onAdd=function(D){return this._map=D,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Bi(this._map,this._compass,this.options.visualizePitch)),this._container},Ui.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},Ui.prototype._createButton=function(D,J){var O=o.create("button",D,this._container);return O.type="button",O.addEventListener("click",J),O},Ui.prototype._setButtonTitle=function(D,J){var O=this._map._getUIString("NavigationControl."+J);D.title=O,D.setAttribute("aria-label",O)};var Bi=function(D,J,O){O===void 0&&(O=!1),this._clickTolerance=10,this.element=J,this.mouseRotate=new Pn({clickTolerance:D.dragRotate._mouseRotate._clickTolerance}),this.map=D,O&&(this.mousePitch=new kn({clickTolerance:D.dragRotate._mousePitch._clickTolerance})),i.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),o.addEventListener(J,"mousedown",this.mousedown),o.addEventListener(J,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(J,"touchmove",this.touchmove),o.addEventListener(J,"touchend",this.touchend),o.addEventListener(J,"touchcancel",this.reset)};Bi.prototype.down=function(D,J){this.mouseRotate.mousedown(D,J),this.mousePitch&&this.mousePitch.mousedown(D,J),o.disableDrag()},Bi.prototype.move=function(D,J){var O=this.map,K=this.mouseRotate.mousemoveWindow(D,J);if(K&&K.bearingDelta&&O.setBearing(O.getBearing()+K.bearingDelta),this.mousePitch){var de=this.mousePitch.mousemoveWindow(D,J);de&&de.pitchDelta&&O.setPitch(O.getPitch()+de.pitchDelta)}},Bi.prototype.off=function(){var D=this.element;o.removeEventListener(D,"mousedown",this.mousedown),o.removeEventListener(D,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(D,"touchmove",this.touchmove),o.removeEventListener(D,"touchend",this.touchend),o.removeEventListener(D,"touchcancel",this.reset),this.offTemp()},Bi.prototype.offTemp=function(){o.enableDrag(),o.removeEventListener(i.window,"mousemove",this.mousemove),o.removeEventListener(i.window,"mouseup",this.mouseup)},Bi.prototype.mousedown=function(D){this.down(i.extend({},D,{ctrlKey:!0,preventDefault:function(){return D.preventDefault()}}),o.mousePos(this.element,D)),o.addEventListener(i.window,"mousemove",this.mousemove),o.addEventListener(i.window,"mouseup",this.mouseup)},Bi.prototype.mousemove=function(D){this.move(D,o.mousePos(this.element,D))},Bi.prototype.mouseup=function(D){this.mouseRotate.mouseupWindow(D),this.mousePitch&&this.mousePitch.mouseupWindow(D),this.offTemp()},Bi.prototype.touchstart=function(D){D.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,D.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return D.preventDefault()}},this._startPos))},Bi.prototype.touchmove=function(D){D.targetTouches.length!==1?this.reset():(this._lastPos=o.touchPos(this.element,D.targetTouches)[0],this.move({preventDefault:function(){return D.preventDefault()}},this._lastPos))},Bi.prototype.touchend=function(D){D.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Bi.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function pn(Y,D,J){if(Y=new i.LngLat(Y.lng,Y.lat),D){var O=new i.LngLat(Y.lng-360,Y.lat),K=new i.LngLat(Y.lng+360,Y.lat),de=J.locationPoint(Y).distSqr(D);J.locationPoint(O).distSqr(D)<de?Y=O:J.locationPoint(K).distSqr(D)<de&&(Y=K)}for(;Math.abs(Y.lng-J.center.lng)>180;){var ne=J.locationPoint(Y);if(ne.x>=0&&ne.y>=0&&ne.x<=J.width&&ne.y<=J.height)break;Y.lng>J.center.lng?Y.lng-=360:Y.lng+=360}return Y}var Nn={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 aa(Y,D,J){var O=Y.classList;for(var K in Nn)O.remove("mapboxgl-"+J+"-anchor-"+K);O.add("mapboxgl-"+J+"-anchor-"+D)}var Ki=function(Y){function D(J,O){if(Y.call(this),(J instanceof i.window.HTMLElement||O)&&(J=i.extend({element:J},O)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=J&&J.anchor||"center",this._color=J&&J.color||"#3FB1CE",this._scale=J&&J.scale||1,this._draggable=J&&J.draggable||!1,this._clickTolerance=J&&J.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=J&&J.rotation||0,this._rotationAlignment=J&&J.rotationAlignment||"auto",this._pitchAlignment=J&&J.pitchAlignment&&J.pitchAlignment!=="auto"?J.pitchAlignment:this._rotationAlignment,!J||!J.element){this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");var K=o.createNS("http://www.w3.org/2000/svg","svg"),de=41,ne=27;K.setAttributeNS(null,"display","block"),K.setAttributeNS(null,"height",de+"px"),K.setAttributeNS(null,"width",ne+"px"),K.setAttributeNS(null,"viewBox","0 0 "+ne+" "+de);var be=o.createNS("http://www.w3.org/2000/svg","g");be.setAttributeNS(null,"stroke","none"),be.setAttributeNS(null,"stroke-width","1"),be.setAttributeNS(null,"fill","none"),be.setAttributeNS(null,"fill-rule","evenodd");var Be=o.createNS("http://www.w3.org/2000/svg","g");Be.setAttributeNS(null,"fill-rule","nonzero");var ht=o.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"transform","translate(3.0, 29.0)"),ht.setAttributeNS(null,"fill","#000000");for(var Yt=[{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"}],cr=0,Nt=Yt;cr<Nt.length;cr+=1){var Ne=Nt[cr],$e=o.createNS("http://www.w3.org/2000/svg","ellipse");$e.setAttributeNS(null,"opacity","0.04"),$e.setAttributeNS(null,"cx","10.5"),$e.setAttributeNS(null,"cy","5.80029008"),$e.setAttributeNS(null,"rx",Ne.rx),$e.setAttributeNS(null,"ry",Ne.ry),ht.appendChild($e)}var ot=o.createNS("http://www.w3.org/2000/svg","g");ot.setAttributeNS(null,"fill",this._color);var It=o.createNS("http://www.w3.org/2000/svg","path");It.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"),ot.appendChild(It);var Bt=o.createNS("http://www.w3.org/2000/svg","g");Bt.setAttributeNS(null,"opacity","0.25"),Bt.setAttributeNS(null,"fill","#000000");var Ft=o.createNS("http://www.w3.org/2000/svg","path");Ft.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"),Bt.appendChild(Ft);var Ut=o.createNS("http://www.w3.org/2000/svg","g");Ut.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ut.setAttributeNS(null,"fill","#FFFFFF");var zt=o.createNS("http://www.w3.org/2000/svg","g");zt.setAttributeNS(null,"transform","translate(8.0, 8.0)");var _t=o.createNS("http://www.w3.org/2000/svg","circle");_t.setAttributeNS(null,"fill","#000000"),_t.setAttributeNS(null,"opacity","0.25"),_t.setAttributeNS(null,"cx","5.5"),_t.setAttributeNS(null,"cy","5.5"),_t.setAttributeNS(null,"r","5.4999962");var Dt=o.createNS("http://www.w3.org/2000/svg","circle");Dt.setAttributeNS(null,"fill","#FFFFFF"),Dt.setAttributeNS(null,"cx","5.5"),Dt.setAttributeNS(null,"cy","5.5"),Dt.setAttributeNS(null,"r","5.4999962"),zt.appendChild(_t),zt.appendChild(Dt),Be.appendChild(ht),Be.appendChild(ot),Be.appendChild(Bt),Be.appendChild(Ut),Be.appendChild(zt),K.appendChild(Be),K.setAttributeNS(null,"height",de*this._scale+"px"),K.setAttributeNS(null,"width",ne*this._scale+"px"),this._element.appendChild(K),this._offset=i.Point.convert(J&&J.offset||[0,-14])}else this._element=J.element,this._offset=i.Point.convert(J&&J.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(vt){vt.preventDefault()}),this._element.addEventListener("mousedown",function(vt){vt.preventDefault()}),aa(this._element,this._anchor,"marker"),this._popup=null}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(O){return this.remove(),this._map=O,O.getCanvasContainer().appendChild(this._element),O.on("move",this._update),O.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},D.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(O){return this._lngLat=i.LngLat.convert(O),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},D.prototype.getElement=function(){return this._element},D.prototype.setPopup=function(O){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),O){if(!("offset"in O.options)){var K=38.1,de=13.5,ne=Math.sqrt(Math.pow(de,2)/2);O.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-K],"bottom-left":[ne,(K-de+ne)*-1],"bottom-right":[-ne,(K-de+ne)*-1],left:[de,(K-de)*-1],right:[-de,(K-de)*-1]}:this._offset}this._popup=O,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},D.prototype._onKeyPress=function(O){var K=O.code,de=O.charCode||O.keyCode;(K==="Space"||K==="Enter"||de===32||de===13)&&this.togglePopup()},D.prototype._onMapClick=function(O){var K=O.originalEvent.target,de=this._element;this._popup&&(K===de||de.contains(K))&&this.togglePopup()},D.prototype.getPopup=function(){return this._popup},D.prototype.togglePopup=function(){var O=this._popup;if(O)O.isOpen()?O.remove():O.addTo(this._map);else return this;return this},D.prototype._update=function(O){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=pn(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var K="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?K="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(K="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var de="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?de="rotateX(0deg)":this._pitchAlignment==="map"&&(de="rotateX("+this._map.getPitch()+"deg)"),(!O||O.type==="moveend")&&(this._pos=this._pos.round()),o.setTransform(this._element,Nn[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+de+" "+K)}},D.prototype.getOffset=function(){return this._offset},D.prototype.setOffset=function(O){return this._offset=i.Point.convert(O),this._update(),this},D.prototype._onMove=function(O){if(!this._isDragging){var K=this._clickTolerance||this._map._clickTolerance;this._isDragging=O.point.dist(this._pointerdownPos)>=K}this._isDragging&&(this._pos=O.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},D.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.Event("dragend")),this._state="inactive"},D.prototype._addDragHandler=function(O){this._element.contains(O.originalEvent.target)&&(O.preventDefault(),this._positionDelta=O.point.sub(this._pos).add(this._offset),this._pointerdownPos=O.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},D.prototype.setDraggable=function(O){return this._draggable=!!O,this._map&&(O?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},D.prototype.isDraggable=function(){return this._draggable},D.prototype.setRotation=function(O){return this._rotation=O||0,this._update(),this},D.prototype.getRotation=function(){return this._rotation},D.prototype.setRotationAlignment=function(O){return this._rotationAlignment=O||"auto",this._update(),this},D.prototype.getRotationAlignment=function(){return this._rotationAlignment},D.prototype.setPitchAlignment=function(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this},D.prototype.getPitchAlignment=function(){return this._pitchAlignment},D}(i.Evented),Cn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ia;function sa(Y){ia!==void 0?Y(ia):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(D){ia=D.state!=="denied",Y(ia)}):(ia=!!i.window.navigator.geolocation,Y(ia))}var ba=0,is=!1,Zs=function(Y){function D(J){Y.call(this),this.options=i.extend({},Cn,J),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.onAdd=function(O){return this._map=O,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),sa(this._setupUI),this._container},D.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ba=0,is=!1},D.prototype._isOutOfMapMaxBounds=function(O){var K=this._map.getMaxBounds(),de=O.coords;return K&&(de.longitude<K.getWest()||de.longitude>K.getEast()||de.latitude<K.getSouth()||de.latitude>K.getNorth())},D.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},D.prototype._onSuccess=function(O){if(this._map){if(this._isOutOfMapMaxBounds(O)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",O)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=O,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(O),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(O),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",O)),this._finish()}},D.prototype._updateCamera=function(O){var K=new i.LngLat(O.coords.longitude,O.coords.latitude),de=O.coords.accuracy,ne=this._map.getBearing(),be=i.extend({bearing:ne},this.options.fitBoundsOptions);this._map.fitBounds(K.toBounds(de),be,{geolocateSource:!0})},D.prototype._updateMarker=function(O){if(O){var K=new i.LngLat(O.coords.longitude,O.coords.latitude);this._accuracyCircleMarker.setLngLat(K).addTo(this._map),this._userLocationDotMarker.setLngLat(K).addTo(this._map),this._accuracy=O.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},D.prototype._updateCircleRadius=function(){var O=this._map._container.clientHeight/2,K=this._map.unproject([0,O]),de=this._map.unproject([1,O]),ne=K.distanceTo(de),be=Math.ceil(2*this._accuracy/ne);this._circleElement.style.width=be+"px",this._circleElement.style.height=be+"px"},D.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},D.prototype._onError=function(O){if(this._map){if(this.options.trackUserLocation)if(O.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var K=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=K,this._geolocateButton.setAttribute("aria-label",K),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(O.code===3&&is)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",O)),this._finish()}},D.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},D.prototype._setupUI=function(O){var K=this;if(this._container.addEventListener("contextmenu",function(be){return be.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",O===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var de=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=de,this._geolocateButton.setAttribute("aria-label",de)}else{var ne=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ki(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ki({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(be){var Be=be.originalEvent&&be.originalEvent.type==="resize";!be.geolocateSource&&K._watchState==="ACTIVE_LOCK"&&!Be&&(K._watchState="BACKGROUND",K._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),K._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),K.fire(new i.Event("trackuserlocationend")))})},D.prototype.trigger=function(){if(!this._setup)return i.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ba--,is=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new i.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ba++;var O;ba>1?(O={maximumAge:6e5,timeout:0},is=!0):(O=this.options.positionOptions,is=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,O)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},D.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},D}(i.Evented),Va={maxWidth:100,unit:"metric"},Ml=function(D){this.options=i.extend({},Va,D),i.bindAll(["_onMove","setUnit"],this)};Ml.prototype.getDefaultPosition=function(){return"bottom-left"},Ml.prototype._onMove=function(){zo(this._map,this._container,this.options)},Ml.prototype.onAdd=function(D){return this._map=D,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",D.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Ml.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Ml.prototype.setUnit=function(D){this.options.unit=D,zo(this._map,this._container,this.options)};function zo(Y,D,J){var O=J&&J.maxWidth||100,K=Y._container.clientHeight/2,de=Y.unproject([0,K]),ne=Y.unproject([O,K]),be=de.distanceTo(ne);if(J&&J.unit==="imperial"){var Be=3.2808*be;if(Be>5280){var ht=Be/5280;Qs(D,O,ht,Y._getUIString("ScaleControl.Miles"))}else Qs(D,O,Be,Y._getUIString("ScaleControl.Feet"))}else if(J&&J.unit==="nautical"){var Yt=be/1852;Qs(D,O,Yt,Y._getUIString("ScaleControl.NauticalMiles"))}else be>=1e3?Qs(D,O,be/1e3,Y._getUIString("ScaleControl.Kilometers")):Qs(D,O,be,Y._getUIString("ScaleControl.Meters"))}function Qs(Y,D,J,O){var K=Vl(J),de=K/J;Y.style.width=D*de+"px",Y.innerHTML=K+" "+O}function al(Y){var D=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*D)/D}function Vl(Y){var D=Math.pow(10,(""+Math.floor(Y)).length-1),J=Y/D;return J=J>=10?10:J>=5?5:J>=3?3:J>=2?2:J>=1?1:al(J),D*J}var ss=function(D){this._fullscreen=!1,D&&D.container&&(D.container instanceof i.window.HTMLElement?this._container=D.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};ss.prototype.onAdd=function(D){return this._map=D,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},ss.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},ss.prototype._setupUI=function(){var D=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",D).setAttribute("aria-hidden",!0),D.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._updateTitle=function(){var D=this._getTitle();this._fullscreenButton.setAttribute("aria-label",D),this._fullscreenButton.title=D},ss.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},ss.prototype._isFullscreen=function(){return this._fullscreen},ss.prototype._changeIcon=function(){var D=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;D===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},ss.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Vs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Ys=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),wa=function(Y){function D(J){Y.call(this),this.options=i.extend(Object.create(Vs),J),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(O){return this._map&&this.remove(),this._map=O,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},D.prototype.isOpen=function(){return!!this._map},D.prototype.remove=function(){return this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new i.Event("close")),this},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(O){return this._lngLat=i.LngLat.convert(O),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},D.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},D.prototype.getElement=function(){return this._container},D.prototype.setText=function(O){return this.setDOMContent(i.window.document.createTextNode(O))},D.prototype.setHTML=function(O){var K=i.window.document.createDocumentFragment(),de=i.window.document.createElement("body"),ne;for(de.innerHTML=O;ne=de.firstChild,!!ne;)K.appendChild(ne);return this.setDOMContent(K)},D.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},D.prototype.setMaxWidth=function(O){return this.options.maxWidth=O,this._update(),this},D.prototype.setDOMContent=function(O){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(O),this._createCloseButton(),this._update(),this._focusFirstElement(),this},D.prototype.addClassName=function(O){this._container&&this._container.classList.add(O)},D.prototype.removeClassName=function(O){this._container&&this._container.classList.remove(O)},D.prototype.setOffset=function(O){return this.options.offset=O,this._update(),this},D.prototype.toggleClassName=function(O){if(this._container)return this._container.classList.toggle(O)},D.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=o.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},D.prototype._onMouseUp=function(O){this._update(O.point)},D.prototype._onMouseMove=function(O){this._update(O.point)},D.prototype._onDrag=function(O){this._update(O.point)},D.prototype._update=function(O){var K=this,de=this._lngLat||this._trackPointer;if(!(!this._map||!de||!this._content)&&(this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Ne){return K._container.classList.add(Ne)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=pn(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!O))){var ne=this._pos=this._trackPointer&&O?O:this._map.project(this._lngLat),be=this.options.anchor,Be=ol(this.options.offset);if(!be){var ht=this._container.offsetWidth,Yt=this._container.offsetHeight,cr;ne.y+Be.bottom.y<Yt?cr=["top"]:ne.y>this._map.transform.height-Yt?cr=["bottom"]:cr=[],ne.x<ht/2?cr.push("left"):ne.x>this._map.transform.width-ht/2&&cr.push("right"),cr.length===0?be="bottom":be=cr.join("-")}var Nt=ne.add(Be[be]).round();o.setTransform(this._container,Nn[be]+" translate("+Nt.x+"px,"+Nt.y+"px)"),aa(this._container,be,"popup")}},D.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var O=this._container.querySelector(Ys);O&&O.focus()}},D.prototype._onClose=function(){this.remove()},D}(i.Evented);function ol(Y){if(Y)if(typeof Y=="number"){var D=Math.round(Math.sqrt(.5*Math.pow(Y,2)));return{center:new i.Point(0,0),top:new i.Point(0,Y),"top-left":new i.Point(D,D),"top-right":new i.Point(-D,D),bottom:new i.Point(0,-Y),"bottom-left":new i.Point(D,-D),"bottom-right":new i.Point(-D,-D),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var J=i.Point.convert(Y);return{center:J,top:J,"top-left":J,"top-right":J,bottom:J,"bottom-left":J,"bottom-right":J,left:J,right:J}}else return{center:i.Point.convert(Y.center||[0,0]),top:i.Point.convert(Y.top||[0,0]),"top-left":i.Point.convert(Y["top-left"]||[0,0]),"top-right":i.Point.convert(Y["top-right"]||[0,0]),bottom:i.Point.convert(Y.bottom||[0,0]),"bottom-left":i.Point.convert(Y["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(Y["bottom-right"]||[0,0]),left:i.Point.convert(Y.left||[0,0]),right:i.Point.convert(Y.right||[0,0])};else return ol(new i.Point(0,0))}var io={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:si,NavigationControl:Ui,GeolocateControl:Zs,AttributionControl:Qi,ScaleControl:Ml,FullscreenControl:ss,Popup:wa,Marker:Ki,Style:yu,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:ua,clearPrewarmedResources:ma,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(Y){i.config.ACCESS_TOKEN=Y},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(Y){i.config.API_URL=Y},get workerCount(){return fn.workerCount},set workerCount(Y){fn.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(D){i.clearTileCache(D)},workerUrl:""};return io}),r})});var xGe=ye((Bxr,_Ge)=>{"use strict";var dw=Pr(),Qjt=Zl().sanitizeHTML,eWt=cJ(),gGe=m1();function mGe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=gGe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ag=mGe.prototype;ag.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=r7(t)};ag.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};ag.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ag.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};ag.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};ag.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapboxLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};ag.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!r7(e)){var r=tWt(e);t.addSource(this.idSource,r)}};ag.findFollowingMapboxLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r<t.length;r++){var n=t[r].id;if(typeof n=="string"&&n.indexOf(gGe.traceLayerPrefix)===0){e=n;break}}return e};ag.updateLayer=function(e){var t=this.subplot,r=yGe(e),n=this.lookupBelow(),i=this.findFollowingMapboxLayerId(n);this.removeLayer(),r7(e)&&t.addLayer({id:this.idLayer,source:this.idSource,"source-layer":e.sourcelayer||"",type:e.type,minzoom:e.minzoom,maxzoom:e.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=e.type,this.below=n};ag.updateStyle=function(e){if(r7(e)){var t=yGe(e);this.subplot.setOptions(this.idLayer,"setLayoutProperty",t.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",t.paint)}};ag.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)};ag.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)};function r7(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var r=0;r<t.length;r++)if(typeof t[r]!="string"||t[r].length===0)return!1;return!0}return dw.isPlainObject(t)||typeof t=="string"&&t.length>0}function yGe(e){var t={},r={};switch(e.type){case"circle":dw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":dw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":dw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=eWt(n.textposition,n.iconsize);dw.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}),dw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":dw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function tWt(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=Qjt(e.sourceattribution)),n}_Ge.exports=function(t,r,n){var i=new mGe(t,r);return i.update(n),i}});var CGe=ye((Nxr,kGe)=>{"use strict";var mJ=gJ(),yJ=Pr(),AGe=hx(),bGe=Oa(),rWt=ho(),iWt=yv(),i7=vf(),SGe=Cg(),nWt=SGe.drawMode,aWt=SGe.selectMode,oWt=qf().prepSelect,sWt=qf().clearOutline,lWt=qf().clearSelectionsCache,uWt=qf().selectOnClick,kx=m1(),cWt=xGe();function MGe(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=MGe.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=EGe(a.style,t);i.accessToken=a.accesstoken;var s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new mJ.Map({container:i.div,style:o.style,center:_J(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new mJ.AttributionControl({compact:!0}));u._canvas.style.left="0px",u._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise(function(f){u.once("load",f)})),c=c.concat(AGe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=EGe(o.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(AGe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i<e.length;i++){var l=e[i][0].trace,u=l._module;typeof l.below=="string"?a=l.below:u.getBelow&&(a=u.getBelow(l,this)),a===""&&(s=!0),o["trace-"+l.uid]=a||""}for(i=0;i<n.length;i++){var c=n[i];typeof c.below=="string"?a=c.below:s?a="traces":a="",o["layout-"+i]=a}var f={},h,d;for(h in o)a=o[h],f[a]?f[a].push(h):f[a]=[h];for(a in f){var v=f[a];if(v.length>1)for(i=0;i<v.length;i++)h=v[i],h.indexOf("trace-")===0?(d=h.split("trace-")[1],this.traceHash[d]&&(this.traceHash[d].below=null)):h.indexOf("layout-")===0&&(d=h.split("layout-")[1],this.layerList[d]&&(this.layerList[d].below=null))}};var wGe={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};Gh.updateData=function(e){var t=this.traceHash,r,n,i,a,o=e.slice().sort(function(f,h){return wGe[f[0].trace.type]-wGe[h[0].trace.type]});for(i=0;i<o.length;i++){var s=o[i];n=s[0].trace,r=t[n.uid];var l=!1;r&&(r.type===n.type?(r.update(s),l=!0):r.dispose()),!l&&n._module&&(t[n.uid]=n._module.plot(this,s))}var u=Object.keys(t);e:for(i=0;i<u.length;i++){var c=u[i];for(a=0;a<e.length;a++)if(n=e[a][0].trace,c===n.uid)continue e;r=t[c],r.dispose(),delete t[c]}};Gh.updateLayout=function(e){var t=this.map,r=e[this.id];!this.dragging&&!this.wheeling&&(t.setCenter(_J(r.center)),t.setZoom(r.zoom),t.setBearing(r.bearing),t.setPitch(r.pitch)),this.updateLayers(e),this.updateFramework(e),this.updateFx(e),this.map.resize(),this.gd._context._scrollZoom.mapbox?t.scrollZoom.enable():t.scrollZoom.disable()};Gh.resolveOnRender=function(e){var t=this.map;t.on("render",function r(){t.loaded()&&(t.off("render",r),setTimeout(e,10))})};Gh.rejectOnError=function(e){var t=this.map;function r(){e(new Error(kx.mapOnErrorMsg))}t.once("error",r),t.once("style.error",r),t.once("source.error",r),t.once("tile.error",r),t.once("layer.error",r)};Gh.createFramework=function(e){var t=this,r=t.div=document.createElement("div");r.id=t.uid,r.style.position="absolute",t.container.appendChild(r),t.xaxis={_id:"x",c2p:function(n){return t.project(n).x}},t.yaxis={_id:"y",c2p:function(n){return t.project(n).y}},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},rWt.setConvert(t.mockAxis,e)};Gh.initFx=function(e,t){var r=this,n=r.gd,i=r.map;i.on("moveend",function(s){if(r.map){var l=n._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];bGe.call("_storeDirectGUIEdit",n.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type==="mouseup"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l._rehover&&l._rehover()}}),i.on("wheel",function(){r.wheeling=!0}),i.on("mousemove",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return i.unproject(u).lng},r.yaxis.p2c=function(){return i.unproject(u).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&i7.hover(n,s,r.id)},i7.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function a(){i7.loneUnhover(t._hoverlayer)}i.on("dragstart",function(){r.dragging=!0,a()}),i.on("zoomstart",a),i.on("mouseout",function(){n._fullLayout._hoversubplot=null});function o(){var s=r.getView();n.emit("plotly_relayouting",r.getViewEditsWithDerived(s))}i.on("drag",o),i.on("zoom",o),i.on("dblclick",function(){var s=n._fullLayout[r.id];bGe.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;i.setCenter(_J(l.center)),i.setZoom(l.zoom),i.setBearing(l.bearing),i.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){lWt(r.dragOptions),sWt(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=n._fullLayout.clickmode;u.indexOf("select")>-1&&uWt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&i7.click(n,l.originalEvent)}}};Gh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=yJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),aWt(a)||nWt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){oWt(l,u,c,t.dragOptions,a)},iWt.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(cWt(this,i,r[i]))}else for(i=0;i<r.length;i++)n[i].update(r[i])};Gh.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))};Gh.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()};Gh.setOptions=function(e,t,r){for(var n in r)this.map[t](e,n,r[n])};Gh.getMapLayers=function(){return this.map.getStyle().layers};Gh.addLayer=function(e,t){var r=this.map;if(typeof t=="string"){if(t===""){r.addLayer(e,t);return}for(var n=this.getMapLayers(),i=0;i<n.length;i++)if(t===n[i].id){r.addLayer(e,t);return}yJ.warn(["Trying to add layer with *below* value",t,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}r.addLayer(e)};Gh.project=function(e){return this.map.project(new mJ.LngLat(e[0],e[1]))};Gh.getView=function(){var e=this.map,t=e.getCenter(),r=t.lng,n=t.lat,i={lon:r,lat:n},a=e.getCanvas(),o=parseInt(a.style.width),s=parseInt(a.style.height);return{center:i,zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch(),_derived:{coordinates:[e.unproject([0,0]).toArray(),e.unproject([o,0]).toArray(),e.unproject([o,s]).toArray(),e.unproject([0,s]).toArray()]}}};Gh.getViewEdits=function(e){for(var t=this.id,r=["center","zoom","bearing","pitch"],n={},i=0;i<r.length;i++){var a=r[i];n[t+"."+a]=e[a]}return n};Gh.getViewEditsWithDerived=function(e){var t=this.id,r=this.getViewEdits(e);return r[t+"._derived"]=e._derived,r};function EGe(e,t){var r={};if(yJ.isPlainObject(e))r.id=e.id,r.style=e;else if(typeof e=="string")if(r.id=e,kx.styleValuesMapbox.indexOf(e)!==-1)r.style=TGe(e);else if(kx.stylesNonMapbox[e]){r.style=kx.stylesNonMapbox[e];var n=r.style.sources["plotly-"+e],i=n?n.tiles:void 0;i&&i[0]&&i[0].slice(-9)==="?api_key="&&(i[0]+=t._mapboxAccessToken)}else r.style=e;else r.id=kx.styleValueDflt,r.style=TGe(kx.styleValueDflt);return r.transition={duration:0,delay:0},r}function TGe(e){return kx.styleUrlPrefix+e+"-"+kx.styleUrlSuffix}function _J(e){return[e.lon,e.lat]}kGe.exports=MGe});var IGe=ye((Uxr,PGe)=>{"use strict";var xJ=Pr(),fWt=q_(),hWt=Zd(),LGe=Zk();PGe.exports=function(t,r,n){fWt(t,r,n,{type:"mapbox",attributes:LGe,handleDefaults:dWt,partition:"y",accessToken:r._mapboxAccessToken})};function dWt(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,hWt(e,t,{name:"layers",handleItemDefaults:vWt}),t._input=e}function vWt(e,t){function r(l,u){return xJ.coerce(e,t,LGe.layers,l,u)}var n=r("visible");if(n){var i=r("sourcetype"),a=i==="raster"||i==="image";r("source"),r("sourceattribution"),i==="vector"&&r("sourcelayer"),i==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",xJ.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),xJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var n7=ye(Np=>{"use strict";var RGe=gJ(),nm=Pr(),bJ=nm.strTranslate,pWt=nm.strScale,gWt=Id().getSubplotCalcData,mWt=Wp(),yWt=qa(),DGe=So(),_Wt=Zl(),xWt=CGe(),Cx="mapbox",oy=Np.constants=m1();Np.name=Cx;Np.attr="subplot";Np.idRoot=Cx;Np.idRegex=Np.attrRegex=nm.counterRegex(Cx);var bWt=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Np.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}};Np.layoutAttributes=Zk();Np.supplyLayoutDefaults=IGe();var FGe=!0;Np.plot=function(t){FGe&&(FGe=!1,nm.warn(bWt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[Cx];if(RGe.version!==oy.requiredVersion)throw new Error(oy.wrongVersionErrorMsg);var a=wWt(t,i);RGe.accessToken=a;for(var o=0;o<i.length;o++){var s=i[o],l=gWt(n,Cx,s),u=r[s],c=u._subplot;c||(c=new xWt(t,s),r[s]._subplot=c),c.viewInitial||(c.viewInitial={center:nm.extendFlat({},u.center),zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),c.plot(l,r,t._promises)}};Np.clean=function(e,t,r,n){for(var i=n._subplots[Cx]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._subplot&&n[o]._subplot.destroy()}};Np.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[Cx],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._subplot,l=s.toImage("png"),u=t._glimages.append("svg:image");u.attr({xmlns:mWt.svg,"xlink:href":l,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:"none"});var c=yWt.select(a._subplot.div),f=c.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!f){var h=t._glimages.append("g");h.attr("transform",bJ(n.l+n.w*o.x[0]+10,n.t+n.h*(1-o.y[0])-31)),h.append("path").attr("d",oy.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),h.append("path").attr("d",oy.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),h.append("path").attr("d",oy.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),h.append("polygon").attr("points",oy.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var d=c.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),v=t._glimages.append("g"),m=v.append("text");m.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=DGe.bBox(m.node()),p=n.w*(o.x[1]-o.x[0]);if(b.width>p/2){var k=d.split("|").join("<br>");m.text(k).attr("data-unformatted",k).call(_Wt.convertToTspans,e),b=DGe.bBox(m.node())}m.attr("transform",bJ(-3,-b.height+8)),v.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var M=1;b.width+6>p&&(M=p/(b.width+6));var T=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",bJ(T[0],T[1])+pWt(M))}};function wWt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken==="")return"";for(var i=[],a=[],o=!1,s=!1,l=0;l<t.length;l++){var u=r[t[l]],c=u.accesstoken;zGe(u.style)&&(c?nm.pushUnique(i,c):(zGe(u._input.style)&&(nm.error("Uses Mapbox map style, but did not set an access token."),o=!0),s=!0)),c&&nm.pushUnique(a,c)}if(s){var f=o?oy.noAccessTokenErrorMsg:oy.missingStyleErrorMsg;throw nm.error(f),new Error(f)}return i.length?(i.length>1&&nm.warn(oy.multipleTokensErrorMsg),i[0]):(a.length&&nm.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function zGe(e){return typeof e=="string"&&(oy.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Np.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Cx],n=0;n<r.length;n++){var i=t[r[n]]._subplot;i.updateFx(t)}}});var OGe=ye((Hxr,qGe)=>{"use strict";var Gxr=["*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(" ");qGe.exports={attributes:Kz(),supplyDefaults:YVe(),colorbar:$d(),formatLabels:uJ(),calc:_F(),plot:uGe(),hoverPoints:t7().hoverPoints,eventData:dGe(),selectPoints:pGe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:n7(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var NGe=ye((jxr,BGe)=>{"use strict";BGe.exports=OGe()});var wJ=ye((Wxr,UGe)=>{"use strict";var y1=a5(),TWt=Tu(),{hovertemplateAttrs:AWt,templatefallbackAttrs:SWt}=Ll(),MWt=Gl(),Lx=Ao().extendFlat;UGe.exports=Lx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Lx({},y1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:y1.text,hovertext:y1.hovertext,marker:{line:{color:Lx({},y1.marker.line.color,{editType:"plot"}),width:Lx({},y1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Lx({},y1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Lx({},y1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Lx({},y1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:y1.hoverinfo,hovertemplate:AWt({},{keys:["properties"]}),hovertemplatefallback:SWt(),showlegend:Lx({},MWt.showlegend,{dflt:!1})},TWt("",{cLetter:"z",editTypeOverride:"calc"}))});var GGe=ye((Xxr,VGe)=>{"use strict";var $k=Pr(),EWt=td(),kWt=wJ();VGe.exports=function(t,r,n,i){function a(c,f){return $k.coerce(t,r,kWt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!$k.isArrayOrTypedArray(o)||!o.length||!$k.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||$k.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),EWt(t,r,i,a,{prefix:"",cLetter:"z"}),$k.coerceSelectionMarkerOpacity(r,a)}});var TJ=ye((Zxr,WGe)=>{"use strict";var CWt=Eo(),_1=Pr(),LWt=tc(),PWt=So(),IWt=cx().makeBlank,HGe=hx();function RWt(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:IWt()};if(!r)return a;var o=HGe.extractTraceFeature(e);if(!o)return a;var s=LWt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;_1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var M=k.mo;return CWt(M)?+_1.constrain(M,0,1):0});var f;_1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;_1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d<e.length;d++){var v=e[d],m=v.fOut;if(m){var b=m.properties;b.fc=s(v.z),c&&(b.mo=c(v)),f&&(b.mlc=f(v)),h&&(b.mlw=h(v)),v.ct=b.ct,v._polygons=HGe.feature2polygons(m)}}var p=c?{type:"identity",property:"mo"}:l.opacity;return _1.extendFlat(n.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":p}),_1.extendFlat(i.paint,{"line-color":f?{type:"identity",property:"mlc"}:u.color,"line-width":h?{type:"identity",property:"mlw"}:u.width,"line-opacity":p}),n.layout.visibility="visible",i.layout.visibility="visible",a.geojson={type:"FeatureCollection",features:o},jGe(e),a}function jGe(e){var t=e[0].trace,r=t._opts,n;if(t.selectedpoints){for(var i=PWt.makeSelectedPointStyleFns(t),a=0;a<e.length;a++){var o=e[a];o.fOut&&(o.fOut.properties.mo2=i.selectedOpacityFn(o))}n={type:"identity",property:"mo2"}}else n=_1.isArrayOrTypedArray(t.marker.opacity)?{type:"identity",property:"mo"}:t.marker.opacity;return _1.extendFlat(r.fill.paint,{"fill-opacity":n}),_1.extendFlat(r.line.paint,{"line-opacity":n}),r}WGe.exports={convert:RWt,convertOnSelect:jGe}});var JGe=ye((Yxr,KGe)=>{"use strict";var ZGe=TJ().convert,DWt=TJ().convertOnSelect,XGe=m1().traceLayerPrefix;function YGe(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",XGe+t+"-fill"],["line",XGe+t+"-line"]],this.below=null}var L5=YGe.prototype;L5.update=function(e){this._update(ZGe(e)),e[0].trace._glTrace=this};L5.updateOnSelect=function(e){this._update(DWt(e))};L5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i<r.length;i++){var a=r[i],o=a[0],s=a[1],l=e[o];t.setOptions(s,"setLayoutProperty",l.layout),l.layout.visibility==="visible"&&t.setOptions(s,"setPaintProperty",l.paint)}};L5._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};L5._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};L5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};KGe.exports=function(t,r){var n=r[0].trace,i=new YGe(t,n.uid),a=i.sourceId,o=ZGe(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 QGe=ye((Jxr,$Ge)=>{"use strict";var Kxr=["*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(" ");$Ge.exports={attributes:wJ(),supplyDefaults:GGe(),colorbar:D_(),calc:NF(),plot:JGe(),hoverPoints:VF(),eventData:GF(),selectPoints:HF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var a=n+1;a<r.length;a++)if(i=r[a].id,typeof i=="string"&&i.indexOf("plotly-")===-1)return i}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:n7(),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}});var tHe=ye(($xr,eHe)=>{"use strict";eHe.exports=QGe()});var SJ=ye((Qxr,iHe)=>{"use strict";var FWt=Tu(),{hovertemplateAttrs:zWt,templatefallbackAttrs:qWt}=Ll(),rHe=Gl(),a7=Kz(),AJ=Ao().extendFlat;iHe.exports=AJ({lon:a7.lon,lat:a7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:a7.text,hovertext:a7.hovertext,hoverinfo:AJ({},rHe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:zWt(),hovertemplatefallback:qWt(),showlegend:AJ({},rHe.showlegend,{dflt:!1})},FWt("",{cLetter:"z",editTypeOverride:"calc"}))});var aHe=ye((ebr,nHe)=>{"use strict";var OWt=Pr(),BWt=td(),NWt=SJ();nHe.exports=function(t,r,n,i){function a(u,c){return OWt.coerce(t,r,NWt,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),BWt(t,r,i,a,{prefix:"",cLetter:"z"})}});var lHe=ye((tbr,sHe)=>{"use strict";var MJ=Eo(),UWt=Pr().isArrayOrTypedArray,EJ=fs().BADNUM,VWt=gv(),oHe=Pr()._;sHe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=UWt(a)&&a.length,s=0;s<n;s++){var l=i[s]={},u=r.lon[s],c=r.lat[s];if(l.lonlat=MJ(u)&&MJ(c)?[+u,+c]:[EJ,EJ],o){var f=a[s];l.z=MJ(f)?f:EJ}}return VWt(t,r,{vals:o?a:[0,1],containerStr:"",cLetter:"z"}),n&&(i[0].t={labels:{lat:oHe(t,"lat:")+" ",lon:oHe(t,"lon:")+" "}}),i}});var dHe=ye((rbr,hHe)=>{"use strict";var GWt=Eo(),kJ=Pr(),uHe=ka(),cHe=tc(),fHe=fs().BADNUM,HWt=cx().makeBlank;hHe.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:HWt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=kJ.isArrayOrTypedArray(l)&&l.length,f=kJ.isArrayOrTypedArray(u);for(s=0;s<t.length;s++){var h=t[s],d=h.lonlat;if(d[0]!==fHe){var v={};if(c){var m=h.z;v.z=m!==fHe?m:0}f&&(v.r=GWt(u[s])&&u[s]>0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=cHe.extractOpts(r),p=b.reversescale?cHe.flipScale(b.colorscale):b.colorscale,k=p[0][1],M=uHe.opacity(k)<1?k:uHe.addOpacity(k,0),T=["interpolate",["linear"],["heatmap-density"],0,M];for(s=1;s<p.length;s++)T.push(p[s][0],p[s][1]);var L=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return kJ.extendFlat(a.heatmap.paint,{"heatmap-weight":c?L:1/(b.max-b.min),"heatmap-color":T,"heatmap-radius":f?{type:"identity",property:"r"}:r.radius,"heatmap-opacity":r.opacity}),a.geojson={type:"FeatureCollection",features:o},a.heatmap.layout.visibility="visible",a}});var mHe=ye((ibr,gHe)=>{"use strict";var vHe=dHe(),jWt=m1().traceLayerPrefix;function pHe(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",jWt+t+"-heatmap"]],this.below=null}var o7=pHe.prototype;o7.update=function(e){var t=this.subplot,r=this.layerList,n=vHe(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a<r.length;a++){var o=r[a],s=o[0],l=o[1],u=n[s];t.setOptions(l,"setLayoutProperty",u.layout),u.layout.visibility==="visible"&&t.setOptions(l,"setPaintProperty",u.paint)}};o7._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};o7._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};o7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};gHe.exports=function(t,r){var n=r[0].trace,i=new pHe(t,n.uid),a=i.sourceId,o=vHe(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 _He=ye((nbr,yHe)=>{"use strict";var WWt=ho(),XWt=t7().hoverPoints,ZWt=t7().getExtraText;yHe.exports=function(t,r,n){var i=XWt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=WWt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=ZWt(s,l,o[0].t.labels),[a]}}});var bHe=ye((abr,xHe)=>{"use strict";xHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var THe=ye((sbr,wHe)=>{"use strict";var obr=["*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(" ");wHe.exports={attributes:SJ(),supplyDefaults:aHe(),colorbar:D_(),formatLabels:uJ(),calc:lHe(),plot:mHe(),hoverPoints:_He(),eventData:bHe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n<r.length;n++){var i=r[n],a=i.id;if(i.type==="symbol"&&typeof a=="string"&&a.indexOf("plotly-")===-1)return a}},moduleType:"trace",name:"densitymapbox",basePlotModule:n7(),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}});var SHe=ye((lbr,AHe)=>{"use strict";AHe.exports=THe()});var EHe=ye((ubr,MHe)=>{MHe.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 © <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 CHe=ye((cbr,kHe)=>{kHe.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 © <a href='http://www.esri.com'>ESRI</a>"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}});var Px=ye((fbr,DHe)=>{"use strict";var YWt=t_(),KWt=EHe(),JWt=CHe(),$Wt='\xA9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',LHe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",PHe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",s7="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",QWt="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",eXt="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",tXt="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",RHe={basic:s7,streets:s7,outdoors:s7,light:LHe,dark:PHe,satellite:JWt,"satellite-streets":KWt,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:$Wt,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":LHe,"carto-darkmatter":PHe,"carto-voyager":s7,"carto-positron-nolabels":QWt,"carto-darkmatter-nolabels":eXt,"carto-voyager-nolabels":tXt},IHe=YWt(RHe);DHe.exports={styleValueDflt:"basic",stylesMap:RHe,styleValuesMap:IHe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",IHe.join(", "),"or use a tile service."].join(`
|
||
`),mapOnErrorMsg:"Map error."}});var Qk=ye((hbr,BHe)=>{"use strict";var FHe=Pr(),zHe=ka().defaultLine,rXt=Cc().attributes,iXt=ec(),nXt=pf().textposition,aXt=mc().overrideAll,oXt=vl().templatedArray,qHe=Px(),OHe=iXt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});OHe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var sXt=BHe.exports=aXt({_arrayAttrRegexps:[FHe.counterRegex("map",".layers",!0)],domain:rXt({name:"map"}),style:{valType:"any",values:qHe.styleValuesMap,dflt:qHe.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:oXt("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:zHe},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:zHe}},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:OHe,textposition:FHe.extendFlat({},nXt,{arrayOk:!1})}})},"plot","from-root");sXt.uirevision={valType:"any",editType:"none"}});var l7=ye((dbr,GHe)=>{"use strict";var{hovertemplateAttrs:lXt,texttemplateAttrs:uXt,templatefallbackAttrs:NHe}=Ll(),cXt=Pg(),eC=ew(),P5=pf(),UHe=Qk(),fXt=Gl(),hXt=Tu(),vw=Ao().extendFlat,dXt=mc().overrideAll,vXt=Qk(),VHe=eC.line,I5=eC.marker;GHe.exports=dXt({lon:eC.lon,lat:eC.lat,cluster:{enabled:{valType:"boolean"},maxzoom:vw({},vXt.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:vw({},I5.opacity,{dflt:1})},mode:vw({},P5.mode,{dflt:"markers"}),text:vw({},P5.text,{}),texttemplate:uXt({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:NHe({editType:"plot"}),hovertext:vw({},P5.hovertext,{}),line:{color:VHe.color,width:VHe.width},connectgaps:P5.connectgaps,marker:vw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:I5.opacity,size:I5.size,sizeref:I5.sizeref,sizemin:I5.sizemin,sizemode:I5.sizemode},hXt("marker")),fill:eC.fill,fillcolor:cXt(),textfont:UHe.layers.symbol.textfont,textposition:UHe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:P5.selected.marker},unselected:{marker:P5.unselected.marker},hoverinfo:vw({},fXt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:lXt(),hovertemplatefallback:NHe()},"calc","nested")});var CJ=ye((vbr,HHe)=>{"use strict";var pXt=["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"];HHe.exports={isSupportedFont:function(e){return pXt.indexOf(e)!==-1}}});var XHe=ye((pbr,WHe)=>{"use strict";var tC=Pr(),LJ=Ru(),gXt=$p(),mXt=D0(),yXt=F0(),_Xt=Fg(),jHe=l7(),xXt=CJ().isSupportedFont;WHe.exports=function(t,r,n,i){function a(p,k){return tC.coerce(t,r,jHe,p,k)}function o(p,k){return tC.coerce2(t,r,jHe,p,k)}var s=bXt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),a("below"),LJ.hasMarkers(r)){gXt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(tC.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),tC.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}LJ.hasLines(r)&&(mXt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,m=a("cluster.enabled",v);if(m||LJ.hasText(r)){var b=i.font.family;yXt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:xXt(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"&&_Xt(t,r,n,a),tC.coerceSelectionMarkerOpacity(r,a)};function bXt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var PJ=ye((gbr,YHe)=>{"use strict";var ZHe=ho();YHe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=ZHe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=ZHe.tickText(o,o.c2l(s[1]),!0).text,i}});var IJ=ye((mbr,JHe)=>{"use strict";var KHe=Pr();JHe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=KHe.isArrayOrTypedArray(r)?KHe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var ije=ye((ybr,rje)=>{"use strict";var eje=Eo(),ov=Pr(),wXt=fs().BADNUM,c7=cx(),$He=tc(),TXt=So(),AXt=O3(),f7=Ru(),SXt=CJ().isSupportedFont,MXt=IJ(),EXt=ip().appendArrayPointValue,kXt=Zl().NEWLINES,CXt=Zl().BR_TAG_ALL;rje.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=f7.hasLines(n),s=f7.hasMarkers(n),l=f7.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=u7("fill"),d=u7("line"),v=u7("circle"),m=u7("symbol"),b={fill:h,line:d,circle:v,symbol:m};if(!i)return b;var p;if((a||o)&&(p=c7.calcTraceToLineCoords(r)),a&&(h.geojson=c7.makePolygon(p),h.layout.visibility="visible",ov.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=c7.makeLine(p),d.layout.visibility="visible",ov.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var k=LXt(r);v.geojson=k.geojson,v.layout.visibility="visible",f&&(v.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":DJ(n.cluster.color,n.cluster.step),"circle-radius":DJ(n.cluster.size,n.cluster.step),"circle-opacity":DJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":QHe(n),"text-size":12}}),ov.extendFlat(v.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(m.geojson=PXt(r,t),ov.extendFlat(m.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(ov.extendFlat(m.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&ov.extendFlat(m.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),m.layout["icon-allow-overlap"]=n.marker.allowoverlap,ov.extendFlat(m.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var M=(n.marker||{}).size,T=MXt(n.textposition,M);ov.extendFlat(m.layout,{"text-size":n.textfont.size,"text-anchor":T.anchor,"text-offset":T.offset,"text-font":QHe(n)}),ov.extendFlat(m.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function u7(e){return{type:e,geojson:c7.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function LXt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=ov.isArrayOrTypedArray(r.color),a=ov.isArrayOrTypedArray(r.size),o=ov.isArrayOrTypedArray(r.opacity),s;function l(M){return t.opacity*M}function u(M){return M/2}var c;i&&($He.hasColorscale(t,"marker")?c=$He.makeColorScaleFuncFromTrace(r):c=ov.identity);var f;a&&(f=AXt(t));var h;o&&(h=function(M){var T=eje(M)?+ov.constrain(M,0,1):0;return l(T)});var d=[];for(s=0;s<e.length;s++){var v=e[s],m=v.lonlat;if(!tje(m)){var b={};c&&(b.mcc=v.mcc=c(v.mc)),f&&(b.mrc=v.mrc=f(v.ms)),h&&(b.mo=h(v.mo)),n&&(b.selected=v.selected||0),d.push({type:"Feature",id:s+1,geometry:{type:"Point",coordinates:m},properties:b})}}var p;if(n)for(p=TXt.makeSelectedPointStyleFns(t),s=0;s<d.length;s++){var k=d[s].properties;p.selectedOpacityFn&&(k.mo=l(p.selectedOpacityFn(k))),p.selectedColorFn&&(k.mcc=p.selectedColorFn(k)),p.selectedSizeFn&&(k.mrc=p.selectedSizeFn(k))}return{geojson:{type:"FeatureCollection",features:d},mcc:i||p&&p.selectedColorFn?{type:"identity",property:"mcc"}:r.color,mrc:a||p&&p.selectedSizeFn?{type:"identity",property:"mrc"}:u(r.size),mo:o||p&&p.selectedOpacityFn?{type:"identity",property:"mo"}:l(r.opacity)}}function PXt(e,t){for(var r=t._fullLayout,n=e[0].trace,i=n.marker||{},a=i.symbol,o=i.angle,s=a!=="circle"?RJ(a):h7,l=o!=="auto"?RJ(o,!0):h7,u=f7.hasText(n)?RJ(n.text):h7,c=[],f=0;f<e.length;f++){var h=e[f];if(!tje(h.lonlat)){var d=n.texttemplate,v;if(d){var m=Array.isArray(d)?d[f]||"":d,b=n._module.formatLabels(h,n,r),p={};EXt(p,n,h.i),v=ov.texttemplateString({data:[p,h,n._meta],fallback:n.texttemplatefallback,labels:b,locale:r._d3locale,template:m})}else v=u(f);v&&(v=v.replace(kXt,"").replace(CXt,`
|
||
`)),c.push({type:"Feature",geometry:{type:"Point",coordinates:h.lonlat},properties:{symbol:s(f),angle:l(f),text:v}})}}return{type:"FeatureCollection",features:c}}function RJ(e,t){return ov.isArrayOrTypedArray(e)?t?function(r){return eje(e[r])?+e[r]:0}:function(r){return e[r]}:e?function(){return e}:h7}function h7(){return""}function tje(e){return e[0]===wXt}function DJ(e,t){var r;if(ov.isArrayOrTypedArray(e)&&ov.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var n=1;n<e.length;n++)r.push(t[n-1],e[n])}else r=e;return r}function QHe(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"),SXt(s)||(s=r);var l=s.split(", ");return l}});var sje=ye((_br,oje)=>{"use strict";var IXt=Pr(),nje=ije(),R5=Px().traceLayerPrefix,og={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function aje(e,t,r,n){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:R5+t+"-fill",line:R5+t+"-line",circle:R5+t+"-circle",symbol:R5+t+"-symbol",cluster:R5+t+"-cluster",clusterCount:R5+t+"-cluster-count"},this.below=null}var rC=aje.prototype;rC.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&IXt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};rC.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};rC.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s<o.length;s++)if(o[s].id===i){a=!0;break}a?(this.subplot.setOptions(i,"setLayoutProperty",n.layout),n.layout.visibility==="visible"&&this.subplot.setOptions(i,"setPaintProperty",n.paint)):this.subplot.addLayer(n,r)};rC.update=function(t){var r=t[0].trace,n=this.subplot,i=n.map,a=nje(n.gd,t),o=n.belowLookup["trace-"+this.uid],s=!!(r.cluster&&r.cluster.enabled),l=!!this.clusterEnabled,u=this;function c(M){M||u.addSource("circle",a.circle,r.cluster);for(var T=og.cluster,L=0;L<T.length;L++){var x=T[L],C=a[x];u.addLayer(x,C,o)}}function f(M){for(var T=og.cluster,L=T.length-1;L>=0;L--){var x=T[L];i.removeLayer(u.layerIds[x])}M||i.removeSource(u.sourceIds.circle)}function h(M){for(var T=og.nonCluster,L=0;L<T.length;L++){var x=T[L],C=a[x];M||u.addSource(x,C),u.addLayer(x,C,o)}}function d(M){for(var T=og.nonCluster,L=T.length-1;L>=0;L--){var x=T[L];i.removeLayer(u.layerIds[x]),M||i.removeSource(u.sourceIds[x])}}function v(M){l?f(M):d(M)}function m(M){s?c(M):h(M)}function b(){for(var M=s?og.cluster:og.nonCluster,T=0;T<M.length;T++){var L=M[T],x=a[L];x&&(n.setOptions(u.layerIds[L],"setLayoutProperty",x.layout),x.layout.visibility==="visible"&&(L!=="cluster"&&u.setSourceData(L,x),n.setOptions(u.layerIds[L],"setPaintProperty",x.paint)))}}var p=this.isHidden,k=r.visible!==!0;k?p||v():p?k||m():l!==s?(v(),m()):(this.below!==o&&(v(!0),m(!0)),b()),this.clusterEnabled=s,this.isHidden=k,this.below=o,t[0].trace._glTrace=this};rC.dispose=function(){for(var t=this.subplot.map,r=this.clusterEnabled?og.cluster:og.nonCluster,n=r.length-1;n>=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};oje.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new aje(t,n.uid,i,a),s=nje(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(i)for(o.addSource("circle",s.circle,n.cluster),u=0;u<og.cluster.length;u++)c=og.cluster[u],f=s[c],o.addLayer(c,f,l);else for(u=0;u<og.nonCluster.length;u++)c=og.nonCluster[u],f=s[c],o.addSource(c,f,n.cluster),o.addLayer(c,f,l);return r[0].trace._glTrace=o,o}});var d7=ye((xbr,uje)=>{"use strict";var RXt=vf(),FJ=Pr(),DXt=mT(),FXt=FJ.fillText,zXt=fs().BADNUM,qXt=Px().traceLayerPrefix;function OXt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=qXt+i.uid+"-circle",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(S){return S.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function m(S){var g=S.lonlat;if(g[0]===zXt||c&&l.indexOf(S.i+1)===-1)return 1/0;var P=FJ.modHalf(g[0],360),E=g[1],z=s.project([P,E]),q=z.x-a.c2p([v,E]),U=z.y-o.c2p([P,r]),G=Math.max(3,S.mrc||0);return Math.max(Math.sqrt(q*q+U*U)-G,1-3/G)}if(RXt.getClosest(n,m,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[FJ.modHalf(p[0],360)+d,p[1]],M=a.c2p(k),T=o.c2p(k),L=b.mrc||1;e.x0=M-L,e.x1=M+L,e.y0=T-L,e.y1=T+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=DXt(i,b),e.extraText=lje(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function lje(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split("+"),a=i.indexOf("all")!==-1,o=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf("text")!==-1)&&FXt(t,e,u),u.join("<br>")}uje.exports={hoverPoints:OXt,getExtraText:lje}});var fje=ye((bbr,cje)=>{"use strict";cje.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var dje=ye((wbr,hje)=>{"use strict";var BXt=Pr(),NXt=Ru(),UXt=fs().BADNUM;hje.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!NXt.hasMarkers(s))return[];if(r===!1)for(l=0;l<n.length;l++)n[l].selected=0;else for(l=0;l<n.length;l++){var u=n[l],c=u.lonlat;if(c[0]!==UXt){var f=[BXt.modHalf(c[0],360),c[1]],h=[i.c2p(f),a.c2p(f)];r.contains(h,null,l,t)?(o.push({pointNumber:l,lon:c[0],lat:c[1]}),u.selected=1):u.selected=0}}return o}});var pje=ye((zJ,qJ)=>{(function(e,t){typeof zJ=="object"&&typeof qJ!="undefined"?qJ.exports=t():(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(zJ,function(){"use strict";var e={},t={};function r(i,a,o){if(t[i]=o,i==="index"){var s="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",l={};return t.shared(l),t.index(e,l),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],function(i){"use strict";function a(R,A,F,W){return new(F||(F=Promise))(function(te,fe){function pe(ft){try{Ke(W.next(ft))}catch(Rt){fe(Rt)}}function Re(ft){try{Ke(W.throw(ft))}catch(Rt){fe(Rt)}}function Ke(ft){var Rt;ft.done?te(ft.value):(Rt=ft.value,Rt instanceof F?Rt:new F(function(tr){tr(Rt)})).then(pe,Re)}Ke((W=W.apply(R,A||[])).next())})}function o(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}typeof SuppressedError=="function"&&SuppressedError;var s=l;function l(R,A){this.x=R,this.y=A}l.prototype={clone:function(){return new l(this.x,this.y)},add:function(R){return this.clone()._add(R)},sub:function(R){return this.clone()._sub(R)},multByPoint:function(R){return this.clone()._multByPoint(R)},divByPoint:function(R){return this.clone()._divByPoint(R)},mult:function(R){return this.clone()._mult(R)},div:function(R){return this.clone()._div(R)},rotate:function(R){return this.clone()._rotate(R)},rotateAround:function(R,A){return this.clone()._rotateAround(R,A)},matMult:function(R){return this.clone()._matMult(R)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(R){return this.x===R.x&&this.y===R.y},dist:function(R){return Math.sqrt(this.distSqr(R))},distSqr:function(R){var A=R.x-this.x,F=R.y-this.y;return A*A+F*F},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(R){return Math.atan2(this.y-R.y,this.x-R.x)},angleWith:function(R){return this.angleWithSep(R.x,R.y)},angleWithSep:function(R,A){return Math.atan2(this.x*A-this.y*R,this.x*R+this.y*A)},_matMult:function(R){var A=R[2]*this.x+R[3]*this.y;return this.x=R[0]*this.x+R[1]*this.y,this.y=A,this},_add:function(R){return this.x+=R.x,this.y+=R.y,this},_sub:function(R){return this.x-=R.x,this.y-=R.y,this},_mult:function(R){return this.x*=R,this.y*=R,this},_div:function(R){return this.x/=R,this.y/=R,this},_multByPoint:function(R){return this.x*=R.x,this.y*=R.y,this},_divByPoint:function(R){return this.x/=R.x,this.y/=R.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var R=this.y;return this.y=this.x,this.x=-R,this},_rotate:function(R){var A=Math.cos(R),F=Math.sin(R),W=F*this.x+A*this.y;return this.x=A*this.x-F*this.y,this.y=W,this},_rotateAround:function(R,A){var F=Math.cos(R),W=Math.sin(R),te=A.y+W*(this.x-A.x)+F*(this.y-A.y);return this.x=A.x+F*(this.x-A.x)-W*(this.y-A.y),this.y=te,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},l.convert=function(R){return R instanceof l?R:Array.isArray(R)?new l(R[0],R[1]):R};var u=o(s),c=f;function f(R,A,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*A,this.by=3*(W-A)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=A,this.p2x=F,this.p2y=W}f.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,A){if(A===void 0&&(A=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)<A)return F;var fe=this.sampleCurveDerivativeX(F);if(Math.abs(fe)<1e-6)break;F-=te/fe}var pe=0,Re=1;for(F=R,W=0;W<20&&(te=this.sampleCurveX(F),!(Math.abs(te-R)<A));W++)R>te?pe=F:Re=F,F=.5*(Re-pe)+pe;return F},solve:function(R,A){return this.sampleCurveY(this.solveCurveX(R,A))}};var h=o(c);let d,v;function m(){return d==null&&(d=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),d}function b(){if(v==null&&(v=!1,m())){let A=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(A){for(let W=0;W<5*5;W++){let te=4*W;A.fillStyle=`rgb(${te},${te+1},${te+2})`,A.fillRect(W%5,Math.floor(W/5),1,1)}let F=A.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&F[W]!==W){v=!0;break}}}return v||!1}function p(R,A,F,W){let te=new h(R,A,F,W);return fe=>te.solve(fe)}let k=p(.25,.1,.25,1);function M(R,A,F){return Math.min(F,Math.max(A,R))}function T(R,A,F){let W=F-A,te=((R-A)%W+W)%W+A;return te===A?F:te}function L(R,...A){for(let F of A)for(let W in F)R[W]=F[W];return R}let x=1;function C(R,A,F){let W={};for(let te in R)W[te]=A.call(this,R[te],te,R);return W}function S(R,A,F){let W={};for(let te in R)A.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function g(R){return Array.isArray(R)?R.map(g):typeof R=="object"&&R?C(R,g):R}let P={};function E(R){P[R]||(typeof console!="undefined"&&console.warn(R),P[R]=!0)}function z(R,A,F){return(F.y-R.y)*(A.x-R.x)>(A.y-R.y)*(F.x-R.x)}function q(R){return typeof WorkerGlobalScope!="undefined"&&R!==void 0&&R instanceof WorkerGlobalScope}let U=null;function G(R){return typeof ImageBitmap!="undefined"&&R instanceof ImageBitmap}let Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function j(R,A,F,W,te){return a(this,void 0,void 0,function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let fe=new VideoFrame(R,{timestamp:0});try{let pe=fe==null?void 0:fe.format;if(!pe||!pe.startsWith("BGR")&&!pe.startsWith("RGB"))throw new Error(`Unrecognized format ${pe}`);let Re=pe.startsWith("BGR"),Ke=new Uint8ClampedArray(W*te*4);if(yield fe.copyTo(Ke,function(ft,Rt,tr,ur,vr){let kr=4*Math.max(-Rt,0),Dr=(Math.max(0,tr)-tr)*ur*4+kr,li=4*ur,pi=Math.max(0,Rt),vn=Math.max(0,tr);return{rect:{x:pi,y:vn,width:Math.min(ft.width,Rt+ur)-pi,height:Math.min(ft.height,tr+vr)-vn},layout:[{offset:Dr,stride:li}]}}(R,A,F,W,te)),Re)for(let ft=0;ft<Ke.length;ft+=4){let Rt=Ke[ft];Ke[ft]=Ke[ft+2],Ke[ft+2]=Rt}return Ke}finally{fe.close()}})}let N,H,re="AbortError";function oe(){return new Error(re)}let _e={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function ke(R){return _e.REGISTERED_PROTOCOLS[R.substring(0,R.indexOf("://"))]}let Ce="global-dispatcher";class ge extends Error{constructor(A,F,W,te){super(`AJAXError: ${F} (${A}): ${W}`),this.status=A,this.statusText=F,this.url=W,this.body=te}}let ie=()=>q(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Se=function(R,A){if(/:\/\//.test(R.url)&&!/^https?:|^file:/.test(R.url)){let W=ke(R.url);if(W)return W(R,A);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:Ce},A)}if(!(/^file:/.test(F=R.url)||/^file:/.test(ie())&&!/^\w+:/.test(F))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(W,te){return a(this,void 0,void 0,function*(){let fe=new Request(W.url,{method:W.method||"GET",body:W.body,credentials:W.credentials,headers:W.headers,cache:W.cache,referrer:ie(),signal:te.signal});W.type!=="json"||fe.headers.has("Accept")||fe.headers.set("Accept","application/json");let pe=yield fetch(fe);if(!pe.ok){let ft=yield pe.blob();throw new ge(pe.status,pe.statusText,W.url,ft)}let Re;Re=W.type==="arrayBuffer"||W.type==="image"?pe.arrayBuffer():W.type==="json"?pe.json():pe.text();let Ke=yield Re;if(te.signal.aborted)throw oe();return{data:Ke,cacheControl:pe.headers.get("Cache-Control"),expires:pe.headers.get("Expires")}})}(R,A);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:Ce},A)}var F;return function(W,te){return new Promise((fe,pe)=>{var Re;let Ke=new XMLHttpRequest;Ke.open(W.method||"GET",W.url,!0),W.type!=="arrayBuffer"&&W.type!=="image"||(Ke.responseType="arraybuffer");for(let ft in W.headers)Ke.setRequestHeader(ft,W.headers[ft]);W.type==="json"&&(Ke.responseType="text",!((Re=W.headers)===null||Re===void 0)&&Re.Accept||Ke.setRequestHeader("Accept","application/json")),Ke.withCredentials=W.credentials==="include",Ke.onerror=()=>{pe(new Error(Ke.statusText))},Ke.onload=()=>{if(!te.signal.aborted)if((Ke.status>=200&&Ke.status<300||Ke.status===0)&&Ke.response!==null){let ft=Ke.response;if(W.type==="json")try{ft=JSON.parse(Ke.response)}catch(Rt){return void pe(Rt)}fe({data:ft,cacheControl:Ke.getResponseHeader("Cache-Control"),expires:Ke.getResponseHeader("Expires")})}else{let ft=new Blob([Ke.response],{type:Ke.getResponseHeader("Content-Type")});pe(new ge(Ke.status,Ke.statusText,W.url,ft))}},te.signal.addEventListener("abort",()=>{Ke.abort(),pe(oe())}),Ke.send(W.body)})}(R,A)};function Ee(R){if(!R||R.indexOf("://")<=0||R.indexOf("data:image/")===0||R.indexOf("blob:")===0)return!0;let A=new URL(R),F=window.location;return A.protocol===F.protocol&&A.host===F.host}function we(R,A,F){F[R]&&F[R].indexOf(A)!==-1||(F[R]=F[R]||[],F[R].push(A))}function De(R,A,F){if(F&&F[R]){let W=F[R].indexOf(A);W!==-1&&F[R].splice(W,1)}}class Le{constructor(A,F={}){L(this,F),this.type=A}}class me extends Le{constructor(A,F={}){super("error",L({error:A},F))}}class Pe{on(A,F){return this._listeners=this._listeners||{},we(A,F,this._listeners),this}off(A,F){return De(A,F,this._listeners),De(A,F,this._oneTimeListeners),this}once(A,F){return F?(this._oneTimeListeners=this._oneTimeListeners||{},we(A,F,this._oneTimeListeners),this):new Promise(W=>this.once(A,W))}fire(A,F){typeof A=="string"&&(A=new Le(A,F||{}));let W=A.type;if(this.listens(W)){A.target=this;let te=this._listeners&&this._listeners[W]?this._listeners[W].slice():[];for(let Re of te)Re.call(this,A);let fe=this._oneTimeListeners&&this._oneTimeListeners[W]?this._oneTimeListeners[W].slice():[];for(let Re of fe)De(W,Re,this._oneTimeListeners),Re.call(this,A);let pe=this._eventedParent;pe&&(L(A,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),pe.fire(A))}else A instanceof me&&console.error(A.error);return this}listens(A){return this._listeners&&this._listeners[A]&&this._listeners[A].length>0||this._oneTimeListeners&&this._oneTimeListeners[A]&&this._oneTimeListeners[A].length>0||this._eventedParent&&this._eventedParent.listens(A)}setEventedParent(A,F){return this._eventedParent=A,this._eventedParentData=F,this}}var ce={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let He=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function lt(R,A){let F={};for(let W in R)W!=="ref"&&(F[W]=R[W]);return He.forEach(W=>{W in A&&(F[W]=A[W])}),F}function mt(R,A){if(Array.isArray(R)){if(!Array.isArray(A)||R.length!==A.length)return!1;for(let F=0;F<R.length;F++)if(!mt(R[F],A[F]))return!1;return!0}if(typeof R=="object"&&R!==null&&A!==null){if(typeof A!="object"||Object.keys(R).length!==Object.keys(A).length)return!1;for(let F in R)if(!mt(R[F],A[F]))return!1;return!0}return R===A}function Vt(R,A){R.push(A)}function st(R,A,F){Vt(F,{command:"addSource",args:[R,A[R]]})}function ct(R,A,F){Vt(A,{command:"removeSource",args:[R]}),F[R]=!0}function Qt(R,A,F,W){ct(R,F,W),st(R,A,F)}function Ht(R,A,F){let W;for(W in R[F])if(Object.prototype.hasOwnProperty.call(R[F],W)&&W!=="data"&&!mt(R[F][W],A[F][W]))return!1;for(W in A[F])if(Object.prototype.hasOwnProperty.call(A[F],W)&&W!=="data"&&!mt(R[F][W],A[F][W]))return!1;return!0}function nr(R,A,F,W,te,fe){R=R||{},A=A||{};for(let pe in R)Object.prototype.hasOwnProperty.call(R,pe)&&(mt(R[pe],A[pe])||F.push({command:fe,args:[W,pe,A[pe],te]}));for(let pe in A)Object.prototype.hasOwnProperty.call(A,pe)&&!Object.prototype.hasOwnProperty.call(R,pe)&&(mt(R[pe],A[pe])||F.push({command:fe,args:[W,pe,A[pe],te]}))}function tt(R){return R.id}function je(R,A){return R[A.id]=A,R}class Ue{constructor(A,F,W,te){this.message=(A?`${A}: `:"")+W,te&&(this.identifier=te),F!=null&&F.__line__&&(this.line=F.__line__)}}function Ae(R,...A){for(let F of A)for(let W in F)R[W]=F[W];return R}class rt extends Error{constructor(A,F){super(F),this.message=F,this.key=A}}class St{constructor(A,F=[]){this.parent=A,this.bindings={};for(let[W,te]of F)this.bindings[W]=te}concat(A){return new St(this,A)}get(A){if(this.bindings[A])return this.bindings[A];if(this.parent)return this.parent.get(A);throw new Error(`${A} not found in scope.`)}has(A){return!!this.bindings[A]||!!this.parent&&this.parent.has(A)}}let Tt={kind:"null"},dt={kind:"number"},Et={kind:"string"},pt={kind:"boolean"},Xt={kind:"color"},or={kind:"object"},_r={kind:"value"},Er={kind:"collator"},ei={kind:"formatted"},qr={kind:"padding"},jr={kind:"resolvedImage"},gt={kind:"variableAnchorOffsetCollection"};function Ge(R,A){return{kind:"array",itemType:R,N:A}}function Je(R){if(R.kind==="array"){let A=Je(R.itemType);return typeof R.N=="number"?`array<${A}, ${R.N}>`:R.itemType.kind==="value"?"array":`array<${A}>`}return R.kind}let We=[Tt,dt,Et,pt,Xt,ei,or,Ge(_r),qr,jr,gt];function et(R,A){if(A.kind==="error")return null;if(R.kind==="array"){if(A.kind==="array"&&(A.N===0&&A.itemType.kind==="value"||!et(R.itemType,A.itemType))&&(typeof R.N!="number"||R.N===A.N))return null}else{if(R.kind===A.kind)return null;if(R.kind==="value"){for(let F of We)if(!et(F,A))return null}}return`Expected ${Je(R)} but found ${Je(A)} instead.`}function xt(R,A){return A.some(F=>F.kind===R.kind)}function At(R,A){return A.some(F=>F==="null"?R===null:F==="array"?Array.isArray(R):F==="object"?R&&!Array.isArray(R)&&typeof R=="object":F===typeof R)}function Kt(R,A){return R.kind==="array"&&A.kind==="array"?R.itemType.kind===A.itemType.kind&&typeof R.N=="number":R.kind===A.kind}let er=.96422,Sr=.82521,Gr=4/29,Ir=6/29,Yr=3*Ir*Ir,_i=Ir*Ir*Ir,Pi=Math.PI/180,ai=180/Math.PI;function mi(R){return(R%=360)<0&&(R+=360),R}function un([R,A,F,W]){let te,fe,pe=An((.2225045*(R=Fn(R))+.7168786*(A=Fn(A))+.0606169*(F=Fn(F)))/1);R===A&&A===F?te=fe=pe:(te=An((.4360747*R+.3850649*A+.1430804*F)/er),fe=An((.0139322*R+.0971045*A+.7141733*F)/Sr));let Re=116*pe-16;return[Re<0?0:Re,500*(te-pe),200*(pe-fe),W]}function Fn(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function An(R){return R>_i?Math.pow(R,1/3):R/Yr+Gr}function Hn([R,A,F,W]){let te=(R+16)/116,fe=isNaN(A)?te:te+A/500,pe=isNaN(F)?te:te-F/200;return te=1*Vi(te),fe=er*Vi(fe),pe=Sr*Vi(pe),[Qn(3.1338561*fe-1.6168667*te-.4906146*pe),Qn(-.9787684*fe+1.9161415*te+.033454*pe),Qn(.0719453*fe-.2289914*te+1.4052427*pe),W]}function Qn(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Vi(R){return R>Ir?R*R*R:Yr*(R-Gr)}function Kn(R){return parseInt(R.padEnd(2,R),16)/255}function Jn(R,A){return Gt(A?R/100:R,0,1)}function Gt(R,A,F){return Math.min(Math.max(A,R),F)}function wt(R){return!R.some(Number.isNaN)}let rr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class ir{constructor(A,F,W,te=1,fe=!0){this.r=A,this.g=F,this.b=W,this.a=te,fe||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[A,F,W,te]))}static parse(A){if(A instanceof ir)return A;if(typeof A!="string")return;let F=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=rr[W];if(te){let[pe,Re,Ke]=te;return[pe/255,Re/255,Ke/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let pe=W.length<6?1:2,Re=1;return[Kn(W.slice(Re,Re+=pe)),Kn(W.slice(Re,Re+=pe)),Kn(W.slice(Re,Re+=pe)),Kn(W.slice(Re,Re+pe)||"ff")]}if(W.startsWith("rgb")){let pe=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(pe){let[Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi,vn]=pe,zi=[Rt||" ",vr||" ",li].join("");if(zi===" "||zi===" /"||zi===",,"||zi===",,,"){let ln=[ft,ur,Dr].join(""),Tn=ln==="%%%"?100:ln===""?255:0;if(Tn){let pa=[Gt(+Ke/Tn,0,1),Gt(+tr/Tn,0,1),Gt(+kr/Tn,0,1),pi?Jn(+pi,vn):1];if(wt(pa))return pa}}return}}let fe=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(fe){let[pe,Re,Ke,ft,Rt,tr,ur,vr,kr]=fe,Dr=[Ke||" ",Rt||" ",ur].join("");if(Dr===" "||Dr===" /"||Dr===",,"||Dr===",,,"){let li=[+Re,Gt(+ft,0,100),Gt(+tr,0,100),vr?Jn(+vr,kr):1];if(wt(li))return function([pi,vn,zi,ln]){function Tn(pa){let ro=(pa+pi/30)%12,Vo=vn*Math.min(zi,1-zi);return zi-Vo*Math.max(-1,Math.min(ro-3,9-ro,1))}return pi=mi(pi),vn/=100,zi/=100,[Tn(0),Tn(8),Tn(4),ln]}(li)}}}(A);return F?new ir(...F,!1):void 0}get rgb(){let{r:A,g:F,b:W,a:te}=this,fe=te||1/0;return this.overwriteGetter("rgb",[A/fe,F/fe,W/fe,te])}get hcl(){return this.overwriteGetter("hcl",function(A){let[F,W,te,fe]=un(A),pe=Math.sqrt(W*W+te*te);return[Math.round(1e4*pe)?mi(Math.atan2(te,W)*ai):NaN,pe,F,fe]}(this.rgb))}get lab(){return this.overwriteGetter("lab",un(this.rgb))}overwriteGetter(A,F){return Object.defineProperty(this,A,{value:F}),F}toString(){let[A,F,W,te]=this.rgb;return`rgba(${[A,F,W].map(fe=>Math.round(255*fe)).join(",")},${te})`}}ir.black=new ir(0,0,0,1),ir.white=new ir(1,1,1,1),ir.transparent=new ir(0,0,0,0),ir.red=new ir(1,0,0,1);class wr{constructor(A,F,W){this.sensitivity=A?F?"variant":"case":F?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(A,F){return this.collator.compare(A,F)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Xr{constructor(A,F,W,te,fe){this.text=A,this.image=F,this.scale=W,this.fontStack=te,this.textColor=fe}}class ti{constructor(A){this.sections=A}static fromString(A){return new ti([new Xr(A,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(A=>A.text.length!==0||A.image&&A.image.name.length!==0)}static factory(A){return A instanceof ti?A:ti.fromString(A)}toString(){return this.sections.length===0?"":this.sections.map(A=>A.text).join("")}}class $r{constructor(A){this.values=A.slice()}static parse(A){if(A instanceof $r)return A;if(typeof A=="number")return new $r([A,A,A,A]);if(Array.isArray(A)&&!(A.length<1||A.length>4)){for(let F of A)if(typeof F!="number")return;switch(A.length){case 1:A=[A[0],A[0],A[0],A[0]];break;case 2:A=[A[0],A[1],A[0],A[1]];break;case 3:A=[A[0],A[1],A[2],A[1]]}return new $r(A)}}toString(){return JSON.stringify(this.values)}}let Ri=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Zi{constructor(A){this.values=A.slice()}static parse(A){if(A instanceof Zi)return A;if(Array.isArray(A)&&!(A.length<1)&&A.length%2==0){for(let F=0;F<A.length;F+=2){let W=A[F],te=A[F+1];if(typeof W!="string"||!Ri.has(W)||!Array.isArray(te)||te.length!==2||typeof te[0]!="number"||typeof te[1]!="number")return}return new Zi(A)}}toString(){return JSON.stringify(this.values)}}class en{constructor(A){this.name=A.name,this.available=A.available}toString(){return this.name}static fromString(A){return A?new en({name:A,available:!1}):null}}function fn(R,A,F,W){return typeof R=="number"&&R>=0&&R<=255&&typeof A=="number"&&A>=0&&A<=255&&typeof F=="number"&&F>=0&&F<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,A,F,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[R,A,F,W]:[R,A,F]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function yn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof ir||R instanceof wr||R instanceof ti||R instanceof $r||R instanceof Zi||R instanceof en)return!0;if(Array.isArray(R)){for(let A of R)if(!yn(A))return!1;return!0}if(typeof R=="object"){for(let A in R)if(!yn(R[A]))return!1;return!0}return!1}function Mn(R){if(R===null)return Tt;if(typeof R=="string")return Et;if(typeof R=="boolean")return pt;if(typeof R=="number")return dt;if(R instanceof ir)return Xt;if(R instanceof wr)return Er;if(R instanceof ti)return ei;if(R instanceof $r)return qr;if(R instanceof Zi)return gt;if(R instanceof en)return jr;if(Array.isArray(R)){let A=R.length,F;for(let W of R){let te=Mn(W);if(F){if(F===te)continue;F=_r;break}F=te}return Ge(F||_r,A)}return or}function Ba(R){let A=typeof R;return R===null?"":A==="string"||A==="number"||A==="boolean"?String(R):R instanceof ir||R instanceof ti||R instanceof $r||R instanceof Zi||R instanceof en?R.toString():JSON.stringify(R)}class ua{constructor(A,F){this.type=A,this.value=F}static parse(A,F){if(A.length!==2)return F.error(`'literal' expression requires exactly one argument, but found ${A.length-1} instead.`);if(!yn(A[1]))return F.error("invalid value");let W=A[1],te=Mn(W),fe=F.expectedType;return te.kind!=="array"||te.N!==0||!fe||fe.kind!=="array"||typeof fe.N=="number"&&fe.N!==0||(te=fe),new ua(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ma{constructor(A){this.name="ExpressionEvaluationError",this.message=A}toJSON(){return this.message}}let Wa={string:Et,number:dt,boolean:pt,object:or};class Fa{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W,te=1,fe=A[0];if(fe==="array"){let Re,Ke;if(A.length>2){let ft=A[1];if(typeof ft!="string"||!(ft in Wa)||ft==="object")return F.error('The item type argument of "array" must be one of string, number, boolean',1);Re=Wa[ft],te++}else Re=_r;if(A.length>3){if(A[2]!==null&&(typeof A[2]!="number"||A[2]<0||A[2]!==Math.floor(A[2])))return F.error('The length argument to "array" must be a positive integer literal',2);Ke=A[2],te++}W=Ge(Re,Ke)}else{if(!Wa[fe])throw new Error(`Types doesn't contain name = ${fe}`);W=Wa[fe]}let pe=[];for(;te<A.length;te++){let Re=F.parse(A[te],te,_r);if(!Re)return null;pe.push(Re)}return new Fa(W,pe)}evaluate(A){for(let F=0;F<this.args.length;F++){let W=this.args[F].evaluate(A);if(!et(this.type,Mn(W)))return W;if(F===this.args.length-1)throw new ma(`Expected value to be of type ${Je(this.type)}, but found ${Je(Mn(W))} instead.`)}throw new Error}eachChild(A){this.args.forEach(A)}outputDefined(){return this.args.every(A=>A.outputDefined())}}let Xo={"to-boolean":pt,"to-color":Xt,"to-number":dt,"to-string":Et};class da{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W=A[0];if(!Xo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&A.length!==2)return F.error("Expected one argument.");let te=Xo[W],fe=[];for(let pe=1;pe<A.length;pe++){let Re=F.parse(A[pe],pe,_r);if(!Re)return null;fe.push(Re)}return new da(te,fe)}evaluate(A){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(A);case"color":{let F,W;for(let te of this.args){if(F=te.evaluate(A),W=null,F instanceof ir)return F;if(typeof F=="string"){let fe=A.parseColor(F);if(fe)return fe}else if(Array.isArray(F)&&(W=F.length<3||F.length>4?`Invalid rbga value ${JSON.stringify(F)}: expected an array containing either three or four numeric values.`:fn(F[0],F[1],F[2],F[3]),!W))return new ir(F[0]/255,F[1]/255,F[2]/255,F[3])}throw new ma(W||`Could not parse color from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"padding":{let F;for(let W of this.args){F=W.evaluate(A);let te=$r.parse(F);if(te)return te}throw new ma(`Could not parse padding from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"variableAnchorOffsetCollection":{let F;for(let W of this.args){F=W.evaluate(A);let te=Zi.parse(F);if(te)return te}throw new ma(`Could not parse variableAnchorOffsetCollection from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"number":{let F=null;for(let W of this.args){if(F=W.evaluate(A),F===null)return 0;let te=Number(F);if(!isNaN(te))return te}throw new ma(`Could not convert ${JSON.stringify(F)} to number.`)}case"formatted":return ti.fromString(Ba(this.args[0].evaluate(A)));case"resolvedImage":return en.fromString(Ba(this.args[0].evaluate(A)));default:return Ba(this.args[0].evaluate(A))}}eachChild(A){this.args.forEach(A)}outputDefined(){return this.args.every(A=>A.outputDefined())}}let jn=["Unknown","Point","LineString","Polygon"];class Ha{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?jn[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(A){let F=this._parseColorCache[A];return F||(F=this._parseColorCache[A]=ir.parse(A)),F}}class vo{constructor(A,F,W=[],te,fe=new St,pe=[]){this.registry=A,this.path=W,this.key=W.map(Re=>`[${Re}]`).join(""),this.scope=fe,this.errors=pe,this.expectedType=te,this._isConstant=F}parse(A,F,W,te,fe={}){return F?this.concat(F,W,te)._parse(A,fe):this._parse(A,fe)}_parse(A,F){function W(te,fe,pe){return pe==="assert"?new Fa(fe,[te]):pe==="coerce"?new da(fe,[te]):te}if(A!==null&&typeof A!="string"&&typeof A!="boolean"&&typeof A!="number"||(A=["literal",A]),Array.isArray(A)){if(A.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=A[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let fe=this.registry[te];if(fe){let pe=fe.parse(A,this);if(!pe)return null;if(this.expectedType){let Re=this.expectedType,Ke=pe.type;if(Re.kind!=="string"&&Re.kind!=="number"&&Re.kind!=="boolean"&&Re.kind!=="object"&&Re.kind!=="array"||Ke.kind!=="value")if(Re.kind!=="color"&&Re.kind!=="formatted"&&Re.kind!=="resolvedImage"||Ke.kind!=="value"&&Ke.kind!=="string")if(Re.kind!=="padding"||Ke.kind!=="value"&&Ke.kind!=="number"&&Ke.kind!=="array")if(Re.kind!=="variableAnchorOffsetCollection"||Ke.kind!=="value"&&Ke.kind!=="array"){if(this.checkSubtype(Re,Ke))return null}else pe=W(pe,Re,F.typeAnnotation||"coerce");else pe=W(pe,Re,F.typeAnnotation||"coerce");else pe=W(pe,Re,F.typeAnnotation||"coerce");else pe=W(pe,Re,F.typeAnnotation||"assert")}if(!(pe instanceof ua)&&pe.type.kind!=="resolvedImage"&&this._isConstant(pe)){let Re=new Ha;try{pe=new ua(pe.type,pe.evaluate(Re))}catch(Ke){return this.error(Ke.message),null}}return pe}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(A===void 0?"'undefined' value invalid. Use null instead.":typeof A=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof A} instead.`)}concat(A,F,W){let te=typeof A=="number"?this.path.concat(A):this.path,fe=W?this.scope.concat(W):this.scope;return new vo(this.registry,this._isConstant,te,F||null,fe,this.errors)}error(A,...F){let W=`${this.key}${F.map(te=>`[${te}]`).join("")}`;this.errors.push(new rt(W,A))}checkSubtype(A,F){let W=et(A,F);return W&&this.error(W),W}}class Gn{constructor(A,F){this.type=F.type,this.bindings=[].concat(A),this.result=F}evaluate(A){return this.result.evaluate(A)}eachChild(A){for(let F of this.bindings)A(F[1]);A(this.result)}static parse(A,F){if(A.length<4)return F.error(`Expected at least 3 arguments, but found ${A.length-1} instead.`);let W=[];for(let fe=1;fe<A.length-1;fe+=2){let pe=A[fe];if(typeof pe!="string")return F.error(`Expected string, but found ${typeof pe} instead.`,fe);if(/[^a-zA-Z0-9_]/.test(pe))return F.error("Variable names must contain only alphanumeric characters or '_'.",fe);let Re=F.parse(A[fe+1],fe+1);if(!Re)return null;W.push([pe,Re])}let te=F.parse(A[A.length-1],A.length-1,F.expectedType,W);return te?new Gn(W,te):null}outputDefined(){return this.result.outputDefined()}}class Ct{constructor(A,F){this.type=F.type,this.name=A,this.boundExpression=F}static parse(A,F){if(A.length!==2||typeof A[1]!="string")return F.error("'var' expression requires exactly one string literal argument.");let W=A[1];return F.scope.has(W)?new Ct(W,F.scope.get(W)):F.error(`Unknown variable "${W}". Make sure "${W}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(A){return this.boundExpression.evaluate(A)}eachChild(){}outputDefined(){return!1}}class Ar{constructor(A,F,W){this.type=A,this.index=F,this.input=W}static parse(A,F){if(A.length!==3)return F.error(`Expected 2 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,dt),te=F.parse(A[2],2,Ge(F.expectedType||_r));return W&&te?new Ar(te.type.itemType,W,te):null}evaluate(A){let F=this.index.evaluate(A),W=this.input.evaluate(A);if(F<0)throw new ma(`Array index out of bounds: ${F} < 0.`);if(F>=W.length)throw new ma(`Array index out of bounds: ${F} > ${W.length-1}.`);if(F!==Math.floor(F))throw new ma(`Array index must be an integer, but found ${F} instead.`);return W[F]}eachChild(A){A(this.index),A(this.input)}outputDefined(){return!1}}class Jr{constructor(A,F){this.type=pt,this.needle=A,this.haystack=F}static parse(A,F){if(A.length!==3)return F.error(`Expected 2 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,_r),te=F.parse(A[2],2,_r);return W&&te?xt(W.type,[pt,Et,dt,Tt,_r])?new Jr(W,te):F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`):null}evaluate(A){let F=this.needle.evaluate(A),W=this.haystack.evaluate(A);if(!W)return!1;if(!At(F,["boolean","string","number","null"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Mn(F))} instead.`);if(!At(W,["string","array"]))throw new ma(`Expected second argument to be of type array or string, but found ${Je(Mn(W))} instead.`);return W.indexOf(F)>=0}eachChild(A){A(this.needle),A(this.haystack)}outputDefined(){return!0}}class hi{constructor(A,F,W){this.type=dt,this.needle=A,this.haystack=F,this.fromIndex=W}static parse(A,F){if(A.length<=2||A.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,_r),te=F.parse(A[2],2,_r);if(!W||!te)return null;if(!xt(W.type,[pt,Et,dt,Tt,_r]))return F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`);if(A.length===4){let fe=F.parse(A[3],3,dt);return fe?new hi(W,te,fe):null}return new hi(W,te)}evaluate(A){let F=this.needle.evaluate(A),W=this.haystack.evaluate(A);if(!At(F,["boolean","string","number","null"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Mn(F))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(A)),At(W,["string"])){let fe=W.indexOf(F,te);return fe===-1?-1:[...W.slice(0,fe)].length}if(At(W,["array"]))return W.indexOf(F,te);throw new ma(`Expected second argument to be of type array or string, but found ${Je(Mn(W))} instead.`)}eachChild(A){A(this.needle),A(this.haystack),this.fromIndex&&A(this.fromIndex)}outputDefined(){return!1}}class hn{constructor(A,F,W,te,fe,pe){this.inputType=A,this.type=F,this.input=W,this.cases=te,this.outputs=fe,this.otherwise=pe}static parse(A,F){if(A.length<5)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if(A.length%2!=1)return F.error("Expected an even number of arguments.");let W,te;F.expectedType&&F.expectedType.kind!=="value"&&(te=F.expectedType);let fe={},pe=[];for(let ft=2;ft<A.length-1;ft+=2){let Rt=A[ft],tr=A[ft+1];Array.isArray(Rt)||(Rt=[Rt]);let ur=F.concat(ft);if(Rt.length===0)return ur.error("Expected at least one branch label.");for(let kr of Rt){if(typeof kr!="number"&&typeof kr!="string")return ur.error("Branch labels must be numbers or strings.");if(typeof kr=="number"&&Math.abs(kr)>Number.MAX_SAFE_INTEGER)return ur.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof kr=="number"&&Math.floor(kr)!==kr)return ur.error("Numeric branch labels must be integer values.");if(W){if(ur.checkSubtype(W,Mn(kr)))return null}else W=Mn(kr);if(fe[String(kr)]!==void 0)return ur.error("Branch labels must be unique.");fe[String(kr)]=pe.length}let vr=F.parse(tr,ft,te);if(!vr)return null;te=te||vr.type,pe.push(vr)}let Re=F.parse(A[1],1,_r);if(!Re)return null;let Ke=F.parse(A[A.length-1],A.length-1,te);return Ke?Re.type.kind!=="value"&&F.concat(1).checkSubtype(W,Re.type)?null:new hn(W,te,Re,fe,pe,Ke):null}evaluate(A){let F=this.input.evaluate(A);return(Mn(F)===this.inputType&&this.outputs[this.cases[F]]||this.otherwise).evaluate(A)}eachChild(A){A(this.input),this.outputs.forEach(A),A(this.otherwise)}outputDefined(){return this.outputs.every(A=>A.outputDefined())&&this.otherwise.outputDefined()}}class Sn{constructor(A,F,W){this.type=A,this.branches=F,this.otherwise=W}static parse(A,F){if(A.length<4)return F.error(`Expected at least 3 arguments, but found only ${A.length-1}.`);if(A.length%2!=0)return F.error("Expected an odd number of arguments.");let W;F.expectedType&&F.expectedType.kind!=="value"&&(W=F.expectedType);let te=[];for(let pe=1;pe<A.length-1;pe+=2){let Re=F.parse(A[pe],pe,pt);if(!Re)return null;let Ke=F.parse(A[pe+1],pe+1,W);if(!Ke)return null;te.push([Re,Ke]),W=W||Ke.type}let fe=F.parse(A[A.length-1],A.length-1,W);if(!fe)return null;if(!W)throw new Error("Can't infer output type");return new Sn(W,te,fe)}evaluate(A){for(let[F,W]of this.branches)if(F.evaluate(A))return W.evaluate(A);return this.otherwise.evaluate(A)}eachChild(A){for(let[F,W]of this.branches)A(F),A(W);A(this.otherwise)}outputDefined(){return this.branches.every(([A,F])=>F.outputDefined())&&this.otherwise.outputDefined()}}class En{constructor(A,F,W,te){this.type=A,this.input=F,this.beginIndex=W,this.endIndex=te}static parse(A,F){if(A.length<=2||A.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,_r),te=F.parse(A[2],2,dt);if(!W||!te)return null;if(!xt(W.type,[Ge(_r),Et,_r]))return F.error(`Expected first argument to be of type array or string, but found ${Je(W.type)} instead`);if(A.length===4){let fe=F.parse(A[3],3,dt);return fe?new En(W.type,W,te,fe):null}return new En(W.type,W,te)}evaluate(A){let F=this.input.evaluate(A),W=this.beginIndex.evaluate(A),te;if(this.endIndex&&(te=this.endIndex.evaluate(A)),At(F,["string"]))return[...F].slice(W,te).join("");if(At(F,["array"]))return F.slice(W,te);throw new ma(`Expected first argument to be of type array or string, but found ${Je(Mn(F))} instead.`)}eachChild(A){A(this.input),A(this.beginIndex),this.endIndex&&A(this.endIndex)}outputDefined(){return!1}}function ki(R,A){let F=R.length-1,W,te,fe=0,pe=F,Re=0;for(;fe<=pe;)if(Re=Math.floor((fe+pe)/2),W=R[Re],te=R[Re+1],W<=A){if(Re===F||A<te)return Re;fe=Re+1}else{if(!(W>A))throw new ma("Input is not a number.");pe=Re-1}return 0}class _n{constructor(A,F,W){this.type=A,this.input=F,this.labels=[],this.outputs=[];for(let[te,fe]of W)this.labels.push(te),this.outputs.push(fe)}static parse(A,F){if(A.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if((A.length-1)%2!=0)return F.error("Expected an even number of arguments.");let W=F.parse(A[1],1,dt);if(!W)return null;let te=[],fe=null;F.expectedType&&F.expectedType.kind!=="value"&&(fe=F.expectedType);for(let pe=1;pe<A.length;pe+=2){let Re=pe===1?-1/0:A[pe],Ke=A[pe+1],ft=pe,Rt=pe+1;if(typeof Re!="number")return F.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ft);if(te.length&&te[te.length-1][0]>=Re)return F.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ft);let tr=F.parse(Ke,Rt,fe);if(!tr)return null;fe=fe||tr.type,te.push([Re,tr])}return new _n(fe,W,te)}evaluate(A){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(A);let te=this.input.evaluate(A);if(te<=F[0])return W[0].evaluate(A);let fe=F.length;return te>=F[fe-1]?W[fe-1].evaluate(A):W[ki(F,te)].evaluate(A)}eachChild(A){A(this.input);for(let F of this.outputs)A(F)}outputDefined(){return this.outputs.every(A=>A.outputDefined())}}function ya(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var ea=Ma;function Ma(R,A,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*A,this.by=3*(W-A)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=A,this.p2x=F,this.p2y=W}Ma.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,A){if(A===void 0&&(A=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)<A)return F;var fe=this.sampleCurveDerivativeX(F);if(Math.abs(fe)<1e-6)break;F-=te/fe}var pe=0,Re=1;for(F=R,W=0;W<20&&(te=this.sampleCurveX(F),!(Math.abs(te-R)<A));W++)R>te?pe=F:Re=F,F=.5*(Re-pe)+pe;return F},solve:function(R,A){return this.sampleCurveY(this.solveCurveX(R,A))}};var _o=ya(ea);function No(R,A,F){return R+F*(A-R)}function po(R,A,F){return R.map((W,te)=>No(W,A[te],F))}let Lo={number:No,color:function(R,A,F,W="rgb"){switch(W){case"rgb":{let[te,fe,pe,Re]=po(R.rgb,A.rgb,F);return new ir(te,fe,pe,Re,!1)}case"hcl":{let[te,fe,pe,Re]=R.hcl,[Ke,ft,Rt,tr]=A.hcl,ur,vr;if(isNaN(te)||isNaN(Ke))isNaN(te)?isNaN(Ke)?ur=NaN:(ur=Ke,pe!==1&&pe!==0||(vr=ft)):(ur=te,Rt!==1&&Rt!==0||(vr=fe));else{let vn=Ke-te;Ke>te&&vn>180?vn-=360:Ke<te&&te-Ke>180&&(vn+=360),ur=te+F*vn}let[kr,Dr,li,pi]=function([vn,zi,ln,Tn]){return vn=isNaN(vn)?0:vn*Pi,Hn([ln,Math.cos(vn)*zi,Math.sin(vn)*zi,Tn])}([ur,vr!=null?vr:No(fe,ft,F),No(pe,Rt,F),No(Re,tr,F)]);return new ir(kr,Dr,li,pi,!1)}case"lab":{let[te,fe,pe,Re]=Hn(po(R.lab,A.lab,F));return new ir(te,fe,pe,Re,!1)}}},array:po,padding:function(R,A,F){return new $r(po(R.values,A.values,F))},variableAnchorOffsetCollection:function(R,A,F){let W=R.values,te=A.values;if(W.length!==te.length)throw new ma(`Cannot interpolate values of different length. from: ${R.toString()}, to: ${A.toString()}`);let fe=[];for(let pe=0;pe<W.length;pe+=2){if(W[pe]!==te[pe])throw new ma(`Cannot interpolate values containing mismatched anchors. from[${pe}]: ${W[pe]}, to[${pe}]: ${te[pe]}`);fe.push(W[pe]);let[Re,Ke]=W[pe+1],[ft,Rt]=te[pe+1];fe.push([No(Re,ft,F),No(Ke,Rt,F)])}return new Zi(fe)}};class ko{constructor(A,F,W,te,fe){this.type=A,this.operator=F,this.interpolation=W,this.input=te,this.labels=[],this.outputs=[];for(let[pe,Re]of fe)this.labels.push(pe),this.outputs.push(Re)}static interpolationFactor(A,F,W,te){let fe=0;if(A.name==="exponential")fe=Ds(F,A.base,W,te);else if(A.name==="linear")fe=Ds(F,1,W,te);else if(A.name==="cubic-bezier"){let pe=A.controlPoints;fe=new _o(pe[0],pe[1],pe[2],pe[3]).solve(Ds(F,1,W,te))}return fe}static parse(A,F){let[W,te,fe,...pe]=A;if(!Array.isArray(te)||te.length===0)return F.error("Expected an interpolation type expression.",1);if(te[0]==="linear")te={name:"linear"};else if(te[0]==="exponential"){let ft=te[1];if(typeof ft!="number")return F.error("Exponential interpolation requires a numeric base.",1,1);te={name:"exponential",base:ft}}else{if(te[0]!=="cubic-bezier")return F.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let ft=te.slice(1);if(ft.length!==4||ft.some(Rt=>typeof Rt!="number"||Rt<0||Rt>1))return F.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:ft}}}if(A.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if((A.length-1)%2!=0)return F.error("Expected an even number of arguments.");if(fe=F.parse(fe,2,dt),!fe)return null;let Re=[],Ke=null;W==="interpolate-hcl"||W==="interpolate-lab"?Ke=Xt:F.expectedType&&F.expectedType.kind!=="value"&&(Ke=F.expectedType);for(let ft=0;ft<pe.length;ft+=2){let Rt=pe[ft],tr=pe[ft+1],ur=ft+3,vr=ft+4;if(typeof Rt!="number")return F.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ur);if(Re.length&&Re[Re.length-1][0]>=Rt)return F.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ur);let kr=F.parse(tr,vr,Ke);if(!kr)return null;Ke=Ke||kr.type,Re.push([Rt,kr])}return Kt(Ke,dt)||Kt(Ke,Xt)||Kt(Ke,qr)||Kt(Ke,gt)||Kt(Ke,Ge(dt))?new ko(Ke,W,te,fe,Re):F.error(`Type ${Je(Ke)} is not interpolatable.`)}evaluate(A){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(A);let te=this.input.evaluate(A);if(te<=F[0])return W[0].evaluate(A);let fe=F.length;if(te>=F[fe-1])return W[fe-1].evaluate(A);let pe=ki(F,te),Re=ko.interpolationFactor(this.interpolation,te,F[pe],F[pe+1]),Ke=W[pe].evaluate(A),ft=W[pe+1].evaluate(A);switch(this.operator){case"interpolate":return Lo[this.type.kind](Ke,ft,Re);case"interpolate-hcl":return Lo.color(Ke,ft,Re,"hcl");case"interpolate-lab":return Lo.color(Ke,ft,Re,"lab")}}eachChild(A){A(this.input);for(let F of this.outputs)A(F)}outputDefined(){return this.outputs.every(A=>A.outputDefined())}}function Ds(R,A,F,W){let te=W-F,fe=R-F;return te===0?0:A===1?fe/te:(Math.pow(A,fe)-1)/(Math.pow(A,te)-1)}class Fs{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expectected at least one argument.");let W=null,te=F.expectedType;te&&te.kind!=="value"&&(W=te);let fe=[];for(let Re of A.slice(1)){let Ke=F.parse(Re,1+fe.length,W,void 0,{typeAnnotation:"omit"});if(!Ke)return null;W=W||Ke.type,fe.push(Ke)}if(!W)throw new Error("No output type");let pe=te&&fe.some(Re=>et(te,Re.type));return new Fs(pe?_r:W,fe)}evaluate(A){let F,W=null,te=0;for(let fe of this.args)if(te++,W=fe.evaluate(A),W&&W instanceof en&&!W.available&&(F||(F=W.name),W=null,te===this.args.length&&(W=F)),W!==null)break;return W}eachChild(A){this.args.forEach(A)}outputDefined(){return this.args.every(A=>A.outputDefined())}}function ll(R,A){return R==="=="||R==="!="?A.kind==="boolean"||A.kind==="string"||A.kind==="number"||A.kind==="null"||A.kind==="value":A.kind==="string"||A.kind==="number"||A.kind==="value"}function ul(R,A,F,W){return W.compare(A,F)===0}function zl(R,A,F){let W=R!=="=="&&R!=="!=";return class vje{constructor(fe,pe,Re){this.type=pt,this.lhs=fe,this.rhs=pe,this.collator=Re,this.hasUntypedArgument=fe.type.kind==="value"||pe.type.kind==="value"}static parse(fe,pe){if(fe.length!==3&&fe.length!==4)return pe.error("Expected two or three arguments.");let Re=fe[0],Ke=pe.parse(fe[1],1,_r);if(!Ke)return null;if(!ll(Re,Ke.type))return pe.concat(1).error(`"${Re}" comparisons are not supported for type '${Je(Ke.type)}'.`);let ft=pe.parse(fe[2],2,_r);if(!ft)return null;if(!ll(Re,ft.type))return pe.concat(2).error(`"${Re}" comparisons are not supported for type '${Je(ft.type)}'.`);if(Ke.type.kind!==ft.type.kind&&Ke.type.kind!=="value"&&ft.type.kind!=="value")return pe.error(`Cannot compare types '${Je(Ke.type)}' and '${Je(ft.type)}'.`);W&&(Ke.type.kind==="value"&&ft.type.kind!=="value"?Ke=new Fa(ft.type,[Ke]):Ke.type.kind!=="value"&&ft.type.kind==="value"&&(ft=new Fa(Ke.type,[ft])));let Rt=null;if(fe.length===4){if(Ke.type.kind!=="string"&&ft.type.kind!=="string"&&Ke.type.kind!=="value"&&ft.type.kind!=="value")return pe.error("Cannot use collator to compare non-string types.");if(Rt=pe.parse(fe[3],3,Er),!Rt)return null}return new vje(Ke,ft,Rt)}evaluate(fe){let pe=this.lhs.evaluate(fe),Re=this.rhs.evaluate(fe);if(W&&this.hasUntypedArgument){let Ke=Mn(pe),ft=Mn(Re);if(Ke.kind!==ft.kind||Ke.kind!=="string"&&Ke.kind!=="number")throw new ma(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ke.kind}, ${ft.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ke=Mn(pe),ft=Mn(Re);if(Ke.kind!=="string"||ft.kind!=="string")return A(fe,pe,Re)}return this.collator?F(fe,pe,Re,this.collator.evaluate(fe)):A(fe,pe,Re)}eachChild(fe){fe(this.lhs),fe(this.rhs),this.collator&&fe(this.collator)}outputDefined(){return!0}}}let us=zl("==",function(R,A,F){return A===F},ul),il=zl("!=",function(R,A,F){return A!==F},function(R,A,F,W){return!ul(0,A,F,W)}),As=zl("<",function(R,A,F){return A<F},function(R,A,F,W){return W.compare(A,F)<0}),cl=zl(">",function(R,A,F){return A>F},function(R,A,F,W){return W.compare(A,F)>0}),Ks=zl("<=",function(R,A,F){return A<=F},function(R,A,F,W){return W.compare(A,F)<=0}),zs=zl(">=",function(R,A,F){return A>=F},function(R,A,F,W){return W.compare(A,F)>=0});class Io{constructor(A,F,W){this.type=Er,this.locale=W,this.caseSensitive=A,this.diacriticSensitive=F}static parse(A,F){if(A.length!==2)return F.error("Expected one argument.");let W=A[1];if(typeof W!="object"||Array.isArray(W))return F.error("Collator options argument must be an object.");let te=F.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,pt);if(!te)return null;let fe=F.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,pt);if(!fe)return null;let pe=null;return W.locale&&(pe=F.parse(W.locale,1,Et),!pe)?null:new Io(te,fe,pe)}evaluate(A){return new wr(this.caseSensitive.evaluate(A),this.diacriticSensitive.evaluate(A),this.locale?this.locale.evaluate(A):null)}eachChild(A){A(this.caseSensitive),A(this.diacriticSensitive),this.locale&&A(this.locale)}outputDefined(){return!1}}class ls{constructor(A,F,W,te,fe){this.type=Et,this.number=A,this.locale=F,this.currency=W,this.minFractionDigits=te,this.maxFractionDigits=fe}static parse(A,F){if(A.length!==3)return F.error("Expected two arguments.");let W=F.parse(A[1],1,dt);if(!W)return null;let te=A[2];if(typeof te!="object"||Array.isArray(te))return F.error("NumberFormat options argument must be an object.");let fe=null;if(te.locale&&(fe=F.parse(te.locale,1,Et),!fe))return null;let pe=null;if(te.currency&&(pe=F.parse(te.currency,1,Et),!pe))return null;let Re=null;if(te["min-fraction-digits"]&&(Re=F.parse(te["min-fraction-digits"],1,dt),!Re))return null;let Ke=null;return te["max-fraction-digits"]&&(Ke=F.parse(te["max-fraction-digits"],1,dt),!Ke)?null:new ls(W,fe,pe,Re,Ke)}evaluate(A){return new Intl.NumberFormat(this.locale?this.locale.evaluate(A):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(A):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(A):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(A):void 0}).format(this.number.evaluate(A))}eachChild(A){A(this.number),this.locale&&A(this.locale),this.currency&&A(this.currency),this.minFractionDigits&&A(this.minFractionDigits),this.maxFractionDigits&&A(this.maxFractionDigits)}outputDefined(){return!1}}class Yl{constructor(A){this.type=ei,this.sections=A}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W=A[1];if(!Array.isArray(W)&&typeof W=="object")return F.error("First argument must be an image or text section.");let te=[],fe=!1;for(let pe=1;pe<=A.length-1;++pe){let Re=A[pe];if(fe&&typeof Re=="object"&&!Array.isArray(Re)){fe=!1;let Ke=null;if(Re["font-scale"]&&(Ke=F.parse(Re["font-scale"],1,dt),!Ke))return null;let ft=null;if(Re["text-font"]&&(ft=F.parse(Re["text-font"],1,Ge(Et)),!ft))return null;let Rt=null;if(Re["text-color"]&&(Rt=F.parse(Re["text-color"],1,Xt),!Rt))return null;let tr=te[te.length-1];tr.scale=Ke,tr.font=ft,tr.textColor=Rt}else{let Ke=F.parse(A[pe],1,_r);if(!Ke)return null;let ft=Ke.type.kind;if(ft!=="string"&&ft!=="value"&&ft!=="null"&&ft!=="resolvedImage")return F.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");fe=!0,te.push({content:Ke,scale:null,font:null,textColor:null})}}return new Yl(te)}evaluate(A){return new ti(this.sections.map(F=>{let W=F.content.evaluate(A);return Mn(W)===jr?new Xr("",W,null,null,null):new Xr(Ba(W),null,F.scale?F.scale.evaluate(A):null,F.font?F.font.evaluate(A).join(","):null,F.textColor?F.textColor.evaluate(A):null)}))}eachChild(A){for(let F of this.sections)A(F.content),F.scale&&A(F.scale),F.font&&A(F.font),F.textColor&&A(F.textColor)}outputDefined(){return!1}}class Su{constructor(A){this.type=jr,this.input=A}static parse(A,F){if(A.length!==2)return F.error("Expected two arguments.");let W=F.parse(A[1],1,Et);return W?new Su(W):F.error("No image name provided.")}evaluate(A){let F=this.input.evaluate(A),W=en.fromString(F);return W&&A.availableImages&&(W.available=A.availableImages.indexOf(F)>-1),W}eachChild(A){A(this.input)}outputDefined(){return!1}}class nc{constructor(A){this.type=dt,this.input=A}static parse(A,F){if(A.length!==2)return F.error(`Expected 1 argument, but found ${A.length-1} instead.`);let W=F.parse(A[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?F.error(`Expected argument of type string or array, but found ${Je(W.type)} instead.`):new nc(W):null}evaluate(A){let F=this.input.evaluate(A);if(typeof F=="string")return[...F].length;if(Array.isArray(F))return F.length;throw new ma(`Expected value to be of type string or array, but found ${Je(Mn(F))} instead.`)}eachChild(A){A(this.input)}outputDefined(){return!1}}let bs=8192;function Rn(R,A){let F=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,A.z);return[Math.round(F*te*bs),Math.round(W*te*bs)]}function _a(R,A){let F=Math.pow(2,A.z);return[(te=(R[0]/bs+A.x)/F,360*te-180),(W=(R[1]/bs+A.y)/F,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Vu(R,A){R[0]=Math.min(R[0],A[0]),R[1]=Math.min(R[1],A[1]),R[2]=Math.max(R[2],A[0]),R[3]=Math.max(R[3],A[1])}function ql(R,A){return!(R[0]<=A[0]||R[2]>=A[2]||R[1]<=A[1]||R[3]>=A[3])}function xo(R,A,F){let W=R[0]-A[0],te=R[1]-A[1],fe=R[0]-F[0],pe=R[1]-F[1];return W*pe-fe*te==0&&W*fe<=0&&te*pe<=0}function Kl(R,A,F,W){return(te=[W[0]-F[0],W[1]-F[1]])[0]*(fe=[A[0]-R[0],A[1]-R[1]])[1]-te[1]*fe[0]!=0&&!(!Oo(R,A,F,W)||!Oo(F,W,R,A));var te,fe}function Ns(R,A,F){for(let W of F)for(let te=0;te<W.length-1;++te)if(Kl(R,A,W[te],W[te+1]))return!0;return!1}function Hl(R,A,F=!1){let W=!1;for(let Re of A)for(let Ke=0;Ke<Re.length-1;Ke++){if(xo(R,Re[Ke],Re[Ke+1]))return F;(fe=Re[Ke])[1]>(te=R)[1]!=(pe=Re[Ke+1])[1]>te[1]&&te[0]<(pe[0]-fe[0])*(te[1]-fe[1])/(pe[1]-fe[1])+fe[0]&&(W=!W)}var te,fe,pe;return W}function ac(R,A){for(let F of A)if(Hl(R,F))return!0;return!1}function oa(R,A){for(let F of R)if(!Hl(F,A))return!1;for(let F=0;F<R.length-1;++F)if(Ns(R[F],R[F+1],A))return!1;return!0}function qo(R,A){for(let F of A)if(oa(R,F))return!0;return!1}function Oo(R,A,F,W){let te=W[0]-F[0],fe=W[1]-F[1],pe=(R[0]-F[0])*fe-te*(R[1]-F[1]),Re=(A[0]-F[0])*fe-te*(A[1]-F[1]);return pe>0&&Re<0||pe<0&&Re>0}function Ol(R,A,F){let W=[];for(let te=0;te<R.length;te++){let fe=[];for(let pe=0;pe<R[te].length;pe++){let Re=Rn(R[te][pe],F);Vu(A,Re),fe.push(Re)}W.push(fe)}return W}function Pc(R,A,F){let W=[];for(let te=0;te<R.length;te++){let fe=Ol(R[te],A,F);W.push(fe)}return W}function Do(R,A,F,W){if(R[0]<F[0]||R[0]>F[2]){let te=.5*W,fe=R[0]-F[0]>te?-W:F[0]-R[0]>te?W:0;fe===0&&(fe=R[0]-F[2]>te?-W:F[2]-R[0]>te?W:0),R[0]+=fe}Vu(A,R)}function rf(R,A,F,W){let te=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let Re of R)for(let Ke of Re){let ft=[Ke.x+fe[0],Ke.y+fe[1]];Do(ft,A,F,te),pe.push(ft)}return pe}function Vf(R,A,F,W){let te=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let Ke of R){let ft=[];for(let Rt of Ke){let tr=[Rt.x+fe[0],Rt.y+fe[1]];Vu(A,tr),ft.push(tr)}pe.push(ft)}if(A[2]-A[0]<=te/2){(Re=A)[0]=Re[1]=1/0,Re[2]=Re[3]=-1/0;for(let Ke of pe)for(let ft of Ke)Do(ft,A,F,te)}var Re;return pe}class pl{constructor(A,F){this.type=pt,this.geojson=A,this.geometries=F}static parse(A,F){if(A.length!==2)return F.error(`'within' expression requires exactly one argument, but found ${A.length-1} instead.`);if(yn(A[1])){let W=A[1];if(W.type==="FeatureCollection"){let te=[];for(let fe of W.features){let{type:pe,coordinates:Re}=fe.geometry;pe==="Polygon"&&te.push(Re),pe==="MultiPolygon"&&te.push(...Re)}if(te.length)return new pl(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new pl(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new pl(W,W)}return F.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(A){if(A.geometry()!=null&&A.canonicalID()!=null){if(A.geometryType()==="Point")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type==="Polygon"){let Re=Ol(W.coordinates,fe,pe),Ke=rf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!Hl(ft,Re))return!1}if(W.type==="MultiPolygon"){let Re=Pc(W.coordinates,fe,pe),Ke=rf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!ac(ft,Re))return!1}return!0}(A,this.geometries);if(A.geometryType()==="LineString")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type==="Polygon"){let Re=Ol(W.coordinates,fe,pe),Ke=Vf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!oa(ft,Re))return!1}if(W.type==="MultiPolygon"){let Re=Pc(W.coordinates,fe,pe),Ke=Vf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!qo(ft,Re))return!1}return!0}(A,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Zc=class{constructor(R=[],A=(F,W)=>F<W?-1:F>W?1:0){if(this.data=R,this.length=this.data.length,this.compare=A,this.length>0)for(let F=(this.length>>1)-1;F>=0;F--)this._down(F)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],A=this.data.pop();return--this.length>0&&(this.data[0]=A,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:A,compare:F}=this,W=A[R];for(;R>0;){let te=R-1>>1,fe=A[te];if(F(W,fe)>=0)break;A[R]=fe,R=te}A[R]=W}_down(R){let{data:A,compare:F}=this,W=this.length>>1,te=A[R];for(;R<W;){let fe=1+(R<<1),pe=fe+1;if(pe<this.length&&F(A[pe],A[fe])<0&&(fe=pe),F(A[fe],te)>=0)break;A[R]=A[fe],R=fe}A[R]=te}};function Jl(R,A,F,W,te){qs(R,A,F,W||R.length-1,te||oc)}function qs(R,A,F,W,te){for(;W>F;){if(W-F>600){var fe=W-F+1,pe=A-F+1,Re=Math.log(fe),Ke=.5*Math.exp(2*Re/3),ft=.5*Math.sqrt(Re*Ke*(fe-Ke)/fe)*(pe-fe/2<0?-1:1);qs(R,A,Math.max(F,Math.floor(A-pe*Ke/fe+ft)),Math.min(W,Math.floor(A+(fe-pe)*Ke/fe+ft)),te)}var Rt=R[A],tr=F,ur=W;for(yu(R,F,A),te(R[W],Rt)>0&&yu(R,F,W);tr<ur;){for(yu(R,tr,ur),tr++,ur--;te(R[tr],Rt)<0;)tr++;for(;te(R[ur],Rt)>0;)ur--}te(R[F],Rt)===0?yu(R,F,ur):yu(R,++ur,W),ur<=A&&(F=ur+1),A<=ur&&(W=ur-1)}}function yu(R,A,F){var W=R[A];R[A]=R[F],R[F]=W}function oc(R,A){return R<A?-1:R>A?1:0}function Cf(R,A){if(R.length<=1)return[R];let F=[],W,te;for(let fe of R){let pe=jh(fe);pe!==0&&(fe.area=Math.abs(pe),te===void 0&&(te=pe<0),te===pe<0?(W&&F.push(W),W=[fe]):W.push(fe))}if(W&&F.push(W),A>1)for(let fe=0;fe<F.length;fe++)F[fe].length<=A||(Jl(F[fe],A,1,F[fe].length-1,sc),F[fe]=F[fe].slice(0,A));return F}function sc(R,A){return A.area-R.area}function jh(R){let A=0;for(let F,W,te=0,fe=R.length,pe=fe-1;te<fe;pe=te++)F=R[te],W=R[pe],A+=(W.x-F.x)*(F.y+W.y);return A}let Lf=1/298.257223563,cs=Lf*(2-Lf),nf=Math.PI/180;class Gf{constructor(A){let F=6378.137*nf*1e3,W=Math.cos(A*nf),te=1/(1-cs*(1-W*W)),fe=Math.sqrt(te);this.kx=F*fe*W,this.ky=F*fe*te*(1-cs)}distance(A,F){let W=this.wrap(A[0]-F[0])*this.kx,te=(A[1]-F[1])*this.ky;return Math.sqrt(W*W+te*te)}pointOnLine(A,F){let W,te,fe,pe,Re=1/0;for(let Ke=0;Ke<A.length-1;Ke++){let ft=A[Ke][0],Rt=A[Ke][1],tr=this.wrap(A[Ke+1][0]-ft)*this.kx,ur=(A[Ke+1][1]-Rt)*this.ky,vr=0;tr===0&&ur===0||(vr=(this.wrap(F[0]-ft)*this.kx*tr+(F[1]-Rt)*this.ky*ur)/(tr*tr+ur*ur),vr>1?(ft=A[Ke+1][0],Rt=A[Ke+1][1]):vr>0&&(ft+=tr/this.kx*vr,Rt+=ur/this.ky*vr)),tr=this.wrap(F[0]-ft)*this.kx,ur=(F[1]-Rt)*this.ky;let kr=tr*tr+ur*ur;kr<Re&&(Re=kr,W=ft,te=Rt,fe=Ke,pe=vr)}return{point:[W,te],index:fe,t:Math.max(0,Math.min(1,pe))}}wrap(A){for(;A<-180;)A+=360;for(;A>180;)A-=360;return A}}function $l(R,A){return A[0]-R[0]}function fl(R){return R[1]-R[0]+1}function lc(R,A){return R[1]>=R[0]&&R[1]<A}function Fu(R,A){if(R[0]>R[1])return[null,null];let F=fl(R);if(A){if(F===2)return[R,null];let te=Math.floor(F/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(F===1)return[R,null];let W=Math.floor(F/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function Es(R,A){if(!lc(A,R.length))return[1/0,1/0,-1/0,-1/0];let F=[1/0,1/0,-1/0,-1/0];for(let W=A[0];W<=A[1];++W)Vu(F,R[W]);return F}function Hs(R){let A=[1/0,1/0,-1/0,-1/0];for(let F of R)for(let W of F)Vu(A,W);return A}function Go(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function ps(R,A,F){if(!Go(R)||!Go(A))return NaN;let W=0,te=0;return R[2]<A[0]&&(W=A[0]-R[2]),R[0]>A[2]&&(W=R[0]-A[2]),R[1]>A[3]&&(te=R[1]-A[3]),R[3]<A[1]&&(te=A[1]-R[3]),F.distance([0,0],[W,te])}function uc(R,A,F){let W=F.pointOnLine(A,R);return F.distance(R,W.point)}function xl(R,A,F,W,te){let fe=Math.min(uc(R,[F,W],te),uc(A,[F,W],te)),pe=Math.min(uc(F,[R,A],te),uc(W,[R,A],te));return Math.min(fe,pe)}function Gu(R,A,F,W,te){if(!lc(A,R.length)||!lc(W,F.length))return 1/0;let fe=1/0;for(let pe=A[0];pe<A[1];++pe){let Re=R[pe],Ke=R[pe+1];for(let ft=W[0];ft<W[1];++ft){let Rt=F[ft],tr=F[ft+1];if(Kl(Re,Ke,Rt,tr))return 0;fe=Math.min(fe,xl(Re,Ke,Rt,tr,te))}}return fe}function Os(R,A,F,W,te){if(!lc(A,R.length)||!lc(W,F.length))return NaN;let fe=1/0;for(let pe=A[0];pe<=A[1];++pe)for(let Re=W[0];Re<=W[1];++Re)if(fe=Math.min(fe,te.distance(R[pe],F[Re])),fe===0)return fe;return fe}function od(R,A,F){if(Hl(R,A,!0))return 0;let W=1/0;for(let te of A){let fe=te[0],pe=te[te.length-1];if(fe!==pe&&(W=Math.min(W,uc(R,[pe,fe],F)),W===0))return W;let Re=F.pointOnLine(te,R);if(W=Math.min(W,F.distance(R,Re.point)),W===0)return W}return W}function Po(R,A,F,W){if(!lc(A,R.length))return NaN;for(let fe=A[0];fe<=A[1];++fe)if(Hl(R[fe],F,!0))return 0;let te=1/0;for(let fe=A[0];fe<A[1];++fe){let pe=R[fe],Re=R[fe+1];for(let Ke of F)for(let ft=0,Rt=Ke.length,tr=Rt-1;ft<Rt;tr=ft++){let ur=Ke[tr],vr=Ke[ft];if(Kl(pe,Re,ur,vr))return 0;te=Math.min(te,xl(pe,Re,ur,vr,W))}}return te}function sd(R,A){for(let F of R)for(let W of F)if(Hl(W,A,!0))return!0;return!1}function Ko(R,A,F,W=1/0){let te=Hs(R),fe=Hs(A);if(W!==1/0&&ps(te,fe,F)>=W)return W;if(ql(te,fe)){if(sd(R,A))return 0}else if(sd(A,R))return 0;let pe=1/0;for(let Re of R)for(let Ke=0,ft=Re.length,Rt=ft-1;Ke<ft;Rt=Ke++){let tr=Re[Rt],ur=Re[Ke];for(let vr of A)for(let kr=0,Dr=vr.length,li=Dr-1;kr<Dr;li=kr++){let pi=vr[li],vn=vr[kr];if(Kl(tr,ur,pi,vn))return 0;pe=Math.min(pe,xl(tr,ur,pi,vn,F))}}return pe}function Pa(R,A,F,W,te,fe){if(!fe)return;let pe=ps(Es(W,fe),te,F);pe<A&&R.push([pe,fe,[0,0]])}function af(R,A,F,W,te,fe,pe){if(!fe||!pe)return;let Re=ps(Es(W,fe),Es(te,pe),F);Re<A&&R.push([Re,fe,pe])}function Hu(R,A,F,W,te=1/0){let fe=Math.min(W.distance(R[0],F[0][0]),te);if(fe===0)return fe;let pe=new Zc([[0,[0,R.length-1],[0,0]]],$l),Re=Hs(F);for(;pe.length>0;){let Ke=pe.pop();if(Ke[0]>=fe)continue;let ft=Ke[1],Rt=A?50:100;if(fl(ft)<=Rt){if(!lc(ft,R.length))return NaN;if(A){let tr=Po(R,ft,F,W);if(isNaN(tr)||tr===0)return tr;fe=Math.min(fe,tr)}else for(let tr=ft[0];tr<=ft[1];++tr){let ur=od(R[tr],F,W);if(fe=Math.min(fe,ur),fe===0)return 0}}else{let tr=Fu(ft,A);Pa(pe,fe,W,R,Re,tr[0]),Pa(pe,fe,W,R,Re,tr[1])}}return fe}function bl(R,A,F,W,te,fe=1/0){let pe=Math.min(fe,te.distance(R[0],F[0]));if(pe===0)return pe;let Re=new Zc([[0,[0,R.length-1],[0,F.length-1]]],$l);for(;Re.length>0;){let Ke=Re.pop();if(Ke[0]>=pe)continue;let ft=Ke[1],Rt=Ke[2],tr=A?50:100,ur=W?50:100;if(fl(ft)<=tr&&fl(Rt)<=ur){if(!lc(ft,R.length)&&lc(Rt,F.length))return NaN;let vr;if(A&&W)vr=Gu(R,ft,F,Rt,te),pe=Math.min(pe,vr);else if(A&&!W){let kr=R.slice(ft[0],ft[1]+1);for(let Dr=Rt[0];Dr<=Rt[1];++Dr)if(vr=uc(F[Dr],kr,te),pe=Math.min(pe,vr),pe===0)return pe}else if(!A&&W){let kr=F.slice(Rt[0],Rt[1]+1);for(let Dr=ft[0];Dr<=ft[1];++Dr)if(vr=uc(R[Dr],kr,te),pe=Math.min(pe,vr),pe===0)return pe}else vr=Os(R,ft,F,Rt,te),pe=Math.min(pe,vr)}else{let vr=Fu(ft,A),kr=Fu(Rt,W);af(Re,pe,te,R,F,vr[0],kr[0]),af(Re,pe,te,R,F,vr[0],kr[1]),af(Re,pe,te,R,F,vr[1],kr[0]),af(Re,pe,te,R,F,vr[1],kr[1])}}return pe}function Hf(R){return R.type==="MultiPolygon"?R.coordinates.map(A=>({type:"Polygon",coordinates:A})):R.type==="MultiLineString"?R.coordinates.map(A=>({type:"LineString",coordinates:A})):R.type==="MultiPoint"?R.coordinates.map(A=>({type:"Point",coordinates:A})):[R]}class Ic{constructor(A,F){this.type=dt,this.geojson=A,this.geometries=F}static parse(A,F){if(A.length!==2)return F.error(`'distance' expression requires exactly one argument, but found ${A.length-1} instead.`);if(yn(A[1])){let W=A[1];if(W.type==="FeatureCollection")return new Ic(W,W.features.map(te=>Hf(te.geometry)).flat());if(W.type==="Feature")return new Ic(W,Hf(W.geometry));if("type"in W&&"coordinates"in W)return new Ic(W,Hf(W))}return F.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(A){if(A.geometry()!=null&&A.canonicalID()!=null){if(A.geometryType()==="Point")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Gf(fe[0][1]),Re=1/0;for(let Ke of W){switch(Ke.type){case"Point":Re=Math.min(Re,bl(fe,!1,[Ke.coordinates],!1,pe,Re));break;case"LineString":Re=Math.min(Re,bl(fe,!1,Ke.coordinates,!0,pe,Re));break;case"Polygon":Re=Math.min(Re,Hu(fe,!1,Ke.coordinates,pe,Re))}if(Re===0)return Re}return Re}(A,this.geometries);if(A.geometryType()==="LineString")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Gf(fe[0][1]),Re=1/0;for(let Ke of W){switch(Ke.type){case"Point":Re=Math.min(Re,bl(fe,!0,[Ke.coordinates],!1,pe,Re));break;case"LineString":Re=Math.min(Re,bl(fe,!0,Ke.coordinates,!0,pe,Re));break;case"Polygon":Re=Math.min(Re,Hu(fe,!0,Ke.coordinates,pe,Re))}if(Re===0)return Re}return Re}(A,this.geometries);if(A.geometryType()==="Polygon")return function(F,W){let te=F.geometry();if(te.length===0||te[0].length===0)return NaN;let fe=Cf(te,0).map(Ke=>Ke.map(ft=>ft.map(Rt=>_a([Rt.x,Rt.y],F.canonical)))),pe=new Gf(fe[0][0][0][1]),Re=1/0;for(let Ke of W)for(let ft of fe){switch(Ke.type){case"Point":Re=Math.min(Re,Hu([Ke.coordinates],!1,ft,pe,Re));break;case"LineString":Re=Math.min(Re,Hu(Ke.coordinates,!0,ft,pe,Re));break;case"Polygon":Re=Math.min(Re,Ko(ft,Ke.coordinates,pe,Re))}if(Re===0)return Re}return Re}(A,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let yf={"==":us,"!=":il,">":cl,"<":As,">=":zs,"<=":Ks,array:Fa,at:Ar,boolean:Fa,case:Sn,coalesce:Fs,collator:Io,format:Yl,image:Su,in:Jr,"index-of":hi,interpolate:ko,"interpolate-hcl":ko,"interpolate-lab":ko,length:nc,let:Gn,literal:ua,match:hn,number:Fa,"number-format":ls,object:Fa,slice:En,step:_n,string:Fa,"to-boolean":da,"to-color":da,"to-number":da,"to-string":da,var:Ct,within:pl,distance:Ic};class Bl{constructor(A,F,W,te){this.name=A,this.type=F,this._evaluate=W,this.args=te}evaluate(A){return this._evaluate(A,this.args)}eachChild(A){this.args.forEach(A)}outputDefined(){return!1}static parse(A,F){let W=A[0],te=Bl.definitions[W];if(!te)return F.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let fe=Array.isArray(te)?te[0]:te.type,pe=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,Re=pe.filter(([ft])=>!Array.isArray(ft)||ft.length===A.length-1),Ke=null;for(let[ft,Rt]of Re){Ke=new vo(F.registry,eh,F.path,null,F.scope);let tr=[],ur=!1;for(let vr=1;vr<A.length;vr++){let kr=A[vr],Dr=Array.isArray(ft)?ft[vr-1]:ft.type,li=Ke.parse(kr,1+tr.length,Dr);if(!li){ur=!0;break}tr.push(li)}if(!ur)if(Array.isArray(ft)&&ft.length!==tr.length)Ke.error(`Expected ${ft.length} arguments, but found ${tr.length} instead.`);else{for(let vr=0;vr<tr.length;vr++){let kr=Array.isArray(ft)?ft[vr]:ft.type,Dr=tr[vr];Ke.concat(vr+1).checkSubtype(kr,Dr.type)}if(Ke.errors.length===0)return new Bl(W,fe,Rt,tr)}}if(Re.length===1)F.errors.push(...Ke.errors);else{let ft=(Re.length?Re:pe).map(([tr])=>{return ur=tr,Array.isArray(ur)?`(${ur.map(Je).join(", ")})`:`(${Je(ur.type)}...)`;var ur}).join(" | "),Rt=[];for(let tr=1;tr<A.length;tr++){let ur=F.parse(A[tr],1+Rt.length);if(!ur)return null;Rt.push(Je(ur.type))}F.error(`Expected arguments of type ${ft}, but found (${Rt.join(", ")}) instead.`)}return null}static register(A,F){Bl.definitions=F;for(let W in F)A[W]=Bl}}function Ah(R,[A,F,W,te]){A=A.evaluate(R),F=F.evaluate(R),W=W.evaluate(R);let fe=te?te.evaluate(R):1,pe=fn(A,F,W,fe);if(pe)throw new ma(pe);return new ir(A/255,F/255,W/255,fe,!1)}function Qf(R,A){return R in A}function _f(R,A){let F=A[R];return F===void 0?null:F}function Yc(R){return{type:R}}function eh(R){if(R instanceof Ct)return eh(R.boundExpression);if(R instanceof Bl&&R.name==="error"||R instanceof Io||R instanceof pl||R instanceof Ic)return!1;let A=R instanceof da||R instanceof Fa,F=!0;return R.eachChild(W=>{F=A?F&&eh(W):F&&W instanceof ua}),!!F&&th(R)&&jf(R,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function th(R){if(R instanceof Bl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof pl||R instanceof Ic)return!1;let A=!0;return R.eachChild(F=>{A&&!th(F)&&(A=!1)}),A}function ju(R){if(R instanceof Bl&&R.name==="feature-state")return!1;let A=!0;return R.eachChild(F=>{A&&!ju(F)&&(A=!1)}),A}function jf(R,A){if(R instanceof Bl&&A.indexOf(R.name)>=0)return!1;let F=!0;return R.eachChild(W=>{F&&!jf(W,A)&&(F=!1)}),F}function cc(R){return{result:"success",value:R}}function of(R){return{result:"error",value:R}}function Nl(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Kc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Rc(R){return!!R.expression&&R.expression.interpolated}function gs(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Wf(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)}function Wh(R){return R}function rh(R,A){let F=A.type==="color",W=R.stops&&typeof R.stops[0][0]=="object",te=W||!(W||R.property!==void 0),fe=R.type||(Rc(A)?"exponential":"interval");if(F||A.type==="padding"){let Rt=F?ir.parse:$r.parse;(R=Ae({},R)).stops&&(R.stops=R.stops.map(tr=>[tr[0],Rt(tr[1])])),R.default=Rt(R.default?R.default:A.default)}if(R.colorSpace&&(pe=R.colorSpace)!=="rgb"&&pe!=="hcl"&&pe!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var pe;let Re,Ke,ft;if(fe==="exponential")Re=ih;else if(fe==="interval")Re=Mu;else if(fe==="categorical"){Re=Sh,Ke=Object.create(null);for(let Rt of R.stops)Ke[Rt[0]]=Rt[1];ft=typeof R.stops[0][0]}else{if(fe!=="identity")throw new Error(`Unknown function type "${fe}"`);Re=js}if(W){let Rt={},tr=[];for(let kr=0;kr<R.stops.length;kr++){let Dr=R.stops[kr],li=Dr[0].zoom;Rt[li]===void 0&&(Rt[li]={zoom:li,type:R.type,property:R.property,default:R.default,stops:[]},tr.push(li)),Rt[li].stops.push([Dr[0].value,Dr[1]])}let ur=[];for(let kr of tr)ur.push([Rt[kr].zoom,rh(Rt[kr],A)]);let vr={name:"linear"};return{kind:"composite",interpolationType:vr,interpolationFactor:ko.interpolationFactor.bind(void 0,vr),zoomStops:ur.map(kr=>kr[0]),evaluate:({zoom:kr},Dr)=>ih({stops:ur,base:R.base},A,kr).evaluate(kr,Dr)}}if(te){let Rt=fe==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Rt,interpolationFactor:ko.interpolationFactor.bind(void 0,Rt),zoomStops:R.stops.map(tr=>tr[0]),evaluate:({zoom:tr})=>Re(R,A,tr,Ke,ft)}}return{kind:"source",evaluate(Rt,tr){let ur=tr&&tr.properties?tr.properties[R.property]:void 0;return ur===void 0?sf(R.default,A.default):Re(R,A,ur,Ke,ft)}}}function sf(R,A,F){return R!==void 0?R:A!==void 0?A:F!==void 0?F:void 0}function Sh(R,A,F,W,te){return sf(typeof F===te?W[F]:void 0,R.default,A.default)}function Mu(R,A,F){if(gs(F)!=="number")return sf(R.default,A.default);let W=R.stops.length;if(W===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[W-1][0])return R.stops[W-1][1];let te=ki(R.stops.map(fe=>fe[0]),F);return R.stops[te][1]}function ih(R,A,F){let W=R.base!==void 0?R.base:1;if(gs(F)!=="number")return sf(R.default,A.default);let te=R.stops.length;if(te===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[te-1][0])return R.stops[te-1][1];let fe=ki(R.stops.map(Rt=>Rt[0]),F),pe=function(Rt,tr,ur,vr){let kr=vr-ur,Dr=Rt-ur;return kr===0?0:tr===1?Dr/kr:(Math.pow(tr,Dr)-1)/(Math.pow(tr,kr)-1)}(F,W,R.stops[fe][0],R.stops[fe+1][0]),Re=R.stops[fe][1],Ke=R.stops[fe+1][1],ft=Lo[A.type]||Wh;return typeof Re.evaluate=="function"?{evaluate(...Rt){let tr=Re.evaluate.apply(void 0,Rt),ur=Ke.evaluate.apply(void 0,Rt);if(tr!==void 0&&ur!==void 0)return ft(tr,ur,pe,R.colorSpace)}}:ft(Re,Ke,pe,R.colorSpace)}function js(R,A,F){switch(A.type){case"color":F=ir.parse(F);break;case"formatted":F=ti.fromString(F.toString());break;case"resolvedImage":F=en.fromString(F.toString());break;case"padding":F=$r.parse(F);break;default:gs(F)===A.type||A.type==="enum"&&A.values[F]||(F=void 0)}return sf(F,R.default,A.default)}Bl.register(yf,{error:[{kind:"error"},[Et],(R,[A])=>{throw new ma(A.evaluate(R))}],typeof:[Et,[_r],(R,[A])=>Je(Mn(A.evaluate(R)))],"to-rgba":[Ge(dt,4),[Xt],(R,[A])=>{let[F,W,te,fe]=A.evaluate(R).rgb;return[255*F,255*W,255*te,fe]}],rgb:[Xt,[dt,dt,dt],Ah],rgba:[Xt,[dt,dt,dt,dt],Ah],has:{type:pt,overloads:[[[Et],(R,[A])=>Qf(A.evaluate(R),R.properties())],[[Et,or],(R,[A,F])=>Qf(A.evaluate(R),F.evaluate(R))]]},get:{type:_r,overloads:[[[Et],(R,[A])=>_f(A.evaluate(R),R.properties())],[[Et,or],(R,[A,F])=>_f(A.evaluate(R),F.evaluate(R))]]},"feature-state":[_r,[Et],(R,[A])=>_f(A.evaluate(R),R.featureState||{})],properties:[or,[],R=>R.properties()],"geometry-type":[Et,[],R=>R.geometryType()],id:[_r,[],R=>R.id()],zoom:[dt,[],R=>R.globals.zoom],"heatmap-density":[dt,[],R=>R.globals.heatmapDensity||0],"line-progress":[dt,[],R=>R.globals.lineProgress||0],accumulated:[_r,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[dt,Yc(dt),(R,A)=>{let F=0;for(let W of A)F+=W.evaluate(R);return F}],"*":[dt,Yc(dt),(R,A)=>{let F=1;for(let W of A)F*=W.evaluate(R);return F}],"-":{type:dt,overloads:[[[dt,dt],(R,[A,F])=>A.evaluate(R)-F.evaluate(R)],[[dt],(R,[A])=>-A.evaluate(R)]]},"/":[dt,[dt,dt],(R,[A,F])=>A.evaluate(R)/F.evaluate(R)],"%":[dt,[dt,dt],(R,[A,F])=>A.evaluate(R)%F.evaluate(R)],ln2:[dt,[],()=>Math.LN2],pi:[dt,[],()=>Math.PI],e:[dt,[],()=>Math.E],"^":[dt,[dt,dt],(R,[A,F])=>Math.pow(A.evaluate(R),F.evaluate(R))],sqrt:[dt,[dt],(R,[A])=>Math.sqrt(A.evaluate(R))],log10:[dt,[dt],(R,[A])=>Math.log(A.evaluate(R))/Math.LN10],ln:[dt,[dt],(R,[A])=>Math.log(A.evaluate(R))],log2:[dt,[dt],(R,[A])=>Math.log(A.evaluate(R))/Math.LN2],sin:[dt,[dt],(R,[A])=>Math.sin(A.evaluate(R))],cos:[dt,[dt],(R,[A])=>Math.cos(A.evaluate(R))],tan:[dt,[dt],(R,[A])=>Math.tan(A.evaluate(R))],asin:[dt,[dt],(R,[A])=>Math.asin(A.evaluate(R))],acos:[dt,[dt],(R,[A])=>Math.acos(A.evaluate(R))],atan:[dt,[dt],(R,[A])=>Math.atan(A.evaluate(R))],min:[dt,Yc(dt),(R,A)=>Math.min(...A.map(F=>F.evaluate(R)))],max:[dt,Yc(dt),(R,A)=>Math.max(...A.map(F=>F.evaluate(R)))],abs:[dt,[dt],(R,[A])=>Math.abs(A.evaluate(R))],round:[dt,[dt],(R,[A])=>{let F=A.evaluate(R);return F<0?-Math.round(-F):Math.round(F)}],floor:[dt,[dt],(R,[A])=>Math.floor(A.evaluate(R))],ceil:[dt,[dt],(R,[A])=>Math.ceil(A.evaluate(R))],"filter-==":[pt,[Et,_r],(R,[A,F])=>R.properties()[A.value]===F.value],"filter-id-==":[pt,[_r],(R,[A])=>R.id()===A.value],"filter-type-==":[pt,[Et],(R,[A])=>R.geometryType()===A.value],"filter-<":[pt,[Et,_r],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W<te}],"filter-id-<":[pt,[_r],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F<W}],"filter->":[pt,[Et,_r],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W>te}],"filter-id->":[pt,[_r],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F>W}],"filter-<=":[pt,[Et,_r],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[pt,[_r],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F<=W}],"filter->=":[pt,[Et,_r],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[pt,[_r],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F>=W}],"filter-has":[pt,[_r],(R,[A])=>A.value in R.properties()],"filter-has-id":[pt,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[pt,[Ge(Et)],(R,[A])=>A.value.indexOf(R.geometryType())>=0],"filter-id-in":[pt,[Ge(_r)],(R,[A])=>A.value.indexOf(R.id())>=0],"filter-in-small":[pt,[Et,Ge(_r)],(R,[A,F])=>F.value.indexOf(R.properties()[A.value])>=0],"filter-in-large":[pt,[Et,Ge(_r)],(R,[A,F])=>function(W,te,fe,pe){for(;fe<=pe;){let Re=fe+pe>>1;if(te[Re]===W)return!0;te[Re]>W?pe=Re-1:fe=Re+1}return!1}(R.properties()[A.value],F.value,0,F.value.length-1)],all:{type:pt,overloads:[[[pt,pt],(R,[A,F])=>A.evaluate(R)&&F.evaluate(R)],[Yc(pt),(R,A)=>{for(let F of A)if(!F.evaluate(R))return!1;return!0}]]},any:{type:pt,overloads:[[[pt,pt],(R,[A,F])=>A.evaluate(R)||F.evaluate(R)],[Yc(pt),(R,A)=>{for(let F of A)if(F.evaluate(R))return!0;return!1}]]},"!":[pt,[pt],(R,[A])=>!A.evaluate(R)],"is-supported-script":[pt,[Et],(R,[A])=>{let F=R.globals&&R.globals.isSupportedScript;return!F||F(A.evaluate(R))}],upcase:[Et,[Et],(R,[A])=>A.evaluate(R).toUpperCase()],downcase:[Et,[Et],(R,[A])=>A.evaluate(R).toLowerCase()],concat:[Et,Yc(_r),(R,A)=>A.map(F=>Ba(F.evaluate(R))).join("")],"resolved-locale":[Et,[Er],(R,[A])=>A.evaluate(R).resolvedLocale()]});class Eu{constructor(A,F){var W;this.expression=A,this._warningHistory={},this._evaluator=new Ha,this._defaultValue=F?(W=F).type==="color"&&Wf(W.default)?new ir(0,0,0,0):W.type==="color"?ir.parse(W.default)||null:W.type==="padding"?$r.parse(W.default)||null:W.type==="variableAnchorOffsetCollection"?Zi.parse(W.default)||null:W.default===void 0?null:W.default:null,this._enumValues=F&&F.type==="enum"?F.values:null}evaluateWithoutErrorHandling(A,F,W,te,fe,pe){return this._evaluator.globals=A,this._evaluator.feature=F,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe,this.expression.evaluate(this._evaluator)}evaluate(A,F,W,te,fe,pe){this._evaluator.globals=A,this._evaluator.feature=F||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe||null;try{let Re=this.expression.evaluate(this._evaluator);if(Re==null||typeof Re=="number"&&Re!=Re)return this._defaultValue;if(this._enumValues&&!(Re in this._enumValues))throw new ma(`Expected value to be one of ${Object.keys(this._enumValues).map(Ke=>JSON.stringify(Ke)).join(", ")}, but found ${JSON.stringify(Re)} instead.`);return Re}catch(Re){return this._warningHistory[Re.message]||(this._warningHistory[Re.message]=!0,typeof console!="undefined"&&console.warn(Re.message)),this._defaultValue}}}function Dc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in yf}function ks(R,A){let F=new vo(yf,eh,[],A?function(te){let fe={color:Xt,string:Et,number:dt,enum:Et,boolean:pt,formatted:ei,padding:qr,resolvedImage:jr,variableAnchorOffsetCollection:gt};return te.type==="array"?Ge(fe[te.value]||_r,te.length):fe[te.type]}(A):void 0),W=F.parse(R,void 0,void 0,void 0,A&&A.type==="string"?{typeAnnotation:"coerce"}:void 0);return W?cc(new Eu(W,A)):of(F.errors)}class bc{constructor(A,F){this.kind=A,this._styleExpression=F,this.isStateDependent=A!=="constant"&&!ju(F.expression)}evaluateWithoutErrorHandling(A,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(A,F,W,te,fe,pe)}evaluate(A,F,W,te,fe,pe){return this._styleExpression.evaluate(A,F,W,te,fe,pe)}}class hu{constructor(A,F,W,te){this.kind=A,this.zoomStops=W,this._styleExpression=F,this.isStateDependent=A!=="camera"&&!ju(F.expression),this.interpolationType=te}evaluateWithoutErrorHandling(A,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(A,F,W,te,fe,pe)}evaluate(A,F,W,te,fe,pe){return this._styleExpression.evaluate(A,F,W,te,fe,pe)}interpolationFactor(A,F,W){return this.interpolationType?ko.interpolationFactor(this.interpolationType,A,F,W):0}}function _u(R,A){let F=ks(R,A);if(F.result==="error")return F;let W=F.value.expression,te=th(W);if(!te&&!Nl(A))return of([new rt("","data expressions not supported")]);let fe=jf(W,["zoom"]);if(!fe&&!Kc(A))return of([new rt("","zoom expressions not supported")]);let pe=nh(W);return pe||fe?pe instanceof rt?of([pe]):pe instanceof ko&&!Rc(A)?of([new rt("",'"interpolate" expressions cannot be used with this property')]):cc(pe?new hu(te?"camera":"composite",F.value,pe.labels,pe instanceof ko?pe.interpolation:void 0):new bc(te?"constant":"source",F.value)):of([new rt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class nl{constructor(A,F){this._parameters=A,this._specification=F,Ae(this,rh(this._parameters,this._specification))}static deserialize(A){return new nl(A._parameters,A._specification)}static serialize(A){return{_parameters:A._parameters,_specification:A._specification}}}function nh(R){let A=null;if(R instanceof Gn)A=nh(R.result);else if(R instanceof Fs){for(let F of R.args)if(A=nh(F),A)break}else(R instanceof _n||R instanceof ko)&&R.input instanceof Bl&&R.input.name==="zoom"&&(A=R);return A instanceof rt||R.eachChild(F=>{let W=nh(F);W instanceof rt?A=W:!A&&W?A=new rt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):A&&W&&A!==W&&(A=new rt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),A}function Mh(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let A of R.slice(1))if(!Mh(A)&&typeof A!="boolean")return!1;return!0;default:return!0}}let zu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Fc(R){if(R==null)return{filter:()=>!0,needGeometry:!1};Mh(R)||(R=xf(R));let A=ks(R,zu);if(A.result==="error")throw new Error(A.value.map(F=>`${F.key}: ${F.message}`).join(", "));return{filter:(F,W,te)=>A.value.evaluate(F,W,{},te),needGeometry:bd(R)}}function wc(R,A){return R<A?-1:R>A?1:0}function bd(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let A=1;A<R.length;A++)if(bd(R[A]))return!0;return!1}function xf(R){if(!R)return!0;let A=R[0];return R.length<=1?A!=="any":A==="=="?Pf(R[1],R[2],"=="):A==="!="?jl(Pf(R[1],R[2],"==")):A==="<"||A===">"||A==="<="||A===">="?Pf(R[1],R[2],A):A==="any"?(F=R.slice(1),["any"].concat(F.map(xf))):A==="all"?["all"].concat(R.slice(1).map(xf)):A==="none"?["all"].concat(R.slice(1).map(xf).map(jl)):A==="in"?qu(R[1],R.slice(2)):A==="!in"?jl(qu(R[1],R.slice(2))):A==="has"?bf(R[1]):A!=="!has"||jl(bf(R[1]));var F}function Pf(R,A,F){switch(R){case"$type":return[`filter-type-${F}`,A];case"$id":return[`filter-id-${F}`,A];default:return[`filter-${F}`,R,A]}}function qu(R,A){if(A.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",A]];case"$id":return["filter-id-in",["literal",A]];default:return A.length>200&&!A.some(F=>typeof F!=typeof A[0])?["filter-in-large",R,["literal",A.sort(wc)]]:["filter-in-small",R,["literal",A]]}}function bf(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function jl(R){return["!",R]}function lf(R){let A=typeof R;if(A==="number"||A==="boolean"||A==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te="[";for(let fe of R)te+=`${lf(fe)},`;return`${te}]`}let F=Object.keys(R).sort(),W="{";for(let te=0;te<F.length;te++)W+=`${JSON.stringify(F[te])}:${lf(R[F[te]])},`;return`${W}}`}function Xh(R){let A="";for(let F of He)A+=`/${lf(R[F])}`;return A}function If(R){let A=R.value;return A?[new Ue(R.key,A,"constants have been deprecated as of v8")]:[]}function Cs(R){return R instanceof Number||R instanceof String||R instanceof Boolean?R.valueOf():R}function du(R){if(Array.isArray(R))return R.map(du);if(R instanceof Object&&!(R instanceof Number||R instanceof String||R instanceof Boolean)){let A={};for(let F in R)A[F]=du(R[F]);return A}return Cs(R)}function ku(R){let A=R.key,F=R.value,W=R.valueSpec||{},te=R.objectElementValidators||{},fe=R.style,pe=R.styleSpec,Re=R.validateSpec,Ke=[],ft=gs(F);if(ft!=="object")return[new Ue(A,F,`object expected, ${ft} found`)];for(let Rt in F){let tr=Rt.split(".")[0],ur=W[tr]||W["*"],vr;if(te[tr])vr=te[tr];else if(W[tr])vr=Re;else if(te["*"])vr=te["*"];else{if(!W["*"]){Ke.push(new Ue(A,F[Rt],`unknown property "${Rt}"`));continue}vr=Re}Ke=Ke.concat(vr({key:(A&&`${A}.`)+Rt,value:F[Rt],valueSpec:ur,style:fe,styleSpec:pe,object:F,objectKey:Rt,validateSpec:Re},F))}for(let Rt in W)te[Rt]||W[Rt].required&&W[Rt].default===void 0&&F[Rt]===void 0&&Ke.push(new Ue(A,F,`missing required property "${Rt}"`));return Ke}function Xf(R){let A=R.value,F=R.valueSpec,W=R.style,te=R.styleSpec,fe=R.key,pe=R.arrayElementValidator||R.validateSpec;if(gs(A)!=="array")return[new Ue(fe,A,`array expected, ${gs(A)} found`)];if(F.length&&A.length!==F.length)return[new Ue(fe,A,`array length ${F.length} expected, length ${A.length} found`)];if(F["min-length"]&&A.length<F["min-length"])return[new Ue(fe,A,`array length at least ${F["min-length"]} expected, length ${A.length} found`)];let Re={type:F.value,values:F.values};te.$version<7&&(Re.function=F.function),gs(F.value)==="object"&&(Re=F.value);let Ke=[];for(let ft=0;ft<A.length;ft++)Ke=Ke.concat(pe({array:A,arrayIndex:ft,value:A[ft],valueSpec:Re,validateSpec:R.validateSpec,style:W,styleSpec:te,key:`${fe}[${ft}]`}));return Ke}function Us(R){let A=R.key,F=R.value,W=R.valueSpec,te=gs(F);return te==="number"&&F!=F&&(te="NaN"),te!=="number"?[new Ue(A,F,`number expected, ${te} found`)]:"minimum"in W&&F<W.minimum?[new Ue(A,F,`${F} is less than the minimum value ${W.minimum}`)]:"maximum"in W&&F>W.maximum?[new Ue(A,F,`${F} is greater than the maximum value ${W.maximum}`)]:[]}function wf(R){let A=R.valueSpec,F=Cs(R.value.type),W,te,fe,pe={},Re=F!=="categorical"&&R.value.property===void 0,Ke=!Re,ft=gs(R.value.stops)==="array"&&gs(R.value.stops[0])==="array"&&gs(R.value.stops[0][0])==="object",Rt=ku({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(vr){if(F==="identity")return[new Ue(vr.key,vr.value,'identity function may not have a "stops" property')];let kr=[],Dr=vr.value;return kr=kr.concat(Xf({key:vr.key,value:Dr,valueSpec:vr.valueSpec,validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec,arrayElementValidator:tr})),gs(Dr)==="array"&&Dr.length===0&&kr.push(new Ue(vr.key,Dr,"array must have at least one stop")),kr},default:function(vr){return vr.validateSpec({key:vr.key,value:vr.value,valueSpec:A,validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec})}}});return F==="identity"&&Re&&Rt.push(new Ue(R.key,R.value,'missing required property "property"')),F==="identity"||R.value.stops||Rt.push(new Ue(R.key,R.value,'missing required property "stops"')),F==="exponential"&&R.valueSpec.expression&&!Rc(R.valueSpec)&&Rt.push(new Ue(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ke&&!Nl(R.valueSpec)?Rt.push(new Ue(R.key,R.value,"property functions not supported")):Re&&!Kc(R.valueSpec)&&Rt.push(new Ue(R.key,R.value,"zoom functions not supported"))),F!=="categorical"&&!ft||R.value.property!==void 0||Rt.push(new Ue(R.key,R.value,'"property" property is required')),Rt;function tr(vr){let kr=[],Dr=vr.value,li=vr.key;if(gs(Dr)!=="array")return[new Ue(li,Dr,`array expected, ${gs(Dr)} found`)];if(Dr.length!==2)return[new Ue(li,Dr,`array length 2 expected, length ${Dr.length} found`)];if(ft){if(gs(Dr[0])!=="object")return[new Ue(li,Dr,`object expected, ${gs(Dr[0])} found`)];if(Dr[0].zoom===void 0)return[new Ue(li,Dr,"object stop key must have zoom")];if(Dr[0].value===void 0)return[new Ue(li,Dr,"object stop key must have value")];if(fe&&fe>Cs(Dr[0].zoom))return[new Ue(li,Dr[0].zoom,"stop zoom values must appear in ascending order")];Cs(Dr[0].zoom)!==fe&&(fe=Cs(Dr[0].zoom),te=void 0,pe={}),kr=kr.concat(ku({key:`${li}[0]`,value:Dr[0],valueSpec:{zoom:{}},validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec,objectElementValidators:{zoom:Us,value:ur}}))}else kr=kr.concat(ur({key:`${li}[0]`,value:Dr[0],valueSpec:{},validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec},Dr));return Dc(du(Dr[1]))?kr.concat([new Ue(`${li}[1]`,Dr[1],"expressions are not allowed in function stops.")]):kr.concat(vr.validateSpec({key:`${li}[1]`,value:Dr[1],valueSpec:A,validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec}))}function ur(vr,kr){let Dr=gs(vr.value),li=Cs(vr.value),pi=vr.value!==null?vr.value:kr;if(W){if(Dr!==W)return[new Ue(vr.key,pi,`${Dr} stop domain type must match previous stop domain type ${W}`)]}else W=Dr;if(Dr!=="number"&&Dr!=="string"&&Dr!=="boolean")return[new Ue(vr.key,pi,"stop domain value must be a number, string, or boolean")];if(Dr!=="number"&&F!=="categorical"){let vn=`number expected, ${Dr} found`;return Nl(A)&&F===void 0&&(vn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ue(vr.key,pi,vn)]}return F!=="categorical"||Dr!=="number"||isFinite(li)&&Math.floor(li)===li?F!=="categorical"&&Dr==="number"&&te!==void 0&&li<te?[new Ue(vr.key,pi,"stop domain values must appear in ascending order")]:(te=li,F==="categorical"&&li in pe?[new Ue(vr.key,pi,"stop domain values must be unique")]:(pe[li]=!0,[])):[new Ue(vr.key,pi,`integer expected, found ${li}`)]}}function zc(R){let A=(R.expressionContext==="property"?_u:ks)(du(R.value),R.valueSpec);if(A.result==="error")return A.value.map(W=>new Ue(`${R.key}${W.key}`,R.value,W.message));let F=A.value.expression||A.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!F.outputDefined())return[new Ue(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!ju(F))return[new Ue(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!ju(F))return[new Ue(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!jf(F,["zoom","feature-state"]))return[new Ue(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!th(F))return[new Ue(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Wu(R){let A=R.key,F=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(Cs(F))===-1&&te.push(new Ue(A,F,`expected one of [${W.values.join(", ")}], ${JSON.stringify(F)} found`)):Object.keys(W.values).indexOf(Cs(F))===-1&&te.push(new Ue(A,F,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(F)} found`)),te}function Rf(R){return Mh(du(R.value))?zc(Ae({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Xu(R)}function Xu(R){let A=R.value,F=R.key;if(gs(A)!=="array")return[new Ue(F,A,`array expected, ${gs(A)} found`)];let W=R.styleSpec,te,fe=[];if(A.length<1)return[new Ue(F,A,"filter array must have at least 1 element")];switch(fe=fe.concat(Wu({key:`${F}[0]`,value:A[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),Cs(A[0])){case"<":case"<=":case">":case">=":A.length>=2&&Cs(A[1])==="$type"&&fe.push(new Ue(F,A,`"$type" cannot be use with operator "${A[0]}"`));case"==":case"!=":A.length!==3&&fe.push(new Ue(F,A,`filter array for operator "${A[0]}" must have 3 elements`));case"in":case"!in":A.length>=2&&(te=gs(A[1]),te!=="string"&&fe.push(new Ue(`${F}[1]`,A[1],`string expected, ${te} found`)));for(let pe=2;pe<A.length;pe++)te=gs(A[pe]),Cs(A[1])==="$type"?fe=fe.concat(Wu({key:`${F}[${pe}]`,value:A[pe],valueSpec:W.geometry_type,style:R.style,styleSpec:R.styleSpec})):te!=="string"&&te!=="number"&&te!=="boolean"&&fe.push(new Ue(`${F}[${pe}]`,A[pe],`string, number, or boolean expected, ${te} found`));break;case"any":case"all":case"none":for(let pe=1;pe<A.length;pe++)fe=fe.concat(Xu({key:`${F}[${pe}]`,value:A[pe],style:R.style,styleSpec:R.styleSpec}));break;case"has":case"!has":te=gs(A[1]),A.length!==2?fe.push(new Ue(F,A,`filter array for "${A[0]}" operator must have 2 elements`)):te!=="string"&&fe.push(new Ue(`${F}[1]`,A[1],`string expected, ${te} found`))}return fe}function uf(R,A){let F=R.key,W=R.validateSpec,te=R.style,fe=R.styleSpec,pe=R.value,Re=R.objectKey,Ke=fe[`${A}_${R.layerType}`];if(!Ke)return[];let ft=Re.match(/^(.*)-transition$/);if(A==="paint"&&ft&&Ke[ft[1]]&&Ke[ft[1]].transition)return W({key:F,value:pe,valueSpec:fe.transition,style:te,styleSpec:fe});let Rt=R.valueSpec||Ke[Re];if(!Rt)return[new Ue(F,pe,`unknown property "${Re}"`)];let tr;if(gs(pe)==="string"&&Nl(Rt)&&!Rt.tokens&&(tr=/^{([^}]+)}$/.exec(pe)))return[new Ue(F,pe,`"${Re}" does not support interpolation syntax
|
||
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(tr[1])} }\`.`)];let ur=[];return R.layerType==="symbol"&&(Re==="text-field"&&te&&!te.glyphs&&ur.push(new Ue(F,pe,'use of "text-field" requires a style "glyphs" property')),Re==="text-font"&&Wf(du(pe))&&Cs(pe.type)==="identity"&&ur.push(new Ue(F,pe,'"text-font" does not support identity functions'))),ur.concat(W({key:R.key,value:pe,valueSpec:Rt,style:te,styleSpec:fe,expressionContext:"property",propertyType:A,propertyKey:Re}))}function Zf(R){return uf(R,"paint")}function Wl(R){return uf(R,"layout")}function ah(R){let A=[],F=R.value,W=R.key,te=R.style,fe=R.styleSpec;F.type||F.ref||A.push(new Ue(W,F,'either "type" or "ref" is required'));let pe=Cs(F.type),Re=Cs(F.ref);if(F.id){let Ke=Cs(F.id);for(let ft=0;ft<R.arrayIndex;ft++){let Rt=te.layers[ft];Cs(Rt.id)===Ke&&A.push(new Ue(W,F.id,`duplicate layer id "${F.id}", previously used at line ${Rt.id.__line__}`))}}if("ref"in F){let Ke;["type","source","source-layer","filter","layout"].forEach(ft=>{ft in F&&A.push(new Ue(W,F[ft],`"${ft}" is prohibited for ref layers`))}),te.layers.forEach(ft=>{Cs(ft.id)===Re&&(Ke=ft)}),Ke?Ke.ref?A.push(new Ue(W,F.ref,"ref cannot reference another ref layer")):pe=Cs(Ke.type):A.push(new Ue(W,F.ref,`ref layer "${Re}" not found`))}else if(pe!=="background")if(F.source){let Ke=te.sources&&te.sources[F.source],ft=Ke&&Cs(Ke.type);Ke?ft==="vector"&&pe==="raster"?A.push(new Ue(W,F.source,`layer "${F.id}" requires a raster source`)):ft!=="raster-dem"&&pe==="hillshade"?A.push(new Ue(W,F.source,`layer "${F.id}" requires a raster-dem source`)):ft==="raster"&&pe!=="raster"?A.push(new Ue(W,F.source,`layer "${F.id}" requires a vector source`)):ft!=="vector"||F["source-layer"]?ft==="raster-dem"&&pe!=="hillshade"?A.push(new Ue(W,F.source,"raster-dem source can only be used with layer type 'hillshade'.")):pe!=="line"||!F.paint||!F.paint["line-gradient"]||ft==="geojson"&&Ke.lineMetrics||A.push(new Ue(W,F,`layer "${F.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):A.push(new Ue(W,F,`layer "${F.id}" must specify a "source-layer"`)):A.push(new Ue(W,F.source,`source "${F.source}" not found`))}else A.push(new Ue(W,F,'missing required property "source"'));return A=A.concat(ku({key:W,value:F,valueSpec:fe.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${W}.type`,value:F.type,valueSpec:fe.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:F,objectKey:"type"}),filter:Rf,layout:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{"*":ft=>Wl(Ae({layerType:pe},ft))}}),paint:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{"*":ft=>Zf(Ae({layerType:pe},ft))}})}})),A}function Zu(R){let A=R.value,F=R.key,W=gs(A);return W!=="string"?[new Ue(F,A,`string expected, ${W} found`)]:[]}let qc={promoteId:function({key:R,value:A}){if(gs(A)==="string")return Zu({key:R,value:A});{let F=[];for(let W in A)F.push(...Zu({key:`${R}.${W}`,value:A[W]}));return F}}};function Tc(R){let A=R.value,F=R.key,W=R.styleSpec,te=R.style,fe=R.validateSpec;if(!A.type)return[new Ue(F,A,'"type" is required')];let pe=Cs(A.type),Re;switch(pe){case"vector":case"raster":return Re=ku({key:F,value:A,valueSpec:W[`source_${pe.replace("-","_")}`],style:R.style,styleSpec:W,objectElementValidators:qc,validateSpec:fe}),Re;case"raster-dem":return Re=function(Ke){var ft;let Rt=(ft=Ke.sourceName)!==null&&ft!==void 0?ft:"",tr=Ke.value,ur=Ke.styleSpec,vr=ur.source_raster_dem,kr=Ke.style,Dr=[],li=gs(tr);if(tr===void 0)return Dr;if(li!=="object")return Dr.push(new Ue("source_raster_dem",tr,`object expected, ${li} found`)),Dr;let pi=Cs(tr.encoding)==="custom",vn=["redFactor","greenFactor","blueFactor","baseShift"],zi=Ke.value.encoding?`"${Ke.value.encoding}"`:"Default";for(let ln in tr)!pi&&vn.includes(ln)?Dr.push(new Ue(ln,tr[ln],`In "${Rt}": "${ln}" is only valid when "encoding" is set to "custom". ${zi} encoding found`)):vr[ln]?Dr=Dr.concat(Ke.validateSpec({key:ln,value:tr[ln],valueSpec:vr[ln],validateSpec:Ke.validateSpec,style:kr,styleSpec:ur})):Dr.push(new Ue(ln,tr[ln],`unknown property "${ln}"`));return Dr}({sourceName:F,value:A,style:R.style,styleSpec:W,validateSpec:fe}),Re;case"geojson":if(Re=ku({key:F,value:A,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:fe,objectElementValidators:qc}),A.cluster)for(let Ke in A.clusterProperties){let[ft,Rt]=A.clusterProperties[Ke],tr=typeof ft=="string"?[ft,["accumulated"],["get",Ke]]:ft;Re.push(...zc({key:`${F}.${Ke}.map`,value:Rt,validateSpec:fe,expressionContext:"cluster-map"})),Re.push(...zc({key:`${F}.${Ke}.reduce`,value:tr,validateSpec:fe,expressionContext:"cluster-reduce"}))}return Re;case"video":return ku({key:F,value:A,valueSpec:W.source_video,style:te,validateSpec:fe,styleSpec:W});case"image":return ku({key:F,value:A,valueSpec:W.source_image,style:te,validateSpec:fe,styleSpec:W});case"canvas":return[new Ue(F,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Wu({key:`${F}.type`,value:A.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:te,validateSpec:fe,styleSpec:W})}}function wl(R){let A=R.value,F=R.styleSpec,W=F.light,te=R.style,fe=[],pe=gs(A);if(A===void 0)return fe;if(pe!=="object")return fe=fe.concat([new Ue("light",A,`object expected, ${pe} found`)]),fe;for(let Re in A){let Ke=Re.match(/^(.*)-transition$/);fe=fe.concat(Ke&&W[Ke[1]]&&W[Ke[1]].transition?R.validateSpec({key:Re,value:A[Re],valueSpec:F.transition,validateSpec:R.validateSpec,style:te,styleSpec:F}):W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)])}return fe}function vu(R){let A=R.value,F=R.styleSpec,W=F.sky,te=R.style,fe=gs(A);if(A===void 0)return[];if(fe!=="object")return[new Ue("sky",A,`object expected, ${fe} found`)];let pe=[];for(let Re in A)pe=pe.concat(W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)]);return pe}function Oc(R){let A=R.value,F=R.styleSpec,W=F.terrain,te=R.style,fe=[],pe=gs(A);if(A===void 0)return fe;if(pe!=="object")return fe=fe.concat([new Ue("terrain",A,`object expected, ${pe} found`)]),fe;for(let Re in A)fe=fe.concat(W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)]);return fe}function cf(R){let A=[],F=R.value,W=R.key;if(Array.isArray(F)){let te=[],fe=[];for(let pe in F)F[pe].id&&te.includes(F[pe].id)&&A.push(new Ue(W,F,`all the sprites' ids must be unique, but ${F[pe].id} is duplicated`)),te.push(F[pe].id),F[pe].url&&fe.includes(F[pe].url)&&A.push(new Ue(W,F,`all the sprites' URLs must be unique, but ${F[pe].url} is duplicated`)),fe.push(F[pe].url),A=A.concat(ku({key:`${W}[${pe}]`,value:F[pe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return A}return Zu({key:W,value:F})}let fc={"*":()=>[],array:Xf,boolean:function(R){let A=R.value,F=R.key,W=gs(A);return W!=="boolean"?[new Ue(F,A,`boolean expected, ${W} found`)]:[]},number:Us,color:function(R){let A=R.key,F=R.value,W=gs(F);return W!=="string"?[new Ue(A,F,`color expected, ${W} found`)]:ir.parse(String(F))?[]:[new Ue(A,F,`color expected, "${F}" found`)]},constants:If,enum:Wu,filter:Rf,function:wf,layer:ah,object:ku,source:Tc,light:wl,sky:vu,terrain:Oc,projection:function(R){let A=R.value,F=R.styleSpec,W=F.projection,te=R.style,fe=gs(A);if(A===void 0)return[];if(fe!=="object")return[new Ue("projection",A,`object expected, ${fe} found`)];let pe=[];for(let Re in A)pe=pe.concat(W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)]);return pe},string:Zu,formatted:function(R){return Zu(R).length===0?[]:zc(R)},resolvedImage:function(R){return Zu(R).length===0?[]:zc(R)},padding:function(R){let A=R.key,F=R.value;if(gs(F)==="array"){if(F.length<1||F.length>4)return[new Ue(A,F,`padding requires 1 to 4 values; ${F.length} values found`)];let W={type:"number"},te=[];for(let fe=0;fe<F.length;fe++)te=te.concat(R.validateSpec({key:`${A}[${fe}]`,value:F[fe],validateSpec:R.validateSpec,valueSpec:W}));return te}return Us({key:A,value:F,valueSpec:{}})},variableAnchorOffsetCollection:function(R){let A=R.key,F=R.value,W=gs(F),te=R.styleSpec;if(W!=="array"||F.length<1||F.length%2!=0)return[new Ue(A,F,"variableAnchorOffsetCollection requires a non-empty array of even length")];let fe=[];for(let pe=0;pe<F.length;pe+=2)fe=fe.concat(Wu({key:`${A}[${pe}]`,value:F[pe],valueSpec:te.layout_symbol["text-anchor"]})),fe=fe.concat(Xf({key:`${A}[${pe+1}]`,value:F[pe+1],valueSpec:{length:2,value:"number"},validateSpec:R.validateSpec,style:R.style,styleSpec:te}));return fe},sprite:cf};function Bc(R){let A=R.value,F=R.valueSpec,W=R.styleSpec;return R.validateSpec=Bc,F.expression&&Wf(Cs(A))?wf(R):F.expression&&Dc(du(A))?zc(R):F.type&&fc[F.type]?fc[F.type](R):ku(Ae({},R,{valueSpec:F.type?W[F.type]:F}))}function kt(R){let A=R.value,F=R.key,W=Zu(R);return W.length||(A.indexOf("{fontstack}")===-1&&W.push(new Ue(F,A,'"glyphs" url must include a "{fontstack}" token')),A.indexOf("{range}")===-1&&W.push(new Ue(F,A,'"glyphs" url must include a "{range}" token'))),W}function Zt(R,A=ce){let F=[];return F=F.concat(Bc({key:"",value:R,valueSpec:A.$root,styleSpec:A,style:R,validateSpec:Bc,objectElementValidators:{glyphs:kt,"*":()=>[]}})),R.constants&&(F=F.concat(If({key:"constants",value:R.constants,style:R,styleSpec:A,validateSpec:Bc}))),xr(F)}function Mr(R){return function(A){return R(j1(_g({},A),{validateSpec:Bc}))}}function xr(R){return[].concat(R).sort((A,F)=>A.line-F.line)}function Kr(R){return function(...A){return xr(R.apply(this,A))}}Zt.source=Kr(Mr(Tc)),Zt.sprite=Kr(Mr(cf)),Zt.glyphs=Kr(Mr(kt)),Zt.light=Kr(Mr(wl)),Zt.sky=Kr(Mr(vu)),Zt.terrain=Kr(Mr(Oc)),Zt.layer=Kr(Mr(ah)),Zt.filter=Kr(Mr(Rf)),Zt.paintProperty=Kr(Mr(Zf)),Zt.layoutProperty=Kr(Mr(Wl));let Mi=Zt,Wi=Mi.light,dn=Mi.sky,wn=Mi.paintProperty,On=Mi.layoutProperty;function Yi(R,A){let F=!1;if(A&&A.length)for(let W of A)R.fire(new me(new Error(W.message))),F=!0;return F}class $i{constructor(A,F,W){let te=this.cells=[];if(A instanceof ArrayBuffer){this.arrayBuffer=A;let pe=new Int32Array(this.arrayBuffer);A=pe[0],this.d=(F=pe[1])+2*(W=pe[2]);for(let Ke=0;Ke<this.d*this.d;Ke++){let ft=pe[3+Ke],Rt=pe[3+Ke+1];te.push(ft===Rt?null:pe.subarray(ft,Rt))}let Re=pe[3+te.length+1];this.keys=pe.subarray(pe[3+te.length],Re),this.bboxes=pe.subarray(Re),this.insert=this._insertReadonly}else{this.d=F+2*W;for(let pe=0;pe<this.d*this.d;pe++)te.push([]);this.keys=[],this.bboxes=[]}this.n=F,this.extent=A,this.padding=W,this.scale=F/A,this.uid=0;let fe=W/F*A;this.min=-fe,this.max=A+fe}insert(A,F,W,te,fe){this._forEachCell(F,W,te,fe,this._insertCell,this.uid++,void 0,void 0),this.keys.push(A),this.bboxes.push(F),this.bboxes.push(W),this.bboxes.push(te),this.bboxes.push(fe)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(A,F,W,te,fe,pe){this.cells[fe].push(pe)}query(A,F,W,te,fe){let pe=this.min,Re=this.max;if(A<=pe&&F<=pe&&Re<=W&&Re<=te&&!fe)return Array.prototype.slice.call(this.keys);{let Ke=[];return this._forEachCell(A,F,W,te,this._queryCell,Ke,{},fe),Ke}}_queryCell(A,F,W,te,fe,pe,Re,Ke){let ft=this.cells[fe];if(ft!==null){let Rt=this.keys,tr=this.bboxes;for(let ur=0;ur<ft.length;ur++){let vr=ft[ur];if(Re[vr]===void 0){let kr=4*vr;(Ke?Ke(tr[kr+0],tr[kr+1],tr[kr+2],tr[kr+3]):A<=tr[kr+2]&&F<=tr[kr+3]&&W>=tr[kr+0]&&te>=tr[kr+1])?(Re[vr]=!0,pe.push(Rt[vr])):Re[vr]=!1}}}}_forEachCell(A,F,W,te,fe,pe,Re,Ke){let ft=this._convertToCellCoord(A),Rt=this._convertToCellCoord(F),tr=this._convertToCellCoord(W),ur=this._convertToCellCoord(te);for(let vr=ft;vr<=tr;vr++)for(let kr=Rt;kr<=ur;kr++){let Dr=this.d*kr+vr;if((!Ke||Ke(this._convertFromCellCoord(vr),this._convertFromCellCoord(kr),this._convertFromCellCoord(vr+1),this._convertFromCellCoord(kr+1)))&&fe.call(this,A,F,W,te,Dr,pe,Re,Ke))return}}_convertFromCellCoord(A){return(A-this.padding)/this.scale}_convertToCellCoord(A){return Math.max(0,Math.min(this.d-1,Math.floor(A*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let A=this.cells,F=3+this.cells.length+1+1,W=0;for(let pe=0;pe<this.cells.length;pe++)W+=this.cells[pe].length;let te=new Int32Array(F+W+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let fe=F;for(let pe=0;pe<A.length;pe++){let Re=A[pe];te[3+pe]=fe,te.set(Re,fe),fe+=Re.length}return te[3+A.length]=fe,te.set(this.keys,fe),fe+=this.keys.length,te[3+A.length+1]=fe,te.set(this.bboxes,fe),fe+=this.bboxes.length,te.buffer}static serialize(A,F){let W=A.toArrayBuffer();return F&&F.push(W),{buffer:W}}static deserialize(A){return new $i(A.buffer)}}let an={};function Fi(R,A,F={}){if(an[R])throw new Error(`${R} is already registered.`);Object.defineProperty(A,"_classRegistryKey",{value:R,writeable:!1}),an[R]={klass:A,omit:F.omit||[],shallow:F.shallow||[]}}Fi("Object",Object),Fi("TransferableGridIndex",$i),Fi("Color",ir),Fi("Error",Error),Fi("AJAXError",ge),Fi("ResolvedImage",en),Fi("StylePropertyFunction",nl),Fi("StyleExpression",Eu,{omit:["_evaluator"]}),Fi("ZoomDependentExpression",hu),Fi("ZoomConstantExpression",bc),Fi("CompoundExpression",Bl,{omit:["_evaluate"]});for(let R in yf)yf[R]._classRegistryKey||Fi(`Expression_${R}`,yf[R]);function ta(R){return R&&typeof ArrayBuffer!="undefined"&&(R instanceof ArrayBuffer||R.constructor&&R.constructor.name==="ArrayBuffer")}function Ca(R){return R.$name||R.constructor._classRegistryKey}function Ra(R){return!function(A){if(A===null||typeof A!="object")return!1;let F=Ca(A);return!(!F||F==="Object")}(R)&&(R==null||typeof R=="boolean"||typeof R=="number"||typeof R=="string"||R instanceof Boolean||R instanceof Number||R instanceof String||R instanceof Date||R instanceof RegExp||R instanceof Blob||R instanceof Error||ta(R)||G(R)||ArrayBuffer.isView(R)||R instanceof ImageData)}function La(R,A){if(Ra(R))return(ta(R)||G(R))&&A&&A.push(R),ArrayBuffer.isView(R)&&A&&A.push(R.buffer),R instanceof ImageData&&A&&A.push(R.data.buffer),R;if(Array.isArray(R)){let fe=[];for(let pe of R)fe.push(La(pe,A));return fe}if(typeof R!="object")throw new Error("can't serialize object of type "+typeof R);let F=Ca(R);if(!F)throw new Error(`can't serialize object of unregistered class ${R.constructor.name}`);if(!an[F])throw new Error(`${F} is not registered.`);let{klass:W}=an[F],te=W.serialize?W.serialize(R,A):{};if(W.serialize){if(A&&te===A[A.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(let fe in R){if(!R.hasOwnProperty(fe)||an[F].omit.indexOf(fe)>=0)continue;let pe=R[fe];te[fe]=an[F].shallow.indexOf(fe)>=0?pe:La(pe,A)}R instanceof Error&&(te.message=R.message)}if(te.$name)throw new Error("$name property is reserved for worker serialization logic.");return F!=="Object"&&(te.$name=F),te}function Na(R){if(Ra(R))return R;if(Array.isArray(R))return R.map(Na);if(typeof R!="object")throw new Error("can't deserialize object of type "+typeof R);let A=Ca(R)||"Object";if(!an[A])throw new Error(`can't deserialize unregistered class ${A}`);let{klass:F}=an[A];if(!F)throw new Error(`can't deserialize unregistered class ${A}`);if(F.deserialize)return F.deserialize(R);let W=Object.create(F.prototype);for(let te of Object.keys(R)){if(te==="$name")continue;let fe=R[te];W[te]=an[A].shallow.indexOf(te)>=0?fe:Na(fe)}return W}class Zn{constructor(){this.first=!0}update(A,F){let W=Math.floor(A);return this.first?(this.first=!1,this.lastIntegerZoom=W,this.lastIntegerZoomTime=0,this.lastZoom=A,this.lastFloorZoom=W,!0):(this.lastFloorZoom>W?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=F):this.lastFloorZoom<W&&(this.lastIntegerZoom=W,this.lastIntegerZoomTime=F),A!==this.lastZoom&&(this.lastZoom=A,this.lastFloorZoom=W,!0))}}let Dn={"Latin-1 Supplement":R=>R>=128&&R<=255,"Hangul Jamo":R=>R>=4352&&R<=4607,Khmer:R=>R>=6016&&R<=6143,"General Punctuation":R=>R>=8192&&R<=8303,"Letterlike Symbols":R=>R>=8448&&R<=8527,"Number Forms":R=>R>=8528&&R<=8591,"Miscellaneous Technical":R=>R>=8960&&R<=9215,"Control Pictures":R=>R>=9216&&R<=9279,"Optical Character Recognition":R=>R>=9280&&R<=9311,"Enclosed Alphanumerics":R=>R>=9312&&R<=9471,"Geometric Shapes":R=>R>=9632&&R<=9727,"Miscellaneous Symbols":R=>R>=9728&&R<=9983,"Miscellaneous Symbols and Arrows":R=>R>=11008&&R<=11263,"Ideographic Description Characters":R=>R>=12272&&R<=12287,"CJK Symbols and Punctuation":R=>R>=12288&&R<=12351,Katakana:R=>R>=12448&&R<=12543,Kanbun:R=>R>=12688&&R<=12703,"CJK Strokes":R=>R>=12736&&R<=12783,"Enclosed CJK Letters and Months":R=>R>=12800&&R<=13055,"CJK Compatibility":R=>R>=13056&&R<=13311,"Yijing Hexagram Symbols":R=>R>=19904&&R<=19967,"Private Use Area":R=>R>=57344&&R<=63743,"Vertical Forms":R=>R>=65040&&R<=65055,"CJK Compatibility Forms":R=>R>=65072&&R<=65103,"Small Form Variants":R=>R>=65104&&R<=65135,"Halfwidth and Fullwidth Forms":R=>R>=65280&&R<=65519};function Ka(R){for(let A of R)if(Ho(A.charCodeAt(0)))return!0;return!1}function bo(R){for(let A of R)if(!as(A.charCodeAt(0)))return!1;return!0}function Zo(R){let A=R.map(F=>{try{return new RegExp(`\\p{sc=${F}}`,"u").source}catch(W){return null}}).filter(F=>F);return new RegExp(A.join("|"),"u")}let Ss=Zo(["Arab","Dupl","Mong","Ougr","Syrc"]);function as(R){return!Ss.test(String.fromCodePoint(R))}let ws=Zo(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ho(R){return!(R!==746&&R!==747&&(R<4352||!(Dn["CJK Compatibility Forms"](R)&&!(R>=65097&&R<=65103)||Dn["CJK Compatibility"](R)||Dn["CJK Strokes"](R)||!(!Dn["CJK Symbols and Punctuation"](R)||R>=12296&&R<=12305||R>=12308&&R<=12319||R===12336)||Dn["Enclosed CJK Letters and Months"](R)||Dn["Ideographic Description Characters"](R)||Dn.Kanbun(R)||Dn.Katakana(R)&&R!==12540||!(!Dn["Halfwidth and Fullwidth Forms"](R)||R===65288||R===65289||R===65293||R>=65306&&R<=65310||R===65339||R===65341||R===65343||R>=65371&&R<=65503||R===65507||R>=65512&&R<=65519)||!(!Dn["Small Form Variants"](R)||R>=65112&&R<=65118||R>=65123&&R<=65126)||Dn["Vertical Forms"](R)||Dn["Yijing Hexagram Symbols"](R)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(R))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(R))||ws.test(String.fromCodePoint(R)))))}function ml(R){return!(Ho(R)||function(A){return!!(Dn["Latin-1 Supplement"](A)&&(A===167||A===169||A===174||A===177||A===188||A===189||A===190||A===215||A===247)||Dn["General Punctuation"](A)&&(A===8214||A===8224||A===8225||A===8240||A===8241||A===8251||A===8252||A===8258||A===8263||A===8264||A===8265||A===8273)||Dn["Letterlike Symbols"](A)||Dn["Number Forms"](A)||Dn["Miscellaneous Technical"](A)&&(A>=8960&&A<=8967||A>=8972&&A<=8991||A>=8996&&A<=9e3||A===9003||A>=9085&&A<=9114||A>=9150&&A<=9165||A===9167||A>=9169&&A<=9179||A>=9186&&A<=9215)||Dn["Control Pictures"](A)&&A!==9251||Dn["Optical Character Recognition"](A)||Dn["Enclosed Alphanumerics"](A)||Dn["Geometric Shapes"](A)||Dn["Miscellaneous Symbols"](A)&&!(A>=9754&&A<=9759)||Dn["Miscellaneous Symbols and Arrows"](A)&&(A>=11026&&A<=11055||A>=11088&&A<=11097||A>=11192&&A<=11243)||Dn["CJK Symbols and Punctuation"](A)||Dn.Katakana(A)||Dn["Private Use Area"](A)||Dn["CJK Compatibility Forms"](A)||Dn["Small Form Variants"](A)||Dn["Halfwidth and Fullwidth Forms"](A)||A===8734||A===8756||A===8757||A>=9984&&A<=10087||A>=10102&&A<=10131||A===65532||A===65533)}(R))}let Ws=Zo(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Ls(R){return Ws.test(String.fromCodePoint(R))}function va(R,A){return!(!A&&Ls(R)||R>=2304&&R<=3583||R>=3840&&R<=4255||Dn.Khmer(R))}function no(R){for(let A of R)if(Ls(A.charCodeAt(0)))return!0;return!1}let ys=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class rs{constructor(A,F){this.zoom=A,F?(this.now=F.now,this.fadeDuration=F.fadeDuration,this.zoomHistory=F.zoomHistory,this.transition=F.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Zn,this.transition={})}isSupportedScript(A){return function(F,W){for(let te of F)if(!va(te.charCodeAt(0),W))return!1;return!0}(A,ys.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let A=this.zoom,F=A-Math.floor(A),W=this.crossFadingFactor();return A>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:F+(1-F)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*F}}}class Ql{constructor(A,F){this.property=A,this.value=F,this.expression=function(W,te){if(Wf(W))return new nl(W,te);if(Dc(W)){let fe=_u(W,te);if(fe.result==="error")throw new Error(fe.value.map(pe=>`${pe.key}: ${pe.message}`).join(", "));return fe.value}{let fe=W;return te.type==="color"&&typeof W=="string"?fe=ir.parse(W):te.type!=="padding"||typeof W!="number"&&!Array.isArray(W)?te.type==="variableAnchorOffsetCollection"&&Array.isArray(W)&&(fe=Zi.parse(W)):fe=$r.parse(W),{kind:"constant",evaluate:()=>fe}}}(F===void 0?A.specification.default:F,A.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(A,F,W){return this.property.possiblyEvaluate(this,A,F,W)}}class Cu{constructor(A){this.property=A,this.value=new Ql(A,void 0)}transitioned(A,F){return new Nc(this.property,this.value,F,L({},A.transition,this.transition),A.now)}untransitioned(){return new Nc(this.property,this.value,null,{},0)}}class Yu{constructor(A){this._properties=A,this._values=Object.create(A.defaultTransitionablePropertyValues)}getValue(A){return g(this._values[A].value.value)}setValue(A,F){Object.prototype.hasOwnProperty.call(this._values,A)||(this._values[A]=new Cu(this._values[A].property)),this._values[A].value=new Ql(this._values[A].property,F===null?void 0:g(F))}getTransition(A){return g(this._values[A].transition)}setTransition(A,F){Object.prototype.hasOwnProperty.call(this._values,A)||(this._values[A]=new Cu(this._values[A].property)),this._values[A].transition=g(F)||void 0}serialize(){let A={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(A[F]=W);let te=this.getTransition(F);te!==void 0&&(A[`${F}-transition`]=te)}return A}transitioned(A,F){let W=new pu(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(A,F._values[te]);return W}untransitioned(){let A=new pu(this._properties);for(let F of Object.keys(this._values))A._values[F]=this._values[F].untransitioned();return A}}class Nc{constructor(A,F,W,te,fe){this.property=A,this.value=F,this.begin=fe+te.delay||0,this.end=this.begin+te.duration||0,A.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(A,F,W){let te=A.now||0,fe=this.value.possiblyEvaluate(A,F,W),pe=this.prior;if(pe){if(te>this.end)return this.prior=null,fe;if(this.value.isDataDriven())return this.prior=null,fe;if(te<this.begin)return pe.possiblyEvaluate(A,F,W);{let Re=(te-this.begin)/(this.end-this.begin);return this.property.interpolate(pe.possiblyEvaluate(A,F,W),fe,function(Ke){if(Ke<=0)return 0;if(Ke>=1)return 1;let ft=Ke*Ke,Rt=ft*Ke;return 4*(Ke<.5?Rt:3*(Ke-ft)+Rt-.75)}(Re))}}return fe}}class pu{constructor(A){this._properties=A,this._values=Object.create(A.defaultTransitioningPropertyValues)}possiblyEvaluate(A,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(A,F,W);return te}hasTransition(){for(let A of Object.keys(this._values))if(this._values[A].prior)return!0;return!1}}class Uc{constructor(A){this._properties=A,this._values=Object.create(A.defaultPropertyValues)}hasValue(A){return this._values[A].value!==void 0}getValue(A){return g(this._values[A].value)}setValue(A,F){this._values[A]=new Ql(this._values[A].property,F===null?void 0:g(F))}serialize(){let A={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(A[F]=W)}return A}possiblyEvaluate(A,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(A,F,W);return te}}class xu{constructor(A,F,W){this.property=A,this.value=F,this.parameters=W}isConstant(){return this.value.kind==="constant"}constantOr(A){return this.value.kind==="constant"?this.value.value:A}evaluate(A,F,W,te){return this.property.evaluate(this.value,this.parameters,A,F,W,te)}}class Ac{constructor(A){this._properties=A,this._values=Object.create(A.defaultPossiblyEvaluatedValues)}get(A){return this._values[A]}}class Ua{constructor(A){this.specification=A}possiblyEvaluate(A,F){if(A.isDataDriven())throw new Error("Value should not be data driven");return A.expression.evaluate(F)}interpolate(A,F,W){let te=Lo[this.specification.type];return te?te(A,F,W):A}}class oo{constructor(A,F){this.specification=A,this.overrides=F}possiblyEvaluate(A,F,W,te){return new xu(this,A.expression.kind==="constant"||A.expression.kind==="camera"?{kind:"constant",value:A.expression.evaluate(F,null,{},W,te)}:A.expression,F)}interpolate(A,F,W){if(A.value.kind!=="constant"||F.value.kind!=="constant")return A;if(A.value.value===void 0||F.value.value===void 0)return new xu(this,{kind:"constant",value:void 0},A.parameters);let te=Lo[this.specification.type];if(te){let fe=te(A.value.value,F.value.value,W);return new xu(this,{kind:"constant",value:fe},A.parameters)}return A}evaluate(A,F,W,te,fe,pe){return A.kind==="constant"?A.value:A.evaluate(F,W,te,fe,pe)}}class Vc extends oo{possiblyEvaluate(A,F,W,te){if(A.value===void 0)return new xu(this,{kind:"constant",value:void 0},F);if(A.expression.kind==="constant"){let fe=A.expression.evaluate(F,null,{},W,te),pe=A.property.specification.type==="resolvedImage"&&typeof fe!="string"?fe.name:fe,Re=this._calculate(pe,pe,pe,F);return new xu(this,{kind:"constant",value:Re},F)}if(A.expression.kind==="camera"){let fe=this._calculate(A.expression.evaluate({zoom:F.zoom-1}),A.expression.evaluate({zoom:F.zoom}),A.expression.evaluate({zoom:F.zoom+1}),F);return new xu(this,{kind:"constant",value:fe},F)}return new xu(this,A.expression,F)}evaluate(A,F,W,te,fe,pe){if(A.kind==="source"){let Re=A.evaluate(F,W,te,fe,pe);return this._calculate(Re,Re,Re,F)}return A.kind==="composite"?this._calculate(A.evaluate({zoom:Math.floor(F.zoom)-1},W,te),A.evaluate({zoom:Math.floor(F.zoom)},W,te),A.evaluate({zoom:Math.floor(F.zoom)+1},W,te),F):A.value}_calculate(A,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:A,to:F}:{from:W,to:F}}interpolate(A){return A}}class hc{constructor(A){this.specification=A}possiblyEvaluate(A,F,W,te){if(A.value!==void 0){if(A.expression.kind==="constant"){let fe=A.expression.evaluate(F,null,{},W,te);return this._calculate(fe,fe,fe,F)}return this._calculate(A.expression.evaluate(new rs(Math.floor(F.zoom-1),F)),A.expression.evaluate(new rs(Math.floor(F.zoom),F)),A.expression.evaluate(new rs(Math.floor(F.zoom+1),F)),F)}}_calculate(A,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:A,to:F}:{from:W,to:F}}interpolate(A){return A}}class Ku{constructor(A){this.specification=A}possiblyEvaluate(A,F,W,te){return!!A.expression.evaluate(F,null,{},W,te)}interpolate(){return!1}}class ue{constructor(A){this.properties=A,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let F in A){let W=A[F];W.specification.overridable&&this.overridableProperties.push(F);let te=this.defaultPropertyValues[F]=new Ql(W,void 0),fe=this.defaultTransitionablePropertyValues[F]=new Cu(W);this.defaultTransitioningPropertyValues[F]=fe.untransitioned(),this.defaultPossiblyEvaluatedValues[F]=te.possiblyEvaluate({})}}}Fi("DataDrivenProperty",oo),Fi("DataConstantProperty",Ua),Fi("CrossFadedDataDrivenProperty",Vc),Fi("CrossFadedProperty",hc),Fi("ColorRampProperty",Ku);let w="-transition";class B extends Pe{constructor(A,F){if(super(),this.id=A.id,this.type=A.type,this._featureFilter={filter:()=>!0,needGeometry:!1},A.type!=="custom"&&(this.metadata=A.metadata,this.minzoom=A.minzoom,this.maxzoom=A.maxzoom,A.type!=="background"&&(this.source=A.source,this.sourceLayer=A["source-layer"],this.filter=A.filter),F.layout&&(this._unevaluatedLayout=new Uc(F.layout)),F.paint)){this._transitionablePaint=new Yu(F.paint);for(let W in A.paint)this.setPaintProperty(W,A.paint[W],{validate:!1});for(let W in A.layout)this.setLayoutProperty(W,A.layout[W],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ac(F.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(A){return A==="visibility"?this.visibility:this._unevaluatedLayout.getValue(A)}setLayoutProperty(A,F,W={}){F!=null&&this._validate(On,`layers.${this.id}.layout.${A}`,A,F,W)||(A!=="visibility"?this._unevaluatedLayout.setValue(A,F):this.visibility=F)}getPaintProperty(A){return A.endsWith(w)?this._transitionablePaint.getTransition(A.slice(0,-11)):this._transitionablePaint.getValue(A)}setPaintProperty(A,F,W={}){if(F!=null&&this._validate(wn,`layers.${this.id}.paint.${A}`,A,F,W))return!1;if(A.endsWith(w))return this._transitionablePaint.setTransition(A.slice(0,-11),F||void 0),!1;{let te=this._transitionablePaint._values[A],fe=te.property.specification["property-type"]==="cross-faded-data-driven",pe=te.value.isDataDriven(),Re=te.value;this._transitionablePaint.setValue(A,F),this._handleSpecialPaintPropertyUpdate(A);let Ke=this._transitionablePaint._values[A].value;return Ke.isDataDriven()||pe||fe||this._handleOverridablePaintPropertyUpdate(A,Re,Ke)}}_handleSpecialPaintPropertyUpdate(A){}_handleOverridablePaintPropertyUpdate(A,F,W){return!1}isHidden(A){return!!(this.minzoom&&A<this.minzoom)||!!(this.maxzoom&&A>=this.maxzoom)||this.visibility==="none"}updateTransitions(A){this._transitioningPaint=this._transitionablePaint.transitioned(A,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(A,F){A.getCrossfadeParameters&&(this._crossfadeParameters=A.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(A,void 0,F)),this.paint=this._transitioningPaint.possiblyEvaluate(A,void 0,F)}serialize(){let A={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&&(A.layout=A.layout||{},A.layout.visibility=this.visibility),S(A,(F,W)=>!(F===void 0||W==="layout"&&!Object.keys(F).length||W==="paint"&&!Object.keys(F).length))}_validate(A,F,W,te,fe={}){return(!fe||fe.validate!==!1)&&Yi(this,A.call(Mi,{key:F,layerType:this.type,objectKey:W,value:te,styleSpec:ce,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let A in this.paint._values){let F=this.paint.get(A);if(F instanceof xu&&Nl(F.property.specification)&&(F.value.kind==="source"||F.value.kind==="composite")&&F.value.isStateDependent)return!0}return!1}}let Q={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ee{constructor(A,F){this._structArray=A,this._pos1=F*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class le{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(A,F){return A._trim(),F&&(A.isTransferred=!0,F.push(A.arrayBuffer)),{length:A.length,arrayBuffer:A.arrayBuffer}}static deserialize(A){let F=Object.create(this.prototype);return F.arrayBuffer=A.arrayBuffer,F.length=A.length,F.capacity=A.arrayBuffer.byteLength/F.bytesPerElement,F._refreshViews(),F}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(A){this.reserve(A),this.length=A}reserve(A){if(A>this.capacity){this.capacity=Math.max(A,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let F=this.uint8;this._refreshViews(),F&&this.uint8.set(F)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ze(R,A=1){let F=0,W=0;return{members:R.map(te=>{let fe=Q[te.type].BYTES_PER_ELEMENT,pe=F=Ze(F,Math.max(A,fe)),Re=te.components||1;return W=Math.max(W,fe),F+=fe*Re,{name:te.name,type:te.type,components:Re,offset:pe}}),size:Ze(F,Math.max(W,A)),alignment:A}}function Ze(R,A){return Math.ceil(R/A)*A}class ut extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let te=2*A;return this.int16[te+0]=F,this.int16[te+1]=W,A}}ut.prototype.bytesPerElement=4,Fi("StructArrayLayout2i4",ut);class Mt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.int16[fe+0]=F,this.int16[fe+1]=W,this.int16[fe+2]=te,A}}Mt.prototype.bytesPerElement=6,Fi("StructArrayLayout3i6",Mt);class Jt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,A,F,W,te)}emplace(A,F,W,te,fe){let pe=4*A;return this.int16[pe+0]=F,this.int16[pe+1]=W,this.int16[pe+2]=te,this.int16[pe+3]=fe,A}}Jt.prototype.bytesPerElement=8,Fi("StructArrayLayout4i8",Jt);class $t extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=6*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=Re,A}}$t.prototype.bytesPerElement=12,Fi("StructArrayLayout2i4i12",$t);class mr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=4*A,ft=8*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.uint8[ft+4]=te,this.uint8[ft+5]=fe,this.uint8[ft+6]=pe,this.uint8[ft+7]=Re,A}}mr.prototype.bytesPerElement=8,Fi("StructArrayLayout2i4ub8",mr);class Cr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let te=2*A;return this.float32[te+0]=F,this.float32[te+1]=W,A}}Cr.prototype.bytesPerElement=8,Fi("StructArrayLayout2f8",Cr);class ve extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft,Rt){let tr=this.length;return this.resize(tr+1),this.emplace(tr,A,F,W,te,fe,pe,Re,Ke,ft,Rt)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr){let ur=10*A;return this.uint16[ur+0]=F,this.uint16[ur+1]=W,this.uint16[ur+2]=te,this.uint16[ur+3]=fe,this.uint16[ur+4]=pe,this.uint16[ur+5]=Re,this.uint16[ur+6]=Ke,this.uint16[ur+7]=ft,this.uint16[ur+8]=Rt,this.uint16[ur+9]=tr,A}}ve.prototype.bytesPerElement=20,Fi("StructArrayLayout10ui20",ve);class xe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur){let vr=this.length;return this.resize(vr+1),this.emplace(vr,A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr){let kr=12*A;return this.int16[kr+0]=F,this.int16[kr+1]=W,this.int16[kr+2]=te,this.int16[kr+3]=fe,this.uint16[kr+4]=pe,this.uint16[kr+5]=Re,this.uint16[kr+6]=Ke,this.uint16[kr+7]=ft,this.int16[kr+8]=Rt,this.int16[kr+9]=tr,this.int16[kr+10]=ur,this.int16[kr+11]=vr,A}}xe.prototype.bytesPerElement=24,Fi("StructArrayLayout4i4ui4i24",xe);class Ie extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.float32[fe+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,A}}Ie.prototype.bytesPerElement=12,Fi("StructArrayLayout3f12",Ie);class qe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.uint32[1*A+0]=F,A}}qe.prototype.bytesPerElement=4,Fi("StructArrayLayout1ul4",qe);class Qe 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(A,F,W,te,fe,pe,Re,Ke,ft){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,A,F,W,te,fe,pe,Re,Ke,ft)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt){let tr=10*A,ur=5*A;return this.int16[tr+0]=F,this.int16[tr+1]=W,this.int16[tr+2]=te,this.int16[tr+3]=fe,this.int16[tr+4]=pe,this.int16[tr+5]=Re,this.uint32[ur+3]=Ke,this.uint16[tr+8]=ft,this.uint16[tr+9]=Rt,A}}Qe.prototype.bytesPerElement=20,Fi("StructArrayLayout6i1ul2ui20",Qe);class Xe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=6*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=Re,A}}Xe.prototype.bytesPerElement=12,Fi("StructArrayLayout2i2i2i12",Xe);class nt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe){let pe=this.length;return this.resize(pe+1),this.emplace(pe,A,F,W,te,fe)}emplace(A,F,W,te,fe,pe){let Re=4*A,Ke=8*A;return this.float32[Re+0]=F,this.float32[Re+1]=W,this.float32[Re+2]=te,this.int16[Ke+6]=fe,this.int16[Ke+7]=pe,A}}nt.prototype.bytesPerElement=16,Fi("StructArrayLayout2f1f2i16",nt);class qt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=16*A,ft=4*A,Rt=8*A;return this.uint8[Ke+0]=F,this.uint8[Ke+1]=W,this.float32[ft+1]=te,this.float32[ft+2]=fe,this.int16[Rt+6]=pe,this.int16[Rt+7]=Re,A}}qt.prototype.bytesPerElement=16,Fi("StructArrayLayout2ub2f2i16",qt);class jt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.uint16[fe+0]=F,this.uint16[fe+1]=W,this.uint16[fe+2]=te,A}}jt.prototype.bytesPerElement=6,Fi("StructArrayLayout3ui6",jt);class ar 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(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi){let vn=this.length;return this.resize(vn+1),this.emplace(vn,A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi,vn){let zi=24*A,ln=12*A,Tn=48*A;return this.int16[zi+0]=F,this.int16[zi+1]=W,this.uint16[zi+2]=te,this.uint16[zi+3]=fe,this.uint32[ln+2]=pe,this.uint32[ln+3]=Re,this.uint32[ln+4]=Ke,this.uint16[zi+10]=ft,this.uint16[zi+11]=Rt,this.uint16[zi+12]=tr,this.float32[ln+7]=ur,this.float32[ln+8]=vr,this.uint8[Tn+36]=kr,this.uint8[Tn+37]=Dr,this.uint8[Tn+38]=li,this.uint32[ln+10]=pi,this.int16[zi+22]=vn,A}}ar.prototype.bytesPerElement=48,Fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ar);class fr 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(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi,vn,zi,ln,Tn,pa,ro,Vo,Xa,la,Mo,fo){let lo=this.length;return this.resize(lo+1),this.emplace(lo,A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi,vn,zi,ln,Tn,pa,ro,Vo,Xa,la,Mo,fo)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi,vn,zi,ln,Tn,pa,ro,Vo,Xa,la,Mo,fo,lo){let Wn=32*A,Ro=16*A;return this.int16[Wn+0]=F,this.int16[Wn+1]=W,this.int16[Wn+2]=te,this.int16[Wn+3]=fe,this.int16[Wn+4]=pe,this.int16[Wn+5]=Re,this.int16[Wn+6]=Ke,this.int16[Wn+7]=ft,this.uint16[Wn+8]=Rt,this.uint16[Wn+9]=tr,this.uint16[Wn+10]=ur,this.uint16[Wn+11]=vr,this.uint16[Wn+12]=kr,this.uint16[Wn+13]=Dr,this.uint16[Wn+14]=li,this.uint16[Wn+15]=pi,this.uint16[Wn+16]=vn,this.uint16[Wn+17]=zi,this.uint16[Wn+18]=ln,this.uint16[Wn+19]=Tn,this.uint16[Wn+20]=pa,this.uint16[Wn+21]=ro,this.uint16[Wn+22]=Vo,this.uint32[Ro+12]=Xa,this.float32[Ro+13]=la,this.float32[Ro+14]=Mo,this.uint16[Wn+30]=fo,this.uint16[Wn+31]=lo,A}}fr.prototype.bytesPerElement=64,Fi("StructArrayLayout8i15ui1ul2f2ui64",fr);class br extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.float32[1*A+0]=F,A}}br.prototype.bytesPerElement=4,Fi("StructArrayLayout1f4",br);class Fr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.uint16[6*A+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,A}}Fr.prototype.bytesPerElement=12,Fi("StructArrayLayout1ui2f12",Fr);class Hr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=4*A;return this.uint32[2*A+0]=F,this.uint16[fe+2]=W,this.uint16[fe+3]=te,A}}Hr.prototype.bytesPerElement=8,Fi("StructArrayLayout1ul2ui8",Hr);class ri extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let te=2*A;return this.uint16[te+0]=F,this.uint16[te+1]=W,A}}ri.prototype.bytesPerElement=4,Fi("StructArrayLayout2ui4",ri);class Ci extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.uint16[1*A+0]=F,A}}Ci.prototype.bytesPerElement=2,Fi("StructArrayLayout1ui2",Ci);class cn extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,A,F,W,te)}emplace(A,F,W,te,fe){let pe=4*A;return this.float32[pe+0]=F,this.float32[pe+1]=W,this.float32[pe+2]=te,this.float32[pe+3]=fe,A}}cn.prototype.bytesPerElement=16,Fi("StructArrayLayout4f16",cn);class sn extends ee{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new u(this.anchorPointX,this.anchorPointY)}}sn.prototype.size=20;class Ln extends Qe{get(A){return new sn(this,A)}}Fi("CollisionBoxArray",Ln);class Yn 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(A){this._structArray.uint8[this._pos1+37]=A}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(A){this._structArray.uint8[this._pos1+38]=A}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(A){this._structArray.uint32[this._pos4+10]=A}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Yn.prototype.size=48;class Aa extends ar{get(A){return new Yn(this,A)}}Fi("PlacedSymbolArray",Aa);class fa extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(A){this._structArray.uint32[this._pos4+12]=A}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}fa.prototype.size=64;class $a extends fr{get(A){return new fa(this,A)}}Fi("SymbolInstanceArray",$a);class Co extends br{getoffsetX(A){return this.float32[1*A+0]}}Fi("GlyphOffsetArray",Co);class Qa extends Mt{getx(A){return this.int16[3*A+0]}gety(A){return this.int16[3*A+1]}gettileUnitDistanceFromAnchor(A){return this.int16[3*A+2]}}Fi("SymbolLineVertexArray",Qa);class mo extends ee{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}mo.prototype.size=12;class Bo extends Fr{get(A){return new mo(this,A)}}Fi("TextAnchorOffsetArray",Bo);class Ps extends ee{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Ps.prototype.size=8;class Ts extends Hr{get(A){return new Ps(this,A)}}Fi("FeatureIndexArray",Ts);class wo extends ut{}class To extends ut{}class hl extends ut{}class Ul extends $t{}class Lu extends mr{}class au extends Cr{}class Js extends ve{}class eu extends xe{}class dc extends Ie{}class Tl extends qe{}class Al extends Xe{}class X extends qt{}class se extends jt{}class Te extends ri{}let Oe=ze([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ve}=Oe;class Ye{constructor(A=[]){this.segments=A}prepareSegment(A,F,W,te){let fe=this.segments[this.segments.length-1];return A>Ye.MAX_VERTEX_ARRAY_LENGTH&&E(`Max vertices per segment is ${Ye.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${A}`),(!fe||fe.vertexLength+A>Ye.MAX_VERTEX_ARRAY_LENGTH||fe.sortKey!==te)&&(fe={vertexOffset:F.length,primitiveOffset:W.length,vertexLength:0,primitiveLength:0},te!==void 0&&(fe.sortKey=te),this.segments.push(fe)),fe}get(){return this.segments}destroy(){for(let A of this.segments)for(let F in A.vaos)A.vaos[F].destroy()}static simpleSegment(A,F,W,te){return new Ye([{vertexOffset:A,primitiveOffset:F,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function Pt(R,A){return 256*(R=M(Math.floor(R),0,255))+M(Math.floor(A),0,255)}Ye.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Fi("SegmentVector",Ye);let at=ze([{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 Wt={exports:{}},dr={exports:{}};dr.exports=function(R,A){var F,W,te,fe,pe,Re,Ke,ft;for(W=R.length-(F=3&R.length),te=A,pe=3432918353,Re=461845907,ft=0;ft<W;)Ke=255&R.charCodeAt(ft)|(255&R.charCodeAt(++ft))<<8|(255&R.charCodeAt(++ft))<<16|(255&R.charCodeAt(++ft))<<24,++ft,te=27492+(65535&(fe=5*(65535&(te=(te^=Ke=(65535&(Ke=(Ke=(65535&Ke)*pe+(((Ke>>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*Re+(((Ke>>>16)*Re&65535)<<16)&4294967295)<<13|te>>>19))+((5*(te>>>16)&65535)<<16)&4294967295))+((58964+(fe>>>16)&65535)<<16);switch(Ke=0,F){case 3:Ke^=(255&R.charCodeAt(ft+2))<<16;case 2:Ke^=(255&R.charCodeAt(ft+1))<<8;case 1:te^=Ke=(65535&(Ke=(Ke=(65535&(Ke^=255&R.charCodeAt(ft)))*pe+(((Ke>>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*Re+(((Ke>>>16)*Re&65535)<<16)&4294967295}return te^=R.length,te=2246822507*(65535&(te^=te>>>16))+((2246822507*(te>>>16)&65535)<<16)&4294967295,te=3266489909*(65535&(te^=te>>>13))+((3266489909*(te>>>16)&65535)<<16)&4294967295,(te^=te>>>16)>>>0};var pr=dr.exports,Ur={exports:{}};Ur.exports=function(R,A){for(var F,W=R.length,te=A^W,fe=0;W>=4;)F=1540483477*(65535&(F=255&R.charCodeAt(fe)|(255&R.charCodeAt(++fe))<<8|(255&R.charCodeAt(++fe))<<16|(255&R.charCodeAt(++fe))<<24))+((1540483477*(F>>>16)&65535)<<16),te=1540483477*(65535&te)+((1540483477*(te>>>16)&65535)<<16)^(F=1540483477*(65535&(F^=F>>>24))+((1540483477*(F>>>16)&65535)<<16)),W-=4,++fe;switch(W){case 3:te^=(255&R.charCodeAt(fe+2))<<16;case 2:te^=(255&R.charCodeAt(fe+1))<<8;case 1:te=1540483477*(65535&(te^=255&R.charCodeAt(fe)))+((1540483477*(te>>>16)&65535)<<16)}return te=1540483477*(65535&(te^=te>>>13))+((1540483477*(te>>>16)&65535)<<16),(te^=te>>>15)>>>0};var zr=pr,gi=Ur.exports;Wt.exports=zr,Wt.exports.murmur3=zr,Wt.exports.murmur2=gi;var xi=o(Wt.exports);class Wr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(A,F,W,te){this.ids.push(ii(A)),this.positions.push(F,W,te)}getPositions(A){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let F=ii(A),W=0,te=this.ids.length-1;for(;W<te;){let pe=W+te>>1;this.ids[pe]>=F?te=pe:W=pe+1}let fe=[];for(;this.ids[W]===F;)fe.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return fe}static serialize(A,F){let W=new Float64Array(A.ids),te=new Uint32Array(A.positions);return di(W,te,0,W.length-1),F&&F.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(A){let F=new Wr;return F.ids=A.ids,F.positions=A.positions,F.indexed=!0,F}}function ii(R){let A=+R;return!isNaN(A)&&A<=Number.MAX_SAFE_INTEGER?A:xi(String(R))}function di(R,A,F,W){for(;F<W;){let te=R[F+W>>1],fe=F-1,pe=W+1;for(;;){do fe++;while(R[fe]<te);do pe--;while(R[pe]>te);if(fe>=pe)break;Li(R,fe,pe),Li(A,3*fe,3*pe),Li(A,3*fe+1,3*pe+1),Li(A,3*fe+2,3*pe+2)}pe-F<W-pe?(di(R,A,F,pe),F=pe+1):(di(R,A,pe+1,W),W=pe)}}function Li(R,A,F){let W=R[A];R[A]=R[F],R[F]=W}Fi("FeaturePositionMap",Wr);class Ti{constructor(A,F){this.gl=A.gl,this.location=F}}class Qr extends Ti{constructor(A,F){super(A,F),this.current=0}set(A){this.current!==A&&(this.current=A,this.gl.uniform1f(this.location,A))}}class Pn extends Ti{constructor(A,F){super(A,F),this.current=[0,0,0,0]}set(A){A[0]===this.current[0]&&A[1]===this.current[1]&&A[2]===this.current[2]&&A[3]===this.current[3]||(this.current=A,this.gl.uniform4f(this.location,A[0],A[1],A[2],A[3]))}}class kn extends Ti{constructor(A,F){super(A,F),this.current=ir.transparent}set(A){A.r===this.current.r&&A.g===this.current.g&&A.b===this.current.b&&A.a===this.current.a||(this.current=A,this.gl.uniform4f(this.location,A.r,A.g,A.b,A.a))}}let Bn=new Float32Array(16);function na(R){return[Pt(255*R.r,255*R.g),Pt(255*R.b,255*R.a)]}class Ea{constructor(A,F,W){this.value=A,this.uniformNames=F.map(te=>`u_${te}`),this.type=W}setUniform(A,F,W){A.set(W.constantOr(this.value))}getBinding(A,F,W){return this.type==="color"?new kn(A,F):new Qr(A,F)}}class Ia{constructor(A,F){this.uniformNames=F.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(A,F){this.pixelRatioFrom=F.pixelRatio,this.pixelRatioTo=A.pixelRatio,this.patternFrom=F.tlbr,this.patternTo=A.tlbr}setUniform(A,F,W,te){let fe=te==="u_pattern_to"?this.patternTo:te==="u_pattern_from"?this.patternFrom:te==="u_pixel_ratio_to"?this.pixelRatioTo:te==="u_pixel_ratio_from"?this.pixelRatioFrom:null;fe&&A.set(fe)}getBinding(A,F,W){return W.substr(0,9)==="u_pattern"?new Pn(A,F):new Qr(A,F)}}class yo{constructor(A,F,W,te){this.expression=A,this.type=W,this.maxValue=0,this.paintVertexAttributes=F.map(fe=>({name:`a_${fe}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(A,F,W,te,fe){let pe=this.paintVertexArray.length,Re=this.expression.evaluate(new rs(0),F,{},te,[],fe);this.paintVertexArray.resize(A),this._setPaintValue(pe,A,Re)}updatePaintArray(A,F,W,te){let fe=this.expression.evaluate({zoom:0},W,te);this._setPaintValue(A,F,fe)}_setPaintValue(A,F,W){if(this.type==="color"){let te=na(W);for(let fe=A;fe<F;fe++)this.paintVertexArray.emplace(fe,te[0],te[1])}else{for(let te=A;te<F;te++)this.paintVertexArray.emplace(te,W);this.maxValue=Math.max(this.maxValue,Math.abs(W))}}upload(A){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=A.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Da{constructor(A,F,W,te,fe,pe){this.expression=A,this.uniformNames=F.map(Re=>`u_${Re}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=fe,this.maxValue=0,this.paintVertexAttributes=F.map(Re=>({name:`a_${Re}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new pe}populatePaintArray(A,F,W,te,fe){let pe=this.expression.evaluate(new rs(this.zoom),F,{},te,[],fe),Re=this.expression.evaluate(new rs(this.zoom+1),F,{},te,[],fe),Ke=this.paintVertexArray.length;this.paintVertexArray.resize(A),this._setPaintValue(Ke,A,pe,Re)}updatePaintArray(A,F,W,te){let fe=this.expression.evaluate({zoom:this.zoom},W,te),pe=this.expression.evaluate({zoom:this.zoom+1},W,te);this._setPaintValue(A,F,fe,pe)}_setPaintValue(A,F,W,te){if(this.type==="color"){let fe=na(W),pe=na(te);for(let Re=A;Re<F;Re++)this.paintVertexArray.emplace(Re,fe[0],fe[1],pe[0],pe[1])}else{for(let fe=A;fe<F;fe++)this.paintVertexArray.emplace(fe,W,te);this.maxValue=Math.max(this.maxValue,Math.abs(W),Math.abs(te))}}upload(A){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=A.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(A,F){let W=this.useIntegerZoom?Math.floor(F.zoom):F.zoom,te=M(this.expression.interpolationFactor(W,this.zoom,this.zoom+1),0,1);A.set(te)}getBinding(A,F,W){return new Qr(A,F)}}class go{constructor(A,F,W,te,fe,pe){this.expression=A,this.type=F,this.useIntegerZoom=W,this.zoom=te,this.layerId=pe,this.zoomInPaintVertexArray=new fe,this.zoomOutPaintVertexArray=new fe}populatePaintArray(A,F,W){let te=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(A),this.zoomOutPaintVertexArray.resize(A),this._setPaintValues(te,A,F.patterns&&F.patterns[this.layerId],W)}updatePaintArray(A,F,W,te,fe){this._setPaintValues(A,F,W.patterns&&W.patterns[this.layerId],fe)}_setPaintValues(A,F,W,te){if(!te||!W)return;let{min:fe,mid:pe,max:Re}=W,Ke=te[fe],ft=te[pe],Rt=te[Re];if(Ke&&ft&&Rt)for(let tr=A;tr<F;tr++)this.zoomInPaintVertexArray.emplace(tr,ft.tl[0],ft.tl[1],ft.br[0],ft.br[1],Ke.tl[0],Ke.tl[1],Ke.br[0],Ke.br[1],ft.pixelRatio,Ke.pixelRatio),this.zoomOutPaintVertexArray.emplace(tr,ft.tl[0],ft.tl[1],ft.br[0],ft.br[1],Rt.tl[0],Rt.tl[1],Rt.br[0],Rt.br[1],ft.pixelRatio,Rt.pixelRatio)}upload(A){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=A.createVertexBuffer(this.zoomInPaintVertexArray,at.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=A.createVertexBuffer(this.zoomOutPaintVertexArray,at.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Is{constructor(A,F,W){this.binders={},this._buffers=[];let te=[];for(let fe in A.paint._values){if(!W(fe))continue;let pe=A.paint.get(fe);if(!(pe instanceof xu&&Nl(pe.property.specification)))continue;let Re=Xs(fe,A.type),Ke=pe.value,ft=pe.property.specification.type,Rt=pe.property.useIntegerZoom,tr=pe.property.specification["property-type"],ur=tr==="cross-faded"||tr==="cross-faded-data-driven";if(Ke.kind==="constant")this.binders[fe]=ur?new Ia(Ke.value,Re):new Ea(Ke.value,Re,ft),te.push(`/u_${fe}`);else if(Ke.kind==="source"||ur){let vr=Un(fe,ft,"source");this.binders[fe]=ur?new go(Ke,ft,Rt,F,vr,A.id):new yo(Ke,Re,ft,vr),te.push(`/a_${fe}`)}else{let vr=Un(fe,ft,"composite");this.binders[fe]=new Da(Ke,Re,ft,Rt,F,vr),te.push(`/z_${fe}`)}}this.cacheKey=te.sort().join("")}getMaxValue(A){let F=this.binders[A];return F instanceof yo||F instanceof Da?F.maxValue:0}populatePaintArrays(A,F,W,te,fe){for(let pe in this.binders){let Re=this.binders[pe];(Re instanceof yo||Re instanceof Da||Re instanceof go)&&Re.populatePaintArray(A,F,W,te,fe)}}setConstantPatternPositions(A,F){for(let W in this.binders){let te=this.binders[W];te instanceof Ia&&te.setConstantPatternPositions(A,F)}}updatePaintArrays(A,F,W,te,fe){let pe=!1;for(let Re in A){let Ke=F.getPositions(Re);for(let ft of Ke){let Rt=W.feature(ft.index);for(let tr in this.binders){let ur=this.binders[tr];if((ur instanceof yo||ur instanceof Da||ur instanceof go)&&ur.expression.isStateDependent===!0){let vr=te.paint.get(tr);ur.expression=vr.value,ur.updatePaintArray(ft.start,ft.end,Rt,A[Re],fe),pe=!0}}}}return pe}defines(){let A=[];for(let F in this.binders){let W=this.binders[F];(W instanceof Ea||W instanceof Ia)&&A.push(...W.uniformNames.map(te=>`#define HAS_UNIFORM_${te}`))}return A}getBinderAttributes(){let A=[];for(let F in this.binders){let W=this.binders[F];if(W instanceof yo||W instanceof Da)for(let te=0;te<W.paintVertexAttributes.length;te++)A.push(W.paintVertexAttributes[te].name);else if(W instanceof go)for(let te=0;te<at.members.length;te++)A.push(at.members[te].name)}return A}getBinderUniforms(){let A=[];for(let F in this.binders){let W=this.binders[F];if(W instanceof Ea||W instanceof Ia||W instanceof Da)for(let te of W.uniformNames)A.push(te)}return A}getPaintVertexBuffers(){return this._buffers}getUniforms(A,F){let W=[];for(let te in this.binders){let fe=this.binders[te];if(fe instanceof Ea||fe instanceof Ia||fe instanceof Da){for(let pe of fe.uniformNames)if(F[pe]){let Re=fe.getBinding(A,F[pe],pe);W.push({name:pe,property:te,binding:Re})}}}return W}setUniforms(A,F,W,te){for(let{name:fe,property:pe,binding:Re}of F)this.binders[pe].setUniform(Re,te,W.get(pe),fe)}updatePaintBuffers(A){this._buffers=[];for(let F in this.binders){let W=this.binders[F];if(A&&W instanceof go){let te=A.fromScale===2?W.zoomInPaintVertexBuffer:W.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(W instanceof yo||W instanceof Da)&&W.paintVertexBuffer&&this._buffers.push(W.paintVertexBuffer)}}upload(A){for(let F in this.binders){let W=this.binders[F];(W instanceof yo||W instanceof Da||W instanceof go)&&W.upload(A)}this.updatePaintBuffers()}destroy(){for(let A in this.binders){let F=this.binders[A];(F instanceof yo||F instanceof Da||F instanceof go)&&F.destroy()}}}class Ms{constructor(A,F,W=()=>!0){this.programConfigurations={};for(let te of A)this.programConfigurations[te.id]=new Is(te,F,W);this.needsUpload=!1,this._featureMap=new Wr,this._bufferOffset=0}populatePaintArrays(A,F,W,te,fe,pe){for(let Re in this.programConfigurations)this.programConfigurations[Re].populatePaintArrays(A,F,te,fe,pe);F.id!==void 0&&this._featureMap.add(F.id,W,this._bufferOffset,A),this._bufferOffset=A,this.needsUpload=!0}updatePaintArrays(A,F,W,te){for(let fe of W)this.needsUpload=this.programConfigurations[fe.id].updatePaintArrays(A,this._featureMap,F,fe,te)||this.needsUpload}get(A){return this.programConfigurations[A]}upload(A){if(this.needsUpload){for(let F in this.programConfigurations)this.programConfigurations[F].upload(A);this.needsUpload=!1}}destroy(){for(let A in this.programConfigurations)this.programConfigurations[A].destroy()}}function Xs(R,A){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[R]||[R.replace(`${A}-`,"").replace(/-/g,"_")]}function Un(R,A,F){let W={color:{source:Cr,composite:cn},number:{source:br,composite:Cr}},te=function(fe){return{"line-pattern":{source:Js,composite:Js},"fill-pattern":{source:Js,composite:Js},"fill-extrusion-pattern":{source:Js,composite:Js}}[fe]}(R);return te&&te[F]||W[A][F]}Fi("ConstantBinder",Ea),Fi("CrossFadedConstantBinder",Ia),Fi("SourceExpressionBinder",yo),Fi("CrossFadedCompositeBinder",go),Fi("CompositeExpressionBinder",Da),Fi("ProgramConfiguration",Is,{omit:["_buffers"]}),Fi("ProgramConfigurationSet",Ms);let ja=8192,Fo=Math.pow(2,14)-1,Uo=-Fo-1;function $s(R){let A=ja/R.extent,F=R.loadGeometry();for(let W=0;W<F.length;W++){let te=F[W];for(let fe=0;fe<te.length;fe++){let pe=te[fe],Re=Math.round(pe.x*A),Ke=Math.round(pe.y*A);pe.x=M(Re,Uo,Fo),pe.y=M(Ke,Uo,Fo),(Re<pe.x||Re>pe.x+1||Ke<pe.y||Ke>pe.y+1)&&E("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return F}function Sl(R,A){return{type:R.type,id:R.id,properties:R.properties,geometry:A?$s(R):[]}}function bu(R,A,F,W,te){R.emplaceBack(2*A+(W+1)/2,2*F+(te+1)/2)}class dl{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.layoutVertexArray=new To,this.indexArray=new se,this.segments=new Ye,this.programConfigurations=new Ms(A.layers,A.zoom),this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){let te=this.layers[0],fe=[],pe=null,Re=!1;te.type==="circle"&&(pe=te.layout.get("circle-sort-key"),Re=!pe.isConstant());for(let{feature:Ke,id:ft,index:Rt,sourceLayerIndex:tr}of A){let ur=this.layers[0]._featureFilter.needGeometry,vr=Sl(Ke,ur);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),vr,W))continue;let kr=Re?pe.evaluate(vr,{},W):void 0,Dr={id:ft,properties:Ke.properties,type:Ke.type,sourceLayerIndex:tr,index:Rt,geometry:ur?vr.geometry:$s(Ke),patterns:{},sortKey:kr};fe.push(Dr)}Re&&fe.sort((Ke,ft)=>Ke.sortKey-ft.sortKey);for(let Ke of fe){let{geometry:ft,index:Rt,sourceLayerIndex:tr}=Ke,ur=A[Rt].feature;this.addFeature(Ke,ft,Rt,W),F.featureIndex.insert(ur,ft,Rt,tr,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,Ve),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(A,F,W,te){for(let fe of F)for(let pe of fe){let Re=pe.x,Ke=pe.y;if(Re<0||Re>=ja||Ke<0||Ke>=ja)continue;let ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,A.sortKey),Rt=ft.vertexLength;bu(this.layoutVertexArray,Re,Ke,-1,-1),bu(this.layoutVertexArray,Re,Ke,1,-1),bu(this.layoutVertexArray,Re,Ke,1,1),bu(this.layoutVertexArray,Re,Ke,-1,1),this.indexArray.emplaceBack(Rt,Rt+1,Rt+2),this.indexArray.emplaceBack(Rt,Rt+3,Rt+2),ft.vertexLength+=4,ft.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,W,{},te)}}function Sc(R,A){for(let F=0;F<R.length;F++)if(Ni(A,R[F]))return!0;for(let F=0;F<A.length;F++)if(Ni(R,A[F]))return!0;return!!Lr(R,A)}function Me(R,A,F){return!!Ni(R,A)||!!Or(A,R,F)}function bt(R,A){if(R.length===1)return vi(A,R[0]);for(let F=0;F<A.length;F++){let W=A[F];for(let te=0;te<W.length;te++)if(Ni(R,W[te]))return!0}for(let F=0;F<R.length;F++)if(vi(A,R[F]))return!0;for(let F=0;F<A.length;F++)if(Lr(R,A[F]))return!0;return!1}function Ot(R,A,F){if(R.length>1){if(Lr(R,A))return!0;for(let W=0;W<A.length;W++)if(Or(A[W],R,F))return!0}for(let W=0;W<R.length;W++)if(Or(R[W],A,F))return!0;return!1}function Lr(R,A){if(R.length===0||A.length===0)return!1;for(let F=0;F<R.length-1;F++){let W=R[F],te=R[F+1];for(let fe=0;fe<A.length-1;fe++)if(Vr(W,te,A[fe],A[fe+1]))return!0}return!1}function Vr(R,A,F,W){return z(R,F,W)!==z(A,F,W)&&z(R,A,F)!==z(R,A,W)}function Or(R,A,F){let W=F*F;if(A.length===1)return R.distSqr(A[0])<W;for(let te=1;te<A.length;te++)if(Nr(R,A[te-1],A[te])<W)return!0;return!1}function Nr(R,A,F){let W=A.distSqr(F);if(W===0)return R.distSqr(A);let te=((R.x-A.x)*(F.x-A.x)+(R.y-A.y)*(F.y-A.y))/W;return R.distSqr(te<0?A:te>1?F:F.sub(A)._mult(te)._add(A))}function vi(R,A){let F,W,te,fe=!1;for(let pe=0;pe<R.length;pe++){F=R[pe];for(let Re=0,Ke=F.length-1;Re<F.length;Ke=Re++)W=F[Re],te=F[Ke],W.y>A.y!=te.y>A.y&&A.x<(te.x-W.x)*(A.y-W.y)/(te.y-W.y)+W.x&&(fe=!fe)}return fe}function Ni(R,A){let F=!1;for(let W=0,te=R.length-1;W<R.length;te=W++){let fe=R[W],pe=R[te];fe.y>A.y!=pe.y>A.y&&A.x<(pe.x-fe.x)*(A.y-fe.y)/(pe.y-fe.y)+fe.x&&(F=!F)}return F}function qi(R,A,F){let W=F[0],te=F[2];if(R.x<W.x&&A.x<W.x||R.x>te.x&&A.x>te.x||R.y<W.y&&A.y<W.y||R.y>te.y&&A.y>te.y)return!1;let fe=z(R,A,F[0]);return fe!==z(R,A,F[1])||fe!==z(R,A,F[2])||fe!==z(R,A,F[3])}function Si(R,A,F){let W=A.paint.get(R).value;return W.kind==="constant"?W.value:F.programConfigurations.get(A.id).getMaxValue(R)}function Vn(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qi(R,A,F,W,te){if(!A[0]&&!A[1])return R;let fe=u.convert(A)._mult(te);F==="viewport"&&fe._rotate(-W);let pe=[];for(let Re=0;Re<R.length;Re++)pe.push(R[Re].sub(fe));return pe}let ji,oi;Fi("CircleBucket",dl,{omit:["layers"]});var Tr={get paint(){return oi=oi||new ue({"circle-radius":new oo(ce.paint_circle["circle-radius"]),"circle-color":new oo(ce.paint_circle["circle-color"]),"circle-blur":new oo(ce.paint_circle["circle-blur"]),"circle-opacity":new oo(ce.paint_circle["circle-opacity"]),"circle-translate":new Ua(ce.paint_circle["circle-translate"]),"circle-translate-anchor":new Ua(ce.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ua(ce.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ua(ce.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new oo(ce.paint_circle["circle-stroke-width"]),"circle-stroke-color":new oo(ce.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new oo(ce.paint_circle["circle-stroke-opacity"])})},get layout(){return ji=ji||new ue({"circle-sort-key":new oo(ce.layout_circle["circle-sort-key"])})}},Zr=1e-6,yi=typeof Float32Array!="undefined"?Float32Array:Array;function Ii(R){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}function ui(R,A,F){var W=A[0],te=A[1],fe=A[2],pe=A[3],Re=A[4],Ke=A[5],ft=A[6],Rt=A[7],tr=A[8],ur=A[9],vr=A[10],kr=A[11],Dr=A[12],li=A[13],pi=A[14],vn=A[15],zi=F[0],ln=F[1],Tn=F[2],pa=F[3];return R[0]=zi*W+ln*Re+Tn*tr+pa*Dr,R[1]=zi*te+ln*Ke+Tn*ur+pa*li,R[2]=zi*fe+ln*ft+Tn*vr+pa*pi,R[3]=zi*pe+ln*Rt+Tn*kr+pa*vn,R[4]=(zi=F[4])*W+(ln=F[5])*Re+(Tn=F[6])*tr+(pa=F[7])*Dr,R[5]=zi*te+ln*Ke+Tn*ur+pa*li,R[6]=zi*fe+ln*ft+Tn*vr+pa*pi,R[7]=zi*pe+ln*Rt+Tn*kr+pa*vn,R[8]=(zi=F[8])*W+(ln=F[9])*Re+(Tn=F[10])*tr+(pa=F[11])*Dr,R[9]=zi*te+ln*Ke+Tn*ur+pa*li,R[10]=zi*fe+ln*ft+Tn*vr+pa*pi,R[11]=zi*pe+ln*Rt+Tn*kr+pa*vn,R[12]=(zi=F[12])*W+(ln=F[13])*Re+(Tn=F[14])*tr+(pa=F[15])*Dr,R[13]=zi*te+ln*Ke+Tn*ur+pa*li,R[14]=zi*fe+ln*ft+Tn*vr+pa*pi,R[15]=zi*pe+ln*Rt+Tn*kr+pa*vn,R}Math.hypot||(Math.hypot=function(){for(var R=0,A=arguments.length;A--;)R+=arguments[A]*arguments[A];return Math.sqrt(R)});var nn,Xi=ui;function qn(R,A,F){var W=A[0],te=A[1],fe=A[2],pe=A[3];return R[0]=F[0]*W+F[4]*te+F[8]*fe+F[12]*pe,R[1]=F[1]*W+F[5]*te+F[9]*fe+F[13]*pe,R[2]=F[2]*W+F[6]*te+F[10]*fe+F[14]*pe,R[3]=F[3]*W+F[7]*te+F[11]*fe+F[15]*pe,R}nn=new yi(4),yi!=Float32Array&&(nn[0]=0,nn[1]=0,nn[2]=0,nn[3]=0);class fi extends B{constructor(A){super(A,Tr)}createBucket(A){return new dl(A)}queryRadius(A){let F=A;return Si("circle-radius",this,F)+Si("circle-stroke-width",this,F)+Vn(this.paint.get("circle-translate"))}queryIntersectsFeature(A,F,W,te,fe,pe,Re,Ke){let ft=Qi(A,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),pe.angle,Re),Rt=this.paint.get("circle-radius").evaluate(F,W)+this.paint.get("circle-stroke-width").evaluate(F,W),tr=this.paint.get("circle-pitch-alignment")==="map",ur=tr?ft:function(kr,Dr){return kr.map(li=>si(li,Dr))}(ft,Ke),vr=tr?Rt*Re:Rt;for(let kr of te)for(let Dr of kr){let li=tr?Dr:si(Dr,Ke),pi=vr,vn=qn([],[Dr.x,Dr.y,0,1],Ke);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?pi*=vn[3]/pe.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(pi*=pe.cameraToCenterDistance/vn[3]),Me(ur,li,pi))return!0}return!1}}function si(R,A){let F=qn([],[R.x,R.y,0,1],A);return new u(F[0]/F[3],F[1]/F[3])}class mn extends dl{}let Ji;Fi("HeatmapBucket",mn,{omit:["layers"]});var Ui={get paint(){return Ji=Ji||new ue({"heatmap-radius":new oo(ce.paint_heatmap["heatmap-radius"]),"heatmap-weight":new oo(ce.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ua(ce.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ku(ce.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ua(ce.paint_heatmap["heatmap-opacity"])})}};function Bi(R,{width:A,height:F},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==A*F*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${A*F*W}`)}else te=new Uint8Array(A*F*W);return R.width=A,R.height=F,R.data=te,R}function pn(R,{width:A,height:F},W){if(A===R.width&&F===R.height)return;let te=Bi({},{width:A,height:F},W);Nn(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,A),height:Math.min(R.height,F)},W),R.width=A,R.height=F,R.data=te.data}function Nn(R,A,F,W,te,fe){if(te.width===0||te.height===0)return A;if(te.width>R.width||te.height>R.height||F.x>R.width-te.width||F.y>R.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>A.width||te.height>A.height||W.x>A.width-te.width||W.y>A.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let pe=R.data,Re=A.data;if(pe===Re)throw new Error("srcData equals dstData, so image is already copied");for(let Ke=0;Ke<te.height;Ke++){let ft=((F.y+Ke)*R.width+F.x)*fe,Rt=((W.y+Ke)*A.width+W.x)*fe;for(let tr=0;tr<te.width*fe;tr++)Re[Rt+tr]=pe[ft+tr]}return A}class aa{constructor(A,F){Bi(this,A,1,F)}resize(A){pn(this,A,1)}clone(){return new aa({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(A,F,W,te,fe){Nn(A,F,W,te,fe,1)}}class Ki{constructor(A,F){Bi(this,A,4,F)}resize(A){pn(this,A,4)}replace(A,F){F?this.data.set(A):this.data=A instanceof Uint8ClampedArray?new Uint8Array(A.buffer):A}clone(){return new Ki({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(A,F,W,te,fe){Nn(A,F,W,te,fe,4)}}function Cn(R){let A={},F=R.resolution||256,W=R.clips?R.clips.length:1,te=R.image||new Ki({width:F,height:W});if(Math.log(F)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${F}`);let fe=(pe,Re,Ke)=>{A[R.evaluationKey]=Ke;let ft=R.expression.evaluate(A);te.data[pe+Re+0]=Math.floor(255*ft.r/ft.a),te.data[pe+Re+1]=Math.floor(255*ft.g/ft.a),te.data[pe+Re+2]=Math.floor(255*ft.b/ft.a),te.data[pe+Re+3]=Math.floor(255*ft.a)};if(R.clips)for(let pe=0,Re=0;pe<W;++pe,Re+=4*F)for(let Ke=0,ft=0;Ke<F;Ke++,ft+=4){let Rt=Ke/(F-1),{start:tr,end:ur}=R.clips[pe];fe(Re,ft,tr*(1-Rt)+ur*Rt)}else for(let pe=0,Re=0;pe<F;pe++,Re+=4)fe(0,Re,pe/(F-1));return te}Fi("AlphaImage",aa),Fi("RGBAImage",Ki);let ia="big-fb";class sa extends B{createBucket(A){return new mn(A)}constructor(A){super(A,Ui),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(A){A==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Cn({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(ia)&&this.heatmapFbos.delete(ia)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let ba;var is={get paint(){return ba=ba||new ue({"hillshade-illumination-direction":new Ua(ce.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Ua(ce.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ua(ce.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ua(ce.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ua(ce.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ua(ce.paint_hillshade["hillshade-accent-color"])})}};class Zs extends B{constructor(A){super(A,is)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}let Va=ze([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ml}=Va;function zo(R,A,F=2){let W=A&&A.length,te=W?A[0]*F:R.length,fe=Qs(R,0,te,F,!0),pe=[];if(!fe||fe.next===fe.prev)return pe;let Re,Ke,ft;if(W&&(fe=function(Rt,tr,ur,vr){let kr=[];for(let Dr=0,li=tr.length;Dr<li;Dr++){let pi=Qs(Rt,tr[Dr]*vr,Dr<li-1?tr[Dr+1]*vr:Rt.length,vr,!1);pi===pi.next&&(pi.steiner=!0),kr.push(J(pi))}kr.sort(ol);for(let Dr=0;Dr<kr.length;Dr++)ur=io(kr[Dr],ur);return ur}(R,A,fe,F)),R.length>80*F){Re=1/0,Ke=1/0;let Rt=-1/0,tr=-1/0;for(let ur=F;ur<te;ur+=F){let vr=R[ur],kr=R[ur+1];vr<Re&&(Re=vr),kr<Ke&&(Ke=kr),vr>Rt&&(Rt=vr),kr>tr&&(tr=kr)}ft=Math.max(Rt-Re,tr-Ke),ft=ft!==0?32767/ft:0}return Vl(fe,pe,F,Re,Ke,ft,0),pe}function Qs(R,A,F,W,te){let fe;if(te===function(pe,Re,Ke,ft){let Rt=0;for(let tr=Re,ur=Ke-ft;tr<Ke;tr+=ft)Rt+=(pe[ur]-pe[tr])*(pe[tr+1]+pe[ur+1]),ur=tr;return Rt}(R,A,F,W)>0)for(let pe=A;pe<F;pe+=W)fe=Nt(pe/W|0,R[pe],R[pe+1],fe);else for(let pe=F-W;pe>=A;pe-=W)fe=Nt(pe/W|0,R[pe],R[pe+1],fe);return fe&&ne(fe,fe.next)&&(Ne(fe),fe=fe.next),fe}function al(R,A){if(!R)return R;A||(A=R);let F,W=R;do if(F=!1,W.steiner||!ne(W,W.next)&&de(W.prev,W,W.next)!==0)W=W.next;else{if(Ne(W),W=A=W.prev,W===W.next)break;F=!0}while(F||W!==A);return A}function Vl(R,A,F,W,te,fe,pe){if(!R)return;!pe&&fe&&function(Ke,ft,Rt,tr){let ur=Ke;do ur.z===0&&(ur.z=D(ur.x,ur.y,ft,Rt,tr)),ur.prevZ=ur.prev,ur.nextZ=ur.next,ur=ur.next;while(ur!==Ke);ur.prevZ.nextZ=null,ur.prevZ=null,function(vr){let kr,Dr=1;do{let li,pi=vr;vr=null;let vn=null;for(kr=0;pi;){kr++;let zi=pi,ln=0;for(let pa=0;pa<Dr&&(ln++,zi=zi.nextZ,zi);pa++);let Tn=Dr;for(;ln>0||Tn>0&&zi;)ln!==0&&(Tn===0||!zi||pi.z<=zi.z)?(li=pi,pi=pi.nextZ,ln--):(li=zi,zi=zi.nextZ,Tn--),vn?vn.nextZ=li:vr=li,li.prevZ=vn,vn=li;pi=zi}vn.nextZ=null,Dr*=2}while(kr>1)}(ur)}(R,W,te,fe);let Re=R;for(;R.prev!==R.next;){let Ke=R.prev,ft=R.next;if(fe?Vs(R,W,te,fe):ss(R))A.push(Ke.i,R.i,ft.i),Ne(R),R=ft.next,Re=ft.next;else if((R=ft)===Re){pe?pe===1?Vl(R=Ys(al(R),A),A,F,W,te,fe,2):pe===2&&wa(R,A,F,W,te,fe):Vl(al(R),A,F,W,te,fe,1);break}}}function ss(R){let A=R.prev,F=R,W=R.next;if(de(A,F,W)>=0)return!1;let te=A.x,fe=F.x,pe=W.x,Re=A.y,Ke=F.y,ft=W.y,Rt=te<fe?te<pe?te:pe:fe<pe?fe:pe,tr=Re<Ke?Re<ft?Re:ft:Ke<ft?Ke:ft,ur=te>fe?te>pe?te:pe:fe>pe?fe:pe,vr=Re>Ke?Re>ft?Re:ft:Ke>ft?Ke:ft,kr=W.next;for(;kr!==A;){if(kr.x>=Rt&&kr.x<=ur&&kr.y>=tr&&kr.y<=vr&&O(te,Re,fe,Ke,pe,ft,kr.x,kr.y)&&de(kr.prev,kr,kr.next)>=0)return!1;kr=kr.next}return!0}function Vs(R,A,F,W){let te=R.prev,fe=R,pe=R.next;if(de(te,fe,pe)>=0)return!1;let Re=te.x,Ke=fe.x,ft=pe.x,Rt=te.y,tr=fe.y,ur=pe.y,vr=Re<Ke?Re<ft?Re:ft:Ke<ft?Ke:ft,kr=Rt<tr?Rt<ur?Rt:ur:tr<ur?tr:ur,Dr=Re>Ke?Re>ft?Re:ft:Ke>ft?Ke:ft,li=Rt>tr?Rt>ur?Rt:ur:tr>ur?tr:ur,pi=D(vr,kr,A,F,W),vn=D(Dr,li,A,F,W),zi=R.prevZ,ln=R.nextZ;for(;zi&&zi.z>=pi&&ln&&ln.z<=vn;){if(zi.x>=vr&&zi.x<=Dr&&zi.y>=kr&&zi.y<=li&&zi!==te&&zi!==pe&&O(Re,Rt,Ke,tr,ft,ur,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0||(zi=zi.prevZ,ln.x>=vr&&ln.x<=Dr&&ln.y>=kr&&ln.y<=li&&ln!==te&&ln!==pe&&O(Re,Rt,Ke,tr,ft,ur,ln.x,ln.y)&&de(ln.prev,ln,ln.next)>=0))return!1;ln=ln.nextZ}for(;zi&&zi.z>=pi;){if(zi.x>=vr&&zi.x<=Dr&&zi.y>=kr&&zi.y<=li&&zi!==te&&zi!==pe&&O(Re,Rt,Ke,tr,ft,ur,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0)return!1;zi=zi.prevZ}for(;ln&&ln.z<=vn;){if(ln.x>=vr&&ln.x<=Dr&&ln.y>=kr&&ln.y<=li&&ln!==te&&ln!==pe&&O(Re,Rt,Ke,tr,ft,ur,ln.x,ln.y)&&de(ln.prev,ln,ln.next)>=0)return!1;ln=ln.nextZ}return!0}function Ys(R,A){let F=R;do{let W=F.prev,te=F.next.next;!ne(W,te)&&be(W,F,F.next,te)&&Yt(W,te)&&Yt(te,W)&&(A.push(W.i,F.i,te.i),Ne(F),Ne(F.next),F=R=te),F=F.next}while(F!==R);return al(F)}function wa(R,A,F,W,te,fe){let pe=R;do{let Re=pe.next.next;for(;Re!==pe.prev;){if(pe.i!==Re.i&&K(pe,Re)){let Ke=cr(pe,Re);return pe=al(pe,pe.next),Ke=al(Ke,Ke.next),Vl(pe,A,F,W,te,fe,0),void Vl(Ke,A,F,W,te,fe,0)}Re=Re.next}pe=pe.next}while(pe!==R)}function ol(R,A){return R.x-A.x}function io(R,A){let F=function(te,fe){let pe=fe,Re=te.x,Ke=te.y,ft,Rt=-1/0;do{if(Ke<=pe.y&&Ke>=pe.next.y&&pe.next.y!==pe.y){let Dr=pe.x+(Ke-pe.y)*(pe.next.x-pe.x)/(pe.next.y-pe.y);if(Dr<=Re&&Dr>Rt&&(Rt=Dr,ft=pe.x<pe.next.x?pe:pe.next,Dr===Re))return ft}pe=pe.next}while(pe!==fe);if(!ft)return null;let tr=ft,ur=ft.x,vr=ft.y,kr=1/0;pe=ft;do{if(Re>=pe.x&&pe.x>=ur&&Re!==pe.x&&O(Ke<vr?Re:Rt,Ke,ur,vr,Ke<vr?Rt:Re,Ke,pe.x,pe.y)){let Dr=Math.abs(Ke-pe.y)/(Re-pe.x);Yt(pe,te)&&(Dr<kr||Dr===kr&&(pe.x>ft.x||pe.x===ft.x&&Y(ft,pe)))&&(ft=pe,kr=Dr)}pe=pe.next}while(pe!==tr);return ft}(R,A);if(!F)return A;let W=cr(F,R);return al(W,W.next),al(F,F.next)}function Y(R,A){return de(R.prev,R,A.prev)<0&&de(A.next,R,R.next)<0}function D(R,A,F,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-F)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=(A-W)*te|0)|A<<8))|A<<4))|A<<2))|A<<1))<<1}function J(R){let A=R,F=R;do(A.x<F.x||A.x===F.x&&A.y<F.y)&&(F=A),A=A.next;while(A!==R);return F}function O(R,A,F,W,te,fe,pe,Re){return(te-pe)*(A-Re)>=(R-pe)*(fe-Re)&&(R-pe)*(W-Re)>=(F-pe)*(A-Re)&&(F-pe)*(fe-Re)>=(te-pe)*(W-Re)}function K(R,A){return R.next.i!==A.i&&R.prev.i!==A.i&&!function(F,W){let te=F;do{if(te.i!==F.i&&te.next.i!==F.i&&te.i!==W.i&&te.next.i!==W.i&&be(te,te.next,F,W))return!0;te=te.next}while(te!==F);return!1}(R,A)&&(Yt(R,A)&&Yt(A,R)&&function(F,W){let te=F,fe=!1,pe=(F.x+W.x)/2,Re=(F.y+W.y)/2;do te.y>Re!=te.next.y>Re&&te.next.y!==te.y&&pe<(te.next.x-te.x)*(Re-te.y)/(te.next.y-te.y)+te.x&&(fe=!fe),te=te.next;while(te!==F);return fe}(R,A)&&(de(R.prev,R,A.prev)||de(R,A.prev,A))||ne(R,A)&&de(R.prev,R,R.next)>0&&de(A.prev,A,A.next)>0)}function de(R,A,F){return(A.y-R.y)*(F.x-A.x)-(A.x-R.x)*(F.y-A.y)}function ne(R,A){return R.x===A.x&&R.y===A.y}function be(R,A,F,W){let te=ht(de(R,A,F)),fe=ht(de(R,A,W)),pe=ht(de(F,W,R)),Re=ht(de(F,W,A));return te!==fe&&pe!==Re||!(te!==0||!Be(R,F,A))||!(fe!==0||!Be(R,W,A))||!(pe!==0||!Be(F,R,W))||!(Re!==0||!Be(F,A,W))}function Be(R,A,F){return A.x<=Math.max(R.x,F.x)&&A.x>=Math.min(R.x,F.x)&&A.y<=Math.max(R.y,F.y)&&A.y>=Math.min(R.y,F.y)}function ht(R){return R>0?1:R<0?-1:0}function Yt(R,A){return de(R.prev,R,R.next)<0?de(R,A,R.next)>=0&&de(R,R.prev,A)>=0:de(R,A,R.prev)<0||de(R,R.next,A)<0}function cr(R,A){let F=$e(R.i,R.x,R.y),W=$e(A.i,A.x,A.y),te=R.next,fe=A.prev;return R.next=A,A.prev=R,F.next=te,te.prev=F,W.next=F,F.prev=W,fe.next=W,W.prev=fe,W}function Nt(R,A,F,W){let te=$e(R,A,F);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ne(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function $e(R,A,F){return{i:R,x:A,y:F,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function ot(R,A,F){let W=F.patternDependencies,te=!1;for(let fe of A){let pe=fe.paint.get(`${R}-pattern`);pe.isConstant()||(te=!0);let Re=pe.constantOr(null);Re&&(te=!0,W[Re.to]=!0,W[Re.from]=!0)}return te}function It(R,A,F,W,te){let fe=te.patternDependencies;for(let pe of A){let Re=pe.paint.get(`${R}-pattern`).value;if(Re.kind!=="constant"){let Ke=Re.evaluate({zoom:W-1},F,{},te.availableImages),ft=Re.evaluate({zoom:W},F,{},te.availableImages),Rt=Re.evaluate({zoom:W+1},F,{},te.availableImages);Ke=Ke&&Ke.name?Ke.name:Ke,ft=ft&&ft.name?ft.name:ft,Rt=Rt&&Rt.name?Rt.name:Rt,fe[Ke]=!0,fe[ft]=!0,fe[Rt]=!0,F.patterns[pe.id]={min:Ke,mid:ft,max:Rt}}}return F}class Bt{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new hl,this.indexArray=new se,this.indexArray2=new Te,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.segments2=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.hasPattern=ot("fill",this.layers,F);let te=this.layers[0].layout.get("fill-sort-key"),fe=!te.isConstant(),pe=[];for(let{feature:Re,id:Ke,index:ft,sourceLayerIndex:Rt}of A){let tr=this.layers[0]._featureFilter.needGeometry,ur=Sl(Re,tr);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ur,W))continue;let vr=fe?te.evaluate(ur,{},W,F.availableImages):void 0,kr={id:Ke,properties:Re.properties,type:Re.type,sourceLayerIndex:Rt,index:ft,geometry:tr?ur.geometry:$s(Re),patterns:{},sortKey:vr};pe.push(kr)}fe&&pe.sort((Re,Ke)=>Re.sortKey-Ke.sortKey);for(let Re of pe){let{geometry:Ke,index:ft,sourceLayerIndex:Rt}=Re;if(this.hasPattern){let tr=It("fill",this.layers,Re,this.zoom,F);this.patternFeatures.push(tr)}else this.addFeature(Re,Ke,ft,W,{});F.featureIndex.insert(A[ft].feature,Ke,ft,Rt,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}addFeatures(A,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,Ml),this.indexBuffer=A.createIndexBuffer(this.indexArray),this.indexBuffer2=A.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(A),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(A,F,W,te,fe){for(let pe of Cf(F,500)){let Re=0;for(let vr of pe)Re+=vr.length;let Ke=this.segments.prepareSegment(Re,this.layoutVertexArray,this.indexArray),ft=Ke.vertexLength,Rt=[],tr=[];for(let vr of pe){if(vr.length===0)continue;vr!==pe[0]&&tr.push(Rt.length/2);let kr=this.segments2.prepareSegment(vr.length,this.layoutVertexArray,this.indexArray2),Dr=kr.vertexLength;this.layoutVertexArray.emplaceBack(vr[0].x,vr[0].y),this.indexArray2.emplaceBack(Dr+vr.length-1,Dr),Rt.push(vr[0].x),Rt.push(vr[0].y);for(let li=1;li<vr.length;li++)this.layoutVertexArray.emplaceBack(vr[li].x,vr[li].y),this.indexArray2.emplaceBack(Dr+li-1,Dr+li),Rt.push(vr[li].x),Rt.push(vr[li].y);kr.vertexLength+=vr.length,kr.primitiveLength+=vr.length}let ur=zo(Rt,tr);for(let vr=0;vr<ur.length;vr+=3)this.indexArray.emplaceBack(ft+ur[vr],ft+ur[vr+1],ft+ur[vr+2]);Ke.vertexLength+=Re,Ke.primitiveLength+=ur.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,W,fe,te)}}let Ft,Ut;Fi("FillBucket",Bt,{omit:["layers","patternFeatures"]});var zt={get paint(){return Ut=Ut||new ue({"fill-antialias":new Ua(ce.paint_fill["fill-antialias"]),"fill-opacity":new oo(ce.paint_fill["fill-opacity"]),"fill-color":new oo(ce.paint_fill["fill-color"]),"fill-outline-color":new oo(ce.paint_fill["fill-outline-color"]),"fill-translate":new Ua(ce.paint_fill["fill-translate"]),"fill-translate-anchor":new Ua(ce.paint_fill["fill-translate-anchor"]),"fill-pattern":new Vc(ce.paint_fill["fill-pattern"])})},get layout(){return Ft=Ft||new ue({"fill-sort-key":new oo(ce.layout_fill["fill-sort-key"])})}};class _t extends B{constructor(A){super(A,zt)}recalculate(A,F){super.recalculate(A,F);let W=this.paint._values["fill-outline-color"];W.value.kind==="constant"&&W.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(A){return new Bt(A)}queryRadius(){return Vn(this.paint.get("fill-translate"))}queryIntersectsFeature(A,F,W,te,fe,pe,Re){return bt(Qi(A,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),pe.angle,Re),te)}isTileClipped(){return!0}}let Dt=ze([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),vt=ze([{name:"a_centroid",components:2,type:"Int16"}],4),{members:lr}=Dt;var yr={},Br=s,Di=ci;function ci(R,A,F,W,te){this.properties={},this.extent=F,this.type=0,this._pbf=R,this._geometry=-1,this._keys=W,this._values=te,R.readFields(bi,this,A)}function bi(R,A,F){R==1?A.id=F.readVarint():R==2?function(W,te){for(var fe=W.readVarint()+W.pos;W.pos<fe;){var pe=te._keys[W.readVarint()],Re=te._values[W.readVarint()];te.properties[pe]=Re}}(F,A):R==3?A.type=F.readVarint():R==4&&(A._geometry=F.pos)}function gn(R){for(var A,F,W=0,te=0,fe=R.length,pe=fe-1;te<fe;pe=te++)W+=((F=R[pe]).x-(A=R[te]).x)*(A.y+F.y);return W}ci.types=["Unknown","Point","LineString","Polygon"],ci.prototype.loadGeometry=function(){var R=this._pbf;R.pos=this._geometry;for(var A,F=R.readVarint()+R.pos,W=1,te=0,fe=0,pe=0,Re=[];R.pos<F;){if(te<=0){var Ke=R.readVarint();W=7&Ke,te=Ke>>3}if(te--,W===1||W===2)fe+=R.readSVarint(),pe+=R.readSVarint(),W===1&&(A&&Re.push(A),A=[]),A.push(new Br(fe,pe));else{if(W!==7)throw new Error("unknown command "+W);A&&A.push(A[0].clone())}}return A&&Re.push(A),Re},ci.prototype.bbox=function(){var R=this._pbf;R.pos=this._geometry;for(var A=R.readVarint()+R.pos,F=1,W=0,te=0,fe=0,pe=1/0,Re=-1/0,Ke=1/0,ft=-1/0;R.pos<A;){if(W<=0){var Rt=R.readVarint();F=7&Rt,W=Rt>>3}if(W--,F===1||F===2)(te+=R.readSVarint())<pe&&(pe=te),te>Re&&(Re=te),(fe+=R.readSVarint())<Ke&&(Ke=fe),fe>ft&&(ft=fe);else if(F!==7)throw new Error("unknown command "+F)}return[pe,Ke,Re,ft]},ci.prototype.toGeoJSON=function(R,A,F){var W,te,fe=this.extent*Math.pow(2,F),pe=this.extent*R,Re=this.extent*A,Ke=this.loadGeometry(),ft=ci.types[this.type];function Rt(vr){for(var kr=0;kr<vr.length;kr++){var Dr=vr[kr];vr[kr]=[360*(Dr.x+pe)/fe-180,360/Math.PI*Math.atan(Math.exp((180-360*(Dr.y+Re)/fe)*Math.PI/180))-90]}}switch(this.type){case 1:var tr=[];for(W=0;W<Ke.length;W++)tr[W]=Ke[W][0];Rt(Ke=tr);break;case 2:for(W=0;W<Ke.length;W++)Rt(Ke[W]);break;case 3:for(Ke=function(vr){var kr=vr.length;if(kr<=1)return[vr];for(var Dr,li,pi=[],vn=0;vn<kr;vn++){var zi=gn(vr[vn]);zi!==0&&(li===void 0&&(li=zi<0),li===zi<0?(Dr&&pi.push(Dr),Dr=[vr[vn]]):Dr.push(vr[vn]))}return Dr&&pi.push(Dr),pi}(Ke),W=0;W<Ke.length;W++)for(te=0;te<Ke[W].length;te++)Rt(Ke[W][te])}Ke.length===1?Ke=Ke[0]:ft="Multi"+ft;var ur={type:"Feature",geometry:{type:ft,coordinates:Ke},properties:this.properties};return"id"in this&&(ur.id=this.id),ur};var tn=Di,Ei=Oi;function Oi(R,A){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=R,this._keys=[],this._values=[],this._features=[],R.readFields(Gi,this,A),this.length=this._features.length}function Gi(R,A,F){R===15?A.version=F.readVarint():R===1?A.name=F.readString():R===5?A.extent=F.readVarint():R===2?A._features.push(F.pos):R===3?A._keys.push(F.readString()):R===4&&A._values.push(function(W){for(var te=null,fe=W.readVarint()+W.pos;W.pos<fe;){var pe=W.readVarint()>>3;te=pe===1?W.readString():pe===2?W.readFloat():pe===3?W.readDouble():pe===4?W.readVarint64():pe===5?W.readVarint():pe===6?W.readSVarint():pe===7?W.readBoolean():null}return te}(F))}Oi.prototype.feature=function(R){if(R<0||R>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[R];var A=this._pbf.readVarint()+this._pbf.pos;return new tn(this._pbf,A,this.extent,this._keys,this._values)};var on=Ei;function zn(R,A,F){if(R===3){var W=new on(F,F.readVarint()+F.pos);W.length&&(A[W.name]=W)}}yr.VectorTile=function(R,A){this.layers=R.readFields(zn,{},A)},yr.VectorTileFeature=Di,yr.VectorTileLayer=Ei;let Ja=yr.VectorTileFeature.types,co=Math.pow(2,13);function ts(R,A,F,W,te,fe,pe,Re){R.emplaceBack(A,F,2*Math.floor(W*co)+pe,te*co*2,fe*co*2,Math.round(Re))}class so{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.layoutVertexArray=new Ul,this.centroidVertexArray=new wo,this.indexArray=new se,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.features=[],this.hasPattern=ot("fill-extrusion",this.layers,F);for(let{feature:te,id:fe,index:pe,sourceLayerIndex:Re}of A){let Ke=this.layers[0]._featureFilter.needGeometry,ft=Sl(te,Ke);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ft,W))continue;let Rt={id:fe,sourceLayerIndex:Re,index:pe,geometry:Ke?ft.geometry:$s(te),properties:te.properties,type:te.type,patterns:{}};this.hasPattern?this.features.push(It("fill-extrusion",this.layers,Rt,this.zoom,F)):this.addFeature(Rt,Rt.geometry,pe,W,{}),F.featureIndex.insert(te,Rt.geometry,pe,Re,this.index,!0)}}addFeatures(A,F,W){for(let te of this.features){let{geometry:fe}=te;this.addFeature(te,fe,te.index,F,W)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,lr),this.centroidVertexBuffer=A.createVertexBuffer(this.centroidVertexArray,vt.members,!0),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(A,F,W,te,fe){for(let pe of Cf(F,500)){let Re={x:0,y:0,vertexCount:0},Ke=0;for(let kr of pe)Ke+=kr.length;let ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let kr of pe){if(kr.length===0||ms(kr))continue;let Dr=0;for(let li=0;li<kr.length;li++){let pi=kr[li];if(li>=1){let vn=kr[li-1];if(!Yo(pi,vn)){ft.vertexLength+4>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let zi=pi.sub(vn)._perp()._unit(),ln=vn.dist(pi);Dr+ln>32768&&(Dr=0),ts(this.layoutVertexArray,pi.x,pi.y,zi.x,zi.y,0,0,Dr),ts(this.layoutVertexArray,pi.x,pi.y,zi.x,zi.y,0,1,Dr),Re.x+=2*pi.x,Re.y+=2*pi.y,Re.vertexCount+=2,Dr+=ln,ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,0,Dr),ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,1,Dr),Re.x+=2*vn.x,Re.y+=2*vn.y,Re.vertexCount+=2;let Tn=ft.vertexLength;this.indexArray.emplaceBack(Tn,Tn+2,Tn+1),this.indexArray.emplaceBack(Tn+1,Tn+2,Tn+3),ft.vertexLength+=4,ft.primitiveLength+=2}}}}if(ft.vertexLength+Ke>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ft=this.segments.prepareSegment(Ke,this.layoutVertexArray,this.indexArray)),Ja[A.type]!=="Polygon")continue;let Rt=[],tr=[],ur=ft.vertexLength;for(let kr of pe)if(kr.length!==0){kr!==pe[0]&&tr.push(Rt.length/2);for(let Dr=0;Dr<kr.length;Dr++){let li=kr[Dr];ts(this.layoutVertexArray,li.x,li.y,0,0,1,1,0),Re.x+=li.x,Re.y+=li.y,Re.vertexCount+=1,Rt.push(li.x),Rt.push(li.y)}}let vr=zo(Rt,tr);for(let kr=0;kr<vr.length;kr+=3)this.indexArray.emplaceBack(ur+vr[kr],ur+vr[kr+2],ur+vr[kr+1]);ft.primitiveLength+=vr.length/3,ft.vertexLength+=Ke;for(let kr=0;kr<Re.vertexCount;kr++){let Dr=Math.floor(Re.x/Re.vertexCount),li=Math.floor(Re.y/Re.vertexCount);this.centroidVertexArray.emplaceBack(Dr,li)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,W,fe,te)}}function Yo(R,A){return R.x===A.x&&(R.x<0||R.x>ja)||R.y===A.y&&(R.y<0||R.y>ja)}function ms(R){return R.every(A=>A.x<0)||R.every(A=>A.x>ja)||R.every(A=>A.y<0)||R.every(A=>A.y>ja)}let ou;Fi("FillExtrusionBucket",so,{omit:["layers","features"]});var Cv={get paint(){return ou=ou||new ue({"fill-extrusion-opacity":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new oo(ce["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Vc(ce["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new oo(ce["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new oo(ce["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Lv extends B{constructor(A){super(A,Cv)}createBucket(A){return new so(A)}queryRadius(){return Vn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(A,F,W,te,fe,pe,Re,Ke){let ft=Qi(A,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),pe.angle,Re),Rt=this.paint.get("fill-extrusion-height").evaluate(F,W),tr=this.paint.get("fill-extrusion-base").evaluate(F,W),ur=function(kr,Dr,li,pi){let vn=[];for(let zi of kr){let ln=[zi.x,zi.y,0,1];qn(ln,ln,Dr),vn.push(new u(ln[0]/ln[3],ln[1]/ln[3]))}return vn}(ft,Ke),vr=function(kr,Dr,li,pi){let vn=[],zi=[],ln=pi[8]*Dr,Tn=pi[9]*Dr,pa=pi[10]*Dr,ro=pi[11]*Dr,Vo=pi[8]*li,Xa=pi[9]*li,la=pi[10]*li,Mo=pi[11]*li;for(let fo of kr){let lo=[],Wn=[];for(let Ro of fo){let uo=Ro.x,$o=Ro.y,Ju=pi[0]*uo+pi[4]*$o+pi[12],Ou=pi[1]*uo+pi[5]*$o+pi[13],kh=pi[2]*uo+pi[6]*$o+pi[14],Qv=pi[3]*uo+pi[7]*$o+pi[15],ud=kh+pa,Ch=Qv+ro,Vd=Ju+Vo,Gd=Ou+Xa,Hd=kh+la,Af=Qv+Mo,Lh=new u((Ju+ln)/Ch,(Ou+Tn)/Ch);Lh.z=ud/Ch,lo.push(Lh);let Ed=new u(Vd/Af,Gd/Af);Ed.z=Hd/Af,Wn.push(Ed)}vn.push(lo),zi.push(Wn)}return[vn,zi]}(te,tr,Rt,Ke);return function(kr,Dr,li){let pi=1/0;bt(li,Dr)&&(pi=Kv(li,Dr[0]));for(let vn=0;vn<Dr.length;vn++){let zi=Dr[vn],ln=kr[vn];for(let Tn=0;Tn<zi.length-1;Tn++){let pa=zi[Tn],ro=[pa,zi[Tn+1],ln[Tn+1],ln[Tn],pa];Sc(li,ro)&&(pi=Math.min(pi,Kv(li,ro)))}}return pi!==1/0&&pi}(vr[0],vr[1],ur)}}function wd(R,A){return R.x*A.x+R.y*A.y}function Kv(R,A){if(R.length===1){let F=0,W=A[F++],te;for(;!te||W.equals(te);)if(te=A[F++],!te)return 1/0;for(;F<A.length;F++){let fe=A[F],pe=R[0],Re=te.sub(W),Ke=fe.sub(W),ft=pe.sub(W),Rt=wd(Re,Re),tr=wd(Re,Ke),ur=wd(Ke,Ke),vr=wd(ft,Re),kr=wd(ft,Ke),Dr=Rt*ur-tr*tr,li=(ur*vr-tr*kr)/Dr,pi=(Rt*kr-tr*vr)/Dr,vn=W.z*(1-li-pi)+te.z*li+fe.z*pi;if(isFinite(vn))return vn}return 1/0}{let F=1/0;for(let W of A)F=Math.min(F,W.z);return F}}let hg=ze([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:gp}=hg,Td=ze([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:mp}=Td,Ud=yr.VectorTileFeature.types,Ad=Math.cos(Math.PI/180*37.5),Pv=Math.pow(2,14)/.5;class Jv{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(F=>{this.gradients[F.id]={}}),this.layoutVertexArray=new Lu,this.layoutVertexArray2=new au,this.indexArray=new se,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.hasPattern=ot("line",this.layers,F);let te=this.layers[0].layout.get("line-sort-key"),fe=!te.isConstant(),pe=[];for(let{feature:Re,id:Ke,index:ft,sourceLayerIndex:Rt}of A){let tr=this.layers[0]._featureFilter.needGeometry,ur=Sl(Re,tr);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ur,W))continue;let vr=fe?te.evaluate(ur,{},W):void 0,kr={id:Ke,properties:Re.properties,type:Re.type,sourceLayerIndex:Rt,index:ft,geometry:tr?ur.geometry:$s(Re),patterns:{},sortKey:vr};pe.push(kr)}fe&&pe.sort((Re,Ke)=>Re.sortKey-Ke.sortKey);for(let Re of pe){let{geometry:Ke,index:ft,sourceLayerIndex:Rt}=Re;if(this.hasPattern){let tr=It("line",this.layers,Re,this.zoom,F);this.patternFeatures.push(tr)}else this.addFeature(Re,Ke,ft,W,{});F.featureIndex.insert(A[ft].feature,Ke,ft,Rt,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}addFeatures(A,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=A.createVertexBuffer(this.layoutVertexArray2,mp)),this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,gp),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(A){if(A.properties&&Object.prototype.hasOwnProperty.call(A.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(A.properties,"mapbox_clip_end"))return{start:+A.properties.mapbox_clip_start,end:+A.properties.mapbox_clip_end}}addFeature(A,F,W,te,fe){let pe=this.layers[0].layout,Re=pe.get("line-join").evaluate(A,{}),Ke=pe.get("line-cap"),ft=pe.get("line-miter-limit"),Rt=pe.get("line-round-limit");this.lineClips=this.lineFeatureClips(A);for(let tr of F)this.addLine(tr,A,Re,Ke,ft,Rt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,W,fe,te)}addLine(A,F,W,te,fe,pe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let pi=0;pi<A.length-1;pi++)this.totalDistance+=A[pi].dist(A[pi+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let Re=Ud[F.type]==="Polygon",Ke=A.length;for(;Ke>=2&&A[Ke-1].equals(A[Ke-2]);)Ke--;let ft=0;for(;ft<Ke-1&&A[ft].equals(A[ft+1]);)ft++;if(Ke<(Re?3:2))return;W==="bevel"&&(fe=1.05);let Rt=this.overscaling<=16?15*ja/(512*this.overscaling):0,tr=this.segments.prepareSegment(10*Ke,this.layoutVertexArray,this.indexArray),ur,vr,kr,Dr,li;this.e1=this.e2=-1,Re&&(ur=A[Ke-2],li=A[ft].sub(ur)._unit()._perp());for(let pi=ft;pi<Ke;pi++){if(kr=pi===Ke-1?Re?A[ft+1]:void 0:A[pi+1],kr&&A[pi].equals(kr))continue;li&&(Dr=li),ur&&(vr=ur),ur=A[pi],li=kr?kr.sub(ur)._unit()._perp():Dr,Dr=Dr||li;let vn=Dr.add(li);vn.x===0&&vn.y===0||vn._unit();let zi=Dr.x*li.x+Dr.y*li.y,ln=vn.x*li.x+vn.y*li.y,Tn=ln!==0?1/ln:1/0,pa=2*Math.sqrt(2-2*ln),ro=ln<Ad&&vr&&kr,Vo=Dr.x*li.y-Dr.y*li.x>0;if(ro&&pi>ft){let Mo=ur.dist(vr);if(Mo>2*Rt){let fo=ur.sub(ur.sub(vr)._mult(Rt/Mo)._round());this.updateDistance(vr,fo),this.addCurrentVertex(fo,Dr,0,0,tr),vr=fo}}let Xa=vr&&kr,la=Xa?W:Re?"butt":te;if(Xa&&la==="round"&&(Tn<pe?la="miter":Tn<=2&&(la="fakeround")),la==="miter"&&Tn>fe&&(la="bevel"),la==="bevel"&&(Tn>2&&(la="flipbevel"),Tn<fe&&(la="miter")),vr&&this.updateDistance(vr,ur),la==="miter")vn._mult(Tn),this.addCurrentVertex(ur,vn,0,0,tr);else if(la==="flipbevel"){if(Tn>100)vn=li.mult(-1);else{let Mo=Tn*Dr.add(li).mag()/Dr.sub(li).mag();vn._perp()._mult(Mo*(Vo?-1:1))}this.addCurrentVertex(ur,vn,0,0,tr),this.addCurrentVertex(ur,vn.mult(-1),0,0,tr)}else if(la==="bevel"||la==="fakeround"){let Mo=-Math.sqrt(Tn*Tn-1),fo=Vo?Mo:0,lo=Vo?0:Mo;if(vr&&this.addCurrentVertex(ur,Dr,fo,lo,tr),la==="fakeround"){let Wn=Math.round(180*pa/Math.PI/20);for(let Ro=1;Ro<Wn;Ro++){let uo=Ro/Wn;if(uo!==.5){let Ju=uo-.5;uo+=uo*Ju*(uo-1)*((1.0904+zi*(zi*(3.55645-1.43519*zi)-3.2452))*Ju*Ju+(.848013+zi*(.215638*zi-1.06021)))}let $o=li.sub(Dr)._mult(uo)._add(Dr)._unit()._mult(Vo?-1:1);this.addHalfVertex(ur,$o.x,$o.y,!1,Vo,0,tr)}}kr&&this.addCurrentVertex(ur,li,-fo,-lo,tr)}else if(la==="butt")this.addCurrentVertex(ur,vn,0,0,tr);else if(la==="square"){let Mo=vr?1:-1;this.addCurrentVertex(ur,vn,Mo,Mo,tr)}else la==="round"&&(vr&&(this.addCurrentVertex(ur,Dr,0,0,tr),this.addCurrentVertex(ur,Dr,1,1,tr,!0)),kr&&(this.addCurrentVertex(ur,li,-1,-1,tr,!0),this.addCurrentVertex(ur,li,0,0,tr)));if(ro&&pi<Ke-1){let Mo=ur.dist(kr);if(Mo>2*Rt){let fo=ur.add(kr.sub(ur)._mult(Rt/Mo)._round());this.updateDistance(ur,fo),this.addCurrentVertex(fo,li,0,0,tr),ur=fo}}}}addCurrentVertex(A,F,W,te,fe,pe=!1){let Re=F.y*te-F.x,Ke=-F.y-F.x*te;this.addHalfVertex(A,F.x+F.y*W,F.y-F.x*W,pe,!1,W,fe),this.addHalfVertex(A,Re,Ke,pe,!0,-te,fe),this.distance>Pv/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(A,F,W,te,fe,pe))}addHalfVertex({x:A,y:F},W,te,fe,pe,Re,Ke){let ft=.5*(this.lineClips?this.scaledDistance*(Pv-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((A<<1)+(fe?1:0),(F<<1)+(pe?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(Re===0?0:Re<0?-1:1)|(63&ft)<<2,ft>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Rt=Ke.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rt),Ke.primitiveLength++),pe?this.e2=Rt:this.e1=Rt}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(A,F){this.distance+=A.dist(F),this.updateScaledDistance()}}let Iv,fy;Fi("LineBucket",Jv,{omit:["layers","patternFeatures"]});var dg={get paint(){return fy=fy||new ue({"line-opacity":new oo(ce.paint_line["line-opacity"]),"line-color":new oo(ce.paint_line["line-color"]),"line-translate":new Ua(ce.paint_line["line-translate"]),"line-translate-anchor":new Ua(ce.paint_line["line-translate-anchor"]),"line-width":new oo(ce.paint_line["line-width"]),"line-gap-width":new oo(ce.paint_line["line-gap-width"]),"line-offset":new oo(ce.paint_line["line-offset"]),"line-blur":new oo(ce.paint_line["line-blur"]),"line-dasharray":new hc(ce.paint_line["line-dasharray"]),"line-pattern":new Vc(ce.paint_line["line-pattern"]),"line-gradient":new Ku(ce.paint_line["line-gradient"])})},get layout(){return Iv=Iv||new ue({"line-cap":new Ua(ce.layout_line["line-cap"]),"line-join":new oo(ce.layout_line["line-join"]),"line-miter-limit":new Ua(ce.layout_line["line-miter-limit"]),"line-round-limit":new Ua(ce.layout_line["line-round-limit"]),"line-sort-key":new oo(ce.layout_line["line-sort-key"])})}};class oh extends oo{possiblyEvaluate(A,F){return F=new rs(Math.floor(F.zoom),{now:F.now,fadeDuration:F.fadeDuration,zoomHistory:F.zoomHistory,transition:F.transition}),super.possiblyEvaluate(A,F)}evaluate(A,F,W,te){return F=L({},F,{zoom:Math.floor(F.zoom)}),super.evaluate(A,F,W,te)}}let vg;class hy extends B{constructor(A){super(A,dg),this.gradientVersion=0,vg||(vg=new oh(dg.paint.properties["line-width"].specification),vg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(A){if(A==="line-gradient"){let F=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(F)&&F._styleExpression.expression instanceof _n,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(A,F){super.recalculate(A,F),this.paint._values["line-floorwidth"]=vg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,A)}createBucket(A){return new Jv(A)}queryRadius(A){let F=A,W=Zh(Si("line-width",this,F),Si("line-gap-width",this,F)),te=Si("line-offset",this,F);return W/2+Math.abs(te)+Vn(this.paint.get("line-translate"))}queryIntersectsFeature(A,F,W,te,fe,pe,Re){let Ke=Qi(A,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),pe.angle,Re),ft=Re/2*Zh(this.paint.get("line-width").evaluate(F,W),this.paint.get("line-gap-width").evaluate(F,W)),Rt=this.paint.get("line-offset").evaluate(F,W);return Rt&&(te=function(tr,ur){let vr=[];for(let kr=0;kr<tr.length;kr++){let Dr=tr[kr],li=[];for(let pi=0;pi<Dr.length;pi++){let vn=Dr[pi-1],zi=Dr[pi],ln=Dr[pi+1],Tn=pi===0?new u(0,0):zi.sub(vn)._unit()._perp(),pa=pi===Dr.length-1?new u(0,0):ln.sub(zi)._unit()._perp(),ro=Tn._add(pa)._unit(),Vo=ro.x*pa.x+ro.y*pa.y;Vo!==0&&ro._mult(1/Vo),li.push(ro._mult(ur)._add(zi))}vr.push(li)}return vr}(te,Rt*Re)),function(tr,ur,vr){for(let kr=0;kr<ur.length;kr++){let Dr=ur[kr];if(tr.length>=3){for(let li=0;li<Dr.length;li++)if(Ni(tr,Dr[li]))return!0}if(Ot(tr,Dr,vr))return!0}return!1}(Ke,te,ft)}isTileClipped(){return!0}}function Zh(R,A){return A>0?A+2*R:R}let am=ze([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),k1=ze([{name:"a_projected_pos",components:3,type:"Float32"}],4);ze([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let C1=ze([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ze([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let dy=ze([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),om=ze([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function sm(R,A,F){return R.sections.forEach(W=>{W.text=function(te,fe,pe){let Re=fe.layout.get("text-transform").evaluate(pe,{});return Re==="uppercase"?te=te.toLocaleUpperCase():Re==="lowercase"&&(te=te.toLocaleLowerCase()),ys.applyArabicShaping&&(te=ys.applyArabicShaping(te)),te}(W.text,A,F)}),R}ze([{name:"triangle",components:3,type:"Uint16"}]),ze([{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"}]),ze([{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"}]),ze([{type:"Float32",name:"offsetX"}]),ze([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ze([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let vc={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var tu=24,Sd=wu,vy=function(R,A,F,W,te){var fe,pe,Re=8*te-W-1,Ke=(1<<Re)-1,ft=Ke>>1,Rt=-7,tr=F?te-1:0,ur=F?-1:1,vr=R[A+tr];for(tr+=ur,fe=vr&(1<<-Rt)-1,vr>>=-Rt,Rt+=Re;Rt>0;fe=256*fe+R[A+tr],tr+=ur,Rt-=8);for(pe=fe&(1<<-Rt)-1,fe>>=-Rt,Rt+=W;Rt>0;pe=256*pe+R[A+tr],tr+=ur,Rt-=8);if(fe===0)fe=1-ft;else{if(fe===Ke)return pe?NaN:1/0*(vr?-1:1);pe+=Math.pow(2,W),fe-=ft}return(vr?-1:1)*pe*Math.pow(2,fe-W)},L1=function(R,A,F,W,te,fe){var pe,Re,Ke,ft=8*fe-te-1,Rt=(1<<ft)-1,tr=Rt>>1,ur=te===23?Math.pow(2,-24)-Math.pow(2,-77):0,vr=W?0:fe-1,kr=W?1:-1,Dr=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(Re=isNaN(A)?1:0,pe=Rt):(pe=Math.floor(Math.log(A)/Math.LN2),A*(Ke=Math.pow(2,-pe))<1&&(pe--,Ke*=2),(A+=pe+tr>=1?ur/Ke:ur*Math.pow(2,1-tr))*Ke>=2&&(pe++,Ke/=2),pe+tr>=Rt?(Re=0,pe=Rt):pe+tr>=1?(Re=(A*Ke-1)*Math.pow(2,te),pe+=tr):(Re=A*Math.pow(2,tr-1)*Math.pow(2,te),pe=0));te>=8;R[F+vr]=255&Re,vr+=kr,Re/=256,te-=8);for(pe=pe<<te|Re,ft+=te;ft>0;R[F+vr]=255&pe,vr+=kr,pe/=256,ft-=8);R[F+vr-kr]|=128*Dr};function wu(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}wu.Varint=0,wu.Fixed64=1,wu.Bytes=2,wu.Fixed32=5;var Yx=4294967296,lm=1/Yx,Ow=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");function Rv(R){return R.type===wu.Bytes?R.readVarint()+R.pos:R.pos+1}function um(R,A,F){return F?4294967296*A+(R>>>0):4294967296*(A>>>0)+(R>>>0)}function Bw(R,A,F){var W=A<=16383?1:A<=2097151?2:A<=268435455?3:Math.floor(Math.log(A)/(7*Math.LN2));F.realloc(W);for(var te=F.pos-1;te>=R;te--)F.buf[te+W]=F.buf[te]}function Kx(R,A){for(var F=0;F<R.length;F++)A.writeVarint(R[F])}function V9(R,A){for(var F=0;F<R.length;F++)A.writeSVarint(R[F])}function G9(R,A){for(var F=0;F<R.length;F++)A.writeFloat(R[F])}function H9(R,A){for(var F=0;F<R.length;F++)A.writeDouble(R[F])}function j9(R,A){for(var F=0;F<R.length;F++)A.writeBoolean(R[F])}function qQ(R,A){for(var F=0;F<R.length;F++)A.writeFixed32(R[F])}function W9(R,A){for(var F=0;F<R.length;F++)A.writeSFixed32(R[F])}function X9(R,A){for(var F=0;F<R.length;F++)A.writeFixed64(R[F])}function Z9(R,A){for(var F=0;F<R.length;F++)A.writeSFixed64(R[F])}function py(R,A){return(R[A]|R[A+1]<<8|R[A+2]<<16)+16777216*R[A+3]}function Jx(R,A,F){R[F]=A,R[F+1]=A>>>8,R[F+2]=A>>>16,R[F+3]=A>>>24}function SC(R,A){return(R[A]|R[A+1]<<8|R[A+2]<<16)+(R[A+3]<<24)}wu.prototype={destroy:function(){this.buf=null},readFields:function(R,A,F){for(F=F||this.length;this.pos<F;){var W=this.readVarint(),te=W>>3,fe=this.pos;this.type=7&W,R(te,A,this),this.pos===fe&&this.skip(W)}return A},readMessage:function(R,A){return this.readFields(R,A,this.readVarint()+this.pos)},readFixed32:function(){var R=py(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=SC(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=py(this.buf,this.pos)+py(this.buf,this.pos+4)*Yx;return this.pos+=8,R},readSFixed64:function(){var R=py(this.buf,this.pos)+SC(this.buf,this.pos+4)*Yx;return this.pos+=8,R},readFloat:function(){var R=vy(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=vy(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var A,F,W=this.buf;return A=127&(F=W[this.pos++]),F<128?A:(A|=(127&(F=W[this.pos++]))<<7,F<128?A:(A|=(127&(F=W[this.pos++]))<<14,F<128?A:(A|=(127&(F=W[this.pos++]))<<21,F<128?A:function(te,fe,pe){var Re,Ke,ft=pe.buf;if(Re=(112&(Ke=ft[pe.pos++]))>>4,Ke<128||(Re|=(127&(Ke=ft[pe.pos++]))<<3,Ke<128)||(Re|=(127&(Ke=ft[pe.pos++]))<<10,Ke<128)||(Re|=(127&(Ke=ft[pe.pos++]))<<17,Ke<128)||(Re|=(127&(Ke=ft[pe.pos++]))<<24,Ke<128)||(Re|=(1&(Ke=ft[pe.pos++]))<<31,Ke<128))return um(te,Re,fe);throw new Error("Expected varint not more than 10 bytes")}(A|=(15&(F=W[this.pos]))<<28,R,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var R=this.readVarint();return R%2==1?(R+1)/-2:R/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var R=this.readVarint()+this.pos,A=this.pos;return this.pos=R,R-A>=12&&Ow?function(F,W,te){return Ow.decode(F.subarray(W,te))}(this.buf,A,R):function(F,W,te){for(var fe="",pe=W;pe<te;){var Re,Ke,ft,Rt=F[pe],tr=null,ur=Rt>239?4:Rt>223?3:Rt>191?2:1;if(pe+ur>te)break;ur===1?Rt<128&&(tr=Rt):ur===2?(192&(Re=F[pe+1]))==128&&(tr=(31&Rt)<<6|63&Re)<=127&&(tr=null):ur===3?(Ke=F[pe+2],(192&(Re=F[pe+1]))==128&&(192&Ke)==128&&((tr=(15&Rt)<<12|(63&Re)<<6|63&Ke)<=2047||tr>=55296&&tr<=57343)&&(tr=null)):ur===4&&(Ke=F[pe+2],ft=F[pe+3],(192&(Re=F[pe+1]))==128&&(192&Ke)==128&&(192&ft)==128&&((tr=(15&Rt)<<18|(63&Re)<<12|(63&Ke)<<6|63&ft)<=65535||tr>=1114112)&&(tr=null)),tr===null?(tr=65533,ur=1):tr>65535&&(tr-=65536,fe+=String.fromCharCode(tr>>>10&1023|55296),tr=56320|1023&tr),fe+=String.fromCharCode(tr),pe+=ur}return fe}(this.buf,A,R)},readBytes:function(){var R=this.readVarint()+this.pos,A=this.buf.subarray(this.pos,R);return this.pos=R,A},readPackedVarint:function(R,A){if(this.type!==wu.Bytes)return R.push(this.readVarint(A));var F=Rv(this);for(R=R||[];this.pos<F;)R.push(this.readVarint(A));return R},readPackedSVarint:function(R){if(this.type!==wu.Bytes)return R.push(this.readSVarint());var A=Rv(this);for(R=R||[];this.pos<A;)R.push(this.readSVarint());return R},readPackedBoolean:function(R){if(this.type!==wu.Bytes)return R.push(this.readBoolean());var A=Rv(this);for(R=R||[];this.pos<A;)R.push(this.readBoolean());return R},readPackedFloat:function(R){if(this.type!==wu.Bytes)return R.push(this.readFloat());var A=Rv(this);for(R=R||[];this.pos<A;)R.push(this.readFloat());return R},readPackedDouble:function(R){if(this.type!==wu.Bytes)return R.push(this.readDouble());var A=Rv(this);for(R=R||[];this.pos<A;)R.push(this.readDouble());return R},readPackedFixed32:function(R){if(this.type!==wu.Bytes)return R.push(this.readFixed32());var A=Rv(this);for(R=R||[];this.pos<A;)R.push(this.readFixed32());return R},readPackedSFixed32:function(R){if(this.type!==wu.Bytes)return R.push(this.readSFixed32());var A=Rv(this);for(R=R||[];this.pos<A;)R.push(this.readSFixed32());return R},readPackedFixed64:function(R){if(this.type!==wu.Bytes)return R.push(this.readFixed64());var A=Rv(this);for(R=R||[];this.pos<A;)R.push(this.readFixed64());return R},readPackedSFixed64:function(R){if(this.type!==wu.Bytes)return R.push(this.readSFixed64());var A=Rv(this);for(R=R||[];this.pos<A;)R.push(this.readSFixed64());return R},skip:function(R){var A=7&R;if(A===wu.Varint)for(;this.buf[this.pos++]>127;);else if(A===wu.Bytes)this.pos=this.readVarint()+this.pos;else if(A===wu.Fixed32)this.pos+=4;else{if(A!==wu.Fixed64)throw new Error("Unimplemented type: "+A);this.pos+=8}},writeTag:function(R,A){this.writeVarint(R<<3|A)},realloc:function(R){for(var A=this.length||16;A<this.pos+R;)A*=2;if(A!==this.length){var F=new Uint8Array(A);F.set(this.buf),this.buf=F,this.length=A}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(R){this.realloc(4),Jx(this.buf,R,this.pos),this.pos+=4},writeSFixed32:function(R){this.realloc(4),Jx(this.buf,R,this.pos),this.pos+=4},writeFixed64:function(R){this.realloc(8),Jx(this.buf,-1&R,this.pos),Jx(this.buf,Math.floor(R*lm),this.pos+4),this.pos+=8},writeSFixed64:function(R){this.realloc(8),Jx(this.buf,-1&R,this.pos),Jx(this.buf,Math.floor(R*lm),this.pos+4),this.pos+=8},writeVarint:function(R){(R=+R||0)>268435455||R<0?function(A,F){var W,te;if(A>=0?(W=A%4294967296|0,te=A/4294967296|0):(te=~(-A/4294967296),4294967295^(W=~(-A%4294967296))?W=W+1|0:(W=0,te=te+1|0)),A>=18446744073709552e3||A<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");F.realloc(10),function(fe,pe,Re){Re.buf[Re.pos++]=127&fe|128,fe>>>=7,Re.buf[Re.pos++]=127&fe|128,fe>>>=7,Re.buf[Re.pos++]=127&fe|128,fe>>>=7,Re.buf[Re.pos++]=127&fe|128,Re.buf[Re.pos]=127&(fe>>>=7)}(W,0,F),function(fe,pe){var Re=(7&fe)<<4;pe.buf[pe.pos++]|=Re|((fe>>>=3)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe)))))}(te,F)}(R,this):(this.realloc(4),this.buf[this.pos++]=127&R|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=R>>>7&127))))},writeSVarint:function(R){this.writeVarint(R<0?2*-R-1:2*R)},writeBoolean:function(R){this.writeVarint(!!R)},writeString:function(R){R=String(R),this.realloc(4*R.length),this.pos++;var A=this.pos;this.pos=function(W,te,fe){for(var pe,Re,Ke=0;Ke<te.length;Ke++){if((pe=te.charCodeAt(Ke))>55295&&pe<57344){if(!Re){pe>56319||Ke+1===te.length?(W[fe++]=239,W[fe++]=191,W[fe++]=189):Re=pe;continue}if(pe<56320){W[fe++]=239,W[fe++]=191,W[fe++]=189,Re=pe;continue}pe=Re-55296<<10|pe-56320|65536,Re=null}else Re&&(W[fe++]=239,W[fe++]=191,W[fe++]=189,Re=null);pe<128?W[fe++]=pe:(pe<2048?W[fe++]=pe>>6|192:(pe<65536?W[fe++]=pe>>12|224:(W[fe++]=pe>>18|240,W[fe++]=pe>>12&63|128),W[fe++]=pe>>6&63|128),W[fe++]=63&pe|128)}return fe}(this.buf,R,this.pos);var F=this.pos-A;F>=128&&Bw(A,F,this),this.pos=A-1,this.writeVarint(F),this.pos+=F},writeFloat:function(R){this.realloc(4),L1(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),L1(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var A=R.length;this.writeVarint(A),this.realloc(A);for(var F=0;F<A;F++)this.buf[this.pos++]=R[F]},writeRawMessage:function(R,A){this.pos++;var F=this.pos;R(A,this);var W=this.pos-F;W>=128&&Bw(F,W,this),this.pos=F-1,this.writeVarint(W),this.pos+=W},writeMessage:function(R,A,F){this.writeTag(R,wu.Bytes),this.writeRawMessage(A,F)},writePackedVarint:function(R,A){A.length&&this.writeMessage(R,Kx,A)},writePackedSVarint:function(R,A){A.length&&this.writeMessage(R,V9,A)},writePackedBoolean:function(R,A){A.length&&this.writeMessage(R,j9,A)},writePackedFloat:function(R,A){A.length&&this.writeMessage(R,G9,A)},writePackedDouble:function(R,A){A.length&&this.writeMessage(R,H9,A)},writePackedFixed32:function(R,A){A.length&&this.writeMessage(R,qQ,A)},writePackedSFixed32:function(R,A){A.length&&this.writeMessage(R,W9,A)},writePackedFixed64:function(R,A){A.length&&this.writeMessage(R,X9,A)},writePackedSFixed64:function(R,A){A.length&&this.writeMessage(R,Z9,A)},writeBytesField:function(R,A){this.writeTag(R,wu.Bytes),this.writeBytes(A)},writeFixed32Field:function(R,A){this.writeTag(R,wu.Fixed32),this.writeFixed32(A)},writeSFixed32Field:function(R,A){this.writeTag(R,wu.Fixed32),this.writeSFixed32(A)},writeFixed64Field:function(R,A){this.writeTag(R,wu.Fixed64),this.writeFixed64(A)},writeSFixed64Field:function(R,A){this.writeTag(R,wu.Fixed64),this.writeSFixed64(A)},writeVarintField:function(R,A){this.writeTag(R,wu.Varint),this.writeVarint(A)},writeSVarintField:function(R,A){this.writeTag(R,wu.Varint),this.writeSVarint(A)},writeStringField:function(R,A){this.writeTag(R,wu.Bytes),this.writeString(A)},writeFloatField:function(R,A){this.writeTag(R,wu.Fixed32),this.writeFloat(A)},writeDoubleField:function(R,A){this.writeTag(R,wu.Fixed64),this.writeDouble(A)},writeBooleanField:function(R,A){this.writeVarintField(R,!!A)}};var lS=o(Sd);let uS=3;function OQ(R,A,F){R===1&&F.readMessage(Y9,A)}function Y9(R,A,F){if(R===3){let{id:W,bitmap:te,width:fe,height:pe,left:Re,top:Ke,advance:ft}=F.readMessage(MC,{});A.push({id:W,bitmap:new aa({width:fe+2*uS,height:pe+2*uS},te),metrics:{width:fe,height:pe,left:Re,top:Ke,advance:ft}})}}function MC(R,A,F){R===1?A.id=F.readVarint():R===2?A.bitmap=F.readBytes():R===3?A.width=F.readVarint():R===4?A.height=F.readVarint():R===5?A.left=F.readSVarint():R===6?A.top=F.readSVarint():R===7&&(A.advance=F.readVarint())}let EC=uS;function cS(R){let A=0,F=0;for(let pe of R)A+=pe.w*pe.h,F=Math.max(F,pe.w);R.sort((pe,Re)=>Re.h-pe.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(A/.95)),F),h:1/0}],te=0,fe=0;for(let pe of R)for(let Re=W.length-1;Re>=0;Re--){let Ke=W[Re];if(!(pe.w>Ke.w||pe.h>Ke.h)){if(pe.x=Ke.x,pe.y=Ke.y,fe=Math.max(fe,pe.y+pe.h),te=Math.max(te,pe.x+pe.w),pe.w===Ke.w&&pe.h===Ke.h){let ft=W.pop();Re<W.length&&(W[Re]=ft)}else pe.h===Ke.h?(Ke.x+=pe.w,Ke.w-=pe.w):pe.w===Ke.w?(Ke.y+=pe.h,Ke.h-=pe.h):(W.push({x:Ke.x+pe.w,y:Ke.y,w:Ke.w-pe.w,h:pe.h}),Ke.y+=pe.h,Ke.h-=pe.h);break}}return{w:te,h:fe,fill:A/(te*fe)||0}}let Md=1;class Nw{constructor(A,{pixelRatio:F,version:W,stretchX:te,stretchY:fe,content:pe,textFitWidth:Re,textFitHeight:Ke}){this.paddedRect=A,this.pixelRatio=F,this.stretchX=te,this.stretchY=fe,this.content=pe,this.version=W,this.textFitWidth=Re,this.textFitHeight=Ke}get tl(){return[this.paddedRect.x+Md,this.paddedRect.y+Md]}get br(){return[this.paddedRect.x+this.paddedRect.w-Md,this.paddedRect.y+this.paddedRect.h-Md]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Md)/this.pixelRatio,(this.paddedRect.h-2*Md)/this.pixelRatio]}}class Uw{constructor(A,F){let W={},te={};this.haveRenderCallbacks=[];let fe=[];this.addImages(A,W,fe),this.addImages(F,te,fe);let{w:pe,h:Re}=cS(fe),Ke=new Ki({width:pe||1,height:Re||1});for(let ft in A){let Rt=A[ft],tr=W[ft].paddedRect;Ki.copy(Rt.data,Ke,{x:0,y:0},{x:tr.x+Md,y:tr.y+Md},Rt.data)}for(let ft in F){let Rt=F[ft],tr=te[ft].paddedRect,ur=tr.x+Md,vr=tr.y+Md,kr=Rt.data.width,Dr=Rt.data.height;Ki.copy(Rt.data,Ke,{x:0,y:0},{x:ur,y:vr},Rt.data),Ki.copy(Rt.data,Ke,{x:0,y:Dr-1},{x:ur,y:vr-1},{width:kr,height:1}),Ki.copy(Rt.data,Ke,{x:0,y:0},{x:ur,y:vr+Dr},{width:kr,height:1}),Ki.copy(Rt.data,Ke,{x:kr-1,y:0},{x:ur-1,y:vr},{width:1,height:Dr}),Ki.copy(Rt.data,Ke,{x:0,y:0},{x:ur+kr,y:vr},{width:1,height:Dr})}this.image=Ke,this.iconPositions=W,this.patternPositions=te}addImages(A,F,W){for(let te in A){let fe=A[te],pe={x:0,y:0,w:fe.data.width+2*Md,h:fe.data.height+2*Md};W.push(pe),F[te]=new Nw(pe,fe),fe.hasRenderCallback&&this.haveRenderCallbacks.push(te)}}patchUpdatedImages(A,F){A.dispatchRenderCallbacks(this.haveRenderCallbacks);for(let W in A.updatedImages)this.patchUpdatedImage(this.iconPositions[W],A.getImage(W),F),this.patchUpdatedImage(this.patternPositions[W],A.getImage(W),F)}patchUpdatedImage(A,F,W){if(!A||!F||A.version===F.version)return;A.version=F.version;let[te,fe]=A.tl;W.update(F.data,void 0,{x:te,y:fe})}}var Dv;Fi("ImagePosition",Nw),Fi("ImageAtlas",Uw),i.ah=void 0,(Dv=i.ah||(i.ah={}))[Dv.none=0]="none",Dv[Dv.horizontal=1]="horizontal",Dv[Dv.vertical=2]="vertical",Dv[Dv.horizontalOnly=3]="horizontalOnly";let Eh=-17;class $x{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(A,F){let W=new $x;return W.scale=A||1,W.fontStack=F,W}static forImage(A){let F=new $x;return F.imageName=A,F}}class P1{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(A,F){let W=new P1;for(let te=0;te<A.sections.length;te++){let fe=A.sections[te];fe.image?W.addImageSection(fe):W.addTextSection(fe,F)}return W}length(){return this.text.length}getSection(A){return this.sections[this.sectionIndex[A]]}getSectionIndex(A){return this.sectionIndex[A]}getCharCode(A){return this.text.charCodeAt(A)}verticalizePunctuation(){this.text=function(A){let F="";for(let W=0;W<A.length;W++){let te=A.charCodeAt(W+1)||null,fe=A.charCodeAt(W-1)||null;F+=te&&ml(te)&&!vc[A[W+1]]||fe&&ml(fe)&&!vc[A[W-1]]||!vc[A[W]]?A[W]:vc[A[W]]}return F}(this.text)}trim(){let A=0;for(let W=0;W<this.text.length&&Vw[this.text.charCodeAt(W)];W++)A++;let F=this.text.length;for(let W=this.text.length-1;W>=0&&W>=A&&Vw[this.text.charCodeAt(W)];W--)F--;this.text=this.text.substring(A,F),this.sectionIndex=this.sectionIndex.slice(A,F)}substring(A,F){let W=new P1;return W.text=this.text.substring(A,F),W.sectionIndex=this.sectionIndex.slice(A,F),W.sections=this.sections,W}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((A,F)=>Math.max(A,this.sections[F].scale),0)}addTextSection(A,F){this.text+=A.text,this.sections.push($x.forText(A.scale,A.fontStack||F));let W=this.sections.length-1;for(let te=0;te<A.text.length;++te)this.sectionIndex.push(W)}addImageSection(A){let F=A.image?A.image.name:"";if(F.length===0)return void E("Can't add FormattedSection with an empty image.");let W=this.getNextImageSectionCharCode();W?(this.text+=String.fromCharCode(W),this.sections.push($x.forImage(F)),this.sectionIndex.push(this.sections.length-1)):E("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Qx(R,A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr){let Dr=P1.fromFeature(R,te),li;tr===i.ah.vertical&&Dr.verticalizePunctuation();let{processBidirectionalText:pi,processStyledBidirectionalText:vn}=ys;if(pi&&Dr.sections.length===1){li=[];let Tn=pi(Dr.toString(),I1(Dr,ft,fe,A,W,vr));for(let pa of Tn){let ro=new P1;ro.text=pa,ro.sections=Dr.sections;for(let Vo=0;Vo<pa.length;Vo++)ro.sectionIndex.push(0);li.push(ro)}}else if(vn){li=[];let Tn=vn(Dr.text,Dr.sectionIndex,I1(Dr,ft,fe,A,W,vr));for(let pa of Tn){let ro=new P1;ro.text=pa[0],ro.sectionIndex=pa[1],ro.sections=Dr.sections,li.push(ro)}}else li=function(Tn,pa){let ro=[],Vo=Tn.text,Xa=0;for(let la of pa)ro.push(Tn.substring(Xa,la)),Xa=la;return Xa<Vo.length&&ro.push(Tn.substring(Xa,Vo.length)),ro}(Dr,I1(Dr,ft,fe,A,W,vr));let zi=[],ln={positionedLines:zi,text:Dr.toString(),top:Rt[1],bottom:Rt[1],left:Rt[0],right:Rt[0],writingMode:tr,iconsInText:!1,verticalizable:!1};return function(Tn,pa,ro,Vo,Xa,la,Mo,fo,lo,Wn,Ro,uo){let $o=0,Ju=Eh,Ou=0,kh=0,Qv=fo==="right"?1:fo==="left"?0:.5,ud=0;for(let Af of Xa){Af.trim();let Lh=Af.getMaxScale(),Ed=(Lh-1)*tu,cd={positionedGlyphs:[],lineOffset:0};Tn.positionedLines[ud]=cd;let Yh=cd.positionedGlyphs,Df=0;if(!Af.length()){Ju+=la,++ud;continue}for(let lv=0;lv<Af.length();lv++){let ru=Af.getSection(lv),pc=Af.getSectionIndex(lv),$u=Af.getCharCode(lv),zv=0,ff=null,O1=null,p0=null,Gp=tu,ep=!(lo===i.ah.horizontal||!Ro&&!Ho($u)||Ro&&(Vw[$u]||(Ch=$u,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(Ch)))));if(ru.imageName){let Gc=Vo[ru.imageName];if(!Gc)continue;p0=ru.imageName,Tn.iconsInText=Tn.iconsInText||!0,O1=Gc.paddedRect;let Yf=Gc.displaySize;ru.scale=ru.scale*tu/uo,ff={width:Yf[0],height:Yf[1],left:Md,top:-EC,advance:ep?Yf[1]:Yf[0]},zv=Ed+(tu-Yf[1]*ru.scale),Gp=ff.advance;let tp=ep?Yf[0]*ru.scale-tu*Lh:Yf[1]*ru.scale-tu*Lh;tp>0&&tp>Df&&(Df=tp)}else{let Gc=ro[ru.fontStack],Yf=Gc&&Gc[$u];if(Yf&&Yf.rect)O1=Yf.rect,ff=Yf.metrics;else{let tp=pa[ru.fontStack],yg=tp&&tp[$u];if(!yg)continue;ff=yg.metrics}zv=(Lh-ru.scale)*tu}ep?(Tn.verticalizable=!0,Yh.push({glyph:$u,imageName:p0,x:$o,y:Ju+zv,vertical:ep,scale:ru.scale,fontStack:ru.fontStack,sectionIndex:pc,metrics:ff,rect:O1}),$o+=Gp*ru.scale+Wn):(Yh.push({glyph:$u,imageName:p0,x:$o,y:Ju+zv,vertical:ep,scale:ru.scale,fontStack:ru.fontStack,sectionIndex:pc,metrics:ff,rect:O1}),$o+=ff.advance*ru.scale+Wn)}Yh.length!==0&&(Ou=Math.max($o-Wn,Ou),cm(Yh,0,Yh.length-1,Qv,Df)),$o=0;let Fv=la*Lh+Df;cd.lineOffset=Math.max(Df,Ed),Ju+=Fv,kh=Math.max(Fv,kh),++ud}var Ch;let Vd=Ju-Eh,{horizontalAlign:Gd,verticalAlign:Hd}=Hw(Mo);(function(Af,Lh,Ed,cd,Yh,Df,Fv,lv,ru){let pc=(Lh-Ed)*Yh,$u=0;$u=Df!==Fv?-lv*cd-Eh:(-cd*ru+.5)*Fv;for(let zv of Af)for(let ff of zv.positionedGlyphs)ff.x+=pc,ff.y+=$u})(Tn.positionedLines,Qv,Gd,Hd,Ou,kh,la,Vd,Xa.length),Tn.top+=-Hd*Vd,Tn.bottom=Tn.top+Vd,Tn.left+=-Gd*Ou,Tn.right=Tn.left+Ou}(ln,A,F,W,li,pe,Re,Ke,tr,ft,ur,kr),!function(Tn){for(let pa of Tn)if(pa.positionedGlyphs.length!==0)return!1;return!0}(zi)&&ln}let Vw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},K9={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},J9={40:!0};function kC(R,A,F,W,te,fe){if(A.imageName){let pe=W[A.imageName];return pe?pe.displaySize[0]*A.scale*tu/fe+te:0}{let pe=F[A.fontStack],Re=pe&&pe[R];return Re?Re.metrics.advance*A.scale+te:0}}function CC(R,A,F,W){let te=Math.pow(R-A,2);return W?R<A?te/2:2*te:te+Math.abs(F)*F}function $9(R,A,F){let W=0;return R===10&&(W-=1e4),F&&(W+=150),R!==40&&R!==65288||(W+=50),A!==41&&A!==65289||(W+=50),W}function Gw(R,A,F,W,te,fe){let pe=null,Re=CC(A,F,te,fe);for(let Ke of W){let ft=CC(A-Ke.x,F,te,fe)+Ke.badness;ft<=Re&&(pe=Ke,Re=ft)}return{index:R,x:A,priorBreak:pe,badness:Re}}function LC(R){return R?LC(R.priorBreak).concat(R.index):[]}function I1(R,A,F,W,te,fe){if(!R)return[];let pe=[],Re=function(tr,ur,vr,kr,Dr,li){let pi=0;for(let vn=0;vn<tr.length();vn++){let zi=tr.getSection(vn);pi+=kC(tr.getCharCode(vn),zi,kr,Dr,ur,li)}return pi/Math.max(1,Math.ceil(pi/vr))}(R,A,F,W,te,fe),Ke=R.text.indexOf("\u200B")>=0,ft=0;for(let tr=0;tr<R.length();tr++){let ur=R.getSection(tr),vr=R.getCharCode(tr);if(Vw[vr]||(ft+=kC(vr,ur,W,te,A,fe)),tr<R.length()-1){let kr=!((Rt=vr)<11904)&&(!!Dn["CJK Compatibility Forms"](Rt)||!!Dn["CJK Compatibility"](Rt)||!!Dn["CJK Strokes"](Rt)||!!Dn["CJK Symbols and Punctuation"](Rt)||!!Dn["Enclosed CJK Letters and Months"](Rt)||!!Dn["Halfwidth and Fullwidth Forms"](Rt)||!!Dn["Ideographic Description Characters"](Rt)||!!Dn["Vertical Forms"](Rt)||ws.test(String.fromCodePoint(Rt)));(K9[vr]||kr||ur.imageName||tr!==R.length()-2&&J9[R.getCharCode(tr+1)])&&pe.push(Gw(tr+1,ft,Re,pe,$9(vr,R.getCharCode(tr+1),kr&&Ke),!1))}}var Rt;return LC(Gw(R.length(),ft,Re,pe,0,!0))}function Hw(R){let A=.5,F=.5;switch(R){case"right":case"top-right":case"bottom-right":A=1;break;case"left":case"top-left":case"bottom-left":A=0}switch(R){case"bottom":case"bottom-right":case"bottom-left":F=1;break;case"top":case"top-right":case"top-left":F=0}return{horizontalAlign:A,verticalAlign:F}}function cm(R,A,F,W,te){if(!W&&!te)return;let fe=R[F],pe=(R[F].x+fe.metrics.advance*fe.scale)*W;for(let Re=A;Re<=F;Re++)R[Re].x-=pe,R[Re].y+=te}function eb(R,A,F){let{horizontalAlign:W,verticalAlign:te}=Hw(F),fe=A[0]-R.displaySize[0]*W,pe=A[1]-R.displaySize[1]*te;return{image:R,top:pe,bottom:pe+R.displaySize[1],left:fe,right:fe+R.displaySize[0]}}function PC(R){var A,F;let W=R.left,te=R.top,fe=R.right-W,pe=R.bottom-te,Re=(A=R.image.textFitWidth)!==null&&A!==void 0?A:"stretchOrShrink",Ke=(F=R.image.textFitHeight)!==null&&F!==void 0?F:"stretchOrShrink",ft=(R.image.content[2]-R.image.content[0])/(R.image.content[3]-R.image.content[1]);if(Ke==="proportional"){if(Re==="stretchOnly"&&fe/pe<ft||Re==="proportional"){let Rt=Math.ceil(pe*ft);W*=Rt/fe,fe=Rt}}else if(Re==="proportional"&&Ke==="stretchOnly"&&ft!==0&&fe/pe>ft){let Rt=Math.ceil(fe/ft);te*=Rt/pe,pe=Rt}return{x1:W,y1:te,x2:W+fe,y2:te+pe}}function IC(R,A,F,W,te,fe){let pe=R.image,Re;if(pe.content){let li=pe.content,pi=pe.pixelRatio||1;Re=[li[0]/pi,li[1]/pi,pe.displaySize[0]-li[2]/pi,pe.displaySize[1]-li[3]/pi]}let Ke=A.left*fe,ft=A.right*fe,Rt,tr,ur,vr;F==="width"||F==="both"?(vr=te[0]+Ke-W[3],tr=te[0]+ft+W[1]):(vr=te[0]+(Ke+ft-pe.displaySize[0])/2,tr=vr+pe.displaySize[0]);let kr=A.top*fe,Dr=A.bottom*fe;return F==="height"||F==="both"?(Rt=te[1]+kr-W[0],ur=te[1]+Dr+W[2]):(Rt=te[1]+(kr+Dr-pe.displaySize[1])/2,ur=Rt+pe.displaySize[1]),{image:pe,top:Rt,right:tr,bottom:ur,left:vr,collisionPadding:Re}}let tb=255,v0=128,fm=tb*v0;function RC(R,A){let{expression:F}=A;if(F.kind==="constant")return{kind:"constant",layoutSize:F.evaluate(new rs(R+1))};if(F.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=F,fe=0;for(;fe<W.length&&W[fe]<=R;)fe++;fe=Math.max(0,fe-1);let pe=fe;for(;pe<W.length&&W[pe]<R+1;)pe++;pe=Math.min(W.length-1,pe);let Re=W[fe],Ke=W[pe];return F.kind==="composite"?{kind:"composite",minZoom:Re,maxZoom:Ke,interpolationType:te}:{kind:"camera",minZoom:Re,maxZoom:Ke,minSize:F.evaluate(new rs(Re)),maxSize:F.evaluate(new rs(Ke)),interpolationType:te}}}function fS(R,A,F){let W="never",te=R.get(A);return te?W=te:R.get(F)&&(W="always"),W}let Q9=yr.VectorTileFeature.types,eq=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function jw(R,A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur){let vr=Re?Math.min(fm,Math.round(Re[0])):0,kr=Re?Math.min(fm,Math.round(Re[1])):0;R.emplaceBack(A,F,Math.round(32*W),Math.round(32*te),fe,pe,(vr<<1)+(Ke?1:0),kr,16*ft,16*Rt,256*tr,256*ur)}function hS(R,A,F){R.emplaceBack(A.x,A.y,F),R.emplaceBack(A.x,A.y,F),R.emplaceBack(A.x,A.y,F),R.emplaceBack(A.x,A.y,F)}function dS(R){for(let A of R.sections)if(no(A.text))return!0;return!1}class vS{constructor(A){this.layoutVertexArray=new eu,this.indexArray=new se,this.programConfigurations=A,this.segments=new Ye,this.dynamicLayoutVertexArray=new dc,this.opacityVertexArray=new Tl,this.hasVisibleVertices=!1,this.placedSymbolArray=new Aa}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(A,F,W,te){this.isEmpty()||(W&&(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,am.members),this.indexBuffer=A.createIndexBuffer(this.indexArray,F),this.dynamicLayoutVertexBuffer=A.createVertexBuffer(this.dynamicLayoutVertexArray,k1.members,!0),this.opacityVertexBuffer=A.createVertexBuffer(this.opacityVertexArray,eq,!0),this.opacityVertexBuffer.itemSize=1),(W||te)&&this.programConfigurations.upload(A))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}Fi("SymbolBuffers",vS);class hm{constructor(A,F,W){this.layoutVertexArray=new A,this.layoutAttributes=F,this.indexArray=new W,this.segments=new Ye,this.collisionVertexArray=new X}upload(A){this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=A.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=A.createVertexBuffer(this.collisionVertexArray,C1.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}Fi("CollisionBuffers",hm);class R1{constructor(A){this.collisionBoxArray=A.collisionBoxArray,this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(pe=>pe.id),this.index=A.index,this.pixelRatio=A.pixelRatio,this.sourceLayerIndex=A.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ii([]),this.placementViewportMatrix=Ii([]);let F=this.layers[0]._unevaluatedLayout._values;this.textSizeData=RC(this.zoom,F["text-size"]),this.iconSizeData=RC(this.zoom,F["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),fe=W.get("symbol-z-order");this.canOverlap=fS(W,"text-overlap","text-allow-overlap")!=="never"||fS(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=fe!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(fe==="viewport-y"||fe==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(pe=>i.ah[pe])),this.stateDependentLayerIds=this.layers.filter(pe=>pe.isStateDependent()).map(pe=>pe.id),this.sourceID=A.sourceID}createArrays(){this.text=new vS(new Ms(this.layers,this.zoom,A=>/^text/.test(A))),this.icon=new vS(new Ms(this.layers,this.zoom,A=>/^icon/.test(A))),this.glyphOffsetArray=new Co,this.lineVertexArray=new Qa,this.symbolInstances=new $a,this.textAnchorOffsets=new Bo}calculateGlyphDependencies(A,F,W,te,fe){for(let pe=0;pe<A.length;pe++)if(F[A.charCodeAt(pe)]=!0,(W||te)&&fe){let Re=vc[A.charAt(pe)];Re&&(F[Re.charCodeAt(0)]=!0)}}populate(A,F,W){let te=this.layers[0],fe=te.layout,pe=fe.get("text-font"),Re=fe.get("text-field"),Ke=fe.get("icon-image"),ft=(Re.value.kind!=="constant"||Re.value.value instanceof ti&&!Re.value.value.isEmpty()||Re.value.value.toString().length>0)&&(pe.value.kind!=="constant"||pe.value.value.length>0),Rt=Ke.value.kind!=="constant"||!!Ke.value.value||Object.keys(Ke.parameters).length>0,tr=fe.get("symbol-sort-key");if(this.features=[],!ft&&!Rt)return;let ur=F.iconDependencies,vr=F.glyphDependencies,kr=F.availableImages,Dr=new rs(this.zoom);for(let{feature:li,id:pi,index:vn,sourceLayerIndex:zi}of A){let ln=te._featureFilter.needGeometry,Tn=Sl(li,ln);if(!te._featureFilter.filter(Dr,Tn,W))continue;let pa,ro;if(ln||(Tn.geometry=$s(li)),ft){let Xa=te.getValueAndResolveTokens("text-field",Tn,W,kr),la=ti.factory(Xa),Mo=this.hasRTLText=this.hasRTLText||dS(la);(!Mo||ys.getRTLTextPluginStatus()==="unavailable"||Mo&&ys.isParsed())&&(pa=sm(la,te,Tn))}if(Rt){let Xa=te.getValueAndResolveTokens("icon-image",Tn,W,kr);ro=Xa instanceof en?Xa:en.fromString(Xa)}if(!pa&&!ro)continue;let Vo=this.sortFeaturesByKey?tr.evaluate(Tn,{},W):void 0;if(this.features.push({id:pi,text:pa,icon:ro,index:vn,sourceLayerIndex:zi,geometry:Tn.geometry,properties:li.properties,type:Q9[li.type],sortKey:Vo}),ro&&(ur[ro.name]=!0),pa){let Xa=pe.evaluate(Tn,{},W).join(","),la=fe.get("text-rotation-alignment")!=="viewport"&&fe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let Mo of pa.sections)if(Mo.image)ur[Mo.image.name]=!0;else{let fo=Ka(pa.toString()),lo=Mo.fontStack||Xa,Wn=vr[lo]=vr[lo]||{};this.calculateGlyphDependencies(Mo.text,Wn,la,this.allowVerticalPlacement,fo)}}}fe.get("symbol-placement")==="line"&&(this.features=function(li){let pi={},vn={},zi=[],ln=0;function Tn(Xa){zi.push(li[Xa]),ln++}function pa(Xa,la,Mo){let fo=vn[Xa];return delete vn[Xa],vn[la]=fo,zi[fo].geometry[0].pop(),zi[fo].geometry[0]=zi[fo].geometry[0].concat(Mo[0]),fo}function ro(Xa,la,Mo){let fo=pi[la];return delete pi[la],pi[Xa]=fo,zi[fo].geometry[0].shift(),zi[fo].geometry[0]=Mo[0].concat(zi[fo].geometry[0]),fo}function Vo(Xa,la,Mo){let fo=Mo?la[0][la[0].length-1]:la[0][0];return`${Xa}:${fo.x}:${fo.y}`}for(let Xa=0;Xa<li.length;Xa++){let la=li[Xa],Mo=la.geometry,fo=la.text?la.text.toString():null;if(!fo){Tn(Xa);continue}let lo=Vo(fo,Mo),Wn=Vo(fo,Mo,!0);if(lo in vn&&Wn in pi&&vn[lo]!==pi[Wn]){let Ro=ro(lo,Wn,Mo),uo=pa(lo,Wn,zi[Ro].geometry);delete pi[lo],delete vn[Wn],vn[Vo(fo,zi[uo].geometry,!0)]=uo,zi[Ro].geometry=null}else lo in vn?pa(lo,Wn,Mo):Wn in pi?ro(lo,Wn,Mo):(Tn(Xa),pi[lo]=ln-1,vn[Wn]=ln-1)}return zi.filter(Xa=>Xa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((li,pi)=>li.sortKey-pi.sortKey)}update(A,F,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(A,F,this.layers,W),this.icon.programConfigurations.updatePaintArrays(A,F,this.layers,W))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(A){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(A),this.iconCollisionBox.upload(A)),this.text.upload(A,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(A,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(A,F){let W=this.lineVertexArray.length;if(A.segment!==void 0){let te=A.dist(F[A.segment+1]),fe=A.dist(F[A.segment]),pe={};for(let Re=A.segment+1;Re<F.length;Re++)pe[Re]={x:F[Re].x,y:F[Re].y,tileUnitDistanceFromAnchor:te},Re<F.length-1&&(te+=F[Re+1].dist(F[Re]));for(let Re=A.segment||0;Re>=0;Re--)pe[Re]={x:F[Re].x,y:F[Re].y,tileUnitDistanceFromAnchor:fe},Re>0&&(fe+=F[Re-1].dist(F[Re]));for(let Re=0;Re<F.length;Re++){let Ke=pe[Re];this.lineVertexArray.emplaceBack(Ke.x,Ke.y,Ke.tileUnitDistanceFromAnchor)}}return{lineStartIndex:W,lineLength:this.lineVertexArray.length-W}}addSymbols(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur){let vr=A.indexArray,kr=A.layoutVertexArray,Dr=A.segments.prepareSegment(4*F.length,kr,vr,this.canOverlap?pe.sortKey:void 0),li=this.glyphOffsetArray.length,pi=Dr.vertexLength,vn=this.allowVerticalPlacement&&Re===i.ah.vertical?Math.PI/2:0,zi=pe.text&&pe.text.sections;for(let ln=0;ln<F.length;ln++){let{tl:Tn,tr:pa,bl:ro,br:Vo,tex:Xa,pixelOffsetTL:la,pixelOffsetBR:Mo,minFontScaleX:fo,minFontScaleY:lo,glyphOffset:Wn,isSDF:Ro,sectionIndex:uo}=F[ln],$o=Dr.vertexLength,Ju=Wn[1];jw(kr,Ke.x,Ke.y,Tn.x,Ju+Tn.y,Xa.x,Xa.y,W,Ro,la.x,la.y,fo,lo),jw(kr,Ke.x,Ke.y,pa.x,Ju+pa.y,Xa.x+Xa.w,Xa.y,W,Ro,Mo.x,la.y,fo,lo),jw(kr,Ke.x,Ke.y,ro.x,Ju+ro.y,Xa.x,Xa.y+Xa.h,W,Ro,la.x,Mo.y,fo,lo),jw(kr,Ke.x,Ke.y,Vo.x,Ju+Vo.y,Xa.x+Xa.w,Xa.y+Xa.h,W,Ro,Mo.x,Mo.y,fo,lo),hS(A.dynamicLayoutVertexArray,Ke,vn),vr.emplaceBack($o,$o+1,$o+2),vr.emplaceBack($o+1,$o+2,$o+3),Dr.vertexLength+=4,Dr.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Wn[0]),ln!==F.length-1&&uo===F[ln+1].sectionIndex||A.programConfigurations.populatePaintArrays(kr.length,pe,pe.index,{},ur,zi&&zi[uo])}A.placedSymbolArray.emplaceBack(Ke.x,Ke.y,li,this.glyphOffsetArray.length-li,pi,ft,Rt,Ke.segment,W?W[0]:0,W?W[1]:0,te[0],te[1],Re,0,!1,0,tr)}_addCollisionDebugVertex(A,F,W,te,fe,pe){return F.emplaceBack(0,0),A.emplaceBack(W.x,W.y,te,fe,Math.round(pe.x),Math.round(pe.y))}addCollisionDebugVertices(A,F,W,te,fe,pe,Re){let Ke=fe.segments.prepareSegment(4,fe.layoutVertexArray,fe.indexArray),ft=Ke.vertexLength,Rt=fe.layoutVertexArray,tr=fe.collisionVertexArray,ur=Re.anchorX,vr=Re.anchorY;this._addCollisionDebugVertex(Rt,tr,pe,ur,vr,new u(A,F)),this._addCollisionDebugVertex(Rt,tr,pe,ur,vr,new u(W,F)),this._addCollisionDebugVertex(Rt,tr,pe,ur,vr,new u(W,te)),this._addCollisionDebugVertex(Rt,tr,pe,ur,vr,new u(A,te)),Ke.vertexLength+=4;let kr=fe.indexArray;kr.emplaceBack(ft,ft+1),kr.emplaceBack(ft+1,ft+2),kr.emplaceBack(ft+2,ft+3),kr.emplaceBack(ft+3,ft),Ke.primitiveLength+=4}addDebugCollisionBoxes(A,F,W,te){for(let fe=A;fe<F;fe++){let pe=this.collisionBoxArray.get(fe);this.addCollisionDebugVertices(pe.x1,pe.y1,pe.x2,pe.y2,te?this.textCollisionBox:this.iconCollisionBox,pe.anchorPoint,W)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new hm(Al,dy.members,Te),this.iconCollisionBox=new hm(Al,dy.members,Te);for(let A=0;A<this.symbolInstances.length;A++){let F=this.symbolInstances.get(A);this.addDebugCollisionBoxes(F.textBoxStartIndex,F.textBoxEndIndex,F,!0),this.addDebugCollisionBoxes(F.verticalTextBoxStartIndex,F.verticalTextBoxEndIndex,F,!0),this.addDebugCollisionBoxes(F.iconBoxStartIndex,F.iconBoxEndIndex,F,!1),this.addDebugCollisionBoxes(F.verticalIconBoxStartIndex,F.verticalIconBoxEndIndex,F,!1)}}_deserializeCollisionBoxesForSymbol(A,F,W,te,fe,pe,Re,Ke,ft){let Rt={};for(let tr=F;tr<W;tr++){let ur=A.get(tr);Rt.textBox={x1:ur.x1,y1:ur.y1,x2:ur.x2,y2:ur.y2,anchorPointX:ur.anchorPointX,anchorPointY:ur.anchorPointY},Rt.textFeatureIndex=ur.featureIndex;break}for(let tr=te;tr<fe;tr++){let ur=A.get(tr);Rt.verticalTextBox={x1:ur.x1,y1:ur.y1,x2:ur.x2,y2:ur.y2,anchorPointX:ur.anchorPointX,anchorPointY:ur.anchorPointY},Rt.verticalTextFeatureIndex=ur.featureIndex;break}for(let tr=pe;tr<Re;tr++){let ur=A.get(tr);Rt.iconBox={x1:ur.x1,y1:ur.y1,x2:ur.x2,y2:ur.y2,anchorPointX:ur.anchorPointX,anchorPointY:ur.anchorPointY},Rt.iconFeatureIndex=ur.featureIndex;break}for(let tr=Ke;tr<ft;tr++){let ur=A.get(tr);Rt.verticalIconBox={x1:ur.x1,y1:ur.y1,x2:ur.x2,y2:ur.y2,anchorPointX:ur.anchorPointX,anchorPointY:ur.anchorPointY},Rt.verticalIconFeatureIndex=ur.featureIndex;break}return Rt}deserializeCollisionBoxes(A){this.collisionArrays=[];for(let F=0;F<this.symbolInstances.length;F++){let W=this.symbolInstances.get(F);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(A,W.textBoxStartIndex,W.textBoxEndIndex,W.verticalTextBoxStartIndex,W.verticalTextBoxEndIndex,W.iconBoxStartIndex,W.iconBoxEndIndex,W.verticalIconBoxStartIndex,W.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(A,F){let W=A.placedSymbolArray.get(F),te=W.vertexStartIndex+4*W.numGlyphs;for(let fe=W.vertexStartIndex;fe<te;fe+=4)A.indexArray.emplaceBack(fe,fe+1,fe+2),A.indexArray.emplaceBack(fe+1,fe+2,fe+3)}getSortedSymbolIndexes(A){if(this.sortedAngle===A&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;let F=Math.sin(A),W=Math.cos(A),te=[],fe=[],pe=[];for(let Re=0;Re<this.symbolInstances.length;++Re){pe.push(Re);let Ke=this.symbolInstances.get(Re);te.push(0|Math.round(F*Ke.anchorX+W*Ke.anchorY)),fe.push(Ke.featureIndex)}return pe.sort((Re,Ke)=>te[Re]-te[Ke]||fe[Ke]-fe[Re]),pe}addToSortKeyRanges(A,F){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W&&W.sortKey===F?W.symbolInstanceEnd=A+1:this.sortKeyRanges.push({sortKey:F,symbolInstanceStart:A,symbolInstanceEnd:A+1})}sortFeatures(A){if(this.sortFeaturesByY&&this.sortedAngle!==A&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(A),this.sortedAngle=A,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let F of this.symbolInstanceIndexes){let W=this.symbolInstances.get(F);this.featureSortOrder.push(W.featureIndex),[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex].forEach((te,fe,pe)=>{te>=0&&pe.indexOf(te)===fe&&this.addIndicesForPlacedSymbol(this.text,te)}),W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Tf,rb;Fi("SymbolBucket",R1,{omit:["layers","collisionBoxArray","features","compareText"]}),R1.MAX_GLYPHS=65535,R1.addDynamicAttributes=hS;var Ww={get paint(){return rb=rb||new ue({"icon-opacity":new oo(ce.paint_symbol["icon-opacity"]),"icon-color":new oo(ce.paint_symbol["icon-color"]),"icon-halo-color":new oo(ce.paint_symbol["icon-halo-color"]),"icon-halo-width":new oo(ce.paint_symbol["icon-halo-width"]),"icon-halo-blur":new oo(ce.paint_symbol["icon-halo-blur"]),"icon-translate":new Ua(ce.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ua(ce.paint_symbol["icon-translate-anchor"]),"text-opacity":new oo(ce.paint_symbol["text-opacity"]),"text-color":new oo(ce.paint_symbol["text-color"],{runtimeType:Xt,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new oo(ce.paint_symbol["text-halo-color"]),"text-halo-width":new oo(ce.paint_symbol["text-halo-width"]),"text-halo-blur":new oo(ce.paint_symbol["text-halo-blur"]),"text-translate":new Ua(ce.paint_symbol["text-translate"]),"text-translate-anchor":new Ua(ce.paint_symbol["text-translate-anchor"])})},get layout(){return Tf=Tf||new ue({"symbol-placement":new Ua(ce.layout_symbol["symbol-placement"]),"symbol-spacing":new Ua(ce.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ua(ce.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new oo(ce.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ua(ce.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ua(ce.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ua(ce.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ua(ce.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ua(ce.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ua(ce.layout_symbol["icon-rotation-alignment"]),"icon-size":new oo(ce.layout_symbol["icon-size"]),"icon-text-fit":new Ua(ce.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ua(ce.layout_symbol["icon-text-fit-padding"]),"icon-image":new oo(ce.layout_symbol["icon-image"]),"icon-rotate":new oo(ce.layout_symbol["icon-rotate"]),"icon-padding":new oo(ce.layout_symbol["icon-padding"]),"icon-keep-upright":new Ua(ce.layout_symbol["icon-keep-upright"]),"icon-offset":new oo(ce.layout_symbol["icon-offset"]),"icon-anchor":new oo(ce.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ua(ce.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ua(ce.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ua(ce.layout_symbol["text-rotation-alignment"]),"text-field":new oo(ce.layout_symbol["text-field"]),"text-font":new oo(ce.layout_symbol["text-font"]),"text-size":new oo(ce.layout_symbol["text-size"]),"text-max-width":new oo(ce.layout_symbol["text-max-width"]),"text-line-height":new Ua(ce.layout_symbol["text-line-height"]),"text-letter-spacing":new oo(ce.layout_symbol["text-letter-spacing"]),"text-justify":new oo(ce.layout_symbol["text-justify"]),"text-radial-offset":new oo(ce.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ua(ce.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new oo(ce.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new oo(ce.layout_symbol["text-anchor"]),"text-max-angle":new Ua(ce.layout_symbol["text-max-angle"]),"text-writing-mode":new Ua(ce.layout_symbol["text-writing-mode"]),"text-rotate":new oo(ce.layout_symbol["text-rotate"]),"text-padding":new Ua(ce.layout_symbol["text-padding"]),"text-keep-upright":new Ua(ce.layout_symbol["text-keep-upright"]),"text-transform":new oo(ce.layout_symbol["text-transform"]),"text-offset":new oo(ce.layout_symbol["text-offset"]),"text-allow-overlap":new Ua(ce.layout_symbol["text-allow-overlap"]),"text-overlap":new Ua(ce.layout_symbol["text-overlap"]),"text-ignore-placement":new Ua(ce.layout_symbol["text-ignore-placement"]),"text-optional":new Ua(ce.layout_symbol["text-optional"])})}};class ib{constructor(A){if(A.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=A.property.overrides?A.property.overrides.runtimeType:Tt,this.defaultValue=A}evaluate(A){if(A.formattedSection){let F=this.defaultValue.property.overrides;if(F&&F.hasOverride(A.formattedSection))return F.getOverride(A.formattedSection)}return A.feature&&A.featureState?this.defaultValue.evaluate(A.feature,A.featureState):this.defaultValue.property.specification.default}eachChild(A){this.defaultValue.isConstant()||A(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Fi("FormatSectionOverride",ib,{omit:["defaultValue"]});class gy extends B{constructor(A){super(A,Ww)}recalculate(A,F){if(super.recalculate(A,F),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let W=this.layout.get("text-writing-mode");if(W){let te=[];for(let fe of W)te.indexOf(fe)<0&&te.push(fe);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(A,F,W,te){let fe=this.layout.get(A).evaluate(F,{},W,te),pe=this._unevaluatedLayout._values[A];return pe.isDataDriven()||Dc(pe.value)||!fe?fe:function(Re,Ke){return Ke.replace(/{([^{}]+)}/g,(ft,Rt)=>Re&&Rt in Re?String(Re[Rt]):"")}(F.properties,fe)}createBucket(A){return new R1(A)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let A of Ww.paint.overridableProperties){if(!gy.hasPaintOverride(this.layout,A))continue;let F=this.paint.get(A),W=new ib(F),te=new Eu(W,F.property.specification),fe=null;fe=F.value.kind==="constant"||F.value.kind==="source"?new bc("source",te):new hu("composite",te,F.value.zoomStops),this.paint._values[A]=new xu(F.property,fe,F.parameters)}}_handleOverridablePaintPropertyUpdate(A,F,W){return!(!this.layout||F.isDataDriven()||W.isDataDriven())&&gy.hasPaintOverride(this.layout,A)}static hasPaintOverride(A,F){let W=A.get("text-field"),te=Ww.paint.properties[F],fe=!1,pe=Re=>{for(let Ke of Re)if(te.overrides&&te.overrides.hasOverride(Ke))return void(fe=!0)};if(W.value.kind==="constant"&&W.value.value instanceof ti)pe(W.value.value.sections);else if(W.value.kind==="source"){let Re=ft=>{fe||(ft instanceof ua&&Mn(ft.value)===ei?pe(ft.value.sections):ft instanceof Yl?pe(ft.sections):ft.eachChild(Re))},Ke=W.value;Ke._styleExpression&&Re(Ke._styleExpression.expression)}return fe}}let DC;var nb={get paint(){return DC=DC||new ue({"background-color":new Ua(ce.paint_background["background-color"]),"background-pattern":new hc(ce.paint_background["background-pattern"]),"background-opacity":new Ua(ce.paint_background["background-opacity"])})}};class tq extends B{constructor(A){super(A,nb)}}let pS;var FC={get paint(){return pS=pS||new ue({"raster-opacity":new Ua(ce.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ua(ce.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ua(ce.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ua(ce.paint_raster["raster-brightness-max"]),"raster-saturation":new Ua(ce.paint_raster["raster-saturation"]),"raster-contrast":new Ua(ce.paint_raster["raster-contrast"]),"raster-resampling":new Ua(ce.paint_raster["raster-resampling"]),"raster-fade-duration":new Ua(ce.paint_raster["raster-fade-duration"])})}};class ab extends B{constructor(A){super(A,FC)}}class gS extends B{constructor(A){super(A,{}),this.onAdd=F=>{this.implementation.onAdd&&this.implementation.onAdd(F,F.painter.context.gl)},this.onRemove=F=>{this.implementation.onRemove&&this.implementation.onRemove(F,F.painter.context.gl)},this.implementation=A}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class mS{constructor(A){this._methodToThrottle=A,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let yS=63710088e-1;class pg{constructor(A,F){if(isNaN(A)||isNaN(F))throw new Error(`Invalid LngLat object: (${A}, ${F})`);if(this.lng=+A,this.lat=+F,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new pg(T(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(A){let F=Math.PI/180,W=this.lat*F,te=A.lat*F,fe=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((A.lng-this.lng)*F);return yS*Math.acos(Math.min(fe,1))}static convert(A){if(A instanceof pg)return A;if(Array.isArray(A)&&(A.length===2||A.length===3))return new pg(Number(A[0]),Number(A[1]));if(!Array.isArray(A)&&typeof A=="object"&&A!==null)return new pg(Number("lng"in A?A.lng:A.lon),Number(A.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}let D1=2*Math.PI*yS;function zC(R){return D1*Math.cos(R*Math.PI/180)}function Xw(R){return(180+R)/360}function qC(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function Zw(R,A){return R/zC(A)}function ob(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}class sb{constructor(A,F,W=0){this.x=+A,this.y=+F,this.z=+W}static fromLngLat(A,F=0){let W=pg.convert(A);return new sb(Xw(W.lng),qC(W.lat),Zw(F,W.lat))}toLngLat(){return new pg(360*this.x-180,ob(this.y))}toAltitude(){return this.z*zC(ob(this.y))}meterInMercatorCoordinateUnits(){return 1/D1*(A=ob(this.y),1/Math.cos(A*Math.PI/180));var A}}function yp(R,A,F){var W=2*Math.PI*6378137/256/Math.pow(2,F);return[R*W-2*Math.PI*6378137/2,A*W-2*Math.PI*6378137/2]}class _S{constructor(A,F,W){if(!function(te,fe,pe){return!(te<0||te>25||pe<0||pe>=Math.pow(2,te)||fe<0||fe>=Math.pow(2,te))}(A,F,W))throw new Error(`x=${F}, y=${W}, z=${A} outside of bounds. 0<=x<${Math.pow(2,A)}, 0<=y<${Math.pow(2,A)} 0<=z<=25 `);this.z=A,this.x=F,this.y=W,this.key=lb(0,A,A,F,W)}equals(A){return this.z===A.z&&this.x===A.x&&this.y===A.y}url(A,F,W){let te=(pe=this.y,Re=this.z,Ke=yp(256*(fe=this.x),256*(pe=Math.pow(2,Re)-pe-1),Re),ft=yp(256*(fe+1),256*(pe+1),Re),Ke[0]+","+Ke[1]+","+ft[0]+","+ft[1]);var fe,pe,Re,Ke,ft;let Rt=function(tr,ur,vr){let kr,Dr="";for(let li=tr;li>0;li--)kr=1<<li-1,Dr+=(ur&kr?1:0)+(vr&kr?2:0);return Dr}(this.z,this.x,this.y);return A[(this.x+this.y)%A.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(W==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,F>1?"@2x":"").replace(/{quadkey}/g,Rt).replace(/{bbox-epsg-3857}/g,te)}isChildOf(A){let F=this.z-A.z;return F>0&&A.x===this.x>>F&&A.y===this.y>>F}getTilePoint(A){let F=Math.pow(2,this.z);return new u((A.x*F-this.x)*ja,(A.y*F-this.y)*ja)}toString(){return`${this.z}/${this.x}/${this.y}`}}class OC{constructor(A,F){this.wrap=A,this.canonical=F,this.key=lb(A,F.z,F.z,F.x,F.y)}}class $v{constructor(A,F,W,te,fe){if(A<W)throw new Error(`overscaledZ should be >= z; overscaledZ = ${A}; z = ${W}`);this.overscaledZ=A,this.wrap=F,this.canonical=new _S(W,+te,+fe),this.key=lb(F,A,W,te,fe)}clone(){return new $v(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(A){return this.overscaledZ===A.overscaledZ&&this.wrap===A.wrap&&this.canonical.equals(A.canonical)}scaledTo(A){if(A>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${A}; overscaledZ = ${this.overscaledZ}`);let F=this.canonical.z-A;return A>this.canonical.z?new $v(A,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new $v(A,this.wrap,A,this.canonical.x>>F,this.canonical.y>>F)}calculateScaledKey(A,F){if(A>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${A}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-A;return A>this.canonical.z?lb(this.wrap*+F,A,this.canonical.z,this.canonical.x,this.canonical.y):lb(this.wrap*+F,A,A,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(A){if(A.wrap!==this.wrap)return!1;let F=this.canonical.z-A.canonical.z;return A.overscaledZ===0||A.overscaledZ<this.overscaledZ&&A.canonical.x===this.canonical.x>>F&&A.canonical.y===this.canonical.y>>F}children(A){if(this.overscaledZ>=A)return[new $v(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let F=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new $v(F,this.wrap,F,W,te),new $v(F,this.wrap,F,W+1,te),new $v(F,this.wrap,F,W,te+1),new $v(F,this.wrap,F,W+1,te+1)]}isLessThan(A){return this.wrap<A.wrap||!(this.wrap>A.wrap)&&(this.overscaledZ<A.overscaledZ||!(this.overscaledZ>A.overscaledZ)&&(this.canonical.x<A.canonical.x||!(this.canonical.x>A.canonical.x)&&this.canonical.y<A.canonical.y))}wrapped(){return new $v(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(A){return new $v(this.overscaledZ,A,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new OC(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(A){return this.canonical.getTilePoint(new sb(A.x-this.wrap,A.y))}}function lb(R,A,F,W,te){(R*=2)<0&&(R=-1*R-1);let fe=1<<F;return(fe*fe*R+fe*te+W).toString(36)+F.toString(36)+A.toString(36)}Fi("CanonicalTileID",_S),Fi("OverscaledTileID",$v,{omit:["posMatrix"]});class BC{constructor(A,F,W,te=1,fe=1,pe=1,Re=0){if(this.uid=A,F.height!==F.width)throw new RangeError("DEM tiles must be square");if(W&&!["mapbox","terrarium","custom"].includes(W))return void E(`"${W}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=F.height;let Ke=this.dim=F.height-2;switch(this.data=new Uint32Array(F.data.buffer),W){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=te,this.greenFactor=fe,this.blueFactor=pe,this.baseShift=Re;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let ft=0;ft<Ke;ft++)this.data[this._idx(-1,ft)]=this.data[this._idx(0,ft)],this.data[this._idx(Ke,ft)]=this.data[this._idx(Ke-1,ft)],this.data[this._idx(ft,-1)]=this.data[this._idx(ft,0)],this.data[this._idx(ft,Ke)]=this.data[this._idx(ft,Ke-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(Ke,-1)]=this.data[this._idx(Ke-1,0)],this.data[this._idx(-1,Ke)]=this.data[this._idx(0,Ke-1)],this.data[this._idx(Ke,Ke)]=this.data[this._idx(Ke-1,Ke-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let ft=0;ft<Ke;ft++)for(let Rt=0;Rt<Ke;Rt++){let tr=this.get(ft,Rt);tr>this.max&&(this.max=tr),tr<this.min&&(this.min=tr)}}get(A,F){let W=new Uint8Array(this.data.buffer),te=4*this._idx(A,F);return this.unpack(W[te],W[te+1],W[te+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(A,F){if(A<-1||A>=this.dim+1||F<-1||F>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(F+1)*this.stride+(A+1)}unpack(A,F,W){return A*this.redFactor+F*this.greenFactor+W*this.blueFactor-this.baseShift}getPixels(){return new Ki({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(A,F,W){if(this.dim!==A.dim)throw new Error("dem dimension mismatch");let te=F*this.dim,fe=F*this.dim+this.dim,pe=W*this.dim,Re=W*this.dim+this.dim;switch(F){case-1:te=fe-1;break;case 1:fe=te+1}switch(W){case-1:pe=Re-1;break;case 1:Re=pe+1}let Ke=-F*this.dim,ft=-W*this.dim;for(let Rt=pe;Rt<Re;Rt++)for(let tr=te;tr<fe;tr++)this.data[this._idx(tr,Rt)]=A.data[this._idx(tr+Ke,Rt+ft)]}}Fi("DEMData",BC);class NC{constructor(A){this._stringToNumber={},this._numberToString=[];for(let F=0;F<A.length;F++){let W=A[F];this._stringToNumber[W]=F,this._numberToString[F]=W}}encode(A){return this._stringToNumber[A]}decode(A){if(A>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${A} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[A]}}class xS{constructor(A,F,W,te,fe){this.type="Feature",this._vectorTileFeature=A,A._z=F,A._x=W,A._y=te,this.properties=A.properties,this.id=fe}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(A){this._geometry=A}toJSON(){let A={geometry:this.geometry};for(let F in this)F!=="_geometry"&&F!=="_vectorTileFeature"&&(A[F]=this[F]);return A}}class my{constructor(A,F){this.tileID=A,this.x=A.canonical.x,this.y=A.canonical.y,this.z=A.canonical.z,this.grid=new $i(ja,16,0),this.grid3D=new $i(ja,16,0),this.featureIndexArray=new Ts,this.promoteId=F}insert(A,F,W,te,fe,pe){let Re=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(W,te,fe);let Ke=pe?this.grid3D:this.grid;for(let ft=0;ft<F.length;ft++){let Rt=F[ft],tr=[1/0,1/0,-1/0,-1/0];for(let ur=0;ur<Rt.length;ur++){let vr=Rt[ur];tr[0]=Math.min(tr[0],vr.x),tr[1]=Math.min(tr[1],vr.y),tr[2]=Math.max(tr[2],vr.x),tr[3]=Math.max(tr[3],vr.y)}tr[0]<ja&&tr[1]<ja&&tr[2]>=0&&tr[3]>=0&&Ke.insert(Re,tr[0],tr[1],tr[2],tr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new yr.VectorTile(new lS(this.rawTileData)).layers,this.sourceLayerCoder=new NC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(A,F,W,te){this.loadVTLayers();let fe=A.params||{},pe=ja/A.tileSize/A.scale,Re=Fc(fe.filter),Ke=A.queryGeometry,ft=A.queryPadding*pe,Rt=VC(Ke),tr=this.grid.query(Rt.minX-ft,Rt.minY-ft,Rt.maxX+ft,Rt.maxY+ft),ur=VC(A.cameraQueryGeometry),vr=this.grid3D.query(ur.minX-ft,ur.minY-ft,ur.maxX+ft,ur.maxY+ft,(li,pi,vn,zi)=>function(ln,Tn,pa,ro,Vo){for(let la of ln)if(Tn<=la.x&&pa<=la.y&&ro>=la.x&&Vo>=la.y)return!0;let Xa=[new u(Tn,pa),new u(Tn,Vo),new u(ro,Vo),new u(ro,pa)];if(ln.length>2){for(let la of Xa)if(Ni(ln,la))return!0}for(let la=0;la<ln.length-1;la++)if(qi(ln[la],ln[la+1],Xa))return!0;return!1}(A.cameraQueryGeometry,li-ft,pi-ft,vn+ft,zi+ft));for(let li of vr)tr.push(li);tr.sort(rq);let kr={},Dr;for(let li=0;li<tr.length;li++){let pi=tr[li];if(pi===Dr)continue;Dr=pi;let vn=this.featureIndexArray.get(pi),zi=null;this.loadMatchingFeature(kr,vn.bucketIndex,vn.sourceLayerIndex,vn.featureIndex,Re,fe.layers,fe.availableImages,F,W,te,(ln,Tn,pa)=>(zi||(zi=$s(ln)),Tn.queryIntersectsFeature(Ke,ln,pa,zi,this.z,A.transform,pe,A.pixelPosMatrix)))}return kr}loadMatchingFeature(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr){let ur=this.bucketLayerIDs[F];if(pe&&!function(li,pi){for(let vn=0;vn<li.length;vn++)if(pi.indexOf(li[vn])>=0)return!0;return!1}(pe,ur))return;let vr=this.sourceLayerCoder.decode(W),kr=this.vtLayers[vr].feature(te);if(fe.needGeometry){let li=Sl(kr,!0);if(!fe.filter(new rs(this.tileID.overscaledZ),li,this.tileID.canonical))return}else if(!fe.filter(new rs(this.tileID.overscaledZ),kr))return;let Dr=this.getId(kr,vr);for(let li=0;li<ur.length;li++){let pi=ur[li];if(pe&&pe.indexOf(pi)<0)continue;let vn=Ke[pi];if(!vn)continue;let zi={};Dr&&Rt&&(zi=Rt.getState(vn.sourceLayer||"_geojsonTileLayer",Dr));let ln=L({},ft[pi]);ln.paint=UC(ln.paint,vn.paint,kr,zi,Re),ln.layout=UC(ln.layout,vn.layout,kr,zi,Re);let Tn=!tr||tr(kr,vn,zi);if(!Tn)continue;let pa=new xS(kr,this.z,this.x,this.y,Dr);pa.layer=ln;let ro=A[pi];ro===void 0&&(ro=A[pi]=[]),ro.push({featureIndex:te,feature:pa,intersectionZ:Tn})}}lookupSymbolFeatures(A,F,W,te,fe,pe,Re,Ke){let ft={};this.loadVTLayers();let Rt=Fc(fe);for(let tr of A)this.loadMatchingFeature(ft,W,te,tr,Rt,pe,Re,Ke,F);return ft}hasLayer(A){for(let F of this.bucketLayerIDs)for(let W of F)if(A===W)return!0;return!1}getId(A,F){let W=A.id;return this.promoteId&&(W=A.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[F]],typeof W=="boolean"&&(W=Number(W))),W}}function UC(R,A,F,W,te){return C(R,(fe,pe)=>{let Re=A instanceof Ac?A.get(pe):null;return Re&&Re.evaluate?Re.evaluate(F,W,te):Re})}function VC(R){let A=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)A=Math.min(A,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return{minX:A,minY:F,maxX:W,maxY:te}}function rq(R,A){return A-R}function GC(R,A,F,W,te){let fe=[];for(let pe=0;pe<R.length;pe++){let Re=R[pe],Ke;for(let ft=0;ft<Re.length-1;ft++){let Rt=Re[ft],tr=Re[ft+1];Rt.x<A&&tr.x<A||(Rt.x<A?Rt=new u(A,Rt.y+(A-Rt.x)/(tr.x-Rt.x)*(tr.y-Rt.y))._round():tr.x<A&&(tr=new u(A,Rt.y+(A-Rt.x)/(tr.x-Rt.x)*(tr.y-Rt.y))._round()),Rt.y<F&&tr.y<F||(Rt.y<F?Rt=new u(Rt.x+(F-Rt.y)/(tr.y-Rt.y)*(tr.x-Rt.x),F)._round():tr.y<F&&(tr=new u(Rt.x+(F-Rt.y)/(tr.y-Rt.y)*(tr.x-Rt.x),F)._round()),Rt.x>=W&&tr.x>=W||(Rt.x>=W?Rt=new u(W,Rt.y+(W-Rt.x)/(tr.x-Rt.x)*(tr.y-Rt.y))._round():tr.x>=W&&(tr=new u(W,Rt.y+(W-Rt.x)/(tr.x-Rt.x)*(tr.y-Rt.y))._round()),Rt.y>=te&&tr.y>=te||(Rt.y>=te?Rt=new u(Rt.x+(te-Rt.y)/(tr.y-Rt.y)*(tr.x-Rt.x),te)._round():tr.y>=te&&(tr=new u(Rt.x+(te-Rt.y)/(tr.y-Rt.y)*(tr.x-Rt.x),te)._round()),Ke&&Rt.equals(Ke[Ke.length-1])||(Ke=[Rt],fe.push(Ke)),Ke.push(tr)))))}}return fe}Fi("FeatureIndex",my,{omit:["rawTileData","sourceLayerCoder"]});class gg extends u{constructor(A,F,W,te){super(A,F),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new gg(this.x,this.y,this.angle,this.segment)}}function bS(R,A,F,W,te){if(A.segment===void 0||F===0)return!0;let fe=A,pe=A.segment+1,Re=0;for(;Re>-F/2;){if(pe--,pe<0)return!1;Re-=R[pe].dist(fe),fe=R[pe]}Re+=R[pe].dist(R[pe+1]),pe++;let Ke=[],ft=0;for(;Re<F/2;){let Rt=R[pe],tr=R[pe+1];if(!tr)return!1;let ur=R[pe-1].angleTo(Rt)-Rt.angleTo(tr);for(ur=Math.abs((ur+3*Math.PI)%(2*Math.PI)-Math.PI),Ke.push({distance:Re,angleDelta:ur}),ft+=ur;Re-Ke[0].distance>W;)ft-=Ke.shift().angleDelta;if(ft>te)return!1;pe++,Re+=Rt.dist(tr)}return!0}function HC(R){let A=0;for(let F=0;F<R.length-1;F++)A+=R[F].dist(R[F+1]);return A}function jC(R,A,F){return R?.6*A*F:0}function WC(R,A){return Math.max(R?R.right-R.left:0,A?A.right-A.left:0)}function iq(R,A,F,W,te,fe){let pe=jC(F,te,fe),Re=WC(F,W)*fe,Ke=0,ft=HC(R)/2;for(let Rt=0;Rt<R.length-1;Rt++){let tr=R[Rt],ur=R[Rt+1],vr=tr.dist(ur);if(Ke+vr>ft){let kr=(ft-Ke)/vr,Dr=Lo.number(tr.x,ur.x,kr),li=Lo.number(tr.y,ur.y,kr),pi=new gg(Dr,li,ur.angleTo(tr),Rt);return pi._round(),!pe||bS(R,pi,Re,pe,A)?pi:void 0}Ke+=vr}}function nq(R,A,F,W,te,fe,pe,Re,Ke){let ft=jC(W,fe,pe),Rt=WC(W,te),tr=Rt*pe,ur=R[0].x===0||R[0].x===Ke||R[0].y===0||R[0].y===Ke;return A-tr<A/4&&(A=tr+A/4),XC(R,ur?A/2*Re%A:(Rt/2+2*fe)*pe*Re%A,A,ft,F,tr,ur,!1,Ke)}function XC(R,A,F,W,te,fe,pe,Re,Ke){let ft=fe/2,Rt=HC(R),tr=0,ur=A-F,vr=[];for(let kr=0;kr<R.length-1;kr++){let Dr=R[kr],li=R[kr+1],pi=Dr.dist(li),vn=li.angleTo(Dr);for(;ur+F<tr+pi;){ur+=F;let zi=(ur-tr)/pi,ln=Lo.number(Dr.x,li.x,zi),Tn=Lo.number(Dr.y,li.y,zi);if(ln>=0&&ln<Ke&&Tn>=0&&Tn<Ke&&ur-ft>=0&&ur+ft<=Rt){let pa=new gg(ln,Tn,vn,kr);pa._round(),W&&!bS(R,pa,fe,W,te)||vr.push(pa)}}tr+=pi}return Re||vr.length||pe||(vr=XC(R,tr/2,F,W,te,fe,pe,!0,Ke)),vr}Fi("Anchor",gg);let F1=Md;function ZC(R,A,F,W){let te=[],fe=R.image,pe=fe.pixelRatio,Re=fe.paddedRect.w-2*F1,Ke=fe.paddedRect.h-2*F1,ft={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Rt=fe.stretchX||[[0,Re]],tr=fe.stretchY||[[0,Ke]],ur=(Wn,Ro)=>Wn+Ro[1]-Ro[0],vr=Rt.reduce(ur,0),kr=tr.reduce(ur,0),Dr=Re-vr,li=Ke-kr,pi=0,vn=vr,zi=0,ln=kr,Tn=0,pa=Dr,ro=0,Vo=li;if(fe.content&&W){let Wn=fe.content,Ro=Wn[2]-Wn[0],uo=Wn[3]-Wn[1];(fe.textFitWidth||fe.textFitHeight)&&(ft=PC(R)),pi=mg(Rt,0,Wn[0]),zi=mg(tr,0,Wn[1]),vn=mg(Rt,Wn[0],Wn[2]),ln=mg(tr,Wn[1],Wn[3]),Tn=Wn[0]-pi,ro=Wn[1]-zi,pa=Ro-vn,Vo=uo-ln}let Xa=ft.x1,la=ft.y1,Mo=ft.x2-Xa,fo=ft.y2-la,lo=(Wn,Ro,uo,$o)=>{let Ju=Yw(Wn.stretch-pi,vn,Mo,Xa),Ou=z1(Wn.fixed-Tn,pa,Wn.stretch,vr),kh=Yw(Ro.stretch-zi,ln,fo,la),Qv=z1(Ro.fixed-ro,Vo,Ro.stretch,kr),ud=Yw(uo.stretch-pi,vn,Mo,Xa),Ch=z1(uo.fixed-Tn,pa,uo.stretch,vr),Vd=Yw($o.stretch-zi,ln,fo,la),Gd=z1($o.fixed-ro,Vo,$o.stretch,kr),Hd=new u(Ju,kh),Af=new u(ud,kh),Lh=new u(ud,Vd),Ed=new u(Ju,Vd),cd=new u(Ou/pe,Qv/pe),Yh=new u(Ch/pe,Gd/pe),Df=A*Math.PI/180;if(Df){let ru=Math.sin(Df),pc=Math.cos(Df),$u=[pc,-ru,ru,pc];Hd._matMult($u),Af._matMult($u),Ed._matMult($u),Lh._matMult($u)}let Fv=Wn.stretch+Wn.fixed,lv=Ro.stretch+Ro.fixed;return{tl:Hd,tr:Af,bl:Ed,br:Lh,tex:{x:fe.paddedRect.x+F1+Fv,y:fe.paddedRect.y+F1+lv,w:uo.stretch+uo.fixed-Fv,h:$o.stretch+$o.fixed-lv},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:cd,pixelOffsetBR:Yh,minFontScaleX:pa/pe/Mo,minFontScaleY:Vo/pe/fo,isSDF:F}};if(W&&(fe.stretchX||fe.stretchY)){let Wn=YC(Rt,Dr,vr),Ro=YC(tr,li,kr);for(let uo=0;uo<Wn.length-1;uo++){let $o=Wn[uo],Ju=Wn[uo+1];for(let Ou=0;Ou<Ro.length-1;Ou++)te.push(lo($o,Ro[Ou],Ju,Ro[Ou+1]))}}else te.push(lo({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Re+1},{fixed:0,stretch:Ke+1}));return te}function mg(R,A,F){let W=0;for(let te of R)W+=Math.max(A,Math.min(F,te[1]))-Math.max(A,Math.min(F,te[0]));return W}function YC(R,A,F){let W=[{fixed:-F1,stretch:0}];for(let[te,fe]of R){let pe=W[W.length-1];W.push({fixed:te-pe.stretch,stretch:pe.stretch}),W.push({fixed:te-pe.stretch,stretch:pe.stretch+(fe-te)})}return W.push({fixed:A+F1,stretch:F}),W}function Yw(R,A,F,W){return R/A*F+W}function z1(R,A,F,W){return R-A*F/W}class dm{constructor(A,F,W,te,fe,pe,Re,Ke,ft,Rt){var tr;if(this.boxStartIndex=A.length,ft){let ur=pe.top,vr=pe.bottom,kr=pe.collisionPadding;kr&&(ur-=kr[1],vr+=kr[3]);let Dr=vr-ur;Dr>0&&(Dr=Math.max(10,Dr),this.circleDiameter=Dr)}else{let ur=!((tr=pe.image)===null||tr===void 0)&&tr.content&&(pe.image.textFitWidth||pe.image.textFitHeight)?PC(pe):{x1:pe.left,y1:pe.top,x2:pe.right,y2:pe.bottom};ur.y1=ur.y1*Re-Ke[0],ur.y2=ur.y2*Re+Ke[2],ur.x1=ur.x1*Re-Ke[3],ur.x2=ur.x2*Re+Ke[1];let vr=pe.collisionPadding;if(vr&&(ur.x1-=vr[0]*Re,ur.y1-=vr[1]*Re,ur.x2+=vr[2]*Re,ur.y2+=vr[3]*Re),Rt){let kr=new u(ur.x1,ur.y1),Dr=new u(ur.x2,ur.y1),li=new u(ur.x1,ur.y2),pi=new u(ur.x2,ur.y2),vn=Rt*Math.PI/180;kr._rotate(vn),Dr._rotate(vn),li._rotate(vn),pi._rotate(vn),ur.x1=Math.min(kr.x,Dr.x,li.x,pi.x),ur.x2=Math.max(kr.x,Dr.x,li.x,pi.x),ur.y1=Math.min(kr.y,Dr.y,li.y,pi.y),ur.y2=Math.max(kr.y,Dr.y,li.y,pi.y)}A.emplaceBack(F.x,F.y,ur.x1,ur.y1,ur.x2,ur.y2,W,te,fe)}this.boxEndIndex=A.length}}class Vp{constructor(A=[],F=(W,te)=>W<te?-1:W>te?1:0){if(this.data=A,this.length=this.data.length,this.compare=F,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(A){this.data.push(A),this._up(this.length++)}pop(){if(this.length===0)return;let A=this.data[0],F=this.data.pop();return--this.length>0&&(this.data[0]=F,this._down(0)),A}peek(){return this.data[0]}_up(A){let{data:F,compare:W}=this,te=F[A];for(;A>0;){let fe=A-1>>1,pe=F[fe];if(W(te,pe)>=0)break;F[A]=pe,A=fe}F[A]=te}_down(A){let{data:F,compare:W}=this,te=this.length>>1,fe=F[A];for(;A<te;){let pe=1+(A<<1),Re=pe+1;if(Re<this.length&&W(F[Re],F[pe])<0&&(pe=Re),W(F[pe],fe)>=0)break;F[A]=F[pe],A=pe}F[A]=fe}}function aq(R,A=1,F=!1){let W=1/0,te=1/0,fe=-1/0,pe=-1/0,Re=R[0];for(let vr=0;vr<Re.length;vr++){let kr=Re[vr];(!vr||kr.x<W)&&(W=kr.x),(!vr||kr.y<te)&&(te=kr.y),(!vr||kr.x>fe)&&(fe=kr.x),(!vr||kr.y>pe)&&(pe=kr.y)}let Ke=Math.min(fe-W,pe-te),ft=Ke/2,Rt=new Vp([],oq);if(Ke===0)return new u(W,te);for(let vr=W;vr<fe;vr+=Ke)for(let kr=te;kr<pe;kr+=Ke)Rt.push(new q1(vr+ft,kr+ft,ft,R));let tr=function(vr){let kr=0,Dr=0,li=0,pi=vr[0];for(let vn=0,zi=pi.length,ln=zi-1;vn<zi;ln=vn++){let Tn=pi[vn],pa=pi[ln],ro=Tn.x*pa.y-pa.x*Tn.y;Dr+=(Tn.x+pa.x)*ro,li+=(Tn.y+pa.y)*ro,kr+=3*ro}return new q1(Dr/kr,li/kr,0,vr)}(R),ur=Rt.length;for(;Rt.length;){let vr=Rt.pop();(vr.d>tr.d||!tr.d)&&(tr=vr,F&&console.log("found best %d after %d probes",Math.round(1e4*vr.d)/1e4,ur)),vr.max-tr.d<=A||(ft=vr.h/2,Rt.push(new q1(vr.p.x-ft,vr.p.y-ft,ft,R)),Rt.push(new q1(vr.p.x+ft,vr.p.y-ft,ft,R)),Rt.push(new q1(vr.p.x-ft,vr.p.y+ft,ft,R)),Rt.push(new q1(vr.p.x+ft,vr.p.y+ft,ft,R)),ur+=4)}return F&&(console.log(`num probes: ${ur}`),console.log(`best distance: ${tr.d}`)),tr.p}function oq(R,A){return A.max-R.max}function q1(R,A,F,W){this.p=new u(R,A),this.h=F,this.d=function(te,fe){let pe=!1,Re=1/0;for(let Ke=0;Ke<fe.length;Ke++){let ft=fe[Ke];for(let Rt=0,tr=ft.length,ur=tr-1;Rt<tr;ur=Rt++){let vr=ft[Rt],kr=ft[ur];vr.y>te.y!=kr.y>te.y&&te.x<(kr.x-vr.x)*(te.y-vr.y)/(kr.y-vr.y)+vr.x&&(pe=!pe),Re=Math.min(Re,Nr(te,vr,kr))}}return(pe?1:-1)*Math.sqrt(Re)}(this.p,W),this.max=this.d+this.h*Math.SQRT2}var ld;i.aq=void 0,(ld=i.aq||(i.aq={}))[ld.center=1]="center",ld[ld.left=2]="left",ld[ld.right=3]="right",ld[ld.top=4]="top",ld[ld.bottom=5]="bottom",ld[ld["top-left"]=6]="top-left",ld[ld["top-right"]=7]="top-right",ld[ld["bottom-left"]=8]="bottom-left",ld[ld["bottom-right"]=9]="bottom-right";let vm=7,yy=Number.POSITIVE_INFINITY;function wS(R,A){return A[1]!==yy?function(F,W,te){let fe=0,pe=0;switch(W=Math.abs(W),te=Math.abs(te),F){case"top-right":case"top-left":case"top":pe=te-vm;break;case"bottom-right":case"bottom-left":case"bottom":pe=-te+vm}switch(F){case"top-right":case"bottom-right":case"right":fe=-W;break;case"top-left":case"bottom-left":case"left":fe=W}return[fe,pe]}(R,A[0],A[1]):function(F,W){let te=0,fe=0;W<0&&(W=0);let pe=W/Math.SQRT2;switch(F){case"top-right":case"top-left":fe=pe-vm;break;case"bottom-right":case"bottom-left":fe=-pe+vm;break;case"bottom":fe=-W+vm;break;case"top":fe=W-vm}switch(F){case"top-right":case"bottom-right":te=-pe;break;case"top-left":case"bottom-left":te=pe;break;case"left":te=W;break;case"right":te=-W}return[te,fe]}(R,A[0])}function KC(R,A,F){var W;let te=R.layout,fe=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(A,{},F);if(fe){let Re=fe.values,Ke=[];for(let ft=0;ft<Re.length;ft+=2){let Rt=Ke[ft]=Re[ft],tr=Re[ft+1].map(ur=>ur*tu);Rt.startsWith("top")?tr[1]-=vm:Rt.startsWith("bottom")&&(tr[1]+=vm),Ke[ft+1]=tr}return new Zi(Ke)}let pe=te.get("text-variable-anchor");if(pe){let Re;Re=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(A,{},F)*tu,yy]:te.get("text-offset").evaluate(A,{},F).map(ft=>ft*tu);let Ke=[];for(let ft of pe)Ke.push(ft,wS(ft,Re));return new Zi(Ke)}return null}function TS(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function sq(R,A,F,W,te,fe,pe,Re,Ke,ft,Rt){let tr=fe.textMaxSize.evaluate(A,{});tr===void 0&&(tr=pe);let ur=R.layers[0].layout,vr=ur.get("icon-offset").evaluate(A,{},Rt),kr=$C(F.horizontal),Dr=pe/24,li=R.tilePixelRatio*Dr,pi=R.tilePixelRatio*tr/24,vn=R.tilePixelRatio*Re,zi=R.tilePixelRatio*ur.get("symbol-spacing"),ln=ur.get("text-padding")*R.tilePixelRatio,Tn=function(Wn,Ro,uo,$o=1){let Ju=Wn.get("icon-padding").evaluate(Ro,{},uo),Ou=Ju&&Ju.values;return[Ou[0]*$o,Ou[1]*$o,Ou[2]*$o,Ou[3]*$o]}(ur,A,Rt,R.tilePixelRatio),pa=ur.get("text-max-angle")/180*Math.PI,ro=ur.get("text-rotation-alignment")!=="viewport"&&ur.get("symbol-placement")!=="point",Vo=ur.get("icon-rotation-alignment")==="map"&&ur.get("symbol-placement")!=="point",Xa=ur.get("symbol-placement"),la=zi/2,Mo=ur.get("icon-text-fit"),fo;W&&Mo!=="none"&&(R.allowVerticalPlacement&&F.vertical&&(fo=IC(W,F.vertical,Mo,ur.get("icon-text-fit-padding"),vr,Dr)),kr&&(W=IC(W,kr,Mo,ur.get("icon-text-fit-padding"),vr,Dr)));let lo=(Wn,Ro)=>{Ro.x<0||Ro.x>=ja||Ro.y<0||Ro.y>=ja||function(uo,$o,Ju,Ou,kh,Qv,ud,Ch,Vd,Gd,Hd,Af,Lh,Ed,cd,Yh,Df,Fv,lv,ru,pc,$u,zv,ff,O1){let p0=uo.addToLineVertexArray($o,Ju),Gp,ep,Gc,Yf,tp=0,yg=0,uv=0,B1=0,kS=-1,Qw=-1,g0={},_y=xi("");if(uo.allowVerticalPlacement&&Ou.vertical){let kd=Ch.layout.get("text-rotate").evaluate(pc,{},ff)+90;Gc=new dm(Vd,$o,Gd,Hd,Af,Ou.vertical,Lh,Ed,cd,kd),ud&&(Yf=new dm(Vd,$o,Gd,Hd,Af,ud,Df,Fv,cd,kd))}if(kh){let kd=Ch.layout.get("icon-rotate").evaluate(pc,{}),rp=Ch.layout.get("icon-text-fit")!=="none",pm=ZC(kh,kd,zv,rp),jd=ud?ZC(ud,kd,zv,rp):void 0;ep=new dm(Vd,$o,Gd,Hd,Af,kh,Df,Fv,!1,kd),tp=4*pm.length;let Cd=uo.iconSizeData,xp=null;Cd.kind==="source"?(xp=[v0*Ch.layout.get("icon-size").evaluate(pc,{})],xp[0]>fm&&E(`${uo.layerIds[0]}: Value for "icon-size" is >= ${tb}. Reduce your "icon-size".`)):Cd.kind==="composite"&&(xp=[v0*$u.compositeIconSizes[0].evaluate(pc,{},ff),v0*$u.compositeIconSizes[1].evaluate(pc,{},ff)],(xp[0]>fm||xp[1]>fm)&&E(`${uo.layerIds[0]}: Value for "icon-size" is >= ${tb}. Reduce your "icon-size".`)),uo.addSymbols(uo.icon,pm,xp,ru,lv,pc,i.ah.none,$o,p0.lineStartIndex,p0.lineLength,-1,ff),kS=uo.icon.placedSymbolArray.length-1,jd&&(yg=4*jd.length,uo.addSymbols(uo.icon,jd,xp,ru,lv,pc,i.ah.vertical,$o,p0.lineStartIndex,p0.lineLength,-1,ff),Qw=uo.icon.placedSymbolArray.length-1)}let Kh=Object.keys(Ou.horizontal);for(let kd of Kh){let rp=Ou.horizontal[kd];if(!Gp){_y=xi(rp.text);let jd=Ch.layout.get("text-rotate").evaluate(pc,{},ff);Gp=new dm(Vd,$o,Gd,Hd,Af,rp,Lh,Ed,cd,jd)}let pm=rp.positionedLines.length===1;if(uv+=JC(uo,$o,rp,Qv,Ch,cd,pc,Yh,p0,Ou.vertical?i.ah.horizontal:i.ah.horizontalOnly,pm?Kh:[kd],g0,kS,$u,ff),pm)break}Ou.vertical&&(B1+=JC(uo,$o,Ou.vertical,Qv,Ch,cd,pc,Yh,p0,i.ah.vertical,["vertical"],g0,Qw,$u,ff));let cq=Gp?Gp.boxStartIndex:uo.collisionBoxArray.length,e3=Gp?Gp.boxEndIndex:uo.collisionBoxArray.length,m0=Gc?Gc.boxStartIndex:uo.collisionBoxArray.length,cv=Gc?Gc.boxEndIndex:uo.collisionBoxArray.length,r6=ep?ep.boxStartIndex:uo.collisionBoxArray.length,fq=ep?ep.boxEndIndex:uo.collisionBoxArray.length,i6=Yf?Yf.boxStartIndex:uo.collisionBoxArray.length,hq=Yf?Yf.boxEndIndex:uo.collisionBoxArray.length,_p=-1,fb=(kd,rp)=>kd&&kd.circleDiameter?Math.max(kd.circleDiameter,rp):rp;_p=fb(Gp,_p),_p=fb(Gc,_p),_p=fb(ep,_p),_p=fb(Yf,_p);let t3=_p>-1?1:0;t3&&(_p*=O1/tu),uo.glyphOffsetArray.length>=R1.MAX_GLYPHS&&E("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),pc.sortKey!==void 0&&uo.addToSortKeyRanges(uo.symbolInstances.length,pc.sortKey);let CS=KC(Ch,pc,ff),[dq,vq]=function(kd,rp){let pm=kd.length,jd=rp==null?void 0:rp.values;if((jd==null?void 0:jd.length)>0)for(let Cd=0;Cd<jd.length;Cd+=2){let xp=jd[Cd+1];kd.emplaceBack(i.aq[jd[Cd]],xp[0],xp[1])}return[pm,kd.length]}(uo.textAnchorOffsets,CS);uo.symbolInstances.emplaceBack($o.x,$o.y,g0.right>=0?g0.right:-1,g0.center>=0?g0.center:-1,g0.left>=0?g0.left:-1,g0.vertical||-1,kS,Qw,_y,cq,e3,m0,cv,r6,fq,i6,hq,Gd,uv,B1,tp,yg,t3,0,Lh,_p,dq,vq)}(R,Ro,Wn,F,W,te,fo,R.layers[0],R.collisionBoxArray,A.index,A.sourceLayerIndex,R.index,li,[ln,ln,ln,ln],ro,Ke,vn,Tn,Vo,vr,A,fe,ft,Rt,pe)};if(Xa==="line")for(let Wn of GC(A.geometry,0,0,ja,ja)){let Ro=nq(Wn,zi,pa,F.vertical||kr,W,24,pi,R.overscaling,ja);for(let uo of Ro)kr&&lq(R,kr.text,la,uo)||lo(Wn,uo)}else if(Xa==="line-center"){for(let Wn of A.geometry)if(Wn.length>1){let Ro=iq(Wn,pa,F.vertical||kr,W,24,pi);Ro&&lo(Wn,Ro)}}else if(A.type==="Polygon")for(let Wn of Cf(A.geometry,0)){let Ro=aq(Wn,16);lo(Wn[0],new gg(Ro.x,Ro.y,0))}else if(A.type==="LineString")for(let Wn of A.geometry)lo(Wn,new gg(Wn[0].x,Wn[0].y,0));else if(A.type==="Point")for(let Wn of A.geometry)for(let Ro of Wn)lo([Ro],new gg(Ro.x,Ro.y,0))}function JC(R,A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr){let Dr=function(vn,zi,ln,Tn,pa,ro,Vo,Xa){let la=Tn.layout.get("text-rotate").evaluate(ro,{})*Math.PI/180,Mo=[];for(let fo of zi.positionedLines)for(let lo of fo.positionedGlyphs){if(!lo.rect)continue;let Wn=lo.rect||{},Ro=EC+1,uo=!0,$o=1,Ju=0,Ou=(pa||Xa)&&lo.vertical,kh=lo.metrics.advance*lo.scale/2;if(Xa&&zi.verticalizable&&(Ju=fo.lineOffset/2-(lo.imageName?-(tu-lo.metrics.width*lo.scale)/2:(lo.scale-1)*tu)),lo.imageName){let ru=Vo[lo.imageName];uo=ru.sdf,$o=ru.pixelRatio,Ro=Md/$o}let Qv=pa?[lo.x+kh,lo.y]:[0,0],ud=pa?[0,0]:[lo.x+kh+ln[0],lo.y+ln[1]-Ju],Ch=[0,0];Ou&&(Ch=ud,ud=[0,0]);let Vd=lo.metrics.isDoubleResolution?2:1,Gd=(lo.metrics.left-Ro)*lo.scale-kh+ud[0],Hd=(-lo.metrics.top-Ro)*lo.scale+ud[1],Af=Gd+Wn.w/Vd*lo.scale/$o,Lh=Hd+Wn.h/Vd*lo.scale/$o,Ed=new u(Gd,Hd),cd=new u(Af,Hd),Yh=new u(Gd,Lh),Df=new u(Af,Lh);if(Ou){let ru=new u(-kh,kh-Eh),pc=-Math.PI/2,$u=tu/2-kh,zv=new u(5-Eh-$u,-(lo.imageName?$u:0)),ff=new u(...Ch);Ed._rotateAround(pc,ru)._add(zv)._add(ff),cd._rotateAround(pc,ru)._add(zv)._add(ff),Yh._rotateAround(pc,ru)._add(zv)._add(ff),Df._rotateAround(pc,ru)._add(zv)._add(ff)}if(la){let ru=Math.sin(la),pc=Math.cos(la),$u=[pc,-ru,ru,pc];Ed._matMult($u),cd._matMult($u),Yh._matMult($u),Df._matMult($u)}let Fv=new u(0,0),lv=new u(0,0);Mo.push({tl:Ed,tr:cd,bl:Yh,br:Df,tex:Wn,writingMode:zi.writingMode,glyphOffset:Qv,sectionIndex:lo.sectionIndex,isSDF:uo,pixelOffsetTL:Fv,pixelOffsetBR:lv,minFontScaleX:0,minFontScaleY:0})}return Mo}(0,F,Re,te,fe,pe,W,R.allowVerticalPlacement),li=R.textSizeData,pi=null;li.kind==="source"?(pi=[v0*te.layout.get("text-size").evaluate(pe,{})],pi[0]>fm&&E(`${R.layerIds[0]}: Value for "text-size" is >= ${tb}. Reduce your "text-size".`)):li.kind==="composite"&&(pi=[v0*vr.compositeTextSizes[0].evaluate(pe,{},kr),v0*vr.compositeTextSizes[1].evaluate(pe,{},kr)],(pi[0]>fm||pi[1]>fm)&&E(`${R.layerIds[0]}: Value for "text-size" is >= ${tb}. Reduce your "text-size".`)),R.addSymbols(R.text,Dr,pi,Re,fe,pe,ft,A,Ke.lineStartIndex,Ke.lineLength,ur,kr);for(let vn of Rt)tr[vn]=R.text.placedSymbolArray.length-1;return 4*Dr.length}function $C(R){for(let A in R)return R[A];return null}function lq(R,A,F,W){let te=R.compareText;if(A in te){let fe=te[A];for(let pe=fe.length-1;pe>=0;pe--)if(W.dist(fe[pe])<F)return!0}else te[A]=[];return te[A].push(W),!1}let QC=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class AS{static from(A){if(!(A instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[F,W]=new Uint8Array(A,0,2);if(F!==219)throw new Error("Data does not appear to be in a KDBush format.");let te=W>>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let fe=QC[15&W];if(!fe)throw new Error("Unrecognized array type.");let[pe]=new Uint16Array(A,2,1),[Re]=new Uint32Array(A,4,1);return new AS(Re,pe,fe,A)}constructor(A,F=64,W=Float64Array,te){if(isNaN(A)||A<0)throw new Error(`Unpexpected numItems value: ${A}.`);this.numItems=+A,this.nodeSize=Math.min(Math.max(+F,2),65535),this.ArrayType=W,this.IndexArrayType=A<65536?Uint16Array:Uint32Array;let fe=QC.indexOf(this.ArrayType),pe=2*A*this.ArrayType.BYTES_PER_ELEMENT,Re=A*this.IndexArrayType.BYTES_PER_ELEMENT,Ke=(8-Re%8)%8;if(fe<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,A),this.coords=new this.ArrayType(this.data,8+Re+Ke,2*A),this._pos=2*A,this._finished=!0):(this.data=new ArrayBuffer(8+pe+Re+Ke),this.ids=new this.IndexArrayType(this.data,8,A),this.coords=new this.ArrayType(this.data,8+Re+Ke,2*A),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+fe]),new Uint16Array(this.data,2,1)[0]=F,new Uint32Array(this.data,4,1)[0]=A)}add(A,F){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=A,this.coords[this._pos++]=F,W}finish(){let A=this._pos>>1;if(A!==this.numItems)throw new Error(`Added ${A} items when expected ${this.numItems}.`);return Kw(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(A,F,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:fe,coords:pe,nodeSize:Re}=this,Ke=[0,fe.length-1,0],ft=[];for(;Ke.length;){let Rt=Ke.pop()||0,tr=Ke.pop()||0,ur=Ke.pop()||0;if(tr-ur<=Re){for(let li=ur;li<=tr;li++){let pi=pe[2*li],vn=pe[2*li+1];pi>=A&&pi<=W&&vn>=F&&vn<=te&&ft.push(fe[li])}continue}let vr=ur+tr>>1,kr=pe[2*vr],Dr=pe[2*vr+1];kr>=A&&kr<=W&&Dr>=F&&Dr<=te&&ft.push(fe[vr]),(Rt===0?A<=kr:F<=Dr)&&(Ke.push(ur),Ke.push(vr-1),Ke.push(1-Rt)),(Rt===0?W>=kr:te>=Dr)&&(Ke.push(vr+1),Ke.push(tr),Ke.push(1-Rt))}return ft}within(A,F,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:fe,nodeSize:pe}=this,Re=[0,te.length-1,0],Ke=[],ft=W*W;for(;Re.length;){let Rt=Re.pop()||0,tr=Re.pop()||0,ur=Re.pop()||0;if(tr-ur<=pe){for(let li=ur;li<=tr;li++)t6(fe[2*li],fe[2*li+1],A,F)<=ft&&Ke.push(te[li]);continue}let vr=ur+tr>>1,kr=fe[2*vr],Dr=fe[2*vr+1];t6(kr,Dr,A,F)<=ft&&Ke.push(te[vr]),(Rt===0?A-W<=kr:F-W<=Dr)&&(Re.push(ur),Re.push(vr-1),Re.push(1-Rt)),(Rt===0?A+W>=kr:F+W>=Dr)&&(Re.push(vr+1),Re.push(tr),Re.push(1-Rt))}return Ke}}function Kw(R,A,F,W,te,fe){if(te-W<=F)return;let pe=W+te>>1;e6(R,A,pe,W,te,fe),Kw(R,A,F,W,pe-1,1-fe),Kw(R,A,F,pe+1,te,1-fe)}function e6(R,A,F,W,te,fe){for(;te>W;){if(te-W>600){let ft=te-W+1,Rt=F-W+1,tr=Math.log(ft),ur=.5*Math.exp(2*tr/3),vr=.5*Math.sqrt(tr*ur*(ft-ur)/ft)*(Rt-ft/2<0?-1:1);e6(R,A,F,Math.max(W,Math.floor(F-Rt*ur/ft+vr)),Math.min(te,Math.floor(F+(ft-Rt)*ur/ft+vr)),fe)}let pe=A[2*F+fe],Re=W,Ke=te;for(ub(R,A,W,F),A[2*te+fe]>pe&&ub(R,A,W,te);Re<Ke;){for(ub(R,A,Re,Ke),Re++,Ke--;A[2*Re+fe]<pe;)Re++;for(;A[2*Ke+fe]>pe;)Ke--}A[2*W+fe]===pe?ub(R,A,W,Ke):(Ke++,ub(R,A,Ke,te)),Ke<=F&&(W=Ke+1),F<=Ke&&(te=Ke-1)}}function ub(R,A,F,W){SS(R,F,W),SS(A,2*F,2*W),SS(A,2*F+1,2*W+1)}function SS(R,A,F){let W=R[A];R[A]=R[F],R[F]=W}function t6(R,A,F,W){let te=R-F,fe=A-W;return te*te+fe*fe}var Jw;i.bg=void 0,(Jw=i.bg||(i.bg={})).create="create",Jw.load="load",Jw.fullLoad="fullLoad";let cb=null,sh=[],MS=1e3/60,ES="loadTime",$w="fullLoadTime",uq={mark(R){performance.mark(R)},frame(R){let A=R;cb!=null&&sh.push(A-cb),cb=A},clearMetrics(){cb=null,sh=[],performance.clearMeasures(ES),performance.clearMeasures($w);for(let R in i.bg)performance.clearMarks(i.bg[R])},getPerformanceMetrics(){performance.measure(ES,i.bg.create,i.bg.load),performance.measure($w,i.bg.create,i.bg.fullLoad);let R=performance.getEntriesByName(ES)[0].duration,A=performance.getEntriesByName($w)[0].duration,F=sh.length,W=1/(sh.reduce((fe,pe)=>fe+pe,0)/F/1e3),te=sh.filter(fe=>fe>MS).reduce((fe,pe)=>fe+(pe-MS)/MS,0);return{loadTime:R,fullLoadTime:A,fps:W,percentDroppedFrames:te/(F+te)*100,totalFrames:F}}};i.$=class extends Jt{},i.A=yi,i.B=dn,i.C=function(R){if(U==null){let A=R.navigator?R.navigator.userAgent:null;U=!!R.safari||!(!A||!(/\b(iPad|iPhone|iPod)\b/.test(A)||A.match("Safari")&&!A.match("Chrome")))}return U},i.D=Ua,i.E=Pe,i.F=class{constructor(R,A){this.target=R,this.mapId=A,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new mS(()=>this.process()),this.subscription=function(F,W,te,fe){return F.addEventListener(W,te,!1),{unsubscribe:()=>{F.removeEventListener(W,te,!1)}}}(this.target,"message",F=>this.receive(F)),this.globalScope=q(self)?R:window}registerMessageHandler(R,A){this.messageHandlers[R]=A}sendAsync(R,A){return new Promise((F,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[te]={resolve:F,reject:W},A&&A.signal.addEventListener("abort",()=>{delete this.resolveRejects[te];let Re={id:te,type:"<cancel>",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Re)},{once:!0});let fe=[],pe=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:La(R.data,fe)});this.target.postMessage(pe,{transfer:fe})})}receive(R){let A=R.data,F=A.id;if(!(A.origin!=="file://"&&location.origin!=="file://"&&A.origin!=="resource://android"&&location.origin!=="resource://android"&&A.origin!==location.origin||A.targetMapId&&this.mapId!==A.targetMapId)){if(A.type==="<cancel>"){delete this.tasks[F];let W=this.abortControllers[F];return delete this.abortControllers[F],void(W&&W.abort())}if(q(self)||A.mustQueue)return this.tasks[F]=A,this.taskQueue.push(F),void this.invoker.trigger();this.processTask(F,A)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),A=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),A&&this.processTask(R,A)}processTask(R,A){return a(this,void 0,void 0,function*(){if(A.type==="<response>"){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(A.error?te.reject(Na(A.error)):te.resolve(Na(A.data))):void 0}if(!this.messageHandlers[A.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${A.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let F=Na(A.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[A.type](A.sourceMapId,F,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,te)}})}completeTask(R,A,F){let W=[];delete this.abortControllers[R];let te={id:R,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:A?La(A):null,data:La(F,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=Ce,i.H=function(){var R=new yi(16);return yi!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},i.I=Nw,i.J=function(R,A,F){var W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr=F[0],li=F[1],pi=F[2];return A===R?(R[12]=A[0]*Dr+A[4]*li+A[8]*pi+A[12],R[13]=A[1]*Dr+A[5]*li+A[9]*pi+A[13],R[14]=A[2]*Dr+A[6]*li+A[10]*pi+A[14],R[15]=A[3]*Dr+A[7]*li+A[11]*pi+A[15]):(te=A[1],fe=A[2],pe=A[3],Re=A[4],Ke=A[5],ft=A[6],Rt=A[7],tr=A[8],ur=A[9],vr=A[10],kr=A[11],R[0]=W=A[0],R[1]=te,R[2]=fe,R[3]=pe,R[4]=Re,R[5]=Ke,R[6]=ft,R[7]=Rt,R[8]=tr,R[9]=ur,R[10]=vr,R[11]=kr,R[12]=W*Dr+Re*li+tr*pi+A[12],R[13]=te*Dr+Ke*li+ur*pi+A[13],R[14]=fe*Dr+ft*li+vr*pi+A[14],R[15]=pe*Dr+Rt*li+kr*pi+A[15]),R},i.K=function(R,A,F){var W=F[0],te=F[1],fe=F[2];return R[0]=A[0]*W,R[1]=A[1]*W,R[2]=A[2]*W,R[3]=A[3]*W,R[4]=A[4]*te,R[5]=A[5]*te,R[6]=A[6]*te,R[7]=A[7]*te,R[8]=A[8]*fe,R[9]=A[9]*fe,R[10]=A[10]*fe,R[11]=A[11]*fe,R[12]=A[12],R[13]=A[13],R[14]=A[14],R[15]=A[15],R},i.L=ui,i.M=function(R,A){let F={};for(let W=0;W<A.length;W++){let te=A[W];te in R&&(F[te]=R[te])}return F},i.N=pg,i.O=Xw,i.P=u,i.Q=qC,i.R=Ki,i.S=$v,i.T=Yu,i.U=m,i.V=b,i.W=j,i.X=ja,i.Y=ze,i.Z=sb,i._=a,i.a=_e,i.a$=function(R,A){var F=R[0],W=R[1],te=R[2],fe=R[3],pe=R[4],Re=R[5],Ke=R[6],ft=R[7],Rt=R[8],tr=R[9],ur=R[10],vr=R[11],kr=R[12],Dr=R[13],li=R[14],pi=R[15],vn=A[0],zi=A[1],ln=A[2],Tn=A[3],pa=A[4],ro=A[5],Vo=A[6],Xa=A[7],la=A[8],Mo=A[9],fo=A[10],lo=A[11],Wn=A[12],Ro=A[13],uo=A[14],$o=A[15];return Math.abs(F-vn)<=Zr*Math.max(1,Math.abs(F),Math.abs(vn))&&Math.abs(W-zi)<=Zr*Math.max(1,Math.abs(W),Math.abs(zi))&&Math.abs(te-ln)<=Zr*Math.max(1,Math.abs(te),Math.abs(ln))&&Math.abs(fe-Tn)<=Zr*Math.max(1,Math.abs(fe),Math.abs(Tn))&&Math.abs(pe-pa)<=Zr*Math.max(1,Math.abs(pe),Math.abs(pa))&&Math.abs(Re-ro)<=Zr*Math.max(1,Math.abs(Re),Math.abs(ro))&&Math.abs(Ke-Vo)<=Zr*Math.max(1,Math.abs(Ke),Math.abs(Vo))&&Math.abs(ft-Xa)<=Zr*Math.max(1,Math.abs(ft),Math.abs(Xa))&&Math.abs(Rt-la)<=Zr*Math.max(1,Math.abs(Rt),Math.abs(la))&&Math.abs(tr-Mo)<=Zr*Math.max(1,Math.abs(tr),Math.abs(Mo))&&Math.abs(ur-fo)<=Zr*Math.max(1,Math.abs(ur),Math.abs(fo))&&Math.abs(vr-lo)<=Zr*Math.max(1,Math.abs(vr),Math.abs(lo))&&Math.abs(kr-Wn)<=Zr*Math.max(1,Math.abs(kr),Math.abs(Wn))&&Math.abs(Dr-Ro)<=Zr*Math.max(1,Math.abs(Dr),Math.abs(Ro))&&Math.abs(li-uo)<=Zr*Math.max(1,Math.abs(li),Math.abs(uo))&&Math.abs(pi-$o)<=Zr*Math.max(1,Math.abs(pi),Math.abs($o))},i.a0=Ye,i.a1=_S,i.a2=Ue,i.a3=R=>{let A=window.document.createElement("video");return A.muted=!0,new Promise(F=>{A.onloadstart=()=>{F(A)};for(let W of R){let te=window.document.createElement("source");Ee(W)||(A.crossOrigin="Anonymous"),te.src=W,A.appendChild(te)}})},i.a4=function(){return x++},i.a5=Ln,i.a6=R1,i.a7=Fc,i.a8=Sl,i.a9=xS,i.aA=function(R){if(R.type==="custom")return new gS(R);switch(R.type){case"background":return new tq(R);case"circle":return new fi(R);case"fill":return new _t(R);case"fill-extrusion":return new Lv(R);case"heatmap":return new sa(R);case"hillshade":return new Zs(R);case"line":return new hy(R);case"raster":return new ab(R);case"symbol":return new gy(R)}},i.aB=g,i.aC=function(R,A){if(!R)return[{command:"setStyle",args:[A]}];let F=[];try{if(!mt(R.version,A.version))return[{command:"setStyle",args:[A]}];mt(R.center,A.center)||F.push({command:"setCenter",args:[A.center]}),mt(R.zoom,A.zoom)||F.push({command:"setZoom",args:[A.zoom]}),mt(R.bearing,A.bearing)||F.push({command:"setBearing",args:[A.bearing]}),mt(R.pitch,A.pitch)||F.push({command:"setPitch",args:[A.pitch]}),mt(R.sprite,A.sprite)||F.push({command:"setSprite",args:[A.sprite]}),mt(R.glyphs,A.glyphs)||F.push({command:"setGlyphs",args:[A.glyphs]}),mt(R.transition,A.transition)||F.push({command:"setTransition",args:[A.transition]}),mt(R.light,A.light)||F.push({command:"setLight",args:[A.light]}),mt(R.terrain,A.terrain)||F.push({command:"setTerrain",args:[A.terrain]}),mt(R.sky,A.sky)||F.push({command:"setSky",args:[A.sky]}),mt(R.projection,A.projection)||F.push({command:"setProjection",args:[A.projection]});let W={},te=[];(function(pe,Re,Ke,ft){let Rt;for(Rt in Re=Re||{},pe=pe||{})Object.prototype.hasOwnProperty.call(pe,Rt)&&(Object.prototype.hasOwnProperty.call(Re,Rt)||ct(Rt,Ke,ft));for(Rt in Re)Object.prototype.hasOwnProperty.call(Re,Rt)&&(Object.prototype.hasOwnProperty.call(pe,Rt)?mt(pe[Rt],Re[Rt])||(pe[Rt].type==="geojson"&&Re[Rt].type==="geojson"&&Ht(pe,Re,Rt)?Vt(Ke,{command:"setGeoJSONSourceData",args:[Rt,Re[Rt].data]}):Qt(Rt,Re,Ke,ft)):st(Rt,Re,Ke))})(R.sources,A.sources,te,W);let fe=[];R.layers&&R.layers.forEach(pe=>{"source"in pe&&W[pe.source]?F.push({command:"removeLayer",args:[pe.id]}):fe.push(pe)}),F=F.concat(te),function(pe,Re,Ke){Re=Re||[];let ft=(pe=pe||[]).map(tt),Rt=Re.map(tt),tr=pe.reduce(je,{}),ur=Re.reduce(je,{}),vr=ft.slice(),kr=Object.create(null),Dr,li,pi,vn,zi;for(let ln=0,Tn=0;ln<ft.length;ln++)Dr=ft[ln],Object.prototype.hasOwnProperty.call(ur,Dr)?Tn++:(Vt(Ke,{command:"removeLayer",args:[Dr]}),vr.splice(vr.indexOf(Dr,Tn),1));for(let ln=0,Tn=0;ln<Rt.length;ln++)Dr=Rt[Rt.length-1-ln],vr[vr.length-1-ln]!==Dr&&(Object.prototype.hasOwnProperty.call(tr,Dr)?(Vt(Ke,{command:"removeLayer",args:[Dr]}),vr.splice(vr.lastIndexOf(Dr,vr.length-Tn),1)):Tn++,vn=vr[vr.length-ln],Vt(Ke,{command:"addLayer",args:[ur[Dr],vn]}),vr.splice(vr.length-ln,0,Dr),kr[Dr]=!0);for(let ln=0;ln<Rt.length;ln++)if(Dr=Rt[ln],li=tr[Dr],pi=ur[Dr],!kr[Dr]&&!mt(li,pi))if(mt(li.source,pi.source)&&mt(li["source-layer"],pi["source-layer"])&&mt(li.type,pi.type)){for(zi in nr(li.layout,pi.layout,Ke,Dr,null,"setLayoutProperty"),nr(li.paint,pi.paint,Ke,Dr,null,"setPaintProperty"),mt(li.filter,pi.filter)||Vt(Ke,{command:"setFilter",args:[Dr,pi.filter]}),mt(li.minzoom,pi.minzoom)&&mt(li.maxzoom,pi.maxzoom)||Vt(Ke,{command:"setLayerZoomRange",args:[Dr,pi.minzoom,pi.maxzoom]}),li)Object.prototype.hasOwnProperty.call(li,zi)&&zi!=="layout"&&zi!=="paint"&&zi!=="filter"&&zi!=="metadata"&&zi!=="minzoom"&&zi!=="maxzoom"&&(zi.indexOf("paint.")===0?nr(li[zi],pi[zi],Ke,Dr,zi.slice(6),"setPaintProperty"):mt(li[zi],pi[zi])||Vt(Ke,{command:"setLayerProperty",args:[Dr,zi,pi[zi]]}));for(zi in pi)Object.prototype.hasOwnProperty.call(pi,zi)&&!Object.prototype.hasOwnProperty.call(li,zi)&&zi!=="layout"&&zi!=="paint"&&zi!=="filter"&&zi!=="metadata"&&zi!=="minzoom"&&zi!=="maxzoom"&&(zi.indexOf("paint.")===0?nr(li[zi],pi[zi],Ke,Dr,zi.slice(6),"setPaintProperty"):mt(li[zi],pi[zi])||Vt(Ke,{command:"setLayerProperty",args:[Dr,zi,pi[zi]]}))}else Vt(Ke,{command:"removeLayer",args:[Dr]}),vn=vr[vr.lastIndexOf(Dr)+1],Vt(Ke,{command:"addLayer",args:[pi,vn]})}(fe,A.layers,F)}catch(W){console.warn("Unable to compute style diff:",W),F=[{command:"setStyle",args:[A]}]}return F},i.aD=function(R){let A=[],F=R.id;return F===void 0&&A.push({message:`layers.${F}: missing required property "id"`}),R.render===void 0&&A.push({message:`layers.${F}: missing required method "render"`}),R.renderingMode&&R.renderingMode!=="2d"&&R.renderingMode!=="3d"&&A.push({message:`layers.${F}: property "renderingMode" must be either "2d" or "3d"`}),A},i.aE=function R(A,F){if(Array.isArray(A)){if(!Array.isArray(F)||A.length!==F.length)return!1;for(let W=0;W<A.length;W++)if(!R(A[W],F[W]))return!1;return!0}if(typeof A=="object"&&A!==null&&F!==null){if(typeof F!="object"||Object.keys(A).length!==Object.keys(F).length)return!1;for(let W in A)if(!R(A[W],F[W]))return!1;return!0}return A===F},i.aF=C,i.aG=S,i.aH=class extends Ti{constructor(R,A){super(R,A),this.current=0}set(R){this.current!==R&&(this.current=R,this.gl.uniform1i(this.location,R))}},i.aI=Qr,i.aJ=class extends Ti{constructor(R,A){super(R,A),this.current=Bn}set(R){if(R[12]!==this.current[12]||R[0]!==this.current[0])return this.current=R,void this.gl.uniformMatrix4fv(this.location,!1,R);for(let A=1;A<16;A++)if(R[A]!==this.current[A]){this.current=R,this.gl.uniformMatrix4fv(this.location,!1,R);break}}},i.aK=Pn,i.aL=kn,i.aM=ir,i.aN=class extends Ti{constructor(R,A){super(R,A),this.current=[0,0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]&&R[2]===this.current[2]||(this.current=R,this.gl.uniform3f(this.location,R[0],R[1],R[2]))}},i.aO=class extends Ti{constructor(R,A){super(R,A),this.current=[0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]||(this.current=R,this.gl.uniform2f(this.location,R[0],R[1]))}},i.aP=function(R,A,F,W,te,fe,pe){var Re=1/(A-F),Ke=1/(W-te),ft=1/(fe-pe);return R[0]=-2*Re,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Ke,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*ft,R[11]=0,R[12]=(A+F)*Re,R[13]=(te+W)*Ke,R[14]=(pe+fe)*ft,R[15]=1,R},i.aQ=Xi,i.aR=class extends nt{},i.aS=om,i.aT=class extends jt{},i.aU=ia,i.aV=function(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))},i.aW=Cn,i.aX=wo,i.aY=se,i.aZ=class extends Ci{},i.a_=function(R,A){return R[0]===A[0]&&R[1]===A[1]&&R[2]===A[2]&&R[3]===A[3]&&R[4]===A[4]&&R[5]===A[5]&&R[6]===A[6]&&R[7]===A[7]&&R[8]===A[8]&&R[9]===A[9]&&R[10]===A[10]&&R[11]===A[11]&&R[12]===A[12]&&R[13]===A[13]&&R[14]===A[14]&&R[15]===A[15]},i.aa=function(R){let A={};if(R.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(F,W,te,fe)=>{let pe=te||fe;return A[W]=!pe||pe.toLowerCase(),""}),A["max-age"]){let F=parseInt(A["max-age"],10);isNaN(F)?delete A["max-age"]:A["max-age"]=F}return A},i.ab=function(R,A){let F=[];for(let W in R)W in A||F.push(W);return F},i.ac=M,i.ad=function(R,A,F){var W=Math.sin(F),te=Math.cos(F),fe=A[0],pe=A[1],Re=A[2],Ke=A[3],ft=A[4],Rt=A[5],tr=A[6],ur=A[7];return A!==R&&(R[8]=A[8],R[9]=A[9],R[10]=A[10],R[11]=A[11],R[12]=A[12],R[13]=A[13],R[14]=A[14],R[15]=A[15]),R[0]=fe*te+ft*W,R[1]=pe*te+Rt*W,R[2]=Re*te+tr*W,R[3]=Ke*te+ur*W,R[4]=ft*te-fe*W,R[5]=Rt*te-pe*W,R[6]=tr*te-Re*W,R[7]=ur*te-Ke*W,R},i.ae=function(R){var A=new yi(16);return A[0]=R[0],A[1]=R[1],A[2]=R[2],A[3]=R[3],A[4]=R[4],A[5]=R[5],A[6]=R[6],A[7]=R[7],A[8]=R[8],A[9]=R[9],A[10]=R[10],A[11]=R[11],A[12]=R[12],A[13]=R[13],A[14]=R[14],A[15]=R[15],A},i.af=qn,i.ag=function(R,A){let F=0,W=0;if(R.kind==="constant")W=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:te,minZoom:fe,maxZoom:pe}=R,Re=te?M(ko.interpolationFactor(te,A,fe,pe),0,1):0;R.kind==="camera"?W=Lo.number(R.minSize,R.maxSize,Re):F=Re}return{uSizeT:F,uSize:W}},i.ai=function(R,{uSize:A,uSizeT:F},{lowerSize:W,upperSize:te}){return R.kind==="source"?W/v0:R.kind==="composite"?Lo.number(W/v0,te/v0,F):A},i.aj=hS,i.ak=function(R,A,F,W){let te=A.y-R.y,fe=A.x-R.x,pe=W.y-F.y,Re=W.x-F.x,Ke=pe*fe-Re*te;if(Ke===0)return null;let ft=(Re*(R.y-F.y)-pe*(R.x-F.x))/Ke;return new u(R.x+ft*fe,R.y+ft*te)},i.al=GC,i.am=Sc,i.an=Ii,i.ao=function(R){let A=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)A=Math.min(A,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return[A,F,W,te]},i.ap=tu,i.ar=fS,i.as=function(R,A){var F=A[0],W=A[1],te=A[2],fe=A[3],pe=A[4],Re=A[5],Ke=A[6],ft=A[7],Rt=A[8],tr=A[9],ur=A[10],vr=A[11],kr=A[12],Dr=A[13],li=A[14],pi=A[15],vn=F*Re-W*pe,zi=F*Ke-te*pe,ln=F*ft-fe*pe,Tn=W*Ke-te*Re,pa=W*ft-fe*Re,ro=te*ft-fe*Ke,Vo=Rt*Dr-tr*kr,Xa=Rt*li-ur*kr,la=Rt*pi-vr*kr,Mo=tr*li-ur*Dr,fo=tr*pi-vr*Dr,lo=ur*pi-vr*li,Wn=vn*lo-zi*fo+ln*Mo+Tn*la-pa*Xa+ro*Vo;return Wn?(R[0]=(Re*lo-Ke*fo+ft*Mo)*(Wn=1/Wn),R[1]=(te*fo-W*lo-fe*Mo)*Wn,R[2]=(Dr*ro-li*pa+pi*Tn)*Wn,R[3]=(ur*pa-tr*ro-vr*Tn)*Wn,R[4]=(Ke*la-pe*lo-ft*Xa)*Wn,R[5]=(F*lo-te*la+fe*Xa)*Wn,R[6]=(li*ln-kr*ro-pi*zi)*Wn,R[7]=(Rt*ro-ur*ln+vr*zi)*Wn,R[8]=(pe*fo-Re*la+ft*Vo)*Wn,R[9]=(W*la-F*fo-fe*Vo)*Wn,R[10]=(kr*pa-Dr*ln+pi*vn)*Wn,R[11]=(tr*ln-Rt*pa-vr*vn)*Wn,R[12]=(Re*Xa-pe*Mo-Ke*Vo)*Wn,R[13]=(F*Mo-W*Xa+te*Vo)*Wn,R[14]=(Dr*zi-kr*Tn-li*vn)*Wn,R[15]=(Rt*Tn-tr*zi+ur*vn)*Wn,R):null},i.at=TS,i.au=Hw,i.av=AS,i.aw=function(){let R={},A=ce.$version;for(let F in ce.$root){let W=ce.$root[F];if(W.required){let te=null;te=F==="version"?A:W.type==="array"?[]:{},te!=null&&(R[F]=te)}}return R},i.ax=Zn,i.ay=ie,i.az=function(R){R=R.slice();let A=Object.create(null);for(let F=0;F<R.length;F++)A[R[F].id]=R[F];for(let F=0;F<R.length;F++)"ref"in R[F]&&(R[F]=lt(R[F],A[R[F].ref]));return R},i.b=G,i.b0=function(R,A){return R[0]=A[0],R[1]=A[1],R[2]=A[2],R[3]=A[3],R[4]=A[4],R[5]=A[5],R[6]=A[6],R[7]=A[7],R[8]=A[8],R[9]=A[9],R[10]=A[10],R[11]=A[11],R[12]=A[12],R[13]=A[13],R[14]=A[14],R[15]=A[15],R},i.b1=function(R,A,F){return R[0]=A[0]*F[0],R[1]=A[1]*F[1],R[2]=A[2]*F[2],R[3]=A[3]*F[3],R},i.b2=function(R,A){return R[0]*A[0]+R[1]*A[1]+R[2]*A[2]+R[3]*A[3]},i.b3=T,i.b4=OC,i.b5=Zw,i.b6=function(R,A,F,W,te){var fe,pe=1/Math.tan(A/2);return R[0]=pe/F,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=pe,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=-1,R[12]=0,R[13]=0,R[15]=0,te!=null&&te!==1/0?(R[10]=(te+W)*(fe=1/(W-te)),R[14]=2*te*W*fe):(R[10]=-1,R[14]=-2*W),R},i.b7=function(R,A,F){var W=Math.sin(F),te=Math.cos(F),fe=A[4],pe=A[5],Re=A[6],Ke=A[7],ft=A[8],Rt=A[9],tr=A[10],ur=A[11];return A!==R&&(R[0]=A[0],R[1]=A[1],R[2]=A[2],R[3]=A[3],R[12]=A[12],R[13]=A[13],R[14]=A[14],R[15]=A[15]),R[4]=fe*te+ft*W,R[5]=pe*te+Rt*W,R[6]=Re*te+tr*W,R[7]=Ke*te+ur*W,R[8]=ft*te-fe*W,R[9]=Rt*te-pe*W,R[10]=tr*te-Re*W,R[11]=ur*te-Ke*W,R},i.b8=p,i.b9=k,i.bA=Sd,i.bB=function(R){return R.message===re},i.bC=ks,i.bD=ys,i.ba=function(R){return R*Math.PI/180},i.bb=function(R,A){let{x:F,y:W}=sb.fromLngLat(A);return!(R<0||R>25||W<0||W>=1||F<0||F>=1)},i.bc=function(R,A){return R[0]=A[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=A[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=A[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},i.bd=class extends Mt{},i.be=yS,i.bf=uq,i.bh=ge,i.bi=function(R,A){_e.REGISTERED_PROTOCOLS[R]=A},i.bj=function(R){delete _e.REGISTERED_PROTOCOLS[R]},i.bk=function(R,A){let F={};for(let te=0;te<R.length;te++){let fe=A&&A[R[te].id]||Xh(R[te]);A&&(A[R[te].id]=fe);let pe=F[fe];pe||(pe=F[fe]=[]),pe.push(R[te])}let W=[];for(let te in F)W.push(F[te]);return W},i.bl=Fi,i.bm=NC,i.bn=my,i.bo=Uw,i.bp=function(R){R.bucket.createArrays(),R.bucket.tilePixelRatio=ja/(512*R.bucket.overscaling),R.bucket.compareText={},R.bucket.iconsNeedLinear=!1;let A=R.bucket.layers[0],F=A.layout,W=A._unevaluatedLayout._values,te={layoutIconSize:W["icon-size"].possiblyEvaluate(new rs(R.bucket.zoom+1),R.canonical),layoutTextSize:W["text-size"].possiblyEvaluate(new rs(R.bucket.zoom+1),R.canonical),textMaxSize:W["text-size"].possiblyEvaluate(new rs(18))};if(R.bucket.textSizeData.kind==="composite"){let{minZoom:ft,maxZoom:Rt}=R.bucket.textSizeData;te.compositeTextSizes=[W["text-size"].possiblyEvaluate(new rs(ft),R.canonical),W["text-size"].possiblyEvaluate(new rs(Rt),R.canonical)]}if(R.bucket.iconSizeData.kind==="composite"){let{minZoom:ft,maxZoom:Rt}=R.bucket.iconSizeData;te.compositeIconSizes=[W["icon-size"].possiblyEvaluate(new rs(ft),R.canonical),W["icon-size"].possiblyEvaluate(new rs(Rt),R.canonical)]}let fe=F.get("text-line-height")*tu,pe=F.get("text-rotation-alignment")!=="viewport"&&F.get("symbol-placement")!=="point",Re=F.get("text-keep-upright"),Ke=F.get("text-size");for(let ft of R.bucket.features){let Rt=F.get("text-font").evaluate(ft,{},R.canonical).join(","),tr=Ke.evaluate(ft,{},R.canonical),ur=te.layoutTextSize.evaluate(ft,{},R.canonical),vr=te.layoutIconSize.evaluate(ft,{},R.canonical),kr={horizontal:{},vertical:void 0},Dr=ft.text,li,pi=[0,0];if(Dr){let ln=Dr.toString(),Tn=F.get("text-letter-spacing").evaluate(ft,{},R.canonical)*tu,pa=bo(ln)?Tn:0,ro=F.get("text-anchor").evaluate(ft,{},R.canonical),Vo=KC(A,ft,R.canonical);if(!Vo){let fo=F.get("text-radial-offset").evaluate(ft,{},R.canonical);pi=fo?wS(ro,[fo*tu,yy]):F.get("text-offset").evaluate(ft,{},R.canonical).map(lo=>lo*tu)}let Xa=pe?"center":F.get("text-justify").evaluate(ft,{},R.canonical),la=F.get("symbol-placement")==="point"?F.get("text-max-width").evaluate(ft,{},R.canonical)*tu:1/0,Mo=()=>{R.bucket.allowVerticalPlacement&&Ka(ln)&&(kr.vertical=Qx(Dr,R.glyphMap,R.glyphPositions,R.imagePositions,Rt,la,fe,ro,"left",pa,pi,i.ah.vertical,!0,ur,tr))};if(!pe&&Vo){let fo=new Set;if(Xa==="auto")for(let Wn=0;Wn<Vo.values.length;Wn+=2)fo.add(TS(Vo.values[Wn]));else fo.add(Xa);let lo=!1;for(let Wn of fo)if(!kr.horizontal[Wn])if(lo)kr.horizontal[Wn]=kr.horizontal[0];else{let Ro=Qx(Dr,R.glyphMap,R.glyphPositions,R.imagePositions,Rt,la,fe,"center",Wn,pa,pi,i.ah.horizontal,!1,ur,tr);Ro&&(kr.horizontal[Wn]=Ro,lo=Ro.positionedLines.length===1)}Mo()}else{Xa==="auto"&&(Xa=TS(ro));let fo=Qx(Dr,R.glyphMap,R.glyphPositions,R.imagePositions,Rt,la,fe,ro,Xa,pa,pi,i.ah.horizontal,!1,ur,tr);fo&&(kr.horizontal[Xa]=fo),Mo(),Ka(ln)&&pe&&Re&&(kr.vertical=Qx(Dr,R.glyphMap,R.glyphPositions,R.imagePositions,Rt,la,fe,ro,Xa,pa,pi,i.ah.vertical,!1,ur,tr))}}let vn=!1;if(ft.icon&&ft.icon.name){let ln=R.imageMap[ft.icon.name];ln&&(li=eb(R.imagePositions[ft.icon.name],F.get("icon-offset").evaluate(ft,{},R.canonical),F.get("icon-anchor").evaluate(ft,{},R.canonical)),vn=!!ln.sdf,R.bucket.sdfIcons===void 0?R.bucket.sdfIcons=vn:R.bucket.sdfIcons!==vn&&E("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(ln.pixelRatio!==R.bucket.pixelRatio||F.get("icon-rotate").constantOr(1)!==0)&&(R.bucket.iconsNeedLinear=!0))}let zi=$C(kr.horizontal)||kr.vertical;R.bucket.iconsInText=!!zi&&zi.iconsInText,(zi||li)&&sq(R.bucket,ft,kr,li,R.imageMap,te,ur,vr,pi,vn,R.canonical)}R.showCollisionBoxes&&R.bucket.generateCollisionDebugBuffers()},i.bq=Jv,i.br=Bt,i.bs=so,i.bt=yr,i.bu=lS,i.bv=class{constructor(R){this._marks={start:[R.url,"start"].join("#"),end:[R.url,"end"].join("#"),measure:R.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let R=performance.getEntriesByName(this._marks.measure);return R.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),R=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),R}},i.bw=function(R,A,F,W,te){return a(this,void 0,void 0,function*(){if(b())try{return yield j(R,A,F,W,te)}catch(fe){}return function(fe,pe,Re,Ke,ft){let Rt=fe.width,tr=fe.height;N&&H||(N=new OffscreenCanvas(Rt,tr),H=N.getContext("2d",{willReadFrequently:!0})),N.width=Rt,N.height=tr,H.drawImage(fe,0,0,Rt,tr);let ur=H.getImageData(pe,Re,Ke,ft);return H.clearRect(0,0,Rt,tr),ur.data}(R,A,F,W,te)})},i.bx=BC,i.by=o,i.bz=s,i.c=oe,i.d=R=>a(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let A=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(A)}catch(F){throw new Error(`Could not load image because of ${F.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),i.e=L,i.f=R=>new Promise((A,F)=>{let W=new Image;W.onload=()=>{A(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>{W.src=Z})},W.onerror=()=>F(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(R)],{type:"image/png"});W.src=R.byteLength?URL.createObjectURL(te):Z}),i.g=ke,i.h=(R,A)=>Se(L(R,{type:"json"}),A),i.i=q,i.j=me,i.k=Le,i.l=(R,A)=>Se(L(R,{type:"arrayBuffer"}),A),i.m=Se,i.n=function(R){return new lS(R).readFields(OQ,[])},i.o=aa,i.p=cS,i.q=ue,i.r=Wi,i.s=Ee,i.t=Yi,i.u=Mi,i.v=ce,i.w=E,i.x=function([R,A,F]){return A+=90,A*=Math.PI/180,F*=Math.PI/180,{x:R*Math.cos(A)*Math.sin(F),y:R*Math.sin(A)*Math.sin(F),z:R*Math.cos(F)}},i.y=Lo,i.z=rs}),r("worker",["./shared"],function(i){"use strict";class a{constructor(Ge){this.keyCache={},Ge&&this.replace(Ge)}replace(Ge){this._layerConfigs={},this._layers={},this.update(Ge,[])}update(Ge,Je){for(let et of Ge){this._layerConfigs[et.id]=et;let xt=this._layers[et.id]=i.aA(et);xt._featureFilter=i.a7(xt.filter),this.keyCache[et.id]&&delete this.keyCache[et.id]}for(let et of Je)delete this.keyCache[et],delete this._layerConfigs[et],delete this._layers[et];this.familiesBySource={};let We=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let et of We){let xt=et.map(Ir=>this._layers[Ir.id]),At=xt[0];if(At.visibility==="none")continue;let Kt=At.source||"",er=this.familiesBySource[Kt];er||(er=this.familiesBySource[Kt]={});let Sr=At.sourceLayer||"_geojsonTileLayer",Gr=er[Sr];Gr||(Gr=er[Sr]=[]),Gr.push(xt)}}}class o{constructor(Ge){let Je={},We=[];for(let Kt in Ge){let er=Ge[Kt],Sr=Je[Kt]={};for(let Gr in er){let Ir=er[+Gr];if(!Ir||Ir.bitmap.width===0||Ir.bitmap.height===0)continue;let Yr={x:0,y:0,w:Ir.bitmap.width+2,h:Ir.bitmap.height+2};We.push(Yr),Sr[Gr]={rect:Yr,metrics:Ir.metrics}}}let{w:et,h:xt}=i.p(We),At=new i.o({width:et||1,height:xt||1});for(let Kt in Ge){let er=Ge[Kt];for(let Sr in er){let Gr=er[+Sr];if(!Gr||Gr.bitmap.width===0||Gr.bitmap.height===0)continue;let Ir=Je[Kt][Sr].rect;i.o.copy(Gr.bitmap,At,{x:0,y:0},{x:Ir.x+1,y:Ir.y+1},Gr.bitmap)}}this.image=At,this.positions=Je}}i.bl("GlyphAtlas",o);class s{constructor(Ge){this.tileID=new i.S(Ge.tileID.overscaledZ,Ge.tileID.wrap,Ge.tileID.canonical.z,Ge.tileID.canonical.x,Ge.tileID.canonical.y),this.uid=Ge.uid,this.zoom=Ge.zoom,this.pixelRatio=Ge.pixelRatio,this.tileSize=Ge.tileSize,this.source=Ge.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ge.showCollisionBoxes,this.collectResourceTiming=!!Ge.collectResourceTiming,this.returnDependencies=!!Ge.returnDependencies,this.promoteId=Ge.promoteId,this.inFlightDependencies=[]}parse(Ge,Je,We,et){return i._(this,void 0,void 0,function*(){this.status="parsing",this.data=Ge,this.collisionBoxArray=new i.a5;let xt=new i.bm(Object.keys(Ge.layers).sort()),At=new i.bn(this.tileID,this.promoteId);At.bucketLayerIDs=[];let Kt={},er={featureIndex:At,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:We},Sr=Je.familiesBySource[this.source];for(let Qn in Sr){let Vi=Ge.layers[Qn];if(!Vi)continue;Vi.version===1&&i.w(`Vector tile source "${this.source}" layer "${Qn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let Kn=xt.encode(Qn),Jn=[];for(let Gt=0;Gt<Vi.length;Gt++){let wt=Vi.feature(Gt),rr=At.getId(wt,Qn);Jn.push({feature:wt,id:rr,index:Gt,sourceLayerIndex:Kn})}for(let Gt of Sr[Qn]){let wt=Gt[0];wt.source!==this.source&&i.w(`layer.source = ${wt.source} does not equal this.source = ${this.source}`),wt.minzoom&&this.zoom<Math.floor(wt.minzoom)||wt.maxzoom&&this.zoom>=wt.maxzoom||wt.visibility!=="none"&&(l(Gt,this.zoom,We),(Kt[wt.id]=wt.createBucket({index:At.bucketLayerIDs.length,layers:Gt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Kn,sourceID:this.source})).populate(Jn,er,this.tileID.canonical),At.bucketLayerIDs.push(Gt.map(rr=>rr.id)))}}let Gr=i.aF(er.glyphDependencies,Qn=>Object.keys(Qn).map(Number));this.inFlightDependencies.forEach(Qn=>Qn==null?void 0:Qn.abort()),this.inFlightDependencies=[];let Ir=Promise.resolve({});if(Object.keys(Gr).length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),Ir=et.sendAsync({type:"GG",data:{stacks:Gr,source:this.source,tileID:this.tileID,type:"glyphs"}},Qn)}let Yr=Object.keys(er.iconDependencies),_i=Promise.resolve({});if(Yr.length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),_i=et.sendAsync({type:"GI",data:{icons:Yr,source:this.source,tileID:this.tileID,type:"icons"}},Qn)}let Pi=Object.keys(er.patternDependencies),ai=Promise.resolve({});if(Pi.length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),ai=et.sendAsync({type:"GI",data:{icons:Pi,source:this.source,tileID:this.tileID,type:"patterns"}},Qn)}let[mi,un,Fn]=yield Promise.all([Ir,_i,ai]),An=new o(mi),Hn=new i.bo(un,Fn);for(let Qn in Kt){let Vi=Kt[Qn];Vi instanceof i.a6?(l(Vi.layers,this.zoom,We),i.bp({bucket:Vi,glyphMap:mi,glyphPositions:An.positions,imageMap:un,imagePositions:Hn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Vi.hasPattern&&(Vi instanceof i.bq||Vi instanceof i.br||Vi instanceof i.bs)&&(l(Vi.layers,this.zoom,We),Vi.addFeatures(er,this.tileID.canonical,Hn.patternPositions))}return this.status="done",{buckets:Object.values(Kt).filter(Qn=>!Qn.isEmpty()),featureIndex:At,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:An.image,imageAtlas:Hn,glyphMap:this.returnDependencies?mi:null,iconMap:this.returnDependencies?un:null,glyphPositions:this.returnDependencies?An.positions:null}})}}function l(gt,Ge,Je){let We=new i.z(Ge);for(let et of gt)et.recalculate(We,Je)}class u{constructor(Ge,Je,We){this.actor=Ge,this.layerIndex=Je,this.availableImages=We,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ge,Je){return i._(this,void 0,void 0,function*(){let We=yield i.l(Ge.request,Je);try{return{vectorTile:new i.bt.VectorTile(new i.bu(We.data)),rawData:We.data,cacheControl:We.cacheControl,expires:We.expires}}catch(et){let xt=new Uint8Array(We.data),At=`Unable to parse the tile at ${Ge.request.url}, `;throw At+=xt[0]===31&&xt[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${et.message}`,new Error(At)}})}loadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid,We=!!(Ge&&Ge.request&&Ge.request.collectResourceTiming)&&new i.bv(Ge.request),et=new s(Ge);this.loading[Je]=et;let xt=new AbortController;et.abort=xt;try{let At=yield this.loadVectorTile(Ge,xt);if(delete this.loading[Je],!At)return null;let Kt=At.rawData,er={};At.expires&&(er.expires=At.expires),At.cacheControl&&(er.cacheControl=At.cacheControl);let Sr={};if(We){let Ir=We.finish();Ir&&(Sr.resourceTiming=JSON.parse(JSON.stringify(Ir)))}et.vectorTile=At.vectorTile;let Gr=et.parse(At.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Je]=et,this.fetching[Je]={rawTileData:Kt,cacheControl:er,resourceTiming:Sr};try{let Ir=yield Gr;return i.e({rawTileData:Kt.slice(0)},Ir,er,Sr)}finally{delete this.fetching[Je]}}catch(At){throw delete this.loading[Je],et.status="done",this.loaded[Je]=et,At}})}reloadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid;if(!this.loaded||!this.loaded[Je])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let We=this.loaded[Je];if(We.showCollisionBoxes=Ge.showCollisionBoxes,We.status==="parsing"){let et=yield We.parse(We.vectorTile,this.layerIndex,this.availableImages,this.actor),xt;if(this.fetching[Je]){let{rawTileData:At,cacheControl:Kt,resourceTiming:er}=this.fetching[Je];delete this.fetching[Je],xt=i.e({rawTileData:At.slice(0)},et,Kt,er)}else xt=et;return xt}if(We.status==="done"&&We.vectorTile)return We.parse(We.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ge){return i._(this,void 0,void 0,function*(){let Je=this.loading,We=Ge.uid;Je&&Je[We]&&Je[We].abort&&(Je[We].abort.abort(),delete Je[We])})}removeTile(Ge){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ge.uid]&&delete this.loaded[Ge.uid]})}}class c{constructor(){this.loaded={}}loadTile(Ge){return i._(this,void 0,void 0,function*(){let{uid:Je,encoding:We,rawImageData:et,redFactor:xt,greenFactor:At,blueFactor:Kt,baseShift:er}=Ge,Sr=et.width+2,Gr=et.height+2,Ir=i.b(et)?new i.R({width:Sr,height:Gr},yield i.bw(et,-1,-1,Sr,Gr)):et,Yr=new i.bx(Je,Ir,We,xt,At,Kt,er);return this.loaded=this.loaded||{},this.loaded[Je]=Yr,Yr})}removeTile(Ge){let Je=this.loaded,We=Ge.uid;Je&&Je[We]&&delete Je[We]}}function f(gt,Ge){if(gt.length!==0){h(gt[0],Ge);for(var Je=1;Je<gt.length;Je++)h(gt[Je],!Ge)}}function h(gt,Ge){for(var Je=0,We=0,et=0,xt=gt.length,At=xt-1;et<xt;At=et++){var Kt=(gt[et][0]-gt[At][0])*(gt[At][1]+gt[et][1]),er=Je+Kt;We+=Math.abs(Je)>=Math.abs(Kt)?Je-er+Kt:Kt-er+Je,Je=er}Je+We>=0!=!!Ge&>.reverse()}var d=i.by(function gt(Ge,Je){var We,et=Ge&&Ge.type;if(et==="FeatureCollection")for(We=0;We<Ge.features.length;We++)gt(Ge.features[We],Je);else if(et==="GeometryCollection")for(We=0;We<Ge.geometries.length;We++)gt(Ge.geometries[We],Je);else if(et==="Feature")gt(Ge.geometry,Je);else if(et==="Polygon")f(Ge.coordinates,Je);else if(et==="MultiPolygon")for(We=0;We<Ge.coordinates.length;We++)f(Ge.coordinates[We],Je);return Ge});let v=i.bt.VectorTileFeature.prototype.toGeoJSON;var m={exports:{}},b=i.bz,p=i.bt.VectorTileFeature,k=M;function M(gt,Ge){this.options=Ge||{},this.features=gt,this.length=gt.length}function T(gt,Ge){this.id=typeof gt.id=="number"?gt.id:void 0,this.type=gt.type,this.rawGeometry=gt.type===1?[gt.geometry]:gt.geometry,this.properties=gt.tags,this.extent=Ge||4096}M.prototype.feature=function(gt){return new T(this.features[gt],this.options.extent)},T.prototype.loadGeometry=function(){var gt=this.rawGeometry;this.geometry=[];for(var Ge=0;Ge<gt.length;Ge++){for(var Je=gt[Ge],We=[],et=0;et<Je.length;et++)We.push(new b(Je[et][0],Je[et][1]));this.geometry.push(We)}return this.geometry},T.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var gt=this.geometry,Ge=1/0,Je=-1/0,We=1/0,et=-1/0,xt=0;xt<gt.length;xt++)for(var At=gt[xt],Kt=0;Kt<At.length;Kt++){var er=At[Kt];Ge=Math.min(Ge,er.x),Je=Math.max(Je,er.x),We=Math.min(We,er.y),et=Math.max(et,er.y)}return[Ge,We,Je,et]},T.prototype.toGeoJSON=p.prototype.toGeoJSON;var L=i.bA,x=k;function C(gt){var Ge=new L;return function(Je,We){for(var et in Je.layers)We.writeMessage(3,S,Je.layers[et])}(gt,Ge),Ge.finish()}function S(gt,Ge){var Je;Ge.writeVarintField(15,gt.version||1),Ge.writeStringField(1,gt.name||""),Ge.writeVarintField(5,gt.extent||4096);var We={keys:[],values:[],keycache:{},valuecache:{}};for(Je=0;Je<gt.length;Je++)We.feature=gt.feature(Je),Ge.writeMessage(2,g,We);var et=We.keys;for(Je=0;Je<et.length;Je++)Ge.writeStringField(3,et[Je]);var xt=We.values;for(Je=0;Je<xt.length;Je++)Ge.writeMessage(4,U,xt[Je])}function g(gt,Ge){var Je=gt.feature;Je.id!==void 0&&Ge.writeVarintField(1,Je.id),Ge.writeMessage(2,P,gt),Ge.writeVarintField(3,Je.type),Ge.writeMessage(4,q,Je)}function P(gt,Ge){var Je=gt.feature,We=gt.keys,et=gt.values,xt=gt.keycache,At=gt.valuecache;for(var Kt in Je.properties){var er=Je.properties[Kt],Sr=xt[Kt];if(er!==null){Sr===void 0&&(We.push(Kt),xt[Kt]=Sr=We.length-1),Ge.writeVarint(Sr);var Gr=typeof er;Gr!=="string"&&Gr!=="boolean"&&Gr!=="number"&&(er=JSON.stringify(er));var Ir=Gr+":"+er,Yr=At[Ir];Yr===void 0&&(et.push(er),At[Ir]=Yr=et.length-1),Ge.writeVarint(Yr)}}}function E(gt,Ge){return(Ge<<3)+(7>)}function z(gt){return gt<<1^gt>>31}function q(gt,Ge){for(var Je=gt.loadGeometry(),We=gt.type,et=0,xt=0,At=Je.length,Kt=0;Kt<At;Kt++){var er=Je[Kt],Sr=1;We===1&&(Sr=er.length),Ge.writeVarint(E(1,Sr));for(var Gr=We===3?er.length-1:er.length,Ir=0;Ir<Gr;Ir++){Ir===1&&We!==1&&Ge.writeVarint(E(2,Gr-1));var Yr=er[Ir].x-et,_i=er[Ir].y-xt;Ge.writeVarint(z(Yr)),Ge.writeVarint(z(_i)),et+=Yr,xt+=_i}We===3&&Ge.writeVarint(E(7,1))}}function U(gt,Ge){var Je=typeof gt;Je==="string"?Ge.writeStringField(1,gt):Je==="boolean"?Ge.writeBooleanField(7,gt):Je==="number"&&(gt%1!=0?Ge.writeDoubleField(3,gt):gt<0?Ge.writeSVarintField(6,gt):Ge.writeVarintField(5,gt))}m.exports=C,m.exports.fromVectorTileJs=C,m.exports.fromGeojsonVt=function(gt,Ge){Ge=Ge||{};var Je={};for(var We in gt)Je[We]=new x(gt[We].features,Ge),Je[We].name=We,Je[We].version=Ge.version,Je[We].extent=Ge.extent;return C({layers:Je})},m.exports.GeoJSONWrapper=x;var G=i.by(m.exports);let Z={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:gt=>gt},j=Math.fround||(N=new Float32Array(1),gt=>(N[0]=+gt,N[0]));var N;let H=3,re=5,oe=6;class _e{constructor(Ge){this.options=Object.assign(Object.create(Z),Ge),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ge){let{log:Je,minZoom:We,maxZoom:et}=this.options;Je&&console.time("total time");let xt=`prepare ${Ge.length} points`;Je&&console.time(xt),this.points=Ge;let At=[];for(let er=0;er<Ge.length;er++){let Sr=Ge[er];if(!Sr.geometry)continue;let[Gr,Ir]=Sr.geometry.coordinates,Yr=j(ge(Gr)),_i=j(ie(Ir));At.push(Yr,_i,1/0,er,-1,1),this.options.reduce&&At.push(0)}let Kt=this.trees[et+1]=this._createTree(At);Je&&console.timeEnd(xt);for(let er=et;er>=We;er--){let Sr=+Date.now();Kt=this.trees[er]=this._createTree(this._cluster(Kt,er)),Je&&console.log("z%d: %d clusters in %dms",er,Kt.numItems,+Date.now()-Sr)}return Je&&console.timeEnd("total time"),this}getClusters(Ge,Je){let We=((Ge[0]+180)%360+360)%360-180,et=Math.max(-90,Math.min(90,Ge[1])),xt=Ge[2]===180?180:((Ge[2]+180)%360+360)%360-180,At=Math.max(-90,Math.min(90,Ge[3]));if(Ge[2]-Ge[0]>=360)We=-180,xt=180;else if(We>xt){let Ir=this.getClusters([We,et,180,At],Je),Yr=this.getClusters([-180,et,xt,At],Je);return Ir.concat(Yr)}let Kt=this.trees[this._limitZoom(Je)],er=Kt.range(ge(We),ie(At),ge(xt),ie(et)),Sr=Kt.data,Gr=[];for(let Ir of er){let Yr=this.stride*Ir;Gr.push(Sr[Yr+re]>1?ke(Sr,Yr,this.clusterProps):this.points[Sr[Yr+H]])}return Gr}getChildren(Ge){let Je=this._getOriginId(Ge),We=this._getOriginZoom(Ge),et="No cluster with the specified id.",xt=this.trees[We];if(!xt)throw new Error(et);let At=xt.data;if(Je*this.stride>=At.length)throw new Error(et);let Kt=this.options.radius/(this.options.extent*Math.pow(2,We-1)),er=xt.within(At[Je*this.stride],At[Je*this.stride+1],Kt),Sr=[];for(let Gr of er){let Ir=Gr*this.stride;At[Ir+4]===Ge&&Sr.push(At[Ir+re]>1?ke(At,Ir,this.clusterProps):this.points[At[Ir+H]])}if(Sr.length===0)throw new Error(et);return Sr}getLeaves(Ge,Je,We){let et=[];return this._appendLeaves(et,Ge,Je=Je||10,We=We||0,0),et}getTile(Ge,Je,We){let et=this.trees[this._limitZoom(Ge)],xt=Math.pow(2,Ge),{extent:At,radius:Kt}=this.options,er=Kt/At,Sr=(We-er)/xt,Gr=(We+1+er)/xt,Ir={features:[]};return this._addTileFeatures(et.range((Je-er)/xt,Sr,(Je+1+er)/xt,Gr),et.data,Je,We,xt,Ir),Je===0&&this._addTileFeatures(et.range(1-er/xt,Sr,1,Gr),et.data,xt,We,xt,Ir),Je===xt-1&&this._addTileFeatures(et.range(0,Sr,er/xt,Gr),et.data,-1,We,xt,Ir),Ir.features.length?Ir:null}getClusterExpansionZoom(Ge){let Je=this._getOriginZoom(Ge)-1;for(;Je<=this.options.maxZoom;){let We=this.getChildren(Ge);if(Je++,We.length!==1)break;Ge=We[0].properties.cluster_id}return Je}_appendLeaves(Ge,Je,We,et,xt){let At=this.getChildren(Je);for(let Kt of At){let er=Kt.properties;if(er&&er.cluster?xt+er.point_count<=et?xt+=er.point_count:xt=this._appendLeaves(Ge,er.cluster_id,We,et,xt):xt<et?xt++:Ge.push(Kt),Ge.length===We)break}return xt}_createTree(Ge){let Je=new i.av(Ge.length/this.stride|0,this.options.nodeSize,Float32Array);for(let We=0;We<Ge.length;We+=this.stride)Je.add(Ge[We],Ge[We+1]);return Je.finish(),Je.data=Ge,Je}_addTileFeatures(Ge,Je,We,et,xt,At){for(let Kt of Ge){let er=Kt*this.stride,Sr=Je[er+re]>1,Gr,Ir,Yr;if(Sr)Gr=Ce(Je,er,this.clusterProps),Ir=Je[er],Yr=Je[er+1];else{let ai=this.points[Je[er+H]];Gr=ai.properties;let[mi,un]=ai.geometry.coordinates;Ir=ge(mi),Yr=ie(un)}let _i={type:1,geometry:[[Math.round(this.options.extent*(Ir*xt-We)),Math.round(this.options.extent*(Yr*xt-et))]],tags:Gr},Pi;Pi=Sr||this.options.generateId?Je[er+H]:this.points[Je[er+H]].id,Pi!==void 0&&(_i.id=Pi),At.features.push(_i)}}_limitZoom(Ge){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ge),this.options.maxZoom+1))}_cluster(Ge,Je){let{radius:We,extent:et,reduce:xt,minPoints:At}=this.options,Kt=We/(et*Math.pow(2,Je)),er=Ge.data,Sr=[],Gr=this.stride;for(let Ir=0;Ir<er.length;Ir+=Gr){if(er[Ir+2]<=Je)continue;er[Ir+2]=Je;let Yr=er[Ir],_i=er[Ir+1],Pi=Ge.within(er[Ir],er[Ir+1],Kt),ai=er[Ir+re],mi=ai;for(let un of Pi){let Fn=un*Gr;er[Fn+2]>Je&&(mi+=er[Fn+re])}if(mi>ai&&mi>=At){let un,Fn=Yr*ai,An=_i*ai,Hn=-1,Qn=((Ir/Gr|0)<<5)+(Je+1)+this.points.length;for(let Vi of Pi){let Kn=Vi*Gr;if(er[Kn+2]<=Je)continue;er[Kn+2]=Je;let Jn=er[Kn+re];Fn+=er[Kn]*Jn,An+=er[Kn+1]*Jn,er[Kn+4]=Qn,xt&&(un||(un=this._map(er,Ir,!0),Hn=this.clusterProps.length,this.clusterProps.push(un)),xt(un,this._map(er,Kn)))}er[Ir+4]=Qn,Sr.push(Fn/mi,An/mi,1/0,Qn,-1,mi),xt&&Sr.push(Hn)}else{for(let un=0;un<Gr;un++)Sr.push(er[Ir+un]);if(mi>1)for(let un of Pi){let Fn=un*Gr;if(!(er[Fn+2]<=Je)){er[Fn+2]=Je;for(let An=0;An<Gr;An++)Sr.push(er[Fn+An])}}}}return Sr}_getOriginId(Ge){return Ge-this.points.length>>5}_getOriginZoom(Ge){return(Ge-this.points.length)%32}_map(Ge,Je,We){if(Ge[Je+re]>1){let At=this.clusterProps[Ge[Je+oe]];return We?Object.assign({},At):At}let et=this.points[Ge[Je+H]].properties,xt=this.options.map(et);return We&&xt===et?Object.assign({},xt):xt}}function ke(gt,Ge,Je){return{type:"Feature",id:gt[Ge+H],properties:Ce(gt,Ge,Je),geometry:{type:"Point",coordinates:[(We=gt[Ge],360*(We-.5)),Se(gt[Ge+1])]}};var We}function Ce(gt,Ge,Je){let We=gt[Ge+re],et=We>=1e4?`${Math.round(We/1e3)}k`:We>=1e3?Math.round(We/100)/10+"k":We,xt=gt[Ge+oe],At=xt===-1?{}:Object.assign({},Je[xt]);return Object.assign(At,{cluster:!0,cluster_id:gt[Ge+H],point_count:We,point_count_abbreviated:et})}function ge(gt){return gt/360+.5}function ie(gt){let Ge=Math.sin(gt*Math.PI/180),Je=.5-.25*Math.log((1+Ge)/(1-Ge))/Math.PI;return Je<0?0:Je>1?1:Je}function Se(gt){let Ge=(180-360*gt)*Math.PI/180;return 360*Math.atan(Math.exp(Ge))/Math.PI-90}function Ee(gt,Ge,Je,We){let et=We,xt=Ge+(Je-Ge>>1),At,Kt=Je-Ge,er=gt[Ge],Sr=gt[Ge+1],Gr=gt[Je],Ir=gt[Je+1];for(let Yr=Ge+3;Yr<Je;Yr+=3){let _i=we(gt[Yr],gt[Yr+1],er,Sr,Gr,Ir);if(_i>et)At=Yr,et=_i;else if(_i===et){let Pi=Math.abs(Yr-xt);Pi<Kt&&(At=Yr,Kt=Pi)}}et>We&&(At-Ge>3&&Ee(gt,Ge,At,We),gt[At+2]=et,Je-At>3&&Ee(gt,At,Je,We))}function we(gt,Ge,Je,We,et,xt){let At=et-Je,Kt=xt-We;if(At!==0||Kt!==0){let er=((gt-Je)*At+(Ge-We)*Kt)/(At*At+Kt*Kt);er>1?(Je=et,We=xt):er>0&&(Je+=At*er,We+=Kt*er)}return At=gt-Je,Kt=Ge-We,At*At+Kt*Kt}function De(gt,Ge,Je,We){let et={id:gt==null?null:gt,type:Ge,geometry:Je,tags:We,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ge==="Point"||Ge==="MultiPoint"||Ge==="LineString")Le(et,Je);else if(Ge==="Polygon")Le(et,Je[0]);else if(Ge==="MultiLineString")for(let xt of Je)Le(et,xt);else if(Ge==="MultiPolygon")for(let xt of Je)Le(et,xt[0]);return et}function Le(gt,Ge){for(let Je=0;Je<Ge.length;Je+=3)gt.minX=Math.min(gt.minX,Ge[Je]),gt.minY=Math.min(gt.minY,Ge[Je+1]),gt.maxX=Math.max(gt.maxX,Ge[Je]),gt.maxY=Math.max(gt.maxY,Ge[Je+1])}function me(gt,Ge,Je,We){if(!Ge.geometry)return;let et=Ge.geometry.coordinates;if(et&&et.length===0)return;let xt=Ge.geometry.type,At=Math.pow(Je.tolerance/((1<<Je.maxZoom)*Je.extent),2),Kt=[],er=Ge.id;if(Je.promoteId?er=Ge.properties[Je.promoteId]:Je.generateId&&(er=We||0),xt==="Point")Pe(et,Kt);else if(xt==="MultiPoint")for(let Sr of et)Pe(Sr,Kt);else if(xt==="LineString")ce(et,Kt,At,!1);else if(xt==="MultiLineString"){if(Je.lineMetrics){for(let Sr of et)Kt=[],ce(Sr,Kt,At,!1),gt.push(De(er,"LineString",Kt,Ge.properties));return}He(et,Kt,At,!1)}else if(xt==="Polygon")He(et,Kt,At,!0);else{if(xt!=="MultiPolygon"){if(xt==="GeometryCollection"){for(let Sr of Ge.geometry.geometries)me(gt,{id:er,geometry:Sr,properties:Ge.properties},Je,We);return}throw new Error("Input data is not a valid GeoJSON object.")}for(let Sr of et){let Gr=[];He(Sr,Gr,At,!0),Kt.push(Gr)}}gt.push(De(er,xt,Kt,Ge.properties))}function Pe(gt,Ge){Ge.push(lt(gt[0]),mt(gt[1]),0)}function ce(gt,Ge,Je,We){let et,xt,At=0;for(let er=0;er<gt.length;er++){let Sr=lt(gt[er][0]),Gr=mt(gt[er][1]);Ge.push(Sr,Gr,0),er>0&&(At+=We?(et*Gr-Sr*xt)/2:Math.sqrt(Math.pow(Sr-et,2)+Math.pow(Gr-xt,2))),et=Sr,xt=Gr}let Kt=Ge.length-3;Ge[2]=1,Ee(Ge,0,Kt,Je),Ge[Kt+2]=1,Ge.size=Math.abs(At),Ge.start=0,Ge.end=Ge.size}function He(gt,Ge,Je,We){for(let et=0;et<gt.length;et++){let xt=[];ce(gt[et],xt,Je,We),Ge.push(xt)}}function lt(gt){return gt/360+.5}function mt(gt){let Ge=Math.sin(gt*Math.PI/180),Je=.5-.25*Math.log((1+Ge)/(1-Ge))/Math.PI;return Je<0?0:Je>1?1:Je}function Vt(gt,Ge,Je,We,et,xt,At,Kt){if(We/=Ge,xt>=(Je/=Ge)&&At<We)return gt;if(At<Je||xt>=We)return null;let er=[];for(let Sr of gt){let Gr=Sr.geometry,Ir=Sr.type,Yr=et===0?Sr.minX:Sr.minY,_i=et===0?Sr.maxX:Sr.maxY;if(Yr>=Je&&_i<We){er.push(Sr);continue}if(_i<Je||Yr>=We)continue;let Pi=[];if(Ir==="Point"||Ir==="MultiPoint")st(Gr,Pi,Je,We,et);else if(Ir==="LineString")ct(Gr,Pi,Je,We,et,!1,Kt.lineMetrics);else if(Ir==="MultiLineString")Ht(Gr,Pi,Je,We,et,!1);else if(Ir==="Polygon")Ht(Gr,Pi,Je,We,et,!0);else if(Ir==="MultiPolygon")for(let ai of Gr){let mi=[];Ht(ai,mi,Je,We,et,!0),mi.length&&Pi.push(mi)}if(Pi.length){if(Kt.lineMetrics&&Ir==="LineString"){for(let ai of Pi)er.push(De(Sr.id,Ir,ai,Sr.tags));continue}Ir!=="LineString"&&Ir!=="MultiLineString"||(Pi.length===1?(Ir="LineString",Pi=Pi[0]):Ir="MultiLineString"),Ir!=="Point"&&Ir!=="MultiPoint"||(Ir=Pi.length===3?"Point":"MultiPoint"),er.push(De(Sr.id,Ir,Pi,Sr.tags))}}return er.length?er:null}function st(gt,Ge,Je,We,et){for(let xt=0;xt<gt.length;xt+=3){let At=gt[xt+et];At>=Je&&At<=We&&nr(Ge,gt[xt],gt[xt+1],gt[xt+2])}}function ct(gt,Ge,Je,We,et,xt,At){let Kt=Qt(gt),er=et===0?tt:je,Sr,Gr,Ir=gt.start;for(let mi=0;mi<gt.length-3;mi+=3){let un=gt[mi],Fn=gt[mi+1],An=gt[mi+2],Hn=gt[mi+3],Qn=gt[mi+4],Vi=et===0?un:Fn,Kn=et===0?Hn:Qn,Jn=!1;At&&(Sr=Math.sqrt(Math.pow(un-Hn,2)+Math.pow(Fn-Qn,2))),Vi<Je?Kn>Je&&(Gr=er(Kt,un,Fn,Hn,Qn,Je),At&&(Kt.start=Ir+Sr*Gr)):Vi>We?Kn<We&&(Gr=er(Kt,un,Fn,Hn,Qn,We),At&&(Kt.start=Ir+Sr*Gr)):nr(Kt,un,Fn,An),Kn<Je&&Vi>=Je&&(Gr=er(Kt,un,Fn,Hn,Qn,Je),Jn=!0),Kn>We&&Vi<=We&&(Gr=er(Kt,un,Fn,Hn,Qn,We),Jn=!0),!xt&&Jn&&(At&&(Kt.end=Ir+Sr*Gr),Ge.push(Kt),Kt=Qt(gt)),At&&(Ir+=Sr)}let Yr=gt.length-3,_i=gt[Yr],Pi=gt[Yr+1],ai=et===0?_i:Pi;ai>=Je&&ai<=We&&nr(Kt,_i,Pi,gt[Yr+2]),Yr=Kt.length-3,xt&&Yr>=3&&(Kt[Yr]!==Kt[0]||Kt[Yr+1]!==Kt[1])&&nr(Kt,Kt[0],Kt[1],Kt[2]),Kt.length&&Ge.push(Kt)}function Qt(gt){let Ge=[];return Ge.size=gt.size,Ge.start=gt.start,Ge.end=gt.end,Ge}function Ht(gt,Ge,Je,We,et,xt){for(let At of gt)ct(At,Ge,Je,We,et,xt,!1)}function nr(gt,Ge,Je,We){gt.push(Ge,Je,We)}function tt(gt,Ge,Je,We,et,xt){let At=(xt-Ge)/(We-Ge);return nr(gt,xt,Je+(et-Je)*At,1),At}function je(gt,Ge,Je,We,et,xt){let At=(xt-Je)/(et-Je);return nr(gt,Ge+(We-Ge)*At,xt,1),At}function Ue(gt,Ge){let Je=[];for(let We=0;We<gt.length;We++){let et=gt[We],xt=et.type,At;if(xt==="Point"||xt==="MultiPoint"||xt==="LineString")At=Ae(et.geometry,Ge);else if(xt==="MultiLineString"||xt==="Polygon"){At=[];for(let Kt of et.geometry)At.push(Ae(Kt,Ge))}else if(xt==="MultiPolygon"){At=[];for(let Kt of et.geometry){let er=[];for(let Sr of Kt)er.push(Ae(Sr,Ge));At.push(er)}}Je.push(De(et.id,xt,At,et.tags))}return Je}function Ae(gt,Ge){let Je=[];Je.size=gt.size,gt.start!==void 0&&(Je.start=gt.start,Je.end=gt.end);for(let We=0;We<gt.length;We+=3)Je.push(gt[We]+Ge,gt[We+1],gt[We+2]);return Je}function rt(gt,Ge){if(gt.transformed)return gt;let Je=1<<gt.z,We=gt.x,et=gt.y;for(let xt of gt.features){let At=xt.geometry,Kt=xt.type;if(xt.geometry=[],Kt===1)for(let er=0;er<At.length;er+=2)xt.geometry.push(St(At[er],At[er+1],Ge,Je,We,et));else for(let er=0;er<At.length;er++){let Sr=[];for(let Gr=0;Gr<At[er].length;Gr+=2)Sr.push(St(At[er][Gr],At[er][Gr+1],Ge,Je,We,et));xt.geometry.push(Sr)}}return gt.transformed=!0,gt}function St(gt,Ge,Je,We,et,xt){return[Math.round(Je*(gt*We-et)),Math.round(Je*(Ge*We-xt))]}function Tt(gt,Ge,Je,We,et){let xt=Ge===et.maxZoom?0:et.tolerance/((1<<Ge)*et.extent),At={features:[],numPoints:0,numSimplified:0,numFeatures:gt.length,source:null,x:Je,y:We,z:Ge,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(let Kt of gt)dt(At,Kt,xt,et);return At}function dt(gt,Ge,Je,We){let et=Ge.geometry,xt=Ge.type,At=[];if(gt.minX=Math.min(gt.minX,Ge.minX),gt.minY=Math.min(gt.minY,Ge.minY),gt.maxX=Math.max(gt.maxX,Ge.maxX),gt.maxY=Math.max(gt.maxY,Ge.maxY),xt==="Point"||xt==="MultiPoint")for(let Kt=0;Kt<et.length;Kt+=3)At.push(et[Kt],et[Kt+1]),gt.numPoints++,gt.numSimplified++;else if(xt==="LineString")Et(At,et,gt,Je,!1,!1);else if(xt==="MultiLineString"||xt==="Polygon")for(let Kt=0;Kt<et.length;Kt++)Et(At,et[Kt],gt,Je,xt==="Polygon",Kt===0);else if(xt==="MultiPolygon")for(let Kt=0;Kt<et.length;Kt++){let er=et[Kt];for(let Sr=0;Sr<er.length;Sr++)Et(At,er[Sr],gt,Je,!0,Sr===0)}if(At.length){let Kt=Ge.tags||null;if(xt==="LineString"&&We.lineMetrics){Kt={};for(let Sr in Ge.tags)Kt[Sr]=Ge.tags[Sr];Kt.mapbox_clip_start=et.start/et.size,Kt.mapbox_clip_end=et.end/et.size}let er={geometry:At,type:xt==="Polygon"||xt==="MultiPolygon"?3:xt==="LineString"||xt==="MultiLineString"?2:1,tags:Kt};Ge.id!==null&&(er.id=Ge.id),gt.features.push(er)}}function Et(gt,Ge,Je,We,et,xt){let At=We*We;if(We>0&&Ge.size<(et?At:We))return void(Je.numPoints+=Ge.length/3);let Kt=[];for(let er=0;er<Ge.length;er+=3)(We===0||Ge[er+2]>At)&&(Je.numSimplified++,Kt.push(Ge[er],Ge[er+1])),Je.numPoints++;et&&function(er,Sr){let Gr=0;for(let Ir=0,Yr=er.length,_i=Yr-2;Ir<Yr;_i=Ir,Ir+=2)Gr+=(er[Ir]-er[_i])*(er[Ir+1]+er[_i+1]);if(Gr>0===Sr)for(let Ir=0,Yr=er.length;Ir<Yr/2;Ir+=2){let _i=er[Ir],Pi=er[Ir+1];er[Ir]=er[Yr-2-Ir],er[Ir+1]=er[Yr-1-Ir],er[Yr-2-Ir]=_i,er[Yr-1-Ir]=Pi}}(Kt,xt),gt.push(Kt)}let pt={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Xt{constructor(Ge,Je){let We=(Je=this.options=function(xt,At){for(let Kt in At)xt[Kt]=At[Kt];return xt}(Object.create(pt),Je)).debug;if(We&&console.time("preprocess data"),Je.maxZoom<0||Je.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Je.promoteId&&Je.generateId)throw new Error("promoteId and generateId cannot be used together.");let et=function(xt,At){let Kt=[];if(xt.type==="FeatureCollection")for(let er=0;er<xt.features.length;er++)me(Kt,xt.features[er],At,er);else me(Kt,xt.type==="Feature"?xt:{geometry:xt},At);return Kt}(Ge,Je);this.tiles={},this.tileCoords=[],We&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Je.indexMaxZoom,Je.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),et=function(xt,At){let Kt=At.buffer/At.extent,er=xt,Sr=Vt(xt,1,-1-Kt,Kt,0,-1,2,At),Gr=Vt(xt,1,1-Kt,2+Kt,0,-1,2,At);return(Sr||Gr)&&(er=Vt(xt,1,-Kt,1+Kt,0,-1,2,At)||[],Sr&&(er=Ue(Sr,1).concat(er)),Gr&&(er=er.concat(Ue(Gr,-1)))),er}(et,Je),et.length&&this.splitTile(et,0,0,0),We&&(et.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(Ge,Je,We,et,xt,At,Kt){let er=[Ge,Je,We,et],Sr=this.options,Gr=Sr.debug;for(;er.length;){et=er.pop(),We=er.pop(),Je=er.pop(),Ge=er.pop();let Ir=1<<Je,Yr=or(Je,We,et),_i=this.tiles[Yr];if(!_i&&(Gr>1&&console.time("creation"),_i=this.tiles[Yr]=Tt(Ge,Je,We,et,Sr),this.tileCoords.push({z:Je,x:We,y:et}),Gr)){Gr>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Je,We,et,_i.numFeatures,_i.numPoints,_i.numSimplified),console.timeEnd("creation"));let Jn=`z${Je}`;this.stats[Jn]=(this.stats[Jn]||0)+1,this.total++}if(_i.source=Ge,xt==null){if(Je===Sr.indexMaxZoom||_i.numPoints<=Sr.indexMaxPoints)continue}else{if(Je===Sr.maxZoom||Je===xt)continue;if(xt!=null){let Jn=xt-Je;if(We!==At>>Jn||et!==Kt>>Jn)continue}}if(_i.source=null,Ge.length===0)continue;Gr>1&&console.time("clipping");let Pi=.5*Sr.buffer/Sr.extent,ai=.5-Pi,mi=.5+Pi,un=1+Pi,Fn=null,An=null,Hn=null,Qn=null,Vi=Vt(Ge,Ir,We-Pi,We+mi,0,_i.minX,_i.maxX,Sr),Kn=Vt(Ge,Ir,We+ai,We+un,0,_i.minX,_i.maxX,Sr);Ge=null,Vi&&(Fn=Vt(Vi,Ir,et-Pi,et+mi,1,_i.minY,_i.maxY,Sr),An=Vt(Vi,Ir,et+ai,et+un,1,_i.minY,_i.maxY,Sr),Vi=null),Kn&&(Hn=Vt(Kn,Ir,et-Pi,et+mi,1,_i.minY,_i.maxY,Sr),Qn=Vt(Kn,Ir,et+ai,et+un,1,_i.minY,_i.maxY,Sr),Kn=null),Gr>1&&console.timeEnd("clipping"),er.push(Fn||[],Je+1,2*We,2*et),er.push(An||[],Je+1,2*We,2*et+1),er.push(Hn||[],Je+1,2*We+1,2*et),er.push(Qn||[],Je+1,2*We+1,2*et+1)}}getTile(Ge,Je,We){Ge=+Ge,Je=+Je,We=+We;let et=this.options,{extent:xt,debug:At}=et;if(Ge<0||Ge>24)return null;let Kt=1<<Ge,er=or(Ge,Je=Je+Kt&Kt-1,We);if(this.tiles[er])return rt(this.tiles[er],xt);At>1&&console.log("drilling down to z%d-%d-%d",Ge,Je,We);let Sr,Gr=Ge,Ir=Je,Yr=We;for(;!Sr&&Gr>0;)Gr--,Ir>>=1,Yr>>=1,Sr=this.tiles[or(Gr,Ir,Yr)];return Sr&&Sr.source?(At>1&&(console.log("found parent tile z%d-%d-%d",Gr,Ir,Yr),console.time("drilling down")),this.splitTile(Sr.source,Gr,Ir,Yr,Ge,Je,We),At>1&&console.timeEnd("drilling down"),this.tiles[er]?rt(this.tiles[er],xt):null):null}}function or(gt,Ge,Je){return 32*((1<<gt)*Je+Ge)+gt}function _r(gt,Ge){return Ge?gt.properties[Ge]:gt.id}function Er(gt,Ge){if(gt==null)return!0;if(gt.type==="Feature")return _r(gt,Ge)!=null;if(gt.type==="FeatureCollection"){let Je=new Set;for(let We of gt.features){let et=_r(We,Ge);if(et==null||Je.has(et))return!1;Je.add(et)}return!0}return!1}function ei(gt,Ge){let Je=new Map;if(gt!=null)if(gt.type==="Feature")Je.set(_r(gt,Ge),gt);else for(let We of gt.features)Je.set(_r(We,Ge),We);return Je}class qr extends u{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Ge,Je){return i._(this,void 0,void 0,function*(){let We=Ge.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let et=this._geoJSONIndex.getTile(We.z,We.x,We.y);if(!et)return null;let xt=new class{constructor(Kt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=i.X,this.length=Kt.length,this._features=Kt}feature(Kt){return new class{constructor(er){this._feature=er,this.extent=i.X,this.type=er.type,this.properties=er.tags,"id"in er&&!isNaN(er.id)&&(this.id=parseInt(er.id,10))}loadGeometry(){if(this._feature.type===1){let er=[];for(let Sr of this._feature.geometry)er.push([new i.P(Sr[0],Sr[1])]);return er}{let er=[];for(let Sr of this._feature.geometry){let Gr=[];for(let Ir of Sr)Gr.push(new i.P(Ir[0],Ir[1]));er.push(Gr)}return er}}toGeoJSON(er,Sr,Gr){return v.call(this,er,Sr,Gr)}}(this._features[Kt])}}(et.features),At=G(xt);return At.byteOffset===0&&At.byteLength===At.buffer.byteLength||(At=new Uint8Array(At)),{vectorTile:xt,rawData:At.buffer}})}loadData(Ge){return i._(this,void 0,void 0,function*(){var Je;(Je=this._pendingRequest)===null||Je===void 0||Je.abort();let We=!!(Ge&&Ge.request&&Ge.request.collectResourceTiming)&&new i.bv(Ge.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Ge,this._pendingRequest),this._geoJSONIndex=Ge.cluster?new _e(function({superclusterOptions:At,clusterProperties:Kt}){if(!Kt||!At)return At;let er={},Sr={},Gr={accumulated:null,zoom:0},Ir={properties:null},Yr=Object.keys(Kt);for(let _i of Yr){let[Pi,ai]=Kt[_i],mi=i.bC(ai),un=i.bC(typeof Pi=="string"?[Pi,["accumulated"],["get",_i]]:Pi);er[_i]=mi.value,Sr[_i]=un.value}return At.map=_i=>{Ir.properties=_i;let Pi={};for(let ai of Yr)Pi[ai]=er[ai].evaluate(Gr,Ir);return Pi},At.reduce=(_i,Pi)=>{Ir.properties=Pi;for(let ai of Yr)Gr.accumulated=_i[ai],_i[ai]=Sr[ai].evaluate(Gr,Ir)},At}(Ge)).load((yield this._pendingData).features):(et=yield this._pendingData,new Xt(et,Ge.geojsonVtOptions)),this.loaded={};let xt={};if(We){let At=We.finish();At&&(xt.resourceTiming={},xt.resourceTiming[Ge.source]=JSON.parse(JSON.stringify(At)))}return xt}catch(xt){if(delete this._pendingRequest,i.bB(xt))return{abandoned:!0};throw xt}var et})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ge){let Je=this.loaded;return Je&&Je[Ge.uid]?super.reloadTile(Ge):this.loadTile(Ge)}loadAndProcessGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let We=yield this.loadGeoJSON(Ge,Je);if(delete this._pendingRequest,typeof We!="object")throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(d(We,!0),Ge.filter){let et=i.bC(Ge.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(et.result==="error")throw new Error(et.value.map(At=>`${At.key}: ${At.message}`).join(", "));We={type:"FeatureCollection",features:We.features.filter(At=>et.value.evaluate({zoom:0},At))}}return We})}loadGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let{promoteId:We}=Ge;if(Ge.request){let et=yield i.h(Ge.request,Je);return this._dataUpdateable=Er(et.data,We)?ei(et.data,We):void 0,et.data}if(typeof Ge.data=="string")try{let et=JSON.parse(Ge.data);return this._dataUpdateable=Er(et,We)?ei(et,We):void 0,et}catch(et){throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`)}if(!Ge.dataDiff)throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ge.source}`);return function(et,xt,At){var Kt,er,Sr,Gr;if(xt.removeAll&&et.clear(),xt.remove)for(let Ir of xt.remove)et.delete(Ir);if(xt.add)for(let Ir of xt.add){let Yr=_r(Ir,At);Yr!=null&&et.set(Yr,Ir)}if(xt.update)for(let Ir of xt.update){let Yr=et.get(Ir.id);if(Yr==null)continue;let _i=!Ir.removeAllProperties&&(((Kt=Ir.removeProperties)===null||Kt===void 0?void 0:Kt.length)>0||((er=Ir.addOrUpdateProperties)===null||er===void 0?void 0:er.length)>0);if((Ir.newGeometry||Ir.removeAllProperties||_i)&&(Yr=Object.assign({},Yr),et.set(Ir.id,Yr),_i&&(Yr.properties=Object.assign({},Yr.properties))),Ir.newGeometry&&(Yr.geometry=Ir.newGeometry),Ir.removeAllProperties)Yr.properties={};else if(((Sr=Ir.removeProperties)===null||Sr===void 0?void 0:Sr.length)>0)for(let Pi of Ir.removeProperties)Object.prototype.hasOwnProperty.call(Yr.properties,Pi)&&delete Yr.properties[Pi];if(((Gr=Ir.addOrUpdateProperties)===null||Gr===void 0?void 0:Gr.length)>0)for(let{key:Pi,value:ai}of Ir.addOrUpdateProperties)Yr.properties[Pi]=ai}}(this._dataUpdateable,Ge.dataDiff,We),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ge){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ge){return this._geoJSONIndex.getClusterExpansionZoom(Ge.clusterId)}getClusterChildren(Ge){return this._geoJSONIndex.getChildren(Ge.clusterId)}getClusterLeaves(Ge){return this._geoJSONIndex.getLeaves(Ge.clusterId,Ge.limit,Ge.offset)}}class jr{constructor(Ge){this.self=Ge,this.actor=new i.F(Ge),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Je,We)=>{if(this.externalWorkerSourceTypes[Je])throw new Error(`Worker source with name "${Je}" already registered.`);this.externalWorkerSourceTypes[Je]=We},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Je=>{if(i.bD.isParsed())throw new Error("RTL text plugin already registered.");i.bD.setMethods(Je)},this.actor.registerMessageHandler("LDT",(Je,We)=>this._getDEMWorkerSource(Je,We.source).loadTile(We)),this.actor.registerMessageHandler("RDT",(Je,We)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Je,We.source).removeTile(We)})),this.actor.registerMessageHandler("GCEZ",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterExpansionZoom(We)})),this.actor.registerMessageHandler("GCC",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterChildren(We)})),this.actor.registerMessageHandler("GCL",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterLeaves(We)})),this.actor.registerMessageHandler("LD",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).loadData(We)),this.actor.registerMessageHandler("GD",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).getData()),this.actor.registerMessageHandler("LT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).loadTile(We)),this.actor.registerMessageHandler("RT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).reloadTile(We)),this.actor.registerMessageHandler("AT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).abortTile(We)),this.actor.registerMessageHandler("RMT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).removeTile(We)),this.actor.registerMessageHandler("RS",(Je,We)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Je]||!this.workerSources[Je][We.type]||!this.workerSources[Je][We.type][We.source])return;let et=this.workerSources[Je][We.type][We.source];delete this.workerSources[Je][We.type][We.source],et.removeSource!==void 0&&et.removeSource(We)})),this.actor.registerMessageHandler("RM",Je=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Je],delete this.availableImages[Je],delete this.workerSources[Je],delete this.demWorkerSources[Je]})),this.actor.registerMessageHandler("SR",(Je,We)=>i._(this,void 0,void 0,function*(){this.referrer=We})),this.actor.registerMessageHandler("SRPS",(Je,We)=>this._syncRTLPluginState(Je,We)),this.actor.registerMessageHandler("IS",(Je,We)=>i._(this,void 0,void 0,function*(){this.self.importScripts(We)})),this.actor.registerMessageHandler("SI",(Je,We)=>this._setImages(Je,We)),this.actor.registerMessageHandler("UL",(Je,We)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).update(We.layers,We.removedIds)})),this.actor.registerMessageHandler("SL",(Je,We)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).replace(We)}))}_setImages(Ge,Je){return i._(this,void 0,void 0,function*(){this.availableImages[Ge]=Je;for(let We in this.workerSources[Ge]){let et=this.workerSources[Ge][We];for(let xt in et)et[xt].availableImages=Je}})}_syncRTLPluginState(Ge,Je){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Je.pluginStatus!=="loading")return i.bD.setState(Je),Je;let We=Je.pluginURL;if(this.self.importScripts(We),i.bD.isParsed()){let et={pluginStatus:"loaded",pluginURL:We};return i.bD.setState(et),et}throw i.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${We}`)})}_getAvailableImages(Ge){let Je=this.availableImages[Ge];return Je||(Je=[]),Je}_getLayerIndex(Ge){let Je=this.layerIndexes[Ge];return Je||(Je=this.layerIndexes[Ge]=new a),Je}_getWorkerSource(Ge,Je,We){if(this.workerSources[Ge]||(this.workerSources[Ge]={}),this.workerSources[Ge][Je]||(this.workerSources[Ge][Je]={}),!this.workerSources[Ge][Je][We]){let et={sendAsync:(xt,At)=>(xt.targetMapId=Ge,this.actor.sendAsync(xt,At))};switch(Je){case"vector":this.workerSources[Ge][Je][We]=new u(et,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;case"geojson":this.workerSources[Ge][Je][We]=new qr(et,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;default:this.workerSources[Ge][Je][We]=new this.externalWorkerSourceTypes[Je](et,this._getLayerIndex(Ge),this._getAvailableImages(Ge))}}return this.workerSources[Ge][Je][We]}_getDEMWorkerSource(Ge,Je){return this.demWorkerSources[Ge]||(this.demWorkerSources[Ge]={}),this.demWorkerSources[Ge][Je]||(this.demWorkerSources[Ge][Je]=new c),this.demWorkerSources[Ge][Je]}}return i.i(self)&&(self.worker=new jr(self)),jr}),r("index",["exports","./shared"],function(i,a){"use strict";var o="4.7.1";let s,l,u={now:typeof performance!="undefined"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:ue=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);ue.signal.addEventListener("abort",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(ue,w=0){return this.getImageCanvasContext(ue).getImageData(-w,-w,ue.width+2*w,ue.height+2*w)},getImageCanvasContext(ue){let w=window.document.createElement("canvas"),B=w.getContext("2d",{willReadFrequently:!0});if(!B)throw new Error("failed to create canvas 2d context");return w.width=ue.width,w.height=ue.height,B.drawImage(ue,0,0,ue.width,ue.height),B},resolveURL:ue=>(s||(s=document.createElement("a")),s.href=ue,s.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(l==null&&(l=matchMedia("(prefers-reduced-motion: reduce)")),l.matches)}};class c{static testProp(w){if(!c.docStyle)return w[0];for(let B=0;B<w.length;B++)if(w[B]in c.docStyle)return w[B];return w[0]}static create(w,B,Q){let ee=window.document.createElement(w);return B!==void 0&&(ee.className=B),Q&&Q.appendChild(ee),ee}static createNS(w,B){return window.document.createElementNS(w,B)}static disableDrag(){c.docStyle&&c.selectProp&&(c.userSelect=c.docStyle[c.selectProp],c.docStyle[c.selectProp]="none")}static enableDrag(){c.docStyle&&c.selectProp&&(c.docStyle[c.selectProp]=c.userSelect)}static setTransform(w,B){w.style[c.transformProp]=B}static addEventListener(w,B,Q,ee={}){w.addEventListener(B,Q,"passive"in ee?ee:ee.capture)}static removeEventListener(w,B,Q,ee={}){w.removeEventListener(B,Q,"passive"in ee?ee:ee.capture)}static suppressClickInternal(w){w.preventDefault(),w.stopPropagation(),window.removeEventListener("click",c.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",c.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",c.suppressClickInternal,!0)},0)}static getScale(w){let B=w.getBoundingClientRect();return{x:B.width/w.offsetWidth||1,y:B.height/w.offsetHeight||1,boundingClientRect:B}}static getPoint(w,B,Q){let ee=B.boundingClientRect;return new a.P((Q.clientX-ee.left)/B.x-w.clientLeft,(Q.clientY-ee.top)/B.y-w.clientTop)}static mousePos(w,B){let Q=c.getScale(w);return c.getPoint(w,Q,B)}static touchPos(w,B){let Q=[],ee=c.getScale(w);for(let le=0;le<B.length;le++)Q.push(c.getPoint(w,ee,B[le]));return Q}static mouseButton(w){return w.button}static remove(w){w.parentNode&&w.parentNode.removeChild(w)}}c.docStyle=typeof window!="undefined"&&window.document&&window.document.documentElement.style,c.selectProp=c.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),c.transformProp=c.testProp(["transform","WebkitTransform"]);let f={supported:!1,testSupport:function(ue){!v&&d&&(m?b(ue):h=ue)}},h,d,v=!1,m=!1;function b(ue){let w=ue.createTexture();ue.bindTexture(ue.TEXTURE_2D,w);try{if(ue.texImage2D(ue.TEXTURE_2D,0,ue.RGBA,ue.RGBA,ue.UNSIGNED_BYTE,d),ue.isContextLost())return;f.supported=!0}catch(B){}ue.deleteTexture(w),v=!0}var p;typeof document!="undefined"&&(d=document.createElement("img"),d.onload=()=>{h&&b(h),h=null,m=!0},d.onerror=()=>{v=!0,h=null},d.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(ue){let w,B,Q,ee;ue.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},ue.addThrottleControl=ut=>{let Mt=Q++;return ee[Mt]=ut,Mt},ue.removeThrottleControl=ut=>{delete ee[ut],ze()},ue.getImage=(ut,Mt,Jt=!0)=>new Promise(($t,mr)=>{f.supported&&(ut.headers||(ut.headers={}),ut.headers.accept="image/webp,*/*"),a.e(ut,{type:"image"}),w.push({abortController:Mt,requestParameters:ut,supportImageRefresh:Jt,state:"queued",onError:Cr=>{mr(Cr)},onSuccess:Cr=>{$t(Cr)}}),ze()});let le=ut=>a._(this,void 0,void 0,function*(){ut.state="running";let{requestParameters:Mt,supportImageRefresh:Jt,onError:$t,onSuccess:mr,abortController:Cr}=ut,ve=Jt===!1&&!a.i(self)&&!a.g(Mt.url)&&(!Mt.headers||Object.keys(Mt.headers).reduce((qe,Qe)=>qe&&Qe==="accept",!0));B++;let xe=ve?Ze(Mt,Cr):a.m(Mt,Cr);try{let qe=yield xe;delete ut.abortController,ut.state="completed",qe.data instanceof HTMLImageElement||a.b(qe.data)?mr(qe):qe.data&&mr({data:yield(Ie=qe.data,typeof createImageBitmap=="function"?a.d(Ie):a.f(Ie)),cacheControl:qe.cacheControl,expires:qe.expires})}catch(qe){delete ut.abortController,$t(qe)}finally{B--,ze()}var Ie}),ze=()=>{let ut=(()=>{for(let Mt of Object.keys(ee))if(ee[Mt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Mt=B;Mt<ut&&w.length>0;Mt++){let Jt=w.shift();Jt.abortController.signal.aborted?Mt--:le(Jt)}},Ze=(ut,Mt)=>new Promise((Jt,$t)=>{let mr=new Image,Cr=ut.url,ve=ut.credentials;ve&&ve==="include"?mr.crossOrigin="use-credentials":(ve&&ve==="same-origin"||!a.s(Cr))&&(mr.crossOrigin="anonymous"),Mt.signal.addEventListener("abort",()=>{mr.src="",$t(a.c())}),mr.fetchPriority="high",mr.onload=()=>{mr.onerror=mr.onload=null,Jt({data:mr})},mr.onerror=()=>{mr.onerror=mr.onload=null,Mt.signal.aborted||$t(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."))},mr.src=Cr})}(p||(p={})),p.resetRequestQueue();class k{constructor(w){this._transformRequestFn=w}transformRequest(w,B){return this._transformRequestFn&&this._transformRequestFn(w,B)||{url:w}}setTransformRequest(w){this._transformRequestFn=w}}function M(ue){var w=new a.A(3);return w[0]=ue[0],w[1]=ue[1],w[2]=ue[2],w}var T,L=function(ue,w,B){return ue[0]=w[0]-B[0],ue[1]=w[1]-B[1],ue[2]=w[2]-B[2],ue};T=new a.A(3),a.A!=Float32Array&&(T[0]=0,T[1]=0,T[2]=0);var x=function(ue){var w=ue[0],B=ue[1];return w*w+B*B};function C(ue){let w=[];if(typeof ue=="string")w.push({id:"default",url:ue});else if(ue&&ue.length>0){let B=[];for(let{id:Q,url:ee}of ue){let le=`${Q}${ee}`;B.indexOf(le)===-1&&(B.push(le),w.push({id:Q,url:ee}))}}return w}function S(ue,w,B){let Q=ue.split("?");return Q[0]+=`${w}${B}`,Q.join("?")}(function(){var ue=new a.A(2);a.A!=Float32Array&&(ue[0]=0,ue[1]=0)})();class g{constructor(w,B,Q,ee){this.context=w,this.format=Q,this.texture=w.gl.createTexture(),this.update(B,ee)}update(w,B,Q){let{width:ee,height:le}=w,ze=!(this.size&&this.size[0]===ee&&this.size[1]===le||Q),{context:Ze}=this,{gl:ut}=Ze;if(this.useMipmap=!!(B&&B.useMipmap),ut.bindTexture(ut.TEXTURE_2D,this.texture),Ze.pixelStoreUnpackFlipY.set(!1),Ze.pixelStoreUnpack.set(1),Ze.pixelStoreUnpackPremultiplyAlpha.set(this.format===ut.RGBA&&(!B||B.premultiply!==!1)),ze)this.size=[ee,le],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?ut.texImage2D(ut.TEXTURE_2D,0,this.format,this.format,ut.UNSIGNED_BYTE,w):ut.texImage2D(ut.TEXTURE_2D,0,this.format,ee,le,0,this.format,ut.UNSIGNED_BYTE,w.data);else{let{x:Mt,y:Jt}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?ut.texSubImage2D(ut.TEXTURE_2D,0,Mt,Jt,ut.RGBA,ut.UNSIGNED_BYTE,w):ut.texSubImage2D(ut.TEXTURE_2D,0,Mt,Jt,ee,le,ut.RGBA,ut.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&ut.generateMipmap(ut.TEXTURE_2D)}bind(w,B,Q){let{context:ee}=this,{gl:le}=ee;le.bindTexture(le.TEXTURE_2D,this.texture),Q!==le.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Q=le.LINEAR),w!==this.filter&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,w),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,Q||w),this.filter=w),B!==this.wrap&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,B),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,B),this.wrap=B)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:w}=this.context;w.deleteTexture(this.texture),this.texture=null}}function P(ue){let{userImage:w}=ue;return!!(w&&w.render&&w.render())&&(ue.data.replace(new Uint8Array(w.data.buffer)),!0)}class E extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(w){if(this.loaded!==w&&(this.loaded=w,w)){for(let{ids:B,promiseResolve:Q}of this.requestors)Q(this._getImagesForIds(B));this.requestors=[]}}getImage(w){let B=this.images[w];if(B&&!B.data&&B.spriteData){let Q=B.spriteData;B.data=new a.R({width:Q.width,height:Q.height},Q.context.getImageData(Q.x,Q.y,Q.width,Q.height).data),B.spriteData=null}return B}addImage(w,B){if(this.images[w])throw new Error(`Image id ${w} already exist, use updateImage instead`);this._validate(w,B)&&(this.images[w]=B)}_validate(w,B){let Q=!0,ee=B.data||B.spriteData;return this._validateStretch(B.stretchX,ee&&ee.width)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "stretchX" value`))),Q=!1),this._validateStretch(B.stretchY,ee&&ee.height)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "stretchY" value`))),Q=!1),this._validateContent(B.content,B)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "content" value`))),Q=!1),Q}_validateStretch(w,B){if(!w)return!0;let Q=0;for(let ee of w){if(ee[0]<Q||ee[1]<ee[0]||B<ee[1])return!1;Q=ee[1]}return!0}_validateContent(w,B){if(!w)return!0;if(w.length!==4)return!1;let Q=B.spriteData,ee=Q&&Q.width||B.data.width,le=Q&&Q.height||B.data.height;return!(w[0]<0||ee<w[0]||w[1]<0||le<w[1]||w[2]<0||ee<w[2]||w[3]<0||le<w[3]||w[2]<w[0]||w[3]<w[1])}updateImage(w,B,Q=!0){let ee=this.getImage(w);if(Q&&(ee.data.width!==B.data.width||ee.data.height!==B.data.height))throw new Error(`size mismatch between old image (${ee.data.width}x${ee.data.height}) and new image (${B.data.width}x${B.data.height}).`);B.version=ee.version+1,this.images[w]=B,this.updatedImages[w]=!0}removeImage(w){let B=this.images[w];delete this.images[w],delete this.patterns[w],B.userImage&&B.userImage.onRemove&&B.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(w){return new Promise((B,Q)=>{let ee=!0;if(!this.isLoaded())for(let le of w)this.images[le]||(ee=!1);this.isLoaded()||ee?B(this._getImagesForIds(w)):this.requestors.push({ids:w,promiseResolve:B})})}_getImagesForIds(w){let B={};for(let Q of w){let ee=this.getImage(Q);ee||(this.fire(new a.k("styleimagemissing",{id:Q})),ee=this.getImage(Q)),ee?B[Q]={data:ee.data.clone(),pixelRatio:ee.pixelRatio,sdf:ee.sdf,version:ee.version,stretchX:ee.stretchX,stretchY:ee.stretchY,content:ee.content,textFitWidth:ee.textFitWidth,textFitHeight:ee.textFitHeight,hasRenderCallback:!!(ee.userImage&&ee.userImage.render)}:a.w(`Image "${Q}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return B}getPixelSize(){let{width:w,height:B}=this.atlasImage;return{width:w,height:B}}getPattern(w){let B=this.patterns[w],Q=this.getImage(w);if(!Q)return null;if(B&&B.position.version===Q.version)return B.position;if(B)B.position.version=Q.version;else{let ee={w:Q.data.width+2,h:Q.data.height+2,x:0,y:0},le=new a.I(ee,Q);this.patterns[w]={bin:ee,position:le}}return this._updatePatternAtlas(),this.patterns[w].position}bind(w){let B=w.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new g(w,this.atlasImage,B.RGBA),this.atlasTexture.bind(B.LINEAR,B.CLAMP_TO_EDGE)}_updatePatternAtlas(){let w=[];for(let le in this.patterns)w.push(this.patterns[le].bin);let{w:B,h:Q}=a.p(w),ee=this.atlasImage;ee.resize({width:B||1,height:Q||1});for(let le in this.patterns){let{bin:ze}=this.patterns[le],Ze=ze.x+1,ut=ze.y+1,Mt=this.getImage(le).data,Jt=Mt.width,$t=Mt.height;a.R.copy(Mt,ee,{x:0,y:0},{x:Ze,y:ut},{width:Jt,height:$t}),a.R.copy(Mt,ee,{x:0,y:$t-1},{x:Ze,y:ut-1},{width:Jt,height:1}),a.R.copy(Mt,ee,{x:0,y:0},{x:Ze,y:ut+$t},{width:Jt,height:1}),a.R.copy(Mt,ee,{x:Jt-1,y:0},{x:Ze-1,y:ut},{width:1,height:$t}),a.R.copy(Mt,ee,{x:0,y:0},{x:Ze+Jt,y:ut},{width:1,height:$t})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(w){for(let B of w){if(this.callbackDispatchedThisFrame[B])continue;this.callbackDispatchedThisFrame[B]=!0;let Q=this.getImage(B);Q||a.w(`Image with ID: "${B}" was not found`),P(Q)&&this.updateImage(B,Q)}}}let z=1e20;function q(ue,w,B,Q,ee,le,ze,Ze,ut){for(let Mt=w;Mt<w+Q;Mt++)U(ue,B*le+Mt,le,ee,ze,Ze,ut);for(let Mt=B;Mt<B+ee;Mt++)U(ue,Mt*le+w,1,Q,ze,Ze,ut)}function U(ue,w,B,Q,ee,le,ze){le[0]=0,ze[0]=-z,ze[1]=z,ee[0]=ue[w];for(let Ze=1,ut=0,Mt=0;Ze<Q;Ze++){ee[Ze]=ue[w+Ze*B];let Jt=Ze*Ze;do{let $t=le[ut];Mt=(ee[Ze]-ee[$t]+Jt-$t*$t)/(Ze-$t)/2}while(Mt<=ze[ut]&&--ut>-1);ut++,le[ut]=Ze,ze[ut]=Mt,ze[ut+1]=z}for(let Ze=0,ut=0;Ze<Q;Ze++){for(;ze[ut+1]<Ze;)ut++;let Mt=le[ut],Jt=Ze-Mt;ue[w+Ze*B]=ee[Mt]+Jt*Jt}}class G{constructor(w,B){this.requestManager=w,this.localIdeographFontFamily=B,this.entries={}}setURL(w){this.url=w}getGlyphs(w){return a._(this,void 0,void 0,function*(){let B=[];for(let le in w)for(let ze of w[le])B.push(this._getAndCacheGlyphsPromise(le,ze));let Q=yield Promise.all(B),ee={};for(let{stack:le,id:ze,glyph:Ze}of Q)ee[le]||(ee[le]={}),ee[le][ze]=Ze&&{id:Ze.id,bitmap:Ze.bitmap.clone(),metrics:Ze.metrics};return ee})}_getAndCacheGlyphsPromise(w,B){return a._(this,void 0,void 0,function*(){let Q=this.entries[w];Q||(Q=this.entries[w]={glyphs:{},requests:{},ranges:{}});let ee=Q.glyphs[B];if(ee!==void 0)return{stack:w,id:B,glyph:ee};if(ee=this._tinySDF(Q,w,B),ee)return Q.glyphs[B]=ee,{stack:w,id:B,glyph:ee};let le=Math.floor(B/256);if(256*le>65535)throw new Error("glyphs > 65535 not supported");if(Q.ranges[le])return{stack:w,id:B,glyph:ee};if(!this.url)throw new Error("glyphsUrl is not set");if(!Q.requests[le]){let Ze=G.loadGlyphRange(w,le,this.url,this.requestManager);Q.requests[le]=Ze}let ze=yield Q.requests[le];for(let Ze in ze)this._doesCharSupportLocalGlyph(+Ze)||(Q.glyphs[+Ze]=ze[+Ze]);return Q.ranges[le]=!0,{stack:w,id:B,glyph:ze[B]||null}})}_doesCharSupportLocalGlyph(w){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(w))}_tinySDF(w,B,Q){let ee=this.localIdeographFontFamily;if(!ee||!this._doesCharSupportLocalGlyph(Q))return;let le=w.tinySDF;if(!le){let Ze="400";/bold/i.test(B)?Ze="900":/medium/i.test(B)?Ze="500":/light/i.test(B)&&(Ze="200"),le=w.tinySDF=new G.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:Ze})}let ze=le.draw(String.fromCharCode(Q));return{id:Q,bitmap:new a.o({width:ze.width||60,height:ze.height||60},ze.data),metrics:{width:ze.glyphWidth/2||24,height:ze.glyphHeight/2||24,left:ze.glyphLeft/2+.5||0,top:ze.glyphTop/2-27.5||-8,advance:ze.glyphAdvance/2||24,isDoubleResolution:!0}}}}G.loadGlyphRange=function(ue,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,le=ee+255,ze=Q.transformRequest(B.replace("{fontstack}",ue).replace("{range}",`${ee}-${le}`),"Glyphs"),Ze=yield a.l(ze,new AbortController);if(!Ze||!Ze.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${le}`);let ut={};for(let Mt of a.n(Ze.data))ut[Mt.id]=Mt;return ut})},G.TinySDF=class{constructor({fontSize:ue=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee="sans-serif",fontWeight:le="normal",fontStyle:ze="normal"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let Ze=this.size=ue+4*w,ut=this._createCanvas(Ze),Mt=this.ctx=ut.getContext("2d",{willReadFrequently:!0});Mt.font=`${ze} ${le} ${ue}px ${ee}`,Mt.textBaseline="alphabetic",Mt.textAlign="left",Mt.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(ue){let w=document.createElement("canvas");return w.width=w.height=ue,w}draw(ue){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:le}=this.ctx.measureText(ue),ze=Math.ceil(B),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(le-ee))),ut=Math.min(this.size-this.buffer,ze+Math.ceil(Q)),Mt=Ze+2*this.buffer,Jt=ut+2*this.buffer,$t=Math.max(Mt*Jt,0),mr=new Uint8ClampedArray($t),Cr={data:mr,width:Mt,height:Jt,glyphWidth:Ze,glyphHeight:ut,glyphTop:ze,glyphLeft:0,glyphAdvance:w};if(Ze===0||ut===0)return Cr;let{ctx:ve,buffer:xe,gridInner:Ie,gridOuter:qe}=this;ve.clearRect(xe,xe,Ze,ut),ve.fillText(ue,xe,xe+ze);let Qe=ve.getImageData(xe,xe,Ze,ut);qe.fill(z,0,$t),Ie.fill(0,0,$t);for(let Xe=0;Xe<ut;Xe++)for(let nt=0;nt<Ze;nt++){let qt=Qe.data[4*(Xe*Ze+nt)+3]/255;if(qt===0)continue;let jt=(Xe+xe)*Mt+nt+xe;if(qt===1)qe[jt]=0,Ie[jt]=z;else{let ar=.5-qt;qe[jt]=ar>0?ar*ar:0,Ie[jt]=ar<0?ar*ar:0}}q(qe,0,0,Mt,Jt,Mt,this.f,this.v,this.z),q(Ie,xe,xe,Ze,ut,Mt,this.f,this.v,this.z);for(let Xe=0;Xe<$t;Xe++){let nt=Math.sqrt(qe[Xe])-Math.sqrt(Ie[Xe]);mr[Xe]=Math.round(255-255*(nt/this.radius+this.cutoff))}return Cr}};class Z{constructor(){this.specification=a.v.light.position}possiblyEvaluate(w,B){return a.x(w.expression.evaluate(B))}interpolate(w,B,Q){return{x:a.y.number(w.x,B.x,Q),y:a.y.number(w.y,B.y,Q),z:a.y.number(w.z,B.z,Q)}}}let j;class N extends a.E{constructor(w){super(),j=j||new a.q({anchor:new a.D(a.v.light.anchor),position:new Z,color:new a.D(a.v.light.color),intensity:new a.D(a.v.light.intensity)}),this._transitionable=new a.T(j),this.setLight(w),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(w,B={}){if(!this._validate(a.r,w,B))for(let Q in w){let ee=w[Q];Q.endsWith("-transition")?this._transitionable.setTransition(Q.slice(0,-11),ee):this._transitionable.setValue(Q,ee)}}updateTransitions(w){this._transitioning=this._transitionable.transitioned(w,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(w){this.properties=this._transitioning.possiblyEvaluate(w)}_validate(w,B,Q){return(!Q||Q.validate!==!1)&&a.t(this,w.call(a.u,{value:B,style:{glyphs:!0,sprite:!0},styleSpec:a.v}))}}let H=new a.q({"sky-color":new a.D(a.v.sky["sky-color"]),"horizon-color":new a.D(a.v.sky["horizon-color"]),"fog-color":new a.D(a.v.sky["fog-color"]),"fog-ground-blend":new a.D(a.v.sky["fog-ground-blend"]),"horizon-fog-blend":new a.D(a.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new a.D(a.v.sky["sky-horizon-blend"]),"atmosphere-blend":new a.D(a.v.sky["atmosphere-blend"])});class re extends a.E{constructor(w){super(),this._transitionable=new a.T(H),this.setSky(w),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.z(0))}setSky(w,B={}){if(!this._validate(a.B,w,B)){w||(w={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(let Q in w){let ee=w[Q];Q.endsWith("-transition")?this._transitionable.setTransition(Q.slice(0,-11),ee):this._transitionable.setValue(Q,ee)}}}getSky(){return this._transitionable.serialize()}updateTransitions(w){this._transitioning=this._transitionable.transitioned(w,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(w){this.properties=this._transitioning.possiblyEvaluate(w)}_validate(w,B,Q={}){return(Q==null?void 0:Q.validate)!==!1&&a.t(this,w.call(a.u,a.e({value:B,style:{glyphs:!0,sprite:!0},styleSpec:a.v})))}calculateFogBlendOpacity(w){return w<60?0:w<70?(w-60)/10:1}}class oe{constructor(w,B){this.width=w,this.height=B,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(w,B){let Q=w.join(",")+String(B);return this.dashEntry[Q]||(this.dashEntry[Q]=this.addDash(w,B)),this.dashEntry[Q]}getDashRanges(w,B,Q){let ee=[],le=w.length%2==1?-w[w.length-1]*Q:0,ze=w[0]*Q,Ze=!0;ee.push({left:le,right:ze,isDash:Ze,zeroLength:w[0]===0});let ut=w[0];for(let Mt=1;Mt<w.length;Mt++){Ze=!Ze;let Jt=w[Mt];le=ut*Q,ut+=Jt,ze=ut*Q,ee.push({left:le,right:ze,isDash:Ze,zeroLength:Jt===0})}return ee}addRoundDash(w,B,Q){let ee=B/2;for(let le=-Q;le<=Q;le++){let ze=this.width*(this.nextRow+Q+le),Ze=0,ut=w[Ze];for(let Mt=0;Mt<this.width;Mt++){Mt/ut.right>1&&(ut=w[++Ze]);let Jt=Math.abs(Mt-ut.left),$t=Math.abs(Mt-ut.right),mr=Math.min(Jt,$t),Cr,ve=le/Q*(ee+1);if(ut.isDash){let xe=ee-Math.abs(ve);Cr=Math.sqrt(mr*mr+xe*xe)}else Cr=ee-Math.sqrt(mr*mr+ve*ve);this.data[ze+Mt]=Math.max(0,Math.min(255,Cr+128))}}}addRegularDash(w){for(let Ze=w.length-1;Ze>=0;--Ze){let ut=w[Ze],Mt=w[Ze+1];ut.zeroLength?w.splice(Ze,1):Mt&&Mt.isDash===ut.isDash&&(Mt.left=ut.left,w.splice(Ze,1))}let B=w[0],Q=w[w.length-1];B.isDash===Q.isDash&&(B.left=Q.left-this.width,Q.right=B.right+this.width);let ee=this.width*this.nextRow,le=0,ze=w[le];for(let Ze=0;Ze<this.width;Ze++){Ze/ze.right>1&&(ze=w[++le]);let ut=Math.abs(Ze-ze.left),Mt=Math.abs(Ze-ze.right),Jt=Math.min(ut,Mt);this.data[ee+Ze]=Math.max(0,Math.min(255,(ze.isDash?Jt:-Jt)+128))}}addDash(w,B){let Q=B?7:0,ee=2*Q+1;if(this.nextRow+ee>this.height)return a.w("LineAtlas out of space"),null;let le=0;for(let Ze=0;Ze<w.length;Ze++)le+=w[Ze];if(le!==0){let Ze=this.width/le,ut=this.getDashRanges(w,this.width,Ze);B?this.addRoundDash(ut,Ze,Q):this.addRegularDash(ut)}let ze={y:(this.nextRow+Q+.5)/this.height,height:2*Q/this.height,width:le};return this.nextRow+=ee,this.dirty=!0,ze}bind(w){let B=w.gl;this.texture?(B.bindTexture(B.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,B.texSubImage2D(B.TEXTURE_2D,0,0,0,this.width,this.height,B.ALPHA,B.UNSIGNED_BYTE,this.data))):(this.texture=B.createTexture(),B.bindTexture(B.TEXTURE_2D,this.texture),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_S,B.REPEAT),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_WRAP_T,B.REPEAT),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MIN_FILTER,B.LINEAR),B.texParameteri(B.TEXTURE_2D,B.TEXTURE_MAG_FILTER,B.LINEAR),B.texImage2D(B.TEXTURE_2D,0,B.ALPHA,this.width,this.height,0,B.ALPHA,B.UNSIGNED_BYTE,this.data))}}let _e="maplibre_preloaded_worker_pool";class ke{constructor(){this.active={}}acquire(w){if(!this.workers)for(this.workers=[];this.workers.length<ke.workerCount;)this.workers.push(new Worker(a.a.WORKER_URL));return this.active[w]=!0,this.workers.slice()}release(w){delete this.active[w],this.numActive()===0&&(this.workers.forEach(B=>{B.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[_e]}numActive(){return Object.keys(this.active).length}}let Ce=Math.floor(u.hardwareConcurrency/2),ge,ie;function Se(){return ge||(ge=new ke),ge}ke.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 we(){return ie||(ie=new Ee(Se(),a.G),ie.registerMessageHandler("GR",(ue,w,B)=>a.m(w,B))),ie}function De(ue,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*ue.width,.5*ue.height,1]),a.L(B,B,ue.calculatePosMatrix(w.toUnwrapped()))}function Le(ue,w,B,Q,ee,le){let ze=function($t,mr,Cr){if($t)for(let ve of $t){let xe=mr[ve];if(xe&&xe.source===Cr&&xe.type==="fill-extrusion")return!0}else for(let ve in mr){let xe=mr[ve];if(xe.source===Cr&&xe.type==="fill-extrusion")return!0}return!1}(ee&&ee.layers,w,ue.id),Ze=le.maxPitchScaleFactor(),ut=ue.tilesIn(Q,Ze,ze);ut.sort(me);let Mt=[];for(let $t of ut)Mt.push({wrappedTileID:$t.tileID.wrapped().key,queryResults:$t.tile.queryRenderedFeatures(w,B,ue._state,$t.queryGeometry,$t.cameraQueryGeometry,$t.scale,ee,le,Ze,De(ue.transform,$t.tileID))});let Jt=function($t){let mr={},Cr={};for(let ve of $t){let xe=ve.queryResults,Ie=ve.wrappedTileID,qe=Cr[Ie]=Cr[Ie]||{};for(let Qe in xe){let Xe=xe[Qe],nt=qe[Qe]=qe[Qe]||{},qt=mr[Qe]=mr[Qe]||[];for(let jt of Xe)nt[jt.featureIndex]||(nt[jt.featureIndex]=!0,qt.push(jt))}}return mr}(Mt);for(let $t in Jt)Jt[$t].forEach(mr=>{let Cr=mr.feature,ve=ue.getFeatureState(Cr.layer["source-layer"],Cr.id);Cr.source=Cr.layer.source,Cr.layer["source-layer"]&&(Cr.sourceLayer=Cr.layer["source-layer"]),Cr.state=ve});return Jt}function me(ue,w){let B=ue.tileID,Q=w.tileID;return B.overscaledZ-Q.overscaledZ||B.canonical.y-Q.canonical.y||B.wrap-Q.wrap||B.canonical.x-Q.canonical.x}function Pe(ue,w,B){return a._(this,void 0,void 0,function*(){let Q=ue;if(ue.url?Q=(yield a.h(w.transformRequest(ue.url,"Source"),B)).data:yield u.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,ue),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Q&&Q.vector_layers&&(ee.vectorLayerIds=Q.vector_layers.map(le=>le.id)),ee})}class ce{constructor(w,B){w&&(B?this.setSouthWest(w).setNorthEast(B):Array.isArray(w)&&(w.length===4?this.setSouthWest([w[0],w[1]]).setNorthEast([w[2],w[3]]):this.setSouthWest(w[0]).setNorthEast(w[1])))}setNorthEast(w){return this._ne=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}setSouthWest(w){return this._sw=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}extend(w){let B=this._sw,Q=this._ne,ee,le;if(w instanceof a.N)ee=w,le=w;else{if(!(w instanceof ce))return Array.isArray(w)?w.length===4||w.every(Array.isArray)?this.extend(ce.convert(w)):this.extend(a.N.convert(w)):w&&("lng"in w||"lon"in w)&&"lat"in w?this.extend(a.N.convert(w)):this;if(ee=w._sw,le=w._ne,!ee||!le)return this}return B||Q?(B.lng=Math.min(ee.lng,B.lng),B.lat=Math.min(ee.lat,B.lat),Q.lng=Math.max(le.lng,Q.lng),Q.lat=Math.max(le.lat,Q.lat)):(this._sw=new a.N(ee.lng,ee.lat),this._ne=new a.N(le.lng,le.lat)),this}getCenter(){return new a.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new a.N(this.getWest(),this.getNorth())}getSouthEast(){return new a.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(w){let{lng:B,lat:Q}=a.N.convert(w),ee=this._sw.lng<=B&&B<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ee=this._sw.lng>=B&&B>=this._ne.lng),this._sw.lat<=Q&&Q<=this._ne.lat&&ee}static convert(w){return w instanceof ce?w:w&&new ce(w)}static fromLngLat(w,B=0){let Q=360*B/40075017,ee=Q/Math.cos(Math.PI/180*w.lat);return new ce(new a.N(w.lng-ee,w.lat-Q),new a.N(w.lng+ee,w.lat+Q))}adjustAntiMeridian(){let w=new a.N(this._sw.lng,this._sw.lat),B=new a.N(this._ne.lng,this._ne.lat);return new ce(w,w.lng>B.lng?new a.N(B.lng+360,B.lat):B)}}class He{constructor(w,B,Q){this.bounds=ce.convert(this.validateBounds(w)),this.minzoom=B||0,this.maxzoom=Q||24}validateBounds(w){return Array.isArray(w)&&w.length===4?[Math.max(-180,w[0]),Math.max(-90,w[1]),Math.min(180,w[2]),Math.min(90,w[3])]:[-180,-90,180,90]}contains(w){let B=Math.pow(2,w.z),Q=Math.floor(a.O(this.bounds.getWest())*B),ee=Math.floor(a.Q(this.bounds.getNorth())*B),le=Math.ceil(a.O(this.bounds.getEast())*B),ze=Math.ceil(a.Q(this.bounds.getSouth())*B);return w.x>=Q&&w.x<le&&w.y>=ee&&w.y<ze}}class lt extends a.E{constructor(w,B,Q,ee){if(super(),this.id=w,this.dispatcher=Q,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,a.e(this,a.M(B,["url","scheme","tileSize","promoteId"])),this._options=a.e({type:"vector"},B),this._collectResourceTiming=B.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(ee)}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let w=yield Pe(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 He(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,ze)=>{w.reloadPromise={resolve:le,reject:ze}})}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 mt 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 Pe(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,w&&(a.e(this,w),w.bounds&&(this.tileBounds=new He(w.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})))}catch(w){this._tileJSONRequest=null,this.fire(new a.j(w))}})}loaded(){return this._loaded}onAdd(w){this.map=w,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(w){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),w(),this.load()}setTiles(w){return this.setSourceProperty(()=>{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}serialize(){return a.e({},this._options)}hasTile(w){return!this.tileBounds||this.tileBounds.contains(w.canonical)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);w.abortController=new AbortController;try{let Q=yield p.getImage(this.map._requestManager.transformRequest(B,"Tile"),w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(Q&&Q.data){this.map._refreshExpiredTiles&&Q.cacheControl&&Q.expires&&w.setExpiryData({cacheControl:Q.cacheControl,expires:Q.expires});let ee=this.map.painter.context,le=ee.gl,ze=Q.data;w.texture=this.map.painter.getTileTexture(ze.width),w.texture?w.texture.update(ze,{useMipmap:!0}):(w.texture=new g(ee,ze,le.RGBA,{useMipmap:!0}),w.texture.bind(le.LINEAR,le.CLAMP_TO_EDGE,le.LINEAR_MIPMAP_NEAREST)),w.state="loaded"}}catch(Q){if(delete w.abortController,w.aborted)w.state="unloaded";else if(Q)throw w.state="errored",Q}})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController)})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.texture&&this.map.painter.saveTileTexture(w.texture)})}hasTransition(){return!1}}class Vt extends mt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.type="raster-dem",this.maxzoom=22,this._options=a.e({type:"raster-dem"},B),this.encoding=B.encoding||"mapbox",this.redFactor=B.redFactor,this.greenFactor=B.greenFactor,this.blueFactor=B.blueFactor,this.baseShift=B.baseShift}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q=this.map._requestManager.transformRequest(B,"Tile");w.neighboringTiles=this._getNeighboringTiles(w.tileID),w.abortController=new AbortController;try{let ee=yield p.getImage(Q,w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(ee&&ee.data){let le=ee.data;this.map._refreshExpiredTiles&&ee.cacheControl&&ee.expires&&w.setExpiryData({cacheControl:ee.cacheControl,expires:ee.expires});let ze=a.b(le)&&a.U()?le:yield this.readImageNow(le),Ze={type:this.type,uid:w.uid,source:this.id,rawImageData:ze,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 ut=yield w.actor.sendAsync({type:"LDT",data:Ze});w.dem=ut,w.needsHillshadePrepare=!0,w.needsTerrainPrepare=!0,w.state="loaded"}}}catch(ee){if(delete w.abortController,w.aborted)w.state="unloaded";else if(ee)throw w.state="errored",ee}})}readImageNow(w){return a._(this,void 0,void 0,function*(){if(typeof VideoFrame!="undefined"&&a.V()){let B=w.width+2,Q=w.height+2;try{return new a.R({width:B,height:Q},yield a.W(w,-1,-1,B,Q))}catch(ee){}}return u.getImageData(w,1)})}_getNeighboringTiles(w){let B=w.canonical,Q=Math.pow(2,B.z),ee=(B.x-1+Q)%Q,le=B.x===0?w.wrap-1:w.wrap,ze=(B.x+1+Q)%Q,Ze=B.x+1===Q?w.wrap+1:w.wrap,ut={};return ut[new a.S(w.overscaledZ,le,B.z,ee,B.y).key]={backfilled:!1},ut[new a.S(w.overscaledZ,Ze,B.z,ze,B.y).key]={backfilled:!1},B.y>0&&(ut[new a.S(w.overscaledZ,le,B.z,ee,B.y-1).key]={backfilled:!1},ut[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},ut[new a.S(w.overscaledZ,Ze,B.z,ze,B.y-1).key]={backfilled:!1}),B.y+1<Q&&(ut[new a.S(w.overscaledZ,le,B.z,ee,B.y+1).key]={backfilled:!1},ut[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y+1).key]={backfilled:!1},ut[new a.S(w.overscaledZ,Ze,B.z,ze,B.y+1).key]={backfilled:!1}),ut}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 st extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=Q.getActor(),this.setEventedParent(ee),this._data=B.data,this._options=a.e({},B),this._collectResourceTiming=B.collectResourceTiming,B.maxzoom!==void 0&&(this.maxzoom=B.maxzoom),B.type&&(this.type=B.type),B.attribution&&(this.attribution=B.attribution),this.promoteId=B.promoteId;let le=a.X/this.tileSize;B.clusterMaxZoom!==void 0&&this.maxzoom<=B.clusterMaxZoom&&a.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${B.clusterMaxZoom}".`),this.workerOptions=a.e({source:this.id,cluster:B.cluster||!1,geojsonVtOptions:{buffer:(B.buffer!==void 0?B.buffer:128)*le,tolerance:(B.tolerance!==void 0?B.tolerance:.375)*le,extent:a.X,maxZoom:this.maxzoom,lineMetrics:B.lineMetrics||!1,generateId:B.generateId||!1},superclusterOptions:{maxZoom:B.clusterMaxZoom!==void 0?B.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,B.clusterMinPoints||2),extent:a.X,radius:(B.clusterRadius||50)*le,log:!1,generateId:B.generateId||!1},clusterProperties:B.clusterProperties,filter:B.filter},B.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}load(){return a._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(w){this.map=w,this.load()}setData(w){return this._data=w,this._updateWorkerData(),this}updateData(w){return this._updateWorkerData(w),this}getData(){return a._(this,void 0,void 0,function*(){let w=a.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:w})})}setClusterOptions(w){return this.workerOptions.cluster=w.cluster,w&&(w.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=w.clusterRadius),w.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=w.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(w){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:w,source:this.id}})}getClusterChildren(w){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:w,source:this.id}})}getClusterLeaves(w,B,Q){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:w,limit:B,offset:Q}})}_updateWorkerData(w){return a._(this,void 0,void 0,function*(){let B=a.e({type:this.type},this.workerOptions);w?B.dataDiff=w:typeof this._data=="string"?(B.request=this.map._requestManager.transformRequest(u.resolveURL(this._data),"Source"),B.request.collectResourceTiming=this._collectResourceTiming):B.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new a.k("dataloading",{dataType:"source"}));try{let Q=yield this.actor.sendAsync({type:"LD",data:B});if(this._pendingLoads--,this._removed||Q.abandoned)return void this.fire(new a.k("dataabort",{dataType:"source"}));let ee=null;Q.resourceTiming&&Q.resourceTiming[this.id]&&(ee=Q.resourceTiming[this.id].slice(0));let le={dataType:"source"};this._collectResourceTiming&&ee&&ee.length>0&&a.e(le,{resourceTiming:ee}),this.fire(new a.k("data",Object.assign(Object.assign({},le),{sourceDataType:"metadata"}))),this.fire(new a.k("data",Object.assign(Object.assign({},le),{sourceDataType:"content"})))}catch(Q){if(this._pendingLoads--,this._removed)return void this.fire(new a.k("dataabort",{dataType:"source"}));this.fire(new a.j(Q))}})}loaded(){return this._pendingLoads===0}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.actor?"RT":"LT";w.actor=this.actor;let Q={type:this.type,uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};w.abortController=new AbortController;let ee=yield this.actor.sendAsync({type:B,data:Q},w.abortController);delete w.abortController,w.unloadVectorData(),w.aborted||w.loadVectorData(ee,this.map.painter,B==="RT")})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.aborted=!0})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:w.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var ct=a.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Qt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.coordinates=B.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ee),this.options=B}load(w){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let B=yield p.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,B&&B.data&&(this.image=B.data,w&&(this.coordinates=w),this._finishLoading())}catch(B){this._request=null,this._loaded=!0,this.fire(new a.j(B))}})}loaded(){return this._loaded}updateImage(w){return w.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=w.url,this.load(w.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(w){this.map=w,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(w){this.coordinates=w;let B=w.map(a.Z.fromLngLat);this.tileID=function(ee){let le=1/0,ze=1/0,Ze=-1/0,ut=-1/0;for(let mr of ee)le=Math.min(le,mr.x),ze=Math.min(ze,mr.y),Ze=Math.max(Ze,mr.x),ut=Math.max(ut,mr.y);let Mt=Math.max(Ze-le,ut-ze),Jt=Math.max(0,Math.floor(-Math.log(Mt)/Math.LN2)),$t=Math.pow(2,Jt);return new a.a1(Jt,Math.floor((le+Ze)/2*$t),Math.floor((ze+ut)/2*$t))}(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,ct.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new g(w,this.image,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!=="loaded"&&(le.state="loaded",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(w){return a._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(w.tileID.canonical)?(this.tiles[String(w.tileID.wrap)]=w,w.buckets={}):w.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Ht extends Qt{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,ct.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE),B.texSubImage2D(B.TEXTURE_2D,0,0,0,B.RGBA,B.UNSIGNED_BYTE,this.video)):(this.texture=new g(w,this.video,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!=="loaded"&&(le.state="loaded",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class nr extends Qt{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(ze=>typeof ze!="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,ct.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?(w||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new g(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let le in this.tiles){let ze=this.tiles[le];ze.state!=="loaded"&&(ze.state="loaded",ze.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 tt={},je=ue=>{switch(ue){case"geojson":return st;case"image":return Qt;case"raster":return mt;case"raster-dem":return Vt;case"vector":return lt;case"video":return Ht;case"canvas":return nr}return tt[ue]},Ue="RTLPluginLoaded";class Ae extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=we()}_syncState(w){return this.status=w,this.dispatcher.broadcast("SRPS",{pluginStatus:w,pluginURL:this.url}).catch(B=>{throw this.status="error",B})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(w){return a._(this,arguments,void 0,function*(B,Q=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=u.resolveURL(B),!this.url)throw new Error(`requested url ${B} is invalid`);if(this.status==="unavailable"){if(!Q)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return a._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new a.k(Ue))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let rt=null;function St(){return rt||(rt=new Ae),rt}class Tt{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 ze={};if(!le)return ze;for(let Ze of ee){let ut=Ze.layerIds.map(Mt=>le.getLayer(Mt)).filter(Boolean);if(ut.length!==0){Ze.layers=ut,Ze.stateDependentLayerIds&&(Ze.stateDependentLayers=Ze.stateDependentLayerIds.map(Mt=>ut.filter(Jt=>Jt.id===Mt)[0]));for(let Mt of ut)ze[Mt.id]=Ze}}return ze}(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,St().lazyLoad();break}}this.queryPadding=0;for(let ee in this.buckets){let le=this.buckets[ee];this.queryPadding=Math.max(this.queryPadding,B.style.getLayer(ee).queryRadius(le))}w.imageAtlas&&(this.imageAtlas=w.imageAtlas),w.glyphAtlasImage&&(this.glyphAtlasImage=w.glyphAtlasImage)}else this.collisionBoxArray=new a.a5}unloadVectorData(){for(let w in this.buckets)this.buckets[w].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(w){return this.buckets[w.id]}upload(w){for(let Q in this.buckets){let ee=this.buckets[Q];ee.uploadPending()&&ee.upload(w)}let B=w.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new g(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new g(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,le,ze,Ze,ut,Mt,Jt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:le,scale:ze,tileSize:this.tileSize,pixelPosMatrix:Jt,transform:ut,params:Ze,queryPadding:this.queryPadding*Mt},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:"",ze=ee._geojsonTileLayer||ee[le];if(!ze)return;let Ze=a.a7(B&&B.filter),{z:ut,x:Mt,y:Jt}=this.tileID.canonical,$t={z:ut,x:Mt,y:Jt};for(let mr=0;mr<ze.length;mr++){let Cr=ze.feature(mr);if(Ze.needGeometry){let Ie=a.a8(Cr,!0);if(!Ze.filter(new a.z(this.tileID.overscaledZ),Ie,this.tileID.canonical))continue}else if(!Ze.filter(new a.z(this.tileID.overscaledZ),Cr))continue;let ve=Q.getId(Cr,le),xe=new a.a9(Cr,ut,Mt,Jt,ve);xe.tile=$t,w.push(xe)}}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],ze=le.layers[0].sourceLayer||"_geojsonTileLayer",Ze=Q[ze],ut=w[ze];if(!Ze||!ut||Object.keys(ut).length===0)continue;le.update(ut,Ze,this.imageAtlas&&this.imageAtlas.patternPositions||{});let Mt=B&&B.style&&B.style.getLayer(ee);Mt&&(this.queryPadding=Math.max(this.queryPadding,Mt.queryRadius(le)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<u.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(w){this.symbolFadeHoldUntil=u.now()+w}setDependencies(w,B){let Q={};for(let ee of B)Q[ee]=!0;this.dependencies[w]=Q}hasDependency(w,B){for(let Q of w){let ee=this.dependencies[Q];if(ee){for(let le of B)if(ee[le])return!0}}return!1}}class dt{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 ze=this._getAndRemoveByKey(this.order[0]);ze&&this.onRemove(ze)}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 Et{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 ze in le)delete ee[ze]}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 ze in this.stateChanges[ee])this.state[ee][ze]||(this.state[ee][ze]={}),a.e(this.state[ee][ze],this.stateChanges[ee][ze]),le[ze]=this.state[ee][ze];Q[ee]=le}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let le={};if(this.deletedStates[ee]===null)for(let ze in this.state[ee])le[ze]={},this.state[ee][ze]={};else for(let ze in this.deletedStates[ee]){if(this.deletedStates[ee][ze]===null)this.state[ee][ze]={};else for(let Ze of Object.keys(this.deletedStates[ee][ze]))delete this.state[ee][ze][Ze];le[ze]=this.state[ee][ze]}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 pt 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,ze,Ze)=>{let ut=new(je(le.type))(ee,le,ze,Ze);if(ut.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${ut.id}`);return ut})(w,B,Q,this),this._tiles={},this._cache=new dt(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Et,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(Xt).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,ze=ee.tileID,Ze=new a.P(le.canonical.x,le.canonical.y)._rotate(this.transform.angle),ut=new a.P(ze.canonical.x,ze.canonical.y)._rotate(this.transform.angle);return le.overscaledZ-ze.overscaledZ||ut.y-Ze.y||ut.x-Ze.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(Xt).map(Q=>Q.key)}hasRenderableParent(w){let B=this.findLoadedParent(w,0);return!!B&&this._isIdRenderable(B.tileID.key)}_isIdRenderable(w,B){return this._tiles[w]&&this._tiles[w].hasData()&&!this._coveredTiles[w]&&(B||!this._tiles[w].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let w in this._tiles)this._tiles[w].state!=="errored"&&this._reloadTile(w,"reloading")}}_reloadTile(w,B){return a._(this,void 0,void 0,function*(){let Q=this._tiles[w];Q&&(Q.state!=="loading"&&(Q.state=B),yield this._loadTile(Q,w,B))})}_tileLoaded(w,B,Q){w.timeAdded=u.now(),Q==="expired"&&(w.refreshedUponExpiration=!0),this._setTileReloadTimer(B,w),this.getSource().type==="raster-dem"&&w.dem&&this._backfillDEM(w),this._state.initializeTileState(w,this.map?this.map.painter:null),w.aborted||this._source.fire(new a.k("data",{dataType:"source",tile:w,coord:w.tileID}))}_backfillDEM(w){let B=this.getRenderableIds();for(let ee=0;ee<B.length;ee++){let le=B[ee];if(w.neighboringTiles&&w.neighboringTiles[le]){let ze=this.getTileByID(le);Q(w,ze),Q(ze,w)}}function Q(ee,le){ee.needsHillshadePrepare=!0,ee.needsTerrainPrepare=!0;let ze=le.tileID.canonical.x-ee.tileID.canonical.x,Ze=le.tileID.canonical.y-ee.tileID.canonical.y,ut=Math.pow(2,ee.tileID.canonical.z),Mt=le.tileID.key;ze===0&&Ze===0||Math.abs(Ze)>1||(Math.abs(ze)>1&&(Math.abs(ze+ut)===1?ze+=ut:Math.abs(ze-ut)===1&&(ze-=ut)),le.dem&&ee.dem&&(ee.dem.backfillBorder(le.dem,ze,Ze),ee.neighboringTiles&&ee.neighboringTiles[Mt]&&(ee.neighboringTiles[Mt].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 ze=this._tiles[le];if(ee[le]||!ze.hasData()||ze.tileID.overscaledZ<=B||ze.tileID.overscaledZ>Q)continue;let Ze=ze.tileID;for(;ze&&ze.tileID.overscaledZ>B+1;){let Mt=ze.tileID.scaledTo(ze.tileID.overscaledZ-1);ze=this._tiles[Mt.key],ze&&ze.hasData()&&(Ze=Mt)}let ut=Ze;for(;ut.overscaledZ>B;)if(ut=ut.scaledTo(ut.overscaledZ-1),w[ut.key]){ee[Ze.key]=Ze;break}}}findLoadedParent(w,B){if(w.key in this._loadedParentTiles){let Q=this._loadedParentTiles[w.key];return Q&&Q.tileID.overscaledZ>=B?Q:null}for(let Q=w.overscaledZ-1;Q>=B;Q--){let ee=w.scaledTo(Q),le=this._getLoadedTile(ee);if(le)return le}}findLoadedSibling(w){return this._getLoadedTile(w)}_getLoadedTile(w){let B=this._tiles[w.key];return B&&B.hasData()?B:this._cache.getByKey(w.wrapped().key)}updateCacheSize(w){let B=Math.ceil(w.width/this._source.tileSize)+1,Q=Math.ceil(w.height/this._source.tileSize)+1,ee=Math.floor(B*Q*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),le=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ee):ee;this._cache.setMaxSize(le)}handleWrapJump(w){let B=Math.round((w-(this._prevLng===void 0?w:this._prevLng))/360);if(this._prevLng=w,B){let Q={};for(let ee in this._tiles){let le=this._tiles[ee];le.tileID=le.tileID.unwrapTo(le.tileID.wrap+B),Q[le.tileID.key]=le}this._tiles=Q;for(let ee in this._timers)clearTimeout(this._timers[ee]),delete this._timers[ee];for(let ee in this._tiles)this._setTileReloadTimer(ee,this._tiles[ee])}}_updateCoveredAndRetainedTiles(w,B,Q,ee,le,ze){let Ze={},ut={},Mt=Object.keys(w),Jt=u.now();for(let $t of Mt){let mr=w[$t],Cr=this._tiles[$t];if(!Cr||Cr.fadeEndTime!==0&&Cr.fadeEndTime<=Jt)continue;let ve=this.findLoadedParent(mr,B),xe=this.findLoadedSibling(mr),Ie=ve||xe||null;Ie&&(this._addTile(Ie.tileID),Ze[Ie.tileID.key]=Ie.tileID),ut[$t]=mr}this._retainLoadedChildren(ut,ee,Q,w);for(let $t in Ze)w[$t]||(this._coveredTiles[$t]=!0,w[$t]=Ze[$t]);if(ze){let $t={},mr={};for(let Cr of le)this._tiles[Cr.key].hasData()?$t[Cr.key]=Cr:mr[Cr.key]=Cr;for(let Cr in mr){let ve=mr[Cr].children(this._source.maxzoom);this._tiles[ve[0].key]&&this._tiles[ve[1].key]&&this._tiles[ve[2].key]&&this._tiles[ve[3].key]&&($t[ve[0].key]=w[ve[0].key]=ve[0],$t[ve[1].key]=w[ve[1].key]=ve[1],$t[ve[2].key]=w[ve[2].key]=ve[2],$t[ve[3].key]=w[ve[3].key]=ve[3],delete mr[Cr])}for(let Cr in mr){let ve=mr[Cr],xe=this.findLoadedParent(ve,this._source.minzoom),Ie=this.findLoadedSibling(ve),qe=xe||Ie||null;if(qe){$t[qe.tileID.key]=w[qe.tileID.key]=qe.tileID;for(let Qe in $t)$t[Qe].isChildOf(qe.tileID)&&delete $t[Qe]}}for(let Cr in this._tiles)$t[Cr]||(this._coveredTiles[Cr]=!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(Jt=>new a.S(Jt.canonical.z,Jt.wrap,Jt.canonical.z,Jt.canonical.x,Jt.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(Jt=>this._source.hasTile(Jt)))):Q=[];let ee=w.coveringZoomLevel(this._source),le=Math.max(ee-pt.maxOverzooming,this._source.minzoom),ze=Math.max(ee+pt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Jt={};for(let $t of Q)if($t.canonical.z>this._source.minzoom){let mr=$t.scaledTo($t.canonical.z-1);Jt[mr.key]=mr;let Cr=$t.scaledTo(Math.max(this._source.minzoom,Math.min($t.canonical.z,5)));Jt[Cr.key]=Cr}Q=Q.concat(Object.values(Jt))}let Ze=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Ze&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let ut=this._updateRetainedTiles(Q,ee);or(this._source.type)&&this._updateCoveredAndRetainedTiles(ut,le,ze,ee,Q,B);for(let Jt in ut)this._tiles[Jt].clearFadeHold();let Mt=a.ab(this._tiles,ut);for(let Jt of Mt){let $t=this._tiles[Jt];$t.hasSymbolBuckets&&!$t.holdingForFade()?$t.setHoldDuration(this.map._fadeDuration):$t.hasSymbolBuckets&&!$t.symbolFadeFinished()||this._removeTile(Jt)}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={},ze=Math.max(B-pt.maxOverzooming,this._source.minzoom),Ze=Math.max(B+pt.maxUnderzooming,this._source.minzoom),ut={};for(let Mt of w){let Jt=this._addTile(Mt);ee[Mt.key]=Mt,Jt.hasData()||B<this._source.maxzoom&&(ut[Mt.key]=Mt)}this._retainLoadedChildren(ut,B,Ze,ee);for(let Mt of w){let Jt=this._tiles[Mt.key];if(Jt.hasData())continue;if(B+1>this._source.maxzoom){let mr=Mt.children(this._source.maxzoom)[0],Cr=this.getTile(mr);if(Cr&&Cr.hasData()){ee[mr.key]=mr;continue}}else{let mr=Mt.children(this._source.maxzoom);if(ee[mr[0].key]&&ee[mr[1].key]&&ee[mr[2].key]&&ee[mr[3].key])continue}let $t=Jt.wasRequested();for(let mr=Mt.overscaledZ-1;mr>=ze;--mr){let Cr=Mt.scaledTo(mr);if(le[Cr.key])break;if(le[Cr.key]=!0,Jt=this.getTile(Cr),!Jt&&$t&&(Jt=this._addTile(Cr)),Jt){let ve=Jt.hasData();if((ve||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||$t)&&(ee[Cr.key]=Cr),$t=Jt.wasRequested(),ve)break}}}return ee}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let w in this._tiles){let B=[],Q,ee=this._tiles[w].tileID;for(;ee.overscaledZ>0;){if(ee.key in this._loadedParentTiles){Q=this._loadedParentTiles[ee.key];break}B.push(ee.key);let le=ee.scaledTo(ee.overscaledZ-1);if(Q=this._getLoadedTile(le),Q)break;ee=le}for(let le of B)this._loadedParentTiles[le]=Q}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let w in this._tiles){let B=this._tiles[w].tileID,Q=this._getLoadedTile(B);this._loadedSiblingTiles[B.key]=Q}}_addTile(w){let B=this._tiles[w.key];if(B)return B;B=this._cache.getAndRemove(w),B&&(this._setTileReloadTimer(w.key,B),B.tileID=w,this._state.initializeTileState(B,this.map?this.map.painter:null),this._cacheTimers[w.key]&&(clearTimeout(this._cacheTimers[w.key]),delete this._cacheTimers[w.key],this._setTileReloadTimer(w.key,B)));let Q=B;return B||(B=new Tt(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 ze=Q?le.getCameraQueryGeometry(w):w,Ze=w.map(ve=>le.pointCoordinate(ve,this.terrain)),ut=ze.map(ve=>le.pointCoordinate(ve,this.terrain)),Mt=this.getIds(),Jt=1/0,$t=1/0,mr=-1/0,Cr=-1/0;for(let ve of ut)Jt=Math.min(Jt,ve.x),$t=Math.min($t,ve.y),mr=Math.max(mr,ve.x),Cr=Math.max(Cr,ve.y);for(let ve=0;ve<Mt.length;ve++){let xe=this._tiles[Mt[ve]];if(xe.holdingForFade())continue;let Ie=xe.tileID,qe=Math.pow(2,le.zoom-xe.tileID.overscaledZ),Qe=B*xe.queryPadding*a.X/xe.tileSize/qe,Xe=[Ie.getTilePoint(new a.Z(Jt,$t)),Ie.getTilePoint(new a.Z(mr,Cr))];if(Xe[0].x-Qe<a.X&&Xe[0].y-Qe<a.X&&Xe[1].x+Qe>=0&&Xe[1].y+Qe>=0){let nt=Ze.map(jt=>Ie.getTilePoint(jt)),qt=ut.map(jt=>Ie.getTilePoint(jt));ee.push({tile:xe,tileID:Ie,queryGeometry:nt,cameraQueryGeometry:qt,scale:qe})}}return ee}getVisibleCoordinates(w){let B=this.getRenderableIds(w).map(Q=>this._tiles[Q].tileID);for(let Q of B)Q.posMatrix=this.transform.calculatePosMatrix(Q.toUnwrapped());return B}hasTransition(){if(this._source.hasTransition())return!0;if(or(this._source.type)){let w=u.now();for(let B in this._tiles)if(this._tiles[B].fadeEndTime>=w)return!0}return!1}setFeatureState(w,B,Q){this._state.updateState(w=w||"_geojsonTileLayer",B,Q)}removeFeatureState(w,B,Q){this._state.removeFeatureState(w=w||"_geojsonTileLayer",B,Q)}getFeatureState(w,B){return this._state.getState(w=w||"_geojsonTileLayer",B)}setDependencies(w,B,Q){let ee=this._tiles[w];ee&&ee.setDependencies(B,Q)}reloadTilesForDependencies(w,B){for(let Q in this._tiles)this._tiles[Q].hasDependency(w,B)&&this._reloadTile(Q,"reloading");this._cache.filter(Q=>!Q.hasDependency(w,B))}}function Xt(ue,w){let B=Math.abs(2*ue.wrap)-+(ue.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return ue.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-ue.canonical.y||w.canonical.x-ue.canonical.x}function or(ue){return ue==="raster"||ue==="image"||ue==="video"}pt.maxOverzooming=10,pt.maxUnderzooming=3;class _r{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,ze=this._distances[le],Ze=Q-ze,ut=Ze>0?(ee-ze)/Ze:0;return this.points[le].mult(1-ut).add(this.points[B].mult(ut))}}function Er(ue,w){let B=!0;return ue==="always"||ue!=="never"&&w!=="never"||(B=!1),B}class ei{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 ze=0;ze<this.xCellCount*this.yCellCount;ze++)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,ze){this.boxCells[le].push(ze)}_insertCircleCell(w,B,Q,ee,le,ze){this.circleCells[le].push(ze)}_query(w,B,Q,ee,le,ze,Ze){if(Q<0||w>this.width||ee<0||B>this.height)return[];let ut=[];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 Mt=0;Mt<this.boxKeys.length;Mt++)ut.push({key:this.boxKeys[Mt],x1:this.bboxes[4*Mt],y1:this.bboxes[4*Mt+1],x2:this.bboxes[4*Mt+2],y2:this.bboxes[4*Mt+3]});for(let Mt=0;Mt<this.circleKeys.length;Mt++){let Jt=this.circles[3*Mt],$t=this.circles[3*Mt+1],mr=this.circles[3*Mt+2];ut.push({key:this.circleKeys[Mt],x1:Jt-mr,y1:$t-mr,x2:Jt+mr,y2:$t+mr})}}else this._forEachCell(w,B,Q,ee,this._queryCell,ut,{hitTest:le,overlapMode:ze,seenUids:{box:{},circle:{}}},Ze);return ut}query(w,B,Q,ee){return this._query(w,B,Q,ee,!1,null)}hitTest(w,B,Q,ee,le,ze){return this._query(w,B,Q,ee,!0,le,ze).length>0}hitTestCircle(w,B,Q,ee,le){let ze=w-Q,Ze=w+Q,ut=B-Q,Mt=B+Q;if(Ze<0||ze>this.width||Mt<0||ut>this.height)return!1;let Jt=[];return this._forEachCell(ze,ut,Ze,Mt,this._queryCellCircle,Jt,{hitTest:!0,overlapMode:ee,circle:{x:w,y:B,radius:Q},seenUids:{box:{},circle:{}}},le),Jt.length>0}_queryCell(w,B,Q,ee,le,ze,Ze,ut){let{seenUids:Mt,hitTest:Jt,overlapMode:$t}=Ze,mr=this.boxCells[le];if(mr!==null){let ve=this.bboxes;for(let xe of mr)if(!Mt.box[xe]){Mt.box[xe]=!0;let Ie=4*xe,qe=this.boxKeys[xe];if(w<=ve[Ie+2]&&B<=ve[Ie+3]&&Q>=ve[Ie+0]&&ee>=ve[Ie+1]&&(!ut||ut(qe))&&(!Jt||!Er($t,qe.overlapMode))&&(ze.push({key:qe,x1:ve[Ie],y1:ve[Ie+1],x2:ve[Ie+2],y2:ve[Ie+3]}),Jt))return!0}}let Cr=this.circleCells[le];if(Cr!==null){let ve=this.circles;for(let xe of Cr)if(!Mt.circle[xe]){Mt.circle[xe]=!0;let Ie=3*xe,qe=this.circleKeys[xe];if(this._circleAndRectCollide(ve[Ie],ve[Ie+1],ve[Ie+2],w,B,Q,ee)&&(!ut||ut(qe))&&(!Jt||!Er($t,qe.overlapMode))){let Qe=ve[Ie],Xe=ve[Ie+1],nt=ve[Ie+2];if(ze.push({key:qe,x1:Qe-nt,y1:Xe-nt,x2:Qe+nt,y2:Xe+nt}),Jt)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,le,ze,Ze,ut){let{circle:Mt,seenUids:Jt,overlapMode:$t}=Ze,mr=this.boxCells[le];if(mr!==null){let ve=this.bboxes;for(let xe of mr)if(!Jt.box[xe]){Jt.box[xe]=!0;let Ie=4*xe,qe=this.boxKeys[xe];if(this._circleAndRectCollide(Mt.x,Mt.y,Mt.radius,ve[Ie+0],ve[Ie+1],ve[Ie+2],ve[Ie+3])&&(!ut||ut(qe))&&!Er($t,qe.overlapMode))return ze.push(!0),!0}}let Cr=this.circleCells[le];if(Cr!==null){let ve=this.circles;for(let xe of Cr)if(!Jt.circle[xe]){Jt.circle[xe]=!0;let Ie=3*xe,qe=this.circleKeys[xe];if(this._circlesCollide(ve[Ie],ve[Ie+1],ve[Ie+2],Mt.x,Mt.y,Mt.radius)&&(!ut||ut(qe))&&!Er($t,qe.overlapMode))return ze.push(!0),!0}}}_forEachCell(w,B,Q,ee,le,ze,Ze,ut){let Mt=this._convertToXCellCoord(w),Jt=this._convertToYCellCoord(B),$t=this._convertToXCellCoord(Q),mr=this._convertToYCellCoord(ee);for(let Cr=Mt;Cr<=$t;Cr++)for(let ve=Jt;ve<=mr;ve++)if(le.call(this,w,B,Q,ee,this.xCellCount*ve+Cr,ze,Ze,ut))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,ze){let Ze=ee-w,ut=le-B,Mt=Q+ze;return Mt*Mt>Ze*Ze+ut*ut}_circleAndRectCollide(w,B,Q,ee,le,ze,Ze){let ut=(ze-ee)/2,Mt=Math.abs(w-(ee+ut));if(Mt>ut+Q)return!1;let Jt=(Ze-le)/2,$t=Math.abs(B-(le+Jt));if($t>Jt+Q)return!1;if(Mt<=ut||$t<=Jt)return!0;let mr=Mt-ut,Cr=$t-Jt;return mr*mr+Cr*Cr<=Q*Q}}function qr(ue,w,B,Q,ee){let le=a.H();return w?(a.K(le,le,[1/ee,1/ee,1]),B||a.ad(le,le,Q.angle)):a.L(le,Q.labelPlaneMatrix,ue),le}function jr(ue,w,B,Q,ee){if(w){let le=a.ae(ue);return a.K(le,le,[ee,ee,1]),B||a.ad(le,le,-Q.angle),le}return Q.glCoordMatrix}function gt(ue,w,B,Q){let ee;Q?(ee=[ue,w,Q(ue,w),1],a.af(ee,ee,B)):(ee=[ue,w,0,1],ai(ee,ee,B));let le=ee[3];return{point:new a.P(ee[0]/le,ee[1]/le),signedDistanceFromCamera:le,isOccluded:!1}}function Ge(ue,w){return .5+ue/w*.5}function Je(ue,w){return ue.x>=-w[0]&&ue.x<=w[0]&&ue.y>=-w[1]&&ue.y<=w[1]}function We(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr,ve){let xe=Q?ue.textSizeData:ue.iconSizeData,Ie=a.ag(xe,B.transform.zoom),qe=[256/B.width*2+1,256/B.height*2+1],Qe=Q?ue.text.dynamicLayoutVertexArray:ue.icon.dynamicLayoutVertexArray;Qe.clear();let Xe=ue.lineVertexArray,nt=Q?ue.text.placedSymbolArray:ue.icon.placedSymbolArray,qt=B.transform.width/B.transform.height,jt=!1;for(let ar=0;ar<nt.length;ar++){let fr=nt.get(ar);if(fr.hidden||fr.writingMode===a.ah.vertical&&!jt){Pi(fr.numGlyphs,Qe);continue}jt=!1;let br=gt(fr.anchorX,fr.anchorY,w,ve);if(!Je(br.point,qe)){Pi(fr.numGlyphs,Qe);continue}let Fr=Ge(B.transform.cameraToCenterDistance,br.signedDistanceFromCamera),Hr=a.ai(xe,Ie,fr),ri=ze?Hr/Fr:Hr*Fr,Ci={getElevation:ve,labelPlaneMatrix:ee,lineVertexArray:Xe,pitchWithMap:ze,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:Mt,tileAnchorPoint:new a.P(fr.anchorX,fr.anchorY),unwrappedTileID:Jt,width:$t,height:mr,translation:Cr},cn=At(Ci,fr,ri,!1,Ze,w,le,ue.glyphOffsetArray,Qe,qt,ut);jt=cn.useVertical,(cn.notEnoughRoom||jt||cn.needsFlipping&&At(Ci,fr,ri,!0,Ze,w,le,ue.glyphOffsetArray,Qe,qt,ut).notEnoughRoom)&&Pi(fr.numGlyphs,Qe)}Q?ue.text.dynamicLayoutVertexBuffer.updateData(Qe):ue.icon.dynamicLayoutVertexBuffer.updateData(Qe)}function et(ue,w,B,Q,ee,le,ze,Ze){let ut=le.glyphStartIndex+le.numGlyphs,Mt=le.lineStartIndex,Jt=le.lineStartIndex+le.lineLength,$t=w.getoffsetX(le.glyphStartIndex),mr=w.getoffsetX(ut-1),Cr=Yr(ue*$t,B,Q,ee,le.segment,Mt,Jt,Ze,ze);if(!Cr)return null;let ve=Yr(ue*mr,B,Q,ee,le.segment,Mt,Jt,Ze,ze);return ve?Ze.projectionCache.anyProjectionOccluded?null:{first:Cr,last:ve}:null}function xt(ue,w,B,Q){return ue===a.ah.horizontal&&Math.abs(B.y-w.y)>Math.abs(B.x-w.x)*Q?{useVertical:!0}:(ue===a.ah.vertical?w.y<B.y:w.x>B.x)?{needsFlipping:!0}:null}function At(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt){let $t=B/24,mr=w.lineOffsetX*$t,Cr=w.lineOffsetY*$t,ve;if(w.numGlyphs>1){let xe=w.glyphStartIndex+w.numGlyphs,Ie=w.lineStartIndex,qe=w.lineStartIndex+w.lineLength,Qe=et($t,Ze,mr,Cr,Q,w,Jt,ue);if(!Qe)return{notEnoughRoom:!0};let Xe=gt(Qe.first.point.x,Qe.first.point.y,ze,ue.getElevation).point,nt=gt(Qe.last.point.x,Qe.last.point.y,ze,ue.getElevation).point;if(ee&&!Q){let qt=xt(w.writingMode,Xe,nt,Mt);if(qt)return qt}ve=[Qe.first];for(let qt=w.glyphStartIndex+1;qt<xe-1;qt++)ve.push(Yr($t*Ze.getoffsetX(qt),mr,Cr,Q,w.segment,Ie,qe,ue,Jt));ve.push(Qe.last)}else{if(ee&&!Q){let Ie=gt(ue.tileAnchorPoint.x,ue.tileAnchorPoint.y,le,ue.getElevation).point,qe=w.lineStartIndex+w.segment+1,Qe=new a.P(ue.lineVertexArray.getx(qe),ue.lineVertexArray.gety(qe)),Xe=gt(Qe.x,Qe.y,le,ue.getElevation),nt=Xe.signedDistanceFromCamera>0?Xe.point:function(jt,ar,fr,br,Fr,Hr){return Kt(jt,ar,fr,1,Fr,Hr)}(ue.tileAnchorPoint,Qe,Ie,0,le,ue),qt=xt(w.writingMode,Ie,nt,Mt);if(qt)return qt}let xe=Yr($t*Ze.getoffsetX(w.glyphStartIndex),mr,Cr,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,ue,Jt);if(!xe||ue.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ve=[xe]}for(let xe of ve)a.aj(ut,xe.point,xe.angle);return{}}function Kt(ue,w,B,Q,ee,le){let ze=ue.add(ue.sub(w)._unit()),Ze=ee!==void 0?gt(ze.x,ze.y,ee,le.getElevation).point:Sr(ze.x,ze.y,le).point,ut=B.sub(Ze);return B.add(ut._mult(Q/ut.mag()))}function er(ue,w,B){let Q=w.projectionCache;if(Q.projections[ue])return Q.projections[ue];let ee=new a.P(w.lineVertexArray.getx(ue),w.lineVertexArray.gety(ue)),le=Sr(ee.x,ee.y,w);if(le.signedDistanceFromCamera>0)return Q.projections[ue]=le.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||le.isOccluded,le.point;let ze=ue-B.direction;return function(Ze,ut,Mt,Jt,$t){return Kt(Ze,ut,Mt,Jt,void 0,$t)}(B.distanceFromAnchor===0?w.tileAnchorPoint:new a.P(w.lineVertexArray.getx(ze),w.lineVertexArray.gety(ze)),ee,B.previousVertex,B.absOffsetX-B.distanceFromAnchor+1,w)}function Sr(ue,w,B){let Q=ue+B.translation[0],ee=w+B.translation[1],le;return!B.pitchWithMap&&B.projection.useSpecialProjectionForSymbols?(le=B.projection.projectTileCoordinates(Q,ee,B.unwrappedTileID,B.getElevation),le.point.x=(.5*le.point.x+.5)*B.width,le.point.y=(.5*-le.point.y+.5)*B.height):(le=gt(Q,ee,B.labelPlaneMatrix,B.getElevation),le.isOccluded=!1),le}function Gr(ue,w,B){return ue._unit()._perp()._mult(w*B)}function Ir(ue,w,B,Q,ee,le,ze,Ze,ut){if(Ze.projectionCache.offsets[ue])return Ze.projectionCache.offsets[ue];let Mt=B.add(w);if(ue+ut.direction<Q||ue+ut.direction>=ee)return Ze.projectionCache.offsets[ue]=Mt,Mt;let Jt=er(ue+ut.direction,Ze,ut),$t=Gr(Jt.sub(B),ze,ut.direction),mr=B.add($t),Cr=Jt.add($t);return Ze.projectionCache.offsets[ue]=a.ak(le,Mt,mr,Cr)||Mt,Ze.projectionCache.offsets[ue]}function Yr(ue,w,B,Q,ee,le,ze,Ze,ut){let Mt=Q?ue-w:ue+w,Jt=Mt>0?1:-1,$t=0;Q&&(Jt*=-1,$t=Math.PI),Jt<0&&($t+=Math.PI);let mr,Cr=Jt>0?le+ee:le+ee+1;Ze.projectionCache.cachedAnchorPoint?mr=Ze.projectionCache.cachedAnchorPoint:(mr=Sr(Ze.tileAnchorPoint.x,Ze.tileAnchorPoint.y,Ze).point,Ze.projectionCache.cachedAnchorPoint=mr);let ve,xe,Ie=mr,qe=mr,Qe=0,Xe=0,nt=Math.abs(Mt),qt=[],jt;for(;Qe+Xe<=nt;){if(Cr+=Jt,Cr<le||Cr>=ze)return null;Qe+=Xe,qe=Ie,xe=ve;let br={absOffsetX:nt,direction:Jt,distanceFromAnchor:Qe,previousVertex:qe};if(Ie=er(Cr,Ze,br),B===0)qt.push(qe),jt=Ie.sub(qe);else{let Fr,Hr=Ie.sub(qe);Fr=Hr.mag()===0?Gr(er(Cr+Jt,Ze,br).sub(Ie),B,Jt):Gr(Hr,B,Jt),xe||(xe=qe.add(Fr)),ve=Ir(Cr,Fr,Ie,le,ze,xe,B,Ze,br),qt.push(xe),jt=ve.sub(xe)}Xe=jt.mag()}let ar=jt._mult((nt-Qe)/Xe)._add(xe||qe),fr=$t+Math.atan2(Ie.y-qe.y,Ie.x-qe.x);return qt.push(ar),{point:ar,angle:ut?fr:0,path:qt}}let _i=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Pi(ue,w){for(let B=0;B<ue;B++){let Q=w.length;w.resize(Q+4),w.float32.set(_i,3*Q)}}function ai(ue,w,B){let Q=w[0],ee=w[1];return ue[0]=B[0]*Q+B[4]*ee+B[12],ue[1]=B[1]*Q+B[5]*ee+B[13],ue[3]=B[3]*Q+B[7]*ee+B[15],ue}let mi=100;class un{constructor(w,B,Q=new ei(w.width+200,w.height+200,25),ee=new ei(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+mi,this.screenBottomBoundary=w.height+mi,this.gridRightBoundary=w.width+200,this.gridBottomBoundary=w.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t){let mr=w.anchorPointX+ut[0],Cr=w.anchorPointY+ut[1],ve=this.projectAndGetPerspectiveRatio(ee,mr,Cr,le,Jt),xe=Q*ve.perspectiveRatio,Ie;if(ze||Ze)Ie=this._projectCollisionBox(w,xe,ee,le,ze,Ze,ut,ve,Jt,$t);else{let qt=ve.point.x+($t?$t.x*xe:0),jt=ve.point.y+($t?$t.y*xe:0);Ie={allPointsOccluded:!1,box:[qt+w.x1*xe,jt+w.y1*xe,qt+w.x2*xe,jt+w.y2*xe]}}let[qe,Qe,Xe,nt]=Ie.box;return this.mapProjection.useSpecialProjectionForSymbols&&(ze?Ie.allPointsOccluded:this.mapProjection.isOccluded(mr,Cr,le))||ve.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(qe,Qe,Xe,nt)||B!=="always"&&this.grid.hitTest(qe,Qe,Xe,nt,B,Mt)?{box:[qe,Qe,Xe,nt],placeable:!1,offscreen:!1}:{box:[qe,Qe,Xe,nt],placeable:!0,offscreen:this.isOffscreen(qe,Qe,Xe,nt)}}placeCollisionCircles(w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr,ve,xe,Ie){let qe=[],Qe=new a.P(B.anchorX,B.anchorY),Xe=this.getPerspectiveRatio(ze,Qe.x,Qe.y,Ze,Ie),nt=($t?le/Xe:le*Xe)/a.ap,qt={getElevation:Ie,labelPlaneMatrix:ut,lineVertexArray:Q,pitchWithMap:$t,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:Qe,unwrappedTileID:Ze,width:this.transform.width,height:this.transform.height,translation:xe},jt=et(nt,ee,B.lineOffsetX*nt,B.lineOffsetY*nt,!1,B,!1,qt),ar=!1,fr=!1,br=!0;if(jt){let Fr=.5*Cr*Xe+ve,Hr=new a.P(-100,-100),ri=new a.P(this.screenRightBoundary,this.screenBottomBoundary),Ci=new _r,cn=jt.first,sn=jt.last,Ln=[];for(let fa=cn.path.length-1;fa>=1;fa--)Ln.push(cn.path[fa]);for(let fa=1;fa<sn.path.length;fa++)Ln.push(sn.path[fa]);let Yn=2.5*Fr;if(Mt){let fa=this.projectPathToScreenSpace(Ln,qt,Mt);Ln=fa.some($a=>$a.signedDistanceFromCamera<=0)?[]:fa.map($a=>$a.point)}let Aa=[];if(Ln.length>0){let fa=Ln[0].clone(),$a=Ln[0].clone();for(let Co=1;Co<Ln.length;Co++)fa.x=Math.min(fa.x,Ln[Co].x),fa.y=Math.min(fa.y,Ln[Co].y),$a.x=Math.max($a.x,Ln[Co].x),$a.y=Math.max($a.y,Ln[Co].y);Aa=fa.x>=Hr.x&&$a.x<=ri.x&&fa.y>=Hr.y&&$a.y<=ri.y?[Ln]:$a.x<Hr.x||fa.x>ri.x||$a.y<Hr.y||fa.y>ri.y?[]:a.al([Ln],Hr.x,Hr.y,ri.x,ri.y)}for(let fa of Aa){Ci.reset(fa,.25*Fr);let $a=0;$a=Ci.length<=.5*Fr?1:Math.ceil(Ci.paddedLength/Yn)+1;for(let Co=0;Co<$a;Co++){let Qa=Co/Math.max($a-1,1),mo=Ci.lerp(Qa),Bo=mo.x+mi,Ps=mo.y+mi;qe.push(Bo,Ps,Fr,0);let Ts=Bo-Fr,wo=Ps-Fr,To=Bo+Fr,hl=Ps+Fr;if(br=br&&this.isOffscreen(Ts,wo,To,hl),fr=fr||this.isInsideGrid(Ts,wo,To,hl),w!=="always"&&this.grid.hitTestCircle(Bo,Ps,Fr,w,mr)&&(ar=!0,!Jt))return{circles:[],offscreen:!1,collisionDetected:ar}}}}return{circles:!Jt&&ar||!fr||Xe<this.perspectiveRatioCutoff?[]:qe,offscreen:br,collisionDetected:ar}}projectPathToScreenSpace(w,B,Q){return w.map(ee=>gt(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,ze=-1/0;for(let Jt of w){let $t=new a.P(Jt.x+mi,Jt.y+mi);Q=Math.min(Q,$t.x),ee=Math.min(ee,$t.y),le=Math.max(le,$t.x),ze=Math.max(ze,$t.y),B.push($t)}let Ze=this.grid.query(Q,ee,le,ze).concat(this.ignoredGrid.query(Q,ee,le,ze)),ut={},Mt={};for(let Jt of Ze){let $t=Jt.key;if(ut[$t.bucketInstanceId]===void 0&&(ut[$t.bucketInstanceId]={}),ut[$t.bucketInstanceId][$t.featureIndex])continue;let mr=[new a.P(Jt.x1,Jt.y1),new a.P(Jt.x2,Jt.y1),new a.P(Jt.x2,Jt.y2),new a.P(Jt.x1,Jt.y2)];a.am(B,mr)&&(ut[$t.bucketInstanceId][$t.featureIndex]=!0,Mt[$t.bucketInstanceId]===void 0&&(Mt[$t.bucketInstanceId]=[]),Mt[$t.bucketInstanceId].push($t.featureIndex))}return Mt}insertCollisionBox(w,B,Q,ee,le,ze){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:le,collisionGroupID:ze,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,le,ze){let Ze=Q?this.ignoredGrid:this.grid,ut={bucketInstanceId:ee,featureIndex:le,collisionGroupID:ze,overlapMode:B};for(let Mt=0;Mt<w.length;Mt+=4)Ze.insertCircle(ut,w[Mt],w[Mt+1],w[Mt+2])}projectAndGetPerspectiveRatio(w,B,Q,ee,le){let ze;le?(ze=[B,Q,le(B,Q),1],a.af(ze,ze,w)):(ze=[B,Q,0,1],ai(ze,ze,w));let Ze=ze[3];return{point:new a.P((ze[0]/Ze+1)/2*this.transform.width+mi,(-ze[1]/Ze+1)/2*this.transform.height+mi),perspectiveRatio:.5+this.transform.cameraToCenterDistance/Ze*.5,isOccluded:!1,signedDistanceFromCamera:Ze}}getPerspectiveRatio(w,B,Q,ee,le){let ze=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(B,Q,ee,le):gt(B,Q,w,le);return .5+this.transform.cameraToCenterDistance/ze.signedDistanceFromCamera*.5}isOffscreen(w,B,Q,ee){return Q<mi||w>=this.screenRightBoundary||ee<mi||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,ze,Ze,ut,Mt,Jt){let $t=new a.P(1,0),mr=new a.P(0,1),Cr=new a.P(w.anchorPointX+Ze[0],w.anchorPointY+Ze[1]);if(ze&&!le){let br=this.projectAndGetPerspectiveRatio(Q,Cr.x+1,Cr.y,ee,Mt).point.sub(ut.point).unit(),Fr=Math.atan(br.y/br.x)+(br.x<0?Math.PI:0),Hr=Math.sin(Fr),ri=Math.cos(Fr);$t=new a.P(ri,Hr),mr=new a.P(-Hr,ri)}else if(!ze&&le){let br=-this.transform.angle,Fr=Math.sin(br),Hr=Math.cos(br);$t=new a.P(Hr,Fr),mr=new a.P(-Fr,Hr)}let ve=ut.point,xe=B;if(le){ve=Cr;let br=this.transform.zoom-Math.floor(this.transform.zoom);xe=Math.pow(2,-br),xe*=this.mapProjection.getPitchedTextCorrection(this.transform,Cr,ee),Jt||(xe*=a.ac(.5+ut.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}Jt&&(ve=ve.add($t.mult(Jt.x*xe)).add(mr.mult(Jt.y*xe)));let Ie=w.x1*xe,qe=w.x2*xe,Qe=(Ie+qe)/2,Xe=w.y1*xe,nt=w.y2*xe,qt=(Xe+nt)/2,jt=[{offsetX:Ie,offsetY:Xe},{offsetX:Qe,offsetY:Xe},{offsetX:qe,offsetY:Xe},{offsetX:qe,offsetY:qt},{offsetX:qe,offsetY:nt},{offsetX:Qe,offsetY:nt},{offsetX:Ie,offsetY:nt},{offsetX:Ie,offsetY:qt}],ar=[];for(let{offsetX:br,offsetY:Fr}of jt)ar.push(new a.P(ve.x+$t.x*br+mr.x*Fr,ve.y+$t.y*br+mr.y*Fr));let fr=!1;if(le){let br=ar.map(Fr=>this.projectAndGetPerspectiveRatio(Q,Fr.x,Fr.y,ee,Mt));fr=br.some(Fr=>!Fr.isOccluded),ar=br.map(Fr=>Fr.point)}else fr=!0;return{box:a.ao(ar),allPointsOccluded:!fr}}}function Fn(ue,w,B){return w*(a.X/(ue.tileSize*Math.pow(2,B-ue.tileID.overscaledZ)))}class An{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 Hn{constructor(w,B,Q,ee,le){this.text=new An(w?w.text:null,B,Q,le),this.icon=new An(w?w.icon:null,B,ee,le)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Qn{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class Vi{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class Kn{constructor(w,B,Q,ee,le){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=le}}class Jn{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 Gt(ue,w,B,Q,ee){let{horizontalAlign:le,verticalAlign:ze}=a.au(ue);return new a.P(-(le-.5)*w+Q[0]*ee,-(ze-.5)*B+Q[1]*ee)}class wt{constructor(w,B,Q,ee,le,ze){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new un(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new Jn(le),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=ze,ze&&(ze.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),ze=Q.latestFeatureIndex;if(!le||!ze||B.id!==le.layerIds[0])return;let Ze=Q.collisionBoxArray,ut=le.layers[0].layout,Mt=le.layers[0].paint,Jt=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),$t=Q.tileSize/a.X,mr=Q.tileID.toUnwrapped(),Cr=this.transform.calculatePosMatrix(mr),ve=ut.get("text-pitch-alignment")==="map",xe=ut.get("text-rotation-alignment")==="map",Ie=Fn(Q,1,this.transform.zoom),qe=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Mt.get("text-translate"),Mt.get("text-translate-anchor")),Qe=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Mt.get("icon-translate"),Mt.get("icon-translate-anchor")),Xe=qr(Cr,ve,xe,this.transform,Ie),nt=null;if(ve){let jt=jr(Cr,ve,xe,this.transform,Ie);nt=a.L([],this.transform.labelPlaneMatrix,jt)}this.retainedQueryData[le.bucketInstanceId]=new Kn(le.bucketInstanceId,ze,le.sourceLayerIndex,le.index,Q.tileID);let qt={bucket:le,layout:ut,translationText:qe,translationIcon:Qe,posMatrix:Cr,unwrappedTileID:mr,textLabelPlaneMatrix:Xe,labelToScreenMatrix:nt,scale:Jt,textPixelRatio:$t,holdingForFade:Q.holdingForFade(),collisionBoxArray:Ze,partiallyEvaluatedTextSize:a.ag(le.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(le.sourceID)};if(ee)for(let jt of le.sortKeyRanges){let{sortKey:ar,symbolInstanceStart:fr,symbolInstanceEnd:br}=jt;w.push({sortKey:ar,symbolInstanceStart:fr,symbolInstanceEnd:br,parameters:qt})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:le.symbolInstances.length,parameters:qt})}attemptAnchorPlacement(w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr,ve,xe,Ie,qe,Qe,Xe){let nt=a.aq[w.textAnchor],qt=[w.textOffset0,w.textOffset1],jt=Gt(nt,Q,ee,qt,le),ar=this.collisionIndex.placeCollisionBox(B,mr,ut,Mt,Jt,Ze,ze,Ie,$t.predicate,Xe,jt);if((!Qe||this.collisionIndex.placeCollisionBox(Qe,mr,ut,Mt,Jt,Ze,ze,qe,$t.predicate,Xe,jt).placeable)&&ar.placeable){let fr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Cr.crossTileID]&&this.prevPlacement.placements[Cr.crossTileID]&&this.prevPlacement.placements[Cr.crossTileID].text&&(fr=this.prevPlacement.variableOffsets[Cr.crossTileID].anchor),Cr.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Cr.crossTileID]={textOffset:qt,width:Q,height:ee,anchor:nt,textBoxScale:le,prevAnchor:fr},this.markUsedJustification(ve,nt,Cr,xe),ve.allowVerticalPlacement&&(this.markUsedOrientation(ve,xe,Cr),this.placedOrientations[Cr.crossTileID]=xe),{shift:jt,placedGlyphBoxes:ar}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:le,translationText:ze,translationIcon:Ze,posMatrix:ut,unwrappedTileID:Mt,textLabelPlaneMatrix:Jt,labelToScreenMatrix:$t,textPixelRatio:mr,holdingForFade:Cr,collisionBoxArray:ve,partiallyEvaluatedTextSize:xe,collisionGroup:Ie}=w.parameters,qe=le.get("text-optional"),Qe=le.get("icon-optional"),Xe=a.ar(le,"text-overlap","text-allow-overlap"),nt=Xe==="always",qt=a.ar(le,"icon-overlap","icon-allow-overlap"),jt=qt==="always",ar=le.get("text-rotation-alignment")==="map",fr=le.get("text-pitch-alignment")==="map",br=le.get("icon-text-fit")!=="none",Fr=le.get("symbol-z-order")==="viewport-y",Hr=nt&&(jt||!ee.hasIconData()||Qe),ri=jt&&(nt||!ee.hasTextData()||qe);!ee.collisionArrays&&ve&&ee.deserializeCollisionBoxes(ve);let Ci=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),cn=(sn,Ln,Yn)=>{var Aa,fa;if(B[sn.crossTileID])return;if(Cr)return void(this.placements[sn.crossTileID]=new Qn(!1,!1,!1));let $a=!1,Co=!1,Qa=!0,mo=null,Bo={box:null,placeable:!1,offscreen:null},Ps={box:null,placeable:!1,offscreen:null},Ts=null,wo=null,To=null,hl=0,Ul=0,Lu=0;Ln.textFeatureIndex?hl=Ln.textFeatureIndex:sn.useRuntimeCollisionCircles&&(hl=sn.featureIndex),Ln.verticalTextFeatureIndex&&(Ul=Ln.verticalTextFeatureIndex);let au=Ln.textBox;if(au){let Tl=Te=>{let Oe=a.ah.horizontal;if(ee.allowVerticalPlacement&&!Te&&this.prevPlacement){let Ve=this.prevPlacement.placedOrientations[sn.crossTileID];Ve&&(this.placedOrientations[sn.crossTileID]=Ve,Oe=Ve,this.markUsedOrientation(ee,Oe,sn))}return Oe},Al=(Te,Oe)=>{if(ee.allowVerticalPlacement&&sn.numVerticalGlyphVertices>0&&Ln.verticalTextBox){for(let Ve of ee.writingModes)if(Ve===a.ah.vertical?(Bo=Oe(),Ps=Bo):Bo=Te(),Bo&&Bo.placeable)break}else Bo=Te()},X=sn.textAnchorOffsetStartIndex,se=sn.textAnchorOffsetEndIndex;if(se===X){let Te=(Oe,Ve)=>{let Ye=this.collisionIndex.placeCollisionBox(Oe,Xe,mr,ut,Mt,fr,ar,ze,Ie.predicate,Ci);return Ye&&Ye.placeable&&(this.markUsedOrientation(ee,Ve,sn),this.placedOrientations[sn.crossTileID]=Ve),Ye};Al(()=>Te(au,a.ah.horizontal),()=>{let Oe=Ln.verticalTextBox;return ee.allowVerticalPlacement&&sn.numVerticalGlyphVertices>0&&Oe?Te(Oe,a.ah.vertical):{box:null,offscreen:null}}),Tl(Bo&&Bo.placeable)}else{let Te=a.aq[(fa=(Aa=this.prevPlacement)===null||Aa===void 0?void 0:Aa.variableOffsets[sn.crossTileID])===null||fa===void 0?void 0:fa.anchor],Oe=(Ye,Pt,at)=>{let Wt=Ye.x2-Ye.x1,dr=Ye.y2-Ye.y1,pr=sn.textBoxScale,Ur=br&&qt==="never"?Pt:null,zr=null,gi=Xe==="never"?1:2,xi="never";Te&&gi++;for(let Wr=0;Wr<gi;Wr++){for(let ii=X;ii<se;ii++){let di=ee.textAnchorOffsets.get(ii);if(Te&&di.textAnchor!==Te)continue;let Li=this.attemptAnchorPlacement(di,Ye,Wt,dr,pr,ar,fr,mr,ut,Mt,Ie,xi,sn,ee,at,ze,Ze,Ur,Ci);if(Li&&(zr=Li.placedGlyphBoxes,zr&&zr.placeable))return $a=!0,mo=Li.shift,zr}Te?Te=null:xi=Xe}return Q&&!zr&&(zr={box:this.collisionIndex.placeCollisionBox(au,"always",mr,ut,Mt,fr,ar,ze,Ie.predicate,Ci,new a.P(0,0)).box,offscreen:!1,placeable:!1}),zr};Al(()=>Oe(au,Ln.iconBox,a.ah.horizontal),()=>{let Ye=Ln.verticalTextBox;return ee.allowVerticalPlacement&&(!Bo||!Bo.placeable)&&sn.numVerticalGlyphVertices>0&&Ye?Oe(Ye,Ln.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Bo&&($a=Bo.placeable,Qa=Bo.offscreen);let Ve=Tl(Bo&&Bo.placeable);if(!$a&&this.prevPlacement){let Ye=this.prevPlacement.variableOffsets[sn.crossTileID];Ye&&(this.variableOffsets[sn.crossTileID]=Ye,this.markUsedJustification(ee,Ye.anchor,sn,Ve))}}}if(Ts=Bo,$a=Ts&&Ts.placeable,Qa=Ts&&Ts.offscreen,sn.useRuntimeCollisionCircles){let Tl=ee.text.placedSymbolArray.get(sn.centerJustifiedTextSymbolIndex),Al=a.ai(ee.textSizeData,xe,Tl),X=le.get("text-padding");wo=this.collisionIndex.placeCollisionCircles(Xe,Tl,ee.lineVertexArray,ee.glyphOffsetArray,Al,ut,Mt,Jt,$t,Q,fr,Ie.predicate,sn.collisionCircleDiameter,X,ze,Ci),wo.circles.length&&wo.collisionDetected&&!Q&&a.w("Collisions detected, but collision boxes are not shown"),$a=nt||wo.circles.length>0&&!wo.collisionDetected,Qa=Qa&&wo.offscreen}if(Ln.iconFeatureIndex&&(Lu=Ln.iconFeatureIndex),Ln.iconBox){let Tl=Al=>this.collisionIndex.placeCollisionBox(Al,qt,mr,ut,Mt,fr,ar,Ze,Ie.predicate,Ci,br&&mo?mo:void 0);Ps&&Ps.placeable&&Ln.verticalIconBox?(To=Tl(Ln.verticalIconBox),Co=To.placeable):(To=Tl(Ln.iconBox),Co=To.placeable),Qa=Qa&&To.offscreen}let Js=qe||sn.numHorizontalGlyphVertices===0&&sn.numVerticalGlyphVertices===0,eu=Qe||sn.numIconVertices===0;Js||eu?eu?Js||(Co=Co&&$a):$a=Co&&$a:Co=$a=Co&&$a;let dc=Co&&To.placeable;if($a&&Ts.placeable&&this.collisionIndex.insertCollisionBox(Ts.box,Xe,le.get("text-ignore-placement"),ee.bucketInstanceId,Ps&&Ps.placeable&&Ul?Ul:hl,Ie.ID),dc&&this.collisionIndex.insertCollisionBox(To.box,qt,le.get("icon-ignore-placement"),ee.bucketInstanceId,Lu,Ie.ID),wo&&$a&&this.collisionIndex.insertCollisionCircles(wo.circles,Xe,le.get("text-ignore-placement"),ee.bucketInstanceId,hl,Ie.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,Yn,Ln,Ts,To,wo),sn.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[sn.crossTileID]=new Qn($a||Hr,Co||ri,Qa||ee.justReloaded),B[sn.crossTileID]=!0};if(Fr){if(w.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let sn=ee.getSortedSymbolIndexes(this.transform.angle);for(let Ln=sn.length-1;Ln>=0;--Ln){let Yn=sn[Ln];cn(ee.symbolInstances.get(Yn),ee.collisionArrays[Yn],Yn)}}else for(let sn=w.symbolInstanceStart;sn<w.symbolInstanceEnd;sn++)cn(ee.symbolInstances.get(sn),ee.collisionArrays[sn],sn);if(Q&&ee.bucketInstanceId in this.collisionCircleArrays){let sn=this.collisionCircleArrays[ee.bucketInstanceId];a.as(sn.invProjMatrix,ut),sn.viewportMatrix=this.collisionIndex.getViewportMatrix()}ee.justReloaded=!1}storeCollisionData(w,B,Q,ee,le,ze){if(Q.textBox||Q.iconBox){let Ze,ut;this.collisionBoxArrays.has(w)?Ze=this.collisionBoxArrays.get(w):(Ze=new Map,this.collisionBoxArrays.set(w,Ze)),Ze.has(B)?ut=Ze.get(B):(ut={text:null,icon:null},Ze.set(B,ut)),Q.textBox&&(ut.text=ee.box),Q.iconBox&&(ut.icon=le.box)}if(ze){let Ze=this.collisionCircleArrays[w];Ze===void 0&&(Ze=this.collisionCircleArrays[w]=new Vi);for(let ut=0;ut<ze.circles.length;ut+=4)Ze.circles.push(ze.circles[ut+0]),Ze.circles.push(ze.circles[ut+1]),Ze.circles.push(ze.circles[ut+2]),Ze.circles.push(ze.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 ze=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex,Q.verticalPlacedTextSymbolIndex];for(let Ze of ze)Ze>=0&&(w.text.placedSymbolArray.get(Ze).crossTileID=le>=0&&Ze!==le?0:Q.crossTileID)}markUsedOrientation(w,B,Q){let ee=B===a.ah.horizontal||B===a.ah.horizontalOnly?B:0,le=B===a.ah.vertical?B:0,ze=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let Ze of ze)w.text.placedSymbolArray.get(Ze).placedOrientation=ee;Q.verticalPlacedTextSymbolIndex&&(w.text.placedSymbolArray.get(Q.verticalPlacedTextSymbolIndex).placedOrientation=le)}commit(w){this.commitTime=w,this.zoomAtLastRecencyCheck=this.transform.zoom;let B=this.prevPlacement,Q=!1;this.prevZoomAdjustment=B?B.zoomAdjustment(this.transform.zoom):0;let ee=B?B.symbolFadeChange(w):1,le=B?B.opacities:{},ze=B?B.variableOffsets:{},Ze=B?B.placedOrientations:{};for(let ut in this.placements){let Mt=this.placements[ut],Jt=le[ut];Jt?(this.opacities[ut]=new Hn(Jt,ee,Mt.text,Mt.icon),Q=Q||Mt.text!==Jt.text.placed||Mt.icon!==Jt.icon.placed):(this.opacities[ut]=new Hn(null,ee,Mt.text,Mt.icon,Mt.skipFade),Q=Q||Mt.text||Mt.icon)}for(let ut in le){let Mt=le[ut];if(!this.opacities[ut]){let Jt=new Hn(Mt,ee,!1,!1);Jt.isHidden()||(this.opacities[ut]=Jt,Q=Q||Mt.text.placed||Mt.icon.placed)}}for(let ut in ze)this.variableOffsets[ut]||!this.opacities[ut]||this.opacities[ut].isHidden()||(this.variableOffsets[ut]=ze[ut]);for(let ut in Ze)this.placedOrientations[ut]||!this.opacities[ut]||this.opacities[ut].isHidden()||(this.placedOrientations[ut]=Ze[ut]);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],ze=le.layout,Ze=new Hn(null,0,!1,!1,!0),ut=ze.get("text-allow-overlap"),Mt=ze.get("icon-allow-overlap"),Jt=le._unevaluatedLayout.hasValue("text-variable-anchor")||le._unevaluatedLayout.hasValue("text-variable-anchor-offset"),$t=ze.get("text-rotation-alignment")==="map",mr=ze.get("text-pitch-alignment")==="map",Cr=ze.get("icon-text-fit")!=="none",ve=new Hn(null,0,ut&&(Mt||!w.hasIconData()||ze.get("icon-optional")),Mt&&(ut||!w.hasTextData()||ze.get("text-optional")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let xe=(qe,Qe,Xe)=>{for(let nt=0;nt<Qe/4;nt++)qe.opacityVertexArray.emplaceBack(Xe);qe.hasVisibleVertices=qe.hasVisibleVertices||Xe!==fn},Ie=this.collisionBoxArrays.get(w.bucketInstanceId);for(let qe=0;qe<w.symbolInstances.length;qe++){let Qe=w.symbolInstances.get(qe),{numHorizontalGlyphVertices:Xe,numVerticalGlyphVertices:nt,crossTileID:qt}=Qe,jt=this.opacities[qt];Q[qt]?jt=Ze:jt||(jt=ve,this.opacities[qt]=jt),Q[qt]=!0;let ar=Qe.numIconVertices>0,fr=this.placedOrientations[Qe.crossTileID],br=fr===a.ah.vertical,Fr=fr===a.ah.horizontal||fr===a.ah.horizontalOnly;if(Xe>0||nt>0){let ri=en(jt.text);xe(w.text,Xe,br?fn:ri),xe(w.text,nt,Fr?fn:ri);let Ci=jt.text.isHidden();[Qe.rightJustifiedTextSymbolIndex,Qe.centerJustifiedTextSymbolIndex,Qe.leftJustifiedTextSymbolIndex].forEach(Ln=>{Ln>=0&&(w.text.placedSymbolArray.get(Ln).hidden=Ci||br?1:0)}),Qe.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(Qe.verticalPlacedTextSymbolIndex).hidden=Ci||Fr?1:0);let cn=this.variableOffsets[Qe.crossTileID];cn&&this.markUsedJustification(w,cn.anchor,Qe,fr);let sn=this.placedOrientations[Qe.crossTileID];sn&&(this.markUsedJustification(w,"left",Qe,sn),this.markUsedOrientation(w,sn,Qe))}if(ar){let ri=en(jt.icon),Ci=!(Cr&&Qe.verticalPlacedIconSymbolIndex&&br);Qe.placedIconSymbolIndex>=0&&(xe(w.icon,Qe.numIconVertices,Ci?ri:fn),w.icon.placedSymbolArray.get(Qe.placedIconSymbolIndex).hidden=jt.icon.isHidden()),Qe.verticalPlacedIconSymbolIndex>=0&&(xe(w.icon,Qe.numVerticalIconVertices,Ci?fn:ri),w.icon.placedSymbolArray.get(Qe.verticalPlacedIconSymbolIndex).hidden=jt.icon.isHidden())}let Hr=Ie&&Ie.has(qe)?Ie.get(qe):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let ri=w.collisionArrays[qe];if(ri){let Ci=new a.P(0,0);if(ri.textBox||ri.verticalTextBox){let cn=!0;if(Jt){let sn=this.variableOffsets[qt];sn?(Ci=Gt(sn.anchor,sn.width,sn.height,sn.textOffset,sn.textBoxScale),$t&&Ci._rotate(mr?this.transform.angle:-this.transform.angle)):cn=!1}if(ri.textBox||ri.verticalTextBox){let sn;ri.textBox&&(sn=br),ri.verticalTextBox&&(sn=Fr),rr(w.textCollisionBox.collisionVertexArray,jt.text.placed,!cn||sn,Hr.text,Ci.x,Ci.y)}}if(ri.iconBox||ri.verticalIconBox){let cn=!!(!Fr&&ri.verticalIconBox),sn;ri.iconBox&&(sn=cn),ri.verticalIconBox&&(sn=!cn),rr(w.iconCollisionBox.collisionVertexArray,jt.icon.placed,sn,Hr.icon,Cr?Ci.x:0,Cr?Ci.y:0)}}}}if(w.sortFeatures(this.transform.angle),this.retainedQueryData[w.bucketInstanceId]&&(this.retainedQueryData[w.bucketInstanceId].featureSortOrder=w.featureSortOrder),w.hasTextData()&&w.text.opacityVertexBuffer&&w.text.opacityVertexBuffer.updateData(w.text.opacityVertexArray),w.hasIconData()&&w.icon.opacityVertexBuffer&&w.icon.opacityVertexBuffer.updateData(w.icon.opacityVertexArray),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexBuffer&&w.iconCollisionBox.collisionVertexBuffer.updateData(w.iconCollisionBox.collisionVertexArray),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexBuffer&&w.textCollisionBox.collisionVertexBuffer.updateData(w.textCollisionBox.collisionVertexArray),w.text.opacityVertexArray.length!==w.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${w.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${w.text.layoutVertexArray.length}) / 4`);if(w.icon.opacityVertexArray.length!==w.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${w.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${w.icon.layoutVertexArray.length}) / 4`);if(w.bucketInstanceId in this.collisionCircleArrays){let qe=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=qe.invProjMatrix,w.placementViewportMatrix=qe.viewportMatrix,w.collisionCircleArray=qe.circles,delete this.collisionCircleArrays[w.bucketInstanceId]}}symbolFadeChange(w){return this.fadeDuration===0?1:(w-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(w){return Math.max(0,(this.transform.zoom-w)/1.5)}hasTransitions(w){return this.stale||w-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(w,B){let Q=this.zoomAtLastRecencyCheck===B?1-this.zoomAdjustment(B):1;return this.zoomAtLastRecencyCheck=B,this.commitTime+this.fadeDuration*Q>w}setStale(){this.stale=!0}}function rr(ue,w,B,Q,ee,le){Q&&Q.length!==0||(Q=[0,0,0,0]);let ze=Q[0]-mi,Ze=Q[1]-mi,ut=Q[2]-mi,Mt=Q[3]-mi;ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ze,Ze),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ut,Ze),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ut,Mt),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ze,Mt)}let ir=Math.pow(2,25),wr=Math.pow(2,24),Xr=Math.pow(2,17),ti=Math.pow(2,16),$r=Math.pow(2,9),Ri=Math.pow(2,8),Zi=Math.pow(2,1);function en(ue){if(ue.opacity===0&&!ue.placed)return 0;if(ue.opacity===1&&ue.placed)return 4294967295;let w=ue.placed?1:0,B=Math.floor(127*ue.opacity);return B*ir+w*wr+B*Xr+w*ti+B*$r+w*Ri+B*Zi+w}let fn=0;function yn(){return{isOccluded:(ue,w,B)=>!1,getPitchedTextCorrection:(ue,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(ue,w,B,Q){throw new Error("Not implemented.")},translatePosition:(ue,w,B,Q)=>function(ee,le,ze,Ze,ut=!1){if(!ze[0]&&!ze[1])return[0,0];let Mt=ut?Ze==="map"?ee.angle:0:Ze==="viewport"?-ee.angle:0;if(Mt){let Jt=Math.sin(Mt),$t=Math.cos(Mt);ze=[ze[0]*$t-ze[1]*Jt,ze[0]*Jt+ze[1]*$t]}return[ut?ze[0]:Fn(le,ze[0],ee.zoom),ut?ze[1]:Fn(le,ze[1],ee.zoom)]}(ue,w,B,Q),getCircleRadiusCorrection:ue=>1}}class Mn{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 ze=this._bucketParts;for(;this._currentTileIndex<w.length;)if(B.getBucketParts(ze,ee,w[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,le())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ze.sort((Ze,ut)=>Ze.sortKey-ut.sortKey));this._currentPartIndex<ze.length;)if(B.placeLayerBucketPart(ze[this._currentPartIndex],this._seenCrossTileIDs,Q),this._currentPartIndex++,le())return!0;return!1}}class Ba{constructor(w,B,Q,ee,le,ze,Ze,ut){this.placement=new wt(w,yn(),B,ze,Ze,ut),this._currentPlacementIndex=Q.length-1,this._forceFullPlacement=ee,this._showCollisionBoxes=le,this._done=!1}isDone(){return this._done}continuePlacement(w,B,Q){let ee=u.now(),le=()=>!this._forceFullPlacement&&u.now()-ee>2;for(;this._currentPlacementIndex>=0;){let ze=B[w[this._currentPlacementIndex]],Ze=this.placement.collisionIndex.transform.zoom;if(ze.type==="symbol"&&(!ze.minzoom||ze.minzoom<=Ze)&&(!ze.maxzoom||ze.maxzoom>Ze)){if(this._inProgressLayer||(this._inProgressLayer=new Mn(ze)),this._inProgressLayer.continuePlacement(Q[ze.source],this.placement,this._showCollisionBoxes,ze,le))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let ua=512/a.X/2;class ma{constructor(w,B,Q){this.tileID=w,this.bucketInstanceId=Q,this._symbolsByKey={};let ee=new Map;for(let le=0;le<B.length;le++){let ze=B.get(le),Ze=ze.key,ut=ee.get(Ze);ut?ut.push(ze):ee.set(Ze,[ze])}for(let[le,ze]of ee){let Ze={positions:ze.map(ut=>({x:Math.floor(ut.anchorX*ua),y:Math.floor(ut.anchorY*ua)})),crossTileIDs:ze.map(ut=>ut.crossTileID)};if(Ze.positions.length>128){let ut=new a.av(Ze.positions.length,16,Uint16Array);for(let{x:Mt,y:Jt}of Ze.positions)ut.add(Mt,Jt);ut.finish(),delete Ze.positions,Ze.index=ut}this._symbolsByKey[le]=Ze}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:le}=this.tileID.canonical,{x:ze,y:Ze,z:ut}=B.canonical,Mt=ua/Math.pow(2,ut-le),Jt=(Ze*a.X+w.anchorY)*Mt,$t=ee*a.X*ua;return{x:Math.floor((ze*a.X+w.anchorX)*Mt-Q*a.X*ua),y:Math.floor(Jt-$t)}}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 ze=w.get(le);if(ze.crossTileID)continue;let Ze=this._symbolsByKey[ze.key];if(!Ze)continue;let ut=this.getScaledCoordinates(ze,B);if(Ze.index){let Mt=Ze.index.range(ut.x-ee,ut.y-ee,ut.x+ee,ut.y+ee).sort();for(let Jt of Mt){let $t=Ze.crossTileIDs[Jt];if(!Q[$t]){Q[$t]=!0,ze.crossTileID=$t;break}}}else if(Ze.positions)for(let Mt=0;Mt<Ze.positions.length;Mt++){let Jt=Ze.positions[Mt],$t=Ze.crossTileIDs[Mt];if(Math.abs(Jt.x-ut.x)<=ee&&Math.abs(Jt.y-ut.y)<=ee&&!Q[$t]){Q[$t]=!0,ze.crossTileID=$t;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:w})=>w)}}class Wa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Fa{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(w){let B=Math.round((w-this.lng)/360);if(B!==0)for(let Q in this.indexes){let ee=this.indexes[Q],le={};for(let ze in ee){let Ze=ee[ze];Ze.tileID=Ze.tileID.unwrapTo(Ze.tileID.wrap+B),le[Ze.tileID.key]=Ze}this.indexes[Q]=le}this.lng=w}addBucket(w,B,Q){if(this.indexes[w.overscaledZ]&&this.indexes[w.overscaledZ][w.key]){if(this.indexes[w.overscaledZ][w.key].bucketInstanceId===B.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(w.overscaledZ,this.indexes[w.overscaledZ][w.key])}for(let le=0;le<B.symbolInstances.length;le++)B.symbolInstances.get(le).crossTileID=0;this.usedCrossTileIDs[w.overscaledZ]||(this.usedCrossTileIDs[w.overscaledZ]={});let ee=this.usedCrossTileIDs[w.overscaledZ];for(let le in this.indexes){let ze=this.indexes[le];if(Number(le)>w.overscaledZ)for(let Ze in ze){let ut=ze[Ze];ut.tileID.isChildOf(w)&&ut.findMatches(B.symbolInstances,w,ee)}else{let Ze=ze[w.scaledTo(Number(le)).key];Ze&&Ze.findMatches(B.symbolInstances,w,ee)}}for(let le=0;le<B.symbolInstances.length;le++){let ze=B.symbolInstances.get(le);ze.crossTileID||(ze.crossTileID=Q.generate(),ee[ze.crossTileID]=!0)}return this.indexes[w.overscaledZ]===void 0&&(this.indexes[w.overscaledZ]={}),this.indexes[w.overscaledZ][w.key]=new ma(w,B.symbolInstances,B.bucketInstanceId),!0}removeBucketCrossTileIDs(w,B){for(let Q of B.getCrossTileIDsLists())for(let ee of Q)delete this.usedCrossTileIDs[w][ee]}removeStaleBuckets(w){let B=!1;for(let Q in this.indexes){let ee=this.indexes[Q];for(let le in ee)w[ee[le].bucketInstanceId]||(this.removeBucketCrossTileIDs(Q,ee[le]),delete ee[le],B=!0)}return B}}class Xo{constructor(){this.layerIndexes={},this.crossTileIDs=new Wa,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(w,B,Q){let ee=this.layerIndexes[w.id];ee===void 0&&(ee=this.layerIndexes[w.id]=new Fa);let le=!1,ze={};ee.handleWrapJump(Q);for(let Ze of B){let ut=Ze.getBucket(w);ut&&w.id===ut.layerIds[0]&&(ut.bucketInstanceId||(ut.bucketInstanceId=++this.maxBucketInstanceId),ee.addBucket(Ze.tileID,ut,this.crossTileIDs)&&(le=!0),ze[ut.bucketInstanceId]=!0)}return ee.removeStaleBuckets(ze)&&(le=!0),le}pruneUnusedLayers(w){let B={};w.forEach(Q=>{B[Q]=!0});for(let Q in this.layerIndexes)B[Q]||delete this.layerIndexes[Q]}}let da=(ue,w)=>a.t(ue,w&&w.filter(B=>B.identifier!=="source.canvas")),jn=a.aw();class Ha extends a.E{constructor(w,B={}){super(),this._rtlPluginLoaded=()=>{for(let Q in this.sourceCaches){let ee=this.sourceCaches[Q].getSource().type;ee!=="vector"&&ee!=="geojson"||this.sourceCaches[Q].reload()}},this.map=w,this.dispatcher=new Ee(Se(),w._getMapId()),this.dispatcher.registerMessageHandler("GG",(Q,ee)=>this.getGlyphs(Q,ee)),this.dispatcher.registerMessageHandler("GI",(Q,ee)=>this.getImages(Q,ee)),this.imageManager=new E,this.imageManager.setEventedParent(this),this.glyphManager=new G(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new oe(256,512),this.crossTileSymbolIndex=new Xo,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",a.ay()),St().on(Ue,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 ze in this._layers){let Ze=this._layers[ze];Ze.source===le.id&&this._validateLayer(Ze)}})}loadURL(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),B.validate=typeof B.validate!="boolean"||B.validate;let ee=this.map._requestManager.transformRequest(w,"Style");this._loadStyleRequest=new AbortController;let le=this._loadStyleRequest;a.h(ee,this._loadStyleRequest).then(ze=>{this._loadStyleRequest=null,this._load(ze.data,B,Q)}).catch(ze=>{this._loadStyleRequest=null,ze&&!le.signal.aborted&&this.fire(new a.j(ze))})}loadJSON(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,B.validate=B.validate!==!1,this._load(w,B,Q)}).catch(()=>{})}loadEmpty(){this.fire(new a.k("dataloading",{dataType:"style"})),this._load(jn,{validate:!1})}_load(w,B,Q){var ee;let le=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!da(this,a.u(le))){this._loaded=!0,this.stylesheet=le;for(let ze in le.sources)this.addSource(ze,le.sources[ze],{validate:!1});le.sprite?this._loadSprite(le.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(le.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this.sky=new re(this.stylesheet.sky),this.map.setTerrain((ee=this.stylesheet.terrain)!==null&&ee!==void 0?ee:null),this.fire(new a.k("data",{dataType:"style"})),this.fire(new a.k("style.load"))}}_createLayers(){let w=a.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",w),this._order=w.map(B=>B.id),this._layers={},this._serializedLayers=null;for(let B of w){let Q=a.aA(B);Q.setEventedParent(this,{layer:{id:B.id}}),this._layers[B.id]=Q}}_loadSprite(w,B=!1,Q=void 0){let ee;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(le,ze,Ze,ut){return a._(this,void 0,void 0,function*(){let Mt=C(le),Jt=Ze>1?"@2x":"",$t={},mr={};for(let{id:Cr,url:ve}of Mt){let xe=ze.transformRequest(S(ve,Jt,".json"),"SpriteJSON");$t[Cr]=a.h(xe,ut);let Ie=ze.transformRequest(S(ve,Jt,".png"),"SpriteImage");mr[Cr]=p.getImage(Ie,ut)}return yield Promise.all([...Object.values($t),...Object.values(mr)]),function(Cr,ve){return a._(this,void 0,void 0,function*(){let xe={};for(let Ie in Cr){xe[Ie]={};let qe=u.getImageCanvasContext((yield ve[Ie]).data),Qe=(yield Cr[Ie]).data;for(let Xe in Qe){let{width:nt,height:qt,x:jt,y:ar,sdf:fr,pixelRatio:br,stretchX:Fr,stretchY:Hr,content:ri,textFitWidth:Ci,textFitHeight:cn}=Qe[Xe];xe[Ie][Xe]={data:null,pixelRatio:br,sdf:fr,stretchX:Fr,stretchY:Hr,content:ri,textFitWidth:Ci,textFitHeight:cn,spriteData:{width:nt,height:qt,x:jt,y:ar,context:qe}}}}return xe})}($t,mr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(le=>{if(this._spriteRequest=null,le)for(let ze in le){this._spritesImagesIds[ze]=[];let Ze=this._spritesImagesIds[ze]?this._spritesImagesIds[ze].filter(ut=>!(ut in le)):[];for(let ut of Ze)this.imageManager.removeImage(ut),this._changedImages[ut]=!0;for(let ut in le[ze]){let Mt=ze==="default"?ut:`${ze}:${ut}`;this._spritesImagesIds[ze].push(Mt),Mt in this.imageManager.images?this.imageManager.updateImage(Mt,le[ze][ut],!1):this.imageManager.addImage(Mt,le[ze][ut]),B&&(this._changedImages[Mt]=!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 ze=B?a.aB(Q[le]):Q[le];ee.push(ze)}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 ze in this._updatedSources){let Ze=this._updatedSources[ze];if(Ze==="reload")this._reloadSource(ze);else{if(Ze!=="clear")throw new Error(`Invalid action ${Ze}`);this._clearSource(ze)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let ze in this._updatedPaintProps)this._layers[ze].updateTransitions(w);this.light.updateTransitions(w),this.sky.updateTransitions(w),this._resetUpdates()}let Q={};for(let ee in this.sourceCaches){let le=this.sourceCaches[ee];Q[ee]=le.used,le.used=!1}for(let ee of this._order){let le=this._layers[ee];le.recalculate(w,this._availableImages),!le.isHidden(w.zoom)&&le.source&&(this.sourceCaches[le.source].used=!0)}for(let ee in Q){let le=this.sourceCaches[ee];!!Q[ee]!=!!le.used&&le.fire(new a.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:ee}))}this.light.recalculate(w),this.sky.recalculate(w),this.z=w.zoom,B&&this.fire(new a.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let w=Object.keys(this._changedImages);if(w.length){for(let B in this.sourceCaches)this.sourceCaches[B].reloadTilesForDependencies(["icons","patterns"],w);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let w in this.sourceCaches)this.sourceCaches[w].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(w,B){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(w,!1),removedIds:B})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(w,B={}){var Q;this._checkLoaded();let ee=this.serialize();if(w=B.transformStyle?B.transformStyle(ee,w):w,((Q=B.validate)===null||Q===void 0||Q)&&da(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let le=a.aC(ee,w),ze=this._getOperationsToPerform(le);if(ze.unimplemented.length>0)throw new Error(`Unimplemented: ${ze.unimplemented.join(", ")}.`);if(ze.operations.length===0)return!1;for(let Ze of ze.operations)Ze();return this.stylesheet=w,this._serializedLayers=null,!0}_getOperationsToPerform(w){let B=[],Q=[];for(let ee of w)switch(ee.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":B.push(()=>this.addLayer.apply(this,ee.args));break;case"removeLayer":B.push(()=>this.removeLayer.apply(this,ee.args));break;case"setPaintProperty":B.push(()=>this.setPaintProperty.apply(this,ee.args));break;case"setLayoutProperty":B.push(()=>this.setLayoutProperty.apply(this,ee.args));break;case"setFilter":B.push(()=>this.setFilter.apply(this,ee.args));break;case"addSource":B.push(()=>this.addSource.apply(this,ee.args));break;case"removeSource":B.push(()=>this.removeSource.apply(this,ee.args));break;case"setLayerZoomRange":B.push(()=>this.setLayerZoomRange.apply(this,ee.args));break;case"setLight":B.push(()=>this.setLight.apply(this,ee.args));break;case"setGeoJSONSourceData":B.push(()=>this.setGeoJSONSourceData.apply(this,ee.args));break;case"setGlyphs":B.push(()=>this.setGlyphs.apply(this,ee.args));break;case"setSprite":B.push(()=>this.setSprite.apply(this,ee.args));break;case"setSky":B.push(()=>this.setSky.apply(this,ee.args));break;case"setTerrain":B.push(()=>this.map.setTerrain.apply(this,ee.args));break;case"setTransition":B.push(()=>{});break;default:Q.push(ee.command)}return{operations:B,unimplemented:Q}}addImage(w,B){if(this.getImage(w))return this.fire(new a.j(new Error(`An image named "${w}" already exists.`)));this.imageManager.addImage(w,B),this._afterImageUpdated(w)}updateImage(w,B){this.imageManager.updateImage(w,B)}getImage(w){return this.imageManager.getImage(w)}removeImage(w){if(!this.getImage(w))return this.fire(new a.j(new Error(`An image named "${w}" does not exist.`)));this.imageManager.removeImage(w),this._afterImageUpdated(w)}_afterImageUpdated(w){this._availableImages=this.imageManager.listImages(),this._changedImages[w]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(w,B,Q={}){if(this._checkLoaded(),this.sourceCaches[w]!==void 0)throw new Error(`Source "${w}" already exists.`);if(!B.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(B).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(B.type)>=0&&this._validate(a.u.source,`sources.${w}`,B,null,Q))return;this.map&&this.map._collectResourceTiming&&(B.collectResourceTiming=!0);let ee=this.sourceCaches[w]=new pt(w,B,this.dispatcher);ee.style=this,ee.setEventedParent(this,()=>({isSourceLoaded:ee.loaded(),source:ee.serialize(),sourceId:w})),ee.onAdd(this.map),this._changed=!0}removeSource(w){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error("There is no source with this ID");for(let Q in this._layers)if(this._layers[Q].source===w)return this.fire(new a.j(new Error(`Source "${w}" cannot be removed while layer "${Q}" is using it.`)));let B=this.sourceCaches[w];delete this.sourceCaches[w],delete this._updatedSources[w],B.fire(new a.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:w})),B.setEventedParent(null),B.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(w,B){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error(`There is no source with this ID=${w}`);let Q=this.sourceCaches[w].getSource();if(Q.type!=="geojson")throw new Error(`geojsonSource.type is ${Q.type}, which is !== 'geojson`);Q.setData(B),this._changed=!0}getSource(w){return this.sourceCaches[w]&&this.sourceCaches[w].getSource()}addLayer(w,B,Q={}){this._checkLoaded();let ee=w.id;if(this.getLayer(ee))return void this.fire(new a.j(new Error(`Layer "${ee}" already exists on this map.`)));let le;if(w.type==="custom"){if(da(this,a.aD(w)))return;le=a.aA(w)}else{if("source"in w&&typeof w.source=="object"&&(this.addSource(ee,w.source),w=a.aB(w),w=a.e(w,{source:ee})),this._validate(a.u.layer,`layers.${ee}`,w,{arrayIndex:-1},Q))return;le=a.aA(w),this._validateLayer(le),le.setEventedParent(this,{layer:{id:ee}})}let ze=B?this._order.indexOf(B):this._order.length;if(B&&ze===-1)this.fire(new a.j(new Error(`Cannot add layer "${ee}" before non-existing layer "${B}".`)));else{if(this._order.splice(ze,0,ee),this._layerOrderChanged=!0,this._layers[ee]=le,this._removedLayers[ee]&&le.source&&le.type!=="custom"){let Ze=this._removedLayers[ee];delete this._removedLayers[ee],Ze.type!==le.type?this._updatedSources[le.source]="clear":(this._updatedSources[le.source]="reload",this.sourceCaches[le.source].pause())}this._updateLayer(le),le.onAdd&&le.onAdd(this.map)}}moveLayer(w,B){if(this._checkLoaded(),this._changed=!0,!this._layers[w])return void this.fire(new a.j(new Error(`The layer '${w}' does not exist in the map's style and cannot be moved.`)));if(w===B)return;let Q=this._order.indexOf(w);this._order.splice(Q,1);let ee=B?this._order.indexOf(B):this._order.length;B&&ee===-1?this.fire(new a.j(new Error(`Cannot move layer "${w}" before non-existing layer "${B}".`))):(this._order.splice(ee,0,w),this._layerOrderChanged=!0)}removeLayer(w){this._checkLoaded();let B=this._layers[w];if(!B)return void this.fire(new a.j(new Error(`Cannot remove non-existing layer "${w}".`)));B.setEventedParent(null);let Q=this._order.indexOf(w);this._order.splice(Q,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[w]=B,delete this._layers[w],this._serializedLayers&&delete this._serializedLayers[w],delete this._updatedLayers[w],delete this._updatedPaintProps[w],B.onRemove&&B.onRemove(this.map)}getLayer(w){return this._layers[w]}getLayersOrder(){return[...this._order]}hasLayer(w){return w in this._layers}setLayerZoomRange(w,B,Q){this._checkLoaded();let ee=this.getLayer(w);ee?ee.minzoom===B&&ee.maxzoom===Q||(B!=null&&(ee.minzoom=B),Q!=null&&(ee.maxzoom=Q),this._updateLayer(ee)):this.fire(new a.j(new Error(`Cannot set the zoom range of non-existing layer "${w}".`)))}setFilter(w,B,Q={}){this._checkLoaded();let ee=this.getLayer(w);if(ee){if(!a.aE(ee.filter,B))return B==null?(ee.filter=void 0,void this._updateLayer(ee)):void(this._validate(a.u.filter,`layers.${ee.id}.filter`,B,null,Q)||(ee.filter=a.aB(B),this._updateLayer(ee)))}else this.fire(new a.j(new Error(`Cannot filter non-existing layer "${w}".`)))}getFilter(w){return a.aB(this.getLayer(w).filter)}setLayoutProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getLayoutProperty(B),Q)||(le.setLayoutProperty(B,Q,ee),this._updateLayer(le)):this.fire(new a.j(new Error(`Cannot style non-existing layer "${w}".`)))}getLayoutProperty(w,B){let Q=this.getLayer(w);if(Q)return Q.getLayoutProperty(B);this.fire(new a.j(new Error(`Cannot get style of non-existing layer "${w}".`)))}setPaintProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getPaintProperty(B),Q)||(le.setPaintProperty(B,Q,ee)&&this._updateLayer(le),this._changed=!0,this._updatedPaintProps[w]=!0,this._serializedLayers=null):this.fire(new a.j(new Error(`Cannot style non-existing layer "${w}".`)))}getPaintProperty(w,B){return this.getLayer(w).getPaintProperty(B)}setFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=w.sourceLayer,le=this.sourceCaches[Q];if(le===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let ze=le.getSource().type;ze==="geojson"&&ee?this.fire(new a.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ze!=="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,ze=le==="vector"?w.sourceLayer:void 0;le!=="vector"||ze?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(ze,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=ze=>this._layers[ze].type==="fill-extrusion",Q={},ee=[];for(let ze=this._order.length-1;ze>=0;ze--){let Ze=this._order[ze];if(B(Ze)){Q[Ze]=ze;for(let ut of w){let Mt=ut[Ze];if(Mt)for(let Jt of Mt)ee.push(Jt)}}}ee.sort((ze,Ze)=>Ze.intersectionZ-ze.intersectionZ);let le=[];for(let ze=this._order.length-1;ze>=0;ze--){let Ze=this._order[ze];if(B(Ze))for(let ut=ee.length-1;ut>=0;ut--){let Mt=ee[ut].feature;if(Q[Mt.layer.id]<ze)break;le.push(Mt),ee.pop()}else for(let ut of w){let Mt=ut[Ze];if(Mt)for(let Jt of Mt)le.push(Jt.feature)}}return le}queryRenderedFeatures(w,B,Q){B&&B.filter&&this._validate(a.u.filter,"queryRenderedFeatures.filter",B.filter,null,B);let ee={};if(B&&B.layers){if(!Array.isArray(B.layers))return this.fire(new a.j(new Error("parameters.layers must be an Array."))),[];for(let Ze of B.layers){let ut=this._layers[Ze];if(!ut)return this.fire(new a.j(new Error(`The layer '${Ze}' does not exist in the map's style and cannot be queried for features.`))),[];ee[ut.source]=!0}}let le=[];B.availableImages=this._availableImages;let ze=this._serializedAllLayers();for(let Ze in this.sourceCaches)B.layers&&!ee[Ze]||le.push(Le(this.sourceCaches[Ze],this._layers,ze,w,B,Q));return this.placement&&le.push(function(Ze,ut,Mt,Jt,$t,mr,Cr){let ve={},xe=mr.queryRenderedSymbols(Jt),Ie=[];for(let qe of Object.keys(xe).map(Number))Ie.push(Cr[qe]);Ie.sort(me);for(let qe of Ie){let Qe=qe.featureIndex.lookupSymbolFeatures(xe[qe.bucketInstanceId],ut,qe.bucketIndex,qe.sourceLayerIndex,$t.filter,$t.layers,$t.availableImages,Ze);for(let Xe in Qe){let nt=ve[Xe]=ve[Xe]||[],qt=Qe[Xe];qt.sort((jt,ar)=>{let fr=qe.featureSortOrder;if(fr){let br=fr.indexOf(jt.featureIndex);return fr.indexOf(ar.featureIndex)-br}return ar.featureIndex-jt.featureIndex});for(let jt of qt)nt.push(jt)}}for(let qe in ve)ve[qe].forEach(Qe=>{let Xe=Qe.feature,nt=Mt[Ze[qe].source].getFeatureState(Xe.layer["source-layer"],Xe.id);Xe.source=Xe.layer.source,Xe.layer["source-layer"]&&(Xe.sourceLayer=Xe.layer["source-layer"]),Xe.state=nt});return ve}(this._layers,ze,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 ze=ee.getRenderableIds().map(Mt=>ee.getTileByID(Mt)),Ze=[],ut={};for(let Mt=0;Mt<ze.length;Mt++){let Jt=ze[Mt],$t=Jt.tileID.canonical.key;ut[$t]||(ut[$t]=!0,Jt.querySourceFeatures(Ze,le))}return Ze}(Q,B):[]}getLight(){return this.light.getLight()}setLight(w,B={}){this._checkLoaded();let Q=this.light.getLight(),ee=!1;for(let ze in w)if(!a.aE(w[ze],Q[ze])){ee=!0;break}if(!ee)return;let le={now:u.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(w,B),this.light.updateTransitions(le)}getSky(){var w;return(w=this.stylesheet)===null||w===void 0?void 0:w.sky}setSky(w,B={}){let Q=this.getSky(),ee=!1;if(!w&&!Q)return;if(w&&!Q)ee=!0;else if(!w&&Q)ee=!0;else for(let ze in w)if(!a.aE(w[ze],Q[ze])){ee=!0;break}if(!ee)return;let le={now:u.now(),transition:a.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=w,this.sky.setSky(w,B),this.sky.updateTransitions(le)}_validate(w,B,Q,ee,le={}){return(!le||le.validate!==!1)&&da(this,w.call(a.u,a.e({key:B,style:this.serialize(),value:Q,styleSpec:a.v},ee)))}_remove(w=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),St().off(Ue,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 ze=!1,Ze=!1,ut={};for(let Mt of this._order){let Jt=this._layers[Mt];if(Jt.type!=="symbol")continue;if(!ut[Jt.source]){let mr=this.sourceCaches[Jt.source];ut[Jt.source]=mr.getRenderableIds(!0).map(Cr=>mr.getTileByID(Cr)).sort((Cr,ve)=>ve.tileID.overscaledZ-Cr.tileID.overscaledZ||(Cr.tileID.isLessThan(ve.tileID)?-1:1))}let $t=this.crossTileSymbolIndex.addLayer(Jt,ut[Jt.source],w.center.lng);ze=ze||$t}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((le=le||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.now(),w.zoom))&&(this.pauseablePlacement=new Ba(w,this.map.terrain,this._order,le,B,Q,ee,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,ut),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(u.now()),Ze=!0),ze&&this.pauseablePlacement.placement.setStale()),Ze||ze)for(let Mt of this._order){let Jt=this._layers[Mt];Jt.type==="symbol"&&this.placement.updateLayerOpacities(Jt,ut[Jt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(u.now())}_releaseSymbolFadeTiles(){for(let w in this.sourceCaches)this.sourceCaches[w].releaseSymbolFadeTiles()}getImages(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.imageManager.getImages(B.icons);this._updateTilesForChangedImages();let ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,B.icons),Q})}getGlyphs(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.glyphManager.getGlyphs(B.stacks),ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,[""]),Q})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(w,B={}){this._checkLoaded(),w&&this._validate(a.u.glyphs,"glyphs",w,null,B)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=w,this.glyphManager.entries={},this.glyphManager.setURL(w))}addSprite(w,B,Q={},ee){this._checkLoaded();let le=[{id:w,url:B}],ze=[...C(this.stylesheet.sprite),...le];this._validate(a.u.sprite,"sprite",ze,null,Q)||(this.stylesheet.sprite=ze,this._loadSprite(le,!0,ee))}removeSprite(w){this._checkLoaded();let B=C(this.stylesheet.sprite);if(B.find(Q=>Q.id===w)){if(this._spritesImagesIds[w])for(let Q of this._spritesImagesIds[w])this.imageManager.removeImage(Q),this._changedImages[Q]=!0;B.splice(B.findIndex(Q=>Q.id===w),1),this.stylesheet.sprite=B.length>0?B:void 0,delete this._spritesImagesIds[w],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}else this.fire(new a.j(new Error(`Sprite "${w}" doesn't exists on this map.`)))}getSprite(){return C(this.stylesheet.sprite)}setSprite(w,B={},Q){this._checkLoaded(),w&&this._validate(a.u.sprite,"sprite",w,null,B)||(this.stylesheet.sprite=w,w?this._loadSprite(w,!0,Q):(this._unloadSprite(),Q&&Q(null)))}}var vo=a.Y([{name:"a_pos",type:"Int16",components:2}]);let Gn={prelude:Ct(`#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:Ct(`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:Ct(`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:Ct(`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:Ct("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:Ct(`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:Ct(`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:Ct("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:Ct("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:Ct("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:Ct(`#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:Ct(`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:Ct(`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:Ct(`#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:Ct(`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:Ct(`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:Ct(`#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:Ct(`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:Ct(`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:Ct(`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:Ct(`#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:Ct(`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:Ct(`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:Ct(`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:Ct(`#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:Ct(`#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:Ct("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:Ct("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:Ct("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:Ct("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 Ct(ue,w){let B=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Q=w.match(/attribute ([\w]+) ([\w]+)/g),ee=ue.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),le=w.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ze=le?le.concat(ee):ee,Ze={};return{fragmentSource:ue=ue.replace(B,(ut,Mt,Jt,$t,mr)=>(Ze[mr]=!0,Mt==="define"?`
|
||
#ifndef HAS_UNIFORM_u_${mr}
|
||
varying ${Jt} ${$t} ${mr};
|
||
#else
|
||
uniform ${Jt} ${$t} u_${mr};
|
||
#endif
|
||
`:`
|
||
#ifdef HAS_UNIFORM_u_${mr}
|
||
${Jt} ${$t} ${mr} = u_${mr};
|
||
#endif
|
||
`)),vertexSource:w=w.replace(B,(ut,Mt,Jt,$t,mr)=>{let Cr=$t==="float"?"vec2":"vec4",ve=mr.match(/color/)?"color":Cr;return Ze[mr]?Mt==="define"?`
|
||
#ifndef HAS_UNIFORM_u_${mr}
|
||
uniform lowp float u_${mr}_t;
|
||
attribute ${Jt} ${Cr} a_${mr};
|
||
varying ${Jt} ${$t} ${mr};
|
||
#else
|
||
uniform ${Jt} ${$t} u_${mr};
|
||
#endif
|
||
`:ve==="vec4"?`
|
||
#ifndef HAS_UNIFORM_u_${mr}
|
||
${mr} = a_${mr};
|
||
#else
|
||
${Jt} ${$t} ${mr} = u_${mr};
|
||
#endif
|
||
`:`
|
||
#ifndef HAS_UNIFORM_u_${mr}
|
||
${mr} = unpack_mix_${ve}(a_${mr}, u_${mr}_t);
|
||
#else
|
||
${Jt} ${$t} ${mr} = u_${mr};
|
||
#endif
|
||
`:Mt==="define"?`
|
||
#ifndef HAS_UNIFORM_u_${mr}
|
||
uniform lowp float u_${mr}_t;
|
||
attribute ${Jt} ${Cr} a_${mr};
|
||
#else
|
||
uniform ${Jt} ${$t} u_${mr};
|
||
#endif
|
||
`:ve==="vec4"?`
|
||
#ifndef HAS_UNIFORM_u_${mr}
|
||
${Jt} ${$t} ${mr} = a_${mr};
|
||
#else
|
||
${Jt} ${$t} ${mr} = u_${mr};
|
||
#endif
|
||
`:`
|
||
#ifndef HAS_UNIFORM_u_${mr}
|
||
${Jt} ${$t} ${mr} = unpack_mix_${ve}(a_${mr}, u_${mr}_t);
|
||
#else
|
||
${Jt} ${$t} ${mr} = u_${mr};
|
||
#endif
|
||
`}),staticAttributes:Q,staticUniforms:ze}}class Ar{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,ze,Ze,ut,Mt){this.context=w;let Jt=this.boundPaintVertexBuffers.length!==ee.length;for(let $t=0;!Jt&&$t<ee.length;$t++)this.boundPaintVertexBuffers[$t]!==ee[$t]&&(Jt=!0);!this.vao||this.boundProgram!==B||this.boundLayoutVertexBuffer!==Q||Jt||this.boundIndexBuffer!==le||this.boundVertexOffset!==ze||this.boundDynamicVertexBuffer!==Ze||this.boundDynamicVertexBuffer2!==ut||this.boundDynamicVertexBuffer3!==Mt?this.freshBind(B,Q,ee,le,ze,Ze,ut,Mt):(w.bindVertexArray.set(this.vao),Ze&&Ze.bind(),le&&le.dynamicDraw&&le.bind(),ut&&ut.bind(),Mt&&Mt.bind())}freshBind(w,B,Q,ee,le,ze,Ze,ut){let Mt=w.numAttributes,Jt=this.context,$t=Jt.gl;this.vao&&this.destroy(),this.vao=Jt.createVertexArray(),Jt.bindVertexArray.set(this.vao),this.boundProgram=w,this.boundLayoutVertexBuffer=B,this.boundPaintVertexBuffers=Q,this.boundIndexBuffer=ee,this.boundVertexOffset=le,this.boundDynamicVertexBuffer=ze,this.boundDynamicVertexBuffer2=Ze,this.boundDynamicVertexBuffer3=ut,B.enableAttributes($t,w);for(let mr of Q)mr.enableAttributes($t,w);ze&&ze.enableAttributes($t,w),Ze&&Ze.enableAttributes($t,w),ut&&ut.enableAttributes($t,w),B.bind(),B.setVertexAttribPointers($t,w,le);for(let mr of Q)mr.bind(),mr.setVertexAttribPointers($t,w,le);ze&&(ze.bind(),ze.setVertexAttribPointers($t,w,le)),ee&&ee.bind(),Ze&&(Ze.bind(),Ze.setVertexAttribPointers($t,w,le)),ut&&(ut.bind(),ut.setVertexAttribPointers($t,w,le)),Jt.currentNumAttributes=Mt}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}let Jr=(ue,w,B,Q,ee)=>({u_matrix:ue,u_texture:0,u_ele_delta:w,u_fog_matrix:B,u_fog_color:Q?Q.properties.get("fog-color"):a.aM.white,u_fog_ground_blend:Q?Q.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Q?Q.calculateFogBlendOpacity(ee):0,u_horizon_color:Q?Q.properties.get("horizon-color"):a.aM.white,u_horizon_fog_blend:Q?Q.properties.get("horizon-fog-blend"):1});function hi(ue){let w=[];for(let B=0;B<ue.length;B++){if(ue[B]===null)continue;let Q=ue[B].split(" ");w.push(Q.pop())}return w}class hn{constructor(w,B,Q,ee,le,ze){let Ze=w.gl;this.program=Ze.createProgram();let ut=hi(B.staticAttributes),Mt=Q?Q.getBinderAttributes():[],Jt=ut.concat(Mt),$t=Gn.prelude.staticUniforms?hi(Gn.prelude.staticUniforms):[],mr=B.staticUniforms?hi(B.staticUniforms):[],Cr=Q?Q.getBinderUniforms():[],ve=$t.concat(mr).concat(Cr),xe=[];for(let jt of ve)xe.indexOf(jt)<0&&xe.push(jt);let Ie=Q?Q.defines():[];le&&Ie.push("#define OVERDRAW_INSPECTOR;"),ze&&Ie.push("#define TERRAIN3D;");let qe=Ie.concat(Gn.prelude.fragmentSource,B.fragmentSource).join(`
|
||
`),Qe=Ie.concat(Gn.prelude.vertexSource,B.vertexSource).join(`
|
||
`),Xe=Ze.createShader(Ze.FRAGMENT_SHADER);if(Ze.isContextLost())return void(this.failedToCreate=!0);if(Ze.shaderSource(Xe,qe),Ze.compileShader(Xe),!Ze.getShaderParameter(Xe,Ze.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Ze.getShaderInfoLog(Xe)}`);Ze.attachShader(this.program,Xe);let nt=Ze.createShader(Ze.VERTEX_SHADER);if(Ze.isContextLost())return void(this.failedToCreate=!0);if(Ze.shaderSource(nt,Qe),Ze.compileShader(nt),!Ze.getShaderParameter(nt,Ze.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Ze.getShaderInfoLog(nt)}`);Ze.attachShader(this.program,nt),this.attributes={};let qt={};this.numAttributes=Jt.length;for(let jt=0;jt<this.numAttributes;jt++)Jt[jt]&&(Ze.bindAttribLocation(this.program,jt,Jt[jt]),this.attributes[Jt[jt]]=jt);if(Ze.linkProgram(this.program),!Ze.getProgramParameter(this.program,Ze.LINK_STATUS))throw new Error(`Program failed to link: ${Ze.getProgramInfoLog(this.program)}`);Ze.deleteShader(nt),Ze.deleteShader(Xe);for(let jt=0;jt<xe.length;jt++){let ar=xe[jt];if(ar&&!qt[ar]){let fr=Ze.getUniformLocation(this.program,ar);fr&&(qt[ar]=fr)}}this.fixedUniforms=ee(w,qt),this.terrainUniforms=((jt,ar)=>({u_depth:new a.aH(jt,ar.u_depth),u_terrain:new a.aH(jt,ar.u_terrain),u_terrain_dim:new a.aI(jt,ar.u_terrain_dim),u_terrain_matrix:new a.aJ(jt,ar.u_terrain_matrix),u_terrain_unpack:new a.aK(jt,ar.u_terrain_unpack),u_terrain_exaggeration:new a.aI(jt,ar.u_terrain_exaggeration)}))(w,qt),this.binderUniforms=Q?Q.getUniforms(w,qt):[]}draw(w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr,ve,xe,Ie,qe,Qe){let Xe=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(le),w.setCullFace(ze),ut){w.activeTexture.set(Xe.TEXTURE2),Xe.bindTexture(Xe.TEXTURE_2D,ut.depthTexture),w.activeTexture.set(Xe.TEXTURE3),Xe.bindTexture(Xe.TEXTURE_2D,ut.texture);for(let qt in this.terrainUniforms)this.terrainUniforms[qt].set(ut[qt])}for(let qt in this.fixedUniforms)this.fixedUniforms[qt].set(Ze[qt]);xe&&xe.setUniforms(w,this.binderUniforms,Cr,{zoom:ve});let nt=0;switch(B){case Xe.LINES:nt=2;break;case Xe.TRIANGLES:nt=3;break;case Xe.LINE_STRIP:nt=1}for(let qt of mr.get()){let jt=qt.vaos||(qt.vaos={});(jt[Mt]||(jt[Mt]=new Ar)).bind(w,this,Jt,xe?xe.getPaintVertexBuffers():[],$t,qt.vertexOffset,Ie,qe,Qe),Xe.drawElements(B,qt.primitiveLength*nt,Xe.UNSIGNED_SHORT,qt.primitiveOffset*nt*2)}}}function Sn(ue,w,B){let Q=1/Fn(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),le=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,ze=le*(B.tileID.canonical.x+B.tileID.wrap*ee),Ze=le*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,ue.fromScale,ue.toScale],u_fade:ue.t,u_pixel_coord_upper:[ze>>16,Ze>>16],u_pixel_coord_lower:[65535&ze,65535&Ze]}}let En=(ue,w,B,Q)=>{let ee=w.style.light,le=ee.properties.get("position"),ze=[le.x,le.y,le.z],Ze=function(){var Mt=new a.A(9);return a.A!=Float32Array&&(Mt[1]=0,Mt[2]=0,Mt[3]=0,Mt[5]=0,Mt[6]=0,Mt[7]=0),Mt[0]=1,Mt[4]=1,Mt[8]=1,Mt}();ee.properties.get("anchor")==="viewport"&&function(Mt,Jt){var $t=Math.sin(Jt),mr=Math.cos(Jt);Mt[0]=mr,Mt[1]=$t,Mt[2]=0,Mt[3]=-$t,Mt[4]=mr,Mt[5]=0,Mt[6]=0,Mt[7]=0,Mt[8]=1}(Ze,-w.transform.angle),function(Mt,Jt,$t){var mr=Jt[0],Cr=Jt[1],ve=Jt[2];Mt[0]=mr*$t[0]+Cr*$t[3]+ve*$t[6],Mt[1]=mr*$t[1]+Cr*$t[4]+ve*$t[7],Mt[2]=mr*$t[2]+Cr*$t[5]+ve*$t[8]}(ze,ze,Ze);let ut=ee.properties.get("color");return{u_matrix:ue,u_lightpos:ze,u_lightintensity:ee.properties.get("intensity"),u_lightcolor:[ut.r,ut.g,ut.b],u_vertical_gradient:+B,u_opacity:Q}},ki=(ue,w,B,Q,ee,le,ze)=>a.e(En(ue,w,B,Q),Sn(le,w,ze),{u_height_factor:-Math.pow(2,ee.overscaledZ)/ze.tileSize/8}),_n=ue=>({u_matrix:ue}),ya=(ue,w,B,Q)=>a.e(_n(ue),Sn(B,w,Q)),ea=(ue,w)=>({u_matrix:ue,u_world:w}),Ma=(ue,w,B,Q,ee)=>a.e(ya(ue,w,B,Q),{u_world:ee}),_o=(ue,w,B,Q)=>{let ee=ue.transform,le,ze;if(Q.paint.get("circle-pitch-alignment")==="map"){let Ze=Fn(B,1,ee.zoom);le=!0,ze=[Ze,Ze]}else le=!1,ze=ee.pixelsToGLUnits;return{u_camera_to_center_distance:ee.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get("circle-pitch-scale")==="map"),u_matrix:ue.translatePosMatrix(w.posMatrix,B,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+le,u_device_pixel_ratio:ue.pixelRatio,u_extrude_scale:ze}},No=(ue,w,B)=>({u_matrix:ue,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),po=(ue,w,B=1)=>({u_matrix:ue,u_color:w,u_overlay:0,u_overlay_scale:B}),Lo=ue=>({u_matrix:ue}),ko=(ue,w,B,Q)=>({u_matrix:ue,u_extrude_scale:Fn(w,1,B),u_intensity:Q}),Ds=(ue,w,B,Q)=>{let ee=a.H();a.aP(ee,0,ue.width,ue.height,0,0,1);let le=ue.context.gl;return{u_matrix:ee,u_world:[le.drawingBufferWidth,le.drawingBufferHeight],u_image:B,u_color_ramp:Q,u_opacity:w.paint.get("heatmap-opacity")}};function Fs(ue,w){let B=Math.pow(2,w.canonical.z),Q=w.canonical.y;return[new a.Z(0,Q/B).toLngLat().lat,new a.Z(0,(Q+1)/B).toLngLat().lat]}let ll=(ue,w,B,Q)=>{let ee=ue.transform;return{u_matrix:As(ue,w,B,Q),u_ratio:1/Fn(w,1,ee.zoom),u_device_pixel_ratio:ue.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},ul=(ue,w,B,Q,ee)=>a.e(ll(ue,w,B,ee),{u_image:0,u_image_height:Q}),zl=(ue,w,B,Q,ee)=>{let le=ue.transform,ze=il(w,le);return{u_matrix:As(ue,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/Fn(w,1,le.zoom),u_device_pixel_ratio:ue.pixelRatio,u_image:0,u_scale:[ze,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/le.pixelsToGLUnits[0],1/le.pixelsToGLUnits[1]]}},us=(ue,w,B,Q,ee,le)=>{let ze=ue.lineAtlas,Ze=il(w,ue.transform),ut=B.layout.get("line-cap")==="round",Mt=ze.getDash(Q.from,ut),Jt=ze.getDash(Q.to,ut),$t=Mt.width*ee.fromScale,mr=Jt.width*ee.toScale;return a.e(ll(ue,w,B,le),{u_patternscale_a:[Ze/$t,-Mt.height/2],u_patternscale_b:[Ze/mr,-Jt.height/2],u_sdfgamma:ze.width/(256*Math.min($t,mr)*ue.pixelRatio)/2,u_image:0,u_tex_y_a:Mt.y,u_tex_y_b:Jt.y,u_mix:ee.t})};function il(ue,w){return 1/Fn(ue,1,w.tileZoom)}function As(ue,w,B,Q){return ue.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}let cl=(ue,w,B,Q,ee)=>{return{u_matrix:ue,u_tl_parent:w,u_scale_parent:B,u_buffer_scale:1,u_fade_t:Q.mix,u_opacity:Q.opacity*ee.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ee.paint.get("raster-brightness-min"),u_brightness_high:ee.paint.get("raster-brightness-max"),u_saturation_factor:(ze=ee.paint.get("raster-saturation"),ze>0?1-1/(1.001-ze):-ze),u_contrast_factor:(le=ee.paint.get("raster-contrast"),le>0?1/(1-le):1+le),u_spin_weights:Ks(ee.paint.get("raster-hue-rotate"))};var le,ze};function Ks(ue){ue*=Math.PI/180;let w=Math.sin(ue),B=Math.cos(ue);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let zs=(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr)=>{let ve=ze.transform;return{u_is_size_zoom_constant:+(ue==="constant"||ue==="source"),u_is_size_feature_constant:+(ue==="constant"||ue==="camera"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:ve.cameraToCenterDistance,u_pitch:ve.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:ve.width/ve.height,u_fade_change:ze.options.fadeDuration?ze.symbolFadeChange:1,u_matrix:Ze,u_label_plane_matrix:ut,u_coord_matrix:Mt,u_is_text:+$t,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:le,u_texsize:mr,u_texture:0,u_translation:Jt,u_pitched_scale:Cr}},Io=(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr,ve)=>{let xe=ze.transform;return a.e(zs(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,ve),{u_gamma_scale:Q?Math.cos(xe._pitch)*xe.cameraToCenterDistance:1,u_device_pixel_ratio:ze.pixelRatio,u_is_halo:+Cr})},ls=(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr)=>a.e(Io(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,!0,$t,!0,Cr),{u_texsize_icon:mr,u_texture_icon:1}),Yl=(ue,w,B)=>({u_matrix:ue,u_opacity:w,u_color:B}),Su=(ue,w,B,Q,ee,le)=>a.e(function(ze,Ze,ut,Mt){let Jt=ut.imageManager.getPattern(ze.from.toString()),$t=ut.imageManager.getPattern(ze.to.toString()),{width:mr,height:Cr}=ut.imageManager.getPixelSize(),ve=Math.pow(2,Mt.tileID.overscaledZ),xe=Mt.tileSize*Math.pow(2,ut.transform.tileZoom)/ve,Ie=xe*(Mt.tileID.canonical.x+Mt.tileID.wrap*ve),qe=xe*Mt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Jt.tl,u_pattern_br_a:Jt.br,u_pattern_tl_b:$t.tl,u_pattern_br_b:$t.br,u_texsize:[mr,Cr],u_mix:Ze.t,u_pattern_size_a:Jt.displaySize,u_pattern_size_b:$t.displaySize,u_scale_a:Ze.fromScale,u_scale_b:Ze.toScale,u_tile_units_to_pixels:1/Fn(Mt,1,ut.transform.tileZoom),u_pixel_coord_upper:[Ie>>16,qe>>16],u_pixel_coord_lower:[65535&Ie,65535&qe]}}(Q,le,B,ee),{u_matrix:ue,u_opacity:w}),nc={fillExtrusion:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_opacity:new a.aI(ue,w.u_opacity)}),fillExtrusionPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_height_factor:new a.aI(ue,w.u_height_factor),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade),u_opacity:new a.aI(ue,w.u_opacity)}),fill:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),fillPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),fillOutline:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world)}),fillOutlinePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),circle:(ue,w)=>({u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(ue,w.u_scale_with_map),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_extrude_scale:new a.aO(ue,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_matrix:new a.aJ(ue,w.u_matrix)}),collisionBox:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_pixel_extrude_scale:new a.aO(ue,w.u_pixel_extrude_scale)}),collisionCircle:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_inv_matrix:new a.aJ(ue,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_viewport_size:new a.aO(ue,w.u_viewport_size)}),debug:(ue,w)=>({u_color:new a.aL(ue,w.u_color),u_matrix:new a.aJ(ue,w.u_matrix),u_overlay:new a.aH(ue,w.u_overlay),u_overlay_scale:new a.aI(ue,w.u_overlay_scale)}),clippingMask:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),heatmap:(ue,w)=>({u_extrude_scale:new a.aI(ue,w.u_extrude_scale),u_intensity:new a.aI(ue,w.u_intensity),u_matrix:new a.aJ(ue,w.u_matrix)}),heatmapTexture:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_color_ramp:new a.aH(ue,w.u_color_ramp),u_opacity:new a.aI(ue,w.u_opacity)}),hillshade:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_latrange:new a.aO(ue,w.u_latrange),u_light:new a.aO(ue,w.u_light),u_shadow:new a.aL(ue,w.u_shadow),u_highlight:new a.aL(ue,w.u_highlight),u_accent:new a.aL(ue,w.u_accent)}),hillshadePrepare:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_dimension:new a.aO(ue,w.u_dimension),u_zoom:new a.aI(ue,w.u_zoom),u_unpack:new a.aK(ue,w.u_unpack)}),line:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels)}),lineGradient:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_image:new a.aH(ue,w.u_image),u_image_height:new a.aI(ue,w.u_image_height)}),linePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texsize:new a.aO(ue,w.u_texsize),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_image:new a.aH(ue,w.u_image),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),lineSDF:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_patternscale_a:new a.aO(ue,w.u_patternscale_a),u_patternscale_b:new a.aO(ue,w.u_patternscale_b),u_sdfgamma:new a.aI(ue,w.u_sdfgamma),u_image:new a.aH(ue,w.u_image),u_tex_y_a:new a.aI(ue,w.u_tex_y_a),u_tex_y_b:new a.aI(ue,w.u_tex_y_b),u_mix:new a.aI(ue,w.u_mix)}),raster:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_tl_parent:new a.aO(ue,w.u_tl_parent),u_scale_parent:new a.aI(ue,w.u_scale_parent),u_buffer_scale:new a.aI(ue,w.u_buffer_scale),u_fade_t:new a.aI(ue,w.u_fade_t),u_opacity:new a.aI(ue,w.u_opacity),u_image0:new a.aH(ue,w.u_image0),u_image1:new a.aH(ue,w.u_image1),u_brightness_low:new a.aI(ue,w.u_brightness_low),u_brightness_high:new a.aI(ue,w.u_brightness_high),u_saturation_factor:new a.aI(ue,w.u_saturation_factor),u_contrast_factor:new a.aI(ue,w.u_contrast_factor),u_spin_weights:new a.aN(ue,w.u_spin_weights)}),symbolIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolSDF:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolTextAndIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texsize_icon:new a.aO(ue,w.u_texsize_icon),u_texture:new a.aH(ue,w.u_texture),u_texture_icon:new a.aH(ue,w.u_texture_icon),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),background:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_color:new a.aL(ue,w.u_color)}),backgroundPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_image:new a.aH(ue,w.u_image),u_pattern_tl_a:new a.aO(ue,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(ue,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(ue,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(ue,w.u_pattern_br_b),u_texsize:new a.aO(ue,w.u_texsize),u_mix:new a.aI(ue,w.u_mix),u_pattern_size_a:new a.aO(ue,w.u_pattern_size_a),u_pattern_size_b:new a.aO(ue,w.u_pattern_size_b),u_scale_a:new a.aI(ue,w.u_scale_a),u_scale_b:new a.aI(ue,w.u_scale_b),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(ue,w.u_tile_units_to_pixels)}),terrain:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_ele_delta:new a.aI(ue,w.u_ele_delta),u_fog_matrix:new a.aJ(ue,w.u_fog_matrix),u_fog_color:new a.aL(ue,w.u_fog_color),u_fog_ground_blend:new a.aI(ue,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(ue,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon_fog_blend:new a.aI(ue,w.u_horizon_fog_blend)}),terrainDepth:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),terrainCoords:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_terrain_coords_id:new a.aI(ue,w.u_terrain_coords_id),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),sky:(ue,w)=>({u_sky_color:new a.aL(ue,w.u_sky_color),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon:new a.aI(ue,w.u_horizon),u_sky_horizon_blend:new a.aI(ue,w.u_sky_horizon_blend)})};class bs{constructor(w,B,Q){this.context=w;let ee=w.gl;this.buffer=ee.createBuffer(),this.dynamicDraw=!!Q,this.context.unbindVAO(),w.bindElementBuffer.set(this.buffer),ee.bufferData(ee.ELEMENT_ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?ee.DYNAMIC_DRAW:ee.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(w){let B=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),B.bufferSubData(B.ELEMENT_ARRAY_BUFFER,0,w.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Rn={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class _a{constructor(w,B,Q,ee){this.length=B.length,this.attributes=Q,this.itemSize=B.bytesPerElement,this.dynamicDraw=ee,this.context=w;let le=w.gl;this.buffer=le.createBuffer(),w.bindVertexBuffer.set(this.buffer),le.bufferData(le.ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?le.DYNAMIC_DRAW:le.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(w){if(w.length!==this.length)throw new Error(`Length of new data is ${w.length}, which doesn't match current length of ${this.length}`);let B=this.context.gl;this.bind(),B.bufferSubData(B.ARRAY_BUFFER,0,w.arrayBuffer)}enableAttributes(w,B){for(let Q=0;Q<this.attributes.length;Q++){let ee=B.attributes[this.attributes[Q].name];ee!==void 0&&w.enableVertexAttribArray(ee)}}setVertexAttribPointers(w,B,Q){for(let ee=0;ee<this.attributes.length;ee++){let le=this.attributes[ee],ze=B.attributes[le.name];ze!==void 0&&w.vertexAttribPointer(ze,le.components,w[Rn[le.type]],!1,this.itemSize,le.offset+this.itemSize*(Q||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Vu=new WeakMap;function ql(ue){var w;if(Vu.has(ue))return Vu.get(ue);{let B=(w=ue.getParameter(ue.VERSION))===null||w===void 0?void 0:w.startsWith("WebGL 2.0");return Vu.set(ue,B),B}}class xo{constructor(w){this.gl=w.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(w){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Kl extends xo{getDefault(){return a.aM.transparent}set(w){let B=this.current;(w.r!==B.r||w.g!==B.g||w.b!==B.b||w.a!==B.a||this.dirty)&&(this.gl.clearColor(w.r,w.g,w.b,w.a),this.current=w,this.dirty=!1)}}class Ns extends xo{getDefault(){return 1}set(w){(w!==this.current||this.dirty)&&(this.gl.clearDepth(w),this.current=w,this.dirty=!1)}}class Hl extends xo{getDefault(){return 0}set(w){(w!==this.current||this.dirty)&&(this.gl.clearStencil(w),this.current=w,this.dirty=!1)}}class ac extends xo{getDefault(){return[!0,!0,!0,!0]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||w[2]!==B[2]||w[3]!==B[3]||this.dirty)&&(this.gl.colorMask(w[0],w[1],w[2],w[3]),this.current=w,this.dirty=!1)}}class oa extends xo{getDefault(){return!0}set(w){(w!==this.current||this.dirty)&&(this.gl.depthMask(w),this.current=w,this.dirty=!1)}}class qo extends xo{getDefault(){return 255}set(w){(w!==this.current||this.dirty)&&(this.gl.stencilMask(w),this.current=w,this.dirty=!1)}}class Oo extends xo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(w){let B=this.current;(w.func!==B.func||w.ref!==B.ref||w.mask!==B.mask||this.dirty)&&(this.gl.stencilFunc(w.func,w.ref,w.mask),this.current=w,this.dirty=!1)}}class Ol extends xo{getDefault(){let w=this.gl;return[w.KEEP,w.KEEP,w.KEEP]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||w[2]!==B[2]||this.dirty)&&(this.gl.stencilOp(w[0],w[1],w[2]),this.current=w,this.dirty=!1)}}class Pc extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.STENCIL_TEST):B.disable(B.STENCIL_TEST),this.current=w,this.dirty=!1}}class Do extends xo{getDefault(){return[0,1]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||this.dirty)&&(this.gl.depthRange(w[0],w[1]),this.current=w,this.dirty=!1)}}class rf extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.DEPTH_TEST):B.disable(B.DEPTH_TEST),this.current=w,this.dirty=!1}}class Vf extends xo{getDefault(){return this.gl.LESS}set(w){(w!==this.current||this.dirty)&&(this.gl.depthFunc(w),this.current=w,this.dirty=!1)}}class pl extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.BLEND):B.disable(B.BLEND),this.current=w,this.dirty=!1}}class Zc extends xo{getDefault(){let w=this.gl;return[w.ONE,w.ZERO]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||this.dirty)&&(this.gl.blendFunc(w[0],w[1]),this.current=w,this.dirty=!1)}}class Jl extends xo{getDefault(){return a.aM.transparent}set(w){let B=this.current;(w.r!==B.r||w.g!==B.g||w.b!==B.b||w.a!==B.a||this.dirty)&&(this.gl.blendColor(w.r,w.g,w.b,w.a),this.current=w,this.dirty=!1)}}class qs extends xo{getDefault(){return this.gl.FUNC_ADD}set(w){(w!==this.current||this.dirty)&&(this.gl.blendEquation(w),this.current=w,this.dirty=!1)}}class yu extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;w?B.enable(B.CULL_FACE):B.disable(B.CULL_FACE),this.current=w,this.dirty=!1}}class oc extends xo{getDefault(){return this.gl.BACK}set(w){(w!==this.current||this.dirty)&&(this.gl.cullFace(w),this.current=w,this.dirty=!1)}}class Cf extends xo{getDefault(){return this.gl.CCW}set(w){(w!==this.current||this.dirty)&&(this.gl.frontFace(w),this.current=w,this.dirty=!1)}}class sc extends xo{getDefault(){return null}set(w){(w!==this.current||this.dirty)&&(this.gl.useProgram(w),this.current=w,this.dirty=!1)}}class jh extends xo{getDefault(){return this.gl.TEXTURE0}set(w){(w!==this.current||this.dirty)&&(this.gl.activeTexture(w),this.current=w,this.dirty=!1)}}class Lf extends xo{getDefault(){let w=this.gl;return[0,0,w.drawingBufferWidth,w.drawingBufferHeight]}set(w){let B=this.current;(w[0]!==B[0]||w[1]!==B[1]||w[2]!==B[2]||w[3]!==B[3]||this.dirty)&&(this.gl.viewport(w[0],w[1],w[2],w[3]),this.current=w,this.dirty=!1)}}class cs extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindFramebuffer(B.FRAMEBUFFER,w),this.current=w,this.dirty=!1}}class nf extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindRenderbuffer(B.RENDERBUFFER,w),this.current=w,this.dirty=!1}}class Gf extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindTexture(B.TEXTURE_2D,w),this.current=w,this.dirty=!1}}class $l extends xo{getDefault(){return null}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.bindBuffer(B.ARRAY_BUFFER,w),this.current=w,this.dirty=!1}}class fl extends xo{getDefault(){return null}set(w){let B=this.gl;B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,w),this.current=w,this.dirty=!1}}class lc extends xo{getDefault(){return null}set(w){var B;if(w===this.current&&!this.dirty)return;let Q=this.gl;ql(Q)?Q.bindVertexArray(w):(B=Q.getExtension("OES_vertex_array_object"))===null||B===void 0||B.bindVertexArrayOES(w),this.current=w,this.dirty=!1}}class Fu extends xo{getDefault(){return 4}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.pixelStorei(B.UNPACK_ALIGNMENT,w),this.current=w,this.dirty=!1}}class Es extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,w),this.current=w,this.dirty=!1}}class Hs extends xo{getDefault(){return!1}set(w){if(w===this.current&&!this.dirty)return;let B=this.gl;B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,w),this.current=w,this.dirty=!1}}class Go extends xo{constructor(w,B){super(w),this.context=w,this.parent=B}getDefault(){return null}}class ps extends Go{setDirty(){this.dirty=!0}set(w){if(w===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let B=this.gl;B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_2D,w,0),this.current=w,this.dirty=!1}}class uc extends Go{set(w){if(w===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let B=this.gl;B.framebufferRenderbuffer(B.FRAMEBUFFER,B.DEPTH_ATTACHMENT,B.RENDERBUFFER,w),this.current=w,this.dirty=!1}}class xl extends Go{set(w){if(w===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let B=this.gl;B.framebufferRenderbuffer(B.FRAMEBUFFER,B.DEPTH_STENCIL_ATTACHMENT,B.RENDERBUFFER,w),this.current=w,this.dirty=!1}}class Gu{constructor(w,B,Q,ee,le){this.context=w,this.width=B,this.height=Q;let ze=w.gl,Ze=this.framebuffer=ze.createFramebuffer();if(this.colorAttachment=new ps(w,Ze),ee)this.depthAttachment=le?new xl(w,Ze):new uc(w,Ze);else if(le)throw new Error("Stencil cannot be set without depth");if(ze.checkFramebufferStatus(ze.FRAMEBUFFER)!==ze.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 Os{constructor(w,B,Q){this.blendFunction=w,this.blendColor=B,this.mask=Q}}Os.Replace=[1,0],Os.disabled=new Os(Os.Replace,a.aM.transparent,[!1,!1,!1,!1]),Os.unblended=new Os(Os.Replace,a.aM.transparent,[!0,!0,!0,!0]),Os.alphaBlended=new Os([1,771],a.aM.transparent,[!0,!0,!0,!0]);class od{constructor(w){var B,Q;if(this.gl=w,this.clearColor=new Kl(this),this.clearDepth=new Ns(this),this.clearStencil=new Hl(this),this.colorMask=new ac(this),this.depthMask=new oa(this),this.stencilMask=new qo(this),this.stencilFunc=new Oo(this),this.stencilOp=new Ol(this),this.stencilTest=new Pc(this),this.depthRange=new Do(this),this.depthTest=new rf(this),this.depthFunc=new Vf(this),this.blend=new pl(this),this.blendFunc=new Zc(this),this.blendColor=new Jl(this),this.blendEquation=new qs(this),this.cullFace=new yu(this),this.cullFaceSide=new oc(this),this.frontFace=new Cf(this),this.program=new sc(this),this.activeTexture=new jh(this),this.viewport=new Lf(this),this.bindFramebuffer=new cs(this),this.bindRenderbuffer=new nf(this),this.bindTexture=new Gf(this),this.bindVertexBuffer=new $l(this),this.bindElementBuffer=new fl(this),this.bindVertexArray=new lc(this),this.pixelStoreUnpack=new Fu(this),this.pixelStoreUnpackPremultiplyAlpha=new Es(this),this.pixelStoreUnpackFlipY=new Hs(this),this.extTextureFilterAnisotropic=w.getExtension("EXT_texture_filter_anisotropic")||w.getExtension("MOZ_EXT_texture_filter_anisotropic")||w.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=w.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=w.getParameter(w.MAX_TEXTURE_SIZE),ql(w)){this.HALF_FLOAT=w.HALF_FLOAT;let ee=w.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(B=w.RGBA16F)!==null&&B!==void 0?B:ee==null?void 0:ee.RGBA16F_EXT,this.RGB16F=(Q=w.RGB16F)!==null&&Q!==void 0?Q:ee==null?void 0:ee.RGB16F_EXT,w.getExtension("EXT_color_buffer_float")}else{w.getExtension("EXT_color_buffer_half_float"),w.getExtension("OES_texture_half_float_linear");let ee=w.getExtension("OES_texture_half_float");this.HALF_FLOAT=ee==null?void 0:ee.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(w,B){return new bs(this,w,B)}createVertexBuffer(w,B,Q){return new _a(this,w,B,Q)}createRenderbuffer(w,B,Q){let ee=this.gl,le=ee.createRenderbuffer();return this.bindRenderbuffer.set(le),ee.renderbufferStorage(ee.RENDERBUFFER,w,B,Q),this.bindRenderbuffer.set(null),le}createFramebuffer(w,B,Q,ee){return new Gu(this,w,B,Q,ee)}clear({color:w,depth:B,stencil:Q}){let ee=this.gl,le=0;w&&(le|=ee.COLOR_BUFFER_BIT,this.clearColor.set(w),this.colorMask.set([!0,!0,!0,!0])),B!==void 0&&(le|=ee.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(B),this.depthMask.set(!0)),Q!==void 0&&(le|=ee.STENCIL_BUFFER_BIT,this.clearStencil.set(Q),this.stencilMask.set(255)),ee.clear(le)}setCullFace(w){w.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(w.mode),this.frontFace.set(w.frontFace))}setDepthMode(w){w.func!==this.gl.ALWAYS||w.mask?(this.depthTest.set(!0),this.depthFunc.set(w.func),this.depthMask.set(w.mask),this.depthRange.set(w.range)):this.depthTest.set(!1)}setStencilMode(w){w.test.func!==this.gl.ALWAYS||w.mask?(this.stencilTest.set(!0),this.stencilMask.set(w.mask),this.stencilOp.set([w.fail,w.depthFail,w.pass]),this.stencilFunc.set({func:w.test.func,ref:w.ref,mask:w.test.mask})):this.stencilTest.set(!1)}setColorMode(w){a.aE(w.blendFunction,Os.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 ql(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 ql(this.gl)?this.gl.deleteVertexArray(w):(B=this.gl.getExtension("OES_vertex_array_object"))===null||B===void 0?void 0:B.deleteVertexArrayOES(w)}unbindVAO(){this.bindVertexArray.set(null)}}class Po{constructor(w,B,Q){this.func=w,this.mask=B,this.range=Q}}Po.ReadOnly=!1,Po.ReadWrite=!0,Po.disabled=new Po(519,Po.ReadOnly,[0,1]);let sd=7680;class Ko{constructor(w,B,Q,ee,le,ze){this.test=w,this.ref=B,this.mask=Q,this.fail=ee,this.depthFail=le,this.pass=ze}}Ko.disabled=new Ko({func:519,mask:0},0,0,sd,sd,sd);class Pa{constructor(w,B,Q){this.enable=w,this.mode=B,this.frontFace=Q}}let af;function Hu(ue,w,B,Q,ee){let le=ue.context,ze=le.gl,Ze=ue.useProgram("collisionBox"),ut=[],Mt=0,Jt=0;for(let qe=0;qe<Q.length;qe++){let Qe=Q[qe],Xe=w.getTile(Qe).getBucket(B);if(!Xe)continue;let nt=ee?Xe.textCollisionBox:Xe.iconCollisionBox,qt=Xe.collisionCircleArray;if(qt.length>0){let jt=a.H();a.aQ(jt,Xe.placementInvProjMatrix,ue.transform.glCoordMatrix),a.aQ(jt,jt,Xe.placementViewportMatrix),ut.push({circleArray:qt,circleOffset:Jt,transform:Qe.posMatrix,invTransform:jt,coord:Qe}),Mt+=qt.length/4,Jt=Mt}nt&&Ze.draw(le,ze.LINES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,{u_matrix:Qe.posMatrix,u_pixel_extrude_scale:[1/($t=ue.transform).width,1/$t.height]},ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(Qe),B.id,nt.layoutVertexBuffer,nt.indexBuffer,nt.segments,null,ue.transform.zoom,null,null,nt.collisionVertexBuffer)}var $t;if(!ee||!ut.length)return;let mr=ue.useProgram("collisionCircle"),Cr=new a.aR;Cr.resize(4*Mt),Cr._trim();let ve=0;for(let qe of ut)for(let Qe=0;Qe<qe.circleArray.length/4;Qe++){let Xe=4*Qe,nt=qe.circleArray[Xe+0],qt=qe.circleArray[Xe+1],jt=qe.circleArray[Xe+2],ar=qe.circleArray[Xe+3];Cr.emplace(ve++,nt,qt,jt,ar,0),Cr.emplace(ve++,nt,qt,jt,ar,1),Cr.emplace(ve++,nt,qt,jt,ar,2),Cr.emplace(ve++,nt,qt,jt,ar,3)}(!af||af.length<2*Mt)&&(af=function(qe){let Qe=2*qe,Xe=new a.aT;Xe.resize(Qe),Xe._trim();for(let nt=0;nt<Qe;nt++){let qt=6*nt;Xe.uint16[qt+0]=4*nt+0,Xe.uint16[qt+1]=4*nt+1,Xe.uint16[qt+2]=4*nt+2,Xe.uint16[qt+3]=4*nt+2,Xe.uint16[qt+4]=4*nt+3,Xe.uint16[qt+5]=4*nt+0}return Xe}(Mt));let xe=le.createIndexBuffer(af,!0),Ie=le.createVertexBuffer(Cr,a.aS.members,!0);for(let qe of ut){let Qe=No(qe.transform,qe.invTransform,ue.transform);mr.draw(le,ze.TRIANGLES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,Qe,ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(qe.coord),B.id,Ie,xe,a.a0.simpleSegment(0,2*qe.circleOffset,qe.circleArray.length,qe.circleArray.length/2),null,ue.transform.zoom,null,null,null)}Ie.destroy(),xe.destroy()}Pa.disabled=new Pa(!1,1029,2305),Pa.backCCW=new Pa(!0,1029,2305);let bl=a.an(new Float32Array(16));function Hf(ue,w,B,Q,ee,le){let{horizontalAlign:ze,verticalAlign:Ze}=a.au(ue);return new a.P((-(ze-.5)*w/ee+Q[0])*le,(-(Ze-.5)*B/ee+Q[1])*le)}function Ic(ue,w,B,Q,ee,le){let ze=w.tileAnchorPoint.add(new a.P(w.translation[0],w.translation[1]));if(w.pitchWithMap){let Ze=Q.mult(le);B||(Ze=Ze.rotate(-ee));let ut=ze.add(Ze);return gt(ut.x,ut.y,w.labelPlaneMatrix,w.getElevation).point}if(B){let Ze=Sr(w.tileAnchorPoint.x+1,w.tileAnchorPoint.y,w).point.sub(ue),ut=Math.atan(Ze.y/Ze.x)+(Ze.x<0?Math.PI:0);return ue.add(Q.rotate(ut))}return ue.add(Q)}function yf(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr){let ve=ue.text.placedSymbolArray,xe=ue.text.dynamicLayoutVertexArray,Ie=ue.icon.dynamicLayoutVertexArray,qe={};xe.clear();for(let Qe=0;Qe<ve.length;Qe++){let Xe=ve.get(Qe),nt=Xe.hidden||!Xe.crossTileID||ue.allowVerticalPlacement&&!Xe.placedOrientation?null:Q[Xe.crossTileID];if(nt){let qt=new a.P(Xe.anchorX,Xe.anchorY),jt={getElevation:Cr,width:ee.width,height:ee.height,labelPlaneMatrix:le,lineVertexArray:null,pitchWithMap:B,projection:Jt,projectionCache:null,tileAnchorPoint:qt,translation:$t,unwrappedTileID:mr},ar=B?gt(qt.x,qt.y,ze,Cr):Sr(qt.x,qt.y,jt),fr=Ge(ee.cameraToCenterDistance,ar.signedDistanceFromCamera),br=a.ai(ue.textSizeData,ut,Xe)*fr/a.ap;B&&(br*=ue.tilePixelRatio/Ze);let{width:Fr,height:Hr,anchor:ri,textOffset:Ci,textBoxScale:cn}=nt,sn=Hf(ri,Fr,Hr,Ci,cn,br),Ln=Jt.getPitchedTextCorrection(ee,qt.add(new a.P($t[0],$t[1])),mr),Yn=Ic(ar.point,jt,w,sn,ee.angle,Ln),Aa=ue.allowVerticalPlacement&&Xe.placedOrientation===a.ah.vertical?Math.PI/2:0;for(let fa=0;fa<Xe.numGlyphs;fa++)a.aj(xe,Yn,Aa);Mt&&Xe.associatedIconIndex>=0&&(qe[Xe.associatedIconIndex]={shiftedAnchor:Yn,angle:Aa})}else Pi(Xe.numGlyphs,xe)}if(Mt){Ie.clear();let Qe=ue.icon.placedSymbolArray;for(let Xe=0;Xe<Qe.length;Xe++){let nt=Qe.get(Xe);if(nt.hidden)Pi(nt.numGlyphs,Ie);else{let qt=qe[Xe];if(qt)for(let jt=0;jt<nt.numGlyphs;jt++)a.aj(Ie,qt.shiftedAnchor,qt.angle);else Pi(nt.numGlyphs,Ie)}}ue.icon.dynamicLayoutVertexBuffer.updateData(Ie)}ue.text.dynamicLayoutVertexBuffer.updateData(xe)}function Bl(ue,w,B){return B.iconsInText&&w?"symbolTextAndIcon":ue?"symbolSDF":"symbolIcon"}function Ah(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t){let mr=ue.context,Cr=mr.gl,ve=ue.transform,xe=yn(),Ie=Ze==="map",qe=ut==="map",Qe=Ze!=="viewport"&&B.layout.get("symbol-placement")!=="point",Xe=Ie&&!qe&&!Qe,nt=!qe&&Qe,qt=!B.layout.get("symbol-sort-key").isConstant(),jt=!1,ar=ue.depthModeForSublayer(0,Po.ReadOnly),fr=B._unevaluatedLayout.hasValue("text-variable-anchor")||B._unevaluatedLayout.hasValue("text-variable-anchor-offset"),br=[],Fr=xe.getCircleRadiusCorrection(ve);for(let Hr of Q){let ri=w.getTile(Hr),Ci=ri.getBucket(B);if(!Ci)continue;let cn=ee?Ci.text:Ci.icon;if(!cn||!cn.segments.get().length||!cn.hasVisibleVertices)continue;let sn=cn.programConfigurations.get(B.id),Ln=ee||Ci.sdfIcons,Yn=ee?Ci.textSizeData:Ci.iconSizeData,Aa=qe||ve.pitch!==0,fa=ue.useProgram(Bl(Ln,ee,Ci),sn),$a=a.ag(Yn,ve.zoom),Co=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(Hr),Qa,mo,Bo,Ps,Ts=[0,0],wo=null;if(ee)mo=ri.glyphAtlasTexture,Bo=Cr.LINEAR,Qa=ri.glyphAtlasTexture.size,Ci.iconsInText&&(Ts=ri.imageAtlasTexture.size,wo=ri.imageAtlasTexture,Ps=Aa||ue.options.rotating||ue.options.zooming||Yn.kind==="composite"||Yn.kind==="camera"?Cr.LINEAR:Cr.NEAREST);else{let Ye=B.layout.get("icon-size").constantOr(0)!==1||Ci.iconsNeedLinear;mo=ri.imageAtlasTexture,Bo=Ln||ue.options.rotating||ue.options.zooming||Ye||Aa?Cr.LINEAR:Cr.NEAREST,Qa=ri.imageAtlasTexture.size}let To=Fn(ri,1,ue.transform.zoom),hl=nt?Hr.posMatrix:bl,Ul=qr(hl,qe,Ie,ue.transform,To),Lu=jr(hl,qe,Ie,ue.transform,To),au=jr(Hr.posMatrix,qe,Ie,ue.transform,To),Js=xe.translatePosition(ue.transform,ri,le,ze),eu=fr&&Ci.hasTextData(),dc=B.layout.get("icon-text-fit")!=="none"&&eu&&Ci.hasIconData();if(Qe){let Ye=ue.style.map.terrain?(at,Wt)=>ue.style.map.terrain.getElevation(Hr,at,Wt):null,Pt=B.layout.get("text-rotation-alignment")==="map";We(Ci,Hr.posMatrix,ue,ee,Ul,au,qe,Mt,Pt,xe,Hr.toUnwrapped(),ve.width,ve.height,Js,Ye)}let Tl=Hr.posMatrix,Al=ee&&fr||dc,X=Qe||Al?bl:Ul,se=Lu,Te=Ln&&B.paint.get(ee?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Oe;Oe=Ln?Ci.iconsInText?ls(Yn.kind,$a,Xe,qe,Qe,Al,ue,Tl,X,se,Js,Qa,Ts,Fr):Io(Yn.kind,$a,Xe,qe,Qe,Al,ue,Tl,X,se,Js,ee,Qa,!0,Fr):zs(Yn.kind,$a,Xe,qe,Qe,Al,ue,Tl,X,se,Js,ee,Qa,Fr);let Ve={program:fa,buffers:cn,uniformValues:Oe,atlasTexture:mo,atlasTextureIcon:wo,atlasInterpolation:Bo,atlasInterpolationIcon:Ps,isSDF:Ln,hasHalo:Te};if(qt&&Ci.canOverlap){jt=!0;let Ye=cn.segments.get();for(let Pt of Ye)br.push({segments:new a.a0([Pt]),sortKey:Pt.sortKey,state:Ve,terrainData:Co})}else br.push({segments:cn.segments,sortKey:0,state:Ve,terrainData:Co})}jt&&br.sort((Hr,ri)=>Hr.sortKey-ri.sortKey);for(let Hr of br){let ri=Hr.state;if(mr.activeTexture.set(Cr.TEXTURE0),ri.atlasTexture.bind(ri.atlasInterpolation,Cr.CLAMP_TO_EDGE),ri.atlasTextureIcon&&(mr.activeTexture.set(Cr.TEXTURE1),ri.atlasTextureIcon&&ri.atlasTextureIcon.bind(ri.atlasInterpolationIcon,Cr.CLAMP_TO_EDGE)),ri.isSDF){let Ci=ri.uniformValues;ri.hasHalo&&(Ci.u_is_halo=1,Qf(ri.buffers,Hr.segments,B,ue,ri.program,ar,Jt,$t,Ci,Hr.terrainData)),Ci.u_is_halo=0}Qf(ri.buffers,Hr.segments,B,ue,ri.program,ar,Jt,$t,ri.uniformValues,Hr.terrainData)}}function Qf(ue,w,B,Q,ee,le,ze,Ze,ut,Mt){let Jt=Q.context;ee.draw(Jt,Jt.gl.TRIANGLES,le,ze,Ze,Pa.disabled,ut,Mt,B.id,ue.layoutVertexBuffer,ue.indexBuffer,w,B.paint,Q.transform.zoom,ue.programConfigurations.get(B.id),ue.dynamicLayoutVertexBuffer,ue.opacityVertexBuffer)}function _f(ue,w,B,Q){let ee=ue.context,le=ee.gl,ze=Ko.disabled,Ze=new Os([le.ONE,le.ONE],a.aM.transparent,[!0,!0,!0,!0]),ut=w.getBucket(B);if(!ut)return;let Mt=Q.key,Jt=B.heatmapFbos.get(Mt);Jt||(Jt=eh(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(Mt,Jt)),ee.bindFramebuffer.set(Jt.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let $t=ut.programConfigurations.get(B.id),mr=ue.useProgram("heatmap",$t),Cr=ue.style.map.terrain.getTerrainData(Q);mr.draw(ee,le.TRIANGLES,Po.disabled,ze,Ze,Pa.disabled,ko(Q.posMatrix,w,ue.transform.zoom,B.paint.get("heatmap-intensity")),Cr,B.id,ut.layoutVertexBuffer,ut.indexBuffer,ut.segments,B.paint,ue.transform.zoom,$t)}function Yc(ue,w,B){let Q=ue.context,ee=Q.gl;Q.setColorMode(ue.colorModeForRenderPass());let le=th(Q,w),ze=B.key,Ze=w.heatmapFbos.get(ze);Ze&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Ze.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),le.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),ue.useProgram("heatmapTexture").draw(Q,ee.TRIANGLES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,Ds(ue,w,0,1),null,w.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments,w.paint,ue.transform.zoom),Ze.destroy(),w.heatmapFbos.delete(ze))}function eh(ue,w,B){var Q,ee;let le=ue.gl,ze=le.createTexture();le.bindTexture(le.TEXTURE_2D,ze),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,le.LINEAR),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,le.LINEAR);let Ze=(Q=ue.HALF_FLOAT)!==null&&Q!==void 0?Q:le.UNSIGNED_BYTE,ut=(ee=ue.RGBA16F)!==null&&ee!==void 0?ee:le.RGBA;le.texImage2D(le.TEXTURE_2D,0,ut,w,B,0,le.RGBA,Ze,null);let Mt=ue.createFramebuffer(w,B,!1,!1);return Mt.colorAttachment.set(ze),Mt}function th(ue,w){return w.colorRampTexture||(w.colorRampTexture=new g(ue,w.colorRamp,ue.gl.RGBA)),w.colorRampTexture}function ju(ue,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let le=Q.imageAtlas.patternPositions,ze=le[B.to.toString()],Ze=le[B.from.toString()];if(!ze&&Ze&&(ze=Ze),!Ze&&ze&&(Ze=ze),!ze||!Ze){let ut=ee.getPaintProperty(w);ze=le[ut],Ze=le[ut]}ze&&Ze&&ue.setConstantPatternPositions(ze,Ze)}function jf(ue,w,B,Q,ee,le,ze){let Ze=ue.context.gl,ut="fill-pattern",Mt=B.paint.get(ut),Jt=Mt&&Mt.constantOr(1),$t=B.getCrossfadeParameters(),mr,Cr,ve,xe,Ie;ze?(Cr=Jt&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",mr=Ze.LINES):(Cr=Jt?"fillPattern":"fill",mr=Ze.TRIANGLES);let qe=Mt.constantOr(null);for(let Qe of Q){let Xe=w.getTile(Qe);if(Jt&&!Xe.patternsLoaded())continue;let nt=Xe.getBucket(B);if(!nt)continue;let qt=nt.programConfigurations.get(B.id),jt=ue.useProgram(Cr,qt),ar=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(Qe);Jt&&(ue.context.activeTexture.set(Ze.TEXTURE0),Xe.imageAtlasTexture.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE),qt.updatePaintBuffers($t)),ju(qt,ut,qe,Xe,B);let fr=ar?Qe:null,br=ue.translatePosMatrix(fr?fr.posMatrix:Qe.posMatrix,Xe,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(ze){xe=nt.indexBuffer2,Ie=nt.segments2;let Fr=[Ze.drawingBufferWidth,Ze.drawingBufferHeight];ve=Cr==="fillOutlinePattern"&&Jt?Ma(br,ue,$t,Xe,Fr):ea(br,Fr)}else xe=nt.indexBuffer,Ie=nt.segments,ve=Jt?ya(br,ue,$t,Xe):_n(br);jt.draw(ue.context,mr,ee,ue.stencilModeForClipping(Qe),le,Pa.disabled,ve,ar,B.id,nt.layoutVertexBuffer,xe,Ie,B.paint,ue.transform.zoom,qt)}}function cc(ue,w,B,Q,ee,le,ze){let Ze=ue.context,ut=Ze.gl,Mt="fill-extrusion-pattern",Jt=B.paint.get(Mt),$t=Jt.constantOr(1),mr=B.getCrossfadeParameters(),Cr=B.paint.get("fill-extrusion-opacity"),ve=Jt.constantOr(null);for(let xe of Q){let Ie=w.getTile(xe),qe=Ie.getBucket(B);if(!qe)continue;let Qe=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(xe),Xe=qe.programConfigurations.get(B.id),nt=ue.useProgram($t?"fillExtrusionPattern":"fillExtrusion",Xe);$t&&(ue.context.activeTexture.set(ut.TEXTURE0),Ie.imageAtlasTexture.bind(ut.LINEAR,ut.CLAMP_TO_EDGE),Xe.updatePaintBuffers(mr)),ju(Xe,Mt,ve,Ie,B);let qt=ue.translatePosMatrix(xe.posMatrix,Ie,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),jt=B.paint.get("fill-extrusion-vertical-gradient"),ar=$t?ki(qt,ue,jt,Cr,xe,mr,Ie):En(qt,ue,jt,Cr);nt.draw(Ze,Ze.gl.TRIANGLES,ee,le,ze,Pa.backCCW,ar,Qe,B.id,qe.layoutVertexBuffer,qe.indexBuffer,qe.segments,B.paint,ue.transform.zoom,Xe,ue.style.map.terrain&&qe.centroidVertexBuffer)}}function of(ue,w,B,Q,ee,le,ze){let Ze=ue.context,ut=Ze.gl,Mt=B.fbo;if(!Mt)return;let Jt=ue.useProgram("hillshade"),$t=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(w);Ze.activeTexture.set(ut.TEXTURE0),ut.bindTexture(ut.TEXTURE_2D,Mt.colorAttachment.get()),Jt.draw(Ze,ut.TRIANGLES,ee,le,ze,Pa.disabled,((mr,Cr,ve,xe)=>{let Ie=ve.paint.get("hillshade-shadow-color"),qe=ve.paint.get("hillshade-highlight-color"),Qe=ve.paint.get("hillshade-accent-color"),Xe=ve.paint.get("hillshade-illumination-direction")*(Math.PI/180);ve.paint.get("hillshade-illumination-anchor")==="viewport"&&(Xe-=mr.transform.angle);let nt=!mr.options.moving;return{u_matrix:xe?xe.posMatrix:mr.transform.calculatePosMatrix(Cr.tileID.toUnwrapped(),nt),u_image:0,u_latrange:Fs(0,Cr.tileID),u_light:[ve.paint.get("hillshade-exaggeration"),Xe],u_shadow:Ie,u_highlight:qe,u_accent:Qe}})(ue,B,Q,$t?w:null),$t,Q.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments)}function Nl(ue,w,B,Q,ee,le){let ze=ue.context,Ze=ze.gl,ut=w.dem;if(ut&&ut.data){let Mt=ut.dim,Jt=ut.stride,$t=ut.getPixels();if(ze.activeTexture.set(Ze.TEXTURE1),ze.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||ue.getTileTexture(Jt),w.demTexture){let Cr=w.demTexture;Cr.update($t,{premultiply:!1}),Cr.bind(Ze.NEAREST,Ze.CLAMP_TO_EDGE)}else w.demTexture=new g(ze,$t,Ze.RGBA,{premultiply:!1}),w.demTexture.bind(Ze.NEAREST,Ze.CLAMP_TO_EDGE);ze.activeTexture.set(Ze.TEXTURE0);let mr=w.fbo;if(!mr){let Cr=new g(ze,{width:Mt,height:Mt,data:null},Ze.RGBA);Cr.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE),mr=w.fbo=ze.createFramebuffer(Mt,Mt,!0,!1),mr.colorAttachment.set(Cr.texture)}ze.bindFramebuffer.set(mr.framebuffer),ze.viewport.set([0,0,Mt,Mt]),ue.useProgram("hillshadePrepare").draw(ze,Ze.TRIANGLES,Q,ee,le,Pa.disabled,((Cr,ve)=>{let xe=ve.stride,Ie=a.H();return a.aP(Ie,0,a.X,-a.X,0,0,1),a.J(Ie,Ie,[0,-a.X,0]),{u_matrix:Ie,u_image:1,u_dimension:[xe,xe],u_zoom:Cr.overscaledZ,u_unpack:ve.getUnpackVector()}})(w.tileID,ut),null,B.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function Kc(ue,w,B,Q,ee,le){let ze=Q.paint.get("raster-fade-duration");if(!le&&ze>0){let Ze=u.now(),ut=(Ze-ue.timeAdded)/ze,Mt=w?(Ze-w.timeAdded)/ze:-1,Jt=B.getSource(),$t=ee.coveringZoomLevel({tileSize:Jt.tileSize,roundZoom:Jt.roundZoom}),mr=!w||Math.abs(w.tileID.overscaledZ-$t)>Math.abs(ue.tileID.overscaledZ-$t),Cr=mr&&ue.refreshedUponExpiration?1:a.ac(mr?ut:1-Mt,0,1);return ue.refreshedUponExpiration&&ut>=1&&(ue.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Cr}:{opacity:Cr,mix:0}}return{opacity:1,mix:0}}let Rc=new a.aM(1,0,0,1),gs=new a.aM(0,1,0,1),Wf=new a.aM(0,0,1,1),Wh=new a.aM(1,0,1,1),rh=new a.aM(0,1,1,1);function sf(ue,w,B,Q){Mu(ue,0,w+B/2,ue.transform.width,B,Q)}function Sh(ue,w,B,Q){Mu(ue,w-B/2,0,B,ue.transform.height,Q)}function Mu(ue,w,B,Q,ee,le){let ze=ue.context,Ze=ze.gl;Ze.enable(Ze.SCISSOR_TEST),Ze.scissor(w*ue.pixelRatio,B*ue.pixelRatio,Q*ue.pixelRatio,ee*ue.pixelRatio),ze.clear({color:le}),Ze.disable(Ze.SCISSOR_TEST)}function ih(ue,w,B){let Q=ue.context,ee=Q.gl,le=B.posMatrix,ze=ue.useProgram("debug"),Ze=Po.disabled,ut=Ko.disabled,Mt=ue.colorModeForRenderPass(),Jt="$debug",$t=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let mr=w.getTileByID(B.key).latestRawTileData,Cr=Math.floor((mr&&mr.byteLength||0)/1024),ve=w.getTile(B).tileSize,xe=512/Math.min(ve,512)*(B.overscaledZ/ue.transform.zoom)*.5,Ie=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(Ie+=` => ${B.overscaledZ}`),function(qe,Qe){qe.initDebugOverlayCanvas();let Xe=qe.debugOverlayCanvas,nt=qe.context.gl,qt=qe.debugOverlayCanvas.getContext("2d");qt.clearRect(0,0,Xe.width,Xe.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(Qe,5,5),qt.strokeText(Qe,5,5),qe.debugOverlayTexture.update(Xe),qe.debugOverlayTexture.bind(nt.LINEAR,nt.CLAMP_TO_EDGE)}(ue,`${Ie} ${Cr}kB`),ze.draw(Q,ee.TRIANGLES,Ze,ut,Os.alphaBlended,Pa.disabled,po(le,a.aM.transparent,xe),null,Jt,ue.debugBuffer,ue.quadTriangleIndexBuffer,ue.debugSegments),ze.draw(Q,ee.LINE_STRIP,Ze,ut,Mt,Pa.disabled,po(le,a.aM.red),$t,Jt,ue.debugBuffer,ue.tileBorderIndexBuffer,ue.debugSegments)}function js(ue,w,B){let Q=ue.context,ee=Q.gl,le=ue.colorModeForRenderPass(),ze=new Po(ee.LEQUAL,Po.ReadWrite,ue.depthRangeFor3D),Ze=ue.useProgram("terrain"),ut=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,ue.width,ue.height]);for(let Mt of B){let Jt=ue.renderToTexture.getTexture(Mt),$t=w.getTerrainData(Mt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Jt.texture);let mr=ue.transform.calculatePosMatrix(Mt.tileID.toUnwrapped()),Cr=w.getMeshFrameDelta(ue.transform.zoom),ve=ue.transform.calculateFogMatrix(Mt.tileID.toUnwrapped()),xe=Jr(mr,Cr,ve,ue.style.sky,ue.transform.pitch);Ze.draw(Q,ee.TRIANGLES,ze,Ko.disabled,le,Pa.backCCW,xe,$t,"terrain",ut.vertexBuffer,ut.indexBuffer,ut.segments)}}class Eu{constructor(w,B,Q){this.vertexBuffer=w,this.indexBuffer=B,this.segments=Q}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Dc{constructor(w,B){this.context=new od(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=pt.maxUnderzooming+pt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Xo}resize(w,B,Q){if(this.width=Math.floor(w*Q),this.height=Math.floor(B*Q),this.pixelRatio=Q,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let ee of this.style._order)this.style._layers[ee].resize()}setup(){let w=this.context,B=new a.aX;B.emplaceBack(0,0),B.emplaceBack(a.X,0),B.emplaceBack(0,a.X),B.emplaceBack(a.X,a.X),this.tileExtentBuffer=w.createVertexBuffer(B,vo.members),this.tileExtentSegments=a.a0.simpleSegment(0,0,4,2);let Q=new a.aX;Q.emplaceBack(0,0),Q.emplaceBack(a.X,0),Q.emplaceBack(0,a.X),Q.emplaceBack(a.X,a.X),this.debugBuffer=w.createVertexBuffer(Q,vo.members),this.debugSegments=a.a0.simpleSegment(0,0,4,5);let ee=new a.$;ee.emplaceBack(0,0,0,0),ee.emplaceBack(a.X,0,a.X,0),ee.emplaceBack(0,a.X,0,a.X),ee.emplaceBack(a.X,a.X,a.X,a.X),this.rasterBoundsBuffer=w.createVertexBuffer(ee,ct.members),this.rasterBoundsSegments=a.a0.simpleSegment(0,0,4,2);let le=new a.aX;le.emplaceBack(0,0),le.emplaceBack(1,0),le.emplaceBack(0,1),le.emplaceBack(1,1),this.viewportBuffer=w.createVertexBuffer(le,vo.members),this.viewportSegments=a.a0.simpleSegment(0,0,4,2);let ze=new a.aZ;ze.emplaceBack(0),ze.emplaceBack(1),ze.emplaceBack(3),ze.emplaceBack(2),ze.emplaceBack(0),this.tileBorderIndexBuffer=w.createIndexBuffer(ze);let Ze=new a.aY;Ze.emplaceBack(0,1,2),Ze.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer(Ze);let ut=this.context.gl;this.stencilClearMode=new Ko({func:ut.ALWAYS,mask:0},0,255,ut.ZERO,ut.ZERO,ut.ZERO)}clearStencil(){let w=this.context,B=w.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Q=a.H();a.aP(Q,0,this.width,this.height,0,0,1),a.K(Q,Q,[B.drawingBufferWidth,B.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(w,B.TRIANGLES,Po.disabled,this.stencilClearMode,Os.disabled,Pa.disabled,Lo(Q),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(w,B){if(this.currentStencilSource===w.source||!w.isTileClipped()||!B||!B.length)return;this.currentStencilSource=w.source;let Q=this.context,ee=Q.gl;this.nextStencilID+B.length>256&&this.clearStencil(),Q.setColorMode(Os.disabled),Q.setDepthMode(Po.disabled);let le=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let ze of B){let Ze=this._tileClippingMaskIDs[ze.key]=this.nextStencilID++,ut=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ze);le.draw(Q,ee.TRIANGLES,Po.disabled,new Ko({func:ee.ALWAYS,mask:0},Ze,255,ee.KEEP,ee.KEEP,ee.REPLACE),Os.disabled,Pa.disabled,Lo(ze.posMatrix),ut,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let w=this.nextStencilID++,B=this.context.gl;return new Ko({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new Ko({func:B.EQUAL,mask:255},this._tileClippingMaskIDs[w.key],0,B.KEEP,B.KEEP,B.REPLACE)}stencilConfigForOverlap(w){let B=this.context.gl,Q=w.sort((ze,Ze)=>Ze.overscaledZ-ze.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 ze={};for(let Ze=0;Ze<le;Ze++)ze[Ze+ee]=new Ko({func:B.GEQUAL,mask:255},Ze+this.nextStencilID,255,B.KEEP,B.KEEP,B.REPLACE);return this.nextStencilID+=le,[ze,Q]}return[{[ee]:Ko.disabled},Q]}colorModeForRenderPass(){let w=this.context.gl;return this._showOverdrawInspector?new Os([w.CONSTANT_COLOR,w.ONE],new a.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Os.unblended:Os.alphaBlended}depthModeForSublayer(w,B,Q){if(!this.opaquePassEnabledForLayer())return Po.disabled;let ee=1-((1+this.currentLayer)*this.numSublayers+w)*this.depthEpsilon;return new Po(Q||this.context.gl.LEQUAL,B,[ee,ee])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(w,B){this.style=w,this.options=B,this.lineAtlas=w.lineAtlas,this.imageManager=w.imageManager,this.glyphManager=w.glyphManager,this.symbolFadeChange=w.placement.symbolFadeChange(u.now()),this.imageManager.beginFrame();let Q=this.style._order,ee=this.style.sourceCaches,le={},ze={},Ze={};for(let ut in ee){let Mt=ee[ut];Mt.used&&Mt.prepare(this.context),le[ut]=Mt.getVisibleCoordinates(),ze[ut]=le[ut].slice().reverse(),Ze[ut]=Mt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let ut=0;ut<Q.length;ut++)if(this.style._layers[Q[ut]].is3D()){this.opaquePassCutoff=ut;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(let ut of Q){let Mt=this.style._layers[ut];if(!Mt.hasOffscreenPass()||Mt.isHidden(this.transform.zoom))continue;let Jt=ze[Mt.source];(Mt.type==="custom"||Jt.length)&&this.renderLayer(this,ee[Mt.source],Mt,Jt)}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(ut,Mt){let Jt=ut.context,$t=Jt.gl,mr=((qe,Qe,Xe)=>({u_sky_color:qe.properties.get("sky-color"),u_horizon_color:qe.properties.get("horizon-color"),u_horizon:(Qe.height/2+Qe.getHorizon())*Xe,u_sky_horizon_blend:qe.properties.get("sky-horizon-blend")*Qe.height/2*Xe}))(Mt,ut.style.map.transform,ut.pixelRatio),Cr=new Po($t.LEQUAL,Po.ReadWrite,[0,1]),ve=Ko.disabled,xe=ut.colorModeForRenderPass(),Ie=ut.useProgram("sky");if(!Mt.mesh){let qe=new a.aX;qe.emplaceBack(-1,-1),qe.emplaceBack(1,-1),qe.emplaceBack(1,1),qe.emplaceBack(-1,1);let Qe=new a.aY;Qe.emplaceBack(0,1,2),Qe.emplaceBack(0,2,3),Mt.mesh=new Eu(Jt.createVertexBuffer(qe,vo.members),Jt.createIndexBuffer(Qe),a.a0.simpleSegment(0,0,qe.length,Qe.length))}Ie.draw(Jt,$t.TRIANGLES,Cr,ve,xe,Pa.disabled,mr,void 0,"sky",Mt.mesh.vertexBuffer,Mt.mesh.indexBuffer,Mt.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 ut=this.style._layers[Q[this.currentLayer]],Mt=ee[ut.source],Jt=le[ut.source];this._renderTileClippingMasks(ut,Jt),this.renderLayer(this,Mt,ut,Jt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Q.length;this.currentLayer++){let ut=this.style._layers[Q[this.currentLayer]],Mt=ee[ut.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(ut))continue;let Jt=(ut.type==="symbol"?Ze:ze)[ut.source];this._renderTileClippingMasks(ut,le[ut.source]),this.renderLayer(this,Mt,ut,Jt)}if(this.options.showTileBoundaries){let ut=function(Mt,Jt){let $t=null,mr=Object.values(Mt._layers).flatMap(Ie=>Ie.source&&!Ie.isHidden(Jt)?[Mt.sourceCaches[Ie.source]]:[]),Cr=mr.filter(Ie=>Ie.getSource().type==="vector"),ve=mr.filter(Ie=>Ie.getSource().type!=="vector"),xe=Ie=>{(!$t||$t.getSource().maxzoom<Ie.getSource().maxzoom)&&($t=Ie)};return Cr.forEach(Ie=>xe(Ie)),$t||ve.forEach(Ie=>xe(Ie)),$t}(this.style,this.transform.zoom);ut&&function(Mt,Jt,$t){for(let mr=0;mr<$t.length;mr++)ih(Mt,Jt,$t[mr])}(this,ut,ut.getVisibleCoordinates())}this.options.showPadding&&function(ut){let Mt=ut.transform.padding;sf(ut,ut.transform.height-(Mt.top||0),3,Rc),sf(ut,Mt.bottom||0,3,gs),Sh(ut,Mt.left||0,3,Wf),Sh(ut,ut.transform.width-(Mt.right||0),3,Wh);let Jt=ut.transform.centerPoint;(function($t,mr,Cr,ve){Mu($t,mr-1,Cr-10,2,20,ve),Mu($t,mr-10,Cr-1,20,2,ve)})(ut,Jt.x,ut.transform.height-Jt.y,rh)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(w){if(!this.style||!this.style.map||!this.style.map.terrain)return;let B=this.terrainFacilitator.matrix,Q=this.transform.modelViewProjectionMatrix,ee=this.terrainFacilitator.dirty;ee||(ee=w?!a.a_(B,Q):!a.a$(B,Q)),ee||(ee=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),ee&&(a.b0(B,Q),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(le,ze){let Ze=le.context,ut=Ze.gl,Mt=Os.unblended,Jt=new Po(ut.LEQUAL,Po.ReadWrite,[0,1]),$t=ze.getTerrainMesh(),mr=ze.sourceCache.getRenderableTiles(),Cr=le.useProgram("terrainDepth");Ze.bindFramebuffer.set(ze.getFramebuffer("depth").framebuffer),Ze.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Ze.clear({color:a.aM.transparent,depth:1});for(let ve of mr){let xe=ze.getTerrainData(ve.tileID),Ie={u_matrix:le.transform.calculatePosMatrix(ve.tileID.toUnwrapped()),u_ele_delta:ze.getMeshFrameDelta(le.transform.zoom)};Cr.draw(Ze,ut.TRIANGLES,Jt,Ko.disabled,Mt,Pa.backCCW,Ie,xe,"terrain",$t.vertexBuffer,$t.indexBuffer,$t.segments)}Ze.bindFramebuffer.set(null),Ze.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain),function(le,ze){let Ze=le.context,ut=Ze.gl,Mt=Os.unblended,Jt=new Po(ut.LEQUAL,Po.ReadWrite,[0,1]),$t=ze.getTerrainMesh(),mr=ze.getCoordsTexture(),Cr=ze.sourceCache.getRenderableTiles(),ve=le.useProgram("terrainCoords");Ze.bindFramebuffer.set(ze.getFramebuffer("coords").framebuffer),Ze.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Ze.clear({color:a.aM.transparent,depth:1}),ze.coordsIndex=[];for(let xe of Cr){let Ie=ze.getTerrainData(xe.tileID);Ze.activeTexture.set(ut.TEXTURE0),ut.bindTexture(ut.TEXTURE_2D,mr.texture);let qe={u_matrix:le.transform.calculatePosMatrix(xe.tileID.toUnwrapped()),u_terrain_coords_id:(255-ze.coordsIndex.length)/255,u_texture:0,u_ele_delta:ze.getMeshFrameDelta(le.transform.zoom)};ve.draw(Ze,ut.TRIANGLES,Jt,Ko.disabled,Mt,Pa.backCCW,qe,Ie,"terrain",$t.vertexBuffer,$t.indexBuffer,$t.segments),ze.coordsIndex.push(xe.tileID.key)}Ze.bindFramebuffer.set(null),Ze.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain))}renderLayer(w,B,Q,ee){if(!Q.isHidden(this.transform.zoom)&&(Q.type==="background"||Q.type==="custom"||(ee||[]).length))switch(this.id=Q.id,Q.type){case"symbol":(function(le,ze,Ze,ut,Mt){if(le.renderPass!=="translucent")return;let Jt=Ko.disabled,$t=le.colorModeForRenderPass();(Ze._unevaluatedLayout.hasValue("text-variable-anchor")||Ze._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(mr,Cr,ve,xe,Ie,qe,Qe,Xe,nt){let qt=Cr.transform,jt=yn(),ar=Ie==="map",fr=qe==="map";for(let br of mr){let Fr=xe.getTile(br),Hr=Fr.getBucket(ve);if(!Hr||!Hr.text||!Hr.text.segments.get().length)continue;let ri=a.ag(Hr.textSizeData,qt.zoom),Ci=Fn(Fr,1,Cr.transform.zoom),cn=qr(br.posMatrix,fr,ar,Cr.transform,Ci),sn=ve.layout.get("icon-text-fit")!=="none"&&Hr.hasIconData();if(ri){let Ln=Math.pow(2,qt.zoom-Fr.tileID.overscaledZ),Yn=Cr.style.map.terrain?(fa,$a)=>Cr.style.map.terrain.getElevation(br,fa,$a):null,Aa=jt.translatePosition(qt,Fr,Qe,Xe);yf(Hr,ar,fr,nt,qt,cn,br.posMatrix,Ln,ri,sn,jt,Aa,br.toUnwrapped(),Yn)}}}(ut,le,Ze,ze,Ze.layout.get("text-rotation-alignment"),Ze.layout.get("text-pitch-alignment"),Ze.paint.get("text-translate"),Ze.paint.get("text-translate-anchor"),Mt),Ze.paint.get("icon-opacity").constantOr(1)!==0&&Ah(le,ze,Ze,ut,!1,Ze.paint.get("icon-translate"),Ze.paint.get("icon-translate-anchor"),Ze.layout.get("icon-rotation-alignment"),Ze.layout.get("icon-pitch-alignment"),Ze.layout.get("icon-keep-upright"),Jt,$t),Ze.paint.get("text-opacity").constantOr(1)!==0&&Ah(le,ze,Ze,ut,!0,Ze.paint.get("text-translate"),Ze.paint.get("text-translate-anchor"),Ze.layout.get("text-rotation-alignment"),Ze.layout.get("text-pitch-alignment"),Ze.layout.get("text-keep-upright"),Jt,$t),ze.map.showCollisionBoxes&&(Hu(le,ze,Ze,ut,!0),Hu(le,ze,Ze,ut,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case"circle":(function(le,ze,Ze,ut){if(le.renderPass!=="translucent")return;let Mt=Ze.paint.get("circle-opacity"),Jt=Ze.paint.get("circle-stroke-width"),$t=Ze.paint.get("circle-stroke-opacity"),mr=!Ze.layout.get("circle-sort-key").isConstant();if(Mt.constantOr(1)===0&&(Jt.constantOr(1)===0||$t.constantOr(1)===0))return;let Cr=le.context,ve=Cr.gl,xe=le.depthModeForSublayer(0,Po.ReadOnly),Ie=Ko.disabled,qe=le.colorModeForRenderPass(),Qe=[];for(let Xe=0;Xe<ut.length;Xe++){let nt=ut[Xe],qt=ze.getTile(nt),jt=qt.getBucket(Ze);if(!jt)continue;let ar=jt.programConfigurations.get(Ze.id),fr=le.useProgram("circle",ar),br=jt.layoutVertexBuffer,Fr=jt.indexBuffer,Hr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(nt),ri={programConfiguration:ar,program:fr,layoutVertexBuffer:br,indexBuffer:Fr,uniformValues:_o(le,nt,qt,Ze),terrainData:Hr};if(mr){let Ci=jt.segments.get();for(let cn of Ci)Qe.push({segments:new a.a0([cn]),sortKey:cn.sortKey,state:ri})}else Qe.push({segments:jt.segments,sortKey:0,state:ri})}mr&&Qe.sort((Xe,nt)=>Xe.sortKey-nt.sortKey);for(let Xe of Qe){let{programConfiguration:nt,program:qt,layoutVertexBuffer:jt,indexBuffer:ar,uniformValues:fr,terrainData:br}=Xe.state;qt.draw(Cr,ve.TRIANGLES,xe,Ie,qe,Pa.disabled,fr,br,Ze.id,jt,ar,Xe.segments,Ze.paint,le.transform.zoom,nt)}})(w,B,Q,ee);break;case"heatmap":(function(le,ze,Ze,ut){if(Ze.paint.get("heatmap-opacity")===0)return;let Mt=le.context;if(le.style.map.terrain){for(let Jt of ut){let $t=ze.getTile(Jt);ze.hasRenderableParent(Jt)||(le.renderPass==="offscreen"?_f(le,$t,Ze,Jt):le.renderPass==="translucent"&&Yc(le,Ze,Jt))}Mt.viewport.set([0,0,le.width,le.height])}else le.renderPass==="offscreen"?function(Jt,$t,mr,Cr){let ve=Jt.context,xe=ve.gl,Ie=Ko.disabled,qe=new Os([xe.ONE,xe.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(Qe,Xe,nt){let qt=Qe.gl;Qe.activeTexture.set(qt.TEXTURE1),Qe.viewport.set([0,0,Xe.width/4,Xe.height/4]);let jt=nt.heatmapFbos.get(a.aU);jt?(qt.bindTexture(qt.TEXTURE_2D,jt.colorAttachment.get()),Qe.bindFramebuffer.set(jt.framebuffer)):(jt=eh(Qe,Xe.width/4,Xe.height/4),nt.heatmapFbos.set(a.aU,jt))})(ve,Jt,mr),ve.clear({color:a.aM.transparent});for(let Qe=0;Qe<Cr.length;Qe++){let Xe=Cr[Qe];if($t.hasRenderableParent(Xe))continue;let nt=$t.getTile(Xe),qt=nt.getBucket(mr);if(!qt)continue;let jt=qt.programConfigurations.get(mr.id),ar=Jt.useProgram("heatmap",jt),{zoom:fr}=Jt.transform;ar.draw(ve,xe.TRIANGLES,Po.disabled,Ie,qe,Pa.disabled,ko(Xe.posMatrix,nt,fr,mr.paint.get("heatmap-intensity")),null,mr.id,qt.layoutVertexBuffer,qt.indexBuffer,qt.segments,mr.paint,Jt.transform.zoom,jt)}ve.viewport.set([0,0,Jt.width,Jt.height])}(le,ze,Ze,ut):le.renderPass==="translucent"&&function(Jt,$t){let mr=Jt.context,Cr=mr.gl;mr.setColorMode(Jt.colorModeForRenderPass());let ve=$t.heatmapFbos.get(a.aU);ve&&(mr.activeTexture.set(Cr.TEXTURE0),Cr.bindTexture(Cr.TEXTURE_2D,ve.colorAttachment.get()),mr.activeTexture.set(Cr.TEXTURE1),th(mr,$t).bind(Cr.LINEAR,Cr.CLAMP_TO_EDGE),Jt.useProgram("heatmapTexture").draw(mr,Cr.TRIANGLES,Po.disabled,Ko.disabled,Jt.colorModeForRenderPass(),Pa.disabled,Ds(Jt,$t,0,1),null,$t.id,Jt.viewportBuffer,Jt.quadTriangleIndexBuffer,Jt.viewportSegments,$t.paint,Jt.transform.zoom))}(le,Ze)})(w,B,Q,ee);break;case"line":(function(le,ze,Ze,ut){if(le.renderPass!=="translucent")return;let Mt=Ze.paint.get("line-opacity"),Jt=Ze.paint.get("line-width");if(Mt.constantOr(1)===0||Jt.constantOr(1)===0)return;let $t=le.depthModeForSublayer(0,Po.ReadOnly),mr=le.colorModeForRenderPass(),Cr=Ze.paint.get("line-dasharray"),ve=Ze.paint.get("line-pattern"),xe=ve.constantOr(1),Ie=Ze.paint.get("line-gradient"),qe=Ze.getCrossfadeParameters(),Qe=xe?"linePattern":Cr?"lineSDF":Ie?"lineGradient":"line",Xe=le.context,nt=Xe.gl,qt=!0;for(let jt of ut){let ar=ze.getTile(jt);if(xe&&!ar.patternsLoaded())continue;let fr=ar.getBucket(Ze);if(!fr)continue;let br=fr.programConfigurations.get(Ze.id),Fr=le.context.program.get(),Hr=le.useProgram(Qe,br),ri=qt||Hr.program!==Fr,Ci=le.style.map.terrain&&le.style.map.terrain.getTerrainData(jt),cn=ve.constantOr(null);if(cn&&ar.imageAtlas){let Yn=ar.imageAtlas,Aa=Yn.patternPositions[cn.to.toString()],fa=Yn.patternPositions[cn.from.toString()];Aa&&fa&&br.setConstantPatternPositions(Aa,fa)}let sn=Ci?jt:null,Ln=xe?zl(le,ar,Ze,qe,sn):Cr?us(le,ar,Ze,Cr,qe,sn):Ie?ul(le,ar,Ze,fr.lineClipsArray.length,sn):ll(le,ar,Ze,sn);if(xe)Xe.activeTexture.set(nt.TEXTURE0),ar.imageAtlasTexture.bind(nt.LINEAR,nt.CLAMP_TO_EDGE),br.updatePaintBuffers(qe);else if(Cr&&(ri||le.lineAtlas.dirty))Xe.activeTexture.set(nt.TEXTURE0),le.lineAtlas.bind(Xe);else if(Ie){let Yn=fr.gradients[Ze.id],Aa=Yn.texture;if(Ze.gradientVersion!==Yn.version){let fa=256;if(Ze.stepInterpolant){let $a=ze.getSource().maxzoom,Co=jt.canonical.z===$a?Math.ceil(1<<le.transform.maxZoom-jt.canonical.z):1;fa=a.ac(a.aV(fr.maxLineLength/a.X*1024*Co),256,Xe.maxTextureSize)}Yn.gradient=a.aW({expression:Ze.gradientExpression(),evaluationKey:"lineProgress",resolution:fa,image:Yn.gradient||void 0,clips:fr.lineClipsArray}),Yn.texture?Yn.texture.update(Yn.gradient):Yn.texture=new g(Xe,Yn.gradient,nt.RGBA),Yn.version=Ze.gradientVersion,Aa=Yn.texture}Xe.activeTexture.set(nt.TEXTURE0),Aa.bind(Ze.stepInterpolant?nt.NEAREST:nt.LINEAR,nt.CLAMP_TO_EDGE)}Hr.draw(Xe,nt.TRIANGLES,$t,le.stencilModeForClipping(jt),mr,Pa.disabled,Ln,Ci,Ze.id,fr.layoutVertexBuffer,fr.indexBuffer,fr.segments,Ze.paint,le.transform.zoom,br,fr.layoutVertexBuffer2),qt=!1}})(w,B,Q,ee);break;case"fill":(function(le,ze,Ze,ut){let Mt=Ze.paint.get("fill-color"),Jt=Ze.paint.get("fill-opacity");if(Jt.constantOr(1)===0)return;let $t=le.colorModeForRenderPass(),mr=Ze.paint.get("fill-pattern"),Cr=le.opaquePassEnabledForLayer()&&!mr.constantOr(1)&&Mt.constantOr(a.aM.transparent).a===1&&Jt.constantOr(0)===1?"opaque":"translucent";if(le.renderPass===Cr){let ve=le.depthModeForSublayer(1,le.renderPass==="opaque"?Po.ReadWrite:Po.ReadOnly);jf(le,ze,Ze,ut,ve,$t,!1)}if(le.renderPass==="translucent"&&Ze.paint.get("fill-antialias")){let ve=le.depthModeForSublayer(Ze.getPaintProperty("fill-outline-color")?2:0,Po.ReadOnly);jf(le,ze,Ze,ut,ve,$t,!0)}})(w,B,Q,ee);break;case"fill-extrusion":(function(le,ze,Ze,ut){let Mt=Ze.paint.get("fill-extrusion-opacity");if(Mt!==0&&le.renderPass==="translucent"){let Jt=new Po(le.context.gl.LEQUAL,Po.ReadWrite,le.depthRangeFor3D);if(Mt!==1||Ze.paint.get("fill-extrusion-pattern").constantOr(1))cc(le,ze,Ze,ut,Jt,Ko.disabled,Os.disabled),cc(le,ze,Ze,ut,Jt,le.stencilModeFor3D(),le.colorModeForRenderPass());else{let $t=le.colorModeForRenderPass();cc(le,ze,Ze,ut,Jt,Ko.disabled,$t)}}})(w,B,Q,ee);break;case"hillshade":(function(le,ze,Ze,ut){if(le.renderPass!=="offscreen"&&le.renderPass!=="translucent")return;let Mt=le.context,Jt=le.depthModeForSublayer(0,Po.ReadOnly),$t=le.colorModeForRenderPass(),[mr,Cr]=le.renderPass==="translucent"?le.stencilConfigForOverlap(ut):[{},ut];for(let ve of Cr){let xe=ze.getTile(ve);xe.needsHillshadePrepare!==void 0&&xe.needsHillshadePrepare&&le.renderPass==="offscreen"?Nl(le,xe,Ze,Jt,Ko.disabled,$t):le.renderPass==="translucent"&&of(le,ve,xe,Ze,Jt,mr[ve.overscaledZ],$t)}Mt.viewport.set([0,0,le.width,le.height])})(w,B,Q,ee);break;case"raster":(function(le,ze,Ze,ut){if(le.renderPass!=="translucent"||Ze.paint.get("raster-opacity")===0||!ut.length)return;let Mt=le.context,Jt=Mt.gl,$t=ze.getSource(),mr=le.useProgram("raster"),Cr=le.colorModeForRenderPass(),[ve,xe]=$t instanceof Qt?[{},ut]:le.stencilConfigForOverlap(ut),Ie=xe[xe.length-1].overscaledZ,qe=!le.options.moving;for(let Qe of xe){let Xe=le.depthModeForSublayer(Qe.overscaledZ-Ie,Ze.paint.get("raster-opacity")===1?Po.ReadWrite:Po.ReadOnly,Jt.LESS),nt=ze.getTile(Qe);nt.registerFadeDuration(Ze.paint.get("raster-fade-duration"));let qt=ze.findLoadedParent(Qe,0),jt=ze.findLoadedSibling(Qe),ar=Kc(nt,qt||jt||null,ze,Ze,le.transform,le.style.map.terrain),fr,br,Fr=Ze.paint.get("raster-resampling")==="nearest"?Jt.NEAREST:Jt.LINEAR;Mt.activeTexture.set(Jt.TEXTURE0),nt.texture.bind(Fr,Jt.CLAMP_TO_EDGE,Jt.LINEAR_MIPMAP_NEAREST),Mt.activeTexture.set(Jt.TEXTURE1),qt?(qt.texture.bind(Fr,Jt.CLAMP_TO_EDGE,Jt.LINEAR_MIPMAP_NEAREST),fr=Math.pow(2,qt.tileID.overscaledZ-nt.tileID.overscaledZ),br=[nt.tileID.canonical.x*fr%1,nt.tileID.canonical.y*fr%1]):nt.texture.bind(Fr,Jt.CLAMP_TO_EDGE,Jt.LINEAR_MIPMAP_NEAREST),nt.texture.useMipmap&&Mt.extTextureFilterAnisotropic&&le.transform.pitch>20&&Jt.texParameterf(Jt.TEXTURE_2D,Mt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Mt.extTextureFilterAnisotropicMax);let Hr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(Qe),ri=Hr?Qe:null,Ci=ri?ri.posMatrix:le.transform.calculatePosMatrix(Qe.toUnwrapped(),qe),cn=cl(Ci,br||[0,0],fr||1,ar,Ze);$t instanceof Qt?mr.draw(Mt,Jt.TRIANGLES,Xe,Ko.disabled,Cr,Pa.disabled,cn,Hr,Ze.id,$t.boundsBuffer,le.quadTriangleIndexBuffer,$t.boundsSegments):mr.draw(Mt,Jt.TRIANGLES,Xe,ve[Qe.overscaledZ],Cr,Pa.disabled,cn,Hr,Ze.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}})(w,B,Q,ee);break;case"background":(function(le,ze,Ze,ut){let Mt=Ze.paint.get("background-color"),Jt=Ze.paint.get("background-opacity");if(Jt===0)return;let $t=le.context,mr=$t.gl,Cr=le.transform,ve=Cr.tileSize,xe=Ze.paint.get("background-pattern");if(le.isPatternMissing(xe))return;let Ie=!xe&&Mt.a===1&&Jt===1&&le.opaquePassEnabledForLayer()?"opaque":"translucent";if(le.renderPass!==Ie)return;let qe=Ko.disabled,Qe=le.depthModeForSublayer(0,Ie==="opaque"?Po.ReadWrite:Po.ReadOnly),Xe=le.colorModeForRenderPass(),nt=le.useProgram(xe?"backgroundPattern":"background"),qt=ut||Cr.coveringTiles({tileSize:ve,terrain:le.style.map.terrain});xe&&($t.activeTexture.set(mr.TEXTURE0),le.imageManager.bind(le.context));let jt=Ze.getCrossfadeParameters();for(let ar of qt){let fr=ut?ar.posMatrix:le.transform.calculatePosMatrix(ar.toUnwrapped()),br=xe?Su(fr,Jt,le,xe,{tileID:ar,tileSize:ve},jt):Yl(fr,Jt,Mt),Fr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(ar);nt.draw($t,mr.TRIANGLES,Qe,qe,Xe,Pa.disabled,br,Fr,Ze.id,le.tileExtentBuffer,le.quadTriangleIndexBuffer,le.tileExtentSegments)}})(w,0,Q,ee);break;case"custom":(function(le,ze,Ze){let ut=le.context,Mt=Ze.implementation;if(le.renderPass==="offscreen"){let Jt=Mt.prerender;Jt&&(le.setCustomLayerDefaults(),ut.setColorMode(le.colorModeForRenderPass()),Jt.call(Mt,ut.gl,le.transform.customLayerMatrix()),ut.setDirty(),le.setBaseState())}else if(le.renderPass==="translucent"){le.setCustomLayerDefaults(),ut.setColorMode(le.colorModeForRenderPass()),ut.setStencilMode(Ko.disabled);let Jt=Mt.renderingMode==="3d"?new Po(le.context.gl.LEQUAL,Po.ReadWrite,le.depthRangeFor3D):le.depthModeForSublayer(0,Po.ReadOnly);ut.setDepthMode(Jt),Mt.render(ut.gl,le.transform.customLayerMatrix(),{farZ:le.transform.farZ,nearZ:le.transform.nearZ,fov:le.transform._fov,modelViewProjectionMatrix:le.transform.modelViewProjectionMatrix,projectionMatrix:le.transform.projectionMatrix}),ut.setDirty(),le.setBaseState(),ut.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,le){if(!Q[0]&&!Q[1])return w;let ze=le?ee==="map"?this.transform.angle:0:ee==="viewport"?-this.transform.angle:0;if(ze){let Mt=Math.sin(ze),Jt=Math.cos(ze);Q=[Q[0]*Jt-Q[1]*Mt,Q[0]*Mt+Q[1]*Jt]}let Ze=[le?Q[0]:Fn(B,Q[0],this.transform.zoom),le?Q[1]:Fn(B,Q[1],this.transform.zoom),0],ut=new Float32Array(16);return a.J(ut,w,Ze),ut}saveTileTexture(w){let B=this._tileTextures[w.size[0]];B?B.push(w):this._tileTextures[w.size[0]]=[w]}getTileTexture(w){let B=this._tileTextures[w];return B&&B.length>0?B.pop():null}isPatternMissing(w){if(!w)return!1;if(!w.from||!w.to)return!0;let B=this.imageManager.getPattern(w.from.toString()),Q=this.imageManager.getPattern(w.to.toString());return!B||!Q}useProgram(w,B){this.cache=this.cache||{};let Q=w+(B?B.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Q]||(this.cache[Q]=new hn(this.context,Gn[w],B,nc[w],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Q]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let w=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(w.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new g(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:w,drawingBufferHeight:B}=this.context.gl;return this.width!==w||this.height!==B}}class ks{constructor(w,B){this.points=w,this.planes=B}static fromInvProjectionMatrix(w,B,Q){let ee=Math.pow(2,Q),le=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Ze=>{let ut=1/(Ze=a.af([],Ze,w))[3]/B*ee;return a.b1(Ze,Ze,[ut,ut,1/Ze[3],ut])}),ze=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Ze=>{let ut=function(mr,Cr){var ve=Cr[0],xe=Cr[1],Ie=Cr[2],qe=ve*ve+xe*xe+Ie*Ie;return qe>0&&(qe=1/Math.sqrt(qe)),mr[0]=Cr[0]*qe,mr[1]=Cr[1]*qe,mr[2]=Cr[2]*qe,mr}([],function(mr,Cr,ve){var xe=Cr[0],Ie=Cr[1],qe=Cr[2],Qe=ve[0],Xe=ve[1],nt=ve[2];return mr[0]=Ie*nt-qe*Xe,mr[1]=qe*Qe-xe*nt,mr[2]=xe*Xe-Ie*Qe,mr}([],L([],le[Ze[0]],le[Ze[1]]),L([],le[Ze[2]],le[Ze[1]]))),Mt=-((Jt=ut)[0]*($t=le[Ze[1]])[0]+Jt[1]*$t[1]+Jt[2]*$t[2]);var Jt,$t;return ut.concat(Mt)});return new ks(le,ze)}}class bc{constructor(w,B){this.min=w,this.max=B,this.center=function(Q,ee,le){return Q[0]=.5*ee[0],Q[1]=.5*ee[1],Q[2]=.5*ee[2],Q}([],function(Q,ee,le){return Q[0]=ee[0]+le[0],Q[1]=ee[1]+le[1],Q[2]=ee[2]+le[2],Q}([],this.min,this.max))}quadrant(w){let B=[w%2==0,w<2],Q=M(this.min),ee=M(this.max);for(let le=0;le<B.length;le++)Q[le]=B[le]?this.min[le]:this.center[le],ee[le]=B[le]?this.center[le]:this.max[le];return ee[2]=this.max[2],new bc(Q,ee)}distanceX(w){return Math.max(Math.min(this.max[0],w[0]),this.min[0])-w[0]}distanceY(w){return Math.max(Math.min(this.max[1],w[1]),this.min[1])-w[1]}intersects(w){let B=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]],Q=!0;for(let ee=0;ee<w.planes.length;ee++){let le=w.planes[ee],ze=0;for(let Ze=0;Ze<B.length;Ze++)a.b2(le,B[Ze])>=0&&ze++;if(ze===0)return 0;ze!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let le=Number.MAX_VALUE,ze=-Number.MAX_VALUE;for(let Ze=0;Ze<w.points.length;Ze++){let ut=w.points[Ze][ee]-this.min[ee];le=Math.min(le,ut),ze=Math.max(ze,ut)}if(ze<0||le>this.max[ee]-this.min[ee])return 0}return 1}}class hu{constructor(w=0,B=0,Q=0,ee=0){if(isNaN(w)||w<0||isNaN(B)||B<0||isNaN(Q)||Q<0||isNaN(ee)||ee<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=w,this.bottom=B,this.left=Q,this.right=ee}interpolate(w,B,Q){return B.top!=null&&w.top!=null&&(this.top=a.y.number(w.top,B.top,Q)),B.bottom!=null&&w.bottom!=null&&(this.bottom=a.y.number(w.bottom,B.bottom,Q)),B.left!=null&&w.left!=null&&(this.left=a.y.number(w.left,B.left,Q)),B.right!=null&&w.right!=null&&(this.right=a.y.number(w.right,B.right,Q)),this}getCenter(w,B){let Q=a.ac((this.left+w-this.right)/2,0,w),ee=a.ac((this.top+B-this.bottom)/2,0,B);return new a.P(Q,ee)}equals(w){return this.top===w.top&&this.bottom===w.bottom&&this.left===w.left&&this.right===w.right}clone(){return new hu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let _u=85.051129;class nl{constructor(w,B,Q,ee,le){this.tileSize=512,this._renderWorldCopies=le===void 0||!!le,this._minZoom=w||0,this._maxZoom=B||22,this._minPitch=Q==null?0:Q,this._maxPitch=ee==null?60:ee,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new hu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new nl(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return w.apply(this),w}apply(w){this.tileSize=w.tileSize,this.latRange=w.latRange,this.lngRange=w.lngRange,this.width=w.width,this.height=w.height,this._center=w._center,this._elevation=w._elevation,this.minElevationForCurrentTile=w.minElevationForCurrentTile,this.zoom=w.zoom,this.angle=w.angle,this._fov=w._fov,this._pitch=w._pitch,this._unmodified=w._unmodified,this._edgeInsets=w._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(w){this._minZoom!==w&&(this._minZoom=w,this.zoom=Math.max(this.zoom,w))}get maxZoom(){return this._maxZoom}set maxZoom(w){this._maxZoom!==w&&(this._maxZoom=w,this.zoom=Math.min(this.zoom,w))}get minPitch(){return this._minPitch}set minPitch(w){this._minPitch!==w&&(this._minPitch=w,this.pitch=Math.max(this.pitch,w))}get maxPitch(){return this._maxPitch}set maxPitch(w){this._maxPitch!==w&&(this._maxPitch=w,this.pitch=Math.min(this.pitch,w))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(w){w===void 0?w=!0:w===null&&(w=!1),this._renderWorldCopies=w}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(w){let B=-a.b3(w,-180,180)*Math.PI/180;this.angle!==B&&(this._unmodified=!1,this.angle=B,this._calcMatrices(),this.rotationMatrix=function(){var Q=new a.A(4);return a.A!=Float32Array&&(Q[1]=0,Q[2]=0),Q[0]=1,Q[3]=1,Q}(),function(Q,ee,le){var ze=ee[0],Ze=ee[1],ut=ee[2],Mt=ee[3],Jt=Math.sin(le),$t=Math.cos(le);Q[0]=ze*$t+ut*Jt,Q[1]=Ze*$t+Mt*Jt,Q[2]=ze*-Jt+ut*$t,Q[3]=Ze*-Jt+Mt*$t}(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)),ze=this.pointCoordinate(new a.P(0,this.height)),Ze=Math.floor(Math.min(Q.x,ee.x,le.x,ze.x)),ut=Math.floor(Math.max(Q.x,ee.x,le.x,ze.x)),Mt=1;for(let Jt=Ze-Mt;Jt<=ut+Mt;Jt++)Jt!==0&&B.push(new a.b4(Jt,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 ze=this.pointCoordinate(this.getCameraPoint()),Ze=a.Z.fromLngLat(this.center),ut=Math.pow(2,ee),Mt=[ut*ze.x,ut*ze.y,0],Jt=[ut*Ze.x,ut*Ze.y,0],$t=ks.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),mr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(mr=ee);let Cr=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,ve=Xe=>({aabb:new bc([Xe*ut,0,0],[(Xe+1)*ut,ut,0]),zoom:0,x:0,y:0,wrap:Xe,fullyVisible:!1}),xe=[],Ie=[],qe=ee,Qe=w.reparseOverscaled?le:ee;if(this._renderWorldCopies)for(let Xe=1;Xe<=3;Xe++)xe.push(ve(-Xe)),xe.push(ve(Xe));for(xe.push(ve(0));xe.length>0;){let Xe=xe.pop(),nt=Xe.x,qt=Xe.y,jt=Xe.fullyVisible;if(!jt){let Hr=Xe.aabb.intersects($t);if(Hr===0)continue;jt=Hr===2}let ar=w.terrain?Mt:Jt,fr=Xe.aabb.distanceX(ar),br=Xe.aabb.distanceY(ar),Fr=Math.max(Math.abs(fr),Math.abs(br));if(Xe.zoom===qe||Fr>Cr+(1<<qe-Xe.zoom)-2&&Xe.zoom>=mr){let Hr=qe-Xe.zoom,ri=Mt[0]-.5-(nt<<Hr),Ci=Mt[1]-.5-(qt<<Hr);Ie.push({tileID:new a.S(Xe.zoom===qe?Qe:Xe.zoom,Xe.wrap,Xe.zoom,nt,qt),distanceSq:x([Jt[0]-.5-nt,Jt[1]-.5-qt]),tileDistanceToCamera:Math.sqrt(ri*ri+Ci*Ci)})}else for(let Hr=0;Hr<4;Hr++){let ri=(nt<<1)+Hr%2,Ci=(qt<<1)+(Hr>>1),cn=Xe.zoom+1,sn=Xe.aabb.quadrant(Hr);if(w.terrain){let Ln=new a.S(cn,Xe.wrap,cn,ri,Ci),Yn=w.terrain.getMinMaxElevation(Ln),Aa=(B=Yn.minElevation)!==null&&B!==void 0?B:this.elevation,fa=(Q=Yn.maxElevation)!==null&&Q!==void 0?Q:this.elevation;sn=new bc([sn.min[0],sn.min[1],Aa],[sn.max[0],sn.max[1],fa])}xe.push({aabb:sn,zoom:cn,x:ri,y:Ci,wrap:Xe.wrap,fullyVisible:jt})}}return Ie.sort((Xe,nt)=>Xe.distanceSq-nt.distanceSq).map(Xe=>Xe.tileID)}resize(w,B){this.width=w,this.height=B,this.pixelsToGLUnits=[2/w,-2/B],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(w){return Math.pow(2,w)}scaleZoom(w){return Math.log(w)/Math.LN2}project(w){let B=a.ac(w.lat,-85.051129,_u);return new a.P(a.O(w.lng)*this.worldSize,a.Q(B)*this.worldSize)}unproject(w){return new a.Z(w.x/this.worldSize,w.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(w){let B=this.elevation,Q=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,ee=this.pointLocation(this.centerPoint,w),le=w.getElevationForLngLatZoom(ee,this.tileZoom);if(!(this.elevation-le))return;let ze=Q+B-le,Ze=Math.cos(this._pitch)*this.cameraToCenterDistance/ze/a.b5(1,ee.lat),ut=this.scaleZoom(Ze/this.tileSize);this._elevation=le,this._center=ee,this.zoom=ut}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),le=this.locationCoordinate(w),ze=new a.Z(le.x-(Q.x-ee.x),le.y-(Q.y-ee.y));this.center=this.coordinateLocation(ze),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 mr=B.pointCoordinate(w);if(mr!=null)return mr}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],ze=ee[3],Ze=Q[1]/le,ut=ee[1]/ze,Mt=Q[2]/le,Jt=ee[2]/ze,$t=Mt===Jt?0:(0-Mt)/(Jt-Mt);return new a.Z(a.y.number(Q[0]/le,ee[0]/ze,$t)/this.worldSize,a.y.number(Ze,ut,$t)/this.worldSize)}coordinatePoint(w,B=0,Q=this.pixelMatrix){let ee=[w.x*this.worldSize,w.y*this.worldSize,B,1];return a.af(ee,ee,Q),new a.P(ee[0]/ee[3],ee[1]/ee[3])}getBounds(){let w=Math.max(0,this.height/2-this.getHorizon());return new ce().extend(this.pointLocation(new a.P(0,w))).extend(this.pointLocation(new a.P(this.width,w))).extend(this.pointLocation(new a.P(this.width,this.height))).extend(this.pointLocation(new a.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(w){w?(this.lngRange=[w.getWest(),w.getEast()],this.latRange=[w.getSouth(),w.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,_u])}calculateTileMatrix(w){let B=w.canonical,Q=this.worldSize/this.zoomScale(B.z),ee=B.x+Math.pow(2,B.z)*w.wrap,le=a.an(new Float64Array(16));return a.J(le,le,[ee*Q,B.y*Q,0]),a.K(le,le,[Q/a.X,Q/a.X,1]),le}calculatePosMatrix(w,B=!1){let Q=w.key,ee=B?this._alignedPosMatrixCache:this._posMatrixCache;if(ee[Q])return ee[Q];let le=this.calculateTileMatrix(w);return a.L(le,B?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,le),ee[Q]=new Float32Array(le),ee[Q]}calculateFogMatrix(w){let B=w.key,Q=this._fogMatrixCache;if(Q[B])return Q[B];let ee=this.calculateTileMatrix(w);return a.L(ee,this.fogMatrix,ee),Q[B]=new Float32Array(ee),Q[B]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(w,B){B=a.ac(+B,this.minZoom,this.maxZoom);let Q={center:new a.N(w.lng,w.lat),zoom:B},ee=this.lngRange;if(!this._renderWorldCopies&&ee===null){let Xe=179.9999999999;ee=[-Xe,Xe]}let le=this.tileSize*this.zoomScale(Q.zoom),ze=0,Ze=le,ut=0,Mt=le,Jt=0,$t=0,{x:mr,y:Cr}=this.size;if(this.latRange){let Xe=this.latRange;ze=a.Q(Xe[1])*le,Ze=a.Q(Xe[0])*le,Ze-ze<Cr&&(Jt=Cr/(Ze-ze))}ee&&(ut=a.b3(a.O(ee[0])*le,0,le),Mt=a.b3(a.O(ee[1])*le,0,le),Mt<ut&&(Mt+=le),Mt-ut<mr&&($t=mr/(Mt-ut)));let{x:ve,y:xe}=this.project.call({worldSize:le},w),Ie,qe,Qe=Math.max($t||0,Jt||0);if(Qe){let Xe=new a.P($t?(Mt+ut)/2:ve,Jt?(Ze+ze)/2:xe);return Q.center=this.unproject.call({worldSize:le},Xe).wrap(),Q.zoom+=this.scaleZoom(Qe),Q}if(this.latRange){let Xe=Cr/2;xe-Xe<ze&&(qe=ze+Xe),xe+Xe>Ze&&(qe=Ze-Xe)}if(ee){let Xe=(ut+Mt)/2,nt=ve;this._renderWorldCopies&&(nt=a.b3(ve,Xe-le/2,Xe+le/2));let qt=mr/2;nt-qt<ut&&(Ie=ut+qt),nt+qt>Mt&&(Ie=Mt-qt)}if(Ie!==void 0||qe!==void 0){let Xe=new a.P(Ie!=null?Ie:ve,qe!=null?qe:xe);Q.center=this.unproject.call({worldSize:le},Xe).wrap()}return Q}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let w=this._unmodified,{center:B,zoom:Q}=this.getConstrained(this.center,this.zoom);this.center=B,this.zoom=Q,this._unmodified=w,this._constraining=!1}_calcMatrices(){if(!this.height)return;let w=this.centerOffset,B=this.point.x,Q=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=a.b5(1,this.center.lat)*this.worldSize;let ee=a.an(new Float64Array(16));a.K(ee,ee,[this.width/2,-this.height/2,1]),a.J(ee,ee,[1,-1,0]),this.labelPlaneMatrix=ee,ee=a.an(new Float64Array(16)),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[-1,-1,0]),a.K(ee,ee,[2/this.width,2/this.height,1]),this.glCoordMatrix=ee;let le=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ze=Math.min(this.elevation,this.minElevationForCurrentTile),Ze=le-ze*this._pixelPerMeter/Math.cos(this._pitch),ut=ze<0?Ze:le,Mt=Math.PI/2+this._pitch,Jt=this._fov*(.5+w.y/this.height),$t=Math.sin(Jt)*ut/Math.sin(a.ac(Math.PI-Mt-Jt,.01,Math.PI-.01)),mr=this.getHorizon(),Cr=2*Math.atan(mr/this.cameraToCenterDistance)*(.5+w.y/(2*mr)),ve=Math.sin(Cr)*ut/Math.sin(a.ac(Math.PI-Mt-Cr,.01,Math.PI-.01)),xe=Math.min($t,ve);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*xe+ut),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 Ie=this.width%2/2,qe=this.height%2/2,Qe=Math.cos(this.angle),Xe=Math.sin(this.angle),nt=B-Math.round(B)+Qe*Ie+Xe*qe,qt=Q-Math.round(Q)+Qe*qe+Xe*Ie,jt=new Float64Array(ee);if(a.J(jt,jt,[nt>.5?nt-1:nt,qt>.5?qt-1:qt,0]),this.alignedModelViewProjectionMatrix=jt,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,ze=B.y;for(let Ze of w)Q=Math.min(Q,Ze.x),ee=Math.min(ee,Ze.y),le=Math.max(le,Ze.x),ze=Math.max(ze,Ze.y);return[new a.P(Q,ee),new a.P(le,ee),new a.P(le,ze),new a.P(Q,ze),new a.P(Q,ee)]}}lngLatToCameraDepth(w,B){let Q=this.locationCoordinate(w),ee=[Q.x*this.worldSize,Q.y*this.worldSize,B,1];return a.af(ee,ee,this.modelViewProjectionMatrix),ee[2]/ee[3]}}function nh(ue,w){let B,Q=!1,ee=null,le=null,ze=()=>{ee=null,Q&&(ue.apply(le,B),ee=setTimeout(ze,w),Q=!1)};return(...Ze)=>(Q=!0,le=this,B=Ze,ee||ze(),ee)}class Mh{constructor(w){this._getCurrentHash=()=>{let B=window.location.hash.replace("#","");if(this._hashName){let Q;return B.split("&").map(ee=>ee.split("=")).forEach(ee=>{ee[0]===this._hashName&&(Q=ee)}),(Q&&Q[1]||"").split("/")}return B.split("/")},this._onHashChange=()=>{let B=this._getCurrentHash();if(B.length>=3&&!B.some(Q=>isNaN(Q))){let Q=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(B[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+B[2],+B[1]],zoom:+B[0],bearing:Q,pitch:+(B[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let B=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,B)},this._removeHash=()=>{let B=this._getCurrentHash();if(B.length===0)return;let Q=B.join("/"),ee=Q;ee.split("&").length>0&&(ee=ee.split("&")[0]),this._hashName&&(ee=`${this._hashName}=${Q}`);let le=window.location.hash.replace(ee,"");le.startsWith("#&")?le=le.slice(0,1)+le.slice(2):le==="#"&&(le="");let ze=window.location.href.replace(/(#.+)?$/,le);ze=ze.replace("&&","&"),window.history.replaceState(window.history.state,null,ze)},this._updateHash=nh(this._updateHashUnthrottled,300),this._hashName=w&&encodeURIComponent(w)}addTo(w){return this._map=w,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(w){let B=this._map.getCenter(),Q=Math.round(100*this._map.getZoom())/100,ee=Math.ceil((Q*Math.LN2+Math.log(512/360/.5))/Math.LN10),le=Math.pow(10,ee),ze=Math.round(B.lng*le)/le,Ze=Math.round(B.lat*le)/le,ut=this._map.getBearing(),Mt=this._map.getPitch(),Jt="";if(Jt+=w?`/${ze}/${Ze}/${Q}`:`${Q}/${Ze}/${ze}`,(ut||Mt)&&(Jt+="/"+Math.round(10*ut)/10),Mt&&(Jt+=`/${Math.round(Mt)}`),this._hashName){let $t=this._hashName,mr=!1,Cr=window.location.hash.slice(1).split("&").map(ve=>{let xe=ve.split("=")[0];return xe===$t?(mr=!0,`${xe}=${Jt}`):ve}).filter(ve=>ve);return mr||Cr.push(`${$t}=${Jt}`),`#${Cr.join("&")}`}return`#${Jt}`}}let zu={linearity:.3,easing:a.b8(0,0,.3,1)},Fc=a.e({deceleration:2500,maxSpeed:1400},zu),wc=a.e({deceleration:20,maxSpeed:1400},zu),bd=a.e({deceleration:1e3,maxSpeed:360},zu),xf=a.e({deceleration:1e3,maxSpeed:90},zu);class Pf{constructor(w){this._map=w,this.clear()}clear(){this._inertiaBuffer=[]}record(w){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.now(),settings:w})}_drainInertiaBuffer(){let w=this._inertiaBuffer,B=u.now();for(;w.length>0&&B-w[0].time>160;)w.shift()}_onMoveEnd(w){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let B={zoom:0,bearing:0,pitch:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:le}of this._inertiaBuffer)B.zoom+=le.zoomDelta||0,B.bearing+=le.bearingDelta||0,B.pitch+=le.pitchDelta||0,le.panDelta&&B.pan._add(le.panDelta),le.around&&(B.around=le.around),le.pinchAround&&(B.pinchAround=le.pinchAround);let Q=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ee={};if(B.pan.mag()){let le=bf(B.pan.mag(),Q,a.e({},Fc,w||{}));ee.offset=B.pan.mult(le.amount/B.pan.mag()),ee.center=this._map.transform.center,qu(ee,le)}if(B.zoom){let le=bf(B.zoom,Q,wc);ee.zoom=this._map.transform.zoom+le.amount,qu(ee,le)}if(B.bearing){let le=bf(B.bearing,Q,bd);ee.bearing=this._map.transform.bearing+a.ac(le.amount,-179,179),qu(ee,le)}if(B.pitch){let le=bf(B.pitch,Q,xf);ee.pitch=this._map.transform.pitch+le.amount,qu(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 qu(ue,w){(!ue.duration||ue.duration<w.duration)&&(ue.duration=w.duration,ue.easing=w.easing)}function bf(ue,w,B){let{maxSpeed:Q,linearity:ee,deceleration:le}=B,ze=a.ac(ue*ee/(w/1e3),-Q,Q),Ze=Math.abs(ze)/(le*ee);return{easing:B.easing,duration:1e3*Ze,amount:ze*(Ze/2)}}class jl extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q,ee={}){let le=c.mousePos(B.getCanvas(),Q),ze=B.unproject(le);super(w,a.e({point:le,lngLat:ze,originalEvent:Q},ee)),this._defaultPrevented=!1,this.target=B}}class lf extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){let ee=w==="touchend"?Q.changedTouches:Q.touches,le=c.touchPos(B.getCanvasContainer(),ee),ze=le.map(ut=>B.unproject(ut)),Ze=le.reduce((ut,Mt,Jt,$t)=>ut.add(Mt.div($t.length)),new a.P(0,0));super(w,{points:le,point:Ze,lngLats:ze,lngLat:B.unproject(Ze),originalEvent:Q}),this._defaultPrevented=!1}}class Xh extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class If{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new Xh(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new jl(w.type,this._map,w))}mouseup(w){this._map.fire(new jl(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new jl(w.type,this._map,w))}dblclick(w){return this._firePreventable(new jl(w.type,this._map,w))}mouseover(w){this._map.fire(new jl(w.type,this._map,w))}mouseout(w){this._map.fire(new jl(w.type,this._map,w))}touchstart(w){return this._firePreventable(new lf(w.type,this._map,w))}touchmove(w){this._map.fire(new lf(w.type,this._map,w))}touchend(w){this._map.fire(new lf(w.type,this._map,w))}touchcancel(w){this._map.fire(new lf(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Cs{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new jl(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new jl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new jl(w.type,this._map,w)),this._map.listens("contextmenu")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class du{constructor(w){this._map=w}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(w){return this.transform.pointLocation(a.P.convert(w),this._map.terrain)}}class ku{constructor(w,B){this._map=w,this._tr=new du(w),this._el=w.getCanvasContainer(),this._container=w.getContainer(),this._clickTolerance=B.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(w,B){this.isEnabled()&&w.shiftKey&&w.button===0&&(c.disableDrag(),this._startPos=this._lastPos=B,this._active=!0)}mousemoveWindow(w,B){if(!this._active)return;let Q=B;if(this._lastPos.equals(Q)||!this._box&&Q.dist(this._startPos)<this._clickTolerance)return;let ee=this._startPos;this._lastPos=Q,this._box||(this._box=c.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",w));let le=Math.min(ee.x,Q.x),ze=Math.max(ee.x,Q.x),Ze=Math.min(ee.y,Q.y),ut=Math.max(ee.y,Q.y);c.setTransform(this._box,`translate(${le}px,${Ze}px)`),this._box.style.width=ze-le+"px",this._box.style.height=ut-Ze+"px"}mouseupWindow(w,B){if(!this._active||w.button!==0)return;let Q=this._startPos,ee=B;if(this.reset(),c.suppressClick(),Q.x!==ee.x||Q.y!==ee.y)return this._map.fire(new a.k("boxzoomend",{originalEvent:w})),{cameraAnimation:le=>le.fitScreenCoordinates(Q,ee,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",w)}keydown(w){this._active&&w.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",w))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(c.remove(this._box),this._box=null),c.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(w,B){return this._map.fire(new a.k(w,{originalEvent:B}))}}function Xf(ue,w){if(ue.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${ue.length}, points ${w.length}`);let B={};for(let Q=0;Q<ue.length;Q++)B[ue[Q].identifier]=w[Q];return B}class Us{constructor(w){this.reset(),this.numTouches=w.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(w,B,Q){(this.centroid||Q.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=w.timeStamp),Q.length===this.numTouches&&(this.centroid=function(ee){let le=new a.P(0,0);for(let ze of ee)le._add(ze);return le.div(ee.length)}(B),this.touches=Xf(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=Xf(Q,B);for(let le in this.touches){let ze=ee[le];(!ze||ze.dist(this.touches[le])>30)&&(this.aborted=!0)}}touchend(w,B,Q){if((!this.centroid||w.timeStamp-this.startTime>500)&&(this.aborted=!0),Q.length===0){let ee=!this.aborted&&this.centroid;if(this.reset(),ee)return ee}}}class wf{constructor(w){this.singleTap=new Us(w),this.numTaps=w.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(w,B,Q){this.singleTap.touchstart(w,B,Q)}touchmove(w,B,Q){this.singleTap.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this.singleTap.touchend(w,B,Q);if(ee){let le=w.timeStamp-this.lastTime<500,ze=!this.lastTap||this.lastTap.dist(ee)<30;if(le&&ze||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class zc{constructor(w){this._tr=new du(w),this._zoomIn=new wf({numTouches:1,numTaps:2}),this._zoomOut=new wf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(w,B,Q){this._zoomIn.touchstart(w,B,Q),this._zoomOut.touchstart(w,B,Q)}touchmove(w,B,Q){this._zoomIn.touchmove(w,B,Q),this._zoomOut.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this._zoomIn.touchend(w,B,Q),le=this._zoomOut.touchend(w,B,Q),ze=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ze=>Ze.easeTo({duration:300,zoom:ze.zoom+1,around:ze.unproject(ee)},{originalEvent:w})}):le?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ze=>Ze.easeTo({duration:300,zoom:ze.zoom-1,around:ze.unproject(le)},{originalEvent:w})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Wu{constructor(w){this._enabled=!!w.enable,this._moveStateManager=w.moveStateManager,this._clickTolerance=w.clickTolerance||1,this._moveFunction=w.move,this._activateOnStart=!!w.activateOnStart,w.assignEvents(this),this.reset()}reset(w){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(w)}_move(...w){let B=this._moveFunction(...w);if(B.bearingDelta||B.pitchDelta||B.around||B.panDelta)return this._active=!0,B}dragStart(w,B){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(w)&&(this._moveStateManager.startMove(w),this._lastPoint=B.length?B[0]:B,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(w,B){if(!this.isEnabled())return;let Q=this._lastPoint;if(!Q)return;if(w.preventDefault(),!this._moveStateManager.isValidMoveEvent(w))return void this.reset(w);let ee=B.length?B[0]:B;return!this._moved&&ee.dist(Q)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=ee,this._move(Q,ee))}dragEnd(w){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(w)&&(this._moved&&c.suppressClick(),this.reset(w))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}let Rf={0:1,2:2};class Xu{constructor(w){this._correctEvent=w.checkCorrectEvent}startMove(w){let B=c.mouseButton(w);this._eventButton=B}endMove(w){delete this._eventButton}isValidStartEvent(w){return this._correctEvent(w)}isValidMoveEvent(w){return!function(B,Q){let ee=Rf[Q];return B.buttons===void 0||(B.buttons&ee)!==ee}(w,this._eventButton)}isValidEndEvent(w){return c.mouseButton(w)===this._eventButton}}class uf{constructor(){this._firstTouch=void 0}_isOneFingerTouch(w){return w.targetTouches.length===1}_isSameTouchEvent(w){return w.targetTouches[0].identifier===this._firstTouch}startMove(w){this._firstTouch=w.targetTouches[0].identifier}endMove(w){delete this._firstTouch}isValidStartEvent(w){return this._isOneFingerTouch(w)}isValidMoveEvent(w){return this._isOneFingerTouch(w)&&this._isSameTouchEvent(w)}isValidEndEvent(w){return this._isOneFingerTouch(w)&&this._isSameTouchEvent(w)}}let Zf=ue=>{ue.mousedown=ue.dragStart,ue.mousemoveWindow=ue.dragMove,ue.mouseup=ue.dragEnd,ue.contextmenu=w=>{w.preventDefault()}},Wl=({enable:ue,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({bearingDelta:(le.x-ee.x)*B}),moveStateManager:Q,enable:ue,assignEvents:Zf})},ah=({enable:ue,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({pitchDelta:(le.y-ee.y)*B}),moveStateManager:Q,enable:ue,assignEvents:Zf})};class Zu{constructor(w,B){this._clickTolerance=w.clickTolerance||1,this._map=B,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(w){return w<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(w,B,Q){return this._calculateTransform(w,B,Q)}touchmove(w,B,Q){if(this._active){if(!this._shouldBePrevented(Q.length))return w.preventDefault(),this._calculateTransform(w,B,Q);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",w)}}touchend(w,B,Q){this._calculateTransform(w,B,Q),this._active&&this._shouldBePrevented(Q.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(w,B,Q){Q.length>0&&(this._active=!0);let ee=Xf(Q,B),le=new a.P(0,0),ze=new a.P(0,0),Ze=0;for(let Mt in ee){let Jt=ee[Mt],$t=this._touches[Mt];$t&&(le._add(Jt),ze._add(Jt.sub($t)),Ze++,ee[Mt]=Jt)}if(this._touches=ee,this._shouldBePrevented(Ze)||!ze.mag())return;let ut=ze.div(Ze);return this._sum._add(ut),this._sum.mag()<this._clickTolerance?void 0:{around:le.div(Ze),panDelta:ut}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class qc{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,ze=Tc(Q,B,ee),Ze=Tc(Q,B,le);if(!ze||!Ze)return;let ut=this._aroundCenter?null:ze.add(Ze).div(2);return this._move([ze,Ze],ut,w)}touchend(w,B,Q){if(!this._firstTwoTouches)return;let[ee,le]=this._firstTwoTouches,ze=Tc(Q,B,ee),Ze=Tc(Q,B,le);ze&&Ze||(this._active&&c.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(w){this._enabled=!0,this._aroundCenter=!!w&&w.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Tc(ue,w,B){for(let Q=0;Q<ue.length;Q++)if(ue[Q].identifier===B)return w[Q]}function wl(ue,w){return Math.log(ue/w)/Math.LN2}class vu extends qc{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(w){this._startDistance=this._distance=w[0].dist(w[1])}_move(w,B){let Q=this._distance;if(this._distance=w[0].dist(w[1]),this._active||!(Math.abs(wl(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:wl(this._distance,Q),pinchAround:B}}}function Oc(ue,w){return 180*ue.angleWith(w)/Math.PI}class cf extends qc{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:Oc(this._vector,ee),pinchAround:B}}_isBelowThreshold(w){this._minDiameter=Math.min(this._minDiameter,w.mag());let B=25/(Math.PI*this._minDiameter)*360,Q=Oc(w,this._startVector);return Math.abs(Q)<B}}function fc(ue){return Math.abs(ue.y)>Math.abs(ue.x)}class Bc extends qc{constructor(w){super(),this._currentTouchCount=0,this._map=w}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(w,B,Q){super.touchstart(w,B,Q),this._currentTouchCount=Q.length}_start(w){this._lastPoints=w,fc(w[0].sub(w[1]))&&(this._valid=!1)}_move(w,B,Q){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let ee=w[0].sub(this._lastPoints[0]),le=w[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ee,le,Q.timeStamp),this._valid?(this._lastPoints=w,this._active=!0,{pitchDelta:(ee.y+le.y)/2*-.5}):void 0}gestureBeginsVertically(w,B,Q){if(this._valid!==void 0)return this._valid;let ee=w.mag()>=2,le=B.mag()>=2;if(!ee&&!le)return;if(!ee||!le)return this._firstMove===void 0&&(this._firstMove=Q),Q-this._firstMove<100&&void 0;let ze=w.y>0==B.y>0;return fc(w)&&fc(B)&&ze}}let kt={panStep:100,bearingStep:15,pitchStep:10};class Zt{constructor(w){this._tr=new du(w);let B=kt;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,ze=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(),ze=-1);break;case 40:w.shiftKey?ee=-1:(w.preventDefault(),ze=1);break;default:return}return this._rotationDisabled&&(Q=0,ee=0),{cameraAnimation:Ze=>{let ut=this._tr;Ze.easeTo({duration:300,easeId:"keyboardHandler",easing:Mr,zoom:B?Math.round(ut.zoom)+B*(w.shiftKey?2:1):ut.zoom,bearing:ut.bearing+Q*this._bearingStep,pitch:ut.pitch+ee*this._pitchStep,offset:[-le*this._panStep,-ze*this._panStep],center:ut.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 Mr(ue){return ue*(2-ue)}let xr=4.000244140625;class Kr{constructor(w,B){this._onTimeout=Q=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new du(w),this._triggerRenderFrame=B,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(w){this._defaultZoomRate=w}setWheelZoomRate(w){this._wheelZoomRate=w}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(w){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!w&&w.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(w){return!!this._map.cooperativeGestures.isEnabled()&&!(w.ctrlKey||this._map.cooperativeGestures.isBypassed(w))}wheel(w){if(!this.isEnabled())return;if(this._shouldBePrevented(w))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",w);let B=w.deltaMode===WheelEvent.DOM_DELTA_LINE?40*w.deltaY:w.deltaY,Q=u.now(),ee=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,B!==0&&B%xr==0?this._type="wheel":B!==0&&Math.abs(B)<4?this._type="trackpad":ee>400?(this._type=null,this._lastValue=B,this._timeout=setTimeout(this._onTimeout,40,w)):this._type||(this._type=Math.abs(ee*B)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,B+=this._lastValue)),w.shiftKey&&B&&(B/=4),this._type&&(this._lastWheelEvent=w,this._delta-=B,this._active||this._start(w)),w.preventDefault()}_start(w){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let B=c.mousePos(this._map.getCanvas(),w),Q=this._tr;this._around=B.y>Q.transform.height/2-Q.transform.getHorizon()?a.N.convert(this._aroundCenter?Q.center:Q.unproject(B)):a.N.convert(Q.center),this._aroundPoint=Q.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let w=this._tr.transform;if(this._delta!==0){let ut=this._type==="wheel"&&Math.abs(this._delta)>xr?this._wheelZoomRate:this._defaultZoomRate,Mt=2/(1+Math.exp(-Math.abs(this._delta*ut)));this._delta<0&&Mt!==0&&(Mt=1/Mt);let Jt=typeof this._targetZoom=="number"?w.zoomScale(this._targetZoom):w.scale;this._targetZoom=Math.min(w.maxZoom,Math.max(w.minZoom,w.scaleZoom(Jt*Mt))),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,ze=!1,Ze=u.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Q&&ee&&Ze){let ut=Math.min(Ze/200,1),Mt=ee(ut);le=a.y.number(Q,B,Mt),ut<1?this._frameId||(this._frameId=!0):ze=!0}else le=B,ze=!0;return this._active=!0,ze&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ze,zoomDelta:le-w.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(w){let B=a.b9;if(this._prevEase){let Q=this._prevEase,ee=(u.now()-Q.start)/Q.duration,le=Q.easing(ee+.01)-Q.easing(ee),ze=.27/Math.sqrt(le*le+1e-4)*.01,Ze=Math.sqrt(.0729-ze*ze);B=a.b8(ze,Ze,.25,1)}return this._prevEase={start:u.now(),duration:w,easing:B},B}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Mi{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 Wi{constructor(w){this._tr=new du(w),this.reset()}reset(){this._active=!1}dblclick(w,B){return w.preventDefault(),{cameraAnimation:Q=>{Q.easeTo({duration:300,zoom:this._tr.zoom+(w.shiftKey?-1:1),around:this._tr.unproject(B)},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class dn{constructor(){this._tap=new wf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(w,B,Q){if(!this._swipePoint)if(this._tapTime){let ee=B[0],le=w.timeStamp-this._tapTime<500,ze=this._tapPoint.dist(ee)<30;le&&ze?Q.length>0&&(this._swipePoint=ee,this._swipeTouch=Q[0].identifier):this.reset()}else this._tap.touchstart(w,B,Q)}touchmove(w,B,Q){if(this._tapTime){if(this._swipePoint){if(Q[0].identifier!==this._swipeTouch)return;let ee=B[0],le=ee.y-this._swipePoint.y;return this._swipePoint=ee,w.preventDefault(),this._active=!0,{zoomDelta:le/128}}}else this._tap.touchmove(w,B,Q)}touchend(w,B,Q){if(this._tapTime)this._swipePoint&&Q.length===0&&this.reset();else{let ee=this._tap.touchend(w,B,Q);ee&&(this._tapTime=w.timeStamp,this._tapPoint=ee)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class wn{constructor(w,B,Q){this._el=w,this._mousePan=B,this._touchPan=Q}enable(w){this._inertiaOptions=w||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class On{constructor(w,B,Q){this._pitchWithRotate=w.pitchWithRotate,this._mouseRotate=B,this._mousePitch=Q}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Yi{constructor(w,B,Q,ee){this._el=w,this._touchZoom=B,this._touchRotate=Q,this._tapDragZoom=ee,this._rotationDisabled=!1,this._enabled=!0}enable(w){this._touchZoom.enable(w),this._rotationDisabled||this._touchRotate.enable(w),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class $i{constructor(w,B){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=w,this._options=B,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let w=this._map.getCanvasContainer();w.classList.add("maplibregl-cooperative-gestures"),this._container=c.create("div","maplibregl-cooperative-gesture-screen",w);let B=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(B=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Q=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),ee=document.createElement("div");ee.className="maplibregl-desktop-message",ee.textContent=B,this._container.appendChild(ee);let le=document.createElement("div");le.className="maplibregl-mobile-message",le.textContent=Q,this._container.appendChild(le),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(c.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(w){return w[this._bypassKey]}notifyGestureBlocked(w,B){this._enabled&&(this._map.fire(new a.k("cooperativegestureprevented",{gestureType:w,originalEvent:B})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let an=ue=>ue.zoom||ue.drag||ue.pitch||ue.rotate;class Fi extends a.k{}function ta(ue){return ue.panDelta&&ue.panDelta.mag()||ue.zoomDelta||ue.bearingDelta||ue.pitchDelta}class Ca{constructor(w,B){this.handleWindowEvent=ee=>{this.handleEvent(ee,`${ee.type}Window`)},this.handleEvent=(ee,le)=>{if(ee.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let ze=ee.type==="renderFrame"?void 0:ee,Ze={needsRenderFrame:!1},ut={},Mt={},Jt=ee.touches,$t=Jt?this._getMapTouches(Jt):void 0,mr=$t?c.touchPos(this._map.getCanvas(),$t):c.mousePos(this._map.getCanvas(),ee);for(let{handlerName:xe,handler:Ie,allowed:qe}of this._handlers){if(!Ie.isEnabled())continue;let Qe;this._blockedByActive(Mt,qe,xe)?Ie.reset():Ie[le||ee.type]&&(Qe=Ie[le||ee.type](ee,mr,$t),this.mergeHandlerResult(Ze,ut,Qe,xe,ze),Qe&&Qe.needsRenderFrame&&this._triggerRenderFrame()),(Qe||Ie.isActive())&&(Mt[xe]=Ie)}let Cr={};for(let xe in this._previousActiveHandlers)Mt[xe]||(Cr[xe]=ze);this._previousActiveHandlers=Mt,(Object.keys(Cr).length||ta(Ze))&&(this._changes.push([Ze,ut,Cr]),this._triggerRenderFrame()),(Object.keys(Mt).length||ta(Ze))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:ve}=Ze;ve&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ve(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pf(w),this._bearingSnap=B.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(B);let Q=this._el;this._listeners=[[Q,"touchstart",{passive:!0}],[Q,"touchmove",{passive:!1}],[Q,"touchend",void 0],[Q,"touchcancel",void 0],[Q,"mousedown",void 0],[Q,"mousemove",void 0],[Q,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Q,"mouseover",void 0],[Q,"mouseout",void 0],[Q,"dblclick",void 0],[Q,"click",void 0],[Q,"keydown",{capture:!1}],[Q,"keyup",void 0],[Q,"wheel",{passive:!1}],[Q,"contextmenu",void 0],[window,"blur",void 0]];for(let[ee,le,ze]of this._listeners)c.addEventListener(ee,le,ee===document?this.handleWindowEvent:this.handleEvent,ze)}destroy(){for(let[w,B,Q]of this._listeners)c.removeEventListener(w,B,w===document?this.handleWindowEvent:this.handleEvent,Q)}_addDefaultHandlers(w){let B=this._map,Q=B.getCanvasContainer();this._add("mapEvent",new If(B,w));let ee=B.boxZoom=new ku(B,w);this._add("boxZoom",ee),w.interactive&&w.boxZoom&&ee.enable();let le=B.cooperativeGestures=new $i(B,w.cooperativeGestures);this._add("cooperativeGestures",le),w.cooperativeGestures&&le.enable();let ze=new zc(B),Ze=new Wi(B);B.doubleClickZoom=new Mi(Ze,ze),this._add("tapZoom",ze),this._add("clickZoom",Ze),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let ut=new dn;this._add("tapDragZoom",ut);let Mt=B.touchPitch=new Bc(B);this._add("touchPitch",Mt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Jt=Wl(w),$t=ah(w);B.dragRotate=new On(w,Jt,$t),this._add("mouseRotate",Jt,["mousePitch"]),this._add("mousePitch",$t,["mouseRotate"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let mr=(({enable:Qe,clickTolerance:Xe})=>{let nt=new Xu({checkCorrectEvent:qt=>c.mouseButton(qt)===0&&!qt.ctrlKey});return new Wu({clickTolerance:Xe,move:(qt,jt)=>({around:jt,panDelta:jt.sub(qt)}),activateOnStart:!0,moveStateManager:nt,enable:Qe,assignEvents:Zf})})(w),Cr=new Zu(w,B);B.dragPan=new wn(Q,mr,Cr),this._add("mousePan",mr),this._add("touchPan",Cr,["touchZoom","touchRotate"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let ve=new cf,xe=new vu;B.touchZoomRotate=new Yi(Q,xe,ve,ut),this._add("touchRotate",ve,["touchPan","touchZoom"]),this._add("touchZoom",xe,["touchPan","touchRotate"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let Ie=B.scrollZoom=new Kr(B,()=>this._triggerRenderFrame());this._add("scrollZoom",Ie,["mousePan"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let qe=B.keyboard=new Zt(B);this._add("keyboard",qe),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add("blockableMapEvent",new Cs(B))}_add(w,B,Q){this._handlers.push({handlerName:w,handler:B,allowed:Q}),this._handlersById[w]=B}stop(w){if(!this._updatingCamera){for(let{handler:B}of this._handlers)B.reset();this._inertia.clear(),this._fireEvents({},{},w),this._changes=[]}}isActive(){for(let{handler:w}of this._handlers)if(w.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!an(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 ze={handlerName:ee,originalEvent:Q.originalEvent||le};Q.zoomDelta!==void 0&&(B.zoom=ze),Q.panDelta!==void 0&&(B.drag=ze),Q.pitchDelta!==void 0&&(B.pitch=ze),Q.bearingDelta!==void 0&&(B.rotate=ze)}_applyChanges(){let w={},B={},Q={};for(let[ee,le,ze]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,ze);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,le=ee._getTransformForUpdate(),ze=ee.terrain;if(!(ta(w)||ze&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:Ze,zoomDelta:ut,bearingDelta:Mt,pitchDelta:Jt,around:$t,pinchAround:mr}=w;mr!==void 0&&($t=mr),ee._stop(!0),$t=$t||ee.transform.centerPoint;let Cr=le.pointLocation(Ze?$t.sub(Ze):$t);Mt&&(le.bearing+=Mt),Jt&&(le.pitch+=Jt),ut&&(le.zoom+=ut),ze?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?le.center=le.pointLocation(le.centerPoint.sub(Ze)):le.setLocationAtPoint(Cr,$t):(this._terrainMovement=!0,this._map._elevationFreeze=!0,le.setLocationAtPoint(Cr,$t)):le.setLocationAtPoint(Cr,$t),ee._applyUpdatedTransform(le),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=an(this._eventsInProgress),le=an(w),ze={};for(let $t in w){let{originalEvent:mr}=w[$t];this._eventsInProgress[$t]||(ze[`${$t}start`]=mr),this._eventsInProgress[$t]=w[$t]}!ee&&le&&this._fireEvent("movestart",le.originalEvent);for(let $t in ze)this._fireEvent($t,ze[$t]);le&&this._fireEvent("move",le.originalEvent);for(let $t in w){let{originalEvent:mr}=w[$t];this._fireEvent($t,mr)}let Ze={},ut;for(let $t in this._eventsInProgress){let{handlerName:mr,originalEvent:Cr}=this._eventsInProgress[$t];this._handlersById[mr].isActive()||(delete this._eventsInProgress[$t],ut=B[mr]||Cr,Ze[`${$t}end`]=ut)}for(let $t in Ze)this._fireEvent($t,Ze[$t]);let Mt=an(this._eventsInProgress),Jt=(ee||le)&&!Mt;if(Jt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let $t=this._map._getTransformForUpdate();$t.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform($t)}if(Q&&Jt){this._updatingCamera=!0;let $t=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),mr=Cr=>Cr!==0&&-this._bearingSnap<Cr&&Cr<this._bearingSnap;!$t||!$t.essential&&u.prefersReducedMotion?(this._map.fire(new a.k("moveend",{originalEvent:ut})),mr(this._map.getBearing())&&this._map.resetNorth()):(mr($t.bearing||this._map.getBearing())&&($t.bearing=0),$t.freezeElevation=!0,this._map.easeTo($t,{originalEvent:ut})),this._updatingCamera=!1}}_fireEvent(w,B){this._map.fire(new a.k(w,B?{originalEvent:B}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(w=>{delete this._frameId,this.handleEvent(new Fi("renderFrame",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ra extends a.E{constructor(w,B){super(),this._renderFrameCallback=()=>{let Q=Math.min((u.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Q)),Q<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=w,this._bearingSnap=B.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new a.N(this.transform.center.lng,this.transform.center.lat)}setCenter(w,B){return this.jumpTo({center:w},B)}panBy(w,B,Q){return w=a.P.convert(w).mult(-1),this.panTo(this.transform.center,a.e({offset:w},B),Q)}panTo(w,B,Q){return this.easeTo(a.e({center:w},B),Q)}getZoom(){return this.transform.zoom}setZoom(w,B){return this.jumpTo({zoom:w},B),this}zoomTo(w,B,Q){return this.easeTo(a.e({zoom:w},B),Q)}zoomIn(w,B){return this.zoomTo(this.getZoom()+1,w,B),this}zoomOut(w,B){return this.zoomTo(this.getZoom()-1,w,B),this}getBearing(){return this.transform.bearing}setBearing(w,B){return this.jumpTo({bearing:w},B),this}getPadding(){return this.transform.padding}setPadding(w,B){return this.jumpTo({padding:w},B),this}rotateTo(w,B,Q){return this.easeTo(a.e({bearing:w},B),Q)}resetNorth(w,B){return this.rotateTo(0,a.e({duration:1e3},w),B),this}resetNorthPitch(w,B){return this.easeTo(a.e({bearing:0,pitch:0,duration:1e3},w),B),this}snapToNorth(w,B){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(w,B):this}getPitch(){return this.transform.pitch}setPitch(w,B){return this.jumpTo({pitch:w},B),this}cameraForBounds(w,B){w=ce.convert(w).adjustAntiMeridian();let Q=B&&B.bearing||0;return this._cameraForBoxAndBearing(w.getNorthWest(),w.getSouthEast(),Q,B)}_cameraForBoxAndBearing(w,B,Q,ee){let le={top:0,bottom:0,right:0,left:0};if(typeof(ee=a.e({padding:le,offset:[0,0],maxZoom:this.transform.maxZoom},ee)).padding=="number"){let Hr=ee.padding;ee.padding={top:Hr,bottom:Hr,right:Hr,left:Hr}}ee.padding=a.e(le,ee.padding);let ze=this.transform,Ze=ze.padding,ut=new ce(w,B),Mt=ze.project(ut.getNorthWest()),Jt=ze.project(ut.getNorthEast()),$t=ze.project(ut.getSouthEast()),mr=ze.project(ut.getSouthWest()),Cr=a.ba(-Q),ve=Mt.rotate(Cr),xe=Jt.rotate(Cr),Ie=$t.rotate(Cr),qe=mr.rotate(Cr),Qe=new a.P(Math.max(ve.x,xe.x,qe.x,Ie.x),Math.max(ve.y,xe.y,qe.y,Ie.y)),Xe=new a.P(Math.min(ve.x,xe.x,qe.x,Ie.x),Math.min(ve.y,xe.y,qe.y,Ie.y)),nt=Qe.sub(Xe),qt=(ze.width-(Ze.left+Ze.right+ee.padding.left+ee.padding.right))/nt.x,jt=(ze.height-(Ze.top+Ze.bottom+ee.padding.top+ee.padding.bottom))/nt.y;if(jt<0||qt<0)return void a.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");let ar=Math.min(ze.scaleZoom(ze.scale*Math.min(qt,jt)),ee.maxZoom),fr=a.P.convert(ee.offset),br=new a.P((ee.padding.left-ee.padding.right)/2,(ee.padding.top-ee.padding.bottom)/2).rotate(a.ba(Q)),Fr=fr.add(br).mult(ze.scale/ze.zoomScale(ar));return{center:ze.unproject(Mt.add($t).div(2).sub(Fr)),zoom:ar,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,ze=!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&&(ze=!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)),ze&&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),ze=a.Z.fromLngLat(Q,ee),Ze=ze.x-le.x,ut=ze.y-le.y,Mt=ze.z-le.z,Jt=Math.hypot(Ze,ut,Mt);if(Jt===0)throw new Error("Can't calculate camera options with same From and To");let $t=Math.hypot(Ze,ut),mr=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Jt/this.transform.tileSize),Cr=180*Math.atan2(Ze,-ut)/Math.PI,ve=180*Math.acos($t/Jt)/Math.PI;return ve=Mt<0?90-ve:90+ve,{center:ze.toLngLat(),zoom:mr,pitch:ve,bearing:Cr}}easeTo(w,B){var Q;this._stop(!1,w.easeId),((w=a.e({offset:[0,0],duration:500,easing:a.b9},w)).animate===!1||!w.essential&&u.prefersReducedMotion)&&(w.duration=0);let ee=this._getTransformForUpdate(),le=ee.zoom,ze=ee.bearing,Ze=ee.pitch,ut=ee.padding,Mt="bearing"in w?this._normalizeBearing(w.bearing,ze):ze,Jt="pitch"in w?+w.pitch:Ze,$t="padding"in w?w.padding:ee.padding,mr=a.P.convert(w.offset),Cr=ee.centerPoint.add(mr),ve=ee.pointLocation(Cr),{center:xe,zoom:Ie}=ee.getConstrained(a.N.convert(w.center||ve),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(xe,ee);let qe=ee.project(ve),Qe=ee.project(xe).sub(qe),Xe=ee.zoomScale(Ie-le),nt,qt;w.around&&(nt=a.N.convert(w.around),qt=ee.locationPoint(nt));let jt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Ie!==le,this._rotating=this._rotating||ze!==Mt,this._pitching=this._pitching||Jt!==Ze,this._padding=!ee.isPaddingEqual($t),this._easeId=w.easeId,this._prepareEase(B,w.noMoveStart,jt),this.terrain&&this._prepareElevation(xe),this._ease(ar=>{if(this._zooming&&(ee.zoom=a.y.number(le,Ie,ar)),this._rotating&&(ee.bearing=a.y.number(ze,Mt,ar)),this._pitching&&(ee.pitch=a.y.number(Ze,Jt,ar)),this._padding&&(ee.interpolatePadding(ut,$t,ar),Cr=ee.centerPoint.add(mr)),this.terrain&&!w.freezeElevation&&this._updateElevation(ar),nt)ee.setLocationAtPoint(nt,qt);else{let fr=ee.zoomScale(ee.zoom-le),br=Ie>le?Math.min(2,Xe):Math.max(.5,Xe),Fr=Math.pow(br,1-ar),Hr=ee.unproject(qe.add(Qe.mult(ar*Fr)).mult(fr));ee.setLocationAtPoint(ee.renderWorldCopies?Hr.wrap():Hr,Cr)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},ar=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,ar)},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:ze,zoom:Ze,pitch:ut,bearing:Mt,elevation:Jt}=ee(le);ze&&(le.center=ze),Ze!==void 0&&(le.zoom=Ze),ut!==void 0&&(le.pitch=ut),Mt!==void 0&&(le.bearing=Mt),Jt!==void 0&&(le.elevation=Jt),Q.apply(le)}this.transform.apply(Q)}_fireMoveEvents(w){this.fire(new a.k("move",w)),this._zooming&&this.fire(new a.k("zoom",w)),this._rotating&&this.fire(new a.k("rotate",w)),this._pitching&&this.fire(new a.k("pitch",w))}_afterEase(w,B){if(this._easeId&&B&&this._easeId===B)return;delete this._easeId;let Q=this._zooming,ee=this._rotating,le=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Q&&this.fire(new a.k("zoomend",w)),ee&&this.fire(new a.k("rotateend",w)),le&&this.fire(new a.k("pitchend",w)),this.fire(new a.k("moveend",w))}flyTo(w,B){var Q;if(!w.essential&&u.prefersReducedMotion){let Ln=a.M(w,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ln,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,ze=ee.bearing,Ze=ee.pitch,ut=ee.padding,Mt="bearing"in w?this._normalizeBearing(w.bearing,ze):ze,Jt="pitch"in w?+w.pitch:Ze,$t="padding"in w?w.padding:ee.padding,mr=a.P.convert(w.offset),Cr=ee.centerPoint.add(mr),ve=ee.pointLocation(Cr),{center:xe,zoom:Ie}=ee.getConstrained(a.N.convert(w.center||ve),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(xe,ee);let qe=ee.zoomScale(Ie-le),Qe=ee.project(ve),Xe=ee.project(xe).sub(Qe),nt=w.curve,qt=Math.max(ee.width,ee.height),jt=qt/qe,ar=Xe.mag();if("minZoom"in w){let Ln=a.ac(Math.min(w.minZoom,le,Ie),ee.minZoom,ee.maxZoom),Yn=qt/ee.zoomScale(Ln-le);nt=Math.sqrt(Yn/ar*2)}let fr=nt*nt;function br(Ln){let Yn=(jt*jt-qt*qt+(Ln?-1:1)*fr*fr*ar*ar)/(2*(Ln?jt:qt)*fr*ar);return Math.log(Math.sqrt(Yn*Yn+1)-Yn)}function Fr(Ln){return(Math.exp(Ln)-Math.exp(-Ln))/2}function Hr(Ln){return(Math.exp(Ln)+Math.exp(-Ln))/2}let ri=br(!1),Ci=function(Ln){return Hr(ri)/Hr(ri+nt*Ln)},cn=function(Ln){return qt*((Hr(ri)*(Fr(Yn=ri+nt*Ln)/Hr(Yn))-Fr(ri))/fr)/ar;var Yn},sn=(br(!0)-ri)/nt;if(Math.abs(ar)<1e-6||!isFinite(sn)){if(Math.abs(qt-jt)<1e-6)return this.easeTo(w,B);let Ln=jt<qt?-1:1;sn=Math.abs(Math.log(jt/qt))/nt,cn=()=>0,Ci=Yn=>Math.exp(Ln*nt*Yn)}return w.duration="duration"in w?+w.duration:1e3*sn/("screenSpeed"in w?+w.screenSpeed/nt:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=ze!==Mt,this._pitching=Jt!==Ze,this._padding=!ee.isPaddingEqual($t),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(xe),this._ease(Ln=>{let Yn=Ln*sn,Aa=1/Ci(Yn);ee.zoom=Ln===1?Ie:le+ee.scaleZoom(Aa),this._rotating&&(ee.bearing=a.y.number(ze,Mt,Ln)),this._pitching&&(ee.pitch=a.y.number(Ze,Jt,Ln)),this._padding&&(ee.interpolatePadding(ut,$t,Ln),Cr=ee.centerPoint.add(mr)),this.terrain&&!w.freezeElevation&&this._updateElevation(Ln);let fa=Ln===1?xe:ee.unproject(Qe.add(Xe.mult(cn(Yn))).mult(Aa));ee.setLocationAtPoint(ee.renderWorldCopies?fa.wrap():fa,Cr),this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},()=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B)},w),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(w,B){var Q;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let ee=this._onEaseEnd;delete this._onEaseEnd,ee.call(this,B)}return w||(Q=this.handlers)===null||Q===void 0||Q.stop(!1),this}_ease(w,B,Q){Q.animate===!1||Q.duration===0?(w(1),B()):(this._easeStart=u.now(),this._easeOptions=Q,this._onEaseFrame=w,this._onEaseEnd=B,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(w,B){w=a.b3(w,-180,180);let Q=Math.abs(w-B);return Math.abs(w-360-B)<Q&&(w-=360),Math.abs(w+360-B)<Q&&(w+=360),w}_normalizeCenter(w,B){if(!B.renderWorldCopies||B.lngRange)return;let Q=w.lng-B.center.lng;w.lng+=Q>180?-360:Q<-180?360:0}queryTerrainElevation(w){return this.terrain?this.terrain.getElevationForLngLatZoom(a.N.convert(w),this.transform.tileZoom)-this.transform.elevation:null}}let La={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Na{constructor(w=La){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=B=>{!B||B.sourceDataType!=="metadata"&&B.sourceDataType!=="visibility"&&B.dataType!=="style"&&B.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=w}getDefaultPosition(){return"bottom-right"}onAdd(w){return this._map=w,this._compact=this.options.compact,this._container=c.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=c.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=c.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){c.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(w,B){let Q=this._map._getUIString(`AttributionControl.${B}`);w.title=Q,w.setAttribute("aria-label",Q)}_updateAttributions(){if(!this._map.style)return;let w=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?w=w.concat(this.options.customAttribution.map(ee=>typeof ee!="string"?"":ee)):typeof this.options.customAttribution=="string"&&w.push(this.options.customAttribution)),this._map.style.stylesheet){let ee=this._map.style.stylesheet;this.styleOwner=ee.owner,this.styleId=ee.id}let B=this._map.style.sourceCaches;for(let ee in B){let le=B[ee];if(le.used||le.usedForTerrain){let ze=le.getSource();ze.attribution&&w.indexOf(ze.attribution)<0&&w.push(ze.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,le)=>ee.length-le.length),w=w.filter((ee,le)=>{for(let ze=le+1;ze<w.length;ze++)if(w[ze].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 Zn{constructor(w={}){this._updateCompact=()=>{let B=this._container.children;if(B.length){let Q=B[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Q.classList.add("maplibregl-compact"):Q.classList.remove("maplibregl-compact")}},this.options=w}getDefaultPosition(){return"bottom-left"}onAdd(w){this._map=w,this._compact=this.options&&this.options.compact,this._container=c.create("div","maplibregl-ctrl");let B=c.create("a","maplibregl-ctrl-logo");return B.target="_blank",B.rel="noopener nofollow",B.href="https://maplibre.org/",B.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),B.setAttribute("rel","noopener nofollow"),this._container.appendChild(B),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){c.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Dn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(w){let B=++this._id;return this._queue.push({callback:w,id:B,cancelled:!1}),B}remove(w){let B=this._currentlyRunning,Q=B?this._queue.concat(B):this._queue;for(let ee of Q)if(ee.id===w)return void(ee.cancelled=!0)}run(w=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let B=this._currentlyRunning=this._queue;this._queue=[];for(let Q of B)if(!Q.cancelled&&(Q.callback(w),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ka=a.Y([{name:"a_pos3d",type:"Int16",components:3}]);class bo extends a.E{constructor(w){super(),this.sourceCache=w,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,w.usedForTerrain=!0,w.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(w,B){this.sourceCache.update(w,B),this._renderableTilesKeys=[];let Q={};for(let ee of w.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:B}))Q[ee.key]=!0,this._renderableTilesKeys.push(ee.key),this._tiles[ee.key]||(ee.posMatrix=new Float64Array(16),a.aP(ee.posMatrix,0,a.X,0,a.X,0,1),this._tiles[ee.key]=new Tt(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 ze=ee.canonical.z-w.canonical.z,Ze=ee.canonical.x-(ee.canonical.x>>ze<<ze),ut=ee.canonical.y-(ee.canonical.y>>ze<<ze),Mt=a.X>>ze;a.aP(le.posMatrix,0,Mt,0,Mt,0,1),a.J(le.posMatrix,le.posMatrix,[-Ze*Mt,-ut*Mt,0]),B[Q]=le}else if(w.canonical.isChildOf(ee.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let ze=w.canonical.z-ee.canonical.z,Ze=w.canonical.x-(w.canonical.x>>ze<<ze),ut=w.canonical.y-(w.canonical.y>>ze<<ze),Mt=a.X>>ze;a.aP(le.posMatrix,0,a.X,0,a.X,0,1),a.J(le.posMatrix,le.posMatrix,[Ze*Mt,ut*Mt,0]),a.K(le.posMatrix,le.posMatrix,[1/2**ze,1/2**ze,0]),B[Q]=le}}return B}getSourceTile(w,B){let Q=this.sourceCache._source,ee=w.overscaledZ-this.deltaZoom;if(ee>Q.maxzoom&&(ee=Q.maxzoom),ee<Q.minzoom)return null;this._sourceTileCache[w.key]||(this._sourceTileCache[w.key]=w.scaledTo(ee).key);let le=this.sourceCache.getTileByID(this._sourceTileCache[w.key]);if((!le||!le.dem)&&B)for(;ee>=Q.minzoom&&(!le||!le.dem);)le=this.sourceCache.getTileByID(w.scaledTo(ee--).key);return le}tilesAfterTime(w=Date.now()){return Object.values(this._tiles).filter(B=>B.timeAdded>=w)}}class Zo{constructor(w,B,Q){this.painter=w,this.sourceCache=new bo(B),this.options=Q,this.exaggeration=typeof Q.exaggeration=="number"?Q.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(w,B,Q,ee=a.X){var le;if(!(B>=0&&B<ee&&Q>=0&&Q<ee))return 0;let ze=this.getTerrainData(w),Ze=(le=ze.tile)===null||le===void 0?void 0:le.dem;if(!Ze)return 0;let ut=function(ve,xe,Ie){var qe=xe[0],Qe=xe[1];return ve[0]=Ie[0]*qe+Ie[4]*Qe+Ie[12],ve[1]=Ie[1]*qe+Ie[5]*Qe+Ie[13],ve}([],[B/ee*a.X,Q/ee*a.X],ze.u_terrain_matrix),Mt=[ut[0]*Ze.dim,ut[1]*Ze.dim],Jt=Math.floor(Mt[0]),$t=Math.floor(Mt[1]),mr=Mt[0]-Jt,Cr=Mt[1]-$t;return Ze.get(Jt,$t)*(1-mr)*(1-Cr)+Ze.get(Jt+1,$t)*mr*(1-Cr)+Ze.get(Jt,$t+1)*(1-mr)*Cr+Ze.get(Jt+1,$t+1)*mr*Cr}getElevationForLngLatZoom(w,B){if(!a.bb(B,w.wrap()))return 0;let{tileID:Q,mercatorX:ee,mercatorY:le}=this._getOverscaledTileIDFromLngLatZoom(w,B);return this.getElevation(Q,ee%a.X,le%a.X,a.X)}getElevation(w,B,Q,ee=a.X){return this.getDEMElevation(w,B,Q,ee)*this.exaggeration}getTerrainData(w){if(!this._emptyDemTexture){let ee=this.painter.context,le=new a.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new g(ee,le,ee.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new g(ee,new a.R({width:1,height:1}),ee.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(ee.gl.NEAREST,ee.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=a.an([])}let B=this.sourceCache.getSourceTile(w,!0);if(B&&B.dem&&(!B.demTexture||B.needsTerrainPrepare)){let ee=this.painter.context;B.demTexture=this.painter.getTileTexture(B.dem.stride),B.demTexture?B.demTexture.update(B.dem.getPixels(),{premultiply:!1}):B.demTexture=new g(ee,B.dem.getPixels(),ee.gl.RGBA,{premultiply:!1}),B.demTexture.bind(ee.gl.NEAREST,ee.gl.CLAMP_TO_EDGE),B.needsTerrainPrepare=!1}let Q=B&&B+B.tileID.key+w.key;if(Q&&!this._demMatrixCache[Q]){let ee=this.sourceCache.sourceCache._source.maxzoom,le=w.canonical.z-B.tileID.canonical.z;w.overscaledZ>w.canonical.z&&(w.canonical.z>=ee?le=w.canonical.z-ee:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let ze=w.canonical.x-(w.canonical.x>>le<<le),Ze=w.canonical.y-(w.canonical.y>>le<<le),ut=a.bc(new Float64Array(16),[1/(a.X<<le),1/(a.X<<le),0]);a.J(ut,ut,[ze*a.X,Ze*a.X,0]),this._demMatrixCache[w.key]={matrix:ut,coord:w}}return{u_depth:2,u_terrain:3,u_terrain_dim:B&&B.dem&&B.dem.dim||1,u_terrain_matrix:Q?this._demMatrixCache[w.key].matrix:this._emptyDemMatrix,u_terrain_unpack:B&&B.dem&&B.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(B&&B.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:B}}getFramebuffer(w){let B=this.painter,Q=B.width/devicePixelRatio,ee=B.height/devicePixelRatio;return!this._fbo||this._fbo.width===Q&&this._fbo.height===ee||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new g(B.context,{width:Q,height:ee,data:null},B.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(B.context.gl.NEAREST,B.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new g(B.context,{width:Q,height:ee,data:null},B.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(B.context.gl.NEAREST,B.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=B.context.createFramebuffer(Q,ee,!0,!1),this._fbo.depthAttachment.set(B.context.createRenderbuffer(B.context.gl.DEPTH_COMPONENT16,Q,ee))),this._fbo.colorAttachment.set(w==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){let w=this.painter.context;if(this._coordsTexture)return this._coordsTexture;let B=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let le=0,ze=0;le<this._coordsTextureSize;le++)for(let Ze=0;Ze<this._coordsTextureSize;Ze++,ze+=4)B[ze+0]=255&Ze,B[ze+1]=255&le,B[ze+2]=Ze>>8<<4|le>>8,B[ze+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new g(w,Q,w.gl.RGBA,{premultiply:!1});return ee.bind(w.gl.NEAREST,w.gl.CLAMP_TO_EDGE),this._coordsTexture=ee,ee}pointCoordinate(w){this.painter.maybeDrawDepthAndCoords(!0);let B=new Uint8Array(4),Q=this.painter.context,ee=Q.gl,le=Math.round(w.x*this.painter.pixelRatio/devicePixelRatio),ze=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),Ze=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ee.readPixels(le,Ze-ze-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let ut=B[0]+(B[2]>>4<<8),Mt=B[1]+((15&B[2])<<8),Jt=this.coordsIndex[255-B[3]],$t=Jt&&this.sourceCache.getTileByID(Jt);if(!$t)return null;let mr=this._coordsTextureSize,Cr=(1<<$t.tileID.canonical.z)*mr;return new a.Z(($t.tileID.canonical.x*mr+ut)/Cr+$t.tileID.wrap,($t.tileID.canonical.y*mr+Mt)/Cr,this.getElevation($t.tileID,ut,Mt,mr))}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,ze=ee*ee;for(let $t=0;$t<=ee;$t++)for(let mr=0;mr<=ee;mr++)B.emplaceBack(mr*le,$t*le,0);for(let $t=0;$t<ze;$t+=ee+1)for(let mr=0;mr<ee;mr++)Q.emplaceBack(mr+$t,ee+mr+$t+1,ee+mr+$t+2),Q.emplaceBack(mr+$t,ee+mr+$t+2,mr+$t+1);let Ze=B.length,ut=Ze+2*(ee+1);for(let $t of[0,1])for(let mr=0;mr<=ee;mr++)for(let Cr of[0,1])B.emplaceBack(mr*le,$t*a.X,Cr);for(let $t=0;$t<2*ee;$t+=2)Q.emplaceBack(ut+$t,ut+$t+1,ut+$t+3),Q.emplaceBack(ut+$t,ut+$t+3,ut+$t+2),Q.emplaceBack(Ze+$t,Ze+$t+3,Ze+$t+1),Q.emplaceBack(Ze+$t,Ze+$t+2,Ze+$t+3);let Mt=B.length,Jt=Mt+2*(ee+1);for(let $t of[0,1])for(let mr=0;mr<=ee;mr++)for(let Cr of[0,1])B.emplaceBack($t*a.X,mr*le,Cr);for(let $t=0;$t<2*ee;$t+=2)Q.emplaceBack(Mt+$t,Mt+$t+1,Mt+$t+3),Q.emplaceBack(Mt+$t,Mt+$t+3,Mt+$t+2),Q.emplaceBack(Jt+$t,Jt+$t+3,Jt+$t+1),Q.emplaceBack(Jt+$t,Jt+$t+2,Jt+$t+3);return this._mesh=new Eu(w.createVertexBuffer(B,Ka.members),w.createIndexBuffer(Q),a.a0.simpleSegment(0,0,B.length,Q.length)),this._mesh}getMeshFrameDelta(w){return 2*Math.PI*a.be/Math.pow(2,w)/5}getMinTileElevationForLngLatZoom(w,B){var Q;let{tileID:ee}=this._getOverscaledTileIDFromLngLatZoom(w,B);return(Q=this.getMinMaxElevation(ee).minElevation)!==null&&Q!==void 0?Q:0}getMinMaxElevation(w){let B=this.getTerrainData(w).tile,Q={minElevation:null,maxElevation:null};return B&&B.dem&&(Q.minElevation=B.dem.min*this.exaggeration,Q.maxElevation=B.dem.max*this.exaggeration),Q}_getOverscaledTileIDFromLngLatZoom(w,B){let Q=a.Z.fromLngLat(w.wrap()),ee=(1<<B)*a.X,le=Q.x*ee,ze=Q.y*ee,Ze=Math.floor(le/a.X),ut=Math.floor(ze/a.X);return{tileID:new a.S(B,0,B,Ze,ut),mercatorX:le,mercatorY:ze}}}class Ss{constructor(w,B,Q){this._context=w,this._size=B,this._tileSize=Q,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(let w of this._objects)w.texture.destroy(),w.fbo.destroy()}_createObject(w){let B=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),Q=new g(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return Q.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),B.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),B.colorAttachment.set(Q.texture),{id:w,fbo:B,texture:Q,stamp:-1,inUse:!1}}getObjectForId(w){return this._objects[w]}useObject(w){w.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(B=>w.id!==B),this._recentlyUsed.push(w.id)}stampObject(w){w.stamp=++this._stamp}getOrCreateFreeObject(){for(let B of this._recentlyUsed)if(!this._objects[B].inUse)return this._objects[B];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let w=this._createObject(this._objects.length);return this._objects.push(w),w}freeObject(w){w.inUse=!1}freeAllObjects(){for(let w of this._objects)this.freeObject(w)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(w=>!w.inUse)===!1}}let as={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ws{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Ss(w.context,30,B.sourceCache.tileSize*B.qualityFactor)}destruct(){this.pool.destruct()}getTexture(w){return this.pool.getObjectForId(w.rtt[this._stacks.length-1].id).texture}prepareForRender(w,B){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=w._order.filter(Q=>!w._layers[Q].isHidden(B)),this._coordsDescendingInv={};for(let Q in w.sourceCaches){this._coordsDescendingInv[Q]={};let ee=w.sourceCaches[Q].getVisibleCoordinates();for(let le of ee){let ze=this.terrain.sourceCache.getTerrainCoords(le);for(let Ze in ze)this._coordsDescendingInv[Q][Ze]||(this._coordsDescendingInv[Q][Ze]=[]),this._coordsDescendingInv[Q][Ze].push(ze[Ze])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],le=ee.source;if(as[ee.type]&&!this._coordsDescendingInvStr[le]){this._coordsDescendingInvStr[le]={};for(let ze in this._coordsDescendingInv[le])this._coordsDescendingInvStr[le][ze]=this._coordsDescendingInv[le][ze].map(Ze=>Ze.key).sort().join()}}for(let Q of this._renderableTiles)for(let ee in this._coordsDescendingInvStr){let le=this._coordsDescendingInvStr[ee][Q.tileID.key];le&&le!==Q.rttCoords[ee]&&(Q.rtt=[])}}renderLayer(w){if(w.isHidden(this.painter.transform.zoom))return!1;let B=w.type,Q=this.painter,ee=this._renderableLayerIds[this._renderableLayerIds.length-1]===w.id;if(as[B]&&(this._prevType&&as[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(as[this._prevType]||as[B]&&ee){this._prevType=B;let le=this._stacks.length-1,ze=this._stacks[le]||[];for(let Ze of this._renderableTiles){if(this.pool.isFull()&&(js(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Ze),Ze.rtt[le]){let Mt=this.pool.getObjectForId(Ze.rtt[le].id);if(Mt.stamp===Ze.rtt[le].stamp){this.pool.useObject(Mt);continue}}let ut=this.pool.getOrCreateFreeObject();this.pool.useObject(ut),this.pool.stampObject(ut),Ze.rtt[le]={id:ut.id,stamp:ut.stamp},Q.context.bindFramebuffer.set(ut.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let Mt=0;Mt<ze.length;Mt++){let Jt=Q.style._layers[ze[Mt]],$t=Jt.source?this._coordsDescendingInv[Jt.source][Ze.tileID.key]:[Ze.tileID];Q.context.viewport.set([0,0,ut.fbo.width,ut.fbo.height]),Q._renderTileClippingMasks(Jt,$t),Q.renderLayer(Q,Q.style.sourceCaches[Jt.source],Jt,$t),Jt.source&&(Ze.rttCoords[Jt.source]=this._coordsDescendingInvStr[Jt.source][Ze.tileID.key])}}return js(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),as[B]}return!1}}let Ho={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},ml=o,Ws={hash:!1,interactive:!0,bearingSnap:7,attributionControl:La,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:a.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ls=ue=>{ue.touchstart=ue.dragStart,ue.touchmoveWindow=ue.dragMove,ue.touchend=ue.dragEnd},va={showCompass:!0,showZoom:!0,visualizePitch:!1};class no{constructor(w,B,Q=!1){this.mousedown=ze=>{this.startMouse(a.e({},ze,{ctrlKey:!0,preventDefault:()=>ze.preventDefault()}),c.mousePos(this.element,ze)),c.addEventListener(window,"mousemove",this.mousemove),c.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ze=>{this.moveMouse(ze,c.mousePos(this.element,ze))},this.mouseup=ze=>{this.mouseRotate.dragEnd(ze),this.mousePitch&&this.mousePitch.dragEnd(ze),this.offTemp()},this.touchstart=ze=>{ze.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=c.touchPos(this.element,ze.targetTouches)[0],this.startTouch(ze,this._startPos),c.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.addEventListener(window,"touchend",this.touchend))},this.touchmove=ze=>{ze.targetTouches.length!==1?this.reset():(this._lastPos=c.touchPos(this.element,ze.targetTouches)[0],this.moveTouch(ze,this._lastPos))},this.touchend=ze=>{ze.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let ee=w.dragRotate._mouseRotate.getClickTolerance(),le=w.dragRotate._mousePitch.getClickTolerance();this.element=B,this.mouseRotate=Wl({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:ze,clickTolerance:Ze,bearingDegreesPerPixelMoved:ut=.8})=>{let Mt=new uf;return new Wu({clickTolerance:Ze,move:(Jt,$t)=>({bearingDelta:($t.x-Jt.x)*ut}),moveStateManager:Mt,enable:ze,assignEvents:Ls})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=ah({clickTolerance:le,enable:!0}),this.touchPitch=(({enable:ze,clickTolerance:Ze,pitchDegreesPerPixelMoved:ut=-.5})=>{let Mt=new uf;return new Wu({clickTolerance:Ze,move:(Jt,$t)=>({pitchDelta:($t.y-Jt.y)*ut}),moveStateManager:Mt,enable:ze,assignEvents:Ls})})({clickTolerance:le,enable:!0})),c.addEventListener(B,"mousedown",this.mousedown),c.addEventListener(B,"touchstart",this.touchstart,{passive:!1}),c.addEventListener(B,"touchcancel",this.reset)}startMouse(w,B){this.mouseRotate.dragStart(w,B),this.mousePitch&&this.mousePitch.dragStart(w,B),c.disableDrag()}startTouch(w,B){this.touchRotate.dragStart(w,B),this.touchPitch&&this.touchPitch.dragStart(w,B),c.disableDrag()}moveMouse(w,B){let Q=this.map,{bearingDelta:ee}=this.mouseRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.mousePitch){let{pitchDelta:le}=this.mousePitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}moveTouch(w,B){let Q=this.map,{bearingDelta:ee}=this.touchRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.touchPitch){let{pitchDelta:le}=this.touchPitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}off(){let w=this.element;c.removeEventListener(w,"mousedown",this.mousedown),c.removeEventListener(w,"touchstart",this.touchstart,{passive:!1}),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend),c.removeEventListener(w,"touchcancel",this.reset),this.offTemp()}offTemp(){c.enableDrag(),c.removeEventListener(window,"mousemove",this.mousemove),c.removeEventListener(window,"mouseup",this.mouseup),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend)}}let ys;function rs(ue,w,B){let Q=new a.N(ue.lng,ue.lat);if(ue=new a.N(ue.lng,ue.lat),w){let ee=new a.N(ue.lng-360,ue.lat),le=new a.N(ue.lng+360,ue.lat),ze=B.locationPoint(ue).distSqr(w);B.locationPoint(ee).distSqr(w)<ze?ue=ee:B.locationPoint(le).distSqr(w)<ze&&(ue=le)}for(;Math.abs(ue.lng-B.center.lng)>180;){let ee=B.locationPoint(ue);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;ue.lng>B.center.lng?ue.lng-=360:ue.lng+=360}return ue.lng!==Q.lng&&B.locationPoint(ue).y>B.height/2-B.getHorizon()?ue:Q}let Ql={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Cu(ue,w,B){let Q=ue.classList;for(let ee in Ql)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class Yu extends a.E{constructor(w){if(super(),this._onKeyPress=B=>{let Q=B.code,ee=B.charCode||B.keyCode;Q!=="Space"&&Q!=="Enter"&&ee!==32&&ee!==13||this.togglePopup()},this._onMapClick=B=>{let Q=B.originalEvent.target,ee=this._element;this._popup&&(Q===ee||ee.contains(Q))&&this.togglePopup()},this._update=B=>{var Q;if(!this._map)return;let ee=this._map.loaded()&&!this._map.isMoving();((B==null?void 0:B.type)==="terrain"||(B==null?void 0:B.type)==="render"&&!ee)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?rs(this._lngLat,this._flatPos,this._map.transform):(Q=this._lngLat)===null||Q===void 0?void 0:Q.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let le="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?le=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(le=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ze="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ze="rotateX(0deg)":this._pitchAlignment==="map"&&(ze=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||B&&B.type!=="moveend"||(this._pos=this._pos.round()),c.setTransform(this._element,`${Ql[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ze} ${le}`),u.frameAsync(new AbortController).then(()=>{this._updateOpacity(B&&B.type==="moveend")}).catch(()=>{})},this._onMove=B=>{if(!this._isDragging){let Q=this._clickTolerance||this._map._clickTolerance;this._isDragging=B.point.dist(this._pointerdownPos)>=Q}this._isDragging&&(this._pos=B.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new a.k("dragstart"))),this.fire(new a.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new a.k("dragend")),this._state="inactive"},this._addDragHandler=B=>{this._element.contains(B.originalEvent.target)&&(B.preventDefault(),this._positionDelta=B.point.sub(this._pos).add(this._offset),this._pointerdownPos=B.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=w&&w.anchor||"center",this._color=w&&w.color||"#3FB1CE",this._scale=w&&w.scale||1,this._draggable=w&&w.draggable||!1,this._clickTolerance=w&&w.clickTolerance||0,this._subpixelPositioning=w&&w.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=w&&w.rotation||0,this._rotationAlignment=w&&w.rotationAlignment||"auto",this._pitchAlignment=w&&w.pitchAlignment&&w.pitchAlignment!=="auto"?w.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(w==null?void 0:w.opacity,w==null?void 0:w.opacityWhenCovered),w&&w.element)this._element=w.element,this._offset=a.P.convert(w&&w.offset||[0,0]);else{this._defaultMarker=!0,this._element=c.create("div");let B=c.createNS("http://www.w3.org/2000/svg","svg"),Q=41,ee=27;B.setAttributeNS(null,"display","block"),B.setAttributeNS(null,"height",`${Q}px`),B.setAttributeNS(null,"width",`${ee}px`),B.setAttributeNS(null,"viewBox",`0 0 ${ee} ${Q}`);let le=c.createNS("http://www.w3.org/2000/svg","g");le.setAttributeNS(null,"stroke","none"),le.setAttributeNS(null,"stroke-width","1"),le.setAttributeNS(null,"fill","none"),le.setAttributeNS(null,"fill-rule","evenodd");let ze=c.createNS("http://www.w3.org/2000/svg","g");ze.setAttributeNS(null,"fill-rule","nonzero");let Ze=c.createNS("http://www.w3.org/2000/svg","g");Ze.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Ze.setAttributeNS(null,"fill","#000000");let ut=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let qe of ut){let Qe=c.createNS("http://www.w3.org/2000/svg","ellipse");Qe.setAttributeNS(null,"opacity","0.04"),Qe.setAttributeNS(null,"cx","10.5"),Qe.setAttributeNS(null,"cy","5.80029008"),Qe.setAttributeNS(null,"rx",qe.rx),Qe.setAttributeNS(null,"ry",qe.ry),Ze.appendChild(Qe)}let Mt=c.createNS("http://www.w3.org/2000/svg","g");Mt.setAttributeNS(null,"fill",this._color);let Jt=c.createNS("http://www.w3.org/2000/svg","path");Jt.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"),Mt.appendChild(Jt);let $t=c.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"opacity","0.25"),$t.setAttributeNS(null,"fill","#000000");let mr=c.createNS("http://www.w3.org/2000/svg","path");mr.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"),$t.appendChild(mr);let Cr=c.createNS("http://www.w3.org/2000/svg","g");Cr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Cr.setAttributeNS(null,"fill","#FFFFFF");let ve=c.createNS("http://www.w3.org/2000/svg","g");ve.setAttributeNS(null,"transform","translate(8.0, 8.0)");let xe=c.createNS("http://www.w3.org/2000/svg","circle");xe.setAttributeNS(null,"fill","#000000"),xe.setAttributeNS(null,"opacity","0.25"),xe.setAttributeNS(null,"cx","5.5"),xe.setAttributeNS(null,"cy","5.5"),xe.setAttributeNS(null,"r","5.4999962");let Ie=c.createNS("http://www.w3.org/2000/svg","circle");Ie.setAttributeNS(null,"fill","#FFFFFF"),Ie.setAttributeNS(null,"cx","5.5"),Ie.setAttributeNS(null,"cy","5.5"),Ie.setAttributeNS(null,"r","5.4999962"),ve.appendChild(xe),ve.appendChild(Ie),ze.appendChild(Ze),ze.appendChild(Mt),ze.appendChild($t),ze.appendChild(Cr),ze.appendChild(ve),B.appendChild(ze),B.setAttributeNS(null,"height",Q*this._scale+"px"),B.setAttributeNS(null,"width",ee*this._scale+"px"),this._element.appendChild(B),this._offset=a.P.convert(w&&w.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",B=>{B.preventDefault()}),this._element.addEventListener("mousedown",B=>{B.preventDefault()}),Cu(this._element,this._anchor,"marker"),w&&w.className)for(let B of w.className.split(" "))this._element.classList.add(B);this._popup=null}addTo(w){return this.remove(),this._map=w,this._element.setAttribute("aria-label",w._getUIString("Marker.Title")),w.getCanvasContainer().appendChild(this._element),w.on("move",this._update),w.on("moveend",this._update),w.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),c.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(w){return this._lngLat=a.N.convert(w),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(w){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),w){if(!("offset"in w.options)){let ee=Math.abs(13.5)/Math.SQRT2;w.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ee,-1*(38.1-13.5+ee)],"bottom-right":[-ee,-1*(38.1-13.5+ee)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=w,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(w){return this._subpixelPositioning=w,this}getPopup(){return this._popup}togglePopup(){let w=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:w?(w.isOpen()?w.remove():(w.setLngLat(this._lngLat),w.addTo(this._map)),this):this}_updateOpacity(w=!1){var B,Q;if(!(!((B=this._map)===null||B===void 0)&&B.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(w)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let ee=this._map,le=ee.terrain.depthAtPoint(this._pos),ze=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,ze)-le<.006)return void(this._element.style.opacity=this._opacity);let Ze=-this._offset.y/ee.transform._pixelPerMeter,ut=Math.sin(ee.getPitch()*Math.PI/180)*Ze,Mt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Jt=ee.transform.lngLatToCameraDepth(this._lngLat,ze+ut)-Mt>.006;!((Q=this._popup)===null||Q===void 0)&&Q.isOpen()&&Jt&&this._popup.remove(),this._element.style.opacity=Jt?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(w){return this._offset=a.P.convert(w),this._update(),this}addClassName(w){this._element.classList.add(w)}removeClassName(w){this._element.classList.remove(w)}toggleClassName(w){return this._element.classList.toggle(w)}setDraggable(w){return this._draggable=!!w,this._map&&(w?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(w){return this._rotation=w||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(w){return this._rotationAlignment=w||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(w){return this._pitchAlignment=w&&w!=="auto"?w:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(w,B){return w===void 0&&B===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),w!==void 0&&(this._opacity=w),B!==void 0&&(this._opacityWhenCovered=B),this._map&&this._updateOpacity(!0),this}}let Nc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},pu=0,Uc=!1,xu={maxWidth:100,unit:"metric"};function Ac(ue,w,B){let Q=B&&B.maxWidth||100,ee=ue._container.clientHeight/2,le=ue.unproject([0,ee]),ze=ue.unproject([Q,ee]),Ze=le.distanceTo(ze);if(B&&B.unit==="imperial"){let ut=3.2808*Ze;ut>5280?Ua(w,Q,ut/5280,ue._getUIString("ScaleControl.Miles")):Ua(w,Q,ut,ue._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?Ua(w,Q,Ze/1852,ue._getUIString("ScaleControl.NauticalMiles")):Ze>=1e3?Ua(w,Q,Ze/1e3,ue._getUIString("ScaleControl.Kilometers")):Ua(w,Q,Ze,ue._getUIString("ScaleControl.Meters"))}function Ua(ue,w,B,Q){let ee=function(le){let ze=Math.pow(10,`${Math.floor(le)}`.length-1),Ze=le/ze;return Ze=Ze>=10?10:Ze>=5?5:Ze>=3?3:Ze>=2?2:Ze>=1?1:function(ut){let Mt=Math.pow(10,Math.ceil(-Math.log(ut)/Math.LN10));return Math.round(ut*Mt)/Mt}(Ze),ze*Ze}(B);ue.style.width=w*(ee/B)+"px",ue.innerHTML=`${ee} ${Q}`}let oo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Vc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function hc(ue){if(ue){if(typeof ue=="number"){let w=Math.round(Math.abs(ue)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,ue),"top-left":new a.P(w,w),"top-right":new a.P(-w,w),bottom:new a.P(0,-ue),"bottom-left":new a.P(w,-w),"bottom-right":new a.P(-w,-w),left:new a.P(ue,0),right:new a.P(-ue,0)}}if(ue instanceof a.P||Array.isArray(ue)){let w=a.P.convert(ue);return{center:w,top:w,"top-left":w,"top-right":w,bottom:w,"bottom-left":w,"bottom-right":w,left:w,right:w}}return{center:a.P.convert(ue.center||[0,0]),top:a.P.convert(ue.top||[0,0]),"top-left":a.P.convert(ue["top-left"]||[0,0]),"top-right":a.P.convert(ue["top-right"]||[0,0]),bottom:a.P.convert(ue.bottom||[0,0]),"bottom-left":a.P.convert(ue["bottom-left"]||[0,0]),"bottom-right":a.P.convert(ue["bottom-right"]||[0,0]),left:a.P.convert(ue.left||[0,0]),right:a.P.convert(ue.right||[0,0])}}return hc(new a.P(0,0))}let Ku=o;i.AJAXError=a.bh,i.Evented=a.E,i.LngLat=a.N,i.MercatorCoordinate=a.Z,i.Point=a.P,i.addProtocol=a.bi,i.config=a.a,i.removeProtocol=a.bj,i.AttributionControl=Na,i.BoxZoomHandler=ku,i.CanvasSource=nr,i.CooperativeGesturesHandler=$i,i.DoubleClickZoomHandler=Mi,i.DragPanHandler=wn,i.DragRotateHandler=On,i.EdgeInsets=hu,i.FullscreenControl=class extends a.E{constructor(ue={}){super(),this._onFullscreenChange=()=>{var w;let B=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((w=B==null?void 0:B.shadowRoot)===null||w===void 0)&&w.fullscreenElement;)B=B.shadowRoot.fullscreenElement;B===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,ue&&ue.container&&(ue.container instanceof HTMLElement?this._container=ue.container:a.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(ue){return this._map=ue,this._container||(this._container=this._map.getContainer()),this._controlContainer=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){c.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let ue=this._fullscreenButton=c.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);c.create("span","maplibregl-ctrl-icon",ue).setAttribute("aria-hidden","true"),ue.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let ue=this._getTitle();this._fullscreenButton.setAttribute("aria-label",ue),this._fullscreenButton.title=ue}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new a.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},i.GeoJSONSource=st,i.GeolocateControl=class extends a.E{constructor(ue){super(),this._onSuccess=w=>{if(this._map){if(this._isOutOfMapMaxBounds(w))return this._setErrorState(),this.fire(new a.k("outofmaxbounds",w)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=w,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(w),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(w),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new a.k("geolocate",w)),this._finish()}},this._updateCamera=w=>{let B=new a.N(w.coords.longitude,w.coords.latitude),Q=w.coords.accuracy,ee=this._map.getBearing(),le=a.e({bearing:ee},this.options.fitBoundsOptions),ze=ce.fromLngLat(B,Q);this._map.fitBounds(ze,le,{geolocateSource:!0})},this._updateMarker=w=>{if(w){let B=new a.N(w.coords.longitude,w.coords.latitude);this._accuracyCircleMarker.setLngLat(B).addTo(this._map),this._userLocationDotMarker.setLngLat(B).addTo(this._map),this._accuracy=w.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=w=>{if(this._map){if(this.options.trackUserLocation)if(w.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let B=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(w.code===3&&Uc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new a.k("error",w)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",w=>w.preventDefault()),this._geolocateButton=c.create("button","maplibregl-ctrl-geolocate",this._container),c.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=w=>{if(this._map){if(w===!1){a.w("Geolocation support is not available so the GeolocateControl will be disabled.");let B=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B)}else{let B=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=c.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Yu({element:this._dotElement}),this._circleElement=c.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Yu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",B=>{B.geolocateSource||this._watchState!=="ACTIVE_LOCK"||B.originalEvent&&B.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new a.k("trackuserlocationend")),this.fire(new a.k("userlocationlostfocus")))})}},this.options=a.e({},Nc,ue)}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(ys!==void 0&&!w)return ys;if(window.navigator.permissions===void 0)return ys=!!window.navigator.geolocation,ys;try{ys=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(B){ys=!!window.navigator.geolocation}return ys})}().then(w=>this._finishSetupUI(w)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),c.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,pu=0,Uc=!1}_isOutOfMapMaxBounds(ue){let w=this._map.getMaxBounds(),B=ue.coords;return w&&(B.longitude<w.getWest()||B.longitude>w.getEast()||B.latitude<w.getSouth()||B.latitude>w.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let ue=this._map.getBounds(),w=ue.getSouthEast(),B=ue.getNorthEast(),Q=w.distanceTo(B),ee=Math.ceil(this._accuracy/(Q/this._map._container.clientHeight)*2);this._circleElement.style.width=`${ee}px`,this._circleElement.style.height=`${ee}px`}trigger(){if(!this._setup)return a.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new a.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":pu--,Uc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new a.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.k("trackuserlocationstart")),this.fire(new a.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let ue;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),pu++,pu>1?(ue={maximumAge:6e5,timeout:0},Uc=!0):(ue=this.options.positionOptions,Uc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ue)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},i.Hash=Mh,i.ImageSource=Qt,i.KeyboardHandler=Zt,i.LngLatBounds=ce,i.LogoControl=Zn,i.Map=class extends Ra{constructor(ue){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Ws),ue);if(w.minZoom!=null&&w.maxZoom!=null&&w.minZoom>w.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(w.minPitch!=null&&w.maxPitch!=null&&w.minPitch>w.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(w.minPitch!=null&&w.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(w.maxPitch!=null&&w.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new nl(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Dn,this._controls=[],this._mapId=a.a4(),this._contextLost=B=>{B.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.k("webglcontextlost",{originalEvent:B}))},this._contextRestored=B=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.k("webglcontextrestored",{originalEvent:B}))},this._onMapScroll=B=>{if(B.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=w.interactive,this._maxTileCacheSize=w.maxTileCacheSize,this._maxTileCacheZoomLevels=w.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=w.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=w.preserveDrawingBuffer===!0,this._antialias=w.antialias===!0,this._trackResize=w.trackResize===!0,this._bearingSnap=w.bearingSnap,this._refreshExpiredTiles=w.refreshExpiredTiles===!0,this._fadeDuration=w.fadeDuration,this._crossSourceCollisions=w.crossSourceCollisions===!0,this._collectResourceTiming=w.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Ho),w.locale),this._clickTolerance=w.clickTolerance,this._overridePixelRatio=w.pixelRatio,this._maxCanvasSize=w.maxCanvasSize,this.transformCameraUpdate=w.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=w.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=p.addThrottleControl(()=>this.isMoving()),this._requestManager=new k(w.transformRequest),typeof w.container=="string"){if(this._container=document.getElementById(w.container),!this._container)throw new Error(`Container '${w.container}' not found.`)}else{if(!(w.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=w.container}if(w.maxBounds&&this.setMaxBounds(w.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window!="undefined"){addEventListener("online",this._onWindowOnline,!1);let B=!1,Q=nh(ee=>{this._trackResize&&!this._removed&&(this.resize(ee),this.redraw())},50);this._resizeObserver=new ResizeObserver(ee=>{B?Q(ee):B=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Ca(this,w),this._hash=w.hash&&new Mh(typeof w.hash=="string"&&w.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:w.center,zoom:w.zoom,bearing:w.bearing,pitch:w.pitch}),w.bounds&&(this.resize(),this.fitBounds(w.bounds,a.e({},w.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=w.localIdeographFontFamily,this._validateStyle=w.validateStyle,w.style&&this.setStyle(w.style,{localIdeographFontFamily:w.localIdeographFontFamily}),w.attributionControl&&this.addControl(new Na(typeof w.attributionControl=="boolean"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Zn,w.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",B=>{this._update(B.dataType==="style"),this.fire(new a.k(`${B.dataType}data`,B))}),this.on("dataloading",B=>{this.fire(new a.k(`${B.dataType}dataloading`,B))}),this.on("dataabort",B=>{this.fire(new a.k("sourcedataabort",B))})}_getMapId(){return this._mapId}addControl(ue,w){if(w===void 0&&(w=ue.getDefaultPosition?ue.getDefaultPosition():"top-right"),!ue||!ue.onAdd)return this.fire(new a.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let B=ue.onAdd(this);this._controls.push(ue);let Q=this._controlPositions[w];return w.indexOf("bottom")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(ue){if(!ue||!ue.onRemove)return this.fire(new a.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let w=this._controls.indexOf(ue);return w>-1&&this._controls.splice(w,1),ue.onRemove(this),this}hasControl(ue){return this._controls.indexOf(ue)>-1}calculateCameraOptionsFromTo(ue,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(ue,w,B,Q)}resize(ue){var w;let B=this._containerDimensions(),Q=B[0],ee=B[1],le=this._getClampedPixelRatio(Q,ee);if(this._resizeCanvas(Q,ee,le),this.painter.resize(Q,ee,le),this.painter.overLimit()){let Ze=this.painter.context.gl;this._maxCanvasSize=[Ze.drawingBufferWidth,Ze.drawingBufferHeight];let ut=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,ut),this.painter.resize(Q,ee,ut)}this.transform.resize(Q,ee),(w=this._requestedCameraState)===null||w===void 0||w.resize(Q,ee);let ze=!this._moving;return ze&&(this.stop(),this.fire(new a.k("movestart",ue)).fire(new a.k("move",ue))),this.fire(new a.k("resize",ue)),ze&&this.fire(new a.k("moveend",ue)),this}_getClampedPixelRatio(ue,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),le=ue*ee,ze=w*ee;return Math.min(le>B?B/le:1,ze>Q?Q/ze:1)*ee}getPixelRatio(){var ue;return(ue=this._overridePixelRatio)!==null&&ue!==void 0?ue:devicePixelRatio}setPixelRatio(ue){this._overridePixelRatio=ue,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(ue){return this.transform.setMaxBounds(ce.convert(ue)),this._update()}setMinZoom(ue){if((ue=ue==null?-2:ue)>=-2&&ue<=this.transform.maxZoom)return this.transform.minZoom=ue,this._update(),this.getZoom()<ue&&this.setZoom(ue),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(ue){if((ue=ue==null?22:ue)>=this.transform.minZoom)return this.transform.maxZoom=ue,this._update(),this.getZoom()>ue&&this.setZoom(ue),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(ue){if((ue=ue==null?0:ue)<0)throw new Error("minPitch must be greater than or equal to 0");if(ue>=0&&ue<=this.transform.maxPitch)return this.transform.minPitch=ue,this._update(),this.getPitch()<ue&&this.setPitch(ue),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(ue){if((ue=ue==null?60:ue)>85)throw new Error("maxPitch must be less than or equal to 85");if(ue>=this.transform.minPitch)return this.transform.maxPitch=ue,this._update(),this.getPitch()>ue&&this.setPitch(ue),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(ue){return this.transform.renderWorldCopies=ue,this._update()}project(ue){return this.transform.locationPoint(a.N.convert(ue),this.style&&this.terrain)}unproject(ue){return this.transform.pointLocation(a.P.convert(ue),this.terrain)}isMoving(){var ue;return this._moving||((ue=this.handlers)===null||ue===void 0?void 0:ue.isMoving())}isZooming(){var ue;return this._zooming||((ue=this.handlers)===null||ue===void 0?void 0:ue.isZooming())}isRotating(){var ue;return this._rotating||((ue=this.handlers)===null||ue===void 0?void 0:ue.isRotating())}_createDelegatedListener(ue,w,B){if(ue==="mouseenter"||ue==="mouseover"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:le=>{let ze=w.filter(ut=>this.getLayer(ut)),Ze=ze.length!==0?this.queryRenderedFeatures(le.point,{layers:ze}):[];Ze.length?Q||(Q=!0,B.call(this,new jl(ue,this,le.originalEvent,{features:Ze}))):Q=!1},mouseout:()=>{Q=!1}}}}if(ue==="mouseleave"||ue==="mouseout"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:ze=>{let Ze=w.filter(ut=>this.getLayer(ut));(Ze.length!==0?this.queryRenderedFeatures(ze.point,{layers:Ze}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new jl(ue,this,ze.originalEvent)))},mouseout:ze=>{Q&&(Q=!1,B.call(this,new jl(ue,this,ze.originalEvent)))}}}}{let Q=ee=>{let le=w.filter(Ze=>this.getLayer(Ze)),ze=le.length!==0?this.queryRenderedFeatures(ee.point,{layers:le}):[];ze.length&&(ee.features=ze,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[ue]:Q}}}}_saveDelegatedListener(ue,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ue]=this._delegatedListeners[ue]||[],this._delegatedListeners[ue].push(w)}_removeDelegatedListener(ue,w,B){if(!this._delegatedListeners||!this._delegatedListeners[ue])return;let Q=this._delegatedListeners[ue];for(let ee=0;ee<Q.length;ee++){let le=Q[ee];if(le.listener===B&&le.layers.length===w.length&&le.layers.every(ze=>w.includes(ze))){for(let ze in le.delegates)this.off(ze,le.delegates[ze]);return void Q.splice(ee,1)}}}on(ue,w,B){if(B===void 0)return super.on(ue,w);let Q=this._createDelegatedListener(ue,typeof w=="string"?[w]:w,B);this._saveDelegatedListener(ue,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(ue,w,B){if(B===void 0)return super.once(ue,w);let Q=typeof w=="string"?[w]:w,ee=this._createDelegatedListener(ue,Q,B);for(let le in ee.delegates){let ze=ee.delegates[le];ee.delegates[le]=(...Ze)=>{this._removeDelegatedListener(ue,Q,B),ze(...Ze)}}this._saveDelegatedListener(ue,ee);for(let le in ee.delegates)this.once(le,ee.delegates[le]);return this}off(ue,w,B){return B===void 0?super.off(ue,w):(this._removeDelegatedListener(ue,typeof w=="string"?[w]:w,B),this)}queryRenderedFeatures(ue,w){if(!this.style)return[];let B,Q=ue instanceof a.P||Array.isArray(ue),ee=Q?ue:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:ue)||{},ee instanceof a.P||typeof ee[0]=="number")B=[a.P.convert(ee)];else{let le=a.P.convert(ee[0]),ze=a.P.convert(ee[1]);B=[le,new a.P(ze.x,le.y),ze,new a.P(le.x,ze.y),le]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(ue,w){return this.style.querySourceFeatures(ue,w)}setStyle(ue,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ue?(this._diffStyle(ue,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(ue,w))}setTransformRequest(ue){return this._requestManager.setTransformRequest(ue),this}_getUIString(ue){let w=this._locale[ue];if(w==null)throw new Error(`Missing UI string '${ue}'`);return w}_updateStyle(ue,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(ue,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!ue)),ue?(this.style=new Ha(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof ue=="string"?this.style.loadURL(ue,w,B):this.style.loadJSON(ue,w,B),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ha(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(ue,w){if(typeof ue=="string"){let B=this._requestManager.transformRequest(ue,"Style");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof ue=="object"&&this._updateDiff(ue,w)}_updateDiff(ue,w){try{this.style.setState(ue,w)&&this._update(!0)}catch(B){a.w(`Unable to perform style diff: ${B.message||B.error||B}. Rebuilding the style from scratch.`),this._updateStyle(ue,w)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w("There is no style added to the map.")}addSource(ue,w){return this._lazyInitEmptyStyle(),this.style.addSource(ue,w),this._update(!0)}isSourceLoaded(ue){let w=this.style&&this.style.sourceCaches[ue];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${ue}'`)))}setTerrain(ue){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),ue){let w=this.style.sourceCaches[ue.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${ue.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type==="hillshade"&&Q.source===ue.source&&a.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Zo(this.painter,w,ue),this.painter.renderToTexture=new ws(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=B=>{B.dataType==="style"?this.terrain.sourceCache.freeRtt():B.dataType==="source"&&B.tile&&(B.sourceId!==ue.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(B.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new a.k("terrain",{terrain:ue})),this}getTerrain(){var ue,w;return(w=(ue=this.terrain)===null||ue===void 0?void 0:ue.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let ue=this.style&&this.style.sourceCaches;for(let w in ue){let B=ue[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!=="loaded"&&ee.state!=="errored")return!1}}return!0}removeSource(ue){return this.style.removeSource(ue),this._update(!0)}getSource(ue){return this.style.getSource(ue)}addImage(ue,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:le,stretchY:ze,content:Ze,textFitWidth:ut,textFitHeight:Mt}=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:Jt,height:$t,data:mr}=w,Cr=w;return this.style.addImage(ue,{data:new a.R({width:Jt,height:$t},new Uint8Array(mr)),pixelRatio:Q,stretchX:le,stretchY:ze,content:Ze,textFitWidth:ut,textFitHeight:Mt,sdf:ee,version:0,userImage:Cr}),Cr.onAdd&&Cr.onAdd(this,ue),this}}{let{width:Jt,height:$t,data:mr}=u.getImageData(w);this.style.addImage(ue,{data:new a.R({width:Jt,height:$t},mr),pixelRatio:Q,stretchX:le,stretchY:ze,content:Ze,textFitWidth:ut,textFitHeight:Mt,sdf:ee,version:0})}}updateImage(ue,w){let B=this.style.getImage(ue);if(!B)return this.fire(new a.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Q=w instanceof HTMLImageElement||a.b(w)?u.getImageData(w):w,{width:ee,height:le,data:ze}=Q;if(ee===void 0||le===void 0)return this.fire(new a.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(ee!==B.data.width||le!==B.data.height)return this.fire(new a.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Ze=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(ze,Ze),this.style.updateImage(ue,B),this}getImage(ue){return this.style.getImage(ue)}hasImage(ue){return ue?!!this.style.getImage(ue):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(ue){this.style.removeImage(ue)}loadImage(ue){return p.getImage(this._requestManager.transformRequest(ue,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(ue,w){return this._lazyInitEmptyStyle(),this.style.addLayer(ue,w),this._update(!0)}moveLayer(ue,w){return this.style.moveLayer(ue,w),this._update(!0)}removeLayer(ue){return this.style.removeLayer(ue),this._update(!0)}getLayer(ue){return this.style.getLayer(ue)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(ue,w,B){return this.style.setLayerZoomRange(ue,w,B),this._update(!0)}setFilter(ue,w,B={}){return this.style.setFilter(ue,w,B),this._update(!0)}getFilter(ue){return this.style.getFilter(ue)}setPaintProperty(ue,w,B,Q={}){return this.style.setPaintProperty(ue,w,B,Q),this._update(!0)}getPaintProperty(ue,w){return this.style.getPaintProperty(ue,w)}setLayoutProperty(ue,w,B,Q={}){return this.style.setLayoutProperty(ue,w,B,Q),this._update(!0)}getLayoutProperty(ue,w){return this.style.getLayoutProperty(ue,w)}setGlyphs(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(ue,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(ue,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(ue,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(ue){return this._lazyInitEmptyStyle(),this.style.removeSprite(ue),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(ue,w,B=>{B||this._update(!0)}),this}setLight(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(ue,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(ue){return this._lazyInitEmptyStyle(),this.style.setSky(ue),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(ue,w){return this.style.setFeatureState(ue,w),this._update()}removeFeatureState(ue,w){return this.style.removeFeatureState(ue,w),this._update()}getFeatureState(ue){return this.style.getFeatureState(ue)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let ue=0,w=0;return this._container&&(ue=this._container.clientWidth||400,w=this._container.clientHeight||300),[ue,w]}_setupContainer(){let ue=this._container;ue.classList.add("maplibregl-map");let w=this._canvasContainer=c.create("div","maplibregl-canvas-container",ue);this._interactive&&w.classList.add("maplibregl-interactive"),this._canvas=c.create("canvas","maplibregl-canvas",w),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let B=this._containerDimensions(),Q=this._getClampedPixelRatio(B[0],B[1]);this._resizeCanvas(B[0],B[1],Q);let ee=this._controlContainer=c.create("div","maplibregl-control-container",ue),le=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ze=>{le[ze]=c.create("div",`maplibregl-ctrl-${ze} `,ee)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(ue,w,B){this._canvas.width=Math.floor(B*ue),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${ue}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let ue={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},w=null;this._canvas.addEventListener("webglcontextcreationerror",Q=>{w={requestedAttributes:ue},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext("webgl2",ue)||this._canvas.getContext("webgl",ue);if(!B){let Q="Failed to initialize WebGL";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Dc(B,this.transform),f.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(ue){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||ue,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(ue){return this._update(),this._renderTaskQueue.add(ue)}_cancelRenderFrame(ue){this._renderTaskQueue.remove(ue)}_render(ue){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ue),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,le=u.now();this.style.zoomHistory.update(ee,le);let ze=new a.z(ee,{now:le,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Ze=ze.crossFadingFactor();Ze===1&&Ze===this._crossFadingFactor||(B=!0,this._crossFadingFactor=Ze),this.style.update(ze)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,w,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:w,showPadding:this.showPadding}),this.fire(new a.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.bf.mark(a.bg.load),this.fire(new a.k("load"))),this.style&&(this.style.hasTransitions()||B)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Q=this._sourcesDirty||this._styleDirty||this._placementDirty;return Q||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.k("idle")),!this._loaded||this._fullyLoaded||Q||(this._fullyLoaded=!0,a.bf.mark(a.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var ue;this._hash&&this._hash.remove();for(let B of this._controls)B.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!="undefined"&&removeEventListener("online",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),(ue=this._resizeObserver)===null||ue===void 0||ue.disconnect();let w=this.painter.context.gl.getExtension("WEBGL_lose_context");w!=null&&w.loseContext&&w.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),c.remove(this._canvasContainer),c.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),a.bf.clearMetrics(),this._removed=!0,this.fire(new a.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(ue=>{a.bf.frame(ue),this._frameRequest=null,this._render(ue)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(ue){this._showTileBoundaries!==ue&&(this._showTileBoundaries=ue,this._update())}get showPadding(){return!!this._showPadding}set showPadding(ue){this._showPadding!==ue&&(this._showPadding=ue,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(ue){this._showCollisionBoxes!==ue&&(this._showCollisionBoxes=ue,ue?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(ue){this._showOverdrawInspector!==ue&&(this._showOverdrawInspector=ue,this._update())}get repaint(){return!!this._repaint}set repaint(ue){this._repaint!==ue&&(this._repaint=ue,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(ue){this._vertices=ue,this._update()}get version(){return ml}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=jl,i.MapTouchEvent=lf,i.MapWheelEvent=Xh,i.Marker=Yu,i.NavigationControl=class{constructor(ue){this._updateZoomButtons=()=>{let w=this._map.getZoom(),B=w===this._map.getMaxZoom(),Q=w===this._map.getMinZoom();this._zoomInButton.disabled=B,this._zoomOutButton.disabled=Q,this._zoomInButton.setAttribute("aria-disabled",B.toString()),this._zoomOutButton.setAttribute("aria-disabled",Q.toString())},this._rotateCompassArrow=()=>{let w=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=w},this._setButtonTitle=(w,B)=>{let Q=this._map._getUIString(`NavigationControl.${B}`);w.title=Q,w.setAttribute("aria-label",Q)},this.options=a.e({},va,ue),this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",w=>w.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",w=>this._map.zoomIn({},{originalEvent:w})),c.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",w=>this._map.zoomOut({},{originalEvent:w})),c.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",w=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:w}):this._map.resetNorth({},{originalEvent:w})}),this._compassIcon=c.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(ue){return this._map=ue,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new no(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){c.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(ue,w){let B=c.create("button",ue,this._container);return B.type="button",B.addEventListener("click",w),B}},i.Popup=class extends a.E{constructor(ue){super(),this.remove=()=>(this._content&&c.remove(this._content),this._container&&(c.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new a.k("close"))),this),this._onMouseUp=w=>{this._update(w.point)},this._onMouseMove=w=>{this._update(w.point)},this._onDrag=w=>{this._update(w.point)},this._update=w=>{var B;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=c.create("div","maplibregl-popup",this._map.getContainer()),this._tip=c.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Ze of this.options.className.split(" "))this._container.classList.add(Ze);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?rs(this._lngLat,this._flatPos,this._map.transform):(B=this._lngLat)===null||B===void 0?void 0:B.wrap(),this._trackPointer&&!w)return;let Q=this._flatPos=this._pos=this._trackPointer&&w?w:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&w?w:this._map.transform.locationPoint(this._lngLat));let ee=this.options.anchor,le=hc(this.options.offset);if(!ee){let Ze=this._container.offsetWidth,ut=this._container.offsetHeight,Mt;Mt=Q.y+le.bottom.y<ut?["top"]:Q.y>this._map.transform.height-ut?["bottom"]:[],Q.x<Ze/2?Mt.push("left"):Q.x>this._map.transform.width-Ze/2&&Mt.push("right"),ee=Mt.length===0?"bottom":Mt.join("-")}let ze=Q.add(le[ee]);this.options.subpixelPositioning||(ze=ze.round()),c.setTransform(this._container,`${Ql[ee]} translate(${ze.x}px,${ze.y}px)`),Cu(this._container,ee,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(oo),ue)}addTo(ue){return this._map&&this.remove(),this._map=ue,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new a.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(ue){return this._lngLat=a.N.convert(ue),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(ue){return this.setDOMContent(document.createTextNode(ue))}setHTML(ue){let w=document.createDocumentFragment(),B=document.createElement("body"),Q;for(B.innerHTML=ue;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var ue;return(ue=this._container)===null||ue===void 0?void 0:ue.style.maxWidth}setMaxWidth(ue){return this.options.maxWidth=ue,this._update(),this}setDOMContent(ue){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=c.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(ue),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(ue){return this._container&&this._container.classList.add(ue),this}removeClassName(ue){return this._container&&this._container.classList.remove(ue),this}setOffset(ue){return this.options.offset=ue,this._update(),this}toggleClassName(ue){if(this._container)return this._container.classList.toggle(ue)}setSubpixelPositioning(ue){this.options.subpixelPositioning=ue}_createCloseButton(){this.options.closeButton&&(this._closeButton=c.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let ue=this._container.querySelector(Vc);ue&&ue.focus()}},i.RasterDEMTileSource=Vt,i.RasterTileSource=mt,i.ScaleControl=class{constructor(ue){this._onMove=()=>{Ac(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,Ac(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},xu),ue)}getDefaultPosition(){return"bottom-left"}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-scale",ue.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){c.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},i.ScrollZoomHandler=Kr,i.Style=Ha,i.TerrainControl=class{constructor(ue){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=ue}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=c.create("button","maplibregl-ctrl-terrain",this._container),c.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){c.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},i.TwoFingersTouchPitchHandler=Bc,i.TwoFingersTouchRotateHandler=cf,i.TwoFingersTouchZoomHandler=vu,i.TwoFingersTouchZoomRotateHandler=Yi,i.VectorTileSource=lt,i.VideoSource=Ht,i.addSourceType=(ue,w)=>a._(void 0,void 0,void 0,function*(){if(je(ue))throw new Error(`A source type called "${ue}" already exists.`);((B,Q)=>{tt[B]=Q})(ue,w)}),i.clearPrewarmedResources=function(){let ue=ge;ue&&(ue.isPreloaded()&&ue.numActive()===1?(ue.release(_e),ge=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},i.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},i.getRTLTextPluginStatus=function(){return St().getRTLTextPluginStatus()},i.getVersion=function(){return Ku},i.getWorkerCount=function(){return ke.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(ue){return we().broadcast("IS",ue)},i.prewarm=function(){Se().acquire(_e)},i.setMaxParallelImageRequests=function(ue){a.a.MAX_PARALLEL_IMAGE_REQUESTS=ue},i.setRTLTextPlugin=function(ue,w){return St().setRTLTextPlugin(ue,w)},i.setWorkerCount=function(ue){ke.workerCount=ue},i.setWorkerUrl=function(ue){a.a.WORKER_URL=ue}});var n=e;return n})});var xje=ye((Xbr,_je)=>{"use strict";var pw=Pr(),VXt=Zl().sanitizeHTML,GXt=IJ(),gje=Px();function mje(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=gje.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var sg=mje.prototype;sg.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=v7(t)};sg.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};sg.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};sg.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};sg.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};sg.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};sg.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!v7(e)){var r=HXt(e);t.addSource(this.idSource,r)}};sg.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r<t.length;r++){var n=t[r].id;if(typeof n=="string"&&n.indexOf(gje.traceLayerPrefix)===0){e=n;break}}return e};sg.updateLayer=function(e){var t=this.subplot,r=yje(e),n=this.lookupBelow(),i=this.findFollowingMapLayerId(n);this.removeLayer(),v7(e)&&t.addLayer({id:this.idLayer,source:this.idSource,"source-layer":e.sourcelayer||"",type:e.type,minzoom:e.minzoom,maxzoom:e.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=e.type,this.below=n};sg.updateStyle=function(e){if(v7(e)){var t=yje(e);this.subplot.setOptions(this.idLayer,"setLayoutProperty",t.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",t.paint)}};sg.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)};sg.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)};function v7(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var r=0;r<t.length;r++)if(typeof t[r]!="string"||t[r].length===0)return!1;return!0}return pw.isPlainObject(t)||typeof t=="string"&&t.length>0}function yje(e){var t={},r={};switch(e.type){case"circle":pw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":pw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":pw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=GXt(n.textposition,n.iconsize);pw.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}),pw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":pw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function HXt(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=VXt(e.sourceattribution)),n}_je.exports=function(t,r,n){var i=new mje(t,r);return i.update(n),i}});var kje=ye((Zbr,Eje)=>{"use strict";var OJ=pje(),BJ=Pr(),Tje=hx(),bje=Oa(),jXt=ho(),WXt=yv(),p7=vf(),Aje=Cg(),XXt=Aje.drawMode,ZXt=Aje.selectMode,YXt=qf().prepSelect,KXt=qf().clearOutline,JXt=qf().clearSelectionsCache,$Xt=qf().selectOnClick,gw=Px(),QXt=xje();function Sje(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Hh=Sje.prototype;Hh.plot=function(e,t,r){var n=this,i;n.map?i=new Promise(function(a,o){n.updateMap(e,t,a,o)}):i=new Promise(function(a,o){n.createMap(e,t,a,o)}),r.push(i)};Hh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=Mje(a.style),s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new OJ.Map({container:i.div,style:o.style,center:NJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new OJ.AttributionControl({compact:!0})),c={};u.on("styleimagemissing",function(h){var d=h.id;if(!c[d]&&d.includes("-15")){c[d]=!0;var v=new Image(15,15);v.onload=function(){u.addImage(d,v)},v.crossOrigin="Anonymous",v.src="https://unpkg.com/maki@2.1.0/icons/"+d+".svg"}}),u.setTransformRequest(function(h){return h=h.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),h=h.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),h=h.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:h}}),u._canvas.style.left="0px",u._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var f=[];f.push(new Promise(function(h){u.once("load",h)})),f=f.concat(Tje.fetchTraceGeoData(e)),Promise.all(f).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Hh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=Mje(o.style);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(Tje.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Hh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i<e.length;i++){var l=e[i][0].trace,u=l._module;typeof l.below=="string"?a=l.below:u.getBelow&&(a=u.getBelow(l,this)),a===""&&(s=!0),o["trace-"+l.uid]=a||""}for(i=0;i<n.length;i++){var c=n[i];typeof c.below=="string"?a=c.below:s?a="traces":a="",o["layout-"+i]=a}var f={},h,d;for(h in o)a=o[h],f[a]?f[a].push(h):f[a]=[h];for(a in f){var v=f[a];if(v.length>1)for(i=0;i<v.length;i++)h=v[i],h.indexOf("trace-")===0?(d=h.split("trace-")[1],this.traceHash[d]&&(this.traceHash[d].below=null)):h.indexOf("layout-")===0&&(d=h.split("layout-")[1],this.layerList[d]&&(this.layerList[d].below=null))}};var wje={choroplethmap:0,densitymap:1,scattermap:2};Hh.updateData=function(e){var t=this.traceHash,r,n,i,a,o=e.slice().sort(function(f,h){return wje[f[0].trace.type]-wje[h[0].trace.type]});for(i=0;i<o.length;i++){var s=o[i];n=s[0].trace,r=t[n.uid];var l=!1;r&&(r.type===n.type?(r.update(s),l=!0):r.dispose()),!l&&n._module&&(t[n.uid]=n._module.plot(this,s))}var u=Object.keys(t);e:for(i=0;i<u.length;i++){var c=u[i];for(a=0;a<e.length;a++)if(n=e[a][0].trace,c===n.uid)continue e;r=t[c],r.dispose(),delete t[c]}};Hh.updateLayout=function(e){var t=this.map,r=e[this.id];!this.dragging&&!this.wheeling&&(t.setCenter(NJ(r.center)),t.setZoom(r.zoom),t.setBearing(r.bearing),t.setPitch(r.pitch)),this.updateLayers(e),this.updateFramework(e),this.updateFx(e),this.map.resize(),this.gd._context._scrollZoom.map?t.scrollZoom.enable():t.scrollZoom.disable()};Hh.resolveOnRender=function(e){var t=this.map;t.on("render",function r(){t.loaded()&&(t.off("render",r),setTimeout(e,10))})};Hh.rejectOnError=function(e){var t=this.map;function r(){e(new Error(gw.mapOnErrorMsg))}t.once("error",r),t.once("style.error",r),t.once("source.error",r),t.once("tile.error",r),t.once("layer.error",r)};Hh.createFramework=function(e){var t=this,r=t.div=document.createElement("div");r.id=t.uid,r.style.position="absolute",t.container.appendChild(r),t.xaxis={_id:"x",c2p:function(n){return t.project(n).x}},t.yaxis={_id:"y",c2p:function(n){return t.project(n).y}},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},jXt.setConvert(t.mockAxis,e)};Hh.initFx=function(e,t){var r=this,n=r.gd,i=r.map;i.on("moveend",function(s){if(r.map){var l=n._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];bje.call("_storeDirectGUIEdit",n.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type==="mouseup"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l&&l._rehover&&l._rehover()}}),i.on("wheel",function(){r.wheeling=!0}),i.on("mousemove",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return i.unproject(u).lng},r.yaxis.p2c=function(){return i.unproject(u).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&p7.hover(n,s,r.id)},p7.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function a(){p7.loneUnhover(t._hoverlayer)}i.on("dragstart",function(){r.dragging=!0,a()}),i.on("zoomstart",a),i.on("mouseout",function(){n._fullLayout._hoversubplot=null});function o(){var s=r.getView();n.emit("plotly_relayouting",r.getViewEditsWithDerived(s))}i.on("drag",o),i.on("zoom",o),i.on("dblclick",function(){var s=n._fullLayout[r.id];bje.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;i.setCenter(NJ(l.center)),i.setZoom(l.zoom),i.setBearing(l.bearing),i.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){JXt(r.dragOptions),KXt(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=n._fullLayout.clickmode;u.indexOf("select")>-1&&$Xt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&p7.click(n,l.originalEvent)}}};Hh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=BJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),ZXt(a)||XXt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){YXt(l,u,c,t.dragOptions,a)},WXt.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};Hh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Hh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i<n.length;i++)n[i].dispose();for(n=this.layerList=[],i=0;i<r.length;i++)n.push(QXt(this,i,r[i]))}else for(i=0;i<r.length;i++)n[i].update(r[i])};Hh.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))};Hh.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()};Hh.setOptions=function(e,t,r){for(var n in r)this.map[t](e,n,r[n])};Hh.getMapLayers=function(){return this.map.getStyle().layers};Hh.addLayer=function(e,t){var r=this.map;if(typeof t=="string"){if(t===""){r.addLayer(e,t);return}for(var n=this.getMapLayers(),i=0;i<n.length;i++)if(t===n[i].id){r.addLayer(e,t);return}BJ.warn(["Trying to add layer with *below* value",t,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}r.addLayer(e)};Hh.project=function(e){return this.map.project(new OJ.LngLat(e[0],e[1]))};Hh.getView=function(){var e=this.map,t=e.getCenter(),r=t.lng,n=t.lat,i={lon:r,lat:n},a=e.getCanvas(),o=parseInt(a.style.width),s=parseInt(a.style.height);return{center:i,zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch(),_derived:{coordinates:[e.unproject([0,0]).toArray(),e.unproject([o,0]).toArray(),e.unproject([o,s]).toArray(),e.unproject([0,s]).toArray()]}}};Hh.getViewEdits=function(e){for(var t=this.id,r=["center","zoom","bearing","pitch"],n={},i=0;i<r.length;i++){var a=r[i];n[t+"."+a]=e[a]}return n};Hh.getViewEditsWithDerived=function(e){var t=this.id,r=this.getViewEdits(e);return r[t+"._derived"]=e._derived,r};function Mje(e){var t={};return BJ.isPlainObject(e)?(t.id=e.id,t.style=e):typeof e=="string"?(t.id=e,gw.stylesMap[e]?t.style=gw.stylesMap[e]:t.style=e):(t.id=gw.styleValueDflt,t.style=eZt(gw.styleValueDflt)),t.transition={duration:0,delay:0},t}function eZt(e){return gw.styleUrlPrefix+e+"-"+gw.styleUrlSuffix}function NJ(e){return[e.lon,e.lat]}Eje.exports=Sje});var Pje=ye((Ybr,Lje)=>{"use strict";var UJ=Pr(),tZt=q_(),rZt=Zd(),Cje=Qk();Lje.exports=function(t,r,n){tZt(t,r,n,{type:"map",attributes:Cje,handleDefaults:iZt,partition:"y"})};function iZt(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,rZt(e,t,{name:"layers",handleItemDefaults:nZt}),t._input=e}function nZt(e,t){function r(l,u){return UJ.coerce(e,t,Cje.layers,l,u)}var n=r("visible");if(n){var i=r("sourcetype"),a=i==="raster"||i==="image";r("source"),r("sourceattribution"),i==="vector"&&r("sourcelayer"),i==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",UJ.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),UJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var m7=ye(u0=>{"use strict";var g7=Pr(),Ije=g7.strTranslate,aZt=g7.strScale,oZt=Id().getSubplotCalcData,sZt=Wp(),lZt=qa(),Rje=So(),uZt=Zl(),cZt=kje(),Ix="map";u0.name=Ix;u0.attr="subplot";u0.idRoot=Ix;u0.idRegex=u0.attrRegex=g7.counterRegex(Ix);u0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};u0.layoutAttributes=Qk();u0.supplyLayoutDefaults=Pje();u0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[Ix],a=0;a<i.length;a++){var o=i[a],s=oZt(n,Ix,o),l=r[o],u=l._subplot;u||(u=new cZt(t,o),r[o]._subplot=u),u.viewInitial||(u.viewInitial={center:g7.extendFlat({},l.center),zoom:l.zoom,bearing:l.bearing,pitch:l.pitch}),u.plot(s,r,t._promises)}};u0.clean=function(e,t,r,n){for(var i=n._subplots[Ix]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._subplot&&n[o]._subplot.destroy()}};u0.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[Ix],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._subplot,l=s.toImage("png"),u=t._glimages.append("svg:image");u.attr({xmlns:sZt.svg,"xlink:href":l,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:"none"});var c=lZt.select(a._subplot.div),f=c.select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),h=t._glimages.append("g"),d=h.append("text");d.text(f).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":f});var v=Rje.bBox(d.node()),m=n.w*(o.x[1]-o.x[0]);if(v.width>m/2){var b=f.split("|").join("<br>");d.text(b).attr("data-unformatted",b).call(uZt.convertToTspans,e),v=Rje.bBox(d.node())}d.attr("transform",Ije(-3,-v.height+8)),h.insert("rect",".static-attribution").attr({x:-v.width-6,y:-v.height-3,width:v.width+6,height:v.height+3,fill:"rgba(255, 255, 255, 0.75)"});var p=1;v.width+6>m&&(p=m/(v.width+6));var k=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr("transform",Ije(k[0],k[1])+aZt(p))}};u0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Ix],n=0;n<r.length;n++){var i=t[r[n]]._subplot;i.updateFx(t)}}});var Fje=ye((Jbr,Dje)=>{"use strict";Dje.exports={attributes:l7(),supplyDefaults:XHe(),colorbar:$d(),formatLabels:PJ(),calc:_F(),plot:sje(),hoverPoints:d7().hoverPoints,eventData:fje(),selectPoints:dje(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:m7(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var qje=ye(($br,zje)=>{"use strict";zje.exports=Fje()});var VJ=ye((Qbr,Oje)=>{"use strict";var x1=a5(),fZt=Tu(),{hovertemplateAttrs:hZt,templatefallbackAttrs:dZt}=Ll(),vZt=Gl(),Rx=Ao().extendFlat;Oje.exports=Rx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Rx({},x1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:x1.text,hovertext:x1.hovertext,marker:{line:{color:Rx({},x1.marker.line.color,{editType:"plot"}),width:Rx({},x1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Rx({},x1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Rx({},x1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Rx({},x1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:x1.hoverinfo,hovertemplate:hZt({},{keys:["properties"]}),hovertemplatefallback:dZt(),showlegend:Rx({},vZt.showlegend,{dflt:!1})},fZt("",{cLetter:"z",editTypeOverride:"calc"}))});var Nje=ye((e2r,Bje)=>{"use strict";var iC=Pr(),pZt=td(),gZt=VJ();Bje.exports=function(t,r,n,i){function a(c,f){return iC.coerce(t,r,gZt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!iC.isArrayOrTypedArray(o)||!o.length||!iC.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||iC.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),pZt(t,r,i,a,{prefix:"",cLetter:"z"}),iC.coerceSelectionMarkerOpacity(r,a)}});var GJ=ye((t2r,Gje)=>{"use strict";var mZt=Eo(),b1=Pr(),yZt=tc(),_Zt=So(),xZt=cx().makeBlank,Uje=hx();function bZt(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:xZt()};if(!r)return a;var o=Uje.extractTraceFeature(e);if(!o)return a;var s=yZt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;b1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var M=k.mo;return mZt(M)?+b1.constrain(M,0,1):0});var f;b1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;b1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d<e.length;d++){var v=e[d],m=v.fOut;if(m){var b=m.properties;b.fc=s(v.z),c&&(b.mo=c(v)),f&&(b.mlc=f(v)),h&&(b.mlw=h(v)),v.ct=b.ct,v._polygons=Uje.feature2polygons(m)}}var p=c?{type:"identity",property:"mo"}:l.opacity;return b1.extendFlat(n.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":p}),b1.extendFlat(i.paint,{"line-color":f?{type:"identity",property:"mlc"}:u.color,"line-width":h?{type:"identity",property:"mlw"}:u.width,"line-opacity":p}),n.layout.visibility="visible",i.layout.visibility="visible",a.geojson={type:"FeatureCollection",features:o},Vje(e),a}function Vje(e){var t=e[0].trace,r=t._opts,n;if(t.selectedpoints){for(var i=_Zt.makeSelectedPointStyleFns(t),a=0;a<e.length;a++){var o=e[a];o.fOut&&(o.fOut.properties.mo2=i.selectedOpacityFn(o))}n={type:"identity",property:"mo2"}}else n=b1.isArrayOrTypedArray(t.marker.opacity)?{type:"identity",property:"mo"}:t.marker.opacity;return b1.extendFlat(r.fill.paint,{"fill-opacity":n}),b1.extendFlat(r.line.paint,{"line-opacity":n}),r}Gje.exports={convert:bZt,convertOnSelect:Vje}});var Zje=ye((r2r,Xje)=>{"use strict";var jje=GJ().convert,wZt=GJ().convertOnSelect,Hje=Px().traceLayerPrefix;function Wje(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",Hje+t+"-fill"],["line",Hje+t+"-line"]],this.below=null}var D5=Wje.prototype;D5.update=function(e){this._update(jje(e)),e[0].trace._glTrace=this};D5.updateOnSelect=function(e){this._update(wZt(e))};D5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i<r.length;i++){var a=r[i],o=a[0],s=a[1],l=e[o];t.setOptions(s,"setLayoutProperty",l.layout),l.layout.visibility==="visible"&&t.setOptions(s,"setPaintProperty",l.paint)}};D5._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};D5._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};D5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};Xje.exports=function(t,r){var n=r[0].trace,i=new Wje(t,n.uid),a=i.sourceId,o=jje(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 Kje=ye((i2r,Yje)=>{"use strict";Yje.exports={attributes:VJ(),supplyDefaults:Nje(),colorbar:D_(),calc:NF(),plot:Zje(),hoverPoints:VF(),eventData:GF(),selectPoints:HF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var a=n+1;a<r.length;a++)if(i=r[a].id,typeof i=="string"&&i.indexOf("plotly-")===-1)return i}}},moduleType:"trace",name:"choroplethmap",basePlotModule:m7(),categories:["map","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_map"}}});var $je=ye((n2r,Jje)=>{"use strict";Jje.exports=Kje()});var jJ=ye((a2r,eWe)=>{"use strict";var TZt=Tu(),{hovertemplateAttrs:AZt,templatefallbackAttrs:SZt}=Ll(),Qje=Gl(),y7=l7(),HJ=Ao().extendFlat;eWe.exports=HJ({lon:y7.lon,lat:y7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:y7.text,hovertext:y7.hovertext,hoverinfo:HJ({},Qje.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:AZt(),hovertemplatefallback:SZt(),showlegend:HJ({},Qje.showlegend,{dflt:!1})},TZt("",{cLetter:"z",editTypeOverride:"calc"}))});var rWe=ye((o2r,tWe)=>{"use strict";var MZt=Pr(),EZt=td(),kZt=jJ();tWe.exports=function(t,r,n,i){function a(u,c){return MZt.coerce(t,r,kZt,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),EZt(t,r,i,a,{prefix:"",cLetter:"z"})}});var aWe=ye((s2r,nWe)=>{"use strict";var WJ=Eo(),CZt=Pr().isArrayOrTypedArray,XJ=fs().BADNUM,LZt=gv(),iWe=Pr()._;nWe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=CZt(a)&&a.length,s=0;s<n;s++){var l=i[s]={},u=r.lon[s],c=r.lat[s];if(l.lonlat=WJ(u)&&WJ(c)?[+u,+c]:[XJ,XJ],o){var f=a[s];l.z=WJ(f)?f:XJ}}return LZt(t,r,{vals:o?a:[0,1],containerStr:"",cLetter:"z"}),n&&(i[0].t={labels:{lat:iWe(t,"lat:")+" ",lon:iWe(t,"lon:")+" "}}),i}});var cWe=ye((l2r,uWe)=>{"use strict";var PZt=Eo(),ZJ=Pr(),oWe=ka(),sWe=tc(),lWe=fs().BADNUM,IZt=cx().makeBlank;uWe.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:IZt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=ZJ.isArrayOrTypedArray(l)&&l.length,f=ZJ.isArrayOrTypedArray(u);for(s=0;s<t.length;s++){var h=t[s],d=h.lonlat;if(d[0]!==lWe){var v={};if(c){var m=h.z;v.z=m!==lWe?m:0}f&&(v.r=PZt(u[s])&&u[s]>0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=sWe.extractOpts(r),p=b.reversescale?sWe.flipScale(b.colorscale):b.colorscale,k=p[0][1],M=oWe.opacity(k)<1?k:oWe.addOpacity(k,0),T=["interpolate",["linear"],["heatmap-density"],0,M];for(s=1;s<p.length;s++)T.push(p[s][0],p[s][1]);var L=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return ZJ.extendFlat(a.heatmap.paint,{"heatmap-weight":c?L:1/(b.max-b.min),"heatmap-color":T,"heatmap-radius":f?{type:"identity",property:"r"}:r.radius,"heatmap-opacity":r.opacity}),a.geojson={type:"FeatureCollection",features:o},a.heatmap.layout.visibility="visible",a}});var vWe=ye((u2r,dWe)=>{"use strict";var fWe=cWe(),RZt=Px().traceLayerPrefix;function hWe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",RZt+t+"-heatmap"]],this.below=null}var _7=hWe.prototype;_7.update=function(e){var t=this.subplot,r=this.layerList,n=fWe(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a<r.length;a++){var o=r[a],s=o[0],l=o[1],u=n[s];t.setOptions(l,"setLayoutProperty",u.layout),u.layout.visibility==="visible"&&t.setOptions(l,"setPaintProperty",u.paint)}};_7._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};_7._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};_7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};dWe.exports=function(t,r){var n=r[0].trace,i=new hWe(t,n.uid),a=i.sourceId,o=fWe(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 gWe=ye((c2r,pWe)=>{"use strict";var DZt=ho(),FZt=d7().hoverPoints,zZt=d7().getExtraText;pWe.exports=function(t,r,n){var i=FZt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=DZt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=zZt(s,l,o[0].t.labels),[a]}}});var yWe=ye((f2r,mWe)=>{"use strict";mWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var xWe=ye((h2r,_We)=>{"use strict";_We.exports={attributes:jJ(),supplyDefaults:rWe(),colorbar:D_(),formatLabels:PJ(),calc:aWe(),plot:vWe(),hoverPoints:gWe(),eventData:yWe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n<r.length;n++){var i=r[n],a=i.id;if(i.type==="symbol"&&typeof a=="string"&&a.indexOf("plotly-")===-1)return a}},moduleType:"trace",name:"densitymap",basePlotModule:m7(),categories:["map","gl","showLegend"],meta:{hr_name:"density_map"}}});var wWe=ye((d2r,bWe)=>{"use strict";bWe.exports=xWe()});var KJ=ye((p2r,EWe)=>{"use strict";var qZt=ec(),OZt=Gl(),TWe=Ih(),YJ=p3(),BZt=Cc().attributes,{hovertemplateAttrs:AWe,templatefallbackAttrs:SWe}=Ll(),NZt=Tu(),UZt=vl().templatedArray,VZt=df().descriptionOnlyNumbers,MWe=Ao().extendFlat,GZt=mc().overrideAll,v2r=EWe.exports=GZt({hoverinfo:MWe({},OZt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:YJ.hoverlabel,domain:BZt({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:VZt("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:qZt({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:TWe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:YJ.hoverlabel,hovertemplate:AWe({},{keys:["value","label"]}),hovertemplatefallback:SWe(),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:TWe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:YJ.hoverlabel,hovertemplate:AWe({},{keys:["value","label"]}),hovertemplatefallback:SWe(),colorscales:UZt("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:MWe(NZt().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")});var IWe=ye((g2r,PWe)=>{"use strict";var F5=Pr(),x7=KJ(),HZt=ka(),kWe=fd(),jZt=Cc().defaults,CWe=_M(),LWe=vl(),WZt=Zd();PWe.exports=function(t,r,n,i){function a(T,L){return F5.coerce(t,r,x7,T,L)}var o=F5.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,l=LWe.newContainer(r,"node");function u(T,L){return F5.coerce(s,l,x7.node,T,L)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),CWe(s,l,u,o),u("hovertemplate"),u("align");var c=i.colorway,f=function(T){return c[T%c.length]};u("color",l.label.map(function(T,L){return HZt.addOpacity(f(L),.8)})),u("customdata");var h=t.link||{},d=LWe.newContainer(r,"link");function v(T,L){return F5.coerce(h,d,x7.link,T,L)}v("label"),v("arrowlen"),v("source"),v("target"),v("value"),v("line.color"),v("line.width"),v("hoverinfo",t.hoverinfo),CWe(h,d,v,o),v("hovertemplate");var m=kWe(i.paper_bgcolor).getLuminance()<.333,b=m?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=v("color",b);function k(T){var L=kWe(T);if(!L.isValid())return T;var x=L.getAlpha();return x<=.8?L.setAlpha(x+.2):L=m?L.brighten():L.darken(),L.toRgbString()}v("hovercolor",Array.isArray(p)?p.map(k):k(p)),v("customdata"),WZt(h,d,{name:"colorscales",handleItemDefaults:XZt}),jZt(r,i,a),a("orientation"),a("valueformat"),a("valuesuffix");var M;l.x.length&&l.y.length&&(M="freeform"),a("arrangement",M),F5.coerceFont(a,"textfont",i.font,{autoShadowDflt:!0}),r._length=null};function XZt(e,t){function r(n,i){return F5.coerce(e,t,x7.link.colorscales,n,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var JJ=ye((m2r,RWe)=>{"use strict";RWe.exports=ZZt;function ZZt(e){for(var t=e.length,r=new Array(t),n=new Array(t),i=new Array(t),a=new Array(t),o=new Array(t),s=new Array(t),l=0;l<t;++l)r[l]=-1,n[l]=0,i[l]=!1,a[l]=0,o[l]=-1,s[l]=[];var u=0,c=[],f=[];function h(b){var p=[b],k=[b];for(r[b]=n[b]=u,i[b]=!0,u+=1;k.length>0;){b=k[k.length-1];var M=e[b];if(a[b]<M.length){for(var T=a[b];T<M.length;++T){var L=M[T];if(r[L]<0){r[L]=n[L]=u,i[L]=!0,u+=1,p.push(L),k.push(L);break}else i[L]&&(n[b]=Math.min(n[b],n[L])|0);o[L]>=0&&s[b].push(o[L])}a[b]=T}else{if(n[b]===r[b]){for(var x=[],C=[],S=0,T=p.length-1;T>=0;--T){var g=p[T];if(i[g]=!1,x.push(g),C.push(s[g]),S+=s[g].length,o[g]=c.length,g===b){p.length=T;break}}c.push(x);for(var P=new Array(S),T=0;T<C.length;T++)for(var E=0;E<C[T].length;E++)P[--S]=C[T][E];f.push(P)}k.pop()}}}for(var l=0;l<t;++l)r[l]<0&&h(l);for(var d,l=0;l<f.length;l++){var v=f[l];if(v.length!==0){v.sort(function(p,k){return p-k}),d=[v[0]];for(var m=1;m<v.length;m++)v[m]!==v[m-1]&&d.push(v[m]);f[l]=d}}return{components:c,adjacencyList:f}}});var qWe=ye((y2r,zWe)=>{"use strict";var YZt=JJ(),z5=Pr(),KZt=iy().wrap,nC=z5.isArrayOrTypedArray,DWe=z5.isIndex,FWe=tc();function JZt(e){var t=e.node,r=e.link,n=[],i=nC(r.color),a=nC(r.hovercolor),o=nC(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;c<u;c++){var f=r.colorscales[c],h=FWe.extractScale(f,{cLetter:"c"}),d=FWe.makeColorScaleFunc(h);l[f.label]=d}var v=0;for(c=0;c<r.value.length;c++)r.source[c]>v&&(v=r.source[c]),r.target[c]>v&&(v=r.target[c]);var m=v+1;e.node._count=m;var b,p=e.node.groups,k={};for(c=0;c<p.length;c++){var M=p[c];for(b=0;b<M.length;b++){var T=M[b],L=m+c;k.hasOwnProperty(T)?z5.warn("Node "+T+" is already part of a group."):k[T]=L}}var x={source:[],target:[]};for(c=0;c<r.value.length;c++){var C=r.value[c],S=r.source[c],g=r.target[c];if(C>0&&DWe(S,m)&&DWe(g,m)&&!(k.hasOwnProperty(S)&&k.hasOwnProperty(g)&&k[S]===k[g])){k.hasOwnProperty(g)&&(g=k[g]),k.hasOwnProperty(S)&&(S=k[S]),S=+S,g=+g,s[S]=s[g]=!0;var P="";r.label&&r.label[c]&&(P=r.label[c]);var E=null;P&&l.hasOwnProperty(P)&&(E=l[P]),n.push({pointNumber:c,label:P,color:i?r.color[c]:r.color,hovercolor:a?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:E,source:S,target:g,value:+C}),x.source.push(S),x.target.push(g)}}var z=m+p.length,q=nC(t.color),U=nC(t.customdata),G=[];for(c=0;c<z;c++)if(s[c]){var Z=t.label[c];G.push({group:c>m-1,childrenNodes:[],pointNumber:c,label:Z,color:q?t.color[c]:t.color,customdata:U?t.customdata[c]:t.customdata})}var j=!1;return $Zt(z,x.source,x.target)&&(j=!0),{circular:j,links:n,nodes:G,groups:p,groupLookup:k}}function $Zt(e,t,r){for(var n=z5.init2dArray(e,0),i=0;i<Math.min(t.length,r.length);i++)if(z5.isIndex(t[i],e)&&z5.isIndex(r[i],e)){if(t[i]===r[i])return!0;n[t[i]].push(r[i])}var a=YZt(n);return a.components.some(function(o){return o.length>1})}zWe.exports=function(t,r){var n=JZt(r);return KZt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var BWe=ye((b7,OWe)=>{(function(e,t){typeof b7=="object"&&typeof OWe!="undefined"?t(b7):(e=e||self,t(e.d3=e.d3||{}))})(b7,function(e){"use strict";function t(C){var S=+this._x.call(null,C),g=+this._y.call(null,C);return r(this.cover(S,g),S,g,C)}function r(C,S,g,P){if(isNaN(S)||isNaN(g))return C;var E,z=C._root,q={data:P},U=C._x0,G=C._y0,Z=C._x1,j=C._y1,N,H,re,oe,_e,ke,Ce,ge;if(!z)return C._root=q,C;for(;z.length;)if((_e=S>=(N=(U+Z)/2))?U=N:Z=N,(ke=g>=(H=(G+j)/2))?G=H:j=H,E=z,!(z=z[Ce=ke<<1|_e]))return E[Ce]=q,C;if(re=+C._x.call(null,z.data),oe=+C._y.call(null,z.data),S===re&&g===oe)return q.next=z,E?E[Ce]=q:C._root=q,C;do E=E?E[Ce]=new Array(4):C._root=new Array(4),(_e=S>=(N=(U+Z)/2))?U=N:Z=N,(ke=g>=(H=(G+j)/2))?G=H:j=H;while((Ce=ke<<1|_e)===(ge=(oe>=H)<<1|re>=N));return E[ge]=z,E[Ce]=q,C}function n(C){var S,g,P=C.length,E,z,q=new Array(P),U=new Array(P),G=1/0,Z=1/0,j=-1/0,N=-1/0;for(g=0;g<P;++g)isNaN(E=+this._x.call(null,S=C[g]))||isNaN(z=+this._y.call(null,S))||(q[g]=E,U[g]=z,E<G&&(G=E),E>j&&(j=E),z<Z&&(Z=z),z>N&&(N=z));if(G>j||Z>N)return this;for(this.cover(G,Z).cover(j,N),g=0;g<P;++g)r(this,q[g],U[g],C[g]);return this}function i(C,S){if(isNaN(C=+C)||isNaN(S=+S))return this;var g=this._x0,P=this._y0,E=this._x1,z=this._y1;if(isNaN(g))E=(g=Math.floor(C))+1,z=(P=Math.floor(S))+1;else{for(var q=E-g,U=this._root,G,Z;g>C||C>=E||P>S||S>=z;)switch(Z=(S<P)<<1|C<g,G=new Array(4),G[Z]=U,U=G,q*=2,Z){case 0:E=g+q,z=P+q;break;case 1:g=E-q,z=P+q;break;case 2:E=g+q,P=z-q;break;case 3:g=E-q,P=z-q;break}this._root&&this._root.length&&(this._root=U)}return this._x0=g,this._y0=P,this._x1=E,this._y1=z,this}function a(){var C=[];return this.visit(function(S){if(!S.length)do C.push(S.data);while(S=S.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,S,g,P,E){this.node=C,this.x0=S,this.y0=g,this.x1=P,this.y1=E}function l(C,S,g){var P,E=this._x0,z=this._y0,q,U,G,Z,j=this._x1,N=this._y1,H=[],re=this._root,oe,_e;for(re&&H.push(new s(re,E,z,j,N)),g==null?g=1/0:(E=C-g,z=S-g,j=C+g,N=S+g,g*=g);oe=H.pop();)if(!(!(re=oe.node)||(q=oe.x0)>j||(U=oe.y0)>N||(G=oe.x1)<E||(Z=oe.y1)<z))if(re.length){var ke=(q+G)/2,Ce=(U+Z)/2;H.push(new s(re[3],ke,Ce,G,Z),new s(re[2],q,Ce,ke,Z),new s(re[1],ke,U,G,Ce),new s(re[0],q,U,ke,Ce)),(_e=(S>=Ce)<<1|C>=ke)&&(oe=H[H.length-1],H[H.length-1]=H[H.length-1-_e],H[H.length-1-_e]=oe)}else{var ge=C-+this._x.call(null,re.data),ie=S-+this._y.call(null,re.data),Se=ge*ge+ie*ie;if(Se<g){var Ee=Math.sqrt(g=Se);E=C-Ee,z=S-Ee,j=C+Ee,N=S+Ee,P=re.data}}return P}function u(C){if(isNaN(j=+this._x.call(null,C))||isNaN(N=+this._y.call(null,C)))return this;var S,g=this._root,P,E,z,q=this._x0,U=this._y0,G=this._x1,Z=this._y1,j,N,H,re,oe,_e,ke,Ce;if(!g)return this;if(g.length)for(;;){if((oe=j>=(H=(q+G)/2))?q=H:G=H,(_e=N>=(re=(U+Z)/2))?U=re:Z=re,S=g,!(g=g[ke=_e<<1|oe]))return this;if(!g.length)break;(S[ke+1&3]||S[ke+2&3]||S[ke+3&3])&&(P=S,Ce=ke)}for(;g.data!==C;)if(E=g,!(g=g.next))return this;return(z=g.next)&&delete g.next,E?(z?E.next=z:delete E.next,this):S?(z?S[ke]=z:delete S[ke],(g=S[0]||S[1]||S[2]||S[3])&&g===(S[3]||S[2]||S[1]||S[0])&&!g.length&&(P?P[Ce]=g:this._root=g),this):(this._root=z,this)}function c(C){for(var S=0,g=C.length;S<g;++S)this.remove(C[S]);return this}function f(){return this._root}function h(){var C=0;return this.visit(function(S){if(!S.length)do++C;while(S=S.next)}),C}function d(C){var S=[],g,P=this._root,E,z,q,U,G;for(P&&S.push(new s(P,this._x0,this._y0,this._x1,this._y1));g=S.pop();)if(!C(P=g.node,z=g.x0,q=g.y0,U=g.x1,G=g.y1)&&P.length){var Z=(z+U)/2,j=(q+G)/2;(E=P[3])&&S.push(new s(E,Z,j,U,G)),(E=P[2])&&S.push(new s(E,z,j,Z,G)),(E=P[1])&&S.push(new s(E,Z,q,U,j)),(E=P[0])&&S.push(new s(E,z,q,Z,j))}return this}function v(C){var S=[],g=[],P;for(this._root&&S.push(new s(this._root,this._x0,this._y0,this._x1,this._y1));P=S.pop();){var E=P.node;if(E.length){var z,q=P.x0,U=P.y0,G=P.x1,Z=P.y1,j=(q+G)/2,N=(U+Z)/2;(z=E[0])&&S.push(new s(z,q,U,j,N)),(z=E[1])&&S.push(new s(z,j,U,G,N)),(z=E[2])&&S.push(new s(z,q,N,j,Z)),(z=E[3])&&S.push(new s(z,j,N,G,Z))}g.push(P)}for(;P=g.pop();)C(P.node,P.x0,P.y0,P.x1,P.y1);return this}function m(C){return C[0]}function b(C){return arguments.length?(this._x=C,this):this._x}function p(C){return C[1]}function k(C){return arguments.length?(this._y=C,this):this._y}function M(C,S,g){var P=new T(S==null?m:S,g==null?p:g,NaN,NaN,NaN,NaN);return C==null?P:P.addAll(C)}function T(C,S,g,P,E,z){this._x=C,this._y=S,this._x0=g,this._y0=P,this._x1=E,this._y1=z,this._root=void 0}function L(C){for(var S={data:C.data},g=S;C=C.next;)g=g.next={data:C.data};return S}var x=M.prototype=T.prototype;x.copy=function(){var C=new T(this._x,this._y,this._x0,this._y0,this._x1,this._y1),S=this._root,g,P;if(!S)return C;if(!S.length)return C._root=L(S),C;for(g=[{source:S,target:C._root=new Array(4)}];S=g.pop();)for(var E=0;E<4;++E)(P=S.source[E])&&(P.length?g.push({source:P,target:S.target[E]=new Array(4)}):S.target[E]=L(P));return C},x.add=t,x.addAll=n,x.cover=i,x.data=a,x.extent=o,x.find=l,x.remove=u,x.removeAll=c,x.root=f,x.size=h,x.visit=d,x.visitAfter=v,x.x=b,x.y=k,e.quadtree=M,Object.defineProperty(e,"__esModule",{value:!0})})});var T7=ye((w7,NWe)=>{(function(e,t){t(typeof w7=="object"&&typeof NWe!="undefined"?w7:e.d3=e.d3||{})})(w7,function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(m){return t+m in this},get:function(m){return this[t+m]},set:function(m,b){return this[t+m]=b,this},remove:function(m){var b=t+m;return b in this&&delete this[b]},clear:function(){for(var m in this)m[0]===t&&delete this[m]},keys:function(){var m=[];for(var b in this)b[0]===t&&m.push(b.slice(1));return m},values:function(){var m=[];for(var b in this)b[0]===t&&m.push(this[b]);return m},entries:function(){var m=[];for(var b in this)b[0]===t&&m.push({key:b.slice(1),value:this[b]});return m},size:function(){var m=0;for(var b in this)b[0]===t&&++m;return m},empty:function(){for(var m in this)if(m[0]===t)return!1;return!0},each:function(m){for(var b in this)b[0]===t&&m(this[b],b.slice(1),this)}};function n(m,b){var p=new r;if(m instanceof r)m.each(function(x,C){p.set(C,x)});else if(Array.isArray(m)){var k=-1,M=m.length,T;if(b==null)for(;++k<M;)p.set(k,m[k]);else for(;++k<M;)p.set(b(T=m[k],k,m),T)}else if(m)for(var L in m)p.set(L,m[L]);return p}function i(){var m=[],b=[],p,k,M;function T(x,C,S,g){if(C>=m.length)return p!=null&&x.sort(p),k!=null?k(x):x;for(var P=-1,E=x.length,z=m[C++],q,U,G=n(),Z,j=S();++P<E;)(Z=G.get(q=z(U=x[P])+""))?Z.push(U):G.set(q,[U]);return G.each(function(N,H){g(j,H,T(N,C,S,g))}),j}function L(x,C){if(++C>m.length)return x;var S,g=b[C-1];return k!=null&&C>=m.length?S=x.entries():(S=[],x.each(function(P,E){S.push({key:E,values:L(P,C)})})),g!=null?S.sort(function(P,E){return g(P.key,E.key)}):S}return M={object:function(x){return T(x,0,a,o)},map:function(x){return T(x,0,s,l)},entries:function(x){return L(T(x,0,s,l),0)},key:function(x){return m.push(x),M},sortKeys:function(x){return b[m.length-1]=x,M},sortValues:function(x){return p=x,M},rollup:function(x){return k=x,M}}}function a(){return{}}function o(m,b,p){m[b]=p}function s(){return n()}function l(m,b,p){m.set(b,p)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(m){return m+="",this[t+m]=m,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(m,b){var p=new u;if(m instanceof u)m.each(function(T){p.add(T)});else if(m){var k=-1,M=m.length;if(b==null)for(;++k<M;)p.add(m[k]);else for(;++k<M;)p.add(b(m[k],k,m))}return p}function h(m){var b=[];for(var p in m)b.push(p);return b}function d(m){var b=[];for(var p in m)b.push(m[p]);return b}function v(m){var b=[];for(var p in m)b.push({key:p,value:m[p]});return b}e.nest=i,e.set=f,e.map=n,e.keys=h,e.values=d,e.entries=v,Object.defineProperty(e,"__esModule",{value:!0})})});var VWe=ye((A7,UWe)=>{(function(e,t){typeof A7=="object"&&typeof UWe!="undefined"?t(A7):(e=e||self,t(e.d3=e.d3||{}))})(A7,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s<l;++s){if(!(c=arguments[s]+"")||c in u||/[\s.]/.test(c))throw new Error("illegal type: "+c);u[c]=[]}return new n(u)}function n(s){this._=s}function i(s,l){return s.trim().split(/^|\s+/).map(function(u){var c="",f=u.indexOf(".");if(f>=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error("unknown type: "+u);return{type:u,name:c}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=i(s+"",u),f,h=-1,d=c.length;if(arguments.length<2){for(;++h<d;)if((f=(s=c[h]).type)&&(f=a(u[f],s.name)))return f;return}if(l!=null&&typeof l!="function")throw new Error("invalid callback: "+l);for(;++h<d;)if(f=(s=c[h]).type)u[f]=o(u[f],s.name,l);else if(l==null)for(f in u)u[f]=o(u[f],s.name,null);return this},copy:function(){var s={},l=this._;for(var u in l)s[u]=l[u].slice();return new n(s)},call:function(s,l){if((f=arguments.length-2)>0)for(var u=new Array(f),c=0,f,h;c<f;++c)u[c]=arguments[c+2];if(!this._.hasOwnProperty(s))throw new Error("unknown type: "+s);for(h=this._[s],c=0,f=h.length;c<f;++c)h[c].value.apply(l,u)},apply:function(s,l,u){if(!this._.hasOwnProperty(s))throw new Error("unknown type: "+s);for(var c=this._[s],f=0,h=c.length;f<h;++f)c[f].value.apply(l,u)}};function a(s,l){for(var u=0,c=s.length,f;u<c;++u)if((f=s[u]).name===l)return f.value}function o(s,l,u){for(var c=0,f=s.length;c<f;++c)if(s[c].name===l){s[c]=t,s=s.slice(0,c).concat(s.slice(c+1));break}return u!=null&&s.push({name:l,value:u}),s}e.dispatch=r,Object.defineProperty(e,"__esModule",{value:!0})})});var HWe=ye((S7,GWe)=>{(function(e,t){typeof S7=="object"&&typeof GWe!="undefined"?t(S7):(e=e||self,t(e.d3=e.d3||{}))})(S7,function(e){"use strict";var t=0,r=0,n=0,i=1e3,a,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(C){setTimeout(C,17)};function h(){return l||(f(d),l=c.now()+u)}function d(){l=0}function v(){this._call=this._time=this._next=null}v.prototype=m.prototype={constructor:v,restart:function(C,S,g){if(typeof C!="function")throw new TypeError("callback is not a function");g=(g==null?h():+g)+(S==null?0:+S),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=C,this._time=g,T()},stop:function(){this._call&&(this._call=null,this._time=1/0,T())}};function m(C,S,g){var P=new v;return P.restart(C,S,g),P}function b(){h(),++t;for(var C=a,S;C;)(S=l-C._time)>=0&&C._call.call(null,S),C=C._next;--t}function p(){l=(s=c.now())+u,t=r=0;try{b()}finally{t=0,M(),l=0}}function k(){var C=c.now(),S=C-s;S>i&&(u-=S,s=C)}function M(){for(var C,S=a,g,P=1/0;S;)S._call?(P>S._time&&(P=S._time),C=S,S=S._next):(g=S._next,S._next=null,S=C?C._next=g:a=g);o=C,T(P)}function T(C){if(!t){r&&(r=clearTimeout(r));var S=C-l;S>24?(C<1/0&&(r=setTimeout(p,C-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(k,i)),t=1,f(p))}}function L(C,S,g){var P=new v;return S=S==null?0:+S,P.restart(function(E){P.stop(),C(E+S)},S,g),P}function x(C,S,g){var P=new v,E=S;return S==null?(P.restart(C,S,g),P):(S=+S,g=g==null?h():+g,P.restart(function z(q){q+=E,P.restart(z,E+=S,g),C(q)},S,g),P)}e.interval=x,e.now=h,e.timeout=L,e.timer=m,e.timerFlush=b,Object.defineProperty(e,"__esModule",{value:!0})})});var WWe=ye((M7,jWe)=>{(function(e,t){typeof M7=="object"&&typeof jWe!="undefined"?t(M7,BWe(),T7(),VWe(),HWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(M7,function(e,t,r,n,i){"use strict";function a(C,S){var g;C==null&&(C=0),S==null&&(S=0);function P(){var E,z=g.length,q,U=0,G=0;for(E=0;E<z;++E)q=g[E],U+=q.x,G+=q.y;for(U=U/z-C,G=G/z-S,E=0;E<z;++E)q=g[E],q.x-=U,q.y-=G}return P.initialize=function(E){g=E},P.x=function(E){return arguments.length?(C=+E,P):C},P.y=function(E){return arguments.length?(S=+E,P):S},P}function o(C){return function(){return C}}function s(){return(Math.random()-.5)*1e-6}function l(C){return C.x+C.vx}function u(C){return C.y+C.vy}function c(C){var S,g,P=1,E=1;typeof C!="function"&&(C=o(C==null?1:+C));function z(){for(var G,Z=S.length,j,N,H,re,oe,_e,ke=0;ke<E;++ke)for(j=t.quadtree(S,l,u).visitAfter(q),G=0;G<Z;++G)N=S[G],oe=g[N.index],_e=oe*oe,H=N.x+N.vx,re=N.y+N.vy,j.visit(Ce);function Ce(ge,ie,Se,Ee,we){var De=ge.data,Le=ge.r,me=oe+Le;if(De){if(De.index>N.index){var Pe=H-De.x-De.vx,ce=re-De.y-De.vy,He=Pe*Pe+ce*ce;He<me*me&&(Pe===0&&(Pe=s(),He+=Pe*Pe),ce===0&&(ce=s(),He+=ce*ce),He=(me-(He=Math.sqrt(He)))/He*P,N.vx+=(Pe*=He)*(me=(Le*=Le)/(_e+Le)),N.vy+=(ce*=He)*me,De.vx-=Pe*(me=1-me),De.vy-=ce*me)}return}return ie>H+me||Ee<H-me||Se>re+me||we<re-me}}function q(G){if(G.data)return G.r=g[G.data.index];for(var Z=G.r=0;Z<4;++Z)G[Z]&&G[Z].r>G.r&&(G.r=G[Z].r)}function U(){if(S){var G,Z=S.length,j;for(g=new Array(Z),G=0;G<Z;++G)j=S[G],g[j.index]=+C(j,G,S)}}return z.initialize=function(G){S=G,U()},z.iterations=function(G){return arguments.length?(E=+G,z):E},z.strength=function(G){return arguments.length?(P=+G,z):P},z.radius=function(G){return arguments.length?(C=typeof G=="function"?G:o(+G),U(),z):C},z}function f(C){return C.index}function h(C,S){var g=C.get(S);if(!g)throw new Error("missing: "+S);return g}function d(C){var S=f,g=j,P,E=o(30),z,q,U,G,Z=1;C==null&&(C=[]);function j(_e){return 1/Math.min(U[_e.source.index],U[_e.target.index])}function N(_e){for(var ke=0,Ce=C.length;ke<Z;++ke)for(var ge=0,ie,Se,Ee,we,De,Le,me;ge<Ce;++ge)ie=C[ge],Se=ie.source,Ee=ie.target,we=Ee.x+Ee.vx-Se.x-Se.vx||s(),De=Ee.y+Ee.vy-Se.y-Se.vy||s(),Le=Math.sqrt(we*we+De*De),Le=(Le-z[ge])/Le*_e*P[ge],we*=Le,De*=Le,Ee.vx-=we*(me=G[ge]),Ee.vy-=De*me,Se.vx+=we*(me=1-me),Se.vy+=De*me}function H(){if(q){var _e,ke=q.length,Ce=C.length,ge=r.map(q,S),ie;for(_e=0,U=new Array(ke);_e<Ce;++_e)ie=C[_e],ie.index=_e,typeof ie.source!="object"&&(ie.source=h(ge,ie.source)),typeof ie.target!="object"&&(ie.target=h(ge,ie.target)),U[ie.source.index]=(U[ie.source.index]||0)+1,U[ie.target.index]=(U[ie.target.index]||0)+1;for(_e=0,G=new Array(Ce);_e<Ce;++_e)ie=C[_e],G[_e]=U[ie.source.index]/(U[ie.source.index]+U[ie.target.index]);P=new Array(Ce),re(),z=new Array(Ce),oe()}}function re(){if(q)for(var _e=0,ke=C.length;_e<ke;++_e)P[_e]=+g(C[_e],_e,C)}function oe(){if(q)for(var _e=0,ke=C.length;_e<ke;++_e)z[_e]=+E(C[_e],_e,C)}return N.initialize=function(_e){q=_e,H()},N.links=function(_e){return arguments.length?(C=_e,H(),N):C},N.id=function(_e){return arguments.length?(S=_e,N):S},N.iterations=function(_e){return arguments.length?(Z=+_e,N):Z},N.strength=function(_e){return arguments.length?(g=typeof _e=="function"?_e:o(+_e),re(),N):g},N.distance=function(_e){return arguments.length?(E=typeof _e=="function"?_e:o(+_e),oe(),N):E},N}function v(C){return C.x}function m(C){return C.y}var b=10,p=Math.PI*(3-Math.sqrt(5));function k(C){var S,g=1,P=.001,E=1-Math.pow(P,1/300),z=0,q=.6,U=r.map(),G=i.timer(j),Z=n.dispatch("tick","end");C==null&&(C=[]);function j(){N(),Z.call("tick",S),g<P&&(G.stop(),Z.call("end",S))}function N(oe){var _e,ke=C.length,Ce;oe===void 0&&(oe=1);for(var ge=0;ge<oe;++ge)for(g+=(z-g)*E,U.each(function(ie){ie(g)}),_e=0;_e<ke;++_e)Ce=C[_e],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 S}function H(){for(var oe=0,_e=C.length,ke;oe<_e;++oe){if(ke=C[oe],ke.index=oe,ke.fx!=null&&(ke.x=ke.fx),ke.fy!=null&&(ke.y=ke.fy),isNaN(ke.x)||isNaN(ke.y)){var Ce=b*Math.sqrt(oe),ge=oe*p;ke.x=Ce*Math.cos(ge),ke.y=Ce*Math.sin(ge)}(isNaN(ke.vx)||isNaN(ke.vy))&&(ke.vx=ke.vy=0)}}function re(oe){return oe.initialize&&oe.initialize(C),oe}return H(),S={tick:N,restart:function(){return G.restart(j),S},stop:function(){return G.stop(),S},nodes:function(oe){return arguments.length?(C=oe,H(),U.each(re),S):C},alpha:function(oe){return arguments.length?(g=+oe,S):g},alphaMin:function(oe){return arguments.length?(P=+oe,S):P},alphaDecay:function(oe){return arguments.length?(E=+oe,S):+E},alphaTarget:function(oe){return arguments.length?(z=+oe,S):z},velocityDecay:function(oe){return arguments.length?(q=1-oe,S):1-q},force:function(oe,_e){return arguments.length>1?(_e==null?U.remove(oe):U.set(oe,re(_e)),S):U.get(oe)},find:function(oe,_e,ke){var Ce=0,ge=C.length,ie,Se,Ee,we,De;for(ke==null?ke=1/0:ke*=ke,Ce=0;Ce<ge;++Ce)we=C[Ce],ie=oe-we.x,Se=_e-we.y,Ee=ie*ie+Se*Se,Ee<ke&&(De=we,ke=Ee);return De},on:function(oe,_e){return arguments.length>1?(Z.on(oe,_e),S):Z.on(oe)}}}function M(){var C,S,g,P=o(-30),E,z=1,q=1/0,U=.81;function G(H){var re,oe=C.length,_e=t.quadtree(C,v,m).visitAfter(j);for(g=H,re=0;re<oe;++re)S=C[re],_e.visit(N)}function Z(){if(C){var H,re=C.length,oe;for(E=new Array(re),H=0;H<re;++H)oe=C[H],E[oe.index]=+P(oe,H,C)}}function j(H){var re=0,oe,_e,ke=0,Ce,ge,ie;if(H.length){for(Ce=ge=ie=0;ie<4;++ie)(oe=H[ie])&&(_e=Math.abs(oe.value))&&(re+=oe.value,ke+=_e,Ce+=_e*oe.x,ge+=_e*oe.y);H.x=Ce/ke,H.y=ge/ke}else{oe=H,oe.x=oe.data.x,oe.y=oe.data.y;do re+=E[oe.data.index];while(oe=oe.next)}H.value=re}function N(H,re,oe,_e){if(!H.value)return!0;var ke=H.x-S.x,Ce=H.y-S.y,ge=_e-re,ie=ke*ke+Ce*Ce;if(ge*ge/U<ie)return ie<q&&(ke===0&&(ke=s(),ie+=ke*ke),Ce===0&&(Ce=s(),ie+=Ce*Ce),ie<z&&(ie=Math.sqrt(z*ie)),S.vx+=ke*H.value*g/ie,S.vy+=Ce*H.value*g/ie),!0;if(H.length||ie>=q)return;(H.data!==S||H.next)&&(ke===0&&(ke=s(),ie+=ke*ke),Ce===0&&(Ce=s(),ie+=Ce*Ce),ie<z&&(ie=Math.sqrt(z*ie)));do H.data!==S&&(ge=E[H.data.index]*g/ie,S.vx+=ke*ge,S.vy+=Ce*ge);while(H=H.next)}return G.initialize=function(H){C=H,Z()},G.strength=function(H){return arguments.length?(P=typeof H=="function"?H:o(+H),Z(),G):P},G.distanceMin=function(H){return arguments.length?(z=H*H,G):Math.sqrt(z)},G.distanceMax=function(H){return arguments.length?(q=H*H,G):Math.sqrt(q)},G.theta=function(H){return arguments.length?(U=H*H,G):Math.sqrt(U)},G}function T(C,S,g){var P,E=o(.1),z,q;typeof C!="function"&&(C=o(+C)),S==null&&(S=0),g==null&&(g=0);function U(Z){for(var j=0,N=P.length;j<N;++j){var H=P[j],re=H.x-S||1e-6,oe=H.y-g||1e-6,_e=Math.sqrt(re*re+oe*oe),ke=(q[j]-_e)*z[j]*Z/_e;H.vx+=re*ke,H.vy+=oe*ke}}function G(){if(P){var Z,j=P.length;for(z=new Array(j),q=new Array(j),Z=0;Z<j;++Z)q[Z]=+C(P[Z],Z,P),z[Z]=isNaN(q[Z])?0:+E(P[Z],Z,P)}}return U.initialize=function(Z){P=Z,G()},U.strength=function(Z){return arguments.length?(E=typeof Z=="function"?Z:o(+Z),G(),U):E},U.radius=function(Z){return arguments.length?(C=typeof Z=="function"?Z:o(+Z),G(),U):C},U.x=function(Z){return arguments.length?(S=+Z,U):S},U.y=function(Z){return arguments.length?(g=+Z,U):g},U}function L(C){var S=o(.1),g,P,E;typeof C!="function"&&(C=o(C==null?0:+C));function z(U){for(var G=0,Z=g.length,j;G<Z;++G)j=g[G],j.vx+=(E[G]-j.x)*P[G]*U}function q(){if(g){var U,G=g.length;for(P=new Array(G),E=new Array(G),U=0;U<G;++U)P[U]=isNaN(E[U]=+C(g[U],U,g))?0:+S(g[U],U,g)}}return z.initialize=function(U){g=U,q()},z.strength=function(U){return arguments.length?(S=typeof U=="function"?U:o(+U),q(),z):S},z.x=function(U){return arguments.length?(C=typeof U=="function"?U:o(+U),q(),z):C},z}function x(C){var S=o(.1),g,P,E;typeof C!="function"&&(C=o(C==null?0:+C));function z(U){for(var G=0,Z=g.length,j;G<Z;++G)j=g[G],j.vy+=(E[G]-j.y)*P[G]*U}function q(){if(g){var U,G=g.length;for(P=new Array(G),E=new Array(G),U=0;U<G;++U)P[U]=isNaN(E[U]=+C(g[U],U,g))?0:+S(g[U],U,g)}}return z.initialize=function(U){g=U,q()},z.strength=function(U){return arguments.length?(S=typeof U=="function"?U:o(+U),q(),z):S},z.y=function(U){return arguments.length?(C=typeof U=="function"?U:o(+U),q(),z):C},z}e.forceCenter=a,e.forceCollide=c,e.forceLink=d,e.forceManyBody=M,e.forceRadial=T,e.forceSimulation=k,e.forceX=L,e.forceY=x,Object.defineProperty(e,"__esModule",{value:!0})})});var ZWe=ye((E7,XWe)=>{(function(e,t){typeof E7=="object"&&typeof XWe!="undefined"?t(E7):(e=e||self,t(e.d3=e.d3||{}))})(E7,function(e){"use strict";var t=Math.PI,r=2*t,n=1e-6,i=r-n;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new a}a.prototype=o.prototype={constructor:a,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,h){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+h)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var h=this._x1,d=this._y1,v=u-s,m=c-l,b=h-s,p=d-l,k=b*b+p*p;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(k>n)if(!(Math.abs(p*v-m*b)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var M=u-h,T=c-d,L=v*v+m*m,x=M*M+T*T,C=Math.sqrt(L),S=Math.sqrt(k),g=f*Math.tan((t-Math.acos((L+k-x)/(2*C*S)))/2),P=g/S,E=g/C;Math.abs(P-1)>n&&(this._+="L"+(s+P*b)+","+(l+P*p)),this._+="A"+f+","+f+",0,0,"+ +(p*M>b*T)+","+(this._x1=s+E*v)+","+(this._y1=l+E*m)}},arc:function(s,l,u,c,f,h){s=+s,l=+l,u=+u,h=!!h;var d=u*Math.cos(c),v=u*Math.sin(c),m=s+d,b=l+v,p=1^h,k=h?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+m+","+b:(Math.abs(this._x1-m)>n||Math.abs(this._y1-b)>n)&&(this._+="L"+m+","+b),u&&(k<0&&(k=k%r+r),k>i?this._+="A"+u+","+u+",0,1,"+p+","+(s-d)+","+(l-v)+"A"+u+","+u+",0,1,"+p+","+(this._x1=m)+","+(this._y1=b):k>n&&(this._+="A"+u+","+u+",0,"+ +(k>=t)+","+p+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var $J=ye((k7,YWe)=>{(function(e,t){typeof k7=="object"&&typeof YWe!="undefined"?t(k7,ZWe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(k7,function(e,t){"use strict";function r(Ct){return function(){return Ct}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,d=2*f;function v(Ct){return Ct>1?0:Ct<-1?f:Math.acos(Ct)}function m(Ct){return Ct>=1?h:Ct<=-1?-h:Math.asin(Ct)}function b(Ct){return Ct.innerRadius}function p(Ct){return Ct.outerRadius}function k(Ct){return Ct.startAngle}function M(Ct){return Ct.endAngle}function T(Ct){return Ct&&Ct.padAngle}function L(Ct,Ar,Jr,hi,hn,Sn,En,ki){var _n=Jr-Ct,ya=hi-Ar,ea=En-hn,Ma=ki-Sn,_o=Ma*_n-ea*ya;if(!(_o*_o<c))return _o=(ea*(Ar-Sn)-Ma*(Ct-hn))/_o,[Ct+_o*_n,Ar+_o*ya]}function x(Ct,Ar,Jr,hi,hn,Sn,En){var ki=Ct-Jr,_n=Ar-hi,ya=(En?Sn:-Sn)/u(ki*ki+_n*_n),ea=ya*_n,Ma=-ya*ki,_o=Ct+ea,No=Ar+Ma,po=Jr+ea,Lo=hi+Ma,ko=(_o+po)/2,Ds=(No+Lo)/2,Fs=po-_o,ll=Lo-No,ul=Fs*Fs+ll*ll,zl=hn-Sn,us=_o*Lo-po*No,il=(ll<0?-1:1)*u(o(0,zl*zl*ul-us*us)),As=(us*ll-Fs*il)/ul,cl=(-us*Fs-ll*il)/ul,Ks=(us*ll+Fs*il)/ul,zs=(-us*Fs+ll*il)/ul,Io=As-ko,ls=cl-Ds,Yl=Ks-ko,Su=zs-Ds;return Io*Io+ls*ls>Yl*Yl+Su*Su&&(As=Ks,cl=zs),{cx:As,cy:cl,x01:-ea,y01:-Ma,x11:As*(hn/zl-1),y11:cl*(hn/zl-1)}}function C(){var Ct=b,Ar=p,Jr=r(0),hi=null,hn=k,Sn=M,En=T,ki=null;function _n(){var ya,ea,Ma=+Ct.apply(this,arguments),_o=+Ar.apply(this,arguments),No=hn.apply(this,arguments)-h,po=Sn.apply(this,arguments)-h,Lo=n(po-No),ko=po>No;if(ki||(ki=ya=t.path()),_o<Ma&&(ea=_o,_o=Ma,Ma=ea),!(_o>c))ki.moveTo(0,0);else if(Lo>d-c)ki.moveTo(_o*a(No),_o*l(No)),ki.arc(0,0,_o,No,po,!ko),Ma>c&&(ki.moveTo(Ma*a(po),Ma*l(po)),ki.arc(0,0,Ma,po,No,ko));else{var Ds=No,Fs=po,ll=No,ul=po,zl=Lo,us=Lo,il=En.apply(this,arguments)/2,As=il>c&&(hi?+hi.apply(this,arguments):u(Ma*Ma+_o*_o)),cl=s(n(_o-Ma)/2,+Jr.apply(this,arguments)),Ks=cl,zs=cl,Io,ls;if(As>c){var Yl=m(As/Ma*l(il)),Su=m(As/_o*l(il));(zl-=Yl*2)>c?(Yl*=ko?1:-1,ll+=Yl,ul-=Yl):(zl=0,ll=ul=(No+po)/2),(us-=Su*2)>c?(Su*=ko?1:-1,Ds+=Su,Fs-=Su):(us=0,Ds=Fs=(No+po)/2)}var nc=_o*a(Ds),bs=_o*l(Ds),Rn=Ma*a(ul),_a=Ma*l(ul);if(cl>c){var Vu=_o*a(Fs),ql=_o*l(Fs),xo=Ma*a(ll),Kl=Ma*l(ll),Ns;if(Lo<f&&(Ns=L(nc,bs,xo,Kl,Vu,ql,Rn,_a))){var Hl=nc-Ns[0],ac=bs-Ns[1],oa=Vu-Ns[0],qo=ql-Ns[1],Oo=1/l(v((Hl*oa+ac*qo)/(u(Hl*Hl+ac*ac)*u(oa*oa+qo*qo)))/2),Ol=u(Ns[0]*Ns[0]+Ns[1]*Ns[1]);Ks=s(cl,(Ma-Ol)/(Oo-1)),zs=s(cl,(_o-Ol)/(Oo+1))}}us>c?zs>c?(Io=x(xo,Kl,nc,bs,_o,zs,ko),ls=x(Vu,ql,Rn,_a,_o,zs,ko),ki.moveTo(Io.cx+Io.x01,Io.cy+Io.y01),zs<cl?ki.arc(Io.cx,Io.cy,zs,i(Io.y01,Io.x01),i(ls.y01,ls.x01),!ko):(ki.arc(Io.cx,Io.cy,zs,i(Io.y01,Io.x01),i(Io.y11,Io.x11),!ko),ki.arc(0,0,_o,i(Io.cy+Io.y11,Io.cx+Io.x11),i(ls.cy+ls.y11,ls.cx+ls.x11),!ko),ki.arc(ls.cx,ls.cy,zs,i(ls.y11,ls.x11),i(ls.y01,ls.x01),!ko))):(ki.moveTo(nc,bs),ki.arc(0,0,_o,Ds,Fs,!ko)):ki.moveTo(nc,bs),!(Ma>c)||!(zl>c)?ki.lineTo(Rn,_a):Ks>c?(Io=x(Rn,_a,Vu,ql,Ma,-Ks,ko),ls=x(nc,bs,xo,Kl,Ma,-Ks,ko),ki.lineTo(Io.cx+Io.x01,Io.cy+Io.y01),Ks<cl?ki.arc(Io.cx,Io.cy,Ks,i(Io.y01,Io.x01),i(ls.y01,ls.x01),!ko):(ki.arc(Io.cx,Io.cy,Ks,i(Io.y01,Io.x01),i(Io.y11,Io.x11),!ko),ki.arc(0,0,Ma,i(Io.cy+Io.y11,Io.cx+Io.x11),i(ls.cy+ls.y11,ls.cx+ls.x11),ko),ki.arc(ls.cx,ls.cy,Ks,i(ls.y11,ls.x11),i(ls.y01,ls.x01),!ko))):ki.arc(0,0,Ma,ul,ll,ko)}if(ki.closePath(),ya)return ki=null,ya+""||null}return _n.centroid=function(){var ya=(+Ct.apply(this,arguments)+ +Ar.apply(this,arguments))/2,ea=(+hn.apply(this,arguments)+ +Sn.apply(this,arguments))/2-f/2;return[a(ea)*ya,l(ea)*ya]},_n.innerRadius=function(ya){return arguments.length?(Ct=typeof ya=="function"?ya:r(+ya),_n):Ct},_n.outerRadius=function(ya){return arguments.length?(Ar=typeof ya=="function"?ya:r(+ya),_n):Ar},_n.cornerRadius=function(ya){return arguments.length?(Jr=typeof ya=="function"?ya:r(+ya),_n):Jr},_n.padRadius=function(ya){return arguments.length?(hi=ya==null?null:typeof ya=="function"?ya:r(+ya),_n):hi},_n.startAngle=function(ya){return arguments.length?(hn=typeof ya=="function"?ya:r(+ya),_n):hn},_n.endAngle=function(ya){return arguments.length?(Sn=typeof ya=="function"?ya:r(+ya),_n):Sn},_n.padAngle=function(ya){return arguments.length?(En=typeof ya=="function"?ya:r(+ya),_n):En},_n.context=function(ya){return arguments.length?(ki=ya==null?null:ya,_n):ki},_n}function S(Ct){this._context=Ct}S.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(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Ar):this._context.moveTo(Ct,Ar);break;case 1:this._point=2;default:this._context.lineTo(Ct,Ar);break}}};function g(Ct){return new S(Ct)}function P(Ct){return Ct[0]}function E(Ct){return Ct[1]}function z(){var Ct=P,Ar=E,Jr=r(!0),hi=null,hn=g,Sn=null;function En(ki){var _n,ya=ki.length,ea,Ma=!1,_o;for(hi==null&&(Sn=hn(_o=t.path())),_n=0;_n<=ya;++_n)!(_n<ya&&Jr(ea=ki[_n],_n,ki))===Ma&&((Ma=!Ma)?Sn.lineStart():Sn.lineEnd()),Ma&&Sn.point(+Ct(ea,_n,ki),+Ar(ea,_n,ki));if(_o)return Sn=null,_o+""||null}return En.x=function(ki){return arguments.length?(Ct=typeof ki=="function"?ki:r(+ki),En):Ct},En.y=function(ki){return arguments.length?(Ar=typeof ki=="function"?ki:r(+ki),En):Ar},En.defined=function(ki){return arguments.length?(Jr=typeof ki=="function"?ki:r(!!ki),En):Jr},En.curve=function(ki){return arguments.length?(hn=ki,hi!=null&&(Sn=hn(hi)),En):hn},En.context=function(ki){return arguments.length?(ki==null?hi=Sn=null:Sn=hn(hi=ki),En):hi},En}function q(){var Ct=P,Ar=null,Jr=r(0),hi=E,hn=r(!0),Sn=null,En=g,ki=null;function _n(ea){var Ma,_o,No,po=ea.length,Lo,ko=!1,Ds,Fs=new Array(po),ll=new Array(po);for(Sn==null&&(ki=En(Ds=t.path())),Ma=0;Ma<=po;++Ma){if(!(Ma<po&&hn(Lo=ea[Ma],Ma,ea))===ko)if(ko=!ko)_o=Ma,ki.areaStart(),ki.lineStart();else{for(ki.lineEnd(),ki.lineStart(),No=Ma-1;No>=_o;--No)ki.point(Fs[No],ll[No]);ki.lineEnd(),ki.areaEnd()}ko&&(Fs[Ma]=+Ct(Lo,Ma,ea),ll[Ma]=+Jr(Lo,Ma,ea),ki.point(Ar?+Ar(Lo,Ma,ea):Fs[Ma],hi?+hi(Lo,Ma,ea):ll[Ma]))}if(Ds)return ki=null,Ds+""||null}function ya(){return z().defined(hn).curve(En).context(Sn)}return _n.x=function(ea){return arguments.length?(Ct=typeof ea=="function"?ea:r(+ea),Ar=null,_n):Ct},_n.x0=function(ea){return arguments.length?(Ct=typeof ea=="function"?ea:r(+ea),_n):Ct},_n.x1=function(ea){return arguments.length?(Ar=ea==null?null:typeof ea=="function"?ea:r(+ea),_n):Ar},_n.y=function(ea){return arguments.length?(Jr=typeof ea=="function"?ea:r(+ea),hi=null,_n):Jr},_n.y0=function(ea){return arguments.length?(Jr=typeof ea=="function"?ea:r(+ea),_n):Jr},_n.y1=function(ea){return arguments.length?(hi=ea==null?null:typeof ea=="function"?ea:r(+ea),_n):hi},_n.lineX0=_n.lineY0=function(){return ya().x(Ct).y(Jr)},_n.lineY1=function(){return ya().x(Ct).y(hi)},_n.lineX1=function(){return ya().x(Ar).y(Jr)},_n.defined=function(ea){return arguments.length?(hn=typeof ea=="function"?ea:r(!!ea),_n):hn},_n.curve=function(ea){return arguments.length?(En=ea,Sn!=null&&(ki=En(Sn)),_n):En},_n.context=function(ea){return arguments.length?(ea==null?Sn=ki=null:ki=En(Sn=ea),_n):Sn},_n}function U(Ct,Ar){return Ar<Ct?-1:Ar>Ct?1:Ar>=Ct?0:NaN}function G(Ct){return Ct}function Z(){var Ct=G,Ar=U,Jr=null,hi=r(0),hn=r(d),Sn=r(0);function En(ki){var _n,ya=ki.length,ea,Ma,_o=0,No=new Array(ya),po=new Array(ya),Lo=+hi.apply(this,arguments),ko=Math.min(d,Math.max(-d,hn.apply(this,arguments)-Lo)),Ds,Fs=Math.min(Math.abs(ko)/ya,Sn.apply(this,arguments)),ll=Fs*(ko<0?-1:1),ul;for(_n=0;_n<ya;++_n)(ul=po[No[_n]=_n]=+Ct(ki[_n],_n,ki))>0&&(_o+=ul);for(Ar!=null?No.sort(function(zl,us){return Ar(po[zl],po[us])}):Jr!=null&&No.sort(function(zl,us){return Jr(ki[zl],ki[us])}),_n=0,Ma=_o?(ko-ya*ll)/_o:0;_n<ya;++_n,Lo=Ds)ea=No[_n],ul=po[ea],Ds=Lo+(ul>0?ul*Ma:0)+ll,po[ea]={data:ki[ea],index:_n,value:ul,startAngle:Lo,endAngle:Ds,padAngle:Fs};return po}return En.value=function(ki){return arguments.length?(Ct=typeof ki=="function"?ki:r(+ki),En):Ct},En.sortValues=function(ki){return arguments.length?(Ar=ki,Jr=null,En):Ar},En.sort=function(ki){return arguments.length?(Jr=ki,Ar=null,En):Jr},En.startAngle=function(ki){return arguments.length?(hi=typeof ki=="function"?ki:r(+ki),En):hi},En.endAngle=function(ki){return arguments.length?(hn=typeof ki=="function"?ki:r(+ki),En):hn},En.padAngle=function(ki){return arguments.length?(Sn=typeof ki=="function"?ki:r(+ki),En):Sn},En}var j=H(g);function N(Ct){this._curve=Ct}N.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Ct,Ar){this._curve.point(Ar*Math.sin(Ct),Ar*-Math.cos(Ct))}};function H(Ct){function Ar(Jr){return new N(Ct(Jr))}return Ar._curve=Ct,Ar}function re(Ct){var Ar=Ct.curve;return Ct.angle=Ct.x,delete Ct.x,Ct.radius=Ct.y,delete Ct.y,Ct.curve=function(Jr){return arguments.length?Ar(H(Jr)):Ar()._curve},Ct}function oe(){return re(z().curve(j))}function _e(){var Ct=q().curve(j),Ar=Ct.curve,Jr=Ct.lineX0,hi=Ct.lineX1,hn=Ct.lineY0,Sn=Ct.lineY1;return Ct.angle=Ct.x,delete Ct.x,Ct.startAngle=Ct.x0,delete Ct.x0,Ct.endAngle=Ct.x1,delete Ct.x1,Ct.radius=Ct.y,delete Ct.y,Ct.innerRadius=Ct.y0,delete Ct.y0,Ct.outerRadius=Ct.y1,delete Ct.y1,Ct.lineStartAngle=function(){return re(Jr())},delete Ct.lineX0,Ct.lineEndAngle=function(){return re(hi())},delete Ct.lineX1,Ct.lineInnerRadius=function(){return re(hn())},delete Ct.lineY0,Ct.lineOuterRadius=function(){return re(Sn())},delete Ct.lineY1,Ct.curve=function(En){return arguments.length?Ar(H(En)):Ar()._curve},Ct}function ke(Ct,Ar){return[(Ar=+Ar)*Math.cos(Ct-=Math.PI/2),Ar*Math.sin(Ct)]}var Ce=Array.prototype.slice;function ge(Ct){return Ct.source}function ie(Ct){return Ct.target}function Se(Ct){var Ar=ge,Jr=ie,hi=P,hn=E,Sn=null;function En(){var ki,_n=Ce.call(arguments),ya=Ar.apply(this,_n),ea=Jr.apply(this,_n);if(Sn||(Sn=ki=t.path()),Ct(Sn,+hi.apply(this,(_n[0]=ya,_n)),+hn.apply(this,_n),+hi.apply(this,(_n[0]=ea,_n)),+hn.apply(this,_n)),ki)return Sn=null,ki+""||null}return En.source=function(ki){return arguments.length?(Ar=ki,En):Ar},En.target=function(ki){return arguments.length?(Jr=ki,En):Jr},En.x=function(ki){return arguments.length?(hi=typeof ki=="function"?ki:r(+ki),En):hi},En.y=function(ki){return arguments.length?(hn=typeof ki=="function"?ki:r(+ki),En):hn},En.context=function(ki){return arguments.length?(Sn=ki==null?null:ki,En):Sn},En}function Ee(Ct,Ar,Jr,hi,hn){Ct.moveTo(Ar,Jr),Ct.bezierCurveTo(Ar=(Ar+hi)/2,Jr,Ar,hn,hi,hn)}function we(Ct,Ar,Jr,hi,hn){Ct.moveTo(Ar,Jr),Ct.bezierCurveTo(Ar,Jr=(Jr+hn)/2,hi,Jr,hi,hn)}function De(Ct,Ar,Jr,hi,hn){var Sn=ke(Ar,Jr),En=ke(Ar,Jr=(Jr+hn)/2),ki=ke(hi,Jr),_n=ke(hi,hn);Ct.moveTo(Sn[0],Sn[1]),Ct.bezierCurveTo(En[0],En[1],ki[0],ki[1],_n[0],_n[1])}function Le(){return Se(Ee)}function me(){return Se(we)}function Pe(){var Ct=Se(De);return Ct.angle=Ct.x,delete Ct.x,Ct.radius=Ct.y,delete Ct.y,Ct}var ce={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar/f);Ct.moveTo(Jr,0),Ct.arc(0,0,Jr,0,d)}},He={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar/5)/2;Ct.moveTo(-3*Jr,-Jr),Ct.lineTo(-Jr,-Jr),Ct.lineTo(-Jr,-3*Jr),Ct.lineTo(Jr,-3*Jr),Ct.lineTo(Jr,-Jr),Ct.lineTo(3*Jr,-Jr),Ct.lineTo(3*Jr,Jr),Ct.lineTo(Jr,Jr),Ct.lineTo(Jr,3*Jr),Ct.lineTo(-Jr,3*Jr),Ct.lineTo(-Jr,Jr),Ct.lineTo(-3*Jr,Jr),Ct.closePath()}},lt=Math.sqrt(1/3),mt=lt*2,Vt={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar/mt),hi=Jr*lt;Ct.moveTo(0,-Jr),Ct.lineTo(hi,0),Ct.lineTo(0,Jr),Ct.lineTo(-hi,0),Ct.closePath()}},st=.8908130915292852,ct=Math.sin(f/10)/Math.sin(7*f/10),Qt=Math.sin(d/10)*ct,Ht=-Math.cos(d/10)*ct,nr={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar*st),hi=Qt*Jr,hn=Ht*Jr;Ct.moveTo(0,-Jr),Ct.lineTo(hi,hn);for(var Sn=1;Sn<5;++Sn){var En=d*Sn/5,ki=Math.cos(En),_n=Math.sin(En);Ct.lineTo(_n*Jr,-ki*Jr),Ct.lineTo(ki*hi-_n*hn,_n*hi+ki*hn)}Ct.closePath()}},tt={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar),hi=-Jr/2;Ct.rect(hi,hi,Jr,Jr)}},je=Math.sqrt(3),Ue={draw:function(Ct,Ar){var Jr=-Math.sqrt(Ar/(je*3));Ct.moveTo(0,Jr*2),Ct.lineTo(-je*Jr,-Jr),Ct.lineTo(je*Jr,-Jr),Ct.closePath()}},Ae=-.5,rt=Math.sqrt(3)/2,St=1/Math.sqrt(12),Tt=(St/2+1)*3,dt={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar/Tt),hi=Jr/2,hn=Jr*St,Sn=hi,En=Jr*St+Jr,ki=-Sn,_n=En;Ct.moveTo(hi,hn),Ct.lineTo(Sn,En),Ct.lineTo(ki,_n),Ct.lineTo(Ae*hi-rt*hn,rt*hi+Ae*hn),Ct.lineTo(Ae*Sn-rt*En,rt*Sn+Ae*En),Ct.lineTo(Ae*ki-rt*_n,rt*ki+Ae*_n),Ct.lineTo(Ae*hi+rt*hn,Ae*hn-rt*hi),Ct.lineTo(Ae*Sn+rt*En,Ae*En-rt*Sn),Ct.lineTo(Ae*ki+rt*_n,Ae*_n-rt*ki),Ct.closePath()}},Et=[ce,He,Vt,tt,nr,Ue,dt];function pt(){var Ct=r(ce),Ar=r(64),Jr=null;function hi(){var hn;if(Jr||(Jr=hn=t.path()),Ct.apply(this,arguments).draw(Jr,+Ar.apply(this,arguments)),hn)return Jr=null,hn+""||null}return hi.type=function(hn){return arguments.length?(Ct=typeof hn=="function"?hn:r(hn),hi):Ct},hi.size=function(hn){return arguments.length?(Ar=typeof hn=="function"?hn:r(+hn),hi):Ar},hi.context=function(hn){return arguments.length?(Jr=hn==null?null:hn,hi):Jr},hi}function Xt(){}function or(Ct,Ar,Jr){Ct._context.bezierCurveTo((2*Ct._x0+Ct._x1)/3,(2*Ct._y0+Ct._y1)/3,(Ct._x0+2*Ct._x1)/3,(Ct._y0+2*Ct._y1)/3,(Ct._x0+4*Ct._x1+Ar)/6,(Ct._y0+4*Ct._y1+Jr)/6)}function _r(Ct){this._context=Ct}_r.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:or(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(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Ar):this._context.moveTo(Ct,Ar);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:or(this,Ct,Ar);break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Ar}};function Er(Ct){return new _r(Ct)}function ei(Ct){this._context=Ct}ei.prototype={areaStart:Xt,areaEnd:Xt,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(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1,this._x2=Ct,this._y2=Ar;break;case 1:this._point=2,this._x3=Ct,this._y3=Ar;break;case 2:this._point=3,this._x4=Ct,this._y4=Ar,this._context.moveTo((this._x0+4*this._x1+Ct)/6,(this._y0+4*this._y1+Ar)/6);break;default:or(this,Ct,Ar);break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Ar}};function qr(Ct){return new ei(Ct)}function jr(Ct){this._context=Ct}jr.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(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Jr=(this._x0+4*this._x1+Ct)/6,hi=(this._y0+4*this._y1+Ar)/6;this._line?this._context.lineTo(Jr,hi):this._context.moveTo(Jr,hi);break;case 3:this._point=4;default:or(this,Ct,Ar);break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Ar}};function gt(Ct){return new jr(Ct)}function Ge(Ct,Ar){this._basis=new _r(Ct),this._beta=Ar}Ge.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Ct=this._x,Ar=this._y,Jr=Ct.length-1;if(Jr>0)for(var hi=Ct[0],hn=Ar[0],Sn=Ct[Jr]-hi,En=Ar[Jr]-hn,ki=-1,_n;++ki<=Jr;)_n=ki/Jr,this._basis.point(this._beta*Ct[ki]+(1-this._beta)*(hi+_n*Sn),this._beta*Ar[ki]+(1-this._beta)*(hn+_n*En));this._x=this._y=null,this._basis.lineEnd()},point:function(Ct,Ar){this._x.push(+Ct),this._y.push(+Ar)}};var Je=function Ct(Ar){function Jr(hi){return Ar===1?new _r(hi):new Ge(hi,Ar)}return Jr.beta=function(hi){return Ct(+hi)},Jr}(.85);function We(Ct,Ar,Jr){Ct._context.bezierCurveTo(Ct._x1+Ct._k*(Ct._x2-Ct._x0),Ct._y1+Ct._k*(Ct._y2-Ct._y0),Ct._x2+Ct._k*(Ct._x1-Ar),Ct._y2+Ct._k*(Ct._y1-Jr),Ct._x2,Ct._y2)}function et(Ct,Ar){this._context=Ct,this._k=(1-Ar)/6}et.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:We(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Ar):this._context.moveTo(Ct,Ar);break;case 1:this._point=2,this._x1=Ct,this._y1=Ar;break;case 2:this._point=3;default:We(this,Ct,Ar);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var xt=function Ct(Ar){function Jr(hi){return new et(hi,Ar)}return Jr.tension=function(hi){return Ct(+hi)},Jr}(0);function At(Ct,Ar){this._context=Ct,this._k=(1-Ar)/6}At.prototype={areaStart:Xt,areaEnd:Xt,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(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1,this._x3=Ct,this._y3=Ar;break;case 1:this._point=2,this._context.moveTo(this._x4=Ct,this._y4=Ar);break;case 2:this._point=3,this._x5=Ct,this._y5=Ar;break;default:We(this,Ct,Ar);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var Kt=function Ct(Ar){function Jr(hi){return new At(hi,Ar)}return Jr.tension=function(hi){return Ct(+hi)},Jr}(0);function er(Ct,Ar){this._context=Ct,this._k=(1-Ar)/6}er.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(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:We(this,Ct,Ar);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var Sr=function Ct(Ar){function Jr(hi){return new er(hi,Ar)}return Jr.tension=function(hi){return Ct(+hi)},Jr}(0);function Gr(Ct,Ar,Jr){var hi=Ct._x1,hn=Ct._y1,Sn=Ct._x2,En=Ct._y2;if(Ct._l01_a>c){var ki=2*Ct._l01_2a+3*Ct._l01_a*Ct._l12_a+Ct._l12_2a,_n=3*Ct._l01_a*(Ct._l01_a+Ct._l12_a);hi=(hi*ki-Ct._x0*Ct._l12_2a+Ct._x2*Ct._l01_2a)/_n,hn=(hn*ki-Ct._y0*Ct._l12_2a+Ct._y2*Ct._l01_2a)/_n}if(Ct._l23_a>c){var ya=2*Ct._l23_2a+3*Ct._l23_a*Ct._l12_a+Ct._l12_2a,ea=3*Ct._l23_a*(Ct._l23_a+Ct._l12_a);Sn=(Sn*ya+Ct._x1*Ct._l23_2a-Ar*Ct._l12_2a)/ea,En=(En*ya+Ct._y1*Ct._l23_2a-Jr*Ct._l12_2a)/ea}Ct._context.bezierCurveTo(hi,hn,Sn,En,Ct._x2,Ct._y2)}function Ir(Ct,Ar){this._context=Ct,this._alpha=Ar}Ir.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(Ct,Ar){if(Ct=+Ct,Ar=+Ar,this._point){var Jr=this._x2-Ct,hi=this._y2-Ar;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+hi*hi,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Ar):this._context.moveTo(Ct,Ar);break;case 1:this._point=2;break;case 2:this._point=3;default:Gr(this,Ct,Ar);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=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var Yr=function Ct(Ar){function Jr(hi){return Ar?new Ir(hi,Ar):new et(hi,0)}return Jr.alpha=function(hi){return Ct(+hi)},Jr}(.5);function _i(Ct,Ar){this._context=Ct,this._alpha=Ar}_i.prototype={areaStart:Xt,areaEnd:Xt,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(Ct,Ar){if(Ct=+Ct,Ar=+Ar,this._point){var Jr=this._x2-Ct,hi=this._y2-Ar;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+hi*hi,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Ct,this._y3=Ar;break;case 1:this._point=2,this._context.moveTo(this._x4=Ct,this._y4=Ar);break;case 2:this._point=3,this._x5=Ct,this._y5=Ar;break;default:Gr(this,Ct,Ar);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=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var Pi=function Ct(Ar){function Jr(hi){return Ar?new _i(hi,Ar):new At(hi,0)}return Jr.alpha=function(hi){return Ct(+hi)},Jr}(.5);function ai(Ct,Ar){this._context=Ct,this._alpha=Ar}ai.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(Ct,Ar){if(Ct=+Ct,Ar=+Ar,this._point){var Jr=this._x2-Ct,hi=this._y2-Ar;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+hi*hi,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:Gr(this,Ct,Ar);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=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var mi=function Ct(Ar){function Jr(hi){return Ar?new ai(hi,Ar):new er(hi,0)}return Jr.alpha=function(hi){return Ct(+hi)},Jr}(.5);function un(Ct){this._context=Ct}un.prototype={areaStart:Xt,areaEnd:Xt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Ct,Ar){Ct=+Ct,Ar=+Ar,this._point?this._context.lineTo(Ct,Ar):(this._point=1,this._context.moveTo(Ct,Ar))}};function Fn(Ct){return new un(Ct)}function An(Ct){return Ct<0?-1:1}function Hn(Ct,Ar,Jr){var hi=Ct._x1-Ct._x0,hn=Ar-Ct._x1,Sn=(Ct._y1-Ct._y0)/(hi||hn<0&&-0),En=(Jr-Ct._y1)/(hn||hi<0&&-0),ki=(Sn*hn+En*hi)/(hi+hn);return(An(Sn)+An(En))*Math.min(Math.abs(Sn),Math.abs(En),.5*Math.abs(ki))||0}function Qn(Ct,Ar){var Jr=Ct._x1-Ct._x0;return Jr?(3*(Ct._y1-Ct._y0)/Jr-Ar)/2:Ar}function Vi(Ct,Ar,Jr){var hi=Ct._x0,hn=Ct._y0,Sn=Ct._x1,En=Ct._y1,ki=(Sn-hi)/3;Ct._context.bezierCurveTo(hi+ki,hn+ki*Ar,Sn-ki,En-ki*Jr,Sn,En)}function Kn(Ct){this._context=Ct}Kn.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:Vi(this,this._t0,Qn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Ar){var Jr=NaN;if(Ct=+Ct,Ar=+Ar,!(Ct===this._x1&&Ar===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Ar):this._context.moveTo(Ct,Ar);break;case 1:this._point=2;break;case 2:this._point=3,Vi(this,Qn(this,Jr=Hn(this,Ct,Ar)),Jr);break;default:Vi(this,this._t0,Jr=Hn(this,Ct,Ar));break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Ar,this._t0=Jr}}};function Jn(Ct){this._context=new Gt(Ct)}(Jn.prototype=Object.create(Kn.prototype)).point=function(Ct,Ar){Kn.prototype.point.call(this,Ar,Ct)};function Gt(Ct){this._context=Ct}Gt.prototype={moveTo:function(Ct,Ar){this._context.moveTo(Ar,Ct)},closePath:function(){this._context.closePath()},lineTo:function(Ct,Ar){this._context.lineTo(Ar,Ct)},bezierCurveTo:function(Ct,Ar,Jr,hi,hn,Sn){this._context.bezierCurveTo(Ar,Ct,hi,Jr,Sn,hn)}};function wt(Ct){return new Kn(Ct)}function rr(Ct){return new Jn(Ct)}function ir(Ct){this._context=Ct}ir.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Ct=this._x,Ar=this._y,Jr=Ct.length;if(Jr)if(this._line?this._context.lineTo(Ct[0],Ar[0]):this._context.moveTo(Ct[0],Ar[0]),Jr===2)this._context.lineTo(Ct[1],Ar[1]);else for(var hi=wr(Ct),hn=wr(Ar),Sn=0,En=1;En<Jr;++Sn,++En)this._context.bezierCurveTo(hi[0][Sn],hn[0][Sn],hi[1][Sn],hn[1][Sn],Ct[En],Ar[En]);(this._line||this._line!==0&&Jr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(Ct,Ar){this._x.push(+Ct),this._y.push(+Ar)}};function wr(Ct){var Ar,Jr=Ct.length-1,hi,hn=new Array(Jr),Sn=new Array(Jr),En=new Array(Jr);for(hn[0]=0,Sn[0]=2,En[0]=Ct[0]+2*Ct[1],Ar=1;Ar<Jr-1;++Ar)hn[Ar]=1,Sn[Ar]=4,En[Ar]=4*Ct[Ar]+2*Ct[Ar+1];for(hn[Jr-1]=2,Sn[Jr-1]=7,En[Jr-1]=8*Ct[Jr-1]+Ct[Jr],Ar=1;Ar<Jr;++Ar)hi=hn[Ar]/Sn[Ar-1],Sn[Ar]-=hi,En[Ar]-=hi*En[Ar-1];for(hn[Jr-1]=En[Jr-1]/Sn[Jr-1],Ar=Jr-2;Ar>=0;--Ar)hn[Ar]=(En[Ar]-hn[Ar+1])/Sn[Ar];for(Sn[Jr-1]=(Ct[Jr]+hn[Jr-1])/2,Ar=0;Ar<Jr-1;++Ar)Sn[Ar]=2*Ct[Ar+1]-hn[Ar+1];return[hn,Sn]}function Xr(Ct){return new ir(Ct)}function ti(Ct,Ar){this._context=Ct,this._t=Ar}ti.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(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Ar):this._context.moveTo(Ct,Ar);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Ar),this._context.lineTo(Ct,Ar);else{var Jr=this._x*(1-this._t)+Ct*this._t;this._context.lineTo(Jr,this._y),this._context.lineTo(Jr,Ar)}break}}this._x=Ct,this._y=Ar}};function $r(Ct){return new ti(Ct,.5)}function Ri(Ct){return new ti(Ct,0)}function Zi(Ct){return new ti(Ct,1)}function en(Ct,Ar){if((En=Ct.length)>1)for(var Jr=1,hi,hn,Sn=Ct[Ar[0]],En,ki=Sn.length;Jr<En;++Jr)for(hn=Sn,Sn=Ct[Ar[Jr]],hi=0;hi<ki;++hi)Sn[hi][1]+=Sn[hi][0]=isNaN(hn[hi][1])?hn[hi][0]:hn[hi][1]}function fn(Ct){for(var Ar=Ct.length,Jr=new Array(Ar);--Ar>=0;)Jr[Ar]=Ar;return Jr}function yn(Ct,Ar){return Ct[Ar]}function Mn(){var Ct=r([]),Ar=fn,Jr=en,hi=yn;function hn(Sn){var En=Ct.apply(this,arguments),ki,_n=Sn.length,ya=En.length,ea=new Array(ya),Ma;for(ki=0;ki<ya;++ki){for(var _o=En[ki],No=ea[ki]=new Array(_n),po=0,Lo;po<_n;++po)No[po]=Lo=[0,+hi(Sn[po],_o,po,Sn)],Lo.data=Sn[po];No.key=_o}for(ki=0,Ma=Ar(ea);ki<ya;++ki)ea[Ma[ki]].index=ki;return Jr(ea,Ma),ea}return hn.keys=function(Sn){return arguments.length?(Ct=typeof Sn=="function"?Sn:r(Ce.call(Sn)),hn):Ct},hn.value=function(Sn){return arguments.length?(hi=typeof Sn=="function"?Sn:r(+Sn),hn):hi},hn.order=function(Sn){return arguments.length?(Ar=Sn==null?fn:typeof Sn=="function"?Sn:r(Ce.call(Sn)),hn):Ar},hn.offset=function(Sn){return arguments.length?(Jr=Sn==null?en:Sn,hn):Jr},hn}function Ba(Ct,Ar){if((hi=Ct.length)>0){for(var Jr,hi,hn=0,Sn=Ct[0].length,En;hn<Sn;++hn){for(En=Jr=0;Jr<hi;++Jr)En+=Ct[Jr][hn][1]||0;if(En)for(Jr=0;Jr<hi;++Jr)Ct[Jr][hn][1]/=En}en(Ct,Ar)}}function ua(Ct,Ar){if((_n=Ct.length)>0)for(var Jr,hi=0,hn,Sn,En,ki,_n,ya=Ct[Ar[0]].length;hi<ya;++hi)for(En=ki=0,Jr=0;Jr<_n;++Jr)(Sn=(hn=Ct[Ar[Jr]][hi])[1]-hn[0])>0?(hn[0]=En,hn[1]=En+=Sn):Sn<0?(hn[1]=ki,hn[0]=ki+=Sn):(hn[0]=0,hn[1]=Sn)}function ma(Ct,Ar){if((hn=Ct.length)>0){for(var Jr=0,hi=Ct[Ar[0]],hn,Sn=hi.length;Jr<Sn;++Jr){for(var En=0,ki=0;En<hn;++En)ki+=Ct[En][Jr][1]||0;hi[Jr][1]+=hi[Jr][0]=-ki/2}en(Ct,Ar)}}function Wa(Ct,Ar){if(!(!((En=Ct.length)>0)||!((Sn=(hn=Ct[Ar[0]]).length)>0))){for(var Jr=0,hi=1,hn,Sn,En;hi<Sn;++hi){for(var ki=0,_n=0,ya=0;ki<En;++ki){for(var ea=Ct[Ar[ki]],Ma=ea[hi][1]||0,_o=ea[hi-1][1]||0,No=(Ma-_o)/2,po=0;po<ki;++po){var Lo=Ct[Ar[po]],ko=Lo[hi][1]||0,Ds=Lo[hi-1][1]||0;No+=ko-Ds}_n+=Ma,ya+=No*Ma}hn[hi-1][1]+=hn[hi-1][0]=Jr,_n&&(Jr-=ya/_n)}hn[hi-1][1]+=hn[hi-1][0]=Jr,en(Ct,Ar)}}function Fa(Ct){var Ar=Ct.map(Xo);return fn(Ct).sort(function(Jr,hi){return Ar[Jr]-Ar[hi]})}function Xo(Ct){for(var Ar=-1,Jr=0,hi=Ct.length,hn,Sn=-1/0;++Ar<hi;)(hn=+Ct[Ar][1])>Sn&&(Sn=hn,Jr=Ar);return Jr}function da(Ct){var Ar=Ct.map(jn);return fn(Ct).sort(function(Jr,hi){return Ar[Jr]-Ar[hi]})}function jn(Ct){for(var Ar=0,Jr=-1,hi=Ct.length,hn;++Jr<hi;)(hn=+Ct[Jr][1])&&(Ar+=hn);return Ar}function Ha(Ct){return da(Ct).reverse()}function vo(Ct){var Ar=Ct.length,Jr,hi,hn=Ct.map(jn),Sn=Fa(Ct),En=0,ki=0,_n=[],ya=[];for(Jr=0;Jr<Ar;++Jr)hi=Sn[Jr],En<ki?(En+=hn[hi],_n.push(hi)):(ki+=hn[hi],ya.push(hi));return ya.reverse().concat(_n)}function Gn(Ct){return fn(Ct).reverse()}e.arc=C,e.area=q,e.areaRadial=_e,e.curveBasis=Er,e.curveBasisClosed=qr,e.curveBasisOpen=gt,e.curveBundle=Je,e.curveCardinal=xt,e.curveCardinalClosed=Kt,e.curveCardinalOpen=Sr,e.curveCatmullRom=Yr,e.curveCatmullRomClosed=Pi,e.curveCatmullRomOpen=mi,e.curveLinear=g,e.curveLinearClosed=Fn,e.curveMonotoneX=wt,e.curveMonotoneY=rr,e.curveNatural=Xr,e.curveStep=$r,e.curveStepAfter=Zi,e.curveStepBefore=Ri,e.line=z,e.lineRadial=oe,e.linkHorizontal=Le,e.linkRadial=Pe,e.linkVertical=me,e.pie=Z,e.pointRadial=ke,e.radialArea=_e,e.radialLine=oe,e.stack=Mn,e.stackOffsetDiverging=ua,e.stackOffsetExpand=Ba,e.stackOffsetNone=en,e.stackOffsetSilhouette=ma,e.stackOffsetWiggle=Wa,e.stackOrderAppearance=Fa,e.stackOrderAscending=da,e.stackOrderDescending=Ha,e.stackOrderInsideOut=vo,e.stackOrderNone=fn,e.stackOrderReverse=Gn,e.symbol=pt,e.symbolCircle=ce,e.symbolCross=He,e.symbolDiamond=Vt,e.symbolSquare=tt,e.symbolStar=nr,e.symbolTriangle=Ue,e.symbolWye=dt,e.symbols=Et,Object.defineProperty(e,"__esModule",{value:!0})})});var JWe=ye((C7,KWe)=>{(function(e,t){typeof C7=="object"&&typeof KWe!="undefined"?t(C7,hk(),T7(),$J()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(C7,function(e,t,r,n){"use strict";function i(g){return g.target.depth}function a(g){return g.depth}function o(g,P){return P-1-g.height}function s(g,P){return g.sourceLinks.length?g.depth:P-1}function l(g){return g.targetLinks.length?g.depth:g.sourceLinks.length?t.min(g.sourceLinks,i)-1:0}function u(g){return function(){return g}}function c(g,P){return h(g.source,P.source)||g.index-P.index}function f(g,P){return h(g.target,P.target)||g.index-P.index}function h(g,P){return g.y0-P.y0}function d(g){return g.value}function v(g){return(g.y0+g.y1)/2}function m(g){return v(g.source)*g.value}function b(g){return v(g.target)*g.value}function p(g){return g.index}function k(g){return g.nodes}function M(g){return g.links}function T(g,P){var E=g.get(P);if(!E)throw new Error("missing: "+P);return E}var L=function(){var g=0,P=0,E=1,z=1,q=24,U=8,G=p,Z=s,j=k,N=M,H=32,re=2/3;function oe(){var Se={nodes:j.apply(null,arguments),links:N.apply(null,arguments)};return _e(Se),ke(Se),Ce(Se),ge(Se,H),ie(Se),Se}oe.update=function(Se){return ie(Se),Se},oe.nodeId=function(Se){return arguments.length?(G=typeof Se=="function"?Se:u(Se),oe):G},oe.nodeAlign=function(Se){return arguments.length?(Z=typeof Se=="function"?Se:u(Se),oe):Z},oe.nodeWidth=function(Se){return arguments.length?(q=+Se,oe):q},oe.nodePadding=function(Se){return arguments.length?(U=+Se,oe):U},oe.nodes=function(Se){return arguments.length?(j=typeof Se=="function"?Se:u(Se),oe):j},oe.links=function(Se){return arguments.length?(N=typeof Se=="function"?Se:u(Se),oe):N},oe.size=function(Se){return arguments.length?(g=P=0,E=+Se[0],z=+Se[1],oe):[E-g,z-P]},oe.extent=function(Se){return arguments.length?(g=+Se[0][0],E=+Se[1][0],P=+Se[0][1],z=+Se[1][1],oe):[[g,P],[E,z]]},oe.iterations=function(Se){return arguments.length?(H=+Se,oe):H};function _e(Se){Se.nodes.forEach(function(we,De){we.index=De,we.sourceLinks=[],we.targetLinks=[]});var Ee=r.map(Se.nodes,G);Se.links.forEach(function(we,De){we.index=De;var Le=we.source,me=we.target;typeof Le!="object"&&(Le=we.source=T(Ee,Le)),typeof me!="object"&&(me=we.target=T(Ee,me)),Le.sourceLinks.push(we),me.targetLinks.push(we)})}function ke(Se){Se.nodes.forEach(function(Ee){Ee.value=Math.max(t.sum(Ee.sourceLinks,d),t.sum(Ee.targetLinks,d))})}function Ce(Se){var Ee,we,De;for(Ee=Se.nodes,we=[],De=0;Ee.length;++De,Ee=we,we=[])Ee.forEach(function(me){me.depth=De,me.sourceLinks.forEach(function(Pe){we.indexOf(Pe.target)<0&&we.push(Pe.target)})});for(Ee=Se.nodes,we=[],De=0;Ee.length;++De,Ee=we,we=[])Ee.forEach(function(me){me.height=De,me.targetLinks.forEach(function(Pe){we.indexOf(Pe.source)<0&&we.push(Pe.source)})});var Le=(E-g-q)/(De-1);Se.nodes.forEach(function(me){me.x1=(me.x0=g+Math.max(0,Math.min(De-1,Math.floor(Z.call(null,me,De))))*Le)+q})}function ge(Se){var Ee=r.nest().key(function(He){return He.x0}).sortKeys(t.ascending).entries(Se.nodes).map(function(He){return He.values});Le(),ce();for(var we=1,De=H;De>0;--De)Pe(we*=.99),ce(),me(we),ce();function Le(){var He=t.max(Ee,function(Vt){return Vt.length}),lt=re*(z-P)/(He-1);U>lt&&(U=lt);var mt=t.min(Ee,function(Vt){return(z-P-(Vt.length-1)*U)/t.sum(Vt,d)});Ee.forEach(function(Vt){Vt.forEach(function(st,ct){st.y1=(st.y0=ct)+st.value*mt})}),Se.links.forEach(function(Vt){Vt.width=Vt.value*mt})}function me(He){Ee.forEach(function(lt){lt.forEach(function(mt){if(mt.targetLinks.length){var Vt=(t.sum(mt.targetLinks,m)/t.sum(mt.targetLinks,d)-v(mt))*He;mt.y0+=Vt,mt.y1+=Vt}})})}function Pe(He){Ee.slice().reverse().forEach(function(lt){lt.forEach(function(mt){if(mt.sourceLinks.length){var Vt=(t.sum(mt.sourceLinks,b)/t.sum(mt.sourceLinks,d)-v(mt))*He;mt.y0+=Vt,mt.y1+=Vt}})})}function ce(){Ee.forEach(function(He){var lt,mt,Vt=P,st=He.length,ct;for(He.sort(h),ct=0;ct<st;++ct)lt=He[ct],mt=Vt-lt.y0,mt>0&&(lt.y0+=mt,lt.y1+=mt),Vt=lt.y1+U;if(mt=Vt-U-z,mt>0)for(Vt=lt.y0-=mt,lt.y1-=mt,ct=st-2;ct>=0;--ct)lt=He[ct],mt=lt.y1+U-Vt,mt>0&&(lt.y0-=mt,lt.y1-=mt),Vt=lt.y0})}}function ie(Se){Se.nodes.forEach(function(Ee){Ee.sourceLinks.sort(f),Ee.targetLinks.sort(c)}),Se.nodes.forEach(function(Ee){var we=Ee.y0,De=we;Ee.sourceLinks.forEach(function(Le){Le.y0=we+Le.width/2,we+=Le.width}),Ee.targetLinks.forEach(function(Le){Le.y1=De+Le.width/2,De+=Le.width})})}return oe};function x(g){return[g.source.x1,g.y0]}function C(g){return[g.target.x0,g.y1]}var S=function(){return n.linkHorizontal().source(x).target(C)};e.sankey=L,e.sankeyCenter=l,e.sankeyLeft=a,e.sankeyRight=o,e.sankeyJustify=s,e.sankeyLinkHorizontal=S,Object.defineProperty(e,"__esModule",{value:!0})})});var QWe=ye((_2r,$We)=>{var QZt=JJ();$We.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],l;function u(M){a[M]=!1,o.hasOwnProperty(M)&&Object.keys(o[M]).forEach(function(T){delete o[M][T],a[T]&&u(T)})}function c(M){var T=!1;i.push(M),a[M]=!0;var L,x;for(L=0;L<s[M].length;L++)x=s[M][L],x===l?(f(l,i),T=!0):a[x]||(T=c(x));if(T)u(M);else for(L=0;L<s[M].length;L++){x=s[M][L];var C=o[x];C||(C={},o[x]=C),C[x]=!0}return i.pop(),T}function f(M,T){var L=[].concat(T).concat(M);r?r(c):n.push(L)}function h(M){for(var T=0;T<t.length;T++)T<M&&(t[T]=[]),t[T]=t[T].filter(function(L){return L>=M})}function d(M){h(M);for(var T=t,L=QZt(T),x=L.components.filter(function(q){return q.length>1}),C=1/0,S,g=0;g<x.length;g++)for(var P=0;P<x[g].length;P++)x[g][P]<C&&(C=x[g][P],S=g);var E=x[S];if(!E)return!1;var z=t.map(function(q,U){return E.indexOf(U)===-1?[]:q.filter(function(G){return E.indexOf(G)!==-1})});return{leastVertex:C,adjList:z}}l=0;for(var v=t.length;l<v;){var m=d(l);if(l=m.leastVertex,s=m.adjList,s){for(var b=0;b<s.length;b++)for(var p=0;p<s[b].length;p++){var k=s[b][p];a[+k]=!1,o[k]={}}c(l),l=l+1}else l=v}if(!r)return n}});var tXe=ye((L7,eXe)=>{(function(e,t){typeof L7=="object"&&typeof eXe!="undefined"?t(L7,hk(),T7(),$J(),QWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(L7,function(e,t,r,n,i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;function a(st){return st.target.depth}function o(st){return st.depth}function s(st,ct){return ct-1-st.height}function l(st,ct){return st.sourceLinks.length?st.depth:ct-1}function u(st){return st.targetLinks.length?st.depth:st.sourceLinks.length?t.min(st.sourceLinks,a)-1:0}function c(st){return function(){return st}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(st){return typeof st}:function(st){return st&&typeof Symbol=="function"&&st.constructor===Symbol&&st!==Symbol.prototype?"symbol":typeof st};function h(st,ct){return v(st.source,ct.source)||st.index-ct.index}function d(st,ct){return v(st.target,ct.target)||st.index-ct.index}function v(st,ct){return st.partOfCycle===ct.partOfCycle?st.y0-ct.y0:st.circularLinkType==="top"||ct.circularLinkType==="bottom"?-1:1}function m(st){return st.value}function b(st){return(st.y0+st.y1)/2}function p(st){return b(st.source)}function k(st){return b(st.target)}function M(st){return st.index}function T(st){return st.nodes}function L(st){return st.links}function x(st,ct){var Qt=st.get(ct);if(!Qt)throw new Error("missing: "+ct);return Qt}function C(st,ct){return ct(st)}var S=25,g=10,P=.3;function E(){var st=0,ct=0,Qt=1,Ht=1,nr=24,tt,je=M,Ue=l,Ae=T,rt=L,St=32,Tt=2,dt,Et=null;function pt(){var gt={nodes:Ae.apply(null,arguments),links:rt.apply(null,arguments)};Xt(gt),z(gt,je,Et),or(gt),ei(gt),q(gt,je),qr(gt,St,je),jr(gt);for(var Ge=4,Je=0;Je<Ge;Je++)Pe(gt,Ht,je),ce(gt,Ht,je),De(gt,ct,Ht,je),Pe(gt,Ht,je),ce(gt,Ht,je);return Vt(gt,ct,Ht),H(gt,Tt,Ht,je),gt}pt.nodeId=function(gt){return arguments.length?(je=typeof gt=="function"?gt:c(gt),pt):je},pt.nodeAlign=function(gt){return arguments.length?(Ue=typeof gt=="function"?gt:c(gt),pt):Ue},pt.nodeWidth=function(gt){return arguments.length?(nr=+gt,pt):nr},pt.nodePadding=function(gt){return arguments.length?(tt=+gt,pt):tt},pt.nodes=function(gt){return arguments.length?(Ae=typeof gt=="function"?gt:c(gt),pt):Ae},pt.links=function(gt){return arguments.length?(rt=typeof gt=="function"?gt:c(gt),pt):rt},pt.size=function(gt){return arguments.length?(st=ct=0,Qt=+gt[0],Ht=+gt[1],pt):[Qt-st,Ht-ct]},pt.extent=function(gt){return arguments.length?(st=+gt[0][0],Qt=+gt[1][0],ct=+gt[0][1],Ht=+gt[1][1],pt):[[st,ct],[Qt,Ht]]},pt.iterations=function(gt){return arguments.length?(St=+gt,pt):St},pt.circularLinkGap=function(gt){return arguments.length?(Tt=+gt,pt):Tt},pt.nodePaddingRatio=function(gt){return arguments.length?(dt=+gt,pt):dt},pt.sortNodes=function(gt){return arguments.length?(Et=gt,pt):Et},pt.update=function(gt){return q(gt,je),jr(gt),gt.links.forEach(function(Ge){Ge.circular&&(Ge.circularLinkType=Ge.y0+Ge.y1<Ht?"top":"bottom",Ge.source.circularLinkType=Ge.circularLinkType,Ge.target.circularLinkType=Ge.circularLinkType)}),Pe(gt,Ht,je,!1),ce(gt,Ht,je),H(gt,Tt,Ht,je),gt};function Xt(gt){gt.nodes.forEach(function(Je,We){Je.index=We,Je.sourceLinks=[],Je.targetLinks=[]});var Ge=r.map(gt.nodes,je);return gt.links.forEach(function(Je,We){Je.index=We;var et=Je.source,xt=Je.target;(typeof et=="undefined"?"undefined":f(et))!=="object"&&(et=Je.source=x(Ge,et)),(typeof xt=="undefined"?"undefined":f(xt))!=="object"&&(xt=Je.target=x(Ge,xt)),et.sourceLinks.push(Je),xt.targetLinks.push(Je)}),gt}function or(gt){gt.nodes.forEach(function(Ge){Ge.partOfCycle=!1,Ge.value=Math.max(t.sum(Ge.sourceLinks,m),t.sum(Ge.targetLinks,m)),Ge.sourceLinks.forEach(function(Je){Je.circular&&(Ge.partOfCycle=!0,Ge.circularLinkType=Je.circularLinkType)}),Ge.targetLinks.forEach(function(Je){Je.circular&&(Ge.partOfCycle=!0,Ge.circularLinkType=Je.circularLinkType)})})}function _r(gt){var Ge=0,Je=0,We=0,et=0,xt=t.max(gt.nodes,function(At){return At.column});return gt.links.forEach(function(At){At.circular&&(At.circularLinkType=="top"?Ge=Ge+At.width:Je=Je+At.width,At.target.column==0&&(et=et+At.width),At.source.column==xt&&(We=We+At.width))}),Ge=Ge>0?Ge+S+g:Ge,Je=Je>0?Je+S+g:Je,We=We>0?We+S+g:We,et=et>0?et+S+g:et,{top:Ge,bottom:Je,left:et,right:We}}function Er(gt,Ge){var Je=t.max(gt.nodes,function(Sr){return Sr.column}),We=Qt-st,et=Ht-ct,xt=We+Ge.right+Ge.left,At=et+Ge.top+Ge.bottom,Kt=We/xt,er=et/At;return st=st*Kt+Ge.left,Qt=Ge.right==0?Qt:Qt*Kt,ct=ct*er+Ge.top,Ht=Ht*er,gt.nodes.forEach(function(Sr){Sr.x0=st+Sr.column*((Qt-st-nr)/Je),Sr.x1=Sr.x0+nr}),er}function ei(gt){var Ge,Je,We;for(Ge=gt.nodes,Je=[],We=0;Ge.length;++We,Ge=Je,Je=[])Ge.forEach(function(et){et.depth=We,et.sourceLinks.forEach(function(xt){Je.indexOf(xt.target)<0&&!xt.circular&&Je.push(xt.target)})});for(Ge=gt.nodes,Je=[],We=0;Ge.length;++We,Ge=Je,Je=[])Ge.forEach(function(et){et.height=We,et.targetLinks.forEach(function(xt){Je.indexOf(xt.source)<0&&!xt.circular&&Je.push(xt.source)})});gt.nodes.forEach(function(et){et.column=Math.floor(Ue.call(null,et,We))})}function qr(gt,Ge,Je){var We=r.nest().key(function(Sr){return Sr.column}).sortKeys(t.ascending).entries(gt.nodes).map(function(Sr){return Sr.values});At(Je),er();for(var et=1,xt=Ge;xt>0;--xt)Kt(et*=.99,Je),er();function At(Sr){if(dt){var Gr=1/0;We.forEach(function(Pi){var ai=Ht*dt/(Pi.length+1);Gr=ai<Gr?ai:Gr}),tt=Gr}var Ir=t.min(We,function(Pi){return(Ht-ct-(Pi.length-1)*tt)/t.sum(Pi,m)});Ir=Ir*P,gt.links.forEach(function(Pi){Pi.width=Pi.value*Ir});var Yr=_r(gt),_i=Er(gt,Yr);Ir=Ir*_i,gt.links.forEach(function(Pi){Pi.width=Pi.value*Ir}),We.forEach(function(Pi){var ai=Pi.length;Pi.forEach(function(mi,un){mi.depth==We.length-1&&ai==1||mi.depth==0&&ai==1?(mi.y0=Ht/2-mi.value*Ir,mi.y1=mi.y0+mi.value*Ir):mi.partOfCycle?Z(mi,Sr)==0?(mi.y0=Ht/2+un,mi.y1=mi.y0+mi.value*Ir):mi.circularLinkType=="top"?(mi.y0=ct+un,mi.y1=mi.y0+mi.value*Ir):(mi.y0=Ht-mi.value*Ir-un,mi.y1=mi.y0+mi.value*Ir):Yr.top==0||Yr.bottom==0?(mi.y0=(Ht-ct)/ai*un,mi.y1=mi.y0+mi.value*Ir):(mi.y0=(Ht-ct)/2-ai/2+un,mi.y1=mi.y0+mi.value*Ir)})})}function Kt(Sr,Gr){var Ir=We.length;We.forEach(function(Yr){var _i=Yr.length,Pi=Yr[0].depth;Yr.forEach(function(ai){var mi;if((ai.sourceLinks.length||ai.targetLinks.length)&&!(ai.partOfCycle&&Z(ai,Gr)>0))if(Pi==0&&_i==1)mi=ai.y1-ai.y0,ai.y0=Ht/2-mi/2,ai.y1=Ht/2+mi/2;else if(Pi==Ir-1&&_i==1)mi=ai.y1-ai.y0,ai.y0=Ht/2-mi/2,ai.y1=Ht/2+mi/2;else{var un=0,Fn=t.mean(ai.sourceLinks,k),An=t.mean(ai.targetLinks,p);Fn&&An?un=(Fn+An)/2:un=Fn||An;var Hn=(un-b(ai))*Sr;ai.y0+=Hn,ai.y1+=Hn}})})}function er(){We.forEach(function(Sr){var Gr,Ir,Yr=ct,_i=Sr.length,Pi;for(Sr.sort(v),Pi=0;Pi<_i;++Pi)Gr=Sr[Pi],Ir=Yr-Gr.y0,Ir>0&&(Gr.y0+=Ir,Gr.y1+=Ir),Yr=Gr.y1+tt;if(Ir=Yr-tt-Ht,Ir>0)for(Yr=Gr.y0-=Ir,Gr.y1-=Ir,Pi=_i-2;Pi>=0;--Pi)Gr=Sr[Pi],Ir=Gr.y1+tt-Yr,Ir>0&&(Gr.y0-=Ir,Gr.y1-=Ir),Yr=Gr.y0})}}function jr(gt){gt.nodes.forEach(function(Ge){Ge.sourceLinks.sort(d),Ge.targetLinks.sort(h)}),gt.nodes.forEach(function(Ge){var Je=Ge.y0,We=Je,et=Ge.y1,xt=et;Ge.sourceLinks.forEach(function(At){At.circular?(At.y0=et-At.width/2,et=et-At.width):(At.y0=Je+At.width/2,Je+=At.width)}),Ge.targetLinks.forEach(function(At){At.circular?(At.y1=xt-At.width/2,xt=xt-At.width):(At.y1=We+At.width/2,We+=At.width)})})}return pt}function z(st,ct,Qt){var Ht=0;if(Qt===null){for(var nr=[],tt=0;tt<st.links.length;tt++){var je=st.links[tt],Ue=je.source.index,Ae=je.target.index;nr[Ue]||(nr[Ue]=[]),nr[Ae]||(nr[Ae]=[]),nr[Ue].indexOf(Ae)===-1&&nr[Ue].push(Ae)}var rt=i(nr);rt.sort(function(Et,pt){return Et.length-pt.length});var St={};for(tt=0;tt<rt.length;tt++){var Tt=rt[tt],dt=Tt.slice(-2);St[dt[0]]||(St[dt[0]]={}),St[dt[0]][dt[1]]=!0}st.links.forEach(function(Et){var pt=Et.target.index,Xt=Et.source.index;pt===Xt||St[Xt]&&St[Xt][pt]?(Et.circular=!0,Et.circularLinkID=Ht,Ht=Ht+1):Et.circular=!1})}else st.links.forEach(function(Et){Et.source[Qt]<Et.target[Qt]?Et.circular=!1:(Et.circular=!0,Et.circularLinkID=Ht,Ht=Ht+1)})}function q(st,ct){var Qt=0,Ht=0;st.links.forEach(function(nr){nr.circular&&(nr.source.circularLinkType||nr.target.circularLinkType?nr.circularLinkType=nr.source.circularLinkType?nr.source.circularLinkType:nr.target.circularLinkType:nr.circularLinkType=Qt<Ht?"top":"bottom",nr.circularLinkType=="top"?Qt=Qt+1:Ht=Ht+1,st.nodes.forEach(function(tt){(C(tt,ct)==C(nr.source,ct)||C(tt,ct)==C(nr.target,ct))&&(tt.circularLinkType=nr.circularLinkType)}))}),st.links.forEach(function(nr){nr.circular&&(nr.source.circularLinkType==nr.target.circularLinkType&&(nr.circularLinkType=nr.source.circularLinkType),mt(nr,ct)&&(nr.circularLinkType=nr.source.circularLinkType))})}function U(st){var ct=Math.abs(st.y1-st.y0),Qt=Math.abs(st.target.x0-st.source.x1);return Math.atan(Qt/ct)}function G(st,ct){return st.source.column<ct.target.column?!1:!(st.target.column>ct.source.column)}function Z(st,ct){var Qt=0;st.sourceLinks.forEach(function(nr){Qt=nr.circular&&!mt(nr,ct)?Qt+1:Qt});var Ht=0;return st.targetLinks.forEach(function(nr){Ht=nr.circular&&!mt(nr,ct)?Ht+1:Ht}),Qt+Ht}function j(st){var ct=st.source.sourceLinks,Qt=0;ct.forEach(function(tt){Qt=tt.circular?Qt+1:Qt});var Ht=st.target.targetLinks,nr=0;return Ht.forEach(function(tt){nr=tt.circular?nr+1:nr}),!(Qt>1||nr>1)}function N(st,ct,Qt){return st.sort(oe),st.forEach(function(Ht,nr){var tt=0;if(mt(Ht,Qt)&&j(Ht))Ht.circularPathData.verticalBuffer=tt+Ht.width/2;else{var je=0;for(je;je<nr;je++)if(G(st[nr],st[je])){var Ue=st[je].circularPathData.verticalBuffer+st[je].width/2+ct;tt=Ue>tt?Ue:tt}Ht.circularPathData.verticalBuffer=tt+Ht.width/2}}),st}function H(st,ct,Qt,Ht){var nr=5,tt=t.min(st.links,function(Ae){return Ae.source.y0});st.links.forEach(function(Ae){Ae.circular&&(Ae.circularPathData={})});var je=st.links.filter(function(Ae){return Ae.circularLinkType=="top"});N(je,ct,Ht);var Ue=st.links.filter(function(Ae){return Ae.circularLinkType=="bottom"});N(Ue,ct,Ht),st.links.forEach(function(Ae){if(Ae.circular){if(Ae.circularPathData.arcRadius=Ae.width+g,Ae.circularPathData.leftNodeBuffer=nr,Ae.circularPathData.rightNodeBuffer=nr,Ae.circularPathData.sourceWidth=Ae.source.x1-Ae.source.x0,Ae.circularPathData.sourceX=Ae.source.x0+Ae.circularPathData.sourceWidth,Ae.circularPathData.targetX=Ae.target.x0,Ae.circularPathData.sourceY=Ae.y0,Ae.circularPathData.targetY=Ae.y1,mt(Ae,Ht)&&j(Ae))Ae.circularPathData.leftSmallArcRadius=g+Ae.width/2,Ae.circularPathData.leftLargeArcRadius=g+Ae.width/2,Ae.circularPathData.rightSmallArcRadius=g+Ae.width/2,Ae.circularPathData.rightLargeArcRadius=g+Ae.width/2,Ae.circularLinkType=="bottom"?(Ae.circularPathData.verticalFullExtent=Ae.source.y1+S+Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.rightLargeArcRadius):(Ae.circularPathData.verticalFullExtent=Ae.source.y0-S-Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.rightLargeArcRadius);else{var rt=Ae.source.column,St=Ae.circularLinkType,Tt=st.links.filter(function(pt){return pt.source.column==rt&&pt.circularLinkType==St});Ae.circularLinkType=="bottom"?Tt.sort(ke):Tt.sort(_e);var dt=0;Tt.forEach(function(pt,Xt){pt.circularLinkID==Ae.circularLinkID&&(Ae.circularPathData.leftSmallArcRadius=g+Ae.width/2+dt,Ae.circularPathData.leftLargeArcRadius=g+Ae.width/2+Xt*ct+dt),dt=dt+pt.width}),rt=Ae.target.column,Tt=st.links.filter(function(pt){return pt.target.column==rt&&pt.circularLinkType==St}),Ae.circularLinkType=="bottom"?Tt.sort(ge):Tt.sort(Ce),dt=0,Tt.forEach(function(pt,Xt){pt.circularLinkID==Ae.circularLinkID&&(Ae.circularPathData.rightSmallArcRadius=g+Ae.width/2+dt,Ae.circularPathData.rightLargeArcRadius=g+Ae.width/2+Xt*ct+dt),dt=dt+pt.width}),Ae.circularLinkType=="bottom"?(Ae.circularPathData.verticalFullExtent=Math.max(Qt,Ae.source.y1,Ae.target.y1)+S+Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.rightLargeArcRadius):(Ae.circularPathData.verticalFullExtent=tt-S-Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.rightLargeArcRadius)}Ae.circularPathData.leftInnerExtent=Ae.circularPathData.sourceX+Ae.circularPathData.leftNodeBuffer,Ae.circularPathData.rightInnerExtent=Ae.circularPathData.targetX-Ae.circularPathData.rightNodeBuffer,Ae.circularPathData.leftFullExtent=Ae.circularPathData.sourceX+Ae.circularPathData.leftLargeArcRadius+Ae.circularPathData.leftNodeBuffer,Ae.circularPathData.rightFullExtent=Ae.circularPathData.targetX-Ae.circularPathData.rightLargeArcRadius-Ae.circularPathData.rightNodeBuffer}if(Ae.circular)Ae.path=re(Ae);else{var Et=n.linkHorizontal().source(function(pt){var Xt=pt.source.x0+(pt.source.x1-pt.source.x0),or=pt.y0;return[Xt,or]}).target(function(pt){var Xt=pt.target.x0,or=pt.y1;return[Xt,or]});Ae.path=Et(Ae)}})}function re(st){var ct="";return st.circularLinkType=="top"?ct="M"+st.circularPathData.sourceX+" "+st.circularPathData.sourceY+" L"+st.circularPathData.leftInnerExtent+" "+st.circularPathData.sourceY+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftSmallArcRadius+" 0 0 0 "+st.circularPathData.leftFullExtent+" "+(st.circularPathData.sourceY-st.circularPathData.leftSmallArcRadius)+" L"+st.circularPathData.leftFullExtent+" "+st.circularPathData.verticalLeftInnerExtent+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftLargeArcRadius+" 0 0 0 "+st.circularPathData.leftInnerExtent+" "+st.circularPathData.verticalFullExtent+" L"+st.circularPathData.rightInnerExtent+" "+st.circularPathData.verticalFullExtent+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightLargeArcRadius+" 0 0 0 "+st.circularPathData.rightFullExtent+" "+st.circularPathData.verticalRightInnerExtent+" L"+st.circularPathData.rightFullExtent+" "+(st.circularPathData.targetY-st.circularPathData.rightSmallArcRadius)+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightSmallArcRadius+" 0 0 0 "+st.circularPathData.rightInnerExtent+" "+st.circularPathData.targetY+" L"+st.circularPathData.targetX+" "+st.circularPathData.targetY:ct="M"+st.circularPathData.sourceX+" "+st.circularPathData.sourceY+" L"+st.circularPathData.leftInnerExtent+" "+st.circularPathData.sourceY+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftSmallArcRadius+" 0 0 1 "+st.circularPathData.leftFullExtent+" "+(st.circularPathData.sourceY+st.circularPathData.leftSmallArcRadius)+" L"+st.circularPathData.leftFullExtent+" "+st.circularPathData.verticalLeftInnerExtent+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftLargeArcRadius+" 0 0 1 "+st.circularPathData.leftInnerExtent+" "+st.circularPathData.verticalFullExtent+" L"+st.circularPathData.rightInnerExtent+" "+st.circularPathData.verticalFullExtent+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightLargeArcRadius+" 0 0 1 "+st.circularPathData.rightFullExtent+" "+st.circularPathData.verticalRightInnerExtent+" L"+st.circularPathData.rightFullExtent+" "+(st.circularPathData.targetY+st.circularPathData.rightSmallArcRadius)+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightSmallArcRadius+" 0 0 1 "+st.circularPathData.rightInnerExtent+" "+st.circularPathData.targetY+" L"+st.circularPathData.targetX+" "+st.circularPathData.targetY,ct}function oe(st,ct){return ie(st)==ie(ct)?st.circularLinkType=="bottom"?ke(st,ct):_e(st,ct):ie(ct)-ie(st)}function _e(st,ct){return st.y0-ct.y0}function ke(st,ct){return ct.y0-st.y0}function Ce(st,ct){return st.y1-ct.y1}function ge(st,ct){return ct.y1-st.y1}function ie(st){return st.target.column-st.source.column}function Se(st){return st.target.x0-st.source.x1}function Ee(st,ct){var Qt=U(st),Ht=Se(ct)/Math.tan(Qt),nr=lt(st)=="up"?st.y1+Ht:st.y1-Ht;return nr}function we(st,ct){var Qt=U(st),Ht=Se(ct)/Math.tan(Qt),nr=lt(st)=="up"?st.y1-Ht:st.y1+Ht;return nr}function De(st,ct,Qt,Ht){st.links.forEach(function(nr){if(!nr.circular&&nr.target.column-nr.source.column>1){var tt=nr.source.column+1,je=nr.target.column-1,Ue=1,Ae=je-tt+1;for(Ue=1;tt<=je;tt++,Ue++)st.nodes.forEach(function(rt){if(rt.column==tt){var St=Ue/(Ae+1),Tt=Math.pow(1-St,3),dt=3*St*Math.pow(1-St,2),Et=3*Math.pow(St,2)*(1-St),pt=Math.pow(St,3),Xt=Tt*nr.y0+dt*nr.y0+Et*nr.y1+pt*nr.y1,or=Xt-nr.width/2,_r=Xt+nr.width/2,Er;or>rt.y0&&or<rt.y1?(Er=rt.y1-or+10,Er=rt.circularLinkType=="bottom"?Er:-Er,rt=me(rt,Er,ct,Qt),st.nodes.forEach(function(ei){C(ei,Ht)==C(rt,Ht)||ei.column!=rt.column||Le(rt,ei)&&me(ei,Er,ct,Qt)})):_r>rt.y0&&_r<rt.y1?(Er=_r-rt.y0+10,rt=me(rt,Er,ct,Qt),st.nodes.forEach(function(ei){C(ei,Ht)==C(rt,Ht)||ei.column!=rt.column||ei.y0<rt.y1&&ei.y1>rt.y1&&me(ei,Er,ct,Qt)})):or<rt.y0&&_r>rt.y1&&(Er=_r-rt.y0+10,rt=me(rt,Er,ct,Qt),st.nodes.forEach(function(ei){C(ei,Ht)==C(rt,Ht)||ei.column!=rt.column||ei.y0<rt.y1&&ei.y1>rt.y1&&me(ei,Er,ct,Qt)}))}})}})}function Le(st,ct){return st.y0>ct.y0&&st.y0<ct.y1||st.y1>ct.y0&&st.y1<ct.y1?!0:st.y0<ct.y0&&st.y1>ct.y1}function me(st,ct,Qt,Ht){return st.y0+ct>=Qt&&st.y1+ct<=Ht&&(st.y0=st.y0+ct,st.y1=st.y1+ct,st.targetLinks.forEach(function(nr){nr.y1=nr.y1+ct}),st.sourceLinks.forEach(function(nr){nr.y0=nr.y0+ct})),st}function Pe(st,ct,Qt,Ht){st.nodes.forEach(function(nr){Ht&&nr.y+(nr.y1-nr.y0)>ct&&(nr.y=nr.y-(nr.y+(nr.y1-nr.y0)-ct));var tt=st.links.filter(function(Ae){return C(Ae.source,Qt)==C(nr,Qt)}),je=tt.length;je>1&&tt.sort(function(Ae,rt){if(!Ae.circular&&!rt.circular){if(Ae.target.column==rt.target.column)return Ae.y1-rt.y1;if(He(Ae,rt)){if(Ae.target.column>rt.target.column){var St=we(rt,Ae);return Ae.y1-St}if(rt.target.column>Ae.target.column){var Tt=we(Ae,rt);return Tt-rt.y1}}else return Ae.y1-rt.y1}if(Ae.circular&&!rt.circular)return Ae.circularLinkType=="top"?-1:1;if(rt.circular&&!Ae.circular)return rt.circularLinkType=="top"?1:-1;if(Ae.circular&&rt.circular)return Ae.circularLinkType===rt.circularLinkType&&Ae.circularLinkType=="top"?Ae.target.column===rt.target.column?Ae.target.y1-rt.target.y1:rt.target.column-Ae.target.column:Ae.circularLinkType===rt.circularLinkType&&Ae.circularLinkType=="bottom"?Ae.target.column===rt.target.column?rt.target.y1-Ae.target.y1:Ae.target.column-rt.target.column:Ae.circularLinkType=="top"?-1:1});var Ue=nr.y0;tt.forEach(function(Ae){Ae.y0=Ue+Ae.width/2,Ue=Ue+Ae.width}),tt.forEach(function(Ae,rt){if(Ae.circularLinkType=="bottom"){var St=rt+1,Tt=0;for(St;St<je;St++)Tt=Tt+tt[St].width;Ae.y0=nr.y1-Tt-Ae.width/2}})})}function ce(st,ct,Qt){st.nodes.forEach(function(Ht){var nr=st.links.filter(function(Ue){return C(Ue.target,Qt)==C(Ht,Qt)}),tt=nr.length;tt>1&&nr.sort(function(Ue,Ae){if(!Ue.circular&&!Ae.circular){if(Ue.source.column==Ae.source.column)return Ue.y0-Ae.y0;if(He(Ue,Ae)){if(Ae.source.column<Ue.source.column){var rt=Ee(Ae,Ue);return Ue.y0-rt}if(Ue.source.column<Ae.source.column){var St=Ee(Ue,Ae);return St-Ae.y0}}else return Ue.y0-Ae.y0}if(Ue.circular&&!Ae.circular)return Ue.circularLinkType=="top"?-1:1;if(Ae.circular&&!Ue.circular)return Ae.circularLinkType=="top"?1:-1;if(Ue.circular&&Ae.circular)return Ue.circularLinkType===Ae.circularLinkType&&Ue.circularLinkType=="top"?Ue.source.column===Ae.source.column?Ue.source.y1-Ae.source.y1:Ue.source.column-Ae.source.column:Ue.circularLinkType===Ae.circularLinkType&&Ue.circularLinkType=="bottom"?Ue.source.column===Ae.source.column?Ue.source.y1-Ae.source.y1:Ae.source.column-Ue.source.column:Ue.circularLinkType=="top"?-1:1});var je=Ht.y0;nr.forEach(function(Ue){Ue.y1=je+Ue.width/2,je=je+Ue.width}),nr.forEach(function(Ue,Ae){if(Ue.circularLinkType=="bottom"){var rt=Ae+1,St=0;for(rt;rt<tt;rt++)St=St+nr[rt].width;Ue.y1=Ht.y1-St-Ue.width/2}})})}function He(st,ct){return lt(st)==lt(ct)}function lt(st){return st.y0-st.y1>0?"up":"down"}function mt(st,ct){return C(st.source,ct)==C(st.target,ct)}function Vt(st,ct,Qt){var Ht=st.nodes,nr=st.links,tt=!1,je=!1;if(nr.forEach(function(dt){dt.circularLinkType=="top"?tt=!0:dt.circularLinkType=="bottom"&&(je=!0)}),tt==!1||je==!1){var Ue=t.min(Ht,function(dt){return dt.y0}),Ae=t.max(Ht,function(dt){return dt.y1}),rt=Ae-Ue,St=Qt-ct,Tt=St/rt;Ht.forEach(function(dt){var Et=(dt.y1-dt.y0)*Tt;dt.y0=(dt.y0-Ue)*Tt,dt.y1=dt.y0+Et}),nr.forEach(function(dt){dt.y0=(dt.y0-Ue)*Tt,dt.y1=(dt.y1-Ue)*Tt,dt.width=dt.width*Tt})}}e.sankeyCircular=E,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})})});var QJ=ye((x2r,rXe)=>{"use strict";rXe.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 pXe=ye((b2r,vXe)=>{"use strict";var iXe=WWe(),eYt=(H2(),pb(G2)).interpolateNumber,q5=qa(),aC=JWe(),tYt=tXe(),Nu=QJ(),O5=fd(),mw=ka(),rYt=So(),w1=Pr(),r$=w1.strTranslate,iYt=w1.strRotate,i$=iy(),oC=i$.keyFun,P7=i$.repeat,uXe=i$.unwrap,nXe=Zl(),nYt=Oa(),cXe=Dh(),aYt=cXe.CAP_SHIFT,oYt=cXe.LINE_SPACING,sYt=3;function lYt(e,t,r){var n=uXe(t),i=n.trace,a=i.domain,o=i.orientation==="h",s=i.node.pad,l=i.node.thickness,u={justify:aC.sankeyJustify,left:aC.sankeyLeft,right:aC.sankeyRight,center:aC.sankeyCenter}[i.node.align],c=e.width*(a.x[1]-a.x[0]),f=e.height*(a.y[1]-a.y[0]),h=n._nodes,d=n._links,v=n.circular,m;v?m=tYt.sankeyCircular().circularLinkGap(0):m=aC.sankey(),m.iterations(Nu.sankeyIterations).size(o?[c,f]:[f,c]).nodeWidth(l).nodePadding(s).nodeId(function(U){return U.pointNumber}).nodeAlign(u).nodes(h).links(d);var b=m();m.nodePadding()<s&&w1.warn("node.pad was reduced to ",m.nodePadding()," to fit within the figure.");var p,k,M;for(var T in n._groupLookup){var L=parseInt(n._groupLookup[T]),x;for(p=0;p<b.nodes.length;p++)if(b.nodes[p].pointNumber===L){x=b.nodes[p];break}if(x){var C={pointNumber:parseInt(T),x0:x.x0,x1:x.x1,y0:x.y0,y1:x.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};b.nodes.unshift(C),x.childrenNodes.unshift(C)}}function S(){for(p=0;p<b.nodes.length;p++){var U=b.nodes[p],G={},Z,j;for(k=0;k<U.targetLinks.length;k++)j=U.targetLinks[k],Z=j.source.pointNumber+":"+j.target.pointNumber,G.hasOwnProperty(Z)||(G[Z]=[]),G[Z].push(j);var N=Object.keys(G);for(k=0;k<N.length;k++){Z=N[k];var H=G[Z],re=0,oe={};for(M=0;M<H.length;M++)j=H[M],oe[j.label]||(oe[j.label]=0),oe[j.label]+=j.value,re+=j.value;for(M=0;M<H.length;M++)j=H[M],j.flow={value:re,labelConcentration:oe[j.label]/re,concentration:j.value/re,links:H},j.concentrationscale&&(j.color=O5(j.concentrationscale(j.flow.labelConcentration)))}var _e=0;for(k=0;k<U.sourceLinks.length;k++)_e+=U.sourceLinks[k].value;for(k=0;k<U.sourceLinks.length;k++)j=U.sourceLinks[k],j.concentrationOut=j.value/_e;var ke=0;for(k=0;k<U.targetLinks.length;k++)ke+=U.targetLinks[k].value;for(k=0;k<U.targetLinks.length;k++)j=U.targetLinks[k],j.concenrationIn=j.value/ke}}S();function g(U){U.forEach(function(G){var Z,j,N=0,H=G.length,re;for(G.sort(function(oe,_e){return oe.y0-_e.y0}),re=0;re<H;++re)Z=G[re],Z.y0>=N||(j=N-Z.y0,j>1e-6&&(Z.y0+=j,Z.y1+=j)),N=Z.y1+s})}function P(U){var G=U.map(function(_e,ke){return{x0:_e.x0,index:ke}}).sort(function(_e,ke){return _e.x0-ke.x0}),Z=[],j=-1,N,H=-1/0,re;for(p=0;p<G.length;p++){var oe=U[G[p].index];oe.x0>H+l&&(j+=1,N=oe.x0),H=oe.x0,Z[j]||(Z[j]=[]),Z[j].push(oe),re=N-oe.x0,oe.x0+=re,oe.x1+=re}return Z}if(i.node.x.length&&i.node.y.length){for(p=0;p<Math.min(i.node.x.length,i.node.y.length,b.nodes.length);p++)if(i.node.x[p]&&i.node.y[p]){var E=[i.node.x[p]*c,i.node.y[p]*f];b.nodes[p].x0=E[0]-l/2,b.nodes[p].x1=E[0]+l/2;var z=b.nodes[p].y1-b.nodes[p].y0;b.nodes[p].y0=E[1]-z/2,b.nodes[p].y1=E[1]+z/2}if(i.arrangement==="snap"){h=b.nodes;var q=P(h);g(q)}m.update(b)}return{circular:v,key:r,trace:i,guid:w1.randstr(),horizontal:o,width:c,height:f,nodePad:i.node.pad,nodeLineColor:i.node.line.color,nodeLineWidth:i.node.line.width,linkLineColor:i.link.line.color,linkLineWidth:i.link.line.width,linkArrowLength:i.link.arrowlen,valueFormat:i.valueformat,valueSuffix:i.valuesuffix,textFont:i.textfont,translateX:a.x[0]*e.width+e.margin.l,translateY:e.height-a.y[1]*e.height+e.margin.t,dragParallel:o?f:c,dragPerpendicular:o?c:f,arrangement:i.arrangement,sankey:m,graph:b,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function uYt(e,t,r){var n=O5(t.color),i=O5(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:mw.tinyRGB(n),tinyColorAlpha:n.getAlpha(),tinyColorHoverHue:mw.tinyRGB(i),tinyColorHoverAlpha:i.getAlpha(),linkPath:n$,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function cYt(e,t){var r="",n=e.width/2,i=e.circularPathData,a=i.sourceX+i.verticalBuffer<i.targetX,o=i.rightFullExtent-i.rightLargeArcRadius-t<=i.leftFullExtent-n,s=Math.abs(i.rightFullExtent-i.leftFullExtent-n)<n;return e.circularLinkType==="top"?(r="M "+(i.targetX-t)+" "+(i.targetY+n)+" L "+(i.rightInnerExtent-t)+" "+(i.targetY+n)+"A "+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 1 "+(i.rightFullExtent-n-t)+" "+(i.targetY-i.rightSmallArcRadius)+"L "+(i.rightFullExtent-n-t)+" "+i.verticalRightInnerExtent,a&&o?r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 1 "+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+" "+(i.verticalRightInnerExtent-(i.rightLargeArcRadius+n))+" L "+(i.rightFullExtent+n-(i.rightLargeArcRadius-n)-t)+" "+(i.verticalRightInnerExtent-(i.rightLargeArcRadius+n))+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalRightInnerExtent:a?r+=" A "+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 0 "+(i.rightFullExtent-n-t-(i.rightLargeArcRadius-n))+" "+(i.verticalRightInnerExtent-(i.rightLargeArcRadius-n))+" L "+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+" "+(i.verticalRightInnerExtent-(i.rightLargeArcRadius-n))+" A "+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 1 "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent-n)+" L "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent,r+=" L "+(i.leftFullExtent+n)+" "+(i.sourceY-i.leftSmallArcRadius)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.sourceY+n)+" L "+i.sourceX+" "+(i.sourceY+n)+" L "+i.sourceX+" "+(i.sourceY-n)+" L "+i.leftInnerExtent+" "+(i.sourceY-n)+" A "+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 0 "+(i.leftFullExtent-n)+" "+(i.sourceY-i.leftSmallArcRadius)+" L "+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent,a&&o?r+=" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+(i.leftFullExtent-n)+" "+(i.verticalFullExtent+n)+"L"+(i.rightFullExtent+n-t)+" "+(i.verticalFullExtent+n)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:a?r+=" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+(i.verticalFullExtent-n)+" L "+(i.rightFullExtent-n-t)+" "+(i.verticalFullExtent-n)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:r+=" A "+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+" L "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 0 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent,r+=" L "+(i.rightFullExtent+n-t)+" "+(i.targetY-i.rightSmallArcRadius)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 0 "+(i.rightInnerExtent-t)+" "+(i.targetY-n)+" L "+(i.targetX-t)+" "+(i.targetY-n)+(t>0?" L "+i.targetX+" "+i.targetY:"")+"Z"):(r="M "+(i.targetX-t)+" "+(i.targetY-n)+" L "+(i.rightInnerExtent-t)+" "+(i.targetY-n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent-n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" L "+(i.rightFullExtent-n-t)+" "+i.verticalRightInnerExtent,a&&o?r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-n-t)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:a?r+=" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent-t-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent+n)+" L "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent,r+=" L "+(i.leftFullExtent+n)+" "+(i.sourceY+i.leftSmallArcRadius)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY+n)+" L "+i.leftInnerExtent+" "+(i.sourceY+n)+" A "+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n)+" "+(i.sourceY+i.leftSmallArcRadius)+" L "+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent,a&&o?r+=" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.rightFullExtent+n-t+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:a?r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent-t-n)+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:r+=" A "+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+" L "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent,r+=" L "+(i.rightFullExtent+n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightInnerExtent-t)+" "+(i.targetY+n)+" L "+(i.targetX-t)+" "+(i.targetY+n)+(t>0?" L "+i.targetX+" "+i.targetY:"")+"Z"),r}function n$(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return cYt(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=eYt(a,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,v="M"+a+","+c,m="C"+l+","+c+" "+u+","+h+" "+o+","+h,b="C"+u+","+d+" "+l+","+f+" "+a+","+f,p=n>0?"L"+(o+n)+","+(h+r.link.width/2):"";return p+="L"+o+","+d,v+m+p+b+"Z"}return t}function fYt(e,t){var r=O5(t.color),n=Nu.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,o=Math.max(.5,t.dy),s="node_"+t.pointNumber;return t.group&&(s=w1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:mw.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join("_"),interactionState:e.interactionState,figure:e}}function t$(e){e.attr("transform",function(t){return r$(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function hYt(e){e.call(t$)}function fXe(e,t){e.call(hYt),t.attr("d",n$())}function aXe(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function e$(e){return e.link.width>1||e.linkLineWidth>0}function oXe(e){var t=r$(e.translateX,e.translateY);return t+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function sXe(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 dYt(e,t,r,n){var i=q5.behavior.drag().origin(function(a){return{x:a.node.x0+a.visibleWidth/2,y:a.node.y0+a.visibleHeight/2}}).on("dragstart",function(a){if(a.arrangement!=="fixed"&&(w1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),w1.raiseToTop(this),a.interactionState.dragInProgress=a.node,lXe(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):vYt(e,o,a,n),pYt(e,t,a,o,n)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=q5.event.x,s=q5.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),lXe(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),fXe(e.filter(dXe(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"&&hXe(a,n)}});e.on(".drag",null).call(i)}function vYt(e,t,r,n){yYt(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]=iXe.forceSimulation(i).alphaDecay(0).force("collide",iXe.forceCollide().radius(function(a){return a.dy/2+r.nodePad/2}).strength(1).iterations(Nu.forceIterations)).force("constrain",gYt(e,t,i,r,n)).stop()}function pYt(e,t,r,n,i){window.requestAnimationFrame(function a(){var o;for(o=0;o<Nu.forceTicksPerFrame;o++)r.forceLayouts[n].tick();var s=r.graph.nodes;if(_Yt(s),r.sankey.update(r.graph),fXe(e.filter(dXe(r)),t),r.forceLayouts[n].alpha()>0)window.requestAnimationFrame(a);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,hXe(r,i)}})}function gYt(e,t,r,n){return function(){for(var a=0,o=0;o<r.length;o++){var s=r[o];s===n.interactionState.dragInProgress?(s.x=s.lastDraggedX,s.y=s.lastDraggedY):(s.vx=(s.originalX-s.x)/Nu.forceTicksPerFrame,s.y=Math.min(n.size-s.dy/2,Math.max(s.dy/2,s.y))),a=Math.max(a,Math.abs(s.vx),Math.abs(s.vy))}!n.interactionState.dragInProgress&&a<.1&&n.forceLayouts[t].alpha()>0&&n.forceLayouts[t].alpha(0)}}function hXe(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)}nYt.call("_guiRestyle",t,{"node.x":[r],"node.y":[n]},e.trace.index).then(function(){t._fullLayout._dragCover&&t._fullLayout._dragCover.remove()})}function mYt(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 lXe(e){e.lastDraggedX=e.x0+e.dx/2,e.lastDraggedY=e.y0+e.dy/2}function dXe(e){return function(t){return t.node.originalX===e.node.originalX}}function yYt(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 _Yt(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}vXe.exports=function(e,t,r,n,i){var a=e._context.staticPlot,o=!1;w1.ensureSingle(e._fullLayout._infolayer,"g","first-render",function(){o=!0});var s=e._fullLayout._dragCover,l=r.filter(function(b){return uXe(b).trace.visible}).map(lYt.bind(null,n)),u=t.selectAll("."+Nu.cn.sankey).data(l,oC);u.exit().remove(),u.enter().append("g").classed(Nu.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",a?"none":"auto").attr("transform",oXe),u.each(function(b,p){e._fullData[p]._sankey=b;var k="bgsankey-"+b.trace.uid+"-"+p;w1.ensureSingle(e._fullLayout._draggers,"rect",k),e._fullData[p]._bgRect=q5.select("."+k),e._fullData[p]._bgRect.style("pointer-events",a?"none":"all").attr("width",b.width).attr("height",b.height).attr("x",b.translateX).attr("y",b.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),u.transition().ease(Nu.ease).duration(Nu.duration).attr("transform",oXe);var c=u.selectAll("."+Nu.cn.sankeyLinks).data(P7,oC);c.enter().append("g").classed(Nu.cn.sankeyLinks,!0).style("fill","none");var f=c.selectAll("."+Nu.cn.sankeyLink).data(function(b){var p=b.graph.links;return p.filter(function(k){return k.value}).map(uYt.bind(null,b))},oC);f.enter().append("path").classed(Nu.cn.sankeyLink,!0).call(sXe,u,i.linkEvents),f.style("stroke",function(b){return e$(b)?mw.tinyRGB(O5(b.linkLineColor)):b.tinyColorHue}).style("stroke-opacity",function(b){return e$(b)?mw.opacity(b.linkLineColor):b.tinyColorAlpha}).style("fill",function(b){return b.tinyColorHue}).style("fill-opacity",function(b){return b.tinyColorAlpha}).style("stroke-width",function(b){return e$(b)?b.linkLineWidth:1}).attr("d",n$()),f.style("opacity",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(Nu.ease).duration(Nu.duration).style("opacity",1),f.exit().transition().ease(Nu.ease).duration(Nu.duration).style("opacity",0).remove();var h=u.selectAll("."+Nu.cn.sankeyNodeSet).data(P7,oC);h.enter().append("g").classed(Nu.cn.sankeyNodeSet,!0),h.style("cursor",function(b){switch(b.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var d=h.selectAll("."+Nu.cn.sankeyNode).data(function(b){var p=b.graph.nodes;return mYt(p),p.map(fYt.bind(null,b))},oC);d.enter().append("g").classed(Nu.cn.sankeyNode,!0).call(t$).style("opacity",function(b){return(e._context.staticPlot||o)&&!b.partOfGroup?1:0}),d.call(sXe,u,i.nodeEvents).call(dYt,f,i,e),d.transition().ease(Nu.ease).duration(Nu.duration).call(t$).style("opacity",function(b){return b.partOfGroup?0:1}),d.exit().transition().ease(Nu.ease).duration(Nu.duration).style("opacity",0).remove();var v=d.selectAll("."+Nu.cn.nodeRect).data(P7);v.enter().append("rect").classed(Nu.cn.nodeRect,!0).call(aXe),v.style("stroke-width",function(b){return b.nodeLineWidth}).style("stroke",function(b){return mw.tinyRGB(O5(b.nodeLineColor))}).style("stroke-opacity",function(b){return mw.opacity(b.nodeLineColor)}).style("fill",function(b){return b.tinyColorHue}).style("fill-opacity",function(b){return b.tinyColorAlpha}),v.transition().ease(Nu.ease).duration(Nu.duration).call(aXe);var m=d.selectAll("."+Nu.cn.nodeLabel).data(P7);m.enter().append("text").classed(Nu.cn.nodeLabel,!0).style("cursor","default"),m.attr("data-notex",1).text(function(b){return b.node.label}).each(function(b){var p=q5.select(this);rYt.font(p,b.textFont),nXe.convertToTspans(p,e)}).attr("text-anchor",function(b){return b.horizontal&&b.left?"end":"start"}).attr("transform",function(b){var p=q5.select(this),k=nXe.lineCount(p),M=b.textFont.size*((k-1)*oYt-aYt),T=b.nodeLineWidth/2+sYt,L=((b.horizontal?b.visibleHeight:b.visibleWidth)-M)/2;b.horizontal&&(b.left?T=-T:T+=b.visibleWidth);var x=b.horizontal?"":"scale(-1,1)"+iYt(90);return r$(b.horizontal?T:L,b.horizontal?L:T)+x}),m.transition().ease(Nu.ease).duration(Nu.duration)}});var s$=ye((w2r,AXe)=>{"use strict";var Zv=qa(),o$=Pr(),I7=o$.numberFormat,xYt=pXe(),B5=vf(),bYt=ka(),Dx=QJ().cn,sC=o$._;function gXe(e){return e!==""}function N5(e,t){return e.filter(function(r){return r.key===t.traceId})}function mXe(e,t){Zv.select(e).select("path").style("fill-opacity",t),Zv.select(e).select("rect").style("fill-opacity",t)}function yXe(e){Zv.select(e).select("text.name").style("fill","black")}function _Xe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function xXe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function bXe(e,t,r){t&&r&&N5(r,t).selectAll("."+Dx.sankeyLink).filter(_Xe(t)).call(wXe.bind(0,t,r,!1))}function a$(e,t,r){t&&r&&N5(r,t).selectAll("."+Dx.sankeyLink).filter(_Xe(t)).call(TXe.bind(0,t,r,!1))}function wXe(e,t,r,n){n.style("fill",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverHue}).style("fill-opacity",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverAlpha}),n.each(function(i){var a=i.link.label;a!==""&&N5(t,e).selectAll("."+Dx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverHue}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverAlpha})}),r&&N5(t,e).selectAll("."+Dx.sankeyNode).filter(xXe(e)).call(bXe)}function TXe(e,t,r,n){n.style("fill",function(i){return i.tinyColorHue}).style("fill-opacity",function(i){return i.tinyColorAlpha}),n.each(function(i){var a=i.link.label;a!==""&&N5(t,e).selectAll("."+Dx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){return o.tinyColorHue}).style("fill-opacity",function(o){return o.tinyColorAlpha})}),r&&N5(t,e).selectAll(Dx.sankeyNode).filter(xXe(e)).call(a$)}function kf(e,t){var r=e.hoverlabel||{},n=o$.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}AXe.exports=function(t,r){for(var n=t._fullLayout,i=n._paper,a=n._size,o=0;o<t._fullData.length;o++)if(t._fullData[o].visible&&t._fullData[o].type===Dx.sankey&&!t._fullData[o]._viewInitial){var s=t._fullData[o].node;t._fullData[o]._viewInitial={node:{groups:s.groups.slice(),x:s.x.slice(),y:s.y.slice()}}}var l=function(L,x){var C=x.link;C.originalEvent=Zv.event,t._hoverdata=[C],B5.click(t,{target:!0})},u=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(wXe.bind(0,x,C,!0)),x.link.trace.link.hoverinfo!=="skip"&&(x.link.fullData=x.link.trace,t.emit("plotly_hover",{event:Zv.event,points:[x.link]})))},c=sC(t,"source:")+" ",f=sC(t,"target:")+" ",h=sC(t,"concentration:")+" ",d=sC(t,"incoming flow count:")+" ",v=sC(t,"outgoing flow count:")+" ",m=function(L,x){if(t._fullLayout.hovermode===!1)return;var C=x.link.trace.link;if(C.hoverinfo==="none"||C.hoverinfo==="skip")return;var S=[];function g(Z){var j,N;Z.circular?(j=(Z.circularPathData.leftInnerExtent+Z.circularPathData.rightInnerExtent)/2,N=Z.circularPathData.verticalFullExtent):(j=(Z.source.x1+Z.target.x0)/2,N=(Z.y0+Z.y1)/2);var H=[j,N];return Z.trace.orientation==="v"&&H.reverse(),H[0]+=x.parent.translateX,H[1]+=x.parent.translateY,H}for(var P=0,E=0;E<x.flow.links.length;E++){var z=x.flow.links[E];if(!(t._fullLayout.hovermode==="closest"&&x.link.pointNumber!==z.pointNumber)){x.link.pointNumber===z.pointNumber&&(P=E),z.fullData=z.trace,C=x.link.trace.link;var q=g(z),U={valueLabel:I7(x.valueFormat)(z.value)+x.valueSuffix};S.push({x:q[0],y:q[1],name:U.valueLabel,text:[z.label||"",c+z.source.label,f+z.target.label,z.concentrationscale?h+I7("%0.2f")(z.flow.labelConcentration):""].filter(gXe).join("<br>"),color:kf(C,"bgcolor")||bYt.addOpacity(z.color,1),borderColor:kf(C,"bordercolor"),fontFamily:kf(C,"font.family"),fontSize:kf(C,"font.size"),fontColor:kf(C,"font.color"),fontWeight:kf(C,"font.weight"),fontStyle:kf(C,"font.style"),fontVariant:kf(C,"font.variant"),fontTextcase:kf(C,"font.textcase"),fontLineposition:kf(C,"font.lineposition"),fontShadow:kf(C,"font.shadow"),nameLength:kf(C,"namelength"),textAlign:kf(C,"align"),idealAlign:Zv.event.x<q[0]?"right":"left",hovertemplate:C.hovertemplate,hovertemplateLabels:U,eventData:[z]})}}var G=B5.loneHover(S,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t,anchorIndex:P});G.each(function(){var Z=this;x.link.concentrationscale||mXe(Z,.65),yXe(Z)})},b=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(TXe.bind(0,x,C,!0)),x.link.trace.link.hoverinfo!=="skip"&&(x.link.fullData=x.link.trace,t.emit("plotly_unhover",{event:Zv.event,points:[x.link]})),B5.loneUnhover(n._hoverlayer.node()))},p=function(L,x,C){var S=x.node;S.originalEvent=Zv.event,t._hoverdata=[S],Zv.select(L).call(a$,x,C),B5.click(t,{target:!0})},k=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(bXe,x,C),x.node.trace.node.hoverinfo!=="skip"&&(x.node.fullData=x.node.trace,t.emit("plotly_hover",{event:Zv.event,points:[x.node]})))},M=function(L,x){if(t._fullLayout.hovermode!==!1){var C=x.node.trace.node;if(!(C.hoverinfo==="none"||C.hoverinfo==="skip")){var S=Zv.select(L).select("."+Dx.nodeRect),g=t._fullLayout._paperdiv.node().getBoundingClientRect(),P=S.node().getBoundingClientRect(),E=P.left-2-g.left,z=P.right+2-g.left,q=P.top+P.height/4-g.top,U={valueLabel:I7(x.valueFormat)(x.node.value)+x.valueSuffix};x.node.fullData=x.node.trace,t._fullLayout._calcInverseTransform(t);var G=t._fullLayout._invScaleX,Z=t._fullLayout._invScaleY,j=B5.loneHover({x0:G*E,x1:G*z,y:Z*q,name:I7(x.valueFormat)(x.node.value)+x.valueSuffix,text:[x.node.label,d+x.node.targetLinks.length,v+x.node.sourceLinks.length].filter(gXe).join("<br>"),color:kf(C,"bgcolor")||x.tinyColorHue,borderColor:kf(C,"bordercolor"),fontFamily:kf(C,"font.family"),fontSize:kf(C,"font.size"),fontColor:kf(C,"font.color"),fontWeight:kf(C,"font.weight"),fontStyle:kf(C,"font.style"),fontVariant:kf(C,"font.variant"),fontTextcase:kf(C,"font.textcase"),fontLineposition:kf(C,"font.lineposition"),fontShadow:kf(C,"font.shadow"),nameLength:kf(C,"namelength"),textAlign:kf(C,"align"),idealAlign:"left",hovertemplate:C.hovertemplate,hovertemplateLabels:U,eventData:[x.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});mXe(j,.85),yXe(j)}}},T=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(a$,x,C),x.node.trace.node.hoverinfo!=="skip"&&(x.node.fullData=x.node.trace,t.emit("plotly_unhover",{event:Zv.event,points:[x.node]})),B5.loneUnhover(n._hoverlayer.node()))};xYt(t,i,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:u,follow:m,unhover:b,select:l},nodeEvents:{hover:k,follow:M,unhover:T,select:p}})}});var SXe=ye(yw=>{"use strict";var wYt=mc().overrideAll,TYt=Id().getModuleCalcData,AYt=s$(),SYt=W1(),MYt=Eg(),EYt=yv(),kYt=qf().prepSelect,l$=Pr(),CYt=Oa(),R7="sankey";yw.name=R7;yw.baseLayoutAttrOverrides=wYt({hoverlabel:SYt.hoverlabel},"plot","nested");yw.plot=function(e){var t=TYt(e.calcdata,R7)[0];AYt(e,t),yw.updateFx(e)};yw.clean=function(e,t,r,n){var i=n._has&&n._has(R7),a=t._has&&t._has(R7);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};yw.updateFx=function(e){for(var t=0;t<e._fullData.length;t++)LYt(e,t)};function LYt(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")){MYt(o,a);var s={_id:"x",c2p:l$.identity,_offset:r._sankey.translateX,_length:r._sankey.width},l={_id:"y",c2p:l$.identity,_offset:r._sankey.translateY,_length:r._sankey.height},u={gd:e,element:o.node(),plotinfo:{id:t,xaxis:s,yaxis:l,fillRangeItems:l$.noop},subplot:t,xaxes:[s],yaxes:[l],doneFnCompleted:function(c){var f=e._fullData[t],h,d=f.node.groups.slice(),v=[];function m(M){for(var T=f._sankey.graph.nodes,L=0;L<T.length;L++)if(T[L].pointNumber===M)return T[L]}for(var b=0;b<c.length;b++){var p=m(c[b].pointNumber);if(p)if(p.group){for(var k=0;k<p.childrenNodes.length;k++)v.push(p.childrenNodes[k].pointNumber);d[p.pointNumber-f.node._count]=!1}else v.push(p.pointNumber)}h=d.filter(Boolean).concat([v]),CYt.call("_guiRestyle",e,{"node.groups":[h]},t)}};u.prepFn=function(c,f,h){kYt(c,f,h,u,i)},EYt.init(u)}}});var EXe=ye((A2r,MXe)=>{"use strict";MXe.exports=function(t,r){for(var n=t.cd,i=[],a=n[0].trace,o=a._sankey.graph.nodes,s=0;s<o.length;s++){var l=o[s];if(!l.partOfGroup){var u=[(l.x0+l.x1)/2,(l.y0+l.y1)/2];a.orientation==="v"&&u.reverse(),r&&r.contains(u,!1,s,t)&&i.push({pointNumber:l.pointNumber})}}return i}});var CXe=ye((S2r,kXe)=>{"use strict";kXe.exports={attributes:KJ(),supplyDefaults:IWe(),calc:qWe(),plot:s$(),moduleType:"trace",name:"sankey",basePlotModule:SXe(),selectPoints:EXe(),categories:["noOpacity"],meta:{}}});var PXe=ye((M2r,LXe)=>{"use strict";LXe.exports=CXe()});var RXe=ye(U5=>{"use strict";var IXe=Mc();U5.name="indicator";U5.plot=function(e,t,r,n){IXe.plotBasePlot(U5.name,e,t,r,n)};U5.clean=function(e,t,r,n){IXe.cleanBasePlot(U5.name,e,t,r,n)}});var c$=ye((k2r,BXe)=>{"use strict";var Fx=Ao().extendFlat,FXe=Ao().extendDeep,PYt=mc().overrideAll,zXe=ec(),qXe=Ih(),IYt=Cc().attributes,Nf=Rd(),RYt=vl().templatedArray,D7=$T(),DXe=df().descriptionOnlyNumbers,u$=zXe({editType:"plot",colorEditType:"plot"}),lC={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:qXe.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"},OXe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},DYt=RYt("step",FXe({},lC,{range:OXe}));BXe.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:IYt({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Fx({},u$,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:DXe("value")},font:Fx({},u$,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:DXe("value")},increasing:{symbol:{valType:"string",dflt:D7.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:D7.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:D7.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:D7.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Fx({},u$,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:FXe({},lC,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:qXe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:PYt({range:OXe,visible:Fx({},Nf.visible,{dflt:!0}),tickmode:Nf.minor.tickmode,nticks:Nf.nticks,tick0:Nf.tick0,dtick:Nf.dtick,tickvals:Nf.tickvals,ticktext:Nf.ticktext,ticks:Fx({},Nf.ticks,{dflt:"outside"}),ticklen:Nf.ticklen,tickwidth:Nf.tickwidth,tickcolor:Nf.tickcolor,ticklabelstep:Nf.ticklabelstep,showticklabels:Nf.showticklabels,labelalias:Nf.labelalias,tickfont:zXe({}),tickangle:Nf.tickangle,tickformat:Nf.tickformat,tickformatstops:Nf.tickformatstops,tickprefix:Nf.tickprefix,showtickprefix:Nf.showtickprefix,ticksuffix:Nf.ticksuffix,showticksuffix:Nf.showticksuffix,separatethousands:Nf.separatethousands,exponentformat:Nf.exponentformat,minexponent:Nf.minexponent,showexponent:Nf.showexponent,editType:"plot"},"plot"),steps:DYt,threshold:{line:{color:Fx({},lC.line.color,{}),width:Fx({},lC.line.width,{dflt:1}),editType:"plot"},thickness:Fx({},lC.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var f$=ye((C2r,NXe)=>{"use strict";NXe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var GXe=ye((L2r,VXe)=>{"use strict";var sy=Pr(),z7=c$(),FYt=Cc().defaults,UXe=vl(),zYt=Zd(),F7=f$(),qYt=Lb(),OYt=z3(),BYt=s_(),NYt=l_();function UYt(e,t,r,n){function i(x,C){return sy.coerce(e,t,z7,x,C)}FYt(t,n,i),i("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var a=i("value");t._range=[0,typeof a=="number"?1.5*a:1];var o=new Array(2),s;if(t._hasNumber){i("number.valueformat");var l=sy.extendFlat({},n.font);l.size=void 0,sy.coerceFont(i,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=F7.defaultNumberFontSize,o[0]=!0),i("number.prefix"),i("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=sy.extendFlat({},n.font);c.size=void 0,sy.coerceFont(i,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||F7.defaultNumberFontSize),o[1]=!0),i("delta.reference",t.value),i("delta.relative"),i("delta.valueformat",t.delta.relative?"2%":""),i("delta.increasing.symbol"),i("delta.increasing.color"),i("delta.decreasing.symbol"),i("delta.decreasing.color"),i("delta.position"),i("delta.prefix"),i("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=sy.extendFlat({},n.font);f.size=.25*(s||u||F7.defaultNumberFontSize),sy.coerceFont(i,"title.font",f),i("title.text");var h,d,v,m;function b(x,C){return sy.coerce(h,d,z7.gauge,x,C)}function p(x,C){return sy.coerce(v,m,z7.gauge.axis,x,C)}if(t._hasGauge){h=e.gauge,h||(h={}),d=UXe.newContainer(t,"gauge"),b("shape");var k=t._isBullet=t.gauge.shape==="bullet";k||i("title.align","center");var M=t._isAngular=t.gauge.shape==="angular";M||i("align","center"),b("bgcolor",n.paper_bgcolor),b("borderwidth"),b("bordercolor"),b("bar.color"),b("bar.line.color"),b("bar.line.width");var T=F7.valueThickness*(t.gauge.shape==="bullet"?.5:1);b("bar.thickness",T),zYt(h,d,{name:"steps",handleItemDefaults:VYt}),b("threshold.value"),b("threshold.thickness"),b("threshold.line.width"),b("threshold.line.color"),v={},h&&(v=h.axis||{}),m=UXe.newContainer(d,"axis"),p("visible"),t._range=p("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};qYt(v,m,p,"linear"),NYt(v,m,p,"linear",L),BYt(v,m,p,"linear",L),OYt(v,m,p,L)}else i("title.align","center"),i("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function VYt(e,t){function r(n,i){return sy.coerce(e,t,z7.gauge.steps,n,i)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}VXe.exports={supplyDefaults:UYt}});var jXe=ye((P2r,HXe)=>{"use strict";function GYt(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}HXe.exports={calc:GYt}});var JXe=ye((I2r,KXe)=>{"use strict";var Tw=qa(),HYt=(H2(),pb(G2)).interpolate,WXe=(H2(),pb(G2)).interpolateNumber,zx=Pr(),jYt=zx.strScale,cC=zx.strTranslate,WYt=zx.rad2deg,XYt=Dh().MID_SHIFT,ww=So(),_w=f$(),O7=Zl(),sv=ho(),ZYt=f4(),YYt=dI(),KYt=Rd(),V5=ka(),h$={left:"start",center:"middle",right:"end"},xw={left:0,center:.5,right:1},XXe=/[yzafpnµmkMGTPEZY]/;function fC(e){return e&&e.duration>0}KXe.exports=function(t,r,n,i){var a=t._fullLayout,o;fC(n)&&i&&(o=i()),zx.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=Tw.select(this),f=u._hasGauge,h=u._isAngular,d=u._isBullet,v=u.domain,m={w:a._size.w*(v.x[1]-v.x[0]),h:a._size.h*(v.y[1]-v.y[0]),l:a._size.l+a._size.w*v.x[0],r:a._size.r+a._size.w*(1-v.x[1]),t:a._size.t+a._size.h*(1-v.y[1]),b:a._size.b+a._size.h*v.y[0]},b=m.l+m.w/2,p=m.t+m.h/2,k=Math.min(m.w/2,m.h),M=_w.innerRadius*k,T,L,x,C=u.align||"center";if(L=p,!f)T=m.l+xw[C]*m.w,x=function(j){return ZXe(j,m.w,m.h)};else if(h&&(T=b,L=p+k/2,x=function(j){return tKt(j,.9*M)}),d){var S=_w.bulletPadding,g=1-_w.bulletNumberDomainSize+S;T=m.l+(g+(1-g)*xw[C])*m.w,x=function(j){return ZXe(j,(_w.bulletNumberDomainSize-S)*m.w,m.h)}}QYt(t,c,s,{numbersX:T,numbersY:L,numbersScaler:x,transitionOpts:n,onComplete:o});var P,E;f&&(P={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},E={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var z=c.selectAll("g.angular").data(h?s:[]);z.exit().remove();var q=c.selectAll("g.angularaxis").data(h?s:[]);q.exit().remove(),h&&$Yt(t,c,s,{radius:k,innerRadius:M,gauge:z,layer:q,size:m,gaugeBg:P,gaugeOutline:E,transitionOpts:n,onComplete:o});var U=c.selectAll("g.bullet").data(d?s:[]);U.exit().remove();var G=c.selectAll("g.bulletaxis").data(d?s:[]);G.exit().remove(),d&&JYt(t,c,s,{gauge:U,layer:G,size:m,gaugeBg:P,gaugeOutline:E,transitionOpts:n,onComplete:o});var Z=c.selectAll("text.title").data(s);Z.exit().remove(),Z.enter().append("text").classed("title",!0),Z.attr("text-anchor",function(){return d?h$.right:h$[u.title.align]}).text(u.title.text).call(ww.font,u.title.font).call(O7.convertToTspans,t),Z.attr("transform",function(){var j=m.l+m.w*xw[u.title.align],N,H=_w.titlePadding,re=ww.bBox(Z.node());if(f){if(h)if(u.gauge.axis.visible){var oe=ww.bBox(q.node());N=oe.top-H-re.bottom}else N=m.t+m.h/2-k/2-re.bottom-H;d&&(N=L-(re.top+re.bottom)/2,j=m.l-_w.bulletPadding*m.w)}else N=u._numbersTop-H-re.bottom;return cC(j,N)})})};function JYt(e,t,r,n){var i=r[0].trace,a=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=i.domain,f=n.transitionOpts,h=n.onComplete,d,v,m,b,p;a.enter().append("g").classed("bullet",!0),a.attr("transform",cC(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var k=u.h,M=i.gauge.bar.thickness*k,T=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(i._hasNumber||i._hasDelta?1-_w.bulletNumberDomainSize:1);d=uC(e,i.gauge.axis),d._id="xbulletaxis",d.domain=[T,L],d.setScale(),v=sv.calcTicks(d),m=sv.makeTransTickFn(d),b=sv.getTickSigns(d)[2],p=u.t+u.h,d.visible&&(sv.drawTicks(e,d,{vals:d.ticks==="inside"?sv.clipEnds(d,v):v,layer:o,path:sv.makeTickPath(d,p,b),transFn:m}),sv.drawLabels(e,d,{vals:v,layer:o,transFn:m,labelFns:sv.makeLabelFns(d,p)}));function x(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),S=a.selectAll("g.bg-bullet").data(C);S.enter().append("g").classed("bg-bullet",!0).append("rect"),S.select("rect").call(x).call(bw),S.exit().remove();var g=a.selectAll("g.value-bullet").data([i.gauge.bar]);g.enter().append("g").classed("value-bullet",!0).append("rect"),g.select("rect").attr("height",M).attr("y",(k-M)/2).call(bw),fC(f)?g.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).attr("width",Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y)))):g.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y))):0),g.exit().remove();var P=r.filter(function(){return i.gauge.threshold.value||i.gauge.threshold.value===0}),E=a.selectAll("g.threshold-bullet").data(P);E.enter().append("g").classed("threshold-bullet",!0).append("line"),E.select("line").attr("x1",d.c2p(i.gauge.threshold.value)).attr("x2",d.c2p(i.gauge.threshold.value)).attr("y1",(1-i.gauge.threshold.thickness)/2*k).attr("y2",(1-(1-i.gauge.threshold.thickness)/2)*k).call(V5.stroke,i.gauge.threshold.line.color).style("stroke-width",i.gauge.threshold.line.width),E.exit().remove();var z=a.selectAll("g.gauge-outline").data([l]);z.enter().append("g").classed("gauge-outline",!0).append("rect"),z.select("rect").call(x).call(bw),z.exit().remove()}function $Yt(e,t,r,n){var i=r[0].trace,a=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[a.l+a.w/2,a.t+a.h/2+o/2],f=n.gauge,h=n.layer,d=n.transitionOpts,v=n.onComplete,m=Math.PI/2;function b(_e){var ke=i.gauge.axis.range[0],Ce=i.gauge.axis.range[1],ge=(_e-ke)/(Ce-ke)*Math.PI-m;return ge<-m?-m:ge>m?m:ge}function p(_e){return Tw.svg.arc().innerRadius((s+o)/2-_e/2*(o-s)).outerRadius((s+o)/2+_e/2*(o-s)).startAngle(-m)}function k(_e){_e.attr("d",function(ke){return p(ke.thickness).startAngle(b(ke.range[0])).endAngle(b(ke.range[1]))()})}var M,T,L,x;f.enter().append("g").classed("angular",!0),f.attr("transform",cC(c[0],c[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),M=uC(e,i.gauge.axis),M.type="linear",M.range=i.gauge.axis.range,M._id="xangularaxis",M.ticklabeloverflow="allow",M.setScale();var C=function(_e){return(M.range[0]-_e.x)/(M.range[1]-M.range[0])*Math.PI+Math.PI},S={},g=sv.makeLabelFns(M,0),P=g.labelStandoff;S.xFn=function(_e){var ke=C(_e);return Math.cos(ke)*P},S.yFn=function(_e){var ke=C(_e),Ce=Math.sin(ke)>0?.2:1;return-Math.sin(ke)*(P+_e.fontSize*Ce)+Math.abs(Math.cos(ke))*(_e.fontSize*XYt)},S.anchorFn=function(_e){var ke=C(_e),Ce=Math.cos(ke);return Math.abs(Ce)<.1?"middle":Ce>0?"start":"end"},S.heightFn=function(_e,ke,Ce){var ge=C(_e);return-.5*(1+Math.sin(ge))*Ce};var E=function(_e){return cC(c[0]+o*Math.cos(_e),c[1]-o*Math.sin(_e))};L=function(_e){return E(C(_e))};var z=function(_e){var ke=C(_e);return E(ke)+"rotate("+-WYt(ke)+")"};if(T=sv.calcTicks(M),x=sv.getTickSigns(M)[2],M.visible){x=M.ticks==="inside"?-1:1;var q=(M.linewidth||1)/2;sv.drawTicks(e,M,{vals:T,layer:h,path:"M"+x*q+",0h"+x*M.ticklen,transFn:z}),sv.drawLabels(e,M,{vals:T,layer:h,transFn:L,labelFns:S})}var U=[l].concat(i.gauge.steps),G=f.selectAll("g.bg-arc").data(U);G.enter().append("g").classed("bg-arc",!0).append("path"),G.select("path").call(k).call(bw),G.exit().remove();var Z=p(i.gauge.bar.thickness),j=f.selectAll("g.value-arc").data([i.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var N=j.select("path");fC(d)?(N.transition().duration(d.duration).ease(d.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).attrTween("d",eKt(Z,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):N.attr("d",typeof r[0].y=="number"?Z.endAngle(b(r[0].y)):"M0,0Z"),N.call(bw),j.exit().remove(),U=[];var H=i.gauge.threshold.value;(H||H===0)&&U.push({range:[H,H],color:i.gauge.threshold.color,line:{color:i.gauge.threshold.line.color,width:i.gauge.threshold.line.width},thickness:i.gauge.threshold.thickness});var re=f.selectAll("g.threshold-arc").data(U);re.enter().append("g").classed("threshold-arc",!0).append("path"),re.select("path").call(k).call(bw),re.exit().remove();var oe=f.selectAll("g.gauge-outline").data([u]);oe.enter().append("g").classed("gauge-outline",!0).append("path"),oe.select("path").call(k).call(bw),oe.exit().remove()}function QYt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||"center",l=h$[s],u=n.transitionOpts,c=n.onComplete,f=zx.ensureSingle(t,"g","numbers"),h,d,v,m=[];i._hasNumber&&m.push("number"),i._hasDelta&&(m.push("delta"),i.delta.position==="left"&&m.reverse());var b=f.selectAll("text").data(m);b.enter().append("text"),b.attr("text-anchor",function(){return l}).attr("class",function(E){return E}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),b.exit().remove();function p(E,z,q,U){if(E.match("s")&&q>=0!=U>=0&&!z(q).slice(-1).match(XXe)&&!z(U).slice(-1).match(XXe)){var G=E.slice().replace("s","f").replace(/\d+/,function(j){return parseInt(j)-1}),Z=uC(e,{tickformat:G});return function(j){return Math.abs(j)<1?sv.tickText(Z,j).text:z(j)}}else return z}function k(){var E=uC(e,{tickformat:i.number.valueformat},i._range);E.setScale(),sv.prepTicks(E);var z=function(j){return sv.tickText(E,j).text},q=i.number.suffix,U=i.number.prefix,G=f.select("text.number");function Z(){var j=typeof r[0].y=="number"?U+z(r[0].y)+q:"-";G.text(j).call(ww.font,i.number.font).call(O7.convertToTspans,e)}return fC(u)?G.transition().duration(u.duration).ease(u.easing).each("end",function(){Z(),c&&c()}).each("interrupt",function(){Z(),c&&c()}).attrTween("text",function(){var j=Tw.select(this),N=WXe(r[0].lastY,r[0].y);i._lastValue=r[0].y;var H=p(i.number.valueformat,z,r[0].lastY,r[0].y);return function(re){j.text(U+H(N(re))+q)}}):Z(),h=YXe(U+z(r[0].y)+q,i.number.font,l,e),G}function M(){var E=uC(e,{tickformat:i.delta.valueformat},i._range);E.setScale(),sv.prepTicks(E);var z=function(re){return sv.tickText(E,re).text},q=i.delta.suffix,U=i.delta.prefix,G=function(re){var oe=i.delta.relative?re.relativeDelta:re.delta;return oe},Z=function(re,oe){return re===0||typeof re!="number"||isNaN(re)?"-":(re>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+U+oe(re)+q},j=function(re){return re.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=G(r[0]));var N=f.select("text.delta");N.call(ww.font,i.delta.font).call(V5.fill,j({delta:i._deltaLastValue}));function H(){N.text(Z(G(r[0]),z)).call(V5.fill,j(r[0])).call(O7.convertToTspans,e)}return fC(u)?N.transition().duration(u.duration).ease(u.easing).tween("text",function(){var re=Tw.select(this),oe=G(r[0]),_e=i._deltaLastValue,ke=p(i.delta.valueformat,z,_e,oe),Ce=WXe(_e,oe);return i._deltaLastValue=oe,function(ge){re.text(Z(Ce(ge),ke)),re.call(V5.fill,j({delta:Ce(ge)}))}}).each("end",function(){H(),c&&c()}).each("interrupt",function(){H(),c&&c()}):H(),d=YXe(Z(G(r[0]),z),i.delta.font,l,e),N}var T=i.mode+i.align,L;if(i._hasDelta&&(L=M(),T+=i.delta.position+i.delta.font.size+i.delta.font.family+i.delta.valueformat,T+=i.delta.increasing.symbol+i.delta.decreasing.symbol,v=d),i._hasNumber&&(k(),T+=i.number.font.size+i.number.font.family+i.number.valueformat+i.number.suffix+i.number.prefix,v=h),i._hasDelta&&i._hasNumber){var x=[(h.left+h.right)/2,(h.top+h.bottom)/2],C=[(d.left+d.right)/2,(d.top+d.bottom)/2],S,g,P=.75*i.delta.font.size;i.delta.position==="left"&&(S=q7(i,"deltaPos",0,-1*(h.width*xw[i.align]+d.width*(1-xw[i.align])+P),T,Math.min),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:d.left+S,right:h.right,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position==="right"&&(S=q7(i,"deltaPos",0,h.width*(1-xw[i.align])+d.width*xw[i.align]+P,T,Math.max),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:h.left,right:d.right+S,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position==="bottom"&&(S=null,g=d.height,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height,bottom:h.bottom+d.height}),i.delta.position==="top"&&(S=null,g=h.top,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height-d.height,bottom:h.bottom}),L.attr({dx:S,dy:g})}(i._hasNumber||i._hasDelta)&&f.attr("transform",function(){var E=n.numbersScaler(v);T+=E[2];var z=q7(i,"numbersScale",1,E[0],T,Math.min),q;i._scaleNumbers||(z=1),i._isAngular?q=o-z*v.bottom:q=o-z*(v.top+v.bottom)/2,i._numbersTop=z*v.top+q;var U=v[s];s==="center"&&(U=(v.left+v.right)/2);var G=a-z*U;return G=q7(i,"numbersTranslate",0,G,T,Math.max),cC(G,q)+jYt(z)})}function bw(e){e.each(function(t){V5.stroke(Tw.select(this),t.line.color)}).each(function(t){V5.fill(Tw.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function eKt(e,t,r){return function(){var n=HYt(t,r);return function(i){return e.endAngle(n(i))()}}}function uC(e,t,r){var n=e._fullLayout,i=zx.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),a={type:"linear",_id:"x"+t._id},o={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return zx.coerce(i,a,KYt,l,u)}return ZYt(i,a,s,o,n),YYt(i,a,s,o),a}function ZXe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function tKt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function YXe(e,t,r,n){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),a=Tw.select(i);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(O7.convertToTspans,n).call(ww.font,t),ww.bBox(a.node())}function q7(e,t,r,n,i,a){var o="_cache"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=zx.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var QXe=ye((R2r,$Xe)=>{"use strict";$Xe.exports={moduleType:"trace",name:"indicator",basePlotModule:RXe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:c$(),supplyDefaults:GXe().supplyDefaults,calc:jXe().calc,plot:JXe(),meta:{}}});var tZe=ye((D2r,eZe)=>{"use strict";eZe.exports=QXe()});var d$=ye((z2r,aZe)=>{"use strict";var rZe=Jb(),B7=Ao().extendFlat,rKt=mc().overrideAll,iZe=ec(),iKt=Cc().attributes,nZe=df().descriptionOnlyNumbers,F2r=aZe.exports=rKt({domain:iKt({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:nZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:B7({},rZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:B7({},iZe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:nZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:B7({},rZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:B7({},iZe({arrayOk:!0}))}},"calc","from-root")});var sZe=ye((q2r,oZe)=>{"use strict";var v$=Pr(),nKt=d$(),aKt=Cc().defaults;function oKt(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(l,u){return l-u}),o=i.map(function(l){return a.indexOf(l)}),s=o.length;s<n;s++)o.push(s);t("columnorder",o)}oZe.exports=function(t,r,n,i){function a(o,s){return v$.coerce(t,r,nKt,o,s)}aKt(r,i,a),a("columnwidth"),a("header.values"),a("header.format"),a("header.align"),a("header.prefix"),a("header.suffix"),a("header.height"),a("header.line.width"),a("header.line.color"),a("header.fill.color"),v$.coerceFont(a,"header.font",i.font),oKt(r,a),a("cells.values"),a("cells.format"),a("cells.align"),a("cells.prefix"),a("cells.suffix"),a("cells.height"),a("cells.line.width"),a("cells.line.color"),a("cells.fill.color"),v$.coerceFont(a,"cells.font",i.font),r._length=null}});var uZe=ye((O2r,lZe)=>{"use strict";var sKt=iy().wrap;lZe.exports=function(){return sKt({})}});var p$=ye((B2r,cZe)=>{"use strict";cZe.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 _Ze=ye((N2r,yZe)=>{"use strict";var fZe=p$(),m$=Ao().extendFlat,lKt=Eo(),uKt=vv().isTypedArray,N7=vv().isArrayOrTypedArray;yZe.exports=function(t,r){var n=g$(r.cells.values),i=function(g){return g.slice(r.header.values.length,g.length)},a=g$(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=g$(a));var o=a.concat(i(n).map(function(){return mZe((a[0]||[""]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[fZe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],h=c.reduce(hZe,0),d=u-h,v=d+fZe.uplift,m=pZe(f,v),b=pZe(c,h),p=vZe(b,[]),k=vZe(m,p),M={},T=r._fullInput.columnorder;N7(T)&&(T=Array.from(T)),T=T.concat(i(n.map(function(g,P){return P})));var L=o.map(function(g,P){var E=N7(r.columnwidth)?r.columnwidth[Math.min(P,r.columnwidth.length-1)]:r.columnwidth;return lKt(E)?Number(E):1}),x=L.reduce(hZe,0);L=L.map(function(g){return g/x*l});var C=Math.max(y$(r.header.line.width),y$(r.cells.line.width)),S={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:C,height:u,columnOrder:T,groupHeight:u,rowBlocks:k,headerRowBlocks:p,scrollY:0,cells:m$({},r.cells,{values:n}),headerCells:m$({},r.header,{values:o}),gdColumns:o.map(function(g){return g[0]}),gdColumnsOriginalOrder:o.map(function(g){return g[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(g,P){var E=M[g];M[g]=(E||0)+1;var z=g+"__"+M[g];return{key:z,label:g,specIndex:P,xIndex:T[P],xScale:dZe,x:void 0,calcdata:void 0,columnWidth:L[P]}})};return S.columns.forEach(function(g){g.calcdata=S,g.x=dZe(g)}),S};function y$(e){if(N7(e)){for(var t=0,r=0;r<e.length;r++)t=Math.max(t,y$(e[r]));return t}return e}function hZe(e,t){return e+t}function g$(e){var t=e.slice(),r=1/0,n=0,i;for(i=0;i<t.length;i++)uKt(t[i])?t[i]=Array.from(t[i]):N7(t[i])||(t[i]=[t[i]]),r=Math.min(r,t[i].length),n=Math.max(n,t[i].length);if(r!==n)for(i=0;i<t.length;i++){var a=n-t[i].length;a&&(t[i]=t[i].concat(mZe(a)))}return t}function mZe(e){for(var t=new Array(e),r=0;r<e;r++)t[r]="";return t}function dZe(e){return e.calcdata.columns.reduce(function(t,r){return r.xIndex<e.xIndex?t+r.columnWidth:t},0)}function vZe(e,t){var r=Object.keys(e);return r.map(function(n){return m$({},e[n],{auxiliaryBlocks:t})})}function pZe(e,t){for(var r={},n,i=0,a=0,o=gZe(),s=0,l=0,u=0;u<e.length;u++)n=e[u],o.rows.push({rowIndex:u,rowHeight:n}),a+=n,(a>=t||u===e.length-1)&&(r[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=gZe(),i+=a,s=u+1,a=0);return r}function gZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var xZe=ye(_$=>{"use strict";var U7=Ao().extendFlat;_$.splitToPanels=function(e){var t=[0,0],r=U7({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:U7({},e.calcdata,{cells:e.calcdata.headerCells})}),n=U7({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),i=U7({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,i,r]};_$.splitToCells=function(e){var t=cKt(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 cKt(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var C$=ye((V2r,PZe)=>{"use strict";var Ya=p$(),tf=qa(),x$=Pr(),fKt=x$.numberFormat,Uu=iy(),b$=So(),hKt=Zl(),dKt=Pr().raiseToTop,lg=Pr().strTranslate,vKt=Pr().cancelTransition,pKt=_Ze(),EZe=xZe(),bZe=ka();PZe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll("."+Ya.cn.table).data(r.map(function(k){var M=Uu.unwrap(k),T=M.trace;return pKt(t,T)}),Uu.keyFun);i.exit().remove(),i.enter().append("g").classed(Ya.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),i.attr("width",function(k){return k.width+k.size.l+k.size.r}).attr("height",function(k){return k.height+k.size.t+k.size.b}).attr("transform",function(k){return lg(k.translateX,k.translateY)});var a=i.selectAll("."+Ya.cn.tableControlView).data(Uu.repeat,Uu.keyFun),o=a.enter().append("g").classed(Ya.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(k){a.filter(function(M){return k===M}).call(hC,t)}).on(s,function(k){if(!k.scrollbarState.wheeling){k.scrollbarState.wheeling=!0;var M=k.scrollY+tf.event.deltaY,T=G7(t,a,null,M)(k);T||(tf.event.stopPropagation(),tf.event.preventDefault()),k.scrollbarState.wheeling=!1}}).call(hC,t,!0)}a.attr("transform",function(k){return lg(k.size.l,k.size.t)});var l=a.selectAll("."+Ya.cn.scrollBackground).data(Uu.repeat,Uu.keyFun);l.enter().append("rect").classed(Ya.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),a.each(function(k){b$.setClipUrl(tf.select(this),wZe(t,k),t)});var u=a.selectAll("."+Ya.cn.yColumn).data(function(k){return k.columns},Uu.keyFun);u.enter().append("g").classed(Ya.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(k){return lg(k.x,0)}),n&&u.call(tf.behavior.drag().origin(function(k){var M=tf.select(this);return SZe(M,k,-Ya.uplift),dKt(this),k.calcdata.columnDragInProgress=!0,hC(a.filter(function(T){return k.calcdata.key===T.key}),t),k}).on("drag",function(k){var M=tf.select(this),T=function(C){return(k===C?tf.event.x:C.x)+C.columnWidth/2};k.x=Math.max(-Ya.overdrag,Math.min(k.calcdata.width+Ya.overdrag-k.columnWidth,tf.event.x));var L=kZe(u).filter(function(C){return C.calcdata.key===k.calcdata.key}),x=L.sort(function(C,S){return T(C)-T(S)});x.forEach(function(C,S){C.xIndex=S,C.x=k===C?C.x:C.xScale(C)}),u.filter(function(C){return k!==C}).transition().ease(Ya.transitionEase).duration(Ya.transitionDuration).attr("transform",function(C){return lg(C.x,0)}),M.call(vKt).attr("transform",lg(k.x,-Ya.uplift))}).on("dragend",function(k){var M=tf.select(this),T=k.calcdata;k.x=k.xScale(k),k.calcdata.columnDragInProgress=!1,SZe(M,k,0),SKt(t,T,T.columns.map(function(L){return L.xIndex}))})),u.each(function(k){b$.setClipUrl(tf.select(this),TZe(t,k),t)});var c=u.selectAll("."+Ya.cn.columnBlock).data(EZe.splitToPanels,Uu.keyFun);c.enter().append("g").classed(Ya.cn.columnBlock,!0).attr("id",function(k){return k.key}),c.style("cursor",function(k){return k.dragHandle?"ew-resize":k.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(MKt),h=c.filter(M$);n&&h.call(tf.behavior.drag().origin(function(k){return tf.event.stopPropagation(),k}).on("drag",G7(t,a,-1)).on("dragend",function(){})),w$(t,a,f,c),w$(t,a,h,c);var d=a.selectAll("."+Ya.cn.scrollAreaClip).data(Uu.repeat,Uu.keyFun);d.enter().append("clipPath").classed(Ya.cn.scrollAreaClip,!0).attr("id",function(k){return wZe(t,k)});var v=d.selectAll("."+Ya.cn.scrollAreaClipRect).data(Uu.repeat,Uu.keyFun);v.enter().append("rect").classed(Ya.cn.scrollAreaClipRect,!0).attr("x",-Ya.overdrag).attr("y",-Ya.uplift).attr("fill","none"),v.attr("width",function(k){return k.width+2*Ya.overdrag}).attr("height",function(k){return k.height+Ya.uplift});var m=u.selectAll("."+Ya.cn.columnBoundary).data(Uu.repeat,Uu.keyFun);m.enter().append("g").classed(Ya.cn.columnBoundary,!0);var b=u.selectAll("."+Ya.cn.columnBoundaryClippath).data(Uu.repeat,Uu.keyFun);b.enter().append("clipPath").classed(Ya.cn.columnBoundaryClippath,!0),b.attr("id",function(k){return TZe(t,k)});var p=b.selectAll("."+Ya.cn.columnBoundaryRect).data(Uu.repeat,Uu.keyFun);p.enter().append("rect").classed(Ya.cn.columnBoundaryRect,!0).attr("fill","none"),p.attr("width",function(k){return k.columnWidth+2*V7(k)}).attr("height",function(k){return k.calcdata.height+2*V7(k)+Ya.uplift}).attr("x",function(k){return-V7(k)}).attr("y",function(k){return-V7(k)}),E$(null,h,a)};function V7(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function wZe(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function TZe(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function kZe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function hC(e,t,r){function n(u){var c=u.rowBlocks;return A$(c,c.length-1)+(c.length?H7(c[c.length-1],1/0):1)}var i=e.selectAll("."+Ya.cn.scrollbarKit).data(Uu.repeat,Uu.keyFun);i.enter().append("g").classed(Ya.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),i.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-T$(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ya.goldenRatio*Ya.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Ya.scrollbarWidth/2+Ya.scrollbarOffset;return lg(c,T$(u))});var a=i.selectAll("."+Ya.cn.scrollbar).data(Uu.repeat,Uu.keyFun);a.enter().append("g").classed(Ya.cn.scrollbar,!0);var o=a.selectAll("."+Ya.cn.scrollbarSlider).data(Uu.repeat,Uu.keyFun);o.enter().append("g").classed(Ya.cn.scrollbarSlider,!0),o.attr("transform",function(u){return lg(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ya.cn.scrollbarGlyph).data(Uu.repeat,Uu.keyFun);s.enter().append("line").classed(Ya.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ya.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ya.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ya.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ya.scrollbarHideDelay).duration(Ya.scrollbarHideDuration).attr("stroke-opacity",0);var l=a.selectAll("."+Ya.cn.scrollbarCaptureZone).data(Uu.repeat,Uu.keyFun);l.enter().append("line").classed(Ya.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ya.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=tf.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,d=c-f.top,v=tf.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||G7(t,e,null,v(d-h.barLength/2))(u)}).call(tf.behavior.drag().origin(function(u){return tf.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",G7(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function w$(e,t,r,n){var i=gKt(r),a=mKt(i);bKt(a);var o=yKt(a);TKt(o);var s=xKt(a),l=_Kt(s);wKt(l),CZe(l,t,n,e),k$(a)}function gKt(e){var t=e.selectAll("."+Ya.cn.columnCells).data(Uu.repeat,Uu.keyFun);return t.enter().append("g").classed(Ya.cn.columnCells,!0),t.exit().remove(),t}function mKt(e){var t=e.selectAll("."+Ya.cn.columnCell).data(EZe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ya.cn.columnCell,!0),t.exit().remove(),t}function yKt(e){var t=e.selectAll("."+Ya.cn.cellRect).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ya.cn.cellRect,!0),t}function _Kt(e){var t=e.selectAll("."+Ya.cn.cellText).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ya.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){tf.event.stopPropagation()}),t}function xKt(e){var t=e.selectAll("."+Ya.cn.cellTextHolder).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ya.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function bKt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Yv(n.size,i,r),color:Yv(n.color,i,r),family:Yv(n.family,i,r),weight:Yv(n.weight,i,r),style:Yv(n.style,i,r),variant:Yv(n.variant,i,r),textcase:Yv(n.textcase,i,r),lineposition:Yv(n.lineposition,i,r),shadow:Yv(n.shadow,i,r)};t.rowNumber=t.key,t.align=Yv(t.calcdata.cells.align,i,r),t.cellBorderWidth=Yv(t.calcdata.cells.line.width,i,r),t.font=a})}function wKt(e){e.each(function(t){b$.font(tf.select(this),t.font)})}function TKt(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=tf.select(this);bZe.stroke(r,Yv(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),bZe.fill(r,Yv(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function CZe(e,t,r,n){e.text(function(i){var a=i.column.specIndex,o=i.rowNumber,s=i.value,l=typeof s=="string",u=l&&s.match(/<br>/i),c=!l||u;i.mayHaveMarkup=l&&s.match(/[<&>]/);var f=AKt(s);i.latex=f;var h=f?"":Yv(i.calcdata.cells.prefix,a,o)||"",d=f?"":Yv(i.calcdata.cells.suffix,a,o)||"",v=f?null:Yv(i.calcdata.cells.format,a,o)||null,m=h+(v?fKt(v)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!c&&!f&&(b=AZe(m)),i.cellHeightMayIncrease=u||f||i.mayHaveMarkup||(b===void 0?AZe(m):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var p;if(i.wrappingNeeded){var k=Ya.wrapSplitCharacter===" "?m.replace(/<a href=/ig,"<a_href="):m,M=k.split(Ya.wrapSplitCharacter),T=Ya.wrapSplitCharacter===" "?M.map(function(L){return L.replace(/<a_href=/ig,"<a href=")}):M;i.fragments=T.map(function(L){return{text:L,width:null}}),i.fragments.push({fragment:Ya.wrapSpacer,width:null}),p=T.join(Ya.lineBreaker)+Ya.lineBreaker+Ya.wrapSpacer}else delete i.fragments,p=m;return p}).attr("dy",function(i){return i.needsConvertToTspans?0:"0.75em"}).each(function(i){var a=this,o=tf.select(a),s=i.wrappingNeeded?kKt:CKt;i.needsConvertToTspans?hKt.convertToTspans(o,n,s(r,a,t,n,i)):tf.select(a.parentNode).attr("transform",function(l){return lg(LZe(l),Ya.cellPad)}).attr("text-anchor",function(l){return{left:"start",center:"middle",right:"end"}[l.align]})})}function AKt(e){return typeof e=="string"&&e.match(Ya.latexCheck)}function AZe(e){return e.indexOf(Ya.wrapSplitCharacter)!==-1}function SKt(e,t,r){var n=t.gdColumnsOriginalOrder;t.gdColumns.sort(function(i,a){return r[n.indexOf(i)]-r[n.indexOf(a)]}),t.columnorder=r,e.emit("plotly_restyle")}function Yv(e,t,r){if(x$.isArrayOrTypedArray(e)){var n=e[Math.min(t,e.length-1)];return x$.isArrayOrTypedArray(n)?n[Math.min(r,n.length-1)]:n}else return e}function SZe(e,t,r){e.transition().ease(Ya.releaseTransitionEase).duration(Ya.releaseTransitionDuration).attr("transform",lg(t.x,r))}function M$(e){return e.type==="cells"}function MKt(e){return e.type==="header"}function T$(e){var t=e.rowBlocks.length?e.rowBlocks[0].auxiliaryBlocks:[];return t.reduce(function(r,n){return r+H7(n,1/0)},0)}function EKt(e,t,r){for(var n=[],i=0,a=0;a<e.length;a++){for(var o=e[a],s=o.rows,l=0,u=0;u<s.length;u++)l+=s[u].rowHeight;o.allRowsHeight=l;var c=i+l,f=t,h=f+r;f<c&&h>i&&n.push(a),i+=l}return n}function E$(e,t,r){var n=kZe(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=A$(i,i.length),s=n.calcdata.groupHeight-T$(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=EKt(i,l,s);u.length===1&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=A$(c.rowBlocks,c.page)-c.scrollY;return lg(0,f)}),e&&(MZe(e,r,t,u,n.prevPages,n,0),MZe(e,r,t,u,n.prevPages,n,1),hC(r,e))}}function G7(e,t,r,n){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*tf.event.dy:n;var c=s.selectAll("."+Ya.cn.yColumn).selectAll("."+Ya.cn.columnBlock).filter(M$);return E$(e,c,s),o.scrollY===u}}function MZe(e,t,r,n,i,a,o){var s=n[o]!==i[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==i[c]});w$(e,t,l,r),i[o]=n[o]}))}function kKt(e,t,r,n){return function(){var a=tf.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(m,b){s[b].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,h,d=0,v=o.column.columnWidth-2*Ya.cellPad;for(o.value="";u.length;)f=u.shift(),h=f.width+l,d+h>v&&(o.value+=c.join(Ya.wrapSpacer)+Ya.lineBreaker,c=[],d=0),c.push(f.text),d+=h;d&&(o.value+=c.join(Ya.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),CZe(a.select("."+Ya.cn.cellText),r,e,n),tf.select(t.parentNode.parentNode).call(k$)}}function CKt(e,t,r,n,i){return function(){if(!i.settledY){var o=tf.select(t.parentNode),s=S$(i),l=i.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ya.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll("."+Ya.cn.columnCell).call(k$),E$(null,e.filter(M$),0),hC(r,n,!0)),o.attr("transform",function(){var d=this,v=d.parentNode,m=v.getBoundingClientRect(),b=tf.select(d.parentNode).select("."+Ya.cn.cellRect).node().getBoundingClientRect(),p=d.transform.baseVal.consolidate(),k=b.top-m.top+(p?p.matrix.f:Ya.cellPad);return lg(LZe(i,tf.select(d.parentNode).select("."+Ya.cn.cellTextHolder).node().getBoundingClientRect().width),k)}),i.settledY=!0}}}function LZe(e,t){switch(e.align){case"left":return Ya.cellPad;case"right":return e.column.columnWidth-(t||0)-Ya.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ya.cellPad}}function k$(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+H7(s,1/0)},0),n=S$(t),i=H7(n,t.key),a=i+r;return lg(0,a)}).selectAll("."+Ya.cn.cellRect).attr("height",function(t){return PKt(S$(t),t.key).rowHeight})}function A$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=LKt(e[n]);return r}function H7(e,t){for(var r=0,n=0;n<e.rows.length&&e.rows[n].rowIndex<t;n++)r+=e.rows[n].rowHeight;return r}function LKt(e){var t=e.allRowsHeight;if(t!==void 0)return t;for(var r=0,n=0;n<e.rows.length;n++)r+=e.rows[n].rowHeight;return e.allRowsHeight=r,r}function S$(e){return e.rowBlocks[e.page]}function PKt(e,t){return e.rows[t-e.firstRowIndex]}});var IZe=ye(W7=>{"use strict";var IKt=Id().getModuleCalcData,RKt=C$(),j7="table";W7.name=j7;W7.plot=function(e){var t=IKt(e.calcdata,j7)[0];t.length&&RKt(e,t)};W7.clean=function(e,t,r,n){var i=n._has&&n._has(j7),a=t._has&&t._has(j7);i&&!a&&n._paperdiv.selectAll(".table").remove()}});var DZe=ye((H2r,RZe)=>{"use strict";RZe.exports={attributes:d$(),supplyDefaults:sZe(),calc:uZe(),plot:C$(),moduleType:"trace",name:"table",basePlotModule:IZe(),categories:["noOpacity"],meta:{}}});var zZe=ye((j2r,FZe)=>{"use strict";FZe.exports=DZe()});var UZe=ye((W2r,NZe)=>{"use strict";var qZe=ec(),OZe=Ih(),L$=Rd(),DKt=df().descriptionWithDates,FKt=mc().overrideAll,BZe=Pd().dash,P$=Ao().extendFlat;NZe.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:qZe({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:L$.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:P$({},L$.labelalias,{editType:"calc"}),tickfont:qZe({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:DKt("tick label")},tickformatstops:FKt(L$.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:OZe.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:P$({},BZe,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:P$({},BZe,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:OZe.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var Z7=ye((X2r,HZe)=>{"use strict";var zKt=ec(),VZe=UZe(),GZe=Ih(),X7=zKt({editType:"calc"}),qKt=pf().zorder;X7.family.dflt='"Open Sans", verdana, arial, sans-serif';X7.size.dflt=12;X7.color.dflt=GZe.defaultLine;HZe.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:VZe,baxis:VZe,font:X7,color:{valType:"color",dflt:GZe.defaultLine,editType:"plot"},zorder:qKt}});var XZe=ye((Z2r,WZe)=>{"use strict";var jZe=Pr().isArray1D;WZe.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||jZe(i))&&(!s||jZe(o))){var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var KZe=ye((Y2r,YZe)=>{"use strict";var OKt=Z7(),ZZe=ka().addOpacity,BKt=Oa(),dC=Pr(),NKt=Lb(),UKt=s_(),VKt=l_(),GKt=cI(),HKt=xm(),jKt=G3();YZe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=OKt[i+"axis"];function s(g,P){return dC.coerce(t,r,o,g,P)}function l(g,P){return dC.coerce2(t,r,o,g,P)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&WKt(r,n.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",i+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=i,u==="date"){var c=BKt.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}HKt(r,n.fullLayout),r.c2p=dC.identity;var f=s("color",n.dfltColor),h=f===t.color?f:a.color,d=s("title.text");d&&(dC.coerceFont(s,"title.font",a,{overrideDflt:{size:dC.bigFont(a.size),color:h}}),s("title.offset")),s("tickangle");var v=s("autorange",!r.isValidRange(t.range));v&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),NKt(t,r,s,u),VKt(t,r,s,u,n),UKt(t,r,s,u,n),GKt(t,r,s,{data:n.data,dataAttr:i});var m=l("gridcolor",ZZe(f,.3)),b=l("gridwidth"),p=l("griddash"),k=s("showgrid");k||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var M=l("startlinecolor",f),T=l("startlinewidth",b),L=s("startline",r.showgrid||!!M||!!T);L||(delete r.startlinecolor,delete r.startlinewidth);var x=l("endlinecolor",f),C=l("endlinewidth",b),S=s("endline",r.showgrid||!!x||!!C);return S||(delete r.endlinecolor,delete r.endlinewidth),k?(s("minorgridcount"),s("minorgridwidth",b),s("minorgriddash",p),s("minorgridcolor",ZZe(m,.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 WKt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i=n+"calendar",a=e[i];e.type=jKt(t,a,{autotypenumbers:e.autotypenumbers})}}});var $Ze=ye((K2r,JZe)=>{"use strict";var XKt=KZe(),ZKt=vl();JZe.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")),YKt(t,r,n,a)};function YKt(e,t,r,n){var i=["aaxis","baxis"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=ZKt.newContainer(t,a),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:a,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};XKt(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var tYe=ye((J2r,eYe)=>{"use strict";var QZe=Pr(),KKt=XZe(),JKt=$Ze(),$Kt=Z7(),QKt=Ih();eYe.exports=function(t,r,n,i){function a(l,u){return QZe.coerce(t,r,$Kt,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",QKt.defaultLine);if(QZe.coerceFont(a,"font",i.font),a("carpet"),JKt(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=KKt(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var I$=ye(($2r,rYe)=>{"use strict";var eJt=Pr().isArrayOrTypedArray;rYe.exports=function(t,r,n){var i;for(eJt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],i=0;i<r.length;i++)t[i]=n(r[i]);return t}});var R$=ye((Q2r,iYe)=>{"use strict";iYe.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 aYe=ye((ewr,nYe)=>{"use strict";nYe.exports=function(t,r,n,i,a,o){var s=a[0]*t.dpdx(r),l=a[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),d=(a[0]*o[0]+a[1]*o[1])/f/h;c=Math.max(0,d)}var v=Math.atan2(l,s)*180/Math.PI;return v<-90?(v+=180,u=-u):v>90&&(v-=180,u=-u),{angle:v,flip:u,p:t.c2p(i,r,n),offsetMultplier:c}}});var dYe=ye((twr,hYe)=>{"use strict";var $7=qa(),Y7=So(),K7=I$(),lYe=R$(),vC=aYe(),D$=Zl(),Up=Pr(),uYe=Up.strRotate,J7=Up.strTranslate,cYe=Dh();hYe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;Up.makeTraceGroups(i,n,"trace").each(function(c){var f=$7.select(this),h=c[0],d=h.trace,v=d.aaxis,m=d.baxis,b=Up.ensureSingle(f,"g","minorlayer"),p=Up.ensureSingle(f,"g","majorlayer"),k=Up.ensureSingle(f,"g","boundarylayer"),M=Up.ensureSingle(f,"g","labellayer");f.style("opacity",d.opacity),G5(o,s,p,v,"a",v._gridlines,!0,a),G5(o,s,p,m,"b",m._gridlines,!0,a),G5(o,s,b,v,"a",v._minorgridlines,!0,a),G5(o,s,b,m,"b",m._minorgridlines,!0,a),G5(o,s,k,v,"a-boundary",v._boundarylines,a),G5(o,s,k,m,"b-boundary",m._boundarylines,a);var T=oYe(t,o,s,d,h,M,v._labels,"a-label"),L=oYe(t,o,s,d,h,M,m._labels,"b-label");rJt(t,M,d,h,o,s,T,L),tJt(d,h,u,o,s)})};function tJt(e,t,r,n,i){var a,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=Up.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,h=[];for(l=0;l<f.length;l++)a=f[l],o=K7([],a.x,n.c2p),s=K7([],a.y,i.c2p),h.push(lYe(o,s,a.bicubic));var d="M"+h.join("L")+"Z";u.attr("id",e._clipPathId),c.attr("d",d)}function G5(e,t,r,n,i,a,o){var s="const-"+i+"-lines",l=r.selectAll("."+s).data(a);l.enter().append("path").classed(s,!0).style("vector-effect",o?"none":"non-scaling-stroke"),l.each(function(u){var c=u,f=c.x,h=c.y,d=K7([],f,e.c2p),v=K7([],h,t.c2p),m="M"+lYe(d,v,c.smoothing),b=$7.select(this);b.attr("d",m).style("stroke-width",c.width).style("stroke",c.color).style("stroke-dasharray",Y7.dashStyle(c.dash,c.width)).style("fill","none")}),l.exit().remove()}function oYe(e,t,r,n,i,a,o,s){var l=a.selectAll("text."+s).data(o);l.enter().append("text").classed(s,!0);var u=0,c={};return l.each(function(f,h){var d;if(f.axis.tickangle==="auto")d=vC(n,t,r,f.xy,f.dxy);else{var v=(f.axis.tickangle+180)*Math.PI/180;d=vC(n,t,r,f.xy,[Math.cos(v),Math.sin(v)])}h||(c={angle:d.angle,flip:d.flip});var m=(f.endAnchor?-1:1)*d.flip,b=$7.select(this).attr({"text-anchor":m>0?"start":"end","data-notex":1}).call(Y7.font,f.font).text(f.text).call(D$.convertToTspans,e),p=Y7.bBox(this);b.attr("transform",J7(d.p[0],d.p[1])+uYe(d.angle)+J7(f.axis.labelpadding*m,p.height*.3)),u=Math.max(u,p.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function rJt(e,t,r,n,i,a,o,s){var l,u,c,f,h=Up.aggNums(Math.min,null,r.a),d=Up.aggNums(Math.max,null,r.a),v=Up.aggNums(Math.min,null,r.b),m=Up.aggNums(Math.max,null,r.b);l=.5*(h+d),u=v,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&Up.extendFlat(o,vC(r,i,a,c,r.dxydb_rough(l,u))),sYe(e,t,r,n,c,f,r.aaxis,i,a,o,"a-title"),l=h,u=.5*(v+m),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&Up.extendFlat(s,vC(r,i,a,c,r.dxyda_rough(l,u))),sYe(e,t,r,n,c,f,r.baxis,i,a,s,"b-title")}var fYe=cYe.LINE_SPACING,iJt=(1-cYe.MID_SHIFT)/fYe+1;function sYe(e,t,r,n,i,a,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var h=t.selectAll("text."+c).data(f),d=u.maxExtent;h.enter().append("text").classed(c,!0),h.each(function(){var v=vC(r,s,l,i,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var m=o.title.font.size;d+=m+o.title.offset;var b=u.angle+(u.flip<0?180:0),p=(b-v.angle+450)%360,k=p>90&&p<270,M=$7.select(this);M.text(o.title.text).call(D$.convertToTspans,e),k&&(d=(-D$.lineCount(M)+iJt)*fYe*m-d),M.attr("transform",J7(v.p[0],v.p[1])+uYe(v.angle)+J7(0,d)).attr("text-anchor","middle").call(Y7.font,o.title.font)}),h.exit().remove()}});var pYe=ye((rwr,vYe)=>{"use strict";var Q7=Pr().isArrayOrTypedArray;vYe.exports=function(e,t,r){var n,i,a,o,s,l,u=[],c=Q7(e)?e.length:e,f=Q7(t)?t.length:t,h=Q7(e)?e:null,d=Q7(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(f-1));var v,m=1/0,b=-1/0;for(i=0;i<f;i++)for(u[i]=[],l=d?(d[i]-d[0])*o:i/(f-1),n=0;n<c;n++)s=h?(h[n]-h[0])*a:n/(c-1),v=s-l*r,m=Math.min(v,m),b=Math.max(v,b),u[i][n]=v;var p=1/(b-m),k=-m*p;for(i=0;i<f;i++)for(n=0;n<c;n++)u[i][n]=p*u[i][n]+k;return u}});var _Ye=ye((iwr,yYe)=>{"use strict";var gYe=Pr().isArrayOrTypedArray;yYe.exports=function(e){return mYe(e,0)};function mYe(e,t){if(!gYe(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(gYe(o)){var s=mYe(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 bYe=ye((nwr,xYe)=>{"use strict";var nJt=ho(),qx=Ao().extendFlat;xYe.exports=function(t,r,n){var i,a,o,s,l,u,c,f,h,d,v,m,b,p,k=t["_"+r],M=t[r+"axis"],T=M._gridlines=[],L=M._minorgridlines=[],x=M._boundarylines=[],C=t["_"+n],S=t[n+"axis"];M.tickmode==="array"&&(M.tickvals=k.slice());var g=t._xctrl,P=t._yctrl,E=g[0].length,z=g.length,q=t._a.length,U=t._b.length;nJt.prepTicks(M),M.tickmode==="array"&&delete M.tickvals;var G=M.smoothing?3:1;function Z(N){var H,re,oe,_e,ke,Ce,ge,ie,Se,Ee,we,De,Le=[],me=[],Pe={};if(r==="b")for(re=t.b2j(N),oe=Math.floor(Math.max(0,Math.min(U-2,re))),_e=re-oe,Pe.length=U,Pe.crossLength=q,Pe.xy=function(ce){return t.evalxy([],ce,re)},Pe.dxy=function(ce,He){return t.dxydi([],ce,oe,He,_e)},H=0;H<q;H++)Ce=Math.min(q-2,H),ge=H-Ce,ie=t.evalxy([],H,re),S.smoothing&&H>0&&(Se=t.dxydi([],H-1,oe,0,_e),Le.push(ke[0]+Se[0]/3),me.push(ke[1]+Se[1]/3),Ee=t.dxydi([],H-1,oe,1,_e),Le.push(ie[0]-Ee[0]/3),me.push(ie[1]-Ee[1]/3)),Le.push(ie[0]),me.push(ie[1]),ke=ie;else for(H=t.a2i(N),Ce=Math.floor(Math.max(0,Math.min(q-2,H))),ge=H-Ce,Pe.length=q,Pe.crossLength=U,Pe.xy=function(ce){return t.evalxy([],H,ce)},Pe.dxy=function(ce,He){return t.dxydj([],Ce,ce,ge,He)},re=0;re<U;re++)oe=Math.min(U-2,re),_e=re-oe,ie=t.evalxy([],H,re),S.smoothing&&re>0&&(we=t.dxydj([],Ce,re-1,ge,0),Le.push(ke[0]+we[0]/3),me.push(ke[1]+we[1]/3),De=t.dxydj([],Ce,re-1,ge,1),Le.push(ie[0]-De[0]/3),me.push(ie[1]-De[1]/3)),Le.push(ie[0]),me.push(ie[1]),ke=ie;return Pe.axisLetter=r,Pe.axis=M,Pe.crossAxis=S,Pe.value=N,Pe.constvar=n,Pe.index=f,Pe.x=Le,Pe.y=me,Pe.smoothing=S.smoothing,Pe}function j(N){var H,re,oe,_e,ke,Ce=[],ge=[],ie={};if(ie.length=k.length,ie.crossLength=C.length,r==="b")for(oe=Math.max(0,Math.min(U-2,N)),ke=Math.min(1,Math.max(0,N-oe)),ie.xy=function(Se){return t.evalxy([],Se,N)},ie.dxy=function(Se,Ee){return t.dxydi([],Se,oe,Ee,ke)},H=0;H<E;H++)Ce[H]=g[N*G][H],ge[H]=P[N*G][H];else for(re=Math.max(0,Math.min(q-2,N)),_e=Math.min(1,Math.max(0,N-re)),ie.xy=function(Se){return t.evalxy([],N,Se)},ie.dxy=function(Se,Ee){return t.dxydj([],re,Se,_e,Ee)},H=0;H<z;H++)Ce[H]=g[H][N*G],ge[H]=P[H][N*G];return ie.axisLetter=r,ie.axis=M,ie.crossAxis=S,ie.value=k[N],ie.constvar=n,ie.index=N,ie.x=Ce,ie.y=ge,ie.smoothing=S.smoothing,ie}if(M.tickmode==="array"){for(s=5e-15,l=[Math.floor((k.length-1-M.arraytick0)/M.arraydtick*(1+s)),Math.ceil(-M.arraytick0/M.arraydtick/(1+s))].sort(function(N,H){return N-H}),u=l[0]-1,c=l[1]+1,f=u;f<c;f++)a=M.arraytick0+M.arraydtick*f,!(a<0||a>k.length-1)&&T.push(qx(j(a),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=u;f<c;f++)if(o=M.arraytick0+M.arraydtick*f,v=Math.min(o+M.arraydtick,k.length-1),!(o<0||o>k.length-1)&&!(v<0||v>k.length-1))for(m=k[o],b=k[v],i=0;i<M.minorgridcount;i++)p=v-o,!(p<=0)&&(d=m+(b-m)*(i+1)/(M.minorgridcount+1)*(M.arraydtick/p),!(d<k[0]||d>k[k.length-1])&&L.push(qx(Z(d),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash})));M.startline&&x.push(qx(j(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&x.push(qx(j(k.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((k[k.length-1]-M.tick0)/M.dtick*(1+s)),Math.ceil((k[0]-M.tick0)/M.dtick/(1+s))].sort(function(N,H){return N-H}),u=l[0],c=l[1],f=u;f<=c;f++)h=M.tick0+M.dtick*f,T.push(qx(Z(h),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=u-1;f<c+1;f++)for(h=M.tick0+M.dtick*f,i=0;i<M.minorgridcount;i++)d=h+M.dtick*(i+1)/(M.minorgridcount+1),!(d<k[0]||d>k[k.length-1])&&L.push(qx(Z(d),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash}));M.startline&&x.push(qx(Z(k[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&x.push(qx(Z(k[k.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}});var SYe=ye((awr,AYe)=>{"use strict";var wYe=ho(),TYe=Ao().extendFlat;AYe.exports=function(t,r){var n,i,a,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n<u.length;n++)s=u[n],["start","both"].indexOf(r.showticklabels)!==-1&&(i=wYe.tickText(r,s.value),TYe(i,{prefix:a,suffix:o,endAnchor:!0,xy:s.xy(0),dxy:s.dxy(0,0),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:n===0,isLast:n===u.length-1}),l.push(i)),["end","both"].indexOf(r.showticklabels)!==-1&&(i=wYe.tickText(r,s.value),TYe(i,{endAnchor:!1,xy:s.xy(s.crossLength-1),dxy:s.dxy(s.crossLength-2,1),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:n===0,isLast:n===u.length-1}),l.push(i))}});var EYe=ye((owr,MYe)=>{"use strict";MYe.exports=function(t,r,n,i){var a,o,s,l=[],u=!!n.smoothing,c=!!i.smoothing,f=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=f;a++)o[a]=t[0][a],s[a]=r[0][a];for(l.push({x:o,y:s,bicubic:u}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][f],s[a]=r[a][f];for(l.push({x:o,y:s,bicubic:c}),a=f,o=[],s=[];a>=0;a--)o[f-a]=t[h][a],s[f-a]=r[h][a];for(l.push({x:o,y:s,bicubic:u}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return l.push({x:o,y:s,bicubic:c}),l}});var CYe=ye((swr,kYe)=>{"use strict";var aJt=Pr();kYe.exports=function(t,r,n){var i,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(oe,_e){var ke=0,Ce,ge=0;return oe>0&&(Ce=t[_e][oe-1])!==void 0&&(ge++,ke+=Ce),oe<u-1&&(Ce=t[_e][oe+1])!==void 0&&(ge++,ke+=Ce),_e>0&&(Ce=t[_e-1][oe])!==void 0&&(ge++,ke+=Ce),_e<c-1&&(Ce=t[_e+1][oe])!==void 0&&(ge++,ke+=Ce),ke/Math.max(1,ge)}var h=0;for(i=0;i<u;i++)for(a=0;a<c;a++)t[a][i]===void 0&&(s.push(i),l.push(a),t[a][i]=f(i,a)),h=Math.max(h,Math.abs(t[a][i]));if(!s.length)return t;var d,v,m,b,p,k,M,T,L,x,C,S=1e-5,g=0,P=100,E=0,z=s.length;do{for(g=0,o=0;o<z;o++){i=s[o],a=l[o];var q=0,U=0,G,Z,j,N,H,re;i===0?(H=Math.min(u-1,2),j=r[H],N=r[1],G=t[a][H],Z=t[a][1],U+=Z+(Z-G)*(r[0]-N)/(N-j),q++):i===u-1&&(H=Math.max(0,u-3),j=r[H],N=r[u-2],G=t[a][H],Z=t[a][u-2],U+=Z+(Z-G)*(r[u-1]-N)/(N-j),q++),(i===0||i===u-1)&&a>0&&a<c-1&&(d=n[a+1]-n[a],v=n[a]-n[a-1],U+=(v*t[a+1][i]+d*t[a-1][i])/(v+d),q++),a===0?(re=Math.min(c-1,2),j=n[re],N=n[1],G=t[re][i],Z=t[1][i],U+=Z+(Z-G)*(n[0]-N)/(N-j),q++):a===c-1&&(re=Math.max(0,c-3),j=n[re],N=n[c-2],G=t[re][i],Z=t[c-2][i],U+=Z+(Z-G)*(n[c-1]-N)/(N-j),q++),(a===0||a===c-1)&&i>0&&i<u-1&&(d=r[i+1]-r[i],v=r[i]-r[i-1],U+=(v*t[a][i+1]+d*t[a][i-1])/(v+d),q++),q?U/=q:(m=r[i+1]-r[i],b=r[i]-r[i-1],p=n[a+1]-n[a],k=n[a]-n[a-1],M=m*b*(m+b),T=p*k*(p+k),U=(M*(k*t[a+1][i]+p*t[a-1][i])+T*(b*t[a][i+1]+m*t[a][i-1]))/(T*(b+m)+M*(k+p))),L=U-t[a][i],x=L/h,g+=x*x,C=q?0:.85,t[a][i]+=L*(1+C)}g=Math.sqrt(g)}while(E++<P&&g>S);return aJt.log("Smoother converged to",g,"after",E,"iterations"),t}});var PYe=ye((lwr,LYe)=>{"use strict";LYe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var DYe=ye((uwr,RYe)=>{"use strict";var IYe=.5;RYe.exports=function(t,r,n,i){var a=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(a*a+o*o,IYe/2),c=Math.pow(s*s+l*l,IYe/2),f=(c*c*a-u*u*s)*i,h=(c*c*o-u*u*l)*i,d=c*(u+c)*3,v=u*(u+c)*3;return[[r[0]+(d&&f/d),r[1]+(d&&h/d)],[r[0]-(v&&f/v),r[1]-(v&&h/v)]]}});var zYe=ye((cwr,FYe)=>{"use strict";var F$=DYe(),e9=Pr().ensureArray;function H5(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}FYe.exports=function(t,r,n,i,a,o){var s,l,u,c,f,h,d,v,m,b,p=n[0].length,k=n.length,M=a?3*p-2:p,T=o?3*k-2:k;for(t=e9(t,T),r=e9(r,T),u=0;u<T;u++)t[u]=e9(t[u],M),r[u]=e9(r[u],M);for(l=0,c=0;l<k;l++,c+=o?3:1)for(f=t[c],h=r[c],d=n[l],v=i[l],s=0,u=0;s<p;s++,u+=a?3:1)f[u]=d[s],h[u]=v[s];if(a)for(l=0,c=0;l<k;l++,c+=o?3:1){for(s=1,u=3;s<p-1;s++,u+=3)m=F$([n[l][s-1],i[l][s-1]],[n[l][s],i[l][s]],[n[l][s+1],i[l][s+1]],a),t[c][u-1]=m[0][0],r[c][u-1]=m[0][1],t[c][u+1]=m[1][0],r[c][u+1]=m[1][1];b=H5([t[c][0],r[c][0]],[t[c][2],r[c][2]],[t[c][3],r[c][3]]),t[c][1]=b[0],r[c][1]=b[1],b=H5([t[c][M-1],r[c][M-1]],[t[c][M-3],r[c][M-3]],[t[c][M-4],r[c][M-4]]),t[c][M-2]=b[0],r[c][M-2]=b[1]}if(o)for(u=0;u<M;u++){for(c=3;c<T-3;c+=3)m=F$([t[c-3][u],r[c-3][u]],[t[c][u],r[c][u]],[t[c+3][u],r[c+3][u]],o),t[c-1][u]=m[0][0],r[c-1][u]=m[0][1],t[c+1][u]=m[1][0],r[c+1][u]=m[1][1];b=H5([t[0][u],r[0][u]],[t[2][u],r[2][u]],[t[3][u],r[3][u]]),t[1][u]=b[0],r[1][u]=b[1],b=H5([t[T-1][u],r[T-1][u]],[t[T-3][u],r[T-3][u]],[t[T-4][u],r[T-4][u]]),t[T-2][u]=b[0],r[T-2][u]=b[1]}if(a&&o)for(c=1;c<T;c+=(c+1)%3===0?2:1){for(u=3;u<M-3;u+=3)m=F$([t[c][u-3],r[c][u-3]],[t[c][u],r[c][u]],[t[c][u+3],r[c][u+3]],a),t[c][u-1]=.5*(t[c][u-1]+m[0][0]),r[c][u-1]=.5*(r[c][u-1]+m[0][1]),t[c][u+1]=.5*(t[c][u+1]+m[1][0]),r[c][u+1]=.5*(r[c][u+1]+m[1][1]);b=H5([t[c][0],r[c][0]],[t[c][2],r[c][2]],[t[c][3],r[c][3]]),t[c][1]=.5*(t[c][1]+b[0]),r[c][1]=.5*(r[c][1]+b[1]),b=H5([t[c][M-1],r[c][M-1]],[t[c][M-3],r[c][M-3]],[t[c][M-4],r[c][M-4]]),t[c][M-2]=.5*(t[c][M-2]+b[0]),r[c][M-2]=.5*(r[c][M-2]+b[1])}return[t,r]}});var OYe=ye((fwr,qYe)=>{"use strict";qYe.exports=function(e,t,r,n,i){var a=t-2,o=r-2;return n&&i?function(s,l,u){s||(s=[]);var c,f,h,d,v,m,b=Math.max(0,Math.min(Math.floor(l),a)),p=Math.max(0,Math.min(Math.floor(u),o)),k=Math.max(0,Math.min(1,l-b)),M=Math.max(0,Math.min(1,u-p));b*=3,p*=3;var T=k*k,L=T*k,x=1-k,C=x*x,S=C*x,g=M*M,P=g*M,E=1-M,z=E*E,q=z*E;for(m=0;m<e.length;m++)v=e[m],c=S*v[p][b]+3*(C*k*v[p][b+1]+x*T*v[p][b+2])+L*v[p][b+3],f=S*v[p+1][b]+3*(C*k*v[p+1][b+1]+x*T*v[p+1][b+2])+L*v[p+1][b+3],h=S*v[p+2][b]+3*(C*k*v[p+2][b+1]+x*T*v[p+2][b+2])+L*v[p+2][b+3],d=S*v[p+3][b]+3*(C*k*v[p+3][b+1]+x*T*v[p+3][b+2])+L*v[p+3][b+3],s[m]=q*c+3*(z*M*f+E*g*h)+P*d;return s}:n?function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),v,m,b,p,k,M;c*=3;var T=h*h,L=T*h,x=1-h,C=x*x,S=C*x,g=1-d;for(k=0;k<e.length;k++)M=e[k],v=g*M[f][c]+d*M[f+1][c],m=g*M[f][c+1]+d*M[f+1][c+1],b=g*M[f][c+2]+d*M[f+1][c+1],p=g*M[f][c+3]+d*M[f+1][c+1],s[k]=S*v+3*(C*h*m+x*T*b)+L*p;return s}:i?function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),v,m,b,p,k,M;f*=3;var T=d*d,L=T*d,x=1-d,C=x*x,S=C*x,g=1-h;for(k=0;k<e.length;k++)M=e[k],v=g*M[f][c]+h*M[f][c+1],m=g*M[f+1][c]+h*M[f+1][c+1],b=g*M[f+2][c]+h*M[f+2][c+1],p=g*M[f+3][c]+h*M[f+3][c+1],s[k]=S*v+3*(C*d*m+x*T*b)+L*p;return s}:function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),v,m,b,p,k=1-d,M=1-h;for(b=0;b<e.length;b++)p=e[b],v=M*p[f][c]+h*p[f][c+1],m=M*p[f+1][c]+h*p[f+1][c+1],s[b]=k*v+d*m;return s}}});var NYe=ye((hwr,BYe)=>{"use strict";BYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,m=1-o,b=m*m,p=m*o*2,k=-3*b,M=3*(b-p),T=3*(p-v),L=3*v,x=s*s,C=x*s,S=1-s,g=S*S,P=g*S;for(d=0;d<e.length;d++)h=e[d],l=k*h[a][i]+M*h[a][i+1]+T*h[a][i+2]+L*h[a][i+3],u=k*h[a+1][i]+M*h[a+1][i+1]+T*h[a+1][i+2]+L*h[a+1][i+3],c=k*h[a+2][i]+M*h[a+2][i+1]+T*h[a+2][i+2]+L*h[a+2][i+3],f=k*h[a+3][i]+M*h[a+3][i+1]+T*h[a+3][i+2]+L*h[a+3][i+3],n[d]=P*l+3*(g*s*u+S*x*c)+C*f;return n}:t?function(n,i,a,o,s){n||(n=[]);var l,u,c,f;i*=3;var h=o*o,d=1-o,v=d*d,m=d*o*2,b=-3*v,p=3*(v-m),k=3*(m-h),M=3*h,T=1-s;for(c=0;c<e.length;c++)f=e[c],l=b*f[a][i]+p*f[a][i+1]+k*f[a][i+2]+M*f[a][i+3],u=b*f[a+1][i]+p*f[a+1][i+1]+k*f[a+1][i+2]+M*f[a+1][i+3],n[c]=T*l+s*u;return n}:r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;a*=3;var v=s*s,m=v*s,b=1-s,p=b*b,k=p*b;for(h=0;h<e.length;h++)d=e[h],l=d[a][i+1]-d[a][i],u=d[a+1][i+1]-d[a+1][i],c=d[a+2][i+1]-d[a+2][i],f=d[a+3][i+1]-d[a+3][i],n[h]=k*l+3*(p*s*u+b*v*c)+m*f;return n}:function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h=1-s;for(c=0;c<e.length;c++)f=e[c],l=f[a][i+1]-f[a][i],u=f[a+1][i+1]-f[a+1][i],n[c]=h*l+s*u;return n}}});var VYe=ye((dwr,UYe)=>{"use strict";UYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,m=v*o,b=1-o,p=b*b,k=p*b,M=s*s,T=1-s,L=T*T,x=T*s*2,C=-3*L,S=3*(L-x),g=3*(x-M),P=3*M;for(d=0;d<e.length;d++)h=e[d],l=C*h[a][i]+S*h[a+1][i]+g*h[a+2][i]+P*h[a+3][i],u=C*h[a][i+1]+S*h[a+1][i+1]+g*h[a+2][i+1]+P*h[a+3][i+1],c=C*h[a][i+2]+S*h[a+1][i+2]+g*h[a+2][i+2]+P*h[a+3][i+2],f=C*h[a][i+3]+S*h[a+1][i+3]+g*h[a+2][i+3]+P*h[a+3][i+3],n[d]=k*l+3*(p*o*u+b*v*c)+m*f;return n}:t?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3;var v=s*s,m=v*s,b=1-s,p=b*b,k=p*b;for(h=0;h<e.length;h++)d=e[h],l=d[a+1][i]-d[a][i],u=d[a+1][i+1]-d[a][i+1],c=d[a+1][i+2]-d[a][i+2],f=d[a+1][i+3]-d[a][i+3],n[h]=k*l+3*(p*s*u+b*v*c)+m*f;return n}:r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f;a*=3;var h=1-o,d=s*s,v=1-s,m=v*v,b=v*s*2,p=-3*m,k=3*(m-b),M=3*(b-d),T=3*d;for(c=0;c<e.length;c++)f=e[c],l=p*f[a][i]+k*f[a+1][i]+M*f[a+2][i]+T*f[a+3][i],u=p*f[a][i+1]+k*f[a+1][i+1]+M*f[a+2][i+1]+T*f[a+3][i+1],n[c]=h*l+o*u;return n}:function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h=1-o;for(c=0;c<e.length;c++)f=e[c],l=f[a+1][i]-f[a][i],u=f[a+1][i+1]-f[a][i+1],n[c]=h*l+o*u;return n}}});var WYe=ye((vwr,jYe)=>{"use strict";var GYe=PYe(),HYe=U6().findBin,oJt=zYe(),sJt=OYe(),lJt=NYe(),uJt=VYe();jYe.exports=function(t){var r=t._a,n=t._b,i=r.length,a=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[i-1],c=n[0],f=n[a-1],h=r[r.length-1]-r[0],d=n[n.length-1]-n[0],v=h*GYe.RELATIVE_CULL_TOLERANCE,m=d*GYe.RELATIVE_CULL_TOLERANCE;l-=v,u+=v,c-=m,f+=m,t.isVisible=function(b,p){return b>l&&b<u&&p>c&&p<f},t.isOccluded=function(b,p){return b<l||b>u||p<c||p>f},t.setScale=function(){var b=t._x,p=t._y,k=oJt(t._xctrl,t._yctrl,b,p,o.smoothing,s.smoothing);t._xctrl=k[0],t._yctrl=k[1],t.evalxy=sJt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=lJt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=uJt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var p=Math.max(0,Math.floor(b[0]),i-2),k=b[0]-p;return(1-k)*r[p]+k*r[p+1]},t.j2b=function(b){var p=Math.max(0,Math.floor(b[1]),i-2),k=b[1]-p;return(1-k)*n[p]+k*n[p+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var p=Math.max(0,Math.min(HYe(b,r),i-2)),k=r[p],M=r[p+1];return Math.max(0,Math.min(i-1,p+(b-k)/(M-k)))},t.b2j=function(b){var p=Math.max(0,Math.min(HYe(b,n),a-2)),k=n[p],M=n[p+1];return Math.max(0,Math.min(a-1,p+(b-k)/(M-k)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,p){return t.evalxy([],b,p)},t.ab2xy=function(b,p,k){if(!k&&(b<r[0]||b>r[i-1]|p<n[0]||p>n[a-1]))return[!1,!1];var M=t.a2i(b),T=t.b2j(p),L=t.evalxy([],M,T);if(k){var x=0,C=0,S=[],g,P,E,z;b<r[0]?(g=0,P=0,x=(b-r[0])/(r[1]-r[0])):b>r[i-1]?(g=i-2,P=1,x=(b-r[i-1])/(r[i-1]-r[i-2])):(g=Math.max(0,Math.min(i-2,Math.floor(M))),P=M-g),p<n[0]?(E=0,z=0,C=(p-n[0])/(n[1]-n[0])):p>n[a-1]?(E=a-2,z=1,C=(p-n[a-1])/(n[a-1]-n[a-2])):(E=Math.max(0,Math.min(a-2,Math.floor(T))),z=T-E),x&&(t.dxydi(S,g,E,P,z),L[0]+=S[0]*x,L[1]+=S[1]*x),C&&(t.dxydj(S,g,E,P,z),L[0]+=S[0]*C,L[1]+=S[1]*C)}return L},t.c2p=function(b,p,k){return[p.c2p(b[0]),k.c2p(b[1])]},t.p2x=function(b,p,k){return[p.p2c(b[0]),k.p2c(b[1])]},t.dadi=function(b){var p=Math.max(0,Math.min(r.length-2,b));return r[p+1]-r[p]},t.dbdj=function(b){var p=Math.max(0,Math.min(n.length-2,b));return n[p+1]-n[p]},t.dxyda=function(b,p,k,M){var T=t.dxydi(null,b,p,k,M),L=t.dadi(b,k);return[T[0]/L,T[1]/L]},t.dxydb=function(b,p,k,M){var T=t.dxydj(null,b,p,k,M),L=t.dbdj(p,M);return[T[0]/L,T[1]/L]},t.dxyda_rough=function(b,p,k){var M=h*(k||.1),T=t.ab2xy(b+M,p,!0),L=t.ab2xy(b-M,p,!0);return[(T[0]-L[0])*.5/M,(T[1]-L[1])*.5/M]},t.dxydb_rough=function(b,p,k){var M=d*(k||.1),T=t.ab2xy(b,p+M,!0),L=t.ab2xy(b,p-M,!0);return[(T[0]-L[0])*.5/M,(T[1]-L[1])*.5/M]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var eKe=ye((pwr,QYe)=>{"use strict";var t9=ho(),XYe=Pr().isArray1D,cJt=pYe(),ZYe=_Ye(),YYe=bYe(),KYe=SYe(),fJt=EYe(),JYe=u8(),$Ye=CYe(),hJt=s8(),dJt=WYe();QYe.exports=function(t,r){var n=t9.getFromId(t,r.xaxis),i=t9.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&XYe(s)&&u.push("x"),l&&XYe(l)&&u.push("y"),u.length&&hJt(r,a,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var h={};if(r._cheater){var d=a.cheatertype==="index"?c.length:c,v=o.cheatertype==="index"?f.length:f;s=cJt(d,v,r.cheaterslope)}r._x=s=JYe(s),r._y=l=JYe(l),$Ye(s,c,f),$Ye(l,c,f),dJt(r),r.setScale();var m=ZYe(s),b=ZYe(l),p=.5*(m[1]-m[0]),k=.5*(m[1]+m[0]),M=.5*(b[1]-b[0]),T=.5*(b[1]+b[0]),L=1.3;return m=[k-p*L,k+p*L],b=[T-M*L,T+M*L],r._extremes[n._id]=t9.findExtremes(n,m,{padded:!0}),r._extremes[i._id]=t9.findExtremes(i,b,{padded:!0}),YYe(r,"a","b"),YYe(r,"b","a"),KYe(r,a),KYe(r,o),h.clipsegments=fJt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var rKe=ye((gwr,tKe)=>{"use strict";tKe.exports={attributes:Z7(),supplyDefaults:tYe(),plot:dYe(),calc:eKe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:mh(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var nKe=ye((mwr,iKe)=>{"use strict";iKe.exports=rKe()});var z$=ye((ywr,lKe)=>{"use strict";var vJt=Pg(),c0=pf(),pJt=Gl(),{hovertemplateAttrs:gJt,texttemplateAttrs:mJt,templatefallbackAttrs:aKe}=Ll(),oKe=Tu(),Ox=Ao().extendFlat,ug=c0.marker,j5=c0.line,sKe=ug.line;lKe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:Ox({},c0.mode,{dflt:"markers"}),text:Ox({},c0.text,{}),texttemplate:mJt({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:aKe({editType:"plot"}),hovertext:Ox({},c0.hovertext,{}),line:{color:j5.color,width:j5.width,dash:j5.dash,backoff:j5.backoff,shape:Ox({},j5.shape,{values:["linear","spline"]}),smoothing:j5.smoothing,editType:"calc"},connectgaps:c0.connectgaps,fill:Ox({},c0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:vJt(),marker:Ox({symbol:ug.symbol,opacity:ug.opacity,maxdisplayed:ug.maxdisplayed,angle:ug.angle,angleref:ug.angleref,standoff:ug.standoff,size:ug.size,sizeref:ug.sizeref,sizemin:ug.sizemin,sizemode:ug.sizemode,line:Ox({width:sKe.width,dash:sKe.dash,editType:"calc"},oKe("marker.line")),gradient:ug.gradient,editType:"calc"},oKe("marker")),textfont:c0.textfont,textposition:c0.textposition,selected:c0.selected,unselected:c0.unselected,hoverinfo:Ox({},pJt.hoverinfo,{flags:["a","b","text","name"]}),hoveron:c0.hoveron,hovertemplate:gJt(),hovertemplatefallback:aKe(),zorder:c0.zorder}});var hKe=ye((_wr,fKe)=>{"use strict";var uKe=Pr(),yJt=Lm(),W5=Ru(),_Jt=$p(),xJt=D0(),cKe=lT(),bJt=F0(),wJt=Fg(),TJt=z$();fKe.exports=function(t,r,n,i){function a(h,d){return uKe.coerce(t,r,TJt,h,d)}a("carpet"),r.xaxis="x",r.yaxis="y";var o=a("a"),s=a("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext");var u=l<yJt.PTS_LINESONLY?"lines+markers":"lines";a("mode",u),W5.hasMarkers(r)&&_Jt(t,r,n,i,a,{gradient:!0}),W5.hasLines(r)&&(xJt(t,r,n,i,a,{backoff:!0}),cKe(t,r,a),a("connectgaps")),W5.hasText(r)&&bJt(t,r,i,a);var c=[];(W5.hasMarkers(r)||W5.hasText(r))&&(a("marker.maxdisplayed"),c.push("points")),a("fill"),r.fill!=="none"&&(wJt(t,r,n,a),W5.hasLines(r)||cKe(t,r,a)),(r.fill==="tonext"||r.fill==="toself")&&c.push("fills");var f=a("hoveron",c.join("+")||"points");f!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback")),a("zorder"),uKe.coerceSelectionMarkerOpacity(r,a)}});var vKe=ye((xwr,dKe)=>{"use strict";dKe.exports=function(t,r){var n={},i=r._carpet,a=i.ab2ij([t.a,t.b]),o=Math.floor(a[0]),s=a[0]-o,l=Math.floor(a[1]),u=a[1]-l,c=i.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var r9=ye((bwr,pKe)=>{"use strict";pKe.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 yKe=ye((wwr,mKe)=>{"use strict";var gKe=Eo(),AJt=z0(),SJt=Rm(),MJt=q0(),EJt=O0().calcMarkerSize,kJt=r9();mKe.exports=function(t,r){var n=r._carpetTrace=kJt(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){var i;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var a=r._length,o=new Array(a),s,l,u=!1;for(i=0;i<a;i++)if(s=r.a[i],l=r.b[i],gKe(s)&&gKe(l)){var c=n.ab2xy(+s,+l,!0),f=n.isVisible(+s,+l);f||(u=!0),o[i]={x:c[0],y:c[1],a:s,b:l,vis:f}}else o[i]={x:!1,y:!1};return r._needsCull=u,o[0].carpet=n,o[0].trace=r,EJt(r,a),AJt(t,r),SJt(o,r),MJt(o,r),o}}});var bKe=ye((Twr,xKe)=>{"use strict";var CJt=vT(),_Ke=ho(),LJt=So();xKe.exports=function(t,r,n,i){var a,o,s,l=n[0][0].carpet,u=_Ke.getFromId(t,l.xaxis||"x"),c=_Ke.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a<n.length;a++)o=n[a][0].trace,o._xA=u,o._yA=c;for(CJt(t,f,n,i),a=0;a<n.length;a++)o=n[a][0].trace,s=i.selectAll("g.trace"+o.uid+" .js-line"),LJt.setClipUrl(s,n[a][0].carpet._clipPathId,t)}});var TKe=ye((Awr,wKe)=>{"use strict";var PJt=yT(),IJt=Pr().fillText;wKe.exports=function(t,r,n,i){var a=PJt(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,d=h._carpet,v=h._module.formatLabels(f,h);o.yLabel=v.yLabel,delete o.text;var m=[];function b(M,T){var L;M.labelprefix&&M.labelprefix.length>0?L=M.labelprefix.replace(/ = $/,""):L=M._hovertitle,m.push(L+": "+T.toFixed(3)+M.labelsuffix)}if(!h.hovertemplate){var p=f.hi||h.hoverinfo,k=p.split("+");k.indexOf("all")!==-1&&(k=["a","b","text"]),k.indexOf("a")!==-1&&b(d.aaxis,f.a),k.indexOf("b")!==-1&&b(d.baxis,f.b),m.push("y: "+o.yLabel),k.indexOf("text")!==-1&&IJt(f,h,m),o.extraText=m.join("<br>")}return a}});var SKe=ye((Swr,AKe)=>{"use strict";AKe.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 EKe=ye((Mwr,MKe)=>{"use strict";MKe.exports={attributes:z$(),supplyDefaults:hKe(),colorbar:$d(),formatLabels:vKe(),calc:yKe(),plot:bKe(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:TKe(),selectPoints:_T(),eventData:SKe(),moduleType:"trace",name:"scattercarpet",basePlotModule:mh(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var CKe=ye((Ewr,kKe)=>{"use strict";kKe.exports=EKe()});var q$=ye((kwr,LKe)=>{"use strict";var cg=zT(),T1=q4(),RJt=Tu(),DJt=Ao().extendFlat,ly=T1.contours;LKe.exports=DJt({carpet:{valType:"string",editType:"calc"},z:cg.z,a:cg.x,a0:cg.x0,da:cg.dx,b:cg.y,b0:cg.y0,db:cg.dy,text:cg.text,hovertext:cg.hovertext,transpose:cg.transpose,atype:cg.xtype,btype:cg.ytype,fillcolor:T1.fillcolor,autocontour:T1.autocontour,ncontours:T1.ncontours,contours:{type:ly.type,start:ly.start,end:ly.end,size:ly.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:ly.showlines,showlabels:ly.showlabels,labelfont:ly.labelfont,labelformat:ly.labelformat,operation:ly.operation,value:ly.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:T1.line.color,width:T1.line.width,dash:T1.line.dash,smoothing:T1.line.smoothing,editType:"plot"},zorder:T1.zorder},RJt("",{cLetter:"z",autoColorDflt:!1}))});var O$=ye((Cwr,RKe)=>{"use strict";var PKe=Pr(),FJt=n8(),IKe=q$(),zJt=RG(),qJt=k8(),OJt=C8();RKe.exports=function(t,r,n,i){function a(u,c){return PKe.coerce(t,r,IKe,u,c)}function o(u){return PKe.coerce2(t,r,IKe,u)}if(a("carpet"),t.a&&t.b){var s=FJt(t,r,a,i,"a","b");if(!s){r.visible=!1;return}a("text");var l=a("contours.type")==="constraint";l?zJt(t,r,a,i,n,{hasHover:!1}):(qJt(t,r,a,o),OJt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a("zorder")}});var qKe=ye((Lwr,zKe)=>{"use strict";var BJt=gv(),DKe=Pr(),NJt=s8(),UJt=u8(),VJt=c8(),GJt=f8(),FKe=rG(),HJt=O$(),jJt=r9(),WJt=bG();zKe.exports=function(t,r){var n=r._carpetTrace=jJt(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),HJt(a,r,r._defaultColor,t._fullLayout)}var o=XJt(t,r);return WJt(r,r._z),o}};function XJt(e,t){var r=t._carpetTrace,n=r.aaxis,i=r.baxis,a,o,s,l,u,c,f;n._minDtick=0,i._minDtick=0,DKe.isArray1D(t.z)&&NJt(t,n,i,"a","b",["z"]),a=t._a=t._a||t.a,l=t._b=t._b||t.b,a=a?n.makeCalcdata(t,"_a"):[],l=l?i.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=UJt(t._z||t.z,t.transpose),t._emptypoints=GJt(f),VJt(f,t._emptypoints);var h=DKe.maxRowLength(f),d=t.xtype==="scaled"?"":a,v=FKe(t,d,o,s,h,n),m=t.ytype==="scaled"?"":l,b=FKe(t,m,u,c,f.length,i),p={a:v,b,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&BJt(e,t,{vals:f,containerStr:"",cLetter:"z"}),[p]}});var BKe=ye((Pwr,OKe)=>{"use strict";var ZJt=Pr().isArrayOrTypedArray;OKe.exports=function(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v,m,b,p=ZJt(r)?"a":"b",k=p==="a"?e.aaxis:e.baxis,M=k.smoothing,T=p==="a"?e.a2i:e.b2j,L=p==="a"?r:n,x=p==="a"?n:r,C=p==="a"?t.a.length:t.b.length,S=p==="a"?t.b.length:t.a.length,g=Math.floor(p==="a"?e.b2j(x):e.a2i(x)),P=p==="a"?function(_e){return e.evalxy([],_e,g)}:function(_e){return e.evalxy([],g,_e)};M&&(o=Math.max(0,Math.min(S-2,g)),s=g-o,a=p==="a"?function(_e,ke){return e.dxydi([],_e,o,ke,s)}:function(_e,ke){return e.dxydj([],o,_e,s,ke)});var E=T(L[0]),z=T(L[1]),q=E<z?1:-1,U=(z-E)*1e-8,G=q>0?Math.floor:Math.ceil,Z=q>0?Math.ceil:Math.floor,j=q>0?Math.min:Math.max,N=q>0?Math.max:Math.min,H=G(E+U),re=Z(z-U);c=P(E);var oe=[[c]];for(i=H;i*q<re*q;i+=q)l=[],v=N(E,i),m=j(z,i+q),b=m-v,u=Math.max(0,Math.min(C-2,Math.floor(.5*(v+m)))),f=P(m),M&&(h=a(u,v-u),d=a(u,m-u),l.push([c[0]+h[0]/3*b,c[1]+h[1]/3*b]),l.push([f[0]-d[0]/3*b,f[1]-d[1]/3*b])),l.push(f),oe.push(l),c=f;return oe}});var WKe=ye((Iwr,jKe)=>{"use strict";var n9=qa(),a9=I$(),HKe=R$(),pC=So(),A1=Pr(),YJt=TG(),KJt=AG(),Aw=I8(),i9=B4(),JJt=kG(),$Jt=EG(),QJt=CG(),e$t=r9(),NKe=BKe();jKe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;A1.makeTraceGroups(i,n,"contour").each(function(s){var l=n9.select(this),u=s[0],c=u.trace,f=c._carpetTrace=e$t(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var d=u.a,v=u.b,m=c.contours,b=$Jt(m,r,u),p=m.type==="constraint",k=m._operation,M=p?k==="="?"lines":"fill":m.coloring;function T(G){var Z=f.ab2xy(G[0],G[1],!0);return[a.c2p(Z[0]),o.c2p(Z[1])]}var L=[[d[0],v[v.length-1]],[d[d.length-1],v[v.length-1]],[d[d.length-1],v[0]],[d[0],v[0]]];YJt(b);var x=(d[d.length-1]-d[0])*1e-8,C=(v[v.length-1]-v[0])*1e-8;KJt(b,x,C);var S=b;m.type==="constraint"&&(S=JJt(b,k)),t$t(b,T);var g,P,E,z,q=[];for(z=h.clipsegments.length-1;z>=0;z--)g=h.clipsegments[z],P=a9([],g.x,a.c2p),E=a9([],g.y,o.c2p),P.reverse(),E.reverse(),q.push(HKe(P,E,g.bicubic));var U="M"+q.join("L")+"Z";n$t(l,h.clipsegments,a,o,p,M),a$t(c,l,a,o,S,L,T,f,h,M,U),r$t(l,b,t,u,m,r,f),pC.setClipUrl(l,f._clipPathId,t)})};function t$t(e,t){var r,n,i,a,o,s,l,u,c;for(r=0;r<e.length;r++){for(a=e[r],o=a.pedgepaths=[],s=a.ppaths=[],n=0;n<a.edgepaths.length;n++){for(c=a.edgepaths[n],l=[],i=0;i<c.length;i++)l[i]=t(c[i]);o.push(l)}for(n=0;n<a.paths.length;n++){for(c=a.paths[n],u=[],i=0;i<c.length;i++)u[i]=t(c[i]);s.push(u)}}}function r$t(e,t,r,n,i,a,o){var s=r._context.staticPlot,l=A1.ensureSingle(e,"g","contourlines"),u=i.showlines!==!1,c=i.showlabels,f=u&&c,h=Aw.createLines(l,u||c,t,s),d=Aw.createLineClip(l,f,r,n.trace.uid),v=e.selectAll("g.contourlabels").data(c?[0]:[]);if(v.exit().remove(),v.enter().append("g").classed("contourlabels",!0),c){var m=a.xaxis,b=a.yaxis,p=m._length,k=b._length,M=[[[0,0],[p,0],[p,k],[0,k]]],T=[];A1.clearLocationCache();var L=Aw.labelFormatter(r,n),x=pC.tester.append("text").attr("data-notex",1).call(pC.font,i.labelfont),C={left:0,right:p,center:p/2,top:0,bottom:k,middle:k/2},S=Math.sqrt(p*p+k*k),g=i9.LABELDISTANCE*S/Math.max(1,t.length/i9.LABELINCREASE);h.each(function(P){var E=Aw.calcTextOpts(P.level,L,x,r);n9.select(this).selectAll("path").each(function(z){var q=this,U=A1.getVisibleSegment(q,C,E.height/2);if(U&&(i$t(q,z,P,U,o,E.height),!(U.len<(E.width+E.height)*i9.LABELMIN)))for(var G=Math.min(Math.ceil(U.len/g),i9.LABELMAX),Z=0;Z<G;Z++){var j=Aw.findBestTextLocation(q,U,E,T,C);if(!j)break;Aw.addLabelData(j,E,T,M)}})}),x.remove(),Aw.drawLabels(v,T,r,d,f?M:null)}c&&!u&&h.remove()}function i$t(e,t,r,n,i,a){for(var o,s=0;s<r.pedgepaths.length;s++)t===r.pedgepaths[s]&&(o=r.edgepaths[s]);if(!o)return;var l=i.a[0],u=i.a[i.a.length-1],c=i.b[0],f=i.b[i.b.length-1];function h(p,k){var M=0,T,L=.1;return(Math.abs(p[0]-l)<L||Math.abs(p[0]-u)<L)&&(T=VKe(i.dxydb_rough(p[0],p[1],L)),M=Math.max(M,a*GKe(k,T)/2)),(Math.abs(p[1]-c)<L||Math.abs(p[1]-f)<L)&&(T=VKe(i.dxyda_rough(p[0],p[1],L)),M=Math.max(M,a*GKe(k,T)/2)),M}var d=UKe(e,0,1),v=UKe(e,n.total,n.total-1),m=h(o[0],d),b=n.total-h(o[o.length-1],v);n.min<m&&(n.min=m),n.max>b&&(n.max=b),n.len=n.max-n.min}function UKe(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 VKe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function GKe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function n$t(e,t,r,n,i,a){var o,s,l,u,c=A1.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(a==="fill"&&!i?[0]:[]);f.enter().append("path"),f.exit().remove();var h=[];for(u=0;u<t.length;u++)o=t[u],s=a9([],o.x,r.c2p),l=a9([],o.y,n.c2p),h.push(HKe(s,l,o.bicubic));f.attr("d","M"+h.join("L")+"Z").style("stroke","none")}function a$t(e,t,r,n,i,a,o,s,l,u,c){var f=u==="fill";f&&QJt(i,e.contours);var h=A1.ensureSingle(t,"g","contourfill"),d=h.selectAll("path").data(f?i:[]);d.enter().append("path"),d.exit().remove(),d.each(function(v){var m=(v.prefixBoundary?c:"")+o$t(e,v,a,o,s,l,r,n);m?n9.select(this).attr("d",m).style("stroke","none"):n9.select(this).remove()})}function o$t(e,t,r,n,i,a,o,s){var l,u="",c=t.edgepaths.map(function(E,z){return z}),f=!0,h,d,v,m,b,p,k=Math.abs(r[0][0]-r[2][0])*1e-4,M=Math.abs(r[0][1]-r[2][1])*1e-4;function T(E){return Math.abs(E[1]-r[0][1])<M}function L(E){return Math.abs(E[1]-r[2][1])<M}function x(E){return Math.abs(E[0]-r[0][0])<k}function C(E){return Math.abs(E[0]-r[2][0])<k}function S(E,z){var q,U,G,Z,j="";for(T(E)&&!C(E)||L(E)&&!x(E)?(Z=i.aaxis,G=NKe(i,a,[E[0],z[0]],.5*(E[1]+z[1]))):(Z=i.baxis,G=NKe(i,a,.5*(E[0]+z[0]),[E[1],z[1]])),q=1;q<G.length;q++)for(j+=Z.smoothing?"C":"L",U=0;U<G[q].length;U++){var N=G[q][U];j+=[o.c2p(N[0]),s.c2p(N[1])]+" "}return j}for(l=0,h=null;c.length;){var g=t.edgepaths[l][0];for(h&&(u+=S(h,g)),p=pC.smoothopen(t.edgepaths[l].map(n),t.smoothing),u+=f?p:p.replace(/^M/,"L"),c.splice(c.indexOf(l),1),h=t.edgepaths[l][t.edgepaths[l].length-1],m=-1,v=0;v<4;v++){if(!h){A1.log("Missing end?",l,t);break}for(T(h)&&!C(h)?d=r[1]:x(h)?d=r[0]:L(h)?d=r[3]:C(h)&&(d=r[2]),b=0;b<t.edgepaths.length;b++){var P=t.edgepaths[b][0];Math.abs(h[0]-d[0])<k?Math.abs(h[0]-P[0])<k&&(P[1]-h[1])*(d[1]-P[1])>=0&&(d=P,m=b):Math.abs(h[1]-d[1])<M?Math.abs(h[1]-P[1])<M&&(P[0]-h[0])*(d[0]-P[0])>=0&&(d=P,m=b):A1.log("endpt to newendpt is not vert. or horz.",h,d,P)}if(m>=0)break;u+=S(h,d),h=d}if(m===t.edgepaths.length){A1.log("unclosed perimeter path");break}l=m,f=c.indexOf(l)===-1,f&&(l=c[0],u+=S(h,d)+"Z",h=null)}for(l=0;l<t.paths.length;l++)u+=pC.smoothclosed(t.paths[l].map(n),t.smoothing);return u}});var ZKe=ye((Rwr,XKe)=>{"use strict";XKe.exports={attributes:q$(),supplyDefaults:O$(),colorbar:F8(),calc:qKe(),plot:WKe(),style:D8(),moduleType:"trace",name:"contourcarpet",basePlotModule:mh(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var KKe=ye((Dwr,YKe)=>{"use strict";YKe.exports=ZKe()});var s9=ye((Fwr,tJe)=>{"use strict";var o9=Pr().extendFlat,gC=pf(),JKe=df().axisHoverFormat,{hovertemplateAttrs:s$t,templatefallbackAttrs:l$t}=Ll(),QKe=Pd().dash,u$t=p3(),eJe=$T(),c$t=eJe.INCREASING.COLOR,f$t=eJe.DECREASING.COLOR,B$=gC.line;function $Ke(e){return{line:{color:o9({},B$.color,{dflt:e}),width:B$.width,dash:QKe,editType:"style"},editType:"style"}}tJe.exports={xperiod:gC.xperiod,xperiod0:gC.xperiod0,xperiodalignment:gC.xperiodalignment,xhoverformat:JKe("x"),yhoverformat:JKe("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:o9({},B$.width,{}),dash:o9({},QKe,{}),editType:"style"},increasing:$Ke(c$t),decreasing:$Ke(f$t),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:s$t({},{keys:["open","high","low","close"]}),hovertemplatefallback:l$t(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:o9({},u$t.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:gC.zorder}});var N$=ye((zwr,rJe)=>{"use strict";var h$t=Oa(),d$t=Pr();rJe.exports=function(t,r,n,i){var a=n("x"),o=n("open"),s=n("high"),l=n("low"),u=n("close");n("hoverlabel.split");var c=h$t.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],i),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return a&&(f=Math.min(f,d$t.minRowLength(a))),r._length=f,f}}});var aJe=ye((qwr,nJe)=>{"use strict";var v$t=Pr(),p$t=N$(),g$t=Dg(),m$t=s9();nJe.exports=function(t,r,n,i){function a(s,l){return v$t.coerce(t,r,m$t,s,l)}var o=p$t(t,r,a,i);if(!o){r.visible=!1;return}g$t(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),iJe(t,r,a,"increasing"),iJe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("tickwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function iJe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var U$=ye((Owr,sJe)=>{"use strict";var X5=Pr(),l9=X5._,u9=ho(),y$t=zg(),mC=fs().BADNUM;function _$t(e,t){var r=u9.getFromId(e,t.xaxis),n=u9.getFromId(e,t.yaxis),i=b$t(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=oJe(e,t,o,s,n,x$t);return t._extremes[r._id]=u9.findExtremes(r,s,{vpad:a/2}),l.length?(X5.extendFlat(l[0].t,{wHover:a/2,tickLen:i}),l):[{t:{empty:!0}}]}function x$t(e,t,r,n){return{o:e,h:t,l:r,c:n}}function oJe(e,t,r,n,i,a){for(var o=i.makeCalcdata(t,"open"),s=i.makeCalcdata(t,"high"),l=i.makeCalcdata(t,"low"),u=i.makeCalcdata(t,"close"),c=X5.isArrayOrTypedArray(t.text),f=X5.isArrayOrTypedArray(t.hovertext),h=!0,d=null,v=!!t.xperiodalignment,m=[],b=0;b<n.length;b++){var p=n[b],k=o[b],M=s[b],T=l[b],L=u[b];if(p!==mC&&k!==mC&&M!==mC&&T!==mC&&L!==mC){L===k?d!==null&&L!==d&&(h=L>d):h=L>k,d=L;var x=a(k,M,T,L);x.pos=p,x.yc=(k+L)/2,x.i=b,x.dir=h?"increasing":"decreasing",x.x=x.pos,x.y=[T,M],v&&(x.orig_p=r[b]),c&&(x.tx=t.text[b]),f&&(x.htx=t.hovertext[b]),m.push(x)}else m.push({pos:p,empty:!0})}return t._extremes[i._id]=u9.findExtremes(i,X5.concat(l,s),{padded:!0}),m.length&&(m[0].t={labels:{open:l9(e,"open:")+" ",high:l9(e,"high:")+" ",low:l9(e,"low:")+" ",close:l9(e,"close:")+" "}}),m}function b$t(e,t,r){var n=r._minDiff;if(!n){var i=e._fullData,a=[];n=1/0;var o;for(o=0;o<i.length;o++){var s=i[o];if(s.type==="ohlc"&&s.visible===!0&&s.xaxis===t._id){a.push(s);var l=t.makeCalcdata(s,"x");s._origX=l;var u=y$t(r,t,"x",l).vals;s._xcalc=u;var c=X5.distinctVals(u).minDiff;c&&isFinite(c)&&(n=Math.min(n,c))}}for(n===1/0&&(n=1),o=0;o<a.length;o++)a[o]._minDiff=n}return n*r.tickwidth}sJe.exports={calc:_$t,calcCommon:oJe}});var cJe=ye((Bwr,uJe)=>{"use strict";var w$t=qa(),lJe=Pr();uJe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;lJe.makeTraceGroups(i,n,"trace ohlc").each(function(l){var u=w$t.select(this),c=l[0],f=c.t,h=c.trace;if(h.visible!==!0||f.empty){u.remove();return}var d=f.tickLen,v=u.selectAll("path").data(lJe.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(m){if(m.empty)return"M0,0Z";var b=o.c2p(m.pos-d,!0),p=o.c2p(m.pos+d,!0),k=s?(b+p)/2:o.c2p(m.pos,!0),M=a.c2p(m.o,!0),T=a.c2p(m.h,!0),L=a.c2p(m.l,!0),x=a.c2p(m.c,!0);return"M"+b+","+M+"H"+k+"M"+k+","+T+"V"+L+"M"+p+","+x+"H"+k})})}});var hJe=ye((Nwr,fJe)=>{"use strict";var V$=qa(),T$t=So(),A$t=ka();fJe.exports=function(t,r,n){var i=n||V$.select(t).selectAll("g.ohlclayer").selectAll("g.trace");i.style("opacity",function(a){return a[0].trace.opacity}),i.each(function(a){var o=a[0].trace;V$.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;V$.select(this).style("fill","none").call(A$t.stroke,l.color).call(T$t.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var H$=ye((Uwr,mJe)=>{"use strict";var G$=ho(),S$t=Pr(),c9=vf(),M$t=ka(),E$t=Pr().fillText,dJe=$T(),k$t={increasing:dJe.INCREASING.SYMBOL,decreasing:dJe.DECREASING.SYMBOL};function C$t(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?pJe(e,t,r,n):gJe(e,t,r,n)}function vJe(e,t,r,n){var i=e.cd,a=e.xa,o=i[0].trace,s=i[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,h,d=s.bPos||0,v=function(P){return P.pos+d-t},m=s.bdPos||s.tickLen,b=s.wHover,p=Math.min(1,m/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-p,h=e.maxSpikeDistance-p;function k(P){var E=v(P);return c9.inbox(E-b,E+b,f)}function M(P){var E=P[u],z=P[c];return E===z||c9.inbox(E-r,z-r,f)}function T(P){return(k(P)+M(P))/2}var L=c9.getDistanceFunction(n,k,M,T);if(c9.getClosest(i,L,e),e.index===!1)return null;var x=i[e.index];if(x.empty)return null;var C=x.dir,S=o[C],g=S.line.color;return M$t.opacity(g)&&S.line.width?e.color=g:e.color=S.fillcolor,e.x0=a.c2p(x.pos+d-m,!0),e.x1=a.c2p(x.pos+d+m,!0),e.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,e.spikeDistance=T(x)*h/f,e.xSpike=a.c2p(x.pos,!0),e}function pJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=[],u=vJe(e,t,r,n);if(!u)return[];var c=i[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var h=["high","open","close","low"],d={},v=0;v<h.length;v++){var m=h[v],b=o[m][u.index],p=a.c2p(b,!0),k;b in d?(k=d[b],k.yLabel+="<br>"+s.labels[m]+G$.hoverLabelText(a,b,o.yhoverformat)):(k=S$t.extendFlat({},u),k.y0=k.y1=p,k.yLabelVal=b,k.yLabel=s.labels[m]+G$.hoverLabelText(a,b,o.yhoverformat),k.name="",l.push(k),d[b]=k)}return l}function gJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=vJe(e,t,r,n);if(!l)return[];var u=l.index,c=i[u],f=l.index=c.i,h=c.dir;function d(T){return s.labels[T]+G$.hoverLabelText(a,o[T][f],o.yhoverformat)}var v=c.hi||o.hoverinfo||"",m=v.split("+"),b=v==="all",p=b||m.indexOf("y")!==-1,k=b||m.indexOf("text")!==-1,M=p?[d("open"),d("high"),d("low"),d("close")+" "+k$t[h]]:[];return k&&E$t(c,o,M),l.extraText=M.join("<br>"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}mJe.exports={hoverPoints:C$t,hoverSplit:pJe,hoverOnPoints:gJe}});var j$=ye((Vwr,yJe)=>{"use strict";yJe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s<n.length;s++)n[s].selected=0;else for(s=0;s<n.length;s++){var u=n[s];r.contains([i.c2p(u.pos+l),a.c2p(u.yc)],null,u.i,t)?(o.push({pointNumber:u.i,x:i.c2d(u.pos),y:a.c2d(u.yc)}),u.selected=1):u.selected=0}return o}});var xJe=ye((Gwr,_Je)=>{"use strict";_Je.exports={moduleType:"trace",name:"ohlc",basePlotModule:mh(),categories:["cartesian","svg","showLegend"],meta:{},attributes:s9(),supplyDefaults:aJe(),calc:U$().calc,plot:cJe(),style:hJe(),hoverPoints:H$().hoverPoints,selectPoints:j$()}});var wJe=ye((Hwr,bJe)=>{"use strict";bJe.exports=xJe()});var X$=ye((jwr,SJe)=>{"use strict";var W$=Pr().extendFlat,TJe=df().axisHoverFormat,vp=s9(),Z5=k4();function AJe(e){return{line:{color:W$({},Z5.line.color,{dflt:e}),width:Z5.line.width,editType:"style"},fillcolor:Z5.fillcolor,editType:"style"}}SJe.exports={xperiod:vp.xperiod,xperiod0:vp.xperiod0,xperiodalignment:vp.xperiodalignment,xhoverformat:TJe("x"),yhoverformat:TJe("y"),x:vp.x,open:vp.open,high:vp.high,low:vp.low,close:vp.close,line:{width:W$({},Z5.line.width,{}),editType:"style"},increasing:AJe(vp.increasing.line.color.dflt),decreasing:AJe(vp.decreasing.line.color.dflt),text:vp.text,hovertext:vp.hovertext,hovertemplate:vp.hovertemplate,hovertemplatefallback:vp.hovertemplatefallback,whiskerwidth:W$({},Z5.whiskerwidth,{dflt:0}),hoverlabel:vp.hoverlabel,zorder:Z5.zorder}});var kJe=ye((Wwr,EJe)=>{"use strict";var L$t=Pr(),P$t=ka(),I$t=N$(),R$t=Dg(),D$t=X$();EJe.exports=function(t,r,n,i){function a(s,l){return L$t.coerce(t,r,D$t,s,l)}var o=I$t(t,r,a,i);if(!o){r.visible=!1;return}R$t(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),MJe(t,r,a,"increasing"),MJe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("whiskerwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function MJe(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",P$t.addOpacity(i,.5))}});var IJe=ye((Xwr,PJe)=>{"use strict";var CJe=Pr(),LJe=ho(),F$t=zg(),z$t=U$().calcCommon;PJe.exports=function(e,t){var r=e._fullLayout,n=LJe.getFromId(e,t.xaxis),i=LJe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,"x"),o=F$t(t,n,"x",a).vals,s=z$t(e,t,a,o,i,q$t);return s.length?(CJe.extendFlat(s[0].t,{num:r._numBoxes,dPos:CJe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function q$t(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var DJe=ye((Zwr,RJe)=>{"use strict";RJe.exports={moduleType:"trace",name:"candlestick",basePlotModule:mh(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:X$(),layoutAttributes:C4(),supplyLayoutDefaults:$I().supplyLayoutDefaults,crossTraceCalc:e8().crossTraceCalc,supplyDefaults:kJe(),calc:IJe(),plot:t8().plot,layerName:"boxlayer",style:r8().style,hoverPoints:H$().hoverPoints,selectPoints:j$()}});var zJe=ye((Ywr,FJe)=>{"use strict";FJe.exports=DJe()});var Y$=ye((Kwr,qJe)=>{"use strict";var h9=Pr(),O$t=xm(),f9=h9.deg2rad,Z$=h9.rad2deg;qJe.exports=function(t,r,n){switch(O$t(t,n),t._id){case"x":case"radialaxis":B$t(t,r);break;case"angularaxis":V$t(t,r);break}};function B$t(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],i=e._rl[1],a=r.innerRadius,o=(r.radius-a)/(i-n),s=a/o,l=n>i?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function N$t(e,t){return t==="degrees"?f9(e):e}function U$t(e,t){return t==="degrees"?Z$(e):e}function V$t(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return N$t(n(a),o)},e.c2d=function(a,o){return i(U$t(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],l=a._length,u,c,f=function(b){return e.d2c(b,a.thetaunit)};if(s)for(u=new Array(l),c=0;c<l;c++)u[c]=f(s[c]);else{var h=o+"0",d="d"+o,v=h in a?f(a[h]):0,m=a[d]?f(a[d]):(e.period||2*Math.PI)/l;for(u=new Array(l),c=0;c<l;c++)u[c]=v+c*m}return u},e.setGeometry=function(){var a=t.sector,o=a.map(f9),s={clockwise:-1,counterclockwise:1}[e.direction],l=f9(e.rotation),u=function(p){return s*p+l},c=function(p){return(p-l)/s},f,h,d,v;switch(r){case"linear":h=f=h9.identity,v=f9,d=Z$,e.range=h9.isFullCircle(o)?[a[0],a[0]+360]:o.map(c).map(Z$);break;case"category":var m=e._categories.length,b=e.period?Math.max(e.period,m):m;b===0&&(b=1),h=v=function(p){return p*2*Math.PI/b},f=d=function(p){return p*b/Math.PI/2},e.range=[0,b];break}e.c2g=function(p){return u(h(p))},e.g2c=function(p){return f(c(p))},e.t2g=function(p){return u(v(p))},e.g2t=function(p){return d(c(p))}}}});var d9=ye((Jwr,OJe)=>{"use strict";OJe.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}});var p9=ye(($wr,GJe)=>{"use strict";var Sw=Pr(),BJe=FM().tester,K$=Sw.findIndexOfMin,UJe=Sw.isAngleInsideSector,G$t=Sw.angleDelta,NJe=Sw.angleDist;function H$t(e,t,r,n,i){if(!UJe(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=BJe(Y5(a,n[0],n[1],i)),l=BJe(Y5(o,n[0],n[1],i)),u=[e*Math.cos(t),e*Math.sin(t)];return l.contains(u)&&!s.contains(u)}function VJe(e,t,r,n){var i,a,o=n[0],s=n[1],l=v9(Math.sin(t)-Math.sin(e)),u=v9(Math.cos(t)-Math.cos(e)),c=Math.tan(r),f=v9(1/c),h=l/u,d=s-h*o;return f?l&&u?(i=d/(c-h),a=c*i):u?(i=s*f,a=s):(i=o,a=o*c):l&&u?(i=0,a=d):u?(i=0,a=s):i=a=NaN,[i,a]}function j$t(e,t,r,n){var i=-t*r,a=t*t+1,o=2*(t*i-r),s=i*i+r*r-e*e,l=Math.sqrt(o*o-4*a*s),u=(-o+l)/(2*a),c=(-o-l)/(2*a);return[[u,t*u+i+n],[c,t*c+i+n]]}function W$t(e,t){var r=t.length,n=new Array(r+1),i;for(i=0;i<r;i++){var a=t[i];n[i]=[e*Math.cos(a),e*Math.sin(a)]}return n[i]=n[0].slice(),n}function X$t(e,t,r,n){var i=n.length,a=[],o,s;function l(p){return[e*Math.cos(p),e*Math.sin(p)]}function u(p,k,M){return VJe(p,k,M,l(p))}function c(p){return Sw.mod(p,i)}function f(p){return UJe(p,[t,r])}var h=K$(n,function(p){return f(p)?NJe(p,t):1/0}),d=u(n[h],n[c(h-1)],t);for(a.push(d),o=h,s=0;s<i;o++,s++){var v=n[c(o)];if(!f(v))break;a.push(l(v))}var m=K$(n,function(p){return f(p)?NJe(p,r):1/0}),b=u(n[m],n[c(m+1)],r);return a.push(b),a.push([0,0]),a.push(a[0].slice()),a}function Y5(e,t,r,n){return Sw.isFullCircle([t,r])?W$t(e,n):X$t(e,t,r,n)}function Z$t(e,t,r,n){for(var i=1/0,a=1/0,o=Y5(e,t,r,n),s=0;s<o.length;s++){var l=o[s];i=Math.min(i,l[0]),a=Math.min(a,-l[1])}return[i,a]}function Y$t(e,t){var r=function(a){var o=G$t(a,e);return o>0?o:1/0},n=K$(t,r),i=Sw.mod(n+1,t.length);return[t[n],t[i]]}function v9(e){return Math.abs(e)>1e-10?e:0}function J$(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a<n;a++){var o=e[a];i[a]=[t+o[0],r-o[1]]}return i}function K$t(e,t,r,n,i,a){var o=Y5(e,t,r,n);return"M"+J$(o,i,a).join("L")}function J$t(e,t,r,n,i,a,o){var s,l;e<t?(s=e,l=t):(s=t,l=e);var u=J$(Y5(s,r,n,i),a,o),c=J$(Y5(l,r,n,i),a,o);return"M"+c.reverse().join("L")+"M"+u.join("L")}GJe.exports={isPtInsidePolygon:H$t,findPolygonOffset:Z$t,findEnclosingVertexAngles:Y$t,findIntersectionXY:VJe,findXYatLength:j$t,clampTiny:v9,pathPolygon:K$t,pathPolygonAnnulus:J$t}});var $$=ye((Qwr,WJe)=>{"use strict";function HJe(e){return e<0?-1:e>0?1:0}function K5(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function J5(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function jJe(e,t){return t*e.radius}function $$t(e,t,r,n){var i=J5(e,K5([r,t])),a=i[0],o=i[1],s=J5(e,K5([n,t])),l=s[0],u=s[1];if(t===0)return["M"+a+","+o,"L"+l+","+u].join(" ");var c=jJe(e,1/Math.abs(t));return["M"+a+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function Q$t(e,t,r,n){var i=jJe(e,1/(t+1)),a=J5(e,K5([t,r])),o=a[0],s=a[1],l=J5(e,K5([t,n])),u=l[0],c=l[1];if(HJe(r)!==HJe(n)){var f=J5(e,K5([t,0])),h=f[0],d=f[1];return["M"+o+","+s,"A"+i+","+i+" 0 0,"+(0<r?0:1)+" "+h+","+d,"A"+i+","+i+" 0 0,"+(n<0?0:1)+u+","+c].join(" ")}return["M"+o+","+s,"A"+i+","+i+" 0 0,"+(n<r?0:1)+" "+u+","+c].join(" ")}WJe.exports={smith:K5,reactanceArc:$$t,resistanceArc:Q$t,smithTransform:J5}});var tQ=ye((e3r,t$e)=>{"use strict";var Mw=qa(),eQt=fd(),kw=Oa(),Xc=Pr(),uy=Xc.strRotate,xd=Xc.strTranslate,Q$=ka(),yC=So(),tQt=Mc(),pp=ho(),rQt=xm(),iQt=Y$(),nQt=Mg().doAutoRange,S1=jN(),y9=yv(),XJe=vf(),aQt=zb(),oQt=qf().prepSelect,sQt=qf().selectOnClick,eQ=qf().clearOutline,ZJe=Eg(),YJe=bM(),KJe=CM().redrawReglTraces,lQt=Dh().MID_SHIFT,Bx=d9(),M1=p9(),_9=$$(),g9=_9.smith,uQt=_9.reactanceArc,cQt=_9.resistanceArc,m9=_9.smithTransform,fQt=Xc._,JJe=Xc.mod,Nx=Xc.deg2rad,Ew=Xc.rad2deg;function $Je(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,i="clip"+n._uid+t;this.clipIds.forTraces=i+"-for-traces",this.clipPaths.forTraces=n._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=n["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(a){return this.isSmith?0:a.hole},this.getSector=function(a){return this.isSmith?[0,360]:a.sector},this.getRadial=function(a){return this.isSmith?a.realaxis:a.radialaxis},this.getAngular=function(a){return this.isSmith?a.imaginaryaxis:a.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var Bd=$Je.prototype;t$e.exports=function(t,r,n){return new $Je(t,r,n)};Bd.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,a=0;a<e.length;a++){var o=e[a][0].trace;if(o.cliponaxis===!1){i=!0;break}}r._hasClipOnAxisFalse=i,r.updateLayers(t,n),r.updateLayout(t,n),tQt.generalUpdatePerTraceModule(r.gd,r,e,n),r.updateFx(t,n),r.isSmith&&(delete n.realaxis.range,delete n.imaginaryaxis.range)};Bd.updateLayers=function(e,t){var r=this,n=r.isSmith,i=r.layers,a=r.getRadial(t),o=r.getAngular(t),s=Bx.layerNames,l=s.indexOf("frontplot"),u=s.slice(0,l),c=o.layer==="below traces",f=a.layer==="below traces";c&&u.push("angular-line"),f&&u.push("radial-line"),c&&u.push("angular-axis"),f&&u.push("radial-axis"),u.push("frontplot"),c||u.push("angular-line"),f||u.push("radial-line"),c||u.push("angular-axis"),f||u.push("radial-axis");var h=(n?"smith":"polar")+"sublayer",d=r.framework.selectAll("."+h).data(u,String);d.enter().append("g").attr("class",function(v){return h+" "+v}).each(function(v){var m=i[v]=Mw.select(this);switch(v){case"frontplot":n||m.append("g").classed("barlayer",!0),m.append("g").classed("scatterlayer",!0);break;case"backplot":m.append("g").classed("maplayer",!0);break;case"plotbg":i.bg=m.append("path");break;case"radial-grid":m.style("fill","none");break;case"angular-grid":m.style("fill","none");break;case"radial-line":m.append("line").style("fill","none");break;case"angular-line":m.append("path").style("fill","none");break}}),d.order()};Bd.updateLayout=function(e,t){var r=this,n=r.layers,i=e._size,a=r.getRadial(t),o=r.getAngular(t),s=t.domain.x,l=t.domain.y;r.xOffset=i.l+i.w*s[0],r.yOffset=i.t+i.h*(1-l[1]);var u=r.xLength=i.w*(s[1]-s[0]),c=r.yLength=i.h*(l[1]-l[0]),f=r.getSector(t);r.sectorInRad=f.map(Nx);var h=r.sectorBBox=hQt(f),d=h[2]-h[0],v=h[3]-h[1],m=c/u,b=Math.abs(v/d),p,k,M,T,L;m>b?(p=u,k=u*b,L=(c-k)/i.h/2,M=[s[0],s[1]],T=[l[0]+L,l[1]-L]):(p=c/b,k=c,L=(u-p)/i.w/2,M=[s[0]+L,s[1]-L],T=[l[0],l[1]]),r.xLength2=p,r.yLength2=k,r.xDomain2=M,r.yDomain2=T;var x=r.xOffset2=i.l+i.w*M[0],C=r.yOffset2=i.t+i.h*(1-T[1]),S=r.radius=p/d,g=r.innerRadius=r.getHole(t)*S,P=r.cx=x-S*h[0],E=r.cy=C+S*h[3],z=r.cxx=P-x,q=r.cyy=E-C,U=a.side,G;U==="counterclockwise"?(G=U,U="top"):U==="clockwise"&&(G=U,U="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:U,_trueSide:G,domain:[g/i.w,S/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:M}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:T});var Z=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",Z).attr("transform",xd(z,q)),n.frontplot.attr("transform",xd(x,C)).call(yC.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",Z).attr("transform",xd(P,E)).call(Q$.fill,t.bgcolor)};Bd.mockAxis=function(e,t,r,n){var i=Xc.extendFlat({},r,n);return iQt(i,t,e),i};Bd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=Xc.extendFlat({type:"linear"},r);rQt(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[a],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=a==="x"&&!i?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};Bd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);nQt(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")],i.minallowed!==void 0){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(i.maxallowed!==void 0){var l=i.r2l(i.maxallowed);i._rl[0]<i._rl[1]?i._rl[1]=Math.min(i._rl[1],l):i._rl[0]=Math.min(i._rl[0],l)}};Bd.updateRadialAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getRadial(t),c=JJe(r.getSector(t)[0],360),f=r.radialAxis,h=o<a,d=r.isSmith;d||(r.fillViewInitialKey("radialaxis.angle",u.angle),r.fillViewInitialKey("radialaxis.range",f.range.slice()),f.setGeometry()),f.tickangle==="auto"&&c>90&&c<=270&&(f.tickangle=180);var v=d?function(S){var g=m9(r,g9([S.x,0]));return xd(g[0]-s,g[1]-l)}:function(S){return xd(f.l2p(S.x)+o,0)},m=d?function(S){return cQt(r,S.x,-1/0,1/0)}:function(S){return r.pathArc(f.r2p(S.x)+o)},b=QJe(u);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),h){f.setScale();var p=0,k=d?(f.tickvals||[]).filter(function(S){return S>=0}).map(function(S){return pp.tickText(f,S,!0,!1)}):pp.calcTicks(f),M=d?k:pp.clipEnds(f,k),T=pp.getTickSigns(f)[2];d&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(T=-T),f.ticks==="top"&&f.side==="top"&&(p=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(p=f.ticklen)),pp.drawTicks(n,f,{vals:k,layer:i["radial-axis"],path:pp.makeTickPath(f,0,T),transFn:v,crisp:!1}),pp.drawGrid(n,f,{vals:M,layer:i["radial-grid"],path:m,transFn:Xc.noop,crisp:!1}),pp.drawLabels(n,f,{vals:k,layer:i["radial-axis"],transFn:v,labelFns:pp.makeLabelFns(f,p)})}var L=r.radialAxisAngle=r.vangles?Ew(e$e(Nx(u.angle),r.vangles)):u.angle,x=xd(s,l),C=x+uy(-L);_C(i["radial-axis"],h&&(u.showticklabels||u.ticks),{transform:C}),_C(i["radial-grid"],h&&u.showgrid,{transform:d?"":x}),_C(i["radial-line"].select("line"),h&&u.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:C}).attr("stroke-width",u.linewidth).call(Q$.stroke,u.linecolor)};Bd.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",c=0;if(l.title){var f=yC.bBox(n.layers["radial-axis"].node()).height,h=l.title.font.size,d=l.side;c=d==="top"?h:d==="counterclockwise"?-(f+h*.4):f+h*.8}var v=r!==void 0?r:n.radialAxisAngle,m=Nx(v),b=Math.cos(m),p=Math.sin(m),k=o+a/2*b+c*p,M=s-a/2*p+c*b;n.layers["radial-axis-title"]=aQt.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:fQt(i,"Click to enter radial axis title"),attributes:{x:k,y:M,"text-anchor":"middle"},transform:{rotate:-v}})}};Bd.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var h=f?function(g){var P=m9(r,g9([0,g.x]));return Math.atan2(P[0]-s,P[1]-l)-Math.PI/2}:function(g){return c.t2g(g.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=Ew(c.tick0),c.dtick=Ew(c.dtick));var d=function(g){return xd(s+a*Math.cos(g),l-a*Math.sin(g))},v=f?function(g){var P=m9(r,g9([0,g.x]));return xd(P[0],P[1])}:function(g){return d(h(g))},m=f?function(g){var P=m9(r,g9([0,g.x])),E=Math.atan2(P[0]-s,P[1]-l)-Math.PI/2;return xd(P[0],P[1])+uy(-Ew(E))}:function(g){var P=h(g);return d(P)+uy(-Ew(P))},b=f?function(g){return uQt(r,g.x,0,1/0)}:function(g){var P=h(g),E=Math.cos(P),z=Math.sin(P);return"M"+[s+o*E,l-o*z]+"L"+[s+a*E,l-a*z]},p=pp.makeLabelFns(c,0),k=p.labelStandoff,M={};M.xFn=function(g){var P=h(g);return Math.cos(P)*k},M.yFn=function(g){var P=h(g),E=Math.sin(P)>0?.2:1;return-Math.sin(P)*(k+g.fontSize*E)+Math.abs(Math.cos(P))*(g.fontSize*lQt)},M.anchorFn=function(g){var P=h(g),E=Math.cos(P);return Math.abs(E)<.1?"middle":E>0?"start":"end"},M.heightFn=function(g,P,E){var z=h(g);return-.5*(1+Math.sin(z))*E};var T=QJe(u);r.angularTickLayout!==T&&(i["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=T);var L=f?[1/0].concat(c.tickvals||[]).map(function(g){return pp.tickText(c,g,!0,!1)}):pp.calcTicks(c);f&&(L[0].text="\u221E",L[0].fontSize*=1.75);var x;if(t.gridshape==="linear"?(x=L.map(h),Xc.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,c.type==="category"&&(L=L.filter(function(g){return Xc.isAngleInsideSector(h(g),r.sectorInRad)})),c.visible){var C=c.ticks==="inside"?-1:1,S=(c.linewidth||1)/2;pp.drawTicks(n,c,{vals:L,layer:i["angular-axis"],path:"M"+C*S+",0h"+C*c.ticklen,transFn:m,crisp:!1}),pp.drawGrid(n,c,{vals:L,layer:i["angular-grid"],path:b,transFn:Xc.noop,crisp:!1}),pp.drawLabels(n,c,{vals:L,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:v,labelFns:M})}_C(i["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:xd(s,l)}).attr("stroke-width",u.linewidth).call(Q$.stroke,u.linecolor)};Bd.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};Bd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=Bx.MINZOOM,s=Bx.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,d=t.cyy,v=t.sectorInRad,m=t.vangles,b=t.radialAxis,p=M1.clampTiny,k=M1.findXYatLength,M=M1.findEnclosingVertexAngles,T=Bx.cornerHalfWidth,L=Bx.cornerLen/2,x,C,S=S1.makeDragger(i,"path","maindrag",e.dragmode===!1?"none":"crosshair");Mw.select(S).attr("d",t.pathSubplot()).attr("transform",xd(c,f)),S.onmousemove=function(ce){XJe.hover(n,ce,t.id),n._fullLayout._lasthover=S,n._fullLayout._hoversubplot=t.id},S.onmouseout=function(ce){n._dragging||y9.unhover(n,ce)};var g={element:S,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},P,E,z,q,U,G,Z,j,N;function H(ce,He){return Math.sqrt(ce*ce+He*He)}function re(ce,He){return H(ce-h,He-d)}function oe(ce,He){return Math.atan2(d-He,ce-h)}function _e(ce,He){return[ce*Math.cos(He),ce*Math.sin(-He)]}function ke(ce,He){if(ce===0)return t.pathSector(2*T);var lt=L/ce,mt=He-lt,Vt=He+lt,st=Math.max(0,Math.min(ce,l)),ct=st-T,Qt=st+T;return"M"+_e(ct,mt)+"A"+[ct,ct]+" 0,0,0 "+_e(ct,Vt)+"L"+_e(Qt,Vt)+"A"+[Qt,Qt]+" 0,0,1 "+_e(Qt,mt)+"Z"}function Ce(ce,He,lt){if(ce===0)return t.pathSector(2*T);var mt=_e(ce,He),Vt=_e(ce,lt),st=p((mt[0]+Vt[0])/2),ct=p((mt[1]+Vt[1])/2),Qt,Ht;if(st&&ct){var nr=ct/st,tt=-1/nr,je=k(T,nr,st,ct);Qt=k(L,tt,je[0][0],je[0][1]),Ht=k(L,tt,je[1][0],je[1][1])}else{var Ue,Ae;ct?(Ue=L,Ae=T):(Ue=T,Ae=L),Qt=[[st-Ue,ct-Ae],[st+Ue,ct-Ae]],Ht=[[st-Ue,ct+Ae],[st+Ue,ct+Ae]]}return"M"+Qt.join("L")+"L"+Ht.reverse().join("L")+"Z"}function ge(){z=null,q=null,U=t.pathSubplot(),G=!1;var ce=n._fullLayout[t.id];Z=eQt(ce.bgcolor).getLuminance(),j=S1.makeZoombox(a,Z,c,f,U),j.attr("fill-rule","evenodd"),N=S1.makeCorners(a,c,f),eQ(n)}function ie(ce,He){return He=Math.max(Math.min(He,l),u),ce<s?ce=0:l-ce<s?ce=l:He<s?He=0:l-He<s&&(He=l),Math.abs(He-ce)>o?(ce<He?(z=ce,q=He):(z=He,q=ce),!0):(z=null,q=null,!1)}function Se(ce,He){ce=ce||U,He=He||"M0,0Z",j.attr("d",ce),N.attr("d",He),S1.transitionZoombox(j,N,G,Z),G=!0;var lt={};me(lt),n.emit("plotly_relayouting",lt)}function Ee(ce,He){ce=ce*x,He=He*C;var lt=P+ce,mt=E+He,Vt=re(P,E),st=Math.min(re(lt,mt),l),ct=oe(P,E),Qt,Ht;ie(Vt,st)&&(Qt=U+t.pathSector(q),z&&(Qt+=t.pathSector(z)),Ht=ke(z,ct)+ke(q,ct)),Se(Qt,Ht)}function we(ce,He,lt,mt){var Vt=M1.findIntersectionXY(lt,mt,lt,[ce-h,d-He]);return H(Vt[0],Vt[1])}function De(ce,He){var lt=P+ce,mt=E+He,Vt=oe(P,E),st=oe(lt,mt),ct=M(Vt,m),Qt=M(st,m),Ht=we(P,E,ct[0],ct[1]),nr=Math.min(we(lt,mt,Qt[0],Qt[1]),l),tt,je;ie(Ht,nr)&&(tt=U+t.pathSector(q),z&&(tt+=t.pathSector(z)),je=[Ce(z,ct[0],ct[1]),Ce(q,ct[0],ct[1])].join(" ")),Se(tt,je)}function Le(){if(S1.removeZoombox(n),!(z===null||q===null)){var ce={};me(ce),S1.showDoubleClickNotifier(n),kw.call("_guiRelayout",n,ce)}}function me(ce){var He=b._rl,lt=(He[1]-He[0])/(1-u/l)/l,mt=[He[0]+(z-u)*lt,He[0]+(q-u)*lt];ce[t.id+".radialaxis.range"]=mt}function Pe(ce,He){var lt=n._fullLayout.clickmode;if(S1.removeZoombox(n),ce===2){var mt={};for(var Vt in t.viewInitial)mt[t.id+"."+Vt]=t.viewInitial[Vt];n.emit("plotly_doubleclick",null),kw.call("_guiRelayout",n,mt)}lt.indexOf("select")>-1&&ce===1&&sQt(He,n,[t.xaxis],[t.yaxis],t.id,g),lt.indexOf("event")>-1&&XJe.click(n,He,t.id)}g.prepFn=function(ce,He,lt){var mt=n._fullLayout.dragmode,Vt=S.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var st=n._fullLayout._invTransform;x=n._fullLayout._invScaleX,C=n._fullLayout._invScaleY;var ct=Xc.apply3DTransform(st)(He-Vt.left,lt-Vt.top);if(P=ct[0],E=ct[1],m){var Qt=M1.findPolygonOffset(l,v[0],v[1],m);P+=h+Qt[0],E+=d+Qt[1]}switch(mt){case"zoom":g.clickFn=Pe,r||(m?g.moveFn=De:g.moveFn=Ee,g.doneFn=Le,ge(ce,He,lt));break;case"select":case"lasso":oQt(ce,He,lt,g,mt);break}},y9.init(g)};Bd.updateRadialDrag=function(e,t,r){var n=this,i=n.gd,a=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=Bx.radialDragBoxSize,h=f/2;if(!c.visible)return;var d=Nx(n.radialAxisAngle),v=c._rl,m=v[0],b=v[1],p=v[r],k=.75*(v[1]-v[0])/(1-n.getHole(t))/o,M,T,L;r?(M=l+(o+h)*Math.cos(d),T=u-(o+h)*Math.sin(d),L="radialdrag"):(M=l+(s-h)*Math.cos(d),T=u-(s-h)*Math.sin(d),L="radialdrag-inner");var x=S1.makeRectDragger(a,L,"crosshair",-h,-h,f,f),C={element:x,gd:i};e.dragmode===!1&&(C.dragmode=!1),_C(Mw.select(x),c.visible&&s<o,{transform:xd(M,T)});var S,g,P;function E(Z,j){if(S)S(Z,j);else{var N=[Z,-j],H=[Math.cos(d),Math.sin(d)],re=Math.abs(Xc.dot(N,H)/Math.sqrt(Xc.dot(N,N)));isNaN(re)||(S=re<.5?U:G)}var oe={};z(oe),i.emit("plotly_relayouting",oe)}function z(Z){g!==null?Z[n.id+".radialaxis.angle"]=g:P!==null&&(Z[n.id+".radialaxis.range["+r+"]"]=P)}function q(){g!==null?kw.call("_guiRelayout",i,n.id+".radialaxis.angle",g):P!==null&&kw.call("_guiRelayout",i,n.id+".radialaxis.range["+r+"]",P)}function U(Z,j){if(r!==0){var N=M+Z,H=T+j;g=Math.atan2(u-H,N-l),n.vangles&&(g=e$e(g,n.vangles)),g=Ew(g);var re=xd(l,u)+uy(-g);a["radial-axis"].attr("transform",re),a["radial-line"].select("line").attr("transform",re);var oe=n.gd._fullLayout,_e=oe[n.id];n.updateRadialAxisTitle(oe,_e,g)}}function G(Z,j){var N=Xc.dot([Z,-j],[Math.cos(d),Math.sin(d)]);if(P=p-k*N,k>0!=(r?P>m:P<b)){P=null;return}var H=i._fullLayout,re=H[n.id];c.range[r]=P,c._rl[r]=P,n.updateRadialAxis(H,re),n.xaxis.setRange(),n.xaxis.setScale(),n.yaxis.setRange(),n.yaxis.setScale();var oe=!1;for(var _e in n.traceHash){var ke=n.traceHash[_e],Ce=Xc.filterVisible(ke),ge=ke[0][0].trace._module;ge.plot(i,n,Ce,re),kw.traceIs(_e,"gl")&&Ce.length&&(oe=!0)}oe&&(YJe(i),KJe(i))}C.prepFn=function(){S=null,g=null,P=null,C.moveFn=E,C.doneFn=q,eQ(i)},C.clampFn=function(Z,j){return Math.sqrt(Z*Z+j*j)<Bx.MINDRAG&&(Z=0,j=0),[Z,j]},y9.init(C)};Bd.updateAngularDrag=function(e){var t=this,r=t.gd,n=t.layers,i=t.radius,a=t.angularAxis,o=t.cx,s=t.cy,l=t.cxx,u=t.cyy,c=Bx.angularDragBoxSize,f=S1.makeDragger(n,"path","angulardrag",e.dragmode===!1?"none":"move"),h={element:f,gd:r};e.dragmode===!1?h.dragmode=!1:Mw.select(f).attr("d",t.pathAnnulus(i,i+c)).attr("transform",xd(o,s)).call(ZJe,"move");function d(P,E){return Math.atan2(u+c-E,P-l-c)}var v=n.frontplot.select(".scatterlayer").selectAll(".trace"),m=v.selectAll(".point"),b=v.selectAll(".textpoint"),p,k,M,T,L,x;function C(P,E){var z=t.gd._fullLayout,q=z[t.id],U=p+P*e._invScaleX,G=k+E*e._invScaleY,Z=d(U,G),j=Ew(Z-x);if(T=M+j,n.frontplot.attr("transform",xd(t.xOffset2,t.yOffset2)+uy([-j,l,u])),t.vangles){L=t.radialAxisAngle+j;var N=xd(o,s)+uy(-j),H=xd(o,s)+uy(-L);n.bg.attr("transform",N),n["radial-grid"].attr("transform",N),n["radial-axis"].attr("transform",H),n["radial-line"].select("line").attr("transform",H),t.updateRadialAxisTitle(z,q,L)}else t.clipPaths.forTraces.select("path").attr("transform",xd(l,u)+uy(j));m.each(function(){var ie=Mw.select(this),Se=yC.getTranslate(ie);ie.attr("transform",xd(Se.x,Se.y)+uy([j]))}),b.each(function(){var ie=Mw.select(this),Se=ie.select("text"),Ee=yC.getTranslate(ie);ie.attr("transform",uy([j,Se.attr("x"),Se.attr("y")])+xd(Ee.x,Ee.y))}),a.rotation=Xc.modHalf(T,360),t.updateAngularAxis(z,q),t._hasClipOnAxisFalse&&!Xc.isFullCircle(t.sectorInRad)&&v.call(yC.hideOutsideRangePoints,t);var re=!1;for(var oe in t.traceHash)if(kw.traceIs(oe,"gl")){var _e=t.traceHash[oe],ke=Xc.filterVisible(_e),Ce=_e[0][0].trace._module;Ce.plot(r,t,ke,q),ke.length&&(re=!0)}re&&(YJe(r),KJe(r));var ge={};S(ge),r.emit("plotly_relayouting",ge)}function S(P){P[t.id+".angularaxis.rotation"]=T,t.vangles&&(P[t.id+".radialaxis.angle"]=L)}function g(){b.select("text").attr("transform",null);var P={};S(P),kw.call("_guiRelayout",r,P)}h.prepFn=function(P,E,z){var q=e[t.id];M=q.angularaxis.rotation;var U=f.getBoundingClientRect();p=E-U.left,k=z-U.top,r._fullLayout._calcInverseTransform(r);var G=Xc.apply3DTransform(e._invTransform)(p,k);p=G[0],k=G[1],x=d(p,k),h.moveFn=C,h.doneFn=g,eQ(r)},t.vangles&&!Xc.isFullCircle(t.sectorInRad)&&(h.prepFn=Xc.noop,ZJe(Mw.select(f),null)),y9.init(h)};Bd.isPtInside=function(e){if(this.isSmith)return!0;var t=this.sectorInRad,r=this.vangles,n=this.angularAxis.c2g(e.theta),i=this.radialAxis,a=i.c2l(e.r),o=i._rl,s=r?M1.isPtInsidePolygon:Xc.isPtInsideSector;return s(a,n,o,t,r)};Bd.pathArc=function(e){var t=this.sectorInRad,r=this.vangles,n=r?M1.pathPolygon:Xc.pathArc;return n(e,t[0],t[1],r)};Bd.pathSector=function(e){var t=this.sectorInRad,r=this.vangles,n=r?M1.pathPolygon:Xc.pathSector;return n(e,t[0],t[1],r)};Bd.pathAnnulus=function(e,t){var r=this.sectorInRad,n=this.vangles,i=n?M1.pathPolygonAnnulus:Xc.pathAnnulus;return i(e,t,r[0],r[1],n)};Bd.pathSubplot=function(){var e=this.innerRadius,t=this.radius;return e?this.pathAnnulus(e,t):this.pathSector(t)};Bd.fillViewInitialKey=function(e,t){e in this.viewInitial||(this.viewInitial[e]=t)};function QJe(e){var t=e.ticks+String(e.ticklen)+String(e.showticklabels);return"side"in e&&(t+=e.side),t}function hQt(e){var t=e[0],r=e[1],n=r-t,i=JJe(t,360),a=i+n,o=Math.cos(Nx(i)),s=Math.sin(Nx(i)),l=Math.cos(Nx(a)),u=Math.sin(Nx(a)),c,f,h,d;return i<=90&&a>=90||i>90&&a>=450?d=1:s<=0&&u<=0?d=0:d=Math.max(s,u),i<=180&&a>=180||i>180&&a>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),a>=360?h=1:o<=0&&l<=0?h=0:h=Math.max(o,l),[c,f,h,d]}function e$e(e,t){var r=function(i){return Xc.angleDist(e,i)},n=Xc.findIndexOfMin(t,r);return t[n]}function _C(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var rQ=ye((t3r,s$e)=>{"use strict";var dQt=Ih(),os=Rd(),vQt=Cc().attributes,f0=Pr().extendFlat,r$e=mc().overrideAll,i$e=r$e({color:os.color,showline:f0({},os.showline,{dflt:!0}),linecolor:os.linecolor,linewidth:os.linewidth,showgrid:f0({},os.showgrid,{dflt:!0}),gridcolor:os.gridcolor,gridwidth:os.gridwidth,griddash:os.griddash},"plot","from-root"),n$e=r$e({tickmode:os.minor.tickmode,nticks:os.nticks,tick0:os.tick0,dtick:os.dtick,tickvals:os.tickvals,ticktext:os.ticktext,ticks:os.ticks,ticklen:os.ticklen,tickwidth:os.tickwidth,tickcolor:os.tickcolor,ticklabelstep:os.ticklabelstep,showticklabels:os.showticklabels,labelalias:os.labelalias,minorloglabels:os.minorloglabels,showtickprefix:os.showtickprefix,tickprefix:os.tickprefix,showticksuffix:os.showticksuffix,ticksuffix:os.ticksuffix,showexponent:os.showexponent,exponentformat:os.exponentformat,minexponent:os.minexponent,separatethousands:os.separatethousands,tickfont:os.tickfont,tickangle:os.tickangle,tickformat:os.tickformat,tickformatstops:os.tickformatstops,layer:os.layer},"plot","from-root"),a$e={visible:f0({},os.visible,{dflt:!0}),type:f0({},os.type,{values:["-","linear","log","date","category"]}),autotypenumbers:os.autotypenumbers,autorangeoptions:{minallowed:os.autorangeoptions.minallowed,maxallowed:os.autorangeoptions.maxallowed,clipmin:os.autorangeoptions.clipmin,clipmax:os.autorangeoptions.clipmax,include:os.autorangeoptions.include,editType:"plot"},autorange:f0({},os.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:f0({},os.minallowed,{editType:"plot"}),maxallowed:f0({},os.maxallowed,{editType:"plot"}),range:f0({},os.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:os.categoryorder,categoryarray:os.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:os.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:f0({},os.title.text,{editType:"plot",dflt:""}),font:f0({},os.title.font,{editType:"plot"}),editType:"plot"},hoverformat:os.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(a$e,i$e,n$e);var o$e={visible:f0({},os.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:os.autotypenumbers,categoryorder:os.categoryorder,categoryarray:os.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:os.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(o$e,i$e,n$e);s$e.exports={domain:vQt({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:dQt.background},radialaxis:a$e,angularaxis:o$e,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var f$e=ye((r3r,c$e)=>{"use strict";var x9=Pr(),pQt=ka(),gQt=vl(),mQt=q_(),yQt=Id().getSubplotData,_Qt=Lb(),xQt=z3(),bQt=s_(),wQt=l_(),TQt=cI(),AQt=u4(),SQt=TB(),MQt=G3(),u$e=rQ(),EQt=Y$(),b9=d9(),l$e=b9.axisNames;function kQt(e,t,r,n){var i=r("bgcolor");n.bgColor=pQt.combine(i,n.paper_bgcolor);var a=r("sector");r("hole");var o=yQt(n.fullData,b9.name,n.id),s=n.layoutOut,l;function u(j,N){return r(l+"."+j,N)}for(var c=0;c<l$e.length;c++){l=l$e[c],x9.isPlainObject(e[l])||(e[l]={});var f=e[l],h=gQt.newContainer(t,l);h._id=h._name=l,h._attr=n.id+"."+l,h._traceIndices=o.map(function(j){return j.index});var d=b9.axisName2dataArray[l],v=CQt(f,h,u,o,d,n);TQt(f,h,u,{axData:o,dataAttr:d});var m=u("visible");switch(EQt(h,t,s),u("uirevision",t.uirevision),h._m=1,l){case"radialaxis":u("minallowed"),u("maxallowed");var b=u("range"),p=h.getAutorangeDflt(b),k=u("autorange",p),M;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,M=!0),M||(p=h.getAutorangeDflt(b),k=u("autorange",p)),f.autorange=k,k&&(SQt(u,k,b),(v==="linear"||v==="-")&&u("rangemode"),h.isReversed()&&(h._m=-1)),h.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(v==="date"){x9.log("Polar plots do not support date angular axes yet.");for(var T=0;T<o.length;T++)o[T].visible=!1;v=f.type=h.type="linear"}u(v==="linear"?"thetaunit":"period");var L=u("direction");u("rotation",{counterclockwise:0,clockwise:90}[L]);break}if(wQt(f,h,u,h.type,{tickSuffixDflt:h.thetaunit==="degrees"?"\xB0":void 0}),m){var x,C,S,g,P,E,z,q,U,G,Z=n.font||{};x=u("color"),C=x===f.color?x:Z.color,S=Z.size,g=Z.family,P=Z.weight,E=Z.style,z=Z.variant,q=Z.textcase,U=Z.lineposition,G=Z.shadow,_Qt(f,h,u,h.type),bQt(f,h,u,h.type,{font:{weight:P,style:E,variant:z,textcase:q,lineposition:U,shadow:G,color:C,size:S,family:g},noAutotickangles:l==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),xQt(f,h,u,{outerTicks:!0}),AQt(f,h,u,{dfltColor:x,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u$e[l]}),u("layer"),l==="radialaxis"&&(u("side"),u("angle",a[0]),u("title.text"),x9.coerceFont(u,"title.font",{weight:P,style:E,variant:z,textcase:q,lineposition:U,shadow:G,color:C,size:x9.bigFont(S),family:g}))}v!=="category"&&u("hoverformat"),h._input=f}t.angularaxis.type==="category"&&r("gridshape")}function CQt(e,t,r,n,i,a){var o=r("autotypenumbers",a.autotypenumbersDflt),s=r("type");if(s==="-"){for(var l,u=0;u<n.length;u++)if(n[u].visible){l=n[u];break}l&&l[i]&&(t.type=MQt(l[i],"gregorian",{noMultiCategory:!0,autotypenumbers:o})),t.type==="-"?t.type="linear":e.type=t.type}return t.type}c$e.exports=function(t,r,n){mQt(t,r,n,{type:b9.name,attributes:u$e,handleDefaults:kQt,font:r.font,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,fullData:n,layoutOut:r})}});var w9=ye((i3r,g$e)=>{"use strict";var LQt=Id().getSubplotCalcData,PQt=Pr().counterRegex,IQt=tQ(),d$e=d9(),v$e=d$e.attr,Cw=d$e.name,h$e=PQt(Cw),p$e={};p$e[v$e]={valType:"subplotid",dflt:Cw,editType:"calc"};function RQt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Cw],i=0;i<n.length;i++){var a=n[i],o=LQt(r,Cw,a),s=t[a]._subplot;s||(s=IQt(e,a),t[a]._subplot=s),s.plot(o,t,e._promises)}}function DQt(e,t,r,n){for(var i=n._subplots[Cw]||[],a=n._has&&n._has("gl"),o=t._has&&t._has("gl"),s=a&&!o,l=0;l<i.length;l++){var u=i[l],c=n[u]._subplot;if(!t[u]&&c){c.framework.remove(),c.layers["radial-axis-title"].remove();for(var f in c.clipPaths)c.clipPaths[f].remove()}s&&c._scene&&(c._scene.destroy(),c._scene=null)}}g$e.exports={attr:v$e,name:Cw,idRoot:Cw,idRegex:h$e,attrRegex:h$e,attributes:p$e,layoutAttributes:rQ(),supplyLayoutDefaults:f$e(),plot:RQt,clean:DQt,toSVG:mh().toSVG}});var xC=ye((n3r,y$e)=>{"use strict";var{hovertemplateAttrs:FQt,texttemplateAttrs:zQt,templatefallbackAttrs:m$e}=Ll(),T9=Ao().extendFlat,qQt=Pg(),h0=pf(),OQt=Gl(),$5=h0.line;y$e.exports={mode:h0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:h0.text,texttemplate:zQt({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:m$e({editType:"plot"}),hovertext:h0.hovertext,line:{color:$5.color,width:$5.width,dash:$5.dash,backoff:$5.backoff,shape:T9({},$5.shape,{values:["linear","spline"]}),smoothing:$5.smoothing,editType:"calc"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:T9({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:T9({},h0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:qQt(),hoverinfo:T9({},OQt.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:h0.hoveron,hovertemplate:FQt(),hovertemplatefallback:m$e(),selected:h0.selected,unselected:h0.unselected}});var S9=ye((a3r,b$e)=>{"use strict";var A9=Pr(),Q5=Ru(),BQt=$p(),NQt=D0(),_$e=lT(),UQt=F0(),VQt=Fg(),GQt=Lm().PTS_LINESONLY,HQt=xC();function jQt(e,t,r,n){function i(s,l){return A9.coerce(e,t,HQt,s,l)}var a=x$e(e,t,n,i);if(!a){t.visible=!1;return}i("thetaunit"),i("mode",a<GQt?"lines+markers":"lines"),i("text"),i("hovertext"),t.hoveron!=="fills"&&(i("hovertemplate"),i("hovertemplatefallback")),Q5.hasMarkers(t)&&BQt(e,t,r,n,i,{gradient:!0}),Q5.hasLines(t)&&(NQt(e,t,r,n,i,{backoff:!0}),_$e(e,t,i),i("connectgaps")),Q5.hasText(t)&&(i("texttemplate"),i("texttemplatefallback"),UQt(e,t,n,i));var o=[];(Q5.hasMarkers(t)||Q5.hasText(t))&&(i("cliponaxis"),i("marker.maxdisplayed"),o.push("points")),i("fill"),t.fill!=="none"&&(VQt(e,t,r,i),Q5.hasLines(t)||_$e(e,t,i)),(t.fill==="tonext"||t.fill==="toself")&&o.push("fills"),i("hoveron",o.join("+")||"points"),A9.coerceSelectionMarkerOpacity(t,i)}function x$e(e,t,r,n){var i=n("r"),a=n("theta");A9.isTypedArray(i)&&(t.r=i=Array.from(i)),A9.isTypedArray(a)&&(t.theta=a=Array.from(a));var o;if(i)a?o=Math.min(i.length,a.length):(o=i.length,n("theta0"),n("dtheta"));else{if(!a)return 0;o=t.theta.length,n("r0"),n("dr")}return t._length=o,o}b$e.exports={handleRThetaDefaults:x$e,supplyDefaults:jQt}});var M9=ye((o3r,T$e)=>{"use strict";var WQt=Pr(),w$e=ho();T$e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o,s;a?(o=a.radialAxis,s=a.angularAxis):(a=n[r.subplot],o=a.radialaxis,s=a.angularaxis);var l=o.c2l(t.r);i.rLabel=w$e.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?WQt.rad2deg(t.theta):t.theta;return i.thetaLabel=w$e.tickText(s,u,!0).text,i}});var M$e=ye((s3r,S$e)=>{"use strict";var A$e=Eo(),XQt=fs().BADNUM,ZQt=ho(),YQt=z0(),KQt=Rm(),JQt=q0(),$Qt=O0().calcMarkerSize;S$e.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=a.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f<u;f++){var h=s[f],d=l[f],v=c[f]={};A$e(h)&&A$e(d)?(v.r=h,v.theta=d):v.r=XQt}var m=$Qt(r,u);return r._extremes.x=ZQt.findExtremes(a,s,{ppad:m}),YQt(t,r),KQt(c,r),JQt(c,r),c}});var C$e=ye((l3r,k$e)=>{"use strict";var QQt=vT(),E$e=fs().BADNUM;k$e.exports=function(t,r,n){for(var i=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c<n.length;c++)for(var f=n[c],h=0;h<f.length;h++){h===0&&(f[0].trace._xA=a,f[0].trace._yA=o);var d=f[h],v=d.r;if(v===E$e)d.x=d.y=E$e;else{var m=l.c2g(v),b=u.c2g(d.theta);d.x=m*Math.cos(b),d.y=m*Math.sin(b)}}QQt(t,s,n,i)}});var E9=ye((u3r,P$e)=>{"use strict";var eer=yT();function ter(e,t,r,n){var i=eer(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,L$e(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function L$e(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle="r",a._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(i,n.rLabel),f.indexOf("theta")!==-1&&c(a,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("<br>")}}P$e.exports={hoverPoints:ter,makeHoverPointText:L$e}});var R$e=ye((c3r,I$e)=>{"use strict";I$e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:w9(),categories:["polar","symbols","showLegend","scatter-like"],attributes:xC(),supplyDefaults:S9().supplyDefaults,colorbar:$d(),formatLabels:M9(),calc:M$e(),plot:C$e(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:E9().hoverPoints,selectPoints:_T(),meta:{}}});var F$e=ye((f3r,D$e)=>{"use strict";D$e.exports=R$e()});var iQ=ye((v3r,q$e)=>{"use strict";var z$e=xC(),{cliponaxis:h3r,hoveron:d3r}=z$e,rer=gee(z$e,["cliponaxis","hoveron"]),{connectgaps:ier,line:{color:ner,dash:aer,width:oer},fill:ser,fillcolor:ler,marker:uer,textfont:cer,textposition:fer}=gk();q$e.exports=j1(_g({},rer),{connectgaps:ier,fill:ser,fillcolor:ler,line:{color:ner,dash:aer,editType:"calc",width:oer},marker:uer,textfont:cer,textposition:fer})});var N$e=ye((g3r,B$e)=>{"use strict";var O$e=Pr(),nQ=Ru(),her=S9().handleRThetaDefaults,der=$p(),ver=D0(),per=F0(),ger=Fg(),mer=Lm().PTS_LINESONLY,yer=iQ();B$e.exports=function(t,r,n,i){function a(s,l){return O$e.coerce(t,r,yer,s,l)}var o=her(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o<mer?"lines+markers":"lines"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback")),nQ.hasMarkers(r)&&der(t,r,n,i,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0}),nQ.hasLines(r)&&(ver(t,r,n,i,a),a("connectgaps")),nQ.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),per(t,r,i,a,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),a("fill"),r.fill!=="none"&&ger(t,r,n,a),O$e.coerceSelectionMarkerOpacity(r,a)}});var V$e=ye((m3r,U$e)=>{"use strict";var _er=M9();U$e.exports=function(t,r,n){var i=t.i;return"r"in t||(t.r=r._r[i]),"theta"in t||(t.theta=r._theta[i]),_er(t,r,n)}});var H$e=ye((y3r,G$e)=>{"use strict";var xer=z0(),ber=O0().calcMarkerSize,wer=sw(),Ter=ho(),Aer=px().TOO_MANY_POINTS;G$e.exports=function(t,r){var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=r._r=a.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u<s.length&&(s=s.slice(0,u)),u<l.length&&(l=l.slice(0,u)),c.r=s,c.theta=l,xer(t,r);var f=c.opts=wer.style(t,r),h;return u<Aer?h=ber(r,u):f.marker&&(h=2*(f.marker.sizeAvg||Math.max(f.marker.size,3))),r._extremes.x=Ter.findExtremes(a,s,{ppad:h}),[{x:!1,y:!1,t:c,trace:r}]}});var W$e=ye((_3r,j$e)=>{"use strict";var Ser=jF(),Mer=E9().makeHoverPointText;function Eer(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,l=Ser.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,Mer(f,h,c,u),l}}j$e.exports={hoverPoints:Eer}});var Z$e=ye((x3r,X$e)=>{"use strict";X$e.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:w9(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:iQ(),supplyDefaults:N$e(),colorbar:$d(),formatLabels:V$e(),calc:H$e(),hoverPoints:W$e().hoverPoints,selectPoints:gY(),meta:{}}});var Y$e=ye((b3r,aQ)=>{"use strict";var ker=ZF(),Cer=Eo(),Ler=xK(),Per=dY(),k9=sw(),C9=Pr(),Ier=px().TOO_MANY_POINTS,Rer={};aQ.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=Per(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,h=c.r,d=c.theta,v=c.opts,m,b=h.slice(),p=d.slice();for(m=0;m<h.length;m++)r.isPtInside({r:h[m],theta:d[m]})||(b[m]=NaN,p[m]=NaN);var k=new Array(f*2),M=Array(f),T=Array(f);for(m=0;m<f;m++){var L=b[m],x,C;if(Cer(L)){var S=i.c2g(L),g=a.c2g(p[m],u.thetaunit);x=S*Math.cos(g),C=S*Math.sin(g)}else x=C=NaN;M[m]=k[m*2]=x,T[m]=k[m*2+1]=C}c.tree=ker(k),v.marker&&f>=Ier&&(v.marker.cluster=c.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=k),v.line&&k.length>1&&C9.extendFlat(v.line,k9.linePositions(t,u,k)),v.text&&(C9.extendFlat(v.text,{positions:k},k9.textPosition(t,u,v.text,v.marker)),C9.extendFlat(v.textSel,{positions:k},k9.textPosition(t,u,v.text,v.markerSel)),C9.extendFlat(v.textUnsel,{positions:k},k9.textPosition(t,u,v.text,v.markerUnsel))),v.fill&&!o.fill2d&&(o.fill2d=!0),v.marker&&!o.scatter2d&&(o.scatter2d=!0),v.line&&!o.line2d&&(o.line2d=!0),v.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(v.line),o.fillOptions.push(v.fill),o.markerOptions.push(v.marker),o.markerSelectedOptions.push(v.markerSel),o.markerUnselectedOptions.push(v.markerUnsel),o.textOptions.push(v.text),o.textSelectedOptions.push(v.textSel),o.textUnselectedOptions.push(v.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=M,c.y=T,c.rawx=M,c.rawy=T,c.r=h,c.theta=d,c.positions=k,c._scene=o,c.index=o.count,o.count++}}),Ler(t,r,n)}};aQ.exports.reglPrecompiled=Rer});var $$e=ye((w3r,J$e)=>{"use strict";var K$e=Z$e();K$e.plot=Y$e();J$e.exports=K$e});var eQe=ye((T3r,Q$e)=>{"use strict";Q$e.exports=$$e()});var oQ=ye((A3r,tQe)=>{"use strict";var{hovertemplateAttrs:Der,templatefallbackAttrs:Fer}=Ll(),eS=Ao().extendFlat,Ux=xC(),Vx=zm();tQe.exports={r:Ux.r,theta:Ux.theta,r0:Ux.r0,dr:Ux.dr,theta0:Ux.theta0,dtheta:Ux.dtheta,thetaunit:Ux.thetaunit,base:eS({},Vx.base,{}),offset:eS({},Vx.offset,{}),width:eS({},Vx.width,{}),text:eS({},Vx.text,{}),hovertext:eS({},Vx.hovertext,{}),marker:zer(),hoverinfo:Ux.hoverinfo,hovertemplate:Der(),hovertemplatefallback:Fer(),selected:Vx.selected,unselected:Vx.unselected};function zer(){var e=eS({},Vx.marker);return delete e.cornerradius,e}});var sQ=ye((S3r,rQe)=>{"use strict";rQe.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var aQe=ye((M3r,nQe)=>{"use strict";var iQe=Pr(),qer=S9().handleRThetaDefaults,Oer=WI(),Ber=oQ();nQe.exports=function(t,r,n,i){function a(s,l){return iQe.coerce(t,r,Ber,s,l)}var o=qer(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),Oer(t,r,a,n,i),iQe.coerceSelectionMarkerOpacity(r,a)}});var sQe=ye((E3r,oQe)=>{"use strict";var Ner=Pr(),Uer=sQ();oQe.exports=function(e,t,r){var n={},i;function a(l,u){return Ner.coerce(e[i]||{},t[i],Uer,l,u)}for(var o=0;o<r.length;o++){var s=r[o];s.type==="barpolar"&&s.visible===!0&&(i=s.subplot,n[i]||(a("barmode"),a("bargap"),n[i]=1))}}});var lQ=ye((k3r,cQe)=>{"use strict";var lQe=pv().hasColorscale,uQe=gv(),Ver=Pr().isArrayOrTypedArray,Ger=A4(),Her=t2().setGroupPositions,jer=q0(),Wer=Oa().traceIs,Xer=Pr().extendFlat;function Zer(e,t){for(var r=e._fullLayout,n=t.subplot,i=r[n].radialaxis,a=r[n].angularaxis,o=i.makeCalcdata(t,"r"),s=a.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,h=0;h<l;h++)u[h]={p:f[h],s:c[h]};function d(v){var m=t[v];m!==void 0&&(t["_"+v]=Ver(m)?a.makeCalcdata(t,v):a.d2c(m,t.thetaunit))}return a.type==="linear"&&(d("width"),d("offset")),lQe(t,"marker")&&uQe(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),lQe(t,"marker.line")&&uQe(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),Ger(u,t),jer(u,t),u}function Yer(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&&Wer(s,"bar")&&s.subplot===r&&i.push(o)}var l=Xer({},t.radialaxis,{_id:"x"}),u=t.angularaxis;Her(e,u,l,i,{mode:t.barmode,norm:t.barnorm,gap:t.bargap,groupgap:t.bargroupgap})}cQe.exports={calc:Zer,crossTraceCalc:Yer}});var dQe=ye((C3r,hQe)=>{"use strict";var fQe=qa(),L9=Eo(),tS=Pr(),Ker=So(),uQ=p9();hQe.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=Jer(r),c=r.layers.frontplot.select("g.barlayer");tS.makeTraceGroups(c,n,"trace bars").each(function(){var f=fQe.select(this),h=tS.ensureSingle(f,"g","points"),d=h.selectAll("g.point").data(tS.identity);d.enter().append("g").style("vector-effect",i?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),d.exit().remove(),d.each(function(v){var m=fQe.select(this),b=v.rp0=s.c2p(v.s0),p=v.rp1=s.c2p(v.s1),k=v.thetag0=l.c2g(v.p0),M=v.thetag1=l.c2g(v.p1),T;if(!L9(b)||!L9(p)||!L9(k)||!L9(M)||b===p||k===M)T="M0,0Z";else{var L=s.c2g(v.s1),x=(k+M)/2;v.ct=[a.c2p(L*Math.cos(x)),o.c2p(L*Math.sin(x))],T=u(b,p,k,M)}tS.ensureSingle(m,"path").attr("d",T)}),Ker.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function Jer(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,l;tS.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=uQ.findEnclosingVertexAngles(s,e.vangles)[0],c=uQ.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return uQ.pathPolygonAnnulus(n,i,s,l,f,t,r)}:function(n,i,a,o){return tS.pathAnnulus(n,i,a,o,t,r)}}});var pQe=ye((L3r,vQe)=>{"use strict";var $er=vf(),cQ=Pr(),Qer=IT().getTraceColor,etr=cQ.fillText,ttr=E9().makeHoverPointText,rtr=p9().isPtInsidePolygon;vQe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?rtr:cQ.isPtInsideSector,f=t.maxHoverDistance,h=l._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),v=Math.atan2(n,r);s.range[0]>s.range[1]&&(v+=Math.PI);var m=function(M){return c(d,v,[M.rp0,M.rp1],[M.thetag0,M.thetag1],u)?f+Math.min(1,Math.abs(M.thetag1-M.thetag0)/h)-1+(M.rp1-d)/(M.rp1-M.rp0)-1:1/0};if($er.getClosest(i,m,t),t.index!==!1){var b=t.index,p=i[b];t.x0=t.x1=p.ct[0],t.y0=t.y1=p.ct[1];var k=cQ.extendFlat({},p,{r:p.s,theta:p.p});return etr(p,a,t),ttr(k,a,o,t),t.hovertemplate=a.hovertemplate,t.color=Qer(a,p),t.xLabelVal=t.yLabelVal=void 0,p.s<0&&(t.idealAlign="left"),[t]}}});var mQe=ye((P3r,gQe)=>{"use strict";gQe.exports={moduleType:"trace",name:"barpolar",basePlotModule:w9(),categories:["polar","bar","showLegend"],attributes:oQ(),layoutAttributes:sQ(),supplyDefaults:aQe(),supplyLayoutDefaults:sQe(),calc:lQ().calc,crossTraceCalc:lQ().crossTraceCalc,plot:dQe(),colorbar:$d(),formatLabels:M9(),style:V0().style,styleOnSelect:V0().styleOnSelect,hoverPoints:pQe(),selectPoints:RT(),meta:{}}});var _Qe=ye((I3r,yQe)=>{"use strict";yQe.exports=mQe()});var fQ=ye((R3r,xQe)=>{"use strict";xQe.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var hQ=ye((D3r,AQe)=>{"use strict";var itr=Ih(),Uf=Rd(),ntr=Cc().attributes,Gx=Pr().extendFlat,bQe=mc().overrideAll,wQe=bQe({color:Uf.color,showline:Gx({},Uf.showline,{dflt:!0}),linecolor:Uf.linecolor,linewidth:Uf.linewidth,showgrid:Gx({},Uf.showgrid,{dflt:!0}),gridcolor:Uf.gridcolor,gridwidth:Uf.gridwidth,griddash:Uf.griddash},"plot","from-root"),TQe=bQe({ticklen:Uf.ticklen,tickwidth:Gx({},Uf.tickwidth,{dflt:2}),tickcolor:Uf.tickcolor,showticklabels:Uf.showticklabels,labelalias:Uf.labelalias,showtickprefix:Uf.showtickprefix,tickprefix:Uf.tickprefix,showticksuffix:Uf.showticksuffix,ticksuffix:Uf.ticksuffix,tickfont:Uf.tickfont,tickformat:Uf.tickformat,hoverformat:Uf.hoverformat,layer:Uf.layer},"plot","from-root"),atr=Gx({visible:Gx({},Uf.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Gx({},Uf.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},wQe,TQe),otr=Gx({visible:Gx({},Uf.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:Uf.ticks,editType:"calc"},wQe,TQe);AQe.exports={domain:ntr({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:itr.background},realaxis:atr,imaginaryaxis:otr,editType:"calc"}});var EQe=ye((F3r,MQe)=>{"use strict";var rS=Pr(),str=ka(),ltr=vl(),utr=q_(),ctr=Id().getSubplotData,ftr=l_(),htr=s_(),dtr=u4(),vtr=xm(),iS=hQ(),dQ=fQ(),SQe=dQ.axisNames,ptr=mtr(function(e){return rS.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function gtr(e,t,r,n){var i=r("bgcolor");n.bgColor=str.combine(i,n.paper_bgcolor);var a=ctr(n.fullData,dQ.name,n.id),o=n.layoutOut,s;function l(L,x){return r(s+"."+L,x)}for(var u=0;u<SQe.length;u++){s=SQe[u],rS.isPlainObject(e[s])||(e[s]={});var c=e[s],f=ltr.newContainer(t,s);f._id=f._name=s,f._attr=n.id+"."+s,f._traceIndices=a.map(function(L){return L.index});var h=l("visible");if(f.type="linear",vtr(f,o),ftr(c,f,l,f.type),h){var d=s==="realaxis";if(d&&l("side"),d)l("tickvals");else{var v=ptr(t.realaxis.tickvals||iS.realaxis.tickvals.dflt);l("tickvals",v)}rS.isTypedArray(f.tickvals)&&(f.tickvals=Array.from(f.tickvals));var m,b,p,k,M=n.font||{};h&&(m=l("color"),b=m===c.color?m:M.color,p=M.size,k=M.family),htr(c,f,l,f.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!d,noExp:!0,font:{color:b,size:p,family:k}}),rS.coerce2(e,t,iS,s+".ticklen"),rS.coerce2(e,t,iS,s+".tickwidth"),rS.coerce2(e,t,iS,s+".tickcolor",t.color);var T=l("ticks");T||(delete t[s].ticklen,delete t[s].tickwidth,delete t[s].tickcolor),dtr(c,f,l,{dfltColor:m,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:iS[s]}),l("layer")}l("hoverformat"),delete f.type,f._input=c}}MQe.exports=function(t,r,n){utr(t,r,n,{noUirevision:!0,type:dQ.name,attributes:iS,handleDefaults:gtr,font:r.font,paper_bgcolor:r.paper_bgcolor,fullData:n,layoutOut:r})};function mtr(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 RQe=ye((z3r,IQe)=>{"use strict";var ytr=Id().getSubplotCalcData,_tr=Pr().counterRegex,xtr=tQ(),CQe=fQ(),LQe=CQe.attr,Lw=CQe.name,kQe=_tr(Lw),PQe={};PQe[LQe]={valType:"subplotid",dflt:Lw,editType:"calc"};function btr(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Lw],i=0;i<n.length;i++){var a=n[i],o=ytr(r,Lw,a),s=t[a]._subplot;s||(s=xtr(e,a,!0),t[a]._subplot=s),s.plot(o,t,e._promises)}}function wtr(e,t,r,n){for(var i=n._subplots[Lw]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;if(!t[o]&&s){s.framework.remove();for(var l in s.clipPaths)s.clipPaths[l].remove()}}}IQe.exports={attr:LQe,name:Lw,idRoot:Lw,idRegex:kQe,attrRegex:kQe,attributes:PQe,layoutAttributes:hQ(),supplyLayoutDefaults:EQe(),plot:btr,clean:wtr,toSVG:mh().toSVG}});var vQ=ye((q3r,FQe)=>{"use strict";var{hovertemplateAttrs:Ttr,texttemplateAttrs:Atr,templatefallbackAttrs:DQe}=Ll(),P9=Ao().extendFlat,Str=Pg(),d0=pf(),Mtr=Gl(),nS=d0.line;FQe.exports={mode:d0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:d0.text,texttemplate:Atr({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:DQe({editType:"plot"}),hovertext:d0.hovertext,line:{color:nS.color,width:nS.width,dash:nS.dash,backoff:nS.backoff,shape:P9({},nS.shape,{values:["linear","spline"]}),smoothing:nS.smoothing,editType:"calc"},connectgaps:d0.connectgaps,marker:d0.marker,cliponaxis:P9({},d0.cliponaxis,{dflt:!1}),textposition:d0.textposition,textfont:d0.textfont,fill:P9({},d0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:Str(),hoverinfo:P9({},Mtr.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:d0.hoveron,hovertemplate:Ttr(),hovertemplatefallback:DQe(),selected:d0.selected,unselected:d0.unselected}});var OQe=ye((O3r,qQe)=>{"use strict";var I9=Pr(),aS=Ru(),Etr=$p(),ktr=D0(),zQe=lT(),Ctr=F0(),Ltr=Fg(),Ptr=Lm().PTS_LINESONLY,Itr=vQ();qQe.exports=function(t,r,n,i){function a(l,u){return I9.coerce(t,r,Itr,l,u)}var o=Rtr(t,r,i,a);if(!o){r.visible=!1;return}a("mode",o<Ptr?"lines+markers":"lines"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback")),aS.hasMarkers(r)&&Etr(t,r,n,i,a,{gradient:!0}),aS.hasLines(r)&&(ktr(t,r,n,i,a,{backoff:!0}),zQe(t,r,a),a("connectgaps")),aS.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),Ctr(t,r,i,a));var s=[];(aS.hasMarkers(r)||aS.hasText(r))&&(a("cliponaxis"),a("marker.maxdisplayed"),s.push("points")),a("fill"),r.fill!=="none"&&(Ltr(t,r,n,a),aS.hasLines(r)||zQe(t,r,a)),(r.fill==="tonext"||r.fill==="toself")&&s.push("fills"),a("hoveron",s.join("+")||"points"),I9.coerceSelectionMarkerOpacity(r,a)};function Rtr(e,t,r,n){var i=n("real"),a=n("imag"),o;return i&&a&&(o=Math.min(i.length,a.length)),I9.isTypedArray(i)&&(t.real=i=Array.from(i)),I9.isTypedArray(a)&&(t.imag=a=Array.from(a)),t._length=o,o}});var UQe=ye((B3r,NQe)=>{"use strict";var BQe=ho();NQe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=BQe.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=BQe.tickText(a.angularAxis,t.imag,!0).text,i}});var HQe=ye((N3r,GQe)=>{"use strict";var VQe=Eo(),Dtr=fs().BADNUM,Ftr=z0(),ztr=Rm(),qtr=q0(),Otr=O0().calcMarkerSize;GQe.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].realaxis,o=n[i].imaginaryaxis,s=a.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f<u;f++){var h=s[f],d=l[f],v=c[f]={};VQe(h)&&VQe(d)?(v.real=h,v.imag=d):v.real=Dtr}return Otr(r,u),Ftr(t,r),ztr(c,r),qtr(c,r),c}});var XQe=ye((U3r,WQe)=>{"use strict";var Btr=vT(),jQe=fs().BADNUM,Ntr=$$(),Utr=Ntr.smith;WQe.exports=function(t,r,n){for(var i=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l<n.length;l++)for(var u=n[l],c=0;c<u.length;c++){c===0&&(u[0].trace._xA=a,u[0].trace._yA=o);var f=u[c],h=f.real;if(h===jQe)f.x=f.y=jQe;else{var d=Utr([h,f.imag]);f.x=d[0],f.y=d[1]}}Btr(t,s,n,i)}});var KQe=ye((V3r,YQe)=>{"use strict";var Vtr=yT();function Gtr(e,t,r,n){var i=Vtr(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,ZQe(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function ZQe(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle="real",a._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(i,n.realLabel),f.indexOf("imag")!==-1&&c(a,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("<br>")}}YQe.exports={hoverPoints:Gtr,makeHoverPointText:ZQe}});var $Qe=ye((G3r,JQe)=>{"use strict";JQe.exports={moduleType:"trace",name:"scattersmith",basePlotModule:RQe(),categories:["smith","symbols","showLegend","scatter-like"],attributes:vQ(),supplyDefaults:OQe(),colorbar:$d(),formatLabels:UQe(),calc:HQe(),plot:XQe(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:KQe().hoverPoints,selectPoints:_T(),meta:{}}});var eet=ye((H3r,QQe)=>{"use strict";QQe.exports=$Qe()});var kv=ye((j3r,ret)=>{var D9=Nh();function tet(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}D9(tet.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,i){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,i):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(a===0?"":e[a]+t[i])+n,i++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function pQ(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function R9(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}D9(pQ.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Gs.local.differentCalendars||Gs.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+R9(Math.abs(this.year()),4)+"-"+R9(this.month(),2)+"-"+R9(this.day(),2)}});function gQ(){this.shortYearCutoff="+10"}D9(gQ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new pQ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+R9(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var n=e.toJD()+t*(r==="w"?this.daysInWeek():1),i=e.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),i=e.day(),s=function(c){for(;o<c.minMonth;)a--,o+=c.monthsInYear(a);for(var f=c.monthsInYear(a);o>f-1+c.minMonth;)a++,o-=f,f=c.monthsInYear(a)};r==="y"?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):r==="m"&&(s(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var l=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;t=this._add(e,r*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);var n=r==="y"?t:e.year(),i=r==="m"?t:e.month(),a=r==="d"?t:e.day();return(r==="y"||r==="m")&&(a=Math.min(a,this.daysInMonth(n,i))),e.date(n,i,a)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var i=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth<this.monthsInYear(i)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);return Gs.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(e){return this.fromJD(Gs.instance().fromJSDate(e).toJD())},_validate:function(e,t,r,n){if(e.year){if(this._validateLevel===0&&this.name!==e.calendar().name)throw(Gs.local.differentCalendars||Gs.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,e.calendar().local.name);return e}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(e,t,r))throw n.replace(/\{0\}/,this.local.name);var i=this.newDate(e,t,r);return this._validateLevel--,i}catch(a){throw this._validateLevel--,a}}});function mQ(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}mQ.prototype=new gQ;D9(mQ.prototype,{name:"Gregorian",jdEpoch:17214255e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===0&&(r%100!==0||r%400===0)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<3&&(t+=12,e--);var i=Math.floor(e/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r+a-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=Math.floor((t-186721625e-2)/36524.25);r=t+1+r-Math.floor(r/4);var n=r+1524,i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=n-a-Math.floor(o*30.6001),l=o-(o>13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Gs=ret.exports=new tet;Gs.cdate=pQ;Gs.baseCalendar=gQ;Gs.calendars.gregorian=mQ});var iet=ye(()=>{var yQ=Nh(),Nd=kv();yQ(Nd.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"});Nd.local=Nd.regionalOptions[""];yQ(Nd.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});yQ(Nd.baseCalendar.prototype,{UNIX_EPOCH:Nd.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Nd.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw Nd.local.invalidFormat||Nd.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,i=r.dayNames||this.local.dayNames,a=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(T,L){for(var x=1;M+x<e.length&&e.charAt(M+x)===T;)x++;return M+=x-1,Math.floor(x/(L||1))>1},c=function(T,L,x,C){var S=""+L;if(u(T,C))for(;S.length<x;)S="0"+S;return S},f=function(T,L,x,C){return u(T)?C[L]:x[L]},h=this,d=function(T){return typeof a=="function"?a.call(h,T,u("m")):b(c("m",T.month(),2))},v=function(T,L){return L?typeof s=="function"?s.call(h,T):s[T.month()-h.minMonth]:typeof o=="function"?o.call(h,T):o[T.month()-h.minMonth]},m=this.local.digits,b=function(T){return r.localNumbers&&m?m(T):T},p="",k=!1,M=0;M<e.length;M++)if(k)e.charAt(M)==="'"&&!u("'")?k=!1:p+=e.charAt(M);else switch(e.charAt(M)){case"d":p+=b(c("d",t.day(),2));break;case"D":p+=f("D",t.dayOfWeek(),n,i);break;case"o":p+=c("o",t.dayOfYear(),3);break;case"w":p+=c("w",t.weekOfYear(),2);break;case"m":p+=d(t);break;case"M":p+=v(t,u("M"));break;case"y":p+=u("y",2)?t.year():(t.year()%100<10?"0":"")+t.year()%100;break;case"Y":u("Y",2),p+=t.formatYear();break;case"J":p+=t.toJD();break;case"@":p+=(t.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":p+=(t.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":u("'")?p+="'":k=!0;break;default:p+=e.charAt(M)}return p},parseDate:function(e,t,r){if(t==null)throw Nd.local.invalidArguments||Nd.regionalOptions[""].invalidArguments;if(t=typeof t=="object"?t.toString():t+"",t==="")return null;e=e||this.local.dateFormat,r=r||{};var n=r.shortYearCutoff||this.shortYearCutoff;n=typeof n!="string"?n:this.today().year()%100+parseInt(n,10);for(var i=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.parseMonth||this.local.parseMonth,s=r.monthNumbers||this.local.monthNumbers,l=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,c=-1,f=-1,h=-1,d=-1,v=-1,m=!1,b=!1,p=function(z,q){for(var U=1;g+U<e.length&&e.charAt(g+U)===z;)U++;return g+=U-1,Math.floor(U/(q||1))>1},k=function(z,q){var U=p(z,q),G=[2,3,U?4:2,U?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],Z=new RegExp("^-?\\d{1,"+G+"}"),j=t.substring(S).match(Z);if(!j)throw(Nd.local.missingNumberAt||Nd.regionalOptions[""].missingNumberAt).replace(/\{0\}/,S);return S+=j[0].length,parseInt(j[0],10)},M=this,T=function(){if(typeof s=="function"){p("m");var z=s.call(M,t.substring(S));return S+=z.length,z}return k("m")},L=function(z,q,U,G){for(var Z=p(z,G)?U:q,j=0;j<Z.length;j++)if(t.substr(S,Z[j].length).toLowerCase()===Z[j].toLowerCase())return S+=Z[j].length,j+M.minMonth;throw(Nd.local.unknownNameAt||Nd.regionalOptions[""].unknownNameAt).replace(/\{0\}/,S)},x=function(){if(typeof u=="function"){var z=p("M")?u.call(M,t.substring(S)):l.call(M,t.substring(S));return S+=z.length,z}return L("M",l,u)},C=function(){if(t.charAt(S)!==e.charAt(g))throw(Nd.local.unexpectedLiteralAt||Nd.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,S);S++},S=0,g=0;g<e.length;g++)if(b)e.charAt(g)==="'"&&!p("'")?b=!1:C();else switch(e.charAt(g)){case"d":d=k("d");break;case"D":L("D",i,a);break;case"o":v=k("o");break;case"w":k("w");break;case"m":h=T();break;case"M":h=x();break;case"y":var P=g;m=!p("y",2),g=P,f=k("y",2);break;case"Y":f=k("Y",2);break;case"J":c=k("J")+.5,t.charAt(S)==="."&&(S++,k("J"));break;case"@":c=k("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":c=k("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":S=t.length;break;case"'":p("'")?C():b=!0;break;default:C()}if(S<t.length)throw Nd.local.unexpectedText||Nd.regionalOptions[""].unexpectedText;if(f===-1?f=this.today().year():f<100&&m&&(f+=n===-1?1900:this.today().year()-this.today().year()%100-(f<=n?0:100)),typeof h=="string"&&(h=o.call(this,f,h)),v>-1){h=1,d=v;for(var E=this.daysInMonth(f,h);d>E;E=this.daysInMonth(f,h))h++,d-=E}return c>-1?this.fromJD(c):this.newDate(f,h,d)},determineDate:function(e,t,r,n,i){r&&typeof r!="object"&&(i=n,n=r,r=null),typeof n!="string"&&(i=n,n="");var a=this,o=function(s){try{return a.parseDate(n,s,i)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||a.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e),e}})});var net=ye(()=>{var Hx=kv(),Htr=Nh(),_Q=Hx.instance();function F9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}F9.prototype=new Hx.baseCalendar;Htr(F9.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if(typeof e=="string"){var r=e.match(Wtr);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(Xtr);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(Ztr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95F0"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]==="\u95F0"&&(n=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var i=t[t.length-1];n=i==="i"||i==="I"}var a=this.toMonthIndex(e,r,n);return a},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),i=r&&t!==n;if(i||t<1||t>12)throw Hx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return n?!r&&t<=n?a=t-1:a=t:a=t-1,a},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw Hx.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return r?t<r?i=t+1:i=t:i=t+1,i},intercalaryMonth:function(e){e=this._validateYear(e);var t=jx[e-jx[0]],r=t>>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var n=this._validateYear(e,Hx.local.invalidyear),i=Wx[n-Wx[0]],a=i>>9&4095,o=i>>5&15,s=i&31,l;l=_Q.newDate(a,o,s),l.add(4-(l.dayOfWeek()||7),"d");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=jx[e-jx[0]],n=r>>13,i=n?12:11;if(t>i)throw Hx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a=r&1<<12-t?30:29;return a},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,a,r,Hx.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var i=this.isIntercalaryMonth(e,t),a=this.toChineseMonth(e,t),o=Ktr(e,a,r,i);return _Q.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=_Q.fromJD(e),r=Ytr(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(jtr),r=this._validateYear(+t[1]),n=+t[2],i=!!t[3],a=this.toMonthIndex(r,n,i),o=+t[4];return this.newDate(r,a,o)},add:function(e,t,r){var n=e.year(),i=e.month(),a=this.isIntercalaryMonth(n,i),o=this.toChineseMonth(n,i),s=Object.getPrototypeOf(F9.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=a&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var jtr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,Wtr=/^\d?\d[iI]?/m,Xtr=/^闰?十?[一二三四五六七八九]?月/m,Ztr=/^闰?十?[一二三四五六七八九]?/m;Hx.calendars.chinese=F9;var jx=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],Wx=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function Ytr(e,t,r,n){var i,a;if(typeof e=="object")i=e,a=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");i={year:e,month:t,day:r},a=n||{}}var u=Wx[i.year-Wx[0]],c=i.year<<9|i.month<<5|i.day;a.year=c>=u?i.year:i.year-1,u=Wx[a.year-Wx[0]];var f=u>>9&4095,h=u>>5&15,d=u&31,v,m=new Date(f,h-1,d),b=new Date(i.year,i.month-1,i.day);v=Math.round((b-m)/(24*3600*1e3));var p=jx[a.year-jx[0]],k;for(k=0;k<13;k++){var M=p&1<<12-k?30:29;if(v<M)break;v-=M}var T=p>>13;return!T||k<T?(a.isIntercalary=!1,a.month=1+k):k===T?(a.isIntercalary=!0,a.month=k):(a.isIntercalary=!1,a.month=k),a.day=1+v,a}function Ktr(e,t,r,n,i){var a,o;if(typeof e=="object")o=e,a=t||{};else{var s=typeof e=="number"&&e>=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,a=n):(c=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=jx[o.year-jx[0]],d=h>>13,v;d&&(o.month>d||o.isIntercalary)?v=o.month:v=o.month-1;for(var m=0;m<v;m++){var b=h&1<<12-m?30:29;f+=b}var p=Wx[o.year-Wx[0]],k=p>>9&4095,M=p>>5&15,T=p&31,L=new Date(k,M-1,T+f);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var aet=ye(()=>{var Pw=kv(),Jtr=Nh();function xQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}xQ.prototype=new Pw.baseCalendar;Jtr(xQ.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Pw.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Pw.local.invalidYear||Pw.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Pw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Pw.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});Pw.calendars.coptic=xQ});var oet=ye(()=>{var E1=kv(),$tr=Nh();function bQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}bQ.prototype=new E1.baseCalendar;$tr(bQ.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,E1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return{century:Qtr[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var Qtr={20:"Fruitbat",21:"Anchovy"};E1.calendars.discworld=bQ});var set=ye(()=>{var Iw=kv(),err=Nh();function wQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}wQ.prototype=new Iw.baseCalendar;err(wQ.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Iw.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,Iw.local.invalidYear||Iw.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,Iw.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,Iw.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)}});Iw.calendars.ethiopian=wQ});var uet=ye(()=>{var Xx=kv(),trr=Nh();function TQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}TQ.prototype=new Xx.baseCalendar;trr(TQ.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,z9(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Xx.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&z9(this.daysInYear(e),10)===5?30:t===9&&z9(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Xx.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,Xx.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e<=0?e+1:e,a=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)a+=this.daysInMonth(e,o);for(var o=1;o<t;o++)a+=this.daysInMonth(e,o)}else for(var o=7;o<t;o++)a+=this.daysInMonth(e,o);return a},_delay1:function(e){var t=Math.floor((235*e-234)/19),r=12084+13753*t,n=t*29+Math.floor(r/25920);return z9(3*(n+1),7)<3&&n++,n},_delay2:function(e){var t=this._delay1(e-1),r=this._delay1(e),n=this._delay1(e+1);return n-r===356?2:r-t===382?1:0},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor((e-this.jdEpoch)*98496/35975351)-1;e>=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=e<this.toJD(t,1,1)?7:1;e>this.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function z9(e,t){return e-t*Math.floor(e/t)}Xx.calendars.hebrew=TQ});var cet=ye(()=>{var bC=kv(),rrr=Nh();function AQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}AQ.prototype=new bC.baseCalendar;rrr(AQ.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,bC.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,bC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,bC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});bC.calendars.islamic=AQ});var fet=ye(()=>{var wC=kv(),irr=Nh();function SQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}SQ.prototype=new wC.baseCalendar;irr(SQ.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,wC.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,wC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,wC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}});wC.calendars.julian=SQ});var det=ye(()=>{var fg=kv(),nrr=Nh();function EQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}EQ.prototype=new fg.baseCalendar;nrr(EQ.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r<e.length;r++){var n=parseInt(e[r],10);if(Math.abs(n)>19||r>0&&n<0)throw"Invalid Mayan year";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,fg.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,fg.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,fg.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate),i=n.toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=MQ(e+8+17*20,365);return[Math.floor(t/20)+1,MQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[het(e+20,20),het(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function MQ(e,t){return e-t*Math.floor(e/t)}function het(e,t){return MQ(e-1,t)+1}fg.calendars.mayan=EQ});var pet=ye(()=>{var Rw=kv(),arr=Nh();function kQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}kQ.prototype=new Rw.baseCalendar;var vet=Rw.instance("gregorian");arr(kQ.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Rw.local.invalidYear||Rw.regionalOptions[""].invalidYear);return vet.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,Rw.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,Rw.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+vet.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)}});Rw.calendars.nanakshahi=kQ});var get=ye(()=>{var Dw=kv(),orr=Nh();function CQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}CQ.prototype=new Dw.baseCalendar;orr(CQ.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Dw.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,Dw.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,Dw.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=Dw.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(a=r,o--);o!==9;)o<=0&&(o=12,s--),a+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(a+=r-this.NEPALI_CALENDAR_DATA[s][0],a<0&&(a+=i.daysInYear(l))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(l,1,1).add(a,"d").toJD()},fromJD:function(e){var t=Dw.instance(),r=t.fromJD(e),n=r.year(),i=r.dayOfYear(),a=n+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)o++,o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r<e+2;r++)typeof this.NEPALI_CALENDAR_DATA[r]=="undefined"&&(this.NEPALI_CALENDAR_DATA[r]=t)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}});Dw.calendars.nepali=CQ});var met=ye(()=>{var oS=kv(),srr=Nh();function O9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function q9(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,i=r*(t+1),a=n-Math.floor(n),o=i-Math.floor(i);return a>o}O9.prototype=new oS.baseCalendar;srr(O9.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,oS.local.invalidYear);return q9(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,oS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,oS.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=0;if(e>0)for(var a=1;a<e;a++)q9(a)&&i++;else if(e<0)for(var a=e;a<0;a++)q9(a)&&i--;return r+(t<=7?(t-1)*31:(t-1)*30+6)+(e>0?e-1:e)*365+i+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,q9(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,i=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),a=e-this.toJD(r,i,1)+1;return this.newDate(r,i,a)}});oS.calendars.persian=O9;oS.calendars.jalali=O9});var yet=ye(()=>{var Fw=kv(),lrr=Nh(),B9=Fw.instance();function LQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}LQ.prototype=new Fw.baseCalendar;lrr(LQ.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Fw.local.invalidYear),r=this._t2gYear(t.year());return B9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Fw.local.invalidYear),i=this._t2gYear(n.year());return B9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Fw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Fw.local.invalidDate),i=this._t2gYear(n.year());return B9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=B9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});Fw.calendars.taiwan=LQ});var _et=ye(()=>{var zw=kv(),urr=Nh(),N9=zw.instance();function PQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}PQ.prototype=new zw.baseCalendar;urr(PQ.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,zw.local.invalidYear),r=this._t2gYear(t.year());return N9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,zw.local.invalidYear),i=this._t2gYear(n.year());return N9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,zw.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,zw.local.invalidDate),i=this._t2gYear(n.year());return N9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=N9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});zw.calendars.thai=PQ});var xet=ye(()=>{var qw=kv(),crr=Nh();function IQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}IQ.prototype=new qw.baseCalendar;crr(IQ.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,qw.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,qw.local.invalidMonth),n=r.toJD()-24e5+.5,i=0,a=0;a<Zx.length;a++){if(Zx[a]>n)return Zx[i]-Zx[i-1];i++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,qw.local.invalidDate),i=12*(n.year()-1)+n.month()-15292,a=n.day()+Zx[i-1]-1;return a+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;n<Zx.length&&!(Zx[n]>t);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),o=a+1,s=i-12*a,l=t-Zx[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=qw.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=qw.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\{0\}/,this.local.name);return i}});qw.calendars.ummalqura=IQ;var Zx=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]});var wet=ye((wTr,bet)=>{"use strict";bet.exports=kv();iet();net();aet();oet();set();uet();cet();fet();det();pet();get();met();yet();_et();xet()});var Let=ye((TTr,Cet)=>{"use strict";var Aet=wet(),TC=Pr(),Met=fs(),frr=Met.EPOCHJD,hrr=Met.ONEDAY,FQ={valType:"enumerated",values:TC.sortObjectKeys(Aet.calendars),editType:"calc",dflt:"gregorian"},Eet=function(e,t,r,n){var i={};return i[r]=FQ,TC.coerce(e,t,i,r,n)},drr=function(e,t,r,n){for(var i=0;i<r.length;i++)Eet(e,t,r[i]+"calendar",n.calendar)},vrr={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"},prr={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"},grr={chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},U9="##",mrr={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:U9,w:U9,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function yrr(e,t,r){for(var n=Math.floor((t+.05)/hrr)+frr,i=ket(r).fromJD(n),a=0,o,s,l,u,c;(a=e.indexOf("%",a))!==-1;)o=e.charAt(a+1),o==="0"||o==="-"||o==="_"?(l=3,s=e.charAt(a+2),o==="_"&&(o="-")):(s=o,o="0",l=2),u=mrr[s],u?(u===U9?c=U9:c=i.formatDate(u[o]),e=e.slice(0,a)+c+e.slice(a+l),a+=c.length):a+=l;return e}var Tet={};function ket(e){var t=Tet[e];return t||(t=Tet[e]=Aet.instance(e),t)}function AC(e){return TC.extendFlat({},FQ,{description:e})}function zQ(e){return"Sets the calendar system to use with `"+e+"` date data."}var DQ={xcalendar:AC(zQ("x"))},cy=TC.extendFlat({},DQ,{ycalendar:AC(zQ("y"))}),RQ=TC.extendFlat({},cy,{zcalendar:AC(zQ("z"))}),sS=AC(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));Cet.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:cy,bar:cy,box:cy,heatmap:cy,contour:cy,histogram:cy,histogram2d:cy,histogram2dcontour:cy,scatter3d:RQ,surface:RQ,mesh3d:RQ,scattergl:cy,ohlc:DQ,candlestick:DQ},layout:{calendar:AC(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:sS},yaxis:{calendar:sS},scene:{xaxis:{calendar:sS},yaxis:{calendar:sS},zaxis:{calendar:sS}},polar:{radialaxis:{calendar:sS}}}},layoutAttributes:FQ,handleDefaults:Eet,handleTraceDefaults:drr,CANONICAL_SUNDAY:prr,CANONICAL_TICK:vrr,DFLTRANGE:grr,getCal:ket,worldCalFmt:yrr}});var Iet=ye((ATr,Pet)=>{"use strict";Pet.exports=Let()});var _rr=ye((STr,Det)=>{var Ret=uye();Ret.register([f1e(),$1e(),hxe(),Rxe(),Xxe(),Gbe(),r2e(),H2e(),_we(),t3e(),V3e(),eke(),Gke(),D6e(),wLe(),QLe(),TPe(),ZIe(),d8e(),P8e(),G8e(),iRe(),yRe(),DRe(),fFe(),PFe(),ZBe(),ZNe(),nVe(),LVe(),NGe(),tHe(),SHe(),qje(),$je(),wWe(),PXe(),tZe(),zZe(),nKe(),CKe(),KKe(),wJe(),zJe(),F$e(),eQe(),_Qe(),eet(),Iet()]);Det.exports=Ret});return _rr();})();
|
||
/*!
|
||
* 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;
|
||
})); |